@gct-paas/design 0.1.4-dev.8 → 0.1.4-dev.9

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 (158) hide show
  1. package/dist/assets/transform-js.worker-BtVTa-PT.js +666 -0
  2. package/dist/index.esm.min.mjs +18271 -17461
  3. package/dist/index.min.cjs +7 -7
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +7 -7
  6. package/es/assets/transform-js.worker-DdeZQ5i-.js +296567 -0
  7. package/es/components/design/design-content/design-content.mjs +12 -10
  8. package/es/components/design/design-drag-item/design-drag-item.mjs +13 -10
  9. package/es/components/design/design-drop-container/design-drop-container.d.ts +4 -0
  10. package/es/components/design/design-drop-container/design-drop-container.mjs +13 -10
  11. package/es/components/design/design-drop-line/design-drop-line.mjs +15 -11
  12. package/es/components/design/design-item-actions/design-item-actions.mjs +10 -9
  13. package/es/components/design/design-item-highlighter/design-item-highlighter.mjs +12 -9
  14. package/es/components/design/design-item-highlighter-container/design-item-highlighter-container.mjs +10 -9
  15. package/es/components/design/design-not-drag-item/design-not-drag-item.mjs +12 -10
  16. package/es/components/design-icon-button/design-icon-button.d.ts +0 -2
  17. package/es/components/design-icon-button/design-icon-button.mjs +1 -2
  18. package/es/components/design-save-tip/design-save-tip.mjs +1 -1
  19. package/es/components/design-view-layout/{design-view-layout.module.css → design-view-layout.css} +20 -17
  20. package/es/components/design-view-layout/design-view-layout.mjs +17 -16
  21. package/es/components/editor/index.mjs +3 -3
  22. package/es/components/editor/style/border-editor/border-box.vue2.mjs +5 -303
  23. package/es/components/editor/style/border-editor/border-box.vue3.mjs +305 -0
  24. package/es/components/editor/style/border-editor/border-editor.vue2.mjs +5 -58
  25. package/es/components/editor/style/border-editor/border-editor.vue3.mjs +60 -0
  26. package/es/components/editor/style/border-editor/border-radius.vue2.mjs +5 -210
  27. package/es/components/editor/style/border-editor/border-radius.vue3.mjs +212 -0
  28. package/es/components/editor/style/font-editor/align-group.vue2.mjs +5 -64
  29. package/es/components/editor/style/font-editor/align-group.vue3.mjs +66 -0
  30. package/es/components/editor/style/font-editor/font-editor.vue.mjs +2 -2
  31. package/es/components/editor/style/font-editor/font-style-group.vue2.mjs +5 -103
  32. package/es/components/editor/style/font-editor/font-style-group.vue3.mjs +105 -0
  33. package/es/components/editor/style/position-editor/position-editor.vue2.mjs +5 -240
  34. package/es/components/editor/style/position-editor/position-editor.vue3.mjs +242 -0
  35. package/es/components/editor/style/spacing-editor/spacing-editor.vue2.mjs +5 -309
  36. package/es/components/editor/style/spacing-editor/spacing-editor.vue3.mjs +311 -0
  37. package/es/components/icon/downleft-icon.vue.mjs +9 -25
  38. package/es/components/icon/downleft-icon.vue2.mjs +25 -9
  39. package/es/components/icon/downright-icon.vue.mjs +9 -25
  40. package/es/components/icon/downright-icon.vue2.mjs +25 -9
  41. package/es/components/icon/upleft-icon.vue.mjs +9 -25
  42. package/es/components/icon/upleft-icon.vue2.mjs +25 -9
  43. package/es/components/icon/upright-icon.vue.mjs +9 -25
  44. package/es/components/icon/upright-icon.vue2.mjs +25 -9
  45. package/es/components/index.mjs +2 -1
  46. package/es/components/material/material-content/material-content.d.ts +8 -0
  47. package/es/components/material/material-content/material-content.mjs +2 -2
  48. package/es/components/material/material-module/material-module.d.ts +4 -0
  49. package/es/components/material/material-module/material-module.mjs +12 -9
  50. package/es/components/material/material-module-drag-container/material-module-drag-container.d.ts +4 -0
  51. package/es/components/material/material-module-drag-item/material-module-drag-item.mjs +11 -9
  52. package/es/components/material/material-outline-tree/material-outline-tree.mjs +15 -12
  53. package/es/components/material/material-tabs/material-tabs.d.ts +4 -0
  54. package/es/components/panel/panel-content/panel-content.mjs +11 -9
  55. package/es/components/panel/panel-form/panel-form.mjs +12 -9
  56. package/es/components/panel/panel-path/panel-path.mjs +12 -9
  57. package/es/controller/view/design-view.controller.mjs +0 -1
  58. package/es/create-app-vue.d.ts +8 -0
  59. package/es/create-app-vue.mjs +11 -0
  60. package/es/editor/child-list-editor/child-list-editor.mjs +13 -11
  61. package/es/editor/model-field-select/model-field-select.mjs +12 -10
  62. package/es/hooks/design-view/constants/style-editor.const.d.ts +24 -0
  63. package/es/hooks/design-view/constants/style-editor.const.mjs +53 -0
  64. package/es/hooks/design-view/design-state.d.ts +2427 -0
  65. package/es/hooks/design-view/design-state.mjs +86 -0
  66. package/es/hooks/design-view/designer/useDesignCache.d.ts +4 -0
  67. package/es/hooks/design-view/designer/useDesignCache.mjs +27 -0
  68. package/es/hooks/design-view/designer/useDesignHistory.d.ts +16 -0
  69. package/es/hooks/design-view/designer/useDesignHistory.mjs +102 -0
  70. package/es/hooks/design-view/designer/useDesignModal.d.ts +1874 -0
  71. package/es/hooks/design-view/designer/useDesignModal.mjs +80 -0
  72. package/es/hooks/design-view/designer/useDesignPreview.d.ts +11 -0
  73. package/es/hooks/design-view/designer/useDesignPreview.mjs +143 -0
  74. package/es/hooks/design-view/designer/useDesignSave.d.ts +12 -0
  75. package/es/hooks/design-view/designer/useDesignSave.mjs +239 -0
  76. package/es/hooks/design-view/{usePropEditor.d.ts → editor/usePropEditor.d.ts} +1 -1
  77. package/es/hooks/design-view/editor/usePropEditor.mjs +99 -0
  78. package/es/hooks/design-view/{useStyle.d.ts → editor/useStyle.d.ts} +2 -2
  79. package/es/hooks/design-view/{useStyle.mjs → editor/useStyle.mjs} +1 -1
  80. package/es/hooks/design-view/editor/useStyleEditor.d.ts +30 -0
  81. package/es/hooks/design-view/editor/useStyleEditor.mjs +77 -0
  82. package/es/hooks/design-view/{useGlobal.d.ts → global/useGlobal.d.ts} +46 -40
  83. package/es/hooks/design-view/{useScope.mjs → layout/useScope.mjs} +17 -3
  84. package/es/hooks/design-view/{useToolkit.d.ts → layout/useToolkit.d.ts} +13 -11
  85. package/es/hooks/design-view/{useToolkit.mjs → layout/useToolkit.mjs} +22 -6
  86. package/es/hooks/design-view/{usePage.d.ts → page/usePage.d.ts} +2 -4
  87. package/es/hooks/design-view/{usePage.mjs → page/usePage.mjs} +9 -26
  88. package/es/hooks/design-view/page/usePageOccupy.d.ts +33 -0
  89. package/es/hooks/design-view/{usePageOccupy.mjs → page/usePageOccupy.mjs} +26 -18
  90. package/es/hooks/design-view/useDesigner.d.ts +153 -183
  91. package/es/hooks/design-view/useDesigner.mjs +76 -790
  92. package/es/hooks/design-view/utils/color.util.d.ts +21 -0
  93. package/es/hooks/design-view/utils/color.util.mjs +36 -0
  94. package/es/hooks/design-view/utils/field-schema.util.d.ts +55 -0
  95. package/es/hooks/design-view/{getFieldSchema.mjs → utils/field-schema.util.mjs} +28 -10
  96. package/es/hooks/design-view/widget/useSelectedWidget.d.ts +53 -0
  97. package/es/hooks/design-view/{useSelectedWidget.mjs → widget/useSelectedWidget.mjs} +12 -42
  98. package/es/hooks/design-view/{useWidget.d.ts → widget/useWidget.d.ts} +12 -8
  99. package/es/hooks/design-view/widget/useWidgetQuery.d.ts +13 -0
  100. package/es/hooks/design-view/widget/useWidgetQuery.mjs +88 -0
  101. package/es/hooks/design-view/widget/useWidgetRegistry.d.ts +11 -0
  102. package/es/hooks/design-view/widget/useWidgetRegistry.mjs +59 -0
  103. package/es/hooks/develop/useKeyParser.mjs +0 -4
  104. package/es/hooks/index.d.ts +20 -10
  105. package/es/hooks/use-model-field/use-model-field.d.ts +32 -0
  106. package/es/hooks/use-model-field/use-model-field.mjs +344 -0
  107. package/es/index.d.ts +2 -5
  108. package/es/index.mjs +100 -35
  109. package/es/interface/designer/i-designer-provider.d.ts +2 -85
  110. package/es/interface/designer/i-designer-state.d.ts +14 -0
  111. package/es/interface/designer/index.d.ts +0 -2
  112. package/es/plugins/design-custom-exp-menu/components/design-custom-exp-menu.component.mjs +12 -9
  113. package/es/plugins/design-editor/upload-file/index.mjs +4 -1
  114. package/es/plugins/design-editor/upload-file/upload-file.mjs +2 -2
  115. package/es/plugins/design-editor/upload-image/index.mjs +4 -1
  116. package/es/plugins/design-editor/user-signature/index.mjs +4 -1
  117. package/es/plugins/design-grid/components/design-grid.component.mjs +12 -9
  118. package/es/plugins/design-grid/design-grid.provider.mjs +33 -0
  119. package/es/plugins/design-grid-item/components/design-grid-item.component.mjs +12 -9
  120. package/es/plugins/design-tab-item/components/design-tab-item.component.mjs +12 -9
  121. package/es/plugins/design-tabs/components/design-tabs.component.mjs +12 -9
  122. package/es/register/designer-register/designer-register.d.ts +29 -0
  123. package/es/register/designer-register/designer-register.mjs +35 -0
  124. package/es/setup-app.d.ts +1 -0
  125. package/es/setup-app.mjs +18 -0
  126. package/es/utils/design-interceptors/design-interceptors.d.ts +8 -0
  127. package/es/utils/design-interceptors/design-interceptors.mjs +20 -0
  128. package/es/utils/field-filter/index.d.ts +4 -0
  129. package/es/utils/field-filter/index.mjs +58 -0
  130. package/es/utils/index.d.ts +5 -1
  131. package/es/utils/init-widget-info/init-widget-info.d.ts +16 -0
  132. package/es/utils/init-widget-info/init-widget-info.mjs +40 -0
  133. package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +0 -8
  134. package/es/utils/transform-js/index.d.ts +1 -0
  135. package/es/utils/transform-js/transform-js.d.ts +13 -0
  136. package/es/utils/transform-js/transform-js.mjs +48 -0
  137. package/es/utils/transform-js/transform-js.worker.d.ts +1 -0
  138. package/es/views/design-view.d.ts +2 -2
  139. package/es/views/design-view.mjs +14 -12
  140. package/package.json +13 -7
  141. package/es/components/design-view-layout/design-view-layout.module.scss.mjs +0 -27
  142. package/es/components/editor/style/border-editor/border-box.vue.mjs +0 -7
  143. package/es/components/editor/style/border-editor/border-editor.vue.mjs +0 -7
  144. package/es/components/editor/style/border-editor/border-radius.vue.mjs +0 -7
  145. package/es/components/editor/style/font-editor/align-group.vue.mjs +0 -7
  146. package/es/components/editor/style/font-editor/font-style-group.vue.mjs +0 -7
  147. package/es/components/editor/style/position-editor/position-editor.vue.mjs +0 -7
  148. package/es/components/editor/style/spacing-editor/spacing-editor.vue.mjs +0 -7
  149. package/es/hooks/design-view/getFieldSchema.d.ts +0 -26
  150. package/es/hooks/design-view/usePageOccupy.d.ts +0 -13
  151. package/es/hooks/design-view/usePropEditor.mjs +0 -99
  152. package/es/hooks/design-view/useSelectedWidget.d.ts +0 -53
  153. package/es/hooks/design-view/useStyleEditor.d.ts +0 -27
  154. package/es/interface/designer/i-designer-dnd-item-hooks.d.ts +0 -21
  155. package/es/interface/designer/i-designer-schema-exports.d.ts +0 -13
  156. /package/es/hooks/design-view/{useGlobal.mjs → global/useGlobal.mjs} +0 -0
  157. /package/es/hooks/design-view/{useScope.d.ts → layout/useScope.d.ts} +0 -0
  158. /package/es/hooks/design-view/{useWidget.mjs → widget/useWidget.mjs} +0 -0
