@univerjs/sheets-data-validation-ui 0.5.1-nightly.202412251606 → 0.5.1-nightly.202412261606
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 +382 -376
- package/lib/umd/index.js +2 -2
- package/package.json +13 -13
package/lib/es/index.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
var $o = Object.defineProperty;
|
2
2
|
var ko = (e, t, o) => t in e ? $o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
3
3
|
var M = (e, t, o) => ko(e, typeof t != "symbol" ? t + "" : t, o);
|
4
|
-
import
|
5
|
-
import { Inject as b, LocaleService as J, Disposable as De, DataValidationErrorStyle as at, useDependency as P, ICommandService as Q, dayjs as
|
6
|
-
import { Button as je, DatePanel as aa, Scrollbar as ia, FormLayout as G, RadioGroup as
|
7
|
-
import { DeviceInputEventType as
|
8
|
-
import { SheetInterceptorService as
|
9
|
-
import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as ga, deserializeListOptions as
|
4
|
+
import qt, { useState as W, forwardRef as we, useRef as We, createElement as Re, useMemo as Te, useEffect as Ce } from "react";
|
5
|
+
import { Inject as b, LocaleService as J, Disposable as De, DataValidationErrorStyle as at, useDependency as P, ICommandService as Q, dayjs as Jt, numfmt as Qt, CellValueType as Wo, UniverInstanceType as Y, toDisposable as Ho, IUniverInstanceService as ge, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yo, DisposableCollection as Xo, CommandType as qe, BuildTextUtils as zo, DataValidationRenderMode as de, DataValidationType as Z, IConfigService as hn, UndoCommand as Ko, RedoCommand as Go, isUnitRangesEqual as Zo, debounce as qo, shallowEqual as Mn, Injector as Fe, DataValidationStatus as it, ObjectMatrix as St, Range as Jo, Rectangle as Ct, queryObjectMatrix as en, Optional as Qo, RxDisposable as pn, InterceptorEffectEnum as zn, sequenceExecute as Kn, bufferDebounceTime as ea, isFormulaString as Pe, Tools as rt, ThemeService as ta, VerticalAlign as ue, HorizontalAlign as He, DEFAULT_STYLES as le, WrapStrategy as Se, DocumentDataModel as na, DEFAULT_EMPTY_DOCUMENT_VALUE as oa, BooleanNumber as Je, Plugin as Gn } from "@univerjs/core";
|
6
|
+
import { Button as je, DatePanel as aa, Scrollbar as ia, FormLayout as G, RadioGroup as mn, Radio as Ae, Checkbox as Pt, Input as xe, Select as tn, DraggableList as ra } from "@univerjs/design";
|
7
|
+
import { DeviceInputEventType as nn, IRenderManagerService as Ve, fixLineWidthByScale as bn, Transform as sa, CheckboxShape as la, CURSOR_TYPE as Ye, FontCache as da, Shape as ca, Rect as Zn, getFontStyleString as Ft, getDocsSkeletonPageSize as Qe, DocumentViewModel as ua, DocumentSkeleton as ha, Documents as pa } from "@univerjs/engine-render";
|
8
|
+
import { SheetInterceptorService as fn, AFTER_CELL_EDIT_ASYNC as ma, SetRangeValuesCommand as gn, SheetsSelectionsService as qn, getSheetCommandTarget as Jn, WorkbookEditablePermission as It, RangeProtectionPermissionEditPoint as wt, WorksheetEditPermission as Rt, checkRangesEditablePermission as fa, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as Qn, InterceptCellContentPriority as eo } from "@univerjs/sheets";
|
9
|
+
import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as ga, deserializeListOptions as to, serializeListOptions as no, UpdateSheetDataValidationRangeCommand as oo, UpdateSheetDataValidationSettingCommand as En, RemoveSheetDataValidationCommand as ao, UpdateSheetDataValidationOptionsCommand as va, createDefaultNewRule as io, AddSheetDataValidationCommand as vn, RemoveSheetAllDataValidationCommand as _a, DATA_VALIDATION_PLUGIN_NAME as ro, getDataValidationDiffMutations as an, DataValidationCacheService as so, DataValidationFormulaController as Sa, DataValidationFormulaService as Ca, getFormulaResult as Nt, isLegalFormulaResult as On, transformCheckboxValue as Ia, CHECKBOX_FORMULA_1 as wa, CHECKBOX_FORMULA_2 as Ra } from "@univerjs/sheets-data-validation";
|
10
10
|
import { getPatternType as Da } from "@univerjs/sheets-numfmt";
|
11
|
-
import { SetCellEditVisibleOperation as
|
12
|
-
import { IDialogService as xa, KeyCode as
|
13
|
-
import { DataValidatorRegistryService as ye, DataValidationModel as
|
11
|
+
import { SetCellEditVisibleOperation as lo, SheetCanvasPopManagerService as Va, IEditorBridgeService as co, SheetPermissionInterceptorBaseController as uo, IMarkSelectionService as ya, HoverManagerService as Ma, CellAlertManagerService as ba, CellAlertType as Ea, IAutoFillService as Oa, APPLY_TYPE as et, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Pa, COPY_TYPE as Pn, rangeToDiscreteRange as La, PREDEFINED_HOOK_NAME as dt, getRepeatRange as Ln, ISheetClipboardService as Ta, getCurrentRangeDisable$ as Aa, AutoHeightController as ho, SheetSkeletonManagerService as Dt } from "@univerjs/sheets-ui";
|
12
|
+
import { IDialogService as xa, KeyCode as sn, ISidebarService as po, useObservable as Ne, ComponentManager as Lt, IZenZoneService as mo, RectPopup as ja, useEvent as fo, useSidebarClick as _n, MenuItemType as Sn, getMenuHiddenObservable as Fa, RibbonStartGroup as Na, IMenuManagerService as Ua } from "@univerjs/ui";
|
13
|
+
import { DataValidatorRegistryService as ye, DataValidationModel as Tt, DataValidatorRegistryScope as Ba, TWO_FORMULA_OPERATOR_COUNT as $a, getRuleOptions as Tn, getRuleSetting as An } from "@univerjs/data-validation";
|
14
14
|
import { RichTextEditingMutation as ka } from "@univerjs/docs";
|
15
|
-
import { filter as
|
16
|
-
import { deserializeRangeWithSheet as Ya, serializeRange as
|
17
|
-
import { RangeSelector as Xa, FormulaEditor as
|
18
|
-
var
|
15
|
+
import { filter as Cn, BehaviorSubject as xn, distinctUntilChanged as Wa, Subject as Ha, debounceTime as In, bufferTime as go } from "rxjs";
|
16
|
+
import { deserializeRangeWithSheet as Ya, serializeRange as vo } from "@univerjs/engine-formula";
|
17
|
+
import { RangeSelector as Xa, FormulaEditor as _o } from "@univerjs/sheets-formula-ui";
|
18
|
+
var Ut = { exports: {} }, tt = {};
|
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
|
28
|
+
var jn;
|
29
29
|
function za() {
|
30
|
-
if (
|
31
|
-
|
32
|
-
var e =
|
30
|
+
if (jn) return tt;
|
31
|
+
jn = 1;
|
32
|
+
var e = qt, 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);
|
@@ -39,16 +39,16 @@ function za() {
|
|
39
39
|
}
|
40
40
|
return tt.Fragment = o, tt.jsx = r, tt.jsxs = r, tt;
|
41
41
|
}
|
42
|
-
var
|
42
|
+
var Fn;
|
43
43
|
function Ka() {
|
44
|
-
return
|
44
|
+
return Fn || (Fn = 1, Ut.exports = za()), Ut.exports;
|
45
45
|
}
|
46
46
|
var h = Ka(), Ga = Object.defineProperty, Za = Object.getOwnPropertyDescriptor, qa = (e, t, o, n) => {
|
47
47
|
for (var a = n > 1 ? void 0 : n ? Za(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
49
|
return n && a && Ga(t, o, a), a;
|
50
50
|
}, nt = (e, t) => (o, n) => t(o, n, e);
|
51
|
-
let
|
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
|
}
|
@@ -88,7 +88,7 @@ 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:
|
91
|
+
title: qt.createElement(
|
92
92
|
je,
|
93
93
|
{
|
94
94
|
type: "primary",
|
@@ -116,7 +116,7 @@ let rt = class extends De {
|
|
116
116
|
title: e
|
117
117
|
},
|
118
118
|
footer: {
|
119
|
-
title:
|
119
|
+
title: qt.createElement(
|
120
120
|
je,
|
121
121
|
{
|
122
122
|
type: "primary",
|
@@ -131,28 +131,28 @@ let rt = class extends De {
|
|
131
131
|
});
|
132
132
|
}
|
133
133
|
};
|
134
|
-
|
135
|
-
nt(0, b(
|
134
|
+
st = qa([
|
135
|
+
nt(0, b(fn)),
|
136
136
|
nt(1, b(oe)),
|
137
137
|
nt(2, b(ye)),
|
138
138
|
nt(3, xa),
|
139
139
|
nt(4, b(J))
|
140
|
-
],
|
141
|
-
const Ja = "univer-dv-date-dropdown", Qa = "univer-dv-date-dropdown-btns",
|
140
|
+
], st);
|
141
|
+
const Ja = "univer-dv-date-dropdown", Qa = "univer-dv-date-dropdown-btns", Nn = {
|
142
142
|
dvDateDropdown: Ja,
|
143
143
|
dvDateDropdownBtns: Qa
|
144
144
|
}, ei = (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 Jt(Qt.format("yyyy-MM-dd HH:mm:ss", Number(e)));
|
149
|
+
const t = Jt(e);
|
150
150
|
if (t.isValid())
|
151
151
|
return t;
|
152
152
|
};
|
153
153
|
function ti(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 = P(Q), u = P(
|
155
|
+
const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l, workbook: s } = t, c = P(Q), u = P(st), p = n.getCell(a, i), d = ie(n.getCellRaw(a, i)), f = ei(d), [m, _] = W(f), w = m && m.isValid() ? m : Jt(), S = P(J), R = P(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,7 +162,7 @@ function ti(e) {
|
|
162
162
|
var x, j, F;
|
163
163
|
if (!w)
|
164
164
|
return;
|
165
|
-
const L = w.format(C ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), U = (x =
|
165
|
+
const L = w.format(C ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), U = (x = Qt.parseDate(L)) == 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 = Da(E);
|
166
166
|
I.errorStyle !== at.STOP || await V.validator({
|
167
167
|
value: U,
|
168
168
|
unitId: r,
|
@@ -173,12 +173,12 @@ function ti(e) {
|
|
173
173
|
workbook: s,
|
174
174
|
interceptValue: L.replace("Z", "").replace("T", " "),
|
175
175
|
t: Wo.NUMBER
|
176
|
-
}, I) ? (o(), await c.executeCommand(
|
176
|
+
}, I) ? (o(), await c.executeCommand(lo.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,7 +201,7 @@ 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
|
aa,
|
207
207
|
{
|
@@ -214,10 +214,10 @@ function ti(e) {
|
|
214
214
|
onPanelChange: (y) => {
|
215
215
|
_(y);
|
216
216
|
},
|
217
|
-
disabledDate: (y) => !
|
217
|
+
disabledDate: (y) => !Qt.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(je, { size: "small", type: "primary", onClick: g, disabled: !w.isValid(), children: S.t("dataValidation.alert.ok") }) })
|
221
221
|
] });
|
222
222
|
}
|
223
223
|
var ce = function() {
|
@@ -237,11 +237,11 @@ var ce = function() {
|
|
237
237
|
return o;
|
238
238
|
}, Me = we(function(e, t) {
|
239
239
|
var o = e.icon, n = e.id, a = e.className, i = e.extend, r = ni(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(a || "").trim(), s = We("_".concat(ii()));
|
240
|
-
return
|
240
|
+
return So(o, "".concat(n), { defIds: o.defIds, idSuffix: s.current }, ce({ ref: t, className: l }, r), i);
|
241
241
|
});
|
242
|
-
function
|
242
|
+
function So(e, t, o, n, a) {
|
243
243
|
return Re(e.tag, ce(ce({ key: t }, oi(e, o, a)), n), (ai(e, o).children || []).map(function(i, r) {
|
244
|
-
return
|
244
|
+
return So(i, "".concat(t, "-").concat(e.tag, "-").concat(r), o, void 0, a);
|
245
245
|
}));
|
246
246
|
}
|
247
247
|
function oi(e, t, o) {
|
@@ -263,82 +263,82 @@ function ii() {
|
|
263
263
|
return Math.random().toString(36).substring(2, 8);
|
264
264
|
}
|
265
265
|
Me.displayName = "UniverIcon";
|
266
|
-
var ri = { 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" } }] },
|
266
|
+
var ri = { 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" } }] }, Co = we(function(e, t) {
|
267
267
|
return Re(Me, Object.assign({}, e, {
|
268
268
|
id: "check-mark-single",
|
269
269
|
ref: t,
|
270
270
|
icon: ri
|
271
271
|
}));
|
272
272
|
});
|
273
|
-
|
274
|
-
var si = { 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" } }] },
|
273
|
+
Co.displayName = "CheckMarkSingle";
|
274
|
+
var si = { 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" } }] }, Io = we(function(e, t) {
|
275
275
|
return Re(Me, Object.assign({}, e, {
|
276
276
|
id: "data-validation-single",
|
277
277
|
ref: t,
|
278
278
|
icon: si
|
279
279
|
}));
|
280
280
|
});
|
281
|
-
|
282
|
-
var li = { 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" } }] },
|
281
|
+
Io.displayName = "DataValidationSingle";
|
282
|
+
var li = { 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
286
|
icon: li
|
287
287
|
}));
|
288
288
|
});
|
289
|
-
|
290
|
-
var di = { 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" } }] },
|
289
|
+
wn.displayName = "DeleteSingle";
|
290
|
+
var di = { 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" } }] }, wo = we(function(e, t) {
|
291
291
|
return Re(Me, Object.assign({}, e, {
|
292
292
|
id: "increase-single",
|
293
293
|
ref: t,
|
294
294
|
icon: di
|
295
295
|
}));
|
296
296
|
});
|
297
|
-
|
298
|
-
var ci = { 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" } }] },
|
297
|
+
wo.displayName = "IncreaseSingle";
|
298
|
+
var ci = { 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" } }] }, Ro = we(function(e, t) {
|
299
299
|
return Re(Me, Object.assign({}, e, {
|
300
300
|
id: "more-down-single",
|
301
301
|
ref: t,
|
302
302
|
icon: ci
|
303
303
|
}));
|
304
304
|
});
|
305
|
-
|
306
|
-
var ui = { 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" } }] },
|
305
|
+
Ro.displayName = "MoreDownSingle";
|
306
|
+
var ui = { 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" } }] }, Do = we(function(e, t) {
|
307
307
|
return Re(Me, Object.assign({}, e, {
|
308
308
|
id: "more-up-single",
|
309
309
|
ref: t,
|
310
310
|
icon: ui
|
311
311
|
}));
|
312
312
|
});
|
313
|
-
|
314
|
-
var hi = { 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" } }] }] },
|
313
|
+
Do.displayName = "MoreUpSingle";
|
314
|
+
var hi = { 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" } }] }] }, Vo = we(function(e, t) {
|
315
315
|
return Re(Me, Object.assign({}, e, {
|
316
316
|
id: "sequence-single",
|
317
317
|
ref: t,
|
318
318
|
icon: hi
|
319
319
|
}));
|
320
320
|
});
|
321
|
-
|
321
|
+
Vo.displayName = "SequenceSingle";
|
322
322
|
var pi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, fi = (e, t, o, n) => {
|
323
323
|
for (var a = n > 1 ? void 0 : n ? mi(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
324
324
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
325
325
|
return n && a && pi(t, o, a), a;
|
326
|
-
},
|
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
|
330
|
+
M(this, "_open$", new xn(!1));
|
331
331
|
M(this, "open$", this._open$.pipe(Wa()));
|
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) => {
|
341
|
-
n.id ===
|
341
|
+
n.id === Vt && (n.visible || setTimeout(() => {
|
342
342
|
this._sidebarService.sidebarOptions$.next({ visible: !1 });
|
343
343
|
}));
|
344
344
|
}));
|
@@ -370,11 +370,11 @@ let me = class extends De {
|
|
370
370
|
}
|
371
371
|
};
|
372
372
|
me = fi([
|
373
|
-
|
374
|
-
|
373
|
+
Un(0, ge),
|
374
|
+
Un(1, po)
|
375
375
|
], me);
|
376
376
|
function gi() {
|
377
|
-
const e = P(Ie), t = Ne(e.activeDropdown$, e.activeDropdown), o = P(
|
377
|
+
const e = P(Ie), t = Ne(e.activeDropdown$, e.activeDropdown), o = P(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,7 +392,7 @@ function gi() {
|
|
392
392
|
r
|
393
393
|
);
|
394
394
|
}
|
395
|
-
const
|
395
|
+
const yo = "sheet.ui.dropdown";
|
396
396
|
var vi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, Si = (e, t, o, n) => {
|
397
397
|
for (var a = n > 1 ? void 0 : n ? _i(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);
|
@@ -445,7 +445,7 @@ let Ie = class extends De {
|
|
445
445
|
a,
|
446
446
|
i,
|
447
447
|
{
|
448
|
-
componentKey:
|
448
|
+
componentKey: yo,
|
449
449
|
onClickOutside: () => {
|
450
450
|
o && this.hideDropdown();
|
451
451
|
},
|
@@ -501,18 +501,18 @@ Ie = Si([
|
|
501
501
|
be(0, b(Va)),
|
502
502
|
be(1, ge),
|
503
503
|
be(2, b(ye)),
|
504
|
-
be(3,
|
504
|
+
be(3, mo),
|
505
505
|
be(4, Ve),
|
506
506
|
be(5, b(oe)),
|
507
|
-
be(6, b(
|
507
|
+
be(6, b(qn))
|
508
508
|
], Ie);
|
509
|
-
const
|
509
|
+
const Vt = "DataValidationPanel", Ue = {
|
510
510
|
id: "data-validation.operation.open-validation-panel",
|
511
511
|
type: qe.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(
|
515
|
+
const { ruleId: o, isAdd: n } = t, a = e.get(me), i = e.get(Tt), r = e.get(ge), l = e.get(po), s = Jn(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 && {
|
@@ -521,28 +521,28 @@ const Dt = "DataValidationPanel", Ue = {
|
|
521
521
|
rule: p
|
522
522
|
});
|
523
523
|
const d = l.open({
|
524
|
-
id:
|
524
|
+
id: Vt,
|
525
525
|
header: { title: n ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
|
526
|
-
children: { label:
|
526
|
+
children: { label: Vt },
|
527
527
|
width: 312,
|
528
528
|
onClose: () => a.close()
|
529
529
|
});
|
530
530
|
return a.setCloseDisposable(d), !0;
|
531
531
|
}
|
532
|
-
},
|
532
|
+
}, Rn = {
|
533
533
|
id: "data-validation.operation.close-validation-panel",
|
534
534
|
type: qe.OPERATION,
|
535
535
|
handler(e) {
|
536
536
|
return e.get(me).close(), !0;
|
537
537
|
}
|
538
|
-
},
|
538
|
+
}, Mo = {
|
539
539
|
id: "data-validation.operation.toggle-validation-panel",
|
540
540
|
type: qe.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(Ue.id), !0;
|
544
544
|
}
|
545
|
-
},
|
545
|
+
}, At = {
|
546
546
|
type: qe.OPERATION,
|
547
547
|
id: "sheet.operation.show-data-validation-dropdown",
|
548
548
|
handler(e, t) {
|
@@ -556,13 +556,13 @@ const Dt = "DataValidationPanel", Ue = {
|
|
556
556
|
r
|
557
557
|
), !0;
|
558
558
|
}
|
559
|
-
},
|
559
|
+
}, bo = {
|
560
560
|
type: qe.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
|
-
}, Le = "#ECECEC",
|
565
|
+
}, Le = "#ECECEC", Dn = "sheets-data-validation-ui.config", yt = {}, Ci = "univer-dv-list-dropdown", Ii = "univer-dv-list-dropdown-title", wi = "univer-dv-list-dropdown-list", Ri = "univer-dv-list-dropdown-list-container", Di = "univer-dv-list-dropdown-selected-icon", Vi = "univer-dv-list-dropdown-item-container", yi = "univer-dv-list-dropdown-item", Mi = "univer-dv-list-dropdown-split", bi = "univer-dv-list-dropdown-edit", ve = {
|
566
566
|
dvListDropdown: Ci,
|
567
567
|
dvListDropdownTitle: Ii,
|
568
568
|
dvListDropdownList: wi,
|
@@ -574,11 +574,11 @@ const Dt = "DataValidationPanel", Ue = {
|
|
574
574
|
dvListDropdownEdit: bi
|
575
575
|
}, Ei = (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 = P(J), p = P(
|
577
|
+
const { value: t, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: l, filter: s, location: c } = e, u = P(J), p = P(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 = P(uo), V = Te(() => I.permissionCheckWithRanges(
|
578
578
|
{
|
579
|
-
workbookTypes: [
|
580
|
-
rangeTypes: [
|
581
|
-
worksheetTypes: [
|
579
|
+
workbookTypes: [It],
|
580
|
+
rangeTypes: [wt],
|
581
|
+
worksheetTypes: [Rt]
|
582
582
|
},
|
583
583
|
[{ startColumn: m, startRow: f, endColumn: m, endRow: f }],
|
584
584
|
_,
|
@@ -601,7 +601,7 @@ const Dt = "DataValidationPanel", Ue = {
|
|
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: L ? /* @__PURE__ */ h.jsx(
|
604
|
+
/* @__PURE__ */ h.jsx("div", { className: ve.dvListDropdownSelectedIcon, children: L ? /* @__PURE__ */ h.jsx(Co, {}) : null })
|
605
605
|
] }, y);
|
606
606
|
}) }) }, s) }),
|
607
607
|
R && V ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
@@ -612,7 +612,7 @@ const Dt = "DataValidationPanel", Ue = {
|
|
612
612
|
};
|
613
613
|
function Oi(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 = P(
|
615
|
+
const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = P(Tt), [c, u] = W(""), p = P(Q), d = P(J), [f, m] = W(""), _ = P(co), w = P(ge), S = Te(() => s.ruleChange$.pipe(In(16)), []), R = P(oe);
|
616
616
|
Ne(S);
|
617
617
|
const I = ja.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(() => {
|
@@ -640,7 +640,7 @@ function Oi(e) {
|
|
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
641
|
if (!v || !C || !g || g.id.indexOf(Z.LIST) !== 0)
|
642
642
|
return;
|
643
|
-
const L = C.type === Z.LIST_MULTIPLE, U = g.getListWithColor(C, r, l), T = f || ga(n.getCellRaw(a, i)), E =
|
643
|
+
const L = C.type === Z.LIST_MULTIPLE, U = g.getListWithColor(C, r, l), T = f || ga(n.getCellRaw(a, i)), E = to(T), A = () => {
|
644
644
|
p.executeCommand(Ue.id, {
|
645
645
|
ruleId: C.uid
|
646
646
|
}), o();
|
@@ -657,7 +657,7 @@ function Oi(e) {
|
|
657
657
|
value: E,
|
658
658
|
multiple: L,
|
659
659
|
onChange: async (k) => {
|
660
|
-
const z =
|
660
|
+
const z = no(k), q = {
|
661
661
|
unitId: r,
|
662
662
|
subUnitId: l,
|
663
663
|
range: {
|
@@ -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(z), L || o(), _.isVisible().visible && await p.executeCommand(
|
681
|
+
}), m(z), L || o(), _.isVisible().visible && await p.executeCommand(lo.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,17 +692,17 @@ function Oi(e) {
|
|
692
692
|
}
|
693
693
|
);
|
694
694
|
}
|
695
|
-
const Pi = "univer-data-validation-options-button", Li = "univer-data-validation-options-button-icon",
|
695
|
+
const Pi = "univer-data-validation-options-button", Li = "univer-data-validation-options-button-icon", Bt = {
|
696
696
|
dataValidationOptionsButton: Pi,
|
697
697
|
dataValidationOptionsButtonIcon: Li
|
698
698
|
};
|
699
699
|
function Ti(e) {
|
700
700
|
var c;
|
701
|
-
const t = P(J), o = P(
|
701
|
+
const t = P(J), o = P(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: Bt.dataValidationOptionsButton, onClick: () => l(!r), children: [
|
704
704
|
t.t("dataValidation.panel.options"),
|
705
|
-
r ? /* @__PURE__ */ h.jsx(
|
705
|
+
r ? /* @__PURE__ */ h.jsx(Do, { className: Bt.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ h.jsx(Ro, { className: Bt.dataValidationOptionsButtonIcon })
|
706
706
|
] }),
|
707
707
|
r && /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
708
708
|
s ? /* @__PURE__ */ h.jsx(s, { value: n, onChange: a }) : null,
|
@@ -711,7 +711,7 @@ function Ti(e) {
|
|
711
711
|
{
|
712
712
|
label: t.t("dataValidation.panel.invalid"),
|
713
713
|
children: /* @__PURE__ */ h.jsxs(
|
714
|
-
|
714
|
+
mn,
|
715
715
|
{
|
716
716
|
value: `${(c = n.errorStyle) != null ? c : at.WARNING}`,
|
717
717
|
onChange: (u) => a({ ...n, errorStyle: +u }),
|
@@ -728,7 +728,7 @@ function Ti(e) {
|
|
728
728
|
{
|
729
729
|
label: t.t("dataValidation.panel.messageInfo"),
|
730
730
|
children: /* @__PURE__ */ h.jsx(
|
731
|
-
|
731
|
+
Pt,
|
732
732
|
{
|
733
733
|
checked: n.showErrorMessage,
|
734
734
|
onChange: () => a({
|
@@ -762,7 +762,7 @@ function Ui(e, t, o) {
|
|
762
762
|
}
|
763
763
|
function Bi() {
|
764
764
|
var se;
|
765
|
-
const [e, t] = W(0), o = P(me), n = Ne(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = P(ye), c = P(ge), u = P(
|
765
|
+
const [e, t] = W(0), o = P(me), n = Ne(o.activeRule$, o.activeRule), { unitId: a, subUnitId: i, rule: r } = n || {}, l = r.uid, s = P(ye), c = P(ge), u = P(Lt), p = P(Q), d = P(Tt), f = P(J), [m, _] = W(r), w = s.getValidatorItem(m.type), [S, R] = W(!1), I = s.getValidatorsByScope(Ba.SHEET), [V, C] = W(() => m.ranges.map((O) => ({ unitId: "", sheetId: "", range: O }))), g = Te(() => Ni(p), [p]), [v, y] = W(!1), L = We({}), [U, T] = W(!1), E = P(qn);
|
766
766
|
if (Ce(() => () => {
|
767
767
|
const O = E.getCurrentLastSelection();
|
768
768
|
O && E.setSelections([O]);
|
@@ -777,7 +777,7 @@ function Bi() {
|
|
777
777
|
return null;
|
778
778
|
const A = w.operators, x = w.operatorNames, j = m.operator ? $a.includes(m.operator) : !1, F = () => {
|
779
779
|
!m.ranges.length || v || (w.validatorFormula(m, a, i).success ? o.setActiveRule(null) : R(!0));
|
780
|
-
}, H =
|
780
|
+
}, H = fo((O) => {
|
781
781
|
const D = O.split(",").map(Ya).map(($) => {
|
782
782
|
const _e = $.sheetName;
|
783
783
|
if (_e) {
|
@@ -804,9 +804,9 @@ function Bi() {
|
|
804
804
|
ruleId: l,
|
805
805
|
ranges: N
|
806
806
|
};
|
807
|
-
g(
|
807
|
+
g(oo.id, B);
|
808
808
|
}), X = (O) => {
|
809
|
-
if (
|
809
|
+
if (Mn(O, An(m)))
|
810
810
|
return;
|
811
811
|
_({
|
812
812
|
...m,
|
@@ -819,12 +819,12 @@ 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(ao.id, {
|
828
828
|
ruleId: l,
|
829
829
|
unitId: a,
|
830
830
|
subUnitId: i
|
@@ -849,14 +849,14 @@ 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 = Te(() => V.map((O) =>
|
859
|
-
|
858
|
+
}, ee = u.get(w.formulaInput), te = Te(() => V.map((O) => vo(O.range)).join(","), []), re = Tn(m), ae = (O) => {
|
859
|
+
Mn(O, Tn(m)) || (_({
|
860
860
|
...m,
|
861
861
|
...O
|
862
862
|
}), g(
|
@@ -869,7 +869,7 @@ function Bi() {
|
|
869
869
|
}
|
870
870
|
));
|
871
871
|
};
|
872
|
-
return
|
872
|
+
return _n((O) => {
|
873
873
|
var N;
|
874
874
|
const D = (N = L.current) == null ? void 0 : N.handleOutClick;
|
875
875
|
D && D(O, () => T(!1));
|
@@ -895,7 +895,7 @@ function Bi() {
|
|
895
895
|
}
|
896
896
|
),
|
897
897
|
/* @__PURE__ */ h.jsx(G, { label: f.t("dataValidation.panel.type"), children: /* @__PURE__ */ h.jsx(
|
898
|
-
|
898
|
+
tn,
|
899
899
|
{
|
900
900
|
options: I == null ? void 0 : I.map((O) => ({
|
901
901
|
label: f.t(O.title),
|
@@ -907,7 +907,7 @@ function Bi() {
|
|
907
907
|
}
|
908
908
|
) }),
|
909
909
|
A != null && A.length ? /* @__PURE__ */ h.jsx(G, { label: f.t("dataValidation.panel.operator"), children: /* @__PURE__ */ h.jsx(
|
910
|
-
|
910
|
+
tn,
|
911
911
|
{
|
912
912
|
options: A.map((O, D) => ({
|
913
913
|
value: `${O}`,
|
@@ -946,7 +946,7 @@ function Bi() {
|
|
946
946
|
e + m.type
|
947
947
|
) : null,
|
948
948
|
/* @__PURE__ */ h.jsx(G, { children: /* @__PURE__ */ h.jsx(
|
949
|
-
|
949
|
+
Pt,
|
950
950
|
{
|
951
951
|
checked: (se = m.allowBlank) != null ? se : !0,
|
952
952
|
onChange: () => {
|
@@ -966,14 +966,14 @@ function Bi() {
|
|
966
966
|
] })
|
967
967
|
] });
|
968
968
|
}
|
969
|
-
const $i = "univer-data-validation-item-container", ki = "univer-data-validation-item-title", Wi = "univer-data-validation-item-content", Hi = "univer-data-validation-item-icon",
|
969
|
+
const $i = "univer-data-validation-item-container", ki = "univer-data-validation-item-title", Wi = "univer-data-validation-item-content", Hi = "univer-data-validation-item-icon", ct = {
|
970
970
|
dataValidationItemContainer: $i,
|
971
971
|
dataValidationItemTitle: ki,
|
972
972
|
dataValidationItemContent: Wi,
|
973
973
|
dataValidationItemIcon: Hi
|
974
974
|
}, Yi = (e) => {
|
975
975
|
const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = P(ye), l = P(Q), s = P(ya), c = r.getValidatorItem(t.type), u = We(), [p, d] = W(!1), f = (m) => {
|
976
|
-
l.executeCommand(
|
976
|
+
l.executeCommand(ao.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,13 +1009,13 @@ 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) => vo(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
|
-
}, Xi = "univer-data-validation-list", zi = "univer-data-validation-list-buttons", Ki = "univer-data-validation-list-button",
|
1018
|
+
}, Xi = "univer-data-validation-list", zi = "univer-data-validation-list-buttons", Ki = "univer-data-validation-list-button", ut = {
|
1019
1019
|
dataValidationList: Xi,
|
1020
1020
|
dataValidationListButtons: zi,
|
1021
1021
|
dataValidationListButton: Ki
|
@@ -1041,12 +1041,12 @@ function Zi(e) {
|
|
1041
1041
|
};
|
1042
1042
|
}, [p, d, t]);
|
1043
1043
|
const f = async () => {
|
1044
|
-
const R =
|
1044
|
+
const R = io(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
|
@@ -1060,7 +1060,7 @@ function Zi(e) {
|
|
1060
1060
|
const I = o.getCurrentUnitForType(Y.UNIVER_SHEET), V = I.getActiveSheet(), C = I.getUnitId(), g = V.getSheetId();
|
1061
1061
|
return R.map((y) => fa(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(
|
@@ -1081,27 +1081,27 @@ function Zi(e) {
|
|
1081
1081
|
R.uid
|
1082
1082
|
);
|
1083
1083
|
}),
|
1084
|
-
/* @__PURE__ */ h.jsxs("div", { className:
|
1085
|
-
l.length && !S ? /* @__PURE__ */ h.jsx(je, { className:
|
1086
|
-
/* @__PURE__ */ h.jsx(je, { className:
|
1084
|
+
/* @__PURE__ */ h.jsxs("div", { className: ut.dataValidationListButtons, children: [
|
1085
|
+
l.length && !S ? /* @__PURE__ */ h.jsx(je, { className: ut.dataValidationListButton, onClick: m, children: r.t("dataValidation.panel.removeAll") }) : null,
|
1086
|
+
/* @__PURE__ */ h.jsx(je, { className: ut.dataValidationListButton, type: "primary", onClick: f, children: r.t("dataValidation.panel.add") })
|
1087
1087
|
] })
|
1088
1088
|
] });
|
1089
1089
|
}
|
1090
1090
|
const qi = () => {
|
1091
1091
|
const e = P(me), t = Ne(e.activeRule$, e.activeRule);
|
1092
1092
|
return t ? /* @__PURE__ */ h.jsx(Bi, {}, t.rule.uid) : /* @__PURE__ */ h.jsx(Gi, {});
|
1093
|
-
},
|
1093
|
+
}, Vn = "data-validation.list.dropdown", Eo = "data-validation.date.dropdown", xt = {
|
1094
1094
|
type: qe.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 = Jn(t);
|
1098
1098
|
if (!o) return !1;
|
1099
|
-
const { workbook: n, worksheet: a } = o, i =
|
1099
|
+
const { workbook: n, worksheet: a } = o, i = io(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(Ue.id, {
|
1105
1105
|
ruleId: i.uid,
|
1106
1106
|
isAdd: !0
|
1107
1107
|
}), !0) : !1;
|
@@ -1112,8 +1112,8 @@ var Ji = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, er = (e, t
|
|
1112
1112
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
1113
1113
|
return n && a && Ji(t, o, a), a;
|
1114
1114
|
}, $e = (e, t) => (o, n) => t(o, n, e);
|
1115
|
-
const
|
1116
|
-
let
|
1115
|
+
const ht = "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,7 +1121,7 @@ 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);
|
@@ -1129,7 +1129,7 @@ let st = class extends De {
|
|
1129
1129
|
const a = this._dataValidationModel.getRuleByLocation(e.location.unitId, e.location.subUnitId, e.location.row, e.location.col);
|
1130
1130
|
if (!a) return;
|
1131
1131
|
if (this._dataValidationModel.validator(a, { ...e.location, workbook: o, worksheet: n }) === it.INVALID) {
|
1132
|
-
const r = this._cellAlertManagerService.currentAlert.get(
|
1132
|
+
const r = this._cellAlertManagerService.currentAlert.get(ht), l = (t = r == null ? void 0 : r.alert) == null ? void 0 : t.location;
|
1133
1133
|
if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId)
|
1134
1134
|
return;
|
1135
1135
|
const s = this._dataValidationModel.getValidator(a.type);
|
@@ -1142,33 +1142,33 @@ let st = class extends De {
|
|
1142
1142
|
location: e.location,
|
1143
1143
|
width: 200,
|
1144
1144
|
height: 74,
|
1145
|
-
key:
|
1145
|
+
key: ht
|
1146
1146
|
});
|
1147
1147
|
return;
|
1148
1148
|
}
|
1149
1149
|
}
|
1150
|
-
this._cellAlertManagerService.removeAlert(
|
1150
|
+
this._cellAlertManagerService.removeAlert(ht);
|
1151
1151
|
}));
|
1152
1152
|
}
|
1153
1153
|
_initZenService() {
|
1154
1154
|
this.disposeWithMe(this._zenZoneService.visible$.subscribe((e) => {
|
1155
|
-
e && this._cellAlertManagerService.removeAlert(
|
1155
|
+
e && this._cellAlertManagerService.removeAlert(ht);
|
1156
1156
|
}));
|
1157
1157
|
}
|
1158
1158
|
};
|
1159
|
-
|
1159
|
+
lt = er([
|
1160
1160
|
$e(0, b(Ma)),
|
1161
1161
|
$e(1, b(ba)),
|
1162
1162
|
$e(2, ge),
|
1163
1163
|
$e(3, b(J)),
|
1164
|
-
$e(4,
|
1164
|
+
$e(4, mo),
|
1165
1165
|
$e(5, b(oe))
|
1166
|
-
],
|
1166
|
+
], lt);
|
1167
1167
|
var tr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, or = (e, t, o, n) => {
|
1168
1168
|
for (var a = n > 1 ? void 0 : n ? nr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
1169
1169
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
1170
1170
|
return n && a && tr(t, o, a), a;
|
1171
|
-
},
|
1171
|
+
}, $t = (e, t) => (o, n) => t(o, n, e);
|
1172
1172
|
let Xe = class extends De {
|
1173
1173
|
constructor(e, t, o) {
|
1174
1174
|
super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = o, this._initAutoFill();
|
@@ -1176,10 +1176,10 @@ let Xe = class extends De {
|
|
1176
1176
|
// eslint-disable-next-line max-lines-per-function
|
1177
1177
|
_initAutoFill() {
|
1178
1178
|
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 =
|
1179
|
+
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
1180
|
row: p.startRow,
|
1181
1181
|
col: p.startColumn
|
1182
|
-
}, _ = Pa(p, d), w = new
|
1182
|
+
}, _ = Pa(p, d), w = new St(), S = /* @__PURE__ */ new Set();
|
1183
1183
|
_.forEach((g) => {
|
1184
1184
|
const v = g.repeatStartCell, y = g.relativeRange, L = {
|
1185
1185
|
startRow: m.row,
|
@@ -1193,7 +1193,7 @@ let Xe = class extends De {
|
|
1193
1193
|
endRow: v.row
|
1194
1194
|
};
|
1195
1195
|
Jo.foreach(y, (T, E) => {
|
1196
|
-
const A =
|
1196
|
+
const A = Ct.getPositionRange(
|
1197
1197
|
{
|
1198
1198
|
startRow: T,
|
1199
1199
|
startColumn: E,
|
@@ -1201,7 +1201,7 @@ let Xe = class extends De {
|
|
1201
1201
|
endRow: T
|
1202
1202
|
},
|
1203
1203
|
L
|
1204
|
-
), { row: x, col: j } = f(A.startRow, A.startColumn), F = this._sheetDataValidationModel.getRuleIdByLocation(l, s, x, j) || "", H =
|
1204
|
+
), { row: x, col: j } = f(A.startRow, A.startColumn), F = this._sheetDataValidationModel.getRuleIdByLocation(l, s, x, j) || "", H = Ct.getPositionRange(
|
1205
1205
|
{
|
1206
1206
|
startRow: T,
|
1207
1207
|
startColumn: E,
|
@@ -1213,15 +1213,15 @@ let Xe = class extends De {
|
|
1213
1213
|
w.setValue(X, k, F), S.add(F);
|
1214
1214
|
});
|
1215
1215
|
});
|
1216
|
-
const R = Array.from(S).map((g) => ({ id: g, ranges:
|
1216
|
+
const R = Array.from(S).map((g) => ({ id: g, ranges: en(w, (v) => v === g) }));
|
1217
1217
|
c.addRangeRules(R);
|
1218
|
-
const I = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: C } =
|
1218
|
+
const I = c.diff(this._sheetDataValidationModel.getRules(l, s)), { redoMutations: V, undoMutations: C } = an(l, s, I, this._injector, "patched", a === et.ONLY_FORMAT);
|
1219
1219
|
return {
|
1220
1220
|
undos: C,
|
1221
1221
|
redos: V
|
1222
1222
|
};
|
1223
1223
|
}, o = {
|
1224
|
-
id:
|
1224
|
+
id: ro,
|
1225
1225
|
onBeforeFillData: (n) => {
|
1226
1226
|
const { source: a, unitId: i, subUnitId: r } = n;
|
1227
1227
|
for (const l of a.rows)
|
@@ -1241,15 +1241,15 @@ let Xe = class extends De {
|
|
1241
1241
|
}
|
1242
1242
|
};
|
1243
1243
|
Xe = or([
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1244
|
+
$t(0, Oa),
|
1245
|
+
$t(1, b(oe)),
|
1246
|
+
$t(2, b(Fe))
|
1247
1247
|
], Xe);
|
1248
1248
|
var ar = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, rr = (e, t, o, n) => {
|
1249
1249
|
for (var a = n > 1 ? void 0 : n ? ir(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
1250
1250
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
1251
1251
|
return n && a && ar(t, o, a), a;
|
1252
|
-
},
|
1252
|
+
}, kt = (e, t) => (o, n) => t(o, n, e);
|
1253
1253
|
let ze = class extends De {
|
1254
1254
|
constructor(t, o, n) {
|
1255
1255
|
super();
|
@@ -1258,16 +1258,16 @@ let ze = class extends De {
|
|
1258
1258
|
}
|
1259
1259
|
_initCopyPaste() {
|
1260
1260
|
this._sheetClipboardService.addClipboardHook({
|
1261
|
-
id:
|
1261
|
+
id: ro,
|
1262
1262
|
onBeforeCopy: (t, o, n) => this._collect(t, o, n),
|
1263
1263
|
onPasteCells: (t, o, n, a) => {
|
1264
|
-
const { copyType: i =
|
1264
|
+
const { copyType: i = Pn.COPY, pasteType: r } = a, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = o;
|
1265
1265
|
return this._generateMutations(s, { copyType: i, pasteType: r, copyRange: l, unitId: c, subUnitId: u });
|
1266
1266
|
}
|
1267
1267
|
});
|
1268
1268
|
}
|
1269
1269
|
_collect(t, o, n) {
|
1270
|
-
const a = new
|
1270
|
+
const a = new St();
|
1271
1271
|
this._copyInfo = {
|
1272
1272
|
unitId: t,
|
1273
1273
|
subUnitId: o,
|
@@ -1288,26 +1288,26 @@ let ze = class extends De {
|
|
1288
1288
|
_generateMutations(t, o) {
|
1289
1289
|
if (!this._copyInfo)
|
1290
1290
|
return { redos: [], undos: [] };
|
1291
|
-
if (o.copyType ===
|
1291
|
+
if (o.copyType === Pn.CUT)
|
1292
1292
|
return this._copyInfo = null, { redos: [], undos: [] };
|
1293
1293
|
if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !o.copyRange)
|
1294
1294
|
return { redos: [], undos: [] };
|
1295
1295
|
if ([
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1296
|
+
dt.SPECIAL_PASTE_COL_WIDTH,
|
1297
|
+
dt.SPECIAL_PASTE_VALUE,
|
1298
|
+
dt.SPECIAL_PASTE_FORMAT,
|
1299
|
+
dt.SPECIAL_PASTE_FORMULA
|
1300
1300
|
].includes(
|
1301
1301
|
o.pasteType
|
1302
1302
|
))
|
1303
1303
|
return { redos: [], undos: [] };
|
1304
1304
|
const { unitId: n, subUnitId: a } = this._copyInfo;
|
1305
1305
|
if (o.unitId !== n || a !== o.subUnitId) {
|
1306
|
-
const i = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), r = new
|
1306
|
+
const i = this._sheetDataValidationModel.getRuleObjectMatrix(o.unitId, o.subUnitId).clone(), r = new St(), l = /* @__PURE__ */ new Set(), { ranges: [s, c], mapFunc: u } = rn([o.copyRange, t]), p = Ln(s, c, !0), d = /* @__PURE__ */ new Map();
|
1307
1307
|
p.forEach(({ startRange: w }) => {
|
1308
1308
|
var S;
|
1309
1309
|
(S = this._copyInfo) == null || S.matrix.forValue((R, I, V) => {
|
1310
|
-
const C =
|
1310
|
+
const C = Ct.getPositionRange(
|
1311
1311
|
{
|
1312
1312
|
startRow: R,
|
1313
1313
|
endRow: R,
|
@@ -1321,9 +1321,9 @@ let ze = class extends De {
|
|
1321
1321
|
l.add(g), r.setValue(y, L, g);
|
1322
1322
|
});
|
1323
1323
|
});
|
1324
|
-
const f = Array.from(l).map((w) => ({ id: w, ranges:
|
1324
|
+
const f = Array.from(l).map((w) => ({ id: w, ranges: en(r, (S) => S === w) }));
|
1325
1325
|
i.addRangeRules(f);
|
1326
|
-
const { redoMutations: m, undoMutations: _ } =
|
1326
|
+
const { redoMutations: m, undoMutations: _ } = an(
|
1327
1327
|
o.unitId,
|
1328
1328
|
o.subUnitId,
|
1329
1329
|
i.diffWithAddition(this._sheetDataValidationModel.getRules(o.unitId, o.subUnitId), d.values()),
|
@@ -1336,11 +1336,11 @@ let ze = class extends De {
|
|
1336
1336
|
undos: _
|
1337
1337
|
};
|
1338
1338
|
} else {
|
1339
|
-
const i = this._sheetDataValidationModel.getRuleObjectMatrix(n, a).clone(), r = new
|
1340
|
-
|
1339
|
+
const i = this._sheetDataValidationModel.getRuleObjectMatrix(n, a).clone(), r = new St(), l = /* @__PURE__ */ new Set(), { ranges: [s, c], mapFunc: u } = rn([o.copyRange, t]);
|
1340
|
+
Ln(s, c, !0).forEach(({ startRange: _ }) => {
|
1341
1341
|
var w;
|
1342
1342
|
(w = this._copyInfo) == null || w.matrix.forValue((S, R, I) => {
|
1343
|
-
const V =
|
1343
|
+
const V = Ct.getPositionRange(
|
1344
1344
|
{
|
1345
1345
|
startRow: S,
|
1346
1346
|
endRow: S,
|
@@ -1352,9 +1352,9 @@ let ze = class extends De {
|
|
1352
1352
|
r.setValue(C, g, I), l.add(I);
|
1353
1353
|
});
|
1354
1354
|
});
|
1355
|
-
const d = Array.from(l).map((_) => ({ id: _, ranges:
|
1355
|
+
const d = Array.from(l).map((_) => ({ id: _, ranges: en(r, (w) => w === _) }));
|
1356
1356
|
i.addRangeRules(d);
|
1357
|
-
const { redoMutations: f, undoMutations: m } =
|
1357
|
+
const { redoMutations: f, undoMutations: m } = an(
|
1358
1358
|
n,
|
1359
1359
|
a,
|
1360
1360
|
i.diff(this._sheetDataValidationModel.getRules(n, a)),
|
@@ -1370,15 +1370,15 @@ let ze = class extends De {
|
|
1370
1370
|
}
|
1371
1371
|
};
|
1372
1372
|
ze = rr([
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1373
|
+
kt(0, Ta),
|
1374
|
+
kt(1, b(oe)),
|
1375
|
+
kt(2, b(Fe))
|
1376
1376
|
], ze);
|
1377
1377
|
var sr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, dr = (e, t, o, n) => {
|
1378
1378
|
for (var a = n > 1 ? void 0 : n ? lr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
1379
1379
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
1380
1380
|
return n && a && sr(t, o, a), a;
|
1381
|
-
},
|
1381
|
+
}, Wt = (e, t) => (o, n) => t(o, n, e);
|
1382
1382
|
let Ke = class extends De {
|
1383
1383
|
constructor(e, t, o) {
|
1384
1384
|
super(), this._localeService = e, this._commandService = t, this._sheetPermissionInterceptorBaseController = o, this._commandExecutedListener();
|
@@ -1386,47 +1386,47 @@ let Ke = class extends De {
|
|
1386
1386
|
_commandExecutedListener() {
|
1387
1387
|
this.disposeWithMe(
|
1388
1388
|
this._commandService.beforeCommandExecuted((e) => {
|
1389
|
-
e.id ===
|
1390
|
-
workbookTypes: [
|
1391
|
-
rangeTypes: [
|
1392
|
-
worksheetTypes: [
|
1393
|
-
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.setStyleErr"))), e.id ===
|
1394
|
-
workbookTypes: [
|
1395
|
-
rangeTypes: [
|
1396
|
-
worksheetTypes: [
|
1389
|
+
e.id === vn.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
1390
|
+
workbookTypes: [It],
|
1391
|
+
rangeTypes: [wt],
|
1392
|
+
worksheetTypes: [Rt, on]
|
1393
|
+
}) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.setStyleErr"))), e.id === oo.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
|
1394
|
+
workbookTypes: [It],
|
1395
|
+
rangeTypes: [wt],
|
1396
|
+
worksheetTypes: [Rt, on]
|
1397
1397
|
}, e.params.ranges) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.setStyleErr")));
|
1398
1398
|
})
|
1399
1399
|
);
|
1400
1400
|
}
|
1401
1401
|
};
|
1402
1402
|
Ke = dr([
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1403
|
+
Wt(0, b(J)),
|
1404
|
+
Wt(1, Q),
|
1405
|
+
Wt(2, b(uo))
|
1406
1406
|
], Ke);
|
1407
1407
|
const Oo = "data-validation-single", Po = "sheet.menu.data-validation";
|
1408
1408
|
function cr(e) {
|
1409
1409
|
return {
|
1410
1410
|
id: Po,
|
1411
|
-
type:
|
1411
|
+
type: Sn.SUBITEMS,
|
1412
1412
|
icon: Oo,
|
1413
1413
|
tooltip: "dataValidation.title",
|
1414
1414
|
hidden$: Fa(e, Y.UNIVER_SHEET),
|
1415
|
-
disabled$: Aa(e, { workbookTypes: [
|
1415
|
+
disabled$: Aa(e, { workbookTypes: [It], worksheetTypes: [on, Rt], rangeTypes: [wt] })
|
1416
1416
|
};
|
1417
1417
|
}
|
1418
1418
|
function ur(e) {
|
1419
1419
|
return {
|
1420
1420
|
id: Ue.id,
|
1421
1421
|
title: "dataValidation.panel.title",
|
1422
|
-
type:
|
1422
|
+
type: Sn.BUTTON
|
1423
1423
|
};
|
1424
1424
|
}
|
1425
1425
|
function hr(e) {
|
1426
1426
|
return {
|
1427
|
-
id:
|
1427
|
+
id: xt.id,
|
1428
1428
|
title: "dataValidation.panel.add",
|
1429
|
-
type:
|
1429
|
+
type: Sn.BUTTON
|
1430
1430
|
};
|
1431
1431
|
}
|
1432
1432
|
const pr = {
|
@@ -1438,7 +1438,7 @@ const pr = {
|
|
1438
1438
|
order: 0,
|
1439
1439
|
menuItemFactory: ur
|
1440
1440
|
},
|
1441
|
-
[
|
1441
|
+
[xt.id]: {
|
1442
1442
|
order: 1,
|
1443
1443
|
menuItemFactory: hr
|
1444
1444
|
}
|
@@ -1456,7 +1456,7 @@ const To = {
|
|
1456
1456
|
color: "#fe4b4b"
|
1457
1457
|
}
|
1458
1458
|
};
|
1459
|
-
let Ge = class extends
|
1459
|
+
let Ge = class extends pn {
|
1460
1460
|
constructor(e, t, o, n, a, i, r, l, s, c, u) {
|
1461
1461
|
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
1462
|
}
|
@@ -1510,11 +1510,11 @@ let Ge = class extends hn {
|
|
1510
1510
|
_initViewModelIntercept() {
|
1511
1511
|
this.disposeWithMe(
|
1512
1512
|
this._sheetInterceptorService.intercept(
|
1513
|
-
|
1513
|
+
Qn.CELL_CONTENT,
|
1514
1514
|
{
|
1515
|
-
effect:
|
1515
|
+
effect: zn.Style,
|
1516
1516
|
// must be after numfmt
|
1517
|
-
priority:
|
1517
|
+
priority: eo.DATA_VALIDATION,
|
1518
1518
|
// eslint-disable-next-line max-lines-per-function, complexity
|
1519
1519
|
handler: (e, t, o) => {
|
1520
1520
|
var S, R, I, V, C;
|
@@ -1562,7 +1562,7 @@ let Ge = class extends hn {
|
|
1562
1562
|
},
|
1563
1563
|
interceptorAutoHeight: () => {
|
1564
1564
|
var L, U, T, E, A, x;
|
1565
|
-
const g = (U = (L = this._renderManagerService.getRenderById(i)) == null ? void 0 : L.with(
|
1565
|
+
const g = (U = (L = this._renderManagerService.getRenderById(i)) == null ? void 0 : L.with(Dt).getWorksheetSkeleton(r)) == null ? void 0 : U.skeleton;
|
1566
1566
|
if (!g)
|
1567
1567
|
return;
|
1568
1568
|
const v = g.worksheet.getMergedCell(n, a), y = {
|
@@ -1580,7 +1580,7 @@ let Ge = class extends hn {
|
|
1580
1580
|
},
|
1581
1581
|
interceptorAutoWidth: () => {
|
1582
1582
|
var L, U, T, E, A, x;
|
1583
|
-
const g = (U = (L = this._renderManagerService.getRenderById(i)) == null ? void 0 : L.with(
|
1583
|
+
const g = (U = (L = this._renderManagerService.getRenderById(i)) == null ? void 0 : L.with(Dt).getWorksheetSkeleton(r)) == null ? void 0 : U.skeleton;
|
1584
1584
|
if (!g)
|
1585
1585
|
return;
|
1586
1586
|
const v = g.worksheet.getMergedCell(n, a), y = {
|
@@ -1607,8 +1607,8 @@ let Ge = class extends hn {
|
|
1607
1607
|
this._sheetDataValidationModel.ruleChange$.pipe(
|
1608
1608
|
// patched data-validation change don't need to re-calc row height
|
1609
1609
|
// re-calc of row height will be triggered precisely by the origin command
|
1610
|
-
|
1611
|
-
|
1610
|
+
Cn((e) => e.source === "command"),
|
1611
|
+
go(16)
|
1612
1612
|
).subscribe((e) => {
|
1613
1613
|
const t = [];
|
1614
1614
|
if (e.forEach((o) => {
|
@@ -1616,7 +1616,7 @@ let Ge = class extends hn {
|
|
1616
1616
|
(n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
|
1617
1617
|
}), t.length) {
|
1618
1618
|
const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
|
1619
|
-
|
1619
|
+
Kn(o.redos, this._commandService);
|
1620
1620
|
}
|
1621
1621
|
});
|
1622
1622
|
}
|
@@ -1626,26 +1626,26 @@ Ge = Lo([
|
|
1626
1626
|
K(1, Ua),
|
1627
1627
|
K(2, Ve),
|
1628
1628
|
K(3, ge),
|
1629
|
-
K(4, b(
|
1629
|
+
K(4, b(ho)),
|
1630
1630
|
K(5, b(Ie)),
|
1631
1631
|
K(6, b(oe)),
|
1632
1632
|
K(7, b(ye)),
|
1633
|
-
K(8, b(
|
1634
|
-
K(9, b(
|
1635
|
-
K(10, Qo(
|
1633
|
+
K(8, b(fn)),
|
1634
|
+
K(9, b(so)),
|
1635
|
+
K(10, Qo(co))
|
1636
1636
|
], Ge);
|
1637
|
-
let
|
1637
|
+
let Bn = class extends pn {
|
1638
1638
|
constructor(e, t, o, n, a, i, r) {
|
1639
1639
|
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
1640
|
}
|
1641
1641
|
_initViewModelIntercept() {
|
1642
1642
|
this.disposeWithMe(
|
1643
1643
|
this._sheetInterceptorService.intercept(
|
1644
|
-
|
1644
|
+
Qn.CELL_CONTENT,
|
1645
1645
|
{
|
1646
|
-
effect:
|
1646
|
+
effect: zn.Style,
|
1647
1647
|
// must be after numfmt
|
1648
|
-
priority:
|
1648
|
+
priority: eo.DATA_VALIDATION,
|
1649
1649
|
// eslint-disable-next-line complexity
|
1650
1650
|
handler: (e, t, o) => {
|
1651
1651
|
var w, S, R, I, V;
|
@@ -1681,7 +1681,7 @@ let Un = class extends hn {
|
|
1681
1681
|
},
|
1682
1682
|
interceptorAutoHeight: () => {
|
1683
1683
|
var y, L, U, T, E, A;
|
1684
|
-
const C = (L = (y = this._renderManagerService.getRenderById(i)) == null ? void 0 : y.with(
|
1684
|
+
const C = (L = (y = this._renderManagerService.getRenderById(i)) == null ? void 0 : y.with(Dt).getWorksheetSkeleton(r)) == null ? void 0 : L.skeleton;
|
1685
1685
|
if (!C)
|
1686
1686
|
return;
|
1687
1687
|
const g = C.worksheet.getMergedCell(n, a), v = {
|
@@ -1706,8 +1706,8 @@ let Un = class extends hn {
|
|
1706
1706
|
}
|
1707
1707
|
_initAutoHeight() {
|
1708
1708
|
this._sheetDataValidationModel.ruleChange$.pipe(
|
1709
|
-
|
1710
|
-
|
1709
|
+
Cn((e) => e.source === "command"),
|
1710
|
+
go(16)
|
1711
1711
|
).subscribe((e) => {
|
1712
1712
|
const t = [];
|
1713
1713
|
if (e.forEach((o) => {
|
@@ -1715,26 +1715,26 @@ let Un = class extends hn {
|
|
1715
1715
|
(n = o.rule) != null && n.ranges && t.push(...o.rule.ranges);
|
1716
1716
|
}), t.length) {
|
1717
1717
|
const o = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
|
1718
|
-
|
1718
|
+
Kn(o.redos, this._commandService);
|
1719
1719
|
}
|
1720
1720
|
});
|
1721
1721
|
}
|
1722
1722
|
};
|
1723
|
-
|
1723
|
+
Bn = Lo([
|
1724
1724
|
K(0, Q),
|
1725
1725
|
K(1, Ve),
|
1726
|
-
K(2, b(
|
1726
|
+
K(2, b(ho)),
|
1727
1727
|
K(3, b(ye)),
|
1728
|
-
K(4, b(
|
1728
|
+
K(4, b(fn)),
|
1729
1729
|
K(5, b(oe)),
|
1730
|
-
K(6, b(
|
1731
|
-
],
|
1730
|
+
K(6, b(so))
|
1731
|
+
], Bn);
|
1732
1732
|
var gr = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, _r = (e, t, o, n) => {
|
1733
1733
|
for (var a = n > 1 ? void 0 : n ? vr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
1734
1734
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
1735
1735
|
return n && a && gr(t, o, a), a;
|
1736
|
-
},
|
1737
|
-
let
|
1736
|
+
}, $n = (e, t) => (o, n) => t(o, n, e);
|
1737
|
+
let Mt = class extends De {
|
1738
1738
|
constructor(e, t, o) {
|
1739
1739
|
super(), this._context = e, this._sheetDataValidationModel = t, this._sheetSkeletonManagerService = o, this._initSkeletonChange();
|
1740
1740
|
}
|
@@ -1754,10 +1754,10 @@ let Vt = class extends De {
|
|
1754
1754
|
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(ea(16)).subscribe(e));
|
1755
1755
|
}
|
1756
1756
|
};
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
],
|
1757
|
+
Mt = _r([
|
1758
|
+
$n(1, b(oe)),
|
1759
|
+
$n(2, b(Dt))
|
1760
|
+
], Mt);
|
1761
1761
|
const Sr = "univer-data-validation-formula", Cr = "univer-data-validation-formula-and", Ir = "univer-data-validation-formula-list-item", wr = "univer-data-validation-formula-list-item-icon", Rr = "univer-data-validation-formula-list-item-drag", Dr = "univer-data-validation-formula-list-add", Vr = "univer-data-validation-formula-color-select", yr = "univer-data-validation-formula-color-select-panel", Mr = "univer-data-validation-formula-color-item", ne = {
|
1762
1762
|
dataValidationFormula: Sr,
|
1763
1763
|
dataValidationFormulaAnd: Cr,
|
@@ -1816,7 +1816,7 @@ function Er(e) {
|
|
1816
1816
|
const { value: t, onChange: o, showError: n, validResult: a } = e, i = P(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
1817
|
return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
1818
1818
|
/* @__PURE__ */ h.jsx(G, { children: /* @__PURE__ */ h.jsx(
|
1819
|
-
|
1819
|
+
Pt,
|
1820
1820
|
{
|
1821
1821
|
checked: s,
|
1822
1822
|
onChange: (u) => {
|
@@ -1862,12 +1862,12 @@ function Er(e) {
|
|
1862
1862
|
function Or(e) {
|
1863
1863
|
var p;
|
1864
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 = We({}), [c, u] = W(!1);
|
1865
|
-
return
|
1865
|
+
return _n((d) => {
|
1866
1866
|
var m;
|
1867
1867
|
const f = (m = s.current) == null ? void 0 : m.handleOutClick;
|
1868
1868
|
f && f(d, () => u(!1));
|
1869
1869
|
}), /* @__PURE__ */ h.jsx(
|
1870
|
-
|
1870
|
+
_o,
|
1871
1871
|
{
|
1872
1872
|
initValue: (p = n == null ? void 0 : n.formula1) != null ? p : "",
|
1873
1873
|
unitId: t,
|
@@ -1928,7 +1928,7 @@ const Lr = [
|
|
1928
1928
|
], Tr = (e) => {
|
1929
1929
|
const { value: t, onChange: o, disabled: n } = e, [a, i] = W(!1);
|
1930
1930
|
return /* @__PURE__ */ h.jsx(
|
1931
|
-
|
1931
|
+
tn,
|
1932
1932
|
{
|
1933
1933
|
disabled: n,
|
1934
1934
|
open: a,
|
@@ -1960,10 +1960,10 @@ const Lr = [
|
|
1960
1960
|
) })
|
1961
1961
|
}
|
1962
1962
|
);
|
1963
|
-
},
|
1963
|
+
}, kn = (e) => {
|
1964
1964
|
const { item: t, commonProps: o, style: n } = e, { onItemChange: a, onItemDelete: i } = o;
|
1965
1965
|
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(
|
1966
|
+
t.isRef ? null : /* @__PURE__ */ h.jsx("div", { className: Pr(ne.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ h.jsx(Vo, {}) }),
|
1967
1967
|
/* @__PURE__ */ h.jsx(
|
1968
1968
|
Tr,
|
1969
1969
|
{
|
@@ -1983,12 +1983,12 @@ const Lr = [
|
|
1983
1983
|
}
|
1984
1984
|
}
|
1985
1985
|
),
|
1986
|
-
t.isRef ? null : /* @__PURE__ */ h.jsx("div", { className: ne.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ h.jsx(
|
1986
|
+
t.isRef ? null : /* @__PURE__ */ h.jsx("div", { className: ne.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ h.jsx(wn, { onClick: () => i(t.id) }) })
|
1987
1987
|
] });
|
1988
1988
|
};
|
1989
1989
|
function Ar(e) {
|
1990
1990
|
const { value: t, onChange: o = () => {
|
1991
|
-
}, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = We(null), [p, d] = W(() => Pe(s) ? "1" : "0"), [f, m] = W(p === "1" ? s : "="), [_, w] = W(p === "1" ? s : "="), S = P(J), R = P(ye), I = P(
|
1991
|
+
}, unitId: n, subUnitId: a, validResult: i, showError: r, ruleId: l } = e, { formula1: s = "", formula2: c = "" } = t || {}, u = We(null), [p, d] = W(() => Pe(s) ? "1" : "0"), [f, m] = W(p === "1" ? s : "="), [_, w] = W(p === "1" ? s : "="), S = P(J), R = P(ye), I = P(Tt), V = P(Sa), [C, g] = W(() => c.split(",")), v = R.getValidatorItem(Z.LIST), [y, L] = W([]), [U, T] = W(""), E = r ? i == null ? void 0 : i.formula1 : "", A = Te(() => I.ruleChange$.pipe(In(16)), []), x = Ne(A), j = fo(o);
|
1992
1992
|
Ce(() => {
|
1993
1993
|
(async () => {
|
1994
1994
|
await new Promise((B) => {
|
@@ -2004,12 +2004,12 @@ function Ar(e) {
|
|
2004
2004
|
Pe(s) && s !== _ && (m(s), w(_));
|
2005
2005
|
}, [_, s]);
|
2006
2006
|
const [F, H] = W(() => {
|
2007
|
-
const D = p !== "1" ?
|
2007
|
+
const D = p !== "1" ? to(s) : [], N = c.split(",");
|
2008
2008
|
return D.map((B, $) => ({
|
2009
2009
|
label: B,
|
2010
2010
|
color: N[$] || Le,
|
2011
2011
|
isRef: !1,
|
2012
|
-
id:
|
2012
|
+
id: rt.generateRandomId(4)
|
2013
2013
|
}));
|
2014
2014
|
}), X = (D, N, B) => {
|
2015
2015
|
const $ = F.find((_e) => _e.id === D);
|
@@ -2035,7 +2035,7 @@ function Ar(e) {
|
|
2035
2035
|
label: "",
|
2036
2036
|
color: Le,
|
2037
2037
|
isRef: !1,
|
2038
|
-
id:
|
2038
|
+
id: rt.generateRandomId(4)
|
2039
2039
|
}
|
2040
2040
|
]);
|
2041
2041
|
};
|
@@ -2054,7 +2054,7 @@ function Ar(e) {
|
|
2054
2054
|
}));
|
2055
2055
|
});
|
2056
2056
|
}), j({
|
2057
|
-
formula1:
|
2057
|
+
formula1: no(N.map((B) => B.label)),
|
2058
2058
|
formula2: N.map((B) => B.color === Le ? "" : B.color).join(",")
|
2059
2059
|
});
|
2060
2060
|
}, [F, j, p, _, C]);
|
@@ -2077,13 +2077,13 @@ function Ar(e) {
|
|
2077
2077
|
},
|
2078
2078
|
[c, j]
|
2079
2079
|
), ae = We({}), [se, O] = W(!1);
|
2080
|
-
return
|
2080
|
+
return _n((D) => {
|
2081
2081
|
var B;
|
2082
2082
|
const N = (B = ae.current) == null ? void 0 : B.handleOutClick;
|
2083
2083
|
N && N(D, () => O(!1));
|
2084
2084
|
}), /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
2085
2085
|
/* @__PURE__ */ h.jsx(G, { label: S.t("dataValidation.list.options"), children: /* @__PURE__ */ h.jsxs(
|
2086
|
-
|
2086
|
+
mn,
|
2087
2087
|
{
|
2088
2088
|
value: p,
|
2089
2089
|
onChange: (D) => {
|
@@ -2100,7 +2100,7 @@ function Ar(e) {
|
|
2100
2100
|
) }),
|
2101
2101
|
p === "1" ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
2102
2102
|
/* @__PURE__ */ h.jsx(
|
2103
|
-
|
2103
|
+
_o,
|
2104
2104
|
{
|
2105
2105
|
initValue: f,
|
2106
2106
|
unitId: n,
|
@@ -2116,7 +2116,7 @@ function Ar(e) {
|
|
2116
2116
|
isSupportAcrossSheet: !0
|
2117
2117
|
}
|
2118
2118
|
),
|
2119
|
-
/* @__PURE__ */ h.jsx("div", { ref: u, style: { marginTop: "12px" }, children: q.map((D) => /* @__PURE__ */ h.jsx(
|
2119
|
+
/* @__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)) })
|
2120
2120
|
] }) : /* @__PURE__ */ h.jsx(G, { error: E, children: /* @__PURE__ */ h.jsxs("div", { ref: u, style: { marginTop: "-12px" }, children: [
|
2121
2121
|
/* @__PURE__ */ h.jsx(
|
2122
2122
|
ra,
|
@@ -2127,7 +2127,7 @@ function Ar(e) {
|
|
2127
2127
|
margin: [0, 12],
|
2128
2128
|
draggableHandle: ".draggableHandle",
|
2129
2129
|
itemRender: (D) => /* @__PURE__ */ h.jsx(
|
2130
|
-
|
2130
|
+
kn,
|
2131
2131
|
{
|
2132
2132
|
item: D,
|
2133
2133
|
commonProps: {
|
@@ -2141,23 +2141,23 @@ function Ar(e) {
|
|
2141
2141
|
}
|
2142
2142
|
),
|
2143
2143
|
/* @__PURE__ */ h.jsxs("a", { className: ne.dataValidationFormulaListAdd, onClick: te, children: [
|
2144
|
-
/* @__PURE__ */ h.jsx(
|
2144
|
+
/* @__PURE__ */ h.jsx(wo, {}),
|
2145
2145
|
S.t("dataValidation.list.add")
|
2146
2146
|
] })
|
2147
2147
|
] }) })
|
2148
2148
|
] });
|
2149
2149
|
}
|
2150
|
-
const xo = "data-validation.custom-formula-input",
|
2150
|
+
const xo = "data-validation.custom-formula-input", jt = "data-validation.formula-input", yn = "data-validation.list-formula-input", jo = "data-validation.checkbox-formula-input", xr = [
|
2151
2151
|
[
|
2152
2152
|
xo,
|
2153
2153
|
Or
|
2154
2154
|
],
|
2155
2155
|
[
|
2156
|
-
|
2156
|
+
jt,
|
2157
2157
|
br
|
2158
2158
|
],
|
2159
2159
|
[
|
2160
|
-
|
2160
|
+
yn,
|
2161
2161
|
Ar
|
2162
2162
|
],
|
2163
2163
|
[
|
@@ -2165,22 +2165,22 @@ const xo = "data-validation.custom-formula-input", At = "data-validation.formula
|
|
2165
2165
|
Er
|
2166
2166
|
]
|
2167
2167
|
], jr = "LIST_RENDER_MODE_OPTION_INPUT";
|
2168
|
-
function
|
2168
|
+
function bt(e) {
|
2169
2169
|
var a;
|
2170
2170
|
const { value: t, onChange: o } = e, n = P(J);
|
2171
|
-
return /* @__PURE__ */ h.jsx(G, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ h.jsxs(
|
2171
|
+
return /* @__PURE__ */ h.jsx(G, { 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: [
|
2172
2172
|
/* @__PURE__ */ h.jsx(Ae, { value: `${de.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
|
2173
2173
|
/* @__PURE__ */ h.jsx(Ae, { value: `${de.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
|
2174
2174
|
/* @__PURE__ */ h.jsx(Ae, { value: `${de.TEXT}`, children: n.t("dataValidation.renderMode.text") })
|
2175
2175
|
] }) });
|
2176
2176
|
}
|
2177
|
-
|
2177
|
+
bt.componentKey = jr;
|
2178
2178
|
const Fr = "DATE_SHOW_TIME_OPTION";
|
2179
|
-
function
|
2179
|
+
function Et(e) {
|
2180
2180
|
var a;
|
2181
2181
|
const { value: t, onChange: o } = e, n = P(J);
|
2182
2182
|
return /* @__PURE__ */ h.jsx(G, { children: /* @__PURE__ */ h.jsx(
|
2183
|
-
|
2183
|
+
Pt,
|
2184
2184
|
{
|
2185
2185
|
checked: (a = t.bizInfo) == null ? void 0 : a.showTime,
|
2186
2186
|
onChange: (i) => {
|
@@ -2196,20 +2196,20 @@ function Mt(e) {
|
|
2196
2196
|
}
|
2197
2197
|
) });
|
2198
2198
|
}
|
2199
|
-
|
2199
|
+
Et.componentKey = Fr;
|
2200
2200
|
var Nr = Object.defineProperty, Ur = Object.getOwnPropertyDescriptor, Br = (e, t, o, n) => {
|
2201
2201
|
for (var a = n > 1 ? void 0 : n ? Ur(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
2202
2202
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
2203
2203
|
return n && a && Nr(t, o, a), a;
|
2204
2204
|
}, ot = (e, t) => (o, n) => t(o, n, e);
|
2205
|
-
const
|
2206
|
-
let
|
2205
|
+
const pt = 6;
|
2206
|
+
let ln = class {
|
2207
2207
|
constructor(e, t, o, n, a) {
|
2208
2208
|
this._commandService = e, this._formulaService = t, this._themeService = o, this._renderManagerService = n, this._dataValidationModel = a;
|
2209
2209
|
}
|
2210
2210
|
_calc(e, t) {
|
2211
2211
|
var c, u, p;
|
2212
|
-
const { vt: o, ht: n } = t || {}, a = e.endX - e.startX -
|
2212
|
+
const { vt: o, ht: n } = t || {}, a = e.endX - e.startX - pt * 2, i = e.endY - e.startY, r = ((c = t == null ? void 0 : t.fs) != null ? c : 10) * 1.6;
|
2213
2213
|
let l = 0, s = 0;
|
2214
2214
|
switch (o) {
|
2215
2215
|
case ue.TOP:
|
@@ -2224,13 +2224,13 @@ let sn = class {
|
|
2224
2224
|
}
|
2225
2225
|
switch (n) {
|
2226
2226
|
case He.LEFT:
|
2227
|
-
l =
|
2227
|
+
l = pt;
|
2228
2228
|
break;
|
2229
2229
|
case He.RIGHT:
|
2230
|
-
l =
|
2230
|
+
l = pt + (a - r);
|
2231
2231
|
break;
|
2232
2232
|
default:
|
2233
|
-
l =
|
2233
|
+
l = pt + (a - r) / 2;
|
2234
2234
|
break;
|
2235
2235
|
}
|
2236
2236
|
return {
|
@@ -2252,9 +2252,9 @@ let sn = class {
|
|
2252
2252
|
}
|
2253
2253
|
async _parseFormula(e, t, o) {
|
2254
2254
|
var c, u, p, d, f, m, _, w, S;
|
2255
|
-
const { formula1: n = wa, formula2: a = Ra } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r =
|
2255
|
+
const { formula1: n = wa, formula2: a = Ra } = e, i = await this._formulaService.getRuleFormulaResult(t, o, e.uid), r = Nt((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 = Nt((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
2256
|
return {
|
2257
|
-
formula1: Pe(n) ?
|
2257
|
+
formula1: Pe(n) ? Nt((S = (w = (_ = i == null ? void 0 : i[0]) == null ? void 0 : _.result) == null ? void 0 : w[0]) == null ? void 0 : S[0]) : n,
|
2258
2258
|
formula2: Pe(a) ? l : a,
|
2259
2259
|
isFormulaValid: s
|
2260
2260
|
};
|
@@ -2270,7 +2270,7 @@ let sn = class {
|
|
2270
2270
|
const f = this._themeService.getCurrentTheme();
|
2271
2271
|
if (!((E = d.skipDefaultFontRender) != null && E.call(d, p, u, { unitId: a, subUnitId: i, row: l, column: s })))
|
2272
2272
|
return;
|
2273
|
-
const m = d.parseFormulaSync(p, a, i), { formula1: _ } = m, w = this._calc(c, o), { a: S, d: R } = e.getTransform(), I =
|
2273
|
+
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 = sa.create().composeMatrix({
|
2274
2274
|
left: I,
|
2275
2275
|
top: V,
|
2276
2276
|
scaleX: 1,
|
@@ -2319,7 +2319,7 @@ let sn = class {
|
|
2319
2319
|
}
|
2320
2320
|
};
|
2321
2321
|
this._commandService.executeCommand(
|
2322
|
-
|
2322
|
+
gn.id,
|
2323
2323
|
f
|
2324
2324
|
);
|
2325
2325
|
}
|
@@ -2332,13 +2332,13 @@ let sn = class {
|
|
2332
2332
|
(n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Ye.DEFAULT);
|
2333
2333
|
}
|
2334
2334
|
};
|
2335
|
-
|
2335
|
+
ln = Br([
|
2336
2336
|
ot(0, Q),
|
2337
2337
|
ot(1, b(Ca)),
|
2338
2338
|
ot(2, b(ta)),
|
2339
2339
|
ot(3, b(Ve)),
|
2340
2340
|
ot(4, b(oe))
|
2341
|
-
],
|
2341
|
+
], ln);
|
2342
2342
|
var $r = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, Wr = (e, t, o, n) => {
|
2343
2343
|
for (var a = n > 1 ? void 0 : n ? kr(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
2344
2344
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
@@ -2349,7 +2349,7 @@ let fe = class {
|
|
2349
2349
|
M(this, "canvasRender", null);
|
2350
2350
|
M(this, "dropdown");
|
2351
2351
|
M(this, "optionsInput");
|
2352
|
-
M(this, "formulaInput",
|
2352
|
+
M(this, "formulaInput", yn);
|
2353
2353
|
this.injector = e;
|
2354
2354
|
}
|
2355
2355
|
};
|
@@ -2360,7 +2360,7 @@ class Yr extends fe {
|
|
2360
2360
|
constructor() {
|
2361
2361
|
super(...arguments);
|
2362
2362
|
M(this, "id", Z.CHECKBOX);
|
2363
|
-
M(this, "canvasRender", this.injector.createInstance(
|
2363
|
+
M(this, "canvasRender", this.injector.createInstance(ln));
|
2364
2364
|
M(this, "formulaInput", jo);
|
2365
2365
|
}
|
2366
2366
|
}
|
@@ -2377,7 +2377,7 @@ class Kr extends fe {
|
|
2377
2377
|
super(...arguments);
|
2378
2378
|
M(this, "id", Z.DATE);
|
2379
2379
|
M(this, "formulaInput", zr);
|
2380
|
-
M(this, "optionsInput",
|
2380
|
+
M(this, "optionsInput", Et.componentKey);
|
2381
2381
|
M(this, "dropdown", Eo);
|
2382
2382
|
}
|
2383
2383
|
}
|
@@ -2385,10 +2385,10 @@ class Gr extends fe {
|
|
2385
2385
|
constructor() {
|
2386
2386
|
super(...arguments);
|
2387
2387
|
M(this, "id", Z.DECIMAL);
|
2388
|
-
M(this, "formulaInput",
|
2388
|
+
M(this, "formulaInput", jt);
|
2389
2389
|
}
|
2390
2390
|
}
|
2391
|
-
const Fo = 4, Zr = 0,
|
2391
|
+
const Fo = 4, Zr = 0, Ht = 4, No = 4, dn = 6, Ot = 6, Oe = 14;
|
2392
2392
|
function qr(e, t) {
|
2393
2393
|
const o = da.getTextSize(e, t), n = o.width + Fo * 2, { ba: a, bd: i } = o, r = a + i;
|
2394
2394
|
return {
|
@@ -2397,8 +2397,8 @@ function qr(e, t) {
|
|
2397
2397
|
ba: a
|
2398
2398
|
};
|
2399
2399
|
}
|
2400
|
-
function
|
2401
|
-
const a = Oe +
|
2400
|
+
function Yt(e, t, o, n) {
|
2401
|
+
const a = Oe + dn * 2, i = o - a, r = n - Ot * 2, l = e.map((d) => ({
|
2402
2402
|
layout: qr(d, t),
|
2403
2403
|
text: d
|
2404
2404
|
}));
|
@@ -2406,7 +2406,7 @@ function Wt(e, t, o, n) {
|
|
2406
2406
|
const c = [];
|
2407
2407
|
l.forEach((d) => {
|
2408
2408
|
const { layout: f } = d, { width: m, height: _ } = f;
|
2409
|
-
!s || s.width + m +
|
2409
|
+
!s || s.width + m + Ht > i ? (s = {
|
2410
2410
|
width: m,
|
2411
2411
|
height: _,
|
2412
2412
|
items: [{
|
@@ -2415,8 +2415,8 @@ function Wt(e, t, o, n) {
|
|
2415
2415
|
}]
|
2416
2416
|
}, c.push(s)) : (s.items.push({
|
2417
2417
|
...d,
|
2418
|
-
left: s.width +
|
2419
|
-
}), s.width = s.width + m +
|
2418
|
+
left: s.width + Ht
|
2419
|
+
}), s.width = s.width + m + Ht);
|
2420
2420
|
});
|
2421
2421
|
let u = 0, p = 0;
|
2422
2422
|
return c.forEach((d, f) => {
|
@@ -2426,7 +2426,7 @@ function Wt(e, t, o, n) {
|
|
2426
2426
|
totalHeight: u,
|
2427
2427
|
contentWidth: i,
|
2428
2428
|
contentHeight: r,
|
2429
|
-
cellAutoHeight: u +
|
2429
|
+
cellAutoHeight: u + Ot * 2,
|
2430
2430
|
calcAutoWidth: p + a
|
2431
2431
|
};
|
2432
2432
|
}
|
@@ -2434,7 +2434,7 @@ const Jr = 8;
|
|
2434
2434
|
class Qr extends ca {
|
2435
2435
|
static drawWith(t, o) {
|
2436
2436
|
const { fontString: n, info: a, fill: i, color: r } = o, { layout: l, text: s } = a;
|
2437
|
-
t.save(),
|
2437
|
+
t.save(), Zn.drawWith(t, {
|
2438
2438
|
width: l.width,
|
2439
2439
|
height: l.height,
|
2440
2440
|
radius: Jr,
|
@@ -2446,9 +2446,9 @@ var es = Object.defineProperty, ts = Object.getOwnPropertyDescriptor, ns = (e, t
|
|
2446
2446
|
for (var a = n > 1 ? void 0 : n ? ts(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
2447
2447
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
2448
2448
|
return n && a && es(t, o, a), a;
|
2449
|
-
},
|
2449
|
+
}, Xt = (e, t) => (o, n) => t(o, n, e);
|
2450
2450
|
const os = 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");
|
2451
|
-
let
|
2451
|
+
let cn = class {
|
2452
2452
|
constructor(e, t, o) {
|
2453
2453
|
M(this, "zIndex");
|
2454
2454
|
M(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
|
@@ -2488,8 +2488,8 @@ let dn = class {
|
|
2488
2488
|
endX: u.endX - f,
|
2489
2489
|
startY: u.startY + m,
|
2490
2490
|
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", L =
|
2492
|
-
this._drawDownIcon(e, V, C, g, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, C - Oe, g), e.clip(), e.translateWithPrecision(
|
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", L = Ft(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 = Yt(x, L, C, g);
|
2492
|
+
this._drawDownIcon(e, V, C, g, E), e.save(), e.translateWithPrecision(V.startX, V.startY), e.beginPath(), e.rect(0, 0, C - Oe, g), e.clip(), e.translateWithPrecision(dn, Ot);
|
2493
2493
|
let H = 0;
|
2494
2494
|
switch (E) {
|
2495
2495
|
case ue.MIDDLE:
|
@@ -2522,8 +2522,8 @@ let dn = class {
|
|
2522
2522
|
}), e.restore(), w.set(S, {
|
2523
2523
|
left: V.startX,
|
2524
2524
|
top: V.startY,
|
2525
|
-
width: F.contentWidth +
|
2526
|
-
height: F.contentHeight +
|
2525
|
+
width: F.contentWidth + dn + Oe,
|
2526
|
+
height: F.contentHeight + Ot * 2
|
2527
2527
|
});
|
2528
2528
|
}
|
2529
2529
|
calcCellAutoHeight(e) {
|
@@ -2539,8 +2539,8 @@ let dn = class {
|
|
2539
2539
|
const m = this._dataValidationModel.getValidator(f.type);
|
2540
2540
|
if (!m)
|
2541
2541
|
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
|
2542
|
+
const _ = d.endX - d.startX, w = d.endY - d.startY, S = (C = ie(n)) != null ? C : "", R = m.parseCellValue(S), I = Ft(o != null ? o : void 0);
|
2543
|
+
return Yt(R, I, _, w).cellAutoHeight;
|
2544
2544
|
}
|
2545
2545
|
calcCellAutoWidth(e) {
|
2546
2546
|
var C;
|
@@ -2555,8 +2555,8 @@ let dn = class {
|
|
2555
2555
|
const m = this._dataValidationModel.getValidator(f.type);
|
2556
2556
|
if (!m)
|
2557
2557
|
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
|
2558
|
+
const _ = d.endX - d.startX, w = d.endY - d.startY, S = (C = ie(n)) != null ? C : "", R = m.parseCellValue(S), I = Ft(o != null ? o : void 0);
|
2559
|
+
return Yt(R, I, _, w).calcAutoWidth;
|
2560
2560
|
}
|
2561
2561
|
isHit(e, t) {
|
2562
2562
|
const { primaryWithCoord: o } = t, n = o.isMergedMainCell ? o.mergeInfo : o, { endX: a } = n, { x: i } = e;
|
@@ -2571,7 +2571,7 @@ let dn = class {
|
|
2571
2571
|
row: a,
|
2572
2572
|
column: i
|
2573
2573
|
};
|
2574
|
-
this._commandService.executeCommand(
|
2574
|
+
this._commandService.executeCommand(At.id, r);
|
2575
2575
|
}
|
2576
2576
|
onPointerEnter(e, t) {
|
2577
2577
|
var o, n;
|
@@ -2582,25 +2582,25 @@ let dn = class {
|
|
2582
2582
|
(n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Ye.DEFAULT);
|
2583
2583
|
}
|
2584
2584
|
};
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2588
|
-
|
2589
|
-
],
|
2585
|
+
cn = ns([
|
2586
|
+
Xt(0, Q),
|
2587
|
+
Xt(1, b(Ve)),
|
2588
|
+
Xt(2, b(oe))
|
2589
|
+
], cn);
|
2590
2590
|
class as extends fe {
|
2591
2591
|
constructor() {
|
2592
2592
|
super(...arguments);
|
2593
2593
|
M(this, "id", Z.LIST_MULTIPLE);
|
2594
|
-
M(this, "canvasRender", this.injector.createInstance(
|
2595
|
-
M(this, "dropdown",
|
2594
|
+
M(this, "canvasRender", this.injector.createInstance(cn));
|
2595
|
+
M(this, "dropdown", Vn);
|
2596
2596
|
}
|
2597
2597
|
}
|
2598
2598
|
var is = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, ss = (e, t, o, n) => {
|
2599
2599
|
for (var a = n > 1 ? void 0 : n ? rs(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
2600
2600
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
2601
2601
|
return n && a && is(t, o, a), a;
|
2602
|
-
},
|
2603
|
-
const Ee = 4,
|
2602
|
+
}, mt = (e, t) => (o, n) => t(o, n, e);
|
2603
|
+
const Ee = 4, ft = 4, he = 14, pe = 6, ke = 4, zt = 8, ls = "#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");
|
2604
2604
|
function ds(e, t) {
|
2605
2605
|
const o = e.length;
|
2606
2606
|
return {
|
@@ -2649,14 +2649,14 @@ function Uo(e, t, o) {
|
|
2649
2649
|
docViewModel: i
|
2650
2650
|
};
|
2651
2651
|
}
|
2652
|
-
function
|
2652
|
+
function gt(e, t, o) {
|
2653
2653
|
const {
|
2654
2654
|
documentSkeleton: n,
|
2655
2655
|
docModel: a,
|
2656
2656
|
docViewModel: i
|
2657
2657
|
} = Uo(e, t, o);
|
2658
2658
|
return {
|
2659
|
-
documents: new pa(`DOCUMENTS_${
|
2659
|
+
documents: new pa(`DOCUMENTS_${rt.generateRandomId()}`, n, {
|
2660
2660
|
pageMarginLeft: 0,
|
2661
2661
|
pageMarginTop: 0
|
2662
2662
|
}),
|
@@ -2665,7 +2665,7 @@ function ft(e, t, o) {
|
|
2665
2665
|
docViewModel: i
|
2666
2666
|
};
|
2667
2667
|
}
|
2668
|
-
function
|
2668
|
+
function Hn(e, t, o, n, a, i, r = !0) {
|
2669
2669
|
let l = 0;
|
2670
2670
|
const s = r ? ke : 0;
|
2671
2671
|
switch (a) {
|
@@ -2694,7 +2694,7 @@ function Wn(e, t, o, n, a, i, r = !0) {
|
|
2694
2694
|
paddingTop: l
|
2695
2695
|
};
|
2696
2696
|
}
|
2697
|
-
let
|
2697
|
+
let un = class {
|
2698
2698
|
constructor(e, t, o, n) {
|
2699
2699
|
M(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
|
2700
2700
|
M(this, "zIndex");
|
@@ -2712,16 +2712,16 @@ let cn = class {
|
|
2712
2712
|
let u;
|
2713
2713
|
switch (i) {
|
2714
2714
|
case ue.MIDDLE:
|
2715
|
-
u = (n -
|
2715
|
+
u = (n - ft) / 2;
|
2716
2716
|
break;
|
2717
2717
|
case ue.BOTTOM:
|
2718
|
-
u = n - s - a - ke + (a / 2 -
|
2718
|
+
u = n - s - a - ke + (a / 2 - ft / 2);
|
2719
2719
|
break;
|
2720
2720
|
default:
|
2721
|
-
u = l + ke + (a / 2 -
|
2721
|
+
u = l + ke + (a / 2 - ft / 2);
|
2722
2722
|
break;
|
2723
2723
|
}
|
2724
|
-
e.save(), e.translateWithPrecision(t.startX + c, t.startY + u), e.fillStyle = "#565656", e.fill(
|
2724
|
+
e.save(), e.translateWithPrecision(t.startX + c, t.startY + u), e.fillStyle = "#565656", e.fill(Wn), e.restore();
|
2725
2725
|
}
|
2726
2726
|
// eslint-disable-next-line max-lines-per-function, complexity
|
2727
2727
|
drawWith(e, t, o) {
|
@@ -2742,9 +2742,9 @@ let cn = class {
|
|
2742
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 : ""}`, L = g.find((x) => x.label === y);
|
2743
2743
|
let { tb: U, vt: T, ht: E, pd: A } = r || {};
|
2744
2744
|
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: z, docModel: q } =
|
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: z, docModel: q } = gt(y, this._localeService, r);
|
2746
2746
|
U === Se.WRAP && q.updateDocumentDataPageSize(Math.max(X, 1)), k.calculate(), k.getActualSize();
|
2747
|
-
const ee = Qe(k), { height: te, width: re } = ee, { paddingTop: ae, paddingLeft: se } =
|
2747
|
+
const ee = Qe(k), { height: te, width: re } = ee, { paddingTop: ae, paddingLeft: se } = Hn(X, I - j - H, re, te, T, E, !0);
|
2748
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(Ee, 0), e.beginPath(), e.rect(0, 0, X, te), e.clip(), z.render(e), e.translateWithPrecision(se, 0), e.restore(), e.restore(), V.set(C, {
|
2749
2749
|
left: S.endX + x + o.rowHeaderWidth - he,
|
2750
2750
|
top: S.startY + j + o.columnHeaderHeight,
|
@@ -2753,17 +2753,17 @@ let cn = class {
|
|
2753
2753
|
});
|
2754
2754
|
} else {
|
2755
2755
|
e.save(), e.translateWithPrecision(S.startX, S.startY), e.beginPath(), e.rect(0, 0, R, I), e.clip();
|
2756
|
-
const x = R - pe * 2 - Ee - he - 4, { documentSkeleton: j, documents: F, docModel: H } =
|
2756
|
+
const x = R - pe * 2 - Ee - he - 4, { documentSkeleton: j, documents: F, docModel: H } = gt(y, this._localeService, r);
|
2757
2757
|
U === Se.WRAP && H.updateDocumentDataPageSize(Math.max(x, 1)), j.calculate();
|
2758
|
-
const X = Qe(j), { height: k, width: z } = X, { paddingTop: q, paddingLeft: ee } =
|
2758
|
+
const X = Qe(j), { height: k, width: z } = X, { paddingTop: q, paddingLeft: ee } = Hn(x, I, z, k, T, E);
|
2759
2759
|
e.translateWithPrecision(pe, q);
|
2760
2760
|
const te = Math.max(R - pe * 2, 1), re = k;
|
2761
|
-
|
2761
|
+
Zn.drawWith(e, {
|
2762
2762
|
width: te,
|
2763
2763
|
height: re,
|
2764
2764
|
fill: (L == null ? void 0 : L.color) || Le,
|
2765
|
-
radius:
|
2766
|
-
}), e.save(), e.translateWithPrecision(Ee, 0), e.beginPath(), e.rect(0, 0, x, k), e.clip(), e.translateWithPrecision(ee, 0), F.render(e), e.restore(), e.translateWithPrecision(x + Ee + 4, (k -
|
2765
|
+
radius: zt
|
2766
|
+
}), e.save(), e.translateWithPrecision(Ee, 0), e.beginPath(), e.rect(0, 0, x, k), e.clip(), e.translateWithPrecision(ee, 0), F.render(e), e.restore(), e.translateWithPrecision(x + Ee + 4, (k - ft) / 2), e.fillStyle = ls, e.fill(Wn), e.restore(), V.set(C, {
|
2767
2767
|
left: S.startX + pe + o.rowHeaderWidth,
|
2768
2768
|
top: S.startY + q + o.columnHeaderHeight,
|
2769
2769
|
width: te,
|
@@ -2784,7 +2784,7 @@ let cn = class {
|
|
2784
2784
|
let { tb: S, pd: R } = o || {};
|
2785
2785
|
const { t: I = le.pd.t, b: V = le.pd.b } = R != null ? R : {};
|
2786
2786
|
if (S = S != null ? S : Se.WRAP, d.renderMode === de.ARROW) {
|
2787
|
-
const C = m - he, { documentSkeleton: g, docModel: v } =
|
2787
|
+
const C = m - he, { documentSkeleton: g, docModel: v } = gt(w, this._localeService, o);
|
2788
2788
|
S === Se.WRAP && v.updateDocumentDataPageSize(Math.max(C, 1)), g.calculate(), g.getActualSize();
|
2789
2789
|
const y = Qe(g), { height: L } = y;
|
2790
2790
|
return L + I + V + ke * 2;
|
@@ -2816,13 +2816,13 @@ let cn = class {
|
|
2816
2816
|
C = he + pe * 2 + V + I;
|
2817
2817
|
break;
|
2818
2818
|
case de.CUSTOM:
|
2819
|
-
C = he + pe * 2 + Ee * 2 + V + I +
|
2819
|
+
C = he + pe * 2 + Ee * 2 + V + I + zt / 2 + 1;
|
2820
2820
|
break;
|
2821
2821
|
// default is CUSTOM
|
2822
2822
|
default:
|
2823
|
-
C = he + pe * 2 + Ee * 2 + V + I +
|
2823
|
+
C = he + pe * 2 + Ee * 2 + V + I + zt / 2 + 1;
|
2824
2824
|
}
|
2825
|
-
const g = m - C, { documentSkeleton: v, docModel: y } =
|
2825
|
+
const g = m - C, { documentSkeleton: v, docModel: y } = gt(w, this._localeService, o);
|
2826
2826
|
return S === Se.WRAP && y.updateDocumentDataPageSize(Math.max(g, 1)), v.calculate(), v.getActualSize(), Qe(v).width + C;
|
2827
2827
|
}
|
2828
2828
|
isHit(e, t) {
|
@@ -2841,7 +2841,7 @@ let cn = class {
|
|
2841
2841
|
row: a,
|
2842
2842
|
column: i
|
2843
2843
|
};
|
2844
|
-
this._commandService.executeCommand(
|
2844
|
+
this._commandService.executeCommand(At.id, r);
|
2845
2845
|
}
|
2846
2846
|
onPointerEnter(e, t) {
|
2847
2847
|
var o, n;
|
@@ -2852,54 +2852,54 @@ let cn = class {
|
|
2852
2852
|
(n = (o = this._renderManagerService.getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : o.mainComponent) == null || n.setCursor(Ye.DEFAULT);
|
2853
2853
|
}
|
2854
2854
|
};
|
2855
|
-
|
2856
|
-
|
2857
|
-
|
2858
|
-
|
2859
|
-
|
2860
|
-
],
|
2855
|
+
un = ss([
|
2856
|
+
mt(0, b(J)),
|
2857
|
+
mt(1, Q),
|
2858
|
+
mt(2, b(Ve)),
|
2859
|
+
mt(3, b(oe))
|
2860
|
+
], un);
|
2861
2861
|
class cs extends fe {
|
2862
2862
|
constructor() {
|
2863
2863
|
super(...arguments);
|
2864
2864
|
M(this, "id", Z.LIST);
|
2865
|
-
M(this, "canvasRender", this.injector.createInstance(
|
2866
|
-
M(this, "dropdown",
|
2867
|
-
M(this, "optionsInput",
|
2868
|
-
M(this, "formulaInput",
|
2865
|
+
M(this, "canvasRender", this.injector.createInstance(un));
|
2866
|
+
M(this, "dropdown", Vn);
|
2867
|
+
M(this, "optionsInput", bt.componentKey);
|
2868
|
+
M(this, "formulaInput", yn);
|
2869
2869
|
}
|
2870
2870
|
}
|
2871
2871
|
class us extends fe {
|
2872
2872
|
constructor() {
|
2873
2873
|
super(...arguments);
|
2874
2874
|
M(this, "id", Z.TEXT_LENGTH);
|
2875
|
-
M(this, "formulaInput",
|
2875
|
+
M(this, "formulaInput", jt);
|
2876
2876
|
}
|
2877
2877
|
}
|
2878
2878
|
class hs extends fe {
|
2879
2879
|
constructor() {
|
2880
2880
|
super(...arguments);
|
2881
2881
|
M(this, "id", Z.WHOLE);
|
2882
|
-
M(this, "formulaInput",
|
2882
|
+
M(this, "formulaInput", jt);
|
2883
2883
|
}
|
2884
2884
|
}
|
2885
2885
|
var ps = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, fs = (e, t, o, n) => {
|
2886
2886
|
for (var a = n > 1 ? void 0 : n ? ms(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
2887
2887
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
2888
2888
|
return n && a && ps(t, o, a), a;
|
2889
|
-
},
|
2890
|
-
let Ze = class extends
|
2889
|
+
}, Kt = (e, t) => (o, n) => t(o, n, e);
|
2890
|
+
let Ze = class extends pn {
|
2891
2891
|
constructor(e, t, o) {
|
2892
2892
|
super(), this._injector = e, this._componentManger = t, this._dataValidatorRegistryService = o, this._initComponents(), this._registerValidatorViews();
|
2893
2893
|
}
|
2894
2894
|
_initComponents() {
|
2895
2895
|
[
|
2896
|
-
[Oo,
|
2897
|
-
[
|
2898
|
-
[
|
2899
|
-
[
|
2896
|
+
[Oo, Io],
|
2897
|
+
[Vt, qi],
|
2898
|
+
[yo, gi],
|
2899
|
+
[Vn, Oi],
|
2900
2900
|
[Eo, ti],
|
2901
|
-
[
|
2902
|
-
[
|
2901
|
+
[bt.componentKey, bt],
|
2902
|
+
[Et.componentKey, Et],
|
2903
2903
|
...xr
|
2904
2904
|
].forEach(([e, t]) => {
|
2905
2905
|
this.disposeWithMe(this._componentManger.register(
|
@@ -2925,51 +2925,54 @@ let Ze = class extends hn {
|
|
2925
2925
|
}
|
2926
2926
|
};
|
2927
2927
|
Ze = fs([
|
2928
|
-
|
2929
|
-
|
2930
|
-
|
2928
|
+
Kt(0, b(Fe)),
|
2929
|
+
Kt(1, b(Lt)),
|
2930
|
+
Kt(2, b(ye))
|
2931
2931
|
], Ze);
|
2932
2932
|
var gs = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, _s = (e, t, o, n) => {
|
2933
2933
|
for (var a = n > 1 ? void 0 : n ? vs(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
2934
2934
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
2935
2935
|
return n && a && gs(t, o, a), a;
|
2936
|
-
},
|
2936
|
+
}, Gt = (e, t) => (o, n) => t(o, n, e);
|
2937
2937
|
const Ss = "SHEET_DATA_VALIDATION_UI_PLUGIN";
|
2938
|
-
var
|
2939
|
-
let
|
2940
|
-
constructor(e =
|
2938
|
+
var vt;
|
2939
|
+
let Yn = (vt = class extends Gn {
|
2940
|
+
constructor(e = yt, t, o, n) {
|
2941
2941
|
super(), this._config = e, this._injector = t, this._commandService = o, this._configService = n;
|
2942
|
-
const { menu: a, ...i } =
|
2943
|
-
|
2942
|
+
const { menu: a, ...i } = rt.deepMerge(
|
2943
|
+
yt,
|
2944
|
+
this._config
|
2945
|
+
);
|
2946
|
+
a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Dn, i);
|
2944
2947
|
}
|
2945
2948
|
onStarting() {
|
2946
2949
|
[
|
2947
2950
|
[me],
|
2948
2951
|
[Ie],
|
2949
|
-
[
|
2952
|
+
[lt],
|
2950
2953
|
[Xe],
|
2951
2954
|
[Ge],
|
2952
2955
|
[Ke],
|
2953
2956
|
[ze],
|
2954
|
-
[
|
2957
|
+
[st],
|
2955
2958
|
[Ze]
|
2956
2959
|
].forEach((e) => {
|
2957
2960
|
this._injector.add(e);
|
2958
2961
|
}), [
|
2959
|
-
|
2960
|
-
|
2961
|
-
|
2962
|
-
|
2962
|
+
xt,
|
2963
|
+
At,
|
2964
|
+
bo,
|
2965
|
+
Rn,
|
2963
2966
|
Ue,
|
2964
|
-
|
2967
|
+
Mo
|
2965
2968
|
].forEach((e) => {
|
2966
2969
|
this._commandService.registerCommand(e);
|
2967
2970
|
});
|
2968
2971
|
}
|
2969
2972
|
onReady() {
|
2970
|
-
this._injector.get(ze), this._injector.get(Ke), this._injector.get(
|
2973
|
+
this._injector.get(ze), this._injector.get(Ke), this._injector.get(st), this._injector.get(lt), this._injector.get(Ve).registerRenderModule(
|
2971
2974
|
Y.UNIVER_SHEET,
|
2972
|
-
[
|
2975
|
+
[Mt]
|
2973
2976
|
);
|
2974
2977
|
}
|
2975
2978
|
onRendered() {
|
@@ -2978,30 +2981,33 @@ let Hn = (gt = class extends Kn {
|
|
2978
2981
|
onSteady() {
|
2979
2982
|
this._injector.get(Xe);
|
2980
2983
|
}
|
2981
|
-
}, M(
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
2985
|
-
|
2986
|
-
],
|
2984
|
+
}, M(vt, "pluginName", Ss), M(vt, "type", Y.UNIVER_SHEET), vt);
|
2985
|
+
Yn = _s([
|
2986
|
+
Gt(1, b(Fe)),
|
2987
|
+
Gt(2, Q),
|
2988
|
+
Gt(3, hn)
|
2989
|
+
], Yn);
|
2987
2990
|
var Cs = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, ws = (e, t, o, n) => {
|
2988
2991
|
for (var a = n > 1 ? void 0 : n ? Is(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
2989
2992
|
(r = e[i]) && (a = (n ? r(t, o, a) : r(a)) || a);
|
2990
2993
|
return n && a && Cs(t, o, a), a;
|
2991
|
-
},
|
2994
|
+
}, Zt = (e, t) => (o, n) => t(o, n, e);
|
2992
2995
|
const Rs = "SHEET_DATA_VALIDATION_UI_PLUGIN";
|
2993
|
-
var
|
2994
|
-
let
|
2995
|
-
constructor(e =
|
2996
|
+
var _t;
|
2997
|
+
let Xn = (_t = class extends Gn {
|
2998
|
+
constructor(e = yt, t, o, n) {
|
2996
2999
|
super(), this._config = e, this._injector = t, this._commandService = o, this._configService = n;
|
2997
|
-
const { menu: a, ...i } =
|
2998
|
-
|
3000
|
+
const { menu: a, ...i } = rt.deepMerge(
|
3001
|
+
yt,
|
3002
|
+
this._config
|
3003
|
+
);
|
3004
|
+
a && this._configService.setConfig("menu", a, { merge: !0 }), this._configService.setConfig(Dn, i);
|
2999
3005
|
}
|
3000
3006
|
onStarting() {
|
3001
3007
|
[
|
3002
3008
|
[me],
|
3003
3009
|
[Ie],
|
3004
|
-
[
|
3010
|
+
[lt],
|
3005
3011
|
[Xe],
|
3006
3012
|
[Ge],
|
3007
3013
|
[Ke],
|
@@ -3010,12 +3016,12 @@ let Yn = (vt = class extends Kn {
|
|
3010
3016
|
].forEach((e) => {
|
3011
3017
|
this._injector.add(e);
|
3012
3018
|
}), [
|
3013
|
-
|
3014
|
-
|
3015
|
-
|
3016
|
-
|
3019
|
+
xt,
|
3020
|
+
At,
|
3021
|
+
bo,
|
3022
|
+
Rn,
|
3017
3023
|
Ue,
|
3018
|
-
|
3024
|
+
Mo
|
3019
3025
|
].forEach((e) => {
|
3020
3026
|
this._commandService.registerCommand(e);
|
3021
3027
|
});
|
@@ -3023,7 +3029,7 @@ let Yn = (vt = class extends Kn {
|
|
3023
3029
|
onReady() {
|
3024
3030
|
this._injector.get(ze), this._injector.get(Ke), this._injector.get(Ve).registerRenderModule(
|
3025
3031
|
Y.UNIVER_SHEET,
|
3026
|
-
[
|
3032
|
+
[Mt]
|
3027
3033
|
);
|
3028
3034
|
}
|
3029
3035
|
onRendered() {
|
@@ -3032,15 +3038,15 @@ let Yn = (vt = class extends Kn {
|
|
3032
3038
|
onSteady() {
|
3033
3039
|
this._injector.get(Xe);
|
3034
3040
|
}
|
3035
|
-
}, M(
|
3036
|
-
|
3037
|
-
|
3038
|
-
|
3039
|
-
|
3040
|
-
],
|
3041
|
+
}, M(_t, "pluginName", Rs), M(_t, "type", Y.UNIVER_SHEET), _t);
|
3042
|
+
Xn = ws([
|
3043
|
+
Zt(1, b(Fe)),
|
3044
|
+
Zt(2, Q),
|
3045
|
+
Zt(3, hn)
|
3046
|
+
], Xn);
|
3041
3047
|
export {
|
3042
3048
|
Eo as DATE_DROPDOWN_KEY,
|
3043
|
-
|
3044
|
-
|
3045
|
-
|
3049
|
+
Vn as LIST_DROPDOWN_KEY,
|
3050
|
+
Xn as UniverSheetsDataValidationMobileUIPlugin,
|
3051
|
+
Yn as UniverSheetsDataValidationUIPlugin
|
3046
3052
|
};
|