@univerjs/sheets-conditional-formatting-ui 0.7.0-nightly.202505071607 → 0.7.0-nightly.202505091607
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 +25 -30
- package/lib/es/index.js +690 -695
- package/lib/index.css +1 -1
- package/lib/index.js +690 -695
- package/lib/types/components/panel/rule-edit/styles.d.ts +1 -1
- package/lib/umd/index.js +28 -33
- package/package.json +11 -11
package/lib/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ye = (t, e, r) =>
|
|
4
|
-
import { CommandType as he, ICommandService as
|
|
5
|
-
import { ConditionalFormattingRuleModel as
|
|
6
|
-
import { getSheetCommandTarget as Ce, SheetsSelectionsService as $e, RemoveSheetMutation as
|
|
7
|
-
import { useDependency as W, ComponentManager as
|
|
8
|
-
import { jsx as c, jsxs as
|
|
9
|
-
import { forwardRef as Ve, useRef as de, createElement as je, useMemo as
|
|
10
|
-
import { Dropdown as
|
|
11
|
-
import { serializeRange as
|
|
12
|
-
import { FormulaEditor as
|
|
13
|
-
import { useHighlightRange as
|
|
14
|
-
import { Observable as xe, debounceTime as
|
|
15
|
-
import { IRenderManagerService as
|
|
16
|
-
import { bufferTime as
|
|
17
|
-
const
|
|
1
|
+
var rr = Object.defineProperty;
|
|
2
|
+
var ir = (t, e, r) => e in t ? rr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var ye = (t, e, r) => ir(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { CommandType as he, ICommandService as te, IUniverInstanceService as z, ColorKit as fn, BooleanNumber as ae, LocaleService as re, UniverInstanceType as $, Tools as Wt, get as sr, set as or, createInterceptorKey as pn, InterceptorManager as ar, Inject as O, Disposable as ce, Injector as ve, Rectangle as fe, generateRandomId as lr, ObjectMatrix as Ee, Range as pe, toDisposable as Cn, InterceptorEffectEnum as cr, DependentOn as yn, IConfigService as bn, Plugin as Sn, merge as In, registerDependencies as ur, touchDependencies as kt } from "@univerjs/core";
|
|
5
|
+
import { ConditionalFormattingRuleModel as Q, CFSubRuleType as k, CFRuleType as U, AddConditionalRuleMutation as se, CFNumberOperator as P, getColorScaleFromValue as dr, iconMap as we, DEFAULT_BG_COLOR as hr, DEFAULT_FONT_COLOR as vr, defaultDataBarPositiveColor as Ke, defaultDataBarNativeColor as Xe, CFValueType as A, createDefaultValueByValueType as Je, removeUndefinedAttr as mr, createDefaultValue as gt, CFTextOperator as j, CFTimePeriodOperator as ue, iconGroup as gr, getOppositeOperator as Ht, compareWithNumber as fr, EMPTY_ICON_TYPE as pr, SetCfCommand as Cr, AddCfCommand as _n, SetConditionalRuleMutation as be, DeleteConditionalRuleMutation as Se, MoveConditionalRuleMutation as Tn, ClearWorksheetCfCommand as Rn, DeleteCfCommand as Kt, MoveCfCommand as yr, ClearRangeCfCommand as br, createDefaultRule as Te, ConditionalFormattingViewModel as it, SHEET_CONDITIONAL_FORMATTING_PLUGIN as st, DeleteConditionalRuleMutationUndoFactory as Le, AddConditionalRuleMutationUndoFactory as xn, setConditionalRuleMutationUndoFactory as Ae, isRangesEqual as Sr, ConditionalFormattingService as En, DEFAULT_PADDING as Ir, DEFAULT_WIDTH as _r, UniverSheetsConditionalFormattingPlugin as wn, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as Tr } from "@univerjs/sheets-conditional-formatting";
|
|
6
|
+
import { getSheetCommandTarget as Ce, SheetsSelectionsService as $e, RemoveSheetMutation as Rr, SetWorksheetActiveOperation as qt, setEndForRange as xr, SetSelectionsOperation as Er, checkRangesEditablePermission as ft, rangeToDiscreteRange as wr, findAllRectangle as pt, createTopMatrixFromMatrix as Ct, SheetPermissionCheckController as Nr, WorksheetEditPermission as Nn, WorksheetSetCellStylePermission as Mn, RangeProtectionPermissionEditPoint as Vn, WorkbookEditablePermission as Fn, RefRangeService as Mr, handleDefaultRangeChangeWithEffectRefCommands as Vr, SheetInterceptorService as Gt, INTERCEPTOR_POINT as Fr, ClearSelectionFormatCommand as kr, ClearSelectionAllCommand as Ur, RangeMergeUtil as Pr, AFTER_CELL_EDIT as Or } from "@univerjs/sheets";
|
|
7
|
+
import { useDependency as W, ComponentManager as zt, useSidebarClick as Nt, ILayoutService as Lr, useScrollYOverContainer as Ar, ISidebarService as kn, useObservable as Dr, getMenuHiddenObservable as $r, MenuItemType as jr, RibbonStartGroup as Hr, IMenuManagerService as Br } from "@univerjs/ui";
|
|
8
|
+
import { jsx as c, jsxs as F, Fragment as Bt } from "react/jsx-runtime";
|
|
9
|
+
import { forwardRef as Ve, useRef as de, createElement as je, useMemo as J, useState as N, useEffect as K } from "react";
|
|
10
|
+
import { Dropdown as Zt, clsx as X, ColorPicker as Wr, borderClassName as He, Select as le, InputNumber as Ne, RadioGroup as qr, Radio as Xt, Checkbox as yt, Input as Gr, Button as Jt, Tooltip as Qt, ReactGridLayout as zr } from "@univerjs/design";
|
|
11
|
+
import { serializeRange as Un, deserializeRangeWithSheet as Zr } from "@univerjs/engine-formula";
|
|
12
|
+
import { FormulaEditor as Mt, RangeSelector as Yr } from "@univerjs/sheets-formula-ui";
|
|
13
|
+
import { useHighlightRange as Kr, ISheetClipboardService as Xr, COPY_TYPE as en, PREDEFINED_HOOK_NAME as Ut, virtualizeDiscreteRanges as Pn, getRepeatRange as Jr, SheetSkeletonManagerService as On, IAutoFillService as Qr, APPLY_TYPE as Pt, getAutoFillRepeatRange as ei, getCurrentRangeDisable$ as ti, IFormatPainterService as ni, FormatPainterStatus as Ot } from "@univerjs/sheets-ui";
|
|
14
|
+
import { Observable as xe, debounceTime as tn, merge as Ln } from "rxjs";
|
|
15
|
+
import { IRenderManagerService as An } from "@univerjs/engine-render";
|
|
16
|
+
import { bufferTime as ri, filter as nn, debounceTime as rn } from "rxjs/operators";
|
|
17
|
+
const Dn = {
|
|
18
18
|
type: he.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(
|
|
23
|
+
const { ranges: r, style: n, stopIfTrue: i, operator: s } = e, o = t.get(Q), d = t.get(te), a = t.get(z), u = Ce(a);
|
|
24
24
|
if (!u) return !1;
|
|
25
25
|
const { unitId: l, subUnitId: h } = u, v = o.createCfId(l, h), f = {
|
|
26
26
|
ranges: r,
|
|
@@ -28,20 +28,20 @@ const An = {
|
|
|
28
28
|
stopIfTrue: !!i,
|
|
29
29
|
rule: {
|
|
30
30
|
type: U.highlightCell,
|
|
31
|
-
subType:
|
|
31
|
+
subType: k.average,
|
|
32
32
|
operator: s,
|
|
33
33
|
style: n
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
return d.executeCommand(se.id, { unitId: l, subUnitId: h, rule: f });
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, $n = {
|
|
39
39
|
type: he.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(
|
|
44
|
+
const { ranges: r, config: n, stopIfTrue: i } = e, s = t.get(Q), o = t.get(te), d = t.get(z), a = Ce(d);
|
|
45
45
|
if (!a) return !1;
|
|
46
46
|
const { unitId: u, subUnitId: l } = a, h = s.createCfId(u, l), v = {
|
|
47
47
|
ranges: r,
|
|
@@ -54,15 +54,15 @@ const An = {
|
|
|
54
54
|
};
|
|
55
55
|
return o.executeCommand(se.id, { unitId: u, subUnitId: l, rule: v });
|
|
56
56
|
}
|
|
57
|
-
},
|
|
57
|
+
}, jn = {
|
|
58
58
|
type: he.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: u } = e, l = t.get(
|
|
63
|
+
const { ranges: r, min: n, max: i, nativeColor: s, positiveColor: o, isGradient: d, stopIfTrue: a, isShowValue: u } = e, l = t.get(Q), h = t.get(z), v = Ce(h);
|
|
64
64
|
if (!v) return !1;
|
|
65
|
-
const { unitId: f, subUnitId: S } = v, p = t.get(
|
|
65
|
+
const { unitId: f, subUnitId: S } = v, p = t.get(te), T = l.createCfId(f, S), _ = {
|
|
66
66
|
ranges: r,
|
|
67
67
|
cfId: T,
|
|
68
68
|
stopIfTrue: !!a,
|
|
@@ -80,13 +80,13 @@ const An = {
|
|
|
80
80
|
};
|
|
81
81
|
return p.executeCommand(se.id, { unitId: f, subUnitId: S, rule: _ });
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, Hn = {
|
|
84
84
|
type: he.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(
|
|
89
|
+
const { ranges: r, style: n, stopIfTrue: i } = e, s = t.get(Q), o = t.get(te), d = t.get(z), a = Ce(d);
|
|
90
90
|
if (!a) return !1;
|
|
91
91
|
const { unitId: u, subUnitId: l } = a, h = s.createCfId(u, l), v = {
|
|
92
92
|
ranges: r,
|
|
@@ -94,19 +94,19 @@ const An = {
|
|
|
94
94
|
stopIfTrue: !!i,
|
|
95
95
|
rule: {
|
|
96
96
|
type: U.highlightCell,
|
|
97
|
-
subType:
|
|
97
|
+
subType: k.duplicateValues,
|
|
98
98
|
style: n
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
return o.executeCommand(se.id, { unitId: u, subUnitId: l, rule: v });
|
|
102
102
|
}
|
|
103
|
-
},
|
|
103
|
+
}, Bn = {
|
|
104
104
|
type: he.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(
|
|
109
|
+
const { ranges: r, style: n, stopIfTrue: i, operator: s, value: o } = e, d = t.get(Q), a = t.get(te), u = t.get(z), l = Ce(u);
|
|
110
110
|
if (!l) return !1;
|
|
111
111
|
const { unitId: h, subUnitId: v } = l, f = d.createCfId(h, v);
|
|
112
112
|
let S;
|
|
@@ -120,7 +120,7 @@ const An = {
|
|
|
120
120
|
stopIfTrue: !!i,
|
|
121
121
|
rule: {
|
|
122
122
|
type: U.highlightCell,
|
|
123
|
-
subType:
|
|
123
|
+
subType: k.number,
|
|
124
124
|
operator: s,
|
|
125
125
|
style: n,
|
|
126
126
|
value: p
|
|
@@ -136,7 +136,7 @@ const An = {
|
|
|
136
136
|
stopIfTrue: !!i,
|
|
137
137
|
rule: {
|
|
138
138
|
type: U.highlightCell,
|
|
139
|
-
subType:
|
|
139
|
+
subType: k.number,
|
|
140
140
|
operator: s,
|
|
141
141
|
style: n,
|
|
142
142
|
value: p
|
|
@@ -145,13 +145,13 @@ const An = {
|
|
|
145
145
|
}
|
|
146
146
|
return a.executeCommand(se.id, { unitId: h, subUnitId: v, rule: S });
|
|
147
147
|
}
|
|
148
|
-
},
|
|
148
|
+
}, Wn = {
|
|
149
149
|
type: he.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(
|
|
154
|
+
const { ranges: r, style: n, stopIfTrue: i, isPercent: s, isBottom: o, value: d } = e, a = t.get(Q), u = t.get(z), l = t.get(te), h = Ce(u);
|
|
155
155
|
if (!h) return !1;
|
|
156
156
|
const { unitId: v, subUnitId: f } = h, S = a.createCfId(v, f), p = {
|
|
157
157
|
ranges: r,
|
|
@@ -159,7 +159,7 @@ const An = {
|
|
|
159
159
|
stopIfTrue: !!i,
|
|
160
160
|
rule: {
|
|
161
161
|
type: U.highlightCell,
|
|
162
|
-
subType:
|
|
162
|
+
subType: k.rank,
|
|
163
163
|
isPercent: s,
|
|
164
164
|
isBottom: o,
|
|
165
165
|
style: n,
|
|
@@ -168,21 +168,21 @@ const An = {
|
|
|
168
168
|
};
|
|
169
169
|
return l.executeCommand(se.id, { unitId: v, subUnitId: f, rule: p });
|
|
170
170
|
}
|
|
171
|
-
},
|
|
171
|
+
}, qn = {
|
|
172
172
|
type: he.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(
|
|
177
|
+
const { ranges: r, style: n, stopIfTrue: i, operator: s, value: o } = e, d = t.get(Q), a = t.get(z), u = Ce(a);
|
|
178
178
|
if (!u) return !1;
|
|
179
|
-
const { unitId: l, subUnitId: h } = u, v = t.get(
|
|
179
|
+
const { unitId: l, subUnitId: h } = u, v = t.get(te), f = d.createCfId(l, h), S = {
|
|
180
180
|
ranges: r,
|
|
181
181
|
cfId: f,
|
|
182
182
|
stopIfTrue: !!i,
|
|
183
183
|
rule: {
|
|
184
184
|
type: U.highlightCell,
|
|
185
|
-
subType:
|
|
185
|
+
subType: k.text,
|
|
186
186
|
operator: s,
|
|
187
187
|
style: n,
|
|
188
188
|
value: o
|
|
@@ -190,13 +190,13 @@ const An = {
|
|
|
190
190
|
};
|
|
191
191
|
return v.executeCommand(se.id, { unitId: l, subUnitId: h, rule: S });
|
|
192
192
|
}
|
|
193
|
-
},
|
|
193
|
+
}, Gn = {
|
|
194
194
|
type: he.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(
|
|
199
|
+
const { ranges: r, style: n, stopIfTrue: i, operator: s } = e, o = t.get(Q), d = t.get(z), a = t.get(te), u = Ce(d);
|
|
200
200
|
if (!u) return !1;
|
|
201
201
|
const { unitId: l, subUnitId: h } = u, v = o.createCfId(l, h), f = {
|
|
202
202
|
ranges: r,
|
|
@@ -204,20 +204,20 @@ const An = {
|
|
|
204
204
|
stopIfTrue: !!i,
|
|
205
205
|
rule: {
|
|
206
206
|
type: U.highlightCell,
|
|
207
|
-
subType:
|
|
207
|
+
subType: k.timePeriod,
|
|
208
208
|
operator: s,
|
|
209
209
|
style: n
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
return a.executeCommand(se.id, { unitId: l, subUnitId: h, rule: f });
|
|
213
213
|
}
|
|
214
|
-
},
|
|
214
|
+
}, zn = {
|
|
215
215
|
type: he.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(
|
|
220
|
+
const { ranges: r, style: n, stopIfTrue: i } = e, s = t.get(Q), o = t.get(z), d = t.get(te), a = Ce(o);
|
|
221
221
|
if (!a) return !1;
|
|
222
222
|
const { unitId: u, subUnitId: l } = a, h = s.createCfId(u, l), v = {
|
|
223
223
|
ranges: r,
|
|
@@ -225,7 +225,7 @@ const An = {
|
|
|
225
225
|
stopIfTrue: !!i,
|
|
226
226
|
rule: {
|
|
227
227
|
type: U.highlightCell,
|
|
228
|
-
subType:
|
|
228
|
+
subType: k.uniqueValues,
|
|
229
229
|
style: n
|
|
230
230
|
}
|
|
231
231
|
};
|
|
@@ -240,23 +240,23 @@ var oe = function() {
|
|
|
240
240
|
}
|
|
241
241
|
return t;
|
|
242
242
|
}, oe.apply(this, arguments);
|
|
243
|
-
},
|
|
243
|
+
}, ii = 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
|
|
250
|
+
}, Be = Ve(function(t, e) {
|
|
251
|
+
var r = t.icon, n = t.id, i = t.className, s = t.extend, o = ii(t, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), a = de("_".concat(ai()));
|
|
252
|
+
return Zn(r, "".concat(n), { defIds: r.defIds, idSuffix: a.current }, oe({ ref: e, className: d }, o), s);
|
|
253
253
|
});
|
|
254
|
-
function
|
|
255
|
-
return je(t.tag, oe(oe({ key: e },
|
|
256
|
-
return
|
|
254
|
+
function Zn(t, e, r, n, i) {
|
|
255
|
+
return je(t.tag, oe(oe({ key: e }, si(t, r, i)), n), (oi(t, r).children || []).map(function(s, o) {
|
|
256
|
+
return Zn(s, "".concat(e, "-").concat(t.tag, "-").concat(o), r, void 0, i);
|
|
257
257
|
}));
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function si(t, e, r) {
|
|
260
260
|
var n = oe({}, 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];
|
|
@@ -268,75 +268,75 @@ function ii(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 oi(t, e) {
|
|
272
272
|
var r, n = e.defIds;
|
|
273
273
|
return !n || n.length === 0 ? t : t.tag === "defs" && (!((r = t.children) === null || r === void 0) && r.length) ? oe(oe({}, t), { children: t.children.map(function(i) {
|
|
274
274
|
return typeof i.attrs.id == "string" && n && n.indexOf(i.attrs.id) > -1 ? oe(oe({}, i), { attrs: oe(oe({}, i.attrs), { id: i.attrs.id + e.idSuffix }) }) : i;
|
|
275
275
|
}) }) : t;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function ai() {
|
|
278
278
|
return Math.random().toString(36).substring(2, 8);
|
|
279
279
|
}
|
|
280
|
-
|
|
281
|
-
var
|
|
282
|
-
return je(
|
|
280
|
+
Be.displayName = "UniverIcon";
|
|
281
|
+
var li = { 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" } }] }, mt = Ve(function(t, e) {
|
|
282
|
+
return je(Be, Object.assign({}, t, {
|
|
283
283
|
id: "delete-single",
|
|
284
284
|
ref: e,
|
|
285
|
-
icon:
|
|
285
|
+
icon: li
|
|
286
286
|
}));
|
|
287
287
|
});
|
|
288
|
-
|
|
289
|
-
var
|
|
290
|
-
return je(
|
|
288
|
+
mt.displayName = "DeleteSingle";
|
|
289
|
+
var ci = { 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" } }] }, Yn = Ve(function(t, e) {
|
|
290
|
+
return je(Be, Object.assign({}, t, {
|
|
291
291
|
id: "increase-single",
|
|
292
292
|
ref: e,
|
|
293
|
-
icon:
|
|
293
|
+
icon: ci
|
|
294
294
|
}));
|
|
295
295
|
});
|
|
296
|
-
|
|
297
|
-
var
|
|
298
|
-
return je(
|
|
296
|
+
Yn.displayName = "IncreaseSingle";
|
|
297
|
+
var ui = { 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" } }] }, Vt = Ve(function(t, e) {
|
|
298
|
+
return je(Be, Object.assign({}, t, {
|
|
299
299
|
id: "more-down-single",
|
|
300
300
|
ref: e,
|
|
301
|
-
icon:
|
|
301
|
+
icon: ui
|
|
302
302
|
}));
|
|
303
303
|
});
|
|
304
|
-
|
|
305
|
-
var
|
|
306
|
-
return je(
|
|
304
|
+
Vt.displayName = "MoreDownSingle";
|
|
305
|
+
var di = { 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" } }] }] }, Kn = Ve(function(t, e) {
|
|
306
|
+
return je(Be, Object.assign({}, t, {
|
|
307
307
|
id: "sequence-single",
|
|
308
308
|
ref: e,
|
|
309
|
-
icon:
|
|
309
|
+
icon: di
|
|
310
310
|
}));
|
|
311
311
|
});
|
|
312
|
-
|
|
313
|
-
var
|
|
314
|
-
return je(
|
|
312
|
+
Kn.displayName = "SequenceSingle";
|
|
313
|
+
var hi = { 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 = Ve(function(t, e) {
|
|
314
|
+
return je(Be, Object.assign({}, t, {
|
|
315
315
|
id: "slash-single",
|
|
316
316
|
ref: e,
|
|
317
|
-
icon:
|
|
317
|
+
icon: hi
|
|
318
318
|
}));
|
|
319
319
|
});
|
|
320
|
-
|
|
320
|
+
ot.displayName = "SlashSingle";
|
|
321
321
|
const Me = (t) => {
|
|
322
|
-
const { color: e, onChange: r, disable: n = !1, iconId: i = "PaintBucket", className: s, isNeedDropdownIcon: o = !0 } = t, d = W(
|
|
323
|
-
return u ? n ? /* @__PURE__ */ c(u, { className:
|
|
324
|
-
|
|
322
|
+
const { color: e, onChange: r, disable: n = !1, iconId: i = "PaintBucket", className: s, isNeedDropdownIcon: o = !0 } = t, d = W(zt), a = J(() => new fn(e), [e]), u = d.get(i);
|
|
323
|
+
return u ? n ? /* @__PURE__ */ c(u, { className: X("univer-fill-primary-600", s), extend: { colorChannel1: a.isValid ? e : "" } }) : /* @__PURE__ */ c(
|
|
324
|
+
Zt,
|
|
325
325
|
{
|
|
326
|
-
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(
|
|
327
|
-
children: /* @__PURE__ */
|
|
326
|
+
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(Wr, { value: e, onChange: r }) }),
|
|
327
|
+
children: /* @__PURE__ */ F(
|
|
328
328
|
"span",
|
|
329
329
|
{
|
|
330
|
-
className:
|
|
330
|
+
className: X(`
|
|
331
331
|
univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-p-1
|
|
332
332
|
hover:univer-bg-gray-100
|
|
333
333
|
`, s),
|
|
334
334
|
children: [
|
|
335
335
|
/* @__PURE__ */ c(u, { className: "univer-fill-primary-600", extend: { colorChannel1: a.isValid ? e : "" } }),
|
|
336
336
|
o && /* @__PURE__ */ c(
|
|
337
|
-
|
|
337
|
+
Vt,
|
|
338
338
|
{
|
|
339
|
-
className: "univer-ml-1.5 univer-text-
|
|
339
|
+
className: "univer-ml-1.5 univer-text-gray-400"
|
|
340
340
|
}
|
|
341
341
|
)
|
|
342
342
|
]
|
|
@@ -344,17 +344,17 @@ const Me = (t) => {
|
|
|
344
344
|
)
|
|
345
345
|
}
|
|
346
346
|
) : null;
|
|
347
|
-
},
|
|
347
|
+
}, We = (t) => {
|
|
348
348
|
var s, o, d;
|
|
349
349
|
const e = t.rule;
|
|
350
350
|
if (!e) return null;
|
|
351
|
-
const r =
|
|
351
|
+
const r = J(() => {
|
|
352
352
|
if (e.type === U.colorScale) {
|
|
353
|
-
const a = e.config.map((h, v) => ({ color: new
|
|
354
|
-
return new Array(5).fill("").map((h, v, f) => v * u / (f.length - 1)).map((h) =>
|
|
353
|
+
const a = e.config.map((h, v) => ({ color: new fn(h.color), value: v })), u = a.length - 1;
|
|
354
|
+
return new Array(5).fill("").map((h, v, f) => v * u / (f.length - 1)).map((h) => dr(a, h));
|
|
355
355
|
}
|
|
356
356
|
return null;
|
|
357
|
-
}, [e]), n =
|
|
357
|
+
}, [e]), n = J(() => {
|
|
358
358
|
if (e.type === U.iconSet)
|
|
359
359
|
return e.config.map((a) => {
|
|
360
360
|
const u = we[a.iconType];
|
|
@@ -364,15 +364,15 @@ const Me = (t) => {
|
|
|
364
364
|
univer-justify-center univer-text-xs`;
|
|
365
365
|
switch (e.type) {
|
|
366
366
|
case U.dataBar: {
|
|
367
|
-
const { isGradient: a } = e.config, u = a ? `linear-gradient(to right, ${e.config.positiveColor ||
|
|
368
|
-
return /* @__PURE__ */
|
|
367
|
+
const { isGradient: a } = e.config, u = a ? `linear-gradient(to right, ${e.config.positiveColor || Ke}, rgb(255 255 255))` : e.config.positiveColor, l = a ? `linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor || Xe})` : e.config.nativeColor;
|
|
368
|
+
return /* @__PURE__ */ F("div", { className: i, children: [
|
|
369
369
|
/* @__PURE__ */ c(
|
|
370
370
|
"div",
|
|
371
371
|
{
|
|
372
372
|
className: "univer-h-full univer-w-1/2",
|
|
373
373
|
style: {
|
|
374
374
|
background: l,
|
|
375
|
-
border: `1px solid ${e.config.nativeColor ||
|
|
375
|
+
border: `1px solid ${e.config.nativeColor || Xe}`
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
),
|
|
@@ -382,7 +382,7 @@ const Me = (t) => {
|
|
|
382
382
|
className: "univer-h-full univer-w-1/2",
|
|
383
383
|
style: {
|
|
384
384
|
background: u,
|
|
385
|
-
border: `1px solid ${e.config.positiveColor ||
|
|
385
|
+
border: `1px solid ${e.config.positiveColor || Ke}`
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
)
|
|
@@ -391,9 +391,9 @@ const Me = (t) => {
|
|
|
391
391
|
case U.colorScale:
|
|
392
392
|
return r && /* @__PURE__ */ c("div", { className: i, children: r.map((a, u) => /* @__PURE__ */ c("div", { className: "univer-h-full", style: { width: `${100 / r.length}%`, background: a } }, u)) });
|
|
393
393
|
case U.iconSet:
|
|
394
|
-
return n && /* @__PURE__ */ c("div", { className: i, children: n.map((a, u) => a ? /* @__PURE__ */ c("img", { className: "univer-h-full", src: a, draggable: !1 }, u) : /* @__PURE__ */ c(
|
|
394
|
+
return n && /* @__PURE__ */ c("div", { className: i, children: n.map((a, u) => a ? /* @__PURE__ */ c("img", { className: "univer-h-full", src: a, draggable: !1 }, u) : /* @__PURE__ */ c(ot, {}, u)) });
|
|
395
395
|
case U.highlightCell: {
|
|
396
|
-
const { ul: a, st: u, it: l, bl: h, bg: v, cl: f } = e.style, S = (a == null ? void 0 : a.s) === ae.TRUE, p = (u == null ? void 0 : u.s) === ae.TRUE, T = l === ae.TRUE, _ = h === ae.TRUE, R = (s = v == null ? void 0 : v.rgb) != null ? s :
|
|
396
|
+
const { ul: a, st: u, it: l, bl: h, bg: v, cl: f } = e.style, S = (a == null ? void 0 : a.s) === ae.TRUE, p = (u == null ? void 0 : u.s) === ae.TRUE, T = l === ae.TRUE, _ = h === ae.TRUE, R = (s = v == null ? void 0 : v.rgb) != null ? s : hr, E = (o = f == null ? void 0 : f.rgb) != null ? o : vr, x = {
|
|
397
397
|
textDecoration: (d = `${S ? "underline" : ""} ${p ? "line-through" : ""}`.replace(/^ /, "")) != null ? d : void 0,
|
|
398
398
|
backgroundColor: R,
|
|
399
399
|
color: E
|
|
@@ -401,7 +401,7 @@ const Me = (t) => {
|
|
|
401
401
|
return /* @__PURE__ */ c(
|
|
402
402
|
"div",
|
|
403
403
|
{
|
|
404
|
-
className:
|
|
404
|
+
className: X(i, {
|
|
405
405
|
"univer-font-bold": _,
|
|
406
406
|
"univer-italic": T
|
|
407
407
|
}),
|
|
@@ -411,31 +411,30 @@ const Me = (t) => {
|
|
|
411
411
|
);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
},
|
|
414
|
+
}, at = X("univer-mt-5 univer-px-1 univer-py-2 univer-rounded", He), Re = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Lt = (t) => {
|
|
415
415
|
var S;
|
|
416
|
-
const { type: e, className: r, onChange: n, id: i, value: s } = t, o = W(z), d = o.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), a = (S = o.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : S.getSheetId(), u =
|
|
416
|
+
const { type: e, className: r, onChange: n, id: i, value: s } = t, o = W(z), d = o.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), a = (S = o.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : S.getSheetId(), u = J(() => String(s).startsWith("=") ? String(s) : "=", [s]), l = J(() => [A.max, A.min, "none"].includes(e) ? { disabled: !0 } : [A.percent, A.percentile].includes(e) ? {
|
|
417
417
|
min: 0,
|
|
418
418
|
max: 100
|
|
419
419
|
} : {
|
|
420
420
|
min: Number.MIN_SAFE_INTEGER,
|
|
421
421
|
max: Number.MAX_SAFE_INTEGER
|
|
422
422
|
}, [e]), h = de(null), [v, f] = N(!1);
|
|
423
|
-
return
|
|
423
|
+
return Nt((p) => {
|
|
424
424
|
var _;
|
|
425
425
|
((_ = h.current) == null ? void 0 : _.isClickOutSide(p)) && f(!1);
|
|
426
426
|
}), e === A.formula ? /* @__PURE__ */ c("div", { className: "univer-ml-1 univer-w-full", children: /* @__PURE__ */ c(
|
|
427
|
-
|
|
427
|
+
Mt,
|
|
428
428
|
{
|
|
429
429
|
ref: h,
|
|
430
|
-
className: `
|
|
430
|
+
className: X(`
|
|
431
431
|
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
|
|
432
|
-
univer-rounded-lg univer-
|
|
433
|
-
univer-pt-2 univer-transition-colors
|
|
432
|
+
univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
|
|
434
433
|
[&>div:first-child]:univer-px-2.5
|
|
435
434
|
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
|
|
436
|
-
dark:univer-
|
|
435
|
+
dark:univer-bg-gray-700 dark:univer-text-white
|
|
437
436
|
hover:univer-border-primary-600
|
|
438
|
-
`,
|
|
437
|
+
`, He),
|
|
439
438
|
initValue: u,
|
|
440
439
|
unitId: d,
|
|
441
440
|
subUnitId: a,
|
|
@@ -446,9 +445,9 @@ const Me = (t) => {
|
|
|
446
445
|
onFocus: () => f(!0)
|
|
447
446
|
}
|
|
448
447
|
) }) : /* @__PURE__ */ c(Ne, { className: r, value: Number(t.value) || 0, onChange: (p) => t.onChange(p || 0), ...l });
|
|
449
|
-
},
|
|
448
|
+
}, vi = (t) => {
|
|
450
449
|
var L;
|
|
451
|
-
const { interceptorManager: e } = t, r = W(
|
|
450
|
+
const { interceptorManager: e } = t, r = W(re), n = ((L = t.rule) == null ? void 0 : L.type) === U.colorScale ? t.rule : void 0, i = [Re(A.num, r), Re(A.percent, r), Re(A.percentile, r), Re(A.formula, r)], s = [Re(A.min, r), ...i], o = [Re("none", r), ...i], d = [Re(A.max, r), ...i], [a, u] = N(() => {
|
|
452
451
|
var I;
|
|
453
452
|
const g = A.min;
|
|
454
453
|
return n && ((I = n.config[0]) == null ? void 0 : I.value.type) || g;
|
|
@@ -489,9 +488,9 @@ const Me = (t) => {
|
|
|
489
488
|
var I;
|
|
490
489
|
const g = "#2e55ef";
|
|
491
490
|
return n && ((I = n.config[n.config.length - 1]) == null ? void 0 : I.color) || g;
|
|
492
|
-
}), w =
|
|
493
|
-
const { minType: I, medianType: H, maxType: Y, minValue: me, medianValue: ge, maxValue:
|
|
494
|
-
return G.push({ color:
|
|
491
|
+
}), w = J(() => (g) => {
|
|
492
|
+
const { minType: I, medianType: H, maxType: Y, minValue: me, medianValue: ge, maxValue: Fe, minColor: ke, medianColor: D, maxColor: B } = g, G = [];
|
|
493
|
+
return G.push({ color: ke, value: { type: I, value: me } }), H !== "none" && G.push({ color: D, value: { type: H, value: ge } }), G.push({ color: B, value: { type: Y, value: Fe } }), { config: G.map((ee, ne) => ({ ...ee, index: ne })), type: U.colorScale };
|
|
495
494
|
}, []);
|
|
496
495
|
K(() => e.intercept(e.getInterceptPoints().submit, {
|
|
497
496
|
handler() {
|
|
@@ -501,11 +500,11 @@ const Me = (t) => {
|
|
|
501
500
|
const V = (g) => {
|
|
502
501
|
t.onChange(w(g));
|
|
503
502
|
};
|
|
504
|
-
return /* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ F("div", { children: [
|
|
505
504
|
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.styleRule") }),
|
|
506
|
-
/* @__PURE__ */ c("div", { className:
|
|
505
|
+
/* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(We, { rule: w({ minType: a, medianType: l, maxType: v, minValue: S, medianValue: T, maxValue: R, minColor: x, medianColor: C, maxColor: y }) }) }),
|
|
507
506
|
/* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-xs univer-text-gray-600", children: r.t("sheet.cf.valueType.min") }),
|
|
508
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
|
|
509
508
|
/* @__PURE__ */ c(
|
|
510
509
|
le,
|
|
511
510
|
{
|
|
@@ -514,13 +513,13 @@ const Me = (t) => {
|
|
|
514
513
|
value: a,
|
|
515
514
|
onChange: (g) => {
|
|
516
515
|
u(g);
|
|
517
|
-
const I =
|
|
516
|
+
const I = Je(g, 10);
|
|
518
517
|
p(I), V({ minType: g, medianType: l, maxType: v, minValue: I, medianValue: T, maxValue: R, minColor: x, medianColor: C, maxColor: y });
|
|
519
518
|
}
|
|
520
519
|
}
|
|
521
520
|
),
|
|
522
521
|
/* @__PURE__ */ c(
|
|
523
|
-
|
|
522
|
+
Lt,
|
|
524
523
|
{
|
|
525
524
|
id: "min",
|
|
526
525
|
className: "univer-ml-1",
|
|
@@ -543,7 +542,7 @@ const Me = (t) => {
|
|
|
543
542
|
)
|
|
544
543
|
] }),
|
|
545
544
|
/* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-xs univer-text-gray-600", children: r.t("sheet.cf.panel.medianValue") }),
|
|
546
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
|
|
547
546
|
/* @__PURE__ */ c(
|
|
548
547
|
le,
|
|
549
548
|
{
|
|
@@ -552,7 +551,7 @@ const Me = (t) => {
|
|
|
552
551
|
value: l,
|
|
553
552
|
onChange: (g) => {
|
|
554
553
|
h(g);
|
|
555
|
-
const I =
|
|
554
|
+
const I = Je(g, 50);
|
|
556
555
|
_(I), V({
|
|
557
556
|
minType: a,
|
|
558
557
|
medianType: g,
|
|
@@ -568,7 +567,7 @@ const Me = (t) => {
|
|
|
568
567
|
}
|
|
569
568
|
),
|
|
570
569
|
/* @__PURE__ */ c(
|
|
571
|
-
|
|
570
|
+
Lt,
|
|
572
571
|
{
|
|
573
572
|
id: "median",
|
|
574
573
|
className: "univer-ml-1",
|
|
@@ -611,7 +610,7 @@ const Me = (t) => {
|
|
|
611
610
|
)
|
|
612
611
|
] }),
|
|
613
612
|
/* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-xs univer-text-gray-600", children: r.t("sheet.cf.valueType.max") }),
|
|
614
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-h-8 univer-items-center", children: [
|
|
615
614
|
/* @__PURE__ */ c(
|
|
616
615
|
le,
|
|
617
616
|
{
|
|
@@ -620,7 +619,7 @@ const Me = (t) => {
|
|
|
620
619
|
value: v,
|
|
621
620
|
onChange: (g) => {
|
|
622
621
|
f(g);
|
|
623
|
-
const I =
|
|
622
|
+
const I = Je(g, 90);
|
|
624
623
|
E(I), V({
|
|
625
624
|
minType: a,
|
|
626
625
|
medianType: l,
|
|
@@ -636,7 +635,7 @@ const Me = (t) => {
|
|
|
636
635
|
}
|
|
637
636
|
),
|
|
638
637
|
/* @__PURE__ */ c(
|
|
639
|
-
|
|
638
|
+
Lt,
|
|
640
639
|
{
|
|
641
640
|
id: "max",
|
|
642
641
|
className: "univer-ml-1",
|
|
@@ -679,14 +678,14 @@ const Me = (t) => {
|
|
|
679
678
|
)
|
|
680
679
|
] })
|
|
681
680
|
] });
|
|
682
|
-
}, Ue = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }),
|
|
681
|
+
}, Ue = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), sn = (t) => {
|
|
683
682
|
var p;
|
|
684
683
|
const { onChange: e, className: r, value: n, type: i, id: s, disabled: o = !1 } = t, d = W(z), a = d.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), u = (p = d.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : p.getSheetId(), l = de(null), [h, v] = N(!1);
|
|
685
|
-
|
|
684
|
+
Nt((T) => {
|
|
686
685
|
var R;
|
|
687
686
|
((R = l.current) == null ? void 0 : R.isClickOutSide(T)) && v(!1);
|
|
688
687
|
});
|
|
689
|
-
const f = de(n), S =
|
|
688
|
+
const f = de(n), S = J(() => [A.percentile, A.percent].includes(i) ? {
|
|
690
689
|
max: 100,
|
|
691
690
|
min: 0
|
|
692
691
|
} : {
|
|
@@ -696,18 +695,17 @@ const Me = (t) => {
|
|
|
696
695
|
if (i === A.formula) {
|
|
697
696
|
const T = String(f.current).startsWith("=") ? String(f.current) || "" : "=";
|
|
698
697
|
return /* @__PURE__ */ c("div", { className: "univer-ml-3 univer-w-full", children: /* @__PURE__ */ c(
|
|
699
|
-
|
|
698
|
+
Mt,
|
|
700
699
|
{
|
|
701
700
|
ref: l,
|
|
702
|
-
className: `
|
|
701
|
+
className: X(`
|
|
703
702
|
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
|
|
704
|
-
univer-rounded-lg univer-
|
|
705
|
-
univer-pt-2 univer-transition-colors
|
|
703
|
+
univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
|
|
706
704
|
[&>div:first-child]:univer-px-2.5
|
|
707
705
|
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
|
|
708
|
-
dark:univer-
|
|
706
|
+
dark:univer-bg-gray-700 dark:univer-text-white
|
|
709
707
|
hover:univer-border-primary-600
|
|
710
|
-
`,
|
|
708
|
+
`, He),
|
|
711
709
|
initValue: T,
|
|
712
710
|
unitId: a,
|
|
713
711
|
subUnitId: u,
|
|
@@ -731,18 +729,18 @@ const Me = (t) => {
|
|
|
731
729
|
...S
|
|
732
730
|
}
|
|
733
731
|
);
|
|
734
|
-
},
|
|
732
|
+
}, mi = (t) => {
|
|
735
733
|
var L;
|
|
736
|
-
const { interceptorManager: e } = t, r = W(
|
|
734
|
+
const { interceptorManager: e } = t, r = W(re), n = ((L = t.rule) == null ? void 0 : L.type) === U.dataBar ? t.rule : void 0, [i, s] = N(() => {
|
|
737
735
|
var I;
|
|
738
736
|
const g = "0";
|
|
739
737
|
return n ? (I = n.config) != null && I.isGradient ? "1" : "0" : g;
|
|
740
738
|
}), [o, d] = N(() => {
|
|
741
739
|
var g;
|
|
742
|
-
return n ? ((g = n.config) == null ? void 0 : g.positiveColor) ||
|
|
740
|
+
return n ? ((g = n.config) == null ? void 0 : g.positiveColor) || Ke : Ke;
|
|
743
741
|
}), [a, u] = N(() => {
|
|
744
742
|
var g;
|
|
745
|
-
return n ? ((g = n.config) == null ? void 0 : g.nativeColor) ||
|
|
743
|
+
return n ? ((g = n.config) == null ? void 0 : g.nativeColor) || Xe : Xe;
|
|
746
744
|
}), l = [Ue(A.num, r), Ue(A.percent, r), Ue(A.percentile, r), Ue(A.formula, r)], h = [Ue(A.min, r), ...l], v = [Ue(A.max, r), ...l], [f, S] = N(() => {
|
|
747
745
|
var I;
|
|
748
746
|
const g = h[0].value;
|
|
@@ -767,8 +765,8 @@ const Me = (t) => {
|
|
|
767
765
|
min: { type: g.minValueType, value: g.minValue },
|
|
768
766
|
max: { type: g.maxValueType, value: g.maxValue },
|
|
769
767
|
isGradient: g.isGradient === "1",
|
|
770
|
-
positiveColor: g.positiveColor ||
|
|
771
|
-
nativeColor: g.nativeColor ||
|
|
768
|
+
positiveColor: g.positiveColor || Ke,
|
|
769
|
+
nativeColor: g.nativeColor || Xe
|
|
772
770
|
}, type: U.dataBar, isShowValue: g.isShowValue });
|
|
773
771
|
K(() => e.intercept(e.getInterceptPoints().submit, {
|
|
774
772
|
handler() {
|
|
@@ -782,10 +780,10 @@ const Me = (t) => {
|
|
|
782
780
|
}, w = (g) => {
|
|
783
781
|
u(g), y({ isGradient: i, minValue: _, minValueType: f, maxValue: E, maxValueType: p, positiveColor: o, nativeColor: g, isShowValue: m });
|
|
784
782
|
}, V = (g) => l.map((I) => I.value).includes(g);
|
|
785
|
-
return /* @__PURE__ */
|
|
783
|
+
return /* @__PURE__ */ F("div", { children: [
|
|
786
784
|
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.styleRule") }),
|
|
787
|
-
/* @__PURE__ */ c("div", { className:
|
|
788
|
-
|
|
785
|
+
/* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(
|
|
786
|
+
We,
|
|
789
787
|
{
|
|
790
788
|
rule: b({
|
|
791
789
|
isGradient: i,
|
|
@@ -799,25 +797,25 @@ const Me = (t) => {
|
|
|
799
797
|
})
|
|
800
798
|
}
|
|
801
799
|
) }),
|
|
802
|
-
/* @__PURE__ */
|
|
800
|
+
/* @__PURE__ */ F("div", { children: [
|
|
803
801
|
/* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.fillType") }),
|
|
804
|
-
/* @__PURE__ */
|
|
805
|
-
/* @__PURE__ */
|
|
806
|
-
|
|
802
|
+
/* @__PURE__ */ F("div", { className: "univer-ml-1 univer-mt-3 univer-flex univer-items-center", children: [
|
|
803
|
+
/* @__PURE__ */ F(
|
|
804
|
+
qr,
|
|
807
805
|
{
|
|
808
806
|
value: i,
|
|
809
807
|
onChange: (g) => {
|
|
810
808
|
s(g), y({ isGradient: g, minValue: _, minValueType: f, maxValue: E, maxValueType: p, positiveColor: o, nativeColor: a, isShowValue: m });
|
|
811
809
|
},
|
|
812
810
|
children: [
|
|
813
|
-
/* @__PURE__ */ c(
|
|
814
|
-
/* @__PURE__ */ c(
|
|
811
|
+
/* @__PURE__ */ c(Xt, { value: "0", children: /* @__PURE__ */ c("span", { className: "univer-text-xs", children: r.t("sheet.cf.panel.pureColor") }) }),
|
|
812
|
+
/* @__PURE__ */ c(Xt, { value: "1", children: /* @__PURE__ */ c("span", { className: "univer-text-xs", children: r.t("sheet.cf.panel.gradient") }) })
|
|
815
813
|
]
|
|
816
814
|
}
|
|
817
815
|
),
|
|
818
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ F("div", { className: "univer-ml-6 univer-flex univer-items-center univer-text-xs", children: [
|
|
819
817
|
/* @__PURE__ */ c(
|
|
820
|
-
|
|
818
|
+
yt,
|
|
821
819
|
{
|
|
822
820
|
checked: !m,
|
|
823
821
|
onChange: (g) => {
|
|
@@ -838,10 +836,10 @@ const Me = (t) => {
|
|
|
838
836
|
] })
|
|
839
837
|
] })
|
|
840
838
|
] }),
|
|
841
|
-
/* @__PURE__ */
|
|
839
|
+
/* @__PURE__ */ F("div", { children: [
|
|
842
840
|
/* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.panel.colorSet") }),
|
|
843
|
-
/* @__PURE__ */
|
|
844
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ F("div", { className: "univer-ml-1 univer-mt-3 univer-flex univer-items-center", children: [
|
|
842
|
+
/* @__PURE__ */ F("div", { className: "univer-flex univer-items-center", children: [
|
|
845
843
|
/* @__PURE__ */ c("div", { className: "univer-text-xs", children: r.t("sheet.cf.panel.native") }),
|
|
846
844
|
/* @__PURE__ */ c(
|
|
847
845
|
Me,
|
|
@@ -851,7 +849,7 @@ const Me = (t) => {
|
|
|
851
849
|
}
|
|
852
850
|
)
|
|
853
851
|
] }),
|
|
854
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ F("div", { className: "univer-ml-3 univer-flex univer-items-center", children: [
|
|
855
853
|
/* @__PURE__ */ c("div", { className: "univer-text-xs", children: r.t("sheet.cf.panel.positive") }),
|
|
856
854
|
/* @__PURE__ */ c(
|
|
857
855
|
Me,
|
|
@@ -863,9 +861,9 @@ const Me = (t) => {
|
|
|
863
861
|
] })
|
|
864
862
|
] })
|
|
865
863
|
] }),
|
|
866
|
-
/* @__PURE__ */
|
|
864
|
+
/* @__PURE__ */ F("div", { children: [
|
|
867
865
|
/* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.valueType.min") }),
|
|
868
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
|
|
869
867
|
/* @__PURE__ */ c(
|
|
870
868
|
le,
|
|
871
869
|
{
|
|
@@ -874,7 +872,7 @@ const Me = (t) => {
|
|
|
874
872
|
value: f,
|
|
875
873
|
onChange: (g) => {
|
|
876
874
|
S(g);
|
|
877
|
-
const I =
|
|
875
|
+
const I = Je(g, 10);
|
|
878
876
|
R(I), y({
|
|
879
877
|
isGradient: i,
|
|
880
878
|
minValue: I,
|
|
@@ -889,7 +887,7 @@ const Me = (t) => {
|
|
|
889
887
|
}
|
|
890
888
|
),
|
|
891
889
|
/* @__PURE__ */ c(
|
|
892
|
-
|
|
890
|
+
sn,
|
|
893
891
|
{
|
|
894
892
|
id: "min",
|
|
895
893
|
className: "univer-ml-3",
|
|
@@ -912,7 +910,7 @@ const Me = (t) => {
|
|
|
912
910
|
)
|
|
913
911
|
] }),
|
|
914
912
|
/* @__PURE__ */ c("div", { className: "univer-mt-3 univer-text-sm univer-text-gray-600", children: r.t("sheet.cf.valueType.max") }),
|
|
915
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
|
|
916
914
|
/* @__PURE__ */ c(
|
|
917
915
|
le,
|
|
918
916
|
{
|
|
@@ -921,7 +919,7 @@ const Me = (t) => {
|
|
|
921
919
|
value: p,
|
|
922
920
|
onChange: (g) => {
|
|
923
921
|
T(g);
|
|
924
|
-
const I =
|
|
922
|
+
const I = Je(g, 90);
|
|
925
923
|
x(I), y({
|
|
926
924
|
isGradient: i,
|
|
927
925
|
minValue: _,
|
|
@@ -936,7 +934,7 @@ const Me = (t) => {
|
|
|
936
934
|
}
|
|
937
935
|
),
|
|
938
936
|
/* @__PURE__ */ c(
|
|
939
|
-
|
|
937
|
+
sn,
|
|
940
938
|
{
|
|
941
939
|
className: "univer-ml-3",
|
|
942
940
|
disabled: !V(p),
|
|
@@ -960,8 +958,8 @@ const Me = (t) => {
|
|
|
960
958
|
] })
|
|
961
959
|
] })
|
|
962
960
|
] });
|
|
963
|
-
},
|
|
964
|
-
const { style: e, onChange: r, className: n } = t, i = W(
|
|
961
|
+
}, ct = (t) => [ae.FALSE, void 0].includes(t) ? ae.TRUE : ae.FALSE, ut = (t) => t !== ae.FALSE, Yt = (t) => {
|
|
962
|
+
const { style: e, onChange: r, className: n } = t, i = W(zt), [s, o] = N(() => {
|
|
965
963
|
if (e != null && e.bl)
|
|
966
964
|
return e.bl;
|
|
967
965
|
}), [d, a] = N(() => {
|
|
@@ -987,60 +985,60 @@ const Me = (t) => {
|
|
|
987
985
|
bl: s,
|
|
988
986
|
it: d
|
|
989
987
|
};
|
|
990
|
-
f !== void 0 && (C.cl = { rgb: f }), p !== void 0 && (C.bg = { rgb: p }), h !== void 0 && (C.st = { s: h }), u !== void 0 && (C.ul = { s: u }), r(
|
|
988
|
+
f !== void 0 && (C.cl = { rgb: f }), p !== void 0 && (C.bg = { rgb: p }), h !== void 0 && (C.st = { s: h }), u !== void 0 && (C.ul = { s: u }), r(mr(C));
|
|
991
989
|
}, [s, d, u, h, f, p]);
|
|
992
990
|
const m = "univer-flex univer-cursor-pointer univer-items-center univer-rounded univer-px-1";
|
|
993
|
-
return /* @__PURE__ */
|
|
991
|
+
return /* @__PURE__ */ F("div", { className: X("univer-my-2.5 univer-flex univer-justify-between", n), children: [
|
|
994
992
|
_ && /* @__PURE__ */ c(
|
|
995
993
|
"div",
|
|
996
994
|
{
|
|
997
|
-
className:
|
|
998
|
-
"univer-bg-gray-100":
|
|
995
|
+
className: X(m, {
|
|
996
|
+
"univer-bg-gray-100": ut(s || ae.FALSE)
|
|
999
997
|
}),
|
|
1000
|
-
onClick: () => o(
|
|
998
|
+
onClick: () => o(ct(s)),
|
|
1001
999
|
children: /* @__PURE__ */ c(_, {})
|
|
1002
1000
|
}
|
|
1003
1001
|
),
|
|
1004
1002
|
R && /* @__PURE__ */ c(
|
|
1005
1003
|
"div",
|
|
1006
1004
|
{
|
|
1007
|
-
className:
|
|
1008
|
-
"univer-bg-gray-100":
|
|
1005
|
+
className: X(m, {
|
|
1006
|
+
"univer-bg-gray-100": ut(d || ae.FALSE)
|
|
1009
1007
|
}),
|
|
1010
|
-
onClick: () => a(
|
|
1008
|
+
onClick: () => a(ct(d)),
|
|
1011
1009
|
children: /* @__PURE__ */ c(R, {})
|
|
1012
1010
|
}
|
|
1013
1011
|
),
|
|
1014
1012
|
E && /* @__PURE__ */ c(
|
|
1015
1013
|
"div",
|
|
1016
1014
|
{
|
|
1017
|
-
className:
|
|
1018
|
-
"univer-bg-gray-100":
|
|
1015
|
+
className: X(m, {
|
|
1016
|
+
"univer-bg-gray-100": ut(u || ae.FALSE)
|
|
1019
1017
|
}),
|
|
1020
|
-
onClick: () => l(
|
|
1018
|
+
onClick: () => l(ct(u)),
|
|
1021
1019
|
children: /* @__PURE__ */ c(E, {})
|
|
1022
1020
|
}
|
|
1023
1021
|
),
|
|
1024
1022
|
x && /* @__PURE__ */ c(
|
|
1025
1023
|
"div",
|
|
1026
1024
|
{
|
|
1027
|
-
className:
|
|
1028
|
-
"univer-bg-gray-100":
|
|
1025
|
+
className: X(m, {
|
|
1026
|
+
"univer-bg-gray-100": ut(h || ae.FALSE)
|
|
1029
1027
|
}),
|
|
1030
|
-
onClick: () => v(
|
|
1028
|
+
onClick: () => v(ct(h)),
|
|
1031
1029
|
children: /* @__PURE__ */ c(x, {})
|
|
1032
1030
|
}
|
|
1033
1031
|
),
|
|
1034
1032
|
/* @__PURE__ */ c(Me, { color: f, onChange: S, iconId: "FontColor" }),
|
|
1035
1033
|
/* @__PURE__ */ c(Me, { color: p, onChange: T, iconId: "PaintBucket" })
|
|
1036
1034
|
] });
|
|
1037
|
-
},
|
|
1035
|
+
}, gi = (t) => {
|
|
1038
1036
|
var x;
|
|
1039
|
-
const { onChange: e, interceptorManager: r } = t, n = W(
|
|
1037
|
+
const { onChange: e, interceptorManager: r } = t, n = W(re), s = W(z).getCurrentUnitForType($.UNIVER_SHEET), o = s.getActiveSheet(), d = ((x = t.rule) == null ? void 0 : x.type) === U.highlightCell ? t.rule : void 0, a = de(null), [u, l] = N(!1), h = de(null), [v, f] = N({}), [S, p] = N(() => (d == null ? void 0 : d.subType) === k.formula ? d.value : "="), [T, _] = N(void 0), R = (m) => ({
|
|
1040
1038
|
style: m.style,
|
|
1041
1039
|
value: S,
|
|
1042
1040
|
type: U.highlightCell,
|
|
1043
|
-
subType:
|
|
1041
|
+
subType: k.formula
|
|
1044
1042
|
});
|
|
1045
1043
|
K(() => r.intercept(r.getInterceptPoints().submit, {
|
|
1046
1044
|
handler() {
|
|
@@ -1052,24 +1050,23 @@ const Me = (t) => {
|
|
|
1052
1050
|
const E = (m) => {
|
|
1053
1051
|
e(R(m));
|
|
1054
1052
|
};
|
|
1055
|
-
return
|
|
1053
|
+
return Nt((m) => {
|
|
1056
1054
|
var b;
|
|
1057
1055
|
((b = h.current) == null ? void 0 : b.isClickOutSide(m)) && l(!1);
|
|
1058
|
-
}), /* @__PURE__ */
|
|
1056
|
+
}), /* @__PURE__ */ F("div", { ref: a, children: [
|
|
1059
1057
|
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: n.t("sheet.cf.panel.styleRule") }),
|
|
1060
1058
|
/* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
|
|
1061
|
-
|
|
1059
|
+
Mt,
|
|
1062
1060
|
{
|
|
1063
1061
|
ref: h,
|
|
1064
|
-
className: `
|
|
1062
|
+
className: X(`
|
|
1065
1063
|
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
|
|
1066
|
-
univer-rounded-lg univer-
|
|
1067
|
-
univer-pt-2 univer-transition-colors
|
|
1064
|
+
univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
|
|
1068
1065
|
[&>div:first-child]:univer-px-2.5
|
|
1069
1066
|
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
|
|
1070
|
-
dark:univer-
|
|
1067
|
+
dark:univer-bg-gray-700 dark:univer-text-white
|
|
1071
1068
|
hover:univer-border-primary-600
|
|
1072
|
-
`,
|
|
1069
|
+
`, He),
|
|
1073
1070
|
errorText: T,
|
|
1074
1071
|
isFocus: u,
|
|
1075
1072
|
initValue: S,
|
|
@@ -1086,9 +1083,9 @@ const Me = (t) => {
|
|
|
1086
1083
|
}
|
|
1087
1084
|
}
|
|
1088
1085
|
) }),
|
|
1089
|
-
/* @__PURE__ */ c("div", { className:
|
|
1086
|
+
/* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(We, { rule: R({ style: v }) }) }),
|
|
1090
1087
|
/* @__PURE__ */ c(
|
|
1091
|
-
|
|
1088
|
+
Yt,
|
|
1092
1089
|
{
|
|
1093
1090
|
style: d == null ? void 0 : d.style,
|
|
1094
1091
|
className: "univer-mt-3",
|
|
@@ -1098,7 +1095,7 @@ const Me = (t) => {
|
|
|
1098
1095
|
}
|
|
1099
1096
|
)
|
|
1100
1097
|
] });
|
|
1101
|
-
},
|
|
1098
|
+
}, dt = (t) => /* @__PURE__ */ F("div", { style: { position: "relative" }, children: [
|
|
1102
1099
|
/* @__PURE__ */ c(
|
|
1103
1100
|
"div",
|
|
1104
1101
|
{
|
|
@@ -1113,15 +1110,15 @@ const Me = (t) => {
|
|
|
1113
1110
|
}
|
|
1114
1111
|
),
|
|
1115
1112
|
t.children
|
|
1116
|
-
] }), q = (t, e) => ({ label: e.t(`sheet.cf.operator.${t}`), value: t }),
|
|
1117
|
-
const { type: e, operator: r, onChange: n, value: i, interceptorManager: s } = t, o = W(
|
|
1113
|
+
] }), q = (t, e) => ({ label: e.t(`sheet.cf.operator.${t}`), value: t }), fi = (t) => {
|
|
1114
|
+
const { type: e, operator: r, onChange: n, value: i, interceptorManager: s } = t, o = W(re), [d, a] = N(() => typeof i == "number" ? i : 0), [u, l] = N(""), [h, v] = N(() => typeof i == "string" ? i : ""), [f, S] = N(""), [p, T] = N(() => Array.isArray(i) ? i[0] === void 0 ? 0 : i[0] : 0), [_, R] = N(""), [E, x] = N(() => Array.isArray(i) ? i[1] === void 0 ? 100 : i[1] : 100), [m, C] = N("");
|
|
1118
1115
|
switch (K(() => {
|
|
1119
1116
|
switch (e) {
|
|
1120
|
-
case
|
|
1117
|
+
case k.text: {
|
|
1121
1118
|
[j.beginsWith, j.endsWith, j.containsText, j.notContainsText, j.equal, j.notEqual].includes(r) && n(h);
|
|
1122
1119
|
break;
|
|
1123
1120
|
}
|
|
1124
|
-
case
|
|
1121
|
+
case k.number: {
|
|
1125
1122
|
[P.equal, P.notEqual, P.greaterThan, P.greaterThanOrEqual, P.lessThan, P.lessThanOrEqual].includes(r) && n(d), [P.between, P.notBetween].includes(r) && n([p, E]);
|
|
1126
1123
|
break;
|
|
1127
1124
|
}
|
|
@@ -1130,7 +1127,7 @@ const Me = (t) => {
|
|
|
1130
1127
|
const b = s.intercept(s.getInterceptPoints().beforeSubmit, {
|
|
1131
1128
|
handler: (y, M, w) => {
|
|
1132
1129
|
switch (e) {
|
|
1133
|
-
case
|
|
1130
|
+
case k.text:
|
|
1134
1131
|
if ([j.beginsWith, j.containsText, j.endsWith, j.notEqual, j.notContainsText, j.equal].includes(r))
|
|
1135
1132
|
return h ? w(y) : (S(o.t("sheet.cf.errorMessage.notBlank")), !1);
|
|
1136
1133
|
}
|
|
@@ -1141,13 +1138,13 @@ const Me = (t) => {
|
|
|
1141
1138
|
b();
|
|
1142
1139
|
};
|
|
1143
1140
|
}, [e, d, h, r]), e) {
|
|
1144
|
-
case
|
|
1141
|
+
case k.text: {
|
|
1145
1142
|
if ([j.beginsWith, j.endsWith, j.containsText, j.notContainsText, j.equal, j.notEqual].includes(r)) {
|
|
1146
1143
|
const b = (y) => {
|
|
1147
1144
|
v(y), n(y);
|
|
1148
1145
|
};
|
|
1149
|
-
return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
|
|
1150
|
-
|
|
1146
|
+
return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(dt, { errorText: f, children: /* @__PURE__ */ c(
|
|
1147
|
+
Gr,
|
|
1151
1148
|
{
|
|
1152
1149
|
value: h,
|
|
1153
1150
|
onChange: (y) => {
|
|
@@ -1158,12 +1155,12 @@ const Me = (t) => {
|
|
|
1158
1155
|
}
|
|
1159
1156
|
break;
|
|
1160
1157
|
}
|
|
1161
|
-
case
|
|
1158
|
+
case k.number: {
|
|
1162
1159
|
if ([P.equal, P.notEqual, P.greaterThan, P.greaterThanOrEqual, P.lessThan, P.lessThanOrEqual].includes(r)) {
|
|
1163
1160
|
const b = (y) => {
|
|
1164
1161
|
a(y || 0), n(y || 0), l("");
|
|
1165
1162
|
};
|
|
1166
|
-
return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
|
|
1163
|
+
return /* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(dt, { errorText: u, children: /* @__PURE__ */ c(
|
|
1167
1164
|
Ne,
|
|
1168
1165
|
{
|
|
1169
1166
|
className: "univer-w-full",
|
|
@@ -1180,9 +1177,9 @@ const Me = (t) => {
|
|
|
1180
1177
|
}, y = (M) => {
|
|
1181
1178
|
x(M || 0), n([p, M || 0]), C("");
|
|
1182
1179
|
};
|
|
1183
|
-
return /* @__PURE__ */
|
|
1184
|
-
/* @__PURE__ */ c(
|
|
1185
|
-
/* @__PURE__ */ c(
|
|
1180
|
+
return /* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
|
|
1181
|
+
/* @__PURE__ */ c(dt, { errorText: _, children: /* @__PURE__ */ c(Ne, { min: Number.MIN_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER, value: p, onChange: b }) }),
|
|
1182
|
+
/* @__PURE__ */ c(dt, { errorText: m, children: /* @__PURE__ */ c(
|
|
1186
1183
|
Ne,
|
|
1187
1184
|
{
|
|
1188
1185
|
className: "univer-ml-3",
|
|
@@ -1197,9 +1194,9 @@ const Me = (t) => {
|
|
|
1197
1194
|
}
|
|
1198
1195
|
}
|
|
1199
1196
|
return null;
|
|
1200
|
-
},
|
|
1197
|
+
}, on = (t, e) => {
|
|
1201
1198
|
switch (t) {
|
|
1202
|
-
case
|
|
1199
|
+
case k.text:
|
|
1203
1200
|
return [
|
|
1204
1201
|
q(j.containsText, e),
|
|
1205
1202
|
q(j.notContainsText, e),
|
|
@@ -1212,7 +1209,7 @@ const Me = (t) => {
|
|
|
1212
1209
|
q(j.containsErrors, e),
|
|
1213
1210
|
q(j.notContainsErrors, e)
|
|
1214
1211
|
];
|
|
1215
|
-
case
|
|
1212
|
+
case k.number:
|
|
1216
1213
|
return [
|
|
1217
1214
|
q(P.between, e),
|
|
1218
1215
|
q(P.notBetween, e),
|
|
@@ -1223,7 +1220,7 @@ const Me = (t) => {
|
|
|
1223
1220
|
q(P.lessThan, e),
|
|
1224
1221
|
q(P.lessThanOrEqual, e)
|
|
1225
1222
|
];
|
|
1226
|
-
case
|
|
1223
|
+
case k.timePeriod:
|
|
1227
1224
|
return [
|
|
1228
1225
|
q(ue.yesterday, e),
|
|
1229
1226
|
q(ue.today, e),
|
|
@@ -1237,37 +1234,37 @@ const Me = (t) => {
|
|
|
1237
1234
|
q(ue.nextMonth, e)
|
|
1238
1235
|
];
|
|
1239
1236
|
}
|
|
1240
|
-
},
|
|
1237
|
+
}, an = (t) => {
|
|
1241
1238
|
var x;
|
|
1242
|
-
const { interceptorManager: e, onChange: r } = t, n = W(
|
|
1243
|
-
const m =
|
|
1239
|
+
const { interceptorManager: e, onChange: r } = t, n = W(re), i = ((x = t.rule) == null ? void 0 : x.type) === U.highlightCell ? t.rule : void 0, [s, o] = N(() => {
|
|
1240
|
+
const m = k.text;
|
|
1244
1241
|
return i && i.subType || m;
|
|
1245
1242
|
}), d = [{
|
|
1246
|
-
value:
|
|
1243
|
+
value: k.text,
|
|
1247
1244
|
label: n.t("sheet.cf.subRuleType.text")
|
|
1248
1245
|
}, {
|
|
1249
|
-
value:
|
|
1246
|
+
value: k.number,
|
|
1250
1247
|
label: n.t("sheet.cf.subRuleType.number")
|
|
1251
1248
|
}, {
|
|
1252
|
-
value:
|
|
1249
|
+
value: k.timePeriod,
|
|
1253
1250
|
label: n.t("sheet.cf.subRuleType.timePeriod")
|
|
1254
1251
|
}, {
|
|
1255
|
-
value:
|
|
1252
|
+
value: k.duplicateValues,
|
|
1256
1253
|
label: n.t("sheet.cf.subRuleType.duplicateValues")
|
|
1257
1254
|
}, {
|
|
1258
|
-
value:
|
|
1255
|
+
value: k.uniqueValues,
|
|
1259
1256
|
label: n.t("sheet.cf.subRuleType.uniqueValues")
|
|
1260
|
-
}], a =
|
|
1257
|
+
}], a = J(() => on(s, n), [s]), [u, l] = N(() => {
|
|
1261
1258
|
const m = a ? a[0].value : void 0;
|
|
1262
1259
|
return i && i.operator || m;
|
|
1263
1260
|
}), [h, v] = N(() => {
|
|
1264
1261
|
var b;
|
|
1265
1262
|
const m = "";
|
|
1266
|
-
return i ? (b = i.value) != null ? b :
|
|
1267
|
-
}), [f, S] = N({}), p =
|
|
1268
|
-
var C, b, y, M, w, V, L, g, I, H, Y, me, ge,
|
|
1263
|
+
return i ? (b = i.value) != null ? b : gt(i.subType, i.operator) : m;
|
|
1264
|
+
}), [f, S] = N({}), p = J(() => (m) => {
|
|
1265
|
+
var C, b, y, M, w, V, L, g, I, H, Y, me, ge, Fe, ke;
|
|
1269
1266
|
switch (m.subType || s) {
|
|
1270
|
-
case
|
|
1267
|
+
case k.text: {
|
|
1271
1268
|
if ([j.beginsWith, j.endsWith, j.containsText, j.notContainsText, j.equal, j.notEqual].includes(u))
|
|
1272
1269
|
return {
|
|
1273
1270
|
type: U.highlightCell,
|
|
@@ -1278,7 +1275,7 @@ const Me = (t) => {
|
|
|
1278
1275
|
};
|
|
1279
1276
|
break;
|
|
1280
1277
|
}
|
|
1281
|
-
case
|
|
1278
|
+
case k.number: {
|
|
1282
1279
|
if ([P.equal, P.notEqual, P.greaterThan, P.greaterThanOrEqual, P.lessThan, P.lessThanOrEqual].includes(u))
|
|
1283
1280
|
return {
|
|
1284
1281
|
type: U.highlightCell,
|
|
@@ -1301,8 +1298,8 @@ const Me = (t) => {
|
|
|
1301
1298
|
return {
|
|
1302
1299
|
type: U.highlightCell,
|
|
1303
1300
|
subType: (ge = m.subType) != null ? ge : s,
|
|
1304
|
-
operator: (
|
|
1305
|
-
style: (
|
|
1301
|
+
operator: (Fe = m.operator) != null ? Fe : u,
|
|
1302
|
+
style: (ke = m.style) != null ? ke : f
|
|
1306
1303
|
};
|
|
1307
1304
|
}, [s, u, h, f]);
|
|
1308
1305
|
K(() => e.intercept(e.getInterceptPoints().submit, {
|
|
@@ -1313,17 +1310,17 @@ const Me = (t) => {
|
|
|
1313
1310
|
d.some((m) => m.value === s) || o(d[0].value);
|
|
1314
1311
|
}, [d]);
|
|
1315
1312
|
const T = (m) => {
|
|
1316
|
-
const C = m, b =
|
|
1317
|
-
o(C), l(y), y && v(
|
|
1313
|
+
const C = m, b = on(C, n), y = b && b[0].value;
|
|
1314
|
+
o(C), l(y), y && v(gt(C, y)), r(p({ subType: C, operator: y }));
|
|
1318
1315
|
}, _ = (m) => {
|
|
1319
1316
|
const C = m;
|
|
1320
1317
|
l(C), r(p({ operator: C }));
|
|
1321
1318
|
}, R = (m) => {
|
|
1322
1319
|
v(m), r(p({ value: m }));
|
|
1323
|
-
}, E =
|
|
1324
|
-
return /* @__PURE__ */
|
|
1320
|
+
}, E = J(() => `${s}_${u}_${Math.random()}`, [s, u]);
|
|
1321
|
+
return /* @__PURE__ */ F("div", { children: [
|
|
1325
1322
|
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: n.t("sheet.cf.panel.styleRule") }),
|
|
1326
|
-
/* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ F("div", { className: "univer-flex univer-justify-between univer-gap-4", children: [
|
|
1327
1324
|
/* @__PURE__ */ c(
|
|
1328
1325
|
le,
|
|
1329
1326
|
{
|
|
@@ -1344,7 +1341,7 @@ const Me = (t) => {
|
|
|
1344
1341
|
)
|
|
1345
1342
|
] }),
|
|
1346
1343
|
/* @__PURE__ */ c(
|
|
1347
|
-
|
|
1344
|
+
fi,
|
|
1348
1345
|
{
|
|
1349
1346
|
value: h,
|
|
1350
1347
|
interceptorManager: e,
|
|
@@ -1355,9 +1352,9 @@ const Me = (t) => {
|
|
|
1355
1352
|
},
|
|
1356
1353
|
E
|
|
1357
1354
|
),
|
|
1358
|
-
/* @__PURE__ */ c("div", { className:
|
|
1355
|
+
/* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(We, { rule: p({}) }) }),
|
|
1359
1356
|
/* @__PURE__ */ c(
|
|
1360
|
-
|
|
1357
|
+
Yt,
|
|
1361
1358
|
{
|
|
1362
1359
|
style: i == null ? void 0 : i.style,
|
|
1363
1360
|
className: "univer-ml-1",
|
|
@@ -1367,17 +1364,17 @@ const Me = (t) => {
|
|
|
1367
1364
|
}
|
|
1368
1365
|
)
|
|
1369
1366
|
] });
|
|
1370
|
-
},
|
|
1367
|
+
}, Xn = (t, e) => (we[t] || [])[Number(e)] || "", pi = (t) => {
|
|
1371
1368
|
var l;
|
|
1372
1369
|
const { error: e, type: r, onChange: n } = t, i = W(z), s = i.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), o = (l = i.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : l.getSheetId(), d = de(null), [a, u] = N(!1);
|
|
1373
|
-
return
|
|
1370
|
+
return Nt((h) => {
|
|
1374
1371
|
var f;
|
|
1375
1372
|
((f = d.current) == null ? void 0 : f.isClickOutSide(h)) && u(!1);
|
|
1376
|
-
}), /* @__PURE__ */ c("div", { className: "univer-relative", children: r !== A.formula ? /* @__PURE__ */
|
|
1373
|
+
}), /* @__PURE__ */ c("div", { className: "univer-relative", children: r !== A.formula ? /* @__PURE__ */ F(Bt, { children: [
|
|
1377
1374
|
/* @__PURE__ */ c(
|
|
1378
1375
|
Ne,
|
|
1379
1376
|
{
|
|
1380
|
-
className:
|
|
1377
|
+
className: X({
|
|
1381
1378
|
"univer-border-red-500": e
|
|
1382
1379
|
}),
|
|
1383
1380
|
value: Number(t.value) || 0,
|
|
@@ -1386,7 +1383,7 @@ const Me = (t) => {
|
|
|
1386
1383
|
),
|
|
1387
1384
|
e && /* @__PURE__ */ c("div", { className: "univer-absolute univer-text-xs univer-text-red-500", children: e })
|
|
1388
1385
|
] }) : /* @__PURE__ */ c("div", { className: "univer-w-full", children: /* @__PURE__ */ c(
|
|
1389
|
-
|
|
1386
|
+
Mt,
|
|
1390
1387
|
{
|
|
1391
1388
|
ref: d,
|
|
1392
1389
|
initValue: String(t.value),
|
|
@@ -1399,16 +1396,16 @@ const Me = (t) => {
|
|
|
1399
1396
|
onFocus: () => u(!0)
|
|
1400
1397
|
}
|
|
1401
1398
|
) }) });
|
|
1402
|
-
},
|
|
1399
|
+
}, ln = (t, e, r) => ({
|
|
1403
1400
|
operator: P.greaterThan,
|
|
1404
1401
|
value: { type: A.num, value: (r.length - 1 - e) * 10 },
|
|
1405
1402
|
iconType: t,
|
|
1406
1403
|
iconId: String(e)
|
|
1407
|
-
}),
|
|
1408
|
-
const { onClick: r } = t, n = W(
|
|
1404
|
+
}), Ci = Ve((t, e) => {
|
|
1405
|
+
const { onClick: r } = t, n = W(re), i = (s) => {
|
|
1409
1406
|
r(s);
|
|
1410
1407
|
};
|
|
1411
|
-
return /* @__PURE__ */ c("div", { ref: e, className: "univer-w-80", children:
|
|
1408
|
+
return /* @__PURE__ */ c("div", { ref: e, className: "univer-w-80", children: gr.map((s, o) => /* @__PURE__ */ F("div", { className: "univer-mb-3", children: [
|
|
1412
1409
|
/* @__PURE__ */ c("div", { className: "univer-mb-1 univer-text-sm", children: n.t(s.title) }),
|
|
1413
1410
|
/* @__PURE__ */ c("div", { className: "univer-flex univer-flex-wrap", children: s.group.map((d) => /* @__PURE__ */ c(
|
|
1414
1411
|
"div",
|
|
@@ -1439,8 +1436,8 @@ const Me = (t) => {
|
|
|
1439
1436
|
d.name
|
|
1440
1437
|
)) })
|
|
1441
1438
|
] }, o)) });
|
|
1442
|
-
}),
|
|
1443
|
-
const { onClick: e } = t, r =
|
|
1439
|
+
}), yi = (t) => {
|
|
1440
|
+
const { onClick: e } = t, r = J(() => {
|
|
1444
1441
|
const i = [];
|
|
1445
1442
|
for (const s in we) {
|
|
1446
1443
|
const o = we[s], d = s;
|
|
@@ -1456,14 +1453,14 @@ const Me = (t) => {
|
|
|
1456
1453
|
}, []), n = (i) => {
|
|
1457
1454
|
e(i.iconType, i.iconId);
|
|
1458
1455
|
};
|
|
1459
|
-
return /* @__PURE__ */
|
|
1460
|
-
/* @__PURE__ */
|
|
1456
|
+
return /* @__PURE__ */ F("div", { children: [
|
|
1457
|
+
/* @__PURE__ */ F(
|
|
1461
1458
|
"div",
|
|
1462
1459
|
{
|
|
1463
1460
|
className: "univer-mb-2.5 univer-flex univer-cursor-pointer univer-items-center univer-pl-1",
|
|
1464
|
-
onClick: () => n({ iconType:
|
|
1461
|
+
onClick: () => n({ iconType: pr, iconId: "" }),
|
|
1465
1462
|
children: [
|
|
1466
|
-
/* @__PURE__ */ c(
|
|
1463
|
+
/* @__PURE__ */ c(ot, { className: "univer-size-5" }),
|
|
1467
1464
|
/* @__PURE__ */ c("span", { className: "univer-ml-2", children: "无单元格图标" })
|
|
1468
1465
|
]
|
|
1469
1466
|
}
|
|
@@ -1489,8 +1486,8 @@ const Me = (t) => {
|
|
|
1489
1486
|
`${i.iconType}_${i.iconId}`
|
|
1490
1487
|
)) })
|
|
1491
1488
|
] });
|
|
1492
|
-
},
|
|
1493
|
-
const { onChange: e, configList: r, errorMap: n = {} } = t, i = W(
|
|
1489
|
+
}, bi = (t) => {
|
|
1490
|
+
const { onChange: e, configList: r, errorMap: n = {} } = t, i = W(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 = [
|
|
1494
1491
|
{ label: i.t(`sheet.cf.valueType.${A.num}`), value: A.num },
|
|
1495
1492
|
{ label: i.t(`sheet.cf.valueType.${A.percent}`), value: A.percent },
|
|
1496
1493
|
{ label: i.t(`sheet.cf.valueType.${A.percentile}`), value: A.percentile },
|
|
@@ -1499,24 +1496,24 @@ const Me = (t) => {
|
|
|
1499
1496
|
e([String(v), "value", "value"], h);
|
|
1500
1497
|
}, a = (h, v) => {
|
|
1501
1498
|
e([String(v), "operator"], h);
|
|
1502
|
-
const f =
|
|
1499
|
+
const f = gt(k.number, h);
|
|
1503
1500
|
d(f, v);
|
|
1504
1501
|
}, u = (h, v) => {
|
|
1505
1502
|
e([String(v), "value", "type"], h);
|
|
1506
|
-
const f = r[v], S =
|
|
1503
|
+
const f = r[v], S = gt(k.number, f.operator);
|
|
1507
1504
|
d(S, v);
|
|
1508
1505
|
};
|
|
1509
|
-
return
|
|
1510
|
-
const f = n[v], S =
|
|
1506
|
+
return J(() => r.map((h, v) => {
|
|
1507
|
+
const f = n[v], S = Xn(h.iconType, h.iconId), p = v === r.length - 1, T = v === 0, _ = r[v - 1], R = (_ == null ? void 0 : _.value.type) === A.formula ? i.t("sheet.cf.valueType.formula") : _ == null ? void 0 : _.value.value, E = (x, m) => {
|
|
1511
1508
|
const C = { ...h, iconId: m, iconType: x };
|
|
1512
1509
|
e([String(v)], C);
|
|
1513
1510
|
};
|
|
1514
|
-
return /* @__PURE__ */
|
|
1511
|
+
return /* @__PURE__ */ F(
|
|
1515
1512
|
"div",
|
|
1516
1513
|
{
|
|
1517
1514
|
className: v ? "univer-mt-6" : "univer-mt-3",
|
|
1518
1515
|
children: [
|
|
1519
|
-
/* @__PURE__ */
|
|
1516
|
+
/* @__PURE__ */ F(
|
|
1520
1517
|
"div",
|
|
1521
1518
|
{
|
|
1522
1519
|
className: `
|
|
@@ -1524,7 +1521,7 @@ const Me = (t) => {
|
|
|
1524
1521
|
univer-text-gray-600
|
|
1525
1522
|
`,
|
|
1526
1523
|
children: [
|
|
1527
|
-
/* @__PURE__ */
|
|
1524
|
+
/* @__PURE__ */ F(
|
|
1528
1525
|
"div",
|
|
1529
1526
|
{
|
|
1530
1527
|
className: "univer-w-[45%]",
|
|
@@ -1534,12 +1531,12 @@ const Me = (t) => {
|
|
|
1534
1531
|
]
|
|
1535
1532
|
}
|
|
1536
1533
|
),
|
|
1537
|
-
/* @__PURE__ */ c("div", { className: "univer-w-[45%]", children: /* @__PURE__ */
|
|
1534
|
+
/* @__PURE__ */ c("div", { className: "univer-w-[45%]", children: /* @__PURE__ */ F(Bt, { children: [
|
|
1538
1535
|
!T && !p && i.t("sheet.cf.iconSet.rule"),
|
|
1539
|
-
!T && !p && /* @__PURE__ */
|
|
1536
|
+
!T && !p && /* @__PURE__ */ F("span", { className: "univer-font-medium univer-text-gray-600", children: [
|
|
1540
1537
|
"(",
|
|
1541
1538
|
i.t("sheet.cf.iconSet.when"),
|
|
1542
|
-
i.t(`sheet.cf.symbol.${
|
|
1539
|
+
i.t(`sheet.cf.symbol.${Ht(_.operator)}`),
|
|
1543
1540
|
R,
|
|
1544
1541
|
p ? "" : ` ${i.t("sheet.cf.iconSet.and")} `,
|
|
1545
1542
|
")"
|
|
@@ -1548,39 +1545,38 @@ const Me = (t) => {
|
|
|
1548
1545
|
]
|
|
1549
1546
|
}
|
|
1550
1547
|
),
|
|
1551
|
-
/* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-items-center univer-justify-between univer-gap-4", children: [
|
|
1552
1549
|
/* @__PURE__ */ c("div", { className: "univer-flex univer-items-center", children: /* @__PURE__ */ c(
|
|
1553
|
-
|
|
1550
|
+
Zt,
|
|
1554
1551
|
{
|
|
1555
|
-
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(
|
|
1556
|
-
children: /* @__PURE__ */
|
|
1552
|
+
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(yi, { onClick: E, iconId: h.iconId, iconType: h.iconType }) }),
|
|
1553
|
+
children: /* @__PURE__ */ F(
|
|
1557
1554
|
"div",
|
|
1558
1555
|
{
|
|
1559
|
-
className: `
|
|
1556
|
+
className: X(`
|
|
1560
1557
|
univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center
|
|
1561
|
-
univer-justify-between univer-rounded-md univer-
|
|
1562
|
-
univer-
|
|
1563
|
-
univer-text-gray-600 univer-transition-all
|
|
1558
|
+
univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2
|
|
1559
|
+
univer-text-xs univer-text-gray-600 univer-transition-all
|
|
1564
1560
|
hover:univer-border-primary-600
|
|
1565
|
-
`,
|
|
1561
|
+
`, He),
|
|
1566
1562
|
children: [
|
|
1567
1563
|
S ? /* @__PURE__ */ c("img", { src: S, className: "univer-size-4", draggable: !1 }) : /* @__PURE__ */ c(
|
|
1568
|
-
|
|
1564
|
+
ot,
|
|
1569
1565
|
{
|
|
1570
1566
|
className: "univer-size-4"
|
|
1571
1567
|
}
|
|
1572
1568
|
),
|
|
1573
|
-
/* @__PURE__ */ c(
|
|
1569
|
+
/* @__PURE__ */ c(Vt, {})
|
|
1574
1570
|
]
|
|
1575
1571
|
}
|
|
1576
1572
|
)
|
|
1577
1573
|
}
|
|
1578
1574
|
) }),
|
|
1579
|
-
p ? /* @__PURE__ */
|
|
1575
|
+
p ? /* @__PURE__ */ F("div", { className: "univer-mt-0 univer-w-[45%] univer-text-sm univer-text-gray-600", children: [
|
|
1580
1576
|
i.t("sheet.cf.iconSet.rule"),
|
|
1581
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ F("span", { className: "univer-font-medium univer-text-gray-600", children: [
|
|
1582
1578
|
i.t("sheet.cf.iconSet.when"),
|
|
1583
|
-
i.t(`sheet.cf.symbol.${
|
|
1579
|
+
i.t(`sheet.cf.symbol.${Ht(_.operator)}`),
|
|
1584
1580
|
R,
|
|
1585
1581
|
p ? "" : ` ${i.t("sheet.cf.iconSet.and")} `
|
|
1586
1582
|
] })
|
|
@@ -1595,8 +1591,8 @@ const Me = (t) => {
|
|
|
1595
1591
|
}
|
|
1596
1592
|
)
|
|
1597
1593
|
] }),
|
|
1598
|
-
p ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */
|
|
1599
|
-
/* @__PURE__ */
|
|
1594
|
+
p ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ F(Bt, { children: [
|
|
1595
|
+
/* @__PURE__ */ F(
|
|
1600
1596
|
"div",
|
|
1601
1597
|
{
|
|
1602
1598
|
className: `
|
|
@@ -1609,7 +1605,7 @@ const Me = (t) => {
|
|
|
1609
1605
|
]
|
|
1610
1606
|
}
|
|
1611
1607
|
),
|
|
1612
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ F(
|
|
1613
1609
|
"div",
|
|
1614
1610
|
{
|
|
1615
1611
|
className: `
|
|
@@ -1628,7 +1624,7 @@ const Me = (t) => {
|
|
|
1628
1624
|
}
|
|
1629
1625
|
),
|
|
1630
1626
|
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
1631
|
-
|
|
1627
|
+
pi,
|
|
1632
1628
|
{
|
|
1633
1629
|
id: v,
|
|
1634
1630
|
type: h.value.type,
|
|
@@ -1648,9 +1644,9 @@ const Me = (t) => {
|
|
|
1648
1644
|
v
|
|
1649
1645
|
);
|
|
1650
1646
|
}), [r, n]);
|
|
1651
|
-
},
|
|
1647
|
+
}, Si = (t) => {
|
|
1652
1648
|
var x;
|
|
1653
|
-
const { interceptorManager: e } = t, r = ((x = t.rule) == null ? void 0 : x.type) === U.iconSet ? t.rule : void 0, n = W(
|
|
1649
|
+
const { interceptorManager: e } = t, r = ((x = t.rule) == null ? void 0 : x.type) === U.iconSet ? t.rule : void 0, n = W(re), [i, s] = N({}), [o, d] = N(() => {
|
|
1654
1650
|
const m = Object.keys(we)[0];
|
|
1655
1651
|
if (r && r.config.length) {
|
|
1656
1652
|
const C = r.config[0].iconType;
|
|
@@ -1660,16 +1656,16 @@ const Me = (t) => {
|
|
|
1660
1656
|
return m;
|
|
1661
1657
|
}), [a, u] = N(() => {
|
|
1662
1658
|
if (r && r.config.length)
|
|
1663
|
-
return
|
|
1659
|
+
return Wt.deepClone(r == null ? void 0 : r.config);
|
|
1664
1660
|
const m = we[o] || [];
|
|
1665
1661
|
return new Array(m.length).fill("").map((C, b, y) => b === y.length - 1 ? {
|
|
1666
1662
|
operator: P.lessThanOrEqual,
|
|
1667
1663
|
value: { type: A.num, value: Number.MAX_SAFE_INTEGER },
|
|
1668
1664
|
iconType: o,
|
|
1669
1665
|
iconId: String(b)
|
|
1670
|
-
} :
|
|
1671
|
-
}), [l, h] = N(() => r ? !!r.isShowValue : !0), v =
|
|
1672
|
-
const m = a.map((C) =>
|
|
1666
|
+
} : ln(o, b, y));
|
|
1667
|
+
}), [l, h] = N(() => r ? !!r.isShowValue : !0), v = J(() => {
|
|
1668
|
+
const m = a.map((C) => Xn(C.iconType, C.iconId));
|
|
1673
1669
|
return /* @__PURE__ */ c("div", { className: "univer-flex univer-items-center", children: m.map((C, b) => C ? /* @__PURE__ */ c(
|
|
1674
1670
|
"img",
|
|
1675
1671
|
{
|
|
@@ -1677,7 +1673,7 @@ const Me = (t) => {
|
|
|
1677
1673
|
src: C
|
|
1678
1674
|
},
|
|
1679
1675
|
b
|
|
1680
|
-
) : /* @__PURE__ */ c(
|
|
1676
|
+
) : /* @__PURE__ */ c(ot, { className: "univer-size-5" }, b)) });
|
|
1681
1677
|
}, [a]), f = (m) => {
|
|
1682
1678
|
if (m.reduce((b, y, M) => b.preType && !b.result || m.length - 1 === M ? b : y.value.type === A.formula ? {
|
|
1683
1679
|
preType: A.formula,
|
|
@@ -1693,16 +1689,16 @@ const Me = (t) => {
|
|
|
1693
1689
|
return m.forEach((y, M, w) => {
|
|
1694
1690
|
if (M - 1 < 0 || M === w.length - 1)
|
|
1695
1691
|
return;
|
|
1696
|
-
const L = m[M - 1], g =
|
|
1697
|
-
|
|
1692
|
+
const L = m[M - 1], g = Ht(L.operator);
|
|
1693
|
+
fr({ operator: g, value: L.value.value }, y.value.value) || (b[M] = `${n.t(`sheet.cf.form.${g}`, String(L.value.value))} `);
|
|
1698
1694
|
}), b;
|
|
1699
1695
|
}
|
|
1700
1696
|
return {};
|
|
1701
1697
|
}, S = (m, C) => {
|
|
1702
|
-
|
|
1698
|
+
sr(a, m) !== C && (or(a, m, C), u([...a]), s(f(a)));
|
|
1703
1699
|
}, p = (m) => {
|
|
1704
1700
|
d(m);
|
|
1705
|
-
const C = we[m] || [], b = new Array(C.length).fill("").map((y, M, w) =>
|
|
1701
|
+
const C = we[m] || [], b = new Array(C.length).fill("").map((y, M, w) => ln(m, M, w));
|
|
1706
1702
|
u(b), s(f(b));
|
|
1707
1703
|
};
|
|
1708
1704
|
K(() => {
|
|
@@ -1730,14 +1726,14 @@ const Me = (t) => {
|
|
|
1730
1726
|
const y = a.length - 1 - b, M = m[y];
|
|
1731
1727
|
C.iconId = M.iconId, C.iconType = M.iconType;
|
|
1732
1728
|
}), u([...a]);
|
|
1733
|
-
}, _ = W(
|
|
1734
|
-
return
|
|
1729
|
+
}, _ = W(Lr), [R, E] = N();
|
|
1730
|
+
return Ar(R, _.rootContainerElement), /* @__PURE__ */ F("div", { children: [
|
|
1735
1731
|
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: n.t("sheet.cf.panel.styleRule") }),
|
|
1736
1732
|
/* @__PURE__ */ c("div", { className: "univer-mt-3", children: /* @__PURE__ */ c(
|
|
1737
|
-
|
|
1733
|
+
Zt,
|
|
1738
1734
|
{
|
|
1739
1735
|
overlay: /* @__PURE__ */ c("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ c(
|
|
1740
|
-
|
|
1736
|
+
Ci,
|
|
1741
1737
|
{
|
|
1742
1738
|
ref: (m) => {
|
|
1743
1739
|
!R && m && E(m);
|
|
@@ -1746,50 +1742,49 @@ const Me = (t) => {
|
|
|
1746
1742
|
onClick: p
|
|
1747
1743
|
}
|
|
1748
1744
|
) }),
|
|
1749
|
-
children: /* @__PURE__ */
|
|
1745
|
+
children: /* @__PURE__ */ F(
|
|
1750
1746
|
"div",
|
|
1751
1747
|
{
|
|
1752
|
-
className:
|
|
1748
|
+
className: X(`
|
|
1753
1749
|
univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center
|
|
1754
|
-
univer-justify-between univer-rounded-md univer-
|
|
1755
|
-
univer-
|
|
1756
|
-
univer-text-gray-600 univer-transition-all
|
|
1750
|
+
univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2
|
|
1751
|
+
univer-text-xs univer-text-gray-600 univer-transition-all
|
|
1757
1752
|
hover:univer-border-primary-600
|
|
1758
|
-
|
|
1753
|
+
`, He),
|
|
1759
1754
|
children: [
|
|
1760
1755
|
v,
|
|
1761
|
-
/* @__PURE__ */ c(
|
|
1756
|
+
/* @__PURE__ */ c(Vt, {})
|
|
1762
1757
|
]
|
|
1763
1758
|
}
|
|
1764
1759
|
)
|
|
1765
1760
|
}
|
|
1766
1761
|
) }),
|
|
1767
|
-
/* @__PURE__ */
|
|
1768
|
-
/* @__PURE__ */
|
|
1769
|
-
/* @__PURE__ */ c(
|
|
1762
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-items-center univer-text-xs", children: [
|
|
1763
|
+
/* @__PURE__ */ F("div", { className: "univer-flex univer-items-center univer-text-xs", children: [
|
|
1764
|
+
/* @__PURE__ */ c(yt, { onChange: T }),
|
|
1770
1765
|
n.t("sheet.cf.iconSet.reverseIconOrder")
|
|
1771
1766
|
] }),
|
|
1772
|
-
/* @__PURE__ */
|
|
1773
|
-
/* @__PURE__ */ c(
|
|
1767
|
+
/* @__PURE__ */ F("div", { className: "univer-ml-6 univer-flex univer-items-center univer-text-xs", children: [
|
|
1768
|
+
/* @__PURE__ */ c(yt, { checked: !l, onChange: (m) => {
|
|
1774
1769
|
h(!m);
|
|
1775
1770
|
} }),
|
|
1776
1771
|
n.t("sheet.cf.iconSet.onlyShowIcon")
|
|
1777
1772
|
] })
|
|
1778
1773
|
] }),
|
|
1779
|
-
/* @__PURE__ */ c(
|
|
1774
|
+
/* @__PURE__ */ c(bi, { errorMap: i, onChange: S, configList: a })
|
|
1780
1775
|
] });
|
|
1781
|
-
},
|
|
1776
|
+
}, Ii = (t) => {
|
|
1782
1777
|
var T;
|
|
1783
|
-
const { onChange: e, interceptorManager: r } = t, n = W(
|
|
1778
|
+
const { onChange: e, interceptorManager: r } = t, n = W(re), i = ((T = t.rule) == null ? void 0 : T.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(() => {
|
|
1784
1779
|
const _ = s[0].value, R = i == null ? void 0 : i.type;
|
|
1785
1780
|
if (!i)
|
|
1786
1781
|
return _;
|
|
1787
1782
|
switch (R) {
|
|
1788
1783
|
case U.highlightCell:
|
|
1789
1784
|
switch (i.subType) {
|
|
1790
|
-
case
|
|
1785
|
+
case k.average:
|
|
1791
1786
|
return [P.greaterThan, P.greaterThanOrEqual].includes(i.operator) ? "greaterThanAverage" : [P.lessThan, P.lessThanOrEqual].includes(i.operator) ? "lessThanAverage" : _;
|
|
1792
|
-
case
|
|
1787
|
+
case k.rank:
|
|
1793
1788
|
return i.isBottom ? "isBottom" : "isNotBottom";
|
|
1794
1789
|
}
|
|
1795
1790
|
}
|
|
@@ -1801,7 +1796,7 @@ const Me = (t) => {
|
|
|
1801
1796
|
switch (R) {
|
|
1802
1797
|
case U.highlightCell:
|
|
1803
1798
|
switch (i.subType) {
|
|
1804
|
-
case
|
|
1799
|
+
case k.rank:
|
|
1805
1800
|
return i.value || 10;
|
|
1806
1801
|
}
|
|
1807
1802
|
}
|
|
@@ -1813,7 +1808,7 @@ const Me = (t) => {
|
|
|
1813
1808
|
switch (R) {
|
|
1814
1809
|
case U.highlightCell:
|
|
1815
1810
|
switch (i.subType) {
|
|
1816
|
-
case
|
|
1811
|
+
case k.rank:
|
|
1817
1812
|
return i.isPercent || !1;
|
|
1818
1813
|
}
|
|
1819
1814
|
}
|
|
@@ -1821,13 +1816,13 @@ const Me = (t) => {
|
|
|
1821
1816
|
}), [v, f] = N({}), S = (_) => {
|
|
1822
1817
|
const { type: R, isPercent: E, value: x, style: m } = _;
|
|
1823
1818
|
if (R === "isNotBottom")
|
|
1824
|
-
return { type: U.highlightCell, subType:
|
|
1819
|
+
return { type: U.highlightCell, subType: k.rank, isPercent: E, isBottom: !1, value: x, style: m };
|
|
1825
1820
|
if (R === "isBottom")
|
|
1826
|
-
return { type: U.highlightCell, subType:
|
|
1821
|
+
return { type: U.highlightCell, subType: k.rank, isPercent: E, isBottom: !0, value: x, style: m };
|
|
1827
1822
|
if (R === "greaterThanAverage")
|
|
1828
|
-
return { type: U.highlightCell, subType:
|
|
1823
|
+
return { type: U.highlightCell, subType: k.average, operator: P.greaterThan, style: m };
|
|
1829
1824
|
if (R === "lessThanAverage")
|
|
1830
|
-
return { type: U.highlightCell, subType:
|
|
1825
|
+
return { type: U.highlightCell, subType: k.average, operator: P.lessThan, style: m };
|
|
1831
1826
|
};
|
|
1832
1827
|
K(() => r.intercept(r.getInterceptPoints().submit, {
|
|
1833
1828
|
handler() {
|
|
@@ -1837,7 +1832,7 @@ const Me = (t) => {
|
|
|
1837
1832
|
const p = (_) => {
|
|
1838
1833
|
e(S(_));
|
|
1839
1834
|
};
|
|
1840
|
-
return /* @__PURE__ */
|
|
1835
|
+
return /* @__PURE__ */ F("div", { children: [
|
|
1841
1836
|
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: n.t("sheet.cf.panel.styleRule") }),
|
|
1842
1837
|
/* @__PURE__ */ c(
|
|
1843
1838
|
le,
|
|
@@ -1850,7 +1845,7 @@ const Me = (t) => {
|
|
|
1850
1845
|
}
|
|
1851
1846
|
}
|
|
1852
1847
|
),
|
|
1853
|
-
["isNotBottom", "isBottom"].includes(o) && /* @__PURE__ */
|
|
1848
|
+
["isNotBottom", "isBottom"].includes(o) && /* @__PURE__ */ F("div", { className: "univer-mt-3 univer-flex univer-items-center", children: [
|
|
1854
1849
|
/* @__PURE__ */ c(
|
|
1855
1850
|
Ne,
|
|
1856
1851
|
{
|
|
@@ -1863,13 +1858,13 @@ const Me = (t) => {
|
|
|
1863
1858
|
}
|
|
1864
1859
|
}
|
|
1865
1860
|
),
|
|
1866
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ F(
|
|
1867
1862
|
"div",
|
|
1868
1863
|
{
|
|
1869
1864
|
className: "univer-ml-3 univer-flex univer-items-center univer-text-xs",
|
|
1870
1865
|
children: [
|
|
1871
1866
|
/* @__PURE__ */ c(
|
|
1872
|
-
|
|
1867
|
+
yt,
|
|
1873
1868
|
{
|
|
1874
1869
|
checked: l,
|
|
1875
1870
|
onChange: (_) => {
|
|
@@ -1882,9 +1877,9 @@ const Me = (t) => {
|
|
|
1882
1877
|
}
|
|
1883
1878
|
)
|
|
1884
1879
|
] }),
|
|
1885
|
-
/* @__PURE__ */ c("div", { className:
|
|
1880
|
+
/* @__PURE__ */ c("div", { className: at, children: /* @__PURE__ */ c(We, { rule: S({ type: o, isPercent: l, value: a, style: v }) }) }),
|
|
1886
1881
|
/* @__PURE__ */ c(
|
|
1887
|
-
|
|
1882
|
+
Yt,
|
|
1888
1883
|
{
|
|
1889
1884
|
style: i == null ? void 0 : i.style,
|
|
1890
1885
|
className: "univer-mt-3",
|
|
@@ -1894,16 +1889,16 @@ const Me = (t) => {
|
|
|
1894
1889
|
}
|
|
1895
1890
|
)
|
|
1896
1891
|
] });
|
|
1897
|
-
},
|
|
1892
|
+
}, _i = pn("beforeSubmit"), Ti = pn("submit"), cn = (t) => t.getCurrentUnitForType($.UNIVER_SHEET).getUnitId(), un = (t) => {
|
|
1898
1893
|
var e;
|
|
1899
1894
|
return (e = t.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
|
|
1900
|
-
},
|
|
1895
|
+
}, Ri = (t) => {
|
|
1901
1896
|
var b, y, M;
|
|
1902
|
-
const e = W(
|
|
1897
|
+
const e = W(re), r = W(te), n = W(z), i = W(Q), s = W($e), o = cn(n), d = un(n), [a, u] = N(void 0), l = de((y = (b = t.rule) == null ? void 0 : b.ranges) != null ? y : []), h = J(() => {
|
|
1903
1898
|
var V, L, g;
|
|
1904
1899
|
let w = (V = t.rule) == null ? void 0 : V.ranges;
|
|
1905
1900
|
return w != null && w.length || (w = (g = (L = s.getCurrentSelections()) == null ? void 0 : L.map((I) => I.range)) != null ? g : []), l.current = w, w != null && w.length ? w.map((I) => {
|
|
1906
|
-
const H =
|
|
1901
|
+
const H = Un(I);
|
|
1907
1902
|
return H === "NaN" ? "" : H;
|
|
1908
1903
|
}).filter((I) => !!I).join(",") : "";
|
|
1909
1904
|
}, [t.rule]), v = [
|
|
@@ -1921,16 +1916,16 @@ const Me = (t) => {
|
|
|
1921
1916
|
switch (w) {
|
|
1922
1917
|
case U.highlightCell: {
|
|
1923
1918
|
switch ((g = t.rule) == null ? void 0 : g.rule.subType) {
|
|
1924
|
-
case
|
|
1925
|
-
case
|
|
1926
|
-
case
|
|
1927
|
-
case
|
|
1928
|
-
case
|
|
1919
|
+
case k.number:
|
|
1920
|
+
case k.text:
|
|
1921
|
+
case k.duplicateValues:
|
|
1922
|
+
case k.uniqueValues:
|
|
1923
|
+
case k.timePeriod:
|
|
1929
1924
|
return "1";
|
|
1930
|
-
case
|
|
1931
|
-
case
|
|
1925
|
+
case k.average:
|
|
1926
|
+
case k.rank:
|
|
1932
1927
|
return "2";
|
|
1933
|
-
case
|
|
1928
|
+
case k.formula:
|
|
1934
1929
|
return "5";
|
|
1935
1930
|
}
|
|
1936
1931
|
break;
|
|
@@ -1943,38 +1938,38 @@ const Me = (t) => {
|
|
|
1943
1938
|
return "6";
|
|
1944
1939
|
}
|
|
1945
1940
|
return V;
|
|
1946
|
-
}), p = de(void 0), T =
|
|
1941
|
+
}), p = de(void 0), T = J(() => new ar({ beforeSubmit: _i, submit: Ti }), []), _ = J(() => {
|
|
1947
1942
|
switch (f) {
|
|
1948
1943
|
case "1":
|
|
1949
|
-
return
|
|
1944
|
+
return an;
|
|
1950
1945
|
case "2":
|
|
1951
|
-
return
|
|
1946
|
+
return Ii;
|
|
1952
1947
|
case "3":
|
|
1953
|
-
return
|
|
1948
|
+
return mi;
|
|
1954
1949
|
case "4":
|
|
1955
|
-
return
|
|
1950
|
+
return vi;
|
|
1956
1951
|
case "5":
|
|
1957
|
-
return
|
|
1952
|
+
return gi;
|
|
1958
1953
|
case "6":
|
|
1959
|
-
return
|
|
1954
|
+
return Si;
|
|
1960
1955
|
default:
|
|
1961
|
-
return
|
|
1956
|
+
return an;
|
|
1962
1957
|
}
|
|
1963
1958
|
}, [f]);
|
|
1964
1959
|
K(() => {
|
|
1965
1960
|
const w = r.onCommandExecuted((V) => {
|
|
1966
|
-
if (V.id ===
|
|
1961
|
+
if (V.id === Rr.id) {
|
|
1967
1962
|
const L = V.params;
|
|
1968
1963
|
L.subUnitId === d && L.unitId === o && t.onCancel();
|
|
1969
1964
|
}
|
|
1970
|
-
V.id ===
|
|
1965
|
+
V.id === qt.id && t.onCancel();
|
|
1971
1966
|
});
|
|
1972
1967
|
return () => w.dispose();
|
|
1973
1968
|
}, []);
|
|
1974
1969
|
const R = (w) => {
|
|
1975
1970
|
p.current = w;
|
|
1976
1971
|
}, E = (w) => {
|
|
1977
|
-
const V = w.split(",").filter((L) => !!L).map(
|
|
1972
|
+
const V = w.split(",").filter((L) => !!L).map(Zr).map((L) => L.range);
|
|
1978
1973
|
l.current = V;
|
|
1979
1974
|
}, x = () => {
|
|
1980
1975
|
if (a)
|
|
@@ -1983,16 +1978,16 @@ const Me = (t) => {
|
|
|
1983
1978
|
const g = n.getCurrentUnitForType($.UNIVER_SHEET).getActiveSheet();
|
|
1984
1979
|
if (!g)
|
|
1985
1980
|
throw new Error("No active sheet found");
|
|
1986
|
-
return l.current.map((Y) =>
|
|
1981
|
+
return l.current.map((Y) => xr(Y, g.getRowCount(), g.getColumnCount())).filter((Y) => !(Number.isNaN(Y.startRow) || Number.isNaN(Y.startColumn)));
|
|
1987
1982
|
})();
|
|
1988
1983
|
if (T.fetchThroughInterceptors(T.getInterceptPoints().beforeSubmit)(!0, null)) {
|
|
1989
1984
|
const g = T.fetchThroughInterceptors(T.getInterceptPoints().submit)(null, null);
|
|
1990
1985
|
if (g) {
|
|
1991
|
-
const I =
|
|
1986
|
+
const I = cn(n), H = un(n);
|
|
1992
1987
|
if (!I || !H)
|
|
1993
1988
|
throw new Error("No active sheet found");
|
|
1994
1989
|
let Y = {};
|
|
1995
|
-
t.rule && t.rule.cfId ? (Y = { ...t.rule, ranges: V, rule: g }, r.executeCommand(
|
|
1990
|
+
t.rule && t.rule.cfId ? (Y = { ...t.rule, ranges: V, rule: g }, r.executeCommand(Cr.id, { unitId: I, subUnitId: H, rule: Y }), t.onCancel()) : (Y = { cfId: i.createCfId(I, H), ranges: V, rule: g, stopIfTrue: !1 }, r.executeCommand(_n.id, { unitId: I, subUnitId: H, rule: Y }), t.onCancel());
|
|
1996
1991
|
}
|
|
1997
1992
|
}
|
|
1998
1993
|
}, m = () => {
|
|
@@ -2000,11 +1995,11 @@ const Me = (t) => {
|
|
|
2000
1995
|
}, C = (w, V) => {
|
|
2001
1996
|
w ? V.length < 1 ? u(e.t("sheet.cf.errorMessage.rangeError")) : u(void 0) : u(e.t("sheet.cf.errorMessage.rangeError"));
|
|
2002
1997
|
};
|
|
2003
|
-
return /* @__PURE__ */
|
|
1998
|
+
return /* @__PURE__ */ F("div", { children: [
|
|
2004
1999
|
/* @__PURE__ */ c("div", { className: "univer-mt-4 univer-text-sm univer-text-gray-600", children: e.t("sheet.cf.panel.range") }),
|
|
2005
|
-
/* @__PURE__ */
|
|
2000
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-4", children: [
|
|
2006
2001
|
/* @__PURE__ */ c(
|
|
2007
|
-
|
|
2002
|
+
Yr,
|
|
2008
2003
|
{
|
|
2009
2004
|
unitId: o,
|
|
2010
2005
|
subUnitId: d,
|
|
@@ -2033,17 +2028,17 @@ const Me = (t) => {
|
|
|
2033
2028
|
onChange: R
|
|
2034
2029
|
}
|
|
2035
2030
|
),
|
|
2036
|
-
/* @__PURE__ */
|
|
2037
|
-
/* @__PURE__ */ c(
|
|
2038
|
-
/* @__PURE__ */ c(
|
|
2031
|
+
/* @__PURE__ */ F("div", { className: "univer-mt-4 univer-flex univer-justify-end", children: [
|
|
2032
|
+
/* @__PURE__ */ c(Jt, { onClick: m, children: e.t("sheet.cf.panel.cancel") }),
|
|
2033
|
+
/* @__PURE__ */ c(Jt, { className: "univer-ml-3", variant: "primary", onClick: x, children: e.t("sheet.cf.panel.submit") })
|
|
2039
2034
|
] })
|
|
2040
2035
|
] });
|
|
2041
2036
|
};
|
|
2042
|
-
var
|
|
2043
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2037
|
+
var xi = Object.getOwnPropertyDescriptor, Ei = (t, e, r, n) => {
|
|
2038
|
+
for (var i = n > 1 ? void 0 : n ? xi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2044
2039
|
(o = t[s]) && (i = o(i) || i);
|
|
2045
2040
|
return i;
|
|
2046
|
-
},
|
|
2041
|
+
}, wi = (t, e) => (r, n) => e(r, n, t);
|
|
2047
2042
|
let De = class extends ce {
|
|
2048
2043
|
constructor(e) {
|
|
2049
2044
|
super();
|
|
@@ -2081,10 +2076,10 @@ let De = class extends ce {
|
|
|
2081
2076
|
return [];
|
|
2082
2077
|
}
|
|
2083
2078
|
};
|
|
2084
|
-
De =
|
|
2085
|
-
|
|
2079
|
+
De = Ei([
|
|
2080
|
+
wi(0, O(re))
|
|
2086
2081
|
], De);
|
|
2087
|
-
const
|
|
2082
|
+
const Ni = (t, e) => {
|
|
2088
2083
|
const r = t.rule;
|
|
2089
2084
|
switch (r.type) {
|
|
2090
2085
|
case U.colorScale:
|
|
@@ -2095,39 +2090,39 @@ const wi = (t, e) => {
|
|
|
2095
2090
|
return e.t("sheet.cf.ruleType.iconSet");
|
|
2096
2091
|
case U.highlightCell:
|
|
2097
2092
|
switch (r.subType) {
|
|
2098
|
-
case
|
|
2093
|
+
case k.average: {
|
|
2099
2094
|
const n = r.operator;
|
|
2100
2095
|
return e.t(`sheet.cf.preview.describe.${n}`, e.t("sheet.cf.subRuleType.average"));
|
|
2101
2096
|
}
|
|
2102
|
-
case
|
|
2097
|
+
case k.duplicateValues:
|
|
2103
2098
|
return e.t("sheet.cf.subRuleType.duplicateValues");
|
|
2104
|
-
case
|
|
2099
|
+
case k.uniqueValues:
|
|
2105
2100
|
return e.t("sheet.cf.subRuleType.uniqueValues");
|
|
2106
|
-
case
|
|
2101
|
+
case k.number: {
|
|
2107
2102
|
const n = r.operator;
|
|
2108
2103
|
return e.t(`sheet.cf.preview.describe.${n}`, ...Array.isArray(r.value) ? r.value.map((i) => String(i)) : [String(r.value || "")]);
|
|
2109
2104
|
}
|
|
2110
|
-
case
|
|
2105
|
+
case k.text: {
|
|
2111
2106
|
const n = r.operator;
|
|
2112
2107
|
return e.t(`sheet.cf.preview.describe.${n}`, r.value || "");
|
|
2113
2108
|
}
|
|
2114
|
-
case
|
|
2109
|
+
case k.timePeriod: {
|
|
2115
2110
|
const n = r.operator;
|
|
2116
2111
|
return e.t(`sheet.cf.preview.describe.${n}`);
|
|
2117
2112
|
}
|
|
2118
|
-
case
|
|
2113
|
+
case k.rank:
|
|
2119
2114
|
return r.isPercent ? r.isBottom ? e.t("sheet.cf.preview.describe.bottomNPercent", String(r.value)) : e.t("sheet.cf.preview.describe.topNPercent", String(r.value)) : r.isBottom ? e.t("sheet.cf.preview.describe.bottomN", String(r.value)) : e.t("sheet.cf.preview.describe.topN", String(r.value));
|
|
2120
|
-
case
|
|
2115
|
+
case k.formula:
|
|
2121
2116
|
return e.t("sheet.cf.ruleType.formula");
|
|
2122
2117
|
}
|
|
2123
2118
|
}
|
|
2124
2119
|
};
|
|
2125
|
-
let
|
|
2126
|
-
const
|
|
2127
|
-
const { onClick: e } = t, r = W(
|
|
2120
|
+
let dn = 0;
|
|
2121
|
+
const Mi = (t) => {
|
|
2122
|
+
const { onClick: e } = t, r = W(Q), n = W(z), i = W($e), s = W(te), o = W(re), d = W(ve), a = W(kn), u = W(De), l = Dr(() => n.getCurrentTypeOfUnit$($.UNIVER_SHEET), void 0, void 0, []), h = l.getUnitId(), v = l.getActiveSheet();
|
|
2128
2123
|
if (!v)
|
|
2129
2124
|
throw new Error("No active sheet found");
|
|
2130
|
-
const f = v.getSheetId(), [S, p] = N([]), [T, _] = N("2"), [R, E] = N(0), [x, m] = N(-1), [C, b] = N(
|
|
2125
|
+
const f = v.getSheetId(), [S, p] = N([]), [T, _] = N("2"), [R, E] = N(0), [x, m] = N(-1), [C, b] = N(dn), y = de(null), M = [
|
|
2131
2126
|
{ label: o.t("sheet.cf.panel.workSheet"), value: "2" },
|
|
2132
2127
|
{ label: o.t("sheet.cf.panel.selectedRange"), value: "1" }
|
|
2133
2128
|
], w = () => {
|
|
@@ -2139,14 +2134,14 @@ const Ni = (t) => {
|
|
|
2139
2134
|
if (!B)
|
|
2140
2135
|
return [];
|
|
2141
2136
|
const G = B.range;
|
|
2142
|
-
return D.filter((
|
|
2137
|
+
return D.filter((ee) => ee.ranges.some((ne) => fe.intersects(ne, G)));
|
|
2143
2138
|
} else if (T === "2")
|
|
2144
2139
|
return [...D];
|
|
2145
2140
|
return [];
|
|
2146
2141
|
}, [V, L] = N(w);
|
|
2147
|
-
|
|
2142
|
+
Kr(S), K(() => {
|
|
2148
2143
|
const D = s.onCommandExecuted((B) => {
|
|
2149
|
-
B.id ===
|
|
2144
|
+
B.id === qt.id && E(Math.random());
|
|
2150
2145
|
});
|
|
2151
2146
|
return () => D.dispose();
|
|
2152
2147
|
}), K(() => {
|
|
@@ -2155,12 +2150,12 @@ const Ni = (t) => {
|
|
|
2155
2150
|
if (T === "2")
|
|
2156
2151
|
return;
|
|
2157
2152
|
const D = new xe((B) => {
|
|
2158
|
-
const G = [
|
|
2159
|
-
const { id:
|
|
2160
|
-
G.includes(
|
|
2153
|
+
const G = [Er.id, se.id, be.id, Se.id, Tn.id], Z = s.onCommandExecuted((ee) => {
|
|
2154
|
+
const { id: ne, params: Ie } = ee, _e = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId();
|
|
2155
|
+
G.includes(ne) && Ie.unitId === _e && B.next(null);
|
|
2161
2156
|
});
|
|
2162
2157
|
return () => Z.dispose();
|
|
2163
|
-
}).pipe(
|
|
2158
|
+
}).pipe(tn(16)).subscribe(() => {
|
|
2164
2159
|
L(w);
|
|
2165
2160
|
});
|
|
2166
2161
|
return () => {
|
|
@@ -2173,25 +2168,25 @@ const Ni = (t) => {
|
|
|
2173
2168
|
return () => D.unsubscribe();
|
|
2174
2169
|
}, [r]), K(() => {
|
|
2175
2170
|
const D = () => {
|
|
2176
|
-
var
|
|
2177
|
-
const Z = Math.max(0, ((
|
|
2178
|
-
return
|
|
2171
|
+
var ee, ne;
|
|
2172
|
+
const Z = Math.max(0, ((ne = (ee = y.current) == null ? void 0 : ee.getBoundingClientRect().width) != null ? ne : 0) - 8);
|
|
2173
|
+
return dn = Z, Z;
|
|
2179
2174
|
}, G = new xe((Z) => {
|
|
2180
|
-
const
|
|
2181
|
-
if (
|
|
2182
|
-
let
|
|
2175
|
+
const ee = a.getContainer();
|
|
2176
|
+
if (ee) {
|
|
2177
|
+
let ne = setTimeout(() => {
|
|
2183
2178
|
Z.next();
|
|
2184
2179
|
}, 150);
|
|
2185
2180
|
const Ie = () => {
|
|
2186
|
-
|
|
2187
|
-
}, _e = (
|
|
2188
|
-
|
|
2181
|
+
ne && clearTimeout(ne), ne = null;
|
|
2182
|
+
}, _e = (lt) => {
|
|
2183
|
+
lt.propertyName === "width" && (Ie(), Z.next());
|
|
2189
2184
|
};
|
|
2190
|
-
return
|
|
2191
|
-
Ie(),
|
|
2185
|
+
return ee.addEventListener("transitionend", _e), () => {
|
|
2186
|
+
Ie(), ee.removeEventListener("transitionend", _e);
|
|
2192
2187
|
};
|
|
2193
2188
|
}
|
|
2194
|
-
}).pipe(
|
|
2189
|
+
}).pipe(tn(16)).subscribe(() => {
|
|
2195
2190
|
b(D());
|
|
2196
2191
|
});
|
|
2197
2192
|
return () => {
|
|
@@ -2203,41 +2198,41 @@ const Ni = (t) => {
|
|
|
2203
2198
|
const B = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId(), G = (Z = n.getCurrentUnitOfType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : Z.getSheetId();
|
|
2204
2199
|
if (!B || !G)
|
|
2205
2200
|
throw new Error("No active sheet found");
|
|
2206
|
-
s.executeCommand(
|
|
2201
|
+
s.executeCommand(Kt.id, { unitId: B, subUnitId: G, cfId: D.cfId });
|
|
2207
2202
|
}, I = (D, B) => {
|
|
2208
2203
|
m(B.y);
|
|
2209
2204
|
}, H = (D, B, G) => {
|
|
2210
|
-
var
|
|
2205
|
+
var lt;
|
|
2211
2206
|
m(-1);
|
|
2212
|
-
const Z = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId(),
|
|
2213
|
-
if (!Z || !
|
|
2207
|
+
const Z = n.getCurrentUnitOfType($.UNIVER_SHEET).getUnitId(), ee = (lt = n.getCurrentUnitOfType($.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : lt.getSheetId();
|
|
2208
|
+
if (!Z || !ee)
|
|
2214
2209
|
throw new Error("No active sheet found");
|
|
2215
|
-
const
|
|
2216
|
-
const
|
|
2217
|
-
return Math.min(
|
|
2218
|
-
}, Ie = V[
|
|
2219
|
-
Ie !== _e && s.executeCommand(
|
|
2210
|
+
const ne = (tr) => {
|
|
2211
|
+
const nr = V.length;
|
|
2212
|
+
return Math.min(nr - 1, Math.max(0, tr));
|
|
2213
|
+
}, Ie = V[ne(B.y)].cfId, _e = V[ne(G.y)].cfId;
|
|
2214
|
+
Ie !== _e && s.executeCommand(yr.id, { unitId: Z, subUnitId: ee, start: { id: Ie, type: "self" }, end: { id: _e, type: G.y > B.y ? "after" : "before" } });
|
|
2220
2215
|
}, Y = () => {
|
|
2221
2216
|
t.onCreate();
|
|
2222
2217
|
}, me = () => {
|
|
2223
|
-
T === "2" ? s.executeCommand(
|
|
2224
|
-
s.executeCommand(
|
|
2218
|
+
T === "2" ? s.executeCommand(Rn.id) : T === "1" && V.map((B) => ({ unitId: h, subUnitId: f, cfId: B.cfId })).forEach((B) => {
|
|
2219
|
+
s.executeCommand(Kt.id, B);
|
|
2225
2220
|
});
|
|
2226
|
-
}, ge =
|
|
2221
|
+
}, ge = J(() => {
|
|
2227
2222
|
const D = n.getCurrentUnitOfType($.UNIVER_SHEET), B = D.getActiveSheet();
|
|
2228
2223
|
return V.filter((G) => {
|
|
2229
2224
|
const Z = G.ranges;
|
|
2230
|
-
return
|
|
2225
|
+
return ft(d, D.getUnitId(), B.getSheetId(), Z);
|
|
2231
2226
|
});
|
|
2232
|
-
}, [V]),
|
|
2227
|
+
}, [V]), Fe = ge.map((D, B) => ({ i: D.cfId, x: 0, w: 12, y: B, h: 1, isResizable: !1 })), ke = J(() => {
|
|
2233
2228
|
const D = n.getCurrentUnitOfType($.UNIVER_SHEET), B = D.getActiveSheet();
|
|
2234
2229
|
return V.every((G) => {
|
|
2235
2230
|
const Z = G.ranges;
|
|
2236
|
-
return
|
|
2231
|
+
return ft(d, D.getUnitId(), B.getSheetId(), Z);
|
|
2237
2232
|
});
|
|
2238
2233
|
}, [V]);
|
|
2239
|
-
return /* @__PURE__ */
|
|
2240
|
-
/* @__PURE__ */
|
|
2234
|
+
return /* @__PURE__ */ F("div", { children: [
|
|
2235
|
+
/* @__PURE__ */ F("div", { className: "univer-flex univer-items-center univer-justify-between univer-gap-2 univer-text-sm", children: [
|
|
2241
2236
|
/* @__PURE__ */ c("div", { className: "univer-flex univer-items-center univer-gap-2", children: u.tWithReactNode(
|
|
2242
2237
|
"sheet.cf.panel.managerRuleSelect",
|
|
2243
2238
|
/* @__PURE__ */ c(
|
|
@@ -2252,44 +2247,44 @@ const Ni = (t) => {
|
|
|
2252
2247
|
}
|
|
2253
2248
|
)
|
|
2254
2249
|
).map((D, B) => /* @__PURE__ */ c("span", { children: D }, B)) }),
|
|
2255
|
-
/* @__PURE__ */
|
|
2256
|
-
/* @__PURE__ */ c(
|
|
2250
|
+
/* @__PURE__ */ F("div", { className: "univer-flex univer-justify-end", children: [
|
|
2251
|
+
/* @__PURE__ */ c(Qt, { title: o.t("sheet.cf.panel.createRule"), placement: "bottom", children: /* @__PURE__ */ c(
|
|
2257
2252
|
"a",
|
|
2258
2253
|
{
|
|
2259
2254
|
className: "univer-size-5 univer-cursor-pointer",
|
|
2260
2255
|
onClick: Y,
|
|
2261
|
-
children: /* @__PURE__ */ c(
|
|
2256
|
+
children: /* @__PURE__ */ c(Yn, {})
|
|
2262
2257
|
}
|
|
2263
2258
|
) }),
|
|
2264
|
-
V.length &&
|
|
2259
|
+
V.length && ke ? /* @__PURE__ */ c(Qt, { title: o.t("sheet.cf.panel.clear"), placement: "bottom", children: /* @__PURE__ */ c(
|
|
2265
2260
|
"a",
|
|
2266
2261
|
{
|
|
2267
2262
|
className: "univer-size-5 univer-cursor-pointer",
|
|
2268
2263
|
onClick: me,
|
|
2269
|
-
children: /* @__PURE__ */ c(
|
|
2264
|
+
children: /* @__PURE__ */ c(mt, { className: "univer-text-red-500" })
|
|
2270
2265
|
}
|
|
2271
|
-
) }) : /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
2266
|
+
) }) : /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(mt, { className: "univer-text-gray-300" }) })
|
|
2272
2267
|
] })
|
|
2273
2268
|
] }),
|
|
2274
2269
|
/* @__PURE__ */ c("div", { ref: y, children: C > 0 && /* @__PURE__ */ c(
|
|
2275
|
-
|
|
2270
|
+
zr,
|
|
2276
2271
|
{
|
|
2277
2272
|
className: `
|
|
2278
2273
|
[&_.react-grid-item]:univer-transition-none
|
|
2279
2274
|
[&_.react-grid-placeholder]:univer-rounded [&_.react-grid-placeholder]:!univer-bg-gray-200
|
|
2280
2275
|
`,
|
|
2281
2276
|
draggableHandle: ".draggableHandle",
|
|
2282
|
-
layout:
|
|
2277
|
+
layout: Fe,
|
|
2283
2278
|
cols: 12,
|
|
2284
2279
|
rowHeight: 60,
|
|
2285
2280
|
width: C,
|
|
2286
2281
|
margin: [0, 10],
|
|
2287
2282
|
onDragStop: H,
|
|
2288
2283
|
onDragStart: I,
|
|
2289
|
-
children: ge == null ? void 0 : ge.map((D, B) => /* @__PURE__ */ c("div", { children: /* @__PURE__ */
|
|
2284
|
+
children: ge == null ? void 0 : ge.map((D, B) => /* @__PURE__ */ c("div", { children: /* @__PURE__ */ F(
|
|
2290
2285
|
"div",
|
|
2291
2286
|
{
|
|
2292
|
-
className:
|
|
2287
|
+
className: X(`
|
|
2293
2288
|
univer-group univer-relative univer-flex univer-items-center
|
|
2294
2289
|
univer-justify-between univer-rounded univer-py-2 univer-pl-5 univer-pr-8
|
|
2295
2290
|
hover:univer-bg-gray-100
|
|
@@ -2307,33 +2302,33 @@ const Ni = (t) => {
|
|
|
2307
2302
|
/* @__PURE__ */ c(
|
|
2308
2303
|
"div",
|
|
2309
2304
|
{
|
|
2310
|
-
className:
|
|
2305
|
+
className: X(`
|
|
2311
2306
|
univer-absolute univer-left-0 univer-hidden univer-size-5
|
|
2312
2307
|
univer-cursor-grab univer-items-center univer-justify-center
|
|
2313
2308
|
univer-rounded
|
|
2314
2309
|
group-hover:univer-flex
|
|
2315
2310
|
`, "draggableHandle"),
|
|
2316
2311
|
onClick: (G) => G.stopPropagation(),
|
|
2317
|
-
children: /* @__PURE__ */ c(
|
|
2312
|
+
children: /* @__PURE__ */ c(Kn, {})
|
|
2318
2313
|
}
|
|
2319
2314
|
),
|
|
2320
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ F(
|
|
2321
2316
|
"div",
|
|
2322
2317
|
{
|
|
2323
2318
|
className: `
|
|
2324
2319
|
univer-min-w-0 univer-max-w-full univer-flex-shrink univer-overflow-hidden
|
|
2325
2320
|
`,
|
|
2326
2321
|
children: [
|
|
2327
|
-
/* @__PURE__ */ c("div", { className: "univer-text-sm univer-text-gray-900", children:
|
|
2328
|
-
/* @__PURE__ */ c("div", { className: "univer-text-xs univer-text-gray-400", children: D.ranges.map((G) =>
|
|
2322
|
+
/* @__PURE__ */ c("div", { className: "univer-text-sm univer-text-gray-900", children: Ni(D, o) }),
|
|
2323
|
+
/* @__PURE__ */ c("div", { className: "univer-text-xs univer-text-gray-400", children: D.ranges.map((G) => Un(G)).join(",") })
|
|
2329
2324
|
]
|
|
2330
2325
|
}
|
|
2331
2326
|
),
|
|
2332
|
-
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
2327
|
+
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(We, { rule: D.rule }) }),
|
|
2333
2328
|
/* @__PURE__ */ c(
|
|
2334
2329
|
"div",
|
|
2335
2330
|
{
|
|
2336
|
-
className:
|
|
2331
|
+
className: X(`
|
|
2337
2332
|
univer-absolute univer-right-1 univer-hidden univer-size-6
|
|
2338
2333
|
univer-cursor-pointer univer-items-center univer-justify-center
|
|
2339
2334
|
univer-rounded
|
|
@@ -2345,7 +2340,7 @@ const Ni = (t) => {
|
|
|
2345
2340
|
onClick: (G) => {
|
|
2346
2341
|
G.stopPropagation(), g(D), p([]);
|
|
2347
2342
|
},
|
|
2348
|
-
children: /* @__PURE__ */ c(
|
|
2343
|
+
children: /* @__PURE__ */ c(mt, {})
|
|
2349
2344
|
}
|
|
2350
2345
|
)
|
|
2351
2346
|
]
|
|
@@ -2354,23 +2349,23 @@ const Ni = (t) => {
|
|
|
2354
2349
|
}
|
|
2355
2350
|
) })
|
|
2356
2351
|
] });
|
|
2357
|
-
},
|
|
2352
|
+
}, Vi = (t) => {
|
|
2358
2353
|
const [e, r] = N(t.rule), [n, i] = N(!!t.rule);
|
|
2359
|
-
return /* @__PURE__ */ c("div", { className: "univer-flex univer-h-full univer-flex-col univer-justify-between", children: n ? /* @__PURE__ */ c(
|
|
2354
|
+
return /* @__PURE__ */ c("div", { className: "univer-flex univer-h-full univer-flex-col univer-justify-between", children: n ? /* @__PURE__ */ c(Ri, { onCancel: () => {
|
|
2360
2355
|
i(!1), r(void 0);
|
|
2361
|
-
}, rule: e }) : /* @__PURE__ */ c(
|
|
2356
|
+
}, rule: e }) : /* @__PURE__ */ c(Mi, { onClick: (a) => {
|
|
2362
2357
|
r(a), i(!0);
|
|
2363
2358
|
}, onCreate: () => {
|
|
2364
2359
|
i(!0);
|
|
2365
2360
|
} }) });
|
|
2366
2361
|
};
|
|
2367
|
-
var
|
|
2368
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2362
|
+
var Fi = Object.getOwnPropertyDescriptor, ki = (t, e, r, n) => {
|
|
2363
|
+
for (var i = n > 1 ? void 0 : n ? Fi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2369
2364
|
(o = t[s]) && (i = o(i) || i);
|
|
2370
2365
|
return i;
|
|
2371
|
-
},
|
|
2372
|
-
const
|
|
2373
|
-
let
|
|
2366
|
+
}, qe = (t, e) => (r, n) => e(r, n, t);
|
|
2367
|
+
const ht = "sheet.conditional.formatting.panel";
|
|
2368
|
+
let Qe = class extends ce {
|
|
2374
2369
|
constructor(e, r, n, i, s) {
|
|
2375
2370
|
super();
|
|
2376
2371
|
ye(this, "_sidebarDisposable", null);
|
|
@@ -2380,42 +2375,42 @@ let Je = class extends ce {
|
|
|
2380
2375
|
o || (d = this._sidebarDisposable) == null || d.dispose();
|
|
2381
2376
|
})
|
|
2382
2377
|
), this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe((o) => {
|
|
2383
|
-
o.id ===
|
|
2378
|
+
o.id === ht && (o.visible || setTimeout(() => {
|
|
2384
2379
|
this._sidebarService.sidebarOptions$.next({ visible: !1 });
|
|
2385
2380
|
}));
|
|
2386
2381
|
}));
|
|
2387
2382
|
}
|
|
2388
2383
|
openPanel(e) {
|
|
2389
2384
|
const r = {
|
|
2390
|
-
id:
|
|
2385
|
+
id: ht,
|
|
2391
2386
|
header: { title: this._localeService.t("sheet.cf.title") },
|
|
2392
2387
|
children: {
|
|
2393
|
-
label:
|
|
2388
|
+
label: ht,
|
|
2394
2389
|
rule: e,
|
|
2395
|
-
key:
|
|
2390
|
+
key: lr(4)
|
|
2396
2391
|
},
|
|
2397
2392
|
onClose: () => this._sidebarDisposable = null
|
|
2398
2393
|
};
|
|
2399
2394
|
this._sidebarDisposable = this._sidebarService.open(r);
|
|
2400
2395
|
}
|
|
2401
2396
|
_initPanel() {
|
|
2402
|
-
this._componentManager.register(
|
|
2397
|
+
this._componentManager.register(ht, Vi);
|
|
2403
2398
|
}
|
|
2404
2399
|
};
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
],
|
|
2412
|
-
var
|
|
2413
|
-
const
|
|
2400
|
+
Qe = ki([
|
|
2401
|
+
qe(0, z),
|
|
2402
|
+
qe(1, O(ve)),
|
|
2403
|
+
qe(2, O(zt)),
|
|
2404
|
+
qe(3, O(kn)),
|
|
2405
|
+
qe(4, O(re))
|
|
2406
|
+
], Qe);
|
|
2407
|
+
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 || {});
|
|
2408
|
+
const Ft = {
|
|
2414
2409
|
id: "sheet.operation.open.conditional.formatting.panel",
|
|
2415
2410
|
type: he.OPERATION,
|
|
2416
2411
|
handler: (t, e) => {
|
|
2417
2412
|
var d;
|
|
2418
|
-
const r = t.get(
|
|
2413
|
+
const r = t.get(Qe), n = t.get($e), i = t.get(te), s = ((d = n.getCurrentSelections()) == null ? void 0 : d.map((a) => a.range)) || [];
|
|
2419
2414
|
switch (e.value) {
|
|
2420
2415
|
case 3: {
|
|
2421
2416
|
r.openPanel({ ...Te(), ranges: s });
|
|
@@ -2427,7 +2422,7 @@ const Vt = {
|
|
|
2427
2422
|
ranges: s,
|
|
2428
2423
|
rule: {
|
|
2429
2424
|
type: U.highlightCell,
|
|
2430
|
-
subType:
|
|
2425
|
+
subType: k.rank
|
|
2431
2426
|
}
|
|
2432
2427
|
};
|
|
2433
2428
|
r.openPanel(a);
|
|
@@ -2439,7 +2434,7 @@ const Vt = {
|
|
|
2439
2434
|
ranges: s,
|
|
2440
2435
|
rule: {
|
|
2441
2436
|
type: U.highlightCell,
|
|
2442
|
-
subType:
|
|
2437
|
+
subType: k.formula,
|
|
2443
2438
|
value: "="
|
|
2444
2439
|
}
|
|
2445
2440
|
};
|
|
@@ -2492,23 +2487,23 @@ const Vt = {
|
|
|
2492
2487
|
break;
|
|
2493
2488
|
}
|
|
2494
2489
|
case 9: {
|
|
2495
|
-
i.executeCommand(
|
|
2490
|
+
i.executeCommand(br.id, { ranges: s });
|
|
2496
2491
|
break;
|
|
2497
2492
|
}
|
|
2498
2493
|
case 10: {
|
|
2499
|
-
i.executeCommand(
|
|
2494
|
+
i.executeCommand(Rn.id);
|
|
2500
2495
|
break;
|
|
2501
2496
|
}
|
|
2502
2497
|
}
|
|
2503
2498
|
return !0;
|
|
2504
2499
|
}
|
|
2505
2500
|
};
|
|
2506
|
-
var
|
|
2507
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2501
|
+
var Ui = Object.getOwnPropertyDescriptor, Pi = (t, e, r, n) => {
|
|
2502
|
+
for (var i = n > 1 ? void 0 : n ? Ui(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2508
2503
|
(o = t[s]) && (i = o(i) || i);
|
|
2509
2504
|
return i;
|
|
2510
|
-
},
|
|
2511
|
-
let
|
|
2505
|
+
}, Ge = (t, e) => (r, n) => e(r, n, t);
|
|
2506
|
+
let et = class extends ce {
|
|
2512
2507
|
constructor(e, r, n, i, s) {
|
|
2513
2508
|
super();
|
|
2514
2509
|
ye(this, "_copyInfo");
|
|
@@ -2517,10 +2512,10 @@ let Qe = class extends ce {
|
|
|
2517
2512
|
_initClipboardHook() {
|
|
2518
2513
|
this.disposeWithMe(
|
|
2519
2514
|
this._sheetClipboardService.addClipboardHook({
|
|
2520
|
-
id:
|
|
2515
|
+
id: st,
|
|
2521
2516
|
onBeforeCopy: (e, r, n) => this._collectConditionalRule(e, r, n),
|
|
2522
2517
|
onPasteCells: (e, r, n, i) => {
|
|
2523
|
-
const { copyType: s =
|
|
2518
|
+
const { copyType: s = en.COPY, pasteType: o } = i, { range: d } = e || {}, { range: a } = r;
|
|
2524
2519
|
return this._generateConditionalFormattingMutations(a, { copyType: s, pasteType: o, copyRange: d });
|
|
2525
2520
|
}
|
|
2526
2521
|
})
|
|
@@ -2536,7 +2531,7 @@ let Qe = class extends ce {
|
|
|
2536
2531
|
cfMap: s
|
|
2537
2532
|
}
|
|
2538
2533
|
};
|
|
2539
|
-
const o = this._injector.invoke((l) =>
|
|
2534
|
+
const o = this._injector.invoke((l) => wr(n, l, e, r));
|
|
2540
2535
|
if (!o)
|
|
2541
2536
|
return;
|
|
2542
2537
|
const { rows: d, cols: a } = o, u = /* @__PURE__ */ new Set();
|
|
@@ -2555,19 +2550,19 @@ let Qe = class extends ce {
|
|
|
2555
2550
|
const n = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET), i = n.getActiveSheet(), s = n.getUnitId();
|
|
2556
2551
|
if (!i) return { redos: [], undos: [] };
|
|
2557
2552
|
const o = i.getSheetId();
|
|
2558
|
-
if (r.copyType ===
|
|
2553
|
+
if (r.copyType === en.CUT)
|
|
2559
2554
|
return this._copyInfo = null, { redos: [], undos: [] };
|
|
2560
2555
|
if (!this._copyInfo || !r.copyRange)
|
|
2561
2556
|
return { redos: [], undos: [] };
|
|
2562
2557
|
if (![
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2558
|
+
Ut.SPECIAL_PASTE_FORMAT,
|
|
2559
|
+
Ut.DEFAULT_PASTE,
|
|
2560
|
+
Ut.SPECIAL_PASTE_BESIDES_BORDER
|
|
2566
2561
|
].includes(
|
|
2567
2562
|
r.pasteType
|
|
2568
2563
|
))
|
|
2569
2564
|
return { redos: [], undos: [] };
|
|
2570
|
-
const { ranges: [a, u], mapFunc: l } =
|
|
2565
|
+
const { ranges: [a, u], mapFunc: l } = Pn([r.copyRange, e]), h = Jr(a, u, !0), v = {};
|
|
2571
2566
|
pe.foreach(u, (m, C) => {
|
|
2572
2567
|
const { row: b, col: y } = l(m, C), M = this._conditionalFormattingViewModel.getCellCfs(s, o, b, y);
|
|
2573
2568
|
M && M.forEach((w) => {
|
|
@@ -2589,7 +2584,7 @@ let Qe = class extends ce {
|
|
|
2589
2584
|
const _ = {}, R = (m) => {
|
|
2590
2585
|
if (_[m])
|
|
2591
2586
|
return _[m];
|
|
2592
|
-
const C = S == null ? void 0 : S.cfMap[m], b = [...this._conditionalFormattingRuleModel.getSubunitRules(s, o) || [], ...p].find((y) =>
|
|
2587
|
+
const C = S == null ? void 0 : S.cfMap[m], b = [...this._conditionalFormattingRuleModel.getSubunitRules(s, o) || [], ...p].find((y) => Wt.diffValue(y.rule, C));
|
|
2593
2588
|
if (b)
|
|
2594
2589
|
return _[m] = b, b;
|
|
2595
2590
|
{
|
|
@@ -2628,7 +2623,7 @@ let Qe = class extends ce {
|
|
|
2628
2623
|
});
|
|
2629
2624
|
const E = [], x = [];
|
|
2630
2625
|
for (const m in v) {
|
|
2631
|
-
const C = v[m], b =
|
|
2626
|
+
const C = v[m], b = pt(Ct(C));
|
|
2632
2627
|
if (!b.length) {
|
|
2633
2628
|
const y = {
|
|
2634
2629
|
unitId: s,
|
|
@@ -2643,7 +2638,7 @@ let Qe = class extends ce {
|
|
|
2643
2638
|
subUnitId: o,
|
|
2644
2639
|
rule: { ...y, ranges: b }
|
|
2645
2640
|
};
|
|
2646
|
-
E.push({ id: se.id, params: M }), x.push(
|
|
2641
|
+
E.push({ id: se.id, params: M }), x.push(xn(this._injector, M));
|
|
2647
2642
|
} else {
|
|
2648
2643
|
const y = this._conditionalFormattingRuleModel.getRule(s, o, m);
|
|
2649
2644
|
if (!y)
|
|
@@ -2662,53 +2657,53 @@ let Qe = class extends ce {
|
|
|
2662
2657
|
};
|
|
2663
2658
|
}
|
|
2664
2659
|
};
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
],
|
|
2672
|
-
var
|
|
2673
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2660
|
+
et = Pi([
|
|
2661
|
+
Ge(0, O(Xr)),
|
|
2662
|
+
Ge(1, O(Q)),
|
|
2663
|
+
Ge(2, O(ve)),
|
|
2664
|
+
Ge(3, O(it)),
|
|
2665
|
+
Ge(4, O(z))
|
|
2666
|
+
], et);
|
|
2667
|
+
var Oi = Object.getOwnPropertyDescriptor, Li = (t, e, r, n) => {
|
|
2668
|
+
for (var i = n > 1 ? void 0 : n ? Oi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2674
2669
|
(o = t[s]) && (i = o(i) || i);
|
|
2675
2670
|
return i;
|
|
2676
|
-
},
|
|
2677
|
-
let
|
|
2671
|
+
}, At = (t, e) => (r, n) => e(r, n, t);
|
|
2672
|
+
let tt = class extends ce {
|
|
2678
2673
|
constructor(t, e, r) {
|
|
2679
2674
|
super(), this._localeService = t, this._commandService = e, this._sheetPermissionCheckController = r, this._commandExecutedListener();
|
|
2680
2675
|
}
|
|
2681
2676
|
_commandExecutedListener() {
|
|
2682
2677
|
this.disposeWithMe(
|
|
2683
2678
|
this._commandService.beforeCommandExecuted((t) => {
|
|
2684
|
-
t.id ===
|
|
2685
|
-
workbookTypes: [
|
|
2686
|
-
rangeTypes: [
|
|
2687
|
-
worksheetTypes: [
|
|
2679
|
+
t.id === _n.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
|
|
2680
|
+
workbookTypes: [Fn],
|
|
2681
|
+
rangeTypes: [Vn],
|
|
2682
|
+
worksheetTypes: [Nn, Mn]
|
|
2688
2683
|
}, t.params.rule.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
|
|
2689
2684
|
})
|
|
2690
2685
|
);
|
|
2691
2686
|
}
|
|
2692
2687
|
};
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
],
|
|
2698
|
-
var
|
|
2699
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2688
|
+
tt = Li([
|
|
2689
|
+
At(0, O(re)),
|
|
2690
|
+
At(1, te),
|
|
2691
|
+
At(2, O(Nr))
|
|
2692
|
+
], tt);
|
|
2693
|
+
var Ai = Object.getOwnPropertyDescriptor, Di = (t, e, r, n) => {
|
|
2694
|
+
for (var i = n > 1 ? void 0 : n ? Ai(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2700
2695
|
(o = t[s]) && (i = o(i) || i);
|
|
2701
2696
|
return i;
|
|
2702
|
-
},
|
|
2703
|
-
let
|
|
2697
|
+
}, vt = (t, e) => (r, n) => e(r, n, t);
|
|
2698
|
+
let nt = class extends ce {
|
|
2704
2699
|
constructor(t, e, r, n) {
|
|
2705
2700
|
super(), this._conditionalFormattingRuleModel = t, this._univerInstanceService = e, this._injector = r, this._refRangeService = n, this._initRefRange();
|
|
2706
2701
|
}
|
|
2707
2702
|
_initRefRange() {
|
|
2708
2703
|
const t = /* @__PURE__ */ new Map(), e = (n, i, s) => `${n}_${i}_${s}`, r = (n, i, s) => {
|
|
2709
2704
|
const o = (a) => {
|
|
2710
|
-
const u = [...s.ranges], l = u.map((v) =>
|
|
2711
|
-
if (
|
|
2705
|
+
const u = [...s.ranges], l = u.map((v) => Vr(v, a)).filter((v) => !!v);
|
|
2706
|
+
if (Sr(l, u))
|
|
2712
2707
|
return { redos: [], undos: [] };
|
|
2713
2708
|
if (l.length) {
|
|
2714
2709
|
const v = { unitId: n, subUnitId: i, rule: { ...s, ranges: l } }, f = [{ id: be.id, params: v }], S = Ae(this._injector, v);
|
|
@@ -2741,25 +2736,25 @@ let tt = class extends ce {
|
|
|
2741
2736
|
u && u(), r(n.unitId, n.subUnitId, n.rule);
|
|
2742
2737
|
}
|
|
2743
2738
|
}
|
|
2744
|
-
})), this.disposeWithMe(
|
|
2739
|
+
})), this.disposeWithMe(Cn(() => {
|
|
2745
2740
|
t.forEach((n) => {
|
|
2746
2741
|
n();
|
|
2747
2742
|
}), t.clear();
|
|
2748
2743
|
}));
|
|
2749
2744
|
}
|
|
2750
2745
|
};
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
],
|
|
2757
|
-
var
|
|
2758
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2746
|
+
nt = Di([
|
|
2747
|
+
vt(0, O(Q)),
|
|
2748
|
+
vt(1, O(z)),
|
|
2749
|
+
vt(2, O(ve)),
|
|
2750
|
+
vt(3, O(Mr))
|
|
2751
|
+
], nt);
|
|
2752
|
+
var $i = Object.getOwnPropertyDescriptor, ji = (t, e, r, n) => {
|
|
2753
|
+
for (var i = n > 1 ? void 0 : n ? $i(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2759
2754
|
(o = t[s]) && (i = o(i) || i);
|
|
2760
2755
|
return i;
|
|
2761
2756
|
}, Pe = (t, e) => (r, n) => e(r, n, t);
|
|
2762
|
-
let
|
|
2757
|
+
let rt = class extends ce {
|
|
2763
2758
|
constructor(e, r, n, i, s, o) {
|
|
2764
2759
|
super();
|
|
2765
2760
|
/**
|
|
@@ -2774,13 +2769,13 @@ let nt = class extends ce {
|
|
|
2774
2769
|
_markDirtySkeleton() {
|
|
2775
2770
|
var r, n, i;
|
|
2776
2771
|
const e = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET).getUnitId();
|
|
2777
|
-
(r = this._renderManagerService.getRenderById(e)) == null || r.with(
|
|
2772
|
+
(r = this._renderManagerService.getRenderById(e)) == null || r.with(On).reCalculate(), (i = (n = this._renderManagerService.getRenderById(e)) == null ? void 0 : n.mainComponent) == null || i.makeDirty();
|
|
2778
2773
|
}
|
|
2779
2774
|
_initSkeleton() {
|
|
2780
|
-
this.disposeWithMe(
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2775
|
+
this.disposeWithMe(Ln(this._conditionalFormattingRuleModel.$ruleChange, this._conditionalFormattingViewModel.markDirty$).pipe(
|
|
2776
|
+
ri(16),
|
|
2777
|
+
nn((e) => !!e.length),
|
|
2778
|
+
nn((e) => {
|
|
2784
2779
|
const r = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET);
|
|
2785
2780
|
if (!r) return !1;
|
|
2786
2781
|
const n = r.getActiveSheet();
|
|
@@ -2789,46 +2784,45 @@ let nt = class extends ce {
|
|
|
2789
2784
|
).subscribe(() => this._markDirtySkeleton()));
|
|
2790
2785
|
}
|
|
2791
2786
|
_initViewModelInterceptor() {
|
|
2792
|
-
this.disposeWithMe(this._sheetInterceptorService.intercept(
|
|
2793
|
-
effect:
|
|
2787
|
+
this.disposeWithMe(this._sheetInterceptorService.intercept(Fr.CELL_CONTENT, {
|
|
2788
|
+
effect: cr.Style,
|
|
2794
2789
|
handler: (e, r, n) => {
|
|
2795
2790
|
const i = this._conditionalFormattingService.composeStyle(r.unitId, r.subUnitId, r.row, r.col);
|
|
2796
2791
|
if (!i)
|
|
2797
2792
|
return n(e);
|
|
2798
2793
|
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 };
|
|
2799
|
-
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 =
|
|
2794
|
+
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 = Ir + _r), n(a);
|
|
2800
2795
|
},
|
|
2801
2796
|
priority: 10
|
|
2802
2797
|
}));
|
|
2803
2798
|
}
|
|
2804
2799
|
};
|
|
2805
|
-
|
|
2806
|
-
Pe(0, O(
|
|
2807
|
-
Pe(1, O(
|
|
2800
|
+
rt = ji([
|
|
2801
|
+
Pe(0, O(Gt)),
|
|
2802
|
+
Pe(1, O(En)),
|
|
2808
2803
|
Pe(2, O(z)),
|
|
2809
|
-
Pe(3, O(
|
|
2810
|
-
Pe(4, O(
|
|
2811
|
-
Pe(5, O(
|
|
2812
|
-
],
|
|
2813
|
-
const
|
|
2814
|
-
var
|
|
2815
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2804
|
+
Pe(3, O(An)),
|
|
2805
|
+
Pe(4, O(it)),
|
|
2806
|
+
Pe(5, O(Q))
|
|
2807
|
+
], rt);
|
|
2808
|
+
const Jn = "sheets-conditional-formatting-ui.config", bt = {};
|
|
2809
|
+
var Hi = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, Wi = (t, e, r) => e in t ? Hi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, qi = (t, e, r, n) => {
|
|
2810
|
+
for (var i = n > 1 ? void 0 : n ? Bi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2816
2811
|
(o = t[s]) && (i = o(i) || i);
|
|
2817
2812
|
return i;
|
|
2818
|
-
},
|
|
2819
|
-
let
|
|
2820
|
-
constructor(t =
|
|
2813
|
+
}, Dt = (t, e) => (r, n) => e(r, n, t), Qn = (t, e, r) => Wi(t, typeof e != "symbol" ? e + "" : e, r);
|
|
2814
|
+
let St = class extends Sn {
|
|
2815
|
+
constructor(t = bt, e, r, n) {
|
|
2821
2816
|
super(), this._config = t, this._injector = e, this._commandService = r, this._configService = n;
|
|
2822
|
-
const { menu: i, ...s } =
|
|
2817
|
+
const { menu: i, ...s } = In(
|
|
2823
2818
|
{},
|
|
2824
|
-
|
|
2819
|
+
bt,
|
|
2825
2820
|
this._config
|
|
2826
2821
|
);
|
|
2827
|
-
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(
|
|
2822
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Jn, s), this._initCommand(), this._injector.add([rt]), this._injector.add([nt]), this._injector.add([et]), this._injector.add([tt]), this._injector.add([De]);
|
|
2828
2823
|
}
|
|
2829
2824
|
_initCommand() {
|
|
2830
2825
|
[
|
|
2831
|
-
An,
|
|
2832
2826
|
Dn,
|
|
2833
2827
|
$n,
|
|
2834
2828
|
jn,
|
|
@@ -2837,26 +2831,27 @@ let bt = class extends bn {
|
|
|
2837
2831
|
Wn,
|
|
2838
2832
|
qn,
|
|
2839
2833
|
Gn,
|
|
2840
|
-
|
|
2834
|
+
zn,
|
|
2835
|
+
Ft
|
|
2841
2836
|
].forEach((t) => {
|
|
2842
2837
|
this._commandService.registerCommand(t);
|
|
2843
2838
|
});
|
|
2844
2839
|
}
|
|
2845
2840
|
};
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
],
|
|
2854
|
-
var
|
|
2855
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2841
|
+
Qn(St, "pluginName", `${st}_MOBILE_UI_PLUGIN`);
|
|
2842
|
+
Qn(St, "type", $.UNIVER_SHEET);
|
|
2843
|
+
St = qi([
|
|
2844
|
+
yn(wn),
|
|
2845
|
+
Dt(1, O(ve)),
|
|
2846
|
+
Dt(2, O(te)),
|
|
2847
|
+
Dt(3, bn)
|
|
2848
|
+
], St);
|
|
2849
|
+
var Gi = Object.getOwnPropertyDescriptor, zi = (t, e, r, n) => {
|
|
2850
|
+
for (var i = n > 1 ? void 0 : n ? Gi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2856
2851
|
(o = t[s]) && (i = o(i) || i);
|
|
2857
2852
|
return i;
|
|
2858
|
-
},
|
|
2859
|
-
let
|
|
2853
|
+
}, ze = (t, e) => (r, n) => e(r, n, t);
|
|
2854
|
+
let It = class extends ce {
|
|
2860
2855
|
constructor(t, e, r, n, i) {
|
|
2861
2856
|
super(), this._injector = t, this._univerInstanceService = e, this._autoFillService = r, this._conditionalFormattingRuleModel = n, this._conditionalFormattingViewModel = i, this._initAutoFill();
|
|
2862
2857
|
}
|
|
@@ -2939,17 +2934,17 @@ let St = class extends ce {
|
|
|
2939
2934
|
const o = (_ = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : _.getUnitId(), d = (E = (R = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : R.getActiveSheet()) == null ? void 0 : E.getSheetId(), a = /* @__PURE__ */ new Map(), u = [], l = [];
|
|
2940
2935
|
if (!o || !d)
|
|
2941
2936
|
return t();
|
|
2942
|
-
const h =
|
|
2937
|
+
const h = Pn([i, s]), [v, f] = h.ranges, { mapFunc: S } = h, p = {
|
|
2943
2938
|
row: v.startRow,
|
|
2944
2939
|
col: v.startColumn
|
|
2945
2940
|
};
|
|
2946
|
-
return
|
|
2941
|
+
return ei(v, f).forEach((x) => {
|
|
2947
2942
|
e(p, x.repeatStartCell, x.relativeRange, a, S);
|
|
2948
2943
|
}), a.forEach((x, m) => {
|
|
2949
2944
|
const C = this._conditionalFormattingRuleModel.getRule(o, d, m);
|
|
2950
2945
|
if (!C)
|
|
2951
2946
|
return;
|
|
2952
|
-
const b =
|
|
2947
|
+
const b = pt(Ct(x));
|
|
2953
2948
|
if (b.length) {
|
|
2954
2949
|
const y = {
|
|
2955
2950
|
unitId: o,
|
|
@@ -2970,9 +2965,9 @@ let St = class extends ce {
|
|
|
2970
2965
|
redos: u
|
|
2971
2966
|
};
|
|
2972
2967
|
}, n = {
|
|
2973
|
-
id:
|
|
2968
|
+
id: st,
|
|
2974
2969
|
onFillData: (i, s, o) => {
|
|
2975
|
-
if (o ===
|
|
2970
|
+
if (o === Pt.COPY || o === Pt.ONLY_FORMAT || o === Pt.SERIES) {
|
|
2976
2971
|
const { source: d, target: a } = i;
|
|
2977
2972
|
return r(d, a);
|
|
2978
2973
|
}
|
|
@@ -2982,19 +2977,19 @@ let St = class extends ce {
|
|
|
2982
2977
|
this.disposeWithMe(this._autoFillService.addHook(n));
|
|
2983
2978
|
}
|
|
2984
2979
|
};
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
],
|
|
2992
|
-
var
|
|
2993
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2980
|
+
It = zi([
|
|
2981
|
+
ze(0, O(ve)),
|
|
2982
|
+
ze(1, O(z)),
|
|
2983
|
+
ze(2, O(Qr)),
|
|
2984
|
+
ze(3, O(Q)),
|
|
2985
|
+
ze(4, O(it))
|
|
2986
|
+
], It);
|
|
2987
|
+
var Zi = Object.getOwnPropertyDescriptor, Yi = (t, e, r, n) => {
|
|
2988
|
+
for (var i = n > 1 ? void 0 : n ? Zi(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
2994
2989
|
(o = t[s]) && (i = o(i) || i);
|
|
2995
2990
|
return i;
|
|
2996
|
-
},
|
|
2997
|
-
let
|
|
2991
|
+
}, Ze = (t, e) => (r, n) => e(r, n, t);
|
|
2992
|
+
let _t = class extends ce {
|
|
2998
2993
|
constructor(t, e, r, n, i) {
|
|
2999
2994
|
super(), this._injector = t, this._univerInstanceService = e, this._sheetInterceptorService = r, this._selectionManagerService = n, this._conditionalFormattingRuleModel = i, this._init();
|
|
3000
2995
|
}
|
|
@@ -3003,7 +2998,7 @@ let It = class extends ce {
|
|
|
3003
2998
|
getMutations: (t) => {
|
|
3004
2999
|
var i;
|
|
3005
3000
|
const e = [], r = [], n = { redos: e, undos: r };
|
|
3006
|
-
if ([kr.id,
|
|
3001
|
+
if ([kr.id, Ur.id].includes(t.id)) {
|
|
3007
3002
|
const s = (i = this._selectionManagerService.getCurrentSelections()) == null ? void 0 : i.map((f) => f.range);
|
|
3008
3003
|
if (!s)
|
|
3009
3004
|
return n;
|
|
@@ -3013,7 +3008,7 @@ let It = class extends ce {
|
|
|
3013
3008
|
const a = o.getUnitId(), u = d.getSheetId(), l = this._conditionalFormattingRuleModel.getSubunitRules(a, u);
|
|
3014
3009
|
if (!l || !l.length)
|
|
3015
3010
|
return n;
|
|
3016
|
-
const { redos: h, undos: v } =
|
|
3011
|
+
const { redos: h, undos: v } = hn(this._injector, l, s, a, u);
|
|
3017
3012
|
e.push(...h), r.push(...v);
|
|
3018
3013
|
}
|
|
3019
3014
|
return n;
|
|
@@ -3026,23 +3021,23 @@ let It = class extends ce {
|
|
|
3026
3021
|
const o = this._conditionalFormattingRuleModel.getSubunitRules(t, e);
|
|
3027
3022
|
if (!o || !o.length)
|
|
3028
3023
|
return s;
|
|
3029
|
-
const { redos: d, undos: a } =
|
|
3024
|
+
const { redos: d, undos: a } = hn(this._injector, o, r, t, e);
|
|
3030
3025
|
return n.push(...d), i.push(...a), s;
|
|
3031
3026
|
}
|
|
3032
3027
|
}));
|
|
3033
3028
|
}
|
|
3034
3029
|
};
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
],
|
|
3042
|
-
function
|
|
3030
|
+
_t = Yi([
|
|
3031
|
+
Ze(0, O(ve)),
|
|
3032
|
+
Ze(1, O(z)),
|
|
3033
|
+
Ze(2, O(Gt)),
|
|
3034
|
+
Ze(3, O($e)),
|
|
3035
|
+
Ze(4, O(Q))
|
|
3036
|
+
], _t);
|
|
3037
|
+
function hn(t, e, r, n, i) {
|
|
3043
3038
|
const s = [], o = [];
|
|
3044
3039
|
return e.filter((d) => r.some((a) => d.ranges.some((u) => fe.getIntersects(u, a)))).forEach((d) => {
|
|
3045
|
-
const u = new
|
|
3040
|
+
const u = new Pr().add(...d.ranges).subtract(...r).merge();
|
|
3046
3041
|
if (u.length) {
|
|
3047
3042
|
const l = {
|
|
3048
3043
|
id: be.id,
|
|
@@ -3066,12 +3061,12 @@ function dn(t, e, r, n, i) {
|
|
|
3066
3061
|
}
|
|
3067
3062
|
}), { redos: s, undos: o };
|
|
3068
3063
|
}
|
|
3069
|
-
var
|
|
3070
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
3064
|
+
var Ki = Object.getOwnPropertyDescriptor, Xi = (t, e, r, n) => {
|
|
3065
|
+
for (var i = n > 1 ? void 0 : n ? Ki(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
3071
3066
|
(o = t[s]) && (i = o(i) || i);
|
|
3072
3067
|
return i;
|
|
3073
|
-
},
|
|
3074
|
-
let
|
|
3068
|
+
}, vn = (t, e) => (r, n) => e(r, n, t);
|
|
3069
|
+
let Tt = class extends ce {
|
|
3075
3070
|
constructor(t, e) {
|
|
3076
3071
|
super(), this._sheetInterceptorService = t, this._conditionalFormattingService = e, this._initInterceptorEditorEnd();
|
|
3077
3072
|
}
|
|
@@ -3082,9 +3077,9 @@ let _t = class extends ce {
|
|
|
3082
3077
|
*/
|
|
3083
3078
|
_initInterceptorEditorEnd() {
|
|
3084
3079
|
this.disposeWithMe(
|
|
3085
|
-
|
|
3080
|
+
Cn(
|
|
3086
3081
|
this._sheetInterceptorService.writeCellInterceptor.intercept(
|
|
3087
|
-
|
|
3082
|
+
Or,
|
|
3088
3083
|
{
|
|
3089
3084
|
handler: (t, e, r) => {
|
|
3090
3085
|
var o, d, a;
|
|
@@ -3112,79 +3107,79 @@ let _t = class extends ce {
|
|
|
3112
3107
|
);
|
|
3113
3108
|
}
|
|
3114
3109
|
};
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
],
|
|
3119
|
-
const
|
|
3120
|
-
|
|
3110
|
+
Tt = Xi([
|
|
3111
|
+
vn(0, O(Gt)),
|
|
3112
|
+
vn(1, O(En))
|
|
3113
|
+
], Tt);
|
|
3114
|
+
const mn = [
|
|
3115
|
+
qt.id,
|
|
3121
3116
|
se.id,
|
|
3122
3117
|
be.id,
|
|
3123
3118
|
Se.id,
|
|
3124
|
-
|
|
3125
|
-
],
|
|
3119
|
+
Tn.id
|
|
3120
|
+
], Ye = [
|
|
3126
3121
|
{
|
|
3127
3122
|
label: {
|
|
3128
3123
|
name: "sheet.cf.ruleType.highlightCell",
|
|
3129
3124
|
selectable: !1
|
|
3130
3125
|
},
|
|
3131
|
-
value:
|
|
3126
|
+
value: ie.highlightCell
|
|
3132
3127
|
},
|
|
3133
3128
|
{
|
|
3134
3129
|
label: {
|
|
3135
3130
|
name: "sheet.cf.panel.rankAndAverage",
|
|
3136
3131
|
selectable: !1
|
|
3137
3132
|
},
|
|
3138
|
-
value:
|
|
3133
|
+
value: ie.rank
|
|
3139
3134
|
},
|
|
3140
3135
|
{
|
|
3141
3136
|
label: {
|
|
3142
3137
|
name: "sheet.cf.ruleType.formula",
|
|
3143
3138
|
selectable: !1
|
|
3144
3139
|
},
|
|
3145
|
-
value:
|
|
3140
|
+
value: ie.formula
|
|
3146
3141
|
},
|
|
3147
3142
|
{
|
|
3148
3143
|
label: {
|
|
3149
3144
|
name: "sheet.cf.ruleType.colorScale",
|
|
3150
3145
|
selectable: !1
|
|
3151
3146
|
},
|
|
3152
|
-
value:
|
|
3147
|
+
value: ie.colorScale
|
|
3153
3148
|
},
|
|
3154
3149
|
{
|
|
3155
3150
|
label: {
|
|
3156
3151
|
name: "sheet.cf.ruleType.dataBar",
|
|
3157
3152
|
selectable: !1
|
|
3158
3153
|
},
|
|
3159
|
-
value:
|
|
3154
|
+
value: ie.dataBar
|
|
3160
3155
|
},
|
|
3161
3156
|
{
|
|
3162
3157
|
label: {
|
|
3163
3158
|
name: "sheet.cf.ruleType.iconSet",
|
|
3164
3159
|
selectable: !1
|
|
3165
3160
|
},
|
|
3166
|
-
value:
|
|
3161
|
+
value: ie.icon
|
|
3167
3162
|
},
|
|
3168
3163
|
{
|
|
3169
3164
|
label: {
|
|
3170
3165
|
name: "sheet.cf.menu.manageConditionalFormatting",
|
|
3171
3166
|
selectable: !1
|
|
3172
3167
|
},
|
|
3173
|
-
value:
|
|
3168
|
+
value: ie.viewRule
|
|
3174
3169
|
},
|
|
3175
3170
|
{
|
|
3176
3171
|
label: {
|
|
3177
3172
|
name: "sheet.cf.menu.createConditionalFormatting",
|
|
3178
3173
|
selectable: !1
|
|
3179
3174
|
},
|
|
3180
|
-
value:
|
|
3175
|
+
value: ie.createRule
|
|
3181
3176
|
},
|
|
3182
3177
|
{
|
|
3183
3178
|
label: {
|
|
3184
3179
|
name: "sheet.cf.menu.clearRangeRules",
|
|
3185
3180
|
selectable: !1
|
|
3186
3181
|
},
|
|
3187
|
-
value:
|
|
3182
|
+
value: ie.clearRangeRules,
|
|
3188
3183
|
disabled: !1
|
|
3189
3184
|
},
|
|
3190
3185
|
{
|
|
@@ -3192,37 +3187,37 @@ const vn = [
|
|
|
3192
3187
|
name: "sheet.cf.menu.clearWorkSheetRules",
|
|
3193
3188
|
selectable: !1
|
|
3194
3189
|
},
|
|
3195
|
-
value:
|
|
3190
|
+
value: ie.clearWorkSheetRules
|
|
3196
3191
|
}
|
|
3197
|
-
],
|
|
3198
|
-
const e = t.get($e), r = t.get(
|
|
3192
|
+
], Ji = (t) => {
|
|
3193
|
+
const e = t.get($e), r = t.get(te), n = t.get(z), i = t.get(Q), s = new xe((a) => Ln(
|
|
3199
3194
|
e.selectionMoveEnd$,
|
|
3200
3195
|
e.selectionSet$,
|
|
3201
3196
|
new xe((u) => {
|
|
3202
3197
|
const l = r.onCommandExecuted((h) => {
|
|
3203
3198
|
var p;
|
|
3204
3199
|
const { id: v, params: f } = h, S = (p = n.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : p.getUnitId();
|
|
3205
|
-
|
|
3200
|
+
mn.includes(v) && f.unitId === S && u.next(null);
|
|
3206
3201
|
});
|
|
3207
3202
|
return () => l.dispose();
|
|
3208
3203
|
})
|
|
3209
|
-
).pipe(
|
|
3204
|
+
).pipe(rn(16)).subscribe(() => {
|
|
3210
3205
|
var p;
|
|
3211
3206
|
const u = ((p = e.getCurrentSelections()) == null ? void 0 : p.map((T) => T.range)) || [], l = n.getCurrentUnitForType($.UNIVER_SHEET);
|
|
3212
3207
|
if (!l) return;
|
|
3213
3208
|
const h = l.getActiveSheet();
|
|
3214
3209
|
if (!h) return;
|
|
3215
|
-
const S = (i.getSubunitRules(l.getUnitId(), h.getSheetId()) || []).filter((T) => T.ranges.some((_) => u.some((R) => fe.intersects(R, _)))).map((T) => T.ranges).every((T) =>
|
|
3210
|
+
const S = (i.getSubunitRules(l.getUnitId(), h.getSheetId()) || []).filter((T) => T.ranges.some((_) => u.some((R) => fe.intersects(R, _)))).map((T) => T.ranges).every((T) => ft(t, l.getUnitId(), h.getSheetId(), T));
|
|
3216
3211
|
a.next(S);
|
|
3217
3212
|
})), o = new xe(
|
|
3218
3213
|
(a) => new xe((u) => {
|
|
3219
3214
|
const l = r.onCommandExecuted((h) => {
|
|
3220
3215
|
var p;
|
|
3221
3216
|
const { id: v, params: f } = h, S = (p = n.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : p.getUnitId();
|
|
3222
|
-
|
|
3217
|
+
mn.includes(v) && f.unitId === S && u.next(null);
|
|
3223
3218
|
});
|
|
3224
3219
|
return () => l.dispose();
|
|
3225
|
-
}).pipe(
|
|
3220
|
+
}).pipe(rn(16)).subscribe(() => {
|
|
3226
3221
|
const u = n.getCurrentUnitForType($.UNIVER_SHEET);
|
|
3227
3222
|
if (!u) return;
|
|
3228
3223
|
const l = u.getActiveSheet();
|
|
@@ -3230,57 +3225,57 @@ const vn = [
|
|
|
3230
3225
|
const h = i.getSubunitRules(u.getUnitId(), l.getSheetId()) || [];
|
|
3231
3226
|
if (!h.length)
|
|
3232
3227
|
return a.next(!1), !1;
|
|
3233
|
-
const v = h.map((f) => f.ranges).every((f) =>
|
|
3228
|
+
const v = h.map((f) => f.ranges).every((f) => ft(t, u.getUnitId(), l.getSheetId(), f));
|
|
3234
3229
|
a.next(v);
|
|
3235
3230
|
})
|
|
3236
3231
|
), d = new xe((a) => {
|
|
3237
3232
|
s.subscribe((u) => {
|
|
3238
|
-
const l =
|
|
3239
|
-
l && (l.disabled = !u, a.next(
|
|
3233
|
+
const l = Ye.find((h) => h.value === ie.clearRangeRules);
|
|
3234
|
+
l && (l.disabled = !u, a.next(Ye));
|
|
3240
3235
|
}), o.subscribe((u) => {
|
|
3241
|
-
const l =
|
|
3242
|
-
l && (l.disabled = !u, a.next(
|
|
3243
|
-
}), a.next(
|
|
3236
|
+
const l = Ye.find((h) => h.value === ie.clearWorkSheetRules);
|
|
3237
|
+
l && (l.disabled = !u, a.next(Ye));
|
|
3238
|
+
}), a.next(Ye);
|
|
3244
3239
|
});
|
|
3245
3240
|
return {
|
|
3246
|
-
id:
|
|
3247
|
-
type:
|
|
3241
|
+
id: Ft.id,
|
|
3242
|
+
type: jr.SELECTOR,
|
|
3248
3243
|
icon: "Conditions",
|
|
3249
3244
|
tooltip: "sheet.cf.title",
|
|
3250
3245
|
selections: d,
|
|
3251
|
-
hidden$:
|
|
3252
|
-
disabled$:
|
|
3246
|
+
hidden$: $r(t, $.UNIVER_SHEET),
|
|
3247
|
+
disabled$: ti(t, { workbookTypes: [Fn], worksheetTypes: [Mn, Nn], rangeTypes: [Vn] })
|
|
3253
3248
|
};
|
|
3254
|
-
},
|
|
3255
|
-
[
|
|
3256
|
-
[
|
|
3249
|
+
}, Qi = {
|
|
3250
|
+
[Hr.FORMULAS_INSERT]: {
|
|
3251
|
+
[Ft.id]: {
|
|
3257
3252
|
order: 0,
|
|
3258
|
-
menuItemFactory:
|
|
3253
|
+
menuItemFactory: Ji
|
|
3259
3254
|
}
|
|
3260
3255
|
}
|
|
3261
3256
|
};
|
|
3262
|
-
var
|
|
3263
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
3257
|
+
var es = Object.getOwnPropertyDescriptor, ts = (t, e, r, n) => {
|
|
3258
|
+
for (var i = n > 1 ? void 0 : n ? es(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
3264
3259
|
(o = t[s]) && (i = o(i) || i);
|
|
3265
3260
|
return i;
|
|
3266
|
-
},
|
|
3267
|
-
let
|
|
3261
|
+
}, gn = (t, e) => (r, n) => e(r, n, t);
|
|
3262
|
+
let Rt = class extends ce {
|
|
3268
3263
|
constructor(e, r) {
|
|
3269
3264
|
super();
|
|
3270
3265
|
ye(this, "_sidebarDisposable", null);
|
|
3271
|
-
this._injector = e, this._menuManagerService = r, this._menuManagerService.mergeMenu(
|
|
3266
|
+
this._injector = e, this._menuManagerService = r, this._menuManagerService.mergeMenu(Qi);
|
|
3272
3267
|
}
|
|
3273
3268
|
};
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
],
|
|
3278
|
-
var
|
|
3279
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
3269
|
+
Rt = ts([
|
|
3270
|
+
gn(0, O(ve)),
|
|
3271
|
+
gn(1, Br)
|
|
3272
|
+
], Rt);
|
|
3273
|
+
var ns = Object.getOwnPropertyDescriptor, rs = (t, e, r, n) => {
|
|
3274
|
+
for (var i = n > 1 ? void 0 : n ? ns(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
3280
3275
|
(o = t[s]) && (i = o(i) || i);
|
|
3281
3276
|
return i;
|
|
3282
3277
|
}, Oe = (t, e) => (r, n) => e(r, n, t);
|
|
3283
|
-
const
|
|
3278
|
+
const is = (t, e) => {
|
|
3284
3279
|
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 = [], u = {
|
|
3285
3280
|
startRow: 0,
|
|
3286
3281
|
endRow: r(t) - 1,
|
|
@@ -3309,7 +3304,7 @@ const rs = (t, e) => {
|
|
|
3309
3304
|
}
|
|
3310
3305
|
return a;
|
|
3311
3306
|
};
|
|
3312
|
-
let
|
|
3307
|
+
let xt = class extends ce {
|
|
3313
3308
|
constructor(e, r, n, i, s, o) {
|
|
3314
3309
|
super();
|
|
3315
3310
|
ye(this, "_painterConfig", null);
|
|
@@ -3396,11 +3391,11 @@ let Rt = class extends ce {
|
|
|
3396
3391
|
row: a.startRow,
|
|
3397
3392
|
col: a.startColumn
|
|
3398
3393
|
};
|
|
3399
|
-
return
|
|
3394
|
+
return is(a, d).forEach((E) => {
|
|
3400
3395
|
r(T, { row: E.startRange.startRow, col: E.startRange.startColumn }, E.repeatRelativeRange, v, { targetUnitId: s, targetSubUnitId: o });
|
|
3401
3396
|
}), v.forEach((E, x) => {
|
|
3402
3397
|
if (h) {
|
|
3403
|
-
const m = this._conditionalFormattingRuleModel.getRule(s, o, x), C =
|
|
3398
|
+
const m = this._conditionalFormattingRuleModel.getRule(s, o, x), C = pt(Ct(E));
|
|
3404
3399
|
if (m)
|
|
3405
3400
|
if (C.length) {
|
|
3406
3401
|
const b = {
|
|
@@ -3424,19 +3419,19 @@ let Rt = class extends ce {
|
|
|
3424
3419
|
unitId: s,
|
|
3425
3420
|
subUnitId: o,
|
|
3426
3421
|
rule: {
|
|
3427
|
-
...
|
|
3422
|
+
...Wt.deepClone(b),
|
|
3428
3423
|
cfId: this._conditionalFormattingRuleModel.createCfId(s, o),
|
|
3429
3424
|
ranges: C
|
|
3430
3425
|
}
|
|
3431
3426
|
};
|
|
3432
|
-
f.push({ id: se.id, params: y }), S.push(
|
|
3427
|
+
f.push({ id: se.id, params: y }), S.push(xn(this._injector, y));
|
|
3433
3428
|
}
|
|
3434
3429
|
}
|
|
3435
3430
|
} else {
|
|
3436
3431
|
const m = this._conditionalFormattingRuleModel.getRule(u, l, x);
|
|
3437
3432
|
if (!m)
|
|
3438
3433
|
return;
|
|
3439
|
-
const C =
|
|
3434
|
+
const C = pt(Ct(E));
|
|
3440
3435
|
if (C.length) {
|
|
3441
3436
|
const b = {
|
|
3442
3437
|
unitId: u,
|
|
@@ -3458,17 +3453,17 @@ let Rt = class extends ce {
|
|
|
3458
3453
|
redos: f
|
|
3459
3454
|
};
|
|
3460
3455
|
}, i = {
|
|
3461
|
-
id:
|
|
3456
|
+
id: st,
|
|
3462
3457
|
onStatusChange: (s) => {
|
|
3463
3458
|
var o, d, a;
|
|
3464
3459
|
switch (s) {
|
|
3465
|
-
case
|
|
3466
|
-
case
|
|
3460
|
+
case Ot.INFINITE:
|
|
3461
|
+
case Ot.ONCE: {
|
|
3467
3462
|
const u = (o = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : o.getUnitId(), l = (a = (d = this._univerInstanceService.getCurrentUnitForType($.UNIVER_SHEET)) == null ? void 0 : d.getActiveSheet()) == null ? void 0 : a.getSheetId(), h = this._sheetsSelectionsService.getCurrentLastSelection(), v = h == null ? void 0 : h.range;
|
|
3468
3463
|
u && l && v && (this._painterConfig = { unitId: u, subUnitId: l, range: v });
|
|
3469
3464
|
break;
|
|
3470
3465
|
}
|
|
3471
|
-
case
|
|
3466
|
+
case Ot.OFF: {
|
|
3472
3467
|
this._painterConfig = null;
|
|
3473
3468
|
break;
|
|
3474
3469
|
}
|
|
@@ -3482,20 +3477,20 @@ let Rt = class extends ce {
|
|
|
3482
3477
|
this._formatPainterService.addHook(i);
|
|
3483
3478
|
}
|
|
3484
3479
|
};
|
|
3485
|
-
|
|
3480
|
+
xt = rs([
|
|
3486
3481
|
Oe(0, O(ve)),
|
|
3487
3482
|
Oe(1, O(z)),
|
|
3488
|
-
Oe(2, O(
|
|
3483
|
+
Oe(2, O(ni)),
|
|
3489
3484
|
Oe(3, O($e)),
|
|
3490
|
-
Oe(4, O(
|
|
3491
|
-
Oe(5, O(
|
|
3492
|
-
],
|
|
3493
|
-
var
|
|
3494
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
3485
|
+
Oe(4, O(Q)),
|
|
3486
|
+
Oe(5, O(it))
|
|
3487
|
+
], xt);
|
|
3488
|
+
var ss = Object.getOwnPropertyDescriptor, os = (t, e, r, n) => {
|
|
3489
|
+
for (var i = n > 1 ? void 0 : n ? ss(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
3495
3490
|
(o = t[s]) && (i = o(i) || i);
|
|
3496
3491
|
return i;
|
|
3497
|
-
},
|
|
3498
|
-
let
|
|
3492
|
+
}, $t = (t, e) => (r, n) => e(r, n, t);
|
|
3493
|
+
let Et = class extends ce {
|
|
3499
3494
|
constructor(t, e, r) {
|
|
3500
3495
|
super(), this._conditionalFormattingViewModel = t, this._univerInstanceService = e, this._renderManagerService = r, this._init();
|
|
3501
3496
|
}
|
|
@@ -3504,10 +3499,10 @@ let xt = class extends ce {
|
|
|
3504
3499
|
const n = r.getUnitId(), i = this._renderManagerService.getRenderById(n);
|
|
3505
3500
|
if (!i)
|
|
3506
3501
|
return;
|
|
3507
|
-
const s = i.with(
|
|
3502
|
+
const s = i.with(On);
|
|
3508
3503
|
this.disposeWithMe(s.currentSkeleton$.subscribe((o) => {
|
|
3509
3504
|
if (o) {
|
|
3510
|
-
const d = o.skeleton.rowColumnSegment, a = d.endColumn - d.startColumn + 1, l = (d.endRow - d.startRow + 1) * a * 9, h = Math.max(
|
|
3505
|
+
const d = o.skeleton.rowColumnSegment, a = d.endColumn - d.startColumn + 1, l = (d.endRow - d.startRow + 1) * a * 9, h = Math.max(Tr, l);
|
|
3511
3506
|
this._conditionalFormattingViewModel.setCacheLength(h);
|
|
3512
3507
|
}
|
|
3513
3508
|
}));
|
|
@@ -3517,66 +3512,65 @@ let xt = class extends ce {
|
|
|
3517
3512
|
});
|
|
3518
3513
|
}
|
|
3519
3514
|
};
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
],
|
|
3525
|
-
var
|
|
3526
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
3515
|
+
Et = os([
|
|
3516
|
+
$t(0, O(it)),
|
|
3517
|
+
$t(1, z),
|
|
3518
|
+
$t(2, An)
|
|
3519
|
+
], Et);
|
|
3520
|
+
var as = Object.defineProperty, ls = Object.getOwnPropertyDescriptor, cs = (t, e, r) => e in t ? as(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, us = (t, e, r, n) => {
|
|
3521
|
+
for (var i = n > 1 ? void 0 : n ? ls(e, r) : e, s = t.length - 1, o; s >= 0; s--)
|
|
3527
3522
|
(o = t[s]) && (i = o(i) || i);
|
|
3528
3523
|
return i;
|
|
3529
|
-
},
|
|
3530
|
-
let
|
|
3531
|
-
constructor(t =
|
|
3524
|
+
}, jt = (t, e) => (r, n) => e(r, n, t), er = (t, e, r) => cs(t, typeof e != "symbol" ? e + "" : e, r);
|
|
3525
|
+
let wt = class extends Sn {
|
|
3526
|
+
constructor(t = bt, e, r, n) {
|
|
3532
3527
|
super(), this._config = t, this._injector = e, this._commandService = r, this._configService = n;
|
|
3533
|
-
const { menu: i, ...s } =
|
|
3528
|
+
const { menu: i, ...s } = In(
|
|
3534
3529
|
{},
|
|
3535
|
-
|
|
3530
|
+
bt,
|
|
3536
3531
|
this._config
|
|
3537
3532
|
);
|
|
3538
|
-
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(
|
|
3533
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Jn, s), this._initCommand();
|
|
3539
3534
|
}
|
|
3540
3535
|
onStarting() {
|
|
3541
|
-
|
|
3536
|
+
ur(this._injector, [
|
|
3537
|
+
[rt],
|
|
3542
3538
|
[nt],
|
|
3539
|
+
[et],
|
|
3540
|
+
[It],
|
|
3543
3541
|
[tt],
|
|
3544
3542
|
[Qe],
|
|
3545
|
-
[
|
|
3546
|
-
[et],
|
|
3547
|
-
[Je],
|
|
3548
|
-
[Tt],
|
|
3543
|
+
[Rt],
|
|
3549
3544
|
[De],
|
|
3545
|
+
[Tt],
|
|
3550
3546
|
[_t],
|
|
3551
|
-
[
|
|
3552
|
-
[
|
|
3553
|
-
[xt]
|
|
3547
|
+
[xt],
|
|
3548
|
+
[Et]
|
|
3554
3549
|
]), kt(this._injector, [
|
|
3555
|
-
[
|
|
3550
|
+
[rt]
|
|
3556
3551
|
]);
|
|
3557
3552
|
}
|
|
3558
3553
|
onReady() {
|
|
3559
3554
|
kt(this._injector, [
|
|
3560
|
-
[
|
|
3561
|
-
[
|
|
3555
|
+
[Rt],
|
|
3556
|
+
[Qe]
|
|
3562
3557
|
]);
|
|
3563
3558
|
}
|
|
3564
3559
|
onRendered() {
|
|
3565
3560
|
kt(this._injector, [
|
|
3566
|
-
[St],
|
|
3567
3561
|
[It],
|
|
3568
|
-
[Qe],
|
|
3569
3562
|
[_t],
|
|
3570
|
-
[De],
|
|
3571
|
-
[Rt],
|
|
3572
3563
|
[et],
|
|
3564
|
+
[Tt],
|
|
3565
|
+
[De],
|
|
3566
|
+
[xt],
|
|
3573
3567
|
[tt],
|
|
3574
|
-
[
|
|
3568
|
+
[nt],
|
|
3569
|
+
[Et]
|
|
3575
3570
|
]);
|
|
3576
3571
|
}
|
|
3577
3572
|
_initCommand() {
|
|
3578
3573
|
[
|
|
3579
|
-
An,
|
|
3580
3574
|
Dn,
|
|
3581
3575
|
$n,
|
|
3582
3576
|
jn,
|
|
@@ -3585,32 +3579,33 @@ let Et = class extends bn {
|
|
|
3585
3579
|
Wn,
|
|
3586
3580
|
qn,
|
|
3587
3581
|
Gn,
|
|
3588
|
-
|
|
3582
|
+
zn,
|
|
3583
|
+
Ft
|
|
3589
3584
|
].forEach((t) => {
|
|
3590
3585
|
this._commandService.registerCommand(t);
|
|
3591
3586
|
});
|
|
3592
3587
|
}
|
|
3593
3588
|
};
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
],
|
|
3589
|
+
er(wt, "pluginName", `${st}_UI_PLUGIN`);
|
|
3590
|
+
er(wt, "type", $.UNIVER_SHEET);
|
|
3591
|
+
wt = us([
|
|
3592
|
+
yn(wn),
|
|
3593
|
+
jt(1, O(ve)),
|
|
3594
|
+
jt(2, O(te)),
|
|
3595
|
+
jt(3, bn)
|
|
3596
|
+
], wt);
|
|
3602
3597
|
export {
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3598
|
+
Dn as AddAverageCfCommand,
|
|
3599
|
+
$n as AddColorScaleConditionalRuleCommand,
|
|
3600
|
+
jn as AddDataBarConditionalRuleCommand,
|
|
3601
|
+
Hn as AddDuplicateValuesCfCommand,
|
|
3602
|
+
Bn as AddNumberCfCommand,
|
|
3603
|
+
Wn as AddRankCfCommand,
|
|
3604
|
+
qn as AddTextCfCommand,
|
|
3605
|
+
Gn as AddTimePeriodCfCommand,
|
|
3606
|
+
zn as AddUniqueValuesCfCommand,
|
|
3607
|
+
_t as ConditionalFormattingClearController,
|
|
3608
|
+
Ft as OpenConditionalFormattingOperator,
|
|
3609
|
+
St as UniverSheetsConditionalFormattingMobileUIPlugin,
|
|
3610
|
+
wt as UniverSheetsConditionalFormattingUIPlugin
|
|
3616
3611
|
};
|