@@ -0,0 +1,60 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createBlock, isRef, createCommentVNode } from 'vue';
2
+ import { useNamespace, emitFieldSet } from '@gct-paas/core';
3
+ import BorderBox from './border-box.vue2.mjs';
4
+ import BorderRadiu from './border-radius.vue2.mjs';
5
+ import { pick } from 'lodash-es';
6
+
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "border-editor",
9
+ props: {
10
+ value: {},
11
+ showArea: { default: () => ["radius", "basics"] }
12
+ },
13
+ emits: ["update:value"],
14
+ setup(__props, { emit: __emit }) {
15
+ const ns = useNamespace("border-editor");
16
+ const props = __props;
17
+ const emit = __emit;
18
+ const local = computed(() => {
19
+ const v = props.value;
20
+ const boxValue2 = v ? pick(v, ["top", "bottom", "left", "right"]) : void 0;
21
+ const borderRadius2 = v ? pick(v, [
22
+ "topLeftRadius",
23
+ "topRightRadius",
24
+ "bottomRightRadius",
25
+ "bottomLeftRadius"
26
+ ]) : void 0;
27
+ return {
28
+ borderRadius: borderRadius2,
29
+ boxValue: boxValue2
30
+ };
31
+ });
32
+ const { boxValue, borderRadius } = emitFieldSet(local, (_k, _v, obj) => {
33
+ const result = {
34
+ ...obj.borderRadius || {},
35
+ ...obj.boxValue || {}
36
+ };
37
+ emit("update:value", result);
38
+ });
39
+ return (_ctx, _cache) => {
40
+ return openBlock(), createElementBlock("div", {
41
+ class: normalizeClass([unref(ns).b()])
42
+ }, [
43
+ __props.showArea.includes("radius") ? (openBlock(), createBlock(BorderRadiu, {
44
+ key: 0,
45
+ value: unref(borderRadius),
46
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(borderRadius) ? borderRadius.value = $event : null),
47
+ class: normalizeClass([unref(ns).e("border-box"), "mb-16px"])
48
+ }, null, 8, ["value", "class"])) : createCommentVNode("", true),
49
+ __props.showArea.includes("basics") ? (openBlock(), createBlock(BorderBox, {
50
+ key: 1,
51
+ value: unref(boxValue),
52
+ "onUpdate:value": _cache[1] || (_cache[1] = ($event) => isRef(boxValue) ? boxValue.value = $event : null),
53
+ class: normalizeClass([unref(ns).e("border-box")])
54
+ }, null, 8, ["value", "class"])) : createCommentVNode("", true)
55
+ ], 2);
56
+ };
57
+ }
58
+ });
59
+
60
+ export { _sfc_main as default };
@@ -1,212 +1,7 @@
1
- import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, normalizeClass, unref, createTextVNode, toDisplayString } from 'vue';
2
- import { parseRadiusType, parseValueUnit } from './util.mjs';
3
- import { emitFieldSet, t } from '@gct-paas/core';
1
+ import _sfc_main from './border-radius.vue3.mjs';
2
+ import './border-radius.css';/* empty css */
3
+ import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
4
4
 
