@univerjs/sheets-data-validation-ui 0.4.1-nightly.202410271605 → 0.4.1-nightly.202410291249
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 +1 -1
- package/lib/es/index.js +88 -16
- package/lib/types/controllers/dv-reject-input.controller.d.ts +3 -3
- package/lib/types/views/widgets/checkbox-widget.d.ts +1 -0
- package/lib/types/views/widgets/dropdown-multiple-widget.d.ts +1 -0
- package/lib/types/views/widgets/dropdown-widget.d.ts +1 -0
- package/lib/types/views/widgets/shape/layout.d.ts +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +14 -14
package/lib/es/index.js
CHANGED
@@ -6,10 +6,10 @@ import React, { useState, forwardRef, useRef, createElement, useMemo, useEffect
|
|
6
6
|
import { Inject, LocaleService, Disposable, DataValidationErrorStyle, useDependency, ICommandService, numfmt, CellValueType, UniverInstanceType, toDisposable, IUniverInstanceService, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DisposableCollection, CommandType, BuildTextUtils, DataValidationRenderMode, DataValidationType, IConfigService, UndoCommand, RedoCommand, isUnitRangesEqual, debounce, shallowEqual, Injector, DataValidationStatus, ObjectMatrix, Range, Rectangle, queryObjectMatrix, Optional, RxDisposable, InterceptorEffectEnum, sequenceExecute, bufferDebounceTime, createInternalEditorID, isFormulaString, Tools, ThemeService, VerticalAlign, HorizontalAlign, DEFAULT_STYLES, WrapStrategy, DocumentDataModel, DEFAULT_EMPTY_DOCUMENT_VALUE, BooleanNumber, Plugin } from "@univerjs/core";
|
7
7
|
import { Button, DatePanel, RectPopup, Scrollbar, FormLayout, RadioGroup, Radio, Checkbox, Input, Select, DraggableList } from "@univerjs/design";
|
8
8
|
import { DeviceInputEventType, IRenderManagerService, fixLineWidthByScale, Transform, Checkbox as Checkbox$1, FontCache, Shape, Rect, getFontStyleString, getDocsSkeletonPageSize, DocumentViewModel, DocumentSkeleton, Documents } from "@univerjs/engine-render";
|
9
|
-
import { SetRangeValuesCommand, SheetsSelectionsService, getSheetCommandTarget, WorkbookEditablePermission, RangeProtectionPermissionEditPoint, WorksheetEditPermission, checkRangesEditablePermission, WorksheetSetCellStylePermission,
|
9
|
+
import { SheetInterceptorService, AFTER_CELL_EDIT_ASYNC, SetRangeValuesCommand, SheetsSelectionsService, getSheetCommandTarget, WorkbookEditablePermission, RangeProtectionPermissionEditPoint, WorksheetEditPermission, checkRangesEditablePermission, WorksheetSetCellStylePermission, INTERCEPTOR_POINT, InterceptCellContentPriority } from "@univerjs/sheets";
|
10
10
|
import { SheetDataValidationModel, getCellValueOrigin, getDataValidationCellValue, deserializeListOptions, serializeListOptions, UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand, RemoveSheetDataValidationCommand, UpdateSheetDataValidationOptionsCommand, createDefaultNewRule, AddSheetDataValidationCommand, RemoveSheetAllDataValidationCommand, DATA_VALIDATION_PLUGIN_NAME, getDataValidationDiffMutations, DataValidationCacheService, DataValidationFormulaController, DataValidationFormulaService, getFormulaResult, isLegalFormulaResult, transformCheckboxValue, CHECKBOX_FORMULA_1, CHECKBOX_FORMULA_2 } from "@univerjs/sheets-data-validation";
|
11
11
|
import { getPatternType } from "@univerjs/sheets-numfmt";
|
12
|
-
import {
|
12
|
+
import { SetCellEditVisibleOperation, SheetCanvasPopManagerService, IEditorBridgeService, SheetPermissionInterceptorBaseController, IMarkSelectionService, HoverManagerService, CellAlertManagerService, CellAlertType, IAutoFillService, APPLY_TYPE, virtualizeDiscreteRanges, getAutoFillRepeatRange, COPY_TYPE, rangeToDiscreteRange, PREDEFINED_HOOK_NAME, getRepeatRange, ISheetClipboardService, getCurrentRangeDisable$, AutoHeightController, SheetSkeletonManagerService } from "@univerjs/sheets-ui";
|
13
13
|
import { IDialogService, KeyCode, ISidebarService, useObservable, ComponentManager, IZenZoneService, useEvent, MenuItemType, getMenuHiddenObservable, RibbonStartGroup, IMenuManagerService } from "@univerjs/ui";
|
14
14
|
import { DataValidatorRegistryService, DataValidationModel, DataValidatorRegistryScope, TWO_FORMULA_OPERATOR_COUNT, getRuleOptions, getRuleSetting } from "@univerjs/data-validation";
|
15
15
|
import { RichTextEditingMutation } from "@univerjs/docs";
|
@@ -406,12 +406,12 @@ var __defProp$f = Object.defineProperty, __getOwnPropDesc$f = Object.getOwnPrope
|
|
406
406
|
return kind && result && __defProp$f(target, key, result), result;
|
407
407
|
}, "__decorateClass$f"), __decorateParam$f = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$f"), _a;
|
408
408
|
let DataValidationRejectInputController = (_a = class extends Disposable {
|
409
|
-
constructor(
|
410
|
-
super(), this.
|
409
|
+
constructor(_sheetInterceptorService, _dataValidationModel, _dataValidatorRegistryService, _dialogService, _localeService) {
|
410
|
+
super(), this._sheetInterceptorService = _sheetInterceptorService, this._dataValidationModel = _dataValidationModel, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._dialogService = _dialogService, this._localeService = _localeService, this._initEditorBridgeInterceptor();
|
411
411
|
}
|
412
412
|
_initEditorBridgeInterceptor() {
|
413
|
-
this.
|
414
|
-
|
413
|
+
this._sheetInterceptorService.writeCellInterceptor.intercept(
|
414
|
+
AFTER_CELL_EDIT_ASYNC,
|
415
415
|
{
|
416
416
|
handler: /* @__PURE__ */ __name(async (cellPromise, context, next) => {
|
417
417
|
var _a18;
|
@@ -489,7 +489,7 @@ let DataValidationRejectInputController = (_a = class extends Disposable {
|
|
489
489
|
}
|
490
490
|
}, __name(_a, "DataValidationRejectInputController"), _a);
|
491
491
|
DataValidationRejectInputController = __decorateClass$f([
|
492
|
-
__decorateParam$f(0,
|
492
|
+
__decorateParam$f(0, Inject(SheetInterceptorService)),
|
493
493
|
__decorateParam$f(1, Inject(SheetDataValidationModel)),
|
494
494
|
__decorateParam$f(2, Inject(DataValidatorRegistryService)),
|
495
495
|
__decorateParam$f(3, IDialogService),
|
@@ -1969,6 +1969,32 @@ let SheetsDataValidationRenderController = (_a8 = class extends RxDisposable {
|
|
1969
1969
|
};
|
1970
1970
|
return (_f2 = (_e2 = validator == null ? void 0 : validator.canvasRender) == null ? void 0 : _e2.calcCellAutoHeight) == null ? void 0 : _f2.call(_e2, info);
|
1971
1971
|
}, "interceptorAutoHeight"),
|
1972
|
+
interceptorAutoWidth: /* @__PURE__ */ __name(() => {
|
1973
|
+
var _a19, _b2, _c2, _d2, _e2, _f2;
|
1974
|
+
const skeleton = (_b2 = (_a19 = this._renderManagerService.getRenderById(unitId)) == null ? void 0 : _a19.with(SheetSkeletonManagerService).getWorksheetSkeleton(subUnitId)) == null ? void 0 : _b2.skeleton;
|
1975
|
+
if (!skeleton)
|
1976
|
+
return;
|
1977
|
+
const mergeCell = skeleton.worksheet.getMergedCell(row, col), info = {
|
1978
|
+
data: {
|
1979
|
+
...cell,
|
1980
|
+
dataValidation: {
|
1981
|
+
ruleId,
|
1982
|
+
validStatus,
|
1983
|
+
rule,
|
1984
|
+
validator
|
1985
|
+
}
|
1986
|
+
},
|
1987
|
+
style: skeleton.getsStyles().getStyleByCell(cell),
|
1988
|
+
primaryWithCoord: skeleton.getCellByIndex((_c2 = mergeCell == null ? void 0 : mergeCell.startRow) != null ? _c2 : row, (_d2 = mergeCell == null ? void 0 : mergeCell.startColumn) != null ? _d2 : col),
|
1989
|
+
unitId,
|
1990
|
+
subUnitId,
|
1991
|
+
row,
|
1992
|
+
col,
|
1993
|
+
workbook,
|
1994
|
+
worksheet
|
1995
|
+
};
|
1996
|
+
return (_f2 = (_e2 = validator == null ? void 0 : validator.canvasRender) == null ? void 0 : _e2.calcCellAutoWidth) == null ? void 0 : _f2.call(_e2, info);
|
1997
|
+
}, "interceptorAutoWidth"),
|
1972
1998
|
coverable: ((_f = cell == null ? void 0 : cell.coverable) != null ? _f : !0) && !(rule.type === DataValidationType.LIST || rule.type === DataValidationType.LIST_MULTIPLE)
|
1973
1999
|
});
|
1974
2000
|
}, "handler")
|
@@ -2626,6 +2652,11 @@ let CheckboxRender = (_a11 = class {
|
|
2626
2652
|
const { style } = info;
|
2627
2653
|
return ((_a18 = style == null ? void 0 : style.fs) != null ? _a18 : 10) * 1.6;
|
2628
2654
|
}
|
2655
|
+
calcCellAutoWidth(info) {
|
2656
|
+
var _a18;
|
2657
|
+
const { style } = info;
|
2658
|
+
return ((_a18 = style == null ? void 0 : style.fs) != null ? _a18 : 10) * 1.6;
|
2659
|
+
}
|
2629
2660
|
async _parseFormula(rule, unitId, subUnitId) {
|
2630
2661
|
var _a18, _b, _c;
|
2631
2662
|
const { formula1 = CHECKBOX_FORMULA_1, formula2 = CHECKBOX_FORMULA_2 } = rule, results = await this._formulaService.getRuleFormulaResult(unitId, subUnitId, rule.uid), formulaResult1 = getFormulaResult((_a18 = results == null ? void 0 : results[0]) == null ? void 0 : _a18.result), formulaResult2 = getFormulaResult((_b = results == null ? void 0 : results[1]) == null ? void 0 : _b.result), isFormulaValid = isLegalFormulaResult(String(formulaResult1)) && isLegalFormulaResult(String(formulaResult2));
|
@@ -2766,7 +2797,7 @@ function getDropdownItemSize(text, fontStyle) {
|
|
2766
2797
|
}
|
2767
2798
|
__name(getDropdownItemSize, "getDropdownItemSize");
|
2768
2799
|
function layoutDropdowns(items, fontStyle, cellWidth, cellHeight) {
|
2769
|
-
const
|
2800
|
+
const cellPaddingH = ICON_PLACE$1 + CELL_PADDING_H * 2, widthAvailableForContent = cellWidth - cellPaddingH, heightAvailableForContent = cellHeight - CELL_PADDING_V * 2, textLayout = items.map((item) => ({
|
2770
2801
|
layout: getDropdownItemSize(item, fontStyle),
|
2771
2802
|
text: item
|
2772
2803
|
}));
|
@@ -2774,7 +2805,7 @@ function layoutDropdowns(items, fontStyle, cellWidth, cellHeight) {
|
|
2774
2805
|
const lines = [];
|
2775
2806
|
textLayout.forEach((item) => {
|
2776
2807
|
const { layout } = item, { width, height } = layout;
|
2777
|
-
!currentLine || currentLine.width + width + MARGIN_H$1 >
|
2808
|
+
!currentLine || currentLine.width + width + MARGIN_H$1 > widthAvailableForContent ? (currentLine = {
|
2778
2809
|
width,
|
2779
2810
|
height,
|
2780
2811
|
items: [{
|
@@ -2786,15 +2817,16 @@ function layoutDropdowns(items, fontStyle, cellWidth, cellHeight) {
|
|
2786
2817
|
left: currentLine.width + MARGIN_H$1
|
2787
2818
|
}), currentLine.width = currentLine.width + width + MARGIN_H$1);
|
2788
2819
|
});
|
2789
|
-
let totalHeight = 0;
|
2820
|
+
let totalHeight = 0, maxLineWidth = 0;
|
2790
2821
|
return lines.forEach((line, index) => {
|
2791
|
-
index === lines.length - 1 ? totalHeight += line.height : totalHeight += line.height + MARGIN_V$1;
|
2822
|
+
maxLineWidth = Math.max(maxLineWidth, line.width), index === lines.length - 1 ? totalHeight += line.height : totalHeight += line.height + MARGIN_V$1;
|
2792
2823
|
}), {
|
2793
2824
|
lines,
|
2794
2825
|
totalHeight,
|
2795
|
-
contentWidth,
|
2796
|
-
contentHeight,
|
2797
|
-
cellAutoHeight: totalHeight + CELL_PADDING_V * 2
|
2826
|
+
contentWidth: widthAvailableForContent,
|
2827
|
+
contentHeight: heightAvailableForContent,
|
2828
|
+
cellAutoHeight: totalHeight + CELL_PADDING_V * 2,
|
2829
|
+
calcAutoWidth: maxLineWidth + cellPaddingH
|
2798
2830
|
};
|
2799
2831
|
}
|
2800
2832
|
__name(layoutDropdowns, "layoutDropdowns");
|
@@ -2906,6 +2938,19 @@ let DropdownMultipleWidget = (_a13 = class {
|
|
2906
2938
|
const cellWidth = cellBounding.endX - cellBounding.startX, cellHeight = cellBounding.endY - cellBounding.startY, cellValue = (_a18 = getCellValueOrigin(data)) != null ? _a18 : "", { validator: _validator } = validation, items = _validator.parseCellValue(cellValue), fontStyle = getFontStyleString(style != null ? style : void 0);
|
2907
2939
|
return layoutDropdowns(items, fontStyle, cellWidth, cellHeight).cellAutoHeight;
|
2908
2940
|
}
|
2941
|
+
calcCellAutoWidth(info) {
|
2942
|
+
var _a18;
|
2943
|
+
const { primaryWithCoord, style, data } = info, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {}, _cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, cellBounding = {
|
2944
|
+
startX: _cellBounding.startX + leftOffset,
|
2945
|
+
endX: _cellBounding.endX - rightOffset,
|
2946
|
+
startY: _cellBounding.startY + topOffset,
|
2947
|
+
endY: _cellBounding.endY - downOffset
|
2948
|
+
}, validation = data.dataValidation;
|
2949
|
+
if (!validation)
|
2950
|
+
return;
|
2951
|
+
const cellWidth = cellBounding.endX - cellBounding.startX, cellHeight = cellBounding.endY - cellBounding.startY, cellValue = (_a18 = getCellValueOrigin(data)) != null ? _a18 : "", { validator: _validator } = validation, items = _validator.parseCellValue(cellValue), fontStyle = getFontStyleString(style != null ? style : void 0);
|
2952
|
+
return layoutDropdowns(items, fontStyle, cellWidth, cellHeight).calcAutoWidth;
|
2953
|
+
}
|
2909
2954
|
isHit(position, info) {
|
2910
2955
|
const { primaryWithCoord } = info, cellBounding = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, { endX } = cellBounding, { x } = position;
|
2911
2956
|
return x >= endX - ICON_PLACE$1 && x <= endX;
|
@@ -2940,7 +2985,7 @@ var __defProp$3 = Object.defineProperty, __getOwnPropDesc$3 = Object.getOwnPrope
|
|
2940
2985
|
(decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result);
|
2941
2986
|
return kind && result && __defProp$3(target, key, result), result;
|
2942
2987
|
}, "__decorateClass$3"), __decorateParam$3 = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$3");
|
2943
|
-
const PADDING_H = 4, ICON_SIZE = 4, ICON_PLACE = 14, MARGIN_H = 6, MARGIN_V = 4, DROP_DOWN_ICON_COLOR = "#565656", downPath = 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");
|
2988
|
+
const PADDING_H = 4, ICON_SIZE = 4, ICON_PLACE = 14, MARGIN_H = 6, MARGIN_V = 4, RADIUS_BG = 8, DROP_DOWN_ICON_COLOR = "#565656", downPath = 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");
|
2944
2989
|
function convertToDocumentData(text, style) {
|
2945
2990
|
const contentLength = text.length;
|
2946
2991
|
return {
|
@@ -3104,7 +3149,7 @@ let DropdownWidget = (_a14 = class {
|
|
3104
3149
|
width: rectWidth,
|
3105
3150
|
height: rectHeight,
|
3106
3151
|
fill: (activeItem == null ? void 0 : activeItem.color) || DROP_DOWN_DEFAULT_COLOR,
|
3107
|
-
radius:
|
3152
|
+
radius: RADIUS_BG
|
3108
3153
|
}), ctx.save(), ctx.translateWithPrecision(PADDING_H, 0), ctx.beginPath(), ctx.rect(0, 0, realWidth, fontHeight), ctx.clip(), ctx.translateWithPrecision(paddingLeft, 0), documents.render(ctx), ctx.restore(), ctx.translateWithPrecision(realWidth + PADDING_H + 4, (fontHeight - ICON_SIZE) / 2), ctx.fillStyle = DROP_DOWN_ICON_COLOR, ctx.fill(downPath), ctx.restore(), map.set(key, {
|
3109
3154
|
left: cellBounding.startX + MARGIN_H + skeleton.rowHeaderWidth,
|
3110
3155
|
top: cellBounding.startY + paddingTop + skeleton.columnHeaderHeight,
|
@@ -3140,6 +3185,33 @@ let DropdownWidget = (_a14 = class {
|
|
3140
3185
|
return fontHeight + MARGIN_V * 2;
|
3141
3186
|
}
|
3142
3187
|
}
|
3188
|
+
calcCellAutoWidth(info) {
|
3189
|
+
var _a18;
|
3190
|
+
const { primaryWithCoord, style, data } = info, cellRange = primaryWithCoord.isMergedMainCell ? primaryWithCoord.mergeInfo : primaryWithCoord, fontRenderExtension = data.fontRenderExtension, { leftOffset = 0, rightOffset = 0, topOffset = 0, downOffset = 0 } = fontRenderExtension || {}, rule = (_a18 = data.dataValidation) == null ? void 0 : _a18.rule;
|
3191
|
+
if (!rule || rule.renderMode === DataValidationRenderMode.TEXT) return;
|
3192
|
+
const cellBounding = {
|
3193
|
+
startX: cellRange.startX + leftOffset,
|
3194
|
+
endX: cellRange.endX - rightOffset,
|
3195
|
+
startY: cellRange.startY + topOffset,
|
3196
|
+
endY: cellRange.endY - downOffset
|
3197
|
+
}, cellWidth = cellBounding.endX - cellBounding.startX, value = getCellValueOrigin(data), valueStr = `${value != null ? value : ""}`;
|
3198
|
+
let { tb, pd } = style || {};
|
3199
|
+
const { l: l2 = DEFAULT_STYLES.pd.l, r: r2 = DEFAULT_STYLES.pd.r } = pd != null ? pd : {};
|
3200
|
+
tb = tb != null ? tb : WrapStrategy.WRAP;
|
3201
|
+
let paddingAll = MARGIN_H * 2 + ICON_PLACE;
|
3202
|
+
switch (rule.renderMode) {
|
3203
|
+
case DataValidationRenderMode.ARROW:
|
3204
|
+
paddingAll = ICON_PLACE + MARGIN_H * 2 + r2 + l2;
|
3205
|
+
break;
|
3206
|
+
case DataValidationRenderMode.CUSTOM:
|
3207
|
+
paddingAll = ICON_PLACE + MARGIN_H * 2 + PADDING_H * 2 + r2 + l2 + RADIUS_BG / 2 + 1;
|
3208
|
+
break;
|
3209
|
+
default:
|
3210
|
+
paddingAll = ICON_PLACE + MARGIN_H * 2 + PADDING_H * 2 + r2 + l2 + RADIUS_BG / 2 + 1;
|
3211
|
+
}
|
3212
|
+
const widthForTextLayout = cellWidth - paddingAll, { documentSkeleton, docModel } = createDocuments(valueStr, this._localeService, style);
|
3213
|
+
return tb === WrapStrategy.WRAP && docModel.updateDocumentDataPageSize(Math.max(widthForTextLayout, 1)), documentSkeleton.calculate(), documentSkeleton.getActualSize(), getDocsSkeletonPageSize(documentSkeleton).width + paddingAll;
|
3214
|
+
}
|
3143
3215
|
isHit(position, info) {
|
3144
3216
|
const { data, subUnitId, row, col } = info, dropdownInfo = this._ensureMap(subUnitId).get(this._generateKey(row, col)), validation = data.dataValidation;
|
3145
3217
|
if (!validation || !dropdownInfo || validation.rule.renderMode === DataValidationRenderMode.TEXT)
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { Disposable, LocaleService } from '@univerjs/core';
|
2
2
|
import { DataValidatorRegistryService } from '@univerjs/data-validation';
|
3
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
3
4
|
import { SheetDataValidationModel } from '@univerjs/sheets-data-validation';
|
4
|
-
import { IEditorBridgeService } from '@univerjs/sheets-ui';
|
5
5
|
import { IDialogService } from '@univerjs/ui';
|
6
6
|
export declare class DataValidationRejectInputController extends Disposable {
|
7
|
-
private readonly
|
7
|
+
private readonly _sheetInterceptorService;
|
8
8
|
private readonly _dataValidationModel;
|
9
9
|
private readonly _dataValidatorRegistryService;
|
10
10
|
private readonly _dialogService;
|
11
11
|
private readonly _localeService;
|
12
|
-
constructor(
|
12
|
+
constructor(_sheetInterceptorService: SheetInterceptorService, _dataValidationModel: SheetDataValidationModel, _dataValidatorRegistryService: DataValidatorRegistryService, _dialogService: IDialogService, _localeService: LocaleService);
|
13
13
|
private _initEditorBridgeInterceptor;
|
14
14
|
showReject(title: string): void;
|
15
15
|
}
|
@@ -9,6 +9,7 @@ export declare class CheckboxRender implements IBaseDataValidationWidget {
|
|
9
9
|
private _calc;
|
10
10
|
constructor(_commandService: ICommandService, _formulaService: DataValidationFormulaService, _themeService: ThemeService);
|
11
11
|
calcCellAutoHeight(info: ICellRenderContext): number | undefined;
|
12
|
+
calcCellAutoWidth(info: ICellRenderContext): number | undefined;
|
12
13
|
private _parseFormula;
|
13
14
|
drawWith(ctx: UniverRenderingContext2D, info: ICellRenderContext): void;
|
14
15
|
isHit(evt: {
|
@@ -11,6 +11,7 @@ export declare class DropdownMultipleWidget implements IBaseDataValidationWidget
|
|
11
11
|
private _drawDownIcon;
|
12
12
|
drawWith(ctx: UniverRenderingContext2D, info: ICellRenderContext, skeleton: SpreadsheetSkeleton, spreadsheets: Spreadsheet): void;
|
13
13
|
calcCellAutoHeight(info: ICellRenderContext): number | undefined;
|
14
|
+
calcCellAutoWidth(info: ICellRenderContext): number | undefined;
|
14
15
|
isHit(position: {
|
15
16
|
x: number;
|
16
17
|
y: number;
|
@@ -20,6 +20,7 @@ export declare class DropdownWidget implements IBaseDataValidationWidget {
|
|
20
20
|
private _drawDownIcon;
|
21
21
|
drawWith(ctx: UniverRenderingContext2D, info: ICellRenderContext, skeleton: SpreadsheetSkeleton): void;
|
22
22
|
calcCellAutoHeight(info: ICellRenderContext): number | undefined;
|
23
|
+
calcCellAutoWidth(info: ICellRenderContext): number | undefined;
|
23
24
|
isHit(position: {
|
24
25
|
x: number;
|
25
26
|
y: number;
|