@univerjs/sheets-data-validation-ui 0.5.4 → 0.5.5-nightly.202501201336

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,18 +1,18 @@
1
1
  var ko = Object.defineProperty;
2
2
  var Wo = (e, t, o) => t in e ? ko(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
3
  var M = (e, t, o) => Wo(e, typeof t != "symbol" ? t + "" : t, o);
4
- import Zt, { useState as W, forwardRef as we, useRef as He, createElement as Re, useMemo as Ae, useEffect as Ce } from "react";
5
- import { Inject as b, LocaleService as J, Disposable as De, DataValidationErrorStyle as it, useDependency as L, ICommandService as Q, dayjs as qt, numfmt as Jt, CellValueType as Ho, UniverInstanceType as Y, toDisposable as Yo, IUniverInstanceService as ge, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Xo, DisposableCollection as zo, CommandType as Je, BuildTextUtils as Ko, DataValidationRenderMode as de, DataValidationType as z, IConfigService as hn, UndoCommand as Go, RedoCommand as Zo, isUnitRangesEqual as qo, debounce as Jo, shallowEqual as Mn, Injector as Ne, DataValidationStatus as rt, ObjectMatrix as _t, Range as Qo, Rectangle as St, queryObjectMatrix as Qt, Optional as ea, RxDisposable as pn, InterceptorEffectEnum as zn, sequenceExecute as Kn, bufferDebounceTime as ta, isFormulaString as Pe, Tools as en, ThemeService as na, VerticalAlign as ue, HorizontalAlign as Ye, DEFAULT_STYLES as le, WrapStrategy as Se, DocumentDataModel as oa, DEFAULT_EMPTY_DOCUMENT_VALUE as aa, BooleanNumber as Qe, Plugin as Gn, merge as Zn } from "@univerjs/core";
6
- import { Button as Fe, DatePanel as ia, Scrollbar as ra, FormLayout as Z, RadioGroup as fn, Radio as xe, Checkbox as Ot, Input as je, Select as tn, DraggableList as sa } from "@univerjs/design";
7
- import { DeviceInputEventType as nn, IRenderManagerService as Ve, fixLineWidthByScale as bn, Transform as la, CheckboxShape as da, CURSOR_TYPE as Xe, FontCache as ca, Shape as ua, Rect as qn, getFontStyleString as jt, getDocsSkeletonPageSize as et, DocumentViewModel as ha, DocumentSkeleton as pa, Documents as fa } from "@univerjs/engine-render";
8
- import { SheetInterceptorService as mn, AFTER_CELL_EDIT_ASYNC as ma, SetRangeValuesCommand as gn, SheetsSelectionsService as Jn, getSheetCommandTarget as Qn, SheetPermissionCheckController as eo, WorkbookEditablePermission as Ct, RangeProtectionPermissionEditPoint as It, WorksheetEditPermission as wt, checkRangesEditablePermission as ga, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as to, InterceptCellContentPriority as no } from "@univerjs/sheets";
9
- import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as va, deserializeListOptions as oo, serializeListOptions as ao, UpdateSheetDataValidationRangeCommand as io, UpdateSheetDataValidationSettingCommand as En, RemoveSheetDataValidationCommand as ro, UpdateSheetDataValidationOptionsCommand as _a, createDefaultNewRule as so, AddSheetDataValidationCommand as vn, RemoveSheetAllDataValidationCommand as Sa, DATA_VALIDATION_PLUGIN_NAME as lo, getDataValidationDiffMutations as an, DataValidationCacheService as co, DataValidationFormulaController as Ca, DataValidationFormulaService as Ia, getFormulaResult as Ft, isLegalFormulaResult as On, transformCheckboxValue as wa, CHECKBOX_FORMULA_1 as Ra, CHECKBOX_FORMULA_2 as Da } from "@univerjs/sheets-data-validation";
4
+ import Zt, { useState as W, forwardRef as we, useRef as We, createElement as Re, useMemo as He, useEffect as Ce } from "react";
5
+ import { Inject as b, LocaleService as J, Disposable as De, DataValidationErrorStyle as it, useDependency as L, ICommandService as Q, dayjs as qt, numfmt as Jt, CellValueType as Ho, UniverInstanceType as Y, toDisposable as Yo, IUniverInstanceService as ge, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Xo, DisposableCollection as zo, CommandType as Je, BuildTextUtils as Ko, DataValidationRenderMode as de, DataValidationType as z, IConfigService as pn, UndoCommand as Go, RedoCommand as Zo, isUnitRangesEqual as qo, debounce as Jo, shallowEqual as bn, Injector as Fe, DataValidationStatus as rt, ObjectMatrix as _t, Range as Qo, Rectangle as St, queryObjectMatrix as Qt, Optional as ea, RxDisposable as fn, InterceptorEffectEnum as Kn, sequenceExecute as Gn, bufferDebounceTime as ta, isFormulaString as Pe, Tools as en, ThemeService as na, VerticalAlign as ue, HorizontalAlign as Ye, DEFAULT_STYLES as le, WrapStrategy as Se, DocumentDataModel as oa, DEFAULT_EMPTY_DOCUMENT_VALUE as aa, BooleanNumber as Qe, Plugin as Zn, merge as qn } from "@univerjs/core";
6
+ import { Button as je, DatePanel as ia, Scrollbar as ra, FormLayout as Z, RadioGroup as mn, Radio as Ae, Checkbox as Ot, Input as xe, Select as tn, DraggableList as sa } from "@univerjs/design";
7
+ import { DeviceInputEventType as nn, IRenderManagerService as Ve, fixLineWidthByScale as En, Transform as la, CheckboxShape as da, CURSOR_TYPE as Xe, FontCache as ca, Shape as ua, Rect as Jn, getFontStyleString as jt, getDocsSkeletonPageSize as et, DocumentViewModel as ha, DocumentSkeleton as pa, Documents as fa } from "@univerjs/engine-render";
8
+ import { SheetInterceptorService as gn, AFTER_CELL_EDIT_ASYNC as ma, SetRangeValuesCommand as vn, SheetsSelectionsService as Qn, getSheetCommandTarget as eo, SheetPermissionCheckController as to, WorkbookEditablePermission as Ct, RangeProtectionPermissionEditPoint as It, WorksheetEditPermission as wt, checkRangesEditablePermission as ga, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as no, InterceptCellContentPriority as oo } from "@univerjs/sheets";
9
+ import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as va, deserializeListOptions as ao, serializeListOptions as io, UpdateSheetDataValidationRangeCommand as ro, UpdateSheetDataValidationSettingCommand as On, RemoveSheetDataValidationCommand as so, UpdateSheetDataValidationOptionsCommand as _a, createDefaultNewRule as lo, AddSheetDataValidationCommand as _n, RemoveSheetAllDataValidationCommand as Sa, DATA_VALIDATION_PLUGIN_NAME as co, getDataValidationDiffMutations as an, DataValidationCacheService as uo, DataValidationFormulaController as Ca, DataValidationFormulaService as Ia, getFormulaResult as Ft, isLegalFormulaResult as Ln, transformCheckboxValue as wa, CHECKBOX_FORMULA_1 as Ra, CHECKBOX_FORMULA_2 as Da } from "@univerjs/sheets-data-validation";
10
10
  import { getPatternType as Va } from "@univerjs/sheets-numfmt";
11
- import { SetCellEditVisibleOperation as uo, SheetCanvasPopManagerService as ya, IEditorBridgeService as ho, IMarkSelectionService as Ma, HoverManagerService as ba, CellAlertManagerService as Ea, CellAlertType as Oa, IAutoFillService as La, APPLY_TYPE as tt, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Pa, COPY_TYPE as Ln, rangeToDiscreteRange as Ta, PREDEFINED_HOOK_NAME as dt, getRepeatRange as Pn, ISheetClipboardService as Aa, getCurrentRangeDisable$ as xa, AutoHeightController as po, SheetSkeletonManagerService as Rt } from "@univerjs/sheets-ui";
12
- import { IDialogService as ja, KeyCode as sn, ISidebarService as fo, useObservable as Ue, ComponentManager as Lt, IZenZoneService as mo, RectPopup as Fa, useEvent as go, useSidebarClick as _n, MenuItemType as Sn, getMenuHiddenObservable as Na, RibbonStartGroup as Ua, IMenuManagerService as Ba } from "@univerjs/ui";
13
- import { DataValidatorRegistryService as ye, DataValidationModel as Pt, DataValidatorRegistryScope as $a, TWO_FORMULA_OPERATOR_COUNT as ka, getRuleOptions as Tn, getRuleSetting as An } from "@univerjs/data-validation";
11
+ import { SetCellEditVisibleOperation as ho, SheetCanvasPopManagerService as ya, IEditorBridgeService as po, IMarkSelectionService as Ma, HoverManagerService as ba, CellAlertManagerService as Ea, CellAlertType as Oa, IAutoFillService as La, APPLY_TYPE as tt, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Pa, COPY_TYPE as Pn, rangeToDiscreteRange as Ta, PREDEFINED_HOOK_NAME as dt, getRepeatRange as Tn, ISheetClipboardService as Aa, getCurrentRangeDisable$ as xa, AutoHeightController as fo, SheetSkeletonManagerService as Rt } from "@univerjs/sheets-ui";
12
+ import { IDialogService as ja, KeyCode as sn, ISidebarService as mo, useObservable as Ne, ComponentManager as Lt, IZenZoneService as go, RectPopup as Fa, useEvent as ln, useSidebarClick as Sn, MenuItemType as Cn, getMenuHiddenObservable as Na, RibbonStartGroup as Ua, IMenuManagerService as Ba } from "@univerjs/ui";
13
+ import { DataValidatorRegistryService as ye, DataValidationModel as Pt, DataValidatorRegistryScope as $a, TWO_FORMULA_OPERATOR_COUNT as ka, getRuleOptions as An, getRuleSetting as xn } from "@univerjs/data-validation";
14
14
  import { RichTextEditingMutation as Wa } from "@univerjs/docs";
15
- import { filter as Cn, BehaviorSubject as xn, distinctUntilChanged as Ha, Subject as Ya, debounceTime as In, bufferTime as vo } from "rxjs";
15
+ import { filter as In, BehaviorSubject as jn, distinctUntilChanged as Ha, Subject as Ya, debounceTime as wn, bufferTime as vo } from "rxjs";
16
16
  import { deserializeRangeWithSheet as Xa, serializeRange as _o } from "@univerjs/engine-formula";
17
17
  import { RangeSelector as za, FormulaEditor as So } from "@univerjs/sheets-formula-ui";
18
18
  var Nt = { exports: {} }, nt = {};
