@duxweb/dvha-pro 1.1.28 → 1.1.29

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.
@@ -1,8 +1,8 @@
1
- import { defineComponent as m, inject as l, computed as p, createVNode as o } from "vue";
1
+ import { defineComponent as s, inject as d, computed as n, createVNode as t } from "vue";
2
+ import { useI18n as c } from "@duxweb/dvha-core";
3
+ import l from "clsx";
4
+ import { NScrollbar as u } from "naive-ui";
2
5
  import "@vueuse/core";
3
- import "clsx";
4
- import "naive-ui";
5
- import "@duxweb/dvha-core";
6
6
  import "vue-echarts";
7
7
  import "vue-router";
8
8
  import "@overlastic/vue";
@@ -54,7 +54,7 @@ import "vue-draggable-plus";
54
54
  import "short-unique-id";
55
55
  import "aieditor";
56
56
  import "@vue-flow/core";
57
- import { DuxFormLayout as a } from "../../form/formLayout.js";
57
+ import { DuxFormLayout as g } from "../../form/formLayout.js";
58
58
  import "lodash-es/cloneDeep";
59
59
  import "@vue-flow/background";
60
60
  /* empty css */
@@ -63,55 +63,93 @@ import "@iconify-json/tabler/icons.json";
63
63
  import "../../posterEditor/elements/index.js";
64
64
  import "fabric";
65
65
  import "../../schemaEditor/schemaEditor.js";
