@univerjs/sheets-data-validation-ui 0.3.0-nightly.202410101606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/lib/cjs/index.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/index.css +1 -0
- package/lib/locale/en-US.json +167 -0
- package/lib/locale/ru-RU.json +167 -0
- package/lib/locale/vi-VN.json +167 -0
- package/lib/locale/zh-CN.json +167 -0
- package/lib/locale/zh-TW.json +167 -0
- package/lib/types/commands/commands/data-validation-ui.command.d.ts +2 -0
- package/lib/types/commands/operations/data-validation.operation.d.ts +17 -0
- package/lib/types/const.d.ts +16 -0
- package/lib/types/controllers/config.schema.d.ts +8 -0
- package/lib/types/controllers/dv-alert.controller.d.ts +14 -0
- package/lib/types/controllers/dv-auto-fill.controller.d.ts +10 -0
- package/lib/types/controllers/dv-copy-paste.controller.d.ts +13 -0
- package/lib/types/controllers/dv-permission.controller.d.ts +9 -0
- package/lib/types/controllers/dv-reject-input.controller.d.ts +15 -0
- package/lib/types/controllers/dv-render.controller.d.ts +36 -0
- package/lib/types/controllers/dv-ui.controller.d.ts +11 -0
- package/lib/types/controllers/dv.menu.d.ts +7 -0
- package/lib/types/controllers/menu.schema.d.ts +2 -0
- package/lib/types/index.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +183 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/mobile-plugin.d.ts +15 -0
- package/lib/types/plugin.d.ts +15 -0
- package/lib/types/services/data-validation-panel.service.d.ts +32 -0
- package/lib/types/services/dropdown-manager.service.d.ts +40 -0
- package/lib/types/views/components/date-dropdown/index.d.ts +3 -0
- package/lib/types/views/components/detail/index.d.ts +2 -0
- package/lib/types/views/components/drop-down/CellDropdown.d.ts +2 -0
- package/lib/types/views/components/drop-down/index.d.ts +18 -0
- package/lib/types/views/components/formula-input/base-formula-input.d.ts +3 -0
- package/lib/types/views/components/formula-input/checkbox-formula-input.d.ts +3 -0
- package/lib/types/views/components/formula-input/custom-formula-input.d.ts +3 -0
- package/lib/types/views/components/formula-input/formula-input.d.ts +4 -0
- package/lib/types/views/components/formula-input/index.d.ts +6 -0
- package/lib/types/views/components/formula-input/list-formula-input.d.ts +3 -0
- package/lib/types/views/components/index.d.ts +20 -0
- package/lib/types/views/components/item/index.d.ts +10 -0
- package/lib/types/views/components/list/index.d.ts +2 -0
- package/lib/types/views/components/list-dropdown/index.d.ts +3 -0
- package/lib/types/views/components/options/index.d.ts +8 -0
- package/lib/types/views/components/panel/index.d.ts +2 -0
- package/lib/types/views/components/render-mode/index.d.ts +10 -0
- package/lib/types/views/components/show-time/index.d.ts +10 -0
- package/lib/types/views/detail/index.d.ts +2 -0
- package/lib/types/views/validator-views/checkbox-validator-view.d.ts +8 -0
- package/lib/types/views/validator-views/custom-validator-view.d.ts +6 -0
- package/lib/types/views/validator-views/date-validator-view.d.ts +8 -0
- package/lib/types/views/validator-views/decimal-validator-view.d.ts +6 -0
- package/lib/types/views/validator-views/list-multiple-view.d.ts +7 -0
- package/lib/types/views/validator-views/list-validator-view.d.ts +10 -0
- package/lib/types/views/validator-views/sheet-validator-view.d.ts +14 -0
- package/lib/types/views/validator-views/text-length-validator.view.d.ts +6 -0
- package/lib/types/views/validator-views/whole-validator-view.d.ts +6 -0
- package/lib/types/views/widgets/checkbox-widget.d.ts +19 -0
- package/lib/types/views/widgets/dropdown-multiple-widget.d.ts +19 -0
- package/lib/types/views/widgets/dropdown-widget.d.ts +28 -0
- package/lib/types/views/widgets/shape/dropdown.d.ts +12 -0
- package/lib/types/views/widgets/shape/index.d.ts +18 -0
- package/lib/types/views/widgets/shape/layout.d.ts +37 -0
- package/lib/umd/index.js +1 -0
- package/package.json +118 -0
@@ -0,0 +1,167 @@
|
|
1
|
+
{
|
2
|
+
"dataValidation": {
|
3
|
+
"title": "資料驗證",
|
4
|
+
"validFail": {
|
5
|
+
"value": "請輸入一個合法值",
|
6
|
+
"common": "請輸入數值或公式",
|
7
|
+
"number": "請輸入合法的數字或公式",
|
8
|
+
"formula": "請輸入合法的公式",
|
9
|
+
"integer": "請輸入合法的整數或公式",
|
10
|
+
"date": "請輸入合法的日期或公式",
|
11
|
+
"list": "請輸入至少一個合法選項",
|
12
|
+
"listInvalid": "清單來源必須是分隔清單或單行或列的參考。 ",
|
13
|
+
"checkboxEqual": "為勾選和未勾選的儲存格內容輸入不同的值。 ",
|
14
|
+
"formulaError": "引用範圍內包含不可見的數據,請重新調整範圍",
|
15
|
+
"listIntersects": "所選範圍不能和規則範圍相交",
|
16
|
+
"primitive": "自訂勾選和未勾選值不允許使用公式。 "
|
17
|
+
},
|
18
|
+
"panel": {
|
19
|
+
"title": "管理資料驗證",
|
20
|
+
"addTitle": "新資料驗證",
|
21
|
+
"removeAll": "全部刪除",
|
22
|
+
"add": "新建規則",
|
23
|
+
"range": "應用範圍",
|
24
|
+
"rangeError": "應用範圍不合法",
|
25
|
+
"type": "條件型別",
|
26
|
+
"options": "進階設定",
|
27
|
+
"operator": "資料",
|
28
|
+
"removeRule": "刪除規則",
|
29
|
+
"done": "確認",
|
30
|
+
"formulaPlaceholder": "請輸入數值或公式",
|
31
|
+
"valuePlaceholder": "請輸入值",
|
32
|
+
"formulaAnd": "與",
|
33
|
+
"invalid": "資料無效時",
|
34
|
+
"showWarning": "顯示警告",
|
35
|
+
"rejectInput": "拒絕輸入",
|
36
|
+
"messageInfo": "文字提示",
|
37
|
+
"showInfo": "顯示所選單元格的提示文字"
|
38
|
+
},
|
39
|
+
"operators": {
|
40
|
+
"between": "介於",
|
41
|
+
"greaterThan": "大於",
|
42
|
+
"greaterThanOrEqual": "大於或等於",
|
43
|
+
"lessThan": "小於",
|
44
|
+
"lessThanOrEqual": "小於或等於",
|
45
|
+
"equal": "等於",
|
46
|
+
"notEqual": "不等於",
|
47
|
+
"notBetween": "未介於"
|
48
|
+
},
|
49
|
+
"ruleName": {
|
50
|
+
"between": "介於 {FORMULA1} 和 {FORMULA2} 之間",
|
51
|
+
"greaterThan": "大於 {FORMULA1}",
|
52
|
+
"greaterThanOrEqual": "大於或等於 {FORMULA1}",
|
53
|
+
"lessThan": "小於 {FORMULA1}",
|
54
|
+
"lessThanOrEqual": "小於或等於 {FORMULA1}",
|
55
|
+
"equal": "等於 {FORMULA1}",
|
56
|
+
"notEqual": "不等於 {FORMULA1}",
|
57
|
+
"notBetween": "在 {FORMULA1} 和 {FORMULA2} 範圍之外"
|
58
|
+
},
|
59
|
+
"errorMsg": {
|
60
|
+
"between": "值必須介於 {FORMULA1} 和 {FORMULA2} 之間",
|
61
|
+
"greaterThan": "值必須大於 {FORMULA1}",
|
62
|
+
"greaterThanOrEqual": "值必須大於或等於 {FORMULA1}",
|
63
|
+
"lessThan": "值必須小於 {FORMULA1}",
|
64
|
+
"lessThanOrEqual": "值必須小於或等於 {FORMULA1}",
|
65
|
+
"equal": "值必須等於 {FORMULA1}",
|
66
|
+
"notEqual": "值必須不等於 {FORMULA1}",
|
67
|
+
"notBetween": "值必須在 {FORMULA1} 和 {FORMULA2} 範圍之外"
|
68
|
+
},
|
69
|
+
"date": {
|
70
|
+
"title": "日期",
|
71
|
+
"operators": {
|
72
|
+
"between": "介於",
|
73
|
+
"greaterThan": "晚於",
|
74
|
+
"greaterThanOrEqual": "晚於或等於",
|
75
|
+
"lessThan": "早於",
|
76
|
+
"lessThanOrEqual": "早於或等於",
|
77
|
+
"equal": "等於",
|
78
|
+
"notEqual": "不等於",
|
79
|
+
"notBetween": "未介於"
|
80
|
+
},
|
81
|
+
"ruleName": {
|
82
|
+
"between": "介於 {FORMULA1} 和 {FORMULA2} 之間",
|
83
|
+
"greaterThan": "晚於 {FORMULA1}",
|
84
|
+
"greaterThanOrEqual": "晚於或等於 {FORMULA1}",
|
85
|
+
"lessThan": "早於 {FORMULA1}",
|
86
|
+
"lessThanOrEqual": "早於或等於 {FORMULA1}",
|
87
|
+
"equal": "等於 {FORMULA1}",
|
88
|
+
"notEqual": "不等於 {FORMULA1}",
|
89
|
+
"notBetween": "在 {FORMULA1} 和 {FORMULA2} 範圍之外"
|
90
|
+
},
|
91
|
+
"errorMsg": {
|
92
|
+
"between": "日期必須介於 {FORMULA1} 和 {FORMULA2} 之間",
|
93
|
+
"greaterThan": "日期必須晚於 {FORMULA1}",
|
94
|
+
"greaterThanOrEqual": "日期必須晚於或等於 {FORMULA1}",
|
95
|
+
"lessThan": "日期必須早於 {FORMULA1}",
|
96
|
+
"lessThanOrEqual": "早於或等於 {FORMULA1}",
|
97
|
+
"equal": "日期必須等於 {FORMULA1}",
|
98
|
+
"notEqual": "日期必須不等於 {FORMULA1}",
|
99
|
+
"notBetween": "日期必須在 {FORMULA1} 和 {FORMULA2} 範圍之外"
|
100
|
+
}
|
101
|
+
},
|
102
|
+
"list": {
|
103
|
+
"title": "下拉選單",
|
104
|
+
"name": "值必須是列表中的值",
|
105
|
+
"error": "輸入必須在指定的範圍內",
|
106
|
+
"emptyError": "請輸入一個值",
|
107
|
+
"add": "新增選項",
|
108
|
+
"dropdown": "單選",
|
109
|
+
"options": "選項來源",
|
110
|
+
"customOptions": "自訂",
|
111
|
+
"refOptions": "引用資料",
|
112
|
+
"formulaError": "列表來源必須是劃定分界後的資料列表,或是對單一行或一列的引用。 ",
|
113
|
+
"edit": "編輯"
|
114
|
+
},
|
115
|
+
"listMultiple": {
|
116
|
+
"title": "下拉式選單-多選",
|
117
|
+
"dropdown": "多選"
|
118
|
+
},
|
119
|
+
"textLength": {
|
120
|
+
"title": "文本長度",
|
121
|
+
"errorMsg": {
|
122
|
+
"between": "文本長度必須介於 {FORMULA1} 和 {FORMULA2} 之間",
|
123
|
+
"greaterThan": "文本長度必須大於 {FORMULA1}",
|
124
|
+
"greaterThanOrEqual": "文本長度必須大於或等於 {FORMULA1}",
|
125
|
+
"lessThan": "文字長度必須小於 {FORMULA1}",
|
126
|
+
"lessThanOrEqual": "文字長度必須小於或等於 {FORMULA1}",
|
127
|
+
"equal": "文本長度必須等於 {FORMULA1}",
|
128
|
+
"notEqual": "文字長度必須不等於 {FORMULA1}",
|
129
|
+
"notBetween": "文本長度必須在 {FORMULA1} 和 {FORMULA2} 範圍之外"
|
130
|
+
}
|
131
|
+
},
|
132
|
+
"decimal": {
|
133
|
+
"title": "數字"
|
134
|
+
},
|
135
|
+
"whole": {
|
136
|
+
"title": "整數"
|
137
|
+
},
|
138
|
+
"checkbox": {
|
139
|
+
"title": "複選框",
|
140
|
+
"error": "此儲存格的內容違反了驗證規則",
|
141
|
+
"tips": "在儲存格內使用自訂值",
|
142
|
+
"checked": "選取值",
|
143
|
+
"unchecked": "未選取值"
|
144
|
+
},
|
145
|
+
"custom": {
|
146
|
+
"title": "自訂公式",
|
147
|
+
"error": "此儲存格的內容違反了驗證規則",
|
148
|
+
"validFail": "請輸入合法的公式"
|
149
|
+
},
|
150
|
+
"alert": {
|
151
|
+
"title": "提示",
|
152
|
+
"ok": "確定"
|
153
|
+
},
|
154
|
+
"error": {
|
155
|
+
"title": "無效:"
|
156
|
+
},
|
157
|
+
"renderMode": {
|
158
|
+
"arrow": "箭頭",
|
159
|
+
"chip": "條狀標籤",
|
160
|
+
"text": "純文字",
|
161
|
+
"label": "顯示樣式"
|
162
|
+
},
|
163
|
+
"showTime": {
|
164
|
+
"label": "展示時間選擇"
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ICommand } from '@univerjs/core';
|
2
|
+
export declare const DATA_VALIDATION_PANEL = "DataValidationPanel";
|
3
|
+
export interface IOpenValidationPanelOperationParams {
|
4
|
+
ruleId?: string;
|
5
|
+
isAdd?: boolean;
|
6
|
+
}
|
7
|
+
export declare const OpenValidationPanelOperation: ICommand<IOpenValidationPanelOperationParams>;
|
8
|
+
export declare const CloseValidationPanelOperation: ICommand;
|
9
|
+
export declare const ToggleValidationPanelOperation: ICommand;
|
10
|
+
export interface IShowDataValidationDropdownParams {
|
11
|
+
unitId: string;
|
12
|
+
subUnitId: string;
|
13
|
+
row: number;
|
14
|
+
column: number;
|
15
|
+
}
|
16
|
+
export declare const ShowDataValidationDropdown: ICommand<IShowDataValidationDropdownParams>;
|
17
|
+
export declare const HideDataValidationDropdown: ICommand;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
export declare const DROP_DOWN_DEFAULT_COLOR = "#ECECEC";
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { MenuConfig } from '@univerjs/ui';
|
2
|
+
export declare const PLUGIN_CONFIG_KEY = "sheets-data-validation.config";
|
3
|
+
export declare const configSymbol: unique symbol;
|
4
|
+
export interface IUniverSheetsDataValidationConfig {
|
5
|
+
menu?: MenuConfig;
|
6
|
+
showEditOnDropdown?: boolean;
|
7
|
+
}
|
8
|
+
export declare const defaultPluginConfig: IUniverSheetsDataValidationConfig;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Disposable, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
2
|
+
import { CellAlertManagerService, HoverManagerService } from '@univerjs/sheets-ui';
|
3
|
+
import { IZenZoneService } from '@univerjs/ui';
|
4
|
+
export declare class DataValidationAlertController extends Disposable {
|
5
|
+
private readonly _hoverManagerService;
|
6
|
+
private readonly _cellAlertManagerService;
|
7
|
+
private readonly _univerInstanceService;
|
8
|
+
private readonly _localeService;
|
9
|
+
private readonly _zenZoneService;
|
10
|
+
constructor(_hoverManagerService: HoverManagerService, _cellAlertManagerService: CellAlertManagerService, _univerInstanceService: IUniverInstanceService, _localeService: LocaleService, _zenZoneService: IZenZoneService);
|
11
|
+
private _init;
|
12
|
+
private _initCellAlertPopup;
|
13
|
+
private _initZenService;
|
14
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Disposable, Injector } from '@univerjs/core';
|
2
|
+
import { SheetDataValidationModel } from '@univerjs/sheets-data-validation';
|
3
|
+
import { IAutoFillService } from '@univerjs/sheets-ui';
|
4
|
+
export declare class DataValidationAutoFillController extends Disposable {
|
5
|
+
private readonly _autoFillService;
|
6
|
+
private readonly _dataValidationModel;
|
7
|
+
private readonly _injector;
|
8
|
+
constructor(_autoFillService: IAutoFillService, _dataValidationModel: SheetDataValidationModel, _injector: Injector);
|
9
|
+
private _initAutoFill;
|
10
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Disposable, Injector } from '@univerjs/core';
|
2
|
+
import { SheetDataValidationModel } from '@univerjs/sheets-data-validation';
|
3
|
+
import { ISheetClipboardService } from '@univerjs/sheets-ui';
|
4
|
+
export declare class DataValidationCopyPasteController extends Disposable {
|
5
|
+
private _sheetClipboardService;
|
6
|
+
private _sheetDataValidationModel;
|
7
|
+
private _injector;
|
8
|
+
private _copyInfo;
|
9
|
+
constructor(_sheetClipboardService: ISheetClipboardService, _sheetDataValidationModel: SheetDataValidationModel, _injector: Injector);
|
10
|
+
private _initCopyPaste;
|
11
|
+
private _collect;
|
12
|
+
private _generateMutations;
|
13
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
|
2
|
+
import { SheetPermissionInterceptorBaseController } from '@univerjs/sheets-ui';
|
3
|
+
export declare class DataValidationPermissionController extends Disposable {
|
4
|
+
private _localeService;
|
5
|
+
private readonly _commandService;
|
6
|
+
private readonly _sheetPermissionInterceptorBaseController;
|
7
|
+
constructor(_localeService: LocaleService, _commandService: ICommandService, _sheetPermissionInterceptorBaseController: SheetPermissionInterceptorBaseController);
|
8
|
+
private _commandExecutedListener;
|
9
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Disposable, LocaleService } from '@univerjs/core';
|
2
|
+
import { DataValidatorRegistryService } from '@univerjs/data-validation';
|
3
|
+
import { SheetDataValidationModel } from '@univerjs/sheets-data-validation';
|
4
|
+
import { IEditorBridgeService } from '@univerjs/sheets-ui';
|
5
|
+
import { IDialogService } from '@univerjs/ui';
|
6
|
+
export declare class DataValidationRejectInputController extends Disposable {
|
7
|
+
private readonly _editorBridgeService;
|
8
|
+
private readonly _dataValidationModel;
|
9
|
+
private readonly _dataValidatorRegistryService;
|
10
|
+
private readonly _dialogService;
|
11
|
+
private readonly _localeService;
|
12
|
+
constructor(_editorBridgeService: IEditorBridgeService, _dataValidationModel: SheetDataValidationModel, _dataValidatorRegistryService: DataValidatorRegistryService, _dialogService: IDialogService, _localeService: LocaleService);
|
13
|
+
private _initEditorBridgeInterceptor;
|
14
|
+
showReject(title: string): void;
|
15
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
2
|
+
import { DataValidatorRegistryService } from '@univerjs/data-validation';
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
4
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
5
|
+
import { SheetDataValidationModel } from '@univerjs/sheets-data-validation';
|
6
|
+
import { AutoHeightController, IEditorBridgeService } from '@univerjs/sheets-ui';
|
7
|
+
import { IMenuManagerService } from '@univerjs/ui';
|
8
|
+
import { DataValidationDropdownManagerService } from '../services/dropdown-manager.service';
|
9
|
+
export declare class SheetsDataValidationRenderController extends RxDisposable {
|
10
|
+
private readonly _commandService;
|
11
|
+
private readonly _menuManagerService;
|
12
|
+
private readonly _renderManagerService;
|
13
|
+
private readonly _univerInstanceService;
|
14
|
+
private readonly _autoHeightController;
|
15
|
+
private readonly _dropdownManagerService;
|
16
|
+
private readonly _sheetDataValidationModel;
|
17
|
+
private readonly _dataValidatorRegistryService;
|
18
|
+
private readonly _sheetInterceptorService;
|
19
|
+
private readonly _editorBridgeService?;
|
20
|
+
constructor(_commandService: ICommandService, _menuManagerService: IMenuManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _autoHeightController: AutoHeightController, _dropdownManagerService: DataValidationDropdownManagerService, _sheetDataValidationModel: SheetDataValidationModel, _dataValidatorRegistryService: DataValidatorRegistryService, _sheetInterceptorService: SheetInterceptorService, _editorBridgeService?: IEditorBridgeService | undefined);
|
21
|
+
private _initMenu;
|
22
|
+
private _initDropdown;
|
23
|
+
private _initViewModelIntercept;
|
24
|
+
private _initAutoHeight;
|
25
|
+
}
|
26
|
+
export declare class SheetsDataValidationMobileRenderController extends RxDisposable {
|
27
|
+
private readonly _commandService;
|
28
|
+
private readonly _renderManagerService;
|
29
|
+
private readonly _autoHeightController;
|
30
|
+
private readonly _dataValidatorRegistryService;
|
31
|
+
private readonly _sheetInterceptorService;
|
32
|
+
private readonly _sheetDataValidationModel;
|
33
|
+
constructor(_commandService: ICommandService, _renderManagerService: IRenderManagerService, _autoHeightController: AutoHeightController, _dataValidatorRegistryService: DataValidatorRegistryService, _sheetInterceptorService: SheetInterceptorService, _sheetDataValidationModel: SheetDataValidationModel);
|
34
|
+
private _initViewModelIntercept;
|
35
|
+
private _initAutoHeight;
|
36
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Injector, RxDisposable } from '@univerjs/core';
|
2
|
+
import { DataValidatorRegistryService } from '@univerjs/data-validation';
|
3
|
+
import { ComponentManager } from '@univerjs/ui';
|
4
|
+
export declare class SheetsDataValidationUIController extends RxDisposable {
|
5
|
+
private readonly _injector;
|
6
|
+
private readonly _componentManger;
|
7
|
+
private readonly _dataValidatorRegistryService;
|
8
|
+
constructor(_injector: Injector, _componentManger: ComponentManager, _dataValidatorRegistryService: DataValidatorRegistryService);
|
9
|
+
private _initComponents;
|
10
|
+
private _registerValidatorViews;
|
11
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { IAccessor } from '@univerjs/core';
|
2
|
+
import { IMenuItem } from '@univerjs/ui';
|
3
|
+
export declare const DataValidationIcon = "data-validation-single";
|
4
|
+
export declare const DATA_VALIDATION_MENU_ID = "sheet.menu.data-validation";
|
5
|
+
export declare function dataValidationMenuFactory(accessor: IAccessor): IMenuItem;
|
6
|
+
export declare function openDataValidationMenuFactory(_accessor: IAccessor): IMenuItem;
|
7
|
+
export declare function addDataValidationMenuFactory(_accessor: IAccessor): IMenuItem;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
export { DATE_DROPDOWN_KEY, LIST_DROPDOWN_KEY } from './views/components';
|
17
|
+
export { UniverSheetsDataValidationUIPlugin } from './plugin';
|
18
|
+
export { UniverSheetsDataValidationMobileUIPlugin } from './mobile-plugin';
|
@@ -0,0 +1,183 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
declare const locale: {
|
17
|
+
dataValidation: {
|
18
|
+
title: string;
|
19
|
+
validFail: {
|
20
|
+
value: string;
|
21
|
+
common: string;
|
22
|
+
number: string;
|
23
|
+
formula: string;
|
24
|
+
integer: string;
|
25
|
+
date: string;
|
26
|
+
list: string;
|
27
|
+
listInvalid: string;
|
28
|
+
checkboxEqual: string;
|
29
|
+
formulaError: string;
|
30
|
+
listIntersects: string;
|
31
|
+
primitive: string;
|
32
|
+
};
|
33
|
+
panel: {
|
34
|
+
title: string;
|
35
|
+
addTitle: string;
|
36
|
+
removeAll: string;
|
37
|
+
add: string;
|
38
|
+
range: string;
|
39
|
+
rangeError: string;
|
40
|
+
type: string;
|
41
|
+
options: string;
|
42
|
+
operator: string;
|
43
|
+
removeRule: string;
|
44
|
+
done: string;
|
45
|
+
formulaPlaceholder: string;
|
46
|
+
valuePlaceholder: string;
|
47
|
+
formulaAnd: string;
|
48
|
+
invalid: string;
|
49
|
+
showWarning: string;
|
50
|
+
rejectInput: string;
|
51
|
+
messageInfo: string;
|
52
|
+
showInfo: string;
|
53
|
+
};
|
54
|
+
operators: {
|
55
|
+
between: string;
|
56
|
+
greaterThan: string;
|
57
|
+
greaterThanOrEqual: string;
|
58
|
+
lessThan: string;
|
59
|
+
lessThanOrEqual: string;
|
60
|
+
equal: string;
|
61
|
+
notEqual: string;
|
62
|
+
notBetween: string;
|
63
|
+
};
|
64
|
+
ruleName: {
|
65
|
+
between: string;
|
66
|
+
greaterThan: string;
|
67
|
+
greaterThanOrEqual: string;
|
68
|
+
lessThan: string;
|
69
|
+
lessThanOrEqual: string;
|
70
|
+
equal: string;
|
71
|
+
notEqual: string;
|
72
|
+
notBetween: string;
|
73
|
+
};
|
74
|
+
errorMsg: {
|
75
|
+
between: string;
|
76
|
+
greaterThan: string;
|
77
|
+
greaterThanOrEqual: string;
|
78
|
+
lessThan: string;
|
79
|
+
lessThanOrEqual: string;
|
80
|
+
equal: string;
|
81
|
+
notEqual: string;
|
82
|
+
notBetween: string;
|
83
|
+
};
|
84
|
+
date: {
|
85
|
+
title: string;
|
86
|
+
operators: {
|
87
|
+
between: string;
|
88
|
+
greaterThan: string;
|
89
|
+
greaterThanOrEqual: string;
|
90
|
+
lessThan: string;
|
91
|
+
lessThanOrEqual: string;
|
92
|
+
equal: string;
|
93
|
+
notEqual: string;
|
94
|
+
notBetween: string;
|
95
|
+
};
|
96
|
+
ruleName: {
|
97
|
+
between: string;
|
98
|
+
greaterThan: string;
|
99
|
+
greaterThanOrEqual: string;
|
100
|
+
lessThan: string;
|
101
|
+
lessThanOrEqual: string;
|
102
|
+
equal: string;
|
103
|
+
notEqual: string;
|
104
|
+
notBetween: string;
|
105
|
+
};
|
106
|
+
errorMsg: {
|
107
|
+
between: string;
|
108
|
+
greaterThan: string;
|
109
|
+
greaterThanOrEqual: string;
|
110
|
+
lessThan: string;
|
111
|
+
lessThanOrEqual: string;
|
112
|
+
equal: string;
|
113
|
+
notEqual: string;
|
114
|
+
notBetween: string;
|
115
|
+
};
|
116
|
+
};
|
117
|
+
list: {
|
118
|
+
title: string;
|
119
|
+
name: string;
|
120
|
+
error: string;
|
121
|
+
emptyError: string;
|
122
|
+
add: string;
|
123
|
+
dropdown: string;
|
124
|
+
options: string;
|
125
|
+
customOptions: string;
|
126
|
+
refOptions: string;
|
127
|
+
formulaError: string;
|
128
|
+
edit: string;
|
129
|
+
};
|
130
|
+
listMultiple: {
|
131
|
+
title: string;
|
132
|
+
dropdown: string;
|
133
|
+
};
|
134
|
+
textLength: {
|
135
|
+
title: string;
|
136
|
+
errorMsg: {
|
137
|
+
between: string;
|
138
|
+
greaterThan: string;
|
139
|
+
greaterThanOrEqual: string;
|
140
|
+
lessThan: string;
|
141
|
+
lessThanOrEqual: string;
|
142
|
+
equal: string;
|
143
|
+
notEqual: string;
|
144
|
+
notBetween: string;
|
145
|
+
};
|
146
|
+
};
|
147
|
+
decimal: {
|
148
|
+
title: string;
|
149
|
+
};
|
150
|
+
whole: {
|
151
|
+
title: string;
|
152
|
+
};
|
153
|
+
checkbox: {
|
154
|
+
title: string;
|
155
|
+
error: string;
|
156
|
+
tips: string;
|
157
|
+
checked: string;
|
158
|
+
unchecked: string;
|
159
|
+
};
|
160
|
+
custom: {
|
161
|
+
title: string;
|
162
|
+
error: string;
|
163
|
+
validFail: string;
|
164
|
+
};
|
165
|
+
alert: {
|
166
|
+
title: string;
|
167
|
+
ok: string;
|
168
|
+
};
|
169
|
+
error: {
|
170
|
+
title: string;
|
171
|
+
};
|
172
|
+
renderMode: {
|
173
|
+
arrow: string;
|
174
|
+
chip: string;
|
175
|
+
text: string;
|
176
|
+
label: string;
|
177
|
+
};
|
178
|
+
showTime: {
|
179
|
+
label: string;
|
180
|
+
};
|
181
|
+
};
|
182
|
+
};
|
183
|
+
export default locale;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IUniverSheetsDataValidationConfig } from './controllers/config.schema';
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
3
|
+
export declare class UniverSheetsDataValidationMobileUIPlugin extends Plugin {
|
4
|
+
private readonly _config;
|
5
|
+
protected readonly _injector: Injector;
|
6
|
+
private readonly _commandService;
|
7
|
+
private readonly _configService;
|
8
|
+
static pluginName: string;
|
9
|
+
static type: UniverInstanceType;
|
10
|
+
constructor(_config: Partial<IUniverSheetsDataValidationConfig> | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService);
|
11
|
+
onStarting(): void;
|
12
|
+
onReady(): void;
|
13
|
+
onRendered(): void;
|
14
|
+
onSteady(): void;
|
15
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IUniverSheetsDataValidationConfig } from './controllers/config.schema';
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
3
|
+
export declare class UniverSheetsDataValidationUIPlugin extends Plugin {
|
4
|
+
private readonly _config;
|
5
|
+
protected readonly _injector: Injector;
|
6
|
+
private readonly _commandService;
|
7
|
+
private readonly _configService;
|
8
|
+
static pluginName: string;
|
9
|
+
static type: UniverInstanceType;
|
10
|
+
constructor(_config: Partial<IUniverSheetsDataValidationConfig> | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService);
|
11
|
+
onStarting(): void;
|
12
|
+
onReady(): void;
|
13
|
+
onRendered(): void;
|
14
|
+
onSteady(): void;
|
15
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { IDataValidationRule, IDisposable, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
|
2
|
+
import { ISidebarService } from '@univerjs/ui';
|
3
|
+
export declare class DataValidationPanelService extends Disposable {
|
4
|
+
private readonly _univerInstanceService;
|
5
|
+
private readonly _sidebarService;
|
6
|
+
private _open$;
|
7
|
+
readonly open$: import('rxjs').Observable<boolean>;
|
8
|
+
private _activeRule;
|
9
|
+
private _activeRule$;
|
10
|
+
readonly activeRule$: import('rxjs').Observable<Nullable<{
|
11
|
+
unitId: string;
|
12
|
+
subUnitId: string;
|
13
|
+
rule: IDataValidationRule;
|
14
|
+
}>>;
|
15
|
+
get activeRule(): Nullable<{
|
16
|
+
unitId: string;
|
17
|
+
subUnitId: string;
|
18
|
+
rule: IDataValidationRule;
|
19
|
+
}>;
|
20
|
+
get isOpen(): boolean;
|
21
|
+
private _closeDisposable;
|
22
|
+
constructor(_univerInstanceService: IUniverInstanceService, _sidebarService: ISidebarService);
|
23
|
+
dispose(): void;
|
24
|
+
open(): void;
|
25
|
+
close(): void;
|
26
|
+
setCloseDisposable(disposable: IDisposable): void;
|
27
|
+
setActiveRule(rule: Nullable<{
|
28
|
+
unitId: string;
|
29
|
+
subUnitId: string;
|
30
|
+
rule: IDataValidationRule;
|
31
|
+
}>): void;
|
32
|
+
}
|