@canvas-components/react-list-table 0.3.53 → 0.3.56
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 +23 -0
- package/dist/index.cjs +69 -957
- package/dist/index.d.cts +7 -61
- package/dist/index.d.ts +7 -61
- package/dist/index.js +71 -961
- package/dist/print-integration.cjs +30 -0
- package/dist/print-integration.d.cts +76 -0
- package/dist/print-integration.d.ts +76 -0
- package/dist/print-integration.js +26 -0
- package/dist/print-settings.cjs +2 -0
- package/dist/print-settings.d.cts +69 -0
- package/dist/print-settings.d.ts +69 -0
- package/dist/print-settings.js +1 -0
- package/package.json +31 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,68 +1,14 @@
|
|
|
1
1
|
import * as _canvas_components_list_table from '@canvas-components/list-table';
|
|
2
|
-
import {
|
|
2
|
+
import { ListTableOptions, ListTableQueryChange, ListTableExportXlsxOptions, ListTableExternalValidationError, ListTableValidationErrorTarget, ListTableScrollToOptions, ListTable, ListTableColumn, ListTablePaginationOptions, ListTableQueryOptions, ListTableRowSelectionOptions, EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN, ListTableExportNameRequest, ListTableExportSummarySettings } from '@canvas-components/list-table';
|
|
3
3
|
export { EXPAND_COLUMN, ListTableCSSProperties, ListTableCacheCategory, ListTableCachePreferences, ListTableConditionalFormatCondition, ListTableConditionalFormatRule, ListTableConditionalOperator, ListTableExternalValidationError, ListTablePaginationCSSProperties, ListTablePaginationStyleSlot, ListTablePaginationStyles, ListTableScrollbarCSSProperties, ListTableSorter, ListTableStyles, ListTableValidationErrorTarget, ROW_SELECTION_COLUMN, SELECTION_COLUMN, getListTableStoredPageSize } from '@canvas-components/list-table';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { CSSProperties, ReactNode, ForwardedRef, PropsWithChildren } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { ReactListTablePrintPreset } from './print-settings.cjs';
|
|
7
|
+
export { ReactListTablePrintColumnConfig, ReactListTablePrintConfig } from './print-settings.cjs';
|
|
7
8
|
import { PrintDesignDocument } from '@canvas-components/print-design';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
showTypePrefix?: "yes" | "no";
|
|
12
|
-
precision?: number;
|
|
13
|
-
roundingMode?: ListTableExportSummarySettings["roundingMode"];
|
|
14
|
-
preserveTrailingZeros?: "yes" | "no";
|
|
15
|
-
summaryTitle?: string;
|
|
16
|
-
}
|
|
17
|
-
interface PrintSettings {
|
|
18
|
-
version: 2;
|
|
19
|
-
presetName?: string;
|
|
20
|
-
title?: string;
|
|
21
|
-
subtitle?: string;
|
|
22
|
-
titleFontSize?: number;
|
|
23
|
-
subtitleFontSize?: number;
|
|
24
|
-
columns: PrintColumn[];
|
|
25
|
-
selectedKeys: string[];
|
|
26
|
-
rowsPerPage: number;
|
|
27
|
-
rowHeight?: number;
|
|
28
|
-
autoCalculateRowsPerPage?: boolean;
|
|
29
|
-
autoCalculateColumnWidths?: boolean;
|
|
30
|
-
includeSummary?: boolean;
|
|
31
|
-
summaryPosition?: "every-page" | "last-page";
|
|
32
|
-
showPageNumbers?: boolean;
|
|
33
|
-
pageNumberPosition?: "left" | "center" | "right";
|
|
34
|
-
showPrintTime?: boolean;
|
|
35
|
-
printTimePosition?: "left" | "center" | "right";
|
|
36
|
-
pageMargins?: {
|
|
37
|
-
top: number;
|
|
38
|
-
right: number;
|
|
39
|
-
bottom: number;
|
|
40
|
-
left: number;
|
|
41
|
-
};
|
|
42
|
-
paperSize?: BrowserPrintPaperSize;
|
|
43
|
-
orientation?: "portrait" | "landscape";
|
|
44
|
-
useCellBorders?: boolean;
|
|
45
|
-
borderColor?: string;
|
|
46
|
-
textColor?: string;
|
|
47
|
-
headerBackgroundColor?: string;
|
|
48
|
-
summaryBackgroundColor?: string;
|
|
49
|
-
showSectionDividers?: boolean;
|
|
50
|
-
sectionDividerTopSpacing?: number;
|
|
51
|
-
sectionDividerBottomSpacing?: number;
|
|
52
|
-
formItemSpacing?: number;
|
|
53
|
-
}
|
|
54
|
-
/** 打印列预设只需指定列键;宽度、对齐和超宽处理均可选。 */
|
|
55
|
-
type ReactListTablePrintColumnConfig = Pick<BrowserPrintColumn, "key"> & Partial<Omit<PrintColumn, "key">>;
|
|
56
|
-
/** 打印预设的可配置项;未提供的字段使用打印默认值。 */
|
|
57
|
-
type ReactListTablePrintConfig = Partial<Omit<PrintSettings, "version" | "presetName" | "columns" | "selectedKeys">> & {
|
|
58
|
-
columns?: readonly ReactListTablePrintColumnConfig[];
|
|
59
|
-
selectedKeys?: readonly string[];
|
|
60
|
-
};
|
|
61
|
-
/** 供 ReactListTable 打印弹窗选择的命名预设。名称应保持唯一。 */
|
|
62
|
-
interface ReactListTablePrintPreset {
|
|
63
|
-
name: string;
|
|
64
|
-
config: ReactListTablePrintConfig;
|
|
65
|
-
}
|
|
9
|
+
export { ReactListTableHostMenu, ReactListTablePrintHostProps, ReactListTablePrintIntegration, ReactListTablePrintMenuContext, ReactListTablePrintProvider, defineReactListTablePrintIntegration } from './print-integration.cjs';
|
|
10
|
+
import '@canvas-components/print';
|
|
11
|
+
import '@canvas-components/react-print-design';
|
|
66
12
|
|
|
67
13
|
interface ReactListTableScrollConfig {
|
|
68
14
|
x?: number | string | true;
|
|
@@ -203,4 +149,4 @@ interface ReactListTableDebugProviderProps extends PropsWithChildren {
|
|
|
203
149
|
*/
|
|
204
150
|
declare function ReactListTableDebugProvider(props: ReactListTableDebugProviderProps): react.JSX.Element;
|
|
205
151
|
|
|
206
|
-
export { ReactListTable, type ReactListTableColumnType, type ReactListTableColumnsType, ReactListTableDebugProvider, type ReactListTableDebugProviderProps, ReactListTableExportNameDialog, type ReactListTableLocale, type ReactListTablePagination,
|
|
152
|
+
export { ReactListTable, type ReactListTableColumnType, type ReactListTableColumnsType, ReactListTableDebugProvider, type ReactListTableDebugProviderProps, ReactListTableExportNameDialog, type ReactListTableLocale, type ReactListTablePagination, ReactListTablePrintPreset, type ReactListTableProps, type ReactListTableQuery, type ReactListTableRef, type ReactListTableRowSelection, type ReactListTableScrollConfig, type ReactListTableTableProps, type ReactListTableToolbarOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,68 +1,14 @@
|
|
|
1
1
|
import * as _canvas_components_list_table from '@canvas-components/list-table';
|
|
2
|
-
import {
|
|
2
|
+
import { ListTableOptions, ListTableQueryChange, ListTableExportXlsxOptions, ListTableExternalValidationError, ListTableValidationErrorTarget, ListTableScrollToOptions, ListTable, ListTableColumn, ListTablePaginationOptions, ListTableQueryOptions, ListTableRowSelectionOptions, EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN, ListTableExportNameRequest, ListTableExportSummarySettings } from '@canvas-components/list-table';
|
|
3
3
|
export { EXPAND_COLUMN, ListTableCSSProperties, ListTableCacheCategory, ListTableCachePreferences, ListTableConditionalFormatCondition, ListTableConditionalFormatRule, ListTableConditionalOperator, ListTableExternalValidationError, ListTablePaginationCSSProperties, ListTablePaginationStyleSlot, ListTablePaginationStyles, ListTableScrollbarCSSProperties, ListTableSorter, ListTableStyles, ListTableValidationErrorTarget, ROW_SELECTION_COLUMN, SELECTION_COLUMN, getListTableStoredPageSize } from '@canvas-components/list-table';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { CSSProperties, ReactNode, ForwardedRef, PropsWithChildren } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { ReactListTablePrintPreset } from './print-settings.js';
|
|
7
|
+
export { ReactListTablePrintColumnConfig, ReactListTablePrintConfig } from './print-settings.js';
|
|
7
8
|
import { PrintDesignDocument } from '@canvas-components/print-design';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
showTypePrefix?: "yes" | "no";
|
|
12
|
-
precision?: number;
|
|
13
|
-
roundingMode?: ListTableExportSummarySettings["roundingMode"];
|
|
14
|
-
preserveTrailingZeros?: "yes" | "no";
|
|
15
|
-
summaryTitle?: string;
|
|
16
|
-
}
|
|
17
|
-
interface PrintSettings {
|
|
18
|
-
version: 2;
|
|
19
|
-
presetName?: string;
|
|
20
|
-
title?: string;
|
|
21
|
-
subtitle?: string;
|
|
22
|
-
titleFontSize?: number;
|
|
23
|
-
subtitleFontSize?: number;
|
|
24
|
-
columns: PrintColumn[];
|
|
25
|
-
selectedKeys: string[];
|
|
26
|
-
rowsPerPage: number;
|
|
27
|
-
rowHeight?: number;
|
|
28
|
-
autoCalculateRowsPerPage?: boolean;
|
|
29
|
-
autoCalculateColumnWidths?: boolean;
|
|
30
|
-
includeSummary?: boolean;
|
|
31
|
-
summaryPosition?: "every-page" | "last-page";
|
|
32
|
-
showPageNumbers?: boolean;
|
|
33
|
-
pageNumberPosition?: "left" | "center" | "right";
|
|
34
|
-
showPrintTime?: boolean;
|
|
35
|
-
printTimePosition?: "left" | "center" | "right";
|
|
36
|
-
pageMargins?: {
|
|
37
|
-
top: number;
|
|
38
|
-
right: number;
|
|
39
|
-
bottom: number;
|
|
40
|
-
left: number;
|
|
41
|
-
};
|
|
42
|
-
paperSize?: BrowserPrintPaperSize;
|
|
43
|
-
orientation?: "portrait" | "landscape";
|
|
44
|
-
useCellBorders?: boolean;
|
|
45
|
-
borderColor?: string;
|
|
46
|
-
textColor?: string;
|
|
47
|
-
headerBackgroundColor?: string;
|
|
48
|
-
summaryBackgroundColor?: string;
|
|
49
|
-
showSectionDividers?: boolean;
|
|
50
|
-
sectionDividerTopSpacing?: number;
|
|
51
|
-
sectionDividerBottomSpacing?: number;
|
|
52
|
-
formItemSpacing?: number;
|
|
53
|
-
}
|
|
54
|
-
/** 打印列预设只需指定列键;宽度、对齐和超宽处理均可选。 */
|
|
55
|
-
type ReactListTablePrintColumnConfig = Pick<BrowserPrintColumn, "key"> & Partial<Omit<PrintColumn, "key">>;
|
|
56
|
-
/** 打印预设的可配置项;未提供的字段使用打印默认值。 */
|
|
57
|
-
type ReactListTablePrintConfig = Partial<Omit<PrintSettings, "version" | "presetName" | "columns" | "selectedKeys">> & {
|
|
58
|
-
columns?: readonly ReactListTablePrintColumnConfig[];
|
|
59
|
-
selectedKeys?: readonly string[];
|
|
60
|
-
};
|
|
61
|
-
/** 供 ReactListTable 打印弹窗选择的命名预设。名称应保持唯一。 */
|
|
62
|
-
interface ReactListTablePrintPreset {
|
|
63
|
-
name: string;
|
|
64
|
-
config: ReactListTablePrintConfig;
|
|
65
|
-
}
|
|
9
|
+
export { ReactListTableHostMenu, ReactListTablePrintHostProps, ReactListTablePrintIntegration, ReactListTablePrintMenuContext, ReactListTablePrintProvider, defineReactListTablePrintIntegration } from './print-integration.js';
|
|
10
|
+
import '@canvas-components/print';
|
|
11
|
+
import '@canvas-components/react-print-design';
|
|
66
12
|
|
|
67
13
|
interface ReactListTableScrollConfig {
|
|
68
14
|
x?: number | string | true;
|
|
@@ -203,4 +149,4 @@ interface ReactListTableDebugProviderProps extends PropsWithChildren {
|
|
|
203
149
|
*/
|
|
204
150
|
declare function ReactListTableDebugProvider(props: ReactListTableDebugProviderProps): react.JSX.Element;
|
|
205
151
|
|
|
206
|
-
export { ReactListTable, type ReactListTableColumnType, type ReactListTableColumnsType, ReactListTableDebugProvider, type ReactListTableDebugProviderProps, ReactListTableExportNameDialog, type ReactListTableLocale, type ReactListTablePagination,
|
|
152
|
+
export { ReactListTable, type ReactListTableColumnType, type ReactListTableColumnsType, ReactListTableDebugProvider, type ReactListTableDebugProviderProps, ReactListTableExportNameDialog, type ReactListTableLocale, type ReactListTablePagination, ReactListTablePrintPreset, type ReactListTableProps, type ReactListTableQuery, type ReactListTableRef, type ReactListTableRowSelection, type ReactListTableScrollConfig, type ReactListTableTableProps, type ReactListTableToolbarOptions };
|