@univerjs/sheets-data-validation-ui 0.5.0-nightly.202411111606 → 0.5.0-nightly.202411121606
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 +1 -1
- package/lib/es/index.js +630 -638
- package/lib/umd/index.js +1 -1
- package/package.json +14 -14
package/lib/es/index.js
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var F = (t, e,
|
1
|
+
var ka = Object.defineProperty;
|
2
|
+
var Ba = (t, e, a) => e in t ? ka(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
3
|
+
var F = (t, e, a) => Ba(t, typeof e != "symbol" ? e + "" : e, a);
|
4
4
|
import Xe, { useState as q, forwardRef as wt, useRef as Bt, createElement as It, useMemo as Pt, useEffect as St } from "react";
|
5
|
-
import { Inject as Y, LocaleService as nt, Disposable as Dt, DataValidationErrorStyle as ee, useDependency as H, ICommandService as
|
6
|
-
import { Button as xt, DatePanel as
|
7
|
-
import { DeviceInputEventType as qe, IRenderManagerService as ie, fixLineWidthByScale as Rn, Transform as
|
8
|
-
import { SheetInterceptorService as cn, AFTER_CELL_EDIT_ASYNC as
|
9
|
-
import { SheetDataValidationModel as Rt, getCellValueOrigin as st, getDataValidationCellValue as
|
10
|
-
import { getPatternType as
|
11
|
-
import { SetCellEditVisibleOperation as
|
12
|
-
import { IDialogService as
|
13
|
-
import { DataValidatorRegistryService as yt, DataValidationModel as be, DataValidatorRegistryScope as
|
14
|
-
import { RichTextEditingMutation as
|
15
|
-
import { filter as mn, BehaviorSubject as $n, distinctUntilChanged as
|
16
|
-
import { deserializeRangeWithSheet as
|
17
|
-
import { RangeSelector as
|
18
|
-
var
|
19
|
-
function
|
5
|
+
import { Inject as Y, LocaleService as nt, Disposable as Dt, DataValidationErrorStyle as ee, useDependency as H, ICommandService as at, numfmt as ze, CellValueType as Wa, UniverInstanceType as rt, toDisposable as Ha, IUniverInstanceService as gt, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Ya, DisposableCollection as Xa, CommandType as Gt, BuildTextUtils as za, DataValidationRenderMode as dt, DataValidationType as et, IConfigService as sn, UndoCommand as Ka, RedoCommand as Ga, isUnitRangesEqual as Za, debounce as qa, shallowEqual as Dn, Injector as At, DataValidationStatus as ne, ObjectMatrix as me, Range as Ja, Rectangle as ge, queryObjectMatrix as Ke, Optional as Qa, RxDisposable as ln, InterceptorEffectEnum as Bn, sequenceExecute as Wn, bufferDebounceTime as to, isFormulaString as Et, Tools as Ge, ThemeService as eo, VerticalAlign as ut, HorizontalAlign as Wt, DEFAULT_STYLES as lt, WrapStrategy as _t, DocumentDataModel as no, DEFAULT_EMPTY_DOCUMENT_VALUE as ao, BooleanNumber as Zt, Plugin as Hn } from "@univerjs/core";
|
6
|
+
import { Button as xt, DatePanel as oo, Scrollbar as io, FormLayout as tt, RadioGroup as dn, Radio as Lt, Checkbox as Ve, Input as Tt, Select as Ze, DraggableList as ro } from "@univerjs/design";
|
7
|
+
import { DeviceInputEventType as qe, IRenderManagerService as ie, fixLineWidthByScale as Rn, Transform as so, Checkbox as lo, FontCache as co, Shape as uo, Rect as Yn, getFontStyleString as Le, getDocsSkeletonPageSize as qt, DocumentViewModel as ho, DocumentSkeleton as fo, Documents as po } from "@univerjs/engine-render";
|
8
|
+
import { SheetInterceptorService as cn, AFTER_CELL_EDIT_ASYNC as mo, SetRangeValuesCommand as un, SheetsSelectionsService as Xn, getSheetCommandTarget as zn, WorkbookEditablePermission as ve, RangeProtectionPermissionEditPoint as _e, WorksheetEditPermission as Se, checkRangesEditablePermission as go, WorksheetSetCellStylePermission as Je, INTERCEPTOR_POINT as Kn, InterceptCellContentPriority as Gn } from "@univerjs/sheets";
|
9
|
+
import { SheetDataValidationModel as Rt, getCellValueOrigin as st, getDataValidationCellValue as vo, deserializeListOptions as Zn, serializeListOptions as qn, UpdateSheetDataValidationRangeCommand as Jn, UpdateSheetDataValidationSettingCommand as yn, RemoveSheetDataValidationCommand as Qn, UpdateSheetDataValidationOptionsCommand as _o, createDefaultNewRule as ta, AddSheetDataValidationCommand as hn, RemoveSheetAllDataValidationCommand as So, DATA_VALIDATION_PLUGIN_NAME as ea, getDataValidationDiffMutations as Qe, DataValidationCacheService as na, DataValidationFormulaController as Co, DataValidationFormulaService as wo, getFormulaResult as Te, isLegalFormulaResult as Vn, transformCheckboxValue as Io, CHECKBOX_FORMULA_1 as Do, CHECKBOX_FORMULA_2 as Ro } from "@univerjs/sheets-data-validation";
|
10
|
+
import { getPatternType as yo } from "@univerjs/sheets-numfmt";
|
11
|
+
import { SetCellEditVisibleOperation as aa, SheetCanvasPopManagerService as Vo, IEditorBridgeService as oa, SheetPermissionInterceptorBaseController as ia, IMarkSelectionService as Mo, HoverManagerService as bo, CellAlertManagerService as Oo, CellAlertType as Eo, IAutoFillService as $o, APPLY_TYPE as Jt, virtualizeDiscreteRanges as tn, getAutoFillRepeatRange as Po, COPY_TYPE as Mn, rangeToDiscreteRange as Lo, PREDEFINED_HOOK_NAME as re, getRepeatRange as bn, ISheetClipboardService as To, getCurrentRangeDisable$ as xo, AutoHeightController as ra, SheetSkeletonManagerService as Ce } from "@univerjs/sheets-ui";
|
12
|
+
import { IDialogService as Ao, KeyCode as en, ISidebarService as sa, useObservable as jt, ComponentManager as Me, IZenZoneService as la, RectPopup as jo, useEvent as da, useSidebarClick as fn, MenuItemType as pn, getMenuHiddenObservable as Fo, RibbonStartGroup as No, IMenuManagerService as Uo } from "@univerjs/ui";
|
13
|
+
import { DataValidatorRegistryService as yt, DataValidationModel as be, DataValidatorRegistryScope as ko, TWO_FORMULA_OPERATOR_COUNT as Bo, getRuleOptions as On, getRuleSetting as En } from "@univerjs/data-validation";
|
14
|
+
import { RichTextEditingMutation as Wo } from "@univerjs/docs";
|
15
|
+
import { filter as mn, BehaviorSubject as $n, distinctUntilChanged as Ho, Subject as Yo, debounceTime as gn, bufferTime as ca } from "rxjs";
|
16
|
+
import { deserializeRangeWithSheet as Xo, serializeRange as ua } from "@univerjs/engine-formula";
|
17
|
+
import { RangeSelector as zo, FormulaEditor as ha } from "@univerjs/sheets-formula-ui";
|
18
|
+
var fa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
19
|
+
function pa(t) {
|
20
20
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
21
21
|
}
|
22
|
-
var
|
22
|
+
var ma = { exports: {} }, Oe = {};
|
23
23
|
/**
|
24
24
|
* @license React
|
25
25
|
* react-jsx-runtime.production.min.js
|
@@ -29,24 +29,24 @@ var go = { exports: {} }, Oe = {};
|
|
29
29
|
* This source code is licensed under the MIT license found in the
|
30
30
|
* LICENSE file in the root directory of this source tree.
|
31
31
|
*/
|
32
|
-
var
|
33
|
-
function
|
34
|
-
var n,
|
35
|
-
|
36
|
-
for (n in e)
|
37
|
-
if (t && t.defaultProps) for (n in e = t.defaultProps, e)
|
38
|
-
return { $$typeof:
|
32
|
+
var Ko = Xe, Go = Symbol.for("react.element"), Zo = Symbol.for("react.fragment"), qo = Object.prototype.hasOwnProperty, Jo = Ko.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Qo = { key: !0, ref: !0, __self: !0, __source: !0 };
|
33
|
+
function ga(t, e, a) {
|
34
|
+
var n, o = {}, i = null, r = null;
|
35
|
+
a !== void 0 && (i = "" + a), e.key !== void 0 && (i = "" + e.key), e.ref !== void 0 && (r = e.ref);
|
36
|
+
for (n in e) qo.call(e, n) && !Qo.hasOwnProperty(n) && (o[n] = e[n]);
|
37
|
+
if (t && t.defaultProps) for (n in e = t.defaultProps, e) o[n] === void 0 && (o[n] = e[n]);
|
38
|
+
return { $$typeof: Go, type: t, key: i, ref: r, props: o, _owner: Jo.current };
|
39
39
|
}
|
40
|
-
Oe.Fragment =
|
41
|
-
Oe.jsx =
|
42
|
-
Oe.jsxs =
|
43
|
-
|
44
|
-
var p =
|
40
|
+
Oe.Fragment = Zo;
|
41
|
+
Oe.jsx = ga;
|
42
|
+
Oe.jsxs = ga;
|
43
|
+
ma.exports = Oe;
|
44
|
+
var p = ma.exports, va = { exports: {} };
|
45
45
|
(function(t, e) {
|
46
|
-
(function(
|
46
|
+
(function(a, n) {
|
47
47
|
t.exports = n();
|
48
|
-
})(
|
49
|
-
var
|
48
|
+
})(fa, function() {
|
49
|
+
var a = 1e3, n = 6e4, o = 36e5, i = "millisecond", r = "second", l = "minute", s = "hour", c = "day", u = "week", h = "month", d = "quarter", C = "year", m = "date", f = "Invalid Date", D = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, V = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(w) {
|
50
50
|
var v = ["th", "st", "nd", "rd"], g = w % 100;
|
51
51
|
return "[" + w + (v[(g - 20) % 10] || v[g] || v[0]) + "]";
|
52
52
|
} }, S = function(w, v, g) {
|
@@ -181,24 +181,24 @@ var p = go.exports, _o = { exports: {} };
|
|
181
181
|
if (b === C) return this.set(C, this.$y + g);
|
182
182
|
if (b === c) return k(1);
|
183
183
|
if (b === u) return k(7);
|
184
|
-
var X = (_ = {}, _[l] = n, _[s] =
|
184
|
+
var X = (_ = {}, _[l] = n, _[s] = o, _[r] = a, _)[b] || 1, K = this.$d.getTime() + g * X;
|
185
185
|
return M.w(K, this);
|
186
186
|
}, v.subtract = function(g, I) {
|
187
187
|
return this.add(-1 * g, I);
|
188
188
|
}, v.format = function(g) {
|
189
189
|
var I = this, _ = this.$locale();
|
190
190
|
if (!this.isValid()) return _.invalidDate || f;
|
191
|
-
var L = g || "YYYY-MM-DDTHH:mm:ssZ", b = M.z(this), k = this.$H, X = this.$m, K = this.$M, G = _.weekdays, Z = _.months, J = _.meridiem, T = function(N, z,
|
192
|
-
return N && (N[z] || N(I, L)) ||
|
191
|
+
var L = g || "YYYY-MM-DDTHH:mm:ssZ", b = M.z(this), k = this.$H, X = this.$m, K = this.$M, G = _.weekdays, Z = _.months, J = _.meridiem, T = function(N, z, ot, Nt) {
|
192
|
+
return N && (N[z] || N(I, L)) || ot[z].slice(0, Nt);
|
193
193
|
}, O = function(N) {
|
194
194
|
return M.s(k % 12 || 12, N, "0");
|
195
|
-
}, W = J || function(N, z,
|
195
|
+
}, W = J || function(N, z, ot) {
|
196
196
|
var Nt = N < 12 ? "AM" : "PM";
|
197
|
-
return
|
197
|
+
return ot ? Nt.toLowerCase() : Nt;
|
198
198
|
};
|
199
199
|
return L.replace(y, function(N, z) {
|
200
|
-
return z || function(
|
201
|
-
switch (
|
200
|
+
return z || function(ot) {
|
201
|
+
switch (ot) {
|
202
202
|
case "YY":
|
203
203
|
return String(I.$y).slice(-2);
|
204
204
|
case "YYYY":
|
@@ -274,13 +274,13 @@ var p = go.exports, _o = { exports: {} };
|
|
274
274
|
L = (G - K) / 864e5;
|
275
275
|
break;
|
276
276
|
case s:
|
277
|
-
L = G /
|
277
|
+
L = G / o;
|
278
278
|
break;
|
279
279
|
case l:
|
280
280
|
L = G / n;
|
281
281
|
break;
|
282
282
|
case r:
|
283
|
-
L = G /
|
283
|
+
L = G / a;
|
284
284
|
break;
|
285
285
|
default:
|
286
286
|
L = G;
|
@@ -316,15 +316,15 @@ var p = go.exports, _o = { exports: {} };
|
|
316
316
|
return A(1e3 * w);
|
317
317
|
}, A.en = $[E], A.Ls = $, A.p = {}, A;
|
318
318
|
});
|
319
|
-
})(
|
320
|
-
var ti =
|
321
|
-
const we = /* @__PURE__ */
|
322
|
-
var
|
319
|
+
})(va);
|
320
|
+
var ti = va.exports;
|
321
|
+
const we = /* @__PURE__ */ pa(ti);
|
322
|
+
var _a = { exports: {} };
|
323
323
|
(function(t, e) {
|
324
|
-
(function(
|
324
|
+
(function(a, n) {
|
325
325
|
t.exports = n();
|
326
|
-
})(
|
327
|
-
var
|
326
|
+
})(fa, function() {
|
327
|
+
var a = "minute", n = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
|
328
328
|
return function(i, r, l) {
|
329
329
|
var s = r.prototype;
|
330
330
|
l.utc = function(f) {
|
@@ -332,7 +332,7 @@ var So = { exports: {} };
|
|
332
332
|
return new r(D);
|
333
333
|
}, s.utc = function(f) {
|
334
334
|
var D = l(this.toDate(), { locale: this.$L, utc: !0 });
|
335
|
-
return f ? D.add(this.utcOffset(),
|
335
|
+
return f ? D.add(this.utcOffset(), a) : D;
|
336
336
|
}, s.local = function() {
|
337
337
|
return l(this.toDate(), { locale: this.$L, utc: !1 });
|
338
338
|
};
|
@@ -355,14 +355,14 @@ var So = { exports: {} };
|
|
355
355
|
E === void 0 && (E = "");
|
356
356
|
var $ = E.match(n);
|
357
357
|
if (!$) return null;
|
358
|
-
var R = ("" + $[0]).match(
|
358
|
+
var R = ("" + $[0]).match(o) || ["-", 0, 0], P = R[0], j = 60 * +R[1] + +R[2];
|
359
359
|
return j === 0 ? 0 : P === "+" ? j : -j;
|
360
360
|
}(f), f === null)) return this;
|
361
361
|
var V = Math.abs(f) <= 16 ? 60 * f : f, S = this;
|
362
362
|
if (D) return S.$offset = V, S.$u = f === 0, S;
|
363
363
|
if (f !== 0) {
|
364
364
|
var x = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
365
|
-
(S = this.local().add(V + x,
|
365
|
+
(S = this.local().add(V + x, a)).$offset = V, S.$x.$localOffset = x;
|
366
366
|
} else S = this.utc();
|
367
367
|
return S;
|
368
368
|
};
|
@@ -392,27 +392,27 @@ var So = { exports: {} };
|
|
392
392
|
};
|
393
393
|
};
|
394
394
|
});
|
395
|
-
})(
|
396
|
-
var ei =
|
397
|
-
const ni = /* @__PURE__ */
|
398
|
-
var
|
399
|
-
for (var
|
400
|
-
(r = t[i]) && (
|
401
|
-
return n &&
|
402
|
-
}, Qt = (t, e) => (
|
403
|
-
let
|
404
|
-
constructor(t, e,
|
405
|
-
super(), this._sheetInterceptorService = t, this._dataValidationModel = e, this._dataValidatorRegistryService =
|
395
|
+
})(_a);
|
396
|
+
var ei = _a.exports;
|
397
|
+
const ni = /* @__PURE__ */ pa(ei);
|
398
|
+
var ai = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, ii = (t, e, a, n) => {
|
399
|
+
for (var o = n > 1 ? void 0 : n ? oi(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
400
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
401
|
+
return n && o && ai(e, a, o), o;
|
402
|
+
}, Qt = (t, e) => (a, n) => e(a, n, t);
|
403
|
+
let ae = class extends Dt {
|
404
|
+
constructor(t, e, a, n, o) {
|
405
|
+
super(), this._sheetInterceptorService = t, this._dataValidationModel = e, this._dataValidatorRegistryService = a, this._dialogService = n, this._localeService = o, this._initEditorBridgeInterceptor();
|
406
406
|
}
|
407
407
|
_initEditorBridgeInterceptor() {
|
408
408
|
this._sheetInterceptorService.writeCellInterceptor.intercept(
|
409
|
-
|
409
|
+
mo,
|
410
410
|
{
|
411
|
-
handler: async (t, e,
|
411
|
+
handler: async (t, e, a) => {
|
412
412
|
var f;
|
413
|
-
const n = await t, { worksheet:
|
413
|
+
const n = await t, { worksheet: o, row: i, col: r, unitId: l, subUnitId: s, workbook: c } = e, u = this._dataValidationModel.getRuleIdByLocation(l, s, i, r), h = u ? this._dataValidationModel.getRuleById(l, s, u) : void 0;
|
414
414
|
if (!h || h.errorStyle !== ee.STOP)
|
415
|
-
return
|
415
|
+
return a(Promise.resolve(n));
|
416
416
|
const d = await this._dataValidatorRegistryService.getValidatorItem(h.type);
|
417
417
|
if (!d || await d.validator(
|
418
418
|
{
|
@@ -422,14 +422,14 @@ let oe = class extends Dt {
|
|
422
422
|
column: r,
|
423
423
|
unitId: l,
|
424
424
|
subUnitId: s,
|
425
|
-
worksheet:
|
425
|
+
worksheet: o,
|
426
426
|
workbook: c,
|
427
427
|
t: n == null ? void 0 : n.t
|
428
428
|
},
|
429
429
|
h
|
430
430
|
))
|
431
|
-
return
|
432
|
-
const m =
|
431
|
+
return a(Promise.resolve(n));
|
432
|
+
const m = o.getCellRaw(i, r);
|
433
433
|
return this._dialogService.open({
|
434
434
|
width: 368,
|
435
435
|
title: {
|
@@ -452,7 +452,7 @@ let oe = class extends Dt {
|
|
452
452
|
onClose: () => {
|
453
453
|
this._dialogService.close("reject-input-dialog");
|
454
454
|
}
|
455
|
-
}),
|
455
|
+
}), a(Promise.resolve(m));
|
456
456
|
}
|
457
457
|
}
|
458
458
|
);
|
@@ -483,13 +483,13 @@ let oe = class extends Dt {
|
|
483
483
|
});
|
484
484
|
}
|
485
485
|
};
|
486
|
-
|
486
|
+
ae = ii([
|
487
487
|
Qt(0, Y(cn)),
|
488
488
|
Qt(1, Y(Rt)),
|
489
489
|
Qt(2, Y(yt)),
|
490
|
-
Qt(3,
|
490
|
+
Qt(3, Ao),
|
491
491
|
Qt(4, Y(nt))
|
492
|
-
],
|
492
|
+
], ae);
|
493
493
|
const ri = "univer-dv-date-dropdown", si = "univer-dv-date-dropdown-btns", Pn = {
|
494
494
|
dvDateDropdown: ri,
|
495
495
|
dvDateDropdownBtns: si
|
@@ -506,25 +506,25 @@ const li = (t) => {
|
|
506
506
|
};
|
507
507
|
function di(t) {
|
508
508
|
var $, R, P;
|
509
|
-
const { location: e, hideFn:
|
509
|
+
const { location: e, hideFn: a } = t, { worksheet: n, row: o, col: i, unitId: r, subUnitId: l, workbook: s } = e, c = H(at), u = H(ae), h = n.getCell(o, i), d = ($ = h == null ? void 0 : h.dataValidation) == null ? void 0 : $.rule, C = (R = h == null ? void 0 : h.dataValidation) == null ? void 0 : R.validator, m = st(n.getCellRaw(o, i)), f = li(m), [D, y] = q(f), V = !!((P = d == null ? void 0 : d.bizInfo) != null && P.showTime), S = D && D.isValid() ? D : we(), x = H(nt);
|
510
510
|
if (!h || !d || !C)
|
511
511
|
return;
|
512
512
|
const E = async () => {
|
513
513
|
var v, g, I;
|
514
514
|
if (!S)
|
515
515
|
return;
|
516
|
-
const A = S.format(V ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), M = (v = ze.parseDate(A)) == null ? void 0 : v.v, U = s.getStyles().getStyleByCell(h), B = (I = (g = U == null ? void 0 : U.n) == null ? void 0 : g.pattern) != null ? I : "", w =
|
516
|
+
const A = S.format(V ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"), M = (v = ze.parseDate(A)) == null ? void 0 : v.v, U = s.getStyles().getStyleByCell(h), B = (I = (g = U == null ? void 0 : U.n) == null ? void 0 : g.pattern) != null ? I : "", w = yo(B);
|
517
517
|
d.errorStyle !== ee.STOP || await C.validator({
|
518
518
|
value: M,
|
519
519
|
unitId: r,
|
520
520
|
subUnitId: l,
|
521
|
-
row:
|
521
|
+
row: o,
|
522
522
|
column: i,
|
523
523
|
worksheet: n,
|
524
524
|
workbook: s,
|
525
525
|
interceptValue: A.replace("Z", "").replace("T", " "),
|
526
|
-
t:
|
527
|
-
}, d) ? (
|
526
|
+
t: Wa.NUMBER
|
527
|
+
}, d) ? (a(), await c.executeCommand(aa.id, {
|
528
528
|
visible: !1,
|
529
529
|
eventType: qe.Keyboard,
|
530
530
|
unitId: r,
|
@@ -535,8 +535,8 @@ function di(t) {
|
|
535
535
|
range: {
|
536
536
|
startColumn: i,
|
537
537
|
endColumn: i,
|
538
|
-
startRow:
|
539
|
-
endRow:
|
538
|
+
startRow: o,
|
539
|
+
endRow: o
|
540
540
|
},
|
541
541
|
value: {
|
542
542
|
v: M,
|
@@ -554,7 +554,7 @@ function di(t) {
|
|
554
554
|
};
|
555
555
|
return /* @__PURE__ */ p.jsxs("div", { className: Pn.dvDateDropdown, children: [
|
556
556
|
/* @__PURE__ */ p.jsx(
|
557
|
-
|
557
|
+
oo,
|
558
558
|
{
|
559
559
|
defaultValue: S,
|
560
560
|
pickerValue: S,
|
@@ -573,63 +573,63 @@ function di(t) {
|
|
573
573
|
}
|
574
574
|
var ct = function() {
|
575
575
|
return ct = Object.assign || function(t) {
|
576
|
-
for (var e,
|
577
|
-
e = arguments[
|
578
|
-
for (var
|
576
|
+
for (var e, a = 1, n = arguments.length; a < n; a++) {
|
577
|
+
e = arguments[a];
|
578
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
|
579
579
|
}
|
580
580
|
return t;
|
581
581
|
}, ct.apply(this, arguments);
|
582
582
|
}, ci = function(t, e) {
|
583
|
-
var
|
584
|
-
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (
|
583
|
+
var a = {};
|
584
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (a[n] = t[n]);
|
585
585
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
586
|
-
for (var
|
587
|
-
e.indexOf(n[
|
588
|
-
return
|
586
|
+
for (var o = 0, n = Object.getOwnPropertySymbols(t); o < n.length; o++)
|
587
|
+
e.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[o]) && (a[n[o]] = t[n[o]]);
|
588
|
+
return a;
|
589
589
|
}, Vt = wt(function(t, e) {
|
590
|
-
var
|
591
|
-
return
|
590
|
+
var a = t.icon, n = t.id, o = t.className, i = t.extend, r = ci(t, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(o || "").trim(), s = Bt("_".concat(fi()));
|
591
|
+
return Sa(a, "".concat(n), { defIds: a.defIds, idSuffix: s.current }, ct({ ref: e, className: l }, r), i);
|
592
592
|
});
|
593
|
-
function
|
594
|
-
return It(t.tag, ct(ct({ key: e }, ui(t,
|
595
|
-
return
|
593
|
+
function Sa(t, e, a, n, o) {
|
594
|
+
return It(t.tag, ct(ct({ key: e }, ui(t, a, o)), n), (hi(t, a).children || []).map(function(i, r) {
|
595
|
+
return Sa(i, "".concat(e, "-").concat(t.tag, "-").concat(r), a, void 0, o);
|
596
596
|
}));
|
597
597
|
}
|
598
|
-
function ui(t, e,
|
598
|
+
function ui(t, e, a) {
|
599
599
|
var n = ct({}, t.attrs);
|
600
|
-
|
601
|
-
var
|
602
|
-
return !
|
600
|
+
a != null && a.colorChannel1 && n.fill === "colorChannel1" && (n.fill = a.colorChannel1);
|
601
|
+
var o = e.defIds;
|
602
|
+
return !o || o.length === 0 || (t.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + e.idSuffix), Object.entries(n).forEach(function(i) {
|
603
603
|
var r = i[0], l = i[1];
|
604
604
|
typeof l == "string" && (n[r] = l.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
605
605
|
})), n;
|
606
606
|
}
|
607
607
|
function hi(t, e) {
|
608
|
-
var
|
609
|
-
return !n || n.length === 0 ? t : t.tag === "defs" && (!((
|
610
|
-
return typeof
|
608
|
+
var a, n = e.defIds;
|
609
|
+
return !n || n.length === 0 ? t : t.tag === "defs" && (!((a = t.children) === null || a === void 0) && a.length) ? ct(ct({}, t), { children: t.children.map(function(o) {
|
610
|
+
return typeof o.attrs.id == "string" && n && n.indexOf(o.attrs.id) > -1 ? ct(ct({}, o), { attrs: ct(ct({}, o.attrs), { id: o.attrs.id + e.idSuffix }) }) : o;
|
611
611
|
}) }) : t;
|
612
612
|
}
|
613
613
|
function fi() {
|
614
614
|
return Math.random().toString(36).substring(2, 8);
|
615
615
|
}
|
616
616
|
Vt.displayName = "UniverIcon";
|
617
|
-
var pi = { 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" } }] },
|
617
|
+
var pi = { 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" } }] }, Ca = wt(function(t, e) {
|
618
618
|
return It(Vt, Object.assign({}, t, {
|
619
619
|
id: "check-mark-single",
|
620
620
|
ref: e,
|
621
621
|
icon: pi
|
622
622
|
}));
|
623
623
|
});
|
624
|
-
|
625
|
-
var mi = { 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" } }] },
|
624
|
+
Ca.displayName = "CheckMarkSingle";
|
625
|
+
var mi = { 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" } }] }, wa = wt(function(t, e) {
|
626
626
|
return It(Vt, Object.assign({}, t, {
|
627
627
|
id: "data-validation-single",
|
628
628
|
ref: e,
|
629
629
|
icon: mi
|
630
630
|
}));
|
631
631
|
});
|
632
|
-
|
632
|
+
wa.displayName = "DataValidationSingle";
|
633
633
|
var gi = { 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" } }] }, vn = wt(function(t, e) {
|
634
634
|
return It(Vt, Object.assign({}, t, {
|
635
635
|
id: "delete-single",
|
@@ -638,53 +638,53 @@ var gi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em"
|
|
638
638
|
}));
|
639
639
|
});
|
640
640
|
vn.displayName = "DeleteSingle";
|
641
|
-
var vi = { 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" } }] },
|
641
|
+
var vi = { 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" } }] }, Ia = wt(function(t, e) {
|
642
642
|
return It(Vt, Object.assign({}, t, {
|
643
643
|
id: "increase-single",
|
644
644
|
ref: e,
|
645
645
|
icon: vi
|
646
646
|
}));
|
647
647
|
});
|
648
|
-
|
649
|
-
var _i = { 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" } }] },
|
648
|
+
Ia.displayName = "IncreaseSingle";
|
649
|
+
var _i = { 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" } }] }, Da = wt(function(t, e) {
|
650
650
|
return It(Vt, Object.assign({}, t, {
|
651
651
|
id: "more-down-single",
|
652
652
|
ref: e,
|
653
653
|
icon: _i
|
654
654
|
}));
|
655
655
|
});
|
656
|
-
|
657
|
-
var Si = { 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" } }] },
|
656
|
+
Da.displayName = "MoreDownSingle";
|
657
|
+
var Si = { 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" } }] }, Ra = wt(function(t, e) {
|
658
658
|
return It(Vt, Object.assign({}, t, {
|
659
659
|
id: "more-up-single",
|
660
660
|
ref: e,
|
661
661
|
icon: Si
|
662
662
|
}));
|
663
663
|
});
|
664
|
-
|
665
|
-
var Ci = { 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" } }] }] },
|
664
|
+
Ra.displayName = "MoreUpSingle";
|
665
|
+
var Ci = { 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" } }] }] }, ya = wt(function(t, e) {
|
666
666
|
return It(Vt, Object.assign({}, t, {
|
667
667
|
id: "sequence-single",
|
668
668
|
ref: e,
|
669
669
|
icon: Ci
|
670
670
|
}));
|
671
671
|
});
|
672
|
-
|
673
|
-
var wi = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Di = (t, e,
|
674
|
-
for (var
|
675
|
-
(r = t[i]) && (
|
676
|
-
return n &&
|
677
|
-
}, Ln = (t, e) => (
|
672
|
+
ya.displayName = "SequenceSingle";
|
673
|
+
var wi = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Di = (t, e, a, n) => {
|
674
|
+
for (var o = n > 1 ? void 0 : n ? Ii(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
675
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
676
|
+
return n && o && wi(e, a, o), o;
|
677
|
+
}, Ln = (t, e) => (a, n) => e(a, n, t);
|
678
678
|
let pt = class extends Dt {
|
679
|
-
constructor(e,
|
679
|
+
constructor(e, a) {
|
680
680
|
super();
|
681
681
|
F(this, "_open$", new $n(!1));
|
682
|
-
F(this, "open$", this._open$.pipe(
|
682
|
+
F(this, "open$", this._open$.pipe(Ho()));
|
683
683
|
F(this, "_activeRule");
|
684
684
|
F(this, "_activeRule$", new $n(void 0));
|
685
685
|
F(this, "activeRule$", this._activeRule$.asObservable());
|
686
686
|
F(this, "_closeDisposable", null);
|
687
|
-
this._univerInstanceService = e, this._sidebarService =
|
687
|
+
this._univerInstanceService = e, this._sidebarService = a, this.disposeWithMe(
|
688
688
|
this._univerInstanceService.getCurrentTypeOfUnit$(rt.UNIVER_SHEET).pipe(mn((n) => !n)).subscribe(() => {
|
689
689
|
this.close();
|
690
690
|
})
|
@@ -712,7 +712,7 @@ let pt = class extends Dt {
|
|
712
712
|
this._open$.next(!1), (e = this._closeDisposable) == null || e.dispose();
|
713
713
|
}
|
714
714
|
setCloseDisposable(e) {
|
715
|
-
this._closeDisposable =
|
715
|
+
this._closeDisposable = Ha(() => {
|
716
716
|
e.dispose(), this._closeDisposable = null;
|
717
717
|
});
|
718
718
|
}
|
@@ -722,13 +722,13 @@ let pt = class extends Dt {
|
|
722
722
|
};
|
723
723
|
pt = Di([
|
724
724
|
Ln(0, gt),
|
725
|
-
Ln(1,
|
725
|
+
Ln(1, sa)
|
726
726
|
], pt);
|
727
727
|
function Ri() {
|
728
|
-
const t = H(Ct), e = jt(t.activeDropdown$, t.activeDropdown),
|
728
|
+
const t = H(Ct), e = jt(t.activeDropdown$, t.activeDropdown), a = H(Me);
|
729
729
|
if (!e)
|
730
730
|
return null;
|
731
|
-
const { location: n, componentKey:
|
731
|
+
const { location: n, componentKey: o } = e, i = a.get(o), r = `${n.unitId}-${n.subUnitId}-${n.row}-${n.col}`;
|
732
732
|
if (!i)
|
733
733
|
return null;
|
734
734
|
const l = () => {
|
@@ -743,21 +743,21 @@ function Ri() {
|
|
743
743
|
r
|
744
744
|
);
|
745
745
|
}
|
746
|
-
const
|
747
|
-
var yi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, Mi = (t, e,
|
748
|
-
for (var
|
749
|
-
(r = t[i]) && (
|
750
|
-
return n &&
|
751
|
-
}, Mt = (t, e) => (
|
746
|
+
const Va = "sheet.ui.dropdown";
|
747
|
+
var yi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, Mi = (t, e, a, n) => {
|
748
|
+
for (var o = n > 1 ? void 0 : n ? Vi(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
749
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
750
|
+
return n && o && yi(e, a, o), o;
|
751
|
+
}, Mt = (t, e) => (a, n) => e(a, n, t);
|
752
752
|
let Ct = class extends Dt {
|
753
|
-
constructor(e,
|
753
|
+
constructor(e, a, n, o, i, r, l) {
|
754
754
|
super();
|
755
755
|
F(this, "_activeDropdown");
|
756
|
-
F(this, "_activeDropdown$", new
|
756
|
+
F(this, "_activeDropdown$", new Yo());
|
757
757
|
F(this, "_currentPopup", null);
|
758
758
|
F(this, "activeDropdown$", this._activeDropdown$.asObservable());
|
759
759
|
F(this, "_zenVisible", !1);
|
760
|
-
this._canvasPopupManagerService = e, this._univerInstanceService =
|
760
|
+
this._canvasPopupManagerService = e, this._univerInstanceService = a, this._dataValidatorRegistryService = n, this._zenZoneService = o, this._renderManagerService = i, this._dataValidationModel = r, this._sheetsSelectionsService = l, this._init(), this._initSelectionChange(), this.disposeWithMe(() => {
|
761
761
|
this._activeDropdown$.complete();
|
762
762
|
});
|
763
763
|
}
|
@@ -769,14 +769,14 @@ let Ct = class extends Dt {
|
|
769
769
|
this._zenVisible = e, e && this.hideDropdown();
|
770
770
|
}));
|
771
771
|
}
|
772
|
-
_getDropdownByCell(e,
|
772
|
+
_getDropdownByCell(e, a, n, o) {
|
773
773
|
const i = e ? this._univerInstanceService.getUnit(e, rt.UNIVER_SHEET) : this._univerInstanceService.getCurrentUnitForType(rt.UNIVER_SHEET);
|
774
774
|
if (!i)
|
775
775
|
return;
|
776
|
-
const r =
|
776
|
+
const r = a ? i.getSheetBySheetId(a) : i.getActiveSheet();
|
777
777
|
if (!r)
|
778
778
|
return;
|
779
|
-
const l = this._dataValidationModel.getRuleByLocation(i.getUnitId(), r.getSheetId(), n,
|
779
|
+
const l = this._dataValidationModel.getRuleByLocation(i.getUnitId(), r.getSheetId(), n, o);
|
780
780
|
if (!l)
|
781
781
|
return;
|
782
782
|
const s = this._dataValidatorRegistryService.getValidatorItem(l.type);
|
@@ -784,21 +784,21 @@ let Ct = class extends Dt {
|
|
784
784
|
}
|
785
785
|
_initSelectionChange() {
|
786
786
|
this.disposeWithMe(this._sheetsSelectionsService.selectionMoveEnd$.subscribe((e) => {
|
787
|
-
e && e.every((
|
787
|
+
e && e.every((a) => !(a.primary && this._getDropdownByCell(a.primary.unitId, a.primary.sheetId, a.primary.actualRow, a.primary.actualColumn))) && this.hideDropdown();
|
788
788
|
}));
|
789
789
|
}
|
790
|
-
showDropdown(e,
|
791
|
-
const { location: n } = e, { row:
|
790
|
+
showDropdown(e, a = !0) {
|
791
|
+
const { location: n } = e, { row: o, col: i, unitId: r, subUnitId: l } = n;
|
792
792
|
if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
|
793
793
|
return;
|
794
794
|
this._activeDropdown = e, this._activeDropdown$.next(this._activeDropdown);
|
795
|
-
const s = this._renderManagerService.getRenderById(
|
796
|
-
|
795
|
+
const s = this._renderManagerService.getRenderById(Ya), c = this._canvasPopupManagerService.attachPopupToCell(
|
796
|
+
o,
|
797
797
|
i,
|
798
798
|
{
|
799
|
-
componentKey:
|
799
|
+
componentKey: Va,
|
800
800
|
onClickOutside: () => {
|
801
|
-
|
801
|
+
a && this.hideDropdown();
|
802
802
|
},
|
803
803
|
offset: [0, 3],
|
804
804
|
excludeOutside: [s == null ? void 0 : s.engine.getCanvasElement()].filter(Boolean)
|
@@ -808,7 +808,7 @@ let Ct = class extends Dt {
|
|
808
808
|
);
|
809
809
|
if (!c)
|
810
810
|
throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
|
811
|
-
const u = new
|
811
|
+
const u = new Xa();
|
812
812
|
u.add(c), u.add({
|
813
813
|
dispose: () => {
|
814
814
|
var h, d;
|
@@ -819,14 +819,14 @@ let Ct = class extends Dt {
|
|
819
819
|
hideDropdown() {
|
820
820
|
this._activeDropdown && (this._currentPopup && this._currentPopup.dispose(), this._currentPopup = null, this._activeDropdown = null, this._activeDropdown$.next(null));
|
821
821
|
}
|
822
|
-
showDataValidationDropdown(e,
|
822
|
+
showDataValidationDropdown(e, a, n, o, i) {
|
823
823
|
const r = this._univerInstanceService.getUnit(e, rt.UNIVER_SHEET);
|
824
824
|
if (!r)
|
825
825
|
return;
|
826
|
-
const l = r.getSheetBySheetId(
|
826
|
+
const l = r.getSheetBySheetId(a);
|
827
827
|
if (!l)
|
828
828
|
return;
|
829
|
-
const s = this._dataValidationModel.getRuleByLocation(r.getUnitId(), l.getSheetId(), n,
|
829
|
+
const s = this._dataValidationModel.getRuleByLocation(r.getUnitId(), l.getSheetId(), n, o);
|
830
830
|
if (!s)
|
831
831
|
return;
|
832
832
|
const c = this._dataValidatorRegistryService.getValidatorItem(s.type);
|
@@ -839,9 +839,9 @@ let Ct = class extends Dt {
|
|
839
839
|
workbook: r,
|
840
840
|
worksheet: l,
|
841
841
|
row: n,
|
842
|
-
col:
|
842
|
+
col: o,
|
843
843
|
unitId: e,
|
844
|
-
subUnitId:
|
844
|
+
subUnitId: a
|
845
845
|
},
|
846
846
|
componentKey: c.dropdown,
|
847
847
|
onHide: i
|
@@ -849,10 +849,10 @@ let Ct = class extends Dt {
|
|
849
849
|
}
|
850
850
|
};
|
851
851
|
Ct = Mi([
|
852
|
-
Mt(0, Y(
|
852
|
+
Mt(0, Y(Vo)),
|
853
853
|
Mt(1, gt),
|
854
854
|
Mt(2, Y(yt)),
|
855
|
-
Mt(3,
|
855
|
+
Mt(3, la),
|
856
856
|
Mt(4, ie),
|
857
857
|
Mt(5, Y(Rt)),
|
858
858
|
Mt(6, Y(Xn))
|
@@ -863,10 +863,10 @@ const _n = "DataValidationPanel", Ft = {
|
|
863
863
|
handler(t, e) {
|
864
864
|
if (!e)
|
865
865
|
return !1;
|
866
|
-
const { ruleId:
|
866
|
+
const { ruleId: a, isAdd: n } = e, o = t.get(pt), i = t.get(be), r = t.get(gt), l = t.get(sa), s = zn(r);
|
867
867
|
if (!s) return !1;
|
868
|
-
const { unitId: c, subUnitId: u } = s, h =
|
869
|
-
|
868
|
+
const { unitId: c, subUnitId: u } = s, h = a ? i.getRuleById(c, u, a) : void 0;
|
869
|
+
o.open(), o.setActiveRule(h && {
|
870
870
|
unitId: c,
|
871
871
|
subUnitId: u,
|
872
872
|
rule: h
|
@@ -875,9 +875,9 @@ const _n = "DataValidationPanel", Ft = {
|
|
875
875
|
header: { title: n ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
|
876
876
|
children: { label: _n },
|
877
877
|
width: 312,
|
878
|
-
onClose: () =>
|
878
|
+
onClose: () => o.close()
|
879
879
|
});
|
880
|
-
return
|
880
|
+
return o.setCloseDisposable(d), !0;
|
881
881
|
}
|
882
882
|
}, Sn = {
|
883
883
|
id: "data-validation.operation.close-validation-panel",
|
@@ -885,12 +885,12 @@ const _n = "DataValidationPanel", Ft = {
|
|
885
885
|
handler(t) {
|
886
886
|
return t.get(pt).close(), !0;
|
887
887
|
}
|
888
|
-
},
|
888
|
+
}, Ma = {
|
889
889
|
id: "data-validation.operation.toggle-validation-panel",
|
890
890
|
type: Gt.OPERATION,
|
891
891
|
handler(t) {
|
892
|
-
const e = t.get(
|
893
|
-
return
|
892
|
+
const e = t.get(at), a = t.get(pt);
|
893
|
+
return a.open(), a.isOpen ? e.executeCommand(Sn.id) : e.executeCommand(Ft.id), !0;
|
894
894
|
}
|
895
895
|
}, Ee = {
|
896
896
|
type: Gt.OPERATION,
|
@@ -898,21 +898,21 @@ const _n = "DataValidationPanel", Ft = {
|
|
898
898
|
handler(t, e) {
|
899
899
|
if (!e)
|
900
900
|
return !1;
|
901
|
-
const
|
902
|
-
return s && s.unitId === n && s.subUnitId ===
|
901
|
+
const a = t.get(Ct), { unitId: n, subUnitId: o, row: i, column: r } = e, l = a.activeDropdown, s = l == null ? void 0 : l.location;
|
902
|
+
return s && s.unitId === n && s.subUnitId === o && s.row === i && s.col === r || a.showDataValidationDropdown(
|
903
903
|
n,
|
904
|
-
|
904
|
+
o,
|
905
905
|
i,
|
906
906
|
r
|
907
907
|
), !0;
|
908
908
|
}
|
909
|
-
},
|
909
|
+
}, ba = {
|
910
910
|
type: Gt.OPERATION,
|
911
911
|
id: "sheet.operation.hide-data-validation-dropdown",
|
912
912
|
handler(t, e) {
|
913
913
|
return e ? (t.get(Ct).hideDropdown(), !0) : !1;
|
914
914
|
}
|
915
|
-
}, $t = "#ECECEC", Cn = "sheets-data-validation-ui.config",
|
915
|
+
}, $t = "#ECECEC", Cn = "sheets-data-validation-ui.config", Oa = {}, bi = "univer-dv-list-dropdown", Oi = "univer-dv-list-dropdown-title", Ei = "univer-dv-list-dropdown-list", $i = "univer-dv-list-dropdown-list-container", Pi = "univer-dv-list-dropdown-selected-icon", Li = "univer-dv-list-dropdown-item-container", Ti = "univer-dv-list-dropdown-item", xi = "univer-dv-list-dropdown-split", Ai = "univer-dv-list-dropdown-edit", vt = {
|
916
916
|
dvListDropdown: bi,
|
917
917
|
dvListDropdownTitle: Oi,
|
918
918
|
dvListDropdownList: Ei,
|
@@ -924,7 +924,7 @@ const _n = "DataValidationPanel", Ft = {
|
|
924
924
|
dvListDropdownEdit: Ai
|
925
925
|
}, ji = (t) => {
|
926
926
|
var E, $;
|
927
|
-
const { value: e, onChange:
|
927
|
+
const { value: e, onChange: a, multiple: n, options: o, title: i, onEdit: r, style: l, filter: s, location: c } = t, u = H(nt), h = H(sn), d = s == null ? void 0 : s.toLowerCase(), { row: C, col: m, unitId: f, subUnitId: D } = c, y = o.filter((R) => d ? R.label.toLowerCase().includes(d) : !0), V = ($ = (E = h.getConfig(Cn)) == null ? void 0 : E.showEditOnDropdown) != null ? $ : !0, S = H(ia), x = Pt(() => S.permissionCheckWithRanges(
|
928
928
|
{
|
929
929
|
workbookTypes: [ve],
|
930
930
|
rangeTypes: [_e],
|
@@ -936,14 +936,14 @@ const _n = "DataValidationPanel", Ft = {
|
|
936
936
|
), [S, m, C, f, D]);
|
937
937
|
return /* @__PURE__ */ p.jsxs("div", { className: vt.dvListDropdown, style: l, children: [
|
938
938
|
/* @__PURE__ */ p.jsx("div", { className: vt.dvListDropdownTitle, children: i }),
|
939
|
-
/* @__PURE__ */ p.jsx("div", { className: vt.dvListDropdownList, children: /* @__PURE__ */ p.jsx(
|
939
|
+
/* @__PURE__ */ p.jsx("div", { className: vt.dvListDropdownList, children: /* @__PURE__ */ p.jsx(io, { children: /* @__PURE__ */ p.jsx("div", { className: vt.dvListDropdownListContainer, children: y.map((R, P) => {
|
940
940
|
const j = e.indexOf(R.value) > -1, A = () => {
|
941
941
|
let U;
|
942
942
|
j ? U = new Set(e.filter((w) => w !== R.value)) : U = new Set(n ? [...e, R.value] : [R.value]);
|
943
943
|
const B = [];
|
944
|
-
|
944
|
+
o.forEach((w) => {
|
945
945
|
U.has(w.value) && B.push(w.value);
|
946
|
-
}),
|
946
|
+
}), a(B);
|
947
947
|
}, M = R.label.toLocaleLowerCase().indexOf(d);
|
948
948
|
return /* @__PURE__ */ p.jsxs("div", { className: vt.dvListDropdownItemContainer, onClick: A, children: [
|
949
949
|
/* @__PURE__ */ p.jsx("div", { className: vt.dvListDropdownItem, style: { background: R.color || $t }, children: d && R.label.toLowerCase().includes(d) ? /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
@@ -951,7 +951,7 @@ const _n = "DataValidationPanel", Ft = {
|
|
951
951
|
/* @__PURE__ */ p.jsx("span", { style: { fontWeight: "bold" }, children: R.label.substring(M, M + d.length) }),
|
952
952
|
/* @__PURE__ */ p.jsx("span", { children: R.label.substring(M + d.length) })
|
953
953
|
] }) : R.label }),
|
954
|
-
/* @__PURE__ */ p.jsx("div", { className: vt.dvListDropdownSelectedIcon, children: j ? /* @__PURE__ */ p.jsx(
|
954
|
+
/* @__PURE__ */ p.jsx("div", { className: vt.dvListDropdownSelectedIcon, children: j ? /* @__PURE__ */ p.jsx(Ca, {}) : null })
|
955
955
|
] }, P);
|
956
956
|
}) }) }, s) }),
|
957
957
|
V && x ? /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
@@ -962,17 +962,17 @@ const _n = "DataValidationPanel", Ft = {
|
|
962
962
|
};
|
963
963
|
function Fi(t) {
|
964
964
|
var w, v, g, I, _, L;
|
965
|
-
const { location: e, hideFn:
|
965
|
+
const { location: e, hideFn: a } = t, { worksheet: n, row: o, col: i, unitId: r, subUnitId: l } = e, s = H(be), [c, u] = q(""), h = H(at), d = H(nt), [C, m] = q(""), f = H(oa), D = H(gt), y = Pt(() => s.ruleChange$.pipe(gn(16)), []);
|
966
966
|
jt(y);
|
967
|
-
const V =
|
967
|
+
const V = jo.useContext(), S = ((v = (w = V.current) == null ? void 0 : w.right) != null ? v : 0) - ((I = (g = V.current) == null ? void 0 : g.left) != null ? I : 0);
|
968
968
|
if (St(() => {
|
969
969
|
const b = h.onCommandExecuted((k) => {
|
970
970
|
var X, K;
|
971
|
-
if (k.id ===
|
971
|
+
if (k.id === Wo.id) {
|
972
972
|
const G = k.params, { unitId: Z } = G, J = D.getUnit(Z, rt.UNIVER_DOC);
|
973
973
|
if (!J)
|
974
974
|
return;
|
975
|
-
const T =
|
975
|
+
const T = za.transform.getPlainText((K = (X = J.getSnapshot().body) == null ? void 0 : X.dataStream) != null ? K : "");
|
976
976
|
u(T);
|
977
977
|
}
|
978
978
|
});
|
@@ -981,13 +981,13 @@ function Fi(t) {
|
|
981
981
|
};
|
982
982
|
}, [h, D]), !n)
|
983
983
|
return null;
|
984
|
-
const x = n.getCell(
|
984
|
+
const x = n.getCell(o, i), E = (_ = x == null ? void 0 : x.dataValidation) == null ? void 0 : _.rule, $ = (L = x == null ? void 0 : x.dataValidation) == null ? void 0 : L.validator, R = (E == null ? void 0 : E.renderMode) === dt.CUSTOM || (E == null ? void 0 : E.renderMode) === void 0;
|
985
985
|
if (!x || !E || !$ || $.id.indexOf(et.LIST) !== 0)
|
986
986
|
return;
|
987
|
-
const P = E.type === et.LIST_MULTIPLE, j = $.getListWithColor(E, r, l), A = C ||
|
987
|
+
const P = E.type === et.LIST_MULTIPLE, j = $.getListWithColor(E, r, l), A = C || vo(n.getCellRaw(o, i)), M = Zn(A), U = () => {
|
988
988
|
h.executeCommand(Ft.id, {
|
989
989
|
ruleId: E.uid
|
990
|
-
}),
|
990
|
+
}), a();
|
991
991
|
}, B = j.map((b) => ({
|
992
992
|
label: b.label,
|
993
993
|
value: b.label,
|
@@ -1007,8 +1007,8 @@ function Fi(t) {
|
|
1007
1007
|
range: {
|
1008
1008
|
startColumn: i,
|
1009
1009
|
endColumn: i,
|
1010
|
-
startRow:
|
1011
|
-
endRow:
|
1010
|
+
startRow: o,
|
1011
|
+
endRow: o
|
1012
1012
|
},
|
1013
1013
|
value: {
|
1014
1014
|
v: k,
|
@@ -1022,7 +1022,7 @@ function Fi(t) {
|
|
1022
1022
|
keycode: en.ESC,
|
1023
1023
|
eventType: qe.Keyboard,
|
1024
1024
|
unitId: r
|
1025
|
-
}), m(k), P ||
|
1025
|
+
}), m(k), P || a(), f.isVisible().visible && await h.executeCommand(aa.id, {
|
1026
1026
|
visible: !1,
|
1027
1027
|
eventType: qe.Keyboard,
|
1028
1028
|
unitId: r,
|
@@ -1042,14 +1042,14 @@ const Ni = "univer-data-validation-options-button", Ui = "univer-data-validation
|
|
1042
1042
|
};
|
1043
1043
|
function ki(t) {
|
1044
1044
|
var c;
|
1045
|
-
const e = H(nt),
|
1045
|
+
const e = H(nt), a = H(Me), { value: n, onChange: o, extraComponent: i } = t, [r, l] = q(!1), s = i ? a.get(i) : null;
|
1046
1046
|
return /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
1047
1047
|
/* @__PURE__ */ p.jsxs("div", { className: xe.dataValidationOptionsButton, onClick: () => l(!r), children: [
|
1048
1048
|
e.t("dataValidation.panel.options"),
|
1049
|
-
r ? /* @__PURE__ */ p.jsx(
|
1049
|
+
r ? /* @__PURE__ */ p.jsx(Ra, { className: xe.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ p.jsx(Da, { className: xe.dataValidationOptionsButtonIcon })
|
1050
1050
|
] }),
|
1051
1051
|
r && /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
1052
|
-
s ? /* @__PURE__ */ p.jsx(s, { value: n, onChange:
|
1052
|
+
s ? /* @__PURE__ */ p.jsx(s, { value: n, onChange: o }) : null,
|
1053
1053
|
/* @__PURE__ */ p.jsx(
|
1054
1054
|
tt,
|
1055
1055
|
{
|
@@ -1058,7 +1058,7 @@ function ki(t) {
|
|
1058
1058
|
dn,
|
1059
1059
|
{
|
1060
1060
|
value: `${(c = n.errorStyle) != null ? c : ee.WARNING}`,
|
1061
|
-
onChange: (u) =>
|
1061
|
+
onChange: (u) => o({ ...n, errorStyle: +u }),
|
1062
1062
|
children: [
|
1063
1063
|
/* @__PURE__ */ p.jsx(Lt, { value: `${ee.WARNING}`, children: e.t("dataValidation.panel.showWarning") }),
|
1064
1064
|
/* @__PURE__ */ p.jsx(Lt, { value: `${ee.STOP}`, children: e.t("dataValidation.panel.rejectInput") })
|
@@ -1075,7 +1075,7 @@ function ki(t) {
|
|
1075
1075
|
Ve,
|
1076
1076
|
{
|
1077
1077
|
checked: n.showErrorMessage,
|
1078
|
-
onChange: () =>
|
1078
|
+
onChange: () => o({
|
1079
1079
|
...n,
|
1080
1080
|
showErrorMessage: !n.showErrorMessage
|
1081
1081
|
}),
|
@@ -1084,7 +1084,7 @@ function ki(t) {
|
|
1084
1084
|
)
|
1085
1085
|
}
|
1086
1086
|
),
|
1087
|
-
n.showErrorMessage ? /* @__PURE__ */ p.jsx(tt, { children: /* @__PURE__ */ p.jsx(Tt, { value: n.error, onChange: (u) =>
|
1087
|
+
n.showErrorMessage ? /* @__PURE__ */ p.jsx(tt, { children: /* @__PURE__ */ p.jsx(Tt, { value: n.error, onChange: (u) => o({ ...n, error: u }) }) }) : null
|
1088
1088
|
] })
|
1089
1089
|
] });
|
1090
1090
|
}
|
@@ -1093,39 +1093,39 @@ const Bi = "univer-data-validation-detail", Wi = "univer-data-validation-detail-
|
|
1093
1093
|
dataValidationDetailFormItem: Wi,
|
1094
1094
|
dataValidationDetailButtons: Hi,
|
1095
1095
|
dataValidationDetailButton: Yi
|
1096
|
-
}, Xi = (t) =>
|
1097
|
-
async (e,
|
1098
|
-
const i = await t.executeCommand(e,
|
1099
|
-
|
1096
|
+
}, Xi = (t) => qa(
|
1097
|
+
async (e, a, n, o) => {
|
1098
|
+
const i = await t.executeCommand(e, a, n);
|
1099
|
+
o == null || o(i);
|
1100
1100
|
},
|
1101
1101
|
1e3
|
1102
1102
|
);
|
1103
|
-
function zi(t, e,
|
1104
|
-
var n,
|
1105
|
-
return e ? ((
|
1103
|
+
function zi(t, e, a) {
|
1104
|
+
var n, o, i, r;
|
1105
|
+
return e ? ((o = (n = t.getUnit(e)) == null ? void 0 : n.getSheetBySheetName(a)) == null ? void 0 : o.getSheetId()) || "" : ((r = (i = t.getCurrentUnitForType(rt.UNIVER_SHEET)) == null ? void 0 : i.getSheetBySheetName(a)) == null ? void 0 : r.getSheetId()) || "";
|
1106
1106
|
}
|
1107
1107
|
function Ki() {
|
1108
1108
|
var J;
|
1109
|
-
const [t, e] = q(0),
|
1109
|
+
const [t, e] = q(0), a = H(pt), n = jt(a.activeRule$, a.activeRule), { unitId: o, subUnitId: i, rule: r } = n || {}, l = r.uid, s = H(yt), c = H(gt), u = H(Me), h = H(at), d = H(be), C = H(nt), [m, f] = q(r), D = s.getValidatorItem(m.type), [y, V] = q(!1), S = s.getValidatorsByScope(ko.SHEET), [x, E] = q(() => m.ranges.map((T) => ({ unitId: "", sheetId: "", range: T }))), $ = Pt(() => Xi(h), [h]), [R, P] = q(!1), j = Bt({}), [A, M] = q(!1), U = H(Xn);
|
1110
1110
|
if (St(() => () => {
|
1111
1111
|
const T = U.getCurrentLastSelection();
|
1112
1112
|
T && U.setSelections([T]);
|
1113
1113
|
}, [U]), St(() => {
|
1114
1114
|
h.onCommandExecuted((T) => {
|
1115
|
-
(T.id ===
|
1116
|
-
const O = d.getRuleById(
|
1115
|
+
(T.id === Ka.id || T.id === Ga.id) && setTimeout(() => {
|
1116
|
+
const O = d.getRuleById(o, i, l);
|
1117
1117
|
e((W) => W + 1), O && (f(O), E(O.ranges.map((W) => ({ unitId: "", sheetId: "", range: W }))));
|
1118
1118
|
}, 20);
|
1119
1119
|
});
|
1120
|
-
}, [h, d, l, i,
|
1120
|
+
}, [h, d, l, i, o]), !D)
|
1121
1121
|
return null;
|
1122
|
-
const B = D.operators, w = D.operatorNames, v = m.operator ?
|
1123
|
-
!m.ranges.length || R || (D.validatorFormula(m,
|
1124
|
-
}, I =
|
1125
|
-
const O = T.split(",").map(
|
1126
|
-
const
|
1127
|
-
if (
|
1128
|
-
const Nt = zi(c, z.unitId,
|
1122
|
+
const B = D.operators, w = D.operatorNames, v = m.operator ? Bo.includes(m.operator) : !1, g = () => {
|
1123
|
+
!m.ranges.length || R || (D.validatorFormula(m, o, i).success ? a.setActiveRule(null) : V(!0));
|
1124
|
+
}, I = da((T) => {
|
1125
|
+
const O = T.split(",").map(Xo).map((z) => {
|
1126
|
+
const ot = z.sheetName;
|
1127
|
+
if (ot) {
|
1128
|
+
const Nt = zi(c, z.unitId, ot);
|
1129
1129
|
return { ...z, sheetId: Nt };
|
1130
1130
|
}
|
1131
1131
|
return {
|
@@ -1133,17 +1133,17 @@ function Ki() {
|
|
1133
1133
|
sheetId: ""
|
1134
1134
|
};
|
1135
1135
|
});
|
1136
|
-
if (
|
1136
|
+
if (Za(O, x))
|
1137
1137
|
return;
|
1138
1138
|
E(O);
|
1139
|
-
const W = O.filter((z) => (!z.unitId || z.unitId ===
|
1139
|
+
const W = O.filter((z) => (!z.unitId || z.unitId === o) && (!z.sheetId || z.sheetId === i)).map((z) => z.range);
|
1140
1140
|
if (f({
|
1141
1141
|
...m,
|
1142
1142
|
ranges: W
|
1143
1143
|
}), W.length === 0)
|
1144
1144
|
return;
|
1145
1145
|
const N = {
|
1146
|
-
unitId:
|
1146
|
+
unitId: o,
|
1147
1147
|
subUnitId: i,
|
1148
1148
|
ruleId: l,
|
1149
1149
|
ranges: W
|
@@ -1157,7 +1157,7 @@ function Ki() {
|
|
1157
1157
|
...T
|
1158
1158
|
});
|
1159
1159
|
const O = {
|
1160
|
-
unitId:
|
1160
|
+
unitId: o,
|
1161
1161
|
subUnitId: i,
|
1162
1162
|
ruleId: l,
|
1163
1163
|
setting: T
|
@@ -1170,9 +1170,9 @@ function Ki() {
|
|
1170
1170
|
}, L = async () => {
|
1171
1171
|
await h.executeCommand(Qn.id, {
|
1172
1172
|
ruleId: l,
|
1173
|
-
unitId:
|
1173
|
+
unitId: o,
|
1174
1174
|
subUnitId: i
|
1175
|
-
}),
|
1175
|
+
}), a.setActiveRule(null);
|
1176
1176
|
}, b = {
|
1177
1177
|
type: m.type,
|
1178
1178
|
operator: m.operator,
|
@@ -1183,7 +1183,7 @@ function Ki() {
|
|
1183
1183
|
const O = s.getValidatorItem(T);
|
1184
1184
|
if (!O)
|
1185
1185
|
return;
|
1186
|
-
const W = O.operators, N = d.getRuleById(
|
1186
|
+
const W = O.operators, N = d.getRuleById(o, i, l), z = T === (N == null ? void 0 : N.type) || T.includes("list") && (N != null && N.type.includes("list")) ? {
|
1187
1187
|
...N,
|
1188
1188
|
type: T
|
1189
1189
|
} : {
|
@@ -1194,19 +1194,19 @@ function Ki() {
|
|
1194
1194
|
formula2: void 0
|
1195
1195
|
};
|
1196
1196
|
f(z), h.executeCommand(yn.id, {
|
1197
|
-
unitId:
|
1197
|
+
unitId: o,
|
1198
1198
|
subUnitId: i,
|
1199
1199
|
ruleId: m.uid,
|
1200
1200
|
setting: En(z)
|
1201
1201
|
});
|
1202
|
-
}, X = u.get(D.formulaInput), K = Pt(() => x.map((T) =>
|
1202
|
+
}, X = u.get(D.formulaInput), K = Pt(() => x.map((T) => ua(T.range)).join(","), []), G = On(m), Z = (T) => {
|
1203
1203
|
Dn(T, On(m)) || (f({
|
1204
1204
|
...m,
|
1205
1205
|
...T
|
1206
1206
|
}), $(
|
1207
|
-
|
1207
|
+
_o.id,
|
1208
1208
|
{
|
1209
|
-
unitId:
|
1209
|
+
unitId: o,
|
1210
1210
|
subUnitId: i,
|
1211
1211
|
ruleId: l,
|
1212
1212
|
options: T
|
@@ -1224,9 +1224,9 @@ function Ki() {
|
|
1224
1224
|
label: C.t("dataValidation.panel.range"),
|
1225
1225
|
error: !m.ranges.length || R ? C.t("dataValidation.panel.rangeError") : "",
|
1226
1226
|
children: /* @__PURE__ */ p.jsx(
|
1227
|
-
|
1227
|
+
zo,
|
1228
1228
|
{
|
1229
|
-
unitId:
|
1229
|
+
unitId: o,
|
1230
1230
|
subUnitId: i,
|
1231
1231
|
initValue: K,
|
1232
1232
|
onChange: I,
|
@@ -1282,8 +1282,8 @@ function Ki() {
|
|
1282
1282
|
});
|
1283
1283
|
},
|
1284
1284
|
showError: y,
|
1285
|
-
validResult: D.validatorFormula(m,
|
1286
|
-
unitId:
|
1285
|
+
validResult: D.validatorFormula(m, o, i),
|
1286
|
+
unitId: o,
|
1287
1287
|
subUnitId: i,
|
1288
1288
|
ruleId: l
|
1289
1289
|
},
|
@@ -1316,11 +1316,11 @@ const Gi = "univer-data-validation-item-container", Zi = "univer-data-validation
|
|
1316
1316
|
dataValidationItemContent: qi,
|
1317
1317
|
dataValidationItemIcon: Ji
|
1318
1318
|
}, Qi = (t) => {
|
1319
|
-
const { rule: e, onClick:
|
1319
|
+
const { rule: e, onClick: a, unitId: n, subUnitId: o, disable: i } = t, r = H(yt), l = H(at), s = H(Mo), c = r.getValidatorItem(e.type), u = Bt(), [h, d] = q(!1), C = (m) => {
|
1320
1320
|
l.executeCommand(Qn.id, {
|
1321
1321
|
ruleId: e.uid,
|
1322
1322
|
unitId: n,
|
1323
|
-
subUnitId:
|
1323
|
+
subUnitId: o
|
1324
1324
|
}), m.stopPropagation();
|
1325
1325
|
};
|
1326
1326
|
return St(() => () => {
|
@@ -1332,7 +1332,7 @@ const Gi = "univer-data-validation-item-container", Zi = "univer-data-validation
|
|
1332
1332
|
"div",
|
1333
1333
|
{
|
1334
1334
|
className: se.dataValidationItemContainer,
|
1335
|
-
onClick:
|
1335
|
+
onClick: a,
|
1336
1336
|
onMouseEnter: () => {
|
1337
1337
|
i || (d(!0), u.current = e.ranges.map((m) => s.addShape({
|
1338
1338
|
range: m,
|
@@ -1343,16 +1343,7 @@ const Gi = "univer-data-validation-item-container", Zi = "univer-data-validation
|
|
1343
1343
|
stroke: "#49B811",
|
1344
1344
|
widgets: {}
|
1345
1345
|
},
|
1346
|
-
primary:
|
1347
|
-
startColumn: m.startColumn,
|
1348
|
-
endColumn: m.endColumn,
|
1349
|
-
startRow: m.startRow,
|
1350
|
-
endRow: m.endRow,
|
1351
|
-
actualRow: m.startRow,
|
1352
|
-
actualColumn: m.startColumn,
|
1353
|
-
isMerged: !1,
|
1354
|
-
isMergedMainCell: !1
|
1355
|
-
}
|
1346
|
+
primary: null
|
1356
1347
|
})));
|
1357
1348
|
},
|
1358
1349
|
onMouseLeave: () => {
|
@@ -1363,7 +1354,7 @@ const Gi = "univer-data-validation-item-container", Zi = "univer-data-validation
|
|
1363
1354
|
},
|
1364
1355
|
children: [
|
1365
1356
|
/* @__PURE__ */ p.jsx("div", { className: se.dataValidationItemTitle, children: c == null ? void 0 : c.generateRuleName(e) }),
|
1366
|
-
/* @__PURE__ */ p.jsx("div", { className: se.dataValidationItemContent, children: e.ranges.map((m) =>
|
1357
|
+
/* @__PURE__ */ p.jsx("div", { className: se.dataValidationItemContent, children: e.ranges.map((m) => ua(m)).join(",") }),
|
1367
1358
|
h ? /* @__PURE__ */ p.jsx("div", { className: se.dataValidationItemIcon, onClick: C, children: /* @__PURE__ */ p.jsx(vn, {}) }) : null
|
1368
1359
|
]
|
1369
1360
|
}
|
@@ -1373,17 +1364,17 @@ const Gi = "univer-data-validation-item-container", Zi = "univer-data-validation
|
|
1373
1364
|
dataValidationListButtons: er,
|
1374
1365
|
dataValidationListButton: nr
|
1375
1366
|
};
|
1376
|
-
function
|
1367
|
+
function ar() {
|
1377
1368
|
const t = H(gt), e = jt(
|
1378
1369
|
() => t.getCurrentTypeOfUnit$(rt.UNIVER_SHEET),
|
1379
1370
|
void 0,
|
1380
1371
|
void 0,
|
1381
1372
|
[]
|
1382
1373
|
);
|
1383
|
-
return e ? /* @__PURE__ */ p.jsx(
|
1374
|
+
return e ? /* @__PURE__ */ p.jsx(or, { workbook: e }) : null;
|
1384
1375
|
}
|
1385
|
-
function
|
1386
|
-
const e = H(Rt),
|
1376
|
+
function or(t) {
|
1377
|
+
const e = H(Rt), a = H(gt), n = H(at), o = H(At), i = H(pt), r = H(nt), [l, s] = q([]), { workbook: c } = t, u = jt(c.activeSheet$, void 0, !0), h = c.getUnitId(), d = u == null ? void 0 : u.getSheetId();
|
1387
1378
|
St(() => {
|
1388
1379
|
s(e.getRules(h, d));
|
1389
1380
|
const V = e.ruleChange$.subscribe((S) => {
|
@@ -1394,7 +1385,7 @@ function ar(t) {
|
|
1394
1385
|
};
|
1395
1386
|
}, [h, d, e]);
|
1396
1387
|
const C = async () => {
|
1397
|
-
const V =
|
1388
|
+
const V = ta(o), S = {
|
1398
1389
|
unitId: h,
|
1399
1390
|
subUnitId: d,
|
1400
1391
|
rule: V
|
@@ -1405,13 +1396,13 @@ function ar(t) {
|
|
1405
1396
|
rule: V
|
1406
1397
|
});
|
1407
1398
|
}, m = () => {
|
1408
|
-
n.executeCommand(
|
1399
|
+
n.executeCommand(So.id, {
|
1409
1400
|
unitId: h,
|
1410
1401
|
subUnitId: d
|
1411
1402
|
});
|
1412
1403
|
}, D = ((V) => {
|
1413
|
-
const S =
|
1414
|
-
return V.map((P) =>
|
1404
|
+
const S = a.getCurrentUnitForType(rt.UNIVER_SHEET), x = S.getActiveSheet(), E = S.getUnitId(), $ = x.getSheetId();
|
1405
|
+
return V.map((P) => go(o, E, $, P.ranges) ? { ...P } : { ...P, disable: !0 });
|
1415
1406
|
})(l), y = D == null ? void 0 : D.some((V) => V.disable);
|
1416
1407
|
return /* @__PURE__ */ p.jsxs("div", { className: le.dataValidationList, children: [
|
1417
1408
|
D == null ? void 0 : D.map((V) => {
|
@@ -1442,14 +1433,14 @@ function ar(t) {
|
|
1442
1433
|
}
|
1443
1434
|
const ir = () => {
|
1444
1435
|
const t = H(pt), e = jt(t.activeRule$, t.activeRule);
|
1445
|
-
return e ? /* @__PURE__ */ p.jsx(Ki, {}, e.rule.uid) : /* @__PURE__ */ p.jsx(
|
1446
|
-
}, wn = "data-validation.list.dropdown",
|
1436
|
+
return e ? /* @__PURE__ */ p.jsx(Ki, {}, e.rule.uid) : /* @__PURE__ */ p.jsx(ar, {});
|
1437
|
+
}, wn = "data-validation.list.dropdown", Ea = "data-validation.date.dropdown", $e = {
|
1447
1438
|
type: Gt.COMMAND,
|
1448
1439
|
id: "data-validation.command.addRuleAndOpen",
|
1449
1440
|
handler(t) {
|
1450
|
-
const e = t.get(gt),
|
1451
|
-
if (!
|
1452
|
-
const { workbook: n, worksheet:
|
1441
|
+
const e = t.get(gt), a = zn(e);
|
1442
|
+
if (!a) return !1;
|
1443
|
+
const { workbook: n, worksheet: o } = a, i = ta(t), r = t.get(at), l = n.getUnitId(), s = o.getSheetId(), c = {
|
1453
1444
|
rule: i,
|
1454
1445
|
unitId: l,
|
1455
1446
|
subUnitId: s
|
@@ -1460,35 +1451,35 @@ const ir = () => {
|
|
1460
1451
|
}), !0) : !1;
|
1461
1452
|
}
|
1462
1453
|
};
|
1463
|
-
var rr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, lr = (t, e,
|
1464
|
-
for (var
|
1465
|
-
(r = t[i]) && (
|
1466
|
-
return n &&
|
1467
|
-
}, te = (t, e) => (
|
1454
|
+
var rr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, lr = (t, e, a, n) => {
|
1455
|
+
for (var o = n > 1 ? void 0 : n ? sr(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
1456
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
1457
|
+
return n && o && rr(e, a, o), o;
|
1458
|
+
}, te = (t, e) => (a, n) => e(a, n, t);
|
1468
1459
|
const de = "SHEET_DATA_VALIDATION_ALERT";
|
1469
|
-
let
|
1470
|
-
constructor(t, e,
|
1471
|
-
super(), this._hoverManagerService = t, this._cellAlertManagerService = e, this._univerInstanceService =
|
1460
|
+
let oe = class extends Dt {
|
1461
|
+
constructor(t, e, a, n, o) {
|
1462
|
+
super(), this._hoverManagerService = t, this._cellAlertManagerService = e, this._univerInstanceService = a, this._localeService = n, this._zenZoneService = o, this._init();
|
1472
1463
|
}
|
1473
1464
|
_init() {
|
1474
1465
|
this._initCellAlertPopup(), this._initZenService();
|
1475
1466
|
}
|
1476
1467
|
_initCellAlertPopup() {
|
1477
1468
|
this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(gn(100)).subscribe((t) => {
|
1478
|
-
var e,
|
1469
|
+
var e, a;
|
1479
1470
|
if (t) {
|
1480
|
-
const
|
1481
|
-
if (!
|
1482
|
-
const i =
|
1471
|
+
const o = this._univerInstanceService.getCurrentUnitForType(rt.UNIVER_SHEET).getActiveSheet();
|
1472
|
+
if (!o) return;
|
1473
|
+
const i = o.getCell(t.location.row, t.location.col);
|
1483
1474
|
if (((e = i == null ? void 0 : i.dataValidation) == null ? void 0 : e.validStatus) === ne.INVALID) {
|
1484
|
-
const r = this._cellAlertManagerService.currentAlert.get(de), l = (
|
1475
|
+
const r = this._cellAlertManagerService.currentAlert.get(de), l = (a = r == null ? void 0 : r.alert) == null ? void 0 : a.location;
|
1485
1476
|
if (l && l.row === t.location.row && l.col === t.location.col && l.subUnitId === t.location.subUnitId && l.unitId === t.location.unitId)
|
1486
1477
|
return;
|
1487
1478
|
const s = i.dataValidation.validator, c = i.dataValidation.rule;
|
1488
1479
|
if (!s)
|
1489
1480
|
return;
|
1490
1481
|
this._cellAlertManagerService.showAlert({
|
1491
|
-
type:
|
1482
|
+
type: Eo.ERROR,
|
1492
1483
|
title: this._localeService.t("dataValidation.error.title"),
|
1493
1484
|
message: s == null ? void 0 : s.getRuleFinalError(c),
|
1494
1485
|
location: t.location,
|
@@ -1508,29 +1499,29 @@ let ae = class extends Dt {
|
|
1508
1499
|
}));
|
1509
1500
|
}
|
1510
1501
|
};
|
1511
|
-
|
1512
|
-
te(0, Y(
|
1513
|
-
te(1, Y(
|
1502
|
+
oe = lr([
|
1503
|
+
te(0, Y(bo)),
|
1504
|
+
te(1, Y(Oo)),
|
1514
1505
|
te(2, gt),
|
1515
1506
|
te(3, Y(nt)),
|
1516
|
-
te(4,
|
1517
|
-
],
|
1518
|
-
var dr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, ur = (t, e,
|
1519
|
-
for (var
|
1520
|
-
(r = t[i]) && (
|
1521
|
-
return n &&
|
1522
|
-
}, Ae = (t, e) => (
|
1507
|
+
te(4, la)
|
1508
|
+
], oe);
|
1509
|
+
var dr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, ur = (t, e, a, n) => {
|
1510
|
+
for (var o = n > 1 ? void 0 : n ? cr(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
1511
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
1512
|
+
return n && o && dr(e, a, o), o;
|
1513
|
+
}, Ae = (t, e) => (a, n) => e(a, n, t);
|
1523
1514
|
let Ht = class extends Dt {
|
1524
|
-
constructor(t, e,
|
1525
|
-
super(), this._autoFillService = t, this._dataValidationModel = e, this._injector =
|
1515
|
+
constructor(t, e, a) {
|
1516
|
+
super(), this._autoFillService = t, this._dataValidationModel = e, this._injector = a, this._initAutoFill();
|
1526
1517
|
}
|
1527
1518
|
// eslint-disable-next-line max-lines-per-function
|
1528
1519
|
_initAutoFill() {
|
1529
|
-
const t = () => ({ redos: [], undos: [] }), e = (
|
1530
|
-
const { source: r, target: l, unitId: s, subUnitId: c } =
|
1520
|
+
const t = () => ({ redos: [], undos: [] }), e = (o, i) => {
|
1521
|
+
const { source: r, target: l, unitId: s, subUnitId: c } = o, u = this._dataValidationModel.getRuleObjectMatrix(s, c).clone(), h = tn([r, l]), [d, C] = h.ranges, { mapFunc: m } = h, f = {
|
1531
1522
|
row: d.startRow,
|
1532
1523
|
col: d.startColumn
|
1533
|
-
}, D =
|
1524
|
+
}, D = Po(d, C), y = new me(), V = /* @__PURE__ */ new Set();
|
1534
1525
|
D.forEach((R) => {
|
1535
1526
|
const P = R.repeatStartCell, j = R.relativeRange, A = {
|
1536
1527
|
startRow: f.row,
|
@@ -1543,7 +1534,7 @@ let Ht = class extends Dt {
|
|
1543
1534
|
endColumn: P.col,
|
1544
1535
|
endRow: P.row
|
1545
1536
|
};
|
1546
|
-
|
1537
|
+
Ja.foreach(j, (U, B) => {
|
1547
1538
|
const w = ge.getPositionRange(
|
1548
1539
|
{
|
1549
1540
|
startRow: U,
|
@@ -1574,22 +1565,22 @@ let Ht = class extends Dt {
|
|
1574
1565
|
undos: $,
|
1575
1566
|
redos: E
|
1576
1567
|
};
|
1577
|
-
},
|
1568
|
+
}, a = [
|
1578
1569
|
et.CHECKBOX
|
1579
1570
|
], n = {
|
1580
|
-
id:
|
1581
|
-
onBeforeFillData: (
|
1582
|
-
const { source: i, unitId: r, subUnitId: l } =
|
1571
|
+
id: ea,
|
1572
|
+
onBeforeFillData: (o) => {
|
1573
|
+
const { source: i, unitId: r, subUnitId: l } = o;
|
1583
1574
|
for (const s of i.rows)
|
1584
1575
|
for (const c of i.cols) {
|
1585
1576
|
const u = this._dataValidationModel.getRuleByLocation(r, l, s, c);
|
1586
|
-
if (u &&
|
1577
|
+
if (u && a.indexOf(u.type) > -1) {
|
1587
1578
|
this._autoFillService.setDisableApplyType(Jt.SERIES, !0);
|
1588
1579
|
return;
|
1589
1580
|
}
|
1590
1581
|
}
|
1591
1582
|
},
|
1592
|
-
onFillData: (
|
1583
|
+
onFillData: (o, i, r) => r === Jt.COPY || r === Jt.ONLY_FORMAT || r === Jt.SERIES ? e(o, r) : t(),
|
1593
1584
|
onAfterFillData: () => {
|
1594
1585
|
}
|
1595
1586
|
};
|
@@ -1597,56 +1588,56 @@ let Ht = class extends Dt {
|
|
1597
1588
|
}
|
1598
1589
|
};
|
1599
1590
|
Ht = ur([
|
1600
|
-
Ae(0, $
|
1591
|
+
Ae(0, $o),
|
1601
1592
|
Ae(1, Y(Rt)),
|
1602
1593
|
Ae(2, Y(At))
|
1603
1594
|
], Ht);
|
1604
|
-
var hr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, pr = (t, e,
|
1605
|
-
for (var
|
1606
|
-
(r = t[i]) && (
|
1607
|
-
return n &&
|
1608
|
-
}, je = (t, e) => (
|
1595
|
+
var hr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, pr = (t, e, a, n) => {
|
1596
|
+
for (var o = n > 1 ? void 0 : n ? fr(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
1597
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
1598
|
+
return n && o && hr(e, a, o), o;
|
1599
|
+
}, je = (t, e) => (a, n) => e(a, n, t);
|
1609
1600
|
let Yt = class extends Dt {
|
1610
|
-
constructor(e,
|
1601
|
+
constructor(e, a, n) {
|
1611
1602
|
super();
|
1612
1603
|
F(this, "_copyInfo");
|
1613
|
-
this._sheetClipboardService = e, this._sheetDataValidationModel =
|
1604
|
+
this._sheetClipboardService = e, this._sheetDataValidationModel = a, this._injector = n, this._initCopyPaste();
|
1614
1605
|
}
|
1615
1606
|
_initCopyPaste() {
|
1616
1607
|
this._sheetClipboardService.addClipboardHook({
|
1617
|
-
id:
|
1618
|
-
onBeforeCopy: (e,
|
1619
|
-
onPasteCells: (e,
|
1620
|
-
const { copyType: i = Mn.COPY, pasteType: r } =
|
1608
|
+
id: ea,
|
1609
|
+
onBeforeCopy: (e, a, n) => this._collect(e, a, n),
|
1610
|
+
onPasteCells: (e, a, n, o) => {
|
1611
|
+
const { copyType: i = Mn.COPY, pasteType: r } = o, { range: l } = e || {}, { range: s, unitId: c, subUnitId: u } = a;
|
1621
1612
|
return this._generateMutations(s, { copyType: i, pasteType: r, copyRange: l, unitId: c, subUnitId: u });
|
1622
1613
|
}
|
1623
1614
|
});
|
1624
1615
|
}
|
1625
|
-
_collect(e,
|
1626
|
-
const
|
1616
|
+
_collect(e, a, n) {
|
1617
|
+
const o = new me();
|
1627
1618
|
this._copyInfo = {
|
1628
1619
|
unitId: e,
|
1629
|
-
subUnitId:
|
1630
|
-
matrix:
|
1620
|
+
subUnitId: a,
|
1621
|
+
matrix: o
|
1631
1622
|
};
|
1632
|
-
const i = this._injector.invoke((s) =>
|
1623
|
+
const i = this._injector.invoke((s) => Lo(n, s, e, a));
|
1633
1624
|
if (!i)
|
1634
1625
|
return;
|
1635
1626
|
const { rows: r, cols: l } = i;
|
1636
1627
|
r.forEach((s, c) => {
|
1637
1628
|
l.forEach((u, h) => {
|
1638
|
-
const d = this._sheetDataValidationModel.getRuleIdByLocation(e,
|
1639
|
-
|
1629
|
+
const d = this._sheetDataValidationModel.getRuleIdByLocation(e, a, s, u);
|
1630
|
+
o.setValue(c, h, d != null ? d : "");
|
1640
1631
|
});
|
1641
1632
|
});
|
1642
1633
|
}
|
1643
1634
|
// eslint-disable-next-line max-lines-per-function
|
1644
|
-
_generateMutations(e,
|
1635
|
+
_generateMutations(e, a) {
|
1645
1636
|
if (!this._copyInfo)
|
1646
1637
|
return { redos: [], undos: [] };
|
1647
|
-
if (
|
1638
|
+
if (a.copyType === Mn.CUT)
|
1648
1639
|
return this._copyInfo = null, { redos: [], undos: [] };
|
1649
|
-
if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !
|
1640
|
+
if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !a.copyRange)
|
1650
1641
|
return { redos: [], undos: [] };
|
1651
1642
|
if ([
|
1652
1643
|
re.SPECIAL_PASTE_COL_WIDTH,
|
@@ -1654,12 +1645,12 @@ let Yt = class extends Dt {
|
|
1654
1645
|
re.SPECIAL_PASTE_FORMAT,
|
1655
1646
|
re.SPECIAL_PASTE_FORMULA
|
1656
1647
|
].includes(
|
1657
|
-
|
1648
|
+
a.pasteType
|
1658
1649
|
))
|
1659
1650
|
return { redos: [], undos: [] };
|
1660
|
-
const { unitId: n, subUnitId:
|
1661
|
-
if (
|
1662
|
-
const i = this._sheetDataValidationModel.getRuleObjectMatrix(
|
1651
|
+
const { unitId: n, subUnitId: o } = this._copyInfo;
|
1652
|
+
if (a.unitId !== n || o !== a.subUnitId) {
|
1653
|
+
const i = this._sheetDataValidationModel.getRuleObjectMatrix(a.unitId, a.subUnitId).clone(), r = new me(), l = /* @__PURE__ */ new Set(), { ranges: [s, c], mapFunc: u } = tn([a.copyRange, e]), h = bn(s, c, !0), d = /* @__PURE__ */ new Map();
|
1663
1654
|
h.forEach(({ startRange: D }) => {
|
1664
1655
|
var y;
|
1665
1656
|
(y = this._copyInfo) == null || y.matrix.forValue((V, S, x) => {
|
@@ -1671,8 +1662,8 @@ let Yt = class extends Dt {
|
|
1671
1662
|
endColumn: S
|
1672
1663
|
},
|
1673
1664
|
D
|
1674
|
-
), $ = `${
|
1675
|
-
!this._sheetDataValidationModel.getRuleById(
|
1665
|
+
), $ = `${o}-${x}`, R = this._sheetDataValidationModel.getRuleById(n, o, x);
|
1666
|
+
!this._sheetDataValidationModel.getRuleById(a.unitId, a.subUnitId, $) && R && d.set($, { ...R, uid: $ });
|
1676
1667
|
const { row: P, col: j } = u(E.startRow, E.startColumn);
|
1677
1668
|
l.add($), r.setValue(P, j, $);
|
1678
1669
|
});
|
@@ -1680,9 +1671,9 @@ let Yt = class extends Dt {
|
|
1680
1671
|
const C = Array.from(l).map((D) => ({ id: D, ranges: Ke(r, (y) => y === D) }));
|
1681
1672
|
i.addRangeRules(C);
|
1682
1673
|
const { redoMutations: m, undoMutations: f } = Qe(
|
1683
|
-
|
1684
|
-
|
1685
|
-
i.diffWithAddition(this._sheetDataValidationModel.getRules(
|
1674
|
+
a.unitId,
|
1675
|
+
a.subUnitId,
|
1676
|
+
i.diffWithAddition(this._sheetDataValidationModel.getRules(a.unitId, a.subUnitId), d.values()),
|
1686
1677
|
this._injector,
|
1687
1678
|
"patched",
|
1688
1679
|
!1
|
@@ -1692,7 +1683,7 @@ let Yt = class extends Dt {
|
|
1692
1683
|
undos: f
|
1693
1684
|
};
|
1694
1685
|
} else {
|
1695
|
-
const i = this._sheetDataValidationModel.getRuleObjectMatrix(n,
|
1686
|
+
const i = this._sheetDataValidationModel.getRuleObjectMatrix(n, o).clone(), r = new me(), l = /* @__PURE__ */ new Set(), { ranges: [s, c], mapFunc: u } = tn([a.copyRange, e]);
|
1696
1687
|
bn(s, c, !0).forEach(({ startRange: f }) => {
|
1697
1688
|
var D;
|
1698
1689
|
(D = this._copyInfo) == null || D.matrix.forValue((y, V, S) => {
|
@@ -1712,8 +1703,8 @@ let Yt = class extends Dt {
|
|
1712
1703
|
i.addRangeRules(d);
|
1713
1704
|
const { redoMutations: C, undoMutations: m } = Qe(
|
1714
1705
|
n,
|
1715
|
-
|
1716
|
-
i.diff(this._sheetDataValidationModel.getRules(n,
|
1706
|
+
o,
|
1707
|
+
i.diff(this._sheetDataValidationModel.getRules(n, o)),
|
1717
1708
|
this._injector,
|
1718
1709
|
"patched",
|
1719
1710
|
!1
|
@@ -1726,18 +1717,18 @@ let Yt = class extends Dt {
|
|
1726
1717
|
}
|
1727
1718
|
};
|
1728
1719
|
Yt = pr([
|
1729
|
-
je(0,
|
1720
|
+
je(0, To),
|
1730
1721
|
je(1, Y(Rt)),
|
1731
1722
|
je(2, Y(At))
|
1732
1723
|
], Yt);
|
1733
|
-
var mr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, vr = (t, e,
|
1734
|
-
for (var
|
1735
|
-
(r = t[i]) && (
|
1736
|
-
return n &&
|
1737
|
-
}, Fe = (t, e) => (
|
1724
|
+
var mr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, vr = (t, e, a, n) => {
|
1725
|
+
for (var o = n > 1 ? void 0 : n ? gr(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
1726
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
1727
|
+
return n && o && mr(e, a, o), o;
|
1728
|
+
}, Fe = (t, e) => (a, n) => e(a, n, t);
|
1738
1729
|
let Xt = class extends Dt {
|
1739
|
-
constructor(t, e,
|
1740
|
-
super(), this._localeService = t, this._commandService = e, this._sheetPermissionInterceptorBaseController =
|
1730
|
+
constructor(t, e, a) {
|
1731
|
+
super(), this._localeService = t, this._commandService = e, this._sheetPermissionInterceptorBaseController = a, this._commandExecutedListener();
|
1741
1732
|
}
|
1742
1733
|
_commandExecutedListener() {
|
1743
1734
|
this.disposeWithMe(
|
@@ -1757,18 +1748,18 @@ let Xt = class extends Dt {
|
|
1757
1748
|
};
|
1758
1749
|
Xt = vr([
|
1759
1750
|
Fe(0, Y(nt)),
|
1760
|
-
Fe(1,
|
1761
|
-
Fe(2, Y(
|
1751
|
+
Fe(1, at),
|
1752
|
+
Fe(2, Y(ia))
|
1762
1753
|
], Xt);
|
1763
|
-
const
|
1754
|
+
const $a = "data-validation-single", Pa = "sheet.menu.data-validation";
|
1764
1755
|
function _r(t) {
|
1765
1756
|
return {
|
1766
|
-
id:
|
1757
|
+
id: Pa,
|
1767
1758
|
type: pn.SUBITEMS,
|
1768
|
-
icon:
|
1759
|
+
icon: $a,
|
1769
1760
|
tooltip: "dataValidation.title",
|
1770
|
-
hidden$:
|
1771
|
-
disabled$:
|
1761
|
+
hidden$: Fo(t, rt.UNIVER_SHEET),
|
1762
|
+
disabled$: xo(t, { workbookTypes: [ve], worksheetTypes: [Je, Se], rangeTypes: [_e] })
|
1772
1763
|
};
|
1773
1764
|
}
|
1774
1765
|
function Sr(t) {
|
@@ -1786,8 +1777,8 @@ function Cr(t) {
|
|
1786
1777
|
};
|
1787
1778
|
}
|
1788
1779
|
const wr = {
|
1789
|
-
[
|
1790
|
-
[
|
1780
|
+
[No.FORMULAS_INSERT]: {
|
1781
|
+
[Pa]: {
|
1791
1782
|
order: 9,
|
1792
1783
|
menuItemFactory: _r,
|
1793
1784
|
[Ft.id]: {
|
@@ -1801,37 +1792,37 @@ const wr = {
|
|
1801
1792
|
}
|
1802
1793
|
}
|
1803
1794
|
};
|
1804
|
-
var Ir = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor,
|
1805
|
-
for (var
|
1806
|
-
(r = t[i]) && (
|
1807
|
-
return n &&
|
1808
|
-
}, Q = (t, e) => (
|
1809
|
-
const
|
1795
|
+
var Ir = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, La = (t, e, a, n) => {
|
1796
|
+
for (var o = n > 1 ? void 0 : n ? Dr(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
1797
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
1798
|
+
return n && o && Ir(e, a, o), o;
|
1799
|
+
}, Q = (t, e) => (a, n) => e(a, n, t);
|
1800
|
+
const Ta = {
|
1810
1801
|
tr: {
|
1811
1802
|
size: 6,
|
1812
1803
|
color: "#fe4b4b"
|
1813
1804
|
}
|
1814
1805
|
};
|
1815
1806
|
let zt = class extends ln {
|
1816
|
-
constructor(t, e,
|
1817
|
-
super(), this._commandService = t, this._menuManagerService = e, this._renderManagerService =
|
1807
|
+
constructor(t, e, a, n, o, i, r, l, s, c, u) {
|
1808
|
+
super(), this._commandService = t, this._menuManagerService = e, this._renderManagerService = a, this._univerInstanceService = n, this._autoHeightController = o, 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();
|
1818
1809
|
}
|
1819
1810
|
_initMenu() {
|
1820
1811
|
this._menuManagerService.mergeMenu(wr);
|
1821
1812
|
}
|
1822
1813
|
_initDropdown() {
|
1823
1814
|
this._editorBridgeService && this.disposeWithMe(this._editorBridgeService.visible$.subscribe((t) => {
|
1824
|
-
var
|
1815
|
+
var a;
|
1825
1816
|
if (!t.visible) {
|
1826
|
-
((
|
1817
|
+
((a = this._dropdownManagerService.activeDropdown) == null ? void 0 : a.trigger) === "editor-bridge" && this._dropdownManagerService.hideDropdown();
|
1827
1818
|
return;
|
1828
1819
|
}
|
1829
1820
|
const e = this._editorBridgeService.getEditCellState();
|
1830
1821
|
if (e) {
|
1831
|
-
const { unitId: n, sheetId:
|
1822
|
+
const { unitId: n, sheetId: o, row: i, column: r } = e, l = this._univerInstanceService.getUniverSheetInstance(n);
|
1832
1823
|
if (!l)
|
1833
1824
|
return;
|
1834
|
-
const s = this._sheetDataValidationModel.getRuleByLocation(n,
|
1825
|
+
const s = this._sheetDataValidationModel.getRuleByLocation(n, o, i, r);
|
1835
1826
|
if (!s)
|
1836
1827
|
return;
|
1837
1828
|
const c = this._dataValidatorRegistryService.getValidatorItem(s.type);
|
@@ -1840,13 +1831,13 @@ let zt = class extends ln {
|
|
1840
1831
|
const u = l.getActiveSheet();
|
1841
1832
|
if (!u) return;
|
1842
1833
|
const h = this._dropdownManagerService.activeDropdown, d = h == null ? void 0 : h.location;
|
1843
|
-
if (d && d.unitId === n && d.subUnitId ===
|
1834
|
+
if (d && d.unitId === n && d.subUnitId === o && d.row === i && d.col === r)
|
1844
1835
|
return;
|
1845
1836
|
this._dropdownManagerService.showDropdown(
|
1846
1837
|
{
|
1847
1838
|
location: {
|
1848
1839
|
unitId: n,
|
1849
|
-
subUnitId:
|
1840
|
+
subUnitId: o,
|
1850
1841
|
row: i,
|
1851
1842
|
col: r,
|
1852
1843
|
workbook: l,
|
@@ -1872,15 +1863,15 @@ let zt = class extends ln {
|
|
1872
1863
|
// must be after numfmt
|
1873
1864
|
priority: Gn.DATA_VALIDATION,
|
1874
1865
|
// eslint-disable-next-line max-lines-per-function, complexity
|
1875
|
-
handler: (t, e,
|
1866
|
+
handler: (t, e, a) => {
|
1876
1867
|
var y, V, S, x, E, $;
|
1877
|
-
const { row: n, col:
|
1868
|
+
const { row: n, col: o, unitId: i, subUnitId: r, workbook: l, worksheet: s } = e, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, o);
|
1878
1869
|
if (!c)
|
1879
|
-
return
|
1870
|
+
return a(t);
|
1880
1871
|
const u = this._sheetDataValidationModel.getRuleById(i, r, c);
|
1881
1872
|
if (!u)
|
1882
|
-
return
|
1883
|
-
const h = (V = (y = this._dataValidationCacheService.getValue(i, r, n,
|
1873
|
+
return a(t);
|
1874
|
+
const h = (V = (y = this._dataValidationCacheService.getValue(i, r, n, o)) == null ? void 0 : y.status) != null ? V : ne.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), C = e.rawData;
|
1884
1875
|
let m;
|
1885
1876
|
const f = {
|
1886
1877
|
get value() {
|
@@ -1893,7 +1884,7 @@ let zt = class extends ln {
|
|
1893
1884
|
return `${(R = f.value) != null ? R : ""}`;
|
1894
1885
|
}
|
1895
1886
|
};
|
1896
|
-
return
|
1887
|
+
return a({
|
1897
1888
|
...t,
|
1898
1889
|
dataValidation: {
|
1899
1890
|
ruleId: c,
|
@@ -1903,7 +1894,7 @@ let zt = class extends ln {
|
|
1903
1894
|
},
|
1904
1895
|
markers: {
|
1905
1896
|
...t == null ? void 0 : t.markers,
|
1906
|
-
...h === ne.INVALID ?
|
1897
|
+
...h === ne.INVALID ? Ta : null
|
1907
1898
|
},
|
1908
1899
|
customRender: [
|
1909
1900
|
...(S = t == null ? void 0 : t.customRender) != null ? S : [],
|
@@ -1920,14 +1911,14 @@ let zt = class extends ln {
|
|
1920
1911
|
const R = l.getStyles();
|
1921
1912
|
return (typeof (t == null ? void 0 : t.s) == "string" ? R.get(t == null ? void 0 : t.s) : t == null ? void 0 : t.s) || {};
|
1922
1913
|
}
|
1923
|
-
}, n,
|
1914
|
+
}, n, o)
|
1924
1915
|
},
|
1925
1916
|
interceptorAutoHeight: () => {
|
1926
1917
|
var A, M, U, B, w, v;
|
1927
1918
|
const R = (M = (A = this._renderManagerService.getRenderById(i)) == null ? void 0 : A.with(Ce).getWorksheetSkeleton(r)) == null ? void 0 : M.skeleton;
|
1928
1919
|
if (!R)
|
1929
1920
|
return;
|
1930
|
-
const P = R.worksheet.getMergedCell(n,
|
1921
|
+
const P = R.worksheet.getMergedCell(n, o), j = {
|
1931
1922
|
data: {
|
1932
1923
|
...t,
|
1933
1924
|
dataValidation: {
|
@@ -1938,11 +1929,11 @@ let zt = class extends ln {
|
|
1938
1929
|
}
|
1939
1930
|
},
|
1940
1931
|
style: R.getsStyles().getStyleByCell(t),
|
1941
|
-
primaryWithCoord: R.getCellByIndex((U = P == null ? void 0 : P.startRow) != null ? U : n, (B = P == null ? void 0 : P.startColumn) != null ? B :
|
1932
|
+
primaryWithCoord: R.getCellByIndex((U = P == null ? void 0 : P.startRow) != null ? U : n, (B = P == null ? void 0 : P.startColumn) != null ? B : o),
|
1942
1933
|
unitId: i,
|
1943
1934
|
subUnitId: r,
|
1944
1935
|
row: n,
|
1945
|
-
col:
|
1936
|
+
col: o,
|
1946
1937
|
workbook: l,
|
1947
1938
|
worksheet: s
|
1948
1939
|
};
|
@@ -1953,7 +1944,7 @@ let zt = class extends ln {
|
|
1953
1944
|
const R = (M = (A = this._renderManagerService.getRenderById(i)) == null ? void 0 : A.with(Ce).getWorksheetSkeleton(r)) == null ? void 0 : M.skeleton;
|
1954
1945
|
if (!R)
|
1955
1946
|
return;
|
1956
|
-
const P = R.worksheet.getMergedCell(n,
|
1947
|
+
const P = R.worksheet.getMergedCell(n, o), j = {
|
1957
1948
|
data: {
|
1958
1949
|
...t,
|
1959
1950
|
dataValidation: {
|
@@ -1964,11 +1955,11 @@ let zt = class extends ln {
|
|
1964
1955
|
}
|
1965
1956
|
},
|
1966
1957
|
style: R.getsStyles().getStyleByCell(t),
|
1967
|
-
primaryWithCoord: R.getCellByIndex((U = P == null ? void 0 : P.startRow) != null ? U : n, (B = P == null ? void 0 : P.startColumn) != null ? B :
|
1958
|
+
primaryWithCoord: R.getCellByIndex((U = P == null ? void 0 : P.startRow) != null ? U : n, (B = P == null ? void 0 : P.startColumn) != null ? B : o),
|
1968
1959
|
unitId: i,
|
1969
1960
|
subUnitId: r,
|
1970
1961
|
row: n,
|
1971
|
-
col:
|
1962
|
+
col: o,
|
1972
1963
|
workbook: l,
|
1973
1964
|
worksheet: s
|
1974
1965
|
};
|
@@ -1986,35 +1977,35 @@ let zt = class extends ln {
|
|
1986
1977
|
// patched data-validation change don't need to re-calc row height
|
1987
1978
|
// re-calc of row height will be triggered precisely by the origin command
|
1988
1979
|
mn((t) => t.source === "command"),
|
1989
|
-
|
1980
|
+
ca(16)
|
1990
1981
|
).subscribe((t) => {
|
1991
1982
|
const e = [];
|
1992
|
-
if (t.forEach((
|
1983
|
+
if (t.forEach((a) => {
|
1993
1984
|
var n;
|
1994
|
-
(n =
|
1985
|
+
(n = a.rule) != null && n.ranges && e.push(...a.rule.ranges);
|
1995
1986
|
}), e.length) {
|
1996
|
-
const
|
1997
|
-
Wn(
|
1987
|
+
const a = this._autoHeightController.getUndoRedoParamsOfAutoHeight(e);
|
1988
|
+
Wn(a.redos, this._commandService);
|
1998
1989
|
}
|
1999
1990
|
});
|
2000
1991
|
}
|
2001
1992
|
};
|
2002
|
-
zt =
|
2003
|
-
Q(0,
|
2004
|
-
Q(1,
|
1993
|
+
zt = La([
|
1994
|
+
Q(0, at),
|
1995
|
+
Q(1, Uo),
|
2005
1996
|
Q(2, ie),
|
2006
1997
|
Q(3, gt),
|
2007
|
-
Q(4, Y(
|
1998
|
+
Q(4, Y(ra)),
|
2008
1999
|
Q(5, Y(Ct)),
|
2009
2000
|
Q(6, Y(Rt)),
|
2010
2001
|
Q(7, Y(yt)),
|
2011
2002
|
Q(8, Y(cn)),
|
2012
|
-
Q(9, Y(
|
2013
|
-
Q(10,
|
2003
|
+
Q(9, Y(na)),
|
2004
|
+
Q(10, Qa(oa))
|
2014
2005
|
], zt);
|
2015
2006
|
let Tn = class extends ln {
|
2016
|
-
constructor(t, e,
|
2017
|
-
super(), this._commandService = t, this._renderManagerService = e, this._autoHeightController =
|
2007
|
+
constructor(t, e, a, n, o, i, r) {
|
2008
|
+
super(), this._commandService = t, this._renderManagerService = e, this._autoHeightController = a, this._dataValidatorRegistryService = n, this._sheetInterceptorService = o, this._sheetDataValidationModel = i, this._dataValidationCacheService = r, this._initViewModelIntercept(), this._initAutoHeight();
|
2018
2009
|
}
|
2019
2010
|
// eslint-disable-next-line max-lines-per-function
|
2020
2011
|
_initViewModelIntercept() {
|
@@ -2026,16 +2017,16 @@ let Tn = class extends ln {
|
|
2026
2017
|
// must be after numfmt
|
2027
2018
|
priority: Gn.DATA_VALIDATION,
|
2028
2019
|
// eslint-disable-next-line complexity
|
2029
|
-
handler: (t, e,
|
2020
|
+
handler: (t, e, a) => {
|
2030
2021
|
var D, y, V, S, x, E;
|
2031
|
-
const { row: n, col:
|
2022
|
+
const { row: n, col: o, unitId: i, subUnitId: r, workbook: l, worksheet: s } = e, c = this._sheetDataValidationModel.getRuleIdByLocation(i, r, n, o);
|
2032
2023
|
if (!c)
|
2033
|
-
return
|
2024
|
+
return a(t);
|
2034
2025
|
const u = this._sheetDataValidationModel.getRuleById(i, r, c);
|
2035
2026
|
if (!u)
|
2036
|
-
return
|
2037
|
-
const h = (y = (D = this._dataValidationCacheService.getValue(i, r, n,
|
2038
|
-
return
|
2027
|
+
return a(t);
|
2028
|
+
const h = (y = (D = this._dataValidationCacheService.getValue(i, r, n, o)) == null ? void 0 : D.status) != null ? y : ne.VALID, d = this._dataValidatorRegistryService.getValidatorItem(u.type), C = s.getCellRaw(n, o), m = st(C), f = `${m != null ? m : ""}`;
|
2029
|
+
return a({
|
2039
2030
|
...t,
|
2040
2031
|
dataValidation: {
|
2041
2032
|
ruleId: c,
|
@@ -2045,7 +2036,7 @@ let Tn = class extends ln {
|
|
2045
2036
|
},
|
2046
2037
|
markers: {
|
2047
2038
|
...t == null ? void 0 : t.markers,
|
2048
|
-
...h === ne.INVALID ?
|
2039
|
+
...h === ne.INVALID ? Ta : null
|
2049
2040
|
},
|
2050
2041
|
customRender: [
|
2051
2042
|
...(V = t == null ? void 0 : t.customRender) != null ? V : [],
|
@@ -2062,14 +2053,14 @@ let Tn = class extends ln {
|
|
2062
2053
|
const $ = l.getStyles();
|
2063
2054
|
return (typeof (t == null ? void 0 : t.s) == "string" ? $.get(t == null ? void 0 : t.s) : t == null ? void 0 : t.s) || {};
|
2064
2055
|
}
|
2065
|
-
}, n,
|
2056
|
+
}, n, o)
|
2066
2057
|
},
|
2067
2058
|
interceptorAutoHeight: () => {
|
2068
2059
|
var j, A, M, U, B, w;
|
2069
2060
|
const $ = (A = (j = this._renderManagerService.getRenderById(i)) == null ? void 0 : j.with(Ce).getWorksheetSkeleton(r)) == null ? void 0 : A.skeleton;
|
2070
2061
|
if (!$)
|
2071
2062
|
return;
|
2072
|
-
const R = $.worksheet.getMergedCell(n,
|
2063
|
+
const R = $.worksheet.getMergedCell(n, o), P = {
|
2073
2064
|
data: {
|
2074
2065
|
...t,
|
2075
2066
|
dataValidation: {
|
@@ -2080,11 +2071,11 @@ let Tn = class extends ln {
|
|
2080
2071
|
}
|
2081
2072
|
},
|
2082
2073
|
style: $.getsStyles().getStyleByCell(t),
|
2083
|
-
primaryWithCoord: $.getCellByIndex((M = R == null ? void 0 : R.startRow) != null ? M : n, (U = R == null ? void 0 : R.startColumn) != null ? U :
|
2074
|
+
primaryWithCoord: $.getCellByIndex((M = R == null ? void 0 : R.startRow) != null ? M : n, (U = R == null ? void 0 : R.startColumn) != null ? U : o),
|
2084
2075
|
unitId: i,
|
2085
2076
|
subUnitId: r,
|
2086
2077
|
row: n,
|
2087
|
-
col:
|
2078
|
+
col: o,
|
2088
2079
|
workbook: l,
|
2089
2080
|
worksheet: s
|
2090
2081
|
};
|
@@ -2100,51 +2091,51 @@ let Tn = class extends ln {
|
|
2100
2091
|
_initAutoHeight() {
|
2101
2092
|
this._sheetDataValidationModel.ruleChange$.pipe(
|
2102
2093
|
mn((t) => t.source === "command"),
|
2103
|
-
|
2094
|
+
ca(16)
|
2104
2095
|
).subscribe((t) => {
|
2105
2096
|
const e = [];
|
2106
|
-
if (t.forEach((
|
2097
|
+
if (t.forEach((a) => {
|
2107
2098
|
var n;
|
2108
|
-
(n =
|
2099
|
+
(n = a.rule) != null && n.ranges && e.push(...a.rule.ranges);
|
2109
2100
|
}), e.length) {
|
2110
|
-
const
|
2111
|
-
Wn(
|
2101
|
+
const a = this._autoHeightController.getUndoRedoParamsOfAutoHeight(e);
|
2102
|
+
Wn(a.redos, this._commandService);
|
2112
2103
|
}
|
2113
2104
|
});
|
2114
2105
|
}
|
2115
2106
|
};
|
2116
|
-
Tn =
|
2117
|
-
Q(0,
|
2107
|
+
Tn = La([
|
2108
|
+
Q(0, at),
|
2118
2109
|
Q(1, ie),
|
2119
|
-
Q(2, Y(
|
2110
|
+
Q(2, Y(ra)),
|
2120
2111
|
Q(3, Y(yt)),
|
2121
2112
|
Q(4, Y(cn)),
|
2122
2113
|
Q(5, Y(Rt)),
|
2123
|
-
Q(6, Y(
|
2114
|
+
Q(6, Y(na))
|
2124
2115
|
], Tn);
|
2125
|
-
var Rr = Object.defineProperty, yr = Object.getOwnPropertyDescriptor, Vr = (t, e,
|
2126
|
-
for (var
|
2127
|
-
(r = t[i]) && (
|
2128
|
-
return n &&
|
2129
|
-
}, xn = (t, e) => (
|
2116
|
+
var Rr = Object.defineProperty, yr = Object.getOwnPropertyDescriptor, Vr = (t, e, a, n) => {
|
2117
|
+
for (var o = n > 1 ? void 0 : n ? yr(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
2118
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
2119
|
+
return n && o && Rr(e, a, o), o;
|
2120
|
+
}, xn = (t, e) => (a, n) => e(a, n, t);
|
2130
2121
|
let Ie = class extends Dt {
|
2131
|
-
constructor(t, e,
|
2132
|
-
super(), this._context = t, this._sheetDataValidationModel = e, this._sheetSkeletonManagerService =
|
2122
|
+
constructor(t, e, a) {
|
2123
|
+
super(), this._context = t, this._sheetDataValidationModel = e, this._sheetSkeletonManagerService = a, this._initSkeletonChange();
|
2133
2124
|
}
|
2134
2125
|
_initSkeletonChange() {
|
2135
2126
|
const t = (e) => {
|
2136
2127
|
var n;
|
2137
2128
|
if (!e.length)
|
2138
2129
|
return;
|
2139
|
-
const
|
2140
|
-
e.forEach((
|
2141
|
-
|
2142
|
-
}),
|
2130
|
+
const a = /* @__PURE__ */ new Set();
|
2131
|
+
e.forEach((o) => {
|
2132
|
+
a.add(o.subUnitId);
|
2133
|
+
}), a.forEach((o) => {
|
2143
2134
|
var i;
|
2144
|
-
(i = this._sheetSkeletonManagerService.getWorksheetSkeleton(
|
2135
|
+
(i = this._sheetSkeletonManagerService.getWorksheetSkeleton(o)) == null || i.skeleton.makeDirty(!0);
|
2145
2136
|
}), (n = this._context.mainComponent) == null || n.makeForceDirty();
|
2146
2137
|
};
|
2147
|
-
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(
|
2138
|
+
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(to(16)).subscribe(t));
|
2148
2139
|
}
|
2149
2140
|
};
|
2150
2141
|
Ie = Vr([
|
@@ -2162,17 +2153,17 @@ const Mr = "univer-data-validation-formula", br = "univer-data-validation-formul
|
|
2162
2153
|
dataValidationFormulaColorSelectPanel: Tr,
|
2163
2154
|
dataValidationFormulaColorItem: xr
|
2164
2155
|
}, Ar = (t) => {
|
2165
|
-
const { isTwoFormula: e = !1, value:
|
2156
|
+
const { isTwoFormula: e = !1, value: a, onChange: n, showError: o, validResult: i } = t, r = H(nt), l = o ? i == null ? void 0 : i.formula1 : "", s = o ? i == null ? void 0 : i.formula2 : "";
|
2166
2157
|
return e ? /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
2167
2158
|
/* @__PURE__ */ p.jsx(tt, { error: l, children: /* @__PURE__ */ p.jsx(
|
2168
2159
|
Tt,
|
2169
2160
|
{
|
2170
2161
|
className: it.dataValidationFormula,
|
2171
2162
|
placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
|
2172
|
-
value:
|
2163
|
+
value: a == null ? void 0 : a.formula1,
|
2173
2164
|
onChange: (c) => {
|
2174
2165
|
n == null || n({
|
2175
|
-
...
|
2166
|
+
...a,
|
2176
2167
|
formula1: c
|
2177
2168
|
});
|
2178
2169
|
}
|
@@ -2184,10 +2175,10 @@ const Mr = "univer-data-validation-formula", br = "univer-data-validation-formul
|
|
2184
2175
|
{
|
2185
2176
|
className: it.dataValidationFormula,
|
2186
2177
|
placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
|
2187
|
-
value:
|
2178
|
+
value: a == null ? void 0 : a.formula2,
|
2188
2179
|
onChange: (c) => {
|
2189
2180
|
n == null || n({
|
2190
|
-
...
|
2181
|
+
...a,
|
2191
2182
|
formula2: c
|
2192
2183
|
});
|
2193
2184
|
}
|
@@ -2198,7 +2189,7 @@ const Mr = "univer-data-validation-formula", br = "univer-data-validation-formul
|
|
2198
2189
|
{
|
2199
2190
|
className: it.dataValidationFormula,
|
2200
2191
|
placeholder: r.t("dataValidation.panel.formulaPlaceholder"),
|
2201
|
-
value:
|
2192
|
+
value: a == null ? void 0 : a.formula1,
|
2202
2193
|
onChange: (c) => {
|
2203
2194
|
n == null || n({ formula1: c });
|
2204
2195
|
}
|
@@ -2206,14 +2197,14 @@ const Mr = "univer-data-validation-formula", br = "univer-data-validation-formul
|
|
2206
2197
|
) });
|
2207
2198
|
};
|
2208
2199
|
function jr(t) {
|
2209
|
-
const { value: e, onChange:
|
2200
|
+
const { value: e, onChange: a, showError: n, validResult: o } = t, i = H(nt), r = n ? o == null ? void 0 : o.formula1 : "", l = n ? o == null ? void 0 : o.formula2 : "", [s, c] = q(!((e == null ? void 0 : e.formula1) === void 0 && (e == null ? void 0 : e.formula2) === void 0));
|
2210
2201
|
return /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
2211
2202
|
/* @__PURE__ */ p.jsx(tt, { children: /* @__PURE__ */ p.jsx(
|
2212
2203
|
Ve,
|
2213
2204
|
{
|
2214
2205
|
checked: s,
|
2215
2206
|
onChange: (u) => {
|
2216
|
-
u ? c(!0) : (c(!1),
|
2207
|
+
u ? c(!0) : (c(!1), a == null || a({
|
2217
2208
|
...e,
|
2218
2209
|
formula1: void 0,
|
2219
2210
|
formula2: void 0
|
@@ -2229,7 +2220,7 @@ function jr(t) {
|
|
2229
2220
|
placeholder: i.t("dataValidation.panel.valuePlaceholder"),
|
2230
2221
|
value: e == null ? void 0 : e.formula1,
|
2231
2222
|
onChange: (u) => {
|
2232
|
-
|
2223
|
+
a == null || a({
|
2233
2224
|
...e,
|
2234
2225
|
formula1: u || void 0
|
2235
2226
|
});
|
@@ -2243,7 +2234,7 @@ function jr(t) {
|
|
2243
2234
|
placeholder: i.t("dataValidation.panel.valuePlaceholder"),
|
2244
2235
|
value: e == null ? void 0 : e.formula2,
|
2245
2236
|
onChange: (u) => {
|
2246
|
-
|
2237
|
+
a == null || a({
|
2247
2238
|
...e,
|
2248
2239
|
formula2: u || void 0
|
2249
2240
|
});
|
@@ -2254,21 +2245,21 @@ function jr(t) {
|
|
2254
2245
|
}
|
2255
2246
|
function Fr(t) {
|
2256
2247
|
var h;
|
2257
|
-
const { unitId: e, subUnitId:
|
2248
|
+
const { unitId: e, subUnitId: a, value: n, onChange: o, showError: i, validResult: r } = t, l = i ? r == null ? void 0 : r.formula1 : void 0, s = Bt({}), [c, u] = q(!1);
|
2258
2249
|
return fn((d) => {
|
2259
2250
|
var m;
|
2260
2251
|
const C = (m = s.current) == null ? void 0 : m.handleOutClick;
|
2261
2252
|
C && C(d, () => u(!1));
|
2262
2253
|
}), /* @__PURE__ */ p.jsx(
|
2263
|
-
|
2254
|
+
ha,
|
2264
2255
|
{
|
2265
2256
|
initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "",
|
2266
2257
|
unitId: e,
|
2267
|
-
subUnitId:
|
2258
|
+
subUnitId: a,
|
2268
2259
|
isFocus: c,
|
2269
2260
|
onChange: (d) => {
|
2270
2261
|
const C = (d != null ? d : "").trim();
|
2271
|
-
C !== (n == null ? void 0 : n.formula1) && (
|
2262
|
+
C !== (n == null ? void 0 : n.formula1) && (o == null || o({
|
2272
2263
|
...n,
|
2273
2264
|
formula1: C
|
2274
2265
|
}));
|
@@ -2279,17 +2270,17 @@ function Fr(t) {
|
|
2279
2270
|
}
|
2280
2271
|
);
|
2281
2272
|
}
|
2282
|
-
function
|
2283
|
-
var e,
|
2273
|
+
function xa(t) {
|
2274
|
+
var e, a, n = "";
|
2284
2275
|
if (typeof t == "string" || typeof t == "number") n += t;
|
2285
2276
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
2286
|
-
var
|
2287
|
-
for (e = 0; e <
|
2288
|
-
} else for (
|
2277
|
+
var o = t.length;
|
2278
|
+
for (e = 0; e < o; e++) t[e] && (a = xa(t[e])) && (n && (n += " "), n += a);
|
2279
|
+
} else for (a in t) t[a] && (n && (n += " "), n += a);
|
2289
2280
|
return n;
|
2290
2281
|
}
|
2291
2282
|
function Nr() {
|
2292
|
-
for (var t, e,
|
2283
|
+
for (var t, e, a = 0, n = "", o = arguments.length; a < o; a++) (t = arguments[a]) && (e = xa(t)) && (n && (n += " "), n += e);
|
2293
2284
|
return n;
|
2294
2285
|
}
|
2295
2286
|
const Ur = [
|
@@ -2318,17 +2309,18 @@ const Ur = [
|
|
2318
2309
|
"#9E6DE3",
|
2319
2310
|
"#F248A6"
|
2320
2311
|
], kr = (t) => {
|
2321
|
-
const { value: e, onChange:
|
2312
|
+
const { value: e, onChange: a, disabled: n } = t, [o, i] = q(!1);
|
2322
2313
|
return /* @__PURE__ */ p.jsx(
|
2323
2314
|
Ze,
|
2324
2315
|
{
|
2325
2316
|
disabled: n,
|
2326
|
-
open:
|
2317
|
+
open: o,
|
2327
2318
|
onDropdownVisibleChange: i,
|
2328
2319
|
dropdownStyle: { width: 112 },
|
2320
|
+
style: { width: 96, cursor: "pointer" },
|
2329
2321
|
className: it.dataValidationFormulaColorSelect,
|
2330
2322
|
value: e,
|
2331
|
-
onChange:
|
2323
|
+
onChange: a,
|
2332
2324
|
labelRender: (r) => /* @__PURE__ */ p.jsx(
|
2333
2325
|
"div",
|
2334
2326
|
{
|
@@ -2341,7 +2333,7 @@ const Ur = [
|
|
2341
2333
|
"div",
|
2342
2334
|
{
|
2343
2335
|
onClick: () => {
|
2344
|
-
|
2336
|
+
a(r), i(!1);
|
2345
2337
|
},
|
2346
2338
|
className: it.dataValidationFormulaColorItem,
|
2347
2339
|
style: { background: r }
|
@@ -2352,15 +2344,15 @@ const Ur = [
|
|
2352
2344
|
}
|
2353
2345
|
);
|
2354
2346
|
}, An = (t) => {
|
2355
|
-
const { item: e, commonProps:
|
2347
|
+
const { item: e, commonProps: a, style: n } = t, { onItemChange: o, onItemDelete: i } = a;
|
2356
2348
|
return /* @__PURE__ */ p.jsxs("div", { className: it.dataValidationFormulaListItem, style: n, children: [
|
2357
|
-
e.isRef ? null : /* @__PURE__ */ p.jsx("div", { className: Nr(it.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ p.jsx(
|
2349
|
+
e.isRef ? null : /* @__PURE__ */ p.jsx("div", { className: Nr(it.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ p.jsx(ya, {}) }),
|
2358
2350
|
/* @__PURE__ */ p.jsx(
|
2359
2351
|
kr,
|
2360
2352
|
{
|
2361
2353
|
value: e.color,
|
2362
2354
|
onChange: (r) => {
|
2363
|
-
|
2355
|
+
o(e.id, e.label, r);
|
2364
2356
|
}
|
2365
2357
|
}
|
2366
2358
|
),
|
@@ -2370,7 +2362,7 @@ const Ur = [
|
|
2370
2362
|
disabled: e.isRef,
|
2371
2363
|
value: e.label,
|
2372
2364
|
onChange: (r) => {
|
2373
|
-
|
2365
|
+
o(e.id, r, e.color);
|
2374
2366
|
}
|
2375
2367
|
}
|
2376
2368
|
),
|
@@ -2378,20 +2370,20 @@ const Ur = [
|
|
2378
2370
|
] });
|
2379
2371
|
};
|
2380
2372
|
function Br(t) {
|
2381
|
-
const { value: e, onChange:
|
2382
|
-
}, unitId: n, subUnitId:
|
2373
|
+
const { value: e, onChange: a = () => {
|
2374
|
+
}, unitId: n, subUnitId: o, validResult: i, showError: r, ruleId: l } = t, { formula1: s = "", formula2: c = "" } = e || {}, u = Bt(null), [h, d] = q(() => Et(s) ? "1" : "0"), [C, m] = q(h === "1" ? s : "="), [f, D] = q(h === "1" ? s : "="), y = H(nt), V = H(yt), S = H(be), x = H(Co), [E, $] = q(() => c.split(",")), R = V.getValidatorItem(et.LIST), [P, j] = q([]), [A, M] = q(""), U = r ? i == null ? void 0 : i.formula1 : "", B = Pt(() => S.ruleChange$.pipe(gn(16)), []), w = jt(B), v = da(a);
|
2383
2375
|
St(() => {
|
2384
2376
|
(async () => {
|
2385
2377
|
await new Promise((N) => {
|
2386
2378
|
setTimeout(() => N(!0), 100);
|
2387
2379
|
});
|
2388
|
-
const O = S.getRuleById(n,
|
2380
|
+
const O = S.getRuleById(n, o, l), W = O == null ? void 0 : O.formula1;
|
2389
2381
|
if (Et(W) && R && O) {
|
2390
|
-
const N = await R.getListAsync(O, n,
|
2382
|
+
const N = await R.getListAsync(O, n, o);
|
2391
2383
|
j(N);
|
2392
2384
|
}
|
2393
2385
|
})();
|
2394
|
-
}, [S, w, R, l,
|
2386
|
+
}, [S, w, R, l, o, n]), St(() => {
|
2395
2387
|
Et(s) && s !== f && (m(s), D(f));
|
2396
2388
|
}, [f, s]);
|
2397
2389
|
const [g, I] = q(() => {
|
@@ -2403,7 +2395,7 @@ function Br(t) {
|
|
2403
2395
|
id: Ge.generateRandomId(4)
|
2404
2396
|
}));
|
2405
2397
|
}), _ = (O, W, N) => {
|
2406
|
-
const z = g.find((
|
2398
|
+
const z = g.find((ot) => ot.id === O);
|
2407
2399
|
z && (z.label = W, z.color = N, I([...g]));
|
2408
2400
|
}, L = (O) => {
|
2409
2401
|
const W = g.findIndex((N) => N.id === O);
|
@@ -2438,9 +2430,9 @@ function Br(t) {
|
|
2438
2430
|
labelList: N.label.split(","),
|
2439
2431
|
item: N
|
2440
2432
|
})).forEach(({ item: N, labelList: z }) => {
|
2441
|
-
z.forEach((
|
2442
|
-
O.has(
|
2443
|
-
label:
|
2433
|
+
z.forEach((ot) => {
|
2434
|
+
O.has(ot) || (O.add(ot), W.push({
|
2435
|
+
label: ot,
|
2444
2436
|
color: N.color
|
2445
2437
|
}));
|
2446
2438
|
});
|
@@ -2491,11 +2483,11 @@ function Br(t) {
|
|
2491
2483
|
) }),
|
2492
2484
|
h === "1" ? /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
2493
2485
|
/* @__PURE__ */ p.jsx(
|
2494
|
-
|
2486
|
+
ha,
|
2495
2487
|
{
|
2496
2488
|
initValue: C,
|
2497
2489
|
unitId: n,
|
2498
|
-
subUnitId:
|
2490
|
+
subUnitId: o,
|
2499
2491
|
isFocus: J,
|
2500
2492
|
onChange: (O = "") => {
|
2501
2493
|
const W = (O != null ? O : "").trim();
|
@@ -2509,7 +2501,7 @@ function Br(t) {
|
|
2509
2501
|
/* @__PURE__ */ p.jsx("div", { ref: u, style: { marginTop: "12px" }, children: k.map((O) => /* @__PURE__ */ p.jsx(An, { item: O, commonProps: { onItemChange: X }, style: { marginBottom: 12 } }, O.id)) })
|
2510
2502
|
] }) : /* @__PURE__ */ p.jsx(tt, { error: U, children: /* @__PURE__ */ p.jsxs("div", { ref: u, style: { marginTop: "-12px" }, children: [
|
2511
2503
|
/* @__PURE__ */ p.jsx(
|
2512
|
-
|
2504
|
+
ro,
|
2513
2505
|
{
|
2514
2506
|
list: g,
|
2515
2507
|
onListChange: I,
|
@@ -2531,15 +2523,15 @@ function Br(t) {
|
|
2531
2523
|
}
|
2532
2524
|
),
|
2533
2525
|
/* @__PURE__ */ p.jsxs("a", { className: it.dataValidationFormulaListAdd, onClick: K, children: [
|
2534
|
-
/* @__PURE__ */ p.jsx(
|
2526
|
+
/* @__PURE__ */ p.jsx(Ia, {}),
|
2535
2527
|
y.t("dataValidation.list.add")
|
2536
2528
|
] })
|
2537
2529
|
] }) })
|
2538
2530
|
] });
|
2539
2531
|
}
|
2540
|
-
const
|
2532
|
+
const Aa = "data-validation.custom-formula-input", Pe = "data-validation.formula-input", In = "data-validation.list-formula-input", ja = "data-validation.checkbox-formula-input", Wr = [
|
2541
2533
|
[
|
2542
|
-
|
2534
|
+
Aa,
|
2543
2535
|
Fr
|
2544
2536
|
],
|
2545
2537
|
[
|
@@ -2551,14 +2543,14 @@ const jo = "data-validation.custom-formula-input", Pe = "data-validation.formula
|
|
2551
2543
|
Br
|
2552
2544
|
],
|
2553
2545
|
[
|
2554
|
-
|
2546
|
+
ja,
|
2555
2547
|
jr
|
2556
2548
|
]
|
2557
2549
|
], Hr = "LIST_RENDER_MODE_OPTION_INPUT";
|
2558
2550
|
function De(t) {
|
2559
|
-
var
|
2560
|
-
const { value: e, onChange:
|
2561
|
-
return /* @__PURE__ */ p.jsx(tt, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ p.jsxs(dn, { value: `${(
|
2551
|
+
var o;
|
2552
|
+
const { value: e, onChange: a } = t, n = H(nt);
|
2553
|
+
return /* @__PURE__ */ p.jsx(tt, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ p.jsxs(dn, { value: `${(o = e.renderMode) != null ? o : dt.CUSTOM}`, onChange: (i) => a({ ...e, renderMode: +i }), children: [
|
2562
2554
|
/* @__PURE__ */ p.jsx(Lt, { value: `${dt.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
|
2563
2555
|
/* @__PURE__ */ p.jsx(Lt, { value: `${dt.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
|
2564
2556
|
/* @__PURE__ */ p.jsx(Lt, { value: `${dt.TEXT}`, children: n.t("dataValidation.renderMode.text") })
|
@@ -2567,14 +2559,14 @@ function De(t) {
|
|
2567
2559
|
De.componentKey = Hr;
|
2568
2560
|
const Yr = "DATE_SHOW_TIME_OPTION";
|
2569
2561
|
function Re(t) {
|
2570
|
-
var
|
2571
|
-
const { value: e, onChange:
|
2562
|
+
var o;
|
2563
|
+
const { value: e, onChange: a } = t, n = H(nt);
|
2572
2564
|
return /* @__PURE__ */ p.jsx(tt, { children: /* @__PURE__ */ p.jsx(
|
2573
2565
|
Ve,
|
2574
2566
|
{
|
2575
|
-
checked: (
|
2567
|
+
checked: (o = e.bizInfo) == null ? void 0 : o.showTime,
|
2576
2568
|
onChange: (i) => {
|
2577
|
-
|
2569
|
+
a({
|
2578
2570
|
...e,
|
2579
2571
|
bizInfo: {
|
2580
2572
|
...e.bizInfo,
|
@@ -2587,21 +2579,21 @@ function Re(t) {
|
|
2587
2579
|
) });
|
2588
2580
|
}
|
2589
2581
|
Re.componentKey = Yr;
|
2590
|
-
var Xr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Kr = (t, e,
|
2591
|
-
for (var
|
2592
|
-
(r = t[i]) && (
|
2593
|
-
return n &&
|
2594
|
-
}, Ne = (t, e) => (
|
2582
|
+
var Xr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Kr = (t, e, a, n) => {
|
2583
|
+
for (var o = n > 1 ? void 0 : n ? zr(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
2584
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
2585
|
+
return n && o && Xr(e, a, o), o;
|
2586
|
+
}, Ne = (t, e) => (a, n) => e(a, n, t);
|
2595
2587
|
const ce = 6;
|
2596
2588
|
let nn = class {
|
2597
|
-
constructor(t, e,
|
2598
|
-
this._commandService = t, this._formulaService = e, this._themeService =
|
2589
|
+
constructor(t, e, a) {
|
2590
|
+
this._commandService = t, this._formulaService = e, this._themeService = a;
|
2599
2591
|
}
|
2600
2592
|
_calc(t, e) {
|
2601
2593
|
var c, u, h;
|
2602
|
-
const { vt:
|
2594
|
+
const { vt: a, ht: n } = e || {}, o = t.endX - t.startX - ce * 2, i = t.endY - t.startY, r = ((c = e == null ? void 0 : e.fs) != null ? c : 10) * 1.6;
|
2603
2595
|
let l = 0, s = 0;
|
2604
|
-
switch (
|
2596
|
+
switch (a) {
|
2605
2597
|
case ut.TOP:
|
2606
2598
|
s = 0;
|
2607
2599
|
break;
|
@@ -2617,10 +2609,10 @@ let nn = class {
|
|
2617
2609
|
l = ce;
|
2618
2610
|
break;
|
2619
2611
|
case Wt.RIGHT:
|
2620
|
-
l = ce + (
|
2612
|
+
l = ce + (o - r);
|
2621
2613
|
break;
|
2622
2614
|
default:
|
2623
|
-
l = ce + (
|
2615
|
+
l = ce + (o - r) / 2;
|
2624
2616
|
break;
|
2625
2617
|
}
|
2626
2618
|
return {
|
@@ -2631,33 +2623,33 @@ let nn = class {
|
|
2631
2623
|
};
|
2632
2624
|
}
|
2633
2625
|
calcCellAutoHeight(t) {
|
2634
|
-
var
|
2626
|
+
var a;
|
2635
2627
|
const { style: e } = t;
|
2636
|
-
return ((
|
2628
|
+
return ((a = e == null ? void 0 : e.fs) != null ? a : 10) * 1.6;
|
2637
2629
|
}
|
2638
2630
|
calcCellAutoWidth(t) {
|
2639
|
-
var
|
2631
|
+
var a;
|
2640
2632
|
const { style: e } = t;
|
2641
|
-
return ((
|
2633
|
+
return ((a = e == null ? void 0 : e.fs) != null ? a : 10) * 1.6;
|
2642
2634
|
}
|
2643
|
-
async _parseFormula(t, e,
|
2635
|
+
async _parseFormula(t, e, a) {
|
2644
2636
|
var c, u, h, d, C, m, f, D, y;
|
2645
|
-
const { formula1: n =
|
2637
|
+
const { formula1: n = Do, formula2: o = Ro } = t, i = await this._formulaService.getRuleFormulaResult(e, a, t.uid), r = Te((h = (u = (c = i == null ? void 0 : i[0]) == null ? void 0 : c.result) == null ? void 0 : u[0]) == null ? void 0 : h[0]), l = Te((m = (C = (d = i == null ? void 0 : i[1]) == null ? void 0 : d.result) == null ? void 0 : C[0]) == null ? void 0 : m[0]), s = Vn(String(r)) && Vn(String(l));
|
2646
2638
|
return {
|
2647
2639
|
formula1: Et(n) ? Te((y = (D = (f = i == null ? void 0 : i[0]) == null ? void 0 : f.result) == null ? void 0 : D[0]) == null ? void 0 : y[0]) : n,
|
2648
|
-
formula2: Et(
|
2640
|
+
formula2: Et(o) ? l : o,
|
2649
2641
|
isFormulaValid: s
|
2650
2642
|
};
|
2651
2643
|
}
|
2652
2644
|
drawWith(t, e) {
|
2653
2645
|
var B, w, v, g, I, _;
|
2654
|
-
const { style:
|
2646
|
+
const { style: a, data: n, primaryWithCoord: o, unitId: i, subUnitId: r, worksheet: l, row: s, col: c } = e, u = o.isMergedMainCell ? o.mergeInfo : o, h = st(l.getCellRaw(s, c)), d = (B = n.dataValidation) == null ? void 0 : B.rule, C = (w = n.dataValidation) == null ? void 0 : w.validator;
|
2655
2647
|
if (!d || !C)
|
2656
2648
|
return;
|
2657
2649
|
const m = this._themeService.getCurrentTheme();
|
2658
2650
|
if (!((v = C.skipDefaultFontRender) != null && v.call(C, d, h, { unitId: i, subUnitId: r, row: s, column: c })))
|
2659
2651
|
return;
|
2660
|
-
const f = C.parseFormulaSync(d, i, r), { formula1: D } = f, y = this._calc(u,
|
2652
|
+
const f = C.parseFormulaSync(d, i, r), { formula1: D } = f, y = this._calc(u, a), { a: V, d: S } = t.getTransform(), x = Rn(y.left, V), E = Rn(y.top, S), $ = so.create().composeMatrix({
|
2661
2653
|
left: x,
|
2662
2654
|
top: E,
|
2663
2655
|
scaleX: 1,
|
@@ -2671,34 +2663,34 @@ let nn = class {
|
|
2671
2663
|
t.save(), t.beginPath(), t.rect(u.startX, u.startY, R, P), t.clip();
|
2672
2664
|
const j = $.getMatrix();
|
2673
2665
|
t.transform(j[0], j[1], j[2], j[3], j[4], j[5]);
|
2674
|
-
const A = ((g =
|
2675
|
-
|
2666
|
+
const A = ((g = a == null ? void 0 : a.fs) != null ? g : 10) * 1.6, M = String(h) === String(D), U = m.hyacinth500;
|
2667
|
+
lo.drawWith(t, {
|
2676
2668
|
checked: M,
|
2677
2669
|
width: A,
|
2678
2670
|
height: A,
|
2679
|
-
fill: (_ = (I =
|
2671
|
+
fill: (_ = (I = a == null ? void 0 : a.cl) == null ? void 0 : I.rgb) != null ? _ : U
|
2680
2672
|
}), t.restore();
|
2681
2673
|
}
|
2682
2674
|
isHit(t, e) {
|
2683
|
-
const
|
2684
|
-
return s <= l && s >= r && c <= i && c >=
|
2675
|
+
const a = e.primaryWithCoord.isMergedMainCell ? e.primaryWithCoord.mergeInfo : e.primaryWithCoord, n = this._calc(a, e.style), o = n.top, i = n.top + n.height, r = n.left, l = n.left + n.width, { x: s, y: c } = t;
|
2676
|
+
return s <= l && s >= r && c <= i && c >= o;
|
2685
2677
|
}
|
2686
2678
|
async onPointerDown(t, e) {
|
2687
2679
|
var f, D, y;
|
2688
2680
|
if (e.button === 2)
|
2689
2681
|
return;
|
2690
|
-
const { primaryWithCoord:
|
2691
|
-
if (!u || !h || !((y = h.skipDefaultFontRender) != null && y.call(h, u, c, { unitId: n, subUnitId:
|
2682
|
+
const { primaryWithCoord: a, unitId: n, subUnitId: o, data: i, worksheet: r, row: l, col: s } = t, c = st(r.getCellRaw(l, s)), u = (f = i.dataValidation) == null ? void 0 : f.rule, h = (D = i.dataValidation) == null ? void 0 : D.validator;
|
2683
|
+
if (!u || !h || !((y = h.skipDefaultFontRender) != null && y.call(h, u, c, { unitId: n, subUnitId: o, row: l, column: s })))
|
2692
2684
|
return;
|
2693
|
-
const { formula1: d, formula2: C } = await this._parseFormula(u, n,
|
2685
|
+
const { formula1: d, formula2: C } = await this._parseFormula(u, n, o), m = {
|
2694
2686
|
range: {
|
2695
|
-
startColumn:
|
2696
|
-
endColumn:
|
2697
|
-
startRow:
|
2698
|
-
endRow:
|
2687
|
+
startColumn: a.actualColumn,
|
2688
|
+
endColumn: a.actualColumn,
|
2689
|
+
startRow: a.actualRow,
|
2690
|
+
endRow: a.actualRow
|
2699
2691
|
},
|
2700
2692
|
value: {
|
2701
|
-
v: String(c) ===
|
2693
|
+
v: String(c) === Io(String(d)) ? C : d,
|
2702
2694
|
p: null
|
2703
2695
|
}
|
2704
2696
|
};
|
@@ -2709,15 +2701,15 @@ let nn = class {
|
|
2709
2701
|
}
|
2710
2702
|
};
|
2711
2703
|
nn = Kr([
|
2712
|
-
Ne(0,
|
2713
|
-
Ne(1, Y(
|
2714
|
-
Ne(2, Y(
|
2704
|
+
Ne(0, at),
|
2705
|
+
Ne(1, Y(wo)),
|
2706
|
+
Ne(2, Y(eo))
|
2715
2707
|
], nn);
|
2716
|
-
var Gr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, qr = (t, e,
|
2717
|
-
for (var
|
2718
|
-
(r = t[i]) && (
|
2719
|
-
return n &&
|
2720
|
-
}, Jr = (t, e) => (
|
2708
|
+
var Gr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, qr = (t, e, a, n) => {
|
2709
|
+
for (var o = n > 1 ? void 0 : n ? Zr(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
2710
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
2711
|
+
return n && o && Gr(e, a, o), o;
|
2712
|
+
}, Jr = (t, e) => (a, n) => e(a, n, t);
|
2721
2713
|
let mt = class {
|
2722
2714
|
constructor(t) {
|
2723
2715
|
F(this, "canvasRender", null);
|
@@ -2735,14 +2727,14 @@ class Qr extends mt {
|
|
2735
2727
|
super(...arguments);
|
2736
2728
|
F(this, "id", et.CHECKBOX);
|
2737
2729
|
F(this, "canvasRender", this.injector.createInstance(nn));
|
2738
|
-
F(this, "formulaInput",
|
2730
|
+
F(this, "formulaInput", ja);
|
2739
2731
|
}
|
2740
2732
|
}
|
2741
2733
|
class ts extends mt {
|
2742
2734
|
constructor() {
|
2743
2735
|
super(...arguments);
|
2744
2736
|
F(this, "id", et.CUSTOM);
|
2745
|
-
F(this, "formulaInput",
|
2737
|
+
F(this, "formulaInput", Aa);
|
2746
2738
|
}
|
2747
2739
|
}
|
2748
2740
|
const es = "data-validation.formula-input";
|
@@ -2752,27 +2744,27 @@ class ns extends mt {
|
|
2752
2744
|
F(this, "id", et.DATE);
|
2753
2745
|
F(this, "formulaInput", es);
|
2754
2746
|
F(this, "optionsInput", Re.componentKey);
|
2755
|
-
F(this, "dropdown",
|
2747
|
+
F(this, "dropdown", Ea);
|
2756
2748
|
}
|
2757
2749
|
}
|
2758
|
-
class
|
2750
|
+
class as extends mt {
|
2759
2751
|
constructor() {
|
2760
2752
|
super(...arguments);
|
2761
2753
|
F(this, "id", et.DECIMAL);
|
2762
2754
|
F(this, "formulaInput", Pe);
|
2763
2755
|
}
|
2764
2756
|
}
|
2765
|
-
const
|
2757
|
+
const Fa = 4, os = 0, Ue = 4, Na = 4, an = 6, ye = 6, Ot = 14;
|
2766
2758
|
function is(t, e) {
|
2767
|
-
const
|
2759
|
+
const a = co.getTextSize(t, e), n = a.width + Fa * 2, { ba: o, bd: i } = a, r = o + i;
|
2768
2760
|
return {
|
2769
2761
|
width: n,
|
2770
|
-
height: r +
|
2771
|
-
ba:
|
2762
|
+
height: r + os * 2,
|
2763
|
+
ba: o
|
2772
2764
|
};
|
2773
2765
|
}
|
2774
|
-
function ke(t, e,
|
2775
|
-
const
|
2766
|
+
function ke(t, e, a, n) {
|
2767
|
+
const o = Ot + an * 2, i = a - o, r = n - ye * 2, l = t.map((d) => ({
|
2776
2768
|
layout: is(d, e),
|
2777
2769
|
text: d
|
2778
2770
|
}));
|
@@ -2794,35 +2786,35 @@ function ke(t, e, o, n) {
|
|
2794
2786
|
});
|
2795
2787
|
let u = 0, h = 0;
|
2796
2788
|
return c.forEach((d, C) => {
|
2797
|
-
h = Math.max(h, d.width), C === c.length - 1 ? u += d.height : u += d.height +
|
2789
|
+
h = Math.max(h, d.width), C === c.length - 1 ? u += d.height : u += d.height + Na;
|
2798
2790
|
}), {
|
2799
2791
|
lines: c,
|
2800
2792
|
totalHeight: u,
|
2801
2793
|
contentWidth: i,
|
2802
2794
|
contentHeight: r,
|
2803
2795
|
cellAutoHeight: u + ye * 2,
|
2804
|
-
calcAutoWidth: h +
|
2796
|
+
calcAutoWidth: h + o
|
2805
2797
|
};
|
2806
2798
|
}
|
2807
2799
|
const rs = 8;
|
2808
|
-
class ss extends
|
2809
|
-
static drawWith(e,
|
2810
|
-
const { fontString: n, info:
|
2800
|
+
class ss extends uo {
|
2801
|
+
static drawWith(e, a) {
|
2802
|
+
const { fontString: n, info: o, fill: i, color: r } = a, { layout: l, text: s } = o;
|
2811
2803
|
e.save(), Yn.drawWith(e, {
|
2812
2804
|
width: l.width,
|
2813
2805
|
height: l.height,
|
2814
2806
|
radius: rs,
|
2815
2807
|
fill: i || $t
|
2816
|
-
}), e.translateWithPrecision(
|
2808
|
+
}), e.translateWithPrecision(Fa, l.ba), e.font = n, e.fillStyle = r, e.fillText(s, 0, 0), e.restore();
|
2817
2809
|
}
|
2818
2810
|
}
|
2819
|
-
var ls = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, cs = (t, e,
|
2820
|
-
for (var
|
2821
|
-
(r = t[i]) && (
|
2822
|
-
return n &&
|
2823
|
-
}, us = (t, e) => (
|
2811
|
+
var ls = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, cs = (t, e, a, n) => {
|
2812
|
+
for (var o = n > 1 ? void 0 : n ? ds(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
2813
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
2814
|
+
return n && o && ls(e, a, o), o;
|
2815
|
+
}, us = (t, e) => (a, n) => e(a, n, t);
|
2824
2816
|
const hs = 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");
|
2825
|
-
let
|
2817
|
+
let on = class {
|
2826
2818
|
constructor(t) {
|
2827
2819
|
F(this, "zIndex");
|
2828
2820
|
F(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
|
@@ -2835,10 +2827,10 @@ let an = class {
|
|
2835
2827
|
_generateKey(t, e) {
|
2836
2828
|
return `${t}.${e}`;
|
2837
2829
|
}
|
2838
|
-
_drawDownIcon(t, e,
|
2839
|
-
const i =
|
2830
|
+
_drawDownIcon(t, e, a, n, o) {
|
2831
|
+
const i = a - Ot + 4;
|
2840
2832
|
let r = 4;
|
2841
|
-
switch (
|
2833
|
+
switch (o) {
|
2842
2834
|
case ut.MIDDLE:
|
2843
2835
|
r = (n - Ot) / 2 + 4;
|
2844
2836
|
break;
|
@@ -2849,9 +2841,9 @@ let an = class {
|
|
2849
2841
|
t.save(), t.translateWithPrecision(e.startX + i, e.startY + r), t.fillStyle = "#565656", t.fill(hs), t.restore();
|
2850
2842
|
}
|
2851
2843
|
// eslint-disable-next-line max-lines-per-function
|
2852
|
-
drawWith(t, e,
|
2844
|
+
drawWith(t, e, a, n) {
|
2853
2845
|
var b, k;
|
2854
|
-
const { primaryWithCoord:
|
2846
|
+
const { primaryWithCoord: o, row: i, col: r, style: l, data: s, subUnitId: c } = e, u = o.isMergedMainCell ? o.mergeInfo : o, h = s.fontRenderExtension, { leftOffset: d = 0, rightOffset: C = 0, topOffset: m = 0, downOffset: f = 0 } = h || {}, D = s.dataValidation, y = this._ensureMap(c), V = this._generateKey(i, r);
|
2855
2847
|
if (!D)
|
2856
2848
|
return;
|
2857
2849
|
const S = {
|
@@ -2860,7 +2852,7 @@ let an = class {
|
|
2860
2852
|
startY: u.startY + m,
|
2861
2853
|
endY: u.endY - f
|
2862
2854
|
}, x = S.endX - S.startX, E = S.endY - S.startY, { cl: $ } = l || {}, R = (b = typeof $ == "object" ? $ == null ? void 0 : $.rgb : $) != null ? b : "#000", P = Le(l != null ? l : void 0), { rule: j, validator: A } = D, M = A, { vt: U, ht: B } = l || {}, w = U != null ? U : ut.MIDDLE, v = (k = st(s)) != null ? k : "", g = M.parseCellValue(v), I = M.getListWithColorMap(j), _ = ke(g, P, x, E);
|
2863
|
-
this._drawDownIcon(t, S, x, E, w), t.save(), t.translateWithPrecision(S.startX, S.startY), t.beginPath(), t.rect(0, 0, x - Ot, E), t.clip(), t.translateWithPrecision(
|
2855
|
+
this._drawDownIcon(t, S, x, E, w), t.save(), t.translateWithPrecision(S.startX, S.startY), t.beginPath(), t.rect(0, 0, x - Ot, E), t.clip(), t.translateWithPrecision(an, ye);
|
2864
2856
|
let L = 0;
|
2865
2857
|
switch (w) {
|
2866
2858
|
case ut.MIDDLE:
|
@@ -2882,7 +2874,7 @@ let an = class {
|
|
2882
2874
|
T = (_.contentWidth - G) / 2;
|
2883
2875
|
break;
|
2884
2876
|
}
|
2885
|
-
t.translate(T, K * (Z +
|
2877
|
+
t.translate(T, K * (Z + Na)), J.forEach((O) => {
|
2886
2878
|
t.save(), t.translateWithPrecision(O.left, 0), ss.drawWith(t, {
|
2887
2879
|
...P,
|
2888
2880
|
info: O,
|
@@ -2893,13 +2885,13 @@ let an = class {
|
|
2893
2885
|
}), t.restore(), y.set(V, {
|
2894
2886
|
left: S.startX,
|
2895
2887
|
top: S.startY,
|
2896
|
-
width: _.contentWidth +
|
2888
|
+
width: _.contentWidth + an + Ot,
|
2897
2889
|
height: _.contentHeight + ye * 2
|
2898
2890
|
});
|
2899
2891
|
}
|
2900
2892
|
calcCellAutoHeight(t) {
|
2901
2893
|
var x;
|
2902
|
-
const { primaryWithCoord: e, style:
|
2894
|
+
const { primaryWithCoord: e, style: a, data: n } = t, o = n.fontRenderExtension, { leftOffset: i = 0, rightOffset: r = 0, topOffset: l = 0, downOffset: s = 0 } = o || {}, c = e.isMergedMainCell ? e.mergeInfo : e, u = {
|
2903
2895
|
startX: c.startX + i,
|
2904
2896
|
endX: c.endX - r,
|
2905
2897
|
startY: c.startY + l,
|
@@ -2907,12 +2899,12 @@ let an = class {
|
|
2907
2899
|
}, h = n.dataValidation;
|
2908
2900
|
if (!h)
|
2909
2901
|
return;
|
2910
|
-
const d = u.endX - u.startX, C = u.endY - u.startY, m = (x = st(n)) != null ? x : "", { validator: f } = h, y = f.parseCellValue(m), V = Le(
|
2902
|
+
const d = u.endX - u.startX, C = u.endY - u.startY, m = (x = st(n)) != null ? x : "", { validator: f } = h, y = f.parseCellValue(m), V = Le(a != null ? a : void 0);
|
2911
2903
|
return ke(y, V, d, C).cellAutoHeight;
|
2912
2904
|
}
|
2913
2905
|
calcCellAutoWidth(t) {
|
2914
2906
|
var x;
|
2915
|
-
const { primaryWithCoord: e, style:
|
2907
|
+
const { primaryWithCoord: e, style: a, data: n } = t, o = n.fontRenderExtension, { leftOffset: i = 0, rightOffset: r = 0, topOffset: l = 0, downOffset: s = 0 } = o || {}, c = e.isMergedMainCell ? e.mergeInfo : e, u = {
|
2916
2908
|
startX: c.startX + i,
|
2917
2909
|
endX: c.endX - r,
|
2918
2910
|
startY: c.startY + l,
|
@@ -2920,48 +2912,48 @@ let an = class {
|
|
2920
2912
|
}, h = n.dataValidation;
|
2921
2913
|
if (!h)
|
2922
2914
|
return;
|
2923
|
-
const d = u.endX - u.startX, C = u.endY - u.startY, m = (x = st(n)) != null ? x : "", { validator: f } = h, y = f.parseCellValue(m), V = Le(
|
2915
|
+
const d = u.endX - u.startX, C = u.endY - u.startY, m = (x = st(n)) != null ? x : "", { validator: f } = h, y = f.parseCellValue(m), V = Le(a != null ? a : void 0);
|
2924
2916
|
return ke(y, V, d, C).calcAutoWidth;
|
2925
2917
|
}
|
2926
2918
|
isHit(t, e) {
|
2927
|
-
const { primaryWithCoord:
|
2928
|
-
return i >=
|
2919
|
+
const { primaryWithCoord: a } = e, n = a.isMergedMainCell ? a.mergeInfo : a, { endX: o } = n, { x: i } = t;
|
2920
|
+
return i >= o - Ot && i <= o;
|
2929
2921
|
}
|
2930
2922
|
onPointerDown(t, e) {
|
2931
2923
|
if (e.button === 2)
|
2932
2924
|
return;
|
2933
|
-
const { unitId:
|
2934
|
-
unitId:
|
2925
|
+
const { unitId: a, subUnitId: n, row: o, col: i } = t, r = {
|
2926
|
+
unitId: a,
|
2935
2927
|
subUnitId: n,
|
2936
|
-
row:
|
2928
|
+
row: o,
|
2937
2929
|
column: i
|
2938
2930
|
};
|
2939
2931
|
this._commandService.executeCommand(Ee.id, r);
|
2940
2932
|
}
|
2941
2933
|
};
|
2942
|
-
|
2943
|
-
us(0,
|
2944
|
-
],
|
2934
|
+
on = cs([
|
2935
|
+
us(0, at)
|
2936
|
+
], on);
|
2945
2937
|
class fs extends mt {
|
2946
2938
|
constructor() {
|
2947
2939
|
super(...arguments);
|
2948
2940
|
F(this, "id", et.LIST_MULTIPLE);
|
2949
|
-
F(this, "canvasRender", this.injector.createInstance(
|
2941
|
+
F(this, "canvasRender", this.injector.createInstance(on));
|
2950
2942
|
F(this, "dropdown", wn);
|
2951
2943
|
}
|
2952
2944
|
}
|
2953
|
-
var ps = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, gs = (t, e,
|
2954
|
-
for (var
|
2955
|
-
(r = t[i]) && (
|
2956
|
-
return n &&
|
2957
|
-
}, jn = (t, e) => (
|
2945
|
+
var ps = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, gs = (t, e, a, n) => {
|
2946
|
+
for (var o = n > 1 ? void 0 : n ? ms(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
2947
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
2948
|
+
return n && o && ps(e, a, o), o;
|
2949
|
+
}, jn = (t, e) => (a, n) => e(a, n, t);
|
2958
2950
|
const bt = 4, ue = 4, ht = 14, ft = 6, kt = 4, Be = 8, vs = "#565656", Fn = 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");
|
2959
2951
|
function _s(t, e) {
|
2960
|
-
const
|
2952
|
+
const a = t.length;
|
2961
2953
|
return {
|
2962
2954
|
id: "d",
|
2963
2955
|
body: {
|
2964
|
-
dataStream: `${t}${
|
2956
|
+
dataStream: `${t}${ao}`,
|
2965
2957
|
textRuns: [
|
2966
2958
|
{
|
2967
2959
|
ts: {
|
@@ -2984,7 +2976,7 @@ function _s(t, e) {
|
|
2984
2976
|
bd: void 0
|
2985
2977
|
},
|
2986
2978
|
st: 0,
|
2987
|
-
ed:
|
2979
|
+
ed: a
|
2988
2980
|
}
|
2989
2981
|
]
|
2990
2982
|
},
|
@@ -2996,34 +2988,34 @@ function _s(t, e) {
|
|
2996
2988
|
}
|
2997
2989
|
};
|
2998
2990
|
}
|
2999
|
-
function
|
3000
|
-
const n = _s(t,
|
2991
|
+
function Ua(t, e, a) {
|
2992
|
+
const n = _s(t, a), o = new no(n), i = new ho(o);
|
3001
2993
|
return {
|
3002
|
-
documentSkeleton:
|
3003
|
-
docModel:
|
2994
|
+
documentSkeleton: fo.create(i, e),
|
2995
|
+
docModel: o,
|
3004
2996
|
docViewModel: i
|
3005
2997
|
};
|
3006
2998
|
}
|
3007
|
-
function he(t, e,
|
2999
|
+
function he(t, e, a) {
|
3008
3000
|
const {
|
3009
3001
|
documentSkeleton: n,
|
3010
|
-
docModel:
|
3002
|
+
docModel: o,
|
3011
3003
|
docViewModel: i
|
3012
|
-
} =
|
3004
|
+
} = Ua(t, e, a);
|
3013
3005
|
return {
|
3014
|
-
documents: new
|
3006
|
+
documents: new po(`DOCUMENTS_${Ge.generateRandomId()}`, n, {
|
3015
3007
|
pageMarginLeft: 0,
|
3016
3008
|
pageMarginTop: 0
|
3017
3009
|
}),
|
3018
3010
|
documentSkeleton: n,
|
3019
|
-
docModel:
|
3011
|
+
docModel: o,
|
3020
3012
|
docViewModel: i
|
3021
3013
|
};
|
3022
3014
|
}
|
3023
|
-
function Nn(t, e,
|
3015
|
+
function Nn(t, e, a, n, o, i, r = !0) {
|
3024
3016
|
let l = 0;
|
3025
3017
|
const s = r ? kt : 0;
|
3026
|
-
switch (
|
3018
|
+
switch (o) {
|
3027
3019
|
case ut.BOTTOM:
|
3028
3020
|
l = e - n - s;
|
3029
3021
|
break;
|
@@ -3038,10 +3030,10 @@ function Nn(t, e, o, n, a, i, r = !0) {
|
|
3038
3030
|
let c = 0;
|
3039
3031
|
switch (i) {
|
3040
3032
|
case Wt.CENTER:
|
3041
|
-
c = (t -
|
3033
|
+
c = (t - a) / 2;
|
3042
3034
|
break;
|
3043
3035
|
case Wt.RIGHT:
|
3044
|
-
c = t -
|
3036
|
+
c = t - a;
|
3045
3037
|
break;
|
3046
3038
|
}
|
3047
3039
|
return c = Math.max(ft, c), {
|
@@ -3064,26 +3056,26 @@ let rn = class {
|
|
3064
3056
|
_generateKey(t, e) {
|
3065
3057
|
return `${t}.${e}`;
|
3066
3058
|
}
|
3067
|
-
_drawDownIcon(t, e,
|
3068
|
-
const { t: l = lt.pd.t, b: s = lt.pd.b } = r, c =
|
3059
|
+
_drawDownIcon(t, e, a, n, o, i, r) {
|
3060
|
+
const { t: l = lt.pd.t, b: s = lt.pd.b } = r, c = a - ht;
|
3069
3061
|
let u;
|
3070
3062
|
switch (i) {
|
3071
3063
|
case ut.MIDDLE:
|
3072
3064
|
u = (n - ue) / 2;
|
3073
3065
|
break;
|
3074
3066
|
case ut.BOTTOM:
|
3075
|
-
u = n - s -
|
3067
|
+
u = n - s - o - kt + (o / 2 - ue / 2);
|
3076
3068
|
break;
|
3077
3069
|
default:
|
3078
|
-
u = l + kt + (
|
3070
|
+
u = l + kt + (o / 2 - ue / 2);
|
3079
3071
|
break;
|
3080
3072
|
}
|
3081
3073
|
t.save(), t.translateWithPrecision(e.startX + c, e.startY + u), t.fillStyle = "#565656", t.fill(Fn), t.restore();
|
3082
3074
|
}
|
3083
3075
|
// eslint-disable-next-line max-lines-per-function, complexity
|
3084
|
-
drawWith(t, e,
|
3076
|
+
drawWith(t, e, a) {
|
3085
3077
|
var w, v;
|
3086
|
-
const { primaryWithCoord: n, row:
|
3078
|
+
const { primaryWithCoord: n, row: o, col: i, style: r, data: l, subUnitId: s } = e, c = n.isMergedMainCell ? n.mergeInfo : n, u = (w = l.dataValidation) == null ? void 0 : w.rule, h = (v = l.dataValidation) == null ? void 0 : v.validator, d = l.fontRenderExtension, { leftOffset: C = 0, rightOffset: m = 0, topOffset: f = 0, downOffset: D = 0 } = d || {};
|
3087
3079
|
if (!u || !h || !h || h.id.indexOf(et.LIST) !== 0 || !h.skipDefaultFontRender(u))
|
3088
3080
|
return;
|
3089
3081
|
const y = {
|
@@ -3091,15 +3083,15 @@ let rn = class {
|
|
3091
3083
|
endX: c.endX - m,
|
3092
3084
|
startY: c.startY + f,
|
3093
3085
|
endY: c.endY - D
|
3094
|
-
}, V = y.endX - y.startX, S = y.endY - y.startY, x = this._ensureMap(s), E = this._generateKey(
|
3086
|
+
}, V = y.endX - y.startX, S = y.endY - y.startY, x = this._ensureMap(s), E = this._generateKey(o, i), $ = h.getListWithColor(u), R = st(l), P = `${R != null ? R : ""}`, j = $.find((g) => g.label === P);
|
3095
3087
|
let { tb: A, vt: M, ht: U, pd: B } = r || {};
|
3096
3088
|
if (A = A != null ? A : _t.WRAP, M = M != null ? M : ut.BOTTOM, U = U != null ? U : lt.ht, B = B != null ? B : lt.pd, u.renderMode === dt.ARROW) {
|
3097
3089
|
const { l: g = lt.pd.l, t: I = lt.pd.t, r: _ = lt.pd.r, b: L = lt.pd.b } = B, b = V - g - _ - ht - 4, { documentSkeleton: k, documents: X, docModel: K } = he(P, this._localeService, r);
|
3098
3090
|
A === _t.WRAP && K.updateDocumentDataPageSize(Math.max(b, 1)), k.calculate(), k.getActualSize();
|
3099
3091
|
const G = qt(k), { height: Z, width: J } = G, { paddingTop: T, paddingLeft: O } = Nn(b, S - I - L, J, Z, M, U, !0);
|
3100
3092
|
this._drawDownIcon(t, y, V, S, Z, M, B), t.save(), t.translateWithPrecision(y.startX + g, y.startY + I), t.beginPath(), t.rect(0, 0, V - g - _, S - I - L), t.clip(), t.translateWithPrecision(0, T), t.save(), t.translateWithPrecision(bt, 0), t.beginPath(), t.rect(0, 0, b, Z), t.clip(), X.render(t), t.translateWithPrecision(O, 0), t.restore(), t.restore(), x.set(E, {
|
3101
|
-
left: y.endX + g +
|
3102
|
-
top: y.startY + I +
|
3093
|
+
left: y.endX + g + a.rowHeaderWidth - ht,
|
3094
|
+
top: y.startY + I + a.columnHeaderHeight,
|
3103
3095
|
width: ht,
|
3104
3096
|
height: S - I - L
|
3105
3097
|
});
|
@@ -3116,8 +3108,8 @@ let rn = class {
|
|
3116
3108
|
fill: (j == null ? void 0 : j.color) || $t,
|
3117
3109
|
radius: Be
|
3118
3110
|
}), t.save(), t.translateWithPrecision(bt, 0), t.beginPath(), t.rect(0, 0, g, k), t.clip(), t.translateWithPrecision(G, 0), _.render(t), t.restore(), t.translateWithPrecision(g + bt + 4, (k - ue) / 2), t.fillStyle = vs, t.fill(Fn), t.restore(), x.set(E, {
|
3119
|
-
left: y.startX + ft +
|
3120
|
-
top: y.startY + K +
|
3111
|
+
left: y.startX + ft + a.rowHeaderWidth,
|
3112
|
+
top: y.startY + K + a.columnHeaderHeight,
|
3121
3113
|
width: Z,
|
3122
3114
|
height: J
|
3123
3115
|
});
|
@@ -3125,24 +3117,24 @@ let rn = class {
|
|
3125
3117
|
}
|
3126
3118
|
calcCellAutoHeight(t) {
|
3127
3119
|
var S;
|
3128
|
-
const { primaryWithCoord: e, style:
|
3120
|
+
const { primaryWithCoord: e, style: a, data: n } = t, o = e.isMergedMainCell ? e.mergeInfo : e, i = n.fontRenderExtension, { leftOffset: r = 0, rightOffset: l = 0, topOffset: s = 0, downOffset: c = 0 } = i || {}, u = (S = n.dataValidation) == null ? void 0 : S.rule;
|
3129
3121
|
if (!u || u.renderMode === dt.TEXT)
|
3130
3122
|
return;
|
3131
3123
|
const h = {
|
3132
|
-
startX:
|
3133
|
-
endX:
|
3134
|
-
startY:
|
3135
|
-
endY:
|
3124
|
+
startX: o.startX + r,
|
3125
|
+
endX: o.endX - l,
|
3126
|
+
startY: o.startY + s,
|
3127
|
+
endY: o.endY - c
|
3136
3128
|
}, d = h.endX - h.startX, C = st(n), m = `${C != null ? C : ""}`;
|
3137
|
-
let { tb: f, pd: D } =
|
3129
|
+
let { tb: f, pd: D } = a || {};
|
3138
3130
|
const { t: y = lt.pd.t, b: V = lt.pd.b } = D != null ? D : {};
|
3139
3131
|
if (f = f != null ? f : _t.WRAP, u.renderMode === dt.ARROW) {
|
3140
|
-
const x = d - ht, { documentSkeleton: E, docModel: $ } = he(m, this._localeService,
|
3132
|
+
const x = d - ht, { documentSkeleton: E, docModel: $ } = he(m, this._localeService, a);
|
3141
3133
|
f === _t.WRAP && $.updateDocumentDataPageSize(Math.max(x, 1)), E.calculate(), E.getActualSize();
|
3142
3134
|
const R = qt(E), { height: P } = R;
|
3143
3135
|
return P + y + V + kt * 2;
|
3144
3136
|
} else {
|
3145
|
-
const x = d - ft * 2 - bt - ht, { documentSkeleton: E, docModel: $ } =
|
3137
|
+
const x = d - ft * 2 - bt - ht, { documentSkeleton: E, docModel: $ } = Ua(m, this._localeService, a);
|
3146
3138
|
f === _t.WRAP && $.updateDocumentDataPageSize(Math.max(x, 1)), E.calculate();
|
3147
3139
|
const R = qt(E), {
|
3148
3140
|
height: P
|
@@ -3152,15 +3144,15 @@ let rn = class {
|
|
3152
3144
|
}
|
3153
3145
|
calcCellAutoWidth(t) {
|
3154
3146
|
var P;
|
3155
|
-
const { primaryWithCoord: e, style:
|
3147
|
+
const { primaryWithCoord: e, style: a, data: n } = t, o = e.isMergedMainCell ? e.mergeInfo : e, i = n.fontRenderExtension, { leftOffset: r = 0, rightOffset: l = 0, topOffset: s = 0, downOffset: c = 0 } = i || {}, u = (P = n.dataValidation) == null ? void 0 : P.rule;
|
3156
3148
|
if (!u || u.renderMode === dt.TEXT) return;
|
3157
3149
|
const h = {
|
3158
|
-
startX:
|
3159
|
-
endX:
|
3160
|
-
startY:
|
3161
|
-
endY:
|
3150
|
+
startX: o.startX + r,
|
3151
|
+
endX: o.endX - l,
|
3152
|
+
startY: o.startY + s,
|
3153
|
+
endY: o.endY - c
|
3162
3154
|
}, d = h.endX - h.startX, C = st(n), m = `${C != null ? C : ""}`;
|
3163
|
-
let { tb: f, pd: D } =
|
3155
|
+
let { tb: f, pd: D } = a || {};
|
3164
3156
|
const { l: y = lt.pd.l, r: V = lt.pd.r } = D != null ? D : {};
|
3165
3157
|
f = f != null ? f : _t.WRAP;
|
3166
3158
|
let S = ft * 2 + ht;
|
@@ -3174,11 +3166,11 @@ let rn = class {
|
|
3174
3166
|
default:
|
3175
3167
|
S = ht + ft * 2 + bt * 2 + V + y + Be / 2 + 1;
|
3176
3168
|
}
|
3177
|
-
const x = d - S, { documentSkeleton: E, docModel: $ } = he(m, this._localeService,
|
3169
|
+
const x = d - S, { documentSkeleton: E, docModel: $ } = he(m, this._localeService, a);
|
3178
3170
|
return f === _t.WRAP && $.updateDocumentDataPageSize(Math.max(x, 1)), E.calculate(), E.getActualSize(), qt(E).width + S;
|
3179
3171
|
}
|
3180
3172
|
isHit(t, e) {
|
3181
|
-
const { data:
|
3173
|
+
const { data: a, subUnitId: n, row: o, col: i } = e, l = this._ensureMap(n).get(this._generateKey(o, i)), s = a.dataValidation;
|
3182
3174
|
if (!s || !l || s.rule.renderMode === dt.TEXT)
|
3183
3175
|
return !1;
|
3184
3176
|
const { top: c, left: u, width: h, height: d } = l, { x: C, y: m } = t;
|
@@ -3187,10 +3179,10 @@ let rn = class {
|
|
3187
3179
|
onPointerDown(t, e) {
|
3188
3180
|
if (e.button === 2)
|
3189
3181
|
return;
|
3190
|
-
const { unitId:
|
3191
|
-
unitId:
|
3182
|
+
const { unitId: a, subUnitId: n, row: o, col: i } = t, r = {
|
3183
|
+
unitId: a,
|
3192
3184
|
subUnitId: n,
|
3193
|
-
row:
|
3185
|
+
row: o,
|
3194
3186
|
column: i
|
3195
3187
|
};
|
3196
3188
|
this._commandService.executeCommand(Ee.id, r);
|
@@ -3198,7 +3190,7 @@ let rn = class {
|
|
3198
3190
|
};
|
3199
3191
|
rn = gs([
|
3200
3192
|
jn(0, Y(nt)),
|
3201
|
-
jn(1,
|
3193
|
+
jn(1, at)
|
3202
3194
|
], rn);
|
3203
3195
|
class Ss extends mt {
|
3204
3196
|
constructor() {
|
@@ -3224,22 +3216,22 @@ class ws extends mt {
|
|
3224
3216
|
F(this, "formulaInput", Pe);
|
3225
3217
|
}
|
3226
3218
|
}
|
3227
|
-
var Is = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, Rs = (t, e,
|
3228
|
-
for (var
|
3229
|
-
(r = t[i]) && (
|
3230
|
-
return n &&
|
3231
|
-
}, We = (t, e) => (
|
3219
|
+
var Is = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, Rs = (t, e, a, n) => {
|
3220
|
+
for (var o = n > 1 ? void 0 : n ? Ds(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
3221
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
3222
|
+
return n && o && Is(e, a, o), o;
|
3223
|
+
}, We = (t, e) => (a, n) => e(a, n, t);
|
3232
3224
|
let Kt = class extends ln {
|
3233
|
-
constructor(t, e,
|
3234
|
-
super(), this._injector = t, this._componentManger = e, this._dataValidatorRegistryService =
|
3225
|
+
constructor(t, e, a) {
|
3226
|
+
super(), this._injector = t, this._componentManger = e, this._dataValidatorRegistryService = a, this._initComponents(), this._registerValidatorViews();
|
3235
3227
|
}
|
3236
3228
|
_initComponents() {
|
3237
3229
|
[
|
3238
|
-
[
|
3230
|
+
[$a, wa],
|
3239
3231
|
[_n, ir],
|
3240
|
-
[
|
3232
|
+
[Va, Ri],
|
3241
3233
|
[wn, Fi],
|
3242
|
-
[
|
3234
|
+
[Ea, di],
|
3243
3235
|
[De.componentKey, De],
|
3244
3236
|
[Re.componentKey, Re],
|
3245
3237
|
...Wr
|
@@ -3252,7 +3244,7 @@ let Kt = class extends ln {
|
|
3252
3244
|
}
|
3253
3245
|
_registerValidatorViews() {
|
3254
3246
|
[
|
3255
|
-
|
3247
|
+
as,
|
3256
3248
|
ws,
|
3257
3249
|
Cs,
|
3258
3250
|
ns,
|
@@ -3261,8 +3253,8 @@ let Kt = class extends ln {
|
|
3261
3253
|
fs,
|
3262
3254
|
ts
|
3263
3255
|
].forEach((t) => {
|
3264
|
-
const e = this._injector.createInstance(t),
|
3265
|
-
|
3256
|
+
const e = this._injector.createInstance(t), a = this._dataValidatorRegistryService.getValidatorItem(e.id);
|
3257
|
+
a && (a.formulaInput = e.formulaInput, a.canvasRender = e.canvasRender, a.dropdown = e.dropdown, a.optionsInput = e.optionsInput);
|
3266
3258
|
});
|
3267
3259
|
}
|
3268
3260
|
};
|
@@ -3271,45 +3263,45 @@ Kt = Rs([
|
|
3271
3263
|
We(1, Y(Me)),
|
3272
3264
|
We(2, Y(yt))
|
3273
3265
|
], Kt);
|
3274
|
-
var ys = Object.defineProperty, Vs = Object.getOwnPropertyDescriptor, Ms = (t, e,
|
3275
|
-
for (var
|
3276
|
-
(r = t[i]) && (
|
3277
|
-
return n &&
|
3278
|
-
}, He = (t, e) => (
|
3266
|
+
var ys = Object.defineProperty, Vs = Object.getOwnPropertyDescriptor, Ms = (t, e, a, n) => {
|
3267
|
+
for (var o = n > 1 ? void 0 : n ? Vs(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
3268
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
3269
|
+
return n && o && ys(e, a, o), o;
|
3270
|
+
}, He = (t, e) => (a, n) => e(a, n, t);
|
3279
3271
|
const bs = "SHEET_DATA_VALIDATION_UI_PLUGIN";
|
3280
3272
|
var fe;
|
3281
3273
|
let Un = (fe = class extends Hn {
|
3282
|
-
constructor(t =
|
3283
|
-
super(), this._config = t, this._injector = e, this._commandService =
|
3284
|
-
const { menu:
|
3285
|
-
|
3274
|
+
constructor(t = Oa, e, a, n) {
|
3275
|
+
super(), this._config = t, this._injector = e, this._commandService = a, this._configService = n;
|
3276
|
+
const { menu: o, ...i } = this._config;
|
3277
|
+
o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Cn, i);
|
3286
3278
|
}
|
3287
3279
|
onStarting() {
|
3288
3280
|
[
|
3289
3281
|
[pt],
|
3290
3282
|
[Ct],
|
3291
|
-
[
|
3283
|
+
[oe],
|
3292
3284
|
[Ht],
|
3293
3285
|
[zt],
|
3294
3286
|
[Xt],
|
3295
3287
|
[Yt],
|
3296
|
-
[
|
3288
|
+
[ae],
|
3297
3289
|
[Kt]
|
3298
3290
|
].forEach((t) => {
|
3299
3291
|
this._injector.add(t);
|
3300
3292
|
}), [
|
3301
3293
|
$e,
|
3302
3294
|
Ee,
|
3303
|
-
|
3295
|
+
ba,
|
3304
3296
|
Sn,
|
3305
3297
|
Ft,
|
3306
|
-
|
3298
|
+
Ma
|
3307
3299
|
].forEach((t) => {
|
3308
3300
|
this._commandService.registerCommand(t);
|
3309
3301
|
});
|
3310
3302
|
}
|
3311
3303
|
onReady() {
|
3312
|
-
this._injector.get(Yt), this._injector.get(Xt), this._injector.get(
|
3304
|
+
this._injector.get(Yt), this._injector.get(Xt), this._injector.get(ae), this._injector.get(oe), this._injector.get(ie).registerRenderModule(
|
3313
3305
|
rt.UNIVER_SHEET,
|
3314
3306
|
[Ie]
|
3315
3307
|
);
|
@@ -3323,27 +3315,27 @@ let Un = (fe = class extends Hn {
|
|
3323
3315
|
}, F(fe, "pluginName", bs), F(fe, "type", rt.UNIVER_SHEET), fe);
|
3324
3316
|
Un = Ms([
|
3325
3317
|
He(1, Y(At)),
|
3326
|
-
He(2,
|
3318
|
+
He(2, at),
|
3327
3319
|
He(3, sn)
|
3328
3320
|
], Un);
|
3329
|
-
var Os = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, $s = (t, e,
|
3330
|
-
for (var
|
3331
|
-
(r = t[i]) && (
|
3332
|
-
return n &&
|
3333
|
-
}, Ye = (t, e) => (
|
3321
|
+
var Os = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, $s = (t, e, a, n) => {
|
3322
|
+
for (var o = n > 1 ? void 0 : n ? Es(e, a) : e, i = t.length - 1, r; i >= 0; i--)
|
3323
|
+
(r = t[i]) && (o = (n ? r(e, a, o) : r(o)) || o);
|
3324
|
+
return n && o && Os(e, a, o), o;
|
3325
|
+
}, Ye = (t, e) => (a, n) => e(a, n, t);
|
3334
3326
|
const Ps = "SHEET_DATA_VALIDATION_UI_PLUGIN";
|
3335
3327
|
var pe;
|
3336
3328
|
let kn = (pe = class extends Hn {
|
3337
|
-
constructor(t =
|
3338
|
-
super(), this._config = t, this._injector = e, this._commandService =
|
3339
|
-
const { menu:
|
3340
|
-
|
3329
|
+
constructor(t = Oa, e, a, n) {
|
3330
|
+
super(), this._config = t, this._injector = e, this._commandService = a, this._configService = n;
|
3331
|
+
const { menu: o, ...i } = this._config;
|
3332
|
+
o && this._configService.setConfig("menu", o, { merge: !0 }), this._configService.setConfig(Cn, i);
|
3341
3333
|
}
|
3342
3334
|
onStarting() {
|
3343
3335
|
[
|
3344
3336
|
[pt],
|
3345
3337
|
[Ct],
|
3346
|
-
[
|
3338
|
+
[oe],
|
3347
3339
|
[Ht],
|
3348
3340
|
[zt],
|
3349
3341
|
[Xt],
|
@@ -3354,10 +3346,10 @@ let kn = (pe = class extends Hn {
|
|
3354
3346
|
}), [
|
3355
3347
|
$e,
|
3356
3348
|
Ee,
|
3357
|
-
|
3349
|
+
ba,
|
3358
3350
|
Sn,
|
3359
3351
|
Ft,
|
3360
|
-
|
3352
|
+
Ma
|
3361
3353
|
].forEach((t) => {
|
3362
3354
|
this._commandService.registerCommand(t);
|
3363
3355
|
});
|
@@ -3377,11 +3369,11 @@ let kn = (pe = class extends Hn {
|
|
3377
3369
|
}, F(pe, "pluginName", Ps), F(pe, "type", rt.UNIVER_SHEET), pe);
|
3378
3370
|
kn = $s([
|
3379
3371
|
Ye(1, Y(At)),
|
3380
|
-
Ye(2,
|
3372
|
+
Ye(2, at),
|
3381
3373
|
Ye(3, sn)
|
3382
3374
|
], kn);
|
3383
3375
|
export {
|
3384
|
-
|
3376
|
+
Ea as DATE_DROPDOWN_KEY,
|
3385
3377
|
wn as LIST_DROPDOWN_KEY,
|
3386
3378
|
kn as UniverSheetsDataValidationMobileUIPlugin,
|
3387
3379
|
Un as UniverSheetsDataValidationUIPlugin
|