@univerjs/sheets-data-validation-ui 0.7.0-nightly.202505251606 → 0.8.0-beta.0
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/LICENSE +176 -0
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +144 -144
- package/lib/index.css +1 -1
- package/lib/index.js +144 -144
- package/lib/umd/index.js +2 -2
- package/package.json +13 -13
package/lib/es/index.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
var Lr = Object.defineProperty;
|
2
2
|
var kr = (e, t, r) => t in e ? Lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
3
3
|
var E = (e, t, r) => kr(e, typeof t != "symbol" ? t + "" : t, r);
|
4
|
-
import { LocaleService as se, isFormulaString as De, DataValidationType as G, Tools as Zt, Inject as b, Injector as we, Disposable as Re, UniverInstanceType as Y, toDisposable as Nr, IUniverInstanceService as le, DataValidationErrorStyle as lt, DataValidationStatus as
|
4
|
+
import { LocaleService as se, isFormulaString as De, DataValidationType as G, Tools as Zt, Inject as b, Injector as we, Disposable as Re, UniverInstanceType as Y, toDisposable as Nr, IUniverInstanceService as le, DataValidationErrorStyle as lt, DataValidationStatus as Ye, ICommandService as J, IConfigService as cn, DataValidationRenderMode as ie, DisposableCollection as Ur, dayjs as Mn, numfmt as Yn, CellValueType as Fr, CommandType as nt, ObjectMatrix as Rt, Range as xr, Rectangle as yt, queryObjectMatrix as qt, Optional as $r, RxDisposable as un, InterceptorEffectEnum as Xn, sequenceExecute as zn, bufferDebounceTime as Hr, debounce as Br, UndoCommand as Wr, RedoCommand as jr, isUnitRangesEqual as Yr, shallowEqual as bn, ThemeService as Kn, ColorKit as Xr, VerticalAlign as ae, HorizontalAlign as Xe, DEFAULT_STYLES as re, WrapStrategy as Ie, DocumentDataModel as zr, BooleanNumber as rt, DEFAULT_EMPTY_DOCUMENT_VALUE as Kr, Plugin as Gn, merge as Zn } from "@univerjs/core";
|
5
5
|
import { DataValidationFormulaController as Gr, deserializeListOptions as Zr, serializeListOptions as qn, CUSTOM_FORMULA_INPUT_NAME as Jn, BASE_FORMULA_INPUT_NAME as At, LIST_FORMULA_INPUT_NAME as hn, CHECKBOX_FORMULA_INPUT_NAME as Qn, SheetDataValidationModel as ee, SheetsDataValidationValidatorService as qr, getDataValidationCellValue as Ut, getCellValueOrigin as Q, createDefaultNewRule as er, AddSheetDataValidationCommand as gn, DATA_VALIDATION_PLUGIN_NAME as tr, getDataValidationDiffMutations as Jt, UpdateSheetDataValidationRangeCommand as nr, DataValidationCacheService as rr, UpdateSheetDataValidationSettingCommand as En, UpdateSheetDataValidationOptionsCommand as Jr, RemoveSheetDataValidationCommand as ir, RemoveSheetAllDataValidationCommand as Qr, DataValidationFormulaService as ei, CHECKBOX_FORMULA_2 as ti, CHECKBOX_FORMULA_1 as ni, getFormulaResult as Ft, isLegalFormulaResult as Dn, transformCheckboxValue as ri } from "@univerjs/sheets-data-validation";
|
6
6
|
import { jsxs as W, Fragment as dt, jsx as _ } from "react/jsx-runtime";
|
7
|
-
import { FormLayout as j, Input as Ve, Checkbox as Lt, clsx as
|
7
|
+
import { FormLayout as j, Input as Ve, Checkbox as Lt, clsx as Ae, borderClassName as Mt, RadioGroup as pn, Radio as Oe, DraggableList as ii, Dropdown as oi, Button as ze, Select as Vn } from "@univerjs/design";
|
8
8
|
import { useDependency as U, useSidebarClick as or, useObservable as Te, useEvent as Qt, ISidebarService as ar, IDialogService as ai, IZenZoneService as sr, KeyCode as gt, MenuItemType as vn, getMenuHiddenObservable as si, RibbonDataGroup as li, IMenuManagerService as di, ComponentManager as mn } from "@univerjs/ui";
|
9
|
-
import On, { useState as
|
9
|
+
import On, { useState as B, useRef as ht, forwardRef as ke, createElement as Ne, useMemo as ct, useEffect as Pe } from "react";
|
10
10
|
import { FormulaEditor as lr, RangeSelector as ci } from "@univerjs/sheets-formula-ui";
|
11
11
|
import { DataValidatorRegistryService as ye, DataValidationModel as fn, DataValidatorDropdownType as ge, DataValidatorRegistryScope as ui, TWO_FORMULA_OPERATOR_COUNT as hi, getRuleOptions as Tn, getRuleSetting as Pn } from "@univerjs/data-validation";
|
12
12
|
import { debounceTime as dr, filter as _n, BehaviorSubject as An, distinctUntilChanged as gi, Subject as pi, bufferTime as cr, of as vi } from "rxjs";
|
13
|
-
import { DeviceInputEventType as pt, IRenderManagerService as
|
13
|
+
import { DeviceInputEventType as pt, IRenderManagerService as Ue, fixLineWidthByScale as Ln, Transform as mi, CheckboxShape as fi, getCurrentTypeOfRenderer as Ke, CURSOR_TYPE as Ge, FontCache as _i, Shape as Si, Rect as ur, getFontStyleString as xt, getDocsSkeletonPageSize as it, Documents as Ci, DocumentViewModel as Ii, DocumentSkeleton as wi } from "@univerjs/engine-render";
|
14
14
|
import { SheetInterceptorService as Sn, VALIDATE_CELL as Ri, SheetsSelectionsService as hr, SetRangeValuesCommand as st, getSheetCommandTarget as gr, rangeToDiscreteRange as yi, SheetPermissionCheckController as Mi, WorksheetEditPermission as en, WorksheetSetCellStylePermission as tn, RangeProtectionPermissionEditPoint as nn, WorkbookEditablePermission as rn, INTERCEPTOR_POINT as pr, InterceptCellContentPriority as vr, checkRangesEditablePermission as bi } from "@univerjs/sheets";
|
15
15
|
import { getPatternType as Ei } from "@univerjs/sheets-numfmt";
|
16
16
|
import { ISheetCellDropdownManagerService as Di, IEditorBridgeService as mr, SetCellEditVisibleOperation as vt, HoverManagerService as Vi, CellAlertManagerService as Oi, CellAlertType as Ti, IAutoFillService as Pi, APPLY_TYPE as ot, virtualizeDiscreteRanges as on, getAutoFillRepeatRange as Ai, ISheetClipboardService as Li, COPY_TYPE as kn, PREDEFINED_HOOK_NAME as mt, getRepeatRange as Nn, getCurrentRangeDisable$ as ki, AutoHeightController as fr, SheetSkeletonManagerService as bt, IMarkSelectionService as Ni } from "@univerjs/sheets-ui";
|
@@ -60,7 +60,7 @@ const Fi = (e) => {
|
|
60
60
|
) });
|
61
61
|
};
|
62
62
|
function xi(e) {
|
63
|
-
const { value: t, onChange: r, showError: n, validResult: i } = e, o = U(se), a = n ? i == null ? void 0 : i.formula1 : "", l = n ? i == null ? void 0 : i.formula2 : "", [s, d] =
|
63
|
+
const { value: t, onChange: r, showError: n, validResult: i } = e, o = U(se), a = n ? i == null ? void 0 : i.formula1 : "", l = n ? i == null ? void 0 : i.formula2 : "", [s, d] = B(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
|
64
64
|
return /* @__PURE__ */ W(dt, { children: [
|
65
65
|
/* @__PURE__ */ _(j, { children: /* @__PURE__ */ _(
|
66
66
|
Lt,
|
@@ -108,7 +108,7 @@ function xi(e) {
|
|
108
108
|
}
|
109
109
|
function $i(e) {
|
110
110
|
var h;
|
111
|
-
const { unitId: t, subUnitId: r, value: n, onChange: i, showError: o, validResult: a } = e, l = o ? a == null ? void 0 : a.formula1 : void 0, s = ht(null), [d, u] =
|
111
|
+
const { unitId: t, subUnitId: r, value: n, onChange: i, showError: o, validResult: a } = e, l = o ? a == null ? void 0 : a.formula1 : void 0, s = ht(null), [d, u] = B(!1);
|
112
112
|
return or((c) => {
|
113
113
|
var g;
|
114
114
|
((g = s.current) == null ? void 0 : g.isClickOutSide(c)) && u(!1);
|
@@ -116,7 +116,7 @@ function $i(e) {
|
|
116
116
|
lr,
|
117
117
|
{
|
118
118
|
ref: s,
|
119
|
-
className:
|
119
|
+
className: Ae("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent dark:!univer-bg-gray-700 dark:!univer-text-white hover:univer-border-primary-600", Mt),
|
120
120
|
initValue: (h = n == null ? void 0 : n.formula1) != null ? h : "=",
|
121
121
|
unitId: t,
|
122
122
|
subUnitId: r,
|
@@ -141,23 +141,23 @@ var oe = function() {
|
|
141
141
|
}
|
142
142
|
return e;
|
143
143
|
}, oe.apply(this, arguments);
|
144
|
-
},
|
144
|
+
}, Hi = function(e, t) {
|
145
145
|
var r = {};
|
146
146
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
147
147
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
148
148
|
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
149
149
|
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
|
150
150
|
return r;
|
151
|
-
},
|
152
|
-
var r = e.icon, n = e.id, i = e.className, o = e.extend, a =
|
151
|
+
}, Fe = ke(function(e, t) {
|
152
|
+
var r = e.icon, n = e.id, i = e.className, o = e.extend, a = Hi(e, ["icon", "id", "className", "extend"]), l = "univerjs-icon univerjs-icon-".concat(n, " ").concat(i || "").trim(), s = ht("_".concat(ji()));
|
153
153
|
return Sr(r, "".concat(n), { defIds: r.defIds, idSuffix: s.current }, oe({ ref: t, className: l }, a), o);
|
154
154
|
});
|
155
155
|
function Sr(e, t, r, n, i) {
|
156
|
-
return
|
156
|
+
return Ne(e.tag, oe(oe({ key: t }, Bi(e, r, i)), n), (Wi(e, r).children || []).map(function(o, a) {
|
157
157
|
return Sr(o, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, i);
|
158
158
|
}));
|
159
159
|
}
|
160
|
-
function
|
160
|
+
function Bi(e, t, r) {
|
161
161
|
var n = oe({}, e.attrs);
|
162
162
|
r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1), e.tag === "mask" && n.id && (n.id = n.id + t.idSuffix), Object.entries(n).forEach(function(o) {
|
163
163
|
var a = o[0], l = o[1];
|
@@ -178,56 +178,56 @@ function Wi(e, t) {
|
|
178
178
|
function ji() {
|
179
179
|
return Math.random().toString(36).substring(2, 8);
|
180
180
|
}
|
181
|
-
|
182
|
-
var Yi = { tag: "svg", attrs: { 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.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.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" } }] }, Cr =
|
183
|
-
return
|
181
|
+
Fe.displayName = "UniverIcon";
|
182
|
+
var Yi = { tag: "svg", attrs: { 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.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.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" } }] }, Cr = ke(function(e, t) {
|
183
|
+
return Ne(Fe, Object.assign({}, e, {
|
184
184
|
id: "data-validation-single",
|
185
185
|
ref: t,
|
186
186
|
icon: Yi
|
187
187
|
}));
|
188
188
|
});
|
189
189
|
Cr.displayName = "DataValidationSingle";
|
190
|
-
var Xi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cn =
|
191
|
-
return
|
190
|
+
var Xi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Cn = ke(function(e, t) {
|
191
|
+
return Ne(Fe, Object.assign({}, e, {
|
192
192
|
id: "delete-single",
|
193
193
|
ref: t,
|
194
194
|
icon: Xi
|
195
195
|
}));
|
196
196
|
});
|
197
197
|
Cn.displayName = "DeleteSingle";
|
198
|
-
var zi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Ir =
|
199
|
-
return
|
198
|
+
var zi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Ir = ke(function(e, t) {
|
199
|
+
return Ne(Fe, Object.assign({}, e, {
|
200
200
|
id: "increase-single",
|
201
201
|
ref: t,
|
202
202
|
icon: zi
|
203
203
|
}));
|
204
204
|
});
|
205
205
|
Ir.displayName = "IncreaseSingle";
|
206
|
-
var Ki = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, In =
|
207
|
-
return
|
206
|
+
var Ki = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, In = ke(function(e, t) {
|
207
|
+
return Ne(Fe, Object.assign({}, e, {
|
208
208
|
id: "more-down-single",
|
209
209
|
ref: t,
|
210
210
|
icon: Ki
|
211
211
|
}));
|
212
212
|
});
|
213
213
|
In.displayName = "MoreDownSingle";
|
214
|
-
var Gi = { tag: "svg", attrs: { 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" } }] }, wr =
|
215
|
-
return
|
214
|
+
var Gi = { tag: "svg", attrs: { 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" } }] }, wr = ke(function(e, t) {
|
215
|
+
return Ne(Fe, Object.assign({}, e, {
|
216
216
|
id: "more-up-single",
|
217
217
|
ref: t,
|
218
218
|
icon: Gi
|
219
219
|
}));
|
220
220
|
});
|
221
221
|
wr.displayName = "MoreUpSingle";
|
222
|
-
var Zi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Rr =
|
223
|
-
return
|
222
|
+
var Zi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Rr = ke(function(e, t) {
|
223
|
+
return Ne(Fe, Object.assign({}, e, {
|
224
224
|
id: "sequence-single",
|
225
225
|
ref: t,
|
226
226
|
icon: Zi
|
227
227
|
}));
|
228
228
|
});
|
229
229
|
Rr.displayName = "SequenceSingle";
|
230
|
-
const
|
230
|
+
const We = "#ECECEC", qi = [
|
231
231
|
"#FFFFFF",
|
232
232
|
"#FEE7E7",
|
233
233
|
"#FEF0E6",
|
@@ -253,7 +253,7 @@ const He = "#ECECEC", qi = [
|
|
253
253
|
"#9E6DE3",
|
254
254
|
"#F248A6"
|
255
255
|
], Ji = (e) => {
|
256
|
-
const { value: t, onChange: r, disabled: n } = e, [i, o] =
|
256
|
+
const { value: t, onChange: r, disabled: n } = e, [i, o] = B(!1);
|
257
257
|
return /* @__PURE__ */ _(
|
258
258
|
oi,
|
259
259
|
{
|
@@ -269,7 +269,7 @@ const He = "#ECECEC", qi = [
|
|
269
269
|
(a) => /* @__PURE__ */ _(
|
270
270
|
"div",
|
271
271
|
{
|
272
|
-
className:
|
272
|
+
className: Ae("univer-box-border univer-size-4 univer-cursor-pointer univer-rounded", Mt),
|
273
273
|
style: { background: a },
|
274
274
|
onClick: () => {
|
275
275
|
r(a), o(!1);
|
@@ -283,7 +283,7 @@ const He = "#ECECEC", qi = [
|
|
283
283
|
children: /* @__PURE__ */ W(
|
284
284
|
"div",
|
285
285
|
{
|
286
|
-
className:
|
286
|
+
className: Ae("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 dark:!univer-bg-gray-700 dark:!univer-text-white hover:univer-border-primary-600", Mt),
|
287
287
|
children: [
|
288
288
|
/* @__PURE__ */ _(
|
289
289
|
"div",
|
@@ -299,9 +299,9 @@ const He = "#ECECEC", qi = [
|
|
299
299
|
}
|
300
300
|
);
|
301
301
|
}, Un = (e) => {
|
302
|
-
const { item: t, commonProps: r,
|
303
|
-
return /* @__PURE__ */ W("div", { className: "univer-flex univer-items-center univer-gap-2",
|
304
|
-
t.isRef
|
302
|
+
const { item: t, commonProps: r, className: n } = e, { onItemChange: i, onItemDelete: o } = r;
|
303
|
+
return /* @__PURE__ */ W("div", { className: Ae("univer-flex univer-items-center univer-gap-2", n), children: [
|
304
|
+
!t.isRef && /* @__PURE__ */ _("div", { className: Ae("univer-cursor-move", "draggableHandle"), children: /* @__PURE__ */ _(Rr, {}) }),
|
305
305
|
/* @__PURE__ */ _(
|
306
306
|
Ji,
|
307
307
|
{
|
@@ -332,14 +332,14 @@ const He = "#ECECEC", qi = [
|
|
332
332
|
};
|
333
333
|
function Qi(e) {
|
334
334
|
const { value: t, onChange: r = () => {
|
335
|
-
}, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] =
|
335
|
+
}, unitId: n, subUnitId: i, validResult: o, showError: a, ruleId: l } = e, { formula1: s = "", formula2: d = "" } = t || {}, [u, h] = B(() => De(s) ? "1" : "0"), [c, m] = B(u === "1" ? s : "="), [g, M] = B(u === "1" ? s : "="), y = U(se), p = U(ye), S = U(fn), v = U(Gr), [C, w] = B(() => d.split(",")), I = p.getValidatorItem(G.LIST), [R, T] = B([]), [N, D] = B(""), P = a ? o == null ? void 0 : o.formula1 : "", A = ct(() => S.ruleChange$.pipe(dr(16)), []), L = Te(A), V = Qt(r);
|
336
336
|
Pe(() => {
|
337
337
|
(async () => {
|
338
338
|
await new Promise((f) => {
|
339
339
|
setTimeout(() => f(!0), 100);
|
340
340
|
});
|
341
|
-
const O = S.getRuleById(n, i, l),
|
342
|
-
if (De(
|
341
|
+
const O = S.getRuleById(n, i, l), H = O == null ? void 0 : O.formula1;
|
342
|
+
if (De(H) && I && O) {
|
343
343
|
const f = await I.getListAsync(O, n, i);
|
344
344
|
T(f);
|
345
345
|
}
|
@@ -347,26 +347,26 @@ function Qi(e) {
|
|
347
347
|
}, [S, L, I, l, i, n]), Pe(() => {
|
348
348
|
De(s) && s !== g && (m(s), M(g));
|
349
349
|
}, [g, s]);
|
350
|
-
const [F, x] =
|
351
|
-
const O = u !== "1" ? Zr(s) : [],
|
350
|
+
const [F, x] = B(() => {
|
351
|
+
const O = u !== "1" ? Zr(s) : [], H = d.split(",");
|
352
352
|
return O.map((f, k) => ({
|
353
353
|
label: f,
|
354
|
-
color:
|
354
|
+
color: H[k] || We,
|
355
355
|
isRef: !1,
|
356
356
|
id: Zt.generateRandomId(4)
|
357
357
|
}));
|
358
|
-
}), X = (O,
|
358
|
+
}), X = (O, H, f) => {
|
359
359
|
const k = F.find(($) => $.id === O);
|
360
|
-
k && (k.label =
|
360
|
+
k && (k.label = H, k.color = f, x([...F]));
|
361
361
|
}, Z = (O) => {
|
362
|
-
const
|
363
|
-
|
364
|
-
}, z = d.split(","), te = ct(() => R.map((O,
|
362
|
+
const H = F.findIndex((f) => f.id === O);
|
363
|
+
H !== -1 && (F.splice(H, 1), x([...F]));
|
364
|
+
}, z = d.split(","), te = ct(() => R.map((O, H) => ({
|
365
365
|
label: O,
|
366
|
-
color: z[
|
367
|
-
id: `${
|
366
|
+
color: z[H] || We,
|
367
|
+
id: `${H}`,
|
368
368
|
isRef: !0
|
369
|
-
})), [z, R]), pe = (O,
|
369
|
+
})), [z, R]), pe = (O, H, f) => {
|
370
370
|
const k = [...C];
|
371
371
|
k[+O] = f, w(k), V({
|
372
372
|
formula1: s,
|
@@ -377,7 +377,7 @@ function Qi(e) {
|
|
377
377
|
...F,
|
378
378
|
{
|
379
379
|
label: "",
|
380
|
-
color:
|
380
|
+
color: We,
|
381
381
|
isRef: !1,
|
382
382
|
id: Zt.generateRandomId(4)
|
383
383
|
}
|
@@ -386,20 +386,20 @@ function Qi(e) {
|
|
386
386
|
Pe(() => {
|
387
387
|
if (u === "1")
|
388
388
|
return;
|
389
|
-
const O = /* @__PURE__ */ new Set(),
|
389
|
+
const O = /* @__PURE__ */ new Set(), H = [];
|
390
390
|
F.map((f) => ({
|
391
391
|
labelList: f.label.split(","),
|
392
392
|
item: f
|
393
393
|
})).forEach(({ item: f, labelList: k }) => {
|
394
394
|
k.forEach(($) => {
|
395
|
-
O.has($) || (O.add($),
|
395
|
+
O.has($) || (O.add($), H.push({
|
396
396
|
label: $,
|
397
397
|
color: f.color
|
398
398
|
}));
|
399
399
|
});
|
400
400
|
}), V({
|
401
|
-
formula1: qn(
|
402
|
-
formula2:
|
401
|
+
formula1: qn(H.map((f) => f.label)),
|
402
|
+
formula2: H.map((f) => f.color === We ? "" : f.color).join(",")
|
403
403
|
});
|
404
404
|
}, [F, V, u, g, C]);
|
405
405
|
const ne = Qt(async (O) => {
|
@@ -417,7 +417,7 @@ function Qi(e) {
|
|
417
417
|
formula1: "",
|
418
418
|
formula2: d
|
419
419
|
}), m("="), D(y.t("dataValidation.validFail.formulaError")));
|
420
|
-
}), ce = ht(null), [Se, ve] =
|
420
|
+
}), ce = ht(null), [Se, ve] = B(!1);
|
421
421
|
return or((O) => {
|
422
422
|
var f;
|
423
423
|
((f = ce.current) == null ? void 0 : f.isClickOutSide(O)) && ve(!1);
|
@@ -443,7 +443,7 @@ function Qi(e) {
|
|
443
443
|
lr,
|
444
444
|
{
|
445
445
|
ref: ce,
|
446
|
-
className:
|
446
|
+
className: Ae("univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors [&>div:first-child]:univer-px-2.5 [&>div]:univer-h-5 [&>div]:univer-ring-transparent dark:!univer-bg-gray-700 dark:!univer-text-white hover:univer-border-primary-600", Mt),
|
447
447
|
initValue: c,
|
448
448
|
unitId: n,
|
449
449
|
subUnitId: i,
|
@@ -451,21 +451,21 @@ function Qi(e) {
|
|
451
451
|
isSupportAcrossSheet: !0,
|
452
452
|
onFocus: () => ve(!0),
|
453
453
|
onChange: (O = "") => {
|
454
|
-
const
|
455
|
-
M(
|
454
|
+
const H = (O != null ? O : "").trim();
|
455
|
+
M(H), ne(H);
|
456
456
|
}
|
457
457
|
}
|
458
458
|
),
|
459
|
-
te.length > 0 && /* @__PURE__ */ _("div", {
|
459
|
+
te.length > 0 && /* @__PURE__ */ _("div", { className: "univer-mt-3", children: te.map((O) => /* @__PURE__ */ _(
|
460
460
|
Un,
|
461
461
|
{
|
462
|
+
className: "univer-mb-3",
|
462
463
|
item: O,
|
463
|
-
commonProps: { onItemChange: pe }
|
464
|
-
style: { marginBottom: 12 }
|
464
|
+
commonProps: { onItemChange: pe }
|
465
465
|
},
|
466
466
|
O.id
|
467
467
|
)) })
|
468
|
-
] }) : /* @__PURE__ */ _(j, { error: P, children: /* @__PURE__ */ W("div", {
|
468
|
+
] }) : /* @__PURE__ */ _(j, { error: P, children: /* @__PURE__ */ W("div", { className: "-univer-mt-3", children: [
|
469
469
|
/* @__PURE__ */ _(
|
470
470
|
ii,
|
471
471
|
{
|
@@ -596,7 +596,7 @@ var ao = Object.getOwnPropertyDescriptor, so = (e, t, r, n) => {
|
|
596
596
|
for (var i = n > 1 ? void 0 : n ? ao(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
597
597
|
(a = e[o]) && (i = a(i) || i);
|
598
598
|
return i;
|
599
|
-
},
|
599
|
+
}, $e = (e, t) => (r, n) => t(r, n, e);
|
600
600
|
let Ze = class extends Re {
|
601
601
|
constructor(e, t, r, n, i, o) {
|
602
602
|
super(), this._sheetInterceptorService = e, this._dataValidationModel = t, this._dataValidatorRegistryService = r, this._dialogService = n, this._localeService = i, this._sheetsDataValidationValidatorService = o, this._initEditorBridgeInterceptor();
|
@@ -612,7 +612,7 @@ let Ze = class extends Re {
|
|
612
612
|
if (!d || d.errorStyle !== lt.STOP)
|
613
613
|
return r(Promise.resolve(!0));
|
614
614
|
const u = this._dataValidatorRegistryService.getValidatorItem(d.type);
|
615
|
-
return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, i, o) ===
|
615
|
+
return !u || await this._sheetsDataValidationValidatorService.validatorCell(a, l, i, o) === Ye.VALID ? r(Promise.resolve(!0)) : (this._dialogService.open({
|
616
616
|
width: 368,
|
617
617
|
title: {
|
618
618
|
title: this._localeService.t("dataValidation.alert.title")
|
@@ -666,12 +666,12 @@ let Ze = class extends Re {
|
|
666
666
|
}
|
667
667
|
};
|
668
668
|
Ze = so([
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
669
|
+
$e(0, b(Sn)),
|
670
|
+
$e(1, b(ee)),
|
671
|
+
$e(2, b(ye)),
|
672
|
+
$e(3, ai),
|
673
|
+
$e(4, b(se)),
|
674
|
+
$e(5, b(qr))
|
675
675
|
], Ze);
|
676
676
|
var lo = Object.getOwnPropertyDescriptor, co = (e, t, r, n) => {
|
677
677
|
for (var i = n > 1 ? void 0 : n ? lo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
@@ -700,7 +700,7 @@ function uo(e, t) {
|
|
700
700
|
return "HH:mm:ss";
|
701
701
|
}
|
702
702
|
}
|
703
|
-
let
|
703
|
+
let Le = class extends Re {
|
704
704
|
constructor(t, r, n, i, o, a, l, s, d, u, h) {
|
705
705
|
super();
|
706
706
|
E(this, "_activeDropdown");
|
@@ -863,7 +863,7 @@ let Ae = class extends Re {
|
|
863
863
|
keycode: gt.ESC
|
864
864
|
}), this._commandService.executeCommand(st.id, A), !v;
|
865
865
|
}, w = (d == null ? void 0 : d.renderMode) === ie.CUSTOM || (d == null ? void 0 : d.renderMode) === void 0, I = u.getListWithColor(d, o, a), R = Ut(s.getCellRaw(n, i)), T = () => {
|
866
|
-
this._commandService.executeCommand(
|
866
|
+
this._commandService.executeCommand(xe.id, {
|
867
867
|
ruleId: d.uid
|
868
868
|
}), h == null || h.dispose();
|
869
869
|
}, N = I.map((D) => ({
|
@@ -998,7 +998,7 @@ let Ae = class extends Re {
|
|
998
998
|
});
|
999
999
|
}
|
1000
1000
|
};
|
1001
|
-
|
1001
|
+
Le = co([
|
1002
1002
|
ue(0, le),
|
1003
1003
|
ue(1, b(ye)),
|
1004
1004
|
ue(2, sr),
|
@@ -1010,8 +1010,8 @@ Ae = co([
|
|
1010
1010
|
ue(8, mr),
|
1011
1011
|
ue(9, b(we)),
|
1012
1012
|
ue(10, cn)
|
1013
|
-
],
|
1014
|
-
const Dt = "DataValidationPanel",
|
1013
|
+
], Le);
|
1014
|
+
const Dt = "DataValidationPanel", xe = {
|
1015
1015
|
id: "data-validation.operation.open-validation-panel",
|
1016
1016
|
type: nt.OPERATION,
|
1017
1017
|
handler(e, t) {
|
@@ -1045,7 +1045,7 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1045
1045
|
type: nt.OPERATION,
|
1046
1046
|
handler(e) {
|
1047
1047
|
const t = e.get(J), r = e.get(_e);
|
1048
|
-
return r.open(), r.isOpen ? t.executeCommand(Rn.id) : t.executeCommand(
|
1048
|
+
return r.open(), r.isOpen ? t.executeCommand(Rn.id) : t.executeCommand(xe.id), !0;
|
1049
1049
|
}
|
1050
1050
|
}, kt = {
|
1051
1051
|
type: nt.OPERATION,
|
@@ -1053,7 +1053,7 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1053
1053
|
handler(e, t) {
|
1054
1054
|
if (!t)
|
1055
1055
|
return !1;
|
1056
|
-
const r = e.get(
|
1056
|
+
const r = e.get(Le), { unitId: n, subUnitId: i, row: o, column: a } = t, l = r.activeDropdown, s = l == null ? void 0 : l.location;
|
1057
1057
|
return s && s.unitId === n && s.subUnitId === i && s.row === o && s.col === a || r.showDataValidationDropdown(
|
1058
1058
|
n,
|
1059
1059
|
i,
|
@@ -1065,7 +1065,7 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1065
1065
|
type: nt.OPERATION,
|
1066
1066
|
id: "sheet.operation.hide-data-validation-dropdown",
|
1067
1067
|
handler(e, t) {
|
1068
|
-
return t ? (e.get(
|
1068
|
+
return t ? (e.get(Le).hideDropdown(), !0) : !1;
|
1069
1069
|
}
|
1070
1070
|
}, Nt = {
|
1071
1071
|
type: nt.COMMAND,
|
@@ -1078,7 +1078,7 @@ const Dt = "DataValidationPanel", Fe = {
|
|
1078
1078
|
unitId: l,
|
1079
1079
|
subUnitId: s
|
1080
1080
|
};
|
1081
|
-
return a.syncExecuteCommand(gn.id, d) ? (a.syncExecuteCommand(
|
1081
|
+
return a.syncExecuteCommand(gn.id, d) ? (a.syncExecuteCommand(xe.id, {
|
1082
1082
|
ruleId: o.uid,
|
1083
1083
|
isAdd: !0
|
1084
1084
|
}), !0) : !1;
|
@@ -1088,7 +1088,7 @@ var ho = Object.getOwnPropertyDescriptor, go = (e, t, r, n) => {
|
|
1088
1088
|
for (var i = n > 1 ? void 0 : n ? ho(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
1089
1089
|
(a = e[o]) && (i = a(i) || i);
|
1090
1090
|
return i;
|
1091
|
-
},
|
1091
|
+
}, He = (e, t) => (r, n) => t(r, n, e);
|
1092
1092
|
const Me = "SHEET_DATA_VALIDATION_ALERT";
|
1093
1093
|
let ut = class extends Re {
|
1094
1094
|
constructor(e, t, r, n, i, o) {
|
@@ -1108,7 +1108,7 @@ let ut = class extends Re {
|
|
1108
1108
|
this._cellAlertManagerService.removeAlert(Me);
|
1109
1109
|
return;
|
1110
1110
|
}
|
1111
|
-
if (this._dataValidationModel.validator(i, { ...e.location, workbook: r, worksheet: n }) ===
|
1111
|
+
if (this._dataValidationModel.validator(i, { ...e.location, workbook: r, worksheet: n }) === Ye.INVALID) {
|
1112
1112
|
const a = this._cellAlertManagerService.currentAlert.get(Me), l = (t = a == null ? void 0 : a.alert) == null ? void 0 : t.location;
|
1113
1113
|
if (l && l.row === e.location.row && l.col === e.location.col && l.subUnitId === e.location.subUnitId && l.unitId === e.location.unitId) {
|
1114
1114
|
this._cellAlertManagerService.removeAlert(Me);
|
@@ -1141,18 +1141,18 @@ let ut = class extends Re {
|
|
1141
1141
|
}
|
1142
1142
|
};
|
1143
1143
|
ut = go([
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1144
|
+
He(0, b(Vi)),
|
1145
|
+
He(1, b(Oi)),
|
1146
|
+
He(2, le),
|
1147
|
+
He(3, b(se)),
|
1148
|
+
He(4, sr),
|
1149
|
+
He(5, b(ee))
|
1150
1150
|
], ut);
|
1151
1151
|
var po = Object.getOwnPropertyDescriptor, vo = (e, t, r, n) => {
|
1152
1152
|
for (var i = n > 1 ? void 0 : n ? po(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
1153
1153
|
(a = e[o]) && (i = a(i) || i);
|
1154
1154
|
return i;
|
1155
|
-
},
|
1155
|
+
}, Ht = (e, t) => (r, n) => t(r, n, e);
|
1156
1156
|
let qe = class extends Re {
|
1157
1157
|
constructor(e, t, r) {
|
1158
1158
|
super(), this._autoFillService = e, this._sheetDataValidationModel = t, this._injector = r, this._initAutoFill();
|
@@ -1225,15 +1225,15 @@ let qe = class extends Re {
|
|
1225
1225
|
}
|
1226
1226
|
};
|
1227
1227
|
qe = vo([
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1228
|
+
Ht(0, Pi),
|
1229
|
+
Ht(1, b(ee)),
|
1230
|
+
Ht(2, b(we))
|
1231
1231
|
], qe);
|
1232
1232
|
var mo = Object.getOwnPropertyDescriptor, fo = (e, t, r, n) => {
|
1233
1233
|
for (var i = n > 1 ? void 0 : n ? mo(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
1234
1234
|
(a = e[o]) && (i = a(i) || i);
|
1235
1235
|
return i;
|
1236
|
-
},
|
1236
|
+
}, Bt = (e, t) => (r, n) => t(r, n, e);
|
1237
1237
|
let Je = class extends Re {
|
1238
1238
|
constructor(t, r, n) {
|
1239
1239
|
super();
|
@@ -1352,9 +1352,9 @@ let Je = class extends Re {
|
|
1352
1352
|
}
|
1353
1353
|
};
|
1354
1354
|
Je = fo([
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1355
|
+
Bt(0, Li),
|
1356
|
+
Bt(1, b(ee)),
|
1357
|
+
Bt(2, b(we))
|
1358
1358
|
], Je);
|
1359
1359
|
var _o = Object.getOwnPropertyDescriptor, So = (e, t, r, n) => {
|
1360
1360
|
for (var i = n > 1 ? void 0 : n ? _o(t, r) : t, o = e.length - 1, a; o >= 0; o--)
|
@@ -1399,7 +1399,7 @@ function Co(e) {
|
|
1399
1399
|
}
|
1400
1400
|
function Io(e) {
|
1401
1401
|
return {
|
1402
|
-
id:
|
1402
|
+
id: xe.id,
|
1403
1403
|
title: "dataValidation.panel.title",
|
1404
1404
|
type: vn.BUTTON
|
1405
1405
|
};
|
@@ -1416,7 +1416,7 @@ const Ro = {
|
|
1416
1416
|
[Er]: {
|
1417
1417
|
order: 0,
|
1418
1418
|
menuItemFactory: Co,
|
1419
|
-
[
|
1419
|
+
[xe.id]: {
|
1420
1420
|
order: 0,
|
1421
1421
|
menuItemFactory: Io
|
1422
1422
|
},
|
@@ -1503,7 +1503,7 @@ let et = class extends un {
|
|
1503
1503
|
const u = this._sheetDataValidationModel.getRuleById(o, a, d);
|
1504
1504
|
if (!u)
|
1505
1505
|
return r(e);
|
1506
|
-
const h = (p = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? p :
|
1506
|
+
const h = (p = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? p : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = t.rawData;
|
1507
1507
|
let g;
|
1508
1508
|
const M = {
|
1509
1509
|
get value() {
|
@@ -1520,7 +1520,7 @@ let et = class extends un {
|
|
1520
1520
|
...e,
|
1521
1521
|
markers: {
|
1522
1522
|
...e == null ? void 0 : e.markers,
|
1523
|
-
...h ===
|
1523
|
+
...h === Ye.INVALID ? Vr : null
|
1524
1524
|
},
|
1525
1525
|
customRender: [
|
1526
1526
|
...(S = e == null ? void 0 : e.customRender) != null ? S : [],
|
@@ -1605,10 +1605,10 @@ let et = class extends un {
|
|
1605
1605
|
et = Dr([
|
1606
1606
|
K(0, J),
|
1607
1607
|
K(1, di),
|
1608
|
-
K(2,
|
1608
|
+
K(2, Ue),
|
1609
1609
|
K(3, le),
|
1610
1610
|
K(4, b(fr)),
|
1611
|
-
K(5, b(
|
1611
|
+
K(5, b(Le)),
|
1612
1612
|
K(6, b(ee)),
|
1613
1613
|
K(7, b(ye)),
|
1614
1614
|
K(8, b(Sn)),
|
@@ -1636,12 +1636,12 @@ let xn = class extends un {
|
|
1636
1636
|
const u = this._sheetDataValidationModel.getRuleById(o, a, d);
|
1637
1637
|
if (!u)
|
1638
1638
|
return r(e);
|
1639
|
-
const h = (y = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? y :
|
1639
|
+
const h = (y = this._dataValidationCacheService.getValue(o, a, n, i)) != null ? y : Ye.VALID, c = this._dataValidatorRegistryService.getValidatorItem(u.type), m = s.getCellRaw(n, i), g = Q(m), M = `${g != null ? g : ""}`;
|
1640
1640
|
return r({
|
1641
1641
|
...e,
|
1642
1642
|
markers: {
|
1643
1643
|
...e == null ? void 0 : e.markers,
|
1644
|
-
...h ===
|
1644
|
+
...h === Ye.INVALID ? Vr : null
|
1645
1645
|
},
|
1646
1646
|
customRender: [
|
1647
1647
|
...(p = e == null ? void 0 : e.customRender) != null ? p : [],
|
@@ -1703,7 +1703,7 @@ let xn = class extends un {
|
|
1703
1703
|
};
|
1704
1704
|
xn = Dr([
|
1705
1705
|
K(0, J),
|
1706
|
-
K(1,
|
1706
|
+
K(1, Ue),
|
1707
1707
|
K(2, b(fr)),
|
1708
1708
|
K(3, b(ye)),
|
1709
1709
|
K(4, b(Sn)),
|
@@ -1732,7 +1732,7 @@ let Vt = class extends Re {
|
|
1732
1732
|
(o = this._sheetSkeletonManagerService.getSkeletonParam(i)) == null || o.skeleton.makeDirty(!0);
|
1733
1733
|
}), (n = this._context.mainComponent) == null || n.makeForceDirty();
|
1734
1734
|
};
|
1735
|
-
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(
|
1735
|
+
this.disposeWithMe(this._sheetDataValidationModel.validStatusChange$.pipe(Hr(16)).subscribe(e));
|
1736
1736
|
}
|
1737
1737
|
};
|
1738
1738
|
Vt = bo([
|
@@ -1741,7 +1741,7 @@ Vt = bo([
|
|
1741
1741
|
], Vt);
|
1742
1742
|
function Eo(e) {
|
1743
1743
|
var d;
|
1744
|
-
const t = U(se), r = U(mn), { value: n, onChange: i, extraComponent: o } = e, [a, l] =
|
1744
|
+
const t = U(se), r = U(mn), { value: n, onChange: i, extraComponent: o } = e, [a, l] = B(!1), s = o ? r.get(o) : null;
|
1745
1745
|
return /* @__PURE__ */ W(dt, { children: [
|
1746
1746
|
/* @__PURE__ */ W(
|
1747
1747
|
"div",
|
@@ -1794,7 +1794,7 @@ function Eo(e) {
|
|
1794
1794
|
] })
|
1795
1795
|
] });
|
1796
1796
|
}
|
1797
|
-
const Do = (e) =>
|
1797
|
+
const Do = (e) => Br(
|
1798
1798
|
async (t, r, n, i) => {
|
1799
1799
|
const o = await e.executeCommand(t, r, n);
|
1800
1800
|
i == null || i(o);
|
@@ -1806,8 +1806,8 @@ function Vo(e, t, r) {
|
|
1806
1806
|
return t ? ((i = (n = e.getUnit(t)) == null ? void 0 : n.getSheetBySheetName(r)) == null ? void 0 : i.getSheetId()) || "" : ((a = (o = e.getCurrentUnitForType(Y.UNIVER_SHEET)) == null ? void 0 : o.getSheetBySheetName(r)) == null ? void 0 : a.getSheetId()) || "";
|
1807
1807
|
}
|
1808
1808
|
function Oo() {
|
1809
|
-
var O,
|
1810
|
-
const [e, t] =
|
1809
|
+
var O, H;
|
1810
|
+
const [e, t] = B(0), r = U(_e), n = Te(r.activeRule$, r.activeRule), { unitId: i, subUnitId: o, rule: a } = n || {}, l = a.uid, s = U(ye), d = U(le), u = U(mn), h = U(J), c = U(fn), m = U(se), [g, M] = B(a), y = s.getValidatorItem(g.type), [p, S] = B(!1), v = s.getValidatorsByScope(ui.SHEET), [C, w] = B(() => g.ranges.map((f) => ({ unitId: "", sheetId: "", range: f }))), I = ct(() => Do(h), [h]), [R, T] = B(!1), [N, D] = B(!1), P = ht(null), A = U(hr);
|
1811
1811
|
if (Pe(() => () => {
|
1812
1812
|
const f = A.getCurrentLastSelection();
|
1813
1813
|
f && A.setSelections([f]);
|
@@ -1915,7 +1915,7 @@ function Oo() {
|
|
1915
1915
|
}
|
1916
1916
|
));
|
1917
1917
|
}, ve = L.length && !g.operator;
|
1918
|
-
return /* @__PURE__ */ W("div", { "data-u-comp": "data-validation-detail", children: [
|
1918
|
+
return /* @__PURE__ */ W("div", { "data-u-comp": "data-validation-detail", className: "univer-py-2", children: [
|
1919
1919
|
/* @__PURE__ */ _(
|
1920
1920
|
j,
|
1921
1921
|
{
|
@@ -2001,7 +2001,7 @@ function Oo() {
|
|
2001
2001
|
/* @__PURE__ */ _(j, { children: /* @__PURE__ */ _(
|
2002
2002
|
Lt,
|
2003
2003
|
{
|
2004
|
-
checked: (
|
2004
|
+
checked: (H = g.allowBlank) != null ? H : !0,
|
2005
2005
|
onChange: () => {
|
2006
2006
|
var f;
|
2007
2007
|
return Z({
|
@@ -2020,7 +2020,7 @@ function Oo() {
|
|
2020
2020
|
] });
|
2021
2021
|
}
|
2022
2022
|
const To = (e) => {
|
2023
|
-
const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = U(ye), l = U(J), s = U(Ni), d = a.getValidatorItem(t.type), u = ht(void 0), [h, c] =
|
2023
|
+
const { rule: t, onClick: r, unitId: n, subUnitId: i, disable: o } = e, a = U(ye), l = U(J), s = U(Ni), d = a.getValidatorItem(t.type), u = ht(void 0), [h, c] = B(!1), m = U(Kn), g = Te(m.currentTheme$), M = ct(() => {
|
2024
2024
|
var w;
|
2025
2025
|
const p = m.getColorFromTheme("primary.600"), S = m.getColorFromTheme("loop-color.2"), v = (w = m.getColorFromTheme(S)) != null ? w : p, C = new Xr(v).toRgb();
|
2026
2026
|
return {
|
@@ -2042,7 +2042,7 @@ const To = (e) => {
|
|
2042
2042
|
}, [s]), /* @__PURE__ */ W(
|
2043
2043
|
"div",
|
2044
2044
|
{
|
2045
|
-
className:
|
2045
|
+
className: Ae(
|
2046
2046
|
`
|
2047
2047
|
univer-rounded-md univer-bg-secondary univer-relative univer--ml-2 univer--mr-2 univer-box-border
|
2048
2048
|
univer-flex univer-w-[287px] univer-cursor-pointer univer-flex-col univer-justify-between
|
@@ -2095,7 +2095,7 @@ const To = (e) => {
|
|
2095
2095
|
);
|
2096
2096
|
};
|
2097
2097
|
function Po(e) {
|
2098
|
-
const t = U(ee), r = U(le), n = U(J), i = U(we), o = U(_e), a = U(se), [l, s] =
|
2098
|
+
const t = U(ee), r = U(le), n = U(J), i = U(we), o = U(_e), a = U(se), [l, s] = B([]), { workbook: d } = e, u = Te(d.activeSheet$, void 0, !0), h = d.getUnitId(), c = u == null ? void 0 : u.getSheetId();
|
2099
2099
|
Pe(() => {
|
2100
2100
|
s(t.getRules(h, c));
|
2101
2101
|
const S = t.ruleChange$.subscribe((v) => {
|
@@ -2222,10 +2222,10 @@ let an = class {
|
|
2222
2222
|
break;
|
2223
2223
|
}
|
2224
2224
|
switch (n) {
|
2225
|
-
case
|
2225
|
+
case Xe.LEFT:
|
2226
2226
|
l = ft;
|
2227
2227
|
break;
|
2228
|
-
case
|
2228
|
+
case Xe.RIGHT:
|
2229
2229
|
l = ft + (i - a);
|
2230
2230
|
break;
|
2231
2231
|
default:
|
@@ -2333,7 +2333,7 @@ an = Uo([
|
|
2333
2333
|
Be(1, le),
|
2334
2334
|
Be(2, b(ei)),
|
2335
2335
|
Be(3, b(Kn)),
|
2336
|
-
Be(4, b(
|
2336
|
+
Be(4, b(Ue)),
|
2337
2337
|
Be(5, b(ee))
|
2338
2338
|
], an);
|
2339
2339
|
class Fo extends fe {
|
@@ -2352,7 +2352,7 @@ class xo extends fe {
|
|
2352
2352
|
}
|
2353
2353
|
}
|
2354
2354
|
const $o = "data-validation.formula-input";
|
2355
|
-
class
|
2355
|
+
class Ho extends fe {
|
2356
2356
|
constructor() {
|
2357
2357
|
super(...arguments);
|
2358
2358
|
E(this, "id", G.DATE);
|
@@ -2361,7 +2361,7 @@ class Bo extends fe {
|
|
2361
2361
|
E(this, "dropdownType", ge.DATE);
|
2362
2362
|
}
|
2363
2363
|
}
|
2364
|
-
class
|
2364
|
+
class Bo extends fe {
|
2365
2365
|
constructor() {
|
2366
2366
|
super(...arguments);
|
2367
2367
|
E(this, "id", G.DECIMAL);
|
@@ -2418,7 +2418,7 @@ class Xo extends Si {
|
|
2418
2418
|
width: l.width,
|
2419
2419
|
height: l.height,
|
2420
2420
|
radius: Yo,
|
2421
|
-
fill: o ||
|
2421
|
+
fill: o || We
|
2422
2422
|
}), t.translateWithPrecision(Or, l.ba), t.font = n, t.fillStyle = a, t.fillText(s, 0, 0), t.restore();
|
2423
2423
|
}
|
2424
2424
|
}
|
@@ -2484,10 +2484,10 @@ let ln = class {
|
|
2484
2484
|
const { width: de, height: ne, items: ce } = te;
|
2485
2485
|
let Se = 0;
|
2486
2486
|
switch (P) {
|
2487
|
-
case
|
2487
|
+
case Xe.RIGHT:
|
2488
2488
|
Se = x.contentWidth - de;
|
2489
2489
|
break;
|
2490
|
-
case
|
2490
|
+
case Xe.CENTER:
|
2491
2491
|
Se = (x.contentWidth - de) / 2;
|
2492
2492
|
break;
|
2493
2493
|
}
|
@@ -2565,7 +2565,7 @@ let ln = class {
|
|
2565
2565
|
ln = Ko([
|
2566
2566
|
_t(0, J),
|
2567
2567
|
_t(1, le),
|
2568
|
-
_t(2, b(
|
2568
|
+
_t(2, b(Ue)),
|
2569
2569
|
_t(3, b(ee))
|
2570
2570
|
], ln);
|
2571
2571
|
class Zo extends fe {
|
@@ -2581,7 +2581,7 @@ var qo = Object.getOwnPropertyDescriptor, Jo = (e, t, r, n) => {
|
|
2581
2581
|
(a = e[o]) && (i = a(i) || i);
|
2582
2582
|
return i;
|
2583
2583
|
}, at = (e, t) => (r, n) => t(r, n, e);
|
2584
|
-
const be = 4, St = 4, he = 14, me = 6,
|
2584
|
+
const be = 4, St = 4, he = 14, me = 6, je = 4, Xt = 8, Qo = "#565656", Hn = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
|
2585
2585
|
function ea(e, t) {
|
2586
2586
|
const r = e.length;
|
2587
2587
|
return {
|
@@ -2646,9 +2646,9 @@ function Ct(e, t, r) {
|
|
2646
2646
|
docViewModel: o
|
2647
2647
|
};
|
2648
2648
|
}
|
2649
|
-
function
|
2649
|
+
function Bn(e, t, r, n, i, o, a = !0) {
|
2650
2650
|
let l = 0;
|
2651
|
-
const s = a ?
|
2651
|
+
const s = a ? je : 0;
|
2652
2652
|
switch (i) {
|
2653
2653
|
case ae.BOTTOM:
|
2654
2654
|
l = t - n - s;
|
@@ -2660,13 +2660,13 @@ function Hn(e, t, r, n, i, o, a = !0) {
|
|
2660
2660
|
l = s;
|
2661
2661
|
break;
|
2662
2662
|
}
|
2663
|
-
l = Math.max(
|
2663
|
+
l = Math.max(je, l);
|
2664
2664
|
let d = 0;
|
2665
2665
|
switch (o) {
|
2666
|
-
case
|
2666
|
+
case Xe.CENTER:
|
2667
2667
|
d = (e - r) / 2;
|
2668
2668
|
break;
|
2669
|
-
case
|
2669
|
+
case Xe.RIGHT:
|
2670
2670
|
d = e - r;
|
2671
2671
|
break;
|
2672
2672
|
}
|
@@ -2696,13 +2696,13 @@ let dn = class {
|
|
2696
2696
|
u = (n - St) / 2;
|
2697
2697
|
break;
|
2698
2698
|
case ae.BOTTOM:
|
2699
|
-
u = n - s - i -
|
2699
|
+
u = n - s - i - je + (i / 2 - St / 2);
|
2700
2700
|
break;
|
2701
2701
|
default:
|
2702
|
-
u = l +
|
2702
|
+
u = l + je + (i / 2 - St / 2);
|
2703
2703
|
break;
|
2704
2704
|
}
|
2705
|
-
e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill(
|
2705
|
+
e.save(), e.translateWithPrecision(t.startX + d, t.startY + u), e.fillStyle = "#565656", e.fill(Hn), e.restore();
|
2706
2706
|
}
|
2707
2707
|
// eslint-disable-next-line max-lines-per-function, complexity
|
2708
2708
|
drawWith(e, t, r) {
|
@@ -2725,7 +2725,7 @@ let dn = class {
|
|
2725
2725
|
if (D = D != null ? D : Ie.WRAP, P = P != null ? P : ae.BOTTOM, A = A != null ? A : re.ht, L = L != null ? L : re.pd, u.renderMode === ie.ARROW) {
|
2726
2726
|
const { l: V = re.pd.l, t: F = re.pd.t, r: x = re.pd.r, b: X = re.pd.b } = L, Z = S - V - x - he - 4, { documentSkeleton: z, documents: te, docModel: pe } = Ct(T, this._localeService, a);
|
2727
2727
|
D === Ie.WRAP && pe.updateDocumentDataPageSize(Math.max(Z, 1)), z.calculate(), z.getActualSize();
|
2728
|
-
const de = it(z), { height: ne, width: ce } = de, { paddingTop: Se, paddingLeft: ve } =
|
2728
|
+
const de = it(z), { height: ne, width: ce } = de, { paddingTop: Se, paddingLeft: ve } = Bn(Z, v - F - X, ce, ne, P, A, !0);
|
2729
2729
|
this._drawDownIcon(e, p, S, v, ne, P, L), e.save(), e.translateWithPrecision(p.startX + V, p.startY + F), e.beginPath(), e.rect(0, 0, S - V - x, v - F - X), e.clip(), e.translateWithPrecision(0, Se), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, Z, ne), e.clip(), te.render(e), e.translateWithPrecision(ve, 0), e.restore(), e.restore(), C.set(w, {
|
2730
2730
|
left: p.endX + V + r.rowHeaderWidth - he,
|
2731
2731
|
top: p.startY + F + r.columnHeaderHeight,
|
@@ -2736,15 +2736,15 @@ let dn = class {
|
|
2736
2736
|
e.save(), e.translateWithPrecision(p.startX, p.startY), e.beginPath(), e.rect(0, 0, S, v), e.clip();
|
2737
2737
|
const V = S - me * 2 - be - he - 4, { documentSkeleton: F, documents: x, docModel: X } = Ct(T, this._localeService, a);
|
2738
2738
|
D === Ie.WRAP && X.updateDocumentDataPageSize(Math.max(V, 1)), F.calculate();
|
2739
|
-
const Z = it(F), { height: z, width: te } = Z, { paddingTop: pe, paddingLeft: de } =
|
2739
|
+
const Z = it(F), { height: z, width: te } = Z, { paddingTop: pe, paddingLeft: de } = Bn(V, v, te, z, P, A);
|
2740
2740
|
e.translateWithPrecision(me, pe);
|
2741
2741
|
const ne = Math.max(S - me * 2, 1), ce = z;
|
2742
2742
|
ur.drawWith(e, {
|
2743
2743
|
width: ne,
|
2744
2744
|
height: ce,
|
2745
|
-
fill: (N == null ? void 0 : N.color) ||
|
2745
|
+
fill: (N == null ? void 0 : N.color) || We,
|
2746
2746
|
radius: Xt
|
2747
|
-
}), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, V, z), e.clip(), e.translateWithPrecision(de, 0), x.render(e), e.restore(), e.translateWithPrecision(V + be + 4, (z - St) / 2), e.fillStyle = Qo, e.fill(
|
2747
|
+
}), e.save(), e.translateWithPrecision(be, 0), e.beginPath(), e.rect(0, 0, V, z), e.clip(), e.translateWithPrecision(de, 0), x.render(e), e.restore(), e.translateWithPrecision(V + be + 4, (z - St) / 2), e.fillStyle = Qo, e.fill(Hn), e.restore(), C.set(w, {
|
2748
2748
|
left: p.startX + me + r.rowHeaderWidth,
|
2749
2749
|
top: p.startY + pe + r.columnHeaderHeight,
|
2750
2750
|
width: ne,
|
@@ -2768,14 +2768,14 @@ let dn = class {
|
|
2768
2768
|
const w = g - he, { documentSkeleton: I, docModel: R } = Ct(y, this._localeService, r);
|
2769
2769
|
p === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), I.calculate(), I.getActualSize();
|
2770
2770
|
const T = it(I), { height: N } = T;
|
2771
|
-
return N + v + C +
|
2771
|
+
return N + v + C + je * 2;
|
2772
2772
|
} else {
|
2773
2773
|
const w = g - me * 2 - be - he, { documentSkeleton: I, docModel: R } = Pr(y, this._localeService, r);
|
2774
2774
|
p === Ie.WRAP && R.updateDocumentDataPageSize(Math.max(w, 1)), I.calculate();
|
2775
2775
|
const T = it(I), {
|
2776
2776
|
height: N
|
2777
2777
|
} = T;
|
2778
|
-
return N +
|
2778
|
+
return N + je * 2;
|
2779
2779
|
}
|
2780
2780
|
}
|
2781
2781
|
calcCellAutoWidth(e) {
|
@@ -2837,7 +2837,7 @@ dn = Jo([
|
|
2837
2837
|
at(0, le),
|
2838
2838
|
at(1, b(se)),
|
2839
2839
|
at(2, J),
|
2840
|
-
at(3, b(
|
2840
|
+
at(3, b(Ue)),
|
2841
2841
|
at(4, b(ee))
|
2842
2842
|
], dn);
|
2843
2843
|
class ta extends fe {
|
@@ -2889,10 +2889,10 @@ let tt = class extends un {
|
|
2889
2889
|
}
|
2890
2890
|
_registerValidatorViews() {
|
2891
2891
|
[
|
2892
|
-
|
2892
|
+
Bo,
|
2893
2893
|
ra,
|
2894
2894
|
na,
|
2895
|
-
|
2895
|
+
Ho,
|
2896
2896
|
Fo,
|
2897
2897
|
ta,
|
2898
2898
|
Zo,
|
@@ -2928,7 +2928,7 @@ let Wn = (It = class extends Gn {
|
|
2928
2928
|
onStarting() {
|
2929
2929
|
[
|
2930
2930
|
[_e],
|
2931
|
-
[
|
2931
|
+
[Le],
|
2932
2932
|
[ut],
|
2933
2933
|
[qe],
|
2934
2934
|
[et],
|
@@ -2943,14 +2943,14 @@ let Wn = (It = class extends Gn {
|
|
2943
2943
|
kt,
|
2944
2944
|
Mr,
|
2945
2945
|
Rn,
|
2946
|
-
|
2946
|
+
xe,
|
2947
2947
|
yr
|
2948
2948
|
].forEach((e) => {
|
2949
2949
|
this._commandService.registerCommand(e);
|
2950
2950
|
});
|
2951
2951
|
}
|
2952
2952
|
onReady() {
|
2953
|
-
this._injector.get(Je), this._injector.get(Qe), this._injector.get(Ze), this._injector.get(ut), this._injector.get(
|
2953
|
+
this._injector.get(Je), this._injector.get(Qe), this._injector.get(Ze), this._injector.get(ut), this._injector.get(Ue).registerRenderModule(
|
2954
2954
|
Y.UNIVER_SHEET,
|
2955
2955
|
[Vt]
|
2956
2956
|
);
|
@@ -2987,7 +2987,7 @@ let jn = (wt = class extends Gn {
|
|
2987
2987
|
onStarting() {
|
2988
2988
|
[
|
2989
2989
|
[_e],
|
2990
|
-
[
|
2990
|
+
[Le],
|
2991
2991
|
[ut],
|
2992
2992
|
[qe],
|
2993
2993
|
[et],
|
@@ -3001,14 +3001,14 @@ let jn = (wt = class extends Gn {
|
|
3001
3001
|
kt,
|
3002
3002
|
Mr,
|
3003
3003
|
Rn,
|
3004
|
-
|
3004
|
+
xe,
|
3005
3005
|
yr
|
3006
3006
|
].forEach((e) => {
|
3007
3007
|
this._commandService.registerCommand(e);
|
3008
3008
|
});
|
3009
3009
|
}
|
3010
3010
|
onReady() {
|
3011
|
-
this._injector.get(Je), this._injector.get(Qe), this._injector.get(
|
3011
|
+
this._injector.get(Je), this._injector.get(Qe), this._injector.get(Ue).registerRenderModule(
|
3012
3012
|
Y.UNIVER_SHEET,
|
3013
3013
|
[Vt]
|
3014
3014
|
);
|