@univerjs/sheets-data-validation-ui 0.10.12-nightly.202510221114 → 0.10.12-nightly.202510251119

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/index.js CHANGED
@@ -1,40 +1,40 @@
1
1
  var Tr = Object.defineProperty;
2
- var Pr = (e, t, r) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var V = (e, t, r) => Pr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { Disposable as ye, UniverInstanceType as X, toDisposable as Ar, IUniverInstanceService as de, Inject as E, LocaleService as ce, DataValidationErrorStyle as lt, DataValidationStatus as Ze, ICommandService as ee, Injector as be, IConfigService as dn, DataValidationRenderMode as ae, DisposableCollection as Lr, dayjs as Nt, numfmt as $n, CellValueType as kr, CommandType as rt, DataValidationType as j, ObjectMatrix as It, Range as Nr, Rectangle as Rt, queryObjectMatrix as Gt, Optional as Ur, RxDisposable as cn, InterceptorEffectEnum as jn, sequenceExecute as Yn, bufferDebounceTime as Fr, debounce as xr, UndoCommand as Br, RedoCommand as Wr, isUnitRangesEqual as Hr, shallowEqual as yn, ThemeService as Xn, ColorKit as $r, isFormulaString as Ve, generateRandomId as bn, VerticalAlign as le, HorizontalAlign as Re, DEFAULT_STYLES as Q, WrapStrategy as fe, Plugin as Zn, merge as Kn, DependentOn as jr } from "@univerjs/core";
5
- import { DeviceInputEventType as pt, IRenderManagerService as Fe, fixLineWidthByScale as Mn, Transform as Yr, CheckboxShape as Xr, getCurrentTypeOfRenderer as Ke, CURSOR_TYPE as ze, FontCache as Zr, Shape as Kr, Rect as zn, getFontStyleString as Oe, DocSimpleSkeleton as it, Text as En } from "@univerjs/engine-render";
6
- import { SheetInterceptorService as un, VALIDATE_CELL as zr, SheetsSelectionsService as Gn, SetRangeValuesCommand as st, getSheetCommandTarget as qn, rangeToDiscreteRange as Gr, SheetPermissionCheckController as qr, WorksheetEditPermission as qt, WorksheetSetCellStylePermission as Jt, RangeProtectionPermissionEditPoint as Qt, WorkbookEditablePermission as en, INTERCEPTOR_POINT as Jn, InterceptCellContentPriority as Qn, checkRangesEditablePermission as Jr } from "@univerjs/sheets";
7
- import { SheetDataValidationModel as ie, SheetsDataValidationValidatorService as Qr, getDataValidationCellValue as Ut, getCellValueOrigin as re, serializeListOptions as er, createDefaultNewRule as tr, AddSheetDataValidationCommand as hn, DATA_VALIDATION_PLUGIN_NAME as nr, getDataValidationDiffMutations as tn, UpdateSheetDataValidationRangeCommand as rr, DataValidationCacheService as ir, UpdateSheetDataValidationSettingCommand as Dn, UpdateSheetDataValidationOptionsCommand as ei, RemoveSheetDataValidationCommand as or, RemoveSheetAllDataValidationCommand as ti, DataValidationFormulaController as ni, deserializeListOptions as ri, CUSTOM_FORMULA_INPUT_NAME as ar, BASE_FORMULA_INPUT_NAME as Pt, LIST_FORMULA_INPUT_NAME as gn, CHECKBOX_FORMULA_INPUT_NAME as sr, DataValidationFormulaService as ii, CHECKBOX_FORMULA_2 as oi, CHECKBOX_FORMULA_1 as ai, getFormulaResult as Ft, isLegalFormulaResult as Vn, transformCheckboxValue as si, UniverSheetsDataValidationPlugin as li } from "@univerjs/sheets-data-validation";
8
- import { DataValidatorRegistryService as Me, DataValidatorDropdownType as pe, DataValidationModel as pn, DataValidatorRegistryScope as di, TWO_FORMULA_OPERATOR_COUNT as ci, getRuleOptions as On, getRuleSetting as Tn } from "@univerjs/data-validation";
9
- import { ISidebarService as lr, IDialogService as ui, IZenZoneService as dr, KeyCode as vt, MenuItemType as vn, getMenuHiddenObservable as hi, RibbonDataGroup as gi, IMenuManagerService as pi, useDependency as F, ComponentManager as fn, useObservable as Pe, useEvent as nn, useSidebarClick as cr } from "@univerjs/ui";
10
- import { filter as mn, BehaviorSubject as Pn, distinctUntilChanged as vi, Subject as fi, debounceTime as ur, bufferTime as hr, of as mi } from "rxjs";
11
- import { getPatternType as _i } from "@univerjs/sheets-numfmt";
12
- import { ISheetCellDropdownManagerService as Si, IEditorBridgeService as gr, SetCellEditVisibleOperation as ft, HoverManagerService as Ci, CellAlertManagerService as wi, CellAlertType as Ii, IAutoFillService as Ri, APPLY_TYPE as ot, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as yi, ISheetClipboardService as bi, COPY_TYPE as An, PREDEFINED_HOOK_NAME as mt, getRepeatRange as Ln, getCurrentRangeDisable$ as Mi, AutoHeightController as pr, SheetSkeletonManagerService as dt, IMarkSelectionService as Ei } from "@univerjs/sheets-ui";
13
- import { Button as Ge, FormLayout as Y, RadioGroup as _n, Radio as Ae, Checkbox as At, Input as Le, Select as kn, clsx as Ne, borderClassName as yt, DraggableList as Di, Dropdown as Vi } from "@univerjs/design";
14
- import { createElement as Ie, forwardRef as xe, useRef as gt, useState as H, useMemo as ct, useEffect as ke } from "react";
15
- import { jsxs as $, Fragment as ut, jsx as S } from "react/jsx-runtime";
16
- import { deserializeRangeWithSheet as Oi, serializeRange as vr } from "@univerjs/engine-formula";
17
- import { RangeSelector as Ti, FormulaEditor as fr } from "@univerjs/sheets-formula-ui";
18
- var Pi = Object.getOwnPropertyDescriptor, Ai = (e, t, r, n) => {
19
- for (var i = n > 1 ? void 0 : n ? Pi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
20
- (a = e[o]) && (i = a(i) || i);
21
- return i;
22
- }, Nn = (e, t) => (r, n) => t(r, n, e);
23
- let me = class extends ye {
24
- constructor(t, r) {
2
+ var Or = (e, t, n) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var V = (e, t, n) => Or(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { Disposable as Re, UniverInstanceType as X, toDisposable as Ar, IUniverInstanceService as le, Inject as E, LocaleService as de, DataValidationErrorStyle as st, DataValidationStatus as Ye, ICommandService as ee, Injector as ye, IConfigService as ln, DataValidationRenderMode as ae, DisposableCollection as Pr, dayjs as kt, numfmt as Wn, CellValueType as Lr, CommandType as tt, DataValidationType as j, ObjectMatrix as wt, Range as kr, Rectangle as It, queryObjectMatrix as Gt, Optional as Nr, RxDisposable as dn, InterceptorEffectEnum as Hn, sequenceExecute as jn, bufferDebounceTime as Ur, debounce as Fr, UndoCommand as $r, RedoCommand as xr, isUnitRangesEqual as Br, shallowEqual as Rn, ThemeService as Yn, ColorKit as Wr, isFormulaString as De, generateRandomId as yn, VerticalAlign as se, HorizontalAlign as Ie, DEFAULT_STYLES as Q, WrapStrategy as ve, Plugin as Xn, merge as Zn, DependentOn as Hr } from "@univerjs/core";
5
+ import { DeviceInputEventType as pt, IRenderManagerService as Ue, fixLineWidthByScale as Mn, Transform as jr, CheckboxShape as Yr, getCurrentTypeOfRenderer as Xe, CURSOR_TYPE as Ze, FontCache as Xr, Shape as Zr, Rect as Kn, getFontStyleString as Ve, DocSimpleSkeleton as rt, Text as bn } from "@univerjs/engine-render";
6
+ import { SheetInterceptorService as cn, VALIDATE_CELL as Kr, SheetsSelectionsService as Gn, SetRangeValuesCommand as at, getSheetCommandTarget as zn, rangeToDiscreteRange as Gr, SheetPermissionCheckController as zr, WorksheetEditPermission as zt, WorksheetSetCellStylePermission as qt, RangeProtectionPermissionEditPoint as Jt, WorkbookEditablePermission as Qt, INTERCEPTOR_POINT as qn, InterceptCellContentPriority as Jn, checkRangesEditablePermission as qr } from "@univerjs/sheets";
7
+ import { SheetDataValidationModel as oe, SheetsDataValidationValidatorService as Jr, getDataValidationCellValue as Nt, getCellValueOrigin as re, serializeListOptions as Qn, createDefaultNewRule as er, AddSheetDataValidationCommand as un, DATA_VALIDATION_PLUGIN_NAME as tr, getDataValidationDiffMutations as en, UpdateSheetDataValidationRangeCommand as nr, DataValidationCacheService as rr, UpdateSheetDataValidationSettingCommand as En, UpdateSheetDataValidationOptionsCommand as Qr, RemoveSheetDataValidationCommand as or, RemoveSheetAllDataValidationCommand as eo, DataValidationFormulaController as to, deserializeListOptions as no, CUSTOM_FORMULA_INPUT_NAME as ir, BASE_FORMULA_INPUT_NAME as Ot, LIST_FORMULA_INPUT_NAME as hn, CHECKBOX_FORMULA_INPUT_NAME as ar, DataValidationFormulaService as ro, CHECKBOX_FORMULA_2 as oo, CHECKBOX_FORMULA_1 as io, getFormulaResult as Ut, isLegalFormulaResult as Dn, transformCheckboxValue as ao, UniverSheetsDataValidationPlugin as so } from "@univerjs/sheets-data-validation";
8
+ import { DataValidatorRegistryService as Me, DataValidatorDropdownType as pe, DataValidationModel as pn, DataValidatorRegistryScope as lo, TWO_FORMULA_OPERATOR_COUNT as co, getRuleOptions as Vn, getRuleSetting as Tn } from "@univerjs/data-validation";
9
+ import { ISidebarService as sr, IDialogService as uo, IZenZoneService as lr, KeyCode as gt, MenuItemType as gn, getMenuHiddenObservable as ho, RibbonDataGroup as po, IMenuManagerService as go, useDependency as F, ComponentManager as vn, useObservable as Oe, useEvent as tn, useSidebarClick as dr } from "@univerjs/ui";
10
+ import { filter as mn, BehaviorSubject as On, distinctUntilChanged as vo, Subject as mo, debounceTime as cr, bufferTime as ur, of as fo } from "rxjs";
11
+ import { getPatternType as _o } from "@univerjs/sheets-numfmt";
12
+ import { ISheetCellDropdownManagerService as Co, IEditorBridgeService as hr, SetCellEditVisibleOperation as vt, HoverManagerService as So, CellAlertManagerService as wo, CellAlertType as Io, IAutoFillService as Ro, APPLY_TYPE as ot, virtualizeDiscreteRanges as nn, getAutoFillRepeatRange as yo, ISheetClipboardService as Mo, COPY_TYPE as An, PREDEFINED_HOOK_NAME as mt, getRepeatRange as Pn, getCurrentRangeDisable$ as bo, AutoHeightController as pr, SheetSkeletonManagerService as lt, IMarkSelectionService as Eo } from "@univerjs/sheets-ui";
13
+ import { Button as Ke, FormLayout as Y, RadioGroup as fn, Radio as Ae, Checkbox as At, Input as Pe, Select as Ln, clsx as ke, borderClassName as Rt, DraggableList as Do, Dropdown as Vo } from "@univerjs/design";
14
+ import { createElement as we, useRef as ht, forwardRef as nt, useState as W, useMemo as dt, useEffect as Le } from "react";
15
+ import { jsxs as H, Fragment as ct, jsx as C } from "react/jsx-runtime";
16
+ import { deserializeRangeWithSheet as To, serializeRange as gr } from "@univerjs/engine-formula";
17
+ import { RangeSelector as Oo, FormulaEditor as vr } from "@univerjs/sheets-formula-ui";
18
+ var Ao = Object.getOwnPropertyDescriptor, Po = (e, t, n, r) => {
19
+ for (var o = r > 1 ? void 0 : r ? Ao(t, n) : t, i = e.length - 1, a; i >= 0; i--)
20
+ (a = e[i]) && (o = a(o) || o);
21
+ return o;
22
+ }, kn = (e, t) => (n, r) => t(n, r, e);
23
+ let me = class extends Re {
24
+ constructor(t, n) {
25
25
  super();
26
- V(this, "_open$", new Pn(!1));
27
- V(this, "open$", this._open$.pipe(vi()));
26
+ V(this, "_open$", new On(!1));
27
+ V(this, "open$", this._open$.pipe(vo()));
28
28
  V(this, "_activeRule");
29
- V(this, "_activeRule$", new Pn(void 0));
29
+ V(this, "_activeRule$", new On(void 0));
30
30
  V(this, "activeRule$", this._activeRule$.asObservable());
31
31
  V(this, "_closeDisposable", null);
32
- this._univerInstanceService = t, this._sidebarService = r, this.disposeWithMe(
33
- this._univerInstanceService.getCurrentTypeOfUnit$(X.UNIVER_SHEET).pipe(mn((n) => !n)).subscribe(() => {
32
+ this._univerInstanceService = t, this._sidebarService = n, this.disposeWithMe(
33
+ this._univerInstanceService.getCurrentTypeOfUnit$(X.UNIVER_SHEET).pipe(mn((r) => !r)).subscribe(() => {
34
34
  this.close();
35
35
  })
36
- ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((n) => {
37
- n.id === Mt && (n.visible || setTimeout(() => {
36
+ ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((r) => {
37
+ r.id === Mt && (r.visible || setTimeout(() => {
38
38
  this._sidebarService.sidebarOptions$.next({ visible: !1 });
39
39
  }));
40
40
  }));
@@ -65,43 +65,43 @@ let me = class extends ye {
65
65
  this._activeRule = t, this._activeRule$.next(t);
66
66
  }
67
67
  };
68
- me = Ai([
69
- Nn(0, de),
70
- Nn(1, lr)
68
+ me = Po([
69
+ kn(0, le),
70
+ kn(1, sr)
71
71
  ], me);
72
- const Te = "#ECECEC", Sn = "sheets-data-validation-ui.config", bt = {};
73
- var Li = Object.getOwnPropertyDescriptor, ki = (e, t, r, n) => {
74
- for (var i = n > 1 ? void 0 : n ? Li(t, r) : t, o = e.length - 1, a; o >= 0; o--)
75
- (a = e[o]) && (i = a(i) || i);
76
- return i;
77
- }, He = (e, t) => (r, n) => t(r, n, e);
78
- let qe = class extends ye {
79
- constructor(e, t, r, n, i, o) {
80
- super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = r, this._dialogService = n, this._localeService = i, this._sheetsDataValidationValidatorService = o, this._initEditorBridgeInterceptor();
72
+ const Te = "#ECECEC", _n = "sheets-data-validation-ui.config", yt = {};
73
+ var Lo = Object.getOwnPropertyDescriptor, ko = (e, t, n, r) => {
74
+ for (var o = r > 1 ? void 0 : r ? Lo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
75
+ (a = e[i]) && (o = a(o) || o);
76
+ return o;
77
+ }, xe = (e, t) => (n, r) => t(n, r, e);
78
+ let Ge = class extends Re {
79
+ constructor(e, t, n, r, o, i) {
80
+ super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = n, this._dialogService = r, this._localeService = o, this._sheetsDataValidationValidatorService = i, this._initEditorBridgeInterceptor();
81
81
  }
82
82
  _initEditorBridgeInterceptor() {
83
83
  this.disposeWithMe(this._sheetInterceptorService.writeCellInterceptor.intercept(
84
- zr,
84
+ Kr,
85
85
  {
86
- handler: async (e, t, r) => {
87
- const n = await e, { row: i, col: o, unitId: a, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(a, l, i, o), d = s ? this._dataValidationModel.getRuleById(a, l, s) : void 0;
88
- if (n === !1)
89
- return r(Promise.resolve(!1));
90
- if (!d || d.errorStyle !== lt.STOP)
91
- return r(Promise.resolve(!0));
86
+ handler: async (e, t, n) => {
87
+ const r = await e, { row: o, col: i, unitId: a, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(a, l, o, i), d = s ? this._dataValidationModel.getRuleById(a, l, s) : void 0;
88
+ if (r === !1)
89
+ return n(Promise.resolve(!1));
90
+ if (!d || d.errorStyle !== st.STOP)
91
+ return n(Promise.resolve(!0));
92
92
  const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
93
- return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, i, o) === Ze.VALID ? r(Promise.resolve(!0)) : (this._dialogService.open({
93
+ return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, o, i) === Ye.VALID ? n(Promise.resolve(!0)) : (this._dialogService.open({
94
94
  width: 368,
95
95
  title: {
96
96
  title: this._localeService.t("dataValidation.alert.title")
97
97
  },
98
98
  id: "reject-input-dialog",
99
99
  children: {
100
- title: u.getRuleFinalError(d, { row: i, col: o, unitId: a, subUnitId: l })
100
+ title: u.getRuleFinalError(d, { row: o, col: i, unitId: a, subUnitId: l })
101
101
  },
102
102
  footer: {
103
- title: Ie(
104
- Ge,
103
+ title: we(
104
+ Ke,
105
105
  {
106
106
  variant: "primary",
107
107
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -112,7 +112,7 @@ let qe = class extends ye {
112
112
  onClose: () => {
113
113
  this._dialogService.close("reject-input-dialog");
114
114
  }
115
- }), r(Promise.resolve(!1)));
115
+ }), n(Promise.resolve(!1)));
116
116
  }
117
117
  }
118
118
  ));
@@ -128,8 +128,8 @@ let qe = class extends ye {
128
128
  title: e
129
129
  },
130
130
  footer: {
131
- title: Ie(
132
- Ge,
131
+ title: we(
132
+ Ke,
133
133
  {
134
134
  variant: "primary",
135
135
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -143,32 +143,32 @@ let qe = class extends ye {
143
143
  });
144
144
  }
145
145
  };
146
- qe = ki([
147
- He(0, E(un)),
148
- He(1, E(ie)),
149
- He(2, E(Me)),
150
- He(3, ui),
151
- He(4, E(ce)),
152
- He(5, E(Qr))
153
- ], qe);
154
- var Ni = Object.getOwnPropertyDescriptor, Ui = (e, t, r, n) => {
155
- for (var i = n > 1 ? void 0 : n ? Ni(t, r) : t, o = e.length - 1, a; o >= 0; o--)
156
- (a = e[o]) && (i = a(i) || i);
157
- return i;
158
- }, he = (e, t) => (r, n) => t(r, n, e);
159
- const xt = (e) => {
146
+ Ge = ko([
147
+ xe(0, E(cn)),
148
+ xe(1, E(oe)),
149
+ xe(2, E(Me)),
150
+ xe(3, uo),
151
+ xe(4, E(de)),
152
+ xe(5, E(Jr))
153
+ ], Ge);
154
+ var No = Object.getOwnPropertyDescriptor, Uo = (e, t, n, r) => {
155
+ for (var o = r > 1 ? void 0 : r ? No(t, n) : t, i = e.length - 1, a; i >= 0; i--)
156
+ (a = e[i]) && (o = a(o) || o);
157
+ return o;
158
+ }, ue = (e, t) => (n, r) => t(n, r, e);
159
+ const Ft = (e) => {
160
160
  if (e == null || typeof e == "boolean")
161
161
  return;
162
- if (e === "") return Nt();
162
+ if (e === "") return kt();
163
163
  if (typeof e == "number" || !Number.isNaN(+e))
164
- return Nt($n.format("yyyy-MM-dd HH:mm:ss", Number(e)));
165
- const t = Nt(e);
164
+ return kt(Wn.format("yyyy-MM-dd HH:mm:ss", Number(e)));
165
+ const t = kt(e);
166
166
  if (t.isValid())
167
167
  return t;
168
168
  };
169
- function Fi(e, t) {
170
- const r = _i(t);
171
- if (e === r)
169
+ function Fo(e, t) {
170
+ const n = _o(t);
171
+ if (e === n)
172
172
  return t;
173
173
  switch (e) {
174
174
  case "datetime":
@@ -179,15 +179,15 @@ function Fi(e, t) {
179
179
  return "HH:mm:ss";
180
180
  }
181
181
  }
182
- let Ue = class extends ye {
183
- constructor(t, r, n, i, o, a, l, s, d, u, g) {
182
+ let Ne = class extends Re {
183
+ constructor(t, n, r, o, i, a, l, s, d, u, p) {
184
184
  super();
185
185
  V(this, "_activeDropdown");
186
- V(this, "_activeDropdown$", new fi());
186
+ V(this, "_activeDropdown$", new mo());
187
187
  V(this, "_currentPopup", null);
188
188
  V(this, "activeDropdown$", this._activeDropdown$.asObservable());
189
189
  V(this, "_zenVisible", !1);
190
- this._univerInstanceService = t, this._dataValidatorRegistryService = r, this._zenZoneService = n, this._dataValidationModel = i, this._sheetsSelectionsService = o, this._cellDropdownManagerService = a, this._sheetDataValidationModel = l, this._commandService = s, this._editorBridgeService = d, this._injector = u, this._configService = g, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
190
+ this._univerInstanceService = t, this._dataValidatorRegistryService = n, this._zenZoneService = r, this._dataValidationModel = o, this._sheetsSelectionsService = i, this._cellDropdownManagerService = a, this._sheetDataValidationModel = l, this._commandService = s, this._editorBridgeService = d, this._injector = u, this._configService = p, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
191
191
  this._activeDropdown$.complete();
192
192
  });
193
193
  }
@@ -199,14 +199,14 @@ let Ue = class extends ye {
199
199
  this._zenVisible = t, t && this.hideDropdown();
200
200
  }));
201
201
  }
202
- _getDropdownByCell(t, r, n, i) {
203
- const o = t ? this._univerInstanceService.getUnit(t, X.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(X.UNIVER_SHEET);
204
- if (!o)
202
+ _getDropdownByCell(t, n, r, o) {
203
+ const i = t ? this._univerInstanceService.getUnit(t, X.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(X.UNIVER_SHEET);
204
+ if (!i)
205
205
  return;
206
- const a = r ? o.getSheetBySheetId(r) : o.getActiveSheet();
206
+ const a = n ? i.getSheetBySheetId(n) : i.getActiveSheet();
207
207
  if (!a)
208
208
  return;
209
- const l = this._dataValidationModel.getRuleByLocation(o.getUnitId(), a.getSheetId(), n, i);
209
+ const l = this._dataValidationModel.getRuleByLocation(i.getUnitId(), a.getSheetId(), r, o);
210
210
  if (!l)
211
211
  return;
212
212
  const s = this._dataValidatorRegistryService.getValidatorItem(l.type);
@@ -214,46 +214,46 @@ let Ue = class extends ye {
214
214
  }
215
215
  _initSelectionChange() {
216
216
  this.disposeWithMe(this._sheetsSelectionsService.selectionMoveEnd$.subscribe((t) => {
217
- t && t.every((r) => !(r.primary && this._getDropdownByCell(r.primary.unitId, r.primary.sheetId, r.primary.actualRow, r.primary.actualColumn))) && this.hideDropdown();
217
+ t && t.every((n) => !(n.primary && this._getDropdownByCell(n.primary.unitId, n.primary.sheetId, n.primary.actualRow, n.primary.actualColumn))) && this.hideDropdown();
218
218
  }));
219
219
  }
220
220
  // eslint-disable-next-line max-lines-per-function, complexity
221
221
  showDropdown(t) {
222
- var M, y, w, C;
223
- const { location: r } = t, { row: n, col: i, unitId: o, subUnitId: a, workbook: l, worksheet: s } = r;
222
+ var b, y, w, S;
223
+ const { location: n } = t, { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = n;
224
224
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
225
225
  return;
226
226
  this._activeDropdown = t, this._activeDropdown$.next(this._activeDropdown);
227
- const d = this._sheetDataValidationModel.getRuleByLocation(o, a, n, i);
227
+ const d = this._sheetDataValidationModel.getRuleByLocation(i, a, r, o);
228
228
  if (!d)
229
229
  return;
230
230
  const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
231
231
  if (!(u != null && u.dropdownType))
232
232
  return;
233
- let g;
234
- const c = async (p, I) => {
235
- var D, T, k;
236
- if (!p)
233
+ let p;
234
+ const c = async (g, I) => {
235
+ var D, O, k;
236
+ if (!g)
237
237
  return !0;
238
- const _ = p, v = s.getCell(n, i), R = _.format(I === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), A = (D = $n.parseDate(R)) == null ? void 0 : D.v, N = I === "time" ? A % 1 : A, O = l.getStyles().getStyleByCell(v), L = (k = (T = O == null ? void 0 : O.n) == null ? void 0 : T.pattern) != null ? k : "";
239
- return d.errorStyle !== lt.STOP || await u.validator({
238
+ const _ = g, v = s.getCell(r, o), R = _.format(I === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), P = (D = Wn.parseDate(R)) == null ? void 0 : D.v, N = I === "time" ? P % 1 : P, T = l.getStyles().getStyleByCell(v), L = (k = (O = T == null ? void 0 : T.n) == null ? void 0 : O.pattern) != null ? k : "";
239
+ return d.errorStyle !== st.STOP || await u.validator({
240
240
  value: N,
241
- unitId: o,
241
+ unitId: i,
242
242
  subUnitId: a,
243
- row: n,
244
- column: i,
243
+ row: r,
244
+ column: o,
245
245
  worksheet: s,
246
246
  workbook: l,
247
247
  interceptValue: R.replace("Z", "").replace("T", " "),
248
- t: kr.NUMBER
249
- }, d) ? (await this._commandService.executeCommand(st.id, {
250
- unitId: o,
248
+ t: Lr.NUMBER
249
+ }, d) ? (await this._commandService.executeCommand(at.id, {
250
+ unitId: i,
251
251
  subUnitId: a,
252
252
  range: {
253
- startColumn: i,
254
- endColumn: i,
255
- startRow: n,
256
- endRow: n
253
+ startColumn: o,
254
+ endColumn: o,
255
+ startRow: r,
256
+ endRow: r
257
257
  },
258
258
  value: {
259
259
  v: N,
@@ -263,23 +263,23 @@ let Ue = class extends ye {
263
263
  si: null,
264
264
  s: {
265
265
  n: {
266
- pattern: Fi(I, L)
266
+ pattern: Fo(I, L)
267
267
  }
268
268
  }
269
269
  }
270
- }), await this._commandService.executeCommand(ft.id, {
270
+ }), await this._commandService.executeCommand(vt.id, {
271
271
  visible: !1,
272
272
  eventType: pt.Keyboard,
273
- unitId: o,
274
- keycode: vt.ESC
275
- }), !0) : (this._injector.has(qe) && this._injector.get(qe).showReject(u.getRuleFinalError(d, { row: n, col: i, unitId: o, subUnitId: a })), !1);
273
+ unitId: i,
274
+ keycode: gt.ESC
275
+ }), !0) : (this._injector.has(Ge) && this._injector.get(Ge).showReject(u.getRuleFinalError(d, { row: r, col: o, unitId: i, subUnitId: a })), !1);
276
276
  };
277
- let f;
277
+ let m;
278
278
  switch (u.dropdownType) {
279
279
  case pe.DATE: {
280
- const p = re(s.getCellRaw(n, i)), I = xt(p), _ = !!((M = d.bizInfo) != null && M.showTime);
281
- f = {
282
- location: r,
280
+ const g = re(s.getCellRaw(r, o)), I = Ft(g), _ = !!((b = d.bizInfo) != null && b.showTime);
281
+ m = {
282
+ location: n,
283
283
  type: "datepicker",
284
284
  props: {
285
285
  showTime: _,
@@ -291,9 +291,9 @@ let Ue = class extends ye {
291
291
  break;
292
292
  }
293
293
  case pe.TIME: {
294
- const p = re(s.getCellRaw(n, i)), I = xt(p);
295
- f = {
296
- location: r,
294
+ const g = re(s.getCellRaw(r, o)), I = Ft(g);
295
+ m = {
296
+ location: n,
297
297
  type: "datepicker",
298
298
  props: {
299
299
  onChange: (_) => c(_, "time"),
@@ -304,9 +304,9 @@ let Ue = class extends ye {
304
304
  break;
305
305
  }
306
306
  case pe.DATETIME: {
307
- const p = re(s.getCellRaw(n, i)), I = xt(p);
308
- f = {
309
- location: r,
307
+ const g = re(s.getCellRaw(r, o)), I = Ft(g);
308
+ m = {
309
+ location: n,
310
310
  type: "datepicker",
311
311
  props: {
312
312
  onChange: (_) => c(_, "datetime"),
@@ -318,15 +318,15 @@ let Ue = class extends ye {
318
318
  }
319
319
  case pe.LIST:
320
320
  case pe.MULTIPLE_LIST: {
321
- const p = u.dropdownType === pe.MULTIPLE_LIST, I = async (O) => {
322
- const L = er(O), D = {
323
- unitId: o,
321
+ const g = u.dropdownType === pe.MULTIPLE_LIST, I = async (T) => {
322
+ const L = Qn(T), D = {
323
+ unitId: i,
324
324
  subUnitId: a,
325
325
  range: {
326
- startColumn: i,
327
- endColumn: i,
328
- startRow: n,
329
- endRow: n
326
+ startColumn: o,
327
+ endColumn: o,
328
+ startRow: r,
329
+ endRow: r
330
330
  },
331
331
  value: {
332
332
  v: L,
@@ -335,48 +335,48 @@ let Ue = class extends ye {
335
335
  si: null
336
336
  }
337
337
  };
338
- return this._commandService.executeCommand(st.id, D), this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(ft.id, {
338
+ return this._commandService.executeCommand(at.id, D), this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(vt.id, {
339
339
  visible: !1,
340
340
  eventType: pt.Keyboard,
341
- unitId: o,
342
- keycode: vt.ESC
343
- }), !p;
344
- }, _ = (d == null ? void 0 : d.renderMode) === ae.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, v = u.getListWithColor(d, o, a), R = Ut(s.getCellRaw(n, i)), A = () => {
345
- this._commandService.executeCommand(Be.id, {
341
+ unitId: i,
342
+ keycode: gt.ESC
343
+ }), !g;
344
+ }, _ = (d == null ? void 0 : d.renderMode) === ae.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, v = u.getListWithColor(d, i, a), R = Nt(s.getCellRaw(r, o)), P = () => {
345
+ this._commandService.executeCommand(Fe.id, {
346
346
  ruleId: d.uid
347
- }), g == null || g.dispose();
348
- }, N = v.map((O) => ({
349
- label: O.label,
350
- value: O.label,
351
- color: _ || O.color ? O.color || Te : "transparent"
347
+ }), p == null || p.dispose();
348
+ }, N = v.map((T) => ({
349
+ label: T.label,
350
+ value: T.label,
351
+ color: _ || T.color ? T.color || Te : "transparent"
352
352
  }));
353
- f = {
354
- location: r,
353
+ m = {
354
+ location: n,
355
355
  type: "list",
356
356
  props: {
357
- onChange: (O) => I(O),
357
+ onChange: (T) => I(T),
358
358
  options: N,
359
- onEdit: A,
359
+ onEdit: P,
360
360
  defaultValue: R,
361
- multiple: p,
362
- showEdit: (w = (y = this._configService.getConfig(Sn)) == null ? void 0 : y.showEditOnDropdown) != null ? w : !0
361
+ multiple: g,
362
+ showEdit: (w = (y = this._configService.getConfig(_n)) == null ? void 0 : y.showEditOnDropdown) != null ? w : !0
363
363
  }
364
364
  };
365
365
  break;
366
366
  }
367
367
  case pe.CASCADE: {
368
- f = {
368
+ m = {
369
369
  type: "cascader",
370
370
  props: {
371
371
  onChange: (I) => {
372
372
  const _ = {
373
- unitId: o,
373
+ unitId: i,
374
374
  subUnitId: a,
375
375
  range: {
376
- startColumn: i,
377
- endColumn: i,
378
- startRow: n,
379
- endRow: n
376
+ startColumn: o,
377
+ endColumn: o,
378
+ startRow: r,
379
+ endRow: r
380
380
  },
381
381
  value: {
382
382
  v: I.join("/"),
@@ -385,33 +385,33 @@ let Ue = class extends ye {
385
385
  si: null
386
386
  }
387
387
  };
388
- return this._commandService.syncExecuteCommand(st.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(ft.id, {
388
+ return this._commandService.syncExecuteCommand(at.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(vt.id, {
389
389
  visible: !1,
390
390
  eventType: pt.Keyboard,
391
- unitId: o,
392
- keycode: vt.ESC
391
+ unitId: i,
392
+ keycode: gt.ESC
393
393
  }), !0;
394
394
  },
395
- defaultValue: Ut(s.getCellRaw(n, i)).split("/"),
396
- options: JSON.parse((C = d.formula1) != null ? C : "[]")
395
+ defaultValue: Nt(s.getCellRaw(r, o)).split("/"),
396
+ options: JSON.parse((S = d.formula1) != null ? S : "[]")
397
397
  },
398
- location: r
398
+ location: n
399
399
  };
400
400
  break;
401
401
  }
402
402
  case pe.COLOR: {
403
- f = {
403
+ m = {
404
404
  type: "color",
405
405
  props: {
406
406
  onChange: (I) => {
407
407
  const _ = {
408
- unitId: o,
408
+ unitId: i,
409
409
  subUnitId: a,
410
410
  range: {
411
- startColumn: i,
412
- endColumn: i,
413
- startRow: n,
414
- endRow: n
411
+ startColumn: o,
412
+ endColumn: o,
413
+ startRow: r,
414
+ endRow: r
415
415
  },
416
416
  value: {
417
417
  v: I,
@@ -420,48 +420,48 @@ let Ue = class extends ye {
420
420
  si: null
421
421
  }
422
422
  };
423
- return this._commandService.syncExecuteCommand(st.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(ft.id, {
423
+ return this._commandService.syncExecuteCommand(at.id, _), this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(vt.id, {
424
424
  visible: !1,
425
425
  eventType: pt.Keyboard,
426
- unitId: o,
427
- keycode: vt.ESC
426
+ unitId: i,
427
+ keycode: gt.ESC
428
428
  }), !0;
429
429
  },
430
- defaultValue: Ut(s.getCellRaw(n, i))
430
+ defaultValue: Nt(s.getCellRaw(r, o))
431
431
  },
432
- location: r
432
+ location: n
433
433
  };
434
434
  break;
435
435
  }
436
436
  default:
437
437
  throw new Error("[DataValidationDropdownManagerService]: unknown type!");
438
438
  }
439
- if (g = this._cellDropdownManagerService.showDropdown({
440
- ...f,
439
+ if (p = this._cellDropdownManagerService.showDropdown({
440
+ ...m,
441
441
  onHide: () => {
442
442
  this._activeDropdown = null, this._activeDropdown$.next(null);
443
443
  }
444
- }), !g)
444
+ }), !p)
445
445
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
446
- const h = new Lr();
447
- h.add(g), h.add({
446
+ const h = new Pr();
447
+ h.add(p), h.add({
448
448
  dispose: () => {
449
- var p, I;
450
- (I = (p = this._activeDropdown) == null ? void 0 : p.onHide) == null || I.call(p);
449
+ var g, I;
450
+ (I = (g = this._activeDropdown) == null ? void 0 : g.onHide) == null || I.call(g);
451
451
  }
452
452
  }), this._currentPopup = h;
453
453
  }
454
454
  hideDropdown() {
455
455
  this._activeDropdown && (this._currentPopup && this._currentPopup.dispose(), this._currentPopup = null, this._activeDropdown = null, this._activeDropdown$.next(null));
456
456
  }
457
- showDataValidationDropdown(t, r, n, i, o) {
457
+ showDataValidationDropdown(t, n, r, o, i) {
458
458
  const a = this._univerInstanceService.getUnit(t, X.UNIVER_SHEET);
459
459
  if (!a)
460
460
  return;
461
- const l = a.getSheetBySheetId(r);
461
+ const l = a.getSheetBySheetId(n);
462
462
  if (!l)
463
463
  return;
464
- const s = this._dataValidationModel.getRuleByLocation(a.getUnitId(), l.getSheetId(), n, i);
464
+ const s = this._dataValidationModel.getRuleByLocation(a.getUnitId(), l.getSheetId(), r, o);
465
465
  if (!s)
466
466
  return;
467
467
  const d = this._dataValidatorRegistryService.getValidatorItem(s.type);
@@ -473,195 +473,195 @@ let Ue = class extends ye {
473
473
  location: {
474
474
  workbook: a,
475
475
  worksheet: l,
476
- row: n,
477
- col: i,
476
+ row: r,
477
+ col: o,
478
478
  unitId: t,
479
- subUnitId: r
479
+ subUnitId: n
480
480
  },
481
- onHide: o
481
+ onHide: i
482
482
  });
483
483
  }
484
484
  };
485
- Ue = Ui([
486
- he(0, de),
487
- he(1, E(Me)),
488
- he(2, dr),
489
- he(3, E(ie)),
490
- he(4, E(Gn)),
491
- he(5, E(Si)),
492
- he(6, E(ie)),
493
- he(7, ee),
494
- he(8, gr),
495
- he(9, E(be)),
496
- he(10, dn)
497
- ], Ue);
498
- const Mt = "DataValidationPanel", Be = {
485
+ Ne = Uo([
486
+ ue(0, le),
487
+ ue(1, E(Me)),
488
+ ue(2, lr),
489
+ ue(3, E(oe)),
490
+ ue(4, E(Gn)),
491
+ ue(5, E(Co)),
492
+ ue(6, E(oe)),
493
+ ue(7, ee),
494
+ ue(8, hr),
495
+ ue(9, E(ye)),
496
+ ue(10, ln)
497
+ ], Ne);
498
+ const Mt = "DataValidationPanel", Fe = {
499
499
  id: "data-validation.operation.open-validation-panel",
500
- type: rt.OPERATION,
500
+ type: tt.OPERATION,
501
501
  handler(e, t) {
502
502
  if (!t)
503
503
  return !1;
504
- const { ruleId: r, isAdd: n } = t, i = e.get(me), o = e.get(pn), a = e.get(de), l = e.get(lr), s = qn(a);
504
+ const { ruleId: n, isAdd: r } = t, o = e.get(me), i = e.get(pn), a = e.get(le), l = e.get(sr), s = zn(a);
505
505
  if (!s) return !1;
506
- const { unitId: d, subUnitId: u } = s, g = r ? o.getRuleById(d, u, r) : void 0;
507
- i.open(), i.setActiveRule(g && {
506
+ const { unitId: d, subUnitId: u } = s, p = n ? i.getRuleById(d, u, n) : void 0;
507
+ o.open(), o.setActiveRule(p && {
508
508
  unitId: d,
509
509
  subUnitId: u,
510
- rule: g
510
+ rule: p
511
511
  });
512
512
  const c = l.open({
513
513
  id: Mt,
514
- header: { title: n ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
514
+ header: { title: r ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
515
515
  children: { label: Mt },
516
516
  width: 312,
517
- onClose: () => i.close()
517
+ onClose: () => o.close()
518
518
  });
519
- return i.setCloseDisposable(c), !0;
519
+ return o.setCloseDisposable(c), !0;
520
520
  }
521
521
  }, Cn = {
522
522
  id: "data-validation.operation.close-validation-panel",
523
- type: rt.OPERATION,
523
+ type: tt.OPERATION,
524
524
  handler(e) {
525
525
  return e.get(me).close(), !0;
526
526
  }
527
527
  }, mr = {
528
528
  id: "data-validation.operation.toggle-validation-panel",
529
- type: rt.OPERATION,
529
+ type: tt.OPERATION,
530
530
  handler(e) {
531
- const t = e.get(ee), r = e.get(me);
532
- return r.open(), r.isOpen ? t.executeCommand(Cn.id) : t.executeCommand(Be.id), !0;
531
+ const t = e.get(ee), n = e.get(me);
532
+ return n.open(), n.isOpen ? t.executeCommand(Cn.id) : t.executeCommand(Fe.id), !0;
533
533
  }
534
- }, Lt = {
535
- type: rt.OPERATION,
534
+ }, Pt = {
535
+ type: tt.OPERATION,
536
536
  id: "sheet.operation.show-data-validation-dropdown",
537
537
  handler(e, t) {
538
538
  if (!t)
539
539
  return !1;
540
- const r = e.get(Ue), { unitId: n, subUnitId: i, row: o, column: a } = t, l = r.activeDropdown, s = l == null ? void 0 : l.location;
541
- return s && s.unitId === n && s.subUnitId === i && s.row === o && s.col === a || r.showDataValidationDropdown(
542
- n,
543
- i,
540
+ const n = e.get(Ne), { unitId: r, subUnitId: o, row: i, column: a } = t, l = n.activeDropdown, s = l == null ? void 0 : l.location;
541
+ return s && s.unitId === r && s.subUnitId === o && s.row === i && s.col === a || n.showDataValidationDropdown(
542
+ r,
544
543
  o,
544
+ i,
545
545
  a
546
546
  ), !0;
547
547
  }
548
- }, _r = {
549
- type: rt.OPERATION,
548
+ }, fr = {
549
+ type: tt.OPERATION,
550
550
  id: "sheet.operation.hide-data-validation-dropdown",
551
551
  handler(e, t) {
552
- return t ? (e.get(Ue).hideDropdown(), !0) : !1;
552
+ return t ? (e.get(Ne).hideDropdown(), !0) : !1;
553
553
  }
554
- }, kt = {
555
- type: rt.COMMAND,
554
+ }, Lt = {
555
+ type: tt.COMMAND,
556
556
  id: "data-validation.command.addRuleAndOpen",
557
557
  handler(e) {
558
- const t = e.get(de), r = qn(t);
559
- if (!r) return !1;
560
- const { workbook: n, worksheet: i } = r, o = tr(e), a = e.get(ee), l = n.getUnitId(), s = i.getSheetId(), d = {
561
- rule: o,
558
+ const t = e.get(le), n = zn(t);
559
+ if (!n) return !1;
560
+ const { workbook: r, worksheet: o } = n, i = er(e), a = e.get(ee), l = r.getUnitId(), s = o.getSheetId(), d = {
561
+ rule: i,
562
562
  unitId: l,
563
563
  subUnitId: s
564
564
  };
565
- return a.syncExecuteCommand(hn.id, d) ? (a.syncExecuteCommand(Be.id, {
566
- ruleId: o.uid,
565
+ return a.syncExecuteCommand(un.id, d) ? (a.syncExecuteCommand(Fe.id, {
566
+ ruleId: i.uid,
567
567
  isAdd: !0
568
568
  }), !0) : !1;
569
569
  }
570
570
  };
571
- var xi = Object.getOwnPropertyDescriptor, Bi = (e, t, r, n) => {
572
- for (var i = n > 1 ? void 0 : n ? xi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
573
- (a = e[o]) && (i = a(i) || i);
574
- return i;
575
- }, $e = (e, t) => (r, n) => t(r, n, e);
576
- const Ee = "SHEET_DATA_VALIDATION_ALERT";
577
- let ht = class extends ye {
578
- constructor(e, t, r, n, i, o) {
579
- super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = r, this._localeService = n, this._zenZoneService = i, this._dataValidationModel = o, this._init();
571
+ var $o = Object.getOwnPropertyDescriptor, xo = (e, t, n, r) => {
572
+ for (var o = r > 1 ? void 0 : r ? $o(t, n) : t, i = e.length - 1, a; i >= 0; i--)
573
+ (a = e[i]) && (o = a(o) || o);
574
+ return o;
575
+ }, Be = (e, t) => (n, r) => t(n, r, e);
576
+ const be = "SHEET_DATA_VALIDATION_ALERT";
577
+ let ut = class extends Re {
578
+ constructor(e, t, n, r, o, i) {
579
+ super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = n, this._localeService = r, this._zenZoneService = o, this._dataValidationModel = i, this._init();
580
580
  }
581
581
  _init() {
582
582
  this._initCellAlertPopup(), this._initZenService();
583
583
  }
584
584
  _initCellAlertPopup() {
585
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(ur(100)).subscribe((e) => {
585
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(cr(100)).subscribe((e) => {
586
586
  var t;
587
587
  if (e) {
588
- const r = this._univerInstanceService.getUnit(e.location.unitId, X.UNIVER_SHEET), n = r.getSheetBySheetId(e.location.subUnitId);
589
- if (!n) return;
590
- const i = this._dataValidationModel.getRuleByLocation(e.location.unitId, e.location.subUnitId, e.location.row, e.location.col);
591
- if (!i) {
592
- this._cellAlertManagerService.removeAlert(Ee);
588
+ const n = this._univerInstanceService.getUnit(e.location.unitId, X.UNIVER_SHEET), r = n.getSheetBySheetId(e.location.subUnitId);
589
+ if (!r) return;
590
+ const o = this._dataValidationModel.getRuleByLocation(e.location.unitId, e.location.subUnitId, e.location.row, e.location.col);
591
+ if (!o) {
592
+ this._cellAlertManagerService.removeAlert(be);
593
593
  return;
594
594
  }
595
- if (this._dataValidationModel.validator(i, { ...e.location, workbook: r, worksheet: n }) === Ze.INVALID) {
596
- const a = this._cellAlertManagerService.currentAlert.get(Ee), l = (t = a == null ? void 0 : a.alert) == null ? void 0 : t.location;
595
+ if (this._dataValidationModel.validator(o, { ...e.location, workbook: n, worksheet: r }) === Ye.INVALID) {
596
+ const a = this._cellAlertManagerService.currentAlert.get(be), l = (t = a == null ? void 0 : a.alert) == null ? void 0 : t.location;
597
597
  if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId) {
598
- this._cellAlertManagerService.removeAlert(Ee);
598
+ this._cellAlertManagerService.removeAlert(be);
599
599
  return;
600
600
  }
601
- const s = this._dataValidationModel.getValidator(i.type);
601
+ const s = this._dataValidationModel.getValidator(o.type);
602
602
  if (!s) {
603
- this._cellAlertManagerService.removeAlert(Ee);
603
+ this._cellAlertManagerService.removeAlert(be);
604
604
  return;
605
605
  }
606
606
  this._cellAlertManagerService.showAlert({
607
- type: Ii.ERROR,
607
+ type: Io.ERROR,
608
608
  title: this._localeService.t("dataValidation.error.title"),
609
- message: s == null ? void 0 : s.getRuleFinalError(i, e.location),
609
+ message: s == null ? void 0 : s.getRuleFinalError(o, e.location),
610
610
  location: e.location,
611
611
  width: 200,
612
612
  height: 74,
613
- key: Ee
613
+ key: be
614
614
  });
615
615
  return;
616
616
  }
617
617
  }
618
- this._cellAlertManagerService.removeAlert(Ee);
618
+ this._cellAlertManagerService.removeAlert(be);
619
619
  }));
620
620
  }
621
621
  _initZenService() {
622
622
  this.disposeWithMe(this._zenZoneService.visible$.subscribe((e) => {
623
- e && this._cellAlertManagerService.removeAlert(Ee);
623
+ e && this._cellAlertManagerService.removeAlert(be);
624
624
  }));
625
625
  }
626
626
  };
627
- ht = Bi([
628
- $e(0, E(Ci)),
629
- $e(1, E(wi)),
630
- $e(2, de),
631
- $e(3, E(ce)),
632
- $e(4, dr),
633
- $e(5, E(ie))
634
- ], ht);
635
- var Wi = Object.getOwnPropertyDescriptor, Hi = (e, t, r, n) => {
636
- for (var i = n > 1 ? void 0 : n ? Wi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
637
- (a = e[o]) && (i = a(i) || i);
638
- return i;
639
- }, Bt = (e, t) => (r, n) => t(r, n, e);
640
- let Je = class extends ye {
641
- constructor(e, t, r) {
642
- super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = r, this._initAutoFill();
627
+ ut = xo([
628
+ Be(0, E(So)),
629
+ Be(1, E(wo)),
630
+ Be(2, le),
631
+ Be(3, E(de)),
632
+ Be(4, lr),
633
+ Be(5, E(oe))
634
+ ], ut);
635
+ var Bo = Object.getOwnPropertyDescriptor, Wo = (e, t, n, r) => {
636
+ for (var o = r > 1 ? void 0 : r ? Bo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
637
+ (a = e[i]) && (o = a(o) || o);
638
+ return o;
639
+ }, $t = (e, t) => (n, r) => t(n, r, e);
640
+ let ze = class extends Re {
641
+ constructor(e, t, n) {
642
+ super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = n, this._initAutoFill();
643
643
  }
644
644
  // eslint-disable-next-line max-lines-per-function
645
645
  _initAutoFill() {
646
- const e = () => ({ redos: [], undos: [] }), t = (n, i) => {
647
- const { source: o, target: a, unitId: l, subUnitId: s } = n, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = rn([o, a]), [g, c] = u.ranges, { mapFunc: f } = u, h = {
648
- row: g.startRow,
649
- col: g.startColumn
650
- }, M = yi(g, c), y = new It(), w = /* @__PURE__ */ new Set();
651
- M.forEach((v) => {
652
- const R = v.repeatStartCell, A = v.relativeRange, N = {
646
+ const e = () => ({ redos: [], undos: [] }), t = (r, o) => {
647
+ const { source: i, target: a, unitId: l, subUnitId: s } = r, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = nn([i, a]), [p, c] = u.ranges, { mapFunc: m } = u, h = {
648
+ row: p.startRow,
649
+ col: p.startColumn
650
+ }, b = yo(p, c), y = new wt(), w = /* @__PURE__ */ new Set();
651
+ b.forEach((v) => {
652
+ const R = v.repeatStartCell, P = v.relativeRange, N = {
653
653
  startRow: h.row,
654
654
  startColumn: h.col,
655
655
  endColumn: h.col,
656
656
  endRow: h.row
657
- }, O = {
657
+ }, T = {
658
658
  startRow: R.row,
659
659
  startColumn: R.col,
660
660
  endColumn: R.col,
661
661
  endRow: R.row
662
662
  };
663
- Nr.foreach(A, (L, D) => {
664
- const T = Rt.getPositionRange(
663
+ kr.foreach(P, (L, D) => {
664
+ const O = It.getPositionRange(
665
665
  {
666
666
  startRow: L,
667
667
  startColumn: D,
@@ -669,279 +669,279 @@ let Je = class extends ye {
669
669
  endRow: L
670
670
  },
671
671
  N
672
- ), { row: k, col: B } = f(T.startRow, T.startColumn), z = this._sheetDataValidationModel.getRuleIdByLocation(l, s, k, B) || "", te = Rt.getPositionRange(
672
+ ), { row: k, col: x } = m(O.startRow, O.startColumn), G = this._sheetDataValidationModel.getRuleIdByLocation(l, s, k, x) || "", te = It.getPositionRange(
673
673
  {
674
674
  startRow: L,
675
675
  startColumn: D,
676
676
  endColumn: D,
677
677
  endRow: L
678
678
  },
679
- O
680
- ), { row: W, col: ne } = f(te.startRow, te.startColumn);
681
- y.setValue(W, ne, z), w.add(z);
679
+ T
680
+ ), { row: B, col: ne } = m(te.startRow, te.startColumn);
681
+ y.setValue(B, ne, G), w.add(G);
682
682
  });
683
683
  });
684
- const C = Array.from(w).map((v) => ({ id: v, ranges: Gt(y, (R) => R === v) }));
685
- d.addRangeRules(C);
686
- const p = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: I, undoMutations: _ } = tn(l, s, p, this._injector, "patched", i === ot.ONLY_FORMAT);
684
+ const S = Array.from(w).map((v) => ({ id: v, ranges: Gt(y, (R) => R === v) }));
685
+ d.addRangeRules(S);
686
+ const g = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: I, undoMutations: _ } = en(l, s, g, this._injector, "patched", o === ot.ONLY_FORMAT);
687
687
  return {
688
688
  undos: _,
689
689
  redos: I
690
690
  };
691
- }, r = {
692
- id: nr,
693
- onBeforeFillData: (n) => {
694
- const { source: i, unitId: o, subUnitId: a } = n;
695
- for (const l of i.rows)
696
- for (const s of i.cols) {
697
- const d = this._sheetDataValidationModel.getRuleByLocation(o, a, l, s);
691
+ }, n = {
692
+ id: tr,
693
+ onBeforeFillData: (r) => {
694
+ const { source: o, unitId: i, subUnitId: a } = r;
695
+ for (const l of o.rows)
696
+ for (const s of o.cols) {
697
+ const d = this._sheetDataValidationModel.getRuleByLocation(i, a, l, s);
698
698
  if (d && d.type === j.CHECKBOX) {
699
699
  this._autoFillService.setDisableApplyType(ot.SERIES, !0);
700
700
  return;
701
701
  }
702
702
  }
703
703
  },
704
- onFillData: (n, i, o) => o === ot.COPY || o === ot.ONLY_FORMAT || o === ot.SERIES ? t(n, o) : e(),
704
+ onFillData: (r, o, i) => i === ot.COPY || i === ot.ONLY_FORMAT || i === ot.SERIES ? t(r, i) : e(),
705
705
  onAfterFillData: () => {
706
706
  }
707
707
  };
708
- this.disposeWithMe(this._autoFillService.addHook(r));
708
+ this.disposeWithMe(this._autoFillService.addHook(n));
709
709
  }
710
710
  };
711
- Je = Hi([
712
- Bt(0, Ri),
713
- Bt(1, E(ie)),
714
- Bt(2, E(be))
715
- ], Je);
716
- var $i = Object.getOwnPropertyDescriptor, ji = (e, t, r, n) => {
717
- for (var i = n > 1 ? void 0 : n ? $i(t, r) : t, o = e.length - 1, a; o >= 0; o--)
718
- (a = e[o]) && (i = a(i) || i);
719
- return i;
720
- }, Wt = (e, t) => (r, n) => t(r, n, e);
721
- let Qe = class extends ye {
722
- constructor(t, r, n) {
711
+ ze = Wo([
712
+ $t(0, Ro),
713
+ $t(1, E(oe)),
714
+ $t(2, E(ye))
715
+ ], ze);
716
+ var Ho = Object.getOwnPropertyDescriptor, jo = (e, t, n, r) => {
717
+ for (var o = r > 1 ? void 0 : r ? Ho(t, n) : t, i = e.length - 1, a; i >= 0; i--)
718
+ (a = e[i]) && (o = a(o) || o);
719
+ return o;
720
+ }, xt = (e, t) => (n, r) => t(n, r, e);
721
+ let qe = class extends Re {
722
+ constructor(t, n, r) {
723
723
  super();
724
724
  V(this, "_copyInfo");
725
- this._sheetClipboardService = t, this._sheetDataValidationModel = r, this._injector = n, this._initCopyPaste();
725
+ this._sheetClipboardService = t, this._sheetDataValidationModel = n, this._injector = r, this._initCopyPaste();
726
726
  }
727
727
  _initCopyPaste() {
728
728
  this._sheetClipboardService.addClipboardHook({
729
- id: nr,
730
- onBeforeCopy: (t, r, n) => this._collect(t, r, n),
731
- onPasteCells: (t, r, n, i) => {
732
- const { copyType: o = An.COPY, pasteType: a } = i, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = r;
733
- return this._generateMutations(s, { copyType: o, pasteType: a, copyRange: l, unitId: d, subUnitId: u });
729
+ id: tr,
730
+ onBeforeCopy: (t, n, r) => this._collect(t, n, r),
731
+ onPasteCells: (t, n, r, o) => {
732
+ const { copyType: i = An.COPY, pasteType: a } = o, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = n;
733
+ return this._generateMutations(s, { copyType: i, pasteType: a, copyRange: l, unitId: d, subUnitId: u });
734
734
  }
735
735
  });
736
736
  }
737
- _collect(t, r, n) {
738
- const i = new It();
737
+ _collect(t, n, r) {
738
+ const o = new wt();
739
739
  this._copyInfo = {
740
740
  unitId: t,
741
- subUnitId: r,
742
- matrix: i
741
+ subUnitId: n,
742
+ matrix: o
743
743
  };
744
- const o = this._injector.invoke((s) => Gr(n, s, t, r));
745
- if (!o)
744
+ const i = this._injector.invoke((s) => Gr(r, s, t, n));
745
+ if (!i)
746
746
  return;
747
- const { rows: a, cols: l } = o;
747
+ const { rows: a, cols: l } = i;
748
748
  a.forEach((s, d) => {
749
- l.forEach((u, g) => {
750
- const c = this._sheetDataValidationModel.getRuleIdByLocation(t, r, s, u);
751
- i.setValue(d, g, c != null ? c : "");
749
+ l.forEach((u, p) => {
750
+ const c = this._sheetDataValidationModel.getRuleIdByLocation(t, n, s, u);
751
+ o.setValue(d, p, c != null ? c : "");
752
752
  });
753
753
  });
754
754
  }
755
755
  // eslint-disable-next-line max-lines-per-function
756
- _generateMutations(t, r) {
756
+ _generateMutations(t, n) {
757
757
  if (!this._copyInfo)
758
758
  return { redos: [], undos: [] };
759
- if (r.copyType === An.CUT)
759
+ if (n.copyType === An.CUT)
760
760
  return this._copyInfo = null, { redos: [], undos: [] };
761
- if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !r.copyRange)
761
+ if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !n.copyRange)
762
762
  return { redos: [], undos: [] };
763
763
  if ([
764
764
  mt.SPECIAL_PASTE_COL_WIDTH,
765
765
  mt.SPECIAL_PASTE_VALUE,
766
766
  mt.SPECIAL_PASTE_FORMAT,
767
767
  mt.SPECIAL_PASTE_FORMULA
768
- ].includes(r.pasteType))
768
+ ].includes(n.pasteType))
769
769
  return { redos: [], undos: [] };
770
- const { unitId: i, subUnitId: o } = this._copyInfo;
771
- if (r.unitId !== i || o !== r.subUnitId) {
772
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new It(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: g } = rn([r.copyRange, t]), c = Ln(d, u, !0), f = /* @__PURE__ */ new Map();
770
+ const { unitId: o, subUnitId: i } = this._copyInfo;
771
+ if (n.unitId !== o || i !== n.subUnitId) {
772
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(n.unitId, n.subUnitId).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: p } = nn([n.copyRange, t]), c = Pn(d, u, !0), m = /* @__PURE__ */ new Map();
773
773
  c.forEach(({ startRange: w }) => {
774
- var C;
775
- (C = this._copyInfo) == null || C.matrix.forValue((p, I, _) => {
776
- const v = Rt.getPositionRange(
774
+ var S;
775
+ (S = this._copyInfo) == null || S.matrix.forValue((g, I, _) => {
776
+ const v = It.getPositionRange(
777
777
  {
778
- startRow: p,
779
- endRow: p,
778
+ startRow: g,
779
+ endRow: g,
780
780
  startColumn: I,
781
781
  endColumn: I
782
782
  },
783
783
  w
784
- ), R = `${o}-${_}`, A = this._sheetDataValidationModel.getRuleById(i, o, _);
785
- !this._sheetDataValidationModel.getRuleById(r.unitId, r.subUnitId, R) && A && f.set(R, { ...A, uid: R });
786
- const { row: N, col: O } = g(v.startRow, v.startColumn);
787
- s.add(R), l.setValue(N, O, R);
784
+ ), R = `${i}-${_}`, P = this._sheetDataValidationModel.getRuleById(o, i, _);
785
+ !this._sheetDataValidationModel.getRuleById(n.unitId, n.subUnitId, R) && P && m.set(R, { ...P, uid: R });
786
+ const { row: N, col: T } = p(v.startRow, v.startColumn);
787
+ s.add(R), l.setValue(N, T, R);
788
788
  });
789
789
  });
790
- const h = Array.from(s).map((w) => ({ id: w, ranges: Gt(l, (C) => C === w) }));
790
+ const h = Array.from(s).map((w) => ({ id: w, ranges: Gt(l, (S) => S === w) }));
791
791
  a.addRangeRules(h);
792
- const { redoMutations: M, undoMutations: y } = tn(
793
- r.unitId,
794
- r.subUnitId,
795
- a.diffWithAddition(this._sheetDataValidationModel.getRules(r.unitId, r.subUnitId), f.values()),
792
+ const { redoMutations: b, undoMutations: y } = en(
793
+ n.unitId,
794
+ n.subUnitId,
795
+ a.diffWithAddition(this._sheetDataValidationModel.getRules(n.unitId, n.subUnitId), m.values()),
796
796
  this._injector,
797
797
  "patched",
798
798
  !1
799
799
  );
800
800
  return {
801
- redos: M,
801
+ redos: b,
802
802
  undos: y
803
803
  };
804
804
  } else {
805
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(i, o).clone(), l = new It(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: g } = rn([r.copyRange, t]);
806
- Ln(d, u, !0).forEach(({ startRange: y }) => {
805
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: p } = nn([n.copyRange, t]);
806
+ Pn(d, u, !0).forEach(({ startRange: y }) => {
807
807
  var w;
808
- (w = this._copyInfo) == null || w.matrix.forValue((C, p, I) => {
809
- const _ = Rt.getPositionRange(
808
+ (w = this._copyInfo) == null || w.matrix.forValue((S, g, I) => {
809
+ const _ = It.getPositionRange(
810
810
  {
811
- startRow: C,
812
- endRow: C,
813
- startColumn: p,
814
- endColumn: p
811
+ startRow: S,
812
+ endRow: S,
813
+ startColumn: g,
814
+ endColumn: g
815
815
  },
816
816
  y
817
- ), { row: v, col: R } = g(_.startRow, _.startColumn);
817
+ ), { row: v, col: R } = p(_.startRow, _.startColumn);
818
818
  l.setValue(v, R, I), s.add(I);
819
819
  });
820
820
  });
821
- const f = Array.from(s).map((y) => ({ id: y, ranges: Gt(l, (w) => w === y) }));
822
- a.addRangeRules(f);
823
- const { redoMutations: h, undoMutations: M } = tn(
824
- i,
821
+ const m = Array.from(s).map((y) => ({ id: y, ranges: Gt(l, (w) => w === y) }));
822
+ a.addRangeRules(m);
823
+ const { redoMutations: h, undoMutations: b } = en(
825
824
  o,
826
- a.diff(this._sheetDataValidationModel.getRules(i, o)),
825
+ i,
826
+ a.diff(this._sheetDataValidationModel.getRules(o, i)),
827
827
  this._injector,
828
828
  "patched",
829
829
  !1
830
830
  );
831
831
  return {
832
832
  redos: h,
833
- undos: M
833
+ undos: b
834
834
  };
835
835
  }
836
836
  }
837
837
  };
838
- Qe = ji([
839
- Wt(0, bi),
840
- Wt(1, E(ie)),
841
- Wt(2, E(be))
842
- ], Qe);
843
- var Yi = Object.getOwnPropertyDescriptor, Xi = (e, t, r, n) => {
844
- for (var i = n > 1 ? void 0 : n ? Yi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
845
- (a = e[o]) && (i = a(i) || i);
846
- return i;
847
- }, Ht = (e, t) => (r, n) => t(r, n, e);
848
- let et = class extends ye {
849
- constructor(e, t, r) {
850
- super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = r, this._commandExecutedListener();
838
+ qe = jo([
839
+ xt(0, Mo),
840
+ xt(1, E(oe)),
841
+ xt(2, E(ye))
842
+ ], qe);
843
+ var Yo = Object.getOwnPropertyDescriptor, Xo = (e, t, n, r) => {
844
+ for (var o = r > 1 ? void 0 : r ? Yo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
845
+ (a = e[i]) && (o = a(o) || o);
846
+ return o;
847
+ }, Bt = (e, t) => (n, r) => t(n, r, e);
848
+ let Je = class extends Re {
849
+ constructor(e, t, n) {
850
+ super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = n, this._commandExecutedListener();
851
851
  }
852
852
  _commandExecutedListener() {
853
853
  this.disposeWithMe(
854
854
  this._commandService.beforeCommandExecuted((e) => {
855
- e.id === hn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
856
- workbookTypes: [en],
857
- rangeTypes: [Qt],
858
- worksheetTypes: [qt, Jt]
859
- }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === rr.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
860
- workbookTypes: [en],
861
- rangeTypes: [Qt],
862
- worksheetTypes: [qt, Jt]
855
+ e.id === un.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
856
+ workbookTypes: [Qt],
857
+ rangeTypes: [Jt],
858
+ worksheetTypes: [zt, qt]
859
+ }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === nr.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
860
+ workbookTypes: [Qt],
861
+ rangeTypes: [Jt],
862
+ worksheetTypes: [zt, qt]
863
863
  }, e.params.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
864
864
  })
865
865
  );
866
866
  }
867
867
  };
868
- et = Xi([
869
- Ht(0, E(ce)),
870
- Ht(1, ee),
871
- Ht(2, E(qr))
872
- ], et);
873
- const Sr = "sheet.menu.data-validation";
874
- function Zi(e) {
868
+ Je = Xo([
869
+ Bt(0, E(de)),
870
+ Bt(1, ee),
871
+ Bt(2, E(zr))
872
+ ], Je);
873
+ const _r = "sheet.menu.data-validation";
874
+ function Zo(e) {
875
875
  return {
876
- id: Sr,
877
- type: vn.SUBITEMS,
876
+ id: _r,
877
+ type: gn.SUBITEMS,
878
878
  icon: "DataValidationIcon",
879
879
  tooltip: "dataValidation.title",
880
- hidden$: hi(e, X.UNIVER_SHEET),
881
- disabled$: Mi(e, { workbookTypes: [en], worksheetTypes: [Jt, qt], rangeTypes: [Qt] })
880
+ hidden$: ho(e, X.UNIVER_SHEET),
881
+ disabled$: bo(e, { workbookTypes: [Qt], worksheetTypes: [qt, zt], rangeTypes: [Jt] })
882
882
  };
883
883
  }
884
- function Ki(e) {
884
+ function Ko(e) {
885
885
  return {
886
- id: Be.id,
886
+ id: Fe.id,
887
887
  title: "dataValidation.panel.title",
888
- type: vn.BUTTON
888
+ type: gn.BUTTON
889
889
  };
890
890
  }
891
- function zi(e) {
891
+ function Go(e) {
892
892
  return {
893
- id: kt.id,
893
+ id: Lt.id,
894
894
  title: "dataValidation.panel.add",
895
- type: vn.BUTTON
895
+ type: gn.BUTTON
896
896
  };
897
897
  }
898
- const Gi = {
899
- [gi.RULES]: {
900
- [Sr]: {
898
+ const zo = {
899
+ [po.RULES]: {
900
+ [_r]: {
901
901
  order: 0,
902
- menuItemFactory: Zi,
903
- [Be.id]: {
902
+ menuItemFactory: Zo,
903
+ [Fe.id]: {
904
904
  order: 0,
905
- menuItemFactory: Ki
905
+ menuItemFactory: Ko
906
906
  },
907
- [kt.id]: {
907
+ [Lt.id]: {
908
908
  order: 1,
909
- menuItemFactory: zi
909
+ menuItemFactory: Go
910
910
  }
911
911
  }
912
912
  }
913
913
  };
914
- var qi = Object.getOwnPropertyDescriptor, Cr = (e, t, r, n) => {
915
- for (var i = n > 1 ? void 0 : n ? qi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
916
- (a = e[o]) && (i = a(i) || i);
917
- return i;
918
- }, K = (e, t) => (r, n) => t(r, n, e);
919
- const wr = {
914
+ var qo = Object.getOwnPropertyDescriptor, Cr = (e, t, n, r) => {
915
+ for (var o = r > 1 ? void 0 : r ? qo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
916
+ (a = e[i]) && (o = a(o) || o);
917
+ return o;
918
+ }, K = (e, t) => (n, r) => t(n, r, e);
919
+ const Sr = {
920
920
  tr: {
921
921
  size: 6,
922
922
  color: "#fe4b4b"
923
923
  }
924
924
  };
925
- let tt = class extends cn {
926
- constructor(e, t, r, n, i, o, a, l, s, d, u) {
927
- super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = r, this._univerInstanceService = n, this._autoHeightController = i, this._dropdownManagerService = o, this._sheetDataValidationModel = a, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = d, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
925
+ let Qe = class extends dn {
926
+ constructor(e, t, n, r, o, i, a, l, s, d, u) {
927
+ super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = n, this._univerInstanceService = r, this._autoHeightController = o, this._dropdownManagerService = i, this._sheetDataValidationModel = a, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = d, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
928
928
  }
929
929
  _initMenu() {
930
- this._menuManagerService.mergeMenu(Gi);
930
+ this._menuManagerService.mergeMenu(zo);
931
931
  }
932
932
  _initDropdown() {
933
933
  this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
934
- var r;
934
+ var n;
935
935
  if (!e.visible) {
936
- ((r = this._dropdownManagerService.activeDropdown) == null ? void 0 : r.trigger) === "editor-bridge" && this._dropdownManagerService.hideDropdown();
936
+ ((n = this._dropdownManagerService.activeDropdown) == null ? void 0 : n.trigger) === "editor-bridge" && this._dropdownManagerService.hideDropdown();
937
937
  return;
938
938
  }
939
939
  const t = this._editorBridgeService.getEditCellState();
940
940
  if (t) {
941
- const { unitId: n, sheetId: i, row: o, column: a } = t, l = this._univerInstanceService.getUniverSheetInstance(n);
941
+ const { unitId: r, sheetId: o, row: i, column: a } = t, l = this._univerInstanceService.getUniverSheetInstance(r);
942
942
  if (!l)
943
943
  return;
944
- const s = this._sheetDataValidationModel.getRuleByLocation(n, i, o, a);
944
+ const s = this._sheetDataValidationModel.getRuleByLocation(r, o, i, a);
945
945
  if (!s)
946
946
  return;
947
947
  const d = this._dataValidatorRegistryService.getValidatorItem(s.type);
@@ -949,15 +949,15 @@ let tt = class extends cn {
949
949
  return;
950
950
  const u = l.getActiveSheet();
951
951
  if (!u) return;
952
- const g = this._dropdownManagerService.activeDropdown, c = g == null ? void 0 : g.location;
953
- if (c && c.unitId === n && c.subUnitId === i && c.row === o && c.col === a)
952
+ const p = this._dropdownManagerService.activeDropdown, c = p == null ? void 0 : p.location;
953
+ if (c && c.unitId === r && c.subUnitId === o && c.row === i && c.col === a)
954
954
  return;
955
955
  this._dropdownManagerService.showDropdown(
956
956
  {
957
957
  location: {
958
- unitId: n,
959
- subUnitId: i,
960
- row: o,
958
+ unitId: r,
959
+ subUnitId: o,
960
+ row: i,
961
961
  col: a,
962
962
  workbook: l,
963
963
  worksheet: u
@@ -973,42 +973,42 @@ let tt = class extends cn {
973
973
  _initViewModelIntercept() {
974
974
  this.disposeWithMe(
975
975
  this._sheetInterceptorService.intercept(
976
- Jn.CELL_CONTENT,
976
+ qn.CELL_CONTENT,
977
977
  {
978
- effect: jn.Style,
978
+ effect: Hn.Style,
979
979
  // must be after numfmt
980
- priority: Qn.DATA_VALIDATION,
980
+ priority: Jn.DATA_VALIDATION,
981
981
  // eslint-disable-next-line max-lines-per-function, complexity
982
- handler: (e, t, r) => {
983
- var w, C, p, I, _;
984
- const { row: n, col: i, unitId: o, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(o, a, n, i);
982
+ handler: (e, t, n) => {
983
+ var w, S, g, I, _;
984
+ const { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, a, r, o);
985
985
  if (!d)
986
- return r(e);
987
- const u = this._sheetDataValidationModel.getRuleById(o, a, d);
986
+ return n(e);
987
+ const u = this._sheetDataValidationModel.getRuleById(i, a, d);
988
988
  if (!u)
989
- return r(e);
990
- const g = (w = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? w : Ze.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), f = t.rawData;
989
+ return n(e);
990
+ const p = (w = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? w : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
991
991
  let h;
992
- const M = {
992
+ const b = {
993
993
  get value() {
994
994
  var v;
995
- return h !== void 0 || (h = (v = re(f)) != null ? v : null), h;
995
+ return h !== void 0 || (h = (v = re(m)) != null ? v : null), h;
996
996
  }
997
997
  }, y = {
998
998
  get value() {
999
999
  var v;
1000
- return `${(v = M.value) != null ? v : ""}`;
1000
+ return `${(v = b.value) != null ? v : ""}`;
1001
1001
  }
1002
1002
  };
1003
1003
  return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
1004
1004
  ...e == null ? void 0 : e.markers,
1005
- ...g === Ze.INVALID ? wr : null
1005
+ ...p === Ye.INVALID ? Sr : null
1006
1006
  }, e.customRender = [
1007
- ...(C = e == null ? void 0 : e.customRender) != null ? C : [],
1007
+ ...(S = e == null ? void 0 : e.customRender) != null ? S : [],
1008
1008
  ...c != null && c.canvasRender ? [c.canvasRender] : []
1009
1009
  ], e.fontRenderExtension = {
1010
1010
  ...e == null ? void 0 : e.fontRenderExtension,
1011
- isSkip: ((p = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : p.isSkip) || ((I = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : I.call(c, u, M.value, t))
1011
+ isSkip: ((g = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : g.isSkip) || ((I = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : I.call(c, u, b.value, t))
1012
1012
  }, e.interceptorStyle = {
1013
1013
  ...e == null ? void 0 : e.interceptorStyle,
1014
1014
  ...c == null ? void 0 : c.getExtraStyle(u, y.value, {
@@ -1016,42 +1016,42 @@ let tt = class extends cn {
1016
1016
  const v = l.getStyles();
1017
1017
  return (typeof (e == null ? void 0 : e.s) == "string" ? v.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1018
1018
  }
1019
- }, n, i)
1019
+ }, r, o)
1020
1020
  }, e.interceptorAutoHeight = () => {
1021
- var N, O, L, D, T, k;
1022
- const v = (O = (N = this._renderManagerService.getRenderById(o)) == null ? void 0 : N.with(dt).getSkeletonParam(a)) == null ? void 0 : O.skeleton;
1021
+ var N, T, L, D, O, k;
1022
+ const v = (T = (N = this._renderManagerService.getRenderById(i)) == null ? void 0 : N.with(lt).getSkeletonParam(a)) == null ? void 0 : T.skeleton;
1023
1023
  if (!v)
1024
1024
  return;
1025
- const R = v.worksheet.getMergedCell(n, i), A = {
1025
+ const R = v.worksheet.getMergedCell(r, o), P = {
1026
1026
  data: e,
1027
1027
  style: v.getStyles().getStyleByCell(e),
1028
- primaryWithCoord: v.getCellWithCoordByIndex((L = R == null ? void 0 : R.startRow) != null ? L : n, (D = R == null ? void 0 : R.startColumn) != null ? D : i),
1029
- unitId: o,
1028
+ primaryWithCoord: v.getCellWithCoordByIndex((L = R == null ? void 0 : R.startRow) != null ? L : r, (D = R == null ? void 0 : R.startColumn) != null ? D : o),
1029
+ unitId: i,
1030
1030
  subUnitId: a,
1031
- row: n,
1032
- col: i,
1031
+ row: r,
1032
+ col: o,
1033
1033
  workbook: l,
1034
1034
  worksheet: s
1035
1035
  };
1036
- return (k = (T = c == null ? void 0 : c.canvasRender) == null ? void 0 : T.calcCellAutoHeight) == null ? void 0 : k.call(T, A);
1036
+ return (k = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoHeight) == null ? void 0 : k.call(O, P);
1037
1037
  }, e.interceptorAutoWidth = () => {
1038
- var N, O, L, D, T, k;
1039
- const v = (O = (N = this._renderManagerService.getRenderById(o)) == null ? void 0 : N.with(dt).getSkeletonParam(a)) == null ? void 0 : O.skeleton;
1038
+ var N, T, L, D, O, k;
1039
+ const v = (T = (N = this._renderManagerService.getRenderById(i)) == null ? void 0 : N.with(lt).getSkeletonParam(a)) == null ? void 0 : T.skeleton;
1040
1040
  if (!v)
1041
1041
  return;
1042
- const R = v.worksheet.getMergedCell(n, i), A = {
1042
+ const R = v.worksheet.getMergedCell(r, o), P = {
1043
1043
  data: e,
1044
1044
  style: v.getStyles().getStyleByCell(e),
1045
- primaryWithCoord: v.getCellWithCoordByIndex((L = R == null ? void 0 : R.startRow) != null ? L : n, (D = R == null ? void 0 : R.startColumn) != null ? D : i),
1046
- unitId: o,
1045
+ primaryWithCoord: v.getCellWithCoordByIndex((L = R == null ? void 0 : R.startRow) != null ? L : r, (D = R == null ? void 0 : R.startColumn) != null ? D : o),
1046
+ unitId: i,
1047
1047
  subUnitId: a,
1048
- row: n,
1049
- col: i,
1048
+ row: r,
1049
+ col: o,
1050
1050
  workbook: l,
1051
1051
  worksheet: s
1052
1052
  };
1053
- return (k = (T = c == null ? void 0 : c.canvasRender) == null ? void 0 : T.calcCellAutoWidth) == null ? void 0 : k.call(T, A);
1054
- }, e.coverable = ((_ = e == null ? void 0 : e.coverable) != null ? _ : !0) && !(u.type === j.LIST || u.type === j.LIST_MULTIPLE), r(e);
1053
+ return (k = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoWidth) == null ? void 0 : k.call(O, P);
1054
+ }, e.coverable = ((_ = e == null ? void 0 : e.coverable) != null ? _ : !0) && !(u.type === j.LIST || u.type === j.LIST_MULTIPLE), n(e);
1055
1055
  }
1056
1056
  }
1057
1057
  )
@@ -1062,109 +1062,109 @@ let tt = class extends cn {
1062
1062
  // patched data-validation change don't need to re-calc row height
1063
1063
  // re-calc of row height will be triggered precisely by the origin command
1064
1064
  mn((e) => e.source === "command"),
1065
- hr(100)
1065
+ ur(100)
1066
1066
  ).subscribe((e) => {
1067
1067
  if (e.length === 0)
1068
1068
  return;
1069
1069
  const t = [];
1070
- if (e.forEach((r) => {
1071
- var n;
1072
- (r.rule.type === j.LIST_MULTIPLE || r.rule.type === j.LIST) && (n = r.rule) != null && n.ranges && t.push(...r.rule.ranges);
1070
+ if (e.forEach((n) => {
1071
+ var r;
1072
+ (n.rule.type === j.LIST_MULTIPLE || n.rule.type === j.LIST) && (r = n.rule) != null && r.ranges && t.push(...n.rule.ranges);
1073
1073
  }), t.length) {
1074
- const r = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1075
- Yn(r.redos, this._commandService);
1074
+ const n = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1075
+ jn(n.redos, this._commandService);
1076
1076
  }
1077
1077
  });
1078
1078
  }
1079
1079
  };
1080
- tt = Cr([
1080
+ Qe = Cr([
1081
1081
  K(0, ee),
1082
- K(1, pi),
1083
- K(2, Fe),
1084
- K(3, de),
1082
+ K(1, go),
1083
+ K(2, Ue),
1084
+ K(3, le),
1085
1085
  K(4, E(pr)),
1086
- K(5, E(Ue)),
1087
- K(6, E(ie)),
1086
+ K(5, E(Ne)),
1087
+ K(6, E(oe)),
1088
1088
  K(7, E(Me)),
1089
- K(8, E(un)),
1090
- K(9, E(ir)),
1091
- K(10, Ur(gr))
1092
- ], tt);
1093
- let Un = class extends cn {
1094
- constructor(e, t, r, n, i, o, a) {
1095
- super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = r, this._dataValidatorRegistryService = n, this._sheetInterceptorService = i, this._sheetDataValidationModel = o, this._dataValidationCacheService = a, this._initViewModelIntercept(), this._initAutoHeight();
1089
+ K(8, E(cn)),
1090
+ K(9, E(rr)),
1091
+ K(10, Nr(hr))
1092
+ ], Qe);
1093
+ let Nn = class extends dn {
1094
+ constructor(e, t, n, r, o, i, a) {
1095
+ super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = n, this._dataValidatorRegistryService = r, this._sheetInterceptorService = o, this._sheetDataValidationModel = i, this._dataValidationCacheService = a, this._initViewModelIntercept(), this._initAutoHeight();
1096
1096
  }
1097
1097
  // eslint-disable-next-line max-lines-per-function
1098
1098
  _initViewModelIntercept() {
1099
1099
  this.disposeWithMe(
1100
1100
  this._sheetInterceptorService.intercept(
1101
- Jn.CELL_CONTENT,
1101
+ qn.CELL_CONTENT,
1102
1102
  {
1103
- effect: jn.Style,
1103
+ effect: Hn.Style,
1104
1104
  // must be after numfmt
1105
- priority: Qn.DATA_VALIDATION,
1105
+ priority: Jn.DATA_VALIDATION,
1106
1106
  // eslint-disable-next-line complexity, max-lines-per-function
1107
- handler: (e, t, r) => {
1108
- var y, w, C, p, I;
1109
- const { row: n, col: i, unitId: o, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(o, a, n, i);
1107
+ handler: (e, t, n) => {
1108
+ var y, w, S, g, I;
1109
+ const { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, a, r, o);
1110
1110
  if (!d)
1111
- return r(e);
1112
- const u = this._sheetDataValidationModel.getRuleById(o, a, d);
1111
+ return n(e);
1112
+ const u = this._sheetDataValidationModel.getRuleById(i, a, d);
1113
1113
  if (!u)
1114
- return r(e);
1115
- const g = (y = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? y : Ze.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), f = s.getCellRaw(n, i), h = re(f), M = `${h != null ? h : ""}`;
1114
+ return n(e);
1115
+ const p = (y = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? y : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = s.getCellRaw(r, o), h = re(m), b = `${h != null ? h : ""}`;
1116
1116
  return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
1117
1117
  ...e == null ? void 0 : e.markers,
1118
- ...g === Ze.INVALID ? wr : null
1118
+ ...p === Ye.INVALID ? Sr : null
1119
1119
  }, e.customRender = [
1120
1120
  ...(w = e == null ? void 0 : e.customRender) != null ? w : [],
1121
1121
  ...c != null && c.canvasRender ? [c.canvasRender] : []
1122
1122
  ], e.fontRenderExtension = {
1123
1123
  ...e == null ? void 0 : e.fontRenderExtension,
1124
- isSkip: ((C = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : C.isSkip) || ((p = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : p.call(c, u, h, t))
1124
+ isSkip: ((S = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : S.isSkip) || ((g = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : g.call(c, u, h, t))
1125
1125
  }, e.interceptorStyle = {
1126
1126
  ...e == null ? void 0 : e.interceptorStyle,
1127
- ...c == null ? void 0 : c.getExtraStyle(u, M, {
1127
+ ...c == null ? void 0 : c.getExtraStyle(u, b, {
1128
1128
  get style() {
1129
1129
  const _ = l.getStyles();
1130
1130
  return (typeof (e == null ? void 0 : e.s) == "string" ? _.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
1131
1131
  }
1132
- }, n, i)
1132
+ }, r, o)
1133
1133
  }, e.interceptorAutoHeight = () => {
1134
- var A, N, O, L, D, T;
1135
- const _ = (N = (A = this._renderManagerService.getRenderById(o)) == null ? void 0 : A.with(dt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1134
+ var P, N, T, L, D, O;
1135
+ const _ = (N = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(lt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1136
1136
  if (!_)
1137
1137
  return;
1138
- const v = _.worksheet.getMergedCell(n, i), R = {
1138
+ const v = _.worksheet.getMergedCell(r, o), R = {
1139
1139
  data: e,
1140
1140
  style: _.getStyles().getStyleByCell(e),
1141
- primaryWithCoord: _.getCellWithCoordByIndex((O = v == null ? void 0 : v.startRow) != null ? O : n, (L = v == null ? void 0 : v.startColumn) != null ? L : i),
1142
- unitId: o,
1141
+ primaryWithCoord: _.getCellWithCoordByIndex((T = v == null ? void 0 : v.startRow) != null ? T : r, (L = v == null ? void 0 : v.startColumn) != null ? L : o),
1142
+ unitId: i,
1143
1143
  subUnitId: a,
1144
- row: n,
1145
- col: i,
1144
+ row: r,
1145
+ col: o,
1146
1146
  workbook: l,
1147
1147
  worksheet: s
1148
1148
  };
1149
- return (T = (D = c == null ? void 0 : c.canvasRender) == null ? void 0 : D.calcCellAutoHeight) == null ? void 0 : T.call(D, R);
1149
+ return (O = (D = c == null ? void 0 : c.canvasRender) == null ? void 0 : D.calcCellAutoHeight) == null ? void 0 : O.call(D, R);
1150
1150
  }, e.interceptorAutoWidth = () => {
1151
- var A, N, O, L, D, T;
1152
- const _ = (N = (A = this._renderManagerService.getRenderById(o)) == null ? void 0 : A.with(dt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1151
+ var P, N, T, L, D, O;
1152
+ const _ = (N = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(lt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1153
1153
  if (!_)
1154
1154
  return;
1155
- const v = _.worksheet.getMergedCell(n, i), R = {
1155
+ const v = _.worksheet.getMergedCell(r, o), R = {
1156
1156
  data: e,
1157
1157
  style: _.getStyles().getStyleByCell(e),
1158
- primaryWithCoord: _.getCellWithCoordByIndex((O = v == null ? void 0 : v.startRow) != null ? O : n, (L = v == null ? void 0 : v.startColumn) != null ? L : i),
1159
- unitId: o,
1158
+ primaryWithCoord: _.getCellWithCoordByIndex((T = v == null ? void 0 : v.startRow) != null ? T : r, (L = v == null ? void 0 : v.startColumn) != null ? L : o),
1159
+ unitId: i,
1160
1160
  subUnitId: a,
1161
- row: n,
1162
- col: i,
1161
+ row: r,
1162
+ col: o,
1163
1163
  workbook: l,
1164
1164
  worksheet: s
1165
1165
  };
1166
- return (T = (D = c == null ? void 0 : c.canvasRender) == null ? void 0 : D.calcCellAutoWidth) == null ? void 0 : T.call(D, R);
1167
- }, e.coverable = ((I = e == null ? void 0 : e.coverable) != null ? I : !0) && !(u.type === j.LIST || u.type === j.LIST_MULTIPLE), r(e);
1166
+ return (O = (D = c == null ? void 0 : c.canvasRender) == null ? void 0 : D.calcCellAutoWidth) == null ? void 0 : O.call(D, R);
1167
+ }, e.coverable = ((I = e == null ? void 0 : e.coverable) != null ? I : !0) && !(u.type === j.LIST || u.type === j.LIST_MULTIPLE), n(e);
1168
1168
  }
1169
1169
  }
1170
1170
  )
@@ -1173,658 +1173,847 @@ let Un = class extends cn {
1173
1173
  _initAutoHeight() {
1174
1174
  this._sheetDataValidationModel.ruleChange$.pipe(
1175
1175
  mn((e) => e.source === "command"),
1176
- hr(16)
1176
+ ur(16)
1177
1177
  ).subscribe((e) => {
1178
1178
  const t = [];
1179
- if (e.forEach((r) => {
1180
- var n;
1181
- (r.rule.type === j.LIST_MULTIPLE || r.rule.type === j.LIST) && (n = r.rule) != null && n.ranges && t.push(...r.rule.ranges);
1179
+ if (e.forEach((n) => {
1180
+ var r;
1181
+ (n.rule.type === j.LIST_MULTIPLE || n.rule.type === j.LIST) && (r = n.rule) != null && r.ranges && t.push(...n.rule.ranges);
1182
1182
  }), t.length) {
1183
- const r = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1184
- Yn(r.redos, this._commandService);
1183
+ const n = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1184
+ jn(n.redos, this._commandService);
1185
1185
  }
1186
1186
  });
1187
1187
  }
1188
1188
  };
1189
- Un = Cr([
1189
+ Nn = Cr([
1190
1190
  K(0, ee),
1191
- K(1, Fe),
1191
+ K(1, Ue),
1192
1192
  K(2, E(pr)),
1193
1193
  K(3, E(Me)),
1194
- K(4, E(un)),
1195
- K(5, E(ie)),
1196
- K(6, E(ir))
1197
- ], Un);
1198
- var Ji = Object.getOwnPropertyDescriptor, Qi = (e, t, r, n) => {
1199
- for (var i = n > 1 ? void 0 : n ? Ji(t, r) : t, o = e.length - 1, a; o >= 0; o--)
1200
- (a = e[o]) && (i = a(i) || i);
1201
- return i;
1202
- }, Fn = (e, t) => (r, n) => t(r, n, e);
1203
- let Et = class extends ye {
1204
- constructor(e, t, r) {
1205
- super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = r, this._initSkeletonChange();
1194
+ K(4, E(cn)),
1195
+ K(5, E(oe)),
1196
+ K(6, E(rr))
1197
+ ], Nn);
1198
+ var Jo = Object.getOwnPropertyDescriptor, Qo = (e, t, n, r) => {
1199
+ for (var o = r > 1 ? void 0 : r ? Jo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
1200
+ (a = e[i]) && (o = a(o) || o);
1201
+ return o;
1202
+ }, Un = (e, t) => (n, r) => t(n, r, e);
1203
+ let bt = class extends Re {
1204
+ constructor(e, t, n) {
1205
+ super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = n, this._initSkeletonChange();
1206
1206
  }
1207
1207
  _initSkeletonChange() {
1208
1208
  const e = (t) => {
1209
- var n;
1209
+ var r;
1210
1210
  if (!t.length)
1211
1211
  return;
1212
- const r = /* @__PURE__ */ new Set();
1213
- t.forEach((i) => {
1214
- r.add(i.subUnitId);
1215
- }), r.forEach((i) => {
1216
- var o;
1217
- (o = this._sheetSkeletonManagerService.getSkeletonParam(i)) == null || o.skeleton.makeDirty(!0);
1218
- }), (n = this._context.mainComponent) == null || n.makeForceDirty();
1212
+ const n = /* @__PURE__ */ new Set();
1213
+ t.forEach((o) => {
1214
+ n.add(o.subUnitId);
1215
+ }), n.forEach((o) => {
1216
+ var i;
1217
+ (i = this._sheetSkeletonManagerService.getSkeletonParam(o)) == null || i.skeleton.makeDirty(!0);
1218
+ }), (r = this._context.mainComponent) == null || r.makeForceDirty();
1219
1219
  };
1220
- this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Fr(16)).subscribe(e));
1220
+ this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Ur(16)).subscribe(e));
1221
1221
  }
1222
1222
  };
1223
- Et = Qi([
1224
- Fn(1, E(ie)),
1225
- Fn(2, E(dt))
1226
- ], Et);
1227
- var se = function() {
1228
- return se = Object.assign || function(e) {
1229
- for (var t, r = 1, n = arguments.length; r < n; r++) {
1230
- t = arguments[r];
1231
- for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
1232
- }
1233
- return e;
1234
- }, se.apply(this, arguments);
1235
- }, eo = function(e, t) {
1236
- var r = {};
1237
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1238
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
1239
- for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
1240
- t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
1241
- return r;
1242
- }, We = xe(function(e, t) {
1243
- var r = e.icon, n = e.id, i = e.className, o = e.extend, a = eo(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), s = gt("_".concat(ro()));
1244
- return Ir(r, "".concat(n), { defIds: r.defIds, idSuffix: s.current }, se({ ref: t, className: l }, a), o);
1245
- });
1246
- function Ir(e, t, r, n, i) {
1247
- return Ie(e.tag, se(se({ key: t }, to(e, r, i)), n), (no(e, r).children || []).map(function(o, a) {
1248
- return Ir(o, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, i);
1249
- }));
1223
+ bt = Qo([
1224
+ Un(1, E(oe)),
1225
+ Un(2, E(lt))
1226
+ ], bt);
1227
+ function $e({ ref: e, ...t }) {
1228
+ const { icon: n, id: r, className: o, extend: i, ...a } = t, l = `univerjs-icon univerjs-icon-${r} ${o || ""}`.trim(), s = ht(`_${ni()}`);
1229
+ return wr(n, `${r}`, {
1230
+ defIds: n.defIds,
1231
+ idSuffix: s.current
1232
+ }, {
1233
+ ref: e,
1234
+ className: l,
1235
+ ...a
1236
+ }, i);
1250
1237
  }
1251
- function to(e, t, r) {
1252
- var n = se({}, e.attrs);
1253
- r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(function(o) {
1254
- var a = o[0], l = o[1];
1255
- a === "mask" && typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
1238
+ function wr(e, t, n, r, o) {
1239
+ return we(e.tag, {
1240
+ key: t,
1241
+ ...ei(e, n, o),
1242
+ ...r
1243
+ }, (ti(e, n).children || []).map((i, a) => wr(i, `${t}-${e.tag}-${a}`, n, void 0, o)));
1244
+ }
1245
+ function ei(e, t, n) {
1246
+ const r = { ...e.attrs };
1247
+ n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), e.tag === "mask" && r.id && (r.id = r.id + t.idSuffix), Object.entries(r).forEach(([i, a]) => {
1248
+ i === "mask" && typeof a == "string" && (r[i] = a.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
1256
1249
  });
1257
- var i = t.defIds;
1258
- return !i || i.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(o) {
1259
- var a = o[0], l = o[1];
1260
- typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
1261
- })), n;
1250
+ const { defIds: o } = t;
1251
+ return !o || o.length === 0 || (e.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + t.idSuffix), Object.entries(r).forEach(([i, a]) => {
1252
+ typeof a == "string" && (r[i] = a.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
1253
+ })), r;
1262
1254
  }
1263
- function no(e, t) {
1264
- var r, n = t.defIds;
1265
- return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? se(se({}, e), { children: e.children.map(function(i) {
1266
- return typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? se(se({}, i), { attrs: se(se({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
1267
- }) }) : e;
1255
+ function ti(e, t) {
1256
+ var r;
1257
+ const { defIds: n } = t;
1258
+ return !n || n.length === 0 ? e : e.tag === "defs" && ((r = e.children) != null && r.length) ? {
1259
+ ...e,
1260
+ children: e.children.map((o) => typeof o.attrs.id == "string" && n && n.includes(o.attrs.id) ? {
1261
+ ...o,
1262
+ attrs: {
1263
+ ...o.attrs,
1264
+ id: o.attrs.id + t.idSuffix
1265
+ }
1266
+ } : o)
1267
+ } : e;
1268
1268
  }
1269
- function ro() {
1269
+ function ni() {
1270
1270
  return Math.random().toString(36).substring(2, 8);
1271
1271
  }
1272
- We.displayName = "UniverIcon";
1273
- var io = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062C8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767L13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217L14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046C13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703L10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046C9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217L9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746C9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732L13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rr = xe(function(e, t) {
1274
- return Ie(We, Object.assign({}, e, {
1272
+ $e.displayName = "UniverIcon";
1273
+ const ri = {
1274
+ tag: "svg",
1275
+ attrs: {
1276
+ xmlns: "http://www.w3.org/2000/svg",
1277
+ fill: "none",
1278
+ viewBox: "0 0 17 16",
1279
+ width: "1em",
1280
+ height: "1em"
1281
+ },
1282
+ children: [
1283
+ {
1284
+ tag: "path",
1285
+ attrs: {
1286
+ fill: "currentColor",
1287
+ d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z",
1288
+ fillRule: "evenodd",
1289
+ clipRule: "evenodd"
1290
+ }
1291
+ },
1292
+ {
1293
+ tag: "path",
1294
+ attrs: {
1295
+ fill: "currentColor",
1296
+ d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062C8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767L13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279Z"
1297
+ }
1298
+ },
1299
+ {
1300
+ tag: "path",
1301
+ attrs: {
1302
+ fill: "currentColor",
1303
+ d: "M14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217L14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046C13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703L10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046C9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217L9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746C9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732L13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746Z"
1304
+ }
1305
+ },
1306
+ {
1307
+ tag: "path",
1308
+ attrs: {
1309
+ fill: "currentColor",
1310
+ d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z",
1311
+ fillRule: "evenodd",
1312
+ clipRule: "evenodd"
1313
+ }
1314
+ }
1315
+ ]
1316
+ }, Ir = nt(function(t, n) {
1317
+ return we($e, Object.assign({}, t, {
1275
1318
  id: "data-validation-icon",
1276
- ref: t,
1277
- icon: io
1319
+ ref: n,
1320
+ icon: ri
1278
1321
  }));
1279
1322
  });
1280
- Rr.displayName = "DataValidationIcon";
1281
- var oo = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wn = xe(function(e, t) {
1282
- return Ie(We, Object.assign({}, e, {
1323
+ Ir.displayName = "DataValidationIcon";
1324
+ const oi = {
1325
+ tag: "svg",
1326
+ attrs: {
1327
+ xmlns: "http://www.w3.org/2000/svg",
1328
+ fill: "none",
1329
+ viewBox: "0 0 16 16",
1330
+ width: "1em",
1331
+ height: "1em"
1332
+ },
1333
+ children: [
1334
+ {
1335
+ tag: "path",
1336
+ attrs: {
1337
+ fill: "currentColor",
1338
+ d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z"
1339
+ }
1340
+ },
1341
+ {
1342
+ tag: "path",
1343
+ attrs: {
1344
+ fill: "currentColor",
1345
+ d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z"
1346
+ }
1347
+ },
1348
+ {
1349
+ tag: "path",
1350
+ attrs: {
1351
+ fill: "currentColor",
1352
+ d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z"
1353
+ }
1354
+ },
1355
+ {
1356
+ tag: "path",
1357
+ attrs: {
1358
+ fill: "currentColor",
1359
+ d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",
1360
+ fillRule: "evenodd",
1361
+ clipRule: "evenodd"
1362
+ }
1363
+ }
1364
+ ]
1365
+ }, Sn = nt(function(t, n) {
1366
+ return we($e, Object.assign({}, t, {
1283
1367
  id: "delete-icon",
1284
- ref: t,
1285
- icon: oo
1368
+ ref: n,
1369
+ icon: oi
1286
1370
  }));
1287
1371
  });
1288
- wn.displayName = "DeleteIcon";
1289
- var ao = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, yr = xe(function(e, t) {
1290
- return Ie(We, Object.assign({}, e, {
1372
+ Sn.displayName = "DeleteIcon";
1373
+ const ii = {
1374
+ tag: "svg",
1375
+ attrs: {
1376
+ xmlns: "http://www.w3.org/2000/svg",
1377
+ fill: "none",
1378
+ viewBox: "0 0 16 16",
1379
+ width: "1em",
1380
+ height: "1em"
1381
+ },
1382
+ children: [{
1383
+ tag: "path",
1384
+ attrs: {
1385
+ fill: "currentColor",
1386
+ d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"
1387
+ }
1388
+ }]
1389
+ }, Rr = nt(function(t, n) {
1390
+ return we($e, Object.assign({}, t, {
1291
1391
  id: "increase-icon",
1292
- ref: t,
1293
- icon: ao
1392
+ ref: n,
1393
+ icon: ii
1294
1394
  }));
1295
1395
  });
1296
- yr.displayName = "IncreaseIcon";
1297
- var so = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, In = xe(function(e, t) {
1298
- return Ie(We, Object.assign({}, e, {
1396
+ Rr.displayName = "IncreaseIcon";
1397
+ const ai = {
1398
+ tag: "svg",
1399
+ attrs: {
1400
+ xmlns: "http://www.w3.org/2000/svg",
1401
+ fill: "none",
1402
+ viewBox: "0 0 16 16",
1403
+ width: "1em",
1404
+ height: "1em"
1405
+ },
1406
+ children: [{
1407
+ tag: "path",
1408
+ attrs: {
1409
+ fill: "currentColor",
1410
+ d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",
1411
+ fillRule: "evenodd",
1412
+ clipRule: "evenodd"
1413
+ }
1414
+ }]
1415
+ }, wn = nt(function(t, n) {
1416
+ return we($e, Object.assign({}, t, {
1299
1417
  id: "more-down-icon",
1300
- ref: t,
1301
- icon: so
1418
+ ref: n,
1419
+ icon: ai
1302
1420
  }));
1303
1421
  });
1304
- In.displayName = "MoreDownIcon";
1305
- var lo = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, br = xe(function(e, t) {
1306
- return Ie(We, Object.assign({}, e, {
1422
+ wn.displayName = "MoreDownIcon";
1423
+ const si = {
1424
+ tag: "svg",
1425
+ attrs: {
1426
+ xmlns: "http://www.w3.org/2000/svg",
1427
+ fill: "none",
1428
+ viewBox: "0 0 16 16",
1429
+ width: "1em",
1430
+ height: "1em"
1431
+ },
1432
+ children: [{
1433
+ tag: "path",
1434
+ attrs: {
1435
+ fill: "currentColor",
1436
+ d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z",
1437
+ fillRule: "evenodd",
1438
+ clipRule: "evenodd"
1439
+ }
1440
+ }]
1441
+ }, yr = nt(function(t, n) {
1442
+ return we($e, Object.assign({}, t, {
1307
1443
  id: "more-up-icon",
1308
- ref: t,
1309
- icon: lo
1444
+ ref: n,
1445
+ icon: si
1310
1446
  }));
1311
1447
  });
1312
- br.displayName = "MoreUpIcon";
1313
- var co = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z" } }, { tag: "path", attrs: { d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z" } }, { tag: "path", attrs: { d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z" } }, { tag: "path", attrs: { d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z" } }, { tag: "path", attrs: { d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z" } }, { tag: "path", attrs: { d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z" } }] }] }, Mr = xe(function(e, t) {
1314
- return Ie(We, Object.assign({}, e, {
1448
+ yr.displayName = "MoreUpIcon";
1449
+ const li = {
1450
+ tag: "svg",
1451
+ attrs: {
1452
+ xmlns: "http://www.w3.org/2000/svg",
1453
+ fill: "none",
1454
+ viewBox: "0 0 16 16",
1455
+ width: "1em",
1456
+ height: "1em"
1457
+ },
1458
+ children: [
1459
+ {
1460
+ tag: "path",
1461
+ attrs: {
1462
+ fill: "currentColor",
1463
+ d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z"
1464
+ }
1465
+ },
1466
+ {
1467
+ tag: "path",
1468
+ attrs: {
1469
+ fill: "currentColor",
1470
+ d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z"
1471
+ }
1472
+ },
1473
+ {
1474
+ tag: "path",
1475
+ attrs: {
1476
+ fill: "currentColor",
1477
+ d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z"
1478
+ }
1479
+ },
1480
+ {
1481
+ tag: "path",
1482
+ attrs: {
1483
+ fill: "currentColor",
1484
+ d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z"
1485
+ }
1486
+ },
1487
+ {
1488
+ tag: "path",
1489
+ attrs: {
1490
+ fill: "currentColor",
1491
+ d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z"
1492
+ }
1493
+ },
1494
+ {
1495
+ tag: "path",
1496
+ attrs: {
1497
+ fill: "currentColor",
1498
+ d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z"
1499
+ }
1500
+ }
1501
+ ]
1502
+ }, Mr = nt(function(t, n) {
1503
+ return we($e, Object.assign({}, t, {
1315
1504
  id: "sequence-icon",
1316
- ref: t,
1317
- icon: co
1505
+ ref: n,
1506
+ icon: li
1318
1507
  }));
1319
1508
  });
1320
1509
  Mr.displayName = "SequenceIcon";
1321
- function uo(e) {
1510
+ function di(e) {
1322
1511
  var d;
1323
- const t = F(ce), r = F(fn), { value: n, onChange: i, extraComponent: o } = e, [a, l] = H(!1), s = o ? r.get(o) : null;
1324
- return /* @__PURE__ */ $(ut, { children: [
1325
- /* @__PURE__ */ $(
1512
+ const t = F(de), n = F(vn), { value: r, onChange: o, extraComponent: i } = e, [a, l] = W(!1), s = i ? n.get(i) : null;
1513
+ return /* @__PURE__ */ H(ct, { children: [
1514
+ /* @__PURE__ */ H(
1326
1515
  "div",
1327
1516
  {
1328
1517
  className: "univer-mb-3 univer-flex univer-cursor-pointer univer-items-center univer-text-sm univer-text-gray-900 dark:!univer-text-white",
1329
1518
  onClick: () => l(!a),
1330
1519
  children: [
1331
1520
  t.t("dataValidation.panel.options"),
1332
- a ? /* @__PURE__ */ S(br, { className: "univer-ml-1" }) : /* @__PURE__ */ S(In, { className: "univer-ml-1" })
1521
+ a ? /* @__PURE__ */ C(yr, { className: "univer-ml-1" }) : /* @__PURE__ */ C(wn, { className: "univer-ml-1" })
1333
1522
  ]
1334
1523
  }
1335
1524
  ),
1336
- a && /* @__PURE__ */ $(ut, { children: [
1337
- s ? /* @__PURE__ */ S(s, { value: n, onChange: i }) : null,
1338
- /* @__PURE__ */ S(
1525
+ a && /* @__PURE__ */ H(ct, { children: [
1526
+ s ? /* @__PURE__ */ C(s, { value: r, onChange: o }) : null,
1527
+ /* @__PURE__ */ C(
1339
1528
  Y,
1340
1529
  {
1341
1530
  label: t.t("dataValidation.panel.invalid"),
1342
- children: /* @__PURE__ */ $(
1343
- _n,
1531
+ children: /* @__PURE__ */ H(
1532
+ fn,
1344
1533
  {
1345
- value: `${(d = n.errorStyle) != null ? d : lt.WARNING}`,
1346
- onChange: (u) => i({ ...n, errorStyle: +u }),
1534
+ value: `${(d = r.errorStyle) != null ? d : st.WARNING}`,
1535
+ onChange: (u) => o({ ...r, errorStyle: +u }),
1347
1536
  children: [
1348
- /* @__PURE__ */ S(Ae, { value: `${lt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1349
- /* @__PURE__ */ S(Ae, { value: `${lt.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1537
+ /* @__PURE__ */ C(Ae, { value: `${st.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1538
+ /* @__PURE__ */ C(Ae, { value: `${st.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1350
1539
  ]
1351
1540
  }
1352
1541
  )
1353
1542
  }
1354
1543
  ),
1355
- /* @__PURE__ */ S(
1544
+ /* @__PURE__ */ C(
1356
1545
  Y,
1357
1546
  {
1358
1547
  label: t.t("dataValidation.panel.messageInfo"),
1359
- children: /* @__PURE__ */ S(
1548
+ children: /* @__PURE__ */ C(
1360
1549
  At,
1361
1550
  {
1362
- checked: n.showErrorMessage,
1363
- onChange: () => i({
1364
- ...n,
1365
- showErrorMessage: !n.showErrorMessage
1551
+ checked: r.showErrorMessage,
1552
+ onChange: () => o({
1553
+ ...r,
1554
+ showErrorMessage: !r.showErrorMessage
1366
1555
  }),
1367
1556
  children: t.t("dataValidation.panel.showInfo")
1368
1557
  }
1369
1558
  )
1370
1559
  }
1371
1560
  ),
1372
- n.showErrorMessage ? /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(Le, { value: n.error, onChange: (u) => i({ ...n, error: u }) }) }) : null
1561
+ r.showErrorMessage ? /* @__PURE__ */ C(Y, { children: /* @__PURE__ */ C(Pe, { value: r.error, onChange: (u) => o({ ...r, error: u }) }) }) : null
1373
1562
  ] })
1374
1563
  ] });
1375
1564
  }
1376
- const ho = (e) => xr(
1377
- async (t, r, n, i) => {
1378
- const o = await e.executeCommand(t, r, n);
1379
- i == null || i(o);
1565
+ const ci = (e) => Fr(
1566
+ async (t, n, r, o) => {
1567
+ const i = await e.executeCommand(t, n, r);
1568
+ o == null || o(i);
1380
1569
  },
1381
1570
  1e3
1382
1571
  );
1383
- function go(e, t, r) {
1384
- var n, i, o, a;
1385
- return t ? ((i = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(r)) == null ? void 0 : i.getSheetId()) || "" : ((a = (o = e.getCurrentUnitForType(X.UNIVER_SHEET)) == null ? void 0 : o.getSheetBySheetName(r)) == null ? void 0 : a.getSheetId()) || "";
1572
+ function ui(e, t, n) {
1573
+ var r, o, i, a;
1574
+ return t ? ((o = (r = e.getUnit(t)) == null ? void 0 : r.getSheetBySheetName(n)) == null ? void 0 : o.getSheetId()) || "" : ((a = (i = e.getCurrentUnitForType(X.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(n)) == null ? void 0 : a.getSheetId()) || "";
1386
1575
  }
1387
- function po() {
1388
- var b, U;
1389
- const [e, t] = H(0), r = F(me), n = Pe(r.activeRule$, r.activeRule), { unitId: i, subUnitId: o, rule: a } = n || {}, l = a.uid, s = F(Me), d = F(de), u = F(fn), g = F(ee), c = F(pn), f = F(ce), [h, M] = H(a), y = s.getValidatorItem(h.type), [w, C] = H(!1), p = s.getValidatorsByScope(di.SHEET), [I, _] = H(() => h.ranges.map((m) => ({ unitId: "", sheetId: "", range: m }))), v = ct(() => ho(g), [g]), [R, A] = H(!1), [N, O] = H(!1), L = gt(null), D = F(Gn);
1390
- if (ke(() => () => {
1391
- const m = D.getCurrentLastSelection();
1392
- m && D.setSelections([m]);
1393
- }, [D]), ke(() => {
1394
- g.onCommandExecuted((m) => {
1395
- (m.id === Br.id || m.id === Wr.id) && setTimeout(() => {
1396
- const P = c.getRuleById(i, o, l);
1397
- t((x) => x + 1), P && (M(P), _(P.ranges.map((x) => ({ unitId: "", sheetId: "", range: x }))));
1576
+ function hi() {
1577
+ var M, U;
1578
+ const [e, t] = W(0), n = F(me), r = Oe(n.activeRule$, n.activeRule), { unitId: o, subUnitId: i, rule: a } = r || {}, l = a.uid, s = F(Me), d = F(le), u = F(vn), p = F(ee), c = F(pn), m = F(de), [h, b] = W(a), y = s.getValidatorItem(h.type), [w, S] = W(!1), g = s.getValidatorsByScope(lo.SHEET), [I, _] = W(() => h.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), v = dt(() => ci(p), [p]), [R, P] = W(!1), [N, T] = W(!1), L = ht(null), D = F(Gn);
1579
+ if (Le(() => () => {
1580
+ const f = D.getCurrentLastSelection();
1581
+ f && D.setSelections([f]);
1582
+ }, [D]), Le(() => {
1583
+ p.onCommandExecuted((f) => {
1584
+ (f.id === $r.id || f.id === xr.id) && setTimeout(() => {
1585
+ const A = c.getRuleById(o, i, l);
1586
+ t(($) => $ + 1), A && (b(A), _(A.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
1398
1587
  }, 20);
1399
1588
  });
1400
- }, [g, c, l, o, i]), !y)
1589
+ }, [p, c, l, i, o]), !y)
1401
1590
  return null;
1402
- const T = y.operators, k = y.operatorNames, B = h.operator ? ci.includes(h.operator) : !1, z = () => {
1403
- var m, P, x;
1404
- (P = (m = L.current) == null ? void 0 : m.editor) != null && P.isFocus() && te((x = L.current) == null ? void 0 : x.getValue()), !(!h.ranges.length || R) && (y.validatorFormula(h, i, o).success ? r.setActiveRule(null) : C(!0));
1405
- }, te = nn((m) => {
1406
- const P = m.split(",").filter(Boolean).map(Oi).map((J) => {
1407
- const Rn = J.sheetName;
1408
- if (Rn) {
1409
- const Or = go(d, J.unitId, Rn);
1410
- return { ...J, sheetId: Or };
1591
+ const O = y.operators, k = y.operatorNames, x = h.operator ? co.includes(h.operator) : !1, G = () => {
1592
+ var f, A, $;
1593
+ (A = (f = L.current) == null ? void 0 : f.editor) != null && A.isFocus() && te(($ = L.current) == null ? void 0 : $.getValue()), !(!h.ranges.length || R) && (y.validatorFormula(h, o, i).success ? n.setActiveRule(null) : S(!0));
1594
+ }, te = tn((f) => {
1595
+ const A = f.split(",").filter(Boolean).map(To).map((J) => {
1596
+ const In = J.sheetName;
1597
+ if (In) {
1598
+ const Vr = ui(d, J.unitId, In);
1599
+ return { ...J, sheetId: Vr };
1411
1600
  }
1412
1601
  return {
1413
1602
  ...J,
1414
1603
  sheetId: ""
1415
1604
  };
1416
1605
  });
1417
- if (Hr(P, I))
1606
+ if (Br(A, I))
1418
1607
  return;
1419
- _(P);
1420
- const x = P.filter((J) => (!J.unitId || J.unitId === i) && (!J.sheetId || J.sheetId === o)).map((J) => J.range);
1421
- if (M({
1608
+ _(A);
1609
+ const $ = A.filter((J) => (!J.unitId || J.unitId === o) && (!J.sheetId || J.sheetId === i)).map((J) => J.range);
1610
+ if (b({
1422
1611
  ...h,
1423
- ranges: x
1424
- }), x.length === 0)
1612
+ ranges: $
1613
+ }), $.length === 0)
1425
1614
  return;
1426
- const ue = {
1427
- unitId: i,
1428
- subUnitId: o,
1615
+ const ce = {
1616
+ unitId: o,
1617
+ subUnitId: i,
1429
1618
  ruleId: l,
1430
- ranges: x
1619
+ ranges: $
1431
1620
  };
1432
- v(rr.id, ue);
1433
- }), W = (m) => {
1434
- if (yn(m, Tn(h)))
1621
+ v(nr.id, ce);
1622
+ }), B = (f) => {
1623
+ if (Rn(f, Tn(h)))
1435
1624
  return;
1436
- M({
1625
+ b({
1437
1626
  ...h,
1438
- ...m
1627
+ ...f
1439
1628
  });
1440
- const P = {
1441
- unitId: i,
1442
- subUnitId: o,
1629
+ const A = {
1630
+ unitId: o,
1631
+ subUnitId: i,
1443
1632
  ruleId: l,
1444
- setting: m
1633
+ setting: f
1445
1634
  };
1446
1635
  v(
1447
- Dn.id,
1448
- P,
1636
+ En.id,
1637
+ A,
1449
1638
  void 0
1450
1639
  );
1451
1640
  }, ne = async () => {
1452
- await g.executeCommand(or.id, {
1641
+ await p.executeCommand(or.id, {
1453
1642
  ruleId: l,
1454
- unitId: i,
1455
- subUnitId: o
1456
- }), r.setActiveRule(null);
1457
- }, oe = {
1643
+ unitId: o,
1644
+ subUnitId: i
1645
+ }), n.setActiveRule(null);
1646
+ }, ie = {
1458
1647
  type: h.type,
1459
1648
  operator: h.operator,
1460
1649
  formula1: h.formula1,
1461
1650
  formula2: h.formula2,
1462
1651
  allowBlank: h.allowBlank
1463
- }, Se = (m) => {
1464
- const P = s.getValidatorItem(m);
1465
- if (!P)
1652
+ }, _e = (f) => {
1653
+ const A = s.getValidatorItem(f);
1654
+ if (!A)
1466
1655
  return;
1467
- const x = P.operators, ue = c.getRuleById(i, o, l), J = m === (ue == null ? void 0 : ue.type) || m.includes("list") && (ue != null && ue.type.includes("list")) ? {
1468
- ...ue,
1469
- type: m
1656
+ const $ = A.operators, ce = c.getRuleById(o, i, l), J = f === (ce == null ? void 0 : ce.type) || f.includes("list") && (ce != null && ce.type.includes("list")) ? {
1657
+ ...ce,
1658
+ type: f
1470
1659
  } : {
1471
1660
  ...h,
1472
- type: m,
1473
- operator: x[0],
1661
+ type: f,
1662
+ operator: $[0],
1474
1663
  formula1: void 0,
1475
1664
  formula2: void 0
1476
1665
  };
1477
- M(J), g.executeCommand(Dn.id, {
1478
- unitId: i,
1479
- subUnitId: o,
1666
+ b(J), p.executeCommand(En.id, {
1667
+ unitId: o,
1668
+ subUnitId: i,
1480
1669
  ruleId: h.uid,
1481
1670
  setting: Tn(J)
1482
1671
  });
1483
- }, Ce = u.get(y.formulaInput), G = ct(() => I.map((m) => vr(m.range)).join(","), []), Z = On(h), ve = (m) => {
1484
- yn(m, On(h)) || (M({
1672
+ }, Ce = u.get(y.formulaInput), z = dt(() => I.map((f) => gr(f.range)).join(","), []), Z = Vn(h), ge = (f) => {
1673
+ Rn(f, Vn(h)) || (b({
1485
1674
  ...h,
1486
- ...m
1675
+ ...f
1487
1676
  }), v(
1488
- ei.id,
1677
+ Qr.id,
1489
1678
  {
1490
- unitId: i,
1491
- subUnitId: o,
1679
+ unitId: o,
1680
+ subUnitId: i,
1492
1681
  ruleId: l,
1493
- options: m
1682
+ options: f
1494
1683
  }
1495
1684
  ));
1496
- }, q = T.length && !h.operator;
1497
- return /* @__PURE__ */ $("div", { "data-u-comp": "data-validation-detail", className: "univer-py-2", children: [
1498
- /* @__PURE__ */ S(
1685
+ }, q = O.length && !h.operator;
1686
+ return /* @__PURE__ */ H("div", { "data-u-comp": "data-validation-detail", className: "univer-py-2", children: [
1687
+ /* @__PURE__ */ C(
1499
1688
  Y,
1500
1689
  {
1501
- label: f.t("dataValidation.panel.range"),
1502
- error: !h.ranges.length || R ? f.t("dataValidation.panel.rangeError") : "",
1503
- children: /* @__PURE__ */ S(
1504
- Ti,
1690
+ label: m.t("dataValidation.panel.range"),
1691
+ error: !h.ranges.length || R ? m.t("dataValidation.panel.rangeError") : "",
1692
+ children: /* @__PURE__ */ C(
1693
+ Oo,
1505
1694
  {
1506
1695
  selectorRef: L,
1507
- unitId: i,
1508
- subUnitId: o,
1509
- initialValue: G,
1510
- onChange: (m, P) => {
1511
- var x;
1512
- !N && ((x = L.current) != null && x.verify()) && te(P);
1696
+ unitId: o,
1697
+ subUnitId: i,
1698
+ initialValue: z,
1699
+ onChange: (f, A) => {
1700
+ var $;
1701
+ !N && (($ = L.current) != null && $.verify()) && te(A);
1513
1702
  },
1514
- onFocusChange: (m, P) => {
1515
- var x;
1516
- O(m), !m && P && ((x = L.current) != null && x.verify()) && te(P);
1703
+ onFocusChange: (f, A) => {
1704
+ var $;
1705
+ T(f), !f && A && (($ = L.current) != null && $.verify()) && te(A);
1517
1706
  },
1518
- onVerify: (m) => A(!m)
1707
+ onVerify: (f) => P(!f)
1519
1708
  }
1520
1709
  )
1521
1710
  }
1522
1711
  ),
1523
- /* @__PURE__ */ S(Y, { label: f.t("dataValidation.panel.type"), children: /* @__PURE__ */ S(
1524
- kn,
1712
+ /* @__PURE__ */ C(Y, { label: m.t("dataValidation.panel.type"), children: /* @__PURE__ */ C(
1713
+ Ln,
1525
1714
  {
1526
1715
  className: "univer-w-full",
1527
1716
  value: h.type,
1528
- options: (b = p == null ? void 0 : p.sort((m, P) => m.order - P.order)) == null ? void 0 : b.map((m) => ({
1529
- label: f.t(m.title),
1530
- value: m.id
1717
+ options: (M = g == null ? void 0 : g.sort((f, A) => f.order - A.order)) == null ? void 0 : M.map((f) => ({
1718
+ label: m.t(f.title),
1719
+ value: f.id
1531
1720
  })),
1532
- onChange: Se
1721
+ onChange: _e
1533
1722
  }
1534
1723
  ) }),
1535
- T != null && T.length ? /* @__PURE__ */ S(Y, { label: f.t("dataValidation.panel.operator"), children: /* @__PURE__ */ S(
1536
- kn,
1724
+ O != null && O.length ? /* @__PURE__ */ C(Y, { label: m.t("dataValidation.panel.operator"), children: /* @__PURE__ */ C(
1725
+ Ln,
1537
1726
  {
1538
1727
  className: "univer-w-full",
1539
1728
  value: `${h.operator}`,
1540
1729
  options: [
1541
1730
  {
1542
1731
  value: "",
1543
- label: f.t("dataValidation.operators.legal")
1732
+ label: m.t("dataValidation.operators.legal")
1544
1733
  },
1545
- ...T.map((m, P) => ({
1546
- value: `${m}`,
1547
- label: k[P]
1734
+ ...O.map((f, A) => ({
1735
+ value: `${f}`,
1736
+ label: k[A]
1548
1737
  }))
1549
1738
  ],
1550
- onChange: (m) => {
1551
- W({
1552
- ...oe,
1553
- operator: m
1739
+ onChange: (f) => {
1740
+ B({
1741
+ ...ie,
1742
+ operator: f
1554
1743
  });
1555
1744
  }
1556
1745
  }
1557
1746
  ) }) : null,
1558
- Ce && !q ? /* @__PURE__ */ S(
1747
+ Ce && !q ? /* @__PURE__ */ C(
1559
1748
  Ce,
1560
1749
  {
1561
- isTwoFormula: B,
1750
+ isTwoFormula: x,
1562
1751
  value: {
1563
1752
  formula1: h.formula1,
1564
1753
  formula2: h.formula2
1565
1754
  },
1566
- onChange: (m) => {
1567
- W({
1568
- ...oe,
1569
- ...m
1755
+ onChange: (f) => {
1756
+ B({
1757
+ ...ie,
1758
+ ...f
1570
1759
  });
1571
1760
  },
1572
1761
  showError: w,
1573
- validResult: y.validatorFormula(h, i, o),
1574
- unitId: i,
1575
- subUnitId: o,
1762
+ validResult: y.validatorFormula(h, o, i),
1763
+ unitId: o,
1764
+ subUnitId: i,
1576
1765
  ruleId: l
1577
1766
  },
1578
1767
  e + h.type
1579
1768
  ) : null,
1580
- /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
1769
+ /* @__PURE__ */ C(Y, { children: /* @__PURE__ */ C(
1581
1770
  At,
1582
1771
  {
1583
1772
  checked: (U = h.allowBlank) != null ? U : !0,
1584
1773
  onChange: () => {
1585
- var m;
1586
- return W({
1587
- ...oe,
1588
- allowBlank: !((m = h.allowBlank) == null || m)
1774
+ var f;
1775
+ return B({
1776
+ ...ie,
1777
+ allowBlank: !((f = h.allowBlank) == null || f)
1589
1778
  });
1590
1779
  },
1591
- children: f.t("dataValidation.panel.allowBlank")
1780
+ children: m.t("dataValidation.panel.allowBlank")
1592
1781
  }
1593
1782
  ) }),
1594
- /* @__PURE__ */ S(uo, { value: Z, onChange: ve, extraComponent: y.optionsInput }),
1595
- /* @__PURE__ */ $("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
1596
- /* @__PURE__ */ S(Ge, { className: "univer-ml-3", onClick: ne, children: f.t("dataValidation.panel.removeRule") }),
1597
- /* @__PURE__ */ S(Ge, { className: "univer-ml-3", variant: "primary", onClick: z, children: f.t("dataValidation.panel.done") })
1783
+ /* @__PURE__ */ C(di, { value: Z, onChange: ge, extraComponent: y.optionsInput }),
1784
+ /* @__PURE__ */ H("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
1785
+ /* @__PURE__ */ C(Ke, { className: "univer-ml-3", onClick: ne, children: m.t("dataValidation.panel.removeRule") }),
1786
+ /* @__PURE__ */ C(Ke, { className: "univer-ml-3", variant: "primary", onClick: G, children: m.t("dataValidation.panel.done") })
1598
1787
  ] })
1599
1788
  ] });
1600
1789
  }
1601
- const vo = (e) => {
1602
- const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = F(Me), l = F(ee), s = F(Ei), d = a.getValidatorItem(t.type), u = gt(void 0), [g, c] = H(!1), f = F(Xn), h = Pe(f.currentTheme$), M = ct(() => {
1790
+ const pi = (e) => {
1791
+ const { rule: t, onClick: n, unitId: r, subUnitId: o, disable: i } = e, a = F(Me), l = F(ee), s = F(Eo), d = a.getValidatorItem(t.type), u = ht(void 0), [p, c] = W(!1), m = F(Yn), h = Oe(m.currentTheme$), b = dt(() => {
1603
1792
  var _;
1604
- const w = f.getColorFromTheme("primary.600"), C = f.getColorFromTheme("loop-color.2"), p = (_ = f.getColorFromTheme(C)) != null ? _ : w, I = new $r(p).toRgb();
1793
+ const w = m.getColorFromTheme("primary.600"), S = m.getColorFromTheme("loop-color.2"), g = (_ = m.getColorFromTheme(S)) != null ? _ : w, I = new Wr(g).toRgb();
1605
1794
  return {
1606
1795
  fill: `rgba(${I.r}, ${I.g}, ${I.b}, 0.1)`,
1607
- stroke: p
1796
+ stroke: g
1608
1797
  };
1609
1798
  }, [h]), y = (w) => {
1610
1799
  l.executeCommand(or.id, {
1611
1800
  ruleId: t.uid,
1612
- unitId: n,
1613
- subUnitId: i
1801
+ unitId: r,
1802
+ subUnitId: o
1614
1803
  }), w.stopPropagation();
1615
1804
  };
1616
- return ke(() => () => {
1805
+ return Le(() => () => {
1617
1806
  var w;
1618
- u.current && ((w = u.current) == null || w.forEach((C) => {
1619
- C && s.removeShape(C);
1807
+ u.current && ((w = u.current) == null || w.forEach((S) => {
1808
+ S && s.removeShape(S);
1620
1809
  }));
1621
- }, [s]), /* @__PURE__ */ $(
1810
+ }, [s]), /* @__PURE__ */ H(
1622
1811
  "div",
1623
1812
  {
1624
- className: Ne(
1813
+ className: ke(
1625
1814
  `
1626
1815
  univer-bg-secondary univer-relative univer--ml-2 univer--mr-2 univer-box-border univer-flex
1627
1816
  univer-w-[287px] univer-cursor-pointer univer-flex-col univer-justify-between univer-overflow-hidden
1628
1817
  univer-rounded-md univer-p-2 univer-pr-9
1629
1818
  `,
1630
1819
  {
1631
- "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-700": !o,
1632
- "univer-opacity-50": o
1820
+ "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-700": !i,
1821
+ "univer-opacity-50": i
1633
1822
  }
1634
1823
  ),
1635
- onClick: r,
1824
+ onClick: n,
1636
1825
  onMouseEnter: () => {
1637
- o || (c(!0), u.current = t.ranges.map((w) => s.addShape({
1826
+ i || (c(!0), u.current = t.ranges.map((w) => s.addShape({
1638
1827
  range: w,
1639
- style: M,
1828
+ style: b,
1640
1829
  primary: null
1641
1830
  })));
1642
1831
  },
1643
1832
  onMouseLeave: () => {
1644
1833
  var w;
1645
- c(!1), (w = u.current) == null || w.forEach((C) => {
1646
- C && s.removeShape(C);
1834
+ c(!1), (w = u.current) == null || w.forEach((S) => {
1835
+ S && s.removeShape(S);
1647
1836
  }), u.current = void 0;
1648
1837
  },
1649
1838
  children: [
1650
- /* @__PURE__ */ S(
1839
+ /* @__PURE__ */ C(
1651
1840
  "div",
1652
1841
  {
1653
1842
  className: "univer-truncate univer-text-sm univer-font-medium univer-leading-[22px] univer-text-gray-900 dark:!univer-text-white",
1654
1843
  children: d == null ? void 0 : d.generateRuleName(t)
1655
1844
  }
1656
1845
  ),
1657
- /* @__PURE__ */ S(
1846
+ /* @__PURE__ */ C(
1658
1847
  "div",
1659
1848
  {
1660
1849
  className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px] dark:!univer-text-gray-300",
1661
- children: t.ranges.map((w) => vr(w)).join(",")
1850
+ children: t.ranges.map((w) => gr(w)).join(",")
1662
1851
  }
1663
1852
  ),
1664
- g ? /* @__PURE__ */ S(
1853
+ p ? /* @__PURE__ */ C(
1665
1854
  "div",
1666
1855
  {
1667
1856
  className: "univer-absolute univer-right-2 univer-top-[19px] univer-flex univer-h-5 univer-w-5 univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 dark:!univer-text-gray-300 dark:hover:!univer-bg-gray-700",
1668
1857
  onClick: y,
1669
- children: /* @__PURE__ */ S(wn, {})
1858
+ children: /* @__PURE__ */ C(Sn, {})
1670
1859
  }
1671
1860
  ) : null
1672
1861
  ]
1673
1862
  }
1674
1863
  );
1675
1864
  };
1676
- function fo(e) {
1677
- const t = F(ie), r = F(de), n = F(ee), i = F(be), o = F(me), a = F(ce), [l, s] = H([]), { workbook: d } = e, u = Pe(d.activeSheet$, void 0, !0), g = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
1678
- ke(() => {
1679
- s(t.getRules(g, c));
1680
- const C = t.ruleChange$.subscribe((p) => {
1681
- p.unitId === g && p.subUnitId === c && s(t.getRules(g, c));
1865
+ function gi(e) {
1866
+ const t = F(oe), n = F(le), r = F(ee), o = F(ye), i = F(me), a = F(de), [l, s] = W([]), { workbook: d } = e, u = Oe(d.activeSheet$, void 0, !0), p = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
1867
+ Le(() => {
1868
+ s(t.getRules(p, c));
1869
+ const S = t.ruleChange$.subscribe((g) => {
1870
+ g.unitId === p && g.subUnitId === c && s(t.getRules(p, c));
1682
1871
  });
1683
1872
  return () => {
1684
- C.unsubscribe();
1873
+ S.unsubscribe();
1685
1874
  };
1686
- }, [g, c, t]);
1687
- const f = async () => {
1688
- const C = tr(i), p = {
1689
- unitId: g,
1875
+ }, [p, c, t]);
1876
+ const m = async () => {
1877
+ const S = er(o), g = {
1878
+ unitId: p,
1690
1879
  subUnitId: c,
1691
- rule: C
1880
+ rule: S
1692
1881
  };
1693
- await n.executeCommand(hn.id, p), o.setActiveRule({
1694
- unitId: g,
1882
+ await r.executeCommand(un.id, g), i.setActiveRule({
1883
+ unitId: p,
1695
1884
  subUnitId: c,
1696
- rule: C
1885
+ rule: S
1697
1886
  });
1698
1887
  }, h = () => {
1699
- n.executeCommand(ti.id, {
1700
- unitId: g,
1888
+ r.executeCommand(eo.id, {
1889
+ unitId: p,
1701
1890
  subUnitId: c
1702
1891
  });
1703
- }, y = ((C) => {
1704
- const p = r.getCurrentUnitForType(X.UNIVER_SHEET), I = p.getActiveSheet(), _ = p.getUnitId(), v = I.getSheetId();
1705
- return C.map((A) => Jr(i, _, v, A.ranges) ? { ...A } : { ...A, disable: !0 });
1706
- })(l), w = y == null ? void 0 : y.some((C) => C.disable);
1707
- return /* @__PURE__ */ $("div", { className: "univer-pb-4", children: [
1708
- y == null ? void 0 : y.map((C) => {
1709
- var p;
1710
- return /* @__PURE__ */ S(
1711
- vo,
1892
+ }, y = ((S) => {
1893
+ const g = n.getCurrentUnitForType(X.UNIVER_SHEET), I = g.getActiveSheet(), _ = g.getUnitId(), v = I.getSheetId();
1894
+ return S.map((P) => qr(o, _, v, P.ranges) ? { ...P } : { ...P, disable: !0 });
1895
+ })(l), w = y == null ? void 0 : y.some((S) => S.disable);
1896
+ return /* @__PURE__ */ H("div", { className: "univer-pb-4", children: [
1897
+ y == null ? void 0 : y.map((S) => {
1898
+ var g;
1899
+ return /* @__PURE__ */ C(
1900
+ pi,
1712
1901
  {
1713
- unitId: g,
1902
+ unitId: p,
1714
1903
  subUnitId: c,
1715
1904
  onClick: () => {
1716
- C.disable || o.setActiveRule({
1717
- unitId: g,
1905
+ S.disable || i.setActiveRule({
1906
+ unitId: p,
1718
1907
  subUnitId: c,
1719
- rule: C
1908
+ rule: S
1720
1909
  });
1721
1910
  },
1722
- rule: C,
1723
- disable: (p = C.disable) != null ? p : !1
1911
+ rule: S,
1912
+ disable: (g = S.disable) != null ? g : !1
1724
1913
  },
1725
- C.uid
1914
+ S.uid
1726
1915
  );
1727
1916
  }),
1728
- /* @__PURE__ */ $("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
1729
- l.length && !w ? /* @__PURE__ */ S(Ge, { onClick: h, children: a.t("dataValidation.panel.removeAll") }) : null,
1730
- /* @__PURE__ */ S(Ge, { variant: "primary", onClick: f, children: a.t("dataValidation.panel.add") })
1917
+ /* @__PURE__ */ H("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
1918
+ l.length && !w ? /* @__PURE__ */ C(Ke, { onClick: h, children: a.t("dataValidation.panel.removeAll") }) : null,
1919
+ /* @__PURE__ */ C(Ke, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1731
1920
  ] })
1732
1921
  ] });
1733
1922
  }
1734
- const mo = () => {
1735
- const e = F(me), t = Pe(e.activeRule$, e.activeRule), r = F(de), n = Pe(
1736
- () => r.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
1923
+ const vi = () => {
1924
+ const e = F(me), t = Oe(e.activeRule$, e.activeRule), n = F(le), r = Oe(
1925
+ () => n.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
1737
1926
  void 0,
1738
1927
  void 0,
1739
1928
  []
1740
- ), i = Pe(() => {
1741
- var o;
1742
- return (o = n == null ? void 0 : n.activeSheet$) != null ? o : mi(null);
1929
+ ), o = Oe(() => {
1930
+ var i;
1931
+ return (i = r == null ? void 0 : r.activeSheet$) != null ? i : fo(null);
1743
1932
  }, void 0, void 0, []);
1744
- return !n || !i ? null : t && t.subUnitId === i.getSheetId() ? /* @__PURE__ */ S(po, {}, t.rule.uid) : /* @__PURE__ */ S(fo, { workbook: n });
1745
- }, _o = (e) => {
1746
- const { isTwoFormula: t = !1, value: r, onChange: n, showError: i, validResult: o } = e, a = F(ce), l = i ? o == null ? void 0 : o.formula1 : "", s = i ? o == null ? void 0 : o.formula2 : "";
1747
- return t ? /* @__PURE__ */ $(ut, { children: [
1748
- /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
1749
- Le,
1933
+ return !r || !o ? null : t && t.subUnitId === o.getSheetId() ? /* @__PURE__ */ C(hi, {}, t.rule.uid) : /* @__PURE__ */ C(gi, { workbook: r });
1934
+ }, mi = (e) => {
1935
+ const { isTwoFormula: t = !1, value: n, onChange: r, showError: o, validResult: i } = e, a = F(de), l = o ? i == null ? void 0 : i.formula1 : "", s = o ? i == null ? void 0 : i.formula2 : "";
1936
+ return t ? /* @__PURE__ */ H(ct, { children: [
1937
+ /* @__PURE__ */ C(Y, { error: l, children: /* @__PURE__ */ C(
1938
+ Pe,
1750
1939
  {
1751
1940
  className: "univer-w-full",
1752
1941
  placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
1753
- value: r == null ? void 0 : r.formula1,
1942
+ value: n == null ? void 0 : n.formula1,
1754
1943
  onChange: (d) => {
1755
- n == null || n({
1756
- ...r,
1944
+ r == null || r({
1945
+ ...n,
1757
1946
  formula1: d
1758
1947
  });
1759
1948
  }
1760
1949
  }
1761
1950
  ) }),
1762
- /* @__PURE__ */ S("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
1763
- /* @__PURE__ */ S(Y, { error: s, children: /* @__PURE__ */ S(
1764
- Le,
1951
+ /* @__PURE__ */ C("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
1952
+ /* @__PURE__ */ C(Y, { error: s, children: /* @__PURE__ */ C(
1953
+ Pe,
1765
1954
  {
1766
1955
  className: "univer-w-full",
1767
1956
  placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
1768
- value: r == null ? void 0 : r.formula2,
1957
+ value: n == null ? void 0 : n.formula2,
1769
1958
  onChange: (d) => {
1770
- n == null || n({
1771
- ...r,
1959
+ r == null || r({
1960
+ ...n,
1772
1961
  formula2: d
1773
1962
  });
1774
1963
  }
1775
1964
  }
1776
1965
  ) })
1777
- ] }) : /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
1778
- Le,
1966
+ ] }) : /* @__PURE__ */ C(Y, { error: l, children: /* @__PURE__ */ C(
1967
+ Pe,
1779
1968
  {
1780
1969
  className: "univer-w-full",
1781
1970
  placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
1782
- value: r == null ? void 0 : r.formula1,
1971
+ value: n == null ? void 0 : n.formula1,
1783
1972
  onChange: (d) => {
1784
- n == null || n({ formula1: d });
1973
+ r == null || r({ formula1: d });
1785
1974
  }
1786
1975
  }
1787
1976
  ) });
1788
1977
  };
1789
- function So(e) {
1790
- const { value: t, onChange: r, showError: n, validResult: i } = e, o = F(ce), a = n ? i == null ? void 0 : i.formula1 : "", l = n ? i == null ? void 0 : i.formula2 : "", [s, d] = H(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
1791
- return /* @__PURE__ */ $(ut, { children: [
1792
- /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
1978
+ function fi(e) {
1979
+ const { value: t, onChange: n, showError: r, validResult: o } = e, i = F(de), a = r ? o == null ? void 0 : o.formula1 : "", l = r ? o == null ? void 0 : o.formula2 : "", [s, d] = W(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
1980
+ return /* @__PURE__ */ H(ct, { children: [
1981
+ /* @__PURE__ */ C(Y, { children: /* @__PURE__ */ C(
1793
1982
  At,
1794
1983
  {
1795
1984
  checked: s,
1796
1985
  onChange: (u) => {
1797
- u ? d(!0) : (d(!1), r == null || r({
1986
+ u ? d(!0) : (d(!1), n == null || n({
1798
1987
  ...t,
1799
1988
  formula1: void 0,
1800
1989
  formula2: void 0
1801
1990
  }));
1802
1991
  },
1803
- children: o.t("dataValidation.checkbox.tips")
1992
+ children: i.t("dataValidation.checkbox.tips")
1804
1993
  }
1805
1994
  ) }),
1806
- s ? /* @__PURE__ */ S(Y, { label: o.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ S(
1807
- Le,
1995
+ s ? /* @__PURE__ */ C(Y, { label: i.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ C(
1996
+ Pe,
1808
1997
  {
1809
1998
  className: "univer-w-full",
1810
- placeholder: o.t("dataValidation.panel.valuePlaceholder"),
1999
+ placeholder: i.t("dataValidation.panel.valuePlaceholder"),
1811
2000
  value: t == null ? void 0 : t.formula1,
1812
2001
  onChange: (u) => {
1813
- r == null || r({
2002
+ n == null || n({
1814
2003
  ...t,
1815
2004
  formula1: u || void 0
1816
2005
  });
1817
2006
  }
1818
2007
  }
1819
2008
  ) }) : null,
1820
- s ? /* @__PURE__ */ S(Y, { label: o.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ S(
1821
- Le,
2009
+ s ? /* @__PURE__ */ C(Y, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ C(
2010
+ Pe,
1822
2011
  {
1823
2012
  className: "univer-w-full",
1824
- placeholder: o.t("dataValidation.panel.valuePlaceholder"),
2013
+ placeholder: i.t("dataValidation.panel.valuePlaceholder"),
1825
2014
  value: t == null ? void 0 : t.formula2,
1826
2015
  onChange: (u) => {
1827
- r == null || r({
2016
+ n == null || n({
1828
2017
  ...t,
1829
2018
  formula2: u || void 0
1830
2019
  });
@@ -1833,34 +2022,34 @@ function So(e) {
1833
2022
  ) }) : null
1834
2023
  ] });
1835
2024
  }
1836
- function Co(e) {
1837
- var g;
1838
- const { unitId: t, subUnitId: r, value: n, onChange: i, showError: o, validResult: a } = e, l = o ? a == null ? void 0 : a.formula1 : void 0, s = gt(null), [d, u] = H(!1);
1839
- return cr((c) => {
2025
+ function _i(e) {
2026
+ var p;
2027
+ const { unitId: t, subUnitId: n, value: r, onChange: o, showError: i, validResult: a } = e, l = i ? a == null ? void 0 : a.formula1 : void 0, s = ht(null), [d, u] = W(!1);
2028
+ return dr((c) => {
1840
2029
  var h;
1841
2030
  ((h = s.current) == null ? void 0 : h.isClickOutSide(c)) && u(!1);
1842
- }), /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
1843
- fr,
2031
+ }), /* @__PURE__ */ C(Y, { error: l, children: /* @__PURE__ */ C(
2032
+ vr,
1844
2033
  {
1845
2034
  ref: s,
1846
- className: Ne("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", yt),
1847
- initValue: (g = n == null ? void 0 : n.formula1) != null ? g : "=",
2035
+ className: ke("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Rt),
2036
+ initValue: (p = r == null ? void 0 : r.formula1) != null ? p : "=",
1848
2037
  unitId: t,
1849
- subUnitId: r,
2038
+ subUnitId: n,
1850
2039
  isFocus: d,
1851
2040
  isSupportAcrossSheet: !0,
1852
2041
  onChange: (c) => {
1853
- const f = (c != null ? c : "").trim();
1854
- f !== (n == null ? void 0 : n.formula1) && (i == null || i({
1855
- ...n,
1856
- formula1: f
2042
+ const m = (c != null ? c : "").trim();
2043
+ m !== (r == null ? void 0 : r.formula1) && (o == null || o({
2044
+ ...r,
2045
+ formula1: m
1857
2046
  }));
1858
2047
  },
1859
2048
  onFocus: () => u(!0)
1860
2049
  }
1861
2050
  ) });
1862
2051
  }
1863
- const wo = [
2052
+ const Ci = [
1864
2053
  "#FFFFFF",
1865
2054
  "#FEE7E7",
1866
2055
  "#FEF0E6",
@@ -1885,27 +2074,27 @@ const wo = [
1885
2074
  "#3A60F7",
1886
2075
  "#9E6DE3",
1887
2076
  "#F248A6"
1888
- ], Io = (e) => {
1889
- const { value: t, onChange: r, disabled: n } = e, [i, o] = H(!1);
1890
- return /* @__PURE__ */ S(
1891
- Vi,
2077
+ ], Si = (e) => {
2078
+ const { value: t, onChange: n, disabled: r } = e, [o, i] = W(!1);
2079
+ return /* @__PURE__ */ C(
2080
+ Vo,
1892
2081
  {
1893
2082
  align: "start",
1894
- disabled: n,
1895
- open: i,
1896
- onOpenChange: o,
1897
- overlay: /* @__PURE__ */ S(
2083
+ disabled: r,
2084
+ open: o,
2085
+ onOpenChange: i,
2086
+ overlay: /* @__PURE__ */ C(
1898
2087
  "div",
1899
2088
  {
1900
2089
  className: "univer-box-border univer-grid univer-w-fit univer-grid-cols-6 univer-flex-wrap univer-gap-2 univer-p-1.5",
1901
- children: wo.map(
1902
- (a) => /* @__PURE__ */ S(
2090
+ children: Ci.map(
2091
+ (a) => /* @__PURE__ */ C(
1903
2092
  "div",
1904
2093
  {
1905
- className: Ne("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", yt),
2094
+ className: ke("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", Rt),
1906
2095
  style: { background: a },
1907
2096
  onClick: () => {
1908
- r(a), o(!1);
2097
+ n(a), i(!1);
1909
2098
  }
1910
2099
  },
1911
2100
  a
@@ -1913,221 +2102,221 @@ const wo = [
1913
2102
  )
1914
2103
  }
1915
2104
  ),
1916
- children: /* @__PURE__ */ $(
2105
+ children: /* @__PURE__ */ H(
1917
2106
  "div",
1918
2107
  {
1919
- className: Ne("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", yt),
2108
+ className: ke("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", Rt),
1920
2109
  children: [
1921
- /* @__PURE__ */ S(
2110
+ /* @__PURE__ */ C(
1922
2111
  "div",
1923
2112
  {
1924
2113
  className: "univer-box-border univer-h-4 univer-w-4 univer-rounded univer-text-base",
1925
2114
  style: { background: t }
1926
2115
  }
1927
2116
  ),
1928
- /* @__PURE__ */ S(In, {})
2117
+ /* @__PURE__ */ C(wn, {})
1929
2118
  ]
1930
2119
  }
1931
2120
  )
1932
2121
  }
1933
2122
  );
1934
- }, xn = (e) => {
1935
- const { item: t, commonProps: r, className: n } = e, { onItemChange: i, onItemDelete: o } = r;
1936
- return /* @__PURE__ */ $("div", { className: Ne("univer-flex univer-items-center univer-gap-2", n), children: [
1937
- !t.isRef && /* @__PURE__ */ S("div", { className: Ne("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(Mr, {}) }),
1938
- /* @__PURE__ */ S(
1939
- Io,
2123
+ }, Fn = (e) => {
2124
+ const { item: t, commonProps: n, className: r } = e, { onItemChange: o, onItemDelete: i } = n;
2125
+ return /* @__PURE__ */ H("div", { className: ke("univer-flex univer-items-center univer-gap-2", r), children: [
2126
+ !t.isRef && /* @__PURE__ */ C("div", { className: ke("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ C(Mr, {}) }),
2127
+ /* @__PURE__ */ C(
2128
+ Si,
1940
2129
  {
1941
2130
  value: t.color,
1942
2131
  onChange: (a) => {
1943
- i(t.id, t.label, a);
2132
+ o(t.id, t.label, a);
1944
2133
  }
1945
2134
  }
1946
2135
  ),
1947
- /* @__PURE__ */ S(
1948
- Le,
2136
+ /* @__PURE__ */ C(
2137
+ Pe,
1949
2138
  {
1950
2139
  disabled: t.isRef,
1951
2140
  value: t.label,
1952
2141
  onChange: (a) => {
1953
- i(t.id, a, t.color);
2142
+ o(t.id, a, t.color);
1954
2143
  }
1955
2144
  }
1956
2145
  ),
1957
- t.isRef ? null : /* @__PURE__ */ S(
2146
+ t.isRef ? null : /* @__PURE__ */ C(
1958
2147
  "div",
1959
2148
  {
1960
2149
  className: "univer-ml-1 univer-cursor-pointer univer-rounded univer-text-base hover:univer-bg-gray-200",
1961
- children: /* @__PURE__ */ S(wn, { onClick: () => o(t.id) })
2150
+ children: /* @__PURE__ */ C(Sn, { onClick: () => i(t.id) })
1962
2151
  }
1963
2152
  )
1964
2153
  ] });
1965
2154
  };
1966
- function Ro(e) {
1967
- const { value: t, onChange: r = () => {
1968
- }, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, g] = H(() => Ve(s) ? "1" : "0"), [c, f] = H(u === "1" ? s : "="), [h, M] = H(u === "1" ? s : "="), y = F(ce), w = F(Me), C = F(pn), p = F(ni), [I, _] = H(() => d.split(",")), v = w.getValidatorItem(j.LIST), [R, A] = H([]), [N, O] = H(""), L = a ? o == null ? void 0 : o.formula1 : "", D = ct(() => C.ruleChange$.pipe(ur(16)), []), T = Pe(D), k = nn(r);
1969
- ke(() => {
2155
+ function wi(e) {
2156
+ const { value: t, onChange: n = () => {
2157
+ }, unitId: r, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, p] = W(() => De(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [h, b] = W(u === "1" ? s : "="), y = F(de), w = F(Me), S = F(pn), g = F(to), [I, _] = W(() => d.split(",")), v = w.getValidatorItem(j.LIST), [R, P] = W([]), [N, T] = W(""), L = a ? i == null ? void 0 : i.formula1 : "", D = dt(() => S.ruleChange$.pipe(cr(16)), []), O = Oe(D), k = tn(n);
2158
+ Le(() => {
1970
2159
  (async () => {
1971
- await new Promise((m) => {
1972
- setTimeout(() => m(!0), 100);
2160
+ await new Promise((f) => {
2161
+ setTimeout(() => f(!0), 100);
1973
2162
  });
1974
- const b = C.getRuleById(n, i, l), U = b == null ? void 0 : b.formula1;
1975
- if (Ve(U) && v && b) {
1976
- const m = await v.getListAsync(b, n, i);
1977
- A(m);
2163
+ const M = S.getRuleById(r, o, l), U = M == null ? void 0 : M.formula1;
2164
+ if (De(U) && v && M) {
2165
+ const f = await v.getListAsync(M, r, o);
2166
+ P(f);
1978
2167
  }
1979
2168
  })();
1980
- }, [C, T, v, l, i, n]), ke(() => {
1981
- Ve(s) && s !== h && (f(s), M(h));
2169
+ }, [S, O, v, l, o, r]), Le(() => {
2170
+ De(s) && s !== h && (m(s), b(h));
1982
2171
  }, [h, s]);
1983
- const [B, z] = H(() => {
1984
- const b = u !== "1" ? ri(s) : [], U = d.split(",");
1985
- return b.map((m, P) => ({
1986
- label: m,
1987
- color: U[P] || Te,
2172
+ const [x, G] = W(() => {
2173
+ const M = u !== "1" ? no(s) : [], U = d.split(",");
2174
+ return M.map((f, A) => ({
2175
+ label: f,
2176
+ color: U[A] || Te,
1988
2177
  isRef: !1,
1989
- id: bn(4)
2178
+ id: yn(4)
1990
2179
  }));
1991
- }), te = (b, U, m) => {
1992
- const P = B.find((x) => x.id === b);
1993
- P && (P.label = U, P.color = m, z([...B]));
1994
- }, W = (b) => {
1995
- const U = B.findIndex((m) => m.id === b);
1996
- U !== -1 && (B.splice(U, 1), z([...B]));
1997
- }, ne = d.split(","), oe = ct(() => R.map((b, U) => ({
1998
- label: b,
2180
+ }), te = (M, U, f) => {
2181
+ const A = x.find(($) => $.id === M);
2182
+ A && (A.label = U, A.color = f, G([...x]));
2183
+ }, B = (M) => {
2184
+ const U = x.findIndex((f) => f.id === M);
2185
+ U !== -1 && (x.splice(U, 1), G([...x]));
2186
+ }, ne = d.split(","), ie = dt(() => R.map((M, U) => ({
2187
+ label: M,
1999
2188
  color: ne[U] || Te,
2000
2189
  id: `${U}`,
2001
2190
  isRef: !0
2002
- })), [ne, R]), Se = (b, U, m) => {
2003
- const P = [...I];
2004
- P[+b] = m, _(P), k({
2191
+ })), [ne, R]), _e = (M, U, f) => {
2192
+ const A = [...I];
2193
+ A[+M] = f, _(A), k({
2005
2194
  formula1: s,
2006
- formula2: P.join(",")
2195
+ formula2: A.join(",")
2007
2196
  });
2008
2197
  }, Ce = () => {
2009
- z([
2010
- ...B,
2198
+ G([
2199
+ ...x,
2011
2200
  {
2012
2201
  label: "",
2013
2202
  color: Te,
2014
2203
  isRef: !1,
2015
- id: bn(4)
2204
+ id: yn(4)
2016
2205
  }
2017
2206
  ]);
2018
2207
  };
2019
- ke(() => {
2208
+ Le(() => {
2020
2209
  if (u === "1")
2021
2210
  return;
2022
- const b = /* @__PURE__ */ new Set(), U = [];
2023
- B.map((m) => ({
2024
- labelList: m.label.split(","),
2025
- item: m
2026
- })).forEach(({ item: m, labelList: P }) => {
2027
- P.forEach((x) => {
2028
- b.has(x) || (b.add(x), U.push({
2029
- label: x,
2030
- color: m.color
2211
+ const M = /* @__PURE__ */ new Set(), U = [];
2212
+ x.map((f) => ({
2213
+ labelList: f.label.split(","),
2214
+ item: f
2215
+ })).forEach(({ item: f, labelList: A }) => {
2216
+ A.forEach(($) => {
2217
+ M.has($) || (M.add($), U.push({
2218
+ label: $,
2219
+ color: f.color
2031
2220
  }));
2032
2221
  });
2033
2222
  }), k({
2034
- formula1: er(U.map((m) => m.label)),
2035
- formula2: U.map((m) => m.color === Te ? "" : m.color).join(",")
2223
+ formula1: Qn(U.map((f) => f.label)),
2224
+ formula2: U.map((f) => f.color === Te ? "" : f.color).join(",")
2036
2225
  });
2037
- }, [B, k, u, h, I]);
2038
- const G = nn(async (b) => {
2039
- if (!Ve(b)) {
2226
+ }, [x, k, u, h, I]);
2227
+ const z = tn(async (M) => {
2228
+ if (!De(M)) {
2040
2229
  k == null || k({
2041
2230
  formula1: "",
2042
2231
  formula2: d
2043
2232
  });
2044
2233
  return;
2045
2234
  }
2046
- p.getFormulaRefCheck(b) ? (k == null || k({
2047
- formula1: Ve(b) ? b : "",
2235
+ g.getFormulaRefCheck(M) ? (k == null || k({
2236
+ formula1: De(M) ? M : "",
2048
2237
  formula2: d
2049
- }), O("")) : (k == null || k({
2238
+ }), T("")) : (k == null || k({
2050
2239
  formula1: "",
2051
2240
  formula2: d
2052
- }), f("="), O(y.t("dataValidation.validFail.formulaError")));
2053
- }), Z = gt(null), [ve, q] = H(!1);
2054
- return cr((b) => {
2055
- var m;
2056
- ((m = Z.current) == null ? void 0 : m.isClickOutSide(b)) && q(!1);
2057
- }), /* @__PURE__ */ $(ut, { children: [
2058
- /* @__PURE__ */ S(Y, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ $(
2059
- _n,
2241
+ }), m("="), T(y.t("dataValidation.validFail.formulaError")));
2242
+ }), Z = ht(null), [ge, q] = W(!1);
2243
+ return dr((M) => {
2244
+ var f;
2245
+ ((f = Z.current) == null ? void 0 : f.isClickOutSide(M)) && q(!1);
2246
+ }), /* @__PURE__ */ H(ct, { children: [
2247
+ /* @__PURE__ */ C(Y, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ H(
2248
+ fn,
2060
2249
  {
2061
2250
  value: u,
2062
- onChange: (b) => {
2063
- g(b), f(h), b === "1" && k({
2251
+ onChange: (M) => {
2252
+ p(M), m(h), M === "1" && k({
2064
2253
  formula1: h === "=" ? "" : h,
2065
2254
  formula2: I.join(",")
2066
2255
  });
2067
2256
  },
2068
2257
  children: [
2069
- /* @__PURE__ */ S(Ae, { value: "0", children: y.t("dataValidation.list.customOptions") }),
2070
- /* @__PURE__ */ S(Ae, { value: "1", children: y.t("dataValidation.list.refOptions") })
2258
+ /* @__PURE__ */ C(Ae, { value: "0", children: y.t("dataValidation.list.customOptions") }),
2259
+ /* @__PURE__ */ C(Ae, { value: "1", children: y.t("dataValidation.list.refOptions") })
2071
2260
  ]
2072
2261
  }
2073
2262
  ) }),
2074
- u === "1" ? /* @__PURE__ */ $(Y, { error: L || N || void 0, children: [
2075
- /* @__PURE__ */ S(
2076
- fr,
2263
+ u === "1" ? /* @__PURE__ */ H(Y, { error: L || N || void 0, children: [
2264
+ /* @__PURE__ */ C(
2265
+ vr,
2077
2266
  {
2078
2267
  ref: Z,
2079
- className: Ne("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", yt),
2268
+ className: ke("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Rt),
2080
2269
  initValue: c,
2081
- unitId: n,
2082
- subUnitId: i,
2083
- isFocus: ve,
2270
+ unitId: r,
2271
+ subUnitId: o,
2272
+ isFocus: ge,
2084
2273
  isSupportAcrossSheet: !0,
2085
2274
  onFocus: () => q(!0),
2086
- onChange: (b = "") => {
2087
- const U = (b != null ? b : "").trim();
2088
- M(U), G(U);
2275
+ onChange: (M = "") => {
2276
+ const U = (M != null ? M : "").trim();
2277
+ b(U), z(U);
2089
2278
  }
2090
2279
  }
2091
2280
  ),
2092
- oe.length > 0 && /* @__PURE__ */ S("div", { className: "univer-mt-3", children: oe.map((b) => /* @__PURE__ */ S(
2093
- xn,
2281
+ ie.length > 0 && /* @__PURE__ */ C("div", { className: "univer-mt-3", children: ie.map((M) => /* @__PURE__ */ C(
2282
+ Fn,
2094
2283
  {
2095
2284
  className: "univer-mb-3",
2096
- item: b,
2097
- commonProps: { onItemChange: Se }
2285
+ item: M,
2286
+ commonProps: { onItemChange: _e }
2098
2287
  },
2099
- b.id
2288
+ M.id
2100
2289
  )) })
2101
- ] }) : /* @__PURE__ */ S(Y, { error: L, children: /* @__PURE__ */ $("div", { className: "-univer-mt-3", children: [
2102
- /* @__PURE__ */ S(
2103
- Di,
2290
+ ] }) : /* @__PURE__ */ C(Y, { error: L, children: /* @__PURE__ */ H("div", { className: "-univer-mt-3", children: [
2291
+ /* @__PURE__ */ C(
2292
+ Do,
2104
2293
  {
2105
- list: B,
2106
- onListChange: z,
2294
+ list: x,
2295
+ onListChange: G,
2107
2296
  rowHeight: 28,
2108
2297
  margin: [0, 12],
2109
2298
  draggableHandle: ".draggableHandle",
2110
- itemRender: (b) => /* @__PURE__ */ S(
2111
- xn,
2299
+ itemRender: (M) => /* @__PURE__ */ C(
2300
+ Fn,
2112
2301
  {
2113
- item: b,
2302
+ item: M,
2114
2303
  commonProps: {
2115
2304
  onItemChange: te,
2116
- onItemDelete: W
2305
+ onItemDelete: B
2117
2306
  }
2118
2307
  },
2119
- b.id
2308
+ M.id
2120
2309
  ),
2121
2310
  idKey: "id"
2122
2311
  }
2123
2312
  ),
2124
- /* @__PURE__ */ $(
2313
+ /* @__PURE__ */ H(
2125
2314
  "a",
2126
2315
  {
2127
2316
  className: "univer-text-primary univer-flex univer-w-fit univer-cursor-pointer univer-flex-row univer-items-center univer-rounded univer-p-1 univer-px-2 univer-text-sm hover:univer-bg-primary-50 dark:hover:!univer-bg-gray-800",
2128
2317
  onClick: Ce,
2129
2318
  children: [
2130
- /* @__PURE__ */ S(yr, { className: "univer-mr-1" }),
2319
+ /* @__PURE__ */ C(Rr, { className: "univer-mr-1" }),
2131
2320
  y.t("dataValidation.list.add")
2132
2321
  ]
2133
2322
  }
@@ -2135,129 +2324,129 @@ function Ro(e) {
2135
2324
  ] }) })
2136
2325
  ] });
2137
2326
  }
2138
- const yo = [
2327
+ const Ii = [
2139
2328
  [
2140
- ar,
2141
- Co
2329
+ ir,
2330
+ _i
2142
2331
  ],
2143
2332
  [
2144
- Pt,
2145
- _o
2333
+ Ot,
2334
+ mi
2146
2335
  ],
2147
2336
  [
2148
- gn,
2149
- Ro
2337
+ hn,
2338
+ wi
2150
2339
  ],
2151
2340
  [
2152
- sr,
2153
- So
2341
+ ar,
2342
+ fi
2154
2343
  ]
2155
- ], bo = "LIST_RENDER_MODE_OPTION_INPUT";
2156
- function Dt(e) {
2157
- var i;
2158
- const { value: t, onChange: r } = e, n = F(ce);
2159
- return /* @__PURE__ */ S(Y, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ $(_n, { value: `${(i = t.renderMode) != null ? i : ae.CUSTOM}`, onChange: (o) => r({ ...t, renderMode: +o }), children: [
2160
- /* @__PURE__ */ S(Ae, { value: `${ae.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2161
- /* @__PURE__ */ S(Ae, { value: `${ae.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2162
- /* @__PURE__ */ S(Ae, { value: `${ae.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2344
+ ], Ri = "LIST_RENDER_MODE_OPTION_INPUT";
2345
+ function Et(e) {
2346
+ var o;
2347
+ const { value: t, onChange: n } = e, r = F(de);
2348
+ return /* @__PURE__ */ C(Y, { label: r.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ H(fn, { value: `${(o = t.renderMode) != null ? o : ae.CUSTOM}`, onChange: (i) => n({ ...t, renderMode: +i }), children: [
2349
+ /* @__PURE__ */ C(Ae, { value: `${ae.CUSTOM}`, children: r.t("dataValidation.renderMode.chip") }),
2350
+ /* @__PURE__ */ C(Ae, { value: `${ae.ARROW}`, children: r.t("dataValidation.renderMode.arrow") }),
2351
+ /* @__PURE__ */ C(Ae, { value: `${ae.TEXT}`, children: r.t("dataValidation.renderMode.text") })
2163
2352
  ] }) });
2164
2353
  }
2165
- Dt.componentKey = bo;
2166
- const Mo = "DATE_SHOW_TIME_OPTION";
2167
- function Vt(e) {
2168
- var i;
2169
- const { value: t, onChange: r } = e, n = F(ce);
2170
- return /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
2354
+ Et.componentKey = Ri;
2355
+ const yi = "DATE_SHOW_TIME_OPTION";
2356
+ function Dt(e) {
2357
+ var o;
2358
+ const { value: t, onChange: n } = e, r = F(de);
2359
+ return /* @__PURE__ */ C(Y, { children: /* @__PURE__ */ C(
2171
2360
  At,
2172
2361
  {
2173
- checked: (i = t.bizInfo) == null ? void 0 : i.showTime,
2174
- onChange: (o) => {
2175
- r({
2362
+ checked: (o = t.bizInfo) == null ? void 0 : o.showTime,
2363
+ onChange: (i) => {
2364
+ n({
2176
2365
  ...t,
2177
2366
  bizInfo: {
2178
2367
  ...t.bizInfo,
2179
- showTime: o
2368
+ showTime: i
2180
2369
  }
2181
2370
  });
2182
2371
  },
2183
- children: n.t("dataValidation.showTime.label")
2372
+ children: r.t("dataValidation.showTime.label")
2184
2373
  }
2185
2374
  ) });
2186
2375
  }
2187
- Vt.componentKey = Mo;
2188
- var Eo = Object.getOwnPropertyDescriptor, Do = (e, t, r, n) => {
2189
- for (var i = n > 1 ? void 0 : n ? Eo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2190
- (a = e[o]) && (i = a(i) || i);
2191
- return i;
2192
- }, je = (e, t) => (r, n) => t(r, n, e);
2193
- const _t = 6;
2194
- let on = class {
2195
- constructor(e, t, r, n, i, o) {
2196
- this._commandService = e, this._univerInstanceService = t, this._formulaService = r, this._themeService = n, this._renderManagerService = i, this._dataValidationModel = o;
2376
+ Dt.componentKey = yi;
2377
+ var Mi = Object.getOwnPropertyDescriptor, bi = (e, t, n, r) => {
2378
+ for (var o = r > 1 ? void 0 : r ? Mi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2379
+ (a = e[i]) && (o = a(o) || o);
2380
+ return o;
2381
+ }, We = (e, t) => (n, r) => t(n, r, e);
2382
+ const ft = 6;
2383
+ let rn = class {
2384
+ constructor(e, t, n, r, o, i) {
2385
+ this._commandService = e, this._univerInstanceService = t, this._formulaService = n, this._themeService = r, this._renderManagerService = o, this._dataValidationModel = i;
2197
2386
  }
2198
2387
  _calc(e, t) {
2199
- var d, u, g;
2200
- const { vt: r, ht: n } = t || {}, i = e.endX - e.startX - _t * 2, o = e.endY - e.startY, a = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
2388
+ var d, u, p;
2389
+ const { vt: n, ht: r } = t || {}, o = e.endX - e.startX - ft * 2, i = e.endY - e.startY, a = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
2201
2390
  let l = 0, s = 0;
2202
- switch (r) {
2203
- case le.TOP:
2391
+ switch (n) {
2392
+ case se.TOP:
2204
2393
  s = 0;
2205
2394
  break;
2206
- case le.BOTTOM:
2207
- s = 0 + (o - a);
2395
+ case se.BOTTOM:
2396
+ s = 0 + (i - a);
2208
2397
  break;
2209
2398
  default:
2210
- s = 0 + (o - a) / 2;
2399
+ s = 0 + (i - a) / 2;
2211
2400
  break;
2212
2401
  }
2213
- switch (n) {
2214
- case Re.LEFT:
2215
- l = _t;
2402
+ switch (r) {
2403
+ case Ie.LEFT:
2404
+ l = ft;
2216
2405
  break;
2217
- case Re.RIGHT:
2218
- l = _t + (i - a);
2406
+ case Ie.RIGHT:
2407
+ l = ft + (o - a);
2219
2408
  break;
2220
2409
  default:
2221
- l = _t + (i - a) / 2;
2410
+ l = ft + (o - a) / 2;
2222
2411
  break;
2223
2412
  }
2224
2413
  return {
2225
2414
  left: e.startX + l,
2226
2415
  top: e.startY + s,
2227
2416
  width: ((u = t == null ? void 0 : t.fs) != null ? u : 10) * 1.6,
2228
- height: ((g = t == null ? void 0 : t.fs) != null ? g : 10) * 1.6
2417
+ height: ((p = t == null ? void 0 : t.fs) != null ? p : 10) * 1.6
2229
2418
  };
2230
2419
  }
2231
2420
  calcCellAutoHeight(e) {
2232
- var r;
2421
+ var n;
2233
2422
  const { style: t } = e;
2234
- return ((r = t == null ? void 0 : t.fs) != null ? r : 10) * 1.6;
2423
+ return ((n = t == null ? void 0 : t.fs) != null ? n : 10) * 1.6;
2235
2424
  }
2236
2425
  calcCellAutoWidth(e) {
2237
- var r;
2426
+ var n;
2238
2427
  const { style: t } = e;
2239
- return ((r = t == null ? void 0 : t.fs) != null ? r : 10) * 1.6;
2428
+ return ((n = t == null ? void 0 : t.fs) != null ? n : 10) * 1.6;
2240
2429
  }
2241
- async _parseFormula(e, t, r) {
2242
- var d, u, g, c, f, h, M, y, w;
2243
- const { formula1: n = ai, formula2: i = oi } = e, o = await this._formulaService.getRuleFormulaResult(t, r, e.uid), a = Ft((g = (u = (d = o == null ? void 0 : o[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : g[0]), l = Ft((h = (f = (c = o == null ? void 0 : o[1]) == null ? void 0 : c.result) == null ? void 0 : f[0]) == null ? void 0 : h[0]), s = Vn(String(a)) && Vn(String(l));
2430
+ async _parseFormula(e, t, n) {
2431
+ var d, u, p, c, m, h, b, y, w;
2432
+ const { formula1: r = io, formula2: o = oo } = e, i = await this._formulaService.getRuleFormulaResult(t, n, e.uid), a = Ut((p = (u = (d = i == null ? void 0 : i[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : p[0]), l = Ut((h = (m = (c = i == null ? void 0 : i[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : h[0]), s = Dn(String(a)) && Dn(String(l));
2244
2433
  return {
2245
- formula1: Ve(n) ? Ft((w = (y = (M = o == null ? void 0 : o[0]) == null ? void 0 : M.result) == null ? void 0 : y[0]) == null ? void 0 : w[0]) : n,
2246
- formula2: Ve(i) ? l : i,
2434
+ formula1: De(r) ? Ut((w = (y = (b = i == null ? void 0 : i[0]) == null ? void 0 : b.result) == null ? void 0 : y[0]) == null ? void 0 : w[0]) : r,
2435
+ formula2: De(o) ? l : o,
2247
2436
  isFormulaValid: s
2248
2437
  };
2249
2438
  }
2250
2439
  drawWith(e, t) {
2251
- var L, D, T, k;
2252
- const { style: r, primaryWithCoord: n, unitId: i, subUnitId: o, worksheet: a, row: l, col: s } = t, d = n.isMergedMainCell ? n.mergeInfo : n, u = re(a.getCellRaw(l, s)), g = this._dataValidationModel.getRuleByLocation(i, o, l, s);
2253
- if (!g)
2440
+ var L, D, O, k;
2441
+ const { style: n, primaryWithCoord: r, unitId: o, subUnitId: i, worksheet: a, row: l, col: s } = t, d = r.isMergedMainCell ? r.mergeInfo : r, u = re(a.getCellRaw(l, s)), p = this._dataValidationModel.getRuleByLocation(o, i, l, s);
2442
+ if (!p)
2254
2443
  return;
2255
- const c = this._dataValidationModel.getValidator(g.type);
2256
- if (!c || !((L = c.skipDefaultFontRender) != null && L.call(c, g, u, { unitId: i, subUnitId: o, row: l, column: s })))
2444
+ const c = this._dataValidationModel.getValidator(p.type);
2445
+ if (!c || !((L = c.skipDefaultFontRender) != null && L.call(c, p, u, { unitId: o, subUnitId: i, row: l, column: s })))
2257
2446
  return;
2258
- const f = c.parseFormulaSync(g, i, o), { formula1: h } = f, M = this._calc(d, r), { a: y, d: w } = e.getTransform(), C = Mn(M.left, y), p = Mn(M.top, w), I = Yr.create().composeMatrix({
2259
- left: C,
2260
- top: p,
2447
+ const m = c.parseFormulaSync(p, o, i), { formula1: h } = m, b = this._calc(d, n), { a: y, d: w } = e.getTransform(), S = Mn(b.left, y), g = Mn(b.top, w), I = jr.create().composeMatrix({
2448
+ left: S,
2449
+ top: g,
2261
2450
  scaleX: 1,
2262
2451
  scaleY: 1,
2263
2452
  angle: 0,
@@ -2269,176 +2458,176 @@ let on = class {
2269
2458
  e.save(), e.beginPath(), e.rect(d.startX, d.startY, _, v), e.clip();
2270
2459
  const R = I.getMatrix();
2271
2460
  e.transform(R[0], R[1], R[2], R[3], R[4], R[5]);
2272
- const A = ((D = r == null ? void 0 : r.fs) != null ? D : 10) * 1.6, N = String(u) === String(h), O = this._themeService.getColorFromTheme("primary.600");
2273
- Xr.drawWith(e, {
2461
+ const P = ((D = n == null ? void 0 : n.fs) != null ? D : 10) * 1.6, N = String(u) === String(h), T = this._themeService.getColorFromTheme("primary.600");
2462
+ Yr.drawWith(e, {
2274
2463
  checked: N,
2275
- width: A,
2276
- height: A,
2277
- fill: (k = (T = r == null ? void 0 : r.cl) == null ? void 0 : T.rgb) != null ? k : O
2464
+ width: P,
2465
+ height: P,
2466
+ fill: (k = (O = n == null ? void 0 : n.cl) == null ? void 0 : O.rgb) != null ? k : T
2278
2467
  }), e.restore();
2279
2468
  }
2280
2469
  isHit(e, t) {
2281
- const r = t.primaryWithCoord.isMergedMainCell ? t.primaryWithCoord.mergeInfo : t.primaryWithCoord, n = this._calc(r, t.style), i = n.top, o = n.top + n.height, a = n.left, l = n.left + n.width, { x: s, y: d } = e;
2282
- return s <= l && s >= a && d <= o && d >= i;
2470
+ const n = t.primaryWithCoord.isMergedMainCell ? t.primaryWithCoord.mergeInfo : t.primaryWithCoord, r = this._calc(n, t.style), o = r.top, i = r.top + r.height, a = r.left, l = r.left + r.width, { x: s, y: d } = e;
2471
+ return s <= l && s >= a && d <= i && d >= o;
2283
2472
  }
2284
2473
  async onPointerDown(e, t) {
2285
2474
  var h;
2286
2475
  if (t.button === 2)
2287
2476
  return;
2288
- const { primaryWithCoord: r, unitId: n, subUnitId: i, worksheet: o, row: a, col: l } = e, s = re(o.getCellRaw(a, l)), d = this._dataValidationModel.getRuleByLocation(n, i, a, l);
2477
+ const { primaryWithCoord: n, unitId: r, subUnitId: o, worksheet: i, row: a, col: l } = e, s = re(i.getCellRaw(a, l)), d = this._dataValidationModel.getRuleByLocation(r, o, a, l);
2289
2478
  if (!d)
2290
2479
  return;
2291
2480
  const u = this._dataValidationModel.getValidator(d.type);
2292
- if (!u || !((h = u.skipDefaultFontRender) != null && h.call(u, d, s, { unitId: n, subUnitId: i, row: a, column: l })))
2481
+ if (!u || !((h = u.skipDefaultFontRender) != null && h.call(u, d, s, { unitId: r, subUnitId: o, row: a, column: l })))
2293
2482
  return;
2294
- const { formula1: g, formula2: c } = await this._parseFormula(d, n, i), f = {
2483
+ const { formula1: p, formula2: c } = await this._parseFormula(d, r, o), m = {
2295
2484
  range: {
2296
- startColumn: r.actualColumn,
2297
- endColumn: r.actualColumn,
2298
- startRow: r.actualRow,
2299
- endRow: r.actualRow
2485
+ startColumn: n.actualColumn,
2486
+ endColumn: n.actualColumn,
2487
+ startRow: n.actualRow,
2488
+ endRow: n.actualRow
2300
2489
  },
2301
2490
  value: {
2302
- v: String(s) === si(String(g)) ? c : g,
2491
+ v: String(s) === ao(String(p)) ? c : p,
2303
2492
  p: null
2304
2493
  }
2305
2494
  };
2306
2495
  this._commandService.executeCommand(
2307
- st.id,
2308
- f
2496
+ at.id,
2497
+ m
2309
2498
  );
2310
2499
  }
2311
2500
  onPointerEnter(e, t) {
2312
- var r, n;
2313
- (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(ze.POINTER);
2501
+ var n, r;
2502
+ (r = (n = Xe(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ze.POINTER);
2314
2503
  }
2315
2504
  onPointerLeave(e, t) {
2316
- var r, n;
2317
- (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(ze.DEFAULT);
2505
+ var n, r;
2506
+ (r = (n = Xe(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ze.DEFAULT);
2318
2507
  }
2319
2508
  };
2320
- on = Do([
2321
- je(0, ee),
2322
- je(1, de),
2323
- je(2, E(ii)),
2324
- je(3, E(Xn)),
2325
- je(4, E(Fe)),
2326
- je(5, E(ie))
2327
- ], on);
2328
- var Vo = Object.getOwnPropertyDescriptor, Oo = (e, t, r, n) => {
2329
- for (var i = n > 1 ? void 0 : n ? Vo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2330
- (a = e[o]) && (i = a(i) || i);
2331
- return i;
2332
- }, To = (e, t) => (r, n) => t(r, n, e);
2333
- let _e = class {
2509
+ rn = bi([
2510
+ We(0, ee),
2511
+ We(1, le),
2512
+ We(2, E(ro)),
2513
+ We(3, E(Yn)),
2514
+ We(4, E(Ue)),
2515
+ We(5, E(oe))
2516
+ ], rn);
2517
+ var Ei = Object.getOwnPropertyDescriptor, Di = (e, t, n, r) => {
2518
+ for (var o = r > 1 ? void 0 : r ? Ei(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2519
+ (a = e[i]) && (o = a(o) || o);
2520
+ return o;
2521
+ }, Vi = (e, t) => (n, r) => t(n, r, e);
2522
+ let fe = class {
2334
2523
  constructor(e) {
2335
2524
  V(this, "canvasRender", null);
2336
2525
  V(this, "dropdownType");
2337
2526
  V(this, "optionsInput");
2338
- V(this, "formulaInput", gn);
2527
+ V(this, "formulaInput", hn);
2339
2528
  this.injector = e;
2340
2529
  }
2341
2530
  };
2342
- _e = Oo([
2343
- To(0, E(be))
2344
- ], _e);
2345
- class Po extends _e {
2531
+ fe = Di([
2532
+ Vi(0, E(ye))
2533
+ ], fe);
2534
+ class Ti extends fe {
2346
2535
  constructor() {
2347
2536
  super(...arguments);
2348
2537
  V(this, "id", j.CHECKBOX);
2349
- V(this, "canvasRender", this.injector.createInstance(on));
2350
- V(this, "formulaInput", sr);
2538
+ V(this, "canvasRender", this.injector.createInstance(rn));
2539
+ V(this, "formulaInput", ar);
2351
2540
  }
2352
2541
  }
2353
- class Ao extends _e {
2542
+ class Oi extends fe {
2354
2543
  constructor() {
2355
2544
  super(...arguments);
2356
2545
  V(this, "id", j.CUSTOM);
2357
- V(this, "formulaInput", ar);
2546
+ V(this, "formulaInput", ir);
2358
2547
  }
2359
2548
  }
2360
- const Lo = "data-validation.formula-input";
2361
- class ko extends _e {
2549
+ const Ai = "data-validation.formula-input";
2550
+ class Pi extends fe {
2362
2551
  constructor() {
2363
2552
  super(...arguments);
2364
2553
  V(this, "id", j.DATE);
2365
- V(this, "formulaInput", Lo);
2366
- V(this, "optionsInput", Vt.componentKey);
2554
+ V(this, "formulaInput", Ai);
2555
+ V(this, "optionsInput", Dt.componentKey);
2367
2556
  V(this, "dropdownType", pe.DATE);
2368
2557
  }
2369
2558
  }
2370
- class No extends _e {
2559
+ class Li extends fe {
2371
2560
  constructor() {
2372
2561
  super(...arguments);
2373
2562
  V(this, "id", j.DECIMAL);
2374
- V(this, "formulaInput", Pt);
2563
+ V(this, "formulaInput", Ot);
2375
2564
  }
2376
2565
  }
2377
- const Er = 4, Uo = 0, $t = 4, Dr = 4, an = 6, Ot = 6, De = 14;
2378
- function Fo(e, t) {
2379
- const r = Zr.getTextSize(e, t), n = r.width + Er * 2, { ba: i, bd: o } = r, a = i + o;
2566
+ const br = 4, ki = 0, Wt = 4, Er = 4, on = 6, Vt = 6, Ee = 14;
2567
+ function Ni(e, t) {
2568
+ const n = Xr.getTextSize(e, t), r = n.width + br * 2, { ba: o, bd: i } = n, a = o + i;
2380
2569
  return {
2381
- width: n,
2382
- height: a + Uo * 2,
2383
- ba: i
2570
+ width: r,
2571
+ height: a + ki * 2,
2572
+ ba: o
2384
2573
  };
2385
2574
  }
2386
- function jt(e, t, r, n) {
2387
- const i = De + an * 2, o = r - i, a = n - Ot * 2, l = e.map((c) => ({
2388
- layout: Fo(c, t),
2575
+ function Ht(e, t, n, r) {
2576
+ const o = Ee + on * 2, i = n - o, a = r - Vt * 2, l = e.map((c) => ({
2577
+ layout: Ni(c, t),
2389
2578
  text: c
2390
2579
  }));
2391
2580
  let s;
2392
2581
  const d = [];
2393
2582
  l.forEach((c) => {
2394
- const { layout: f } = c, { width: h, height: M } = f;
2395
- !s || s.width + h + $t > o ? (s = {
2583
+ const { layout: m } = c, { width: h, height: b } = m;
2584
+ !s || s.width + h + Wt > i ? (s = {
2396
2585
  width: h,
2397
- height: M,
2586
+ height: b,
2398
2587
  items: [{
2399
2588
  ...c,
2400
2589
  left: 0
2401
2590
  }]
2402
2591
  }, d.push(s)) : (s.items.push({
2403
2592
  ...c,
2404
- left: s.width + $t
2405
- }), s.width = s.width + h + $t);
2593
+ left: s.width + Wt
2594
+ }), s.width = s.width + h + Wt);
2406
2595
  });
2407
- let u = 0, g = 0;
2408
- return d.forEach((c, f) => {
2409
- g = Math.max(g, c.width), f === d.length - 1 ? u += c.height : u += c.height + Dr;
2596
+ let u = 0, p = 0;
2597
+ return d.forEach((c, m) => {
2598
+ p = Math.max(p, c.width), m === d.length - 1 ? u += c.height : u += c.height + Er;
2410
2599
  }), {
2411
2600
  lines: d,
2412
2601
  totalHeight: u,
2413
- contentWidth: o,
2602
+ contentWidth: i,
2414
2603
  contentHeight: a,
2415
- cellAutoHeight: u + Ot * 2,
2416
- calcAutoWidth: g + i
2604
+ cellAutoHeight: u + Vt * 2,
2605
+ calcAutoWidth: p + o
2417
2606
  };
2418
2607
  }
2419
- const xo = 8;
2420
- class Bo extends Kr {
2421
- static drawWith(t, r) {
2422
- const { fontString: n, info: i, fill: o, color: a } = r, { layout: l, text: s } = i;
2423
- t.save(), zn.drawWith(t, {
2608
+ const Ui = 8;
2609
+ class Fi extends Zr {
2610
+ static drawWith(t, n) {
2611
+ const { fontString: r, info: o, fill: i, color: a } = n, { layout: l, text: s } = o;
2612
+ t.save(), Kn.drawWith(t, {
2424
2613
  width: l.width,
2425
2614
  height: l.height,
2426
- radius: xo,
2427
- fill: o || Te
2428
- }), t.translateWithPrecision(Er, l.ba), t.font = n, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
2615
+ radius: Ui,
2616
+ fill: i || Te
2617
+ }), t.translateWithPrecision(br, l.ba), t.font = r, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
2429
2618
  }
2430
2619
  }
2431
- var Wo = Object.getOwnPropertyDescriptor, Ho = (e, t, r, n) => {
2432
- for (var i = n > 1 ? void 0 : n ? Wo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2433
- (a = e[o]) && (i = a(i) || i);
2434
- return i;
2435
- }, St = (e, t) => (r, n) => t(r, n, e);
2436
- const $o = 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");
2437
- let sn = class {
2438
- constructor(e, t, r, n) {
2620
+ var $i = Object.getOwnPropertyDescriptor, xi = (e, t, n, r) => {
2621
+ for (var o = r > 1 ? void 0 : r ? $i(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2622
+ (a = e[i]) && (o = a(o) || o);
2623
+ return o;
2624
+ }, _t = (e, t) => (n, r) => t(n, r, e);
2625
+ const Bi = 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");
2626
+ let an = class {
2627
+ constructor(e, t, n, r) {
2439
2628
  V(this, "zIndex");
2440
2629
  V(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2441
- this._commandService = e, this._univerInstanceService = t, this._renderManagerService = r, this._dataValidationModel = n;
2630
+ this._commandService = e, this._univerInstanceService = t, this._renderManagerService = n, this._dataValidationModel = r;
2442
2631
  }
2443
2632
  _ensureMap(e) {
2444
2633
  let t = this._dropdownInfoMap.get(e);
@@ -2447,23 +2636,23 @@ let sn = class {
2447
2636
  _generateKey(e, t) {
2448
2637
  return `${e}.${t}`;
2449
2638
  }
2450
- _drawDownIcon(e, t, r, n, i) {
2451
- const o = r - De + 4;
2639
+ _drawDownIcon(e, t, n, r, o) {
2640
+ const i = n - Ee + 4;
2452
2641
  let a = 4;
2453
- switch (i) {
2454
- case le.MIDDLE:
2455
- a = (n - De) / 2 + 4;
2642
+ switch (o) {
2643
+ case se.MIDDLE:
2644
+ a = (r - Ee) / 2 + 4;
2456
2645
  break;
2457
- case le.BOTTOM:
2458
- a = n - De + 4;
2646
+ case se.BOTTOM:
2647
+ a = r - Ee + 4;
2459
2648
  break;
2460
2649
  }
2461
- e.save(), e.translateWithPrecision(t.startX + o, t.startY + a), e.fillStyle = "#565656", e.fill($o), e.restore();
2650
+ e.save(), e.translateWithPrecision(t.startX + i, t.startY + a), e.fillStyle = "#565656", e.fill(Bi), e.restore();
2462
2651
  }
2463
2652
  // eslint-disable-next-line max-lines-per-function
2464
- drawWith(e, t, r, n) {
2465
- var oe, Se;
2466
- const { primaryWithCoord: i, row: o, col: a, style: l, data: s, subUnitId: d } = t, u = i.isMergedMainCell ? i.mergeInfo : i, g = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: f = 0, topOffset: h = 0, downOffset: M = 0 } = g || {}, y = this._ensureMap(d), w = this._generateKey(o, a), C = i.isMergedMainCell ? i.mergeInfo.startRow : o, p = i.isMergedMainCell ? i.mergeInfo.startColumn : a, I = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, C, p);
2653
+ drawWith(e, t, n, r) {
2654
+ var ie, _e;
2655
+ const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: d } = t, u = o.isMergedMainCell ? o.mergeInfo : o, p = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: m = 0, topOffset: h = 0, downOffset: b = 0 } = p || {}, y = this._ensureMap(d), w = this._generateKey(i, a), S = o.isMergedMainCell ? o.mergeInfo.startRow : i, g = o.isMergedMainCell ? o.mergeInfo.startColumn : a, I = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, S, g);
2467
2656
  if (!I)
2468
2657
  return;
2469
2658
  const _ = this._dataValidationModel.getValidator(I.type);
@@ -2471,157 +2660,157 @@ let sn = class {
2471
2660
  return;
2472
2661
  const v = {
2473
2662
  startX: u.startX + c,
2474
- endX: u.endX - f,
2663
+ endX: u.endX - m,
2475
2664
  startY: u.startY + h,
2476
- endY: u.endY - M
2477
- }, R = v.endX - v.startX, A = v.endY - v.startY, { cl: N } = l || {}, O = (oe = typeof N == "object" ? N == null ? void 0 : N.rgb : N) != null ? oe : "#000", L = Oe(l != null ? l : void 0), { vt: D, ht: T } = l || {}, k = D != null ? D : le.MIDDLE, B = (Se = re(s)) != null ? Se : "", z = _.parseCellValue(B), te = _.getListWithColorMap(I), W = jt(z, L, R, A);
2478
- this._drawDownIcon(e, v, R, A, k), e.save(), e.translateWithPrecision(v.startX, v.startY), e.beginPath(), e.rect(0, 0, R - De, A), e.clip(), e.translateWithPrecision(an, Ot);
2665
+ endY: u.endY - b
2666
+ }, R = v.endX - v.startX, P = v.endY - v.startY, { cl: N } = l || {}, T = (ie = typeof N == "object" ? N == null ? void 0 : N.rgb : N) != null ? ie : "#000", L = Ve(l != null ? l : void 0), { vt: D, ht: O } = l || {}, k = D != null ? D : se.MIDDLE, x = (_e = re(s)) != null ? _e : "", G = _.parseCellValue(x), te = _.getListWithColorMap(I), B = Ht(G, L, R, P);
2667
+ this._drawDownIcon(e, v, R, P, k), e.save(), e.translateWithPrecision(v.startX, v.startY), e.beginPath(), e.rect(0, 0, R - Ee, P), e.clip(), e.translateWithPrecision(on, Vt);
2479
2668
  let ne = 0;
2480
2669
  switch (k) {
2481
- case le.MIDDLE:
2482
- ne = (W.contentHeight - W.totalHeight) / 2;
2670
+ case se.MIDDLE:
2671
+ ne = (B.contentHeight - B.totalHeight) / 2;
2483
2672
  break;
2484
- case le.BOTTOM:
2485
- ne = W.contentHeight - W.totalHeight;
2673
+ case se.BOTTOM:
2674
+ ne = B.contentHeight - B.totalHeight;
2486
2675
  break;
2487
2676
  }
2488
- e.translateWithPrecision(0, ne), W.lines.forEach((Ce, G) => {
2677
+ e.translateWithPrecision(0, ne), B.lines.forEach((Ce, z) => {
2489
2678
  e.save();
2490
- const { width: Z, height: ve, items: q } = Ce;
2491
- let b = 0;
2492
- switch (T) {
2493
- case Re.RIGHT:
2494
- b = W.contentWidth - Z;
2679
+ const { width: Z, height: ge, items: q } = Ce;
2680
+ let M = 0;
2681
+ switch (O) {
2682
+ case Ie.RIGHT:
2683
+ M = B.contentWidth - Z;
2495
2684
  break;
2496
- case Re.CENTER:
2497
- b = (W.contentWidth - Z) / 2;
2685
+ case Ie.CENTER:
2686
+ M = (B.contentWidth - Z) / 2;
2498
2687
  break;
2499
2688
  }
2500
- e.translate(b, G * (ve + Dr)), q.forEach((U) => {
2501
- e.save(), e.translateWithPrecision(U.left, 0), Bo.drawWith(e, {
2689
+ e.translate(M, z * (ge + Er)), q.forEach((U) => {
2690
+ e.save(), e.translateWithPrecision(U.left, 0), Fi.drawWith(e, {
2502
2691
  ...L,
2503
2692
  info: U,
2504
- color: O,
2693
+ color: T,
2505
2694
  fill: te[U.text]
2506
2695
  }), e.restore();
2507
2696
  }), e.restore();
2508
2697
  }), e.restore(), y.set(w, {
2509
2698
  left: v.startX,
2510
2699
  top: v.startY,
2511
- width: W.contentWidth + an + De,
2512
- height: W.contentHeight + Ot * 2
2700
+ width: B.contentWidth + on + Ee,
2701
+ height: B.contentHeight + Vt * 2
2513
2702
  });
2514
2703
  }
2515
2704
  calcCellAutoHeight(e) {
2516
2705
  var _;
2517
- const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, g = t.isMergedMainCell ? t.mergeInfo : t, c = {
2518
- startX: g.startX + l,
2519
- endX: g.endX - s,
2520
- startY: g.startY + d,
2521
- endY: g.endY - u
2522
- }, f = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, o);
2523
- if (!f)
2706
+ const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = r == null ? void 0 : r.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, p = t.isMergedMainCell ? t.mergeInfo : t, c = {
2707
+ startX: p.startX + l,
2708
+ endX: p.endX - s,
2709
+ startY: p.startY + d,
2710
+ endY: p.endY - u
2711
+ }, m = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2712
+ if (!m)
2524
2713
  return;
2525
- const h = this._dataValidationModel.getValidator(f.type);
2714
+ const h = this._dataValidationModel.getValidator(m.type);
2526
2715
  if (!h)
2527
2716
  return;
2528
- const M = c.endX - c.startX, y = c.endY - c.startY, w = (_ = re(n)) != null ? _ : "", C = h.parseCellValue(w), p = Oe(r != null ? r : void 0);
2529
- return jt(C, p, M, y).cellAutoHeight;
2717
+ const b = c.endX - c.startX, y = c.endY - c.startY, w = (_ = re(r)) != null ? _ : "", S = h.parseCellValue(w), g = Ve(n != null ? n : void 0);
2718
+ return Ht(S, g, b, y).cellAutoHeight;
2530
2719
  }
2531
2720
  calcCellAutoWidth(e) {
2532
2721
  var _;
2533
- const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, g = t.isMergedMainCell ? t.mergeInfo : t, c = {
2534
- startX: g.startX + l,
2535
- endX: g.endX - s,
2536
- startY: g.startY + d,
2537
- endY: g.endY - u
2538
- }, f = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, o);
2539
- if (!f)
2722
+ const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = r == null ? void 0 : r.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, p = t.isMergedMainCell ? t.mergeInfo : t, c = {
2723
+ startX: p.startX + l,
2724
+ endX: p.endX - s,
2725
+ startY: p.startY + d,
2726
+ endY: p.endY - u
2727
+ }, m = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2728
+ if (!m)
2540
2729
  return;
2541
- const h = this._dataValidationModel.getValidator(f.type);
2730
+ const h = this._dataValidationModel.getValidator(m.type);
2542
2731
  if (!h)
2543
2732
  return;
2544
- const M = c.endX - c.startX, y = c.endY - c.startY, w = (_ = re(n)) != null ? _ : "", C = h.parseCellValue(w), p = Oe(r != null ? r : void 0);
2545
- return jt(C, p, M, y).calcAutoWidth;
2733
+ const b = c.endX - c.startX, y = c.endY - c.startY, w = (_ = re(r)) != null ? _ : "", S = h.parseCellValue(w), g = Ve(n != null ? n : void 0);
2734
+ return Ht(S, g, b, y).calcAutoWidth;
2546
2735
  }
2547
2736
  isHit(e, t) {
2548
- const { primaryWithCoord: r } = t, n = r.isMergedMainCell ? r.mergeInfo : r, { endX: i } = n, { x: o } = e;
2549
- return o >= i - De && o <= i;
2737
+ const { primaryWithCoord: n } = t, r = n.isMergedMainCell ? n.mergeInfo : n, { endX: o } = r, { x: i } = e;
2738
+ return i >= o - Ee && i <= o;
2550
2739
  }
2551
2740
  onPointerDown(e, t) {
2552
2741
  if (t.button === 2)
2553
2742
  return;
2554
- const { unitId: r, subUnitId: n, row: i, col: o } = e, a = {
2555
- unitId: r,
2556
- subUnitId: n,
2557
- row: i,
2558
- column: o
2743
+ const { unitId: n, subUnitId: r, row: o, col: i } = e, a = {
2744
+ unitId: n,
2745
+ subUnitId: r,
2746
+ row: o,
2747
+ column: i
2559
2748
  };
2560
- this._commandService.executeCommand(Lt.id, a);
2749
+ this._commandService.executeCommand(Pt.id, a);
2561
2750
  }
2562
2751
  onPointerEnter(e, t) {
2563
- var r, n;
2564
- return (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(ze.POINTER);
2752
+ var n, r;
2753
+ return (r = (n = Xe(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(Ze.POINTER);
2565
2754
  }
2566
2755
  onPointerLeave(e, t) {
2567
- var r, n;
2568
- return (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(ze.DEFAULT);
2756
+ var n, r;
2757
+ return (r = (n = Xe(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null ? void 0 : r.setCursor(Ze.DEFAULT);
2569
2758
  }
2570
2759
  };
2571
- sn = Ho([
2572
- St(0, ee),
2573
- St(1, de),
2574
- St(2, E(Fe)),
2575
- St(3, E(ie))
2576
- ], sn);
2577
- class jo extends _e {
2760
+ an = xi([
2761
+ _t(0, ee),
2762
+ _t(1, le),
2763
+ _t(2, E(Ue)),
2764
+ _t(3, E(oe))
2765
+ ], an);
2766
+ class Wi extends fe {
2578
2767
  constructor() {
2579
2768
  super(...arguments);
2580
2769
  V(this, "id", j.LIST_MULTIPLE);
2581
- V(this, "canvasRender", this.injector.createInstance(sn));
2770
+ V(this, "canvasRender", this.injector.createInstance(an));
2582
2771
  V(this, "dropdownType", pe.MULTIPLE_LIST);
2583
2772
  }
2584
2773
  }
2585
- var Yo = Object.getOwnPropertyDescriptor, Xo = (e, t, r, n) => {
2586
- for (var i = n > 1 ? void 0 : n ? Yo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2587
- (a = e[o]) && (i = a(i) || i);
2588
- return i;
2589
- }, at = (e, t) => (r, n) => t(r, n, e);
2590
- const Ye = 4, Ct = 4, ge = 14, Yt = 1, we = 6, Xe = 3, Xt = 8, Zo = "#565656", Bn = 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");
2591
- function Wn(e, t, r, n, i, o, a = !0) {
2774
+ var Hi = Object.getOwnPropertyDescriptor, ji = (e, t, n, r) => {
2775
+ for (var o = r > 1 ? void 0 : r ? Hi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
2776
+ (a = e[i]) && (o = a(o) || o);
2777
+ return o;
2778
+ }, it = (e, t) => (n, r) => t(n, r, e);
2779
+ const He = 4, Ct = 4, he = 14, jt = 1, Se = 6, je = 3, Yt = 8, Yi = "#565656", $n = 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");
2780
+ function xn(e, t, n, r, o, i, a = !0) {
2592
2781
  let l = 0;
2593
- const s = a ? Xe : 0;
2594
- switch (i) {
2595
- case le.BOTTOM:
2596
- l = t - n - s;
2782
+ const s = a ? je : 0;
2783
+ switch (o) {
2784
+ case se.BOTTOM:
2785
+ l = t - r - s;
2597
2786
  break;
2598
- case le.MIDDLE:
2599
- l = (t - n) / 2;
2787
+ case se.MIDDLE:
2788
+ l = (t - r) / 2;
2600
2789
  break;
2601
2790
  default:
2602
2791
  l = s;
2603
2792
  break;
2604
2793
  }
2605
- l = Math.max(Xe, l);
2794
+ l = Math.max(je, l);
2606
2795
  let d = 0;
2607
- switch (o) {
2608
- case Re.CENTER:
2609
- d = (e - r) / 2;
2796
+ switch (i) {
2797
+ case Ie.CENTER:
2798
+ d = (e - n) / 2;
2610
2799
  break;
2611
- case Re.RIGHT:
2612
- d = e - r;
2800
+ case Ie.RIGHT:
2801
+ d = e - n;
2613
2802
  break;
2614
2803
  }
2615
- return d = Math.max(we, d), {
2804
+ return d = Math.max(Se, d), {
2616
2805
  paddingLeft: d,
2617
2806
  paddingTop: l
2618
2807
  };
2619
2808
  }
2620
- let ln = class {
2621
- constructor(e, t, r, n, i) {
2809
+ let sn = class {
2810
+ constructor(e, t, n, r, o) {
2622
2811
  V(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2623
2812
  V(this, "zIndex");
2624
- this._univerInstanceService = e, this._localeService = t, this._commandService = r, this._renderManagerService = n, this._dataValidationModel = i;
2813
+ this._univerInstanceService = e, this._localeService = t, this._commandService = n, this._renderManagerService = r, this._dataValidationModel = o;
2625
2814
  }
2626
2815
  _ensureMap(e) {
2627
2816
  let t = this._dropdownInfoMap.get(e);
@@ -2630,243 +2819,243 @@ let ln = class {
2630
2819
  _generateKey(e, t) {
2631
2820
  return `${e}.${t}`;
2632
2821
  }
2633
- _drawDownIcon(e, t, r, n, i, o, a) {
2634
- const { t: l = Q.pd.t, b: s = Q.pd.b } = a, d = r - ge;
2822
+ _drawDownIcon(e, t, n, r, o, i, a) {
2823
+ const { t: l = Q.pd.t, b: s = Q.pd.b } = a, d = n - he;
2635
2824
  let u;
2636
- switch (o) {
2637
- case le.MIDDLE:
2638
- u = (n - Ct) / 2;
2825
+ switch (i) {
2826
+ case se.MIDDLE:
2827
+ u = (r - Ct) / 2;
2639
2828
  break;
2640
- case le.BOTTOM:
2641
- u = n - s - i - Xe + (i / 2 - Ct / 2);
2829
+ case se.BOTTOM:
2830
+ u = r - s - o - je + (o / 2 - Ct / 2);
2642
2831
  break;
2643
2832
  default:
2644
- u = l + Xe + (i / 2 - Ct / 2);
2833
+ u = l + je + (o / 2 - Ct / 2);
2645
2834
  break;
2646
2835
  }
2647
- e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill(Bn), e.restore();
2836
+ e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill($n), e.restore();
2648
2837
  }
2649
2838
  // eslint-disable-next-line max-lines-per-function, complexity
2650
- drawWith(e, t, r) {
2651
- var te, W, ne, oe, Se, Ce;
2652
- const { primaryWithCoord: n, row: i, col: o, style: a, data: l, subUnitId: s } = t, d = n.isMergedMainCell ? n.mergeInfo : n, u = n.isMergedMainCell ? n.mergeInfo.startRow : i, g = n.isMergedMainCell ? n.mergeInfo.startColumn : o, c = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, u, g);
2839
+ drawWith(e, t, n) {
2840
+ var te, B, ne, ie, _e, Ce;
2841
+ const { primaryWithCoord: r, row: o, col: i, style: a, data: l, subUnitId: s } = t, d = r.isMergedMainCell ? r.mergeInfo : r, u = r.isMergedMainCell ? r.mergeInfo.startRow : o, p = r.isMergedMainCell ? r.mergeInfo.startColumn : i, c = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, u, p);
2653
2842
  if (!c)
2654
2843
  return;
2655
- const f = this._dataValidationModel.getValidator(c.type);
2656
- if (!f)
2844
+ const m = this._dataValidationModel.getValidator(c.type);
2845
+ if (!m)
2657
2846
  return;
2658
- const h = l == null ? void 0 : l.fontRenderExtension, { leftOffset: M = 0, rightOffset: y = 0, topOffset: w = 0, downOffset: C = 0 } = h || {};
2659
- if (!c || !f || !f || f.id.indexOf(j.LIST) !== 0 || !f.skipDefaultFontRender(c))
2847
+ const h = l == null ? void 0 : l.fontRenderExtension, { leftOffset: b = 0, rightOffset: y = 0, topOffset: w = 0, downOffset: S = 0 } = h || {};
2848
+ if (!c || !m || !m || m.id.indexOf(j.LIST) !== 0 || !m.skipDefaultFontRender(c))
2660
2849
  return;
2661
- const p = {
2662
- startX: d.startX + M,
2850
+ const g = {
2851
+ startX: d.startX + b,
2663
2852
  endX: d.endX - y,
2664
2853
  startY: d.startY + w,
2665
- endY: d.endY - C
2666
- }, I = p.endX - p.startX, _ = p.endY - p.startY, v = this._ensureMap(s), R = this._generateKey(i, o), A = f.getListWithColor(c), N = re(l), O = `${N != null ? N : ""}`, L = A.find((G) => G.label === O);
2667
- let { tb: D, vt: T, ht: k, pd: B } = a || {};
2668
- D = D != null ? D : fe.WRAP, T = T != null ? T : le.BOTTOM, k = k != null ? k : Q.ht, B = B != null ? B : Q.pd;
2669
- const z = Oe(a).fontCache;
2854
+ endY: d.endY - S
2855
+ }, I = g.endX - g.startX, _ = g.endY - g.startY, v = this._ensureMap(s), R = this._generateKey(o, i), P = m.getListWithColor(c), N = re(l), T = `${N != null ? N : ""}`, L = P.find((z) => z.label === T);
2856
+ let { tb: D, vt: O, ht: k, pd: x } = a || {};
2857
+ D = D != null ? D : ve.WRAP, O = O != null ? O : se.BOTTOM, k = k != null ? k : Q.ht, x = x != null ? x : Q.pd;
2858
+ const G = Ve(a).fontCache;
2670
2859
  if (c.renderMode === ae.ARROW) {
2671
- const { l: G = Q.pd.l, t: Z = Q.pd.t, r: ve = Q.pd.r, b: q = Q.pd.b } = B, b = I - G - ve - ge - 4, U = new it(
2672
- O,
2673
- z,
2674
- D === fe.WRAP,
2675
- b,
2860
+ const { l: z = Q.pd.l, t: Z = Q.pd.t, r: ge = Q.pd.r, b: q = Q.pd.b } = x, M = I - z - ge - he - 4, U = new rt(
2861
+ T,
2862
+ G,
2863
+ D === ve.WRAP,
2864
+ M,
2676
2865
  1 / 0
2677
2866
  );
2678
2867
  U.calculate();
2679
- const m = U.getTotalWidth(), P = U.getTotalHeight(), { paddingTop: x, paddingLeft: ue } = Wn(b, _ - Z - q, m, P, T, k, !0);
2680
- this._drawDownIcon(e, p, I, _, P, T, B), e.save(), e.translateWithPrecision(p.startX + G, p.startY + Z), e.beginPath(), e.rect(0, 0, I - G - ve, _ - Z - q), e.clip(), e.translateWithPrecision(0, x), e.save(), e.translateWithPrecision(ue, 0), e.beginPath(), e.rect(0, 0, b, P), e.clip(), En.drawWith(e, {
2681
- text: O,
2682
- fontStyle: z,
2683
- width: b,
2684
- height: P,
2868
+ const f = U.getTotalWidth(), A = U.getTotalHeight(), { paddingTop: $, paddingLeft: ce } = xn(M, _ - Z - q, f, A, O, k, !0);
2869
+ this._drawDownIcon(e, g, I, _, A, O, x), e.save(), e.translateWithPrecision(g.startX + z, g.startY + Z), e.beginPath(), e.rect(0, 0, I - z - ge, _ - Z - q), e.clip(), e.translateWithPrecision(0, $), e.save(), e.translateWithPrecision(ce, 0), e.beginPath(), e.rect(0, 0, M, A), e.clip(), bn.drawWith(e, {
2870
+ text: T,
2871
+ fontStyle: G,
2872
+ width: M,
2873
+ height: A,
2685
2874
  color: (te = a == null ? void 0 : a.cl) == null ? void 0 : te.rgb,
2686
- strokeLine: !!((W = a == null ? void 0 : a.st) != null && W.s),
2875
+ strokeLine: !!((B = a == null ? void 0 : a.st) != null && B.s),
2687
2876
  underline: !!((ne = a == null ? void 0 : a.ul) != null && ne.s),
2688
- warp: D === fe.WRAP,
2689
- hAlign: Re.LEFT
2877
+ warp: D === ve.WRAP,
2878
+ hAlign: Ie.LEFT
2690
2879
  }, U), e.restore(), e.restore(), v.set(R, {
2691
- left: p.endX - ge + r.rowHeaderWidth,
2692
- top: p.startY + Z + r.columnHeaderHeight,
2693
- width: ge,
2880
+ left: g.endX - he + n.rowHeaderWidth,
2881
+ top: g.startY + Z + n.columnHeaderHeight,
2882
+ width: he,
2694
2883
  height: _ - Z - q
2695
2884
  });
2696
2885
  } else {
2697
- e.save(), e.translateWithPrecision(p.startX, p.startY), e.beginPath(), e.rect(0, 0, I, _), e.clip();
2698
- const G = I - we * 2 - Ye - ge - 4, Z = new it(
2699
- O,
2700
- z,
2701
- D === fe.WRAP,
2886
+ e.save(), e.translateWithPrecision(g.startX, g.startY), e.beginPath(), e.rect(0, 0, I, _), e.clip();
2887
+ const z = I - Se * 2 - He - he - 4, Z = new rt(
2888
+ T,
2702
2889
  G,
2890
+ D === ve.WRAP,
2891
+ z,
2703
2892
  1 / 0
2704
2893
  );
2705
2894
  Z.calculate();
2706
- const ve = Z.getTotalWidth(), q = Z.getTotalHeight(), b = q + Yt * 2, U = Math.max(I - we * 2, 1), { paddingTop: m } = Wn(U, _, ve, b, T, k);
2707
- e.translateWithPrecision(we, m), zn.drawWith(e, {
2895
+ const ge = Z.getTotalWidth(), q = Z.getTotalHeight(), M = q + jt * 2, U = Math.max(I - Se * 2, 1), { paddingTop: f } = xn(U, _, ge, M, O, k);
2896
+ e.translateWithPrecision(Se, f), Kn.drawWith(e, {
2708
2897
  width: U,
2709
- height: b,
2898
+ height: M,
2710
2899
  fill: (L == null ? void 0 : L.color) || Te,
2711
- radius: Xt
2712
- }), e.save(), e.translateWithPrecision(Ye, Yt), e.beginPath(), e.rect(0, 0, G, q), e.clip(), En.drawWith(e, {
2713
- text: O,
2714
- fontStyle: z,
2715
- width: G,
2900
+ radius: Yt
2901
+ }), e.save(), e.translateWithPrecision(He, jt), e.beginPath(), e.rect(0, 0, z, q), e.clip(), bn.drawWith(e, {
2902
+ text: T,
2903
+ fontStyle: G,
2904
+ width: z,
2716
2905
  height: q,
2717
- color: (oe = a == null ? void 0 : a.cl) == null ? void 0 : oe.rgb,
2718
- strokeLine: !!((Se = a == null ? void 0 : a.st) != null && Se.s),
2906
+ color: (ie = a == null ? void 0 : a.cl) == null ? void 0 : ie.rgb,
2907
+ strokeLine: !!((_e = a == null ? void 0 : a.st) != null && _e.s),
2719
2908
  underline: !!((Ce = a == null ? void 0 : a.ul) != null && Ce.s),
2720
- warp: D === fe.WRAP,
2721
- hAlign: Re.LEFT
2722
- }, Z), e.restore(), e.translateWithPrecision(G + Ye + 4, (q - Ct) / 2), e.fillStyle = Zo, e.fill(Bn), e.restore(), v.set(R, {
2723
- left: p.startX + we + r.rowHeaderWidth,
2724
- top: p.startY + m + r.columnHeaderHeight,
2909
+ warp: D === ve.WRAP,
2910
+ hAlign: Ie.LEFT
2911
+ }, Z), e.restore(), e.translateWithPrecision(z + He + 4, (q - Ct) / 2), e.fillStyle = Yi, e.fill($n), e.restore(), v.set(R, {
2912
+ left: g.startX + Se + n.rowHeaderWidth,
2913
+ top: g.startY + f + n.columnHeaderHeight,
2725
2914
  width: U,
2726
- height: b
2915
+ height: M
2727
2916
  });
2728
2917
  }
2729
2918
  }
2730
2919
  calcCellAutoHeight(e) {
2731
- const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: g = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, o);
2920
+ const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = r == null ? void 0 : r.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: p = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2732
2921
  if (!c || c.renderMode === ae.TEXT)
2733
2922
  return;
2734
- const f = {
2923
+ const m = {
2735
2924
  startX: a.startX + s,
2736
2925
  endX: a.endX - d,
2737
2926
  startY: a.startY + u,
2738
- endY: a.endY - g
2739
- }, h = f.endX - f.startX, M = re(n), y = `${M != null ? M : ""}`;
2740
- let { tb: w, pd: C } = r || {};
2741
- const { t: p = Q.pd.t, b: I = Q.pd.b } = C != null ? C : {};
2742
- if (w = w != null ? w : fe.WRAP, c.renderMode === ae.ARROW) {
2743
- const { l: _ = Q.pd.l, r: v = Q.pd.r } = C != null ? C : {}, R = h - _ - v - ge - 4, A = new it(
2927
+ endY: a.endY - p
2928
+ }, h = m.endX - m.startX, b = re(r), y = `${b != null ? b : ""}`;
2929
+ let { tb: w, pd: S } = n || {};
2930
+ const { t: g = Q.pd.t, b: I = Q.pd.b } = S != null ? S : {};
2931
+ if (w = w != null ? w : ve.WRAP, c.renderMode === ae.ARROW) {
2932
+ const { l: _ = Q.pd.l, r: v = Q.pd.r } = S != null ? S : {}, R = h - _ - v - he - 4, P = new rt(
2744
2933
  y,
2745
- Oe(r).fontCache,
2746
- w === fe.WRAP,
2934
+ Ve(n).fontCache,
2935
+ w === ve.WRAP,
2747
2936
  R,
2748
2937
  1 / 0
2749
2938
  );
2750
- return A.calculate(), A.getTotalHeight() + p + I + Xe * 2;
2939
+ return P.calculate(), P.getTotalHeight() + g + I + je * 2;
2751
2940
  } else {
2752
- const _ = Math.max(h - we * 2 - Ye - ge - 4, 10), v = new it(
2941
+ const _ = Math.max(h - Se * 2 - He - he - 4, 10), v = new rt(
2753
2942
  y,
2754
- Oe(r).fontCache,
2755
- w === fe.WRAP,
2943
+ Ve(n).fontCache,
2944
+ w === ve.WRAP,
2756
2945
  _,
2757
2946
  1 / 0
2758
2947
  );
2759
- return v.calculate(), v.getTotalHeight() + Xe * 2 + Yt * 2;
2948
+ return v.calculate(), v.getTotalHeight() + je * 2 + jt * 2;
2760
2949
  }
2761
2950
  }
2762
2951
  calcCellAutoWidth(e) {
2763
- const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: g = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, o);
2952
+ const { primaryWithCoord: t, style: n, data: r, row: o, col: i } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = r == null ? void 0 : r.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: p = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, o, i);
2764
2953
  if (!c || c.renderMode === ae.TEXT)
2765
2954
  return;
2766
- const f = {
2955
+ const m = {
2767
2956
  startX: a.startX + s,
2768
2957
  endX: a.endX - d,
2769
2958
  startY: a.startY + u,
2770
- endY: a.endY - g
2771
- }, h = f.endX - f.startX, M = re(n), y = `${M != null ? M : ""}`;
2772
- let { tb: w, pd: C } = r || {};
2773
- const { l: p = Q.pd.l, r: I = Q.pd.r } = C != null ? C : {};
2774
- w = w != null ? w : fe.WRAP;
2775
- let _ = we * 2 + ge;
2959
+ endY: a.endY - p
2960
+ }, h = m.endX - m.startX, b = re(r), y = `${b != null ? b : ""}`;
2961
+ let { tb: w, pd: S } = n || {};
2962
+ const { l: g = Q.pd.l, r: I = Q.pd.r } = S != null ? S : {};
2963
+ w = w != null ? w : ve.WRAP;
2964
+ let _ = Se * 2 + he;
2776
2965
  switch (c.renderMode) {
2777
2966
  case ae.ARROW:
2778
- _ = ge + 4 + I + p;
2967
+ _ = he + 4 + I + g;
2779
2968
  break;
2780
2969
  case ae.CUSTOM:
2781
- _ = ge + we * 2 + Ye * 2 + I + p + Xt / 2 + 1;
2970
+ _ = he + Se * 2 + He * 2 + I + g + Yt / 2 + 1;
2782
2971
  break;
2783
2972
  // default is CUSTOM
2784
2973
  default:
2785
- _ = ge + we * 2 + Ye * 2 + I + p + Xt / 2 + 1;
2974
+ _ = he + Se * 2 + He * 2 + I + g + Yt / 2 + 1;
2786
2975
  }
2787
- const v = h - _, R = new it(
2976
+ const v = h - _, R = new rt(
2788
2977
  y,
2789
- Oe(r).fontCache,
2790
- w === fe.WRAP,
2978
+ Ve(n).fontCache,
2979
+ w === ve.WRAP,
2791
2980
  v,
2792
2981
  1 / 0
2793
2982
  );
2794
2983
  return R.calculate(), R.getTotalWidth() + _;
2795
2984
  }
2796
2985
  isHit(e, t) {
2797
- const { subUnitId: r, row: n, col: i } = t, a = this._ensureMap(r).get(this._generateKey(n, i)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, n, i);
2986
+ const { subUnitId: n, row: r, col: o } = t, a = this._ensureMap(n).get(this._generateKey(r, o)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, r, o);
2798
2987
  if (!l || !a || l.renderMode === ae.TEXT)
2799
2988
  return !1;
2800
- const { top: s, left: d, width: u, height: g } = a, { x: c, y: f } = e;
2801
- return c >= d && c <= d + u && f >= s && f <= s + g;
2989
+ const { top: s, left: d, width: u, height: p } = a, { x: c, y: m } = e;
2990
+ return c >= d && c <= d + u && m >= s && m <= s + p;
2802
2991
  }
2803
2992
  onPointerDown(e, t) {
2804
2993
  if (t.button === 2)
2805
2994
  return;
2806
- const { unitId: r, subUnitId: n, row: i, col: o } = e, a = {
2807
- unitId: r,
2808
- subUnitId: n,
2809
- row: i,
2810
- column: o
2995
+ const { unitId: n, subUnitId: r, row: o, col: i } = e, a = {
2996
+ unitId: n,
2997
+ subUnitId: r,
2998
+ row: o,
2999
+ column: i
2811
3000
  };
2812
- this._commandService.executeCommand(Lt.id, a);
3001
+ this._commandService.executeCommand(Pt.id, a);
2813
3002
  }
2814
3003
  onPointerEnter(e, t) {
2815
- var r, n;
2816
- (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(ze.POINTER);
3004
+ var n, r;
3005
+ (r = (n = Xe(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ze.POINTER);
2817
3006
  }
2818
3007
  onPointerLeave(e, t) {
2819
- var r, n;
2820
- (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(ze.DEFAULT);
3008
+ var n, r;
3009
+ (r = (n = Xe(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : n.mainComponent) == null || r.setCursor(Ze.DEFAULT);
2821
3010
  }
2822
3011
  };
2823
- ln = Xo([
2824
- at(0, de),
2825
- at(1, E(ce)),
2826
- at(2, ee),
2827
- at(3, E(Fe)),
2828
- at(4, E(ie))
2829
- ], ln);
2830
- class Ko extends _e {
3012
+ sn = ji([
3013
+ it(0, le),
3014
+ it(1, E(de)),
3015
+ it(2, ee),
3016
+ it(3, E(Ue)),
3017
+ it(4, E(oe))
3018
+ ], sn);
3019
+ class Xi extends fe {
2831
3020
  constructor() {
2832
3021
  super(...arguments);
2833
3022
  V(this, "id", j.LIST);
2834
- V(this, "canvasRender", this.injector.createInstance(ln));
3023
+ V(this, "canvasRender", this.injector.createInstance(sn));
2835
3024
  V(this, "dropdownType", pe.LIST);
2836
- V(this, "optionsInput", Dt.componentKey);
2837
- V(this, "formulaInput", gn);
3025
+ V(this, "optionsInput", Et.componentKey);
3026
+ V(this, "formulaInput", hn);
2838
3027
  }
2839
3028
  }
2840
- class zo extends _e {
3029
+ class Zi extends fe {
2841
3030
  constructor() {
2842
3031
  super(...arguments);
2843
3032
  V(this, "id", j.TEXT_LENGTH);
2844
- V(this, "formulaInput", Pt);
3033
+ V(this, "formulaInput", Ot);
2845
3034
  }
2846
3035
  }
2847
- class Go extends _e {
3036
+ class Ki extends fe {
2848
3037
  constructor() {
2849
3038
  super(...arguments);
2850
3039
  V(this, "id", j.WHOLE);
2851
- V(this, "formulaInput", Pt);
3040
+ V(this, "formulaInput", Ot);
2852
3041
  }
2853
3042
  }
2854
- var qo = Object.getOwnPropertyDescriptor, Jo = (e, t, r, n) => {
2855
- for (var i = n > 1 ? void 0 : n ? qo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2856
- (a = e[o]) && (i = a(i) || i);
2857
- return i;
2858
- }, Zt = (e, t) => (r, n) => t(r, n, e);
2859
- let nt = class extends cn {
2860
- constructor(e, t, r) {
2861
- super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = r, this._initComponents(), this._registerValidatorViews();
3043
+ var Gi = Object.getOwnPropertyDescriptor, zi = (e, t, n, r) => {
3044
+ for (var o = r > 1 ? void 0 : r ? Gi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3045
+ (a = e[i]) && (o = a(o) || o);
3046
+ return o;
3047
+ }, Xt = (e, t) => (n, r) => t(n, r, e);
3048
+ let et = class extends dn {
3049
+ constructor(e, t, n) {
3050
+ super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = n, this._initComponents(), this._registerValidatorViews();
2862
3051
  }
2863
3052
  _initComponents() {
2864
3053
  [
2865
- ["DataValidationIcon", Rr],
2866
- [Mt, mo],
3054
+ ["DataValidationIcon", Ir],
3055
+ [Mt, vi],
3056
+ [Et.componentKey, Et],
2867
3057
  [Dt.componentKey, Dt],
2868
- [Vt.componentKey, Vt],
2869
- ...yo
3058
+ ...Ii
2870
3059
  ].forEach(([e, t]) => {
2871
3060
  this.disposeWithMe(this._componentManger.register(
2872
3061
  e,
@@ -2876,146 +3065,146 @@ let nt = class extends cn {
2876
3065
  }
2877
3066
  _registerValidatorViews() {
2878
3067
  [
2879
- No,
2880
- Go,
2881
- zo,
2882
- ko,
2883
- Po,
2884
- Ko,
2885
- jo,
2886
- Ao
3068
+ Li,
3069
+ Ki,
3070
+ Zi,
3071
+ Pi,
3072
+ Ti,
3073
+ Xi,
3074
+ Wi,
3075
+ Oi
2887
3076
  ].forEach((e) => {
2888
- const t = this._injector.createInstance(e), r = this._dataValidatorRegistryService.getValidatorItem(t.id);
2889
- r && (r.formulaInput = t.formulaInput, r.canvasRender = t.canvasRender, r.dropdownType = t.dropdownType, r.optionsInput = t.optionsInput);
3077
+ const t = this._injector.createInstance(e), n = this._dataValidatorRegistryService.getValidatorItem(t.id);
3078
+ n && (n.formulaInput = t.formulaInput, n.canvasRender = t.canvasRender, n.dropdownType = t.dropdownType, n.optionsInput = t.optionsInput);
2890
3079
  });
2891
3080
  }
2892
3081
  };
2893
- nt = Jo([
2894
- Zt(0, E(be)),
2895
- Zt(1, E(fn)),
2896
- Zt(2, E(Me))
2897
- ], nt);
2898
- var Qo = Object.getOwnPropertyDescriptor, ea = (e, t, r, n) => {
2899
- for (var i = n > 1 ? void 0 : n ? Qo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2900
- (a = e[o]) && (i = a(i) || i);
2901
- return i;
2902
- }, Kt = (e, t) => (r, n) => t(r, n, e);
2903
- const ta = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2904
- var wt;
2905
- let Hn = (wt = class extends Zn {
2906
- constructor(e = bt, t, r, n) {
2907
- super(), this._config = e, this._injector = t, this._commandService = r, this._configService = n;
2908
- const { menu: i, ...o } = Kn(
3082
+ et = zi([
3083
+ Xt(0, E(ye)),
3084
+ Xt(1, E(vn)),
3085
+ Xt(2, E(Me))
3086
+ ], et);
3087
+ var qi = Object.getOwnPropertyDescriptor, Ji = (e, t, n, r) => {
3088
+ for (var o = r > 1 ? void 0 : r ? qi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3089
+ (a = e[i]) && (o = a(o) || o);
3090
+ return o;
3091
+ }, Zt = (e, t) => (n, r) => t(n, r, e);
3092
+ const Qi = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3093
+ var St;
3094
+ let Bn = (St = class extends Xn {
3095
+ constructor(e = yt, t, n, r) {
3096
+ super(), this._config = e, this._injector = t, this._commandService = n, this._configService = r;
3097
+ const { menu: o, ...i } = Zn(
2909
3098
  {},
2910
- bt,
3099
+ yt,
2911
3100
  this._config
2912
3101
  );
2913
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Sn, o);
3102
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(_n, i);
2914
3103
  }
2915
3104
  onStarting() {
2916
3105
  [
2917
3106
  [me],
2918
- [Ue],
2919
- [ht],
2920
- [Je],
2921
- [tt],
2922
- [et],
3107
+ [Ne],
3108
+ [ut],
3109
+ [ze],
2923
3110
  [Qe],
2924
- [nt]
3111
+ [Je],
3112
+ [qe],
3113
+ [et]
2925
3114
  ].forEach((e) => {
2926
3115
  this._injector.add(e);
2927
3116
  }), [
2928
- kt,
2929
3117
  Lt,
2930
- _r,
3118
+ Pt,
3119
+ fr,
2931
3120
  Cn,
2932
- Be,
3121
+ Fe,
2933
3122
  mr
2934
3123
  ].forEach((e) => {
2935
3124
  this._commandService.registerCommand(e);
2936
3125
  });
2937
3126
  }
2938
3127
  onReady() {
2939
- this._injector.get(Qe), this._injector.get(et), this._injector.get(Fe).registerRenderModule(
3128
+ this._injector.get(qe), this._injector.get(Je), this._injector.get(Ue).registerRenderModule(
2940
3129
  X.UNIVER_SHEET,
2941
- [Et]
3130
+ [bt]
2942
3131
  );
2943
3132
  }
2944
3133
  onRendered() {
2945
- this._injector.get(nt), this._injector.get(tt);
3134
+ this._injector.get(et), this._injector.get(Qe);
2946
3135
  }
2947
3136
  onSteady() {
2948
- this._injector.get(Je);
2949
- }
2950
- }, V(wt, "pluginName", ta), V(wt, "type", X.UNIVER_SHEET), wt);
2951
- Hn = ea([
2952
- Kt(1, E(be)),
2953
- Kt(2, ee),
2954
- Kt(3, dn)
2955
- ], Hn);
2956
- var na = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, ia = (e, t, r) => t in e ? na(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, oa = (e, t, r, n) => {
2957
- for (var i = n > 1 ? void 0 : n ? ra(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2958
- (a = e[o]) && (i = a(i) || i);
2959
- return i;
2960
- }, zt = (e, t) => (r, n) => t(r, n, e), Vr = (e, t, r) => ia(e, typeof t != "symbol" ? t + "" : t, r);
2961
- const aa = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2962
- let Tt = class extends Zn {
2963
- constructor(e = bt, t, r, n) {
2964
- super(), this._config = e, this._injector = t, this._commandService = r, this._configService = n;
2965
- const { menu: i, ...o } = Kn(
3137
+ this._injector.get(ze);
3138
+ }
3139
+ }, V(St, "pluginName", Qi), V(St, "type", X.UNIVER_SHEET), St);
3140
+ Bn = Ji([
3141
+ Zt(1, E(ye)),
3142
+ Zt(2, ee),
3143
+ Zt(3, ln)
3144
+ ], Bn);
3145
+ var ea = Object.defineProperty, ta = Object.getOwnPropertyDescriptor, na = (e, t, n) => t in e ? ea(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ra = (e, t, n, r) => {
3146
+ for (var o = r > 1 ? void 0 : r ? ta(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3147
+ (a = e[i]) && (o = a(o) || o);
3148
+ return o;
3149
+ }, Kt = (e, t) => (n, r) => t(n, r, e), Dr = (e, t, n) => na(e, typeof t != "symbol" ? t + "" : t, n);
3150
+ const oa = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3151
+ let Tt = class extends Xn {
3152
+ constructor(e = yt, t, n, r) {
3153
+ super(), this._config = e, this._injector = t, this._commandService = n, this._configService = r;
3154
+ const { menu: o, ...i } = Zn(
2966
3155
  {},
2967
- bt,
3156
+ yt,
2968
3157
  this._config
2969
3158
  );
2970
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Sn, o);
3159
+ o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(_n, i);
2971
3160
  }
2972
3161
  onStarting() {
2973
3162
  [
2974
3163
  [me],
2975
- [Ue],
2976
- [ht],
2977
- [Je],
2978
- [tt],
2979
- [et],
3164
+ [Ne],
3165
+ [ut],
3166
+ [ze],
2980
3167
  [Qe],
3168
+ [Je],
2981
3169
  [qe],
2982
- [nt]
3170
+ [Ge],
3171
+ [et]
2983
3172
  ].forEach((e) => {
2984
3173
  this._injector.add(e);
2985
3174
  }), [
2986
- kt,
2987
3175
  Lt,
2988
- _r,
3176
+ Pt,
3177
+ fr,
2989
3178
  Cn,
2990
- Be,
3179
+ Fe,
2991
3180
  mr
2992
3181
  ].forEach((e) => {
2993
3182
  this._commandService.registerCommand(e);
2994
3183
  });
2995
3184
  }
2996
3185
  onReady() {
2997
- this._injector.get(Qe), this._injector.get(et), this._injector.get(qe), this._injector.get(ht), this._injector.get(Fe).registerRenderModule(
3186
+ this._injector.get(qe), this._injector.get(Je), this._injector.get(Ge), this._injector.get(ut), this._injector.get(Ue).registerRenderModule(
2998
3187
  X.UNIVER_SHEET,
2999
- [Et]
3188
+ [bt]
3000
3189
  );
3001
3190
  }
3002
3191
  onRendered() {
3003
- this._injector.get(nt), this._injector.get(tt);
3192
+ this._injector.get(et), this._injector.get(Qe);
3004
3193
  }
3005
3194
  onSteady() {
3006
- this._injector.get(Je);
3195
+ this._injector.get(ze);
3007
3196
  }
3008
3197
  };
3009
- Vr(Tt, "pluginName", aa);
3010
- Vr(Tt, "type", X.UNIVER_SHEET);
3011
- Tt = oa([
3012
- jr(li),
3013
- zt(1, E(be)),
3014
- zt(2, ee),
3015
- zt(3, dn)
3198
+ Dr(Tt, "pluginName", oa);
3199
+ Dr(Tt, "type", X.UNIVER_SHEET);
3200
+ Tt = ra([
3201
+ Hr(so),
3202
+ Kt(1, E(ye)),
3203
+ Kt(2, ee),
3204
+ Kt(3, ln)
3016
3205
  ], Tt);
3017
3206
  export {
3018
- _e as BaseSheetDataValidatorView,
3019
- Hn as UniverSheetsDataValidationMobileUIPlugin,
3207
+ fe as BaseSheetDataValidatorView,
3208
+ Bn as UniverSheetsDataValidationMobileUIPlugin,
3020
3209
  Tt as UniverSheetsDataValidationUIPlugin
3021
3210
  };