5
- const _hoisted_1 = { class: "radius-box" };
6
- const _hoisted_2 = { class: "radius-div" };
7
- const _hoisted_3 = { class: "radius-div-inner" };
8
- const _hoisted_4 = { class: "radius-editor" };
9
- const _hoisted_5 = { class: "radius-col" };
10
- const _hoisted_6 = { class: "radius-text" };
11
- const _sfc_main = /* @__PURE__ */ defineComponent({
12
- __name: "border-radius",
13
- props: {
14
- value: {}
15
- },
16
- emits: ["update:value"],
17
- setup(__props, { emit: __emit }) {
18
- const options = ref([
19
- {
20
- label: "2",
21
- value: 2
22
- },
23
- {
24
- label: "4",
25
- value: 4
26
- },
27
- {
28
- label: "6",
29
- value: 6
30
- },
31
- {
32
- label: "8",
33
- value: 8
34
- },
35
- {
36
- label: "10",
37
- value: 10
38
- }
39
- ]);
40
- const props = __props;
41
- const emit = __emit;
42
- const local = computed(() => {
43
- const v = props.value;
44
- const pos2 = parseRadiusType(v);
45
- let numberVal2 = 0;
46
- if (v) {
47
- let numStr;
48
- switch (pos2) {
49
- case "all":
50
- case "upLeft":
51
- numStr = v.topLeftRadius;
52
- break;
53
- case "upRight":
54
- numStr = v.topRightRadius;
55
- break;
56
- case "downRight":
57
- numStr = v.bottomRightRadius;
58
- break;
59
- case "downLeft":
60
- numStr = v.bottomLeftRadius;
61
- break;
62
- }
63
- if (!numStr || numStr === "nullpx") {
64
- numStr = "0px";
65
- }
66
- const { value } = parseValueUnit(numStr);
67
- numberVal2 = value;
68
- }
69
- return {
70
- pos: pos2,
71
- numberVal: numberVal2
72
- };
73
- });
74
- const { pos, numberVal } = emitFieldSet(local, (_f, _v, obj) => {
75
- const result = {};
76
- let tags = [
77
- "topLeftRadius",
78
- "topRightRadius",
79
- "bottomRightRadius",
80
- "bottomLeftRadius"
81
- ];
82
- switch (obj.pos) {
83
- case "upLeft":
84
- tags = ["topLeftRadius"];
85
- break;
86
- case "upRight":
87
- tags = ["topRightRadius"];
88
- break;
89
- case "downLeft":
90
- tags = ["bottomLeftRadius"];
91
- break;
92
- case "downRight":
93
- tags = ["bottomRightRadius"];
94
- break;
95
- }
96
- tags.forEach((tag) => {
97
- result[tag] = obj.numberVal + "px";
98
- });
99
- emit("update:value", result);
100
- });
101
- const radiusVal = computed({
102
- get() {
103
- if (numberVal.value === 0) {
104
- return "0";
105
- }
106
- return numberVal.value;
107
- },
108
- set(v) {
109
- numberVal.value = v;
110
- }
111
- });
112
- return (_ctx, _cache) => {
113
- const _component_a_tooltip = resolveComponent("a-tooltip");
114
- const _component_a_input_number = resolveComponent("a-input-number");
115
- const _component_a_auto_complete = resolveComponent("a-auto-complete");
116
- const _component_down_outlined = resolveComponent("down-outlined");
117
- return openBlock(), createElementBlock("div", _hoisted_1, [
118
- createElementVNode("div", _hoisted_2, [
119
- createElementVNode("div", _hoisted_3, [
120
- createVNode(_component_a_tooltip, null, {
121
- title: withCtx(() => [
122
- createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.upLeft")), 1)
123
- ]),
124
- default: withCtx(() => [
125
- createElementVNode("div", {
126
- class: normalizeClass(["upLeftGround ground", { highlight: unref(pos) === "upLeft" }]),
127
- onClick: _cache[0] || (_cache[0] = ($event) => pos.value = "upLeft")
128
- }, null, 2)
129
- ]),
130
- _: 1
131
- }),
132
- createVNode(_component_a_tooltip, null, {
133
- title: withCtx(() => [
134
- createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.upRight")), 1)
135
- ]),
136
- default: withCtx(() => [
137
- createElementVNode("div", {
138
- class: normalizeClass(["upRightGround ground", { highlight: unref(pos) === "upRight" }]),
139
- onClick: _cache[1] || (_cache[1] = ($event) => pos.value = "upRight")
140
- }, null, 2)
141
- ]),
142
- _: 1
143
- }),
144
- createVNode(_component_a_tooltip, null, {
145
- title: withCtx(() => [
146
- createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.downLeft")), 1)
147
- ]),
148
- default: withCtx(() => [
149
- createElementVNode("div", {
150
- class: normalizeClass(["downLeftGround ground", { highlight: unref(pos) === "downLeft" }]),
151
- onClick: _cache[2] || (_cache[2] = ($event) => pos.value = "downLeft")
152
- }, null, 2)
153
- ]),
154
- _: 1
155
- }),
156
- createVNode(_component_a_tooltip, null, {
157
- title: withCtx(() => [
158
- createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.downRight")), 1)
159
- ]),
160
- default: withCtx(() => [
161
- createElementVNode("div", {
162
- class: normalizeClass(["downRightGround ground", { highlight: unref(pos) === "downRight" }]),
163
- onClick: _cache[3] || (_cache[3] = ($event) => pos.value = "downRight")
164
- }, null, 2)
165
- ]),
166
- _: 1
167
- }),
168
- createVNode(_component_a_tooltip, null, {
169
- title: withCtx(() => [
170
- createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.whole")), 1)
171
- ]),
172
- default: withCtx(() => [
173
- createElementVNode("div", {
174
- class: normalizeClass(["centerGround", { highlight: unref(pos) === "all" }]),
175
- onClick: _cache[4] || (_cache[4] = ($event) => pos.value = "all")
176
- }, null, 2)
177
- ]),
178
- _: 1
179
- })
180
- ])
181
- ]),
182
- createElementVNode("div", _hoisted_4, [
183
- createElementVNode("div", _hoisted_5, [
184
- createElementVNode("span", _hoisted_6, toDisplayString(unref(t)("sys.pageDesigner.radius")), 1),
185
- createVNode(_component_a_auto_complete, {
186
- value: radiusVal.value,
187
- "onUpdate:value": _cache[6] || (_cache[6] = ($event) => radiusVal.value = $event),
188
- options: options.value
189
- }, {
190
- default: withCtx(() => [
191
- createVNode(_component_a_input_number, {
192
- value: radiusVal.value,
193
- "onUpdate:value": _cache[5] || (_cache[5] = ($event) => radiusVal.value = $event),
194
- min: 0,
195
- controls: true,
196
- precision: 0,
197
- style: { "width": "100%" },
198
- size: "small",
199
- "addon-after": "px"
200
- }, null, 8, ["value"])
201
- ]),
202
- _: 1
203
- }, 8, ["value", "options"]),
204
- createVNode(_component_down_outlined, { class: "ant-select-arrow gct-select-arrow" })
205
- ])
206
- ])
207
- ]);
208
- };
209
- }
210
- });
5
+ const BorderRadiu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1cb5bbdc"]]);
211
6
 
