@univerjs/sheets-data-validation-ui 0.12.3 → 0.12.4-experimental.20251208-c4b8a44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
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 X, toDisposable as Ar, IUniverInstanceService as le, Inject as E, LocaleService as de, DataValidationErrorStyle as st, DataValidationStatus as Ye, ICommandService as ee, Injector as ye, IConfigService as ln, DataValidationRenderMode as ae, DisposableCollection as Pr, dayjs as kt, numfmt as Wn, CellValueType as Lr, CommandType as tt, DataValidationType as j, ObjectMatrix as wt, Range as kr, Rectangle as It, queryObjectMatrix as Gt, Optional as Nr, RxDisposable as dn, InterceptorEffectEnum as Hn, sequenceExecute as jn, bufferDebounceTime as Ur, debounce as Fr, UndoCommand as $r, RedoCommand as xr, isUnitRangesEqual as Br, shallowEqual as Rn, ThemeService as Yn, ColorKit as Wr, isFormulaString as De, generateRandomId as yn, VerticalAlign as se, HorizontalAlign as Ie, DEFAULT_STYLES as Q, WrapStrategy as ve, Plugin as Xn, merge as Zn, DependentOn as Hr } from "@univerjs/core";
4
+ import { Disposable as Re, UniverInstanceType as X, toDisposable as Ar, IUniverInstanceService as le, Inject as E, LocaleService as de, DataValidationErrorStyle as st, DataValidationStatus as Ye, ICommandService as ee, Injector as ye, IConfigService as ln, DataValidationRenderMode as ae, DisposableCollection as Pr, dayjs as kt, numfmt as Wn, CellValueType as Lr, CommandType as tt, DataValidationType as j, ObjectMatrix as It, Range as kr, Rectangle as wt, queryObjectMatrix as Gt, Optional as Nr, RxDisposable as dn, InterceptorEffectEnum as Hn, sequenceExecute as jn, bufferDebounceTime as Ur, debounce as Fr, UndoCommand as $r, RedoCommand as xr, isUnitRangesEqual as Br, shallowEqual as Rn, ThemeService as Yn, ColorKit as Wr, isFormulaString as De, generateRandomId as yn, VerticalAlign as se, HorizontalAlign as we, DEFAULT_STYLES as Q, WrapStrategy as ve, Plugin as Xn, merge as Zn, DependentOn as Hr } from "@univerjs/core";
5
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
6
  import { SheetInterceptorService as cn, VALIDATE_CELL as Kr, SheetsSelectionsService as Gn, SetRangeValuesCommand as at, getSheetCommandTarget as zn, rangeToDiscreteRange as Gr, SheetPermissionCheckController as zr, WorksheetEditPermission as zt, WorksheetSetCellStylePermission as qt, RangeProtectionPermissionEditPoint as Jt, WorkbookEditablePermission as Qt, INTERCEPTOR_POINT as qn, InterceptCellContentPriority as Jn, checkRangesEditablePermission as qr } from "@univerjs/sheets";
7
7
  import { SheetDataValidationModel as oe, SheetsDataValidationValidatorService as Jr, getDataValidationCellValue as Nt, getCellValueOrigin as re, serializeListOptions as Qn, createDefaultNewRule as er, AddSheetDataValidationCommand as un, DATA_VALIDATION_PLUGIN_NAME as tr, getDataValidationDiffMutations as en, UpdateSheetDataValidationRangeCommand as nr, DataValidationCacheService as rr, UpdateSheetDataValidationSettingCommand as En, UpdateSheetDataValidationOptionsCommand as Qr, RemoveSheetDataValidationCommand as or, RemoveSheetAllDataValidationCommand as eo, DataValidationFormulaController as to, deserializeListOptions as no, CUSTOM_FORMULA_INPUT_NAME as ir, BASE_FORMULA_INPUT_NAME as Ot, LIST_FORMULA_INPUT_NAME as hn, CHECKBOX_FORMULA_INPUT_NAME as ar, DataValidationFormulaService as ro, CHECKBOX_FORMULA_2 as oo, CHECKBOX_FORMULA_1 as io, getFormulaResult as Ut, isLegalFormulaResult as Dn, transformCheckboxValue as ao, UniverSheetsDataValidationPlugin as so } from "@univerjs/sheets-data-validation";
