@canvas-components/list-table 0.3.1 → 0.3.2
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/README.md +3 -1
- package/dist/index.cjs +70 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +70 -66
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -378,7 +378,9 @@ type ListTableSparklineSize = "small" | "medium" | number | [number, number] | {
|
|
|
378
378
|
type ListTableChartType = "sparkline" | (string & {});
|
|
379
379
|
type ListTableChartSize = ListTableSparklineSize;
|
|
380
380
|
type ListTableRateSize = "small" | "medium" | "large" | number;
|
|
381
|
-
type
|
|
381
|
+
type ListTableRateSymbolType = "star" | "sun" | "moon";
|
|
382
|
+
/** 单元格内置图标名称。 */
|
|
383
|
+
type ListTableSymbolType = ListTableRateSymbolType | "check" | "close";
|
|
382
384
|
type ListTableButtonType = "primary" | "default" | "dashed" | "text" | "link";
|
|
383
385
|
type ListTableButtonSize = "small" | "middle" | "medium" | "large";
|
|
384
386
|
/**
|
|
@@ -582,7 +584,7 @@ interface ListTableRateCellContent<RecordType = any> extends ListTableBaseCellCo
|
|
|
582
584
|
count?: number;
|
|
583
585
|
allowHalf?: boolean;
|
|
584
586
|
/** 评分图形,默认星星。 */
|
|
585
|
-
shape?:
|
|
587
|
+
shape?: ListTableRateSymbolType;
|
|
586
588
|
size?: ListTableRateSize;
|
|
587
589
|
color?: string;
|
|
588
590
|
backgroundColor?: string;
|
|
@@ -1870,4 +1872,4 @@ interface ListTableValidationTarget {
|
|
|
1870
1872
|
columnKey: string;
|
|
1871
1873
|
}
|
|
1872
1874
|
|
|
1873
|
-
export { type CreateCellEditorSessionParams, type DebugHitTestResult, type FilterPanelConfig, type FilterPanelOptionItem, type FilterPanelTexts, type FixedPopupConfig, type HeaderContextMenuColumnItem, type HeaderContextMenuConfig, type HeaderContextMenuDensity, ListTable, type ListTableAutoMergeRule, type ListTableBarcodeCellContent, type ListTableBarcodeFormat, type ListTableButtonCellContent, type ListTableButtonPopconfirmOptions, type ListTableButtonSize, type ListTableButtonType, type ListTableCarouselScrollOptions, type ListTableCellContent, type ListTableCellContentClickContext, type ListTableCellEditorSession, type ListTableCellSpan, type ListTableCellStyle, type ListTableChartCellContent, type ListTableChartSize, type ListTableChartType, type ListTableColorCellContent, type ListTableColumn, type ListTableContextMenuFeature, type ListTableContextMenuOptions, type ListTableCustomChartCellContent, type ListTableDangerConfirmRequest, type ListTableDataFormat, type ListTableDataFormatOptions, type ListTableDataFormatType, type ListTableDebugOptions, type ListTableDebugSnapshot, type ListTableDensity, type ListTableEditAutoCompleteEnter, type ListTableEditFilterOption, type ListTableEditOption, type ListTableEditValueType, type ListTableEditable, type ListTableEditorAutoCompleteEnter, type ListTableEditorConfig, type ListTableEditorFactory, type ListTableEditorFilterOption, type ListTableEditorNavigateDirection, type ListTableEditorOption, type ListTableEditorRect, type ListTableEditorRequest, type ListTableEditorTheme, type ListTableEditorValueType, type ListTableExportXlsxOptions, type ListTableFilterCondition$1 as ListTableFilterCondition, type ListTableFilterConditionOperator, type ListTableFilterConditionRelation, type ListTableFilterMatchMode, type ListTableFilterOption, type ListTableFilterOptionValue, type ListTableFilterPanelAdapter, type ListTableFilterState, type ListTableFilterType, type ListTableFilterValue$1 as ListTableFilterValue, type ListTableFixedPopupAdapter, type ListTableFormItemProps, type ListTableFormItemPropsConfig, type ListTableFormRule, type ListTableFormRules, type ListTableGroupingOptions, type ListTableHeaderContextMenuAdapter, type ListTableHighlightMode, type ListTableHorizontalAlign, type ListTableIconCellContent, type ListTableImageCellContent, type ListTableImageObjectFit, type ListTableImagePreviewRequest, type ListTableLoadingAdapter, type ListTableLoadingRequest, type ListTableMergeCellOptions, type ListTableNestedTableCellContent, type ListTableNestedTableColumn, type ListTableOptions, type ListTablePaginationAdapter, type ListTablePaginationOptions, type ListTablePerformanceMetric, type ListTableProgressCellContent, type ListTableProgressShape, type ListTableProgressSize, type ListTableQrCodeCellContent, type ListTableQrCodeLevel, type ListTableQueryChange, type ListTableQueryChangeExtra, type ListTableQueryFilters, type ListTableQueryOptions, type ListTableQueryPagination, type ListTableQuerySorter, type ListTableRateCellContent, type ListTableRateSize, type ListTableRowDragMode, type ListTableRowDragOptions, type ListTableRowDragPayload, type ListTableRowDragSourceInfo, type ListTableRowDragZone, type ListTableRowEventProps, type ListTableRowSelectionChangeInfo, type ListTableRowSelectionOptions, type ListTableRowSelectorOptions, type ListTableScrollToOptions, type ListTableScrollbarOptions, type ListTableSearchRequest, type ListTableSelectionState, type ListTableSortItem, type ListTableSortState, type ListTableSparklineChartCellContent, type ListTableSparklineSize, type ListTableSummaryConfig, type ListTableSummaryRoundingMode, type ListTableSummaryType, type ListTableSymbolType, type ListTableTagCellContent, type ListTableTheme, type ListTableTooltipAdapter, type ListTableTooltipRequest, type ListTableUiOptions, type ListTableValidationError, type ListTableValidationErrorField, type ListTableValidationFailure, type ListTableValidationTarget, type PaginationConfig, type RenderCellDescriptor };
|
|
1875
|
+
export { type CreateCellEditorSessionParams, type DebugHitTestResult, type FilterPanelConfig, type FilterPanelOptionItem, type FilterPanelTexts, type FixedPopupConfig, type HeaderContextMenuColumnItem, type HeaderContextMenuConfig, type HeaderContextMenuDensity, ListTable, type ListTableAutoMergeRule, type ListTableBarcodeCellContent, type ListTableBarcodeFormat, type ListTableButtonCellContent, type ListTableButtonPopconfirmOptions, type ListTableButtonSize, type ListTableButtonType, type ListTableCarouselScrollOptions, type ListTableCellContent, type ListTableCellContentClickContext, type ListTableCellEditorSession, type ListTableCellSpan, type ListTableCellStyle, type ListTableChartCellContent, type ListTableChartSize, type ListTableChartType, type ListTableColorCellContent, type ListTableColumn, type ListTableContextMenuFeature, type ListTableContextMenuOptions, type ListTableCustomChartCellContent, type ListTableDangerConfirmRequest, type ListTableDataFormat, type ListTableDataFormatOptions, type ListTableDataFormatType, type ListTableDebugOptions, type ListTableDebugSnapshot, type ListTableDensity, type ListTableEditAutoCompleteEnter, type ListTableEditFilterOption, type ListTableEditOption, type ListTableEditValueType, type ListTableEditable, type ListTableEditorAutoCompleteEnter, type ListTableEditorConfig, type ListTableEditorFactory, type ListTableEditorFilterOption, type ListTableEditorNavigateDirection, type ListTableEditorOption, type ListTableEditorRect, type ListTableEditorRequest, type ListTableEditorTheme, type ListTableEditorValueType, type ListTableExportXlsxOptions, type ListTableFilterCondition$1 as ListTableFilterCondition, type ListTableFilterConditionOperator, type ListTableFilterConditionRelation, type ListTableFilterMatchMode, type ListTableFilterOption, type ListTableFilterOptionValue, type ListTableFilterPanelAdapter, type ListTableFilterState, type ListTableFilterType, type ListTableFilterValue$1 as ListTableFilterValue, type ListTableFixedPopupAdapter, type ListTableFormItemProps, type ListTableFormItemPropsConfig, type ListTableFormRule, type ListTableFormRules, type ListTableGroupingOptions, type ListTableHeaderContextMenuAdapter, type ListTableHighlightMode, type ListTableHorizontalAlign, type ListTableIconCellContent, type ListTableImageCellContent, type ListTableImageObjectFit, type ListTableImagePreviewRequest, type ListTableLoadingAdapter, type ListTableLoadingRequest, type ListTableMergeCellOptions, type ListTableNestedTableCellContent, type ListTableNestedTableColumn, type ListTableOptions, type ListTablePaginationAdapter, type ListTablePaginationOptions, type ListTablePerformanceMetric, type ListTableProgressCellContent, type ListTableProgressShape, type ListTableProgressSize, type ListTableQrCodeCellContent, type ListTableQrCodeLevel, type ListTableQueryChange, type ListTableQueryChangeExtra, type ListTableQueryFilters, type ListTableQueryOptions, type ListTableQueryPagination, type ListTableQuerySorter, type ListTableRateCellContent, type ListTableRateSize, type ListTableRateSymbolType, type ListTableRowDragMode, type ListTableRowDragOptions, type ListTableRowDragPayload, type ListTableRowDragSourceInfo, type ListTableRowDragZone, type ListTableRowEventProps, type ListTableRowSelectionChangeInfo, type ListTableRowSelectionOptions, type ListTableRowSelectorOptions, type ListTableScrollToOptions, type ListTableScrollbarOptions, type ListTableSearchRequest, type ListTableSelectionState, type ListTableSortItem, type ListTableSortState, type ListTableSparklineChartCellContent, type ListTableSparklineSize, type ListTableSummaryConfig, type ListTableSummaryRoundingMode, type ListTableSummaryType, type ListTableSymbolType, type ListTableTagCellContent, type ListTableTheme, type ListTableTooltipAdapter, type ListTableTooltipRequest, type ListTableUiOptions, type ListTableValidationError, type ListTableValidationErrorField, type ListTableValidationFailure, type ListTableValidationTarget, type PaginationConfig, type RenderCellDescriptor };
|
package/dist/index.d.ts
CHANGED
|
@@ -378,7 +378,9 @@ type ListTableSparklineSize = "small" | "medium" | number | [number, number] | {
|
|
|
378
378
|
type ListTableChartType = "sparkline" | (string & {});
|
|
379
379
|
type ListTableChartSize = ListTableSparklineSize;
|
|
380
380
|
type ListTableRateSize = "small" | "medium" | "large" | number;
|
|
381
|
-
type
|
|
381
|
+
type ListTableRateSymbolType = "star" | "sun" | "moon";
|
|
382
|
+
/** 单元格内置图标名称。 */
|
|
383
|
+
type ListTableSymbolType = ListTableRateSymbolType | "check" | "close";
|
|
382
384
|
type ListTableButtonType = "primary" | "default" | "dashed" | "text" | "link";
|
|
383
385
|
type ListTableButtonSize = "small" | "middle" | "medium" | "large";
|
|
384
386
|
/**
|
|
@@ -582,7 +584,7 @@ interface ListTableRateCellContent<RecordType = any> extends ListTableBaseCellCo
|
|
|
582
584
|
count?: number;
|
|
583
585
|
allowHalf?: boolean;
|
|
584
586
|
/** 评分图形,默认星星。 */
|
|
585
|
-
shape?:
|
|
587
|
+
shape?: ListTableRateSymbolType;
|
|
586
588
|
size?: ListTableRateSize;
|
|
587
589
|
color?: string;
|
|
588
590
|
backgroundColor?: string;
|
|
@@ -1870,4 +1872,4 @@ interface ListTableValidationTarget {
|
|
|
1870
1872
|
columnKey: string;
|
|
1871
1873
|
}
|
|
1872
1874
|
|
|
1873
|
-
export { type CreateCellEditorSessionParams, type DebugHitTestResult, type FilterPanelConfig, type FilterPanelOptionItem, type FilterPanelTexts, type FixedPopupConfig, type HeaderContextMenuColumnItem, type HeaderContextMenuConfig, type HeaderContextMenuDensity, ListTable, type ListTableAutoMergeRule, type ListTableBarcodeCellContent, type ListTableBarcodeFormat, type ListTableButtonCellContent, type ListTableButtonPopconfirmOptions, type ListTableButtonSize, type ListTableButtonType, type ListTableCarouselScrollOptions, type ListTableCellContent, type ListTableCellContentClickContext, type ListTableCellEditorSession, type ListTableCellSpan, type ListTableCellStyle, type ListTableChartCellContent, type ListTableChartSize, type ListTableChartType, type ListTableColorCellContent, type ListTableColumn, type ListTableContextMenuFeature, type ListTableContextMenuOptions, type ListTableCustomChartCellContent, type ListTableDangerConfirmRequest, type ListTableDataFormat, type ListTableDataFormatOptions, type ListTableDataFormatType, type ListTableDebugOptions, type ListTableDebugSnapshot, type ListTableDensity, type ListTableEditAutoCompleteEnter, type ListTableEditFilterOption, type ListTableEditOption, type ListTableEditValueType, type ListTableEditable, type ListTableEditorAutoCompleteEnter, type ListTableEditorConfig, type ListTableEditorFactory, type ListTableEditorFilterOption, type ListTableEditorNavigateDirection, type ListTableEditorOption, type ListTableEditorRect, type ListTableEditorRequest, type ListTableEditorTheme, type ListTableEditorValueType, type ListTableExportXlsxOptions, type ListTableFilterCondition$1 as ListTableFilterCondition, type ListTableFilterConditionOperator, type ListTableFilterConditionRelation, type ListTableFilterMatchMode, type ListTableFilterOption, type ListTableFilterOptionValue, type ListTableFilterPanelAdapter, type ListTableFilterState, type ListTableFilterType, type ListTableFilterValue$1 as ListTableFilterValue, type ListTableFixedPopupAdapter, type ListTableFormItemProps, type ListTableFormItemPropsConfig, type ListTableFormRule, type ListTableFormRules, type ListTableGroupingOptions, type ListTableHeaderContextMenuAdapter, type ListTableHighlightMode, type ListTableHorizontalAlign, type ListTableIconCellContent, type ListTableImageCellContent, type ListTableImageObjectFit, type ListTableImagePreviewRequest, type ListTableLoadingAdapter, type ListTableLoadingRequest, type ListTableMergeCellOptions, type ListTableNestedTableCellContent, type ListTableNestedTableColumn, type ListTableOptions, type ListTablePaginationAdapter, type ListTablePaginationOptions, type ListTablePerformanceMetric, type ListTableProgressCellContent, type ListTableProgressShape, type ListTableProgressSize, type ListTableQrCodeCellContent, type ListTableQrCodeLevel, type ListTableQueryChange, type ListTableQueryChangeExtra, type ListTableQueryFilters, type ListTableQueryOptions, type ListTableQueryPagination, type ListTableQuerySorter, type ListTableRateCellContent, type ListTableRateSize, type ListTableRowDragMode, type ListTableRowDragOptions, type ListTableRowDragPayload, type ListTableRowDragSourceInfo, type ListTableRowDragZone, type ListTableRowEventProps, type ListTableRowSelectionChangeInfo, type ListTableRowSelectionOptions, type ListTableRowSelectorOptions, type ListTableScrollToOptions, type ListTableScrollbarOptions, type ListTableSearchRequest, type ListTableSelectionState, type ListTableSortItem, type ListTableSortState, type ListTableSparklineChartCellContent, type ListTableSparklineSize, type ListTableSummaryConfig, type ListTableSummaryRoundingMode, type ListTableSummaryType, type ListTableSymbolType, type ListTableTagCellContent, type ListTableTheme, type ListTableTooltipAdapter, type ListTableTooltipRequest, type ListTableUiOptions, type ListTableValidationError, type ListTableValidationErrorField, type ListTableValidationFailure, type ListTableValidationTarget, type PaginationConfig, type RenderCellDescriptor };
|
|
1875
|
+
export { type CreateCellEditorSessionParams, type DebugHitTestResult, type FilterPanelConfig, type FilterPanelOptionItem, type FilterPanelTexts, type FixedPopupConfig, type HeaderContextMenuColumnItem, type HeaderContextMenuConfig, type HeaderContextMenuDensity, ListTable, type ListTableAutoMergeRule, type ListTableBarcodeCellContent, type ListTableBarcodeFormat, type ListTableButtonCellContent, type ListTableButtonPopconfirmOptions, type ListTableButtonSize, type ListTableButtonType, type ListTableCarouselScrollOptions, type ListTableCellContent, type ListTableCellContentClickContext, type ListTableCellEditorSession, type ListTableCellSpan, type ListTableCellStyle, type ListTableChartCellContent, type ListTableChartSize, type ListTableChartType, type ListTableColorCellContent, type ListTableColumn, type ListTableContextMenuFeature, type ListTableContextMenuOptions, type ListTableCustomChartCellContent, type ListTableDangerConfirmRequest, type ListTableDataFormat, type ListTableDataFormatOptions, type ListTableDataFormatType, type ListTableDebugOptions, type ListTableDebugSnapshot, type ListTableDensity, type ListTableEditAutoCompleteEnter, type ListTableEditFilterOption, type ListTableEditOption, type ListTableEditValueType, type ListTableEditable, type ListTableEditorAutoCompleteEnter, type ListTableEditorConfig, type ListTableEditorFactory, type ListTableEditorFilterOption, type ListTableEditorNavigateDirection, type ListTableEditorOption, type ListTableEditorRect, type ListTableEditorRequest, type ListTableEditorTheme, type ListTableEditorValueType, type ListTableExportXlsxOptions, type ListTableFilterCondition$1 as ListTableFilterCondition, type ListTableFilterConditionOperator, type ListTableFilterConditionRelation, type ListTableFilterMatchMode, type ListTableFilterOption, type ListTableFilterOptionValue, type ListTableFilterPanelAdapter, type ListTableFilterState, type ListTableFilterType, type ListTableFilterValue$1 as ListTableFilterValue, type ListTableFixedPopupAdapter, type ListTableFormItemProps, type ListTableFormItemPropsConfig, type ListTableFormRule, type ListTableFormRules, type ListTableGroupingOptions, type ListTableHeaderContextMenuAdapter, type ListTableHighlightMode, type ListTableHorizontalAlign, type ListTableIconCellContent, type ListTableImageCellContent, type ListTableImageObjectFit, type ListTableImagePreviewRequest, type ListTableLoadingAdapter, type ListTableLoadingRequest, type ListTableMergeCellOptions, type ListTableNestedTableCellContent, type ListTableNestedTableColumn, type ListTableOptions, type ListTablePaginationAdapter, type ListTablePaginationOptions, type ListTablePerformanceMetric, type ListTableProgressCellContent, type ListTableProgressShape, type ListTableProgressSize, type ListTableQrCodeCellContent, type ListTableQrCodeLevel, type ListTableQueryChange, type ListTableQueryChangeExtra, type ListTableQueryFilters, type ListTableQueryOptions, type ListTableQueryPagination, type ListTableQuerySorter, type ListTableRateCellContent, type ListTableRateSize, type ListTableRateSymbolType, type ListTableRowDragMode, type ListTableRowDragOptions, type ListTableRowDragPayload, type ListTableRowDragSourceInfo, type ListTableRowDragZone, type ListTableRowEventProps, type ListTableRowSelectionChangeInfo, type ListTableRowSelectionOptions, type ListTableRowSelectorOptions, type ListTableScrollToOptions, type ListTableScrollbarOptions, type ListTableSearchRequest, type ListTableSelectionState, type ListTableSortItem, type ListTableSortState, type ListTableSparklineChartCellContent, type ListTableSparklineSize, type ListTableSummaryConfig, type ListTableSummaryRoundingMode, type ListTableSummaryType, type ListTableSymbolType, type ListTableTagCellContent, type ListTableTheme, type ListTableTooltipAdapter, type ListTableTooltipRequest, type ListTableUiOptions, type ListTableValidationError, type ListTableValidationErrorField, type ListTableValidationFailure, type ListTableValidationTarget, type PaginationConfig, type RenderCellDescriptor };
|
package/dist/index.js
CHANGED
|
@@ -3926,11 +3926,25 @@ function drawImagePlaceholder(ctx, x, y, width, height, backgroundColor = PLACEH
|
|
|
3926
3926
|
var SYMBOL_COLOR_MAP = {
|
|
3927
3927
|
star: "#fadb14",
|
|
3928
3928
|
sun: "#faad14",
|
|
3929
|
-
moon: "#597ef7"
|
|
3929
|
+
moon: "#597ef7",
|
|
3930
|
+
check: "#52c41a",
|
|
3931
|
+
close: "#ff4d4f"
|
|
3930
3932
|
};
|
|
3931
3933
|
function drawCellSymbol(ctx, params) {
|
|
3932
3934
|
const { type, x, y, size, activeColor, inactiveColor } = params;
|
|
3933
3935
|
const fillRatio = Math.min(Math.max(params.fillRatio, 0), 1);
|
|
3936
|
+
if (type === "check" || type === "close") {
|
|
3937
|
+
drawStatusSymbol(ctx, {
|
|
3938
|
+
type,
|
|
3939
|
+
x,
|
|
3940
|
+
y,
|
|
3941
|
+
size,
|
|
3942
|
+
activeColor,
|
|
3943
|
+
inactiveColor,
|
|
3944
|
+
fillRatio
|
|
3945
|
+
});
|
|
3946
|
+
return;
|
|
3947
|
+
}
|
|
3934
3948
|
appendCellSymbolPath(ctx, type, x, y, size);
|
|
3935
3949
|
ctx.fillStyle = inactiveColor;
|
|
3936
3950
|
ctx.fill("evenodd");
|
|
@@ -3948,6 +3962,10 @@ function resolveCellSymbolColor(type) {
|
|
|
3948
3962
|
return SYMBOL_COLOR_MAP[type];
|
|
3949
3963
|
}
|
|
3950
3964
|
function appendCellSymbolPath(ctx, type, x, y, size) {
|
|
3965
|
+
if (type === "check" || type === "close") {
|
|
3966
|
+
appendStatusSymbolPath(ctx, type, x, y, size);
|
|
3967
|
+
return;
|
|
3968
|
+
}
|
|
3951
3969
|
if (type === "moon") {
|
|
3952
3970
|
appendMoonPath(ctx, x, y, size);
|
|
3953
3971
|
return;
|
|
@@ -3968,6 +3986,38 @@ function appendCellSymbolPath(ctx, type, x, y, size) {
|
|
|
3968
3986
|
}
|
|
3969
3987
|
ctx.closePath();
|
|
3970
3988
|
}
|
|
3989
|
+
function drawStatusSymbol(ctx, params) {
|
|
3990
|
+
const { type, x, y, size, activeColor, inactiveColor, fillRatio } = params;
|
|
3991
|
+
ctx.save();
|
|
3992
|
+
ctx.lineCap = "round";
|
|
3993
|
+
ctx.lineJoin = "round";
|
|
3994
|
+
ctx.lineWidth = Math.max(size * 0.12, 1.5);
|
|
3995
|
+
appendStatusSymbolPath(ctx, type, x, y, size);
|
|
3996
|
+
ctx.strokeStyle = inactiveColor;
|
|
3997
|
+
ctx.stroke();
|
|
3998
|
+
if (fillRatio > 0) {
|
|
3999
|
+
ctx.beginPath();
|
|
4000
|
+
ctx.rect(x, y, size * fillRatio, size);
|
|
4001
|
+
ctx.clip();
|
|
4002
|
+
appendStatusSymbolPath(ctx, type, x, y, size);
|
|
4003
|
+
ctx.strokeStyle = activeColor;
|
|
4004
|
+
ctx.stroke();
|
|
4005
|
+
}
|
|
4006
|
+
ctx.restore();
|
|
4007
|
+
}
|
|
4008
|
+
function appendStatusSymbolPath(ctx, type, x, y, size) {
|
|
4009
|
+
ctx.beginPath();
|
|
4010
|
+
if (type === "check") {
|
|
4011
|
+
ctx.moveTo(x + size * 0.16, y + size * 0.52);
|
|
4012
|
+
ctx.lineTo(x + size * 0.4, y + size * 0.76);
|
|
4013
|
+
ctx.lineTo(x + size * 0.84, y + size * 0.26);
|
|
4014
|
+
return;
|
|
4015
|
+
}
|
|
4016
|
+
ctx.moveTo(x + size * 0.22, y + size * 0.22);
|
|
4017
|
+
ctx.lineTo(x + size * 0.78, y + size * 0.78);
|
|
4018
|
+
ctx.moveTo(x + size * 0.78, y + size * 0.22);
|
|
4019
|
+
ctx.lineTo(x + size * 0.22, y + size * 0.78);
|
|
4020
|
+
}
|
|
3971
4021
|
function appendMoonPath(ctx, x, y, size) {
|
|
3972
4022
|
ctx.beginPath();
|
|
3973
4023
|
ctx.moveTo(x + size * 0.64, y + size * 0.04);
|
|
@@ -6237,6 +6287,7 @@ function resolveColumnFormItemProps(column, context) {
|
|
|
6237
6287
|
// src/rendering/cell-content/cell-content-renderer.ts
|
|
6238
6288
|
var CONTENT_HORIZONTAL_PADDING = 12;
|
|
6239
6289
|
var CONTENT_GAP = 8;
|
|
6290
|
+
var LINK_CONTENT_GAP = 4;
|
|
6240
6291
|
var CONTENT_VERTICAL_PADDING = 6;
|
|
6241
6292
|
function resolveBodyCellContents(params) {
|
|
6242
6293
|
return resolveRawBodyCellContents(params).filter(
|
|
@@ -6671,8 +6722,8 @@ function drawBodyCellContents(params) {
|
|
|
6671
6722
|
align: column.align
|
|
6672
6723
|
});
|
|
6673
6724
|
line.items.forEach((item, itemIndex) => {
|
|
6674
|
-
if (itemIndex > 0
|
|
6675
|
-
cursorX +=
|
|
6725
|
+
if (itemIndex > 0) {
|
|
6726
|
+
cursorX += item.gapBefore;
|
|
6676
6727
|
}
|
|
6677
6728
|
const itemDescriptors = [];
|
|
6678
6729
|
drawExpandedBodyContent({
|
|
@@ -6767,7 +6818,7 @@ function measureBodyCellContentsWidth(params) {
|
|
|
6767
6818
|
currentLineWidth = 0;
|
|
6768
6819
|
return;
|
|
6769
6820
|
}
|
|
6770
|
-
const gapWidth = currentLineWidth > 0
|
|
6821
|
+
const gapWidth = currentLineWidth > 0 ? item.gapBefore : 0;
|
|
6771
6822
|
currentLineWidth += gapWidth + contentWidth;
|
|
6772
6823
|
});
|
|
6773
6824
|
return Math.ceil(
|
|
@@ -6798,10 +6849,11 @@ function expandBodyContents(contents) {
|
|
|
6798
6849
|
const textOnly = contents.every((content) => content.type === "text");
|
|
6799
6850
|
const expanded = [];
|
|
6800
6851
|
contents.forEach((content, contentIndex) => {
|
|
6852
|
+
const previousContent = contents[contentIndex - 1];
|
|
6801
6853
|
expanded.push({
|
|
6802
6854
|
content,
|
|
6803
6855
|
contentIndex,
|
|
6804
|
-
gapBefore: expanded.length
|
|
6856
|
+
gapBefore: expanded.length === 0 || textOnly ? 0 : previousContent?.type === "link" && content.type === "link" ? LINK_CONTENT_GAP : CONTENT_GAP
|
|
6805
6857
|
});
|
|
6806
6858
|
if ((content.type === "checkbox" || content.type === "radio") && content.label) {
|
|
6807
6859
|
const textLabelContent = {
|
|
@@ -6814,7 +6866,7 @@ function expandBodyContents(contents) {
|
|
|
6814
6866
|
expanded.push({
|
|
6815
6867
|
content: textLabelContent,
|
|
6816
6868
|
contentIndex,
|
|
6817
|
-
gapBefore:
|
|
6869
|
+
gapBefore: CONTENT_GAP
|
|
6818
6870
|
});
|
|
6819
6871
|
}
|
|
6820
6872
|
});
|
|
@@ -6855,7 +6907,7 @@ function buildSingleLineLayout(ctx, contents, availableWidth, theme) {
|
|
|
6855
6907
|
}
|
|
6856
6908
|
break;
|
|
6857
6909
|
}
|
|
6858
|
-
const gapWidth = line.items.length > 0
|
|
6910
|
+
const gapWidth = line.items.length > 0 ? item.gapBefore : 0;
|
|
6859
6911
|
const remainingWidth = availableWidth - line.width - gapWidth;
|
|
6860
6912
|
if (remainingWidth <= 0) {
|
|
6861
6913
|
truncated = true;
|
|
@@ -6923,7 +6975,7 @@ function buildWrappedLineLayout(ctx, contents, availableWidth, maxLines, theme)
|
|
|
6923
6975
|
items: [
|
|
6924
6976
|
{
|
|
6925
6977
|
...currentItem,
|
|
6926
|
-
gapBefore:
|
|
6978
|
+
gapBefore: 0,
|
|
6927
6979
|
width: fullWidth2
|
|
6928
6980
|
}
|
|
6929
6981
|
],
|
|
@@ -6954,7 +7006,7 @@ function buildWrappedLineLayout(ctx, contents, availableWidth, maxLines, theme)
|
|
|
6954
7006
|
{
|
|
6955
7007
|
...currentItem,
|
|
6956
7008
|
content: fittedContent2,
|
|
6957
|
-
gapBefore:
|
|
7009
|
+
gapBefore: 0,
|
|
6958
7010
|
width: fittedWidth
|
|
6959
7011
|
}
|
|
6960
7012
|
],
|
|
@@ -6976,11 +7028,11 @@ function buildWrappedLineLayout(ctx, contents, availableWidth, maxLines, theme)
|
|
|
6976
7028
|
currentItem = {
|
|
6977
7029
|
...currentItem,
|
|
6978
7030
|
content: setBreakableContentText(currentItem.content, remainingText2),
|
|
6979
|
-
gapBefore:
|
|
7031
|
+
gapBefore: 0
|
|
6980
7032
|
};
|
|
6981
7033
|
continue;
|
|
6982
7034
|
}
|
|
6983
|
-
const gapWidth = currentLine.items.length > 0
|
|
7035
|
+
const gapWidth = currentLine.items.length > 0 ? currentItem.gapBefore : 0;
|
|
6984
7036
|
const remainingWidth = availableWidth - currentLine.width - gapWidth;
|
|
6985
7037
|
if (remainingWidth <= 0) {
|
|
6986
7038
|
if (lines.length + 1 >= maxLines) {
|
|
@@ -6994,7 +7046,7 @@ function buildWrappedLineLayout(ctx, contents, availableWidth, maxLines, theme)
|
|
|
6994
7046
|
currentLine = { items: [], width: 0 };
|
|
6995
7047
|
currentItem = {
|
|
6996
7048
|
...currentItem,
|
|
6997
|
-
gapBefore:
|
|
7049
|
+
gapBefore: 0
|
|
6998
7050
|
};
|
|
6999
7051
|
continue;
|
|
7000
7052
|
}
|
|
@@ -7014,7 +7066,7 @@ function buildWrappedLineLayout(ctx, contents, availableWidth, maxLines, theme)
|
|
|
7014
7066
|
currentLine = { items: [], width: 0 };
|
|
7015
7067
|
currentItem = {
|
|
7016
7068
|
...currentItem,
|
|
7017
|
-
gapBefore:
|
|
7069
|
+
gapBefore: 0
|
|
7018
7070
|
};
|
|
7019
7071
|
continue;
|
|
7020
7072
|
}
|
|
@@ -7054,7 +7106,7 @@ function buildWrappedLineLayout(ctx, contents, availableWidth, maxLines, theme)
|
|
|
7054
7106
|
currentLine = { items: [], width: 0 };
|
|
7055
7107
|
currentItem = {
|
|
7056
7108
|
...currentItem,
|
|
7057
|
-
gapBefore:
|
|
7109
|
+
gapBefore: 0
|
|
7058
7110
|
};
|
|
7059
7111
|
continue;
|
|
7060
7112
|
}
|
|
@@ -7082,7 +7134,7 @@ function buildWrappedLineLayout(ctx, contents, availableWidth, maxLines, theme)
|
|
|
7082
7134
|
currentItem = {
|
|
7083
7135
|
...currentItem,
|
|
7084
7136
|
content: setBreakableContentText(currentItem.content, remainingText),
|
|
7085
|
-
gapBefore:
|
|
7137
|
+
gapBefore: 0
|
|
7086
7138
|
};
|
|
7087
7139
|
}
|
|
7088
7140
|
if (truncated) {
|
|
@@ -7595,10 +7647,10 @@ function applyTrailingEllipsis(ctx, line, theme, availableWidth) {
|
|
|
7595
7647
|
continue;
|
|
7596
7648
|
}
|
|
7597
7649
|
const widthBefore = line.items.slice(0, index).reduce((sum, current, currentIndex) => {
|
|
7598
|
-
const gapWidth2 = currentIndex > 0
|
|
7650
|
+
const gapWidth2 = currentIndex > 0 ? current.gapBefore : 0;
|
|
7599
7651
|
return sum + gapWidth2 + current.width;
|
|
7600
7652
|
}, 0);
|
|
7601
|
-
const gapWidth = index > 0
|
|
7653
|
+
const gapWidth = index > 0 ? item.gapBefore : 0;
|
|
7602
7654
|
const nextContent = truncateExpandedContent(
|
|
7603
7655
|
ctx,
|
|
7604
7656
|
item.content,
|
|
@@ -20125,7 +20177,7 @@ function buildListTableRenderSnapshot(params) {
|
|
|
20125
20177
|
options.scrollbar?.thickness ?? DEFAULT_SCROLLBAR_THICKNESS,
|
|
20126
20178
|
6
|
|
20127
20179
|
);
|
|
20128
|
-
let width = hostWidth;
|
|
20180
|
+
let width = Math.max(hostWidth - scrollbarThickness, 0);
|
|
20129
20181
|
let height = hostHeight;
|
|
20130
20182
|
const sourceNormalizedColumns = normalizeColumns(
|
|
20131
20183
|
getResolvedColumns(options, selectedRowKeys)
|
|
@@ -20400,54 +20452,6 @@ function buildListTableRenderSnapshot(params) {
|
|
|
20400
20452
|
fixedWidthRight: columnMetrics.fixedWidthRight,
|
|
20401
20453
|
scroll
|
|
20402
20454
|
});
|
|
20403
|
-
for (let index = 0; index < 2 && scrollbarThickness > 0; index += 1) {
|
|
20404
|
-
const nextWidth = Math.max(
|
|
20405
|
-
hostWidth - (viewportResult.viewport.maxScrollTop > 0 ? scrollbarThickness : 0),
|
|
20406
|
-
0
|
|
20407
|
-
);
|
|
20408
|
-
const nextHeight = Math.max(
|
|
20409
|
-
hostHeight - (viewportResult.viewport.maxScrollLeft > 0 ? scrollbarThickness : 0),
|
|
20410
|
-
0
|
|
20411
|
-
);
|
|
20412
|
-
if (nextWidth === width && nextHeight === height) {
|
|
20413
|
-
break;
|
|
20414
|
-
}
|
|
20415
|
-
width = nextWidth;
|
|
20416
|
-
height = nextHeight;
|
|
20417
|
-
bodyState = resolveCurrentBodyState();
|
|
20418
|
-
if (plainRowWindow) {
|
|
20419
|
-
bodyState.frozenRows.scroll.windowed = true;
|
|
20420
|
-
bodyState.frozenRows.scroll.dataRowIndexAligned = true;
|
|
20421
|
-
bodyState.frozenRows.scroll.rowIndexMap = plainRowWindow.rowIndexMap;
|
|
20422
|
-
bodyState.frozenRows.scroll.rowOffsetMap = plainRowWindow.rowOffsetMap;
|
|
20423
|
-
bodyState.bodyLayout = resolveBodyLayout({
|
|
20424
|
-
height,
|
|
20425
|
-
headerHeight,
|
|
20426
|
-
summaryRowHeight,
|
|
20427
|
-
hasSummary,
|
|
20428
|
-
rowHeight,
|
|
20429
|
-
totalBodyHeight: plainRowWindow.totalBodyHeight,
|
|
20430
|
-
topFrozenRowCount: 0,
|
|
20431
|
-
bottomFrozenRowCount: 0,
|
|
20432
|
-
scrollRowCount: plainRowWindow.totalRowCount
|
|
20433
|
-
});
|
|
20434
|
-
}
|
|
20435
|
-
columnMetrics = resolveColumnMetrics({
|
|
20436
|
-
columns: leafColumns,
|
|
20437
|
-
tableWidth: width
|
|
20438
|
-
});
|
|
20439
|
-
viewportResult = computeViewport({
|
|
20440
|
-
width,
|
|
20441
|
-
height,
|
|
20442
|
-
headerHeight,
|
|
20443
|
-
bodyHeight: bodyState.bodyLayout.scrollBodyHeight,
|
|
20444
|
-
totalWidth: columnMetrics.totalWidth,
|
|
20445
|
-
totalBodyHeight: bodyState.bodyLayout.totalBodyHeight,
|
|
20446
|
-
fixedWidthLeft: columnMetrics.fixedWidthLeft,
|
|
20447
|
-
fixedWidthRight: columnMetrics.fixedWidthRight,
|
|
20448
|
-
scroll
|
|
20449
|
-
});
|
|
20450
|
-
}
|
|
20451
20455
|
scrollPageSize = resolveScrollPageSize({
|
|
20452
20456
|
options,
|
|
20453
20457
|
pageSize: query.pagination.pageSize,
|