Skip to content

Commit e4c37db

Browse files
authored
feat(RDKit): add Smarts parameter (#5062)
* doc: 增加 Smarts 示例 * doc: 增加 Smarts 示例 * chore: 更新依赖包到最新
1 parent 9578758 commit e4c37db

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<PackageReference Include="BootstrapBlazor.OnScreenKeyboard" Version="9.0.1" />
5454
<PackageReference Include="BootstrapBlazor.PdfReader" Version="9.0.0" />
5555
<PackageReference Include="BootstrapBlazor.Player" Version="9.0.0" />
56-
<PackageReference Include="BootstrapBlazor.RDKit" Version="9.0.0-beta01" />
56+
<PackageReference Include="BootstrapBlazor.RDKit" Version="9.0.0-beta03" />
5757
<PackageReference Include="BootstrapBlazor.SignaturePad" Version="9.0.0" />
5858
<PackageReference Include="BootstrapBlazor.Sortable" Version="9.0.1" />
5959
<PackageReference Include="BootstrapBlazor.Splitting" Version="9.0.1" />

src/BootstrapBlazor.Server/Components/Samples/RDKits.razor

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,19 @@
1212
Name="Normal">
1313
<RDKit Value="CC(=O)Oc1ccccc1C(=O)O"></RDKit>
1414
</DemoBlock>
15+
16+
<DemoBlock Title="@Localizer["RDKitSmartsTitle"]"
17+
Introduction="@Localizer["RDKitSmartsIntro"]"
18+
Name="Smarts">
19+
<section ignore>
20+
<div class="row g-3">
21+
<div class="col-12 col-sm-6">
22+
<BootstrapInputGroup>
23+
<BootstrapInputGroupLabel DisplayText="@Localizer["RDKitSmartsLabel"]" />
24+
<Checkbox @bind-Value="_showSmarts"></Checkbox>
25+
</BootstrapInputGroup>
26+
</div>
27+
</div>
28+
</section>
29+
<RDKit Value="CC(=O)Oc1ccccc1C(=O)O" Smarts="@Smarts"></RDKit>
30+
</DemoBlock>

src/BootstrapBlazor.Server/Components/Samples/RDKits.razor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ namespace BootstrapBlazor.Server.Components.Samples;
1010
/// </summary>
1111
public partial class RDKits
1212
{
13+
private string? Smarts => _showSmarts ? "Oc1[c,n]cccc1" : "";
1314

15+
private bool _showSmarts;
1416
}

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6843,6 +6843,9 @@
68436843
"RDKitTitle": "RDKit",
68446844
"RDKitDescription": "A powerful cheminformatics and molecule rendering toolbelt for Blazor, Powered by RDKit",
68456845
"RDKitNormalTitle": "Basic usage",
6846-
"RDKitNormalIntro": "Set the molecular formula through <code>Value</code> and draw the component"
6846+
"RDKitNormalIntro": "Set the molecular formula through <code>Value</code> and draw the component",
6847+
"RDKitSmartsTitle": "Smarts",
6848+
"RDKitSmartsIntro": "By setting the <code>Smarts</code> value, parts of the molecular formula can be highlighted",
6849+
"RDKitSmartsLabel": "Show Smarts"
68476850
}
68486851
}

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6843,6 +6843,9 @@
68436843
"RDKitTitle": "分子图组件",
68446844
"RDKitDescription": "RDKit 是一个开源的化学信息学工具包,用于分子建模和化学信息学",
68456845
"RDKitNormalTitle": "基础用法",
6846-
"RDKitNormalIntro": "通过 <code>Value</code> 设置分子式,组件画图"
6846+
"RDKitNormalIntro": "通过 <code>Value</code> 设置分子式,组件画图",
6847+
"RDKitSmartsTitle": "Smarts",
6848+
"RDKitSmartsIntro": "通过设置 <code>Smarts</code> 值,高亮显示部分分子式",
6849+
"RDKitSmartsLabel": "显示 Smarts"
68476850
}
68486851
}

0 commit comments

Comments
 (0)