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