@duxweb/dvha-pro 1.0.26 → 1.0.28

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,6 +1,6 @@
1
1
  import { defineComponent as f, toRef as b, createVNode as e } from "vue";
2
2
  import { useI18n as g, useTabStore as y, useInvalidate as S, useExtendForm as x } from "@duxweb/dvha-core";
3
- import { useMessage as h, NButton as p, NScrollbar as v } from "naive-ui";
3
+ import { useMessage as v, NButton as l, NScrollbar as h } from "naive-ui";
4
4
  import { useRouter as E } from "vue-router";
5
5
  import "@overlastic/vue";
6
6
  import { DuxCard as F } from "../card/card.js";
@@ -24,7 +24,7 @@ import "lodash-es";
24
24
  import "vue-draggable-plus";
25
25
  import "short-unique-id";
26
26
  import "aieditor";
27
- import { DuxFormLayout as C } from "./formLayout.js";
27
+ import { DuxFormLayout as P } from "./formLayout.js";
28
28
  import "vee-validate";
29
29
  import "@duxweb/dvha-naiveui";
30
30
  import "@iconify-json/tabler/icons.json";
@@ -44,9 +44,9 @@ import "unocss/preset-wind4";
44
44
  import "@vee-validate/i18n/dist/locale/en.json";
45
45
  import "@vee-validate/i18n/dist/locale/zh_CN.json";
46
46
  import "vue-command-palette";
47
- import { DuxPage as D } from "../../pages/page.js";
47
+ import { DuxPage as C } from "../../pages/page.js";
48
48
  import "../../pages/page404.js";
