Skip to content

Commit 7490196

Browse files
committed
chore: update univer to v0.13.0
1 parent ff8463f commit 7490196

113 files changed

Lines changed: 830 additions & 339 deletions

File tree

Some content is hidden

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

src/components/BootstrapBlazor.UniverSheet/wwwroot/univer.js

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { addScript, addLink } from '../BootstrapBlazor/modules/utility.js'
1+
import { addScript, addLink } from '../BootstrapBlazor/modules/utility.js'
22
import DataService from './data-service.js'
33

44
const loadAssets = async lang => {
@@ -10,12 +10,17 @@ const loadAssets = async lang => {
1010
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-drawing/index.umd.min.js');
1111
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.sheets-zen-editor/index.umd.min.js');
1212
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-data-validation/index.umd.min.js');
13+
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-thread-comment/index.umd.min.js');
14+
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-hyper-link/index.umd.min.js');
15+
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-filter/index.umd.min.js');
16+
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-conditional-formatting/index.umd.min.js');
1317
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-advanced/index.umd.min.js');
1418

1519
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-core/locales/${lang}.js`);
1620
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-drawing/locales/${lang}.js`);
1721
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.sheets-zen-editor/locales/${lang}.js`);
1822
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-data-validation/locales/${lang}.js`);
23+
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-thread-comment/locales/${lang}.js`);
1924
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-advanced/locales/${lang}.js`);
2025

2126
await addLink('./_content/BootstrapBlazor.UniverSheet/univer/univer-sheet.bundle.css');
@@ -24,36 +29,53 @@ const loadAssets = async lang => {
2429
export async function createUniverSheetAsync(sheet) {
2530
sheet.lang = sheet.lang ?? 'en-US';
2631
await loadAssets(sheet.lang);
27-
2832
const { el } = sheet;
2933
const { LocaleType, merge } = UniverCore;
3034
const { createUniver } = UniverPresets;
3135
const { UniverSheetsCorePreset } = UniverPresetSheetsCore;
3236
const { UniverSheetsDrawingPreset } = UniverPresetSheetsDrawing;
3337
const { UniverSheetsAdvancedPreset } = UniverPresetSheetsAdvanced;
34-
const { UniverSheetsZenEditorPlugin } = UniverSheetsZenEditor
35-
const { UniverSheetsDataValidationPlugin } = UniverSheetsDataValidation
36-
const { UniverSheetsDataValidationUIPlugin } = UniverSheetsDataValidationUi
38+
const { UniverSheetsZenEditorPlugin } = UniverSheetsZenEditor;
39+
const { UniverSheetsThreadCommentPreset } = UniverPresetSheetsThreadComment;
40+
const { UniverSheetsDataValidationPreset } = UniverPresetSheetsDataValidation;
3741

3842
const lang = sheet.lang.replace('-', '')
3943
const langStr = lang.charAt(0).toUpperCase() + lang.slice(1)
4044
const options = {
4145
theme: UniverDesign[sheet.theme] ?? UniverDesign.defaultTheme, //'defaultTheme' | greenTheme
46+
darkMode: sheet.darkMode ?? false, // false | true
4247
locale: lang,
4348
locales: {
4449
[lang]: merge(
4550
{},
4651
window[`UniverPresetSheetsCore${langStr}`],
4752
window[`UniverPresetSheetsDrawing${langStr}`],
4853
window[`UniverSheetsZenEditor${langStr}`],
49-
window[`UniverSheetsDataValidationUi${langStr}`],
54+
window[`UniverPresetSheetsDataValidation${langStr}`],
55+
window[`UniverPresetSheetsThreadComment${langStr}`],
5056
window[`UniverPresetSheetsAdvanced${langStr}`],
5157
),
5258
},
59+
presets: [
60+
UniverSheetsCorePreset({
61+
container: el,
62+
ribbonType: sheet.ribbonType ?? 'simple', // default | classic | simple
63+
menu: {
64+
'sheet.menu.print': {
65+
hidden: true,
66+
},
67+
'sheets-exchange-client.operation.exchange': {
68+
hidden: true,
69+
},
70+
},
71+
}),
72+
UniverSheetsDrawingPreset(),
73+
UniverSheetsThreadCommentPreset(),
74+
UniverSheetsDataValidationPreset(),
75+
UniverSheetsAdvancedPreset(),
76+
],
5377
plugins: [
5478
UniverSheetsZenEditorPlugin,
55-
UniverSheetsDataValidationPlugin,
56-
UniverSheetsDataValidationUIPlugin,
5779
]
5880
};
5981
const plugins = sheet.plugins ?? {
@@ -65,16 +87,7 @@ export async function createUniverSheetAsync(sheet) {
6587
options.plugins.push(plugin);
6688
}
6789

68-
const { univer, univerAPI } = createUniver({
69-
presets: [
70-
UniverSheetsCorePreset({
71-
container: el
72-
}),
73-
UniverSheetsDrawingPreset(),
74-
UniverSheetsAdvancedPreset()
75-
],
76-
...options
77-
});
90+
const { univer, univerAPI } = createUniver(options);
7891

7992
const { workbookData } = sheet.data || {};
8093
if (workbookData) {

src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/univer-sheet.bundle.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@import 'univerjs.preset-sheets-drawing/index.css';
33
@import 'univerjs.sheets-zen-editor/index.css';
44
@import 'univerjs.preset-sheets-data-validation/index.css';
5+
@import 'univerjs.preset-sheets-thread-comment/index.css';
56
@import 'univerjs.preset-sheets-advanced/index.css';
67

78
.bb-univer-sheet {

src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/univerjs-pro.sheets-print/facade.umd.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)