@gct-paas/design 0.1.6-dev.9 → 6.0.0-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/README.md +157 -0
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +2 -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_style_index_0_scoped_2f34388d_lang.css +8 -0
- package/es/components/index.d.ts +0 -4
- package/es/components/index.mjs +0 -5
- package/es/components/mobile-container/mobile-container.d.ts +2 -2
- package/es/components/multi-field/multi-field-display.vue.mjs +2 -2
- package/es/components/multi-field/multi-field-display.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/multi-field/{multi-field-display.vue_vue_type_style_index_0_scoped_802ade7b_lang.css → multi-field-display.vue_vue_type_style_index_0_scoped_83390705_lang.css} +1 -1
- package/es/components/user-occupy/index.d.ts +0 -1
- package/es/components/user-occupy/index.mjs +0 -1
- package/es/components/user-occupy/user-lock.vue.mjs +2 -2
- package/es/components/user-occupy/user-lock.vue_vue_type_script_setup_true_lang.mjs +2 -1
- package/es/components/user-occupy/user-lock.vue_vue_type_style_index_0_scoped_143659f6_lang.css +29 -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 -1
- package/es/components/user-occupy/{user-occupy.vue_vue_type_style_index_0_scoped_9b136922_lang.css → user-occupy.vue_vue_type_style_index_0_scoped_1234af11_lang.css} +6 -6
- package/es/constant/index.d.ts +5 -0
- package/es/constant/index.mjs +6 -1
- package/es/constant/page-designer.d.ts +9 -36
- package/es/constant/page-designer.mjs +2 -32
- package/es/{components/user-occupy → hooks/design-view/components}/useUserOccupy.d.ts +3 -3
- package/es/{components/user-occupy → hooks/design-view/components}/useUserOccupy.mjs +48 -27
- package/es/hooks/design-view/design-state.d.ts +91 -1
- package/es/hooks/design-view/design-state.mjs +7 -7
- package/es/hooks/design-view/designer/useDesignCache.mjs +2 -3
- package/es/hooks/design-view/designer/useDesignPreview.mjs +11 -5
- package/es/hooks/design-view/designer/useDesignSave.d.ts +2 -2
- package/es/hooks/design-view/designer/useDesignSave.mjs +132 -22
- package/es/hooks/design-view/layout/useToolkit.d.ts +1 -1
- package/es/hooks/design-view/layout/useToolkit.mjs +123 -82
- package/es/hooks/design-view/page/usePage.d.ts +12 -7
- package/es/hooks/design-view/page/usePage.mjs +132 -9
- package/es/hooks/design-view/useDesigner.d.ts +6 -2
- package/es/hooks/design-view/useDesigner.mjs +14 -3
- package/es/hooks/design-view/widget/useSelectedWidget.mjs +55 -28
- package/es/hooks/design-view/widget/useWidget.mjs +2 -1
- package/es/hooks/index.d.ts +1 -1
- package/es/hooks/index.mjs +1 -1
- package/es/index.mjs +9 -12
- package/es/interface/index.d.ts +0 -1
- package/es/locale/auto-register.d.ts +2 -0
- package/es/locale/auto-register.mjs +25 -0
- package/es/locale/sys/app.mjs +6 -0
- package/es/locale/sys/appDesigner.mjs +9 -0
- package/es/locale/sys/cardDesign.d.ts +4 -4
- package/es/locale/sys/cardDesign.mjs +17 -0
- package/es/locale/sys/component.mjs +21 -0
- package/es/locale/sys/model.mjs +10 -0
- package/es/locale/sys/pageDesigner.mjs +32 -0
- package/es/locale/sys/platform.mjs +11 -0
- package/es/locale/sys.d.ts +7 -5
- package/es/locale/sys.mjs +26 -0
- package/es/register/designer-register/designer-register.d.ts +6 -3
- package/es/register/designer-register/designer-register.mjs +20 -14
- package/es/register/index.d.ts +1 -0
- package/es/register/index.mjs +1 -0
- package/es/register/props-editor/props-editor.register.d.ts +24 -0
- package/es/register/props-editor/props-editor.register.mjs +30 -0
- package/es/schema/begin-drag/begin-drag.mjs +1 -1
- package/es/schema/common-config/display-editor-config.mjs +1 -1
- package/es/schema/field/index.mjs +17 -3
- package/es/setup-app.d.ts +2 -1
- package/es/setup-app.mjs +3 -1
- package/es/types/index.d.ts +2 -1
- package/es/utils/design-interceptors/design-interceptors.mjs +1 -1
- package/package.json +12 -12
- package/es/components/design-save-tip/design-save-tip.css +0 -107
- package/es/components/design-save-tip/design-save-tip.d.ts +0 -44
- package/es/components/design-save-tip/design-save-tip.mjs +0 -81
- package/es/components/design-step-check/design-step-check.css +0 -133
- package/es/components/design-step-check/design-step-check.d.ts +0 -30
- package/es/components/design-step-check/design-step-check.mjs +0 -96
- package/es/components/design-view-layout/design-view-layout.css +0 -157
- package/es/components/design-view-layout/design-view-layout.d.ts +0 -1
- package/es/components/design-view-layout/design-view-layout.mjs +0 -139
- package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_style_index_0_scoped_711e6992_lang.css +0 -8
- package/es/components/modal-name-editor/modal-name-editor.css +0 -117
- package/es/components/modal-name-editor/modal-name-editor.d.ts +0 -34
- package/es/components/modal-name-editor/modal-name-editor.mjs +0 -124
- package/es/components/user-occupy/occupy.const.d.ts +0 -4
- package/es/components/user-occupy/occupy.const.mjs +0 -7
- package/es/components/user-occupy/user-lock.vue_vue_type_style_index_0_scoped_b40d46ff_lang.css +0 -29
- package/es/hooks/develop/useKeyParser.d.ts +0 -16
- package/es/hooks/develop/useKeyParser.mjs +0 -79
- package/es/interface/i-view-step/i-view-step.d.ts +0 -32
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys/pageDesigner.ts
|
|
3
|
+
var pageDesigner_exports = /* @__PURE__ */ __exportAll({ default: () => pageDesigner_default });
|
|
4
|
+
var pageDesigner_default = {
|
|
5
|
+
locked: "已锁定",
|
|
6
|
+
unlock: "解锁",
|
|
7
|
+
lock: "锁定",
|
|
8
|
+
designing: "正在设计",
|
|
9
|
+
modelField: "关联模型字段",
|
|
10
|
+
selectModelFields: "选择模型字段",
|
|
11
|
+
embeddedSearch: "内嵌搜索",
|
|
12
|
+
widget: "组件",
|
|
13
|
+
prop: "属性",
|
|
14
|
+
defaultValue: "默认值",
|
|
15
|
+
codeError: "语法错误请检查!",
|
|
16
|
+
topBorder: "上边框",
|
|
17
|
+
leftBorder: "左边框",
|
|
18
|
+
bottomBorder: "下边框",
|
|
19
|
+
rightBorder: "右边框",
|
|
20
|
+
whole: "全部",
|
|
21
|
+
upLeft: "左上角",
|
|
22
|
+
upRight: "右上角",
|
|
23
|
+
downLeft: "左下角",
|
|
24
|
+
downRight: "右下角",
|
|
25
|
+
radius: "圆角",
|
|
26
|
+
bold: "加粗",
|
|
27
|
+
italic: "倾斜",
|
|
28
|
+
underline: "下划线",
|
|
29
|
+
linethrough: "删除线"
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { pageDesigner_exports };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys/platform.ts
|
|
3
|
+
var platform_exports = /* @__PURE__ */ __exportAll({ default: () => platform_default });
|
|
4
|
+
var platform_default = {
|
|
5
|
+
left: "左对齐",
|
|
6
|
+
center: "居中对齐",
|
|
7
|
+
right: "右对齐",
|
|
8
|
+
justify: "两端对齐"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { platform_exports };
|
package/es/locale/sys.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
saveText: string;
|
|
3
|
-
nextStep: string;
|
|
4
|
-
ok: string;
|
|
5
|
-
cancel: string;
|
|
6
|
-
operationSuccess: string;
|
|
7
2
|
user: string;
|
|
8
3
|
chooseText: string;
|
|
9
4
|
selectedFields: string;
|
|
@@ -17,6 +12,13 @@ declare const _default: {
|
|
|
17
12
|
};
|
|
18
13
|
};
|
|
19
14
|
inputText: string;
|
|
15
|
+
ok: string;
|
|
16
|
+
cancel: string;
|
|
17
|
+
operationSuccess: string;
|
|
18
|
+
saveSuccess: string;
|
|
19
|
+
recoverSuccess: string;
|
|
20
20
|
sureToLock: string;
|
|
21
|
+
saveText: string;
|
|
22
|
+
nextStep: string;
|
|
21
23
|
};
|
|
22
24
|
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys.ts
|
|
3
|
+
var sys_exports = /* @__PURE__ */ __exportAll({ default: () => sys_default });
|
|
4
|
+
var sys_default = {
|
|
5
|
+
user: "用户",
|
|
6
|
+
chooseText: "请选择",
|
|
7
|
+
selectedFields: "已选字段",
|
|
8
|
+
okText: "确认",
|
|
9
|
+
closeText: "关闭",
|
|
10
|
+
sureToDo: "确认执行?",
|
|
11
|
+
designView: { tips: {
|
|
12
|
+
selectParent: "选择父节点",
|
|
13
|
+
delete: "删除"
|
|
14
|
+
} },
|
|
15
|
+
inputText: "请输入",
|
|
16
|
+
ok: "确定",
|
|
17
|
+
cancel: "取消",
|
|
18
|
+
operationSuccess: "操作成功",
|
|
19
|
+
saveSuccess: "保存成功",
|
|
20
|
+
recoverSuccess: "版本恢复成功",
|
|
21
|
+
sureToLock: "你确定要锁定吗?",
|
|
22
|
+
saveText: "保存",
|
|
23
|
+
nextStep: "下一步"
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { sys_exports };
|
|
@@ -52,21 +52,24 @@ export declare class DesignerRegister {
|
|
|
52
52
|
*
|
|
53
53
|
* @param {string} tag 适配器标识
|
|
54
54
|
* @param {() => IDesignerProvider} provider 设计器项
|
|
55
|
+
* @param {string} [prefix]
|
|
55
56
|
*/
|
|
56
|
-
register(tag: string, provider: () => IDesignerProvider): void;
|
|
57
|
+
register(tag: string, provider: () => IDesignerProvider, prefix?: string): void;
|
|
57
58
|
/**
|
|
58
59
|
* 设计器项适配器注销
|
|
59
60
|
*
|
|
60
61
|
* @param {string} tag
|
|
62
|
+
* @param {string} [prefix]
|
|
61
63
|
*/
|
|
62
|
-
unregister(tag: string): void;
|
|
64
|
+
unregister(tag: string, prefix?: string): void;
|
|
63
65
|
/**
|
|
64
66
|
* 根据标识获取指定适配器
|
|
65
67
|
*
|
|
66
68
|
* @param {string} tag
|
|
69
|
+
* @param {string} [prefix]
|
|
67
70
|
* @returns {*} {(IDesignerProvider | undefined)}
|
|
68
71
|
*/
|
|
69
|
-
getProvider(tag: string): IDesignerProvider | undefined;
|
|
72
|
+
getProvider(tag: string, prefix?: string): IDesignerProvider | undefined;
|
|
70
73
|
/**
|
|
71
74
|
* 获取当前所有组件 keys
|
|
72
75
|
*
|
|
@@ -57,39 +57,45 @@ var DesignerRegister = class {
|
|
|
57
57
|
*
|
|
58
58
|
* @param {string} tag 适配器标识
|
|
59
59
|
* @param {() => IDesignerProvider} provider 设计器项
|
|
60
|
+
* @param {string} [prefix]
|
|
60
61
|
*/
|
|
61
|
-
register(tag, provider) {
|
|
62
|
-
|
|
62
|
+
register(tag, provider, prefix) {
|
|
63
|
+
const fullTag = prefix ? `${prefix}:${tag}` : tag;
|
|
64
|
+
this.map.set(fullTag, provider);
|
|
63
65
|
const instance = provider();
|
|
64
|
-
this.providers.set(
|
|
65
|
-
this.hooks.register.callSync(null,
|
|
66
|
-
this.addComponent("gct-" + instance.schema.type, instance.component);
|
|
66
|
+
this.providers.set(fullTag, instance);
|
|
67
|
+
this.hooks.register.callSync(null, fullTag, instance);
|
|
68
|
+
if (!prefix) this.addComponent("gct-" + instance.schema.type, instance.component);
|
|
67
69
|
}
|
|
68
70
|
/**
|
|
69
71
|
* 设计器项适配器注销
|
|
70
72
|
*
|
|
71
73
|
* @param {string} tag
|
|
74
|
+
* @param {string} [prefix]
|
|
72
75
|
*/
|
|
73
|
-
unregister(tag) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
unregister(tag, prefix) {
|
|
77
|
+
const fullTag = prefix ? `${prefix}:${tag}` : tag;
|
|
78
|
+
this.map.delete(fullTag);
|
|
79
|
+
const instance = this.providers.get(fullTag);
|
|
76
80
|
if (instance) {
|
|
77
|
-
this.hooks.unregister.callSync(null,
|
|
78
|
-
this.providers.delete(
|
|
81
|
+
this.hooks.unregister.callSync(null, fullTag, instance);
|
|
82
|
+
this.providers.delete(fullTag);
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
/**
|
|
82
86
|
* 根据标识获取指定适配器
|
|
83
87
|
*
|
|
84
88
|
* @param {string} tag
|
|
89
|
+
* @param {string} [prefix]
|
|
85
90
|
* @returns {*} {(IDesignerProvider | undefined)}
|
|
86
91
|
*/
|
|
87
|
-
getProvider(tag) {
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
getProvider(tag, prefix) {
|
|
93
|
+
const fullTag = prefix ? `${prefix}:${tag}` : tag;
|
|
94
|
+
if (!this.providers.has(fullTag)) {
|
|
95
|
+
console.warn(`getProvider with tag ${fullTag} is not registered.`);
|
|
90
96
|
return;
|
|
91
97
|
}
|
|
92
|
-
return this.providers.get(
|
|
98
|
+
return this.providers.get(fullTag);
|
|
93
99
|
}
|
|
94
100
|
/**
|
|
95
101
|
* 获取当前所有组件 keys
|
package/es/register/index.d.ts
CHANGED
package/es/register/index.mjs
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 属性编辑器注册
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @class PropsEditorRegister
|
|
7
|
+
*/
|
|
8
|
+
export declare class PropsEditorRegister {
|
|
9
|
+
private map;
|
|
10
|
+
/**
|
|
11
|
+
* 注册属性编辑器组件
|
|
12
|
+
*
|
|
13
|
+
* @param {string} tag 属性编辑器标识
|
|
14
|
+
* @param {Component} component 属性编辑器组件
|
|
15
|
+
*/
|
|
16
|
+
register(tag: string, component: Component): void;
|
|
17
|
+
/**
|
|
18
|
+
* 获取属性编辑器组件
|
|
19
|
+
*
|
|
20
|
+
* @param {string} tag 属性编辑器标识
|
|
21
|
+
* @return {*} {(Component | undefined)} 属性编辑器组件
|
|
22
|
+
*/
|
|
23
|
+
get(tag: string): Component | undefined;
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/register/props-editor/props-editor.register.ts
|
|
2
|
+
/**
|
|
3
|
+
* 属性编辑器注册
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @class PropsEditorRegister
|
|
7
|
+
*/
|
|
8
|
+
var PropsEditorRegister = class {
|
|
9
|
+
map = /* @__PURE__ */ new Map();
|
|
10
|
+
/**
|
|
11
|
+
* 注册属性编辑器组件
|
|
12
|
+
*
|
|
13
|
+
* @param {string} tag 属性编辑器标识
|
|
14
|
+
* @param {Component} component 属性编辑器组件
|
|
15
|
+
*/
|
|
16
|
+
register(tag, component) {
|
|
17
|
+
this.map.set(tag, component);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 获取属性编辑器组件
|
|
21
|
+
*
|
|
22
|
+
* @param {string} tag 属性编辑器标识
|
|
23
|
+
* @return {*} {(Component | undefined)} 属性编辑器组件
|
|
24
|
+
*/
|
|
25
|
+
get(tag) {
|
|
26
|
+
return this.map.get(tag);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { PropsEditorRegister };
|
|
@@ -33,6 +33,7 @@ function beginDrag(data, { materialType = MaterialEnum.MaterialFormField, preLoc
|
|
|
33
33
|
const { cmpKey, attrsTransform = [] } = transformField2Component((() => {
|
|
34
34
|
if (data.createType === CreateType.SYSTEM) return FIELD_TYPE.SERIAL;
|
|
35
35
|
if (data.createType === CreateType.BUILTIN && data.key === "full_path_") return FIELD_TYPE.SERIAL;
|
|
36
|
+
if (cloneData.modelType === EntityModelTypeEnum.RDO && cloneData.rdoUniqueFieldKey && !cloneData.isFieldModel) return "rdo_input";
|
|
36
37
|
if (data.createType === CreateType.BUILTIN) {
|
|
37
38
|
if (cloneData.modelType === EntityModelTypeEnum.DYNAMIC_FORM || cloneData.modelType === "CHECK_LIST") {
|
|
38
39
|
if (cloneData.key === "type_") return FormComponents.DynamicFormType;
|
|
@@ -41,7 +42,6 @@ function beginDrag(data, { materialType = MaterialEnum.MaterialFormField, preLoc
|
|
|
41
42
|
else if (cloneData.key === "show_type_") return FormComponents.DynamicFormShowType;
|
|
42
43
|
}
|
|
43
44
|
if (cloneData.key === "workflow_step_nodes_" || cloneData.key === "operations_") return "workflow_nodes";
|
|
44
|
-
if (cloneData.modelType === EntityModelTypeEnum.RDO && cloneData.rdoUniqueFieldKey && !cloneData.isFieldModel) return "rdo_input";
|
|
45
45
|
if ((cloneData.key === "name_" || cloneData.key === "table_name_") && cloneData.modelType === EntityModelTypeEnum.WORKFLOW && !cloneData.isFieldModel) return "rdo_input";
|
|
46
46
|
}
|
|
47
47
|
if (cloneData.type === FIELD_TYPE.MASTERSLAVE && cloneData.refModelType === EntityModelTypeEnum.DYNAMIC_FORM) return FormComponents.DynamicTable;
|
|
@@ -66,7 +66,7 @@ var displayEditor = [
|
|
|
66
66
|
label: "sys.pageDesigner.deviceConnectivity",
|
|
67
67
|
group: PropGroup.FIELD_CONFIG,
|
|
68
68
|
hidden: (widget) => {
|
|
69
|
-
return widget.platform !== Platform.WEB || ![MaterialEnum.MaterialFormField].includes(widget.materialType) || !deviceFields.includes(widget.props.fieldType);
|
|
69
|
+
return widget.platform !== Platform.WEB || ![MaterialEnum.MaterialFormField].includes(widget.materialType) || !deviceFields.includes(widget.props.fieldType) || widget.props.fieldReadonly;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
];
|
|
@@ -29,18 +29,27 @@ function setupOverride() {
|
|
|
29
29
|
console.debug("正在注册字段编辑器覆写配置");
|
|
30
30
|
FieldEditorOverrideRegistry.register(MaterialEnum.MaterialTableField, {
|
|
31
31
|
propEditor: (selectedRef, defaultList) => {
|
|
32
|
+
if (selectedRef.isField !== true) return;
|
|
32
33
|
return FieldOverrideUtil.tableVTablePropEditor(selectedRef, defaultList);
|
|
33
34
|
},
|
|
34
|
-
styleEditor: (
|
|
35
|
+
styleEditor: (selectedRef, _defaultWidget) => {
|
|
36
|
+
if (selectedRef.isField !== true) return;
|
|
37
|
+
return runStyleEditor();
|
|
38
|
+
}
|
|
35
39
|
});
|
|
36
40
|
FieldEditorOverrideRegistry.register(MaterialEnum.MaterialEmbedTableField, {
|
|
37
41
|
propEditor: (selectedRef, defaultList) => {
|
|
42
|
+
if (selectedRef.isField !== true) return;
|
|
38
43
|
return FieldOverrideUtil.tableVTablePropEditor(selectedRef, defaultList);
|
|
39
44
|
},
|
|
40
|
-
styleEditor: (
|
|
45
|
+
styleEditor: (selectedRef, _defaultWidget) => {
|
|
46
|
+
if (selectedRef.isField !== true) return;
|
|
47
|
+
return runStyleEditor();
|
|
48
|
+
}
|
|
41
49
|
});
|
|
42
50
|
FieldEditorOverrideRegistry.register(MaterialEnum.MaterialSubTableField, {
|
|
43
51
|
propEditor: (selectedRef, defaultList, preCompInfo) => {
|
|
52
|
+
if (selectedRef.isField !== true) return;
|
|
44
53
|
if (preCompInfo && preCompInfo.props?.editMode === SUB_TABLE_EDIT_MODE.MODAL) return FieldOverrideUtil.runTableSelectPropEditor(selectedRef, "subTable2Field");
|
|
45
54
|
const { platform } = selectedRef;
|
|
46
55
|
if (platform === Platform.PAD) {
|
|
@@ -50,14 +59,19 @@ function setupOverride() {
|
|
|
50
59
|
if (platform === Platform.WEB) return webRunPropEditor(defaultList);
|
|
51
60
|
},
|
|
52
61
|
styleEditor: (selectedRef, _defaultWidget) => {
|
|
62
|
+
if (selectedRef.isField !== true) return;
|
|
53
63
|
return selectedRef.platform === Platform.WEB ? runStyleEditor() : mobileRunSubTableStyleEditor();
|
|
54
64
|
}
|
|
55
65
|
});
|
|
56
66
|
FieldEditorOverrideRegistry.register(MaterialEnum.MaterialTableSelectField, {
|
|
57
67
|
propEditor: (selectedRef, _defaultList) => {
|
|
68
|
+
if (selectedRef.isField !== true) return;
|
|
58
69
|
return FieldOverrideUtil.runTableSelectPropEditor(selectedRef);
|
|
59
70
|
},
|
|
60
|
-
styleEditor: (
|
|
71
|
+
styleEditor: (selectedRef, _defaultWidget) => {
|
|
72
|
+
if (selectedRef.isField !== true) return;
|
|
73
|
+
return runStyleEditor();
|
|
74
|
+
}
|
|
61
75
|
});
|
|
62
76
|
}
|
|
63
77
|
setupOverride();
|
package/es/setup-app.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
export declare function designSetupApp(_app: App): Promise<void>;
|
package/es/setup-app.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { designInterceptors } from "./utils/design-interceptors/design-interceptors.mjs";
|
|
2
2
|
import { onWidgetInfoInit } from "./utils/init-widget-info/init-widget-info.mjs";
|
|
3
3
|
import "./utils/index.mjs";
|
|
4
|
+
import { registerDesignLocale } from "./locale/auto-register.mjs";
|
|
4
5
|
import { HttpUtil } from "@gct-paas/api";
|
|
5
6
|
//#region src/setup-app.ts
|
|
6
|
-
async function designSetupApp() {
|
|
7
|
+
async function designSetupApp(_app) {
|
|
8
|
+
registerDesignLocale();
|
|
7
9
|
onWidgetInfoInit();
|
|
8
10
|
HttpUtil.use(designInterceptors);
|
|
9
11
|
await _gct.store.loadAppInfo();
|
package/es/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@gct-paas/core/types';
|
|
2
|
-
import type { DesignerRegister } from '../register';
|
|
2
|
+
import type { DesignerRegister, PropsEditorRegister } from '../register';
|
|
3
3
|
|
|
4
4
|
declare module '@gct-paas/core' {
|
|
5
5
|
interface IGlobalRegister {
|
|
@@ -7,6 +7,7 @@ declare module '@gct-paas/core' {
|
|
|
7
7
|
pad: DesignerRegister;
|
|
8
8
|
mobile: DesignerRegister;
|
|
9
9
|
web: DesignerRegister;
|
|
10
|
+
propsEditor: PropsEditorRegister;
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -9,7 +9,7 @@ import { AxiosHeaders } from "axios";
|
|
|
9
9
|
function designInterceptors(axios) {
|
|
10
10
|
axios.interceptors.request.use((config) => {
|
|
11
11
|
if (!config.headers) config.headers = new AxiosHeaders();
|
|
12
|
-
config.headers.Env =
|
|
12
|
+
config.headers.Env = _gct.env.getEnv();
|
|
13
13
|
config.headers.source = 501;
|
|
14
14
|
if (!config.headers["App-Tag"]) {
|
|
15
15
|
config.headers["App-Tag"] = _gct.store.context.aid;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "6.0.0-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面底包",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"@ant-design/icons-vue": "^7.0.1",
|
|
35
35
|
"@babel/core": "^7.29.0",
|
|
36
36
|
"@babel/standalone": "^7.29.2",
|
|
37
|
-
"@gct-paas/api": "^0.
|
|
37
|
+
"@gct-paas/api": "^6.0.0-dev.2",
|
|
38
38
|
"@jsplumb/browser-ui": "^6.2.10",
|
|
39
39
|
"@vueuse/core": "^14.1.0",
|
|
40
|
-
"ant-design-vue": "
|
|
40
|
+
"ant-design-vue": "npm:@gct-paas/ant-design-vue@3.2.21",
|
|
41
41
|
"async-validator": "^4.2.5",
|
|
42
42
|
"axios": "^1.13.2",
|
|
43
43
|
"colord": "^2.9.3",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"react-dnd-html5-backend": "^16.0.1",
|
|
52
52
|
"vue": "^3.5.30",
|
|
53
53
|
"vue3-dnd": "^2.1.0",
|
|
54
|
-
"@gct-paas/core-web": "0.
|
|
55
|
-
"@gct-paas/core": "0.
|
|
56
|
-
"@gct-paas/schema": "0.
|
|
57
|
-
"@gct-paas/scss": "0.
|
|
54
|
+
"@gct-paas/core-web": "6.0.0-dev.1",
|
|
55
|
+
"@gct-paas/core": "6.0.0-dev.1",
|
|
56
|
+
"@gct-paas/schema": "6.0.0-dev.1",
|
|
57
|
+
"@gct-paas/scss": "6.0.0-dev.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/babel__core": "^7.20.5",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"@types/estraverse": "^5.1.7"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@gct-paas/api": "^0.
|
|
65
|
+
"@gct-paas/api": "^6.0.0-dev.2",
|
|
66
66
|
"vue": ">=3",
|
|
67
|
-
"@gct-paas/core": "0.
|
|
68
|
-
"@gct-paas/core-web": "0.
|
|
69
|
-
"@gct-paas/
|
|
70
|
-
"@gct-paas/
|
|
67
|
+
"@gct-paas/core": "6.0.0-dev.1",
|
|
68
|
+
"@gct-paas/core-web": "6.0.0-dev.1",
|
|
69
|
+
"@gct-paas/schema": "6.0.0-dev.1",
|
|
70
|
+
"@gct-paas/scss": "6.0.0-dev.1"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
/* stylelint-disable scss/no-global-function-names */
|
|
3
|
-
/* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
|
|
4
|
-
/**
|
|
5
|
-
* 定义 Block 块
|
|
6
|
-
* @param {String} $block - Block 块名称
|
|
7
|
-
* @example
|
|
8
|
-
* @include b('button') {
|
|
9
|
-
* padding: 10px;
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* 定义 Element 元素
|
|
14
|
-
* @param {String|List} $element - Element 元素名称,支持单个或多个
|
|
15
|
-
* @example
|
|
16
|
-
* @include b('button') {
|
|
17
|
-
* @include e('text') {
|
|
18
|
-
* color: #000;
|
|
19
|
-
* }
|
|
20
|
-
* }
|
|
21
|
-
* // 或传入多个元素
|
|
22
|
-
* @include b('button') {
|
|
23
|
-
* @include e(('text', 'icon')) {
|
|
24
|
-
* margin: 5px;
|
|
25
|
-
* }
|
|
26
|
-
* }
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* 定义 Modifier 修饰符
|
|
30
|
-
* @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
|
|
31
|
-
* @example
|
|
32
|
-
* @include b('button') {
|
|
33
|
-
* @include m('primary') {
|
|
34
|
-
* background: blue;
|
|
35
|
-
* }
|
|
36
|
-
* }
|
|
37
|
-
* // 或传入多个修饰符
|
|
38
|
-
* @include b('button') {
|
|
39
|
-
* @include m(('primary', 'large')) {
|
|
40
|
-
* background: blue;
|
|
41
|
-
* font-size: 16px;
|
|
42
|
-
* }
|
|
43
|
-
* }
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* 定义状态选择器
|
|
47
|
-
* @param {String} $state - 状态名称
|
|
48
|
-
* @example
|
|
49
|
-
* @include b('button') {
|
|
50
|
-
* @include when('disabled') {
|
|
51
|
-
* opacity: 0.5;
|
|
52
|
-
* }
|
|
53
|
-
* }
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* 深色主题样式
|
|
57
|
-
* @param {String} $block - Block 块名称
|
|
58
|
-
* @example
|
|
59
|
-
* @include dark('button') {
|
|
60
|
-
* background: #333;
|
|
61
|
-
* color: #fff;
|
|
62
|
-
* }
|
|
63
|
-
*/
|
|
64
|
-
/* stylelint-disable scss/no-global-function-names */
|
|
65
|
-
.gct-design-save-tip {
|
|
66
|
-
position: relative;
|
|
67
|
-
padding: var(--gct-padding-7);
|
|
68
|
-
padding-left: 38px;
|
|
69
|
-
width: 316px;
|
|
70
|
-
height: 140px;
|
|
71
|
-
}
|
|
72
|
-
.gct-design-save-tip__tip-icon {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 17px;
|
|
75
|
-
left: 16px;
|
|
76
|
-
font-size: 16px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.gct-design-save-tip__header {
|
|
80
|
-
font-size: 14px;
|
|
81
|
-
font-weight: bold;
|
|
82
|
-
color: #1A1D23;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.gct-design-save-tip__content {
|
|
86
|
-
font-size: 14px;
|
|
87
|
-
margin-top: 2px;
|
|
88
|
-
color: var(--gct-color-text-4);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.gct-design-save-tip__footer {
|
|
92
|
-
margin-top: 16px;
|
|
93
|
-
}
|
|
94
|
-
.gct-design-save-tip__footer .ant-btn-link {
|
|
95
|
-
padding-left: 0;
|
|
96
|
-
padding-right: 0;
|
|
97
|
-
margin-right: 40px;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.gct-design-save-tip__cancel-btn {
|
|
101
|
-
width: 62px;
|
|
102
|
-
margin-right: 12px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.gct-design-save-tip__save-exit {
|
|
106
|
-
width: 90px;
|
|
107
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { IModal } from '@gct-paas/core';
|
|
3
|
-
export declare const DesignSaveTip: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
-
modal: {
|
|
5
|
-
type: PropType<IModal>;
|
|
6
|
-
required: true;
|
|
7
|
-
};
|
|
8
|
-
title: {
|
|
9
|
-
type: StringConstructor;
|
|
10
|
-
default: () => string;
|
|
11
|
-
};
|
|
12
|
-
content: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: () => string;
|
|
15
|
-
};
|
|
16
|
-
exit: {
|
|
17
|
-
type: PropType<() => void>;
|
|
18
|
-
};
|
|
19
|
-
saveAndExit: {
|
|
20
|
-
type: PropType<() => void>;
|
|
21
|
-
};
|
|
22
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
23
|
-
modal: {
|
|
24
|
-
type: PropType<IModal>;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
title: {
|
|
28
|
-
type: StringConstructor;
|
|
29
|
-
default: () => string;
|
|
30
|
-
};
|
|
31
|
-
content: {
|
|
32
|
-
type: StringConstructor;
|
|
33
|
-
default: () => string;
|
|
34
|
-
};
|
|
35
|
-
exit: {
|
|
36
|
-
type: PropType<() => void>;
|
|
37
|
-
};
|
|
38
|
-
saveAndExit: {
|
|
39
|
-
type: PropType<() => void>;
|
|
40
|
-
};
|
|
41
|
-
}>> & Readonly<{}>, {
|
|
42
|
-
title: string;
|
|
43
|
-
content: string;
|
|
44
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import './design-save-tip.css';/* empty css */
|
|
2
|
-
import { t, useNamespace } from "@gct-paas/core";
|
|
3
|
-
import { createVNode, defineComponent, isVNode, resolveComponent } from "vue";
|
|
4
|
-
//#region src/components/design-save-tip/design-save-tip.tsx
|
|
5
|
-
function _isSlot(s) {
|
|
6
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
7
|
-
}
|
|
8
|
-
var DesignSaveTip = /* @__PURE__ */ defineComponent({
|
|
9
|
-
name: "DesignSaveTip",
|
|
10
|
-
props: {
|
|
11
|
-
modal: {
|
|
12
|
-
type: Object,
|
|
13
|
-
required: true
|
|
14
|
-
},
|
|
15
|
-
title: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: () => {
|
|
18
|
-
return t("sys.cardDesign.back_info.title");
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
content: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: () => {
|
|
24
|
-
return t("sys.cardDesign.back_info.content");
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
exit: { type: Function },
|
|
28
|
-
saveAndExit: { type: Function }
|
|
29
|
-
},
|
|
30
|
-
setup(props) {
|
|
31
|
-
const ns = useNamespace("design-save-tip");
|
|
32
|
-
/**
|
|
33
|
-
* 继续编辑
|
|
34
|
-
*/
|
|
35
|
-
function onContinue() {
|
|
36
|
-
props.modal.dismiss({ ok: false });
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 不保存并退出
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
function onNotSave() {
|
|
43
|
-
if (props.exit) props.exit();
|
|
44
|
-
props.modal.dismiss({ ok: true });
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 保存并退出
|
|
48
|
-
*/
|
|
49
|
-
function onSaveAndExit() {
|
|
50
|
-
if (props.saveAndExit) props.saveAndExit();
|
|
51
|
-
props.modal.dismiss({ ok: true });
|
|
52
|
-
}
|
|
53
|
-
return () => {
|
|
54
|
-
let _slot, _slot2, _slot3;
|
|
55
|
-
return createVNode("div", { "class": ns.b() }, [
|
|
56
|
-
createVNode("div", { "class": ns.e("tip-icon") }, [createVNode(resolveComponent("assets-svg-icon"), { "src": "/extras-assets/design-view/exclamation-circle.svg" }, null)]),
|
|
57
|
-
createVNode("div", { "class": ns.e("header") }, [props.title]),
|
|
58
|
-
createVNode("div", { "class": ns.e("content") }, [props.content]),
|
|
59
|
-
createVNode("div", { "class": ns.e("footer") }, [
|
|
60
|
-
createVNode(resolveComponent("a-button"), {
|
|
61
|
-
"type": "link",
|
|
62
|
-
"onClick": onContinue
|
|
63
|
-
}, _isSlot(_slot = t("sys.app.continueEdit")) ? _slot : { default: () => [_slot] }),
|
|
64
|
-
createVNode(resolveComponent("a-button"), {
|
|
65
|
-
"class": ns.e("cancel-btn"),
|
|
66
|
-
"size": "small",
|
|
67
|
-
"onClick": onNotSave
|
|
68
|
-
}, _isSlot(_slot2 = t("sys.cardDesign.back_info.notSave")) ? _slot2 : { default: () => [_slot2] }),
|
|
69
|
-
createVNode(resolveComponent("a-button"), {
|
|
70
|
-
"class": ns.e("save-exit"),
|
|
71
|
-
"type": "primary",
|
|
72
|
-
"size": "small",
|
|
73
|
-
"onClick": onSaveAndExit
|
|
74
|
-
}, _isSlot(_slot3 = t("sys.cardDesign.back_info.saveAndExit")) ? _slot3 : { default: () => [_slot3] })
|
|
75
|
-
])
|
|
76
|
-
]);
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
//#endregion
|
|
81
|
-
export { DesignSaveTip };
|