@univerjs/sheets-data-validation-ui 0.4.0-nightly.202410141606 → 0.4.0-nightly.202410151606
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/lib/es/index.js
CHANGED
@@ -3,10 +3,10 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
5
5
|
import React, { useState, forwardRef, useRef, createElement, useMemo, useEffect } from "react";
|
6
|
-
import { Inject, LocaleService, Disposable, DataValidationErrorStyle, useDependency, ICommandService, numfmt, CellValueType, UniverInstanceType, toDisposable, IUniverInstanceService, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DisposableCollection, CommandType, BuildTextUtils, DataValidationRenderMode, DataValidationType, IConfigService, UndoCommand, RedoCommand, isUnitRangesEqual, debounce, shallowEqual, Injector, DataValidationStatus, ObjectMatrix, Range, Rectangle, queryObjectMatrix, Optional, RxDisposable, InterceptorEffectEnum, sequenceExecute, createInternalEditorID, isFormulaString, Tools, ThemeService, VerticalAlign, HorizontalAlign, DEFAULT_STYLES, WrapStrategy, DocumentDataModel, DEFAULT_EMPTY_DOCUMENT_VALUE, BooleanNumber, Plugin } from "@univerjs/core";
|
6
|
+
import { Inject, LocaleService, Disposable, DataValidationErrorStyle, useDependency, ICommandService, numfmt, CellValueType, UniverInstanceType, toDisposable, IUniverInstanceService, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DisposableCollection, CommandType, BuildTextUtils, DataValidationRenderMode, DataValidationType, IConfigService, UndoCommand, RedoCommand, isUnitRangesEqual, debounce, shallowEqual, Injector, DataValidationStatus, ObjectMatrix, Range, Rectangle, queryObjectMatrix, Optional, RxDisposable, InterceptorEffectEnum, sequenceExecute, bufferDebounceTime, createInternalEditorID, isFormulaString, Tools, ThemeService, VerticalAlign, HorizontalAlign, DEFAULT_STYLES, WrapStrategy, DocumentDataModel, DEFAULT_EMPTY_DOCUMENT_VALUE, BooleanNumber, Plugin } from "@univerjs/core";
|
7
7
|
import { Button, DatePanel, RectPopup, Scrollbar, FormLayout, RadioGroup, Radio, Checkbox, Input, Select, DraggableList } from "@univerjs/design";
|
8
8
|
import { SetRangeValuesCommand, SheetsSelectionsService, getSheetCommandTarget, WorkbookEditablePermission, RangeProtectionPermissionEditPoint, WorksheetEditPermission, checkRangesEditablePermission, WorksheetSetCellStylePermission, SheetInterceptorService, INTERCEPTOR_POINT, InterceptCellContentPriority } from "@univerjs/sheets";
|
9
|
-
import { SheetDataValidationModel, getCellValueOrigin, getDataValidationCellValue, deserializeListOptions, serializeListOptions, UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand, RemoveSheetDataValidationCommand, UpdateSheetDataValidationOptionsCommand, createDefaultNewRule, AddSheetDataValidationCommand, RemoveSheetAllDataValidationCommand, DATA_VALIDATION_PLUGIN_NAME, getDataValidationDiffMutations, DataValidationFormulaController, DataValidationFormulaService, getFormulaResult, transformCheckboxValue, CHECKBOX_FORMULA_1, CHECKBOX_FORMULA_2 } from "@univerjs/sheets-data-validation";
|
9
|
+
import { SheetDataValidationModel, getCellValueOrigin, getDataValidationCellValue, deserializeListOptions, serializeListOptions, UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand, RemoveSheetDataValidationCommand, UpdateSheetDataValidationOptionsCommand, createDefaultNewRule, AddSheetDataValidationCommand, RemoveSheetAllDataValidationCommand, DATA_VALIDATION_PLUGIN_NAME, getDataValidationDiffMutations, DataValidationCacheService, DataValidationFormulaController, DataValidationFormulaService, getFormulaResult, transformCheckboxValue, CHECKBOX_FORMULA_1, CHECKBOX_FORMULA_2 } from "@univerjs/sheets-data-validation";
|
10
10
|
import { getPatternType } from "@univerjs/sheets-numfmt";
|
11
11
|
import { DataValidatorRegistryService, DataValidationModel, DataValidatorRegistryScope, TWO_FORMULA_OPERATOR_COUNT, getRuleOptions, getRuleSetting } from "@univerjs/data-validation";
|
12
12
|
import { IEditorBridgeService, SheetCanvasPopManagerService, SheetPermissionInterceptorBaseController, IMarkSelectionService, HoverManagerService, CellAlertManagerService, CellAlertType, IAutoFillService, APPLY_TYPE, virtualizeDiscreteRanges, getAutoFillRepeatRange, COPY_TYPE, rangeToDiscreteRange, PREDEFINED_HOOK_NAME, getRepeatRange, ISheetClipboardService, getCurrentRangeDisable$, AutoHeightController, SheetSkeletonManagerService } from "@univerjs/sheets-ui";
|
@@ -400,11 +400,11 @@ var utc$1 = { exports: {} };
|
|
400
400
|
})(utc$1);
|
401
401
|
var utcExports = utc$1.exports;
|
402
402
|
const utc = /* @__PURE__ */ getDefaultExportFromCjs(utcExports);
|
403
|
-
var __defProp$
|
404
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
403
|
+
var __defProp$f = Object.defineProperty, __getOwnPropDesc$f = Object.getOwnPropertyDescriptor, __decorateClass$f = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
404
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
405
405
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
406
|
-
return kind && result && __defProp$
|
407
|
-
}, "__decorateClass$
|
406
|
+
return kind && result && __defProp$f(target, key, result), result;
|
407
|
+
}, "__decorateClass$f"), __decorateParam$f = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$f"), _a;
|
408
408
|
let DataValidationRejectInputController = (_a = class extends Disposable {
|
409
409
|
constructor(_editorBridgeService, _dataValidationModel, _dataValidatorRegistryService, _dialogService, _localeService) {
|
410
410
|
super(), this._editorBridgeService = _editorBridgeService, this._dataValidationModel = _dataValidationModel, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._dialogService = _dialogService, this._localeService = _localeService, this._initEditorBridgeInterceptor();
|
@@ -414,7 +414,7 @@ let DataValidationRejectInputController = (_a = class extends Disposable {
|
|
414
414
|
this._editorBridgeService.interceptor.getInterceptPoints().AFTER_CELL_EDIT_ASYNC,
|
415
415
|
{
|
416
416
|
handler: /* @__PURE__ */ __name(async (cellPromise, context, next) => {
|
417
|
-
var
|
417
|
+
var _a18;
|
418
418
|
const cell = await cellPromise, { worksheet, row, col, unitId, subUnitId, workbook } = context, ruleId = this._dataValidationModel.getRuleIdByLocation(unitId, subUnitId, row, col), rule = ruleId ? this._dataValidationModel.getRuleById(unitId, subUnitId, ruleId) : void 0;
|
419
419
|
if (!rule || rule.errorStyle !== DataValidationErrorStyle.STOP)
|
420
420
|
return next(Promise.resolve(cell));
|
@@ -422,7 +422,7 @@ let DataValidationRejectInputController = (_a = class extends Disposable {
|
|
422
422
|
if (!validator || await validator.validator(
|
423
423
|
{
|
424
424
|
value: getCellValueOrigin(cell),
|
425
|
-
interceptValue: getCellValueOrigin((
|
425
|
+
interceptValue: getCellValueOrigin((_a18 = context == null ? void 0 : context.origin) != null ? _a18 : cell),
|
426
426
|
row,
|
427
427
|
column: col,
|
428
428
|
unitId,
|
@@ -488,12 +488,12 @@ let DataValidationRejectInputController = (_a = class extends Disposable {
|
|
488
488
|
});
|
489
489
|
}
|
490
490
|
}, __name(_a, "DataValidationRejectInputController"), _a);
|
491
|
-
DataValidationRejectInputController = __decorateClass$
|
492
|
-
__decorateParam$
|
493
|
-
__decorateParam$
|
494
|
-
__decorateParam$
|
495
|
-
__decorateParam$
|
496
|
-
__decorateParam$
|
491
|
+
DataValidationRejectInputController = __decorateClass$f([
|
492
|
+
__decorateParam$f(0, IEditorBridgeService),
|
493
|
+
__decorateParam$f(1, Inject(SheetDataValidationModel)),
|
494
|
+
__decorateParam$f(2, Inject(DataValidatorRegistryService)),
|
495
|
+
__decorateParam$f(3, IDialogService),
|
496
|
+
__decorateParam$f(4, Inject(LocaleService))
|
497
497
|
], DataValidationRejectInputController);
|
498
498
|
const dvDateDropdown = "univer-dv-date-dropdown", dvDateDropdownBtns = "univer-dv-date-dropdown-btns", styles$6 = {
|
499
499
|
dvDateDropdown,
|
@@ -510,15 +510,15 @@ const transformDate = /* @__PURE__ */ __name((value) => {
|
|
510
510
|
return date;
|
511
511
|
}, "transformDate");
|
512
512
|
function DateDropdown(props) {
|
513
|
-
var
|
514
|
-
const { location, hideFn } = props, { worksheet, row, col, unitId, subUnitId, workbook } = location, commandService = useDependency(ICommandService), rejectInputController = useDependency(DataValidationRejectInputController), cellData = worksheet.getCell(row, col), rule = (
|
513
|
+
var _a18, _b, _c;
|
514
|
+
const { location, hideFn } = props, { worksheet, row, col, unitId, subUnitId, workbook } = location, commandService = useDependency(ICommandService), rejectInputController = useDependency(DataValidationRejectInputController), cellData = worksheet.getCell(row, col), rule = (_a18 = cellData == null ? void 0 : cellData.dataValidation) == null ? void 0 : _a18.rule, validator = (_b = cellData == null ? void 0 : cellData.dataValidation) == null ? void 0 : _b.validator, cellStr = getCellValueOrigin(worksheet.getCellRaw(row, col)), originDate = transformDate(cellStr), [localDate, setLocalDate] = useState(originDate), showTime = !!((_c = rule == null ? void 0 : rule.bizInfo) != null && _c.showTime), date = localDate && localDate.isValid() ? localDate : dayjs(), localeService = useDependency(LocaleService);
|
515
515
|
if (!cellData || !rule || !validator)
|
516
516
|
return;
|
517
517
|
const handleSave = /* @__PURE__ */ __name(async () => {
|
518
|
-
var
|
518
|
+
var _a19, _b2, _c2;
|
519
519
|
if (!date)
|
520
520
|
return;
|
521
|
-
const dateStr = date.format(showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), serialTime = (
|
521
|
+
const dateStr = date.format(showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), serialTime = (_a19 = numfmt.parseDate(dateStr)) == null ? void 0 : _a19.v, cellStyle = workbook.getStyles().getStyleByCell(cellData), format = (_c2 = (_b2 = cellStyle == null ? void 0 : cellStyle.n) == null ? void 0 : _b2.pattern) != null ? _c2 : "", patternType = getPatternType(format);
|
522
522
|
rule.errorStyle !== DataValidationErrorStyle.STOP || await validator.validator({
|
523
523
|
value: serialTime,
|
524
524
|
unitId,
|
@@ -601,15 +601,15 @@ function replaceRuntimeIdsAndExtInAttrs(node, runtimeProps, extend) {
|
|
601
601
|
var attrs = __assign({}, node.attrs);
|
602
602
|
extend != null && extend.colorChannel1 && attrs.fill === "colorChannel1" && (attrs.fill = extend.colorChannel1);
|
603
603
|
var defIds = runtimeProps.defIds;
|
604
|
-
return !defIds || defIds.length === 0 || (node.tag === "use" && attrs["xlink:href"] && (attrs["xlink:href"] = attrs["xlink:href"] + runtimeProps.idSuffix), Object.entries(attrs).forEach(function(
|
605
|
-
var key =
|
604
|
+
return !defIds || defIds.length === 0 || (node.tag === "use" && attrs["xlink:href"] && (attrs["xlink:href"] = attrs["xlink:href"] + runtimeProps.idSuffix), Object.entries(attrs).forEach(function(_a18) {
|
605
|
+
var key = _a18[0], value = _a18[1];
|
606
606
|
typeof value == "string" && (attrs[key] = value.replace(/url\(#(.*)\)/, "url(#$1".concat(runtimeProps.idSuffix, ")")));
|
607
607
|
})), attrs;
|
608
608
|
}
|
609
609
|
__name(replaceRuntimeIdsAndExtInAttrs, "replaceRuntimeIdsAndExtInAttrs");
|
610
610
|
function replaceRuntimeIdsInDefs(node, runtimeProps) {
|
611
|
-
var
|
612
|
-
return !defIds || defIds.length === 0 ? node : node.tag === "defs" && (!((
|
611
|
+
var _a18, defIds = runtimeProps.defIds;
|
612
|
+
return !defIds || defIds.length === 0 ? node : node.tag === "defs" && (!((_a18 = node.children) === null || _a18 === void 0) && _a18.length) ? __assign(__assign({}, node), { children: node.children.map(function(child) {
|
613
613
|
return typeof child.attrs.id == "string" && defIds && defIds.indexOf(child.attrs.id) > -1 ? __assign(__assign({}, child), { attrs: __assign(__assign({}, child.attrs), { id: child.attrs.id + runtimeProps.idSuffix }) }) : child;
|
614
614
|
}) }) : node;
|
615
615
|
}
|
@@ -675,11 +675,11 @@ var element = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width:
|
|
675
675
|
}));
|
676
676
|
});
|
677
677
|
SequenceSingle.displayName = "SequenceSingle";
|
678
|
-
var __defProp$
|
679
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
678
|
+
var __defProp$e = Object.defineProperty, __getOwnPropDesc$e = Object.getOwnPropertyDescriptor, __decorateClass$e = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
679
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
680
680
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
681
|
-
return kind && result && __defProp$
|
682
|
-
}, "__decorateClass$
|
681
|
+
return kind && result && __defProp$e(target, key, result), result;
|
682
|
+
}, "__decorateClass$e"), __decorateParam$e = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$e"), _a2;
|
683
683
|
let DataValidationPanelService = (_a2 = class extends Disposable {
|
684
684
|
constructor(_univerInstanceService, _sidebarService) {
|
685
685
|
super();
|
@@ -706,15 +706,15 @@ let DataValidationPanelService = (_a2 = class extends Disposable {
|
|
706
706
|
return this._open$.getValue();
|
707
707
|
}
|
708
708
|
dispose() {
|
709
|
-
var
|
710
|
-
super.dispose(), this._open$.next(!1), this._open$.complete(), this._activeRule$.complete(), (
|
709
|
+
var _a18;
|
710
|
+
super.dispose(), this._open$.next(!1), this._open$.complete(), this._activeRule$.complete(), (_a18 = this._closeDisposable) == null || _a18.dispose();
|
711
711
|
}
|
712
712
|
open() {
|
713
713
|
this._open$.next(!0);
|
714
714
|
}
|
715
715
|
close() {
|
716
|
-
var
|
717
|
-
this._open$.next(!1), (
|
716
|
+
var _a18;
|
717
|
+
this._open$.next(!1), (_a18 = this._closeDisposable) == null || _a18.dispose();
|
718
718
|
}
|
719
719
|
setCloseDisposable(disposable) {
|
720
720
|
this._closeDisposable = toDisposable(() => {
|
@@ -725,9 +725,9 @@ let DataValidationPanelService = (_a2 = class extends Disposable {
|
|
725
725
|
this._activeRule = rule, this._activeRule$.next(rule);
|
726
726
|
}
|
727
727
|
}, __name(_a2, "DataValidationPanelService"), _a2);
|
728
|
-
DataValidationPanelService = __decorateClass$
|
729
|
-
__decorateParam$
|
730
|
-
__decorateParam$
|
728
|
+
DataValidationPanelService = __decorateClass$e([
|
729
|
+
__decorateParam$e(0, IUniverInstanceService),
|
730
|
+
__decorateParam$e(1, ISidebarService)
|
731
731
|
], DataValidationPanelService);
|
732
732
|
function CellDropdown() {
|
733
733
|
const dropdownManagerService = useDependency(DataValidationDropdownManagerService), activeDropdown = useObservable(dropdownManagerService.activeDropdown$, dropdownManagerService.activeDropdown), componentManager = useDependency(ComponentManager);
|
@@ -750,11 +750,11 @@ function CellDropdown() {
|
|
750
750
|
}
|
751
751
|
__name(CellDropdown, "CellDropdown");
|
752
752
|
const DROP_DOWN_KEY = "sheet.ui.dropdown";
|
753
|
-
var __defProp$
|
754
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
753
|
+
var __defProp$d = Object.defineProperty, __getOwnPropDesc$d = Object.getOwnPropertyDescriptor, __decorateClass$d = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
754
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
755
755
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
756
|
-
return kind && result && __defProp$
|
757
|
-
}, "__decorateClass$
|
756
|
+
return kind && result && __defProp$d(target, key, result), result;
|
757
|
+
}, "__decorateClass$d"), __decorateParam$d = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$d"), _a3;
|
758
758
|
let DataValidationDropdownManagerService = (_a3 = class extends Disposable {
|
759
759
|
constructor(_canvasPopupManagerService, _univerInstanceService, _dataValidatorRegistryService, _zenZoneService, _renderManagerService, _dataValidationModel, _sheetsSelectionsService) {
|
760
760
|
super();
|
@@ -817,8 +817,8 @@ let DataValidationDropdownManagerService = (_a3 = class extends Disposable {
|
|
817
817
|
const disposableCollection = new DisposableCollection();
|
818
818
|
disposableCollection.add(popupDisposable), disposableCollection.add({
|
819
819
|
dispose: /* @__PURE__ */ __name(() => {
|
820
|
-
var
|
821
|
-
(_b = (
|
820
|
+
var _a18, _b;
|
821
|
+
(_b = (_a18 = this._activeDropdown) == null ? void 0 : _a18.onHide) == null || _b.call(_a18);
|
822
822
|
}, "dispose")
|
823
823
|
}), this._currentPopup = disposableCollection;
|
824
824
|
}
|
@@ -854,14 +854,14 @@ let DataValidationDropdownManagerService = (_a3 = class extends Disposable {
|
|
854
854
|
});
|
855
855
|
}
|
856
856
|
}, __name(_a3, "DataValidationDropdownManagerService"), _a3);
|
857
|
-
DataValidationDropdownManagerService = __decorateClass$
|
858
|
-
__decorateParam$
|
859
|
-
__decorateParam$
|
860
|
-
__decorateParam$
|
861
|
-
__decorateParam$
|
862
|
-
__decorateParam$
|
863
|
-
__decorateParam$
|
864
|
-
__decorateParam$
|
857
|
+
DataValidationDropdownManagerService = __decorateClass$d([
|
858
|
+
__decorateParam$d(0, Inject(SheetCanvasPopManagerService)),
|
859
|
+
__decorateParam$d(1, IUniverInstanceService),
|
860
|
+
__decorateParam$d(2, Inject(DataValidatorRegistryService)),
|
861
|
+
__decorateParam$d(3, IZenZoneService),
|
862
|
+
__decorateParam$d(4, IRenderManagerService),
|
863
|
+
__decorateParam$d(5, Inject(SheetDataValidationModel)),
|
864
|
+
__decorateParam$d(6, Inject(SheetsSelectionsService))
|
865
865
|
], DataValidationDropdownManagerService);
|
866
866
|
const DATA_VALIDATION_PANEL = "DataValidationPanel", OpenValidationPanelOperation = {
|
867
867
|
id: "data-validation.operation.open-validation-panel",
|
@@ -929,8 +929,8 @@ const DATA_VALIDATION_PANEL = "DataValidationPanel", OpenValidationPanelOperatio
|
|
929
929
|
dvListDropdownSplit,
|
930
930
|
dvListDropdownEdit
|
931
931
|
}, SelectList = /* @__PURE__ */ __name((props) => {
|
932
|
-
var
|
933
|
-
const { value, onChange, multiple, options, title, onEdit, style, filter: filter2, location } = props, localeService = useDependency(LocaleService), configService = useDependency(IConfigService), lowerFilter = filter2 == null ? void 0 : filter2.toLowerCase(), { row, col, unitId, subUnitId } = location, filteredOptions = options.filter((item) => lowerFilter ? item.label.toLowerCase().includes(lowerFilter) : !0), showEditOnDropdown = (_b = (
|
932
|
+
var _a18, _b;
|
933
|
+
const { value, onChange, multiple, options, title, onEdit, style, filter: filter2, location } = props, localeService = useDependency(LocaleService), configService = useDependency(IConfigService), lowerFilter = filter2 == null ? void 0 : filter2.toLowerCase(), { row, col, unitId, subUnitId } = location, filteredOptions = options.filter((item) => lowerFilter ? item.label.toLowerCase().includes(lowerFilter) : !0), showEditOnDropdown = (_b = (_a18 = configService.getConfig(PLUGIN_CONFIG_KEY)) == null ? void 0 : _a18.showEditOnDropdown) != null ? _b : !0, sheetPermissionInterceptorBaseController = useDependency(SheetPermissionInterceptorBaseController), hasPermission = useMemo(() => sheetPermissionInterceptorBaseController.permissionCheckWithRanges(
|
934
934
|
{
|
935
935
|
workbookTypes: [WorkbookEditablePermission],
|
936
936
|
rangeTypes: [RangeProtectionPermissionEditPoint],
|
@@ -967,18 +967,18 @@ const DATA_VALIDATION_PANEL = "DataValidationPanel", OpenValidationPanelOperatio
|
|
967
967
|
] });
|
968
968
|
}, "SelectList");
|
969
969
|
function ListDropDown(props) {
|
970
|
-
var
|
970
|
+
var _a18, _b;
|
971
971
|
const { location, hideFn } = props, { worksheet, row, col, unitId, subUnitId } = location, dataValidationModel = useDependency(DataValidationModel), [editingText, setEditingText] = useState(""), commandService = useDependency(ICommandService), localeService = useDependency(LocaleService), [localValue, setLocalValue] = useState(""), editorBridgeService = useDependency(IEditorBridgeService), instanceService = useDependency(IUniverInstanceService), ruleChange$ = useMemo(() => dataValidationModel.ruleChange$.pipe(debounceTime(16)), []);
|
972
972
|
useObservable(ruleChange$);
|
973
973
|
const anchorRect = RectPopup.useContext(), cellWidth = anchorRect.right - anchorRect.left;
|
974
974
|
if (useEffect(() => {
|
975
975
|
const dispose = commandService.onCommandExecuted((command) => {
|
976
|
-
var
|
976
|
+
var _a19, _b2;
|
977
977
|
if (command.id === RichTextEditingMutation.id) {
|
978
978
|
const params = command.params, { unitId: unitId2 } = params, unit = instanceService.getUnit(unitId2, UniverInstanceType.UNIVER_DOC);
|
979
979
|
if (!unit)
|
980
980
|
return;
|
981
|
-
const text = BuildTextUtils.transform.getPlainText((_b2 = (
|
981
|
+
const text = BuildTextUtils.transform.getPlainText((_b2 = (_a19 = unit.getSnapshot().body) == null ? void 0 : _a19.dataStream) != null ? _b2 : "");
|
982
982
|
setEditingText(text);
|
983
983
|
}
|
984
984
|
});
|
@@ -987,7 +987,7 @@ function ListDropDown(props) {
|
|
987
987
|
};
|
988
988
|
}, [commandService, instanceService]), !worksheet)
|
989
989
|
return null;
|
990
|
-
const cellData = worksheet.getCell(row, col), rule = (
|
990
|
+
const cellData = worksheet.getCell(row, col), rule = (_a18 = cellData == null ? void 0 : cellData.dataValidation) == null ? void 0 : _a18.rule, validator = (_b = cellData == null ? void 0 : cellData.dataValidation) == null ? void 0 : _b.validator, showColor = (rule == null ? void 0 : rule.renderMode) === DataValidationRenderMode.CUSTOM || (rule == null ? void 0 : rule.renderMode) === void 0;
|
991
991
|
if (!cellData || !rule || !validator || validator.id.indexOf(DataValidationType.LIST) !== 0)
|
992
992
|
return;
|
993
993
|
const multiple = rule.type === DataValidationType.LIST_MULTIPLE, list = validator.getListWithColor(rule, unitId, subUnitId), cellStr = localValue || getDataValidationCellValue(worksheet.getCellRaw(row, col)), value = deserializeListOptions(cellStr), handleEdit = /* @__PURE__ */ __name(() => {
|
@@ -1043,7 +1043,7 @@ const dataValidationOptionsButton = "univer-data-validation-options-button", dat
|
|
1043
1043
|
dataValidationOptionsButtonIcon
|
1044
1044
|
};
|
1045
1045
|
function DataValidationOptions(props) {
|
1046
|
-
var
|
1046
|
+
var _a18;
|
1047
1047
|
const localeService = useDependency(LocaleService), componentManager = useDependency(ComponentManager), { value, onChange, extraComponent } = props, [show, setShow] = useState(!1), ExtraOptions = extraComponent ? componentManager.get(extraComponent) : null;
|
1048
1048
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
1049
1049
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dataValidationOptionsButton, onClick: /* @__PURE__ */ __name(() => setShow(!show), "onClick"), children: [
|
@@ -1059,7 +1059,7 @@ function DataValidationOptions(props) {
|
|
1059
1059
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
1060
1060
|
RadioGroup,
|
1061
1061
|
{
|
1062
|
-
value: `${(
|
1062
|
+
value: `${(_a18 = value.errorStyle) != null ? _a18 : DataValidationErrorStyle.WARNING}`,
|
1063
1063
|
onChange: /* @__PURE__ */ __name((errorStyle) => onChange({ ...value, errorStyle: +errorStyle }), "onChange"),
|
1064
1064
|
children: [
|
1065
1065
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationErrorStyle.WARNING}`, children: localeService.t("dataValidation.panel.showWarning") }),
|
@@ -1104,8 +1104,8 @@ const dataValidationDetail = "univer-data-validation-detail", dataValidationDeta
|
|
1104
1104
|
1e3
|
1105
1105
|
), "debounceExecuteFactory");
|
1106
1106
|
function getSheetIdByName(univerInstanceService, unitId, name) {
|
1107
|
-
var
|
1108
|
-
return unitId ? ((_b = (
|
1107
|
+
var _a18, _b, _c, _d;
|
1108
|
+
return unitId ? ((_b = (_a18 = univerInstanceService.getUnit(unitId)) == null ? void 0 : _a18.getSheetBySheetName(name)) == null ? void 0 : _b.getSheetId()) || "" : ((_d = (_c = univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET)) == null ? void 0 : _c.getSheetBySheetName(name)) == null ? void 0 : _d.getSheetId()) || "";
|
1109
1109
|
}
|
1110
1110
|
__name(getSheetIdByName, "getSheetIdByName");
|
1111
1111
|
function DataValidationDetail() {
|
@@ -1216,8 +1216,8 @@ function DataValidationDetail() {
|
|
1216
1216
|
}
|
1217
1217
|
));
|
1218
1218
|
}, "handleUpdateRuleOptions"), handlePanelClick = /* @__PURE__ */ __name((e) => {
|
1219
|
-
var
|
1220
|
-
const handleOutClick = (
|
1219
|
+
var _a18;
|
1220
|
+
const handleOutClick = (_a18 = rangeSelectorActionsRef.current) == null ? void 0 : _a18.handleOutClick;
|
1221
1221
|
handleOutClick && handleOutClick(e, isFocusRangeSelectorSet);
|
1222
1222
|
}, "handlePanelClick");
|
1223
1223
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.dataValidationDetail, onClick: handlePanelClick, children: [
|
@@ -1312,8 +1312,8 @@ const dataValidationItemContainer = "univer-data-validation-item-container", dat
|
|
1312
1312
|
}), e.stopPropagation();
|
1313
1313
|
}, "handleDelete");
|
1314
1314
|
return useEffect(() => () => {
|
1315
|
-
var
|
1316
|
-
ids.current && ((
|
1315
|
+
var _a18;
|
1316
|
+
ids.current && ((_a18 = ids.current) == null || _a18.forEach((id) => {
|
1317
1317
|
id && markSelectionService.removeShape(id);
|
1318
1318
|
}));
|
1319
1319
|
}, [markSelectionService]), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
@@ -1344,8 +1344,8 @@ const dataValidationItemContainer = "univer-data-validation-item-container", dat
|
|
1344
1344
|
})));
|
1345
1345
|
}, "onMouseEnter"),
|
1346
1346
|
onMouseLeave: /* @__PURE__ */ __name(() => {
|
1347
|
-
var
|
1348
|
-
setIsHover(!1), (
|
1347
|
+
var _a18;
|
1348
|
+
setIsHover(!1), (_a18 = ids.current) == null || _a18.forEach((id) => {
|
1349
1349
|
id && markSelectionService.removeShape(id);
|
1350
1350
|
}), ids.current = void 0;
|
1351
1351
|
}, "onMouseLeave"),
|
@@ -1404,7 +1404,7 @@ function DataValidationListWithWorkbook(props) {
|
|
1404
1404
|
}, "getDvRulesByPermissionCorrect"))(rules), hasDisableRule = rulesByPermissionCheck == null ? void 0 : rulesByPermissionCheck.some((rule) => rule.disable);
|
1405
1405
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$1.dataValidationList, children: [
|
1406
1406
|
rulesByPermissionCheck == null ? void 0 : rulesByPermissionCheck.map((rule) => {
|
1407
|
-
var
|
1407
|
+
var _a18;
|
1408
1408
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
1409
1409
|
DataValidationItem,
|
1410
1410
|
{
|
@@ -1418,7 +1418,7 @@ function DataValidationListWithWorkbook(props) {
|
|
1418
1418
|
});
|
1419
1419
|
}, "onClick"),
|
1420
1420
|
rule,
|
1421
|
-
disable: (
|
1421
|
+
disable: (_a18 = rule.disable) != null ? _a18 : !1
|
1422
1422
|
},
|
1423
1423
|
rule.uid
|
1424
1424
|
);
|
@@ -1450,11 +1450,11 @@ const DataValidationPanel = /* @__PURE__ */ __name(() => {
|
|
1450
1450
|
}), !0) : !1;
|
1451
1451
|
}
|
1452
1452
|
};
|
1453
|
-
var __defProp$
|
1454
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
1453
|
+
var __defProp$c = Object.defineProperty, __getOwnPropDesc$c = Object.getOwnPropertyDescriptor, __decorateClass$c = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
1454
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
1455
1455
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
1456
|
-
return kind && result && __defProp$
|
1457
|
-
}, "__decorateClass$
|
1456
|
+
return kind && result && __defProp$c(target, key, result), result;
|
1457
|
+
}, "__decorateClass$c"), __decorateParam$c = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$c");
|
1458
1458
|
const ALERT_KEY = "SHEET_DATA_VALIDATION_ALERT";
|
1459
1459
|
var _a4;
|
1460
1460
|
let DataValidationAlertController = (_a4 = class extends Disposable {
|
@@ -1466,12 +1466,12 @@ let DataValidationAlertController = (_a4 = class extends Disposable {
|
|
1466
1466
|
}
|
1467
1467
|
_initCellAlertPopup() {
|
1468
1468
|
this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(debounceTime(100)).subscribe((cellPos) => {
|
1469
|
-
var
|
1469
|
+
var _a18, _b;
|
1470
1470
|
if (cellPos) {
|
1471
1471
|
const worksheet = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET).getActiveSheet();
|
1472
1472
|
if (!worksheet) return;
|
1473
1473
|
const cellData = worksheet.getCell(cellPos.location.row, cellPos.location.col);
|
1474
|
-
if (((
|
1474
|
+
if (((_a18 = cellData == null ? void 0 : cellData.dataValidation) == null ? void 0 : _a18.validStatus) === DataValidationStatus.INVALID) {
|
1475
1475
|
const currentAlert = this._cellAlertManagerService.currentAlert.get(ALERT_KEY), currentLoc = (_b = currentAlert == null ? void 0 : currentAlert.alert) == null ? void 0 : _b.location;
|
1476
1476
|
if (currentLoc && currentLoc.row === cellPos.location.row && currentLoc.col === cellPos.location.col && currentLoc.subUnitId === cellPos.location.subUnitId && currentLoc.unitId === cellPos.location.unitId)
|
1477
1477
|
return;
|
@@ -1499,18 +1499,18 @@ let DataValidationAlertController = (_a4 = class extends Disposable {
|
|
1499
1499
|
}));
|
1500
1500
|
}
|
1501
1501
|
}, __name(_a4, "DataValidationAlertController"), _a4);
|
1502
|
-
DataValidationAlertController = __decorateClass$
|
1503
|
-
__decorateParam$
|
1504
|
-
__decorateParam$
|
1505
|
-
__decorateParam$
|
1506
|
-
__decorateParam$
|
1507
|
-
__decorateParam$
|
1502
|
+
DataValidationAlertController = __decorateClass$c([
|
1503
|
+
__decorateParam$c(0, Inject(HoverManagerService)),
|
1504
|
+
__decorateParam$c(1, Inject(CellAlertManagerService)),
|
1505
|
+
__decorateParam$c(2, IUniverInstanceService),
|
1506
|
+
__decorateParam$c(3, Inject(LocaleService)),
|
1507
|
+
__decorateParam$c(4, IZenZoneService)
|
1508
1508
|
], DataValidationAlertController);
|
1509
|
-
var __defProp$
|
1510
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
1509
|
+
var __defProp$b = Object.defineProperty, __getOwnPropDesc$b = Object.getOwnPropertyDescriptor, __decorateClass$b = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
1510
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
1511
1511
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
1512
|
-
return kind && result && __defProp$
|
1513
|
-
}, "__decorateClass$
|
1512
|
+
return kind && result && __defProp$b(target, key, result), result;
|
1513
|
+
}, "__decorateClass$b"), __decorateParam$b = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$b"), _a5;
|
1514
1514
|
let DataValidationAutoFillController = (_a5 = class extends Disposable {
|
1515
1515
|
constructor(_autoFillService, _dataValidationModel, _injector) {
|
1516
1516
|
super(), this._autoFillService = _autoFillService, this._dataValidationModel = _dataValidationModel, this._injector = _injector, this._initAutoFill();
|
@@ -1587,16 +1587,16 @@ let DataValidationAutoFillController = (_a5 = class extends Disposable {
|
|
1587
1587
|
this.disposeWithMe(this._autoFillService.addHook(hook));
|
1588
1588
|
}
|
1589
1589
|
}, __name(_a5, "DataValidationAutoFillController"), _a5);
|
1590
|
-
DataValidationAutoFillController = __decorateClass$
|
1591
|
-
__decorateParam$
|
1592
|
-
__decorateParam$
|
1593
|
-
__decorateParam$
|
1590
|
+
DataValidationAutoFillController = __decorateClass$b([
|
1591
|
+
__decorateParam$b(0, IAutoFillService),
|
1592
|
+
__decorateParam$b(1, Inject(SheetDataValidationModel)),
|
1593
|
+
__decorateParam$b(2, Inject(Injector))
|
1594
1594
|
], DataValidationAutoFillController);
|
1595
|
-
var __defProp$
|
1596
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
1595
|
+
var __defProp$a = Object.defineProperty, __getOwnPropDesc$a = Object.getOwnPropertyDescriptor, __decorateClass$a = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
1596
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
1597
1597
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
1598
|
-
return kind && result && __defProp$
|
1599
|
-
}, "__decorateClass$
|
1598
|
+
return kind && result && __defProp$a(target, key, result), result;
|
1599
|
+
}, "__decorateClass$a"), __decorateParam$a = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$a"), _a6;
|
1600
1600
|
let DataValidationCopyPasteController = (_a6 = class extends Disposable {
|
1601
1601
|
constructor(_sheetClipboardService, _sheetDataValidationModel, _injector) {
|
1602
1602
|
super();
|
@@ -1652,8 +1652,8 @@ let DataValidationCopyPasteController = (_a6 = class extends Disposable {
|
|
1652
1652
|
if (copyInfo.unitId !== unitId || subUnitId !== copyInfo.subUnitId) {
|
1653
1653
|
const ruleMatrix = this._sheetDataValidationModel.getRuleObjectMatrix(copyInfo.unitId, copyInfo.subUnitId).clone(), additionMatrix = new ObjectMatrix(), addRules = /* @__PURE__ */ new Set(), { ranges: [vCopyRange, vPastedRange], mapFunc } = virtualizeDiscreteRanges([copyInfo.copyRange, pastedRange]), repeatRange = getRepeatRange(vCopyRange, vPastedRange, !0), additionRules = /* @__PURE__ */ new Map();
|
1654
1654
|
repeatRange.forEach(({ startRange }) => {
|
1655
|
-
var
|
1656
|
-
(
|
1655
|
+
var _a18;
|
1656
|
+
(_a18 = this._copyInfo) == null || _a18.matrix.forValue((row, col, ruleId) => {
|
1657
1657
|
const range = Rectangle.getPositionRange(
|
1658
1658
|
{
|
1659
1659
|
startRow: row,
|
@@ -1684,8 +1684,8 @@ let DataValidationCopyPasteController = (_a6 = class extends Disposable {
|
|
1684
1684
|
} else {
|
1685
1685
|
const ruleMatrix = this._sheetDataValidationModel.getRuleObjectMatrix(unitId, subUnitId).clone(), additionMatrix = new ObjectMatrix(), additionRules = /* @__PURE__ */ new Set(), { ranges: [vCopyRange, vPastedRange], mapFunc } = virtualizeDiscreteRanges([copyInfo.copyRange, pastedRange]);
|
1686
1686
|
getRepeatRange(vCopyRange, vPastedRange, !0).forEach(({ startRange }) => {
|
1687
|
-
var
|
1688
|
-
(
|
1687
|
+
var _a18;
|
1688
|
+
(_a18 = this._copyInfo) == null || _a18.matrix.forValue((row, col, ruleId) => {
|
1689
1689
|
const range = Rectangle.getPositionRange(
|
1690
1690
|
{
|
1691
1691
|
startRow: row,
|
@@ -1714,16 +1714,16 @@ let DataValidationCopyPasteController = (_a6 = class extends Disposable {
|
|
1714
1714
|
}
|
1715
1715
|
}
|
1716
1716
|
}, __name(_a6, "DataValidationCopyPasteController"), _a6);
|
1717
|
-
DataValidationCopyPasteController = __decorateClass$
|
1718
|
-
__decorateParam$
|
1719
|
-
__decorateParam$
|
1720
|
-
__decorateParam$
|
1717
|
+
DataValidationCopyPasteController = __decorateClass$a([
|
1718
|
+
__decorateParam$a(0, ISheetClipboardService),
|
1719
|
+
__decorateParam$a(1, Inject(SheetDataValidationModel)),
|
1720
|
+
__decorateParam$a(2, Inject(Injector))
|
1721
1721
|
], DataValidationCopyPasteController);
|
1722
|
-
var __defProp$
|
1723
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
1722
|
+
var __defProp$9 = Object.defineProperty, __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor, __decorateClass$9 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
1723
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
1724
1724
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
1725
|
-
return kind && result && __defProp$
|
1726
|
-
}, "__decorateClass$
|
1725
|
+
return kind && result && __defProp$9(target, key, result), result;
|
1726
|
+
}, "__decorateClass$9"), __decorateParam$9 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$9"), _a7;
|
1727
1727
|
let DataValidationPermissionController = (_a7 = class extends Disposable {
|
1728
1728
|
constructor(_localeService, _commandService, _sheetPermissionInterceptorBaseController) {
|
1729
1729
|
super(), this._localeService = _localeService, this._commandService = _commandService, this._sheetPermissionInterceptorBaseController = _sheetPermissionInterceptorBaseController, this._commandExecutedListener();
|
@@ -1744,10 +1744,10 @@ let DataValidationPermissionController = (_a7 = class extends Disposable {
|
|
1744
1744
|
);
|
1745
1745
|
}
|
1746
1746
|
}, __name(_a7, "DataValidationPermissionController"), _a7);
|
1747
|
-
DataValidationPermissionController = __decorateClass$
|
1748
|
-
__decorateParam$
|
1749
|
-
__decorateParam$
|
1750
|
-
__decorateParam$
|
1747
|
+
DataValidationPermissionController = __decorateClass$9([
|
1748
|
+
__decorateParam$9(0, Inject(LocaleService)),
|
1749
|
+
__decorateParam$9(1, ICommandService),
|
1750
|
+
__decorateParam$9(2, Inject(SheetPermissionInterceptorBaseController))
|
1751
1751
|
], DataValidationPermissionController);
|
1752
1752
|
const DataValidationIcon = "data-validation-single", DATA_VALIDATION_MENU_ID = "sheet.menu.data-validation";
|
1753
1753
|
function dataValidationMenuFactory(accessor) {
|
@@ -1793,11 +1793,11 @@ const menuSchema = {
|
|
1793
1793
|
}
|
1794
1794
|
}
|
1795
1795
|
};
|
1796
|
-
var __defProp$
|
1797
|
-
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$
|
1796
|
+
var __defProp$8 = Object.defineProperty, __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor, __decorateClass$8 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
1797
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
1798
1798
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
1799
|
-
return kind && result && __defProp$
|
1800
|
-
}, "__decorateClass$
|
1799
|
+
return kind && result && __defProp$8(target, key, result), result;
|
1800
|
+
}, "__decorateClass$8"), __decorateParam$8 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$8");
|
1801
1801
|
const INVALID_MARK = {
|
1802
1802
|
tr: {
|
1803
1803
|
size: 6,
|
@@ -1806,17 +1806,17 @@ const INVALID_MARK = {
|
|
1806
1806
|
};
|
1807
1807
|
var _a8;
|
1808
1808
|
let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
1809
|
-
constructor(_commandService, _menuManagerService, _renderManagerService, _univerInstanceService, _autoHeightController, _dropdownManagerService, _sheetDataValidationModel, _dataValidatorRegistryService, _sheetInterceptorService, _editorBridgeService) {
|
1810
|
-
super(), this._commandService = _commandService, this._menuManagerService = _menuManagerService, this._renderManagerService = _renderManagerService, this._univerInstanceService = _univerInstanceService, this._autoHeightController = _autoHeightController, this._dropdownManagerService = _dropdownManagerService, this._sheetDataValidationModel = _sheetDataValidationModel, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._sheetInterceptorService = _sheetInterceptorService, this._editorBridgeService = _editorBridgeService, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
|
1809
|
+
constructor(_commandService, _menuManagerService, _renderManagerService, _univerInstanceService, _autoHeightController, _dropdownManagerService, _sheetDataValidationModel, _dataValidatorRegistryService, _sheetInterceptorService, _dataValidationCacheService, _editorBridgeService) {
|
1810
|
+
super(), this._commandService = _commandService, this._menuManagerService = _menuManagerService, this._renderManagerService = _renderManagerService, this._univerInstanceService = _univerInstanceService, this._autoHeightController = _autoHeightController, this._dropdownManagerService = _dropdownManagerService, this._sheetDataValidationModel = _sheetDataValidationModel, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._sheetInterceptorService = _sheetInterceptorService, this._dataValidationCacheService = _dataValidationCacheService, this._editorBridgeService = _editorBridgeService, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
|
1811
1811
|
}
|
1812
1812
|
_initMenu() {
|
1813
1813
|
this._menuManagerService.mergeMenu(menuSchema);
|
1814
1814
|
}
|
1815
1815
|
_initDropdown() {
|
1816
1816
|
this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((visible) => {
|
1817
|
-
var
|
1817
|
+
var _a18;
|
1818
1818
|
if (!visible.visible) {
|
1819
|
-
((
|
1819
|
+
((_a18 = this._dropdownManagerService.activeDropdown) == null ? void 0 : _a18.trigger) === "editor-bridge" && this._dropdownManagerService.hideDropdown();
|
1820
1820
|
return;
|
1821
1821
|
}
|
1822
1822
|
const state = this._editorBridgeService.getEditCellState();
|
@@ -1866,24 +1866,24 @@ let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
|
1866
1866
|
priority: InterceptCellContentPriority.DATA_VALIDATION,
|
1867
1867
|
// eslint-disable-next-line max-lines-per-function, complexity
|
1868
1868
|
handler: /* @__PURE__ */ __name((cell, pos, next) => {
|
1869
|
-
var
|
1869
|
+
var _a18, _b, _c, _d, _e, _f;
|
1870
1870
|
const { row, col, unitId, subUnitId, workbook, worksheet } = pos, ruleId = this._sheetDataValidationModel.getRuleIdByLocation(unitId, subUnitId, row, col);
|
1871
1871
|
if (!ruleId)
|
1872
1872
|
return next(cell);
|
1873
1873
|
const rule = this._sheetDataValidationModel.getRuleById(unitId, subUnitId, ruleId);
|
1874
1874
|
if (!rule)
|
1875
1875
|
return next(cell);
|
1876
|
-
const validStatus = this.
|
1876
|
+
const validStatus = (_b = (_a18 = this._dataValidationCacheService.getValue(unitId, subUnitId, row, col)) == null ? void 0 : _a18.status) != null ? _b : DataValidationStatus.VALID, validator = this._dataValidatorRegistryService.getValidatorItem(rule.type), cellOrigin = pos.rawData;
|
1877
1877
|
let cache;
|
1878
1878
|
const cellValue = {
|
1879
1879
|
get value() {
|
1880
|
-
var
|
1881
|
-
return cache !== void 0 || (cache = (
|
1880
|
+
var _a19;
|
1881
|
+
return cache !== void 0 || (cache = (_a19 = getCellValueOrigin(cellOrigin)) != null ? _a19 : null), cache;
|
1882
1882
|
}
|
1883
1883
|
}, valueStr = {
|
1884
1884
|
get value() {
|
1885
|
-
var
|
1886
|
-
return `${(
|
1885
|
+
var _a19;
|
1886
|
+
return `${(_a19 = cellValue.value) != null ? _a19 : ""}`;
|
1887
1887
|
}
|
1888
1888
|
};
|
1889
1889
|
return next({
|
@@ -1899,12 +1899,12 @@ let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
|
1899
1899
|
...validStatus === DataValidationStatus.INVALID ? INVALID_MARK : null
|
1900
1900
|
},
|
1901
1901
|
customRender: [
|
1902
|
-
...(
|
1902
|
+
...(_c = cell == null ? void 0 : cell.customRender) != null ? _c : [],
|
1903
1903
|
...validator != null && validator.canvasRender ? [validator.canvasRender] : []
|
1904
1904
|
],
|
1905
1905
|
fontRenderExtension: {
|
1906
1906
|
...cell == null ? void 0 : cell.fontRenderExtension,
|
1907
|
-
isSkip: ((
|
1907
|
+
isSkip: ((_d = cell == null ? void 0 : cell.fontRenderExtension) == null ? void 0 : _d.isSkip) || ((_e = validator == null ? void 0 : validator.skipDefaultFontRender) == null ? void 0 : _e.call(validator, rule, cellValue.value, pos))
|
1908
1908
|
},
|
1909
1909
|
interceptorStyle: {
|
1910
1910
|
...cell == null ? void 0 : cell.interceptorStyle,
|
@@ -1916,8 +1916,8 @@ let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
|
1916
1916
|
})
|
1917
1917
|
},
|
1918
1918
|
interceptorAutoHeight: /* @__PURE__ */ __name(() => {
|
1919
|
-
var
|
1920
|
-
const skeleton = (_b2 = (
|
1919
|
+
var _a19, _b2, _c2, _d2, _e2, _f2;
|
1920
|
+
const skeleton = (_b2 = (_a19 = this._renderManagerService.getRenderById(unitId)) == null ? void 0 : _a19.with(SheetSkeletonManagerService).getWorksheetSkeleton(subUnitId)) == null ? void 0 : _b2.skeleton;
|
1921
1921
|
if (!skeleton)
|
1922
1922
|
return;
|
1923
1923
|
const mergeCell = skeleton.worksheet.getMergedCell(row, col), info = {
|
@@ -1939,9 +1939,9 @@ let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
|
1939
1939
|
workbook,
|
1940
1940
|
worksheet
|
1941
1941
|
};
|
1942
|
-
return (
|
1942
|
+
return (_f2 = (_e2 = validator == null ? void 0 : validator.canvasRender) == null ? void 0 : _e2.calcCellAutoHeight) == null ? void 0 : _f2.call(_e2, info);
|
1943
1943
|
}, "interceptorAutoHeight"),
|
1944
|
-
coverable: ((
|
1944
|
+
coverable: ((_f = cell == null ? void 0 : cell.coverable) != null ? _f : !0) && !(rule.type === DataValidationType.LIST || rule.type === DataValidationType.LIST_MULTIPLE)
|
1945
1945
|
});
|
1946
1946
|
}, "handler")
|
1947
1947
|
}
|
@@ -1957,8 +1957,8 @@ let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
|
1957
1957
|
).subscribe((infos) => {
|
1958
1958
|
const ranges = [];
|
1959
1959
|
if (infos.forEach((info) => {
|
1960
|
-
var
|
1961
|
-
(
|
1960
|
+
var _a18;
|
1961
|
+
(_a18 = info.rule) != null && _a18.ranges && ranges.push(...info.rule.ranges);
|
1962
1962
|
}), ranges.length) {
|
1963
1963
|
const mutations = this._autoHeightController.getUndoRedoParamsOfAutoHeight(ranges);
|
1964
1964
|
sequenceExecute(mutations.redos, this._commandService);
|
@@ -1966,22 +1966,23 @@ let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
|
1966
1966
|
});
|
1967
1967
|
}
|
1968
1968
|
}, __name(_a8, "SheetsDataValidationRenderController"), _a8);
|
1969
|
-
SheetsDataValidationRenderController = __decorateClass$
|
1970
|
-
__decorateParam$
|
1971
|
-
__decorateParam$
|
1972
|
-
__decorateParam$
|
1973
|
-
__decorateParam$
|
1974
|
-
__decorateParam$
|
1975
|
-
__decorateParam$
|
1976
|
-
__decorateParam$
|
1977
|
-
__decorateParam$
|
1978
|
-
__decorateParam$
|
1979
|
-
__decorateParam$
|
1969
|
+
SheetsDataValidationRenderController = __decorateClass$8([
|
1970
|
+
__decorateParam$8(0, ICommandService),
|
1971
|
+
__decorateParam$8(1, IMenuManagerService),
|
1972
|
+
__decorateParam$8(2, IRenderManagerService),
|
1973
|
+
__decorateParam$8(3, IUniverInstanceService),
|
1974
|
+
__decorateParam$8(4, Inject(AutoHeightController)),
|
1975
|
+
__decorateParam$8(5, Inject(DataValidationDropdownManagerService)),
|
1976
|
+
__decorateParam$8(6, Inject(SheetDataValidationModel)),
|
1977
|
+
__decorateParam$8(7, Inject(DataValidatorRegistryService)),
|
1978
|
+
__decorateParam$8(8, Inject(SheetInterceptorService)),
|
1979
|
+
__decorateParam$8(9, Inject(DataValidationCacheService)),
|
1980
|
+
__decorateParam$8(10, Optional(IEditorBridgeService))
|
1980
1981
|
], SheetsDataValidationRenderController);
|
1981
1982
|
var _a9;
|
1982
1983
|
let SheetsDataValidationMobileRenderController = (_a9 = class extends RxDisposable {
|
1983
|
-
constructor(_commandService, _renderManagerService, _autoHeightController, _dataValidatorRegistryService, _sheetInterceptorService, _sheetDataValidationModel) {
|
1984
|
-
super(), this._commandService = _commandService, this._renderManagerService = _renderManagerService, this._autoHeightController = _autoHeightController, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._sheetInterceptorService = _sheetInterceptorService, this._sheetDataValidationModel = _sheetDataValidationModel, this._initViewModelIntercept(), this._initAutoHeight();
|
1984
|
+
constructor(_commandService, _renderManagerService, _autoHeightController, _dataValidatorRegistryService, _sheetInterceptorService, _sheetDataValidationModel, _dataValidationCacheService) {
|
1985
|
+
super(), this._commandService = _commandService, this._renderManagerService = _renderManagerService, this._autoHeightController = _autoHeightController, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._sheetInterceptorService = _sheetInterceptorService, this._sheetDataValidationModel = _sheetDataValidationModel, this._dataValidationCacheService = _dataValidationCacheService, this._initViewModelIntercept(), this._initAutoHeight();
|
1985
1986
|
}
|
1986
1987
|
// eslint-disable-next-line max-lines-per-function
|
1987
1988
|
_initViewModelIntercept() {
|
@@ -1994,14 +1995,14 @@ let SheetsDataValidationMobileRenderController = (_a9 = class extends RxDisposab
|
|
1994
1995
|
priority: InterceptCellContentPriority.DATA_VALIDATION,
|
1995
1996
|
// eslint-disable-next-line complexity
|
1996
1997
|
handler: /* @__PURE__ */ __name((cell, pos, next) => {
|
1997
|
-
var
|
1998
|
+
var _a18, _b, _c, _d, _e, _f;
|
1998
1999
|
const { row, col, unitId, subUnitId, workbook, worksheet } = pos, ruleId = this._sheetDataValidationModel.getRuleIdByLocation(unitId, subUnitId, row, col);
|
1999
2000
|
if (!ruleId)
|
2000
2001
|
return next(cell);
|
2001
2002
|
const rule = this._sheetDataValidationModel.getRuleById(unitId, subUnitId, ruleId);
|
2002
2003
|
if (!rule)
|
2003
2004
|
return next(cell);
|
2004
|
-
const validStatus = this.
|
2005
|
+
const validStatus = (_b = (_a18 = this._dataValidationCacheService.getValue(unitId, subUnitId, row, col)) == null ? void 0 : _a18.status) != null ? _b : DataValidationStatus.VALID, validator = this._dataValidatorRegistryService.getValidatorItem(rule.type), cellOrigin = worksheet.getCellRaw(row, col), cellValue = getCellValueOrigin(cellOrigin), valueStr = `${cellValue != null ? cellValue : ""}`;
|
2005
2006
|
return next({
|
2006
2007
|
...cell,
|
2007
2008
|
dataValidation: {
|
@@ -2015,12 +2016,12 @@ let SheetsDataValidationMobileRenderController = (_a9 = class extends RxDisposab
|
|
2015
2016
|
...validStatus === DataValidationStatus.INVALID ? INVALID_MARK : null
|
2016
2017
|
},
|
2017
2018
|
customRender: [
|
2018
|
-
...(
|
2019
|
+
...(_c = cell == null ? void 0 : cell.customRender) != null ? _c : [],
|
2019
2020
|
...validator != null && validator.canvasRender ? [validator.canvasRender] : []
|
2020
2021
|
],
|
2021
2022
|
fontRenderExtension: {
|
2022
2023
|
...cell == null ? void 0 : cell.fontRenderExtension,
|
2023
|
-
isSkip: ((
|
2024
|
+
isSkip: ((_d = cell == null ? void 0 : cell.fontRenderExtension) == null ? void 0 : _d.isSkip) || ((_e = validator == null ? void 0 : validator.skipDefaultFontRender) == null ? void 0 : _e.call(validator, rule, cellValue, pos))
|
2024
2025
|
},
|
2025
2026
|
interceptorStyle: {
|
2026
2027
|
...cell == null ? void 0 : cell.interceptorStyle,
|
@@ -2032,8 +2033,8 @@ let SheetsDataValidationMobileRenderController = (_a9 = class extends RxDisposab
|
|
2032
2033
|
})
|
2033
2034
|
},
|
2034
2035
|
interceptorAutoHeight: /* @__PURE__ */ __name(() => {
|
2035
|
-
var
|
2036
|
-
const skeleton = (_b2 = (
|
2036
|
+
var _a19, _b2, _c2, _d2, _e2, _f2;
|
2037
|
+
const skeleton = (_b2 = (_a19 = this._renderManagerService.getRenderById(unitId)) == null ? void 0 : _a19.with(SheetSkeletonManagerService).getWorksheetSkeleton(subUnitId)) == null ? void 0 : _b2.skeleton;
|
2037
2038
|
if (!skeleton)
|
2038
2039
|
return;
|
2039
2040
|
const mergeCell = skeleton.worksheet.getMergedCell(row, col), info = {
|
@@ -2055,9 +2056,9 @@ let SheetsDataValidationMobileRenderController = (_a9 = class extends RxDisposab
|
|
2055
2056
|
workbook,
|
2056
2057
|
worksheet
|
2057
2058
|
};
|
2058
|
-
return (
|
2059
|
+
return (_f2 = (_e2 = validator == null ? void 0 : validator.canvasRender) == null ? void 0 : _e2.calcCellAutoHeight) == null ? void 0 : _f2.call(_e2, info);
|
2059
2060
|
}, "interceptorAutoHeight"),
|
2060
|
-
coverable: ((
|
2061
|
+
coverable: ((_f = cell == null ? void 0 : cell.coverable) != null ? _f : !0) && !(rule.type === DataValidationType.LIST || rule.type === DataValidationType.LIST_MULTIPLE)
|
2061
2062
|
});
|
2062
2063
|
}, "handler")
|
2063
2064
|
}
|
@@ -2071,8 +2072,8 @@ let SheetsDataValidationMobileRenderController = (_a9 = class extends RxDisposab
|
|
2071
2072
|
).subscribe((infos) => {
|
2072
2073
|
const ranges = [];
|
2073
2074
|
if (infos.forEach((info) => {
|
2074
|
-
var
|
2075
|
-
(
|
2075
|
+
var _a18;
|
2076
|
+
(_a18 = info.rule) != null && _a18.ranges && ranges.push(...info.rule.ranges);
|
2076
2077
|
}), ranges.length) {
|
2077
2078
|
const mutations = this._autoHeightController.getUndoRedoParamsOfAutoHeight(ranges);
|
2078
2079
|
sequenceExecute(mutations.redos, this._commandService);
|
@@ -2080,14 +2081,44 @@ let SheetsDataValidationMobileRenderController = (_a9 = class extends RxDisposab
|
|
2080
2081
|
});
|
2081
2082
|
}
|
2082
2083
|
}, __name(_a9, "SheetsDataValidationMobileRenderController"), _a9);
|
2083
|
-
SheetsDataValidationMobileRenderController = __decorateClass$
|
2084
|
-
__decorateParam$
|
2085
|
-
__decorateParam$
|
2086
|
-
__decorateParam$
|
2087
|
-
__decorateParam$
|
2088
|
-
__decorateParam$
|
2089
|
-
__decorateParam$
|
2084
|
+
SheetsDataValidationMobileRenderController = __decorateClass$8([
|
2085
|
+
__decorateParam$8(0, ICommandService),
|
2086
|
+
__decorateParam$8(1, IRenderManagerService),
|
2087
|
+
__decorateParam$8(2, Inject(AutoHeightController)),
|
2088
|
+
__decorateParam$8(3, Inject(DataValidatorRegistryService)),
|
2089
|
+
__decorateParam$8(4, Inject(SheetInterceptorService)),
|
2090
|
+
__decorateParam$8(5, Inject(SheetDataValidationModel)),
|
2091
|
+
__decorateParam$8(6, Inject(DataValidationCacheService))
|
2090
2092
|
], SheetsDataValidationMobileRenderController);
|
2093
|
+
var __defProp$7 = Object.defineProperty, __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor, __decorateClass$7 = /* @__PURE__ */ __name((decorators, target, key, kind) => {
|
2094
|
+
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
2095
|
+
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
2096
|
+
return kind && result && __defProp$7(target, key, result), result;
|
2097
|
+
}, "__decorateClass$7"), __decorateParam$7 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$7"), _a10;
|
2098
|
+
let SheetsDataValidationReRenderController = (_a10 = class extends Disposable {
|
2099
|
+
constructor(_context, _sheetDataValidationModel, _sheetSkeletonManagerService) {
|
2100
|
+
super(), this._context = _context, this._sheetDataValidationModel = _sheetDataValidationModel, this._sheetSkeletonManagerService = _sheetSkeletonManagerService, this._initSkeletonChange();
|
2101
|
+
}
|
2102
|
+
_initSkeletonChange() {
|
2103
|
+
const reRender = /* @__PURE__ */ __name((values) => {
|
2104
|
+
var _a18;
|
2105
|
+
if (!values.length)
|
2106
|
+
return;
|
2107
|
+
const sheetIds = /* @__PURE__ */ new Set();
|
2108
|
+
values.forEach((value) => {
|
2109
|
+
sheetIds.add(value.subUnitId);
|
2110
|
+
}), sheetIds.forEach((sheetId) => {
|
2111
|
+
var _a19;
|
2112
|
+
(_a19 = this._sheetSkeletonManagerService.getWorksheetSkeleton(sheetId)) == null || _a19.skeleton.makeDirty(!0);
|
2113
|
+
}), (_a18 = this._context.mainComponent) == null || _a18.makeForceDirty();
|
2114
|
+
}, "reRender");
|
2115
|
+
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(bufferDebounceTime(16)).subscribe(reRender));
|
2116
|
+
}
|
2117
|
+
}, __name(_a10, "SheetsDataValidationReRenderController"), _a10);
|
2118
|
+
SheetsDataValidationReRenderController = __decorateClass$7([
|
2119
|
+
__decorateParam$7(1, Inject(SheetDataValidationModel)),
|
2120
|
+
__decorateParam$7(2, Inject(SheetSkeletonManagerService))
|
2121
|
+
], SheetsDataValidationReRenderController);
|
2091
2122
|
const dataValidationFormula = "univer-data-validation-formula", dataValidationFormulaAnd = "univer-data-validation-formula-and", dataValidationFormulaListItem = "univer-data-validation-formula-list-item", dataValidationFormulaListItemIcon = "univer-data-validation-formula-list-item-icon", dataValidationFormulaListItemDrag = "univer-data-validation-formula-list-item-drag", dataValidationFormulaListAdd = "univer-data-validation-formula-list-add", dataValidationFormulaColorSelect = "univer-data-validation-formula-color-select", dataValidationFormulaColorSelectPanel = "univer-data-validation-formula-color-select-panel", dataValidationFormulaColorItem = "univer-data-validation-formula-color-item", styles = {
|
2092
2123
|
dataValidationFormula,
|
2093
2124
|
dataValidationFormulaAnd,
|
@@ -2191,12 +2222,12 @@ function CheckboxFormulaInput(props) {
|
|
2191
2222
|
}
|
2192
2223
|
__name(CheckboxFormulaInput, "CheckboxFormulaInput");
|
2193
2224
|
function CustomFormulaInput(props) {
|
2194
|
-
var
|
2225
|
+
var _a18;
|
2195
2226
|
const { unitId, subUnitId, value, onChange, showError, validResult } = props, formula1Res = showError ? validResult == null ? void 0 : validResult.formula1 : "";
|
2196
2227
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { error: formula1Res, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
2197
2228
|
TextEditor,
|
2198
2229
|
{
|
2199
|
-
value: (
|
2230
|
+
value: (_a18 = value == null ? void 0 : value.formula1) != null ? _a18 : "",
|
2200
2231
|
id: createInternalEditorID(`dataValidation-custom-formula-${unitId}-${subUnitId}`),
|
2201
2232
|
onChange: /* @__PURE__ */ __name((newValue) => {
|
2202
2233
|
onChange == null || onChange({
|
@@ -2485,9 +2516,9 @@ const CUSTOM_FORMULA_INPUT_NAME = "data-validation.custom-formula-input", BASE_F
|
|
2485
2516
|
]
|
2486
2517
|
], LIST_RENDER_MODE_OPTION_INPUT = "LIST_RENDER_MODE_OPTION_INPUT";
|
2487
2518
|
function ListRenderModeInput(props) {
|
2488
|
-
var
|
2519
|
+
var _a18;
|
2489
2520
|
const { value, onChange } = props, localeService = useDependency(LocaleService);
|
2490
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(RadioGroup, { value: `${(
|
2521
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { label: localeService.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(RadioGroup, { value: `${(_a18 = value.renderMode) != null ? _a18 : DataValidationRenderMode.CUSTOM}`, onChange: /* @__PURE__ */ __name((renderMode) => onChange({ ...value, renderMode: +renderMode }), "onChange"), children: [
|
2491
2522
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationRenderMode.CUSTOM}`, children: localeService.t("dataValidation.renderMode.chip") }),
|
2492
2523
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationRenderMode.ARROW}`, children: localeService.t("dataValidation.renderMode.arrow") }),
|
2493
2524
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { value: `${DataValidationRenderMode.TEXT}`, children: localeService.t("dataValidation.renderMode.text") })
|
@@ -2497,12 +2528,12 @@ __name(ListRenderModeInput, "ListRenderModeInput");
|
|
2497
2528
|
ListRenderModeInput.componentKey = LIST_RENDER_MODE_OPTION_INPUT;
|
2498
2529
|
const DATE_SHOW_TIME_OPTION = "DATE_SHOW_TIME_OPTION";
|
2499
2530
|
function DateShowTimeOption(props) {
|
2500
|
-
var
|
2531
|
+
var _a18;
|
2501
2532
|
const { value, onChange } = props, localeService = useDependency(LocaleService);
|
2502
2533
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormLayout, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
2503
2534
|
Checkbox,
|
2504
2535
|
{
|
2505
|
-
checked: (
|
2536
|
+
checked: (_a18 = value.bizInfo) == null ? void 0 : _a18.showTime,
|
2506
2537
|
onChange: /* @__PURE__ */ __name((showTime) => {
|
2507
2538
|
onChange({
|
2508
2539
|
...value,
|
@@ -2524,14 +2555,14 @@ var __defProp$6 = Object.defineProperty, __getOwnPropDesc$6 = Object.getOwnPrope
|
|
2524
2555
|
return kind && result && __defProp$6(target, key, result), result;
|
2525
2556
|
}, "__decorateClass$6"), __decorateParam$6 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$6");
|
2526
2557
|
const MARGIN_H$2 = 6;
|
2527
|
-
var
|
2528
|
-
let CheckboxRender = (
|
2558
|
+
var _a11;
|
2559
|
+
let CheckboxRender = (_a11 = class {
|
2529
2560
|
constructor(_commandService, _formulaService, _themeService) {
|
2530
2561
|
this._commandService = _commandService, this._formulaService = _formulaService, this._themeService = _themeService;
|
2531
2562
|
}
|
2532
2563
|
_calc(cellInfo, style) {
|
2533
|
-
var
|
2534
|
-
const { vt, ht } = style || {}, width = cellInfo.endX - cellInfo.startX - MARGIN_H$2 * 2, height = cellInfo.endY - cellInfo.startY, size = ((
|
2564
|
+
var _a18, _b, _c;
|
2565
|
+
const { vt, ht } = style || {}, width = cellInfo.endX - cellInfo.startX - MARGIN_H$2 * 2, height = cellInfo.endY - cellInfo.startY, size = ((_a18 = style == null ? void 0 : style.fs) != null ? _a18 : 10) * 1.6;
|
2535
2566
|
let widgetLeft = 0, widgetTop = 0;
|
2536
2567
|
switch (vt) {
|
2537
2568
|
case VerticalAlign.TOP:
|
@@ -2563,21 +2594,21 @@ let CheckboxRender = (_a10 = class {
|
|
2563
2594
|
};
|
2564
2595
|
}
|
2565
2596
|
calcCellAutoHeight(info) {
|
2566
|
-
var
|
2597
|
+
var _a18;
|
2567
2598
|
const { style } = info;
|
2568
|
-
return ((
|
2599
|
+
return ((_a18 = style == null ? void 0 : style.fs) != null ? _a18 : 10) * 1.6;
|
2569
2600
|
}
|
2570
2601
|
async _parseFormula(rule, unitId, subUnitId) {
|
2571
|
-
var
|
2602
|
+
var _a18, _b;
|
2572
2603
|
const { formula1 = CHECKBOX_FORMULA_1, formula2 = CHECKBOX_FORMULA_2 } = rule, results = await this._formulaService.getRuleFormulaResult(unitId, subUnitId, rule.uid);
|
2573
2604
|
return {
|
2574
|
-
formula1: isFormulaString(formula1) ? getFormulaResult((
|
2605
|
+
formula1: isFormulaString(formula1) ? getFormulaResult((_a18 = results == null ? void 0 : results[0]) == null ? void 0 : _a18.result) : formula1,
|
2575
2606
|
formula2: isFormulaString(formula2) ? getFormulaResult((_b = results == null ? void 0 : results[1]) == null ? void 0 : _b.result) : formula2
|
2576
2607
|
};
|
2577
2608
|
}
|
2578
2609
|
drawWith(ctx, info) {
|
2579
|
-
var
|
2580
|
-
const { style, data, primaryWithCoord, unitId, subUnitId, worksheet, row, col } = info, cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, value = getCellValueOrigin(worksheet.getCellRaw(row, col)), rule = (
|
2610
|
+
var _a18, _b, _c, _d, _e, _f;
|
2611
|
+
const { style, data, primaryWithCoord, unitId, subUnitId, worksheet, row, col } = info, cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, value = getCellValueOrigin(worksheet.getCellRaw(row, col)), rule = (_a18 = data.dataValidation) == null ? void 0 : _a18.rule, validator = (_b = data.dataValidation) == null ? void 0 : _b.validator;
|
2581
2612
|
if (!rule || !validator)
|
2582
2613
|
return;
|
2583
2614
|
const colors = this._themeService.getCurrentTheme();
|
@@ -2610,10 +2641,10 @@ let CheckboxRender = (_a10 = class {
|
|
2610
2641
|
return offsetX <= endX && offsetX >= startX && offsetY <= endY && offsetY >= startY;
|
2611
2642
|
}
|
2612
2643
|
async onPointerDown(info, evt) {
|
2613
|
-
var
|
2644
|
+
var _a18, _b, _c;
|
2614
2645
|
if (evt.button === 2)
|
2615
2646
|
return;
|
2616
|
-
const { primaryWithCoord, unitId, subUnitId, data, worksheet, row, col } = info, value = getCellValueOrigin(worksheet.getCellRaw(row, col)), rule = (
|
2647
|
+
const { primaryWithCoord, unitId, subUnitId, data, worksheet, row, col } = info, value = getCellValueOrigin(worksheet.getCellRaw(row, col)), rule = (_a18 = data.dataValidation) == null ? void 0 : _a18.rule, validator = (_b = data.dataValidation) == null ? void 0 : _b.validator;
|
2617
2648
|
if (!rule || !validator || !((_c = validator.skipDefaultFontRender) != null && _c.call(validator, rule, value, { unitId, subUnitId })))
|
2618
2649
|
return;
|
2619
2650
|
const { formula1, formula2 } = await this._parseFormula(rule, unitId, subUnitId), params = {
|
@@ -2633,7 +2664,7 @@ let CheckboxRender = (_a10 = class {
|
|
2633
2664
|
params
|
2634
2665
|
);
|
2635
2666
|
}
|
2636
|
-
}, __name(
|
2667
|
+
}, __name(_a11, "CheckboxRender"), _a11);
|
2637
2668
|
CheckboxRender = __decorateClass$6([
|
2638
2669
|
__decorateParam$6(0, ICommandService),
|
2639
2670
|
__decorateParam$6(1, Inject(DataValidationFormulaService)),
|
@@ -2643,8 +2674,8 @@ var __defProp$5 = Object.defineProperty, __getOwnPropDesc$5 = Object.getOwnPrope
|
|
2643
2674
|
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
2644
2675
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
2645
2676
|
return kind && result && __defProp$5(target, key, result), result;
|
2646
|
-
}, "__decorateClass$5"), __decorateParam$5 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$5"),
|
2647
|
-
let BaseSheetDataValidatorView = (
|
2677
|
+
}, "__decorateClass$5"), __decorateParam$5 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$5"), _a12;
|
2678
|
+
let BaseSheetDataValidatorView = (_a12 = class {
|
2648
2679
|
constructor(injector) {
|
2649
2680
|
__publicField(this, "canvasRender", null);
|
2650
2681
|
__publicField(this, "dropdown");
|
@@ -2652,7 +2683,7 @@ let BaseSheetDataValidatorView = (_a11 = class {
|
|
2652
2683
|
__publicField(this, "formulaInput", LIST_FORMULA_INPUT_NAME);
|
2653
2684
|
this.injector = injector;
|
2654
2685
|
}
|
2655
|
-
}, __name(
|
2686
|
+
}, __name(_a12, "BaseSheetDataValidatorView"), _a12);
|
2656
2687
|
BaseSheetDataValidatorView = __decorateClass$5([
|
2657
2688
|
__decorateParam$5(0, Inject(Injector))
|
2658
2689
|
], BaseSheetDataValidatorView);
|
@@ -2757,8 +2788,8 @@ var __defProp$4 = Object.defineProperty, __getOwnPropDesc$4 = Object.getOwnPrope
|
|
2757
2788
|
return kind && result && __defProp$4(target, key, result), result;
|
2758
2789
|
}, "__decorateClass$4"), __decorateParam$4 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$4");
|
2759
2790
|
const downPath$1 = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
|
2760
|
-
var
|
2761
|
-
let DropdownMultipleWidget = (
|
2791
|
+
var _a13;
|
2792
|
+
let DropdownMultipleWidget = (_a13 = class {
|
2762
2793
|
constructor(_commandService) {
|
2763
2794
|
__publicField(this, "zIndex");
|
2764
2795
|
__publicField(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
|
@@ -2786,7 +2817,7 @@ let DropdownMultipleWidget = (_a12 = class {
|
|
2786
2817
|
}
|
2787
2818
|
// eslint-disable-next-line max-lines-per-function
|
2788
2819
|
drawWith(ctx, info, skeleton, spreadsheets) {
|
2789
|
-
var
|
2820
|
+
var _a18, _b;
|
2790
2821
|
const { primaryWithCoord, row, col, style, data, subUnitId } = info, _cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {}, validation = data.dataValidation, map = this._ensureMap(subUnitId), key = this._generateKey(row, col);
|
2791
2822
|
if (!validation)
|
2792
2823
|
return;
|
@@ -2795,7 +2826,7 @@ let DropdownMultipleWidget = (_a12 = class {
|
|
2795
2826
|
endX: _cellBounding.endX - rightOffset,
|
2796
2827
|
startY: _cellBounding.startY + topOffset,
|
2797
2828
|
endY: _cellBounding.endY - downOffset
|
2798
|
-
}, cellWidth = cellBounding.endX - cellBounding.startX, cellHeight = cellBounding.endY - cellBounding.startY, { cl } = style || {}, color = (
|
2829
|
+
}, cellWidth = cellBounding.endX - cellBounding.startX, cellHeight = cellBounding.endY - cellBounding.startY, { cl } = style || {}, color = (_a18 = typeof cl == "object" ? cl == null ? void 0 : cl.rgb : cl) != null ? _a18 : "#000", fontStyle = getFontStyleString(style != null ? style : void 0), { rule, validator: _validator } = validation, validator = _validator, { vt: _vt, ht } = style || {}, vt = _vt != null ? _vt : VerticalAlign.MIDDLE, cellValue = (_b = getCellValueOrigin(data)) != null ? _b : "", items = validator.parseCellValue(cellValue), labelColorMap = validator.getListWithColorMap(rule), layout = layoutDropdowns(items, fontStyle, cellWidth, cellHeight);
|
2799
2830
|
this._drawDownIcon(ctx, cellBounding, cellWidth, cellHeight, vt), ctx.save(), ctx.translateWithPrecision(cellBounding.startX, cellBounding.startY), ctx.beginPath(), ctx.rect(0, 0, cellWidth - ICON_PLACE$1, cellHeight), ctx.clip(), ctx.translateWithPrecision(CELL_PADDING_H, CELL_PADDING_V);
|
2800
2831
|
let top = 0;
|
2801
2832
|
switch (vt) {
|
@@ -2834,7 +2865,7 @@ let DropdownMultipleWidget = (_a12 = class {
|
|
2834
2865
|
});
|
2835
2866
|
}
|
2836
2867
|
calcCellAutoHeight(info) {
|
2837
|
-
var
|
2868
|
+
var _a18;
|
2838
2869
|
const { primaryWithCoord, style, data } = info, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {}, _cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, cellBounding = {
|
2839
2870
|
startX: _cellBounding.startX + leftOffset,
|
2840
2871
|
endX: _cellBounding.endX - rightOffset,
|
@@ -2843,7 +2874,7 @@ let DropdownMultipleWidget = (_a12 = class {
|
|
2843
2874
|
}, validation = data.dataValidation;
|
2844
2875
|
if (!validation)
|
2845
2876
|
return;
|
2846
|
-
const cellWidth = cellBounding.endX - cellBounding.startX, cellHeight = cellBounding.endY - cellBounding.startY, cellValue = (
|
2877
|
+
const cellWidth = cellBounding.endX - cellBounding.startX, cellHeight = cellBounding.endY - cellBounding.startY, cellValue = (_a18 = getCellValueOrigin(data)) != null ? _a18 : "", { validator: _validator } = validation, items = _validator.parseCellValue(cellValue), fontStyle = getFontStyleString(style != null ? style : void 0);
|
2847
2878
|
return layoutDropdowns(items, fontStyle, cellWidth, cellHeight).cellAutoHeight;
|
2848
2879
|
}
|
2849
2880
|
isHit(position, info) {
|
@@ -2861,7 +2892,7 @@ let DropdownMultipleWidget = (_a12 = class {
|
|
2861
2892
|
};
|
2862
2893
|
this._commandService.executeCommand(ShowDataValidationDropdown.id, params);
|
2863
2894
|
}
|
2864
|
-
}, __name(
|
2895
|
+
}, __name(_a13, "DropdownMultipleWidget"), _a13);
|
2865
2896
|
DropdownMultipleWidget = __decorateClass$4([
|
2866
2897
|
__decorateParam$4(0, ICommandService)
|
2867
2898
|
], DropdownMultipleWidget);
|
@@ -2977,8 +3008,8 @@ function calcPadding(cellWidth, cellHeight, fontWidth, fontHeight, vt, ht, margi
|
|
2977
3008
|
};
|
2978
3009
|
}
|
2979
3010
|
__name(calcPadding, "calcPadding");
|
2980
|
-
var
|
2981
|
-
let DropdownWidget = (
|
3011
|
+
var _a14;
|
3012
|
+
let DropdownWidget = (_a14 = class {
|
2982
3013
|
constructor(_localeService, _commandService) {
|
2983
3014
|
__publicField(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
|
2984
3015
|
__publicField(this, "zIndex");
|
@@ -3011,8 +3042,8 @@ let DropdownWidget = (_a13 = class {
|
|
3011
3042
|
}
|
3012
3043
|
// eslint-disable-next-line max-lines-per-function, complexity
|
3013
3044
|
drawWith(ctx, info, skeleton) {
|
3014
|
-
var
|
3015
|
-
const { primaryWithCoord, row, col, style, data, subUnitId } = info, _cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, rule = (
|
3045
|
+
var _a18, _b;
|
3046
|
+
const { primaryWithCoord, row, col, style, data, subUnitId } = info, _cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, rule = (_a18 = data.dataValidation) == null ? void 0 : _a18.rule, validator = (_b = data.dataValidation) == null ? void 0 : _b.validator, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {};
|
3016
3047
|
if (!rule || !validator || !validator || validator.id.indexOf(DataValidationType.LIST) !== 0 || !validator.skipDefaultFontRender(rule))
|
3017
3048
|
return;
|
3018
3049
|
const cellBounding = {
|
@@ -3053,8 +3084,8 @@ let DropdownWidget = (_a13 = class {
|
|
3053
3084
|
}
|
3054
3085
|
}
|
3055
3086
|
calcCellAutoHeight(info) {
|
3056
|
-
var
|
3057
|
-
const { primaryWithCoord, style, data } = info, _cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {}, rule = (
|
3087
|
+
var _a18;
|
3088
|
+
const { primaryWithCoord, style, data } = info, _cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {}, rule = (_a18 = data.dataValidation) == null ? void 0 : _a18.rule;
|
3058
3089
|
if (!rule || rule.renderMode === DataValidationRenderMode.TEXT)
|
3059
3090
|
return;
|
3060
3091
|
const cellBounding = {
|
@@ -3097,7 +3128,7 @@ let DropdownWidget = (_a13 = class {
|
|
3097
3128
|
};
|
3098
3129
|
this._commandService.executeCommand(ShowDataValidationDropdown.id, params);
|
3099
3130
|
}
|
3100
|
-
}, __name(
|
3131
|
+
}, __name(_a14, "DropdownWidget"), _a14);
|
3101
3132
|
DropdownWidget = __decorateClass$3([
|
3102
3133
|
__decorateParam$3(0, Inject(LocaleService)),
|
3103
3134
|
__decorateParam$3(1, ICommandService)
|
@@ -3136,8 +3167,8 @@ var __defProp$2 = Object.defineProperty, __getOwnPropDesc$2 = Object.getOwnPrope
|
|
3136
3167
|
for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--)
|
3137
3168
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
3138
3169
|
return kind && result && __defProp$2(target, key, result), result;
|
3139
|
-
}, "__decorateClass$2"), __decorateParam$2 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$2"),
|
3140
|
-
let SheetsDataValidationUIController = (
|
3170
|
+
}, "__decorateClass$2"), __decorateParam$2 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$2"), _a15;
|
3171
|
+
let SheetsDataValidationUIController = (_a15 = class extends RxDisposable {
|
3141
3172
|
constructor(_injector, _componentManger, _dataValidatorRegistryService) {
|
3142
3173
|
super(), this._injector = _injector, this._componentManger = _componentManger, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._initComponents(), this._registerValidatorViews();
|
3143
3174
|
}
|
@@ -3173,7 +3204,7 @@ let SheetsDataValidationUIController = (_a14 = class extends RxDisposable {
|
|
3173
3204
|
validator && (validator.formulaInput = view.formulaInput, validator.canvasRender = view.canvasRender, validator.dropdown = view.dropdown, validator.optionsInput = view.optionsInput);
|
3174
3205
|
});
|
3175
3206
|
}
|
3176
|
-
}, __name(
|
3207
|
+
}, __name(_a15, "SheetsDataValidationUIController"), _a15);
|
3177
3208
|
SheetsDataValidationUIController = __decorateClass$2([
|
3178
3209
|
__decorateParam$2(0, Inject(Injector)),
|
3179
3210
|
__decorateParam$2(1, Inject(ComponentManager)),
|
@@ -3185,8 +3216,8 @@ var __defProp$1 = Object.defineProperty, __getOwnPropDesc$1 = Object.getOwnPrope
|
|
3185
3216
|
return kind && result && __defProp$1(target, key, result), result;
|
3186
3217
|
}, "__decorateClass$1"), __decorateParam$1 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$1");
|
3187
3218
|
const PLUGIN_NAME$1 = "SHEET_DATA_VALIDATION_UI_PLUGIN";
|
3188
|
-
var
|
3189
|
-
let UniverSheetsDataValidationUIPlugin = (
|
3219
|
+
var _a16;
|
3220
|
+
let UniverSheetsDataValidationUIPlugin = (_a16 = class extends Plugin {
|
3190
3221
|
constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
|
3191
3222
|
super(), this._config = _config, this._injector = _injector, this._commandService = _commandService, this._configService = _configService;
|
3192
3223
|
const { menu, ...rest } = this._config;
|
@@ -3217,7 +3248,10 @@ let UniverSheetsDataValidationUIPlugin = (_a15 = class extends Plugin {
|
|
3217
3248
|
});
|
3218
3249
|
}
|
3219
3250
|
onReady() {
|
3220
|
-
this._injector.get(DataValidationCopyPasteController), this._injector.get(DataValidationPermissionController), this._injector.get(DataValidationRejectInputController), this._injector.get(DataValidationAlertController)
|
3251
|
+
this._injector.get(DataValidationCopyPasteController), this._injector.get(DataValidationPermissionController), this._injector.get(DataValidationRejectInputController), this._injector.get(DataValidationAlertController), this._injector.get(IRenderManagerService).registerRenderModule(
|
3252
|
+
UniverInstanceType.UNIVER_SHEET,
|
3253
|
+
[SheetsDataValidationReRenderController]
|
3254
|
+
);
|
3221
3255
|
}
|
3222
3256
|
onRendered() {
|
3223
3257
|
this._injector.get(SheetsDataValidationUIController), this._injector.get(SheetsDataValidationRenderController);
|
@@ -3225,7 +3259,7 @@ let UniverSheetsDataValidationUIPlugin = (_a15 = class extends Plugin {
|
|
3225
3259
|
onSteady() {
|
3226
3260
|
this._injector.get(DataValidationAutoFillController);
|
3227
3261
|
}
|
3228
|
-
}, __name(
|
3262
|
+
}, __name(_a16, "UniverSheetsDataValidationUIPlugin"), __publicField(_a16, "pluginName", PLUGIN_NAME$1), __publicField(_a16, "type", UniverInstanceType.UNIVER_SHEET), _a16);
|
3229
3263
|
UniverSheetsDataValidationUIPlugin = __decorateClass$1([
|
3230
3264
|
__decorateParam$1(1, Inject(Injector)),
|
3231
3265
|
__decorateParam$1(2, ICommandService),
|
@@ -3237,8 +3271,8 @@ var __defProp2 = Object.defineProperty, __getOwnPropDesc = Object.getOwnProperty
|
|
3237
3271
|
return kind && result && __defProp2(target, key, result), result;
|
3238
3272
|
}, "__decorateClass"), __decorateParam = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam");
|
3239
3273
|
const PLUGIN_NAME = "SHEET_DATA_VALIDATION_UI_PLUGIN";
|
3240
|
-
var
|
3241
|
-
let UniverSheetsDataValidationMobileUIPlugin = (
|
3274
|
+
var _a17;
|
3275
|
+
let UniverSheetsDataValidationMobileUIPlugin = (_a17 = class extends Plugin {
|
3242
3276
|
constructor(_config = defaultPluginConfig, _injector, _commandService, _configService) {
|
3243
3277
|
super(), this._config = _config, this._injector = _injector, this._commandService = _commandService, this._configService = _configService;
|
3244
3278
|
const { menu, ...rest } = this._config;
|
@@ -3268,7 +3302,10 @@ let UniverSheetsDataValidationMobileUIPlugin = (_a16 = class extends Plugin {
|
|
3268
3302
|
});
|
3269
3303
|
}
|
3270
3304
|
onReady() {
|
3271
|
-
this._injector.get(DataValidationCopyPasteController), this._injector.get(DataValidationPermissionController)
|
3305
|
+
this._injector.get(DataValidationCopyPasteController), this._injector.get(DataValidationPermissionController), this._injector.get(IRenderManagerService).registerRenderModule(
|
3306
|
+
UniverInstanceType.UNIVER_SHEET,
|
3307
|
+
[SheetsDataValidationReRenderController]
|
3308
|
+
);
|
3272
3309
|
}
|
3273
3310
|
onRendered() {
|
3274
3311
|
this._injector.get(SheetsDataValidationUIController), this._injector.get(SheetsDataValidationRenderController);
|
@@ -3276,7 +3313,7 @@ let UniverSheetsDataValidationMobileUIPlugin = (_a16 = class extends Plugin {
|
|
3276
3313
|
onSteady() {
|
3277
3314
|
this._injector.get(DataValidationAutoFillController);
|
3278
3315
|
}
|
3279
|
-
}, __name(
|
3316
|
+
}, __name(_a17, "UniverSheetsDataValidationMobileUIPlugin"), __publicField(_a17, "pluginName", PLUGIN_NAME), __publicField(_a17, "type", UniverInstanceType.UNIVER_SHEET), _a17);
|
3280
3317
|
UniverSheetsDataValidationMobileUIPlugin = __decorateClass([
|
3281
3318
|
__decorateParam(1, Inject(Injector)),
|
3282
3319
|
__decorateParam(2, ICommandService),
|