vlite3 1.4.30 → 1.4.32

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 (79) hide show
  1. package/components/Accordion/Accordion.vue.js +19 -16
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/Accordion/AccordionItem.vue.js +38 -36
  4. package/components/CategoryManager/CategoryManager.vue2.js +3 -2
  5. package/components/Chart/GanttChart.vue.d.ts +13 -1
  6. package/components/Chart/GanttChart.vue.js +2 -2
  7. package/components/Chart/GanttChart.vue2.js +1185 -607
  8. package/components/Chart/GanttChartDateUtils.d.ts +38 -0
  9. package/components/Chart/GanttChartDateUtils.js +79 -0
  10. package/components/Chart/GanttChartDependencyUtils.d.ts +92 -0
  11. package/components/Chart/GanttChartDependencyUtils.js +113 -0
  12. package/components/Chart/GanttChartResizePreviewUtils.d.ts +52 -0
  13. package/components/Chart/GanttChartResizePreviewUtils.js +53 -0
  14. package/components/Chart/GanttChartTooltipUtils.d.ts +41 -0
  15. package/components/Chart/GanttChartTooltipUtils.js +63 -0
  16. package/components/Chart/index.d.ts +3 -1
  17. package/components/Chart/types.d.ts +76 -1
  18. package/components/Chart/types.js +8 -0
  19. package/components/FilePicker/FilePickerDropzone.vue.js +1 -1
  20. package/components/FilePicker/index.vue.js +2 -4
  21. package/components/Form/AccordionView.vue2.js +5 -2
  22. package/components/Form/AccordionView.vue3.js +250 -0
  23. package/components/Form/Form.vue.d.ts +0 -2
  24. package/components/Form/Form.vue.js +1 -1
  25. package/components/Form/Form.vue2.js +415 -354
  26. package/components/Form/FormField.vue.js +175 -196
  27. package/components/Form/FormFields.vue.js +1 -1
  28. package/components/Form/FormFields.vue2.js +60 -60
  29. package/components/Form/FormSkeleton.vue.js +50 -35
  30. package/components/Form/TableView.vue.js +59 -43
  31. package/components/Form/composables/useForm.js +159 -148
  32. package/components/Form/index.vue2.js +8 -8
  33. package/components/Form/utils/form.utils.d.ts +2 -0
  34. package/components/Form/utils/form.utils.js +17 -13
  35. package/components/GoogleMap.vue.d.ts +1 -1
  36. package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +189 -0
  37. package/components/PanZoomViewport/PanZoomViewport.vue.js +7 -0
  38. package/components/PanZoomViewport/PanZoomViewport.vue2.js +536 -0
  39. package/components/PanZoomViewport/index.d.ts +2 -0
  40. package/components/PanZoomViewport/types.d.ts +121 -0
  41. package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +3 -0
  42. package/components/ScaleGenerator/ScaleGenerator.vue.js +5 -108
  43. package/components/ScaleGenerator/ScaleGenerator.vue2.js +143 -2
  44. package/components/ScaleGenerator/types.d.ts +2 -0
  45. package/components/Screen/ScreenFilter.vue.js +18 -17
  46. package/components/SeoProvider/SeoProvider.vue.d.ts +4 -1
  47. package/components/SeoProvider/SeoProvider.vue.js +39 -33
  48. package/components/SeoProvider/domAdapter.d.ts +1 -4
  49. package/components/SeoProvider/domAdapter.js +71 -58
  50. package/components/SeoProvider/index.d.ts +5 -2
  51. package/components/SeoProvider/normalizeSeo.d.ts +10 -49
  52. package/components/SeoProvider/normalizeSeo.js +246 -182
  53. package/components/SeoProvider/plainText.d.ts +8 -0
  54. package/components/SeoProvider/plainText.js +117 -0
  55. package/components/SeoProvider/seoUrl.d.ts +13 -0
  56. package/components/SeoProvider/seoUrl.js +25 -0
  57. package/components/SeoProvider/structuredData.d.ts +100 -0
  58. package/components/SeoProvider/structuredData.js +33 -0
  59. package/components/SeoProvider/types.d.ts +47 -109
  60. package/components/Tabes/Tabes.vue.d.ts +10 -1
  61. package/components/Tabes/Tabes.vue.js +1 -1
  62. package/components/Tabes/Tabes.vue2.js +271 -170
  63. package/components/Tabes/TabesMarkerGeometry.d.ts +34 -0
  64. package/components/Tabes/TabesMarkerGeometry.js +21 -0
  65. package/components/Tabes/tabes.utils.d.ts +14 -0
  66. package/components/Tabes/tabes.utils.js +26 -0
  67. package/components/Tabes/types.d.ts +32 -0
  68. package/components/ThemeProvider/ThemeProvider.vue.d.ts +2 -0
  69. package/components/ThemeProvider/ThemeProvider.vue.js +29 -23
  70. package/components/ThemeProvider/index.d.ts +1 -1
  71. package/components/ThemeProvider/themeVars.d.ts +9 -13
  72. package/components/ThemeProvider/themeVars.js +173 -125
  73. package/components/ThemeProvider/types.d.ts +10 -0
  74. package/components/index.d.ts +2 -1
  75. package/index.d.ts +1 -0
  76. package/index.js +415 -387
  77. package/package.json +3 -2
  78. package/style.css +1 -1
  79. package/components/Form/AccordionView.vue.js +0 -222
