@canvas-components/react-list-table 0.3.45 → 0.3.46

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/dist/index.d.cts CHANGED
@@ -1,9 +1,10 @@
1
1
  import * as _canvas_components_list_table from '@canvas-components/list-table';
2
- import { ListTableExportSummarySettings, ListTableOptions, ListTableQueryChange, ListTableExportXlsxOptions, ListTableScrollToOptions, ListTable, ListTableColumn, ListTablePaginationOptions, ListTableQueryOptions, ListTableRowSelectionOptions, EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN, ListTableExportNameRequest } from '@canvas-components/list-table';
3
- export { EXPAND_COLUMN, ListTableCSSProperties, ListTableCacheCategory, ListTableCachePreferences, ListTableConditionalFormatCondition, ListTableConditionalFormatRule, ListTableConditionalOperator, ListTablePaginationCSSProperties, ListTablePaginationStyleSlot, ListTablePaginationStyles, ListTableScrollbarCSSProperties, ListTableSorter, ListTableStyles, ROW_SELECTION_COLUMN, SELECTION_COLUMN, getListTableStoredPageSize } from '@canvas-components/list-table';
2
+ import { ListTableExportSummarySettings, ListTableOptions, ListTableQueryChange, ListTableExportXlsxOptions, ListTableExternalValidationError, ListTableValidationErrorTarget, ListTableScrollToOptions, ListTable, ListTableColumn, ListTablePaginationOptions, ListTableQueryOptions, ListTableRowSelectionOptions, EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN, ListTableExportNameRequest } from '@canvas-components/list-table';
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
6
  import { BrowserPrintColumn, BrowserPrintPaperSize } from '@canvas-components/print';
7
+ import { PrintDesignDocument } from '@canvas-components/print-design';
7
8
 
8
9
  interface PrintColumn extends BrowserPrintColumn {
9
10
  summaryType?: ListTableExportSummarySettings["type"];
@@ -83,6 +84,8 @@ interface ReactListTableProps<RecordType = Record<string, unknown>> extends Omit
83
84
  title?: ReactNode;
84
85
  /** 打印配置弹窗中可选择的命名预设。 */
85
86
  printPresets?: readonly ReactListTablePrintPreset[];
87
+ /** 打印设计器中的只读默认模板,可复制为自定义模板。 */
88
+ printTemplates?: readonly PrintDesignDocument[];
86
89
  /** 标题栏右侧工具配置,传入 false 时隐藏整个标题栏工具区。 */
87
90
  toolbar?: false | ReactListTableToolbarOptions;
88
91
  }
@@ -112,6 +115,8 @@ interface ReactListTableToolbarOptions {
112
115
  */
113
116
  interface ReactListTableRef<RecordType = Record<string, unknown>> {
114
117
  validate: () => Promise<RecordType[]>;
118
+ setValidationErrors: (errors: ListTableExternalValidationError[]) => void;
119
+ clearValidationErrors: (targets?: ListTableValidationErrorTarget[]) => void;
115
120
  exportXlsx: (options?: ListTableExportXlsxOptions) => void;
116
121
  scrollTo: (options: ListTableScrollToOptions) => void;
117
122
  getDebugSnapshot: () => ReturnType<ListTable<RecordType>["getDebugSnapshot"]>;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import * as _canvas_components_list_table from '@canvas-components/list-table';
2
- import { ListTableExportSummarySettings, ListTableOptions, ListTableQueryChange, ListTableExportXlsxOptions, ListTableScrollToOptions, ListTable, ListTableColumn, ListTablePaginationOptions, ListTableQueryOptions, ListTableRowSelectionOptions, EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN, ListTableExportNameRequest } from '@canvas-components/list-table';
3
- export { EXPAND_COLUMN, ListTableCSSProperties, ListTableCacheCategory, ListTableCachePreferences, ListTableConditionalFormatCondition, ListTableConditionalFormatRule, ListTableConditionalOperator, ListTablePaginationCSSProperties, ListTablePaginationStyleSlot, ListTablePaginationStyles, ListTableScrollbarCSSProperties, ListTableSorter, ListTableStyles, ROW_SELECTION_COLUMN, SELECTION_COLUMN, getListTableStoredPageSize } from '@canvas-components/list-table';
2
+ import { ListTableExportSummarySettings, ListTableOptions, ListTableQueryChange, ListTableExportXlsxOptions, ListTableExternalValidationError, ListTableValidationErrorTarget, ListTableScrollToOptions, ListTable, ListTableColumn, ListTablePaginationOptions, ListTableQueryOptions, ListTableRowSelectionOptions, EXPAND_COLUMN, SELECTION_COLUMN, ROW_SELECTION_COLUMN, ListTableExportNameRequest } from '@canvas-components/list-table';
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
6
  import { BrowserPrintColumn, BrowserPrintPaperSize } from '@canvas-components/print';
7
+ import { PrintDesignDocument } from '@canvas-components/print-design';
7
8
 
8
9
  interface PrintColumn extends BrowserPrintColumn {
9
10
  summaryType?: ListTableExportSummarySettings["type"];
@@ -83,6 +84,8 @@ interface ReactListTableProps<RecordType = Record<string, unknown>> extends Omit
83
84
  title?: ReactNode;
84
85
  /** 打印配置弹窗中可选择的命名预设。 */
85
86
  printPresets?: readonly ReactListTablePrintPreset[];
87
+ /** 打印设计器中的只读默认模板,可复制为自定义模板。 */
88
+ printTemplates?: readonly PrintDesignDocument[];
86
89
  /** 标题栏右侧工具配置,传入 false 时隐藏整个标题栏工具区。 */
87
90
  toolbar?: false | ReactListTableToolbarOptions;
88
91
  }
@@ -112,6 +115,8 @@ interface ReactListTableToolbarOptions {
112
115
  */
113
116
  interface ReactListTableRef<RecordType = Record<string, unknown>> {
114
117
  validate: () => Promise<RecordType[]>;
118
+ setValidationErrors: (errors: ListTableExternalValidationError[]) => void;
119
+ clearValidationErrors: (targets?: ListTableValidationErrorTarget[]) => void;
115
120
  exportXlsx: (options?: ListTableExportXlsxOptions) => void;
116
121
  scrollTo: (options: ListTableScrollToOptions) => void;
117
122
  getDebugSnapshot: () => ReturnType<ListTable<RecordType>["getDebugSnapshot"]>;