@univerjs/sheets-data-validation-ui 0.8.2 → 0.8.3-nightly.202506271607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,554 +1,32 @@
1
1
  var Tr = Object.defineProperty;
2
2
  var Pr = (e, t, r) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var V = (e, t, r) => Pr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { LocaleService as ce, isFormulaString as Oe, DataValidationType as j, Tools as In, Inject as M, Injector as ye, Disposable as be, UniverInstanceType as X, toDisposable as Ar, IUniverInstanceService as ue, DataValidationErrorStyle as lt, DataValidationStatus as Ze, ICommandService as te, IConfigService as sn, DataValidationRenderMode as se, DisposableCollection as Lr, dayjs as Rn, numfmt as $n, CellValueType as kr, CommandType as rt, ObjectMatrix as It, Range as Nr, Rectangle as Rt, queryObjectMatrix as Kt, Optional as Ur, RxDisposable as ln, InterceptorEffectEnum as jn, sequenceExecute as Yn, bufferDebounceTime as Fr, debounce as xr, UndoCommand as Br, RedoCommand as Wr, isUnitRangesEqual as Hr, shallowEqual as yn, ThemeService as Xn, ColorKit as $r, VerticalAlign as de, HorizontalAlign as Re, DEFAULT_STYLES as ae, WrapStrategy as me, DependentOn as jr, Plugin as Zn, merge as Kn } from "@univerjs/core";