@@ -25,10 +25,10 @@ var Nt = { exports: {} }, nt = {};
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 jn;
28
+ var Fn;
29
29
  function Ka() {
30
- if (jn) return nt;
31
- jn = 1;
30
+ if (Fn) return nt;
31
+ Fn = 1;
32
32
  var e = Zt, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
33
33
  function r(l, s, c) {
34
34
  var u, p = {}, d = null, g = null;
@@ -39,9 +39,9 @@ function Ka() {
39
39
  }
40
40
  return nt.Fragment = o, nt.jsx = r, nt.jsxs = r, nt;
41
41
  }
42
- var Fn;
42
+ var Nn;
43
43
  function Ga() {
44
- return Fn || (Fn = 1, Nt.exports = Ka()), Nt.exports;
44
+ return Nn || (Nn = 1, Nt.exports = Ka()), Nt.exports;
45
45
  }
46
46
  var h = Ga(), Za = Object.defineProperty, qa = Object.getOwnPropertyDescriptor, Ja = (e, t, o, n) => {
47
47
  for (var a = n > 1 ? void 0 : n ? qa(t, o) : t, i = e.length - 1, r; i >= 0; i--)
@@ -57,7 +57,7 @@ let st = class extends De {
57
57
  ma,
58
58
  {
59
59
  handler: async (e, t, o) => {
60
- var I;
60
+ var C;
61
61
  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;
62
62
  if (!p || p.errorStyle !== it.STOP)
63
63
  return o(Promise.resolve(n));
@@ -65,7 +65,7 @@ let st = class extends De {
65
65
  if (!d || await d.validator(
66
66
  {
67
67
  value: ie(n),
68
- interceptValue: ie((I = t == null ? void 0 : t.origin) != null ? I : n),
68
+ interceptValue: ie((C = t == null ? void 0 : t.origin) != null ? C : n),
69
69
  row: i,
70
70
  column: r,
71
71
  unitId: l,
@@ -89,7 +89,7 @@ let st = class extends De {
89
89
  },
90
90
  footer: {
91
91
  title: Zt.createElement(
92
- Fe,
92
+ je,
93
93
  {
94
94
  type: "primary",
95
95
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -117,7 +117,7 @@ let st = class extends De {
117
117
  },
118
118
  footer: {
119
119
  title: Zt.createElement(
120
- Fe,
120
+ je,
121
121
  {
122
122
  type: "primary",
123
123
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -132,13 +132,13 @@ let st = class extends De {
132
132
  }
133
133
  };
134
134
  st = Ja([
135
- ot(0, b(mn)),
135
+ ot(0, b(gn)),
136
136
  ot(1, b(oe)),
137
137
  ot(2, b(ye)),
138
138
  ot(3, ja),
139
139
  ot(4, b(J))
140
140
  ], st);
141
- const Qa = "univer-dv-date-dropdown", ei = "univer-dv-date-dropdown-btns", Nn = {
141
+ const Qa = "univer-dv-date-dropdown", ei = "univer-dv-date-dropdown-btns", Un = {
142
142
  dvDateDropdown: Qa,
143
143
  dvDateDropdownBtns: ei
144
144
  }, ti = (e) => {
@@ -152,18 +152,18 @@ const Qa = "univer-dv-date-dropdown", ei = "univer-dv-date-dropdown-btns", Nn =
152
152
  };
153
153
  function ni(e) {
154
154
  var m;
155
- const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l, workbook: s } = t, c = L(Q), u = L(st), p = n.getCell(a, i), d = ie(n.getCellRaw(a, i)), g = ti(d), [f, I] = W(g), R = f && f.isValid() ? f : qt(), v = L(J), w = L(oe), C = w.getRuleByLocation(r, l, a, i);
156
- if (!C)
155
+ const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l, workbook: s } = t, c = L(Q), u = L(st), p = n.getCell(a, i), d = ie(n.getCellRaw(a, i)), g = ti(d), [f, C] = W(g), R = f && f.isValid() ? f : qt(), v = L(J), w = L(oe), I = w.getRuleByLocation(r, l, a, i);
156
+ if (!I)
157
157
  return null;
158
- const V = w.getValidator(C.type);
158
+ const V = w.getValidator(I.type);
159
159
  if (!p || !V)
160
160
  return;
161
- const _ = !!((m = C.bizInfo) != null && m.showTime), S = async () => {
161
+ const _ = !!((m = I.bizInfo) != null && m.showTime), S = async () => {
162
162
  var x, j, N;
163
163
  if (!R)
164
164
  return;
165
165
  const P = R.format(_ ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), F = (x = Jt.parseDate(P)) == null ? void 0 : x.v, T = s.getStyles().getStyleByCell(p), E = (N = (j = T == null ? void 0 : T.n) == null ? void 0 : j.pattern) != null ? N : "", A = Va(E);
166
- C.errorStyle !== it.STOP || await V.validator({
166
+ I.errorStyle !== it.STOP || await V.validator({
167
167
  value: F,
168
168
  unitId: r,
169
169
  subUnitId: l,
@@ -173,12 +173,12 @@ function ni(e) {
173
173
  workbook: s,
174
174
  interceptValue: P.replace("Z", "").replace("T", " "),
175
175
  t: Ho.NUMBER
176
- }, C) ? (o(), await c.executeCommand(uo.id, {
176
+ }, I) ? (o(), await c.executeCommand(ho.id, {
177
177
  visible: !1,
178
178
  eventType: nn.Keyboard,
179
179
  unitId: r,
180
180
  keycode: sn.ESC
181
- }), await c.executeCommand(gn.id, {
181
+ }), await c.executeCommand(vn.id, {
182
182
  unitId: r,
183
183
  subUnitId: l,
184
184
  range: {
@@ -199,9 +199,9 @@ function ni(e) {
199
199
  }
200
200
  }
201
201
  }
202
- })) : u.showReject(V.getRuleFinalError(C, { row: a, col: i, unitId: r, subUnitId: l }));
202
+ })) : u.showReject(V.getRuleFinalError(I, { row: a, col: i, unitId: r, subUnitId: l }));
203
203
  };
204
- return /* @__PURE__ */ h.jsxs("div", { className: Nn.dvDateDropdown, children: [
204
+ return /* @__PURE__ */ h.jsxs("div", { className: Un.dvDateDropdown, children: [
205
205
  /* @__PURE__ */ h.jsx(
206
206
  ia,
207
207
  {
@@ -209,15 +209,15 @@ function ni(e) {
209
209
  pickerValue: R,
210
210
  showTime: _ || void 0,
211
211
  onSelect: async (y) => {
212
- I(y);
212
+ C(y);
213
213
  },
214
214
  onPanelChange: (y) => {
215
- I(y);
215
+ C(y);
216
216
  },
217
217
  disabledDate: (y) => !Jt.parseDate(y.format("YYYY-MM-DD"))
218
218
  }
219
219
  ),
220
- /* @__PURE__ */ h.jsx("div", { className: Nn.dvDateDropdownBtns, children: /* @__PURE__ */ h.jsx(Fe, { size: "small", type: "primary", onClick: S, disabled: !R.isValid(), children: v.t("dataValidation.alert.ok") }) })
220
+ /* @__PURE__ */ h.jsx("div", { className: Un.dvDateDropdownBtns, children: /* @__PURE__ */ h.jsx(je, { size: "small", type: "primary", onClick: S, disabled: !R.isValid(), children: v.t("dataValidation.alert.ok") }) })
221
221
  ] });
222
222
  }
223
223
  var ce = function() {
@@ -236,7 +236,7 @@ var ce = function() {
236
236
  t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
237
237
  return o;
238
238
  }, Me = we(function(e, t) {
239
- var o = e.icon, n = e.id, a = e.className, i = e.extend, r = oi(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(a || "").trim(), s = He("_".concat(ri()));
239
+ var o = e.icon, n = e.id, a = e.className, i = e.extend, r = oi(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(a || "").trim(), s = We("_".concat(ri()));
240
240
  return Co(o, "".concat(n), { defIds: o.defIds, idSuffix: s.current }, ce({ ref: t, className: l }, r), i);
241
241
  });
242
242
  function Co(e, t, o, n, a) {
@@ -279,14 +279,14 @@ var li = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em"
279
279
  }));
280
280
  });
281
281
  wo.displayName = "DataValidationSingle";
282
- var di = { 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" } }] }, wn = we(function(e, t) {
282
+ var di = { 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" } }] }, Rn = we(function(e, t) {
283
283
  return Re(Me, Object.assign({}, e, {
284
284
  id: "delete-single",
285
285
  ref: t,
286
286
  icon: di
287
287
  }));
288
288
  });
289
- wn.displayName = "DeleteSingle";
289
+ Rn.displayName = "DeleteSingle";
290
290
  var ci = { 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" } }] }, Ro = we(function(e, t) {
291
291
  return Re(Me, Object.assign({}, e, {
292
292
  id: "increase-single",
@@ -323,18 +323,18 @@ var fi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, gi = (e, t
323
323
  for (var a = n > 1 ? void 0 : n ? mi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
324
324
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
325
325
  return n && a && fi(t, o, a), a;
326
- }, Un = (e, t) => (o, n) => t(o, n, e);
326
+ }, Bn = (e, t) => (o, n) => t(o, n, e);
327
327
  let fe = class extends De {
328
328
  constructor(t, o) {
329
329
  super();
330
- M(this, "_open$", new xn(!1));
330
+ M(this, "_open$", new jn(!1));
331
331
  M(this, "open$", this._open$.pipe(Ha()));
332
332
  M(this, "_activeRule");
333
- M(this, "_activeRule$", new xn(void 0));
333
+ M(this, "_activeRule$", new jn(void 0));
334
334
  M(this, "activeRule$", this._activeRule$.asObservable());
335
335
  M(this, "_closeDisposable", null);
336
336
  this._univerInstanceService = t, this._sidebarService = o, this.disposeWithMe(
337
- this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET).pipe(Cn((n) => !n)).subscribe(() => {
337
+ this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET).pipe(In((n) => !n)).subscribe(() => {
338
338
  this.close();
339
339
  })
340
340
  ), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((n) => {
@@ -370,11 +370,11 @@ let fe = class extends De {
370
370
  }
371
371
  };
372
372
  fe = gi([
373
- Un(0, ge),
374
- Un(1, fo)
373
+ Bn(0, ge),
374
+ Bn(1, mo)
375
375
  ], fe);
376
376
  function vi() {
377
- const e = L(Ie), t = Ue(e.activeDropdown$, e.activeDropdown), o = L(Lt);
377
+ const e = L(Ie), t = Ne(e.activeDropdown$, e.activeDropdown), o = L(Lt);
378
378
  if (!t)
379
379
  return null;
380
380
  const { location: n, componentKey: a } = t, i = o.get(a), r = `${n.unitId}-${n.subUnitId}-${n.row}-${n.col}`;
@@ -501,18 +501,18 @@ Ie = Ci([
501
501
  be(0, b(ya)),
502
502
  be(1, ge),
503
503
  be(2, b(ye)),
504
- be(3, mo),
504
+ be(3, go),
505
505
  be(4, Ve),
506
506
  be(5, b(oe)),
507
- be(6, b(Jn))
507
+ be(6, b(Qn))
508
508
  ], Ie);
509
- const Dt = "DataValidationPanel", Be = {
509
+ const Dt = "DataValidationPanel", Ue = {
510
510
  id: "data-validation.operation.open-validation-panel",
511
511
  type: Je.OPERATION,
512
512
  handler(e, t) {
513
513
  if (!t)
514
514
  return !1;
515
- const { ruleId: o, isAdd: n } = t, a = e.get(fe), i = e.get(Pt), r = e.get(ge), l = e.get(fo), s = Qn(r);
515
+ const { ruleId: o, isAdd: n } = t, a = e.get(fe), i = e.get(Pt), r = e.get(ge), l = e.get(mo), s = eo(r);
516
516
  if (!s) return !1;
517
517
  const { unitId: c, subUnitId: u } = s, p = o ? i.getRuleById(c, u, o) : void 0;
518
518
  a.open(), a.setActiveRule(p && {
@@ -529,7 +529,7 @@ const Dt = "DataValidationPanel", Be = {
529
529
  });
530
530
  return a.setCloseDisposable(d), !0;
531
531
  }
532
- }, Rn = {
532
+ }, Dn = {
533
533
  id: "data-validation.operation.close-validation-panel",
534
534
  type: Je.OPERATION,
535
535
  handler(e) {
@@ -540,7 +540,7 @@ const Dt = "DataValidationPanel", Be = {
540
540
  type: Je.OPERATION,
541
541
  handler(e) {
542
542
  const t = e.get(Q), o = e.get(fe);
543
- return o.open(), o.isOpen ? t.executeCommand(Rn.id) : t.executeCommand(Be.id), !0;
543
+ return o.open(), o.isOpen ? t.executeCommand(Dn.id) : t.executeCommand(Ue.id), !0;
544
544
  }
545
545
  }, Tt = {
546
546
  type: Je.OPERATION,
@@ -562,7 +562,7 @@ const Dt = "DataValidationPanel", Be = {
562
562
  handler(e, t) {
563
563
  return t ? (e.get(Ie).hideDropdown(), !0) : !1;
564
564
  }
565
- }, Te = "#ECECEC", Dn = "sheets-data-validation-ui.config", Vt = {}, Ii = "univer-dv-list-dropdown", wi = "univer-dv-list-dropdown-title", Ri = "univer-dv-list-dropdown-list", Di = "univer-dv-list-dropdown-list-container", Vi = "univer-dv-list-dropdown-selected-icon", yi = "univer-dv-list-dropdown-item-container", Mi = "univer-dv-list-dropdown-item", bi = "univer-dv-list-dropdown-split", Ei = "univer-dv-list-dropdown-edit", ve = {
565
+ }, Te = "#ECECEC", Vn = "sheets-data-validation-ui.config", Vt = {}, Ii = "univer-dv-list-dropdown", wi = "univer-dv-list-dropdown-title", Ri = "univer-dv-list-dropdown-list", Di = "univer-dv-list-dropdown-list-container", Vi = "univer-dv-list-dropdown-selected-icon", yi = "univer-dv-list-dropdown-item-container", Mi = "univer-dv-list-dropdown-item", bi = "univer-dv-list-dropdown-split", Ei = "univer-dv-list-dropdown-edit", ve = {
566
566
  dvListDropdown: Ii,
567
567
  dvListDropdownTitle: wi,
568
568
  dvListDropdownList: Ri,
@@ -574,16 +574,16 @@ const Dt = "DataValidationPanel", Be = {
574
574
  dvListDropdownEdit: Ei
575
575
  }, Oi = (e) => {
576
576
  var _, S;
577
- 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(hn), d = s == null ? void 0 : s.toLowerCase(), { row: g, col: f, unitId: I, subUnitId: R } = c, v = a.filter((m) => d ? m.label.toLowerCase().includes(d) : !0), w = (S = (_ = p.getConfig(Dn)) == null ? void 0 : _.showEditOnDropdown) != null ? S : !0, C = L(eo), V = Ae(() => C.permissionCheckWithRanges(
577
+ 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(pn), d = s == null ? void 0 : s.toLowerCase(), { row: g, col: f, unitId: C, subUnitId: R } = c, v = a.filter((m) => d ? m.label.toLowerCase().includes(d) : !0), w = (S = (_ = p.getConfig(Vn)) == null ? void 0 : _.showEditOnDropdown) != null ? S : !0, I = L(to), V = He(() => I.permissionCheckWithRanges(
578
578
  {
579
579
  workbookTypes: [Ct],
580
580
  rangeTypes: [It],
581
581
  worksheetTypes: [wt]
582
582
  },
583
583
  [{ startColumn: f, startRow: g, endColumn: f, endRow: g }],
584
- I,
584
+ C,
585
585
  R
586
- ), [C, f, g, I, R]);
586
+ ), [I, f, g, C, R]);
587
587
  return /* @__PURE__ */ h.jsxs("div", { className: ve.dvListDropdown, style: l, children: [
588
588
  /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownTitle, children: i }),
589
589
  /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownList, children: /* @__PURE__ */ h.jsx(ra, { children: /* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownListContainer, children: v.map((m, y) => {
@@ -612,16 +612,15 @@ const Dt = "DataValidationPanel", Be = {
612
612
  };
613
613
  function Li(e) {
614
614
  var j, N, H, X;
615
- const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = L(Pt), [c, u] = W(""), p = L(Q), d = L(J), [g, f] = W(""), I = L(ho), R = L(ge), v = Ae(() => s.ruleChange$.pipe(In(16)), []), w = L(oe);
616
- Ue(v);
617
- const C = Fa.useContext(), V = ((N = (j = C.current) == null ? void 0 : j.right) != null ? N : 0) - ((X = (H = C.current) == null ? void 0 : H.left) != null ? X : 0);
615
+ const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = L(Pt), [c, u] = W(""), p = L(Q), d = L(J), [g, f] = W(""), C = L(po), R = L(ge), v = He(() => s.ruleChange$.pipe(wn(16)), []), w = L(oe);
616
+ Ne(v);
617
+ const I = Fa.useContext(), V = ((N = (j = I.current) == null ? void 0 : j.right) != null ? N : 0) - ((X = (H = I.current) == null ? void 0 : H.left) != null ? X : 0);
618
618
  if (Ce(() => {
619
619
  const k = p.onCommandExecuted((K) => {
620
620
  var q, ee;
621
621
  if (K.id === Wa.id) {
622
622
  const te = K.params, { unitId: re } = te, ae = R.getUnit(re, Y.UNIVER_DOC);
623
- if (!ae)
624
- return;
623
+ if (!ae || !C.isVisible().visible) return;
625
624
  const se = Ko.transform.getPlainText((ee = (q = ae.getSnapshot().body) == null ? void 0 : q.dataStream) != null ? ee : "");
626
625
  u(se);
627
626
  }
@@ -629,7 +628,7 @@ function Li(e) {
629
628
  return () => {
630
629
  k.dispose();
631
630
  };
632
- }, [p, R]), !n)
631
+ }, [p, C, R]), !n)
633
632
  return null;
634
633
  const _ = w.getRuleByLocation(r, l, a, i);
635
634
  if (!_)
@@ -640,8 +639,8 @@ function Li(e) {
640
639
  const m = n.getCell(a, i), y = (_ == null ? void 0 : _.renderMode) === de.CUSTOM || (_ == null ? void 0 : _.renderMode) === void 0;
641
640
  if (!m || !_ || !S || S.id.indexOf(z.LIST) !== 0)
642
641
  return;
643
- const P = _.type === z.LIST_MULTIPLE, F = S.getListWithColor(_, r, l), T = g || va(n.getCellRaw(a, i)), E = oo(T), A = () => {
644
- p.executeCommand(Be.id, {
642
+ const P = _.type === z.LIST_MULTIPLE, F = S.getListWithColor(_, r, l), T = g || va(n.getCellRaw(a, i)), E = ao(T), A = () => {
643
+ p.executeCommand(Ue.id, {
645
644
  ruleId: _.uid
646
645
  }), o();
647
646
  }, x = F.map((k) => ({
@@ -657,7 +656,7 @@ function Li(e) {
657
656
  value: E,
658
657
  multiple: P,
659
658
  onChange: async (k) => {
660
- const K = ao(k), q = {
659
+ const K = io(k), q = {
661
660
  unitId: r,
662
661
  subUnitId: l,
663
662
  range: {
@@ -673,17 +672,17 @@ function Li(e) {
673
672
  si: null
674
673
  }
675
674
  };
676
- I.isVisible() && I.changeVisible({
675
+ C.isVisible() && C.changeVisible({
677
676
  visible: !1,
678
677
  keycode: sn.ESC,
679
678
  eventType: nn.Keyboard,
680
679
  unitId: r
681
- }), f(K), P || o(), I.isVisible().visible && await p.executeCommand(uo.id, {
680
+ }), f(K), P || o(), C.isVisible().visible && await p.executeCommand(ho.id, {
682
681
  visible: !1,
683
682
  eventType: nn.Keyboard,
684
683
  unitId: r,
685
684
  keycode: sn.ESC
686
- }), p.executeCommand(gn.id, q);
685
+ }), p.executeCommand(vn.id, q);
687
686
  },
688
687
  options: x,
689
688
  onEdit: A,
@@ -711,13 +710,13 @@ function Ai(e) {
711
710
  {
712
711
  label: t.t("dataValidation.panel.invalid"),
713
712
  children: /* @__PURE__ */ h.jsxs(
714
- fn,
713
+ mn,
715
714
  {
716
715
  value: `${(c = n.errorStyle) != null ? c : it.WARNING}`,
717
716
  onChange: (u) => a({ ...n, errorStyle: +u }),
718
717
  children: [
719
- /* @__PURE__ */ h.jsx(xe, { value: `${it.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
720
- /* @__PURE__ */ h.jsx(xe, { value: `${it.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
718
+ /* @__PURE__ */ h.jsx(Ae, { value: `${it.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
719
+ /* @__PURE__ */ h.jsx(Ae, { value: `${it.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
721
720
  ]
722
721
  }
723
722
  )
@@ -740,11 +739,11 @@ function Ai(e) {
740
739
  )
741
740
  }
742
741
  ),
743
- n.showErrorMessage ? /* @__PURE__ */ h.jsx(Z, { children: /* @__PURE__ */ h.jsx(je, { value: n.error, onChange: (u) => a({ ...n, error: u }) }) }) : null
742
+ n.showErrorMessage ? /* @__PURE__ */ h.jsx(Z, { children: /* @__PURE__ */ h.jsx(xe, { value: n.error, onChange: (u) => a({ ...n, error: u }) }) }) : null
744
743
  ] })
745
744
  ] });
746
745
  }
747
- const xi = "univer-data-validation-detail", ji = "univer-data-validation-detail-form-item", Fi = "univer-data-validation-detail-buttons", Ni = "univer-data-validation-detail-button", $e = {
746
+ const xi = "univer-data-validation-detail", ji = "univer-data-validation-detail-form-item", Fi = "univer-data-validation-detail-buttons", Ni = "univer-data-validation-detail-button", Be = {
748
747
  dataValidationDetail: xi,
749
748
  dataValidationDetailFormItem: ji,
750
749
  dataValidationDetailButtons: Fi,
@@ -762,7 +761,7 @@ function Bi(e, t, o) {
762
761
  }
763
762
  function $i() {
764
763
  var se;
765
- const [e, t] = W(0), o = L(fe), n = Ue(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = L(ye), c = L(ge), u = L(Lt), p = L(Q), d = L(Pt), g = L(J), [f, I] = W(r), R = s.getValidatorItem(f.type), [v, w] = W(!1), C = s.getValidatorsByScope($a.SHEET), [V, _] = W(() => f.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), S = Ae(() => Ui(p), [p]), [m, y] = W(!1), P = He({}), [F, T] = W(!1), E = L(Jn);
764
+ const [e, t] = W(0), o = L(fe), n = Ne(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = L(ye), c = L(ge), u = L(Lt), p = L(Q), d = L(Pt), g = L(J), [f, C] = W(r), R = s.getValidatorItem(f.type), [v, w] = W(!1), I = s.getValidatorsByScope($a.SHEET), [V, _] = W(() => f.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), S = He(() => Ui(p), [p]), [m, y] = W(!1), P = We({}), [F, T] = W(!1), E = L(Qn);
766
765
  if (Ce(() => () => {
767
766
  const O = E.getCurrentLastSelection();
768
767
  O && E.setSelections([O]);
@@ -770,14 +769,14 @@ function $i() {
770
769
  p.onCommandExecuted((O) => {
771
770
  (O.id === Go.id || O.id === Zo.id) && setTimeout(() => {
772
771
  const D = d.getRuleById(a, i, l);
773
- t((U) => U + 1), D && (I(D), _(D.ranges.map((U) => ({ unitId: "", sheetId: "", range: U }))));
772
+ t((U) => U + 1), D && (C(D), _(D.ranges.map((U) => ({ unitId: "", sheetId: "", range: U }))));
774
773
  }, 20);
775
774
  });
776
775
  }, [p, d, l, i, a]), !R)
777
776
  return null;
778
777
  const A = R.operators, x = R.operatorNames, j = f.operator ? ka.includes(f.operator) : !1, N = () => {
779
778
  !f.ranges.length || m || (R.validatorFormula(f, a, i).success ? o.setActiveRule(null) : w(!0));
780
- }, H = go((O) => {
779
+ }, H = ln((O) => {
781
780
  const D = O.split(",").filter(Boolean).map(Xa).map(($) => {
782
781
  const _e = $.sheetName;
783
782
  if (_e) {
@@ -793,7 +792,7 @@ function $i() {
793
792
  return;
794
793
  _(D);
795
794
  const U = D.filter(($) => (!$.unitId || $.unitId === a) && (!$.sheetId || $.sheetId === i)).map(($) => $.range);
796
- if (I({
795
+ if (C({
797
796
  ...f,
798
797
  ranges: U
799
798
  }), U.length === 0)
@@ -804,11 +803,11 @@ function $i() {
804
803
  ruleId: l,
805
804
  ranges: U
806
805
  };
807
- S(io.id, B);
806
+ S(ro.id, B);
808
807
  }), X = (O) => {
809
- if (Mn(O, An(f)))
808
+ if (bn(O, xn(f)))
810
809
  return;
811
- I({
810
+ C({
812
811
  ...f,
813
812
  ...O
814
813
  });
@@ -819,12 +818,12 @@ function $i() {
819
818
  setting: O
820
819
  };
821
820
  S(
822
- En.id,
821
+ On.id,
823
822
  D,
824
823
  void 0
825
824
  );
826
825
  }, k = async () => {
827
- await p.executeCommand(ro.id, {
826
+ await p.executeCommand(so.id, {
828
827
  ruleId: l,
829
828
  unitId: a,
830
829
  subUnitId: i
@@ -849,14 +848,14 @@ function $i() {
849
848
  formula1: void 0,
850
849
  formula2: void 0
851
850
  };
852
- I($), p.executeCommand(En.id, {
851
+ C($), p.executeCommand(On.id, {
853
852
  unitId: a,
854
853
  subUnitId: i,
855
854
  ruleId: f.uid,
856
- setting: An($)
855
+ setting: xn($)
857
856
  });
858
- }, ee = u.get(R.formulaInput), te = Ae(() => V.map((O) => _o(O.range)).join(","), []), re = Tn(f), ae = (O) => {
859
- Mn(O, Tn(f)) || (I({
857
+ }, ee = u.get(R.formulaInput), te = He(() => V.map((O) => _o(O.range)).join(","), []), re = An(f), ae = (O) => {
858
+ bn(O, An(f)) || (C({
860
859
  ...f,
861
860
  ...O
862
861
  }), S(
@@ -869,11 +868,11 @@ function $i() {
869
868
  }
870
869
  ));
871
870
  };
872
- return _n((O) => {
871
+ return Sn((O) => {
873
872
  var U;
874
873
  const D = (U = P.current) == null ? void 0 : U.handleOutClick;
875
874
  D && D(O, () => T(!1));
876
- }), /* @__PURE__ */ h.jsxs("div", { className: $e.dataValidationDetail, children: [
875
+ }), /* @__PURE__ */ h.jsxs("div", { className: Be.dataValidationDetail, children: [
877
876
  /* @__PURE__ */ h.jsx(
878
877
  Z,
879
878
  {
@@ -897,13 +896,13 @@ function $i() {
897
896
  /* @__PURE__ */ h.jsx(Z, { label: g.t("dataValidation.panel.type"), children: /* @__PURE__ */ h.jsx(
898
897
  tn,
899
898
  {
900
- options: C == null ? void 0 : C.map((O) => ({
899
+ options: I == null ? void 0 : I.map((O) => ({
901
900
  label: g.t(O.title),
902
901
  value: O.id
903
902
  })),
904
903
  value: f.type,
905
904
  onChange: q,
906
- className: $e.dataValidationDetailFormItem
905
+ className: Be.dataValidationDetailFormItem
907
906
  }
908
907
  ) }),
909
908
  A != null && A.length ? /* @__PURE__ */ h.jsx(Z, { label: g.t("dataValidation.panel.operator"), children: /* @__PURE__ */ h.jsx(
@@ -920,7 +919,7 @@ function $i() {
920
919
  operator: O
921
920
  });
922
921
  },
923
- className: $e.dataValidationDetailFormItem
922
+ className: Be.dataValidationDetailFormItem
924
923
  }
925
924
  ) }) : null,
926
925
  ee ? /* @__PURE__ */ h.jsx(
@@ -960,9 +959,9 @@ function $i() {
960
959
  }
961
960
  ) }),
962
961
  /* @__PURE__ */ h.jsx(Ai, { value: re, onChange: ae, extraComponent: R.optionsInput }),
963
- /* @__PURE__ */ h.jsxs("div", { className: $e.dataValidationDetailButtons, children: [
964
- /* @__PURE__ */ h.jsx(Fe, { className: $e.dataValidationDetailButton, onClick: k, children: g.t("dataValidation.panel.removeRule") }),
965
- /* @__PURE__ */ h.jsx(Fe, { className: $e.dataValidationDetailButton, type: "primary", onClick: N, children: g.t("dataValidation.panel.done") })
962
+ /* @__PURE__ */ h.jsxs("div", { className: Be.dataValidationDetailButtons, children: [
963
+ /* @__PURE__ */ h.jsx(je, { className: Be.dataValidationDetailButton, onClick: k, children: g.t("dataValidation.panel.removeRule") }),
964
+ /* @__PURE__ */ h.jsx(je, { className: Be.dataValidationDetailButton, type: "primary", onClick: N, children: g.t("dataValidation.panel.done") })
966
965
  ] })
967
966
  ] });
968
967
  }
@@ -972,8 +971,8 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
972
971
  dataValidationItemContent: Hi,
973
972
  dataValidationItemIcon: Yi
974
973
  }, Xi = (e) => {
975
- const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = L(ye), l = L(Q), s = L(Ma), c = r.getValidatorItem(t.type), u = He(), [p, d] = W(!1), g = (f) => {
976
- l.executeCommand(ro.id, {
974
+ const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = L(ye), l = L(Q), s = L(Ma), c = r.getValidatorItem(t.type), u = We(), [p, d] = W(!1), g = (f) => {
975
+ l.executeCommand(so.id, {
977
976
  ruleId: t.uid,
978
977
  unitId: n,
979
978
  subUnitId: a
@@ -981,8 +980,8 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
981
980
  };
982
981
  return Ce(() => () => {
983
982
  var f;
984
- u.current && ((f = u.current) == null || f.forEach((I) => {
985
- I && s.removeShape(I);
983
+ u.current && ((f = u.current) == null || f.forEach((C) => {
984
+ C && s.removeShape(C);
986
985
  }));
987
986
  }, [s]), /* @__PURE__ */ h.jsxs(
988
987
  "div",
@@ -1004,14 +1003,14 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
1004
1003
  },
1005
1004
  onMouseLeave: () => {
1006
1005
  var f;
1007
- d(!1), (f = u.current) == null || f.forEach((I) => {
1008
- I && s.removeShape(I);
1006
+ d(!1), (f = u.current) == null || f.forEach((C) => {
1007
+ C && s.removeShape(C);
1009
1008
  }), u.current = void 0;
1010
1009
  },
1011
1010
  children: [
1012
1011
  /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemTitle, children: c == null ? void 0 : c.generateRuleName(t) }),
1013
1012
  /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemContent, children: t.ranges.map((f) => _o(f)).join(",") }),
1014
- p ? /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemIcon, onClick: g, children: /* @__PURE__ */ h.jsx(wn, {}) }) : null
1013
+ p ? /* @__PURE__ */ h.jsx("div", { className: ct.dataValidationItemIcon, onClick: g, children: /* @__PURE__ */ h.jsx(Rn, {}) }) : null
1015
1014
  ]
1016
1015
  }
1017
1016
  );
@@ -1021,7 +1020,7 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
1021
1020
  dataValidationListButton: Gi
1022
1021
  };
1023
1022
  function Zi() {
1024
- const e = L(ge), t = Ue(
1023
+ const e = L(ge), t = Ne(
1025
1024
  () => e.getCurrentTypeOfUnit$(Y.UNIVER_SHEET),
1026
1025
  void 0,
1027
1026
  void 0,
@@ -1030,23 +1029,23 @@ function Zi() {
1030
1029
  return t ? /* @__PURE__ */ h.jsx(qi, { workbook: t }) : null;
1031
1030
  }
1032
1031
  function qi(e) {
1033
- const t = L(oe), o = L(ge), n = L(Q), a = L(Ne), i = L(fe), r = L(J), [l, s] = W([]), { workbook: c } = e, u = Ue(c.activeSheet$, void 0, !0), p = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
1032
+ const t = L(oe), o = L(ge), n = L(Q), a = L(Fe), i = L(fe), r = L(J), [l, s] = W([]), { workbook: c } = e, u = Ne(c.activeSheet$, void 0, !0), p = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
1034
1033
  Ce(() => {
1035
1034
  s(t.getRules(p, d));
1036
- const w = t.ruleChange$.subscribe((C) => {
1037
- C.unitId === p && C.subUnitId === d && s(t.getRules(p, d));
1035
+ const w = t.ruleChange$.subscribe((I) => {
1036
+ I.unitId === p && I.subUnitId === d && s(t.getRules(p, d));
1038
1037
  });
1039
1038
  return () => {
1040
1039
  w.unsubscribe();
1041
1040
  };
1042
1041
  }, [p, d, t]);
1043
1042
  const g = async () => {
1044
- const w = so(a), C = {
1043
+ const w = lo(a), I = {
1045
1044
  unitId: p,
1046
1045
  subUnitId: d,
1047
1046
  rule: w
1048
1047
  };
1049
- await n.executeCommand(vn.id, C), i.setActiveRule({
1048
+ await n.executeCommand(_n.id, I), i.setActiveRule({
1050
1049
  unitId: p,
1051
1050
  subUnitId: d,
1052
1051
  rule: w
@@ -1057,12 +1056,12 @@ function qi(e) {
1057
1056
  subUnitId: d
1058
1057
  });
1059
1058
  }, R = ((w) => {
1060
- const C = o.getCurrentUnitForType(Y.UNIVER_SHEET), V = C.getActiveSheet(), _ = C.getUnitId(), S = V.getSheetId();
1059
+ const I = o.getCurrentUnitForType(Y.UNIVER_SHEET), V = I.getActiveSheet(), _ = I.getUnitId(), S = V.getSheetId();
1061
1060
  return w.map((y) => ga(a, _, S, y.ranges) ? { ...y } : { ...y, disable: !0 });
1062
1061
  })(l), v = R == null ? void 0 : R.some((w) => w.disable);
1063
1062
  return /* @__PURE__ */ h.jsxs("div", { className: ut.dataValidationList, children: [
1064
1063
  R == null ? void 0 : R.map((w) => {
1065
- var C;
1064
+ var I;
1066
1065
  return /* @__PURE__ */ h.jsx(
1067
1066
  Xi,
1068
1067
  {
@@ -1076,32 +1075,32 @@ function qi(e) {
1076
1075
  });
1077
1076
  },
1078
1077
  rule: w,
1079
- disable: (C = w.disable) != null ? C : !1
1078
+ disable: (I = w.disable) != null ? I : !1
1080
1079
  },
1081
1080
  w.uid
1082
1081
  );
1083
1082
  }),
1084
1083
  /* @__PURE__ */ h.jsxs("div", { className: ut.dataValidationListButtons, children: [
1085
- l.length && !v ? /* @__PURE__ */ h.jsx(Fe, { className: ut.dataValidationListButton, onClick: f, children: r.t("dataValidation.panel.removeAll") }) : null,
1086
- /* @__PURE__ */ h.jsx(Fe, { className: ut.dataValidationListButton, type: "primary", onClick: g, children: r.t("dataValidation.panel.add") })
1084
+ l.length && !v ? /* @__PURE__ */ h.jsx(je, { className: ut.dataValidationListButton, onClick: f, children: r.t("dataValidation.panel.removeAll") }) : null,
1085
+ /* @__PURE__ */ h.jsx(je, { className: ut.dataValidationListButton, type: "primary", onClick: g, children: r.t("dataValidation.panel.add") })
1087
1086
  ] })
1088
1087
  ] });
1089
1088
  }
1090
1089
  const Ji = () => {
1091
- const e = L(fe), t = Ue(e.activeRule$, e.activeRule);
1090
+ const e = L(fe), t = Ne(e.activeRule$, e.activeRule);
1092
1091
  return t ? /* @__PURE__ */ h.jsx($i, {}, t.rule.uid) : /* @__PURE__ */ h.jsx(Zi, {});
1093
- }, Vn = "data-validation.list.dropdown", Oo = "data-validation.date.dropdown", At = {
1092
+ }, yn = "data-validation.list.dropdown", Oo = "data-validation.date.dropdown", At = {
1094
1093
  type: Je.COMMAND,
1095
1094
  id: "data-validation.command.addRuleAndOpen",
1096
1095
  handler(e) {
1097
- const t = e.get(ge), o = Qn(t);
1096
+ const t = e.get(ge), o = eo(t);
1098
1097
  if (!o) return !1;
1099
- const { workbook: n, worksheet: a } = o, i = so(e), r = e.get(Q), l = n.getUnitId(), s = a.getSheetId(), c = {
1098
+ const { workbook: n, worksheet: a } = o, i = lo(e), r = e.get(Q), l = n.getUnitId(), s = a.getSheetId(), c = {
1100
1099
  rule: i,
1101
1100
  unitId: l,
1102
1101
  subUnitId: s
1103
1102
  };
1104
- return r.syncExecuteCommand(vn.id, c) ? (r.syncExecuteCommand(Be.id, {
1103
+ return r.syncExecuteCommand(_n.id, c) ? (r.syncExecuteCommand(Ue.id, {
1105
1104
  ruleId: i.uid,
1106
1105
  isAdd: !0
1107
1106
  }), !0) : !1;
@@ -1111,7 +1110,7 @@ var Qi = Object.defineProperty, er = Object.getOwnPropertyDescriptor, tr = (e, t
1111
1110
  for (var a = n > 1 ? void 0 : n ? er(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1112
1111
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1113
1112
  return n && a && Qi(t, o, a), a;
1114
- }, ke = (e, t) => (o, n) => t(o, n, e);
1113
+ }, $e = (e, t) => (o, n) => t(o, n, e);
1115
1114
  const Ee = "SHEET_DATA_VALIDATION_ALERT";
1116
1115
  let lt = class extends De {
1117
1116
  constructor(e, t, o, n, a, i) {
@@ -1121,7 +1120,7 @@ let lt = class extends De {
1121
1120
  this._initCellAlertPopup(), this._initZenService();
1122
1121
  }
1123
1122
  _initCellAlertPopup() {
1124
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(In(100)).subscribe((e) => {
1123
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(wn(100)).subscribe((e) => {
1125
1124
  var t;
1126
1125
  if (e) {
1127
1126
  const o = this._univerInstanceService.getUnit(e.location.unitId, Y.UNIVER_SHEET), n = o.getSheetBySheetId(e.location.subUnitId);
@@ -1164,12 +1163,12 @@ let lt = class extends De {
1164
1163
  }
1165
1164
  };
1166
1165
  lt = tr([
1167
- ke(0, b(ba)),
1168
- ke(1, b(Ea)),
1169
- ke(2, ge),
1170
- ke(3, b(J)),
1171
- ke(4, mo),
1172
- ke(5, b(oe))
1166
+ $e(0, b(ba)),
1167
+ $e(1, b(Ea)),
1168
+ $e(2, ge),
1169
+ $e(3, b(J)),
1170
+ $e(4, go),
1171
+ $e(5, b(oe))
1173
1172
  ], lt);
1174
1173
  var nr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, ar = (e, t, o, n) => {
1175
1174
  for (var a = n > 1 ? void 0 : n ? or(t, o) : t, i = e.length - 1, r; i >= 0; i--)
@@ -1186,8 +1185,8 @@ let ze = class extends De {
1186
1185
  const { source: i, target: r, unitId: l, subUnitId: s } = n, c = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = rn([i, r]), [p, d] = u.ranges, { mapFunc: g } = u, f = {
1187
1186
  row: p.startRow,
1188
1187
  col: p.startColumn
1189
- }, I = Pa(p, d), R = new _t(), v = /* @__PURE__ */ new Set();
1190
- I.forEach((S) => {
1188
+ }, C = Pa(p, d), R = new _t(), v = /* @__PURE__ */ new Set();
1189
+ C.forEach((S) => {
1191
1190
  const m = S.repeatStartCell, y = S.relativeRange, P = {
1192
1191
  startRow: f.row,
1193
1192
  startColumn: f.col,
@@ -1222,13 +1221,13 @@ let ze = class extends De {
1222
1221
  });
1223
1222
  const w = Array.from(v).map((S) => ({ id: S, ranges: Qt(R, (m) => m === S) }));
1224
1223
  c.addRangeRules(w);
1225
- const C = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: _ } = an(l, s, C, this._injector, "patched", a === tt.ONLY_FORMAT);
1224
+ const I = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: _ } = an(l, s, I, this._injector, "patched", a === tt.ONLY_FORMAT);
1226
1225
  return {
1227
1226
  undos: _,
1228
1227
  redos: V
1229
1228
  };
1230
1229
  }, o = {
1231
- id: lo,
1230
+ id: co,
1232
1231
  onBeforeFillData: (n) => {
1233
1232
  const { source: a, unitId: i, subUnitId: r } = n;
1234
1233
  for (const l of a.rows)
@@ -1250,7 +1249,7 @@ let ze = class extends De {
1250
1249
  ze = ar([
1251
1250
  Bt(0, La),
1252
1251
  Bt(1, b(oe)),
1253
- Bt(2, b(Ne))
1252
+ Bt(2, b(Fe))
1254
1253
  ], ze);
1255
1254
  var ir = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, sr = (e, t, o, n) => {
1256
1255
  for (var a = n > 1 ? void 0 : n ? rr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
@@ -1265,10 +1264,10 @@ let Ke = class extends De {
1265
1264
  }
1266
1265
  _initCopyPaste() {
1267
1266
  this._sheetClipboardService.addClipboardHook({
1268
- id: lo,
1267
+ id: co,
1269
1268
  onBeforeCopy: (t, o, n) => this._collect(t, o, n),
1270
1269
  onPasteCells: (t, o, n, a) => {
1271
- const { copyType: i = Ln.COPY, pasteType: r } = a, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = o;
1270
+ const { copyType: i = Pn.COPY, pasteType: r } = a, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = o;
1272
1271
  return this._generateMutations(s, { copyType: i, pasteType: r, copyRange: l, unitId: c, subUnitId: u });
1273
1272
  }
1274
1273
  });
@@ -1295,7 +1294,7 @@ let Ke = class extends De {
1295
1294
  _generateMutations(t, o) {
1296
1295
  if (!this._copyInfo)
1297
1296
  return { redos: [], undos: [] };
1298
- if (o.copyType === Ln.CUT)
1297
+ if (o.copyType === Pn.CUT)
1299
1298
  return this._copyInfo = null, { redos: [], undos: [] };
1300
1299
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !o.copyRange)
1301
1300
  return { redos: [], undos: [] };
@@ -1308,14 +1307,14 @@ let Ke = class extends De {
1308
1307
  return { redos: [], undos: [] };
1309
1308
  const { unitId: a, subUnitId: i } = this._copyInfo;
1310
1309
  if (o.unitId !== a || i !== o.subUnitId) {
1311
- const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), l = new _t(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: p } = rn([o.copyRange, t]), d = Pn(c, u, !0), g = /* @__PURE__ */ new Map();
1310
+ const r = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), l = new _t(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: p } = rn([o.copyRange, t]), d = Tn(c, u, !0), g = /* @__PURE__ */ new Map();
1312
1311
  d.forEach(({ startRange: v }) => {
1313
1312
  var w;
1314
- (w = this._copyInfo) == null || w.matrix.forValue((C, V, _) => {
1313
+ (w = this._copyInfo) == null || w.matrix.forValue((I, V, _) => {
1315
1314
  const S = St.getPositionRange(
1316
1315
  {
1317
- startRow: C,
1318
- endRow: C,
1316
+ startRow: I,
1317
+ endRow: I,
1319
1318
  startColumn: V,
1320
1319
  endColumn: V
1321
1320
  },
@@ -1328,7 +1327,7 @@ let Ke = class extends De {
1328
1327
  });
1329
1328
  const f = Array.from(s).map((v) => ({ id: v, ranges: Qt(l, (w) => w === v) }));
1330
1329
  r.addRangeRules(f);
1331
- const { redoMutations: I, undoMutations: R } = an(
1330
+ const { redoMutations: C, undoMutations: R } = an(
1332
1331
  o.unitId,
1333
1332
  o.subUnitId,
1334
1333
  r.diffWithAddition(this._sheetDataValidationModel.getRules(o.unitId, o.subUnitId), g.values()),
@@ -1337,20 +1336,20 @@ let Ke = class extends De {
1337
1336
  !1
1338
1337
  );
1339
1338
  return {
1340
- redos: I,
1339
+ redos: C,
1341
1340
  undos: R
1342
1341
  };
1343
1342
  } else {
1344
1343
  const r = this._sheetDataValidationModel.getRuleObjectMatrix(a, i).clone(), l = new _t(), s = /* @__PURE__ */ new Set(), { ranges: [c, u], mapFunc: p } = rn([o.copyRange, t]);
1345
- Pn(c, u, !0).forEach(({ startRange: R }) => {
1344
+ Tn(c, u, !0).forEach(({ startRange: R }) => {
1346
1345
  var v;
1347
- (v = this._copyInfo) == null || v.matrix.forValue((w, C, V) => {
1346
+ (v = this._copyInfo) == null || v.matrix.forValue((w, I, V) => {
1348
1347
  const _ = St.getPositionRange(
1349
1348
  {
1350
1349
  startRow: w,
1351
1350
  endRow: w,
1352
- startColumn: C,
1353
- endColumn: C
1351
+ startColumn: I,
1352
+ endColumn: I
1354
1353
  },
1355
1354
  R
1356
1355
  ), { row: S, col: m } = p(_.startRow, _.startColumn);
@@ -1359,7 +1358,7 @@ let Ke = class extends De {
1359
1358
  });
1360
1359
  const g = Array.from(s).map((R) => ({ id: R, ranges: Qt(l, (v) => v === R) }));
1361
1360
  r.addRangeRules(g);
1362
- const { redoMutations: f, undoMutations: I } = an(
1361
+ const { redoMutations: f, undoMutations: C } = an(
1363
1362
  a,
1364
1363
  i,
1365
1364
  r.diff(this._sheetDataValidationModel.getRules(a, i)),
@@ -1369,7 +1368,7 @@ let Ke = class extends De {
1369
1368
  );
1370
1369
  return {
1371
1370
  redos: f,
1372
- undos: I
1371
+ undos: C
1373
1372
  };
1374
1373
  }
1375
1374
  }
@@ -1377,7 +1376,7 @@ let Ke = class extends De {
1377
1376
  Ke = sr([
1378
1377
  $t(0, Aa),
1379
1378
  $t(1, b(oe)),
1380
- $t(2, b(Ne))
1379
+ $t(2, b(Fe))
1381
1380
  ], Ke);
1382
1381
  var lr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, cr = (e, t, o, n) => {
1383
1382
  for (var a = n > 1 ? void 0 : n ? dr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
@@ -1391,11 +1390,11 @@ let Ge = class extends De {
1391
1390
  _commandExecutedListener() {
1392
1391
  this.disposeWithMe(
1393
1392
  this._commandService.beforeCommandExecuted((e) => {
1394
- e.id === vn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1393
+ e.id === _n.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1395
1394
  workbookTypes: [Ct],
1396
1395
  rangeTypes: [It],
1397
1396
  worksheetTypes: [wt, on]
1398
- }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === io.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1397
+ }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === ro.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1399
1398
  workbookTypes: [Ct],
1400
1399
  rangeTypes: [It],
1401
1400
  worksheetTypes: [wt, on]
@@ -1407,13 +1406,13 @@ let Ge = class extends De {
1407
1406
  Ge = cr([
1408
1407
  kt(0, b(J)),
1409
1408
  kt(1, Q),
1410
- kt(2, b(eo))
1409
+ kt(2, b(to))
1411
1410
  ], Ge);
1412
1411
  const Lo = "data-validation-single", Po = "sheet.menu.data-validation";
1413
1412
  function ur(e) {
1414
1413
  return {
1415
1414
  id: Po,
1416
- type: Sn.SUBITEMS,
1415
+ type: Cn.SUBITEMS,
1417
1416
  icon: Lo,
1418
1417
  tooltip: "dataValidation.title",
1419
1418
  hidden$: Na(e, Y.UNIVER_SHEET),
@@ -1422,16 +1421,16 @@ function ur(e) {
1422
1421
  }
1423
1422
  function hr(e) {
1424
1423
  return {
1425
- id: Be.id,
1424
+ id: Ue.id,
1426
1425
  title: "dataValidation.panel.title",
1427
- type: Sn.BUTTON
1426
+ type: Cn.BUTTON
1428
1427
  };
1429
1428
  }
1430
1429
  function pr(e) {
1431
1430
  return {
1432
1431
  id: At.id,
1433
1432
  title: "dataValidation.panel.add",
1434
- type: Sn.BUTTON
1433
+ type: Cn.BUTTON
1435
1434
  };
1436
1435
  }
1437
1436
  const fr = {
@@ -1439,7 +1438,7 @@ const fr = {
1439
1438
  [Po]: {
1440
1439
  order: 9,
1441
1440
  menuItemFactory: ur,
1442
- [Be.id]: {
1441
+ [Ue.id]: {
1443
1442
  order: 0,
1444
1443
  menuItemFactory: hr
1445
1444
  },
@@ -1461,7 +1460,7 @@ const Ao = {
1461
1460
  color: "#fe4b4b"
1462
1461
  }
1463
1462
  };
1464
- let Ze = class extends pn {
1463
+ let Ze = class extends fn {
1465
1464
  constructor(e, t, o, n, a, i, r, l, s, c, u) {
1466
1465
  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();
1467
1466
  }
@@ -1515,14 +1514,14 @@ let Ze = class extends pn {
1515
1514
  _initViewModelIntercept() {
1516
1515
  this.disposeWithMe(
1517
1516
  this._sheetInterceptorService.intercept(
1518
- to.CELL_CONTENT,
1517
+ no.CELL_CONTENT,
1519
1518
  {
1520
- effect: zn.Style,
1519
+ effect: Kn.Style,
1521
1520
  // must be after numfmt
1522
- priority: no.DATA_VALIDATION,
1521
+ priority: oo.DATA_VALIDATION,
1523
1522
  // eslint-disable-next-line max-lines-per-function, complexity
1524
1523
  handler: (e, t, o) => {
1525
- var v, w, C, V, _;
1524
+ var v, w, I, V, _;
1526
1525
  const { row: n, col: a, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1527
1526
  if (!c)
1528
1527
  return o(e);
@@ -1531,7 +1530,7 @@ let Ze = class extends pn {
1531
1530
  return o(e);
1532
1531
  const p = (v = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? v : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), g = t.rawData;
1533
1532
  let f;
1534
- const I = {
1533
+ const C = {
1535
1534
  get value() {
1536
1535
  var S;
1537
1536
  return f !== void 0 || (f = (S = ie(g)) != null ? S : null), f;
@@ -1539,7 +1538,7 @@ let Ze = class extends pn {
1539
1538
  }, R = {
1540
1539
  get value() {
1541
1540
  var S;
1542
- return `${(S = I.value) != null ? S : ""}`;
1541
+ return `${(S = C.value) != null ? S : ""}`;
1543
1542
  }
1544
1543
  };
1545
1544
  return o({
@@ -1554,7 +1553,7 @@ let Ze = class extends pn {
1554
1553
  ],
1555
1554
  fontRenderExtension: {
1556
1555
  ...e == null ? void 0 : e.fontRenderExtension,
1557
- isSkip: ((C = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : C.isSkip) || ((V = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : V.call(d, u, I.value, t))
1556
+ isSkip: ((I = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : I.isSkip) || ((V = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : V.call(d, u, C.value, t))
1558
1557
  },
1559
1558
  interceptorStyle: {
1560
1559
  ...e == null ? void 0 : e.interceptorStyle,
@@ -1612,7 +1611,7 @@ let Ze = class extends pn {
1612
1611
  this._sheetDataValidationModel.ruleChange$.pipe(
1613
1612
  // patched data-validation change don't need to re-calc row height
1614
1613
  // re-calc of row height will be triggered precisely by the origin command
1615
- Cn((e) => e.source === "command"),
1614
+ In((e) => e.source === "command"),
1616
1615
  vo(100)
1617
1616
  ).subscribe((e) => {
1618
1617
  if (e.length === 0)
@@ -1623,7 +1622,7 @@ let Ze = class extends pn {
1623
1622
  (o.rule.type === z.LIST_MULTIPLE || o.rule.type === z.LIST) && (n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
1624
1623
  }), t.length) {
1625
1624
  const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1626
- Kn(o.redos, this._commandService);
1625
+ Gn(o.redos, this._commandService);
1627
1626
  }
1628
1627
  });
1629
1628
  }
@@ -1633,36 +1632,36 @@ Ze = To([
1633
1632
  G(1, Ba),
1634
1633
  G(2, Ve),
1635
1634
  G(3, ge),
1636
- G(4, b(po)),
1635
+ G(4, b(fo)),
1637
1636
  G(5, b(Ie)),
1638
1637
  G(6, b(oe)),
1639
1638
  G(7, b(ye)),
1640
- G(8, b(mn)),
1641
- G(9, b(co)),
1642
- G(10, ea(ho))
1639
+ G(8, b(gn)),
1640
+ G(9, b(uo)),
1641
+ G(10, ea(po))
1643
1642
  ], Ze);
1644
- let Bn = class extends pn {
1643
+ let $n = class extends fn {
1645
1644
  constructor(e, t, o, n, a, i, r) {
1646
1645
  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();
1647
1646
  }
1648
1647
  _initViewModelIntercept() {
1649
1648
  this.disposeWithMe(
1650
1649
  this._sheetInterceptorService.intercept(
1651
- to.CELL_CONTENT,
1650
+ no.CELL_CONTENT,
1652
1651
  {
1653
- effect: zn.Style,
1652
+ effect: Kn.Style,
1654
1653
  // must be after numfmt
1655
- priority: no.DATA_VALIDATION,
1654
+ priority: oo.DATA_VALIDATION,
1656
1655
  // eslint-disable-next-line complexity
1657
1656
  handler: (e, t, o) => {
1658
- var R, v, w, C, V;
1657
+ var R, v, w, I, V;
1659
1658
  const { row: n, col: a, unitId: i, subUnitId: r, workbook: l, worksheet: s } = t, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, a);
1660
1659
  if (!c)
1661
1660
  return o(e);
1662
1661
  const u = this._sheetDataValidationModel.getRuleById(i, r, c);
1663
1662
  if (!u)
1664
1663
  return o(e);
1665
- const p = (R = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? R : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), g = s.getCellRaw(n, a), f = ie(g), I = `${f != null ? f : ""}`;
1664
+ const p = (R = this._dataValidationCacheService.getValue(i, r, n, a)) != null ? R : rt.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), g = s.getCellRaw(n, a), f = ie(g), C = `${f != null ? f : ""}`;
1666
1665
  return o({
1667
1666
  ...e,
1668
1667
  markers: {
@@ -1675,11 +1674,11 @@ let Bn = class extends pn {
1675
1674
  ],
1676
1675
  fontRenderExtension: {
1677
1676
  ...e == null ? void 0 : e.fontRenderExtension,
1678
- isSkip: ((w = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : w.isSkip) || ((C = d == null ? void 0 : d.skipDefaultFontRender) == null ? void 0 : C.call(d, u, f, t))
1677
+ 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, f, t))
1679
1678
  },
1680
1679
  interceptorStyle: {
1681
1680
  ...e == null ? void 0 : e.interceptorStyle,
1682
- ...d == null ? void 0 : d.getExtraStyle(u, I, {
1681
+ ...d == null ? void 0 : d.getExtraStyle(u, C, {
1683
1682
  get style() {
1684
1683
  const _ = l.getStyles();
1685
1684
  return (typeof (e == null ? void 0 : e.s) == "string" ? _.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
@@ -1713,7 +1712,7 @@ let Bn = class extends pn {
1713
1712
  }
1714
1713
  _initAutoHeight() {
1715
1714
  this._sheetDataValidationModel.ruleChange$.pipe(
1716
- Cn((e) => e.source === "command"),
1715
+ In((e) => e.source === "command"),
1717
1716
  vo(16)
1718
1717
  ).subscribe((e) => {
1719
1718
  const t = [];
@@ -1722,25 +1721,25 @@ let Bn = class extends pn {
1722
1721
  (n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
1723
1722
  }), t.length) {
1724
1723
  const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
1725
- Kn(o.redos, this._commandService);
1724
+ Gn(o.redos, this._commandService);
1726
1725
  }
1727
1726
  });
1728
1727
  }
1729
1728
  };
1730
- Bn = To([
1729
+ $n = To([
1731
1730
  G(0, Q),
1732
1731
  G(1, Ve),
1733
- G(2, b(po)),
1732
+ G(2, b(fo)),
1734
1733
  G(3, b(ye)),
1735
- G(4, b(mn)),
1734
+ G(4, b(gn)),
1736
1735
  G(5, b(oe)),
1737
- G(6, b(co))
1738
- ], Bn);
1736
+ G(6, b(uo))
1737
+ ], $n);
1739
1738
  var vr = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, Sr = (e, t, o, n) => {
1740
1739
  for (var a = n > 1 ? void 0 : n ? _r(t, o) : t, i = e.length - 1, r; i >= 0; i--)
1741
1740
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
1742
1741
  return n && a && vr(t, o, a), a;
1743
- }, $n = (e, t) => (o, n) => t(o, n, e);
1742
+ }, kn = (e, t) => (o, n) => t(o, n, e);
1744
1743
  let yt = class extends De {
1745
1744
  constructor(e, t, o) {
1746
1745
  super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = o, this._initSkeletonChange();
@@ -1762,8 +1761,8 @@ let yt = class extends De {
1762
1761
  }
1763
1762
  };
1764
1763
  yt = Sr([
1765
- $n(1, b(oe)),
1766
- $n(2, b(Rt))
1764
+ kn(1, b(oe)),
1765
+ kn(2, b(Rt))
1767
1766
  ], yt);
1768
1767
  const Cr = "univer-data-validation-formula", Ir = "univer-data-validation-formula-and", wr = "univer-data-validation-formula-list-item", Rr = "univer-data-validation-formula-list-item-icon", Dr = "univer-data-validation-formula-list-item-drag", Vr = "univer-data-validation-formula-list-add", yr = "univer-data-validation-formula-color-select", Mr = "univer-data-validation-formula-color-select-panel", br = "univer-data-validation-formula-color-item", ne = {
1769
1768
  dataValidationFormula: Cr,
@@ -1779,7 +1778,7 @@ const Cr = "univer-data-validation-formula", Ir = "univer-data-validation-formul
1779
1778
  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 : "";
1780
1779
  return t ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
1781
1780
  /* @__PURE__ */ h.jsx(Z, { error: l, children: /* @__PURE__ */ h.jsx(
1782
- je,
1781
+ xe,
1783
1782
  {
1784
1783
  className: ne.dataValidationFormula,
1785
1784
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
@@ -1794,7 +1793,7 @@ const Cr = "univer-data-validation-formula", Ir = "univer-data-validation-formul
1794
1793
  ) }),
1795
1794
  /* @__PURE__ */ h.jsx("div", { className: ne.dataValidationFormulaAnd, children: r.t("dataValidation.panel.formulaAnd") }),
1796
1795
  /* @__PURE__ */ h.jsx(Z, { error: s, children: /* @__PURE__ */ h.jsx(
1797
- je,
1796
+ xe,
1798
1797
  {
1799
1798
  className: ne.dataValidationFormula,
1800
1799
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
@@ -1808,7 +1807,7 @@ const Cr = "univer-data-validation-formula", Ir = "univer-data-validation-formul
1808
1807
  }
1809
1808
  ) })
1810
1809
  ] }) : /* @__PURE__ */ h.jsx(Z, { error: l, children: /* @__PURE__ */ h.jsx(
1811
- je,
1810
+ xe,
1812
1811
  {
1813
1812
  className: ne.dataValidationFormula,
1814
1813
  placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
@@ -1837,7 +1836,7 @@ function Or(e) {
1837
1836
  }
1838
1837
  ) }),
1839
1838
  s ? /* @__PURE__ */ h.jsx(Z, { label: i.t("dataValidation.checkbox.checked"), error: r, children: /* @__PURE__ */ h.jsx(
1840
- je,
1839
+ xe,
1841
1840
  {
1842
1841
  className: ne.dataValidationFormula,
1843
1842
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
@@ -1851,7 +1850,7 @@ function Or(e) {
1851
1850
  }
1852
1851
  ) }) : null,
1853
1852
  s ? /* @__PURE__ */ h.jsx(Z, { label: i.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ h.jsx(
1854
- je,
1853
+ xe,
1855
1854
  {
1856
1855
  className: ne.dataValidationFormula,
1857
1856
  placeholder: i.t("dataValidation.panel.valuePlaceholder"),
@@ -1868,15 +1867,15 @@ function Or(e) {
1868
1867
  }
1869
1868
  function Lr(e) {
1870
1869
  var p;
1871
- 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 = He({}), [c, u] = W(!1);
1872
- return _n((d) => {
1870
+ 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] = W(!1);
1871
+ return Sn((d) => {
1873
1872
  var f;
1874
1873
  const g = (f = s.current) == null ? void 0 : f.handleOutClick;
1875
1874
  g && g(d, () => u(!1));
1876
1875
  }), /* @__PURE__ */ h.jsx(
1877
1876
  So,
1878
1877
  {
1879
- initValue: (p = n == null ? void 0 : n.formula1) != null ? p : "",
1878
+ initValue: (p = n == null ? void 0 : n.formula1) != null ? p : "=",
1880
1879
  unitId: t,
1881
1880
  subUnitId: o,
1882
1881
  isFocus: c,
@@ -1967,7 +1966,7 @@ const Tr = [
1967
1966
  ) })
1968
1967
  }
1969
1968
  );
1970
- }, kn = (e) => {
1969
+ }, Wn = (e) => {
1971
1970
  const { item: t, commonProps: o, style: n } = e, { onItemChange: a, onItemDelete: i } = o;
1972
1971
  return /* @__PURE__ */ h.jsxs("div", { className: ne.dataValidationFormulaListItem, style: n, children: [
1973
1972
  t.isRef ? null : /* @__PURE__ */ h.jsx("div", { className: Pr(ne.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ h.jsx(yo, {}) }),
@@ -1981,7 +1980,7 @@ const Tr = [
1981
1980
  }
1982
1981
  ),
1983
1982
  /* @__PURE__ */ h.jsx(
1984
- je,
1983
+ xe,
1985
1984
  {
1986
1985
  disabled: t.isRef,
1987
1986
  value: t.label,
@@ -1990,28 +1989,28 @@ const Tr = [
1990
1989
  }
1991
1990
  }
1992
1991
  ),
1993
- t.isRef ? null : /* @__PURE__ */ h.jsx("div", { className: ne.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ h.jsx(wn, { onClick: () => i(t.id) }) })
1992
+ t.isRef ? null : /* @__PURE__ */ h.jsx("div", { className: ne.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ h.jsx(Rn, { onClick: () => i(t.id) }) })
1994
1993
  ] });
1995
1994
  };
1996
1995
  function xr(e) {
1997
1996
  const { value: t, onChange: o = () => {
1998
- }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = He(null), [p, d] = W(() => Pe(s) ? "1" : "0"), [g, f] = W(p === "1" ? s : "="), [I, R] = W(p === "1" ? s : "="), v = L(J), w = L(ye), C = L(Pt), V = L(Ca), [_, S] = W(() => c.split(",")), m = w.getValidatorItem(z.LIST), [y, P] = W([]), [F, T] = W(""), E = r ? i == null ? void 0 : i.formula1 : "", A = Ae(() => C.ruleChange$.pipe(In(16)), []), x = Ue(A), j = go(o);
1997
+ }, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = We(null), [p, d] = W(() => Pe(s) ? "1" : "0"), [g, f] = W(p === "1" ? s : "="), [C, R] = W(p === "1" ? s : "="), v = L(J), w = L(ye), I = L(Pt), V = L(Ca), [_, S] = W(() => c.split(",")), m = w.getValidatorItem(z.LIST), [y, P] = W([]), [F, T] = W(""), E = r ? i == null ? void 0 : i.formula1 : "", A = He(() => I.ruleChange$.pipe(wn(16)), []), x = Ne(A), j = ln(o);
1999
1998
  Ce(() => {
2000
1999
  (async () => {
2001
2000
  await new Promise((B) => {
2002
2001
  setTimeout(() => B(!0), 100);
2003
2002
  });
2004
- const D = C.getRuleById(n, a, l), U = D == null ? void 0 : D.formula1;
2003
+ const D = I.getRuleById(n, a, l), U = D == null ? void 0 : D.formula1;
2005
2004
  if (Pe(U) && m && D) {
2006
2005
  const B = await m.getListAsync(D, n, a);
2007
2006
  P(B);
2008
2007
  }
2009
2008
  })();
2010
- }, [C, x, m, l, a, n]), Ce(() => {
2011
- Pe(s) && s !== I && (f(s), R(I));
2012
- }, [I, s]);
2009
+ }, [I, x, m, l, a, n]), Ce(() => {
2010
+ Pe(s) && s !== C && (f(s), R(C));
2011
+ }, [C, s]);
2013
2012
  const [N, H] = W(() => {
2014
- const D = p !== "1" ? oo(s) : [], U = c.split(",");
2013
+ const D = p !== "1" ? ao(s) : [], U = c.split(",");
2015
2014
  return D.map((B, $) => ({
2016
2015
  label: B,
2017
2016
  color: U[$] || Te,
@@ -2024,7 +2023,7 @@ function xr(e) {
2024
2023
  }, k = (D) => {
2025
2024
  const U = N.findIndex((B) => B.id === D);
2026
2025
  U !== -1 && (N.splice(U, 1), H([...N]));
2027
- }, K = c.split(","), q = Ae(() => y.map((D, U) => ({
2026
+ }, K = c.split(","), q = He(() => y.map((D, U) => ({
2028
2027
  label: D,
2029
2028
  color: K[U] || Te,
2030
2029
  id: `${U}`,
@@ -2061,47 +2060,44 @@ function xr(e) {
2061
2060
  }));
2062
2061
  });
2063
2062
  }), j({
2064
- formula1: ao(U.map((B) => B.label)),
2063
+ formula1: io(U.map((B) => B.label)),
2065
2064
  formula2: U.map((B) => B.color === Te ? "" : B.color).join(",")
2066
2065
  });
2067
- }, [N, j, p, I, _]);
2068
- const re = Ae(
2069
- () => async (D) => {
2070
- if (!Pe(D)) {
2071
- j == null || j({
2072
- formula1: "",
2073
- formula2: c
2074
- });
2075
- return;
2076
- }
2077
- V.getFormulaRefCheck(D) ? (j == null || j({
2078
- formula1: Pe(D) ? D : "",
2079
- formula2: c
2080
- }), T("")) : (j == null || j({
2066
+ }, [N, j, p, C, _]);
2067
+ const re = ln(async (D) => {
2068
+ if (!Pe(D)) {
2069
+ j == null || j({
2081
2070
  formula1: "",
2082
2071
  formula2: c
2083
- }), f("="), T(v.t("dataValidation.validFail.formulaError")));
2084
- },
2085
- [c, j]
2086
- ), ae = He({}), [se, O] = W(!1);
2087
- return _n((D) => {
2072
+ });
2073
+ return;
2074
+ }
2075
+ V.getFormulaRefCheck(D) ? (j == null || j({
2076
+ formula1: Pe(D) ? D : "",
2077
+ formula2: c
2078
+ }), T("")) : (j == null || j({
2079
+ formula1: "",
2080
+ formula2: c
2081
+ }), f("="), T(v.t("dataValidation.validFail.formulaError")));
2082
+ }), ae = We({}), [se, O] = W(!1);
2083
+ return Sn((D) => {
2088
2084
  var B;
2089
2085
  const U = (B = ae.current) == null ? void 0 : B.handleOutClick;
2090
2086
  U && U(D, () => O(!1));
2091
2087
  }), /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
2092
2088
  /* @__PURE__ */ h.jsx(Z, { label: v.t("dataValidation.list.options"), children: /* @__PURE__ */ h.jsxs(
2093
- fn,
2089
+ mn,
2094
2090
  {
2095
2091
  value: p,
2096
2092
  onChange: (D) => {
2097
- d(D), f(I), D === "1" && j({
2098
- formula1: I === "=" ? "" : I,
2093
+ d(D), f(C), D === "1" && j({
2094
+ formula1: C === "=" ? "" : C,
2099
2095
  formula2: _.join(",")
2100
2096
  });
2101
2097
  },
2102
2098
  children: [
2103
- /* @__PURE__ */ h.jsx(xe, { value: "0", children: v.t("dataValidation.list.customOptions") }),
2104
- /* @__PURE__ */ h.jsx(xe, { value: "1", children: v.t("dataValidation.list.refOptions") })
2099
+ /* @__PURE__ */ h.jsx(Ae, { value: "0", children: v.t("dataValidation.list.customOptions") }),
2100
+ /* @__PURE__ */ h.jsx(Ae, { value: "1", children: v.t("dataValidation.list.refOptions") })
2105
2101
  ]
2106
2102
  }
2107
2103
  ) }),
@@ -2123,7 +2119,7 @@ function xr(e) {
2123
2119
  isSupportAcrossSheet: !0
2124
2120
  }
2125
2121
  ),
2126
- /* @__PURE__ */ h.jsx("div", { ref: u, style: { marginTop: "12px" }, children: q.map((D) => /* @__PURE__ */ h.jsx(kn, { item: D, commonProps: { onItemChange: ee }, style: { marginBottom: 12 } }, D.id)) })
2122
+ /* @__PURE__ */ h.jsx("div", { ref: u, style: { marginTop: "12px" }, children: q.map((D) => /* @__PURE__ */ h.jsx(Wn, { item: D, commonProps: { onItemChange: ee }, style: { marginBottom: 12 } }, D.id)) })
2127
2123
  ] }) : /* @__PURE__ */ h.jsx(Z, { error: E, children: /* @__PURE__ */ h.jsxs("div", { ref: u, style: { marginTop: "-12px" }, children: [
2128
2124
  /* @__PURE__ */ h.jsx(
2129
2125
  sa,
@@ -2134,7 +2130,7 @@ function xr(e) {
2134
2130
  margin: [0, 12],
2135
2131
  draggableHandle: ".draggableHandle",
2136
2132
  itemRender: (D) => /* @__PURE__ */ h.jsx(
2137
- kn,
2133
+ Wn,
2138
2134
  {
2139
2135
  item: D,
2140
2136
  commonProps: {
@@ -2154,7 +2150,7 @@ function xr(e) {
2154
2150
  ] }) })
2155
2151
  ] });
2156
2152
  }
2157
- const jo = "data-validation.custom-formula-input", xt = "data-validation.formula-input", yn = "data-validation.list-formula-input", Fo = "data-validation.checkbox-formula-input", jr = [
2153
+ const jo = "data-validation.custom-formula-input", xt = "data-validation.formula-input", Mn = "data-validation.list-formula-input", Fo = "data-validation.checkbox-formula-input", jr = [
2158
2154
  [
2159
2155
  jo,
2160
2156
  Lr
@@ -2164,7 +2160,7 @@ const jo = "data-validation.custom-formula-input", xt = "data-validation.formula
2164
2160
  Er
2165
2161
  ],
2166
2162
  [
2167
- yn,
2163
+ Mn,
2168
2164
  xr
2169
2165
  ],
2170
2166
  [
@@ -2175,10 +2171,10 @@ const jo = "data-validation.custom-formula-input", xt = "data-validation.formula
2175
2171
  function Mt(e) {
2176
2172
  var a;
2177
2173
  const { value: t, onChange: o } = e, n = L(J);
2178
- return /* @__PURE__ */ h.jsx(Z, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ h.jsxs(fn, { value: `${(a = t.renderMode) != null ? a : de.CUSTOM}`, onChange: (i) => o({ ...t, renderMode: +i }), children: [
2179
- /* @__PURE__ */ h.jsx(xe, { value: `${de.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2180
- /* @__PURE__ */ h.jsx(xe, { value: `${de.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2181
- /* @__PURE__ */ h.jsx(xe, { value: `${de.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2174
+ return /* @__PURE__ */ h.jsx(Z, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ h.jsxs(mn, { value: `${(a = t.renderMode) != null ? a : de.CUSTOM}`, onChange: (i) => o({ ...t, renderMode: +i }), children: [
2175
+ /* @__PURE__ */ h.jsx(Ae, { value: `${de.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2176
+ /* @__PURE__ */ h.jsx(Ae, { value: `${de.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2177
+ /* @__PURE__ */ h.jsx(Ae, { value: `${de.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2182
2178
  ] }) });
2183
2179
  }
2184
2180
  Mt.componentKey = Fr;
@@ -2210,7 +2206,7 @@ var Ur = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, $r = (e, t
2210
2206
  return n && a && Ur(t, o, a), a;
2211
2207
  }, at = (e, t) => (o, n) => t(o, n, e);
2212
2208
  const ht = 6;
2213
- let ln = class {
2209
+ let dn = class {
2214
2210
  constructor(e, t, o, n, a) {
2215
2211
  this._commandService = e, this._formulaService = t, this._themeService = o, this._renderManagerService = n, this._dataValidationModel = a;
2216
2212
  }
@@ -2258,10 +2254,10 @@ let ln = class {
2258
2254
  return ((o = t == null ? void 0 : t.fs) != null ? o : 10) * 1.6;
2259
2255
  }
2260
2256
  async _parseFormula(e, t, o) {
2261
- var c, u, p, d, g, f, I, R, v;
2262
- const { formula1: n = Ra, formula2: a = Da } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r = Ft((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 = Ft((f = (g = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : g[0]) == null ? void 0 : f[0]), s = On(String(r)) && On(String(l));
2257
+ var c, u, p, d, g, f, C, R, v;
2258
+ const { formula1: n = Ra, formula2: a = Da } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r = Ft((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 = Ft((f = (g = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : g[0]) == null ? void 0 : f[0]), s = Ln(String(r)) && Ln(String(l));
2263
2259
  return {
2264
- formula1: Pe(n) ? Ft((v = (R = (I = i == null ? void 0 : i[0]) == null ? void 0 : I.result) == null ? void 0 : R[0]) == null ? void 0 : v[0]) : n,
2260
+ formula1: Pe(n) ? Ft((v = (R = (C = i == null ? void 0 : i[0]) == null ? void 0 : C.result) == null ? void 0 : R[0]) == null ? void 0 : v[0]) : n,
2265
2261
  formula2: Pe(a) ? l : a,
2266
2262
  isFormulaValid: s
2267
2263
  };
@@ -2277,8 +2273,8 @@ let ln = class {
2277
2273
  const g = this._themeService.getCurrentTheme();
2278
2274
  if (!((E = d.skipDefaultFontRender) != null && E.call(d, p, u, { unitId: a, subUnitId: i, row: l, column: s })))
2279
2275
  return;
2280
- const f = d.parseFormulaSync(p, a, i), { formula1: I } = f, R = this._calc(c, o), { a: v, d: w } = e.getTransform(), C = bn(R.left, v), V = bn(R.top, w), _ = la.create().composeMatrix({
2281
- left: C,
2276
+ const f = d.parseFormulaSync(p, a, i), { formula1: C } = f, R = this._calc(c, o), { a: v, d: w } = e.getTransform(), I = En(R.left, v), V = En(R.top, w), _ = la.create().composeMatrix({
2277
+ left: I,
2282
2278
  top: V,
2283
2279
  scaleX: 1,
2284
2280
  scaleY: 1,
@@ -2291,7 +2287,7 @@ let ln = class {
2291
2287
  e.save(), e.beginPath(), e.rect(c.startX, c.startY, S, m), e.clip();
2292
2288
  const y = _.getMatrix();
2293
2289
  e.transform(y[0], y[1], y[2], y[3], y[4], y[5]);
2294
- const P = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, F = String(u) === String(I), T = g.hyacinth500;
2290
+ const P = ((A = o == null ? void 0 : o.fs) != null ? A : 10) * 1.6, F = String(u) === String(C), T = g.hyacinth500;
2295
2291
  da.drawWith(e, {
2296
2292
  checked: F,
2297
2293
  width: P,
@@ -2326,7 +2322,7 @@ let ln = class {
2326
2322
  }
2327
2323
  };
2328
2324
  this._commandService.executeCommand(
2329
- gn.id,
2325
+ vn.id,
2330
2326
  g
2331
2327
  );
2332
2328
  }
@@ -2339,13 +2335,13 @@ let ln = class {
2339
2335
  (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2340
2336
  }
2341
2337
  };
2342
- ln = $r([
2338
+ dn = $r([
2343
2339
  at(0, Q),
2344
2340
  at(1, b(Ia)),
2345
2341
  at(2, b(na)),
2346
2342
  at(3, b(Ve)),
2347
2343
  at(4, b(oe))
2348
- ], ln);
2344
+ ], dn);
2349
2345
  var kr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, Hr = (e, t, o, n) => {
2350
2346
  for (var a = n > 1 ? void 0 : n ? Wr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
2351
2347
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
@@ -2356,18 +2352,18 @@ let me = class {
2356
2352
  M(this, "canvasRender", null);
2357
2353
  M(this, "dropdown");
2358
2354
  M(this, "optionsInput");
2359
- M(this, "formulaInput", yn);
2355
+ M(this, "formulaInput", Mn);
2360
2356
  this.injector = e;
2361
2357
  }
2362
2358
  };
2363
2359
  me = Hr([
2364
- Yr(0, b(Ne))
2360
+ Yr(0, b(Fe))
2365
2361
  ], me);
2366
2362
  class Xr extends me {
2367
2363
  constructor() {
2368
2364
  super(...arguments);
2369
2365
  M(this, "id", z.CHECKBOX);
2370
- M(this, "canvasRender", this.injector.createInstance(ln));
2366
+ M(this, "canvasRender", this.injector.createInstance(dn));
2371
2367
  M(this, "formulaInput", Fo);
2372
2368
  }
2373
2369
  }
@@ -2395,7 +2391,7 @@ class Zr extends me {
2395
2391
  M(this, "formulaInput", xt);
2396
2392
  }
2397
2393
  }
2398
- const No = 4, qr = 0, Wt = 4, Uo = 4, dn = 6, Et = 6, Le = 14;
2394
+ const No = 4, qr = 0, Wt = 4, Uo = 4, cn = 6, Et = 6, Le = 14;
2399
2395
  function Jr(e, t) {
2400
2396
  const o = ca.getTextSize(e, t), n = o.width + No * 2, { ba: a, bd: i } = o, r = a + i;
2401
2397
  return {
@@ -2405,17 +2401,17 @@ function Jr(e, t) {
2405
2401
  };
2406
2402
  }
2407
2403
  function Ht(e, t, o, n) {
2408
- const a = Le + dn * 2, i = o - a, r = n - Et * 2, l = e.map((d) => ({
2404
+ const a = Le + cn * 2, i = o - a, r = n - Et * 2, l = e.map((d) => ({
2409
2405
  layout: Jr(d, t),
2410
2406
  text: d
2411
2407
  }));
2412
2408
  let s;
2413
2409
  const c = [];
2414
2410
  l.forEach((d) => {
2415
- const { layout: g } = d, { width: f, height: I } = g;
2411
+ const { layout: g } = d, { width: f, height: C } = g;
2416
2412
  !s || s.width + f + Wt > i ? (s = {
2417
2413
  width: f,
2418
- height: I,
2414
+ height: C,
2419
2415
  items: [{
2420
2416
  ...d,
2421
2417
  left: 0
@@ -2441,7 +2437,7 @@ const Qr = 8;
2441
2437
  class es extends ua {
2442
2438
  static drawWith(t, o) {
2443
2439
  const { fontString: n, info: a, fill: i, color: r } = o, { layout: l, text: s } = a;
2444
- t.save(), qn.drawWith(t, {
2440
+ t.save(), Jn.drawWith(t, {
2445
2441
  width: l.width,
2446
2442
  height: l.height,
2447
2443
  radius: Qr,
@@ -2455,7 +2451,7 @@ var ts = Object.defineProperty, ns = Object.getOwnPropertyDescriptor, os = (e, t
2455
2451
  return n && a && ts(t, o, a), a;
2456
2452
  }, Yt = (e, t) => (o, n) => t(o, n, e);
2457
2453
  const as = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2458
- let cn = class {
2454
+ let un = class {
2459
2455
  constructor(e, t, o) {
2460
2456
  M(this, "zIndex");
2461
2457
  M(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
@@ -2484,19 +2480,19 @@ let cn = class {
2484
2480
  // eslint-disable-next-line max-lines-per-function
2485
2481
  drawWith(e, t, o, n) {
2486
2482
  var X, k;
2487
- 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: g = 0, topOffset: f = 0, downOffset: I = 0 } = p || {}, R = this._ensureMap(c), v = this._generateKey(i, r), w = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, r);
2483
+ 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: g = 0, topOffset: f = 0, downOffset: C = 0 } = p || {}, R = this._ensureMap(c), v = this._generateKey(i, r), w = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, r);
2488
2484
  if (!w)
2489
2485
  return;
2490
- const C = this._dataValidationModel.getValidator(w.type);
2491
- if (!C)
2486
+ const I = this._dataValidationModel.getValidator(w.type);
2487
+ if (!I)
2492
2488
  return;
2493
2489
  const V = {
2494
2490
  startX: u.startX + d,
2495
2491
  endX: u.endX - g,
2496
2492
  startY: u.startY + f,
2497
- endY: u.endY - I
2498
- }, _ = V.endX - V.startX, S = V.endY - V.startY, { cl: m } = l || {}, y = (X = typeof m == "object" ? m == null ? void 0 : m.rgb : m) != null ? X : "#000", P = jt(l != null ? l : void 0), { vt: F, ht: T } = l || {}, E = F != null ? F : ue.MIDDLE, A = (k = ie(s)) != null ? k : "", x = C.parseCellValue(A), j = C.getListWithColorMap(w), N = Ht(x, P, _, S);
2499
- this._drawDownIcon(e, V, _, S, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, _ - Le, S), e.clip(), e.translateWithPrecision(dn, Et);
2493
+ endY: u.endY - C
2494
+ }, _ = V.endX - V.startX, S = V.endY - V.startY, { cl: m } = l || {}, y = (X = typeof m == "object" ? m == null ? void 0 : m.rgb : m) != null ? X : "#000", P = jt(l != null ? l : void 0), { vt: F, ht: T } = l || {}, E = F != null ? F : ue.MIDDLE, A = (k = ie(s)) != null ? k : "", x = I.parseCellValue(A), j = I.getListWithColorMap(w), N = Ht(x, P, _, S);
2495
+ this._drawDownIcon(e, V, _, S, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, _ - Le, S), e.clip(), e.translateWithPrecision(cn, Et);
2500
2496
  let H = 0;
2501
2497
  switch (E) {
2502
2498
  case ue.MIDDLE:
@@ -2529,7 +2525,7 @@ let cn = class {
2529
2525
  }), e.restore(), R.set(v, {
2530
2526
  left: V.startX,
2531
2527
  top: V.startY,
2532
- width: N.contentWidth + dn + Le,
2528
+ width: N.contentWidth + cn + Le,
2533
2529
  height: N.contentHeight + Et * 2
2534
2530
  });
2535
2531
  }
@@ -2546,8 +2542,8 @@ let cn = class {
2546
2542
  const f = this._dataValidationModel.getValidator(g.type);
2547
2543
  if (!f)
2548
2544
  return;
2549
- const I = d.endX - d.startX, R = d.endY - d.startY, v = (_ = ie(n)) != null ? _ : "", w = f.parseCellValue(v), C = jt(o != null ? o : void 0);
2550
- return Ht(w, C, I, R).cellAutoHeight;
2545
+ const C = d.endX - d.startX, R = d.endY - d.startY, v = (_ = ie(n)) != null ? _ : "", w = f.parseCellValue(v), I = jt(o != null ? o : void 0);
2546
+ return Ht(w, I, C, R).cellAutoHeight;
2551
2547
  }
2552
2548
  calcCellAutoWidth(e) {
2553
2549
  var _;
@@ -2562,8 +2558,8 @@ let cn = class {
2562
2558
  const f = this._dataValidationModel.getValidator(g.type);
2563
2559
  if (!f)
2564
2560
  return;
2565
- const I = d.endX - d.startX, R = d.endY - d.startY, v = (_ = ie(n)) != null ? _ : "", w = f.parseCellValue(v), C = jt(o != null ? o : void 0);
2566
- return Ht(w, C, I, R).calcAutoWidth;
2561
+ const C = d.endX - d.startX, R = d.endY - d.startY, v = (_ = ie(n)) != null ? _ : "", w = f.parseCellValue(v), I = jt(o != null ? o : void 0);
2562
+ return Ht(w, I, C, R).calcAutoWidth;
2567
2563
  }
2568
2564
  isHit(e, t) {
2569
2565
  const { primaryWithCoord: o } = t, n = o.isMergedMainCell ? o.mergeInfo : o, { endX: a } = n, { x: i } = e;
@@ -2589,17 +2585,17 @@ let cn = class {
2589
2585
  (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2590
2586
  }
2591
2587
  };
2592
- cn = os([
2588
+ un = os([
2593
2589
  Yt(0, Q),
2594
2590
  Yt(1, b(Ve)),
2595
2591
  Yt(2, b(oe))
2596
- ], cn);
2592
+ ], un);
2597
2593
  class is extends me {
2598
2594
  constructor() {
2599
2595
  super(...arguments);
2600
2596
  M(this, "id", z.LIST_MULTIPLE);
2601
- M(this, "canvasRender", this.injector.createInstance(cn));
2602
- M(this, "dropdown", Vn);
2597
+ M(this, "canvasRender", this.injector.createInstance(un));
2598
+ M(this, "dropdown", yn);
2603
2599
  }
2604
2600
  }
2605
2601
  var rs = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, ls = (e, t, o, n) => {
@@ -2607,7 +2603,7 @@ var rs = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, ls = (e, t
2607
2603
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2608
2604
  return n && a && rs(t, o, a), a;
2609
2605
  }, pt = (e, t) => (o, n) => t(o, n, e);
2610
- const Oe = 4, ft = 4, he = 14, pe = 6, We = 4, Xt = 8, ds = "#565656", Wn = 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");
2606
+ const Oe = 4, ft = 4, he = 14, pe = 6, ke = 4, Xt = 8, ds = "#565656", Hn = 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
2607
  function cs(e, t) {
2612
2608
  const o = e.length;
2613
2609
  return {
@@ -2672,9 +2668,9 @@ function mt(e, t, o) {
2672
2668
  docViewModel: i
2673
2669
  };
2674
2670
  }
2675
- function Hn(e, t, o, n, a, i, r = !0) {
2671
+ function Yn(e, t, o, n, a, i, r = !0) {
2676
2672
  let l = 0;
2677
- const s = r ? We : 0;
2673
+ const s = r ? ke : 0;
2678
2674
  switch (a) {
2679
2675
  case ue.BOTTOM:
2680
2676
  l = t - n - s;
@@ -2686,7 +2682,7 @@ function Hn(e, t, o, n, a, i, r = !0) {
2686
2682
  l = s;
2687
2683
  break;
2688
2684
  }
2689
- l = Math.max(We, l);
2685
+ l = Math.max(ke, l);
2690
2686
  let c = 0;
2691
2687
  switch (i) {
2692
2688
  case Ye.CENTER:
@@ -2701,7 +2697,7 @@ function Hn(e, t, o, n, a, i, r = !0) {
2701
2697
  paddingTop: l
2702
2698
  };
2703
2699
  }
2704
- let un = class {
2700
+ let hn = class {
2705
2701
  constructor(e, t, o, n) {
2706
2702
  M(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2707
2703
  M(this, "zIndex");
@@ -2722,13 +2718,13 @@ let un = class {
2722
2718
  u = (n - ft) / 2;
2723
2719
  break;
2724
2720
  case ue.BOTTOM:
2725
- u = n - s - a - We + (a / 2 - ft / 2);
2721
+ u = n - s - a - ke + (a / 2 - ft / 2);
2726
2722
  break;
2727
2723
  default:
2728
- u = l + We + (a / 2 - ft / 2);
2724
+ u = l + ke + (a / 2 - ft / 2);
2729
2725
  break;
2730
2726
  }
2731
- e.save(), e.translateWithPrecision(t.startX + c, t.startY + u), e.fillStyle = "#565656", e.fill(Wn), e.restore();
2727
+ e.save(), e.translateWithPrecision(t.startX + c, t.startY + u), e.fillStyle = "#565656", e.fill(Hn), e.restore();
2732
2728
  }
2733
2729
  // eslint-disable-next-line max-lines-per-function, complexity
2734
2730
  drawWith(e, t, o) {
@@ -2738,39 +2734,39 @@ let un = class {
2738
2734
  const p = this._dataValidationModel.getValidator(u.type);
2739
2735
  if (!p)
2740
2736
  return;
2741
- const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: g = 0, rightOffset: f = 0, topOffset: I = 0, downOffset: R = 0 } = d || {};
2737
+ const d = l == null ? void 0 : l.fontRenderExtension, { leftOffset: g = 0, rightOffset: f = 0, topOffset: C = 0, downOffset: R = 0 } = d || {};
2742
2738
  if (!u || !p || !p || p.id.indexOf(z.LIST) !== 0 || !p.skipDefaultFontRender(u))
2743
2739
  return;
2744
2740
  const v = {
2745
2741
  startX: c.startX + g,
2746
2742
  endX: c.endX - f,
2747
- startY: c.startY + I,
2743
+ startY: c.startY + C,
2748
2744
  endY: c.endY - R
2749
- }, w = v.endX - v.startX, C = v.endY - v.startY, V = this._ensureMap(s), _ = this._generateKey(a, i), S = p.getListWithColor(u), m = ie(l), y = `${m != null ? m : ""}`, P = S.find((x) => x.label === y);
2745
+ }, w = v.endX - v.startX, I = v.endY - v.startY, V = this._ensureMap(s), _ = this._generateKey(a, i), S = p.getListWithColor(u), m = ie(l), y = `${m != null ? m : ""}`, P = S.find((x) => x.label === y);
2750
2746
  let { tb: F, vt: T, ht: E, pd: A } = r || {};
2751
2747
  if (F = F != null ? F : Se.WRAP, T = T != null ? T : ue.BOTTOM, E = E != null ? E : le.ht, A = A != null ? A : le.pd, u.renderMode === de.ARROW) {
2752
2748
  const { l: x = le.pd.l, t: j = le.pd.t, r: N = le.pd.r, b: H = le.pd.b } = A, X = w - x - N - he - 4, { documentSkeleton: k, documents: K, docModel: q } = mt(y, this._localeService, r);
2753
2749
  F === Se.WRAP && q.updateDocumentDataPageSize(Math.max(X, 1)), k.calculate(), k.getActualSize();
2754
- const ee = et(k), { height: te, width: re } = ee, { paddingTop: ae, paddingLeft: se } = Hn(X, C - j - H, re, te, T, E, !0);
2755
- this._drawDownIcon(e, v, w, C, te, T, A), e.save(), e.translateWithPrecision(v.startX + x, v.startY + j), e.beginPath(), e.rect(0, 0, w - x - N, C - j - H), e.clip(), e.translateWithPrecision(0, ae), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, X, te), e.clip(), K.render(e), e.translateWithPrecision(se, 0), e.restore(), e.restore(), V.set(_, {
2750
+ const ee = et(k), { height: te, width: re } = ee, { paddingTop: ae, paddingLeft: se } = Yn(X, I - j - H, re, te, T, E, !0);
2751
+ this._drawDownIcon(e, v, w, I, te, T, A), e.save(), e.translateWithPrecision(v.startX + x, v.startY + j), e.beginPath(), e.rect(0, 0, w - x - N, I - j - H), e.clip(), e.translateWithPrecision(0, ae), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, X, te), e.clip(), K.render(e), e.translateWithPrecision(se, 0), e.restore(), e.restore(), V.set(_, {
2756
2752
  left: v.endX + x + o.rowHeaderWidth - he,
2757
2753
  top: v.startY + j + o.columnHeaderHeight,
2758
2754
  width: he,
2759
- height: C - j - H
2755
+ height: I - j - H
2760
2756
  });
2761
2757
  } else {
2762
- e.save(), e.translateWithPrecision(v.startX, v.startY), e.beginPath(), e.rect(0, 0, w, C), e.clip();
2758
+ e.save(), e.translateWithPrecision(v.startX, v.startY), e.beginPath(), e.rect(0, 0, w, I), e.clip();
2763
2759
  const x = w - pe * 2 - Oe - he - 4, { documentSkeleton: j, documents: N, docModel: H } = mt(y, this._localeService, r);
2764
2760
  F === Se.WRAP && H.updateDocumentDataPageSize(Math.max(x, 1)), j.calculate();
2765
- const X = et(j), { height: k, width: K } = X, { paddingTop: q, paddingLeft: ee } = Hn(x, C, K, k, T, E);
2761
+ const X = et(j), { height: k, width: K } = X, { paddingTop: q, paddingLeft: ee } = Yn(x, I, K, k, T, E);
2766
2762
  e.translateWithPrecision(pe, q);
2767
2763
  const te = Math.max(w - pe * 2, 1), re = k;
2768
- qn.drawWith(e, {
2764
+ Jn.drawWith(e, {
2769
2765
  width: te,
2770
2766
  height: re,
2771
2767
  fill: (P == null ? void 0 : P.color) || Te,
2772
2768
  radius: Xt
2773
- }), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, x, k), e.clip(), e.translateWithPrecision(ee, 0), N.render(e), e.restore(), e.translateWithPrecision(x + Oe + 4, (k - ft) / 2), e.fillStyle = ds, e.fill(Wn), e.restore(), V.set(_, {
2769
+ }), e.save(), e.translateWithPrecision(Oe, 0), e.beginPath(), e.rect(0, 0, x, k), e.clip(), e.translateWithPrecision(ee, 0), N.render(e), e.restore(), e.translateWithPrecision(x + Oe + 4, (k - ft) / 2), e.fillStyle = ds, e.fill(Hn), e.restore(), V.set(_, {
2774
2770
  left: v.startX + pe + o.rowHeaderWidth,
2775
2771
  top: v.startY + q + o.columnHeaderHeight,
2776
2772
  width: te,
@@ -2787,21 +2783,21 @@ let un = class {
2787
2783
  endX: r.endX - c,
2788
2784
  startY: r.startY + u,
2789
2785
  endY: r.endY - p
2790
- }, f = g.endX - g.startX, I = ie(n), R = `${I != null ? I : ""}`;
2786
+ }, f = g.endX - g.startX, C = ie(n), R = `${C != null ? C : ""}`;
2791
2787
  let { tb: v, pd: w } = o || {};
2792
- const { t: C = le.pd.t, b: V = le.pd.b } = w != null ? w : {};
2788
+ const { t: I = le.pd.t, b: V = le.pd.b } = w != null ? w : {};
2793
2789
  if (v = v != null ? v : Se.WRAP, d.renderMode === de.ARROW) {
2794
2790
  const _ = f - he, { documentSkeleton: S, docModel: m } = mt(R, this._localeService, o);
2795
2791
  v === Se.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate(), S.getActualSize();
2796
2792
  const y = et(S), { height: P } = y;
2797
- return P + C + V + We * 2;
2793
+ return P + I + V + ke * 2;
2798
2794
  } else {
2799
2795
  const _ = f - pe * 2 - Oe - he, { documentSkeleton: S, docModel: m } = Bo(R, this._localeService, o);
2800
2796
  v === Se.WRAP && m.updateDocumentDataPageSize(Math.max(_, 1)), S.calculate();
2801
2797
  const y = et(S), {
2802
2798
  height: P
2803
2799
  } = y;
2804
- return P + We * 2;
2800
+ return P + ke * 2;
2805
2801
  }
2806
2802
  }
2807
2803
  calcCellAutoWidth(e) {
@@ -2813,21 +2809,21 @@ let un = class {
2813
2809
  endX: r.endX - c,
2814
2810
  startY: r.startY + u,
2815
2811
  endY: r.endY - p
2816
- }, f = g.endX - g.startX, I = ie(n), R = `${I != null ? I : ""}`;
2812
+ }, f = g.endX - g.startX, C = ie(n), R = `${C != null ? C : ""}`;
2817
2813
  let { tb: v, pd: w } = o || {};
2818
- const { l: C = le.pd.l, r: V = le.pd.r } = w != null ? w : {};
2814
+ const { l: I = le.pd.l, r: V = le.pd.r } = w != null ? w : {};
2819
2815
  v = v != null ? v : Se.WRAP;
2820
2816
  let _ = pe * 2 + he;
2821
2817
  switch (d.renderMode) {
2822
2818
  case de.ARROW:
2823
- _ = he + pe * 2 + V + C;
2819
+ _ = he + pe * 2 + V + I;
2824
2820
  break;
2825
2821
  case de.CUSTOM:
2826
- _ = he + pe * 2 + Oe * 2 + V + C + Xt / 2 + 1;
2822
+ _ = he + pe * 2 + Oe * 2 + V + I + Xt / 2 + 1;
2827
2823
  break;
2828
2824
  // default is CUSTOM
2829
2825
  default:
2830
- _ = he + pe * 2 + Oe * 2 + V + C + Xt / 2 + 1;
2826
+ _ = he + pe * 2 + Oe * 2 + V + I + Xt / 2 + 1;
2831
2827
  }
2832
2828
  const S = f - _, { documentSkeleton: m, docModel: y } = mt(R, this._localeService, o);
2833
2829
  return v === Se.WRAP && y.updateDocumentDataPageSize(Math.max(S, 1)), m.calculate(), m.getActualSize(), et(m).width + _;
@@ -2859,20 +2855,20 @@ let un = class {
2859
2855
  (n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Xe.DEFAULT);
2860
2856
  }
2861
2857
  };
2862
- un = ls([
2858
+ hn = ls([
2863
2859
  pt(0, b(J)),
2864
2860
  pt(1, Q),
2865
2861
  pt(2, b(Ve)),
2866
2862
  pt(3, b(oe))
2867
- ], un);
2863
+ ], hn);
2868
2864
  class us extends me {
2869
2865
  constructor() {
2870
2866
  super(...arguments);
2871
2867
  M(this, "id", z.LIST);
2872
- M(this, "canvasRender", this.injector.createInstance(un));
2873
- M(this, "dropdown", Vn);
2868
+ M(this, "canvasRender", this.injector.createInstance(hn));
2869
+ M(this, "dropdown", yn);
2874
2870
  M(this, "optionsInput", Mt.componentKey);
2875
- M(this, "formulaInput", yn);
2871
+ M(this, "formulaInput", Mn);
2876
2872
  }
2877
2873
  }
2878
2874
  class hs extends me {
@@ -2894,7 +2890,7 @@ var fs = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, gs = (e, t
2894
2890
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
2895
2891
  return n && a && fs(t, o, a), a;
2896
2892
  }, zt = (e, t) => (o, n) => t(o, n, e);
2897
- let qe = class extends pn {
2893
+ let qe = class extends fn {
2898
2894
  constructor(e, t, o) {
2899
2895
  super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = o, this._initComponents(), this._registerValidatorViews();
2900
2896
  }
@@ -2903,7 +2899,7 @@ let qe = class extends pn {
2903
2899
  [Lo, wo],
2904
2900
  [Dt, Ji],
2905
2901
  [Mo, vi],
2906
- [Vn, Li],
2902
+ [yn, Li],
2907
2903
  [Oo, ni],
2908
2904
  [Mt.componentKey, Mt],
2909
2905
  [bt.componentKey, bt],
@@ -2932,7 +2928,7 @@ let qe = class extends pn {
2932
2928
  }
2933
2929
  };
2934
2930
  qe = gs([
2935
- zt(0, b(Ne)),
2931
+ zt(0, b(Fe)),
2936
2932
  zt(1, b(Lt)),
2937
2933
  zt(2, b(ye))
2938
2934
  ], qe);
@@ -2943,15 +2939,15 @@ var vs = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Ss = (e, t
2943
2939
  }, Kt = (e, t) => (o, n) => t(o, n, e);
2944
2940
  const Cs = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2945
2941
  var gt;
2946
- let Yn = (gt = class extends Gn {
2942
+ let Xn = (gt = class extends Zn {
2947
2943
  constructor(e = Vt, t, o, n) {
2948
2944
  super(), this._config = e, this._injector = t, this._commandService = o, this._configService = n;
2949
- const { menu: a, ...i } = Zn(
2945
+ const { menu: a, ...i } = qn(
2950
2946
  {},
2951
2947
  Vt,
2952
2948
  this._config
2953
2949
  );
2954
- a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Dn, i);
2950
+ a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Vn, i);
2955
2951
  }
2956
2952
  onStarting() {
2957
2953
  [
@@ -2970,8 +2966,8 @@ let Yn = (gt = class extends Gn {
2970
2966
  At,
2971
2967
  Tt,
2972
2968
  Eo,
2973
- Rn,
2974
- Be,
2969
+ Dn,
2970
+ Ue,
2975
2971
  bo
2976
2972
  ].forEach((e) => {
2977
2973
  this._commandService.registerCommand(e);
@@ -2990,11 +2986,11 @@ let Yn = (gt = class extends Gn {
2990
2986
  this._injector.get(ze);
2991
2987
  }
2992
2988
  }, M(gt, "pluginName", Cs), M(gt, "type", Y.UNIVER_SHEET), gt);
2993
- Yn = Ss([
2994
- Kt(1, b(Ne)),
2989
+ Xn = Ss([
2990
+ Kt(1, b(Fe)),
2995
2991
  Kt(2, Q),
2996
- Kt(3, hn)
2997
- ], Yn);
2992
+ Kt(3, pn)
2993
+ ], Xn);
2998
2994
  var Is = Object.defineProperty, ws = Object.getOwnPropertyDescriptor, Rs = (e, t, o, n) => {
2999
2995
  for (var a = n > 1 ? void 0 : n ? ws(t, o) : t, i = e.length - 1, r; i >= 0; i--)
3000
2996
  (r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
@@ -3002,15 +2998,15 @@ var Is = Object.defineProperty, ws = Object.getOwnPropertyDescriptor, Rs = (e, t
3002
2998
  }, Gt = (e, t) => (o, n) => t(o, n, e);
3003
2999
  const Ds = "SHEET_DATA_VALIDATION_UI_PLUGIN";
3004
3000
  var vt;
3005
- let Xn = (vt = class extends Gn {
3001
+ let zn = (vt = class extends Zn {
3006
3002
  constructor(e = Vt, t, o, n) {
3007
3003
  super(), this._config = e, this._injector = t, this._commandService = o, this._configService = n;
3008
- const { menu: a, ...i } = Zn(
3004
+ const { menu: a, ...i } = qn(
3009
3005
  {},
3010
3006
  Vt,
3011
3007
  this._config
3012
3008
  );
3013
- a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Dn, i);
3009
+ a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Vn, i);
3014
3010
  }
3015
3011
  onStarting() {
3016
3012
  [
@@ -3028,8 +3024,8 @@ let Xn = (vt = class extends Gn {
3028
3024
  At,
3029
3025
  Tt,
3030
3026
  Eo,
3031
- Rn,
3032
- Be,
3027
+ Dn,
3028
+ Ue,
3033
3029
  bo
3034
3030
  ].forEach((e) => {
3035
3031
  this._commandService.registerCommand(e);
@@ -3048,14 +3044,14 @@ let Xn = (vt = class extends Gn {
3048
3044
  this._injector.get(ze);
3049
3045
  }
3050
3046
  }, M(vt, "pluginName", Ds), M(vt, "type", Y.UNIVER_SHEET), vt);
3051
- Xn = Rs([
3052
- Gt(1, b(Ne)),
3047
+ zn = Rs([
3048
+ Gt(1, b(Fe)),
3053
3049
  Gt(2, Q),
3054
- Gt(3, hn)
3055
- ], Xn);
3050
+ Gt(3, pn)
3051
+ ], zn);
3056
3052
  export {
3057
3053
  Oo as DATE_DROPDOWN_KEY,
3058
- Vn as LIST_DROPDOWN_KEY,
3059
- Xn as UniverSheetsDataValidationMobileUIPlugin,
3060
- Yn as UniverSheetsDataValidationUIPlugin
3054
+ yn as LIST_DROPDOWN_KEY,
3055
+ zn as UniverSheetsDataValidationMobileUIPlugin,
3056
+ Xn as UniverSheetsDataValidationUIPlugin
3061
3057
  };