@univerjs/sheets-data-validation-ui 0.5.2 → 0.5.3-experimental.20250106-e3b7a39
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 +30 -30
- package/lib/index.css +1 -1
- package/lib/types/controllers/dv-permission.controller.d.ts +3 -3
- package/lib/umd/index.js +2 -2
- package/package.json +16 -35
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
@@ -5,10 +5,10 @@ import Zt, { useState as W, forwardRef as we, useRef as He, createElement as Re,
|
|
5
5
|
import { Inject as b, LocaleService as J, Disposable as De, DataValidationErrorStyle as it, useDependency as L, ICommandService as Q, dayjs as qt, numfmt as Jt, CellValueType as Ho, UniverInstanceType as Y, toDisposable as Yo, IUniverInstanceService as ge, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Xo, DisposableCollection as zo, CommandType as Je, BuildTextUtils as Ko, DataValidationRenderMode as de, DataValidationType as z, IConfigService as hn, UndoCommand as Go, RedoCommand as Zo, isUnitRangesEqual as qo, debounce as Jo, shallowEqual as Mn, Injector as Ne, DataValidationStatus as rt, ObjectMatrix as _t, Range as Qo, Rectangle as St, queryObjectMatrix as Qt, Optional as ea, RxDisposable as pn, InterceptorEffectEnum as zn, sequenceExecute as Kn, bufferDebounceTime as ta, isFormulaString as Pe, Tools as en, ThemeService as na, VerticalAlign as ue, HorizontalAlign as Ye, DEFAULT_STYLES as le, WrapStrategy as Se, DocumentDataModel as oa, DEFAULT_EMPTY_DOCUMENT_VALUE as aa, BooleanNumber as Qe, Plugin as Gn, merge as Zn } from "@univerjs/core";
|
6
6
|
import { Button as Fe, DatePanel as ia, Scrollbar as ra, FormLayout as Z, RadioGroup as mn, Radio as xe, Checkbox as Ot, Input as je, Select as tn, DraggableList as sa } from "@univerjs/design";
|
7
7
|
import { DeviceInputEventType as nn, IRenderManagerService as Ve, fixLineWidthByScale as bn, Transform as la, CheckboxShape as da, CURSOR_TYPE as Xe, FontCache as ca, Shape as ua, Rect as qn, getFontStyleString as jt, getDocsSkeletonPageSize as et, DocumentViewModel as ha, DocumentSkeleton as pa, Documents as ma } from "@univerjs/engine-render";
|
8
|
-
import { SheetInterceptorService as fn, AFTER_CELL_EDIT_ASYNC as fa, SetRangeValuesCommand as gn, SheetsSelectionsService as Jn, getSheetCommandTarget as Qn, WorkbookEditablePermission as Ct, RangeProtectionPermissionEditPoint as It, WorksheetEditPermission as wt, checkRangesEditablePermission as ga, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as
|
9
|
-
import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as va, deserializeListOptions as
|
8
|
+
import { SheetInterceptorService as fn, AFTER_CELL_EDIT_ASYNC as fa, SetRangeValuesCommand as gn, SheetsSelectionsService as Jn, getSheetCommandTarget as Qn, SheetPermissionCheckController as eo, WorkbookEditablePermission as Ct, RangeProtectionPermissionEditPoint as It, WorksheetEditPermission as wt, checkRangesEditablePermission as ga, WorksheetSetCellStylePermission as on, INTERCEPTOR_POINT as to, InterceptCellContentPriority as no } from "@univerjs/sheets";
|
9
|
+
import { SheetDataValidationModel as oe, getCellValueOrigin as ie, getDataValidationCellValue as va, deserializeListOptions as oo, serializeListOptions as ao, UpdateSheetDataValidationRangeCommand as io, UpdateSheetDataValidationSettingCommand as En, RemoveSheetDataValidationCommand as ro, UpdateSheetDataValidationOptionsCommand as _a, createDefaultNewRule as so, AddSheetDataValidationCommand as vn, RemoveSheetAllDataValidationCommand as Sa, DATA_VALIDATION_PLUGIN_NAME as lo, getDataValidationDiffMutations as an, DataValidationCacheService as co, DataValidationFormulaController as Ca, DataValidationFormulaService as Ia, getFormulaResult as Ft, isLegalFormulaResult as On, transformCheckboxValue as wa, CHECKBOX_FORMULA_1 as Ra, CHECKBOX_FORMULA_2 as Da } from "@univerjs/sheets-data-validation";
|
10
10
|
import { getPatternType as Va } from "@univerjs/sheets-numfmt";
|
11
|
-
import { SetCellEditVisibleOperation as
|
11
|
+
import { SetCellEditVisibleOperation as uo, SheetCanvasPopManagerService as ya, IEditorBridgeService as ho, IMarkSelectionService as Ma, HoverManagerService as ba, CellAlertManagerService as Ea, CellAlertType as Oa, IAutoFillService as La, APPLY_TYPE as tt, virtualizeDiscreteRanges as rn, getAutoFillRepeatRange as Pa, COPY_TYPE as Ln, rangeToDiscreteRange as Ta, PREDEFINED_HOOK_NAME as dt, getRepeatRange as Pn, ISheetClipboardService as Aa, getCurrentRangeDisable$ as xa, AutoHeightController as po, SheetSkeletonManagerService as Rt } from "@univerjs/sheets-ui";
|
12
12
|
import { IDialogService as ja, KeyCode as sn, ISidebarService as mo, useObservable as Ue, ComponentManager as Lt, IZenZoneService as fo, RectPopup as Fa, useEvent as go, useSidebarClick as _n, MenuItemType as Sn, getMenuHiddenObservable as Na, RibbonStartGroup as Ua, IMenuManagerService as Ba } from "@univerjs/ui";
|
13
13
|
import { DataValidatorRegistryService as ye, DataValidationModel as Pt, DataValidatorRegistryScope as $a, TWO_FORMULA_OPERATOR_COUNT as ka, getRuleOptions as Tn, getRuleSetting as An } from "@univerjs/data-validation";
|
14
14
|
import { RichTextEditingMutation as Wa } from "@univerjs/docs";
|
@@ -173,7 +173,7 @@ function ni(e) {
|
|
173
173
|
workbook: s,
|
174
174
|
interceptValue: P.replace("Z", "").replace("T", " "),
|
175
175
|
t: Ho.NUMBER
|
176
|
-
}, I) ? (o(), await c.executeCommand(
|
176
|
+
}, I) ? (o(), await c.executeCommand(uo.id, {
|
177
177
|
visible: !1,
|
178
178
|
eventType: nn.Keyboard,
|
179
179
|
unitId: r,
|
@@ -574,7 +574,7 @@ const Dt = "DataValidationPanel", Be = {
|
|
574
574
|
dvListDropdownEdit: Ei
|
575
575
|
}, Oi = (e) => {
|
576
576
|
var C, g;
|
577
|
-
const { value: t, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: l, filter: s, location: c } = e, u = L(J), p = L(hn), d = s == null ? void 0 : s.toLowerCase(), { row: f, col: m, unitId: _, subUnitId: w } = c, S = a.filter((v) => d ? v.label.toLowerCase().includes(d) : !0), R = (g = (C = p.getConfig(Dn)) == null ? void 0 : C.showEditOnDropdown) != null ? g : !0, I = L(
|
577
|
+
const { value: t, onChange: o, multiple: n, options: a, title: i, onEdit: r, style: l, filter: s, location: c } = e, u = L(J), p = L(hn), d = s == null ? void 0 : s.toLowerCase(), { row: f, col: m, unitId: _, subUnitId: w } = c, S = a.filter((v) => d ? v.label.toLowerCase().includes(d) : !0), R = (g = (C = p.getConfig(Dn)) == null ? void 0 : C.showEditOnDropdown) != null ? g : !0, I = L(eo), V = Ae(() => I.permissionCheckWithRanges(
|
578
578
|
{
|
579
579
|
workbookTypes: [Ct],
|
580
580
|
rangeTypes: [It],
|
@@ -612,7 +612,7 @@ const Dt = "DataValidationPanel", Be = {
|
|
612
612
|
};
|
613
613
|
function Li(e) {
|
614
614
|
var j, F, H, X;
|
615
|
-
const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = L(Pt), [c, u] = W(""), p = L(Q), d = L(J), [f, m] = W(""), _ = L(
|
615
|
+
const { location: t, hideFn: o } = e, { worksheet: n, row: a, col: i, unitId: r, subUnitId: l } = t, s = L(Pt), [c, u] = W(""), p = L(Q), d = L(J), [f, m] = W(""), _ = L(ho), w = L(ge), S = Ae(() => s.ruleChange$.pipe(In(16)), []), R = L(oe);
|
616
616
|
Ue(S);
|
617
617
|
const I = Fa.useContext(), V = ((F = (j = I.current) == null ? void 0 : j.right) != null ? F : 0) - ((X = (H = I.current) == null ? void 0 : H.left) != null ? X : 0);
|
618
618
|
if (Ce(() => {
|
@@ -640,7 +640,7 @@ function Li(e) {
|
|
640
640
|
const v = n.getCell(a, i), y = (C == null ? void 0 : C.renderMode) === de.CUSTOM || (C == null ? void 0 : C.renderMode) === void 0;
|
641
641
|
if (!v || !C || !g || g.id.indexOf(z.LIST) !== 0)
|
642
642
|
return;
|
643
|
-
const P = C.type === z.LIST_MULTIPLE, U = g.getListWithColor(C, r, l), T = f || va(n.getCellRaw(a, i)), E =
|
643
|
+
const P = C.type === z.LIST_MULTIPLE, U = g.getListWithColor(C, r, l), T = f || va(n.getCellRaw(a, i)), E = oo(T), A = () => {
|
644
644
|
p.executeCommand(Be.id, {
|
645
645
|
ruleId: C.uid
|
646
646
|
}), o();
|
@@ -657,7 +657,7 @@ function Li(e) {
|
|
657
657
|
value: E,
|
658
658
|
multiple: P,
|
659
659
|
onChange: async (k) => {
|
660
|
-
const K =
|
660
|
+
const K = ao(k), q = {
|
661
661
|
unitId: r,
|
662
662
|
subUnitId: l,
|
663
663
|
range: {
|
@@ -678,7 +678,7 @@ function Li(e) {
|
|
678
678
|
keycode: sn.ESC,
|
679
679
|
eventType: nn.Keyboard,
|
680
680
|
unitId: r
|
681
|
-
}), m(K), P || o(), _.isVisible().visible && await p.executeCommand(
|
681
|
+
}), m(K), P || o(), _.isVisible().visible && await p.executeCommand(uo.id, {
|
682
682
|
visible: !1,
|
683
683
|
eventType: nn.Keyboard,
|
684
684
|
unitId: r,
|
@@ -804,7 +804,7 @@ function $i() {
|
|
804
804
|
ruleId: l,
|
805
805
|
ranges: N
|
806
806
|
};
|
807
|
-
g(
|
807
|
+
g(io.id, B);
|
808
808
|
}), X = (O) => {
|
809
809
|
if (Mn(O, An(m)))
|
810
810
|
return;
|
@@ -824,7 +824,7 @@ function $i() {
|
|
824
824
|
void 0
|
825
825
|
);
|
826
826
|
}, k = async () => {
|
827
|
-
await p.executeCommand(
|
827
|
+
await p.executeCommand(ro.id, {
|
828
828
|
ruleId: l,
|
829
829
|
unitId: a,
|
830
830
|
subUnitId: i
|
@@ -973,7 +973,7 @@ const ki = "univer-data-validation-item-container", Wi = "univer-data-validation
|
|
973
973
|
dataValidationItemIcon: Yi
|
974
974
|
}, Xi = (e) => {
|
975
975
|
const { rule: t, onClick: o, unitId: n, subUnitId: a, disable: i } = e, r = L(ye), l = L(Q), s = L(Ma), c = r.getValidatorItem(t.type), u = He(), [p, d] = W(!1), f = (m) => {
|
976
|
-
l.executeCommand(
|
976
|
+
l.executeCommand(ro.id, {
|
977
977
|
ruleId: t.uid,
|
978
978
|
unitId: n,
|
979
979
|
subUnitId: a
|
@@ -1041,7 +1041,7 @@ function qi(e) {
|
|
1041
1041
|
};
|
1042
1042
|
}, [p, d, t]);
|
1043
1043
|
const f = async () => {
|
1044
|
-
const R =
|
1044
|
+
const R = so(a), I = {
|
1045
1045
|
unitId: p,
|
1046
1046
|
subUnitId: d,
|
1047
1047
|
rule: R
|
@@ -1096,7 +1096,7 @@ const Ji = () => {
|
|
1096
1096
|
handler(e) {
|
1097
1097
|
const t = e.get(ge), o = Qn(t);
|
1098
1098
|
if (!o) return !1;
|
1099
|
-
const { workbook: n, worksheet: a } = o, i =
|
1099
|
+
const { workbook: n, worksheet: a } = o, i = so(e), r = e.get(Q), l = n.getUnitId(), s = a.getSheetId(), c = {
|
1100
1100
|
rule: i,
|
1101
1101
|
unitId: l,
|
1102
1102
|
subUnitId: s
|
@@ -1228,7 +1228,7 @@ let ze = class extends De {
|
|
1228
1228
|
redos: V
|
1229
1229
|
};
|
1230
1230
|
}, o = {
|
1231
|
-
id:
|
1231
|
+
id: lo,
|
1232
1232
|
onBeforeFillData: (n) => {
|
1233
1233
|
const { source: a, unitId: i, subUnitId: r } = n;
|
1234
1234
|
for (const l of a.rows)
|
@@ -1265,7 +1265,7 @@ let Ke = class extends De {
|
|
1265
1265
|
}
|
1266
1266
|
_initCopyPaste() {
|
1267
1267
|
this._sheetClipboardService.addClipboardHook({
|
1268
|
-
id:
|
1268
|
+
id: lo,
|
1269
1269
|
onBeforeCopy: (t, o, n) => this._collect(t, o, n),
|
1270
1270
|
onPasteCells: (t, o, n, a) => {
|
1271
1271
|
const { copyType: i = Ln.COPY, pasteType: r } = a, { range: l } = t || {}, { range: s, unitId: c, subUnitId: u } = o;
|
@@ -1388,20 +1388,20 @@ var lr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, cr = (e, t
|
|
1388
1388
|
}, kt = (e, t) => (o, n) => t(o, n, e);
|
1389
1389
|
let Ge = class extends De {
|
1390
1390
|
constructor(e, t, o) {
|
1391
|
-
super(), this._localeService = e, this._commandService = t, this.
|
1391
|
+
super(), this._localeService = e, this._commandService = t, this._sheetPermissionCheckController = o, this._commandExecutedListener();
|
1392
1392
|
}
|
1393
1393
|
_commandExecutedListener() {
|
1394
1394
|
this.disposeWithMe(
|
1395
1395
|
this._commandService.beforeCommandExecuted((e) => {
|
1396
|
-
e.id === vn.id && (this.
|
1396
|
+
e.id === vn.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
|
1397
1397
|
workbookTypes: [Ct],
|
1398
1398
|
rangeTypes: [It],
|
1399
1399
|
worksheetTypes: [wt, on]
|
1400
|
-
}) || this.
|
1400
|
+
}) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr"))), e.id === io.id && (this._sheetPermissionCheckController.permissionCheckWithRanges({
|
1401
1401
|
workbookTypes: [Ct],
|
1402
1402
|
rangeTypes: [It],
|
1403
1403
|
worksheetTypes: [wt, on]
|
1404
|
-
}, e.params.ranges) || this.
|
1404
|
+
}, e.params.ranges) || this._sheetPermissionCheckController.blockExecuteWithoutPermission(this._localeService.t("permission.dialog.setStyleErr")));
|
1405
1405
|
})
|
1406
1406
|
);
|
1407
1407
|
}
|
@@ -1409,7 +1409,7 @@ let Ge = class extends De {
|
|
1409
1409
|
Ge = cr([
|
1410
1410
|
kt(0, b(J)),
|
1411
1411
|
kt(1, Q),
|
1412
|
-
kt(2, b(
|
1412
|
+
kt(2, b(eo))
|
1413
1413
|
], Ge);
|
1414
1414
|
const Lo = "data-validation-single", Po = "sheet.menu.data-validation";
|
1415
1415
|
function ur(e) {
|
@@ -1517,11 +1517,11 @@ let Ze = class extends pn {
|
|
1517
1517
|
_initViewModelIntercept() {
|
1518
1518
|
this.disposeWithMe(
|
1519
1519
|
this._sheetInterceptorService.intercept(
|
1520
|
-
|
1520
|
+
to.CELL_CONTENT,
|
1521
1521
|
{
|
1522
1522
|
effect: zn.Style,
|
1523
1523
|
// must be after numfmt
|
1524
|
-
priority:
|
1524
|
+
priority: no.DATA_VALIDATION,
|
1525
1525
|
// eslint-disable-next-line max-lines-per-function, complexity
|
1526
1526
|
handler: (e, t, o) => {
|
1527
1527
|
var S, R, I, V, C;
|
@@ -1640,8 +1640,8 @@ Ze = To([
|
|
1640
1640
|
G(6, b(oe)),
|
1641
1641
|
G(7, b(ye)),
|
1642
1642
|
G(8, b(fn)),
|
1643
|
-
G(9, b(
|
1644
|
-
G(10, ea(
|
1643
|
+
G(9, b(co)),
|
1644
|
+
G(10, ea(ho))
|
1645
1645
|
], Ze);
|
1646
1646
|
let Bn = class extends pn {
|
1647
1647
|
constructor(e, t, o, n, a, i, r) {
|
@@ -1650,11 +1650,11 @@ let Bn = class extends pn {
|
|
1650
1650
|
_initViewModelIntercept() {
|
1651
1651
|
this.disposeWithMe(
|
1652
1652
|
this._sheetInterceptorService.intercept(
|
1653
|
-
|
1653
|
+
to.CELL_CONTENT,
|
1654
1654
|
{
|
1655
1655
|
effect: zn.Style,
|
1656
1656
|
// must be after numfmt
|
1657
|
-
priority:
|
1657
|
+
priority: no.DATA_VALIDATION,
|
1658
1658
|
// eslint-disable-next-line complexity
|
1659
1659
|
handler: (e, t, o) => {
|
1660
1660
|
var w, S, R, I, V;
|
@@ -1736,7 +1736,7 @@ Bn = To([
|
|
1736
1736
|
G(3, b(ye)),
|
1737
1737
|
G(4, b(fn)),
|
1738
1738
|
G(5, b(oe)),
|
1739
|
-
G(6, b(
|
1739
|
+
G(6, b(co))
|
1740
1740
|
], Bn);
|
1741
1741
|
var vr = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, Sr = (e, t, o, n) => {
|
1742
1742
|
for (var a = n > 1 ? void 0 : n ? _r(t, o) : t, i = e.length - 1, r; i >= 0; i--)
|
@@ -2013,7 +2013,7 @@ function xr(e) {
|
|
2013
2013
|
Pe(s) && s !== _ && (m(s), w(_));
|
2014
2014
|
}, [_, s]);
|
2015
2015
|
const [F, H] = W(() => {
|
2016
|
-
const D = p !== "1" ?
|
2016
|
+
const D = p !== "1" ? oo(s) : [], N = c.split(",");
|
2017
2017
|
return D.map((B, $) => ({
|
2018
2018
|
label: B,
|
2019
2019
|
color: N[$] || Te,
|
@@ -2063,7 +2063,7 @@ function xr(e) {
|
|
2063
2063
|
}));
|
2064
2064
|
});
|
2065
2065
|
}), j({
|
2066
|
-
formula1:
|
2066
|
+
formula1: ao(N.map((B) => B.label)),
|
2067
2067
|
formula2: N.map((B) => B.color === Te ? "" : B.color).join(",")
|
2068
2068
|
});
|
2069
2069
|
}, [F, j, p, _, C]);
|
package/lib/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
.univer-dv-date-dropdown{background:#fff;border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-lg);padding:var(--padding-sm)}.univer-dv-date-dropdown-btns{display:flex;justify-content:flex-end;border-top:1px solid rgb(var(--border-color));padding-top:var(--padding-sm)}.univer-dv-list-dropdown{border-radius:var(--border-radius-lg);border:1px solid rgb(var(--border-color));background:rgba(var(--color-white));box-shadow:var(--box-shadow-base);box-sizing:border-box;padding-bottom:var(--padding-xs)}.univer-dv-list-dropdown-title{padding:var(--padding-sm) 14px;color:rgb(var(--text-color));font-size:12px;line-height:1.5;flex-shrink:0;flex-grow:0}.univer-dv-list-dropdown-list{max-height:200px}.univer-dv-list-dropdown-list-container{padding:0 var(--padding-sm)}.univer-dv-list-dropdown-selected-icon{width:16px;height:16px;font-size:16px;color:rgba(var(--blue-500));flex-shrink:0;flex-grow:0;margin-left:12px}.univer-dv-list-dropdown-item-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--padding-xs) 6px;border-radius:6px;margin-top:4px;cursor:pointer}.univer-dv-list-dropdown-item-container:hover{background-color:rgba(var(--grey-50))}.univer-dv-list-dropdown-item{padding:0 4px;font-size:12px;font-style:normal;font-weight:400;line-height:16px;border-radius:8px;height:16px;width:-moz-fit-content;width:fit-content;flex:0 1 auto;text-overflow:ellipsis;overflow:hidden;color:rgba(var(--color-black));white-space:nowrap}.univer-dv-list-dropdown-split{height:1px;margin:4px 0;background:rgba(var(--grey-200));flex-shrink:0;flex-grow:0}.univer-dv-list-dropdown-edit{padding:0 var(--padding-xs);flex-shrink:0;flex-grow:0}.univer-dv-list-dropdown-edit a{padding:3px 6px;font-size:12px;line-height:1.5;cursor:pointer;border-radius:6px;display:block}.univer-dv-list-dropdown-edit a:hover{background:#f5f5f5}.univer-data-validation-options-button{cursor:pointer;margin-bottom:12px;font-size:var(--font-size-sm);color:rgba(var(--color-black));display:flex;align-items:center}.univer-data-validation-options-button-icon{font-size:8px;margin-left:4px}.univer-data-validation-detail{padding:var(--padding-base) 0}.univer-data-validation-detail-form-item{width:100%}.univer-data-validation-detail-buttons{margin-top:20px;display:flex;flex-direction:row;justify-content:flex-end}.univer-data-validation-detail-button{margin-left:12px}.univer-data-validation-item-container{border-radius:var(--border-radius-base);background-color:rgba(var(--bg-color-secondary));padding:var(--padding-sm);padding-right:36px;margin-left:-8px;margin-right:-8px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;cursor:pointer;position:relative;border-radius:6px;width:287px;overflow:hidden}.univer-data-validation-item-container:hover{background-color:rgba(var(--grey-50))}.univer-data-validation-item-title{font-size:var(--font-size-sm);color:rgba(var(--color-black));line-height:22px;font-weight:500;overflow:hidden;text-overflow:ellipsis}.univer-data-validation-item-content{color:rgba(var(--text-color-secondary));font-size:var(--font-size-xs);line-height:18px;overflow:hidden;text-overflow:ellipsis}.univer-data-validation-item-icon{position:absolute;top:19px;right:8px;width:20px;height:20px;display:flex;justify-content:center;align-items:center;border-radius:4px}.univer-data-validation-item-icon:hover{background:rgba(var(--grey-200))}.univer-data-validation-list{padding:var(--padding-base) 0}.univer-data-validation-list-buttons{margin-top:20px;display:flex;flex-direction:row;justify-content:flex-end}.univer-data-validation-list-button{margin-left:12px}.univer-data-validation-formula{width:100%}.univer-data-validation-formula-and{margin-top:-4px;font-size:var(--font-size-sm);color:rgba(var(--grey-400))}.univer-data-validation-formula-list-item{display:flex;padding-bottom:2px;align-items:center}.univer-data-validation-formula-list-item-icon{font-size:16px;cursor:pointer;margin-left:4px;border-radius:4px}.univer-data-validation-formula-list-item-icon:hover{background:rgba(var(--grey-100))}.univer-data-validation-formula-list-item-drag{cursor:move}.univer-data-validation-formula-list-add{color:#274fee;font-size:13px;font-weight:400;cursor:pointer;display:flex;flex-direction:row;align-items:center;border-radius:4px;padding:4px 8px;width:-moz-fit-content;width:fit-content}.univer-data-validation-formula-list-add svg{margin-right:4px}.univer-data-validation-formula-list-add:hover{background:#274fee0d}.univer-data-validation-formula-color-select{width:92px;margin-left:4px;margin-right:8px}.univer-data-validation-formula-color-select-panel{width:112px;display:flex;flex-direction:row;justify-content:space-between;padding:12px 4px 4px 12px;flex-wrap:wrap;box-sizing:border-box}.univer-data-validation-formula-color-select-panel .univer-data-validation-formula-color-item{margin-bottom:8px;margin-right:8px;box-sizing:border-box;cursor:pointer}.univer-data-validation-formula-color-item{border-radius:3px;border:1px solid rgba(var(--grey-400));width:16px;height:16px;box-sizing:border-box;font-size:16px}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
|
2
|
-
import {
|
2
|
+
import { SheetPermissionCheckController } from '@univerjs/sheets';
|
3
3
|
export declare class DataValidationPermissionController extends Disposable {
|
4
4
|
private _localeService;
|
5
5
|
private readonly _commandService;
|
6
|
-
private readonly
|
7
|
-
constructor(_localeService: LocaleService, _commandService: ICommandService,
|
6
|
+
private readonly _sheetPermissionCheckController;
|
7
|
+
constructor(_localeService: LocaleService, _commandService: ICommandService, _sheetPermissionCheckController: SheetPermissionCheckController);
|
8
8
|
private _commandExecutedListener;
|
9
9
|
}
|