5
- import { DataValidationFormulaController as Yr, deserializeListOptions as Xr, serializeListOptions as zn, CUSTOM_FORMULA_INPUT_NAME as Gn, BASE_FORMULA_INPUT_NAME as Pt, LIST_FORMULA_INPUT_NAME as dn, CHECKBOX_FORMULA_INPUT_NAME as qn, SheetDataValidationModel as ie, SheetsDataValidationValidatorService as Zr, getDataValidationCellValue as Nt, getCellValueOrigin as re, createDefaultNewRule as Jn, AddSheetDataValidationCommand as cn, DATA_VALIDATION_PLUGIN_NAME as Qn, getDataValidationDiffMutations as zt, UpdateSheetDataValidationRangeCommand as er, DataValidationCacheService as tr, UpdateSheetDataValidationSettingCommand as bn, UpdateSheetDataValidationOptionsCommand as Kr, RemoveSheetDataValidationCommand as nr, RemoveSheetAllDataValidationCommand as zr, DataValidationFormulaService as Gr, CHECKBOX_FORMULA_2 as qr, CHECKBOX_FORMULA_1 as Jr, getFormulaResult as Ut, isLegalFormulaResult as Mn, transformCheckboxValue as Qr, UniverSheetsDataValidationPlugin as ei } from "@univerjs/sheets-data-validation";
6
- import { jsxs as $, Fragment as dt, jsx as S } from "react/jsx-runtime";
7
- import { FormLayout as Y, Input as Pe, Checkbox as At, clsx as Ne, borderClassName as yt, RadioGroup as un, Radio as Ae, DraggableList as ti, Dropdown as ni, Button as Ke, Select as En } from "@univerjs/design";
8
- import { useDependency as F, useSidebarClick as rr, useObservable as Le, useEvent as Gt, ISidebarService as ir, IDialogService as ri, IZenZoneService as or, KeyCode as gt, MenuItemType as hn, getMenuHiddenObservable as ii, RibbonDataGroup as oi, IMenuManagerService as ai, ComponentManager as pn } from "@univerjs/ui";
9
- import { useState as W, useRef as pt, forwardRef as Fe, createElement as Ie, useMemo as ct, useEffect as ke } from "react";
10
- import { FormulaEditor as ar, RangeSelector as si } from "@univerjs/sheets-formula-ui";
11
- import { DataValidatorRegistryService as Me, DataValidationModel as gn, DataValidatorDropdownType as ve, DataValidatorRegistryScope as li, TWO_FORMULA_OPERATOR_COUNT as di, getRuleOptions as Dn, getRuleSetting as Vn } from "@univerjs/data-validation";
12
- import { debounceTime as sr, filter as vn, BehaviorSubject as On, distinctUntilChanged as ci, Subject as ui, bufferTime as lr, of as hi } from "rxjs";
13
- import { DeviceInputEventType as vt, IRenderManagerService as xe, fixLineWidthByScale as Tn, Transform as pi, CheckboxShape as gi, getCurrentTypeOfRenderer as ze, CURSOR_TYPE as Ge, FontCache as vi, Shape as fi, Rect as dr, getFontStyleString as Te, DocSimpleSkeleton as it, Text as Pn } from "@univerjs/engine-render";
14
- import { SheetInterceptorService as fn, VALIDATE_CELL as mi, SheetsSelectionsService as cr, SetRangeValuesCommand as st, getSheetCommandTarget as ur, rangeToDiscreteRange as _i, SheetPermissionCheckController as Si, WorksheetEditPermission as qt, WorksheetSetCellStylePermission as Jt, RangeProtectionPermissionEditPoint as Qt, WorkbookEditablePermission as en, INTERCEPTOR_POINT as hr, InterceptCellContentPriority as pr, checkRangesEditablePermission as Ci } from "@univerjs/sheets";
15
- import { getPatternType as wi } from "@univerjs/sheets-numfmt";
16
- import { ISheetCellDropdownManagerService as Ii, IEditorBridgeService as gr, SetCellEditVisibleOperation as ft, HoverManagerService as Ri, CellAlertManagerService as yi, CellAlertType as bi, IAutoFillService as Mi, APPLY_TYPE as ot, virtualizeDiscreteRanges as tn, getAutoFillRepeatRange as Ei, ISheetClipboardService as Di, COPY_TYPE as An, PREDEFINED_HOOK_NAME as mt, getRepeatRange as Ln, getCurrentRangeDisable$ as Vi, AutoHeightController as vr, SheetSkeletonManagerService as ut, IMarkSelectionService as Oi } from "@univerjs/sheets-ui";
17
- import { deserializeRangeWithSheet as Ti, serializeRange as fr } from "@univerjs/engine-formula";
18
- const Pi = (e) => {
19
- const { isTwoFormula: t = !1, value: r, onChange: n, showError: i, validResult: o } = e, a = F(ce), l = i ? o == null ? void 0 : o.formula1 : "", s = i ? o == null ? void 0 : o.formula2 : "";
20
- return t ? /* @__PURE__ */ $(dt, { children: [
21
- /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
22
- Pe,
23
- {
24
- className: "univer-w-full",
25
- placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
26
- value: r == null ? void 0 : r.formula1,
27
- onChange: (d) => {
28
- n == null || n({
29
- ...r,
30
- formula1: d
31
- });
32
- }
33
- }
34
- ) }),
35
- /* @__PURE__ */ S("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
36
- /* @__PURE__ */ S(Y, { error: s, children: /* @__PURE__ */ S(
37
- Pe,
38
- {
39
- className: "univer-w-full",
40
- placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
41
- value: r == null ? void 0 : r.formula2,
42
- onChange: (d) => {
43
- n == null || n({
44
- ...r,
45
- formula2: d
46
- });
47
- }
48
- }
49
- ) })
50
- ] }) : /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
51
- Pe,
52
- {
53
- className: "univer-w-full",
54
- placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
55
- value: r == null ? void 0 : r.formula1,
56
- onChange: (d) => {
57
- n == null || n({ formula1: d });
58
- }
59
- }
60
- ) });
61
- };
62
- function Ai(e) {
63
- const { value: t, onChange: r, showError: n, validResult: i } = e, o = F(ce), a = n ? i == null ? void 0 : i.formula1 : "", l = n ? i == null ? void 0 : i.formula2 : "", [s, d] = W(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
64
- return /* @__PURE__ */ $(dt, { children: [
65
- /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
66
- At,
67
- {
68
- checked: s,
69
- onChange: (u) => {
70
- u ? d(!0) : (d(!1), r == null || r({
71
- ...t,
72
- formula1: void 0,
73
- formula2: void 0
74
- }));
75
- },
76
- children: o.t("dataValidation.checkbox.tips")
77
- }
78
- ) }),
79
- s ? /* @__PURE__ */ S(Y, { label: o.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ S(
80
- Pe,
81
- {
82
- className: "univer-w-full",
83
- placeholder: o.t("dataValidation.panel.valuePlaceholder"),
84
- value: t == null ? void 0 : t.formula1,
85
- onChange: (u) => {
86
- r == null || r({
87
- ...t,
88
- formula1: u || void 0
89
- });
90
- }
91
- }
92
- ) }) : null,
93
- s ? /* @__PURE__ */ S(Y, { label: o.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ S(
94
- Pe,
95
- {
96
- className: "univer-w-full",
97
- placeholder: o.t("dataValidation.panel.valuePlaceholder"),
98
- value: t == null ? void 0 : t.formula2,
99
- onChange: (u) => {
100
- r == null || r({
101
- ...t,
102
- formula2: u || void 0
103
- });
104
- }
105
- }
106
- ) }) : null
107
- ] });
108
- }
109
- function Li(e) {
110
- var h;
111
- const { unitId: t, subUnitId: r, value: n, onChange: i, showError: o, validResult: a } = e, l = o ? a == null ? void 0 : a.formula1 : void 0, s = pt(null), [d, u] = W(!1);
112
- return rr((c) => {
113
- var p;
114
- ((p = s.current) == null ? void 0 : p.isClickOutSide(c)) && u(!1);
115
- }), /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
116
- ar,
117
- {
118
- ref: s,
119
- className: Ne("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", yt),
120
- initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
121
- unitId: t,
122
- subUnitId: r,
123
- isFocus: d,
124
- isSupportAcrossSheet: !0,
125
- onChange: (c) => {
126
- const m = (c != null ? c : "").trim();
127
- m !== (n == null ? void 0 : n.formula1) && (i == null || i({
128
- ...n,
129
- formula1: m
130
- }));
131
- },
132
- onFocus: () => u(!0)
133
- }
134
- ) });
135
- }
136
- var le = function() {
137
- return le = Object.assign || function(e) {
138
- for (var t, r = 1, n = arguments.length; r < n; r++) {
139
- t = arguments[r];
140
- for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
141
- }
142
- return e;
143
- }, le.apply(this, arguments);
144
- }, ki = function(e, t) {
145
- var r = {};
146
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
147
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
148
- for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
149
- t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
150
- return r;
151
- }, Be = Fe(function(e, t) {
152
- var r = e.icon, n = e.id, i = e.className, o = e.extend, a = ki(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), s = pt("_".concat(Fi()));
153
- return mr(r, "".concat(n), { defIds: r.defIds, idSuffix: s.current }, le({ ref: t, className: l }, a), o);
154
- });
155
- function mr(e, t, r, n, i) {
156
- return Ie(e.tag, le(le({ key: t }, Ni(e, r, i)), n), (Ui(e, r).children || []).map(function(o, a) {
157
- return mr(o, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, i);
158
- }));
159
- }
160
- function Ni(e, t, r) {
161
- var n = le({}, e.attrs);
162
- r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(function(o) {
163
- var a = o[0], l = o[1];
164
- a === "mask" && typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
165
- });
166
- var i = t.defIds;
167
- return !i || i.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(o) {
168
- var a = o[0], l = o[1];
169
- typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
170
- })), n;
171
- }
172
- function Ui(e, t) {
173
- var r, n = t.defIds;
174
- return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? le(le({}, e), { children: e.children.map(function(i) {
175
- return typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? le(le({}, i), { attrs: le(le({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
176
- }) }) : e;
177
- }
178
- function Fi() {
179
- return Math.random().toString(36).substring(2, 8);
180
- }
181
- Be.displayName = "UniverIcon";
182
- var xi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062C8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767L13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217L14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046C13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703L10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046C9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217L9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746C9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732L13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, _r = Fe(function(e, t) {
183
- return Ie(Be, Object.assign({}, e, {
184
- id: "data-validation-icon",
185
- ref: t,
186
- icon: xi
187
- }));
188
- });
189
- _r.displayName = "DataValidationIcon";
190
- var Bi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, mn = Fe(function(e, t) {
191
- return Ie(Be, Object.assign({}, e, {
192
- id: "delete-icon",
193
- ref: t,
194
- icon: Bi
195
- }));
196
- });
197
- mn.displayName = "DeleteIcon";
198
- var Wi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Sr = Fe(function(e, t) {
199
- return Ie(Be, Object.assign({}, e, {
200
- id: "increase-icon",
201
- ref: t,
202
- icon: Wi
203
- }));
204
- });
205
- Sr.displayName = "IncreaseIcon";
206
- var Hi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, _n = Fe(function(e, t) {
207
- return Ie(Be, Object.assign({}, e, {
208
- id: "more-down-icon",
209
- ref: t,
210
- icon: Hi
211
- }));
212
- });
213
- _n.displayName = "MoreDownIcon";
214
- var $i = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cr = Fe(function(e, t) {
215
- return Ie(Be, Object.assign({}, e, {
216
- id: "more-up-icon",
217
- ref: t,
218
- icon: $i
219
- }));
220
- });
221
- Cr.displayName = "MoreUpIcon";
222
- var ji = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z" } }, { tag: "path", attrs: { d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z" } }, { tag: "path", attrs: { d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z" } }, { tag: "path", attrs: { d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z" } }, { tag: "path", attrs: { d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z" } }, { tag: "path", attrs: { d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z" } }] }] }, wr = Fe(function(e, t) {
223
- return Ie(Be, Object.assign({}, e, {
224
- id: "sequence-icon",
225
- ref: t,
226
- icon: ji
227
- }));
228
- });
229
- wr.displayName = "SequenceIcon";
230
- const Ye = "#ECECEC", Yi = [
231
- "#FFFFFF",
232
- "#FEE7E7",
233
- "#FEF0E6",
234
- "#EFFBD0",
235
- "#E4F4FE",
236
- "#E8ECFD",
237
- "#F1EAFA",
238
- "#FDE8F3",
239
- "#E5E5E5",
240
- "#FDCECE",
241
- "#FDC49B",
242
- "#DEF6A2",
243
- "#9FDAFF",
244
- "#D0D9FB",
245
- "#E3D5F6",
246
- "#FBD0E8",
247
- "#656565",
248
- "#FE4B4B",
249
- "#FF8C51",
250
- "#8BBB11",
251
- "#0B9EFB",
252
- "#3A60F7",
253
- "#9E6DE3",
254
- "#F248A6"
255
- ], Xi = (e) => {
256
- const { value: t, onChange: r, disabled: n } = e, [i, o] = W(!1);
257
- return /* @__PURE__ */ S(
258
- ni,
259
- {
260
- align: "start",
261
- disabled: n,
262
- open: i,
263
- onOpenChange: o,
264
- overlay: /* @__PURE__ */ S(
265
- "div",
266
- {
267
- className: "univer-box-border univer-grid univer-w-fit univer-grid-cols-6 univer-flex-wrap univer-gap-2 univer-p-1.5",
268
- children: Yi.map(
269
- (a) => /* @__PURE__ */ S(
270
- "div",
271
- {
272
- className: Ne("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", yt),
273
- style: { background: a },
274
- onClick: () => {
275
- r(a), o(!1);
276
- }
277
- },
278
- a
279
- )
280
- )
281
- }
282
- ),
283
- children: /* @__PURE__ */ $(
284
- "div",
285
- {
286
- className: Ne("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", yt),
287
- children: [
288
- /* @__PURE__ */ S(
289
- "div",
290
- {
291
- className: "univer-box-border univer-h-4 univer-w-4 univer-rounded univer-text-base",
292
- style: { background: t }
293
- }
294
- ),
295
- /* @__PURE__ */ S(_n, {})
296
- ]
297
- }
298
- )
299
- }
300
- );
301
- }, kn = (e) => {
302
- const { item: t, commonProps: r, className: n } = e, { onItemChange: i, onItemDelete: o } = r;
303
- return /* @__PURE__ */ $("div", { className: Ne("univer-flex univer-items-center univer-gap-2", n), children: [
304
- !t.isRef && /* @__PURE__ */ S("div", { className: Ne("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(wr, {}) }),
305
- /* @__PURE__ */ S(
306
- Xi,
307
- {
308
- value: t.color,
309
- onChange: (a) => {
310
- i(t.id, t.label, a);
311
- }
312
- }
313
- ),
314
- /* @__PURE__ */ S(
315
- Pe,
316
- {
317
- disabled: t.isRef,
318
- value: t.label,
319
- onChange: (a) => {
320
- i(t.id, a, t.color);
321
- }
322
- }
323
- ),
324
- t.isRef ? null : /* @__PURE__ */ S(
325
- "div",
326
- {
327
- className: "univer-ml-1 univer-cursor-pointer univer-rounded univer-text-base hover:univer-bg-gray-200",
328
- children: /* @__PURE__ */ S(mn, { onClick: () => o(t.id) })
329
- }
330
- )
331
- ] });
332
- };
333
- function Zi(e) {
334
- const { value: t, onChange: r = () => {
335
- }, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = W(() => Oe(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [p, b] = W(u === "1" ? s : "="), y = F(ce), g = F(Me), C = F(gn), v = F(Yr), [I, w] = W(() => d.split(",")), _ = g.getValidatorItem(j.LIST), [R, L] = W([]), [N, E] = W(""), T = a ? o == null ? void 0 : o.formula1 : "", O = ct(() => C.ruleChange$.pipe(sr(16)), []), P = Le(O), k = Gt(r);
336
- ke(() => {
337
- (async () => {
338
- await new Promise((f) => {
339
- setTimeout(() => f(!0), 100);
340
- });
341
- const D = C.getRuleById(n, i, l), U = D == null ? void 0 : D.formula1;
342
- if (Oe(U) && _ && D) {
343
- const f = await _.getListAsync(D, n, i);
344
- L(f);
345
- }
346
- })();
347
- }, [C, P, _, l, i, n]), ke(() => {
348
- Oe(s) && s !== p && (m(s), b(p));
349
- }, [p, s]);
350
- const [H, B] = W(() => {
351
- const D = u !== "1" ? Xr(s) : [], U = d.split(",");
352
- return D.map((f, A) => ({
353
- label: f,
354
- color: U[A] || Ye,
355
- isRef: !1,
356
- id: In.generateRandomId(4)
357
- }));
358
- }), J = (D, U, f) => {
359
- const A = H.find((x) => x.id === D);
360
- A && (A.label = U, A.color = f, B([...H]));
361
- }, ne = (D) => {
362
- const U = H.findIndex((f) => f.id === D);
363
- U !== -1 && (H.splice(U, 1), B([...H]));
364
- }, oe = d.split(","), he = ct(() => R.map((D, U) => ({
365
- label: D,
366
- color: oe[U] || Ye,
367
- id: `${U}`,
368
- isRef: !0
369
- })), [oe, R]), z = (D, U, f) => {
370
- const A = [...I];
371
- A[+D] = f, w(A), k({
372
- formula1: s,
373
- formula2: A.join(",")
374
- });
375
- }, Z = () => {
376
- B([
377
- ...H,
378
- {
379
- label: "",
380
- color: Ye,
381
- isRef: !1,
382
- id: In.generateRandomId(4)
383
- }
384
- ]);
385
- };
386
- ke(() => {
387
- if (u === "1")
388
- return;
389
- const D = /* @__PURE__ */ new Set(), U = [];
390
- H.map((f) => ({
391
- labelList: f.label.split(","),
392
- item: f
393
- })).forEach(({ item: f, labelList: A }) => {
394
- A.forEach((x) => {
395
- D.has(x) || (D.add(x), U.push({
396
- label: x,
397
- color: f.color
398
- }));
399
- });
400
- }), k({
401
- formula1: zn(U.map((f) => f.label)),
402
- formula2: U.map((f) => f.color === Ye ? "" : f.color).join(",")
403
- });
404
- }, [H, k, u, p, I]);
405
- const fe = Gt(async (D) => {
406
- if (!Oe(D)) {
407
- k == null || k({
408
- formula1: "",
409
- formula2: d
410
- });
411
- return;
412
- }
413
- v.getFormulaRefCheck(D) ? (k == null || k({
414
- formula1: Oe(D) ? D : "",
415
- formula2: d
416
- }), E("")) : (k == null || k({
417
- formula1: "",
418
- formula2: d
419
- }), m("="), E(y.t("dataValidation.validFail.formulaError")));
420
- }), Q = pt(null), [q, G] = W(!1);
421
- return rr((D) => {
422
- var f;
423
- ((f = Q.current) == null ? void 0 : f.isClickOutSide(D)) && G(!1);
424
- }), /* @__PURE__ */ $(dt, { children: [
425
- /* @__PURE__ */ S(Y, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ $(
426
- un,
427
- {
428
- value: u,
429
- onChange: (D) => {
430
- h(D), m(p), D === "1" && k({
431
- formula1: p === "=" ? "" : p,
432
- formula2: I.join(",")
433
- });
434
- },
435
- children: [
436
- /* @__PURE__ */ S(Ae, { value: "0", children: y.t("dataValidation.list.customOptions") }),
437
- /* @__PURE__ */ S(Ae, { value: "1", children: y.t("dataValidation.list.refOptions") })
438
- ]
439
- }
440
- ) }),
441
- u === "1" ? /* @__PURE__ */ $(Y, { error: T || N || void 0, children: [
442
- /* @__PURE__ */ S(
443
- ar,
444
- {
445
- ref: Q,
446
- className: Ne("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", yt),
447
- initValue: c,
448
- unitId: n,
449
- subUnitId: i,
450
- isFocus: q,
451
- isSupportAcrossSheet: !0,
452
- onFocus: () => G(!0),
453
- onChange: (D = "") => {
454
- const U = (D != null ? D : "").trim();
455
- b(U), fe(U);
456
- }
457
- }
458
- ),
459
- he.length > 0 && /* @__PURE__ */ S("div", { className: "univer-mt-3", children: he.map((D) => /* @__PURE__ */ S(
460
- kn,
461
- {
462
- className: "univer-mb-3",
463
- item: D,
464
- commonProps: { onItemChange: z }
465
- },
466
- D.id
467
- )) })
468
- ] }) : /* @__PURE__ */ S(Y, { error: T, children: /* @__PURE__ */ $("div", { className: "-univer-mt-3", children: [
469
- /* @__PURE__ */ S(
470
- ti,
471
- {
472
- list: H,
473
- onListChange: B,
474
- rowHeight: 28,
475
- margin: [0, 12],
476
- draggableHandle: ".draggableHandle",
477
- itemRender: (D) => /* @__PURE__ */ S(
478
- kn,
479
- {
480
- item: D,
481
- commonProps: {
482
- onItemChange: J,
483
- onItemDelete: ne
484
- }
485
- },
486
- D.id
487
- ),
488
- idKey: "id"
489
- }
490
- ),
491
- /* @__PURE__ */ $(
492
- "a",
493
- {
494
- className: "univer-text-primary univer-flex univer-w-fit univer-cursor-pointer univer-flex-row univer-items-center univer-rounded univer-p-1 univer-px-2 univer-text-sm hover:univer-bg-primary-50 dark:hover:!univer-bg-gray-800",
495
- onClick: Z,
496
- children: [
497
- /* @__PURE__ */ S(Sr, { className: "univer-mr-1" }),
498
- y.t("dataValidation.list.add")
499
- ]
500
- }
501
- )
502
- ] }) })
503
- ] });
504
- }
505
- const Ki = [
506
- [
507
- Gn,
508
- Li
509
- ],
510
- [
511
- Pt,
512
- Pi
513
- ],
514
- [
515
- dn,
516
- Zi
517
- ],
518
- [
519
- qn,
520
- Ai
521
- ]
522
- ];
523
- var zi = Object.getOwnPropertyDescriptor, Gi = (e, t, r, n) => {
524
- for (var i = n > 1 ? void 0 : n ? zi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
525
- (a = e[o]) && (i = a(i) || i);
526
- return i;
527
- }, qi = (e, t) => (r, n) => t(r, n, e);
528
- let Se = class {
529
- constructor(e) {
530
- V(this, "canvasRender", null);
531
- V(this, "dropdownType");
532
- V(this, "optionsInput");
533
- V(this, "formulaInput", dn);
534
- this.injector = e;
535
- }
536
- };
537
- Se = Gi([
538
- qi(0, M(ye))
539
- ], Se);
540
- var Ji = Object.getOwnPropertyDescriptor, Qi = (e, t, r, n) => {
541
- for (var i = n > 1 ? void 0 : n ? Ji(t, r) : t, o = e.length - 1, a; o >= 0; o--)
4
+ import { Disposable as ye, UniverInstanceType as X, toDisposable as Ar, IUniverInstanceService as ce, Inject as M, LocaleService as ue, DataValidationErrorStyle as lt, DataValidationStatus as Ze, ICommandService as te, Injector as be, IConfigService as sn, DataValidationRenderMode as se, DisposableCollection as Lr, dayjs as In, numfmt as $n, CellValueType as kr, CommandType as rt, DataValidationType as j, ObjectMatrix as It, Range as Nr, Rectangle as Rt, queryObjectMatrix as Kt, Optional as Ur, RxDisposable as ln, InterceptorEffectEnum as jn, sequenceExecute as Yn, bufferDebounceTime as Fr, debounce as xr, UndoCommand as Br, RedoCommand as Wr, isUnitRangesEqual as Hr, shallowEqual as Rn, ThemeService as Xn, ColorKit as $r, isFormulaString as Oe, Tools as yn, VerticalAlign as de, HorizontalAlign as Re, DEFAULT_STYLES as ae, WrapStrategy as me, Plugin as Zn, merge as Kn, DependentOn as jr } from "@univerjs/core";
5
+ import { DeviceInputEventType as gt, IRenderManagerService as Fe, fixLineWidthByScale as bn, Transform as Yr, CheckboxShape as Xr, getCurrentTypeOfRenderer as Ke, CURSOR_TYPE as ze, FontCache as Zr, Shape as Kr, Rect as zn, getFontStyleString as Te, DocSimpleSkeleton as it, Text as Mn } from "@univerjs/engine-render";
6
+ import { SheetInterceptorService as dn, VALIDATE_CELL as zr, SheetsSelectionsService as Gn, SetRangeValuesCommand as st, getSheetCommandTarget as qn, rangeToDiscreteRange as Gr, SheetPermissionCheckController as qr, WorksheetEditPermission as zt, WorksheetSetCellStylePermission as Gt, RangeProtectionPermissionEditPoint as qt, WorkbookEditablePermission as Jt, INTERCEPTOR_POINT as Jn, InterceptCellContentPriority as Qn, checkRangesEditablePermission as Jr } from "@univerjs/sheets";
7
+ import { SheetDataValidationModel as ie, SheetsDataValidationValidatorService as Qr, getDataValidationCellValue as Nt, getCellValueOrigin as re, serializeListOptions as er, createDefaultNewRule as tr, AddSheetDataValidationCommand as cn, DATA_VALIDATION_PLUGIN_NAME as nr, getDataValidationDiffMutations as Qt, UpdateSheetDataValidationRangeCommand as rr, DataValidationCacheService as ir, UpdateSheetDataValidationSettingCommand as En, UpdateSheetDataValidationOptionsCommand as ei, RemoveSheetDataValidationCommand as or, RemoveSheetAllDataValidationCommand as ti, DataValidationFormulaController as ni, deserializeListOptions as ri, CUSTOM_FORMULA_INPUT_NAME as ar, BASE_FORMULA_INPUT_NAME as Pt, LIST_FORMULA_INPUT_NAME as un, CHECKBOX_FORMULA_INPUT_NAME as sr, DataValidationFormulaService as ii, CHECKBOX_FORMULA_2 as oi, CHECKBOX_FORMULA_1 as ai, getFormulaResult as Ut, isLegalFormulaResult as Dn, transformCheckboxValue as si, UniverSheetsDataValidationPlugin as li } from "@univerjs/sheets-data-validation";
8
+ import { DataValidatorRegistryService as Me, DataValidatorDropdownType as ve, DataValidationModel as hn, DataValidatorRegistryScope as di, TWO_FORMULA_OPERATOR_COUNT as ci, getRuleOptions as Vn, getRuleSetting as On } from "@univerjs/data-validation";
9
+ import { ISidebarService as lr, IDialogService as ui, IZenZoneService as dr, KeyCode as vt, MenuItemType as pn, getMenuHiddenObservable as hi, RibbonDataGroup as pi, IMenuManagerService as gi, useDependency as F, ComponentManager as gn, useObservable as Pe, useEvent as en, useSidebarClick as cr } from "@univerjs/ui";
10
+ import { filter as vn, BehaviorSubject as Tn, distinctUntilChanged as vi, Subject as fi, debounceTime as ur, bufferTime as hr, of as mi } from "rxjs";
11
+ import { getPatternType as _i } from "@univerjs/sheets-numfmt";
12
+ import { ISheetCellDropdownManagerService as Si, IEditorBridgeService as pr, SetCellEditVisibleOperation as ft, HoverManagerService as Ci, CellAlertManagerService as wi, CellAlertType as Ii, IAutoFillService as Ri, APPLY_TYPE as ot, virtualizeDiscreteRanges as tn, getAutoFillRepeatRange as yi, ISheetClipboardService as bi, COPY_TYPE as Pn, PREDEFINED_HOOK_NAME as mt, getRepeatRange as An, getCurrentRangeDisable$ as Mi, AutoHeightController as gr, SheetSkeletonManagerService as dt, IMarkSelectionService as Ei } from "@univerjs/sheets-ui";
13
+ import { Button as Ge, FormLayout as Y, RadioGroup as fn, Radio as Ae, Checkbox as At, Input as Le, Select as Ln, clsx as Ne, borderClassName as yt, DraggableList as Di, Dropdown as Vi } from "@univerjs/design";
14
+ import { createElement as Ie, forwardRef as xe, useRef as pt, useState as W, useMemo as ct, useEffect as ke } from "react";
15
+ import { jsxs as $, Fragment as ut, jsx as S } from "react/jsx-runtime";
16
+ import { deserializeRangeWithSheet as Oi, serializeRange as vr } from "@univerjs/engine-formula";
17
+ import { RangeSelector as Ti, FormulaEditor as fr } from "@univerjs/sheets-formula-ui";
18
+ var Pi = Object.getOwnPropertyDescriptor, Ai = (e, t, r, n) => {
19
+ for (var i = n > 1 ? void 0 : n ? Pi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
542
20
  (a = e[o]) && (i = a(i) || i);
543
21
  return i;
544
- }, Nn = (e, t) => (r, n) => t(r, n, e);
545
- let Ce = class extends be {
22
+ }, kn = (e, t) => (r, n) => t(r, n, e);
23
+ let Se = class extends ye {
546
24
  constructor(t, r) {
547
25
  super();
548
- V(this, "_open$", new On(!1));
549
- V(this, "open$", this._open$.pipe(ci()));
26
+ V(this, "_open$", new Tn(!1));
27
+ V(this, "open$", this._open$.pipe(vi()));
550
28
  V(this, "_activeRule");
551
- V(this, "_activeRule$", new On(void 0));
29
+ V(this, "_activeRule$", new Tn(void 0));
552
30
  V(this, "activeRule$", this._activeRule$.asObservable());
553
31
  V(this, "_closeDisposable", null);
554
32
  this._univerInstanceService = t, this._sidebarService = r, this.disposeWithMe(
@@ -587,23 +65,23 @@ let Ce = class extends be {
587
65
  this._activeRule = t, this._activeRule$.next(t);
588
66
  }
589
67
  };
590
- Ce = Qi([
591
- Nn(0, ue),
592
- Nn(1, ir)
593
- ], Ce);
594
- const Sn = "sheets-data-validation-ui.config", bt = {};
595
- var eo = Object.getOwnPropertyDescriptor, to = (e, t, r, n) => {
596
- for (var i = n > 1 ? void 0 : n ? eo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
68
+ Se = Ai([
69
+ kn(0, ce),
70
+ kn(1, lr)
71
+ ], Se);
72
+ const mn = "sheets-data-validation-ui.config", bt = {};
73
+ var Li = Object.getOwnPropertyDescriptor, ki = (e, t, r, n) => {
74
+ for (var i = n > 1 ? void 0 : n ? Li(t, r) : t, o = e.length - 1, a; o >= 0; o--)
597
75
  (a = e[o]) && (i = a(i) || i);
598
76
  return i;
599
77
  }, He = (e, t) => (r, n) => t(r, n, e);
600
- let qe = class extends be {
78
+ let qe = class extends ye {
601
79
  constructor(e, t, r, n, i, o) {
602
80
  super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = r, this._dialogService = n, this._localeService = i, this._sheetsDataValidationValidatorService = o, this._initEditorBridgeInterceptor();
603
81
  }
604
82
  _initEditorBridgeInterceptor() {
605
83
  this._sheetInterceptorService.writeCellInterceptor.intercept(
606
- mi,
84
+ zr,
607
85
  {
608
86
  handler: async (e, t, r) => {
609
87
  const n = await e, { row: i, col: o, unitId: a, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(a, l, i, o), d = s ? this._dataValidationModel.getRuleById(a, l, s) : void 0;
@@ -623,7 +101,7 @@ let qe = class extends be {
623
101
  },
624
102
  footer: {
625
103
  title: Ie(
626
- Ke,
104
+ Ge,
627
105
  {
628
106
  variant: "primary",
629
107
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -651,7 +129,7 @@ let qe = class extends be {
651
129
  },
652
130
  footer: {
653
131
  title: Ie(
654
- Ke,
132
+ Ge,
655
133
  {
656
134
  variant: "primary",
657
135
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -665,16 +143,16 @@ let qe = class extends be {
665
143
  });
666
144
  }
667
145
  };
668
- qe = to([
669
- He(0, M(fn)),
146
+ qe = ki([
147
+ He(0, M(dn)),
670
148
  He(1, M(ie)),
671
149
  He(2, M(Me)),
672
- He(3, ri),
673
- He(4, M(ce)),
674
- He(5, M(Zr))
150
+ He(3, ui),
151
+ He(4, M(ue)),
152
+ He(5, M(Qr))
675
153
  ], qe);
676
- var no = Object.getOwnPropertyDescriptor, ro = (e, t, r, n) => {
677
- for (var i = n > 1 ? void 0 : n ? no(t, r) : t, o = e.length - 1, a; o >= 0; o--)
154
+ var Ni = Object.getOwnPropertyDescriptor, Ui = (e, t, r, n) => {
155
+ for (var i = n > 1 ? void 0 : n ? Ni(t, r) : t, o = e.length - 1, a; o >= 0; o--)
678
156
  (a = e[o]) && (i = a(i) || i);
679
157
  return i;
680
158
  }, pe = (e, t) => (r, n) => t(r, n, e);
@@ -682,13 +160,13 @@ const Ft = (e) => {
682
160
  if (e == null || typeof e == "boolean")
683
161
  return;
684
162
  if (typeof e == "number" || !Number.isNaN(+e))
685
- return Rn($n.format("yyyy-MM-dd HH:mm:ss", Number(e)));
686
- const t = Rn(e);
163
+ return In($n.format("yyyy-MM-dd HH:mm:ss", Number(e)));
164
+ const t = In(e);
687
165
  if (t.isValid())
688
166
  return t;
689
167
  };
690
- function io(e, t) {
691
- const r = wi(t);
168
+ function Fi(e, t) {
169
+ const r = _i(t);
692
170
  if (e === r)
693
171
  return t;
694
172
  switch (e) {
@@ -700,11 +178,11 @@ function io(e, t) {
700
178
  return "HH:mm:ss";
701
179
  }
702
180
  }
703
- let Ue = class extends be {
181
+ let Ue = class extends ye {
704
182
  constructor(t, r, n, i, o, a, l, s, d, u, h) {
705
183
  super();
706
184
  V(this, "_activeDropdown");
707
- V(this, "_activeDropdown$", new ui());
185
+ V(this, "_activeDropdown$", new fi());
708
186
  V(this, "_currentPopup", null);
709
187
  V(this, "activeDropdown$", this._activeDropdown$.asObservable());
710
188
  V(this, "_zenVisible", !1);
@@ -769,9 +247,9 @@ let Ue = class extends be {
769
247
  t: kr.NUMBER
770
248
  }, d) ? (await this._commandService.executeCommand(ft.id, {
771
249
  visible: !1,
772
- eventType: vt.Keyboard,
250
+ eventType: gt.Keyboard,
773
251
  unitId: o,
774
- keycode: gt.ESC
252
+ keycode: vt.ESC
775
253
  }), await this._commandService.executeCommand(st.id, {
776
254
  unitId: o,
777
255
  subUnitId: a,
@@ -789,7 +267,7 @@ let Ue = class extends be {
789
267
  si: null,
790
268
  s: {
791
269
  n: {
792
- pattern: io(I, T)
270
+ pattern: Fi(I, T)
793
271
  }
794
272
  }
795
273
  }
@@ -840,7 +318,7 @@ let Ue = class extends be {
840
318
  case ve.LIST:
841
319
  case ve.MULTIPLE_LIST: {
842
320
  const v = u.dropdownType === ve.MULTIPLE_LIST, I = async (E) => {
843
- const T = zn(E), O = {
321
+ const T = er(E), O = {
844
322
  unitId: o,
845
323
  subUnitId: a,
846
324
  range: {
@@ -858,12 +336,12 @@ let Ue = class extends be {
858
336
  };
859
337
  return this._editorBridgeService.isVisible().visible && await this._commandService.executeCommand(ft.id, {
860
338
  visible: !1,
861
- eventType: vt.Keyboard,
339
+ eventType: gt.Keyboard,
862
340
  unitId: o,
863
- keycode: gt.ESC
341
+ keycode: vt.ESC
864
342
  }), this._commandService.executeCommand(st.id, O), !v;
865
343
  }, w = (d == null ? void 0 : d.renderMode) === se.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, _ = u.getListWithColor(d, o, a), R = Nt(s.getCellRaw(n, i)), L = () => {
866
- this._commandService.executeCommand(We.id, {
344
+ this._commandService.executeCommand(Be.id, {
867
345
  ruleId: d.uid
868
346
  }), h == null || h.dispose();
869
347
  }, N = _.map((E) => ({
@@ -880,7 +358,7 @@ let Ue = class extends be {
880
358
  onEdit: L,
881
359
  defaultValue: R,
882
360
  multiple: v,
883
- showEdit: (g = (y = this._configService.getConfig(Sn)) == null ? void 0 : y.showEditOnDropdown) != null ? g : !0
361
+ showEdit: (g = (y = this._configService.getConfig(mn)) == null ? void 0 : y.showEditOnDropdown) != null ? g : !0
884
362
  }
885
363
  };
886
364
  break;
@@ -908,9 +386,9 @@ let Ue = class extends be {
908
386
  };
909
387
  return this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(ft.id, {
910
388
  visible: !1,
911
- eventType: vt.Keyboard,
389
+ eventType: gt.Keyboard,
912
390
  unitId: o,
913
- keycode: gt.ESC
391
+ keycode: vt.ESC
914
392
  }), this._commandService.syncExecuteCommand(st.id, w), !0;
915
393
  },
916
394
  defaultValue: Nt(s.getCellRaw(n, i)).split("/"),
@@ -943,9 +421,9 @@ let Ue = class extends be {
943
421
  };
944
422
  return this._editorBridgeService.isVisible().visible && this._commandService.syncExecuteCommand(ft.id, {
945
423
  visible: !1,
946
- eventType: vt.Keyboard,
424
+ eventType: gt.Keyboard,
947
425
  unitId: o,
948
- keycode: gt.ESC
426
+ keycode: vt.ESC
949
427
  }), this._commandService.syncExecuteCommand(st.id, w), !0;
950
428
  },
951
429
  defaultValue: Nt(s.getCellRaw(n, i))
@@ -1003,26 +481,26 @@ let Ue = class extends be {
1003
481
  });
1004
482
  }
1005
483
  };
1006
- Ue = ro([
1007
- pe(0, ue),
484
+ Ue = Ui([
485
+ pe(0, ce),
1008
486
  pe(1, M(Me)),
1009
- pe(2, or),
487
+ pe(2, dr),
1010
488
  pe(3, M(ie)),
1011
- pe(4, M(cr)),
1012
- pe(5, M(Ii)),
489
+ pe(4, M(Gn)),
490
+ pe(5, M(Si)),
1013
491
  pe(6, M(ie)),
1014
492
  pe(7, te),
1015
- pe(8, gr),
1016
- pe(9, M(ye)),
493
+ pe(8, pr),
494
+ pe(9, M(be)),
1017
495
  pe(10, sn)
1018
496
  ], Ue);
1019
- const Mt = "DataValidationPanel", We = {
497
+ const Mt = "DataValidationPanel", Be = {
1020
498
  id: "data-validation.operation.open-validation-panel",
1021
499
  type: rt.OPERATION,
1022
500
  handler(e, t) {
1023
501
  if (!t)
1024
502
  return !1;
1025
- const { ruleId: r, isAdd: n } = t, i = e.get(Ce), o = e.get(gn), a = e.get(ue), l = e.get(ir), s = ur(a);
503
+ const { ruleId: r, isAdd: n } = t, i = e.get(Se), o = e.get(hn), a = e.get(ce), l = e.get(lr), s = qn(a);
1026
504
  if (!s) return !1;
1027
505
  const { unitId: d, subUnitId: u } = s, h = r ? o.getRuleById(d, u, r) : void 0;
1028
506
  i.open(), i.setActiveRule(h && {
@@ -1039,18 +517,18 @@ const Mt = "DataValidationPanel", We = {
1039
517
  });
1040
518
  return i.setCloseDisposable(c), !0;
1041
519
  }
1042
- }, Cn = {
520
+ }, _n = {
1043
521
  id: "data-validation.operation.close-validation-panel",
1044
522
  type: rt.OPERATION,
1045
523
  handler(e) {
1046
- return e.get(Ce).close(), !0;
524
+ return e.get(Se).close(), !0;
1047
525
  }
1048
- }, Ir = {
526
+ }, mr = {
1049
527
  id: "data-validation.operation.toggle-validation-panel",
1050
528
  type: rt.OPERATION,
1051
529
  handler(e) {
1052
- const t = e.get(te), r = e.get(Ce);
1053
- return r.open(), r.isOpen ? t.executeCommand(Cn.id) : t.executeCommand(We.id), !0;
530
+ const t = e.get(te), r = e.get(Se);
531
+ return r.open(), r.isOpen ? t.executeCommand(_n.id) : t.executeCommand(Be.id), !0;
1054
532
  }
1055
533
  }, Lt = {
1056
534
  type: rt.OPERATION,
@@ -1066,7 +544,7 @@ const Mt = "DataValidationPanel", We = {
1066
544
  a
1067
545
  ), !0;
1068
546
  }
1069
- }, Rr = {
547
+ }, _r = {
1070
548
  type: rt.OPERATION,
1071
549
  id: "sheet.operation.hide-data-validation-dropdown",
1072
550
  handler(e, t) {
@@ -1076,26 +554,26 @@ const Mt = "DataValidationPanel", We = {
1076
554
  type: rt.COMMAND,
1077
555
  id: "data-validation.command.addRuleAndOpen",
1078
556
  handler(e) {
1079
- const t = e.get(ue), r = ur(t);
557
+ const t = e.get(ce), r = qn(t);
1080
558
  if (!r) return !1;
1081
- const { workbook: n, worksheet: i } = r, o = Jn(e), a = e.get(te), l = n.getUnitId(), s = i.getSheetId(), d = {
559
+ const { workbook: n, worksheet: i } = r, o = tr(e), a = e.get(te), l = n.getUnitId(), s = i.getSheetId(), d = {
1082
560
  rule: o,
1083
561
  unitId: l,
1084
562
  subUnitId: s
1085
563
  };
1086
- return a.syncExecuteCommand(cn.id, d) ? (a.syncExecuteCommand(We.id, {
564
+ return a.syncExecuteCommand(cn.id, d) ? (a.syncExecuteCommand(Be.id, {
1087
565
  ruleId: o.uid,
1088
566
  isAdd: !0
1089
567
  }), !0) : !1;
1090
568
  }
1091
569
  };
1092
- var oo = Object.getOwnPropertyDescriptor, ao = (e, t, r, n) => {
1093
- for (var i = n > 1 ? void 0 : n ? oo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
570
+ var xi = Object.getOwnPropertyDescriptor, Bi = (e, t, r, n) => {
571
+ for (var i = n > 1 ? void 0 : n ? xi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
1094
572
  (a = e[o]) && (i = a(i) || i);
1095
573
  return i;
1096
574
  }, $e = (e, t) => (r, n) => t(r, n, e);
1097
575
  const Ee = "SHEET_DATA_VALIDATION_ALERT";
1098
- let ht = class extends be {
576
+ let ht = class extends ye {
1099
577
  constructor(e, t, r, n, i, o) {
1100
578
  super(), this._hoverManagerService = e, this._cellAlertManagerService = t, this._univerInstanceService = r, this._localeService = n, this._zenZoneService = i, this._dataValidationModel = o, this._init();
1101
579
  }
@@ -1103,7 +581,7 @@ let ht = class extends be {
1103
581
  this._initCellAlertPopup(), this._initZenService();
1104
582
  }
1105
583
  _initCellAlertPopup() {
1106
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(sr(100)).subscribe((e) => {
584
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(ur(100)).subscribe((e) => {
1107
585
  var t;
1108
586
  if (e) {
1109
587
  const r = this._univerInstanceService.getUnit(e.location.unitId, X.UNIVER_SHEET), n = r.getSheetBySheetId(e.location.subUnitId);
@@ -1125,7 +603,7 @@ let ht = class extends be {
1125
603
  return;
1126
604
  }
1127
605
  this._cellAlertManagerService.showAlert({
1128
- type: bi.ERROR,
606
+ type: Ii.ERROR,
1129
607
  title: this._localeService.t("dataValidation.error.title"),
1130
608
  message: s == null ? void 0 : s.getRuleFinalError(i, e.location),
1131
609
  location: e.location,
@@ -1145,20 +623,20 @@ let ht = class extends be {
1145
623
  }));
1146
624
  }
1147
625
  };
1148
- ht = ao([
1149
- $e(0, M(Ri)),
1150
- $e(1, M(yi)),
1151
- $e(2, ue),
1152
- $e(3, M(ce)),
1153
- $e(4, or),
626
+ ht = Bi([
627
+ $e(0, M(Ci)),
628
+ $e(1, M(wi)),
629
+ $e(2, ce),
630
+ $e(3, M(ue)),
631
+ $e(4, dr),
1154
632
  $e(5, M(ie))
1155
633
  ], ht);
1156
- var so = Object.getOwnPropertyDescriptor, lo = (e, t, r, n) => {
1157
- for (var i = n > 1 ? void 0 : n ? so(t, r) : t, o = e.length - 1, a; o >= 0; o--)
634
+ var Wi = Object.getOwnPropertyDescriptor, Hi = (e, t, r, n) => {
635
+ for (var i = n > 1 ? void 0 : n ? Wi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
1158
636
  (a = e[o]) && (i = a(i) || i);
1159
637
  return i;
1160
638
  }, xt = (e, t) => (r, n) => t(r, n, e);
1161
- let Je = class extends be {
639
+ let Je = class extends ye {
1162
640
  constructor(e, t, r) {
1163
641
  super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = r, this._initAutoFill();
1164
642
  }
@@ -1168,7 +646,7 @@ let Je = class extends be {
1168
646
  const { source: o, target: a, unitId: l, subUnitId: s } = n, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = tn([o, a]), [h, c] = u.ranges, { mapFunc: m } = u, p = {
1169
647
  row: h.startRow,
1170
648
  col: h.startColumn
1171
- }, b = Ei(h, c), y = new It(), g = /* @__PURE__ */ new Set();
649
+ }, b = yi(h, c), y = new It(), g = /* @__PURE__ */ new Set();
1172
650
  b.forEach((_) => {
1173
651
  const R = _.repeatStartCell, L = _.relativeRange, N = {
1174
652
  startRow: p.row,
@@ -1204,13 +682,13 @@ let Je = class extends be {
1204
682
  });
1205
683
  const C = Array.from(g).map((_) => ({ id: _, ranges: Kt(y, (R) => R === _) }));
1206
684
  d.addRangeRules(C);
1207
- const v = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: I, undoMutations: w } = zt(l, s, v, this._injector, "patched", i === ot.ONLY_FORMAT);
685
+ const v = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: I, undoMutations: w } = Qt(l, s, v, this._injector, "patched", i === ot.ONLY_FORMAT);
1208
686
  return {
1209
687
  undos: w,
1210
688
  redos: I
1211
689
  };
1212
690
  }, r = {
1213
- id: Qn,
691
+ id: nr,
1214
692
  onBeforeFillData: (n) => {
1215
693
  const { source: i, unitId: o, subUnitId: a } = n;
1216
694
  for (const l of i.rows)
@@ -1229,17 +707,17 @@ let Je = class extends be {
1229
707
  this.disposeWithMe(this._autoFillService.addHook(r));
1230
708
  }
1231
709
  };
1232
- Je = lo([
1233
- xt(0, Mi),
710
+ Je = Hi([
711
+ xt(0, Ri),
1234
712
  xt(1, M(ie)),
1235
- xt(2, M(ye))
713
+ xt(2, M(be))
1236
714
  ], Je);
1237
- var co = Object.getOwnPropertyDescriptor, uo = (e, t, r, n) => {
1238
- for (var i = n > 1 ? void 0 : n ? co(t, r) : t, o = e.length - 1, a; o >= 0; o--)
715
+ var $i = Object.getOwnPropertyDescriptor, ji = (e, t, r, n) => {
716
+ for (var i = n > 1 ? void 0 : n ? $i(t, r) : t, o = e.length - 1, a; o >= 0; o--)
1239
717
  (a = e[o]) && (i = a(i) || i);
1240
718
  return i;
1241
719
  }, Bt = (e, t) => (r, n) => t(r, n, e);
1242
- let Qe = class extends be {
720
+ let Qe = class extends ye {
1243
721
  constructor(t, r, n) {
1244
722
  super();
1245
723
  V(this, "_copyInfo");
@@ -1247,10 +725,10 @@ let Qe = class extends be {
1247
725
  }
1248
726
  _initCopyPaste() {
1249
727
  this._sheetClipboardService.addClipboardHook({
1250
- id: Qn,
728
+ id: nr,
1251
729
  onBeforeCopy: (t, r, n) => this._collect(t, r, n),
1252
730
  onPasteCells: (t, r, n, i) => {
1253
- const { copyType: o = An.COPY, pasteType: a } = i, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = r;
731
+ const { copyType: o = Pn.COPY, pasteType: a } = i, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = r;
1254
732
  return this._generateMutations(s, { copyType: o, pasteType: a, copyRange: l, unitId: d, subUnitId: u });
1255
733
  }
1256
734
  });
@@ -1262,7 +740,7 @@ let Qe = class extends be {
1262
740
  subUnitId: r,
1263
741
  matrix: i
1264
742
  };
1265
- const o = this._injector.invoke((s) => _i(n, s, t, r));
743
+ const o = this._injector.invoke((s) => Gr(n, s, t, r));
1266
744
  if (!o)
1267
745
  return;
1268
746
  const { rows: a, cols: l } = o;
@@ -1277,7 +755,7 @@ let Qe = class extends be {
1277
755
  _generateMutations(t, r) {
1278
756
  if (!this._copyInfo)
1279
757
  return { redos: [], undos: [] };
1280
- if (r.copyType === An.CUT)
758
+ if (r.copyType === Pn.CUT)
1281
759
  return this._copyInfo = null, { redos: [], undos: [] };
1282
760
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !r.copyRange)
1283
761
  return { redos: [], undos: [] };
@@ -1290,7 +768,7 @@ let Qe = class extends be {
1290
768
  return { redos: [], undos: [] };
1291
769
  const { unitId: i, subUnitId: o } = this._copyInfo;
1292
770
  if (r.unitId !== i || o !== r.subUnitId) {
1293
- const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new It(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = tn([r.copyRange, t]), c = Ln(d, u, !0), m = /* @__PURE__ */ new Map();
771
+ const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new It(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = tn([r.copyRange, t]), c = An(d, u, !0), m = /* @__PURE__ */ new Map();
1294
772
  c.forEach(({ startRange: g }) => {
1295
773
  var C;
1296
774
  (C = this._copyInfo) == null || C.matrix.forValue((v, I, w) => {
@@ -1310,7 +788,7 @@ let Qe = class extends be {
1310
788
  });
1311
789
  const p = Array.from(s).map((g) => ({ id: g, ranges: Kt(l, (C) => C === g) }));
1312
790
  a.addRangeRules(p);
1313
- const { redoMutations: b, undoMutations: y } = zt(
791
+ const { redoMutations: b, undoMutations: y } = Qt(
1314
792
  r.unitId,
1315
793
  r.subUnitId,
1316
794
  a.diffWithAddition(this._sheetDataValidationModel.getRules(r.unitId, r.subUnitId), m.values()),
@@ -1324,7 +802,7 @@ let Qe = class extends be {
1324
802
  };
1325
803
  } else {
1326
804
  const a = this._sheetDataValidationModel.getRuleObjectMatrix(i, o).clone(), l = new It(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = tn([r.copyRange, t]);
1327
- Ln(d, u, !0).forEach(({ startRange: y }) => {
805
+ An(d, u, !0).forEach(({ startRange: y }) => {
1328
806
  var g;
1329
807
  (g = this._copyInfo) == null || g.matrix.forValue((C, v, I) => {
1330
808
  const w = Rt.getPositionRange(
@@ -1341,7 +819,7 @@ let Qe = class extends be {
1341
819
  });
1342
820
  const m = Array.from(s).map((y) => ({ id: y, ranges: Kt(l, (g) => g === y) }));
1343
821
  a.addRangeRules(m);
1344
- const { redoMutations: p, undoMutations: b } = zt(
822
+ const { redoMutations: p, undoMutations: b } = Qt(
1345
823
  i,
1346
824
  o,
1347
825
  a.diff(this._sheetDataValidationModel.getRules(i, o)),
@@ -1356,17 +834,17 @@ let Qe = class extends be {
1356
834
  }
1357
835
  }
1358
836
  };
1359
- Qe = uo([
1360
- Bt(0, Di),
837
+ Qe = ji([
838
+ Bt(0, bi),
1361
839
  Bt(1, M(ie)),
1362
- Bt(2, M(ye))
840
+ Bt(2, M(be))
1363
841
  ], Qe);
1364
- var ho = Object.getOwnPropertyDescriptor, po = (e, t, r, n) => {
1365
- for (var i = n > 1 ? void 0 : n ? ho(t, r) : t, o = e.length - 1, a; o >= 0; o--)
842
+ var Yi = Object.getOwnPropertyDescriptor, Xi = (e, t, r, n) => {
843
+ for (var i = n > 1 ? void 0 : n ? Yi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
1366
844
  (a = e[o]) && (i = a(i) || i);
1367
845
  return i;
1368
846
  }, Wt = (e, t) => (r, n) => t(r, n, e);
1369
- let et = class extends be {
847
+ let et = class extends ye {
1370
848
  constructor(e, t, r) {
1371
849
  super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = r, this._commandExecutedListener();
1372
850
  }
@@ -1374,70 +852,70 @@ let et = class extends be {
1374
852
  this.disposeWithMe(
1375
853
  this._commandService.beforeCommandExecuted((e) => {
1376
854
  e.id === cn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1377
- workbookTypes: [en],
1378
- rangeTypes: [Qt],
1379
- worksheetTypes: [qt, Jt]
1380
- }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === er.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
1381
- workbookTypes: [en],
1382
- rangeTypes: [Qt],
1383
- worksheetTypes: [qt, Jt]
855
+ workbookTypes: [Jt],
856
+ rangeTypes: [qt],
857
+ worksheetTypes: [zt, Gt]
858
+ }) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === rr.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
859
+ workbookTypes: [Jt],
860
+ rangeTypes: [qt],
861
+ worksheetTypes: [zt, Gt]
1384
862
  }, e.params.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
1385
863
  })
1386
864
  );
1387
865
  }
1388
866
  };
1389
- et = po([
1390
- Wt(0, M(ce)),
867
+ et = Xi([
868
+ Wt(0, M(ue)),
1391
869
  Wt(1, te),
1392
- Wt(2, M(Si))
870
+ Wt(2, M(qr))
1393
871
  ], et);
1394
- const yr = "sheet.menu.data-validation";
1395
- function go(e) {
872
+ const Sr = "sheet.menu.data-validation";
873
+ function Zi(e) {
1396
874
  return {
1397
- id: yr,
1398
- type: hn.SUBITEMS,
875
+ id: Sr,
876
+ type: pn.SUBITEMS,
1399
877
  icon: "DataValidationIcon",
1400
878
  tooltip: "dataValidation.title",
1401
- hidden$: ii(e, X.UNIVER_SHEET),
1402
- disabled$: Vi(e, { workbookTypes: [en], worksheetTypes: [Jt, qt], rangeTypes: [Qt] })
879
+ hidden$: hi(e, X.UNIVER_SHEET),
880
+ disabled$: Mi(e, { workbookTypes: [Jt], worksheetTypes: [Gt, zt], rangeTypes: [qt] })
1403
881
  };
1404
882
  }
1405
- function vo(e) {
883
+ function Ki(e) {
1406
884
  return {
1407
- id: We.id,
885
+ id: Be.id,
1408
886
  title: "dataValidation.panel.title",
1409
- type: hn.BUTTON
887
+ type: pn.BUTTON
1410
888
  };
1411
889
  }
1412
- function fo(e) {
890
+ function zi(e) {
1413
891
  return {
1414
892
  id: kt.id,
1415
893
  title: "dataValidation.panel.add",
1416
- type: hn.BUTTON
894
+ type: pn.BUTTON
1417
895
  };
1418
896
  }
1419
- const mo = {
1420
- [oi.RULES]: {
1421
- [yr]: {
897
+ const Gi = {
898
+ [pi.RULES]: {
899
+ [Sr]: {
1422
900
  order: 0,
1423
- menuItemFactory: go,
1424
- [We.id]: {
901
+ menuItemFactory: Zi,
902
+ [Be.id]: {
1425
903
  order: 0,
1426
- menuItemFactory: vo
904
+ menuItemFactory: Ki
1427
905
  },
1428
906
  [kt.id]: {
1429
907
  order: 1,
1430
- menuItemFactory: fo
908
+ menuItemFactory: zi
1431
909
  }
1432
910
  }
1433
911
  }
1434
912
  };
1435
- var _o = Object.getOwnPropertyDescriptor, br = (e, t, r, n) => {
1436
- for (var i = n > 1 ? void 0 : n ? _o(t, r) : t, o = e.length - 1, a; o >= 0; o--)
913
+ var qi = Object.getOwnPropertyDescriptor, Cr = (e, t, r, n) => {
914
+ for (var i = n > 1 ? void 0 : n ? qi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
1437
915
  (a = e[o]) && (i = a(i) || i);
1438
916
  return i;
1439
917
  }, K = (e, t) => (r, n) => t(r, n, e);
1440
- const Mr = {
918
+ const wr = {
1441
919
  tr: {
1442
920
  size: 6,
1443
921
  color: "#fe4b4b"
@@ -1448,7 +926,7 @@ let tt = class extends ln {
1448
926
  super(), this._commandService = e, this._menuManagerService = t, this._renderManagerService = r, this._univerInstanceService = n, this._autoHeightController = i, this._dropdownManagerService = o, this._sheetDataValidationModel = a, this._dataValidatorRegistryService = l, this._sheetInterceptorService = s, this._dataValidationCacheService = d, this._editorBridgeService = u, this._initMenu(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
1449
927
  }
1450
928
  _initMenu() {
1451
- this._menuManagerService.mergeMenu(mo);
929
+ this._menuManagerService.mergeMenu(Gi);
1452
930
  }
1453
931
  _initDropdown() {
1454
932
  this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
@@ -1494,11 +972,11 @@ let tt = class extends ln {
1494
972
  _initViewModelIntercept() {
1495
973
  this.disposeWithMe(
1496
974
  this._sheetInterceptorService.intercept(
1497
- hr.CELL_CONTENT,
975
+ Jn.CELL_CONTENT,
1498
976
  {
1499
977
  effect: jn.Style,
1500
978
  // must be after numfmt
1501
- priority: pr.DATA_VALIDATION,
979
+ priority: Qn.DATA_VALIDATION,
1502
980
  // eslint-disable-next-line max-lines-per-function, complexity
1503
981
  handler: (e, t, r) => {
1504
982
  var g, C, v, I, w;
@@ -1523,7 +1001,7 @@ let tt = class extends ln {
1523
1001
  };
1524
1002
  return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
1525
1003
  ...e == null ? void 0 : e.markers,
1526
- ...h === Ze.INVALID ? Mr : null
1004
+ ...h === Ze.INVALID ? wr : null
1527
1005
  }, e.customRender = [
1528
1006
  ...(C = e == null ? void 0 : e.customRender) != null ? C : [],
1529
1007
  ...c != null && c.canvasRender ? [c.canvasRender] : []
@@ -1540,7 +1018,7 @@ let tt = class extends ln {
1540
1018
  }, n, i)
1541
1019
  }, e.interceptorAutoHeight = () => {
1542
1020
  var N, E, T, O, P, k;
1543
- const _ = (E = (N = this._renderManagerService.getRenderById(o)) == null ? void 0 : N.with(ut).getSkeletonParam(a)) == null ? void 0 : E.skeleton;
1021
+ const _ = (E = (N = this._renderManagerService.getRenderById(o)) == null ? void 0 : N.with(dt).getSkeletonParam(a)) == null ? void 0 : E.skeleton;
1544
1022
  if (!_)
1545
1023
  return;
1546
1024
  const R = _.worksheet.getMergedCell(n, i), L = {
@@ -1557,7 +1035,7 @@ let tt = class extends ln {
1557
1035
  return (k = (P = c == null ? void 0 : c.canvasRender) == null ? void 0 : P.calcCellAutoHeight) == null ? void 0 : k.call(P, L);
1558
1036
  }, e.interceptorAutoWidth = () => {
1559
1037
  var N, E, T, O, P, k;
1560
- const _ = (E = (N = this._renderManagerService.getRenderById(o)) == null ? void 0 : N.with(ut).getSkeletonParam(a)) == null ? void 0 : E.skeleton;
1038
+ const _ = (E = (N = this._renderManagerService.getRenderById(o)) == null ? void 0 : N.with(dt).getSkeletonParam(a)) == null ? void 0 : E.skeleton;
1561
1039
  if (!_)
1562
1040
  return;
1563
1041
  const R = _.worksheet.getMergedCell(n, i), L = {
@@ -1583,7 +1061,7 @@ let tt = class extends ln {
1583
1061
  // patched data-validation change don't need to re-calc row height
1584
1062
  // re-calc of row height will be triggered precisely by the origin command
1585
1063
  vn((e) => e.source === "command"),
1586
- lr(100)
1064
+ hr(100)
1587
1065
  ).subscribe((e) => {
1588
1066
  if (e.length === 0)
1589
1067
  return;
@@ -1598,20 +1076,20 @@ let tt = class extends ln {
1598
1076
  });
1599
1077
  }
1600
1078
  };
1601
- tt = br([
1079
+ tt = Cr([
1602
1080
  K(0, te),
1603
- K(1, ai),
1604
- K(2, xe),
1605
- K(3, ue),
1606
- K(4, M(vr)),
1081
+ K(1, gi),
1082
+ K(2, Fe),
1083
+ K(3, ce),
1084
+ K(4, M(gr)),
1607
1085
  K(5, M(Ue)),
1608
1086
  K(6, M(ie)),
1609
1087
  K(7, M(Me)),
1610
- K(8, M(fn)),
1611
- K(9, M(tr)),
1612
- K(10, Ur(gr))
1088
+ K(8, M(dn)),
1089
+ K(9, M(ir)),
1090
+ K(10, Ur(pr))
1613
1091
  ], tt);
1614
- let Un = class extends ln {
1092
+ let Nn = class extends ln {
1615
1093
  constructor(e, t, r, n, i, o, a) {
1616
1094
  super(), this._commandService = e, this._renderManagerService = t, this._autoHeightController = r, this._dataValidatorRegistryService = n, this._sheetInterceptorService = i, this._sheetDataValidationModel = o, this._dataValidationCacheService = a, this._initViewModelIntercept(), this._initAutoHeight();
1617
1095
  }
@@ -1619,11 +1097,11 @@ let Un = class extends ln {
1619
1097
  _initViewModelIntercept() {
1620
1098
  this.disposeWithMe(
1621
1099
  this._sheetInterceptorService.intercept(
1622
- hr.CELL_CONTENT,
1100
+ Jn.CELL_CONTENT,
1623
1101
  {
1624
1102
  effect: jn.Style,
1625
1103
  // must be after numfmt
1626
- priority: pr.DATA_VALIDATION,
1104
+ priority: Qn.DATA_VALIDATION,
1627
1105
  // eslint-disable-next-line complexity, max-lines-per-function
1628
1106
  handler: (e, t, r) => {
1629
1107
  var y, g, C, v, I;
@@ -1636,7 +1114,7 @@ let Un = class extends ln {
1636
1114
  const h = (y = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? y : Ze.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = s.getCellRaw(n, i), p = re(m), b = `${p != null ? p : ""}`;
1637
1115
  return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
1638
1116
  ...e == null ? void 0 : e.markers,
1639
- ...h === Ze.INVALID ? Mr : null
1117
+ ...h === Ze.INVALID ? wr : null
1640
1118
  }, e.customRender = [
1641
1119
  ...(g = e == null ? void 0 : e.customRender) != null ? g : [],
1642
1120
  ...c != null && c.canvasRender ? [c.canvasRender] : []
@@ -1653,7 +1131,7 @@ let Un = class extends ln {
1653
1131
  }, n, i)
1654
1132
  }, e.interceptorAutoHeight = () => {
1655
1133
  var L, N, E, T, O, P;
1656
- const w = (N = (L = this._renderManagerService.getRenderById(o)) == null ? void 0 : L.with(ut).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1134
+ const w = (N = (L = this._renderManagerService.getRenderById(o)) == null ? void 0 : L.with(dt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1657
1135
  if (!w)
1658
1136
  return;
1659
1137
  const _ = w.worksheet.getMergedCell(n, i), R = {
@@ -1670,7 +1148,7 @@ let Un = class extends ln {
1670
1148
  return (P = (O = c == null ? void 0 : c.canvasRender) == null ? void 0 : O.calcCellAutoHeight) == null ? void 0 : P.call(O, R);
1671
1149
  }, e.interceptorAutoWidth = () => {
1672
1150
  var L, N, E, T, O, P;
1673
- const w = (N = (L = this._renderManagerService.getRenderById(o)) == null ? void 0 : L.with(ut).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1151
+ const w = (N = (L = this._renderManagerService.getRenderById(o)) == null ? void 0 : L.with(dt).getSkeletonParam(a)) == null ? void 0 : N.skeleton;
1674
1152
  if (!w)
1675
1153
  return;
1676
1154
  const _ = w.worksheet.getMergedCell(n, i), R = {
@@ -1694,7 +1172,7 @@ let Un = class extends ln {
1694
1172
  _initAutoHeight() {
1695
1173
  this._sheetDataValidationModel.ruleChange$.pipe(
1696
1174
  vn((e) => e.source === "command"),
1697
- lr(16)
1175
+ hr(16)
1698
1176
  ).subscribe((e) => {
1699
1177
  const t = [];
1700
1178
  if (e.forEach((r) => {
@@ -1707,21 +1185,21 @@ let Un = class extends ln {
1707
1185
  });
1708
1186
  }
1709
1187
  };
1710
- Un = br([
1188
+ Nn = Cr([
1711
1189
  K(0, te),
1712
- K(1, xe),
1713
- K(2, M(vr)),
1190
+ K(1, Fe),
1191
+ K(2, M(gr)),
1714
1192
  K(3, M(Me)),
1715
- K(4, M(fn)),
1193
+ K(4, M(dn)),
1716
1194
  K(5, M(ie)),
1717
- K(6, M(tr))
1718
- ], Un);
1719
- var So = Object.getOwnPropertyDescriptor, Co = (e, t, r, n) => {
1720
- for (var i = n > 1 ? void 0 : n ? So(t, r) : t, o = e.length - 1, a; o >= 0; o--)
1195
+ K(6, M(ir))
1196
+ ], Nn);
1197
+ var Ji = Object.getOwnPropertyDescriptor, Qi = (e, t, r, n) => {
1198
+ for (var i = n > 1 ? void 0 : n ? Ji(t, r) : t, o = e.length - 1, a; o >= 0; o--)
1721
1199
  (a = e[o]) && (i = a(i) || i);
1722
1200
  return i;
1723
- }, Fn = (e, t) => (r, n) => t(r, n, e);
1724
- let Et = class extends be {
1201
+ }, Un = (e, t) => (r, n) => t(r, n, e);
1202
+ let Et = class extends ye {
1725
1203
  constructor(e, t, r) {
1726
1204
  super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = r, this._initSkeletonChange();
1727
1205
  }
@@ -1741,14 +1219,108 @@ let Et = class extends be {
1741
1219
  this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Fr(16)).subscribe(e));
1742
1220
  }
1743
1221
  };
1744
- Et = Co([
1745
- Fn(1, M(ie)),
1746
- Fn(2, M(ut))
1222
+ Et = Qi([
1223
+ Un(1, M(ie)),
1224
+ Un(2, M(dt))
1747
1225
  ], Et);
1748
- function wo(e) {
1226
+ var le = function() {
1227
+ return le = Object.assign || function(e) {
1228
+ for (var t, r = 1, n = arguments.length; r < n; r++) {
1229
+ t = arguments[r];
1230
+ for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
1231
+ }
1232
+ return e;
1233
+ }, le.apply(this, arguments);
1234
+ }, eo = function(e, t) {
1235
+ var r = {};
1236
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1237
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
1238
+ for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
1239
+ t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
1240
+ return r;
1241
+ }, We = xe(function(e, t) {
1242
+ var r = e.icon, n = e.id, i = e.className, o = e.extend, a = eo(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), s = pt("_".concat(ro()));
1243
+ return Ir(r, "".concat(n), { defIds: r.defIds, idSuffix: s.current }, le({ ref: t, className: l }, a), o);
1244
+ });
1245
+ function Ir(e, t, r, n, i) {
1246
+ return Ie(e.tag, le(le({ key: t }, to(e, r, i)), n), (no(e, r).children || []).map(function(o, a) {
1247
+ return Ir(o, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, i);
1248
+ }));
1249
+ }
1250
+ function to(e, t, r) {
1251
+ var n = le({}, e.attrs);
1252
+ r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(function(o) {
1253
+ var a = o[0], l = o[1];
1254
+ a === "mask" && typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
1255
+ });
1256
+ var i = t.defIds;
1257
+ return !i || i.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(o) {
1258
+ var a = o[0], l = o[1];
1259
+ typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
1260
+ })), n;
1261
+ }
1262
+ function no(e, t) {
1263
+ var r, n = t.defIds;
1264
+ return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? le(le({}, e), { children: e.children.map(function(i) {
1265
+ return typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? le(le({}, i), { attrs: le(le({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
1266
+ }) }) : e;
1267
+ }
1268
+ function ro() {
1269
+ return Math.random().toString(36).substring(2, 8);
1270
+ }
1271
+ We.displayName = "UniverIcon";
1272
+ var io = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062C8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767L13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217L14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046C13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703L10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046C9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217L9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746C9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732L13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rr = xe(function(e, t) {
1273
+ return Ie(We, Object.assign({}, e, {
1274
+ id: "data-validation-icon",
1275
+ ref: t,
1276
+ icon: io
1277
+ }));
1278
+ });
1279
+ Rr.displayName = "DataValidationIcon";
1280
+ var oo = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Sn = xe(function(e, t) {
1281
+ return Ie(We, Object.assign({}, e, {
1282
+ id: "delete-icon",
1283
+ ref: t,
1284
+ icon: oo
1285
+ }));
1286
+ });
1287
+ Sn.displayName = "DeleteIcon";
1288
+ var ao = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, yr = xe(function(e, t) {
1289
+ return Ie(We, Object.assign({}, e, {
1290
+ id: "increase-icon",
1291
+ ref: t,
1292
+ icon: ao
1293
+ }));
1294
+ });
1295
+ yr.displayName = "IncreaseIcon";
1296
+ var so = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cn = xe(function(e, t) {
1297
+ return Ie(We, Object.assign({}, e, {
1298
+ id: "more-down-icon",
1299
+ ref: t,
1300
+ icon: so
1301
+ }));
1302
+ });
1303
+ Cn.displayName = "MoreDownIcon";
1304
+ var lo = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, br = xe(function(e, t) {
1305
+ return Ie(We, Object.assign({}, e, {
1306
+ id: "more-up-icon",
1307
+ ref: t,
1308
+ icon: lo
1309
+ }));
1310
+ });
1311
+ br.displayName = "MoreUpIcon";
1312
+ var co = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z" } }, { tag: "path", attrs: { d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z" } }, { tag: "path", attrs: { d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z" } }, { tag: "path", attrs: { d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z" } }, { tag: "path", attrs: { d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z" } }, { tag: "path", attrs: { d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z" } }] }] }, Mr = xe(function(e, t) {
1313
+ return Ie(We, Object.assign({}, e, {
1314
+ id: "sequence-icon",
1315
+ ref: t,
1316
+ icon: co
1317
+ }));
1318
+ });
1319
+ Mr.displayName = "SequenceIcon";
1320
+ function uo(e) {
1749
1321
  var d;
1750
- const t = F(ce), r = F(pn), { value: n, onChange: i, extraComponent: o } = e, [a, l] = W(!1), s = o ? r.get(o) : null;
1751
- return /* @__PURE__ */ $(dt, { children: [
1322
+ const t = F(ue), r = F(gn), { value: n, onChange: i, extraComponent: o } = e, [a, l] = W(!1), s = o ? r.get(o) : null;
1323
+ return /* @__PURE__ */ $(ut, { children: [
1752
1324
  /* @__PURE__ */ $(
1753
1325
  "div",
1754
1326
  {
@@ -1756,18 +1328,18 @@ function wo(e) {
1756
1328
  onClick: () => l(!a),
1757
1329
  children: [
1758
1330
  t.t("dataValidation.panel.options"),
1759
- a ? /* @__PURE__ */ S(Cr, { className: "univer-ml-1" }) : /* @__PURE__ */ S(_n, { className: "univer-ml-1" })
1331
+ a ? /* @__PURE__ */ S(br, { className: "univer-ml-1" }) : /* @__PURE__ */ S(Cn, { className: "univer-ml-1" })
1760
1332
  ]
1761
1333
  }
1762
1334
  ),
1763
- a && /* @__PURE__ */ $(dt, { children: [
1335
+ a && /* @__PURE__ */ $(ut, { children: [
1764
1336
  s ? /* @__PURE__ */ S(s, { value: n, onChange: i }) : null,
1765
1337
  /* @__PURE__ */ S(
1766
1338
  Y,
1767
1339
  {
1768
1340
  label: t.t("dataValidation.panel.invalid"),
1769
1341
  children: /* @__PURE__ */ $(
1770
- un,
1342
+ fn,
1771
1343
  {
1772
1344
  value: `${(d = n.errorStyle) != null ? d : lt.WARNING}`,
1773
1345
  onChange: (u) => i({ ...n, errorStyle: +u }),
@@ -1796,24 +1368,24 @@ function wo(e) {
1796
1368
  )
1797
1369
  }
1798
1370
  ),
1799
- n.showErrorMessage ? /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(Pe, { value: n.error, onChange: (u) => i({ ...n, error: u }) }) }) : null
1371
+ n.showErrorMessage ? /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(Le, { value: n.error, onChange: (u) => i({ ...n, error: u }) }) }) : null
1800
1372
  ] })
1801
1373
  ] });
1802
1374
  }
1803
- const Io = (e) => xr(
1375
+ const ho = (e) => xr(
1804
1376
  async (t, r, n, i) => {
1805
1377
  const o = await e.executeCommand(t, r, n);
1806
1378
  i == null || i(o);
1807
1379
  },
1808
1380
  1e3
1809
1381
  );
1810
- function Ro(e, t, r) {
1382
+ function po(e, t, r) {
1811
1383
  var n, i, o, a;
1812
1384
  return t ? ((i = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(r)) == null ? void 0 : i.getSheetId()) || "" : ((a = (o = e.getCurrentUnitForType(X.UNIVER_SHEET)) == null ? void 0 : o.getSheetBySheetName(r)) == null ? void 0 : a.getSheetId()) || "";
1813
1385
  }
1814
- function yo() {
1386
+ function go() {
1815
1387
  var D, U;
1816
- const [e, t] = W(0), r = F(Ce), n = Le(r.activeRule$, r.activeRule), { unitId: i, subUnitId: o, rule: a } = n || {}, l = a.uid, s = F(Me), d = F(ue), u = F(pn), h = F(te), c = F(gn), m = F(ce), [p, b] = W(a), y = s.getValidatorItem(p.type), [g, C] = W(!1), v = s.getValidatorsByScope(li.SHEET), [I, w] = W(() => p.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), _ = ct(() => Io(h), [h]), [R, L] = W(!1), [N, E] = W(!1), T = pt(null), O = F(cr);
1388
+ const [e, t] = W(0), r = F(Se), n = Pe(r.activeRule$, r.activeRule), { unitId: i, subUnitId: o, rule: a } = n || {}, l = a.uid, s = F(Me), d = F(ce), u = F(gn), h = F(te), c = F(hn), m = F(ue), [p, b] = W(a), y = s.getValidatorItem(p.type), [g, C] = W(!1), v = s.getValidatorsByScope(di.SHEET), [I, w] = W(() => p.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), _ = ct(() => ho(h), [h]), [R, L] = W(!1), [N, E] = W(!1), T = pt(null), O = F(Gn);
1817
1389
  if (ke(() => () => {
1818
1390
  const f = O.getCurrentLastSelection();
1819
1391
  f && O.setSelections([f]);
@@ -1826,14 +1398,14 @@ function yo() {
1826
1398
  });
1827
1399
  }, [h, c, l, o, i]), !y)
1828
1400
  return null;
1829
- const P = y.operators, k = y.operatorNames, H = p.operator ? di.includes(p.operator) : !1, B = () => {
1401
+ const P = y.operators, k = y.operatorNames, H = p.operator ? ci.includes(p.operator) : !1, B = () => {
1830
1402
  var f, A, x;
1831
1403
  (A = (f = T.current) == null ? void 0 : f.editor) != null && A.isFocus() && J((x = T.current) == null ? void 0 : x.getValue()), !(!p.ranges.length || R) && (y.validatorFormula(p, i, o).success ? r.setActiveRule(null) : C(!0));
1832
- }, J = Gt((f) => {
1833
- const A = f.split(",").filter(Boolean).map(Ti).map((ee) => {
1404
+ }, J = en((f) => {
1405
+ const A = f.split(",").filter(Boolean).map(Oi).map((ee) => {
1834
1406
  const wn = ee.sheetName;
1835
1407
  if (wn) {
1836
- const Or = Ro(d, ee.unitId, wn);
1408
+ const Or = po(d, ee.unitId, wn);
1837
1409
  return { ...ee, sheetId: Or };
1838
1410
  }
1839
1411
  return {
@@ -1856,9 +1428,9 @@ function yo() {
1856
1428
  ruleId: l,
1857
1429
  ranges: x
1858
1430
  };
1859
- _(er.id, we);
1431
+ _(rr.id, we);
1860
1432
  }), ne = (f) => {
1861
- if (yn(f, Vn(p)))
1433
+ if (Rn(f, On(p)))
1862
1434
  return;
1863
1435
  b({
1864
1436
  ...p,
@@ -1871,12 +1443,12 @@ function yo() {
1871
1443
  setting: f
1872
1444
  };
1873
1445
  _(
1874
- bn.id,
1446
+ En.id,
1875
1447
  A,
1876
1448
  void 0
1877
1449
  );
1878
1450
  }, oe = async () => {
1879
- await h.executeCommand(nr.id, {
1451
+ await h.executeCommand(or.id, {
1880
1452
  ruleId: l,
1881
1453
  unitId: i,
1882
1454
  subUnitId: o
@@ -1901,18 +1473,18 @@ function yo() {
1901
1473
  formula1: void 0,
1902
1474
  formula2: void 0
1903
1475
  };
1904
- b(ee), h.executeCommand(bn.id, {
1476
+ b(ee), h.executeCommand(En.id, {
1905
1477
  unitId: i,
1906
1478
  subUnitId: o,
1907
1479
  ruleId: p.uid,
1908
- setting: Vn(ee)
1480
+ setting: On(ee)
1909
1481
  });
1910
- }, Z = u.get(y.formulaInput), fe = ct(() => I.map((f) => fr(f.range)).join(","), []), Q = Dn(p), q = (f) => {
1911
- yn(f, Dn(p)) || (b({
1482
+ }, Z = u.get(y.formulaInput), fe = ct(() => I.map((f) => vr(f.range)).join(","), []), Q = Vn(p), q = (f) => {
1483
+ Rn(f, Vn(p)) || (b({
1912
1484
  ...p,
1913
1485
  ...f
1914
1486
  }), _(
1915
- Kr.id,
1487
+ ei.id,
1916
1488
  {
1917
1489
  unitId: i,
1918
1490
  subUnitId: o,
@@ -1928,7 +1500,7 @@ function yo() {
1928
1500
  label: m.t("dataValidation.panel.range"),
1929
1501
  error: !p.ranges.length || R ? m.t("dataValidation.panel.rangeError") : "",
1930
1502
  children: /* @__PURE__ */ S(
1931
- si,
1503
+ Ti,
1932
1504
  {
1933
1505
  selectorRef: T,
1934
1506
  unitId: i,
@@ -1946,244 +1518,654 @@ function yo() {
1946
1518
  }
1947
1519
  )
1948
1520
  }
1949
- ),
1950
- /* @__PURE__ */ S(Y, { label: m.t("dataValidation.panel.type"), children: /* @__PURE__ */ S(
1951
- En,
1521
+ ),
1522
+ /* @__PURE__ */ S(Y, { label: m.t("dataValidation.panel.type"), children: /* @__PURE__ */ S(
1523
+ Ln,
1524
+ {
1525
+ className: "univer-w-full",
1526
+ value: p.type,
1527
+ options: (D = v == null ? void 0 : v.sort((f, A) => f.order - A.order)) == null ? void 0 : D.map((f) => ({
1528
+ label: m.t(f.title),
1529
+ value: f.id
1530
+ })),
1531
+ onChange: z
1532
+ }
1533
+ ) }),
1534
+ P != null && P.length ? /* @__PURE__ */ S(Y, { label: m.t("dataValidation.panel.operator"), children: /* @__PURE__ */ S(
1535
+ Ln,
1536
+ {
1537
+ className: "univer-w-full",
1538
+ value: `${p.operator}`,
1539
+ options: [
1540
+ {
1541
+ value: "",
1542
+ label: m.t("dataValidation.operators.legal")
1543
+ },
1544
+ ...P.map((f, A) => ({
1545
+ value: `${f}`,
1546
+ label: k[A]
1547
+ }))
1548
+ ],
1549
+ onChange: (f) => {
1550
+ ne({
1551
+ ...he,
1552
+ operator: f
1553
+ });
1554
+ }
1555
+ }
1556
+ ) }) : null,
1557
+ Z && !G ? /* @__PURE__ */ S(
1558
+ Z,
1559
+ {
1560
+ isTwoFormula: H,
1561
+ value: {
1562
+ formula1: p.formula1,
1563
+ formula2: p.formula2
1564
+ },
1565
+ onChange: (f) => {
1566
+ ne({
1567
+ ...he,
1568
+ ...f
1569
+ });
1570
+ },
1571
+ showError: g,
1572
+ validResult: y.validatorFormula(p, i, o),
1573
+ unitId: i,
1574
+ subUnitId: o,
1575
+ ruleId: l
1576
+ },
1577
+ e + p.type
1578
+ ) : null,
1579
+ /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
1580
+ At,
1581
+ {
1582
+ checked: (U = p.allowBlank) != null ? U : !0,
1583
+ onChange: () => {
1584
+ var f;
1585
+ return ne({
1586
+ ...he,
1587
+ allowBlank: !((f = p.allowBlank) == null || f)
1588
+ });
1589
+ },
1590
+ children: m.t("dataValidation.panel.allowBlank")
1591
+ }
1592
+ ) }),
1593
+ /* @__PURE__ */ S(uo, { value: Q, onChange: q, extraComponent: y.optionsInput }),
1594
+ /* @__PURE__ */ $("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
1595
+ /* @__PURE__ */ S(Ge, { className: "univer-ml-3", onClick: oe, children: m.t("dataValidation.panel.removeRule") }),
1596
+ /* @__PURE__ */ S(Ge, { className: "univer-ml-3", variant: "primary", onClick: B, children: m.t("dataValidation.panel.done") })
1597
+ ] })
1598
+ ] });
1599
+ }
1600
+ const vo = (e) => {
1601
+ const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = F(Me), l = F(te), s = F(Ei), d = a.getValidatorItem(t.type), u = pt(void 0), [h, c] = W(!1), m = F(Xn), p = Pe(m.currentTheme$), b = ct(() => {
1602
+ var w;
1603
+ const g = m.getColorFromTheme("primary.600"), C = m.getColorFromTheme("loop-color.2"), v = (w = m.getColorFromTheme(C)) != null ? w : g, I = new $r(v).toRgb();
1604
+ return {
1605
+ fill: `rgba(${I.r}, ${I.g}, ${I.b}, 0.1)`,
1606
+ stroke: v
1607
+ };
1608
+ }, [p]), y = (g) => {
1609
+ l.executeCommand(or.id, {
1610
+ ruleId: t.uid,
1611
+ unitId: n,
1612
+ subUnitId: i
1613
+ }), g.stopPropagation();
1614
+ };
1615
+ return ke(() => () => {
1616
+ var g;
1617
+ u.current && ((g = u.current) == null || g.forEach((C) => {
1618
+ C && s.removeShape(C);
1619
+ }));
1620
+ }, [s]), /* @__PURE__ */ $(
1621
+ "div",
1622
+ {
1623
+ className: Ne(
1624
+ `
1625
+ univer-bg-secondary univer-relative univer--ml-2 univer--mr-2 univer-box-border univer-flex
1626
+ univer-w-[287px] univer-cursor-pointer univer-flex-col univer-justify-between univer-overflow-hidden
1627
+ univer-rounded-md univer-p-2 univer-pr-9
1628
+ `,
1629
+ {
1630
+ "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-700": !o,
1631
+ "univer-opacity-50": o
1632
+ }
1633
+ ),
1634
+ onClick: r,
1635
+ onMouseEnter: () => {
1636
+ o || (c(!0), u.current = t.ranges.map((g) => s.addShape({
1637
+ range: g,
1638
+ style: b,
1639
+ primary: null
1640
+ })));
1641
+ },
1642
+ onMouseLeave: () => {
1643
+ var g;
1644
+ c(!1), (g = u.current) == null || g.forEach((C) => {
1645
+ C && s.removeShape(C);
1646
+ }), u.current = void 0;
1647
+ },
1648
+ children: [
1649
+ /* @__PURE__ */ S(
1650
+ "div",
1651
+ {
1652
+ className: "univer-truncate univer-text-sm univer-font-medium univer-leading-[22px] univer-text-gray-900 dark:!univer-text-white",
1653
+ children: d == null ? void 0 : d.generateRuleName(t)
1654
+ }
1655
+ ),
1656
+ /* @__PURE__ */ S(
1657
+ "div",
1658
+ {
1659
+ className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px] dark:!univer-text-gray-300",
1660
+ children: t.ranges.map((g) => vr(g)).join(",")
1661
+ }
1662
+ ),
1663
+ h ? /* @__PURE__ */ S(
1664
+ "div",
1665
+ {
1666
+ className: "univer-absolute univer-right-2 univer-top-[19px] univer-flex univer-h-5 univer-w-5 univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 dark:!univer-text-gray-300 dark:hover:!univer-bg-gray-700",
1667
+ onClick: y,
1668
+ children: /* @__PURE__ */ S(Sn, {})
1669
+ }
1670
+ ) : null
1671
+ ]
1672
+ }
1673
+ );
1674
+ };
1675
+ function fo(e) {
1676
+ const t = F(ie), r = F(ce), n = F(te), i = F(be), o = F(Se), a = F(ue), [l, s] = W([]), { workbook: d } = e, u = Pe(d.activeSheet$, void 0, !0), h = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
1677
+ ke(() => {
1678
+ s(t.getRules(h, c));
1679
+ const C = t.ruleChange$.subscribe((v) => {
1680
+ v.unitId === h && v.subUnitId === c && s(t.getRules(h, c));
1681
+ });
1682
+ return () => {
1683
+ C.unsubscribe();
1684
+ };
1685
+ }, [h, c, t]);
1686
+ const m = async () => {
1687
+ const C = tr(i), v = {
1688
+ unitId: h,
1689
+ subUnitId: c,
1690
+ rule: C
1691
+ };
1692
+ await n.executeCommand(cn.id, v), o.setActiveRule({
1693
+ unitId: h,
1694
+ subUnitId: c,
1695
+ rule: C
1696
+ });
1697
+ }, p = () => {
1698
+ n.executeCommand(ti.id, {
1699
+ unitId: h,
1700
+ subUnitId: c
1701
+ });
1702
+ }, y = ((C) => {
1703
+ const v = r.getCurrentUnitForType(X.UNIVER_SHEET), I = v.getActiveSheet(), w = v.getUnitId(), _ = I.getSheetId();
1704
+ return C.map((L) => Jr(i, w, _, L.ranges) ? { ...L } : { ...L, disable: !0 });
1705
+ })(l), g = y == null ? void 0 : y.some((C) => C.disable);
1706
+ return /* @__PURE__ */ $("div", { className: "univer-pb-4", children: [
1707
+ y == null ? void 0 : y.map((C) => {
1708
+ var v;
1709
+ return /* @__PURE__ */ S(
1710
+ vo,
1711
+ {
1712
+ unitId: h,
1713
+ subUnitId: c,
1714
+ onClick: () => {
1715
+ C.disable || o.setActiveRule({
1716
+ unitId: h,
1717
+ subUnitId: c,
1718
+ rule: C
1719
+ });
1720
+ },
1721
+ rule: C,
1722
+ disable: (v = C.disable) != null ? v : !1
1723
+ },
1724
+ C.uid
1725
+ );
1726
+ }),
1727
+ /* @__PURE__ */ $("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
1728
+ l.length && !g ? /* @__PURE__ */ S(Ge, { onClick: p, children: a.t("dataValidation.panel.removeAll") }) : null,
1729
+ /* @__PURE__ */ S(Ge, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
1730
+ ] })
1731
+ ] });
1732
+ }
1733
+ const mo = () => {
1734
+ const e = F(Se), t = Pe(e.activeRule$, e.activeRule), r = F(ce), n = Pe(
1735
+ () => r.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
1736
+ void 0,
1737
+ void 0,
1738
+ []
1739
+ ), i = Pe(() => {
1740
+ var o;
1741
+ return (o = n == null ? void 0 : n.activeSheet$) != null ? o : mi(null);
1742
+ }, void 0, void 0, []);
1743
+ return !n || !i ? null : t && t.subUnitId === i.getSheetId() ? /* @__PURE__ */ S(go, {}, t.rule.uid) : /* @__PURE__ */ S(fo, { workbook: n });
1744
+ }, _o = (e) => {
1745
+ const { isTwoFormula: t = !1, value: r, onChange: n, showError: i, validResult: o } = e, a = F(ue), l = i ? o == null ? void 0 : o.formula1 : "", s = i ? o == null ? void 0 : o.formula2 : "";
1746
+ return t ? /* @__PURE__ */ $(ut, { children: [
1747
+ /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
1748
+ Le,
1749
+ {
1750
+ className: "univer-w-full",
1751
+ placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
1752
+ value: r == null ? void 0 : r.formula1,
1753
+ onChange: (d) => {
1754
+ n == null || n({
1755
+ ...r,
1756
+ formula1: d
1757
+ });
1758
+ }
1759
+ }
1760
+ ) }),
1761
+ /* @__PURE__ */ S("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
1762
+ /* @__PURE__ */ S(Y, { error: s, children: /* @__PURE__ */ S(
1763
+ Le,
1764
+ {
1765
+ className: "univer-w-full",
1766
+ placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
1767
+ value: r == null ? void 0 : r.formula2,
1768
+ onChange: (d) => {
1769
+ n == null || n({
1770
+ ...r,
1771
+ formula2: d
1772
+ });
1773
+ }
1774
+ }
1775
+ ) })
1776
+ ] }) : /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
1777
+ Le,
1778
+ {
1779
+ className: "univer-w-full",
1780
+ placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
1781
+ value: r == null ? void 0 : r.formula1,
1782
+ onChange: (d) => {
1783
+ n == null || n({ formula1: d });
1784
+ }
1785
+ }
1786
+ ) });
1787
+ };
1788
+ function So(e) {
1789
+ const { value: t, onChange: r, showError: n, validResult: i } = e, o = F(ue), a = n ? i == null ? void 0 : i.formula1 : "", l = n ? i == null ? void 0 : i.formula2 : "", [s, d] = W(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
1790
+ return /* @__PURE__ */ $(ut, { children: [
1791
+ /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
1792
+ At,
1952
1793
  {
1953
- className: "univer-w-full",
1954
- value: p.type,
1955
- options: (D = v == null ? void 0 : v.sort((f, A) => f.order - A.order)) == null ? void 0 : D.map((f) => ({
1956
- label: m.t(f.title),
1957
- value: f.id
1958
- })),
1959
- onChange: z
1794
+ checked: s,
1795
+ onChange: (u) => {
1796
+ u ? d(!0) : (d(!1), r == null || r({
1797
+ ...t,
1798
+ formula1: void 0,
1799
+ formula2: void 0
1800
+ }));
1801
+ },
1802
+ children: o.t("dataValidation.checkbox.tips")
1960
1803
  }
1961
1804
  ) }),
1962
- P != null && P.length ? /* @__PURE__ */ S(Y, { label: m.t("dataValidation.panel.operator"), children: /* @__PURE__ */ S(
1963
- En,
1805
+ s ? /* @__PURE__ */ S(Y, { label: o.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ S(
1806
+ Le,
1964
1807
  {
1965
1808
  className: "univer-w-full",
1966
- value: `${p.operator}`,
1967
- options: [
1968
- {
1969
- value: "",
1970
- label: m.t("dataValidation.operators.legal")
1971
- },
1972
- ...P.map((f, A) => ({
1973
- value: `${f}`,
1974
- label: k[A]
1975
- }))
1976
- ],
1977
- onChange: (f) => {
1978
- ne({
1979
- ...he,
1980
- operator: f
1809
+ placeholder: o.t("dataValidation.panel.valuePlaceholder"),
1810
+ value: t == null ? void 0 : t.formula1,
1811
+ onChange: (u) => {
1812
+ r == null || r({
1813
+ ...t,
1814
+ formula1: u || void 0
1981
1815
  });
1982
1816
  }
1983
1817
  }
1984
1818
  ) }) : null,
1985
- Z && !G ? /* @__PURE__ */ S(
1986
- Z,
1819
+ s ? /* @__PURE__ */ S(Y, { label: o.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ S(
1820
+ Le,
1987
1821
  {
1988
- isTwoFormula: H,
1989
- value: {
1990
- formula1: p.formula1,
1991
- formula2: p.formula2
1992
- },
1993
- onChange: (f) => {
1994
- ne({
1995
- ...he,
1996
- ...f
1822
+ className: "univer-w-full",
1823
+ placeholder: o.t("dataValidation.panel.valuePlaceholder"),
1824
+ value: t == null ? void 0 : t.formula2,
1825
+ onChange: (u) => {
1826
+ r == null || r({
1827
+ ...t,
1828
+ formula2: u || void 0
1997
1829
  });
1998
- },
1999
- showError: g,
2000
- validResult: y.validatorFormula(p, i, o),
2001
- unitId: i,
2002
- subUnitId: o,
2003
- ruleId: l
1830
+ }
1831
+ }
1832
+ ) }) : null
1833
+ ] });
1834
+ }
1835
+ function Co(e) {
1836
+ var h;
1837
+ const { unitId: t, subUnitId: r, value: n, onChange: i, showError: o, validResult: a } = e, l = o ? a == null ? void 0 : a.formula1 : void 0, s = pt(null), [d, u] = W(!1);
1838
+ return cr((c) => {
1839
+ var p;
1840
+ ((p = s.current) == null ? void 0 : p.isClickOutSide(c)) && u(!1);
1841
+ }), /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
1842
+ fr,
1843
+ {
1844
+ ref: s,
1845
+ className: Ne("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", yt),
1846
+ initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
1847
+ unitId: t,
1848
+ subUnitId: r,
1849
+ isFocus: d,
1850
+ isSupportAcrossSheet: !0,
1851
+ onChange: (c) => {
1852
+ const m = (c != null ? c : "").trim();
1853
+ m !== (n == null ? void 0 : n.formula1) && (i == null || i({
1854
+ ...n,
1855
+ formula1: m
1856
+ }));
2004
1857
  },
2005
- e + p.type
2006
- ) : null,
2007
- /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
2008
- At,
1858
+ onFocus: () => u(!0)
1859
+ }
1860
+ ) });
1861
+ }
1862
+ const Ye = "#ECECEC", wo = [
1863
+ "#FFFFFF",
1864
+ "#FEE7E7",
1865
+ "#FEF0E6",
1866
+ "#EFFBD0",
1867
+ "#E4F4FE",
1868
+ "#E8ECFD",
1869
+ "#F1EAFA",
1870
+ "#FDE8F3",
1871
+ "#E5E5E5",
1872
+ "#FDCECE",
1873
+ "#FDC49B",
1874
+ "#DEF6A2",
1875
+ "#9FDAFF",
1876
+ "#D0D9FB",
1877
+ "#E3D5F6",
1878
+ "#FBD0E8",
1879
+ "#656565",
1880
+ "#FE4B4B",
1881
+ "#FF8C51",
1882
+ "#8BBB11",
1883
+ "#0B9EFB",
1884
+ "#3A60F7",
1885
+ "#9E6DE3",
1886
+ "#F248A6"
1887
+ ], Io = (e) => {
1888
+ const { value: t, onChange: r, disabled: n } = e, [i, o] = W(!1);
1889
+ return /* @__PURE__ */ S(
1890
+ Vi,
1891
+ {
1892
+ align: "start",
1893
+ disabled: n,
1894
+ open: i,
1895
+ onOpenChange: o,
1896
+ overlay: /* @__PURE__ */ S(
1897
+ "div",
1898
+ {
1899
+ className: "univer-box-border univer-grid univer-w-fit univer-grid-cols-6 univer-flex-wrap univer-gap-2 univer-p-1.5",
1900
+ children: wo.map(
1901
+ (a) => /* @__PURE__ */ S(
1902
+ "div",
1903
+ {
1904
+ className: Ne("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", yt),
1905
+ style: { background: a },
1906
+ onClick: () => {
1907
+ r(a), o(!1);
1908
+ }
1909
+ },
1910
+ a
1911
+ )
1912
+ )
1913
+ }
1914
+ ),
1915
+ children: /* @__PURE__ */ $(
1916
+ "div",
1917
+ {
1918
+ className: Ne("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", yt),
1919
+ children: [
1920
+ /* @__PURE__ */ S(
1921
+ "div",
1922
+ {
1923
+ className: "univer-box-border univer-h-4 univer-w-4 univer-rounded univer-text-base",
1924
+ style: { background: t }
1925
+ }
1926
+ ),
1927
+ /* @__PURE__ */ S(Cn, {})
1928
+ ]
1929
+ }
1930
+ )
1931
+ }
1932
+ );
1933
+ }, Fn = (e) => {
1934
+ const { item: t, commonProps: r, className: n } = e, { onItemChange: i, onItemDelete: o } = r;
1935
+ return /* @__PURE__ */ $("div", { className: Ne("univer-flex univer-items-center univer-gap-2", n), children: [
1936
+ !t.isRef && /* @__PURE__ */ S("div", { className: Ne("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(Mr, {}) }),
1937
+ /* @__PURE__ */ S(
1938
+ Io,
1939
+ {
1940
+ value: t.color,
1941
+ onChange: (a) => {
1942
+ i(t.id, t.label, a);
1943
+ }
1944
+ }
1945
+ ),
1946
+ /* @__PURE__ */ S(
1947
+ Le,
1948
+ {
1949
+ disabled: t.isRef,
1950
+ value: t.label,
1951
+ onChange: (a) => {
1952
+ i(t.id, a, t.color);
1953
+ }
1954
+ }
1955
+ ),
1956
+ t.isRef ? null : /* @__PURE__ */ S(
1957
+ "div",
1958
+ {
1959
+ className: "univer-ml-1 univer-cursor-pointer univer-rounded univer-text-base hover:univer-bg-gray-200",
1960
+ children: /* @__PURE__ */ S(Sn, { onClick: () => o(t.id) })
1961
+ }
1962
+ )
1963
+ ] });
1964
+ };
1965
+ function Ro(e) {
1966
+ const { value: t, onChange: r = () => {
1967
+ }, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = W(() => Oe(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [p, b] = W(u === "1" ? s : "="), y = F(ue), g = F(Me), C = F(hn), v = F(ni), [I, w] = W(() => d.split(",")), _ = g.getValidatorItem(j.LIST), [R, L] = W([]), [N, E] = W(""), T = a ? o == null ? void 0 : o.formula1 : "", O = ct(() => C.ruleChange$.pipe(ur(16)), []), P = Pe(O), k = en(r);
1968
+ ke(() => {
1969
+ (async () => {
1970
+ await new Promise((f) => {
1971
+ setTimeout(() => f(!0), 100);
1972
+ });
1973
+ const D = C.getRuleById(n, i, l), U = D == null ? void 0 : D.formula1;
1974
+ if (Oe(U) && _ && D) {
1975
+ const f = await _.getListAsync(D, n, i);
1976
+ L(f);
1977
+ }
1978
+ })();
1979
+ }, [C, P, _, l, i, n]), ke(() => {
1980
+ Oe(s) && s !== p && (m(s), b(p));
1981
+ }, [p, s]);
1982
+ const [H, B] = W(() => {
1983
+ const D = u !== "1" ? ri(s) : [], U = d.split(",");
1984
+ return D.map((f, A) => ({
1985
+ label: f,
1986
+ color: U[A] || Ye,
1987
+ isRef: !1,
1988
+ id: yn.generateRandomId(4)
1989
+ }));
1990
+ }), J = (D, U, f) => {
1991
+ const A = H.find((x) => x.id === D);
1992
+ A && (A.label = U, A.color = f, B([...H]));
1993
+ }, ne = (D) => {
1994
+ const U = H.findIndex((f) => f.id === D);
1995
+ U !== -1 && (H.splice(U, 1), B([...H]));
1996
+ }, oe = d.split(","), he = ct(() => R.map((D, U) => ({
1997
+ label: D,
1998
+ color: oe[U] || Ye,
1999
+ id: `${U}`,
2000
+ isRef: !0
2001
+ })), [oe, R]), z = (D, U, f) => {
2002
+ const A = [...I];
2003
+ A[+D] = f, w(A), k({
2004
+ formula1: s,
2005
+ formula2: A.join(",")
2006
+ });
2007
+ }, Z = () => {
2008
+ B([
2009
+ ...H,
2010
+ {
2011
+ label: "",
2012
+ color: Ye,
2013
+ isRef: !1,
2014
+ id: yn.generateRandomId(4)
2015
+ }
2016
+ ]);
2017
+ };
2018
+ ke(() => {
2019
+ if (u === "1")
2020
+ return;
2021
+ const D = /* @__PURE__ */ new Set(), U = [];
2022
+ H.map((f) => ({
2023
+ labelList: f.label.split(","),
2024
+ item: f
2025
+ })).forEach(({ item: f, labelList: A }) => {
2026
+ A.forEach((x) => {
2027
+ D.has(x) || (D.add(x), U.push({
2028
+ label: x,
2029
+ color: f.color
2030
+ }));
2031
+ });
2032
+ }), k({
2033
+ formula1: er(U.map((f) => f.label)),
2034
+ formula2: U.map((f) => f.color === Ye ? "" : f.color).join(",")
2035
+ });
2036
+ }, [H, k, u, p, I]);
2037
+ const fe = en(async (D) => {
2038
+ if (!Oe(D)) {
2039
+ k == null || k({
2040
+ formula1: "",
2041
+ formula2: d
2042
+ });
2043
+ return;
2044
+ }
2045
+ v.getFormulaRefCheck(D) ? (k == null || k({
2046
+ formula1: Oe(D) ? D : "",
2047
+ formula2: d
2048
+ }), E("")) : (k == null || k({
2049
+ formula1: "",
2050
+ formula2: d
2051
+ }), m("="), E(y.t("dataValidation.validFail.formulaError")));
2052
+ }), Q = pt(null), [q, G] = W(!1);
2053
+ return cr((D) => {
2054
+ var f;
2055
+ ((f = Q.current) == null ? void 0 : f.isClickOutSide(D)) && G(!1);
2056
+ }), /* @__PURE__ */ $(ut, { children: [
2057
+ /* @__PURE__ */ S(Y, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ $(
2058
+ fn,
2009
2059
  {
2010
- checked: (U = p.allowBlank) != null ? U : !0,
2011
- onChange: () => {
2012
- var f;
2013
- return ne({
2014
- ...he,
2015
- allowBlank: !((f = p.allowBlank) == null || f)
2060
+ value: u,
2061
+ onChange: (D) => {
2062
+ h(D), m(p), D === "1" && k({
2063
+ formula1: p === "=" ? "" : p,
2064
+ formula2: I.join(",")
2016
2065
  });
2017
2066
  },
2018
- children: m.t("dataValidation.panel.allowBlank")
2067
+ children: [
2068
+ /* @__PURE__ */ S(Ae, { value: "0", children: y.t("dataValidation.list.customOptions") }),
2069
+ /* @__PURE__ */ S(Ae, { value: "1", children: y.t("dataValidation.list.refOptions") })
2070
+ ]
2019
2071
  }
2020
2072
  ) }),
2021
- /* @__PURE__ */ S(wo, { value: Q, onChange: q, extraComponent: y.optionsInput }),
2022
- /* @__PURE__ */ $("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
2023
- /* @__PURE__ */ S(Ke, { className: "univer-ml-3", onClick: oe, children: m.t("dataValidation.panel.removeRule") }),
2024
- /* @__PURE__ */ S(Ke, { className: "univer-ml-3", variant: "primary", onClick: B, children: m.t("dataValidation.panel.done") })
2025
- ] })
2026
- ] });
2027
- }
2028
- const bo = (e) => {
2029
- const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = F(Me), l = F(te), s = F(Oi), d = a.getValidatorItem(t.type), u = pt(void 0), [h, c] = W(!1), m = F(Xn), p = Le(m.currentTheme$), b = ct(() => {
2030
- var w;
2031
- const g = m.getColorFromTheme("primary.600"), C = m.getColorFromTheme("loop-color.2"), v = (w = m.getColorFromTheme(C)) != null ? w : g, I = new $r(v).toRgb();
2032
- return {
2033
- fill: `rgba(${I.r}, ${I.g}, ${I.b}, 0.1)`,
2034
- stroke: v
2035
- };
2036
- }, [p]), y = (g) => {
2037
- l.executeCommand(nr.id, {
2038
- ruleId: t.uid,
2039
- unitId: n,
2040
- subUnitId: i
2041
- }), g.stopPropagation();
2042
- };
2043
- return ke(() => () => {
2044
- var g;
2045
- u.current && ((g = u.current) == null || g.forEach((C) => {
2046
- C && s.removeShape(C);
2047
- }));
2048
- }, [s]), /* @__PURE__ */ $(
2049
- "div",
2050
- {
2051
- className: Ne(
2052
- `
2053
- univer-bg-secondary univer-relative univer--ml-2 univer--mr-2 univer-box-border univer-flex
2054
- univer-w-[287px] univer-cursor-pointer univer-flex-col univer-justify-between univer-overflow-hidden
2055
- univer-rounded-md univer-p-2 univer-pr-9
2056
- `,
2073
+ u === "1" ? /* @__PURE__ */ $(Y, { error: T || N || void 0, children: [
2074
+ /* @__PURE__ */ S(
2075
+ fr,
2057
2076
  {
2058
- "hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-700": !o,
2059
- "univer-opacity-50": o
2077
+ ref: Q,
2078
+ className: Ne("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", yt),
2079
+ initValue: c,
2080
+ unitId: n,
2081
+ subUnitId: i,
2082
+ isFocus: q,
2083
+ isSupportAcrossSheet: !0,
2084
+ onFocus: () => G(!0),
2085
+ onChange: (D = "") => {
2086
+ const U = (D != null ? D : "").trim();
2087
+ b(U), fe(U);
2088
+ }
2060
2089
  }
2061
2090
  ),
2062
- onClick: r,
2063
- onMouseEnter: () => {
2064
- o || (c(!0), u.current = t.ranges.map((g) => s.addShape({
2065
- range: g,
2066
- style: b,
2067
- primary: null
2068
- })));
2069
- },
2070
- onMouseLeave: () => {
2071
- var g;
2072
- c(!1), (g = u.current) == null || g.forEach((C) => {
2073
- C && s.removeShape(C);
2074
- }), u.current = void 0;
2075
- },
2076
- children: [
2077
- /* @__PURE__ */ S(
2078
- "div",
2079
- {
2080
- className: "univer-truncate univer-text-sm univer-font-medium univer-leading-[22px] univer-text-gray-900 dark:!univer-text-white",
2081
- children: d == null ? void 0 : d.generateRuleName(t)
2082
- }
2083
- ),
2084
- /* @__PURE__ */ S(
2085
- "div",
2086
- {
2087
- className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px] dark:!univer-text-gray-300",
2088
- children: t.ranges.map((g) => fr(g)).join(",")
2089
- }
2090
- ),
2091
- h ? /* @__PURE__ */ S(
2092
- "div",
2093
- {
2094
- className: "univer-absolute univer-right-2 univer-top-[19px] univer-flex univer-h-5 univer-w-5 univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-200 dark:!univer-text-gray-300 dark:hover:!univer-bg-gray-700",
2095
- onClick: y,
2096
- children: /* @__PURE__ */ S(mn, {})
2097
- }
2098
- ) : null
2099
- ]
2100
- }
2101
- );
2102
- };
2103
- function Mo(e) {
2104
- const t = F(ie), r = F(ue), n = F(te), i = F(ye), o = F(Ce), a = F(ce), [l, s] = W([]), { workbook: d } = e, u = Le(d.activeSheet$, void 0, !0), h = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
2105
- ke(() => {
2106
- s(t.getRules(h, c));
2107
- const C = t.ruleChange$.subscribe((v) => {
2108
- v.unitId === h && v.subUnitId === c && s(t.getRules(h, c));
2109
- });
2110
- return () => {
2111
- C.unsubscribe();
2112
- };
2113
- }, [h, c, t]);
2114
- const m = async () => {
2115
- const C = Jn(i), v = {
2116
- unitId: h,
2117
- subUnitId: c,
2118
- rule: C
2119
- };
2120
- await n.executeCommand(cn.id, v), o.setActiveRule({
2121
- unitId: h,
2122
- subUnitId: c,
2123
- rule: C
2124
- });
2125
- }, p = () => {
2126
- n.executeCommand(zr.id, {
2127
- unitId: h,
2128
- subUnitId: c
2129
- });
2130
- }, y = ((C) => {
2131
- const v = r.getCurrentUnitForType(X.UNIVER_SHEET), I = v.getActiveSheet(), w = v.getUnitId(), _ = I.getSheetId();
2132
- return C.map((L) => Ci(i, w, _, L.ranges) ? { ...L } : { ...L, disable: !0 });
2133
- })(l), g = y == null ? void 0 : y.some((C) => C.disable);
2134
- return /* @__PURE__ */ $("div", { className: "univer-pb-4", children: [
2135
- y == null ? void 0 : y.map((C) => {
2136
- var v;
2137
- return /* @__PURE__ */ S(
2138
- bo,
2091
+ he.length > 0 && /* @__PURE__ */ S("div", { className: "univer-mt-3", children: he.map((D) => /* @__PURE__ */ S(
2092
+ Fn,
2139
2093
  {
2140
- unitId: h,
2141
- subUnitId: c,
2142
- onClick: () => {
2143
- C.disable || o.setActiveRule({
2144
- unitId: h,
2145
- subUnitId: c,
2146
- rule: C
2147
- });
2148
- },
2149
- rule: C,
2150
- disable: (v = C.disable) != null ? v : !1
2094
+ className: "univer-mb-3",
2095
+ item: D,
2096
+ commonProps: { onItemChange: z }
2151
2097
  },
2152
- C.uid
2153
- );
2154
- }),
2155
- /* @__PURE__ */ $("div", { className: "univer-mt-4 univer-flex univer-flex-row univer-justify-end univer-gap-2", children: [
2156
- l.length && !g ? /* @__PURE__ */ S(Ke, { onClick: p, children: a.t("dataValidation.panel.removeAll") }) : null,
2157
- /* @__PURE__ */ S(Ke, { variant: "primary", onClick: m, children: a.t("dataValidation.panel.add") })
2158
- ] })
2098
+ D.id
2099
+ )) })
2100
+ ] }) : /* @__PURE__ */ S(Y, { error: T, children: /* @__PURE__ */ $("div", { className: "-univer-mt-3", children: [
2101
+ /* @__PURE__ */ S(
2102
+ Di,
2103
+ {
2104
+ list: H,
2105
+ onListChange: B,
2106
+ rowHeight: 28,
2107
+ margin: [0, 12],
2108
+ draggableHandle: ".draggableHandle",
2109
+ itemRender: (D) => /* @__PURE__ */ S(
2110
+ Fn,
2111
+ {
2112
+ item: D,
2113
+ commonProps: {
2114
+ onItemChange: J,
2115
+ onItemDelete: ne
2116
+ }
2117
+ },
2118
+ D.id
2119
+ ),
2120
+ idKey: "id"
2121
+ }
2122
+ ),
2123
+ /* @__PURE__ */ $(
2124
+ "a",
2125
+ {
2126
+ className: "univer-text-primary univer-flex univer-w-fit univer-cursor-pointer univer-flex-row univer-items-center univer-rounded univer-p-1 univer-px-2 univer-text-sm hover:univer-bg-primary-50 dark:hover:!univer-bg-gray-800",
2127
+ onClick: Z,
2128
+ children: [
2129
+ /* @__PURE__ */ S(yr, { className: "univer-mr-1" }),
2130
+ y.t("dataValidation.list.add")
2131
+ ]
2132
+ }
2133
+ )
2134
+ ] }) })
2159
2135
  ] });
2160
2136
  }
2161
- const Eo = () => {
2162
- const e = F(Ce), t = Le(e.activeRule$, e.activeRule), r = F(ue), n = Le(
2163
- () => r.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
2164
- void 0,
2165
- void 0,
2166
- []
2167
- ), i = Le(() => {
2168
- var o;
2169
- return (o = n == null ? void 0 : n.activeSheet$) != null ? o : hi(null);
2170
- }, void 0, void 0, []);
2171
- return !n || !i ? null : t && t.subUnitId === i.getSheetId() ? /* @__PURE__ */ S(yo, {}, t.rule.uid) : /* @__PURE__ */ S(Mo, { workbook: n });
2172
- }, Do = "LIST_RENDER_MODE_OPTION_INPUT";
2137
+ const yo = [
2138
+ [
2139
+ ar,
2140
+ Co
2141
+ ],
2142
+ [
2143
+ Pt,
2144
+ _o
2145
+ ],
2146
+ [
2147
+ un,
2148
+ Ro
2149
+ ],
2150
+ [
2151
+ sr,
2152
+ So
2153
+ ]
2154
+ ], bo = "LIST_RENDER_MODE_OPTION_INPUT";
2173
2155
  function Dt(e) {
2174
2156
  var i;
2175
- const { value: t, onChange: r } = e, n = F(ce);
2176
- return /* @__PURE__ */ S(Y, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ $(un, { value: `${(i = t.renderMode) != null ? i : se.CUSTOM}`, onChange: (o) => r({ ...t, renderMode: +o }), children: [
2157
+ const { value: t, onChange: r } = e, n = F(ue);
2158
+ return /* @__PURE__ */ S(Y, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ $(fn, { value: `${(i = t.renderMode) != null ? i : se.CUSTOM}`, onChange: (o) => r({ ...t, renderMode: +o }), children: [
2177
2159
  /* @__PURE__ */ S(Ae, { value: `${se.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
2178
2160
  /* @__PURE__ */ S(Ae, { value: `${se.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
2179
2161
  /* @__PURE__ */ S(Ae, { value: `${se.TEXT}`, children: n.t("dataValidation.renderMode.text") })
2180
2162
  ] }) });
2181
2163
  }
2182
- Dt.componentKey = Do;
2183
- const Vo = "DATE_SHOW_TIME_OPTION";
2164
+ Dt.componentKey = bo;
2165
+ const Mo = "DATE_SHOW_TIME_OPTION";
2184
2166
  function Vt(e) {
2185
2167
  var i;
2186
- const { value: t, onChange: r } = e, n = F(ce);
2168
+ const { value: t, onChange: r } = e, n = F(ue);
2187
2169
  return /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
2188
2170
  At,
2189
2171
  {
@@ -2201,9 +2183,9 @@ function Vt(e) {
2201
2183
  }
2202
2184
  ) });
2203
2185
  }
2204
- Vt.componentKey = Vo;
2205
- var Oo = Object.getOwnPropertyDescriptor, To = (e, t, r, n) => {
2206
- for (var i = n > 1 ? void 0 : n ? Oo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2186
+ Vt.componentKey = Mo;
2187
+ var Eo = Object.getOwnPropertyDescriptor, Do = (e, t, r, n) => {
2188
+ for (var i = n > 1 ? void 0 : n ? Eo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2207
2189
  (a = e[o]) && (i = a(i) || i);
2208
2190
  return i;
2209
2191
  }, je = (e, t) => (r, n) => t(r, n, e);
@@ -2257,7 +2239,7 @@ let nn = class {
2257
2239
  }
2258
2240
  async _parseFormula(e, t, r) {
2259
2241
  var d, u, h, c, m, p, b, y, g;
2260
- const { formula1: n = Jr, formula2: i = qr } = e, o = await this._formulaService.getRuleFormulaResult(t, r, e.uid), a = Ut((h = (u = (d = o == null ? void 0 : o[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Ut((p = (m = (c = o == null ? void 0 : o[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : p[0]), s = Mn(String(a)) && Mn(String(l));
2242
+ const { formula1: n = ai, formula2: i = oi } = e, o = await this._formulaService.getRuleFormulaResult(t, r, e.uid), a = Ut((h = (u = (d = o == null ? void 0 : o[0]) == null ? void 0 : d.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Ut((p = (m = (c = o == null ? void 0 : o[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : p[0]), s = Dn(String(a)) && Dn(String(l));
2261
2243
  return {
2262
2244
  formula1: Oe(n) ? Ut((g = (y = (b = o == null ? void 0 : o[0]) == null ? void 0 : b.result) == null ? void 0 : y[0]) == null ? void 0 : g[0]) : n,
2263
2245
  formula2: Oe(i) ? l : i,
@@ -2272,7 +2254,7 @@ let nn = class {
2272
2254
  const c = this._dataValidationModel.getValidator(h.type);
2273
2255
  if (!c || !((T = c.skipDefaultFontRender) != null && T.call(c, h, u, { unitId: i, subUnitId: o, row: l, column: s })))
2274
2256
  return;
2275
- const m = c.parseFormulaSync(h, i, o), { formula1: p } = m, b = this._calc(d, r), { a: y, d: g } = e.getTransform(), C = Tn(b.left, y), v = Tn(b.top, g), I = pi.create().composeMatrix({
2257
+ const m = c.parseFormulaSync(h, i, o), { formula1: p } = m, b = this._calc(d, r), { a: y, d: g } = e.getTransform(), C = bn(b.left, y), v = bn(b.top, g), I = Yr.create().composeMatrix({
2276
2258
  left: C,
2277
2259
  top: v,
2278
2260
  scaleX: 1,
@@ -2287,7 +2269,7 @@ let nn = class {
2287
2269
  const R = I.getMatrix();
2288
2270
  e.transform(R[0], R[1], R[2], R[3], R[4], R[5]);
2289
2271
  const L = ((O = r == null ? void 0 : r.fs) != null ? O : 10) * 1.6, N = String(u) === String(p), E = this._themeService.getColorFromTheme("primary.600");
2290
- gi.drawWith(e, {
2272
+ Xr.drawWith(e, {
2291
2273
  checked: N,
2292
2274
  width: L,
2293
2275
  height: L,
@@ -2316,7 +2298,7 @@ let nn = class {
2316
2298
  endRow: r.actualRow
2317
2299
  },
2318
2300
  value: {
2319
- v: String(s) === Qr(String(h)) ? c : h,
2301
+ v: String(s) === si(String(h)) ? c : h,
2320
2302
  p: null
2321
2303
  }
2322
2304
  };
@@ -2327,38 +2309,55 @@ let nn = class {
2327
2309
  }
2328
2310
  onPointerEnter(e, t) {
2329
2311
  var r, n;
2330
- (n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.POINTER);
2312
+ (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(ze.POINTER);
2331
2313
  }
2332
2314
  onPointerLeave(e, t) {
2333
2315
  var r, n;
2334
- (n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.DEFAULT);
2316
+ (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(ze.DEFAULT);
2335
2317
  }
2336
2318
  };
2337
- nn = To([
2319
+ nn = Do([
2338
2320
  je(0, te),
2339
- je(1, ue),
2340
- je(2, M(Gr)),
2321
+ je(1, ce),
2322
+ je(2, M(ii)),
2341
2323
  je(3, M(Xn)),
2342
- je(4, M(xe)),
2324
+ je(4, M(Fe)),
2343
2325
  je(5, M(ie))
2344
2326
  ], nn);
2345
- class Po extends Se {
2327
+ var Vo = Object.getOwnPropertyDescriptor, Oo = (e, t, r, n) => {
2328
+ for (var i = n > 1 ? void 0 : n ? Vo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2329
+ (a = e[o]) && (i = a(i) || i);
2330
+ return i;
2331
+ }, To = (e, t) => (r, n) => t(r, n, e);
2332
+ let Ce = class {
2333
+ constructor(e) {
2334
+ V(this, "canvasRender", null);
2335
+ V(this, "dropdownType");
2336
+ V(this, "optionsInput");
2337
+ V(this, "formulaInput", un);
2338
+ this.injector = e;
2339
+ }
2340
+ };
2341
+ Ce = Oo([
2342
+ To(0, M(be))
2343
+ ], Ce);
2344
+ class Po extends Ce {
2346
2345
  constructor() {
2347
2346
  super(...arguments);
2348
2347
  V(this, "id", j.CHECKBOX);
2349
2348
  V(this, "canvasRender", this.injector.createInstance(nn));
2350
- V(this, "formulaInput", qn);
2349
+ V(this, "formulaInput", sr);
2351
2350
  }
2352
2351
  }
2353
- class Ao extends Se {
2352
+ class Ao extends Ce {
2354
2353
  constructor() {
2355
2354
  super(...arguments);
2356
2355
  V(this, "id", j.CUSTOM);
2357
- V(this, "formulaInput", Gn);
2356
+ V(this, "formulaInput", ar);
2358
2357
  }
2359
2358
  }
2360
2359
  const Lo = "data-validation.formula-input";
2361
- class ko extends Se {
2360
+ class ko extends Ce {
2362
2361
  constructor() {
2363
2362
  super(...arguments);
2364
2363
  V(this, "id", j.DATE);
@@ -2367,7 +2366,7 @@ class ko extends Se {
2367
2366
  V(this, "dropdownType", ve.DATE);
2368
2367
  }
2369
2368
  }
2370
- class No extends Se {
2369
+ class No extends Ce {
2371
2370
  constructor() {
2372
2371
  super(...arguments);
2373
2372
  V(this, "id", j.DECIMAL);
@@ -2376,7 +2375,7 @@ class No extends Se {
2376
2375
  }
2377
2376
  const Er = 4, Uo = 0, Ht = 4, Dr = 4, rn = 6, Ot = 6, Ve = 14;
2378
2377
  function Fo(e, t) {
2379
- const r = vi.getTextSize(e, t), n = r.width + Er * 2, { ba: i, bd: o } = r, a = i + o;
2378
+ const r = Zr.getTextSize(e, t), n = r.width + Er * 2, { ba: i, bd: o } = r, a = i + o;
2380
2379
  return {
2381
2380
  width: n,
2382
2381
  height: a + Uo * 2,
@@ -2417,10 +2416,10 @@ function $t(e, t, r, n) {
2417
2416
  };
2418
2417
  }
2419
2418
  const xo = 8;
2420
- class Bo extends fi {
2419
+ class Bo extends Kr {
2421
2420
  static drawWith(t, r) {
2422
2421
  const { fontString: n, info: i, fill: o, color: a } = r, { layout: l, text: s } = i;
2423
- t.save(), dr.drawWith(t, {
2422
+ t.save(), zn.drawWith(t, {
2424
2423
  width: l.width,
2425
2424
  height: l.height,
2426
2425
  radius: xo,
@@ -2561,20 +2560,20 @@ let on = class {
2561
2560
  }
2562
2561
  onPointerEnter(e, t) {
2563
2562
  var r, n;
2564
- return (n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(Ge.POINTER);
2563
+ return (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(ze.POINTER);
2565
2564
  }
2566
2565
  onPointerLeave(e, t) {
2567
2566
  var r, n;
2568
- return (n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(Ge.DEFAULT);
2567
+ return (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(ze.DEFAULT);
2569
2568
  }
2570
2569
  };
2571
2570
  on = Ho([
2572
2571
  St(0, te),
2573
- St(1, ue),
2574
- St(2, M(xe)),
2572
+ St(1, ce),
2573
+ St(2, M(Fe)),
2575
2574
  St(3, M(ie))
2576
2575
  ], on);
2577
- class jo extends Se {
2576
+ class jo extends Ce {
2578
2577
  constructor() {
2579
2578
  super(...arguments);
2580
2579
  V(this, "id", j.LIST_MULTIPLE);
@@ -2677,7 +2676,7 @@ let an = class {
2677
2676
  );
2678
2677
  G.calculate();
2679
2678
  const D = G.getTotalWidth(), U = G.getTotalHeight(), { paddingTop: f, paddingLeft: A } = Wn(q, v - Z - Q, D, U, T, O, !0);
2680
- this._drawDownIcon(e, g, C, v, U, T, P), e.save(), e.translateWithPrecision(g.startX + z, g.startY + Z), e.beginPath(), e.rect(0, 0, C - z - fe, v - Z - Q), e.clip(), e.translateWithPrecision(0, f), e.save(), e.translateWithPrecision(De, 0), e.beginPath(), e.rect(0, 0, q, U), e.clip(), Pn.drawWith(e, {
2679
+ this._drawDownIcon(e, g, C, v, U, T, P), e.save(), e.translateWithPrecision(g.startX + z, g.startY + Z), e.beginPath(), e.rect(0, 0, C - z - fe, v - Z - Q), e.clip(), e.translateWithPrecision(0, f), e.save(), e.translateWithPrecision(De, 0), e.beginPath(), e.rect(0, 0, q, U), e.clip(), Mn.drawWith(e, {
2681
2680
  text: L,
2682
2681
  fontStyle: k,
2683
2682
  width: q,
@@ -2704,12 +2703,12 @@ let an = class {
2704
2703
  );
2705
2704
  Z.calculate();
2706
2705
  const fe = Z.getTotalWidth(), Q = Z.getTotalHeight(), q = Q + xn * 2, G = Math.max(C - _e * 2, 1), { paddingTop: D, paddingLeft: U } = Wn(G, v, fe, q, T, O);
2707
- e.translateWithPrecision(_e, D), dr.drawWith(e, {
2706
+ e.translateWithPrecision(_e, D), zn.drawWith(e, {
2708
2707
  width: G,
2709
2708
  height: q,
2710
2709
  fill: (N == null ? void 0 : N.color) || Ye,
2711
2710
  radius: jt
2712
- }), e.save(), e.translateWithPrecision(De, xn), e.beginPath(), e.rect(0, 0, z, Q), e.clip(), e.translateWithPrecision(U, 0), Pn.drawWith(e, {
2711
+ }), e.save(), e.translateWithPrecision(De, xn), e.beginPath(), e.rect(0, 0, z, Q), e.clip(), e.translateWithPrecision(U, 0), Mn.drawWith(e, {
2713
2712
  text: L,
2714
2713
  fontStyle: k,
2715
2714
  width: z,
@@ -2813,38 +2812,38 @@ let an = class {
2813
2812
  }
2814
2813
  onPointerEnter(e, t) {
2815
2814
  var r, n;
2816
- (n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.POINTER);
2815
+ (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(ze.POINTER);
2817
2816
  }
2818
2817
  onPointerLeave(e, t) {
2819
2818
  var r, n;
2820
- (n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.DEFAULT);
2819
+ (n = (r = Ke(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(ze.DEFAULT);
2821
2820
  }
2822
2821
  };
2823
2822
  an = Xo([
2824
- at(0, ue),
2825
- at(1, M(ce)),
2823
+ at(0, ce),
2824
+ at(1, M(ue)),
2826
2825
  at(2, te),
2827
- at(3, M(xe)),
2826
+ at(3, M(Fe)),
2828
2827
  at(4, M(ie))
2829
2828
  ], an);
2830
- class Ko extends Se {
2829
+ class Ko extends Ce {
2831
2830
  constructor() {
2832
2831
  super(...arguments);
2833
2832
  V(this, "id", j.LIST);
2834
2833
  V(this, "canvasRender", this.injector.createInstance(an));
2835
2834
  V(this, "dropdownType", ve.LIST);
2836
2835
  V(this, "optionsInput", Dt.componentKey);
2837
- V(this, "formulaInput", dn);
2836
+ V(this, "formulaInput", un);
2838
2837
  }
2839
2838
  }
2840
- class zo extends Se {
2839
+ class zo extends Ce {
2841
2840
  constructor() {
2842
2841
  super(...arguments);
2843
2842
  V(this, "id", j.TEXT_LENGTH);
2844
2843
  V(this, "formulaInput", Pt);
2845
2844
  }
2846
2845
  }
2847
- class Go extends Se {
2846
+ class Go extends Ce {
2848
2847
  constructor() {
2849
2848
  super(...arguments);
2850
2849
  V(this, "id", j.WHOLE);
@@ -2862,11 +2861,11 @@ let nt = class extends ln {
2862
2861
  }
2863
2862
  _initComponents() {
2864
2863
  [
2865
- ["DataValidationIcon", _r],
2866
- [Mt, Eo],
2864
+ ["DataValidationIcon", Rr],
2865
+ [Mt, mo],
2867
2866
  [Dt.componentKey, Dt],
2868
2867
  [Vt.componentKey, Vt],
2869
- ...Ki
2868
+ ...yo
2870
2869
  ].forEach(([e, t]) => {
2871
2870
  this.disposeWithMe(this._componentManger.register(
2872
2871
  e,
@@ -2891,17 +2890,18 @@ let nt = class extends ln {
2891
2890
  }
2892
2891
  };
2893
2892
  nt = Jo([
2894
- Yt(0, M(ye)),
2895
- Yt(1, M(pn)),
2893
+ Yt(0, M(be)),
2894
+ Yt(1, M(gn)),
2896
2895
  Yt(2, M(Me))
2897
2896
  ], nt);
2898
- var Qo = Object.defineProperty, ea = Object.getOwnPropertyDescriptor, ta = (e, t, r) => t in e ? Qo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, na = (e, t, r, n) => {
2899
- for (var i = n > 1 ? void 0 : n ? ea(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2897
+ var Qo = Object.getOwnPropertyDescriptor, ea = (e, t, r, n) => {
2898
+ for (var i = n > 1 ? void 0 : n ? Qo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2900
2899
  (a = e[o]) && (i = a(i) || i);
2901
2900
  return i;
2902
- }, Xt = (e, t) => (r, n) => t(r, n, e), Vr = (e, t, r) => ta(e, typeof t != "symbol" ? t + "" : t, r);
2903
- const ra = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2904
- let Tt = class extends Zn {
2901
+ }, Xt = (e, t) => (r, n) => t(r, n, e);
2902
+ const ta = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2903
+ var wt;
2904
+ let Hn = (wt = class extends Zn {
2905
2905
  constructor(e = bt, t, r, n) {
2906
2906
  super(), this._config = e, this._injector = t, this._commandService = r, this._configService = n;
2907
2907
  const { menu: i, ...o } = Kn(
@@ -2909,34 +2909,33 @@ let Tt = class extends Zn {
2909
2909
  bt,
2910
2910
  this._config
2911
2911
  );
2912
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Sn, o);
2912
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(mn, o);
2913
2913
  }
2914
2914
  onStarting() {
2915
2915
  [
2916
- [Ce],
2916
+ [Se],
2917
2917
  [Ue],
2918
2918
  [ht],
2919
2919
  [Je],
2920
2920
  [tt],
2921
2921
  [et],
2922
2922
  [Qe],
2923
- [qe],
2924
2923
  [nt]
2925
2924
  ].forEach((e) => {
2926
2925
  this._injector.add(e);
2927
2926
  }), [
2928
2927
  kt,
2929
2928
  Lt,
2930
- Rr,
2931
- Cn,
2932
- We,
2933
- Ir
2929
+ _r,
2930
+ _n,
2931
+ Be,
2932
+ mr
2934
2933
  ].forEach((e) => {
2935
2934
  this._commandService.registerCommand(e);
2936
2935
  });
2937
2936
  }
2938
2937
  onReady() {
2939
- this._injector.get(Qe), this._injector.get(et), this._injector.get(qe), this._injector.get(ht), this._injector.get(xe).registerRenderModule(
2938
+ this._injector.get(Qe), this._injector.get(et), this._injector.get(Fe).registerRenderModule(
2940
2939
  X.UNIVER_SHEET,
2941
2940
  [Et]
2942
2941
  );
@@ -2947,23 +2946,19 @@ let Tt = class extends Zn {
2947
2946
  onSteady() {
2948
2947
  this._injector.get(Je);
2949
2948
  }
2950
- };
2951
- Vr(Tt, "pluginName", ra);
2952
- Vr(Tt, "type", X.UNIVER_SHEET);
2953
- Tt = na([
2954
- jr(ei),
2955
- Xt(1, M(ye)),
2949
+ }, V(wt, "pluginName", ta), V(wt, "type", X.UNIVER_SHEET), wt);
2950
+ Hn = ea([
2951
+ Xt(1, M(be)),
2956
2952
  Xt(2, te),
2957
2953
  Xt(3, sn)
2958
- ], Tt);
2959
- var ia = Object.getOwnPropertyDescriptor, oa = (e, t, r, n) => {
2960
- for (var i = n > 1 ? void 0 : n ? ia(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2954
+ ], Hn);
2955
+ var na = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, ia = (e, t, r) => t in e ? na(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, oa = (e, t, r, n) => {
2956
+ for (var i = n > 1 ? void 0 : n ? ra(t, r) : t, o = e.length - 1, a; o >= 0; o--)
2961
2957
  (a = e[o]) && (i = a(i) || i);
2962
2958
  return i;
2963
- }, Zt = (e, t) => (r, n) => t(r, n, e);
2959
+ }, Zt = (e, t) => (r, n) => t(r, n, e), Vr = (e, t, r) => ia(e, typeof t != "symbol" ? t + "" : t, r);
2964
2960
  const aa = "SHEET_DATA_VALIDATION_UI_PLUGIN";
2965
- var wt;
2966
- let Hn = (wt = class extends Zn {
2961
+ let Tt = class extends Zn {
2967
2962
  constructor(e = bt, t, r, n) {
2968
2963
  super(), this._config = e, this._injector = t, this._commandService = r, this._configService = n;
2969
2964
  const { menu: i, ...o } = Kn(
@@ -2971,33 +2966,34 @@ let Hn = (wt = class extends Zn {
2971
2966
  bt,
2972
2967
  this._config
2973
2968
  );
2974
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Sn, o);
2969
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(mn, o);
2975
2970
  }
2976
2971
  onStarting() {
2977
2972
  [
2978
- [Ce],
2973
+ [Se],
2979
2974
  [Ue],
2980
2975
  [ht],
2981
2976
  [Je],
2982
2977
  [tt],
2983
2978
  [et],
2984
2979
  [Qe],
2980
+ [qe],
2985
2981
  [nt]
2986
2982
  ].forEach((e) => {
2987
2983
  this._injector.add(e);
2988
2984
  }), [
2989
2985
  kt,
2990
2986
  Lt,
2991
- Rr,
2992
- Cn,
2993
- We,
2994
- Ir
2987
+ _r,
2988
+ _n,
2989
+ Be,
2990
+ mr
2995
2991
  ].forEach((e) => {
2996
2992
  this._commandService.registerCommand(e);
2997
2993
  });
2998
2994
  }
2999
2995
  onReady() {
3000
- this._injector.get(Qe), this._injector.get(et), this._injector.get(xe).registerRenderModule(
2996
+ this._injector.get(Qe), this._injector.get(et), this._injector.get(qe), this._injector.get(ht), this._injector.get(Fe).registerRenderModule(
3001
2997
  X.UNIVER_SHEET,
3002
2998
  [Et]
3003
2999
  );
@@ -3008,14 +3004,17 @@ let Hn = (wt = class extends Zn {
3008
3004
  onSteady() {
3009
3005
  this._injector.get(Je);
3010
3006
  }
3011
- }, V(wt, "pluginName", aa), V(wt, "type", X.UNIVER_SHEET), wt);
3012
- Hn = oa([
3013
- Zt(1, M(ye)),
3007
+ };
3008
+ Vr(Tt, "pluginName", aa);
3009
+ Vr(Tt, "type", X.UNIVER_SHEET);
3010
+ Tt = oa([
3011
+ jr(li),
3012
+ Zt(1, M(be)),
3014
3013
  Zt(2, te),
3015
3014
  Zt(3, sn)
3016
- ], Hn);
3015
+ ], Tt);
3017
3016
  export {
3018
- Se as BaseSheetDataValidatorView,
3017
+ Ce as BaseSheetDataValidatorView,
3019
3018
  Hn as UniverSheetsDataValidationMobileUIPlugin,
3020
3019
  Tt as UniverSheetsDataValidationUIPlugin
3021
3020
  };