@king-one/form-design 0.0.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/es/index.mjs +10 -0
  3. package/dist/es/src/components/base/collapse.vue.mjs +4 -0
  4. package/dist/es/src/components/base/collapse.vue2.mjs +53 -0
  5. package/dist/es/src/components/base/widget-icon.mjs +18 -0
  6. package/dist/es/src/components/form-desgin.mjs +29 -0
  7. package/dist/es/src/components/form-icon.vue.mjs +4 -0
  8. package/dist/es/src/components/form-icon.vue2.mjs +27 -0
  9. package/dist/es/src/components/form-material.vue.mjs +144 -0
  10. package/dist/es/src/components/form-material.vue2.mjs +4 -0
  11. package/dist/es/src/components/form-panel.vue.mjs +160 -0
  12. package/dist/es/src/components/form-panel.vue2.mjs +4 -0
  13. package/dist/es/src/components/form-setting.vue.mjs +116 -0
  14. package/dist/es/src/components/form-setting.vue2.mjs +4 -0
  15. package/dist/es/src/components/index.mjs +4 -0
  16. package/dist/es/src/components/panel/index.mjs +9 -0
  17. package/dist/es/src/components/panel/panel-item.vue.mjs +4 -0
  18. package/dist/es/src/components/panel/panel-item.vue2.mjs +66 -0
  19. package/dist/es/src/components/props/base-props.vue.mjs +60 -0
  20. package/dist/es/src/components/props/base-props.vue2.mjs +4 -0
  21. package/dist/es/src/components/props/component-props.vue.mjs +21 -0
  22. package/dist/es/src/components/props/component-props.vue2.mjs +4 -0
  23. package/dist/es/src/components/props/index.mjs +2 -0
  24. package/dist/es/src/components/types.mjs +28 -0
  25. package/dist/es/src/config/index.mjs +52 -0
  26. package/dist/es/src/context/design.mjs +25 -0
  27. package/dist/es/src/core/Design.mjs +44 -0
  28. package/dist/es/src/core/FormSchema.mjs +27 -0
  29. package/dist/es/src/core/Heart.mjs +25 -0
  30. package/dist/es/src/core/index.mjs +5 -0
  31. package/dist/es/src/effects/LifeCycle.mjs +24 -0
  32. package/dist/es/src/effects/contants.mjs +10 -0
  33. package/dist/es/src/effects/effective.mjs +25 -0
  34. package/dist/es/src/effects/index.mjs +6 -0
  35. package/dist/es/src/hooks/index.mjs +9 -0
  36. package/dist/es/src/hooks/use-monaco.mjs +36 -0
  37. package/dist/es/src/hooks/use-namespace/index.mjs +49 -0
  38. package/dist/es/src/index.mjs +10 -0
  39. package/dist/es/src/internal.mjs +8 -0
  40. package/dist/es/src/style/index.mjs +1 -0
  41. package/dist/es/src/utils/checkers.mjs +43 -0
  42. package/dist/es/src/utils/index.mjs +19 -0
  43. package/dist/lib/index.js +1 -0
  44. package/dist/lib/src/components/base/collapse.vue.js +1 -0
  45. package/dist/lib/src/components/base/collapse.vue2.js +1 -0
  46. package/dist/lib/src/components/base/widget-icon.js +1 -0
  47. package/dist/lib/src/components/form-desgin.js +1 -0
  48. package/dist/lib/src/components/form-icon.vue.js +1 -0
  49. package/dist/lib/src/components/form-icon.vue2.js +1 -0
  50. package/dist/lib/src/components/form-material.vue.js +1 -0
  51. package/dist/lib/src/components/form-material.vue2.js +1 -0
  52. package/dist/lib/src/components/form-panel.vue.js +2 -0
  53. package/dist/lib/src/components/form-panel.vue2.js +1 -0
  54. package/dist/lib/src/components/form-setting.vue.js +1 -0
  55. package/dist/lib/src/components/form-setting.vue2.js +1 -0
  56. package/dist/lib/src/components/index.js +1 -0
  57. package/dist/lib/src/components/panel/index.js +1 -0
  58. package/dist/lib/src/components/panel/panel-item.vue.js +1 -0
  59. package/dist/lib/src/components/panel/panel-item.vue2.js +1 -0
  60. package/dist/lib/src/components/props/base-props.vue.js +1 -0
  61. package/dist/lib/src/components/props/base-props.vue2.js +1 -0
  62. package/dist/lib/src/components/props/component-props.vue.js +1 -0
  63. package/dist/lib/src/components/props/component-props.vue2.js +1 -0
  64. package/dist/lib/src/components/props/index.js +1 -0
  65. package/dist/lib/src/components/types.js +1 -0
  66. package/dist/lib/src/config/index.js +1 -0
  67. package/dist/lib/src/context/design.js +1 -0
  68. package/dist/lib/src/core/Design.js +1 -0
  69. package/dist/lib/src/core/FormSchema.js +1 -0
  70. package/dist/lib/src/core/Heart.js +1 -0
  71. package/dist/lib/src/core/index.js +1 -0
  72. package/dist/lib/src/effects/LifeCycle.js +1 -0
  73. package/dist/lib/src/effects/contants.js +1 -0
  74. package/dist/lib/src/effects/effective.js +1 -0
  75. package/dist/lib/src/effects/index.js +1 -0
  76. package/dist/lib/src/hooks/index.js +1 -0
  77. package/dist/lib/src/hooks/use-monaco.js +1 -0
  78. package/dist/lib/src/hooks/use-namespace/index.js +1 -0
  79. package/dist/lib/src/index.js +1 -0
  80. package/dist/lib/src/internal.js +1 -0
  81. package/dist/lib/src/style/index.js +1 -0
  82. package/dist/lib/src/utils/checkers.js +1 -0
  83. package/dist/lib/src/utils/index.js +1 -0
  84. package/dist/theme-chalk/base.css +1 -0
  85. package/dist/theme-chalk/collapse.css +1 -0
  86. package/dist/theme-chalk/fonts/iconfont.ttf +0 -0
  87. package/dist/theme-chalk/fonts/iconfont.woff +0 -0
  88. package/dist/theme-chalk/fonts/iconfont.woff2 +0 -0
  89. package/dist/theme-chalk/form-design.css +1 -0
  90. package/dist/theme-chalk/icon.css +1 -0
  91. package/dist/theme-chalk/index.css +1 -0
  92. package/dist/theme-chalk/material.css +1 -0
  93. package/dist/theme-chalk/panel-item.css +1 -0
  94. package/dist/theme-chalk/panel.css +1 -0
  95. package/dist/theme-chalk/reset.css +0 -0
  96. package/dist/theme-chalk/setting.css +1 -0
  97. package/dist/theme-chalk/var.css +0 -0
  98. package/dist/types/index.d.ts +1 -0
  99. package/dist/types/src/components/base/collapse.vue.d.ts +17 -0
  100. package/dist/types/src/components/base/widget-icon.d.ts +19 -0
  101. package/dist/types/src/components/form-desgin.d.ts +16 -0
  102. package/dist/types/src/components/form-icon.vue.d.ts +25 -0
  103. package/dist/types/src/components/form-material.vue.d.ts +3 -0
  104. package/dist/types/src/components/form-panel.vue.d.ts +19 -0
  105. package/dist/types/src/components/form-setting.vue.d.ts +3 -0
  106. package/dist/types/src/components/index.d.ts +4 -0
  107. package/dist/types/src/components/panel/index.d.ts +2 -0
  108. package/dist/types/src/components/panel/panel-item.vue.d.ts +8 -0
  109. package/dist/types/src/components/props/base-props.vue.d.ts +3 -0
  110. package/dist/types/src/components/props/component-props.vue.d.ts +3 -0
  111. package/dist/types/src/components/props/index.d.ts +2 -0
  112. package/dist/types/src/components/types.d.ts +29 -0
  113. package/dist/types/src/config/index.d.ts +3 -0
  114. package/dist/types/src/context/design.d.ts +11 -0
  115. package/dist/types/src/core/Design.d.ts +74 -0
  116. package/dist/types/src/core/FormSchema.d.ts +46 -0
  117. package/dist/types/src/core/Heart.d.ts +9 -0
  118. package/dist/types/src/core/index.d.ts +3 -0
  119. package/dist/types/src/effects/LifeCycle.d.ts +9 -0
  120. package/dist/types/src/effects/contants.d.ts +7 -0
  121. package/dist/types/src/effects/effect-dict.d.ts +4 -0
  122. package/dist/types/src/effects/effective.d.ts +3 -0
  123. package/dist/types/src/effects/index.d.ts +2 -0
  124. package/dist/types/src/effects/onEffects.d.ts +5 -0
  125. package/dist/types/src/effects/types.d.ts +9 -0
  126. package/dist/types/src/hooks/index.d.ts +2 -0
  127. package/dist/types/src/hooks/use-monaco.d.ts +4 -0
  128. package/dist/types/src/hooks/use-namespace/index.d.ts +23 -0
  129. package/dist/types/src/index.d.ts +4 -0
  130. package/dist/types/src/internal.d.ts +2 -0
  131. package/dist/types/src/types.d.ts +49 -0
  132. package/dist/types/src/utils/checkers.d.ts +21 -0
  133. package/dist/types/src/utils/index.d.ts +1 -0
  134. package/package.json +65 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @king-one/form-design
