@univerjs/sheets-data-validation-ui 0.5.0-nightly.202411221606 → 0.5.0-nightly.202411230545

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