@gct-paas/design 0.1.6-dev.3 → 0.1.6-dev.30

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.
Files changed (88) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/loader.esm.min.js +2 -1
  3. package/es/components/field-transfer/components/field-transfer-modal.vue.mjs +2 -2
  4. package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_style_index_0_scoped_2f34388d_lang.css +8 -0
  5. package/es/components/index.d.ts +0 -4
  6. package/es/components/index.mjs +0 -5
  7. package/es/components/mobile-container/mobile-container.d.ts +2 -2
  8. package/es/components/user-occupy/index.d.ts +0 -1
  9. package/es/components/user-occupy/index.mjs +0 -1
  10. package/es/components/user-occupy/user-lock.vue.mjs +2 -2
  11. package/es/components/user-occupy/user-lock.vue_vue_type_script_setup_true_lang.mjs +2 -1
  12. package/es/components/user-occupy/user-lock.vue_vue_type_style_index_0_scoped_143659f6_lang.css +29 -0
  13. package/es/components/user-occupy/user-occupy.vue.mjs +2 -2
  14. package/es/components/user-occupy/user-occupy.vue_vue_type_script_setup_true_lang.mjs +2 -1
  15. 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
  16. package/es/constant/index.d.ts +5 -0
  17. package/es/constant/index.mjs +6 -1
  18. package/es/constant/page-designer.d.ts +9 -36
  19. package/es/constant/page-designer.mjs +2 -32
  20. package/es/create-app-vue.d.ts +1 -1
  21. package/es/create-app-vue.mjs +1 -1
  22. package/es/{components/user-occupy → hooks/design-view/components}/useUserOccupy.d.ts +3 -3
  23. package/es/{components/user-occupy → hooks/design-view/components}/useUserOccupy.mjs +48 -27
  24. package/es/hooks/design-view/design-state.d.ts +91 -1
  25. package/es/hooks/design-view/design-state.mjs +7 -7
  26. package/es/hooks/design-view/designer/useDesignCache.mjs +2 -3
  27. package/es/hooks/design-view/designer/useDesignPreview.mjs +11 -5
  28. package/es/hooks/design-view/designer/useDesignSave.d.ts +2 -2
  29. package/es/hooks/design-view/designer/useDesignSave.mjs +131 -21
  30. package/es/hooks/design-view/layout/useToolkit.d.ts +1 -1
  31. package/es/hooks/design-view/layout/useToolkit.mjs +123 -82
  32. package/es/hooks/design-view/page/usePage.d.ts +12 -7
  33. package/es/hooks/design-view/page/usePage.mjs +131 -8
  34. package/es/hooks/design-view/useDesigner.d.ts +6 -2
  35. package/es/hooks/design-view/useDesigner.mjs +14 -3
  36. package/es/hooks/design-view/widget/useSelectedWidget.mjs +55 -28
  37. package/es/hooks/design-view/widget/useWidget.mjs +2 -1
  38. package/es/hooks/index.d.ts +1 -1
  39. package/es/hooks/index.mjs +1 -1
  40. package/es/index.d.ts +1 -0
  41. package/es/index.mjs +10 -12
  42. package/es/interface/index.d.ts +0 -1
  43. package/es/locale/auto-register.d.ts +2 -0
  44. package/es/locale/auto-register.mjs +25 -0
  45. package/es/locale/sys/app.mjs +6 -0
  46. package/es/locale/sys/appDesigner.mjs +9 -0
  47. package/es/locale/sys/cardDesign.d.ts +4 -4
  48. package/es/locale/sys/cardDesign.mjs +17 -0
  49. package/es/locale/sys/component.mjs +21 -0
  50. package/es/locale/sys/model.mjs +10 -0
  51. package/es/locale/sys/pageDesigner.mjs +32 -0
  52. package/es/locale/sys/platform.mjs +11 -0
  53. package/es/locale/sys.d.ts +7 -5
  54. package/es/locale/sys.mjs +26 -0
  55. package/es/props/design-plugin-props.d.ts +64 -0
  56. package/es/props/design-plugin-props.mjs +59 -0
  57. package/es/props/index.d.ts +1 -0
  58. package/es/register/designer-register/designer-register.d.ts +6 -3
  59. package/es/register/designer-register/designer-register.mjs +20 -14
  60. package/es/register/index.d.ts +1 -0
  61. package/es/register/index.mjs +1 -0
  62. package/es/register/props-editor/props-editor.register.d.ts +24 -0
  63. package/es/register/props-editor/props-editor.register.mjs +30 -0
  64. package/es/schema/begin-drag/begin-drag.mjs +1 -1
  65. package/es/schema/field/index.mjs +17 -3
  66. package/es/setup-app.d.ts +2 -1
  67. package/es/setup-app.mjs +3 -1
  68. package/es/types/index.d.ts +2 -1
  69. package/package.json +11 -11
  70. package/es/components/design-save-tip/design-save-tip.css +0 -107
  71. package/es/components/design-save-tip/design-save-tip.d.ts +0 -44
  72. package/es/components/design-save-tip/design-save-tip.mjs +0 -81
  73. package/es/components/design-step-check/design-step-check.css +0 -133
  74. package/es/components/design-step-check/design-step-check.d.ts +0 -30
  75. package/es/components/design-step-check/design-step-check.mjs +0 -96
  76. package/es/components/design-view-layout/design-view-layout.css +0 -157
  77. package/es/components/design-view-layout/design-view-layout.d.ts +0 -1
  78. package/es/components/design-view-layout/design-view-layout.mjs +0 -139
  79. package/es/components/field-transfer/components/field-transfer-modal.vue_vue_type_style_index_0_scoped_711e6992_lang.css +0 -8
  80. package/es/components/modal-name-editor/modal-name-editor.css +0 -117
  81. package/es/components/modal-name-editor/modal-name-editor.d.ts +0 -34
  82. package/es/components/modal-name-editor/modal-name-editor.mjs +0 -124
  83. package/es/components/user-occupy/occupy.const.d.ts +0 -4
  84. package/es/components/user-occupy/occupy.const.mjs +0 -7
  85. package/es/components/user-occupy/user-lock.vue_vue_type_style_index_0_scoped_b40d46ff_lang.css +0 -29
  86. package/es/hooks/develop/useKeyParser.d.ts +0 -16
  87. package/es/hooks/develop/useKeyParser.mjs +0 -79
  88. package/es/interface/i-view-step/i-view-step.d.ts +0 -32
