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