212
- export { _sfc_main as default };
7
+ export { BorderRadiu as default };
@@ -0,0 +1,212 @@
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, normalizeClass, unref, createTextVNode, toDisplayString } from 'vue';
2
+ import { parseRadiusType, parseValueUnit } from './util.mjs';
3
+ import { emitFieldSet, t } from '@gct-paas/core';
4
+
5
+ const _hoisted_1 = { class: "radius-box" };
6
+ const _hoisted_2 = { class: "radius-div" };
7
+ const _hoisted_3 = { class: "radius-div-inner" };
8
+ const _hoisted_4 = { class: "radius-editor" };
9
+ const _hoisted_5 = { class: "radius-col" };
10
+ const _hoisted_6 = { class: "radius-text" };
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ __name: "border-radius",
13
+ props: {
14
+ value: {}
15
+ },
16
+ emits: ["update:value"],
17
+ setup(__props, { emit: __emit }) {
18
+ const options = ref([
19
+ {
20
+ label: "2",
21
+ value: 2
22
+ },
23
+ {
24
+ label: "4",
25
+ value: 4
26
+ },
27
+ {
28
+ label: "6",
29
+ value: 6
30
+ },
31
+ {
32
+ label: "8",
33
+ value: 8
34
+ },
35
+ {
36
+ label: "10",
37
+ value: 10
38
+ }
39
+ ]);
40
+ const props = __props;
41
+ const emit = __emit;
42
+ const local = computed(() => {
43
+ const v = props.value;
44
+ const pos2 = parseRadiusType(v);
45
+ let numberVal2 = 0;
46
+ if (v) {
47
+ let numStr;
48
+ switch (pos2) {
49
+ case "all":
50
+ case "upLeft":
51
+ numStr = v.topLeftRadius;
52
+ break;
53
+ case "upRight":
54
+ numStr = v.topRightRadius;
55
+ break;
56
+ case "downRight":
57
+ numStr = v.bottomRightRadius;
58
+ break;
59
+ case "downLeft":
60
+ numStr = v.bottomLeftRadius;
61
+ break;
62
+ }
63
+ if (!numStr || numStr === "nullpx") {
64
+ numStr = "0px";
65
+ }
66
+ const { value } = parseValueUnit(numStr);
67
+ numberVal2 = value;
68
+ }
69
+ return {
70
+ pos: pos2,
71
+ numberVal: numberVal2
72
+ };
73
+ });
74
+ const { pos, numberVal } = emitFieldSet(local, (_f, _v, obj) => {
75
+ const result = {};
76
+ let tags = [
77
+ "topLeftRadius",
78
+ "topRightRadius",
79
+ "bottomRightRadius",
80
+ "bottomLeftRadius"
81
+ ];
82
+ switch (obj.pos) {
83
+ case "upLeft":
84
+ tags = ["topLeftRadius"];
85
+ break;
86
+ case "upRight":
87
+ tags = ["topRightRadius"];
88
+ break;
89
+ case "downLeft":
90
+ tags = ["bottomLeftRadius"];
91
+ break;
92
+ case "downRight":
93
+ tags = ["bottomRightRadius"];
94
+ break;
95
+ }
96
+ tags.forEach((tag) => {
97
+ result[tag] = obj.numberVal + "px";
98
+ });
99
+ emit("update:value", result);
100
+ });
101
+ const radiusVal = computed({
102
+ get() {
103
+ if (numberVal.value === 0) {
104
+ return "0";
105
+ }
106
+ return numberVal.value;
107
+ },
108
+ set(v) {
109
+ numberVal.value = v;
110
+ }
111
+ });
112
+ return (_ctx, _cache) => {
113
+ const _component_a_tooltip = resolveComponent("a-tooltip");
114
+ const _component_a_input_number = resolveComponent("a-input-number");
115
+ const _component_a_auto_complete = resolveComponent("a-auto-complete");
116
+ const _component_down_outlined = resolveComponent("down-outlined");
117
+ return openBlock(), createElementBlock("div", _hoisted_1, [
118
+ createElementVNode("div", _hoisted_2, [
119
+ createElementVNode("div", _hoisted_3, [
120
+ createVNode(_component_a_tooltip, null, {
121
+ title: withCtx(() => [
122
+ createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.upLeft")), 1)
123
+ ]),
124
+ default: withCtx(() => [
125
+ createElementVNode("div", {
126
+ class: normalizeClass(["upLeftGround ground", { highlight: unref(pos) === "upLeft" }]),
127
+ onClick: _cache[0] || (_cache[0] = ($event) => pos.value = "upLeft")
128
+ }, null, 2)
129
+ ]),
130
+ _: 1
131
+ }),
132
+ createVNode(_component_a_tooltip, null, {
133
+ title: withCtx(() => [
134
+ createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.upRight")), 1)
135
+ ]),
136
+ default: withCtx(() => [
137
+ createElementVNode("div", {
138
+ class: normalizeClass(["upRightGround ground", { highlight: unref(pos) === "upRight" }]),
139
+ onClick: _cache[1] || (_cache[1] = ($event) => pos.value = "upRight")
140
+ }, null, 2)
141
+ ]),
142
+ _: 1
143
+ }),
144
+ createVNode(_component_a_tooltip, null, {
145
+ title: withCtx(() => [
146
+ createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.downLeft")), 1)
147
+ ]),
148
+ default: withCtx(() => [
149
+ createElementVNode("div", {
150
+ class: normalizeClass(["downLeftGround ground", { highlight: unref(pos) === "downLeft" }]),
151
+ onClick: _cache[2] || (_cache[2] = ($event) => pos.value = "downLeft")
152
+ }, null, 2)
153
+ ]),
154
+ _: 1
155
+ }),
156
+ createVNode(_component_a_tooltip, null, {
157
+ title: withCtx(() => [
158
+ createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.downRight")), 1)
159
+ ]),
160
+ default: withCtx(() => [
161
+ createElementVNode("div", {
162
+ class: normalizeClass(["downRightGround ground", { highlight: unref(pos) === "downRight" }]),
163
+ onClick: _cache[3] || (_cache[3] = ($event) => pos.value = "downRight")
164
+ }, null, 2)
165
+ ]),
166
+ _: 1
167
+ }),
168
+ createVNode(_component_a_tooltip, null, {
169
+ title: withCtx(() => [
170
+ createTextVNode(toDisplayString(unref(t)("sys.pageDesigner.whole")), 1)
171
+ ]),
172
+ default: withCtx(() => [
173
+ createElementVNode("div", {
174
+ class: normalizeClass(["centerGround", { highlight: unref(pos) === "all" }]),
175
+ onClick: _cache[4] || (_cache[4] = ($event) => pos.value = "all")
176
+ }, null, 2)
177
+ ]),
178
+ _: 1
179
+ })
180
+ ])
181
+ ]),
182
+ createElementVNode("div", _hoisted_4, [
183
+ createElementVNode("div", _hoisted_5, [
184
+ createElementVNode("span", _hoisted_6, toDisplayString(unref(t)("sys.pageDesigner.radius")), 1),
185
+ createVNode(_component_a_auto_complete, {
186
+ value: radiusVal.value,
187
+ "onUpdate:value": _cache[6] || (_cache[6] = ($event) => radiusVal.value = $event),
188
+ options: options.value
189
+ }, {
190
+ default: withCtx(() => [
191
+ createVNode(_component_a_input_number, {
192
+ value: radiusVal.value,
193
+ "onUpdate:value": _cache[5] || (_cache[5] = ($event) => radiusVal.value = $event),
194
+ min: 0,
195
+ controls: true,
196
+ precision: 0,
197
+ style: { "width": "100%" },
198
+ size: "small",
199
+ "addon-after": "px"
200
+ }, null, 8, ["value"])
201
+ ]),
202
+ _: 1
203
+ }, 8, ["value", "options"]),
204
+ createVNode(_component_down_outlined, { class: "ant-select-arrow gct-select-arrow" })
205
+ ])
206
+ ])
207
+ ]);
208
+ };
209
+ }
210
+ });
211
+
212
+ export { _sfc_main as default };
@@ -1,66 +1,7 @@
1
- import { defineComponent, resolveComponent, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString } from 'vue';
2
- import { TextAlign, t } from '@gct-paas/core';
1
+ import _sfc_main from './align-group.vue3.mjs';
2
+ import './align-group.css';/* empty css */
3
+ import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
3
4
 