2
+
3
+ ## 0.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - text:测试发布
@@ -0,0 +1,10 @@
1
+ import "./src/index.mjs";
2
+ import { default as m } from "./src/components/form-desgin.mjs";
3
+ import { CreateFormDesign as t } from "./src/core/index.mjs";
4
+ import { BaseSchema as p, LayoutSchema as s } from "./src/config/index.mjs";
5
+ export {
6
+ p as BaseSchema,
7
+ t as CreateFormDesign,
8
+ m as FormDesign,
9
+ s as LayoutSchema
10
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./collapse.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,53 @@
1
+ import { defineComponent as e, openBlock as s, createBlock as i, Transition as o, mergeProps as n, toHandlers as r, withCtx as l, renderSlot as f } from "vue";
2
+ const p = /* @__PURE__ */ e({
3
+ __name: "collapse",
4
+ setup(g) {
5
+ function d(t) {
6
+ t.style.maxWidth = "", t.style.overflow = t.dataset.oldOverflow, t.style.paddingLeft = t.dataset.oldPaddingLeft, t.style.paddingRight = t.dataset.oldPaddingRight;
7
+ }
8
+ const a = {
9
+ beforeEnter(t) {
10
+ t.dataset || (t.dataset = {}), t.dataset.oldPaddingLeft = t.style.paddingLeft, t.dataset.oldPaddingRight = t.style.paddingRight, t.style.width && (t.dataset.elExistsWidth = t.style.width), t.style.maxWidth = 0, t.style.paddingLeft = 0, t.style.paddingRight = 0;
11
+ },
12
+ enter(t) {
13
+ requestAnimationFrame(() => {
14
+ t.dataset.oldOverflow = t.style.overflow, t.dataset.elExistsWidth ? t.style.maxWidth = t.dataset.elExistsWidth : t.scrollWidth !== 0 ? t.style.maxWidth = `${t.scrollWidth}px` : t.style.maxWidth = 0, t.style.paddingLeft = t.dataset.oldPaddingLeft, t.style.paddingRight = t.dataset.oldPaddingRight, t.style.overflow = "hidden";
15
+ });
16
+ },
17
+ afterEnter(t) {
18
+ t.style.maxWidth = "", t.style.overflow = t.dataset.oldOverflow;
19
+ },
20
+ enterCancelled(t) {
21
+ d(t);
22
+ },
23
+ beforeLeave(t) {
24
+ t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingRight = t.style.paddingRight, t.dataset.oldOverflow = t.style.overflow, t.style.maxWidth = `${t.scrollWidth}px`, t.style.overflow = "hidden";
25
+ },
26
+ leave(t) {
27
+ t.scrollWidth !== 0 && (t.style.maxWidth = 0, t.style.paddingTop = 0, t.style.paddingRight = 0);
28
+ },
29
+ afterLeave(t) {
30
+ d(t);
31
+ },
32
+ leaveCancelled(t) {
33
+ d(t);
34
+ }
35
+ };
36
+ return (t, h) => (s(), i(
37
+ o,
38
+ n({ name: "form-design-collapse" }, r(a)),
39
+ {
40
+ default: l(() => [
41
+ f(t.$slots, "default")
42
+ ]),
43
+ _: 3
44
+ /* FORWARDED */
45
+ },
46
+ 16
47
+ /* FULL_PROPS */
48
+ ));
49
+ }
50
+ });
51
+ export {
52
+ p as default
53
+ };
@@ -0,0 +1,18 @@
1
+ import { defineComponent as r, createVNode as t } from "vue";
2
+ import "../../utils/index.mjs";
3
+ import { widgetIconProps as e } from "../types.mjs";
4
+ import "../form-icon.vue.mjs";
5
+ import { isStr as n } from "../../utils/checkers.mjs";
6
+ import i from "../form-icon.vue2.mjs";
7
+ const u = /* @__PURE__ */ r({
8
+ name: "WidgetIcon",
9
+ props: e,
10
+ setup(o) {
11
+ return () => n(o.icon) ? t(i, {
12
+ name: o.icon
13
+ }, null, 8, ["name"]) : o.icon;
14
+ }
15
+ });
16
+ export {
17
+ u as default
18
+ };
@@ -0,0 +1,29 @@
1
+ import { defineComponent as s, ref as t, h as r } from "vue";
2
+ import "../internal.mjs";
3
+ import { useProvideDragContext as i, useProvideDesignContext as n } from "../context/design.mjs";
4
+ import "./index.mjs";
5
+ import { FormDesignProps as p } from "./types.mjs";
6
+ import { useNamespace as a } from "../hooks/use-namespace/index.mjs";
7
+ import f from "./form-material.vue.mjs";
8
+ import u from "./form-panel.vue.mjs";
9
+ import c from "./form-setting.vue.mjs";
10
+ const {
11
+ b: g
12
+ } = a("main"), $ = /* @__PURE__ */ s({
13
+ name: "FormDesign",
14
+ props: p,
15
+ setup(e) {
16
+ const o = t(!1);
17
+ return i({
18
+ isDrag: o,
19
+ updateDrag: (m) => {
20
+ o.value = m;
21
+ }
22
+ }), n(e.design), () => r("form", {
23
+ class: g()
24
+ }, [r(f), r(u), r(c)]);
25
+ }
26
+ });
27
+ export {
28
+ $ as default
29
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./form-icon.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent as i, computed as e, openBlock as l, createElementBlock as m, normalizeClass as a, normalizeStyle as p } from "vue";
2
+ import "../internal.mjs";
3
+ import { iconProps as u } from "./types.mjs";
4
+ import { useNamespace as f } from "../hooks/use-namespace/index.mjs";
5
+ const C = /* @__PURE__ */ i({
6
+ __name: "form-icon",
7
+ props: u,
8
+ setup(n) {
9
+ const o = n, { b: r } = f("icon"), t = e(() => `icon-from-design-${o.name}`), c = e(() => ({
10
+ fontSize: `${o.size}px`,
11
+ color: o.color
12
+ })), s = e(() => [r(), t.value]);
13
+ return (_, d) => (l(), m(
14
+ "i",
15
+ {
16
+ class: a(s.value),
17
+ style: p(c.value)
18
+ },
19
+ null,
20
+ 6
21
+ /* CLASS, STYLE */
22
+ ));
23
+ }
24
+ });
25
+ export {
26
+ C as default
27
+ };
@@ -0,0 +1,144 @@
1
+ import { defineComponent as N, ref as B, openBlock as n, createElementBlock as a, normalizeClass as d, unref as e, createElementVNode as i, createVNode as r, withCtx as l, createTextVNode as p, Fragment as V, renderList as E, toDisplayString as g, createBlock as I, createCommentVNode as v } from "vue";
2
+ import "../internal.mjs";
3
+ import { RadioGroup as S, RadioButton as _ } from "ant-design-vue";
4
+ import j from "vuedraggable";
5
+ import { uid as z } from "@king-one/utils";
6
+ import { useInjectDragContext as F, useInjectDesignContext as R } from "../context/design.mjs";
7
+ import G from "./base/widget-icon.mjs";
8
+ import { useNamespace as u } from "../hooks/use-namespace/index.mjs";
9
+ const K = { class: "widget-group-name" }, L = { class: "widget-col" }, M = { class: "widget-item" }, T = {
10
+ key: 0,
11
+ class: "widget-item-icon"
12
+ }, U = { class: "widget-item-title" }, W = /* @__PURE__ */ N({
13
+ name: "FormMaterial",
14
+ __name: "form-material",
15
+ setup($) {
16
+ const { updateDrag: m } = F(), { b: w } = u("material"), { b } = u("toolbar"), { b: k } = u("widget"), y = R(), { schema: C } = y, c = B("1");
17
+ function x(f) {
18
+ const t = z();
19
+ return {
20
+ ...f,
21
+ name: t,
22
+ id: t
23
+ };
24
+ }
25
+ function D() {
26
+ m(!0);
27
+ }
28
+ return (f, t) => (n(), a(
29
+ "div",
30
+ {
31
+ class: d(e(w)())
32
+ },
33
+ [
34
+ i(
35
+ "div",
36
+ {
37
+ class: d(e(b)())
38
+ },
39
+ [
40
+ r(e(S), {
41
+ value: c.value,
42
+ "onUpdate:value": t[0] || (t[0] = (o) => c.value = o),
43
+ "button-style": "solid",
44
+ size: "default"
45
+ }, {
46
+ default: l(() => [
47
+ r(e(_), {
48
+ class: "toolbar-button",
49
+ value: "1"
50
+ }, {
51
+ default: l(() => t[2] || (t[2] = [
52
+ p(" 组件库 ")
53
+ ])),
54
+ _: 1,
55
+ __: [2]
56
+ }),
57
+ r(e(_), {
58
+ class: "toolbar-button",
59
+ value: "2"
60
+ }, {
61
+ default: l(() => t[3] || (t[3] = [
62
+ p(" 流程模版 ")
63
+ ])),
64
+ _: 1,
65
+ __: [3]
66
+ })
67
+ ]),
68
+ _: 1
69
+ /* STABLE */
70
+ }, 8, ["value"])
71
+ ],
72
+ 2
73
+ /* CLASS */
74
+ ),
75
+ i(
76
+ "div",
77
+ {
78
+ class: d(e(k)())
79
+ },
80
+ [
81
+ (n(!0), a(
82
+ V,
83
+ null,
84
+ E(e(C), (o) => (n(), a("div", {
85
+ key: o.key,
86
+ class: "widget-group"
87
+ }, [
88
+ i(
89
+ "div",
90
+ K,
91
+ g(o.name),
92
+ 1
93
+ /* TEXT */
94
+ ),
95
+ o.widget ? (n(), I(e(j), {
96
+ key: 0,
97
+ list: o.widget,
98
+ class: "widget-list-drag",
99
+ "item-key": "key",
100
+ group: { name: "form", pull: "clone", put: !1 },
101
+ sort: !1,
102
+ options: { animation: 150 },
103
+ clone: x,
104
+ onStart: D,
105
+ onEnd: t[1] || (t[1] = (s) => e(m)(!1))
106
+ }, {
107
+ item: l(({ element: s }) => [
108
+ i("div", L, [
109
+ i("div", M, [
110
+ s.icon ? (n(), a("div", T, [
111
+ r(e(G), {
112
+ icon: s.icon
113
+ }, null, 8, ["icon"])
114
+ ])) : v("v-if", !0),
115
+ i(
116
+ "div",
117
+ U,
118
+ g(s.title),
119
+ 1
120
+ /* TEXT */
121
+ )
122
+ ])
123
+ ])
124
+ ]),
125
+ _: 2
126
+ /* DYNAMIC */
127
+ }, 1032, ["list"])) : v("v-if", !0)
128
+ ]))),
129
+ 128
130
+ /* KEYED_FRAGMENT */
131
+ ))
132
+ ],
133
+ 2
134
+ /* CLASS */
135
+ )
136
+ ],
137
+ 2
138
+ /* CLASS */
139
+ ));
140
+ }
141
+ });
142
+ export {
143
+ W as default
144
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./form-material.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,160 @@
1
+ import { defineComponent as S, useTemplateRef as F, ref as N, openBlock as p, createElementBlock as u, normalizeClass as l, unref as e, createElementVNode as t, createVNode as o, withCtx as n, createCommentVNode as i, withDirectives as _, renderSlot as T, vShow as h } from "vue";
2
+ import "../internal.mjs";
3
+ import { Tooltip as v, Form as V } from "ant-design-vue";
4
+ import y from "vuedraggable";
5
+ import { useInjectDragContext as I, useInjectDesignContext as $ } from "../context/design.mjs";
6
+ import "./panel/panel-item.vue.mjs";
7
+ import "./index.mjs";
8
+ import { useMonaco as z } from "../hooks/use-monaco.mjs";
9
+ import { useNamespace as j } from "../hooks/use-namespace/index.mjs";
10
+ import g from "./form-icon.vue2.mjs";
11
+ import B from "./panel/panel-item.vue2.mjs";
12
+ const R = { class: "left" }, J = { class: "content-panel" }, M = {
13
+ key: 0,
14
+ class: "prompt"
15
+ }, O = { class: "form-item" }, P = {
16
+ ref: "contentEditorTel",
17
+ class: "content-editor"
18
+ }, ee = /* @__PURE__ */ S({
19
+ name: "FormPanel",
20
+ __name: "form-panel",
21
+ setup(q) {
22
+ const b = F("contentEditorTel"), { isDrag: C } = I(), { setEditorValue: k } = z(b), s = N(!1), r = $(), { fields: c } = r;
23
+ function E() {
24
+ s.value = !s.value, k(r.getFormSchema());
25
+ }
26
+ function w() {
27
+ }
28
+ const { b: x, e: m, em: d } = j("panel");
29
+ return (D, a) => (p(), u(
30
+ "div",
31
+ {
32
+ class: l(e(x)())
33
+ },
34
+ [
35
+ t(
36
+ "div",
37
+ {
38
+ class: l(e(m)("toolbar"))
39
+ },
40
+ [
41
+ t("div", R, [
42
+ o(e(v), { placement: "bottom" }, {
43
+ title: n(() => a[0] || (a[0] = [
44
+ t(
45
+ "span",
46
+ null,
47
+ "全部删除",
48
+ -1
49
+ /* CACHED */
50
+ )
51
+ ])),
52
+ default: n(() => [
53
+ o(e(g), {
54
+ name: "delete1",
55
+ class: l(e(d)("toolbar", "icon")),
56
+ size: 18,
57
+ onClick: w
58
+ }, null, 8, ["class"])
59
+ ]),
60
+ _: 1
61
+ /* STABLE */
62
+ }),
63
+ o(e(v), { placement: "bottom" }, {
64
+ title: n(() => a[1] || (a[1] = [
65
+ t(
66
+ "span",
67
+ null,
68
+ "查看JSON Schema",
69
+ -1
70
+ /* CACHED */
71
+ )
72
+ ])),
73
+ default: n(() => [
74
+ o(e(g), {
75
+ name: "code",
76
+ class: l(e(d)("toolbar", "icon")),
77
+ size: 18,
78
+ onClick: E
79
+ }, null, 8, ["class"])
80
+ ]),
81
+ _: 1
82
+ /* STABLE */
83
+ }),
84
+ i(` <FormIcon name="desktop" />
85
+ <FormIcon name="mobile" /> `)
86
+ ])
87
+ ],
88
+ 2
89
+ /* CLASS */
90
+ ),
91
+ i(' ref="contentTelRef" '),
92
+ t(
93
+ "div",
94
+ {
95
+ class: l(e(m)("content"))
96
+ },
97
+ [
98
+ _(t(
99
+ "div",
100
+ J,
101
+ [
102
+ !e(C) && e(c).length === 0 ? (p(), u("div", M, " 👈 请在左侧选择控件并拖至此处 ")) : i("v-if", !0),
103
+ o(e(V), {
104
+ autocomplete: "off",
105
+ class: "design-from",
106
+ "label-col": { style: { width: "100px" } },
107
+ "label-align": "left"
108
+ }, {
109
+ default: n(() => [
110
+ o(e(y), {
111
+ class: "drag-from",
112
+ list: e(c),
113
+ group: "form",
114
+ animation: 300,
115
+ sort: !0,
116
+ "item-key": "id",
117
+ "chosen-class": "choose"
118
+ }, {
119
+ item: n(({ element: f }) => [
120
+ t("div", O, [
121
+ T(D.$slots, `panel-${f.key}`, {}, () => [
122
+ o(B, { field: f }, null, 8, ["field"])
123
+ ])
124
+ ])
125
+ ]),
126
+ _: 3
127
+ /* FORWARDED */
128
+ }, 8, ["list"])
129
+ ]),
130
+ _: 3
131
+ /* FORWARDED */
132
+ })
133
+ ],
134
+ 512
135
+ /* NEED_PATCH */
136
+ ), [
137
+ [h, !s.value]
138
+ ]),
139
+ _(t(
140
+ "div",
141
+ P,
142
+ null,
143
+ 512
144
+ /* NEED_PATCH */
145
+ ), [
146
+ [h, s.value]
147
+ ])
148
+ ],
149
+ 2
150
+ /* CLASS */
151
+ )
152
+ ],
153
+ 2
154
+ /* CLASS */
155
+ ));
156
+ }
157
+ });
158
+ export {
159
+ ee as default
160
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./form-panel.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,116 @@
1
+ import { defineComponent as k, ref as v, computed as b, openBlock as s, createElementBlock as g, normalizeClass as y, createVNode as t, withCtx as o, withDirectives as C, createElementVNode as i, unref as e, createBlock as r, createTextVNode as h, vShow as x } from "vue";
2
+ import { Tabs as $, TabPane as n, Collapse as z, CollapsePanel as m, Empty as N } from "ant-design-vue";
3
+ import "../internal.mjs";
4
+ import "../hooks/index.mjs";
5
+ import "./form-icon.vue.mjs";
6
+ import "./base/collapse.vue.mjs";
7
+ import "./props/index.mjs";
8
+ import { useInjectDesignContext as w } from "../context/design.mjs";
9
+ import { useNamespace as c } from "../hooks/use-namespace/index.mjs";
10
+ import B from "./base/collapse.vue2.mjs";
11
+ import E from "./props/base-props.vue.mjs";
12
+ import T from "./props/component-props.vue.mjs";
13
+ import p from "./form-icon.vue2.mjs";
14
+ const V = { class: "setting-aside" }, R = /* @__PURE__ */ k({
15
+ name: "FormSetting",
16
+ __name: "form-setting",
17
+ setup(j) {
18
+ const { checkedField: d } = w(), { b: u } = c("setting"), { b: f } = c("setting-collapse"), a = v(!0), _ = b(() => [u(), !a.value && f()]);
19
+ return (D, l) => (s(), g(
20
+ "div",
21
+ {
22
+ class: y(_.value)
23
+ },
24
+ [
25
+ t(B, null, {
26
+ default: o(() => [
27
+ C(i(
28
+ "div",
29
+ null,
30
+ [
31
+ i("aside", V, [
32
+ t(e($), {
33
+ size: "small",
34
+ centered: ""
35
+ }, {
36
+ default: o(() => [
37
+ t(e(n), {
38
+ key: "1",
39
+ tab: "组件配置"
40
+ }, {
41
+ default: o(() => [
42
+ Object.keys(e(d)).length ? (s(), r(e(z), { key: 0 }, {
43
+ default: o(() => [
44
+ t(e(m), { header: "基础设置" }, {
45
+ default: o(() => [
46
+ t(e(E))
47
+ ]),
48
+ _: 1
49
+ /* STABLE */
50
+ }),
51
+ t(e(m), { header: "属性设置" }, {
52
+ default: o(() => [
53
+ t(e(T))
54
+ ]),
55
+ _: 1
56
+ /* STABLE */
57
+ })
58
+ ]),
59
+ _: 1
60
+ /* STABLE */
61
+ })) : (s(), r(e(N), {
62
+ key: 1,
63
+ description: "暂无配置"
64
+ }))
65
+ ]),
66
+ _: 1
67
+ /* STABLE */
68
+ }),
69
+ t(e(n), {
70
+ key: "2",
71
+ tab: "表单配置"
72
+ }, {
73
+ default: o(() => l[1] || (l[1] = [
74
+ h(" 表单配置 ")
75
+ ])),
76
+ _: 1,
77
+ __: [1]
78
+ })
79
+ ]),
80
+ _: 1
81
+ /* STABLE */
82
+ })
83
+ ])
84
+ ],
85
+ 512
86
+ /* NEED_PATCH */
87
+ ), [
88
+ [x, a.value]
89
+ ])
90
+ ]),
91
+ _: 1
92
+ /* STABLE */
93
+ }),
94
+ i("div", {
95
+ class: "setting-collapse",
96
+ onClick: l[0] || (l[0] = (F) => a.value = !a.value)
97
+ }, [
98
+ a.value ? (s(), r(p, {
99
+ key: 0,
100
+ name: "double-left",
101
+ size: 18
102
+ })) : (s(), r(p, {
103
+ key: 1,
104
+ name: "double-right",
105
+ size: 18
106
+ }))
107
+ ])
108
+ ],
109
+ 2
110
+ /* CLASS */
111
+ ));
112
+ }
113
+ });
114
+ export {
115
+ R as default
116
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./form-setting.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import "./form-material.vue2.mjs";
2
+ import "./form-setting.vue2.mjs";
3
+ import "./form-panel.vue2.mjs";
4
+ import "./form-icon.vue.mjs";
@@ -0,0 +1,9 @@
1
+ import { Input as t, Textarea as e, InputNumber as n } from "ant-design-vue";
2
+ const r = {
3
+ input: t,
4
+ textarea: e,
5
+ "input-number": n
6
+ };
7
+ export {
8
+ r as panels
9
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./panel-item.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,66 @@
1
+ import { defineComponent as k, computed as v, openBlock as l, createElementBlock as c, normalizeClass as n, createVNode as C, unref as o, withCtx as y, createBlock as b, resolveDynamicComponent as g, mergeProps as h } from "vue";
2
+ import { FormItem as B } from "ant-design-vue";
3
+ import "../../internal.mjs";
4
+ import { useInjectDesignContext as w } from "../../context/design.mjs";
5
+ import { useNamespace as D } from "../../hooks/use-namespace/index.mjs";
6
+ const P = /* @__PURE__ */ k({
7
+ __name: "panel-item",
8
+ props: {
9
+ field: {}
10
+ },
11
+ setup(p) {
12
+ const d = p, { b: t, e: r, m: i } = D("panel-item");
13
+ console.log(i("active"));
14
+ const { panelComponents: s, checkedField: a } = w();
15
+ function f(e) {
16
+ a.value = e;
17
+ }
18
+ const u = v(() => {
19
+ var e;
20
+ return ((e = a.value) == null ? void 0 : e.id) === d.field.id ? [t(), i("active")] : [t()];
21
+ });
22
+ return (e, m) => (l(), c(
23
+ "div",
24
+ {
25
+ class: n(u.value),
26
+ onClick: m[0] || (m[0] = (F) => f(e.field))
27
+ },
28
+ [
29
+ C(o(B), {
30
+ class: n(o(r)("form")),
31
+ label: e.field.title
32
+ }, {
33
+ default: y(() => [
34
+ o(s)[e.field.key] ? (l(), b(
35
+ g(o(s)[e.field.key]),
36
+ h({
37
+ key: 0,
38
+ style: { width: "100%" },
39
+ readonly: ""
40
+ }, e.field["k-component-props"]),
41
+ null,
42
+ 16
43
+ /* FULL_PROPS */
44
+ )) : (l(), c(
45
+ "div",
46
+ {
47
+ key: 1,
48
+ class: n(o(r)("error"))
49
+ },
50
+ " 未定义组件 ",
51
+ 2
52
+ /* CLASS */
53
+ ))
54
+ ]),
55
+ _: 1
56
+ /* STABLE */
57
+ }, 8, ["class", "label"])
58
+ ],
59
+ 2
60
+ /* CLASS */
61
+ ));
62
+ }
63
+ });
64
+ export {
65
+ P as default
66
+ };