@univerjs/sheets-conditional-formatting-ui 0.10.12 → 0.10.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1585 -1295
- package/lib/index.js +1585 -1295
- package/lib/types/components/color-picker/index.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/package.json +12 -12
package/lib/index.js
CHANGED
|
@@ -1,412 +1,702 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { CommandType as
|
|
5
|
-
import { getSheetCommandTarget as
|
|
6
|
-
import { ConditionalFormattingRuleModel as Q, CFSubRuleType as F, CFRuleType as L, AddConditionalRuleMutation as
|
|
7
|
-
import { useDependency as q, useSidebarClick as
|
|
8
|
-
import { jsx as c, jsxs as k, Fragment as
|
|
9
|
-
import {
|
|
10
|
-
import { Dropdown as
|
|
11
|
-
import { serializeRange as
|
|
12
|
-
import { FormulaEditor as
|
|
13
|
-
import { useHighlightRange as
|
|
14
|
-
import { Observable as
|
|
15
|
-
import { IRenderManagerService as
|
|
16
|
-
import { bufferTime as
|
|
17
|
-
const
|
|
18
|
-
type:
|
|
1
|
+
var ar = Object.defineProperty;
|
|
2
|
+
var lr = (t, e, n) => e in t ? ar(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var Ie = (t, e, n) => lr(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { CommandType as ge, ICommandService as te, IUniverInstanceService as Z, ColorKit as gn, BooleanNumber as se, LocaleService as re, UniverInstanceType as A, Tools as jt, get as cr, set as ur, createInterceptorKey as mn, InterceptorManager as dr, Inject as P, Disposable as le, Injector as me, Rectangle as Ce, generateRandomId as hr, ObjectMatrix as Ne, Range as ye, toDisposable as fn, InterceptorEffectEnum as vr, DependentOn as pn, IConfigService as Cn, Plugin as yn, merge as bn, registerDependencies as gr, touchDependencies as Vt } from "@univerjs/core";
|
|
5
|
+
import { getSheetCommandTarget as be, SheetsSelectionsService as je, RemoveSheetMutation as mr, SetWorksheetActiveOperation as Bt, setEndForRange as fr, SetSelectionsOperation as pr, checkRangesEditablePermission as gt, SheetInterceptorService as Wt, ClearSelectionFormatCommand as Cr, ClearSelectionAllCommand as yr, RangeMergeUtil as br, rangeToDiscreteRange as Ir, findAllRectangle as mt, createTopMatrixFromMatrix as ft, SheetPermissionCheckController as Sr, WorksheetEditPermission as In, WorksheetSetCellStylePermission as Sn, RangeProtectionPermissionEditPoint as _n, WorkbookEditablePermission as wn, RefRangeService as _r, handleDefaultRangeChangeWithEffectRefCommands as wr, INTERCEPTOR_POINT as Rr, AFTER_CELL_EDIT as Tr } from "@univerjs/sheets";
|
|
6
|
+
import { ConditionalFormattingRuleModel as Q, CFSubRuleType as F, CFRuleType as L, AddConditionalRuleMutation as oe, CFNumberOperator as U, getColorScaleFromValue as xr, iconMap as Me, DEFAULT_BG_COLOR as Er, DEFAULT_FONT_COLOR as Nr, defaultDataBarPositiveColor as Ye, defaultDataBarNativeColor as Ke, CFValueType as $, createDefaultValueByValueType as Xe, removeUndefinedAttr as Mr, createDefaultValue as pt, CFTextOperator as H, CFTimePeriodOperator as he, iconGroup as Vr, getOppositeOperator as At, compareWithNumber as kr, EMPTY_ICON_TYPE as Fr, SetCfCommand as Lr, AddCfCommand as Rn, SetConditionalRuleMutation as Se, DeleteConditionalRuleMutation as _e, MoveConditionalRuleMutation as Tn, ClearWorksheetCfCommand as xn, DeleteCfCommand as zt, MoveCfCommand as Ur, ClearRangeCfCommand as Pr, createDefaultRule as Te, setConditionalRuleMutationUndoFactory as De, DeleteConditionalRuleMutationUndoFactory as Ae, ConditionalFormattingViewModel as rt, SHEET_CONDITIONAL_FORMATTING_PLUGIN as it, AddConditionalRuleMutationUndoFactory as En, isRangesEqual as Or, ConditionalFormattingService as Nn, DEFAULT_PADDING as $r, DEFAULT_WIDTH as Dr, UniverSheetsConditionalFormattingPlugin as Mn, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as Ar } from "@univerjs/sheets-conditional-formatting";
|
|
7
|
+
import { useDependency as q, useSidebarClick as Et, ILayoutService as Hr, useScrollYOverContainer as jr, ISidebarService as Vn, useObservable as Br, ComponentManager as Wr, getMenuHiddenObservable as qr, MenuItemType as Gr, RibbonDataGroup as Zr, IMenuManagerService as zr } from "@univerjs/ui";
|
|
8
|
+
import { jsx as c, jsxs as k, Fragment as Ht } from "react/jsx-runtime";
|
|
9
|
+
import { useRef as ve, createElement as ce, forwardRef as ue, useMemo as J, useState as N, useEffect as X } from "react";
|
|
10
|
+
import { Dropdown as qt, clsx as Y, ColorPicker as Yr, borderClassName as Fe, Select as ae, InputNumber as Ve, RadioGroup as Kr, Radio as Yt, Checkbox as Ct, Input as Xr, Button as Kt, Tooltip as Xt, ReactGridLayout as Jr } from "@univerjs/design";
|
|
11
|
+
import { serializeRange as kn, deserializeRangeWithSheet as Qr } from "@univerjs/engine-formula";
|
|
12
|
+
import { FormulaEditor as Nt, RangeSelector as ei } from "@univerjs/sheets-formula-ui";
|
|
13
|
+
import { useHighlightRange as ti, ISheetClipboardService as ni, COPY_TYPE as Jt, PREDEFINED_HOOK_NAME as kt, virtualizeDiscreteRanges as Fn, getRepeatRange as ri, SheetSkeletonManagerService as Ln, IAutoFillService as ii, APPLY_TYPE as Ft, getAutoFillRepeatRange as oi, getCurrentRangeDisable$ as si, IFormatPainterService as ai, FormatPainterStatus as Lt } from "@univerjs/sheets-ui";
|
|
14
|
+
import { Observable as Ee, debounceTime as Qt, merge as Un } from "rxjs";
|
|
15
|
+
import { IRenderManagerService as Pn } from "@univerjs/engine-render";
|
|
16
|
+
import { bufferTime as li, filter as en, debounceTime as tn } from "rxjs/operators";
|
|
17
|
+
const On = {
|
|
18
|
+
type: ge.COMMAND,
|
|
19
19
|
id: "sheet.command.add-average-conditional-rule",
|
|
20
20
|
handler(t, e) {
|
|
21
21
|
if (!e)
|
|
22
22
|
return !1;
|
|
23
|
-
const { ranges:
|
|
23
|
+
const { ranges: n, style: r, stopIfTrue: i, operator: o } = e, s = t.get(Q), d = t.get(te), a = t.get(Z), h = be(a);
|
|
24
24
|
if (!h) return !1;
|
|
25
|
-
const { unitId: l, subUnitId:
|
|
26
|
-
ranges:
|
|
25
|
+
const { unitId: l, subUnitId: u } = h, v = s.createCfId(l, u), p = {
|
|
26
|
+
ranges: n,
|
|
27
27
|
cfId: v,
|
|
28
28
|
stopIfTrue: !!i,
|
|
29
29
|
rule: {
|
|
30
30
|
type: L.highlightCell,
|
|
31
31
|
subType: F.average,
|
|
32
|
-
operator:
|
|
33
|
-
style:
|
|
32
|
+
operator: o,
|
|
33
|
+
style: r
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
return
|
|
36
|
+
return d.executeCommand(oe.id, { unitId: l, subUnitId: u, rule: p });
|
|
37
37
|
}
|
|
38
38
|
}, $n = {
|
|
39
|
-
type:
|
|
39
|
+
type: ge.COMMAND,
|
|
40
40
|
id: "sheet.command.add-color-scale-conditional-rule",
|
|
41
41
|
handler(t, e) {
|
|
42
42
|
if (!e)
|
|
43
43
|
return !1;
|
|
44
|
-
const { ranges:
|
|
44
|
+
const { ranges: n, config: r, stopIfTrue: i } = e, o = t.get(Q), s = t.get(te), d = t.get(Z), a = be(d);
|
|
45
45
|
if (!a) return !1;
|
|
46
|
-
const { unitId: h, subUnitId: l } = a,
|
|
47
|
-
ranges:
|
|
48
|
-
cfId:
|
|
46
|
+
const { unitId: h, subUnitId: l } = a, u = o.createCfId(h, l), v = {
|
|
47
|
+
ranges: n,
|
|
48
|
+
cfId: u,
|
|
49
49
|
stopIfTrue: !!i,
|
|
50
50
|
rule: {
|
|
51
51
|
type: L.colorScale,
|
|
52
|
-
config:
|
|
52
|
+
config: r
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
return
|
|
55
|
+
return s.executeCommand(oe.id, { unitId: h, subUnitId: l, rule: v });
|
|
56
56
|
}
|
|
57
|
-
},
|
|
58
|
-
type:
|
|
57
|
+
}, Dn = {
|
|
58
|
+
type: ge.COMMAND,
|
|
59
59
|
id: "sheet.command.add-data-bar-conditional-rule",
|
|
60
60
|
handler(t, e) {
|
|
61
61
|
if (!e)
|
|
62
62
|
return !1;
|
|
63
|
-
const { ranges:
|
|
63
|
+
const { ranges: n, min: r, max: i, nativeColor: o, positiveColor: s, isGradient: d, stopIfTrue: a, isShowValue: h } = e, l = t.get(Q), u = t.get(Z), v = be(u);
|
|
64
64
|
if (!v) return !1;
|
|
65
65
|
const { unitId: p, subUnitId: y } = v, f = t.get(te), w = l.createCfId(p, y), I = {
|
|
66
|
-
ranges:
|
|
66
|
+
ranges: n,
|
|
67
67
|
cfId: w,
|
|
68
68
|
stopIfTrue: !!a,
|
|
69
69
|
rule: {
|
|
70
70
|
type: L.dataBar,
|
|
71
71
|
isShowValue: h,
|
|
72
72
|
config: {
|
|
73
|
-
min:
|
|
73
|
+
min: r,
|
|
74
74
|
max: i,
|
|
75
|
-
nativeColor:
|
|
76
|
-
positiveColor:
|
|
77
|
-
isGradient:
|
|
75
|
+
nativeColor: o,
|
|
76
|
+
positiveColor: s,
|
|
77
|
+
isGradient: d
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
return f.executeCommand(
|
|
81
|
+
return f.executeCommand(oe.id, { unitId: p, subUnitId: y, rule: I });
|
|
82
82
|
}
|
|
83
|
-
},
|
|
84
|
-
type:
|
|
83
|
+
}, An = {
|
|
84
|
+
type: ge.COMMAND,
|
|
85
85
|
id: "sheet.command.add-duplicate-values-conditional-rule",
|
|
86
86
|
handler(t, e) {
|
|
87
87
|
if (!e)
|
|
88
88
|
return !1;
|
|
89
|
-
const { ranges:
|
|
89
|
+
const { ranges: n, style: r, stopIfTrue: i } = e, o = t.get(Q), s = t.get(te), d = t.get(Z), a = be(d);
|
|
90
90
|
if (!a) return !1;
|
|
91
|
-
const { unitId: h, subUnitId: l } = a,
|
|
92
|
-
ranges:
|
|
93
|
-
cfId:
|
|
91
|
+
const { unitId: h, subUnitId: l } = a, u = o.createCfId(h, l), v = {
|
|
92
|
+
ranges: n,
|
|
93
|
+
cfId: u,
|
|
94
94
|
stopIfTrue: !!i,
|
|
95
95
|
rule: {
|
|
96
96
|
type: L.highlightCell,
|
|
97
97
|
subType: F.duplicateValues,
|
|
98
|
-
style:
|
|
98
|
+
style: r
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
|
-
return
|
|
101
|
+
return s.executeCommand(oe.id, { unitId: h, subUnitId: l, rule: v });
|
|
102
102
|
}
|
|
103
|
-
},
|
|
104
|
-
type:
|
|
103
|
+
}, Hn = {
|
|
104
|
+
type: ge.COMMAND,
|
|
105
105
|
id: "sheet.command.add-number-conditional-rule",
|
|
106
106
|
handler(t, e) {
|
|
107
107
|
if (!e)
|
|
108
108
|
return !1;
|
|
109
|
-
const { ranges:
|
|
109
|
+
const { ranges: n, style: r, stopIfTrue: i, operator: o, value: s } = e, d = t.get(Q), a = t.get(te), h = t.get(Z), l = be(h);
|
|
110
110
|
if (!l) return !1;
|
|
111
|
-
const { unitId:
|
|
111
|
+
const { unitId: u, subUnitId: v } = l, p = d.createCfId(u, v);
|
|
112
112
|
let y;
|
|
113
|
-
if ([U.between, U.notBetween].includes(
|
|
114
|
-
const f =
|
|
113
|
+
if ([U.between, U.notBetween].includes(o)) {
|
|
114
|
+
const f = s;
|
|
115
115
|
if (f.length !== 2 || !Array.isArray(f))
|
|
116
116
|
return !1;
|
|
117
117
|
y = {
|
|
118
|
-
ranges:
|
|
118
|
+
ranges: n,
|
|
119
119
|
cfId: p,
|
|
120
120
|
stopIfTrue: !!i,
|
|
121
121
|
rule: {
|
|
122
122
|
type: L.highlightCell,
|
|
123
123
|
subType: F.number,
|
|
124
|
-
operator:
|
|
125
|
-
style:
|
|
124
|
+
operator: o,
|
|
125
|
+
style: r,
|
|
126
126
|
value: f
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
} else {
|
|
130
|
-
const f =
|
|
130
|
+
const f = s;
|
|
131
131
|
if (typeof f != "number")
|
|
132
132
|
return !1;
|
|
133
133
|
y = {
|
|
134
|
-
ranges:
|
|
134
|
+
ranges: n,
|
|
135
135
|
cfId: p,
|
|
136
136
|
stopIfTrue: !!i,
|
|
137
137
|
rule: {
|
|
138
138
|
type: L.highlightCell,
|
|
139
139
|
subType: F.number,
|
|
140
|
-
operator:
|
|
141
|
-
style:
|
|
140
|
+
operator: o,
|
|
141
|
+
style: r,
|
|
142
142
|
value: f
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
return a.executeCommand(
|
|
146
|
+
return a.executeCommand(oe.id, { unitId: u, subUnitId: v, rule: y });
|
|
147
147
|
}
|
|
148
|
-
},
|
|
149
|
-
type:
|
|
148
|
+
}, jn = {
|
|
149
|
+
type: ge.COMMAND,
|
|
150
150
|
id: "sheet.command.add-rank-conditional-rule",
|
|
151
151
|
handler(t, e) {
|
|
152
152
|
if (!e)
|
|
153
153
|
return !1;
|
|
154
|
-
const { ranges:
|
|
155
|
-
if (!
|
|
156
|
-
const { unitId: v, subUnitId: p } =
|
|
157
|
-
ranges:
|
|
154
|
+
const { ranges: n, style: r, stopIfTrue: i, isPercent: o, isBottom: s, value: d } = e, a = t.get(Q), h = t.get(Z), l = t.get(te), u = be(h);
|
|
155
|
+
if (!u) return !1;
|
|
156
|
+
const { unitId: v, subUnitId: p } = u, y = a.createCfId(v, p), f = {
|
|
157
|
+
ranges: n,
|
|
158
158
|
cfId: y,
|
|
159
159
|
stopIfTrue: !!i,
|
|
160
160
|
rule: {
|
|
161
161
|
type: L.highlightCell,
|
|
162
162
|
subType: F.rank,
|
|
163
|
-
isPercent:
|
|
164
|
-
isBottom:
|
|
165
|
-
style:
|
|
166
|
-
value:
|
|
163
|
+
isPercent: o,
|
|
164
|
+
isBottom: s,
|
|
165
|
+
style: r,
|
|
166
|
+
value: d
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
|
-
return l.executeCommand(
|
|
169
|
+
return l.executeCommand(oe.id, { unitId: v, subUnitId: p, rule: f });
|
|
170
170
|
}
|
|
171
|
-
},
|
|
172
|
-
type:
|
|
171
|
+
}, Bn = {
|
|
172
|
+
type: ge.COMMAND,
|
|
173
173
|
id: "sheet.command.add-text-conditional-rule",
|
|
174
174
|
handler(t, e) {
|
|
175
175
|
if (!e)
|
|
176
176
|
return !1;
|
|
177
|
-
const { ranges:
|
|
177
|
+
const { ranges: n, style: r, stopIfTrue: i, operator: o, value: s } = e, d = t.get(Q), a = t.get(Z), h = be(a);
|
|
178
178
|
if (!h) return !1;
|
|
179
|
-
const { unitId: l, subUnitId:
|
|
180
|
-
ranges:
|
|
179
|
+
const { unitId: l, subUnitId: u } = h, v = t.get(te), p = d.createCfId(l, u), y = {
|
|
180
|
+
ranges: n,
|
|
181
181
|
cfId: p,
|
|
182
182
|
stopIfTrue: !!i,
|
|
183
183
|
rule: {
|
|
184
184
|
type: L.highlightCell,
|
|
185
185
|
subType: F.text,
|
|
186
|
-
operator:
|
|
187
|
-
style:
|
|
188
|
-
value:
|
|
186
|
+
operator: o,
|
|
187
|
+
style: r,
|
|
188
|
+
value: s
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
|
-
return v.executeCommand(
|
|
191
|
+
return v.executeCommand(oe.id, { unitId: l, subUnitId: u, rule: y });
|
|
192
192
|
}
|
|
193
|
-
},
|
|
194
|
-
type:
|
|
193
|
+
}, Wn = {
|
|
194
|
+
type: ge.COMMAND,
|
|
195
195
|
id: "sheet.command.add-time-period-conditional-rule",
|
|
196
196
|
handler(t, e) {
|
|
197
197
|
if (!e)
|
|
198
198
|
return !1;
|
|
199
|
-
const { ranges:
|
|
199
|
+
const { ranges: n, style: r, stopIfTrue: i, operator: o } = e, s = t.get(Q), d = t.get(Z), a = t.get(te), h = be(d);
|
|
200
200
|
if (!h) return !1;
|
|
201
|
-
const { unitId: l, subUnitId:
|
|
202
|
-
ranges:
|
|
201
|
+
const { unitId: l, subUnitId: u } = h, v = s.createCfId(l, u), p = {
|
|
202
|
+
ranges: n,
|
|
203
203
|
cfId: v,
|
|
204
204
|
stopIfTrue: !!i,
|
|
205
205
|
rule: {
|
|
206
206
|
type: L.highlightCell,
|
|
207
207
|
subType: F.timePeriod,
|
|
208
|
-
operator:
|
|
209
|
-
style:
|
|
208
|
+
operator: o,
|
|
209
|
+
style: r
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
|
-
return a.executeCommand(
|
|
212
|
+
return a.executeCommand(oe.id, { unitId: l, subUnitId: u, rule: p });
|
|
213
213
|
}
|
|
214
|
-
},
|
|
215
|
-
type:
|
|
214
|
+
}, qn = {
|
|
215
|
+
type: ge.COMMAND,
|
|
216
216
|
id: "sheet.command.add-uniqueValues-conditional-rule",
|
|
217
217
|
handler(t, e) {
|
|
218
218
|
if (!e)
|
|
219
219
|
return !1;
|
|
220
|
-
const { ranges:
|
|
220
|
+
const { ranges: n, style: r, stopIfTrue: i } = e, o = t.get(Q), s = t.get(Z), d = t.get(te), a = be(s);
|
|
221
221
|
if (!a) return !1;
|
|
222
|
-
const { unitId: h, subUnitId: l } = a,
|
|
223
|
-
ranges:
|
|
224
|
-
cfId:
|
|
222
|
+
const { unitId: h, subUnitId: l } = a, u = o.createCfId(h, l), v = {
|
|
223
|
+
ranges: n,
|
|
224
|
+
cfId: u,
|
|
225
225
|
stopIfTrue: !!i,
|
|
226
226
|
rule: {
|
|
227
227
|
type: L.highlightCell,
|
|
228
228
|
subType: F.uniqueValues,
|
|
229
|
-
style:
|
|
229
|
+
style: r
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
return
|
|
232
|
+
return d.executeCommand(oe.id, { unitId: h, subUnitId: l, rule: v });
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
return Zn(r, "".concat(n), { defIds: r.defIds, idSuffix: a.current }, ae({ ref: e, className: u }, o), s);
|
|
253
|
-
});
|
|
254
|
-
function Zn(t, e, r, n, i) {
|
|
255
|
-
return de(t.tag, ae(ae({ key: e }, di(t, r, i)), n), (hi(t, r).children || []).map(function(s, o) {
|
|
256
|
-
return Zn(s, "".concat(e, "-").concat(t.tag, "-").concat(o), r, void 0, i);
|
|
257
|
-
}));
|
|
235
|
+
function de({ ref: t, ...e }) {
|
|
236
|
+
const { icon: n, id: r, className: i, extend: o, ...s } = e, d = `univerjs-icon univerjs-icon-${r} ${i || ""}`.trim(), a = ve(`_${di()}`);
|
|
237
|
+
return Gn(n, `${r}`, {
|
|
238
|
+
defIds: n.defIds,
|
|
239
|
+
idSuffix: a.current
|
|
240
|
+
}, {
|
|
241
|
+
ref: t,
|
|
242
|
+
className: d,
|
|
243
|
+
...s
|
|
244
|
+
}, o);
|
|
245
|
+
}
|
|
246
|
+
function Gn(t, e, n, r, i) {
|
|
247
|
+
return ce(t.tag, {
|
|
248
|
+
key: e,
|
|
249
|
+
...ci(t, n, i),
|
|
250
|
+
...r
|
|
251
|
+
}, (ui(t, n).children || []).map((o, s) => Gn(o, `${e}-${t.tag}-${s}`, n, void 0, i)));
|
|
258
252
|
}
|
|
259
|
-
function
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
o === "mask" && typeof u == "string" && (n[o] = u.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
253
|
+
function ci(t, e, n) {
|
|
254
|
+
const r = { ...t.attrs };
|
|
255
|
+
n != null && n.colorChannel1 && r.fill === "colorChannel1" && (r.fill = n.colorChannel1), t.tag === "mask" && r.id && (r.id = r.id + e.idSuffix), Object.entries(r).forEach(([o, s]) => {
|
|
256
|
+
o === "mask" && typeof s == "string" && (r[o] = s.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
|
|
264
257
|
});
|
|
265
|
-
|
|
266
|
-
return !i || i.length === 0 || (t.tag === "use" &&
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
})), n;
|
|
258
|
+
const { defIds: i } = e;
|
|
259
|
+
return !i || i.length === 0 || (t.tag === "use" && r["xlink:href"] && (r["xlink:href"] = r["xlink:href"] + e.idSuffix), Object.entries(r).forEach(([o, s]) => {
|
|
260
|
+
typeof s == "string" && (r[o] = s.replace(/url\(#(.*)\)/, `url(#$1${e.idSuffix})`));
|
|
261
|
+
})), r;
|
|
270
262
|
}
|
|
271
|
-
function
|
|
272
|
-
var r
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
263
|
+
function ui(t, e) {
|
|
264
|
+
var r;
|
|
265
|
+
const { defIds: n } = e;
|
|
266
|
+
return !n || n.length === 0 ? t : t.tag === "defs" && ((r = t.children) != null && r.length) ? {
|
|
267
|
+
...t,
|
|
268
|
+
children: t.children.map((i) => typeof i.attrs.id == "string" && n && n.includes(i.attrs.id) ? {
|
|
269
|
+
...i,
|
|
270
|
+
attrs: {
|
|
271
|
+
...i.attrs,
|
|
272
|
+
id: i.attrs.id + e.idSuffix
|
|
273
|
+
}
|
|
274
|
+
} : i)
|
|
275
|
+
} : t;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function di() {
|
|
278
278
|
return Math.random().toString(36).substring(2, 8);
|
|
279
279
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
de.displayName = "UniverIcon";
|
|
281
|
+
const hi = {
|
|
282
|
+
tag: "svg",
|
|
283
|
+
attrs: {
|
|
284
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
285
|
+
fill: "none",
|
|
286
|
+
viewBox: "0 0 16 16",
|
|
287
|
+
width: "1em",
|
|
288
|
+
height: "1em"
|
|
289
|
+
},
|
|
290
|
+
children: [{
|
|
291
|
+
tag: "path",
|
|
292
|
+
attrs: {
|
|
293
|
+
fill: "currentColor",
|
|
294
|
+
d: "M4.65791 1.30005C3.77355 1.30005 3.05664 2.01696 3.05664 2.90132V12.8588C3.05664 13.8755 3.88086 14.6998 4.89759 14.6998H9.1016C11.2233 14.6998 12.9433 12.9798 12.9433 10.8581C12.9433 9.13925 11.8145 7.68407 10.2578 7.1934C10.8806 6.56856 11.2655 5.70659 11.2655 4.75472C11.2655 2.84676 9.71883 1.30005 7.81087 1.30005H4.65791ZM4.25664 2.90132C4.25664 2.6797 4.4363 2.50005 4.65791 2.50005H7.81087C9.05609 2.50005 10.0655 3.5095 10.0655 4.75472C10.0655 5.99993 9.05609 7.00938 7.81087 7.00938H4.25664V2.90132ZM4.25664 12.8588V8.21636H9.1016C10.5606 8.21636 11.7433 9.39909 11.7433 10.8581C11.7433 12.317 10.5606 13.4998 9.1016 13.4998H4.89759C4.5436 13.4998 4.25664 13.2128 4.25664 12.8588Z",
|
|
295
|
+
fillRule: "evenodd",
|
|
296
|
+
clipRule: "evenodd"
|
|
297
|
+
}
|
|
298
|
+
}]
|
|
299
|
+
}, Zn = ue(function(e, n) {
|
|
300
|
+
return ce(de, Object.assign({}, e, {
|
|
283
301
|
id: "bold-icon",
|
|
284
|
-
ref:
|
|
285
|
-
icon:
|
|
302
|
+
ref: n,
|
|
303
|
+
icon: hi
|
|
286
304
|
}));
|
|
287
305
|
});
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
306
|
+
Zn.displayName = "BoldIcon";
|
|
307
|
+
const vi = {
|
|
308
|
+
tag: "svg",
|
|
309
|
+
attrs: {
|
|
310
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
311
|
+
fill: "none",
|
|
312
|
+
viewBox: "0 0 16 16",
|
|
313
|
+
width: "1em",
|
|
314
|
+
height: "1em"
|
|
315
|
+
},
|
|
316
|
+
children: [
|
|
317
|
+
{
|
|
318
|
+
tag: "path",
|
|
319
|
+
attrs: {
|
|
320
|
+
fill: "currentColor",
|
|
321
|
+
d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
tag: "path",
|
|
326
|
+
attrs: {
|
|
327
|
+
fill: "currentColor",
|
|
328
|
+
d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
tag: "path",
|
|
333
|
+
attrs: {
|
|
334
|
+
fill: "currentColor",
|
|
335
|
+
d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
tag: "path",
|
|
340
|
+
attrs: {
|
|
341
|
+
fill: "currentColor",
|
|
342
|
+
d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",
|
|
343
|
+
fillRule: "evenodd",
|
|
344
|
+
clipRule: "evenodd"
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
}, vt = ue(function(e, n) {
|
|
349
|
+
return ce(de, Object.assign({}, e, {
|
|
291
350
|
id: "delete-icon",
|
|
292
|
-
ref:
|
|
351
|
+
ref: n,
|
|
352
|
+
icon: vi
|
|
353
|
+
}));
|
|
354
|
+
});
|
|
355
|
+
vt.displayName = "DeleteIcon";
|
|
356
|
+
const gi = {
|
|
357
|
+
tag: "svg",
|
|
358
|
+
attrs: {
|
|
359
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
360
|
+
fill: "none",
|
|
361
|
+
viewBox: "0 0 16 16",
|
|
362
|
+
width: "1em",
|
|
363
|
+
height: "1em"
|
|
364
|
+
},
|
|
365
|
+
children: [{
|
|
366
|
+
tag: "path",
|
|
367
|
+
attrs: {
|
|
368
|
+
fill: "currentColor",
|
|
369
|
+
d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"
|
|
370
|
+
}
|
|
371
|
+
}]
|
|
372
|
+
}, zn = ue(function(e, n) {
|
|
373
|
+
return ce(de, Object.assign({}, e, {
|
|
374
|
+
id: "increase-icon",
|
|
375
|
+
ref: n,
|
|
376
|
+
icon: gi
|
|
377
|
+
}));
|
|
378
|
+
});
|
|
379
|
+
zn.displayName = "IncreaseIcon";
|
|
380
|
+
const mi = {
|
|
381
|
+
tag: "svg",
|
|
382
|
+
attrs: {
|
|
383
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
384
|
+
fill: "none",
|
|
385
|
+
viewBox: "0 0 16 16",
|
|
386
|
+
width: "1em",
|
|
387
|
+
height: "1em"
|
|
388
|
+
},
|
|
389
|
+
children: [{
|
|
390
|
+
tag: "path",
|
|
391
|
+
attrs: {
|
|
392
|
+
fill: "currentColor",
|
|
393
|
+
d: "M9.80385 1.40005H11.9997C12.3311 1.40005 12.5997 1.66868 12.5997 2.00005C12.5997 2.33143 12.3311 2.60005 11.9997 2.60005H10.1185L7.12251 13.4001H9.33324C9.66461 13.4001 9.93324 13.6687 9.93324 14.0001C9.93324 14.3314 9.66461 14.6001 9.33324 14.6001H6.34785C6.33847 14.6003 6.32905 14.6003 6.31962 14.6001H3.9999C3.66853 14.6001 3.3999 14.3314 3.3999 14.0001C3.3999 13.6687 3.66853 13.4001 3.9999 13.4001H5.87719L8.87322 2.60005H6.66641C6.33504 2.60005 6.06641 2.33143 6.06641 2.00005C6.06641 1.66868 6.33504 1.40005 6.66641 1.40005H9.52916C9.61698 1.37929 9.71064 1.3781 9.80385 1.40005Z"
|
|
394
|
+
}
|
|
395
|
+
}]
|
|
396
|
+
}, Yn = ue(function(e, n) {
|
|
397
|
+
return ce(de, Object.assign({}, e, {
|
|
398
|
+
id: "italic-icon",
|
|
399
|
+
ref: n,
|
|
293
400
|
icon: mi
|
|
294
401
|
}));
|
|
295
402
|
});
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
403
|
+
Yn.displayName = "ItalicIcon";
|
|
404
|
+
const fi = {
|
|
405
|
+
tag: "svg",
|
|
406
|
+
attrs: {
|
|
407
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
408
|
+
fill: "none",
|
|
409
|
+
viewBox: "0 0 16 16",
|
|
410
|
+
width: "1em",
|
|
411
|
+
height: "1em"
|
|
412
|
+
},
|
|
413
|
+
children: [{
|
|
414
|
+
tag: "path",
|
|
415
|
+
attrs: {
|
|
416
|
+
fill: "currentColor",
|
|
417
|
+
d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",
|
|
418
|
+
fillRule: "evenodd",
|
|
419
|
+
clipRule: "evenodd"
|
|
420
|
+
}
|
|
421
|
+
}]
|
|
422
|
+
}, Gt = ue(function(e, n) {
|
|
423
|
+
return ce(de, Object.assign({}, e, {
|
|
424
|
+
id: "more-down-icon",
|
|
425
|
+
ref: n,
|
|
301
426
|
icon: fi
|
|
302
427
|
}));
|
|
303
428
|
});
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
429
|
+
Gt.displayName = "MoreDownIcon";
|
|
430
|
+
const pi = {
|
|
431
|
+
tag: "svg",
|
|
432
|
+
attrs: {
|
|
433
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
434
|
+
fill: "none",
|
|
435
|
+
viewBox: "0 0 16 16",
|
|
436
|
+
width: "1em",
|
|
437
|
+
height: "1em"
|
|
438
|
+
},
|
|
439
|
+
children: [
|
|
440
|
+
{
|
|
441
|
+
tag: "path",
|
|
442
|
+
attrs: {
|
|
443
|
+
fill: "currentColor",
|
|
444
|
+
d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
tag: "path",
|
|
449
|
+
attrs: {
|
|
450
|
+
fill: "currentColor",
|
|
451
|
+
d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z"
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
tag: "path",
|
|
456
|
+
attrs: {
|
|
457
|
+
fill: "currentColor",
|
|
458
|
+
d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
tag: "path",
|
|
463
|
+
attrs: {
|
|
464
|
+
fill: "currentColor",
|
|
465
|
+
d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
tag: "path",
|
|
470
|
+
attrs: {
|
|
471
|
+
fill: "currentColor",
|
|
472
|
+
d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z"
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
tag: "path",
|
|
477
|
+
attrs: {
|
|
478
|
+
fill: "currentColor",
|
|
479
|
+
d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
]
|
|
483
|
+
}, Kn = ue(function(e, n) {
|
|
484
|
+
return ce(de, Object.assign({}, e, {
|
|
485
|
+
id: "sequence-icon",
|
|
486
|
+
ref: n,
|
|
309
487
|
icon: pi
|
|
310
488
|
}));
|
|
311
489
|
});
|
|
312
|
-
Kn.displayName = "
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
490
|
+
Kn.displayName = "SequenceIcon";
|
|
491
|
+
const Ci = {
|
|
492
|
+
tag: "svg",
|
|
493
|
+
attrs: {
|
|
494
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
495
|
+
fill: "none",
|
|
496
|
+
viewBox: "0 0 16 16",
|
|
497
|
+
width: "1em",
|
|
498
|
+
height: "1em"
|
|
499
|
+
},
|
|
500
|
+
children: [{
|
|
501
|
+
tag: "path",
|
|
502
|
+
attrs: {
|
|
503
|
+
fill: "currentColor",
|
|
504
|
+
d: "M8.00033 1.20996C6.43345 1.20996 5.23596 1.88077 4.64804 2.94304C4.06338 3.99943 4.15123 5.32084 4.90099 6.47062C5.08199 6.7482 5.45374 6.82648 5.73131 6.64548C6.00888 6.46448 6.08716 6.09273 5.90616 5.81516C5.36418 4.98402 5.35768 4.13897 5.69797 3.52412C6.035 2.91515 6.78176 2.40996 8.00033 2.40996C9.19423 2.40996 10.0017 2.93409 10.5236 3.46755C10.7871 3.73682 10.9756 4.00712 11.0974 4.20903C11.158 4.30951 11.2013 4.39164 11.2284 4.44625C11.2419 4.47351 11.2514 4.49377 11.2568 4.50588L11.2621 4.51771C11.3901 4.82216 11.7407 4.96686 12.046 4.83992C12.3519 4.71267 12.4968 4.36149 12.3695 4.05552L11.8231 4.28278C12.3695 4.05552 12.3697 4.0558 12.3695 4.05552L12.3691 4.05437L12.3685 4.05298L12.367 4.04953L12.3629 4.03993L12.3498 4.01036C12.3388 3.98619 12.3234 3.95326 12.3033 3.91282C12.2632 3.83203 12.2043 3.72072 12.1249 3.58908C11.9666 3.32674 11.7235 2.97805 11.3814 2.62834C10.6921 1.92381 9.59192 1.20996 8.00033 1.20996Z"
|
|
505
|
+
}
|
|
506
|
+
}, {
|
|
507
|
+
tag: "path",
|
|
508
|
+
attrs: {
|
|
509
|
+
fill: "currentColor",
|
|
510
|
+
d: "M2.11953 8.5999H7.88935C10.1109 9.46549 10.5895 10.7649 10.4268 11.6869C10.2475 12.703 9.26939 13.5898 8.00009 13.5898C6.63323 13.5898 5.77631 13.0502 5.25534 12.528C4.99021 12.2623 4.80823 11.9965 4.69365 11.7993C4.63659 11.7011 4.59698 11.6211 4.5727 11.5686C4.56059 11.5424 4.55236 11.5231 4.54774 11.512L4.54352 11.5016C4.4267 11.193 4.0823 11.0363 3.77279 11.1516C3.46228 11.2673 3.30438 11.6129 3.4201 11.9234L3.9649 11.7203C3.4201 11.9234 3.41998 11.9231 3.4201 11.9234L3.4206 11.9247L3.42118 11.9263L3.42262 11.9301L3.42661 11.9403C3.42977 11.9484 3.43394 11.9588 3.43914 11.9713C3.44956 11.9965 3.46418 12.0304 3.48334 12.0719C3.52161 12.1547 3.57828 12.2682 3.65608 12.4021C3.81124 12.6692 4.0534 13.0223 4.40584 13.3756C5.12 14.0914 6.27196 14.7898 8.00009 14.7898C9.82574 14.7898 11.3236 13.5101 11.6085 11.8955C11.812 10.7422 11.3901 9.55402 10.2665 8.5999H13.8804C14.2117 8.5999 14.4803 8.33127 14.4803 7.9999C14.4803 7.66853 14.2117 7.3999 13.8804 7.3999H8.01411C8.0048 7.39968 7.99551 7.39969 7.98625 7.3999H2.11953C1.78816 7.3999 1.51953 7.66853 1.51953 7.9999C1.51953 8.33127 1.78816 8.5999 2.11953 8.5999Z"
|
|
511
|
+
}
|
|
512
|
+
}]
|
|
513
|
+
}, Xn = ue(function(e, n) {
|
|
514
|
+
return ce(de, Object.assign({}, e, {
|
|
515
|
+
id: "strikethrough-icon",
|
|
516
|
+
ref: n,
|
|
317
517
|
icon: Ci
|
|
318
518
|
}));
|
|
319
519
|
});
|
|
320
|
-
Xn.displayName = "
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
520
|
+
Xn.displayName = "StrikethroughIcon";
|
|
521
|
+
const yi = {
|
|
522
|
+
tag: "svg",
|
|
523
|
+
attrs: {
|
|
524
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
525
|
+
fill: "none",
|
|
526
|
+
viewBox: "0 0 16 16",
|
|
527
|
+
width: "1em",
|
|
528
|
+
height: "1em"
|
|
529
|
+
},
|
|
530
|
+
children: [{
|
|
531
|
+
tag: "path",
|
|
532
|
+
attrs: {
|
|
533
|
+
fill: "currentColor",
|
|
534
|
+
d: "M4.46416 2.03237C4.46416 1.701 4.19553 1.43237 3.86416 1.43237C3.53279 1.43237 3.26416 1.701 3.26416 2.03237V7.33338C3.26416 10.0313 5.35834 12.2667 7.9999 12.2667C10.6415 12.2667 12.7356 10.0313 12.7356 7.33338V2.03237C12.7356 1.701 12.467 1.43237 12.1356 1.43237C11.8043 1.43237 11.5356 1.701 11.5356 2.03237V7.33338C11.5356 9.42194 9.92656 11.0667 7.9999 11.0667C6.07325 11.0667 4.46416 9.42194 4.46416 7.33338V2.03237Z"
|
|
535
|
+
}
|
|
536
|
+
}, {
|
|
537
|
+
tag: "path",
|
|
538
|
+
attrs: {
|
|
539
|
+
fill: "currentColor",
|
|
540
|
+
d: "M2.66641 13.4663C2.33504 13.4663 2.06641 13.7349 2.06641 14.0663C2.06641 14.3977 2.33504 14.6663 2.66641 14.6663H13.3331C13.6644 14.6663 13.9331 14.3977 13.9331 14.0663C13.9331 13.7349 13.6644 13.4663 13.3331 13.4663H2.66641Z"
|
|
541
|
+
}
|
|
542
|
+
}]
|
|
543
|
+
}, Jn = ue(function(e, n) {
|
|
544
|
+
return ce(de, Object.assign({}, e, {
|
|
545
|
+
id: "underline-icon",
|
|
546
|
+
ref: n,
|
|
325
547
|
icon: yi
|
|
326
548
|
}));
|
|
327
549
|
});
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
550
|
+
Jn.displayName = "UnderlineIcon";
|
|
551
|
+
const bi = {
|
|
552
|
+
tag: "svg",
|
|
553
|
+
attrs: {
|
|
554
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
555
|
+
fill: "none",
|
|
556
|
+
viewBox: "0 0 17 16",
|
|
557
|
+
width: "1em",
|
|
558
|
+
height: "1em"
|
|
559
|
+
},
|
|
560
|
+
children: [{
|
|
561
|
+
tag: "path",
|
|
562
|
+
attrs: {
|
|
563
|
+
fill: "colorChannel1",
|
|
564
|
+
d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z"
|
|
565
|
+
}
|
|
566
|
+
}, {
|
|
567
|
+
tag: "path",
|
|
568
|
+
attrs: {
|
|
569
|
+
fill: "currentColor",
|
|
570
|
+
d: "M10.3014 1.70389C9.85268 0.479568 8.12109 0.479557 7.67238 1.70389L4.72235 9.75326C4.60832 10.0644 4.76811 10.4091 5.07924 10.5231C5.39038 10.6371 5.73504 10.4773 5.84907 10.1662L6.99975 7.02646C7.03588 7.03324 7.07314 7.03679 7.11123 7.03679H10.9778L12.1247 10.1662C12.2387 10.4773 12.5834 10.6371 12.8945 10.5231C13.2057 10.4091 13.3654 10.0644 13.2514 9.75326L10.3014 1.70389ZM10.538 5.83679L9.17467 2.11682C9.11057 1.94192 8.8632 1.94192 8.7991 2.11682L7.43576 5.83679H10.538Z",
|
|
571
|
+
fillRule: "evenodd",
|
|
572
|
+
clipRule: "evenodd"
|
|
573
|
+
}
|
|
574
|
+
}]
|
|
575
|
+
}, Qn = ue(function(e, n) {
|
|
576
|
+
return ce(de, Object.assign({}, e, {
|
|
577
|
+
id: "font-color-double-icon",
|
|
578
|
+
ref: n,
|
|
333
579
|
icon: bi
|
|
334
580
|
}));
|
|
335
581
|
});
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
582
|
+
Qn.displayName = "FontColorDoubleIcon";
|
|
583
|
+
const Ii = {
|
|
584
|
+
tag: "svg",
|
|
585
|
+
attrs: {
|
|
586
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
587
|
+
fill: "none",
|
|
588
|
+
viewBox: "0 0 17 16",
|
|
589
|
+
width: "1em",
|
|
590
|
+
height: "1em"
|
|
591
|
+
},
|
|
592
|
+
children: [
|
|
593
|
+
{
|
|
594
|
+
tag: "path",
|
|
595
|
+
attrs: {
|
|
596
|
+
fill: "currentColor",
|
|
597
|
+
d: "M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z",
|
|
598
|
+
fillRule: "evenodd",
|
|
599
|
+
clipRule: "evenodd"
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
tag: "path",
|
|
604
|
+
attrs: {
|
|
605
|
+
fill: "currentColor",
|
|
606
|
+
d: "M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
tag: "path",
|
|
611
|
+
attrs: {
|
|
612
|
+
fill: "colorChannel1",
|
|
613
|
+
d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z"
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
]
|
|
617
|
+
}, er = ue(function(e, n) {
|
|
618
|
+
return ce(de, Object.assign({}, e, {
|
|
619
|
+
id: "paint-bucket-double-icon",
|
|
620
|
+
ref: n,
|
|
341
621
|
icon: Ii
|
|
342
622
|
}));
|
|
343
623
|
});
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
624
|
+
er.displayName = "PaintBucketDoubleIcon";
|
|
625
|
+
const Si = {
|
|
626
|
+
tag: "svg",
|
|
627
|
+
attrs: {
|
|
628
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
629
|
+
fill: "none",
|
|
630
|
+
viewBox: "0 0 17 17",
|
|
631
|
+
width: "1em",
|
|
632
|
+
height: "1em"
|
|
633
|
+
},
|
|
634
|
+
children: [{
|
|
635
|
+
tag: "path",
|
|
636
|
+
attrs: {
|
|
637
|
+
fill: "currentColor",
|
|
638
|
+
d: "M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z",
|
|
639
|
+
fillRule: "evenodd",
|
|
640
|
+
clipRule: "evenodd"
|
|
641
|
+
}
|
|
642
|
+
}, {
|
|
643
|
+
tag: "path",
|
|
644
|
+
attrs: {
|
|
645
|
+
fill: "colorChannel1",
|
|
646
|
+
d: "M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z",
|
|
647
|
+
fillRule: "evenodd",
|
|
648
|
+
clipRule: "evenodd"
|
|
649
|
+
}
|
|
650
|
+
}]
|
|
651
|
+
}, ot = ue(function(e, n) {
|
|
652
|
+
return ce(de, Object.assign({}, e, {
|
|
653
|
+
id: "slash-double-icon",
|
|
654
|
+
ref: n,
|
|
349
655
|
icon: Si
|
|
350
656
|
}));
|
|
351
657
|
});
|
|
352
|
-
ot.displayName = "
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
id: "strikethrough-icon",
|
|
356
|
-
ref: e,
|
|
357
|
-
icon: _i
|
|
358
|
-
}));
|
|
359
|
-
});
|
|
360
|
-
er.displayName = "StrikethroughIcon";
|
|
361
|
-
var wi = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.46416 2.03237C4.46416 1.701 4.19553 1.43237 3.86416 1.43237C3.53279 1.43237 3.26416 1.701 3.26416 2.03237V7.33338C3.26416 10.0313 5.35834 12.2667 7.9999 12.2667C10.6415 12.2667 12.7356 10.0313 12.7356 7.33338V2.03237C12.7356 1.701 12.467 1.43237 12.1356 1.43237C11.8043 1.43237 11.5356 1.701 11.5356 2.03237V7.33338C11.5356 9.42194 9.92656 11.0667 7.9999 11.0667C6.07325 11.0667 4.46416 9.42194 4.46416 7.33338V2.03237Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.66641 13.4663C2.33504 13.4663 2.06641 13.7349 2.06641 14.0663C2.06641 14.3977 2.33504 14.6663 2.66641 14.6663H13.3331C13.6644 14.6663 13.9331 14.3977 13.9331 14.0663C13.9331 13.7349 13.6644 13.4663 13.3331 13.4663H2.66641Z" } }] }, tr = oe(function(t, e) {
|
|
362
|
-
return de(he, Object.assign({}, t, {
|
|
363
|
-
id: "underline-icon",
|
|
364
|
-
ref: e,
|
|
365
|
-
icon: wi
|
|
366
|
-
}));
|
|
367
|
-
});
|
|
368
|
-
tr.displayName = "UnderlineIcon";
|
|
369
|
-
const Fe = (t) => {
|
|
370
|
-
const { color: e, onChange: r, disable: n = !1, Icon: i = Jn, className: s } = t, o = J(() => new mn(e), [e]), u = () => {
|
|
658
|
+
ot.displayName = "SlashDoubleIcon";
|
|
659
|
+
const ke = (t) => {
|
|
660
|
+
const { color: e, onChange: n, disable: r = !1, Icon: i = er, className: o } = t, s = J(() => new gn(e), [e]), d = () => {
|
|
371
661
|
const a = {
|
|
372
|
-
className: Y("univer-fill-primary-600",
|
|
373
|
-
extend: { colorChannel1:
|
|
662
|
+
className: Y("univer-fill-primary-600", r && o),
|
|
663
|
+
extend: { colorChannel1: s.isValid ? e : "" }
|
|
374
664
|
};
|
|
375
665
|
return /* @__PURE__ */ c(i, { ...a });
|
|
376
666
|
};
|
|
377
|
-
return
|
|
378
|
-
|
|
667
|
+
return r ? d() : /* @__PURE__ */ c(
|
|
668
|
+
qt,
|
|
379
669
|
{
|
|
380
|
-
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(
|
|
670
|
+
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(Yr, { value: e, onChange: n }) }),
|
|
381
671
|
children: /* @__PURE__ */ c(
|
|
382
672
|
"span",
|
|
383
673
|
{
|
|
384
|
-
className: Y("univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
|
|
385
|
-
children:
|
|
674
|
+
className: Y("univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-p-1 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", o),
|
|
675
|
+
children: d()
|
|
386
676
|
}
|
|
387
677
|
)
|
|
388
678
|
}
|
|
389
679
|
);
|
|
390
|
-
},
|
|
391
|
-
var
|
|
680
|
+
}, Be = (t) => {
|
|
681
|
+
var o, s, d, a, h;
|
|
392
682
|
const e = t.rule;
|
|
393
683
|
if (!e) return null;
|
|
394
|
-
const
|
|
684
|
+
const n = J(() => {
|
|
395
685
|
if (e.type === L.colorScale) {
|
|
396
|
-
const l = e.config.map((p, y) => ({ color: new
|
|
397
|
-
return new Array(5).fill("").map((p, y, f) => y *
|
|
686
|
+
const l = e.config.map((p, y) => ({ color: new gn(p.color), value: y })), u = l.length - 1;
|
|
687
|
+
return new Array(5).fill("").map((p, y, f) => y * u / (f.length - 1)).map((p) => xr(l, p));
|
|
398
688
|
}
|
|
399
689
|
return null;
|
|
400
|
-
}, [e]),
|
|
690
|
+
}, [e]), r = J(() => {
|
|
401
691
|
if (e.type === L.iconSet)
|
|
402
692
|
return e.config.map((l) => {
|
|
403
|
-
const
|
|
404
|
-
return
|
|
693
|
+
const u = Me[l.iconType];
|
|
694
|
+
return u && u[Number(l.iconId)];
|
|
405
695
|
});
|
|
406
696
|
}, [e]), i = "univer-pointer-events-none univer-flex univer-h-5 univer-min-w-[72px] univer-items-center univer-justify-center univer-text-xs";
|
|
407
697
|
switch (e.type) {
|
|
408
698
|
case L.dataBar: {
|
|
409
|
-
const { isGradient: l } = e.config,
|
|
699
|
+
const { isGradient: l } = e.config, u = l ? `linear-gradient(to right, ${e.config.positiveColor || Ye}, rgb(255 255 255))` : e.config.positiveColor, v = l ? `linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor || Ke})` : e.config.nativeColor;
|
|
410
700
|
return /* @__PURE__ */ k("div", { className: i, children: [
|
|
411
701
|
/* @__PURE__ */ c(
|
|
412
702
|
"div",
|
|
@@ -414,7 +704,7 @@ const Fe = (t) => {
|
|
|
414
704
|
className: "univer-h-full univer-w-1/2 univer-border univer-border-solid",
|
|
415
705
|
style: {
|
|
416
706
|
background: v,
|
|
417
|
-
borderColor: (
|
|
707
|
+
borderColor: (o = e.config.nativeColor) != null ? o : Ke
|
|
418
708
|
}
|
|
419
709
|
}
|
|
420
710
|
),
|
|
@@ -423,26 +713,26 @@ const Fe = (t) => {
|
|
|
423
713
|
{
|
|
424
714
|
className: "univer-h-full univer-w-1/2 univer-border univer-border-solid",
|
|
425
715
|
style: {
|
|
426
|
-
background:
|
|
427
|
-
borderColor: (
|
|
716
|
+
background: u,
|
|
717
|
+
borderColor: (s = e.config.positiveColor) != null ? s : Ye
|
|
428
718
|
}
|
|
429
719
|
}
|
|
430
720
|
)
|
|
431
721
|
] });
|
|
432
722
|
}
|
|
433
723
|
case L.colorScale:
|
|
434
|
-
return
|
|
724
|
+
return n && /* @__PURE__ */ c("div", { className: i, children: n.map((l, u) => /* @__PURE__ */ c(
|
|
435
725
|
"div",
|
|
436
726
|
{
|
|
437
727
|
className: "univer-h-full",
|
|
438
|
-
style: { width: `${100 /
|
|
728
|
+
style: { width: `${100 / n.length}%`, background: l }
|
|
439
729
|
},
|
|
440
|
-
|
|
730
|
+
u
|
|
441
731
|
)) });
|
|
442
732
|
case L.iconSet:
|
|
443
|
-
return
|
|
733
|
+
return r && /* @__PURE__ */ c("div", { className: i, children: r.map((l, u) => l ? /* @__PURE__ */ c("img", { className: "univer-h-full", src: l, draggable: !1 }, u) : /* @__PURE__ */ c(ot, {}, u)) });
|
|
444
734
|
case L.highlightCell: {
|
|
445
|
-
const { ul: l, st:
|
|
735
|
+
const { ul: l, st: u, it: v, bl: p, bg: y, cl: f } = e.style, w = (l == null ? void 0 : l.s) === se.TRUE, I = (u == null ? void 0 : u.s) === se.TRUE, R = v === se.TRUE, x = p === se.TRUE, T = (d = y == null ? void 0 : y.rgb) != null ? d : Er, g = (a = f == null ? void 0 : f.rgb) != null ? a : Nr, b = {
|
|
446
736
|
textDecoration: (h = `${w ? "underline" : ""} ${I ? "line-through" : ""}`.replace(/^ /, "")) != null ? h : void 0,
|
|
447
737
|
backgroundColor: T,
|
|
448
738
|
color: g
|
|
@@ -460,79 +750,79 @@ const Fe = (t) => {
|
|
|
460
750
|
);
|
|
461
751
|
}
|
|
462
752
|
}
|
|
463
|
-
},
|
|
753
|
+
}, st = Y("univer-mt-5 univer-px-1 univer-py-2 univer-rounded", Fe), xe = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Ut = (t) => {
|
|
464
754
|
var y;
|
|
465
|
-
const { type: e, className:
|
|
755
|
+
const { type: e, className: n, onChange: r, id: i, value: o } = t, s = q(Z), d = s.getCurrentUnitForType(A.UNIVER_SHEET).getUnitId(), a = (y = s.getCurrentUnitForType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : y.getSheetId(), h = J(() => String(o).startsWith("=") ? String(o) : "=", [o]), l = J(() => [$.max, $.min, "none"].includes(e) ? { disabled: !0 } : [$.percent, $.percentile].includes(e) ? {
|
|
466
756
|
min: 0,
|
|
467
757
|
max: 100
|
|
468
758
|
} : {
|
|
469
759
|
min: Number.MIN_SAFE_INTEGER,
|
|
470
760
|
max: Number.MAX_SAFE_INTEGER
|
|
471
|
-
}, [e]),
|
|
472
|
-
return
|
|
761
|
+
}, [e]), u = ve(null), [v, p] = N(!1);
|
|
762
|
+
return Et((f) => {
|
|
473
763
|
var I;
|
|
474
|
-
((I =
|
|
475
|
-
}), e ===
|
|
476
|
-
|
|
764
|
+
((I = u.current) == null ? void 0 : I.isClickOutSide(f)) && p(!1);
|
|
765
|
+
}), e === $.formula ? /* @__PURE__ */ c("div", { className: "univer-ml-1 univer-w-full", children: /* @__PURE__ */ c(
|
|
766
|
+
Nt,
|
|
477
767
|
{
|
|
478
|
-
ref:
|
|
479
|
-
className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",
|
|
768
|
+
ref: u,
|
|
769
|
+
className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Fe),
|
|
480
770
|
initValue: h,
|
|
481
|
-
unitId:
|
|
771
|
+
unitId: d,
|
|
482
772
|
subUnitId: a,
|
|
483
773
|
isFocus: v,
|
|
484
774
|
onChange: (f = "") => {
|
|
485
|
-
|
|
775
|
+
r(f || "");
|
|
486
776
|
},
|
|
487
777
|
onFocus: () => p(!0)
|
|
488
778
|
}
|
|
489
|
-
) }) : /* @__PURE__ */ c(
|
|
490
|
-
},
|
|
779
|
+
) }) : /* @__PURE__ */ c(Ve, { className: n, value: Number(t.value) || 0, onChange: (f) => t.onChange(f || 0), ...l });
|
|
780
|
+
}, _i = (t) => {
|
|
491
781
|
var O;
|
|
492
|
-
const { interceptorManager: e } = t,
|
|
782
|
+
const { interceptorManager: e } = t, n = q(re), r = ((O = t.rule) == null ? void 0 : O.type) === L.colorScale ? t.rule : void 0, i = [xe($.num, n), xe($.percent, n), xe($.percentile, n), xe($.formula, n)], o = [xe($.min, n), ...i], s = [xe("none", n), ...i], d = [xe($.max, n), ...i], [a, h] = N(() => {
|
|
493
783
|
var _;
|
|
494
|
-
const m =
|
|
495
|
-
return
|
|
496
|
-
}), [l,
|
|
784
|
+
const m = $.min;
|
|
785
|
+
return r && ((_ = r.config[0]) == null ? void 0 : _.value.type) || m;
|
|
786
|
+
}), [l, u] = N(() => {
|
|
497
787
|
var _;
|
|
498
788
|
const m = "none";
|
|
499
|
-
return !
|
|
789
|
+
return !r || r.config.length !== 3 ? m : ((_ = r.config[1]) == null ? void 0 : _.value.type) || m;
|
|
500
790
|
}), [v, p] = N(() => {
|
|
501
791
|
var _;
|
|
502
|
-
const m =
|
|
503
|
-
return
|
|
792
|
+
const m = $.max;
|
|
793
|
+
return r && ((_ = r.config[r.config.length - 1]) == null ? void 0 : _.value.type) || m;
|
|
504
794
|
}), [y, f] = N(() => {
|
|
505
|
-
if (!
|
|
795
|
+
if (!r)
|
|
506
796
|
return 10;
|
|
507
|
-
const _ =
|
|
797
|
+
const _ = r.config[0];
|
|
508
798
|
return (_ == null ? void 0 : _.value.value) === void 0 ? 10 : _ == null ? void 0 : _.value.value;
|
|
509
799
|
}), [w, I] = N(() => {
|
|
510
800
|
var j;
|
|
511
|
-
if (!
|
|
801
|
+
if (!r || r.config.length !== 3)
|
|
512
802
|
return 50;
|
|
513
|
-
const _ = (j =
|
|
803
|
+
const _ = (j = r.config[1]) == null ? void 0 : j.value.value;
|
|
514
804
|
return _ === void 0 ? 50 : _;
|
|
515
805
|
}), [R, x] = N(() => {
|
|
516
806
|
var j;
|
|
517
|
-
if (!
|
|
807
|
+
if (!r)
|
|
518
808
|
return 90;
|
|
519
|
-
const _ = (j =
|
|
809
|
+
const _ = (j = r.config[r.config.length - 1]) == null ? void 0 : j.value.value;
|
|
520
810
|
return _ === void 0 ? 90 : _;
|
|
521
811
|
}), [T, g] = N(() => {
|
|
522
812
|
var _;
|
|
523
813
|
const m = "#d0d9fb";
|
|
524
|
-
return
|
|
814
|
+
return r && ((_ = r.config[0]) == null ? void 0 : _.color) || m;
|
|
525
815
|
}), [b, S] = N(() => {
|
|
526
816
|
var _;
|
|
527
817
|
const m = "#7790f3";
|
|
528
|
-
return !
|
|
818
|
+
return !r || r.config.length !== 3 ? m : ((_ = r.config[1]) == null ? void 0 : _.color) || m;
|
|
529
819
|
}), [C, M] = N(() => {
|
|
530
820
|
var _;
|
|
531
821
|
const m = "#2e55ef";
|
|
532
|
-
return
|
|
822
|
+
return r && ((_ = r.config[r.config.length - 1]) == null ? void 0 : _.color) || m;
|
|
533
823
|
}), E = J(() => (m) => {
|
|
534
|
-
const { minType: _, medianType: j, maxType: K, minValue:
|
|
535
|
-
return G.push({ color:
|
|
824
|
+
const { minType: _, medianType: j, maxType: K, minValue: fe, medianValue: pe, maxValue: Le, minColor: Ue, medianColor: D, maxColor: B } = m, G = [];
|
|
825
|
+
return G.push({ color: Ue, value: { type: _, value: fe } }), j !== "none" && G.push({ color: D, value: { type: j, value: pe } }), G.push({ color: B, value: { type: K, value: Le } }), { config: G.map((ee, ne) => ({ ...ee, index: ne })), type: L.colorScale };
|
|
536
826
|
}, []);
|
|
537
827
|
X(() => e.intercept(e.getInterceptPoints().submit, {
|
|
538
828
|
handler() {
|
|
@@ -547,27 +837,27 @@ const Fe = (t) => {
|
|
|
547
837
|
"div",
|
|
548
838
|
{
|
|
549
839
|
className: "univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
550
|
-
children:
|
|
840
|
+
children: n.t("sheet.cf.panel.styleRule")
|
|
551
841
|
}
|
|
552
842
|
),
|
|
553
|
-
/* @__PURE__ */ c("div", { className:
|
|
843
|
+
/* @__PURE__ */ c("div", { className: st, children: /* @__PURE__ */ c(Be, { rule: E({ minType: a, medianType: l, maxType: v, minValue: y, medianValue: w, maxValue: R, minColor: T, medianColor: b, maxColor: C }) }) }),
|
|
554
844
|
/* @__PURE__ */ c(
|
|
555
845
|
"div",
|
|
556
846
|
{
|
|
557
847
|
className: "univer-mt-3 univer-text-xs univer-text-gray-600 dark:!univer-text-gray-200",
|
|
558
|
-
children:
|
|
848
|
+
children: n.t("sheet.cf.valueType.min")
|
|
559
849
|
}
|
|
560
850
|
),
|
|
561
851
|
/* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
|
|
562
852
|
/* @__PURE__ */ c(
|
|
563
|
-
|
|
853
|
+
ae,
|
|
564
854
|
{
|
|
565
855
|
className: "univer-flex-shrink-0",
|
|
566
|
-
options:
|
|
856
|
+
options: o,
|
|
567
857
|
value: a,
|
|
568
858
|
onChange: (m) => {
|
|
569
859
|
h(m);
|
|
570
|
-
const _ =
|
|
860
|
+
const _ = Xe(m, 10);
|
|
571
861
|
f(_), V({
|
|
572
862
|
minType: m,
|
|
573
863
|
medianType: l,
|
|
@@ -583,7 +873,7 @@ const Fe = (t) => {
|
|
|
583
873
|
}
|
|
584
874
|
),
|
|
585
875
|
/* @__PURE__ */ c(
|
|
586
|
-
|
|
876
|
+
Ut,
|
|
587
877
|
{
|
|
588
878
|
id: "min",
|
|
589
879
|
className: "univer-ml-1",
|
|
@@ -605,7 +895,7 @@ const Fe = (t) => {
|
|
|
605
895
|
}
|
|
606
896
|
),
|
|
607
897
|
/* @__PURE__ */ c(
|
|
608
|
-
|
|
898
|
+
ke,
|
|
609
899
|
{
|
|
610
900
|
className: "univer-ml-1",
|
|
611
901
|
color: T,
|
|
@@ -629,19 +919,19 @@ const Fe = (t) => {
|
|
|
629
919
|
"div",
|
|
630
920
|
{
|
|
631
921
|
className: "univer-text-gray-600dark:!univer-text-gray-200 univer-mt-3 univer-text-xs",
|
|
632
|
-
children:
|
|
922
|
+
children: n.t("sheet.cf.panel.medianValue")
|
|
633
923
|
}
|
|
634
924
|
),
|
|
635
925
|
/* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
|
|
636
926
|
/* @__PURE__ */ c(
|
|
637
|
-
|
|
927
|
+
ae,
|
|
638
928
|
{
|
|
639
929
|
className: "univer-flex-shrink-0",
|
|
640
|
-
options:
|
|
930
|
+
options: s,
|
|
641
931
|
value: l,
|
|
642
932
|
onChange: (m) => {
|
|
643
|
-
|
|
644
|
-
const _ =
|
|
933
|
+
u(m);
|
|
934
|
+
const _ = Xe(m, 50);
|
|
645
935
|
I(_), V({
|
|
646
936
|
minType: a,
|
|
647
937
|
medianType: m,
|
|
@@ -657,7 +947,7 @@ const Fe = (t) => {
|
|
|
657
947
|
}
|
|
658
948
|
),
|
|
659
949
|
/* @__PURE__ */ c(
|
|
660
|
-
|
|
950
|
+
Ut,
|
|
661
951
|
{
|
|
662
952
|
id: "median",
|
|
663
953
|
className: "univer-ml-1",
|
|
@@ -679,7 +969,7 @@ const Fe = (t) => {
|
|
|
679
969
|
}
|
|
680
970
|
),
|
|
681
971
|
l !== "none" && /* @__PURE__ */ c(
|
|
682
|
-
|
|
972
|
+
ke,
|
|
683
973
|
{
|
|
684
974
|
className: "univer-ml-1",
|
|
685
975
|
color: b,
|
|
@@ -703,19 +993,19 @@ const Fe = (t) => {
|
|
|
703
993
|
"div",
|
|
704
994
|
{
|
|
705
995
|
className: "univer-mt-3 univer-text-xs univer-text-gray-600 dark:!univer-text-gray-200",
|
|
706
|
-
children:
|
|
996
|
+
children: n.t("sheet.cf.valueType.max")
|
|
707
997
|
}
|
|
708
998
|
),
|
|
709
999
|
/* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
|
|
710
1000
|
/* @__PURE__ */ c(
|
|
711
|
-
|
|
1001
|
+
ae,
|
|
712
1002
|
{
|
|
713
1003
|
className: "univer-flex-shrink-0",
|
|
714
|
-
options:
|
|
1004
|
+
options: d,
|
|
715
1005
|
value: v,
|
|
716
1006
|
onChange: (m) => {
|
|
717
1007
|
p(m);
|
|
718
|
-
const _ =
|
|
1008
|
+
const _ = Xe(m, 90);
|
|
719
1009
|
x(_), V({
|
|
720
1010
|
minType: a,
|
|
721
1011
|
medianType: l,
|
|
@@ -731,7 +1021,7 @@ const Fe = (t) => {
|
|
|
731
1021
|
}
|
|
732
1022
|
),
|
|
733
1023
|
/* @__PURE__ */ c(
|
|
734
|
-
|
|
1024
|
+
Ut,
|
|
735
1025
|
{
|
|
736
1026
|
id: "max",
|
|
737
1027
|
className: "univer-ml-1",
|
|
@@ -753,7 +1043,7 @@ const Fe = (t) => {
|
|
|
753
1043
|
}
|
|
754
1044
|
),
|
|
755
1045
|
/* @__PURE__ */ c(
|
|
756
|
-
|
|
1046
|
+
ke,
|
|
757
1047
|
{
|
|
758
1048
|
className: "univer-ml-1",
|
|
759
1049
|
color: C,
|
|
@@ -774,31 +1064,31 @@ const Fe = (t) => {
|
|
|
774
1064
|
)
|
|
775
1065
|
] })
|
|
776
1066
|
] });
|
|
777
|
-
},
|
|
1067
|
+
}, Pe = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), nn = (t) => {
|
|
778
1068
|
var f;
|
|
779
|
-
const { onChange: e, className:
|
|
780
|
-
|
|
1069
|
+
const { onChange: e, className: n, value: r, type: i, id: o, disabled: s = !1 } = t, d = q(Z), a = d.getCurrentUnitOfType(A.UNIVER_SHEET).getUnitId(), h = (f = d.getCurrentUnitOfType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : f.getSheetId(), l = ve(null), [u, v] = N(!1);
|
|
1070
|
+
Et((w) => {
|
|
781
1071
|
var R;
|
|
782
1072
|
((R = l.current) == null ? void 0 : R.isClickOutSide(w)) && v(!1);
|
|
783
1073
|
});
|
|
784
|
-
const p =
|
|
1074
|
+
const p = ve(r), y = J(() => [$.percentile, $.percent].includes(i) ? {
|
|
785
1075
|
max: 100,
|
|
786
1076
|
min: 0
|
|
787
1077
|
} : {
|
|
788
1078
|
min: Number.MIN_SAFE_INTEGER,
|
|
789
1079
|
max: Number.MAX_SAFE_INTEGER
|
|
790
1080
|
}, [i]);
|
|
791
|
-
if (i ===
|
|
1081
|
+
if (i === $.formula) {
|
|
792
1082
|
const w = String(p.current).startsWith("=") ? String(p.current) || "" : "=";
|
|
793
1083
|
return /* @__PURE__ */ c("div", { className: "univer-ml-3 univer-w-full", children: /* @__PURE__ */ c(
|
|
794
|
-
|
|
1084
|
+
Nt,
|
|
795
1085
|
{
|
|
796
1086
|
ref: l,
|
|
797
|
-
className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",
|
|
1087
|
+
className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Fe),
|
|
798
1088
|
initValue: w,
|
|
799
1089
|
unitId: a,
|
|
800
1090
|
subUnitId: h,
|
|
801
|
-
isFocus:
|
|
1091
|
+
isFocus: u,
|
|
802
1092
|
onChange: (I = "") => {
|
|
803
1093
|
e(I || "");
|
|
804
1094
|
},
|
|
@@ -807,69 +1097,69 @@ const Fe = (t) => {
|
|
|
807
1097
|
) });
|
|
808
1098
|
}
|
|
809
1099
|
return /* @__PURE__ */ c(
|
|
810
|
-
|
|
1100
|
+
Ve,
|
|
811
1101
|
{
|
|
812
|
-
className:
|
|
813
|
-
value: Number(
|
|
814
|
-
disabled:
|
|
1102
|
+
className: n,
|
|
1103
|
+
value: Number(r) || 0,
|
|
1104
|
+
disabled: s,
|
|
815
1105
|
onChange: (w) => {
|
|
816
1106
|
e(w || 0);
|
|
817
1107
|
},
|
|
818
1108
|
...y
|
|
819
1109
|
}
|
|
820
1110
|
);
|
|
821
|
-
},
|
|
1111
|
+
}, wi = (t) => {
|
|
822
1112
|
var O;
|
|
823
|
-
const { interceptorManager: e } = t,
|
|
1113
|
+
const { interceptorManager: e } = t, n = q(re), r = ((O = t.rule) == null ? void 0 : O.type) === L.dataBar ? t.rule : void 0, [i, o] = N(() => {
|
|
824
1114
|
var _;
|
|
825
|
-
return
|
|
826
|
-
}), [
|
|
1115
|
+
return r && (_ = r.config) != null && _.isGradient ? "1" : "0";
|
|
1116
|
+
}), [s, d] = N(() => {
|
|
827
1117
|
var m;
|
|
828
|
-
return
|
|
1118
|
+
return r ? ((m = r.config) == null ? void 0 : m.positiveColor) || Ye : Ye;
|
|
829
1119
|
}), [a, h] = N(() => {
|
|
830
1120
|
var m;
|
|
831
|
-
return
|
|
1121
|
+
return r ? ((m = r.config) == null ? void 0 : m.nativeColor) || Ke : Ke;
|
|
832
1122
|
}), l = [
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
],
|
|
1123
|
+
Pe($.num, n),
|
|
1124
|
+
Pe($.percent, n),
|
|
1125
|
+
Pe($.percentile, n),
|
|
1126
|
+
Pe($.formula, n)
|
|
1127
|
+
], u = [Pe($.min, n), ...l], v = [Pe($.max, n), ...l], [p, y] = N(() => {
|
|
838
1128
|
var _;
|
|
839
|
-
const m =
|
|
840
|
-
return
|
|
1129
|
+
const m = u[0].value;
|
|
1130
|
+
return r && ((_ = r.config) == null ? void 0 : _.min.type) || m;
|
|
841
1131
|
}), [f, w] = N(() => {
|
|
842
1132
|
var _;
|
|
843
1133
|
const m = v[0].value;
|
|
844
|
-
return
|
|
1134
|
+
return r && ((_ = r.config) == null ? void 0 : _.max.type) || m;
|
|
845
1135
|
}), [I, R] = N(() => {
|
|
846
1136
|
var j;
|
|
847
|
-
if (!
|
|
1137
|
+
if (!r)
|
|
848
1138
|
return 0;
|
|
849
|
-
const _ = ((j =
|
|
850
|
-
return _.type ===
|
|
1139
|
+
const _ = ((j = r.config) == null ? void 0 : j.min) || {};
|
|
1140
|
+
return _.type === $.formula ? _.value || "=" : _.value || 0;
|
|
851
1141
|
}), [x, T] = N(() => {
|
|
852
1142
|
var j;
|
|
853
|
-
if (!
|
|
1143
|
+
if (!r)
|
|
854
1144
|
return 100;
|
|
855
|
-
const _ = ((j =
|
|
856
|
-
return _.type ===
|
|
857
|
-
}), [g, b] = N(() =>
|
|
1145
|
+
const _ = ((j = r.config) == null ? void 0 : j.max) || {};
|
|
1146
|
+
return _.type === $.formula ? _.value || "=" : _.value === void 0 ? 100 : _.value;
|
|
1147
|
+
}), [g, b] = N(() => r ? r.isShowValue === void 0 ? !0 : !!r.isShowValue : !0), S = (m) => ({ config: {
|
|
858
1148
|
min: { type: m.minValueType, value: m.minValue },
|
|
859
1149
|
max: { type: m.maxValueType, value: m.maxValue },
|
|
860
1150
|
isGradient: m.isGradient === "1",
|
|
861
|
-
positiveColor: m.positiveColor ||
|
|
862
|
-
nativeColor: m.nativeColor ||
|
|
1151
|
+
positiveColor: m.positiveColor || Ye,
|
|
1152
|
+
nativeColor: m.nativeColor || Ke
|
|
863
1153
|
}, type: L.dataBar, isShowValue: m.isShowValue });
|
|
864
1154
|
X(() => e.intercept(e.getInterceptPoints().submit, {
|
|
865
1155
|
handler() {
|
|
866
|
-
return S({ isGradient: i, minValue: I, minValueType: p, maxValue: x, maxValueType: f, positiveColor:
|
|
1156
|
+
return S({ isGradient: i, minValue: I, minValueType: p, maxValue: x, maxValueType: f, positiveColor: s, nativeColor: a, isShowValue: g });
|
|
867
1157
|
}
|
|
868
|
-
}), [i, I, p, x, f,
|
|
1158
|
+
}), [i, I, p, x, f, s, a, e, g]);
|
|
869
1159
|
const C = (m) => {
|
|
870
1160
|
t.onChange(S(m));
|
|
871
1161
|
}, M = (m) => {
|
|
872
|
-
|
|
1162
|
+
d(m), C({
|
|
873
1163
|
isGradient: i,
|
|
874
1164
|
minValue: I,
|
|
875
1165
|
minValueType: p,
|
|
@@ -886,7 +1176,7 @@ const Fe = (t) => {
|
|
|
886
1176
|
minValueType: p,
|
|
887
1177
|
maxValue: x,
|
|
888
1178
|
maxValueType: f,
|
|
889
|
-
positiveColor:
|
|
1179
|
+
positiveColor: s,
|
|
890
1180
|
nativeColor: m,
|
|
891
1181
|
isShowValue: g
|
|
892
1182
|
});
|
|
@@ -896,11 +1186,11 @@ const Fe = (t) => {
|
|
|
896
1186
|
"div",
|
|
897
1187
|
{
|
|
898
1188
|
className: "univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
899
|
-
children:
|
|
1189
|
+
children: n.t("sheet.cf.panel.styleRule")
|
|
900
1190
|
}
|
|
901
1191
|
),
|
|
902
|
-
/* @__PURE__ */ c("div", { className:
|
|
903
|
-
|
|
1192
|
+
/* @__PURE__ */ c("div", { className: st, children: /* @__PURE__ */ c(
|
|
1193
|
+
Be,
|
|
904
1194
|
{
|
|
905
1195
|
rule: S({
|
|
906
1196
|
isGradient: i,
|
|
@@ -908,7 +1198,7 @@ const Fe = (t) => {
|
|
|
908
1198
|
minValueType: p,
|
|
909
1199
|
maxValue: x,
|
|
910
1200
|
maxValueType: f,
|
|
911
|
-
positiveColor:
|
|
1201
|
+
positiveColor: s,
|
|
912
1202
|
nativeColor: a,
|
|
913
1203
|
isShowValue: g
|
|
914
1204
|
})
|
|
@@ -919,35 +1209,35 @@ const Fe = (t) => {
|
|
|
919
1209
|
"div",
|
|
920
1210
|
{
|
|
921
1211
|
className: "univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
922
|
-
children:
|
|
1212
|
+
children: n.t("sheet.cf.panel.fillType")
|
|
923
1213
|
}
|
|
924
1214
|
),
|
|
925
1215
|
/* @__PURE__ */ k("div", { className: "univer-ml-1 univer-mt-3 univer-flex univer-items-center", children: [
|
|
926
1216
|
/* @__PURE__ */ k(
|
|
927
|
-
|
|
1217
|
+
Kr,
|
|
928
1218
|
{
|
|
929
1219
|
value: i,
|
|
930
1220
|
onChange: (m) => {
|
|
931
|
-
|
|
1221
|
+
o(m), C({
|
|
932
1222
|
isGradient: m,
|
|
933
1223
|
minValue: I,
|
|
934
1224
|
minValueType: p,
|
|
935
1225
|
maxValue: x,
|
|
936
1226
|
maxValueType: f,
|
|
937
|
-
positiveColor:
|
|
1227
|
+
positiveColor: s,
|
|
938
1228
|
nativeColor: a,
|
|
939
1229
|
isShowValue: g
|
|
940
1230
|
});
|
|
941
1231
|
},
|
|
942
1232
|
children: [
|
|
943
|
-
/* @__PURE__ */ c(
|
|
944
|
-
/* @__PURE__ */ c(
|
|
1233
|
+
/* @__PURE__ */ c(Yt, { value: "0", children: /* @__PURE__ */ c("span", { className: "univer-text-xs", children: n.t("sheet.cf.panel.pureColor") }) }),
|
|
1234
|
+
/* @__PURE__ */ c(Yt, { value: "1", children: /* @__PURE__ */ c("span", { className: "univer-text-xs", children: n.t("sheet.cf.panel.gradient") }) })
|
|
945
1235
|
]
|
|
946
1236
|
}
|
|
947
1237
|
),
|
|
948
1238
|
/* @__PURE__ */ k("div", { className: "univer-ml-6 univer-flex univer-items-center univer-text-xs", children: [
|
|
949
1239
|
/* @__PURE__ */ c(
|
|
950
|
-
|
|
1240
|
+
Ct,
|
|
951
1241
|
{
|
|
952
1242
|
checked: !g,
|
|
953
1243
|
onChange: (m) => {
|
|
@@ -957,14 +1247,14 @@ const Fe = (t) => {
|
|
|
957
1247
|
minValueType: p,
|
|
958
1248
|
maxValue: x,
|
|
959
1249
|
maxValueType: f,
|
|
960
|
-
positiveColor:
|
|
1250
|
+
positiveColor: s,
|
|
961
1251
|
nativeColor: a,
|
|
962
1252
|
isShowValue: !m
|
|
963
1253
|
});
|
|
964
1254
|
}
|
|
965
1255
|
}
|
|
966
1256
|
),
|
|
967
|
-
|
|
1257
|
+
n.t("sheet.cf.panel.onlyShowDataBar")
|
|
968
1258
|
] })
|
|
969
1259
|
] })
|
|
970
1260
|
] }),
|
|
@@ -973,14 +1263,14 @@ const Fe = (t) => {
|
|
|
973
1263
|
"div",
|
|
974
1264
|
{
|
|
975
1265
|
className: "univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
976
|
-
children:
|
|
1266
|
+
children: n.t("sheet.cf.panel.colorSet")
|
|
977
1267
|
}
|
|
978
1268
|
),
|
|
979
1269
|
/* @__PURE__ */ k("div", { className: "univer-ml-1 univer-mt-3 univer-flex univer-items-center", children: [
|
|
980
1270
|
/* @__PURE__ */ k("div", { className: "univer-flex univer-items-center", children: [
|
|
981
|
-
/* @__PURE__ */ c("div", { className: "univer-text-xs", children:
|
|
1271
|
+
/* @__PURE__ */ c("div", { className: "univer-text-xs", children: n.t("sheet.cf.panel.native") }),
|
|
982
1272
|
/* @__PURE__ */ c(
|
|
983
|
-
|
|
1273
|
+
ke,
|
|
984
1274
|
{
|
|
985
1275
|
color: a,
|
|
986
1276
|
onChange: E
|
|
@@ -988,11 +1278,11 @@ const Fe = (t) => {
|
|
|
988
1278
|
)
|
|
989
1279
|
] }),
|
|
990
1280
|
/* @__PURE__ */ k("div", { className: "univer-ml-3 univer-flex univer-items-center", children: [
|
|
991
|
-
/* @__PURE__ */ c("div", { className: "univer-text-xs", children:
|
|
1281
|
+
/* @__PURE__ */ c("div", { className: "univer-text-xs", children: n.t("sheet.cf.panel.positive") }),
|
|
992
1282
|
/* @__PURE__ */ c(
|
|
993
|
-
|
|
1283
|
+
ke,
|
|
994
1284
|
{
|
|
995
|
-
color:
|
|
1285
|
+
color: s,
|
|
996
1286
|
onChange: M
|
|
997
1287
|
}
|
|
998
1288
|
)
|
|
@@ -1004,26 +1294,26 @@ const Fe = (t) => {
|
|
|
1004
1294
|
"div",
|
|
1005
1295
|
{
|
|
1006
1296
|
className: "univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
1007
|
-
children:
|
|
1297
|
+
children: n.t("sheet.cf.valueType.min")
|
|
1008
1298
|
}
|
|
1009
1299
|
),
|
|
1010
1300
|
/* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
|
|
1011
1301
|
/* @__PURE__ */ c(
|
|
1012
|
-
|
|
1302
|
+
ae,
|
|
1013
1303
|
{
|
|
1014
1304
|
className: "univer-w-1/2 univer-flex-shrink-0",
|
|
1015
|
-
options:
|
|
1305
|
+
options: u,
|
|
1016
1306
|
value: p,
|
|
1017
1307
|
onChange: (m) => {
|
|
1018
1308
|
y(m);
|
|
1019
|
-
const _ =
|
|
1309
|
+
const _ = Xe(m, 10);
|
|
1020
1310
|
R(_), C({
|
|
1021
1311
|
isGradient: i,
|
|
1022
1312
|
minValue: _,
|
|
1023
1313
|
minValueType: m,
|
|
1024
1314
|
maxValue: x,
|
|
1025
1315
|
maxValueType: f,
|
|
1026
|
-
positiveColor:
|
|
1316
|
+
positiveColor: s,
|
|
1027
1317
|
nativeColor: a,
|
|
1028
1318
|
isShowValue: g
|
|
1029
1319
|
});
|
|
@@ -1031,7 +1321,7 @@ const Fe = (t) => {
|
|
|
1031
1321
|
}
|
|
1032
1322
|
),
|
|
1033
1323
|
/* @__PURE__ */ c(
|
|
1034
|
-
|
|
1324
|
+
nn,
|
|
1035
1325
|
{
|
|
1036
1326
|
id: "min",
|
|
1037
1327
|
className: "univer-ml-3",
|
|
@@ -1045,7 +1335,7 @@ const Fe = (t) => {
|
|
|
1045
1335
|
minValueType: p,
|
|
1046
1336
|
maxValue: x,
|
|
1047
1337
|
maxValueType: f,
|
|
1048
|
-
positiveColor:
|
|
1338
|
+
positiveColor: s,
|
|
1049
1339
|
nativeColor: a,
|
|
1050
1340
|
isShowValue: g
|
|
1051
1341
|
});
|
|
@@ -1057,26 +1347,26 @@ const Fe = (t) => {
|
|
|
1057
1347
|
"div",
|
|
1058
1348
|
{
|
|
1059
1349
|
className: "univer-mt-3 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
1060
|
-
children:
|
|
1350
|
+
children: n.t("sheet.cf.valueType.max")
|
|
1061
1351
|
}
|
|
1062
1352
|
),
|
|
1063
1353
|
/* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
|
|
1064
1354
|
/* @__PURE__ */ c(
|
|
1065
|
-
|
|
1355
|
+
ae,
|
|
1066
1356
|
{
|
|
1067
1357
|
className: "univer-w-1/2 univer-flex-shrink-0",
|
|
1068
1358
|
options: v,
|
|
1069
1359
|
value: f,
|
|
1070
1360
|
onChange: (m) => {
|
|
1071
1361
|
w(m);
|
|
1072
|
-
const _ =
|
|
1362
|
+
const _ = Xe(m, 90);
|
|
1073
1363
|
T(_), C({
|
|
1074
1364
|
isGradient: i,
|
|
1075
1365
|
minValue: I,
|
|
1076
1366
|
minValueType: p,
|
|
1077
1367
|
maxValue: _,
|
|
1078
1368
|
maxValueType: m,
|
|
1079
|
-
positiveColor:
|
|
1369
|
+
positiveColor: s,
|
|
1080
1370
|
nativeColor: a,
|
|
1081
1371
|
isShowValue: g
|
|
1082
1372
|
});
|
|
@@ -1084,7 +1374,7 @@ const Fe = (t) => {
|
|
|
1084
1374
|
}
|
|
1085
1375
|
),
|
|
1086
1376
|
/* @__PURE__ */ c(
|
|
1087
|
-
|
|
1377
|
+
nn,
|
|
1088
1378
|
{
|
|
1089
1379
|
className: "univer-ml-3",
|
|
1090
1380
|
disabled: !V(f),
|
|
@@ -1098,7 +1388,7 @@ const Fe = (t) => {
|
|
|
1098
1388
|
minValueType: p,
|
|
1099
1389
|
maxValue: m || 0,
|
|
1100
1390
|
maxValueType: f,
|
|
1101
|
-
positiveColor:
|
|
1391
|
+
positiveColor: s,
|
|
1102
1392
|
nativeColor: a,
|
|
1103
1393
|
isShowValue: g
|
|
1104
1394
|
});
|
|
@@ -1108,17 +1398,17 @@ const Fe = (t) => {
|
|
|
1108
1398
|
] })
|
|
1109
1399
|
] })
|
|
1110
1400
|
] });
|
|
1111
|
-
},
|
|
1112
|
-
const { style: e, onChange:
|
|
1401
|
+
}, lt = (t) => [se.FALSE, void 0].includes(t) ? se.TRUE : se.FALSE, ct = (t) => t !== se.FALSE, Zt = (t) => {
|
|
1402
|
+
const { style: e, onChange: n, className: r } = t, [i, o] = N(() => {
|
|
1113
1403
|
if (e != null && e.bl)
|
|
1114
1404
|
return e.bl;
|
|
1115
|
-
}), [
|
|
1405
|
+
}), [s, d] = N(() => {
|
|
1116
1406
|
if (e != null && e.it)
|
|
1117
1407
|
return e.it;
|
|
1118
1408
|
}), [a, h] = N(() => {
|
|
1119
1409
|
if (e != null && e.ul)
|
|
1120
1410
|
return e.ul.s;
|
|
1121
|
-
}), [l,
|
|
1411
|
+
}), [l, u] = N(() => {
|
|
1122
1412
|
if (e != null && e.st)
|
|
1123
1413
|
return e.st.s;
|
|
1124
1414
|
}), [v, p] = N(() => {
|
|
@@ -1133,94 +1423,94 @@ const Fe = (t) => {
|
|
|
1133
1423
|
X(() => {
|
|
1134
1424
|
const I = {
|
|
1135
1425
|
bl: i,
|
|
1136
|
-
it:
|
|
1426
|
+
it: s
|
|
1137
1427
|
};
|
|
1138
|
-
v !== void 0 && (I.cl = { rgb: v }), y !== void 0 && (I.bg = { rgb: y }), l !== void 0 && (I.st = { s: l }), a !== void 0 && (I.ul = { s: a }),
|
|
1139
|
-
}, [i,
|
|
1428
|
+
v !== void 0 && (I.cl = { rgb: v }), y !== void 0 && (I.bg = { rgb: y }), l !== void 0 && (I.st = { s: l }), a !== void 0 && (I.ul = { s: a }), n(Mr(I));
|
|
1429
|
+
}, [i, s, a, l, v, y]);
|
|
1140
1430
|
const w = "univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-px-1";
|
|
1141
|
-
return /* @__PURE__ */ k("div", { className: Y("univer-my-2.5 univer-flex univer-justify-between",
|
|
1431
|
+
return /* @__PURE__ */ k("div", { className: Y("univer-my-2.5 univer-flex univer-justify-between", r), children: [
|
|
1142
1432
|
/* @__PURE__ */ c(
|
|
1143
1433
|
"div",
|
|
1144
1434
|
{
|
|
1145
1435
|
className: Y(w, {
|
|
1146
|
-
"univer-bg-gray-100 dark:!univer-bg-gray-700":
|
|
1436
|
+
"univer-bg-gray-100 dark:!univer-bg-gray-700": ct(i || se.FALSE)
|
|
1147
1437
|
}),
|
|
1148
|
-
onClick: () =>
|
|
1149
|
-
children: /* @__PURE__ */ c(
|
|
1438
|
+
onClick: () => o(lt(i)),
|
|
1439
|
+
children: /* @__PURE__ */ c(Zn, {})
|
|
1150
1440
|
}
|
|
1151
1441
|
),
|
|
1152
1442
|
/* @__PURE__ */ c(
|
|
1153
1443
|
"div",
|
|
1154
1444
|
{
|
|
1155
1445
|
className: Y(w, {
|
|
1156
|
-
"univer-bg-gray-100 dark:!univer-bg-gray-700":
|
|
1446
|
+
"univer-bg-gray-100 dark:!univer-bg-gray-700": ct(s || se.FALSE)
|
|
1157
1447
|
}),
|
|
1158
|
-
onClick: () =>
|
|
1159
|
-
children: /* @__PURE__ */ c(
|
|
1448
|
+
onClick: () => d(lt(s)),
|
|
1449
|
+
children: /* @__PURE__ */ c(Yn, {})
|
|
1160
1450
|
}
|
|
1161
1451
|
),
|
|
1162
1452
|
/* @__PURE__ */ c(
|
|
1163
1453
|
"div",
|
|
1164
1454
|
{
|
|
1165
1455
|
className: Y(w, {
|
|
1166
|
-
"univer-bg-gray-100 dark:!univer-bg-gray-700":
|
|
1456
|
+
"univer-bg-gray-100 dark:!univer-bg-gray-700": ct(a || se.FALSE)
|
|
1167
1457
|
}),
|
|
1168
|
-
onClick: () => h(
|
|
1169
|
-
children: /* @__PURE__ */ c(
|
|
1458
|
+
onClick: () => h(lt(a)),
|
|
1459
|
+
children: /* @__PURE__ */ c(Jn, {})
|
|
1170
1460
|
}
|
|
1171
1461
|
),
|
|
1172
1462
|
/* @__PURE__ */ c(
|
|
1173
1463
|
"div",
|
|
1174
1464
|
{
|
|
1175
1465
|
className: Y(w, {
|
|
1176
|
-
"univer-bg-gray-100 dark:!univer-bg-gray-700":
|
|
1466
|
+
"univer-bg-gray-100 dark:!univer-bg-gray-700": ct(l || se.FALSE)
|
|
1177
1467
|
}),
|
|
1178
|
-
onClick: () =>
|
|
1179
|
-
children: /* @__PURE__ */ c(
|
|
1468
|
+
onClick: () => u(lt(l)),
|
|
1469
|
+
children: /* @__PURE__ */ c(Xn, {})
|
|
1180
1470
|
}
|
|
1181
1471
|
),
|
|
1182
|
-
/* @__PURE__ */ c(
|
|
1183
|
-
/* @__PURE__ */ c(
|
|
1472
|
+
/* @__PURE__ */ c(ke, { color: v, onChange: p, Icon: Qn }),
|
|
1473
|
+
/* @__PURE__ */ c(ke, { color: y, onChange: f })
|
|
1184
1474
|
] });
|
|
1185
|
-
},
|
|
1475
|
+
}, Ri = (t) => {
|
|
1186
1476
|
var T;
|
|
1187
|
-
const { onChange: e, interceptorManager:
|
|
1477
|
+
const { onChange: e, interceptorManager: n } = t, r = q(re), o = q(Z).getCurrentUnitForType(A.UNIVER_SHEET), s = o.getActiveSheet(), d = ((T = t.rule) == null ? void 0 : T.type) === L.highlightCell ? t.rule : void 0, a = ve(null), [h, l] = N(!1), u = ve(null), [v, p] = N({}), [y, f] = N(() => (d == null ? void 0 : d.subType) === F.formula ? d.value : "="), [w, I] = N(void 0), R = (g) => ({
|
|
1188
1478
|
style: g.style,
|
|
1189
1479
|
value: y,
|
|
1190
1480
|
type: L.highlightCell,
|
|
1191
1481
|
subType: F.formula
|
|
1192
1482
|
});
|
|
1193
|
-
X(() =>
|
|
1483
|
+
X(() => n.intercept(n.getInterceptPoints().submit, {
|
|
1194
1484
|
handler() {
|
|
1195
1485
|
return R({ style: v });
|
|
1196
1486
|
}
|
|
1197
|
-
}), [v, y,
|
|
1198
|
-
handler: (b, S, C) => w || y.length === 1 || !y.startsWith("=") ? (I(
|
|
1487
|
+
}), [v, y, n]), X(() => n.intercept(n.getInterceptPoints().beforeSubmit, {
|
|
1488
|
+
handler: (b, S, C) => w || y.length === 1 || !y.startsWith("=") ? (I(r.t("sheet.cf.errorMessage.formulaError")), !1) : C(b)
|
|
1199
1489
|
}), [w, y]);
|
|
1200
1490
|
const x = (g) => {
|
|
1201
1491
|
e(R(g));
|
|
1202
1492
|
};
|
|
1203
|
-
return
|
|
1493
|
+
return Et((g) => {
|
|
1204
1494
|
var S;
|
|
1205
|
-
((S =
|
|
1495
|
+
((S = u.current) == null ? void 0 : S.isClickOutSide(g)) && l(!1);
|
|
1206
1496
|
}), /* @__PURE__ */ k("div", { ref: a, children: [
|
|
1207
1497
|
/* @__PURE__ */ c(
|
|
1208
1498
|
"div",
|
|
1209
1499
|
{
|
|
1210
1500
|
className: "univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
1211
|
-
children:
|
|
1501
|
+
children: r.t("sheet.cf.panel.styleRule")
|
|
1212
1502
|
}
|
|
1213
1503
|
),
|
|
1214
1504
|
/* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
|
|
1215
|
-
|
|
1505
|
+
Nt,
|
|
1216
1506
|
{
|
|
1217
|
-
ref:
|
|
1218
|
-
className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",
|
|
1507
|
+
ref: u,
|
|
1508
|
+
className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Fe),
|
|
1219
1509
|
errorText: w,
|
|
1220
1510
|
isFocus: h,
|
|
1221
1511
|
initValue: y,
|
|
1222
|
-
unitId:
|
|
1223
|
-
subUnitId:
|
|
1512
|
+
unitId: o.getUnitId(),
|
|
1513
|
+
subUnitId: s == null ? void 0 : s.getSheetId(),
|
|
1224
1514
|
onFocus: () => {
|
|
1225
1515
|
l(!0);
|
|
1226
1516
|
},
|
|
@@ -1228,15 +1518,15 @@ const Fe = (t) => {
|
|
|
1228
1518
|
f(g), x({ style: v });
|
|
1229
1519
|
},
|
|
1230
1520
|
onVerify: (g, b) => {
|
|
1231
|
-
!g || b.length === 1 ? I(
|
|
1521
|
+
!g || b.length === 1 ? I(r.t("sheet.cf.errorMessage.formulaError")) : I(void 0);
|
|
1232
1522
|
}
|
|
1233
1523
|
}
|
|
1234
1524
|
) }),
|
|
1235
|
-
/* @__PURE__ */ c("div", { className:
|
|
1525
|
+
/* @__PURE__ */ c("div", { className: st, children: /* @__PURE__ */ c(Be, { rule: R({ style: v }) }) }),
|
|
1236
1526
|
/* @__PURE__ */ c(
|
|
1237
|
-
|
|
1527
|
+
Zt,
|
|
1238
1528
|
{
|
|
1239
|
-
style:
|
|
1529
|
+
style: d == null ? void 0 : d.style,
|
|
1240
1530
|
className: "univer-mt-3",
|
|
1241
1531
|
onChange: (g) => {
|
|
1242
1532
|
p(g), x({ style: g });
|
|
@@ -1244,7 +1534,7 @@ const Fe = (t) => {
|
|
|
1244
1534
|
}
|
|
1245
1535
|
)
|
|
1246
1536
|
] });
|
|
1247
|
-
},
|
|
1537
|
+
}, ut = (t) => /* @__PURE__ */ k("div", { className: "univer-relative", children: [
|
|
1248
1538
|
/* @__PURE__ */ c(
|
|
1249
1539
|
"div",
|
|
1250
1540
|
{
|
|
@@ -1253,26 +1543,26 @@ const Fe = (t) => {
|
|
|
1253
1543
|
}
|
|
1254
1544
|
),
|
|
1255
1545
|
t.children
|
|
1256
|
-
] }), W = (t, e) => ({ label: e.t(`sheet.cf.operator.${t}`), value: t }),
|
|
1257
|
-
const { type: e, operator:
|
|
1546
|
+
] }), W = (t, e) => ({ label: e.t(`sheet.cf.operator.${t}`), value: t }), Ti = (t) => {
|
|
1547
|
+
const { type: e, operator: n, onChange: r, value: i, interceptorManager: o } = t, s = q(re), [d, a] = N(() => typeof i == "number" ? i : 0), [h, l] = N(""), [u, v] = N(() => typeof i == "string" ? i : ""), [p, y] = N(""), [f, w] = N(() => Array.isArray(i) ? i[0] === void 0 ? 0 : i[0] : 0), [I, R] = N(""), [x, T] = N(() => Array.isArray(i) ? i[1] === void 0 ? 100 : i[1] : 100), [g, b] = N("");
|
|
1258
1548
|
switch (X(() => {
|
|
1259
1549
|
switch (e) {
|
|
1260
1550
|
case F.text: {
|
|
1261
|
-
[H.beginsWith, H.endsWith, H.containsText, H.notContainsText, H.equal, H.notEqual].includes(
|
|
1551
|
+
[H.beginsWith, H.endsWith, H.containsText, H.notContainsText, H.equal, H.notEqual].includes(n) && r(u);
|
|
1262
1552
|
break;
|
|
1263
1553
|
}
|
|
1264
1554
|
case F.number: {
|
|
1265
|
-
[U.equal, U.notEqual, U.greaterThan, U.greaterThanOrEqual, U.lessThan, U.lessThanOrEqual].includes(
|
|
1555
|
+
[U.equal, U.notEqual, U.greaterThan, U.greaterThanOrEqual, U.lessThan, U.lessThanOrEqual].includes(n) && r(d), [U.between, U.notBetween].includes(n) && r([f, x]);
|
|
1266
1556
|
break;
|
|
1267
1557
|
}
|
|
1268
1558
|
}
|
|
1269
1559
|
}, [e]), X(() => {
|
|
1270
|
-
const S =
|
|
1560
|
+
const S = o.intercept(o.getInterceptPoints().beforeSubmit, {
|
|
1271
1561
|
handler: (C, M, E) => {
|
|
1272
1562
|
switch (e) {
|
|
1273
1563
|
case F.text:
|
|
1274
|
-
if ([H.beginsWith, H.containsText, H.endsWith, H.notEqual, H.notContainsText, H.equal].includes(
|
|
1275
|
-
return
|
|
1564
|
+
if ([H.beginsWith, H.containsText, H.endsWith, H.notEqual, H.notContainsText, H.equal].includes(n))
|
|
1565
|
+
return u ? E(C) : (y(s.t("sheet.cf.errorMessage.notBlank")), !1);
|
|
1276
1566
|
}
|
|
1277
1567
|
return E(C);
|
|
1278
1568
|
}
|
|
@@ -1280,16 +1570,16 @@ const Fe = (t) => {
|
|
|
1280
1570
|
return () => {
|
|
1281
1571
|
S();
|
|
1282
1572
|
};
|
|
1283
|
-
}, [e,
|
|
1573
|
+
}, [e, d, u, n]), e) {
|
|
1284
1574
|
case F.text: {
|
|
1285
|
-
if ([H.beginsWith, H.endsWith, H.containsText, H.notContainsText, H.equal, H.notEqual].includes(
|
|
1575
|
+
if ([H.beginsWith, H.endsWith, H.containsText, H.notContainsText, H.equal, H.notEqual].includes(n)) {
|
|
1286
1576
|
const S = (C) => {
|
|
1287
|
-
v(C),
|
|
1577
|
+
v(C), r(C);
|
|
1288
1578
|
};
|
|
1289
|
-
return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
|
|
1290
|
-
|
|
1579
|
+
return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(ut, { errorText: p, children: /* @__PURE__ */ c(
|
|
1580
|
+
Xr,
|
|
1291
1581
|
{
|
|
1292
|
-
value:
|
|
1582
|
+
value: u,
|
|
1293
1583
|
onChange: (C) => {
|
|
1294
1584
|
y(""), S(C);
|
|
1295
1585
|
}
|
|
@@ -1299,31 +1589,31 @@ const Fe = (t) => {
|
|
|
1299
1589
|
break;
|
|
1300
1590
|
}
|
|
1301
1591
|
case F.number: {
|
|
1302
|
-
if ([U.equal, U.notEqual, U.greaterThan, U.greaterThanOrEqual, U.lessThan, U.lessThanOrEqual].includes(
|
|
1592
|
+
if ([U.equal, U.notEqual, U.greaterThan, U.greaterThanOrEqual, U.lessThan, U.lessThanOrEqual].includes(n)) {
|
|
1303
1593
|
const S = (C) => {
|
|
1304
|
-
a(C || 0),
|
|
1594
|
+
a(C || 0), r(C || 0), l("");
|
|
1305
1595
|
};
|
|
1306
|
-
return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
|
|
1307
|
-
|
|
1596
|
+
return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(ut, { errorText: h, children: /* @__PURE__ */ c(
|
|
1597
|
+
Ve,
|
|
1308
1598
|
{
|
|
1309
1599
|
className: "univer-w-full",
|
|
1310
1600
|
min: Number.MIN_SAFE_INTEGER,
|
|
1311
1601
|
max: Number.MAX_SAFE_INTEGER,
|
|
1312
|
-
value:
|
|
1602
|
+
value: d,
|
|
1313
1603
|
onChange: S
|
|
1314
1604
|
}
|
|
1315
1605
|
) }) });
|
|
1316
1606
|
}
|
|
1317
|
-
if ([U.between, U.notBetween].includes(
|
|
1607
|
+
if ([U.between, U.notBetween].includes(n)) {
|
|
1318
1608
|
const S = (M) => {
|
|
1319
|
-
w(M || 0),
|
|
1609
|
+
w(M || 0), r([M || 0, x]), R("");
|
|
1320
1610
|
}, C = (M) => {
|
|
1321
|
-
T(M || 0),
|
|
1611
|
+
T(M || 0), r([f, M || 0]), b("");
|
|
1322
1612
|
};
|
|
1323
1613
|
return /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
|
|
1324
|
-
/* @__PURE__ */ c(
|
|
1325
|
-
/* @__PURE__ */ c(
|
|
1326
|
-
|
|
1614
|
+
/* @__PURE__ */ c(ut, { errorText: I, children: /* @__PURE__ */ c(Ve, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, value: f, onChange: S }) }),
|
|
1615
|
+
/* @__PURE__ */ c(ut, { errorText: g, children: /* @__PURE__ */ c(
|
|
1616
|
+
Ve,
|
|
1327
1617
|
{
|
|
1328
1618
|
className: "univer-ml-3",
|
|
1329
1619
|
min: Number.MIN_SAFE_INTEGER,
|
|
@@ -1337,7 +1627,7 @@ const Fe = (t) => {
|
|
|
1337
1627
|
}
|
|
1338
1628
|
}
|
|
1339
1629
|
return null;
|
|
1340
|
-
},
|
|
1630
|
+
}, rn = (t, e) => {
|
|
1341
1631
|
switch (t) {
|
|
1342
1632
|
case F.text:
|
|
1343
1633
|
return [
|
|
@@ -1365,55 +1655,55 @@ const Fe = (t) => {
|
|
|
1365
1655
|
];
|
|
1366
1656
|
case F.timePeriod:
|
|
1367
1657
|
return [
|
|
1368
|
-
W(
|
|
1369
|
-
W(
|
|
1370
|
-
W(
|
|
1371
|
-
W(
|
|
1372
|
-
W(
|
|
1373
|
-
W(
|
|
1374
|
-
W(
|
|
1375
|
-
W(
|
|
1376
|
-
W(
|
|
1377
|
-
W(
|
|
1658
|
+
W(he.yesterday, e),
|
|
1659
|
+
W(he.today, e),
|
|
1660
|
+
W(he.tomorrow, e),
|
|
1661
|
+
W(he.last7Days, e),
|
|
1662
|
+
W(he.lastWeek, e),
|
|
1663
|
+
W(he.thisWeek, e),
|
|
1664
|
+
W(he.nextWeek, e),
|
|
1665
|
+
W(he.lastMonth, e),
|
|
1666
|
+
W(he.thisMonth, e),
|
|
1667
|
+
W(he.nextMonth, e)
|
|
1378
1668
|
];
|
|
1379
1669
|
}
|
|
1380
1670
|
}, on = (t) => {
|
|
1381
1671
|
var T;
|
|
1382
|
-
const { interceptorManager: e, onChange:
|
|
1672
|
+
const { interceptorManager: e, onChange: n } = t, r = q(re), i = ((T = t.rule) == null ? void 0 : T.type) === L.highlightCell ? t.rule : void 0, [o, s] = N(() => {
|
|
1383
1673
|
const g = F.text;
|
|
1384
1674
|
return i && i.subType || g;
|
|
1385
|
-
}),
|
|
1675
|
+
}), d = [{
|
|
1386
1676
|
value: F.text,
|
|
1387
|
-
label:
|
|
1677
|
+
label: r.t("sheet.cf.subRuleType.text")
|
|
1388
1678
|
}, {
|
|
1389
1679
|
value: F.number,
|
|
1390
|
-
label:
|
|
1680
|
+
label: r.t("sheet.cf.subRuleType.number")
|
|
1391
1681
|
}, {
|
|
1392
1682
|
value: F.timePeriod,
|
|
1393
|
-
label:
|
|
1683
|
+
label: r.t("sheet.cf.subRuleType.timePeriod")
|
|
1394
1684
|
}, {
|
|
1395
1685
|
value: F.duplicateValues,
|
|
1396
|
-
label:
|
|
1686
|
+
label: r.t("sheet.cf.subRuleType.duplicateValues")
|
|
1397
1687
|
}, {
|
|
1398
1688
|
value: F.uniqueValues,
|
|
1399
|
-
label:
|
|
1400
|
-
}], a = J(() =>
|
|
1689
|
+
label: r.t("sheet.cf.subRuleType.uniqueValues")
|
|
1690
|
+
}], a = J(() => rn(o, r), [o]), [h, l] = N(() => {
|
|
1401
1691
|
const g = a ? a[0].value : void 0;
|
|
1402
1692
|
return i && i.operator || g;
|
|
1403
|
-
}), [
|
|
1693
|
+
}), [u, v] = N(() => {
|
|
1404
1694
|
var S;
|
|
1405
|
-
return i ? (S = i.value) != null ? S :
|
|
1695
|
+
return i ? (S = i.value) != null ? S : pt(i.subType, i.operator) : "";
|
|
1406
1696
|
}), [p, y] = N({}), f = J(() => (g) => {
|
|
1407
|
-
var b, S, C, M, E, V, O, m, _, j, K, pe,
|
|
1408
|
-
switch (g.subType ||
|
|
1697
|
+
var b, S, C, M, E, V, O, m, _, j, K, fe, pe, Le, Ue;
|
|
1698
|
+
switch (g.subType || o) {
|
|
1409
1699
|
case F.text: {
|
|
1410
1700
|
if ([H.beginsWith, H.endsWith, H.containsText, H.notContainsText, H.equal, H.notEqual].includes(h))
|
|
1411
1701
|
return {
|
|
1412
1702
|
type: L.highlightCell,
|
|
1413
|
-
subType: (b = g.subType) != null ? b :
|
|
1703
|
+
subType: (b = g.subType) != null ? b : o,
|
|
1414
1704
|
operator: (S = g.operator) != null ? S : h,
|
|
1415
1705
|
style: (C = g.style) != null ? C : p,
|
|
1416
|
-
value: (M = g.value) != null ? M :
|
|
1706
|
+
value: (M = g.value) != null ? M : u
|
|
1417
1707
|
};
|
|
1418
1708
|
break;
|
|
1419
1709
|
}
|
|
@@ -1421,65 +1711,65 @@ const Fe = (t) => {
|
|
|
1421
1711
|
if ([U.equal, U.notEqual, U.greaterThan, U.greaterThanOrEqual, U.lessThan, U.lessThanOrEqual].includes(h))
|
|
1422
1712
|
return {
|
|
1423
1713
|
type: L.highlightCell,
|
|
1424
|
-
subType: (E = g.subType) != null ? E :
|
|
1714
|
+
subType: (E = g.subType) != null ? E : o,
|
|
1425
1715
|
operator: (V = g.operator) != null ? V : h,
|
|
1426
1716
|
style: (O = g.style) != null ? O : p,
|
|
1427
|
-
value: (m = g.value) != null ? m :
|
|
1717
|
+
value: (m = g.value) != null ? m : u
|
|
1428
1718
|
};
|
|
1429
1719
|
if ([U.between, U.notBetween].includes(h))
|
|
1430
1720
|
return {
|
|
1431
1721
|
type: L.highlightCell,
|
|
1432
|
-
subType: (_ = g.subType) != null ? _ :
|
|
1722
|
+
subType: (_ = g.subType) != null ? _ : o,
|
|
1433
1723
|
operator: (j = g.operator) != null ? j : h,
|
|
1434
1724
|
style: (K = g.style) != null ? K : p,
|
|
1435
|
-
value: (
|
|
1725
|
+
value: (fe = g.value) != null ? fe : u
|
|
1436
1726
|
};
|
|
1437
1727
|
break;
|
|
1438
1728
|
}
|
|
1439
1729
|
}
|
|
1440
1730
|
return {
|
|
1441
1731
|
type: L.highlightCell,
|
|
1442
|
-
subType: (
|
|
1443
|
-
operator: (
|
|
1444
|
-
style: (
|
|
1732
|
+
subType: (pe = g.subType) != null ? pe : o,
|
|
1733
|
+
operator: (Le = g.operator) != null ? Le : h,
|
|
1734
|
+
style: (Ue = g.style) != null ? Ue : p
|
|
1445
1735
|
};
|
|
1446
|
-
}, [
|
|
1736
|
+
}, [o, h, u, p]);
|
|
1447
1737
|
X(() => e.intercept(e.getInterceptPoints().submit, {
|
|
1448
1738
|
handler() {
|
|
1449
1739
|
return f({});
|
|
1450
1740
|
}
|
|
1451
1741
|
}), [f, e]), X(() => {
|
|
1452
|
-
|
|
1453
|
-
}, [
|
|
1742
|
+
d.some((g) => g.value === o) || s(d[0].value);
|
|
1743
|
+
}, [d]);
|
|
1454
1744
|
const w = (g) => {
|
|
1455
|
-
const b = g, S =
|
|
1456
|
-
|
|
1745
|
+
const b = g, S = rn(b, r), C = S && S[0].value;
|
|
1746
|
+
s(b), l(C), C && v(pt(b, C)), n(f({ subType: b, operator: C }));
|
|
1457
1747
|
}, I = (g) => {
|
|
1458
1748
|
const b = g;
|
|
1459
|
-
l(b),
|
|
1749
|
+
l(b), n(f({ operator: b }));
|
|
1460
1750
|
}, R = (g) => {
|
|
1461
|
-
v(g),
|
|
1462
|
-
}, x = J(() => `${
|
|
1751
|
+
v(g), n(f({ value: g }));
|
|
1752
|
+
}, x = J(() => `${o}_${h}_${Math.random()}`, [o, h]);
|
|
1463
1753
|
return /* @__PURE__ */ k("div", { children: [
|
|
1464
1754
|
/* @__PURE__ */ c(
|
|
1465
1755
|
"div",
|
|
1466
1756
|
{
|
|
1467
1757
|
className: "univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
1468
|
-
children:
|
|
1758
|
+
children: r.t("sheet.cf.panel.styleRule")
|
|
1469
1759
|
}
|
|
1470
1760
|
),
|
|
1471
1761
|
/* @__PURE__ */ k("div", { className: "univer-flex univer-justify-between univer-gap-4", children: [
|
|
1472
1762
|
/* @__PURE__ */ c(
|
|
1473
|
-
|
|
1763
|
+
ae,
|
|
1474
1764
|
{
|
|
1475
1765
|
className: "univer-mt-3 univer-w-full",
|
|
1476
1766
|
onChange: w,
|
|
1477
|
-
value:
|
|
1478
|
-
options:
|
|
1767
|
+
value: o,
|
|
1768
|
+
options: d
|
|
1479
1769
|
}
|
|
1480
1770
|
),
|
|
1481
1771
|
(a == null ? void 0 : a.length) && /* @__PURE__ */ c(
|
|
1482
|
-
|
|
1772
|
+
ae,
|
|
1483
1773
|
{
|
|
1484
1774
|
className: "univer-mt-3 univer-w-full",
|
|
1485
1775
|
onChange: I,
|
|
@@ -1489,85 +1779,85 @@ const Fe = (t) => {
|
|
|
1489
1779
|
)
|
|
1490
1780
|
] }),
|
|
1491
1781
|
/* @__PURE__ */ c(
|
|
1492
|
-
|
|
1782
|
+
Ti,
|
|
1493
1783
|
{
|
|
1494
|
-
value:
|
|
1784
|
+
value: u,
|
|
1495
1785
|
interceptorManager: e,
|
|
1496
|
-
type:
|
|
1786
|
+
type: o,
|
|
1497
1787
|
operator: h,
|
|
1498
1788
|
rule: i,
|
|
1499
1789
|
onChange: R
|
|
1500
1790
|
},
|
|
1501
1791
|
x
|
|
1502
1792
|
),
|
|
1503
|
-
/* @__PURE__ */ c("div", { className:
|
|
1793
|
+
/* @__PURE__ */ c("div", { className: st, children: /* @__PURE__ */ c(Be, { rule: f({}) }) }),
|
|
1504
1794
|
/* @__PURE__ */ c(
|
|
1505
|
-
|
|
1795
|
+
Zt,
|
|
1506
1796
|
{
|
|
1507
1797
|
style: i == null ? void 0 : i.style,
|
|
1508
1798
|
className: "univer-ml-1",
|
|
1509
1799
|
onChange: (g) => {
|
|
1510
|
-
y(g),
|
|
1800
|
+
y(g), n(f({ style: g }));
|
|
1511
1801
|
}
|
|
1512
1802
|
}
|
|
1513
1803
|
)
|
|
1514
1804
|
] });
|
|
1515
|
-
},
|
|
1805
|
+
}, tr = (t, e) => (Me[t] || [])[Number(e)] || "", xi = (t) => {
|
|
1516
1806
|
var l;
|
|
1517
|
-
const { error: e, type:
|
|
1518
|
-
return
|
|
1807
|
+
const { error: e, type: n, onChange: r } = t, i = q(Z), o = i.getCurrentUnitForType(A.UNIVER_SHEET).getUnitId(), s = (l = i.getCurrentUnitForType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : l.getSheetId(), d = ve(null), [a, h] = N(!1);
|
|
1808
|
+
return Et((u) => {
|
|
1519
1809
|
var p;
|
|
1520
|
-
((p =
|
|
1521
|
-
}), /* @__PURE__ */ c("div", { className: "univer-relative", children:
|
|
1810
|
+
((p = d.current) == null ? void 0 : p.isClickOutSide(u)) && h(!1);
|
|
1811
|
+
}), /* @__PURE__ */ c("div", { className: "univer-relative", children: n !== $.formula ? /* @__PURE__ */ k(Ht, { children: [
|
|
1522
1812
|
/* @__PURE__ */ c(
|
|
1523
|
-
|
|
1813
|
+
Ve,
|
|
1524
1814
|
{
|
|
1525
1815
|
className: Y({
|
|
1526
1816
|
"univer-border-red-500": e
|
|
1527
1817
|
}),
|
|
1528
1818
|
value: Number(t.value) || 0,
|
|
1529
|
-
onChange: (
|
|
1819
|
+
onChange: (u) => r(u != null ? u : 0)
|
|
1530
1820
|
}
|
|
1531
1821
|
),
|
|
1532
1822
|
e && /* @__PURE__ */ c("div", { className: "univer-absolute univer-text-xs univer-text-red-500", children: e })
|
|
1533
1823
|
] }) : /* @__PURE__ */ c("div", { className: "univer-w-full", children: /* @__PURE__ */ c(
|
|
1534
|
-
|
|
1824
|
+
Nt,
|
|
1535
1825
|
{
|
|
1536
|
-
ref:
|
|
1537
|
-
className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent",
|
|
1826
|
+
ref: d,
|
|
1827
|
+
className: Y("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", Fe),
|
|
1538
1828
|
initValue: String(t.value),
|
|
1539
|
-
unitId:
|
|
1540
|
-
subUnitId:
|
|
1829
|
+
unitId: o,
|
|
1830
|
+
subUnitId: s,
|
|
1541
1831
|
isFocus: a,
|
|
1542
|
-
onChange: (
|
|
1543
|
-
|
|
1832
|
+
onChange: (u = "") => {
|
|
1833
|
+
r(u || "");
|
|
1544
1834
|
},
|
|
1545
1835
|
onFocus: () => h(!0)
|
|
1546
1836
|
}
|
|
1547
1837
|
) }) });
|
|
1548
|
-
},
|
|
1838
|
+
}, sn = (t, e, n) => ({
|
|
1549
1839
|
operator: U.greaterThan,
|
|
1550
|
-
value: { type:
|
|
1840
|
+
value: { type: $.num, value: (n.length - 1 - e) * 10 },
|
|
1551
1841
|
iconType: t,
|
|
1552
1842
|
iconId: String(e)
|
|
1553
|
-
}),
|
|
1554
|
-
const { onClick:
|
|
1555
|
-
|
|
1843
|
+
}), Ei = ue((t, e) => {
|
|
1844
|
+
const { onClick: n } = t, r = q(re), i = (o) => {
|
|
1845
|
+
n(o);
|
|
1556
1846
|
};
|
|
1557
|
-
return /* @__PURE__ */ c("div", { ref: e, className: "univer-w-80", children:
|
|
1558
|
-
/* @__PURE__ */ c("div", { className: "univer-mb-1 univer-text-sm", children:
|
|
1559
|
-
/* @__PURE__ */ c("div", { className: "univer-flex univer-flex-wrap", children:
|
|
1847
|
+
return /* @__PURE__ */ c("div", { ref: e, className: "univer-w-80", children: Vr.map((o, s) => /* @__PURE__ */ k("div", { className: "univer-mb-3", children: [
|
|
1848
|
+
/* @__PURE__ */ c("div", { className: "univer-mb-1 univer-text-sm", children: r.t(o.title) }),
|
|
1849
|
+
/* @__PURE__ */ c("div", { className: "univer-flex univer-flex-wrap", children: o.group.map((d) => /* @__PURE__ */ c(
|
|
1560
1850
|
"div",
|
|
1561
1851
|
{
|
|
1562
1852
|
className: "univer-mb-1 univer-flex univer-w-1/2 univer-items-center",
|
|
1563
1853
|
onClick: () => {
|
|
1564
|
-
i(
|
|
1854
|
+
i(d.name);
|
|
1565
1855
|
},
|
|
1566
1856
|
children: /* @__PURE__ */ c(
|
|
1567
1857
|
"a",
|
|
1568
1858
|
{
|
|
1569
1859
|
className: "univer-cursor-pointer univer-rounded hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
|
|
1570
|
-
children:
|
|
1860
|
+
children: d.list.map((a, h) => /* @__PURE__ */ c(
|
|
1571
1861
|
"img",
|
|
1572
1862
|
{
|
|
1573
1863
|
className: "univer-size-5",
|
|
@@ -1579,24 +1869,24 @@ const Fe = (t) => {
|
|
|
1579
1869
|
}
|
|
1580
1870
|
)
|
|
1581
1871
|
},
|
|
1582
|
-
|
|
1872
|
+
d.name
|
|
1583
1873
|
)) })
|
|
1584
|
-
] },
|
|
1585
|
-
}),
|
|
1586
|
-
const { onClick: e } = t,
|
|
1874
|
+
] }, s)) });
|
|
1875
|
+
}), Ni = (t) => {
|
|
1876
|
+
const { onClick: e } = t, n = J(() => {
|
|
1587
1877
|
const i = [];
|
|
1588
|
-
for (const
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1878
|
+
for (const o in Me) {
|
|
1879
|
+
const s = Me[o], d = o;
|
|
1880
|
+
s.forEach((a, h) => {
|
|
1591
1881
|
i.push({
|
|
1592
|
-
iconType:
|
|
1882
|
+
iconType: d,
|
|
1593
1883
|
base64: a,
|
|
1594
1884
|
iconId: String(h)
|
|
1595
1885
|
});
|
|
1596
1886
|
});
|
|
1597
1887
|
}
|
|
1598
1888
|
return i;
|
|
1599
|
-
}, []),
|
|
1889
|
+
}, []), r = (i) => {
|
|
1600
1890
|
e(i.iconType, i.iconId);
|
|
1601
1891
|
};
|
|
1602
1892
|
return /* @__PURE__ */ k("div", { children: [
|
|
@@ -1604,14 +1894,14 @@ const Fe = (t) => {
|
|
|
1604
1894
|
"div",
|
|
1605
1895
|
{
|
|
1606
1896
|
className: "univer-mb-2.5 univer-flex univer-cursor-pointer univer-items-center univer-pl-1",
|
|
1607
|
-
onClick: () =>
|
|
1897
|
+
onClick: () => r({ iconType: Fr, iconId: "" }),
|
|
1608
1898
|
children: [
|
|
1609
1899
|
/* @__PURE__ */ c(ot, { className: "univer-size-5" }),
|
|
1610
1900
|
/* @__PURE__ */ c("span", { className: "univer-ml-2", children: "无单元格图标" })
|
|
1611
1901
|
]
|
|
1612
1902
|
}
|
|
1613
1903
|
),
|
|
1614
|
-
/* @__PURE__ */ c("div", { className: "univer-flex univer-w-64 univer-flex-wrap", children:
|
|
1904
|
+
/* @__PURE__ */ c("div", { className: "univer-flex univer-w-64 univer-flex-wrap", children: n.map((i) => /* @__PURE__ */ c(
|
|
1615
1905
|
"div",
|
|
1616
1906
|
{
|
|
1617
1907
|
className: "univer-mb-2 univer-mr-2 univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-rounded hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
|
|
@@ -1621,33 +1911,33 @@ const Fe = (t) => {
|
|
|
1621
1911
|
className: "univer-size-5",
|
|
1622
1912
|
src: i.base64,
|
|
1623
1913
|
draggable: !1,
|
|
1624
|
-
onClick: () =>
|
|
1914
|
+
onClick: () => r(i)
|
|
1625
1915
|
}
|
|
1626
1916
|
)
|
|
1627
1917
|
},
|
|
1628
1918
|
`${i.iconType}_${i.iconId}`
|
|
1629
1919
|
)) })
|
|
1630
1920
|
] });
|
|
1631
|
-
},
|
|
1632
|
-
const { onChange: e, configList:
|
|
1633
|
-
{ label: i.t(`sheet.cf.valueType.${
|
|
1634
|
-
{ label: i.t(`sheet.cf.valueType.${
|
|
1635
|
-
{ label: i.t(`sheet.cf.valueType.${
|
|
1636
|
-
{ label: i.t(`sheet.cf.valueType.${
|
|
1637
|
-
],
|
|
1638
|
-
e([String(v), "value", "value"],
|
|
1639
|
-
}, a = (
|
|
1640
|
-
e([String(v), "operator"],
|
|
1641
|
-
const p =
|
|
1642
|
-
|
|
1643
|
-
}, h = (
|
|
1644
|
-
e([String(v), "value", "type"],
|
|
1645
|
-
const p =
|
|
1646
|
-
|
|
1921
|
+
}, Mi = (t) => {
|
|
1922
|
+
const { onChange: e, configList: n, errorMap: r = {} } = t, i = q(re), o = [{ label: i.t(`sheet.cf.symbol.${U.greaterThan}`), value: U.greaterThan }, { label: i.t(`sheet.cf.symbol.${U.greaterThanOrEqual}`), value: U.greaterThanOrEqual }], s = [
|
|
1923
|
+
{ label: i.t(`sheet.cf.valueType.${$.num}`), value: $.num },
|
|
1924
|
+
{ label: i.t(`sheet.cf.valueType.${$.percent}`), value: $.percent },
|
|
1925
|
+
{ label: i.t(`sheet.cf.valueType.${$.percentile}`), value: $.percentile },
|
|
1926
|
+
{ label: i.t(`sheet.cf.valueType.${$.formula}`), value: $.formula }
|
|
1927
|
+
], d = (u, v) => {
|
|
1928
|
+
e([String(v), "value", "value"], u);
|
|
1929
|
+
}, a = (u, v) => {
|
|
1930
|
+
e([String(v), "operator"], u);
|
|
1931
|
+
const p = pt(F.number, u);
|
|
1932
|
+
d(p, v);
|
|
1933
|
+
}, h = (u, v) => {
|
|
1934
|
+
e([String(v), "value", "type"], u);
|
|
1935
|
+
const p = n[v], y = pt(F.number, p.operator);
|
|
1936
|
+
d(y, v);
|
|
1647
1937
|
};
|
|
1648
|
-
return J(() =>
|
|
1649
|
-
const p =
|
|
1650
|
-
const b = { ...
|
|
1938
|
+
return J(() => n.map((u, v) => {
|
|
1939
|
+
const p = r[v], y = tr(u.iconType, u.iconId), f = v === n.length - 1, w = v === 0, I = n[v - 1], R = (I == null ? void 0 : I.value.type) === $.formula ? i.t("sheet.cf.valueType.formula") : I == null ? void 0 : I.value.value, x = (T, g) => {
|
|
1940
|
+
const b = { ...u, iconId: g, iconType: T };
|
|
1651
1941
|
e([String(v)], b);
|
|
1652
1942
|
};
|
|
1653
1943
|
return /* @__PURE__ */ k(
|
|
@@ -1670,7 +1960,7 @@ const Fe = (t) => {
|
|
|
1670
1960
|
]
|
|
1671
1961
|
}
|
|
1672
1962
|
),
|
|
1673
|
-
/* @__PURE__ */ c("div", { className: "univer-w-[45%]", children: /* @__PURE__ */ k(
|
|
1963
|
+
/* @__PURE__ */ c("div", { className: "univer-w-[45%]", children: /* @__PURE__ */ k(Ht, { children: [
|
|
1674
1964
|
!w && !f && i.t("sheet.cf.iconSet.rule"),
|
|
1675
1965
|
!w && !f && /* @__PURE__ */ k(
|
|
1676
1966
|
"span",
|
|
@@ -1678,7 +1968,7 @@ const Fe = (t) => {
|
|
|
1678
1968
|
className: "univer-font-medium univer-text-gray-600 dark:!univer-text-gray-200",
|
|
1679
1969
|
children: [
|
|
1680
1970
|
i.t("sheet.cf.iconSet.when"),
|
|
1681
|
-
i.t(`sheet.cf.symbol.${
|
|
1971
|
+
i.t(`sheet.cf.symbol.${At(I.operator)}`),
|
|
1682
1972
|
R,
|
|
1683
1973
|
f ? "" : ` ${i.t("sheet.cf.iconSet.and")} `
|
|
1684
1974
|
]
|
|
@@ -1690,16 +1980,16 @@ const Fe = (t) => {
|
|
|
1690
1980
|
),
|
|
1691
1981
|
/* @__PURE__ */ k("div", { className: "univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4", children: [
|
|
1692
1982
|
/* @__PURE__ */ c("div", { className: "univer-flex univer-items-center", children: /* @__PURE__ */ c(
|
|
1693
|
-
|
|
1983
|
+
qt,
|
|
1694
1984
|
{
|
|
1695
|
-
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(
|
|
1985
|
+
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(Ni, { onClick: x, iconId: u.iconId, iconType: u.iconType }) }),
|
|
1696
1986
|
children: /* @__PURE__ */ k(
|
|
1697
1987
|
"div",
|
|
1698
1988
|
{
|
|
1699
|
-
className: Y("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-gray-200",
|
|
1989
|
+
className: Y("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-gray-200", Fe),
|
|
1700
1990
|
children: [
|
|
1701
1991
|
y ? /* @__PURE__ */ c("img", { src: y, className: "univer-size-4", draggable: !1 }) : /* @__PURE__ */ c(ot, { className: "univer-size-4" }),
|
|
1702
|
-
/* @__PURE__ */ c(
|
|
1992
|
+
/* @__PURE__ */ c(Gt, {})
|
|
1703
1993
|
]
|
|
1704
1994
|
}
|
|
1705
1995
|
)
|
|
@@ -1713,24 +2003,24 @@ const Fe = (t) => {
|
|
|
1713
2003
|
i.t("sheet.cf.iconSet.rule"),
|
|
1714
2004
|
/* @__PURE__ */ k("span", { className: "univer-font-medium", children: [
|
|
1715
2005
|
i.t("sheet.cf.iconSet.when"),
|
|
1716
|
-
i.t(`sheet.cf.symbol.${
|
|
2006
|
+
i.t(`sheet.cf.symbol.${At(I.operator)}`),
|
|
1717
2007
|
R,
|
|
1718
2008
|
f ? "" : ` ${i.t("sheet.cf.iconSet.and")} `
|
|
1719
2009
|
] })
|
|
1720
2010
|
]
|
|
1721
2011
|
}
|
|
1722
2012
|
) : /* @__PURE__ */ c(
|
|
1723
|
-
|
|
2013
|
+
ae,
|
|
1724
2014
|
{
|
|
1725
|
-
options:
|
|
1726
|
-
value:
|
|
2015
|
+
options: o,
|
|
2016
|
+
value: u.operator,
|
|
1727
2017
|
onChange: (T) => {
|
|
1728
2018
|
a(T, v);
|
|
1729
2019
|
}
|
|
1730
2020
|
}
|
|
1731
2021
|
)
|
|
1732
2022
|
] }),
|
|
1733
|
-
f ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ k(
|
|
2023
|
+
f ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ k(Ht, { children: [
|
|
1734
2024
|
/* @__PURE__ */ k(
|
|
1735
2025
|
"div",
|
|
1736
2026
|
{
|
|
@@ -1747,24 +2037,24 @@ const Fe = (t) => {
|
|
|
1747
2037
|
className: "univer-mt-3 univer-grid univer-grid-cols-2 univer-gap-4",
|
|
1748
2038
|
children: [
|
|
1749
2039
|
/* @__PURE__ */ c(
|
|
1750
|
-
|
|
2040
|
+
ae,
|
|
1751
2041
|
{
|
|
1752
|
-
options:
|
|
1753
|
-
value:
|
|
2042
|
+
options: s,
|
|
2043
|
+
value: u.value.type,
|
|
1754
2044
|
onChange: (T) => {
|
|
1755
2045
|
h(T, v);
|
|
1756
2046
|
}
|
|
1757
2047
|
}
|
|
1758
2048
|
),
|
|
1759
2049
|
/* @__PURE__ */ c(
|
|
1760
|
-
|
|
2050
|
+
xi,
|
|
1761
2051
|
{
|
|
1762
2052
|
id: v,
|
|
1763
|
-
type:
|
|
2053
|
+
type: u.value.type,
|
|
1764
2054
|
error: p,
|
|
1765
|
-
value:
|
|
2055
|
+
value: u.value.value || "",
|
|
1766
2056
|
onChange: (T) => {
|
|
1767
|
-
|
|
2057
|
+
d(T, v);
|
|
1768
2058
|
}
|
|
1769
2059
|
}
|
|
1770
2060
|
)
|
|
@@ -1776,29 +2066,29 @@ const Fe = (t) => {
|
|
|
1776
2066
|
},
|
|
1777
2067
|
v
|
|
1778
2068
|
);
|
|
1779
|
-
}), [
|
|
1780
|
-
},
|
|
2069
|
+
}), [n, r]);
|
|
2070
|
+
}, Vi = (t) => {
|
|
1781
2071
|
var T;
|
|
1782
|
-
const { interceptorManager: e } = t,
|
|
1783
|
-
const g = Object.keys(
|
|
1784
|
-
if (
|
|
1785
|
-
const b =
|
|
1786
|
-
if (!
|
|
2072
|
+
const { interceptorManager: e } = t, n = ((T = t.rule) == null ? void 0 : T.type) === L.iconSet ? t.rule : void 0, r = q(re), [i, o] = N({}), [s, d] = N(() => {
|
|
2073
|
+
const g = Object.keys(Me)[0];
|
|
2074
|
+
if (n && n.config.length) {
|
|
2075
|
+
const b = n.config[0].iconType;
|
|
2076
|
+
if (!n.config.some((C) => C.iconType !== b))
|
|
1787
2077
|
return b;
|
|
1788
2078
|
}
|
|
1789
2079
|
return g;
|
|
1790
2080
|
}), [a, h] = N(() => {
|
|
1791
|
-
if (
|
|
1792
|
-
return
|
|
1793
|
-
const g =
|
|
2081
|
+
if (n && n.config.length)
|
|
2082
|
+
return jt.deepClone(n == null ? void 0 : n.config);
|
|
2083
|
+
const g = Me[s] || [];
|
|
1794
2084
|
return new Array(g.length).fill("").map((b, S, C) => S === C.length - 1 ? {
|
|
1795
2085
|
operator: U.lessThanOrEqual,
|
|
1796
|
-
value: { type:
|
|
1797
|
-
iconType:
|
|
2086
|
+
value: { type: $.num, value: Number.MAX_SAFE_INTEGER },
|
|
2087
|
+
iconType: s,
|
|
1798
2088
|
iconId: String(S)
|
|
1799
|
-
} :
|
|
1800
|
-
}), [l,
|
|
1801
|
-
const g = a.map((b) =>
|
|
2089
|
+
} : sn(s, S, C));
|
|
2090
|
+
}), [l, u] = N(() => n ? !!n.isShowValue : !0), v = J(() => {
|
|
2091
|
+
const g = a.map((b) => tr(b.iconType, b.iconId));
|
|
1802
2092
|
return /* @__PURE__ */ c("div", { className: "univer-flex univer-items-center", children: g.map((b, S) => b ? /* @__PURE__ */ c(
|
|
1803
2093
|
"img",
|
|
1804
2094
|
{
|
|
@@ -1808,8 +2098,8 @@ const Fe = (t) => {
|
|
|
1808
2098
|
S
|
|
1809
2099
|
) : /* @__PURE__ */ c(ot, { className: "univer-size-5" }, S)) });
|
|
1810
2100
|
}, [a]), p = (g) => {
|
|
1811
|
-
if (g.reduce((S, C, M) => S.preType && !S.result || g.length - 1 === M ? S : C.value.type ===
|
|
1812
|
-
preType:
|
|
2101
|
+
if (g.reduce((S, C, M) => S.preType && !S.result || g.length - 1 === M ? S : C.value.type === $.formula ? {
|
|
2102
|
+
preType: $.formula,
|
|
1813
2103
|
result: !1
|
|
1814
2104
|
} : S.preType ? {
|
|
1815
2105
|
result: S.preType === C.value.type,
|
|
@@ -1817,22 +2107,22 @@ const Fe = (t) => {
|
|
|
1817
2107
|
} : {
|
|
1818
2108
|
result: !0,
|
|
1819
2109
|
preType: C.value.type
|
|
1820
|
-
}, { result: !0, preType: "" }).result && [
|
|
2110
|
+
}, { result: !0, preType: "" }).result && [$.num, $.percent, $.percentile].includes(g[0].value.type)) {
|
|
1821
2111
|
const S = {};
|
|
1822
2112
|
return g.forEach((C, M, E) => {
|
|
1823
2113
|
if (M - 1 < 0 || M === E.length - 1)
|
|
1824
2114
|
return;
|
|
1825
|
-
const O = g[M - 1], m =
|
|
1826
|
-
|
|
2115
|
+
const O = g[M - 1], m = At(O.operator);
|
|
2116
|
+
kr({ operator: m, value: O.value.value }, C.value.value) || (S[M] = `${r.t(`sheet.cf.form.${m}`, String(O.value.value))} `);
|
|
1827
2117
|
}), S;
|
|
1828
2118
|
}
|
|
1829
2119
|
return {};
|
|
1830
2120
|
}, y = (g, b) => {
|
|
1831
|
-
|
|
2121
|
+
cr(a, g) !== b && (ur(a, g, b), h([...a]), o(p(a)));
|
|
1832
2122
|
}, f = (g) => {
|
|
1833
|
-
|
|
1834
|
-
const b =
|
|
1835
|
-
h(S),
|
|
2123
|
+
d(g);
|
|
2124
|
+
const b = Me[g] || [], S = new Array(b.length).fill("").map((C, M, E) => sn(g, M, E));
|
|
2125
|
+
h(S), o(p(S));
|
|
1836
2126
|
};
|
|
1837
2127
|
X(() => {
|
|
1838
2128
|
const g = e.intercept(e.getInterceptPoints().submit, {
|
|
@@ -1859,29 +2149,29 @@ const Fe = (t) => {
|
|
|
1859
2149
|
const C = a.length - 1 - S, M = g[C];
|
|
1860
2150
|
b.iconId = M.iconId, b.iconType = M.iconType;
|
|
1861
2151
|
}), h([...a]);
|
|
1862
|
-
}, I = q(
|
|
1863
|
-
return
|
|
1864
|
-
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children:
|
|
2152
|
+
}, I = q(Hr), [R, x] = N();
|
|
2153
|
+
return jr(R, I.rootContainerElement), /* @__PURE__ */ k("div", { children: [
|
|
2154
|
+
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.styleRule") }),
|
|
1865
2155
|
/* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
|
|
1866
|
-
|
|
2156
|
+
qt,
|
|
1867
2157
|
{
|
|
1868
2158
|
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(
|
|
1869
|
-
|
|
2159
|
+
Ei,
|
|
1870
2160
|
{
|
|
1871
2161
|
ref: (g) => {
|
|
1872
2162
|
!R && g && x(g);
|
|
1873
2163
|
},
|
|
1874
|
-
iconType:
|
|
2164
|
+
iconType: s,
|
|
1875
2165
|
onClick: f
|
|
1876
2166
|
}
|
|
1877
2167
|
) }),
|
|
1878
2168
|
children: /* @__PURE__ */ k(
|
|
1879
2169
|
"div",
|
|
1880
2170
|
{
|
|
1881
|
-
className: Y("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600",
|
|
2171
|
+
className: Y("univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2 univer-text-xs univer-text-gray-600 univer-transition-all hover:univer-border-primary-600", Fe),
|
|
1882
2172
|
children: [
|
|
1883
2173
|
v,
|
|
1884
|
-
/* @__PURE__ */ c(
|
|
2174
|
+
/* @__PURE__ */ c(Gt, {})
|
|
1885
2175
|
]
|
|
1886
2176
|
}
|
|
1887
2177
|
)
|
|
@@ -1889,22 +2179,22 @@ const Fe = (t) => {
|
|
|
1889
2179
|
) }),
|
|
1890
2180
|
/* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center univer-text-xs", children: [
|
|
1891
2181
|
/* @__PURE__ */ k("div", { className: "univer-flex univer-items-center univer-text-xs", children: [
|
|
1892
|
-
/* @__PURE__ */ c(
|
|
1893
|
-
|
|
2182
|
+
/* @__PURE__ */ c(Ct, { onChange: w }),
|
|
2183
|
+
r.t("sheet.cf.iconSet.reverseIconOrder")
|
|
1894
2184
|
] }),
|
|
1895
2185
|
/* @__PURE__ */ k("div", { className: "univer-ml-6 univer-flex univer-items-center univer-text-xs", children: [
|
|
1896
|
-
/* @__PURE__ */ c(
|
|
1897
|
-
|
|
2186
|
+
/* @__PURE__ */ c(Ct, { checked: !l, onChange: (g) => {
|
|
2187
|
+
u(!g);
|
|
1898
2188
|
} }),
|
|
1899
|
-
|
|
2189
|
+
r.t("sheet.cf.iconSet.onlyShowIcon")
|
|
1900
2190
|
] })
|
|
1901
2191
|
] }),
|
|
1902
|
-
/* @__PURE__ */ c(
|
|
2192
|
+
/* @__PURE__ */ c(Mi, { errorMap: i, onChange: y, configList: a })
|
|
1903
2193
|
] });
|
|
1904
|
-
},
|
|
2194
|
+
}, ki = (t) => {
|
|
1905
2195
|
var w;
|
|
1906
|
-
const { onChange: e, interceptorManager:
|
|
1907
|
-
const I =
|
|
2196
|
+
const { onChange: e, interceptorManager: n } = t, r = q(re), i = ((w = t.rule) == null ? void 0 : w.type) === L.highlightCell ? t.rule : void 0, o = [{ label: r.t("sheet.cf.panel.isNotBottom"), value: "isNotBottom" }, { label: r.t("sheet.cf.panel.isBottom"), value: "isBottom" }, { label: r.t("sheet.cf.panel.greaterThanAverage"), value: "greaterThanAverage" }, { label: r.t("sheet.cf.panel.lessThanAverage"), value: "lessThanAverage" }], [s, d] = N(() => {
|
|
2197
|
+
const I = o[0].value, R = i == null ? void 0 : i.type;
|
|
1908
2198
|
if (!i)
|
|
1909
2199
|
return I;
|
|
1910
2200
|
switch (R) {
|
|
@@ -1929,7 +2219,7 @@ const Fe = (t) => {
|
|
|
1929
2219
|
}
|
|
1930
2220
|
}
|
|
1931
2221
|
return 10;
|
|
1932
|
-
}), [l,
|
|
2222
|
+
}), [l, u] = N(() => {
|
|
1933
2223
|
const R = i == null ? void 0 : i.type;
|
|
1934
2224
|
if (!i)
|
|
1935
2225
|
return !1;
|
|
@@ -1952,11 +2242,11 @@ const Fe = (t) => {
|
|
|
1952
2242
|
if (R === "lessThanAverage")
|
|
1953
2243
|
return { type: L.highlightCell, subType: F.average, operator: U.lessThan, style: g };
|
|
1954
2244
|
};
|
|
1955
|
-
X(() =>
|
|
2245
|
+
X(() => n.intercept(n.getInterceptPoints().submit, {
|
|
1956
2246
|
handler() {
|
|
1957
|
-
return y({ type:
|
|
2247
|
+
return y({ type: s, isPercent: l, value: a, style: v });
|
|
1958
2248
|
}
|
|
1959
|
-
}), [
|
|
2249
|
+
}), [s, l, a, v, n]);
|
|
1960
2250
|
const f = (I) => {
|
|
1961
2251
|
e(y(I));
|
|
1962
2252
|
};
|
|
@@ -1965,30 +2255,30 @@ const Fe = (t) => {
|
|
|
1965
2255
|
"div",
|
|
1966
2256
|
{
|
|
1967
2257
|
className: "univer-mt-4 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
|
|
1968
|
-
children:
|
|
2258
|
+
children: r.t("sheet.cf.panel.styleRule")
|
|
1969
2259
|
}
|
|
1970
2260
|
),
|
|
1971
2261
|
/* @__PURE__ */ c(
|
|
1972
|
-
|
|
2262
|
+
ae,
|
|
1973
2263
|
{
|
|
1974
2264
|
className: "univer-mt-3 univer-w-full",
|
|
1975
|
-
value:
|
|
1976
|
-
options:
|
|
2265
|
+
value: s,
|
|
2266
|
+
options: o,
|
|
1977
2267
|
onChange: (I) => {
|
|
1978
|
-
|
|
2268
|
+
d(I), f({ type: I, isPercent: l, value: a, style: v });
|
|
1979
2269
|
}
|
|
1980
2270
|
}
|
|
1981
2271
|
),
|
|
1982
|
-
["isNotBottom", "isBottom"].includes(
|
|
2272
|
+
["isNotBottom", "isBottom"].includes(s) && /* @__PURE__ */ k("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
|
|
1983
2273
|
/* @__PURE__ */ c(
|
|
1984
|
-
|
|
2274
|
+
Ve,
|
|
1985
2275
|
{
|
|
1986
2276
|
min: 1,
|
|
1987
2277
|
max: 1e3,
|
|
1988
2278
|
value: a,
|
|
1989
2279
|
onChange: (I) => {
|
|
1990
2280
|
const R = I || 0;
|
|
1991
|
-
h(R), f({ type:
|
|
2281
|
+
h(R), f({ type: s, isPercent: l, value: R, style: v });
|
|
1992
2282
|
}
|
|
1993
2283
|
}
|
|
1994
2284
|
),
|
|
@@ -1998,41 +2288,41 @@ const Fe = (t) => {
|
|
|
1998
2288
|
className: "univer-ml-3 univer-flex univer-items-center univer-text-xs",
|
|
1999
2289
|
children: [
|
|
2000
2290
|
/* @__PURE__ */ c(
|
|
2001
|
-
|
|
2291
|
+
Ct,
|
|
2002
2292
|
{
|
|
2003
2293
|
checked: l,
|
|
2004
2294
|
onChange: (I) => {
|
|
2005
|
-
|
|
2295
|
+
u(!!I), f({ type: s, isPercent: !!I, value: a, style: v });
|
|
2006
2296
|
}
|
|
2007
2297
|
}
|
|
2008
2298
|
),
|
|
2009
|
-
|
|
2299
|
+
r.t("sheet.cf.valueType.percent")
|
|
2010
2300
|
]
|
|
2011
2301
|
}
|
|
2012
2302
|
)
|
|
2013
2303
|
] }),
|
|
2014
|
-
/* @__PURE__ */ c("div", { className:
|
|
2304
|
+
/* @__PURE__ */ c("div", { className: st, children: /* @__PURE__ */ c(Be, { rule: y({ type: s, isPercent: l, value: a, style: v }) }) }),
|
|
2015
2305
|
/* @__PURE__ */ c(
|
|
2016
|
-
|
|
2306
|
+
Zt,
|
|
2017
2307
|
{
|
|
2018
2308
|
style: i == null ? void 0 : i.style,
|
|
2019
2309
|
className: "univer-mt-3",
|
|
2020
2310
|
onChange: (I) => {
|
|
2021
|
-
p(I), f({ type:
|
|
2311
|
+
p(I), f({ type: s, isPercent: l, value: a, style: I });
|
|
2022
2312
|
}
|
|
2023
2313
|
}
|
|
2024
2314
|
)
|
|
2025
2315
|
] });
|
|
2026
|
-
},
|
|
2316
|
+
}, Fi = mn("beforeSubmit"), Li = mn("submit"), an = (t) => t.getCurrentUnitForType(A.UNIVER_SHEET).getUnitId(), ln = (t) => {
|
|
2027
2317
|
var e;
|
|
2028
2318
|
return (e = t.getCurrentUnitForType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
|
|
2029
|
-
},
|
|
2319
|
+
}, Ui = (t) => {
|
|
2030
2320
|
var S, C, M;
|
|
2031
|
-
const e = q(re),
|
|
2321
|
+
const e = q(re), n = q(te), r = q(Z), i = q(Q), o = q(je), s = an(r), d = ln(r), [a, h] = N(void 0), l = ve((C = (S = t.rule) == null ? void 0 : S.ranges) != null ? C : []), u = J(() => {
|
|
2032
2322
|
var V, O, m;
|
|
2033
2323
|
let E = (V = t.rule) == null ? void 0 : V.ranges;
|
|
2034
|
-
return E != null && E.length || (E = (m = (O =
|
|
2035
|
-
const j =
|
|
2324
|
+
return E != null && E.length || (E = (m = (O = o.getCurrentSelections()) == null ? void 0 : O.map((_) => _.range)) != null ? m : []), l.current = E, E != null && E.length ? E.map((_) => {
|
|
2325
|
+
const j = kn(_);
|
|
2036
2326
|
return j === "NaN" ? "" : j;
|
|
2037
2327
|
}).filter((_) => !!_).join(",") : "";
|
|
2038
2328
|
}, [t.rule]), v = [
|
|
@@ -2072,56 +2362,56 @@ const Fe = (t) => {
|
|
|
2072
2362
|
return "6";
|
|
2073
2363
|
}
|
|
2074
2364
|
return V;
|
|
2075
|
-
}), f =
|
|
2365
|
+
}), f = ve(void 0), w = J(() => new dr({ beforeSubmit: Fi, submit: Li }), []), I = J(() => {
|
|
2076
2366
|
switch (p) {
|
|
2077
2367
|
case "1":
|
|
2078
2368
|
return on;
|
|
2079
2369
|
case "2":
|
|
2080
|
-
return
|
|
2370
|
+
return ki;
|
|
2081
2371
|
case "3":
|
|
2082
|
-
return
|
|
2372
|
+
return wi;
|
|
2083
2373
|
case "4":
|
|
2084
|
-
return
|
|
2374
|
+
return _i;
|
|
2085
2375
|
case "5":
|
|
2086
|
-
return
|
|
2376
|
+
return Ri;
|
|
2087
2377
|
case "6":
|
|
2088
|
-
return
|
|
2378
|
+
return Vi;
|
|
2089
2379
|
default:
|
|
2090
2380
|
return on;
|
|
2091
2381
|
}
|
|
2092
2382
|
}, [p]);
|
|
2093
2383
|
X(() => {
|
|
2094
|
-
const E =
|
|
2095
|
-
if (V.id ===
|
|
2384
|
+
const E = n.onCommandExecuted((V) => {
|
|
2385
|
+
if (V.id === mr.id) {
|
|
2096
2386
|
const O = V.params;
|
|
2097
|
-
O.subUnitId ===
|
|
2387
|
+
O.subUnitId === d && O.unitId === s && t.onCancel();
|
|
2098
2388
|
}
|
|
2099
|
-
V.id ===
|
|
2389
|
+
V.id === Bt.id && t.onCancel();
|
|
2100
2390
|
});
|
|
2101
2391
|
return () => E.dispose();
|
|
2102
2392
|
}, []);
|
|
2103
2393
|
const R = (E) => {
|
|
2104
2394
|
f.current = E;
|
|
2105
2395
|
}, x = (E) => {
|
|
2106
|
-
const V = E.split(",").filter((O) => !!O).map(
|
|
2396
|
+
const V = E.split(",").filter((O) => !!O).map(Qr).map((O) => O.range);
|
|
2107
2397
|
l.current = V;
|
|
2108
2398
|
}, T = () => {
|
|
2109
2399
|
if (a)
|
|
2110
2400
|
return;
|
|
2111
2401
|
const V = (() => {
|
|
2112
|
-
const m =
|
|
2402
|
+
const m = r.getCurrentUnitForType(A.UNIVER_SHEET).getActiveSheet();
|
|
2113
2403
|
if (!m)
|
|
2114
2404
|
throw new Error("No active sheet found");
|
|
2115
|
-
return l.current.map((K) =>
|
|
2405
|
+
return l.current.map((K) => fr(K, m.getRowCount(), m.getColumnCount())).filter((K) => !(Number.isNaN(K.startRow) || Number.isNaN(K.startColumn)));
|
|
2116
2406
|
})();
|
|
2117
2407
|
if (w.fetchThroughInterceptors(w.getInterceptPoints().beforeSubmit)(!0, null)) {
|
|
2118
2408
|
const m = w.fetchThroughInterceptors(w.getInterceptPoints().submit)(null, null);
|
|
2119
2409
|
if (m) {
|
|
2120
|
-
const _ =
|
|
2410
|
+
const _ = an(r), j = ln(r);
|
|
2121
2411
|
if (!_ || !j)
|
|
2122
2412
|
throw new Error("No active sheet found");
|
|
2123
2413
|
let K = {};
|
|
2124
|
-
t.rule && t.rule.cfId ? (K = { ...t.rule, ranges: V, rule: m },
|
|
2414
|
+
t.rule && t.rule.cfId ? (K = { ...t.rule, ranges: V, rule: m }, n.executeCommand(Lr.id, { unitId: _, subUnitId: j, rule: K }), t.onCancel()) : (K = { cfId: i.createCfId(_, j), ranges: V, rule: m, stopIfTrue: !1 }, n.executeCommand(Rn.id, { unitId: _, subUnitId: j, rule: K }), t.onCancel());
|
|
2125
2415
|
}
|
|
2126
2416
|
}
|
|
2127
2417
|
}, g = () => {
|
|
@@ -2139,11 +2429,11 @@ const Fe = (t) => {
|
|
|
2139
2429
|
),
|
|
2140
2430
|
/* @__PURE__ */ k("div", { className: "univer-mt-4", children: [
|
|
2141
2431
|
/* @__PURE__ */ c(
|
|
2142
|
-
|
|
2432
|
+
ei,
|
|
2143
2433
|
{
|
|
2144
|
-
unitId:
|
|
2145
|
-
subUnitId:
|
|
2146
|
-
initialValue:
|
|
2434
|
+
unitId: s,
|
|
2435
|
+
subUnitId: d,
|
|
2436
|
+
initialValue: u,
|
|
2147
2437
|
onChange: (E, V) => x(V),
|
|
2148
2438
|
onVerify: b
|
|
2149
2439
|
}
|
|
@@ -2158,7 +2448,7 @@ const Fe = (t) => {
|
|
|
2158
2448
|
}
|
|
2159
2449
|
),
|
|
2160
2450
|
/* @__PURE__ */ c(
|
|
2161
|
-
|
|
2451
|
+
ae,
|
|
2162
2452
|
{
|
|
2163
2453
|
className: "univer-mt-4 univer-w-full",
|
|
2164
2454
|
value: p,
|
|
@@ -2175,59 +2465,59 @@ const Fe = (t) => {
|
|
|
2175
2465
|
}
|
|
2176
2466
|
),
|
|
2177
2467
|
/* @__PURE__ */ k("div", { className: "univer-mt-4 univer-flex univer-justify-end", children: [
|
|
2178
|
-
/* @__PURE__ */ c(
|
|
2179
|
-
/* @__PURE__ */ c(
|
|
2468
|
+
/* @__PURE__ */ c(Kt, { onClick: g, children: e.t("sheet.cf.panel.cancel") }),
|
|
2469
|
+
/* @__PURE__ */ c(Kt, { className: "univer-ml-3", variant: "primary", onClick: T, children: e.t("sheet.cf.panel.submit") })
|
|
2180
2470
|
] })
|
|
2181
2471
|
] });
|
|
2182
2472
|
};
|
|
2183
|
-
var
|
|
2184
|
-
for (var i =
|
|
2185
|
-
(
|
|
2473
|
+
var Pi = Object.getOwnPropertyDescriptor, Oi = (t, e, n, r) => {
|
|
2474
|
+
for (var i = r > 1 ? void 0 : r ? Pi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
2475
|
+
(s = t[o]) && (i = s(i) || i);
|
|
2186
2476
|
return i;
|
|
2187
|
-
},
|
|
2188
|
-
let
|
|
2477
|
+
}, $i = (t, e) => (n, r) => e(n, r, t);
|
|
2478
|
+
let He = class extends le {
|
|
2189
2479
|
constructor(e) {
|
|
2190
2480
|
super();
|
|
2191
|
-
|
|
2481
|
+
Ie(this, "_initLocal", () => {
|
|
2192
2482
|
});
|
|
2193
|
-
|
|
2194
|
-
const
|
|
2195
|
-
let i =
|
|
2483
|
+
Ie(this, "_findReplaceIndex", (e) => {
|
|
2484
|
+
const n = /\{([^}]+)?\}/g, r = [];
|
|
2485
|
+
let i = n.exec(e);
|
|
2196
2486
|
for (; i; )
|
|
2197
|
-
|
|
2487
|
+
r.push({
|
|
2198
2488
|
startIndex: i.index,
|
|
2199
2489
|
key: Number(i[1]),
|
|
2200
2490
|
endIndex: i.index + i[0].length - 1
|
|
2201
|
-
}), i =
|
|
2202
|
-
return
|
|
2491
|
+
}), i = n.exec(e);
|
|
2492
|
+
return r;
|
|
2203
2493
|
});
|
|
2204
2494
|
this._localeService = e, this._initLocal();
|
|
2205
2495
|
}
|
|
2206
|
-
tWithReactNode(e, ...
|
|
2207
|
-
const
|
|
2208
|
-
if (typeof
|
|
2209
|
-
const
|
|
2210
|
-
return this._findReplaceIndex(
|
|
2496
|
+
tWithReactNode(e, ...n) {
|
|
2497
|
+
const r = this._localeService.getLocales(), i = e.split("."), o = r && this._localeService.resolveKeyPath(r, i);
|
|
2498
|
+
if (typeof o == "string") {
|
|
2499
|
+
const s = [];
|
|
2500
|
+
return this._findReplaceIndex(o).forEach((d, a, h) => {
|
|
2211
2501
|
const l = h[a - 1] || { endIndex: -1 };
|
|
2212
|
-
if (l.endIndex + 1 <
|
|
2213
|
-
const
|
|
2214
|
-
|
|
2502
|
+
if (l.endIndex + 1 < d.startIndex) {
|
|
2503
|
+
const u = o.slice(l.endIndex + 1, d.startIndex);
|
|
2504
|
+
u && s.push(u);
|
|
2215
2505
|
}
|
|
2216
|
-
if (
|
|
2217
|
-
const
|
|
2218
|
-
|
|
2506
|
+
if (n[d.key] && s.push(n[d.key]), a === h.length - 1) {
|
|
2507
|
+
const u = o.slice(d.endIndex + 1);
|
|
2508
|
+
u && s.push(u);
|
|
2219
2509
|
}
|
|
2220
|
-
}),
|
|
2510
|
+
}), s;
|
|
2221
2511
|
}
|
|
2222
2512
|
return [];
|
|
2223
2513
|
}
|
|
2224
2514
|
};
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
],
|
|
2228
|
-
const
|
|
2229
|
-
const
|
|
2230
|
-
switch (
|
|
2515
|
+
He = Oi([
|
|
2516
|
+
$i(0, P(re))
|
|
2517
|
+
], He);
|
|
2518
|
+
const Di = (t, e) => {
|
|
2519
|
+
const n = t.rule;
|
|
2520
|
+
switch (n.type) {
|
|
2231
2521
|
case L.colorScale:
|
|
2232
2522
|
return e.t("sheet.cf.ruleType.colorScale");
|
|
2233
2523
|
case L.dataBar:
|
|
@@ -2235,146 +2525,146 @@ const Hi = (t, e) => {
|
|
|
2235
2525
|
case L.iconSet:
|
|
2236
2526
|
return e.t("sheet.cf.ruleType.iconSet");
|
|
2237
2527
|
case L.highlightCell:
|
|
2238
|
-
switch (
|
|
2528
|
+
switch (n.subType) {
|
|
2239
2529
|
case F.average: {
|
|
2240
|
-
const
|
|
2241
|
-
return e.t(`sheet.cf.preview.describe.${
|
|
2530
|
+
const r = n.operator;
|
|
2531
|
+
return e.t(`sheet.cf.preview.describe.${r}`, e.t("sheet.cf.subRuleType.average"));
|
|
2242
2532
|
}
|
|
2243
2533
|
case F.duplicateValues:
|
|
2244
2534
|
return e.t("sheet.cf.subRuleType.duplicateValues");
|
|
2245
2535
|
case F.uniqueValues:
|
|
2246
2536
|
return e.t("sheet.cf.subRuleType.uniqueValues");
|
|
2247
2537
|
case F.number: {
|
|
2248
|
-
const
|
|
2249
|
-
return e.t(`sheet.cf.preview.describe.${
|
|
2538
|
+
const r = n.operator;
|
|
2539
|
+
return e.t(`sheet.cf.preview.describe.${r}`, ...Array.isArray(n.value) ? n.value.map((i) => String(i)) : [String(n.value || "")]);
|
|
2250
2540
|
}
|
|
2251
2541
|
case F.text: {
|
|
2252
|
-
const
|
|
2253
|
-
return e.t(`sheet.cf.preview.describe.${
|
|
2542
|
+
const r = n.operator;
|
|
2543
|
+
return e.t(`sheet.cf.preview.describe.${r}`, n.value || "");
|
|
2254
2544
|
}
|
|
2255
2545
|
case F.timePeriod: {
|
|
2256
|
-
const
|
|
2257
|
-
return e.t(`sheet.cf.preview.describe.${
|
|
2546
|
+
const r = n.operator;
|
|
2547
|
+
return e.t(`sheet.cf.preview.describe.${r}`);
|
|
2258
2548
|
}
|
|
2259
2549
|
case F.rank:
|
|
2260
|
-
return
|
|
2550
|
+
return n.isPercent ? n.isBottom ? e.t("sheet.cf.preview.describe.bottomNPercent", String(n.value)) : e.t("sheet.cf.preview.describe.topNPercent", String(n.value)) : n.isBottom ? e.t("sheet.cf.preview.describe.bottomN", String(n.value)) : e.t("sheet.cf.preview.describe.topN", String(n.value));
|
|
2261
2551
|
case F.formula:
|
|
2262
2552
|
return e.t("sheet.cf.ruleType.formula");
|
|
2263
2553
|
}
|
|
2264
2554
|
}
|
|
2265
2555
|
};
|
|
2266
|
-
let
|
|
2267
|
-
const
|
|
2268
|
-
const { onClick: e } = t,
|
|
2556
|
+
let cn = 0;
|
|
2557
|
+
const Ai = (t) => {
|
|
2558
|
+
const { onClick: e } = t, n = q(Q), r = q(Z), i = q(je), o = q(te), s = q(re), d = q(me), a = q(Vn), h = q(He), l = Br(() => r.getCurrentTypeOfUnit$(A.UNIVER_SHEET), void 0, void 0, []), u = l.getUnitId(), v = l.getActiveSheet();
|
|
2269
2559
|
if (!v)
|
|
2270
2560
|
throw new Error("No active sheet found");
|
|
2271
|
-
const p = v.getSheetId(), [y, f] = N([]), [w, I] = N("2"), [R, x] = N(0), [T, g] = N(-1), [b, S] = N(
|
|
2272
|
-
{ label:
|
|
2273
|
-
{ label:
|
|
2561
|
+
const p = v.getSheetId(), [y, f] = N([]), [w, I] = N("2"), [R, x] = N(0), [T, g] = N(-1), [b, S] = N(cn), C = ve(null), M = [
|
|
2562
|
+
{ label: s.t("sheet.cf.panel.workSheet"), value: "2" },
|
|
2563
|
+
{ label: s.t("sheet.cf.panel.selectedRange"), value: "1" }
|
|
2274
2564
|
], E = () => {
|
|
2275
|
-
const
|
|
2276
|
-
if (
|
|
2565
|
+
const D = n.getSubunitRules(u, p);
|
|
2566
|
+
if (!D || !D.length)
|
|
2277
2567
|
return [];
|
|
2278
2568
|
if (w === "1") {
|
|
2279
2569
|
const B = i.getCurrentLastSelection();
|
|
2280
2570
|
if (!B)
|
|
2281
2571
|
return [];
|
|
2282
2572
|
const G = B.range;
|
|
2283
|
-
return
|
|
2573
|
+
return D.filter((ee) => ee.ranges.some((ne) => Ce.intersects(ne, G)));
|
|
2284
2574
|
} else if (w === "2")
|
|
2285
|
-
return [
|
|
2575
|
+
return [...D];
|
|
2286
2576
|
return [];
|
|
2287
2577
|
}, [V, O] = N(E);
|
|
2288
|
-
|
|
2289
|
-
const
|
|
2290
|
-
B.id ===
|
|
2578
|
+
ti(y), X(() => {
|
|
2579
|
+
const D = o.onCommandExecuted((B) => {
|
|
2580
|
+
B.id === Bt.id && x(Math.random());
|
|
2291
2581
|
});
|
|
2292
|
-
return () =>
|
|
2582
|
+
return () => D.dispose();
|
|
2293
2583
|
}), X(() => {
|
|
2294
2584
|
O(E);
|
|
2295
|
-
}, [w, R,
|
|
2585
|
+
}, [w, R, u, p]), X(() => {
|
|
2296
2586
|
if (w === "2")
|
|
2297
2587
|
return;
|
|
2298
|
-
const
|
|
2299
|
-
const G = [
|
|
2300
|
-
const { id: ne, params:
|
|
2301
|
-
G.includes(ne) &&
|
|
2588
|
+
const D = new Ee((B) => {
|
|
2589
|
+
const G = [pr.id, oe.id, Se.id, _e.id, Tn.id], z = o.onCommandExecuted((ee) => {
|
|
2590
|
+
const { id: ne, params: we } = ee, Re = r.getCurrentUnitOfType(A.UNIVER_SHEET).getUnitId();
|
|
2591
|
+
G.includes(ne) && we.unitId === Re && B.next(null);
|
|
2302
2592
|
});
|
|
2303
2593
|
return () => z.dispose();
|
|
2304
|
-
}).pipe(
|
|
2594
|
+
}).pipe(Qt(16)).subscribe(() => {
|
|
2305
2595
|
O(E);
|
|
2306
2596
|
});
|
|
2307
2597
|
return () => {
|
|
2308
|
-
|
|
2598
|
+
D.unsubscribe();
|
|
2309
2599
|
};
|
|
2310
|
-
}, [
|
|
2311
|
-
const
|
|
2600
|
+
}, [r, w, u, p]), X(() => {
|
|
2601
|
+
const D = n.$ruleChange.subscribe(() => {
|
|
2312
2602
|
x(Math.random());
|
|
2313
2603
|
});
|
|
2314
|
-
return () =>
|
|
2315
|
-
}, [
|
|
2316
|
-
const
|
|
2604
|
+
return () => D.unsubscribe();
|
|
2605
|
+
}, [n]), X(() => {
|
|
2606
|
+
const D = () => {
|
|
2317
2607
|
var ee, ne;
|
|
2318
2608
|
const z = Math.max(0, ((ne = (ee = C.current) == null ? void 0 : ee.getBoundingClientRect().width) != null ? ne : 0) - 8);
|
|
2319
|
-
return
|
|
2320
|
-
}, G = new
|
|
2609
|
+
return cn = z, z;
|
|
2610
|
+
}, G = new Ee((z) => {
|
|
2321
2611
|
const ee = a.getContainer();
|
|
2322
2612
|
if (ee) {
|
|
2323
2613
|
let ne = setTimeout(() => {
|
|
2324
2614
|
z.next(void 0);
|
|
2325
2615
|
}, 150);
|
|
2326
|
-
const
|
|
2616
|
+
const we = () => {
|
|
2327
2617
|
ne && clearTimeout(ne), ne = null;
|
|
2328
|
-
},
|
|
2329
|
-
|
|
2618
|
+
}, Re = (at) => {
|
|
2619
|
+
at.propertyName === "width" && (we(), z.next(void 0));
|
|
2330
2620
|
};
|
|
2331
|
-
return ee.addEventListener("transitionend",
|
|
2332
|
-
|
|
2621
|
+
return ee.addEventListener("transitionend", Re), () => {
|
|
2622
|
+
we(), ee.removeEventListener("transitionend", Re);
|
|
2333
2623
|
};
|
|
2334
2624
|
}
|
|
2335
|
-
}).pipe(
|
|
2336
|
-
S(
|
|
2625
|
+
}).pipe(Qt(16)).subscribe(() => {
|
|
2626
|
+
S(D());
|
|
2337
2627
|
});
|
|
2338
2628
|
return () => {
|
|
2339
2629
|
G.unsubscribe();
|
|
2340
2630
|
};
|
|
2341
2631
|
}, []);
|
|
2342
|
-
const m = (
|
|
2632
|
+
const m = (D) => {
|
|
2343
2633
|
var z;
|
|
2344
|
-
const B =
|
|
2634
|
+
const B = r.getCurrentUnitOfType(A.UNIVER_SHEET).getUnitId(), G = (z = r.getCurrentUnitOfType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : z.getSheetId();
|
|
2345
2635
|
if (!B || !G)
|
|
2346
2636
|
throw new Error("No active sheet found");
|
|
2347
|
-
|
|
2348
|
-
}, _ = (
|
|
2637
|
+
o.executeCommand(zt.id, { unitId: B, subUnitId: G, cfId: D.cfId });
|
|
2638
|
+
}, _ = (D, B) => {
|
|
2349
2639
|
g(B.y);
|
|
2350
|
-
}, j = (
|
|
2351
|
-
var
|
|
2640
|
+
}, j = (D, B, G) => {
|
|
2641
|
+
var at;
|
|
2352
2642
|
g(-1);
|
|
2353
|
-
const z =
|
|
2643
|
+
const z = r.getCurrentUnitOfType(A.UNIVER_SHEET).getUnitId(), ee = (at = r.getCurrentUnitOfType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : at.getSheetId();
|
|
2354
2644
|
if (!z || !ee)
|
|
2355
2645
|
throw new Error("No active sheet found");
|
|
2356
2646
|
const ne = (or) => {
|
|
2357
|
-
const
|
|
2358
|
-
return Math.min(
|
|
2359
|
-
},
|
|
2360
|
-
|
|
2647
|
+
const sr = V.length;
|
|
2648
|
+
return Math.min(sr - 1, Math.max(0, or));
|
|
2649
|
+
}, we = V[ne(B.y)].cfId, Re = V[ne(G.y)].cfId;
|
|
2650
|
+
we !== Re && o.executeCommand(Ur.id, { unitId: z, subUnitId: ee, start: { id: we, type: "self" }, end: { id: Re, type: G.y > B.y ? "after" : "before" } });
|
|
2361
2651
|
}, K = () => {
|
|
2362
2652
|
t.onCreate();
|
|
2363
|
-
},
|
|
2364
|
-
w === "2" ?
|
|
2365
|
-
|
|
2653
|
+
}, fe = () => {
|
|
2654
|
+
w === "2" ? o.executeCommand(xn.id) : w === "1" && V.map((B) => ({ unitId: u, subUnitId: p, cfId: B.cfId })).forEach((B) => {
|
|
2655
|
+
o.executeCommand(zt.id, B);
|
|
2366
2656
|
});
|
|
2367
|
-
},
|
|
2368
|
-
const
|
|
2657
|
+
}, pe = J(() => {
|
|
2658
|
+
const D = r.getCurrentUnitOfType(A.UNIVER_SHEET), B = D.getActiveSheet();
|
|
2369
2659
|
return V.filter((G) => {
|
|
2370
2660
|
const z = G.ranges;
|
|
2371
|
-
return
|
|
2661
|
+
return gt(d, D.getUnitId(), B.getSheetId(), z);
|
|
2372
2662
|
});
|
|
2373
|
-
}, [V]),
|
|
2374
|
-
const
|
|
2663
|
+
}, [V]), Le = pe.map((D, B) => ({ i: D.cfId, x: 0, w: 12, y: B, h: 1, isResizable: !1 })), Ue = J(() => {
|
|
2664
|
+
const D = r.getCurrentUnitOfType(A.UNIVER_SHEET), B = D.getActiveSheet();
|
|
2375
2665
|
return V.every((G) => {
|
|
2376
2666
|
const z = G.ranges;
|
|
2377
|
-
return
|
|
2667
|
+
return gt(d, D.getUnitId(), B.getSheetId(), z);
|
|
2378
2668
|
});
|
|
2379
2669
|
}, [V]);
|
|
2380
2670
|
return /* @__PURE__ */ k("div", { children: [
|
|
@@ -2382,60 +2672,60 @@ const ji = (t) => {
|
|
|
2382
2672
|
/* @__PURE__ */ c("div", { className: "univer-flex univer-items-center univer-gap-2", children: h.tWithReactNode(
|
|
2383
2673
|
"sheet.cf.panel.managerRuleSelect",
|
|
2384
2674
|
/* @__PURE__ */ c(
|
|
2385
|
-
|
|
2675
|
+
ae,
|
|
2386
2676
|
{
|
|
2387
2677
|
className: "univer-w-36",
|
|
2388
2678
|
options: M,
|
|
2389
2679
|
value: w,
|
|
2390
|
-
onChange: (
|
|
2391
|
-
I(
|
|
2680
|
+
onChange: (D) => {
|
|
2681
|
+
I(D);
|
|
2392
2682
|
}
|
|
2393
2683
|
}
|
|
2394
2684
|
)
|
|
2395
|
-
).map((
|
|
2685
|
+
).map((D, B) => /* @__PURE__ */ c("span", { children: D }, B)) }),
|
|
2396
2686
|
/* @__PURE__ */ k("div", { className: "univer-flex univer-justify-end", children: [
|
|
2397
|
-
/* @__PURE__ */ c(
|
|
2687
|
+
/* @__PURE__ */ c(Xt, { title: s.t("sheet.cf.panel.createRule"), placement: "bottom", children: /* @__PURE__ */ c(
|
|
2398
2688
|
"a",
|
|
2399
2689
|
{
|
|
2400
2690
|
className: "univer-size-5 univer-cursor-pointer",
|
|
2401
2691
|
onClick: K,
|
|
2402
|
-
children: /* @__PURE__ */ c(
|
|
2692
|
+
children: /* @__PURE__ */ c(zn, {})
|
|
2403
2693
|
}
|
|
2404
2694
|
) }),
|
|
2405
|
-
V.length &&
|
|
2695
|
+
V.length && Ue ? /* @__PURE__ */ c(Xt, { title: s.t("sheet.cf.panel.clear"), placement: "bottom", children: /* @__PURE__ */ c(
|
|
2406
2696
|
"a",
|
|
2407
2697
|
{
|
|
2408
2698
|
className: "univer-size-5 univer-cursor-pointer",
|
|
2409
|
-
onClick:
|
|
2410
|
-
children: /* @__PURE__ */ c(
|
|
2699
|
+
onClick: fe,
|
|
2700
|
+
children: /* @__PURE__ */ c(vt, { className: "univer-text-red-500" })
|
|
2411
2701
|
}
|
|
2412
|
-
) }) : /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
2702
|
+
) }) : /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(vt, { className: "univer-text-gray-300" }) })
|
|
2413
2703
|
] })
|
|
2414
2704
|
] }),
|
|
2415
2705
|
/* @__PURE__ */ c("div", { ref: C, children: b > 0 && /* @__PURE__ */ c(
|
|
2416
|
-
|
|
2706
|
+
Jr,
|
|
2417
2707
|
{
|
|
2418
2708
|
className: "[&_.react-grid-item]:univer-transition-none [&_.react-grid-placeholder]:univer-rounded [&_.react-grid-placeholder]:!univer-bg-gray-200",
|
|
2419
2709
|
draggableHandle: ".draggableHandle",
|
|
2420
|
-
layout:
|
|
2710
|
+
layout: Le,
|
|
2421
2711
|
cols: 12,
|
|
2422
2712
|
rowHeight: 60,
|
|
2423
2713
|
width: b,
|
|
2424
2714
|
margin: [0, 10],
|
|
2425
2715
|
onDragStop: j,
|
|
2426
2716
|
onDragStart: _,
|
|
2427
|
-
children:
|
|
2717
|
+
children: pe == null ? void 0 : pe.map((D, B) => /* @__PURE__ */ c("div", { children: /* @__PURE__ */ k(
|
|
2428
2718
|
"div",
|
|
2429
2719
|
{
|
|
2430
2720
|
className: Y("univer-group univer-relative univer-flex univer-items-center univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700", {
|
|
2431
2721
|
"univer-bg-gray-100 dark:!univer-bg-gray-700": T === B
|
|
2432
2722
|
}),
|
|
2433
2723
|
onMouseMove: () => {
|
|
2434
|
-
|
|
2724
|
+
D.ranges !== y && f(D.ranges);
|
|
2435
2725
|
},
|
|
2436
2726
|
onMouseLeave: () => f([]),
|
|
2437
2727
|
onClick: () => {
|
|
2438
|
-
e(
|
|
2728
|
+
e(D);
|
|
2439
2729
|
},
|
|
2440
2730
|
children: [
|
|
2441
2731
|
/* @__PURE__ */ c(
|
|
@@ -2443,7 +2733,7 @@ const ji = (t) => {
|
|
|
2443
2733
|
{
|
|
2444
2734
|
className: Y("univer-absolute univer-left-0 univer-hidden univer-size-5 univer-cursor-grab univer-items-center univer-justify-center univer-rounded group-hover:univer-flex", "draggableHandle"),
|
|
2445
2735
|
onClick: (G) => G.stopPropagation(),
|
|
2446
|
-
children: /* @__PURE__ */ c(
|
|
2736
|
+
children: /* @__PURE__ */ c(Kn, {})
|
|
2447
2737
|
}
|
|
2448
2738
|
),
|
|
2449
2739
|
/* @__PURE__ */ k(
|
|
@@ -2455,14 +2745,14 @@ const ji = (t) => {
|
|
|
2455
2745
|
"div",
|
|
2456
2746
|
{
|
|
2457
2747
|
className: "univer-text-sm univer-text-gray-900 dark:!univer-text-white",
|
|
2458
|
-
children:
|
|
2748
|
+
children: Di(D, s)
|
|
2459
2749
|
}
|
|
2460
2750
|
),
|
|
2461
|
-
/* @__PURE__ */ c("div", { className: "univer-text-xs univer-text-gray-400", children:
|
|
2751
|
+
/* @__PURE__ */ c("div", { className: "univer-text-xs univer-text-gray-400", children: D.ranges.map((G) => kn(G)).join(",") })
|
|
2462
2752
|
]
|
|
2463
2753
|
}
|
|
2464
2754
|
),
|
|
2465
|
-
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
2755
|
+
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(Be, { rule: D.rule }) }),
|
|
2466
2756
|
/* @__PURE__ */ c(
|
|
2467
2757
|
"div",
|
|
2468
2758
|
{
|
|
@@ -2470,319 +2760,319 @@ const ji = (t) => {
|
|
|
2470
2760
|
"univer-flex univer-items-center univer-justify-center": T === B
|
|
2471
2761
|
}),
|
|
2472
2762
|
onClick: (G) => {
|
|
2473
|
-
G.stopPropagation(), m(
|
|
2763
|
+
G.stopPropagation(), m(D), f([]);
|
|
2474
2764
|
},
|
|
2475
|
-
children: /* @__PURE__ */ c(
|
|
2765
|
+
children: /* @__PURE__ */ c(vt, {})
|
|
2476
2766
|
}
|
|
2477
2767
|
)
|
|
2478
2768
|
]
|
|
2479
2769
|
}
|
|
2480
|
-
) }, `${
|
|
2770
|
+
) }, `${D.cfId}`))
|
|
2481
2771
|
}
|
|
2482
2772
|
) })
|
|
2483
2773
|
] });
|
|
2484
|
-
},
|
|
2485
|
-
const [e,
|
|
2486
|
-
return /* @__PURE__ */ c("div", { className: "univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4", children:
|
|
2487
|
-
i(!1),
|
|
2488
|
-
}, rule: e }) : /* @__PURE__ */ c(
|
|
2489
|
-
|
|
2774
|
+
}, Hi = (t) => {
|
|
2775
|
+
const [e, n] = N(t.rule), [r, i] = N(!!t.rule);
|
|
2776
|
+
return /* @__PURE__ */ c("div", { className: "univer-flex univer-h-full univer-flex-col univer-justify-between univer-py-4", children: r ? /* @__PURE__ */ c(Ui, { onCancel: () => {
|
|
2777
|
+
i(!1), n(void 0);
|
|
2778
|
+
}, rule: e }) : /* @__PURE__ */ c(Ai, { onClick: (a) => {
|
|
2779
|
+
n(a), i(!0);
|
|
2490
2780
|
}, onCreate: () => {
|
|
2491
2781
|
i(!0);
|
|
2492
2782
|
} }) });
|
|
2493
2783
|
};
|
|
2494
|
-
var
|
|
2495
|
-
for (var i =
|
|
2496
|
-
(
|
|
2784
|
+
var ji = Object.getOwnPropertyDescriptor, Bi = (t, e, n, r) => {
|
|
2785
|
+
for (var i = r > 1 ? void 0 : r ? ji(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
2786
|
+
(s = t[o]) && (i = s(i) || i);
|
|
2497
2787
|
return i;
|
|
2498
|
-
},
|
|
2499
|
-
const
|
|
2500
|
-
let
|
|
2501
|
-
constructor(e,
|
|
2788
|
+
}, We = (t, e) => (n, r) => e(n, r, t);
|
|
2789
|
+
const dt = "sheet.conditional.formatting.panel";
|
|
2790
|
+
let Je = class extends le {
|
|
2791
|
+
constructor(e, n, r, i, o) {
|
|
2502
2792
|
super();
|
|
2503
|
-
|
|
2504
|
-
this._univerInstanceService = e, this._injector =
|
|
2505
|
-
this._univerInstanceService.getCurrentTypeOfUnit$(A.UNIVER_SHEET).subscribe((
|
|
2506
|
-
var
|
|
2507
|
-
|
|
2793
|
+
Ie(this, "_sidebarDisposable", null);
|
|
2794
|
+
this._univerInstanceService = e, this._injector = n, this._componentManager = r, this._sidebarService = i, this._localeService = o, this._initPanel(), this.disposeWithMe(
|
|
2795
|
+
this._univerInstanceService.getCurrentTypeOfUnit$(A.UNIVER_SHEET).subscribe((s) => {
|
|
2796
|
+
var d;
|
|
2797
|
+
s || (d = this._sidebarDisposable) == null || d.dispose();
|
|
2508
2798
|
})
|
|
2509
|
-
), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((
|
|
2510
|
-
|
|
2799
|
+
), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((s) => {
|
|
2800
|
+
s.id === dt && (s.visible || setTimeout(() => {
|
|
2511
2801
|
this._sidebarService.sidebarOptions$.next({ visible: !1 });
|
|
2512
2802
|
}));
|
|
2513
2803
|
}));
|
|
2514
2804
|
}
|
|
2515
2805
|
openPanel(e) {
|
|
2516
|
-
const
|
|
2517
|
-
id:
|
|
2806
|
+
const n = {
|
|
2807
|
+
id: dt,
|
|
2518
2808
|
header: { title: this._localeService.t("sheet.cf.title") },
|
|
2519
2809
|
children: {
|
|
2520
|
-
label:
|
|
2810
|
+
label: dt,
|
|
2521
2811
|
rule: e,
|
|
2522
|
-
key:
|
|
2812
|
+
key: hr(4)
|
|
2523
2813
|
},
|
|
2524
2814
|
onClose: () => this._sidebarDisposable = null
|
|
2525
2815
|
};
|
|
2526
|
-
this._sidebarDisposable = this._sidebarService.open(
|
|
2816
|
+
this._sidebarDisposable = this._sidebarService.open(n);
|
|
2527
2817
|
}
|
|
2528
2818
|
_initPanel() {
|
|
2529
2819
|
this.disposeWithMe(
|
|
2530
|
-
this._componentManager.register(
|
|
2820
|
+
this._componentManager.register(dt, Hi)
|
|
2531
2821
|
);
|
|
2532
2822
|
}
|
|
2533
2823
|
};
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
],
|
|
2824
|
+
Je = Bi([
|
|
2825
|
+
We(0, Z),
|
|
2826
|
+
We(1, P(me)),
|
|
2827
|
+
We(2, P(Wr)),
|
|
2828
|
+
We(3, P(Vn)),
|
|
2829
|
+
We(4, P(re))
|
|
2830
|
+
], Je);
|
|
2541
2831
|
var ie = /* @__PURE__ */ ((t) => (t[t.createRule = 1] = "createRule", t[t.viewRule = 2] = "viewRule", t[t.highlightCell = 3] = "highlightCell", t[t.rank = 4] = "rank", t[t.formula = 5] = "formula", t[t.colorScale = 6] = "colorScale", t[t.dataBar = 7] = "dataBar", t[t.icon = 8] = "icon", t[t.clearRangeRules = 9] = "clearRangeRules", t[t.clearWorkSheetRules = 10] = "clearWorkSheetRules", t))(ie || {});
|
|
2542
|
-
const
|
|
2832
|
+
const Mt = {
|
|
2543
2833
|
id: "sheet.operation.open.conditional.formatting.panel",
|
|
2544
|
-
type:
|
|
2834
|
+
type: ge.OPERATION,
|
|
2545
2835
|
handler: (t, e) => {
|
|
2546
|
-
var
|
|
2547
|
-
const
|
|
2836
|
+
var d;
|
|
2837
|
+
const n = t.get(Je), r = t.get(je), i = t.get(te), o = ((d = r.getCurrentSelections()) == null ? void 0 : d.map((a) => a.range)) || [];
|
|
2548
2838
|
switch (e.value) {
|
|
2549
2839
|
case 3: {
|
|
2550
|
-
|
|
2840
|
+
n.openPanel({ ...Te(), ranges: o });
|
|
2551
2841
|
break;
|
|
2552
2842
|
}
|
|
2553
2843
|
case 4: {
|
|
2554
2844
|
const a = {
|
|
2555
|
-
...
|
|
2556
|
-
ranges:
|
|
2845
|
+
...Te,
|
|
2846
|
+
ranges: o,
|
|
2557
2847
|
rule: {
|
|
2558
2848
|
type: L.highlightCell,
|
|
2559
2849
|
subType: F.rank
|
|
2560
2850
|
}
|
|
2561
2851
|
};
|
|
2562
|
-
|
|
2852
|
+
n.openPanel(a);
|
|
2563
2853
|
break;
|
|
2564
2854
|
}
|
|
2565
2855
|
case 5: {
|
|
2566
2856
|
const a = {
|
|
2567
|
-
...
|
|
2568
|
-
ranges:
|
|
2857
|
+
...Te,
|
|
2858
|
+
ranges: o,
|
|
2569
2859
|
rule: {
|
|
2570
2860
|
type: L.highlightCell,
|
|
2571
2861
|
subType: F.formula,
|
|
2572
2862
|
value: "="
|
|
2573
2863
|
}
|
|
2574
2864
|
};
|
|
2575
|
-
|
|
2865
|
+
n.openPanel(a);
|
|
2576
2866
|
break;
|
|
2577
2867
|
}
|
|
2578
2868
|
case 6: {
|
|
2579
2869
|
const a = {
|
|
2580
|
-
...
|
|
2581
|
-
ranges:
|
|
2870
|
+
...Te,
|
|
2871
|
+
ranges: o,
|
|
2582
2872
|
rule: {
|
|
2583
2873
|
type: L.colorScale,
|
|
2584
2874
|
config: []
|
|
2585
2875
|
}
|
|
2586
2876
|
};
|
|
2587
|
-
|
|
2877
|
+
n.openPanel(a);
|
|
2588
2878
|
break;
|
|
2589
2879
|
}
|
|
2590
2880
|
case 7: {
|
|
2591
2881
|
const a = {
|
|
2592
|
-
...
|
|
2593
|
-
ranges:
|
|
2882
|
+
...Te,
|
|
2883
|
+
ranges: o,
|
|
2594
2884
|
rule: {
|
|
2595
2885
|
type: L.dataBar,
|
|
2596
2886
|
isShowValue: !0
|
|
2597
2887
|
}
|
|
2598
2888
|
};
|
|
2599
|
-
|
|
2889
|
+
n.openPanel(a);
|
|
2600
2890
|
break;
|
|
2601
2891
|
}
|
|
2602
2892
|
case 8: {
|
|
2603
2893
|
const a = {
|
|
2604
|
-
...
|
|
2605
|
-
ranges:
|
|
2894
|
+
...Te,
|
|
2895
|
+
ranges: o,
|
|
2606
2896
|
rule: {
|
|
2607
2897
|
type: L.iconSet,
|
|
2608
2898
|
config: [],
|
|
2609
2899
|
isShowValue: !0
|
|
2610
2900
|
}
|
|
2611
2901
|
};
|
|
2612
|
-
|
|
2902
|
+
n.openPanel(a);
|
|
2613
2903
|
break;
|
|
2614
2904
|
}
|
|
2615
2905
|
case 2: {
|
|
2616
|
-
|
|
2906
|
+
n.openPanel();
|
|
2617
2907
|
break;
|
|
2618
2908
|
}
|
|
2619
2909
|
case 1: {
|
|
2620
|
-
|
|
2910
|
+
n.openPanel({ ...Te(), ranges: o });
|
|
2621
2911
|
break;
|
|
2622
2912
|
}
|
|
2623
2913
|
case 9: {
|
|
2624
|
-
i.executeCommand(
|
|
2914
|
+
i.executeCommand(Pr.id, { ranges: o });
|
|
2625
2915
|
break;
|
|
2626
2916
|
}
|
|
2627
2917
|
case 10: {
|
|
2628
|
-
i.executeCommand(
|
|
2918
|
+
i.executeCommand(xn.id);
|
|
2629
2919
|
break;
|
|
2630
2920
|
}
|
|
2631
2921
|
}
|
|
2632
2922
|
return !0;
|
|
2633
2923
|
}
|
|
2634
2924
|
};
|
|
2635
|
-
var
|
|
2636
|
-
for (var i =
|
|
2637
|
-
(
|
|
2925
|
+
var Wi = Object.getOwnPropertyDescriptor, qi = (t, e, n, r) => {
|
|
2926
|
+
for (var i = r > 1 ? void 0 : r ? Wi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
2927
|
+
(s = t[o]) && (i = s(i) || i);
|
|
2638
2928
|
return i;
|
|
2639
|
-
},
|
|
2640
|
-
let
|
|
2641
|
-
constructor(t, e,
|
|
2642
|
-
super(), this._injector = t, this._univerInstanceService = e, this._sheetInterceptorService =
|
|
2929
|
+
}, qe = (t, e) => (n, r) => e(n, r, t);
|
|
2930
|
+
let yt = class extends le {
|
|
2931
|
+
constructor(t, e, n, r, i) {
|
|
2932
|
+
super(), this._injector = t, this._univerInstanceService = e, this._sheetInterceptorService = n, this._selectionManagerService = r, this._conditionalFormattingRuleModel = i, this._init();
|
|
2643
2933
|
}
|
|
2644
2934
|
_init() {
|
|
2645
2935
|
this.disposeWithMe(this._sheetInterceptorService.interceptCommand({
|
|
2646
2936
|
getMutations: (t) => {
|
|
2647
2937
|
var i;
|
|
2648
|
-
const e = [],
|
|
2649
|
-
if ([
|
|
2650
|
-
const
|
|
2651
|
-
if (!
|
|
2652
|
-
return
|
|
2653
|
-
const
|
|
2654
|
-
if (!
|
|
2655
|
-
return
|
|
2656
|
-
const a =
|
|
2938
|
+
const e = [], n = [], r = { redos: e, undos: n };
|
|
2939
|
+
if ([Cr.id, yr.id].includes(t.id)) {
|
|
2940
|
+
const o = (i = this._selectionManagerService.getCurrentSelections()) == null ? void 0 : i.map((p) => p.range);
|
|
2941
|
+
if (!o)
|
|
2942
|
+
return r;
|
|
2943
|
+
const s = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET), d = s.getActiveSheet();
|
|
2944
|
+
if (!d)
|
|
2945
|
+
return r;
|
|
2946
|
+
const a = s.getUnitId(), h = d.getSheetId(), l = this._conditionalFormattingRuleModel.getSubunitRules(a, h);
|
|
2657
2947
|
if (!l || !l.length)
|
|
2658
|
-
return
|
|
2659
|
-
const { redos:
|
|
2660
|
-
e.push(...
|
|
2948
|
+
return r;
|
|
2949
|
+
const { redos: u, undos: v } = un(this._injector, l, o, a, h);
|
|
2950
|
+
e.push(...u), n.push(...v);
|
|
2661
2951
|
}
|
|
2662
|
-
return
|
|
2952
|
+
return r;
|
|
2663
2953
|
}
|
|
2664
2954
|
})), this.disposeWithMe(this._sheetInterceptorService.interceptRanges({
|
|
2665
|
-
getMutations: ({ unitId: t, subUnitId: e, ranges:
|
|
2666
|
-
const
|
|
2667
|
-
if (!
|
|
2668
|
-
return
|
|
2669
|
-
const
|
|
2670
|
-
if (!
|
|
2671
|
-
return
|
|
2672
|
-
const { redos:
|
|
2673
|
-
return
|
|
2955
|
+
getMutations: ({ unitId: t, subUnitId: e, ranges: n }) => {
|
|
2956
|
+
const r = [], i = [], o = { redos: r, undos: i };
|
|
2957
|
+
if (!n || !n.length)
|
|
2958
|
+
return o;
|
|
2959
|
+
const s = this._conditionalFormattingRuleModel.getSubunitRules(t, e);
|
|
2960
|
+
if (!s || !s.length)
|
|
2961
|
+
return o;
|
|
2962
|
+
const { redos: d, undos: a } = un(this._injector, s, n, t, e);
|
|
2963
|
+
return r.push(...d), i.push(...a), o;
|
|
2674
2964
|
}
|
|
2675
2965
|
}));
|
|
2676
2966
|
}
|
|
2677
2967
|
};
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
],
|
|
2685
|
-
function
|
|
2686
|
-
const
|
|
2687
|
-
return e.filter((
|
|
2688
|
-
const h = new
|
|
2968
|
+
yt = qi([
|
|
2969
|
+
qe(0, P(me)),
|
|
2970
|
+
qe(1, P(Z)),
|
|
2971
|
+
qe(2, P(Wt)),
|
|
2972
|
+
qe(3, P(je)),
|
|
2973
|
+
qe(4, P(Q))
|
|
2974
|
+
], yt);
|
|
2975
|
+
function un(t, e, n, r, i) {
|
|
2976
|
+
const o = [], s = [];
|
|
2977
|
+
return e.filter((d) => n.some((a) => d.ranges.some((h) => Ce.getIntersects(h, a)))).forEach((d) => {
|
|
2978
|
+
const h = new br().add(...d.ranges).subtract(...n).merge();
|
|
2689
2979
|
if (h.length) {
|
|
2690
2980
|
const l = {
|
|
2691
|
-
id:
|
|
2981
|
+
id: Se.id,
|
|
2692
2982
|
params: {
|
|
2693
|
-
unitId:
|
|
2983
|
+
unitId: r,
|
|
2694
2984
|
subUnitId: i,
|
|
2695
|
-
rule: { ...
|
|
2985
|
+
rule: { ...d, ranges: h }
|
|
2696
2986
|
}
|
|
2697
|
-
},
|
|
2698
|
-
|
|
2987
|
+
}, u = De(t, l.params);
|
|
2988
|
+
o.push(l), s.push(...u);
|
|
2699
2989
|
} else {
|
|
2700
2990
|
const l = {
|
|
2701
|
-
id:
|
|
2991
|
+
id: _e.id,
|
|
2702
2992
|
params: {
|
|
2703
|
-
unitId:
|
|
2993
|
+
unitId: r,
|
|
2704
2994
|
subUnitId: i,
|
|
2705
|
-
cfId:
|
|
2995
|
+
cfId: d.cfId
|
|
2706
2996
|
}
|
|
2707
|
-
},
|
|
2708
|
-
|
|
2997
|
+
}, u = Ae(t, l.params);
|
|
2998
|
+
o.push(l), s.push(...u);
|
|
2709
2999
|
}
|
|
2710
|
-
}), { redos:
|
|
3000
|
+
}), { redos: o, undos: s };
|
|
2711
3001
|
}
|
|
2712
|
-
var
|
|
2713
|
-
for (var i =
|
|
2714
|
-
(
|
|
3002
|
+
var Gi = Object.getOwnPropertyDescriptor, Zi = (t, e, n, r) => {
|
|
3003
|
+
for (var i = r > 1 ? void 0 : r ? Gi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3004
|
+
(s = t[o]) && (i = s(i) || i);
|
|
2715
3005
|
return i;
|
|
2716
|
-
},
|
|
2717
|
-
let
|
|
2718
|
-
constructor(e,
|
|
3006
|
+
}, Ge = (t, e) => (n, r) => e(n, r, t);
|
|
3007
|
+
let Qe = class extends le {
|
|
3008
|
+
constructor(e, n, r, i, o) {
|
|
2719
3009
|
super();
|
|
2720
|
-
|
|
2721
|
-
this._sheetClipboardService = e, this._conditionalFormattingRuleModel =
|
|
3010
|
+
Ie(this, "_copyInfo");
|
|
3011
|
+
this._sheetClipboardService = e, this._conditionalFormattingRuleModel = n, this._injector = r, this._conditionalFormattingViewModel = i, this._univerInstanceService = o, this._initClipboardHook();
|
|
2722
3012
|
}
|
|
2723
3013
|
_initClipboardHook() {
|
|
2724
3014
|
this.disposeWithMe(
|
|
2725
3015
|
this._sheetClipboardService.addClipboardHook({
|
|
2726
|
-
id:
|
|
2727
|
-
onBeforeCopy: (e,
|
|
2728
|
-
onPasteCells: (e,
|
|
2729
|
-
const { copyType:
|
|
2730
|
-
return this._generateConditionalFormattingMutations(a, { copyType:
|
|
3016
|
+
id: it,
|
|
3017
|
+
onBeforeCopy: (e, n, r) => this._collectConditionalRule(e, n, r),
|
|
3018
|
+
onPasteCells: (e, n, r, i) => {
|
|
3019
|
+
const { copyType: o = Jt.COPY, pasteType: s } = i, { range: d } = e || {}, { range: a } = n;
|
|
3020
|
+
return this._generateConditionalFormattingMutations(a, { copyType: o, pasteType: s, copyRange: d });
|
|
2731
3021
|
}
|
|
2732
3022
|
})
|
|
2733
3023
|
);
|
|
2734
3024
|
}
|
|
2735
|
-
_collectConditionalRule(e,
|
|
2736
|
-
const i = new
|
|
3025
|
+
_collectConditionalRule(e, n, r) {
|
|
3026
|
+
const i = new Ne(), o = {};
|
|
2737
3027
|
this._copyInfo = {
|
|
2738
3028
|
matrix: i,
|
|
2739
3029
|
info: {
|
|
2740
3030
|
unitId: e,
|
|
2741
|
-
subUnitId:
|
|
2742
|
-
cfMap:
|
|
3031
|
+
subUnitId: n,
|
|
3032
|
+
cfMap: o
|
|
2743
3033
|
}
|
|
2744
3034
|
};
|
|
2745
|
-
const
|
|
2746
|
-
if (!
|
|
3035
|
+
const s = this._injector.invoke((l) => Ir(r, l, e, n));
|
|
3036
|
+
if (!s)
|
|
2747
3037
|
return;
|
|
2748
|
-
const { rows:
|
|
2749
|
-
|
|
3038
|
+
const { rows: d, cols: a } = s, h = /* @__PURE__ */ new Set();
|
|
3039
|
+
d.forEach((l, u) => {
|
|
2750
3040
|
a.forEach((v, p) => {
|
|
2751
|
-
const y = this._conditionalFormattingViewModel.getCellCfs(e,
|
|
2752
|
-
y && (y.forEach((f) => h.add(f.cfId)), i.setValue(
|
|
3041
|
+
const y = this._conditionalFormattingViewModel.getCellCfs(e, n, l, v);
|
|
3042
|
+
y && (y.forEach((f) => h.add(f.cfId)), i.setValue(u, p, y.map((f) => f.cfId)));
|
|
2753
3043
|
});
|
|
2754
3044
|
}), h.forEach((l) => {
|
|
2755
|
-
const
|
|
2756
|
-
|
|
3045
|
+
const u = this._conditionalFormattingRuleModel.getRule(e, n, l);
|
|
3046
|
+
u && (o[l] = u.rule);
|
|
2757
3047
|
});
|
|
2758
3048
|
}
|
|
2759
3049
|
// eslint-disable-next-line max-lines-per-function
|
|
2760
|
-
_generateConditionalFormattingMutations(e,
|
|
2761
|
-
const
|
|
3050
|
+
_generateConditionalFormattingMutations(e, n) {
|
|
3051
|
+
const r = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET), i = r.getActiveSheet(), o = r.getUnitId();
|
|
2762
3052
|
if (!i) return { redos: [], undos: [] };
|
|
2763
|
-
const
|
|
2764
|
-
if (
|
|
3053
|
+
const s = i.getSheetId();
|
|
3054
|
+
if (n.copyType === Jt.CUT)
|
|
2765
3055
|
return this._copyInfo = null, { redos: [], undos: [] };
|
|
2766
|
-
if (!this._copyInfo || !
|
|
3056
|
+
if (!this._copyInfo || !n.copyRange)
|
|
2767
3057
|
return { redos: [], undos: [] };
|
|
2768
3058
|
if (![
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
3059
|
+
kt.SPECIAL_PASTE_FORMAT,
|
|
3060
|
+
kt.DEFAULT_PASTE,
|
|
3061
|
+
kt.SPECIAL_PASTE_BESIDES_BORDER
|
|
2772
3062
|
].includes(
|
|
2773
|
-
|
|
3063
|
+
n.pasteType
|
|
2774
3064
|
))
|
|
2775
3065
|
return { redos: [], undos: [] };
|
|
2776
|
-
const { ranges: [a, h], mapFunc: l } =
|
|
2777
|
-
|
|
2778
|
-
const { row: S, col: C } = l(g, b), M = this._conditionalFormattingViewModel.getCellCfs(
|
|
3066
|
+
const { ranges: [a, h], mapFunc: l } = Fn([n.copyRange, e]), u = ri(a, h, !0), v = {};
|
|
3067
|
+
ye.foreach(h, (g, b) => {
|
|
3068
|
+
const { row: S, col: C } = l(g, b), M = this._conditionalFormattingViewModel.getCellCfs(o, s, S, C);
|
|
2779
3069
|
M && M.forEach((E) => {
|
|
2780
3070
|
if (!v[E.cfId]) {
|
|
2781
|
-
const V = new
|
|
3071
|
+
const V = new Ne();
|
|
2782
3072
|
v[E.cfId] = V;
|
|
2783
|
-
const O = this._conditionalFormattingRuleModel.getRule(
|
|
3073
|
+
const O = this._conditionalFormattingRuleModel.getRule(o, s, E.cfId);
|
|
2784
3074
|
O == null || O.ranges.forEach((m) => {
|
|
2785
|
-
|
|
3075
|
+
ye.foreach(m, (_, j) => {
|
|
2786
3076
|
V.setValue(_, j, 1);
|
|
2787
3077
|
});
|
|
2788
3078
|
});
|
|
@@ -2791,11 +3081,11 @@ let et = class extends ue {
|
|
|
2791
3081
|
});
|
|
2792
3082
|
});
|
|
2793
3083
|
const { matrix: p, info: y } = this._copyInfo, f = [];
|
|
2794
|
-
let w = this._conditionalFormattingRuleModel.createCfId(
|
|
3084
|
+
let w = this._conditionalFormattingRuleModel.createCfId(o, s);
|
|
2795
3085
|
const I = {}, R = (g) => {
|
|
2796
3086
|
if (I[g])
|
|
2797
3087
|
return I[g];
|
|
2798
|
-
const b = y == null ? void 0 : y.cfMap[g], S = [...this._conditionalFormattingRuleModel.getSubunitRules(
|
|
3088
|
+
const b = y == null ? void 0 : y.cfMap[g], S = [...this._conditionalFormattingRuleModel.getSubunitRules(o, s) || [], ...f].find((C) => jt.diffValue(C.rule, b));
|
|
2799
3089
|
if (S)
|
|
2800
3090
|
return I[g] = S, S;
|
|
2801
3091
|
{
|
|
@@ -2808,9 +3098,9 @@ let et = class extends ue {
|
|
|
2808
3098
|
return I[g] = C, f.push(C), w = `${Number(w) + 1}`, C;
|
|
2809
3099
|
}
|
|
2810
3100
|
};
|
|
2811
|
-
|
|
3101
|
+
u.forEach((g) => {
|
|
2812
3102
|
p && p.forValue((b, S, C) => {
|
|
2813
|
-
const M =
|
|
3103
|
+
const M = Ce.getPositionRange(
|
|
2814
3104
|
{
|
|
2815
3105
|
startRow: b,
|
|
2816
3106
|
endRow: b,
|
|
@@ -2821,10 +3111,10 @@ let et = class extends ue {
|
|
|
2821
3111
|
), { row: E, col: V } = l(M.startRow, M.startColumn);
|
|
2822
3112
|
C.forEach((O) => {
|
|
2823
3113
|
if (!v[O]) {
|
|
2824
|
-
const m = R(O), _ = new
|
|
3114
|
+
const m = R(O), _ = new Ne();
|
|
2825
3115
|
v[O] = _, m.ranges.forEach((j) => {
|
|
2826
|
-
|
|
2827
|
-
_.setValue(K,
|
|
3116
|
+
ye.foreach(j, (K, fe) => {
|
|
3117
|
+
_.setValue(K, fe, 1);
|
|
2828
3118
|
});
|
|
2829
3119
|
});
|
|
2830
3120
|
}
|
|
@@ -2834,32 +3124,32 @@ let et = class extends ue {
|
|
|
2834
3124
|
});
|
|
2835
3125
|
const x = [], T = [];
|
|
2836
3126
|
for (const g in v) {
|
|
2837
|
-
const b = v[g], S = ft(
|
|
3127
|
+
const b = v[g], S = mt(ft(b));
|
|
2838
3128
|
if (!S.length) {
|
|
2839
3129
|
const C = {
|
|
2840
|
-
unitId:
|
|
2841
|
-
subUnitId:
|
|
3130
|
+
unitId: o,
|
|
3131
|
+
subUnitId: s,
|
|
2842
3132
|
cfId: g
|
|
2843
3133
|
};
|
|
2844
|
-
x.push({ id:
|
|
3134
|
+
x.push({ id: _e.id, params: C }), T.push(...Ae(this._injector, C));
|
|
2845
3135
|
}
|
|
2846
3136
|
if (f.some((C) => C.cfId === g)) {
|
|
2847
3137
|
const C = R(g), M = {
|
|
2848
|
-
unitId:
|
|
2849
|
-
subUnitId:
|
|
3138
|
+
unitId: o,
|
|
3139
|
+
subUnitId: s,
|
|
2850
3140
|
rule: { ...C, ranges: S }
|
|
2851
3141
|
};
|
|
2852
|
-
x.push({ id:
|
|
3142
|
+
x.push({ id: oe.id, params: M }), T.push(En(this._injector, M));
|
|
2853
3143
|
} else {
|
|
2854
|
-
const C = this._conditionalFormattingRuleModel.getRule(
|
|
3144
|
+
const C = this._conditionalFormattingRuleModel.getRule(o, s, g);
|
|
2855
3145
|
if (!C)
|
|
2856
3146
|
continue;
|
|
2857
3147
|
const M = {
|
|
2858
|
-
unitId:
|
|
2859
|
-
subUnitId:
|
|
3148
|
+
unitId: o,
|
|
3149
|
+
subUnitId: s,
|
|
2860
3150
|
rule: { ...C, ranges: S }
|
|
2861
3151
|
};
|
|
2862
|
-
x.push({ id:
|
|
3152
|
+
x.push({ id: Se.id, params: M }), T.push(...De(this._injector, M));
|
|
2863
3153
|
}
|
|
2864
3154
|
}
|
|
2865
3155
|
return {
|
|
@@ -2868,239 +3158,239 @@ let et = class extends ue {
|
|
|
2868
3158
|
};
|
|
2869
3159
|
}
|
|
2870
3160
|
};
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
],
|
|
2878
|
-
var
|
|
2879
|
-
for (var i =
|
|
2880
|
-
(
|
|
3161
|
+
Qe = Zi([
|
|
3162
|
+
Ge(0, P(ni)),
|
|
3163
|
+
Ge(1, P(Q)),
|
|
3164
|
+
Ge(2, P(me)),
|
|
3165
|
+
Ge(3, P(rt)),
|
|
3166
|
+
Ge(4, P(Z))
|
|
3167
|
+
], Qe);
|
|
3168
|
+
var zi = Object.getOwnPropertyDescriptor, Yi = (t, e, n, r) => {
|
|
3169
|
+
for (var i = r > 1 ? void 0 : r ? zi(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3170
|
+
(s = t[o]) && (i = s(i) || i);
|
|
2881
3171
|
return i;
|
|
2882
|
-
},
|
|
2883
|
-
let
|
|
2884
|
-
constructor(t, e,
|
|
2885
|
-
super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController =
|
|
3172
|
+
}, Pt = (t, e) => (n, r) => e(n, r, t);
|
|
3173
|
+
let et = class extends le {
|
|
3174
|
+
constructor(t, e, n) {
|
|
3175
|
+
super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController = n, this._commandExecutedListener();
|
|
2886
3176
|
}
|
|
2887
3177
|
_commandExecutedListener() {
|
|
2888
3178
|
this.disposeWithMe(
|
|
2889
3179
|
this._commandService.beforeCommandExecuted((t) => {
|
|
2890
|
-
t.id ===
|
|
2891
|
-
workbookTypes: [
|
|
2892
|
-
rangeTypes: [
|
|
2893
|
-
worksheetTypes: [
|
|
3180
|
+
t.id === Rn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
|
|
3181
|
+
workbookTypes: [wn],
|
|
3182
|
+
rangeTypes: [_n],
|
|
3183
|
+
worksheetTypes: [In, Sn]
|
|
2894
3184
|
}, t.params.rule.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
|
|
2895
3185
|
})
|
|
2896
3186
|
);
|
|
2897
3187
|
}
|
|
2898
3188
|
};
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
],
|
|
2904
|
-
var
|
|
2905
|
-
for (var i =
|
|
2906
|
-
(
|
|
3189
|
+
et = Yi([
|
|
3190
|
+
Pt(0, P(re)),
|
|
3191
|
+
Pt(1, te),
|
|
3192
|
+
Pt(2, P(Sr))
|
|
3193
|
+
], et);
|
|
3194
|
+
var Ki = Object.getOwnPropertyDescriptor, Xi = (t, e, n, r) => {
|
|
3195
|
+
for (var i = r > 1 ? void 0 : r ? Ki(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3196
|
+
(s = t[o]) && (i = s(i) || i);
|
|
2907
3197
|
return i;
|
|
2908
|
-
},
|
|
2909
|
-
let
|
|
2910
|
-
constructor(t, e,
|
|
2911
|
-
super(), this._conditionalFormattingRuleModel = t, this._univerInstanceService = e, this._injector =
|
|
3198
|
+
}, ht = (t, e) => (n, r) => e(n, r, t);
|
|
3199
|
+
let tt = class extends le {
|
|
3200
|
+
constructor(t, e, n, r) {
|
|
3201
|
+
super(), this._conditionalFormattingRuleModel = t, this._univerInstanceService = e, this._injector = n, this._refRangeService = r, this._initRefRange();
|
|
2912
3202
|
}
|
|
2913
3203
|
_initRefRange() {
|
|
2914
|
-
const t = /* @__PURE__ */ new Map(), e = (
|
|
2915
|
-
const
|
|
2916
|
-
const h = [...
|
|
2917
|
-
if (
|
|
3204
|
+
const t = /* @__PURE__ */ new Map(), e = (r, i, o) => `${r}_${i}_${o}`, n = (r, i, o) => {
|
|
3205
|
+
const s = (a) => {
|
|
3206
|
+
const h = [...o.ranges], l = h.map((v) => wr(v, a)).filter((v) => !!v);
|
|
3207
|
+
if (Or(l, h))
|
|
2918
3208
|
return { redos: [], undos: [] };
|
|
2919
3209
|
if (l.length) {
|
|
2920
|
-
const v = { unitId:
|
|
3210
|
+
const v = { unitId: r, subUnitId: i, rule: { ...o, ranges: l } }, p = [{ id: Se.id, params: v }], y = De(this._injector, v);
|
|
2921
3211
|
return { redos: p, undos: y };
|
|
2922
3212
|
} else {
|
|
2923
|
-
const v = { unitId:
|
|
3213
|
+
const v = { unitId: r, subUnitId: i, cfId: o.cfId }, p = [{ id: _e.id, params: v }], y = Ae(this._injector, v);
|
|
2924
3214
|
return { redos: p, undos: y };
|
|
2925
3215
|
}
|
|
2926
|
-
},
|
|
2927
|
-
|
|
2928
|
-
const h = this._refRangeService.registerRefRange(a,
|
|
2929
|
-
|
|
2930
|
-
}), t.set(e(
|
|
3216
|
+
}, d = [];
|
|
3217
|
+
o.ranges.forEach((a) => {
|
|
3218
|
+
const h = this._refRangeService.registerRefRange(a, s);
|
|
3219
|
+
d.push(() => h.dispose());
|
|
3220
|
+
}), t.set(e(r, i, o.cfId), () => d.forEach((a) => a()));
|
|
2931
3221
|
};
|
|
2932
|
-
this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe((
|
|
2933
|
-
const { unitId: i, subUnitId:
|
|
2934
|
-
if (!(
|
|
2935
|
-
switch (
|
|
3222
|
+
this.disposeWithMe(this._conditionalFormattingRuleModel.$ruleChange.subscribe((r) => {
|
|
3223
|
+
const { unitId: i, subUnitId: o, rule: s } = r, d = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET), a = d.getActiveSheet();
|
|
3224
|
+
if (!(r.unitId !== d.getUnitId() || r.subUnitId !== (a == null ? void 0 : a.getSheetId())))
|
|
3225
|
+
switch (r.type) {
|
|
2936
3226
|
case "add": {
|
|
2937
|
-
r
|
|
3227
|
+
n(r.unitId, r.subUnitId, r.rule);
|
|
2938
3228
|
break;
|
|
2939
3229
|
}
|
|
2940
3230
|
case "delete": {
|
|
2941
|
-
const h = t.get(e(i,
|
|
3231
|
+
const h = t.get(e(i, o, s.cfId));
|
|
2942
3232
|
h && h();
|
|
2943
3233
|
break;
|
|
2944
3234
|
}
|
|
2945
3235
|
case "set": {
|
|
2946
|
-
const h = t.get(e(i,
|
|
2947
|
-
h && h(), r
|
|
3236
|
+
const h = t.get(e(i, o, s.cfId));
|
|
3237
|
+
h && h(), n(r.unitId, r.subUnitId, r.rule);
|
|
2948
3238
|
}
|
|
2949
3239
|
}
|
|
2950
|
-
})), this.disposeWithMe(
|
|
2951
|
-
t.forEach((
|
|
2952
|
-
|
|
3240
|
+
})), this.disposeWithMe(fn(() => {
|
|
3241
|
+
t.forEach((r) => {
|
|
3242
|
+
r();
|
|
2953
3243
|
}), t.clear();
|
|
2954
3244
|
}));
|
|
2955
3245
|
}
|
|
2956
3246
|
};
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
],
|
|
2963
|
-
var
|
|
2964
|
-
for (var i =
|
|
2965
|
-
(
|
|
3247
|
+
tt = Xi([
|
|
3248
|
+
ht(0, P(Q)),
|
|
3249
|
+
ht(1, P(Z)),
|
|
3250
|
+
ht(2, P(me)),
|
|
3251
|
+
ht(3, P(_r))
|
|
3252
|
+
], tt);
|
|
3253
|
+
var Ji = Object.getOwnPropertyDescriptor, Qi = (t, e, n, r) => {
|
|
3254
|
+
for (var i = r > 1 ? void 0 : r ? Ji(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3255
|
+
(s = t[o]) && (i = s(i) || i);
|
|
2966
3256
|
return i;
|
|
2967
|
-
},
|
|
2968
|
-
let
|
|
2969
|
-
constructor(e,
|
|
3257
|
+
}, Oe = (t, e) => (n, r) => e(n, r, t);
|
|
3258
|
+
let nt = class extends le {
|
|
3259
|
+
constructor(e, n, r, i, o, s) {
|
|
2970
3260
|
super();
|
|
2971
3261
|
/**
|
|
2972
3262
|
* When a set operation is triggered multiple times over a short period of time, it may result in some callbacks not being disposed,and caused a render cache exception.
|
|
2973
3263
|
* The solution here is to store all the asynchronous tasks and focus on processing after the last callback
|
|
2974
3264
|
*/
|
|
2975
|
-
|
|
2976
|
-
this._sheetInterceptorService = e, this._conditionalFormattingService =
|
|
3265
|
+
Ie(this, "_ruleChangeCacheMap", /* @__PURE__ */ new Map());
|
|
3266
|
+
this._sheetInterceptorService = e, this._conditionalFormattingService = n, this._univerInstanceService = r, this._renderManagerService = i, this._conditionalFormattingViewModel = o, this._conditionalFormattingRuleModel = s, this._initViewModelInterceptor(), this._initSkeleton(), this.disposeWithMe(() => {
|
|
2977
3267
|
this._ruleChangeCacheMap.clear();
|
|
2978
3268
|
});
|
|
2979
3269
|
}
|
|
2980
3270
|
_markDirtySkeleton() {
|
|
2981
|
-
var
|
|
3271
|
+
var n, r, i;
|
|
2982
3272
|
const e = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET).getUnitId();
|
|
2983
|
-
(
|
|
3273
|
+
(n = this._renderManagerService.getRenderById(e)) == null || n.with(Ln).reCalculate(), (i = (r = this._renderManagerService.getRenderById(e)) == null ? void 0 : r.mainComponent) == null || i.makeDirty();
|
|
2984
3274
|
}
|
|
2985
3275
|
_initSkeleton() {
|
|
2986
|
-
this.disposeWithMe(
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
const
|
|
2991
|
-
if (!
|
|
2992
|
-
const
|
|
2993
|
-
return
|
|
3276
|
+
this.disposeWithMe(Un(this._conditionalFormattingRuleModel.$ruleChange, this._conditionalFormattingViewModel.markDirty$).pipe(
|
|
3277
|
+
li(16),
|
|
3278
|
+
en((e) => !!e.length),
|
|
3279
|
+
en((e) => {
|
|
3280
|
+
const n = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET);
|
|
3281
|
+
if (!n) return !1;
|
|
3282
|
+
const r = n.getActiveSheet();
|
|
3283
|
+
return r ? e.filter((i) => i.unitId === n.getUnitId() && i.subUnitId === r.getSheetId()).length > 0 : !1;
|
|
2994
3284
|
})
|
|
2995
3285
|
).subscribe(() => this._markDirtySkeleton()));
|
|
2996
3286
|
}
|
|
2997
3287
|
_initViewModelInterceptor() {
|
|
2998
|
-
this.disposeWithMe(this._sheetInterceptorService.intercept(
|
|
2999
|
-
effect:
|
|
3000
|
-
handler: (e,
|
|
3001
|
-
const i = this._conditionalFormattingService.composeStyle(
|
|
3288
|
+
this.disposeWithMe(this._sheetInterceptorService.intercept(Rr.CELL_CONTENT, {
|
|
3289
|
+
effect: vr.Style,
|
|
3290
|
+
handler: (e, n, r) => {
|
|
3291
|
+
const i = this._conditionalFormattingService.composeStyle(n.unitId, n.subUnitId, n.row, n.col);
|
|
3002
3292
|
if (!i)
|
|
3003
|
-
return
|
|
3004
|
-
const
|
|
3293
|
+
return r(e);
|
|
3294
|
+
const o = n.workbook.getStyles(), s = (typeof (e == null ? void 0 : e.s) == "string" ? o.get(e == null ? void 0 : e.s) : e == null ? void 0 : e.s) || {}, d = e === n.rawData ? { ...n.rawData } : e;
|
|
3005
3295
|
if (i.style) {
|
|
3006
3296
|
const a = {
|
|
3007
|
-
...
|
|
3297
|
+
...s,
|
|
3008
3298
|
...i.style
|
|
3009
3299
|
};
|
|
3010
|
-
Object.assign(
|
|
3300
|
+
Object.assign(d, { s: a });
|
|
3011
3301
|
}
|
|
3012
|
-
return
|
|
3302
|
+
return d.fontRenderExtension || (d.fontRenderExtension = {}, i.isShowValue !== void 0 && (d.fontRenderExtension.isSkip = !i.isShowValue)), i.dataBar && (d.dataBar = i.dataBar), i.iconSet && (d.iconSet = i.iconSet, d.fontRenderExtension.leftOffset = $r + Dr), r(d);
|
|
3013
3303
|
},
|
|
3014
3304
|
priority: 10
|
|
3015
3305
|
}));
|
|
3016
3306
|
}
|
|
3017
3307
|
};
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
],
|
|
3026
|
-
const
|
|
3027
|
-
var
|
|
3028
|
-
for (var i =
|
|
3029
|
-
(
|
|
3308
|
+
nt = Qi([
|
|
3309
|
+
Oe(0, P(Wt)),
|
|
3310
|
+
Oe(1, P(Nn)),
|
|
3311
|
+
Oe(2, P(Z)),
|
|
3312
|
+
Oe(3, P(Pn)),
|
|
3313
|
+
Oe(4, P(rt)),
|
|
3314
|
+
Oe(5, P(Q))
|
|
3315
|
+
], nt);
|
|
3316
|
+
const nr = "sheets-conditional-formatting-ui.config", bt = {};
|
|
3317
|
+
var eo = Object.defineProperty, to = Object.getOwnPropertyDescriptor, no = (t, e, n) => e in t ? eo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ro = (t, e, n, r) => {
|
|
3318
|
+
for (var i = r > 1 ? void 0 : r ? to(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3319
|
+
(s = t[o]) && (i = s(i) || i);
|
|
3030
3320
|
return i;
|
|
3031
|
-
},
|
|
3032
|
-
let
|
|
3033
|
-
constructor(t =
|
|
3034
|
-
super(), this._config = t, this._injector = e, this._commandService =
|
|
3035
|
-
const { menu: i, ...
|
|
3321
|
+
}, Ot = (t, e) => (n, r) => e(n, r, t), rr = (t, e, n) => no(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3322
|
+
let It = class extends yn {
|
|
3323
|
+
constructor(t = bt, e, n, r) {
|
|
3324
|
+
super(), this._config = t, this._injector = e, this._commandService = n, this._configService = r;
|
|
3325
|
+
const { menu: i, ...o } = bn(
|
|
3036
3326
|
{},
|
|
3037
|
-
|
|
3327
|
+
bt,
|
|
3038
3328
|
this._config
|
|
3039
3329
|
);
|
|
3040
|
-
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(
|
|
3330
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(nr, o), this._initCommand(), this._injector.add([nt]), this._injector.add([tt]), this._injector.add([Qe]), this._injector.add([et]), this._injector.add([He]);
|
|
3041
3331
|
}
|
|
3042
3332
|
_initCommand() {
|
|
3043
3333
|
[
|
|
3044
|
-
|
|
3334
|
+
On,
|
|
3045
3335
|
$n,
|
|
3336
|
+
Dn,
|
|
3046
3337
|
An,
|
|
3047
3338
|
Hn,
|
|
3048
3339
|
jn,
|
|
3049
3340
|
Bn,
|
|
3050
3341
|
Wn,
|
|
3051
3342
|
qn,
|
|
3052
|
-
|
|
3053
|
-
Vt
|
|
3343
|
+
Mt
|
|
3054
3344
|
].forEach((t) => {
|
|
3055
3345
|
this._commandService.registerCommand(t);
|
|
3056
3346
|
});
|
|
3057
3347
|
}
|
|
3058
3348
|
};
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
],
|
|
3067
|
-
var
|
|
3068
|
-
for (var i =
|
|
3069
|
-
(
|
|
3349
|
+
rr(It, "pluginName", `${it}_MOBILE_UI_PLUGIN`);
|
|
3350
|
+
rr(It, "type", A.UNIVER_SHEET);
|
|
3351
|
+
It = ro([
|
|
3352
|
+
pn(Mn),
|
|
3353
|
+
Ot(1, P(me)),
|
|
3354
|
+
Ot(2, P(te)),
|
|
3355
|
+
Ot(3, Cn)
|
|
3356
|
+
], It);
|
|
3357
|
+
var io = Object.getOwnPropertyDescriptor, oo = (t, e, n, r) => {
|
|
3358
|
+
for (var i = r > 1 ? void 0 : r ? io(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3359
|
+
(s = t[o]) && (i = s(i) || i);
|
|
3070
3360
|
return i;
|
|
3071
|
-
},
|
|
3072
|
-
let
|
|
3073
|
-
constructor(t, e,
|
|
3074
|
-
super(), this._injector = t, this._univerInstanceService = e, this._autoFillService =
|
|
3361
|
+
}, Ze = (t, e) => (n, r) => e(n, r, t);
|
|
3362
|
+
let St = class extends le {
|
|
3363
|
+
constructor(t, e, n, r, i) {
|
|
3364
|
+
super(), this._injector = t, this._univerInstanceService = e, this._autoFillService = n, this._conditionalFormattingRuleModel = r, this._conditionalFormattingViewModel = i, this._initAutoFill();
|
|
3075
3365
|
}
|
|
3076
3366
|
// eslint-disable-next-line max-lines-per-function
|
|
3077
3367
|
_initAutoFill() {
|
|
3078
|
-
const t = () => ({ redos: [], undos: [] }), e = (i,
|
|
3368
|
+
const t = () => ({ redos: [], undos: [] }), e = (i, o, s, d, a) => {
|
|
3079
3369
|
var p;
|
|
3080
3370
|
const h = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET).getUnitId(), l = (p = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : p.getSheetId();
|
|
3081
3371
|
if (!h || !l)
|
|
3082
3372
|
return;
|
|
3083
|
-
const
|
|
3373
|
+
const u = {
|
|
3084
3374
|
startRow: i.row,
|
|
3085
3375
|
startColumn: i.col,
|
|
3086
3376
|
endColumn: i.col,
|
|
3087
3377
|
endRow: i.row
|
|
3088
3378
|
}, v = {
|
|
3089
|
-
startRow:
|
|
3090
|
-
startColumn:
|
|
3091
|
-
endColumn:
|
|
3092
|
-
endRow:
|
|
3379
|
+
startRow: o.row,
|
|
3380
|
+
startColumn: o.col,
|
|
3381
|
+
endColumn: o.col,
|
|
3382
|
+
endRow: o.row
|
|
3093
3383
|
};
|
|
3094
|
-
|
|
3095
|
-
const w =
|
|
3384
|
+
ye.foreach(s, (y, f) => {
|
|
3385
|
+
const w = Ce.getPositionRange(
|
|
3096
3386
|
{
|
|
3097
3387
|
startRow: y,
|
|
3098
3388
|
startColumn: f,
|
|
3099
3389
|
endColumn: f,
|
|
3100
3390
|
endRow: y
|
|
3101
3391
|
},
|
|
3102
|
-
|
|
3103
|
-
), I =
|
|
3392
|
+
u
|
|
3393
|
+
), I = Ce.getPositionRange(
|
|
3104
3394
|
{
|
|
3105
3395
|
startRow: y,
|
|
3106
3396
|
startColumn: f,
|
|
@@ -3120,94 +3410,94 @@ let _t = class extends ue {
|
|
|
3120
3410
|
b
|
|
3121
3411
|
);
|
|
3122
3412
|
S && S.forEach((C) => {
|
|
3123
|
-
let M =
|
|
3124
|
-
if (!
|
|
3413
|
+
let M = d.get(C.cfId);
|
|
3414
|
+
if (!d.get(C.cfId)) {
|
|
3125
3415
|
const E = this._conditionalFormattingRuleModel.getRule(h, l, C.cfId);
|
|
3126
3416
|
if (!E)
|
|
3127
3417
|
return;
|
|
3128
|
-
M = new
|
|
3129
|
-
|
|
3418
|
+
M = new Ne(), E.ranges.forEach((V) => {
|
|
3419
|
+
ye.foreach(V, (O, m) => {
|
|
3130
3420
|
M.setValue(O, m, 1);
|
|
3131
3421
|
});
|
|
3132
|
-
}),
|
|
3422
|
+
}), d.set(C.cfId, M);
|
|
3133
3423
|
}
|
|
3134
3424
|
M.realDeleteValue(g, b);
|
|
3135
3425
|
}), T && T.forEach((C) => {
|
|
3136
|
-
let M =
|
|
3137
|
-
if (!
|
|
3426
|
+
let M = d.get(C.cfId);
|
|
3427
|
+
if (!d.get(C.cfId)) {
|
|
3138
3428
|
const E = this._conditionalFormattingRuleModel.getRule(h, l, C.cfId);
|
|
3139
3429
|
if (!E)
|
|
3140
3430
|
return;
|
|
3141
|
-
M = new
|
|
3142
|
-
|
|
3431
|
+
M = new Ne(), E.ranges.forEach((V) => {
|
|
3432
|
+
ye.foreach(V, (O, m) => {
|
|
3143
3433
|
M.setValue(O, m, 1);
|
|
3144
3434
|
});
|
|
3145
|
-
}),
|
|
3435
|
+
}), d.set(C.cfId, M);
|
|
3146
3436
|
}
|
|
3147
3437
|
M.setValue(g, b, 1);
|
|
3148
3438
|
});
|
|
3149
3439
|
});
|
|
3150
|
-
},
|
|
3440
|
+
}, n = (i, o) => {
|
|
3151
3441
|
var I, R, x;
|
|
3152
|
-
const
|
|
3153
|
-
if (!
|
|
3442
|
+
const s = (I = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET)) == null ? void 0 : I.getUnitId(), d = (x = (R = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET)) == null ? void 0 : R.getActiveSheet()) == null ? void 0 : x.getSheetId(), a = /* @__PURE__ */ new Map(), h = [], l = [];
|
|
3443
|
+
if (!s || !d)
|
|
3154
3444
|
return t();
|
|
3155
|
-
const
|
|
3445
|
+
const u = Fn([i, o]), [v, p] = u.ranges, { mapFunc: y } = u, f = {
|
|
3156
3446
|
row: v.startRow,
|
|
3157
3447
|
col: v.startColumn
|
|
3158
3448
|
};
|
|
3159
3449
|
return oi(v, p).forEach((T) => {
|
|
3160
3450
|
e(f, T.repeatStartCell, T.relativeRange, a, y);
|
|
3161
3451
|
}), a.forEach((T, g) => {
|
|
3162
|
-
const b = this._conditionalFormattingRuleModel.getRule(
|
|
3452
|
+
const b = this._conditionalFormattingRuleModel.getRule(s, d, g);
|
|
3163
3453
|
if (!b)
|
|
3164
3454
|
return;
|
|
3165
|
-
const S = ft(
|
|
3455
|
+
const S = mt(ft(T));
|
|
3166
3456
|
if (S.length) {
|
|
3167
3457
|
const C = {
|
|
3168
|
-
unitId:
|
|
3169
|
-
subUnitId:
|
|
3458
|
+
unitId: s,
|
|
3459
|
+
subUnitId: d,
|
|
3170
3460
|
rule: { ...b, ranges: S }
|
|
3171
3461
|
};
|
|
3172
|
-
h.push({ id:
|
|
3462
|
+
h.push({ id: Se.id, params: C }), l.push(...De(this._injector, C));
|
|
3173
3463
|
} else {
|
|
3174
3464
|
const C = {
|
|
3175
|
-
unitId:
|
|
3176
|
-
subUnitId:
|
|
3465
|
+
unitId: s,
|
|
3466
|
+
subUnitId: d,
|
|
3177
3467
|
cfId: b.cfId
|
|
3178
3468
|
};
|
|
3179
|
-
h.push({ id:
|
|
3469
|
+
h.push({ id: _e.id, params: C }), l.push(...Ae(this._injector, C));
|
|
3180
3470
|
}
|
|
3181
3471
|
}), {
|
|
3182
3472
|
undos: l,
|
|
3183
3473
|
redos: h
|
|
3184
3474
|
};
|
|
3185
|
-
},
|
|
3186
|
-
id:
|
|
3187
|
-
onFillData: (i,
|
|
3188
|
-
if (
|
|
3189
|
-
const { source:
|
|
3190
|
-
return
|
|
3475
|
+
}, r = {
|
|
3476
|
+
id: it,
|
|
3477
|
+
onFillData: (i, o, s) => {
|
|
3478
|
+
if (s === Ft.COPY || s === Ft.ONLY_FORMAT || s === Ft.SERIES) {
|
|
3479
|
+
const { source: d, target: a } = i;
|
|
3480
|
+
return n(d, a);
|
|
3191
3481
|
}
|
|
3192
3482
|
return t();
|
|
3193
3483
|
}
|
|
3194
3484
|
};
|
|
3195
|
-
this.disposeWithMe(this._autoFillService.addHook(
|
|
3485
|
+
this.disposeWithMe(this._autoFillService.addHook(r));
|
|
3196
3486
|
}
|
|
3197
3487
|
};
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
],
|
|
3205
|
-
var
|
|
3206
|
-
for (var i =
|
|
3207
|
-
(
|
|
3488
|
+
St = oo([
|
|
3489
|
+
Ze(0, P(me)),
|
|
3490
|
+
Ze(1, P(Z)),
|
|
3491
|
+
Ze(2, P(ii)),
|
|
3492
|
+
Ze(3, P(Q)),
|
|
3493
|
+
Ze(4, P(rt))
|
|
3494
|
+
], St);
|
|
3495
|
+
var so = Object.getOwnPropertyDescriptor, ao = (t, e, n, r) => {
|
|
3496
|
+
for (var i = r > 1 ? void 0 : r ? so(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3497
|
+
(s = t[o]) && (i = s(i) || i);
|
|
3208
3498
|
return i;
|
|
3209
|
-
},
|
|
3210
|
-
let
|
|
3499
|
+
}, dn = (t, e) => (n, r) => e(n, r, t);
|
|
3500
|
+
let _t = class extends le {
|
|
3211
3501
|
constructor(t, e) {
|
|
3212
3502
|
super(), this._sheetInterceptorService = t, this._conditionalFormattingService = e, this._initInterceptorEditorEnd();
|
|
3213
3503
|
}
|
|
@@ -3218,28 +3508,28 @@ let wt = class extends ue {
|
|
|
3218
3508
|
*/
|
|
3219
3509
|
_initInterceptorEditorEnd() {
|
|
3220
3510
|
this.disposeWithMe(
|
|
3221
|
-
|
|
3511
|
+
fn(
|
|
3222
3512
|
this._sheetInterceptorService.writeCellInterceptor.intercept(
|
|
3223
|
-
|
|
3513
|
+
Tr,
|
|
3224
3514
|
{
|
|
3225
|
-
handler: (t, e,
|
|
3226
|
-
var
|
|
3227
|
-
t ||
|
|
3228
|
-
const
|
|
3515
|
+
handler: (t, e, n) => {
|
|
3516
|
+
var s, d, a;
|
|
3517
|
+
t || n(t);
|
|
3518
|
+
const r = this._conditionalFormattingService.composeStyle(e.unitId, e.subUnitId, e.row, e.col), i = (s = r == null ? void 0 : r.style) != null ? s : {}, o = Object.keys(i);
|
|
3229
3519
|
if (t != null && t.p)
|
|
3230
|
-
return (a = (
|
|
3231
|
-
h.ts &&
|
|
3232
|
-
var
|
|
3233
|
-
(
|
|
3520
|
+
return (a = (d = t.p.body) == null ? void 0 : d.textRuns) == null || a.forEach((h) => {
|
|
3521
|
+
h.ts && o.forEach((l) => {
|
|
3522
|
+
var u;
|
|
3523
|
+
(u = h.ts) == null || delete u[l];
|
|
3234
3524
|
});
|
|
3235
|
-
}),
|
|
3525
|
+
}), n(t);
|
|
3236
3526
|
{
|
|
3237
3527
|
const h = { ...(typeof (t == null ? void 0 : t.s) == "string" ? e.workbook.getStyles().get(t.s) : t == null ? void 0 : t.s) || {} };
|
|
3238
|
-
|
|
3239
|
-
delete h[
|
|
3528
|
+
o.forEach((u) => {
|
|
3529
|
+
delete h[u];
|
|
3240
3530
|
});
|
|
3241
3531
|
const l = { ...t, s: { ...h } };
|
|
3242
|
-
return
|
|
3532
|
+
return n(l);
|
|
3243
3533
|
}
|
|
3244
3534
|
}
|
|
3245
3535
|
}
|
|
@@ -3248,17 +3538,17 @@ let wt = class extends ue {
|
|
|
3248
3538
|
);
|
|
3249
3539
|
}
|
|
3250
3540
|
};
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
],
|
|
3255
|
-
const
|
|
3256
|
-
|
|
3257
|
-
|
|
3541
|
+
_t = ao([
|
|
3542
|
+
dn(0, P(Wt)),
|
|
3543
|
+
dn(1, P(Nn))
|
|
3544
|
+
], _t);
|
|
3545
|
+
const hn = [
|
|
3546
|
+
Bt.id,
|
|
3547
|
+
oe.id,
|
|
3548
|
+
Se.id,
|
|
3258
3549
|
_e.id,
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
], Ye = [
|
|
3550
|
+
Tn.id
|
|
3551
|
+
], ze = [
|
|
3262
3552
|
{
|
|
3263
3553
|
label: {
|
|
3264
3554
|
name: "sheet.cf.ruleType.highlightCell",
|
|
@@ -3330,100 +3620,100 @@ const vn = [
|
|
|
3330
3620
|
},
|
|
3331
3621
|
value: ie.clearWorkSheetRules
|
|
3332
3622
|
}
|
|
3333
|
-
],
|
|
3334
|
-
const e = t.get(
|
|
3623
|
+
], lo = (t) => {
|
|
3624
|
+
const e = t.get(je), n = t.get(te), r = t.get(Z), i = t.get(Q), o = new Ee((a) => Un(
|
|
3335
3625
|
e.selectionMoveEnd$,
|
|
3336
3626
|
e.selectionSet$,
|
|
3337
|
-
new
|
|
3338
|
-
const l =
|
|
3627
|
+
new Ee((h) => {
|
|
3628
|
+
const l = n.onCommandExecuted((u) => {
|
|
3339
3629
|
var f;
|
|
3340
|
-
const { id: v, params: p } =
|
|
3341
|
-
|
|
3630
|
+
const { id: v, params: p } = u, y = (f = r.getCurrentUnitForType(A.UNIVER_SHEET)) == null ? void 0 : f.getUnitId();
|
|
3631
|
+
hn.includes(v) && p.unitId === y && h.next(null);
|
|
3342
3632
|
});
|
|
3343
3633
|
return () => l.dispose();
|
|
3344
3634
|
})
|
|
3345
|
-
).pipe(
|
|
3635
|
+
).pipe(tn(16)).subscribe(() => {
|
|
3346
3636
|
var f;
|
|
3347
|
-
const h = ((f = e.getCurrentSelections()) == null ? void 0 : f.map((w) => w.range)) || [], l =
|
|
3637
|
+
const h = ((f = e.getCurrentSelections()) == null ? void 0 : f.map((w) => w.range)) || [], l = r.getCurrentUnitForType(A.UNIVER_SHEET);
|
|
3348
3638
|
if (!l) return;
|
|
3349
|
-
const
|
|
3350
|
-
if (!
|
|
3351
|
-
const y = (i.getSubunitRules(l.getUnitId(),
|
|
3639
|
+
const u = l.getActiveSheet();
|
|
3640
|
+
if (!u) return;
|
|
3641
|
+
const y = (i.getSubunitRules(l.getUnitId(), u.getSheetId()) || []).filter((w) => w.ranges.some((I) => h.some((R) => Ce.intersects(R, I)))).map((w) => w.ranges).every((w) => gt(t, l.getUnitId(), u.getSheetId(), w));
|
|
3352
3642
|
a.next(y);
|
|
3353
|
-
})),
|
|
3354
|
-
(a) => new
|
|
3355
|
-
const l =
|
|
3643
|
+
})), s = new Ee(
|
|
3644
|
+
(a) => new Ee((h) => {
|
|
3645
|
+
const l = n.onCommandExecuted((u) => {
|
|
3356
3646
|
var f;
|
|
3357
|
-
const { id: v, params: p } =
|
|
3358
|
-
|
|
3647
|
+
const { id: v, params: p } = u, y = (f = r.getCurrentUnitForType(A.UNIVER_SHEET)) == null ? void 0 : f.getUnitId();
|
|
3648
|
+
hn.includes(v) && p.unitId === y && h.next(null);
|
|
3359
3649
|
});
|
|
3360
3650
|
return () => l.dispose();
|
|
3361
|
-
}).pipe(
|
|
3362
|
-
const h =
|
|
3651
|
+
}).pipe(tn(16)).subscribe(() => {
|
|
3652
|
+
const h = r.getCurrentUnitForType(A.UNIVER_SHEET);
|
|
3363
3653
|
if (!h) return;
|
|
3364
3654
|
const l = h.getActiveSheet();
|
|
3365
3655
|
if (!l) return;
|
|
3366
|
-
const
|
|
3367
|
-
if (!
|
|
3656
|
+
const u = i.getSubunitRules(h.getUnitId(), l.getSheetId()) || [];
|
|
3657
|
+
if (!u.length)
|
|
3368
3658
|
return a.next(!1), !1;
|
|
3369
|
-
const v =
|
|
3659
|
+
const v = u.map((p) => p.ranges).every((p) => gt(t, h.getUnitId(), l.getSheetId(), p));
|
|
3370
3660
|
a.next(v);
|
|
3371
3661
|
})
|
|
3372
|
-
),
|
|
3373
|
-
|
|
3374
|
-
const l =
|
|
3375
|
-
l && (l.disabled = !h, a.next(
|
|
3376
|
-
}),
|
|
3377
|
-
const l =
|
|
3378
|
-
l && (l.disabled = !h, a.next(
|
|
3379
|
-
}), a.next(
|
|
3662
|
+
), d = new Ee((a) => {
|
|
3663
|
+
o.subscribe((h) => {
|
|
3664
|
+
const l = ze.find((u) => u.value === ie.clearRangeRules);
|
|
3665
|
+
l && (l.disabled = !h, a.next(ze));
|
|
3666
|
+
}), s.subscribe((h) => {
|
|
3667
|
+
const l = ze.find((u) => u.value === ie.clearWorkSheetRules);
|
|
3668
|
+
l && (l.disabled = !h, a.next(ze));
|
|
3669
|
+
}), a.next(ze);
|
|
3380
3670
|
});
|
|
3381
3671
|
return {
|
|
3382
|
-
id:
|
|
3383
|
-
type:
|
|
3672
|
+
id: Mt.id,
|
|
3673
|
+
type: Gr.SELECTOR,
|
|
3384
3674
|
icon: "ConditionsDoubleIcon",
|
|
3385
3675
|
tooltip: "sheet.cf.title",
|
|
3386
|
-
selections:
|
|
3387
|
-
hidden$:
|
|
3388
|
-
disabled$:
|
|
3676
|
+
selections: d,
|
|
3677
|
+
hidden$: qr(t, A.UNIVER_SHEET),
|
|
3678
|
+
disabled$: si(t, { workbookTypes: [wn], worksheetTypes: [Sn, In], rangeTypes: [_n] })
|
|
3389
3679
|
};
|
|
3390
|
-
},
|
|
3391
|
-
[
|
|
3392
|
-
[
|
|
3680
|
+
}, co = {
|
|
3681
|
+
[Zr.RULES]: {
|
|
3682
|
+
[Mt.id]: {
|
|
3393
3683
|
order: 1,
|
|
3394
|
-
menuItemFactory:
|
|
3684
|
+
menuItemFactory: lo
|
|
3395
3685
|
}
|
|
3396
3686
|
}
|
|
3397
3687
|
};
|
|
3398
|
-
var
|
|
3399
|
-
for (var i =
|
|
3400
|
-
(
|
|
3688
|
+
var uo = Object.getOwnPropertyDescriptor, ho = (t, e, n, r) => {
|
|
3689
|
+
for (var i = r > 1 ? void 0 : r ? uo(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3690
|
+
(s = t[o]) && (i = s(i) || i);
|
|
3401
3691
|
return i;
|
|
3402
|
-
},
|
|
3403
|
-
let
|
|
3404
|
-
constructor(e,
|
|
3692
|
+
}, vn = (t, e) => (n, r) => e(n, r, t);
|
|
3693
|
+
let wt = class extends le {
|
|
3694
|
+
constructor(e, n) {
|
|
3405
3695
|
super();
|
|
3406
|
-
|
|
3407
|
-
this._injector = e, this._menuManagerService =
|
|
3696
|
+
Ie(this, "_sidebarDisposable", null);
|
|
3697
|
+
this._injector = e, this._menuManagerService = n, this._menuManagerService.mergeMenu(co);
|
|
3408
3698
|
}
|
|
3409
3699
|
};
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
],
|
|
3414
|
-
var
|
|
3415
|
-
for (var i =
|
|
3416
|
-
(
|
|
3700
|
+
wt = ho([
|
|
3701
|
+
vn(0, P(me)),
|
|
3702
|
+
vn(1, zr)
|
|
3703
|
+
], wt);
|
|
3704
|
+
var vo = Object.getOwnPropertyDescriptor, go = (t, e, n, r) => {
|
|
3705
|
+
for (var i = r > 1 ? void 0 : r ? vo(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3706
|
+
(s = t[o]) && (i = s(i) || i);
|
|
3417
3707
|
return i;
|
|
3418
|
-
}, $e = (t, e) => (
|
|
3419
|
-
const
|
|
3420
|
-
const
|
|
3708
|
+
}, $e = (t, e) => (n, r) => e(n, r, t);
|
|
3709
|
+
const mo = (t, e) => {
|
|
3710
|
+
const n = (l) => l.endRow - l.startRow + 1, r = (l) => l.endColumn - l.startColumn + 1, i = n(e) % n(t), o = r(e) % r(t), s = Math.floor(n(e) / n(t)), d = Math.floor(r(e) / r(t)), a = [], h = {
|
|
3421
3711
|
startRow: 0,
|
|
3422
|
-
endRow:
|
|
3712
|
+
endRow: n(t) - 1,
|
|
3423
3713
|
startColumn: 0,
|
|
3424
|
-
endColumn:
|
|
3714
|
+
endColumn: r(t) - 1
|
|
3425
3715
|
};
|
|
3426
|
-
if (
|
|
3716
|
+
if (n(e) === 1 && r(e) === 1) {
|
|
3427
3717
|
const l = {
|
|
3428
3718
|
startRow: e.startRow,
|
|
3429
3719
|
endRow: e.startRow,
|
|
@@ -3432,41 +3722,41 @@ const fs = (t, e) => {
|
|
|
3432
3722
|
};
|
|
3433
3723
|
return a.push({ repeatRelativeRange: h, startRange: l }), a;
|
|
3434
3724
|
}
|
|
3435
|
-
for (let l = 0; l <
|
|
3436
|
-
for (let
|
|
3437
|
-
const v =
|
|
3725
|
+
for (let l = 0; l < s + (i ? 0.1 : 0); l++)
|
|
3726
|
+
for (let u = 0; u < d + (o ? 0.1 : 0); u++) {
|
|
3727
|
+
const v = n(t) * l, p = r(t) * u, y = {
|
|
3438
3728
|
startRow: v + e.startRow,
|
|
3439
3729
|
endRow: v + e.startRow,
|
|
3440
3730
|
startColumn: p + e.startColumn,
|
|
3441
3731
|
endColumn: p + e.startColumn
|
|
3442
3732
|
};
|
|
3443
3733
|
let f = h;
|
|
3444
|
-
l ===
|
|
3734
|
+
l === s && i && (f = { ...f }, f.endRow = f.endRow - (n(t) - i)), u === d && o && (f = { ...f }, f.endColumn = f.endColumn - (r(t) - o)), a.push({ repeatRelativeRange: f, startRange: y });
|
|
3445
3735
|
}
|
|
3446
3736
|
return a;
|
|
3447
3737
|
};
|
|
3448
|
-
let
|
|
3449
|
-
constructor(e,
|
|
3738
|
+
let Rt = class extends le {
|
|
3739
|
+
constructor(e, n, r, i, o, s) {
|
|
3450
3740
|
super();
|
|
3451
|
-
|
|
3452
|
-
this._injector = e, this._univerInstanceService =
|
|
3741
|
+
Ie(this, "_painterConfig", null);
|
|
3742
|
+
this._injector = e, this._univerInstanceService = n, this._formatPainterService = r, this._sheetsSelectionsService = i, this._conditionalFormattingRuleModel = o, this._conditionalFormattingViewModel = s, this._initFormattingPainter();
|
|
3453
3743
|
}
|
|
3454
3744
|
// eslint-disable-next-line max-lines-per-function
|
|
3455
3745
|
_initFormattingPainter() {
|
|
3456
|
-
const e = () => ({ redos: [], undos: [] }),
|
|
3457
|
-
const { unitId: l, subUnitId:
|
|
3458
|
-
startRow: s.row,
|
|
3459
|
-
startColumn: s.col,
|
|
3460
|
-
endColumn: s.col,
|
|
3461
|
-
endRow: s.row
|
|
3462
|
-
}, f = {
|
|
3746
|
+
const e = () => ({ redos: [], undos: [] }), n = (o, s, d, a, h) => {
|
|
3747
|
+
const { unitId: l, subUnitId: u } = this._painterConfig, { targetUnitId: v, targetSubUnitId: p } = h, y = {
|
|
3463
3748
|
startRow: o.row,
|
|
3464
3749
|
startColumn: o.col,
|
|
3465
3750
|
endColumn: o.col,
|
|
3466
3751
|
endRow: o.row
|
|
3752
|
+
}, f = {
|
|
3753
|
+
startRow: s.row,
|
|
3754
|
+
startColumn: s.col,
|
|
3755
|
+
endColumn: s.col,
|
|
3756
|
+
endRow: s.row
|
|
3467
3757
|
};
|
|
3468
|
-
|
|
3469
|
-
const R =
|
|
3758
|
+
ye.foreach(d, (w, I) => {
|
|
3759
|
+
const R = Ce.getPositionRange(
|
|
3470
3760
|
{
|
|
3471
3761
|
startRow: w,
|
|
3472
3762
|
startColumn: I,
|
|
@@ -3474,7 +3764,7 @@ let Tt = class extends ue {
|
|
|
3474
3764
|
endRow: w
|
|
3475
3765
|
},
|
|
3476
3766
|
y
|
|
3477
|
-
), x =
|
|
3767
|
+
), x = Ce.getPositionRange(
|
|
3478
3768
|
{
|
|
3479
3769
|
startRow: w,
|
|
3480
3770
|
startColumn: I,
|
|
@@ -3484,7 +3774,7 @@ let Tt = class extends ue {
|
|
|
3484
3774
|
f
|
|
3485
3775
|
), T = this._conditionalFormattingViewModel.getCellCfs(
|
|
3486
3776
|
l,
|
|
3487
|
-
|
|
3777
|
+
u,
|
|
3488
3778
|
R.startRow,
|
|
3489
3779
|
R.startColumn
|
|
3490
3780
|
), g = this._conditionalFormattingViewModel.getCellCfs(
|
|
@@ -3499,8 +3789,8 @@ let Tt = class extends ue {
|
|
|
3499
3789
|
const C = this._conditionalFormattingRuleModel.getRule(v, p, b.cfId);
|
|
3500
3790
|
if (!C)
|
|
3501
3791
|
return;
|
|
3502
|
-
S = new
|
|
3503
|
-
|
|
3792
|
+
S = new Ne(), C.ranges.forEach((M) => {
|
|
3793
|
+
ye.foreach(M, (E, V) => {
|
|
3504
3794
|
S.setValue(E, V, 1);
|
|
3505
3795
|
});
|
|
3506
3796
|
}), a.set(b.cfId, S);
|
|
@@ -3511,18 +3801,18 @@ let Tt = class extends ue {
|
|
|
3511
3801
|
S && S.setValue(x.startRow, x.startColumn, 1);
|
|
3512
3802
|
});
|
|
3513
3803
|
});
|
|
3514
|
-
},
|
|
3804
|
+
}, r = (o, s, d) => {
|
|
3515
3805
|
var R;
|
|
3516
|
-
const { range: a, unitId: h, subUnitId: l } = this._painterConfig,
|
|
3517
|
-
if (!
|
|
3806
|
+
const { range: a, unitId: h, subUnitId: l } = this._painterConfig, u = o !== h || l !== s, v = /* @__PURE__ */ new Map(), p = [], y = [];
|
|
3807
|
+
if (!o || !s || !h || !l)
|
|
3518
3808
|
return e();
|
|
3519
3809
|
const f = (R = this._conditionalFormattingRuleModel.getSubunitRules(h, l)) != null ? R : [];
|
|
3520
3810
|
f == null || f.forEach((x) => {
|
|
3521
3811
|
const { ranges: T, cfId: g } = x;
|
|
3522
|
-
if (T.some((b) =>
|
|
3523
|
-
const b = new
|
|
3524
|
-
|
|
3525
|
-
|
|
3812
|
+
if (T.some((b) => Ce.intersects(a, b))) {
|
|
3813
|
+
const b = new Ne();
|
|
3814
|
+
u || T.forEach((S) => {
|
|
3815
|
+
ye.foreach(S, (C, M) => {
|
|
3526
3816
|
b.setValue(C, M, 1);
|
|
3527
3817
|
});
|
|
3528
3818
|
}), v.set(g, b);
|
|
@@ -3532,61 +3822,61 @@ let Tt = class extends ue {
|
|
|
3532
3822
|
row: a.startRow,
|
|
3533
3823
|
col: a.startColumn
|
|
3534
3824
|
};
|
|
3535
|
-
return
|
|
3536
|
-
|
|
3825
|
+
return mo(a, d).forEach((x) => {
|
|
3826
|
+
n(w, { row: x.startRange.startRow, col: x.startRange.startColumn }, x.repeatRelativeRange, v, { targetUnitId: o, targetSubUnitId: s });
|
|
3537
3827
|
}), v.forEach((x, T) => {
|
|
3538
|
-
if (
|
|
3539
|
-
const g = this._conditionalFormattingRuleModel.getRule(
|
|
3828
|
+
if (u) {
|
|
3829
|
+
const g = this._conditionalFormattingRuleModel.getRule(o, s, T), b = mt(ft(x));
|
|
3540
3830
|
if (g)
|
|
3541
3831
|
if (b.length) {
|
|
3542
3832
|
const S = {
|
|
3543
|
-
unitId:
|
|
3544
|
-
subUnitId:
|
|
3833
|
+
unitId: o,
|
|
3834
|
+
subUnitId: s,
|
|
3545
3835
|
rule: { ...g, ranges: b }
|
|
3546
3836
|
};
|
|
3547
|
-
p.push({ id:
|
|
3837
|
+
p.push({ id: Se.id, params: S }), y.push(...De(this._injector, S));
|
|
3548
3838
|
} else {
|
|
3549
3839
|
const S = {
|
|
3550
|
-
unitId:
|
|
3551
|
-
subUnitId:
|
|
3840
|
+
unitId: o,
|
|
3841
|
+
subUnitId: s,
|
|
3552
3842
|
cfId: g.cfId
|
|
3553
3843
|
};
|
|
3554
|
-
p.push({ id:
|
|
3844
|
+
p.push({ id: _e.id, params: S }), y.push(...Ae(this._injector, S));
|
|
3555
3845
|
}
|
|
3556
3846
|
else if (b.length) {
|
|
3557
3847
|
const S = this._conditionalFormattingRuleModel.getRule(h, l, T);
|
|
3558
3848
|
if (S) {
|
|
3559
3849
|
const C = {
|
|
3560
|
-
unitId:
|
|
3561
|
-
subUnitId:
|
|
3850
|
+
unitId: o,
|
|
3851
|
+
subUnitId: s,
|
|
3562
3852
|
rule: {
|
|
3563
|
-
...
|
|
3564
|
-
cfId: this._conditionalFormattingRuleModel.createCfId(
|
|
3853
|
+
...jt.deepClone(S),
|
|
3854
|
+
cfId: this._conditionalFormattingRuleModel.createCfId(o, s),
|
|
3565
3855
|
ranges: b
|
|
3566
3856
|
}
|
|
3567
3857
|
};
|
|
3568
|
-
p.push({ id:
|
|
3858
|
+
p.push({ id: oe.id, params: C }), y.push(En(this._injector, C));
|
|
3569
3859
|
}
|
|
3570
3860
|
}
|
|
3571
3861
|
} else {
|
|
3572
3862
|
const g = this._conditionalFormattingRuleModel.getRule(h, l, T);
|
|
3573
3863
|
if (!g)
|
|
3574
3864
|
return;
|
|
3575
|
-
const b = ft(
|
|
3865
|
+
const b = mt(ft(x));
|
|
3576
3866
|
if (b.length) {
|
|
3577
3867
|
const S = {
|
|
3578
3868
|
unitId: h,
|
|
3579
3869
|
subUnitId: l,
|
|
3580
3870
|
rule: { ...g, ranges: b }
|
|
3581
3871
|
};
|
|
3582
|
-
p.push({ id:
|
|
3872
|
+
p.push({ id: Se.id, params: S }), y.push(...De(this._injector, S));
|
|
3583
3873
|
} else {
|
|
3584
3874
|
const S = {
|
|
3585
3875
|
unitId: h,
|
|
3586
3876
|
subUnitId: l,
|
|
3587
3877
|
cfId: g.cfId
|
|
3588
3878
|
};
|
|
3589
|
-
p.push({ id:
|
|
3879
|
+
p.push({ id: _e.id, params: S }), y.push(...Ae(this._injector, S));
|
|
3590
3880
|
}
|
|
3591
3881
|
}
|
|
3592
3882
|
}), {
|
|
@@ -3594,23 +3884,23 @@ let Tt = class extends ue {
|
|
|
3594
3884
|
redos: p
|
|
3595
3885
|
};
|
|
3596
3886
|
}, i = {
|
|
3597
|
-
id:
|
|
3598
|
-
onStatusChange: (
|
|
3599
|
-
var
|
|
3600
|
-
switch (
|
|
3601
|
-
case
|
|
3602
|
-
case
|
|
3603
|
-
const h = (
|
|
3887
|
+
id: it,
|
|
3888
|
+
onStatusChange: (o) => {
|
|
3889
|
+
var s, d, a;
|
|
3890
|
+
switch (o) {
|
|
3891
|
+
case Lt.INFINITE:
|
|
3892
|
+
case Lt.ONCE: {
|
|
3893
|
+
const h = (s = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET)) == null ? void 0 : s.getUnitId(), l = (a = (d = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET)) == null ? void 0 : d.getActiveSheet()) == null ? void 0 : a.getSheetId(), u = this._sheetsSelectionsService.getCurrentLastSelection(), v = u == null ? void 0 : u.range;
|
|
3604
3894
|
h && l && v && (this._painterConfig = { unitId: h, subUnitId: l, range: v });
|
|
3605
3895
|
break;
|
|
3606
3896
|
}
|
|
3607
|
-
case
|
|
3897
|
+
case Lt.OFF: {
|
|
3608
3898
|
this._painterConfig = null;
|
|
3609
3899
|
break;
|
|
3610
3900
|
}
|
|
3611
3901
|
}
|
|
3612
3902
|
},
|
|
3613
|
-
onApply: (
|
|
3903
|
+
onApply: (o, s, d) => this._painterConfig ? r(o, s, d) : {
|
|
3614
3904
|
redos: [],
|
|
3615
3905
|
undos: []
|
|
3616
3906
|
}
|
|
@@ -3618,135 +3908,135 @@ let Tt = class extends ue {
|
|
|
3618
3908
|
this._formatPainterService.addHook(i);
|
|
3619
3909
|
}
|
|
3620
3910
|
};
|
|
3621
|
-
|
|
3622
|
-
$e(0, P(
|
|
3911
|
+
Rt = go([
|
|
3912
|
+
$e(0, P(me)),
|
|
3623
3913
|
$e(1, P(Z)),
|
|
3624
|
-
$e(2, P(
|
|
3625
|
-
$e(3, P(
|
|
3914
|
+
$e(2, P(ai)),
|
|
3915
|
+
$e(3, P(je)),
|
|
3626
3916
|
$e(4, P(Q)),
|
|
3627
|
-
$e(5, P(
|
|
3628
|
-
],
|
|
3629
|
-
var
|
|
3630
|
-
for (var i =
|
|
3631
|
-
(
|
|
3917
|
+
$e(5, P(rt))
|
|
3918
|
+
], Rt);
|
|
3919
|
+
var fo = Object.getOwnPropertyDescriptor, po = (t, e, n, r) => {
|
|
3920
|
+
for (var i = r > 1 ? void 0 : r ? fo(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3921
|
+
(s = t[o]) && (i = s(i) || i);
|
|
3632
3922
|
return i;
|
|
3633
|
-
}, $t = (t, e) => (
|
|
3634
|
-
let
|
|
3635
|
-
constructor(t, e,
|
|
3636
|
-
super(), this._conditionalFormattingViewModel = t, this._univerInstanceService = e, this._renderManagerService =
|
|
3923
|
+
}, $t = (t, e) => (n, r) => e(n, r, t);
|
|
3924
|
+
let Tt = class extends le {
|
|
3925
|
+
constructor(t, e, n) {
|
|
3926
|
+
super(), this._conditionalFormattingViewModel = t, this._univerInstanceService = e, this._renderManagerService = n, this._init();
|
|
3637
3927
|
}
|
|
3638
3928
|
_init() {
|
|
3639
|
-
const t = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET), e = (
|
|
3640
|
-
const
|
|
3929
|
+
const t = this._univerInstanceService.getCurrentUnitForType(A.UNIVER_SHEET), e = (n) => {
|
|
3930
|
+
const r = n.getUnitId(), i = this._renderManagerService.getRenderById(r);
|
|
3641
3931
|
if (!i)
|
|
3642
3932
|
return;
|
|
3643
|
-
const
|
|
3644
|
-
this.disposeWithMe(
|
|
3645
|
-
if (
|
|
3646
|
-
const
|
|
3647
|
-
this._conditionalFormattingViewModel.setCacheLength(
|
|
3933
|
+
const o = i.with(Ln);
|
|
3934
|
+
this.disposeWithMe(o.currentSkeleton$.subscribe((s) => {
|
|
3935
|
+
if (s) {
|
|
3936
|
+
const d = s.skeleton.rowColumnSegment, a = d.endColumn - d.startColumn + 1, l = (d.endRow - d.startRow + 1) * a * 9, u = Math.max(Ar, l);
|
|
3937
|
+
this._conditionalFormattingViewModel.setCacheLength(u);
|
|
3648
3938
|
}
|
|
3649
3939
|
}));
|
|
3650
3940
|
};
|
|
3651
|
-
t && e(t), this._univerInstanceService.getCurrentTypeOfUnit$(A.UNIVER_SHEET).subscribe((
|
|
3652
|
-
|
|
3941
|
+
t && e(t), this._univerInstanceService.getCurrentTypeOfUnit$(A.UNIVER_SHEET).subscribe((n) => {
|
|
3942
|
+
n && e(n);
|
|
3653
3943
|
});
|
|
3654
3944
|
}
|
|
3655
3945
|
};
|
|
3656
|
-
|
|
3657
|
-
$t(0, P(
|
|
3946
|
+
Tt = po([
|
|
3947
|
+
$t(0, P(rt)),
|
|
3658
3948
|
$t(1, Z),
|
|
3659
|
-
$t(2,
|
|
3660
|
-
],
|
|
3661
|
-
var
|
|
3662
|
-
for (var i =
|
|
3663
|
-
(
|
|
3949
|
+
$t(2, Pn)
|
|
3950
|
+
], Tt);
|
|
3951
|
+
var Co = Object.defineProperty, yo = Object.getOwnPropertyDescriptor, bo = (t, e, n) => e in t ? Co(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Io = (t, e, n, r) => {
|
|
3952
|
+
for (var i = r > 1 ? void 0 : r ? yo(e, n) : e, o = t.length - 1, s; o >= 0; o--)
|
|
3953
|
+
(s = t[o]) && (i = s(i) || i);
|
|
3664
3954
|
return i;
|
|
3665
|
-
},
|
|
3666
|
-
let
|
|
3667
|
-
constructor(t =
|
|
3668
|
-
super(), this._config = t, this._injector = e, this._commandService =
|
|
3669
|
-
const { menu: i, ...
|
|
3955
|
+
}, Dt = (t, e) => (n, r) => e(n, r, t), ir = (t, e, n) => bo(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3956
|
+
let xt = class extends yn {
|
|
3957
|
+
constructor(t = bt, e, n, r) {
|
|
3958
|
+
super(), this._config = t, this._injector = e, this._commandService = n, this._configService = r;
|
|
3959
|
+
const { menu: i, ...o } = bn(
|
|
3670
3960
|
{},
|
|
3671
|
-
|
|
3961
|
+
bt,
|
|
3672
3962
|
this._config
|
|
3673
3963
|
);
|
|
3674
|
-
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(
|
|
3964
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(nr, o), this._initCommand();
|
|
3675
3965
|
}
|
|
3676
3966
|
onStarting() {
|
|
3677
|
-
|
|
3678
|
-
[rt],
|
|
3967
|
+
gr(this._injector, [
|
|
3679
3968
|
[nt],
|
|
3680
|
-
[et],
|
|
3681
|
-
[_t],
|
|
3682
3969
|
[tt],
|
|
3683
3970
|
[Qe],
|
|
3684
|
-
[
|
|
3685
|
-
[
|
|
3971
|
+
[St],
|
|
3972
|
+
[et],
|
|
3973
|
+
[Je],
|
|
3686
3974
|
[wt],
|
|
3687
|
-
[
|
|
3688
|
-
[
|
|
3689
|
-
[
|
|
3690
|
-
|
|
3691
|
-
[
|
|
3975
|
+
[He],
|
|
3976
|
+
[_t],
|
|
3977
|
+
[yt],
|
|
3978
|
+
[Rt],
|
|
3979
|
+
[Tt]
|
|
3980
|
+
]), Vt(this._injector, [
|
|
3981
|
+
[nt]
|
|
3692
3982
|
]);
|
|
3693
3983
|
}
|
|
3694
3984
|
onReady() {
|
|
3695
|
-
|
|
3696
|
-
[
|
|
3697
|
-
[
|
|
3985
|
+
Vt(this._injector, [
|
|
3986
|
+
[wt],
|
|
3987
|
+
[Je]
|
|
3698
3988
|
]);
|
|
3699
3989
|
}
|
|
3700
3990
|
onRendered() {
|
|
3701
|
-
|
|
3991
|
+
Vt(this._injector, [
|
|
3992
|
+
[St],
|
|
3993
|
+
[yt],
|
|
3994
|
+
[Qe],
|
|
3702
3995
|
[_t],
|
|
3703
|
-
[
|
|
3996
|
+
[He],
|
|
3997
|
+
[Rt],
|
|
3704
3998
|
[et],
|
|
3705
|
-
[wt],
|
|
3706
|
-
[je],
|
|
3707
|
-
[Tt],
|
|
3708
3999
|
[tt],
|
|
3709
|
-
[
|
|
3710
|
-
[xt]
|
|
4000
|
+
[Tt]
|
|
3711
4001
|
]);
|
|
3712
4002
|
}
|
|
3713
4003
|
_initCommand() {
|
|
3714
4004
|
[
|
|
3715
|
-
|
|
4005
|
+
On,
|
|
3716
4006
|
$n,
|
|
4007
|
+
Dn,
|
|
3717
4008
|
An,
|
|
3718
4009
|
Hn,
|
|
3719
4010
|
jn,
|
|
3720
4011
|
Bn,
|
|
3721
4012
|
Wn,
|
|
3722
4013
|
qn,
|
|
3723
|
-
|
|
3724
|
-
Vt
|
|
4014
|
+
Mt
|
|
3725
4015
|
].forEach((t) => {
|
|
3726
4016
|
this._commandService.registerCommand(t);
|
|
3727
4017
|
});
|
|
3728
4018
|
}
|
|
3729
4019
|
};
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
],
|
|
4020
|
+
ir(xt, "pluginName", `${it}_UI_PLUGIN`);
|
|
4021
|
+
ir(xt, "type", A.UNIVER_SHEET);
|
|
4022
|
+
xt = Io([
|
|
4023
|
+
pn(Mn),
|
|
4024
|
+
Dt(1, P(me)),
|
|
4025
|
+
Dt(2, P(te)),
|
|
4026
|
+
Dt(3, Cn)
|
|
4027
|
+
], xt);
|
|
3738
4028
|
export {
|
|
3739
|
-
|
|
4029
|
+
On as AddAverageCfCommand,
|
|
3740
4030
|
$n as AddColorScaleConditionalRuleCommand,
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
4031
|
+
Dn as AddDataBarConditionalRuleCommand,
|
|
4032
|
+
An as AddDuplicateValuesCfCommand,
|
|
4033
|
+
Hn as AddNumberCfCommand,
|
|
4034
|
+
jn as AddRankCfCommand,
|
|
4035
|
+
Bn as AddTextCfCommand,
|
|
4036
|
+
Wn as AddTimePeriodCfCommand,
|
|
4037
|
+
qn as AddUniqueValuesCfCommand,
|
|
4038
|
+
yt as ConditionalFormattingClearController,
|
|
4039
|
+
Mt as OpenConditionalFormattingOperator,
|
|
4040
|
+
It as UniverSheetsConditionalFormattingMobileUIPlugin,
|
|
4041
|
+
xt as UniverSheetsConditionalFormattingUIPlugin
|
|
3752
4042
|
};
|