@univerjs/sheets-conditional-formatting 0.5.5-nightly.202501211606 → 0.5.5

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/facade.js CHANGED
@@ -1,63 +1,62 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
3
- var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
5
- import { ColorKit, Tools, BooleanNumber, Rectangle, ColorBuilder } from "@univerjs/core";
6
- import { CFRuleType, CFNumberOperator, CFValueType, EMPTY_ICON_TYPE, CFSubRuleType, CFTextOperator, createCfId, iconMap, ConditionalFormattingRuleModel, AddConditionalRuleMutation, DeleteConditionalRuleMutation, MoveConditionalRuleMutation, SetConditionalRuleMutation } from "@univerjs/sheets-conditional-formatting";
7
- import { FRange, FWorkbook, FWorksheet } from "@univerjs/sheets/facade";
8
- const _ConditionalFormatRuleBaseBuilder = class _ConditionalFormatRuleBaseBuilder {
9
- constructor(initRule = {}) {
10
- __publicField(this, "_rule", {});
11
- this._rule = initRule, this._ensureAttr(this._rule, ["rule"]);
1
+ var N = Object.defineProperty;
2
+ var q = (u, e, t) => e in u ? N(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
3
+ var b = (u, e, t) => q(u, typeof e != "symbol" ? e + "" : e, t);
4
+ import { ColorKit as c, Tools as _, BooleanNumber as a, Rectangle as U, ColorBuilder as B } from "@univerjs/core";
5
+ import { CFRuleType as n, CFNumberOperator as l, CFValueType as C, EMPTY_ICON_TYPE as f, CFSubRuleType as o, CFTextOperator as g, createCfId as T, iconMap as M, ConditionalFormattingRuleModel as x, AddConditionalRuleMutation as S, DeleteConditionalRuleMutation as I, MoveConditionalRuleMutation as E, SetConditionalRuleMutation as k } from "@univerjs/sheets-conditional-formatting";
6
+ import { FRange as v, FWorkbook as F, FWorksheet as R } from "@univerjs/sheets/facade";
7
+ class d {
8
+ constructor(e = {}) {
9
+ b(this, "_rule", {});
10
+ this._rule = e, this._ensureAttr(this._rule, ["rule"]);
12
11
  }
13
12
  get _ruleConfig() {
14
13
  return this._rule.rule || null;
15
14
  }
16
- _getDefaultConfig(type = CFRuleType.highlightCell) {
17
- switch (type) {
18
- case CFRuleType.colorScale:
15
+ _getDefaultConfig(e = n.highlightCell) {
16
+ switch (e) {
17
+ case n.colorScale:
19
18
  return {
20
- type,
19
+ type: e,
21
20
  config: [
22
- { index: 0, color: new ColorKit("").toRgbString(), value: { type: CFValueType.min } },
23
- { index: 0, color: new ColorKit("green").toRgbString(), value: { type: CFValueType.max } }
21
+ { index: 0, color: new c("").toRgbString(), value: { type: C.min } },
22
+ { index: 0, color: new c("green").toRgbString(), value: { type: C.max } }
24
23
  ]
25
24
  };
26
- case CFRuleType.dataBar:
25
+ case n.dataBar:
27
26
  return {
28
- type,
27
+ type: e,
29
28
  isShowValue: !0,
30
- config: { min: { type: CFValueType.min }, max: { type: CFValueType.max }, positiveColor: new ColorKit("green").toRgbString(), nativeColor: new ColorKit("").toRgbString(), isGradient: !1 }
29
+ config: { min: { type: C.min }, max: { type: C.max }, positiveColor: new c("green").toRgbString(), nativeColor: new c("").toRgbString(), isGradient: !1 }
31
30
  };
32
- case CFRuleType.highlightCell:
31
+ case n.highlightCell:
33
32
  return {
34
- type,
35
- subType: CFSubRuleType.text,
36
- operator: CFTextOperator.containsText,
33
+ type: e,
34
+ subType: o.text,
35
+ operator: g.containsText,
37
36
  value: "abc",
38
37
  style: {}
39
38
  };
40
- case CFRuleType.iconSet:
39
+ case n.iconSet:
41
40
  return {
42
- type,
41
+ type: e,
43
42
  isShowValue: !0,
44
43
  config: [
45
44
  {
46
- operator: CFNumberOperator.greaterThanOrEqual,
47
- value: { type: CFValueType.min },
48
- iconType: EMPTY_ICON_TYPE,
45
+ operator: l.greaterThanOrEqual,
46
+ value: { type: C.min },
47
+ iconType: f,
49
48
  iconId: ""
50
49
  },
51
50
  {
52
- operator: CFNumberOperator.greaterThanOrEqual,
53
- value: { type: CFValueType.percentile, value: 0.5 },
54
- iconType: EMPTY_ICON_TYPE,
51
+ operator: l.greaterThanOrEqual,
52
+ value: { type: C.percentile, value: 0.5 },
53
+ iconType: f,
55
54
  iconId: ""
56
55
  },
57
56
  {
58
- operator: CFNumberOperator.lessThanOrEqual,
59
- value: { type: CFValueType.max },
60
- iconType: EMPTY_ICON_TYPE,
57
+ operator: l.lessThanOrEqual,
58
+ value: { type: C.max },
59
+ iconType: f,
61
60
  iconId: ""
62
61
  }
63
62
  ]
@@ -65,14 +64,14 @@ const _ConditionalFormatRuleBaseBuilder = class _ConditionalFormatRuleBaseBuilde
65
64
  }
66
65
  }
67
66
  // eslint-disable-next-line ts/no-explicit-any
68
- _ensureAttr(obj, keys) {
69
- return keys.reduce((pre, cur) => (pre[cur] || (pre[cur] = {}), pre[cur]), obj), obj;
67
+ _ensureAttr(e, t) {
68
+ return t.reduce((r, s) => (r[s] || (r[s] = {}), r[s]), e), e;
70
69
  }
71
70
  build() {
72
- var _a;
73
- this._rule.cfId || (this._rule.cfId = createCfId()), this._rule.ranges || (this._rule.ranges = []), this._rule.stopIfTrue === void 0 && (this._rule.stopIfTrue = !1), (_a = this._rule.rule) != null && _a.type || (this._rule.rule.type = CFRuleType.highlightCell, this._ensureAttr(this._rule, ["rule", "style"]));
74
- const defaultConfig = this._getDefaultConfig(this._rule.rule.type);
75
- return { ...this._rule, rule: { ...defaultConfig, ...this._rule.rule } };
71
+ var r;
72
+ this._rule.cfId || (this._rule.cfId = T()), this._rule.ranges || (this._rule.ranges = []), this._rule.stopIfTrue === void 0 && (this._rule.stopIfTrue = !1), (r = this._rule.rule) != null && r.type || (this._rule.rule.type = n.highlightCell, this._ensureAttr(this._rule, ["rule", "style"]));
73
+ const e = this._getDefaultConfig(this._rule.rule.type);
74
+ return { ...this._rule, rule: { ...e, ...this._rule.rule } };
76
75
  }
77
76
  /**
78
77
  * Deep clone a current builder.
@@ -80,7 +79,7 @@ const _ConditionalFormatRuleBaseBuilder = class _ConditionalFormatRuleBaseBuilde
80
79
  * @memberof ConditionalFormatRuleBuilder
81
80
  */
82
81
  copy() {
83
- return new _ConditionalFormatRuleBaseBuilder(Tools.deepClone(this._rule));
82
+ return new d(_.deepClone(this._rule));
84
83
  }
85
84
  /**
86
85
  * Gets the scope of the current conditional format
@@ -94,7 +93,7 @@ const _ConditionalFormatRuleBaseBuilder = class _ConditionalFormatRuleBaseBuilde
94
93
  * Get the icon set mapping dictionary
95
94
  */
96
95
  getIconMap() {
97
- return iconMap;
96
+ return M;
98
97
  }
99
98
  /**
100
99
  * Create a conditional format ID.
@@ -102,7 +101,7 @@ const _ConditionalFormatRuleBaseBuilder = class _ConditionalFormatRuleBaseBuilde
102
101
  * @memberof ConditionalFormatRuleBuilder
103
102
  */
104
103
  createCfId() {
105
- return createCfId();
104
+ return T();
106
105
  }
107
106
  /**
108
107
  * Sets the scope for conditional formatting
@@ -110,43 +109,41 @@ const _ConditionalFormatRuleBaseBuilder = class _ConditionalFormatRuleBaseBuilde
110
109
  * @returns {*}
111
110
  * @memberof ConditionalFormatRuleBuilder
112
111
  */
113
- setRanges(ranges) {
114
- return this._rule.ranges = ranges, this;
112
+ setRanges(e) {
113
+ return this._rule.ranges = e, this;
115
114
  }
116
- };
117
- __name(_ConditionalFormatRuleBaseBuilder, "ConditionalFormatRuleBaseBuilder");
118
- let ConditionalFormatRuleBaseBuilder = _ConditionalFormatRuleBaseBuilder;
119
- const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRuleBaseBuilder {
120
- constructor(initConfig = {}) {
121
- super(initConfig), this._ensureAttr(this._rule, ["rule", "style"]);
115
+ }
116
+ class i extends d {
117
+ constructor(e = {}) {
118
+ super(e), this._ensureAttr(this._rule, ["rule", "style"]);
122
119
  }
123
120
  copy() {
124
- return new _ConditionalFormatHighlightRuleBuilder(Tools.deepClone(this._rule));
121
+ return new i(_.deepClone(this._rule));
125
122
  }
126
123
  /**
127
124
  * Set average rule
128
125
  * @param {IAverageHighlightCell['operator']} operator
129
126
  * @memberof ConditionalFormatHighlightRuleBuilder
130
127
  */
131
- setAverage(operator) {
132
- const ruleConfig = this._ruleConfig;
133
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.average, ruleConfig.operator = operator, this;
128
+ setAverage(e) {
129
+ const t = this._ruleConfig;
130
+ return t.type = n.highlightCell, t.subType = o.average, t.operator = e, this;
134
131
  }
135
132
  /**
136
133
  * Set uniqueValues rule
137
134
  * @memberof ConditionalFormatHighlightRuleBuilder
138
135
  */
139
136
  setUniqueValues() {
140
- const ruleConfig = this._ruleConfig;
141
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.uniqueValues, this;
137
+ const e = this._ruleConfig;
138
+ return e.type = n.highlightCell, e.subType = o.uniqueValues, this;
142
139
  }
143
140
  /**
144
141
  * Set duplicateValues rule
145
142
  * @memberof ConditionalFormatHighlightRuleBuilder
146
143
  */
147
144
  setDuplicateValues() {
148
- const ruleConfig = this._ruleConfig;
149
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.duplicateValues, this;
145
+ const e = this._ruleConfig;
146
+ return e.type = n.highlightCell, e.subType = o.duplicateValues, this;
150
147
  }
151
148
  /**
152
149
  * Set rank rule
@@ -156,9 +153,9 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
156
153
  * @param config.value
157
154
  * @memberof ConditionalFormatHighlightRuleBuilder
158
155
  */
159
- setRank(config) {
160
- const ruleConfig = this._ruleConfig;
161
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.rank, ruleConfig.isBottom = config.isBottom, ruleConfig.isPercent = config.isPercent, ruleConfig.value = config.value, this;
156
+ setRank(e) {
157
+ const t = this._ruleConfig;
158
+ return t.type = n.highlightCell, t.subType = o.rank, t.isBottom = e.isBottom, t.isPercent = e.isPercent, t.value = e.value, this;
162
159
  }
163
160
  /**
164
161
  * Sets the background color
@@ -166,13 +163,13 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
166
163
  * @returns {*}
167
164
  * @memberof ConditionalFormatRuleBuilder
168
165
  */
169
- setBackground(color) {
170
- var _a;
171
- if (((_a = this._ruleConfig) == null ? void 0 : _a.type) === CFRuleType.highlightCell)
172
- if (color) {
166
+ setBackground(e) {
167
+ var t;
168
+ if (((t = this._ruleConfig) == null ? void 0 : t.type) === n.highlightCell)
169
+ if (e) {
173
170
  this._ensureAttr(this._ruleConfig, ["style", "bg"]);
174
- const colorKit = new ColorKit(color);
175
- this._ruleConfig.style.bg.rgb = colorKit.toRgbString();
171
+ const r = new c(e);
172
+ this._ruleConfig.style.bg.rgb = r.toRgbString();
176
173
  } else
177
174
  delete this._ruleConfig.style.bg;
178
175
  return this;
@@ -183,9 +180,9 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
183
180
  * @returns {*}
184
181
  * @memberof ConditionalFormatRuleBuilder
185
182
  */
186
- setBold(isBold) {
187
- var _a;
188
- return ((_a = this._ruleConfig) == null ? void 0 : _a.type) === CFRuleType.highlightCell && (this._ensureAttr(this._ruleConfig, ["style"]), this._ruleConfig.style.bl = isBold ? BooleanNumber.TRUE : BooleanNumber.FALSE), this;
183
+ setBold(e) {
184
+ var t;
185
+ return ((t = this._ruleConfig) == null ? void 0 : t.type) === n.highlightCell && (this._ensureAttr(this._ruleConfig, ["style"]), this._ruleConfig.style.bl = e ? a.TRUE : a.FALSE), this;
189
186
  }
190
187
  /**
191
188
  * Sets the font color
@@ -193,12 +190,12 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
193
190
  * @returns {*}
194
191
  * @memberof ConditionalFormatRuleBuilder
195
192
  */
196
- setFontColor(color) {
197
- var _a;
198
- if (((_a = this._ruleConfig) == null ? void 0 : _a.type) === CFRuleType.highlightCell)
199
- if (color) {
200
- const colorKit = new ColorKit(color);
201
- this._ensureAttr(this._ruleConfig, ["style", "cl"]), this._ruleConfig.style.cl.rgb = colorKit.toRgbString();
193
+ setFontColor(e) {
194
+ var t;
195
+ if (((t = this._ruleConfig) == null ? void 0 : t.type) === n.highlightCell)
196
+ if (e) {
197
+ const r = new c(e);
198
+ this._ensureAttr(this._ruleConfig, ["style", "cl"]), this._ruleConfig.style.cl.rgb = r.toRgbString();
202
199
  } else
203
200
  delete this._ruleConfig.style.cl;
204
201
  return this;
@@ -209,9 +206,9 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
209
206
  * @returns {*}
210
207
  * @memberof ConditionalFormatRuleBuilder
211
208
  */
212
- setItalic(isItalic) {
213
- var _a;
214
- return ((_a = this._ruleConfig) == null ? void 0 : _a.type) === CFRuleType.highlightCell && (this._ensureAttr(this._ruleConfig, ["style"]), this._ruleConfig.style.it = isItalic ? BooleanNumber.TRUE : BooleanNumber.FALSE), this;
209
+ setItalic(e) {
210
+ var t;
211
+ return ((t = this._ruleConfig) == null ? void 0 : t.type) === n.highlightCell && (this._ensureAttr(this._ruleConfig, ["style"]), this._ruleConfig.style.it = e ? a.TRUE : a.FALSE), this;
215
212
  }
216
213
  /**
217
214
  * Set the strikethrough
@@ -219,9 +216,9 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
219
216
  * @returns {*}
220
217
  * @memberof ConditionalFormatRuleBuilder
221
218
  */
222
- setStrikethrough(isStrikethrough) {
223
- var _a;
224
- return ((_a = this._ruleConfig) == null ? void 0 : _a.type) === CFRuleType.highlightCell && (this._ensureAttr(this._ruleConfig, ["style", "st"]), this._ruleConfig.style.st.s = isStrikethrough ? BooleanNumber.TRUE : BooleanNumber.FALSE), this;
219
+ setStrikethrough(e) {
220
+ var t;
221
+ return ((t = this._ruleConfig) == null ? void 0 : t.type) === n.highlightCell && (this._ensureAttr(this._ruleConfig, ["style", "st"]), this._ruleConfig.style.st.s = e ? a.TRUE : a.FALSE), this;
225
222
  }
226
223
  /**
227
224
  * Set the underscore
@@ -229,16 +226,16 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
229
226
  * @returns {*}
230
227
  * @memberof ConditionalFormatRuleBuilder
231
228
  */
232
- setUnderline(isUnderline) {
233
- var _a;
234
- return ((_a = this._ruleConfig) == null ? void 0 : _a.type) === CFRuleType.highlightCell && (this._ensureAttr(this._ruleConfig, ["style", "ul"]), this._ruleConfig.style.ul.s = isUnderline ? BooleanNumber.TRUE : BooleanNumber.FALSE), this;
229
+ setUnderline(e) {
230
+ var t;
231
+ return ((t = this._ruleConfig) == null ? void 0 : t.type) === n.highlightCell && (this._ensureAttr(this._ruleConfig, ["style", "ul"]), this._ruleConfig.style.ul.s = e ? a.TRUE : a.FALSE), this;
235
232
  }
236
233
  /**
237
234
  * Sets the conditional formatting rule to fire when the cell is empty.
238
235
  */
239
236
  whenCellEmpty() {
240
- const ruleConfig = this._ruleConfig;
241
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.text, ruleConfig.value = "", ruleConfig.operator = CFTextOperator.equal, this;
237
+ const e = this._ruleConfig;
238
+ return e.type = n.highlightCell, e.subType = o.text, e.value = "", e.operator = g.equal, this;
242
239
  }
243
240
  /**
244
241
  * Sets the conditional formatting rule to fire when the cell is not empty
@@ -246,8 +243,8 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
246
243
  * @memberof ConditionalFormatRuleBuilder
247
244
  */
248
245
  whenCellNotEmpty() {
249
- const ruleConfig = this._ruleConfig;
250
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.text, ruleConfig.value = "", ruleConfig.operator = CFTextOperator.notEqual, this;
246
+ const e = this._ruleConfig;
247
+ return e.type = n.highlightCell, e.subType = o.text, e.value = "", e.operator = g.notEqual, this;
251
248
  }
252
249
  /**
253
250
  * Highlight when the date is in a time period, custom time is not supported.
@@ -255,18 +252,18 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
255
252
  * @returns {*}
256
253
  * @memberof ConditionalFormatRuleBuilder
257
254
  */
258
- whenDate(date) {
259
- const ruleConfig = this._ruleConfig;
260
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.timePeriod, ruleConfig.operator = date, this;
255
+ whenDate(e) {
256
+ const t = this._ruleConfig;
257
+ return t.type = n.highlightCell, t.subType = o.timePeriod, t.operator = e, this;
261
258
  }
262
259
  /**
263
260
  * Sets a conditional formatting rule to fire when a given formula evaluates to true.
264
261
  * @param {string} formulaString formulaString start with' = '
265
262
  * @memberof ConditionalFormatRuleBuilder
266
263
  */
267
- whenFormulaSatisfied(formulaString) {
268
- const ruleConfig = this._ruleConfig;
269
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.formula, ruleConfig.value = formulaString, this;
264
+ whenFormulaSatisfied(e) {
265
+ const t = this._ruleConfig;
266
+ return t.type = n.highlightCell, t.subType = o.formula, t.value = e, this;
270
267
  }
271
268
  /**
272
269
  * Sets the conditional formatting rule to fire when a number is between two specified values or equal to one of them.
@@ -274,54 +271,54 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
274
271
  * @param {number} end
275
272
  * @memberof ConditionalFormatRuleBuilder
276
273
  */
277
- whenNumberBetween(start, end) {
278
- const min = Math.min(start, end), max = Math.max(start, end), ruleConfig = this._ruleConfig;
279
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.number, ruleConfig.value = [min, max], ruleConfig.operator = CFNumberOperator.between, this;
274
+ whenNumberBetween(e, t) {
275
+ const r = Math.min(e, t), s = Math.max(e, t), h = this._ruleConfig;
276
+ return h.type = n.highlightCell, h.subType = o.number, h.value = [r, s], h.operator = l.between, this;
280
277
  }
281
278
  /**
282
279
  * Sets the conditional formatting rule to fire when the number equals the given value
283
280
  * @param {number} value
284
281
  * @memberof ConditionalFormatRuleBuilder
285
282
  */
286
- whenNumberEqualTo(value) {
287
- const ruleConfig = this._ruleConfig;
288
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.number, ruleConfig.value = value, ruleConfig.operator = CFNumberOperator.equal, this;
283
+ whenNumberEqualTo(e) {
284
+ const t = this._ruleConfig;
285
+ return t.type = n.highlightCell, t.subType = o.number, t.value = e, t.operator = l.equal, this;
289
286
  }
290
287
  /**
291
288
  * Sets the conditional formatting rule to fire when the number is greater than the given value
292
289
  * @param {number} value
293
290
  * @memberof ConditionalFormatRuleBuilder
294
291
  */
295
- whenNumberGreaterThan(value) {
296
- const ruleConfig = this._ruleConfig;
297
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.number, ruleConfig.value = value, ruleConfig.operator = CFNumberOperator.greaterThan, this;
292
+ whenNumberGreaterThan(e) {
293
+ const t = this._ruleConfig;
294
+ return t.type = n.highlightCell, t.subType = o.number, t.value = e, t.operator = l.greaterThan, this;
298
295
  }
299
296
  /**
300
297
  * Sets a conditional formatting rule to fire when a number is greater than or equal to a given value.
301
298
  * @param {number} value
302
299
  * @memberof ConditionalFormatRuleBuilder
303
300
  */
304
- whenNumberGreaterThanOrEqualTo(value) {
305
- const ruleConfig = this._ruleConfig;
306
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.number, ruleConfig.value = value, ruleConfig.operator = CFNumberOperator.greaterThanOrEqual, this;
301
+ whenNumberGreaterThanOrEqualTo(e) {
302
+ const t = this._ruleConfig;
303
+ return t.type = n.highlightCell, t.subType = o.number, t.value = e, t.operator = l.greaterThanOrEqual, this;
307
304
  }
308
305
  /**
309
306
  * Sets a conditional formatting rule to fire when the number is less than the given value.
310
307
  * @param {number} value
311
308
  * @memberof ConditionalFormatRuleBuilder
312
309
  */
313
- whenNumberLessThan(value) {
314
- const ruleConfig = this._ruleConfig;
315
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.number, ruleConfig.value = value, ruleConfig.operator = CFNumberOperator.lessThan, this;
310
+ whenNumberLessThan(e) {
311
+ const t = this._ruleConfig;
312
+ return t.type = n.highlightCell, t.subType = o.number, t.value = e, t.operator = l.lessThan, this;
316
313
  }
317
314
  /**
318
315
  * Sets the conditional formatting rule to fire when the value is less than or equal to the given value.
319
316
  * @param {number} value
320
317
  * @memberof ConditionalFormatRuleBuilder
321
318
  */
322
- whenNumberLessThanOrEqualTo(value) {
323
- const ruleConfig = this._ruleConfig;
324
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.number, ruleConfig.value = value, ruleConfig.operator = CFNumberOperator.lessThanOrEqual, this;
319
+ whenNumberLessThanOrEqualTo(e) {
320
+ const t = this._ruleConfig;
321
+ return t.type = n.highlightCell, t.subType = o.number, t.value = e, t.operator = l.lessThanOrEqual, this;
325
322
  }
326
323
  /**
327
324
  * Sets a conditional formatting rule to fire when a number is not between two specified values and is not equal to them.
@@ -329,70 +326,68 @@ const _ConditionalFormatHighlightRuleBuilder = class _ConditionalFormatHighlight
329
326
  * @param {number} end
330
327
  * @memberof ConditionalFormatRuleBuilder
331
328
  */
332
- whenNumberNotBetween(start, end) {
333
- const min = Math.min(start, end), max = Math.max(start, end), ruleConfig = this._ruleConfig;
334
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.number, ruleConfig.value = [min, max], ruleConfig.operator = CFNumberOperator.notBetween, this;
329
+ whenNumberNotBetween(e, t) {
330
+ const r = Math.min(e, t), s = Math.max(e, t), h = this._ruleConfig;
331
+ return h.type = n.highlightCell, h.subType = o.number, h.value = [r, s], h.operator = l.notBetween, this;
335
332
  }
336
333
  /**
337
334
  * Sets the conditional formatting rule to fire when a number does not equal a given value.
338
335
  * @param value
339
336
  * @memberof ConditionalFormatRuleBuilder
340
337
  */
341
- whenNumberNotEqualTo(value) {
342
- const ruleConfig = this._ruleConfig;
343
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.number, ruleConfig.value = value, ruleConfig.operator = CFNumberOperator.notEqual, this;
338
+ whenNumberNotEqualTo(e) {
339
+ const t = this._ruleConfig;
340
+ return t.type = n.highlightCell, t.subType = o.number, t.value = e, t.operator = l.notEqual, this;
344
341
  }
345
342
  /**
346
343
  * Sets the conditional formatting rule to fire when the input contains the given value.
347
344
  * @param {string} text
348
345
  * @memberof ConditionalFormatRuleBuilder
349
346
  */
350
- whenTextContains(text) {
351
- const ruleConfig = this._ruleConfig;
352
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.text, ruleConfig.value = text, ruleConfig.operator = CFTextOperator.containsText, this;
347
+ whenTextContains(e) {
348
+ const t = this._ruleConfig;
349
+ return t.type = n.highlightCell, t.subType = o.text, t.value = e, t.operator = g.containsText, this;
353
350
  }
354
351
  /**
355
352
  * Sets a conditional formatting rule to fire when the input does not contain the given value.
356
353
  * @param {string} text
357
354
  * @memberof ConditionalFormatRuleBuilder
358
355
  */
359
- whenTextDoesNotContain(text) {
360
- const ruleConfig = this._ruleConfig;
361
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.text, ruleConfig.value = text, ruleConfig.operator = CFTextOperator.notContainsText, this;
356
+ whenTextDoesNotContain(e) {
357
+ const t = this._ruleConfig;
358
+ return t.type = n.highlightCell, t.subType = o.text, t.value = e, t.operator = g.notContainsText, this;
362
359
  }
363
360
  /**
364
361
  * Sets a conditional formatting rule to fire when input ends with a specified value.
365
362
  * @param {string} text
366
363
  * @memberof ConditionalFormatRuleBuilder
367
364
  */
368
- whenTextEndsWith(text) {
369
- const ruleConfig = this._ruleConfig;
370
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.text, ruleConfig.value = text, ruleConfig.operator = CFTextOperator.endsWith, this;
365
+ whenTextEndsWith(e) {
366
+ const t = this._ruleConfig;
367
+ return t.type = n.highlightCell, t.subType = o.text, t.value = e, t.operator = g.endsWith, this;
371
368
  }
372
369
  /**
373
370
  * Sets the conditional formatting rule to fire when the input equals the given value.
374
371
  * @param {string} text
375
372
  * @memberof ConditionalFormatRuleBuilder
376
373
  */
377
- whenTextEqualTo(text) {
378
- const ruleConfig = this._ruleConfig;
379
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.text, ruleConfig.value = text, ruleConfig.operator = CFTextOperator.equal, this;
374
+ whenTextEqualTo(e) {
375
+ const t = this._ruleConfig;
376
+ return t.type = n.highlightCell, t.subType = o.text, t.value = e, t.operator = g.equal, this;
380
377
  }
381
378
  /**
382
379
  * Sets the conditional formatting rule to fire when the input value begins with the given value.
383
380
  * @param {string} text
384
381
  * @memberof ConditionalFormatRuleBuilder
385
382
  */
386
- whenTextStartsWith(text) {
387
- const ruleConfig = this._ruleConfig;
388
- return ruleConfig.type = CFRuleType.highlightCell, ruleConfig.subType = CFSubRuleType.text, ruleConfig.value = text, ruleConfig.operator = CFTextOperator.beginsWith, this;
383
+ whenTextStartsWith(e) {
384
+ const t = this._ruleConfig;
385
+ return t.type = n.highlightCell, t.subType = o.text, t.value = e, t.operator = g.beginsWith, this;
389
386
  }
390
- };
391
- __name(_ConditionalFormatHighlightRuleBuilder, "ConditionalFormatHighlightRuleBuilder");
392
- let ConditionalFormatHighlightRuleBuilder = _ConditionalFormatHighlightRuleBuilder;
393
- const _ConditionalFormatDataBarRuleBuilder = class _ConditionalFormatDataBarRuleBuilder extends ConditionalFormatRuleBaseBuilder {
387
+ }
388
+ class w extends d {
394
389
  copy() {
395
- return new _ConditionalFormatDataBarRuleBuilder(Tools.deepClone(this._rule));
390
+ return new w(_.deepClone(this._rule));
396
391
  }
397
392
  /**
398
393
  * Data bar settings
@@ -412,38 +407,34 @@ const _ConditionalFormatDataBarRuleBuilder = class _ConditionalFormatDataBarRule
412
407
  * @param config.isShowValue
413
408
  * @memberof ConditionalFormatRuleBuilder
414
409
  */
415
- setDataBar(config) {
416
- const ruleConfig = this._ruleConfig;
417
- return ruleConfig.type = CFRuleType.dataBar, ruleConfig.isShowValue = !!config.isShowValue, ruleConfig.config = {
418
- min: config.min,
419
- max: config.max,
420
- positiveColor: config.positiveColor,
421
- nativeColor: config.nativeColor,
422
- isGradient: !!config.isGradient
410
+ setDataBar(e) {
411
+ const t = this._ruleConfig;
412
+ return t.type = n.dataBar, t.isShowValue = !!e.isShowValue, t.config = {
413
+ min: e.min,
414
+ max: e.max,
415
+ positiveColor: e.positiveColor,
416
+ nativeColor: e.nativeColor,
417
+ isGradient: !!e.isGradient
423
418
  }, this;
424
419
  }
425
- };
426
- __name(_ConditionalFormatDataBarRuleBuilder, "ConditionalFormatDataBarRuleBuilder");
427
- let ConditionalFormatDataBarRuleBuilder = _ConditionalFormatDataBarRuleBuilder;
428
- const _ConditionalFormatColorScaleRuleBuilder = class _ConditionalFormatColorScaleRuleBuilder extends ConditionalFormatRuleBaseBuilder {
420
+ }
421
+ class p extends d {
429
422
  copy() {
430
- return new _ConditionalFormatColorScaleRuleBuilder(Tools.deepClone(this._rule));
423
+ return new p(_.deepClone(this._rule));
431
424
  }
432
425
  /**
433
426
  * Color scale set
434
427
  * @param {{ index: number; color: string; value: IValueConfig }[]} config
435
428
  * @memberof ConditionalFormatRuleBuilder
436
429
  */
437
- setColorScale(config) {
438
- const ruleConfig = this._ruleConfig;
439
- return ruleConfig.type = CFRuleType.colorScale, ruleConfig.config = config, this;
430
+ setColorScale(e) {
431
+ const t = this._ruleConfig;
432
+ return t.type = n.colorScale, t.config = e, this;
440
433
  }
441
- };
442
- __name(_ConditionalFormatColorScaleRuleBuilder, "ConditionalFormatColorScaleRuleBuilder");
443
- let ConditionalFormatColorScaleRuleBuilder = _ConditionalFormatColorScaleRuleBuilder;
444
- const _ConditionalFormatIconSetRuleBuilder = class _ConditionalFormatIconSetRuleBuilder extends ConditionalFormatRuleBaseBuilder {
434
+ }
435
+ class y extends d {
445
436
  copy() {
446
- return new _ConditionalFormatIconSetRuleBuilder(Tools.deepClone(this._rule));
437
+ return new y(_.deepClone(this._rule));
447
438
  }
448
439
  /**
449
440
  *
@@ -453,41 +444,39 @@ const _ConditionalFormatIconSetRuleBuilder = class _ConditionalFormatIconSetRule
453
444
  * @param config.isShowValue
454
445
  * @memberof ConditionalFormatRuleBuilder
455
446
  */
456
- setIconSet(config) {
457
- const ruleConfig = this._ruleConfig;
458
- return ruleConfig.type = CFRuleType.iconSet, ruleConfig.config = config.iconConfigs, ruleConfig.isShowValue = config.isShowValue, this;
447
+ setIconSet(e) {
448
+ const t = this._ruleConfig;
449
+ return t.type = n.iconSet, t.config = e.iconConfigs, t.isShowValue = e.isShowValue, this;
459
450
  }
460
- };
461
- __name(_ConditionalFormatIconSetRuleBuilder, "ConditionalFormatIconSetRuleBuilder");
462
- let ConditionalFormatIconSetRuleBuilder = _ConditionalFormatIconSetRuleBuilder;
463
- const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
464
- constructor(_initConfig = {}) {
465
- this._initConfig = _initConfig;
451
+ }
452
+ class m {
453
+ constructor(e = {}) {
454
+ this._initConfig = e;
466
455
  }
467
456
  build() {
468
- return new ConditionalFormatRuleBaseBuilder(this._initConfig).build();
457
+ return new d(this._initConfig).build();
469
458
  }
470
459
  /**
471
460
  * Set average rule
472
461
  * @param {IAverageHighlightCell['operator']} operator
473
462
  * @memberof ConditionalFormatHighlightRuleBuilder
474
463
  */
475
- setAverage(operator) {
476
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setAverage(operator);
464
+ setAverage(e) {
465
+ return new i(this._initConfig).setAverage(e);
477
466
  }
478
467
  /**
479
468
  * Set uniqueValues rule
480
469
  * @memberof ConditionalFormatHighlightRuleBuilder
481
470
  */
482
471
  setUniqueValues() {
483
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setUniqueValues();
472
+ return new i(this._initConfig).setUniqueValues();
484
473
  }
485
474
  /**
486
475
  * Set duplicateValues rule
487
476
  * @memberof ConditionalFormatHighlightRuleBuilder
488
477
  */
489
478
  setDuplicateValues() {
490
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setDuplicateValues();
479
+ return new i(this._initConfig).setDuplicateValues();
491
480
  }
492
481
  /**
493
482
  * Set rank rule
@@ -497,8 +486,8 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
497
486
  * @param config.value
498
487
  * @memberof ConditionalFormatHighlightRuleBuilder
499
488
  */
500
- setRank(config) {
501
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setRank(config);
489
+ setRank(e) {
490
+ return new i(this._initConfig).setRank(e);
502
491
  }
503
492
  /**
504
493
  *
@@ -508,16 +497,16 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
508
497
  * @param config.isShowValue
509
498
  * @memberof ConditionalFormatRuleBuilder
510
499
  */
511
- setIconSet(config) {
512
- return new ConditionalFormatIconSetRuleBuilder(this._initConfig).setIconSet(config);
500
+ setIconSet(e) {
501
+ return new y(this._initConfig).setIconSet(e);
513
502
  }
514
503
  /**
515
504
  * Set colorScale rule
516
505
  * @param {{ index: number; color: string; value: IValueConfig }[]} config
517
506
  * @memberof ConditionalFormatRuleBuilder
518
507
  */
519
- setColorScale(config) {
520
- return new ConditionalFormatColorScaleRuleBuilder(this._initConfig).setColorScale(config);
508
+ setColorScale(e) {
509
+ return new p(this._initConfig).setColorScale(e);
521
510
  }
522
511
  /**
523
512
  * Set dataBar rule
@@ -537,8 +526,8 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
537
526
  * @param config.isShowValue
538
527
  * @memberof ConditionalFormatRuleBuilder
539
528
  */
540
- setDataBar(config) {
541
- return new ConditionalFormatDataBarRuleBuilder(this._initConfig).setDataBar(config);
529
+ setDataBar(e) {
530
+ return new w(this._initConfig).setDataBar(e);
542
531
  }
543
532
  /**
544
533
  * Sets the background color
@@ -546,8 +535,8 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
546
535
  * @returns {*}
547
536
  * @memberof ConditionalFormatRuleBuilder
548
537
  */
549
- setBackground(color) {
550
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setBackground(color);
538
+ setBackground(e) {
539
+ return new i(this._initConfig).setBackground(e);
551
540
  }
552
541
  /**
553
542
  * Set Bold
@@ -555,8 +544,8 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
555
544
  * @returns {*}
556
545
  * @memberof ConditionalFormatRuleBuilder
557
546
  */
558
- setBold(isBold) {
559
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setBold(isBold);
547
+ setBold(e) {
548
+ return new i(this._initConfig).setBold(e);
560
549
  }
561
550
  /**
562
551
  * Sets the font color
@@ -564,8 +553,8 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
564
553
  * @returns {*}
565
554
  * @memberof ConditionalFormatRuleBuilder
566
555
  */
567
- setFontColor(color) {
568
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setFontColor(color);
556
+ setFontColor(e) {
557
+ return new i(this._initConfig).setFontColor(e);
569
558
  }
570
559
  /**
571
560
  * Set the text to italic
@@ -573,8 +562,8 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
573
562
  * @returns {*}
574
563
  * @memberof ConditionalFormatRuleBuilder
575
564
  */
576
- setItalic(isItalic) {
577
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setItalic(isItalic);
565
+ setItalic(e) {
566
+ return new i(this._initConfig).setItalic(e);
578
567
  }
579
568
  /**
580
569
  * Set the strikethrough
@@ -582,8 +571,8 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
582
571
  * @returns {*}
583
572
  * @memberof ConditionalFormatRuleBuilder
584
573
  */
585
- setStrikethrough(isStrikethrough) {
586
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setStrikethrough(isStrikethrough);
574
+ setStrikethrough(e) {
575
+ return new i(this._initConfig).setStrikethrough(e);
587
576
  }
588
577
  /**
589
578
  * Set the underscore
@@ -591,14 +580,14 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
591
580
  * @returns {*}
592
581
  * @memberof ConditionalFormatRuleBuilder
593
582
  */
594
- setUnderline(isUnderline) {
595
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).setUnderline(isUnderline);
583
+ setUnderline(e) {
584
+ return new i(this._initConfig).setUnderline(e);
596
585
  }
597
586
  /**
598
587
  * Sets the conditional formatting rule to fire when the cell is empty.
599
588
  */
600
589
  whenCellEmpty() {
601
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenCellEmpty();
590
+ return new i(this._initConfig).whenCellEmpty();
602
591
  }
603
592
  /**
604
593
  * Sets the conditional formatting rule to fire when the cell is not empty
@@ -606,7 +595,7 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
606
595
  * @memberof ConditionalFormatRuleBuilder
607
596
  */
608
597
  whenCellNotEmpty() {
609
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenCellNotEmpty();
598
+ return new i(this._initConfig).whenCellNotEmpty();
610
599
  }
611
600
  /**
612
601
  * Highlight when the date is in a time period, custom time is not supported.
@@ -614,16 +603,16 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
614
603
  * @returns {*}
615
604
  * @memberof ConditionalFormatRuleBuilder
616
605
  */
617
- whenDate(date) {
618
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenDate(date);
606
+ whenDate(e) {
607
+ return new i(this._initConfig).whenDate(e);
619
608
  }
620
609
  /**
621
610
  * Sets a conditional formatting rule to fire when a given formula evaluates to true.
622
611
  * @param {string} formulaString formulaString start with' = '
623
612
  * @memberof ConditionalFormatRuleBuilder
624
613
  */
625
- whenFormulaSatisfied(formulaString) {
626
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenFormulaSatisfied(formulaString);
614
+ whenFormulaSatisfied(e) {
615
+ return new i(this._initConfig).whenFormulaSatisfied(e);
627
616
  }
628
617
  /**
629
618
  * Sets the conditional formatting rule to fire when a number is between two specified values or equal to one of them.
@@ -631,48 +620,48 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
631
620
  * @param {number} end
632
621
  * @memberof ConditionalFormatRuleBuilder
633
622
  */
634
- whenNumberBetween(start, end) {
635
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenNumberBetween(start, end);
623
+ whenNumberBetween(e, t) {
624
+ return new i(this._initConfig).whenNumberBetween(e, t);
636
625
  }
637
626
  /**
638
627
  * Sets the conditional formatting rule to fire when the number equals the given value
639
628
  * @param {number} value
640
629
  * @memberof ConditionalFormatRuleBuilder
641
630
  */
642
- whenNumberEqualTo(value) {
643
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenNumberEqualTo(value);
631
+ whenNumberEqualTo(e) {
632
+ return new i(this._initConfig).whenNumberEqualTo(e);
644
633
  }
645
634
  /**
646
635
  * Sets the conditional formatting rule to fire when the number is greater than the given value
647
636
  * @param {number} value
648
637
  * @memberof ConditionalFormatRuleBuilder
649
638
  */
650
- whenNumberGreaterThan(value) {
651
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenNumberGreaterThan(value);
639
+ whenNumberGreaterThan(e) {
640
+ return new i(this._initConfig).whenNumberGreaterThan(e);
652
641
  }
653
642
  /**
654
643
  * Sets a conditional formatting rule to fire when a number is greater than or equal to a given value.
655
644
  * @param {number} value
656
645
  * @memberof ConditionalFormatRuleBuilder
657
646
  */
658
- whenNumberGreaterThanOrEqualTo(value) {
659
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenNumberGreaterThanOrEqualTo(value);
647
+ whenNumberGreaterThanOrEqualTo(e) {
648
+ return new i(this._initConfig).whenNumberGreaterThanOrEqualTo(e);
660
649
  }
661
650
  /**
662
651
  * Sets a conditional formatting rule to fire when the number is less than the given value.
663
652
  * @param {number} value
664
653
  * @memberof ConditionalFormatRuleBuilder
665
654
  */
666
- whenNumberLessThan(value) {
667
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenNumberLessThan(value);
655
+ whenNumberLessThan(e) {
656
+ return new i(this._initConfig).whenNumberLessThan(e);
668
657
  }
669
658
  /**
670
659
  * Sets the conditional formatting rule to fire when the value is less than or equal to the given value.
671
660
  * @param {number} value
672
661
  * @memberof ConditionalFormatRuleBuilder
673
662
  */
674
- whenNumberLessThanOrEqualTo(value) {
675
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenNumberLessThanOrEqualTo(value);
663
+ whenNumberLessThanOrEqualTo(e) {
664
+ return new i(this._initConfig).whenNumberLessThanOrEqualTo(e);
676
665
  }
677
666
  /**
678
667
  * Sets a conditional formatting rule to fire when a number is not between two specified values and is not equal to them.
@@ -680,167 +669,159 @@ const _FConditionalFormattingBuilder = class _FConditionalFormattingBuilder {
680
669
  * @param {number} end
681
670
  * @memberof ConditionalFormatRuleBuilder
682
671
  */
683
- whenNumberNotBetween(start, end) {
684
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenNumberNotBetween(start, end);
672
+ whenNumberNotBetween(e, t) {
673
+ return new i(this._initConfig).whenNumberNotBetween(e, t);
685
674
  }
686
675
  /**
687
676
  * Sets the conditional formatting rule to fire when a number does not equal a given value.
688
677
  * @param value
689
678
  * @memberof ConditionalFormatRuleBuilder
690
679
  */
691
- whenNumberNotEqualTo(value) {
692
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenNumberNotEqualTo(value);
680
+ whenNumberNotEqualTo(e) {
681
+ return new i(this._initConfig).whenNumberNotEqualTo(e);
693
682
  }
694
683
  /**
695
684
  * Sets the conditional formatting rule to fire when the input contains the given value.
696
685
  * @param {string} text
697
686
  * @memberof ConditionalFormatRuleBuilder
698
687
  */
699
- whenTextContains(text) {
700
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenTextContains(text);
688
+ whenTextContains(e) {
689
+ return new i(this._initConfig).whenTextContains(e);
701
690
  }
702
691
  /**
703
692
  * Sets a conditional formatting rule to fire when the input does not contain the given value.
704
693
  * @param {string} text
705
694
  * @memberof ConditionalFormatRuleBuilder
706
695
  */
707
- whenTextDoesNotContain(text) {
708
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenTextDoesNotContain(text);
696
+ whenTextDoesNotContain(e) {
697
+ return new i(this._initConfig).whenTextDoesNotContain(e);
709
698
  }
710
699
  /**
711
700
  * Sets a conditional formatting rule to fire when input ends with a specified value.
712
701
  * @param {string} text
713
702
  * @memberof ConditionalFormatRuleBuilder
714
703
  */
715
- whenTextEndsWith(text) {
716
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenTextEndsWith(text);
704
+ whenTextEndsWith(e) {
705
+ return new i(this._initConfig).whenTextEndsWith(e);
717
706
  }
718
707
  /**
719
708
  * Sets the conditional formatting rule to fire when the input equals the given value.
720
709
  * @param {string} text
721
710
  * @memberof ConditionalFormatRuleBuilder
722
711
  */
723
- whenTextEqualTo(text) {
724
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenTextEqualTo(text);
712
+ whenTextEqualTo(e) {
713
+ return new i(this._initConfig).whenTextEqualTo(e);
725
714
  }
726
715
  /**
727
716
  * Sets the conditional formatting rule to fire when the input value begins with the given value.
728
717
  * @param {string} text
729
718
  * @memberof ConditionalFormatRuleBuilder
730
719
  */
731
- whenTextStartsWith(text) {
732
- return new ConditionalFormatHighlightRuleBuilder(this._initConfig).whenTextStartsWith(text);
720
+ whenTextStartsWith(e) {
721
+ return new i(this._initConfig).whenTextStartsWith(e);
733
722
  }
734
- };
735
- __name(_FConditionalFormattingBuilder, "FConditionalFormattingBuilder");
736
- let FConditionalFormattingBuilder = _FConditionalFormattingBuilder;
737
- const _FRangeConditionalFormattingMixin = class _FRangeConditionalFormattingMixin extends FRange {
723
+ }
724
+ class A extends v {
738
725
  _getConditionalFormattingRuleModel() {
739
- return this._injector.get(ConditionalFormattingRuleModel);
726
+ return this._injector.get(x);
740
727
  }
741
728
  getConditionalFormattingRules() {
742
- return [...this._getConditionalFormattingRuleModel().getSubunitRules(this._workbook.getUnitId(), this._worksheet.getSheetId()) || []].filter((rule) => rule.ranges.some((range) => Rectangle.intersects(range, this._range)));
729
+ return [...this._getConditionalFormattingRuleModel().getSubunitRules(this._workbook.getUnitId(), this._worksheet.getSheetId()) || []].filter((t) => t.ranges.some((r) => U.intersects(r, this._range)));
743
730
  }
744
731
  createConditionalFormattingRule() {
745
- return new FConditionalFormattingBuilder({ ranges: [this._range] });
732
+ return new m({ ranges: [this._range] });
746
733
  }
747
- addConditionalFormattingRule(rule) {
748
- const params = {
749
- rule,
734
+ addConditionalFormattingRule(e) {
735
+ const t = {
736
+ rule: e,
750
737
  unitId: this._workbook.getUnitId(),
751
738
  subUnitId: this._worksheet.getSheetId()
752
739
  };
753
- return this._commandService.syncExecuteCommand(AddConditionalRuleMutation.id, params), this;
740
+ return this._commandService.syncExecuteCommand(S.id, t), this;
754
741
  }
755
- deleteConditionalFormattingRule(cfId) {
756
- const params = {
742
+ deleteConditionalFormattingRule(e) {
743
+ const t = {
757
744
  unitId: this._workbook.getUnitId(),
758
745
  subUnitId: this._worksheet.getSheetId(),
759
- cfId
746
+ cfId: e
760
747
  };
761
- return this._commandService.syncExecuteCommand(DeleteConditionalRuleMutation.id, params), this;
748
+ return this._commandService.syncExecuteCommand(I.id, t), this;
762
749
  }
763
- moveConditionalFormattingRule(cfId, toCfId, type = "after") {
764
- const params = {
750
+ moveConditionalFormattingRule(e, t, r = "after") {
751
+ const s = {
765
752
  unitId: this._workbook.getUnitId(),
766
753
  subUnitId: this._worksheet.getSheetId(),
767
- start: { id: cfId, type: "self" },
768
- end: { id: toCfId, type }
754
+ start: { id: e, type: "self" },
755
+ end: { id: t, type: r }
769
756
  };
770
- return this._commandService.syncExecuteCommand(MoveConditionalRuleMutation.id, params), this;
757
+ return this._commandService.syncExecuteCommand(E.id, s), this;
771
758
  }
772
- setConditionalFormattingRule(cfId, rule) {
773
- const params = {
759
+ setConditionalFormattingRule(e, t) {
760
+ const r = {
774
761
  unitId: this._workbook.getUnitId(),
775
762
  subUnitId: this._worksheet.getSheetId(),
776
- rule,
777
- cfId
763
+ rule: t,
764
+ cfId: e
778
765
  };
779
- return this._commandService.syncExecuteCommand(SetConditionalRuleMutation.id, params), this;
766
+ return this._commandService.syncExecuteCommand(k.id, r), this;
780
767
  }
781
- };
782
- __name(_FRangeConditionalFormattingMixin, "FRangeConditionalFormattingMixin");
783
- let FRangeConditionalFormattingMixin = _FRangeConditionalFormattingMixin;
784
- FRange.extend(FRangeConditionalFormattingMixin);
785
- const _FWorkbookConditionalFormattingMixin = class _FWorkbookConditionalFormattingMixin extends FWorkbook {
768
+ }
769
+ v.extend(A);
770
+ class D extends F {
786
771
  newColor() {
787
- return new ColorBuilder();
772
+ return new B();
788
773
  }
789
- };
790
- __name(_FWorkbookConditionalFormattingMixin, "FWorkbookConditionalFormattingMixin");
791
- let FWorkbookConditionalFormattingMixin = _FWorkbookConditionalFormattingMixin;
792
- FWorkbook.extend(FWorkbookConditionalFormattingMixin);
793
- const _FWorksheetConditionalFormattingMixin = class _FWorksheetConditionalFormattingMixin extends FWorksheet {
774
+ }
775
+ F.extend(D);
776
+ class V extends R {
794
777
  _getConditionalFormattingRuleModel() {
795
- return this._injector.get(ConditionalFormattingRuleModel);
778
+ return this._injector.get(x);
796
779
  }
797
780
  getConditionalFormattingRules() {
798
781
  return [...this._getConditionalFormattingRuleModel().getSubunitRules(this._workbook.getUnitId(), this._worksheet.getSheetId()) || []];
799
782
  }
800
783
  createConditionalFormattingRule() {
801
- return new FConditionalFormattingBuilder();
784
+ return new m();
802
785
  }
803
786
  newConditionalFormattingRule() {
804
- return new FConditionalFormattingBuilder();
787
+ return new m();
805
788
  }
806
- addConditionalFormattingRule(rule) {
807
- const params = {
808
- rule,
789
+ addConditionalFormattingRule(e) {
790
+ const t = {
791
+ rule: e,
809
792
  unitId: this._workbook.getUnitId(),
810
793
  subUnitId: this._worksheet.getSheetId()
811
794
  };
812
- return this._commandService.syncExecuteCommand(AddConditionalRuleMutation.id, params), this;
795
+ return this._commandService.syncExecuteCommand(S.id, t), this;
813
796
  }
814
- deleteConditionalFormattingRule(cfId) {
815
- const params = {
797
+ deleteConditionalFormattingRule(e) {
798
+ const t = {
816
799
  unitId: this._workbook.getUnitId(),
817
800
  subUnitId: this._worksheet.getSheetId(),
818
- cfId
801
+ cfId: e
819
802
  };
820
- return this._commandService.syncExecuteCommand(DeleteConditionalRuleMutation.id, params), this;
803
+ return this._commandService.syncExecuteCommand(I.id, t), this;
821
804
  }
822
- moveConditionalFormattingRule(cfId, toCfId, type = "after") {
823
- const params = {
805
+ moveConditionalFormattingRule(e, t, r = "after") {
806
+ const s = {
824
807
  unitId: this._workbook.getUnitId(),
825
808
  subUnitId: this._worksheet.getSheetId(),
826
- start: { id: cfId, type: "self" },
827
- end: { id: toCfId, type }
809
+ start: { id: e, type: "self" },
810
+ end: { id: t, type: r }
828
811
  };
829
- return this._commandService.syncExecuteCommand(MoveConditionalRuleMutation.id, params), this;
812
+ return this._commandService.syncExecuteCommand(E.id, s), this;
830
813
  }
831
- setConditionalFormattingRule(cfId, rule) {
832
- const params = {
814
+ setConditionalFormattingRule(e, t) {
815
+ const r = {
833
816
  unitId: this._workbook.getUnitId(),
834
817
  subUnitId: this._worksheet.getSheetId(),
835
- rule,
836
- cfId
818
+ rule: t,
819
+ cfId: e
837
820
  };
838
- return this._commandService.syncExecuteCommand(SetConditionalRuleMutation.id, params), this;
821
+ return this._commandService.syncExecuteCommand(k.id, r), this;
839
822
  }
840
- };
841
- __name(_FWorksheetConditionalFormattingMixin, "FWorksheetConditionalFormattingMixin");
842
- let FWorksheetConditionalFormattingMixin = _FWorksheetConditionalFormattingMixin;
843
- FWorksheet.extend(FWorksheetConditionalFormattingMixin);
823
+ }
824
+ R.extend(V);
844
825
  export {
845
- FConditionalFormattingBuilder
826
+ m as FConditionalFormattingBuilder
846
827
  };