4
- const _hoisted_1 = { class: "align-group-box" };
5
- const _hoisted_2 = ["onClick"];
6
- const _sfc_main = /* @__PURE__ */ defineComponent({
7
- __name: "align-group",
8
- props: {
9
- value: {}
10
- },
11
- emits: ["update:value"],
12
- setup(__props, { emit: __emit }) {
13
- const options = [
14
- {
15
- label: t("sys.platform.left"),
16
- value: TextAlign.LEFT,
17
- icon: "icon-zuoduiqi"
18
- },
19
- {
20
- label: t("sys.platform.center"),
21
- value: TextAlign.CENTER,
22
- icon: "icon-juzhongduiqi"
23
- },
24
- {
25
- label: t("sys.platform.right"),
26
- value: TextAlign.RIGHT,
27
- icon: "icon-youduiqi"
28
- },
29
- {
30
- label: t("sys.platform.justify"),
31
- value: TextAlign.JUSTIFY,
32
- icon: "icon-liangduanduiqi"
33
- }
34
- ];
35
- const emit = __emit;
36
- const changeAlign = (align) => {
37
- emit("update:value", align);
38
- };
39
- return (_ctx, _cache) => {
40
- const _component_a_tooltip = resolveComponent("a-tooltip");
41
- return openBlock(), createElementBlock("div", _hoisted_1, [
42
- (openBlock(), createElementBlock(Fragment, null, renderList(options, (item) => {
43
- return createElementVNode("div", {
44
- key: item.value,
45
- class: normalizeClass(["icon-box", __props.value === item.value ? "selected" : null]),
46
- onClick: ($event) => changeAlign(item.value)
47
- }, [
48
- createVNode(_component_a_tooltip, null, {
49
- title: withCtx(() => [
50
- createTextVNode(toDisplayString(item.label), 1)
51
- ]),
52
- default: withCtx(() => [
53
- createElementVNode("span", {
54
- class: normalizeClass(["iconfont", item.icon])
55
- }, null, 2)
56
- ]),
57
- _: 2
58
- }, 1024)
59
- ], 10, _hoisted_2);
60
- }), 64))
61
- ]);
62
- };
63
- }
64
- });
5
+ const AlignGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-afcacb4b"]]);
65
6
 
