@univerjs/sheets-data-validation-ui 0.15.3 → 0.15.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  var Tr = Object.defineProperty;
2
2
  var Or = (e, t, n) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var V = (e, t, n) => Or(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { Disposable as Re, UniverInstanceType as Z, toDisposable as Ar, IUniverInstanceService as le, Inject as D, LocaleService as de, DataValidationErrorStyle as st, DataValidationStatus as Ye, ICommandService as te, Injector as ye, IConfigService as dn, DataValidationRenderMode as ae, DisposableCollection as Pr, dayjs as Nt, numfmt as Wn, CellValueType as Lr, CommandType as tt, DataValidationType as Y, ObjectMatrix as wt, Range as kr, Rectangle as It, queryObjectMatrix as zt, Optional as Nr, RxDisposable as cn, 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 ee, 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 un, VALIDATE_CELL as Kr, SheetsSelectionsService as Gn, SetRangeValuesCommand as at, getSheetCommandTarget as zn, rangeToDiscreteRange as Gr, SheetPermissionCheckController as zr, WorksheetEditPermission as qt, WorksheetSetCellStylePermission as Jt, RangeProtectionPermissionEditPoint as Qt, WorkbookEditablePermission as en, INTERCEPTOR_POINT as qn, InterceptCellContentPriority as Jn, checkRangesEditablePermission as qr } from "@univerjs/sheets";
4
+ import { Disposable as Re, UniverInstanceType as Z, toDisposable as Ar, IUniverInstanceService as le, Inject as D, LocaleService as de, DataValidationErrorStyle as st, DataValidationStatus as Ye, ICommandService as te, Injector as ye, IConfigService as dn, DataValidationRenderMode as ae, DisposableCollection as Pr, dayjs as Nt, numfmt as Wn, CellValueType as Lr, CommandType as tt, DataValidationType as Y, ObjectMatrix as wt, Range as kr, Rectangle as It, queryObjectMatrix as Gt, Optional as Nr, RxDisposable as cn, 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 ee, 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 zn, getFontStyleString as Ve, DocSimpleSkeleton as rt, Text as bn } from "@univerjs/engine-render";
6
+ import { SheetInterceptorService as un, VALIDATE_CELL as zr, SheetsSelectionsService as Kn, SetRangeValuesCommand as at, getSheetCommandTarget as Gn, rangeToDiscreteRange as Kr, SheetPermissionCheckController as Gr, WorksheetEditPermission as qt, WorksheetSetCellStylePermission as Jt, RangeProtectionPermissionEditPoint as Qt, WorkbookEditablePermission as en, INTERCEPTOR_POINT as qn, InterceptCellContentPriority as Jn, checkRangesEditablePermission as qr } from "@univerjs/sheets";
7
7
  import { SheetDataValidationModel as oe, SheetsDataValidationValidatorService as Jr, getDataValidationCellValue as Ut, getCellValueOrigin as re, serializeListOptions as Qn, createDefaultNewRule as er, AddSheetDataValidationCommand as hn, DATA_VALIDATION_PLUGIN_NAME as tr, getDataValidationDiffMutations as tn, 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 At, LIST_FORMULA_INPUT_NAME as pn, CHECKBOX_FORMULA_INPUT_NAME as ar, DataValidationFormulaService as ro, CHECKBOX_FORMULA_2 as oo, CHECKBOX_FORMULA_1 as io, getFormulaResult as Ft, isLegalFormulaResult as Dn, transformCheckboxValue as ao, UniverSheetsDataValidationPlugin as so } from "@univerjs/sheets-data-validation";
8
8
  import { DataValidatorRegistryService as Me, DataValidatorDropdownType as pe, DataValidationModel as gn, DataValidatorRegistryScope as lo, TWO_FORMULA_OPERATOR_COUNT as co, getRuleOptions as Vn, getRuleSetting as Tn } from "@univerjs/data-validation";
9
9
  import { ISidebarService as sr, IDialogService as uo, IZenZoneService as lr, KeyCode as gt, MenuItemType as vn, getMenuHiddenObservable as ho, RibbonDataGroup as po, IMenuManagerService as go, useDependency as F, ComponentManager as mn, useObservable as Oe, useEvent as nn, useSidebarClick as dr } from "@univerjs/ui";
10
10
  import { filter as fn, BehaviorSubject as On, distinctUntilChanged as vo, Subject as mo, debounceTime as cr, bufferTime as ur, of as fo } from "rxjs";
11
11
  import { getPatternType as _o } from "@univerjs/sheets-numfmt";
12
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 rn, getAutoFillRepeatRange as yo, ISheetClipboardService as Mo, COPY_TYPE as An, PREDEFINED_HOOK_NAME_PASTE 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 X, RadioGroup as _n, Radio as Ae, Checkbox as Pt, Input as Pe, Select as Ln, clsx as ke, borderClassName as Rt, DraggableList as Do, Dropdown as Vo } from "@univerjs/design";
13
+ import { Button as ze, FormLayout as X, RadioGroup as _n, Radio as Ae, Checkbox as Pt, Input as Pe, Select as Ln, clsx as ke, borderClassName as Rt, DraggableList as Do, Dropdown as Vo } from "@univerjs/design";
14
14
  import { createElement as we, useRef as ht, forwardRef as nt, useState as W, useMemo as dt, useEffect as Le } from "react";
