@univerjs/sheets-data-validation-ui 0.8.1-nightly.202506181607 → 0.8.1-nightly.202506191607
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/cjs/index.js +2 -2
- package/lib/es/index.js +383 -381
- package/lib/index.css +1 -1
- package/lib/index.js +383 -381
- package/lib/types/views/validator-views/list-validator-view.d.ts +2 -2
- package/lib/types/views/validator-views/sheet-validator-view.d.ts +1 -1
- package/lib/umd/index.js +2 -2
- package/package.json +13 -13
package/lib/es/index.js
CHANGED
@@ -1,21 +1,21 @@
|
|
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
|
-
var
|
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
|
5
|
-
import { DataValidationFormulaController as
|
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
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
|
8
|
-
import { useDependency as F, useSidebarClick as
|
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
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
|
11
|
-
import { DataValidatorRegistryService as Me, DataValidationModel as gn, DataValidatorDropdownType as ve, DataValidatorRegistryScope as
|
12
|
-
import { debounceTime as
|
13
|
-
import { DeviceInputEventType as vt, IRenderManagerService as xe, fixLineWidthByScale as Tn, Transform as
|
14
|
-
import { SheetInterceptorService as fn, VALIDATE_CELL as
|
15
|
-
import { getPatternType as
|
16
|
-
import { ISheetCellDropdownManagerService as
|
17
|
-
import { deserializeRangeWithSheet as
|
18
|
-
const
|
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
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
20
|
return t ? /* @__PURE__ */ $(dt, { children: [
|
21
21
|
/* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
|
@@ -59,7 +59,7 @@ const Oi = (e) => {
|
|
59
59
|
}
|
60
60
|
) });
|
61
61
|
};
|
62
|
-
function
|
62
|
+
function Ai(e) {
|
63
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
64
|
return /* @__PURE__ */ $(dt, { children: [
|
65
65
|
/* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
|
@@ -106,17 +106,17 @@ function Ti(e) {
|
|
106
106
|
) }) : null
|
107
107
|
] });
|
108
108
|
}
|
109
|
-
function
|
109
|
+
function Li(e) {
|
110
110
|
var h;
|
111
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
|
112
|
+
return rr((c) => {
|
113
113
|
var p;
|
114
114
|
((p = s.current) == null ? void 0 : p.isClickOutSide(c)) && u(!1);
|
115
115
|
}), /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
|
116
|
-
|
116
|
+
ar,
|
117
117
|
{
|
118
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",
|
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
120
|
initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
|
121
121
|
unitId: t,
|
122
122
|
subUnitId: r,
|
@@ -141,7 +141,7 @@ var le = function() {
|
|
141
141
|
}
|
142
142
|
return e;
|
143
143
|
}, le.apply(this, arguments);
|
144
|
-
},
|
144
|
+
}, ki = function(e, t) {
|
145
145
|
var r = {};
|
146
146
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
147
147
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
@@ -149,15 +149,15 @@ var le = function() {
|
|
149
149
|
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
|
150
150
|
return r;
|
151
151
|
}, Be = Fe(function(e, t) {
|
152
|
-
var r = e.icon, n = e.id, i = e.className, o = e.extend, a =
|
153
|
-
return
|
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
154
|
});
|
155
|
-
function
|
156
|
-
return Ie(e.tag, le(le({ key: t },
|
157
|
-
return
|
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
158
|
}));
|
159
159
|
}
|
160
|
-
function
|
160
|
+
function Ni(e, t, r) {
|
161
161
|
var n = le({}, e.attrs);
|
162
162
|
r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(function(o) {
|
163
163
|
var a = o[0], l = o[1];
|
@@ -169,65 +169,65 @@ function Li(e, t, r) {
|
|
169
169
|
typeof l == "string" && (n[a] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
170
170
|
})), n;
|
171
171
|
}
|
172
|
-
function
|
172
|
+
function Ui(e, t) {
|
173
173
|
var r, n = t.defIds;
|
174
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
175
|
return typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? le(le({}, i), { attrs: le(le({}, i.attrs), { id: i.attrs.id + t.idSuffix }) }) : i;
|
176
176
|
}) }) : e;
|
177
177
|
}
|
178
|
-
function
|
178
|
+
function Fi() {
|
179
179
|
return Math.random().toString(36).substring(2, 8);
|
180
180
|
}
|
181
181
|
Be.displayName = "UniverIcon";
|
182
|
-
var
|
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
183
|
return Ie(Be, Object.assign({}, e, {
|
184
184
|
id: "data-validation-icon",
|
185
185
|
ref: t,
|
186
|
-
icon:
|
186
|
+
icon: xi
|
187
187
|
}));
|
188
188
|
});
|
189
|
-
|
190
|
-
var
|
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
191
|
return Ie(Be, Object.assign({}, e, {
|
192
192
|
id: "delete-icon",
|
193
193
|
ref: t,
|
194
|
-
icon:
|
194
|
+
icon: Bi
|
195
195
|
}));
|
196
196
|
});
|
197
197
|
mn.displayName = "DeleteIcon";
|
198
|
-
var
|
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
199
|
return Ie(Be, Object.assign({}, e, {
|
200
200
|
id: "increase-icon",
|
201
201
|
ref: t,
|
202
|
-
icon:
|
202
|
+
icon: Wi
|
203
203
|
}));
|
204
204
|
});
|
205
|
-
|
206
|
-
var
|
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
207
|
return Ie(Be, Object.assign({}, e, {
|
208
208
|
id: "more-down-icon",
|
209
209
|
ref: t,
|
210
|
-
icon:
|
210
|
+
icon: Hi
|
211
211
|
}));
|
212
212
|
});
|
213
213
|
_n.displayName = "MoreDownIcon";
|
214
|
-
var
|
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
215
|
return Ie(Be, Object.assign({}, e, {
|
216
216
|
id: "more-up-icon",
|
217
217
|
ref: t,
|
218
|
-
icon:
|
218
|
+
icon: $i
|
219
219
|
}));
|
220
220
|
});
|
221
|
-
|
222
|
-
var
|
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
223
|
return Ie(Be, Object.assign({}, e, {
|
224
224
|
id: "sequence-icon",
|
225
225
|
ref: t,
|
226
|
-
icon:
|
226
|
+
icon: ji
|
227
227
|
}));
|
228
228
|
});
|
229
|
-
|
230
|
-
const Ye = "#ECECEC",
|
229
|
+
wr.displayName = "SequenceIcon";
|
230
|
+
const Ye = "#ECECEC", Yi = [
|
231
231
|
"#FFFFFF",
|
232
232
|
"#FEE7E7",
|
233
233
|
"#FEF0E6",
|
@@ -252,10 +252,10 @@ const Ye = "#ECECEC", $i = [
|
|
252
252
|
"#3A60F7",
|
253
253
|
"#9E6DE3",
|
254
254
|
"#F248A6"
|
255
|
-
],
|
255
|
+
], Xi = (e) => {
|
256
256
|
const { value: t, onChange: r, disabled: n } = e, [i, o] = W(!1);
|
257
257
|
return /* @__PURE__ */ S(
|
258
|
-
|
258
|
+
ni,
|
259
259
|
{
|
260
260
|
align: "start",
|
261
261
|
disabled: n,
|
@@ -265,11 +265,11 @@ const Ye = "#ECECEC", $i = [
|
|
265
265
|
"div",
|
266
266
|
{
|
267
267
|
className: "univer-box-border univer-grid univer-w-fit univer-grid-cols-6 univer-flex-wrap univer-gap-2 univer-p-1.5",
|
268
|
-
children:
|
268
|
+
children: Yi.map(
|
269
269
|
(a) => /* @__PURE__ */ S(
|
270
270
|
"div",
|
271
271
|
{
|
272
|
-
className: Ne("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded",
|
272
|
+
className: Ne("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", yt),
|
273
273
|
style: { background: a },
|
274
274
|
onClick: () => {
|
275
275
|
r(a), o(!1);
|
@@ -283,7 +283,7 @@ const Ye = "#ECECEC", $i = [
|
|
283
283
|
children: /* @__PURE__ */ $(
|
284
284
|
"div",
|
285
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",
|
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
287
|
children: [
|
288
288
|
/* @__PURE__ */ S(
|
289
289
|
"div",
|
@@ -301,9 +301,9 @@ const Ye = "#ECECEC", $i = [
|
|
301
301
|
}, kn = (e) => {
|
302
302
|
const { item: t, commonProps: r, className: n } = e, { onItemChange: i, onItemDelete: o } = r;
|
303
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(
|
304
|
+
!t.isRef && /* @__PURE__ */ S("div", { className: Ne("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(wr, {}) }),
|
305
305
|
/* @__PURE__ */ S(
|
306
|
-
|
306
|
+
Xi,
|
307
307
|
{
|
308
308
|
value: t.color,
|
309
309
|
onChange: (a) => {
|
@@ -330,17 +330,17 @@ const Ye = "#ECECEC", $i = [
|
|
330
330
|
)
|
331
331
|
] });
|
332
332
|
};
|
333
|
-
function
|
333
|
+
function Zi(e) {
|
334
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(
|
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
336
|
ke(() => {
|
337
337
|
(async () => {
|
338
338
|
await new Promise((f) => {
|
339
339
|
setTimeout(() => f(!0), 100);
|
340
340
|
});
|
341
|
-
const
|
342
|
-
if (Oe(U) && _ &&
|
343
|
-
const f = await _.getListAsync(
|
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
344
|
L(f);
|
345
345
|
}
|
346
346
|
})();
|
@@ -348,27 +348,27 @@ function Yi(e) {
|
|
348
348
|
Oe(s) && s !== p && (m(s), b(p));
|
349
349
|
}, [p, s]);
|
350
350
|
const [H, B] = W(() => {
|
351
|
-
const
|
352
|
-
return
|
351
|
+
const D = u !== "1" ? Xr(s) : [], U = d.split(",");
|
352
|
+
return D.map((f, A) => ({
|
353
353
|
label: f,
|
354
354
|
color: U[A] || Ye,
|
355
355
|
isRef: !1,
|
356
356
|
id: In.generateRandomId(4)
|
357
357
|
}));
|
358
|
-
}), J = (
|
359
|
-
const A = H.find((x) => x.id ===
|
358
|
+
}), J = (D, U, f) => {
|
359
|
+
const A = H.find((x) => x.id === D);
|
360
360
|
A && (A.label = U, A.color = f, B([...H]));
|
361
|
-
}, ne = (
|
362
|
-
const U = H.findIndex((f) => f.id ===
|
361
|
+
}, ne = (D) => {
|
362
|
+
const U = H.findIndex((f) => f.id === D);
|
363
363
|
U !== -1 && (H.splice(U, 1), B([...H]));
|
364
|
-
}, oe = d.split(","), he = ct(() => R.map((
|
365
|
-
label:
|
364
|
+
}, oe = d.split(","), he = ct(() => R.map((D, U) => ({
|
365
|
+
label: D,
|
366
366
|
color: oe[U] || Ye,
|
367
367
|
id: `${U}`,
|
368
368
|
isRef: !0
|
369
|
-
})), [oe, R]), z = (
|
369
|
+
})), [oe, R]), z = (D, U, f) => {
|
370
370
|
const A = [...I];
|
371
|
-
A[+
|
371
|
+
A[+D] = f, w(A), k({
|
372
372
|
formula1: s,
|
373
373
|
formula2: A.join(",")
|
374
374
|
});
|
@@ -386,48 +386,48 @@ function Yi(e) {
|
|
386
386
|
ke(() => {
|
387
387
|
if (u === "1")
|
388
388
|
return;
|
389
|
-
const
|
389
|
+
const D = /* @__PURE__ */ new Set(), U = [];
|
390
390
|
H.map((f) => ({
|
391
391
|
labelList: f.label.split(","),
|
392
392
|
item: f
|
393
393
|
})).forEach(({ item: f, labelList: A }) => {
|
394
394
|
A.forEach((x) => {
|
395
|
-
|
395
|
+
D.has(x) || (D.add(x), U.push({
|
396
396
|
label: x,
|
397
397
|
color: f.color
|
398
398
|
}));
|
399
399
|
});
|
400
400
|
}), k({
|
401
|
-
formula1:
|
401
|
+
formula1: zn(U.map((f) => f.label)),
|
402
402
|
formula2: U.map((f) => f.color === Ye ? "" : f.color).join(",")
|
403
403
|
});
|
404
404
|
}, [H, k, u, p, I]);
|
405
|
-
const fe = Gt(async (
|
406
|
-
if (!Oe(
|
405
|
+
const fe = Gt(async (D) => {
|
406
|
+
if (!Oe(D)) {
|
407
407
|
k == null || k({
|
408
408
|
formula1: "",
|
409
409
|
formula2: d
|
410
410
|
});
|
411
411
|
return;
|
412
412
|
}
|
413
|
-
v.getFormulaRefCheck(
|
414
|
-
formula1: Oe(
|
413
|
+
v.getFormulaRefCheck(D) ? (k == null || k({
|
414
|
+
formula1: Oe(D) ? D : "",
|
415
415
|
formula2: d
|
416
416
|
}), E("")) : (k == null || k({
|
417
417
|
formula1: "",
|
418
418
|
formula2: d
|
419
419
|
}), m("="), E(y.t("dataValidation.validFail.formulaError")));
|
420
420
|
}), Q = pt(null), [q, G] = W(!1);
|
421
|
-
return
|
421
|
+
return rr((D) => {
|
422
422
|
var f;
|
423
|
-
((f = Q.current) == null ? void 0 : f.isClickOutSide(
|
423
|
+
((f = Q.current) == null ? void 0 : f.isClickOutSide(D)) && G(!1);
|
424
424
|
}), /* @__PURE__ */ $(dt, { children: [
|
425
425
|
/* @__PURE__ */ S(Y, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ $(
|
426
426
|
un,
|
427
427
|
{
|
428
428
|
value: u,
|
429
|
-
onChange: (
|
430
|
-
h(
|
429
|
+
onChange: (D) => {
|
430
|
+
h(D), m(p), D === "1" && k({
|
431
431
|
formula1: p === "=" ? "" : p,
|
432
432
|
formula2: I.join(",")
|
433
433
|
});
|
@@ -440,50 +440,50 @@ function Yi(e) {
|
|
440
440
|
) }),
|
441
441
|
u === "1" ? /* @__PURE__ */ $(Y, { error: T || N || void 0, children: [
|
442
442
|
/* @__PURE__ */ S(
|
443
|
-
|
443
|
+
ar,
|
444
444
|
{
|
445
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",
|
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
447
|
initValue: c,
|
448
448
|
unitId: n,
|
449
449
|
subUnitId: i,
|
450
450
|
isFocus: q,
|
451
451
|
isSupportAcrossSheet: !0,
|
452
452
|
onFocus: () => G(!0),
|
453
|
-
onChange: (
|
454
|
-
const U = (
|
453
|
+
onChange: (D = "") => {
|
454
|
+
const U = (D != null ? D : "").trim();
|
455
455
|
b(U), fe(U);
|
456
456
|
}
|
457
457
|
}
|
458
458
|
),
|
459
|
-
he.length > 0 && /* @__PURE__ */ S("div", { className: "univer-mt-3", children: he.map((
|
459
|
+
he.length > 0 && /* @__PURE__ */ S("div", { className: "univer-mt-3", children: he.map((D) => /* @__PURE__ */ S(
|
460
460
|
kn,
|
461
461
|
{
|
462
462
|
className: "univer-mb-3",
|
463
|
-
item:
|
463
|
+
item: D,
|
464
464
|
commonProps: { onItemChange: z }
|
465
465
|
},
|
466
|
-
|
466
|
+
D.id
|
467
467
|
)) })
|
468
468
|
] }) : /* @__PURE__ */ S(Y, { error: T, children: /* @__PURE__ */ $("div", { className: "-univer-mt-3", children: [
|
469
469
|
/* @__PURE__ */ S(
|
470
|
-
|
470
|
+
ti,
|
471
471
|
{
|
472
472
|
list: H,
|
473
473
|
onListChange: B,
|
474
474
|
rowHeight: 28,
|
475
475
|
margin: [0, 12],
|
476
476
|
draggableHandle: ".draggableHandle",
|
477
|
-
itemRender: (
|
477
|
+
itemRender: (D) => /* @__PURE__ */ S(
|
478
478
|
kn,
|
479
479
|
{
|
480
|
-
item:
|
480
|
+
item: D,
|
481
481
|
commonProps: {
|
482
482
|
onItemChange: J,
|
483
483
|
onItemDelete: ne
|
484
484
|
}
|
485
485
|
},
|
486
|
-
|
486
|
+
D.id
|
487
487
|
),
|
488
488
|
idKey: "id"
|
489
489
|
}
|
@@ -494,7 +494,7 @@ function Yi(e) {
|
|
494
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
495
|
onClick: Z,
|
496
496
|
children: [
|
497
|
-
/* @__PURE__ */ S(
|
497
|
+
/* @__PURE__ */ S(Sr, { className: "univer-mr-1" }),
|
498
498
|
y.t("dataValidation.list.add")
|
499
499
|
]
|
500
500
|
}
|
@@ -502,61 +502,61 @@ function Yi(e) {
|
|
502
502
|
] }) })
|
503
503
|
] });
|
504
504
|
}
|
505
|
-
const
|
505
|
+
const Ki = [
|
506
506
|
[
|
507
|
-
|
508
|
-
|
507
|
+
Gn,
|
508
|
+
Li
|
509
509
|
],
|
510
510
|
[
|
511
511
|
Pt,
|
512
|
-
|
512
|
+
Pi
|
513
513
|
],
|
514
514
|
[
|
515
515
|
dn,
|
516
|
-
|
516
|
+
Zi
|
517
517
|
],
|
518
518
|
[
|
519
|
-
|
520
|
-
|
519
|
+
qn,
|
520
|
+
Ai
|
521
521
|
]
|
522
522
|
];
|
523
|
-
var
|
524
|
-
for (var i = n > 1 ? void 0 : n ?
|
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
525
|
(a = e[o]) && (i = a(i) || i);
|
526
526
|
return i;
|
527
|
-
},
|
527
|
+
}, qi = (e, t) => (r, n) => t(r, n, e);
|
528
528
|
let Se = class {
|
529
529
|
constructor(e) {
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
530
|
+
V(this, "canvasRender", null);
|
531
|
+
V(this, "dropdownType");
|
532
|
+
V(this, "optionsInput");
|
533
|
+
V(this, "formulaInput", dn);
|
534
534
|
this.injector = e;
|
535
535
|
}
|
536
536
|
};
|
537
|
-
Se =
|
538
|
-
|
537
|
+
Se = Gi([
|
538
|
+
qi(0, M(ye))
|
539
539
|
], Se);
|
540
|
-
var
|
541
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
542
542
|
(a = e[o]) && (i = a(i) || i);
|
543
543
|
return i;
|
544
544
|
}, Nn = (e, t) => (r, n) => t(r, n, e);
|
545
545
|
let Ce = class extends be {
|
546
546
|
constructor(t, r) {
|
547
547
|
super();
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
548
|
+
V(this, "_open$", new On(!1));
|
549
|
+
V(this, "open$", this._open$.pipe(ci()));
|
550
|
+
V(this, "_activeRule");
|
551
|
+
V(this, "_activeRule$", new On(void 0));
|
552
|
+
V(this, "activeRule$", this._activeRule$.asObservable());
|
553
|
+
V(this, "_closeDisposable", null);
|
554
554
|
this._univerInstanceService = t, this._sidebarService = r, this.disposeWithMe(
|
555
555
|
this._univerInstanceService.getCurrentTypeOfUnit$(X.UNIVER_SHEET).pipe(vn((n) => !n)).subscribe(() => {
|
556
556
|
this.close();
|
557
557
|
})
|
558
558
|
), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((n) => {
|
559
|
-
n.id ===
|
559
|
+
n.id === Mt && (n.visible || setTimeout(() => {
|
560
560
|
this._sidebarService.sidebarOptions$.next({ visible: !1 });
|
561
561
|
}));
|
562
562
|
}));
|
@@ -587,13 +587,13 @@ let Ce = class extends be {
|
|
587
587
|
this._activeRule = t, this._activeRule$.next(t);
|
588
588
|
}
|
589
589
|
};
|
590
|
-
Ce =
|
590
|
+
Ce = Qi([
|
591
591
|
Nn(0, ue),
|
592
|
-
Nn(1,
|
592
|
+
Nn(1, ir)
|
593
593
|
], Ce);
|
594
|
-
const Sn = "sheets-data-validation-ui.config",
|
595
|
-
var
|
596
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
597
597
|
(a = e[o]) && (i = a(i) || i);
|
598
598
|
return i;
|
599
599
|
}, He = (e, t) => (r, n) => t(r, n, e);
|
@@ -603,7 +603,7 @@ let qe = class extends be {
|
|
603
603
|
}
|
604
604
|
_initEditorBridgeInterceptor() {
|
605
605
|
this._sheetInterceptorService.writeCellInterceptor.intercept(
|
606
|
-
|
606
|
+
mi,
|
607
607
|
{
|
608
608
|
handler: async (e, t, r) => {
|
609
609
|
const n = await e, { row: i, col: o, unitId: a, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(a, l, i, o), d = s ? this._dataValidationModel.getRuleById(a, l, s) : void 0;
|
@@ -665,16 +665,16 @@ let qe = class extends be {
|
|
665
665
|
});
|
666
666
|
}
|
667
667
|
};
|
668
|
-
qe =
|
668
|
+
qe = to([
|
669
669
|
He(0, M(fn)),
|
670
670
|
He(1, M(ie)),
|
671
671
|
He(2, M(Me)),
|
672
|
-
He(3,
|
672
|
+
He(3, ri),
|
673
673
|
He(4, M(ce)),
|
674
|
-
He(5, M(
|
674
|
+
He(5, M(Zr))
|
675
675
|
], qe);
|
676
|
-
var
|
677
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
678
678
|
(a = e[o]) && (i = a(i) || i);
|
679
679
|
return i;
|
680
680
|
}, pe = (e, t) => (r, n) => t(r, n, e);
|
@@ -682,13 +682,13 @@ const Ft = (e) => {
|
|
682
682
|
if (e == null || typeof e == "boolean")
|
683
683
|
return;
|
684
684
|
if (typeof e == "number" || !Number.isNaN(+e))
|
685
|
-
return Rn(
|
685
|
+
return Rn($n.format("yyyy-MM-dd HH:mm:ss", Number(e)));
|
686
686
|
const t = Rn(e);
|
687
687
|
if (t.isValid())
|
688
688
|
return t;
|
689
689
|
};
|
690
|
-
function
|
691
|
-
const r =
|
690
|
+
function io(e, t) {
|
691
|
+
const r = wi(t);
|
692
692
|
if (e === r)
|
693
693
|
return t;
|
694
694
|
switch (e) {
|
@@ -703,11 +703,11 @@ function no(e, t) {
|
|
703
703
|
let Ue = class extends be {
|
704
704
|
constructor(t, r, n, i, o, a, l, s, d, u, h) {
|
705
705
|
super();
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
706
|
+
V(this, "_activeDropdown");
|
707
|
+
V(this, "_activeDropdown$", new ui());
|
708
|
+
V(this, "_currentPopup", null);
|
709
|
+
V(this, "activeDropdown$", this._activeDropdown$.asObservable());
|
710
|
+
V(this, "_zenVisible", !1);
|
711
711
|
this._univerInstanceService = t, this._dataValidatorRegistryService = r, this._zenZoneService = n, this._dataValidationModel = i, this._sheetsSelectionsService = o, this._cellDropdownManagerService = a, this._sheetDataValidationModel = l, this._commandService = s, this._editorBridgeService = d, this._injector = u, this._configService = h, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
|
712
712
|
this._activeDropdown$.complete();
|
713
713
|
});
|
@@ -756,7 +756,7 @@ let Ue = class extends be {
|
|
756
756
|
var O, P, k;
|
757
757
|
if (!v)
|
758
758
|
return !0;
|
759
|
-
const w = v, _ = s.getCell(n, i), R = w.format(I === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), L = (O =
|
759
|
+
const w = v, _ = s.getCell(n, i), R = w.format(I === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), L = (O = $n.parseDate(R)) == null ? void 0 : O.v, N = I === "time" ? L % 1 : L, E = l.getStyles().getStyleByCell(_), T = (k = (P = E == null ? void 0 : E.n) == null ? void 0 : P.pattern) != null ? k : "";
|
760
760
|
return d.errorStyle !== lt.STOP || await u.validator({
|
761
761
|
value: N,
|
762
762
|
unitId: o,
|
@@ -789,7 +789,7 @@ let Ue = class extends be {
|
|
789
789
|
si: null,
|
790
790
|
s: {
|
791
791
|
n: {
|
792
|
-
pattern:
|
792
|
+
pattern: io(I, T)
|
793
793
|
}
|
794
794
|
}
|
795
795
|
}
|
@@ -840,7 +840,7 @@ let Ue = class extends be {
|
|
840
840
|
case ve.LIST:
|
841
841
|
case ve.MULTIPLE_LIST: {
|
842
842
|
const v = u.dropdownType === ve.MULTIPLE_LIST, I = async (E) => {
|
843
|
-
const T =
|
843
|
+
const T = zn(E), O = {
|
844
844
|
unitId: o,
|
845
845
|
subUnitId: a,
|
846
846
|
range: {
|
@@ -1003,26 +1003,26 @@ let Ue = class extends be {
|
|
1003
1003
|
});
|
1004
1004
|
}
|
1005
1005
|
};
|
1006
|
-
Ue =
|
1006
|
+
Ue = ro([
|
1007
1007
|
pe(0, ue),
|
1008
1008
|
pe(1, M(Me)),
|
1009
|
-
pe(2,
|
1009
|
+
pe(2, or),
|
1010
1010
|
pe(3, M(ie)),
|
1011
|
-
pe(4, M(
|
1012
|
-
pe(5, M(
|
1011
|
+
pe(4, M(cr)),
|
1012
|
+
pe(5, M(Ii)),
|
1013
1013
|
pe(6, M(ie)),
|
1014
1014
|
pe(7, te),
|
1015
|
-
pe(8,
|
1015
|
+
pe(8, gr),
|
1016
1016
|
pe(9, M(ye)),
|
1017
1017
|
pe(10, sn)
|
1018
1018
|
], Ue);
|
1019
|
-
const
|
1019
|
+
const Mt = "DataValidationPanel", We = {
|
1020
1020
|
id: "data-validation.operation.open-validation-panel",
|
1021
1021
|
type: rt.OPERATION,
|
1022
1022
|
handler(e, t) {
|
1023
1023
|
if (!t)
|
1024
1024
|
return !1;
|
1025
|
-
const { ruleId: r, isAdd: n } = t, i = e.get(Ce), o = e.get(gn), a = e.get(ue), l = e.get(
|
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);
|
1026
1026
|
if (!s) return !1;
|
1027
1027
|
const { unitId: d, subUnitId: u } = s, h = r ? o.getRuleById(d, u, r) : void 0;
|
1028
1028
|
i.open(), i.setActiveRule(h && {
|
@@ -1031,9 +1031,9 @@ const Et = "DataValidationPanel", We = {
|
|
1031
1031
|
rule: h
|
1032
1032
|
});
|
1033
1033
|
const c = l.open({
|
1034
|
-
id:
|
1034
|
+
id: Mt,
|
1035
1035
|
header: { title: n ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
|
1036
|
-
children: { label:
|
1036
|
+
children: { label: Mt },
|
1037
1037
|
width: 312,
|
1038
1038
|
onClose: () => i.close()
|
1039
1039
|
});
|
@@ -1045,7 +1045,7 @@ const Et = "DataValidationPanel", We = {
|
|
1045
1045
|
handler(e) {
|
1046
1046
|
return e.get(Ce).close(), !0;
|
1047
1047
|
}
|
1048
|
-
},
|
1048
|
+
}, Ir = {
|
1049
1049
|
id: "data-validation.operation.toggle-validation-panel",
|
1050
1050
|
type: rt.OPERATION,
|
1051
1051
|
handler(e) {
|
@@ -1066,7 +1066,7 @@ const Et = "DataValidationPanel", We = {
|
|
1066
1066
|
a
|
1067
1067
|
), !0;
|
1068
1068
|
}
|
1069
|
-
},
|
1069
|
+
}, Rr = {
|
1070
1070
|
type: rt.OPERATION,
|
1071
1071
|
id: "sheet.operation.hide-data-validation-dropdown",
|
1072
1072
|
handler(e, t) {
|
@@ -1076,9 +1076,9 @@ const Et = "DataValidationPanel", We = {
|
|
1076
1076
|
type: rt.COMMAND,
|
1077
1077
|
id: "data-validation.command.addRuleAndOpen",
|
1078
1078
|
handler(e) {
|
1079
|
-
const t = e.get(ue), r =
|
1079
|
+
const t = e.get(ue), r = ur(t);
|
1080
1080
|
if (!r) return !1;
|
1081
|
-
const { workbook: n, worksheet: i } = r, o =
|
1081
|
+
const { workbook: n, worksheet: i } = r, o = Jn(e), a = e.get(te), l = n.getUnitId(), s = i.getSheetId(), d = {
|
1082
1082
|
rule: o,
|
1083
1083
|
unitId: l,
|
1084
1084
|
subUnitId: s
|
@@ -1089,8 +1089,8 @@ const Et = "DataValidationPanel", We = {
|
|
1089
1089
|
}), !0) : !1;
|
1090
1090
|
}
|
1091
1091
|
};
|
1092
|
-
var
|
1093
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
1094
1094
|
(a = e[o]) && (i = a(i) || i);
|
1095
1095
|
return i;
|
1096
1096
|
}, $e = (e, t) => (r, n) => t(r, n, e);
|
@@ -1103,7 +1103,7 @@ let ht = class extends be {
|
|
1103
1103
|
this._initCellAlertPopup(), this._initZenService();
|
1104
1104
|
}
|
1105
1105
|
_initCellAlertPopup() {
|
1106
|
-
this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(
|
1106
|
+
this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(sr(100)).subscribe((e) => {
|
1107
1107
|
var t;
|
1108
1108
|
if (e) {
|
1109
1109
|
const r = this._univerInstanceService.getUnit(e.location.unitId, X.UNIVER_SHEET), n = r.getSheetBySheetId(e.location.subUnitId);
|
@@ -1125,7 +1125,7 @@ let ht = class extends be {
|
|
1125
1125
|
return;
|
1126
1126
|
}
|
1127
1127
|
this._cellAlertManagerService.showAlert({
|
1128
|
-
type:
|
1128
|
+
type: bi.ERROR,
|
1129
1129
|
title: this._localeService.t("dataValidation.error.title"),
|
1130
1130
|
message: s == null ? void 0 : s.getRuleFinalError(i, e.location),
|
1131
1131
|
location: e.location,
|
@@ -1145,16 +1145,16 @@ let ht = class extends be {
|
|
1145
1145
|
}));
|
1146
1146
|
}
|
1147
1147
|
};
|
1148
|
-
ht =
|
1149
|
-
$e(0, M(
|
1150
|
-
$e(1, M(
|
1148
|
+
ht = ao([
|
1149
|
+
$e(0, M(Ri)),
|
1150
|
+
$e(1, M(yi)),
|
1151
1151
|
$e(2, ue),
|
1152
1152
|
$e(3, M(ce)),
|
1153
|
-
$e(4,
|
1153
|
+
$e(4, or),
|
1154
1154
|
$e(5, M(ie))
|
1155
1155
|
], ht);
|
1156
|
-
var
|
1157
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
1158
1158
|
(a = e[o]) && (i = a(i) || i);
|
1159
1159
|
return i;
|
1160
1160
|
}, xt = (e, t) => (r, n) => t(r, n, e);
|
@@ -1168,7 +1168,7 @@ let Je = class extends be {
|
|
1168
1168
|
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
1169
|
row: h.startRow,
|
1170
1170
|
col: h.startColumn
|
1171
|
-
}, b =
|
1171
|
+
}, b = Ei(h, c), y = new It(), g = /* @__PURE__ */ new Set();
|
1172
1172
|
b.forEach((_) => {
|
1173
1173
|
const R = _.repeatStartCell, L = _.relativeRange, N = {
|
1174
1174
|
startRow: p.row,
|
@@ -1182,7 +1182,7 @@ let Je = class extends be {
|
|
1182
1182
|
endRow: R.row
|
1183
1183
|
};
|
1184
1184
|
Nr.foreach(L, (T, O) => {
|
1185
|
-
const P =
|
1185
|
+
const P = Rt.getPositionRange(
|
1186
1186
|
{
|
1187
1187
|
startRow: T,
|
1188
1188
|
startColumn: O,
|
@@ -1190,7 +1190,7 @@ let Je = class extends be {
|
|
1190
1190
|
endRow: T
|
1191
1191
|
},
|
1192
1192
|
N
|
1193
|
-
), { row: k, col: H } = m(P.startRow, P.startColumn), B = this._sheetDataValidationModel.getRuleIdByLocation(l, s, k, H) || "", J =
|
1193
|
+
), { row: k, col: H } = m(P.startRow, P.startColumn), B = this._sheetDataValidationModel.getRuleIdByLocation(l, s, k, H) || "", J = Rt.getPositionRange(
|
1194
1194
|
{
|
1195
1195
|
startRow: T,
|
1196
1196
|
startColumn: O,
|
@@ -1210,7 +1210,7 @@ let Je = class extends be {
|
|
1210
1210
|
redos: I
|
1211
1211
|
};
|
1212
1212
|
}, r = {
|
1213
|
-
id:
|
1213
|
+
id: Qn,
|
1214
1214
|
onBeforeFillData: (n) => {
|
1215
1215
|
const { source: i, unitId: o, subUnitId: a } = n;
|
1216
1216
|
for (const l of i.rows)
|
@@ -1229,25 +1229,25 @@ let Je = class extends be {
|
|
1229
1229
|
this.disposeWithMe(this._autoFillService.addHook(r));
|
1230
1230
|
}
|
1231
1231
|
};
|
1232
|
-
Je =
|
1233
|
-
xt(0,
|
1232
|
+
Je = lo([
|
1233
|
+
xt(0, Mi),
|
1234
1234
|
xt(1, M(ie)),
|
1235
1235
|
xt(2, M(ye))
|
1236
1236
|
], Je);
|
1237
|
-
var
|
1238
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
1239
1239
|
(a = e[o]) && (i = a(i) || i);
|
1240
1240
|
return i;
|
1241
1241
|
}, Bt = (e, t) => (r, n) => t(r, n, e);
|
1242
1242
|
let Qe = class extends be {
|
1243
1243
|
constructor(t, r, n) {
|
1244
1244
|
super();
|
1245
|
-
|
1245
|
+
V(this, "_copyInfo");
|
1246
1246
|
this._sheetClipboardService = t, this._sheetDataValidationModel = r, this._injector = n, this._initCopyPaste();
|
1247
1247
|
}
|
1248
1248
|
_initCopyPaste() {
|
1249
1249
|
this._sheetClipboardService.addClipboardHook({
|
1250
|
-
id:
|
1250
|
+
id: Qn,
|
1251
1251
|
onBeforeCopy: (t, r, n) => this._collect(t, r, n),
|
1252
1252
|
onPasteCells: (t, r, n, i) => {
|
1253
1253
|
const { copyType: o = An.COPY, pasteType: a } = i, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = r;
|
@@ -1256,13 +1256,13 @@ let Qe = class extends be {
|
|
1256
1256
|
});
|
1257
1257
|
}
|
1258
1258
|
_collect(t, r, n) {
|
1259
|
-
const i = new
|
1259
|
+
const i = new It();
|
1260
1260
|
this._copyInfo = {
|
1261
1261
|
unitId: t,
|
1262
1262
|
subUnitId: r,
|
1263
1263
|
matrix: i
|
1264
1264
|
};
|
1265
|
-
const o = this._injector.invoke((s) =>
|
1265
|
+
const o = this._injector.invoke((s) => _i(n, s, t, r));
|
1266
1266
|
if (!o)
|
1267
1267
|
return;
|
1268
1268
|
const { rows: a, cols: l } = o;
|
@@ -1290,11 +1290,11 @@ let Qe = class extends be {
|
|
1290
1290
|
return { redos: [], undos: [] };
|
1291
1291
|
const { unitId: i, subUnitId: o } = this._copyInfo;
|
1292
1292
|
if (r.unitId !== i || o !== r.subUnitId) {
|
1293
|
-
const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new
|
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();
|
1294
1294
|
c.forEach(({ startRange: g }) => {
|
1295
1295
|
var C;
|
1296
1296
|
(C = this._copyInfo) == null || C.matrix.forValue((v, I, w) => {
|
1297
|
-
const _ =
|
1297
|
+
const _ = Rt.getPositionRange(
|
1298
1298
|
{
|
1299
1299
|
startRow: v,
|
1300
1300
|
endRow: v,
|
@@ -1323,11 +1323,11 @@ let Qe = class extends be {
|
|
1323
1323
|
undos: y
|
1324
1324
|
};
|
1325
1325
|
} else {
|
1326
|
-
const a = this._sheetDataValidationModel.getRuleObjectMatrix(i, o).clone(), l = new
|
1326
|
+
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
1327
|
Ln(d, u, !0).forEach(({ startRange: y }) => {
|
1328
1328
|
var g;
|
1329
1329
|
(g = this._copyInfo) == null || g.matrix.forValue((C, v, I) => {
|
1330
|
-
const w =
|
1330
|
+
const w = Rt.getPositionRange(
|
1331
1331
|
{
|
1332
1332
|
startRow: C,
|
1333
1333
|
endRow: C,
|
@@ -1356,13 +1356,13 @@ let Qe = class extends be {
|
|
1356
1356
|
}
|
1357
1357
|
}
|
1358
1358
|
};
|
1359
|
-
Qe =
|
1360
|
-
Bt(0,
|
1359
|
+
Qe = uo([
|
1360
|
+
Bt(0, Di),
|
1361
1361
|
Bt(1, M(ie)),
|
1362
1362
|
Bt(2, M(ye))
|
1363
1363
|
], Qe);
|
1364
|
-
var
|
1365
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
1366
1366
|
(a = e[o]) && (i = a(i) || i);
|
1367
1367
|
return i;
|
1368
1368
|
}, Wt = (e, t) => (r, n) => t(r, n, e);
|
@@ -1377,7 +1377,7 @@ let et = class extends be {
|
|
1377
1377
|
workbookTypes: [en],
|
1378
1378
|
rangeTypes: [Qt],
|
1379
1379
|
worksheetTypes: [qt, Jt]
|
1380
|
-
}) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id ===
|
1380
|
+
}) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === er.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
|
1381
1381
|
workbookTypes: [en],
|
1382
1382
|
rangeTypes: [Qt],
|
1383
1383
|
worksheetTypes: [qt, Jt]
|
@@ -1386,58 +1386,58 @@ let et = class extends be {
|
|
1386
1386
|
);
|
1387
1387
|
}
|
1388
1388
|
};
|
1389
|
-
et =
|
1389
|
+
et = po([
|
1390
1390
|
Wt(0, M(ce)),
|
1391
1391
|
Wt(1, te),
|
1392
|
-
Wt(2, M(
|
1392
|
+
Wt(2, M(Si))
|
1393
1393
|
], et);
|
1394
|
-
const
|
1395
|
-
function
|
1394
|
+
const yr = "sheet.menu.data-validation";
|
1395
|
+
function go(e) {
|
1396
1396
|
return {
|
1397
|
-
id:
|
1397
|
+
id: yr,
|
1398
1398
|
type: hn.SUBITEMS,
|
1399
1399
|
icon: "DataValidationIcon",
|
1400
1400
|
tooltip: "dataValidation.title",
|
1401
|
-
hidden$:
|
1402
|
-
disabled$:
|
1401
|
+
hidden$: ii(e, X.UNIVER_SHEET),
|
1402
|
+
disabled$: Vi(e, { workbookTypes: [en], worksheetTypes: [Jt, qt], rangeTypes: [Qt] })
|
1403
1403
|
};
|
1404
1404
|
}
|
1405
|
-
function
|
1405
|
+
function vo(e) {
|
1406
1406
|
return {
|
1407
1407
|
id: We.id,
|
1408
1408
|
title: "dataValidation.panel.title",
|
1409
1409
|
type: hn.BUTTON
|
1410
1410
|
};
|
1411
1411
|
}
|
1412
|
-
function
|
1412
|
+
function fo(e) {
|
1413
1413
|
return {
|
1414
1414
|
id: kt.id,
|
1415
1415
|
title: "dataValidation.panel.add",
|
1416
1416
|
type: hn.BUTTON
|
1417
1417
|
};
|
1418
1418
|
}
|
1419
|
-
const
|
1420
|
-
[
|
1421
|
-
[
|
1419
|
+
const mo = {
|
1420
|
+
[oi.RULES]: {
|
1421
|
+
[yr]: {
|
1422
1422
|
order: 0,
|
1423
|
-
menuItemFactory:
|
1423
|
+
menuItemFactory: go,
|
1424
1424
|
[We.id]: {
|
1425
1425
|
order: 0,
|
1426
|
-
menuItemFactory:
|
1426
|
+
menuItemFactory: vo
|
1427
1427
|
},
|
1428
1428
|
[kt.id]: {
|
1429
1429
|
order: 1,
|
1430
|
-
menuItemFactory:
|
1430
|
+
menuItemFactory: fo
|
1431
1431
|
}
|
1432
1432
|
}
|
1433
1433
|
}
|
1434
1434
|
};
|
1435
|
-
var
|
1436
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
1437
1437
|
(a = e[o]) && (i = a(i) || i);
|
1438
1438
|
return i;
|
1439
1439
|
}, K = (e, t) => (r, n) => t(r, n, e);
|
1440
|
-
const
|
1440
|
+
const Mr = {
|
1441
1441
|
tr: {
|
1442
1442
|
size: 6,
|
1443
1443
|
color: "#fe4b4b"
|
@@ -1448,7 +1448,7 @@ let tt = class extends ln {
|
|
1448
1448
|
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
1449
|
}
|
1450
1450
|
_initMenu() {
|
1451
|
-
this._menuManagerService.mergeMenu(
|
1451
|
+
this._menuManagerService.mergeMenu(mo);
|
1452
1452
|
}
|
1453
1453
|
_initDropdown() {
|
1454
1454
|
this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
|
@@ -1494,11 +1494,11 @@ let tt = class extends ln {
|
|
1494
1494
|
_initViewModelIntercept() {
|
1495
1495
|
this.disposeWithMe(
|
1496
1496
|
this._sheetInterceptorService.intercept(
|
1497
|
-
|
1497
|
+
hr.CELL_CONTENT,
|
1498
1498
|
{
|
1499
|
-
effect:
|
1499
|
+
effect: jn.Style,
|
1500
1500
|
// must be after numfmt
|
1501
|
-
priority:
|
1501
|
+
priority: pr.DATA_VALIDATION,
|
1502
1502
|
// eslint-disable-next-line max-lines-per-function, complexity
|
1503
1503
|
handler: (e, t, r) => {
|
1504
1504
|
var g, C, v, I, w;
|
@@ -1523,7 +1523,7 @@ let tt = class extends ln {
|
|
1523
1523
|
};
|
1524
1524
|
return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
|
1525
1525
|
...e == null ? void 0 : e.markers,
|
1526
|
-
...h === Ze.INVALID ?
|
1526
|
+
...h === Ze.INVALID ? Mr : null
|
1527
1527
|
}, e.customRender = [
|
1528
1528
|
...(C = e == null ? void 0 : e.customRender) != null ? C : [],
|
1529
1529
|
...c != null && c.canvasRender ? [c.canvasRender] : []
|
@@ -1583,7 +1583,7 @@ let tt = class extends ln {
|
|
1583
1583
|
// patched data-validation change don't need to re-calc row height
|
1584
1584
|
// re-calc of row height will be triggered precisely by the origin command
|
1585
1585
|
vn((e) => e.source === "command"),
|
1586
|
-
|
1586
|
+
lr(100)
|
1587
1587
|
).subscribe((e) => {
|
1588
1588
|
if (e.length === 0)
|
1589
1589
|
return;
|
@@ -1593,23 +1593,23 @@ let tt = class extends ln {
|
|
1593
1593
|
(r.rule.type === j.LIST_MULTIPLE || r.rule.type === j.LIST) && (n = r.rule) != null && n.ranges && t.push(...r.rule.ranges);
|
1594
1594
|
}), t.length) {
|
1595
1595
|
const r = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
|
1596
|
-
|
1596
|
+
Yn(r.redos, this._commandService);
|
1597
1597
|
}
|
1598
1598
|
});
|
1599
1599
|
}
|
1600
1600
|
};
|
1601
|
-
tt =
|
1601
|
+
tt = br([
|
1602
1602
|
K(0, te),
|
1603
|
-
K(1,
|
1603
|
+
K(1, ai),
|
1604
1604
|
K(2, xe),
|
1605
1605
|
K(3, ue),
|
1606
|
-
K(4, M(
|
1606
|
+
K(4, M(vr)),
|
1607
1607
|
K(5, M(Ue)),
|
1608
1608
|
K(6, M(ie)),
|
1609
1609
|
K(7, M(Me)),
|
1610
1610
|
K(8, M(fn)),
|
1611
|
-
K(9, M(
|
1612
|
-
K(10, Ur(
|
1611
|
+
K(9, M(tr)),
|
1612
|
+
K(10, Ur(gr))
|
1613
1613
|
], tt);
|
1614
1614
|
let Un = class extends ln {
|
1615
1615
|
constructor(e, t, r, n, i, o, a) {
|
@@ -1619,11 +1619,11 @@ let Un = class extends ln {
|
|
1619
1619
|
_initViewModelIntercept() {
|
1620
1620
|
this.disposeWithMe(
|
1621
1621
|
this._sheetInterceptorService.intercept(
|
1622
|
-
|
1622
|
+
hr.CELL_CONTENT,
|
1623
1623
|
{
|
1624
|
-
effect:
|
1624
|
+
effect: jn.Style,
|
1625
1625
|
// must be after numfmt
|
1626
|
-
priority:
|
1626
|
+
priority: pr.DATA_VALIDATION,
|
1627
1627
|
// eslint-disable-next-line complexity, max-lines-per-function
|
1628
1628
|
handler: (e, t, r) => {
|
1629
1629
|
var y, g, C, v, I;
|
@@ -1636,7 +1636,7 @@ let Un = class extends ln {
|
|
1636
1636
|
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
1637
|
return (!e || e === t.rawData) && (e = { ...t.rawData }), e.markers = {
|
1638
1638
|
...e == null ? void 0 : e.markers,
|
1639
|
-
...h === Ze.INVALID ?
|
1639
|
+
...h === Ze.INVALID ? Mr : null
|
1640
1640
|
}, e.customRender = [
|
1641
1641
|
...(g = e == null ? void 0 : e.customRender) != null ? g : [],
|
1642
1642
|
...c != null && c.canvasRender ? [c.canvasRender] : []
|
@@ -1694,7 +1694,7 @@ let Un = class extends ln {
|
|
1694
1694
|
_initAutoHeight() {
|
1695
1695
|
this._sheetDataValidationModel.ruleChange$.pipe(
|
1696
1696
|
vn((e) => e.source === "command"),
|
1697
|
-
|
1697
|
+
lr(16)
|
1698
1698
|
).subscribe((e) => {
|
1699
1699
|
const t = [];
|
1700
1700
|
if (e.forEach((r) => {
|
@@ -1702,26 +1702,26 @@ let Un = class extends ln {
|
|
1702
1702
|
(r.rule.type === j.LIST_MULTIPLE || r.rule.type === j.LIST) && (n = r.rule) != null && n.ranges && t.push(...r.rule.ranges);
|
1703
1703
|
}), t.length) {
|
1704
1704
|
const r = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
|
1705
|
-
|
1705
|
+
Yn(r.redos, this._commandService);
|
1706
1706
|
}
|
1707
1707
|
});
|
1708
1708
|
}
|
1709
1709
|
};
|
1710
|
-
Un =
|
1710
|
+
Un = br([
|
1711
1711
|
K(0, te),
|
1712
1712
|
K(1, xe),
|
1713
|
-
K(2, M(
|
1713
|
+
K(2, M(vr)),
|
1714
1714
|
K(3, M(Me)),
|
1715
1715
|
K(4, M(fn)),
|
1716
1716
|
K(5, M(ie)),
|
1717
|
-
K(6, M(
|
1717
|
+
K(6, M(tr))
|
1718
1718
|
], Un);
|
1719
|
-
var
|
1720
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
1721
1721
|
(a = e[o]) && (i = a(i) || i);
|
1722
1722
|
return i;
|
1723
1723
|
}, Fn = (e, t) => (r, n) => t(r, n, e);
|
1724
|
-
let
|
1724
|
+
let Et = class extends be {
|
1725
1725
|
constructor(e, t, r) {
|
1726
1726
|
super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = r, this._initSkeletonChange();
|
1727
1727
|
}
|
@@ -1741,11 +1741,11 @@ let Dt = class extends be {
|
|
1741
1741
|
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Fr(16)).subscribe(e));
|
1742
1742
|
}
|
1743
1743
|
};
|
1744
|
-
|
1744
|
+
Et = Co([
|
1745
1745
|
Fn(1, M(ie)),
|
1746
1746
|
Fn(2, M(ut))
|
1747
|
-
],
|
1748
|
-
function
|
1747
|
+
], Et);
|
1748
|
+
function wo(e) {
|
1749
1749
|
var d;
|
1750
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
1751
|
return /* @__PURE__ */ $(dt, { children: [
|
@@ -1756,7 +1756,7 @@ function So(e) {
|
|
1756
1756
|
onClick: () => l(!a),
|
1757
1757
|
children: [
|
1758
1758
|
t.t("dataValidation.panel.options"),
|
1759
|
-
a ? /* @__PURE__ */ S(
|
1759
|
+
a ? /* @__PURE__ */ S(Cr, { className: "univer-ml-1" }) : /* @__PURE__ */ S(_n, { className: "univer-ml-1" })
|
1760
1760
|
]
|
1761
1761
|
}
|
1762
1762
|
),
|
@@ -1800,20 +1800,20 @@ function So(e) {
|
|
1800
1800
|
] })
|
1801
1801
|
] });
|
1802
1802
|
}
|
1803
|
-
const
|
1803
|
+
const Io = (e) => xr(
|
1804
1804
|
async (t, r, n, i) => {
|
1805
1805
|
const o = await e.executeCommand(t, r, n);
|
1806
1806
|
i == null || i(o);
|
1807
1807
|
},
|
1808
1808
|
1e3
|
1809
1809
|
);
|
1810
|
-
function
|
1810
|
+
function Ro(e, t, r) {
|
1811
1811
|
var n, i, o, a;
|
1812
1812
|
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
1813
|
}
|
1814
|
-
function
|
1815
|
-
var
|
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(
|
1814
|
+
function yo() {
|
1815
|
+
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);
|
1817
1817
|
if (ke(() => () => {
|
1818
1818
|
const f = O.getCurrentLastSelection();
|
1819
1819
|
f && O.setSelections([f]);
|
@@ -1826,14 +1826,14 @@ function Io() {
|
|
1826
1826
|
});
|
1827
1827
|
}, [h, c, l, o, i]), !y)
|
1828
1828
|
return null;
|
1829
|
-
const P = y.operators, k = y.operatorNames, H = p.operator ?
|
1829
|
+
const P = y.operators, k = y.operatorNames, H = p.operator ? di.includes(p.operator) : !1, B = () => {
|
1830
1830
|
var f, A, x;
|
1831
1831
|
(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
1832
|
}, J = Gt((f) => {
|
1833
|
-
const A = f.split(",").filter(Boolean).map(
|
1833
|
+
const A = f.split(",").filter(Boolean).map(Ti).map((ee) => {
|
1834
1834
|
const wn = ee.sheetName;
|
1835
1835
|
if (wn) {
|
1836
|
-
const Or =
|
1836
|
+
const Or = Ro(d, ee.unitId, wn);
|
1837
1837
|
return { ...ee, sheetId: Or };
|
1838
1838
|
}
|
1839
1839
|
return {
|
@@ -1856,7 +1856,7 @@ function Io() {
|
|
1856
1856
|
ruleId: l,
|
1857
1857
|
ranges: x
|
1858
1858
|
};
|
1859
|
-
_(
|
1859
|
+
_(er.id, we);
|
1860
1860
|
}), ne = (f) => {
|
1861
1861
|
if (yn(f, Vn(p)))
|
1862
1862
|
return;
|
@@ -1876,7 +1876,7 @@ function Io() {
|
|
1876
1876
|
void 0
|
1877
1877
|
);
|
1878
1878
|
}, oe = async () => {
|
1879
|
-
await h.executeCommand(
|
1879
|
+
await h.executeCommand(nr.id, {
|
1880
1880
|
ruleId: l,
|
1881
1881
|
unitId: i,
|
1882
1882
|
subUnitId: o
|
@@ -1907,12 +1907,12 @@ function Io() {
|
|
1907
1907
|
ruleId: p.uid,
|
1908
1908
|
setting: Vn(ee)
|
1909
1909
|
});
|
1910
|
-
}, Z = u.get(y.formulaInput), fe = ct(() => I.map((f) =>
|
1910
|
+
}, Z = u.get(y.formulaInput), fe = ct(() => I.map((f) => fr(f.range)).join(","), []), Q = Dn(p), q = (f) => {
|
1911
1911
|
yn(f, Dn(p)) || (b({
|
1912
1912
|
...p,
|
1913
1913
|
...f
|
1914
1914
|
}), _(
|
1915
|
-
|
1915
|
+
Kr.id,
|
1916
1916
|
{
|
1917
1917
|
unitId: i,
|
1918
1918
|
subUnitId: o,
|
@@ -1928,7 +1928,7 @@ function Io() {
|
|
1928
1928
|
label: m.t("dataValidation.panel.range"),
|
1929
1929
|
error: !p.ranges.length || R ? m.t("dataValidation.panel.rangeError") : "",
|
1930
1930
|
children: /* @__PURE__ */ S(
|
1931
|
-
|
1931
|
+
si,
|
1932
1932
|
{
|
1933
1933
|
selectorRef: T,
|
1934
1934
|
unitId: i,
|
@@ -1952,7 +1952,7 @@ function Io() {
|
|
1952
1952
|
{
|
1953
1953
|
className: "univer-w-full",
|
1954
1954
|
value: p.type,
|
1955
|
-
options: (
|
1955
|
+
options: (D = v == null ? void 0 : v.sort((f, A) => f.order - A.order)) == null ? void 0 : D.map((f) => ({
|
1956
1956
|
label: m.t(f.title),
|
1957
1957
|
value: f.id
|
1958
1958
|
})),
|
@@ -2018,15 +2018,15 @@ function Io() {
|
|
2018
2018
|
children: m.t("dataValidation.panel.allowBlank")
|
2019
2019
|
}
|
2020
2020
|
) }),
|
2021
|
-
/* @__PURE__ */ S(
|
2021
|
+
/* @__PURE__ */ S(wo, { value: Q, onChange: q, extraComponent: y.optionsInput }),
|
2022
2022
|
/* @__PURE__ */ $("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
|
2023
2023
|
/* @__PURE__ */ S(Ke, { className: "univer-ml-3", onClick: oe, children: m.t("dataValidation.panel.removeRule") }),
|
2024
2024
|
/* @__PURE__ */ S(Ke, { className: "univer-ml-3", variant: "primary", onClick: B, children: m.t("dataValidation.panel.done") })
|
2025
2025
|
] })
|
2026
2026
|
] });
|
2027
2027
|
}
|
2028
|
-
const
|
2029
|
-
const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = F(Me), l = F(te), s = F(
|
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
2030
|
var w;
|
2031
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
2032
|
return {
|
@@ -2034,7 +2034,7 @@ const Ro = (e) => {
|
|
2034
2034
|
stroke: v
|
2035
2035
|
};
|
2036
2036
|
}, [p]), y = (g) => {
|
2037
|
-
l.executeCommand(
|
2037
|
+
l.executeCommand(nr.id, {
|
2038
2038
|
ruleId: t.uid,
|
2039
2039
|
unitId: n,
|
2040
2040
|
subUnitId: i
|
@@ -2085,7 +2085,7 @@ const Ro = (e) => {
|
|
2085
2085
|
"div",
|
2086
2086
|
{
|
2087
2087
|
className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px] dark:!univer-text-gray-300",
|
2088
|
-
children: t.ranges.map((g) =>
|
2088
|
+
children: t.ranges.map((g) => fr(g)).join(",")
|
2089
2089
|
}
|
2090
2090
|
),
|
2091
2091
|
h ? /* @__PURE__ */ S(
|
@@ -2100,7 +2100,7 @@ const Ro = (e) => {
|
|
2100
2100
|
}
|
2101
2101
|
);
|
2102
2102
|
};
|
2103
|
-
function
|
2103
|
+
function Mo(e) {
|
2104
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
2105
|
ke(() => {
|
2106
2106
|
s(t.getRules(h, c));
|
@@ -2112,7 +2112,7 @@ function yo(e) {
|
|
2112
2112
|
};
|
2113
2113
|
}, [h, c, t]);
|
2114
2114
|
const m = async () => {
|
2115
|
-
const C =
|
2115
|
+
const C = Jn(i), v = {
|
2116
2116
|
unitId: h,
|
2117
2117
|
subUnitId: c,
|
2118
2118
|
rule: C
|
@@ -2123,19 +2123,19 @@ function yo(e) {
|
|
2123
2123
|
rule: C
|
2124
2124
|
});
|
2125
2125
|
}, p = () => {
|
2126
|
-
n.executeCommand(
|
2126
|
+
n.executeCommand(zr.id, {
|
2127
2127
|
unitId: h,
|
2128
2128
|
subUnitId: c
|
2129
2129
|
});
|
2130
2130
|
}, y = ((C) => {
|
2131
2131
|
const v = r.getCurrentUnitForType(X.UNIVER_SHEET), I = v.getActiveSheet(), w = v.getUnitId(), _ = I.getSheetId();
|
2132
|
-
return C.map((L) =>
|
2132
|
+
return C.map((L) => Ci(i, w, _, L.ranges) ? { ...L } : { ...L, disable: !0 });
|
2133
2133
|
})(l), g = y == null ? void 0 : y.some((C) => C.disable);
|
2134
2134
|
return /* @__PURE__ */ $("div", { className: "univer-pb-4", children: [
|
2135
2135
|
y == null ? void 0 : y.map((C) => {
|
2136
2136
|
var v;
|
2137
2137
|
return /* @__PURE__ */ S(
|
2138
|
-
|
2138
|
+
bo,
|
2139
2139
|
{
|
2140
2140
|
unitId: h,
|
2141
2141
|
subUnitId: c,
|
@@ -2158,7 +2158,7 @@ function yo(e) {
|
|
2158
2158
|
] })
|
2159
2159
|
] });
|
2160
2160
|
}
|
2161
|
-
const
|
2161
|
+
const Eo = () => {
|
2162
2162
|
const e = F(Ce), t = Le(e.activeRule$, e.activeRule), r = F(ue), n = Le(
|
2163
2163
|
() => r.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
|
2164
2164
|
void 0,
|
@@ -2166,11 +2166,11 @@ const bo = () => {
|
|
2166
2166
|
[]
|
2167
2167
|
), i = Le(() => {
|
2168
2168
|
var o;
|
2169
|
-
return (o = n == null ? void 0 : n.activeSheet$) != null ? o :
|
2169
|
+
return (o = n == null ? void 0 : n.activeSheet$) != null ? o : hi(null);
|
2170
2170
|
}, void 0, void 0, []);
|
2171
|
-
return !n || !i ? null : t && t.subUnitId === i.getSheetId() ? /* @__PURE__ */ S(
|
2172
|
-
},
|
2173
|
-
function
|
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";
|
2173
|
+
function Dt(e) {
|
2174
2174
|
var i;
|
2175
2175
|
const { value: t, onChange: r } = e, n = F(ce);
|
2176
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: [
|
@@ -2179,9 +2179,9 @@ function Vt(e) {
|
|
2179
2179
|
/* @__PURE__ */ S(Ae, { value: `${se.TEXT}`, children: n.t("dataValidation.renderMode.text") })
|
2180
2180
|
] }) });
|
2181
2181
|
}
|
2182
|
-
|
2183
|
-
const
|
2184
|
-
function
|
2182
|
+
Dt.componentKey = Do;
|
2183
|
+
const Vo = "DATE_SHOW_TIME_OPTION";
|
2184
|
+
function Vt(e) {
|
2185
2185
|
var i;
|
2186
2186
|
const { value: t, onChange: r } = e, n = F(ce);
|
2187
2187
|
return /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
|
@@ -2201,9 +2201,9 @@ function Ot(e) {
|
|
2201
2201
|
}
|
2202
2202
|
) });
|
2203
2203
|
}
|
2204
|
-
|
2205
|
-
var
|
2206
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
2207
2207
|
(a = e[o]) && (i = a(i) || i);
|
2208
2208
|
return i;
|
2209
2209
|
}, je = (e, t) => (r, n) => t(r, n, e);
|
@@ -2257,7 +2257,7 @@ let nn = class {
|
|
2257
2257
|
}
|
2258
2258
|
async _parseFormula(e, t, r) {
|
2259
2259
|
var d, u, h, c, m, p, b, y, g;
|
2260
|
-
const { formula1: n =
|
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));
|
2261
2261
|
return {
|
2262
2262
|
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
2263
|
formula2: Oe(i) ? l : i,
|
@@ -2272,7 +2272,7 @@ let nn = class {
|
|
2272
2272
|
const c = this._dataValidationModel.getValidator(h.type);
|
2273
2273
|
if (!c || !((T = c.skipDefaultFontRender) != null && T.call(c, h, u, { unitId: i, subUnitId: o, row: l, column: s })))
|
2274
2274
|
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 =
|
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({
|
2276
2276
|
left: C,
|
2277
2277
|
top: v,
|
2278
2278
|
scaleX: 1,
|
@@ -2287,7 +2287,7 @@ let nn = class {
|
|
2287
2287
|
const R = I.getMatrix();
|
2288
2288
|
e.transform(R[0], R[1], R[2], R[3], R[4], R[5]);
|
2289
2289
|
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
|
-
|
2290
|
+
gi.drawWith(e, {
|
2291
2291
|
checked: N,
|
2292
2292
|
width: L,
|
2293
2293
|
height: L,
|
@@ -2316,7 +2316,7 @@ let nn = class {
|
|
2316
2316
|
endRow: r.actualRow
|
2317
2317
|
},
|
2318
2318
|
value: {
|
2319
|
-
v: String(s) ===
|
2319
|
+
v: String(s) === Qr(String(h)) ? c : h,
|
2320
2320
|
p: null
|
2321
2321
|
}
|
2322
2322
|
};
|
@@ -2334,58 +2334,58 @@ let nn = class {
|
|
2334
2334
|
(n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.DEFAULT);
|
2335
2335
|
}
|
2336
2336
|
};
|
2337
|
-
nn =
|
2337
|
+
nn = To([
|
2338
2338
|
je(0, te),
|
2339
2339
|
je(1, ue),
|
2340
|
-
je(2, M(
|
2341
|
-
je(3, M(
|
2340
|
+
je(2, M(Gr)),
|
2341
|
+
je(3, M(Xn)),
|
2342
2342
|
je(4, M(xe)),
|
2343
2343
|
je(5, M(ie))
|
2344
2344
|
], nn);
|
2345
|
-
class
|
2345
|
+
class Po extends Se {
|
2346
2346
|
constructor() {
|
2347
2347
|
super(...arguments);
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2348
|
+
V(this, "id", j.CHECKBOX);
|
2349
|
+
V(this, "canvasRender", this.injector.createInstance(nn));
|
2350
|
+
V(this, "formulaInput", qn);
|
2351
2351
|
}
|
2352
2352
|
}
|
2353
|
-
class
|
2353
|
+
class Ao extends Se {
|
2354
2354
|
constructor() {
|
2355
2355
|
super(...arguments);
|
2356
|
-
|
2357
|
-
|
2356
|
+
V(this, "id", j.CUSTOM);
|
2357
|
+
V(this, "formulaInput", Gn);
|
2358
2358
|
}
|
2359
2359
|
}
|
2360
|
-
const
|
2361
|
-
class
|
2360
|
+
const Lo = "data-validation.formula-input";
|
2361
|
+
class ko extends Se {
|
2362
2362
|
constructor() {
|
2363
2363
|
super(...arguments);
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2364
|
+
V(this, "id", j.DATE);
|
2365
|
+
V(this, "formulaInput", Lo);
|
2366
|
+
V(this, "optionsInput", Vt.componentKey);
|
2367
|
+
V(this, "dropdownType", ve.DATE);
|
2368
2368
|
}
|
2369
2369
|
}
|
2370
|
-
class
|
2370
|
+
class No extends Se {
|
2371
2371
|
constructor() {
|
2372
2372
|
super(...arguments);
|
2373
|
-
|
2374
|
-
|
2373
|
+
V(this, "id", j.DECIMAL);
|
2374
|
+
V(this, "formulaInput", Pt);
|
2375
2375
|
}
|
2376
2376
|
}
|
2377
|
-
const
|
2378
|
-
function
|
2379
|
-
const r =
|
2377
|
+
const Er = 4, Uo = 0, Ht = 4, Dr = 4, rn = 6, Ot = 6, Ve = 14;
|
2378
|
+
function Fo(e, t) {
|
2379
|
+
const r = vi.getTextSize(e, t), n = r.width + Er * 2, { ba: i, bd: o } = r, a = i + o;
|
2380
2380
|
return {
|
2381
2381
|
width: n,
|
2382
|
-
height: a +
|
2382
|
+
height: a + Uo * 2,
|
2383
2383
|
ba: i
|
2384
2384
|
};
|
2385
2385
|
}
|
2386
2386
|
function $t(e, t, r, n) {
|
2387
|
-
const i = Ve + rn * 2, o = r - i, a = n -
|
2388
|
-
layout:
|
2387
|
+
const i = Ve + rn * 2, o = r - i, a = n - Ot * 2, l = e.map((c) => ({
|
2388
|
+
layout: Fo(c, t),
|
2389
2389
|
text: c
|
2390
2390
|
}));
|
2391
2391
|
let s;
|
@@ -2406,38 +2406,38 @@ function $t(e, t, r, n) {
|
|
2406
2406
|
});
|
2407
2407
|
let u = 0, h = 0;
|
2408
2408
|
return d.forEach((c, m) => {
|
2409
|
-
h = Math.max(h, c.width), m === d.length - 1 ? u += c.height : u += c.height +
|
2409
|
+
h = Math.max(h, c.width), m === d.length - 1 ? u += c.height : u += c.height + Dr;
|
2410
2410
|
}), {
|
2411
2411
|
lines: d,
|
2412
2412
|
totalHeight: u,
|
2413
2413
|
contentWidth: o,
|
2414
2414
|
contentHeight: a,
|
2415
|
-
cellAutoHeight: u +
|
2415
|
+
cellAutoHeight: u + Ot * 2,
|
2416
2416
|
calcAutoWidth: h + i
|
2417
2417
|
};
|
2418
2418
|
}
|
2419
|
-
const
|
2420
|
-
class
|
2419
|
+
const xo = 8;
|
2420
|
+
class Bo extends fi {
|
2421
2421
|
static drawWith(t, r) {
|
2422
2422
|
const { fontString: n, info: i, fill: o, color: a } = r, { layout: l, text: s } = i;
|
2423
|
-
t.save(),
|
2423
|
+
t.save(), dr.drawWith(t, {
|
2424
2424
|
width: l.width,
|
2425
2425
|
height: l.height,
|
2426
|
-
radius:
|
2426
|
+
radius: xo,
|
2427
2427
|
fill: o || Ye
|
2428
|
-
}), t.translateWithPrecision(
|
2428
|
+
}), t.translateWithPrecision(Er, l.ba), t.font = n, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
|
2429
2429
|
}
|
2430
2430
|
}
|
2431
|
-
var
|
2432
|
-
for (var i = n > 1 ? void 0 : n ?
|
2431
|
+
var Wo = Object.getOwnPropertyDescriptor, Ho = (e, t, r, n) => {
|
2432
|
+
for (var i = n > 1 ? void 0 : n ? Wo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
2433
2433
|
(a = e[o]) && (i = a(i) || i);
|
2434
2434
|
return i;
|
2435
2435
|
}, St = (e, t) => (r, n) => t(r, n, e);
|
2436
|
-
const
|
2436
|
+
const $o = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
|
2437
2437
|
let on = class {
|
2438
2438
|
constructor(e, t, r, n) {
|
2439
|
-
|
2440
|
-
|
2439
|
+
V(this, "zIndex");
|
2440
|
+
V(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
|
2441
2441
|
this._commandService = e, this._univerInstanceService = t, this._renderManagerService = r, this._dataValidationModel = n;
|
2442
2442
|
}
|
2443
2443
|
_ensureMap(e) {
|
@@ -2458,7 +2458,7 @@ let on = class {
|
|
2458
2458
|
a = n - Ve + 4;
|
2459
2459
|
break;
|
2460
2460
|
}
|
2461
|
-
e.save(), e.translateWithPrecision(t.startX + o, t.startY + a), e.fillStyle = "#565656", e.fill(
|
2461
|
+
e.save(), e.translateWithPrecision(t.startX + o, t.startY + a), e.fillStyle = "#565656", e.fill($o), e.restore();
|
2462
2462
|
}
|
2463
2463
|
// eslint-disable-next-line max-lines-per-function
|
2464
2464
|
drawWith(e, t, r, n) {
|
@@ -2475,7 +2475,7 @@ let on = class {
|
|
2475
2475
|
startY: u.startY + p,
|
2476
2476
|
endY: u.endY - b
|
2477
2477
|
}, w = I.endX - I.startX, _ = I.endY - I.startY, { cl: R } = l || {}, L = (ne = typeof R == "object" ? R == null ? void 0 : R.rgb : R) != null ? ne : "#000", N = Te(l != null ? l : void 0), { vt: E, ht: T } = l || {}, O = E != null ? E : de.MIDDLE, P = (oe = re(s)) != null ? oe : "", k = v.parseCellValue(P), H = v.getListWithColorMap(C), B = $t(k, N, w, _);
|
2478
|
-
this._drawDownIcon(e, I, w, _, O), e.save(), e.translateWithPrecision(I.startX, I.startY), e.beginPath(), e.rect(0, 0, w - Ve, _), e.clip(), e.translateWithPrecision(rn,
|
2478
|
+
this._drawDownIcon(e, I, w, _, O), e.save(), e.translateWithPrecision(I.startX, I.startY), e.beginPath(), e.rect(0, 0, w - Ve, _), e.clip(), e.translateWithPrecision(rn, Ot);
|
2479
2479
|
let J = 0;
|
2480
2480
|
switch (O) {
|
2481
2481
|
case de.MIDDLE:
|
@@ -2497,8 +2497,8 @@ let on = class {
|
|
2497
2497
|
q = (B.contentWidth - Z) / 2;
|
2498
2498
|
break;
|
2499
2499
|
}
|
2500
|
-
e.translate(q, z * (fe +
|
2501
|
-
e.save(), e.translateWithPrecision(G.left, 0),
|
2500
|
+
e.translate(q, z * (fe + Dr)), Q.forEach((G) => {
|
2501
|
+
e.save(), e.translateWithPrecision(G.left, 0), Bo.drawWith(e, {
|
2502
2502
|
...N,
|
2503
2503
|
info: G,
|
2504
2504
|
color: L,
|
@@ -2509,7 +2509,7 @@ let on = class {
|
|
2509
2509
|
left: I.startX,
|
2510
2510
|
top: I.startY,
|
2511
2511
|
width: B.contentWidth + rn + Ve,
|
2512
|
-
height: B.contentHeight +
|
2512
|
+
height: B.contentHeight + Ot * 2
|
2513
2513
|
});
|
2514
2514
|
}
|
2515
2515
|
calcCellAutoHeight(e) {
|
@@ -2568,26 +2568,26 @@ let on = class {
|
|
2568
2568
|
return (n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null ? void 0 : n.setCursor(Ge.DEFAULT);
|
2569
2569
|
}
|
2570
2570
|
};
|
2571
|
-
on =
|
2571
|
+
on = Ho([
|
2572
2572
|
St(0, te),
|
2573
2573
|
St(1, ue),
|
2574
2574
|
St(2, M(xe)),
|
2575
2575
|
St(3, M(ie))
|
2576
2576
|
], on);
|
2577
|
-
class
|
2577
|
+
class jo extends Se {
|
2578
2578
|
constructor() {
|
2579
2579
|
super(...arguments);
|
2580
|
-
|
2581
|
-
|
2582
|
-
|
2580
|
+
V(this, "id", j.LIST_MULTIPLE);
|
2581
|
+
V(this, "canvasRender", this.injector.createInstance(on));
|
2582
|
+
V(this, "dropdownType", ve.MULTIPLE_LIST);
|
2583
2583
|
}
|
2584
2584
|
}
|
2585
|
-
var
|
2586
|
-
for (var i = n > 1 ? void 0 : n ?
|
2585
|
+
var Yo = Object.getOwnPropertyDescriptor, Xo = (e, t, r, n) => {
|
2586
|
+
for (var i = n > 1 ? void 0 : n ? Yo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
2587
2587
|
(a = e[o]) && (i = a(i) || i);
|
2588
2588
|
return i;
|
2589
2589
|
}, at = (e, t) => (r, n) => t(r, n, e);
|
2590
|
-
const De = 4, Ct = 4, ge = 14, xn = 1, _e = 6, Xe = 3, jt = 8,
|
2590
|
+
const De = 4, Ct = 4, ge = 14, xn = 1, _e = 6, Xe = 3, jt = 8, Zo = "#565656", Bn = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
|
2591
2591
|
function Wn(e, t, r, n, i, o, a = !0) {
|
2592
2592
|
let l = 0;
|
2593
2593
|
const s = a ? Xe : 0;
|
@@ -2619,8 +2619,8 @@ function Wn(e, t, r, n, i, o, a = !0) {
|
|
2619
2619
|
}
|
2620
2620
|
let an = class {
|
2621
2621
|
constructor(e, t, r, n, i) {
|
2622
|
-
|
2623
|
-
|
2622
|
+
V(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
|
2623
|
+
V(this, "zIndex");
|
2624
2624
|
this._univerInstanceService = e, this._localeService = t, this._commandService = r, this._renderManagerService = n, this._dataValidationModel = i;
|
2625
2625
|
}
|
2626
2626
|
_ensureMap(e) {
|
@@ -2676,7 +2676,7 @@ let an = class {
|
|
2676
2676
|
1 / 0
|
2677
2677
|
);
|
2678
2678
|
G.calculate();
|
2679
|
-
const
|
2679
|
+
const D = G.getTotalWidth(), U = G.getTotalHeight(), { paddingTop: f, paddingLeft: A } = Wn(q, v - Z - Q, D, U, T, O, !0);
|
2680
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, {
|
2681
2681
|
text: L,
|
2682
2682
|
fontStyle: k,
|
@@ -2703,8 +2703,8 @@ let an = class {
|
|
2703
2703
|
1 / 0
|
2704
2704
|
);
|
2705
2705
|
Z.calculate();
|
2706
|
-
const fe = Z.getTotalWidth(), Q = Z.getTotalHeight(), q = Q + xn * 2, G = Math.max(C - _e * 2, 1), { paddingTop:
|
2707
|
-
e.translateWithPrecision(_e,
|
2706
|
+
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, {
|
2708
2708
|
width: G,
|
2709
2709
|
height: q,
|
2710
2710
|
fill: (N == null ? void 0 : N.color) || Ye,
|
@@ -2719,9 +2719,9 @@ let an = class {
|
|
2719
2719
|
underline: !!((he = a == null ? void 0 : a.ul) != null && he.s),
|
2720
2720
|
warp: E === me.WRAP,
|
2721
2721
|
hAlign: Re.LEFT
|
2722
|
-
}, Z), e.restore(), e.translateWithPrecision(z + De + 4, (Q - Ct) / 2), e.fillStyle =
|
2722
|
+
}, Z), e.restore(), e.translateWithPrecision(z + De + 4, (Q - Ct) / 2), e.fillStyle = Zo, e.fill(Bn), e.restore(), I.set(w, {
|
2723
2723
|
left: g.startX + _e + r.rowHeaderWidth,
|
2724
|
-
top: g.startY +
|
2724
|
+
top: g.startY + D + r.columnHeaderHeight,
|
2725
2725
|
width: G,
|
2726
2726
|
height: q
|
2727
2727
|
});
|
@@ -2820,39 +2820,39 @@ let an = class {
|
|
2820
2820
|
(n = (r = ze(X.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.DEFAULT);
|
2821
2821
|
}
|
2822
2822
|
};
|
2823
|
-
an =
|
2823
|
+
an = Xo([
|
2824
2824
|
at(0, ue),
|
2825
2825
|
at(1, M(ce)),
|
2826
2826
|
at(2, te),
|
2827
2827
|
at(3, M(xe)),
|
2828
2828
|
at(4, M(ie))
|
2829
2829
|
], an);
|
2830
|
-
class
|
2830
|
+
class Ko extends Se {
|
2831
2831
|
constructor() {
|
2832
2832
|
super(...arguments);
|
2833
|
-
|
2834
|
-
|
2835
|
-
|
2836
|
-
|
2837
|
-
|
2833
|
+
V(this, "id", j.LIST);
|
2834
|
+
V(this, "canvasRender", this.injector.createInstance(an));
|
2835
|
+
V(this, "dropdownType", ve.LIST);
|
2836
|
+
V(this, "optionsInput", Dt.componentKey);
|
2837
|
+
V(this, "formulaInput", dn);
|
2838
2838
|
}
|
2839
2839
|
}
|
2840
|
-
class
|
2840
|
+
class zo extends Se {
|
2841
2841
|
constructor() {
|
2842
2842
|
super(...arguments);
|
2843
|
-
|
2844
|
-
|
2843
|
+
V(this, "id", j.TEXT_LENGTH);
|
2844
|
+
V(this, "formulaInput", Pt);
|
2845
2845
|
}
|
2846
2846
|
}
|
2847
|
-
class
|
2847
|
+
class Go extends Se {
|
2848
2848
|
constructor() {
|
2849
2849
|
super(...arguments);
|
2850
|
-
|
2851
|
-
|
2850
|
+
V(this, "id", j.WHOLE);
|
2851
|
+
V(this, "formulaInput", Pt);
|
2852
2852
|
}
|
2853
2853
|
}
|
2854
|
-
var
|
2855
|
-
for (var i = n > 1 ? void 0 : n ?
|
2854
|
+
var qo = Object.getOwnPropertyDescriptor, Jo = (e, t, r, n) => {
|
2855
|
+
for (var i = n > 1 ? void 0 : n ? qo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
2856
2856
|
(a = e[o]) && (i = a(i) || i);
|
2857
2857
|
return i;
|
2858
2858
|
}, Yt = (e, t) => (r, n) => t(r, n, e);
|
@@ -2862,11 +2862,11 @@ let nt = class extends ln {
|
|
2862
2862
|
}
|
2863
2863
|
_initComponents() {
|
2864
2864
|
[
|
2865
|
-
["DataValidationIcon",
|
2866
|
-
[
|
2865
|
+
["DataValidationIcon", _r],
|
2866
|
+
[Mt, Eo],
|
2867
|
+
[Dt.componentKey, Dt],
|
2867
2868
|
[Vt.componentKey, Vt],
|
2868
|
-
|
2869
|
-
...Xi
|
2869
|
+
...Ki
|
2870
2870
|
].forEach(([e, t]) => {
|
2871
2871
|
this.disposeWithMe(this._componentManger.register(
|
2872
2872
|
e,
|
@@ -2876,38 +2876,37 @@ let nt = class extends ln {
|
|
2876
2876
|
}
|
2877
2877
|
_registerValidatorViews() {
|
2878
2878
|
[
|
2879
|
-
|
2879
|
+
No,
|
2880
|
+
Go,
|
2881
|
+
zo,
|
2882
|
+
ko,
|
2883
|
+
Po,
|
2880
2884
|
Ko,
|
2881
|
-
|
2882
|
-
Ao
|
2883
|
-
Oo,
|
2884
|
-
Xo,
|
2885
|
-
Ho,
|
2886
|
-
To
|
2885
|
+
jo,
|
2886
|
+
Ao
|
2887
2887
|
].forEach((e) => {
|
2888
2888
|
const t = this._injector.createInstance(e), r = this._dataValidatorRegistryService.getValidatorItem(t.id);
|
2889
2889
|
r && (r.formulaInput = t.formulaInput, r.canvasRender = t.canvasRender, r.dropdownType = t.dropdownType, r.optionsInput = t.optionsInput);
|
2890
2890
|
});
|
2891
2891
|
}
|
2892
2892
|
};
|
2893
|
-
nt =
|
2893
|
+
nt = Jo([
|
2894
2894
|
Yt(0, M(ye)),
|
2895
2895
|
Yt(1, M(pn)),
|
2896
2896
|
Yt(2, M(Me))
|
2897
2897
|
], nt);
|
2898
|
-
var
|
2899
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
2900
2900
|
(a = e[o]) && (i = a(i) || i);
|
2901
2901
|
return i;
|
2902
|
-
}, Xt = (e, t) => (r, n) => t(r, n, e);
|
2903
|
-
const
|
2904
|
-
|
2905
|
-
|
2906
|
-
constructor(e = Mt, t, r, n) {
|
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 {
|
2905
|
+
constructor(e = bt, t, r, n) {
|
2907
2906
|
super(), this._config = e, this._injector = t, this._commandService = r, this._configService = n;
|
2908
|
-
const { menu: i, ...o } =
|
2907
|
+
const { menu: i, ...o } = Kn(
|
2909
2908
|
{},
|
2910
|
-
|
2909
|
+
bt,
|
2911
2910
|
this._config
|
2912
2911
|
);
|
2913
2912
|
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Sn, o);
|
@@ -2928,10 +2927,10 @@ let Hn = (wt = class extends Kn {
|
|
2928
2927
|
}), [
|
2929
2928
|
kt,
|
2930
2929
|
Lt,
|
2931
|
-
|
2930
|
+
Rr,
|
2932
2931
|
Cn,
|
2933
2932
|
We,
|
2934
|
-
|
2933
|
+
Ir
|
2935
2934
|
].forEach((e) => {
|
2936
2935
|
this._commandService.registerCommand(e);
|
2937
2936
|
});
|
@@ -2939,7 +2938,7 @@ let Hn = (wt = class extends Kn {
|
|
2939
2938
|
onReady() {
|
2940
2939
|
this._injector.get(Qe), this._injector.get(et), this._injector.get(qe), this._injector.get(ht), this._injector.get(xe).registerRenderModule(
|
2941
2940
|
X.UNIVER_SHEET,
|
2942
|
-
[
|
2941
|
+
[Et]
|
2943
2942
|
);
|
2944
2943
|
}
|
2945
2944
|
onRendered() {
|
@@ -2948,25 +2947,28 @@ let Hn = (wt = class extends Kn {
|
|
2948
2947
|
onSteady() {
|
2949
2948
|
this._injector.get(Je);
|
2950
2949
|
}
|
2951
|
-
}
|
2952
|
-
|
2950
|
+
};
|
2951
|
+
Vr(Tt, "pluginName", ra);
|
2952
|
+
Vr(Tt, "type", X.UNIVER_SHEET);
|
2953
|
+
Tt = na([
|
2954
|
+
jr(ei),
|
2953
2955
|
Xt(1, M(ye)),
|
2954
2956
|
Xt(2, te),
|
2955
2957
|
Xt(3, sn)
|
2956
|
-
],
|
2957
|
-
var
|
2958
|
-
for (var i = n > 1 ? void 0 : n ?
|
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--)
|
2959
2961
|
(a = e[o]) && (i = a(i) || i);
|
2960
2962
|
return i;
|
2961
2963
|
}, Zt = (e, t) => (r, n) => t(r, n, e);
|
2962
|
-
const
|
2963
|
-
var
|
2964
|
-
let
|
2965
|
-
constructor(e =
|
2964
|
+
const aa = "SHEET_DATA_VALIDATION_UI_PLUGIN";
|
2965
|
+
var wt;
|
2966
|
+
let Hn = (wt = class extends Zn {
|
2967
|
+
constructor(e = bt, t, r, n) {
|
2966
2968
|
super(), this._config = e, this._injector = t, this._commandService = r, this._configService = n;
|
2967
|
-
const { menu: i, ...o } =
|
2969
|
+
const { menu: i, ...o } = Kn(
|
2968
2970
|
{},
|
2969
|
-
|
2971
|
+
bt,
|
2970
2972
|
this._config
|
2971
2973
|
);
|
2972
2974
|
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Sn, o);
|
@@ -2986,10 +2988,10 @@ let $n = (It = class extends Kn {
|
|
2986
2988
|
}), [
|
2987
2989
|
kt,
|
2988
2990
|
Lt,
|
2989
|
-
|
2991
|
+
Rr,
|
2990
2992
|
Cn,
|
2991
2993
|
We,
|
2992
|
-
|
2994
|
+
Ir
|
2993
2995
|
].forEach((e) => {
|
2994
2996
|
this._commandService.registerCommand(e);
|
2995
2997
|
});
|
@@ -2997,7 +2999,7 @@ let $n = (It = class extends Kn {
|
|
2997
2999
|
onReady() {
|
2998
3000
|
this._injector.get(Qe), this._injector.get(et), this._injector.get(xe).registerRenderModule(
|
2999
3001
|
X.UNIVER_SHEET,
|
3000
|
-
[
|
3002
|
+
[Et]
|
3001
3003
|
);
|
3002
3004
|
}
|
3003
3005
|
onRendered() {
|
@@ -3006,14 +3008,14 @@ let $n = (It = class extends Kn {
|
|
3006
3008
|
onSteady() {
|
3007
3009
|
this._injector.get(Je);
|
3008
3010
|
}
|
3009
|
-
},
|
3010
|
-
|
3011
|
+
}, V(wt, "pluginName", aa), V(wt, "type", X.UNIVER_SHEET), wt);
|
3012
|
+
Hn = oa([
|
3011
3013
|
Zt(1, M(ye)),
|
3012
3014
|
Zt(2, te),
|
3013
3015
|
Zt(3, sn)
|
3014
|
-
],
|
3016
|
+
], Hn);
|
3015
3017
|
export {
|
3016
3018
|
Se as BaseSheetDataValidatorView,
|
3017
|
-
|
3018
|
-
|
3019
|
+
Hn as UniverSheetsDataValidationMobileUIPlugin,
|
3020
|
+
Tt as UniverSheetsDataValidationUIPlugin
|
3019
3021
|
};
|