@univerjs/sheets-data-validation-ui 0.6.10-nightly.202504131606 → 0.6.10-nightly.202504151606

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
@@ -2,16 +2,16 @@ var Wo = Object.defineProperty;
2
2
  var Ho = (t, e, o) => e in t ? Wo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
3
  var E = (t, e, o) => Ho(t, typeof e != "symbol" ? e + "" : e, o);
4
4
  import { jsxs as Y, jsx as m, Fragment as Rt } from "react/jsx-runtime";
5
- import { Inject as b, LocaleService as Q, Disposable as Vt, DataValidationErrorStyle as de, DataValidationStatus as Kt, ICommandService as tt, dayjs as qe, numfmt as Je, CellValueType as xo, UniverInstanceType as X, toDisposable as jo, IUniverInstanceService as rt, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yo, DisposableCollection as Xo, CommandType as ae, BuildTextUtils as zo, DataValidationRenderMode as ct, DataValidationType as K, IConfigService as mn, debounce as Ko, UndoCommand as Go, RedoCommand as Zo, isUnitRangesEqual as qo, shallowEqual as En, ThemeService as zn, ColorKit as Jo, Injector as Wt, ObjectMatrix as Ie, Range as Qo, Rectangle as we, queryObjectMatrix as Qe, Optional as ta, RxDisposable as gn, InterceptorEffectEnum as Kn, sequenceExecute as Gn, bufferDebounceTime as ea, isFormulaString as kt, Tools as tn, VerticalAlign as ht, HorizontalAlign as Gt, DEFAULT_STYLES as dt, WrapStrategy as It, DocumentDataModel as na, BooleanNumber as ie, DEFAULT_EMPTY_DOCUMENT_VALUE as oa, Plugin as Zn, merge as qn } from "@univerjs/core";
5
+ import { Inject as b, LocaleService as Q, Disposable as Vt, DataValidationErrorStyle as de, DataValidationStatus as Kt, ICommandService as tt, dayjs as qe, numfmt as Je, CellValueType as xo, UniverInstanceType as X, toDisposable as jo, IUniverInstanceService as rt, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yo, DisposableCollection as Xo, CommandType as ae, BuildTextUtils as zo, DataValidationRenderMode as ct, DataValidationType as K, IConfigService as mn, debounce as Ko, UndoCommand as Go, RedoCommand as Zo, isUnitRangesEqual as qo, shallowEqual as En, ThemeService as zn, ColorKit as Jo, Injector as Wt, ObjectMatrix as Ie, Range as Qo, Rectangle as we, queryObjectMatrix as Qe, Optional as ta, RxDisposable as gn, InterceptorEffectEnum as Kn, sequenceExecute as Gn, bufferDebounceTime as ea, isFormulaString as Ft, Tools as tn, VerticalAlign as ht, HorizontalAlign as Gt, DEFAULT_STYLES as dt, WrapStrategy as It, DocumentDataModel as na, BooleanNumber as ie, DEFAULT_EMPTY_DOCUMENT_VALUE as oa, Plugin as Zn, merge as qn } from "@univerjs/core";
6
6
  import { Button as Bt, DatePanel as aa, Scrollbar as ia, FormLayout as q, RadioGroup as fn, Radio as Nt, Checkbox as Pe, Input as Ut, Select as en, DraggableList as ra, clsx as sa } from "@univerjs/design";
7
7
  import { DeviceInputEventType as nn, IRenderManagerService as yt, fixLineWidthByScale as bn, Transform as la, CheckboxShape as da, getCurrentTypeOfRenderer as Zt, CURSOR_TYPE as qt, FontCache as ca, Shape as ua, Rect as Jn, getFontStyleString as Be, getDocsSkeletonPageSize as re, Documents as ha, DocumentViewModel as pa, DocumentSkeleton as ma } from "@univerjs/engine-render";
8
8
  import { SheetInterceptorService as vn, VALIDATE_CELL as ga, SetRangeValuesCommand as _n, SheetsSelectionsService as Qn, getSheetCommandTarget as to, SheetPermissionCheckController as eo, WorksheetEditPermission as Re, RangeProtectionPermissionEditPoint as De, WorkbookEditablePermission as Ve, checkRangesEditablePermission as fa, rangeToDiscreteRange as va, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as no, InterceptCellContentPriority as oo } from "@univerjs/sheets";
9
9
  import { SheetDataValidationModel as at, SheetsDataValidationValidatorService as _a, getCellValueOrigin as mt, getDataValidationCellValue as Sa, deserializeListOptions as ao, serializeListOptions as io, UpdateSheetDataValidationRangeCommand as ro, UpdateSheetDataValidationSettingCommand as On, UpdateSheetDataValidationOptionsCommand as Ca, RemoveSheetDataValidationCommand as so, RemoveSheetAllDataValidationCommand as Ia, createDefaultNewRule as lo, AddSheetDataValidationCommand as Sn, DATA_VALIDATION_PLUGIN_NAME as co, getDataValidationDiffMutations as an, DataValidationCacheService as uo, DataValidationFormulaController as wa, DataValidationFormulaService as Ra, CHECKBOX_FORMULA_2 as Da, CHECKBOX_FORMULA_1 as Va, getFormulaResult as $e, isLegalFormulaResult as Ln, transformCheckboxValue as ya } from "@univerjs/sheets-data-validation";
10
10
  import { getPatternType as Ma } from "@univerjs/sheets-numfmt";
11
- import { SetCellEditVisibleOperation as rn, SheetCanvasPopManagerService as Ea, IEditorBridgeService as ho, IMarkSelectionService as ba, HoverManagerService as Oa, CellAlertManagerService as La, CellAlertType as Ta, IAutoFillService as Pa, APPLY_TYPE as se, virtualizeDiscreteRanges as sn, getAutoFillRepeatRange as Aa, ISheetClipboardService as ka, COPY_TYPE as Tn, PREDEFINED_HOOK_NAME as he, getRepeatRange as Pn, getCurrentRangeDisable$ as Fa, AutoHeightController as po, SheetSkeletonManagerService as ye } from "@univerjs/sheets-ui";
11
+ import { SetCellEditVisibleOperation as rn, SheetCanvasPopManagerService as Ea, IEditorBridgeService as ho, IMarkSelectionService as ba, HoverManagerService as Oa, CellAlertManagerService as La, CellAlertType as Ta, IAutoFillService as Pa, APPLY_TYPE as se, virtualizeDiscreteRanges as sn, getAutoFillRepeatRange as Aa, ISheetClipboardService as Fa, COPY_TYPE as Tn, PREDEFINED_HOOK_NAME as he, getRepeatRange as Pn, getCurrentRangeDisable$ as ka, AutoHeightController as po, SheetSkeletonManagerService as ye } from "@univerjs/sheets-ui";
12
12
  import { IDialogService as Na, useDependency as T, KeyCode as ln, ISidebarService as mo, useObservable as St, ComponentManager as Ae, IZenZoneService as go, RectPopup as Ua, useEvent as dn, MenuItemType as Cn, getMenuHiddenObservable as Ba, RibbonStartGroup as $a, IMenuManagerService as Wa, useSidebarClick as fo } from "@univerjs/ui";
13
13
  import An, { useState as j, forwardRef as Mt, useRef as Jt, createElement as Et, useMemo as $t, useEffect as wt } from "react";
14
- import { DataValidatorRegistryService as bt, DataValidationModel as ke, DataValidatorRegistryScope as Ha, TWO_FORMULA_OPERATOR_COUNT as xa, getRuleOptions as kn, getRuleSetting as Fn } from "@univerjs/data-validation";
14
+ import { DataValidatorRegistryService as bt, DataValidationModel as Fe, DataValidatorRegistryScope as Ha, TWO_FORMULA_OPERATOR_COUNT as xa, getRuleOptions as Fn, getRuleSetting as kn } from "@univerjs/data-validation";
15
15
  import { RichTextEditingMutation as ja } from "@univerjs/docs";
16
16
  import { filter as In, BehaviorSubject as Nn, distinctUntilChanged as Ya, Subject as Xa, debounceTime as wn, of as za, bufferTime as vo } from "rxjs";
17
17
  import { deserializeRangeWithSheet as Ka, serializeRange as _o } from "@univerjs/engine-formula";
@@ -111,17 +111,17 @@ const Ja = "univer-dv-date-dropdown", Qa = "univer-dv-date-dropdown-btns", Un =
111
111
  };
112
112
  function ei(t) {
113
113
  var v;
114
- const { location: e, hideFn: o } = t, { worksheet: n, row: a, col: i, unitId: r, subUnitId: s, workbook: l } = e, c = T(tt), u = T(ce), h = n.getCell(a, i), d = mt(n.getCellRaw(a, i)), C = ti(d), [p, R] = j(C), w = p && p.isValid() ? p : qe(), g = T(Q), f = T(at), _ = f.getRuleByLocation(r, s, a, i);
114
+ const { location: e, hideFn: o } = t, { worksheet: n, row: a, col: i, unitId: r, subUnitId: s, workbook: l } = e, c = T(tt), u = T(ce), h = n.getCell(a, i), d = mt(n.getCellRaw(a, i)), I = ti(d), [p, R] = j(I), w = p && p.isValid() ? p : qe(), g = T(Q), f = T(at), _ = f.getRuleByLocation(r, s, a, i);
115
115
  if (!_)
116
116
  return null;
117
117
  const V = f.getValidator(_.type);
118
118
  if (!h || !V)
119
119
  return;
120
- const S = !!((v = _.bizInfo) != null && v.showTime), I = async () => {
121
- var F, N, B;
120
+ const S = !!((v = _.bizInfo) != null && v.showTime), C = async () => {
121
+ var k, N, B;
122
122
  if (!w)
123
123
  return;
124
- const P = w.format(S ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), U = (F = Je.parseDate(P)) == null ? void 0 : F.v, O = l.getStyles().getStyleByCell(h), L = (B = (N = O == null ? void 0 : O.n) == null ? void 0 : N.pattern) != null ? B : "", A = Ma(L);
124
+ const P = w.format(S ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), U = (k = Je.parseDate(P)) == null ? void 0 : k.v, O = l.getStyles().getStyleByCell(h), L = (B = (N = O == null ? void 0 : O.n) == null ? void 0 : N.pattern) != null ? B : "", A = Ma(L);
125
125
  _.errorStyle !== de.STOP || await V.validator({
126
126
  value: U,
127
127
  unitId: r,
@@ -176,7 +176,7 @@ function ei(t) {
176
176
  disabledDate: (y) => !Je.parseDate(y.format("YYYY-MM-DD"))
177
177
  }
178
178
  ),
179
- /* @__PURE__ */ m("div", { className: Un.dvDateDropdownBtns, children: /* @__PURE__ */ m(Bt, { size: "small", type: "primary", onClick: I, disabled: !w.isValid(), children: g.t("dataValidation.alert.ok") }) })
179
+ /* @__PURE__ */ m("div", { className: Un.dvDateDropdownBtns, children: /* @__PURE__ */ m(Bt, { size: "small", type: "primary", onClick: C, disabled: !w.isValid(), children: g.t("dataValidation.alert.ok") }) })
180
180
  ] });
181
181
  }
