@univerjs/sheets-data-validation 0.5.4 → 0.5.5-nightly.202501201336
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/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +435 -208
- package/lib/es/index.js +149 -147
- package/lib/types/facade/f-data-validation-builder.d.ts +237 -133
- package/lib/types/facade/f-data-validation.d.ts +155 -38
- package/lib/types/facade/f-range.d.ts +36 -9
- package/lib/types/facade/f-univer.d.ts +10 -1
- package/lib/types/facade/f-workbook.d.ts +8 -24
- package/lib/types/facade/f-worksheet.d.ts +9 -4
- package/lib/types/services/dv-validator-service.d.ts +1 -1
- package/lib/types/validators/custom-validator.d.ts +1 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var Rt = Object.defineProperty;
|
|
2
2
|
var St = (s, a, e) => a in s ? Rt(s, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[a] = e;
|
|
3
3
|
var f = (s, a, e) => St(s, typeof a != "symbol" ? a + "" : a, e);
|
|
4
|
-
import { Inject as S, ICommandService as x, IUniverInstanceService as O, Disposable as $, ObjectMatrix as ve, UniverInstanceType as N, Range as b, isFormulaString as v, DataValidationType as T, getOriginCellValue as vt, RBush as Vt, debounce as Mt, Rectangle as I, Tools as V, DataValidationStatus as D, WrapStrategy as Se, DataValidationOperator as h, numfmt as Q, dayjs as at, DataValidationRenderMode as Be, CommandType as
|
|
4
|
+
import { Inject as S, ICommandService as x, IUniverInstanceService as O, Disposable as $, ObjectMatrix as ve, UniverInstanceType as N, Range as b, isFormulaString as v, DataValidationType as T, getOriginCellValue as vt, RBush as Vt, debounce as Mt, Rectangle as I, Tools as V, DataValidationStatus as D, WrapStrategy as Se, DataValidationOperator as h, numfmt as Q, dayjs as at, DataValidationRenderMode as Be, CommandType as z, IUndoRedoService as Z, sequenceExecute as Ie, isRangesEqual as rt, generateRandomId as yt, toDisposable as qe, IPermissionService as Et, Injector as Ge, CellValueType as Tt, RxDisposable as Ft, LifecycleService as Nt, LifecycleStages as ze, bufferDebounceTime as Ct, DependentOn as Ot, Plugin as wt, merge as It, IConfigService as At } from "@univerjs/core";
|
|
5
5
|
import { DataValidationModel as ke, DataValidatorRegistryService as G, UpdateRuleType as y, BaseDataValidator as k, TextLengthErrorTitleMap as Dt, AddDataValidationMutation as L, RemoveDataValidationMutation as A, UpdateDataValidationMutation as E, getRuleSetting as bt, getRuleOptions as Lt, UniverDataValidationPlugin as xt } from "@univerjs/data-validation";
|
|
6
6
|
import { SetRangeValuesMutation as oe, RemoveSheetMutation as it, getSheetCommandTarget as Ye, SetRangeValuesUndoMutationFactory as st, WorksheetViewPermission as Bt, RefRangeService as Ut, handleCommonDefaultRangeChangeWithEffectRefCommands as Pt, SheetInterceptorService as ot, RemoveSheetCommand as $t, SheetsSelectionsService as nt, ClearSelectionAllCommand as Ht } from "@univerjs/sheets";
|
|
7
7
|
import { Subject as Qe, bufferWhen as Wt, filter as Ze } from "rxjs";
|
|
8
8
|
import { RegisterOtherFormulaService as lt, FormulaRefRangeService as ut } from "@univerjs/sheets-formula";
|
|
9
|
-
import { ERROR_TYPE_SET as jt, LexerTreeBuilder as
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
9
|
+
import { ERROR_TYPE_SET as jt, LexerTreeBuilder as Y, isReferenceString as dt, sequenceNodeType as Qt, deserializeRangeWithSheet as qt, deserializeRangeWithSheetWithCache as Gt, operatorToken as kt } from "@univerjs/engine-formula";
|
|
10
|
+
const Yt = "SHEET_DATA_VALIDATION_PLUGIN";
|
|
11
|
+
var Xt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, zt = (s, a, e, t) => {
|
|
12
|
+
for (var r = t > 1 ? void 0 : t ? Kt(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
13
13
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
14
|
-
return t && r &&
|
|
14
|
+
return t && r && Xt(a, e, r), r;
|
|
15
15
|
}, Je = (s, a) => (e, t) => a(e, t, s);
|
|
16
16
|
let q = class extends $ {
|
|
17
17
|
constructor(a, e) {
|
|
@@ -79,7 +79,7 @@ let q = class extends $ {
|
|
|
79
79
|
return this._ensureCache(a, e).getValue(t, r);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
q =
|
|
82
|
+
q = zt([
|
|
83
83
|
Je(0, S(x)),
|
|
84
84
|
Je(1, S(O))
|
|
85
85
|
], q);
|
|
@@ -99,10 +99,10 @@ function de(s, a) {
|
|
|
99
99
|
const e = a.getValidatorItem(s);
|
|
100
100
|
return (t = e == null ? void 0 : e.offsetFormulaByRange) != null ? t : !1;
|
|
101
101
|
}
|
|
102
|
-
var
|
|
103
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
102
|
+
var Zt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, ea = (s, a, e, t) => {
|
|
103
|
+
for (var r = t > 1 ? void 0 : t ? Jt(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
104
104
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
105
|
-
return t && r &&
|
|
105
|
+
return t && r && Zt(a, e, r), r;
|
|
106
106
|
}, re = (s, a) => (e, t) => a(e, t, s);
|
|
107
107
|
let P = class extends $ {
|
|
108
108
|
constructor(a, e, t, r, i) {
|
|
@@ -214,19 +214,19 @@ let P = class extends $ {
|
|
|
214
214
|
return r.get(t);
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
|
-
P =
|
|
217
|
+
P = ea([
|
|
218
218
|
re(0, O),
|
|
219
219
|
re(1, S(lt)),
|
|
220
220
|
re(2, S(ke)),
|
|
221
221
|
re(3, S(q)),
|
|
222
222
|
re(4, S(G))
|
|
223
223
|
], P);
|
|
224
|
-
var
|
|
225
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
224
|
+
var ta = Object.defineProperty, aa = Object.getOwnPropertyDescriptor, ra = (s, a, e, t) => {
|
|
225
|
+
for (var r = t > 1 ? void 0 : t ? aa(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
226
226
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
227
|
-
return t && r &&
|
|
227
|
+
return t && r && ta(a, e, r), r;
|
|
228
228
|
}, ie = (s, a) => (e, t) => a(e, t, s);
|
|
229
|
-
let
|
|
229
|
+
let K = class extends $ {
|
|
230
230
|
constructor(a, e, t, r, i) {
|
|
231
231
|
super();
|
|
232
232
|
f(this, "_formulaRuleMap", /* @__PURE__ */ new Map());
|
|
@@ -306,13 +306,13 @@ let X = class extends $ {
|
|
|
306
306
|
return this._ensureRuleFormulaMap(a, e).get(t);
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
|
-
|
|
309
|
+
K = ra([
|
|
310
310
|
ie(0, O),
|
|
311
311
|
ie(1, S(lt)),
|
|
312
312
|
ie(2, S(q)),
|
|
313
313
|
ie(3, S(ke)),
|
|
314
314
|
ie(4, S(G))
|
|
315
|
-
],
|
|
315
|
+
], K);
|
|
316
316
|
function ne(s) {
|
|
317
317
|
return vt(s);
|
|
318
318
|
}
|
|
@@ -461,11 +461,11 @@ class Xe {
|
|
|
461
461
|
return t.length > 0 ? t[0].ruleId : void 0;
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
var
|
|
465
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
464
|
+
var ia = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, oa = (s, a, e, t) => {
|
|
465
|
+
for (var r = t > 1 ? void 0 : t ? sa(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
466
466
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
467
|
-
return t && r &&
|
|
468
|
-
},
|
|
467
|
+
return t && r && ia(a, e, r), r;
|
|
468
|
+
}, X = (s, a) => (e, t) => a(e, t, s);
|
|
469
469
|
let F = class extends $ {
|
|
470
470
|
constructor(a, e, t, r, i, o, n) {
|
|
471
471
|
super();
|
|
@@ -616,21 +616,21 @@ let F = class extends $ {
|
|
|
616
616
|
return this._dataValidationModel.getAll();
|
|
617
617
|
}
|
|
618
618
|
};
|
|
619
|
-
F =
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
619
|
+
F = oa([
|
|
620
|
+
X(0, S(ke)),
|
|
621
|
+
X(1, O),
|
|
622
|
+
X(2, S(G)),
|
|
623
|
+
X(3, S(q)),
|
|
624
|
+
X(4, S(K)),
|
|
625
|
+
X(5, S(P)),
|
|
626
|
+
X(6, x)
|
|
627
627
|
], F);
|
|
628
628
|
const Ve = 1, Me = 0;
|
|
629
629
|
function et(s, a) {
|
|
630
630
|
return V.isBlank(s) ? a.t("dataValidation.validFail.value") : v(s) ? a.t("dataValidation.validFail.primitive") : "";
|
|
631
631
|
}
|
|
632
632
|
const _e = (s) => V.isDefine(s) && String(s).toLowerCase() === "true" ? "1" : String(s).toLowerCase() === "false" ? "0" : s;
|
|
633
|
-
class
|
|
633
|
+
class na extends k {
|
|
634
634
|
constructor() {
|
|
635
635
|
super(...arguments);
|
|
636
636
|
f(this, "id", T.CHECKBOX);
|
|
@@ -638,7 +638,7 @@ class oa extends k {
|
|
|
638
638
|
f(this, "operators", []);
|
|
639
639
|
f(this, "scopes", ["sheet"]);
|
|
640
640
|
f(this, "offsetFormulaByRange", !1);
|
|
641
|
-
f(this, "_formulaService", this.injector.get(
|
|
641
|
+
f(this, "_formulaService", this.injector.get(K));
|
|
642
642
|
f(this, "skipDefaultFontRender", (e, t, r) => {
|
|
643
643
|
const { unitId: i, subUnitId: o } = r, { formula1: n, formula2: l } = this.parseFormulaSync(e, i, o), u = `${t != null ? t : ""}`;
|
|
644
644
|
return !u || u === `${n}` || u === `${l}`;
|
|
@@ -698,7 +698,7 @@ class oa extends k {
|
|
|
698
698
|
return this.localeService.t("dataValidation.checkbox.error");
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
|
-
const
|
|
701
|
+
const la = {
|
|
702
702
|
[h.BETWEEN]: "dataValidation.date.operators.between",
|
|
703
703
|
[h.EQUAL]: "dataValidation.date.operators.equal",
|
|
704
704
|
[h.GREATER_THAN]: "dataValidation.date.operators.greaterThan",
|
|
@@ -709,7 +709,7 @@ const na = {
|
|
|
709
709
|
[h.NOT_EQUAL]: "dataValidation.date.operators.notEqual"
|
|
710
710
|
};
|
|
711
711
|
h.BETWEEN + "", h.EQUAL + "", h.GREATER_THAN + "", h.GREATER_THAN_OR_EQUAL + "", h.LESS_THAN + "", h.LESS_THAN_OR_EQUAL + "", h.NOT_BETWEEN + "", h.NOT_EQUAL + "";
|
|
712
|
-
const
|
|
712
|
+
const ua = {
|
|
713
713
|
[h.BETWEEN]: "dataValidation.date.ruleName.between",
|
|
714
714
|
[h.EQUAL]: "dataValidation.date.ruleName.equal",
|
|
715
715
|
[h.GREATER_THAN]: "dataValidation.date.ruleName.greaterThan",
|
|
@@ -718,7 +718,7 @@ const la = {
|
|
|
718
718
|
[h.LESS_THAN_OR_EQUAL]: "dataValidation.date.ruleName.lessThanOrEqual",
|
|
719
719
|
[h.NOT_BETWEEN]: "dataValidation.date.ruleName.notBetween",
|
|
720
720
|
[h.NOT_EQUAL]: "dataValidation.date.ruleName.notEqual"
|
|
721
|
-
},
|
|
721
|
+
}, da = {
|
|
722
722
|
[h.BETWEEN]: "dataValidation.date.errorMsg.between",
|
|
723
723
|
[h.EQUAL]: "dataValidation.date.errorMsg.equal",
|
|
724
724
|
[h.GREATER_THAN]: "dataValidation.date.errorMsg.greaterThan",
|
|
@@ -731,13 +731,13 @@ const la = {
|
|
|
731
731
|
h.BETWEEN,
|
|
732
732
|
h.NOT_BETWEEN
|
|
733
733
|
], le = "{FORMULA1}", ue = "{FORMULA2}";
|
|
734
|
-
function
|
|
734
|
+
function ir(s) {
|
|
735
735
|
return s.filter(Boolean).join(",");
|
|
736
736
|
}
|
|
737
737
|
function pe(s) {
|
|
738
738
|
return s.split(",").filter(Boolean);
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function sr(s) {
|
|
741
741
|
const a = ne(s);
|
|
742
742
|
return a == null ? "" : a.toString();
|
|
743
743
|
}
|
|
@@ -757,7 +757,7 @@ const Ue = (s) => {
|
|
|
757
757
|
const a = (e = Q.parseDate(s)) == null ? void 0 : e.v;
|
|
758
758
|
return V.isDefine(a) ? a : (t = Q.parseDate(at(s).format("YYYY-MM-DD HH:mm:ss"))) == null ? void 0 : t.v;
|
|
759
759
|
};
|
|
760
|
-
class
|
|
760
|
+
class ca extends k {
|
|
761
761
|
constructor() {
|
|
762
762
|
super(...arguments);
|
|
763
763
|
f(this, "id", T.DATE);
|
|
@@ -774,7 +774,7 @@ class da extends k {
|
|
|
774
774
|
]);
|
|
775
775
|
f(this, "scopes", ["sheet"]);
|
|
776
776
|
f(this, "_customFormulaService", this.injector.get(P));
|
|
777
|
-
f(this, "_lexerTreeBuilder", this.injector.get(
|
|
777
|
+
f(this, "_lexerTreeBuilder", this.injector.get(Y));
|
|
778
778
|
}
|
|
779
779
|
async parseFormula(e, t, r, i, o) {
|
|
780
780
|
const n = await this._customFormulaService.getCellFormulaValue(t, r, e.uid, i, o), l = await this._customFormulaService.getCellFormula2Value(t, r, e.uid, i, o), { formula1: u, formula2: d } = e, c = C(String(n == null ? void 0 : n.v)) && C(String(l == null ? void 0 : l.v));
|
|
@@ -840,20 +840,20 @@ class da extends k {
|
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
842
|
get operatorNames() {
|
|
843
|
-
return this.operators.map((e) => this.localeService.t(
|
|
843
|
+
return this.operators.map((e) => this.localeService.t(la[e]));
|
|
844
844
|
}
|
|
845
845
|
generateRuleName(e) {
|
|
846
846
|
var r, i;
|
|
847
847
|
if (!e.operator)
|
|
848
848
|
return this.titleStr;
|
|
849
|
-
const t = this.localeService.t(
|
|
849
|
+
const t = this.localeService.t(ua[e.operator]).replace(le, (r = e.formula1) != null ? r : "").replace(ue, (i = e.formula2) != null ? i : "");
|
|
850
850
|
return `${this.titleStr} ${t}`;
|
|
851
851
|
}
|
|
852
852
|
generateRuleErrorMessage(e, t) {
|
|
853
853
|
if (!e.operator)
|
|
854
854
|
return this.titleStr;
|
|
855
855
|
const { transformedFormula1: r, transformedFormula2: i } = De(this._lexerTreeBuilder, e, t);
|
|
856
|
-
return `${this.localeService.t(
|
|
856
|
+
return `${this.localeService.t(da[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
859
|
h.BETWEEN + "", h.EQUAL + "", h.GREATER_THAN + "", h.GREATER_THAN_OR_EQUAL + "", h.LESS_THAN + "", h.LESS_THAN_OR_EQUAL + "", h.NOT_BETWEEN + "", h.NOT_EQUAL + "";
|
|
@@ -872,12 +872,12 @@ function ye(s) {
|
|
|
872
872
|
let a = s;
|
|
873
873
|
return typeof s == "string" ? ((s.startsWith("¥") || s.startsWith("$")) && (a = s.slice(1)), +a) : +s;
|
|
874
874
|
}
|
|
875
|
-
class
|
|
875
|
+
class ha extends k {
|
|
876
876
|
constructor() {
|
|
877
877
|
super(...arguments);
|
|
878
878
|
f(this, "_customFormulaService", this.injector.get(P));
|
|
879
879
|
f(this, "id", T.DECIMAL);
|
|
880
|
-
f(this, "_lexerTreeBuilder", this.injector.get(
|
|
880
|
+
f(this, "_lexerTreeBuilder", this.injector.get(Y));
|
|
881
881
|
f(this, "title", "dataValidation.decimal.title");
|
|
882
882
|
f(this, "operators", [
|
|
883
883
|
h.BETWEEN,
|
|
@@ -959,19 +959,19 @@ function Pe(s) {
|
|
|
959
959
|
}
|
|
960
960
|
), [...a];
|
|
961
961
|
}
|
|
962
|
-
const
|
|
962
|
+
const ma = [
|
|
963
963
|
"if",
|
|
964
964
|
"indirect",
|
|
965
965
|
"choose",
|
|
966
966
|
"offset"
|
|
967
967
|
];
|
|
968
|
-
function
|
|
968
|
+
function fa(s, a) {
|
|
969
969
|
if (!v(s) || dt(s.slice(1)))
|
|
970
970
|
return !0;
|
|
971
971
|
const t = a.sequenceNodesBuilder(s);
|
|
972
|
-
return t && t.some((r) => typeof r == "object" && r.nodeType === Qt.FUNCTION &&
|
|
972
|
+
return t && t.some((r) => typeof r == "object" && r.nodeType === Qt.FUNCTION && ma.indexOf(r.token.toLowerCase()) > -1);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function ga(s, a) {
|
|
975
975
|
const { formula1: e = "", ranges: t } = s;
|
|
976
976
|
if (dt(e.slice(1))) {
|
|
977
977
|
const i = qt(e.slice(1));
|
|
@@ -983,8 +983,8 @@ function fa(s, a) {
|
|
|
983
983
|
class mt extends k {
|
|
984
984
|
constructor() {
|
|
985
985
|
super(...arguments);
|
|
986
|
-
f(this, "formulaService", this.injector.get(
|
|
987
|
-
f(this, "_lexer", this.injector.get(
|
|
986
|
+
f(this, "formulaService", this.injector.get(K));
|
|
987
|
+
f(this, "_lexer", this.injector.get(Y));
|
|
988
988
|
f(this, "_univerInstanceService", this.injector.get(O));
|
|
989
989
|
f(this, "offsetFormulaByRange", !1);
|
|
990
990
|
f(this, "id", T.LIST);
|
|
@@ -995,7 +995,7 @@ class mt extends k {
|
|
|
995
995
|
}
|
|
996
996
|
validatorFormula(e, t, r) {
|
|
997
997
|
var u, d, c;
|
|
998
|
-
const i = !V.isBlank(e.formula1), o =
|
|
998
|
+
const i = !V.isBlank(e.formula1), o = fa((u = e.formula1) != null ? u : "", this._lexer), n = (c = (d = this._univerInstanceService.getUnit(t, N.UNIVER_SHEET)) == null ? void 0 : d.getSheetBySheetId(r)) == null ? void 0 : c.getName(), l = ga(e, n != null ? n : "");
|
|
999
999
|
return {
|
|
1000
1000
|
success: !!(i && o && !l),
|
|
1001
1001
|
formula1: i ? o ? l ? this.localeService.t("dataValidation.validFail.listIntersects") : void 0 : this.localeService.t("dataValidation.validFail.listInvalid") : this.localeService.t("dataValidation.validFail.list")
|
|
@@ -1071,12 +1071,12 @@ class mt extends k {
|
|
|
1071
1071
|
}), o;
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
|
-
class
|
|
1074
|
+
class _a extends k {
|
|
1075
1075
|
constructor() {
|
|
1076
1076
|
super(...arguments);
|
|
1077
1077
|
f(this, "id", T.TEXT_LENGTH);
|
|
1078
1078
|
f(this, "title", "dataValidation.textLength.title");
|
|
1079
|
-
f(this, "_lexerTreeBuilder", this.injector.get(
|
|
1079
|
+
f(this, "_lexerTreeBuilder", this.injector.get(Y));
|
|
1080
1080
|
f(this, "operators", [
|
|
1081
1081
|
h.BETWEEN,
|
|
1082
1082
|
h.EQUAL,
|
|
@@ -1142,7 +1142,7 @@ function ft(s) {
|
|
|
1142
1142
|
return s ? s.p ? !((t = (e = s.p.body) == null ? void 0 : e.dataStream) != null ? t : "").slice(0, -2).trim() : V.isBlank(s.v) : !0;
|
|
1143
1143
|
}
|
|
1144
1144
|
function be(s, a, e, t, r = "command", i = !0) {
|
|
1145
|
-
const o = t.get(
|
|
1145
|
+
const o = t.get(Y), n = t.get(G), l = [], u = [], d = t.get(F), c = t.get(O), m = Ye(c, { unitId: s, subUnitId: a });
|
|
1146
1146
|
if (!m)
|
|
1147
1147
|
return {
|
|
1148
1148
|
redoMutations: l,
|
|
@@ -1317,13 +1317,13 @@ function be(s, a, e, t, r = "command", i = !0) {
|
|
|
1317
1317
|
undoMutations: u
|
|
1318
1318
|
};
|
|
1319
1319
|
}
|
|
1320
|
-
const
|
|
1321
|
-
type:
|
|
1320
|
+
const pa = {
|
|
1321
|
+
type: z.COMMAND,
|
|
1322
1322
|
id: "sheet.command.updateDataValidationRuleRange",
|
|
1323
1323
|
handler(s, a) {
|
|
1324
1324
|
if (!a)
|
|
1325
1325
|
return !1;
|
|
1326
|
-
const { unitId: e, subUnitId: t, ranges: r, ruleId: i } = a, o = s.get(F), n = s.get(x), l = s.get(
|
|
1326
|
+
const { unitId: e, subUnitId: t, ranges: r, ruleId: i } = a, o = s.get(F), n = s.get(x), l = s.get(Z);
|
|
1327
1327
|
if (!o.getRuleById(e, t, i))
|
|
1328
1328
|
return !1;
|
|
1329
1329
|
const d = o.getRuleObjectMatrix(e, t).clone();
|
|
@@ -1335,13 +1335,13 @@ const _a = {
|
|
|
1335
1335
|
unitID: e
|
|
1336
1336
|
}), Ie(m, n), !0;
|
|
1337
1337
|
}
|
|
1338
|
-
},
|
|
1339
|
-
type:
|
|
1338
|
+
}, Ra = {
|
|
1339
|
+
type: z.COMMAND,
|
|
1340
1340
|
id: "sheet.command.addDataValidation",
|
|
1341
1341
|
handler(s, a) {
|
|
1342
1342
|
if (!a)
|
|
1343
1343
|
return !1;
|
|
1344
|
-
const { unitId: e, subUnitId: t, rule: r } = a, i = s.get(F), o = s.get(x), n = s.get(
|
|
1344
|
+
const { unitId: e, subUnitId: t, rule: r } = a, i = s.get(F), o = s.get(x), n = s.get(Z), l = i.getRuleObjectMatrix(e, t).clone();
|
|
1345
1345
|
l.addRule(r);
|
|
1346
1346
|
const u = l.diff(i.getRules(e, t)), d = i.getValidator(r.type), c = {
|
|
1347
1347
|
unitId: e,
|
|
@@ -1367,14 +1367,14 @@ const _a = {
|
|
|
1367
1367
|
undoMutations: _
|
|
1368
1368
|
}), Ie(m, o), !0;
|
|
1369
1369
|
}
|
|
1370
|
-
},
|
|
1371
|
-
type:
|
|
1370
|
+
}, Sa = {
|
|
1371
|
+
type: z.COMMAND,
|
|
1372
1372
|
id: "sheets.command.update-data-validation-setting",
|
|
1373
1373
|
// eslint-disable-next-line max-lines-per-function
|
|
1374
1374
|
handler(s, a) {
|
|
1375
1375
|
if (!a)
|
|
1376
1376
|
return !1;
|
|
1377
|
-
const e = s.get(x), t = s.get(
|
|
1377
|
+
const e = s.get(x), t = s.get(Z), r = s.get(F), i = s.get(G), { unitId: o, subUnitId: n, ruleId: l, setting: u } = a, d = i.getValidatorItem(u.type);
|
|
1378
1378
|
if (!d)
|
|
1379
1379
|
return !1;
|
|
1380
1380
|
const c = r.getRuleById(o, n, l);
|
|
@@ -1447,13 +1447,13 @@ const _a = {
|
|
|
1447
1447
|
undoMutations: M
|
|
1448
1448
|
}), !0) : !1;
|
|
1449
1449
|
}
|
|
1450
|
-
},
|
|
1451
|
-
type:
|
|
1450
|
+
}, va = {
|
|
1451
|
+
type: z.COMMAND,
|
|
1452
1452
|
id: "sheets.command.update-data-validation-options",
|
|
1453
1453
|
handler(s, a) {
|
|
1454
1454
|
if (!a)
|
|
1455
1455
|
return !1;
|
|
1456
|
-
const e = s.get(x), t = s.get(
|
|
1456
|
+
const e = s.get(x), t = s.get(Z), r = s.get(F), { unitId: i, subUnitId: o, ruleId: n, options: l } = a, u = r.getRuleById(i, o, n);
|
|
1457
1457
|
if (!u)
|
|
1458
1458
|
return !1;
|
|
1459
1459
|
const d = {
|
|
@@ -1485,15 +1485,15 @@ const _a = {
|
|
|
1485
1485
|
undoMutations: _
|
|
1486
1486
|
}), e.executeCommand(E.id, d), !0;
|
|
1487
1487
|
}
|
|
1488
|
-
},
|
|
1489
|
-
type:
|
|
1488
|
+
}, Va = {
|
|
1489
|
+
type: z.COMMAND,
|
|
1490
1490
|
id: "sheets.command.clear-range-data-validation",
|
|
1491
1491
|
handler(s, a) {
|
|
1492
1492
|
if (!a)
|
|
1493
1493
|
return !1;
|
|
1494
1494
|
const { unitId: e, subUnitId: t, ranges: r } = a, i = s.get(x), o = s.get(O), n = Ye(o, { unitId: e, subUnitId: t }), l = s.get(F);
|
|
1495
1495
|
if (!n) return !1;
|
|
1496
|
-
const u = s.get(
|
|
1496
|
+
const u = s.get(Z), d = l.getRuleObjectMatrix(e, t).clone();
|
|
1497
1497
|
d.removeRange(r);
|
|
1498
1498
|
const c = d.diff(l.getRules(e, t)), { redoMutations: m, undoMutations: _ } = be(e, t, c, s);
|
|
1499
1499
|
return u.pushUndoRedo({
|
|
@@ -1502,13 +1502,13 @@ const _a = {
|
|
|
1502
1502
|
undoMutations: _
|
|
1503
1503
|
}), Ie(m, i).result;
|
|
1504
1504
|
}
|
|
1505
|
-
},
|
|
1506
|
-
type:
|
|
1505
|
+
}, Ma = {
|
|
1506
|
+
type: z.COMMAND,
|
|
1507
1507
|
id: "sheet.command.remove-all-data-validation",
|
|
1508
1508
|
handler(s, a) {
|
|
1509
1509
|
if (!a)
|
|
1510
1510
|
return !1;
|
|
1511
|
-
const { unitId: e, subUnitId: t } = a, r = s.get(x), i = s.get(F), o = s.get(
|
|
1511
|
+
const { unitId: e, subUnitId: t } = a, r = s.get(x), i = s.get(F), o = s.get(Z), n = [...i.getRules(e, t)], l = {
|
|
1512
1512
|
unitId: e,
|
|
1513
1513
|
subUnitId: t,
|
|
1514
1514
|
ruleId: n.map((c) => c.uid)
|
|
@@ -1529,7 +1529,7 @@ const _a = {
|
|
|
1529
1529
|
unitID: e
|
|
1530
1530
|
}), r.executeCommand(A.id, l), !0;
|
|
1531
1531
|
}
|
|
1532
|
-
},
|
|
1532
|
+
}, ya = (s, a) => {
|
|
1533
1533
|
const e = s.get(F), { unitId: t, subUnitId: r, ruleId: i, source: o } = a;
|
|
1534
1534
|
if (Array.isArray(i)) {
|
|
1535
1535
|
const l = i.map((u) => e.getRuleById(t, r, u)).filter(Boolean);
|
|
@@ -1554,13 +1554,13 @@ const _a = {
|
|
|
1554
1554
|
index: e.getRuleIndex(t, r, i)
|
|
1555
1555
|
}
|
|
1556
1556
|
}];
|
|
1557
|
-
},
|
|
1558
|
-
type:
|
|
1557
|
+
}, Ea = {
|
|
1558
|
+
type: z.COMMAND,
|
|
1559
1559
|
id: "sheet.command.remove-data-validation-rule",
|
|
1560
1560
|
handler(s, a) {
|
|
1561
1561
|
if (!a)
|
|
1562
1562
|
return !1;
|
|
1563
|
-
const { unitId: e, subUnitId: t, ruleId: r } = a, i = s.get(x), o = s.get(
|
|
1563
|
+
const { unitId: e, subUnitId: t, ruleId: r } = a, i = s.get(x), o = s.get(Z), n = s.get(F), l = [{
|
|
1564
1564
|
id: A.id,
|
|
1565
1565
|
params: a
|
|
1566
1566
|
}], u = [{
|
|
@@ -1580,11 +1580,11 @@ const _a = {
|
|
|
1580
1580
|
unitID: a.unitId
|
|
1581
1581
|
}), i.executeCommand(A.id, a), !0;
|
|
1582
1582
|
}
|
|
1583
|
-
},
|
|
1584
|
-
var
|
|
1585
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1583
|
+
}, Ta = "sheets-data-validation.config", tt = {};
|
|
1584
|
+
var Fa = Object.defineProperty, Na = Object.getOwnPropertyDescriptor, Ca = (s, a, e, t) => {
|
|
1585
|
+
for (var r = t > 1 ? void 0 : t ? Na(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
1586
1586
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
1587
|
-
return t && r &&
|
|
1587
|
+
return t && r && Fa(a, e, r), r;
|
|
1588
1588
|
}, $e = (s, a) => (e, t) => a(e, t, s);
|
|
1589
1589
|
let Ee = class extends $ {
|
|
1590
1590
|
constructor(a, e, t) {
|
|
@@ -1723,15 +1723,15 @@ let Ee = class extends $ {
|
|
|
1723
1723
|
}));
|
|
1724
1724
|
}
|
|
1725
1725
|
};
|
|
1726
|
-
Ee =
|
|
1726
|
+
Ee = Ca([
|
|
1727
1727
|
$e(0, S(F)),
|
|
1728
1728
|
$e(1, S(ut)),
|
|
1729
1729
|
$e(2, S(G))
|
|
1730
1730
|
], Ee);
|
|
1731
|
-
var gt = /* @__PURE__ */ ((s) => (s[s.View = 0] = "View", s[s.Edit = 1] = "Edit", s[s.ManageCollaborator = 2] = "ManageCollaborator", s[s.Print = 3] = "Print", s[s.Duplicate = 4] = "Duplicate", s[s.Comment = 5] = "Comment", s[s.Copy = 6] = "Copy", s[s.Share = 7] = "Share", s[s.Export = 8] = "Export", s[s.MoveWorksheet = 9] = "MoveWorksheet", s[s.DeleteWorksheet = 10] = "DeleteWorksheet", s[s.HideWorksheet = 11] = "HideWorksheet", s[s.RenameWorksheet = 12] = "RenameWorksheet", s[s.CreateWorksheet = 13] = "CreateWorksheet", s[s.SetWorksheetStyle = 14] = "SetWorksheetStyle", s[s.EditWorksheetCell = 15] = "EditWorksheetCell", s[s.InsertHyperlink = 16] = "InsertHyperlink", s[s.Sort = 17] = "Sort", s[s.Filter = 18] = "Filter", s[s.PivotTable = 19] = "PivotTable", s[s.FloatImg = 20] = "FloatImg", s[s.History = 21] = "History", s[s.RwHgtClWdt = 22] = "RwHgtClWdt", s[s.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", s[s.ViewFilter = 24] = "ViewFilter", s[s.MoveSheet = 25] = "MoveSheet", s[s.DeleteSheet = 26] = "DeleteSheet", s[s.HideSheet = 27] = "HideSheet", s[s.CopySheet = 28] = "CopySheet", s[s.RenameSheet = 29] = "RenameSheet", s[s.CreateSheet = 30] = "CreateSheet", s[s.SelectProtectedCells = 31] = "SelectProtectedCells", s[s.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", s[s.SetCellStyle = 33] = "SetCellStyle", s[s.SetCellValue = 34] = "SetCellValue", s[s.SetRowStyle = 35] = "SetRowStyle", s[s.SetColumnStyle = 36] = "SetColumnStyle", s[s.InsertRow = 37] = "InsertRow", s[s.InsertColumn = 38] = "InsertColumn", s[s.DeleteRow = 39] = "DeleteRow", s[s.DeleteColumn = 40] = "DeleteColumn", s[s.EditExtraObject = 41] = "EditExtraObject", s[s.Delete = 42] = "Delete", s[s.RecoverHistory = 43] = "RecoverHistory", s[s.ViewHistory = 44] = "ViewHistory", s[s.CreatePermissionObject = 45] = "CreatePermissionObject", s[s.UNRECOGNIZED = -1] = "UNRECOGNIZED", s))(gt || {}),
|
|
1732
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1731
|
+
var gt = /* @__PURE__ */ ((s) => (s[s.View = 0] = "View", s[s.Edit = 1] = "Edit", s[s.ManageCollaborator = 2] = "ManageCollaborator", s[s.Print = 3] = "Print", s[s.Duplicate = 4] = "Duplicate", s[s.Comment = 5] = "Comment", s[s.Copy = 6] = "Copy", s[s.Share = 7] = "Share", s[s.Export = 8] = "Export", s[s.MoveWorksheet = 9] = "MoveWorksheet", s[s.DeleteWorksheet = 10] = "DeleteWorksheet", s[s.HideWorksheet = 11] = "HideWorksheet", s[s.RenameWorksheet = 12] = "RenameWorksheet", s[s.CreateWorksheet = 13] = "CreateWorksheet", s[s.SetWorksheetStyle = 14] = "SetWorksheetStyle", s[s.EditWorksheetCell = 15] = "EditWorksheetCell", s[s.InsertHyperlink = 16] = "InsertHyperlink", s[s.Sort = 17] = "Sort", s[s.Filter = 18] = "Filter", s[s.PivotTable = 19] = "PivotTable", s[s.FloatImg = 20] = "FloatImg", s[s.History = 21] = "History", s[s.RwHgtClWdt = 22] = "RwHgtClWdt", s[s.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", s[s.ViewFilter = 24] = "ViewFilter", s[s.MoveSheet = 25] = "MoveSheet", s[s.DeleteSheet = 26] = "DeleteSheet", s[s.HideSheet = 27] = "HideSheet", s[s.CopySheet = 28] = "CopySheet", s[s.RenameSheet = 29] = "RenameSheet", s[s.CreateSheet = 30] = "CreateSheet", s[s.SelectProtectedCells = 31] = "SelectProtectedCells", s[s.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", s[s.SetCellStyle = 33] = "SetCellStyle", s[s.SetCellValue = 34] = "SetCellValue", s[s.SetRowStyle = 35] = "SetRowStyle", s[s.SetColumnStyle = 36] = "SetColumnStyle", s[s.InsertRow = 37] = "InsertRow", s[s.InsertColumn = 38] = "InsertColumn", s[s.DeleteRow = 39] = "DeleteRow", s[s.DeleteColumn = 40] = "DeleteColumn", s[s.EditExtraObject = 41] = "EditExtraObject", s[s.Delete = 42] = "Delete", s[s.RecoverHistory = 43] = "RecoverHistory", s[s.ViewHistory = 44] = "ViewHistory", s[s.CreatePermissionObject = 45] = "CreatePermissionObject", s[s.UNRECOGNIZED = -1] = "UNRECOGNIZED", s))(gt || {}), Oa = Object.defineProperty, wa = Object.getOwnPropertyDescriptor, Ia = (s, a, e, t) => {
|
|
1732
|
+
for (var r = t > 1 ? void 0 : t ? wa(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
1733
1733
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
1734
|
-
return t && r &&
|
|
1734
|
+
return t && r && Oa(a, e, r), r;
|
|
1735
1735
|
}, He = (s, a) => (e, t) => a(e, t, s);
|
|
1736
1736
|
let Te = class extends $ {
|
|
1737
1737
|
constructor(s, a, e) {
|
|
@@ -1768,15 +1768,15 @@ let Te = class extends $ {
|
|
|
1768
1768
|
return !0;
|
|
1769
1769
|
}
|
|
1770
1770
|
};
|
|
1771
|
-
Te =
|
|
1771
|
+
Te = Ia([
|
|
1772
1772
|
He(0, O),
|
|
1773
1773
|
He(1, Et),
|
|
1774
|
-
He(2, S(
|
|
1774
|
+
He(2, S(Y))
|
|
1775
1775
|
], Te);
|
|
1776
|
-
var
|
|
1777
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1776
|
+
var Aa = Object.defineProperty, Da = Object.getOwnPropertyDescriptor, ba = (s, a, e, t) => {
|
|
1777
|
+
for (var r = t > 1 ? void 0 : t ? Da(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
1778
1778
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
1779
|
-
return t && r &&
|
|
1779
|
+
return t && r && Aa(a, e, r), r;
|
|
1780
1780
|
}, ee = (s, a) => (e, t) => a(e, t, s);
|
|
1781
1781
|
let Fe = class extends $ {
|
|
1782
1782
|
constructor(a, e, t, r, i, o) {
|
|
@@ -1893,7 +1893,7 @@ let Fe = class extends $ {
|
|
|
1893
1893
|
}];
|
|
1894
1894
|
return { redos: R, undos: M };
|
|
1895
1895
|
} else {
|
|
1896
|
-
const g = { unitId: a, subUnitId: e, ruleId: t.uid }, R = [{ id: A.id, params: g }], M =
|
|
1896
|
+
const g = { unitId: a, subUnitId: e, ruleId: t.uid }, R = [{ id: A.id, params: g }], M = ya(this._injector, g);
|
|
1897
1897
|
return { redos: R, undos: M };
|
|
1898
1898
|
}
|
|
1899
1899
|
}, i = [];
|
|
@@ -1938,18 +1938,18 @@ let Fe = class extends $ {
|
|
|
1938
1938
|
}));
|
|
1939
1939
|
}
|
|
1940
1940
|
};
|
|
1941
|
-
Fe =
|
|
1941
|
+
Fe = ba([
|
|
1942
1942
|
ee(0, S(F)),
|
|
1943
1943
|
ee(1, S(Ge)),
|
|
1944
1944
|
ee(2, S(Ut)),
|
|
1945
|
-
ee(3, S(
|
|
1945
|
+
ee(3, S(K)),
|
|
1946
1946
|
ee(4, S(ut)),
|
|
1947
1947
|
ee(5, S(G))
|
|
1948
1948
|
], Fe);
|
|
1949
|
-
var
|
|
1950
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
1949
|
+
var La = Object.defineProperty, xa = Object.getOwnPropertyDescriptor, Ba = (s, a, e, t) => {
|
|
1950
|
+
for (var r = t > 1 ? void 0 : t ? xa(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
1951
1951
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
1952
|
-
return t && r &&
|
|
1952
|
+
return t && r && La(a, e, r), r;
|
|
1953
1953
|
}, We = (s, a) => (e, t) => a(e, t, s);
|
|
1954
1954
|
let Ne = class extends $ {
|
|
1955
1955
|
constructor(s, a, e) {
|
|
@@ -1998,12 +1998,12 @@ let Ne = class extends $ {
|
|
|
1998
1998
|
);
|
|
1999
1999
|
}
|
|
2000
2000
|
};
|
|
2001
|
-
Ne =
|
|
2001
|
+
Ne = Ba([
|
|
2002
2002
|
We(0, S(ot)),
|
|
2003
2003
|
We(1, S(O)),
|
|
2004
2004
|
We(2, S(F))
|
|
2005
2005
|
], Ne);
|
|
2006
|
-
class
|
|
2006
|
+
class Ua extends k {
|
|
2007
2007
|
constructor() {
|
|
2008
2008
|
super(...arguments);
|
|
2009
2009
|
f(this, "id", T.ANY);
|
|
@@ -2031,7 +2031,7 @@ class Ba extends k {
|
|
|
2031
2031
|
return this.localeService.t("dataValidation.any.error");
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
|
-
class
|
|
2034
|
+
class Pa extends k {
|
|
2035
2035
|
constructor() {
|
|
2036
2036
|
super(...arguments);
|
|
2037
2037
|
f(this, "id", T.CUSTOM);
|
|
@@ -2039,12 +2039,14 @@ class Ua extends k {
|
|
|
2039
2039
|
f(this, "operators", []);
|
|
2040
2040
|
f(this, "scopes", ["sheet"]);
|
|
2041
2041
|
f(this, "_customFormulaService", this.injector.get(P));
|
|
2042
|
+
f(this, "_lexerTreeBuilder", this.injector.get(Y));
|
|
2042
2043
|
}
|
|
2043
2044
|
validatorFormula(e, t, r) {
|
|
2044
|
-
|
|
2045
|
+
var u;
|
|
2046
|
+
const i = v(e.formula1), o = (u = e.formula1) != null ? u : "", l = this._lexerTreeBuilder.checkIfAddBracket(o) === 0 && o.startsWith(kt.EQUALS);
|
|
2045
2047
|
return {
|
|
2046
|
-
success: i,
|
|
2047
|
-
formula1: i ? "" : this.localeService.t("dataValidation.validFail.formula")
|
|
2048
|
+
success: i && l,
|
|
2049
|
+
formula1: i && l ? "" : this.localeService.t("dataValidation.validFail.formula")
|
|
2048
2050
|
};
|
|
2049
2051
|
}
|
|
2050
2052
|
async parseFormula(e, t, r) {
|
|
@@ -2066,7 +2068,7 @@ class Ua extends k {
|
|
|
2066
2068
|
return this.localeService.t("dataValidation.custom.ruleName").replace("{FORMULA1}", (t = e.formula1) != null ? t : "");
|
|
2067
2069
|
}
|
|
2068
2070
|
}
|
|
2069
|
-
class
|
|
2071
|
+
class $a extends mt {
|
|
2070
2072
|
constructor() {
|
|
2071
2073
|
super(...arguments);
|
|
2072
2074
|
f(this, "id", T.LIST_MULTIPLE);
|
|
@@ -2075,11 +2077,11 @@ class Pa extends mt {
|
|
|
2075
2077
|
f(this, "skipDefaultFontRender", () => !0);
|
|
2076
2078
|
}
|
|
2077
2079
|
}
|
|
2078
|
-
class
|
|
2080
|
+
class Ha extends k {
|
|
2079
2081
|
constructor() {
|
|
2080
2082
|
super(...arguments);
|
|
2081
2083
|
f(this, "_customFormulaService", this.injector.get(P));
|
|
2082
|
-
f(this, "_lexerTreeBuilder", this.injector.get(
|
|
2084
|
+
f(this, "_lexerTreeBuilder", this.injector.get(Y));
|
|
2083
2085
|
f(this, "id", T.WHOLE);
|
|
2084
2086
|
f(this, "title", "dataValidation.whole.title");
|
|
2085
2087
|
f(this, "operators", [
|
|
@@ -2142,10 +2144,10 @@ class $a extends k {
|
|
|
2142
2144
|
return `${this.localeService.t(ht[e.operator]).replace(le, r != null ? r : "").replace(ue, i != null ? i : "")}`;
|
|
2143
2145
|
}
|
|
2144
2146
|
}
|
|
2145
|
-
var
|
|
2146
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2147
|
+
var Wa = Object.defineProperty, ja = Object.getOwnPropertyDescriptor, Qa = (s, a, e, t) => {
|
|
2148
|
+
for (var r = t > 1 ? void 0 : t ? ja(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
2147
2149
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
2148
|
-
return t && r &&
|
|
2150
|
+
return t && r && Wa(a, e, r), r;
|
|
2149
2151
|
}, te = (s, a) => (e, t) => a(e, t, s);
|
|
2150
2152
|
let Ce = class extends Ft {
|
|
2151
2153
|
constructor(s, a, e, t, r, i) {
|
|
@@ -2156,15 +2158,15 @@ let Ce = class extends Ft {
|
|
|
2156
2158
|
}
|
|
2157
2159
|
_registerValidators() {
|
|
2158
2160
|
[
|
|
2159
|
-
|
|
2161
|
+
Ua,
|
|
2162
|
+
ha,
|
|
2163
|
+
Ha,
|
|
2164
|
+
_a,
|
|
2160
2165
|
ca,
|
|
2161
|
-
|
|
2162
|
-
ga,
|
|
2163
|
-
da,
|
|
2164
|
-
oa,
|
|
2166
|
+
na,
|
|
2165
2167
|
mt,
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
+
$a,
|
|
2169
|
+
Pa
|
|
2168
2170
|
].forEach((s) => {
|
|
2169
2171
|
const a = this._injector.createInstance(s);
|
|
2170
2172
|
this.disposeWithMe(this._dataValidatorRegistryService.register(a)), this.disposeWithMe(qe(() => this._injector.delete(s)));
|
|
@@ -2194,7 +2196,7 @@ let Ce = class extends Ft {
|
|
|
2194
2196
|
});
|
|
2195
2197
|
}
|
|
2196
2198
|
};
|
|
2197
|
-
Ce =
|
|
2199
|
+
Ce = Qa([
|
|
2198
2200
|
te(0, O),
|
|
2199
2201
|
te(1, S(G)),
|
|
2200
2202
|
te(2, S(Ge)),
|
|
@@ -2202,10 +2204,10 @@ Ce = ja([
|
|
|
2202
2204
|
te(4, S(ot)),
|
|
2203
2205
|
te(5, S(F))
|
|
2204
2206
|
], Ce);
|
|
2205
|
-
var
|
|
2206
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2207
|
+
var qa = Object.defineProperty, Ga = Object.getOwnPropertyDescriptor, ka = (s, a, e, t) => {
|
|
2208
|
+
for (var r = t > 1 ? void 0 : t ? Ga(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
2207
2209
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
2208
|
-
return t && r &&
|
|
2210
|
+
return t && r && qa(a, e, r), r;
|
|
2209
2211
|
}, Re = (s, a) => (e, t) => a(e, t, s);
|
|
2210
2212
|
let Oe = class extends $ {
|
|
2211
2213
|
constructor(s, a, e, t) {
|
|
@@ -2263,7 +2265,7 @@ let Oe = class extends $ {
|
|
|
2263
2265
|
const o = [];
|
|
2264
2266
|
return b.foreach(i, (n, l) => {
|
|
2265
2267
|
o.push(this._validatorByCell(t, r, n, l));
|
|
2266
|
-
}), o;
|
|
2268
|
+
}), Promise.all(o);
|
|
2267
2269
|
}));
|
|
2268
2270
|
}
|
|
2269
2271
|
async validatorWorksheet(s, a) {
|
|
@@ -2300,17 +2302,17 @@ let Oe = class extends $ {
|
|
|
2300
2302
|
return this.getDataValidations(s, a, e)[0];
|
|
2301
2303
|
}
|
|
2302
2304
|
};
|
|
2303
|
-
Oe =
|
|
2305
|
+
Oe = ka([
|
|
2304
2306
|
Re(0, O),
|
|
2305
2307
|
Re(1, S(F)),
|
|
2306
2308
|
Re(2, S(q)),
|
|
2307
2309
|
Re(3, S(Nt))
|
|
2308
2310
|
], Oe);
|
|
2309
|
-
var _t = Object.defineProperty,
|
|
2310
|
-
for (var r = t > 1 ? void 0 : t ?
|
|
2311
|
+
var _t = Object.defineProperty, Ya = Object.getOwnPropertyDescriptor, Xa = (s, a, e) => a in s ? _t(s, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[a] = e, Ka = (s, a, e, t) => {
|
|
2312
|
+
for (var r = t > 1 ? void 0 : t ? Ya(a, e) : a, i = s.length - 1, o; i >= 0; i--)
|
|
2311
2313
|
(o = s[i]) && (r = (t ? o(a, e, r) : o(r)) || r);
|
|
2312
2314
|
return t && r && _t(a, e, r), r;
|
|
2313
|
-
}, je = (s, a) => (e, t) => a(e, t, s), pt = (s, a, e) =>
|
|
2315
|
+
}, je = (s, a) => (e, t) => a(e, t, s), pt = (s, a, e) => Xa(s, typeof a != "symbol" ? a + "" : a, e);
|
|
2314
2316
|
let we = class extends wt {
|
|
2315
2317
|
constructor(s = tt, a, e, t) {
|
|
2316
2318
|
super(), this._config = s, this._injector = a, this._commandService = e, this._configService = t;
|
|
@@ -2319,12 +2321,12 @@ let we = class extends wt {
|
|
|
2319
2321
|
tt,
|
|
2320
2322
|
this._config
|
|
2321
2323
|
);
|
|
2322
|
-
this._configService.setConfig(
|
|
2324
|
+
this._configService.setConfig(Ta, r);
|
|
2323
2325
|
}
|
|
2324
2326
|
onStarting() {
|
|
2325
2327
|
[
|
|
2326
2328
|
[q],
|
|
2327
|
-
[
|
|
2329
|
+
[K],
|
|
2328
2330
|
[P],
|
|
2329
2331
|
[Oe],
|
|
2330
2332
|
[F],
|
|
@@ -2336,13 +2338,13 @@ let we = class extends wt {
|
|
|
2336
2338
|
].forEach((s) => {
|
|
2337
2339
|
this._injector.add(s);
|
|
2338
2340
|
}), [
|
|
2339
|
-
pa,
|
|
2340
|
-
_a,
|
|
2341
2341
|
Ra,
|
|
2342
|
+
pa,
|
|
2342
2343
|
Sa,
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2344
|
+
va,
|
|
2345
|
+
Ea,
|
|
2346
|
+
Ma,
|
|
2347
|
+
Va
|
|
2346
2348
|
].forEach((s) => {
|
|
2347
2349
|
this._commandService.registerCommand(s);
|
|
2348
2350
|
}), this._injector.get(q), this._injector.get(Oe), this._injector.get(Ee), this._injector.get(Fe);
|
|
@@ -2354,15 +2356,15 @@ let we = class extends wt {
|
|
|
2354
2356
|
this._injector.get(Ce), this._injector.get(Te);
|
|
2355
2357
|
}
|
|
2356
2358
|
};
|
|
2357
|
-
pt(we, "pluginName",
|
|
2359
|
+
pt(we, "pluginName", Yt);
|
|
2358
2360
|
pt(we, "type", N.UNIVER_SHEET);
|
|
2359
|
-
we =
|
|
2361
|
+
we = Ka([
|
|
2360
2362
|
Ot(xt),
|
|
2361
2363
|
je(1, S(Ge)),
|
|
2362
2364
|
je(2, x),
|
|
2363
2365
|
je(3, At)
|
|
2364
2366
|
], we);
|
|
2365
|
-
function
|
|
2367
|
+
function or(s) {
|
|
2366
2368
|
const e = s.get(nt).getCurrentSelections().map((i) => i.range);
|
|
2367
2369
|
return {
|
|
2368
2370
|
uid: V.generateRandomId(6),
|
|
@@ -2373,35 +2375,35 @@ function sr(s) {
|
|
|
2373
2375
|
};
|
|
2374
2376
|
}
|
|
2375
2377
|
export {
|
|
2376
|
-
|
|
2378
|
+
Ra as AddSheetDataValidationCommand,
|
|
2377
2379
|
Ve as CHECKBOX_FORMULA_1,
|
|
2378
2380
|
Me as CHECKBOX_FORMULA_2,
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2381
|
+
na as CheckboxValidator,
|
|
2382
|
+
Va as ClearRangeDataValidationCommand,
|
|
2383
|
+
Yt as DATA_VALIDATION_PLUGIN_NAME,
|
|
2382
2384
|
q as DataValidationCacheService,
|
|
2383
2385
|
P as DataValidationCustomFormulaService,
|
|
2384
2386
|
Te as DataValidationFormulaController,
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2387
|
+
K as DataValidationFormulaService,
|
|
2388
|
+
ca as DateValidator,
|
|
2389
|
+
$a as ListMultipleValidator,
|
|
2388
2390
|
mt as ListValidator,
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
+
Ma as RemoveSheetAllDataValidationCommand,
|
|
2392
|
+
Ea as RemoveSheetDataValidationCommand,
|
|
2391
2393
|
F as SheetDataValidationModel,
|
|
2392
2394
|
Oe as SheetsDataValidationValidatorService,
|
|
2393
2395
|
we as UniverSheetsDataValidationPlugin,
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2396
|
+
va as UpdateSheetDataValidationOptionsCommand,
|
|
2397
|
+
pa as UpdateSheetDataValidationRangeCommand,
|
|
2398
|
+
Sa as UpdateSheetDataValidationSettingCommand,
|
|
2399
|
+
or as createDefaultNewRule,
|
|
2398
2400
|
pe as deserializeListOptions,
|
|
2399
2401
|
ne as getCellValueOrigin,
|
|
2400
|
-
|
|
2402
|
+
sr as getDataValidationCellValue,
|
|
2401
2403
|
be as getDataValidationDiffMutations,
|
|
2402
2404
|
ge as getFormulaCellData,
|
|
2403
2405
|
se as getFormulaResult,
|
|
2404
2406
|
C as isLegalFormulaResult,
|
|
2405
|
-
|
|
2407
|
+
ir as serializeListOptions,
|
|
2406
2408
|
_e as transformCheckboxValue
|
|
2407
2409
|
};
|