@univerjs/sheets-data-validation-ui 0.9.3 → 0.9.4-nightly.202507290757
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 +2 -2
- package/lib/es/index.js +104 -104
- package/lib/index.js +104 -104
- package/lib/umd/index.js +2 -2
- package/package.json +14 -14
- package/LICENSE +0 -176
package/lib/index.js
CHANGED
@@ -2,16 +2,16 @@ var Tr = Object.defineProperty;
|
|
2
2
|
var Pr = (e, t, r) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
3
3
|
var V = (e, t, r) => Pr(e, typeof t != "symbol" ? t + "" : t, r);
|
4
4
|
import { Disposable as ye, UniverInstanceType as X, toDisposable as Ar, IUniverInstanceService as ce, Inject as M, LocaleService as ue, DataValidationErrorStyle as lt, DataValidationStatus as Ze, ICommandService as te, Injector as be, IConfigService as sn, DataValidationRenderMode as se, DisposableCollection as Lr, dayjs as In, numfmt as $n, CellValueType as kr, CommandType as rt, DataValidationType as j, ObjectMatrix as It, Range as Nr, Rectangle as Rt, queryObjectMatrix as Kt, Optional as Ur, RxDisposable as ln, InterceptorEffectEnum as jn, sequenceExecute as Yn, bufferDebounceTime as Fr, debounce as xr, UndoCommand as Br, RedoCommand as Wr, isUnitRangesEqual as Hr, shallowEqual as Rn, ThemeService as Xn, ColorKit as $r, isFormulaString as Oe, generateRandomId as yn, VerticalAlign as de, HorizontalAlign as Re, DEFAULT_STYLES as ae, WrapStrategy as me, Plugin as Zn, merge as Kn, DependentOn as jr } from "@univerjs/core";
|
5
|
-
import { DeviceInputEventType as gt, IRenderManagerService as
|
5
|
+
import { DeviceInputEventType as gt, IRenderManagerService as xe, fixLineWidthByScale as bn, Transform as Yr, CheckboxShape as Xr, getCurrentTypeOfRenderer as Ke, CURSOR_TYPE as ze, FontCache as Zr, Shape as Kr, Rect as zn, getFontStyleString as Te, DocSimpleSkeleton as it, Text as Mn } from "@univerjs/engine-render";
|
6
6
|
import { SheetInterceptorService as dn, VALIDATE_CELL as zr, SheetsSelectionsService as Gn, SetRangeValuesCommand as st, getSheetCommandTarget as qn, rangeToDiscreteRange as Gr, SheetPermissionCheckController as qr, WorksheetEditPermission as zt, WorksheetSetCellStylePermission as Gt, RangeProtectionPermissionEditPoint as qt, WorkbookEditablePermission as Jt, INTERCEPTOR_POINT as Jn, InterceptCellContentPriority as Qn, checkRangesEditablePermission as Jr } from "@univerjs/sheets";
|
7
7
|
import { SheetDataValidationModel as ie, SheetsDataValidationValidatorService as Qr, getDataValidationCellValue as Nt, getCellValueOrigin as re, serializeListOptions as er, createDefaultNewRule as tr, AddSheetDataValidationCommand as cn, DATA_VALIDATION_PLUGIN_NAME as nr, getDataValidationDiffMutations as Qt, UpdateSheetDataValidationRangeCommand as rr, DataValidationCacheService as ir, UpdateSheetDataValidationSettingCommand as En, UpdateSheetDataValidationOptionsCommand as ei, RemoveSheetDataValidationCommand as or, RemoveSheetAllDataValidationCommand as ti, DataValidationFormulaController as ni, deserializeListOptions as ri, CUSTOM_FORMULA_INPUT_NAME as ar, BASE_FORMULA_INPUT_NAME as Pt, LIST_FORMULA_INPUT_NAME as un, CHECKBOX_FORMULA_INPUT_NAME as sr, DataValidationFormulaService as ii, CHECKBOX_FORMULA_2 as oi, CHECKBOX_FORMULA_1 as ai, getFormulaResult as Ut, isLegalFormulaResult as Dn, transformCheckboxValue as si, UniverSheetsDataValidationPlugin as li } from "@univerjs/sheets-data-validation";
|
8
8
|
import { DataValidatorRegistryService as Me, DataValidatorDropdownType as ve, DataValidationModel as hn, DataValidatorRegistryScope as di, TWO_FORMULA_OPERATOR_COUNT as ci, getRuleOptions as Vn, getRuleSetting as On } from "@univerjs/data-validation";
|
9
|
-
import { ISidebarService as lr, IDialogService as ui, IZenZoneService as dr, KeyCode as vt, MenuItemType as pn, getMenuHiddenObservable as hi, RibbonDataGroup as pi, IMenuManagerService as gi, useDependency as F, ComponentManager as gn, useObservable as
|
9
|
+
import { ISidebarService as lr, IDialogService as ui, IZenZoneService as dr, KeyCode as vt, MenuItemType as pn, getMenuHiddenObservable as hi, RibbonDataGroup as pi, IMenuManagerService as gi, useDependency as F, ComponentManager as gn, useObservable as Ae, useEvent as en, useSidebarClick as cr } from "@univerjs/ui";
|
10
10
|
import { filter as vn, BehaviorSubject as Tn, distinctUntilChanged as vi, Subject as fi, debounceTime as ur, bufferTime as hr, of as mi } from "rxjs";
|
11
11
|
import { getPatternType as _i } from "@univerjs/sheets-numfmt";
|
12
12
|
import { ISheetCellDropdownManagerService as Si, IEditorBridgeService as pr, SetCellEditVisibleOperation as ft, HoverManagerService as Ci, CellAlertManagerService as wi, CellAlertType as Ii, IAutoFillService as Ri, APPLY_TYPE as ot, virtualizeDiscreteRanges as tn, getAutoFillRepeatRange as yi, ISheetClipboardService as bi, COPY_TYPE as Pn, PREDEFINED_HOOK_NAME as mt, getRepeatRange as An, getCurrentRangeDisable$ as Mi, AutoHeightController as gr, SheetSkeletonManagerService as dt, IMarkSelectionService as Ei } from "@univerjs/sheets-ui";
|
13
|
-
import { Button as Ge, FormLayout as Y, RadioGroup as fn, Radio as
|
14
|
-
import { createElement as Ie, forwardRef as
|
13
|
+
import { Button as Ge, FormLayout as Y, RadioGroup as fn, Radio as Le, Checkbox as At, Input as ke, Select as Ln, clsx as Ue, borderClassName as yt, DraggableList as Di, Dropdown as Vi } from "@univerjs/design";
|
14
|
+
import { createElement as Ie, forwardRef as Be, useRef as pt, useState as W, useMemo as ct, useEffect as Ne } from "react";
|
15
15
|
import { jsxs as $, Fragment as ut, jsx as S } from "react/jsx-runtime";
|
16
16
|
import { deserializeRangeWithSheet as Oi, serializeRange as vr } from "@univerjs/engine-formula";
|
17
17
|
import { RangeSelector as Ti, FormulaEditor as fr } from "@univerjs/sheets-formula-ui";
|
@@ -69,12 +69,12 @@ Se = Ai([
|
|
69
69
|
kn(0, ce),
|
70
70
|
kn(1, lr)
|
71
71
|
], Se);
|
72
|
-
const mn = "sheets-data-validation-ui.config", bt = {};
|
72
|
+
const Pe = "#ECECEC", mn = "sheets-data-validation-ui.config", bt = {};
|
73
73
|
var Li = Object.getOwnPropertyDescriptor, ki = (e, t, r, n) => {
|
74
74
|
for (var i = n > 1 ? void 0 : n ? Li(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
75
75
|
(a = e[o]) && (i = a(i) || i);
|
76
76
|
return i;
|
77
|
-
},
|
77
|
+
}, $e = (e, t) => (r, n) => t(r, n, e);
|
78
78
|
let qe = class extends ye {
|
79
79
|
constructor(e, t, r, n, i, o) {
|
80
80
|
super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = r, this._dialogService = n, this._localeService = i, this._sheetsDataValidationValidatorService = o, this._initEditorBridgeInterceptor();
|
@@ -144,12 +144,12 @@ let qe = class extends ye {
|
|
144
144
|
}
|
145
145
|
};
|
146
146
|
qe = ki([
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
147
|
+
$e(0, M(dn)),
|
148
|
+
$e(1, M(ie)),
|
149
|
+
$e(2, M(Me)),
|
150
|
+
$e(3, ui),
|
151
|
+
$e(4, M(ue)),
|
152
|
+
$e(5, M(Qr))
|
153
153
|
], qe);
|
154
154
|
var Ni = Object.getOwnPropertyDescriptor, Ui = (e, t, r, n) => {
|
155
155
|
for (var i = n > 1 ? void 0 : n ? Ni(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
@@ -178,7 +178,7 @@ function Fi(e, t) {
|
|
178
178
|
return "HH:mm:ss";
|
179
179
|
}
|
180
180
|
}
|
181
|
-
let
|
181
|
+
let Fe = class extends ye {
|
182
182
|
constructor(t, r, n, i, o, a, l, s, d, u, h) {
|
183
183
|
super();
|
184
184
|
V(this, "_activeDropdown");
|
@@ -341,13 +341,13 @@ let Ue = class extends ye {
|
|
341
341
|
keycode: vt.ESC
|
342
342
|
}), !v;
|
343
343
|
}, w = (d == null ? void 0 : d.renderMode) === se.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, _ = u.getListWithColor(d, o, a), R = Nt(s.getCellRaw(n, i)), L = () => {
|
344
|
-
this._commandService.executeCommand(
|
344
|
+
this._commandService.executeCommand(We.id, {
|
345
345
|
ruleId: d.uid
|
346
346
|
}), h == null || h.dispose();
|
347
347
|
}, N = _.map((E) => ({
|
348
348
|
label: E.label,
|
349
349
|
value: E.label,
|
350
|
-
color: w || E.color ? E.color : "transparent"
|
350
|
+
color: w || E.color ? E.color || Pe : "transparent"
|
351
351
|
}));
|
352
352
|
m = {
|
353
353
|
location: r,
|
@@ -481,7 +481,7 @@ let Ue = class extends ye {
|
|
481
481
|
});
|
482
482
|
}
|
483
483
|
};
|
484
|
-
|
484
|
+
Fe = Ui([
|
485
485
|
pe(0, ce),
|
486
486
|
pe(1, M(Me)),
|
487
487
|
pe(2, dr),
|
@@ -493,8 +493,8 @@ Ue = Ui([
|
|
493
493
|
pe(8, pr),
|
494
494
|
pe(9, M(be)),
|
495
495
|
pe(10, sn)
|
496
|
-
],
|
497
|
-
const Mt = "DataValidationPanel",
|
496
|
+
], Fe);
|
497
|
+
const Mt = "DataValidationPanel", We = {
|
498
498
|
id: "data-validation.operation.open-validation-panel",
|
499
499
|
type: rt.OPERATION,
|
500
500
|
handler(e, t) {
|
@@ -528,7 +528,7 @@ const Mt = "DataValidationPanel", Be = {
|
|
528
528
|
type: rt.OPERATION,
|
529
529
|
handler(e) {
|
530
530
|
const t = e.get(te), r = e.get(Se);
|
531
|
-
return r.open(), r.isOpen ? t.executeCommand(_n.id) : t.executeCommand(
|
531
|
+
return r.open(), r.isOpen ? t.executeCommand(_n.id) : t.executeCommand(We.id), !0;
|
532
532
|
}
|
533
533
|
}, Lt = {
|
534
534
|
type: rt.OPERATION,
|
@@ -536,7 +536,7 @@ const Mt = "DataValidationPanel", Be = {
|
|
536
536
|
handler(e, t) {
|
537
537
|
if (!t)
|
538
538
|
return !1;
|
539
|
-
const r = e.get(
|
539
|
+
const r = e.get(Fe), { unitId: n, subUnitId: i, row: o, column: a } = t, l = r.activeDropdown, s = l == null ? void 0 : l.location;
|
540
540
|
return s && s.unitId === n && s.subUnitId === i && s.row === o && s.col === a || r.showDataValidationDropdown(
|
541
541
|
n,
|
542
542
|
i,
|
@@ -548,7 +548,7 @@ const Mt = "DataValidationPanel", Be = {
|
|
548
548
|
type: rt.OPERATION,
|
549
549
|
id: "sheet.operation.hide-data-validation-dropdown",
|
550
550
|
handler(e, t) {
|
551
|
-
return t ? (e.get(
|
551
|
+
return t ? (e.get(Fe).hideDropdown(), !0) : !1;
|
552
552
|
}
|
553
553
|
}, kt = {
|
554
554
|
type: rt.COMMAND,
|
@@ -561,7 +561,7 @@ const Mt = "DataValidationPanel", Be = {
|
|
561
561
|
unitId: l,
|
562
562
|
subUnitId: s
|
563
563
|
};
|
564
|
-
return a.syncExecuteCommand(cn.id, d) ? (a.syncExecuteCommand(
|
564
|
+
return a.syncExecuteCommand(cn.id, d) ? (a.syncExecuteCommand(We.id, {
|
565
565
|
ruleId: o.uid,
|
566
566
|
isAdd: !0
|
567
567
|
}), !0) : !1;
|
@@ -571,7 +571,7 @@ var xi = Object.getOwnPropertyDescriptor, Bi = (e, t, r, n) => {
|
|
571
571
|
for (var i = n > 1 ? void 0 : n ? xi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
572
572
|
(a = e[o]) && (i = a(i) || i);
|
573
573
|
return i;
|
574
|
-
},
|
574
|
+
}, je = (e, t) => (r, n) => t(r, n, e);
|
575
575
|
const Ee = "SHEET_DATA_VALIDATION_ALERT";
|
576
576
|
let ht = class extends ye {
|
577
577
|
constructor(e, t, r, n, i, o) {
|
@@ -624,12 +624,12 @@ let ht = class extends ye {
|
|
624
624
|
}
|
625
625
|
};
|
626
626
|
ht = Bi([
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
627
|
+
je(0, M(Ci)),
|
628
|
+
je(1, M(wi)),
|
629
|
+
je(2, ce),
|
630
|
+
je(3, M(ue)),
|
631
|
+
je(4, dr),
|
632
|
+
je(5, M(ie))
|
633
633
|
], ht);
|
634
634
|
var Wi = Object.getOwnPropertyDescriptor, Hi = (e, t, r, n) => {
|
635
635
|
for (var i = n > 1 ? void 0 : n ? Wi(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
@@ -882,7 +882,7 @@ function Zi(e) {
|
|
882
882
|
}
|
883
883
|
function Ki(e) {
|
884
884
|
return {
|
885
|
-
id:
|
885
|
+
id: We.id,
|
886
886
|
title: "dataValidation.panel.title",
|
887
887
|
type: pn.BUTTON
|
888
888
|
};
|
@@ -899,7 +899,7 @@ const Gi = {
|
|
899
899
|
[Sr]: {
|
900
900
|
order: 0,
|
901
901
|
menuItemFactory: Zi,
|
902
|
-
[
|
902
|
+
[We.id]: {
|
903
903
|
order: 0,
|
904
904
|
menuItemFactory: Ki
|
905
905
|
},
|
@@ -1079,10 +1079,10 @@ let tt = class extends ln {
|
|
1079
1079
|
tt = Cr([
|
1080
1080
|
K(0, te),
|
1081
1081
|
K(1, gi),
|
1082
|
-
K(2,
|
1082
|
+
K(2, xe),
|
1083
1083
|
K(3, ce),
|
1084
1084
|
K(4, M(gr)),
|
1085
|
-
K(5, M(
|
1085
|
+
K(5, M(Fe)),
|
1086
1086
|
K(6, M(ie)),
|
1087
1087
|
K(7, M(Me)),
|
1088
1088
|
K(8, M(dn)),
|
@@ -1187,7 +1187,7 @@ let Nn = class extends ln {
|
|
1187
1187
|
};
|
1188
1188
|
Nn = Cr([
|
1189
1189
|
K(0, te),
|
1190
|
-
K(1,
|
1190
|
+
K(1, xe),
|
1191
1191
|
K(2, M(gr)),
|
1192
1192
|
K(3, M(Me)),
|
1193
1193
|
K(4, M(dn)),
|
@@ -1238,7 +1238,7 @@ var le = function() {
|
|
1238
1238
|
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
1239
1239
|
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
|
1240
1240
|
return r;
|
1241
|
-
},
|
1241
|
+
}, He = Be(function(e, t) {
|
1242
1242
|
var r = e.icon, n = e.id, i = e.className, o = e.extend, a = eo(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), s = pt("_".concat(ro()));
|
1243
1243
|
return Ir(r, "".concat(n), { defIds: r.defIds, idSuffix: s.current }, le({ ref: t, className: l }, a), o);
|
1244
1244
|
});
|
@@ -1268,49 +1268,49 @@ function no(e, t) {
|
|
1268
1268
|
function ro() {
|
1269
1269
|
return Math.random().toString(36).substring(2, 8);
|
1270
1270
|
}
|
1271
|
-
|
1272
|
-
var io = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062C8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767L13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217L14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046C13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703L10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046C9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217L9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746C9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732L13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rr =
|
1273
|
-
return Ie(
|
1271
|
+
He.displayName = "UniverIcon";
|
1272
|
+
var io = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062C8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767L13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217L14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046C13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703L10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046C9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217L9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746C9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732L13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rr = Be(function(e, t) {
|
1273
|
+
return Ie(He, Object.assign({}, e, {
|
1274
1274
|
id: "data-validation-icon",
|
1275
1275
|
ref: t,
|
1276
1276
|
icon: io
|
1277
1277
|
}));
|
1278
1278
|
});
|
1279
1279
|
Rr.displayName = "DataValidationIcon";
|
1280
|
-
var oo = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Sn =
|
1281
|
-
return Ie(
|
1280
|
+
var oo = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Sn = Be(function(e, t) {
|
1281
|
+
return Ie(He, Object.assign({}, e, {
|
1282
1282
|
id: "delete-icon",
|
1283
1283
|
ref: t,
|
1284
1284
|
icon: oo
|
1285
1285
|
}));
|
1286
1286
|
});
|
1287
1287
|
Sn.displayName = "DeleteIcon";
|
1288
|
-
var ao = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, yr =
|
1289
|
-
return Ie(
|
1288
|
+
var ao = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, yr = Be(function(e, t) {
|
1289
|
+
return Ie(He, Object.assign({}, e, {
|
1290
1290
|
id: "increase-icon",
|
1291
1291
|
ref: t,
|
1292
1292
|
icon: ao
|
1293
1293
|
}));
|
1294
1294
|
});
|
1295
1295
|
yr.displayName = "IncreaseIcon";
|
1296
|
-
var so = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cn =
|
1297
|
-
return Ie(
|
1296
|
+
var so = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cn = Be(function(e, t) {
|
1297
|
+
return Ie(He, Object.assign({}, e, {
|
1298
1298
|
id: "more-down-icon",
|
1299
1299
|
ref: t,
|
1300
1300
|
icon: so
|
1301
1301
|
}));
|
1302
1302
|
});
|
1303
1303
|
Cn.displayName = "MoreDownIcon";
|
1304
|
-
var lo = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, br =
|
1305
|
-
return Ie(
|
1304
|
+
var lo = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, br = Be(function(e, t) {
|
1305
|
+
return Ie(He, Object.assign({}, e, {
|
1306
1306
|
id: "more-up-icon",
|
1307
1307
|
ref: t,
|
1308
1308
|
icon: lo
|
1309
1309
|
}));
|
1310
1310
|
});
|
1311
1311
|
br.displayName = "MoreUpIcon";
|
1312
|
-
var co = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z" } }, { tag: "path", attrs: { d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z" } }, { tag: "path", attrs: { d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z" } }, { tag: "path", attrs: { d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z" } }, { tag: "path", attrs: { d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z" } }, { tag: "path", attrs: { d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z" } }] }] }, Mr =
|
1313
|
-
return Ie(
|
1312
|
+
var co = { tag: "svg", attrs: { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4C5 4.55228 5.44772 5 6 5Z" } }, { tag: "path", attrs: { d: "M6 9C6.55228 9 7 8.55229 7 8C7 7.44772 6.55228 7 6 7C5.44772 7 5 7.44772 5 8C5 8.55229 5.44772 9 6 9Z" } }, { tag: "path", attrs: { d: "M7 12C7 12.5523 6.55228 13 6 13C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11C6.55228 11 7 11.4477 7 12Z" } }, { tag: "path", attrs: { d: "M10 5C10.5523 5 11 4.55228 11 4C11 3.44772 10.5523 3 10 3C9.44771 3 9 3.44772 9 4C9 4.55228 9.44771 5 10 5Z" } }, { tag: "path", attrs: { d: "M11 8C11 8.55229 10.5523 9 10 9C9.44771 9 9 8.55229 9 8C9 7.44772 9.44771 7 10 7C10.5523 7 11 7.44772 11 8Z" } }, { tag: "path", attrs: { d: "M10 13C10.5523 13 11 12.5523 11 12C11 11.4477 10.5523 11 10 11C9.44771 11 9 11.4477 9 12C9 12.5523 9.44771 13 10 13Z" } }] }] }, Mr = Be(function(e, t) {
|
1313
|
+
return Ie(He, Object.assign({}, e, {
|
1314
1314
|
id: "sequence-icon",
|
1315
1315
|
ref: t,
|
1316
1316
|
icon: co
|
@@ -1344,8 +1344,8 @@ function uo(e) {
|
|
1344
1344
|
value: `${(d = n.errorStyle) != null ? d : lt.WARNING}`,
|
1345
1345
|
onChange: (u) => i({ ...n, errorStyle: +u }),
|
1346
1346
|
children: [
|
1347
|
-
/* @__PURE__ */ S(
|
1348
|
-
/* @__PURE__ */ S(
|
1347
|
+
/* @__PURE__ */ S(Le, { value: `${lt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
|
1348
|
+
/* @__PURE__ */ S(Le, { value: `${lt.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
|
1349
1349
|
]
|
1350
1350
|
}
|
1351
1351
|
)
|
@@ -1368,7 +1368,7 @@ function uo(e) {
|
|
1368
1368
|
)
|
1369
1369
|
}
|
1370
1370
|
),
|
1371
|
-
n.showErrorMessage ? /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(
|
1371
|
+
n.showErrorMessage ? /* @__PURE__ */ S(Y, { children: /* @__PURE__ */ S(ke, { value: n.error, onChange: (u) => i({ ...n, error: u }) }) }) : null
|
1372
1372
|
] })
|
1373
1373
|
] });
|
1374
1374
|
}
|
@@ -1385,11 +1385,11 @@ function po(e, t, r) {
|
|
1385
1385
|
}
|
1386
1386
|
function go() {
|
1387
1387
|
var D, U;
|
1388
|
-
const [e, t] = W(0), r = F(Se), n =
|
1389
|
-
if (
|
1388
|
+
const [e, t] = W(0), r = F(Se), n = Ae(r.activeRule$, r.activeRule), { unitId: i, subUnitId: o, rule: a } = n || {}, l = a.uid, s = F(Me), d = F(ce), u = F(gn), h = F(te), c = F(hn), m = F(ue), [p, b] = W(a), y = s.getValidatorItem(p.type), [g, C] = W(!1), v = s.getValidatorsByScope(di.SHEET), [I, w] = W(() => p.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), _ = ct(() => ho(h), [h]), [R, L] = W(!1), [N, E] = W(!1), T = pt(null), O = F(Gn);
|
1389
|
+
if (Ne(() => () => {
|
1390
1390
|
const f = O.getCurrentLastSelection();
|
1391
1391
|
f && O.setSelections([f]);
|
1392
|
-
}, [O]),
|
1392
|
+
}, [O]), Ne(() => {
|
1393
1393
|
h.onCommandExecuted((f) => {
|
1394
1394
|
(f.id === Br.id || f.id === Wr.id) && setTimeout(() => {
|
1395
1395
|
const A = c.getRuleById(i, o, l);
|
@@ -1598,7 +1598,7 @@ function go() {
|
|
1598
1598
|
] });
|
1599
1599
|
}
|
1600
1600
|
const vo = (e) => {
|
1601
|
-
const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = F(Me), l = F(te), s = F(Ei), d = a.getValidatorItem(t.type), u = pt(void 0), [h, c] = W(!1), m = F(Xn), p =
|
1601
|
+
const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = F(Me), l = F(te), s = F(Ei), d = a.getValidatorItem(t.type), u = pt(void 0), [h, c] = W(!1), m = F(Xn), p = Ae(m.currentTheme$), b = ct(() => {
|
1602
1602
|
var w;
|
1603
1603
|
const g = m.getColorFromTheme("primary.600"), C = m.getColorFromTheme("loop-color.2"), v = (w = m.getColorFromTheme(C)) != null ? w : g, I = new $r(v).toRgb();
|
1604
1604
|
return {
|
@@ -1612,7 +1612,7 @@ const vo = (e) => {
|
|
1612
1612
|
subUnitId: i
|
1613
1613
|
}), g.stopPropagation();
|
1614
1614
|
};
|
1615
|
-
return
|
1615
|
+
return Ne(() => () => {
|
1616
1616
|
var g;
|
1617
1617
|
u.current && ((g = u.current) == null || g.forEach((C) => {
|
1618
1618
|
C && s.removeShape(C);
|
@@ -1620,7 +1620,7 @@ const vo = (e) => {
|
|
1620
1620
|
}, [s]), /* @__PURE__ */ $(
|
1621
1621
|
"div",
|
1622
1622
|
{
|
1623
|
-
className:
|
1623
|
+
className: Ue(
|
1624
1624
|
`
|
1625
1625
|
univer-bg-secondary univer-relative univer--ml-2 univer--mr-2 univer-box-border univer-flex
|
1626
1626
|
univer-w-[287px] univer-cursor-pointer univer-flex-col univer-justify-between univer-overflow-hidden
|
@@ -1673,8 +1673,8 @@ const vo = (e) => {
|
|
1673
1673
|
);
|
1674
1674
|
};
|
1675
1675
|
function fo(e) {
|
1676
|
-
const t = F(ie), r = F(ce), n = F(te), i = F(be), o = F(Se), a = F(ue), [l, s] = W([]), { workbook: d } = e, u =
|
1677
|
-
|
1676
|
+
const t = F(ie), r = F(ce), n = F(te), i = F(be), o = F(Se), a = F(ue), [l, s] = W([]), { workbook: d } = e, u = Ae(d.activeSheet$, void 0, !0), h = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
|
1677
|
+
Ne(() => {
|
1678
1678
|
s(t.getRules(h, c));
|
1679
1679
|
const C = t.ruleChange$.subscribe((v) => {
|
1680
1680
|
v.unitId === h && v.subUnitId === c && s(t.getRules(h, c));
|
@@ -1731,12 +1731,12 @@ function fo(e) {
|
|
1731
1731
|
] });
|
1732
1732
|
}
|
1733
1733
|
const mo = () => {
|
1734
|
-
const e = F(Se), t =
|
1734
|
+
const e = F(Se), t = Ae(e.activeRule$, e.activeRule), r = F(ce), n = Ae(
|
1735
1735
|
() => r.getCurrentTypeOfUnit$(X.UNIVER_SHEET),
|
1736
1736
|
void 0,
|
1737
1737
|
void 0,
|
1738
1738
|
[]
|
1739
|
-
), i =
|
1739
|
+
), i = Ae(() => {
|
1740
1740
|
var o;
|
1741
1741
|
return (o = n == null ? void 0 : n.activeSheet$) != null ? o : mi(null);
|
1742
1742
|
}, void 0, void 0, []);
|
@@ -1745,7 +1745,7 @@ const mo = () => {
|
|
1745
1745
|
const { isTwoFormula: t = !1, value: r, onChange: n, showError: i, validResult: o } = e, a = F(ue), l = i ? o == null ? void 0 : o.formula1 : "", s = i ? o == null ? void 0 : o.formula2 : "";
|
1746
1746
|
return t ? /* @__PURE__ */ $(ut, { children: [
|
1747
1747
|
/* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
|
1748
|
-
|
1748
|
+
ke,
|
1749
1749
|
{
|
1750
1750
|
className: "univer-w-full",
|
1751
1751
|
placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
|
@@ -1760,7 +1760,7 @@ const mo = () => {
|
|
1760
1760
|
) }),
|
1761
1761
|
/* @__PURE__ */ S("div", { className: "-univer-mt-2 univer-mb-1 univer-text-sm univer-text-gray-400", children: a.t("dataValidation.panel.formulaAnd") }),
|
1762
1762
|
/* @__PURE__ */ S(Y, { error: s, children: /* @__PURE__ */ S(
|
1763
|
-
|
1763
|
+
ke,
|
1764
1764
|
{
|
1765
1765
|
className: "univer-w-full",
|
1766
1766
|
placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
|
@@ -1774,7 +1774,7 @@ const mo = () => {
|
|
1774
1774
|
}
|
1775
1775
|
) })
|
1776
1776
|
] }) : /* @__PURE__ */ S(Y, { error: l, children: /* @__PURE__ */ S(
|
1777
|
-
|
1777
|
+
ke,
|
1778
1778
|
{
|
1779
1779
|
className: "univer-w-full",
|
1780
1780
|
placeholder: a.t("dataValidation.panel.formulaPlaceholder"),
|
@@ -1803,7 +1803,7 @@ function So(e) {
|
|
1803
1803
|
}
|
1804
1804
|
) }),
|
1805
1805
|
s ? /* @__PURE__ */ S(Y, { label: o.t("dataValidation.checkbox.checked"), error: a, children: /* @__PURE__ */ S(
|
1806
|
-
|
1806
|
+
ke,
|
1807
1807
|
{
|
1808
1808
|
className: "univer-w-full",
|
1809
1809
|
placeholder: o.t("dataValidation.panel.valuePlaceholder"),
|
@@ -1817,7 +1817,7 @@ function So(e) {
|
|
1817
1817
|
}
|
1818
1818
|
) }) : null,
|
1819
1819
|
s ? /* @__PURE__ */ S(Y, { label: o.t("dataValidation.checkbox.unchecked"), error: l, children: /* @__PURE__ */ S(
|
1820
|
-
|
1820
|
+
ke,
|
1821
1821
|
{
|
1822
1822
|
className: "univer-w-full",
|
1823
1823
|
placeholder: o.t("dataValidation.panel.valuePlaceholder"),
|
@@ -1842,7 +1842,7 @@ function Co(e) {
|
|
1842
1842
|
fr,
|
1843
1843
|
{
|
1844
1844
|
ref: s,
|
1845
|
-
className:
|
1845
|
+
className: Ue("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", yt),
|
1846
1846
|
initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
|
1847
1847
|
unitId: t,
|
1848
1848
|
subUnitId: r,
|
@@ -1859,7 +1859,7 @@ function Co(e) {
|
|
1859
1859
|
}
|
1860
1860
|
) });
|
1861
1861
|
}
|
1862
|
-
const
|
1862
|
+
const wo = [
|
1863
1863
|
"#FFFFFF",
|
1864
1864
|
"#FEE7E7",
|
1865
1865
|
"#FEF0E6",
|
@@ -1901,7 +1901,7 @@ const Ye = "#ECECEC", wo = [
|
|
1901
1901
|
(a) => /* @__PURE__ */ S(
|
1902
1902
|
"div",
|
1903
1903
|
{
|
1904
|
-
className:
|
1904
|
+
className: Ue("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", yt),
|
1905
1905
|
style: { background: a },
|
1906
1906
|
onClick: () => {
|
1907
1907
|
r(a), o(!1);
|
@@ -1915,7 +1915,7 @@ const Ye = "#ECECEC", wo = [
|
|
1915
1915
|
children: /* @__PURE__ */ $(
|
1916
1916
|
"div",
|
1917
1917
|
{
|
1918
|
-
className:
|
1918
|
+
className: Ue("univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white", yt),
|
1919
1919
|
children: [
|
1920
1920
|
/* @__PURE__ */ S(
|
1921
1921
|
"div",
|
@@ -1932,8 +1932,8 @@ const Ye = "#ECECEC", wo = [
|
|
1932
1932
|
);
|
1933
1933
|
}, Fn = (e) => {
|
1934
1934
|
const { item: t, commonProps: r, className: n } = e, { onItemChange: i, onItemDelete: o } = r;
|
1935
|
-
return /* @__PURE__ */ $("div", { className:
|
1936
|
-
!t.isRef && /* @__PURE__ */ S("div", { className:
|
1935
|
+
return /* @__PURE__ */ $("div", { className: Ue("univer-flex univer-items-center univer-gap-2", n), children: [
|
1936
|
+
!t.isRef && /* @__PURE__ */ S("div", { className: Ue("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ S(Mr, {}) }),
|
1937
1937
|
/* @__PURE__ */ S(
|
1938
1938
|
Io,
|
1939
1939
|
{
|
@@ -1944,7 +1944,7 @@ const Ye = "#ECECEC", wo = [
|
|
1944
1944
|
}
|
1945
1945
|
),
|
1946
1946
|
/* @__PURE__ */ S(
|
1947
|
-
|
1947
|
+
ke,
|
1948
1948
|
{
|
1949
1949
|
disabled: t.isRef,
|
1950
1950
|
value: t.label,
|
@@ -1964,8 +1964,8 @@ const Ye = "#ECECEC", wo = [
|
|
1964
1964
|
};
|
1965
1965
|
function Ro(e) {
|
1966
1966
|
const { value: t, onChange: r = () => {
|
1967
|
-
}, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = W(() => Oe(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [p, b] = W(u === "1" ? s : "="), y = F(ue), g = F(Me), C = F(hn), v = F(ni), [I, w] = W(() => d.split(",")), _ = g.getValidatorItem(j.LIST), [R, L] = W([]), [N, E] = W(""), T = a ? o == null ? void 0 : o.formula1 : "", O = ct(() => C.ruleChange$.pipe(ur(16)), []), P =
|
1968
|
-
|
1967
|
+
}, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = W(() => Oe(s) ? "1" : "0"), [c, m] = W(u === "1" ? s : "="), [p, b] = W(u === "1" ? s : "="), y = F(ue), g = F(Me), C = F(hn), v = F(ni), [I, w] = W(() => d.split(",")), _ = g.getValidatorItem(j.LIST), [R, L] = W([]), [N, E] = W(""), T = a ? o == null ? void 0 : o.formula1 : "", O = ct(() => C.ruleChange$.pipe(ur(16)), []), P = Ae(O), k = en(r);
|
1968
|
+
Ne(() => {
|
1969
1969
|
(async () => {
|
1970
1970
|
await new Promise((f) => {
|
1971
1971
|
setTimeout(() => f(!0), 100);
|
@@ -1976,14 +1976,14 @@ function Ro(e) {
|
|
1976
1976
|
L(f);
|
1977
1977
|
}
|
1978
1978
|
})();
|
1979
|
-
}, [C, P, _, l, i, n]),
|
1979
|
+
}, [C, P, _, l, i, n]), Ne(() => {
|
1980
1980
|
Oe(s) && s !== p && (m(s), b(p));
|
1981
1981
|
}, [p, s]);
|
1982
1982
|
const [H, B] = W(() => {
|
1983
1983
|
const D = u !== "1" ? ri(s) : [], U = d.split(",");
|
1984
1984
|
return D.map((f, A) => ({
|
1985
1985
|
label: f,
|
1986
|
-
color: U[A] ||
|
1986
|
+
color: U[A] || Pe,
|
1987
1987
|
isRef: !1,
|
1988
1988
|
id: yn(4)
|
1989
1989
|
}));
|
@@ -1995,7 +1995,7 @@ function Ro(e) {
|
|
1995
1995
|
U !== -1 && (H.splice(U, 1), B([...H]));
|
1996
1996
|
}, oe = d.split(","), he = ct(() => R.map((D, U) => ({
|
1997
1997
|
label: D,
|
1998
|
-
color: oe[U] ||
|
1998
|
+
color: oe[U] || Pe,
|
1999
1999
|
id: `${U}`,
|
2000
2000
|
isRef: !0
|
2001
2001
|
})), [oe, R]), z = (D, U, f) => {
|
@@ -2009,13 +2009,13 @@ function Ro(e) {
|
|
2009
2009
|
...H,
|
2010
2010
|
{
|
2011
2011
|
label: "",
|
2012
|
-
color:
|
2012
|
+
color: Pe,
|
2013
2013
|
isRef: !1,
|
2014
2014
|
id: yn(4)
|
2015
2015
|
}
|
2016
2016
|
]);
|
2017
2017
|
};
|
2018
|
-
|
2018
|
+
Ne(() => {
|
2019
2019
|
if (u === "1")
|
2020
2020
|
return;
|
2021
2021
|
const D = /* @__PURE__ */ new Set(), U = [];
|
@@ -2031,7 +2031,7 @@ function Ro(e) {
|
|
2031
2031
|
});
|
2032
2032
|
}), k({
|
2033
2033
|
formula1: er(U.map((f) => f.label)),
|
2034
|
-
formula2: U.map((f) => f.color ===
|
2034
|
+
formula2: U.map((f) => f.color === Pe ? "" : f.color).join(",")
|
2035
2035
|
});
|
2036
2036
|
}, [H, k, u, p, I]);
|
2037
2037
|
const fe = en(async (D) => {
|
@@ -2065,8 +2065,8 @@ function Ro(e) {
|
|
2065
2065
|
});
|
2066
2066
|
},
|
2067
2067
|
children: [
|
2068
|
-
/* @__PURE__ */ S(
|
2069
|
-
/* @__PURE__ */ S(
|
2068
|
+
/* @__PURE__ */ S(Le, { value: "0", children: y.t("dataValidation.list.customOptions") }),
|
2069
|
+
/* @__PURE__ */ S(Le, { value: "1", children: y.t("dataValidation.list.refOptions") })
|
2070
2070
|
]
|
2071
2071
|
}
|
2072
2072
|
) }),
|
@@ -2075,7 +2075,7 @@ function Ro(e) {
|
|
2075
2075
|
fr,
|
2076
2076
|
{
|
2077
2077
|
ref: Q,
|
2078
|
-
className:
|
2078
|
+
className: Ue("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors hover:univer-border-primary-600 dark:!univer-bg-gray-700 dark:!univer-text-white [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent", yt),
|
2079
2079
|
initValue: c,
|
2080
2080
|
unitId: n,
|
2081
2081
|
subUnitId: i,
|
@@ -2156,9 +2156,9 @@ function Dt(e) {
|
|
2156
2156
|
var i;
|
2157
2157
|
const { value: t, onChange: r } = e, n = F(ue);
|
2158
2158
|
return /* @__PURE__ */ S(Y, { label: n.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ $(fn, { value: `${(i = t.renderMode) != null ? i : se.CUSTOM}`, onChange: (o) => r({ ...t, renderMode: +o }), children: [
|
2159
|
-
/* @__PURE__ */ S(
|
2160
|
-
/* @__PURE__ */ S(
|
2161
|
-
/* @__PURE__ */ S(
|
2159
|
+
/* @__PURE__ */ S(Le, { value: `${se.CUSTOM}`, children: n.t("dataValidation.renderMode.chip") }),
|
2160
|
+
/* @__PURE__ */ S(Le, { value: `${se.ARROW}`, children: n.t("dataValidation.renderMode.arrow") }),
|
2161
|
+
/* @__PURE__ */ S(Le, { value: `${se.TEXT}`, children: n.t("dataValidation.renderMode.text") })
|
2162
2162
|
] }) });
|
2163
2163
|
}
|
2164
2164
|
Dt.componentKey = bo;
|
@@ -2188,7 +2188,7 @@ var Eo = Object.getOwnPropertyDescriptor, Do = (e, t, r, n) => {
|
|
2188
2188
|
for (var i = n > 1 ? void 0 : n ? Eo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
2189
2189
|
(a = e[o]) && (i = a(i) || i);
|
2190
2190
|
return i;
|
2191
|
-
},
|
2191
|
+
}, Ye = (e, t) => (r, n) => t(r, n, e);
|
2192
2192
|
const _t = 6;
|
2193
2193
|
let nn = class {
|
2194
2194
|
constructor(e, t, r, n, i, o) {
|
@@ -2317,12 +2317,12 @@ let nn = class {
|
|
2317
2317
|
}
|
2318
2318
|
};
|
2319
2319
|
nn = Do([
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
|
2324
|
-
|
2325
|
-
|
2320
|
+
Ye(0, te),
|
2321
|
+
Ye(1, ce),
|
2322
|
+
Ye(2, M(ii)),
|
2323
|
+
Ye(3, M(Xn)),
|
2324
|
+
Ye(4, M(xe)),
|
2325
|
+
Ye(5, M(ie))
|
2326
2326
|
], nn);
|
2327
2327
|
var Vo = Object.getOwnPropertyDescriptor, Oo = (e, t, r, n) => {
|
2328
2328
|
for (var i = n > 1 ? void 0 : n ? Vo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
@@ -2423,7 +2423,7 @@ class Bo extends Kr {
|
|
2423
2423
|
width: l.width,
|
2424
2424
|
height: l.height,
|
2425
2425
|
radius: xo,
|
2426
|
-
fill: o ||
|
2426
|
+
fill: o || Pe
|
2427
2427
|
}), t.translateWithPrecision(Er, l.ba), t.font = n, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
|
2428
2428
|
}
|
2429
2429
|
}
|
@@ -2570,7 +2570,7 @@ let on = class {
|
|
2570
2570
|
on = Ho([
|
2571
2571
|
St(0, te),
|
2572
2572
|
St(1, ce),
|
2573
|
-
St(2, M(
|
2573
|
+
St(2, M(xe)),
|
2574
2574
|
St(3, M(ie))
|
2575
2575
|
], on);
|
2576
2576
|
class jo extends Ce {
|
@@ -2706,7 +2706,7 @@ let an = class {
|
|
2706
2706
|
e.translateWithPrecision(_e, D), zn.drawWith(e, {
|
2707
2707
|
width: G,
|
2708
2708
|
height: q,
|
2709
|
-
fill: (N == null ? void 0 : N.color) ||
|
2709
|
+
fill: (N == null ? void 0 : N.color) || Pe,
|
2710
2710
|
radius: jt
|
2711
2711
|
}), e.save(), e.translateWithPrecision(De, xn), e.beginPath(), e.rect(0, 0, z, Q), e.clip(), e.translateWithPrecision(U, 0), Mn.drawWith(e, {
|
2712
2712
|
text: L,
|
@@ -2823,7 +2823,7 @@ an = Xo([
|
|
2823
2823
|
at(0, ce),
|
2824
2824
|
at(1, M(ue)),
|
2825
2825
|
at(2, te),
|
2826
|
-
at(3, M(
|
2826
|
+
at(3, M(xe)),
|
2827
2827
|
at(4, M(ie))
|
2828
2828
|
], an);
|
2829
2829
|
class Ko extends Ce {
|
@@ -2914,7 +2914,7 @@ let Hn = (wt = class extends Zn {
|
|
2914
2914
|
onStarting() {
|
2915
2915
|
[
|
2916
2916
|
[Se],
|
2917
|
-
[
|
2917
|
+
[Fe],
|
2918
2918
|
[ht],
|
2919
2919
|
[Je],
|
2920
2920
|
[tt],
|
@@ -2928,14 +2928,14 @@ let Hn = (wt = class extends Zn {
|
|
2928
2928
|
Lt,
|
2929
2929
|
_r,
|
2930
2930
|
_n,
|
2931
|
-
|
2931
|
+
We,
|
2932
2932
|
mr
|
2933
2933
|
].forEach((e) => {
|
2934
2934
|
this._commandService.registerCommand(e);
|
2935
2935
|
});
|
2936
2936
|
}
|
2937
2937
|
onReady() {
|
2938
|
-
this._injector.get(Qe), this._injector.get(et), this._injector.get(
|
2938
|
+
this._injector.get(Qe), this._injector.get(et), this._injector.get(xe).registerRenderModule(
|
2939
2939
|
X.UNIVER_SHEET,
|
2940
2940
|
[Et]
|
2941
2941
|
);
|
@@ -2971,7 +2971,7 @@ let Tt = class extends Zn {
|
|
2971
2971
|
onStarting() {
|
2972
2972
|
[
|
2973
2973
|
[Se],
|
2974
|
-
[
|
2974
|
+
[Fe],
|
2975
2975
|
[ht],
|
2976
2976
|
[Je],
|
2977
2977
|
[tt],
|
@@ -2986,14 +2986,14 @@ let Tt = class extends Zn {
|
|
2986
2986
|
Lt,
|
2987
2987
|
_r,
|
2988
2988
|
_n,
|
2989
|
-
|
2989
|
+
We,
|
2990
2990
|
mr
|
2991
2991
|
].forEach((e) => {
|
2992
2992
|
this._commandService.registerCommand(e);
|
2993
2993
|
});
|
2994
2994
|
}
|
2995
2995
|
onReady() {
|
2996
|
-
this._injector.get(Qe), this._injector.get(et), this._injector.get(qe), this._injector.get(ht), this._injector.get(
|
2996
|
+
this._injector.get(Qe), this._injector.get(et), this._injector.get(qe), this._injector.get(ht), this._injector.get(xe).registerRenderModule(
|
2997
2997
|
X.UNIVER_SHEET,
|
2998
2998
|
[Et]
|
2999
2999
|
);
|