15
15
  import { jsxs as j, Fragment as ct, jsx as C } from "react/jsx-runtime";
16
16
  import { deserializeRangeWithSheet as To, serializeRange as gr } from "@univerjs/engine-formula";
@@ -75,13 +75,13 @@ var Lo = Object.getOwnPropertyDescriptor, ko = (e, t, n, r) => {
75
75
  (a = e[i]) && (o = a(o) || o);
76
76
  return o;
77
77
  }, xe = (e, t) => (n, r) => t(n, r, e);
78
- let Ge = class extends Re {
78
+ let Ke = class extends Re {
79
79
  constructor(e, t, n, r, o, i) {
80
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
- Kr,
84
+ zr,
85
85
  {
86
86
  handler: async (e, t, n) => {
87
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;
@@ -101,7 +101,7 @@ let Ge = class extends Re {
101
101
  },
102
102
  footer: {
103
103
  title: we(
104
- Ke,
104
+ ze,
105
105
  {
106
106
  variant: "primary",
107
107
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -129,7 +129,7 @@ let Ge = class extends Re {
129
129
  },
130
130
  footer: {
131
131
  title: we(
132
- Ke,
132
+ ze,
133
133
  {
134
134
  variant: "primary",
135
135
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -143,14 +143,14 @@ let Ge = class extends Re {
143
143
  });
144
144
  }
145
145
  };
146
- Ge = ko([
146
+ Ke = ko([
147
147
  xe(0, D(un)),
148
148
  xe(1, D(oe)),
149
149
  xe(2, D(Me)),
150
150
  xe(3, uo),
151
151
  xe(4, D(de)),
152
152
  xe(5, D(Jr))
153
- ], Ge);
153
+ ], Ke);
154
154
  var No = Object.getOwnPropertyDescriptor, Uo = (e, t, n, r) => {
155
155
  for (var o = r > 1 ? void 0 : r ? No(t, n) : t, i = e.length - 1, a; i >= 0; i--)
156
156
  (a = e[i]) && (o = a(o) || o);
@@ -272,7 +272,7 @@ let Ne = class extends Re {
272
272
  eventType: pt.Keyboard,
273
273
  unitId: i,
274
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);
275
+ }), !0) : (this._injector.has(Ke) && this._injector.get(Ke).showReject(u.getRuleFinalError(d, { row: r, col: o, unitId: i, subUnitId: a })), !1);
276
276
  };
277
277
  let m;
278
278
  switch (u.dropdownType) {
@@ -488,7 +488,7 @@ Ne = Uo([
488
488
  ue(1, D(Me)),
489
489
  ue(2, lr),
490
490
  ue(3, D(oe)),
491
- ue(4, D(Gn)),
491
+ ue(4, D(Kn)),
492
492
  ue(5, D(Co)),
493
493
  ue(6, D(oe)),
494
494
  ue(7, te),
@@ -502,7 +502,7 @@ const bt = "DataValidationPanel", Fe = {
502
502
  handler(e, t) {
503
503
  if (!t)
504
504
  return !1;
505
- const { ruleId: n, isAdd: r } = t, o = e.get(me), i = e.get(gn), a = e.get(le), l = e.get(sr), s = zn(a);
505
+ const { ruleId: n, isAdd: r } = t, o = e.get(me), i = e.get(gn), a = e.get(le), l = e.get(sr), s = Gn(a);
506
506
  if (!s) return !1;
507
507
  const { unitId: d, subUnitId: u } = s, g = n ? i.getRuleById(d, u, n) : void 0;
508
508
  o.open(), o.setActiveRule(g && {
@@ -556,7 +556,7 @@ const bt = "DataValidationPanel", Fe = {
556
556
  type: tt.COMMAND,
557
557
  id: "data-validation.command.addRuleAndOpen",
558
558
  handler(e) {
559
- const t = e.get(le), n = zn(t);
559
+ const t = e.get(le), n = Gn(t);
560
560
  if (!n) return !1;
561
561
  const { workbook: r, worksheet: o } = n, i = er(e), a = e.get(te), l = r.getUnitId(), s = o.getSheetId(), d = {
562
562
  rule: i,
@@ -638,7 +638,7 @@ var Bo = Object.getOwnPropertyDescriptor, Wo = (e, t, n, r) => {
638
638
  (a = e[i]) && (o = a(o) || o);
639
639
  return o;
640
640
  }, xt = (e, t) => (n, r) => t(n, r, e);
641
- let ze = class extends Re {
641
+ let Ge = class extends Re {
642
642
  constructor(e, t, n) {
643
643
  super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = n, this._initAutoFill();
644
644
  }
@@ -682,7 +682,7 @@ let ze = class extends Re {
682
682
  R.setValue(B, ne, H), w.add(H);
683
683
  });
684
684
  });
685
- const S = Array.from(w).map((p) => ({ id: p, ranges: zt(R, (_) => _ === p) }));
685
+ const S = Array.from(w).map((p) => ({ id: p, ranges: Gt(R, (_) => _ === p) }));
686
686
  d.addRangeRules(S);
687
687
  const I = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: b, undoMutations: v } = tn(l, s, I, this._injector, "patched", o === ot.ONLY_FORMAT);
688
688
  return {
@@ -709,11 +709,11 @@ let ze = class extends Re {
709
709
  this.disposeWithMe(this._autoFillService.addHook(n));
710
710
  }
711
711
  };
712
- ze = Wo([
712
+ Ge = Wo([
713
713
  xt(0, Ro),
714
714
  xt(1, D(oe)),
715
715
  xt(2, D(ye))
716
- ], ze);
716
+ ], Ge);
717
717
  var Ho = Object.getOwnPropertyDescriptor, jo = (e, t, n, r) => {
718
718
  for (var o = r > 1 ? void 0 : r ? Ho(t, n) : t, i = e.length - 1, a; i >= 0; i--)
719
719
  (a = e[i]) && (o = a(o) || o);
@@ -742,7 +742,7 @@ let qe = class extends Re {
742
742
  subUnitId: n,
743
743
  matrix: o
744
744
  };
745
- const i = this._injector.invoke((s) => Gr(r, s, t, n));
745
+ const i = this._injector.invoke((s) => Kr(r, s, t, n));
746
746
  if (!i)
747
747
  return;
748
748
  const { rows: a, cols: l } = i;
@@ -788,7 +788,7 @@ let qe = class extends Re {
788
788
  s.add(_), l.setValue(k, U, _);
789
789
  });
790
790
  });
791
- const h = Array.from(s).map((w) => ({ id: w, ranges: zt(l, (S) => S === w) }));
791
+ const h = Array.from(s).map((w) => ({ id: w, ranges: Gt(l, (S) => S === w) }));
792
792
  a.addRangeRules(h);
793
793
  const { redoMutations: E, undoMutations: R } = tn(
794
794
  n.unitId,
@@ -819,7 +819,7 @@ let qe = class extends Re {
819
819
  l.setValue(p, _, b), s.add(b);
820
820
  });
821
821
  });
822
- const m = Array.from(s).map((R) => ({ id: R, ranges: zt(l, (w) => w === R) }));
822
+ const m = Array.from(s).map((R) => ({ id: R, ranges: Gt(l, (w) => w === R) }));
823
823
  a.addRangeRules(m);
824
824
  const { redoMutations: h, undoMutations: E } = tn(
825
825
  o,
@@ -876,7 +876,7 @@ let Je = class extends Re {
876
876
  Je = Xo([
877
877
  Wt(0, D(de)),
878
878
  Wt(1, te),
879
- Wt(2, D(zr))
879
+ Wt(2, D(Gr))
880
880
  ], Je);
881
881
  const _r = "sheet.menu.data-validation";
882
882
  function Zo(e) {
@@ -889,32 +889,32 @@ function Zo(e) {
889
889
  disabled$: bo(e, { workbookTypes: [en], worksheetTypes: [Jt, qt], rangeTypes: [Qt] })
890
890
  };
891
891
  }
892
- function Ko(e) {
892
+ function zo(e) {
893
893
  return {
894
894
  id: Fe.id,
895
895
  title: "dataValidation.panel.title",
896
896
  type: vn.BUTTON
897
897
  };
898
898
  }
899
- function Go(e) {
899
+ function Ko(e) {
900
900
  return {
901
901
  id: kt.id,
902
902
  title: "dataValidation.panel.add",
903
903
  type: vn.BUTTON
904
904
  };
905
905
  }
906
- const zo = {
906
+ const Go = {
907
907
  [po.RULES]: {
908
908
  [_r]: {
909
909
  order: 0,
910
910
  menuItemFactory: Zo,
911
911
  [Fe.id]: {
912
912
  order: 0,
913
- menuItemFactory: Ko
913
+ menuItemFactory: zo
914
914
  },
915
915
  [kt.id]: {
916
916
  order: 1,
917
- menuItemFactory: Go
917
+ menuItemFactory: Ko
918
918
  }
919
919
  }
920
920
  }
@@ -923,7 +923,7 @@ var qo = Object.getOwnPropertyDescriptor, Cr = (e, t, n, r) => {
923
923
  for (var o = r > 1 ? void 0 : r ? qo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
924
924
  (a = e[i]) && (o = a(o) || o);
925
925
  return o;
926
- }, G = (e, t) => (n, r) => t(n, r, e);
926
+ }, K = (e, t) => (n, r) => t(n, r, e);
927
927
  const Sr = {
928
928
  tr: {
929
929
  size: 6,
@@ -935,7 +935,7 @@ let Qe = class extends cn {
935
935
  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();
936
936
  }
937
937
  _initMenu() {
938
- this._menuManagerService.mergeMenu(zo);
938
+ this._menuManagerService.mergeMenu(Go);
939
939
  }
940
940
  _initDropdown() {
941
941
  this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
@@ -1086,17 +1086,17 @@ let Qe = class extends cn {
1086
1086
  }
1087
1087
  };
1088
1088
  Qe = Cr([
1089
- G(0, te),
1090
- G(1, go),
1091
- G(2, Ue),
1092
- G(3, le),
1093
- G(4, D(pr)),
1094
- G(5, D(Ne)),
1095
- G(6, D(oe)),
1096
- G(7, D(Me)),
1097
- G(8, D(un)),
1098
- G(9, D(rr)),
1099
- G(10, Nr(hr))
1089
+ K(0, te),
1090
+ K(1, go),
1091
+ K(2, Ue),
1092
+ K(3, le),
1093
+ K(4, D(pr)),
1094
+ K(5, D(Ne)),
1095
+ K(6, D(oe)),
1096
+ K(7, D(Me)),
1097
+ K(8, D(un)),
1098
+ K(9, D(rr)),
1099
+ K(10, Nr(hr))
1100
1100
  ], Qe);
1101
1101
  let Nn = class extends cn {
1102
1102
  constructor(e, t, n, r, o, i, a) {
@@ -1195,13 +1195,13 @@ let Nn = class extends cn {
1195
1195
  }
1196
1196
  };
1197
1197
  Nn = Cr([
1198
- G(0, te),
1199
- G(1, Ue),
1200
- G(2, D(pr)),
1201
- G(3, D(Me)),
1202
- G(4, D(un)),
1203
- G(5, D(oe)),
1204
- G(6, D(rr))
1198
+ K(0, te),
1199
+ K(1, Ue),
1200
+ K(2, D(pr)),
1201
+ K(3, D(Me)),
1202
+ K(4, D(un)),
1203
+ K(5, D(oe)),
1204
+ K(6, D(rr))
1205
1205
  ], Nn);
1206
1206
  var Jo = Object.getOwnPropertyDescriptor, Qo = (e, t, n, r) => {
1207
1207
  for (var o = r > 1 ? void 0 : r ? Jo(t, n) : t, i = e.length - 1, a; i >= 0; i--)
@@ -1583,7 +1583,7 @@ function ui(e, t, n) {
1583
1583
  }
1584
1584
  function hi() {
1585
1585
  var M, N;
1586
- 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(mn), g = F(te), c = F(gn), m = F(de), [h, E] = W(a), R = s.getValidatorItem(h.type), [w, S] = W(!1), I = s.getValidatorsByScope(lo.SHEET), [b, v] = W(() => h.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), p = dt(() => ci(g), [g]), [_, P] = W(!1), [k, U] = W(!1), L = ht(null), y = F(Gn);
1586
+ 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(mn), g = F(te), c = F(gn), m = F(de), [h, E] = W(a), R = s.getValidatorItem(h.type), [w, S] = W(!1), I = s.getValidatorsByScope(lo.SHEET), [b, v] = W(() => h.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), p = dt(() => ci(g), [g]), [_, P] = W(!1), [k, U] = W(!1), L = ht(null), y = F(Kn);
1587
1587
  if (Le(() => () => {
1588
1588
  const f = y.getCurrentLastSelection();
1589
1589
  f && y.setSelections([f]);
@@ -1677,7 +1677,7 @@ function hi() {
1677
1677
  ruleId: h.uid,
1678
1678
  setting: Tn(Q)
1679
1679
  });
1680
- }, Ce = u.get(R.formulaInput), J = dt(() => b.map((f) => gr(f.range)).join(","), []), K = Vn(h), ge = (f) => {
1680
+ }, Ce = u.get(R.formulaInput), J = dt(() => b.map((f) => gr(f.range)).join(","), []), z = Vn(h), ge = (f) => {
1681
1681
  Rn(f, Vn(h)) || (E({
1682
1682
  ...h,
1683
1683
  ...f
@@ -1690,7 +1690,7 @@ function hi() {
1690
1690
  options: f
1691
1691
  }
1692
1692
  ));
1693
- }, z = T.length && !h.operator;
1693
+ }, G = T.length && !h.operator;
1694
1694
  return /* @__PURE__ */ j("div", { "data-u-comp": "data-validation-detail", className: "univer-py-2", children: [
1695
1695
  /* @__PURE__ */ C(
1696
1696
  X,
@@ -1752,7 +1752,7 @@ function hi() {
1752
1752
  }
1753
1753
  }
1754
1754
  ) }) : null,
1755
- Ce && !z ? /* @__PURE__ */ C(
1755
+ Ce && !G ? /* @__PURE__ */ C(
1756
1756
  Ce,
1757
1757
  {
1758
1758
  isTwoFormula: x,
@@ -1788,10 +1788,10 @@ function hi() {
1788
1788
  children: m.t("dataValidation.panel.allowBlank")
1789
1789
  }
1790
1790
  ) }),
1791
- /* @__PURE__ */ C(di, { value: K, onChange: ge, extraComponent: R.optionsInput }),
1791
+ /* @__PURE__ */ C(di, { value: z, onChange: ge, extraComponent: R.optionsInput }),
1792
1792
  /* @__PURE__ */ j("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
1793
- /* @__PURE__ */ C(Ke, { className: "univer-ml-3", onClick: ne, children: m.t("dataValidation.panel.removeRule") }),
1794
- /* @__PURE__ */ C(Ke, { className: "univer-ml-3", variant: "primary", onClick: H, children: m.t("dataValidation.panel.done") })
1793
+ /* @__PURE__ */ C(ze, { className: "univer-ml-3", onClick: ne, children: m.t("dataValidation.panel.removeRule") }),
1794
+ /* @__PURE__ */ C(ze, { className: "univer-ml-3", variant: "primary", onClick: H, children: m.t("dataValidation.panel.done") })
1795
1795
  ] })
1796
1796
  ] });
1797
1797
  }
@@ -1820,9 +1820,9 @@ const pi = (e) => {
1820
1820
  {
1821
1821
  className: ke(
1822
1822
  `
1823
- univer-bg-secondary univer-relative univer--ml-2 univer--mr-2 univer-box-border univer-flex
1824
- univer-w-[287px] univer-cursor-pointer univer-flex-col univer-justify-between univer-overflow-hidden
1825
- univer-rounded-md univer-p-2 univer-pr-9
1823
+ univer-bg-secondary univer-relative univer--mx-2 univer-box-border univer-flex univer-w-[287px]
1824
+ univer-cursor-pointer univer-flex-col univer-justify-between univer-overflow-hidden univer-rounded-md
1825
+ univer-p-2 univer-pr-9
1826
1826
  `,
1827
1827
  {
1828
1828
  "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-700": !i,
@@ -1861,7 +1861,7 @@ const pi = (e) => {
1861
1861
  g ? /* @__PURE__ */ C(
1862
1862
  "div",
1863
1863
  {
1864
- 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",
1864
+ className: "univer-absolute univer-right-2 univer-top-[19px] univer-flex univer-size-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",
1865
1865
  onClick: R,
1866
1866
  children: /* @__PURE__ */ C(Sn, {})
1867
1867
  }
@@ -1923,8 +1923,8 @@ function gi(e) {
1923
1923
  );
1924
1924
  }),
1925
1925
  /* @__PURE__ */ j("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
1926
- l.length && !w ? /* @__PURE__ */ C(Ke, { onClick: h, children: a.t("dataValidation.panel.removeAll") }) : null,
1927
- /* @__PURE__ */ C(Ke, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1926
+ l.length && !w ? /* @__PURE__ */ C(ze, { onClick: h, children: a.t("dataValidation.panel.removeAll") }) : null,
1927
+ /* @__PURE__ */ C(ze, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1928
1928
  ] })
1929
1929
  ] });
1930
1930
  }
@@ -2118,7 +2118,7 @@ const Ci = [
2118
2118
  /* @__PURE__ */ C(
2119
2119
  "div",
2120
2120
  {
2121
- className: "univer-box-border univer-h-4 univer-w-4 univer-rounded univer-text-base",
2121
+ className: "univer-box-border univer-size-4 univer-rounded univer-text-base",
2122
2122
  style: { background: t }
2123
2123
  }
2124
2124
  ),
@@ -2247,10 +2247,10 @@ function wi(e) {
2247
2247
  formula1: "",
2248
2248
  formula2: d
2249
2249
  }), m("="), U(R.t("dataValidation.validFail.formulaError")));
2250
- }), K = ht(null), [ge, z] = W(!1);
2250
+ }), z = ht(null), [ge, G] = W(!1);
2251
2251
  return dr((M) => {
2252
2252
  var f;
2253
- (f = K.current) != null && f.isClickOutSide(M) && z(!1);
2253
+ (f = z.current) != null && f.isClickOutSide(M) && G(!1);
2254
2254
  }), /* @__PURE__ */ j(ct, { children: [
2255
2255
  /* @__PURE__ */ C(X, { label: R.t("dataValidation.list.options"), children: /* @__PURE__ */ j(
2256
2256
  _n,
@@ -2272,14 +2272,14 @@ function wi(e) {
2272
2272
  /* @__PURE__ */ C(
2273
2273
  vr,
2274
2274
  {
2275
- ref: K,
2275
+ ref: z,
2276
2276
  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),
2277
2277
  initValue: c,
2278
2278
  unitId: r,
2279
2279
  subUnitId: o,
2280
2280
  isFocus: ge,
2281
2281
  isSupportAcrossSheet: !0,
2282
- onFocus: () => z(!0),
2282
+ onFocus: () => G(!0),
2283
2283
  onChange: (M = "") => {
2284
2284
  const N = (M != null ? M : "").trim();
2285
2285
  E(N), J(N);
@@ -2617,7 +2617,7 @@ const Ui = 8;
2617
2617
  class Fi extends Zr {
2618
2618
  static drawWith(t, n) {
2619
2619
  const { fontString: r, info: o, fill: i, color: a } = n, { layout: l, text: s } = o;
2620
- t.save(), Kn.drawWith(t, {
2620
+ t.save(), zn.drawWith(t, {
2621
2621
  width: l.width,
2622
2622
  height: l.height,
2623
2623
  radius: Ui,
@@ -2684,17 +2684,17 @@ let sn = class {
2684
2684
  }
2685
2685
  e.translateWithPrecision(0, ne), B.lines.forEach((Ce, J) => {
2686
2686
  e.save();
2687
- const { width: K, height: ge, items: z } = Ce;
2687
+ const { width: z, height: ge, items: G } = Ce;
2688
2688
  let M = 0;
2689
2689
  switch (T) {
2690
2690
  case Ie.RIGHT:
2691
- M = B.contentWidth - K;
2691
+ M = B.contentWidth - z;
2692
2692
  break;
2693
2693
  case Ie.CENTER:
2694
- M = (B.contentWidth - K) / 2;
2694
+ M = (B.contentWidth - z) / 2;
2695
2695
  break;
2696
2696
  }
2697
- e.translate(M, J * (ge + Er)), z.forEach((N) => {
2697
+ e.translate(M, J * (ge + Er)), G.forEach((N) => {
2698
2698
  e.save(), e.translateWithPrecision(N.left, 0), Fi.drawWith(e, {
2699
2699
  ...L,
2700
2700
  info: N,
@@ -2865,7 +2865,7 @@ let ln = class {
2865
2865
  y = y != null ? y : ve.WRAP, T = T != null ? T : se.BOTTOM, A = A != null ? A : ee.ht, x = x != null ? x : ee.pd;
2866
2866
  const H = Ve(a).fontCache;
2867
2867
  if (c.renderMode === ae.ARROW) {
2868
- const { l: J = ee.pd.l, t: K = ee.pd.t, r: ge = ee.pd.r, b: z = ee.pd.b } = x, M = b - J - ge - he - 4, N = new rt(
2868
+ const { l: J = ee.pd.l, t: z = ee.pd.t, r: ge = ee.pd.r, b: G = ee.pd.b } = x, M = b - J - ge - he - 4, N = new rt(
2869
2869
  U,
2870
2870
  H,
2871
2871
  y === ve.WRAP,
@@ -2873,8 +2873,8 @@ let ln = class {
2873
2873
  1 / 0
2874
2874
  );
2875
2875
  N.calculate();
2876
- const f = N.getTotalWidth(), O = N.getTotalHeight(), { paddingTop: $, paddingLeft: ce } = xn(M, v - K - z, f, O, T, A, !0);
2877
- this._drawDownIcon(e, I, b, v, O, T, x), e.save(), e.translateWithPrecision(I.startX + J, I.startY + K), e.beginPath(), e.rect(0, 0, b - J - ge, v - K - z), e.clip(), e.translateWithPrecision(0, $), e.save(), e.translateWithPrecision(ce, 0), e.beginPath(), e.rect(0, 0, M, O), e.clip(), bn.drawWith(e, {
2876
+ const f = N.getTotalWidth(), O = N.getTotalHeight(), { paddingTop: $, paddingLeft: ce } = xn(M, v - z - G, f, O, T, A, !0);
2877
+ this._drawDownIcon(e, I, b, v, O, T, x), e.save(), e.translateWithPrecision(I.startX + J, I.startY + z), e.beginPath(), e.rect(0, 0, b - J - ge, v - z - G), e.clip(), e.translateWithPrecision(0, $), e.save(), e.translateWithPrecision(ce, 0), e.beginPath(), e.rect(0, 0, M, O), e.clip(), bn.drawWith(e, {
2878
2878
  text: U,
2879
2879
  fontStyle: H,
2880
2880
  width: M,
@@ -2886,37 +2886,37 @@ let ln = class {
2886
2886
  hAlign: Ie.LEFT
2887
2887
  }, N), e.restore(), e.restore(), p.set(_, {
2888
2888
  left: I.endX - he + n.rowHeaderWidth,
2889
- top: I.startY + K + n.columnHeaderHeight,
2889
+ top: I.startY + z + n.columnHeaderHeight,
2890
2890
  width: he,
2891
- height: v - K - z
2891
+ height: v - z - G
2892
2892
  });
2893
2893
  } else {
2894
2894
  e.save(), e.translateWithPrecision(I.startX, I.startY), e.beginPath(), e.rect(0, 0, b, v), e.clip();
2895
- const J = b - Se * 2 - He - he - 4, K = new rt(
2895
+ const J = b - Se * 2 - He - he - 4, z = new rt(
2896
2896
  U,
2897
2897
  H,
2898
2898
  y === ve.WRAP,
2899
2899
  J,
2900
2900
  1 / 0
2901
2901
  );
2902
- K.calculate();
2903
- const ge = K.getTotalWidth(), z = K.getTotalHeight(), M = z + Yt * 2, N = Math.max(b - Se * 2, 1), { paddingTop: f } = xn(N, v, ge, M, T, A);
2904
- e.translateWithPrecision(Se, f), Kn.drawWith(e, {
2902
+ z.calculate();
2903
+ const ge = z.getTotalWidth(), G = z.getTotalHeight(), M = G + Yt * 2, N = Math.max(b - Se * 2, 1), { paddingTop: f } = xn(N, v, ge, M, T, A);
2904
+ e.translateWithPrecision(Se, f), zn.drawWith(e, {
2905
2905
  width: N,
2906
2906
  height: M,
2907
2907
  fill: L || Te,
2908
2908
  radius: Xt
2909
- }), e.save(), e.translateWithPrecision(He, Yt), e.beginPath(), e.rect(0, 0, J, z), e.clip(), bn.drawWith(e, {
2909
+ }), e.save(), e.translateWithPrecision(He, Yt), e.beginPath(), e.rect(0, 0, J, G), e.clip(), bn.drawWith(e, {
2910
2910
  text: U,
2911
2911
  fontStyle: H,
2912
2912
  width: J,
2913
- height: z,
2913
+ height: G,
2914
2914
  color: (ie = a == null ? void 0 : a.cl) == null ? void 0 : ie.rgb,
2915
2915
  strokeLine: !!((_e = a == null ? void 0 : a.st) != null && _e.s),
2916
2916
  underline: !!((Ce = a == null ? void 0 : a.ul) != null && Ce.s),
2917
2917
  warp: y === ve.WRAP,
2918
2918
  hAlign: Ie.LEFT
2919
- }, K), e.restore(), e.translateWithPrecision(J + He + 4, (z - Ct) / 2), e.fillStyle = Yi, e.fill($n), e.restore(), p.set(_, {
2919
+ }, z), e.restore(), e.translateWithPrecision(J + He + 4, (G - Ct) / 2), e.fillStyle = Yi, e.fill($n), e.restore(), p.set(_, {
2920
2920
  left: I.startX + Se + n.rowHeaderWidth,
2921
2921
  top: I.startY + f + n.columnHeaderHeight,
2922
2922
  width: N,
@@ -3041,15 +3041,15 @@ class Zi extends fe {
3041
3041
  V(this, "formulaInput", At);
3042
3042
  }
3043
3043
  }
3044
- class Ki extends fe {
3044
+ class zi extends fe {
3045
3045
  constructor() {
3046
3046
  super(...arguments);
3047
3047
  V(this, "id", Y.WHOLE);
3048
3048
  V(this, "formulaInput", At);
3049
3049
  }
3050
3050
  }
3051
- var Gi = Object.getOwnPropertyDescriptor, zi = (e, t, n, r) => {
3052
- for (var o = r > 1 ? void 0 : r ? Gi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3051
+ var Ki = Object.getOwnPropertyDescriptor, Gi = (e, t, n, r) => {
3052
+ for (var o = r > 1 ? void 0 : r ? Ki(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3053
3053
  (a = e[i]) && (o = a(o) || o);
3054
3054
  return o;
3055
3055
  }, Zt = (e, t) => (n, r) => t(n, r, e);
@@ -3074,7 +3074,7 @@ let et = class extends cn {
3074
3074
  _registerValidatorViews() {
3075
3075
  [
3076
3076
  Li,
3077
- Ki,
3077
+ zi,
3078
3078
  Zi,
3079
3079
  Pi,
3080
3080
  Ti,
@@ -3087,7 +3087,7 @@ let et = class extends cn {
3087
3087
  });
3088
3088
  }
3089
3089
  };
3090
- et = zi([
3090
+ et = Gi([
3091
3091
  Zt(0, D(ye)),
3092
3092
  Zt(1, D(mn)),
3093
3093
  Zt(2, D(Me))
@@ -3096,7 +3096,7 @@ var qi = Object.getOwnPropertyDescriptor, Ji = (e, t, n, r) => {
3096
3096
  for (var o = r > 1 ? void 0 : r ? qi(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3097
3097
  (a = e[i]) && (o = a(o) || o);
3098
3098
  return o;
3099
- }, Kt = (e, t) => (n, r) => t(n, r, e);
3099
+ }, zt = (e, t) => (n, r) => t(n, r, e);
3100
3100
  const Qi = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3101
3101
  var St;
3102
3102
  let Bn = (St = class extends Xn {
@@ -3114,7 +3114,7 @@ let Bn = (St = class extends Xn {
3114
3114
  [me],
3115
3115
  [Ne],
3116
3116
  [ut],
3117
- [ze],
3117
+ [Ge],
3118
3118
  [Qe],
3119
3119
  [Je],
3120
3120
  [qe],
@@ -3142,19 +3142,19 @@ let Bn = (St = class extends Xn {
3142
3142
  this._injector.get(et), this._injector.get(Qe);
3143
3143
  }
3144
3144
  onSteady() {
3145
- this._injector.get(ze);
3145
+ this._injector.get(Ge);
3146
3146
  }
3147
3147
  }, V(St, "pluginName", Qi), V(St, "type", Z.UNIVER_SHEET), St);
3148
3148
  Bn = Ji([
3149
- Kt(1, D(ye)),
3150
- Kt(2, te),
3151
- Kt(3, dn)
3149
+ zt(1, D(ye)),
3150
+ zt(2, te),
3151
+ zt(3, dn)
3152
3152
  ], Bn);
3153
3153
  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) => {
3154
3154
  for (var o = r > 1 ? void 0 : r ? ta(t, n) : t, i = e.length - 1, a; i >= 0; i--)
3155
3155
  (a = e[i]) && (o = a(o) || o);
3156
3156
  return o;
3157
- }, Gt = (e, t) => (n, r) => t(n, r, e), Dr = (e, t, n) => na(e, typeof t != "symbol" ? t + "" : t, n);
3157
+ }, Kt = (e, t) => (n, r) => t(n, r, e), Dr = (e, t, n) => na(e, typeof t != "symbol" ? t + "" : t, n);
3158
3158
  const oa = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3159
3159
  let Ot = class extends Xn {
3160
3160
  constructor(e = Mt, t, n, r) {
@@ -3171,11 +3171,11 @@ let Ot = class extends Xn {
3171
3171
  [me],
3172
3172
  [Ne],
3173
3173
  [ut],
3174
- [ze],
3174
+ [Ge],
3175
3175
  [Qe],
3176
3176
  [Je],
3177
3177
  [qe],
3178
- [Ge],
3178
+ [Ke],
3179
3179
  [et]
3180
3180
  ].forEach((e) => {
3181
3181
  this._injector.add(e);
@@ -3191,7 +3191,7 @@ let Ot = class extends Xn {
3191
3191
  });
3192
3192
  }
3193
3193
  onReady() {
3194
- this._injector.get(qe), this._injector.get(Je), this._injector.get(Ge), this._injector.get(ut), this._injector.get(Ue).registerRenderModule(
3194
+ this._injector.get(qe), this._injector.get(Je), this._injector.get(Ke), this._injector.get(ut), this._injector.get(Ue).registerRenderModule(
3195
3195
  Z.UNIVER_SHEET,
3196
3196
  [Et]
3197
3197
  );
@@ -3200,16 +3200,16 @@ let Ot = class extends Xn {
3200
3200
  this._injector.get(et), this._injector.get(Qe);
3201
3201
  }
3202
3202
  onSteady() {
3203
- this._injector.get(ze);
3203
+ this._injector.get(Ge);
3204
3204
  }
3205
3205
  };
3206
3206
  Dr(Ot, "pluginName", oa);
3207
3207
  Dr(Ot, "type", Z.UNIVER_SHEET);
3208
3208
  Ot = ra([
3209
3209
  Hr(so),
3210
- Gt(1, D(ye)),
3211
- Gt(2, te),
3212
- Gt(3, dn)
3210
+ Kt(1, D(ye)),
3211
+ Kt(2, te),
3212
+ Kt(3, dn)
3213
3213
  ], Ot);
3214
3214
  export {
3215
3215
  fe as BaseSheetDataValidatorView,