From 04868149024197a4e5f5a11426494dfd1da7fd79 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 8 Jan 2025 20:22:53 +0800 Subject: [PATCH 1/6] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=20SmileDrawer?= =?UTF-8?q?=20=E7=BB=84=E4=BB=B6=E8=8F=9C=E5=8D=95=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=BA=90=E7=A0=81=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extensions/MenusLocalizerExtensions.cs | 5 +++++ src/BootstrapBlazor.Server/Locales/en-US.json | 3 ++- src/BootstrapBlazor.Server/Locales/zh-CN.json | 3 ++- src/BootstrapBlazor.Server/docs.json | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs b/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs index e2ca50da387..89df1ca43c4 100644 --- a/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs +++ b/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs @@ -708,6 +708,11 @@ void AddData(DemoMenuItem item) Url = "segmented" }, new() + { + Text = Localizer["SmileDrawer"], + Url = "smile-drawer" + }, + new() { Text = Localizer["SignaturePad"], Url = "signature-pad", diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index ea3d4ac85da..00369963516 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -4779,7 +4779,8 @@ "SortableList": "SortableList", "WinBox": "WinBox", "Player": "Player", - "RDKit": "RDKit" + "RDKit": "RDKit", + "SmileDrawer": "SmileDrawer" }, "BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": { "TablesHeaderTitle": "Header grouping function", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index d578b8cc7db..10abc9a48e2 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -4779,7 +4779,8 @@ "SortableList": "拖拽组件 SortableList", "WinBox": "窗口 WinBox", "Player": "播放器 Player", - "RDKit": "分子图组件 RDKit" + "RDKit": "分子式组件 RDKit", + "SmileDrawer": "分子式组件 SmileDrawer" }, "BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": { "TablesHeaderTitle": "表头分组功能", diff --git a/src/BootstrapBlazor.Server/docs.json b/src/BootstrapBlazor.Server/docs.json index 74c6f6490b3..f60b7abe743 100644 --- a/src/BootstrapBlazor.Server/docs.json +++ b/src/BootstrapBlazor.Server/docs.json @@ -221,7 +221,8 @@ "sortable-list": "SortableLists", "win-box": "WinBoxes", "player": "Players", - "rdkit": "Rdkits" + "rdkit": "Rdkits", + "smile-drawer": "SmileDrawers" }, "video": { "table": "BV1ap4y1x7Qn?p=1", From 9e0a30440c3193bf76ab929370c458b5e845a417 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 8 Jan 2025 20:23:10 +0800 Subject: [PATCH 2/6] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0=20SmileDrawer=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/SmileDrawers.razor | 20 +++++++++++++++++++ .../Components/Samples/SmileDrawers.razor.cs | 14 +++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor.cs diff --git a/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor b/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor new file mode 100644 index 00000000000..cf944b33894 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor @@ -0,0 +1,20 @@ +@page "/smile-drawer" +@inject IStringLocalizer Localizer + +

@Localizer["RDKitTitle"]

+ +

@Localizer["RDKitDescription"]

+ + + + + + + + + + diff --git a/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor.cs new file mode 100644 index 00000000000..2987ba2555e --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.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; + +/// +/// SmileDrawer 组件示例 +/// +public partial class SmileDrawers +{ + +} From 1bf94ec0d3026292e539e0de154939de268763ae Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 8 Jan 2025 20:40:16 +0800 Subject: [PATCH 3/6] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/SmileDrawers.razor | 20 ------------------- .../Components/Samples/SmilesDrawers.razor | 20 +++++++++++++++++++ ...rawers.razor.cs => SmilesDrawers.razor.cs} | 2 +- .../Extensions/MenusLocalizerExtensions.cs | 4 ++-- src/BootstrapBlazor.Server/Locales/en-US.json | 10 +++++++++- src/BootstrapBlazor.Server/Locales/zh-CN.json | 12 +++++++++-- src/BootstrapBlazor.Server/docs.json | 2 +- 7 files changed, 43 insertions(+), 27 deletions(-) delete mode 100644 src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor create mode 100644 src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor rename src/BootstrapBlazor.Server/Components/Samples/{SmileDrawers.razor.cs => SmilesDrawers.razor.cs} (92%) diff --git a/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor b/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor deleted file mode 100644 index cf944b33894..00000000000 --- a/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor +++ /dev/null @@ -1,20 +0,0 @@ -@page "/smile-drawer" -@inject IStringLocalizer Localizer - -

@Localizer["RDKitTitle"]

- -

@Localizer["RDKitDescription"]

- - - - - - - - - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor b/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor new file mode 100644 index 00000000000..61d6b379767 --- /dev/null +++ b/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor @@ -0,0 +1,20 @@ +@page "/smiles-drawer" +@inject IStringLocalizer Localizer + +

@Localizer["SmilesDrawerTitle"]

+ +

@Localizer["SmilesDrawerDescription"]

+ + + + + + + + + + diff --git a/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor.cs similarity index 92% rename from src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor.cs rename to src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor.cs index 2987ba2555e..cfe6be6e94c 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/SmileDrawers.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor.cs @@ -8,7 +8,7 @@ namespace BootstrapBlazor.Server.Components.Samples; /// /// SmileDrawer 组件示例 /// -public partial class SmileDrawers +public partial class SmilesDrawers { } diff --git a/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs b/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs index 89df1ca43c4..c6e9915099a 100644 --- a/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs +++ b/src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs @@ -709,8 +709,8 @@ void AddData(DemoMenuItem item) }, new() { - Text = Localizer["SmileDrawer"], - Url = "smile-drawer" + Text = Localizer["SmilesDrawer"], + Url = "smiles-drawer" }, new() { diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 00369963516..69a90c5447e 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -6844,11 +6844,19 @@ "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", + "RDKitNormalIntro": "Set the molecular formula through Smiles and draw the component", "RDKitSmartsTitle": "Smarts", "RDKitSmartsIntro": "By setting the Smarts value, parts of the molecular formula can be highlighted", "RDKitSmartsLabel": "Show Smarts", "RDKitSizeTitle": "Size", "RDKitSizeIntro": "Set the width and height of the molecular formula by setting the Width and Height values" + }, + "BootstrapBlazor.Server.Components.Samples.SmilesDrawers": { + "SmilesDrawerTitle": "SmilesDrawer", + "SmilesDrawerDescription": "A small, highly performant JavaScript component for parsing and drawing SMILES strings", + "SmilesDrawerNormalTitle": "Basic usage", + "SmilesDrawerNormalIntro": "Set the molecular formula through Smiles and draw the component", + "SmilesDrawerSizeTitle": "Size", + "SmilesDrawerSizeIntro": "Set the width and height of the molecular formula by setting the Width and Height values" } } diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 10abc9a48e2..5a84405ce65 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -6841,14 +6841,22 @@ "AttributeOnPostDataAsync": "Frame 加载页面传递过来的数据" }, "BootstrapBlazor.Server.Components.Samples.RDKits": { - "RDKitTitle": "分子图组件", + "RDKitTitle": "RDKit.js 分子图组件", "RDKitDescription": "RDKit 是一个开源的化学信息学工具包,用于分子建模和化学信息学", "RDKitNormalTitle": "基础用法", - "RDKitNormalIntro": "通过 Value 设置分子式,组件画图", + "RDKitNormalIntro": "通过 Smiles 设置分子式,组件画图", "RDKitSmartsTitle": "Smarts", "RDKitSmartsIntro": "通过设置 Smarts 值,高亮显示部分分子式", "RDKitSmartsLabel": "显示 Smarts", "RDKitSizeTitle": "尺寸", "RDKitSizeIntro": "通过设置 Width Height 值设置分子式宽高" + }, + "BootstrapBlazor.Server.Components.Samples.SmilesDrawers": { + "SmilesDrawerTitle": "SmilesDrawer 分子图组件", + "SmilesDrawerDescription": "SmilesDrawer 是一个开源的化学信息学工具包,用于分子建模和化学信息学", + "SmilesDrawerNormalTitle": "基础用法", + "SmilesDrawerNormalIntro": "通过 Smiles 设置分子式,组件画图", + "SmilesDrawerSizeTitle": "尺寸", + "SmilesDrawerSizeIntro": "通过设置 Width Height 值设置分子式宽高" } } diff --git a/src/BootstrapBlazor.Server/docs.json b/src/BootstrapBlazor.Server/docs.json index f60b7abe743..e918d91ccf5 100644 --- a/src/BootstrapBlazor.Server/docs.json +++ b/src/BootstrapBlazor.Server/docs.json @@ -222,7 +222,7 @@ "win-box": "WinBoxes", "player": "Players", "rdkit": "Rdkits", - "smile-drawer": "SmileDrawers" + "smiles-drawer": "SmilesDrawers" }, "video": { "table": "BV1ap4y1x7Qn?p=1", From 8ca5cc4bd6b8104e95302f5a9cd6e2388be15245 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 9 Jan 2025 10:04:29 +0800 Subject: [PATCH 4/6] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/SmilesDrawers.razor | 7 +++++-- .../Components/Samples/SmilesDrawers.razor.cs | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor b/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor index 61d6b379767..0c073114d5e 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor @@ -10,11 +10,14 @@ - + - +
+ +
+
diff --git a/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor.cs index cfe6be6e94c..d06b56e86f2 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/SmilesDrawers.razor.cs @@ -10,5 +10,10 @@ namespace BootstrapBlazor.Server.Components.Samples; /// public partial class SmilesDrawers { + private SmilesDrawerOptions _options = new() { Theme = "light", Width = 120, Height = 120 }; + private void OnClickUpdateSize() + { + _options = new SmilesDrawerOptions { Theme = "light", Width = 200, Height = 200 }; + } } From 3bae9dbf2a085a1ca888d29314c39b78c8834c0b Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 9 Jan 2025 10:27:17 +0800 Subject: [PATCH 5/6] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj index 025dd736245..7e4cd76ca5e 100644 --- a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj +++ b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj @@ -55,6 +55,7 @@ + From ab37cec013b4eefd56709bd006a01977f0e35cec Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 9 Jan 2025 10:29:25 +0800 Subject: [PATCH 6/6] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Locales/en-US.json | 2 +- src/BootstrapBlazor.Server/Locales/zh-CN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 69a90c5447e..88533511ab6 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -4780,7 +4780,7 @@ "WinBox": "WinBox", "Player": "Player", "RDKit": "RDKit", - "SmileDrawer": "SmileDrawer" + "SmilesDrawer": "SmilesDrawer" }, "BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": { "TablesHeaderTitle": "Header grouping function", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 5a84405ce65..cb00161bb74 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -4780,7 +4780,7 @@ "WinBox": "窗口 WinBox", "Player": "播放器 Player", "RDKit": "分子式组件 RDKit", - "SmileDrawer": "分子式组件 SmileDrawer" + "SmilesDrawer": "分子式组件 SmilesDrawer" }, "BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": { "TablesHeaderTitle": "表头分组功能",