@canvas-components/print-design-plugin 0.0.0-stage → 0.1.3

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.
@@ -0,0 +1,121 @@
1
+ import * as _canvas_components_print_design from '@canvas-components/print-design';
2
+ import { P as PrintDesignNativePlugin } from './model-BwhSanYM.cjs';
3
+ import * as _canvas_components_react_print_design from '@canvas-components/react-print-design';
4
+ import * as react from 'react';
5
+ import { ReactListTablePrintHostProps } from '@canvas-components/react-list-table/print-integration';
6
+ import '@canvas-components/barcode';
7
+ import '@canvas-components/qrcode';
8
+
9
+ /** 当前 ListTable 实例提供的打印菜单操作。 */
10
+ interface ListTablePrintMenuContext {
11
+ canPrint: boolean;
12
+ templates: readonly {
13
+ key: string;
14
+ label: string;
15
+ disabled?: boolean;
16
+ }[];
17
+ onPrintTemplate: (key: string) => void;
18
+ onDirectPrint: () => void;
19
+ onPrintDesign: () => void;
20
+ }
21
+ /** 按当前表格的模板与数据读取能力生成打印菜单。 */
22
+ declare function createListTablePrintMenu(context: ListTablePrintMenuContext): {
23
+ label: string;
24
+ items: ({
25
+ key: string;
26
+ label: string;
27
+ disabled: boolean;
28
+ onClick: (() => void) | undefined;
29
+ } | {
30
+ key: string;
31
+ label: string;
32
+ onClick: (() => void) | undefined;
33
+ })[];
34
+ };
35
+
36
+ /** 为每个表格实例隔离打印模板、设计弹窗和直接打印任务。 */
37
+ declare function ListTablePrintHost(props: ReactListTablePrintHostProps): react.JSX.Element;
38
+
39
+ /** 为当前表格生成打印菜单中的默认、预设和已保存模板选项。 */
40
+ declare function createListTablePrintTemplateChoices(options: {
41
+ presets?: readonly {
42
+ name: string;
43
+ }[];
44
+ documents?: readonly {
45
+ name: string;
46
+ }[];
47
+ saved: readonly {
48
+ id: string;
49
+ templateId: string;
50
+ version: number;
51
+ document: {
52
+ name: string;
53
+ };
54
+ }[];
55
+ }): {
56
+ key: string;
57
+ label: string;
58
+ }[];
59
+
60
+ /** 官方 ListTable 宿主集成,由应用注册到 ReactListTablePrintProvider。 */
61
+ declare const builtinListTablePrintIntegration: Readonly<{
62
+ id: "builtin.list-table-print-design";
63
+ version: "0.1.5";
64
+ componentRegistry: _canvas_components_print_design.PrintDesignComponentRegistry;
65
+ editor: Readonly<{
66
+ tools: _canvas_components_react_print_design.PrintDesignToolRegistry;
67
+ pluginCatalog: ({
68
+ id: string;
69
+ kind: "component";
70
+ packageId: string;
71
+ name: string;
72
+ author: string;
73
+ version: string;
74
+ dependencies: readonly {
75
+ id: string;
76
+ minVersion: string;
77
+ }[];
78
+ description: string;
79
+ componentTypes: ("text" | "list" | "dateTime" | "moneyUpper" | "pageNumber" | "watermark" | "shape" | "brush" | "connector" | "divider" | "ruler" | "grid" | "coordinate" | "progress" | "flow" | "clock" | "image" | "barcode" | "qrcode" | "chart" | "table" | "pivotTable" | "gantt" | "generic")[];
80
+ toolIds: never[];
81
+ compatibility: string;
82
+ permissions: string;
83
+ status: "enabled";
84
+ } | {
85
+ id: string;
86
+ kind: "tool";
87
+ packageId: string;
88
+ name: string;
89
+ author: string;
90
+ version: string;
91
+ description: string;
92
+ componentTypes: never[];
93
+ toolIds: string[];
94
+ compatibility: string;
95
+ permissions: string;
96
+ status: "enabled";
97
+ })[];
98
+ componentFactories: _canvas_components_react_print_design.PrintDesignComponentFactoryRegistry;
99
+ componentMenu: {
100
+ id: string;
101
+ title: string;
102
+ items: (_canvas_components_react_print_design.PrintDesignComponentMenuItem & {
103
+ order: number;
104
+ })[];
105
+ }[];
106
+ propertySections: _canvas_components_react_print_design.PrintDesignPropertySectionRegistry;
107
+ contextMenus: {
108
+ [k: string]: _canvas_components_react_print_design.PrintDesignComponentContextMenu;
109
+ };
110
+ id: "builtin.print-design";
111
+ version: "0.1.1";
112
+ components: readonly PrintDesignNativePlugin[];
113
+ componentRegistry: _canvas_components_print_design.PrintDesignComponentRegistry;
114
+ }>;
115
+ createMenu: typeof createListTablePrintMenu;
116
+ readTemplates: typeof _canvas_components_react_print_design.readPrintDesignTemplates;
117
+ createTemplateChoices: typeof createListTablePrintTemplateChoices;
118
+ Host: typeof ListTablePrintHost;
119
+ }>;
120
+
121
+ export { builtinListTablePrintIntegration };
@@ -0,0 +1,121 @@
1
+ import * as _canvas_components_print_design from '@canvas-components/print-design';
2
+ import { P as PrintDesignNativePlugin } from './model-BwhSanYM.js';
3
+ import * as _canvas_components_react_print_design from '@canvas-components/react-print-design';
4
+ import * as react from 'react';
5
+ import { ReactListTablePrintHostProps } from '@canvas-components/react-list-table/print-integration';
6
+ import '@canvas-components/barcode';
7
+ import '@canvas-components/qrcode';
8
+
9
+ /** 当前 ListTable 实例提供的打印菜单操作。 */
10
+ interface ListTablePrintMenuContext {
11
+ canPrint: boolean;
12
+ templates: readonly {
13
+ key: string;
14
+ label: string;
15
+ disabled?: boolean;
16
+ }[];
17
+ onPrintTemplate: (key: string) => void;
18
+ onDirectPrint: () => void;
19
+ onPrintDesign: () => void;
20
+ }
21
+ /** 按当前表格的模板与数据读取能力生成打印菜单。 */
22
+ declare function createListTablePrintMenu(context: ListTablePrintMenuContext): {
23
+ label: string;
24
+ items: ({
25
+ key: string;
26
+ label: string;
27
+ disabled: boolean;
28
+ onClick: (() => void) | undefined;
29
+ } | {
30
+ key: string;
31
+ label: string;
32
+ onClick: (() => void) | undefined;
33
+ })[];
34
+ };
35
+
36
+ /** 为每个表格实例隔离打印模板、设计弹窗和直接打印任务。 */
37
+ declare function ListTablePrintHost(props: ReactListTablePrintHostProps): react.JSX.Element;
38
+
39
+ /** 为当前表格生成打印菜单中的默认、预设和已保存模板选项。 */
40
+ declare function createListTablePrintTemplateChoices(options: {
41
+ presets?: readonly {
42
+ name: string;
43
+ }[];
44
+ documents?: readonly {
45
+ name: string;
46
+ }[];
47
+ saved: readonly {
48
+ id: string;
49
+ templateId: string;
50
+ version: number;
51
+ document: {
52
+ name: string;
53
+ };
54
+ }[];
55
+ }): {
56
+ key: string;
57
+ label: string;
58
+ }[];
59
+
60
+ /** 官方 ListTable 宿主集成,由应用注册到 ReactListTablePrintProvider。 */
61
+ declare const builtinListTablePrintIntegration: Readonly<{
62
+ id: "builtin.list-table-print-design";
63
+ version: "0.1.5";
64
+ componentRegistry: _canvas_components_print_design.PrintDesignComponentRegistry;
65
+ editor: Readonly<{
66
+ tools: _canvas_components_react_print_design.PrintDesignToolRegistry;
67
+ pluginCatalog: ({
68
+ id: string;
69
+ kind: "component";
70
+ packageId: string;
71
+ name: string;
72
+ author: string;
73
+ version: string;
74
+ dependencies: readonly {
75
+ id: string;
76
+ minVersion: string;
77
+ }[];
78
+ description: string;
79
+ componentTypes: ("text" | "list" | "dateTime" | "moneyUpper" | "pageNumber" | "watermark" | "shape" | "brush" | "connector" | "divider" | "ruler" | "grid" | "coordinate" | "progress" | "flow" | "clock" | "image" | "barcode" | "qrcode" | "chart" | "table" | "pivotTable" | "gantt" | "generic")[];
80
+ toolIds: never[];
81
+ compatibility: string;
82
+ permissions: string;
83
+ status: "enabled";
84
+ } | {
85
+ id: string;
86
+ kind: "tool";
87
+ packageId: string;
88
+ name: string;
89
+ author: string;
90
+ version: string;
91
+ description: string;
92
+ componentTypes: never[];
93
+ toolIds: string[];
94
+ compatibility: string;
95
+ permissions: string;
96
+ status: "enabled";
97
+ })[];
98
+ componentFactories: _canvas_components_react_print_design.PrintDesignComponentFactoryRegistry;
99
+ componentMenu: {
100
+ id: string;
101
+ title: string;
102
+ items: (_canvas_components_react_print_design.PrintDesignComponentMenuItem & {
103
+ order: number;
104
+ })[];
105
+ }[];
106
+ propertySections: _canvas_components_react_print_design.PrintDesignPropertySectionRegistry;
107
+ contextMenus: {
108
+ [k: string]: _canvas_components_react_print_design.PrintDesignComponentContextMenu;
109
+ };
110
+ id: "builtin.print-design";
111
+ version: "0.1.1";
112
+ components: readonly PrintDesignNativePlugin[];
113
+ componentRegistry: _canvas_components_print_design.PrintDesignComponentRegistry;
114
+ }>;
115
+ createMenu: typeof createListTablePrintMenu;
116
+ readTemplates: typeof _canvas_components_react_print_design.readPrintDesignTemplates;
117
+ createTemplateChoices: typeof createListTablePrintTemplateChoices;
118
+ Host: typeof ListTablePrintHost;
119
+ }>;
120
+
121
+ export { builtinListTablePrintIntegration };