@@ -9,9 +9,9 @@ import { DataValidatorRegistryService as Me, DataValidatorDropdownType as pe, Da
9
9
  import { ISidebarService as sr, IDialogService as uo, IZenZoneService as lr, KeyCode as gt, MenuItemType as gn, getMenuHiddenObservable as ho, RibbonDataGroup as po, IMenuManagerService as go, useDependency as F, ComponentManager as vn, useObservable as Oe, useEvent as tn, useSidebarClick as dr } from "@univerjs/ui";
10
10
  import { filter as mn, BehaviorSubject as On, distinctUntilChanged as vo, Subject as mo, debounceTime as cr, bufferTime as ur, of as fo } from "rxjs";
11
11
  import { getPatternType as _o } from "@univerjs/sheets-numfmt";
12
- import { ISheetCellDropdownManagerService as Co, IEditorBridgeService as hr, SetCellEditVisibleOperation as vt, HoverManagerService as So, CellAlertManagerService as wo, CellAlertType as Io, IAutoFillService as Ro, APPLY_TYPE as ot, virtualizeDiscreteRanges as nn, getAutoFillRepeatRange as yo, ISheetClipboardService as Mo, COPY_TYPE as An, PREDEFINED_HOOK_NAME as mt, getRepeatRange as Pn, getCurrentRangeDisable$ as bo, AutoHeightController as pr, SheetSkeletonManagerService as lt, IMarkSelectionService as Eo } from "@univerjs/sheets-ui";
12
+ import { ISheetCellDropdownManagerService as Co, IEditorBridgeService as hr, SetCellEditVisibleOperation as vt, HoverManagerService as So, CellAlertManagerService as Io, CellAlertType as wo, IAutoFillService as Ro, APPLY_TYPE as ot, virtualizeDiscreteRanges as nn, getAutoFillRepeatRange as yo, ISheetClipboardService as Mo, COPY_TYPE as An, PREDEFINED_HOOK_NAME as mt, getRepeatRange as Pn, getCurrentRangeDisable$ as bo, AutoHeightController as pr, SheetSkeletonManagerService as lt, IMarkSelectionService as Eo } from "@univerjs/sheets-ui";
13
13
  import { Button as Ke, FormLayout as Y, RadioGroup as fn, Radio as Ae, Checkbox as At, Input as Pe, Select as Ln, clsx as ke, borderClassName as Rt, DraggableList as Do, Dropdown as Vo } from "@univerjs/design";
14
- import { createElement as we, useRef as ht, forwardRef as nt, useState as W, useMemo as dt, useEffect as Le } from "react";
14
+ import { createElement as Ie, useRef as ht, forwardRef as nt, useState as W, useMemo as dt, useEffect as Le } from "react";
15
15
  import { jsxs as H, Fragment as ct, jsx as C } from "react/jsx-runtime";
16
16
  import { deserializeRangeWithSheet as To, serializeRange as gr } from "@univerjs/engine-formula";
17
17
  import { RangeSelector as Oo, FormulaEditor as vr } from "@univerjs/sheets-formula-ui";
@@ -100,7 +100,7 @@ let Ge = class extends Re {
100
100
  title: u.getRuleFinalError(d, { row: o, col: i, unitId: a, subUnitId: l })
101
101
  },
102
102
  footer: {
103
- title: we(
103
+ title: Ie(
104
104
  Ke,
105
105
  {
106
106
  variant: "primary",
@@ -128,7 +128,7 @@ let Ge = class extends Re {
128
128
  title: e
129
129
  },
130
130
  footer: {
131
- title: we(
131
+ title: Ie(
132
132
  Ke,
133
133
  {
134
134
  variant: "primary",
@@ -219,7 +219,7 @@ let Ne = class extends Re {
219
219
  }
220
220
  // eslint-disable-next-line max-lines-per-function, complexity
221
221
  showDropdown(t) {
222
- var b, y, w, S;
222
+ var b, y, I, S;
223
223
  const { location: n } = t, { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = n;
224
224
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
225
225
  return;
@@ -231,13 +231,13 @@ let Ne = class extends Re {
231
231
  if (!(u != null && u.dropdownType))
232
232
  return;
233
233
  let p;
234
- const c = async (g, I) => {
235
- var D, O, k;
234
+ const c = async (g, w) => {
235
+ var D, O, L;
236
236
  if (!g)
237
237
  return !0;
238
- const _ = g, v = s.getCell(r, o), R = _.format(I === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), P = (D = Wn.parseDate(R)) == null ? void 0 : D.v, N = I === "time" ? P % 1 : P, T = l.getStyles().getStyleByCell(v), L = (k = (O = T == null ? void 0 : T.n) == null ? void 0 : O.pattern) != null ? k : "";
238
+ const _ = g, v = s.getCell(r, o), R = _.format(w === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), P = (D = Wn.parseDate(R)) == null ? void 0 : D.v, k = w === "time" ? P % 1 : P, T = l.getStyles().getStyleByCell(v), N = (L = (O = T == null ? void 0 : T.n) == null ? void 0 : O.pattern) != null ? L : "";
239
239
  return d.errorStyle !== st.STOP || await u.validator({
240
- value: N,
240
+ value: k,
241
241
  unitId: i,
242
242
  subUnitId: a,
243
243
  row: r,
@@ -256,14 +256,14 @@ let Ne = class extends Re {
256
256
  endRow: r
257
257
  },
258
258
  value: {
259
- v: N,
259
+ v: k,
260
260
  t: 2,
261
261
  p: null,
262
262
  f: null,
263
263
  si: null,
264
264
  s: {
265
265
  n: {
266
- pattern: Fo(I, L)
266
+ pattern: Fo(w, N)
267
267
  }
268
268
  }
269
269
  }
@@ -277,40 +277,40 @@ let Ne = class extends Re {
277
277
  let m;
278
278
  switch (u.dropdownType) {
279
279
  case pe.DATE: {
280
- const g = re(s.getCellRaw(r, o)), I = Ft(g), _ = !!((b = d.bizInfo) != null && b.showTime);
280
+ const g = re(s.getCellRaw(r, o)), w = Ft(g), _ = !!((b = d.bizInfo) != null && b.showTime);
281
281
  m = {
282
282
  location: n,
283
283
  type: "datepicker",
284
284
  props: {
285
285
  showTime: _,
286
286
  onChange: (v) => c(v, _ ? "datetime" : "date"),
287
- defaultValue: I,
287
+ defaultValue: w,
288
288
  patternType: "date"
289
289
  }
290
290
  };
291
291
  break;
292
292
  }
293
293
  case pe.TIME: {
294
- const g = re(s.getCellRaw(r, o)), I = Ft(g);
294
+ const g = re(s.getCellRaw(r, o)), w = Ft(g);
295
295
  m = {
296
296
  location: n,
297
297
  type: "datepicker",
298
298
  props: {
299
299
  onChange: (_) => c(_, "time"),
300
- defaultValue: I,
300
+ defaultValue: w,
301
301
  patternType: "time"
302
302
  }
303
303
  };
304
304
  break;
305
305
  }
306
306
  case pe.DATETIME: {
307
- const g = re(s.getCellRaw(r, o)), I = Ft(g);
307
+ const g = re(s.getCellRaw(r, o)), w = Ft(g);
308
308
  m = {
309
309
  location: n,
310
310
  type: "datepicker",
311
311
  props: {
312
312
  onChange: (_) => c(_, "datetime"),
313
- defaultValue: I,
313
+ defaultValue: w,
314
314
  patternType: "datetime"
315
315
  }
316
316
  };
@@ -318,8 +318,8 @@ let Ne = class extends Re {
318
318
  }
319
319
  case pe.LIST:
320
320
  case pe.MULTIPLE_LIST: {
321
- const g = u.dropdownType === pe.MULTIPLE_LIST, I = async (T) => {
322
- const L = Qn(T), D = {
321
+ const g = u.dropdownType === pe.MULTIPLE_LIST, w = async (T) => {
322
+ const N = Qn(T), D = {
323
323
  unitId: i,
324
324
  subUnitId: a,
325
325
  range: {
@@ -329,7 +329,7 @@ let Ne = class extends Re {
329
329
  endRow: r
330
330
  },
331
331
  value: {
332
- v: L,
332
+ v: N,
333
333
  p: null,
334
334
  f: null,
335
335
  si: null
@@ -345,7 +345,7 @@ let Ne = class extends Re {
345
345
  this._commandService.executeCommand(Fe.id, {
346
346
  ruleId: d.uid
347
347
  }), p == null || p.dispose();
348
- }, N = v.map((T) => ({
348
+ }, k = v.map((T) => ({
349
349
  label: T.label,
350
350
  value: T.label,
351
351
  color: _ || T.color ? T.color || Te : "transparent"
@@ -354,12 +354,12 @@ let Ne = class extends Re {
354
354
  location: n,
355
355
  type: "list",
356
356
  props: {
357
- onChange: (T) => I(T),
358
- options: N,
357
+ onChange: (T) => w(T),
358
+ options: k,
359
359
  onEdit: P,
360
360
  defaultValue: R,
361
361
  multiple: g,
362
- showEdit: (w = (y = this._configService.getConfig(_n)) == null ? void 0 : y.showEditOnDropdown) != null ? w : !0
362
+ showEdit: (I = (y = this._configService.getConfig(_n)) == null ? void 0 : y.showEditOnDropdown) != null ? I : !0
363
363
  }
364
364
  };
365
365
  break;
@@ -368,7 +368,7 @@ let Ne = class extends Re {
368
368
  m = {
369
369
  type: "cascader",
370
370
  props: {
371
- onChange: (I) => {
371
+ onChange: (w) => {
372
372
  const _ = {
373
373
  unitId: i,
374
374
  subUnitId: a,
@@ -379,7 +379,7 @@ let Ne = class extends Re {
379
379
  endRow: r
380
380
  },
381
381
  value: {
382
- v: I.join("/"),
382
+ v: w.join("/"),
383
383
  p: null,
384
384
  f: null,
385
385
  si: null
@@ -403,7 +403,7 @@ let Ne = class extends Re {
403
403
  m = {
404
404
  type: "color",
405
405
  props: {
406
- onChange: (I) => {
406
+ onChange: (w) => {
407
407
  const _ = {
408
408
  unitId: i,
409
409
  subUnitId: a,
@@ -414,7 +414,7 @@ let Ne = class extends Re {
414
414
  endRow: r
415
415
  },
416
416
  value: {
417
- v: I,
417
+ v: w,
418
418
  p: null,
419
419
  f: null,
420
420
  si: null
@@ -446,8 +446,8 @@ let Ne = class extends Re {
446
446
  const h = new Pr();
447
447
  h.add(p), h.add({
448
448
  dispose: () => {
449
- var g, I;
450
- (I = (g = this._activeDropdown) == null ? void 0 : g.onHide) == null || I.call(g);
449
+ var g, w;
450
+ (w = (g = this._activeDropdown) == null ? void 0 : g.onHide) == null || w.call(g);
451
451
  }
452
452
  }), this._currentPopup = h;
453
453
  }
@@ -604,7 +604,7 @@ let ut = class extends Re {
604
604
  return;
605
605
  }
606
606
  this._cellAlertManagerService.showAlert({
607
- type: Io.ERROR,
607
+ type: wo.ERROR,
608
608
  title: this._localeService.t("dataValidation.error.title"),
609
609
  message: s == null ? void 0 : s.getRuleFinalError(o, e.location),
610
610
  location: e.location,
@@ -626,7 +626,7 @@ let ut = class extends Re {
626
626
  };
627
627
  ut = xo([
628
628
  Be(0, E(So)),
629
- Be(1, E(wo)),
629
+ Be(1, E(Io)),
630
630
  Be(2, le),
631
631
  Be(3, E(de)),
632
632
  Be(4, lr),
@@ -647,9 +647,9 @@ let ze = class extends Re {
647
647
  const { source: i, target: a, unitId: l, subUnitId: s } = r, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = nn([i, a]), [p, c] = u.ranges, { mapFunc: m } = u, h = {
648
648
  row: p.startRow,
649
649
  col: p.startColumn
650
- }, b = yo(p, c), y = new wt(), w = /* @__PURE__ */ new Set();
650
+ }, b = yo(p, c), y = new It(), I = /* @__PURE__ */ new Set();
651
651
  b.forEach((v) => {
652
- const R = v.repeatStartCell, P = v.relativeRange, N = {
652
+ const R = v.repeatStartCell, P = v.relativeRange, k = {
653
653
  startRow: h.row,
654
654
  startColumn: h.col,
655
655
  endColumn: h.col,
@@ -660,33 +660,33 @@ let ze = class extends Re {
660
660
  endColumn: R.col,
661
661
  endRow: R.row
662
662
  };
663
- kr.foreach(P, (L, D) => {
664
- const O = It.getPositionRange(
663
+ kr.foreach(P, (N, D) => {
664
+ const O = wt.getPositionRange(
665
665
  {
666
- startRow: L,
666
+ startRow: N,
667
667
  startColumn: D,
668
668
  endColumn: D,
669
- endRow: L
669
+ endRow: N
670
670
  },
671
- N
672
- ), { row: k, col: x } = m(O.startRow, O.startColumn), G = this._sheetDataValidationModel.getRuleIdByLocation(l, s, k, x) || "", te = It.getPositionRange(
671
+ k
672
+ ), { row: L, col: x } = m(O.startRow, O.startColumn), G = this._sheetDataValidationModel.getRuleIdByLocation(l, s, L, x) || "", te = wt.getPositionRange(
673
673
  {
674
- startRow: L,
674
+ startRow: N,
675
675
  startColumn: D,
676
676
  endColumn: D,
677
- endRow: L
677
+ endRow: N
678
678
  },
679
679
  T
680
680
  ), { row: B, col: ne } = m(te.startRow, te.startColumn);
681
- y.setValue(B, ne, G), w.add(G);
681
+ y.setValue(B, ne, G), I.add(G);
682
682
  });
683
683
  });
684
- const S = Array.from(w).map((v) => ({ id: v, ranges: Gt(y, (R) => R === v) }));
684
+ const S = Array.from(I).map((v) => ({ id: v, ranges: Gt(y, (R) => R === v) }));
685
685
  d.addRangeRules(S);
686
- const g = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: I, undoMutations: _ } = en(l, s, g, this._injector, "patched", o === ot.ONLY_FORMAT);
686
+ const g = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: w, undoMutations: _ } = en(l, s, g, this._injector, "patched", o === ot.ONLY_FORMAT);
687
687
  return {
688
688
  undos: _,
689
- redos: I
689
+ redos: w
690
690
  };
691
691
  }, n = {
692
692
  id: tr,
@@ -735,7 +735,7 @@ let qe = class extends Re {
735
735
  });
736
736
  }
737
737
  _collect(t, n, r) {
738
- const o = new wt();
738
+ const o = new It();
739
739
  this._copyInfo = {
740
740
  unitId: t,
741
741
  subUnitId: n,
@@ -769,25 +769,25 @@ let qe = class extends Re {
769
769
  return { redos: [], undos: [] };
770
770
  const { unitId: o, subUnitId: i } = this._copyInfo;
771
771
  if (n.unitId !== o || i !== n.subUnitId) {
772
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(n.unitId, n.subUnitId).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: p } = nn([n.copyRange, t]), c = Pn(d, u, !0), m = /* @__PURE__ */ new Map();
773
- c.forEach(({ startRange: w }) => {
772
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(n.unitId, n.subUnitId).clone(), l = new It(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: p } = nn([n.copyRange, t]), c = Pn(d, u, !0), m = /* @__PURE__ */ new Map();
773
+ c.forEach(({ startRange: I }) => {
774
774
  var S;
775
- (S = this._copyInfo) == null || S.matrix.forValue((g, I, _) => {
776
- const v = It.getPositionRange(
775
+ (S = this._copyInfo) == null || S.matrix.forValue((g, w, _) => {
776
+ const v = wt.getPositionRange(
777
777
  {
778
778
  startRow: g,
779
779
  endRow: g,
780
- startColumn: I,
781
- endColumn: I
780
+ startColumn: w,
781
+ endColumn: w
782
782
  },
783
- w
783
+ I
784
784
  ), R = `${i}-${_}`, P = this._sheetDataValidationModel.getRuleById(o, i, _);
785
785
  !this._sheetDataValidationModel.getRuleById(n.unitId, n.subUnitId, R) && P && m.set(R, { ...P, uid: R });
786
- const { row: N, col: T } = p(v.startRow, v.startColumn);
787
- s.add(R), l.setValue(N, T, R);
786
+ const { row: k, col: T } = p(v.startRow, v.startColumn);
787
+ s.add(R), l.setValue(k, T, R);
788
788
  });
789
789
  });
790
- const h = Array.from(s).map((w) => ({ id: w, ranges: Gt(l, (S) => S === w) }));
790
+ const h = Array.from(s).map((I) => ({ id: I, ranges: Gt(l, (S) => S === I) }));
791
791
  a.addRangeRules(h);
792
792
  const { redoMutations: b, undoMutations: y } = en(
793
793
  n.unitId,
@@ -802,11 +802,11 @@ let qe = class extends Re {
802
802
  undos: y
803
803
  };
804
804
  } else {
805
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new wt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: p } = nn([n.copyRange, t]);
805
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(o, i).clone(), l = new It(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: p } = nn([n.copyRange, t]);
806
806
  Pn(d, u, !0).forEach(({ startRange: y }) => {
807
- var w;
808
- (w = this._copyInfo) == null || w.matrix.forValue((S, g, I) => {
809
- const _ = It.getPositionRange(
807
+ var I;
808
+ (I = this._copyInfo) == null || I.matrix.forValue((S, g, w) => {
809
+ const _ = wt.getPositionRange(
810
810
  {
811
811
  startRow: S,
812
812
  endRow: S,
@@ -815,10 +815,10 @@ let qe = class extends Re {
815
815
  },
816
816
  y
817
817
  ), { row: v, col: R } = p(_.startRow, _.startColumn);
818
- l.setValue(v, R, I), s.add(I);
818
+ l.setValue(v, R, w), s.add(w);
819
819
  });
820
820
  });
821
- const m = Array.from(s).map((y) => ({ id: y, ranges: Gt(l, (w) => w === y) }));
821
+ const m = Array.from(s).map((y) => ({ id: y, ranges: Gt(l, (I) => I === y) }));
822
822
  a.addRangeRules(m);
823
823
  const { redoMutations: h, undoMutations: b } = en(
824
824
  o,
@@ -987,14 +987,14 @@ let Qe = class extends dn {
987
987
  priority: Jn.DATA_VALIDATION,
988
988
  // eslint-disable-next-line max-lines-per-function, complexity
989
989
  handler: (e, t, n) => {
990
- var w, S, g, I, _;
990
+ var I, S, g, w, _;
991
991
  const { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, a, r, o);
992
992
  if (!d)
993
993
  return n(e);
994
994
  const u = this._sheetDataValidationModel.getRuleById(i, a, d);
995
995
  if (!u)
996
996
  return n(e);
997
- const p = (w = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? w : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
997
+ const p = (I = this._dataValidationCacheService.getValue(i, a, r, o)) != null ? I : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
998
998
  let h;
999
999
  const b = {
1000
1000
  get value() {
@@ -1015,7 +1015,7 @@ let Qe = class extends dn {
1015
1015
  ...c != null && c.canvasRender ? [c.canvasRender] : []
1016
1016
  ], e.fontRenderExtension = {
1017
1017
  ...e == null ? void 0 : e.fontRenderExtension,
1018
- isSkip: ((g = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : g.isSkip) || ((I = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : I.call(c, u, b.value, t))
1018
+ isSkip: ((g = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : g.isSkip) || ((w = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : w.call(c, u, b.value, t))
1019
1019
  }, e.interceptorStyle = {
1020
1020
  ...e == null ? void 0 : e.interceptorStyle,
1021
1021
  ...c == null ? void 0 : c.getExtraStyle(u, y.value, {
@@ -1025,14 +1025,14 @@ let Qe = class extends dn {
1025
1025
  }
1026
1026
  }, r, o)
1027
1027
  }, e.interceptorAutoHeight = () => {
1028
- var N, T, L, D, O, k;
1029
- const v = (T = (N = this._renderManagerService.getRenderById(i)) == null ? void 0 : N.with(lt).getSkeletonParam(a)) == null ? void 0 : T.skeleton;
1028
+ var k, T, N, D, O, L;
1029
+ const v = (T = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(lt).getSkeletonParam(a)) == null ? void 0 : T.skeleton;
1030
1030
  if (!v)
1031
1031
  return;
1032
1032
  const R = v.worksheet.getMergedCell(r, o), P = {
1033
1033
  data: e,
1034
1034
  style: v.getStyles().getStyleByCell(e),
1035
- primaryWithCoord: v.getCellWithCoordByIndex((L = R == null ? void 0 : R.startRow) != null ? L : r, (D = R == null ? void 0 : R.startColumn) != null ? D : o),
1035
+ primaryWithCoord: v.getCellWithCoordByIndex((N = R == null ? void 0 : R.startRow) != null ? N : r, (D = R == null ? void 0 : R.startColumn) != null ? D : o),
1036
1036
  unitId: i,
1037
1037
  subUnitId: a,
1038
1038
  row: r,
@@ -1040,16 +1040,16 @@ let Qe = class extends dn {
1040
1040
  workbook: l,
1041
1041
  worksheet: s
1042
1042
  };
1043
- return (k = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoHeight) == null ? void 0 : k.call(O, P);
1043
+ return (L = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoHeight) == null ? void 0 : L.call(O, P);
1044
1044
  }, e.interceptorAutoWidth = () => {
1045
- var N, T, L, D, O, k;
1046
- const v = (T = (N = this._renderManagerService.getRenderById(i)) == null ? void 0 : N.with(lt).getSkeletonParam(a)) == null ? void 0 : T.skeleton;
1045
+ var k, T, N, D, O, L;
1046
+ const v = (T = (k = this._renderManagerService.getRenderById(i)) == null ? void 0 : k.with(lt).getSkeletonParam(a)) == null ? void 0 : T.skeleton;
1047
1047
  if (!v)
1048
1048
  return;
1049
1049
  const R = v.worksheet.getMergedCell(r, o), P = {
1050
1050
  data: e,
1051
1051
  style: v.getStyles().getStyleByCell(e),
1052
- primaryWithCoord: v.getCellWithCoordByIndex((L = R == null ? void 0 : R.startRow) != null ? L : r, (D = R == null ? void 0 : R.startColumn) != null ? D : o),
1052
+ primaryWithCoord: v.getCellWithCoordByIndex((N = R == null ? void 0 : R.startRow) != null ? N : r, (D = R == null ? void 0 : R.startColumn) != null ? D : o),
1053
1053
  unitId: i,
1054
1054
  subUnitId: a,
1055
1055
  row: r,
@@ -1057,7 +1057,7 @@ let Qe = class extends dn {
1057
1057
  workbook: l,
1058
1058
  worksheet: s
1059
1059
  };
1060
- return (k = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoWidth) == null ? void 0 : k.call(O, P);
1060
+ return (L = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoWidth) == null ? void 0 : L.call(O, P);
1061
1061
  }, e.coverable = ((_ = e == null ? void 0 : e.coverable) != null ? _ : !0) && !(u.type === j.LIST || u.type === j.LIST_MULTIPLE), n(e);
1062
1062
  }
1063
1063
  }
@@ -1112,7 +1112,7 @@ let Nn = class extends dn {
1112
1112
  priority: Jn.DATA_VALIDATION,
1113
1113
  // eslint-disable-next-line complexity, max-lines-per-function
1114
1114
  handler: (e, t, n) => {
1115
- var y, w, S, g, I;
1115
+ var y, I, S, g, w;
1116
1116
  const { row: r, col: o, unitId: i, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(i, a, r, o);
1117
1117
  if (!d)
1118
1118
  return n(e);
@@ -1124,7 +1124,7 @@ let Nn = class extends dn {
1124
1124
  ...e == null ? void 0 : e.markers,
1125
1125
  ...p === Ye.INVALID ? Sr : null
1126
1126
  }, e.customRender = [
1127
- ...(w = e == null ? void 0 : e.customRender) != null ? w : [],
1127
+ ...(I = e == null ? void 0 : e.customRender) != null ? I : [],
1128
1128
  ...c != null && c.canvasRender ? [c.canvasRender] : []
1129
1129
  ], e.fontRenderExtension = {
1130
1130
  ...e == null ? void 0 : e.fontRenderExtension,
@@ -1138,14 +1138,14 @@ let Nn = class extends dn {
1138
1138
  }
1139
1139
  }, r, o)
1140
1140
  }, e.interceptorAutoHeight = () => {
1141
- var P, N, T, L, D, O;
1142
- const _ = (N = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(lt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1141
+ var P, k, T, N, D, O;
1142
+ const _ = (k = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(lt).getSkeletonParam(a)) == null ? void 0 : k.skeleton;
1143
1143
  if (!_)
1144
1144
  return;
1145
1145
  const v = _.worksheet.getMergedCell(r, o), R = {
1146
1146
  data: e,
1147
1147
  style: _.getStyles().getStyleByCell(e),
1148
- primaryWithCoord: _.getCellWithCoordByIndex((T = v == null ? void 0 : v.startRow) != null ? T : r, (L = v == null ? void 0 : v.startColumn) != null ? L : o),
1148
+ primaryWithCoord: _.getCellWithCoordByIndex((T = v == null ? void 0 : v.startRow) != null ? T : r, (N = v == null ? void 0 : v.startColumn) != null ? N : o),
1149
1149
  unitId: i,
1150
1150
  subUnitId: a,
1151
1151
  row: r,
@@ -1155,14 +1155,14 @@ let Nn = class extends dn {
1155
1155
  };
1156
1156
  return (O = (D = c == null ? void 0 : c.canvasRender) == null ? void 0 : D.calcCellAutoHeight) == null ? void 0 : O.call(D, R);
1157
1157
  }, e.interceptorAutoWidth = () => {
1158
- var P, N, T, L, D, O;
1159
- const _ = (N = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(lt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1158
+ var P, k, T, N, D, O;
1159
+ const _ = (k = (P = this._renderManagerService.getRenderById(i)) == null ? void 0 : P.with(lt).getSkeletonParam(a)) == null ? void 0 : k.skeleton;
1160
1160
  if (!_)
1161
1161
  return;
1162
1162
  const v = _.worksheet.getMergedCell(r, o), R = {
1163
1163
  data: e,
1164
1164
  style: _.getStyles().getStyleByCell(e),
1165
- primaryWithCoord: _.getCellWithCoordByIndex((T = v == null ? void 0 : v.startRow) != null ? T : r, (L = v == null ? void 0 : v.startColumn) != null ? L : o),
1165
+ primaryWithCoord: _.getCellWithCoordByIndex((T = v == null ? void 0 : v.startRow) != null ? T : r, (N = v == null ? void 0 : v.startColumn) != null ? N : o),
1166
1166
  unitId: i,
1167
1167
  subUnitId: a,
1168
1168
  row: r,
@@ -1171,7 +1171,7 @@ let Nn = class extends dn {
1171
1171
  worksheet: s
1172
1172
  };
1173
1173
  return (O = (D = c == null ? void 0 : c.canvasRender) == null ? void 0 : D.calcCellAutoWidth) == null ? void 0 : O.call(D, R);
1174
- }, e.coverable = ((I = e == null ? void 0 : e.coverable) != null ? I : !0) && !(u.type === j.LIST || u.type === j.LIST_MULTIPLE), n(e);
1174
+ }, e.coverable = ((w = e == null ? void 0 : e.coverable) != null ? w : !0) && !(u.type === j.LIST || u.type === j.LIST_MULTIPLE), n(e);
1175
1175
  }
1176
1176
  }
1177
1177
  )
@@ -1233,7 +1233,7 @@ bt = Qo([
1233
1233
  ], bt);
1234
1234
  function $e({ ref: e, ...t }) {
1235
1235
  const { icon: n, id: r, className: o, extend: i, ...a } = t, l = `univerjs-icon univerjs-icon-${r} ${o || ""}`.trim(), s = ht(`_${ni()}`);
1236
- return wr(n, `${r}`, {
1236
+ return Ir(n, `${r}`, {
1237
1237
  defIds: n.defIds,
1238
1238
  idSuffix: s.current
1239
1239
  }, {
@@ -1242,12 +1242,12 @@ function $e({ ref: e, ...t }) {
1242
1242
  ...a
1243
1243
  }, i);
1244
1244
  }
1245
- function wr(e, t, n, r, o) {
1246
- return we(e.tag, {
1245
+ function Ir(e, t, n, r, o) {
1246
+ return Ie(e.tag, {
1247
1247
  key: t,
1248
1248
  ...ei(e, n, o),
1249
1249
  ...r
1250
- }, (ti(e, n).children || []).map((i, a) => wr(i, `${t}-${e.tag}-${a}`, n, void 0, o)));
1250
+ }, (ti(e, n).children || []).map((i, a) => Ir(i, `${t}-${e.tag}-${a}`, n, void 0, o)));
1251
1251
  }
1252
1252
  function ei(e, t, n) {
1253
1253
  const r = { ...e.attrs };
@@ -1320,14 +1320,14 @@ const ri = {
1320
1320
  }
1321
1321
  }
1322
1322
  ]
1323
- }, Ir = nt(function(t, n) {
1324
- return we($e, Object.assign({}, t, {
1323
+ }, wr = nt(function(t, n) {
1324
+ return Ie($e, Object.assign({}, t, {
1325
1325
  id: "data-validation-icon",
1326
1326
  ref: n,
1327
1327
  icon: ri
1328
1328
  }));
1329
1329
  });
1330
- Ir.displayName = "DataValidationIcon";
1330
+ wr.displayName = "DataValidationIcon";
1331
1331
  const oi = {
1332
1332
  tag: "svg",
1333
1333
  attrs: {
@@ -1370,7 +1370,7 @@ const oi = {
1370
1370
  }
1371
1371
  ]
1372
1372
  }, Sn = nt(function(t, n) {
1373
- return we($e, Object.assign({}, t, {
1373
+ return Ie($e, Object.assign({}, t, {
1374
1374
  id: "delete-icon",
1375
1375
  ref: n,
1376
1376
  icon: oi
@@ -1394,7 +1394,7 @@ const ii = {
1394
1394
  }
1395
1395
  }]
1396
1396
  }, Rr = nt(function(t, n) {
1397
- return we($e, Object.assign({}, t, {
1397
+ return Ie($e, Object.assign({}, t, {
1398
1398
  id: "increase-icon",
1399
1399
  ref: n,
1400
1400
  icon: ii
@@ -1419,14 +1419,14 @@ const ai = {
1419
1419
  clipRule: "evenodd"
1420
1420
  }
1421
1421
  }]
1422
- }, wn = nt(function(t, n) {
1423
- return we($e, Object.assign({}, t, {
1422
+ }, In = nt(function(t, n) {
1423
+ return Ie($e, Object.assign({}, t, {
1424
1424
  id: "more-down-icon",
1425
1425
  ref: n,
1426
1426
  icon: ai
1427
1427
  }));
1428
1428
  });
1429
- wn.displayName = "MoreDownIcon";
1429
+ In.displayName = "MoreDownIcon";
1430
1430
  const si = {
1431
1431
  tag: "svg",
1432
1432
  attrs: {
@@ -1446,7 +1446,7 @@ const si = {
1446
1446
  }
1447
1447
  }]
1448
1448
  }, yr = nt(function(t, n) {
1449
- return we($e, Object.assign({}, t, {
1449
+ return Ie($e, Object.assign({}, t, {
1450
1450
  id: "more-up-icon",
1451
1451
  ref: n,
1452
1452
  icon: si
@@ -1507,7 +1507,7 @@ const li = {
1507
1507
  }
1508
1508
  ]
1509
1509
  }, Mr = nt(function(t, n) {
1510
- return we($e, Object.assign({}, t, {
1510
+ return Ie($e, Object.assign({}, t, {
1511
1511
  id: "sequence-icon",
1512
1512
  ref: n,
1513
1513
  icon: li
@@ -1525,7 +1525,7 @@ function di(e) {
1525
1525
  onClick: () => l(!a),
1526
1526
  children: [
1527
1527
  t.t("dataValidation.panel.options"),
1528
- a ? /* @__PURE__ */ C(yr, { className: "univer-ml-1" }) : /* @__PURE__ */ C(wn, { className: "univer-ml-1" })
1528
+ a ? /* @__PURE__ */ C(yr, { className: "univer-ml-1" }) : /* @__PURE__ */ C(In, { className: "univer-ml-1" })
1529
1529
  ]
1530
1530
  }
1531
1531
  ),
@@ -1582,7 +1582,7 @@ function ui(e, t, n) {
1582
1582
  }
1583
1583
  function hi() {
1584
1584
  var M, U;
1585
- const [e, t] = W(0), n = F(me), r = Oe(n.activeRule$, n.activeRule), { unitId: o, subUnitId: i, rule: a } = r || {}, l = a.uid, s = F(Me), d = F(le), u = F(vn), p = F(ee), c = F(pn), m = F(de), [h, b] = W(a), y = s.getValidatorItem(h.type), [w, S] = W(!1), g = s.getValidatorsByScope(lo.SHEET), [I, _] = W(() => h.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), v = dt(() => ci(p), [p]), [R, P] = W(!1), [N, T] = W(!1), L = ht(null), D = F(Gn);
1585
+ const [e, t] = W(0), n = F(me), r = Oe(n.activeRule$, n.activeRule), { unitId: o, subUnitId: i, rule: a } = r || {}, l = a.uid, s = F(Me), d = F(le), u = F(vn), p = F(ee), c = F(pn), m = F(de), [h, b] = W(a), y = s.getValidatorItem(h.type), [I, S] = W(!1), g = s.getValidatorsByScope(lo.SHEET), [w, _] = W(() => h.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), v = dt(() => ci(p), [p]), [R, P] = W(!1), [k, T] = W(!1), N = ht(null), D = F(Gn);
1586
1586
  if (Le(() => () => {
1587
1587
  const f = D.getCurrentLastSelection();
1588
1588
  f && D.setSelections([f]);
@@ -1595,14 +1595,14 @@ function hi() {
1595
1595
  });
1596
1596
  }, [p, c, l, i, o]), !y)
1597
1597
  return null;
1598
- const O = y.operators, k = y.operatorNames, x = h.operator ? co.includes(h.operator) : !1, G = () => {
1598
+ const O = y.operators, L = y.operatorNames, x = h.operator ? co.includes(h.operator) : !1, G = () => {
1599
1599
  var f, A, $;
1600
- (A = (f = L.current) == null ? void 0 : f.editor) != null && A.isFocus() && te(($ = L.current) == null ? void 0 : $.getValue()), !(!h.ranges.length || R) && (y.validatorFormula(h, o, i).success ? n.setActiveRule(null) : S(!0));
1600
+ (A = (f = N.current) == null ? void 0 : f.editor) != null && A.isFocus() && te(($ = N.current) == null ? void 0 : $.getValue()), !(!h.ranges.length || R) && (y.validatorFormula(h, o, i).success ? n.setActiveRule(null) : S(!0));
1601
1601
  }, te = tn((f) => {
1602
1602
  const A = f.split(",").filter(Boolean).map(To).map((J) => {
1603
- const In = J.sheetName;
1604
- if (In) {
1605
- const Vr = ui(d, J.unitId, In);
1603
+ const wn = J.sheetName;
1604
+ if (wn) {
1605
+ const Vr = ui(d, J.unitId, wn);
1606
1606
  return { ...J, sheetId: Vr };
1607
1607
  }
1608
1608
  return {
@@ -1610,7 +1610,7 @@ function hi() {
1610
1610
  sheetId: ""
1611
1611
  };
1612
1612
  });
1613
- if (Br(A, I))
1613
+ if (Br(A, w))
1614
1614
  return;
1615
1615
  _(A);
1616
1616
  const $ = A.filter((J) => (!J.unitId || J.unitId === o) && (!J.sheetId || J.sheetId === i)).map((J) => J.range);
@@ -1676,7 +1676,7 @@ function hi() {
1676
1676
  ruleId: h.uid,
1677
1677
  setting: Tn(J)
1678
1678
  });
1679
- }, Ce = u.get(y.formulaInput), z = dt(() => I.map((f) => gr(f.range)).join(","), []), Z = Vn(h), ge = (f) => {
1679
+ }, Ce = u.get(y.formulaInput), q = dt(() => w.map((f) => gr(f.range)).join(","), []), Z = Vn(h), ge = (f) => {
1680
1680
  Rn(f, Vn(h)) || (b({
1681
1681
  ...h,
1682
1682
  ...f
@@ -1689,7 +1689,7 @@ function hi() {
1689
1689
  options: f
1690
1690
  }
1691
1691
  ));
1692
- }, q = O.length && !h.operator;
1692
+ }, z = O.length && !h.operator;
1693
1693
  return /* @__PURE__ */ H("div", { "data-u-comp": "data-validation-detail", className: "univer-py-2", children: [
1694
1694
  /* @__PURE__ */ C(
1695
1695
  Y,
@@ -1699,17 +1699,17 @@ function hi() {
1699
1699
  children: /* @__PURE__ */ C(
1700
1700
  Oo,
1701
1701
  {
1702
- selectorRef: L,
1702
+ selectorRef: N,
1703
1703
  unitId: o,
1704
1704
  subUnitId: i,
1705
- initialValue: z,
1705
+ initialValue: q,
1706
1706
  onChange: (f, A) => {
1707
1707
  var $;
1708
- !N && (($ = L.current) != null && $.verify()) && te(A);
1708
+ !k && (($ = N.current) != null && $.verify()) && te(A);
1709
1709
  },
1710
1710
  onFocusChange: (f, A) => {
1711
1711
  var $;
1712
- T(f), !f && A && (($ = L.current) != null && $.verify()) && te(A);
1712
+ T(f), !f && A && (($ = N.current) != null && $.verify()) && te(A);
1713
1713
  },
1714
1714
  onVerify: (f) => P(!f)
1715
1715
  }
@@ -1740,7 +1740,7 @@ function hi() {
1740
1740
  },
1741
1741
  ...O.map((f, A) => ({
1742
1742
  value: `${f}`,
1743
- label: k[A]
1743
+ label: L[A]
1744
1744
  }))
1745
1745
  ],
1746
1746
  onChange: (f) => {
@@ -1751,7 +1751,7 @@ function hi() {
1751
1751
  }
1752
1752
  }
1753
1753
  ) }) : null,
1754
- Ce && !q ? /* @__PURE__ */ C(
1754
+ Ce && !z ? /* @__PURE__ */ C(
1755
1755
  Ce,
1756
1756
  {
1757
1757
  isTwoFormula: x,
@@ -1765,7 +1765,7 @@ function hi() {
1765
1765
  ...f
1766
1766
  });
1767
1767
  },
1768
- showError: w,
1768
+ showError: I,
1769
1769
  validResult: y.validatorFormula(h, o, i),
1770
1770
  unitId: o,
1771
1771
  subUnitId: i,
@@ -1797,21 +1797,21 @@ function hi() {
1797
1797
  const pi = (e) => {
1798
1798
  const { rule: t, onClick: n, unitId: r, subUnitId: o, disable: i } = e, a = F(Me), l = F(ee), s = F(Eo), d = a.getValidatorItem(t.type), u = ht(void 0), [p, c] = W(!1), m = F(Yn), h = Oe(m.currentTheme$), b = dt(() => {
1799
1799
  var _;
1800
- const w = m.getColorFromTheme("primary.600"), S = m.getColorFromTheme("loop-color.2"), g = (_ = m.getColorFromTheme(S)) != null ? _ : w, I = new Wr(g).toRgb();
1800
+ const I = m.getColorFromTheme("primary.600"), S = m.getColorFromTheme("loop-color.2"), g = (_ = m.getColorFromTheme(S)) != null ? _ : I, w = new Wr(g).toRgb();
1801
1801
  return {
1802
- fill: `rgba(${I.r}, ${I.g}, ${I.b}, 0.1)`,
1802
+ fill: `rgba(${w.r}, ${w.g}, ${w.b}, 0.1)`,
1803
1803
  stroke: g
1804
1804
  };
1805
- }, [h]), y = (w) => {
1805
+ }, [h]), y = (I) => {
1806
1806
  l.executeCommand(or.id, {
1807
1807
  ruleId: t.uid,
1808
1808
  unitId: r,
1809
1809
  subUnitId: o
1810
- }), w.stopPropagation();
1810
+ }), I.stopPropagation();
1811
1811
  };
1812
1812
  return Le(() => () => {
1813
- var w;
1814
- u.current && ((w = u.current) == null || w.forEach((S) => {
1813
+ var I;
1814
+ u.current && ((I = u.current) == null || I.forEach((S) => {
1815
1815
  S && s.removeShape(S);
1816
1816
  }));
1817
1817
  }, [s]), /* @__PURE__ */ H(
@@ -1830,15 +1830,15 @@ const pi = (e) => {
1830
1830
  ),
1831
1831
  onClick: n,
1832
1832
  onMouseEnter: () => {
1833
- i || (c(!0), u.current = t.ranges.map((w) => s.addShape({
1834
- range: w,
1833
+ i || (c(!0), u.current = t.ranges.map((I) => s.addShape({
1834
+ range: I,
1835
1835
  style: b,
1836
1836
  primary: null
1837
1837
  })));
1838
1838
  },
1839
1839
  onMouseLeave: () => {
1840
- var w;
1841
- c(!1), (w = u.current) == null || w.forEach((S) => {
1840
+ var I;
1841
+ c(!1), (I = u.current) == null || I.forEach((S) => {
1842
1842
  S && s.removeShape(S);
1843
1843
  }), u.current = void 0;
1844
1844
  },
@@ -1854,7 +1854,7 @@ const pi = (e) => {
1854
1854
  "div",
1855
1855
  {
1856
1856
  className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px] dark:!univer-text-gray-300",
1857
- children: t.ranges.map((w) => gr(w)).join(",")
1857
+ children: t.ranges.map((I) => gr(I)).join(",")
1858
1858
  }
1859
1859
  ),
1860
1860
  p ? /* @__PURE__ */ C(
@@ -1897,9 +1897,9 @@ function gi(e) {
1897
1897
  subUnitId: c
1898
1898
  });
1899
1899
  }, y = ((S) => {
1900
- const g = n.getCurrentUnitForType(X.UNIVER_SHEET), I = g.getActiveSheet(), _ = g.getUnitId(), v = I.getSheetId();
1900
+ const g = n.getCurrentUnitForType(X.UNIVER_SHEET), w = g.getActiveSheet(), _ = g.getUnitId(), v = w.getSheetId();
1901
1901
  return S.map((P) => qr(o, _, v, P.ranges) ? { ...P } : { ...P, disable: !0 });
1902
- })(l), w = y == null ? void 0 : y.some((S) => S.disable);
1902
+ })(l), I = y == null ? void 0 : y.some((S) => S.disable);
1903
1903
  return /* @__PURE__ */ H("div", { className: "univer-pb-4", children: [
1904
1904
  y == null ? void 0 : y.map((S) => {
1905
1905
  var g;
@@ -1922,7 +1922,7 @@ function gi(e) {
1922
1922
  );
1923
1923
  }),
1924
1924
  /* @__PURE__ */ H("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
1925
- l.length && !w ? /* @__PURE__ */ C(Ke, { onClick: h, children: a.t("dataValidation.panel.removeAll") }) : null,
1925
+ l.length && !I ? /* @__PURE__ */ C(Ke, { onClick: h, children: a.t("dataValidation.panel.removeAll") }) : null,
1926
1926
  /* @__PURE__ */ C(Ke, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1927
1927
  ] })
1928
1928
  ] });
@@ -2121,7 +2121,7 @@ const Ci = [
2121
2121
  style: { background: t }
2122
2122
  }
2123
2123
  ),
2124
- /* @__PURE__ */ C(wn, {})
2124
+ /* @__PURE__ */ C(In, {})
2125
2125
  ]
2126
2126
  }
2127
2127
  )
@@ -2159,9 +2159,9 @@ const Ci = [
2159
2159
  )
2160
2160
  ] });
2161
2161
  };
2162
- function wi(e) {
2162
+ function Ii(e) {
2163
2163
  const { value: t, onChange: n = () => {
2164
- }, unitId: r, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, p] = W(() => De(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [h, b] = W(u === "1" ? s : "="), y = F(de), w = F(Me), S = F(pn), g = F(to), [I, _] = W(() => d.split(",")), v = w.getValidatorItem(j.LIST), [R, P] = W([]), [N, T] = W(""), L = a ? i == null ? void 0 : i.formula1 : "", D = dt(() => S.ruleChange$.pipe(cr(16)), []), O = Oe(D), k = tn(n);
2164
+ }, unitId: r, subUnitId: o, validResult: i, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, p] = W(() => De(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [h, b] = W(u === "1" ? s : "="), y = F(de), I = F(Me), S = F(pn), g = F(to), [w, _] = W(() => d.split(",")), v = I.getValidatorItem(j.LIST), [R, P] = W([]), [k, T] = W(""), N = a ? i == null ? void 0 : i.formula1 : "", D = dt(() => S.ruleChange$.pipe(cr(16)), []), O = Oe(D), L = tn(n);
2165
2165
  Le(() => {
2166
2166
  (async () => {
2167
2167
  await new Promise((f) => {
@@ -2196,8 +2196,8 @@ function wi(e) {
2196
2196
  id: `${U}`,
2197
2197
  isRef: !0
2198
2198
  })), [ne, R]), _e = (M, U, f) => {
2199
- const A = [...I];
2200
- A[+M] = f, _(A), k({
2199
+ const A = [...w];
2200
+ A[+M] = f, _(A), L({
2201
2201
  formula1: s,
2202
2202
  formula2: A.join(",")
2203
2203
  });
@@ -2226,39 +2226,39 @@ function wi(e) {
2226
2226
  color: f.color
2227
2227
  }));
2228
2228
  });
2229
- }), k({
2229
+ }), L({
2230
2230
  formula1: Qn(U.map((f) => f.label)),
2231
2231
  formula2: U.map((f) => f.color === Te ? "" : f.color).join(",")
2232
2232
  });
2233
- }, [x, k, u, h, I]);
2234
- const z = tn(async (M) => {
2233
+ }, [x, L, u, h, w]);
2234
+ const q = tn(async (M) => {
2235
2235
  if (!De(M)) {
2236
- k == null || k({
2236
+ L == null || L({
2237
2237
  formula1: "",
2238
2238
  formula2: d
2239
2239
  });
2240
2240
  return;
2241
2241
  }
2242
- g.getFormulaRefCheck(M) ? (k == null || k({
2242
+ g.getFormulaRefCheck(M) ? (L == null || L({
2243
2243
  formula1: De(M) ? M : "",
2244
2244
  formula2: d
2245
- }), T("")) : (k == null || k({
2245
+ }), T("")) : (L == null || L({
2246
2246
  formula1: "",
2247
2247
  formula2: d
2248
2248
  }), m("="), T(y.t("dataValidation.validFail.formulaError")));
2249
- }), Z = ht(null), [ge, q] = W(!1);
2249
+ }), Z = ht(null), [ge, z] = W(!1);
2250
2250
  return dr((M) => {
2251
2251
  var f;
2252
- ((f = Z.current) == null ? void 0 : f.isClickOutSide(M)) && q(!1);
2252
+ ((f = Z.current) == null ? void 0 : f.isClickOutSide(M)) && z(!1);
2253
2253
  }), /* @__PURE__ */ H(ct, { children: [
2254
2254
  /* @__PURE__ */ C(Y, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ H(
2255
2255
  fn,
2256
2256
  {
2257
2257
  value: u,
2258
2258
  onChange: (M) => {
2259
- p(M), m(h), M === "1" && k({
2259
+ p(M), m(h), M === "1" && L({
2260
2260
  formula1: h === "=" ? "" : h,
2261
- formula2: I.join(",")
2261
+ formula2: w.join(",")
2262
2262
  });
2263
2263
  },
2264
2264
  children: [
@@ -2267,7 +2267,7 @@ function wi(e) {
2267
2267
  ]
2268
2268
  }
2269
2269
  ) }),
2270
- u === "1" ? /* @__PURE__ */ H(Y, { error: L || N || void 0, children: [
2270
+ u === "1" ? /* @__PURE__ */ H(Y, { error: N || k || void 0, children: [
2271
2271
  /* @__PURE__ */ C(
2272
2272
  vr,
2273
2273
  {
@@ -2278,10 +2278,10 @@ function wi(e) {
2278
2278
  subUnitId: o,
2279
2279
  isFocus: ge,
2280
2280
  isSupportAcrossSheet: !0,
2281
- onFocus: () => q(!0),
2281
+ onFocus: () => z(!0),
2282
2282
  onChange: (M = "") => {
2283
2283
  const U = (M != null ? M : "").trim();
2284
- b(U), z(U);
2284
+ b(U), q(U);
2285
2285
  }
2286
2286
  }
2287
2287
  ),
@@ -2294,7 +2294,7 @@ function wi(e) {
2294
2294
  },
2295
2295
  M.id
2296
2296
  )) })
2297
- ] }) : /* @__PURE__ */ C(Y, { error: L, children: /* @__PURE__ */ H("div", { className: "-univer-mt-3", children: [
2297
+ ] }) : /* @__PURE__ */ C(Y, { error: N, children: /* @__PURE__ */ H("div", { className: "-univer-mt-3", children: [
2298
2298
  /* @__PURE__ */ C(
2299
2299
  Do,
2300
2300
  {
@@ -2331,7 +2331,7 @@ function wi(e) {
2331
2331
  ] }) })
2332
2332
  ] });
2333
2333
  }
2334
- const Ii = [
2334
+ const wi = [
2335
2335
  [
2336
2336
  ir,
2337
2337
  _i
@@ -2342,7 +2342,7 @@ const Ii = [
2342
2342
  ],
2343
2343
  [
2344
2344
  hn,
2345
- wi
2345
+ Ii
2346
2346
  ],
2347
2347
  [
2348
2348
  ar,
@@ -2407,10 +2407,10 @@ let rn = class {
2407
2407
  break;
2408
2408
  }
2409
2409
  switch (r) {
2410
- case Ie.LEFT:
2410
+ case we.LEFT:
2411
2411
  l = ft;
2412
2412
  break;
2413
- case Ie.RIGHT:
2413
+ case we.RIGHT:
2414
2414
  l = ft + (o - a);
2415
2415
  break;
2416
2416
  default:
@@ -2435,23 +2435,23 @@ let rn = class {
2435
2435
  return ((n = t == null ? void 0 : t.fs) != null ? n : 10) * 1.6;
2436
2436
  }
2437
2437
  async _parseFormula(e, t, n) {
2438
- var d, u, p, c, m, h, b, y, w;
2438
+ var d, u, p, c, m, h, b, y, I;
2439
2439
  const { formula1: r = io, formula2: o = oo } = e, i = await this._formulaService.getRuleFormulaResult(t, n, e.uid), a = Ut((p = (u = (d = i == null ? void 0 : i[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : p[0]), l = Ut((h = (m = (c = i == null ? void 0 : i[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : h[0]), s = Dn(String(a)) && Dn(String(l));
2440
2440
  return {
2441
- formula1: De(r) ? Ut((w = (y = (b = i == null ? void 0 : i[0]) == null ? void 0 : b.result) == null ? void 0 : y[0]) == null ? void 0 : w[0]) : r,
2441
+ formula1: De(r) ? Ut((I = (y = (b = i == null ? void 0 : i[0]) == null ? void 0 : b.result) == null ? void 0 : y[0]) == null ? void 0 : I[0]) : r,
2442
2442
  formula2: De(o) ? l : o,
2443
2443
  isFormulaValid: s
2444
2444
  };
2445
2445
  }
2446
2446
  drawWith(e, t) {
2447
- var L, D, O, k;
2447
+ var N, D, O, L;
2448
2448
  const { style: n, primaryWithCoord: r, unitId: o, subUnitId: i, worksheet: a, row: l, col: s } = t, d = r.isMergedMainCell ? r.mergeInfo : r, u = re(a.getCellRaw(l, s)), p = this._dataValidationModel.getRuleByLocation(o, i, l, s);
2449
2449
  if (!p)
2450
2450
  return;
2451
2451
  const c = this._dataValidationModel.getValidator(p.type);
2452
- if (!c || !((L = c.skipDefaultFontRender) != null && L.call(c, p, u, { unitId: o, subUnitId: i, row: l, column: s })))
2452
+ if (!c || !((N = c.skipDefaultFontRender) != null && N.call(c, p, u, { unitId: o, subUnitId: i, row: l, column: s })))
2453
2453
  return;
2454
- const m = c.parseFormulaSync(p, o, i), { formula1: h } = m, b = this._calc(d, n), { a: y, d: w } = e.getTransform(), S = Mn(b.left, y), g = Mn(b.top, w), I = jr.create().composeMatrix({
2454
+ const m = c.parseFormulaSync(p, o, i), { formula1: h } = m, b = this._calc(d, n), { a: y, d: I } = e.getTransform(), S = Mn(b.left, y), g = Mn(b.top, I), w = jr.create().composeMatrix({
2455
2455
  left: S,
2456
2456
  top: g,
2457
2457
  scaleX: 1,
@@ -2463,14 +2463,14 @@ let rn = class {
2463
2463
  flipY: !1
2464
2464
  }), _ = d.endX - d.startX, v = d.endY - d.startY;
2465
2465
  e.save(), e.beginPath(), e.rect(d.startX, d.startY, _, v), e.clip();
2466
- const R = I.getMatrix();
2466
+ const R = w.getMatrix();
2467
2467
  e.transform(R[0], R[1], R[2], R[3], R[4], R[5]);
2468
- const P = ((D = n == null ? void 0 : n.fs) != null ? D : 10) * 1.6, N = String(u) === String(h), T = this._themeService.getColorFromTheme("primary.600");
2468
+ const P = ((D = n == null ? void 0 : n.fs) != null ? D : 10) * 1.6, k = String(u) === String(h), T = this._themeService.getColorFromTheme("primary.600");
2469
2469
  Yr.drawWith(e, {
2470
- checked: N,
2470
+ checked: k,
2471
2471
  width: P,
2472
2472
  height: P,
2473
- fill: (k = (O = n == null ? void 0 : n.cl) == null ? void 0 : O.rgb) != null ? k : T
2473
+ fill: (L = (O = n == null ? void 0 : n.cl) == null ? void 0 : O.rgb) != null ? L : T
2474
2474
  }), e.restore();
2475
2475
  }
2476
2476
  isHit(e, t) {
@@ -2659,10 +2659,10 @@ let an = class {
2659
2659
  // eslint-disable-next-line max-lines-per-function
2660
2660
  drawWith(e, t, n, r) {
2661
2661
  var ie, _e;
2662
- const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: d } = t, u = o.isMergedMainCell ? o.mergeInfo : o, p = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: m = 0, topOffset: h = 0, downOffset: b = 0 } = p || {}, y = this._ensureMap(d), w = this._generateKey(i, a), S = o.isMergedMainCell ? o.mergeInfo.startRow : i, g = o.isMergedMainCell ? o.mergeInfo.startColumn : a, I = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, S, g);
2663
- if (!I)
2662
+ const { primaryWithCoord: o, row: i, col: a, style: l, data: s, subUnitId: d } = t, u = o.isMergedMainCell ? o.mergeInfo : o, p = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: m = 0, topOffset: h = 0, downOffset: b = 0 } = p || {}, y = this._ensureMap(d), I = this._generateKey(i, a), S = o.isMergedMainCell ? o.mergeInfo.startRow : i, g = o.isMergedMainCell ? o.mergeInfo.startColumn : a, w = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, S, g);
2663
+ if (!w)
2664
2664
  return;
2665
- const _ = this._dataValidationModel.getValidator(I.type);
2665
+ const _ = this._dataValidationModel.getValidator(w.type);
2666
2666
  if (!_)
2667
2667
  return;
2668
2668
  const v = {
@@ -2670,10 +2670,10 @@ let an = class {
2670
2670
  endX: u.endX - m,
2671
2671
  startY: u.startY + h,
2672
2672
  endY: u.endY - b
2673
- }, R = v.endX - v.startX, P = v.endY - v.startY, { cl: N } = l || {}, T = (ie = typeof N == "object" ? N == null ? void 0 : N.rgb : N) != null ? ie : "#000", L = Ve(l != null ? l : void 0), { vt: D, ht: O } = l || {}, k = D != null ? D : se.MIDDLE, x = (_e = re(s)) != null ? _e : "", G = _.parseCellValue(x), te = _.getListWithColorMap(I), B = Ht(G, L, R, P);
2674
- this._drawDownIcon(e, v, R, P, k), e.save(), e.translateWithPrecision(v.startX, v.startY), e.beginPath(), e.rect(0, 0, R - Ee, P), e.clip(), e.translateWithPrecision(on, Vt);
2673
+ }, R = v.endX - v.startX, P = v.endY - v.startY, { cl: k } = l || {}, T = (ie = typeof k == "object" ? k == null ? void 0 : k.rgb : k) != null ? ie : "#000", N = Ve(l != null ? l : void 0), { vt: D, ht: O } = l || {}, L = D != null ? D : se.MIDDLE, x = (_e = re(s)) != null ? _e : "", G = _.parseCellValue(x), te = _.getListWithColorMap(w), B = Ht(G, N, R, P);
2674
+ this._drawDownIcon(e, v, R, P, L), e.save(), e.translateWithPrecision(v.startX, v.startY), e.beginPath(), e.rect(0, 0, R - Ee, P), e.clip(), e.translateWithPrecision(on, Vt);
2675
2675
  let ne = 0;
2676
- switch (k) {
2676
+ switch (L) {
2677
2677
  case se.MIDDLE:
2678
2678
  ne = (B.contentHeight - B.totalHeight) / 2;
2679
2679
  break;
@@ -2681,27 +2681,27 @@ let an = class {
2681
2681
  ne = B.contentHeight - B.totalHeight;
2682
2682
  break;
2683
2683
  }
2684
- e.translateWithPrecision(0, ne), B.lines.forEach((Ce, z) => {
2684
+ e.translateWithPrecision(0, ne), B.lines.forEach((Ce, q) => {
2685
2685
  e.save();
2686
- const { width: Z, height: ge, items: q } = Ce;
2686
+ const { width: Z, height: ge, items: z } = Ce;
2687
2687
  let M = 0;
2688
2688
  switch (O) {
2689
- case Ie.RIGHT:
2689
+ case we.RIGHT:
2690
2690
  M = B.contentWidth - Z;
2691
2691
  break;
2692
- case Ie.CENTER:
2692
+ case we.CENTER:
2693
2693
  M = (B.contentWidth - Z) / 2;
2694
2694
  break;
2695
2695
  }
2696
- e.translate(M, z * (ge + Er)), q.forEach((U) => {
2696
+ e.translate(M, q * (ge + Er)), z.forEach((U) => {
2697
2697
  e.save(), e.translateWithPrecision(U.left, 0), Fi.drawWith(e, {
2698
- ...L,
2698
+ ...N,
2699
2699
  info: U,
2700
2700
  color: T,
2701
2701
  fill: te[U.text]
2702
2702
  }), e.restore();
2703
2703
  }), e.restore();
2704
- }), e.restore(), y.set(w, {
2704
+ }), e.restore(), y.set(I, {
2705
2705
  left: v.startX,
2706
2706
  top: v.startY,
2707
2707
  width: B.contentWidth + on + Ee,
@@ -2721,7 +2721,7 @@ let an = class {
2721
2721
  const h = this._dataValidationModel.getValidator(m.type);
2722
2722
  if (!h)
2723
2723
  return;
2724
- const b = c.endX - c.startX, y = c.endY - c.startY, w = (_ = re(r)) != null ? _ : "", S = h.parseCellValue(w), g = Ve(n != null ? n : void 0);
2724
+ const b = c.endX - c.startX, y = c.endY - c.startY, I = (_ = re(r)) != null ? _ : "", S = h.parseCellValue(I), g = Ve(n != null ? n : void 0);
2725
2725
  return Ht(S, g, b, y).cellAutoHeight;
2726
2726
  }
2727
2727
  calcCellAutoWidth(e) {
@@ -2737,7 +2737,7 @@ let an = class {
2737
2737
  const h = this._dataValidationModel.getValidator(m.type);
2738
2738
  if (!h)
2739
2739
  return;
2740
- const b = c.endX - c.startX, y = c.endY - c.startY, w = (_ = re(r)) != null ? _ : "", S = h.parseCellValue(w), g = Ve(n != null ? n : void 0);
2740
+ const b = c.endX - c.startX, y = c.endY - c.startY, I = (_ = re(r)) != null ? _ : "", S = h.parseCellValue(I), g = Ve(n != null ? n : void 0);
2741
2741
  return Ht(S, g, b, y).calcAutoWidth;
2742
2742
  }
2743
2743
  isHit(e, t) {
@@ -2801,10 +2801,10 @@ function xn(e, t, n, r, o, i, a = !0) {
2801
2801
  l = Math.max(je, l);
2802
2802
  let d = 0;
2803
2803
  switch (i) {
2804
- case Ie.CENTER:
2804
+ case we.CENTER:
2805
2805
  d = (e - n) / 2;
2806
2806
  break;
2807
- case Ie.RIGHT:
2807
+ case we.RIGHT:
2808
2808
  d = e - n;
2809
2809
  break;
2810
2810
  }
@@ -2851,20 +2851,20 @@ let sn = class {
2851
2851
  const m = this._dataValidationModel.getValidator(c.type);
2852
2852
  if (!m)
2853
2853
  return;
2854
- const h = l == null ? void 0 : l.fontRenderExtension, { leftOffset: b = 0, rightOffset: y = 0, topOffset: w = 0, downOffset: S = 0 } = h || {};
2854
+ const h = l == null ? void 0 : l.fontRenderExtension, { leftOffset: b = 0, rightOffset: y = 0, topOffset: I = 0, downOffset: S = 0 } = h || {};
2855
2855
  if (!c || !m || !m || m.id.indexOf(j.LIST) !== 0 || !m.skipDefaultFontRender(c))
2856
2856
  return;
2857
2857
  const g = {
2858
2858
  startX: d.startX + b,
2859
2859
  endX: d.endX - y,
2860
- startY: d.startY + w,
2860
+ startY: d.startY + I,
2861
2861
  endY: d.endY - S
2862
- }, I = g.endX - g.startX, _ = g.endY - g.startY, v = this._ensureMap(s), R = this._generateKey(o, i), P = m.getListWithColor(c), N = re(l), T = `${N != null ? N : ""}`, L = P.find((z) => z.label === T);
2863
- let { tb: D, vt: O, ht: k, pd: x } = a || {};
2864
- D = D != null ? D : ve.WRAP, O = O != null ? O : se.BOTTOM, k = k != null ? k : Q.ht, x = x != null ? x : Q.pd;
2862
+ }, w = g.endX - g.startX, _ = g.endY - g.startY, v = this._ensureMap(s), R = this._generateKey(o, i), P = m.getListWithColorMap(c), k = re(l), T = `${k != null ? k : ""}`, N = P[T];
2863
+ let { tb: D, vt: O, ht: L, pd: x } = a || {};
2864
+ D = D != null ? D : ve.WRAP, O = O != null ? O : se.BOTTOM, L = L != null ? L : Q.ht, x = x != null ? x : Q.pd;
2865
2865
  const G = Ve(a).fontCache;
2866
2866
  if (c.renderMode === ae.ARROW) {
2867
- const { l: z = Q.pd.l, t: Z = Q.pd.t, r: ge = Q.pd.r, b: q = Q.pd.b } = x, M = I - z - ge - he - 4, U = new rt(
2867
+ const { l: q = Q.pd.l, t: Z = Q.pd.t, r: ge = Q.pd.r, b: z = Q.pd.b } = x, M = w - q - ge - he - 4, U = new rt(
2868
2868
  T,
2869
2869
  G,
2870
2870
  D === ve.WRAP,
@@ -2872,8 +2872,8 @@ let sn = class {
2872
2872
  1 / 0
2873
2873
  );
2874
2874
  U.calculate();
2875
- const f = U.getTotalWidth(), A = U.getTotalHeight(), { paddingTop: $, paddingLeft: ce } = xn(M, _ - Z - q, f, A, O, k, !0);
2876
- this._drawDownIcon(e, g, I, _, A, O, x), e.save(), e.translateWithPrecision(g.startX + z, g.startY + Z), e.beginPath(), e.rect(0, 0, I - z - ge, _ - Z - q), e.clip(), e.translateWithPrecision(0, $), e.save(), e.translateWithPrecision(ce, 0), e.beginPath(), e.rect(0, 0, M, A), e.clip(), bn.drawWith(e, {
2875
+ const f = U.getTotalWidth(), A = U.getTotalHeight(), { paddingTop: $, paddingLeft: ce } = xn(M, _ - Z - z, f, A, O, L, !0);
2876
+ this._drawDownIcon(e, g, w, _, A, O, x), e.save(), e.translateWithPrecision(g.startX + q, g.startY + Z), e.beginPath(), e.rect(0, 0, w - q - ge, _ - Z - z), e.clip(), e.translateWithPrecision(0, $), e.save(), e.translateWithPrecision(ce, 0), e.beginPath(), e.rect(0, 0, M, A), e.clip(), bn.drawWith(e, {
2877
2877
  text: T,
2878
2878
  fontStyle: G,
2879
2879
  width: M,
@@ -2882,40 +2882,40 @@ let sn = class {
2882
2882
  strokeLine: !!((B = a == null ? void 0 : a.st) != null && B.s),
2883
2883
  underline: !!((ne = a == null ? void 0 : a.ul) != null && ne.s),
2884
2884
  warp: D === ve.WRAP,
2885
- hAlign: Ie.LEFT
2885
+ hAlign: we.LEFT
2886
2886
  }, U), e.restore(), e.restore(), v.set(R, {
2887
2887
  left: g.endX - he + n.rowHeaderWidth,
2888
2888
  top: g.startY + Z + n.columnHeaderHeight,
2889
2889
  width: he,
2890
- height: _ - Z - q
2890
+ height: _ - Z - z
2891
2891
  });
2892
2892
  } else {
2893
- e.save(), e.translateWithPrecision(g.startX, g.startY), e.beginPath(), e.rect(0, 0, I, _), e.clip();
2894
- const z = I - Se * 2 - He - he - 4, Z = new rt(
2893
+ e.save(), e.translateWithPrecision(g.startX, g.startY), e.beginPath(), e.rect(0, 0, w, _), e.clip();
2894
+ const q = w - Se * 2 - He - he - 4, Z = new rt(
2895
2895
  T,
2896
2896
  G,
2897
2897
  D === ve.WRAP,
2898
- z,
2898
+ q,
2899
2899
  1 / 0
2900
2900
  );
2901
2901
  Z.calculate();
2902
- const ge = Z.getTotalWidth(), q = Z.getTotalHeight(), M = q + jt * 2, U = Math.max(I - Se * 2, 1), { paddingTop: f } = xn(U, _, ge, M, O, k);
2902
+ const ge = Z.getTotalWidth(), z = Z.getTotalHeight(), M = z + jt * 2, U = Math.max(w - Se * 2, 1), { paddingTop: f } = xn(U, _, ge, M, O, L);
2903
2903
  e.translateWithPrecision(Se, f), Kn.drawWith(e, {
2904
2904
  width: U,
2905
2905
  height: M,
2906
- fill: (L == null ? void 0 : L.color) || Te,
2906
+ fill: N || Te,
2907
2907
  radius: Yt
2908
- }), e.save(), e.translateWithPrecision(He, jt), e.beginPath(), e.rect(0, 0, z, q), e.clip(), bn.drawWith(e, {
2908
+ }), e.save(), e.translateWithPrecision(He, jt), e.beginPath(), e.rect(0, 0, q, z), e.clip(), bn.drawWith(e, {
2909
2909
  text: T,
2910
2910
  fontStyle: G,
2911
- width: z,
2912
- height: q,
2911
+ width: q,
2912
+ height: z,
2913
2913
  color: (ie = a == null ? void 0 : a.cl) == null ? void 0 : ie.rgb,
2914
2914
  strokeLine: !!((_e = a == null ? void 0 : a.st) != null && _e.s),
2915
2915
  underline: !!((Ce = a == null ? void 0 : a.ul) != null && Ce.s),
2916
2916
  warp: D === ve.WRAP,
2917
- hAlign: Ie.LEFT
2918
- }, Z), e.restore(), e.translateWithPrecision(z + He + 4, (q - Ct) / 2), e.fillStyle = Yi, e.fill($n), e.restore(), v.set(R, {
2917
+ hAlign: we.LEFT
2918
+ }, Z), e.restore(), e.translateWithPrecision(q + He + 4, (z - Ct) / 2), e.fillStyle = Yi, e.fill($n), e.restore(), v.set(R, {
2919
2919
  left: g.startX + Se + n.rowHeaderWidth,
2920
2920
  top: g.startY + f + n.columnHeaderHeight,
2921
2921
  width: U,
@@ -2933,22 +2933,22 @@ let sn = class {
2933
2933
  startY: a.startY + u,
2934
2934
  endY: a.endY - p
2935
2935
  }, h = m.endX - m.startX, b = re(r), y = `${b != null ? b : ""}`;
2936
- let { tb: w, pd: S } = n || {};
2937
- const { t: g = Q.pd.t, b: I = Q.pd.b } = S != null ? S : {};
2938
- if (w = w != null ? w : ve.WRAP, c.renderMode === ae.ARROW) {
2936
+ let { tb: I, pd: S } = n || {};
2937
+ const { t: g = Q.pd.t, b: w = Q.pd.b } = S != null ? S : {};
2938
+ if (I = I != null ? I : ve.WRAP, c.renderMode === ae.ARROW) {
2939
2939
  const { l: _ = Q.pd.l, r: v = Q.pd.r } = S != null ? S : {}, R = h - _ - v - he - 4, P = new rt(
2940
2940
  y,
2941
2941
  Ve(n).fontCache,
2942
- w === ve.WRAP,
2942
+ I === ve.WRAP,
2943
2943
  R,
2944
2944
  1 / 0
2945
2945
  );
2946
- return P.calculate(), P.getTotalHeight() + g + I + je * 2;
2946
+ return P.calculate(), P.getTotalHeight() + g + w + je * 2;
2947
2947
  } else {
2948
2948
  const _ = Math.max(h - Se * 2 - He - he - 4, 10), v = new rt(
2949
2949
  y,
2950
2950
  Ve(n).fontCache,
2951
- w === ve.WRAP,
2951
+ I === ve.WRAP,
2952
2952
  _,
2953
2953
  1 / 0
2954
2954
  );
@@ -2965,25 +2965,25 @@ let sn = class {
2965
2965
  startY: a.startY + u,
2966
2966
  endY: a.endY - p
2967
2967
  }, h = m.endX - m.startX, b = re(r), y = `${b != null ? b : ""}`;
2968
- let { tb: w, pd: S } = n || {};
2969
- const { l: g = Q.pd.l, r: I = Q.pd.r } = S != null ? S : {};
2970
- w = w != null ? w : ve.WRAP;
2968
+ let { tb: I, pd: S } = n || {};
2969
+ const { l: g = Q.pd.l, r: w = Q.pd.r } = S != null ? S : {};
2970
+ I = I != null ? I : ve.WRAP;
2971
2971
  let _ = Se * 2 + he;
2972
2972
  switch (c.renderMode) {
2973
2973
  case ae.ARROW:
2974
- _ = he + 4 + I + g;
2974
+ _ = he + 4 + w + g;
2975
2975
  break;
2976
2976
  case ae.CUSTOM:
2977
- _ = he + Se * 2 + He * 2 + I + g + Yt / 2 + 1;
2977
+ _ = he + Se * 2 + He * 2 + w + g + Yt / 2 + 1;
2978
2978
  break;
2979
2979
  // default is CUSTOM
2980
2980
  default:
2981
- _ = he + Se * 2 + He * 2 + I + g + Yt / 2 + 1;
2981
+ _ = he + Se * 2 + He * 2 + w + g + Yt / 2 + 1;
2982
2982
  }
2983
2983
  const v = h - _, R = new rt(
2984
2984
  y,
2985
2985
  Ve(n).fontCache,
2986
- w === ve.WRAP,
2986
+ I === ve.WRAP,
2987
2987
  v,
2988
2988
  1 / 0
2989
2989
  );
@@ -3058,11 +3058,11 @@ let et = class extends dn {
3058
3058
  }
3059
3059
  _initComponents() {
3060
3060
  [
3061
- ["DataValidationIcon", Ir],
3061
+ ["DataValidationIcon", wr],
3062
3062
  [Mt, vi],
3063
3063
  [Et.componentKey, Et],
3064
3064
  [Dt.componentKey, Dt],
3065
- ...Ii
3065
+ ...wi
3066
3066
  ].forEach(([e, t]) => {
3067
3067
  this.disposeWithMe(this._componentManger.register(
3068
3068
  e,