Skip to content

Commit ccfd0db

Browse files
authored
Merge branch 'main' into feat-chat-deepseek
2 parents 097fcf4 + b0e63f8 commit ccfd0db

File tree

77 files changed

+1899
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1899
-355
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ resharper_web_config_type_not_resolved_highlighting = warning
6868
resharper_web_config_wrong_module_highlighting = warning
6969

7070
# Code files
71-
[*.{cs,csx,vb,vbx}]
71+
[*.{cs,csx,vb,vbx,css,scss}]
7272
indent_size = 4
7373

74-
[*.{cs,css,js,json,*html,razor,txt,log}]
74+
[*.{cs,css,scss,js,json,*html,razor,txt,log}]
7575
charset = utf-8-bom
7676

7777
[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}]
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Close inactive issues
2+
on:
3+
schedule:
4+
- cron: "0 1 * * *"
5+
6+
jobs:
7+
close-issues:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
steps:
12+
- uses: actions/stale@v9
13+
with:
14+
days-before-issue-stale: 2
15+
any-of-labels: "invalid"
16+
stale-issue-label: "stale"
17+
stale-issue-message: "Since the issue was labeled with `invalid`, but no response in 2 days. This issue will be closed after 2 days. If you have any questions, you can comment and reply. \r\r 由于该 issue 被标记为不合规工程,却 2 天未收到回应,该 Issue 将与 2 天后自动关闭。"
18+
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
- uses: actions/stale@v9
20+
with:
21+
days-before-issue-stale: 2
22+
any-of-labels: "need-repro-project"
23+
stale-issue-label: "stale"
24+
stale-issue-message: "Since the issue was labeled with `need-repro-project`, but no response in 2 days. This issue will be closed after 2 days. If you have any questions, you can comment and reply. \r\r 由于该 issue 被标记为需要复现工程,却 2 天未收到回应,该 Issue 将与 2 天后自动关闭。"
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
- uses: actions/stale@v9
27+
with:
28+
days-before-issue-close: 2
29+
any-of-labels: "stale"
30+
close-issue-message: "Since the issue was labeled with `stale`, but no response in 2 days. This issue will be closed. If you have any questions, you can comment and reply. \r\r 由于该 issue 被标记为过期工程,却 2 天未收到回应。现关闭 issue,若有任何问题,可评论回复。"
31+
repo-token: ${{ secrets.GITHUB_TOKEN }}

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
<PackageReference Include="BootstrapBlazor.BaiduOcr" Version="9.0.0" />
2828
<PackageReference Include="BootstrapBlazor.BarCode" Version="9.0.0" />
2929
<PackageReference Include="BootstrapBlazor.BarcodeGenerator" Version="9.0.0" />
30-
<PackageReference Include="BootstrapBlazor.BootstrapIcon" Version="9.0.1" />
30+
<PackageReference Include="BootstrapBlazor.BootstrapIcon" Version="9.0.2" />
3131
<PackageReference Include="BootstrapBlazor.Chart" Version="9.0.0" />
3232
<PackageReference Include="BootstrapBlazor.CherryMarkdown" Version="9.0.0" />
3333
<PackageReference Include="BootstrapBlazor.Dock" Version="9.0.0" />
34-
<PackageReference Include="BootstrapBlazor.DockView" Version="9.1.5" />
34+
<PackageReference Include="BootstrapBlazor.DockView" Version="9.1.9" />
3535
<PackageReference Include="BootstrapBlazor.DriverJs" Version="9.0.3" />
3636
<PackageReference Include="BootstrapBlazor.ElementIcon" Version="9.0.3" />
3737
<PackageReference Include="BootstrapBlazor.FileViewer" Version="9.0.0" />
@@ -48,7 +48,7 @@
4848
<PackageReference Include="BootstrapBlazor.Markdown" Version="9.0.1" />
4949
<PackageReference Include="BootstrapBlazor.MaterialDesign" Version="9.0.1" />
5050
<PackageReference Include="BootstrapBlazor.MeiliSearch" Version="9.1.9" />
51-
<PackageReference Include="BootstrapBlazor.Mermaid" Version="9.0.3" />
51+
<PackageReference Include="BootstrapBlazor.Mermaid" Version="9.0.4" />
5252
<PackageReference Include="BootstrapBlazor.MindMap" Version="9.1.6" />
5353
<PackageReference Include="BootstrapBlazor.MouseFollower" Version="9.0.1" />
5454
<PackageReference Include="BootstrapBlazor.OctIcon" Version="9.0.4" />
@@ -62,7 +62,7 @@
6262
<PackageReference Include="BootstrapBlazor.Splitting" Version="9.0.2" />
6363
<PackageReference Include="BootstrapBlazor.SvgEditor" Version="9.0.3" />
6464
<PackageReference Include="BootstrapBlazor.SummerNote" Version="9.0.3" />
65-
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.2.1" />
65+
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.2.2" />
6666
<PackageReference Include="BootstrapBlazor.Topology" Version="9.0.0" />
6767
<PackageReference Include="BootstrapBlazor.UniverIcon" Version="9.0.1" />
6868
<PackageReference Include="BootstrapBlazor.UniverSheet" Version="9.0.0-beta09" />

src/BootstrapBlazor.Server/Components/Components/Header.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@
4848
</ul>
4949
<a class="btn btn-bd-download d-none d-lg-block mb-3 mb-md-0 ms-md-3" target="_blank" href="@DownloadUrl">@DownloadText</a>
5050
<div class="navbar-version ms-2">@_versionString</div>
51-
<ThemeProvider class="ms-2 d-none d-lg-block" OnThemeChangedAsync="OnThemeChangedAsync"></ThemeProvider>
51+
<ThemeProvider class="ms-2 d-none d-lg-block"></ThemeProvider>
5252
</header>