66
- export { _sfc_main as default };
7
+ export { AlignGroup as default };
@@ -0,0 +1,66 @@
1
+ import { defineComponent, resolveComponent, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString } from 'vue';
2
+ import { TextAlign, t } from '@gct-paas/core';
3
+
4
+ const _hoisted_1 = { class: "align-group-box" };
5
+ const _hoisted_2 = ["onClick"];
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "align-group",
8
+ props: {
9
+ value: {}
10
+ },
11
+ emits: ["update:value"],
12
+ setup(__props, { emit: __emit }) {
13
+ const options = [
14
+ {
15
+ label: t("sys.platform.left"),
16
+ value: TextAlign.LEFT,
17
+ icon: "icon-zuoduiqi"
18
+ },
19
+ {
20
+ label: t("sys.platform.center"),
21
+ value: TextAlign.CENTER,
22
+ icon: "icon-juzhongduiqi"
23
+ },
24
+ {
25
+ label: t("sys.platform.right"),
26
+ value: TextAlign.RIGHT,
27
+ icon: "icon-youduiqi"
28
+ },
29
+ {
30
+ label: t("sys.platform.justify"),
31
+ value: TextAlign.JUSTIFY,
32
+ icon: "icon-liangduanduiqi"
33
+ }
34
+ ];
35
+ const emit = __emit;
36
+ const changeAlign = (align) => {
37
+ emit("update:value", align);
38
+ };
39
+ return (_ctx, _cache) => {
40
+ const _component_a_tooltip = resolveComponent("a-tooltip");
41
+ return openBlock(), createElementBlock("div", _hoisted_1, [
42
+ (openBlock(), createElementBlock(Fragment, null, renderList(options, (item) => {
43
+ return createElementVNode("div", {
44
+ key: item.value,
45
+ class: normalizeClass(["icon-box", __props.value === item.value ? "selected" : null]),
46
+ onClick: ($event) => changeAlign(item.value)
47
+ }, [
48
+ createVNode(_component_a_tooltip, null, {
49
+ title: withCtx(() => [
50
+ createTextVNode(toDisplayString(item.label), 1)
51
+ ]),
52
+ default: withCtx(() => [
53
+ createElementVNode("span", {
54
+ class: normalizeClass(["iconfont", item.icon])
55
+ }, null, 2)
56
+ ]),
57
+ _: 2
58
+ }, 1024)
59
+ ], 10, _hoisted_2);
60
+ }), 64))
61
+ ]);
62
+ };
63
+ }
64
+ });
65
+
66
+ export { _sfc_main as default };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, isRef, unref } from 'vue';
2
2
  import { emitFieldSet } from '@gct-paas/core';
3
- import FontStyleGroup from './font-style-group.vue.mjs';
4
- import AlignGroup from './align-group.vue.mjs';
3
+ import FontStyleGroup from './font-style-group.vue2.mjs';
4
+ import AlignGroup from './align-group.vue2.mjs';
5
5
  import { DefaultFont } from './util.mjs';
6
6
 
7
7
  const _hoisted_1 = { class: "font-editor" };