@univerjs/sheets-data-validation-ui 0.7.0 → 0.8.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +347 -347
- package/lib/index.css +1 -1
- package/lib/index.js +347 -347
- package/lib/types/locale/en-US.d.ts +194 -2
- package/lib/types/locale/fa-IR.d.ts +2 -2
- package/lib/types/locale/ru-RU.d.ts +2 -2
- package/lib/types/locale/vi-VN.d.ts +2 -2
- package/lib/types/locale/zh-CN.d.ts +2 -194
- package/lib/types/locale/zh-TW.d.ts +2 -2
- package/lib/umd/index.js +2 -2
- package/package.json +14 -14
package/lib/es/index.js
CHANGED
@@ -1,33 +1,33 @@
|
|
1
1
|
var Lr = Object.defineProperty;
|
2
2
|
var kr = (e, t, r) => t in e ? Lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
3
3
|
var E = (e, t, r) => kr(e, typeof t != "symbol" ? t + "" : t, r);
|
4
|
-
import { LocaleService as se, isFormulaString as De, DataValidationType as G, Tools as Zt, Inject as b, Injector as we, Disposable as Re, UniverInstanceType as Y, toDisposable as Nr, IUniverInstanceService as le, DataValidationErrorStyle as lt, DataValidationStatus as
|
4
|
+
import { LocaleService as se, isFormulaString as De, DataValidationType as G, Tools as Zt, Inject as b, Injector as we, Disposable as Re, UniverInstanceType as Y, toDisposable as Nr, IUniverInstanceService as le, DataValidationErrorStyle as lt, DataValidationStatus as Ye, ICommandService as J, IConfigService as cn, DataValidationRenderMode as ie, DisposableCollection as Ur, dayjs as Mn, numfmt as Yn, CellValueType as Fr, CommandType as nt, ObjectMatrix as Rt, Range as xr, Rectangle as yt, queryObjectMatrix as qt, Optional as $r, RxDisposable as un, InterceptorEffectEnum as Xn, sequenceExecute as zn, bufferDebounceTime as Hr, debounce as Br, UndoCommand as Wr, RedoCommand as jr, isUnitRangesEqual as Yr, shallowEqual as bn, ThemeService as Kn, ColorKit as Xr, VerticalAlign as ae, HorizontalAlign as Xe, DEFAULT_STYLES as re, WrapStrategy as Ie, DocumentDataModel as zr, BooleanNumber as rt, DEFAULT_EMPTY_DOCUMENT_VALUE as Kr, Plugin as Gn, merge as Zn } from "@univerjs/core";
|
5
5
|
import { DataValidationFormulaController as Gr, deserializeListOptions as Zr, serializeListOptions as qn, CUSTOM_FORMULA_INPUT_NAME as Jn, BASE_FORMULA_INPUT_NAME as At, LIST_FORMULA_INPUT_NAME as hn, CHECKBOX_FORMULA_INPUT_NAME as Qn, SheetDataValidationModel as ee, SheetsDataValidationValidatorService as qr, getDataValidationCellValue as Ut, getCellValueOrigin as Q, createDefaultNewRule as er, AddSheetDataValidationCommand as gn, DATA_VALIDATION_PLUGIN_NAME as tr, getDataValidationDiffMutations as Jt, UpdateSheetDataValidationRangeCommand as nr, DataValidationCacheService as rr, UpdateSheetDataValidationSettingCommand as En, UpdateSheetDataValidationOptionsCommand as Jr, RemoveSheetDataValidationCommand as ir, RemoveSheetAllDataValidationCommand as Qr, DataValidationFormulaService as ei, CHECKBOX_FORMULA_2 as ti, CHECKBOX_FORMULA_1 as ni, getFormulaResult as Ft, isLegalFormulaResult as Dn, transformCheckboxValue as ri } from "@univerjs/sheets-data-validation";
|
6
|
-
import { jsxs as W, Fragment as
|
7
|
-
import { FormLayout as j, Input as Ve, Checkbox as Lt, clsx as
|
8
|
-
import { useDependency as U, useSidebarClick as or, useObservable as Te, useEvent as Qt, ISidebarService as ar, IDialogService as ai, IZenZoneService as sr, KeyCode as gt, MenuItemType as vn, getMenuHiddenObservable as si,
|
9
|
-
import On, { useState as
|
10
|
-
import { FormulaEditor as lr, RangeSelector as
|
6
|
+
import { jsxs as W, Fragment as dt, jsx as _ } from "react/jsx-runtime";
|
7
|
+
import { FormLayout as j, Input as Ve, Checkbox as Lt, clsx as Ae, borderClassName as Mt, RadioGroup as pn, Radio as Oe, DraggableList as ii, Dropdown as oi, Button as ze, Select as Vn } from "@univerjs/design";
|
8
|
+
import { useDependency as U, useSidebarClick as or, useObservable as Te, useEvent as Qt, ISidebarService as ar, IDialogService as ai, IZenZoneService as sr, KeyCode as gt, MenuItemType as vn, getMenuHiddenObservable as si, RibbonDataGroup as li, IMenuManagerService as di, ComponentManager as mn } from "@univerjs/ui";
|
9
|
+
import On, { useState as B, useRef as ht, forwardRef as ke, createElement as Ne, useMemo as ct, useEffect as Pe } from "react";
|
10
|
+
import { FormulaEditor as lr, RangeSelector as ci } from "@univerjs/sheets-formula-ui";
|
11
11
|
import { DataValidatorRegistryService as ye, DataValidationModel as fn, DataValidatorDropdownType as ge, DataValidatorRegistryScope as ui, TWO_FORMULA_OPERATOR_COUNT as hi, getRuleOptions as Tn, getRuleSetting as Pn } from "@univerjs/data-validation";
|
12
|
-
import { debounceTime as
|
13
|
-
import { DeviceInputEventType as pt, IRenderManagerService as
|
12
|
+
import { debounceTime as dr, filter as _n, BehaviorSubject as An, distinctUntilChanged as gi, Subject as pi, bufferTime as cr, of as vi } from "rxjs";
|
13
|
+
import { DeviceInputEventType as pt, IRenderManagerService as Ue, fixLineWidthByScale as Ln, Transform as mi, CheckboxShape as fi, getCurrentTypeOfRenderer as Ke, CURSOR_TYPE as Ge, FontCache as _i, Shape as Si, Rect as ur, getFontStyleString as xt, getDocsSkeletonPageSize as it, Documents as Ci, DocumentViewModel as Ii, DocumentSkeleton as wi } from "@univerjs/engine-render";
|
14
14
|
import { SheetInterceptorService as Sn, VALIDATE_CELL as Ri, SheetsSelectionsService as hr, SetRangeValuesCommand as st, getSheetCommandTarget as gr, rangeToDiscreteRange as yi, SheetPermissionCheckController as Mi, WorksheetEditPermission as en, WorksheetSetCellStylePermission as tn, RangeProtectionPermissionEditPoint as nn, WorkbookEditablePermission as rn, INTERCEPTOR_POINT as pr, InterceptCellContentPriority as vr, checkRangesEditablePermission as bi } from "@univerjs/sheets";
|
15
15
|
import { getPatternType as Ei } from "@univerjs/sheets-numfmt";
|
16
16
|
import { ISheetCellDropdownManagerService as Di, IEditorBridgeService as mr, SetCellEditVisibleOperation as vt, HoverManagerService as Vi, CellAlertManagerService as Oi, CellAlertType as Ti, IAutoFillService as Pi, APPLY_TYPE as ot, virtualizeDiscreteRanges as on, getAutoFillRepeatRange as Ai, ISheetClipboardService as Li, COPY_TYPE as kn, PREDEFINED_HOOK_NAME as mt, getRepeatRange as Nn, getCurrentRangeDisable$ as ki, AutoHeightController as fr, SheetSkeletonManagerService as bt, IMarkSelectionService as Ni } from "@univerjs/sheets-ui";
|
17
17
|
import { deserializeRangeWithSheet as Ui, serializeRange as _r } from "@univerjs/engine-formula";
|
18
18
|
const Fi = (e) => {
|
19
19
|
const { isTwoFormula: t = !1, value: r, onChange: n, showError: i, validResult: o } = e, a = U(se), l = i ? o == null ? void 0 : o.formula1 : "", s = i ? o == null ? void 0 : o.formula2 : "";
|
20
|
-
return t ? /* @__PURE__ */ W(
|
20
|
+
return t ? /* @__PURE__ */ W(dt, { children: [
|
21
21
|
/* @__PURE__ */ _(j, { error: l, children: /* @__PURE__ */ _(
|
22
22
|
Ve,
|
23
23
|
{
|
24
24
|
className: "univer-w-full",
|
25
25
|
placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
|
26
26
|
value: r == null ? void 0 : r.formula1,
|
27
|
-
onChange: (
|
27
|
+
onChange: (d) => {
|
28
28
|
n == null || n({
|
29
29
|
...r,
|
30
|
-
formula1:
|
30
|
+
formula1: d
|
31
31
|
});
|
32
32
|
}
|
33
33
|
}
|
@@ -39,10 +39,10 @@ const Fi = (e) => {
|
|
39
39
|
className: "univer-w-full",
|
40
40
|
placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
|
41
41
|
value: r == null ? void 0 : r.formula2,
|
42
|
-
onChange: (
|
42
|
+
onChange: (d) => {
|
43
43
|
n == null || n({
|
44
44
|
...r,
|
45
|
-
formula2:
|
45
|
+
formula2: d
|
46
46
|
});
|
47
47
|
}
|
48
48
|
}
|
@@ -53,21 +53,21 @@ const Fi = (e) => {
|
|
53
53
|
className: "univer-w-full",
|
54
54
|
placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
|
55
55
|
value: r == null ? void 0 : r.formula1,
|
56
|
-
onChange: (
|
57
|
-
n == null || n({ formula1:
|
56
|
+
onChange: (d) => {
|
57
|
+
n == null || n({ formula1: d });
|
58
58
|
}
|
59
59
|
}
|
60
60
|
) });
|
61
61
|
};
|
62
62
|
function xi(e) {
|
63
|
-
const { value: t, onChange: r, showError: n, validResult: i } = e, o = U(se), a = n ? i == null ? void 0 : i.formula1 : "", l = n ? i == null ? void 0 : i.formula2 : "", [s,
|
64
|
-
return /* @__PURE__ */ W(
|
63
|
+
const { value: t, onChange: r, showError: n, validResult: i } = e, o = U(se), a = n ? i == null ? void 0 : i.formula1 : "", l = n ? i == null ? void 0 : i.formula2 : "", [s, d] = B(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
|
64
|
+
return /* @__PURE__ */ W(dt, { children: [
|
65
65
|
/* @__PURE__ */ _(j, { children: /* @__PURE__ */ _(
|
66
66
|
Lt,
|
67
67
|
{
|
68
68
|
checked: s,
|
69
69
|
onChange: (u) => {
|
70
|
-
u ?
|
70
|
+
u ? d(!0) : (d(!1), r == null || r({
|
71
71
|
...t,
|
72
72
|
formula1: void 0,
|
73
73
|
formula2: void 0
|
@@ -108,22 +108,22 @@ function xi(e) {
|
|
108
108
|
}
|
109
109
|
function $i(e) {
|
110
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 = ht(null), [
|
112
|
-
return or((
|
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 = ht(null), [d, u] = B(!1);
|
112
|
+
return or((c) => {
|
113
113
|
var g;
|
114
|
-
((g = s.current) == null ? void 0 : g.isClickOutSide(
|
114
|
+
((g = s.current) == null ? void 0 : g.isClickOutSide(c)) && u(!1);
|
115
115
|
}), /* @__PURE__ */ _(j, { error: l, children: /* @__PURE__ */ _(
|
116
116
|
lr,
|
117
117
|
{
|
118
118
|
ref: s,
|
119
|
-
className:
|
119
|
+
className: Ae("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 [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent dark:!univer-bg-gray-700 dark:!univer-text-white hover:univer-border-primary-600", Mt),
|
120
120
|
initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
|
121
121
|
unitId: t,
|
122
122
|
subUnitId: r,
|
123
|
-
isFocus:
|
123
|
+
isFocus: d,
|
124
124
|
isSupportAcrossSheet: !0,
|
125
|
-
onChange: (
|
126
|
-
const m = (
|
125
|
+
onChange: (c) => {
|
126
|
+
const m = (c != null ? c : "").trim();
|
127
127
|
m !== (n == null ? void 0 : n.formula1) && (i == null || i({
|
128
128
|
...n,
|
129
129
|
formula1: m
|
@@ -141,23 +141,23 @@ var oe = function() {
|
|
141
141
|
}
|
142
142
|
return e;
|
143
143
|
}, oe.apply(this, arguments);
|
144
|
-
},
|
144
|
+
}, Hi = 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")
|
148
148
|
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
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
|
-
},
|
152
|
-
var r = e.icon, n = e.id, i = e.className, o = e.extend, a =
|
151
|
+
}, Fe = ke(function(e, t) {
|
152
|
+
var r = e.icon, n = e.id, i = e.className, o = e.extend, a = Hi(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), s = ht("_".concat(ji()));
|
153
153
|
return Sr(r, "".concat(n), { defIds: r.defIds, idSuffix: s.current }, oe({ ref: t, className: l }, a), o);
|
154
154
|
});
|
155
155
|
function Sr(e, t, r, n, i) {
|
156
|
-
return
|
156
|
+
return Ne(e.tag, oe(oe({ key: t }, Bi(e, r, i)), n), (Wi(e, r).children || []).map(function(o, a) {
|
157
157
|
return Sr(o, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, i);
|
158
158
|
}));
|
159
159
|
}
|
160
|
-
function
|
160
|
+
function Bi(e, t, r) {
|
161
161
|
var n = oe({}, 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];
|
@@ -178,56 +178,56 @@ function Wi(e, t) {
|
|
178
178
|
function ji() {
|
179
179
|
return Math.random().toString(36).substring(2, 8);
|
180
180
|
}
|
181
|
-
|
182
|
-
var Yi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cr =
|
183
|
-
return
|
181
|
+
Fe.displayName = "UniverIcon";
|
182
|
+
var Yi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cr = ke(function(e, t) {
|
183
|
+
return Ne(Fe, Object.assign({}, e, {
|
184
184
|
id: "data-validation-single",
|
185
185
|
ref: t,
|
186
186
|
icon: Yi
|
187
187
|
}));
|
188
188
|
});
|
189
189
|
Cr.displayName = "DataValidationSingle";
|
190
|
-
var Xi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cn =
|
191
|
-
return
|
190
|
+
var Xi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cn = ke(function(e, t) {
|
191
|
+
return Ne(Fe, Object.assign({}, e, {
|
192
192
|
id: "delete-single",
|
193
193
|
ref: t,
|
194
194
|
icon: Xi
|
195
195
|
}));
|
196
196
|
});
|
197
197
|
Cn.displayName = "DeleteSingle";
|
198
|
-
var zi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Ir =
|
199
|
-
return
|
198
|
+
var zi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Ir = ke(function(e, t) {
|
199
|
+
return Ne(Fe, Object.assign({}, e, {
|
200
200
|
id: "increase-single",
|
201
201
|
ref: t,
|
202
202
|
icon: zi
|
203
203
|
}));
|
204
204
|
});
|
205
205
|
Ir.displayName = "IncreaseSingle";
|
206
|
-
var Ki = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, In =
|
207
|
-
return
|
206
|
+
var Ki = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, In = ke(function(e, t) {
|
207
|
+
return Ne(Fe, Object.assign({}, e, {
|
208
208
|
id: "more-down-single",
|
209
209
|
ref: t,
|
210
210
|
icon: Ki
|
211
211
|
}));
|
212
212
|
});
|
213
213
|
In.displayName = "MoreDownSingle";
|
214
|
-
var Gi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wr =
|
215
|
-
return
|
214
|
+
var Gi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wr = ke(function(e, t) {
|
215
|
+
return Ne(Fe, Object.assign({}, e, {
|
216
216
|
id: "more-up-single",
|
217
217
|
ref: t,
|
218
218
|
icon: Gi
|
219
219
|
}));
|
220
220
|
});
|
221
221
|
wr.displayName = "MoreUpSingle";
|
222
|
-
var Zi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Rr =
|
223
|
-
return
|
222
|
+
var Zi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Rr = ke(function(e, t) {
|
223
|
+
return Ne(Fe, Object.assign({}, e, {
|
224
224
|
id: "sequence-single",
|
225
225
|
ref: t,
|
226
226
|
icon: Zi
|
227
227
|
}));
|
228
228
|
});
|
229
229
|
Rr.displayName = "SequenceSingle";
|
230
|
-
const
|
230
|
+
const We = "#ECECEC", qi = [
|
231
231
|
"#FFFFFF",
|
232
232
|
"#FEE7E7",
|
233
233
|
"#FEF0E6",
|
@@ -253,7 +253,7 @@ const He = "#ECECEC", qi = [
|
|
253
253
|
"#9E6DE3",
|
254
254
|
"#F248A6"
|
255
255
|
], Ji = (e) => {
|
256
|
-
const { value: t, onChange: r, disabled: n } = e, [i, o] =
|
256
|
+
const { value: t, onChange: r, disabled: n } = e, [i, o] = B(!1);
|
257
257
|
return /* @__PURE__ */ _(
|
258
258
|
oi,
|
259
259
|
{
|
@@ -269,7 +269,7 @@ const He = "#ECECEC", qi = [
|
|
269
269
|
(a) => /* @__PURE__ */ _(
|
270
270
|
"div",
|
271
271
|
{
|
272
|
-
className:
|
272
|
+
className: Ae("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", Mt),
|
273
273
|
style: { background: a },
|
274
274
|
onClick: () => {
|
275
275
|
r(a), o(!1);
|
@@ -283,7 +283,7 @@ const He = "#ECECEC", qi = [
|
|
283
283
|
children: /* @__PURE__ */ W(
|
284
284
|
"div",
|
285
285
|
{
|
286
|
-
className:
|
286
|
+
className: Ae("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 dark:!univer-bg-gray-700 dark:!univer-text-white hover:univer-border-primary-600", Mt),
|
287
287
|
children: [
|
288
288
|
/* @__PURE__ */ _(
|
289
289
|
"div",
|
@@ -299,9 +299,9 @@ const He = "#ECECEC", qi = [
|
|
299
299
|
}
|
300
300
|
);
|
301
301
|
}, Un = (e) => {
|
302
|
-
const { item: t, commonProps: r,
|
303
|
-
return /* @__PURE__ */ W("div", { className: "univer-flex univer-items-center univer-gap-2",
|
304
|
-
t.isRef
|
302
|
+
const { item: t, commonProps: r, className: n } = e, { onItemChange: i, onItemDelete: o } = r;
|
303
|
+
return /* @__PURE__ */ W("div", { className: Ae("univer-flex univer-items-center univer-gap-2", n), children: [
|
304
|
+
!t.isRef && /* @__PURE__ */ _("div", { className: Ae("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ _(Rr, {}) }),
|
305
305
|
/* @__PURE__ */ _(
|
306
306
|
Ji,
|
307
307
|
{
|
@@ -332,14 +332,14 @@ const He = "#ECECEC", qi = [
|
|
332
332
|
};
|
333
333
|
function Qi(e) {
|
334
334
|
const { value: t, onChange: r = () => {
|
335
|
-
}, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2:
|
335
|
+
}, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = B(() => De(s) ? "1" : "0"), [c, m] = B(u === "1" ? s : "="), [g, M] = B(u === "1" ? s : "="), y = U(se), p = U(ye), S = U(fn), v = U(Gr), [C, w] = B(() => d.split(",")), I = p.getValidatorItem(G.LIST), [R, T] = B([]), [N, D] = B(""), P = a ? o == null ? void 0 : o.formula1 : "", A = ct(() => S.ruleChange$.pipe(dr(16)), []), L = Te(A), V = Qt(r);
|
336
336
|
Pe(() => {
|
337
337
|
(async () => {
|
338
338
|
await new Promise((f) => {
|
339
339
|
setTimeout(() => f(!0), 100);
|
340
340
|
});
|
341
|
-
const O = S.getRuleById(n, i, l),
|
342
|
-
if (De(
|
341
|
+
const O = S.getRuleById(n, i, l), H = O == null ? void 0 : O.formula1;
|
342
|
+
if (De(H) && I && O) {
|
343
343
|
const f = await I.getListAsync(O, n, i);
|
344
344
|
T(f);
|
345
345
|
}
|
@@ -347,37 +347,37 @@ function Qi(e) {
|
|
347
347
|
}, [S, L, I, l, i, n]), Pe(() => {
|
348
348
|
De(s) && s !== g && (m(s), M(g));
|
349
349
|
}, [g, s]);
|
350
|
-
const [F, x] =
|
351
|
-
const O = u !== "1" ? Zr(s) : [],
|
350
|
+
const [F, x] = B(() => {
|
351
|
+
const O = u !== "1" ? Zr(s) : [], H = d.split(",");
|
352
352
|
return O.map((f, k) => ({
|
353
353
|
label: f,
|
354
|
-
color:
|
354
|
+
color: H[k] || We,
|
355
355
|
isRef: !1,
|
356
356
|
id: Zt.generateRandomId(4)
|
357
357
|
}));
|
358
|
-
}), X = (O,
|
358
|
+
}), X = (O, H, f) => {
|
359
359
|
const k = F.find(($) => $.id === O);
|
360
|
-
k && (k.label =
|
360
|
+
k && (k.label = H, k.color = f, x([...F]));
|
361
361
|
}, Z = (O) => {
|
362
|
-
const
|
363
|
-
|
364
|
-
}, z =
|
362
|
+
const H = F.findIndex((f) => f.id === O);
|
363
|
+
H !== -1 && (F.splice(H, 1), x([...F]));
|
364
|
+
}, z = d.split(","), te = ct(() => R.map((O, H) => ({
|
365
365
|
label: O,
|
366
|
-
color: z[
|
367
|
-
id: `${
|
366
|
+
color: z[H] || We,
|
367
|
+
id: `${H}`,
|
368
368
|
isRef: !0
|
369
|
-
})), [z, R]), pe = (O,
|
369
|
+
})), [z, R]), pe = (O, H, f) => {
|
370
370
|
const k = [...C];
|
371
371
|
k[+O] = f, w(k), V({
|
372
372
|
formula1: s,
|
373
373
|
formula2: k.join(",")
|
374
374
|
});
|
375
|
-
},
|
375
|
+
}, de = () => {
|
376
376
|
x([
|
377
377
|
...F,
|
378
378
|
{
|
379
379
|
label: "",
|
380
|
-
color:
|
380
|
+
color: We,
|
381
381
|
isRef: !1,
|
382
382
|
id: Zt.generateRandomId(4)
|
383
383
|
}
|
@@ -386,42 +386,42 @@ function Qi(e) {
|
|
386
386
|
Pe(() => {
|
387
387
|
if (u === "1")
|
388
388
|
return;
|
389
|
-
const O = /* @__PURE__ */ new Set(),
|
389
|
+
const O = /* @__PURE__ */ new Set(), H = [];
|
390
390
|
F.map((f) => ({
|
391
391
|
labelList: f.label.split(","),
|
392
392
|
item: f
|
393
393
|
})).forEach(({ item: f, labelList: k }) => {
|
394
394
|
k.forEach(($) => {
|
395
|
-
O.has($) || (O.add($),
|
395
|
+
O.has($) || (O.add($), H.push({
|
396
396
|
label: $,
|
397
397
|
color: f.color
|
398
398
|
}));
|
399
399
|
});
|
400
400
|
}), V({
|
401
|
-
formula1: qn(
|
402
|
-
formula2:
|
401
|
+
formula1: qn(H.map((f) => f.label)),
|
402
|
+
formula2: H.map((f) => f.color === We ? "" : f.color).join(",")
|
403
403
|
});
|
404
404
|
}, [F, V, u, g, C]);
|
405
405
|
const ne = Qt(async (O) => {
|
406
406
|
if (!De(O)) {
|
407
407
|
V == null || V({
|
408
408
|
formula1: "",
|
409
|
-
formula2:
|
409
|
+
formula2: d
|
410
410
|
});
|
411
411
|
return;
|
412
412
|
}
|
413
413
|
v.getFormulaRefCheck(O) ? (V == null || V({
|
414
414
|
formula1: De(O) ? O : "",
|
415
|
-
formula2:
|
415
|
+
formula2: d
|
416
416
|
}), D("")) : (V == null || V({
|
417
417
|
formula1: "",
|
418
|
-
formula2:
|
418
|
+
formula2: d
|
419
419
|
}), m("="), D(y.t("dataValidation.validFail.formulaError")));
|
420
|
-
}),
|
420
|
+
}), ce = ht(null), [Se, ve] = B(!1);
|
421
421
|
return or((O) => {
|
422
422
|
var f;
|
423
|
-
((f =
|
424
|
-
}), /* @__PURE__ */ W(
|
423
|
+
((f = ce.current) == null ? void 0 : f.isClickOutSide(O)) && ve(!1);
|
424
|
+
}), /* @__PURE__ */ W(dt, { children: [
|
425
425
|
/* @__PURE__ */ _(j, { label: y.t("dataValidation.list.options"), children: /* @__PURE__ */ W(
|
426
426
|
pn,
|
427
427
|
{
|
@@ -442,30 +442,30 @@ function Qi(e) {
|
|
442
442
|
/* @__PURE__ */ _(
|
443
443
|
lr,
|
444
444
|
{
|
445
|
-
ref:
|
446
|
-
className:
|
447
|
-
initValue:
|
445
|
+
ref: ce,
|
446
|
+
className: Ae("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 [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent dark:!univer-bg-gray-700 dark:!univer-text-white hover:univer-border-primary-600", Mt),
|
447
|
+
initValue: c,
|
448
448
|
unitId: n,
|
449
449
|
subUnitId: i,
|
450
450
|
isFocus: Se,
|
451
451
|
isSupportAcrossSheet: !0,
|
452
452
|
onFocus: () => ve(!0),
|
453
453
|
onChange: (O = "") => {
|
454
|
-
const
|
455
|
-
M(
|
454
|
+
const H = (O != null ? O : "").trim();
|
455
|
+
M(H), ne(H);
|
456
456
|
}
|
457
457
|
}
|
458
458
|
),
|
459
|
-
te.length > 0 && /* @__PURE__ */ _("div", {
|
459
|
+
te.length > 0 && /* @__PURE__ */ _("div", { className: "univer-mt-3", children: te.map((O) => /* @__PURE__ */ _(
|
460
460
|
Un,
|
461
461
|
{
|
462
|
+
className: "univer-mb-3",
|
462
463
|
item: O,
|
463
|
-
commonProps: { onItemChange: pe }
|
464
|
-
style: { marginBottom: 12 }
|
464
|
+
commonProps: { onItemChange: pe }
|
465
465
|
},
|
466
466
|
O.id
|
467
467
|
)) })
|
468
|
-
] }) : /* @__PURE__ */ _(j, { error: P, children: /* @__PURE__ */ W("div", {
|
468
|
+
] }) : /* @__PURE__ */ _(j, { error: P, children: /* @__PURE__ */ W("div", { className: "-univer-mt-3", children: [
|
469
469
|
/* @__PURE__ */ _(
|
470
470
|
ii,
|
471
471
|
{
|
@@ -491,8 +491,8 @@ function Qi(e) {
|
|
491
491
|
/* @__PURE__ */ W(
|
492
492
|
"a",
|
493
493
|
{
|
494
|
-
className: "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 univer-text-primary hover:univer-bg-primary-50",
|
495
|
-
onClick:
|
494
|
+
className: "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 univer-text-primary dark:hover:!univer-bg-gray-800 hover:univer-bg-primary-50",
|
495
|
+
onClick: de,
|
496
496
|
children: [
|
497
497
|
/* @__PURE__ */ _(Ir, { className: "univer-mr-1" }),
|
498
498
|
y.t("dataValidation.list.add")
|
@@ -596,7 +596,7 @@ var ao = Object.getOwnPropertyDescriptor, so = (e, t, r, n) => {
|
|
596
596
|
for (var i = n > 1 ? void 0 : n ? ao(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
|
+
}, $e = (e, t) => (r, n) => t(r, n, e);
|
600
600
|
let Ze = class extends Re {
|
601
601
|
constructor(e, t, r, n, i, o) {
|
602
602
|
super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = r, this._dialogService = n, this._localeService = i, this._sheetsDataValidationValidatorService = o, this._initEditorBridgeInterceptor();
|
@@ -606,20 +606,20 @@ let Ze = class extends Re {
|
|
606
606
|
Ri,
|
607
607
|
{
|
608
608
|
handler: async (e, t, r) => {
|
609
|
-
const n = await e, { row: i, col: o, unitId: a, subUnitId: l } = t, s = this._dataValidationModel.getRuleIdByLocation(a, l, i, o),
|
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;
|
610
610
|
if (n === !1)
|
611
611
|
return r(Promise.resolve(!1));
|
612
|
-
if (!
|
612
|
+
if (!d || d.errorStyle !== lt.STOP)
|
613
613
|
return r(Promise.resolve(!0));
|
614
|
-
const u = this._dataValidatorRegistryService.getValidatorItem(
|
615
|
-
return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, i, o) ===
|
614
|
+
const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
|
615
|
+
return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, i, o) === Ye.VALID ? r(Promise.resolve(!0)) : (this._dialogService.open({
|
616
616
|
width: 368,
|
617
617
|
title: {
|
618
618
|
title: this._localeService.t("dataValidation.alert.title")
|
619
619
|
},
|
620
620
|
id: "reject-input-dialog",
|
621
621
|
children: {
|
622
|
-
title: u.getRuleFinalError(
|
622
|
+
title: u.getRuleFinalError(d, { row: i, col: o, unitId: a, subUnitId: l })
|
623
623
|
},
|
624
624
|
footer: {
|
625
625
|
title: On.createElement(
|
@@ -666,12 +666,12 @@ let Ze = class extends Re {
|
|
666
666
|
}
|
667
667
|
};
|
668
668
|
Ze = so([
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
669
|
+
$e(0, b(Sn)),
|
670
|
+
$e(1, b(ee)),
|
671
|
+
$e(2, b(ye)),
|
672
|
+
$e(3, ai),
|
673
|
+
$e(4, b(se)),
|
674
|
+
$e(5, b(qr))
|
675
675
|
], Ze);
|
676
676
|
var lo = Object.getOwnPropertyDescriptor, co = (e, t, r, n) => {
|
677
677
|
for (var i = n > 1 ? void 0 : n ? lo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
@@ -700,15 +700,15 @@ function uo(e, t) {
|
|
700
700
|
return "HH:mm:ss";
|
701
701
|
}
|
702
702
|
}
|
703
|
-
let
|
704
|
-
constructor(t, r, n, i, o, a, l, s,
|
703
|
+
let Le = class extends Re {
|
704
|
+
constructor(t, r, n, i, o, a, l, s, d, u, h) {
|
705
705
|
super();
|
706
706
|
E(this, "_activeDropdown");
|
707
707
|
E(this, "_activeDropdown$", new pi());
|
708
708
|
E(this, "_currentPopup", null);
|
709
709
|
E(this, "activeDropdown$", this._activeDropdown$.asObservable());
|
710
710
|
E(this, "_zenVisible", !1);
|
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 =
|
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
|
});
|
714
714
|
}
|
@@ -745,19 +745,19 @@ let Ae = class extends Re {
|
|
745
745
|
if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
|
746
746
|
return;
|
747
747
|
this._activeDropdown = t, this._activeDropdown$.next(this._activeDropdown);
|
748
|
-
const
|
749
|
-
if (!
|
748
|
+
const d = this._sheetDataValidationModel.getRuleByLocation(o, a, n, i);
|
749
|
+
if (!d)
|
750
750
|
return;
|
751
|
-
const u = this._dataValidatorRegistryService.getValidatorItem(
|
751
|
+
const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
|
752
752
|
if (!(u != null && u.dropdownType))
|
753
753
|
return;
|
754
754
|
let h;
|
755
|
-
const
|
755
|
+
const c = async (v, C) => {
|
756
756
|
var A, L, V;
|
757
757
|
if (!v)
|
758
758
|
return !0;
|
759
759
|
const w = v, I = s.getCell(n, i), R = w.format(C === "date" ? "YYYY-MM-DD 00:00:00" : "YYYY-MM-DD HH:mm:ss"), T = (A = Yn.parseDate(R)) == null ? void 0 : A.v, N = C === "time" ? T % 1 : T, D = l.getStyles().getStyleByCell(I), P = (V = (L = D == null ? void 0 : D.n) == null ? void 0 : L.pattern) != null ? V : "";
|
760
|
-
return
|
760
|
+
return d.errorStyle !== lt.STOP || await u.validator({
|
761
761
|
value: N,
|
762
762
|
unitId: o,
|
763
763
|
subUnitId: a,
|
@@ -767,7 +767,7 @@ let Ae = class extends Re {
|
|
767
767
|
workbook: l,
|
768
768
|
interceptValue: R.replace("Z", "").replace("T", " "),
|
769
769
|
t: Fr.NUMBER
|
770
|
-
},
|
770
|
+
}, d) ? (await this._commandService.executeCommand(vt.id, {
|
771
771
|
visible: !1,
|
772
772
|
eventType: pt.Keyboard,
|
773
773
|
unitId: o,
|
@@ -793,18 +793,18 @@ let Ae = class extends Re {
|
|
793
793
|
}
|
794
794
|
}
|
795
795
|
}
|
796
|
-
}), !0) : (this._injector.has(Ze) && this._injector.get(Ze).showReject(u.getRuleFinalError(
|
796
|
+
}), !0) : (this._injector.has(Ze) && this._injector.get(Ze).showReject(u.getRuleFinalError(d, { row: n, col: i, unitId: o, subUnitId: a })), !1);
|
797
797
|
};
|
798
798
|
let m;
|
799
799
|
switch (u.dropdownType) {
|
800
800
|
case ge.DATE: {
|
801
|
-
const v = Q(s.getCellRaw(n, i)), C = $t(v), w = !!((M =
|
801
|
+
const v = Q(s.getCellRaw(n, i)), C = $t(v), w = !!((M = d.bizInfo) != null && M.showTime);
|
802
802
|
m = {
|
803
803
|
location: r,
|
804
804
|
type: "datepicker",
|
805
805
|
props: {
|
806
806
|
showTime: w,
|
807
|
-
onChange: (I) =>
|
807
|
+
onChange: (I) => c(I, w ? "datetime" : "date"),
|
808
808
|
defaultValue: C,
|
809
809
|
patternType: "date"
|
810
810
|
}
|
@@ -817,7 +817,7 @@ let Ae = class extends Re {
|
|
817
817
|
location: r,
|
818
818
|
type: "datepicker",
|
819
819
|
props: {
|
820
|
-
onChange: (w) =>
|
820
|
+
onChange: (w) => c(w, "time"),
|
821
821
|
defaultValue: C,
|
822
822
|
patternType: "time"
|
823
823
|
}
|
@@ -830,7 +830,7 @@ let Ae = class extends Re {
|
|
830
830
|
location: r,
|
831
831
|
type: "datepicker",
|
832
832
|
props: {
|
833
|
-
onChange: (w) =>
|
833
|
+
onChange: (w) => c(w, "datetime"),
|
834
834
|
defaultValue: C,
|
835
835
|
patternType: "datetime"
|
836
836
|
}
|
@@ -862,9 +862,9 @@ let Ae = class extends Re {
|
|
862
862
|
unitId: o,
|
863
863
|
keycode: gt.ESC
|
864
864
|
}), this._commandService.executeCommand(st.id, A), !v;
|
865
|
-
}, w = (
|
866
|
-
this._commandService.executeCommand(
|
867
|
-
ruleId:
|
865
|
+
}, w = (d == null ? void 0 : d.renderMode) === ie.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, I = u.getListWithColor(d, o, a), R = Ut(s.getCellRaw(n, i)), T = () => {
|
866
|
+
this._commandService.executeCommand(xe.id, {
|
867
|
+
ruleId: d.uid
|
868
868
|
}), h == null || h.dispose();
|
869
869
|
}, N = I.map((D) => ({
|
870
870
|
label: D.label,
|
@@ -914,7 +914,7 @@ let Ae = class extends Re {
|
|
914
914
|
}), this._commandService.syncExecuteCommand(st.id, w), !0;
|
915
915
|
},
|
916
916
|
defaultValue: Ut(s.getCellRaw(n, i)).split("/"),
|
917
|
-
options: JSON.parse((S =
|
917
|
+
options: JSON.parse((S = d.formula1) != null ? S : "[]")
|
918
918
|
},
|
919
919
|
location: r
|
920
920
|
};
|
@@ -980,8 +980,8 @@ let Ae = class extends Re {
|
|
980
980
|
const s = this._dataValidationModel.getRuleByLocation(a.getUnitId(), l.getSheetId(), n, i);
|
981
981
|
if (!s)
|
982
982
|
return;
|
983
|
-
const
|
984
|
-
if (!
|
983
|
+
const d = this._dataValidatorRegistryService.getValidatorItem(s.type);
|
984
|
+
if (!d || !d.dropdownType) {
|
985
985
|
this.hideDropdown();
|
986
986
|
return;
|
987
987
|
}
|
@@ -998,7 +998,7 @@ let Ae = class extends Re {
|
|
998
998
|
});
|
999
999
|
}
|
1000
1000
|
};
|
1001
|
-
|
1001
|
+
Le = co([
|
1002
1002
|
ue(0, le),
|
1003
1003
|
ue(1, b(ye)),
|
1004
1004
|
ue(2, sr),
|
@@ -1009,9 +1009,9 @@ Ae = co([
|
|
1009
1009
|
ue(7, J),
|
1010
1010
|
ue(8, mr),
|
1011
1011
|
ue(9, b(we)),
|
1012
|
-
ue(10,
|
1013
|
-
],
|
1014
|
-
const Dt = "DataValidationPanel",
|
1012
|
+
ue(10, cn)
|
1013
|
+
], Le);
|
1014
|
+
const Dt = "DataValidationPanel", xe = {
|
1015
1015
|
id: "data-validation.operation.open-validation-panel",
|
1016
1016
|
type: nt.OPERATION,
|
1017
1017
|
handler(e, t) {
|
@@ -1019,20 +1019,20 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1019
1019
|
return !1;
|
1020
1020
|
const { ruleId: r, isAdd: n } = t, i = e.get(_e), o = e.get(fn), a = e.get(le), l = e.get(ar), s = gr(a);
|
1021
1021
|
if (!s) return !1;
|
1022
|
-
const { unitId:
|
1022
|
+
const { unitId: d, subUnitId: u } = s, h = r ? o.getRuleById(d, u, r) : void 0;
|
1023
1023
|
i.open(), i.setActiveRule(h && {
|
1024
|
-
unitId:
|
1024
|
+
unitId: d,
|
1025
1025
|
subUnitId: u,
|
1026
1026
|
rule: h
|
1027
1027
|
});
|
1028
|
-
const
|
1028
|
+
const c = l.open({
|
1029
1029
|
id: Dt,
|
1030
1030
|
header: { title: n ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
|
1031
1031
|
children: { label: Dt },
|
1032
1032
|
width: 312,
|
1033
1033
|
onClose: () => i.close()
|
1034
1034
|
});
|
1035
|
-
return i.setCloseDisposable(
|
1035
|
+
return i.setCloseDisposable(c), !0;
|
1036
1036
|
}
|
1037
1037
|
}, Rn = {
|
1038
1038
|
id: "data-validation.operation.close-validation-panel",
|
@@ -1045,7 +1045,7 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1045
1045
|
type: nt.OPERATION,
|
1046
1046
|
handler(e) {
|
1047
1047
|
const t = e.get(J), r = e.get(_e);
|
1048
|
-
return r.open(), r.isOpen ? t.executeCommand(Rn.id) : t.executeCommand(
|
1048
|
+
return r.open(), r.isOpen ? t.executeCommand(Rn.id) : t.executeCommand(xe.id), !0;
|
1049
1049
|
}
|
1050
1050
|
}, kt = {
|
1051
1051
|
type: nt.OPERATION,
|
@@ -1053,7 +1053,7 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1053
1053
|
handler(e, t) {
|
1054
1054
|
if (!t)
|
1055
1055
|
return !1;
|
1056
|
-
const r = e.get(
|
1056
|
+
const r = e.get(Le), { unitId: n, subUnitId: i, row: o, column: a } = t, l = r.activeDropdown, s = l == null ? void 0 : l.location;
|
1057
1057
|
return s && s.unitId === n && s.subUnitId === i && s.row === o && s.col === a || r.showDataValidationDropdown(
|
1058
1058
|
n,
|
1059
1059
|
i,
|
@@ -1065,7 +1065,7 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1065
1065
|
type: nt.OPERATION,
|
1066
1066
|
id: "sheet.operation.hide-data-validation-dropdown",
|
1067
1067
|
handler(e, t) {
|
1068
|
-
return t ? (e.get(
|
1068
|
+
return t ? (e.get(Le).hideDropdown(), !0) : !1;
|
1069
1069
|
}
|
1070
1070
|
}, Nt = {
|
1071
1071
|
type: nt.COMMAND,
|
@@ -1073,12 +1073,12 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1073
1073
|
handler(e) {
|
1074
1074
|
const t = e.get(le), r = gr(t);
|
1075
1075
|
if (!r) return !1;
|
1076
|
-
const { workbook: n, worksheet: i } = r, o = er(e), a = e.get(J), l = n.getUnitId(), s = i.getSheetId(),
|
1076
|
+
const { workbook: n, worksheet: i } = r, o = er(e), a = e.get(J), l = n.getUnitId(), s = i.getSheetId(), d = {
|
1077
1077
|
rule: o,
|
1078
1078
|
unitId: l,
|
1079
1079
|
subUnitId: s
|
1080
1080
|
};
|
1081
|
-
return a.syncExecuteCommand(gn.id,
|
1081
|
+
return a.syncExecuteCommand(gn.id, d) ? (a.syncExecuteCommand(xe.id, {
|
1082
1082
|
ruleId: o.uid,
|
1083
1083
|
isAdd: !0
|
1084
1084
|
}), !0) : !1;
|
@@ -1088,7 +1088,7 @@ var ho = Object.getOwnPropertyDescriptor, go = (e, t, r, n) => {
|
|
1088
1088
|
for (var i = n > 1 ? void 0 : n ? ho(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
1089
1089
|
(a = e[o]) && (i = a(i) || i);
|
1090
1090
|
return i;
|
1091
|
-
},
|
1091
|
+
}, He = (e, t) => (r, n) => t(r, n, e);
|
1092
1092
|
const Me = "SHEET_DATA_VALIDATION_ALERT";
|
1093
1093
|
let ut = class extends Re {
|
1094
1094
|
constructor(e, t, r, n, i, o) {
|
@@ -1098,7 +1098,7 @@ let ut = class extends Re {
|
|
1098
1098
|
this._initCellAlertPopup(), this._initZenService();
|
1099
1099
|
}
|
1100
1100
|
_initCellAlertPopup() {
|
1101
|
-
this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(
|
1101
|
+
this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(dr(100)).subscribe((e) => {
|
1102
1102
|
var t;
|
1103
1103
|
if (e) {
|
1104
1104
|
const r = this._univerInstanceService.getUnit(e.location.unitId, Y.UNIVER_SHEET), n = r.getSheetBySheetId(e.location.subUnitId);
|
@@ -1108,7 +1108,7 @@ let ut = class extends Re {
|
|
1108
1108
|
this._cellAlertManagerService.removeAlert(Me);
|
1109
1109
|
return;
|
1110
1110
|
}
|
1111
|
-
if (this._dataValidationModel.validator(i, { ...e.location, workbook: r, worksheet: n }) ===
|
1111
|
+
if (this._dataValidationModel.validator(i, { ...e.location, workbook: r, worksheet: n }) === Ye.INVALID) {
|
1112
1112
|
const a = this._cellAlertManagerService.currentAlert.get(Me), l = (t = a == null ? void 0 : a.alert) == null ? void 0 : t.location;
|
1113
1113
|
if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId) {
|
1114
1114
|
this._cellAlertManagerService.removeAlert(Me);
|
@@ -1141,18 +1141,18 @@ let ut = class extends Re {
|
|
1141
1141
|
}
|
1142
1142
|
};
|
1143
1143
|
ut = go([
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1144
|
+
He(0, b(Vi)),
|
1145
|
+
He(1, b(Oi)),
|
1146
|
+
He(2, le),
|
1147
|
+
He(3, b(se)),
|
1148
|
+
He(4, sr),
|
1149
|
+
He(5, b(ee))
|
1150
1150
|
], ut);
|
1151
1151
|
var po = Object.getOwnPropertyDescriptor, vo = (e, t, r, n) => {
|
1152
1152
|
for (var i = n > 1 ? void 0 : n ? po(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
1153
1153
|
(a = e[o]) && (i = a(i) || i);
|
1154
1154
|
return i;
|
1155
|
-
},
|
1155
|
+
}, Ht = (e, t) => (r, n) => t(r, n, e);
|
1156
1156
|
let qe = class extends Re {
|
1157
1157
|
constructor(e, t, r) {
|
1158
1158
|
super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = r, this._initAutoFill();
|
@@ -1160,10 +1160,10 @@ let qe = class extends Re {
|
|
1160
1160
|
// eslint-disable-next-line max-lines-per-function
|
1161
1161
|
_initAutoFill() {
|
1162
1162
|
const e = () => ({ redos: [], undos: [] }), t = (n, i) => {
|
1163
|
-
const { source: o, target: a, unitId: l, subUnitId: s } = n,
|
1163
|
+
const { source: o, target: a, unitId: l, subUnitId: s } = n, d = this._sheetDataValidationModel.getRuleObjectMatrix(l, s).clone(), u = on([o, a]), [h, c] = u.ranges, { mapFunc: m } = u, g = {
|
1164
1164
|
row: h.startRow,
|
1165
1165
|
col: h.startColumn
|
1166
|
-
}, M = Ai(h,
|
1166
|
+
}, M = Ai(h, c), y = new Rt(), p = /* @__PURE__ */ new Set();
|
1167
1167
|
M.forEach((I) => {
|
1168
1168
|
const R = I.repeatStartCell, T = I.relativeRange, N = {
|
1169
1169
|
startRow: g.row,
|
@@ -1198,8 +1198,8 @@ let qe = class extends Re {
|
|
1198
1198
|
});
|
1199
1199
|
});
|
1200
1200
|
const S = Array.from(p).map((I) => ({ id: I, ranges: qt(y, (R) => R === I) }));
|
1201
|
-
|
1202
|
-
const v =
|
1201
|
+
d.addRangeRules(S);
|
1202
|
+
const v = d.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: C, undoMutations: w } = Jt(l, s, v, this._injector, "patched", i === ot.ONLY_FORMAT);
|
1203
1203
|
return {
|
1204
1204
|
undos: w,
|
1205
1205
|
redos: C
|
@@ -1210,8 +1210,8 @@ let qe = class extends Re {
|
|
1210
1210
|
const { source: i, unitId: o, subUnitId: a } = n;
|
1211
1211
|
for (const l of i.rows)
|
1212
1212
|
for (const s of i.cols) {
|
1213
|
-
const
|
1214
|
-
if (
|
1213
|
+
const d = this._sheetDataValidationModel.getRuleByLocation(o, a, l, s);
|
1214
|
+
if (d && d.type === G.CHECKBOX) {
|
1215
1215
|
this._autoFillService.setDisableApplyType(ot.SERIES, !0);
|
1216
1216
|
return;
|
1217
1217
|
}
|
@@ -1225,15 +1225,15 @@ let qe = class extends Re {
|
|
1225
1225
|
}
|
1226
1226
|
};
|
1227
1227
|
qe = vo([
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1228
|
+
Ht(0, Pi),
|
1229
|
+
Ht(1, b(ee)),
|
1230
|
+
Ht(2, b(we))
|
1231
1231
|
], qe);
|
1232
1232
|
var mo = Object.getOwnPropertyDescriptor, fo = (e, t, r, n) => {
|
1233
1233
|
for (var i = n > 1 ? void 0 : n ? mo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
1234
1234
|
(a = e[o]) && (i = a(i) || i);
|
1235
1235
|
return i;
|
1236
|
-
},
|
1236
|
+
}, Bt = (e, t) => (r, n) => t(r, n, e);
|
1237
1237
|
let Je = class extends Re {
|
1238
1238
|
constructor(t, r, n) {
|
1239
1239
|
super();
|
@@ -1245,8 +1245,8 @@ let Je = class extends Re {
|
|
1245
1245
|
id: tr,
|
1246
1246
|
onBeforeCopy: (t, r, n) => this._collect(t, r, n),
|
1247
1247
|
onPasteCells: (t, r, n, i) => {
|
1248
|
-
const { copyType: o = kn.COPY, pasteType: a } = i, { range: l } = t || {}, { range: s, unitId:
|
1249
|
-
return this._generateMutations(s, { copyType: o, pasteType: a, copyRange: l, unitId:
|
1248
|
+
const { copyType: o = kn.COPY, pasteType: a } = i, { range: l } = t || {}, { range: s, unitId: d, subUnitId: u } = r;
|
1249
|
+
return this._generateMutations(s, { copyType: o, pasteType: a, copyRange: l, unitId: d, subUnitId: u });
|
1250
1250
|
}
|
1251
1251
|
});
|
1252
1252
|
}
|
@@ -1261,10 +1261,10 @@ let Je = class extends Re {
|
|
1261
1261
|
if (!o)
|
1262
1262
|
return;
|
1263
1263
|
const { rows: a, cols: l } = o;
|
1264
|
-
a.forEach((s,
|
1264
|
+
a.forEach((s, d) => {
|
1265
1265
|
l.forEach((u, h) => {
|
1266
|
-
const
|
1267
|
-
i.setValue(
|
1266
|
+
const c = this._sheetDataValidationModel.getRuleIdByLocation(t, r, s, u);
|
1267
|
+
i.setValue(d, h, c != null ? c : "");
|
1268
1268
|
});
|
1269
1269
|
});
|
1270
1270
|
}
|
@@ -1285,8 +1285,8 @@ let Je = class extends Re {
|
|
1285
1285
|
return { redos: [], undos: [] };
|
1286
1286
|
const { unitId: i, subUnitId: o } = this._copyInfo;
|
1287
1287
|
if (r.unitId !== i || o !== r.subUnitId) {
|
1288
|
-
const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new Rt(), s = /* @__PURE__ */ new Set(), { ranges: [
|
1289
|
-
|
1288
|
+
const a = this._sheetDataValidationModel.getRuleObjectMatrix(r.unitId, r.subUnitId).clone(), l = new Rt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = on([r.copyRange, t]), c = Nn(d, u, !0), m = /* @__PURE__ */ new Map();
|
1289
|
+
c.forEach(({ startRange: p }) => {
|
1290
1290
|
var S;
|
1291
1291
|
(S = this._copyInfo) == null || S.matrix.forValue((v, C, w) => {
|
1292
1292
|
const I = yt.getPositionRange(
|
@@ -1318,8 +1318,8 @@ let Je = class extends Re {
|
|
1318
1318
|
undos: y
|
1319
1319
|
};
|
1320
1320
|
} else {
|
1321
|
-
const a = this._sheetDataValidationModel.getRuleObjectMatrix(i, o).clone(), l = new Rt(), s = /* @__PURE__ */ new Set(), { ranges: [
|
1322
|
-
Nn(
|
1321
|
+
const a = this._sheetDataValidationModel.getRuleObjectMatrix(i, o).clone(), l = new Rt(), s = /* @__PURE__ */ new Set(), { ranges: [d, u], mapFunc: h } = on([r.copyRange, t]);
|
1322
|
+
Nn(d, u, !0).forEach(({ startRange: y }) => {
|
1323
1323
|
var p;
|
1324
1324
|
(p = this._copyInfo) == null || p.matrix.forValue((S, v, C) => {
|
1325
1325
|
const w = yt.getPositionRange(
|
@@ -1352,9 +1352,9 @@ let Je = class extends Re {
|
|
1352
1352
|
}
|
1353
1353
|
};
|
1354
1354
|
Je = fo([
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1355
|
+
Bt(0, Li),
|
1356
|
+
Bt(1, b(ee)),
|
1357
|
+
Bt(2, b(we))
|
1358
1358
|
], Je);
|
1359
1359
|
var _o = Object.getOwnPropertyDescriptor, So = (e, t, r, n) => {
|
1360
1360
|
for (var i = n > 1 ? void 0 : n ? _o(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
@@ -1399,7 +1399,7 @@ function Co(e) {
|
|
1399
1399
|
}
|
1400
1400
|
function Io(e) {
|
1401
1401
|
return {
|
1402
|
-
id:
|
1402
|
+
id: xe.id,
|
1403
1403
|
title: "dataValidation.panel.title",
|
1404
1404
|
type: vn.BUTTON
|
1405
1405
|
};
|
@@ -1412,11 +1412,11 @@ function wo(e) {
|
|
1412
1412
|
};
|
1413
1413
|
}
|
1414
1414
|
const Ro = {
|
1415
|
-
[li.
|
1415
|
+
[li.RULES]: {
|
1416
1416
|
[Er]: {
|
1417
|
-
order:
|
1417
|
+
order: 0,
|
1418
1418
|
menuItemFactory: Co,
|
1419
|
-
[
|
1419
|
+
[xe.id]: {
|
1420
1420
|
order: 0,
|
1421
1421
|
menuItemFactory: Io
|
1422
1422
|
},
|
@@ -1439,8 +1439,8 @@ const Vr = {
|
|
1439
1439
|
}
|
1440
1440
|
};
|
1441
1441
|
let et = class extends un {
|
1442
|
-
constructor(e, t, r, n, i, o, a, l, s,
|
1443
|
-
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 =
|
1442
|
+
constructor(e, t, r, n, i, o, a, l, s, d, u) {
|
1443
|
+
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();
|
1444
1444
|
}
|
1445
1445
|
_initMenu() {
|
1446
1446
|
this._menuManagerService.mergeMenu(Ro);
|
@@ -1460,13 +1460,13 @@ let et = class extends un {
|
|
1460
1460
|
const s = this._sheetDataValidationModel.getRuleByLocation(n, i, o, a);
|
1461
1461
|
if (!s)
|
1462
1462
|
return;
|
1463
|
-
const
|
1464
|
-
if (!(
|
1463
|
+
const d = this._dataValidatorRegistryService.getValidatorItem(s.type);
|
1464
|
+
if (!(d != null && d.dropdownType))
|
1465
1465
|
return;
|
1466
1466
|
const u = l.getActiveSheet();
|
1467
1467
|
if (!u) return;
|
1468
|
-
const h = this._dropdownManagerService.activeDropdown,
|
1469
|
-
if (
|
1468
|
+
const h = this._dropdownManagerService.activeDropdown, c = h == null ? void 0 : h.location;
|
1469
|
+
if (c && c.unitId === n && c.subUnitId === i && c.row === o && c.col === a)
|
1470
1470
|
return;
|
1471
1471
|
this._dropdownManagerService.showDropdown(
|
1472
1472
|
{
|
@@ -1497,13 +1497,13 @@ let et = class extends un {
|
|
1497
1497
|
// eslint-disable-next-line max-lines-per-function, complexity
|
1498
1498
|
handler: (e, t, r) => {
|
1499
1499
|
var p, S, v, C, w;
|
1500
|
-
const { row: n, col: i, unitId: o, subUnitId: a, workbook: l, worksheet: s } = t,
|
1501
|
-
if (!
|
1500
|
+
const { row: n, col: i, unitId: o, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(o, a, n, i);
|
1501
|
+
if (!d)
|
1502
1502
|
return r(e);
|
1503
|
-
const u = this._sheetDataValidationModel.getRuleById(o, a,
|
1503
|
+
const u = this._sheetDataValidationModel.getRuleById(o, a, d);
|
1504
1504
|
if (!u)
|
1505
1505
|
return r(e);
|
1506
|
-
const h = (p = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? p :
|
1506
|
+
const h = (p = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? p : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
|
1507
1507
|
let g;
|
1508
1508
|
const M = {
|
1509
1509
|
get value() {
|
@@ -1520,19 +1520,19 @@ let et = class extends un {
|
|
1520
1520
|
...e,
|
1521
1521
|
markers: {
|
1522
1522
|
...e == null ? void 0 : e.markers,
|
1523
|
-
...h ===
|
1523
|
+
...h === Ye.INVALID ? Vr : null
|
1524
1524
|
},
|
1525
1525
|
customRender: [
|
1526
1526
|
...(S = e == null ? void 0 : e.customRender) != null ? S : [],
|
1527
|
-
...
|
1527
|
+
...c != null && c.canvasRender ? [c.canvasRender] : []
|
1528
1528
|
],
|
1529
1529
|
fontRenderExtension: {
|
1530
1530
|
...e == null ? void 0 : e.fontRenderExtension,
|
1531
|
-
isSkip: ((v = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : v.isSkip) || ((C =
|
1531
|
+
isSkip: ((v = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : v.isSkip) || ((C = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : C.call(c, u, M.value, t))
|
1532
1532
|
},
|
1533
1533
|
interceptorStyle: {
|
1534
1534
|
...e == null ? void 0 : e.interceptorStyle,
|
1535
|
-
...
|
1535
|
+
...c == null ? void 0 : c.getExtraStyle(u, y.value, {
|
1536
1536
|
get style() {
|
1537
1537
|
const I = l.getStyles();
|
1538
1538
|
return (typeof (e == null ? void 0 : e.s) == "string" ? I.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
|
@@ -1555,7 +1555,7 @@ let et = class extends un {
|
|
1555
1555
|
workbook: l,
|
1556
1556
|
worksheet: s
|
1557
1557
|
};
|
1558
|
-
return (V = (L =
|
1558
|
+
return (V = (L = c == null ? void 0 : c.canvasRender) == null ? void 0 : L.calcCellAutoHeight) == null ? void 0 : V.call(L, T);
|
1559
1559
|
},
|
1560
1560
|
interceptorAutoWidth: () => {
|
1561
1561
|
var N, D, P, A, L, V;
|
@@ -1573,7 +1573,7 @@ let et = class extends un {
|
|
1573
1573
|
workbook: l,
|
1574
1574
|
worksheet: s
|
1575
1575
|
};
|
1576
|
-
return (V = (L =
|
1576
|
+
return (V = (L = c == null ? void 0 : c.canvasRender) == null ? void 0 : L.calcCellAutoWidth) == null ? void 0 : V.call(L, T);
|
1577
1577
|
},
|
1578
1578
|
coverable: ((w = e == null ? void 0 : e.coverable) != null ? w : !0) && !(u.type === G.LIST || u.type === G.LIST_MULTIPLE)
|
1579
1579
|
});
|
@@ -1587,7 +1587,7 @@ let et = class extends un {
|
|
1587
1587
|
// patched data-validation change don't need to re-calc row height
|
1588
1588
|
// re-calc of row height will be triggered precisely by the origin command
|
1589
1589
|
_n((e) => e.source === "command"),
|
1590
|
-
|
1590
|
+
cr(100)
|
1591
1591
|
).subscribe((e) => {
|
1592
1592
|
if (e.length === 0)
|
1593
1593
|
return;
|
@@ -1604,11 +1604,11 @@ let et = class extends un {
|
|
1604
1604
|
};
|
1605
1605
|
et = Dr([
|
1606
1606
|
K(0, J),
|
1607
|
-
K(1,
|
1608
|
-
K(2,
|
1607
|
+
K(1, di),
|
1608
|
+
K(2, Ue),
|
1609
1609
|
K(3, le),
|
1610
1610
|
K(4, b(fr)),
|
1611
|
-
K(5, b(
|
1611
|
+
K(5, b(Le)),
|
1612
1612
|
K(6, b(ee)),
|
1613
1613
|
K(7, b(ye)),
|
1614
1614
|
K(8, b(Sn)),
|
@@ -1630,30 +1630,30 @@ let xn = class extends un {
|
|
1630
1630
|
// eslint-disable-next-line complexity
|
1631
1631
|
handler: (e, t, r) => {
|
1632
1632
|
var y, p, S, v, C;
|
1633
|
-
const { row: n, col: i, unitId: o, subUnitId: a, workbook: l, worksheet: s } = t,
|
1634
|
-
if (!
|
1633
|
+
const { row: n, col: i, unitId: o, subUnitId: a, workbook: l, worksheet: s } = t, d = this._sheetDataValidationModel.getRuleIdByLocation(o, a, n, i);
|
1634
|
+
if (!d)
|
1635
1635
|
return r(e);
|
1636
|
-
const u = this._sheetDataValidationModel.getRuleById(o, a,
|
1636
|
+
const u = this._sheetDataValidationModel.getRuleById(o, a, d);
|
1637
1637
|
if (!u)
|
1638
1638
|
return r(e);
|
1639
|
-
const h = (y = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? y :
|
1639
|
+
const h = (y = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? y : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = s.getCellRaw(n, i), g = Q(m), M = `${g != null ? g : ""}`;
|
1640
1640
|
return r({
|
1641
1641
|
...e,
|
1642
1642
|
markers: {
|
1643
1643
|
...e == null ? void 0 : e.markers,
|
1644
|
-
...h ===
|
1644
|
+
...h === Ye.INVALID ? Vr : null
|
1645
1645
|
},
|
1646
1646
|
customRender: [
|
1647
1647
|
...(p = e == null ? void 0 : e.customRender) != null ? p : [],
|
1648
|
-
...
|
1648
|
+
...c != null && c.canvasRender ? [c.canvasRender] : []
|
1649
1649
|
],
|
1650
1650
|
fontRenderExtension: {
|
1651
1651
|
...e == null ? void 0 : e.fontRenderExtension,
|
1652
|
-
isSkip: ((S = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : S.isSkip) || ((v =
|
1652
|
+
isSkip: ((S = e == null ? void 0 : e.fontRenderExtension) == null ? void 0 : S.isSkip) || ((v = c == null ? void 0 : c.skipDefaultFontRender) == null ? void 0 : v.call(c, u, g, t))
|
1653
1653
|
},
|
1654
1654
|
interceptorStyle: {
|
1655
1655
|
...e == null ? void 0 : e.interceptorStyle,
|
1656
|
-
...
|
1656
|
+
...c == null ? void 0 : c.getExtraStyle(u, M, {
|
1657
1657
|
get style() {
|
1658
1658
|
const w = l.getStyles();
|
1659
1659
|
return (typeof (e == null ? void 0 : e.s) == "string" ? w.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {};
|
@@ -1676,7 +1676,7 @@ let xn = class extends un {
|
|
1676
1676
|
workbook: l,
|
1677
1677
|
worksheet: s
|
1678
1678
|
};
|
1679
|
-
return (L = (A =
|
1679
|
+
return (L = (A = c == null ? void 0 : c.canvasRender) == null ? void 0 : A.calcCellAutoHeight) == null ? void 0 : L.call(A, R);
|
1680
1680
|
},
|
1681
1681
|
coverable: ((C = e == null ? void 0 : e.coverable) != null ? C : !0) && !(u.type === G.LIST || u.type === G.LIST_MULTIPLE)
|
1682
1682
|
});
|
@@ -1688,7 +1688,7 @@ let xn = class extends un {
|
|
1688
1688
|
_initAutoHeight() {
|
1689
1689
|
this._sheetDataValidationModel.ruleChange$.pipe(
|
1690
1690
|
_n((e) => e.source === "command"),
|
1691
|
-
|
1691
|
+
cr(16)
|
1692
1692
|
).subscribe((e) => {
|
1693
1693
|
const t = [];
|
1694
1694
|
if (e.forEach((r) => {
|
@@ -1703,7 +1703,7 @@ let xn = class extends un {
|
|
1703
1703
|
};
|
1704
1704
|
xn = Dr([
|
1705
1705
|
K(0, J),
|
1706
|
-
K(1,
|
1706
|
+
K(1, Ue),
|
1707
1707
|
K(2, b(fr)),
|
1708
1708
|
K(3, b(ye)),
|
1709
1709
|
K(4, b(Sn)),
|
@@ -1732,7 +1732,7 @@ let Vt = class extends Re {
|
|
1732
1732
|
(o = this._sheetSkeletonManagerService.getSkeletonParam(i)) == null || o.skeleton.makeDirty(!0);
|
1733
1733
|
}), (n = this._context.mainComponent) == null || n.makeForceDirty();
|
1734
1734
|
};
|
1735
|
-
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(
|
1735
|
+
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Hr(16)).subscribe(e));
|
1736
1736
|
}
|
1737
1737
|
};
|
1738
1738
|
Vt = bo([
|
@@ -1740,13 +1740,13 @@ Vt = bo([
|
|
1740
1740
|
$n(2, b(bt))
|
1741
1741
|
], Vt);
|
1742
1742
|
function Eo(e) {
|
1743
|
-
var
|
1744
|
-
const t = U(se), r = U(mn), { value: n, onChange: i, extraComponent: o } = e, [a, l] =
|
1745
|
-
return /* @__PURE__ */ W(
|
1743
|
+
var d;
|
1744
|
+
const t = U(se), r = U(mn), { value: n, onChange: i, extraComponent: o } = e, [a, l] = B(!1), s = o ? r.get(o) : null;
|
1745
|
+
return /* @__PURE__ */ W(dt, { children: [
|
1746
1746
|
/* @__PURE__ */ W(
|
1747
1747
|
"div",
|
1748
1748
|
{
|
1749
|
-
className: "univer-mb-3 univer-flex univer-cursor-pointer univer-items-center univer-text-sm univer-text-gray-900 dark
|
1749
|
+
className: "univer-mb-3 univer-flex univer-cursor-pointer univer-items-center univer-text-sm univer-text-gray-900 dark:!univer-text-white",
|
1750
1750
|
onClick: () => l(!a),
|
1751
1751
|
children: [
|
1752
1752
|
t.t("dataValidation.panel.options"),
|
@@ -1754,7 +1754,7 @@ function Eo(e) {
|
|
1754
1754
|
]
|
1755
1755
|
}
|
1756
1756
|
),
|
1757
|
-
a && /* @__PURE__ */ W(
|
1757
|
+
a && /* @__PURE__ */ W(dt, { children: [
|
1758
1758
|
s ? /* @__PURE__ */ _(s, { value: n, onChange: i }) : null,
|
1759
1759
|
/* @__PURE__ */ _(
|
1760
1760
|
j,
|
@@ -1763,7 +1763,7 @@ function Eo(e) {
|
|
1763
1763
|
children: /* @__PURE__ */ W(
|
1764
1764
|
pn,
|
1765
1765
|
{
|
1766
|
-
value: `${(
|
1766
|
+
value: `${(d = n.errorStyle) != null ? d : lt.WARNING}`,
|
1767
1767
|
onChange: (u) => i({ ...n, errorStyle: +u }),
|
1768
1768
|
children: [
|
1769
1769
|
/* @__PURE__ */ _(Oe, { value: `${lt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
|
@@ -1794,7 +1794,7 @@ function Eo(e) {
|
|
1794
1794
|
] })
|
1795
1795
|
] });
|
1796
1796
|
}
|
1797
|
-
const Do = (e) =>
|
1797
|
+
const Do = (e) => Br(
|
1798
1798
|
async (t, r, n, i) => {
|
1799
1799
|
const o = await e.executeCommand(t, r, n);
|
1800
1800
|
i == null || i(o);
|
@@ -1806,19 +1806,19 @@ function Vo(e, t, r) {
|
|
1806
1806
|
return t ? ((i = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(r)) == null ? void 0 : i.getSheetId()) || "" : ((a = (o = e.getCurrentUnitForType(Y.UNIVER_SHEET)) == null ? void 0 : o.getSheetBySheetName(r)) == null ? void 0 : a.getSheetId()) || "";
|
1807
1807
|
}
|
1808
1808
|
function Oo() {
|
1809
|
-
var O,
|
1810
|
-
const [e, t] =
|
1809
|
+
var O, H;
|
1810
|
+
const [e, t] = B(0), r = U(_e), n = Te(r.activeRule$, r.activeRule), { unitId: i, subUnitId: o, rule: a } = n || {}, l = a.uid, s = U(ye), d = U(le), u = U(mn), h = U(J), c = U(fn), m = U(se), [g, M] = B(a), y = s.getValidatorItem(g.type), [p, S] = B(!1), v = s.getValidatorsByScope(ui.SHEET), [C, w] = B(() => g.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), I = ct(() => Do(h), [h]), [R, T] = B(!1), [N, D] = B(!1), P = ht(null), A = U(hr);
|
1811
1811
|
if (Pe(() => () => {
|
1812
1812
|
const f = A.getCurrentLastSelection();
|
1813
1813
|
f && A.setSelections([f]);
|
1814
1814
|
}, [A]), Pe(() => {
|
1815
1815
|
h.onCommandExecuted((f) => {
|
1816
1816
|
(f.id === Wr.id || f.id === jr.id) && setTimeout(() => {
|
1817
|
-
const k =
|
1817
|
+
const k = c.getRuleById(i, o, l);
|
1818
1818
|
t(($) => $ + 1), k && (M(k), w(k.ranges.map(($) => ({ unitId: "", sheetId: "", range: $ }))));
|
1819
1819
|
}, 20);
|
1820
1820
|
});
|
1821
|
-
}, [h,
|
1821
|
+
}, [h, c, l, o, i]), !y)
|
1822
1822
|
return null;
|
1823
1823
|
const L = y.operators, V = y.operatorNames, F = g.operator ? hi.includes(g.operator) : !1, x = () => {
|
1824
1824
|
var f, k, $;
|
@@ -1827,7 +1827,7 @@ function Oo() {
|
|
1827
1827
|
const k = f.split(",").filter(Boolean).map(Ui).map((q) => {
|
1828
1828
|
const yn = q.sheetName;
|
1829
1829
|
if (yn) {
|
1830
|
-
const Ar = Vo(
|
1830
|
+
const Ar = Vo(d, q.unitId, yn);
|
1831
1831
|
return { ...q, sheetId: Ar };
|
1832
1832
|
}
|
1833
1833
|
return {
|
@@ -1885,7 +1885,7 @@ function Oo() {
|
|
1885
1885
|
const k = s.getValidatorItem(f);
|
1886
1886
|
if (!k)
|
1887
1887
|
return;
|
1888
|
-
const $ = k.operators, Ce =
|
1888
|
+
const $ = k.operators, Ce = c.getRuleById(i, o, l), q = f === (Ce == null ? void 0 : Ce.type) || f.includes("list") && (Ce != null && Ce.type.includes("list")) ? {
|
1889
1889
|
...Ce,
|
1890
1890
|
type: f
|
1891
1891
|
} : {
|
@@ -1901,7 +1901,7 @@ function Oo() {
|
|
1901
1901
|
ruleId: g.uid,
|
1902
1902
|
setting: Pn(q)
|
1903
1903
|
});
|
1904
|
-
},
|
1904
|
+
}, de = u.get(y.formulaInput), ne = ct(() => C.map((f) => _r(f.range)).join(","), []), ce = Tn(g), Se = (f) => {
|
1905
1905
|
bn(f, Tn(g)) || (M({
|
1906
1906
|
...g,
|
1907
1907
|
...f
|
@@ -1915,14 +1915,14 @@ function Oo() {
|
|
1915
1915
|
}
|
1916
1916
|
));
|
1917
1917
|
}, ve = L.length && !g.operator;
|
1918
|
-
return /* @__PURE__ */ W("div", { className: "univer-py-
|
1918
|
+
return /* @__PURE__ */ W("div", { "data-u-comp": "data-validation-detail", className: "univer-py-2", children: [
|
1919
1919
|
/* @__PURE__ */ _(
|
1920
1920
|
j,
|
1921
1921
|
{
|
1922
1922
|
label: m.t("dataValidation.panel.range"),
|
1923
1923
|
error: !g.ranges.length || R ? m.t("dataValidation.panel.rangeError") : "",
|
1924
1924
|
children: /* @__PURE__ */ _(
|
1925
|
-
|
1925
|
+
ci,
|
1926
1926
|
{
|
1927
1927
|
selectorRef: P,
|
1928
1928
|
unitId: i,
|
@@ -1976,8 +1976,8 @@ function Oo() {
|
|
1976
1976
|
}
|
1977
1977
|
}
|
1978
1978
|
) }) : null,
|
1979
|
-
|
1980
|
-
|
1979
|
+
de && !ve ? /* @__PURE__ */ _(
|
1980
|
+
de,
|
1981
1981
|
{
|
1982
1982
|
isTwoFormula: F,
|
1983
1983
|
value: {
|
@@ -2001,7 +2001,7 @@ function Oo() {
|
|
2001
2001
|
/* @__PURE__ */ _(j, { children: /* @__PURE__ */ _(
|
2002
2002
|
Lt,
|
2003
2003
|
{
|
2004
|
-
checked: (
|
2004
|
+
checked: (H = g.allowBlank) != null ? H : !0,
|
2005
2005
|
onChange: () => {
|
2006
2006
|
var f;
|
2007
2007
|
return Z({
|
@@ -2012,7 +2012,7 @@ function Oo() {
|
|
2012
2012
|
children: m.t("dataValidation.panel.allowBlank")
|
2013
2013
|
}
|
2014
2014
|
) }),
|
2015
|
-
/* @__PURE__ */ _(Eo, { value:
|
2015
|
+
/* @__PURE__ */ _(Eo, { value: ce, onChange: Se, extraComponent: y.optionsInput }),
|
2016
2016
|
/* @__PURE__ */ W("div", { className: "univer-mt-5 univer-flex univer-flex-row univer-justify-end", children: [
|
2017
2017
|
/* @__PURE__ */ _(ze, { className: "univer-ml-3", onClick: z, children: m.t("dataValidation.panel.removeRule") }),
|
2018
2018
|
/* @__PURE__ */ _(ze, { className: "univer-ml-3", variant: "primary", onClick: x, children: m.t("dataValidation.panel.done") })
|
@@ -2020,7 +2020,7 @@ function Oo() {
|
|
2020
2020
|
] });
|
2021
2021
|
}
|
2022
2022
|
const To = (e) => {
|
2023
|
-
const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = U(ye), l = U(J), s = U(Ni),
|
2023
|
+
const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = U(ye), l = U(J), s = U(Ni), d = a.getValidatorItem(t.type), u = ht(void 0), [h, c] = B(!1), m = U(Kn), g = Te(m.currentTheme$), M = ct(() => {
|
2024
2024
|
var w;
|
2025
2025
|
const p = m.getColorFromTheme("primary.600"), S = m.getColorFromTheme("loop-color.2"), v = (w = m.getColorFromTheme(S)) != null ? w : p, C = new Xr(v).toRgb();
|
2026
2026
|
return {
|
@@ -2042,20 +2042,20 @@ const To = (e) => {
|
|
2042
2042
|
}, [s]), /* @__PURE__ */ W(
|
2043
2043
|
"div",
|
2044
2044
|
{
|
2045
|
-
className:
|
2045
|
+
className: Ae(
|
2046
2046
|
`
|
2047
2047
|
univer-rounded-md univer-bg-secondary univer-relative univer--ml-2 univer--mr-2 univer-box-border
|
2048
2048
|
univer-flex univer-w-[287px] univer-cursor-pointer univer-flex-col univer-justify-between
|
2049
2049
|
univer-overflow-hidden univer-p-2 univer-pr-9
|
2050
2050
|
`,
|
2051
2051
|
{
|
2052
|
-
"hover:univer-bg-gray-50": !o,
|
2052
|
+
"dark:hover:!univer-bg-gray-700 hover:univer-bg-gray-50": !o,
|
2053
2053
|
"univer-opacity-50": o
|
2054
2054
|
}
|
2055
2055
|
),
|
2056
2056
|
onClick: r,
|
2057
2057
|
onMouseEnter: () => {
|
2058
|
-
o || (
|
2058
|
+
o || (c(!0), u.current = t.ranges.map((p) => s.addShape({
|
2059
2059
|
range: p,
|
2060
2060
|
style: M,
|
2061
2061
|
primary: null
|
@@ -2063,7 +2063,7 @@ const To = (e) => {
|
|
2063
2063
|
},
|
2064
2064
|
onMouseLeave: () => {
|
2065
2065
|
var p;
|
2066
|
-
|
2066
|
+
c(!1), (p = u.current) == null || p.forEach((S) => {
|
2067
2067
|
S && s.removeShape(S);
|
2068
2068
|
}), u.current = void 0;
|
2069
2069
|
},
|
@@ -2071,21 +2071,21 @@ const To = (e) => {
|
|
2071
2071
|
/* @__PURE__ */ _(
|
2072
2072
|
"div",
|
2073
2073
|
{
|
2074
|
-
className: "univer-truncate univer-text-sm univer-font-medium univer-leading-[22px] univer-text-gray-900 dark
|
2075
|
-
children:
|
2074
|
+
className: "univer-truncate univer-text-sm univer-font-medium univer-leading-[22px] univer-text-gray-900 dark:!univer-text-white",
|
2075
|
+
children: d == null ? void 0 : d.generateRuleName(t)
|
2076
2076
|
}
|
2077
2077
|
),
|
2078
2078
|
/* @__PURE__ */ _(
|
2079
2079
|
"div",
|
2080
2080
|
{
|
2081
|
-
className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px]",
|
2081
|
+
className: "univer-text-secondary univer-truncate univer-text-xs univer-leading-[18px] dark:!univer-text-gray-300",
|
2082
2082
|
children: t.ranges.map((p) => _r(p)).join(",")
|
2083
2083
|
}
|
2084
2084
|
),
|
2085
2085
|
h ? /* @__PURE__ */ _(
|
2086
2086
|
"div",
|
2087
2087
|
{
|
2088
|
-
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",
|
2088
|
+
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 dark:!univer-text-gray-300 dark:hover:!univer-bg-gray-700 hover:univer-bg-gray-200",
|
2089
2089
|
onClick: y,
|
2090
2090
|
children: /* @__PURE__ */ _(Cn, {})
|
2091
2091
|
}
|
@@ -2095,31 +2095,31 @@ const To = (e) => {
|
|
2095
2095
|
);
|
2096
2096
|
};
|
2097
2097
|
function Po(e) {
|
2098
|
-
const t = U(ee), r = U(le), n = U(J), i = U(we), o = U(_e), a = U(se), [l, s] =
|
2098
|
+
const t = U(ee), r = U(le), n = U(J), i = U(we), o = U(_e), a = U(se), [l, s] = B([]), { workbook: d } = e, u = Te(d.activeSheet$, void 0, !0), h = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
|
2099
2099
|
Pe(() => {
|
2100
|
-
s(t.getRules(h,
|
2100
|
+
s(t.getRules(h, c));
|
2101
2101
|
const S = t.ruleChange$.subscribe((v) => {
|
2102
|
-
v.unitId === h && v.subUnitId ===
|
2102
|
+
v.unitId === h && v.subUnitId === c && s(t.getRules(h, c));
|
2103
2103
|
});
|
2104
2104
|
return () => {
|
2105
2105
|
S.unsubscribe();
|
2106
2106
|
};
|
2107
|
-
}, [h,
|
2107
|
+
}, [h, c, t]);
|
2108
2108
|
const m = async () => {
|
2109
2109
|
const S = er(i), v = {
|
2110
2110
|
unitId: h,
|
2111
|
-
subUnitId:
|
2111
|
+
subUnitId: c,
|
2112
2112
|
rule: S
|
2113
2113
|
};
|
2114
2114
|
await n.executeCommand(gn.id, v), o.setActiveRule({
|
2115
2115
|
unitId: h,
|
2116
|
-
subUnitId:
|
2116
|
+
subUnitId: c,
|
2117
2117
|
rule: S
|
2118
2118
|
});
|
2119
2119
|
}, g = () => {
|
2120
2120
|
n.executeCommand(Qr.id, {
|
2121
2121
|
unitId: h,
|
2122
|
-
subUnitId:
|
2122
|
+
subUnitId: c
|
2123
2123
|
});
|
2124
2124
|
}, y = ((S) => {
|
2125
2125
|
const v = r.getCurrentUnitForType(Y.UNIVER_SHEET), C = v.getActiveSheet(), w = v.getUnitId(), I = C.getSheetId();
|
@@ -2132,11 +2132,11 @@ function Po(e) {
|
|
2132
2132
|
To,
|
2133
2133
|
{
|
2134
2134
|
unitId: h,
|
2135
|
-
subUnitId:
|
2135
|
+
subUnitId: c,
|
2136
2136
|
onClick: () => {
|
2137
2137
|
S.disable || o.setActiveRule({
|
2138
2138
|
unitId: h,
|
2139
|
-
subUnitId:
|
2139
|
+
subUnitId: c,
|
2140
2140
|
rule: S
|
2141
2141
|
});
|
2142
2142
|
},
|
@@ -2207,8 +2207,8 @@ let an = class {
|
|
2207
2207
|
this._commandService = e, this._univerInstanceService = t, this._formulaService = r, this._themeService = n, this._renderManagerService = i, this._dataValidationModel = o;
|
2208
2208
|
}
|
2209
2209
|
_calc(e, t) {
|
2210
|
-
var
|
2211
|
-
const { vt: r, ht: n } = t || {}, i = e.endX - e.startX - ft * 2, o = e.endY - e.startY, a = ((
|
2210
|
+
var d, u, h;
|
2211
|
+
const { vt: r, ht: n } = t || {}, i = e.endX - e.startX - ft * 2, o = e.endY - e.startY, a = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
|
2212
2212
|
let l = 0, s = 0;
|
2213
2213
|
switch (r) {
|
2214
2214
|
case ae.TOP:
|
@@ -2222,10 +2222,10 @@ let an = class {
|
|
2222
2222
|
break;
|
2223
2223
|
}
|
2224
2224
|
switch (n) {
|
2225
|
-
case
|
2225
|
+
case Xe.LEFT:
|
2226
2226
|
l = ft;
|
2227
2227
|
break;
|
2228
|
-
case
|
2228
|
+
case Xe.RIGHT:
|
2229
2229
|
l = ft + (i - a);
|
2230
2230
|
break;
|
2231
2231
|
default:
|
@@ -2250,8 +2250,8 @@ let an = class {
|
|
2250
2250
|
return ((r = t == null ? void 0 : t.fs) != null ? r : 10) * 1.6;
|
2251
2251
|
}
|
2252
2252
|
async _parseFormula(e, t, r) {
|
2253
|
-
var
|
2254
|
-
const { formula1: n = ni, formula2: i = ti } = e, o = await this._formulaService.getRuleFormulaResult(t, r, e.uid), a = Ft((h = (u = (
|
2253
|
+
var d, u, h, c, m, g, M, y, p;
|
2254
|
+
const { formula1: n = ni, formula2: i = ti } = e, o = await this._formulaService.getRuleFormulaResult(t, r, e.uid), a = Ft((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 = Ft((g = (m = (c = o == null ? void 0 : o[1]) == null ? void 0 : c.result) == null ? void 0 : m[0]) == null ? void 0 : g[0]), s = Dn(String(a)) && Dn(String(l));
|
2255
2255
|
return {
|
2256
2256
|
formula1: De(n) ? Ft((p = (y = (M = o == null ? void 0 : o[0]) == null ? void 0 : M.result) == null ? void 0 : y[0]) == null ? void 0 : p[0]) : n,
|
2257
2257
|
formula2: De(i) ? l : i,
|
@@ -2260,13 +2260,13 @@ let an = class {
|
|
2260
2260
|
}
|
2261
2261
|
drawWith(e, t) {
|
2262
2262
|
var P, A, L, V;
|
2263
|
-
const { style: r, primaryWithCoord: n, unitId: i, subUnitId: o, worksheet: a, row: l, col: s } = t,
|
2263
|
+
const { style: r, primaryWithCoord: n, unitId: i, subUnitId: o, worksheet: a, row: l, col: s } = t, d = n.isMergedMainCell ? n.mergeInfo : n, u = Q(a.getCellRaw(l, s)), h = this._dataValidationModel.getRuleByLocation(i, o, l, s);
|
2264
2264
|
if (!h)
|
2265
2265
|
return;
|
2266
|
-
const
|
2267
|
-
if (!
|
2266
|
+
const c = this._dataValidationModel.getValidator(h.type);
|
2267
|
+
if (!c || !((P = c.skipDefaultFontRender) != null && P.call(c, h, u, { unitId: i, subUnitId: o, row: l, column: s })))
|
2268
2268
|
return;
|
2269
|
-
const m =
|
2269
|
+
const m = c.parseFormulaSync(h, i, o), { formula1: g } = m, M = this._calc(d, r), { a: y, d: p } = e.getTransform(), S = Ln(M.left, y), v = Ln(M.top, p), C = mi.create().composeMatrix({
|
2270
2270
|
left: S,
|
2271
2271
|
top: v,
|
2272
2272
|
scaleX: 1,
|
@@ -2276,8 +2276,8 @@ let an = class {
|
|
2276
2276
|
skewY: 0,
|
2277
2277
|
flipX: !1,
|
2278
2278
|
flipY: !1
|
2279
|
-
}), w =
|
2280
|
-
e.save(), e.beginPath(), e.rect(
|
2279
|
+
}), w = d.endX - d.startX, I = d.endY - d.startY;
|
2280
|
+
e.save(), e.beginPath(), e.rect(d.startX, d.startY, w, I), e.clip();
|
2281
2281
|
const R = C.getMatrix();
|
2282
2282
|
e.transform(R[0], R[1], R[2], R[3], R[4], R[5]);
|
2283
2283
|
const T = ((A = r == null ? void 0 : r.fs) != null ? A : 10) * 1.6, N = String(u) === String(g), D = this._themeService.getColorFromTheme("primary.600");
|
@@ -2289,20 +2289,20 @@ let an = class {
|
|
2289
2289
|
}), e.restore();
|
2290
2290
|
}
|
2291
2291
|
isHit(e, t) {
|
2292
|
-
const r = t.primaryWithCoord.isMergedMainCell ? t.primaryWithCoord.mergeInfo : t.primaryWithCoord, n = this._calc(r, t.style), i = n.top, o = n.top + n.height, a = n.left, l = n.left + n.width, { x: s, y:
|
2293
|
-
return s <= l && s >= a &&
|
2292
|
+
const r = t.primaryWithCoord.isMergedMainCell ? t.primaryWithCoord.mergeInfo : t.primaryWithCoord, n = this._calc(r, t.style), i = n.top, o = n.top + n.height, a = n.left, l = n.left + n.width, { x: s, y: d } = e;
|
2293
|
+
return s <= l && s >= a && d <= o && d >= i;
|
2294
2294
|
}
|
2295
2295
|
async onPointerDown(e, t) {
|
2296
2296
|
var g;
|
2297
2297
|
if (t.button === 2)
|
2298
2298
|
return;
|
2299
|
-
const { primaryWithCoord: r, unitId: n, subUnitId: i, worksheet: o, row: a, col: l } = e, s = Q(o.getCellRaw(a, l)),
|
2300
|
-
if (!
|
2299
|
+
const { primaryWithCoord: r, unitId: n, subUnitId: i, worksheet: o, row: a, col: l } = e, s = Q(o.getCellRaw(a, l)), d = this._dataValidationModel.getRuleByLocation(n, i, a, l);
|
2300
|
+
if (!d)
|
2301
2301
|
return;
|
2302
|
-
const u = this._dataValidationModel.getValidator(
|
2303
|
-
if (!u || !((g = u.skipDefaultFontRender) != null && g.call(u,
|
2302
|
+
const u = this._dataValidationModel.getValidator(d.type);
|
2303
|
+
if (!u || !((g = u.skipDefaultFontRender) != null && g.call(u, d, s, { unitId: n, subUnitId: i, row: a, column: l })))
|
2304
2304
|
return;
|
2305
|
-
const { formula1: h, formula2:
|
2305
|
+
const { formula1: h, formula2: c } = await this._parseFormula(d, n, i), m = {
|
2306
2306
|
range: {
|
2307
2307
|
startColumn: r.actualColumn,
|
2308
2308
|
endColumn: r.actualColumn,
|
@@ -2310,7 +2310,7 @@ let an = class {
|
|
2310
2310
|
endRow: r.actualRow
|
2311
2311
|
},
|
2312
2312
|
value: {
|
2313
|
-
v: String(s) === ri(String(h)) ?
|
2313
|
+
v: String(s) === ri(String(h)) ? c : h,
|
2314
2314
|
p: null
|
2315
2315
|
}
|
2316
2316
|
};
|
@@ -2333,7 +2333,7 @@ an = Uo([
|
|
2333
2333
|
Be(1, le),
|
2334
2334
|
Be(2, b(ei)),
|
2335
2335
|
Be(3, b(Kn)),
|
2336
|
-
Be(4, b(
|
2336
|
+
Be(4, b(Ue)),
|
2337
2337
|
Be(5, b(ee))
|
2338
2338
|
], an);
|
2339
2339
|
class Fo extends fe {
|
@@ -2352,7 +2352,7 @@ class xo extends fe {
|
|
2352
2352
|
}
|
2353
2353
|
}
|
2354
2354
|
const $o = "data-validation.formula-input";
|
2355
|
-
class
|
2355
|
+
class Ho extends fe {
|
2356
2356
|
constructor() {
|
2357
2357
|
super(...arguments);
|
2358
2358
|
E(this, "id", G.DATE);
|
@@ -2361,7 +2361,7 @@ class Bo extends fe {
|
|
2361
2361
|
E(this, "dropdownType", ge.DATE);
|
2362
2362
|
}
|
2363
2363
|
}
|
2364
|
-
class
|
2364
|
+
class Bo extends fe {
|
2365
2365
|
constructor() {
|
2366
2366
|
super(...arguments);
|
2367
2367
|
E(this, "id", G.DECIMAL);
|
@@ -2378,31 +2378,31 @@ function jo(e, t) {
|
|
2378
2378
|
};
|
2379
2379
|
}
|
2380
2380
|
function Yt(e, t, r, n) {
|
2381
|
-
const i = Ee + sn * 2, o = r - i, a = n - Pt * 2, l = e.map((
|
2382
|
-
layout: jo(
|
2383
|
-
text:
|
2381
|
+
const i = Ee + sn * 2, o = r - i, a = n - Pt * 2, l = e.map((c) => ({
|
2382
|
+
layout: jo(c, t),
|
2383
|
+
text: c
|
2384
2384
|
}));
|
2385
2385
|
let s;
|
2386
|
-
const
|
2387
|
-
l.forEach((
|
2388
|
-
const { layout: m } =
|
2386
|
+
const d = [];
|
2387
|
+
l.forEach((c) => {
|
2388
|
+
const { layout: m } = c, { width: g, height: M } = m;
|
2389
2389
|
!s || s.width + g + jt > o ? (s = {
|
2390
2390
|
width: g,
|
2391
2391
|
height: M,
|
2392
2392
|
items: [{
|
2393
|
-
...
|
2393
|
+
...c,
|
2394
2394
|
left: 0
|
2395
2395
|
}]
|
2396
|
-
},
|
2397
|
-
...
|
2396
|
+
}, d.push(s)) : (s.items.push({
|
2397
|
+
...c,
|
2398
2398
|
left: s.width + jt
|
2399
2399
|
}), s.width = s.width + g + jt);
|
2400
2400
|
});
|
2401
2401
|
let u = 0, h = 0;
|
2402
|
-
return
|
2403
|
-
h = Math.max(h,
|
2402
|
+
return d.forEach((c, m) => {
|
2403
|
+
h = Math.max(h, c.width), m === d.length - 1 ? u += c.height : u += c.height + Tr;
|
2404
2404
|
}), {
|
2405
|
-
lines:
|
2405
|
+
lines: d,
|
2406
2406
|
totalHeight: u,
|
2407
2407
|
contentWidth: o,
|
2408
2408
|
contentHeight: a,
|
@@ -2418,7 +2418,7 @@ class Xo extends Si {
|
|
2418
2418
|
width: l.width,
|
2419
2419
|
height: l.height,
|
2420
2420
|
radius: Yo,
|
2421
|
-
fill: o ||
|
2421
|
+
fill: o || We
|
2422
2422
|
}), t.translateWithPrecision(Or, l.ba), t.font = n, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
|
2423
2423
|
}
|
2424
2424
|
}
|
@@ -2457,14 +2457,14 @@ let ln = class {
|
|
2457
2457
|
// eslint-disable-next-line max-lines-per-function
|
2458
2458
|
drawWith(e, t, r, n) {
|
2459
2459
|
var Z, z;
|
2460
|
-
const { primaryWithCoord: i, row: o, col: a, style: l, data: s, subUnitId:
|
2460
|
+
const { primaryWithCoord: i, row: o, col: a, style: l, data: s, subUnitId: d } = t, u = i.isMergedMainCell ? i.mergeInfo : i, h = s == null ? void 0 : s.fontRenderExtension, { leftOffset: c = 0, rightOffset: m = 0, topOffset: g = 0, downOffset: M = 0 } = h || {}, y = this._ensureMap(d), p = this._generateKey(o, a), S = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, o, a);
|
2461
2461
|
if (!S)
|
2462
2462
|
return;
|
2463
2463
|
const v = this._dataValidationModel.getValidator(S.type);
|
2464
2464
|
if (!v)
|
2465
2465
|
return;
|
2466
2466
|
const C = {
|
2467
|
-
startX: u.startX +
|
2467
|
+
startX: u.startX + c,
|
2468
2468
|
endX: u.endX - m,
|
2469
2469
|
startY: u.startY + g,
|
2470
2470
|
endY: u.endY - M
|
@@ -2481,17 +2481,17 @@ let ln = class {
|
|
2481
2481
|
}
|
2482
2482
|
e.translateWithPrecision(0, X), x.lines.forEach((te, pe) => {
|
2483
2483
|
e.save();
|
2484
|
-
const { width:
|
2484
|
+
const { width: de, height: ne, items: ce } = te;
|
2485
2485
|
let Se = 0;
|
2486
2486
|
switch (P) {
|
2487
|
-
case
|
2488
|
-
Se = x.contentWidth -
|
2487
|
+
case Xe.RIGHT:
|
2488
|
+
Se = x.contentWidth - de;
|
2489
2489
|
break;
|
2490
|
-
case
|
2491
|
-
Se = (x.contentWidth -
|
2490
|
+
case Xe.CENTER:
|
2491
|
+
Se = (x.contentWidth - de) / 2;
|
2492
2492
|
break;
|
2493
2493
|
}
|
2494
|
-
e.translate(Se, pe * (ne + Tr)),
|
2494
|
+
e.translate(Se, pe * (ne + Tr)), ce.forEach((ve) => {
|
2495
2495
|
e.save(), e.translateWithPrecision(ve.left, 0), Xo.drawWith(e, {
|
2496
2496
|
...N,
|
2497
2497
|
info: ve,
|
@@ -2508,10 +2508,10 @@ let ln = class {
|
|
2508
2508
|
}
|
2509
2509
|
calcCellAutoHeight(e) {
|
2510
2510
|
var w;
|
2511
|
-
const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset:
|
2511
|
+
const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, h = t.isMergedMainCell ? t.mergeInfo : t, c = {
|
2512
2512
|
startX: h.startX + l,
|
2513
2513
|
endX: h.endX - s,
|
2514
|
-
startY: h.startY +
|
2514
|
+
startY: h.startY + d,
|
2515
2515
|
endY: h.endY - u
|
2516
2516
|
}, m = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, o);
|
2517
2517
|
if (!m)
|
@@ -2519,15 +2519,15 @@ let ln = class {
|
|
2519
2519
|
const g = this._dataValidationModel.getValidator(m.type);
|
2520
2520
|
if (!g)
|
2521
2521
|
return;
|
2522
|
-
const M =
|
2522
|
+
const M = c.endX - c.startX, y = c.endY - c.startY, p = (w = Q(n)) != null ? w : "", S = g.parseCellValue(p), v = xt(r != null ? r : void 0);
|
2523
2523
|
return Yt(S, v, M, y).cellAutoHeight;
|
2524
2524
|
}
|
2525
2525
|
calcCellAutoWidth(e) {
|
2526
2526
|
var w;
|
2527
|
-
const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset:
|
2527
|
+
const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = n == null ? void 0 : n.fontRenderExtension, { leftOffset: l = 0, rightOffset: s = 0, topOffset: d = 0, downOffset: u = 0 } = a || {}, h = t.isMergedMainCell ? t.mergeInfo : t, c = {
|
2528
2528
|
startX: h.startX + l,
|
2529
2529
|
endX: h.endX - s,
|
2530
|
-
startY: h.startY +
|
2530
|
+
startY: h.startY + d,
|
2531
2531
|
endY: h.endY - u
|
2532
2532
|
}, m = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, o);
|
2533
2533
|
if (!m)
|
@@ -2535,7 +2535,7 @@ let ln = class {
|
|
2535
2535
|
const g = this._dataValidationModel.getValidator(m.type);
|
2536
2536
|
if (!g)
|
2537
2537
|
return;
|
2538
|
-
const M =
|
2538
|
+
const M = c.endX - c.startX, y = c.endY - c.startY, p = (w = Q(n)) != null ? w : "", S = g.parseCellValue(p), v = xt(r != null ? r : void 0);
|
2539
2539
|
return Yt(S, v, M, y).calcAutoWidth;
|
2540
2540
|
}
|
2541
2541
|
isHit(e, t) {
|
@@ -2565,7 +2565,7 @@ let ln = class {
|
|
2565
2565
|
ln = Ko([
|
2566
2566
|
_t(0, J),
|
2567
2567
|
_t(1, le),
|
2568
|
-
_t(2, b(
|
2568
|
+
_t(2, b(Ue)),
|
2569
2569
|
_t(3, b(ee))
|
2570
2570
|
], ln);
|
2571
2571
|
class Zo extends fe {
|
@@ -2581,7 +2581,7 @@ var qo = Object.getOwnPropertyDescriptor, Jo = (e, t, r, n) => {
|
|
2581
2581
|
(a = e[o]) && (i = a(i) || i);
|
2582
2582
|
return i;
|
2583
2583
|
}, at = (e, t) => (r, n) => t(r, n, e);
|
2584
|
-
const be = 4, St = 4, he = 14, me = 6,
|
2584
|
+
const be = 4, St = 4, he = 14, me = 6, je = 4, Xt = 8, Qo = "#565656", Hn = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
|
2585
2585
|
function ea(e, t) {
|
2586
2586
|
const r = e.length;
|
2587
2587
|
return {
|
@@ -2646,9 +2646,9 @@ function Ct(e, t, r) {
|
|
2646
2646
|
docViewModel: o
|
2647
2647
|
};
|
2648
2648
|
}
|
2649
|
-
function
|
2649
|
+
function Bn(e, t, r, n, i, o, a = !0) {
|
2650
2650
|
let l = 0;
|
2651
|
-
const s = a ?
|
2651
|
+
const s = a ? je : 0;
|
2652
2652
|
switch (i) {
|
2653
2653
|
case ae.BOTTOM:
|
2654
2654
|
l = t - n - s;
|
@@ -2660,22 +2660,22 @@ function Hn(e, t, r, n, i, o, a = !0) {
|
|
2660
2660
|
l = s;
|
2661
2661
|
break;
|
2662
2662
|
}
|
2663
|
-
l = Math.max(
|
2664
|
-
let
|
2663
|
+
l = Math.max(je, l);
|
2664
|
+
let d = 0;
|
2665
2665
|
switch (o) {
|
2666
|
-
case
|
2667
|
-
|
2666
|
+
case Xe.CENTER:
|
2667
|
+
d = (e - r) / 2;
|
2668
2668
|
break;
|
2669
|
-
case
|
2670
|
-
|
2669
|
+
case Xe.RIGHT:
|
2670
|
+
d = e - r;
|
2671
2671
|
break;
|
2672
2672
|
}
|
2673
|
-
return
|
2674
|
-
paddingLeft:
|
2673
|
+
return d = Math.max(me, d), {
|
2674
|
+
paddingLeft: d,
|
2675
2675
|
paddingTop: l
|
2676
2676
|
};
|
2677
2677
|
}
|
2678
|
-
let
|
2678
|
+
let dn = class {
|
2679
2679
|
constructor(e, t, r, n, i) {
|
2680
2680
|
E(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
|
2681
2681
|
E(this, "zIndex");
|
@@ -2689,43 +2689,43 @@ let cn = class {
|
|
2689
2689
|
return `${e}.${t}`;
|
2690
2690
|
}
|
2691
2691
|
_drawDownIcon(e, t, r, n, i, o, a) {
|
2692
|
-
const { t: l = re.pd.t, b: s = re.pd.b } = a,
|
2692
|
+
const { t: l = re.pd.t, b: s = re.pd.b } = a, d = r - he;
|
2693
2693
|
let u;
|
2694
2694
|
switch (o) {
|
2695
2695
|
case ae.MIDDLE:
|
2696
2696
|
u = (n - St) / 2;
|
2697
2697
|
break;
|
2698
2698
|
case ae.BOTTOM:
|
2699
|
-
u = n - s - i -
|
2699
|
+
u = n - s - i - je + (i / 2 - St / 2);
|
2700
2700
|
break;
|
2701
2701
|
default:
|
2702
|
-
u = l +
|
2702
|
+
u = l + je + (i / 2 - St / 2);
|
2703
2703
|
break;
|
2704
2704
|
}
|
2705
|
-
e.save(), e.translateWithPrecision(t.startX +
|
2705
|
+
e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill(Hn), e.restore();
|
2706
2706
|
}
|
2707
2707
|
// eslint-disable-next-line max-lines-per-function, complexity
|
2708
2708
|
drawWith(e, t, r) {
|
2709
|
-
const { primaryWithCoord: n, row: i, col: o, style: a, data: l, subUnitId: s } = t,
|
2709
|
+
const { primaryWithCoord: n, row: i, col: o, style: a, data: l, subUnitId: s } = t, d = n.isMergedMainCell ? n.mergeInfo : n, u = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, i, o);
|
2710
2710
|
if (!u)
|
2711
2711
|
return;
|
2712
2712
|
const h = this._dataValidationModel.getValidator(u.type);
|
2713
2713
|
if (!h)
|
2714
2714
|
return;
|
2715
|
-
const
|
2715
|
+
const c = l == null ? void 0 : l.fontRenderExtension, { leftOffset: m = 0, rightOffset: g = 0, topOffset: M = 0, downOffset: y = 0 } = c || {};
|
2716
2716
|
if (!u || !h || !h || h.id.indexOf(G.LIST) !== 0 || !h.skipDefaultFontRender(u))
|
2717
2717
|
return;
|
2718
2718
|
const p = {
|
2719
|
-
startX:
|
2720
|
-
endX:
|
2721
|
-
startY:
|
2722
|
-
endY:
|
2719
|
+
startX: d.startX + m,
|
2720
|
+
endX: d.endX - g,
|
2721
|
+
startY: d.startY + M,
|
2722
|
+
endY: d.endY - y
|
2723
2723
|
}, S = p.endX - p.startX, v = p.endY - p.startY, C = this._ensureMap(s), w = this._generateKey(i, o), I = h.getListWithColor(u), R = Q(l), T = `${R != null ? R : ""}`, N = I.find((V) => V.label === T);
|
2724
2724
|
let { tb: D, vt: P, ht: A, pd: L } = a || {};
|
2725
2725
|
if (D = D != null ? D : Ie.WRAP, P = P != null ? P : ae.BOTTOM, A = A != null ? A : re.ht, L = L != null ? L : re.pd, u.renderMode === ie.ARROW) {
|
2726
2726
|
const { l: V = re.pd.l, t: F = re.pd.t, r: x = re.pd.r, b: X = re.pd.b } = L, Z = S - V - x - he - 4, { documentSkeleton: z, documents: te, docModel: pe } = Ct(T, this._localeService, a);
|
2727
2727
|
D === Ie.WRAP && pe.updateDocumentDataPageSize(Math.max(Z, 1)), z.calculate(), z.getActualSize();
|
2728
|
-
const
|
2728
|
+
const de = it(z), { height: ne, width: ce } = de, { paddingTop: Se, paddingLeft: ve } = Bn(Z, v - F - X, ce, ne, P, A, !0);
|
2729
2729
|
this._drawDownIcon(e, p, S, v, ne, P, L), e.save(), e.translateWithPrecision(p.startX + V, p.startY + F), e.beginPath(), e.rect(0, 0, S - V - x, v - F - X), e.clip(), e.translateWithPrecision(0, Se), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, Z, ne), e.clip(), te.render(e), e.translateWithPrecision(ve, 0), e.restore(), e.restore(), C.set(w, {
|
2730
2730
|
left: p.endX + V + r.rowHeaderWidth - he,
|
2731
2731
|
top: p.startY + F + r.columnHeaderHeight,
|
@@ -2736,55 +2736,55 @@ let cn = class {
|
|
2736
2736
|
e.save(), e.translateWithPrecision(p.startX, p.startY), e.beginPath(), e.rect(0, 0, S, v), e.clip();
|
2737
2737
|
const V = S - me * 2 - be - he - 4, { documentSkeleton: F, documents: x, docModel: X } = Ct(T, this._localeService, a);
|
2738
2738
|
D === Ie.WRAP && X.updateDocumentDataPageSize(Math.max(V, 1)), F.calculate();
|
2739
|
-
const Z = it(F), { height: z, width: te } = Z, { paddingTop: pe, paddingLeft:
|
2739
|
+
const Z = it(F), { height: z, width: te } = Z, { paddingTop: pe, paddingLeft: de } = Bn(V, v, te, z, P, A);
|
2740
2740
|
e.translateWithPrecision(me, pe);
|
2741
|
-
const ne = Math.max(S - me * 2, 1),
|
2741
|
+
const ne = Math.max(S - me * 2, 1), ce = z;
|
2742
2742
|
ur.drawWith(e, {
|
2743
2743
|
width: ne,
|
2744
|
-
height:
|
2745
|
-
fill: (N == null ? void 0 : N.color) ||
|
2744
|
+
height: ce,
|
2745
|
+
fill: (N == null ? void 0 : N.color) || We,
|
2746
2746
|
radius: Xt
|
2747
|
-
}), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, V, z), e.clip(), e.translateWithPrecision(
|
2747
|
+
}), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, V, z), e.clip(), e.translateWithPrecision(de, 0), x.render(e), e.restore(), e.translateWithPrecision(V + be + 4, (z - St) / 2), e.fillStyle = Qo, e.fill(Hn), e.restore(), C.set(w, {
|
2748
2748
|
left: p.startX + me + r.rowHeaderWidth,
|
2749
2749
|
top: p.startY + pe + r.columnHeaderHeight,
|
2750
2750
|
width: ne,
|
2751
|
-
height:
|
2751
|
+
height: ce
|
2752
2752
|
});
|
2753
2753
|
}
|
2754
2754
|
}
|
2755
2755
|
calcCellAutoHeight(e) {
|
2756
|
-
const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset:
|
2757
|
-
if (!
|
2756
|
+
const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, o);
|
2757
|
+
if (!c || c.renderMode === ie.TEXT)
|
2758
2758
|
return;
|
2759
2759
|
const m = {
|
2760
2760
|
startX: a.startX + s,
|
2761
|
-
endX: a.endX -
|
2761
|
+
endX: a.endX - d,
|
2762
2762
|
startY: a.startY + u,
|
2763
2763
|
endY: a.endY - h
|
2764
2764
|
}, g = m.endX - m.startX, M = Q(n), y = `${M != null ? M : ""}`;
|
2765
2765
|
let { tb: p, pd: S } = r || {};
|
2766
2766
|
const { t: v = re.pd.t, b: C = re.pd.b } = S != null ? S : {};
|
2767
|
-
if (p = p != null ? p : Ie.WRAP,
|
2767
|
+
if (p = p != null ? p : Ie.WRAP, c.renderMode === ie.ARROW) {
|
2768
2768
|
const w = g - he, { documentSkeleton: I, docModel: R } = Ct(y, this._localeService, r);
|
2769
2769
|
p === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), I.calculate(), I.getActualSize();
|
2770
2770
|
const T = it(I), { height: N } = T;
|
2771
|
-
return N + v + C +
|
2771
|
+
return N + v + C + je * 2;
|
2772
2772
|
} else {
|
2773
2773
|
const w = g - me * 2 - be - he, { documentSkeleton: I, docModel: R } = Pr(y, this._localeService, r);
|
2774
2774
|
p === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), I.calculate();
|
2775
2775
|
const T = it(I), {
|
2776
2776
|
height: N
|
2777
2777
|
} = T;
|
2778
|
-
return N +
|
2778
|
+
return N + je * 2;
|
2779
2779
|
}
|
2780
2780
|
}
|
2781
2781
|
calcCellAutoWidth(e) {
|
2782
|
-
const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset:
|
2783
|
-
if (!
|
2782
|
+
const { primaryWithCoord: t, style: r, data: n, row: i, col: o } = e, a = t.isMergedMainCell ? t.mergeInfo : t, l = n == null ? void 0 : n.fontRenderExtension, { leftOffset: s = 0, rightOffset: d = 0, topOffset: u = 0, downOffset: h = 0 } = l || {}, c = this._dataValidationModel.getRuleByLocation(e.unitId, e.subUnitId, i, o);
|
2783
|
+
if (!c || c.renderMode === ie.TEXT)
|
2784
2784
|
return;
|
2785
2785
|
const m = {
|
2786
2786
|
startX: a.startX + s,
|
2787
|
-
endX: a.endX -
|
2787
|
+
endX: a.endX - d,
|
2788
2788
|
startY: a.startY + u,
|
2789
2789
|
endY: a.endY - h
|
2790
2790
|
}, g = m.endX - m.startX, M = Q(n), y = `${M != null ? M : ""}`;
|
@@ -2792,7 +2792,7 @@ let cn = class {
|
|
2792
2792
|
const { l: v = re.pd.l, r: C = re.pd.r } = S != null ? S : {};
|
2793
2793
|
p = p != null ? p : Ie.WRAP;
|
2794
2794
|
let w = me * 2 + he;
|
2795
|
-
switch (
|
2795
|
+
switch (c.renderMode) {
|
2796
2796
|
case ie.ARROW:
|
2797
2797
|
w = he + me * 2 + C + v;
|
2798
2798
|
break;
|
@@ -2810,8 +2810,8 @@ let cn = class {
|
|
2810
2810
|
const { subUnitId: r, row: n, col: i } = t, a = this._ensureMap(r).get(this._generateKey(n, i)), l = this._dataValidationModel.getRuleByLocation(t.unitId, t.subUnitId, n, i);
|
2811
2811
|
if (!l || !a || l.renderMode === ie.TEXT)
|
2812
2812
|
return !1;
|
2813
|
-
const { top: s, left:
|
2814
|
-
return
|
2813
|
+
const { top: s, left: d, width: u, height: h } = a, { x: c, y: m } = e;
|
2814
|
+
return c >= d && c <= d + u && m >= s && m <= s + h;
|
2815
2815
|
}
|
2816
2816
|
onPointerDown(e, t) {
|
2817
2817
|
if (t.button === 2)
|
@@ -2833,18 +2833,18 @@ let cn = class {
|
|
2833
2833
|
(n = (r = Ke(Y.UNIVER_SHEET, this._univerInstanceService, this._renderManagerService)) == null ? void 0 : r.mainComponent) == null || n.setCursor(Ge.DEFAULT);
|
2834
2834
|
}
|
2835
2835
|
};
|
2836
|
-
|
2836
|
+
dn = Jo([
|
2837
2837
|
at(0, le),
|
2838
2838
|
at(1, b(se)),
|
2839
2839
|
at(2, J),
|
2840
|
-
at(3, b(
|
2840
|
+
at(3, b(Ue)),
|
2841
2841
|
at(4, b(ee))
|
2842
|
-
],
|
2842
|
+
], dn);
|
2843
2843
|
class ta extends fe {
|
2844
2844
|
constructor() {
|
2845
2845
|
super(...arguments);
|
2846
2846
|
E(this, "id", G.LIST);
|
2847
|
-
E(this, "canvasRender", this.injector.createInstance(
|
2847
|
+
E(this, "canvasRender", this.injector.createInstance(dn));
|
2848
2848
|
E(this, "dropdownType", ge.LIST);
|
2849
2849
|
E(this, "optionsInput", Ot.componentKey);
|
2850
2850
|
E(this, "formulaInput", hn);
|
@@ -2889,10 +2889,10 @@ let tt = class extends un {
|
|
2889
2889
|
}
|
2890
2890
|
_registerValidatorViews() {
|
2891
2891
|
[
|
2892
|
-
|
2892
|
+
Bo,
|
2893
2893
|
ra,
|
2894
2894
|
na,
|
2895
|
-
|
2895
|
+
Ho,
|
2896
2896
|
Fo,
|
2897
2897
|
ta,
|
2898
2898
|
Zo,
|
@@ -2928,7 +2928,7 @@ let Wn = (It = class extends Gn {
|
|
2928
2928
|
onStarting() {
|
2929
2929
|
[
|
2930
2930
|
[_e],
|
2931
|
-
[
|
2931
|
+
[Le],
|
2932
2932
|
[ut],
|
2933
2933
|
[qe],
|
2934
2934
|
[et],
|
@@ -2943,14 +2943,14 @@ let Wn = (It = class extends Gn {
|
|
2943
2943
|
kt,
|
2944
2944
|
Mr,
|
2945
2945
|
Rn,
|
2946
|
-
|
2946
|
+
xe,
|
2947
2947
|
yr
|
2948
2948
|
].forEach((e) => {
|
2949
2949
|
this._commandService.registerCommand(e);
|
2950
2950
|
});
|
2951
2951
|
}
|
2952
2952
|
onReady() {
|
2953
|
-
this._injector.get(Je), this._injector.get(Qe), this._injector.get(Ze), this._injector.get(ut), this._injector.get(
|
2953
|
+
this._injector.get(Je), this._injector.get(Qe), this._injector.get(Ze), this._injector.get(ut), this._injector.get(Ue).registerRenderModule(
|
2954
2954
|
Y.UNIVER_SHEET,
|
2955
2955
|
[Vt]
|
2956
2956
|
);
|
@@ -2965,10 +2965,10 @@ let Wn = (It = class extends Gn {
|
|
2965
2965
|
Wn = sa([
|
2966
2966
|
Kt(1, b(we)),
|
2967
2967
|
Kt(2, J),
|
2968
|
-
Kt(3,
|
2968
|
+
Kt(3, cn)
|
2969
2969
|
], Wn);
|
2970
|
-
var
|
2971
|
-
for (var i = n > 1 ? void 0 : n ?
|
2970
|
+
var da = Object.getOwnPropertyDescriptor, ca = (e, t, r, n) => {
|
2971
|
+
for (var i = n > 1 ? void 0 : n ? da(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
2972
2972
|
(a = e[o]) && (i = a(i) || i);
|
2973
2973
|
return i;
|
2974
2974
|
}, Gt = (e, t) => (r, n) => t(r, n, e);
|
@@ -2987,7 +2987,7 @@ let jn = (wt = class extends Gn {
|
|
2987
2987
|
onStarting() {
|
2988
2988
|
[
|
2989
2989
|
[_e],
|
2990
|
-
[
|
2990
|
+
[Le],
|
2991
2991
|
[ut],
|
2992
2992
|
[qe],
|
2993
2993
|
[et],
|
@@ -3001,14 +3001,14 @@ let jn = (wt = class extends Gn {
|
|
3001
3001
|
kt,
|
3002
3002
|
Mr,
|
3003
3003
|
Rn,
|
3004
|
-
|
3004
|
+
xe,
|
3005
3005
|
yr
|
3006
3006
|
].forEach((e) => {
|
3007
3007
|
this._commandService.registerCommand(e);
|
3008
3008
|
});
|
3009
3009
|
}
|
3010
3010
|
onReady() {
|
3011
|
-
this._injector.get(Je), this._injector.get(Qe), this._injector.get(
|
3011
|
+
this._injector.get(Je), this._injector.get(Qe), this._injector.get(Ue).registerRenderModule(
|
3012
3012
|
Y.UNIVER_SHEET,
|
3013
3013
|
[Vt]
|
3014
3014
|
);
|
@@ -3020,10 +3020,10 @@ let jn = (wt = class extends Gn {
|
|
3020
3020
|
this._injector.get(qe);
|
3021
3021
|
}
|
3022
3022
|
}, E(wt, "pluginName", ua), E(wt, "type", Y.UNIVER_SHEET), wt);
|
3023
|
-
jn =
|
3023
|
+
jn = ca([
|
3024
3024
|
Gt(1, b(we)),
|
3025
3025
|
Gt(2, J),
|
3026
|
-
Gt(3,
|
3026
|
+
Gt(3, cn)
|
3027
3027
|
], jn);
|
3028
3028
|
export {
|
3029
3029
|
fe as BaseSheetDataValidatorView,
|