@univerjs/data-validation 0.16.1 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,9 +1,9 @@
1
- var z = Object.defineProperty;
2
- var Y = (t, e, r) => e in t ? z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var c = (t, e, r) => Y(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { Disposable as $, Tools as K, ILogService as f, CommandType as g, IResourceManagerService as X, IUniverInstanceService as Z, Inject as V, UniverInstanceType as q, toDisposable as ee, ICommandService as T, IUndoRedoService as A, Plugin as te, merge as ae, Injector as H, IConfigService as re, DataValidationOperator as s, LocaleService as oe } from "@univerjs/core";
5
- import { Subject as ne, debounceTime as ie, BehaviorSubject as se } from "rxjs";
6
- function Q(t) {
1
+ var Y = Object.defineProperty;
2
+ var K = (t, e, r) => e in t ? Y(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var c = (t, e, r) => K(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { Disposable as q, Tools as X, ILogService as T, CommandType as E, IResourceManagerService as Z, IUniverInstanceService as ee, Inject as V, UniverInstanceType as H, toDisposable as te, ICommandService as S, IUndoRedoService as M, Plugin as ae, merge as re, Injector as Q, IConfigService as oe, DataValidationOperator as s, LocaleService as ne } from "@univerjs/core";
5
+ import { Subject as ie, debounceTime as se, BehaviorSubject as de } from "rxjs";
6
+ function j(t) {
7
7
  return {
8
8
  type: t.type,
9
9
  operator: t.operator,
@@ -12,7 +12,7 @@ function Q(t) {
12
12
  allowBlank: t.allowBlank
13
13
  };
14
14
  }
15
- function j(t) {
15
+ function F(t) {
16
16
  return {
17
17
  error: t.error,
18
18
  errorStyle: t.errorStyle,
@@ -27,18 +27,18 @@ function j(t) {
27
27
  bizInfo: t.bizInfo
28
28
  };
29
29
  }
30
- var p = /* @__PURE__ */ ((t) => (t[t.SETTING = 0] = "SETTING", t[t.RANGE = 1] = "RANGE", t[t.OPTIONS = 2] = "OPTIONS", t[t.ALL = 3] = "ALL", t))(p || {}), de = Object.getOwnPropertyDescriptor, le = (t, e, r, a) => {
31
- for (var o = a > 1 ? void 0 : a ? de(e, r) : e, n = t.length - 1, i; n >= 0; n--)
30
+ var p = /* @__PURE__ */ ((t) => (t[t.SETTING = 0] = "SETTING", t[t.RANGE = 1] = "RANGE", t[t.OPTIONS = 2] = "OPTIONS", t[t.ALL = 3] = "ALL", t))(p || {}), le = Object.getOwnPropertyDescriptor, ue = (t, e, r, a) => {
31
+ for (var o = a > 1 ? void 0 : a ? le(e, r) : e, n = t.length - 1, i; n >= 0; n--)
32
32
  (i = t[n]) && (o = i(o) || o);
33
33
  return o;
34
- }, ue = (t, e) => (r, a) => e(r, a, t);
35
- let h = class extends $ {
34
+ }, ce = (t, e) => (r, a) => e(r, a, t);
35
+ let h = class extends q {
36
36
  constructor(e) {
37
37
  super();
38
38
  c(this, "_model", /* @__PURE__ */ new Map());
39
- c(this, "_ruleChange$", new ne());
39
+ c(this, "_ruleChange$", new ie());
40
40
  c(this, "ruleChange$", this._ruleChange$.asObservable());
41
- c(this, "ruleChangeDebounce$", this.ruleChange$.pipe(ie(20)));
41
+ c(this, "ruleChangeDebounce$", this.ruleChange$.pipe(se(20)));
42
42
  this._logService = e, this.disposeWithMe({
43
43
  dispose: () => {
44
44
  this._ruleChange$.complete();
@@ -74,11 +74,11 @@ let h = class extends $ {
74
74
  break;
75
75
  }
76
76
  case p.SETTING: {
77
- Object.assign(d, Q(a.payload));
77
+ Object.assign(d, j(a.payload));
78
78
  break;
79
79
  }
80
80
  case p.OPTIONS: {
81
- Object.assign(d, j(a.payload));
81
+ Object.assign(d, F(a.payload));
82
82
  break;
83
83
  }
84
84
  case p.ALL: {
@@ -110,7 +110,7 @@ let h = class extends $ {
110
110
  }
111
111
  updateRule(e, r, a, o, n) {
112
112
  try {
113
- const i = this._ensureMap(e, r), l = K.deepClone(i.map.get(a));
113
+ const i = this._ensureMap(e, r), l = X.deepClone(i.map.get(a));
114
114
  if (!l)
115
115
  throw new Error(`Data validation rule is not found, ruleId: ${a}.`);
116
116
  const d = this._updateSubUnitRule(i, a, o);
@@ -170,11 +170,11 @@ let h = class extends $ {
170
170
  return Array.from(this._model.keys()).map((e) => [e, this.getUnitRules(e)]);
171
171
  }
172
172
  };
173
- h = le([
174
- ue(0, f)
173
+ h = ue([
174
+ ce(0, T)
175
175
  ], h);
176
- const S = {
177
- type: g.MUTATION,
176
+ const A = {
177
+ type: E.MUTATION,
178
178
  id: "data-validation.mutation.addRule",
179
179
  handler(t, e) {
180
180
  if (!e)
@@ -182,8 +182,8 @@ const S = {
182
182
  const { unitId: r, subUnitId: a, rule: o, index: n, source: i = "command" } = e;
183
183
  return t.get(h).addRule(r, a, o, i, n), !0;
184
184
  }
185
- }, N = {
186
- type: g.MUTATION,
185
+ }, f = {
186
+ type: E.MUTATION,
187
187
  id: "data-validation.mutation.removeRule",
188
188
  handler(t, e) {
189
189
  if (!e)
@@ -194,7 +194,7 @@ const S = {
194
194
  }) : i.removeRule(r, a, o, n), !0;
195
195
  }
196
196
  }, v = {
197
- type: g.MUTATION,
197
+ type: E.MUTATION,
198
198
  id: "data-validation.mutation.updateRule",
199
199
  handler(t, e) {
200
200
  if (!e)
@@ -203,13 +203,13 @@ const S = {
203
203
  return t.get(h).updateRule(r, a, o, n, i), !0;
204
204
  }
205
205
  };
206
- var ce = Object.getOwnPropertyDescriptor, me = (t, e, r, a) => {
207
- for (var o = a > 1 ? void 0 : a ? ce(e, r) : e, n = t.length - 1, i; n >= 0; n--)
206
+ var me = Object.getOwnPropertyDescriptor, he = (t, e, r, a) => {
207
+ for (var o = a > 1 ? void 0 : a ? me(e, r) : e, n = t.length - 1, i; n >= 0; n--)
208
208
  (i = t[n]) && (o = i(o) || o);
209
209
  return o;
210
210
  }, L = (t, e) => (r, a) => e(r, a, t);
211
- const he = "SHEET_DATA_VALIDATION_PLUGIN";
212
- let I = class extends $ {
211
+ const pe = "SHEET_DATA_VALIDATION_PLUGIN";
212
+ let I = class extends q {
213
213
  constructor(t, e, r) {
214
214
  super(), this._resourceManagerService = t, this._univerInstanceService = e, this._dataValidationModel = r, this._initSnapshot();
215
215
  }
@@ -230,8 +230,8 @@ let I = class extends $ {
230
230
  };
231
231
  this.disposeWithMe(
232
232
  this._resourceManagerService.registerPluginResource({
233
- pluginName: he,
234
- businesses: [q.UNIVER_SHEET],
233
+ pluginName: pe,
234
+ businesses: [H.UNIVER_SHEET],
235
235
  toJson: (r) => t(r),
236
236
  parseJson: (r) => e(r),
237
237
  onUnLoad: (r) => {
@@ -248,17 +248,21 @@ let I = class extends $ {
248
248
  );
249
249
  }
250
250
  };
251
- I = me([
252
- L(0, X),
253
- L(1, Z),
251
+ I = he([
252
+ L(0, Z),
253
+ L(1, ee),
254
254
  L(2, V(h))
255
255
  ], I);
256
- var pe = /* @__PURE__ */ ((t) => (t.SHEET = "sheet", t))(pe || {});
257
- class F {
256
+ const ge = "@univerjs/data-validation", Ee = "0.17.0", U = {
257
+ name: ge,
258
+ version: Ee
259
+ };
260
+ var _e = /* @__PURE__ */ ((t) => (t.SHEET = "sheet", t))(_e || {});
261
+ class W {
258
262
  constructor() {
259
263
  c(this, "_validatorByScopes", /* @__PURE__ */ new Map());
260
264
  c(this, "_validatorMap", /* @__PURE__ */ new Map());
261
- c(this, "_validatorsChange$", new se(void 0));
265
+ c(this, "_validatorsChange$", new de(void 0));
262
266
  c(this, "validatorsChange$", this._validatorsChange$.asObservable());
263
267
  }
264
268
  _addValidatorToScope(e, r) {
@@ -278,7 +282,7 @@ class F {
278
282
  register(e) {
279
283
  return this._validatorMap.set(e.id, e), Array.isArray(e.scopes) ? e.scopes.forEach((r) => {
280
284
  this._addValidatorToScope(e, r);
281
- }) : this._addValidatorToScope(e, e.scopes), this._validatorsChange$.next(), ee(() => {
285
+ }) : this._addValidatorToScope(e, e.scopes), this._validatorsChange$.next(), te(() => {
282
286
  this._validatorMap.delete(e.id), Array.isArray(e.scopes) ? e.scopes.forEach((r) => {
283
287
  this._removeValidatorFromScope(e, r);
284
288
  }) : this._removeValidatorFromScope(e, e.scopes), this._validatorsChange$.next();
@@ -291,23 +295,23 @@ class F {
291
295
  return this._validatorByScopes.get(e);
292
296
  }
293
297
  }
294
- const Ee = {
295
- type: g.COMMAND,
298
+ const ve = {
299
+ type: E.COMMAND,
296
300
  id: "data-validation.command.addRule",
297
301
  async handler(t, e) {
298
- if (t.get(f).error("[Deprecated]: `AddDataValidationCommand` is deprecated, please use `AddSheetDataValidationCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
302
+ if (t.get(T).error("[Deprecated]: `AddDataValidationCommand` is deprecated, please use `AddSheetDataValidationCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
299
303
  return !1;
300
- const { rule: a, unitId: o, subUnitId: n } = e, i = t.get(T), l = t.get(A), d = {
304
+ const { rule: a, unitId: o, subUnitId: n } = e, i = t.get(S), l = t.get(M), d = {
301
305
  ...e,
302
306
  rule: {
303
307
  ...e.rule,
304
308
  ranges: [e.rule.range]
305
309
  }
306
310
  }, u = [{
307
- id: S.id,
311
+ id: A.id,
308
312
  params: d
309
313
  }], m = [{
310
- id: N.id,
314
+ id: f.id,
311
315
  params: {
312
316
  unitId: o,
313
317
  subUnitId: n,
@@ -318,19 +322,19 @@ const Ee = {
318
322
  unitID: o,
319
323
  redoMutations: u,
320
324
  undoMutations: m
321
- }), await i.executeCommand(S.id, d), !0;
325
+ }), await i.executeCommand(A.id, d), !0;
322
326
  }
323
- }, ge = {
324
- type: g.COMMAND,
327
+ }, Ne = {
328
+ type: E.COMMAND,
325
329
  id: "data-validation.command.removeRule",
326
330
  handler(t, e) {
327
- if (t.get(f).error("[Deprecated]: `RemoveDataValidationCommand` is deprecated, please use `RemoveSheetDataValidationCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
331
+ if (t.get(T).error("[Deprecated]: `RemoveDataValidationCommand` is deprecated, please use `RemoveSheetDataValidationCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
328
332
  return !1;
329
- const { unitId: a, subUnitId: o, ruleId: n } = e, i = t.get(T), l = t.get(A), d = t.get(h), u = [{
330
- id: N.id,
333
+ const { unitId: a, subUnitId: o, ruleId: n } = e, i = t.get(S), l = t.get(M), d = t.get(h), u = [{
334
+ id: f.id,
331
335
  params: e
332
336
  }], m = [{
333
- id: S.id,
337
+ id: A.id,
334
338
  params: {
335
339
  unitId: a,
336
340
  subUnitId: o,
@@ -344,18 +348,18 @@ const Ee = {
344
348
  undoMutations: m,
345
349
  redoMutations: u,
346
350
  unitID: e.unitId
347
- }), i.executeCommand(N.id, e), !0;
351
+ }), i.executeCommand(f.id, e), !0;
348
352
  }
349
- }, _e = {
350
- type: g.COMMAND,
353
+ }, fe = {
354
+ type: E.COMMAND,
351
355
  id: "data-validation.command.updateDataValidationSetting",
352
356
  handler(t, e) {
353
- if (t.get(f).warn("[Deprecated]: `UpdateDataValidationOptionsCommand` is deprecated, please use `UpdateSheetDataValidationOptionsCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
357
+ if (t.get(T).warn("[Deprecated]: `UpdateDataValidationOptionsCommand` is deprecated, please use `UpdateSheetDataValidationOptionsCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
354
358
  return !1;
355
- const a = t.get(T), o = t.get(A), n = t.get(h), { unitId: i, subUnitId: l, ruleId: d, options: u } = e, m = n.getRuleById(i, l, d);
359
+ const a = t.get(S), o = t.get(M), n = t.get(h), { unitId: i, subUnitId: l, ruleId: d, options: u } = e, m = n.getRuleById(i, l, d);
356
360
  if (!m)
357
361
  return !1;
358
- const E = {
362
+ const g = {
359
363
  unitId: i,
360
364
  subUnitId: l,
361
365
  ruleId: d,
@@ -365,41 +369,41 @@ const Ee = {
365
369
  }
366
370
  }, _ = [{
367
371
  id: v.id,
368
- params: E
369
- }], M = {
372
+ params: g
373
+ }], R = {
370
374
  unitId: i,
371
375
  subUnitId: l,
372
376
  ruleId: d,
373
377
  payload: {
374
378
  type: p.OPTIONS,
375
- payload: j(m)
379
+ payload: F(m)
376
380
  }
377
- }, R = [{
381
+ }, O = [{
378
382
  id: v.id,
379
- params: M
383
+ params: R
380
384
  }];
381
385
  return o.pushUndoRedo({
382
386
  unitID: i,
383
387
  redoMutations: _,
384
- undoMutations: R
385
- }), a.executeCommand(v.id, E), !0;
388
+ undoMutations: O
389
+ }), a.executeCommand(v.id, g), !0;
386
390
  }
387
- }, ve = {
388
- type: g.COMMAND,
391
+ }, Te = {
392
+ type: E.COMMAND,
389
393
  id: "data-validation.command.updateDataValidationOptions",
390
394
  handler(t, e) {
391
- if (t.get(f).error("[Deprecated]: `UpdateDataValidationSettingCommand` is deprecated, please use `UpdateSheetDataValidationSettingCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
395
+ if (t.get(T).error("[Deprecated]: `UpdateDataValidationSettingCommand` is deprecated, please use `UpdateSheetDataValidationSettingCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
392
396
  return !1;
393
- const a = t.get(T), o = t.get(A), n = t.get(h), i = t.get(F), { unitId: l, subUnitId: d, ruleId: u, setting: m } = e, E = i.getValidatorItem(m.type);
394
- if (!E)
397
+ const a = t.get(S), o = t.get(M), n = t.get(h), i = t.get(W), { unitId: l, subUnitId: d, ruleId: u, setting: m } = e, g = i.getValidatorItem(m.type);
398
+ if (!g)
395
399
  return !1;
396
400
  const _ = n.getRuleById(l, d, u);
397
401
  if (!_)
398
402
  return !1;
399
- const M = { ..._, ...m };
400
- if (!E.validatorFormula(M, l, d).success)
403
+ const R = { ..._, ...m };
404
+ if (!g.validatorFormula(R, l, d).success)
401
405
  return !1;
402
- const R = {
406
+ const O = {
403
407
  unitId: l,
404
408
  subUnitId: d,
405
409
  ruleId: u,
@@ -407,45 +411,45 @@ const Ee = {
407
411
  type: p.SETTING,
408
412
  payload: {
409
413
  ...m,
410
- ...E.normalizeFormula(M, l, d)
414
+ ...g.normalizeFormula(R, l, d)
411
415
  }
412
416
  }
413
- }, W = [{
417
+ }, k = [{
414
418
  id: v.id,
415
- params: R
416
- }], k = {
419
+ params: O
420
+ }], J = {
417
421
  unitId: l,
418
422
  subUnitId: d,
419
423
  ruleId: u,
420
424
  payload: {
421
425
  type: p.SETTING,
422
- payload: Q(_)
426
+ payload: j(_)
423
427
  }
424
- }, J = [{
428
+ }, z = [{
425
429
  id: v.id,
426
- params: k
430
+ params: J
427
431
  }];
428
432
  return o.pushUndoRedo({
429
433
  unitID: l,
430
- redoMutations: W,
431
- undoMutations: J
432
- }), a.executeCommand(v.id, R), !0;
434
+ redoMutations: k,
435
+ undoMutations: z
436
+ }), a.executeCommand(v.id, O), !0;
433
437
  }
434
- }, Ne = {
435
- type: g.COMMAND,
438
+ }, Se = {
439
+ type: E.COMMAND,
436
440
  id: "data-validation.command.removeAll",
437
441
  handler(t, e) {
438
- if (t.get(f).error("[Deprecated]: `RemoveAllDataValidationCommand` is deprecated, please use `RemoveSheetAllDataValidationCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
442
+ if (t.get(T).error("[Deprecated]: `RemoveAllDataValidationCommand` is deprecated, please use `RemoveSheetAllDataValidationCommand` in `@univerjs/sheets-data-validation` instead!"), !e)
439
443
  return !1;
440
- const { unitId: a, subUnitId: o } = e, n = t.get(T), i = t.get(h), l = t.get(A), d = [...i.getRules(a, o)], u = {
444
+ const { unitId: a, subUnitId: o } = e, n = t.get(S), i = t.get(h), l = t.get(M), d = [...i.getRules(a, o)], u = {
441
445
  unitId: a,
442
446
  subUnitId: o,
443
447
  ruleId: d.map((_) => _.uid)
444
448
  }, m = [{
445
- id: N.id,
449
+ id: f.id,
446
450
  params: u
447
- }], E = [{
448
- id: S.id,
451
+ }], g = [{
452
+ id: A.id,
449
453
  params: {
450
454
  unitId: a,
451
455
  subUnitId: o,
@@ -454,44 +458,42 @@ const Ee = {
454
458
  }];
455
459
  return l.pushUndoRedo({
456
460
  redoMutations: m,
457
- undoMutations: E,
461
+ undoMutations: g,
458
462
  unitID: a
459
- }), n.executeCommand(N.id, u), !0;
463
+ }), n.executeCommand(f.id, u), !0;
460
464
  }
461
- }, fe = "data-validation.config", U = {};
462
- var Te = Object.getOwnPropertyDescriptor, Se = (t, e, r, a) => {
463
- for (var o = a > 1 ? void 0 : a ? Te(e, r) : e, n = t.length - 1, i; n >= 0; n--)
465
+ }, Ae = "data-validation.config", C = {};
466
+ var Me = Object.getOwnPropertyDescriptor, Re = (t, e, r, a) => {
467
+ for (var o = a > 1 ? void 0 : a ? Me(e, r) : e, n = t.length - 1, i; n >= 0; n--)
464
468
  (i = t[n]) && (o = i(o) || o);
465
469
  return o;
466
- }, y = (t, e) => (r, a) => e(r, a, t);
467
- const Ae = "UNIVER_DATA_VALIDATION_PLUGIN";
468
- var O;
469
- let C = (O = class extends te {
470
- constructor(t = U, e, r, a) {
470
+ }, y = (t, e) => (r, a) => e(r, a, t), N;
471
+ let D = (N = class extends ae {
472
+ constructor(t = C, e, r, a) {
471
473
  super(), this._config = t, this._injector = e, this._commandService = r, this._configService = a;
472
- const { ...o } = ae(
474
+ const { ...o } = re(
473
475
  {},
474
- U,
476
+ C,
475
477
  this._config
476
478
  );
477
- this._configService.setConfig(fe, o);
479
+ this._configService.setConfig(Ae, o);
478
480
  }
479
481
  onStarting() {
480
482
  [
481
483
  [h],
482
- [F],
484
+ [W],
483
485
  [I]
484
486
  ].forEach((t) => this._injector.add(t)), [
485
487
  // command
486
- Ee,
487
- Ne,
488
- _e,
489
488
  ve,
490
- ge,
489
+ Se,
490
+ fe,
491
+ Te,
492
+ Ne,
491
493
  // mutation
492
- S,
494
+ A,
493
495
  v,
494
- N
496
+ f
495
497
  ].forEach((t) => {
496
498
  this._commandService.registerCommand(t);
497
499
  });
@@ -499,14 +501,14 @@ let C = (O = class extends te {
499
501
  onReady() {
500
502
  this._injector.get(I);
501
503
  }
502
- }, c(O, "pluginName", Ae), c(O, "type", q.UNIVER_SHEET), O);
503
- C = Se([
504
- y(1, V(H)),
505
- y(2, T),
506
- y(3, re)
507
- ], C);
504
+ }, c(N, "pluginName", "UNIVER_DATA_VALIDATION_PLUGIN"), c(N, "packageName", U.name), c(N, "version", U.version), c(N, "type", H.UNIVER_SHEET), N);
505
+ D = Re([
506
+ y(1, V(Q)),
507
+ y(2, S),
508
+ y(3, oe)
509
+ ], D);
508
510
  s.BETWEEN + "", s.EQUAL + "", s.GREATER_THAN + "", s.GREATER_THAN_OR_EQUAL + "", s.LESS_THAN + "", s.LESS_THAN_OR_EQUAL + "", s.NOT_BETWEEN + "", s.NOT_EQUAL + "";
509
- const D = {
511
+ const b = {
510
512
  [s.BETWEEN]: "dataValidation.ruleName.between",
511
513
  [s.EQUAL]: "dataValidation.ruleName.equal",
512
514
  [s.GREATER_THAN]: "dataValidation.ruleName.greaterThan",
@@ -516,7 +518,7 @@ const D = {
516
518
  [s.NOT_BETWEEN]: "dataValidation.ruleName.notBetween",
517
519
  [s.NOT_EQUAL]: "dataValidation.ruleName.notEqual",
518
520
  NONE: "dataValidation.ruleName.legal"
519
- }, b = {
521
+ }, w = {
520
522
  [s.BETWEEN]: "dataValidation.errorMsg.between",
521
523
  [s.EQUAL]: "dataValidation.errorMsg.equal",
522
524
  [s.GREATER_THAN]: "dataValidation.errorMsg.greaterThan",
@@ -526,7 +528,7 @@ const D = {
526
528
  [s.NOT_BETWEEN]: "dataValidation.errorMsg.notBetween",
527
529
  [s.NOT_EQUAL]: "dataValidation.errorMsg.notEqual",
528
530
  NONE: "dataValidation.errorMsg.legal"
529
- }, Ue = {
531
+ }, De = {
530
532
  [s.BETWEEN]: "dataValidation.textLength.errorMsg.between",
531
533
  [s.EQUAL]: "dataValidation.textLength.errorMsg.equal",
532
534
  [s.GREATER_THAN]: "dataValidation.textLength.errorMsg.greaterThan",
@@ -535,16 +537,16 @@ const D = {
535
537
  [s.LESS_THAN_OR_EQUAL]: "dataValidation.textLength.errorMsg.lessThanOrEqual",
536
538
  [s.NOT_BETWEEN]: "dataValidation.textLength.errorMsg.notBetween",
537
539
  [s.NOT_EQUAL]: "dataValidation.textLength.errorMsg.notEqual"
538
- }, Ce = [
540
+ }, be = [
539
541
  s.BETWEEN,
540
542
  s.NOT_BETWEEN
541
543
  ];
542
- var Me = Object.getOwnPropertyDescriptor, Re = (t, e, r, a) => {
543
- for (var o = a > 1 ? void 0 : a ? Me(e, r) : e, n = t.length - 1, i; n >= 0; n--)
544
+ var Oe = Object.getOwnPropertyDescriptor, Ve = (t, e, r, a) => {
545
+ for (var o = a > 1 ? void 0 : a ? Oe(e, r) : e, n = t.length - 1, i; n >= 0; n--)
544
546
  (i = t[n]) && (o = i(o) || o);
545
547
  return o;
546
- }, w = (t, e) => (r, a) => e(r, a, t);
547
- const B = "{FORMULA1}", x = "{FORMULA2}", P = "{TYPE}", Oe = {
548
+ }, B = (t, e) => (r, a) => e(r, a, t);
549
+ const x = "{FORMULA1}", P = "{FORMULA2}", G = "{TYPE}", Ie = {
548
550
  [s.BETWEEN]: "dataValidation.operators.between",
549
551
  [s.EQUAL]: "dataValidation.operators.equal",
550
552
  [s.GREATER_THAN]: "dataValidation.operators.greaterThan",
@@ -554,8 +556,8 @@ const B = "{FORMULA1}", x = "{FORMULA2}", P = "{TYPE}", Oe = {
554
556
  [s.NOT_BETWEEN]: "dataValidation.operators.notBetween",
555
557
  [s.NOT_EQUAL]: "dataValidation.operators.notEqual"
556
558
  };
557
- var Ve = /* @__PURE__ */ ((t) => (t.DATE = "date", t.TIME = "time", t.DATETIME = "datetime", t.LIST = "list", t.MULTIPLE_LIST = "multipleList", t.COLOR = "color", t.CASCADE = "cascade", t))(Ve || {});
558
- let G = class {
559
+ var Le = /* @__PURE__ */ ((t) => (t.DATE = "date", t.TIME = "time", t.DATETIME = "datetime", t.LIST = "list", t.MULTIPLE_LIST = "multipleList", t.COLOR = "color", t.CASCADE = "cascade", t))(Le || {});
560
+ let $ = class {
559
561
  // #endregion
560
562
  constructor(t, e) {
561
563
  c(this, "offsetFormulaByRange", !0);
@@ -568,7 +570,7 @@ let G = class {
568
570
  this.localeService = t, this.injector = e;
569
571
  }
570
572
  get operatorNames() {
571
- return this.operators.map((t) => this.localeService.t(Oe[t]));
573
+ return this.operators.map((t) => this.localeService.t(Ie[t]));
572
574
  }
573
575
  get titleStr() {
574
576
  return this.localeService.t(this.title);
@@ -576,13 +578,13 @@ let G = class {
576
578
  generateRuleName(t) {
577
579
  var r, a;
578
580
  if (!t.operator)
579
- return this.localeService.t(D.NONE).replace(P, this.titleStr);
580
- const e = this.localeService.t(D[t.operator]).replace(B, (r = t.formula1) != null ? r : "").replace(x, (a = t.formula2) != null ? a : "");
581
+ return this.localeService.t(b.NONE).replace(G, this.titleStr);
582
+ const e = this.localeService.t(b[t.operator]).replace(x, (r = t.formula1) != null ? r : "").replace(P, (a = t.formula2) != null ? a : "");
581
583
  return `${this.titleStr} ${e}`;
582
584
  }
583
585
  generateRuleErrorMessage(t, e) {
584
586
  var a, o;
585
- return t.operator ? `${this.localeService.t(b[t.operator]).replace(B, (a = t.formula1) != null ? a : "").replace(x, (o = t.formula2) != null ? o : "")}` : this.localeService.t(b.NONE).replace(P, this.titleStr);
587
+ return t.operator ? `${this.localeService.t(w[t.operator]).replace(x, (a = t.formula1) != null ? a : "").replace(P, (o = t.formula2) != null ? o : "")}` : this.localeService.t(w.NONE).replace(G, this.titleStr);
586
588
  }
587
589
  getExtraStyle(t, e, r, a, o) {
588
590
  }
@@ -674,27 +676,27 @@ let G = class {
674
676
  }
675
677
  }
676
678
  };
677
- G = Re([
678
- w(0, V(oe)),
679
- w(1, V(H))
680
- ], G);
679
+ $ = Ve([
680
+ B(0, V(ne)),
681
+ B(1, V(Q))
682
+ ], $);
681
683
  export {
682
- S as AddDataValidationMutation,
683
- G as BaseDataValidator,
684
+ A as AddDataValidationMutation,
685
+ $ as BaseDataValidator,
684
686
  h as DataValidationModel,
685
687
  I as DataValidationResourceController,
686
- Ve as DataValidatorDropdownType,
687
- pe as DataValidatorRegistryScope,
688
- F as DataValidatorRegistryService,
689
- B as FORMULA1,
690
- x as FORMULA2,
691
- N as RemoveDataValidationMutation,
692
- Ce as TWO_FORMULA_OPERATOR_COUNT,
693
- P as TYPE,
694
- Ue as TextLengthErrorTitleMap,
695
- C as UniverDataValidationPlugin,
688
+ Le as DataValidatorDropdownType,
689
+ _e as DataValidatorRegistryScope,
690
+ W as DataValidatorRegistryService,
691
+ x as FORMULA1,
692
+ P as FORMULA2,
693
+ f as RemoveDataValidationMutation,
694
+ be as TWO_FORMULA_OPERATOR_COUNT,
695
+ G as TYPE,
696
+ De as TextLengthErrorTitleMap,
697
+ D as UniverDataValidationPlugin,
696
698
  v as UpdateDataValidationMutation,
697
699
  p as UpdateRuleType,
698
- j as getRuleOptions,
699
- Q as getRuleSetting
700
+ F as getRuleOptions,
701
+ j as getRuleSetting
700
702
  };