@@ -1,18 +1,18 @@
1
- import { defineComponent as J, computed as K, ref as Q, openBlock as o, createElementBlock as u, normalizeClass as d, Fragment as b, renderList as W, withMemo as X, unref as m, createBlock as p, withCtx as U, resolveDynamicComponent as D, createTextVNode as A, toDisplayString as x, createCommentVNode as c, createElementVNode as Y, createVNode as Z, renderSlot as _, markRaw as ee } from "vue";
2
- import { isComponent as v, getNestedValue as V, resolveFieldType as te } from "./utils/form.utils.js";
1
+ import { defineComponent as J, computed as K, shallowRef as Q, openBlock as o, createElementBlock as u, normalizeClass as v, Fragment as b, renderList as W, withMemo as X, unref as m, createBlock as p, withCtx as U, resolveDynamicComponent as D, createTextVNode as A, toDisplayString as x, createCommentVNode as i, createElementVNode as Y, createVNode as Z, renderSlot as _, markRaw as ee } from "vue";
2
+ import { isComponent as h, getNestedValue as V, fieldRendersOwnErrorMessage as te, resolveFieldType as ae } from "./utils/form.utils.js";
3
3
  import B from "../Label.vue.js";
4
- import ae from "./FormField.vue.js";
5
- import { resolveI18nText as ne } from "../../utils/i18n.js";
6
- const se = {
4
+ import ne from "./FormField.vue.js";
5
+ import { resolveI18nText as se } from "../../utils/i18n.js";
6
+ const re = {
7
7
  key: 0,
8
8
  class: "text-destructive ml-0.5"
9
- }, re = ["onFocusin", "onFocusout"], oe = ["for"], ue = {
9
+ }, oe = ["onFocusin", "onFocusout"], ue = ["for"], le = {
10
10
  key: 0,
11
11
  class: "text-destructive ml-0.5"
12
- }, le = {
12
+ }, ce = {
13
13
  key: 0,
14
14
  class: "text-destructive ml-0.5"
15
- }, he = /* @__PURE__ */ J({
15
+ }, ge = /* @__PURE__ */ J({
16
16
  __name: "FormFields",
17
17
  props: {
18
18
  schema: {},
@@ -32,10 +32,10 @@ const se = {
32
32
  layout: { default: "vertical" }
33
33
  },
34
34
  emits: ["change", "addonAction"],
35
- setup(n, { emit: q }) {
36
- const r = n, k = q, E = K(() => {
35
+ setup(n, { emit: E }) {
36
+ const r = n, k = E, q = K(() => {
37
37
  if (r.className) return r.className;
38
- }), s = (t) => te(t, {
38
+ }), s = (t) => ae(t, {
39
39
  values: r.values,
40
40
  globalValues: r.values,
41
41
  isUpdate: r.isUpdate
@@ -43,27 +43,27 @@ const se = {
43
43
  if (!r.excludeTypes || r.excludeTypes.length === 0) return !0;
44
44
  const a = s(t);
45
45
  return !a || !r.excludeTypes.includes(a);
46
- }, F = (t) => V(r.values, t.name), h = (t) => r.errors[t.name] || "", $ = (t) => r.isFieldVisible ? r.isFieldVisible(t) : !0, C = (t) => r.isFieldDisabled ? r.isFieldDisabled(t) : t.disabled === !0, N = (t) => r.isFieldReadonly ? r.isFieldReadonly(t) : t.readonly === !0, l = (t) => t.labelI18n ? ne(
46
+ }, F = (t) => V(r.values, t.name), g = (t) => r.errors[t.name] || "", $ = (t) => r.isFieldVisible ? r.isFieldVisible(t) : !0, R = (t) => r.isFieldDisabled ? r.isFieldDisabled(t) : t.disabled === !0, C = (t) => r.isFieldReadonly ? r.isFieldReadonly(t) : t.readonly === !0, l = (t) => t.labelI18n ? se(
47
47
  t.labelI18n,
48
48
  typeof t.label == "string" ? t.label : void 0
49
- ) ?? t.label : t.label, R = (t) => {
49
+ ) ?? t.label : t.label, L = (t) => {
50
50
  if (t)
51
- return v(t) ? ee(t) : t;
51
+ return h(t) ? ee(t) : t;
52
52
  }, S = (t, a) => {
53
53
  k("change", t.name, a);
54
- }, j = (t) => t.itemClass || "", P = (t, a) => {
54
+ }, j = (t) => t.itemClass || "", M = (t, a) => {
55
55
  k("change", t, a);
56
- }, H = (t) => {
57
- k("addonAction", t);
58
- }, g = (t) => t && typeof t == "object" && t.name ? t.name : null, y = Q({}), M = (t) => {
59
- y.value[t] = !0;
60
56
  }, O = (t) => {
61
- y.value[t] = !1;
62
- }, L = (t) => {
57
+ k("addonAction", t);
58
+ }, y = (t) => t && typeof t == "object" && t.name ? t.name : null, c = Q({}), P = (t) => {
59
+ c.value[t] || (c.value = { ...c.value, [t]: !0 });
60
+ }, H = (t) => {
61
+ c.value[t] && (c.value = { ...c.value, [t]: !1 });
62
+ }, N = (t) => {
63
63
  const a = F(t), e = s(t);
64
- let i = a != null && a !== "" && !(Array.isArray(a) && a.length === 0);
64
+ let d = a != null && a !== "" && !(Array.isArray(a) && a.length === 0);
65
65
  const z = typeof a == "number" && !isNaN(a);
66
- return e === "dateRangePicker" && a && typeof a == "object" && (i = !!(a.startDate || a.endDate || a.start || a.end)), T(t) || e === "number" ? y.value[t.name] || i || z : i || z;
66
+ return e === "dateRangePicker" && a && typeof a == "object" && (d = !!(a.startDate || a.endDate || a.start || a.end)), T(t) || e === "number" ? c.value[t.name] || d || z : d || z;
67
67
  }, T = (t) => {
68
68
  const a = s(t) || "text";
69
69
  return ["text", "email", "password", "tel", "url", "search", "textarea"].includes(a);
@@ -85,14 +85,14 @@ const se = {
85
85
  ].includes(a);
86
86
  }, f = (t) => {
87
87
  const a = l(t);
88
- if (!(!a || v(a)))
88
+ if (!(!a || h(a)))
89
89
  return a;
90
90
  };
91
91
  return (t, a) => (o(), u("div", {
92
- class: d([
92
+ class: v([
93
93
  n.layout === "inline" ? "flex flex-row flex-wrap items-end w-full " : "grid",
94
94
  n.variant === "floating" ? "gap-5 mt-1" : "gap-4",
95
- E.value
95
+ q.value
96
96
  ])
97
97
  }, [
98
98
  (o(!0), u(b, null, W(n.schema, (e) => (o(), u(b, {
@@ -101,10 +101,10 @@ const se = {
101
101
  $(e) && I(e) ? X([
102
102
  e,
103
103
  F(e),
104
- h(e),
104
+ g(e),
105
+ R(e),
105
106
  C(e),
106
- N(e),
107
- y.value[e.name],
107
+ c.value[e.name],
108
108
  n.variant,
109
109
  n.size,
110
110
  n.rounded,
@@ -112,12 +112,12 @@ const se = {
112
112
  n.showRequiredAsterisk,
113
113
  n.fieldLoading[e.name],
114
114
  s(e),
115
- m(v)(s(e)) || s(e) === "customFields" ? n.values : null,
116
- g(e.addonLeft) ? m(V)(n.values, g(e.addonLeft)) : null,
117
- g(e.addonRight) ? m(V)(n.values, g(e.addonRight)) : null
115
+ m(h)(s(e)) || s(e) === "customFields" ? n.values : null,
116
+ y(e.addonLeft) ? m(V)(n.values, y(e.addonLeft)) : null,
117
+ y(e.addonRight) ? m(V)(n.values, y(e.addonRight)) : null
118
118
  ], () => (o(), u("div", {
119
119
  key: 0,
120
- class: d([
120
+ class: v([
121
121
  "max-md:col-span-full! form-field-item relative",
122
122
  j(e),
123
123
  n.layout === "inline" ? " " : ""
@@ -130,35 +130,35 @@ const se = {
130
130
  class: "mb-2 block font-medium"
131
131
  }, {
132
132
  default: U(() => [
133
- m(v)(l(e)) ? (o(), p(D(R(l(e))), { key: 0 })) : (o(), u(b, { key: 1 }, [
133
+ m(h)(l(e)) ? (o(), p(D(L(l(e))), { key: 0 })) : (o(), u(b, { key: 1 }, [
134
134
  A(x(l(e)) + " ", 1),
135
- e.required && n.showRequiredAsterisk ? (o(), u("span", se, "*")) : c("", !0)
135
+ e.required && n.showRequiredAsterisk ? (o(), u("span", re, "*")) : i("", !0)
136
136
  ], 64))
137
137
  ]),
138
138
  _: 2
139
- }, 1032, ["for"])) : c("", !0),
139
+ }, 1032, ["for"])) : i("", !0),
140
140
  Y("div", {
141
- class: d(["relative", [
141
+ class: v(["relative", [
142
142
  s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? "w-auto" : "w-full",
143
143
  s(e) === "switch" || s(e) === "check" ? "mt-auto" : ""
144
144
  ]]),
145
- onFocusin: (i) => M(e.name),
146
- onFocusout: (i) => O(e.name)
145
+ onFocusin: (d) => P(e.name),
146
+ onFocusout: (d) => H(e.name)
147
147
  }, [
148
148
  w(e) && f(e) && !T(e) ? (o(), u("label", {
149
149
  key: 0,
150
150
  for: e.name,
151
- class: d([
151
+ class: v([
152
152
  "absolute transition-all duration-200 ease-in-out pointer-events-none z-20",
153
- L(e) ? "-top-2.5 left-3 text-xs bg-background px-1 text-black shadow-[0_4px_4px_-4px_bg-background]" : `top-1/2 -translate-y-1/2 text-sm text-muted-foreground/70 ${G(e)}`
153
+ N(e) ? "-top-2.5 left-3 text-xs bg-background px-1 text-black shadow-[0_4px_4px_-4px_bg-background]" : `top-1/2 -translate-y-1/2 text-sm text-muted-foreground/70 ${G(e)}`
154
154
  ])
155
155
  }, [
156
- m(v)(l(e)) ? (o(), p(D(R(l(e))), { key: 0 })) : (o(), u(b, { key: 1 }, [
156
+ m(h)(l(e)) ? (o(), p(D(L(l(e))), { key: 0 })) : (o(), u(b, { key: 1 }, [
157
157
  A(x(l(e)) + " ", 1),
158
- e.required ? (o(), u("span", ue, "*")) : c("", !0)
158
+ e.required ? (o(), u("span", le, "*")) : i("", !0)
159
159
  ], 64))
160
- ], 10, oe)) : c("", !0),
161
- Z(ae, {
160
+ ], 10, ue)) : i("", !0),
161
+ Z(ne, {
162
162
  field: r.variant === "floating" ? {
163
163
  ...e,
164
164
  placeholder: void 0,
@@ -166,23 +166,23 @@ const se = {
166
166
  props: { ...e.props || {}, id: e.name }
167
167
  } : { ...e, props: { ...e.props || {}, id: e.name } },
168
168
  value: F(e),
169
- floatingActive: L(e),
169
+ floatingActive: N(e),
170
170
  label: s(e) === "customFields" ? void 0 : w(e) ? f(e) : void 0,
171
171
  values: n.values,
172
172
  errors: n.errors,
173
173
  variant: n.variant,
174
174
  size: n.size,
175
175
  rounded: n.rounded,
176
- disabled: C(e),
177
- readonly: N(e),
178
- error: h(e),
176
+ disabled: R(e),
177
+ readonly: C(e),
178
+ error: g(e),
179
179
  isUpdate: n.isUpdate,
180
180
  loading: n.fieldLoading[e.name],
181
- onChange: (i) => S(e, i),
182
- onAddonChange: P,
183
- onAddonAction: H
181
+ onChange: (d) => S(e, d),
182
+ onAddonChange: M,
183
+ onAddonAction: O
184
184
  }, null, 8, ["field", "value", "floatingActive", "label", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading", "onChange"])
185
- ], 42, re),
185
+ ], 42, oe),
186
186
  s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? (o(), p(B, {
187
187
  key: 1,
188
188
  for: e.name,
@@ -190,22 +190,22 @@ const se = {
190
190
  }, {
191
191
  default: U(() => [
192
192
  A(x(l(e)) + " ", 1),
193
- e.required ? (o(), u("span", le, "*")) : c("", !0)
193
+ e.required ? (o(), u("span", ce, "*")) : i("", !0)
194
194
  ]),
195
195
  _: 2
196
- }, 1032, ["for"])) : c("", !0),
197
- h(e) ? (o(), u("p", {
196
+ }, 1032, ["for"])) : i("", !0),
197
+ g(e) && !m(te)(s(e)) ? (o(), u("p", {
198
198
  key: 2,
199
- class: d([
199
+ class: v([
200
200
  n.layout === "inline" ? "pt-2 capitalize bottom-0 left-0 mt-0 -text-fs-2.5 text-destructive whitespace-nowrap" : "mt-1 -text-fs-2.5 text-destructive"
201
201
  ])
202
- }, x(h(e)), 3)) : c("", !0)
203
- ], 2)), a, 0) : c("", !0)
202
+ }, x(g(e)), 3)) : i("", !0)
203
+ ], 2)), a, 0) : i("", !0)
204
204
  ], 64))), 128)),
205
205
  _(t.$slots, "default", {}, void 0, !0)
206
206
  ], 2));
207
207
  }
208
208
  });
209
209
  export {
210
- he as default
210
+ ge as default
211
211
  };
@@ -1,50 +1,65 @@
1
- import { defineComponent as c, computed as p, openBlock as s, createElementBlock as d, Fragment as r, renderList as t, createElementVNode as e } from "vue";
2
- const m = { class: "form-skeleton w-full animate-pulse" }, f = {
1
+ import { defineComponent as _, computed as x, openBlock as s, createElementBlock as t, Fragment as i, renderList as p, isMemoSame as f, createElementVNode as l } from "vue";
2
+ const B = { class: "form-skeleton w-full animate-pulse" }, C = {
3
3
  key: 0,
4
4
  class: "space-y-6"
5
- }, v = { class: "form-group-body p-4.5 space-y-6" }, y = {
5
+ }, E = { class: "form-group-body p-4.5 space-y-6" }, F = {
6
6
  key: 1,
7
7
  class: "space-y-6"
8
- }, w = /* @__PURE__ */ c({
8
+ }, N = /* @__PURE__ */ _({
9
9
  __name: "FormSkeleton",
10
10
  props: {
11
11
  rows: { default: 4 },
12
12
  isGrouped: { type: Boolean, default: !1 }
13
13
  },
14
- setup(u) {
15
- const n = u, a = p(() => n.rows);
16
- return (b, o) => (s(), d("div", m, [
17
- u.isGrouped ? (s(), d("div", f, [
18
- (s(), d(r, null, t(2, (l) => e("div", {
19
- key: l,
20
- class: "form-group border rounded overflow-hidden bg-body"
21
- }, [
22
- o[1] || (o[1] = e("div", { class: "form-group-header bg-muted/50 px-4 py-3 border-b flex flex-col gap-2" }, [
23
- e("div", { class: "h-5 bg-muted rounded w-1/3" }),
24
- e("div", { class: "h-3 bg-muted rounded w-1/2" })
25
- ], -1)),
26
- e("div", v, [
27
- (s(), d(r, null, t(2, (i) => e("div", {
28
- key: i,
29
- class: "space-y-2"
30
- }, [...o[0] || (o[0] = [
31
- e("div", { class: "h-4 bg-muted rounded w-1/4" }, null, -1),
32
- e("div", { class: "h-10 bg-muted rounded w-full" }, null, -1)
33
- ])])), 64))
34
- ])
35
- ])), 64))
36
- ])) : (s(), d("div", y, [
37
- (s(!0), d(r, null, t(a.value, (l) => (s(), d("div", {
38
- key: l,
39
- class: "space-y-2"
40
- }, [...o[2] || (o[2] = [
41
- e("div", { class: "h-4 bg-muted rounded w-1/4" }, null, -1),
42
- e("div", { class: "h-10 bg-muted rounded w-full" }, null, -1)
43
- ])]))), 128))
14
+ setup(v) {
15
+ const k = v, y = x(() => k.rows);
16
+ return (G, e) => (s(), t("div", B, [
17
+ v.isGrouped ? (s(), t("div", C, [
18
+ (s(), t(i, null, p(2, (n, g, w, o) => {
19
+ const r = [n];
20
+ if (o && o.key === n && f(o, r)) return o;
21
+ const d = (s(), t("div", {
22
+ key: n,
23
+ class: "form-group border rounded overflow-hidden bg-body"
24
+ }, [
25
+ e[8] || (e[8] = l("div", { class: "form-group-header bg-muted/50 px-4 py-3 border-b flex flex-col gap-2" }, [
26
+ l("div", { class: "h-5 bg-muted rounded w-1/3" }),
27
+ l("div", { class: "h-3 bg-muted rounded w-1/2" })
28
+ ], -1)),
29
+ l("div", E, [
30
+ (s(), t(i, null, p(2, (m, S, L, u) => {
31
+ const a = [m];
32
+ if (u && u.key === m && f(u, a)) return u;
33
+ const b = (s(), t("div", {
34
+ key: m,
35
+ class: "space-y-2"
36
+ }, [
37
+ e[6] || (e[6] = l("div", { class: "h-4 bg-muted rounded w-1/4" }, null, -1)),
38
+ e[7] || (e[7] = l("div", { class: "h-10 bg-muted rounded w-full" }, null, -1))
39
+ ]));
40
+ return b.memo = a, b;
41
+ }, e, 0), 64))
42
+ ])
43
+ ]));
44
+ return d.memo = r, d;
45
+ }, e, 2), 64))
46
+ ])) : (s(), t("div", F, [
47
+ (s(!0), t(i, null, p(y.value, (n, g, w, o) => {
48
+ const r = [n, y.value];
49
+ if (o && o.key === n && f(o, r)) return o;
50
+ const d = (s(), t("div", {
51
+ key: n,
52
+ class: "space-y-2"
53
+ }, [
54
+ e[9] || (e[9] = l("div", { class: "h-4 bg-muted rounded w-1/4" }, null, -1)),
55
+ e[10] || (e[10] = l("div", { class: "h-10 bg-muted rounded w-full" }, null, -1))
56
+ ]));
57
+ return d.memo = r, d;
58
+ }, e, 4), 128))
44
59
  ]))
45
60
  ]));
46
61
  }
47
62
  });
48
63
  export {
49
- w as default
64
+ N as default
50
65
  };
@@ -1,19 +1,19 @@
1
- import { defineComponent as b, computed as w, openBlock as o, createElementBlock as d, normalizeStyle as g, createCommentVNode as a, Fragment as s, renderList as m, normalizeClass as h, toDisplayString as i, createVNode as y, unref as f, withCtx as v, createBlock as x, createElementVNode as c } from "vue";
2
- import { VueDraggable as R } from "vue-draggable-plus";
3
- import k from "./TableRow.vue.js";
4
- const B = { class: "custom-fields-table border border-border rounded overflow-hidden bg-background min-w-0 max-w-full w-full" }, F = {
1
+ import { defineComponent as y, computed as f, openBlock as o, createElementBlock as t, normalizeStyle as v, createCommentVNode as n, Fragment as u, renderList as b, normalizeClass as R, toDisplayString as s, createVNode as x, unref as k, withCtx as B, isMemoSame as F, createBlock as N, createElementVNode as g } from "vue";
2
+ import { VueDraggable as C } from "vue-draggable-plus";
3
+ import S from "./TableRow.vue.js";
4
+ const U = { class: "custom-fields-table border border-border rounded overflow-hidden bg-background min-w-0 max-w-full w-full" }, V = {
5
5
  key: 0,
6
6
  class: "w-10 flex-none p-3 border-r border-border"
7
- }, C = {
7
+ }, D = {
8
8
  key: 1,
9
9
  class: "w-10 flex-none p-3 text-center border-r border-border"
10
- }, N = {
10
+ }, T = {
11
11
  key: 2,
12
12
  class: "p-3 border-l border-border"
13
- }, V = {
13
+ }, H = {
14
14
  key: 1,
15
15
  class: "flex flex-col items-center justify-center py-6 text-center bg-muted/5"
16
- }, p = { class: "text-sm font-medium text-foreground" }, D = { class: "text-xs text-muted-foreground mt-1" }, j = /* @__PURE__ */ b({
16
+ }, E = { class: "text-sm font-medium text-foreground" }, j = { class: "text-xs text-muted-foreground mt-1" }, M = /* @__PURE__ */ y({
17
17
  __name: "TableView",
18
18
  props: {
19
19
  rows: {},
@@ -35,25 +35,25 @@ const B = { class: "custom-fields-table border border-border rounded overflow-hi
35
35
  onDragUpdate: { type: Function }
36
36
  },
37
37
  setup(e) {
38
- const r = e, u = w(() => {
39
- const t = [];
40
- return r.draggable && !r.disabled && !r.readonly && t.push("2.5rem"), r.showRowNumbers && t.push("2.5rem"), t.push(...r.visibleSchemaFields.map(() => "minmax(0, 1fr)")), r.canRemoveRow && t.push("2.5rem"), t.join(" ");
38
+ const d = e, w = f(() => {
39
+ const a = [];
40
+ return d.draggable && !d.disabled && !d.readonly && a.push("2.5rem"), d.showRowNumbers && a.push("2.5rem"), a.push(...d.visibleSchemaFields.map(() => "minmax(0, 1fr)")), d.canRemoveRow && a.push("2.5rem"), a.join(" ");
41
41
  });
42
- return (t, U) => (o(), d("div", B, [
43
- e.columnHeaders.length > 1 ? (o(), d("div", {
42
+ return (a, h) => (o(), t("div", U, [
43
+ e.columnHeaders.length > 1 ? (o(), t("div", {
44
44
  key: 0,
45
45
  class: "grid border-b border-border bg-muted/50 text-gray-800 text-xs font-semibold uppercase tracking-wider min-w-0",
46
- style: g({ gridTemplateColumns: u.value })
46
+ style: v({ gridTemplateColumns: w.value })
47
47
  }, [
48
- e.draggable && !e.disabled && !e.readonly ? (o(), d("div", F)) : a("", !0),
49
- e.showRowNumbers ? (o(), d("div", C, " # ")) : a("", !0),
50
- (o(!0), d(s, null, m(e.columnHeaders, (n, l) => (o(), d("div", {
48
+ e.draggable && !e.disabled && !e.readonly ? (o(), t("div", V)) : n("", !0),
49
+ e.showRowNumbers ? (o(), t("div", D, " # ")) : n("", !0),
50
+ (o(!0), t(u, null, b(e.columnHeaders, (r, l) => (o(), t("div", {
51
51
  key: l,
52
- class: h(["p-3 min-w-0 truncate", { "border-l border-border": l > 0 }])
53
- }, i(n), 3))), 128)),
54
- e.canRemoveRow ? (o(), d("div", N)) : a("", !0)
55
- ], 4)) : a("", !0),
56
- y(f(R), {
52
+ class: R(["p-3 min-w-0 truncate", { "border-l border-border": l > 0 }])
53
+ }, s(r), 3))), 128)),
54
+ e.canRemoveRow ? (o(), t("div", T)) : n("", !0)
55
+ ], 4)) : n("", !0),
56
+ x(k(C), {
57
57
  "model-value": e.rows,
58
58
  "onUpdate:modelValue": e.onDragUpdate,
59
59
  disabled: !e.draggable || e.disabled || e.readonly,
@@ -62,32 +62,48 @@ const B = { class: "custom-fields-table border border-border rounded overflow-hi
62
62
  "ghost-class": "opacity-50",
63
63
  class: "divide-y divide-border min-w-0"
64
64
  }, {
65
- default: v(() => [
66
- (o(!0), d(s, null, m(e.rows, (n, l) => (o(), x(k, {
67
- key: n._id,
68
- row: n,
69
- "row-index": l,
70
- fields: e.visibleSchemaFields,
71
- draggable: e.draggable,
72
- disabled: e.disabled,
73
- readonly: e.readonly,
74
- "is-update": e.isUpdate,
75
- "show-row-numbers": e.showRowNumbers,
76
- "can-remove-row": e.canRemoveRow,
77
- helpers: e.helpers,
78
- "on-field-change": e.onFieldChange,
79
- "on-remove-row": e.onRemoveRow
80
- }, null, 8, ["row", "row-index", "fields", "draggable", "disabled", "readonly", "is-update", "show-row-numbers", "can-remove-row", "helpers", "on-field-change", "on-remove-row"]))), 128))
65
+ default: B(() => [
66
+ (o(!0), t(u, null, b(e.rows, (r, l, z, i) => {
67
+ const m = [
68
+ r,
69
+ l,
70
+ e.visibleSchemaFields,
71
+ e.disabled,
72
+ e.readonly,
73
+ e.isUpdate,
74
+ e.showRowNumbers,
75
+ e.canRemoveRow,
76
+ e.draggable,
77
+ e.helpers.getRowErrorsHash(l)
78
+ ];
79
+ if (i && i.key === r._id && F(i, m)) return i;
80
+ const c = (o(), N(S, {
81
+ key: r._id,
82
+ row: r,
83
+ "row-index": l,
84
+ fields: e.visibleSchemaFields,
85
+ draggable: e.draggable,
86
+ disabled: e.disabled,
87
+ readonly: e.readonly,
88
+ "is-update": e.isUpdate,
89
+ "show-row-numbers": e.showRowNumbers,
90
+ "can-remove-row": e.canRemoveRow,
91
+ helpers: e.helpers,
92
+ "on-field-change": e.onFieldChange,
93
+ "on-remove-row": e.onRemoveRow
94
+ }, null, 8, ["row", "row-index", "fields", "draggable", "disabled", "readonly", "is-update", "show-row-numbers", "can-remove-row", "helpers", "on-field-change", "on-remove-row"]));
95
+ return c.memo = m, c;
96
+ }, h, 0), 128))
81
97
  ]),
82
98
  _: 1
83
99
  }, 8, ["model-value", "onUpdate:modelValue", "disabled"]),
84
- e.rows.length === 0 ? (o(), d("div", V, [
85
- c("p", p, i(e.emptyTitle), 1),
86
- c("p", D, i(e.emptyDescription), 1)
87
- ])) : a("", !0)
100
+ e.rows.length === 0 ? (o(), t("div", H, [
101
+ g("p", E, s(e.emptyTitle), 1),
102
+ g("p", j, s(e.emptyDescription), 1)
103
+ ])) : n("", !0)
88
104
  ]));
89
105
  }
90
106
  });
91
107
  export {
92
- j as default
108
+ M as default
93
109
  };