@univerjs/sheets-data-validation-ui 0.7.0 → 0.8.0-beta.1

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