182
182
  var ut = function() {
@@ -471,7 +471,7 @@ const Me = "DataValidationPanel", Ht = {
471
471
  handler(t, e) {
472
472
  if (!e)
473
473
  return !1;
474
- const { ruleId: o, isAdd: n } = e, a = t.get(ft), i = t.get(ke), r = t.get(rt), s = t.get(mo), l = to(r);
474
+ const { ruleId: o, isAdd: n } = e, a = t.get(ft), i = t.get(Fe), r = t.get(rt), s = t.get(mo), l = to(r);
475
475
  if (!l) return !1;
476
476
  const { unitId: c, subUnitId: u } = l, h = o ? i.getRuleById(c, u, o) : void 0;
477
477
  a.open(), a.setActiveRule(h && {
@@ -501,7 +501,7 @@ const Me = "DataValidationPanel", Ht = {
501
501
  const e = t.get(tt), o = t.get(ft);
502
502
  return o.open(), o.isOpen ? e.executeCommand(Dn.id) : e.executeCommand(Ht.id), !0;
503
503
  }
504
- }, Fe = {
504
+ }, ke = {
505
505
  type: ae.OPERATION,
506
506
  id: "sheet.operation.show-data-validation-dropdown",
507
507
  handler(t, e) {
@@ -521,7 +521,7 @@ const Me = "DataValidationPanel", Ht = {
521
521
  handler(t, e) {
522
522
  return e ? (t.get(Dt).hideDropdown(), !0) : !1;
523
523
  }
524
- }, Ft = "#ECECEC", Vn = "sheets-data-validation-ui.config", Ee = {}, _i = "univer-dv-list-dropdown", Si = "univer-dv-list-dropdown-title", Ci = "univer-dv-list-dropdown-list", Ii = "univer-dv-list-dropdown-list-container", wi = "univer-dv-list-dropdown-selected-icon", Ri = "univer-dv-list-dropdown-item-container", Di = "univer-dv-list-dropdown-item", Vi = "univer-dv-list-dropdown-split", yi = "univer-dv-list-dropdown-edit", _t = {
524
+ }, kt = "#ECECEC", Vn = "sheets-data-validation-ui.config", Ee = {}, _i = "univer-dv-list-dropdown", Si = "univer-dv-list-dropdown-title", Ci = "univer-dv-list-dropdown-list", Ii = "univer-dv-list-dropdown-list-container", wi = "univer-dv-list-dropdown-selected-icon", Ri = "univer-dv-list-dropdown-item-container", Di = "univer-dv-list-dropdown-item", Vi = "univer-dv-list-dropdown-split", yi = "univer-dv-list-dropdown-edit", _t = {
525
525
  dvListDropdown: _i,
526
526
  dvListDropdownTitle: Si,
527
527
  dvListDropdownList: Ci,
@@ -532,30 +532,30 @@ const Me = "DataValidationPanel", Ht = {
532
532
  dvListDropdownSplit: Vi,
533
533
  dvListDropdownEdit: yi
534
534
  }, Mi = (t) => {
535
- var S, I;
536
- const { value: e, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: s, filter: l, location: c } = t, u = T(Q), h = T(mn), d = l == null ? void 0 : l.toLowerCase(), { row: C, col: p, unitId: R, subUnitId: w } = c, g = a.filter((v) => d ? v.label.toLowerCase().includes(d) : !0), f = (I = (S = h.getConfig(Vn)) == null ? void 0 : S.showEditOnDropdown) != null ? I : !0, _ = T(eo), V = $t(() => _.permissionCheckWithRanges(
535
+ var S, C;
536
+ const { value: e, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: s, filter: l, location: c } = t, u = T(Q), h = T(mn), d = l == null ? void 0 : l.toLowerCase(), { row: I, col: p, unitId: R, subUnitId: w } = c, g = a.filter((v) => d ? v.label.toLowerCase().includes(d) : !0), f = (C = (S = h.getConfig(Vn)) == null ? void 0 : S.showEditOnDropdown) != null ? C : !0, _ = T(eo), V = $t(() => _.permissionCheckWithRanges(
537
537
  {
538
538
  workbookTypes: [Ve],
539
539
  rangeTypes: [De],
540
540
  worksheetTypes: [Re]
541
541
  },
542
- [{ startColumn: p, startRow: C, endColumn: p, endRow: C }],
542
+ [{ startColumn: p, startRow: I, endColumn: p, endRow: I }],
543
543
  R,
544
544
  w
545
- ), [_, p, C, R, w]);
545
+ ), [_, p, I, R, w]);
546
546
  return /* @__PURE__ */ Y("div", { className: _t.dvListDropdown, style: s, children: [
547
547
  /* @__PURE__ */ m("div", { className: _t.dvListDropdownTitle, children: i }),
548
548
  /* @__PURE__ */ m("div", { className: _t.dvListDropdownList, children: /* @__PURE__ */ m(ia, { children: /* @__PURE__ */ m("div", { className: _t.dvListDropdownListContainer, children: g.map((v, y) => {
549
549
  const P = e.indexOf(v.value) > -1, U = () => {
550
550
  let L;
551
- P ? L = new Set(e.filter((F) => F !== v.value)) : L = new Set(n ? [...e, v.value] : [v.value]);
551
+ P ? L = new Set(e.filter((k) => k !== v.value)) : L = new Set(n ? [...e, v.value] : [v.value]);
552
552
  const A = [];
553
- a.forEach((F) => {
554
- L.has(F.value) && A.push(F.value);
553
+ a.forEach((k) => {
554
+ L.has(k.value) && A.push(k.value);
555
555
  }), o(A);
556
556
  }, O = v.label.toLocaleLowerCase().indexOf(d);
557
557
  return /* @__PURE__ */ Y("div", { className: _t.dvListDropdownItemContainer, onClick: U, children: [
558
- /* @__PURE__ */ m("div", { className: _t.dvListDropdownItem, style: { background: v.color || Ft }, children: d && v.label.toLowerCase().includes(d) ? /* @__PURE__ */ Y(Rt, { children: [
558
+ /* @__PURE__ */ m("div", { className: _t.dvListDropdownItem, style: { background: v.color || kt }, children: d && v.label.toLowerCase().includes(d) ? /* @__PURE__ */ Y(Rt, { children: [
559
559
  /* @__PURE__ */ m("span", { children: v.label.substring(0, O) }),
560
560
  /* @__PURE__ */ m("span", { style: { fontWeight: "bold" }, children: v.label.substring(O, O + d.length) }),
561
561
  /* @__PURE__ */ m("span", { children: v.label.substring(O + d.length) })
@@ -571,7 +571,7 @@ const Me = "DataValidationPanel", Ht = {
571
571
  };
572
572
  function Ei(t) {
573
573
  var N, B, x, z;
574
- const { location: e, hideFn: o } = t, { worksheet: n, row: a, col: i, unitId: r, subUnitId: s } = e, l = T(ke), [c, u] = j(""), h = T(tt), d = T(Q), [C, p] = j(""), R = T(ho), w = T(rt), g = $t(() => l.ruleChange$.pipe(wn(16)), []), f = T(at);
574
+ const { location: e, hideFn: o } = t, { worksheet: n, row: a, col: i, unitId: r, subUnitId: s } = e, l = T(Fe), [c, u] = j(""), h = T(tt), d = T(Q), [I, p] = j(""), R = T(ho), w = T(rt), g = $t(() => l.ruleChange$.pipe(wn(16)), []), f = T(at);
575
575
  St(g);
576
576
  const _ = Ua.useContext(), V = ((B = (N = _.current) == null ? void 0 : N.right) != null ? B : 0) - ((z = (x = _.current) == null ? void 0 : x.left) != null ? z : 0);
577
577
  if (wt(() => {
@@ -592,17 +592,17 @@ function Ei(t) {
592
592
  const S = f.getRuleByLocation(r, s, a, i);
593
593
  if (!S)
594
594
  return null;
595
- const I = f.getValidator(S.type);
596
- if (!I)
595
+ const C = f.getValidator(S.type);
596
+ if (!C)
597
597
  return null;
598
598
  const v = n.getCell(a, i), y = (S == null ? void 0 : S.renderMode) === ct.CUSTOM || (S == null ? void 0 : S.renderMode) === void 0;
599
- if (!v || !S || !I || I.id.indexOf(K.LIST) !== 0)
599
+ if (!v || !S || !C || C.id.indexOf(K.LIST) !== 0)
600
600
  return;
601
- const P = S.type === K.LIST_MULTIPLE, U = I.getListWithColor(S, r, s), O = C || Sa(n.getCellRaw(a, i)), L = ao(O), A = () => {
601
+ const P = S.type === K.LIST_MULTIPLE, U = C.getListWithColor(S, r, s), O = I || Sa(n.getCellRaw(a, i)), L = ao(O), A = () => {
602
602
  h.executeCommand(Ht.id, {
603
603
  ruleId: S.uid
604
604
  }), o();
605
- }, F = U.map((H) => ({
605
+ }, k = U.map((H) => ({
606
606
  label: H.label,
607
607
  value: H.label,
608
608
  color: y || H.color ? H.color : "transparent"
@@ -643,7 +643,7 @@ function Ei(t) {
643
643
  keycode: ln.ESC
644
644
  }), h.executeCommand(_n.id, J);
645
645
  },
646
- options: F,
646
+ options: k,
647
647
  onEdit: A,
648
648
  filter: c,
649
649
  location: e
@@ -702,12 +702,12 @@ function Li(t) {
702
702
  ] })
703
703
  ] });
704
704
  }
705
- const Ti = "univer-data-validation-detail", Pi = "univer-data-validation-detail-form-item", Ai = "univer-data-validation-detail-buttons", ki = "univer-data-validation-detail-button", jt = {
705
+ const Ti = "univer-data-validation-detail", Pi = "univer-data-validation-detail-form-item", Ai = "univer-data-validation-detail-buttons", Fi = "univer-data-validation-detail-button", jt = {
706
706
  dataValidationDetail: Ti,
707
707
  dataValidationDetailFormItem: Pi,
708
708
  dataValidationDetailButtons: Ai,
709
- dataValidationDetailButton: ki
710
- }, Fi = (t) => Ko(
709
+ dataValidationDetailButton: Fi
710
+ }, ki = (t) => Ko(
711
711
  async (e, o, n, a) => {
712
712
  const i = await t.executeCommand(e, o, n);
713
713
  a == null || a(i);
@@ -720,7 +720,7 @@ function Ni(t, e, o) {
720
720
  }
721
721
  function Ui() {
722
722
  var lt;
723
- const [t, e] = j(0), o = T(ft), n = St(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, s = r.uid, l = T(bt), c = T(rt), u = T(Ae), h = T(tt), d = T(ke), C = T(Q), [p, R] = j(r), w = l.getValidatorItem(p.type), [g, f] = j(!1), _ = l.getValidatorsByScope(Ha.SHEET), [V, S] = j(() => p.ranges.map((M) => ({ unitId: "", sheetId: "", range: M }))), I = $t(() => Fi(h), [h]), [v, y] = j(!1), [P, U] = j(!1), O = Jt(null), L = T(Qn);
723
+ const [t, e] = j(0), o = T(ft), n = St(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, s = r.uid, l = T(bt), c = T(rt), u = T(Ae), h = T(tt), d = T(Fe), I = T(Q), [p, R] = j(r), w = l.getValidatorItem(p.type), [g, f] = j(!1), _ = l.getValidatorsByScope(Ha.SHEET), [V, S] = j(() => p.ranges.map((M) => ({ unitId: "", sheetId: "", range: M }))), C = $t(() => ki(h), [h]), [v, y] = j(!1), [P, U] = j(!1), O = Jt(null), L = T(Qn);
724
724
  if (wt(() => () => {
725
725
  const M = L.getCurrentLastSelection();
726
726
  M && L.setSelections([M]);
@@ -728,14 +728,14 @@ function Ui() {
728
728
  h.onCommandExecuted((M) => {
729
729
  (M.id === Go.id || M.id === Zo.id) && setTimeout(() => {
730
730
  const D = d.getRuleById(a, i, s);
731
- e((k) => k + 1), D && (R(D), S(D.ranges.map((k) => ({ unitId: "", sheetId: "", range: k }))));
731
+ e((F) => F + 1), D && (R(D), S(D.ranges.map((F) => ({ unitId: "", sheetId: "", range: F }))));
732
732
  }, 20);
733
733
  });
734
734
  }, [h, d, s, i, a]), !w)
735
735
  return null;
736
- const A = w.operators, F = w.operatorNames, N = p.operator ? xa.includes(p.operator) : !1, B = () => {
737
- var M, D, k;
738
- (D = (M = O.current) == null ? void 0 : M.editor) != null && D.isFocus() && x((k = O.current) == null ? void 0 : k.getValue()), !(!p.ranges.length || v) && (w.validatorFormula(p, a, i).success ? o.setActiveRule(null) : f(!0));
736
+ const A = w.operators, k = w.operatorNames, N = p.operator ? xa.includes(p.operator) : !1, B = () => {
737
+ var M, D, F;
738
+ (D = (M = O.current) == null ? void 0 : M.editor) != null && D.isFocus() && x((F = O.current) == null ? void 0 : F.getValue()), !(!p.ranges.length || v) && (w.validatorFormula(p, a, i).success ? o.setActiveRule(null) : f(!0));
739
739
  }, x = dn((M) => {
740
740
  const D = M.split(",").filter(Boolean).map(Ka).map((W) => {
741
741
  const Ct = W.sheetName;
@@ -751,21 +751,21 @@ function Ui() {
751
751
  if (qo(D, V))
752
752
  return;
753
753
  S(D);
754
- const k = D.filter((W) => (!W.unitId || W.unitId === a) && (!W.sheetId || W.sheetId === i)).map((W) => W.range);
754
+ const F = D.filter((W) => (!W.unitId || W.unitId === a) && (!W.sheetId || W.sheetId === i)).map((W) => W.range);
755
755
  if (R({
756
756
  ...p,
757
- ranges: k
758
- }), k.length === 0)
757
+ ranges: F
758
+ }), F.length === 0)
759
759
  return;
760
760
  const $ = {
761
761
  unitId: a,
762
762
  subUnitId: i,
763
763
  ruleId: s,
764
- ranges: k
764
+ ranges: F
765
765
  };
766
- I(ro.id, $);
766
+ C(ro.id, $);
767
767
  }), z = (M) => {
768
- if (En(M, Fn(p)))
768
+ if (En(M, kn(p)))
769
769
  return;
770
770
  R({
771
771
  ...p,
@@ -777,7 +777,7 @@ function Ui() {
777
777
  ruleId: s,
778
778
  setting: M
779
779
  };
780
- I(
780
+ C(
781
781
  On.id,
782
782
  D,
783
783
  void 0
@@ -798,13 +798,13 @@ function Ui() {
798
798
  const D = l.getValidatorItem(M);
799
799
  if (!D)
800
800
  return;
801
- const k = D.operators, $ = d.getRuleById(a, i, s), W = M === ($ == null ? void 0 : $.type) || M.includes("list") && ($ != null && $.type.includes("list")) ? {
801
+ const F = D.operators, $ = d.getRuleById(a, i, s), W = M === ($ == null ? void 0 : $.type) || M.includes("list") && ($ != null && $.type.includes("list")) ? {
802
802
  ...$,
803
803
  type: M
804
804
  } : {
805
805
  ...p,
806
806
  type: M,
807
- operator: k[0],
807
+ operator: F[0],
808
808
  formula1: void 0,
809
809
  formula2: void 0
810
810
  };
@@ -812,13 +812,13 @@ function Ui() {
812
812
  unitId: a,
813
813
  subUnitId: i,
814
814
  ruleId: p.uid,
815
- setting: Fn(W)
815
+ setting: kn(W)
816
816
  });
817
- }, et = u.get(w.formulaInput), nt = $t(() => V.map((M) => _o(M.range)).join(","), []), st = kn(p), it = (M) => {
818
- En(M, kn(p)) || (R({
817
+ }, et = u.get(w.formulaInput), nt = $t(() => V.map((M) => _o(M.range)).join(","), []), st = Fn(p), it = (M) => {
818
+ En(M, Fn(p)) || (R({
819
819
  ...p,
820
820
  ...M
821
- }), I(
821
+ }), C(
822
822
  Ca.id,
823
823
  {
824
824
  unitId: a,
@@ -832,8 +832,8 @@ function Ui() {
832
832
  /* @__PURE__ */ m(
833
833
  q,
834
834
  {
835
- label: C.t("dataValidation.panel.range"),
836
- error: !p.ranges.length || v ? C.t("dataValidation.panel.rangeError") : "",
835
+ label: I.t("dataValidation.panel.range"),
836
+ error: !p.ranges.length || v ? I.t("dataValidation.panel.rangeError") : "",
837
837
  children: /* @__PURE__ */ m(
838
838
  Ga,
839
839
  {
@@ -842,23 +842,23 @@ function Ui() {
842
842
  subUnitId: i,
843
843
  initialValue: nt,
844
844
  onChange: (M, D) => {
845
- var k;
846
- !P && ((k = O.current) != null && k.verify()) && x(D);
845
+ var F;
846
+ !P && ((F = O.current) != null && F.verify()) && x(D);
847
847
  },
848
848
  onFocusChange: (M, D) => {
849
- var k;
850
- U(M), !M && D && ((k = O.current) != null && k.verify()) && x(D);
849
+ var F;
850
+ U(M), !M && D && ((F = O.current) != null && F.verify()) && x(D);
851
851
  },
852
852
  onVerify: (M) => y(!M)
853
853
  }
854
854
  )
855
855
  }
856
856
  ),
857
- /* @__PURE__ */ m(q, { label: C.t("dataValidation.panel.type"), children: /* @__PURE__ */ m(
857
+ /* @__PURE__ */ m(q, { label: I.t("dataValidation.panel.type"), children: /* @__PURE__ */ m(
858
858
  en,
859
859
  {
860
860
  options: _ == null ? void 0 : _.map((M) => ({
861
- label: C.t(M.title),
861
+ label: I.t(M.title),
862
862
  value: M.id
863
863
  })),
864
864
  value: p.type,
@@ -866,12 +866,12 @@ function Ui() {
866
866
  className: jt.dataValidationDetailFormItem
867
867
  }
868
868
  ) }),
869
- A != null && A.length ? /* @__PURE__ */ m(q, { label: C.t("dataValidation.panel.operator"), children: /* @__PURE__ */ m(
869
+ A != null && A.length ? /* @__PURE__ */ m(q, { label: I.t("dataValidation.panel.operator"), children: /* @__PURE__ */ m(
870
870
  en,
871
871
  {
872
872
  options: A.map((M, D) => ({
873
873
  value: `${M}`,
874
- label: F[D]
874
+ label: k[D]
875
875
  })),
876
876
  value: `${p.operator}`,
877
877
  onChange: (M) => {
@@ -916,13 +916,13 @@ function Ui() {
916
916
  allowBlank: !((M = p.allowBlank) == null || M)
917
917
  });
918
918
  },
919
- children: C.t("dataValidation.panel.allowBlank")
919
+ children: I.t("dataValidation.panel.allowBlank")
920
920
  }
921
921
  ) }),
922
922
  /* @__PURE__ */ m(Li, { value: st, onChange: it, extraComponent: w.optionsInput }),
923
923
  /* @__PURE__ */ Y("div", { className: jt.dataValidationDetailButtons, children: [
924
- /* @__PURE__ */ m(Bt, { className: jt.dataValidationDetailButton, onClick: H, children: C.t("dataValidation.panel.removeRule") }),
925
- /* @__PURE__ */ m(Bt, { className: jt.dataValidationDetailButton, type: "primary", onClick: B, children: C.t("dataValidation.panel.done") })
924
+ /* @__PURE__ */ m(Bt, { className: jt.dataValidationDetailButton, onClick: H, children: I.t("dataValidation.panel.removeRule") }),
925
+ /* @__PURE__ */ m(Bt, { className: jt.dataValidationDetailButton, type: "primary", onClick: B, children: I.t("dataValidation.panel.done") })
926
926
  ] })
927
927
  ] });
928
928
  }
@@ -932,7 +932,7 @@ const Bi = "univer-data-validation-item-container", $i = "univer-data-validation
932
932
  dataValidationItemContent: Wi,
933
933
  dataValidationItemIcon: Hi
934
934
  }, xi = (t) => {
935
- const { rule: e, onClick: o, unitId: n, subUnitId: a, disable: i } = t, r = T(bt), s = T(tt), l = T(ba), c = r.getValidatorItem(e.type), u = Jt(void 0), [h, d] = j(!1), C = T(zn), p = St(C.currentTheme$), R = $t(() => {
935
+ const { rule: e, onClick: o, unitId: n, subUnitId: a, disable: i } = t, r = T(bt), s = T(tt), l = T(ba), c = r.getValidatorItem(e.type), u = Jt(void 0), [h, d] = j(!1), I = T(zn), p = St(I.currentTheme$), R = $t(() => {
936
936
  var _;
937
937
  const g = (_ = p == null ? void 0 : p.loopColor2) != null ? _ : "#49B811", f = new Jo(g).toRgb();
938
938
  return {
@@ -992,7 +992,7 @@ function zi(t) {
992
992
  f.unsubscribe();
993
993
  };
994
994
  }, [h, d, e]);
995
- const C = async () => {
995
+ const I = async () => {
996
996
  const f = lo(a), _ = {
997
997
  unitId: h,
998
998
  subUnitId: d,
@@ -1009,8 +1009,8 @@ function zi(t) {
1009
1009
  subUnitId: d
1010
1010
  });
1011
1011
  }, w = ((f) => {
1012
- const _ = o.getCurrentUnitForType(X.UNIVER_SHEET), V = _.getActiveSheet(), S = _.getUnitId(), I = V.getSheetId();
1013
- return f.map((y) => fa(a, S, I, y.ranges) ? { ...y } : { ...y, disable: !0 });
1012
+ const _ = o.getCurrentUnitForType(X.UNIVER_SHEET), V = _.getActiveSheet(), S = _.getUnitId(), C = V.getSheetId();
1013
+ return f.map((y) => fa(a, S, C, y.ranges) ? { ...y } : { ...y, disable: !0 });
1014
1014
  })(s), g = w == null ? void 0 : w.some((f) => f.disable);
1015
1015
  return /* @__PURE__ */ Y("div", { className: me.dataValidationList, children: [
1016
1016
  w == null ? void 0 : w.map((f) => {
@@ -1035,7 +1035,7 @@ function zi(t) {
1035
1035
  }),
1036
1036
  /* @__PURE__ */ Y("div", { className: me.dataValidationListButtons, children: [
1037
1037
  s.length && !g ? /* @__PURE__ */ m(Bt, { className: me.dataValidationListButton, onClick: p, children: r.t("dataValidation.panel.removeAll") }) : null,
1038
- /* @__PURE__ */ m(Bt, { className: me.dataValidationListButton, type: "primary", onClick: C, children: r.t("dataValidation.panel.add") })
1038
+ /* @__PURE__ */ m(Bt, { className: me.dataValidationListButton, type: "primary", onClick: I, children: r.t("dataValidation.panel.add") })
1039
1039
  ] })
1040
1040
  ] });
1041
1041
  }
@@ -1143,12 +1143,12 @@ let Qt = class extends Vt {
1143
1143
  // eslint-disable-next-line max-lines-per-function
1144
1144
  _initAutoFill() {
1145
1145
  const t = () => ({ redos: [], undos: [] }), e = (n, a) => {
1146
- const { source: i, target: r, unitId: s, subUnitId: l } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(s, l).clone(), u = sn([i, r]), [h, d] = u.ranges, { mapFunc: C } = u, p = {
1146
+ const { source: i, target: r, unitId: s, subUnitId: l } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(s, l).clone(), u = sn([i, r]), [h, d] = u.ranges, { mapFunc: I } = u, p = {
1147
1147
  row: h.startRow,
1148
1148
  col: h.startColumn
1149
1149
  }, R = Aa(h, d), w = new Ie(), g = /* @__PURE__ */ new Set();
1150
- R.forEach((I) => {
1151
- const v = I.repeatStartCell, y = I.relativeRange, P = {
1150
+ R.forEach((C) => {
1151
+ const v = C.repeatStartCell, y = C.relativeRange, P = {
1152
1152
  startRow: p.row,
1153
1153
  startColumn: p.col,
1154
1154
  endColumn: p.col,
@@ -1168,7 +1168,7 @@ let Qt = class extends Vt {
1168
1168
  endRow: O
1169
1169
  },
1170
1170
  P
1171
- ), { row: F, col: N } = C(A.startRow, A.startColumn), B = this._sheetDataValidationModel.getRuleIdByLocation(s, l, F, N) || "", x = we.getPositionRange(
1171
+ ), { row: k, col: N } = I(A.startRow, A.startColumn), B = this._sheetDataValidationModel.getRuleIdByLocation(s, l, k, N) || "", x = we.getPositionRange(
1172
1172
  {
1173
1173
  startRow: O,
1174
1174
  startColumn: L,
@@ -1176,11 +1176,11 @@ let Qt = class extends Vt {
1176
1176
  endRow: O
1177
1177
  },
1178
1178
  U
1179
- ), { row: z, col: H } = C(x.startRow, x.startColumn);
1179
+ ), { row: z, col: H } = I(x.startRow, x.startColumn);
1180
1180
  w.setValue(z, H, B), g.add(B);
1181
1181
  });
1182
1182
  });
1183
- const f = Array.from(g).map((I) => ({ id: I, ranges: Qe(w, (v) => v === I) }));
1183
+ const f = Array.from(g).map((C) => ({ id: C, ranges: Qe(w, (v) => v === C) }));
1184
1184
  c.addRangeRules(f);
1185
1185
  const _ = c.diff(this._sheetDataValidationModel.getRules(s, l)), { redoMutations: V, undoMutations: S } = an(s, l, _, this._injector, "patched", a === se.ONLY_FORMAT);
1186
1186
  return {
@@ -1268,11 +1268,11 @@ let te = class extends Vt {
1268
1268
  return { redos: [], undos: [] };
1269
1269
  const { unitId: a, subUnitId: i } = this._copyInfo;
1270
1270
  if (o.unitId !== a || i !== o.subUnitId) {
1271
- const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), s = new Ie(), l = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = sn([o.copyRange, e]), d = Pn(c, u, !0), C = /* @__PURE__ */ new Map();
1271
+ const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), s = new Ie(), l = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: h } = sn([o.copyRange, e]), d = Pn(c, u, !0), I = /* @__PURE__ */ new Map();
1272
1272
  d.forEach(({ startRange: g }) => {
1273
1273
  var f;
1274
1274
  (f = this._copyInfo) == null || f.matrix.forValue((_, V, S) => {
1275
- const I = we.getPositionRange(
1275
+ const C = we.getPositionRange(
1276
1276
  {
1277
1277
  startRow: _,
1278
1278
  endRow: _,
@@ -1281,8 +1281,8 @@ let te = class extends Vt {
1281
1281
  },
1282
1282
  g
1283
1283
  ), v = `${i}-${S}`, y = this._sheetDataValidationModel.getRuleById(a, i, S);
1284
- !this._sheetDataValidationModel.getRuleById(o.unitId, o.subUnitId, v) && y && C.set(v, { ...y, uid: v });
1285
- const { row: P, col: U } = h(I.startRow, I.startColumn);
1284
+ !this._sheetDataValidationModel.getRuleById(o.unitId, o.subUnitId, v) && y && I.set(v, { ...y, uid: v });
1285
+ const { row: P, col: U } = h(C.startRow, C.startColumn);
1286
1286
  l.add(v), s.setValue(P, U, v);
1287
1287
  });
1288
1288
  });
@@ -1291,7 +1291,7 @@ let te = class extends Vt {
1291
1291
  const { redoMutations: R, undoMutations: w } = an(
1292
1292
  o.unitId,
1293
1293
  o.subUnitId,
1294
- r.diffWithAddition(this._sheetDataValidationModel.getRules(o.unitId, o.subUnitId), C.values()),
1294
+ r.diffWithAddition(this._sheetDataValidationModel.getRules(o.unitId, o.subUnitId), I.values()),
1295
1295
  this._injector,
1296
1296
  "patched",
1297
1297
  !1
@@ -1313,12 +1313,12 @@ let te = class extends Vt {
1313
1313
  endColumn: _
1314
1314
  },
1315
1315
  w
1316
- ), { row: I, col: v } = h(S.startRow, S.startColumn);
1317
- s.setValue(I, v, V), l.add(V);
1316
+ ), { row: C, col: v } = h(S.startRow, S.startColumn);
1317
+ s.setValue(C, v, V), l.add(V);
1318
1318
  });
1319
1319
  });
1320
- const C = Array.from(l).map((w) => ({ id: w, ranges: Qe(s, (g) => g === w) }));
1321
- r.addRangeRules(C);
1320
+ const I = Array.from(l).map((w) => ({ id: w, ranges: Qe(s, (g) => g === w) }));
1321
+ r.addRangeRules(I);
1322
1322
  const { redoMutations: p, undoMutations: R } = an(
1323
1323
  a,
1324
1324
  i,
@@ -1335,7 +1335,7 @@ let te = class extends Vt {
1335
1335
  }
1336
1336
  };
1337
1337
  te = tr([
1338
- xe(0, ka),
1338
+ xe(0, Fa),
1339
1339
  xe(1, b(at)),
1340
1340
  xe(2, b(Wt))
1341
1341
  ], te);
@@ -1377,7 +1377,7 @@ function or(t) {
1377
1377
  icon: Lo,
1378
1378
  tooltip: "dataValidation.title",
1379
1379
  hidden$: Ba(t, X.UNIVER_SHEET),
1380
- disabled$: Fa(t, { workbookTypes: [Ve], worksheetTypes: [on, Re], rangeTypes: [De] })
1380
+ disabled$: ka(t, { workbookTypes: [Ve], worksheetTypes: [on, Re], rangeTypes: [De] })
1381
1381
  };
1382
1382
  }
1383
1383
  function ar(t) {
@@ -1489,17 +1489,17 @@ let ne = class extends gn {
1489
1489
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1490
1490
  if (!u)
1491
1491
  return o(t);
1492
- const h = (g = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? g : Kt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), C = e.rawData;
1492
+ const h = (g = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? g : Kt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), I = e.rawData;
1493
1493
  let p;
1494
1494
  const R = {
1495
1495
  get value() {
1496
- var I;
1497
- return p !== void 0 || (p = (I = mt(C)) != null ? I : null), p;
1496
+ var C;
1497
+ return p !== void 0 || (p = (C = mt(I)) != null ? C : null), p;
1498
1498
  }
1499
1499
  }, w = {
1500
1500
  get value() {
1501
- var I;
1502
- return `${(I = R.value) != null ? I : ""}`;
1501
+ var C;
1502
+ return `${(C = R.value) != null ? C : ""}`;
1503
1503
  }
1504
1504
  };
1505
1505
  return o({
@@ -1520,20 +1520,20 @@ let ne = class extends gn {
1520
1520
  ...t == null ? void 0 : t.interceptorStyle,
1521
1521
  ...d == null ? void 0 : d.getExtraStyle(u, w.value, {
1522
1522
  get style() {
1523
- const I = s.getStyles();
1524
- return (typeof (t == null ? void 0 : t.s) == "string" ? I.get(t == null ? void 0 : t.s) : t == null ? void 0 : t.s) || {};
1523
+ const C = s.getStyles();
1524
+ return (typeof (t == null ? void 0 : t.s) == "string" ? C.get(t == null ? void 0 : t.s) : t == null ? void 0 : t.s) || {};
1525
1525
  }
1526
1526
  }, n, a)
1527
1527
  },
1528
1528
  interceptorAutoHeight: () => {
1529
- var P, U, O, L, A, F;
1530
- const I = (U = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(ye).getSkeletonParam(r)) == null ? void 0 : U.skeleton;
1531
- if (!I)
1529
+ var P, U, O, L, A, k;
1530
+ const C = (U = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(ye).getSkeletonParam(r)) == null ? void 0 : U.skeleton;
1531
+ if (!C)
1532
1532
  return;
1533
- const v = I.worksheet.getMergedCell(n, a), y = {
1533
+ const v = C.worksheet.getMergedCell(n, a), y = {
1534
1534
  data: t,
1535
- style: I.getStyles().getStyleByCell(t),
1536
- primaryWithCoord: I.getCellWithCoordByIndex((O = v == null ? void 0 : v.startRow) != null ? O : n, (L = v == null ? void 0 : v.startColumn) != null ? L : a),
1535
+ style: C.getStyles().getStyleByCell(t),
1536
+ primaryWithCoord: C.getCellWithCoordByIndex((O = v == null ? void 0 : v.startRow) != null ? O : n, (L = v == null ? void 0 : v.startColumn) != null ? L : a),
1537
1537
  unitId: i,
1538
1538
  subUnitId: r,
1539
1539
  row: n,
@@ -1541,17 +1541,17 @@ let ne = class extends gn {
1541
1541
  workbook: s,
1542
1542
  worksheet: l
1543
1543
  };
1544
- return (F = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : F.call(A, y);
1544
+ return (k = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : k.call(A, y);
1545
1545
  },
1546
1546
  interceptorAutoWidth: () => {
1547
- var P, U, O, L, A, F;
1548
- const I = (U = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(ye).getSkeletonParam(r)) == null ? void 0 : U.skeleton;
1549
- if (!I)
1547
+ var P, U, O, L, A, k;
1548
+ const C = (U = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(ye).getSkeletonParam(r)) == null ? void 0 : U.skeleton;
1549
+ if (!C)
1550
1550
  return;
1551
- const v = I.worksheet.getMergedCell(n, a), y = {
1551
+ const v = C.worksheet.getMergedCell(n, a), y = {
1552
1552
  data: t,
1553
- style: I.getStyles().getStyleByCell(t),
1554
- primaryWithCoord: I.getCellWithCoordByIndex((O = v == null ? void 0 : v.startRow) != null ? O : n, (L = v == null ? void 0 : v.startColumn) != null ? L : a),
1553
+ style: C.getStyles().getStyleByCell(t),
1554
+ primaryWithCoord: C.getCellWithCoordByIndex((O = v == null ? void 0 : v.startRow) != null ? O : n, (L = v == null ? void 0 : v.startColumn) != null ? L : a),
1555
1555
  unitId: i,
1556
1556
  subUnitId: r,
1557
1557
  row: n,
@@ -1559,7 +1559,7 @@ let ne = class extends gn {
1559
1559
  workbook: s,
1560
1560
  worksheet: l
1561
1561
  };
1562
- return (F = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoWidth) == null ? void 0 : F.call(A, y);
1562
+ return (k = (A = d == null ? void 0 : d.canvasRender) == null ? void 0 : A.calcCellAutoWidth) == null ? void 0 : k.call(A, y);
1563
1563
  },
1564
1564
  coverable: ((S = t == null ? void 0 : t.coverable) != null ? S : !0) && !(u.type === K.LIST || u.type === K.LIST_MULTIPLE)
1565
1565
  });
@@ -1622,7 +1622,7 @@ let $n = class extends gn {
1622
1622
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1623
1623
  if (!u)
1624
1624
  return o(t);
1625
- const h = (w = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? w : Kt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), C = l.getCellRaw(n, a), p = mt(C), R = `${p != null ? p : ""}`;
1625
+ const h = (w = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? w : Kt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), I = l.getCellRaw(n, a), p = mt(I), R = `${p != null ? p : ""}`;
1626
1626
  return o({
1627
1627
  ...t,
1628
1628
  markers: {
@@ -1651,10 +1651,10 @@ let $n = class extends gn {
1651
1651
  const S = (P = (y = this._renderManagerService.getRenderById(i)) == null ? void 0 : y.with(ye).getSkeletonParam(r)) == null ? void 0 : P.skeleton;
1652
1652
  if (!S)
1653
1653
  return;
1654
- const I = S.worksheet.getMergedCell(n, a), v = {
1654
+ const C = S.worksheet.getMergedCell(n, a), v = {
1655
1655
  data: t,
1656
1656
  style: S.getStyles().getStyleByCell(t),
1657
- primaryWithCoord: S.getCellWithCoordByIndex((U = I == null ? void 0 : I.startRow) != null ? U : n, (O = I == null ? void 0 : I.startColumn) != null ? O : a),
1657
+ primaryWithCoord: S.getCellWithCoordByIndex((U = C == null ? void 0 : C.startRow) != null ? U : n, (O = C == null ? void 0 : C.startColumn) != null ? O : a),
1658
1658
  unitId: i,
1659
1659
  subUnitId: r,
1660
1660
  row: n,
@@ -1828,11 +1828,10 @@ function Cr(t) {
1828
1828
  }
1829
1829
  function Ir(t) {
1830
1830
  var h;
1831
- const { unitId: e, subUnitId: o, value: n, onChange: a, showError: i, validResult: r } = t, s = i ? r == null ? void 0 : r.formula1 : void 0, l = Jt({}), [c, u] = j(!1);
1831
+ const { unitId: e, subUnitId: o, value: n, onChange: a, showError: i, validResult: r } = t, s = i ? r == null ? void 0 : r.formula1 : void 0, l = Jt(null), [c, u] = j(!1);
1832
1832
  return fo((d) => {
1833
1833
  var p;
1834
- const C = (p = l.current) == null ? void 0 : p.handleOutClick;
1835
- C && C(d, () => u(!1));
1834
+ ((p = l.current) == null ? void 0 : p.isClickOutSide(d)) && u(!1);
1836
1835
  }), /* @__PURE__ */ m(
1837
1836
  So,
1838
1837
  {
@@ -1841,16 +1840,16 @@ function Ir(t) {
1841
1840
  subUnitId: o,
1842
1841
  isFocus: c,
1843
1842
  onChange: (d) => {
1844
- const C = (d != null ? d : "").trim();
1845
- C !== (n == null ? void 0 : n.formula1) && (a == null || a({
1843
+ const I = (d != null ? d : "").trim();
1844
+ I !== (n == null ? void 0 : n.formula1) && (a == null || a({
1846
1845
  ...n,
1847
- formula1: C
1846
+ formula1: I
1848
1847
  }));
1849
1848
  },
1850
1849
  errorText: s,
1851
1850
  onFocus: () => u(!0),
1852
- actions: l.current,
1853
- isSupportAcrossSheet: !0
1851
+ isSupportAcrossSheet: !0,
1852
+ ref: l
1854
1853
  }
1855
1854
  );
1856
1855
  }
@@ -1942,43 +1941,43 @@ const wr = [
1942
1941
  };
1943
1942
  function Dr(t) {
1944
1943
  const { value: e, onChange: o = () => {
1945
- }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: s } = t, { formula1: l = "", formula2: c = "" } = e || {}, u = Jt(null), [h, d] = j(() => kt(l) ? "1" : "0"), [C, p] = j(h === "1" ? l : "="), [R, w] = j(h === "1" ? l : "="), g = T(Q), f = T(bt), _ = T(ke), V = T(wa), [S, I] = j(() => c.split(",")), v = f.getValidatorItem(K.LIST), [y, P] = j([]), [U, O] = j(""), L = r ? i == null ? void 0 : i.formula1 : "", A = $t(() => _.ruleChange$.pipe(wn(16)), []), F = St(A), N = dn(o);
1944
+ }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: s } = t, { formula1: l = "", formula2: c = "" } = e || {}, u = Jt(null), [h, d] = j(() => Ft(l) ? "1" : "0"), [I, p] = j(h === "1" ? l : "="), [R, w] = j(h === "1" ? l : "="), g = T(Q), f = T(bt), _ = T(Fe), V = T(wa), [S, C] = j(() => c.split(",")), v = f.getValidatorItem(K.LIST), [y, P] = j([]), [U, O] = j(""), L = r ? i == null ? void 0 : i.formula1 : "", A = $t(() => _.ruleChange$.pipe(wn(16)), []), k = St(A), N = dn(o);
1946
1945
  wt(() => {
1947
1946
  (async () => {
1948
1947
  await new Promise(($) => {
1949
1948
  setTimeout(() => $(!0), 100);
1950
1949
  });
1951
- const D = _.getRuleById(n, a, s), k = D == null ? void 0 : D.formula1;
1952
- if (kt(k) && v && D) {
1950
+ const D = _.getRuleById(n, a, s), F = D == null ? void 0 : D.formula1;
1951
+ if (Ft(F) && v && D) {
1953
1952
  const $ = await v.getListAsync(D, n, a);
1954
1953
  P($);
1955
1954
  }
1956
1955
  })();
1957
- }, [_, F, v, s, a, n]), wt(() => {
1958
- kt(l) && l !== R && (p(l), w(R));
1956
+ }, [_, k, v, s, a, n]), wt(() => {
1957
+ Ft(l) && l !== R && (p(l), w(R));
1959
1958
  }, [R, l]);
1960
1959
  const [B, x] = j(() => {
1961
- const D = h !== "1" ? ao(l) : [], k = c.split(",");
1960
+ const D = h !== "1" ? ao(l) : [], F = c.split(",");
1962
1961
  return D.map(($, W) => ({
1963
1962
  label: $,
1964
- color: k[W] || Ft,
1963
+ color: F[W] || kt,
1965
1964
  isRef: !1,
1966
1965
  id: tn.generateRandomId(4)
1967
1966
  }));
1968
- }), z = (D, k, $) => {
1967
+ }), z = (D, F, $) => {
1969
1968
  const W = B.find((Ct) => Ct.id === D);
1970
- W && (W.label = k, W.color = $, x([...B]));
1969
+ W && (W.label = F, W.color = $, x([...B]));
1971
1970
  }, H = (D) => {
1972
- const k = B.findIndex(($) => $.id === D);
1973
- k !== -1 && (B.splice(k, 1), x([...B]));
1974
- }, G = c.split(","), J = $t(() => y.map((D, k) => ({
1971
+ const F = B.findIndex(($) => $.id === D);
1972
+ F !== -1 && (B.splice(F, 1), x([...B]));
1973
+ }, G = c.split(","), J = $t(() => y.map((D, F) => ({
1975
1974
  label: D,
1976
- color: G[k] || Ft,
1977
- id: `${k}`,
1975
+ color: G[F] || kt,
1976
+ id: `${F}`,
1978
1977
  isRef: !0
1979
- })), [G, y]), et = (D, k, $) => {
1978
+ })), [G, y]), et = (D, F, $) => {
1980
1979
  const W = [...S];
1981
- W[+D] = $, I(W), N({
1980
+ W[+D] = $, C(W), N({
1982
1981
  formula1: l,
1983
1982
  formula2: W.join(",")
1984
1983
  });
@@ -1987,7 +1986,7 @@ function Dr(t) {
1987
1986
  ...B,
1988
1987
  {
1989
1988
  label: "",
1990
- color: Ft,
1989
+ color: kt,
1991
1990
  isRef: !1,
1992
1991
  id: tn.generateRandomId(4)
1993
1992
  }
@@ -1996,24 +1995,24 @@ function Dr(t) {
1996
1995
  wt(() => {
1997
1996
  if (h === "1")
1998
1997
  return;
1999
- const D = /* @__PURE__ */ new Set(), k = [];
1998
+ const D = /* @__PURE__ */ new Set(), F = [];
2000
1999
  B.map(($) => ({
2001
2000
  labelList: $.label.split(","),
2002
2001
  item: $
2003
2002
  })).forEach(({ item: $, labelList: W }) => {
2004
2003
  W.forEach((Ct) => {
2005
- D.has(Ct) || (D.add(Ct), k.push({
2004
+ D.has(Ct) || (D.add(Ct), F.push({
2006
2005
  label: Ct,
2007
2006
  color: $.color
2008
2007
  }));
2009
2008
  });
2010
2009
  }), N({
2011
- formula1: io(k.map(($) => $.label)),
2012
- formula2: k.map(($) => $.color === Ft ? "" : $.color).join(",")
2010
+ formula1: io(F.map(($) => $.label)),
2011
+ formula2: F.map(($) => $.color === kt ? "" : $.color).join(",")
2013
2012
  });
2014
2013
  }, [B, N, h, R, S]);
2015
2014
  const st = dn(async (D) => {
2016
- if (!kt(D)) {
2015
+ if (!Ft(D)) {
2017
2016
  N == null || N({
2018
2017
  formula1: "",
2019
2018
  formula2: c
@@ -2021,17 +2020,16 @@ function Dr(t) {
2021
2020
  return;
2022
2021
  }
2023
2022
  V.getFormulaRefCheck(D) ? (N == null || N({
2024
- formula1: kt(D) ? D : "",
2023
+ formula1: Ft(D) ? D : "",
2025
2024
  formula2: c
2026
2025
  }), O("")) : (N == null || N({
2027
2026
  formula1: "",
2028
2027
  formula2: c
2029
2028
  }), p("="), O(g.t("dataValidation.validFail.formulaError")));
2030
- }), it = Jt({}), [lt, M] = j(!1);
2029
+ }), it = Jt(null), [lt, M] = j(!1);
2031
2030
  return fo((D) => {
2032
2031
  var $;
2033
- const k = ($ = it.current) == null ? void 0 : $.handleOutClick;
2034
- k && k(D, () => M(!1));
2032
+ (($ = it.current) == null ? void 0 : $.isClickOutSide(D)) && M(!1);
2035
2033
  }), /* @__PURE__ */ Y(Rt, { children: [
2036
2034
  /* @__PURE__ */ m(q, { label: g.t("dataValidation.list.options"), children: /* @__PURE__ */ Y(
2037
2035
  fn,
@@ -2053,18 +2051,18 @@ function Dr(t) {
2053
2051
  /* @__PURE__ */ m(
2054
2052
  So,
2055
2053
  {
2056
- initValue: C,
2054
+ initValue: I,
2057
2055
  unitId: n,
2058
2056
  subUnitId: a,
2059
2057
  isFocus: lt,
2060
2058
  onChange: (D = "") => {
2061
- const k = (D != null ? D : "").trim();
2062
- w(k), st(k);
2059
+ const F = (D != null ? D : "").trim();
2060
+ w(F), st(F);
2063
2061
  },
2064
2062
  errorText: L || U || void 0,
2065
2063
  onFocus: () => M(!0),
2066
- actions: it.current,
2067
- isSupportAcrossSheet: !0
2064
+ isSupportAcrossSheet: !0,
2065
+ ref: it
2068
2066
  }
2069
2067
  ),
2070
2068
  /* @__PURE__ */ m("div", { ref: u, style: { marginTop: "12px" }, children: J.map((D) => /* @__PURE__ */ m(Hn, { item: D, commonProps: { onItemChange: et }, style: { marginBottom: 12 } }, D.id)) })
@@ -2098,9 +2096,9 @@ function Dr(t) {
2098
2096
  ] }) })
2099
2097
  ] });
2100
2098
  }
2101
- const ko = "data-validation.custom-formula-input", Ue = "data-validation.formula-input", Mn = "data-validation.list-formula-input", Fo = "data-validation.checkbox-formula-input", Vr = [
2099
+ const Fo = "data-validation.custom-formula-input", Ue = "data-validation.formula-input", Mn = "data-validation.list-formula-input", ko = "data-validation.checkbox-formula-input", Vr = [
2102
2100
  [
2103
- ko,
2101
+ Fo,
2104
2102
  Ir
2105
2103
  ],
2106
2104
  [
@@ -2112,7 +2110,7 @@ const ko = "data-validation.custom-formula-input", Ue = "data-validation.formula
2112
2110
  Dr
2113
2111
  ],
2114
2112
  [
2115
- Fo,
2113
+ ko,
2116
2114
  Cr
2117
2115
  ]
2118
2116
  ], yr = "LIST_RENDER_MODE_OPTION_INPUT";
@@ -2202,23 +2200,23 @@ let cn = class {
2202
2200
  return ((o = e == null ? void 0 : e.fs) != null ? o : 10) * 1.6;
2203
2201
  }
2204
2202
  async _parseFormula(t, e, o) {
2205
- var c, u, h, d, C, p, R, w, g;
2206
- const { formula1: n = Va, formula2: a = Da } = t, i = await this._formulaService.getRuleFormulaResult(e, o, t.uid), r = $e((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), s = $e((p = (C = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : C[0]) == null ? void 0 : p[0]), l = Ln(String(r)) && Ln(String(s));
2203
+ var c, u, h, d, I, p, R, w, g;
2204
+ const { formula1: n = Va, formula2: a = Da } = t, i = await this._formulaService.getRuleFormulaResult(e, o, t.uid), r = $e((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), s = $e((p = (I = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : I[0]) == null ? void 0 : p[0]), l = Ln(String(r)) && Ln(String(s));
2207
2205
  return {
2208
- formula1: kt(n) ? $e((g = (w = (R = i == null ? void 0 : i[0]) == null ? void 0 : R.result) == null ? void 0 : w[0]) == null ? void 0 : g[0]) : n,
2209
- formula2: kt(a) ? s : a,
2206
+ formula1: Ft(n) ? $e((g = (w = (R = i == null ? void 0 : i[0]) == null ? void 0 : R.result) == null ? void 0 : w[0]) == null ? void 0 : g[0]) : n,
2207
+ formula2: Ft(a) ? s : a,
2210
2208
  isFormulaValid: l
2211
2209
  };
2212
2210
  }
2213
2211
  drawWith(t, e) {
2214
- var L, A, F, N;
2212
+ var L, A, k, N;
2215
2213
  const { style: o, primaryWithCoord: n, unitId: a, subUnitId: i, worksheet: r, row: s, col: l } = e, c = n.isMergedMainCell ? n.mergeInfo : n, u = mt(r.getCellRaw(s, l)), h = this._dataValidationModel.getRuleByLocation(a, i, s, l);
2216
2214
  if (!h)
2217
2215
  return;
2218
2216
  const d = this._dataValidationModel.getValidator(h.type);
2219
2217
  if (!d)
2220
2218
  return;
2221
- const C = this._themeService.getCurrentTheme();
2219
+ const I = this._themeService.getCurrentTheme();
2222
2220
  if (!((L = d.skipDefaultFontRender) != null && L.call(d, h, u, { unitId: a, subUnitId: i, row: s, column: l })))
2223
2221
  return;
2224
2222
  const p = d.parseFormulaSync(h, a, i), { formula1: R } = p, w = this._calc(c, o), { a: g, d: f } = t.getTransform(), _ = bn(w.left, g), V = bn(w.top, f), S = la.create().composeMatrix({
@@ -2231,16 +2229,16 @@ let cn = class {
2231
2229
  skewY: 0,
2232
2230
  flipX: !1,
2233
2231
  flipY: !1
2234
- }), I = c.endX - c.startX, v = c.endY - c.startY;
2235
- t.save(), t.beginPath(), t.rect(c.startX, c.startY, I, v), t.clip();
2232
+ }), C = c.endX - c.startX, v = c.endY - c.startY;
2233
+ t.save(), t.beginPath(), t.rect(c.startX, c.startY, C, v), t.clip();
2236
2234
  const y = S.getMatrix();
2237
2235
  t.transform(y[0], y[1], y[2], y[3], y[4], y[5]);
2238
- const P = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, U = String(u) === String(R), O = C.hyacinth500;
2236
+ const P = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, U = String(u) === String(R), O = I.hyacinth500;
2239
2237
  da.drawWith(t, {
2240
2238
  checked: U,
2241
2239
  width: P,
2242
2240
  height: P,
2243
- fill: (N = (F = o == null ? void 0 : o.cl) == null ? void 0 : F.rgb) != null ? N : O
2241
+ fill: (N = (k = o == null ? void 0 : o.cl) == null ? void 0 : k.rgb) != null ? N : O
2244
2242
  }), t.restore();
2245
2243
  }
2246
2244
  isHit(t, e) {
@@ -2257,7 +2255,7 @@ let cn = class {
2257
2255
  const u = this._dataValidationModel.getValidator(c.type);
2258
2256
  if (!u || !((p = u.skipDefaultFontRender) != null && p.call(u, c, l, { unitId: n, subUnitId: a, row: r, column: s })))
2259
2257
  return;
2260
- const { formula1: h, formula2: d } = await this._parseFormula(c, n, a), C = {
2258
+ const { formula1: h, formula2: d } = await this._parseFormula(c, n, a), I = {
2261
2259
  range: {
2262
2260
  startColumn: o.actualColumn,
2263
2261
  endColumn: o.actualColumn,
@@ -2271,7 +2269,7 @@ let cn = class {
2271
2269
  };
2272
2270
  this._commandService.executeCommand(
2273
2271
  _n.id,
2274
- C
2272
+ I
2275
2273
  );
2276
2274
  }
2277
2275
  onPointerEnter(t, e) {
@@ -2313,22 +2311,22 @@ class Pr extends vt {
2313
2311
  super(...arguments);
2314
2312
  E(this, "id", K.CHECKBOX);
2315
2313
  E(this, "canvasRender", this.injector.createInstance(cn));
2316
- E(this, "formulaInput", Fo);
2314
+ E(this, "formulaInput", ko);
2317
2315
  }
2318
2316
  }
2319
2317
  class Ar extends vt {
2320
2318
  constructor() {
2321
2319
  super(...arguments);
2322
2320
  E(this, "id", K.CUSTOM);
2323
- E(this, "formulaInput", ko);
2321
+ E(this, "formulaInput", Fo);
2324
2322
  }
2325
2323
  }
2326
- const kr = "data-validation.formula-input";
2327
- class Fr extends vt {
2324
+ const Fr = "data-validation.formula-input";
2325
+ class kr extends vt {
2328
2326
  constructor() {
2329
2327
  super(...arguments);
2330
2328
  E(this, "id", K.DATE);
2331
- E(this, "formulaInput", kr);
2329
+ E(this, "formulaInput", Fr);
2332
2330
  E(this, "optionsInput", Le.componentKey);
2333
2331
  E(this, "dropdown", Oo);
2334
2332
  }
@@ -2357,7 +2355,7 @@ function Xe(t, e, o, n) {
2357
2355
  let l;
2358
2356
  const c = [];
2359
2357
  s.forEach((d) => {
2360
- const { layout: C } = d, { width: p, height: R } = C;
2358
+ const { layout: I } = d, { width: p, height: R } = I;
2361
2359
  !l || l.width + p + Ye > i ? (l = {
2362
2360
  width: p,
2363
2361
  height: R,
@@ -2371,8 +2369,8 @@ function Xe(t, e, o, n) {
2371
2369
  }), l.width = l.width + p + Ye);
2372
2370
  });
2373
2371
  let u = 0, h = 0;
2374
- return c.forEach((d, C) => {
2375
- h = Math.max(h, d.width), C === c.length - 1 ? u += d.height : u += d.height + Uo;
2372
+ return c.forEach((d, I) => {
2373
+ h = Math.max(h, d.width), I === c.length - 1 ? u += d.height : u += d.height + Uo;
2376
2374
  }), {
2377
2375
  lines: c,
2378
2376
  totalHeight: u,
@@ -2390,7 +2388,7 @@ class Wr extends ua {
2390
2388
  width: s.width,
2391
2389
  height: s.height,
2392
2390
  radius: $r,
2393
- fill: i || Ft
2391
+ fill: i || kt
2394
2392
  }), e.translateWithPrecision(No, s.ba), e.font = n, e.fillStyle = r, e.fillText(l, 0, 0), e.restore();
2395
2393
  }
2396
2394
  }
@@ -2429,7 +2427,7 @@ let hn = class {
2429
2427
  // eslint-disable-next-line max-lines-per-function
2430
2428
  drawWith(t, e, o, n) {
2431
2429
  var z, H;
2432
- const { primaryWithCoord: a, row: i, col: r, style: s, data: l, subUnitId: c } = e, u = a.isMergedMainCell ? a.mergeInfo : a, h = l == null ? void 0 : l.fontRenderExtension, { leftOffset: d = 0, rightOffset: C = 0, topOffset: p = 0, downOffset: R = 0 } = h || {}, w = this._ensureMap(c), g = this._generateKey(i, r), f = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, r);
2430
+ const { primaryWithCoord: a, row: i, col: r, style: s, data: l, subUnitId: c } = e, u = a.isMergedMainCell ? a.mergeInfo : a, h = l == null ? void 0 : l.fontRenderExtension, { leftOffset: d = 0, rightOffset: I = 0, topOffset: p = 0, downOffset: R = 0 } = h || {}, w = this._ensureMap(c), g = this._generateKey(i, r), f = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, r);
2433
2431
  if (!f)
2434
2432
  return;
2435
2433
  const _ = this._dataValidationModel.getValidator(f.type);
@@ -2437,11 +2435,11 @@ let hn = class {
2437
2435
  return;
2438
2436
  const V = {
2439
2437
  startX: u.startX + d,
2440
- endX: u.endX - C,
2438
+ endX: u.endX - I,
2441
2439
  startY: u.startY + p,
2442
2440
  endY: u.endY - R
2443
- }, S = V.endX - V.startX, I = V.endY - V.startY, { cl: v } = s || {}, y = (z = typeof v == "object" ? v == null ? void 0 : v.rgb : v) != null ? z : "#000", P = Be(s != null ? s : void 0), { vt: U, ht: O } = s || {}, L = U != null ? U : ht.MIDDLE, A = (H = mt(l)) != null ? H : "", F = _.parseCellValue(A), N = _.getListWithColorMap(f), B = Xe(F, P, S, I);
2444
- this._drawDownIcon(t, V, S, I, L), t.save(), t.translateWithPrecision(V.startX, V.startY), t.beginPath(), t.rect(0, 0, S - At, I), t.clip(), t.translateWithPrecision(un, Te);
2441
+ }, S = V.endX - V.startX, C = V.endY - V.startY, { cl: v } = s || {}, y = (z = typeof v == "object" ? v == null ? void 0 : v.rgb : v) != null ? z : "#000", P = Be(s != null ? s : void 0), { vt: U, ht: O } = s || {}, L = U != null ? U : ht.MIDDLE, A = (H = mt(l)) != null ? H : "", k = _.parseCellValue(A), N = _.getListWithColorMap(f), B = Xe(k, P, S, C);
2442
+ this._drawDownIcon(t, V, S, C, L), t.save(), t.translateWithPrecision(V.startX, V.startY), t.beginPath(), t.rect(0, 0, S - At, C), t.clip(), t.translateWithPrecision(un, Te);
2445
2443
  let x = 0;
2446
2444
  switch (L) {
2447
2445
  case ht.MIDDLE:
@@ -2485,10 +2483,10 @@ let hn = class {
2485
2483
  endX: h.endX - l,
2486
2484
  startY: h.startY + c,
2487
2485
  endY: h.endY - u
2488
- }, C = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2489
- if (!C)
2486
+ }, I = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2487
+ if (!I)
2490
2488
  return;
2491
- const p = this._dataValidationModel.getValidator(C.type);
2489
+ const p = this._dataValidationModel.getValidator(I.type);
2492
2490
  if (!p)
2493
2491
  return;
2494
2492
  const R = d.endX - d.startX, w = d.endY - d.startY, g = (S = mt(n)) != null ? S : "", f = p.parseCellValue(g), _ = Be(o != null ? o : void 0);
@@ -2501,10 +2499,10 @@ let hn = class {
2501
2499
  endX: h.endX - l,
2502
2500
  startY: h.startY + c,
2503
2501
  endY: h.endY - u
2504
- }, C = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2505
- if (!C)
2502
+ }, I = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2503
+ if (!I)
2506
2504
  return;
2507
- const p = this._dataValidationModel.getValidator(C.type);
2505
+ const p = this._dataValidationModel.getValidator(I.type);
2508
2506
  if (!p)
2509
2507
  return;
2510
2508
  const R = d.endX - d.startX, w = d.endY - d.startY, g = (S = mt(n)) != null ? S : "", f = p.parseCellValue(g), _ = Be(o != null ? o : void 0);
@@ -2523,7 +2521,7 @@ let hn = class {
2523
2521
  row: a,
2524
2522
  column: i
2525
2523
  };
2526
- this._commandService.executeCommand(Fe.id, r);
2524
+ this._commandService.executeCommand(ke.id, r);
2527
2525
  }
2528
2526
  onPointerEnter(t, e) {
2529
2527
  var o, n;
@@ -2684,39 +2682,39 @@ let pn = class {
2684
2682
  const h = this._dataValidationModel.getValidator(u.type);
2685
2683
  if (!h)
2686
2684
  return;
2687
- const d = s == null ? void 0 : s.fontRenderExtension, { leftOffset: C = 0, rightOffset: p = 0, topOffset: R = 0, downOffset: w = 0 } = d || {};
2685
+ const d = s == null ? void 0 : s.fontRenderExtension, { leftOffset: I = 0, rightOffset: p = 0, topOffset: R = 0, downOffset: w = 0 } = d || {};
2688
2686
  if (!u || !h || !h || h.id.indexOf(K.LIST) !== 0 || !h.skipDefaultFontRender(u))
2689
2687
  return;
2690
2688
  const g = {
2691
- startX: c.startX + C,
2689
+ startX: c.startX + I,
2692
2690
  endX: c.endX - p,
2693
2691
  startY: c.startY + R,
2694
2692
  endY: c.endY - w
2695
- }, f = g.endX - g.startX, _ = g.endY - g.startY, V = this._ensureMap(l), S = this._generateKey(a, i), I = h.getListWithColor(u), v = mt(s), y = `${v != null ? v : ""}`, P = I.find((F) => F.label === y);
2693
+ }, f = g.endX - g.startX, _ = g.endY - g.startY, V = this._ensureMap(l), S = this._generateKey(a, i), C = h.getListWithColor(u), v = mt(s), y = `${v != null ? v : ""}`, P = C.find((k) => k.label === y);
2696
2694
  let { tb: U, vt: O, ht: L, pd: A } = r || {};
2697
2695
  if (U = U != null ? U : It.WRAP, O = O != null ? O : ht.BOTTOM, L = L != null ? L : dt.ht, A = A != null ? A : dt.pd, u.renderMode === ct.ARROW) {
2698
- const { l: F = dt.pd.l, t: N = dt.pd.t, r: B = dt.pd.r, b: x = dt.pd.b } = A, z = f - F - B - pt - 4, { documentSkeleton: H, documents: G, docModel: J } = _e(y, this._localeService, r);
2696
+ const { l: k = dt.pd.l, t: N = dt.pd.t, r: B = dt.pd.r, b: x = dt.pd.b } = A, z = f - k - B - pt - 4, { documentSkeleton: H, documents: G, docModel: J } = _e(y, this._localeService, r);
2699
2697
  U === It.WRAP && J.updateDocumentDataPageSize(Math.max(z, 1)), H.calculate(), H.getActualSize();
2700
2698
  const et = re(H), { height: nt, width: st } = et, { paddingTop: it, paddingLeft: lt } = jn(z, _ - N - x, st, nt, O, L, !0);
2701
- this._drawDownIcon(t, g, f, _, nt, O, A), t.save(), t.translateWithPrecision(g.startX + F, g.startY + N), t.beginPath(), t.rect(0, 0, f - F - B, _ - N - x), t.clip(), t.translateWithPrecision(0, it), t.save(), t.translateWithPrecision(Pt, 0), t.beginPath(), t.rect(0, 0, z, nt), t.clip(), G.render(t), t.translateWithPrecision(lt, 0), t.restore(), t.restore(), V.set(S, {
2702
- left: g.endX + F + o.rowHeaderWidth - pt,
2699
+ this._drawDownIcon(t, g, f, _, nt, O, A), t.save(), t.translateWithPrecision(g.startX + k, g.startY + N), t.beginPath(), t.rect(0, 0, f - k - B, _ - N - x), t.clip(), t.translateWithPrecision(0, it), t.save(), t.translateWithPrecision(Pt, 0), t.beginPath(), t.rect(0, 0, z, nt), t.clip(), G.render(t), t.translateWithPrecision(lt, 0), t.restore(), t.restore(), V.set(S, {
2700
+ left: g.endX + k + o.rowHeaderWidth - pt,
2703
2701
  top: g.startY + N + o.columnHeaderHeight,
2704
2702
  width: pt,
2705
2703
  height: _ - N - x
2706
2704
  });
2707
2705
  } else {
2708
2706
  t.save(), t.translateWithPrecision(g.startX, g.startY), t.beginPath(), t.rect(0, 0, f, _), t.clip();
2709
- const F = f - gt * 2 - Pt - pt - 4, { documentSkeleton: N, documents: B, docModel: x } = _e(y, this._localeService, r);
2710
- U === It.WRAP && x.updateDocumentDataPageSize(Math.max(F, 1)), N.calculate();
2711
- const z = re(N), { height: H, width: G } = z, { paddingTop: J, paddingLeft: et } = jn(F, _, G, H, O, L);
2707
+ const k = f - gt * 2 - Pt - pt - 4, { documentSkeleton: N, documents: B, docModel: x } = _e(y, this._localeService, r);
2708
+ U === It.WRAP && x.updateDocumentDataPageSize(Math.max(k, 1)), N.calculate();
2709
+ const z = re(N), { height: H, width: G } = z, { paddingTop: J, paddingLeft: et } = jn(k, _, G, H, O, L);
2712
2710
  t.translateWithPrecision(gt, J);
2713
2711
  const nt = Math.max(f - gt * 2, 1), st = H;
2714
2712
  Jn.drawWith(t, {
2715
2713
  width: nt,
2716
2714
  height: st,
2717
- fill: (P == null ? void 0 : P.color) || Ft,
2715
+ fill: (P == null ? void 0 : P.color) || kt,
2718
2716
  radius: ze
2719
- }), t.save(), t.translateWithPrecision(Pt, 0), t.beginPath(), t.rect(0, 0, F, H), t.clip(), t.translateWithPrecision(et, 0), B.render(t), t.restore(), t.translateWithPrecision(F + Pt + 4, (H - ve) / 2), t.fillStyle = Kr, t.fill(xn), t.restore(), V.set(S, {
2717
+ }), t.save(), t.translateWithPrecision(Pt, 0), t.beginPath(), t.rect(0, 0, k, H), t.clip(), t.translateWithPrecision(et, 0), B.render(t), t.restore(), t.translateWithPrecision(k + Pt + 4, (H - ve) / 2), t.fillStyle = Kr, t.fill(xn), t.restore(), V.set(S, {
2720
2718
  left: g.startX + gt + o.rowHeaderWidth,
2721
2719
  top: g.startY + J + o.columnHeaderHeight,
2722
2720
  width: nt,
@@ -2728,23 +2726,23 @@ let pn = class {
2728
2726
  const { primaryWithCoord: e, style: o, data: n, row: a, col: i } = t, r = e.isMergedMainCell ? e.mergeInfo : e, s = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = s || {}, d = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2729
2727
  if (!d || d.renderMode === ct.TEXT)
2730
2728
  return;
2731
- const C = {
2729
+ const I = {
2732
2730
  startX: r.startX + l,
2733
2731
  endX: r.endX - c,
2734
2732
  startY: r.startY + u,
2735
2733
  endY: r.endY - h
2736
- }, p = C.endX - C.startX, R = mt(n), w = `${R != null ? R : ""}`;
2734
+ }, p = I.endX - I.startX, R = mt(n), w = `${R != null ? R : ""}`;
2737
2735
  let { tb: g, pd: f } = o || {};
2738
2736
  const { t: _ = dt.pd.t, b: V = dt.pd.b } = f != null ? f : {};
2739
2737
  if (g = g != null ? g : It.WRAP, d.renderMode === ct.ARROW) {
2740
- const S = p - pt, { documentSkeleton: I, docModel: v } = _e(w, this._localeService, o);
2741
- g === It.WRAP && v.updateDocumentDataPageSize(Math.max(S, 1)), I.calculate(), I.getActualSize();
2742
- const y = re(I), { height: P } = y;
2738
+ const S = p - pt, { documentSkeleton: C, docModel: v } = _e(w, this._localeService, o);
2739
+ g === It.WRAP && v.updateDocumentDataPageSize(Math.max(S, 1)), C.calculate(), C.getActualSize();
2740
+ const y = re(C), { height: P } = y;
2743
2741
  return P + _ + V + zt * 2;
2744
2742
  } else {
2745
- const S = p - gt * 2 - Pt - pt, { documentSkeleton: I, docModel: v } = Bo(w, this._localeService, o);
2746
- g === It.WRAP && v.updateDocumentDataPageSize(Math.max(S, 1)), I.calculate();
2747
- const y = re(I), {
2743
+ const S = p - gt * 2 - Pt - pt, { documentSkeleton: C, docModel: v } = Bo(w, this._localeService, o);
2744
+ g === It.WRAP && v.updateDocumentDataPageSize(Math.max(S, 1)), C.calculate();
2745
+ const y = re(C), {
2748
2746
  height: P
2749
2747
  } = y;
2750
2748
  return P + zt * 2;
@@ -2754,12 +2752,12 @@ let pn = class {
2754
2752
  const { primaryWithCoord: e, style: o, data: n, row: a, col: i } = t, r = e.isMergedMainCell ? e.mergeInfo : e, s = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: c = 0, topOffset: u = 0, downOffset: h = 0 } = s || {}, d = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, a, i);
2755
2753
  if (!d || d.renderMode === ct.TEXT)
2756
2754
  return;
2757
- const C = {
2755
+ const I = {
2758
2756
  startX: r.startX + l,
2759
2757
  endX: r.endX - c,
2760
2758
  startY: r.startY + u,
2761
2759
  endY: r.endY - h
2762
- }, p = C.endX - C.startX, R = mt(n), w = `${R != null ? R : ""}`;
2760
+ }, p = I.endX - I.startX, R = mt(n), w = `${R != null ? R : ""}`;
2763
2761
  let { tb: g, pd: f } = o || {};
2764
2762
  const { l: _ = dt.pd.l, r: V = dt.pd.r } = f != null ? f : {};
2765
2763
  g = g != null ? g : It.WRAP;
@@ -2775,15 +2773,15 @@ let pn = class {
2775
2773
  default:
2776
2774
  S = pt + gt * 2 + Pt * 2 + V + _ + ze / 2 + 1;
2777
2775
  }
2778
- const I = p - S, { documentSkeleton: v, docModel: y } = _e(w, this._localeService, o);
2779
- return g === It.WRAP && y.updateDocumentDataPageSize(Math.max(I, 1)), v.calculate(), v.getActualSize(), re(v).width + S;
2776
+ const C = p - S, { documentSkeleton: v, docModel: y } = _e(w, this._localeService, o);
2777
+ return g === It.WRAP && y.updateDocumentDataPageSize(Math.max(C, 1)), v.calculate(), v.getActualSize(), re(v).width + S;
2780
2778
  }
2781
2779
  isHit(t, e) {
2782
2780
  const { subUnitId: o, row: n, col: a } = e, r = this._ensureMap(o).get(this._generateKey(n, a)), s = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, n, a);
2783
2781
  if (!s || !r || s.renderMode === ct.TEXT)
2784
2782
  return !1;
2785
- const { top: l, left: c, width: u, height: h } = r, { x: d, y: C } = t;
2786
- return d >= c && d <= c + u && C >= l && C <= l + h;
2783
+ const { top: l, left: c, width: u, height: h } = r, { x: d, y: I } = t;
2784
+ return d >= c && d <= c + u && I >= l && I <= l + h;
2787
2785
  }
2788
2786
  onPointerDown(t, e) {
2789
2787
  if (e.button === 2)
@@ -2794,7 +2792,7 @@ let pn = class {
2794
2792
  row: a,
2795
2793
  column: i
2796
2794
  };
2797
- this._commandService.executeCommand(Fe.id, r);
2795
+ this._commandService.executeCommand(ke.id, r);
2798
2796
  }
2799
2797
  onPointerEnter(t, e) {
2800
2798
  var o, n;
@@ -2867,7 +2865,7 @@ let oe = class extends gn {
2867
2865
  Nr,
2868
2866
  Jr,
2869
2867
  qr,
2870
- Fr,
2868
+ kr,
2871
2869
  Pr,
2872
2870
  Zr,
2873
2871
  Yr,
@@ -2915,7 +2913,7 @@ let Yn = (Se = class extends Zn {
2915
2913
  this._injector.add(t);
2916
2914
  }), [
2917
2915
  Ne,
2918
- Fe,
2916
+ ke,
2919
2917
  bo,
2920
2918
  Dn,
2921
2919
  Ht,
@@ -2973,7 +2971,7 @@ let Xn = (Ce = class extends Zn {
2973
2971
  this._injector.add(t);
2974
2972
  }), [
2975
2973
  Ne,
2976
- Fe,
2974
+ ke,
2977
2975
  bo,
2978
2976
  Dn,
2979
2977
  Ht,