49
- const ht = /* @__PURE__ */ f({
49
+ const vt = /* @__PURE__ */ f({
50
50
  name: "DuxPageForm",
51
51
  props: {
52
52
  id: {
@@ -61,6 +61,10 @@ const ht = /* @__PURE__ */ f({
61
61
  description: {
62
62
  type: String
63
63
  },
64
+ labelPlacement: {
65
+ type: String,
66
+ default: "left"
67
+ },
64
68
  path: {
65
69
  type: String
66
70
  },
@@ -82,59 +86,62 @@ const ht = /* @__PURE__ */ f({
82
86
  }
83
87
  },
84
88
  setup(t, {
85
- slots: n
89
+ slots: m
86
90
  }) {
87
91
  const {
88
- t: o
89
- } = g(), s = b(t, "data", {}), a = h(), c = E(), m = y(), {
90
- invalidate: l
91
- } = S(), r = x({
92
+ t: i
93
+ } = g(), p = b(t, "data", {}), a = v(), s = E(), n = y(), {
94
+ invalidate: c
95
+ } = S(), o = x({
92
96
  id: t.id,
93
97
  path: t.path,
94
- form: s,
98
+ form: p,
95
99
  action: t.action,
96
- onError: (i) => {
97
- a.error(i.message || o("components.form.error")), t.onError?.(i);
100
+ onError: (r) => {
101
+ a.error(r.message || i("components.form.error")), t.onError?.(r);
98
102
  },
99
- onSuccess: (i) => {
100
- a.success(o("components.form.success")), t.onSuccess?.(i), !r.isEdit.value && m.current && m.delTab(m.current, (d) => c.push(d.path || "")), t.invalidate && l(t.invalidate);
103
+ onSuccess: (r) => {
104
+ a.success(i("components.form.success")), t.onSuccess?.(r), !o.isEdit.value && n.current && n.delTab(n.current, (d) => s.push(d.path || "")), t.invalidate && c(t.invalidate);
101
105
  }
102
- }), u = m.tabs.find((i) => i.path === m.current);
103
- return () => e(D, {
106
+ }), u = n.tabs.find((r) => r.path === n.current);
107
+ return () => e(C, {
104
108
  card: !1,
105
109
  scrollbar: !1
106
110
  }, {
107
111
  default: () => [e(F, {
108
- title: t?.title || u?.label || (r.isEdit.value ? o("components.form.edit") : o("components.form.create")),
112
+ title: t?.title || u?.label || (o.isEdit.value ? i("components.form.edit") : i("components.form.create")),
109
113
  description: t?.description,
110
114
  class: "h-full flex flex-col",
111
115
  contentClass: "flex-1 min-h-0",
112
116
  contentSize: "none",
113
117
  "header-bordered": !0
114
118
  }, {
115
- default: () => e(v, null, {
116
- default: () => [e(C, {
117
- "label-placement": "page"
119
+ default: () => e(h, null, {
120
+ default: () => [e(P, {
121
+ labelPlacement: t.labelPlacement,
122
+ class: "p-4"
118
123
  }, {
119
- default: () => [n?.default?.(r)]
124
+ default: () => [m?.default?.(o)]
120
125
  })]
121
126
  }),
122
127
  headerExtra: () => e("div", {
123
128
  class: "flex gap-6 items-center"
124
- }, [n?.actions?.(r), e("div", {
129
+ }, [m?.actions?.(o), e("div", {
125
130
  class: "flex gap-2"
126
- }, [e(p, {
127
- onClick: () => r.onReset()
131
+ }, [e(l, {
132
+ onClick: () => o.onReset(),
133
+ loading: o.isLoading.value
128
134
  }, {
129
- default: () => o("components.button.reset"),
135
+ default: () => i("components.button.reset"),
130
136
  icon: () => e("i", {
131
137
  class: "i-tabler:refresh"
132
138
  }, null)
133
- }), e(p, {
139
+ }), e(l, {
134
140
  type: "primary",
135
- onClick: () => r.onSubmit()
141
+ onClick: () => o.onSubmit(),
142
+ loading: o.isLoading.value
136
143
  }, {
137
- default: () => o("components.button.submit"),
144
+ default: () => i("components.button.submit"),
138
145
  icon: () => e("i", {
139
146
  class: "i-tabler:device-floppy"
140
147
  }, null)
@@ -144,5 +151,5 @@ const ht = /* @__PURE__ */ f({
144
151
  }
145
152
  });
146
153
  export {
147
- ht as DuxPageForm
154
+ vt as DuxPageForm
148
155
  };
@@ -34,32 +34,32 @@ import "vee-validate";
34
34
  import "vue-command-palette";
35
35
  import "@duxweb/dvha-naiveui";
36
36
  import "../../pages/page404.js";
37
- import { DuxDesignEditor as d } from "../designEditor/editor.js";
37
+ import { DuxDesignEditor as c } from "../designEditor/editor.js";
38
38
  import "short-unique-id";
39
39
  import "aieditor";
40
40
  import { DuxFormLayout as g } from "../form/formLayout.js";
41
+ import { DuxFormEditorSettingPage as v } from "./base/setting.js";
41
42
  import { duxFormEditorCascader as y } from "./components/cascader.js";
42
43
  import { duxFormEditorCascaderAsync as b } from "./components/cascaderAsync.js";
43
- import { duxFormEditorCheckbox as v } from "./components/checkbox.js";
44
- import { duxFormEditorColor as S } from "./components/color.js";
45
- import { duxFormEditorDate as D } from "./components/date.js";
46
- import { duxFormEditorDynamicInput as C } from "./components/dynamicInput.js";
47
- import { duxFormEditorDynamicTags as P } from "./components/dynamicTags.js";
48
- import { duxFormEditorAIEditor as k } from "./components/editor.js";
49
- import { duxFormEditorInput as A } from "./components/input.js";
50
- import { duxFormEditorInputNumber as h } from "./components/inputNumber.js";
51
- import { duxFormEditorMentionAsync as j } from "./components/mentionAsync.js";
52
- import { duxFormEditorRadio as I } from "./components/radio.js";
53
- import { duxFormEditorRegion as T } from "./components/region.js";
54
- import { duxFormEditorSider as w } from "./components/sider.js";
55
- import { duxFormEditorSwitch as N } from "./components/switch.js";
56
- import { duxFormEditorTime as O } from "./components/time.js";
57
- import { duxFormEditorTransferAsync as _ } from "./components/transferAsync.js";
58
- import { duxFormEditorTreeSelect as R } from "./components/treeSelect.js";
59
- import { duxFormEditorTreeSelectAsync as M } from "./components/treeSelectAsync.js";
60
- import { duxFormEditorSelect as V } from "./components/select.js";
61
- import { duxFormEditorSelectAsync as B } from "./components/selectAsync.js";
62
- import { DuxFormEditorSettingPage as L } from "./base/setting.js";
44
+ import { duxFormEditorCheckbox as S } from "./components/checkbox.js";
45
+ import { duxFormEditorColor as D } from "./components/color.js";
46
+ import { duxFormEditorDate as C } from "./components/date.js";
47
+ import { duxFormEditorDynamicInput as P } from "./components/dynamicInput.js";
48
+ import { duxFormEditorDynamicTags as k } from "./components/dynamicTags.js";
49
+ import { duxFormEditorAIEditor as A } from "./components/editor.js";
50
+ import { duxFormEditorInput as h } from "./components/input.js";
51
+ import { duxFormEditorInputNumber as j } from "./components/inputNumber.js";
52
+ import { duxFormEditorMentionAsync as I } from "./components/mentionAsync.js";
53
+ import { duxFormEditorRadio as T } from "./components/radio.js";
54
+ import { duxFormEditorRegion as w } from "./components/region.js";
55
+ import { duxFormEditorSider as N } from "./components/sider.js";
56
+ import { duxFormEditorSwitch as O } from "./components/switch.js";
57
+ import { duxFormEditorTime as _ } from "./components/time.js";
58
+ import { duxFormEditorTransferAsync as R } from "./components/transferAsync.js";
59
+ import { duxFormEditorTreeSelect as M } from "./components/treeSelect.js";
60
+ import { duxFormEditorTreeSelectAsync as V } from "./components/treeSelectAsync.js";
61
+ import { duxFormEditorSelect as B } from "./components/select.js";
62
+ import { duxFormEditorSelectAsync as L } from "./components/selectAsync.js";
63
63
  import "@iconify-json/tabler/icons.json";
64
64
  import "../posterEditor/elements/index.js";
65
65
  import "fabric";
@@ -76,9 +76,11 @@ const er = /* @__PURE__ */ f({
76
76
  props: {
77
77
  onSave: Function
78
78
  },
79
- extends: d,
79
+ extends: c,
80
80
  setup(m) {
81
- const c = W(), l = u(() => [{
81
+ const {
82
+ t: o
83
+ } = F(), l = W(), d = u(() => [{
82
84
  name: "form",
83
85
  label: o("components.formEditor.groups.form"),
84
86
  icon: "i-tabler:forms"
@@ -90,14 +92,12 @@ const er = /* @__PURE__ */ f({
90
92
  name: "async",
91
93
  label: o("components.formEditor.groups.async"),
92
94
  icon: "i-tabler:loader"
93
- }]), {
94
- t: o
95
- } = F(), s = u(() => [A(o), h(o), k(o), w(o), D(o), O(o), S(o), v(o), I(o), N(o), C(o), P(o), V(o), y(o), R(o), T(o), B(o), b(o), M(o), _(o), j(o)]);
96
- return () => t(d, E(m, {
97
- groups: l.value,
95
+ }]), s = u(() => [h(o), j(o), A(o), N(o), C(o), _(o), D(o), S(o), T(o), O(o), P(o), k(o), B(o), y(o), M(o), w(o), L(o), b(o), V(o), R(o), I(o)]);
96
+ return () => t(c, E(m, {
97
+ groups: d.value,
98
98
  components: s.value,
99
99
  settingPage: {
100
- component: (r) => t(L, r, null),
100
+ component: (r) => t(v, r, null),
101
101
  default: {
102
102
  labelPlacement: "left"
103
103
  }
@@ -120,7 +120,7 @@ const er = /* @__PURE__ */ f({
120
120
  secondary: !0,
121
121
  block: !0,
122
122
  onClick: () => {
123
- c.show({
123
+ l.show({
124
124
  title: o("components.formEditor.main.actions.jsonOutput"),
125
125
  component: () => import("./json.js"),
126
126
  componentProps: {
@@ -135,7 +135,7 @@ const er = /* @__PURE__ */ f({
135
135
  secondary: !0,
136
136
  block: !0,
137
137
  onClick: () => {
138
- c.show({
138
+ l.show({
139
139
  title: o("common.preview"),
140
140
  component: () => import("./preview.js"),
141
141
  componentProps: {
@@ -149,7 +149,9 @@ const er = /* @__PURE__ */ f({
149
149
  }), t(a, {
150
150
  type: "primary",
151
151
  block: !0,
152
- onClick: () => m.onSave?.(r)
152
+ onClick: () => {
153
+ m.onSave?.(r?.value?.value || {});
154
+ }
153
155
  }, p(n = o("components.formEditor.main.actions.save")) ? n : {
154
156
  default: () => [n]
155
157
  })]);
@@ -1,4 +1,4 @@
1
- import { defineComponent as J, toRef as x, computed as m, reactive as v, createVNode as e, h as k, mergeProps as K, isVNode as G } from "vue";
1
+ import { defineComponent as J, toRef as x, computed as s, reactive as v, createVNode as e, h as k, mergeProps as K, isVNode as G } from "vue";
2
2
  import { useI18n as H, useJsonSchema as C } from "@duxweb/dvha-core";
3
3
  import { useWindowSize as Q } from "@vueuse/core";
4
4
  import { NTabs as X, NTab as Y, NButton as r, NPopselect as Z, NTooltip as f, NProgress as $, NPagination as ee, NModal as te, NDrawer as N } from "naive-ui";
@@ -129,38 +129,38 @@ const ut = /* @__PURE__ */ J({
129
129
  onExport: V,
130
130
  onExportRows: W,
131
131
  onImport: I
132
- } = b, B = m(() => w.value.filter((o) => "title" in o && "key" in o).map((o) => ({
132
+ } = b, B = s(() => w.value.filter((o) => "title" in o && "key" in o).map((o) => ({
133
133
  label: o.title,
134
134
  value: o.key
135
135
  }))), {
136
136
  width: n
137
- } = Q(), M = m(() => w.value.reduce((a, d) => a + (Number(d?.width) || Number(d?.minWidth) || 110), 0)), s = v({
138
- show: !1
139
- }), u = v({
137
+ } = Q(), M = s(() => w.value.reduce((a, m) => a + (Number(m?.width) || Number(m?.minWidth) || 110), 0)), u = v({
140
138
  show: !1
141
139
  }), c = v({
142
140
  show: !1
143
- }), h = m(() => (t.filterSchema || []).map((o) => {
141
+ }), d = v({
142
+ show: !1
143
+ }), h = s(() => (t.filterSchema || []).map((o) => {
144
144
  const {
145
145
  label: a,
146
- ...d
146
+ ...m
147
147
  } = o;
148
148
  return {
149
149
  tag: ie,
150
150
  attrs: {
151
151
  label: a
152
152
  },
153
- children: d
153
+ children: m
154
154
  };
155
155
  })), {
156
156
  render: _
157
157
  } = C({
158
- data: h.value?.slice(t.filterNumber)
158
+ data: s(() => h.value?.slice(t.filterNumber))
159
159
  }), {
160
160
  render: q
161
161
  } = C({
162
- data: h.value?.slice(0, t.filterNumber)
163
- }), g = m(() => ({
162
+ data: s(() => h.value?.slice(0, t.filterNumber))
163
+ }), g = s(() => ({
164
164
  import: !1,
165
165
  export: !0,
166
166
  refresh: !0,
@@ -200,7 +200,7 @@ const ut = /* @__PURE__ */ J({
200
200
  class: "flex-none",
201
201
  secondary: !0,
202
202
  onClick: () => {
203
- u.show = !u.show;
203
+ c.show = !c.show;
204
204
  }
205
205
  }, {
206
206
  icon: () => e("div", {
@@ -212,7 +212,7 @@ const ut = /* @__PURE__ */ J({
212
212
  class: "flex-none",
213
213
  secondary: !0,
214
214
  onClick: () => {
215
- c.show = !c.show;
215
+ d.show = !d.show;
216
216
  }
217
217
  }, {
218
218
  icon: () => e("div", {
@@ -225,7 +225,7 @@ const ut = /* @__PURE__ */ J({
225
225
  }, [h.value.length > t.filterNumber && e(r, {
226
226
  iconPlacement: "right",
227
227
  onClick: () => {
228
- s.show = !s.show;
228
+ u.show = !u.show;
229
229
  }
230
230
  }, {
231
231
  default: () => i("components.button.filter"),
@@ -300,7 +300,7 @@ const ut = /* @__PURE__ */ J({
300
300
  }, [l.actions?.(), t.actions?.length > 0 && T({
301
301
  type: n.value < 1024 ? "dropdown" : "button",
302
302
  items: t.actions
303
- })])])]), e("div", {
303
+ })])])]), l?.header?.(), e("div", {
304
304
  class: "flex-1 min-h-0"
305
305
  }, [l?.default?.({
306
306
  ...b,
@@ -333,8 +333,8 @@ const ut = /* @__PURE__ */ J({
333
333
  }, null), e(te, {
334
334
  draggable: !0,
335
335
  class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur min-w-110",
336
- show: s.show,
337
- onUpdateShow: (o) => s.show = o
336
+ show: u.show,
337
+ onUpdateShow: (o) => u.show = o
338
338
  }, {
339
339
  default: ({
340
340
  draggableClass: o
@@ -343,7 +343,7 @@ const ut = /* @__PURE__ */ J({
343
343
  return e(le, {
344
344
  title: i("components.button.filter"),
345
345
  handle: o,
346
- onClose: () => s.show = !1
346
+ onClose: () => u.show = !1
347
347
  }, {
348
348
  default: () => [e(ae, {
349
349
  showLabel: !0,
@@ -354,27 +354,27 @@ const ut = /* @__PURE__ */ J({
354
354
  });
355
355
  }
356
356
  }), e(N, {
357
- show: u.show,
358
- onUpdateShow: (o) => u.show = o,
357
+ show: c.show,
358
+ onUpdateShow: (o) => c.show = o,
359
359
  autoFocus: !1,
360
360
  placement: "left"
361
361
  }, {
362
362
  default: () => [e(R, {
363
363
  title: t.sideLeftTitle || i("components.button.sideLeft"),
364
- onClose: () => u.show = !1,
364
+ onClose: () => c.show = !1,
365
365
  scrollbar: !1
366
366
  }, {
367
367
  default: () => [l?.sideLeft?.()]
368
368
  })]
369
369
  }), e(N, {
370
- show: c.show,
371
- onUpdateShow: (o) => c.show = o,
370
+ show: d.show,
371
+ onUpdateShow: (o) => d.show = o,
372
372
  autoFocus: !1,
373
373
  placement: "right"
374
374
  }, {
375
375
  default: () => [e(R, {
376
376
  title: t.sideRightTitle || i("components.button.sideRight"),
377
- onClose: () => c.show = !1,
377
+ onClose: () => d.show = !1,
378
378
  scrollbar: !1
379
379
  }, {
380
380
  default: () => [l?.sideRight?.()]
@@ -1,10 +1,10 @@
1
- import { defineComponent as d, computed as m, createVNode as r, mergeProps as n } from "vue";
1
+ import { defineComponent as l, computed as m, createVNode as r, mergeProps as n } from "vue";
2
2
  import { NDataTable as p } from "naive-ui";
3
3
  import { DuxTableLayout as i } from "../layout/table.js";
4
4
  import "@duxweb/dvha-core";
5
5
  import "clsx";
6
- import { DuxListEmpty as s } from "../status/listEmpty.js";
7
- const P = /* @__PURE__ */ d({
6
+ import { DuxListEmpty as b } from "../status/listEmpty.js";
7
+ const g = /* @__PURE__ */ l({
8
8
  name: "DuxTablePage",
9
9
  props: {
10
10
  tableProps: {
@@ -16,14 +16,14 @@ const P = /* @__PURE__ */ d({
16
16
  setup(a, {
17
17
  slots: t
18
18
  }) {
19
- const l = m(() => {
19
+ const d = m(() => {
20
20
  const {
21
21
  tableProps: o,
22
22
  ...e
23
23
  } = a;
24
24
  return e;
25
25
  });
26
- return () => r(i, l.value, {
26
+ return () => r(i, d.value, {
27
27
  default: (o) => r(p, n(o.table.value, a.tableProps, {
28
28
  class: "h-full",
29
29
  minHeight: 200,
@@ -34,7 +34,7 @@ const P = /* @__PURE__ */ d({
34
34
  scrollX: o.width,
35
35
  renderCell: (e) => e == null || e === "" ? "-" : e
36
36
  }), {
37
- empty: () => r(s, {
37
+ empty: () => r(b, {
38
38
  bordered: !1
39
39
  }, null)
40
40
  }),
@@ -42,10 +42,11 @@ const P = /* @__PURE__ */ d({
42
42
  tools: t?.tools,
43
43
  actions: t?.actions,
44
44
  sideLeft: t?.sideLeft,
45
- sideRight: t?.sideRight
45
+ sideRight: t?.sideRight,
46
+ header: t?.header
46
47
  });
47
48
  }
48
49
  });
49
50
  export {
50
- P as DuxTablePage
51
+ g as DuxTablePage
51
52
  };
@@ -3,48 +3,48 @@ import { useMessage as D, NButton as b, NDropdown as C } from "naive-ui";
3
3
  import { h as l } from "vue";
4
4
  import { useRouter as I } from "vue-router";
5
5
  import { useDialog as N } from "./dialog.js";
6
- import { useDrawer as $ } from "./drawer.js";
7
- import { useModal as B } from "./modal.js";
6
+ import { useDrawer as W } from "./drawer.js";
7
+ import { useModal as $ } from "./modal.js";
8
8
  function K(o) {
9
- const u = B(), i = $(), m = N(), {
9
+ const u = $(), i = W(), m = N(), {
10
10
  t: n
11
- } = h(), c = D(), g = A(), w = I(), P = M({
11
+ } = h(), d = D(), g = A(), w = I(), P = M({
12
12
  onSuccess: (t) => {
13
- c.success(t.message || n("common.success"));
13
+ d.success(t.message || n("common.success"));
14
14
  },
15
15
  onError: (t) => {
16
- c.error(t.message || n("common.error"));
16
+ d.error(t.message || n("common.error"));
17
17
  }
18
18
  }), k = S({
19
19
  onSuccess: (t) => {
20
- c.success(t.message || n("common.success"));
20
+ d.success(t.message || n("common.success"));
21
21
  },
22
22
  onError: (t) => {
23
- c.error(t.message || n("common.error"));
23
+ d.error(t.message || n("common.error"));
24
24
  }
25
25
  }), r = o?.path || g.getPath(), f = (t) => {
26
- const a = n(t.item.title || "", {}, t.item.title), s = n(t.item.label || "", {}, t.item.label);
26
+ const c = n(t.item.title || "", {}, t.item.title), s = n(t.item.label || "", {}, t.item.label);
27
27
  if (t.item.type === "modal") {
28
- const e = t.item, d = typeof e.componentProps == "function" ? e.componentProps(t.data) : e.componentProps;
28
+ const e = t.item, a = typeof e.componentProps == "function" ? e.componentProps(t.data) : e.componentProps;
29
29
  u.show({
30
- title: a || s,
30
+ title: c || s,
31
31
  component: e.component,
32
32
  componentProps: {
33
33
  id: t.id,
34
- ...d
34
+ ...a
35
35
  },
36
36
  width: e.width,
37
37
  draggable: e.draggable !== void 0 ? e.draggable : !0
38
38
  });
39
39
  }
40
40
  if (t.item.type === "drawer") {
41
- const e = t.item, d = typeof e.componentProps == "function" ? e.componentProps(t.data) : e.componentProps;
41
+ const e = t.item, a = typeof e.componentProps == "function" ? e.componentProps(t.data) : e.componentProps;
42
42
  i.show({
43
- title: a || s,
43
+ title: c || s,
44
44
  component: e.component,
45
45
  componentProps: {
46
46
  id: t.id,
47
- ...d
47
+ ...a
48
48
  },
49
49
  width: e.width,
50
50
  maxWidth: e.maxWidth
@@ -53,30 +53,30 @@ function K(o) {
53
53
  if (t.item.type === "confirm") {
54
54
  const e = t.item;
55
55
  m.confirm({
56
- title: a || s,
56
+ title: c || s,
57
57
  content: e.content
58
- }).then((d) => {
59
- d && e.callback?.(t.id, t.data);
58
+ }).then((a) => {
59
+ a && e.callback?.(t.id, t.data);
60
60
  });
61
61
  }
62
62
  if (t.item.type === "request") {
63
63
  const e = t.item;
64
64
  m.confirm({
65
- title: a || s,
65
+ title: c || s,
66
66
  content: e.content
67
67
  }).then(() => {
68
- const d = typeof e.data == "function" ? e.data(t.id, t.data) : e.data, j = (e.method || "post").toLowerCase(), v = typeof e.path == "function" ? e.path(t.id, t.data) : e.path || r;
68
+ const a = typeof e.data == "function" ? e.data(t.id, t.data) : e.data, j = (e.method || "post").toLowerCase(), v = typeof e.path == "function" ? e.path(t.id, t.data) : e.path || r;
69
69
  P.mutate({
70
70
  path: v,
71
71
  method: j,
72
- payload: d
72
+ payload: a
73
73
  });
74
74
  });
75
75
  }
76
76
  if (t.item.type === "delete") {
77
77
  const e = t.item;
78
78
  m.confirm({
79
- title: a || s,
79
+ title: c || s,
80
80
  content: e.content
81
81
  }).then(() => {
82
82
  k.mutate({
@@ -86,17 +86,18 @@ function K(o) {
86
86
  });
87
87
  }
88
88
  if (t.item.type === "link") {
89
- const e = t.item, d = typeof e.path == "function" ? e.path?.(t.id, t.data) : g.getRoutePath(t.id ? `${e.path || r}${t.data === void 0 ? "" : `/${t.id}`}` : e.path || r);
90
- w.push(d);
89
+ const e = t.item;
90
+ let a = typeof e.path == "function" ? e.path?.(t.id, t.data) : t.id ? `${e.path || r}${t.data === void 0 ? "" : `/${t.id}`}` : e.path || r;
91
+ a.startsWith("/") || (a = g.getRoutePath(a)), w.push(a);
91
92
  }
92
93
  t.item.type === "callback" && t.item.callback?.(t.id, t.data);
93
- }, y = E(), x = T();
94
+ }, y = B(), x = E();
94
95
  return {
95
96
  target: f,
96
- renderTable: (t) => (a, s) => {
97
+ renderTable: (t) => (c, s) => {
97
98
  const e = {
98
- id: a[t.key || o?.key || "id"],
99
- data: a,
99
+ id: c[t.key || o?.key || "id"],
100
+ data: c,
100
101
  index: s,
101
102
  target: f,
102
103
  text: t.text !== void 0 ? t.text : o?.text || !1,
@@ -111,29 +112,29 @@ function K(o) {
111
112
  });
112
113
  },
113
114
  renderAction: (t) => {
114
- const a = {
115
+ const c = {
115
116
  target: f,
116
117
  text: t.text !== void 0 ? t.text : o?.text || !1,
117
118
  align: t.align !== void 0 ? t.align : o?.align || "left"
118
119
  };
119
120
  return (t.type || o?.type) === "button" ? y.render({
120
- ...a,
121
+ ...c,
121
122
  action: t || o
122
123
  }) : x.render({
123
- ...a,
124
+ ...c,
124
125
  action: t || o
125
126
  });
126
127
  }
127
128
  };
128
129
  }
129
- function E() {
130
+ function B() {
130
131
  const {
131
132
  t: o
132
133
  } = h();
133
134
  return {
134
135
  render: (i) => {
135
- const m = i.action.items?.filter((n) => !n.show || n.show?.(i.data, i.index)).map((n, c) => l(b, {
136
- key: c,
136
+ const m = i.action.items?.filter((n) => !n.show || n.show?.(i.data, i.index)).map((n, d) => l(b, {
137
+ key: d,
137
138
  type: n.color || (n.type === "delete" ? "error" : "primary"),
138
139
  text: i.text,
139
140
  secondary: !i.text,
@@ -154,15 +155,15 @@ function E() {
154
155
  }
155
156
  };
156
157
  }
157
- function T() {
158
+ function E() {
158
159
  const {
159
160
  t: o
160
161
  } = h();
161
162
  return {
162
163
  render: (i) => {
163
- const m = i.action.items?.filter((n) => !n.show || n.show?.(i.data, i.index)).map((n, c) => ({
164
+ const m = i.action.items?.filter((n) => !n.show || n.show?.(i.data, i.index)).map((n, d) => ({
164
165
  label: o(n.label || "", {}, n.label),
165
- key: c,
166
+ key: d,
166
167
  icon: n.icon ? () => l("div", {
167
168
  class: ["n-icon", n.icon]
168
169
  }) : void 0,
@@ -177,8 +178,8 @@ function T() {
177
178
  return l(C, {
178
179
  trigger: "click",
179
180
  options: m,
180
- onSelect: (n, c) => {
181
- c?.onSelect?.();
181
+ onSelect: (n, d) => {
182
+ d?.onSelect?.();
182
183
  }
183
184
  }, () => [l("div", {
184
185
  class: ["flex items-center", i.align === "right" ? "justify-end" : i.align === "center" ? "justify-center" : "justify-start"]
@@ -195,6 +196,6 @@ function T() {
195
196
  }
196
197
  export {
197
198
  K as useAction,
198
- E as useActionButton,
199
- T as useActionDropdown
199
+ B as useActionButton,
200
+ E as useActionDropdown
200
201
  };
@@ -1,5 +1,5 @@
1
1
  const r = `/* layer: properties */
2
- @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-bg-opacity:100%;--un-text-opacity:100%;--un-shadow-opacity:100%;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-border-opacity:100%;--un-ease:initial;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-to-opacity:100%;--un-fill-opacity:100%;--un-outline-style:solid;}}
2
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-ease:initial;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-border-opacity:100%;--un-to-opacity:100%;--un-fill-opacity:100%;--un-outline-style:solid;}}
3
3
  @property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
4
4
  @property --un-outline-style{syntax:"*";inherits:false;initial-value:solid;}
5
5
  @property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
@@ -1048,6 +1048,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
1048
1048
  .m-302\\.2{margin:calc(var(--spacing) * 302.2);}
1049
1049
  .m14{margin:calc(var(--spacing) * 14);}
1050
1050
  .m146\\.8{margin:calc(var(--spacing) * 146.8);}
1051
+ .m18{margin:calc(var(--spacing) * 18);}
1051
1052
  .m29\\.3{margin:calc(var(--spacing) * 29.3);}
1052
1053
  .m3{margin:calc(var(--spacing) * 3);}
1053
1054
  .m5{margin:calc(var(--spacing) * 5);}