@gct-paas/design 0.1.5-test.2 → 0.1.6-dev.1
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.min.css +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/es/components/design/design-content/design-content.css +76 -0
- package/es/components/design/design-content/design-content.d.ts +190 -0
- package/es/components/design/design-content/design-content.mjs +274 -0
- package/es/components/design/design-drag-item/design-drag-item.css +179 -0
- package/es/components/design/design-drag-item/design-drag-item.d.ts +56 -0
- package/es/components/design/design-drag-item/design-drag-item.mjs +237 -0
- package/es/components/design/design-drop-container/design-drop-container.css +103 -0
- package/es/components/design/design-drop-container/design-drop-container.d.ts +92 -0
- package/es/components/design/design-drop-container/design-drop-container.mjs +182 -0
- package/es/components/design/design-drop-line/design-drop-line.css +165 -0
- package/es/components/design/design-drop-line/design-drop-line.d.ts +73 -0
- package/es/components/design/design-drop-line/design-drop-line.mjs +136 -0
- package/es/components/design/design-item-actions/design-item-actions.css +97 -0
- package/es/components/design/design-item-actions/design-item-actions.d.ts +42 -0
- package/es/components/design/design-item-actions/design-item-actions.mjs +147 -0
- package/es/components/design/design-item-highlighter/design-item-highlighter.css +70 -0
- package/es/components/design/design-item-highlighter/design-item-highlighter.d.ts +168 -0
- package/es/components/design/design-item-highlighter/design-item-highlighter.mjs +155 -0
- package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.css +85 -0
- package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.d.ts +53 -0
- package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.mjs +169 -0
- package/es/components/design/design-item-hover-title/design-item-hover-title.css +12 -0
- package/es/components/design/design-item-hover-title/design-item-hover-title.d.ts +60 -0
- package/es/components/design/design-item-hover-title/design-item-hover-title.mjs +60 -0
- package/es/components/design/design-item-preview/design-item-preview.css +91 -0
- package/es/components/design/design-item-preview/design-item-preview.d.ts +1 -0
- package/es/components/design/design-item-preview/design-item-preview.mjs +32 -0
- package/es/components/design/design-not-drag-item/design-not-drag-item.css +67 -0
- package/es/components/design/design-not-drag-item/design-not-drag-item.d.ts +50 -0
- package/es/components/design/design-not-drag-item/design-not-drag-item.mjs +68 -0
- package/es/components/design/design-not-found/design-not-found.css +68 -0
- package/es/components/design/design-not-found/design-not-found.d.ts +14 -0
- package/es/components/design/design-not-found/design-not-found.mjs +19 -0
- package/es/components/design/index.d.ts +2 -0
- package/es/components/design/index.mjs +2 -0
- package/es/components/design-save-tip/design-save-tip.mjs +1 -1
- package/es/components/editor/index.mjs +2 -0
- package/es/components/editor/length-unit-editor/length-unit-editor.vue.d.ts +13 -0
- package/es/components/editor/length-unit-editor/length-unit-editor.vue.mjs +5 -0
- package/es/components/editor/length-unit-editor/length-unit-editor.vue_vue_type_script_setup_true_name_length-unit-editor_lang.mjs +47 -0
- package/es/components/field-transfer/components/Transfer/TreeItem.mjs +3 -2
- package/es/components/field-transfer/components/field-transfer-modal.vue.d.ts +5 -1
- package/es/components/field-transfer/components/field-transfer-modal.vue.mjs +2 -2
- package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_script_setup_true_name_field-transfer-modal_lang.mjs +2 -1
- package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_style_index_0_scoped_711e6992_lang.css +8 -0
- package/es/components/field-transfer/index.d.ts +2 -0
- package/es/components/field-transfer/index.mjs +1 -0
- package/es/components/field-transfer/less/AdvancedTransfer.css +2 -2
- package/es/components/field-transfer/less/FieldCascader.css +8 -8
- package/es/components/field-transfer/less/TransferTree.css +3 -3
- package/es/components/field-transfer/less/TreeItem.css +79 -14
- package/es/components/index.d.ts +5 -2
- package/es/components/index.mjs +10 -2
- package/es/components/material/index.d.ts +1 -0
- package/es/components/material/index.mjs +1 -0
- package/es/components/material/material-content/material-content.css +86 -0
- package/es/components/material/material-content/material-content.d.ts +1 -0
- package/es/components/material/material-content/material-content.mjs +49 -0
- package/es/components/material/material-module/material-module.css +104 -0
- package/es/components/material/material-module/material-module.d.ts +60 -0
- package/es/components/material/material-module/material-module.mjs +67 -0
- package/es/components/material/material-module-drag-container/material-module-drag-container.css +69 -0
- package/es/components/material/material-module-drag-container/material-module-drag-container.d.ts +56 -0
- package/es/components/material/material-module-drag-container/material-module-drag-container.mjs +21 -0
- package/es/components/material/material-module-drag-item/material-module-drag-item.css +83 -0
- package/es/components/material/material-module-drag-item/material-module-drag-item.d.ts +13 -0
- package/es/components/material/material-module-drag-item/material-module-drag-item.mjs +66 -0
- package/es/components/material/material-outline-tree/material-outline-tree.css +81 -0
- package/es/components/material/material-outline-tree/material-outline-tree.d.ts +13 -0
- package/es/components/material/material-outline-tree/material-outline-tree.mjs +67 -0
- package/es/components/material/material-tab-pane/material-tab-pane.css +68 -0
- package/es/components/material/material-tab-pane/material-tab-pane.d.ts +13 -0
- package/es/components/material/material-tab-pane/material-tab-pane.mjs +19 -0
- package/es/components/material/material-tabs/material-tabs.css +105 -0
- package/es/components/material/material-tabs/material-tabs.d.ts +103 -0
- package/es/components/material/material-tabs/material-tabs.mjs +44 -0
- package/es/components/modal-name-editor/modal-name-editor.d.ts +1 -11
- package/es/components/modal-name-editor/modal-name-editor.mjs +27 -38
- package/es/components/multi-field/index.d.ts +2 -0
- package/es/components/multi-field/index.mjs +1 -0
- package/es/components/multi-field/multi-field-display.vue.d.ts +8 -0
- package/es/components/multi-field/multi-field-display.vue.mjs +7 -0
- package/es/components/multi-field/multi-field-display.vue_vue_type_script_setup_true_lang.mjs +32 -0
- package/es/components/multi-field/multi-field-display.vue_vue_type_style_index_0_scoped_802ade7b_lang.css +4 -0
- package/es/components/multi-field/multi-field-item.vue.d.ts +6 -0
- package/es/components/multi-field/multi-field-item.vue.mjs +7 -0
- package/es/components/multi-field/multi-field-item.vue_vue_type_script_setup_true_lang.mjs +47 -0
- package/es/components/multi-field/multi-field-item.vue_vue_type_style_index_0_scoped_881cb08e_lang.css +31 -0
- package/es/components/panel/index.d.ts +1 -0
- package/es/components/panel/index.mjs +1 -0
- package/es/components/panel/panel-content/panel-content.css +189 -0
- package/es/components/panel/panel-content/panel-content.d.ts +19 -0
- package/es/components/panel/panel-content/panel-content.mjs +48 -0
- package/es/components/panel/panel-form/panel-form.css +67 -0
- package/es/components/panel/panel-form/panel-form.d.ts +62 -0
- package/es/components/panel/panel-form/panel-form.mjs +59 -0
- package/es/components/panel/panel-path/panel-path.css +89 -0
- package/es/components/panel/panel-path/panel-path.d.ts +35 -0
- package/es/components/panel/panel-path/panel-path.mjs +52 -0
- package/es/components/user-occupy/user-occupy.vue.mjs +2 -2
- package/es/components/user-occupy/user-occupy.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/user-occupy/{user-occupy.vue_vue_type_style_index_0_scoped_24cb9749_lang.css → user-occupy.vue_vue_type_style_index_0_scoped_9b136922_lang.css} +6 -6
- package/es/controller/index.d.ts +1 -0
- package/es/controller/index.mjs +1 -0
- package/es/controller/view/design-view.controller.d.ts +48 -0
- package/es/controller/view/design-view.controller.mjs +150 -0
- package/es/create-app-vue.mjs +2 -0
- package/es/editor/content-tag-style/content-tag-style.css +164 -0
- package/es/editor/content-tag-style/content-tag-style.d.ts +112 -0
- package/es/editor/content-tag-style/content-tag-style.mjs +80 -0
- package/es/editor/content-tag-style/index.d.ts +8 -0
- package/es/editor/content-tag-style/index.mjs +11 -0
- package/es/editor/field-info-editor/field-info-editor.css +125 -0
- package/es/editor/field-info-editor/field-info-editor.d.ts +111 -0
- package/es/editor/field-info-editor/field-info-editor.mjs +38 -0
- package/es/editor/field-info-editor/index.d.ts +8 -0
- package/es/editor/field-info-editor/index.mjs +9 -0
- package/es/editor/index.d.ts +5 -0
- package/es/editor/index.mjs +19 -0
- package/es/editor/model-field-select/index.d.ts +8 -0
- package/es/editor/model-field-select/index.mjs +9 -0
- package/es/editor/model-field-select/model-field-select.css +148 -0
- package/es/editor/model-field-select/model-field-select.d.ts +42 -0
- package/es/editor/model-field-select/model-field-select.mjs +217 -0
- package/es/editor/style-border/index.d.ts +4 -0
- package/es/editor/style-border/index.mjs +11 -0
- package/es/editor/style-border/style-border.d.ts +35 -0
- package/es/editor/style-border/style-border.mjs +38 -0
- package/es/editor/style-font/index.d.ts +4 -0
- package/es/editor/style-font/index.mjs +11 -0
- package/es/editor/style-font/style-font.css +86 -0
- package/es/editor/style-font/style-font.d.ts +35 -0
- package/es/editor/style-font/style-font.mjs +36 -0
- package/es/editor/style-position/index.d.ts +4 -0
- package/es/editor/style-position/index.mjs +11 -0
- package/es/editor/style-position/style-position.d.ts +35 -0
- package/es/editor/style-position/style-position.mjs +35 -0
- package/es/editor/style-spacing/index.d.ts +4 -0
- package/es/editor/style-spacing/index.mjs +11 -0
- package/es/editor/style-spacing/style-spacing.d.ts +34 -0
- package/es/editor/style-spacing/style-spacing.mjs +60 -0
- package/es/hooks/design-view/designer/useDesignSave.mjs +3 -1
- package/es/hooks/design-view/layout/useToolkit.mjs +3 -3
- package/es/hooks/design-view/page/usePage.mjs +1 -1
- package/es/hooks/index.d.ts +2 -1
- package/es/hooks/index.mjs +3 -2
- package/es/hooks/use-design-view-controller/use-design-view-controller.d.ts +11 -0
- package/es/hooks/use-design-view-controller/use-design-view-controller.mjs +31 -0
- package/es/index.d.ts +5 -2
- package/es/index.mjs +24 -8
- package/es/interface/controller/i-design-view.controller.d.ts +3 -5
- package/es/interface/form-editor/child-list-editor/child-list-editor.d.ts +114 -0
- package/es/interface/form-editor/index.d.ts +9 -0
- package/es/interface/form-editor/style-border/i-style-border.controller.d.ts +11 -0
- package/es/interface/form-editor/style-border/i-style-border.d.ts +22 -0
- package/es/interface/form-editor/style-font/i-style-font.controller.d.ts +11 -0
- package/es/interface/form-editor/style-font/i-style-font.d.ts +13 -0
- package/es/interface/form-editor/style-position/i-style-position.controller.d.ts +11 -0
- package/es/interface/form-editor/style-position/i-style-position.d.ts +13 -0
- package/es/interface/form-editor/style-spacing/i-style-spacing.controller.d.ts +11 -0
- package/es/interface/form-editor/style-spacing/i-style-spacing.d.ts +22 -0
- package/es/interface/index.d.ts +2 -0
- package/es/interface/provider/i-node-provider.d.ts +140 -0
- package/es/locale/sys/app.d.ts +4 -0
- package/es/locale/sys/appDesigner.d.ts +5 -0
- package/es/locale/sys/cardDesign.d.ts +13 -0
- package/es/locale/sys/component.d.ts +19 -0
- package/es/locale/sys/model.d.ts +6 -0
- package/es/locale/sys/pageDesigner.d.ts +28 -0
- package/es/locale/sys/platform.d.ts +7 -0
- package/es/locale/sys.d.ts +22 -0
- package/es/provider/design-editor-node/design-editor-node.provider.d.ts +41 -0
- package/es/provider/design-editor-node/design-editor-node.provider.mjs +57 -0
- package/es/provider/index.d.ts +2 -0
- package/es/provider/index.mjs +2 -0
- package/es/provider/node-base/node-base.provider.d.ts +25 -0
- package/es/provider/node-base/node-base.provider.mjs +34 -0
- package/es/register/index.d.ts +1 -0
- package/es/register/index.mjs +1 -0
- package/es/register/node/node.register.d.ts +113 -0
- package/es/register/node/node.register.mjs +141 -0
- package/es/store/index.d.ts +1 -0
- package/es/store/index.mjs +1 -0
- package/es/store/view/design-view.store.d.ts +12 -0
- package/es/store/view/design-view.store.mjs +327 -0
- package/es/utils/can-drop/can-drop.d.ts +12 -0
- package/es/utils/can-drop/can-drop.mjs +48 -0
- package/es/utils/design-plugin-pkg-util/design-plugin-pkg-util.d.ts +1 -1
- package/es/utils/design-plugin-pkg-util/design-plugin-pkg-util.mjs +29 -1
- package/es/utils/expression/index.d.ts +1 -0
- package/es/utils/expression/index.mjs +43 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.mjs +2 -0
- package/es/utils/schema/index.mjs +4 -0
- package/package.json +12 -11
- package/es/components/field-cascader/index.d.ts +0 -2
- package/es/components/field-cascader/index.mjs +0 -1
- package/es/components/field-cascader/src/FieldCascader.vue.d.ts +0 -87
- package/es/components/field-cascader/src/FieldCascader.vue.mjs +0 -6
- package/es/components/field-cascader/src/FieldCascader.vue_vue_type_script_setup_true_lang.mjs +0 -115
- package/es/components/field-cascader/src/FieldCascader.vue_vue_type_style_index_0_lang.css +0 -69
- package/es/components/field-cascader/src/SearchInput.vue.d.ts +0 -11
- package/es/components/field-cascader/src/SearchInput.vue.mjs +0 -7
- package/es/components/field-cascader/src/SearchInput.vue_vue_type_script_setup_true_lang.mjs +0 -38
- package/es/components/field-cascader/src/SearchInput.vue_vue_type_style_index_0_scoped_512c4b38_lang.css +0 -9
- package/es/components/field-cascader/src/hooks.d.ts +0 -129
- package/es/components/field-cascader/src/hooks.mjs +0 -163
- package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_style_index_0_scoped_0c9dd8a1_lang.css +0 -5
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { IDesignViewController } from '../controller/i-design-view.controller';
|
|
3
|
+
import { IDesignItemAction } from '../i-design-item-action/i-design-item-action';
|
|
4
|
+
import { DesignNodeMode, IDesignNode, IDragDataItem } from '@gct-paas/schema';
|
|
5
|
+
import { IEditForm } from '@gct-paas/core-web';
|
|
6
|
+
/**
|
|
7
|
+
* 设计界面节点设计绘制器
|
|
8
|
+
*
|
|
9
|
+
* @author zhanghanrui
|
|
10
|
+
* @date 2024-07-06 11:07:22
|
|
11
|
+
* @export
|
|
12
|
+
* @interface INodeProvider
|
|
13
|
+
*/
|
|
14
|
+
export interface INodeProvider<T extends IDesignNode = IDesignNode> {
|
|
15
|
+
/**
|
|
16
|
+
* 节点模式
|
|
17
|
+
*
|
|
18
|
+
* @author zhanghanrui
|
|
19
|
+
* @date 2024-07-06 12:07:05
|
|
20
|
+
* @type {DesignNodeMode}
|
|
21
|
+
*/
|
|
22
|
+
readonly mode: DesignNodeMode;
|
|
23
|
+
/**
|
|
24
|
+
* 节点类型
|
|
25
|
+
*
|
|
26
|
+
* @author zhanghanrui
|
|
27
|
+
* @date 2024-07-06 11:07:24
|
|
28
|
+
* @type {string}
|
|
29
|
+
*/
|
|
30
|
+
readonly type: string;
|
|
31
|
+
/**
|
|
32
|
+
* 设计界面节点绘制组件
|
|
33
|
+
*
|
|
34
|
+
* @author chitanda
|
|
35
|
+
* @date 2025-07-07 15:07:18
|
|
36
|
+
* @type {(string | Component)}
|
|
37
|
+
*/
|
|
38
|
+
readonly component: string | Component;
|
|
39
|
+
/**
|
|
40
|
+
* 组件布局方向
|
|
41
|
+
*
|
|
42
|
+
* @default 'horizontal'
|
|
43
|
+
* @type {('vertical' | 'horizontal')}
|
|
44
|
+
*/
|
|
45
|
+
direction?: 'vertical' | 'horizontal';
|
|
46
|
+
/**
|
|
47
|
+
* 可操作的行为项
|
|
48
|
+
*
|
|
49
|
+
* @author zhanghanrui
|
|
50
|
+
* @date 2024-07-16 16:07:09
|
|
51
|
+
* @type {IDesignItemAction[]}
|
|
52
|
+
*/
|
|
53
|
+
actions?: IDesignItemAction[];
|
|
54
|
+
/**
|
|
55
|
+
* 是否启用拖放,默认启用
|
|
56
|
+
*
|
|
57
|
+
* @author zhanghanrui
|
|
58
|
+
* @date 2024-07-12 17:07:41
|
|
59
|
+
* @type {boolean}
|
|
60
|
+
*/
|
|
61
|
+
isDrop?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* 是否启用拖拽,默认启用
|
|
64
|
+
*
|
|
65
|
+
* @author zhanghanrui
|
|
66
|
+
* @date 2024-07-12 17:07:27
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
*/
|
|
69
|
+
isDrag?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* 是否自定义实现样式
|
|
72
|
+
*
|
|
73
|
+
* @default false
|
|
74
|
+
* @author zhanghanrui
|
|
75
|
+
* @date 2024-08-23 16:08:16
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
*/
|
|
78
|
+
isCustomStyle?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 特殊情况下,例如表格将表格元素自己复制了好几份,需要指定实际呈现元素在 querySelectorAll 中的位置
|
|
81
|
+
*
|
|
82
|
+
* @type {number}
|
|
83
|
+
*/
|
|
84
|
+
selectorIndex?: number;
|
|
85
|
+
/**
|
|
86
|
+
* 放置白名单
|
|
87
|
+
*
|
|
88
|
+
* @type {(string | RegExp)[]}
|
|
89
|
+
*/
|
|
90
|
+
whiteList?: (string | RegExp)[];
|
|
91
|
+
/**
|
|
92
|
+
* 放置黑名单
|
|
93
|
+
*
|
|
94
|
+
* @type {(string | RegExp)[]}
|
|
95
|
+
*/
|
|
96
|
+
blackList?: (string | RegExp)[];
|
|
97
|
+
/**
|
|
98
|
+
* 属性编辑表单模型
|
|
99
|
+
*
|
|
100
|
+
* @author chitanda
|
|
101
|
+
* @date 2025-06-24 10:06:39
|
|
102
|
+
*/
|
|
103
|
+
model: IEditForm | ((context?: IContext, data?: T) => IEditForm);
|
|
104
|
+
/**
|
|
105
|
+
* 项行为点击
|
|
106
|
+
*
|
|
107
|
+
* @author zhanghanrui
|
|
108
|
+
* @date 2024-07-16 17:07:33
|
|
109
|
+
* @param {IDesignViewController} c
|
|
110
|
+
* @param {IDesignNode} data
|
|
111
|
+
* @param {IDesignItemAction} action
|
|
112
|
+
* @return {*} {boolean} 返回值为 true 时不再执行后续行为
|
|
113
|
+
*/
|
|
114
|
+
onClick?(c: IDesignViewController, data: IDesignNode, action: IDesignItemAction): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* 创建新节点
|
|
117
|
+
*
|
|
118
|
+
* @author zhanghanrui
|
|
119
|
+
* @date 2024-07-09 16:07:59
|
|
120
|
+
* @param {Partial<T>} [data]
|
|
121
|
+
* @return {*} {T}
|
|
122
|
+
*/
|
|
123
|
+
create(data?: Partial<T>): T;
|
|
124
|
+
/**
|
|
125
|
+
* 放置节点
|
|
126
|
+
*
|
|
127
|
+
* @param {IDesignViewController} c
|
|
128
|
+
* @param {IDragDataItem} [data]
|
|
129
|
+
* @returns {*} {(Promise<T | null>)}
|
|
130
|
+
*/
|
|
131
|
+
beforeDrop?(c: IDesignViewController, data?: IDragDataItem): Promise<T | null>;
|
|
132
|
+
/**
|
|
133
|
+
* 放置完成
|
|
134
|
+
*
|
|
135
|
+
* @param {IDesignViewController} c
|
|
136
|
+
* @param {IDragDataItem} [data]
|
|
137
|
+
* @returns {*} {Promise<boolean>}
|
|
138
|
+
*/
|
|
139
|
+
afterDrop?(c: IDesignViewController, data?: IDragDataItem): Promise<boolean>;
|
|
140
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
fieldTransfer: {
|
|
3
|
+
defaultModalTitle: string;
|
|
4
|
+
linkModel: string;
|
|
5
|
+
subMainModel: string;
|
|
6
|
+
currentModel: string;
|
|
7
|
+
soModelTitle: string;
|
|
8
|
+
noSelect: string;
|
|
9
|
+
select: string;
|
|
10
|
+
noSearchData: string;
|
|
11
|
+
noData: string;
|
|
12
|
+
term: string;
|
|
13
|
+
pleaseSearch: string;
|
|
14
|
+
selectAllData: string;
|
|
15
|
+
invertCurrentPage: string;
|
|
16
|
+
move: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
locked: string;
|
|
3
|
+
unlock: string;
|
|
4
|
+
lock: string;
|
|
5
|
+
designing: string;
|
|
6
|
+
modelField: string;
|
|
7
|
+
selectModelFields: string;
|
|
8
|
+
embeddedSearch: string;
|
|
9
|
+
widget: string;
|
|
10
|
+
prop: string;
|
|
11
|
+
defaultValue: string;
|
|
12
|
+
codeError: string;
|
|
13
|
+
topBorder: string;
|
|
14
|
+
leftBorder: string;
|
|
15
|
+
bottomBorder: string;
|
|
16
|
+
rightBorder: string;
|
|
17
|
+
whole: string;
|
|
18
|
+
upLeft: string;
|
|
19
|
+
upRight: string;
|
|
20
|
+
downLeft: string;
|
|
21
|
+
downRight: string;
|
|
22
|
+
radius: string;
|
|
23
|
+
bold: string;
|
|
24
|
+
italic: string;
|
|
25
|
+
underline: string;
|
|
26
|
+
linethrough: string;
|
|
27
|
+
};
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
saveText: string;
|
|
3
|
+
nextStep: string;
|
|
4
|
+
ok: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
operationSuccess: string;
|
|
7
|
+
user: string;
|
|
8
|
+
chooseText: string;
|
|
9
|
+
selectedFields: string;
|
|
10
|
+
okText: string;
|
|
11
|
+
closeText: string;
|
|
12
|
+
sureToDo: string;
|
|
13
|
+
designView: {
|
|
14
|
+
tips: {
|
|
15
|
+
selectParent: string;
|
|
16
|
+
delete: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
inputText: string;
|
|
20
|
+
sureToLock: string;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FIELD_TYPE } from '@gct-paas/core';
|
|
2
|
+
import { DesignNodeMode, IDesignEditorNode } from '@gct-paas/schema';
|
|
3
|
+
import { IMaterialData, INodeProvider } from '../../interface';
|
|
4
|
+
import { NodeBaseProvider } from '../../provider';
|
|
5
|
+
import { IEditForm } from '@gct-paas/core-web';
|
|
6
|
+
/**
|
|
7
|
+
* 设计编辑器节点提供者
|
|
8
|
+
*
|
|
9
|
+
* @author chitanda
|
|
10
|
+
* @date 2025-07-07 15:07:08
|
|
11
|
+
* @export
|
|
12
|
+
* @abstract
|
|
13
|
+
* @class DesignEditorNodeProvider
|
|
14
|
+
* @extends {NodeBaseProvider<IDesignEditorNode>}
|
|
15
|
+
* @implements {INodeProvider<IDesignEditorNode>}
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class DesignEditorNodeProvider extends NodeBaseProvider<IDesignEditorNode> implements INodeProvider<IDesignEditorNode> {
|
|
18
|
+
mode: DesignNodeMode;
|
|
19
|
+
type: string;
|
|
20
|
+
/**
|
|
21
|
+
* 字段键名(用于预置字段的特殊匹配,例如主键的字段类型是文本,只能用字段的标识 id_ 匹配)
|
|
22
|
+
*
|
|
23
|
+
* @author chitanda
|
|
24
|
+
* @date 2025-07-07 15:07:45
|
|
25
|
+
* @abstract
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
fieldKey?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 字段类型
|
|
31
|
+
*
|
|
32
|
+
* @author chitanda
|
|
33
|
+
* @date 2025-07-07 15:07:54
|
|
34
|
+
* @abstract
|
|
35
|
+
* @type {FIELD_TYPE}
|
|
36
|
+
*/
|
|
37
|
+
fieldType?: FIELD_TYPE;
|
|
38
|
+
static materialConfig: IMaterialData;
|
|
39
|
+
model: IEditForm;
|
|
40
|
+
create(data?: IDesignEditorNode): IDesignEditorNode;
|
|
41
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { DesignNodeType, MaterialGroup } from "../../constant/index.mjs";
|
|
2
|
+
import { DesignEditorNode } from "../../data/design-editor-node/design-editor-node.mjs";
|
|
3
|
+
import "../../data/index.mjs";
|
|
4
|
+
import { NodeBaseProvider } from "../node-base/node-base.provider.mjs";
|
|
5
|
+
import "../index.mjs";
|
|
6
|
+
import "@gct-paas/core";
|
|
7
|
+
import { DesignNodeMode } from "@gct-paas/schema";
|
|
8
|
+
//#region src/provider/design-editor-node/design-editor-node.provider.ts
|
|
9
|
+
/**
|
|
10
|
+
* 设计编辑器节点提供者
|
|
11
|
+
*
|
|
12
|
+
* @author chitanda
|
|
13
|
+
* @date 2025-07-07 15:07:08
|
|
14
|
+
* @export
|
|
15
|
+
* @abstract
|
|
16
|
+
* @class DesignEditorNodeProvider
|
|
17
|
+
* @extends {NodeBaseProvider<IDesignEditorNode>}
|
|
18
|
+
* @implements {INodeProvider<IDesignEditorNode>}
|
|
19
|
+
*/
|
|
20
|
+
var DesignEditorNodeProvider = class extends NodeBaseProvider {
|
|
21
|
+
mode = DesignNodeMode.ITEM;
|
|
22
|
+
type = DesignNodeType.DESIGN_EDITOR;
|
|
23
|
+
/**
|
|
24
|
+
* 字段键名(用于预置字段的特殊匹配,例如主键的字段类型是文本,只能用字段的标识 id_ 匹配)
|
|
25
|
+
*
|
|
26
|
+
* @author chitanda
|
|
27
|
+
* @date 2025-07-07 15:07:45
|
|
28
|
+
* @abstract
|
|
29
|
+
* @type {string}
|
|
30
|
+
*/
|
|
31
|
+
fieldKey;
|
|
32
|
+
/**
|
|
33
|
+
* 字段类型
|
|
34
|
+
*
|
|
35
|
+
* @author chitanda
|
|
36
|
+
* @date 2025-07-07 15:07:54
|
|
37
|
+
* @abstract
|
|
38
|
+
* @type {FIELD_TYPE}
|
|
39
|
+
*/
|
|
40
|
+
fieldType;
|
|
41
|
+
static materialConfig = {
|
|
42
|
+
group: MaterialGroup.SYSTEM,
|
|
43
|
+
label: "菜单列表",
|
|
44
|
+
type: DesignNodeType.MENU_LIST,
|
|
45
|
+
icon: "icon-kapianliebiao",
|
|
46
|
+
order: 0
|
|
47
|
+
};
|
|
48
|
+
model = {
|
|
49
|
+
type: "edit",
|
|
50
|
+
children: []
|
|
51
|
+
};
|
|
52
|
+
create(data) {
|
|
53
|
+
return new DesignEditorNode(data);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { DesignEditorNodeProvider };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { IDesignItemAction, INodeProvider } from '../../interface';
|
|
3
|
+
import { DesignNodeMode, IDesignNode } from '@gct-paas/schema';
|
|
4
|
+
import { IEditForm } from '@gct-paas/core-web';
|
|
5
|
+
/**
|
|
6
|
+
* 节点基础适配器
|
|
7
|
+
*
|
|
8
|
+
* @author zhanghanrui
|
|
9
|
+
* @date 2024-07-16 17:07:54
|
|
10
|
+
* @export
|
|
11
|
+
* @class NodeBaseProvider
|
|
12
|
+
* @implements {INodeProvider<T>}
|
|
13
|
+
* @template T
|
|
14
|
+
*/
|
|
15
|
+
export declare abstract class NodeBaseProvider<T extends IDesignNode = IDesignNode> implements INodeProvider<T> {
|
|
16
|
+
abstract mode: DesignNodeMode;
|
|
17
|
+
abstract type: string;
|
|
18
|
+
abstract component: string | Component;
|
|
19
|
+
get actions(): IDesignItemAction[];
|
|
20
|
+
abstract model: IEditForm | ((ctx?: IContext, node?: T) => IEditForm);
|
|
21
|
+
abstract create(data?: T): T;
|
|
22
|
+
isDrag: boolean;
|
|
23
|
+
isDrop: boolean;
|
|
24
|
+
protected createActions(): IDesignItemAction[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DesignItemActionTag } from "../../constant/index.mjs";
|
|
2
|
+
import { t } from "@gct-paas/core";
|
|
3
|
+
import "vue";
|
|
4
|
+
//#region src/provider/node-base/node-base.provider.ts
|
|
5
|
+
/**
|
|
6
|
+
* 节点基础适配器
|
|
7
|
+
*
|
|
8
|
+
* @author zhanghanrui
|
|
9
|
+
* @date 2024-07-16 17:07:54
|
|
10
|
+
* @export
|
|
11
|
+
* @class NodeBaseProvider
|
|
12
|
+
* @implements {INodeProvider<T>}
|
|
13
|
+
* @template T
|
|
14
|
+
*/
|
|
15
|
+
var NodeBaseProvider = class {
|
|
16
|
+
get actions() {
|
|
17
|
+
return this.createActions();
|
|
18
|
+
}
|
|
19
|
+
isDrag = true;
|
|
20
|
+
isDrop = true;
|
|
21
|
+
createActions() {
|
|
22
|
+
return [{
|
|
23
|
+
tag: DesignItemActionTag.SELECT_PARENT,
|
|
24
|
+
icon: "icon-fuzujian",
|
|
25
|
+
tooltip: t("sys.designView.tips.selectParent")
|
|
26
|
+
}, {
|
|
27
|
+
tag: DesignItemActionTag.DELETE,
|
|
28
|
+
icon: "icon-shanchu1",
|
|
29
|
+
tooltip: t("sys.designView.tips.delete")
|
|
30
|
+
}];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { NodeBaseProvider };
|
package/es/register/index.d.ts
CHANGED
package/es/register/index.mjs
CHANGED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { FIELD_TYPE } from '@gct-paas/core';
|
|
2
|
+
import { INodeProvider } from '../../interface';
|
|
3
|
+
/**
|
|
4
|
+
* 设计界面节点适配器注册
|
|
5
|
+
*
|
|
6
|
+
* @author zhanghanrui
|
|
7
|
+
* @date 2024-07-06 11:07:57
|
|
8
|
+
* @export
|
|
9
|
+
* @class NodeRegister
|
|
10
|
+
*/
|
|
11
|
+
export declare class NodeRegister {
|
|
12
|
+
/**
|
|
13
|
+
* 适配器缓存
|
|
14
|
+
*
|
|
15
|
+
* @author zhanghanrui
|
|
16
|
+
* @date 2024-07-06 11:07:15
|
|
17
|
+
* @protected
|
|
18
|
+
* @static
|
|
19
|
+
*/
|
|
20
|
+
protected static map: Map<string, () => INodeProvider>;
|
|
21
|
+
/**
|
|
22
|
+
* 实例缓存
|
|
23
|
+
*
|
|
24
|
+
* @author zhanghanrui
|
|
25
|
+
* @date 2024-07-06 12:07:33
|
|
26
|
+
* @protected
|
|
27
|
+
* @static
|
|
28
|
+
* @type {Map<string, INodeProvider>}
|
|
29
|
+
*/
|
|
30
|
+
protected static cache: Map<string, INodeProvider<import('@gct-paas/schema').IDesignNode<import('@gct-paas/schema').IDesignNodeData>>>;
|
|
31
|
+
/**
|
|
32
|
+
* 注册适配器
|
|
33
|
+
*
|
|
34
|
+
* @author zhanghanrui
|
|
35
|
+
* @date 2024-07-09 09:07:17
|
|
36
|
+
* @static
|
|
37
|
+
* @param {string} name
|
|
38
|
+
* @param {() => INodeProvider} provider
|
|
39
|
+
* @param {string} [prefix]
|
|
40
|
+
*/
|
|
41
|
+
static register(name: string, provider: () => INodeProvider, prefix?: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* 获取适配器
|
|
44
|
+
*
|
|
45
|
+
* @author zhanghanrui
|
|
46
|
+
* @date 2024-07-09 09:07:49
|
|
47
|
+
* @static
|
|
48
|
+
* @param {string} name
|
|
49
|
+
* @param {string} [prefix]
|
|
50
|
+
* @return {*} {(INodeProvider | null)}
|
|
51
|
+
*/
|
|
52
|
+
static get(name: string, prefix?: string): INodeProvider | null;
|
|
53
|
+
/**
|
|
54
|
+
* 注册自定义首页插件
|
|
55
|
+
*
|
|
56
|
+
* @author zhanghanrui
|
|
57
|
+
* @date 2024-07-09 09:07:44
|
|
58
|
+
* @static
|
|
59
|
+
* @param {string} name
|
|
60
|
+
* @param {() => INodeProvider} provider
|
|
61
|
+
*/
|
|
62
|
+
static registerCustomHome(name: string, provider: () => INodeProvider): void;
|
|
63
|
+
/**
|
|
64
|
+
* 注册自定义导航页面插件
|
|
65
|
+
*
|
|
66
|
+
* @author zhanghanrui
|
|
67
|
+
* @date 2024-08-19 17:08:06
|
|
68
|
+
* @static
|
|
69
|
+
* @param {string} name
|
|
70
|
+
* @param {() => INodeProvider} provider
|
|
71
|
+
*/
|
|
72
|
+
static registerCustomExpView(name: string, provider: () => INodeProvider): void;
|
|
73
|
+
/**
|
|
74
|
+
* 注册自定义导航菜单页面插件
|
|
75
|
+
*
|
|
76
|
+
* @author zhanghanrui
|
|
77
|
+
* @date 2024-08-24 10:08:51
|
|
78
|
+
* @static
|
|
79
|
+
* @param {string} name
|
|
80
|
+
* @param {() => INodeProvider} provider
|
|
81
|
+
*/
|
|
82
|
+
static registerCustomExpMenu(name: string, provider: () => INodeProvider): void;
|
|
83
|
+
/**
|
|
84
|
+
* 注册设计编辑器节点
|
|
85
|
+
*
|
|
86
|
+
* @author chitanda
|
|
87
|
+
* @date 2025-07-07 16:07:58
|
|
88
|
+
* @static
|
|
89
|
+
* @param {FIELD_TYPE} fieldType
|
|
90
|
+
* @param {() => INodeProvider} provider
|
|
91
|
+
*/
|
|
92
|
+
static registerDesignEditorNode(fieldType: FIELD_TYPE, provider: () => INodeProvider): void;
|
|
93
|
+
/**
|
|
94
|
+
* 根据字段类型获取设计编辑器节点
|
|
95
|
+
*
|
|
96
|
+
* @author chitanda
|
|
97
|
+
* @date 2025-07-07 16:07:06
|
|
98
|
+
* @static
|
|
99
|
+
* @param {FIELD_TYPE} fieldType
|
|
100
|
+
* @returns {*} {(INodeProvider | null)}
|
|
101
|
+
*/
|
|
102
|
+
static getDesignEditorNode(fieldType: FIELD_TYPE): INodeProvider | null;
|
|
103
|
+
/**
|
|
104
|
+
* 获取自定义首页插件
|
|
105
|
+
*
|
|
106
|
+
* @author zhanghanrui
|
|
107
|
+
* @date 2024-07-09 09:07:58
|
|
108
|
+
* @static
|
|
109
|
+
* @param {string} name
|
|
110
|
+
* @return {*} {(INodeProvider | null)}
|
|
111
|
+
*/
|
|
112
|
+
static getCustomHome(name: string): INodeProvider | null;
|
|
113
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { DesignNodePrefix, DesignViewPrefix } from "../../constant/index.mjs";
|
|
2
|
+
import "@gct-paas/core";
|
|
3
|
+
//#region src/register/node/node.register.ts
|
|
4
|
+
/**
|
|
5
|
+
* 设计界面节点适配器注册
|
|
6
|
+
*
|
|
7
|
+
* @author zhanghanrui
|
|
8
|
+
* @date 2024-07-06 11:07:57
|
|
9
|
+
* @export
|
|
10
|
+
* @class NodeRegister
|
|
11
|
+
*/
|
|
12
|
+
var NodeRegister = class {
|
|
13
|
+
/**
|
|
14
|
+
* 适配器缓存
|
|
15
|
+
*
|
|
16
|
+
* @author zhanghanrui
|
|
17
|
+
* @date 2024-07-06 11:07:15
|
|
18
|
+
* @protected
|
|
19
|
+
* @static
|
|
20
|
+
*/
|
|
21
|
+
static map = /* @__PURE__ */ new Map();
|
|
22
|
+
/**
|
|
23
|
+
* 实例缓存
|
|
24
|
+
*
|
|
25
|
+
* @author zhanghanrui
|
|
26
|
+
* @date 2024-07-06 12:07:33
|
|
27
|
+
* @protected
|
|
28
|
+
* @static
|
|
29
|
+
* @type {Map<string, INodeProvider>}
|
|
30
|
+
*/
|
|
31
|
+
static cache = /* @__PURE__ */ new Map();
|
|
32
|
+
/**
|
|
33
|
+
* 注册适配器
|
|
34
|
+
*
|
|
35
|
+
* @author zhanghanrui
|
|
36
|
+
* @date 2024-07-09 09:07:17
|
|
37
|
+
* @static
|
|
38
|
+
* @param {string} name
|
|
39
|
+
* @param {() => INodeProvider} provider
|
|
40
|
+
* @param {string} [prefix]
|
|
41
|
+
*/
|
|
42
|
+
static register(name, provider, prefix) {
|
|
43
|
+
const tag = prefix ? `${prefix}:${name}` : name;
|
|
44
|
+
this.map.set(tag, provider);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 获取适配器
|
|
48
|
+
*
|
|
49
|
+
* @author zhanghanrui
|
|
50
|
+
* @date 2024-07-09 09:07:49
|
|
51
|
+
* @static
|
|
52
|
+
* @param {string} name
|
|
53
|
+
* @param {string} [prefix]
|
|
54
|
+
* @return {*} {(INodeProvider | null)}
|
|
55
|
+
*/
|
|
56
|
+
static get(name, prefix) {
|
|
57
|
+
const tag = prefix ? `${prefix}:${name}` : name;
|
|
58
|
+
if (this.cache.has(tag)) return this.cache.get(tag);
|
|
59
|
+
const provider = this.map.get(tag);
|
|
60
|
+
if (provider) {
|
|
61
|
+
const ins = provider();
|
|
62
|
+
this.cache.set(tag, ins);
|
|
63
|
+
return ins;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 注册自定义首页插件
|
|
69
|
+
*
|
|
70
|
+
* @author zhanghanrui
|
|
71
|
+
* @date 2024-07-09 09:07:44
|
|
72
|
+
* @static
|
|
73
|
+
* @param {string} name
|
|
74
|
+
* @param {() => INodeProvider} provider
|
|
75
|
+
*/
|
|
76
|
+
static registerCustomHome(name, provider) {
|
|
77
|
+
this.register(name, provider, DesignViewPrefix.CUSTOM_HOME);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* 注册自定义导航页面插件
|
|
81
|
+
*
|
|
82
|
+
* @author zhanghanrui
|
|
83
|
+
* @date 2024-08-19 17:08:06
|
|
84
|
+
* @static
|
|
85
|
+
* @param {string} name
|
|
86
|
+
* @param {() => INodeProvider} provider
|
|
87
|
+
*/
|
|
88
|
+
static registerCustomExpView(name, provider) {
|
|
89
|
+
this.register(name, provider, DesignViewPrefix.CUSTOM_EXP_VIEW);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 注册自定义导航菜单页面插件
|
|
93
|
+
*
|
|
94
|
+
* @author zhanghanrui
|
|
95
|
+
* @date 2024-08-24 10:08:51
|
|
96
|
+
* @static
|
|
97
|
+
* @param {string} name
|
|
98
|
+
* @param {() => INodeProvider} provider
|
|
99
|
+
*/
|
|
100
|
+
static registerCustomExpMenu(name, provider) {
|
|
101
|
+
this.register(name, provider, DesignViewPrefix.CUSTOM_EXP_MENU);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 注册设计编辑器节点
|
|
105
|
+
*
|
|
106
|
+
* @author chitanda
|
|
107
|
+
* @date 2025-07-07 16:07:58
|
|
108
|
+
* @static
|
|
109
|
+
* @param {FIELD_TYPE} fieldType
|
|
110
|
+
* @param {() => INodeProvider} provider
|
|
111
|
+
*/
|
|
112
|
+
static registerDesignEditorNode(fieldType, provider) {
|
|
113
|
+
this.register(fieldType, provider, DesignNodePrefix.DESIGN_EDITOR);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* 根据字段类型获取设计编辑器节点
|
|
117
|
+
*
|
|
118
|
+
* @author chitanda
|
|
119
|
+
* @date 2025-07-07 16:07:06
|
|
120
|
+
* @static
|
|
121
|
+
* @param {FIELD_TYPE} fieldType
|
|
122
|
+
* @returns {*} {(INodeProvider | null)}
|
|
123
|
+
*/
|
|
124
|
+
static getDesignEditorNode(fieldType) {
|
|
125
|
+
return this.get(fieldType, DesignNodePrefix.DESIGN_EDITOR);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* 获取自定义首页插件
|
|
129
|
+
*
|
|
130
|
+
* @author zhanghanrui
|
|
131
|
+
* @date 2024-07-09 09:07:58
|
|
132
|
+
* @static
|
|
133
|
+
* @param {string} name
|
|
134
|
+
* @return {*} {(INodeProvider | null)}
|
|
135
|
+
*/
|
|
136
|
+
static getCustomHome(name) {
|
|
137
|
+
return this.get(name, DesignViewPrefix.CUSTOM_HOME);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
//#endregion
|
|
141
|
+
export { NodeRegister };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useDesignViewStore, type IDesignViewStore, } from './view/design-view.store';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./view/design-view.store.mjs";
|