@univerjs/sheets-conditional-formatting-ui 0.6.6 → 0.6.7-experimental.20250328-3aaa828
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 +13 -13
- package/lib/es/index.js +798 -796
- package/lib/index.js +7625 -0
- package/lib/locale/en-US.js +162 -0
- package/lib/locale/fa-IR.js +162 -0
- package/lib/locale/fr-FR.js +162 -0
- package/lib/locale/ru-RU.js +162 -0
- package/lib/locale/vi-VN.js +162 -0
- package/lib/locale/zh-CN.js +162 -0
- package/lib/locale/zh-TW.js +162 -0
- package/lib/umd/index.js +36 -36
- package/package.json +16 -16
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var oi = Object.defineProperty;
|
|
2
2
|
var ii = (t, e, r) => e in t ? oi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var Ge = (t, e, r) => ii(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { CommandType as Fe, ICommandService as _e, IUniverInstanceService as me, Inject as
|
|
5
|
-
import { ConditionalFormattingRuleModel as Re, CFSubRuleType as
|
|
4
|
+
import { CommandType as Fe, ICommandService as _e, IUniverInstanceService as me, Inject as J, LocaleService as Te, Disposable as Ne, ColorKit as no, BooleanNumber as De, Injector as qe, UniverInstanceType as re, Rectangle as Ue, Tools as Yn, get as si, set as ai, createInterceptorKey as ro, InterceptorManager as li, generateRandomId as ci, ObjectMatrix as it, Range as je, toDisposable as oo, InterceptorEffectEnum as ui, DependentOn as io, IConfigService as so, Plugin as ao, merge as lo, registerDependencies as di, touchDependencies as Dn } from "@univerjs/core";
|
|
5
|
+
import { ConditionalFormattingRuleModel as Re, CFSubRuleType as G, CFRuleType as K, AddConditionalRuleMutation as xe, CFNumberOperator as Z, getColorScaleFromValue as fi, iconMap as st, DEFAULT_BG_COLOR as hi, DEFAULT_FONT_COLOR as pi, defaultDataBarPositiveColor as Vt, defaultDataBarNativeColor as Ft, SetConditionalRuleMutation as Ke, DeleteConditionalRuleMutation as Ze, MoveConditionalRuleMutation as co, ClearWorksheetCfCommand as uo, DeleteCfCommand as sr, MoveCfCommand as gi, CFValueType as ne, createDefaultValueByValueType as qt, removeUndefinedAttr as mi, createDefaultValue as ln, CFTextOperator as ae, CFTimePeriodOperator as $e, iconGroup as vi, getOppositeOperator as Bn, compareWithNumber as yi, EMPTY_ICON_TYPE as bi, SetCfCommand as Si, AddCfCommand as fo, ClearRangeCfCommand as Ci, createDefaultRule as tt, ConditionalFormattingViewModel as Bt, SHEET_CONDITIONAL_FORMATTING_PLUGIN as Gt, DeleteConditionalRuleMutationUndoFactory as pt, AddConditionalRuleMutationUndoFactory as ho, setConditionalRuleMutationUndoFactory as gt, isRangesEqual as wi, ConditionalFormattingService as po, DEFAULT_PADDING as Ri, DEFAULT_WIDTH as _i, UniverSheetsConditionalFormattingPlugin as go, CONDITIONAL_FORMATTING_VIEWPORT_CACHE_LENGTH as Ei } from "@univerjs/sheets-conditional-formatting";
|
|
6
6
|
import { getSheetCommandTarget as Be, SheetsSelectionsService as yt, SetWorksheetActiveOperation as Kn, SetSelectionsOperation as Ti, checkRangesEditablePermission as cn, RemoveSheetMutation as Ii, setEndForRange as xi, rangeToDiscreteRange as Oi, findAllRectangle as un, createTopMatrixFromMatrix as dn, SheetPermissionCheckController as Pi, WorksheetEditPermission as mo, WorksheetSetCellStylePermission as vo, RangeProtectionPermissionEditPoint as yo, WorkbookEditablePermission as bo, RefRangeService as Di, handleDefaultRangeChangeWithEffectRefCommands as Mi, SheetInterceptorService as Zn, INTERCEPTOR_POINT as Ni, ClearSelectionFormatCommand as Li, ClearSelectionAllCommand as zi, RangeMergeUtil as $i, AFTER_CELL_EDIT as ki } from "@univerjs/sheets";
|
|
7
7
|
import { useDependency as fe, ISidebarService as So, useObservable as Vi, ComponentManager as Jn, useSidebarClick as _n, ILayoutService as Fi, useScrollYOverContainer as qi, getMenuHiddenObservable as Wi, MenuItemType as Hi, RibbonStartGroup as Ai, IMenuManagerService as Ui } from "@univerjs/ui";
|
|
8
|
-
import { jsx as O, jsxs as
|
|
8
|
+
import { jsx as O, jsxs as B, Fragment as Gn } from "react/jsx-runtime";
|
|
9
9
|
import ze, { forwardRef as ct, useRef as Ve, createElement as bt, useMemo as Se, useState as H, useEffect as we } from "react";
|
|
10
10
|
import { Select as Me, Tooltip as ar, clsx as Ee, Dropdown as Qn, ColorPicker as ji, InputNumber as at, RadioGroup as Bi, Radio as lr, Checkbox as fn, Input as Gi, Button as cr } from "@univerjs/design";
|
|
11
11
|
import { serializeRange as Co, deserializeRangeWithSheet as Xi } from "@univerjs/engine-formula";
|
|
@@ -23,18 +23,18 @@ const Io = {
|
|
|
23
23
|
return !1;
|
|
24
24
|
const { ranges: r, style: n, stopIfTrue: o, operator: i } = e, c = t.get(Re), y = t.get(_e), f = t.get(me), S = Be(f);
|
|
25
25
|
if (!S) return !1;
|
|
26
|
-
const { unitId: m, subUnitId:
|
|
26
|
+
const { unitId: m, subUnitId: w } = S, _ = c.createCfId(m, w), C = {
|
|
27
27
|
ranges: r,
|
|
28
28
|
cfId: _,
|
|
29
29
|
stopIfTrue: !!o,
|
|
30
30
|
rule: {
|
|
31
31
|
type: K.highlightCell,
|
|
32
|
-
subType:
|
|
32
|
+
subType: G.average,
|
|
33
33
|
operator: i,
|
|
34
34
|
style: n
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
return y.executeCommand(xe.id, { unitId: m, subUnitId:
|
|
37
|
+
return y.executeCommand(xe.id, { unitId: m, subUnitId: w, rule: C });
|
|
38
38
|
}
|
|
39
39
|
}, xo = {
|
|
40
40
|
type: Fe.COMMAND,
|
|
@@ -44,9 +44,9 @@ const Io = {
|
|
|
44
44
|
return !1;
|
|
45
45
|
const { ranges: r, config: n, stopIfTrue: o } = e, i = t.get(Re), c = t.get(_e), y = t.get(me), f = Be(y);
|
|
46
46
|
if (!f) return !1;
|
|
47
|
-
const { unitId: S, subUnitId: m } = f,
|
|
47
|
+
const { unitId: S, subUnitId: m } = f, w = i.createCfId(S, m), _ = {
|
|
48
48
|
ranges: r,
|
|
49
|
-
cfId:
|
|
49
|
+
cfId: w,
|
|
50
50
|
stopIfTrue: !!o,
|
|
51
51
|
rule: {
|
|
52
52
|
type: K.colorScale,
|
|
@@ -61,9 +61,9 @@ const Io = {
|
|
|
61
61
|
handler(t, e) {
|
|
62
62
|
if (!e)
|
|
63
63
|
return !1;
|
|
64
|
-
const { ranges: r, min: n, max: o, nativeColor: i, positiveColor: c, isGradient: y, stopIfTrue: f, isShowValue: S } = e, m = t.get(Re),
|
|
64
|
+
const { ranges: r, min: n, max: o, nativeColor: i, positiveColor: c, isGradient: y, stopIfTrue: f, isShowValue: S } = e, m = t.get(Re), w = t.get(me), _ = Be(w);
|
|
65
65
|
if (!_) return !1;
|
|
66
|
-
const { unitId:
|
|
66
|
+
const { unitId: C, subUnitId: b } = _, R = t.get(_e), h = m.createCfId(C, b), s = {
|
|
67
67
|
ranges: r,
|
|
68
68
|
cfId: h,
|
|
69
69
|
stopIfTrue: !!f,
|
|
@@ -79,7 +79,7 @@ const Io = {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
return R.executeCommand(xe.id, { unitId:
|
|
82
|
+
return R.executeCommand(xe.id, { unitId: C, subUnitId: b, rule: s });
|
|
83
83
|
}
|
|
84
84
|
}, Po = {
|
|
85
85
|
type: Fe.COMMAND,
|
|
@@ -89,13 +89,13 @@ const Io = {
|
|
|
89
89
|
return !1;
|
|
90
90
|
const { ranges: r, style: n, stopIfTrue: o } = e, i = t.get(Re), c = t.get(_e), y = t.get(me), f = Be(y);
|
|
91
91
|
if (!f) return !1;
|
|
92
|
-
const { unitId: S, subUnitId: m } = f,
|
|
92
|
+
const { unitId: S, subUnitId: m } = f, w = i.createCfId(S, m), _ = {
|
|
93
93
|
ranges: r,
|
|
94
|
-
cfId:
|
|
94
|
+
cfId: w,
|
|
95
95
|
stopIfTrue: !!o,
|
|
96
96
|
rule: {
|
|
97
97
|
type: K.highlightCell,
|
|
98
|
-
subType:
|
|
98
|
+
subType: G.duplicateValues,
|
|
99
99
|
style: n
|
|
100
100
|
}
|
|
101
101
|
};
|
|
@@ -109,19 +109,19 @@ const Io = {
|
|
|
109
109
|
return !1;
|
|
110
110
|
const { ranges: r, style: n, stopIfTrue: o, operator: i, value: c } = e, y = t.get(Re), f = t.get(_e), S = t.get(me), m = Be(S);
|
|
111
111
|
if (!m) return !1;
|
|
112
|
-
const { unitId:
|
|
112
|
+
const { unitId: w, subUnitId: _ } = m, C = y.createCfId(w, _);
|
|
113
113
|
let b;
|
|
114
|
-
if ([
|
|
114
|
+
if ([Z.between, Z.notBetween].includes(i)) {
|
|
115
115
|
const R = c;
|
|
116
116
|
if (R.length !== 2 || !Array.isArray(R))
|
|
117
117
|
return !1;
|
|
118
118
|
b = {
|
|
119
119
|
ranges: r,
|
|
120
|
-
cfId:
|
|
120
|
+
cfId: C,
|
|
121
121
|
stopIfTrue: !!o,
|
|
122
122
|
rule: {
|
|
123
123
|
type: K.highlightCell,
|
|
124
|
-
subType:
|
|
124
|
+
subType: G.number,
|
|
125
125
|
operator: i,
|
|
126
126
|
style: n,
|
|
127
127
|
value: R
|
|
@@ -133,18 +133,18 @@ const Io = {
|
|
|
133
133
|
return !1;
|
|
134
134
|
b = {
|
|
135
135
|
ranges: r,
|
|
136
|
-
cfId:
|
|
136
|
+
cfId: C,
|
|
137
137
|
stopIfTrue: !!o,
|
|
138
138
|
rule: {
|
|
139
139
|
type: K.highlightCell,
|
|
140
|
-
subType:
|
|
140
|
+
subType: G.number,
|
|
141
141
|
operator: i,
|
|
142
142
|
style: n,
|
|
143
143
|
value: R
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
return f.executeCommand(xe.id, { unitId:
|
|
147
|
+
return f.executeCommand(xe.id, { unitId: w, subUnitId: _, rule: b });
|
|
148
148
|
}
|
|
149
149
|
}, Mo = {
|
|
150
150
|
type: Fe.COMMAND,
|
|
@@ -152,22 +152,22 @@ const Io = {
|
|
|
152
152
|
handler(t, e) {
|
|
153
153
|
if (!e)
|
|
154
154
|
return !1;
|
|
155
|
-
const { ranges: r, style: n, stopIfTrue: o, isPercent: i, isBottom: c, value: y } = e, f = t.get(Re), S = t.get(me), m = t.get(_e),
|
|
156
|
-
if (!
|
|
157
|
-
const { unitId: _, subUnitId:
|
|
155
|
+
const { ranges: r, style: n, stopIfTrue: o, isPercent: i, isBottom: c, value: y } = e, f = t.get(Re), S = t.get(me), m = t.get(_e), w = Be(S);
|
|
156
|
+
if (!w) return !1;
|
|
157
|
+
const { unitId: _, subUnitId: C } = w, b = f.createCfId(_, C), R = {
|
|
158
158
|
ranges: r,
|
|
159
159
|
cfId: b,
|
|
160
160
|
stopIfTrue: !!o,
|
|
161
161
|
rule: {
|
|
162
162
|
type: K.highlightCell,
|
|
163
|
-
subType:
|
|
163
|
+
subType: G.rank,
|
|
164
164
|
isPercent: i,
|
|
165
165
|
isBottom: c,
|
|
166
166
|
style: n,
|
|
167
167
|
value: y
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
|
-
return m.executeCommand(xe.id, { unitId: _, subUnitId:
|
|
170
|
+
return m.executeCommand(xe.id, { unitId: _, subUnitId: C, rule: R });
|
|
171
171
|
}
|
|
172
172
|
}, No = {
|
|
173
173
|
type: Fe.COMMAND,
|
|
@@ -177,19 +177,19 @@ const Io = {
|
|
|
177
177
|
return !1;
|
|
178
178
|
const { ranges: r, style: n, stopIfTrue: o, operator: i, value: c } = e, y = t.get(Re), f = t.get(me), S = Be(f);
|
|
179
179
|
if (!S) return !1;
|
|
180
|
-
const { unitId: m, subUnitId:
|
|
180
|
+
const { unitId: m, subUnitId: w } = S, _ = t.get(_e), C = y.createCfId(m, w), b = {
|
|
181
181
|
ranges: r,
|
|
182
|
-
cfId:
|
|
182
|
+
cfId: C,
|
|
183
183
|
stopIfTrue: !!o,
|
|
184
184
|
rule: {
|
|
185
185
|
type: K.highlightCell,
|
|
186
|
-
subType:
|
|
186
|
+
subType: G.text,
|
|
187
187
|
operator: i,
|
|
188
188
|
style: n,
|
|
189
189
|
value: c
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
|
-
return _.executeCommand(xe.id, { unitId: m, subUnitId:
|
|
192
|
+
return _.executeCommand(xe.id, { unitId: m, subUnitId: w, rule: b });
|
|
193
193
|
}
|
|
194
194
|
}, Lo = {
|
|
195
195
|
type: Fe.COMMAND,
|
|
@@ -199,18 +199,18 @@ const Io = {
|
|
|
199
199
|
return !1;
|
|
200
200
|
const { ranges: r, style: n, stopIfTrue: o, operator: i } = e, c = t.get(Re), y = t.get(me), f = t.get(_e), S = Be(y);
|
|
201
201
|
if (!S) return !1;
|
|
202
|
-
const { unitId: m, subUnitId:
|
|
202
|
+
const { unitId: m, subUnitId: w } = S, _ = c.createCfId(m, w), C = {
|
|
203
203
|
ranges: r,
|
|
204
204
|
cfId: _,
|
|
205
205
|
stopIfTrue: !!o,
|
|
206
206
|
rule: {
|
|
207
207
|
type: K.highlightCell,
|
|
208
|
-
subType:
|
|
208
|
+
subType: G.timePeriod,
|
|
209
209
|
operator: i,
|
|
210
210
|
style: n
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
|
-
return f.executeCommand(xe.id, { unitId: m, subUnitId:
|
|
213
|
+
return f.executeCommand(xe.id, { unitId: m, subUnitId: w, rule: C });
|
|
214
214
|
}
|
|
215
215
|
}, zo = {
|
|
216
216
|
type: Fe.COMMAND,
|
|
@@ -220,13 +220,13 @@ const Io = {
|
|
|
220
220
|
return !1;
|
|
221
221
|
const { ranges: r, style: n, stopIfTrue: o } = e, i = t.get(Re), c = t.get(me), y = t.get(_e), f = Be(c);
|
|
222
222
|
if (!f) return !1;
|
|
223
|
-
const { unitId: S, subUnitId: m } = f,
|
|
223
|
+
const { unitId: S, subUnitId: m } = f, w = i.createCfId(S, m), _ = {
|
|
224
224
|
ranges: r,
|
|
225
|
-
cfId:
|
|
225
|
+
cfId: w,
|
|
226
226
|
stopIfTrue: !!o,
|
|
227
227
|
rule: {
|
|
228
228
|
type: K.highlightCell,
|
|
229
|
-
subType:
|
|
229
|
+
subType: G.uniqueValues,
|
|
230
230
|
style: n
|
|
231
231
|
}
|
|
232
232
|
};
|
|
@@ -336,7 +336,7 @@ function Es(t) {
|
|
|
336
336
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
337
337
|
}
|
|
338
338
|
function Fo(t) {
|
|
339
|
-
if (t
|
|
339
|
+
if (Object.prototype.hasOwnProperty.call(t, "__esModule")) return t;
|
|
340
340
|
var e = t.default;
|
|
341
341
|
if (typeof e == "function") {
|
|
342
342
|
var r = function n() {
|
|
@@ -360,120 +360,120 @@ function er() {
|
|
|
360
360
|
(function(r, n) {
|
|
361
361
|
n(e);
|
|
362
362
|
})(Ts, function(r) {
|
|
363
|
-
function n(
|
|
364
|
-
return function(ce, T, I, P, z, U,
|
|
365
|
-
return
|
|
363
|
+
function n(F) {
|
|
364
|
+
return function(ce, T, I, P, z, U, V) {
|
|
365
|
+
return F(ce, T, V);
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
|
-
function o(
|
|
368
|
+
function o(F) {
|
|
369
369
|
return function(ce, T, I, P) {
|
|
370
370
|
if (!ce || !T || typeof ce != "object" || typeof T != "object")
|
|
371
|
-
return
|
|
371
|
+
return F(ce, T, I, P);
|
|
372
372
|
var z = P.get(ce), U = P.get(T);
|
|
373
373
|
if (z && U)
|
|
374
374
|
return z === T && U === ce;
|
|
375
375
|
P.set(ce, T), P.set(T, ce);
|
|
376
|
-
var
|
|
377
|
-
return P.delete(ce), P.delete(T),
|
|
376
|
+
var V = F(ce, T, I, P);
|
|
377
|
+
return P.delete(ce), P.delete(T), V;
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
function i(
|
|
380
|
+
function i(F, X) {
|
|
381
381
|
var ce = {};
|
|
382
|
-
for (var T in
|
|
383
|
-
ce[T] =
|
|
384
|
-
for (var T in
|
|
385
|
-
ce[T] =
|
|
382
|
+
for (var T in F)
|
|
383
|
+
ce[T] = F[T];
|
|
384
|
+
for (var T in X)
|
|
385
|
+
ce[T] = X[T];
|
|
386
386
|
return ce;
|
|
387
387
|
}
|
|
388
|
-
function c(
|
|
389
|
-
return
|
|
388
|
+
function c(F) {
|
|
389
|
+
return F.constructor === Object || F.constructor == null;
|
|
390
390
|
}
|
|
391
|
-
function y(
|
|
392
|
-
return typeof
|
|
391
|
+
function y(F) {
|
|
392
|
+
return typeof F.then == "function";
|
|
393
393
|
}
|
|
394
|
-
function f(
|
|
395
|
-
return
|
|
394
|
+
function f(F, X) {
|
|
395
|
+
return F === X || F !== F && X !== X;
|
|
396
396
|
}
|
|
397
|
-
var S = "[object Arguments]", m = "[object Boolean]",
|
|
398
|
-
function d(
|
|
399
|
-
var
|
|
400
|
-
function
|
|
401
|
-
if (
|
|
397
|
+
var S = "[object Arguments]", m = "[object Boolean]", w = "[object Date]", _ = "[object RegExp]", C = "[object Map]", b = "[object Number]", R = "[object Object]", h = "[object Set]", s = "[object String]", a = Object.prototype.toString;
|
|
398
|
+
function d(F) {
|
|
399
|
+
var X = F.areArraysEqual, ce = F.areDatesEqual, T = F.areMapsEqual, I = F.areObjectsEqual, P = F.areRegExpsEqual, z = F.areSetsEqual, U = F.createIsNestedEqual, V = U(Y);
|
|
400
|
+
function Y(j, te, pe) {
|
|
401
|
+
if (j === te)
|
|
402
402
|
return !0;
|
|
403
|
-
if (!
|
|
404
|
-
return
|
|
405
|
-
if (c(
|
|
406
|
-
return I(
|
|
407
|
-
var Qe = Array.isArray(
|
|
403
|
+
if (!j || !te || typeof j != "object" || typeof te != "object")
|
|
404
|
+
return j !== j && te !== te;
|
|
405
|
+
if (c(j) && c(te))
|
|
406
|
+
return I(j, te, V, pe);
|
|
407
|
+
var Qe = Array.isArray(j), Oe = Array.isArray(te);
|
|
408
408
|
if (Qe || Oe)
|
|
409
|
-
return Qe === Oe &&
|
|
410
|
-
var Ce = a.call(
|
|
411
|
-
return Ce !== a.call(
|
|
409
|
+
return Qe === Oe && X(j, te, V, pe);
|
|
410
|
+
var Ce = a.call(j);
|
|
411
|
+
return Ce !== a.call(te) ? !1 : Ce === w ? ce(j, te, V, pe) : Ce === _ ? P(j, te, V, pe) : Ce === C ? T(j, te, V, pe) : Ce === h ? z(j, te, V, pe) : Ce === R || Ce === S ? y(j) || y(te) ? !1 : I(j, te, V, pe) : Ce === m || Ce === b || Ce === s ? f(j.valueOf(), te.valueOf()) : !1;
|
|
412
412
|
}
|
|
413
|
-
return
|
|
413
|
+
return Y;
|
|
414
414
|
}
|
|
415
|
-
function v(
|
|
416
|
-
var I =
|
|
417
|
-
if (
|
|
415
|
+
function v(F, X, ce, T) {
|
|
416
|
+
var I = F.length;
|
|
417
|
+
if (X.length !== I)
|
|
418
418
|
return !1;
|
|
419
419
|
for (; I-- > 0; )
|
|
420
|
-
if (!ce(
|
|
420
|
+
if (!ce(F[I], X[I], I, I, F, X, T))
|
|
421
421
|
return !1;
|
|
422
422
|
return !0;
|
|
423
423
|
}
|
|
424
424
|
var l = o(v);
|
|
425
|
-
function p(
|
|
426
|
-
return f(
|
|
425
|
+
function p(F, X) {
|
|
426
|
+
return f(F.valueOf(), X.valueOf());
|
|
427
427
|
}
|
|
428
|
-
function u(
|
|
429
|
-
var I =
|
|
428
|
+
function u(F, X, ce, T) {
|
|
429
|
+
var I = F.size === X.size;
|
|
430
430
|
if (!I)
|
|
431
431
|
return !1;
|
|
432
|
-
if (!
|
|
432
|
+
if (!F.size)
|
|
433
433
|
return !0;
|
|
434
434
|
var P = {}, z = 0;
|
|
435
|
-
return
|
|
435
|
+
return F.forEach(function(U, V) {
|
|
436
436
|
if (I) {
|
|
437
|
-
var
|
|
438
|
-
|
|
439
|
-
!
|
|
440
|
-
}), z++, I =
|
|
437
|
+
var Y = !1, j = 0;
|
|
438
|
+
X.forEach(function(te, pe) {
|
|
439
|
+
!Y && !P[j] && (Y = ce(V, pe, z, j, F, X, T) && ce(U, te, V, pe, F, X, T)) && (P[j] = !0), j++;
|
|
440
|
+
}), z++, I = Y;
|
|
441
441
|
}
|
|
442
442
|
}), I;
|
|
443
443
|
}
|
|
444
444
|
var g = o(u), x = "_owner", D = Object.prototype.hasOwnProperty;
|
|
445
|
-
function N(
|
|
446
|
-
var I = Object.keys(
|
|
447
|
-
if (Object.keys(
|
|
445
|
+
function N(F, X, ce, T) {
|
|
446
|
+
var I = Object.keys(F), P = I.length;
|
|
447
|
+
if (Object.keys(X).length !== P)
|
|
448
448
|
return !1;
|
|
449
449
|
for (var z; P-- > 0; ) {
|
|
450
450
|
if (z = I[P], z === x) {
|
|
451
|
-
var U = !!
|
|
452
|
-
if ((U ||
|
|
451
|
+
var U = !!F.$$typeof, V = !!X.$$typeof;
|
|
452
|
+
if ((U || V) && U !== V)
|
|
453
453
|
return !1;
|
|
454
454
|
}
|
|
455
|
-
if (!D.call(
|
|
455
|
+
if (!D.call(X, z) || !ce(F[z], X[z], z, z, F, X, T))
|
|
456
456
|
return !1;
|
|
457
457
|
}
|
|
458
458
|
return !0;
|
|
459
459
|
}
|
|
460
460
|
var L = o(N);
|
|
461
|
-
function E(
|
|
462
|
-
return
|
|
461
|
+
function E(F, X) {
|
|
462
|
+
return F.source === X.source && F.flags === X.flags;
|
|
463
463
|
}
|
|
464
|
-
function M(
|
|
465
|
-
var I =
|
|
464
|
+
function M(F, X, ce, T) {
|
|
465
|
+
var I = F.size === X.size;
|
|
466
466
|
if (!I)
|
|
467
467
|
return !1;
|
|
468
|
-
if (!
|
|
468
|
+
if (!F.size)
|
|
469
469
|
return !0;
|
|
470
470
|
var P = {};
|
|
471
|
-
return
|
|
471
|
+
return F.forEach(function(z, U) {
|
|
472
472
|
if (I) {
|
|
473
|
-
var
|
|
474
|
-
|
|
475
|
-
!
|
|
476
|
-
}), I =
|
|
473
|
+
var V = !1, Y = 0;
|
|
474
|
+
X.forEach(function(j, te) {
|
|
475
|
+
!V && !P[Y] && (V = ce(z, j, U, te, F, X, T)) && (P[Y] = !0), Y++;
|
|
476
|
+
}), I = V;
|
|
477
477
|
}
|
|
478
478
|
}), I;
|
|
479
479
|
}
|
|
@@ -485,7 +485,7 @@ function er() {
|
|
|
485
485
|
areRegExpsEqual: E,
|
|
486
486
|
areSetsEqual: M,
|
|
487
487
|
createIsNestedEqual: n
|
|
488
|
-
}),
|
|
488
|
+
}), Q = Object.freeze({
|
|
489
489
|
areArraysEqual: l,
|
|
490
490
|
areDatesEqual: p,
|
|
491
491
|
areMapsEqual: g,
|
|
@@ -494,34 +494,34 @@ function er() {
|
|
|
494
494
|
areSetsEqual: q,
|
|
495
495
|
createIsNestedEqual: n
|
|
496
496
|
}), le = d(A);
|
|
497
|
-
function ie(
|
|
498
|
-
return le(
|
|
497
|
+
function ie(F, X) {
|
|
498
|
+
return le(F, X, void 0);
|
|
499
499
|
}
|
|
500
500
|
var de = d(i(A, { createIsNestedEqual: function() {
|
|
501
501
|
return f;
|
|
502
502
|
} }));
|
|
503
|
-
function k(
|
|
504
|
-
return de(
|
|
503
|
+
function k(F, X) {
|
|
504
|
+
return de(F, X, void 0);
|
|
505
505
|
}
|
|
506
|
-
var
|
|
507
|
-
function oe(
|
|
508
|
-
return
|
|
506
|
+
var ee = d(Q);
|
|
507
|
+
function oe(F, X) {
|
|
508
|
+
return ee(F, X, /* @__PURE__ */ new WeakMap());
|
|
509
509
|
}
|
|
510
|
-
var ue = d(i(
|
|
510
|
+
var ue = d(i(Q, {
|
|
511
511
|
createIsNestedEqual: function() {
|
|
512
512
|
return f;
|
|
513
513
|
}
|
|
514
514
|
}));
|
|
515
|
-
function ge(
|
|
516
|
-
return ue(
|
|
515
|
+
function ge(F, X) {
|
|
516
|
+
return ue(F, X, /* @__PURE__ */ new WeakMap());
|
|
517
517
|
}
|
|
518
|
-
function ye(
|
|
519
|
-
return d(i(A,
|
|
518
|
+
function ye(F) {
|
|
519
|
+
return d(i(A, F(A)));
|
|
520
520
|
}
|
|
521
|
-
function Le(
|
|
522
|
-
var
|
|
521
|
+
function Le(F) {
|
|
522
|
+
var X = d(i(Q, F(Q)));
|
|
523
523
|
return function(ce, T, I) {
|
|
524
|
-
return I === void 0 && (I = /* @__PURE__ */ new WeakMap()),
|
|
524
|
+
return I === void 0 && (I = /* @__PURE__ */ new WeakMap()), X(ce, T, I);
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
527
|
r.circularDeepEqual = oe, r.circularShallowEqual = ge, r.createCustomCircularEqual = Le, r.createCustomEqual = ye, r.deepEqual = ie, r.sameValueZeroEqual = f, r.shallowEqual = k, Object.defineProperty(r, "__esModule", { value: !0 });
|
|
@@ -558,7 +558,7 @@ function Ct() {
|
|
|
558
558
|
if (vr) return se;
|
|
559
559
|
vr = 1, Object.defineProperty(se, "__esModule", {
|
|
560
560
|
value: !0
|
|
561
|
-
}), se.bottom = n, se.childrenEqual = f, se.cloneLayout = o, se.cloneLayoutItem = y, se.collides = m, se.compact =
|
|
561
|
+
}), se.bottom = n, se.childrenEqual = f, se.cloneLayout = o, se.cloneLayoutItem = y, se.collides = m, se.compact = w, se.compactItem = b, se.compactType = F, se.correctBounds = R, se.fastPositionEqual = S, se.fastRGLPropsEqual = void 0, se.getAllCollisions = a, se.getFirstCollision = s, se.getLayoutItem = h, se.getStatics = d, se.modifyLayout = i, se.moveElement = v, se.moveElementAwayFromCollision = l, se.noop = void 0, se.perc = p, se.resizeItemInDirection = de, se.setTopLeft = ee, se.setTransform = k, se.sortLayoutItems = oe, se.sortLayoutItemsByColRow = ge, se.sortLayoutItemsByRowCol = ue, se.synchronizeLayoutWithChildren = ye, se.validateLayout = Le, se.withLayoutItem = c;
|
|
562
562
|
var t = /* @__PURE__ */ er(), e = r(ze);
|
|
563
563
|
function r(T) {
|
|
564
564
|
return T && T.__esModule ? T : { default: T };
|
|
@@ -615,42 +615,42 @@ function Ct() {
|
|
|
615
615
|
function m(T, I) {
|
|
616
616
|
return !(T.i === I.i || T.x + T.w <= I.x || T.x >= I.x + I.w || T.y + T.h <= I.y || T.y >= I.y + I.h);
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
const U = d(T),
|
|
620
|
-
for (let
|
|
621
|
-
let pe = y(
|
|
622
|
-
pe.static || (pe = b(U, pe, I, P,
|
|
618
|
+
function w(T, I, P, z) {
|
|
619
|
+
const U = d(T), V = oe(T, I), Y = Array(T.length);
|
|
620
|
+
for (let j = 0, te = V.length; j < te; j++) {
|
|
621
|
+
let pe = y(V[j]);
|
|
622
|
+
pe.static || (pe = b(U, pe, I, P, V, z), U.push(pe)), Y[T.indexOf(V[j])] = pe, pe.moved = !1;
|
|
623
623
|
}
|
|
624
|
-
return
|
|
624
|
+
return Y;
|
|
625
625
|
}
|
|
626
626
|
const _ = {
|
|
627
627
|
x: "w",
|
|
628
628
|
y: "h"
|
|
629
629
|
};
|
|
630
|
-
function
|
|
630
|
+
function C(T, I, P, z) {
|
|
631
631
|
const U = _[z];
|
|
632
632
|
I[z] += 1;
|
|
633
|
-
const
|
|
634
|
-
for (let
|
|
635
|
-
const
|
|
636
|
-
if (!
|
|
637
|
-
if (
|
|
638
|
-
m(I,
|
|
633
|
+
const V = T.map((Y) => Y.i).indexOf(I.i);
|
|
634
|
+
for (let Y = V + 1; Y < T.length; Y++) {
|
|
635
|
+
const j = T[Y];
|
|
636
|
+
if (!j.static) {
|
|
637
|
+
if (j.y > I.y + I.h) break;
|
|
638
|
+
m(I, j) && C(T, j, P + I[U], z);
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
I[z] = P;
|
|
642
642
|
}
|
|
643
|
-
function b(T, I, P, z, U,
|
|
644
|
-
const
|
|
645
|
-
if (
|
|
643
|
+
function b(T, I, P, z, U, V) {
|
|
644
|
+
const Y = P === "vertical", j = P === "horizontal";
|
|
645
|
+
if (Y)
|
|
646
646
|
for (I.y = Math.min(n(T), I.y); I.y > 0 && !s(T, I); )
|
|
647
647
|
I.y--;
|
|
648
|
-
else if (
|
|
648
|
+
else if (j)
|
|
649
649
|
for (; I.x > 0 && !s(T, I); )
|
|
650
650
|
I.x--;
|
|
651
|
-
let
|
|
652
|
-
for (; (
|
|
653
|
-
if (
|
|
651
|
+
let te;
|
|
652
|
+
for (; (te = s(T, I)) && !(P === null && V); )
|
|
653
|
+
if (j ? C(U, I, te.x + te.w, "x") : C(U, I, te.y + te.h, "y"), j && I.x + I.w > z)
|
|
654
654
|
for (I.x = z - I.w, I.y++; I.x > 0 && !s(T, I); )
|
|
655
655
|
I.x--;
|
|
656
656
|
return I.y = Math.max(I.y, 0), I.x = Math.max(I.x, 0), I;
|
|
@@ -658,11 +658,11 @@ function Ct() {
|
|
|
658
658
|
function R(T, I) {
|
|
659
659
|
const P = d(T);
|
|
660
660
|
for (let z = 0, U = T.length; z < U; z++) {
|
|
661
|
-
const
|
|
662
|
-
if (
|
|
661
|
+
const V = T[z];
|
|
662
|
+
if (V.x + V.w > I.cols && (V.x = I.cols - V.w), V.x < 0 && (V.x = 0, V.w = I.cols), !V.static) P.push(V);
|
|
663
663
|
else
|
|
664
|
-
for (; s(P,
|
|
665
|
-
|
|
664
|
+
for (; s(P, V); )
|
|
665
|
+
V.y++;
|
|
666
666
|
}
|
|
667
667
|
return T;
|
|
668
668
|
}
|
|
@@ -680,46 +680,46 @@ function Ct() {
|
|
|
680
680
|
function d(T) {
|
|
681
681
|
return T.filter((I) => I.static);
|
|
682
682
|
}
|
|
683
|
-
function v(T, I, P, z, U,
|
|
683
|
+
function v(T, I, P, z, U, V, Y, j, te) {
|
|
684
684
|
if (I.static && I.isDraggable !== !0 || I.y === z && I.x === P) return T;
|
|
685
685
|
`${I.i}${String(P)}${String(z)}${I.x}${I.y}`;
|
|
686
686
|
const pe = I.x, Qe = I.y;
|
|
687
687
|
typeof P == "number" && (I.x = P), typeof z == "number" && (I.y = z), I.moved = !0;
|
|
688
|
-
let Oe = oe(T,
|
|
689
|
-
(
|
|
688
|
+
let Oe = oe(T, Y);
|
|
689
|
+
(Y === "vertical" && typeof z == "number" ? Qe >= z : Y === "horizontal" && typeof P == "number" ? pe >= P : !1) && (Oe = Oe.reverse());
|
|
690
690
|
const ut = a(Oe, I), Yt = ut.length > 0;
|
|
691
|
-
if (Yt &&
|
|
691
|
+
if (Yt && te)
|
|
692
692
|
return o(T);
|
|
693
|
-
if (Yt &&
|
|
693
|
+
if (Yt && V)
|
|
694
694
|
return `${I.i}`, I.x = pe, I.y = Qe, I.moved = !1, T;
|
|
695
695
|
for (let Pn = 0, ri = ut.length; Pn < ri; Pn++) {
|
|
696
696
|
const et = ut[Pn];
|
|
697
|
-
`${I.i}${I.x}${I.y}${et.i}${et.x}${et.y}`, !et.moved && (et.static ? T = l(T, et, I, U,
|
|
697
|
+
`${I.i}${I.x}${I.y}${et.i}${et.x}${et.y}`, !et.moved && (et.static ? T = l(T, et, I, U, Y) : T = l(T, I, et, U, Y));
|
|
698
698
|
}
|
|
699
699
|
return T;
|
|
700
700
|
}
|
|
701
|
-
function l(T, I, P, z, U,
|
|
702
|
-
const
|
|
701
|
+
function l(T, I, P, z, U, V) {
|
|
702
|
+
const Y = U === "horizontal", j = U === "vertical", te = I.static;
|
|
703
703
|
if (z) {
|
|
704
704
|
z = !1;
|
|
705
705
|
const Oe = {
|
|
706
|
-
x:
|
|
707
|
-
y:
|
|
706
|
+
x: Y ? Math.max(I.x - P.w, 0) : P.x,
|
|
707
|
+
y: j ? Math.max(I.y - P.h, 0) : P.y,
|
|
708
708
|
w: P.w,
|
|
709
709
|
h: P.h,
|
|
710
710
|
i: "-1"
|
|
711
711
|
}, Ce = s(T, Oe), ut = Ce && Ce.y + Ce.h > I.y, Yt = Ce && I.x + I.w > Ce.x;
|
|
712
712
|
if (Ce) {
|
|
713
|
-
if (ut &&
|
|
714
|
-
return v(T, P, void 0, I.y + 1, z,
|
|
713
|
+
if (ut && j)
|
|
714
|
+
return v(T, P, void 0, I.y + 1, z, te, U);
|
|
715
715
|
if (ut && U == null)
|
|
716
716
|
return I.y = P.y, P.y = P.y + P.h, T;
|
|
717
|
-
if (Yt &&
|
|
718
|
-
return v(T, I, P.x, void 0, z,
|
|
719
|
-
} else return `${P.i}${Oe.x}${Oe.y}`, v(T, P,
|
|
717
|
+
if (Yt && Y)
|
|
718
|
+
return v(T, I, P.x, void 0, z, te, U);
|
|
719
|
+
} else return `${P.i}${Oe.x}${Oe.y}`, v(T, P, Y ? Oe.x : void 0, j ? Oe.y : void 0, z, te, U);
|
|
720
720
|
}
|
|
721
|
-
const pe =
|
|
722
|
-
return pe == null && Qe == null ? T : v(T, P,
|
|
721
|
+
const pe = Y ? P.x + 1 : void 0, Qe = j ? P.y + 1 : void 0;
|
|
722
|
+
return pe == null && Qe == null ? T : v(T, P, Y ? P.x + 1 : void 0, j ? P.y + 1 : void 0, z, te, U);
|
|
723
723
|
}
|
|
724
724
|
function p(T) {
|
|
725
725
|
return T * 100 + "%";
|
|
@@ -728,52 +728,52 @@ function Ct() {
|
|
|
728
728
|
let {
|
|
729
729
|
left: z,
|
|
730
730
|
height: U,
|
|
731
|
-
width:
|
|
731
|
+
width: V
|
|
732
732
|
} = I;
|
|
733
|
-
const
|
|
733
|
+
const Y = T.top - (U - T.height);
|
|
734
734
|
return {
|
|
735
735
|
left: z,
|
|
736
|
-
width:
|
|
737
|
-
height: g(
|
|
738
|
-
top: D(
|
|
736
|
+
width: V,
|
|
737
|
+
height: g(Y, T.height, U),
|
|
738
|
+
top: D(Y)
|
|
739
739
|
};
|
|
740
740
|
}, L = (T, I, P) => {
|
|
741
741
|
let {
|
|
742
742
|
top: z,
|
|
743
743
|
left: U,
|
|
744
|
-
height:
|
|
745
|
-
width:
|
|
744
|
+
height: V,
|
|
745
|
+
width: Y
|
|
746
746
|
} = I;
|
|
747
747
|
return {
|
|
748
748
|
top: z,
|
|
749
|
-
height:
|
|
750
|
-
width: u(T.left, T.width,
|
|
749
|
+
height: V,
|
|
750
|
+
width: u(T.left, T.width, Y, P),
|
|
751
751
|
left: x(U)
|
|
752
752
|
};
|
|
753
753
|
}, E = (T, I, P) => {
|
|
754
754
|
let {
|
|
755
755
|
top: z,
|
|
756
756
|
height: U,
|
|
757
|
-
width:
|
|
757
|
+
width: V
|
|
758
758
|
} = I;
|
|
759
|
-
const
|
|
759
|
+
const Y = T.left - (V - T.width);
|
|
760
760
|
return {
|
|
761
761
|
height: U,
|
|
762
|
-
width:
|
|
762
|
+
width: Y < 0 ? T.width : u(T.left, T.width, V, P),
|
|
763
763
|
top: D(z),
|
|
764
|
-
left: x(
|
|
764
|
+
left: x(Y)
|
|
765
765
|
};
|
|
766
766
|
}, M = (T, I, P) => {
|
|
767
767
|
let {
|
|
768
768
|
top: z,
|
|
769
769
|
left: U,
|
|
770
|
-
height:
|
|
771
|
-
width:
|
|
770
|
+
height: V,
|
|
771
|
+
width: Y
|
|
772
772
|
} = I;
|
|
773
773
|
return {
|
|
774
|
-
width:
|
|
774
|
+
width: Y,
|
|
775
775
|
left: U,
|
|
776
|
-
height: g(z, T.height,
|
|
776
|
+
height: g(z, T.height, V),
|
|
777
777
|
top: D(z)
|
|
778
778
|
};
|
|
779
779
|
}, ie = {
|
|
@@ -808,19 +808,19 @@ function Ct() {
|
|
|
808
808
|
width: z,
|
|
809
809
|
height: U
|
|
810
810
|
} = T;
|
|
811
|
-
const
|
|
811
|
+
const V = `translate(${P}px,${I}px)`;
|
|
812
812
|
return {
|
|
813
|
-
transform:
|
|
814
|
-
WebkitTransform:
|
|
815
|
-
MozTransform:
|
|
816
|
-
msTransform:
|
|
817
|
-
OTransform:
|
|
813
|
+
transform: V,
|
|
814
|
+
WebkitTransform: V,
|
|
815
|
+
MozTransform: V,
|
|
816
|
+
msTransform: V,
|
|
817
|
+
OTransform: V,
|
|
818
818
|
width: `${z}px`,
|
|
819
819
|
height: `${U}px`,
|
|
820
820
|
position: "absolute"
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function ee(T) {
|
|
824
824
|
let {
|
|
825
825
|
top: I,
|
|
826
826
|
left: P,
|
|
@@ -850,45 +850,49 @@ function Ct() {
|
|
|
850
850
|
}
|
|
851
851
|
function ye(T, I, P, z, U) {
|
|
852
852
|
T = T || [];
|
|
853
|
-
const
|
|
854
|
-
e.default.Children.forEach(I, (
|
|
855
|
-
if ((
|
|
856
|
-
const
|
|
857
|
-
|
|
853
|
+
const V = [];
|
|
854
|
+
e.default.Children.forEach(I, (j) => {
|
|
855
|
+
if ((j == null ? void 0 : j.key) == null) return;
|
|
856
|
+
const te = h(T, String(j.key)), pe = j.props["data-grid"];
|
|
857
|
+
te && pe == null ? V.push(y(te)) : pe ? V.push(y({
|
|
858
858
|
...pe,
|
|
859
|
-
i:
|
|
860
|
-
})) :
|
|
859
|
+
i: j.key
|
|
860
|
+
})) : V.push(y({
|
|
861
861
|
w: 1,
|
|
862
862
|
h: 1,
|
|
863
863
|
x: 0,
|
|
864
|
-
y: n(
|
|
865
|
-
i: String(
|
|
864
|
+
y: n(V),
|
|
865
|
+
i: String(j.key)
|
|
866
866
|
}));
|
|
867
867
|
});
|
|
868
|
-
const
|
|
868
|
+
const Y = R(V, {
|
|
869
869
|
cols: P
|
|
870
870
|
});
|
|
871
|
-
return U ?
|
|
871
|
+
return U ? Y : w(Y, z, P);
|
|
872
872
|
}
|
|
873
873
|
function Le(T) {
|
|
874
874
|
let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Layout";
|
|
875
875
|
const P = ["x", "y", "w", "h"];
|
|
876
876
|
if (!Array.isArray(T)) throw new Error(I + " must be an array!");
|
|
877
877
|
for (let z = 0, U = T.length; z < U; z++) {
|
|
878
|
-
const
|
|
879
|
-
for (let
|
|
880
|
-
|
|
881
|
-
|
|
878
|
+
const V = T[z];
|
|
879
|
+
for (let Y = 0; Y < P.length; Y++) {
|
|
880
|
+
const j = P[Y], te = V[j];
|
|
881
|
+
if (typeof te != "number" || Number.isNaN(te))
|
|
882
|
+
throw new Error(`ReactGridLayout: ${I}[${z}].${j} must be a number! Received: ${te} (${typeof te})`);
|
|
883
|
+
}
|
|
884
|
+
if (typeof V.i < "u" && typeof V.i != "string")
|
|
885
|
+
throw new Error(`ReactGridLayout: ${I}[${z}].i must be a string! Received: ${V.i} (${typeof V.i})`);
|
|
882
886
|
}
|
|
883
887
|
}
|
|
884
|
-
function
|
|
888
|
+
function F(T) {
|
|
885
889
|
const {
|
|
886
890
|
verticalCompact: I,
|
|
887
891
|
compactType: P
|
|
888
892
|
} = T || {};
|
|
889
893
|
return I === !1 ? null : P;
|
|
890
894
|
}
|
|
891
|
-
function
|
|
895
|
+
function X() {
|
|
892
896
|
}
|
|
893
897
|
const ce = () => {
|
|
894
898
|
};
|
|
@@ -912,36 +916,37 @@ function nr() {
|
|
|
912
916
|
function e(c, y, f) {
|
|
913
917
|
return Number.isFinite(c) ? Math.round(y * c + Math.max(0, c - 1) * f) : c;
|
|
914
918
|
}
|
|
915
|
-
function r(c, y, f, S, m,
|
|
919
|
+
function r(c, y, f, S, m, w) {
|
|
916
920
|
const {
|
|
917
921
|
margin: _,
|
|
918
|
-
containerPadding:
|
|
922
|
+
containerPadding: C,
|
|
919
923
|
rowHeight: b
|
|
920
924
|
} = c, R = t(c), h = {};
|
|
921
|
-
return
|
|
925
|
+
return w && w.resizing ? (h.width = Math.round(w.resizing.width), h.height = Math.round(w.resizing.height)) : (h.width = e(S, R, _[0]), h.height = e(m, b, _[1])), w && w.dragging ? (h.top = Math.round(w.dragging.top), h.left = Math.round(w.dragging.left)) : w && w.resizing && typeof w.resizing.top == "number" && typeof w.resizing.left == "number" ? (h.top = Math.round(w.resizing.top), h.left = Math.round(w.resizing.left)) : (h.top = Math.round((b + _[1]) * f + C[1]), h.left = Math.round((R + _[0]) * y + C[0])), h;
|
|
922
926
|
}
|
|
923
927
|
function n(c, y, f, S, m) {
|
|
924
928
|
const {
|
|
925
|
-
margin:
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
929
|
+
margin: w,
|
|
930
|
+
containerPadding: _,
|
|
931
|
+
cols: C,
|
|
932
|
+
rowHeight: b,
|
|
933
|
+
maxRows: R
|
|
934
|
+
} = c, h = t(c);
|
|
935
|
+
let s = Math.round((f - _[0]) / (h + w[0])), a = Math.round((y - _[1]) / (b + w[1]));
|
|
936
|
+
return s = i(s, 0, C - S), a = i(a, 0, R - m), {
|
|
937
|
+
x: s,
|
|
938
|
+
y: a
|
|
934
939
|
};
|
|
935
940
|
}
|
|
936
|
-
function o(c, y, f, S, m,
|
|
941
|
+
function o(c, y, f, S, m, w) {
|
|
937
942
|
const {
|
|
938
943
|
margin: _,
|
|
939
|
-
maxRows:
|
|
944
|
+
maxRows: C,
|
|
940
945
|
cols: b,
|
|
941
946
|
rowHeight: R
|
|
942
947
|
} = c, h = t(c);
|
|
943
|
-
let s = Math.round((y + _[0]) / (h + _[0])), a = Math.round((f + _[1]) / (R + _[1])), d = i(s, 0, b - S), v = i(a, 0,
|
|
944
|
-
return ["sw", "w", "nw"].indexOf(
|
|
948
|
+
let s = Math.round((y + _[0]) / (h + _[0])), a = Math.round((f + _[1]) / (R + _[1])), d = i(s, 0, b - S), v = i(a, 0, C - m);
|
|
949
|
+
return ["sw", "w", "nw"].indexOf(w) !== -1 && (d = i(s, 0, b)), ["nw", "n", "ne"].indexOf(w) !== -1 && (v = i(a, 0, C)), {
|
|
945
950
|
w: d,
|
|
946
951
|
h: v
|
|
947
952
|
};
|
|
@@ -968,8 +973,8 @@ function Os() {
|
|
|
968
973
|
function r() {
|
|
969
974
|
}
|
|
970
975
|
return r.resetWarningCache = e, Fn = function() {
|
|
971
|
-
function n(c, y, f, S, m,
|
|
972
|
-
if (
|
|
976
|
+
function n(c, y, f, S, m, w) {
|
|
977
|
+
if (w !== t) {
|
|
973
978
|
var _ = new Error(
|
|
974
979
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
975
980
|
);
|
|
@@ -1088,7 +1093,7 @@ function rr() {
|
|
|
1088
1093
|
if (Er) return ve;
|
|
1089
1094
|
Er = 1, Object.defineProperty(ve, "__esModule", {
|
|
1090
1095
|
value: !0
|
|
1091
|
-
}), ve.addClassName = l, ve.addEvent = y, ve.addUserSelectStyles = d, ve.createCSSTransform = b, ve.createSVGTransform = R, ve.getTouch = s, ve.getTouchIdentifier = a, ve.getTranslation = h, ve.innerHeight =
|
|
1096
|
+
}), ve.addClassName = l, ve.addEvent = y, ve.addUserSelectStyles = d, ve.createCSSTransform = b, ve.createSVGTransform = R, ve.getTouch = s, ve.getTouchIdentifier = a, ve.getTranslation = h, ve.innerHeight = w, ve.innerWidth = _, ve.matchesSelector = i, ve.matchesSelectorAndParentsTo = c, ve.offsetXYFromParent = C, ve.outerHeight = S, ve.outerWidth = m, ve.removeClassName = p, ve.removeEvent = f, ve.removeUserSelectStyles = v;
|
|
1092
1097
|
var t = In(), e = n(Ms());
|
|
1093
1098
|
function r(u) {
|
|
1094
1099
|
if (typeof WeakMap != "function") return null;
|
|
@@ -1154,7 +1159,7 @@ function rr() {
|
|
|
1154
1159
|
const x = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
1155
1160
|
return g += (0, t.int)(x.borderLeftWidth), g += (0, t.int)(x.borderRightWidth), g;
|
|
1156
1161
|
}
|
|
1157
|
-
function
|
|
1162
|
+
function w(u) {
|
|
1158
1163
|
let g = u.clientHeight;
|
|
1159
1164
|
const x = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
1160
1165
|
return g -= (0, t.int)(x.paddingTop), g -= (0, t.int)(x.paddingBottom), g;
|
|
@@ -1164,7 +1169,7 @@ function rr() {
|
|
|
1164
1169
|
const x = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
1165
1170
|
return g -= (0, t.int)(x.paddingLeft), g -= (0, t.int)(x.paddingRight), g;
|
|
1166
1171
|
}
|
|
1167
|
-
function
|
|
1172
|
+
function C(u, g, x) {
|
|
1168
1173
|
const N = g === g.ownerDocument.body ? {
|
|
1169
1174
|
left: 0,
|
|
1170
1175
|
top: 0
|
|
@@ -1235,13 +1240,13 @@ function Wo() {
|
|
|
1235
1240
|
value: !0
|
|
1236
1241
|
}), ke.canDragX = o, ke.canDragY = i, ke.createCoreData = y, ke.createDraggableData = f, ke.getBoundPosition = r, ke.getControlPosition = c, ke.snapToGrid = n;
|
|
1237
1242
|
var t = In(), e = rr();
|
|
1238
|
-
function r(
|
|
1239
|
-
if (!
|
|
1243
|
+
function r(w, _, C) {
|
|
1244
|
+
if (!w.props.bounds) return [_, C];
|
|
1240
1245
|
let {
|
|
1241
1246
|
bounds: b
|
|
1242
|
-
} =
|
|
1247
|
+
} = w.props;
|
|
1243
1248
|
b = typeof b == "string" ? b : S(b);
|
|
1244
|
-
const R = m(
|
|
1249
|
+
const R = m(w);
|
|
1245
1250
|
if (typeof b == "string") {
|
|
1246
1251
|
const {
|
|
1247
1252
|
ownerDocument: h
|
|
@@ -1257,66 +1262,66 @@ function Wo() {
|
|
|
1257
1262
|
bottom: (0, e.innerHeight)(d) - (0, e.outerHeight)(R) - R.offsetTop + (0, t.int)(l.paddingBottom) - (0, t.int)(v.marginBottom)
|
|
1258
1263
|
};
|
|
1259
1264
|
}
|
|
1260
|
-
return (0, t.isNum)(b.right) && (_ = Math.min(_, b.right)), (0, t.isNum)(b.bottom) && (
|
|
1265
|
+
return (0, t.isNum)(b.right) && (_ = Math.min(_, b.right)), (0, t.isNum)(b.bottom) && (C = Math.min(C, b.bottom)), (0, t.isNum)(b.left) && (_ = Math.max(_, b.left)), (0, t.isNum)(b.top) && (C = Math.max(C, b.top)), [_, C];
|
|
1261
1266
|
}
|
|
1262
|
-
function n(
|
|
1263
|
-
const b = Math.round(_ /
|
|
1267
|
+
function n(w, _, C) {
|
|
1268
|
+
const b = Math.round(_ / w[0]) * w[0], R = Math.round(C / w[1]) * w[1];
|
|
1264
1269
|
return [b, R];
|
|
1265
1270
|
}
|
|
1266
|
-
function o(
|
|
1267
|
-
return
|
|
1271
|
+
function o(w) {
|
|
1272
|
+
return w.props.axis === "both" || w.props.axis === "x";
|
|
1268
1273
|
}
|
|
1269
|
-
function i(
|
|
1270
|
-
return
|
|
1274
|
+
function i(w) {
|
|
1275
|
+
return w.props.axis === "both" || w.props.axis === "y";
|
|
1271
1276
|
}
|
|
1272
|
-
function c(
|
|
1273
|
-
const b = typeof _ == "number" ? (0, e.getTouch)(
|
|
1277
|
+
function c(w, _, C) {
|
|
1278
|
+
const b = typeof _ == "number" ? (0, e.getTouch)(w, _) : null;
|
|
1274
1279
|
if (typeof _ == "number" && !b) return null;
|
|
1275
|
-
const R = m(
|
|
1276
|
-
return (0, e.offsetXYFromParent)(b ||
|
|
1280
|
+
const R = m(C), h = C.props.offsetParent || R.offsetParent || R.ownerDocument.body;
|
|
1281
|
+
return (0, e.offsetXYFromParent)(b || w, h, C.props.scale);
|
|
1277
1282
|
}
|
|
1278
|
-
function y(
|
|
1279
|
-
const b = !(0, t.isNum)(
|
|
1283
|
+
function y(w, _, C) {
|
|
1284
|
+
const b = !(0, t.isNum)(w.lastX), R = m(w);
|
|
1280
1285
|
return b ? {
|
|
1281
1286
|
node: R,
|
|
1282
1287
|
deltaX: 0,
|
|
1283
1288
|
deltaY: 0,
|
|
1284
1289
|
lastX: _,
|
|
1285
|
-
lastY:
|
|
1290
|
+
lastY: C,
|
|
1286
1291
|
x: _,
|
|
1287
|
-
y:
|
|
1292
|
+
y: C
|
|
1288
1293
|
} : {
|
|
1289
1294
|
node: R,
|
|
1290
|
-
deltaX: _ -
|
|
1291
|
-
deltaY:
|
|
1292
|
-
lastX:
|
|
1293
|
-
lastY:
|
|
1295
|
+
deltaX: _ - w.lastX,
|
|
1296
|
+
deltaY: C - w.lastY,
|
|
1297
|
+
lastX: w.lastX,
|
|
1298
|
+
lastY: w.lastY,
|
|
1294
1299
|
x: _,
|
|
1295
|
-
y:
|
|
1300
|
+
y: C
|
|
1296
1301
|
};
|
|
1297
1302
|
}
|
|
1298
|
-
function f(
|
|
1299
|
-
const
|
|
1303
|
+
function f(w, _) {
|
|
1304
|
+
const C = w.props.scale;
|
|
1300
1305
|
return {
|
|
1301
1306
|
node: _.node,
|
|
1302
|
-
x:
|
|
1303
|
-
y:
|
|
1304
|
-
deltaX: _.deltaX /
|
|
1305
|
-
deltaY: _.deltaY /
|
|
1306
|
-
lastX:
|
|
1307
|
-
lastY:
|
|
1307
|
+
x: w.state.x + _.deltaX / C,
|
|
1308
|
+
y: w.state.y + _.deltaY / C,
|
|
1309
|
+
deltaX: _.deltaX / C,
|
|
1310
|
+
deltaY: _.deltaY / C,
|
|
1311
|
+
lastX: w.state.x,
|
|
1312
|
+
lastY: w.state.y
|
|
1308
1313
|
};
|
|
1309
1314
|
}
|
|
1310
|
-
function S(
|
|
1315
|
+
function S(w) {
|
|
1311
1316
|
return {
|
|
1312
|
-
left:
|
|
1313
|
-
top:
|
|
1314
|
-
right:
|
|
1315
|
-
bottom:
|
|
1317
|
+
left: w.left,
|
|
1318
|
+
top: w.top,
|
|
1319
|
+
right: w.right,
|
|
1320
|
+
bottom: w.bottom
|
|
1316
1321
|
};
|
|
1317
1322
|
}
|
|
1318
|
-
function m(
|
|
1319
|
-
const _ =
|
|
1323
|
+
function m(w) {
|
|
1324
|
+
const _ = w.findDOMNode();
|
|
1320
1325
|
if (!_)
|
|
1321
1326
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1322
1327
|
return _;
|
|
@@ -1367,9 +1372,9 @@ function Ns() {
|
|
|
1367
1372
|
return d.default = h, a && a.set(h, d), d;
|
|
1368
1373
|
}
|
|
1369
1374
|
function m(h, s, a) {
|
|
1370
|
-
return s =
|
|
1375
|
+
return s = w(s), s in h ? Object.defineProperty(h, s, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : h[s] = a, h;
|
|
1371
1376
|
}
|
|
1372
|
-
function
|
|
1377
|
+
function w(h) {
|
|
1373
1378
|
var s = _(h, "string");
|
|
1374
1379
|
return typeof s == "symbol" ? s : String(s);
|
|
1375
1380
|
}
|
|
@@ -1383,7 +1388,7 @@ function Ns() {
|
|
|
1383
1388
|
}
|
|
1384
1389
|
return (s === "string" ? String : Number)(h);
|
|
1385
1390
|
}
|
|
1386
|
-
const
|
|
1391
|
+
const C = {
|
|
1387
1392
|
touch: {
|
|
1388
1393
|
start: "touchstart",
|
|
1389
1394
|
move: "touchmove",
|
|
@@ -1395,7 +1400,7 @@ function Ns() {
|
|
|
1395
1400
|
stop: "mouseup"
|
|
1396
1401
|
}
|
|
1397
1402
|
};
|
|
1398
|
-
let b =
|
|
1403
|
+
let b = C.mouse, R = class extends t.Component {
|
|
1399
1404
|
constructor() {
|
|
1400
1405
|
super(...arguments), m(this, "dragging", !1), m(this, "lastX", NaN), m(this, "lastY", NaN), m(this, "touchIdentifier", null), m(this, "mounted", !1), m(this, "handleDragStart", (s) => {
|
|
1401
1406
|
if (this.props.onMouseDown(s), !this.props.allowAnyClick && typeof s.button == "number" && s.button !== 0) return !1;
|
|
@@ -1456,12 +1461,12 @@ function Ns() {
|
|
|
1456
1461
|
if (this.props.onStop(s, l) === !1 || this.mounted === !1) return !1;
|
|
1457
1462
|
const u = this.findDOMNode();
|
|
1458
1463
|
u && this.props.enableUserSelectHack && (0, n.removeUserSelectStyles)(u.ownerDocument), (0, c.default)("DraggableCore: handleDragStop: %j", l), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, u && ((0, c.default)("DraggableCore: Removing handlers"), (0, n.removeEvent)(u.ownerDocument, b.move, this.handleDrag), (0, n.removeEvent)(u.ownerDocument, b.stop, this.handleDragStop));
|
|
1459
|
-
}), m(this, "onMouseDown", (s) => (b =
|
|
1464
|
+
}), m(this, "onMouseDown", (s) => (b = C.mouse, this.handleDragStart(s))), m(this, "onMouseUp", (s) => (b = C.mouse, this.handleDragStop(s))), m(this, "onTouchStart", (s) => (b = C.touch, this.handleDragStart(s))), m(this, "onTouchEnd", (s) => (b = C.touch, this.handleDragStop(s)));
|
|
1460
1465
|
}
|
|
1461
1466
|
componentDidMount() {
|
|
1462
1467
|
this.mounted = !0;
|
|
1463
1468
|
const s = this.findDOMNode();
|
|
1464
|
-
s && (0, n.addEvent)(s,
|
|
1469
|
+
s && (0, n.addEvent)(s, C.touch.start, this.onTouchStart, {
|
|
1465
1470
|
passive: !1
|
|
1466
1471
|
});
|
|
1467
1472
|
}
|
|
@@ -1472,7 +1477,7 @@ function Ns() {
|
|
|
1472
1477
|
const {
|
|
1473
1478
|
ownerDocument: a
|
|
1474
1479
|
} = s;
|
|
1475
|
-
(0, n.removeEvent)(a,
|
|
1480
|
+
(0, n.removeEvent)(a, C.mouse.move, this.handleDrag), (0, n.removeEvent)(a, C.touch.move, this.handleDrag), (0, n.removeEvent)(a, C.mouse.stop, this.handleDragStop), (0, n.removeEvent)(a, C.touch.stop, this.handleDragStop), (0, n.removeEvent)(s, C.touch.start, this.onTouchStart, {
|
|
1476
1481
|
passive: !1
|
|
1477
1482
|
}), this.props.enableUserSelectHack && (0, n.removeUserSelectStyles)(a);
|
|
1478
1483
|
}
|
|
@@ -1649,10 +1654,10 @@ function Ls() {
|
|
|
1649
1654
|
function m(a) {
|
|
1650
1655
|
return a && a.__esModule ? a : { default: a };
|
|
1651
1656
|
}
|
|
1652
|
-
function
|
|
1657
|
+
function w(a) {
|
|
1653
1658
|
if (typeof WeakMap != "function") return null;
|
|
1654
1659
|
var d = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap();
|
|
1655
|
-
return (
|
|
1660
|
+
return (w = function(l) {
|
|
1656
1661
|
return l ? v : d;
|
|
1657
1662
|
})(a);
|
|
1658
1663
|
}
|
|
@@ -1661,7 +1666,7 @@ function Ls() {
|
|
|
1661
1666
|
return a;
|
|
1662
1667
|
if (a === null || typeof a != "object" && typeof a != "function")
|
|
1663
1668
|
return { default: a };
|
|
1664
|
-
var v =
|
|
1669
|
+
var v = w(d);
|
|
1665
1670
|
if (v && v.has(a))
|
|
1666
1671
|
return v.get(a);
|
|
1667
1672
|
var l = {}, p = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
@@ -1672,15 +1677,15 @@ function Ls() {
|
|
|
1672
1677
|
}
|
|
1673
1678
|
return l.default = a, v && v.set(a, l), l;
|
|
1674
1679
|
}
|
|
1675
|
-
function
|
|
1676
|
-
return
|
|
1680
|
+
function C() {
|
|
1681
|
+
return C = Object.assign ? Object.assign.bind() : function(a) {
|
|
1677
1682
|
for (var d = 1; d < arguments.length; d++) {
|
|
1678
1683
|
var v = arguments[d];
|
|
1679
1684
|
for (var l in v)
|
|
1680
1685
|
Object.prototype.hasOwnProperty.call(v, l) && (a[l] = v[l]);
|
|
1681
1686
|
}
|
|
1682
1687
|
return a;
|
|
1683
|
-
},
|
|
1688
|
+
}, C.apply(this, arguments);
|
|
1684
1689
|
}
|
|
1685
1690
|
function b(a, d, v) {
|
|
1686
1691
|
return d = R(d), d in a ? Object.defineProperty(a, d, { value: v, enumerable: !0, configurable: !0, writable: !0 }) : a[d] = v, a;
|
|
@@ -1811,18 +1816,18 @@ function Ls() {
|
|
|
1811
1816
|
...E
|
|
1812
1817
|
} = this.props;
|
|
1813
1818
|
let M = {}, q = null;
|
|
1814
|
-
const
|
|
1819
|
+
const Q = !!!D || this.state.dragging, le = D || p, ie = {
|
|
1815
1820
|
// Set left if horizontal drag is enabled
|
|
1816
|
-
x: (0, c.canDragX)(this) &&
|
|
1821
|
+
x: (0, c.canDragX)(this) && Q ? this.state.x : le.x,
|
|
1817
1822
|
// Set top if vertical drag is enabled
|
|
1818
|
-
y: (0, c.canDragY)(this) &&
|
|
1823
|
+
y: (0, c.canDragY)(this) && Q ? this.state.y : le.y
|
|
1819
1824
|
};
|
|
1820
1825
|
this.state.isElementSVG ? q = (0, i.createSVGTransform)(ie, N) : M = (0, i.createCSSTransform)(ie, N);
|
|
1821
1826
|
const de = (0, o.default)(l.props.className || "", u, {
|
|
1822
1827
|
[g]: this.state.dragging,
|
|
1823
1828
|
[x]: this.state.dragged
|
|
1824
1829
|
});
|
|
1825
|
-
return /* @__PURE__ */ e.createElement(f.default,
|
|
1830
|
+
return /* @__PURE__ */ e.createElement(f.default, C({}, E, {
|
|
1826
1831
|
onStart: this.onDragStart,
|
|
1827
1832
|
onDrag: this.onDrag,
|
|
1828
1833
|
onStop: this.onDragStop
|
|
@@ -1979,20 +1984,20 @@ function zs() {
|
|
|
1979
1984
|
function r(f, S) {
|
|
1980
1985
|
var m = Object.keys(f);
|
|
1981
1986
|
if (Object.getOwnPropertySymbols) {
|
|
1982
|
-
var
|
|
1983
|
-
S && (
|
|
1987
|
+
var w = Object.getOwnPropertySymbols(f);
|
|
1988
|
+
S && (w = w.filter(function(_) {
|
|
1984
1989
|
return Object.getOwnPropertyDescriptor(f, _).enumerable;
|
|
1985
|
-
})), m.push.apply(m,
|
|
1990
|
+
})), m.push.apply(m, w);
|
|
1986
1991
|
}
|
|
1987
1992
|
return m;
|
|
1988
1993
|
}
|
|
1989
1994
|
function n(f) {
|
|
1990
1995
|
for (var S = 1; S < arguments.length; S++) {
|
|
1991
1996
|
var m = arguments[S] != null ? arguments[S] : {};
|
|
1992
|
-
S % 2 ? r(Object(m), !0).forEach(function(
|
|
1993
|
-
o(f,
|
|
1994
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(f, Object.getOwnPropertyDescriptors(m)) : r(Object(m)).forEach(function(
|
|
1995
|
-
Object.defineProperty(f,
|
|
1997
|
+
S % 2 ? r(Object(m), !0).forEach(function(w) {
|
|
1998
|
+
o(f, w, m[w]);
|
|
1999
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(f, Object.getOwnPropertyDescriptors(m)) : r(Object(m)).forEach(function(w) {
|
|
2000
|
+
Object.defineProperty(f, w, Object.getOwnPropertyDescriptor(m, w));
|
|
1996
2001
|
});
|
|
1997
2002
|
}
|
|
1998
2003
|
return f;
|
|
@@ -2008,8 +2013,8 @@ function zs() {
|
|
|
2008
2013
|
if (typeof f != "object" || f === null) return f;
|
|
2009
2014
|
var m = f[Symbol.toPrimitive];
|
|
2010
2015
|
if (m !== void 0) {
|
|
2011
|
-
var
|
|
2012
|
-
if (typeof
|
|
2016
|
+
var w = m.call(f, S);
|
|
2017
|
+
if (typeof w != "object") return w;
|
|
2013
2018
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2014
2019
|
}
|
|
2015
2020
|
return (S === "string" ? String : Number)(f);
|
|
@@ -2194,21 +2199,21 @@ function Uo() {
|
|
|
2194
2199
|
for (var a = 1; a < arguments.length; a++) {
|
|
2195
2200
|
var d = arguments[a] != null ? arguments[a] : {};
|
|
2196
2201
|
a % 2 ? S(Object(d), !0).forEach(function(v) {
|
|
2197
|
-
|
|
2202
|
+
w(s, v, d[v]);
|
|
2198
2203
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(d)) : S(Object(d)).forEach(function(v) {
|
|
2199
2204
|
Object.defineProperty(s, v, Object.getOwnPropertyDescriptor(d, v));
|
|
2200
2205
|
});
|
|
2201
2206
|
}
|
|
2202
2207
|
return s;
|
|
2203
2208
|
}
|
|
2204
|
-
function
|
|
2209
|
+
function w(s, a, d) {
|
|
2205
2210
|
return a = _(a), a in s ? Object.defineProperty(s, a, { value: d, enumerable: !0, configurable: !0, writable: !0 }) : s[a] = d, s;
|
|
2206
2211
|
}
|
|
2207
2212
|
function _(s) {
|
|
2208
|
-
var a =
|
|
2213
|
+
var a = C(s, "string");
|
|
2209
2214
|
return typeof a == "symbol" ? a : String(a);
|
|
2210
2215
|
}
|
|
2211
|
-
function
|
|
2216
|
+
function C(s, a) {
|
|
2212
2217
|
if (typeof s != "object" || s === null) return s;
|
|
2213
2218
|
var d = s[Symbol.toPrimitive];
|
|
2214
2219
|
if (d !== void 0) {
|
|
@@ -2245,8 +2250,8 @@ function Uo() {
|
|
|
2245
2250
|
var N = this.props.width / this.props.height, L = l - this.props.width, E = p - this.props.height;
|
|
2246
2251
|
Math.abs(L) > Math.abs(E * N) ? p = l / N : l = p * N;
|
|
2247
2252
|
}
|
|
2248
|
-
var M = l, q = p, A = this.slack || [0, 0],
|
|
2249
|
-
return l +=
|
|
2253
|
+
var M = l, q = p, A = this.slack || [0, 0], Q = A[0], le = A[1];
|
|
2254
|
+
return l += Q, p += le, g && (l = Math.max(g[0], l), p = Math.max(g[1], p)), x && (l = Math.min(x[0], l), p = Math.min(x[1], p)), this.slack = [Q + (M - l), le + (q - p)], [l, p];
|
|
2250
2255
|
}, d.resizeHandler = function(l, p) {
|
|
2251
2256
|
var u = this;
|
|
2252
2257
|
return function(g, x) {
|
|
@@ -2254,20 +2259,20 @@ function Uo() {
|
|
|
2254
2259
|
l === "onResizeStart" && u.resetData();
|
|
2255
2260
|
var E = (u.props.axis === "both" || u.props.axis === "x") && p !== "n" && p !== "s", M = (u.props.axis === "both" || u.props.axis === "y") && p !== "e" && p !== "w";
|
|
2256
2261
|
if (!(!E && !M)) {
|
|
2257
|
-
var q = p[0], A = p[p.length - 1],
|
|
2262
|
+
var q = p[0], A = p[p.length - 1], Q = D.getBoundingClientRect();
|
|
2258
2263
|
if (u.lastHandleRect != null) {
|
|
2259
2264
|
if (A === "w") {
|
|
2260
|
-
var le =
|
|
2265
|
+
var le = Q.left - u.lastHandleRect.left;
|
|
2261
2266
|
N += le;
|
|
2262
2267
|
}
|
|
2263
2268
|
if (q === "n") {
|
|
2264
|
-
var ie =
|
|
2269
|
+
var ie = Q.top - u.lastHandleRect.top;
|
|
2265
2270
|
L += ie;
|
|
2266
2271
|
}
|
|
2267
2272
|
}
|
|
2268
|
-
u.lastHandleRect =
|
|
2269
|
-
var de = u.props.width + (E ? N / u.props.transformScale : 0), k = u.props.height + (M ? L / u.props.transformScale : 0),
|
|
2270
|
-
de =
|
|
2273
|
+
u.lastHandleRect = Q, A === "w" && (N = -N), q === "n" && (L = -L);
|
|
2274
|
+
var de = u.props.width + (E ? N / u.props.transformScale : 0), k = u.props.height + (M ? L / u.props.transformScale : 0), ee = u.runConstraints(de, k);
|
|
2275
|
+
de = ee[0], k = ee[1];
|
|
2271
2276
|
var oe = de !== u.props.width || k !== u.props.height, ue = typeof u.props[l] == "function" ? u.props[l] : null, ge = l === "onResize" && !oe;
|
|
2272
2277
|
ue && !ge && (g.persist == null || g.persist(), ue(g, {
|
|
2273
2278
|
node: D,
|
|
@@ -2380,21 +2385,21 @@ function $s() {
|
|
|
2380
2385
|
for (var d = 1; d < arguments.length; d++) {
|
|
2381
2386
|
var v = arguments[d] != null ? arguments[d] : {};
|
|
2382
2387
|
d % 2 ? S(Object(v), !0).forEach(function(l) {
|
|
2383
|
-
|
|
2388
|
+
w(a, l, v[l]);
|
|
2384
2389
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(v)) : S(Object(v)).forEach(function(l) {
|
|
2385
2390
|
Object.defineProperty(a, l, Object.getOwnPropertyDescriptor(v, l));
|
|
2386
2391
|
});
|
|
2387
2392
|
}
|
|
2388
2393
|
return a;
|
|
2389
2394
|
}
|
|
2390
|
-
function
|
|
2395
|
+
function w(a, d, v) {
|
|
2391
2396
|
return d = _(d), d in a ? Object.defineProperty(a, d, { value: v, enumerable: !0, configurable: !0, writable: !0 }) : a[d] = v, a;
|
|
2392
2397
|
}
|
|
2393
2398
|
function _(a) {
|
|
2394
|
-
var d =
|
|
2399
|
+
var d = C(a, "string");
|
|
2395
2400
|
return typeof d == "symbol" ? d : String(d);
|
|
2396
2401
|
}
|
|
2397
|
-
function
|
|
2402
|
+
function C(a, d) {
|
|
2398
2403
|
if (typeof a != "object" || a === null) return a;
|
|
2399
2404
|
var v = a[Symbol.toPrimitive];
|
|
2400
2405
|
if (v !== void 0) {
|
|
@@ -2450,7 +2455,7 @@ function $s() {
|
|
|
2450
2455
|
p.onResize;
|
|
2451
2456
|
var x = p.onResizeStart, D = p.onResizeStop, N = p.draggableOpts, L = p.minConstraints, E = p.maxConstraints, M = p.lockAspectRatio, q = p.axis;
|
|
2452
2457
|
p.width, p.height;
|
|
2453
|
-
var A = p.resizeHandles,
|
|
2458
|
+
var A = p.resizeHandles, Q = p.style, le = p.transformScale, ie = b(p, o);
|
|
2454
2459
|
return /* @__PURE__ */ t.createElement(r.default, {
|
|
2455
2460
|
axis: q,
|
|
2456
2461
|
draggableOpts: N,
|
|
@@ -2467,7 +2472,7 @@ function $s() {
|
|
|
2467
2472
|
transformScale: le,
|
|
2468
2473
|
width: this.state.width
|
|
2469
2474
|
}, /* @__PURE__ */ t.createElement("div", f({}, ie, {
|
|
2470
|
-
style: m(m({},
|
|
2475
|
+
style: m(m({}, Q), {}, {
|
|
2471
2476
|
width: this.state.width + "px",
|
|
2472
2477
|
height: this.state.height + "px"
|
|
2473
2478
|
})
|
|
@@ -2609,25 +2614,25 @@ function Vs() {
|
|
|
2609
2614
|
value: !0
|
|
2610
2615
|
}), _t.default = void 0;
|
|
2611
2616
|
var t = f(ze), e = f(/* @__PURE__ */ Je()), r = or(), n = ks(), o = Ct(), i = nr(), c = jo(), y = f(tr());
|
|
2612
|
-
function f(
|
|
2613
|
-
return
|
|
2617
|
+
function f(C) {
|
|
2618
|
+
return C && C.__esModule ? C : { default: C };
|
|
2614
2619
|
}
|
|
2615
|
-
function S(
|
|
2616
|
-
return b = m(b), b in
|
|
2620
|
+
function S(C, b, R) {
|
|
2621
|
+
return b = m(b), b in C ? Object.defineProperty(C, b, { value: R, enumerable: !0, configurable: !0, writable: !0 }) : C[b] = R, C;
|
|
2617
2622
|
}
|
|
2618
|
-
function m(
|
|
2619
|
-
var b = C
|
|
2623
|
+
function m(C) {
|
|
2624
|
+
var b = w(C, "string");
|
|
2620
2625
|
return typeof b == "symbol" ? b : String(b);
|
|
2621
2626
|
}
|
|
2622
|
-
function C
|
|
2623
|
-
if (typeof
|
|
2624
|
-
var R =
|
|
2627
|
+
function w(C, b) {
|
|
2628
|
+
if (typeof C != "object" || C === null) return C;
|
|
2629
|
+
var R = C[Symbol.toPrimitive];
|
|
2625
2630
|
if (R !== void 0) {
|
|
2626
|
-
var h = R.call(
|
|
2631
|
+
var h = R.call(C, b);
|
|
2627
2632
|
if (typeof h != "object") return h;
|
|
2628
2633
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2629
2634
|
}
|
|
2630
|
-
return (b === "string" ? String : Number)(
|
|
2635
|
+
return (b === "string" ? String : Number)(C);
|
|
2631
2636
|
}
|
|
2632
2637
|
let _ = class extends t.default.Component {
|
|
2633
2638
|
constructor() {
|
|
@@ -2686,17 +2691,17 @@ function Vs() {
|
|
|
2686
2691
|
} = this.props, N = this.getPositionParams();
|
|
2687
2692
|
if (p) {
|
|
2688
2693
|
const {
|
|
2689
|
-
offsetParent:
|
|
2694
|
+
offsetParent: q
|
|
2690
2695
|
} = h;
|
|
2691
|
-
if (
|
|
2696
|
+
if (q) {
|
|
2692
2697
|
const {
|
|
2693
|
-
margin:
|
|
2694
|
-
rowHeight:
|
|
2695
|
-
containerPadding:
|
|
2696
|
-
} = this.props,
|
|
2697
|
-
v = (0, i.clamp)(v -
|
|
2698
|
-
const
|
|
2699
|
-
l = (0, i.clamp)(l -
|
|
2698
|
+
margin: A,
|
|
2699
|
+
rowHeight: Q,
|
|
2700
|
+
containerPadding: le
|
|
2701
|
+
} = this.props, ie = q.clientHeight - (0, i.calcGridItemWHPx)(x, Q, A[1]);
|
|
2702
|
+
v = (0, i.clamp)(v - le[1], 0, ie);
|
|
2703
|
+
const de = (0, i.calcGridColWidth)(N), k = D - (0, i.calcGridItemWHPx)(g, de, A[0]);
|
|
2704
|
+
l = (0, i.clamp)(l - le[0], 0, k);
|
|
2700
2705
|
}
|
|
2701
2706
|
}
|
|
2702
2707
|
const L = {
|
|
@@ -2707,12 +2712,10 @@ function Vs() {
|
|
|
2707
2712
|
dragging: L
|
|
2708
2713
|
});
|
|
2709
2714
|
const {
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
} = (0, i.calcXY)(N, v - E[1], l - E[0], g, x);
|
|
2715
|
-
return d.call(this, u, M, q, {
|
|
2715
|
+
x: E,
|
|
2716
|
+
y: M
|
|
2717
|
+
} = (0, i.calcXY)(N, v, l, g, x);
|
|
2718
|
+
return d.call(this, u, E, M, {
|
|
2716
2719
|
e: b,
|
|
2717
2720
|
node: h,
|
|
2718
2721
|
newPosition: L
|
|
@@ -2730,26 +2733,25 @@ function Vs() {
|
|
|
2730
2733
|
const {
|
|
2731
2734
|
w: a,
|
|
2732
2735
|
h: d,
|
|
2733
|
-
i: v
|
|
2734
|
-
containerPadding: l
|
|
2736
|
+
i: v
|
|
2735
2737
|
} = this.props, {
|
|
2736
|
-
left:
|
|
2737
|
-
top:
|
|
2738
|
-
} = this.state.dragging,
|
|
2739
|
-
top:
|
|
2740
|
-
left:
|
|
2738
|
+
left: l,
|
|
2739
|
+
top: p
|
|
2740
|
+
} = this.state.dragging, u = {
|
|
2741
|
+
top: p,
|
|
2742
|
+
left: l
|
|
2741
2743
|
};
|
|
2742
2744
|
this.setState({
|
|
2743
2745
|
dragging: null
|
|
2744
2746
|
});
|
|
2745
2747
|
const {
|
|
2746
|
-
x,
|
|
2747
|
-
y:
|
|
2748
|
-
} = (0, i.calcXY)(this.getPositionParams(),
|
|
2749
|
-
return s.call(this, v,
|
|
2748
|
+
x: g,
|
|
2749
|
+
y: x
|
|
2750
|
+
} = (0, i.calcXY)(this.getPositionParams(), p, l, a, d);
|
|
2751
|
+
return s.call(this, v, g, x, {
|
|
2750
2752
|
e: b,
|
|
2751
2753
|
node: h,
|
|
2752
|
-
newPosition:
|
|
2754
|
+
newPosition: u
|
|
2753
2755
|
});
|
|
2754
2756
|
}), S(this, "onResizeStop", (b, R, h) => this.onResizeHandler(b, R, h, "onResizeStop")), S(this, "onResizeStart", (b, R, h) => this.onResizeHandler(b, R, h, "onResizeStart")), S(this, "onResize", (b, R, h) => this.onResizeHandler(b, R, h, "onResize"));
|
|
2755
2757
|
}
|
|
@@ -2973,25 +2975,25 @@ function Vs() {
|
|
|
2973
2975
|
w: e.default.number.isRequired,
|
|
2974
2976
|
h: e.default.number.isRequired,
|
|
2975
2977
|
// All optional
|
|
2976
|
-
minW: function(
|
|
2977
|
-
const R =
|
|
2978
|
+
minW: function(C, b) {
|
|
2979
|
+
const R = C[b];
|
|
2978
2980
|
if (typeof R != "number") return new Error("minWidth not Number");
|
|
2979
|
-
if (R >
|
|
2981
|
+
if (R > C.w || R > C.maxW) return new Error("minWidth larger than item width/maxWidth");
|
|
2980
2982
|
},
|
|
2981
|
-
maxW: function(
|
|
2982
|
-
const R =
|
|
2983
|
+
maxW: function(C, b) {
|
|
2984
|
+
const R = C[b];
|
|
2983
2985
|
if (typeof R != "number") return new Error("maxWidth not Number");
|
|
2984
|
-
if (R <
|
|
2986
|
+
if (R < C.w || R < C.minW) return new Error("maxWidth smaller than item width/minWidth");
|
|
2985
2987
|
},
|
|
2986
|
-
minH: function(
|
|
2987
|
-
const R =
|
|
2988
|
+
minH: function(C, b) {
|
|
2989
|
+
const R = C[b];
|
|
2988
2990
|
if (typeof R != "number") return new Error("minHeight not Number");
|
|
2989
|
-
if (R >
|
|
2991
|
+
if (R > C.h || R > C.maxH) return new Error("minHeight larger than item height/maxHeight");
|
|
2990
2992
|
},
|
|
2991
|
-
maxH: function(
|
|
2992
|
-
const R =
|
|
2993
|
+
maxH: function(C, b) {
|
|
2994
|
+
const R = C[b];
|
|
2993
2995
|
if (typeof R != "number") return new Error("maxHeight not Number");
|
|
2994
|
-
if (R <
|
|
2996
|
+
if (R < C.h || R < C.minH) return new Error("maxHeight smaller than item height/minHeight");
|
|
2995
2997
|
},
|
|
2996
2998
|
// ID is nice to have for callbacks
|
|
2997
2999
|
i: e.default.string.isRequired,
|
|
@@ -3066,9 +3068,9 @@ function Bo() {
|
|
|
3066
3068
|
return d.default = h, a && a.set(h, d), d;
|
|
3067
3069
|
}
|
|
3068
3070
|
function m(h, s, a) {
|
|
3069
|
-
return s =
|
|
3071
|
+
return s = w(s), s in h ? Object.defineProperty(h, s, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : h[s] = a, h;
|
|
3070
3072
|
}
|
|
3071
|
-
function
|
|
3073
|
+
function w(h) {
|
|
3072
3074
|
var s = _(h, "string");
|
|
3073
3075
|
return typeof s == "symbol" ? s : String(s);
|
|
3074
3076
|
}
|
|
@@ -3082,7 +3084,7 @@ function Bo() {
|
|
|
3082
3084
|
}
|
|
3083
3085
|
return (s === "string" ? String : Number)(h);
|
|
3084
3086
|
}
|
|
3085
|
-
const
|
|
3087
|
+
const C = "react-grid-layout";
|
|
3086
3088
|
let b = !1;
|
|
3087
3089
|
try {
|
|
3088
3090
|
b = /firefox/i.test(navigator.userAgent);
|
|
@@ -3217,19 +3219,19 @@ function Bo() {
|
|
|
3217
3219
|
preventCollision: L,
|
|
3218
3220
|
allowOverlap: E
|
|
3219
3221
|
} = this.props;
|
|
3220
|
-
let M = !1, q, A,
|
|
3222
|
+
let M = !1, q, A, Q;
|
|
3221
3223
|
const [le, ie] = (0, n.withLayoutItem)(D, s, (k) => {
|
|
3222
|
-
let
|
|
3223
|
-
return A = k.x,
|
|
3224
|
+
let ee;
|
|
3225
|
+
return A = k.x, Q = k.y, ["sw", "w", "nw", "n", "ne"].indexOf(g) !== -1 && (["sw", "nw", "w"].indexOf(g) !== -1 && (A = k.x + (k.w - a), a = k.x !== A && A < 0 ? k.w : a, A = A < 0 ? 0 : A), ["ne", "n", "nw"].indexOf(g) !== -1 && (Q = k.y + (k.h - d), d = k.y !== Q && Q < 0 ? k.h : d, Q = Q < 0 ? 0 : Q), M = !0), L && !E && (ee = (0, n.getAllCollisions)(D, {
|
|
3224
3226
|
...k,
|
|
3225
3227
|
w: a,
|
|
3226
3228
|
h: d,
|
|
3227
3229
|
x: A,
|
|
3228
|
-
y:
|
|
3229
|
-
}).filter((ue) => ue.i !== k.i).length > 0,
|
|
3230
|
+
y: Q
|
|
3231
|
+
}).filter((ue) => ue.i !== k.i).length > 0, ee && (Q = k.y, d = k.h, A = k.x, a = k.w, M = !1)), k.w = a, k.h = d, k;
|
|
3230
3232
|
});
|
|
3231
3233
|
if (!ie) return;
|
|
3232
|
-
q = le, M && (q = (0, n.moveElement)(le, ie, A,
|
|
3234
|
+
q = le, M && (q = (0, n.moveElement)(le, ie, A, Q, !0, this.props.preventCollision, (0, n.compactType)(this.props), N, E));
|
|
3233
3235
|
const de = {
|
|
3234
3236
|
w: ie.w,
|
|
3235
3237
|
h: ie.h,
|
|
@@ -3268,7 +3270,7 @@ function Bo() {
|
|
|
3268
3270
|
}), m(this, "onDragOver", (s) => {
|
|
3269
3271
|
var le;
|
|
3270
3272
|
if (s.preventDefault(), s.stopPropagation(), b && // $FlowIgnore can't figure this out
|
|
3271
|
-
!((le = s.nativeEvent.target) != null && le.classList.contains(
|
|
3273
|
+
!((le = s.nativeEvent.target) != null && le.classList.contains(C)))
|
|
3272
3274
|
return !1;
|
|
3273
3275
|
const {
|
|
3274
3276
|
droppingItem: a,
|
|
@@ -3288,7 +3290,7 @@ function Bo() {
|
|
|
3288
3290
|
...N
|
|
3289
3291
|
}, {
|
|
3290
3292
|
layout: E
|
|
3291
|
-
} = this.state, M = s.currentTarget.getBoundingClientRect(), q = s.clientX - M.left, A = s.clientY - M.top,
|
|
3293
|
+
} = this.state, M = s.currentTarget.getBoundingClientRect(), q = s.clientX - M.left, A = s.clientY - M.top, Q = {
|
|
3292
3294
|
left: q / D,
|
|
3293
3295
|
top: A / D,
|
|
3294
3296
|
e: s
|
|
@@ -3300,7 +3302,7 @@ function Bo() {
|
|
|
3300
3302
|
top: de
|
|
3301
3303
|
} = this.state.droppingPosition;
|
|
3302
3304
|
(ie != q || de != A) && this.setState({
|
|
3303
|
-
droppingPosition:
|
|
3305
|
+
droppingPosition: Q
|
|
3304
3306
|
});
|
|
3305
3307
|
}
|
|
3306
3308
|
} else {
|
|
@@ -3316,7 +3318,7 @@ function Bo() {
|
|
|
3316
3318
|
droppingDOMNode: /* @__PURE__ */ t.createElement("div", {
|
|
3317
3319
|
key: L.i
|
|
3318
3320
|
}),
|
|
3319
|
-
droppingPosition:
|
|
3321
|
+
droppingPosition: Q,
|
|
3320
3322
|
layout: [...E, {
|
|
3321
3323
|
...L,
|
|
3322
3324
|
x: de.x,
|
|
@@ -3457,12 +3459,12 @@ function Bo() {
|
|
|
3457
3459
|
transformScale: M,
|
|
3458
3460
|
draggableCancel: q,
|
|
3459
3461
|
draggableHandle: A,
|
|
3460
|
-
resizeHandles:
|
|
3462
|
+
resizeHandles: Q,
|
|
3461
3463
|
resizeHandle: le
|
|
3462
3464
|
} = this.props, {
|
|
3463
3465
|
mounted: ie,
|
|
3464
3466
|
droppingPosition: de
|
|
3465
|
-
} = this.state, k = typeof d.isDraggable == "boolean" ? d.isDraggable : !d.static && D,
|
|
3467
|
+
} = this.state, k = typeof d.isDraggable == "boolean" ? d.isDraggable : !d.static && D, ee = typeof d.isResizable == "boolean" ? d.isResizable : !d.static && N, oe = d.resizeHandles || Q, ue = k && L && d.isBounded !== !1;
|
|
3466
3468
|
return /* @__PURE__ */ t.createElement(i.default, {
|
|
3467
3469
|
containerWidth: v,
|
|
3468
3470
|
cols: l,
|
|
@@ -3479,7 +3481,7 @@ function Bo() {
|
|
|
3479
3481
|
onResize: this.onResize,
|
|
3480
3482
|
onResizeStop: this.onResizeStop,
|
|
3481
3483
|
isDraggable: k,
|
|
3482
|
-
isResizable:
|
|
3484
|
+
isResizable: ee,
|
|
3483
3485
|
isBounded: ue,
|
|
3484
3486
|
useCSSTransforms: E && ie,
|
|
3485
3487
|
usePercentages: !ie,
|
|
@@ -3505,7 +3507,7 @@ function Bo() {
|
|
|
3505
3507
|
style: a,
|
|
3506
3508
|
isDroppable: d,
|
|
3507
3509
|
innerRef: v
|
|
3508
|
-
} = this.props, l = (0, r.default)(
|
|
3510
|
+
} = this.props, l = (0, r.default)(C, s), p = {
|
|
3509
3511
|
height: this.containerHeight(),
|
|
3510
3512
|
...a
|
|
3511
3513
|
};
|
|
@@ -3571,8 +3573,8 @@ function Go() {
|
|
|
3571
3573
|
const y = o(i);
|
|
3572
3574
|
let f = y[0];
|
|
3573
3575
|
for (let S = 1, m = y.length; S < m; S++) {
|
|
3574
|
-
const
|
|
3575
|
-
c > i[
|
|
3576
|
+
const w = y[S];
|
|
3577
|
+
c > i[w] && (f = w);
|
|
3576
3578
|
}
|
|
3577
3579
|
return f;
|
|
3578
3580
|
}
|
|
@@ -3583,16 +3585,16 @@ function Go() {
|
|
|
3583
3585
|
}
|
|
3584
3586
|
function n(i, c, y, f, S, m) {
|
|
3585
3587
|
if (i[y]) return (0, t.cloneLayout)(i[y]);
|
|
3586
|
-
let
|
|
3587
|
-
const _ = o(c),
|
|
3588
|
-
for (let b = 0, R =
|
|
3589
|
-
const h =
|
|
3588
|
+
let w = i[f];
|
|
3589
|
+
const _ = o(c), C = _.slice(_.indexOf(y));
|
|
3590
|
+
for (let b = 0, R = C.length; b < R; b++) {
|
|
3591
|
+
const h = C[b];
|
|
3590
3592
|
if (i[h]) {
|
|
3591
|
-
|
|
3593
|
+
w = i[h];
|
|
3592
3594
|
break;
|
|
3593
3595
|
}
|
|
3594
3596
|
}
|
|
3595
|
-
return
|
|
3597
|
+
return w = (0, t.cloneLayout)(w || []), (0, t.compact)((0, t.correctBounds)(w, {
|
|
3596
3598
|
cols: S
|
|
3597
3599
|
}), m, S);
|
|
3598
3600
|
}
|
|
@@ -3643,9 +3645,9 @@ function Fs() {
|
|
|
3643
3645
|
}, S.apply(this, arguments);
|
|
3644
3646
|
}
|
|
3645
3647
|
function m(h, s, a) {
|
|
3646
|
-
return s =
|
|
3648
|
+
return s = w(s), s in h ? Object.defineProperty(h, s, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : h[s] = a, h;
|
|
3647
3649
|
}
|
|
3648
|
-
function
|
|
3650
|
+
function w(h) {
|
|
3649
3651
|
var s = _(h, "string");
|
|
3650
3652
|
return typeof s == "symbol" ? s : String(s);
|
|
3651
3653
|
}
|
|
@@ -3659,7 +3661,7 @@ function Fs() {
|
|
|
3659
3661
|
}
|
|
3660
3662
|
return (s === "string" ? String : Number)(h);
|
|
3661
3663
|
}
|
|
3662
|
-
const
|
|
3664
|
+
const C = (h) => Object.prototype.toString.call(h);
|
|
3663
3665
|
function b(h, s) {
|
|
3664
3666
|
return h == null ? null : Array.isArray(h) ? h : h[s];
|
|
3665
3667
|
}
|
|
@@ -3717,7 +3719,7 @@ function Fs() {
|
|
|
3717
3719
|
if (u !== p || s.breakpoints !== a || s.cols !== d) {
|
|
3718
3720
|
u in x || (x[u] = (0, n.cloneLayout)(this.state.layout));
|
|
3719
3721
|
let L = (0, o.findOrGenerateResponsiveLayout)(x, a, p, u, g, l);
|
|
3720
|
-
L = (0, n.synchronizeLayoutWithChildren)(L, this.props.children, g, l, this.props.allowOverlap), x[p] = L, this.props.
|
|
3722
|
+
L = (0, n.synchronizeLayoutWithChildren)(L, this.props.children, g, l, this.props.allowOverlap), x[p] = L, this.props.onBreakpointChange(p, g), this.props.onLayoutChange(L, x), this.setState({
|
|
3721
3723
|
breakpoint: p,
|
|
3722
3724
|
layout: L,
|
|
3723
3725
|
cols: g
|
|
@@ -3774,8 +3776,8 @@ function Fs() {
|
|
|
3774
3776
|
// layouts is an object mapping breakpoints to layouts.
|
|
3775
3777
|
// e.g. {lg: Layout, md: Layout, ...}
|
|
3776
3778
|
layouts(h, s) {
|
|
3777
|
-
if (
|
|
3778
|
-
throw new Error("Layout property must be an object. Received: " +
|
|
3779
|
+
if (C(h[s]) !== "[object Object]")
|
|
3780
|
+
throw new Error("Layout property must be an object. Received: " + C(h[s]));
|
|
3779
3781
|
Object.keys(h[s]).forEach((a) => {
|
|
3780
3782
|
if (!(a in h.breakpoints))
|
|
3781
3783
|
throw new Error("Each key in layouts must align with a key in breakpoints.");
|
|
@@ -4123,57 +4125,57 @@ function sa() {
|
|
|
4123
4125
|
value: !0
|
|
4124
4126
|
}), Qt.default = _;
|
|
4125
4127
|
var t = c(ze), e = o(/* @__PURE__ */ Je()), r = o(ia), n = o(tr());
|
|
4126
|
-
function o(
|
|
4127
|
-
return
|
|
4128
|
+
function o(C) {
|
|
4129
|
+
return C && C.__esModule ? C : { default: C };
|
|
4128
4130
|
}
|
|
4129
|
-
function i(
|
|
4131
|
+
function i(C) {
|
|
4130
4132
|
if (typeof WeakMap != "function") return null;
|
|
4131
4133
|
var b = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap();
|
|
4132
4134
|
return (i = function(h) {
|
|
4133
4135
|
return h ? R : b;
|
|
4134
|
-
})(
|
|
4136
|
+
})(C);
|
|
4135
4137
|
}
|
|
4136
|
-
function c(
|
|
4137
|
-
if (
|
|
4138
|
-
if (
|
|
4138
|
+
function c(C, b) {
|
|
4139
|
+
if (C && C.__esModule) return C;
|
|
4140
|
+
if (C === null || typeof C != "object" && typeof C != "function") return { default: C };
|
|
4139
4141
|
var R = i(b);
|
|
4140
|
-
if (R && R.has(
|
|
4142
|
+
if (R && R.has(C)) return R.get(C);
|
|
4141
4143
|
var h = { __proto__: null }, s = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
4142
|
-
for (var a in
|
|
4143
|
-
var d = s ? Object.getOwnPropertyDescriptor(
|
|
4144
|
-
d && (d.get || d.set) ? Object.defineProperty(h, a, d) : h[a] =
|
|
4144
|
+
for (var a in C) if (a !== "default" && Object.prototype.hasOwnProperty.call(C, a)) {
|
|
4145
|
+
var d = s ? Object.getOwnPropertyDescriptor(C, a) : null;
|
|
4146
|
+
d && (d.get || d.set) ? Object.defineProperty(h, a, d) : h[a] = C[a];
|
|
4145
4147
|
}
|
|
4146
|
-
return h.default =
|
|
4148
|
+
return h.default = C, R && R.set(C, h), h;
|
|
4147
4149
|
}
|
|
4148
4150
|
function y() {
|
|
4149
|
-
return y = Object.assign ? Object.assign.bind() : function(
|
|
4151
|
+
return y = Object.assign ? Object.assign.bind() : function(C) {
|
|
4150
4152
|
for (var b = 1; b < arguments.length; b++) {
|
|
4151
4153
|
var R = arguments[b];
|
|
4152
4154
|
for (var h in R)
|
|
4153
|
-
Object.prototype.hasOwnProperty.call(R, h) && (
|
|
4155
|
+
Object.prototype.hasOwnProperty.call(R, h) && (C[h] = R[h]);
|
|
4154
4156
|
}
|
|
4155
|
-
return
|
|
4157
|
+
return C;
|
|
4156
4158
|
}, y.apply(this, arguments);
|
|
4157
4159
|
}
|
|
4158
|
-
function f(
|
|
4159
|
-
return b = S(b), b in
|
|
4160
|
+
function f(C, b, R) {
|
|
4161
|
+
return b = S(b), b in C ? Object.defineProperty(C, b, { value: R, enumerable: !0, configurable: !0, writable: !0 }) : C[b] = R, C;
|
|
4160
4162
|
}
|
|
4161
|
-
function S(
|
|
4162
|
-
var b = m(
|
|
4163
|
+
function S(C) {
|
|
4164
|
+
var b = m(C, "string");
|
|
4163
4165
|
return typeof b == "symbol" ? b : String(b);
|
|
4164
4166
|
}
|
|
4165
|
-
function m(
|
|
4166
|
-
if (typeof
|
|
4167
|
-
var R =
|
|
4167
|
+
function m(C, b) {
|
|
4168
|
+
if (typeof C != "object" || C === null) return C;
|
|
4169
|
+
var R = C[Symbol.toPrimitive];
|
|
4168
4170
|
if (R !== void 0) {
|
|
4169
|
-
var h = R.call(
|
|
4171
|
+
var h = R.call(C, b);
|
|
4170
4172
|
if (typeof h != "object") return h;
|
|
4171
4173
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4172
4174
|
}
|
|
4173
|
-
return (b === "string" ? String : Number)(
|
|
4175
|
+
return (b === "string" ? String : Number)(C);
|
|
4174
4176
|
}
|
|
4175
|
-
const
|
|
4176
|
-
function _(
|
|
4177
|
+
const w = "react-grid-layout";
|
|
4178
|
+
function _(C) {
|
|
4177
4179
|
var b;
|
|
4178
4180
|
return b = class extends t.Component {
|
|
4179
4181
|
constructor() {
|
|
@@ -4204,10 +4206,10 @@ function sa() {
|
|
|
4204
4206
|
...s
|
|
4205
4207
|
} = this.props;
|
|
4206
4208
|
return h && !this.mounted ? /* @__PURE__ */ t.createElement("div", {
|
|
4207
|
-
className: (0, n.default)(this.props.className,
|
|
4209
|
+
className: (0, n.default)(this.props.className, w),
|
|
4208
4210
|
style: this.props.style,
|
|
4209
4211
|
ref: this.elementRef
|
|
4210
|
-
}) : /* @__PURE__ */ t.createElement(
|
|
4212
|
+
}) : /* @__PURE__ */ t.createElement(C, y({
|
|
4211
4213
|
innerRef: this.elementRef
|
|
4212
4214
|
}, s, this.state));
|
|
4213
4215
|
}
|
|
@@ -4259,12 +4261,12 @@ let vt = class extends Ne {
|
|
|
4259
4261
|
return this._findReplaceIndex(i).forEach((y, f, S) => {
|
|
4260
4262
|
const m = S[f - 1] || { endIndex: -1 };
|
|
4261
4263
|
if (m.endIndex + 1 < y.startIndex) {
|
|
4262
|
-
const
|
|
4263
|
-
|
|
4264
|
+
const w = i.slice(m.endIndex + 1, y.startIndex);
|
|
4265
|
+
w && c.push(w);
|
|
4264
4266
|
}
|
|
4265
4267
|
if (r[y.key] && c.push(r[y.key]), f === S.length - 1) {
|
|
4266
|
-
const
|
|
4267
|
-
|
|
4268
|
+
const w = i.slice(y.endIndex + 1);
|
|
4269
|
+
w && c.push(w);
|
|
4268
4270
|
}
|
|
4269
4271
|
}), c;
|
|
4270
4272
|
}
|
|
@@ -4272,7 +4274,7 @@ let vt = class extends Ne {
|
|
|
4272
4274
|
}
|
|
4273
4275
|
};
|
|
4274
4276
|
vt = da([
|
|
4275
|
-
fa(0,
|
|
4277
|
+
fa(0, J(Te))
|
|
4276
4278
|
], vt);
|
|
4277
4279
|
const ha = "univer-cf-preview", en = {
|
|
4278
4280
|
cfPreview: ha
|
|
@@ -4284,7 +4286,7 @@ const ha = "univer-cf-preview", en = {
|
|
|
4284
4286
|
const r = Se(() => {
|
|
4285
4287
|
if (e.type === K.colorScale) {
|
|
4286
4288
|
const c = e.config.map((S, m) => ({ color: new no(S.color), value: m })), y = c.length - 1;
|
|
4287
|
-
return new Array(5).fill("").map((S, m,
|
|
4289
|
+
return new Array(5).fill("").map((S, m, w) => m * y / (w.length - 1)).map((S) => fi(c, S));
|
|
4288
4290
|
}
|
|
4289
4291
|
return null;
|
|
4290
4292
|
}, [e]), n = Se(() => {
|
|
@@ -4297,7 +4299,7 @@ const ha = "univer-cf-preview", en = {
|
|
|
4297
4299
|
switch (e.type) {
|
|
4298
4300
|
case K.dataBar: {
|
|
4299
4301
|
const { isGradient: c } = e.config, y = { width: "50%", height: "100%" }, f = c ? `linear-gradient(to right, ${e.config.positiveColor || Vt}, rgb(255 255 255))` : e.config.positiveColor, S = c ? `linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor || Ft})` : e.config.nativeColor;
|
|
4300
|
-
return /* @__PURE__ */
|
|
4302
|
+
return /* @__PURE__ */ B("div", { className: en.cfPreview, children: [
|
|
4301
4303
|
/* @__PURE__ */ O("div", { style: { ...y, background: S, border: `1px solid ${e.config.nativeColor || Ft}` } }),
|
|
4302
4304
|
/* @__PURE__ */ O("div", { style: { ...y, background: f, border: `1px solid ${e.config.positiveColor || Vt}` } })
|
|
4303
4305
|
] });
|
|
@@ -4307,10 +4309,10 @@ const ha = "univer-cf-preview", en = {
|
|
|
4307
4309
|
case K.iconSet:
|
|
4308
4310
|
return n && /* @__PURE__ */ O("div", { className: en.cfPreview, children: n.map((c, y) => c ? /* @__PURE__ */ O("img", { style: { height: "100%" }, src: c }, y) : /* @__PURE__ */ O(Xt, {}, y)) });
|
|
4309
4311
|
case K.highlightCell: {
|
|
4310
|
-
const { ul: c, st: y, it: f, bl: S, bg: m, cl:
|
|
4312
|
+
const { ul: c, st: y, it: f, bl: S, bg: m, cl: w } = e.style, _ = (c == null ? void 0 : c.s) === De.TRUE, C = (y == null ? void 0 : y.s) === De.TRUE, b = f === De.TRUE, R = S === De.TRUE, h = (o = m == null ? void 0 : m.rgb) != null ? o : hi, s = (i = w == null ? void 0 : w.rgb) != null ? i : pi, a = {
|
|
4311
4313
|
fontWeight: R ? "bold" : void 0,
|
|
4312
4314
|
fontStyle: b ? "italic" : void 0,
|
|
4313
|
-
textDecoration: `${_ ? "underline" : ""} ${
|
|
4315
|
+
textDecoration: `${_ ? "underline" : ""} ${C ? "line-through" : ""}`.replace(/^ /, "") || void 0,
|
|
4314
4316
|
backgroundColor: h,
|
|
4315
4317
|
color: s
|
|
4316
4318
|
};
|
|
@@ -4345,69 +4347,69 @@ const ha = "univer-cf-preview", en = {
|
|
|
4345
4347
|
return e.t("sheet.cf.ruleType.iconSet");
|
|
4346
4348
|
case K.highlightCell:
|
|
4347
4349
|
switch (r.subType) {
|
|
4348
|
-
case
|
|
4350
|
+
case G.average: {
|
|
4349
4351
|
const n = r.operator;
|
|
4350
4352
|
return e.t(`sheet.cf.preview.describe.${n}`, e.t("sheet.cf.subRuleType.average"));
|
|
4351
4353
|
}
|
|
4352
|
-
case
|
|
4354
|
+
case G.duplicateValues:
|
|
4353
4355
|
return e.t("sheet.cf.subRuleType.duplicateValues");
|
|
4354
|
-
case
|
|
4356
|
+
case G.uniqueValues:
|
|
4355
4357
|
return e.t("sheet.cf.subRuleType.uniqueValues");
|
|
4356
|
-
case
|
|
4358
|
+
case G.number: {
|
|
4357
4359
|
const n = r.operator;
|
|
4358
4360
|
return e.t(`sheet.cf.preview.describe.${n}`, ...Array.isArray(r.value) ? r.value.map((o) => String(o)) : [String(r.value || "")]);
|
|
4359
4361
|
}
|
|
4360
|
-
case
|
|
4362
|
+
case G.text: {
|
|
4361
4363
|
const n = r.operator;
|
|
4362
4364
|
return e.t(`sheet.cf.preview.describe.${n}`, r.value || "");
|
|
4363
4365
|
}
|
|
4364
|
-
case
|
|
4366
|
+
case G.timePeriod: {
|
|
4365
4367
|
const n = r.operator;
|
|
4366
4368
|
return e.t(`sheet.cf.preview.describe.${n}`);
|
|
4367
4369
|
}
|
|
4368
|
-
case
|
|
4370
|
+
case G.rank:
|
|
4369
4371
|
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));
|
|
4370
|
-
case
|
|
4372
|
+
case G.formula:
|
|
4371
4373
|
return e.t("sheet.cf.ruleType.formula");
|
|
4372
4374
|
}
|
|
4373
4375
|
}
|
|
4374
4376
|
};
|
|
4375
4377
|
let Ur = 0;
|
|
4376
4378
|
const Pa = (t) => {
|
|
4377
|
-
const { onClick: e } = t, r = fe(Re), n = fe(me), o = fe(yt), i = fe(_e), c = fe(Te), y = fe(qe), f = fe(So), S = fe(vt), m = Vi(() => n.getCurrentTypeOfUnit$(re.UNIVER_SHEET), void 0, void 0, []),
|
|
4379
|
+
const { onClick: e } = t, r = fe(Re), n = fe(me), o = fe(yt), i = fe(_e), c = fe(Te), y = fe(qe), f = fe(So), S = fe(vt), m = Vi(() => n.getCurrentTypeOfUnit$(re.UNIVER_SHEET), void 0, void 0, []), w = m.getUnitId(), _ = m.getActiveSheet();
|
|
4378
4380
|
if (!_)
|
|
4379
4381
|
throw new Error("No active sheet found");
|
|
4380
|
-
const
|
|
4382
|
+
const C = _.getSheetId(), [b, R] = H([]), [h, s] = H("2"), [a, d] = H(0), [v, l] = H(-1), [p, u] = H(Ur), g = Ve(null), x = [
|
|
4381
4383
|
{ label: c.t("sheet.cf.panel.workSheet"), value: "2" },
|
|
4382
4384
|
{ label: c.t("sheet.cf.panel.selectedRange"), value: "1" }
|
|
4383
4385
|
], D = () => {
|
|
4384
|
-
const k = r.getSubunitRules(
|
|
4386
|
+
const k = r.getSubunitRules(w, C);
|
|
4385
4387
|
if (!k || !k.length)
|
|
4386
4388
|
return [];
|
|
4387
4389
|
if (h === "1") {
|
|
4388
|
-
const
|
|
4389
|
-
if (!
|
|
4390
|
+
const ee = o.getCurrentLastSelection();
|
|
4391
|
+
if (!ee)
|
|
4390
4392
|
return [];
|
|
4391
|
-
const oe =
|
|
4393
|
+
const oe = ee.range;
|
|
4392
4394
|
return k.filter((ge) => ge.ranges.some((ye) => Ue.intersects(ye, oe)));
|
|
4393
4395
|
} else if (h === "2")
|
|
4394
4396
|
return [...k];
|
|
4395
4397
|
return [];
|
|
4396
4398
|
}, [N, L] = H(D);
|
|
4397
4399
|
Yi(b), we(() => {
|
|
4398
|
-
const k = i.onCommandExecuted((
|
|
4399
|
-
|
|
4400
|
+
const k = i.onCommandExecuted((ee) => {
|
|
4401
|
+
ee.id === Kn.id && d(Math.random());
|
|
4400
4402
|
});
|
|
4401
4403
|
return () => k.dispose();
|
|
4402
4404
|
}), we(() => {
|
|
4403
4405
|
L(D);
|
|
4404
|
-
}, [h, a,
|
|
4406
|
+
}, [h, a, w, C]), we(() => {
|
|
4405
4407
|
if (h === "2")
|
|
4406
4408
|
return;
|
|
4407
|
-
const k = new ot((
|
|
4409
|
+
const k = new ot((ee) => {
|
|
4408
4410
|
const oe = [Ti.id, xe.id, Ke.id, Ze.id, co.id], ue = i.onCommandExecuted((ge) => {
|
|
4409
|
-
const { id: ye, params: Le } = ge,
|
|
4410
|
-
oe.includes(ye) && Le.unitId ===
|
|
4411
|
+
const { id: ye, params: Le } = ge, F = n.getCurrentUnitOfType(re.UNIVER_SHEET).getUnitId();
|
|
4412
|
+
oe.includes(ye) && Le.unitId === F && ee.next(null);
|
|
4411
4413
|
});
|
|
4412
4414
|
return () => ue.dispose();
|
|
4413
4415
|
}).pipe(dr(16)).subscribe(() => {
|
|
@@ -4416,7 +4418,7 @@ const Pa = (t) => {
|
|
|
4416
4418
|
return () => {
|
|
4417
4419
|
k.unsubscribe();
|
|
4418
4420
|
};
|
|
4419
|
-
}, [n, h,
|
|
4421
|
+
}, [n, h, w, C]), we(() => {
|
|
4420
4422
|
const k = r.$ruleChange.subscribe(() => {
|
|
4421
4423
|
d(Math.random());
|
|
4422
4424
|
});
|
|
@@ -4434,11 +4436,11 @@ const Pa = (t) => {
|
|
|
4434
4436
|
}, 150);
|
|
4435
4437
|
const Le = () => {
|
|
4436
4438
|
ye && clearTimeout(ye), ye = null;
|
|
4437
|
-
},
|
|
4438
|
-
|
|
4439
|
+
}, F = (X) => {
|
|
4440
|
+
X.propertyName === "width" && (Le(), ue.next());
|
|
4439
4441
|
};
|
|
4440
|
-
return ge.addEventListener("transitionend",
|
|
4441
|
-
Le(), ge.removeEventListener("transitionend",
|
|
4442
|
+
return ge.addEventListener("transitionend", F), () => {
|
|
4443
|
+
Le(), ge.removeEventListener("transitionend", F);
|
|
4442
4444
|
};
|
|
4443
4445
|
}
|
|
4444
4446
|
}).pipe(dr(16)).subscribe(() => {
|
|
@@ -4450,44 +4452,44 @@ const Pa = (t) => {
|
|
|
4450
4452
|
}, []);
|
|
4451
4453
|
const E = (k) => {
|
|
4452
4454
|
var ue;
|
|
4453
|
-
const
|
|
4454
|
-
if (!
|
|
4455
|
+
const ee = n.getCurrentUnitOfType(re.UNIVER_SHEET).getUnitId(), oe = (ue = n.getCurrentUnitOfType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : ue.getSheetId();
|
|
4456
|
+
if (!ee || !oe)
|
|
4455
4457
|
throw new Error("No active sheet found");
|
|
4456
|
-
i.executeCommand(sr.id, { unitId:
|
|
4457
|
-
}, M = (k,
|
|
4458
|
-
l(
|
|
4459
|
-
}, q = (k,
|
|
4460
|
-
var
|
|
4458
|
+
i.executeCommand(sr.id, { unitId: ee, subUnitId: oe, cfId: k.cfId });
|
|
4459
|
+
}, M = (k, ee) => {
|
|
4460
|
+
l(ee.y);
|
|
4461
|
+
}, q = (k, ee, oe) => {
|
|
4462
|
+
var X;
|
|
4461
4463
|
l(-1);
|
|
4462
|
-
const ue = n.getCurrentUnitOfType(re.UNIVER_SHEET).getUnitId(), ge = (
|
|
4464
|
+
const ue = n.getCurrentUnitOfType(re.UNIVER_SHEET).getUnitId(), ge = (X = n.getCurrentUnitOfType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : X.getSheetId();
|
|
4463
4465
|
if (!ue || !ge)
|
|
4464
4466
|
throw new Error("No active sheet found");
|
|
4465
4467
|
const ye = (ce) => {
|
|
4466
4468
|
const T = N.length;
|
|
4467
4469
|
return Math.min(T - 1, Math.max(0, ce));
|
|
4468
|
-
}, Le = N[ye(
|
|
4469
|
-
Le !==
|
|
4470
|
+
}, Le = N[ye(ee.y)].cfId, F = N[ye(oe.y)].cfId;
|
|
4471
|
+
Le !== F && i.executeCommand(gi.id, { unitId: ue, subUnitId: ge, start: { id: Le, type: "self" }, end: { id: F, type: oe.y > ee.y ? "after" : "before" } });
|
|
4470
4472
|
}, A = () => {
|
|
4471
4473
|
t.onCreate();
|
|
4472
|
-
},
|
|
4473
|
-
h === "2" ? i.executeCommand(uo.id) : h === "1" && N.map((
|
|
4474
|
-
i.executeCommand(sr.id,
|
|
4474
|
+
}, Q = () => {
|
|
4475
|
+
h === "2" ? i.executeCommand(uo.id) : h === "1" && N.map((ee) => ({ unitId: w, subUnitId: C, cfId: ee.cfId })).forEach((ee) => {
|
|
4476
|
+
i.executeCommand(sr.id, ee);
|
|
4475
4477
|
});
|
|
4476
4478
|
}, le = Se(() => {
|
|
4477
|
-
const k = n.getCurrentUnitOfType(re.UNIVER_SHEET),
|
|
4479
|
+
const k = n.getCurrentUnitOfType(re.UNIVER_SHEET), ee = k.getActiveSheet();
|
|
4478
4480
|
return N.filter((oe) => {
|
|
4479
4481
|
const ue = oe.ranges;
|
|
4480
|
-
return cn(y, k.getUnitId(),
|
|
4482
|
+
return cn(y, k.getUnitId(), ee.getSheetId(), ue);
|
|
4481
4483
|
});
|
|
4482
|
-
}, [N]), ie = le.map((k,
|
|
4483
|
-
const k = n.getCurrentUnitOfType(re.UNIVER_SHEET),
|
|
4484
|
+
}, [N]), ie = le.map((k, ee) => ({ i: k.cfId, x: 0, w: 12, y: ee, h: 1, isResizable: !1 })), de = Se(() => {
|
|
4485
|
+
const k = n.getCurrentUnitOfType(re.UNIVER_SHEET), ee = k.getActiveSheet();
|
|
4484
4486
|
return N.every((oe) => {
|
|
4485
4487
|
const ue = oe.ranges;
|
|
4486
|
-
return cn(y, k.getUnitId(),
|
|
4488
|
+
return cn(y, k.getUnitId(), ee.getSheetId(), ue);
|
|
4487
4489
|
});
|
|
4488
4490
|
}, [N]);
|
|
4489
|
-
return /* @__PURE__ */
|
|
4490
|
-
/* @__PURE__ */
|
|
4491
|
+
return /* @__PURE__ */ B("div", { className: be.cfRuleList, children: [
|
|
4492
|
+
/* @__PURE__ */ B("div", { className: be.ruleSelector, children: [
|
|
4491
4493
|
/* @__PURE__ */ O("div", { children: S.tWithReactNode(
|
|
4492
4494
|
"sheet.cf.panel.managerRuleSelect",
|
|
4493
4495
|
/* @__PURE__ */ O(
|
|
@@ -4501,8 +4503,8 @@ const Pa = (t) => {
|
|
|
4501
4503
|
}
|
|
4502
4504
|
}
|
|
4503
4505
|
)
|
|
4504
|
-
).map((k,
|
|
4505
|
-
/* @__PURE__ */
|
|
4506
|
+
).map((k, ee) => /* @__PURE__ */ O("span", { children: k }, ee)) }),
|
|
4507
|
+
/* @__PURE__ */ B("div", { className: be.btnList, children: [
|
|
4506
4508
|
/* @__PURE__ */ O(ar, { title: c.t("sheet.cf.panel.createRule"), placement: "bottom", children: /* @__PURE__ */ O(
|
|
4507
4509
|
"div",
|
|
4508
4510
|
{
|
|
@@ -4515,7 +4517,7 @@ const Pa = (t) => {
|
|
|
4515
4517
|
"div",
|
|
4516
4518
|
{
|
|
4517
4519
|
className: Ee(be.gap, be.icon),
|
|
4518
|
-
onClick:
|
|
4520
|
+
onClick: Q,
|
|
4519
4521
|
children: /* @__PURE__ */ O(an, {})
|
|
4520
4522
|
}
|
|
4521
4523
|
) }) : /* @__PURE__ */ O("div", { className: Ee(be.gap, be.disabled), children: /* @__PURE__ */ O(an, {}) })
|
|
@@ -4532,11 +4534,11 @@ const Pa = (t) => {
|
|
|
4532
4534
|
margin: [0, 10],
|
|
4533
4535
|
onDragStop: q,
|
|
4534
4536
|
onDragStart: M,
|
|
4535
|
-
children: le == null ? void 0 : le.map((k,
|
|
4537
|
+
children: le == null ? void 0 : le.map((k, ee) => /* @__PURE__ */ O("div", { children: /* @__PURE__ */ B(
|
|
4536
4538
|
"div",
|
|
4537
4539
|
{
|
|
4538
4540
|
className: Ee(be.ruleItem, {
|
|
4539
|
-
[be.active]: v ===
|
|
4541
|
+
[be.active]: v === ee
|
|
4540
4542
|
}),
|
|
4541
4543
|
onMouseMove: () => {
|
|
4542
4544
|
k.ranges !== b && R(k.ranges);
|
|
@@ -4554,7 +4556,7 @@ const Pa = (t) => {
|
|
|
4554
4556
|
children: /* @__PURE__ */ O(Vo, {})
|
|
4555
4557
|
}
|
|
4556
4558
|
),
|
|
4557
|
-
/* @__PURE__ */
|
|
4559
|
+
/* @__PURE__ */ B("div", { className: be.ruleDescribe, children: [
|
|
4558
4560
|
/* @__PURE__ */ O("div", { className: be.ruleType, children: Oa(k, c) }),
|
|
4559
4561
|
/* @__PURE__ */ O("div", { className: be.ruleRange, children: k.ranges.map((oe) => Co(oe)).join(",") })
|
|
4560
4562
|
] }),
|
|
@@ -4563,7 +4565,7 @@ const Pa = (t) => {
|
|
|
4563
4565
|
"div",
|
|
4564
4566
|
{
|
|
4565
4567
|
className: Ee(be.deleteItem, {
|
|
4566
|
-
[be.active]: v ===
|
|
4568
|
+
[be.active]: v === ee
|
|
4567
4569
|
}),
|
|
4568
4570
|
onClick: (oe) => {
|
|
4569
4571
|
oe.stopPropagation(), E(k), R([]);
|
|
@@ -4586,7 +4588,7 @@ const Pa = (t) => {
|
|
|
4586
4588
|
Qn,
|
|
4587
4589
|
{
|
|
4588
4590
|
overlay: /* @__PURE__ */ O("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ O(ji, { value: e, onChange: r }) }),
|
|
4589
|
-
children: /* @__PURE__ */
|
|
4591
|
+
children: /* @__PURE__ */ B(
|
|
4590
4592
|
"span",
|
|
4591
4593
|
{
|
|
4592
4594
|
className: `
|
|
@@ -4631,18 +4633,18 @@ const Pa = (t) => {
|
|
|
4631
4633
|
stress: il
|
|
4632
4634
|
}, rt = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Wn = (t) => {
|
|
4633
4635
|
var b;
|
|
4634
|
-
const { type: e, className: r, onChange: n, id: o, value: i } = t, c = fe(me), y = c.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), f = (b = c.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : b.getSheetId(), S = Se(() => String(i).startsWith("=") ? String(i) : "=", [i]), m = Se(() => [
|
|
4636
|
+
const { type: e, className: r, onChange: n, id: o, value: i } = t, c = fe(me), y = c.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), f = (b = c.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : b.getSheetId(), S = Se(() => String(i).startsWith("=") ? String(i) : "=", [i]), m = Se(() => [ne.max, ne.min, "none"].includes(e) ? { disabled: !0 } : [ne.percent, ne.percentile].includes(e) ? {
|
|
4635
4637
|
min: 0,
|
|
4636
4638
|
max: 100
|
|
4637
4639
|
} : {
|
|
4638
4640
|
min: Number.MIN_SAFE_INTEGER,
|
|
4639
4641
|
max: Number.MAX_SAFE_INTEGER
|
|
4640
|
-
}, [e]),
|
|
4642
|
+
}, [e]), w = Ve({}), [_, C] = H(!1);
|
|
4641
4643
|
return _n((R) => {
|
|
4642
4644
|
var s;
|
|
4643
|
-
const h = (s =
|
|
4644
|
-
h && h(R, () =>
|
|
4645
|
-
}), e ===
|
|
4645
|
+
const h = (s = w.current) == null ? void 0 : s.handleOutClick;
|
|
4646
|
+
h && h(R, () => C(!1));
|
|
4647
|
+
}), e === ne.formula ? /* @__PURE__ */ O("div", { style: { width: "100%", marginLeft: 4 }, children: /* @__PURE__ */ O(
|
|
4646
4648
|
En,
|
|
4647
4649
|
{
|
|
4648
4650
|
initValue: S,
|
|
@@ -4652,23 +4654,23 @@ const Pa = (t) => {
|
|
|
4652
4654
|
onChange: (R = "") => {
|
|
4653
4655
|
n(R || "");
|
|
4654
4656
|
},
|
|
4655
|
-
onFocus: () =>
|
|
4656
|
-
actions:
|
|
4657
|
+
onFocus: () => C(!0),
|
|
4658
|
+
actions: w.current
|
|
4657
4659
|
}
|
|
4658
4660
|
) }) : /* @__PURE__ */ O(at, { className: r, value: Number(t.value) || 0, onChange: (R) => t.onChange(R || 0), ...m });
|
|
4659
4661
|
}, sl = (t) => {
|
|
4660
4662
|
var L;
|
|
4661
|
-
const { interceptorManager: e } = t, r = fe(Te), n = ((L = t.rule) == null ? void 0 : L.type) === K.colorScale ? t.rule : void 0, o = [rt(
|
|
4663
|
+
const { interceptorManager: e } = t, r = fe(Te), n = ((L = t.rule) == null ? void 0 : L.type) === K.colorScale ? t.rule : void 0, o = [rt(ne.num, r), rt(ne.percent, r), rt(ne.percentile, r), rt(ne.formula, r)], i = [rt(ne.min, r), ...o], c = [rt("none", r), ...o], y = [rt(ne.max, r), ...o], [f, S] = H(() => {
|
|
4662
4664
|
var M;
|
|
4663
|
-
const E =
|
|
4665
|
+
const E = ne.min;
|
|
4664
4666
|
return n && ((M = n.config[0]) == null ? void 0 : M.value.type) || E;
|
|
4665
|
-
}), [m,
|
|
4667
|
+
}), [m, w] = H(() => {
|
|
4666
4668
|
var M;
|
|
4667
4669
|
const E = "none";
|
|
4668
4670
|
return !n || n.config.length !== 3 ? E : ((M = n.config[1]) == null ? void 0 : M.value.type) || E;
|
|
4669
|
-
}), [_,
|
|
4671
|
+
}), [_, C] = H(() => {
|
|
4670
4672
|
var M;
|
|
4671
|
-
const E =
|
|
4673
|
+
const E = ne.max;
|
|
4672
4674
|
return n && ((M = n.config[n.config.length - 1]) == null ? void 0 : M.value.type) || E;
|
|
4673
4675
|
}), [b, R] = H(() => {
|
|
4674
4676
|
if (!n)
|
|
@@ -4700,8 +4702,8 @@ const Pa = (t) => {
|
|
|
4700
4702
|
const E = "#2e55ef";
|
|
4701
4703
|
return n && ((M = n.config[n.config.length - 1]) == null ? void 0 : M.color) || E;
|
|
4702
4704
|
}), D = Se(() => (E) => {
|
|
4703
|
-
const { minType: M, medianType: q, maxType: A, minValue:
|
|
4704
|
-
return oe.push({ color: de, value: { type: M, value:
|
|
4705
|
+
const { minType: M, medianType: q, maxType: A, minValue: Q, medianValue: le, maxValue: ie, minColor: de, medianColor: k, maxColor: ee } = E, oe = [];
|
|
4706
|
+
return oe.push({ color: de, value: { type: M, value: Q } }), q !== "none" && oe.push({ color: k, value: { type: q, value: le } }), oe.push({ color: ee, value: { type: A, value: ie } }), { config: oe.map((ge, ye) => ({ ...ge, index: ye })), type: K.colorScale };
|
|
4705
4707
|
}, []);
|
|
4706
4708
|
we(() => e.intercept(e.getInterceptPoints().submit, {
|
|
4707
4709
|
handler() {
|
|
@@ -4711,7 +4713,7 @@ const Pa = (t) => {
|
|
|
4711
4713
|
const N = (E) => {
|
|
4712
4714
|
t.onChange(D(E));
|
|
4713
4715
|
};
|
|
4714
|
-
return /* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ B("div", { children: [
|
|
4715
4717
|
/* @__PURE__ */ O("div", { className: $.title, children: r.t("sheet.cf.panel.styleRule") }),
|
|
4716
4718
|
/* @__PURE__ */ O(
|
|
4717
4719
|
"div",
|
|
@@ -4723,7 +4725,7 @@ const Pa = (t) => {
|
|
|
4723
4725
|
}
|
|
4724
4726
|
),
|
|
4725
4727
|
/* @__PURE__ */ O("div", { className: $.label, children: r.t("sheet.cf.valueType.min") }),
|
|
4726
|
-
/* @__PURE__ */
|
|
4728
|
+
/* @__PURE__ */ B(
|
|
4727
4729
|
"div",
|
|
4728
4730
|
{
|
|
4729
4731
|
className: Ee(`
|
|
@@ -4772,7 +4774,7 @@ const Pa = (t) => {
|
|
|
4772
4774
|
}
|
|
4773
4775
|
),
|
|
4774
4776
|
/* @__PURE__ */ O("div", { className: $.label, children: r.t("sheet.cf.panel.medianValue") }),
|
|
4775
|
-
/* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ B(
|
|
4776
4778
|
"div",
|
|
4777
4779
|
{
|
|
4778
4780
|
className: Ee(`
|
|
@@ -4787,7 +4789,7 @@ const Pa = (t) => {
|
|
|
4787
4789
|
options: c,
|
|
4788
4790
|
value: m,
|
|
4789
4791
|
onChange: (E) => {
|
|
4790
|
-
|
|
4792
|
+
w(E);
|
|
4791
4793
|
const M = qt(E, 50);
|
|
4792
4794
|
s(M), N({ minType: f, medianType: E, maxType: _, minValue: b, medianValue: M, maxValue: a, minColor: v, medianColor: p, maxColor: g });
|
|
4793
4795
|
}
|
|
@@ -4821,7 +4823,7 @@ const Pa = (t) => {
|
|
|
4821
4823
|
}
|
|
4822
4824
|
),
|
|
4823
4825
|
/* @__PURE__ */ O("div", { className: $.label, children: r.t("sheet.cf.valueType.max") }),
|
|
4824
|
-
/* @__PURE__ */
|
|
4826
|
+
/* @__PURE__ */ B(
|
|
4825
4827
|
"div",
|
|
4826
4828
|
{
|
|
4827
4829
|
className: Ee(`
|
|
@@ -4836,7 +4838,7 @@ const Pa = (t) => {
|
|
|
4836
4838
|
options: y,
|
|
4837
4839
|
value: _,
|
|
4838
4840
|
onChange: (E) => {
|
|
4839
|
-
|
|
4841
|
+
C(E);
|
|
4840
4842
|
const M = qt(E, 90);
|
|
4841
4843
|
d(M), N({ minType: f, medianType: m, maxType: E, minValue: b, medianValue: h, maxValue: M, minColor: v, medianColor: p, maxColor: g });
|
|
4842
4844
|
}
|
|
@@ -4872,28 +4874,28 @@ const Pa = (t) => {
|
|
|
4872
4874
|
] });
|
|
4873
4875
|
}, dt = (t, e) => ({ label: e.t(`sheet.cf.valueType.${t}`), value: t }), Br = (t) => {
|
|
4874
4876
|
var R;
|
|
4875
|
-
const { onChange: e, className: r, value: n, type: o, id: i, disabled: c = !1 } = t, y = fe(me), f = y.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), S = (R = y.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : R.getSheetId(), m = Ve({}), [
|
|
4877
|
+
const { onChange: e, className: r, value: n, type: o, id: i, disabled: c = !1 } = t, y = fe(me), f = y.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), S = (R = y.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : R.getSheetId(), m = Ve({}), [w, _] = H(!1);
|
|
4876
4878
|
_n((h) => {
|
|
4877
4879
|
var a;
|
|
4878
4880
|
const s = (a = m.current) == null ? void 0 : a.handleOutClick;
|
|
4879
4881
|
s && s(h, () => _(!1));
|
|
4880
4882
|
});
|
|
4881
|
-
const
|
|
4883
|
+
const C = Ve(n), b = Se(() => [ne.percentile, ne.percent].includes(o) ? {
|
|
4882
4884
|
max: 100,
|
|
4883
4885
|
min: 0
|
|
4884
4886
|
} : {
|
|
4885
4887
|
min: Number.MIN_SAFE_INTEGER,
|
|
4886
4888
|
max: Number.MAX_SAFE_INTEGER
|
|
4887
4889
|
}, [o]);
|
|
4888
|
-
if (o ===
|
|
4889
|
-
const h = String(
|
|
4890
|
+
if (o === ne.formula) {
|
|
4891
|
+
const h = String(C.current).startsWith("=") ? String(C.current) || "" : "=";
|
|
4890
4892
|
return /* @__PURE__ */ O("div", { style: { width: "100%", marginLeft: 12 }, children: /* @__PURE__ */ O(
|
|
4891
4893
|
En,
|
|
4892
4894
|
{
|
|
4893
4895
|
initValue: h,
|
|
4894
4896
|
unitId: f,
|
|
4895
4897
|
subUnitId: S,
|
|
4896
|
-
isFocus:
|
|
4898
|
+
isFocus: w,
|
|
4897
4899
|
onChange: (s = "") => {
|
|
4898
4900
|
e(s || "");
|
|
4899
4901
|
},
|
|
@@ -4926,9 +4928,9 @@ const Pa = (t) => {
|
|
|
4926
4928
|
}), [f, S] = H(() => {
|
|
4927
4929
|
var E;
|
|
4928
4930
|
return n ? ((E = n.config) == null ? void 0 : E.nativeColor) || Ft : Ft;
|
|
4929
|
-
}), m = [dt(
|
|
4931
|
+
}), m = [dt(ne.num, r), dt(ne.percent, r), dt(ne.percentile, r), dt(ne.formula, r)], w = [dt(ne.min, r), ...m], _ = [dt(ne.max, r), ...m], [C, b] = H(() => {
|
|
4930
4932
|
var M;
|
|
4931
|
-
const E =
|
|
4933
|
+
const E = w[0].value;
|
|
4932
4934
|
return n && ((M = n.config) == null ? void 0 : M.min.type) || E;
|
|
4933
4935
|
}), [R, h] = H(() => {
|
|
4934
4936
|
var M;
|
|
@@ -4939,13 +4941,13 @@ const Pa = (t) => {
|
|
|
4939
4941
|
if (!n)
|
|
4940
4942
|
return 0;
|
|
4941
4943
|
const M = ((q = n.config) == null ? void 0 : q.min) || {};
|
|
4942
|
-
return M.type ===
|
|
4944
|
+
return M.type === ne.formula ? M.value || "=" : M.value || 0;
|
|
4943
4945
|
}), [d, v] = H(() => {
|
|
4944
4946
|
var q;
|
|
4945
4947
|
if (!n)
|
|
4946
4948
|
return 100;
|
|
4947
4949
|
const M = ((q = n.config) == null ? void 0 : q.max) || {};
|
|
4948
|
-
return M.type ===
|
|
4950
|
+
return M.type === ne.formula ? M.value || "=" : M.value === void 0 ? 100 : M.value;
|
|
4949
4951
|
}), [l, p] = H(() => n ? n.isShowValue === void 0 ? !0 : !!n.isShowValue : !0), u = (E) => ({ config: {
|
|
4950
4952
|
min: { type: E.minValueType, value: E.minValue },
|
|
4951
4953
|
max: { type: E.maxValueType, value: E.maxValue },
|
|
@@ -4955,17 +4957,17 @@ const Pa = (t) => {
|
|
|
4955
4957
|
}, type: K.dataBar, isShowValue: E.isShowValue });
|
|
4956
4958
|
we(() => e.intercept(e.getInterceptPoints().submit, {
|
|
4957
4959
|
handler() {
|
|
4958
|
-
return u({ isGradient: o, minValue: s, minValueType:
|
|
4960
|
+
return u({ isGradient: o, minValue: s, minValueType: C, maxValue: d, maxValueType: R, positiveColor: c, nativeColor: f, isShowValue: l });
|
|
4959
4961
|
}
|
|
4960
|
-
}), [o, s,
|
|
4962
|
+
}), [o, s, C, d, R, c, f, e, l]);
|
|
4961
4963
|
const g = (E) => {
|
|
4962
4964
|
t.onChange(u(E));
|
|
4963
4965
|
}, x = (E) => {
|
|
4964
|
-
y(E), g({ isGradient: o, minValue: s, minValueType:
|
|
4966
|
+
y(E), g({ isGradient: o, minValue: s, minValueType: C, maxValue: d, maxValueType: R, positiveColor: E, nativeColor: f, isShowValue: l });
|
|
4965
4967
|
}, D = (E) => {
|
|
4966
|
-
S(E), g({ isGradient: o, minValue: s, minValueType:
|
|
4968
|
+
S(E), g({ isGradient: o, minValue: s, minValueType: C, maxValue: d, maxValueType: R, positiveColor: c, nativeColor: E, isShowValue: l });
|
|
4967
4969
|
}, N = (E) => m.map((M) => M.value).includes(E);
|
|
4968
|
-
return /* @__PURE__ */
|
|
4970
|
+
return /* @__PURE__ */ B("div", { children: [
|
|
4969
4971
|
/* @__PURE__ */ O("div", { className: $.title, children: r.t("sheet.cf.panel.styleRule") }),
|
|
4970
4972
|
/* @__PURE__ */ O(
|
|
4971
4973
|
"div",
|
|
@@ -4973,12 +4975,12 @@ const Pa = (t) => {
|
|
|
4973
4975
|
className: `
|
|
4974
4976
|
${W.cfPreviewWrap}
|
|
4975
4977
|
`,
|
|
4976
|
-
children: /* @__PURE__ */ O(wt, { rule: u({ isGradient: o, minValue: s, minValueType:
|
|
4978
|
+
children: /* @__PURE__ */ O(wt, { rule: u({ isGradient: o, minValue: s, minValueType: C, maxValue: d, maxValueType: R, positiveColor: c, nativeColor: f, isShowValue: l }) })
|
|
4977
4979
|
}
|
|
4978
4980
|
),
|
|
4979
|
-
/* @__PURE__ */
|
|
4981
|
+
/* @__PURE__ */ B("div", { children: [
|
|
4980
4982
|
/* @__PURE__ */ O("div", { className: $.label, children: r.t("sheet.cf.panel.fillType") }),
|
|
4981
|
-
/* @__PURE__ */
|
|
4983
|
+
/* @__PURE__ */ B(
|
|
4982
4984
|
"div",
|
|
4983
4985
|
{
|
|
4984
4986
|
className: `
|
|
@@ -4987,12 +4989,12 @@ const Pa = (t) => {
|
|
|
4987
4989
|
${$.labelContainer}
|
|
4988
4990
|
`,
|
|
4989
4991
|
children: [
|
|
4990
|
-
/* @__PURE__ */
|
|
4992
|
+
/* @__PURE__ */ B(
|
|
4991
4993
|
Bi,
|
|
4992
4994
|
{
|
|
4993
4995
|
value: o,
|
|
4994
4996
|
onChange: (E) => {
|
|
4995
|
-
i(E), g({ isGradient: E, minValue: s, minValueType:
|
|
4997
|
+
i(E), g({ isGradient: E, minValue: s, minValueType: C, maxValue: d, maxValueType: R, positiveColor: c, nativeColor: f, isShowValue: l });
|
|
4996
4998
|
},
|
|
4997
4999
|
children: [
|
|
4998
5000
|
/* @__PURE__ */ O(lr, { value: "0", children: /* @__PURE__ */ O("span", { className: W.text, children: r.t("sheet.cf.panel.pureColor") }) }),
|
|
@@ -5000,7 +5002,7 @@ const Pa = (t) => {
|
|
|
5000
5002
|
]
|
|
5001
5003
|
}
|
|
5002
5004
|
),
|
|
5003
|
-
/* @__PURE__ */
|
|
5005
|
+
/* @__PURE__ */ B(
|
|
5004
5006
|
"div",
|
|
5005
5007
|
{
|
|
5006
5008
|
className: `
|
|
@@ -5013,7 +5015,7 @@ const Pa = (t) => {
|
|
|
5013
5015
|
{
|
|
5014
5016
|
checked: !l,
|
|
5015
5017
|
onChange: (E) => {
|
|
5016
|
-
p(!E), g({ isGradient: E, minValue: s, minValueType:
|
|
5018
|
+
p(!E), g({ isGradient: E, minValue: s, minValueType: C, maxValue: d, maxValueType: R, positiveColor: c, nativeColor: f, isShowValue: !E });
|
|
5017
5019
|
}
|
|
5018
5020
|
}
|
|
5019
5021
|
),
|
|
@@ -5025,9 +5027,9 @@ const Pa = (t) => {
|
|
|
5025
5027
|
}
|
|
5026
5028
|
)
|
|
5027
5029
|
] }),
|
|
5028
|
-
/* @__PURE__ */
|
|
5030
|
+
/* @__PURE__ */ B("div", { children: [
|
|
5029
5031
|
/* @__PURE__ */ O("div", { className: $.label, children: r.t("sheet.cf.panel.colorSet") }),
|
|
5030
|
-
/* @__PURE__ */
|
|
5032
|
+
/* @__PURE__ */ B(
|
|
5031
5033
|
"div",
|
|
5032
5034
|
{
|
|
5033
5035
|
className: `
|
|
@@ -5036,7 +5038,7 @@ const Pa = (t) => {
|
|
|
5036
5038
|
${$.mLXxs}
|
|
5037
5039
|
`,
|
|
5038
5040
|
children: [
|
|
5039
|
-
/* @__PURE__ */
|
|
5041
|
+
/* @__PURE__ */ B(
|
|
5040
5042
|
"div",
|
|
5041
5043
|
{
|
|
5042
5044
|
className: `
|
|
@@ -5062,7 +5064,7 @@ const Pa = (t) => {
|
|
|
5062
5064
|
]
|
|
5063
5065
|
}
|
|
5064
5066
|
),
|
|
5065
|
-
/* @__PURE__ */
|
|
5067
|
+
/* @__PURE__ */ B(
|
|
5066
5068
|
"div",
|
|
5067
5069
|
{
|
|
5068
5070
|
className: `
|
|
@@ -5093,9 +5095,9 @@ const Pa = (t) => {
|
|
|
5093
5095
|
}
|
|
5094
5096
|
)
|
|
5095
5097
|
] }),
|
|
5096
|
-
/* @__PURE__ */
|
|
5098
|
+
/* @__PURE__ */ B("div", { children: [
|
|
5097
5099
|
/* @__PURE__ */ O("div", { className: $.label, children: r.t("sheet.cf.valueType.min") }),
|
|
5098
|
-
/* @__PURE__ */
|
|
5100
|
+
/* @__PURE__ */ B(
|
|
5099
5101
|
"div",
|
|
5100
5102
|
{
|
|
5101
5103
|
className: `
|
|
@@ -5107,8 +5109,8 @@ const Pa = (t) => {
|
|
|
5107
5109
|
Me,
|
|
5108
5110
|
{
|
|
5109
5111
|
style: { width: "50%", flexShrink: 0 },
|
|
5110
|
-
options:
|
|
5111
|
-
value:
|
|
5112
|
+
options: w,
|
|
5113
|
+
value: C,
|
|
5112
5114
|
onChange: (E) => {
|
|
5113
5115
|
b(E);
|
|
5114
5116
|
const M = qt(E, 10);
|
|
@@ -5119,13 +5121,13 @@ const Pa = (t) => {
|
|
|
5119
5121
|
/* @__PURE__ */ O(
|
|
5120
5122
|
Br,
|
|
5121
5123
|
{
|
|
5122
|
-
disabled: !N(
|
|
5124
|
+
disabled: !N(C),
|
|
5123
5125
|
id: "min",
|
|
5124
|
-
type:
|
|
5126
|
+
type: C,
|
|
5125
5127
|
className: $.mLSm,
|
|
5126
5128
|
value: s,
|
|
5127
5129
|
onChange: (E) => {
|
|
5128
|
-
a(E || 0), g({ isGradient: o, minValue: E || 0, minValueType:
|
|
5130
|
+
a(E || 0), g({ isGradient: o, minValue: E || 0, minValueType: C, maxValue: d, maxValueType: R, positiveColor: c, nativeColor: f, isShowValue: l });
|
|
5129
5131
|
}
|
|
5130
5132
|
}
|
|
5131
5133
|
)
|
|
@@ -5133,7 +5135,7 @@ const Pa = (t) => {
|
|
|
5133
5135
|
}
|
|
5134
5136
|
),
|
|
5135
5137
|
/* @__PURE__ */ O("div", { className: $.label, children: r.t("sheet.cf.valueType.max") }),
|
|
5136
|
-
/* @__PURE__ */
|
|
5138
|
+
/* @__PURE__ */ B(
|
|
5137
5139
|
"div",
|
|
5138
5140
|
{
|
|
5139
5141
|
className: `
|
|
@@ -5150,7 +5152,7 @@ const Pa = (t) => {
|
|
|
5150
5152
|
onChange: (E) => {
|
|
5151
5153
|
h(E);
|
|
5152
5154
|
const M = qt(E, 90);
|
|
5153
|
-
v(M), g({ isGradient: o, minValue: s, minValueType:
|
|
5155
|
+
v(M), g({ isGradient: o, minValue: s, minValueType: C, maxValue: M, maxValueType: E, positiveColor: c, nativeColor: f, isShowValue: l });
|
|
5154
5156
|
}
|
|
5155
5157
|
}
|
|
5156
5158
|
),
|
|
@@ -5163,7 +5165,7 @@ const Pa = (t) => {
|
|
|
5163
5165
|
className: $.mLSm,
|
|
5164
5166
|
value: d,
|
|
5165
5167
|
onChange: (E) => {
|
|
5166
|
-
v(E || 0), g({ isGradient: o, minValue: s, minValueType:
|
|
5168
|
+
v(E || 0), g({ isGradient: o, minValue: s, minValueType: C, maxValue: E || 0, maxValueType: R, positiveColor: c, nativeColor: f, isShowValue: l });
|
|
5167
5169
|
}
|
|
5168
5170
|
}
|
|
5169
5171
|
)
|
|
@@ -5186,10 +5188,10 @@ const Pa = (t) => {
|
|
|
5186
5188
|
}), [S, m] = H(() => {
|
|
5187
5189
|
if (e != null && e.ul)
|
|
5188
5190
|
return e.ul.s;
|
|
5189
|
-
}), [
|
|
5191
|
+
}), [w, _] = H(() => {
|
|
5190
5192
|
if (e != null && e.st)
|
|
5191
5193
|
return e.st.s;
|
|
5192
|
-
}), [
|
|
5194
|
+
}), [C, b] = H(() => {
|
|
5193
5195
|
var p;
|
|
5194
5196
|
const l = "#2f56ef";
|
|
5195
5197
|
return (p = e == null ? void 0 : e.cl) != null && p.rgb ? e.cl.rgb : l;
|
|
@@ -5203,8 +5205,8 @@ const Pa = (t) => {
|
|
|
5203
5205
|
bl: i,
|
|
5204
5206
|
it: y
|
|
5205
5207
|
};
|
|
5206
|
-
|
|
5207
|
-
}, [i, y, S,
|
|
5208
|
+
C !== void 0 && (l.cl = { rgb: C }), R !== void 0 && (l.bg = { rgb: R }), w !== void 0 && (l.st = { s: w }), S !== void 0 && (l.ul = { s: S }), r(mi(l));
|
|
5209
|
+
}, [i, y, S, w, C, R]), /* @__PURE__ */ B(
|
|
5208
5210
|
"div",
|
|
5209
5211
|
{
|
|
5210
5212
|
className: Ee(Ae.cfStyleEdit, n),
|
|
@@ -5236,23 +5238,23 @@ const Pa = (t) => {
|
|
|
5236
5238
|
v && /* @__PURE__ */ O(
|
|
5237
5239
|
"div",
|
|
5238
5240
|
{
|
|
5239
|
-
className: Ee({ [Ae.isActive]: nn(
|
|
5240
|
-
onClick: () => _(tn(
|
|
5241
|
+
className: Ee({ [Ae.isActive]: nn(w || De.FALSE) }, Ae.buttonItem),
|
|
5242
|
+
onClick: () => _(tn(w)),
|
|
5241
5243
|
children: /* @__PURE__ */ O(v, {})
|
|
5242
5244
|
}
|
|
5243
5245
|
),
|
|
5244
|
-
/* @__PURE__ */ O(lt, { color:
|
|
5246
|
+
/* @__PURE__ */ O(lt, { color: C, onChange: b, iconId: "FontColor" }),
|
|
5245
5247
|
/* @__PURE__ */ O(lt, { color: R, onChange: h, iconId: "PaintBucket" })
|
|
5246
5248
|
]
|
|
5247
5249
|
}
|
|
5248
5250
|
);
|
|
5249
5251
|
}, dl = (t) => {
|
|
5250
5252
|
var v;
|
|
5251
|
-
const { onChange: e, interceptorManager: r } = t, n = fe(Te), i = fe(me).getCurrentUnitForType(re.UNIVER_SHEET), c = i.getActiveSheet(), y = ((v = t.rule) == null ? void 0 : v.type) === K.highlightCell ? t.rule : void 0, f = Ve(null), [S, m] = H(!1),
|
|
5253
|
+
const { onChange: e, interceptorManager: r } = t, n = fe(Te), i = fe(me).getCurrentUnitForType(re.UNIVER_SHEET), c = i.getActiveSheet(), y = ((v = t.rule) == null ? void 0 : v.type) === K.highlightCell ? t.rule : void 0, f = Ve(null), [S, m] = H(!1), w = Ve({}), [_, C] = H({}), [b, R] = H(() => (y == null ? void 0 : y.subType) === G.formula ? y.value : "="), [h, s] = H(void 0), a = (l) => ({
|
|
5252
5254
|
style: l.style,
|
|
5253
5255
|
value: b,
|
|
5254
5256
|
type: K.highlightCell,
|
|
5255
|
-
subType:
|
|
5257
|
+
subType: G.formula
|
|
5256
5258
|
});
|
|
5257
5259
|
we(() => r.intercept(r.getInterceptPoints().submit, {
|
|
5258
5260
|
handler() {
|
|
@@ -5266,9 +5268,9 @@ const Pa = (t) => {
|
|
|
5266
5268
|
};
|
|
5267
5269
|
return _n((l) => {
|
|
5268
5270
|
var u;
|
|
5269
|
-
const p = (u =
|
|
5271
|
+
const p = (u = w.current) == null ? void 0 : u.handleOutClick;
|
|
5270
5272
|
p && p(l, () => m(!1));
|
|
5271
|
-
}), /* @__PURE__ */
|
|
5273
|
+
}), /* @__PURE__ */ B("div", { ref: f, children: [
|
|
5272
5274
|
/* @__PURE__ */ O(
|
|
5273
5275
|
"div",
|
|
5274
5276
|
{
|
|
@@ -5298,7 +5300,7 @@ const Pa = (t) => {
|
|
|
5298
5300
|
onFocus: () => {
|
|
5299
5301
|
m(!0);
|
|
5300
5302
|
},
|
|
5301
|
-
actions:
|
|
5303
|
+
actions: w.current,
|
|
5302
5304
|
isFocus: S,
|
|
5303
5305
|
initValue: b,
|
|
5304
5306
|
unitId: i.getUnitId(),
|
|
@@ -5324,12 +5326,12 @@ const Pa = (t) => {
|
|
|
5324
5326
|
${$.mTSm}
|
|
5325
5327
|
`,
|
|
5326
5328
|
onChange: (l) => {
|
|
5327
|
-
|
|
5329
|
+
C(l), d({ style: l });
|
|
5328
5330
|
}
|
|
5329
5331
|
}
|
|
5330
5332
|
)
|
|
5331
5333
|
] });
|
|
5332
|
-
}, rn = (t) => /* @__PURE__ */
|
|
5334
|
+
}, rn = (t) => /* @__PURE__ */ B("div", { style: { position: "relative" }, children: [
|
|
5333
5335
|
/* @__PURE__ */ O(
|
|
5334
5336
|
"div",
|
|
5335
5337
|
{
|
|
@@ -5345,15 +5347,15 @@ const Pa = (t) => {
|
|
|
5345
5347
|
),
|
|
5346
5348
|
t.children
|
|
5347
5349
|
] }), he = (t, e) => ({ label: e.t(`sheet.cf.operator.${t}`), value: t }), fl = (t) => {
|
|
5348
|
-
const { type: e, operator: r, onChange: n, value: o, interceptorManager: i } = t, c = fe(Te), [y, f] = H(() => typeof o == "number" ? o : 0), [S, m] = H(""), [
|
|
5350
|
+
const { type: e, operator: r, onChange: n, value: o, interceptorManager: i } = t, c = fe(Te), [y, f] = H(() => typeof o == "number" ? o : 0), [S, m] = H(""), [w, _] = H(() => typeof o == "string" ? o : ""), [C, b] = H(""), [R, h] = H(() => Array.isArray(o) ? o[0] === void 0 ? 0 : o[0] : 0), [s, a] = H(""), [d, v] = H(() => Array.isArray(o) ? o[1] === void 0 ? 100 : o[1] : 100), [l, p] = H("");
|
|
5349
5351
|
switch (we(() => {
|
|
5350
5352
|
switch (e) {
|
|
5351
|
-
case
|
|
5352
|
-
[ae.beginsWith, ae.endsWith, ae.containsText, ae.notContainsText, ae.equal, ae.notEqual].includes(r) && n(
|
|
5353
|
+
case G.text: {
|
|
5354
|
+
[ae.beginsWith, ae.endsWith, ae.containsText, ae.notContainsText, ae.equal, ae.notEqual].includes(r) && n(w);
|
|
5353
5355
|
break;
|
|
5354
5356
|
}
|
|
5355
|
-
case
|
|
5356
|
-
[
|
|
5357
|
+
case G.number: {
|
|
5358
|
+
[Z.equal, Z.notEqual, Z.greaterThan, Z.greaterThanOrEqual, Z.lessThan, Z.lessThanOrEqual].includes(r) && n(y), [Z.between, Z.notBetween].includes(r) && n([R, d]);
|
|
5357
5359
|
break;
|
|
5358
5360
|
}
|
|
5359
5361
|
}
|
|
@@ -5361,9 +5363,9 @@ const Pa = (t) => {
|
|
|
5361
5363
|
const u = i.intercept(i.getInterceptPoints().beforeSubmit, {
|
|
5362
5364
|
handler: (g, x, D) => {
|
|
5363
5365
|
switch (e) {
|
|
5364
|
-
case
|
|
5366
|
+
case G.text:
|
|
5365
5367
|
if ([ae.beginsWith, ae.containsText, ae.endsWith, ae.notEqual, ae.notContainsText, ae.equal].includes(r))
|
|
5366
|
-
return
|
|
5368
|
+
return w ? D(g) : (b(c.t("sheet.cf.errorMessage.notBlank")), !1);
|
|
5367
5369
|
}
|
|
5368
5370
|
return D(g);
|
|
5369
5371
|
}
|
|
@@ -5371,8 +5373,8 @@ const Pa = (t) => {
|
|
|
5371
5373
|
return () => {
|
|
5372
5374
|
u();
|
|
5373
5375
|
};
|
|
5374
|
-
}, [e, y,
|
|
5375
|
-
case
|
|
5376
|
+
}, [e, y, w, r]), e) {
|
|
5377
|
+
case G.text: {
|
|
5376
5378
|
if ([ae.beginsWith, ae.endsWith, ae.containsText, ae.notContainsText, ae.equal, ae.notEqual].includes(r)) {
|
|
5377
5379
|
const u = (g) => {
|
|
5378
5380
|
_(g), n(g);
|
|
@@ -5383,11 +5385,11 @@ const Pa = (t) => {
|
|
|
5383
5385
|
className: `
|
|
5384
5386
|
${$.mTSm}
|
|
5385
5387
|
`,
|
|
5386
|
-
children: /* @__PURE__ */ O(rn, { errorText:
|
|
5388
|
+
children: /* @__PURE__ */ O(rn, { errorText: C, children: /* @__PURE__ */ O(
|
|
5387
5389
|
Gi,
|
|
5388
5390
|
{
|
|
5389
5391
|
className: W.width100,
|
|
5390
|
-
value:
|
|
5392
|
+
value: w,
|
|
5391
5393
|
onChange: (g) => {
|
|
5392
5394
|
b(""), u(g);
|
|
5393
5395
|
}
|
|
@@ -5398,8 +5400,8 @@ const Pa = (t) => {
|
|
|
5398
5400
|
}
|
|
5399
5401
|
break;
|
|
5400
5402
|
}
|
|
5401
|
-
case
|
|
5402
|
-
if ([
|
|
5403
|
+
case G.number: {
|
|
5404
|
+
if ([Z.equal, Z.notEqual, Z.greaterThan, Z.greaterThanOrEqual, Z.lessThan, Z.lessThanOrEqual].includes(r)) {
|
|
5403
5405
|
const u = (g) => {
|
|
5404
5406
|
f(g || 0), n(g || 0), m("");
|
|
5405
5407
|
};
|
|
@@ -5413,13 +5415,13 @@ const Pa = (t) => {
|
|
|
5413
5415
|
}
|
|
5414
5416
|
);
|
|
5415
5417
|
}
|
|
5416
|
-
if ([
|
|
5418
|
+
if ([Z.between, Z.notBetween].includes(r)) {
|
|
5417
5419
|
const u = (x) => {
|
|
5418
5420
|
h(x || 0), n([x || 0, d]), a("");
|
|
5419
5421
|
}, g = (x) => {
|
|
5420
5422
|
v(x || 0), n([R, x || 0]), p("");
|
|
5421
5423
|
};
|
|
5422
|
-
return /* @__PURE__ */
|
|
5424
|
+
return /* @__PURE__ */ B(
|
|
5423
5425
|
"div",
|
|
5424
5426
|
{
|
|
5425
5427
|
className: `
|
|
@@ -5449,7 +5451,7 @@ const Pa = (t) => {
|
|
|
5449
5451
|
return null;
|
|
5450
5452
|
}, Gr = (t, e) => {
|
|
5451
5453
|
switch (t) {
|
|
5452
|
-
case
|
|
5454
|
+
case G.text:
|
|
5453
5455
|
return [
|
|
5454
5456
|
he(ae.containsText, e),
|
|
5455
5457
|
he(ae.notContainsText, e),
|
|
@@ -5462,18 +5464,18 @@ const Pa = (t) => {
|
|
|
5462
5464
|
he(ae.containsErrors, e),
|
|
5463
5465
|
he(ae.notContainsErrors, e)
|
|
5464
5466
|
];
|
|
5465
|
-
case
|
|
5467
|
+
case G.number:
|
|
5466
5468
|
return [
|
|
5467
|
-
he(
|
|
5468
|
-
he(
|
|
5469
|
-
he(
|
|
5470
|
-
he(
|
|
5471
|
-
he(
|
|
5472
|
-
he(
|
|
5473
|
-
he(
|
|
5474
|
-
he(
|
|
5469
|
+
he(Z.between, e),
|
|
5470
|
+
he(Z.notBetween, e),
|
|
5471
|
+
he(Z.equal, e),
|
|
5472
|
+
he(Z.notEqual, e),
|
|
5473
|
+
he(Z.greaterThan, e),
|
|
5474
|
+
he(Z.greaterThanOrEqual, e),
|
|
5475
|
+
he(Z.lessThan, e),
|
|
5476
|
+
he(Z.lessThanOrEqual, e)
|
|
5475
5477
|
];
|
|
5476
|
-
case
|
|
5478
|
+
case G.timePeriod:
|
|
5477
5479
|
return [
|
|
5478
5480
|
he($e.yesterday, e),
|
|
5479
5481
|
he($e.today, e),
|
|
@@ -5490,60 +5492,60 @@ const Pa = (t) => {
|
|
|
5490
5492
|
}, Xr = (t) => {
|
|
5491
5493
|
var v;
|
|
5492
5494
|
const { interceptorManager: e, onChange: r } = t, n = fe(Te), o = ((v = t.rule) == null ? void 0 : v.type) === K.highlightCell ? t.rule : void 0, [i, c] = H(() => {
|
|
5493
|
-
const l =
|
|
5495
|
+
const l = G.text;
|
|
5494
5496
|
return o && o.subType || l;
|
|
5495
5497
|
}), y = [{
|
|
5496
|
-
value:
|
|
5498
|
+
value: G.text,
|
|
5497
5499
|
label: n.t("sheet.cf.subRuleType.text")
|
|
5498
5500
|
}, {
|
|
5499
|
-
value:
|
|
5501
|
+
value: G.number,
|
|
5500
5502
|
label: n.t("sheet.cf.subRuleType.number")
|
|
5501
5503
|
}, {
|
|
5502
|
-
value:
|
|
5504
|
+
value: G.timePeriod,
|
|
5503
5505
|
label: n.t("sheet.cf.subRuleType.timePeriod")
|
|
5504
5506
|
}, {
|
|
5505
|
-
value:
|
|
5507
|
+
value: G.duplicateValues,
|
|
5506
5508
|
label: n.t("sheet.cf.subRuleType.duplicateValues")
|
|
5507
5509
|
}, {
|
|
5508
|
-
value:
|
|
5510
|
+
value: G.uniqueValues,
|
|
5509
5511
|
label: n.t("sheet.cf.subRuleType.uniqueValues")
|
|
5510
5512
|
}], f = Se(() => Gr(i, n), [i]), [S, m] = H(() => {
|
|
5511
5513
|
const l = f ? f[0].value : void 0;
|
|
5512
5514
|
return o && o.operator || l;
|
|
5513
|
-
}), [
|
|
5515
|
+
}), [w, _] = H(() => {
|
|
5514
5516
|
var u;
|
|
5515
5517
|
const l = "";
|
|
5516
5518
|
return o ? (u = o.value) != null ? u : ln(o.subType, o.operator) : l;
|
|
5517
|
-
}), [
|
|
5518
|
-
var p, u, g, x, D, N, L, E, M, q, A,
|
|
5519
|
+
}), [C, b] = H({}), R = Se(() => (l) => {
|
|
5520
|
+
var p, u, g, x, D, N, L, E, M, q, A, Q, le, ie, de;
|
|
5519
5521
|
switch (l.subType || i) {
|
|
5520
|
-
case
|
|
5522
|
+
case G.text: {
|
|
5521
5523
|
if ([ae.beginsWith, ae.endsWith, ae.containsText, ae.notContainsText, ae.equal, ae.notEqual].includes(S))
|
|
5522
5524
|
return {
|
|
5523
5525
|
type: K.highlightCell,
|
|
5524
5526
|
subType: (p = l.subType) != null ? p : i,
|
|
5525
5527
|
operator: (u = l.operator) != null ? u : S,
|
|
5526
|
-
style: (g = l.style) != null ? g :
|
|
5527
|
-
value: (x = l.value) != null ? x :
|
|
5528
|
+
style: (g = l.style) != null ? g : C,
|
|
5529
|
+
value: (x = l.value) != null ? x : w
|
|
5528
5530
|
};
|
|
5529
5531
|
break;
|
|
5530
5532
|
}
|
|
5531
|
-
case
|
|
5532
|
-
if ([
|
|
5533
|
+
case G.number: {
|
|
5534
|
+
if ([Z.equal, Z.notEqual, Z.greaterThan, Z.greaterThanOrEqual, Z.lessThan, Z.lessThanOrEqual].includes(S))
|
|
5533
5535
|
return {
|
|
5534
5536
|
type: K.highlightCell,
|
|
5535
5537
|
subType: (D = l.subType) != null ? D : i,
|
|
5536
5538
|
operator: (N = l.operator) != null ? N : S,
|
|
5537
|
-
style: (L = l.style) != null ? L :
|
|
5538
|
-
value: (E = l.value) != null ? E :
|
|
5539
|
+
style: (L = l.style) != null ? L : C,
|
|
5540
|
+
value: (E = l.value) != null ? E : w
|
|
5539
5541
|
};
|
|
5540
|
-
if ([
|
|
5542
|
+
if ([Z.between, Z.notBetween].includes(S))
|
|
5541
5543
|
return {
|
|
5542
5544
|
type: K.highlightCell,
|
|
5543
5545
|
subType: (M = l.subType) != null ? M : i,
|
|
5544
5546
|
operator: (q = l.operator) != null ? q : S,
|
|
5545
|
-
style: (A = l.style) != null ? A :
|
|
5546
|
-
value: (
|
|
5547
|
+
style: (A = l.style) != null ? A : C,
|
|
5548
|
+
value: (Q = l.value) != null ? Q : w
|
|
5547
5549
|
};
|
|
5548
5550
|
break;
|
|
5549
5551
|
}
|
|
@@ -5552,9 +5554,9 @@ const Pa = (t) => {
|
|
|
5552
5554
|
type: K.highlightCell,
|
|
5553
5555
|
subType: (le = l.subType) != null ? le : i,
|
|
5554
5556
|
operator: (ie = l.operator) != null ? ie : S,
|
|
5555
|
-
style: (de = l.style) != null ? de :
|
|
5557
|
+
style: (de = l.style) != null ? de : C
|
|
5556
5558
|
};
|
|
5557
|
-
}, [i, S,
|
|
5559
|
+
}, [i, S, w, C]);
|
|
5558
5560
|
we(() => e.intercept(e.getInterceptPoints().submit, {
|
|
5559
5561
|
handler() {
|
|
5560
5562
|
return R({});
|
|
@@ -5571,7 +5573,7 @@ const Pa = (t) => {
|
|
|
5571
5573
|
}, a = (l) => {
|
|
5572
5574
|
_(l), r(R({ value: l }));
|
|
5573
5575
|
}, d = Se(() => `${i}_${S}_${Math.random()}`, [i, S]);
|
|
5574
|
-
return /* @__PURE__ */
|
|
5576
|
+
return /* @__PURE__ */ B("div", { children: [
|
|
5575
5577
|
/* @__PURE__ */ O(
|
|
5576
5578
|
"div",
|
|
5577
5579
|
{
|
|
@@ -5606,7 +5608,7 @@ const Pa = (t) => {
|
|
|
5606
5608
|
options: f
|
|
5607
5609
|
}
|
|
5608
5610
|
),
|
|
5609
|
-
/* @__PURE__ */ O(fl, { value:
|
|
5611
|
+
/* @__PURE__ */ O(fl, { value: w, interceptorManager: e, type: i, operator: S, rule: o, onChange: a }, d),
|
|
5610
5612
|
/* @__PURE__ */ O(
|
|
5611
5613
|
"div",
|
|
5612
5614
|
{
|
|
@@ -5633,10 +5635,10 @@ const Pa = (t) => {
|
|
|
5633
5635
|
var f;
|
|
5634
5636
|
const e = fe(me), r = e.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), n = (f = e.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : f.getSheetId(), o = Se(() => t.error ? W.errorInput : "", [t.error]), i = Ve({}), [c, y] = H(!1);
|
|
5635
5637
|
return _n((S) => {
|
|
5636
|
-
var
|
|
5637
|
-
const m = (
|
|
5638
|
+
var w;
|
|
5639
|
+
const m = (w = i.current) == null ? void 0 : w.handleOutClick;
|
|
5638
5640
|
m && m(S, () => y(!1));
|
|
5639
|
-
}), /* @__PURE__ */ O("div", { className: W.positionRelative, children: t.type !==
|
|
5641
|
+
}), /* @__PURE__ */ O("div", { className: W.positionRelative, children: t.type !== ne.formula ? /* @__PURE__ */ B(Gn, { children: [
|
|
5640
5642
|
/* @__PURE__ */ O(at, { className: o, value: Number(t.value) || 0, onChange: (S) => t.onChange(S != null ? S : 0) }),
|
|
5641
5643
|
t.error && /* @__PURE__ */ O("div", { className: W.errorText, children: t.error })
|
|
5642
5644
|
] }) : /* @__PURE__ */ O("div", { style: { width: "100%" }, children: /* @__PURE__ */ O(
|
|
@@ -5655,15 +5657,15 @@ const Pa = (t) => {
|
|
|
5655
5657
|
}
|
|
5656
5658
|
) }) });
|
|
5657
5659
|
}, Yr = (t, e, r) => ({
|
|
5658
|
-
operator:
|
|
5659
|
-
value: { type:
|
|
5660
|
+
operator: Z.greaterThan,
|
|
5661
|
+
value: { type: ne.num, value: (r.length - 1 - e) * 10 },
|
|
5660
5662
|
iconType: t,
|
|
5661
5663
|
iconId: String(e)
|
|
5662
5664
|
}), pl = ct((t, e) => {
|
|
5663
5665
|
const r = fe(Te), n = (o) => {
|
|
5664
5666
|
t.onClick(o);
|
|
5665
5667
|
};
|
|
5666
|
-
return /* @__PURE__ */ O("div", { ref: e, className: W.iconGroupList, children: vi.map((o, i) => /* @__PURE__ */
|
|
5668
|
+
return /* @__PURE__ */ O("div", { ref: e, className: W.iconGroupList, children: vi.map((o, i) => /* @__PURE__ */ B("div", { className: W.group, children: [
|
|
5667
5669
|
/* @__PURE__ */ O("div", { className: W.title, children: r.t(o.title) }),
|
|
5668
5670
|
/* @__PURE__ */ O("div", { className: W.itemContent, children: o.group.map((c) => /* @__PURE__ */ O("div", { className: W.itemWrap, onClick: () => {
|
|
5669
5671
|
n(c.name);
|
|
@@ -5686,8 +5688,8 @@ const Pa = (t) => {
|
|
|
5686
5688
|
}, []), r = (n) => {
|
|
5687
5689
|
t.onClick(n.iconType, n.iconId);
|
|
5688
5690
|
};
|
|
5689
|
-
return /* @__PURE__ */
|
|
5690
|
-
/* @__PURE__ */
|
|
5691
|
+
return /* @__PURE__ */ B("div", { className: W.iconItemListWrap, children: [
|
|
5692
|
+
/* @__PURE__ */ B("div", { className: W.none, onClick: () => r({ iconType: bi, iconId: "" }), children: [
|
|
5691
5693
|
/* @__PURE__ */ O(Xt, { className: W.icon }),
|
|
5692
5694
|
/* @__PURE__ */ O("span", { children: "无单元格图标" })
|
|
5693
5695
|
] }),
|
|
@@ -5703,35 +5705,35 @@ const Pa = (t) => {
|
|
|
5703
5705
|
) }, `${n.iconType}_${n.iconId}`)) })
|
|
5704
5706
|
] });
|
|
5705
5707
|
}, ml = (t) => {
|
|
5706
|
-
const { onChange: e, configList: r, errorMap: n = {} } = t, o = fe(Te), i = [{ label: o.t(`sheet.cf.symbol.${
|
|
5707
|
-
{ label: o.t(`sheet.cf.valueType.${
|
|
5708
|
-
{ label: o.t(`sheet.cf.valueType.${
|
|
5709
|
-
{ label: o.t(`sheet.cf.valueType.${
|
|
5710
|
-
{ label: o.t(`sheet.cf.valueType.${
|
|
5711
|
-
], y = (
|
|
5712
|
-
e([String(_), "value", "value"],
|
|
5713
|
-
}, f = (
|
|
5714
|
-
e([String(_), "operator"],
|
|
5715
|
-
const
|
|
5716
|
-
y(
|
|
5717
|
-
}, S = (
|
|
5718
|
-
e([String(_), "value", "type"],
|
|
5719
|
-
const
|
|
5708
|
+
const { onChange: e, configList: r, errorMap: n = {} } = t, o = fe(Te), i = [{ label: o.t(`sheet.cf.symbol.${Z.greaterThan}`), value: Z.greaterThan }, { label: o.t(`sheet.cf.symbol.${Z.greaterThanOrEqual}`), value: Z.greaterThanOrEqual }], c = [
|
|
5709
|
+
{ label: o.t(`sheet.cf.valueType.${ne.num}`), value: ne.num },
|
|
5710
|
+
{ label: o.t(`sheet.cf.valueType.${ne.percent}`), value: ne.percent },
|
|
5711
|
+
{ label: o.t(`sheet.cf.valueType.${ne.percentile}`), value: ne.percentile },
|
|
5712
|
+
{ label: o.t(`sheet.cf.valueType.${ne.formula}`), value: ne.formula }
|
|
5713
|
+
], y = (w, _) => {
|
|
5714
|
+
e([String(_), "value", "value"], w);
|
|
5715
|
+
}, f = (w, _) => {
|
|
5716
|
+
e([String(_), "operator"], w);
|
|
5717
|
+
const C = ln(G.number, w);
|
|
5718
|
+
y(C, _);
|
|
5719
|
+
}, S = (w, _) => {
|
|
5720
|
+
e([String(_), "value", "type"], w);
|
|
5721
|
+
const C = r[_], b = ln(G.number, C.operator);
|
|
5720
5722
|
y(b, _);
|
|
5721
5723
|
};
|
|
5722
|
-
return Se(() => r.map((
|
|
5723
|
-
const
|
|
5724
|
-
const p = { ...
|
|
5724
|
+
return Se(() => r.map((w, _) => {
|
|
5725
|
+
const C = n[_], b = Qo(w.iconType, w.iconId), R = _ === r.length - 1, h = _ === 0, s = r[_ - 1], a = (s == null ? void 0 : s.value.type) === ne.formula ? o.t("sheet.cf.valueType.formula") : s == null ? void 0 : s.value.value, d = (v, l) => {
|
|
5726
|
+
const p = { ...w, iconId: l, iconType: v };
|
|
5725
5727
|
e([String(_)], p);
|
|
5726
5728
|
};
|
|
5727
|
-
return /* @__PURE__ */
|
|
5729
|
+
return /* @__PURE__ */ B(
|
|
5728
5730
|
"div",
|
|
5729
5731
|
{
|
|
5730
5732
|
className: `
|
|
5731
5733
|
${_ ? $.mTXl : $.mTSm}
|
|
5732
5734
|
`,
|
|
5733
5735
|
children: [
|
|
5734
|
-
/* @__PURE__ */
|
|
5736
|
+
/* @__PURE__ */ B(
|
|
5735
5737
|
"div",
|
|
5736
5738
|
{
|
|
5737
5739
|
className: `
|
|
@@ -5739,7 +5741,7 @@ const Pa = (t) => {
|
|
|
5739
5741
|
${W.flex}
|
|
5740
5742
|
`,
|
|
5741
5743
|
children: [
|
|
5742
|
-
/* @__PURE__ */
|
|
5744
|
+
/* @__PURE__ */ B(
|
|
5743
5745
|
"div",
|
|
5744
5746
|
{
|
|
5745
5747
|
className: `
|
|
@@ -5757,9 +5759,9 @@ const Pa = (t) => {
|
|
|
5757
5759
|
className: `
|
|
5758
5760
|
${W.width45}
|
|
5759
5761
|
`,
|
|
5760
|
-
children: /* @__PURE__ */
|
|
5762
|
+
children: /* @__PURE__ */ B(Gn, { children: [
|
|
5761
5763
|
!h && !R && o.t("sheet.cf.iconSet.rule"),
|
|
5762
|
-
!h && !R && /* @__PURE__ */
|
|
5764
|
+
!h && !R && /* @__PURE__ */ B("span", { className: W.stress, children: [
|
|
5763
5765
|
"(",
|
|
5764
5766
|
o.t("sheet.cf.iconSet.when"),
|
|
5765
5767
|
o.t(`sheet.cf.symbol.${Bn(s.operator)}`),
|
|
@@ -5773,7 +5775,7 @@ const Pa = (t) => {
|
|
|
5773
5775
|
]
|
|
5774
5776
|
}
|
|
5775
5777
|
),
|
|
5776
|
-
/* @__PURE__ */
|
|
5778
|
+
/* @__PURE__ */ B(
|
|
5777
5779
|
"div",
|
|
5778
5780
|
{
|
|
5779
5781
|
className: `
|
|
@@ -5791,8 +5793,8 @@ const Pa = (t) => {
|
|
|
5791
5793
|
children: /* @__PURE__ */ O(
|
|
5792
5794
|
Qn,
|
|
5793
5795
|
{
|
|
5794
|
-
overlay: /* @__PURE__ */ O("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ O(gl, { onClick: d, iconId:
|
|
5795
|
-
children: /* @__PURE__ */
|
|
5796
|
+
overlay: /* @__PURE__ */ O("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ O(gl, { onClick: d, iconId: w.iconId, iconType: w.iconType }) }),
|
|
5797
|
+
children: /* @__PURE__ */ B("div", { className: Ee(W.dropdownIcon, "univer-box-border univer-h-7"), children: [
|
|
5796
5798
|
b ? /* @__PURE__ */ O("img", { src: b, className: W.icon }) : /* @__PURE__ */ O(Xt, { className: W.icon }),
|
|
5797
5799
|
/* @__PURE__ */ O(Tn, {})
|
|
5798
5800
|
] })
|
|
@@ -5800,7 +5802,7 @@ const Pa = (t) => {
|
|
|
5800
5802
|
)
|
|
5801
5803
|
}
|
|
5802
5804
|
),
|
|
5803
|
-
R ? /* @__PURE__ */
|
|
5805
|
+
R ? /* @__PURE__ */ B(
|
|
5804
5806
|
"div",
|
|
5805
5807
|
{
|
|
5806
5808
|
className: `
|
|
@@ -5810,7 +5812,7 @@ const Pa = (t) => {
|
|
|
5810
5812
|
style: { marginTop: 0 },
|
|
5811
5813
|
children: [
|
|
5812
5814
|
o.t("sheet.cf.iconSet.rule"),
|
|
5813
|
-
/* @__PURE__ */
|
|
5815
|
+
/* @__PURE__ */ B("span", { className: W.stress, children: [
|
|
5814
5816
|
"(",
|
|
5815
5817
|
o.t("sheet.cf.iconSet.when"),
|
|
5816
5818
|
o.t(`sheet.cf.symbol.${Bn(s.operator)}`),
|
|
@@ -5829,7 +5831,7 @@ const Pa = (t) => {
|
|
|
5829
5831
|
${$.mR0}
|
|
5830
5832
|
`,
|
|
5831
5833
|
options: i,
|
|
5832
|
-
value:
|
|
5834
|
+
value: w.operator,
|
|
5833
5835
|
onChange: (v) => {
|
|
5834
5836
|
f(v, _);
|
|
5835
5837
|
}
|
|
@@ -5838,8 +5840,8 @@ const Pa = (t) => {
|
|
|
5838
5840
|
]
|
|
5839
5841
|
}
|
|
5840
5842
|
),
|
|
5841
|
-
R ? /* @__PURE__ */ O("div", {}) : /* @__PURE__ */
|
|
5842
|
-
/* @__PURE__ */
|
|
5843
|
+
R ? /* @__PURE__ */ O("div", {}) : /* @__PURE__ */ B(Gn, { children: [
|
|
5844
|
+
/* @__PURE__ */ B(
|
|
5843
5845
|
"div",
|
|
5844
5846
|
{
|
|
5845
5847
|
className: `
|
|
@@ -5869,7 +5871,7 @@ const Pa = (t) => {
|
|
|
5869
5871
|
]
|
|
5870
5872
|
}
|
|
5871
5873
|
),
|
|
5872
|
-
/* @__PURE__ */
|
|
5874
|
+
/* @__PURE__ */ B(
|
|
5873
5875
|
"div",
|
|
5874
5876
|
{
|
|
5875
5877
|
className: `
|
|
@@ -5886,7 +5888,7 @@ const Pa = (t) => {
|
|
|
5886
5888
|
${$.mL0}
|
|
5887
5889
|
`,
|
|
5888
5890
|
options: c,
|
|
5889
|
-
value:
|
|
5891
|
+
value: w.value.type,
|
|
5890
5892
|
onChange: (v) => {
|
|
5891
5893
|
S(v, _);
|
|
5892
5894
|
}
|
|
@@ -5903,9 +5905,9 @@ const Pa = (t) => {
|
|
|
5903
5905
|
hl,
|
|
5904
5906
|
{
|
|
5905
5907
|
id: _,
|
|
5906
|
-
type:
|
|
5907
|
-
error:
|
|
5908
|
-
value:
|
|
5908
|
+
type: w.value.type,
|
|
5909
|
+
error: C,
|
|
5910
|
+
value: w.value.value || "",
|
|
5909
5911
|
onChange: (v) => y(v, _)
|
|
5910
5912
|
}
|
|
5911
5913
|
)
|
|
@@ -5935,12 +5937,12 @@ const Pa = (t) => {
|
|
|
5935
5937
|
return Yn.deepClone(r == null ? void 0 : r.config);
|
|
5936
5938
|
const l = st[c] || [];
|
|
5937
5939
|
return new Array(l.length).fill("").map((p, u, g) => u === g.length - 1 ? {
|
|
5938
|
-
operator:
|
|
5939
|
-
value: { type:
|
|
5940
|
+
operator: Z.lessThanOrEqual,
|
|
5941
|
+
value: { type: ne.num, value: Number.MAX_SAFE_INTEGER },
|
|
5940
5942
|
iconType: c,
|
|
5941
5943
|
iconId: String(u)
|
|
5942
5944
|
} : Yr(c, u, g));
|
|
5943
|
-
}), [m,
|
|
5945
|
+
}), [m, w] = H(() => r ? !!r.isShowValue : !0), _ = Se(() => {
|
|
5944
5946
|
const l = f.map((p) => Qo(p.iconType, p.iconId));
|
|
5945
5947
|
return /* @__PURE__ */ O("div", { className: W.iconWrap, children: l.map((p, u) => p ? /* @__PURE__ */ O(
|
|
5946
5948
|
"img",
|
|
@@ -5950,9 +5952,9 @@ const Pa = (t) => {
|
|
|
5950
5952
|
},
|
|
5951
5953
|
u
|
|
5952
5954
|
) : /* @__PURE__ */ O(Xt, { className: W.icon }, u)) });
|
|
5953
|
-
}, [f]),
|
|
5954
|
-
if (l.reduce((u, g, x) => u.preType && !u.result || l.length - 1 === x ? u : g.value.type ===
|
|
5955
|
-
preType:
|
|
5955
|
+
}, [f]), C = (l) => {
|
|
5956
|
+
if (l.reduce((u, g, x) => u.preType && !u.result || l.length - 1 === x ? u : g.value.type === ne.formula ? {
|
|
5957
|
+
preType: ne.formula,
|
|
5956
5958
|
result: !1
|
|
5957
5959
|
} : u.preType ? {
|
|
5958
5960
|
result: u.preType === g.value.type,
|
|
@@ -5960,7 +5962,7 @@ const Pa = (t) => {
|
|
|
5960
5962
|
} : {
|
|
5961
5963
|
result: !0,
|
|
5962
5964
|
preType: g.value.type
|
|
5963
|
-
}, { result: !0, preType: "" }).result && [
|
|
5965
|
+
}, { result: !0, preType: "" }).result && [ne.num, ne.percent, ne.percentile].includes(l[0].value.type)) {
|
|
5964
5966
|
const u = {};
|
|
5965
5967
|
return l.forEach((g, x, D) => {
|
|
5966
5968
|
if (x - 1 < 0 || x === D.length - 1)
|
|
@@ -5971,11 +5973,11 @@ const Pa = (t) => {
|
|
|
5971
5973
|
}
|
|
5972
5974
|
return {};
|
|
5973
5975
|
}, b = (l, p) => {
|
|
5974
|
-
si(f, l) !== p && (ai(f, l, p), S([...f]), i(
|
|
5976
|
+
si(f, l) !== p && (ai(f, l, p), S([...f]), i(C(f)));
|
|
5975
5977
|
}, R = (l) => {
|
|
5976
5978
|
y(l);
|
|
5977
5979
|
const p = st[l] || [], u = new Array(p.length).fill("").map((g, x, D) => Yr(l, x, D));
|
|
5978
|
-
S(u), i(
|
|
5980
|
+
S(u), i(C(u));
|
|
5979
5981
|
};
|
|
5980
5982
|
we(() => {
|
|
5981
5983
|
const l = e.intercept(e.getInterceptPoints().submit, {
|
|
@@ -6003,7 +6005,7 @@ const Pa = (t) => {
|
|
|
6003
6005
|
p.iconId = x.iconId, p.iconType = x.iconType;
|
|
6004
6006
|
}), S([...f]);
|
|
6005
6007
|
}, s = fe(Fi), [a, d] = H();
|
|
6006
|
-
return qi(a, s.rootContainerElement), /* @__PURE__ */
|
|
6008
|
+
return qi(a, s.rootContainerElement), /* @__PURE__ */ B("div", { className: W.iconSet, children: [
|
|
6007
6009
|
/* @__PURE__ */ O("div", { className: $.title, children: n.t("sheet.cf.panel.styleRule") }),
|
|
6008
6010
|
/* @__PURE__ */ O(
|
|
6009
6011
|
"div",
|
|
@@ -6024,7 +6026,7 @@ const Pa = (t) => {
|
|
|
6024
6026
|
onClick: R
|
|
6025
6027
|
}
|
|
6026
6028
|
) }),
|
|
6027
|
-
children: /* @__PURE__ */
|
|
6029
|
+
children: /* @__PURE__ */ B("div", { className: Ee(W.dropdownIcon, "univer-box-border univer-h-7 univer-w-auto"), children: [
|
|
6028
6030
|
_,
|
|
6029
6031
|
/* @__PURE__ */ O(Tn, {})
|
|
6030
6032
|
] })
|
|
@@ -6032,7 +6034,7 @@ const Pa = (t) => {
|
|
|
6032
6034
|
)
|
|
6033
6035
|
}
|
|
6034
6036
|
),
|
|
6035
|
-
/* @__PURE__ */
|
|
6037
|
+
/* @__PURE__ */ B(
|
|
6036
6038
|
"div",
|
|
6037
6039
|
{
|
|
6038
6040
|
className: `
|
|
@@ -6040,11 +6042,11 @@ const Pa = (t) => {
|
|
|
6040
6042
|
${W.renderConfig}
|
|
6041
6043
|
`,
|
|
6042
6044
|
children: [
|
|
6043
|
-
/* @__PURE__ */
|
|
6045
|
+
/* @__PURE__ */ B("div", { className: W.utilItem, children: [
|
|
6044
6046
|
/* @__PURE__ */ O(fn, { onChange: h }),
|
|
6045
6047
|
n.t("sheet.cf.iconSet.reverseIconOrder")
|
|
6046
6048
|
] }),
|
|
6047
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ B(
|
|
6048
6050
|
"div",
|
|
6049
6051
|
{
|
|
6050
6052
|
className: `
|
|
@@ -6053,7 +6055,7 @@ const Pa = (t) => {
|
|
|
6053
6055
|
`,
|
|
6054
6056
|
children: [
|
|
6055
6057
|
/* @__PURE__ */ O(fn, { checked: !m, onChange: (l) => {
|
|
6056
|
-
|
|
6058
|
+
w(!l);
|
|
6057
6059
|
} }),
|
|
6058
6060
|
n.t("sheet.cf.iconSet.onlyShowIcon")
|
|
6059
6061
|
]
|
|
@@ -6073,9 +6075,9 @@ const Pa = (t) => {
|
|
|
6073
6075
|
switch (a) {
|
|
6074
6076
|
case K.highlightCell:
|
|
6075
6077
|
switch (o.subType) {
|
|
6076
|
-
case
|
|
6077
|
-
return [
|
|
6078
|
-
case
|
|
6078
|
+
case G.average:
|
|
6079
|
+
return [Z.greaterThan, Z.greaterThanOrEqual].includes(o.operator) ? "greaterThanAverage" : [Z.lessThan, Z.lessThanOrEqual].includes(o.operator) ? "lessThanAverage" : s;
|
|
6080
|
+
case G.rank:
|
|
6079
6081
|
return o.isBottom ? "isBottom" : "isNotBottom";
|
|
6080
6082
|
}
|
|
6081
6083
|
}
|
|
@@ -6087,33 +6089,33 @@ const Pa = (t) => {
|
|
|
6087
6089
|
switch (a) {
|
|
6088
6090
|
case K.highlightCell:
|
|
6089
6091
|
switch (o.subType) {
|
|
6090
|
-
case
|
|
6092
|
+
case G.rank:
|
|
6091
6093
|
return o.value || 10;
|
|
6092
6094
|
}
|
|
6093
6095
|
}
|
|
6094
6096
|
return 10;
|
|
6095
|
-
}), [m,
|
|
6097
|
+
}), [m, w] = H(() => {
|
|
6096
6098
|
const a = o == null ? void 0 : o.type;
|
|
6097
6099
|
if (!o)
|
|
6098
6100
|
return !1;
|
|
6099
6101
|
switch (a) {
|
|
6100
6102
|
case K.highlightCell:
|
|
6101
6103
|
switch (o.subType) {
|
|
6102
|
-
case
|
|
6104
|
+
case G.rank:
|
|
6103
6105
|
return o.isPercent || !1;
|
|
6104
6106
|
}
|
|
6105
6107
|
}
|
|
6106
6108
|
return !1;
|
|
6107
|
-
}), [_,
|
|
6109
|
+
}), [_, C] = H({}), b = (s) => {
|
|
6108
6110
|
const { type: a, isPercent: d, value: v, style: l } = s;
|
|
6109
6111
|
if (a === "isNotBottom")
|
|
6110
|
-
return { type: K.highlightCell, subType:
|
|
6112
|
+
return { type: K.highlightCell, subType: G.rank, isPercent: d, isBottom: !1, value: v, style: l };
|
|
6111
6113
|
if (a === "isBottom")
|
|
6112
|
-
return { type: K.highlightCell, subType:
|
|
6114
|
+
return { type: K.highlightCell, subType: G.rank, isPercent: d, isBottom: !0, value: v, style: l };
|
|
6113
6115
|
if (a === "greaterThanAverage")
|
|
6114
|
-
return { type: K.highlightCell, subType:
|
|
6116
|
+
return { type: K.highlightCell, subType: G.average, operator: Z.greaterThan, style: l };
|
|
6115
6117
|
if (a === "lessThanAverage")
|
|
6116
|
-
return { type: K.highlightCell, subType:
|
|
6118
|
+
return { type: K.highlightCell, subType: G.average, operator: Z.lessThan, style: l };
|
|
6117
6119
|
};
|
|
6118
6120
|
we(() => r.intercept(r.getInterceptPoints().submit, {
|
|
6119
6121
|
handler() {
|
|
@@ -6123,7 +6125,7 @@ const Pa = (t) => {
|
|
|
6123
6125
|
const R = (s) => {
|
|
6124
6126
|
e(b(s));
|
|
6125
6127
|
};
|
|
6126
|
-
return /* @__PURE__ */
|
|
6128
|
+
return /* @__PURE__ */ B("div", { children: [
|
|
6127
6129
|
/* @__PURE__ */ O(
|
|
6128
6130
|
"div",
|
|
6129
6131
|
{
|
|
@@ -6148,7 +6150,7 @@ const Pa = (t) => {
|
|
|
6148
6150
|
}
|
|
6149
6151
|
}
|
|
6150
6152
|
),
|
|
6151
|
-
["isNotBottom", "isBottom"].includes(c) && /* @__PURE__ */
|
|
6153
|
+
["isNotBottom", "isBottom"].includes(c) && /* @__PURE__ */ B(
|
|
6152
6154
|
"div",
|
|
6153
6155
|
{
|
|
6154
6156
|
className: `
|
|
@@ -6168,7 +6170,7 @@ const Pa = (t) => {
|
|
|
6168
6170
|
}
|
|
6169
6171
|
}
|
|
6170
6172
|
),
|
|
6171
|
-
/* @__PURE__ */
|
|
6173
|
+
/* @__PURE__ */ B(
|
|
6172
6174
|
"div",
|
|
6173
6175
|
{
|
|
6174
6176
|
className: `
|
|
@@ -6182,7 +6184,7 @@ const Pa = (t) => {
|
|
|
6182
6184
|
{
|
|
6183
6185
|
checked: m,
|
|
6184
6186
|
onChange: (s) => {
|
|
6185
|
-
|
|
6187
|
+
w(!!s), R({ type: c, isPercent: !!s, value: f, style: _ });
|
|
6186
6188
|
}
|
|
6187
6189
|
}
|
|
6188
6190
|
),
|
|
@@ -6210,7 +6212,7 @@ const Pa = (t) => {
|
|
|
6210
6212
|
${$.mTSm}
|
|
6211
6213
|
`,
|
|
6212
6214
|
onChange: (s) => {
|
|
6213
|
-
|
|
6215
|
+
C(s), R({ type: c, isPercent: m, value: f, style: s });
|
|
6214
6216
|
}
|
|
6215
6217
|
}
|
|
6216
6218
|
)
|
|
@@ -6220,7 +6222,7 @@ const Pa = (t) => {
|
|
|
6220
6222
|
return (e = t.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : e.getSheetId();
|
|
6221
6223
|
}, Cl = (t) => {
|
|
6222
6224
|
var u, g, x;
|
|
6223
|
-
const e = fe(Te), r = fe(_e), n = fe(me), o = fe(Re), i = fe(yt), c = Kr(n), y = Zr(n), [f, S] = H(void 0), m = Ve((g = (u = t.rule) == null ? void 0 : u.ranges) != null ? g : []),
|
|
6225
|
+
const e = fe(Te), r = fe(_e), n = fe(me), o = fe(Re), i = fe(yt), c = Kr(n), y = Zr(n), [f, S] = H(void 0), m = Ve((g = (u = t.rule) == null ? void 0 : u.ranges) != null ? g : []), w = Se(() => {
|
|
6224
6226
|
var N, L, E;
|
|
6225
6227
|
let D = (N = t.rule) == null ? void 0 : N.ranges;
|
|
6226
6228
|
return D != null && D.length || (D = (E = (L = i.getCurrentSelections()) == null ? void 0 : L.map((M) => M.range)) != null ? E : []), m.current = D, D != null && D.length ? D.map((M) => {
|
|
@@ -6234,7 +6236,7 @@ const Pa = (t) => {
|
|
|
6234
6236
|
{ label: e.t("sheet.cf.ruleType.colorScale"), value: "4" },
|
|
6235
6237
|
{ label: e.t("sheet.cf.ruleType.formula"), value: "5" },
|
|
6236
6238
|
{ label: e.t("sheet.cf.ruleType.iconSet"), value: "6" }
|
|
6237
|
-
], [
|
|
6239
|
+
], [C, b] = H(() => {
|
|
6238
6240
|
var L, E;
|
|
6239
6241
|
const D = (L = t.rule) == null ? void 0 : L.rule.type, N = _[0].value;
|
|
6240
6242
|
if (!D)
|
|
@@ -6242,16 +6244,16 @@ const Pa = (t) => {
|
|
|
6242
6244
|
switch (D) {
|
|
6243
6245
|
case K.highlightCell: {
|
|
6244
6246
|
switch ((E = t.rule) == null ? void 0 : E.rule.subType) {
|
|
6245
|
-
case
|
|
6246
|
-
case
|
|
6247
|
-
case
|
|
6248
|
-
case
|
|
6249
|
-
case
|
|
6247
|
+
case G.number:
|
|
6248
|
+
case G.text:
|
|
6249
|
+
case G.duplicateValues:
|
|
6250
|
+
case G.uniqueValues:
|
|
6251
|
+
case G.timePeriod:
|
|
6250
6252
|
return "1";
|
|
6251
|
-
case
|
|
6252
|
-
case
|
|
6253
|
+
case G.average:
|
|
6254
|
+
case G.rank:
|
|
6253
6255
|
return "2";
|
|
6254
|
-
case
|
|
6256
|
+
case G.formula:
|
|
6255
6257
|
return "5";
|
|
6256
6258
|
}
|
|
6257
6259
|
break;
|
|
@@ -6265,7 +6267,7 @@ const Pa = (t) => {
|
|
|
6265
6267
|
}
|
|
6266
6268
|
return N;
|
|
6267
6269
|
}), R = Ve(void 0), h = Se(() => new li({ beforeSubmit: bl, submit: Sl }), []), s = Se(() => {
|
|
6268
|
-
switch (
|
|
6270
|
+
switch (C) {
|
|
6269
6271
|
case "1":
|
|
6270
6272
|
return Xr;
|
|
6271
6273
|
case "2":
|
|
@@ -6281,7 +6283,7 @@ const Pa = (t) => {
|
|
|
6281
6283
|
default:
|
|
6282
6284
|
return Xr;
|
|
6283
6285
|
}
|
|
6284
|
-
}, [
|
|
6286
|
+
}, [C]);
|
|
6285
6287
|
we(() => {
|
|
6286
6288
|
const D = r.onCommandExecuted((N) => {
|
|
6287
6289
|
if (N.id === Ii.id) {
|
|
@@ -6321,9 +6323,9 @@ const Pa = (t) => {
|
|
|
6321
6323
|
}, p = (D, N) => {
|
|
6322
6324
|
D ? N.length < 1 ? S(e.t("sheet.cf.errorMessage.rangeError")) : S(void 0) : S(e.t("sheet.cf.errorMessage.rangeError"));
|
|
6323
6325
|
};
|
|
6324
|
-
return /* @__PURE__ */
|
|
6326
|
+
return /* @__PURE__ */ B("div", { className: W.cfRuleStyleEditor, children: [
|
|
6325
6327
|
/* @__PURE__ */ O("div", { className: $.title, children: e.t("sheet.cf.panel.range") }),
|
|
6326
|
-
/* @__PURE__ */
|
|
6328
|
+
/* @__PURE__ */ B(
|
|
6327
6329
|
"div",
|
|
6328
6330
|
{
|
|
6329
6331
|
className: `
|
|
@@ -6335,7 +6337,7 @@ const Pa = (t) => {
|
|
|
6335
6337
|
{
|
|
6336
6338
|
unitId: c,
|
|
6337
6339
|
subUnitId: y,
|
|
6338
|
-
initialValue:
|
|
6340
|
+
initialValue: w,
|
|
6339
6341
|
onChange: (D, N) => d(N),
|
|
6340
6342
|
onVerify: p
|
|
6341
6343
|
}
|
|
@@ -6345,9 +6347,9 @@ const Pa = (t) => {
|
|
|
6345
6347
|
}
|
|
6346
6348
|
),
|
|
6347
6349
|
/* @__PURE__ */ O("div", { className: $.title, children: e.t("sheet.cf.panel.styleType") }),
|
|
6348
|
-
/* @__PURE__ */ O("div", { className: $.mTBase, children: /* @__PURE__ */ O(Me, { className: W.width100, value:
|
|
6350
|
+
/* @__PURE__ */ O("div", { className: $.mTBase, children: /* @__PURE__ */ O(Me, { className: W.width100, value: C, options: _, onChange: (D) => b(D) }) }),
|
|
6349
6351
|
/* @__PURE__ */ O(s, { interceptorManager: h, rule: (x = t.rule) == null ? void 0 : x.rule, onChange: a }),
|
|
6350
|
-
/* @__PURE__ */
|
|
6352
|
+
/* @__PURE__ */ B(
|
|
6351
6353
|
"div",
|
|
6352
6354
|
{
|
|
6353
6355
|
className: `
|
|
@@ -6411,10 +6413,10 @@ let Wt = class extends Ne {
|
|
|
6411
6413
|
};
|
|
6412
6414
|
Wt = _l([
|
|
6413
6415
|
Mt(0, me),
|
|
6414
|
-
Mt(1,
|
|
6415
|
-
Mt(2,
|
|
6416
|
-
Mt(3,
|
|
6417
|
-
Mt(4,
|
|
6416
|
+
Mt(1, J(qe)),
|
|
6417
|
+
Mt(2, J(Jn)),
|
|
6418
|
+
Mt(3, J(So)),
|
|
6419
|
+
Mt(4, J(Te))
|
|
6418
6420
|
], Wt);
|
|
6419
6421
|
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 || {});
|
|
6420
6422
|
const On = {
|
|
@@ -6434,7 +6436,7 @@ const On = {
|
|
|
6434
6436
|
ranges: i,
|
|
6435
6437
|
rule: {
|
|
6436
6438
|
type: K.highlightCell,
|
|
6437
|
-
subType:
|
|
6439
|
+
subType: G.rank
|
|
6438
6440
|
}
|
|
6439
6441
|
};
|
|
6440
6442
|
r.openPanel(f);
|
|
@@ -6446,7 +6448,7 @@ const On = {
|
|
|
6446
6448
|
ranges: i,
|
|
6447
6449
|
rule: {
|
|
6448
6450
|
type: K.highlightCell,
|
|
6449
|
-
subType:
|
|
6451
|
+
subType: G.formula,
|
|
6450
6452
|
value: "="
|
|
6451
6453
|
}
|
|
6452
6454
|
};
|
|
@@ -6547,14 +6549,14 @@ let Ht = class extends Ne {
|
|
|
6547
6549
|
if (!c)
|
|
6548
6550
|
return;
|
|
6549
6551
|
const { rows: y, cols: f } = c, S = /* @__PURE__ */ new Set();
|
|
6550
|
-
y.forEach((m,
|
|
6551
|
-
f.forEach((_,
|
|
6552
|
+
y.forEach((m, w) => {
|
|
6553
|
+
f.forEach((_, C) => {
|
|
6552
6554
|
const b = this._conditionalFormattingViewModel.getCellCfs(e, r, m, _);
|
|
6553
|
-
b && (b.forEach((R) => S.add(R.cfId)), o.setValue(
|
|
6555
|
+
b && (b.forEach((R) => S.add(R.cfId)), o.setValue(w, C, b.map((R) => R.cfId)));
|
|
6554
6556
|
});
|
|
6555
6557
|
}), S.forEach((m) => {
|
|
6556
|
-
const
|
|
6557
|
-
|
|
6558
|
+
const w = this._conditionalFormattingRuleModel.getRule(e, r, m);
|
|
6559
|
+
w && (i[m] = w.rule);
|
|
6558
6560
|
});
|
|
6559
6561
|
}
|
|
6560
6562
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -6574,7 +6576,7 @@ let Ht = class extends Ne {
|
|
|
6574
6576
|
r.pasteType
|
|
6575
6577
|
))
|
|
6576
6578
|
return { redos: [], undos: [] };
|
|
6577
|
-
const { ranges: [f, S], mapFunc: m } = wo([r.copyRange, e]),
|
|
6579
|
+
const { ranges: [f, S], mapFunc: m } = wo([r.copyRange, e]), w = Zi(f, S, !0), _ = {};
|
|
6578
6580
|
je.foreach(S, (l, p) => {
|
|
6579
6581
|
const { row: u, col: g } = m(l, p), x = this._conditionalFormattingViewModel.getCellCfs(i, c, u, g);
|
|
6580
6582
|
x && x.forEach((D) => {
|
|
@@ -6591,7 +6593,7 @@ let Ht = class extends Ne {
|
|
|
6591
6593
|
_[D.cfId].realDeleteValue(u, g);
|
|
6592
6594
|
});
|
|
6593
6595
|
});
|
|
6594
|
-
const { matrix:
|
|
6596
|
+
const { matrix: C, info: b } = this._copyInfo, R = [];
|
|
6595
6597
|
let h = this._conditionalFormattingRuleModel.createCfId(i, c);
|
|
6596
6598
|
const s = {}, a = (l) => {
|
|
6597
6599
|
if (s[l])
|
|
@@ -6609,8 +6611,8 @@ let Ht = class extends Ne {
|
|
|
6609
6611
|
return s[l] = g, R.push(g), h = `${Number(h) + 1}`, g;
|
|
6610
6612
|
}
|
|
6611
6613
|
};
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
+
w.forEach((l) => {
|
|
6615
|
+
C && C.forValue((p, u, g) => {
|
|
6614
6616
|
const x = Ue.getPositionRange(
|
|
6615
6617
|
{
|
|
6616
6618
|
startRow: p,
|
|
@@ -6624,8 +6626,8 @@ let Ht = class extends Ne {
|
|
|
6624
6626
|
if (!_[L]) {
|
|
6625
6627
|
const E = a(L), M = new it();
|
|
6626
6628
|
_[L] = M, E.ranges.forEach((q) => {
|
|
6627
|
-
je.foreach(q, (A,
|
|
6628
|
-
M.setValue(A,
|
|
6629
|
+
je.foreach(q, (A, Q) => {
|
|
6630
|
+
M.setValue(A, Q, 1);
|
|
6629
6631
|
});
|
|
6630
6632
|
});
|
|
6631
6633
|
}
|
|
@@ -6670,11 +6672,11 @@ let Ht = class extends Ne {
|
|
|
6670
6672
|
}
|
|
6671
6673
|
};
|
|
6672
6674
|
Ht = Tl([
|
|
6673
|
-
Nt(0,
|
|
6674
|
-
Nt(1,
|
|
6675
|
-
Nt(2,
|
|
6676
|
-
Nt(3,
|
|
6677
|
-
Nt(4,
|
|
6675
|
+
Nt(0, J(Ki)),
|
|
6676
|
+
Nt(1, J(Re)),
|
|
6677
|
+
Nt(2, J(qe)),
|
|
6678
|
+
Nt(3, J(Bt)),
|
|
6679
|
+
Nt(4, J(me))
|
|
6678
6680
|
], Ht);
|
|
6679
6681
|
var Il = Object.getOwnPropertyDescriptor, xl = (t, e, r, n) => {
|
|
6680
6682
|
for (var o = n > 1 ? void 0 : n ? Il(e, r) : e, i = t.length - 1, c; i >= 0; i--)
|
|
@@ -6698,9 +6700,9 @@ let At = class extends Ne {
|
|
|
6698
6700
|
}
|
|
6699
6701
|
};
|
|
6700
6702
|
At = xl([
|
|
6701
|
-
Hn(0,
|
|
6703
|
+
Hn(0, J(Te)),
|
|
6702
6704
|
Hn(1, _e),
|
|
6703
|
-
Hn(2,
|
|
6705
|
+
Hn(2, J(Pi))
|
|
6704
6706
|
], At);
|
|
6705
6707
|
var Ol = Object.getOwnPropertyDescriptor, Pl = (t, e, r, n) => {
|
|
6706
6708
|
for (var o = n > 1 ? void 0 : n ? Ol(e, r) : e, i = t.length - 1, c; i >= 0; i--)
|
|
@@ -6718,11 +6720,11 @@ let Ut = class extends Ne {
|
|
|
6718
6720
|
if (wi(m, S))
|
|
6719
6721
|
return { redos: [], undos: [] };
|
|
6720
6722
|
if (m.length) {
|
|
6721
|
-
const _ = { unitId: n, subUnitId: o, rule: { ...i, ranges: m } },
|
|
6722
|
-
return { redos:
|
|
6723
|
+
const _ = { unitId: n, subUnitId: o, rule: { ...i, ranges: m } }, C = [{ id: Ke.id, params: _ }], b = gt(this._injector, _);
|
|
6724
|
+
return { redos: C, undos: b };
|
|
6723
6725
|
} else {
|
|
6724
|
-
const _ = { unitId: n, subUnitId: o, cfId: i.cfId },
|
|
6725
|
-
return { redos:
|
|
6726
|
+
const _ = { unitId: n, subUnitId: o, cfId: i.cfId }, C = [{ id: Ze.id, params: _ }], b = pt(this._injector, _);
|
|
6727
|
+
return { redos: C, undos: b };
|
|
6726
6728
|
}
|
|
6727
6729
|
}, y = [];
|
|
6728
6730
|
i.ranges.forEach((f) => {
|
|
@@ -6756,10 +6758,10 @@ let Ut = class extends Ne {
|
|
|
6756
6758
|
}
|
|
6757
6759
|
};
|
|
6758
6760
|
Ut = Pl([
|
|
6759
|
-
sn(0,
|
|
6760
|
-
sn(1,
|
|
6761
|
-
sn(2,
|
|
6762
|
-
sn(3,
|
|
6761
|
+
sn(0, J(Re)),
|
|
6762
|
+
sn(1, J(me)),
|
|
6763
|
+
sn(2, J(qe)),
|
|
6764
|
+
sn(3, J(Di))
|
|
6763
6765
|
], Ut);
|
|
6764
6766
|
var Dl = Object.getOwnPropertyDescriptor, Ml = (t, e, r, n) => {
|
|
6765
6767
|
for (var o = n > 1 ? void 0 : n ? Dl(e, r) : e, i = t.length - 1, c; i >= 0; i--)
|
|
@@ -6810,12 +6812,12 @@ let jt = class extends Ne {
|
|
|
6810
6812
|
}
|
|
6811
6813
|
};
|
|
6812
6814
|
jt = Ml([
|
|
6813
|
-
ft(0,
|
|
6814
|
-
ft(1,
|
|
6815
|
-
ft(2,
|
|
6816
|
-
ft(3,
|
|
6817
|
-
ft(4,
|
|
6818
|
-
ft(5,
|
|
6815
|
+
ft(0, J(Zn)),
|
|
6816
|
+
ft(1, J(po)),
|
|
6817
|
+
ft(2, J(me)),
|
|
6818
|
+
ft(3, J(To)),
|
|
6819
|
+
ft(4, J(Bt)),
|
|
6820
|
+
ft(5, J(Re))
|
|
6819
6821
|
], jt);
|
|
6820
6822
|
const ei = "sheets-conditional-formatting-ui.config", gn = {};
|
|
6821
6823
|
var Nl = Object.defineProperty, Ll = Object.getOwnPropertyDescriptor, zl = (t, e, r) => e in t ? Nl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, $l = (t, e, r, n) => {
|
|
@@ -6854,8 +6856,8 @@ ti(mn, "pluginName", `${Gt}_MOBILE_UI_PLUGIN`);
|
|
|
6854
6856
|
ti(mn, "type", re.UNIVER_SHEET);
|
|
6855
6857
|
mn = $l([
|
|
6856
6858
|
io(go),
|
|
6857
|
-
An(1,
|
|
6858
|
-
An(2,
|
|
6859
|
+
An(1, J(qe)),
|
|
6860
|
+
An(2, J(_e)),
|
|
6859
6861
|
An(3, so)
|
|
6860
6862
|
], mn);
|
|
6861
6863
|
var kl = Object.getOwnPropertyDescriptor, Vl = (t, e, r, n) => {
|
|
@@ -6870,11 +6872,11 @@ let vn = class extends Ne {
|
|
|
6870
6872
|
// eslint-disable-next-line max-lines-per-function
|
|
6871
6873
|
_initAutoFill() {
|
|
6872
6874
|
const t = () => ({ redos: [], undos: [] }), e = (o, i, c, y, f) => {
|
|
6873
|
-
var
|
|
6874
|
-
const S = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), m = (
|
|
6875
|
+
var C;
|
|
6876
|
+
const S = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET).getUnitId(), m = (C = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : C.getSheetId();
|
|
6875
6877
|
if (!S || !m)
|
|
6876
6878
|
return;
|
|
6877
|
-
const
|
|
6879
|
+
const w = {
|
|
6878
6880
|
startRow: o.row,
|
|
6879
6881
|
startColumn: o.col,
|
|
6880
6882
|
endColumn: o.col,
|
|
@@ -6893,7 +6895,7 @@ let vn = class extends Ne {
|
|
|
6893
6895
|
endColumn: R,
|
|
6894
6896
|
endRow: b
|
|
6895
6897
|
},
|
|
6896
|
-
|
|
6898
|
+
w
|
|
6897
6899
|
), s = Ue.getPositionRange(
|
|
6898
6900
|
{
|
|
6899
6901
|
startRow: b,
|
|
@@ -6946,11 +6948,11 @@ let vn = class extends Ne {
|
|
|
6946
6948
|
const c = (s = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : s.getUnitId(), y = (d = (a = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : a.getActiveSheet()) == null ? void 0 : d.getSheetId(), f = /* @__PURE__ */ new Map(), S = [], m = [];
|
|
6947
6949
|
if (!c || !y)
|
|
6948
6950
|
return t();
|
|
6949
|
-
const
|
|
6951
|
+
const w = wo([o, i]), [_, C] = w.ranges, { mapFunc: b } = w, R = {
|
|
6950
6952
|
row: _.startRow,
|
|
6951
6953
|
col: _.startColumn
|
|
6952
6954
|
};
|
|
6953
|
-
return Qi(_,
|
|
6955
|
+
return Qi(_, C).forEach((v) => {
|
|
6954
6956
|
e(R, v.repeatStartCell, v.relativeRange, f, b);
|
|
6955
6957
|
}), f.forEach((v, l) => {
|
|
6956
6958
|
const p = this._conditionalFormattingRuleModel.getRule(c, y, l);
|
|
@@ -6990,11 +6992,11 @@ let vn = class extends Ne {
|
|
|
6990
6992
|
}
|
|
6991
6993
|
};
|
|
6992
6994
|
vn = Vl([
|
|
6993
|
-
Lt(0,
|
|
6994
|
-
Lt(1,
|
|
6995
|
-
Lt(2,
|
|
6996
|
-
Lt(3,
|
|
6997
|
-
Lt(4,
|
|
6995
|
+
Lt(0, J(qe)),
|
|
6996
|
+
Lt(1, J(me)),
|
|
6997
|
+
Lt(2, J(Ji)),
|
|
6998
|
+
Lt(3, J(Re)),
|
|
6999
|
+
Lt(4, J(Bt))
|
|
6998
7000
|
], vn);
|
|
6999
7001
|
var Fl = Object.getOwnPropertyDescriptor, ql = (t, e, r, n) => {
|
|
7000
7002
|
for (var o = n > 1 ? void 0 : n ? Fl(e, r) : e, i = t.length - 1, c; i >= 0; i--)
|
|
@@ -7011,7 +7013,7 @@ let yn = class extends Ne {
|
|
|
7011
7013
|
var o;
|
|
7012
7014
|
const e = [], r = [], n = { redos: e, undos: r };
|
|
7013
7015
|
if ([Li.id, zi.id].includes(t.id)) {
|
|
7014
|
-
const i = (o = this._selectionManagerService.getCurrentSelections()) == null ? void 0 : o.map((
|
|
7016
|
+
const i = (o = this._selectionManagerService.getCurrentSelections()) == null ? void 0 : o.map((C) => C.range);
|
|
7015
7017
|
if (!i)
|
|
7016
7018
|
return n;
|
|
7017
7019
|
const c = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET), y = c.getActiveSheet();
|
|
@@ -7020,8 +7022,8 @@ let yn = class extends Ne {
|
|
|
7020
7022
|
const f = c.getUnitId(), S = y.getSheetId(), m = this._conditionalFormattingRuleModel.getSubunitRules(f, S);
|
|
7021
7023
|
if (!m || !m.length)
|
|
7022
7024
|
return n;
|
|
7023
|
-
const { redos:
|
|
7024
|
-
e.push(...
|
|
7025
|
+
const { redos: w, undos: _ } = Jr(this._injector, m, i, f, S);
|
|
7026
|
+
e.push(...w), r.push(..._);
|
|
7025
7027
|
}
|
|
7026
7028
|
return n;
|
|
7027
7029
|
}
|
|
@@ -7040,11 +7042,11 @@ let yn = class extends Ne {
|
|
|
7040
7042
|
}
|
|
7041
7043
|
};
|
|
7042
7044
|
yn = ql([
|
|
7043
|
-
zt(0,
|
|
7044
|
-
zt(1,
|
|
7045
|
-
zt(2,
|
|
7046
|
-
zt(3,
|
|
7047
|
-
zt(4,
|
|
7045
|
+
zt(0, J(qe)),
|
|
7046
|
+
zt(1, J(me)),
|
|
7047
|
+
zt(2, J(Zn)),
|
|
7048
|
+
zt(3, J(yt)),
|
|
7049
|
+
zt(4, J(Re))
|
|
7048
7050
|
], yn);
|
|
7049
7051
|
function Jr(t, e, r, n, o) {
|
|
7050
7052
|
const i = [], c = [];
|
|
@@ -7058,8 +7060,8 @@ function Jr(t, e, r, n, o) {
|
|
|
7058
7060
|
subUnitId: o,
|
|
7059
7061
|
rule: { ...y, ranges: S }
|
|
7060
7062
|
}
|
|
7061
|
-
},
|
|
7062
|
-
i.push(m), c.push(...
|
|
7063
|
+
}, w = gt(t, m.params);
|
|
7064
|
+
i.push(m), c.push(...w);
|
|
7063
7065
|
} else {
|
|
7064
7066
|
const m = {
|
|
7065
7067
|
id: Ze.id,
|
|
@@ -7068,8 +7070,8 @@ function Jr(t, e, r, n, o) {
|
|
|
7068
7070
|
subUnitId: o,
|
|
7069
7071
|
cfId: y.cfId
|
|
7070
7072
|
}
|
|
7071
|
-
},
|
|
7072
|
-
i.push(m), c.push(...
|
|
7073
|
+
}, w = pt(t, m.params);
|
|
7074
|
+
i.push(m), c.push(...w);
|
|
7073
7075
|
}
|
|
7074
7076
|
}), { redos: i, undos: c };
|
|
7075
7077
|
}
|
|
@@ -7100,14 +7102,14 @@ let bn = class extends Ne {
|
|
|
7100
7102
|
if (t != null && t.p)
|
|
7101
7103
|
return (f = (y = t.p.body) == null ? void 0 : y.textRuns) == null || f.forEach((S) => {
|
|
7102
7104
|
S.ts && i.forEach((m) => {
|
|
7103
|
-
var
|
|
7104
|
-
(
|
|
7105
|
+
var w;
|
|
7106
|
+
(w = S.ts) == null || delete w[m];
|
|
7105
7107
|
});
|
|
7106
7108
|
}), r(t);
|
|
7107
7109
|
{
|
|
7108
7110
|
const S = { ...(typeof (t == null ? void 0 : t.s) == "string" ? e.workbook.getStyles().get(t.s) : t == null ? void 0 : t.s) || {} };
|
|
7109
|
-
i.forEach((
|
|
7110
|
-
delete S[
|
|
7111
|
+
i.forEach((w) => {
|
|
7112
|
+
delete S[w];
|
|
7111
7113
|
});
|
|
7112
7114
|
const m = { ...t, s: { ...S } };
|
|
7113
7115
|
return r(m);
|
|
@@ -7120,8 +7122,8 @@ let bn = class extends Ne {
|
|
|
7120
7122
|
}
|
|
7121
7123
|
};
|
|
7122
7124
|
bn = Hl([
|
|
7123
|
-
Qr(0,
|
|
7124
|
-
Qr(1,
|
|
7125
|
+
Qr(0, J(Zn)),
|
|
7126
|
+
Qr(1, J(po))
|
|
7125
7127
|
], bn);
|
|
7126
7128
|
const eo = [
|
|
7127
7129
|
Kn.id,
|
|
@@ -7206,10 +7208,10 @@ const eo = [
|
|
|
7206
7208
|
e.selectionMoveEnd$,
|
|
7207
7209
|
e.selectionSet$,
|
|
7208
7210
|
new ot((S) => {
|
|
7209
|
-
const m = r.onCommandExecuted((
|
|
7211
|
+
const m = r.onCommandExecuted((w) => {
|
|
7210
7212
|
var R;
|
|
7211
|
-
const { id: _, params:
|
|
7212
|
-
eo.includes(_) &&
|
|
7213
|
+
const { id: _, params: C } = w, b = (R = n.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : R.getUnitId();
|
|
7214
|
+
eo.includes(_) && C.unitId === b && S.next(null);
|
|
7213
7215
|
});
|
|
7214
7216
|
return () => m.dispose();
|
|
7215
7217
|
})
|
|
@@ -7217,16 +7219,16 @@ const eo = [
|
|
|
7217
7219
|
var R;
|
|
7218
7220
|
const S = ((R = e.getCurrentSelections()) == null ? void 0 : R.map((h) => h.range)) || [], m = n.getCurrentUnitForType(re.UNIVER_SHEET);
|
|
7219
7221
|
if (!m) return;
|
|
7220
|
-
const
|
|
7221
|
-
if (!
|
|
7222
|
-
const b = (o.getSubunitRules(m.getUnitId(),
|
|
7222
|
+
const w = m.getActiveSheet();
|
|
7223
|
+
if (!w) return;
|
|
7224
|
+
const b = (o.getSubunitRules(m.getUnitId(), w.getSheetId()) || []).filter((h) => h.ranges.some((s) => S.some((a) => Ue.intersects(a, s)))).map((h) => h.ranges).every((h) => cn(t, m.getUnitId(), w.getSheetId(), h));
|
|
7223
7225
|
f.next(b);
|
|
7224
7226
|
})), c = new ot(
|
|
7225
7227
|
(f) => new ot((S) => {
|
|
7226
|
-
const m = r.onCommandExecuted((
|
|
7228
|
+
const m = r.onCommandExecuted((w) => {
|
|
7227
7229
|
var R;
|
|
7228
|
-
const { id: _, params:
|
|
7229
|
-
eo.includes(_) &&
|
|
7230
|
+
const { id: _, params: C } = w, b = (R = n.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : R.getUnitId();
|
|
7231
|
+
eo.includes(_) && C.unitId === b && S.next(null);
|
|
7230
7232
|
});
|
|
7231
7233
|
return () => m.dispose();
|
|
7232
7234
|
}).pipe(hr(16)).subscribe(() => {
|
|
@@ -7234,18 +7236,18 @@ const eo = [
|
|
|
7234
7236
|
if (!S) return;
|
|
7235
7237
|
const m = S.getActiveSheet();
|
|
7236
7238
|
if (!m) return;
|
|
7237
|
-
const
|
|
7238
|
-
if (!
|
|
7239
|
+
const w = o.getSubunitRules(S.getUnitId(), m.getSheetId()) || [];
|
|
7240
|
+
if (!w.length)
|
|
7239
7241
|
return f.next(!1), !1;
|
|
7240
|
-
const _ =
|
|
7242
|
+
const _ = w.map((C) => C.ranges).every((C) => cn(t, S.getUnitId(), m.getSheetId(), C));
|
|
7241
7243
|
f.next(_);
|
|
7242
7244
|
})
|
|
7243
7245
|
), y = new ot((f) => {
|
|
7244
7246
|
i.subscribe((S) => {
|
|
7245
|
-
const m = $t.find((
|
|
7247
|
+
const m = $t.find((w) => w.value === Ie.clearRangeRules);
|
|
7246
7248
|
m && (m.disabled = !S, f.next($t));
|
|
7247
7249
|
}), c.subscribe((S) => {
|
|
7248
|
-
const m = $t.find((
|
|
7250
|
+
const m = $t.find((w) => w.value === Ie.clearWorkSheetRules);
|
|
7249
7251
|
m && (m.disabled = !S, f.next($t));
|
|
7250
7252
|
}), f.next($t);
|
|
7251
7253
|
});
|
|
@@ -7279,7 +7281,7 @@ let Sn = class extends Ne {
|
|
|
7279
7281
|
}
|
|
7280
7282
|
};
|
|
7281
7283
|
Sn = Bl([
|
|
7282
|
-
to(0,
|
|
7284
|
+
to(0, J(qe)),
|
|
7283
7285
|
to(1, Ui)
|
|
7284
7286
|
], Sn);
|
|
7285
7287
|
var Gl = Object.getOwnPropertyDescriptor, Xl = (t, e, r, n) => {
|
|
@@ -7304,15 +7306,15 @@ const Yl = (t, e) => {
|
|
|
7304
7306
|
return f.push({ repeatRelativeRange: S, startRange: m }), f;
|
|
7305
7307
|
}
|
|
7306
7308
|
for (let m = 0; m < c + (o ? 0.1 : 0); m++)
|
|
7307
|
-
for (let
|
|
7308
|
-
const _ = r(t) * m,
|
|
7309
|
+
for (let w = 0; w < y + (i ? 0.1 : 0); w++) {
|
|
7310
|
+
const _ = r(t) * m, C = n(t) * w, b = {
|
|
7309
7311
|
startRow: _ + e.startRow,
|
|
7310
7312
|
endRow: _ + e.startRow,
|
|
7311
|
-
startColumn:
|
|
7312
|
-
endColumn:
|
|
7313
|
+
startColumn: C + e.startColumn,
|
|
7314
|
+
endColumn: C + e.startColumn
|
|
7313
7315
|
};
|
|
7314
7316
|
let R = S;
|
|
7315
|
-
m === c && o && (R = { ...R }, R.endRow = R.endRow - (r(t) - o)),
|
|
7317
|
+
m === c && o && (R = { ...R }, R.endRow = R.endRow - (r(t) - o)), w === y && i && (R = { ...R }, R.endColumn = R.endColumn - (n(t) - i)), f.push({ repeatRelativeRange: R, startRange: b });
|
|
7316
7318
|
}
|
|
7317
7319
|
return f;
|
|
7318
7320
|
};
|
|
@@ -7325,7 +7327,7 @@ let Cn = class extends Ne {
|
|
|
7325
7327
|
// eslint-disable-next-line max-lines-per-function
|
|
7326
7328
|
_initFormattingPainter() {
|
|
7327
7329
|
const e = () => ({ redos: [], undos: [] }), r = (i, c, y, f, S) => {
|
|
7328
|
-
const { unitId: m, subUnitId:
|
|
7330
|
+
const { unitId: m, subUnitId: w } = this._painterConfig, { targetUnitId: _, targetSubUnitId: C } = S, b = {
|
|
7329
7331
|
startRow: i.row,
|
|
7330
7332
|
startColumn: i.col,
|
|
7331
7333
|
endColumn: i.col,
|
|
@@ -7355,19 +7357,19 @@ let Cn = class extends Ne {
|
|
|
7355
7357
|
R
|
|
7356
7358
|
), v = this._conditionalFormattingViewModel.getCellCfs(
|
|
7357
7359
|
m,
|
|
7358
|
-
|
|
7360
|
+
w,
|
|
7359
7361
|
a.startRow,
|
|
7360
7362
|
a.startColumn
|
|
7361
7363
|
), l = this._conditionalFormattingViewModel.getCellCfs(
|
|
7362
7364
|
_,
|
|
7363
|
-
|
|
7365
|
+
C,
|
|
7364
7366
|
d.startRow,
|
|
7365
7367
|
d.startColumn
|
|
7366
7368
|
);
|
|
7367
7369
|
l && l.forEach((p) => {
|
|
7368
7370
|
let u = f.get(p.cfId);
|
|
7369
7371
|
if (!f.get(p.cfId)) {
|
|
7370
|
-
const g = this._conditionalFormattingRuleModel.getRule(_,
|
|
7372
|
+
const g = this._conditionalFormattingRuleModel.getRule(_, C, p.cfId);
|
|
7371
7373
|
if (!g)
|
|
7372
7374
|
return;
|
|
7373
7375
|
u = new it(), g.ranges.forEach((x) => {
|
|
@@ -7384,7 +7386,7 @@ let Cn = class extends Ne {
|
|
|
7384
7386
|
});
|
|
7385
7387
|
}, n = (i, c, y) => {
|
|
7386
7388
|
var a;
|
|
7387
|
-
const { range: f, unitId: S, subUnitId: m } = this._painterConfig,
|
|
7389
|
+
const { range: f, unitId: S, subUnitId: m } = this._painterConfig, w = i !== S || m !== c, _ = /* @__PURE__ */ new Map(), C = [], b = [];
|
|
7388
7390
|
if (!i || !c || !S || !m)
|
|
7389
7391
|
return e();
|
|
7390
7392
|
const R = (a = this._conditionalFormattingRuleModel.getSubunitRules(S, m)) != null ? a : [];
|
|
@@ -7392,7 +7394,7 @@ let Cn = class extends Ne {
|
|
|
7392
7394
|
const { ranges: v, cfId: l } = d;
|
|
7393
7395
|
if (v.some((p) => Ue.intersects(f, p))) {
|
|
7394
7396
|
const p = new it();
|
|
7395
|
-
|
|
7397
|
+
w || v.forEach((u) => {
|
|
7396
7398
|
je.foreach(u, (g, x) => {
|
|
7397
7399
|
p.setValue(g, x, 1);
|
|
7398
7400
|
});
|
|
@@ -7406,7 +7408,7 @@ let Cn = class extends Ne {
|
|
|
7406
7408
|
return Yl(f, y).forEach((d) => {
|
|
7407
7409
|
r(h, { row: d.startRange.startRow, col: d.startRange.startColumn }, d.repeatRelativeRange, _, { targetUnitId: i, targetSubUnitId: c });
|
|
7408
7410
|
}), _.forEach((d, v) => {
|
|
7409
|
-
if (
|
|
7411
|
+
if (w) {
|
|
7410
7412
|
const l = this._conditionalFormattingRuleModel.getRule(i, c, v), p = un(dn(d));
|
|
7411
7413
|
if (l)
|
|
7412
7414
|
if (p.length) {
|
|
@@ -7415,14 +7417,14 @@ let Cn = class extends Ne {
|
|
|
7415
7417
|
subUnitId: c,
|
|
7416
7418
|
rule: { ...l, ranges: p }
|
|
7417
7419
|
};
|
|
7418
|
-
|
|
7420
|
+
C.push({ id: Ke.id, params: u }), b.push(...gt(this._injector, u));
|
|
7419
7421
|
} else {
|
|
7420
7422
|
const u = {
|
|
7421
7423
|
unitId: i,
|
|
7422
7424
|
subUnitId: c,
|
|
7423
7425
|
cfId: l.cfId
|
|
7424
7426
|
};
|
|
7425
|
-
|
|
7427
|
+
C.push({ id: Ze.id, params: u }), b.push(...pt(this._injector, u));
|
|
7426
7428
|
}
|
|
7427
7429
|
else if (p.length) {
|
|
7428
7430
|
const u = this._conditionalFormattingRuleModel.getRule(S, m, v);
|
|
@@ -7436,7 +7438,7 @@ let Cn = class extends Ne {
|
|
|
7436
7438
|
ranges: p
|
|
7437
7439
|
}
|
|
7438
7440
|
};
|
|
7439
|
-
|
|
7441
|
+
C.push({ id: xe.id, params: g }), b.push(ho(this._injector, g));
|
|
7440
7442
|
}
|
|
7441
7443
|
}
|
|
7442
7444
|
} else {
|
|
@@ -7450,19 +7452,19 @@ let Cn = class extends Ne {
|
|
|
7450
7452
|
subUnitId: m,
|
|
7451
7453
|
rule: { ...l, ranges: p }
|
|
7452
7454
|
};
|
|
7453
|
-
|
|
7455
|
+
C.push({ id: Ke.id, params: u }), b.push(...gt(this._injector, u));
|
|
7454
7456
|
} else {
|
|
7455
7457
|
const u = {
|
|
7456
7458
|
unitId: S,
|
|
7457
7459
|
subUnitId: m,
|
|
7458
7460
|
cfId: l.cfId
|
|
7459
7461
|
};
|
|
7460
|
-
|
|
7462
|
+
C.push({ id: Ze.id, params: u }), b.push(...pt(this._injector, u));
|
|
7461
7463
|
}
|
|
7462
7464
|
}
|
|
7463
7465
|
}), {
|
|
7464
7466
|
undos: b,
|
|
7465
|
-
redos:
|
|
7467
|
+
redos: C
|
|
7466
7468
|
};
|
|
7467
7469
|
}, o = {
|
|
7468
7470
|
id: Gt,
|
|
@@ -7471,7 +7473,7 @@ let Cn = class extends Ne {
|
|
|
7471
7473
|
switch (i) {
|
|
7472
7474
|
case Ln.INFINITE:
|
|
7473
7475
|
case Ln.ONCE: {
|
|
7474
|
-
const S = (c = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : c.getUnitId(), m = (f = (y = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : y.getActiveSheet()) == null ? void 0 : f.getSheetId(),
|
|
7476
|
+
const S = (c = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : c.getUnitId(), m = (f = (y = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET)) == null ? void 0 : y.getActiveSheet()) == null ? void 0 : f.getSheetId(), w = this._sheetsSelectionsService.getCurrentLastSelection(), _ = w == null ? void 0 : w.range;
|
|
7475
7477
|
S && m && _ && (this._painterConfig = { unitId: S, subUnitId: m, range: _ });
|
|
7476
7478
|
break;
|
|
7477
7479
|
}
|
|
@@ -7490,12 +7492,12 @@ let Cn = class extends Ne {
|
|
|
7490
7492
|
}
|
|
7491
7493
|
};
|
|
7492
7494
|
Cn = Xl([
|
|
7493
|
-
ht(0,
|
|
7494
|
-
ht(1,
|
|
7495
|
-
ht(2,
|
|
7496
|
-
ht(3,
|
|
7497
|
-
ht(4,
|
|
7498
|
-
ht(5,
|
|
7495
|
+
ht(0, J(qe)),
|
|
7496
|
+
ht(1, J(me)),
|
|
7497
|
+
ht(2, J(ts)),
|
|
7498
|
+
ht(3, J(yt)),
|
|
7499
|
+
ht(4, J(Re)),
|
|
7500
|
+
ht(5, J(Bt))
|
|
7499
7501
|
], Cn);
|
|
7500
7502
|
var Kl = Object.getOwnPropertyDescriptor, Zl = (t, e, r, n) => {
|
|
7501
7503
|
for (var o = n > 1 ? void 0 : n ? Kl(e, r) : e, i = t.length - 1, c; i >= 0; i--)
|
|
@@ -7514,8 +7516,8 @@ let wn = class extends Ne {
|
|
|
7514
7516
|
const i = o.with(Ro);
|
|
7515
7517
|
this.disposeWithMe(i.currentSkeleton$.subscribe((c) => {
|
|
7516
7518
|
if (c) {
|
|
7517
|
-
const y = c.skeleton.rowColumnSegment, f = y.endColumn - y.startColumn + 1, m = (y.endRow - y.startRow + 1) * f * 9,
|
|
7518
|
-
this._conditionalFormattingViewModel.setCacheLength(
|
|
7519
|
+
const y = c.skeleton.rowColumnSegment, f = y.endColumn - y.startColumn + 1, m = (y.endRow - y.startRow + 1) * f * 9, w = Math.max(Ei, m);
|
|
7520
|
+
this._conditionalFormattingViewModel.setCacheLength(w);
|
|
7519
7521
|
}
|
|
7520
7522
|
}));
|
|
7521
7523
|
};
|
|
@@ -7525,7 +7527,7 @@ let wn = class extends Ne {
|
|
|
7525
7527
|
}
|
|
7526
7528
|
};
|
|
7527
7529
|
wn = Zl([
|
|
7528
|
-
Un(0,
|
|
7530
|
+
Un(0, J(Bt)),
|
|
7529
7531
|
Un(1, me),
|
|
7530
7532
|
Un(2, To)
|
|
7531
7533
|
], wn);
|
|
@@ -7602,8 +7604,8 @@ ni(Rn, "pluginName", `${Gt}_UI_PLUGIN`);
|
|
|
7602
7604
|
ni(Rn, "type", re.UNIVER_SHEET);
|
|
7603
7605
|
Rn = tc([
|
|
7604
7606
|
io(go),
|
|
7605
|
-
jn(1,
|
|
7606
|
-
jn(2,
|
|
7607
|
+
jn(1, J(qe)),
|
|
7608
|
+
jn(2, J(_e)),
|
|
7607
7609
|
jn(3, so)
|
|
7608
7610
|
], Rn);
|
|
7609
7611
|
export {
|