@univerjs/sheets-data-validation-ui 0.6.10 → 0.7.0-beta.0

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