@@ -1,117 +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-modal-name-editor__name {
66
- overflow: hidden;
67
- text-overflow: ellipsis;
68
- white-space: nowrap;
69
- max-width: 300px;
70
- }
71
-
72
- .gct-modal-name-editor.is-edit {
73
- cursor: default;
74
- }
75
-
76
- .gct-modal-name-editor__input {
77
- display: flex;
78
- position: relative;
79
- align-items: center;
80
- }
81
- .gct-modal-name-editor__input .anticon-loading {
82
- margin-right: var(--gct-spacing-4);
83
- }
84
- .gct-modal-name-editor__input .ant-input.ant-input-sm {
85
- padding: 0;
86
- color: rgb(var(--gct-color-text-1));
87
- }
88
- .gct-modal-name-editor__input .ant-input.ant-input-sm.ant-input-disabled {
89
- background-color: transparent;
90
- }
91
- .gct-modal-name-editor__input .ant-input[disabled] {
92
- color: rgb(var(--gct-color-text-1));
93
- }
94
-
95
- .gct-modal-name-editor__error-info {
96
- font-size: 12px;
97
- line-height: 16px;
98
- position: absolute;
99
- z-index: 10000;
100
- top: 24px;
101
- padding: var(--gct-padding-2);
102
- border-radius: var(--gct-border-radius-s);
103
- background-color: var(--gct-color-danger-light-hover);
104
- color: var(--gct-color-danger-hover);
105
- }
106
-
107
- .gct-modal-name-editor__edit {
108
- margin-left: var(--gct-spacing-4);
109
- color: rgb(var(--gct-colo-text-1));
110
- }
111
-
112
- .gct-modal-name-editor {
113
- display: flex;
114
- align-items: center;
115
- height: 22px;
116
- cursor: pointer;
117
- }
@@ -1,34 +0,0 @@
1
- export declare const ModalNameEditor: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- value: {
3
- type: StringConstructor;
4
- default: string;
5
- };
6
- defaultName: {
7
- type: StringConstructor;
8
- default: string;
9
- };
10
- max: {
11
- type: NumberConstructor;
12
- default: number;
13
- };
14
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("change" | "update:value")[], "change" | "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
- value: {
16
- type: StringConstructor;
17
- default: string;
18
- };
19
- defaultName: {
20
- type: StringConstructor;
21
- default: string;
22
- };
23
- max: {
24
- type: NumberConstructor;
25
- default: number;
26
- };
27
- }>> & Readonly<{
28
- onChange?: ((...args: any[]) => any) | undefined;
29
- "onUpdate:value"?: ((...args: any[]) => any) | undefined;
30
- }>, {
31
- value: string;
32
- defaultName: string;
33
- max: number;
34
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,124 +0,0 @@
1
- import './modal-name-editor.css';/* empty css */
2
- import { useNamespace } from "@gct-paas/core";
3
- import { computed, createVNode, defineComponent, nextTick, ref, resolveComponent, watch } from "vue";
4
- import { onClickOutside } from "@vueuse/core";
5
- //#region src/components/modal-name-editor/modal-name-editor.tsx
6
- var ModalNameEditor = /* @__PURE__ */ defineComponent({
7
- name: "ModalNameEditor",
8
- props: {
9
- value: {
10
- type: String,
11
- default: "未命名"
12
- },
13
- defaultName: {
14
- type: String,
15
- default: "未命名名称"
16
- },
17
- max: {
18
- type: Number,
19
- default: 100
20
- }
21
- },
22
- emits: ["update:value", "change"],
23
- setup(props, { emit }) {
24
- const ns = useNamespace("modal-name-editor");
25
- const isEdit = ref(false);
26
- const nameInputRef = ref();
27
- const name = ref(props.value);
28
- const displayName = computed(() => {
29
- return name.value || props.defaultName;
30
- });
31
- const isError = computed(() => {
32
- if (displayName.value.length > props.max) return true;
33
- return false;
34
- });
35
- watch(() => props.value, () => {
36
- if (name.value !== props.value) name.value = props.value;
37
- });
38
- const isSaving = ref(false);
39
- const hasUserModified = ref(false);
40
- const val = computed({
41
- get() {
42
- if (isEdit.value && hasUserModified.value) return name.value;
43
- return displayName.value;
44
- },
45
- set(val) {
46
- hasUserModified.value = true;
47
- const trimmedVal = val.trim();
48
- if (name.value !== trimmedVal) {
49
- name.value = trimmedVal;
50
- emit("update:value", trimmedVal);
51
- }
52
- }
53
- });
54
- const onEditName = () => {
55
- isEdit.value = true;
56
- hasUserModified.value = false;
57
- nextTick(() => {
58
- nameInputRef.value.focus();
59
- nameInputRef.value.select();
60
- });
61
- };
62
- const onSaveName = async () => {
63
- if (name.value && name.value.trim()) {
64
- isSaving.value = true;
65
- try {
66
- emit("update:value", name.value);
67
- } finally {
68
- isSaving.value = false;
69
- }
70
- }
71
- isEdit.value = false;
72
- hasUserModified.value = false;
73
- };
74
- const onBlurOrEnter = () => {
75
- if (isEdit.value) {
76
- if (isError.value === true) {
77
- nextTick(() => {
78
- nameInputRef.value.focus();
79
- nameInputRef.value.select();
80
- });
81
- return;
82
- }
83
- onSaveName();
84
- isEdit.value = false;
85
- }
86
- };
87
- onClickOutside(nameInputRef, async () => {
88
- onBlurOrEnter();
89
- });
90
- const onChange = () => {
91
- emit("change");
92
- };
93
- return () => {
94
- return createVNode("div", { "class": ns.b() }, [
95
- createVNode("div", {
96
- "class": [ns.e("name"), ns.is("hidden", isEdit.value)],
97
- "title": val.value,
98
- "onDblclick": onEditName
99
- }, [val.value]),
100
- createVNode("div", { "class": [ns.e("input"), ns.is("hidden", !isEdit.value)] }, [
101
- isSaving.value ? createVNode(resolveComponent("loading-outlined"), null, null) : null,
102
- createVNode(resolveComponent("a-input"), {
103
- "value": val.value,
104
- "onUpdate:value": ($event) => val.value = $event,
105
- "ref": nameInputRef,
106
- "size": "small",
107
- "bordered": false,
108
- "onBlur": onBlurOrEnter,
109
- "onPressEnter": onBlurOrEnter,
110
- "disabled": isSaving.value,
111
- "onChange": onChange
112
- }, null),
113
- createVNode("div", { "class": [ns.e("error-info"), ns.is("hidden", !isError.value)] }, [`最大${props.max}字`])
114
- ]),
115
- createVNode("div", {
116
- "class": [ns.e("edit"), ns.is("hidden", isEdit.value)],
117
- "onClick": onEditName
118
- }, [createVNode("i", { "class": "iconfont icon-bianji" }, null)])
119
- ]);
120
- };
121
- }
122
- });
123
- //#endregion
124
- export { ModalNameEditor };
@@ -1,4 +0,0 @@
1
- /**
2
- * occupy 的 mqtt 唯一实例的 key 标识
3
- */
4
- export declare const OCCUPY_MQTT_KEY = "occupy_mqtt_key";
@@ -1,7 +0,0 @@
1
- //#region src/components/user-occupy/occupy.const.ts
2
- /**
3
- * occupy 的 mqtt 唯一实例的 key 标识
4
- */
5
- var OCCUPY_MQTT_KEY = "occupy_mqtt_key";
6
- //#endregion
7
- export { OCCUPY_MQTT_KEY };
@@ -1,29 +0,0 @@
1
- .user-lock[data-v-b40d46ff] {
2
- color: rgba(255, 255, 255, 0.72);
3
- cursor: pointer;
4
- }
5
- .user-lock .user-lock-info[data-v-b40d46ff] {
6
- padding-right: 4px;
7
- color: rgba(255, 255, 255, 0.72);
8
- }
9
- .user-lock .iconfont[data-v-b40d46ff] {
10
- color: rgba(255, 255, 255, 0.72);
11
- margin-right: 6px;
12
- margin-left: 6px;
13
- }
14
- .user-lock[data-v-b40d46ff]:hover {
15
- color: #ffffff;
16
- }
17
- .user-lock:hover .iconfont[data-v-b40d46ff],
18
- .user-lock:hover .user-lock-info[data-v-b40d46ff] {
19
- color: #ffffff;
20
- }
21
- .user-lock.locked[data-v-b40d46ff] {
22
- color: #ff8c4b;
23
- }
24
- .user-lock.locked .iconfont[data-v-b40d46ff] {
25
- color: #ff8c4b;
26
- }
27
- .user-lock.locked .user-lock-info[data-v-b40d46ff] {
28
- color: #ffffff;
29
- }
@@ -1,16 +0,0 @@
1
- import { Ref } from 'vue';
2
- /**
3
- * key值转换器
4
- * @param prefix 前缀
5
- * @param suffix 后缀 仅空字符串代表不需要后缀
6
- * @returns
7
- */
8
- export declare function useKeyParser(prefix: Ref<string | undefined> | string, suffix?: Ref<string | undefined> | string): {
9
- keyPrefix: Ref<string, string>;
10
- keySuffix: Ref<string, string>;
11
- keyReset: () => void;
12
- keyPad: (key: string) => string | undefined;
13
- keyClip: (formKey: string) => string;
14
- keyPrePad: (key: string) => string | undefined;
15
- keyPreClip: (formKey: string) => string;
16
- };
@@ -1,79 +0,0 @@
1
- import { ProjectName } from "@gct-paas/core";
2
- import { isRef, ref, unref, watch } from "vue";
3
- //#region src/hooks/develop/useKeyParser.ts
4
- var SourceTypeEnum = /* @__PURE__ */ function(SourceTypeEnum) {
5
- SourceTypeEnum["SELF_BUILT"] = "SELF_BUILT";
6
- SourceTypeEnum["IMPORT"] = "IMPORT";
7
- return SourceTypeEnum;
8
- }(SourceTypeEnum || {});
9
- /**
10
- * key值转换器
11
- * @param prefix 前缀
12
- * @param suffix 后缀 仅空字符串代表不需要后缀
13
- * @returns
14
- */
15
- function useKeyParser(prefix, suffix) {
16
- const hasDollar = ref(false);
17
- const upperCase = ref(false);
18
- const keyPrefix = ref("");
19
- const keySuffix = ref("");
20
- const branchId = _gct.store.context.bid || "";
21
- function keyReset() {
22
- const prefixString = unref(prefix);
23
- const suffixString = unref(suffix);
24
- if (!prefixString) return;
25
- hasDollar.value = prefixString.startsWith("$");
26
- upperCase.value = /\$?[A-Z]+_/.test(prefixString);
27
- keyPrefix.value = (hasDollar.value ? "$" : "") + (_gct.store.appInfo.sourceType === SourceTypeEnum.IMPORT ? upperCase.value ? "I" : "i" : "") + (hasDollar.value ? prefixString.substring(1) : prefixString) + (prefixString.endsWith("_") ? "" : "_");
28
- keySuffix.value = suffixString === "" ? "" : _gct.store.projectName === ProjectName.WEB_RENDER ? "" : branchId ? "_" + (upperCase.value ? branchId.toUpperCase() : branchId) : "";
29
- }
30
- keyReset();
31
- if (isRef(prefix)) watch(prefix, () => {
32
- keyReset();
33
- });
34
- if (isRef(suffix)) watch(suffix, () => {
35
- keyReset();
36
- });
37
- /**
38
- * 补全key信息 包含 导入信息 模块信息 分支信息
39
- * @param key
40
- * @returns
41
- */
42
- function keyPad(key) {
43
- if (!key) return;
44
- return `${keyPrefix.value}${key}${keySuffix.value}`;
45
- }
46
- /**
47
- * 裁剪key
48
- * @param key
49
- */
50
- function keyClip(formKey) {
51
- const id = unref(prefix).match(/\$?(([a-zA-Z]+_)*[a-zA-Z]+)_?/)[1];
52
- const prefixPos = formKey.indexOf(id) + id.length;
53
- const suffixPos = !keySuffix.value || unref(suffix) === "" ? formKey.length : formKey.lastIndexOf("_");
54
- keyPrefix.value = formKey.substring(0, prefixPos + 1);
55
- keySuffix.value = formKey.substring(suffixPos);
56
- return formKey.substring(prefixPos + 1, suffixPos);
57
- }
58
- function keyPreClip(formKey) {
59
- const id = unref(prefix).match(/\$?(([a-zA-Z]+_)*[a-zA-Z]+)_?/)[1];
60
- const prefixPos = formKey.indexOf(id) + id.length;
61
- keyPrefix.value = formKey.substring(0, prefixPos + 1);
62
- return formKey.substring(prefixPos + 1);
63
- }
64
- function keyPrePad(key) {
65
- if (!key) return;
66
- return `${keyPrefix.value}${key}`;
67
- }
68
- return {
69
- keyPrefix,
70
- keySuffix,
71
- keyReset,
72
- keyPad,
73
- keyClip,
74
- keyPrePad,
75
- keyPreClip
76
- };
77
- }
78
- //#endregion
79
- export { useKeyParser };
@@ -1,32 +0,0 @@
1
- /**
2
- * 设计视图步骤接口
3
- *
4
- * @export
5
- * @interface IViewStep
6
- */
7
- export interface IViewStep {
8
- /**
9
- * 步骤标识符
10
- *
11
- * @type {string}
12
- */
13
- tag: string;
14
- /**
15
- * 步骤名称
16
- *
17
- * @type {string}
18
- */
19
- name: string;
20
- /**
21
- * 步骤图标(只支持 svg)
22
- *
23
- * @type {string}
24
- */
25
- icon?: string;
26
- /**
27
- * 步骤描述
28
- *
29
- * @type {string}
30
- */
31
- description?: string;
32
- }