66
- const Et = /* @__PURE__ */ m({
66
+ function a({
67
+ icon: p,
68
+ iconBgClass: o = "bg-primary",
69
+ title: e,
70
+ description: i
71
+ }) {
72
+ return t("div", {
73
+ class: "p-4 border-b border-default"
74
+ }, [t("div", {
75
+ class: "flex gap-2 items-center"
76
+ }, [p && t("div", {
77
+ class: l(["rounded p-2 flex-shrink-0", o])
78
+ }, [t("div", {
79
+ class: l(["size-6 text-white", p])
80
+ }, null)]), t("div", {
81
+ class: "flex-1 min-w-0"
82
+ }, [t("h3", {
83
+ class: "text-base font-medium"
84
+ }, [e]), i && t("p", {
85
+ class: "text-sm text-muted mt-1"
86
+ }, [i])])])]);
87
+ }
88
+ const wt = /* @__PURE__ */ s({
67
89
  name: "WidgetEditorSetting",
68
90
  props: {
69
91
  actionRender: Function
70
92
  },
71
- setup(e) {
72
- const t = l("editor.use"), i = p(() => t?.getData(t.selected.value)), n = p(() => t?.components.value?.find((r) => r.name === i.value?.name));
73
- return () => o("div", {
74
- class: "flex-none p-2 max-w-full w-220px overflow-y-auto bg-default",
93
+ setup(p) {
94
+ const {
95
+ t: o
96
+ } = c(), e = d("editor.use"), i = n(() => e?.getData(e.selected.value)), r = n(() => e?.components.value?.find((m) => m.name === i.value?.name));
97
+ return () => t("div", {
98
+ class: "h-full w-full flex flex-col",
75
99
  key: i.value?.key
76
- }, [n.value?.setting?.({
77
- value: i.value?.options,
78
- "update:modelValue": (r) => {
79
- i?.value && (i.value.options = r);
80
- }
81
- }) || o("div", {
82
- class: "flex flex-col gap-2 h-full"
83
- }, [o("div", {
100
+ }, [!r.value && t(a, {
101
+ icon: "i-tabler:settings",
102
+ iconBgClass: "bg-gray-500",
103
+ title: o("components.designEditor.properties") || "Properties",
104
+ description: o("components.designEditor.selectComponent") || "Select a component to configure"
105
+ }, null), r.value && t(a, {
106
+ icon: r.value.icon,
107
+ iconBgClass: "bg-primary",
108
+ title: r.value.label || r.value.name || o("components.designEditor.component") || "Component",
109
+ description: r.value.description || o("components.designEditor.componentSettings") || "Configure component options"
110
+ }, null), t(u, {
84
111
  class: "flex-1 min-h-0"
85
- }, [t?.settingPage?.component?.({
86
- value: t.value.value.config,
87
- "update:modelValue": (r) => {
88
- t.value.value.config = r;
89
- }
90
- })]), e?.actionRender?.(t)])]);
112
+ }, {
113
+ default: () => [t("div", {
114
+ class: "p-3 pr-2"
115
+ }, [r.value?.setting?.({
116
+ value: i.value?.options,
117
+ "update:modelValue": (m) => {
118
+ i?.value && (i.value.options = m);
119
+ }
120
+ }) || t("div", {
121
+ class: "flex flex-col gap-3"
122
+ }, [t("div", null, [e?.settingPage?.component?.({
123
+ value: e.value.value.config,
124
+ "update:modelValue": (m) => {
125
+ e.value.value.config = m;
126
+ }
127
+ })]), p?.actionRender?.(e)])])]
128
+ })]);
91
129
  }
92
- }), Wt = /* @__PURE__ */ m({
130
+ }), Dt = /* @__PURE__ */ s({
93
131
  name: "WidgetEditorSettingCard",
94
132
  props: {
95
133
  title: String,
96
134
  icon: String
97
135
  },
98
- setup(e, {
99
- slots: t
136
+ setup(p, {
137
+ slots: o
100
138
  }) {
101
- return () => o("div", {
139
+ return () => t("div", {
102
140
  class: "flex flex-col"
103
- }, [o("div", {
104
- class: "bg-elevated rounded py-2 px-4 flex justify-center items-center gap-2"
105
- }, [o("div", null, [e.title])]), o("div", {
141
+ }, [t("div", {
142
+ class: "bg-elevated border border-default rounded-md py-2 px-4 flex justify-center items-center gap-2"
143
+ }, [t("div", null, [p.title])]), t("div", {
106
144
  class: "py-4 flex-1"
107
- }, [o(a, {
145
+ }, [t(g, {
108
146
  labelPlacement: "top"
109
147
  }, {
110
- default: () => [t.default?.()]
148
+ default: () => [o.default?.()]
111
149
  })])]);
112
150
  }
113
151
  });
114
152
  export {
115
- Et as WidgetEditorSetting,
116
- Wt as WidgetEditorSettingCard
153
+ wt as WidgetEditorSetting,
154
+ Dt as WidgetEditorSettingCard
117
155
  };
@@ -1,17 +1,17 @@
1
- import { defineComponent as f, provide as g, watch as d, ref as x, createVNode as a } from "vue";
2
- import { useI18n as v } from "@duxweb/dvha-core";
3
- import u from "clsx";
4
- import { cloneDeep as i } from "lodash-es";
5
- import { NScrollbar as b } from "naive-ui";
6
- import w from "short-unique-id";
7
- import { VueDraggable as h } from "vue-draggable-plus";
8
- import { DuxCard as y } from "../card/card.js";
1
+ import { defineComponent as v, provide as x, watch as i, createVNode as t } from "vue";
2
+ import { useI18n as h } from "@duxweb/dvha-core";
3
+ import d from "clsx";
4
+ import { cloneDeep as s } from "lodash-es";
5
+ import { NScrollbar as w } from "naive-ui";
6
+ import y from "short-unique-id";
7
+ import { VueDraggable as D } from "vue-draggable-plus";
8
+ import { DuxCard as k } from "../card/card.js";
9
9
  import "@vueuse/core";
10
- import { duxFormEditorGrid as D } from "./components/grid.js";
11
- import { useEditor as k } from "./editor/hook.js";
12
- import { DuxWidgetEditorPreview as c } from "./editor/preview.js";
13
- import { WidgetEditorSetting as C } from "./editor/setting.js";
14
- const M = /* @__PURE__ */ f({
10
+ import { duxFormEditorGrid as E } from "./components/grid.js";
11
+ import { useEditor as C } from "./editor/hook.js";
12
+ import { DuxWidgetEditorPreview as u } from "./editor/preview.js";
13
+ import { WidgetEditorSetting as U } from "./editor/setting.js";
14
+ const O = /* @__PURE__ */ v({
15
15
  name: "DuxDesignEditor",
16
16
  props: {
17
17
  data: Object,
@@ -22,86 +22,81 @@ const M = /* @__PURE__ */ f({
22
22
  actionRender: Function,
23
23
  previewWrapper: Function
24
24
  },
25
- setup(r) {
25
+ setup(l) {
26
26
  const {
27
27
  t: o
28
- } = v(), t = k({
29
- settingPage: r.settingPage
28
+ } = h(), a = C({
29
+ settingPage: l.settingPage
30
30
  });
31
- g("editor.use", t), d([() => r.components, () => r.groups], () => {
32
- t.clearGroup(), t.clearComponent(), t.addGroup({
31
+ x("editor.use", a), i([() => l.components, () => l.groups], () => {
32
+ a.clearGroup(), a.clearComponent(), a.addGroup({
33
33
  name: "layout",
34
34
  label: o("components.designEditor.layout") || "Layout",
35
35
  icon: "i-tabler:layout"
36
- }), r.groups?.forEach((e) => {
37
- t.addGroup(e);
38
- }), t.addComponent(D(o)), r.components?.forEach((e) => {
39
- t.addComponent(e);
36
+ }), l.groups?.forEach((e) => {
37
+ a.addGroup(e);
38
+ }), a.addComponent(E(o)), l.components?.forEach((e) => {
39
+ a.addComponent(e);
40
40
  });
41
41
  }, {
42
42
  immediate: !0,
43
43
  deep: !0
44
44
  });
45
- const l = x(), {
46
- randomUUID: p
47
- } = new w({
45
+ const {
46
+ randomUUID: g
47
+ } = new y({
48
48
  length: 10
49
49
  }), m = (e) => ({
50
- key: p(),
50
+ key: g(),
51
51
  name: e.name,
52
- options: i(e.settingDefault)
52
+ options: s(e.settingDefault)
53
53
  });
54
- return d(() => r.data, (e) => {
55
- const n = r.settingPage?.default || {};
56
- t.value.value = {
54
+ i(() => l.data, (e) => {
55
+ const r = l.settingPage?.default || {};
56
+ a.value.value = {
57
57
  config: {
58
- ...n,
59
- ...i(e?.config || {})
58
+ ...r,
59
+ ...s(e?.config || {})
60
60
  },
61
- data: i(e?.data || [])
61
+ data: s(e?.data || [])
62
62
  };
63
63
  }, {
64
64
  deep: !0,
65
65
  immediate: !0
66
- }), d(t.value, (e) => {
67
- r.onUpdateData?.(e);
66
+ }), i(a.value, (e) => {
67
+ l.onUpdateData?.(e);
68
68
  }, {
69
69
  deep: !0
70
- }), () => a(y, {
70
+ });
71
+ const c = ["bg-red-500", "bg-orange-500", "bg-amber-500", "bg-yellow-500", "bg-lime-500", "bg-green-500", "bg-emerald-500", "bg-teal-500", "bg-cyan-500", "bg-sky-500", "bg-blue-500", "bg-indigo-500", "bg-violet-500", "bg-purple-500", "bg-fuchsia-500", "bg-pink-500", "bg-rose-500"];
72
+ return () => t(k, {
71
73
  class: "h-full",
72
74
  shadow: !0
73
75
  }, {
74
- default: () => [a("div", {
75
- class: "h-full flex flex-row text-default"
76
- }, [a("div", {
77
- class: "flex-none flex flex-col gap-2 border-r border-default bg-default p-2"
78
- }, [a(s, {
79
- title: o("components.designEditor.all") || "All",
80
- icon: "i-tabler:hexagons",
81
- active: !l.value,
82
- onClick: () => {
83
- l.value = void 0;
84
- }
85
- }, null), t.group.value?.map((e, n) => a(s, {
86
- key: n,
87
- active: l.value === e.name,
88
- title: e.label,
89
- icon: e.icon,
90
- onClick: () => {
91
- l.value = e.name;
92
- }
93
- }, null))]), a("div", {
94
- class: "flex-none text-xs w-180px bg-default",
95
- id: "comp-list"
96
- }, [a(b, null, {
97
- default: () => [a("div", {
98
- class: "flex flex-col gap-4 p-2"
99
- }, [t.tree.value?.filter((e) => l.value ? e.name === l.value : !0).map((e) => a("div", {
76
+ default: () => [t("div", {
77
+ class: "h-full w-full relative text-default bg-muted rounded-md"
78
+ }, [t("div", {
79
+ class: "absolute top-4 left-4 bottom-4 z-10"
80
+ }, [t("div", {
81
+ class: "h-full w-220px bg-default shadow rounded"
82
+ }, [t("div", {
83
+ class: "h-full flex flex-col"
84
+ }, [t(w, {
85
+ class: "flex-1 min-h-0"
86
+ }, {
87
+ default: () => [t("div", {
88
+ class: "p-4 space-y-4",
89
+ id: "comp-list"
90
+ }, [a.tree.value?.filter((e) => e.children && e.children.length > 0).map((e, r) => t("div", {
100
91
  key: e.name,
101
- class: "flex flex-col gap-2"
102
- }, [a("div", {
103
- class: "bg-muted border border-muted rounded p-2 flex justify-center"
104
- }, [e.label]), a(h, {
92
+ class: "space-y-2"
93
+ }, [t("div", {
94
+ class: "flex items-center gap-2 text-sm px-1"
95
+ }, [t("div", {
96
+ class: d(["size-4", e.icon])
97
+ }, null), t("span", {
98
+ class: "truncate"
99
+ }, [e.label])]), t(D, {
105
100
  modelValue: e.children || [],
106
101
  animation: 150,
107
102
  group: {
@@ -111,52 +106,52 @@ const M = /* @__PURE__ */ f({
111
106
  },
112
107
  sort: !1,
113
108
  clone: m,
114
- class: "grid grid-cols-2 items-start gap-2 "
109
+ class: "space-y-2"
115
110
  }, {
116
- default: () => [e.children?.map((n) => a("div", {
117
- key: n.name,
118
- class: "border border-muted rounded-sm p-2 flex flex-col items-center gap-2 cursor-pointer hover:bg-muted edit-drag"
119
- }, [a("div", {
120
- class: u(["size-6", n.icon])
121
- }, null), a("div", {
122
- class: "truncate whitespace-nowrap px-2 overflow-hidden"
123
- }, [n.label])]))]
124
- })]))])]
125
- })]), a("div", {
126
- class: "flex-1 shadow-sm flex flex-col items-center p-6 overflow-auto",
111
+ default: () => [e.children?.map((n, p) => {
112
+ const f = (r * 20 + p) % c.length, b = c[f];
113
+ return t("div", {
114
+ key: n.name,
115
+ class: "rounded-lg px-3 py-2 cursor-move transition-all bg-default dark:bg-muted hover:bg-elevated edit-drag flex items-center gap-3"
116
+ }, [t("div", {
117
+ class: d(["size-8 rounded-lg flex items-center justify-center flex-shrink-0", b])
118
+ }, [t("div", {
119
+ class: d(["size-4 text-white", n.icon])
120
+ }, null)]), t("div", {
121
+ class: "flex-1 min-w-0"
122
+ }, [t("div", {
123
+ class: "text-sm font-medium truncate"
124
+ }, [n.label]), n.description && t("div", {
125
+ class: "text-xs truncate opacity-80"
126
+ }, [n.description])])]);
127
+ })]
128
+ })])), a.tree.value?.filter((e) => e.children && e.children.length > 0).length === 0 && t("div", {
129
+ class: "text-xs text-muted text-center py-4"
130
+ }, [o("components.designEditor.empty") || "No components"])])]
131
+ })])])]), t("div", {
132
+ class: "absolute inset-0 shadow-sm flex flex-col items-center p-6 overflow-auto",
127
133
  style: "background: linear-gradient(45deg, rgba(0,0,0, 0.1) 25%, transparent 25%), linear-gradient(-45deg, rgba(0,0,0, 0.1) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(0,0,0, 0.1) 75%), linear-gradient(-45deg, transparent 75%, rgba(0,0,0, 0.1) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px;"
128
- }, [a("div", {
134
+ }, [t("div", {
129
135
  class: "max-w-2xl w-full flex-1 bg-default shadow p-2",
130
136
  onClick: () => {
131
- t.selected.value = void 0;
137
+ a.selected.value = void 0;
132
138
  }
133
- }, [r.previewWrapper ? r.previewWrapper(a(c, {
134
- modelValue: t.value.value?.data,
135
- onUpdate: (e) => t.value.value.data = e
136
- }, null), t) : a(c, {
137
- modelValue: t.value.value?.data,
138
- onUpdate: (e) => t.value.value.data = e
139
- }, null)])]), a(C, {
140
- actionRender: r.actionRender
141
- }, null)])]
139
+ }, [l.previewWrapper ? l.previewWrapper(t(u, {
140
+ modelValue: a.value.value?.data,
141
+ onUpdate: (e) => a.value.value.data = e
142
+ }, null), a) : t(u, {
143
+ modelValue: a.value.value?.data,
144
+ onUpdate: (e) => a.value.value.data = e
145
+ }, null)])]), t("div", {
146
+ class: "absolute top-4 right-4 bottom-4 z-10"
147
+ }, [t("div", {
148
+ class: "h-full w-300px bg-default shadow rounded"
149
+ }, [t(U, {
150
+ actionRender: l.actionRender
151
+ }, null)])])])]
142
152
  });
143
153
  }
144
154
  });
145
- function s({
146
- title: r,
147
- icon: o,
148
- active: t,
149
- onClick: l
150
- }) {
151
- return a("div", {
152
- class: u(["flex flex-col items-center px-3 py-2 hover:bg-primary/10 cursor-pointer rounded-sm", t ? "bg-primary/10 text-primary" : ""]),
153
- onClick: l
154
- }, [a("div", {
155
- class: u(["size-4", o])
156
- }, null), a("div", {
157
- class: "truncate whitespace-nowrap text-default text-sm"
158
- }, [r])]);
159
- }
160
155
  export {
161
- M as DuxDesignEditor
156
+ O as DuxDesignEditor
162
157
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as f, computed as u, createVNode as t, mergeProps as E, isVNode as x } from "vue";
2
- import { useI18n as F } from "@duxweb/dvha-core";
3
- import { NButton as a } from "naive-ui";
1
+ import { defineComponent as f, computed as c, createVNode as m, mergeProps as E, isVNode as x } from "vue";
2
+ import { useI18n as b } from "@duxweb/dvha-core";
3
+ import { NButton as s } from "naive-ui";
4
4
  import "vue-router";
5
5
  import "@overlastic/vue";
6
6
  import "@vueuse/core";
@@ -48,34 +48,34 @@ import "vue-command-palette";
48
48
  import "@duxweb/dvha-naiveui";
49
49
  import "../../pages/page404.js";
50
50
  import "vue-draggable-plus";
51
- import { DuxDesignEditor as l } from "../designEditor/editor.js";
51
+ import { DuxDesignEditor as a } from "../designEditor/editor.js";
52
52
  import "short-unique-id";
53
53
  import "aieditor";
54
54
  import "@vue-flow/core";
55
- import { DuxFormLayout as g } from "../form/formLayout.js";
55
+ import { DuxFormLayout as y } from "../form/formLayout.js";
56
56
  import "lodash-es/cloneDeep";
57
57
  import "@vue-flow/background";
58
58
  /* empty css */
59
- import { DuxFormEditorSettingPage as v } from "./base/setting.js";
60
- import { duxFormEditorCascader as y } from "./components/cascader.js";
61
- import { duxFormEditorCascaderAsync as b } from "./components/cascaderAsync.js";
62
- import { duxFormEditorCheckbox as S } from "./components/checkbox.js";
63
- import { duxFormEditorColor as D } from "./components/color.js";
64
- import { duxFormEditorDate as C } from "./components/date.js";
65
- import { duxFormEditorDynamicInput as P } from "./components/dynamicInput.js";
59
+ import { DuxFormEditorSettingPage as D } from "./base/setting.js";
60
+ import { duxFormEditorCascader as F } from "./components/cascader.js";
61
+ import { duxFormEditorCascaderAsync as g } from "./components/cascaderAsync.js";
62
+ import { duxFormEditorCheckbox as v } from "./components/checkbox.js";
63
+ import { duxFormEditorColor as S } from "./components/color.js";
64
+ import { duxFormEditorDate as A } from "./components/date.js";
65
+ import { duxFormEditorDynamicInput as h } from "./components/dynamicInput.js";
66
66
  import { duxFormEditorDynamicTags as k } from "./components/dynamicTags.js";
67
- import { duxFormEditorAIEditor as A } from "./components/editor.js";
68
- import { duxFormEditorFileUpload as I } from "./components/fileUpload.js";
69
- import { duxFormEditorImageUpload as h } from "./components/imageUpload.js";
70
- import { duxFormEditorInput as j } from "./components/input.js";
67
+ import { duxFormEditorAIEditor as C } from "./components/editor.js";
68
+ import { duxFormEditorFileUpload as P } from "./components/fileUpload.js";
69
+ import { duxFormEditorImageUpload as I } from "./components/imageUpload.js";
70
+ import { duxFormEditorInput as w } from "./components/input.js";
71
71
  import { duxFormEditorInputNumber as T } from "./components/inputNumber.js";
72
- import { duxFormEditorMentionAsync as w } from "./components/mentionAsync.js";
72
+ import { duxFormEditorMentionAsync as j } from "./components/mentionAsync.js";
73
73
  import { duxFormEditorRadio as N } from "./components/radio.js";
74
74
  import { duxFormEditorRegion as O } from "./components/region.js";
75
- import { duxFormEditorSelect as _ } from "./components/select.js";
76
- import { duxFormEditorSelectAsync as R } from "./components/selectAsync.js";
77
- import { duxFormEditorSider as M } from "./components/sider.js";
78
- import { duxFormEditorSwitch as U } from "./components/switch.js";
75
+ import { duxFormEditorSelect as U } from "./components/select.js";
76
+ import { duxFormEditorSelectAsync as _ } from "./components/selectAsync.js";
77
+ import { duxFormEditorSider as R } from "./components/sider.js";
78
+ import { duxFormEditorSwitch as M } from "./components/switch.js";
79
79
  import { duxFormEditorTime as V } from "./components/time.js";
80
80
  import { duxFormEditorTransferAsync as B } from "./components/transferAsync.js";
81
81
  import { duxFormEditorTreeSelect as L } from "./components/treeSelect.js";
@@ -89,19 +89,19 @@ import "dayjs";
89
89
  import { useModal as q } from "../../hooks/modal.js";
90
90
  import "@tanstack/vue-query";
91
91
  import "pinia";
92
- function p(m) {
93
- return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !x(m);
92
+ function n(e) {
93
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !x(e);
94
94
  }
95
- const Ir = /* @__PURE__ */ f({
95
+ const Pr = /* @__PURE__ */ f({
96
96
  name: "DuxFormEditor",
97
97
  props: {
98
98
  onSave: Function
99
99
  },
100
- extends: l,
101
- setup(m) {
100
+ extends: a,
101
+ setup(e) {
102
102
  const {
103
103
  t: o
104
- } = F(), d = q(), c = u(() => [{
104
+ } = b(), d = q(), l = c(() => [{
105
105
  name: "form",
106
106
  label: o("components.formEditor.groups.form"),
107
107
  icon: "i-tabler:forms"
@@ -113,30 +113,60 @@ const Ir = /* @__PURE__ */ f({
113
113
  name: "async",
114
114
  label: o("components.formEditor.groups.async"),
115
115
  icon: "i-tabler:loader"
116
- }]), s = u(() => [j(o), T(o), A(o), M(o), C(o), V(o), D(o), S(o), N(o), U(o), P(o), k(o), h(o), I(o), _(o), y(o), L(o), O(o), R(o), b(o), W(o), B(o), w(o)]);
117
- return () => t(l, E(m, {
118
- groups: c.value,
119
- components: s.value,
116
+ }]), u = c(() => {
117
+ const r = [w(o), T(o), C(o), R(o), A(o), V(o), S(o), v(o), N(o), M(o), h(o), k(o), I(o), P(o), U(o), F(o), L(o), O(o), _(o), g(o), W(o), B(o), j(o)], i = {
118
+ "dux-input": o("components.formEditor.toolbarDescriptions.input"),
119
+ "dux-input-number": o("components.formEditor.toolbarDescriptions.inputNumber"),
120
+ "dux-editor": o("components.formEditor.toolbarDescriptions.aiEditor"),
121
+ sider: o("components.formEditor.toolbarDescriptions.slider"),
122
+ "dux-date": o("components.formEditor.toolbarDescriptions.date"),
123
+ "dux-time": o("components.formEditor.toolbarDescriptions.time"),
124
+ "dux-color": o("components.formEditor.toolbarDescriptions.color"),
125
+ "dux-checkbox": o("components.formEditor.toolbarDescriptions.checkbox"),
126
+ "dux-radio": o("components.formEditor.toolbarDescriptions.radio"),
127
+ "dux-switch": o("components.formEditor.toolbarDescriptions.switch"),
128
+ "dux-dynamic-input": o("components.formEditor.toolbarDescriptions.dynamicInput"),
129
+ "dynamic-tags": o("components.formEditor.toolbarDescriptions.dynamicTags"),
130
+ "dux-image-upload": o("components.formEditor.toolbarDescriptions.imageUpload"),
131
+ "dux-file-upload": o("components.formEditor.toolbarDescriptions.fileUpload"),
132
+ "dux-select": o("components.formEditor.toolbarDescriptions.select"),
133
+ "dux-cascader": o("components.formEditor.toolbarDescriptions.cascader"),
134
+ "tree-select": o("components.formEditor.toolbarDescriptions.treeSelect"),
135
+ region: o("components.formEditor.toolbarDescriptions.region"),
136
+ "select-async": o("components.formEditor.toolbarDescriptions.selectAsync"),
137
+ "dux-cascader-async": o("components.formEditor.toolbarDescriptions.cascaderAsync"),
138
+ "tree-select-async": o("components.formEditor.toolbarDescriptions.treeSelectAsync"),
139
+ "transfer-async": o("components.formEditor.toolbarDescriptions.transferAsync"),
140
+ "mention-async": o("components.formEditor.toolbarDescriptions.mentionAsync")
141
+ };
142
+ return r.map((t) => ({
143
+ ...t,
144
+ description: t.description || i[t.name] || ""
145
+ }));
146
+ });
147
+ return () => m(a, E(e, {
148
+ groups: l.value,
149
+ components: u.value,
120
150
  settingPage: {
121
- component: (r) => t(v, r, null),
151
+ component: (r) => m(D, r, null),
122
152
  default: {
123
153
  labelPlacement: "left"
124
154
  }
125
155
  },
126
156
  previewWrapper: (r, i) => {
127
- const e = u(() => i?.value?.value?.config);
128
- return t(g, {
129
- labelPlacement: e.value?.labelPlacement || "left",
157
+ const t = c(() => i?.value?.value?.config);
158
+ return m(y, {
159
+ labelPlacement: t.value?.labelPlacement || "left",
130
160
  class: "h-full"
131
- }, p(r) ? r : {
161
+ }, n(r) ? r : {
132
162
  default: () => [r]
133
163
  });
134
164
  },
135
165
  actionRender: (r) => {
136
- let i, e, n;
137
- return t("div", {
166
+ let i, t, p;
167
+ return m("div", {
138
168
  class: "flex flex-col gap-2"
139
- }, [t(a, {
169
+ }, [m(s, {
140
170
  type: "primary",
141
171
  secondary: !0,
142
172
  block: !0,
@@ -149,9 +179,9 @@ const Ir = /* @__PURE__ */ f({
149
179
  }
150
180
  });
151
181
  }
152
- }, p(i = o("components.formEditor.main.actions.jsonOutput")) ? i : {
182
+ }, n(i = o("components.formEditor.main.actions.jsonOutput")) ? i : {
153
183
  default: () => [i]
154
- }), t(a, {
184
+ }), m(s, {
155
185
  type: "info",
156
186
  secondary: !0,
157
187
  block: !0,
@@ -165,21 +195,21 @@ const Ir = /* @__PURE__ */ f({
165
195
  }
166
196
  });
167
197
  }
168
- }, p(e = o("common.preview")) ? e : {
169
- default: () => [e]
170
- }), t(a, {
198
+ }, n(t = o("common.preview")) ? t : {
199
+ default: () => [t]
200
+ }), m(s, {
171
201
  type: "primary",
172
202
  block: !0,
173
203
  onClick: () => {
174
- m.onSave?.(r?.value?.value || {});
204
+ e.onSave?.(r?.value?.value || {});
175
205
  }
176
- }, p(n = o("components.formEditor.main.actions.save")) ? n : {
177
- default: () => [n]
206
+ }, n(p = o("components.formEditor.main.actions.save")) ? p : {
207
+ default: () => [p]
178
208
  })]);
179
209
  }
180
210
  }), null);
181
211
  }
182
212
  });
183
213
  export {
184
- Ir as DuxFormEditor
214
+ Pr as DuxFormEditor
185
215
  };