src/BootstrapBlazor.Server/Components/Components/Header.razor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,4 @@ protected override void OnInitialized()
5757
TutorialsText ??= Localizer[nameof(TutorialsText)];
5858
_versionString = $"v{PackageVersionService.Version}";
5959
}
60-
61-
private Task OnThemeChangedAsync(ThemeValue themeName) => InvokeVoidAsync("updateTheme", themeName, WebsiteOption.CurrentValue.AssetRootPath);
6260
}

src/BootstrapBlazor.Server/Components/Components/Header.razor.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { switchTheme as syncTheme } from "./Pre.razor.js"
2-
import EventHandler from "../../_content/BootstrapBlazor/modules/event-handler.js"
1+
import EventHandler from "../../_content/BootstrapBlazor/modules/event-handler.js"
32

43
export function init(id) {
54
const scrollTop = () => (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop
@@ -17,10 +16,6 @@ export function init(id) {
1716
});
1817
}
1918

20-
export async function updateTheme(theme, assetPath) {
21-
await syncTheme(theme, assetPath);
22-
}
23-
2419
export function dispose(id) {
2520
EventHandler.off(document, 'scroll');
2621
}

src/BootstrapBlazor.Server/Components/Components/Pre.razor.js

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { copy, getDescribedElement, addLink, removeLink, addScript, getHeight, getPreferredTheme } from "../../_content/BootstrapBlazor/modules/utility.js"
1+
import { copy, getDescribedElement, addLink, removeLink, addScript, getHeight, getPreferredTheme, registerBootstrapBlazorModule } from "../../_content/BootstrapBlazor/modules/utility.js"
22
import EventHandler from "../../_content/BootstrapBlazor/modules/event-handler.js"
33

44
export async function init(id, title, assetRoot) {
@@ -48,6 +48,15 @@ export async function init(id, title, assetRoot) {
4848
preElement.style.maxHeight = `${preHeight}px`
4949
})
5050
}
51+
52+
registerBootstrapBlazorModule('Pre', id, () => {
53+
EventHandler.on(document, 'changed.bb.theme', updateTheme);
54+
});
55+
}
56+
57+
const updateTheme = e => {
58+
const theme = e.theme;
59+
switchTheme(theme);
5160
}
5261

5362
export async function highlight(id) {
@@ -78,14 +87,14 @@ export async function highlight(id) {
7887
}
7988
}
8089

81-
export async function switchTheme(theme, assetPath) {
90+
export async function switchTheme(theme) {
8291
if (theme === 'dark') {
83-
removeLink(`${assetPath}lib/highlight/vs.min.css`);
84-
await addLink(`${assetPath}lib/highlight/vs2015.min.css`);
92+
removeLink(`./lib/highlight/vs.min.css`);
93+
await addLink(`./lib/highlight/vs2015.min.css`);
8594
}
8695
else {
87-
removeLink(`${assetPath}lib/highlight/vs2015.min.css`);
88-
await addLink(`${assetPath}lib/highlight/vs.min.css`);
96+
removeLink(`./lib/highlight/vs2015.min.css`);
97+
await addLink(`./lib/highlight/vs.min.css`);
8998
}
9099
}
91100

@@ -96,7 +105,12 @@ export function dispose(id) {
96105
return
97106
}
98107

99-
EventHandler.off(el, 'click', '.btn-copy')
100-
EventHandler.off(el, 'click', '.btn-plus')
101-
EventHandler.off(el, 'click', '.btn-minus')
108+
EventHandler.off(el, 'click', '.btn-copy');
109+
EventHandler.off(el, 'click', '.btn-plus');
110+
EventHandler.off(el, 'click', '.btn-minus');
111+
112+
const { Pre } = window.BootstrapBlazor;
113+
Pre.dispose(id, () => {
114+
EventHandler.off(document, 'changed.bb.theme', updateTheme);
115+
});
102116
}

src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</div>
3131

3232
<div class="tabs-coms">
33-
<Tab IsBorderCard="true" IsLazyLoadTabItem="true" ShowFullScreen="true" TabStyle="TabStyle.Chrome" @ref="Tab">
33+
<Tab IsBorderCard="true" IsLazyLoadTabItem="true" ShowFullScreen="true" TabStyle="TabStyle.Chrome" ShowToolbar="true" @ref="Tab">
3434
<TabItem Text="Example" Icon="fa-solid fa-desktop">
3535
<CascadingValue Value="@RazorFileName" Name="RazorFileName">
3636
@Body

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h4>@Localizer["SubTitle"]</h4>
77

88
<DemoBlock Title="@Localizer["BasicUsageTitle"]" Introduction="@Localizer["BasicUsageIntro"]" Name="Normal">
9-
<Calendar ValueChanged="@OnValueChanged" />
9+
<Calendar ValueChanged="@OnValueChanged" FirstDayOfWeek="DayOfWeek.Monday" />
1010
<ConsoleLogger @ref="NormalLogger" />
1111
</DemoBlock>
1212

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ private AttributeItem[] GetAttributes() =>
7777
Type = "RenderFragment<CalendarCellValue>",
7878
ValueList = " — ",
7979
DefaultValue = " — "
80+
},
81+
new()
82+
{
83+
Name = nameof(Calendar.FirstDayOfWeek),
84+
Description = Localizer["FirstDayOfWeek"],
85+
Type = "DayOfWeek",
86+
ValueList = " — ",
87+
DefaultValue = "Sunday"
8088
}
8189
];
8290
}

0 commit comments

Comments
 (0)