diff --git a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj index 97f29769969..55f8b1f0991 100644 --- a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj +++ b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj @@ -53,6 +53,7 @@ + diff --git a/src/BootstrapBlazor.Server/Components/Samples/RDKits.razor b/src/BootstrapBlazor.Server/Components/Samples/RDKits.razor new file mode 100644 index 00000000000..956bb33422a --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Samples/RDKits.razor @@ -0,0 +1,14 @@ +@page "/rdkit" +@inject IStringLocalizer Localizer + +

@Localizer["RDKitTitle"]

+ +

@Localizer["RDKitDescription"]

+ + + + + + diff --git a/src/BootstrapBlazor.Server/Components/Samples/RDKits.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/RDKits.razor.cs new file mode 100644 index 00000000000..4bdf6105241 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Samples/RDKits.razor.cs @@ -0,0 +1,14 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone + +namespace BootstrapBlazor.Server.Components.Samples; + +/// +/// RDKits 组件 +/// +public partial class RDKits +{ + +} diff --git a/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs b/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs index 3b395cc4f8b..e2ca50da387 100644 --- a/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs +++ b/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs @@ -693,6 +693,11 @@ void AddData(DemoMenuItem item) Url = "repeater" }, new() + { + Text = Localizer["RDKit"], + Url = "rdkit" + }, + new() { Text = Localizer["Search"], Url = "search" diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 77f5a07a59a..a58a03fc616 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -4778,7 +4778,8 @@ "DrawerService": "DrawerService", "SortableList": "SortableList", "WinBox": "WinBox", - "Player": "Player" + "Player": "Player", + "RDKit": "RDKit" }, "BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": { "TablesHeaderTitle": "Header grouping function", @@ -6837,5 +6838,11 @@ "AttributeSrc": "Frame load url", "AttributeData": "Data passed", "AttributeOnPostDataAsync": "Passed back data" + }, + "BootstrapBlazor.Server.Components.Samples.RDKits": { + "RDKitTitle": "RDKit", + "RDKitDescription": "A powerful cheminformatics and molecule rendering toolbelt for Blazor, Powered by RDKit", + "RDKitNormalTitle": "Basic usage", + "RDKitNormalIntro": "Set the molecular formula through Value and draw the component" } } diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index ddd3572ebf8..b1c25a66155 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -4778,7 +4778,8 @@ "DrawerService": "抽屉服务 DrawerService", "SortableList": "拖拽组件 SortableList", "WinBox": "窗口 WinBox", - "Player": "播放器 Player" + "Player": "播放器 Player", + "RDKit": "分子图组件 RDKit" }, "BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": { "TablesHeaderTitle": "表头分组功能", @@ -6837,5 +6838,11 @@ "AttributeSrc": "Frame 加载网页路径", "AttributeData": "传递的数据", "AttributeOnPostDataAsync": "Frame 加载页面传递过来的数据" + }, + "BootstrapBlazor.Server.Components.Samples.RDKits": { + "RDKitTitle": "分子图组件", + "RDKitDescription": "RDKit 是一个开源的化学信息学工具包,用于分子建模和化学信息学", + "RDKitNormalTitle": "基础用法", + "RDKitNormalIntro": "通过 Value 设置分子式,组件画图" } } diff --git a/src/BootstrapBlazor.Server/docs.json b/src/BootstrapBlazor.Server/docs.json index d01dc3a1578..74c6f6490b3 100644 --- a/src/BootstrapBlazor.Server/docs.json +++ b/src/BootstrapBlazor.Server/docs.json @@ -220,7 +220,8 @@ "barcode-generator": "BarcodeGenerators", "sortable-list": "SortableLists", "win-box": "WinBoxes", - "player": "Players" + "player": "Players", + "rdkit": "Rdkits" }, "video": { "table": "BV1ap4y1x7Qn?p=1", diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.js b/src/BootstrapBlazor/Components/Table/Table.razor.js index 1aafd4dbea9..600f2ca65fc 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.js +++ b/src/BootstrapBlazor/Components/Table/Table.razor.js @@ -416,21 +416,24 @@ const setExcelKeyboardListener = table => { break; } } - } else if (keyCode === KeyCodes.RIGHT_ARROW) { + } + else if (keyCode === KeyCodes.RIGHT_ARROW) { while (++index < cells.length) { if (activeCell(cells, index)) { break; } } - } else if (keyCode === KeyCodes.UP_ARROW) { - cells = tr.previousElementSibling.children; + } + else if (keyCode === KeyCodes.UP_ARROW) { + cells = tr.previousElementSibling?.children; while (index < cells.length) { if (activeCell(cells, index)) { break; } } - } else if (keyCode === KeyCodes.DOWN_ARROW) { - cells = tr.nextElementSibling.children; + } + else if (keyCode === KeyCodes.DOWN_ARROW) { + cells = tr.nextElementSibling?.children; while (index < cells.length) { if (activeCell(cells, index)) { break;