@univerjs/data-validation 0.1.6 → 0.1.7

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,237 +1,304 @@
1
- var P = Object.defineProperty;
2
- var q = (e, a, t) => a in e ? P(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
3
- var c = (e, a, t) => (q(e, typeof a != "symbol" ? a + "" : a, t), t);
4
- import { toDisposable as G, Disposable as U, ILogService as H, CommandType as m, Tools as L, DataValidationType as Q, DataValidationOperator as s, ICommandService as T, IUndoRedoService as M, Plugin as W, LocaleService as j, DataValidationStatus as F } from "@univerjs/core";
5
- import { Inject as I, Injector as B } from "@wendellhu/redi";
6
- import { BehaviorSubject as J, Subject as S, debounceTime as A } from "rxjs";
7
- import { SelectionManagerService as z } from "@univerjs/sheets";
8
- var K = /* @__PURE__ */ ((e) => (e.SHEET = "sheet", e))(K || {});
9
- class b {
1
+ var z = Object.defineProperty;
2
+ var K = (a, e, t) => e in a ? z(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var c = (a, e, t) => (K(a, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { toDisposable as D, Disposable as A, DataValidationStatus as X, ILogService as Y, CommandType as _, Tools as q, DataValidationType as Z, DataValidationOperator as s, ICommandService as M, IUndoRedoService as S, OnLifecycle as G, LifecycleStages as H, IResourceManagerService as k, IUniverInstanceService as Q, Plugin as ee, LocaleService as te } from "@univerjs/core";
5
+ import { Inject as E, Injector as W } from "@wendellhu/redi";
6
+ import { BehaviorSubject as ae, Subject as L, debounceTime as w } from "rxjs";
7
+ import { SelectionManagerService as re, RemoveSheetCommand as ne, SheetInterceptorService as oe } from "@univerjs/sheets";
8
+ var ie = /* @__PURE__ */ ((a) => (a.SHEET = "sheet", a))(ie || {});
9
+ class j {
10
10
  constructor() {
11
11
  c(this, "_validatorByScopes", /* @__PURE__ */ new Map());
12
12
  c(this, "_validatorMap", /* @__PURE__ */ new Map());
13
- c(this, "_validatorsChange$", new J(void 0));
13
+ c(this, "_validatorsChange$", new ae(void 0));
14
14
  c(this, "validatorsChange$", this._validatorsChange$.asObservable());
15
15
  }
16
- _addValidatorToScope(a, t) {
16
+ _addValidatorToScope(e, t) {
17
17
  this._validatorByScopes.has(t) || this._validatorByScopes.set(t, []);
18
18
  const r = this._validatorByScopes.get(t);
19
- if (r.findIndex((o) => o.id === a.id) > -1)
20
- throw new Error(`Validator item with the same id ${a.id} has already been added!`);
21
- r.push(a);
19
+ if (r.findIndex((n) => n.id === e.id) > -1)
20
+ throw new Error(`Validator item with the same id ${e.id} has already been added!`);
21
+ r.push(e);
22
22
  }
23
- _removeValidatorFromScope(a, t) {
23
+ _removeValidatorFromScope(e, t) {
24
24
  const r = this._validatorByScopes.get(t);
25
25
  if (!r)
26
26
  return;
27
- const o = r.findIndex((n) => n.id === a.id);
28
- o > -1 && r.splice(o, 1);
29
- }
30
- register(a) {
31
- return this._validatorMap.set(a.id, a), Array.isArray(a.scopes) ? a.scopes.forEach((t) => {
32
- this._addValidatorToScope(a, t);
33
- }) : this._addValidatorToScope(a, a.scopes), this._validatorsChange$.next(), G(() => {
34
- this._validatorMap.delete(a.id), Array.isArray(a.scopes) ? a.scopes.forEach((t) => {
35
- this._removeValidatorFromScope(a, t);
36
- }) : this._removeValidatorFromScope(a, a.scopes), this._validatorsChange$.next();
27
+ const n = r.findIndex((o) => o.id === e.id);
28
+ n > -1 && r.splice(n, 1);
29
+ }
30
+ register(e) {
31
+ return this._validatorMap.set(e.id, e), Array.isArray(e.scopes) ? e.scopes.forEach((t) => {
32
+ this._addValidatorToScope(e, t);
33
+ }) : this._addValidatorToScope(e, e.scopes), this._validatorsChange$.next(), D(() => {
34
+ this._validatorMap.delete(e.id), Array.isArray(e.scopes) ? e.scopes.forEach((t) => {
35
+ this._removeValidatorFromScope(e, t);
36
+ }) : this._removeValidatorFromScope(e, e.scopes), this._validatorsChange$.next();
37
37
  });
38
38
  }
39
- getValidatorItem(a) {
40
- return this._validatorMap.get(a);
39
+ getValidatorItem(e) {
40
+ return this._validatorMap.get(e);
41
41
  }
42
- getValidatorsByScope(a) {
43
- return this._validatorByScopes.get(a);
42
+ getValidatorsByScope(e) {
43
+ return this._validatorByScopes.get(e);
44
44
  }
45
45
  }
46
- var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, Z = (e, a, t, r) => {
47
- for (var o = r > 1 ? void 0 : r ? Y(a, t) : a, n = e.length - 1, i; n >= 0; n--)
48
- (i = e[n]) && (o = (r ? i(a, t, o) : i(o)) || o);
49
- return r && o && X(a, t, o), o;
50
- }, k = (e, a) => (t, r) => a(t, r, e);
51
- let h = class extends U {
52
- constructor(a) {
46
+ var g = /* @__PURE__ */ ((a) => (a[a.SETTING = 0] = "SETTING", a[a.RANGE = 1] = "RANGE", a[a.OPTIONS = 2] = "OPTIONS", a))(g || {});
47
+ class se extends A {
48
+ constructor(t, r, n) {
49
+ super();
50
+ c(this, "_dataValidations");
51
+ c(this, "_dataValidationMap", /* @__PURE__ */ new Map());
52
+ c(this, "_dataValidations$", new L());
53
+ c(this, "unitId");
54
+ c(this, "subUnitId");
55
+ c(this, "dataValidations$", this._dataValidations$.asObservable());
56
+ this.unitId = t, this.subUnitId = r, n && (this._insertRules(n), this._notice(), this.disposeWithMe({
57
+ dispose: () => {
58
+ this._dataValidations$.complete();
59
+ }
60
+ }));
61
+ }
62
+ _notice() {
63
+ this._dataValidations$.next(this._dataValidations);
64
+ }
65
+ _insertRules(t) {
66
+ this._dataValidations = t, t.forEach((r) => {
67
+ this._dataValidationMap.set(r.uid, r);
68
+ });
69
+ }
70
+ getRuleById(t) {
71
+ return this._dataValidationMap.get(t);
72
+ }
73
+ getRuleIndex(t) {
74
+ return this._dataValidations.findIndex((r) => r.uid === t);
75
+ }
76
+ addRule(t, r) {
77
+ typeof r == "number" && r < this._dataValidations.length ? this._dataValidations.splice(r, 0, t) : this._dataValidations.push(t), this._dataValidationMap.set(t.uid, t), this._notice();
78
+ }
79
+ removeRule(t) {
80
+ const r = this._dataValidations.findIndex((n) => n.uid === t);
81
+ this._dataValidations.splice(r, 1), this._dataValidationMap.delete(t), this._notice();
82
+ }
83
+ updateRule(t, r) {
84
+ const n = this._dataValidationMap.get(t), o = this._dataValidations.findIndex((d) => t === d.uid);
85
+ if (!n)
86
+ throw new Error(`Data validation rule is not found, ruleId: ${t}.`);
87
+ const i = { ...n };
88
+ switch (r.type) {
89
+ case g.RANGE: {
90
+ i.ranges = r.payload;
91
+ break;
92
+ }
93
+ case g.SETTING: {
94
+ Object.assign(i, r.payload);
95
+ break;
96
+ }
97
+ case g.OPTIONS: {
98
+ Object.assign(i, r.payload);
99
+ break;
100
+ }
101
+ }
102
+ return this._dataValidations[o] = i, this._dataValidationMap.set(t, i), this._notice(), i;
103
+ }
104
+ getDataValidations() {
105
+ return this._dataValidations;
106
+ }
107
+ toJSON() {
108
+ return this._dataValidations;
109
+ }
110
+ validator(t, r, n, o) {
111
+ return X.VALID;
112
+ }
113
+ }
114
+ var de = Object.defineProperty, le = Object.getOwnPropertyDescriptor, ue = (a, e, t, r) => {
115
+ for (var n = r > 1 ? void 0 : r ? le(e, t) : e, o = a.length - 1, i; o >= 0; o--)
116
+ (i = a[o]) && (n = (r ? i(e, t, n) : i(n)) || n);
117
+ return r && n && de(e, t, n), n;
118
+ }, ce = (a, e) => (t, r) => e(t, r, a);
119
+ let h = class extends A {
120
+ constructor(e) {
53
121
  super();
54
122
  c(this, "_model", /* @__PURE__ */ new Map());
55
- c(this, "_managerCreator");
56
- c(this, "_ruleChange$", new S());
57
- c(this, "_validStatusChange$", new S());
123
+ c(this, "_managerCreator", (e, t) => new se(e, t, []));
124
+ c(this, "_ruleChange$", new L());
125
+ c(this, "_validStatusChange$", new L());
58
126
  c(this, "ruleChange$", this._ruleChange$.asObservable());
59
- c(this, "ruleChangeDebounce$", this.ruleChange$.pipe(A(20)));
60
- c(this, "validStatusChange$", this._validStatusChange$.asObservable().pipe(A(20)));
61
- this._logService = a, this.disposeWithMe({
127
+ c(this, "ruleChangeDebounce$", this.ruleChange$.pipe(w(20)));
128
+ c(this, "validStatusChange$", this._validStatusChange$.asObservable().pipe(w(20)));
129
+ this._logService = e, this.disposeWithMe({
62
130
  dispose: () => {
63
131
  this._ruleChange$.complete(), this._validStatusChange$.complete();
64
132
  }
65
133
  });
66
134
  }
67
- setManagerCreator(a) {
68
- this._managerCreator = a;
135
+ setManagerCreator(e) {
136
+ this._managerCreator = e;
69
137
  }
70
- ensureManager(a, t) {
71
- this._model.has(a) || this._model.set(a, /* @__PURE__ */ new Map());
72
- const r = this._model.get(a);
138
+ ensureManager(e, t) {
139
+ this._model.has(e) || this._model.set(e, /* @__PURE__ */ new Map());
140
+ const r = this._model.get(e);
73
141
  if (r.has(t))
74
142
  return r.get(t);
75
- const o = this._managerCreator(a, t);
76
- return r.set(t, o), o;
143
+ const n = this._managerCreator(e, t);
144
+ return r.set(t, n), n;
77
145
  }
78
- addRule(a, t, r, o) {
146
+ addRule(e, t, r, n) {
79
147
  try {
80
- this.ensureManager(a, t).addRule(r, o), this._ruleChange$.next({
148
+ this.ensureManager(e, t).addRule(r, n), this._ruleChange$.next({
81
149
  rule: r,
82
150
  type: "add",
83
- unitId: a,
151
+ unitId: e,
84
152
  subUnitId: t
85
153
  });
86
- } catch (n) {
87
- this._logService.error(n);
154
+ } catch (o) {
155
+ this._logService.error(o);
88
156
  }
89
157
  }
90
- updateRule(a, t, r, o) {
158
+ updateRule(e, t, r, n) {
91
159
  try {
92
- const i = this.ensureManager(a, t).updateRule(r, o);
160
+ const i = this.ensureManager(e, t).updateRule(r, n);
93
161
  this._ruleChange$.next({
94
162
  rule: i,
95
163
  type: "update",
96
- unitId: a,
164
+ unitId: e,
97
165
  subUnitId: t
98
166
  });
99
- } catch (n) {
100
- this._logService.error(n);
167
+ } catch (o) {
168
+ this._logService.error(o);
101
169
  }
102
170
  }
103
- removeRule(a, t, r) {
171
+ removeRule(e, t, r) {
104
172
  try {
105
- const o = this.ensureManager(a, t), n = o.getRuleById(r);
106
- o.removeRule(r), this._ruleChange$.next({
107
- rule: n,
173
+ const n = this.ensureManager(e, t), o = n.getRuleById(r);
174
+ n.removeRule(r), this._ruleChange$.next({
175
+ rule: o,
108
176
  type: "remove",
109
- unitId: a,
177
+ unitId: e,
110
178
  subUnitId: t
111
179
  });
112
- } catch (o) {
113
- this._logService.error(o);
180
+ } catch (n) {
181
+ this._logService.error(n);
114
182
  }
115
183
  }
116
- getRuleById(a, t, r) {
117
- return this.ensureManager(a, t).getRuleById(r);
184
+ getRuleById(e, t, r) {
185
+ return this.ensureManager(e, t).getRuleById(r);
118
186
  }
119
- getRuleIndex(a, t, r) {
120
- return this.ensureManager(a, t).getRuleIndex(r);
187
+ getRuleIndex(e, t, r) {
188
+ return this.ensureManager(e, t).getRuleIndex(r);
121
189
  }
122
- getRules(a, t) {
123
- return this.ensureManager(a, t).getDataValidations();
190
+ getRules(e, t) {
191
+ return this.ensureManager(e, t).getDataValidations();
124
192
  }
125
- validator(a, t, r) {
126
- const { unitId: o, subUnitId: n } = r;
127
- return this.ensureManager(o, n).validator(a, t, r, (d) => {
193
+ validator(e, t, r) {
194
+ const { unitId: n, subUnitId: o } = r;
195
+ return this.ensureManager(n, o).validator(e, t, r, (d) => {
128
196
  this._validStatusChange$.next({
129
- unitId: o,
130
- subUnitId: n,
197
+ unitId: n,
198
+ subUnitId: o,
131
199
  ruleId: t.uid,
132
200
  status: d
133
201
  });
134
202
  });
135
203
  }
136
- getUnitRules(a) {
137
- const t = this._model.get(a);
204
+ getUnitRules(e) {
205
+ const t = this._model.get(e);
138
206
  if (!t)
139
207
  return [];
140
208
  const r = [];
141
- return t.forEach((o) => {
142
- r.push([o.subUnitId, o.getDataValidations()]);
209
+ return t.forEach((n) => {
210
+ r.push([n.subUnitId, n.getDataValidations()]);
143
211
  }), r;
144
212
  }
145
213
  };
146
- h = Z([
147
- k(0, H)
214
+ h = ue([
215
+ ce(0, Y)
148
216
  ], h);
149
- const E = {
150
- type: m.MUTATION,
217
+ const m = {
218
+ type: _.MUTATION,
151
219
  id: "data-validation.mutation.addRule",
152
- handler(e, a) {
153
- if (!a)
220
+ handler(a, e) {
221
+ if (!e)
154
222
  return !1;
155
- const { unitId: t, subUnitId: r, rule: o, index: n } = a, i = e.get(h);
156
- return Array.isArray(o) ? o.forEach((d) => {
157
- i.addRule(t, r, d, n);
158
- }) : i.addRule(t, r, o, n), !0;
223
+ const { unitId: t, subUnitId: r, rule: n, index: o } = e, i = a.get(h);
224
+ return Array.isArray(n) ? n.forEach((d) => {
225
+ i.addRule(t, r, d, o);
226
+ }) : i.addRule(t, r, n, o), !0;
159
227
  }
160
- }, v = {
161
- type: m.MUTATION,
228
+ }, f = {
229
+ type: _.MUTATION,
162
230
  id: "data-validation.mutation.removeRule",
163
- handler(e, a) {
164
- if (!a)
231
+ handler(a, e) {
232
+ if (!e)
165
233
  return !1;
166
- const { unitId: t, subUnitId: r, ruleId: o } = a, n = e.get(h);
167
- return Array.isArray(o) ? o.forEach((i) => {
168
- n.removeRule(t, r, i);
169
- }) : n.removeRule(t, r, o), !0;
234
+ const { unitId: t, subUnitId: r, ruleId: n } = e, o = a.get(h);
235
+ return Array.isArray(n) ? n.forEach((i) => {
236
+ o.removeRule(t, r, i);
237
+ }) : o.removeRule(t, r, n), !0;
170
238
  }
171
- }, g = {
172
- type: m.MUTATION,
239
+ }, v = {
240
+ type: _.MUTATION,
173
241
  id: "data-validation.mutation.updateRule",
174
- handler(e, a) {
175
- if (!a)
242
+ handler(a, e) {
243
+ if (!e)
176
244
  return !1;
177
- const { unitId: t, subUnitId: r, ruleId: o, payload: n } = a;
178
- return e.get(h).updateRule(t, r, o, n), !0;
245
+ const { unitId: t, subUnitId: r, ruleId: n, payload: o } = e;
246
+ return a.get(h).updateRule(t, r, n, o), !0;
179
247
  }
180
248
  };
181
- function aa(e) {
249
+ function he(a) {
182
250
  return {
183
- type: e.type,
184
- operator: e.operator,
185
- formula1: e.formula1,
186
- formula2: e.formula2,
187
- allowBlank: e.allowBlank
251
+ type: a.type,
252
+ operator: a.operator,
253
+ formula1: a.formula1,
254
+ formula2: a.formula2,
255
+ allowBlank: a.allowBlank
188
256
  };
189
257
  }
190
- function ta(e) {
258
+ function pe(a) {
191
259
  return {
192
- error: e.error,
193
- errorStyle: e.errorStyle,
194
- errorTitle: e.errorTitle,
195
- imeMode: e.imeMode,
196
- prompt: e.prompt,
197
- promptTitle: e.promptTitle,
198
- showDropDown: e.showDropDown,
199
- showErrorMessage: e.showErrorMessage,
200
- showInputMessage: e.showInputMessage,
201
- renderMode: e.renderMode
260
+ error: a.error,
261
+ errorStyle: a.errorStyle,
262
+ errorTitle: a.errorTitle,
263
+ imeMode: a.imeMode,
264
+ prompt: a.prompt,
265
+ promptTitle: a.promptTitle,
266
+ showDropDown: a.showDropDown,
267
+ showErrorMessage: a.showErrorMessage,
268
+ showInputMessage: a.showInputMessage,
269
+ renderMode: a.renderMode
202
270
  };
203
271
  }
204
- function Ra(e) {
205
- const t = e.get(z).getSelectionRanges();
272
+ function Ge(a) {
273
+ const t = a.get(re).getSelectionRanges();
206
274
  return {
207
- uid: L.generateRandomId(6),
208
- type: Q.DECIMAL,
275
+ uid: q.generateRandomId(6),
276
+ type: Z.DECIMAL,
209
277
  operator: s.EQUAL,
210
278
  formula1: "100",
211
279
  ranges: t != null ? t : [{ startColumn: 0, endColumn: 0, startRow: 0, endRow: 0 }]
212
280
  };
213
281
  }
214
- var p = /* @__PURE__ */ ((e) => (e[e.SETTING = 0] = "SETTING", e[e.RANGE = 1] = "RANGE", e[e.OPTIONS = 2] = "OPTIONS", e))(p || {});
215
- const ea = {
216
- type: m.COMMAND,
282
+ const _e = {
283
+ type: _.COMMAND,
217
284
  id: "data-validation.command.addRule",
218
- async handler(e, a) {
219
- if (!a)
285
+ async handler(a, e) {
286
+ if (!e)
220
287
  return !1;
221
- const { rule: t, unitId: r, subUnitId: o } = a, n = e.get(T), i = e.get(M), d = {
222
- ...a,
288
+ const { rule: t, unitId: r, subUnitId: n } = e, o = a.get(M), i = a.get(S), d = {
289
+ ...e,
223
290
  rule: {
224
- ...a.rule,
225
- ranges: [a.rule.range]
291
+ ...e.rule,
292
+ ranges: [e.rule.range]
226
293
  }
227
294
  }, l = [{
228
- id: E.id,
295
+ id: m.id,
229
296
  params: d
230
297
  }], u = [{
231
- id: v.id,
298
+ id: f.id,
232
299
  params: {
233
300
  unitId: r,
234
- subUnitId: o,
301
+ subUnitId: n,
235
302
  ruleId: t.uid
236
303
  }
237
304
  }];
@@ -239,152 +306,152 @@ const ea = {
239
306
  unitID: r,
240
307
  redoMutations: l,
241
308
  undoMutations: u
242
- }), await n.executeCommand(E.id, d), !0;
309
+ }), await o.executeCommand(m.id, d), !0;
243
310
  }
244
- }, Va = (e, a) => {
245
- const t = e.get(h), { unitId: r, subUnitId: o, ruleId: n } = a;
246
- if (Array.isArray(n)) {
247
- const d = n.map((l) => t.getRuleById(r, o, l)).filter(Boolean);
311
+ }, He = (a, e) => {
312
+ const t = a.get(h), { unitId: r, subUnitId: n, ruleId: o } = e;
313
+ if (Array.isArray(o)) {
314
+ const d = o.map((l) => t.getRuleById(r, n, l)).filter(Boolean);
248
315
  return [{
249
- id: E.id,
316
+ id: m.id,
250
317
  params: {
251
318
  unitId: r,
252
- subUnitId: o,
319
+ subUnitId: n,
253
320
  rule: d
254
321
  }
255
322
  }];
256
323
  }
257
324
  return [{
258
- id: E.id,
325
+ id: m.id,
259
326
  params: {
260
327
  unitId: r,
261
- subUnitId: o,
328
+ subUnitId: n,
262
329
  rule: {
263
- ...t.getRuleById(r, o, n)
330
+ ...t.getRuleById(r, n, o)
264
331
  },
265
- index: t.getRuleIndex(r, o, n)
332
+ index: t.getRuleIndex(r, n, o)
266
333
  }
267
334
  }];
268
- }, ra = {
269
- type: m.COMMAND,
335
+ }, ge = {
336
+ type: _.COMMAND,
270
337
  id: "data-validation.command.removeRule",
271
- handler(e, a) {
272
- if (!a)
338
+ handler(a, e) {
339
+ if (!e)
273
340
  return !1;
274
- const { unitId: t, subUnitId: r, ruleId: o } = a, n = e.get(T), i = e.get(M), d = e.get(h), l = [{
275
- id: v.id,
276
- params: a
341
+ const { unitId: t, subUnitId: r, ruleId: n } = e, o = a.get(M), i = a.get(S), d = a.get(h), l = [{
342
+ id: f.id,
343
+ params: e
277
344
  }], u = [{
278
- id: E.id,
345
+ id: m.id,
279
346
  params: {
280
347
  unitId: t,
281
348
  subUnitId: r,
282
349
  rule: {
283
- ...d.getRuleById(t, r, o)
350
+ ...d.getRuleById(t, r, n)
284
351
  },
285
- index: d.getRuleIndex(t, r, o)
352
+ index: d.getRuleIndex(t, r, n)
286
353
  }
287
354
  }];
288
355
  return i.pushUndoRedo({
289
356
  undoMutations: u,
290
357
  redoMutations: l,
291
- unitID: a.unitId
292
- }), n.executeCommand(v.id, a), !0;
358
+ unitID: e.unitId
359
+ }), o.executeCommand(f.id, e), !0;
293
360
  }
294
- }, oa = {
295
- type: m.COMMAND,
361
+ }, me = {
362
+ type: _.COMMAND,
296
363
  id: "data-validation.command.updateDataValidationSetting",
297
- handler(e, a) {
298
- if (!a)
364
+ handler(a, e) {
365
+ if (!e)
299
366
  return !1;
300
- const t = e.get(T), r = e.get(M), o = e.get(h), { unitId: n, subUnitId: i, ruleId: d, options: l } = a, u = o.getRuleById(n, i, d);
367
+ const t = a.get(M), r = a.get(S), n = a.get(h), { unitId: o, subUnitId: i, ruleId: d, options: l } = e, u = n.getRuleById(o, i, d);
301
368
  if (!u)
302
369
  return !1;
303
- const _ = {
304
- unitId: n,
370
+ const p = {
371
+ unitId: o,
305
372
  subUnitId: i,
306
373
  ruleId: d,
307
374
  payload: {
308
- type: p.OPTIONS,
375
+ type: g.OPTIONS,
309
376
  payload: l
310
377
  }
311
- }, f = [{
312
- id: g.id,
313
- params: _
314
- }], R = {
315
- unitId: n,
378
+ }, T = [{
379
+ id: v.id,
380
+ params: p
381
+ }], I = {
382
+ unitId: o,
316
383
  subUnitId: i,
317
384
  ruleId: d,
318
385
  payload: {
319
- type: p.OPTIONS,
320
- payload: ta(u)
386
+ type: g.OPTIONS,
387
+ payload: pe(u)
321
388
  }
322
- }, V = [{
323
- id: g.id,
324
- params: R
389
+ }, O = [{
390
+ id: v.id,
391
+ params: I
325
392
  }];
326
393
  return r.pushUndoRedo({
327
- unitID: n,
328
- redoMutations: f,
329
- undoMutations: V
330
- }), t.executeCommand(g.id, _), !0;
394
+ unitID: o,
395
+ redoMutations: T,
396
+ undoMutations: O
397
+ }), t.executeCommand(v.id, p), !0;
331
398
  }
332
- }, na = {
333
- type: m.COMMAND,
399
+ }, Ee = {
400
+ type: _.COMMAND,
334
401
  id: "data-validation.command.updateDataValidationOptions",
335
- handler(e, a) {
336
- if (!a)
402
+ handler(a, e) {
403
+ if (!e)
337
404
  return !1;
338
- const t = e.get(T), r = e.get(M), o = e.get(h), n = e.get(b), { unitId: i, subUnitId: d, ruleId: l, setting: u } = a, _ = n.getValidatorItem(u.type);
339
- if (!_ || !_.validatorFormula(u).success)
405
+ const t = a.get(M), r = a.get(S), n = a.get(h), o = a.get(j), { unitId: i, subUnitId: d, ruleId: l, setting: u } = e, p = o.getValidatorItem(u.type);
406
+ if (!p || !p.validatorFormula(u).success)
340
407
  return !1;
341
- const f = o.getRuleById(i, d, l);
342
- if (!f)
408
+ const T = n.getRuleById(i, d, l);
409
+ if (!T)
343
410
  return !1;
344
- const R = {
411
+ const I = {
345
412
  unitId: i,
346
413
  subUnitId: d,
347
414
  ruleId: l,
348
415
  payload: {
349
- type: p.SETTING,
416
+ type: g.SETTING,
350
417
  payload: u
351
418
  }
352
- }, V = [{
353
- id: g.id,
354
- params: R
355
- }], $ = {
419
+ }, O = [{
420
+ id: v.id,
421
+ params: I
422
+ }], F = {
356
423
  unitId: i,
357
424
  subUnitId: d,
358
425
  ruleId: l,
359
426
  payload: {
360
- type: p.SETTING,
361
- payload: aa(f)
427
+ type: g.SETTING,
428
+ payload: he(T)
362
429
  }
363
- }, x = [{
364
- id: g.id,
365
- params: $
430
+ }, J = [{
431
+ id: v.id,
432
+ params: F
366
433
  }];
367
434
  return r.pushUndoRedo({
368
435
  unitID: i,
369
- redoMutations: V,
370
- undoMutations: x
371
- }), t.executeCommand(g.id, R), !0;
436
+ redoMutations: O,
437
+ undoMutations: J
438
+ }), t.executeCommand(v.id, I), !0;
372
439
  }
373
- }, ia = {
374
- type: m.COMMAND,
440
+ }, ve = {
441
+ type: _.COMMAND,
375
442
  id: "data-validation.command.removeAll",
376
- handler(e, a) {
377
- if (!a)
443
+ handler(a, e) {
444
+ if (!e)
378
445
  return !1;
379
- const { unitId: t, subUnitId: r } = a, o = e.get(T), n = e.get(h), i = e.get(M), d = [...n.getRules(t, r)], l = {
446
+ const { unitId: t, subUnitId: r } = e, n = a.get(M), o = a.get(h), i = a.get(S), d = [...o.getRules(t, r)], l = {
380
447
  unitId: t,
381
448
  subUnitId: r,
382
- ruleId: d.map((f) => f.uid)
449
+ ruleId: d.map((T) => T.uid)
383
450
  }, u = [{
384
- id: v.id,
451
+ id: f.id,
385
452
  params: l
386
- }], _ = [{
387
- id: E.id,
453
+ }], p = [{
454
+ id: m.id,
388
455
  params: {
389
456
  unitId: t,
390
457
  subUnitId: r,
@@ -393,53 +460,173 @@ const ea = {
393
460
  }];
394
461
  return i.pushUndoRedo({
395
462
  redoMutations: u,
396
- undoMutations: _,
463
+ undoMutations: p,
397
464
  unitID: t
398
- }), o.executeCommand(v.id, l), !0;
465
+ }), n.executeCommand(f.id, l), !0;
399
466
  }
400
467
  };
401
- var sa = Object.defineProperty, da = Object.getOwnPropertyDescriptor, la = (e, a, t, r) => {
402
- for (var o = r > 1 ? void 0 : r ? da(a, t) : a, n = e.length - 1, i; n >= 0; n--)
403
- (i = e[n]) && (o = (r ? i(a, t, o) : i(o)) || o);
404
- return r && o && sa(a, t, o), o;
405
- }, N = (e, a) => (t, r) => a(t, r, e);
406
- const ua = "data-validation";
407
- let O = class extends W {
408
- constructor(e, a) {
409
- super(ua), this._injector = e, this._commandService = a;
410
- }
411
- onStarting(e) {
468
+ var fe = Object.defineProperty, Te = Object.getOwnPropertyDescriptor, Me = (a, e, t, r) => {
469
+ for (var n = r > 1 ? void 0 : r ? Te(e, t) : e, o = a.length - 1, i; o >= 0; o--)
470
+ (i = a[o]) && (n = (r ? i(e, t, n) : i(n)) || n);
471
+ return r && n && fe(e, t, n), n;
472
+ }, N = (a, e) => (t, r) => e(t, r, a);
473
+ const U = "SHEET_DATA_VALIDATION";
474
+ let V = class extends A {
475
+ constructor(a, e, t) {
476
+ super(), this._resourceManagerService = a, this._univerInstanceService = e, this._dataValidationModel = t, this._initSnapshot();
477
+ }
478
+ _initSnapshot() {
479
+ const a = (n) => {
480
+ const o = this._dataValidationModel.getUnitRules(n), i = {};
481
+ return o ? (o.forEach(([d, l]) => {
482
+ i[d] = l;
483
+ }), JSON.stringify(i)) : "";
484
+ }, e = (n) => {
485
+ if (!n)
486
+ return {};
487
+ try {
488
+ return JSON.parse(n);
489
+ } catch {
490
+ return {};
491
+ }
492
+ }, t = (n) => {
493
+ const o = n.getUnitId();
494
+ this.disposeWithMe(
495
+ this._resourceManagerService.registerPluginResource(o, U, {
496
+ toJson: (i) => a(i),
497
+ parseJson: (i) => e(i),
498
+ onChange: (i, d) => {
499
+ Object.keys(d).forEach((l) => {
500
+ d[l].forEach((p) => {
501
+ this._dataValidationModel.addRule(i, l, p);
502
+ });
503
+ });
504
+ }
505
+ })
506
+ );
507
+ };
508
+ this.disposeWithMe(D(this._univerInstanceService.sheetAdded$.subscribe(t))), this.disposeWithMe(
509
+ D(
510
+ this._univerInstanceService.sheetDisposed$.subscribe((n) => {
511
+ const o = n.getUnitId();
512
+ this._resourceManagerService.disposePluginResource(o, U);
513
+ })
514
+ )
515
+ );
516
+ const r = this._univerInstanceService.getCurrentUniverSheetInstance();
517
+ t(r);
518
+ }
519
+ };
520
+ V = Me([
521
+ G(H.Ready, V),
522
+ N(0, k),
523
+ N(1, Q),
524
+ N(2, E(h))
525
+ ], V);
526
+ var Se = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, Ve = (a, e, t, r) => {
527
+ for (var n = r > 1 ? void 0 : r ? Ie(e, t) : e, o = a.length - 1, i; o >= 0; o--)
528
+ (i = a[o]) && (n = (r ? i(e, t, n) : i(n)) || n);
529
+ return r && n && Se(e, t, n), n;
530
+ }, y = (a, e) => (t, r) => e(t, r, a);
531
+ let R = class extends A {
532
+ constructor(a, e, t) {
533
+ super(), this._sheetInterceptorService = a, this._univerInstanceService = e, this._dataValidationModel = t, this._initSheetChange();
534
+ }
535
+ _initSheetChange() {
536
+ this.disposeWithMe(
537
+ this._sheetInterceptorService.interceptCommand({
538
+ getMutations: (a) => {
539
+ if (a.id === ne.id) {
540
+ const e = a.params, t = e.unitId || this._univerInstanceService.getCurrentUniverSheetInstance().getUnitId(), r = this._univerInstanceService.getUniverSheetInstance(t);
541
+ if (!r)
542
+ return { redos: [], undos: [] };
543
+ const n = e.subUnitId || r.getActiveSheet().getSheetId(), o = this._dataValidationModel.ensureManager(t, n);
544
+ if (!o)
545
+ return { redos: [], undos: [] };
546
+ const i = o.getDataValidations(), d = i.map((p) => p.uid), l = {
547
+ unitId: t,
548
+ subUnitId: n,
549
+ ruleId: d
550
+ }, u = {
551
+ unitId: t,
552
+ subUnitId: n,
553
+ rule: i
554
+ };
555
+ return {
556
+ redos: [{
557
+ id: f.id,
558
+ params: l
559
+ }],
560
+ undos: [{
561
+ id: m.id,
562
+ params: u
563
+ }]
564
+ };
565
+ }
566
+ return { redos: [], undos: [] };
567
+ }
568
+ })
569
+ );
570
+ }
571
+ };
572
+ R = Ve([
573
+ G(H.Ready, R),
574
+ y(0, E(oe)),
575
+ y(1, E(Q)),
576
+ y(2, E(h))
577
+ ], R);
578
+ const Re = {
579
+ type: _.MUTATION,
580
+ id: "sheet.mutation.data-validation-formula-mark-dirty",
581
+ handler() {
582
+ return !0;
583
+ }
584
+ };
585
+ var Ae = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, Ne = (a, e, t, r) => {
586
+ for (var n = r > 1 ? void 0 : r ? Oe(e, t) : e, o = a.length - 1, i; o >= 0; o--)
587
+ (i = a[o]) && (n = (r ? i(e, t, n) : i(n)) || n);
588
+ return r && n && Ae(e, t, n), n;
589
+ }, C = (a, e) => (t, r) => e(t, r, a);
590
+ const ye = "data-validation";
591
+ let b = class extends ee {
592
+ constructor(a, e, t) {
593
+ super(ye), this._injector = e, this._commandService = t;
594
+ }
595
+ onStarting(a) {
412
596
  [
413
597
  // model
414
598
  [h],
415
599
  // service
416
- [b]
600
+ [j],
601
+ [V],
602
+ [R]
417
603
  ].forEach(
418
- (a) => {
419
- e.add(a);
604
+ (e) => {
605
+ a.add(e);
420
606
  }
421
607
  ), [
422
608
  // command
423
- ea,
424
- ia,
425
- oa,
426
- na,
427
- ra,
609
+ _e,
610
+ ve,
611
+ me,
612
+ Ee,
613
+ ge,
428
614
  // mutation
429
- E,
430
- g,
431
- v
432
- ].forEach((a) => {
433
- this._commandService.registerCommand(a);
615
+ Re,
616
+ m,
617
+ v,
618
+ f
619
+ ].forEach((e) => {
620
+ this._commandService.registerCommand(e);
434
621
  });
435
622
  }
436
623
  };
437
- O = la([
438
- N(0, I(B)),
439
- N(1, T)
440
- ], O);
624
+ b = Ne([
625
+ C(1, E(W)),
626
+ C(2, M)
627
+ ], b);
441
628
  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 + "";
442
- const ca = {
629
+ const De = {
443
630
  [s.BETWEEN]: "dataValidation.ruleName.between",
444
631
  [s.EQUAL]: "dataValidation.ruleName.equal",
445
632
  [s.GREATER_THAN]: "dataValidation.ruleName.greaterThan",
@@ -448,7 +635,7 @@ const ca = {
448
635
  [s.LESS_THAN_OR_EQUAL]: "dataValidation.ruleName.lessThanOrEqual",
449
636
  [s.NOT_BETWEEN]: "dataValidation.ruleName.notBetween",
450
637
  [s.NOT_EQUAL]: "dataValidation.ruleName.notEqual"
451
- }, ha = {
638
+ }, Le = {
452
639
  [s.BETWEEN]: "dataValidation.errorMsg.between",
453
640
  [s.EQUAL]: "dataValidation.errorMsg.equal",
454
641
  [s.GREATER_THAN]: "dataValidation.errorMsg.greaterThan",
@@ -457,13 +644,22 @@ const ca = {
457
644
  [s.LESS_THAN_OR_EQUAL]: "dataValidation.errorMsg.lessThanOrEqual",
458
645
  [s.NOT_BETWEEN]: "dataValidation.errorMsg.notBetween",
459
646
  [s.NOT_EQUAL]: "dataValidation.errorMsg.notEqual"
647
+ }, Qe = {
648
+ [s.BETWEEN]: "dataValidation.textLength.errorMsg.between",
649
+ [s.EQUAL]: "dataValidation.textLength.errorMsg.equal",
650
+ [s.GREATER_THAN]: "dataValidation.textLength.errorMsg.greaterThan",
651
+ [s.GREATER_THAN_OR_EQUAL]: "dataValidation.textLength.errorMsg.greaterThanOrEqual",
652
+ [s.LESS_THAN]: "dataValidation.textLength.errorMsg.lessThan",
653
+ [s.LESS_THAN_OR_EQUAL]: "dataValidation.textLength.errorMsg.lessThanOrEqual",
654
+ [s.NOT_BETWEEN]: "dataValidation.textLength.errorMsg.notBetween",
655
+ [s.NOT_EQUAL]: "dataValidation.textLength.errorMsg.notEqual"
460
656
  };
461
- var pa = Object.defineProperty, ma = Object.getOwnPropertyDescriptor, _a = (e, a, t, r) => {
462
- for (var o = r > 1 ? void 0 : r ? ma(a, t) : a, n = e.length - 1, i; n >= 0; n--)
463
- (i = e[n]) && (o = (r ? i(a, t, o) : i(o)) || o);
464
- return r && o && pa(a, t, o), o;
465
- }, y = (e, a) => (t, r) => a(t, r, e);
466
- const w = "{FORMULA1}", C = "{FORMULA2}", ga = {
657
+ var we = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, Ce = (a, e, t, r) => {
658
+ for (var n = r > 1 ? void 0 : r ? Ue(e, t) : e, o = a.length - 1, i; o >= 0; o--)
659
+ (i = a[o]) && (n = (r ? i(e, t, n) : i(n)) || n);
660
+ return r && n && we(e, t, n), n;
661
+ }, $ = (a, e) => (t, r) => e(t, r, a);
662
+ const B = "{FORMULA1}", P = "{FORMULA2}", be = {
467
663
  [s.BETWEEN]: "dataValidation.operators.between",
468
664
  [s.EQUAL]: "dataValidation.operators.equal",
469
665
  [s.GREATER_THAN]: "dataValidation.operators.greaterThan",
@@ -473,195 +669,132 @@ const w = "{FORMULA1}", C = "{FORMULA2}", ga = {
473
669
  [s.NOT_BETWEEN]: "dataValidation.operators.notBetween",
474
670
  [s.NOT_EQUAL]: "dataValidation.operators.notEqual"
475
671
  };
476
- let D = class {
477
- constructor(e, a) {
672
+ let x = class {
673
+ constructor(a, e) {
478
674
  c(this, "canvasRender", null);
479
675
  c(this, "dropdown");
480
676
  c(this, "optionsInput");
481
- this.localeService = e, this.injector = a;
677
+ this.localeService = a, this.injector = e;
482
678
  }
483
679
  get operatorNames() {
484
- return this.operators.map((e) => this.localeService.t(ga[e]));
680
+ return this.operators.map((a) => this.localeService.t(be[a]));
485
681
  }
486
682
  get titleStr() {
487
683
  return this.localeService.t(this.title);
488
684
  }
489
- skipDefaultFontRender(e, a, t) {
685
+ skipDefaultFontRender(a, e, t) {
490
686
  return !1;
491
687
  }
492
- generateRuleName(e) {
688
+ generateRuleName(a) {
493
689
  var t, r;
494
- if (!e.operator)
690
+ if (!a.operator)
495
691
  return this.titleStr;
496
- const a = this.localeService.t(ca[e.operator]).replace(w, (t = e.formula1) != null ? t : "").replace(C, (r = e.formula2) != null ? r : "");
497
- return `${this.titleStr} ${a}`;
692
+ const e = this.localeService.t(De[a.operator]).replace(B, (t = a.formula1) != null ? t : "").replace(P, (r = a.formula2) != null ? r : "");
693
+ return `${this.titleStr} ${e}`;
498
694
  }
499
- generateRuleErrorMessage(e) {
695
+ generateRuleErrorMessage(a) {
500
696
  var t, r;
501
- return e.operator ? `${this.localeService.t(ha[e.operator]).replace(w, (t = e.formula1) != null ? t : "").replace(C, (r = e.formula2) != null ? r : "")}` : this.titleStr;
697
+ return a.operator ? `${this.localeService.t(Le[a.operator]).replace(B, (t = a.formula1) != null ? t : "").replace(P, (r = a.formula2) != null ? r : "")}` : this.titleStr;
502
698
  }
503
- getRuleFinalError(e) {
504
- return e.showInputMessage && e.error ? e.error : this.generateRuleErrorMessage(e);
699
+ getRuleFinalError(a) {
700
+ return a.showInputMessage && a.error ? a.error : this.generateRuleErrorMessage(a);
505
701
  }
506
- isEmptyCellValue(e) {
507
- return e === "" || e === void 0 || e === null;
702
+ isEmptyCellValue(a) {
703
+ return a === "" || a === void 0 || a === null;
508
704
  }
509
- async isValidType(e, a, t) {
705
+ async isValidType(a, e, t) {
510
706
  return !0;
511
707
  }
512
- transform(e, a, t) {
513
- return e;
708
+ transform(a, e, t) {
709
+ return a;
514
710
  }
515
- async validatorIsEqual(e, a, t) {
711
+ async validatorIsEqual(a, e, t) {
516
712
  return !0;
517
713
  }
518
- async validatorIsNotEqual(e, a, t) {
714
+ async validatorIsNotEqual(a, e, t) {
519
715
  return !0;
520
716
  }
521
- async validatorIsBetween(e, a, t) {
717
+ async validatorIsBetween(a, e, t) {
522
718
  return !0;
523
719
  }
524
- async validatorIsNotBetween(e, a, t) {
720
+ async validatorIsNotBetween(a, e, t) {
525
721
  return !0;
526
722
  }
527
- async validatorIsGreaterThan(e, a, t) {
723
+ async validatorIsGreaterThan(a, e, t) {
528
724
  return !0;
529
725
  }
530
- async validatorIsGreaterThanOrEqual(e, a, t) {
726
+ async validatorIsGreaterThanOrEqual(a, e, t) {
531
727
  return !0;
532
728
  }
533
- async validatorIsLessThan(e, a, t) {
729
+ async validatorIsLessThan(a, e, t) {
534
730
  return !0;
535
731
  }
536
- async validatorIsLessThanOrEqual(e, a, t) {
732
+ async validatorIsLessThanOrEqual(a, e, t) {
537
733
  return !0;
538
734
  }
539
- async validator(e, a) {
540
- const { value: t, unitId: r, subUnitId: o } = e, n = this.isEmptyCellValue(t), { allowBlank: i = !0, operator: d } = a;
541
- if (n)
735
+ async validator(a, e) {
736
+ const { value: t, unitId: r, subUnitId: n } = a, o = this.isEmptyCellValue(t), { allowBlank: i = !0, operator: d } = e;
737
+ if (o)
542
738
  return i;
543
- const l = await this.parseFormula(a, r, o);
544
- if (!await this.isValidType(e, l, a))
739
+ const l = await this.parseFormula(e, r, n);
740
+ if (!await this.isValidType(a, l, e))
545
741
  return !1;
546
- if (!L.isDefine(d))
742
+ if (!q.isDefine(d))
547
743
  return !0;
548
- const u = this.transform(e, l, a);
744
+ const u = this.transform(a, l, e);
549
745
  switch (d) {
550
746
  case s.BETWEEN:
551
- return this.validatorIsBetween(u, l, a);
747
+ return this.validatorIsBetween(u, l, e);
552
748
  case s.EQUAL:
553
- return this.validatorIsEqual(u, l, a);
749
+ return this.validatorIsEqual(u, l, e);
554
750
  case s.GREATER_THAN:
555
- return this.validatorIsGreaterThan(u, l, a);
751
+ return this.validatorIsGreaterThan(u, l, e);
556
752
  case s.GREATER_THAN_OR_EQUAL:
557
- return this.validatorIsGreaterThanOrEqual(u, l, a);
753
+ return this.validatorIsGreaterThanOrEqual(u, l, e);
558
754
  case s.LESS_THAN:
559
- return this.validatorIsLessThan(u, l, a);
755
+ return this.validatorIsLessThan(u, l, e);
560
756
  case s.LESS_THAN_OR_EQUAL:
561
- return this.validatorIsLessThanOrEqual(u, l, a);
757
+ return this.validatorIsLessThanOrEqual(u, l, e);
562
758
  case s.NOT_BETWEEN:
563
- return this.validatorIsNotBetween(u, l, a);
759
+ return this.validatorIsNotBetween(u, l, e);
564
760
  case s.NOT_EQUAL:
565
- return this.validatorIsNotEqual(u, l, a);
761
+ return this.validatorIsNotEqual(u, l, e);
566
762
  default:
567
763
  throw new Error("Unknown operator.");
568
764
  }
569
765
  }
570
766
  };
571
- D = _a([
572
- y(0, I(j)),
573
- y(1, I(B))
574
- ], D);
575
- class Ia extends U {
576
- constructor(t, r, o) {
577
- super();
578
- c(this, "_dataValidations");
579
- c(this, "_dataValidationMap", /* @__PURE__ */ new Map());
580
- c(this, "_dataValidations$", new S());
581
- c(this, "unitId");
582
- c(this, "subUnitId");
583
- c(this, "dataValidations$", this._dataValidations$.asObservable());
584
- this.unitId = t, this.subUnitId = r, o && (this._insertRules(o), this._notice(), this.disposeWithMe({
585
- dispose: () => {
586
- this._dataValidations$.complete();
587
- }
588
- }));
589
- }
590
- _notice() {
591
- this._dataValidations$.next(this._dataValidations);
592
- }
593
- _insertRules(t) {
594
- this._dataValidations = t, t.forEach((r) => {
595
- this._dataValidationMap.set(r.uid, r);
596
- });
597
- }
598
- getRuleById(t) {
599
- return this._dataValidationMap.get(t);
600
- }
601
- getRuleIndex(t) {
602
- return this._dataValidations.findIndex((r) => r.uid === t);
603
- }
604
- addRule(t, r) {
605
- typeof r == "number" && r < this._dataValidations.length ? this._dataValidations.splice(r, 0, t) : this._dataValidations.push(t), this._dataValidationMap.set(t.uid, t), this._notice();
606
- }
607
- removeRule(t) {
608
- const r = this._dataValidations.findIndex((o) => o.uid === t);
609
- this._dataValidations.splice(r, 1), this._dataValidationMap.delete(t), this._notice();
610
- }
611
- updateRule(t, r) {
612
- const o = this._dataValidationMap.get(t), n = this._dataValidations.findIndex((d) => t === d.uid);
613
- if (!o)
614
- throw new Error(`Data validation rule is not found, ruleId: ${t}.`);
615
- const i = { ...o };
616
- switch (r.type) {
617
- case p.RANGE: {
618
- i.ranges = r.payload;
619
- break;
620
- }
621
- case p.SETTING: {
622
- Object.assign(i, r.payload);
623
- break;
624
- }
625
- case p.OPTIONS: {
626
- Object.assign(i, r.payload);
627
- break;
628
- }
629
- }
630
- return this._dataValidations[n] = i, this._dataValidationMap.set(t, i), this._notice(), i;
631
- }
632
- getDataValidations() {
633
- return this._dataValidations;
634
- }
635
- toJSON() {
636
- return this._dataValidations;
637
- }
638
- validator(t, r, o, n) {
639
- return F.VALID;
640
- }
641
- }
642
- const Sa = [
767
+ x = Ce([
768
+ $(0, E(te)),
769
+ $(1, E(W))
770
+ ], x);
771
+ const We = [
643
772
  s.BETWEEN,
644
773
  s.NOT_BETWEEN
645
774
  ];
646
775
  export {
647
- ea as AddDataValidationCommand,
648
- E as AddDataValidationMutation,
649
- D as BaseDataValidator,
650
- Ia as DataValidationManager,
776
+ _e as AddDataValidationCommand,
777
+ m as AddDataValidationMutation,
778
+ x as BaseDataValidator,
779
+ Re as DataValidationFormulaMarkDirty,
780
+ se as DataValidationManager,
651
781
  h as DataValidationModel,
652
- K as DataValidatorRegistryScope,
653
- b as DataValidatorRegistryService,
654
- ia as RemoveAllDataValidationCommand,
655
- ra as RemoveDataValidationCommand,
656
- v as RemoveDataValidationMutation,
657
- Sa as TWO_FORMULA_OPERATOR_COUNT,
658
- O as UniverDataValidationPlugin,
659
- g as UpdateDataValidationMutation,
660
- oa as UpdateDataValidationOptionsCommand,
661
- na as UpdateDataValidationSettingCommand,
662
- p as UpdateRuleType,
663
- Ra as createDefaultNewRule,
664
- ta as getRuleOptions,
665
- aa as getRuleSetting,
666
- Va as removeDataValidationUndoFactory
782
+ V as DataValidationResourceController,
783
+ R as DataValidationSheetController,
784
+ ie as DataValidatorRegistryScope,
785
+ j as DataValidatorRegistryService,
786
+ ve as RemoveAllDataValidationCommand,
787
+ ge as RemoveDataValidationCommand,
788
+ f as RemoveDataValidationMutation,
789
+ We as TWO_FORMULA_OPERATOR_COUNT,
790
+ Qe as TextLengthErrorTitleMap,
791
+ b as UniverDataValidationPlugin,
792
+ v as UpdateDataValidationMutation,
793
+ me as UpdateDataValidationOptionsCommand,
794
+ Ee as UpdateDataValidationSettingCommand,
795
+ g as UpdateRuleType,
796
+ Ge as createDefaultNewRule,
797
+ pe as getRuleOptions,
798
+ he as getRuleSetting,
799
+ He as removeDataValidationUndoFactory
667
800
  };