vlite3 0.9.3 → 0.9.4

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,21 +1,21 @@
1
- import { defineComponent as I, computed as o, markRaw as O, openBlock as s, createBlock as u, mergeProps as f, toHandlers as C, createSlots as T, unref as F, withCtx as n, createVNode as L, createTextVNode as m, toDisplayString as p, createCommentVNode as $, resolveDynamicComponent as j } from "vue";
2
- import { isComponent as x, isAddonObject as v } from "./utils/form.utils.js";
3
- import D from "../NumberInput.vue.js";
4
- import h from "../Button.vue.js";
5
- import { $t as E } from "../../utils/i18n.js";
6
- import g from "../Input.vue.js";
1
+ import { defineComponent as T, computed as r, markRaw as j, openBlock as u, createBlock as f, mergeProps as c, toHandlers as L, createSlots as E, unref as $, withCtx as o, createVNode as A, createTextVNode as p, toDisplayString as v, createCommentVNode as N, resolveDynamicComponent as H } from "vue";
2
+ import { isComponent as z, isAddonObject as h } from "./utils/form.utils.js";
3
+ import q from "../NumberInput.vue.js";
4
+ import g from "../Button.vue.js";
5
+ import { $t as G } from "../../utils/i18n.js";
6
+ import y from "../Input.vue.js";
7
7
  /* empty css */
8
- import H from "../Switch.vue.js";
9
- import q from "../CheckBox.vue.js";
10
- import G from "../FilePicker/FilePicker.vue.js";
11
- import J from "../AvatarUploader/AvatarUploader.vue.js";
12
- import z from "../Dropdown/Dropdown.vue.js";
13
- import K from "../MultiSelect/MultiSelect.vue.js";
14
- import M from "../DatePicker.vue.js";
15
- import Q from "../ColorPicker/ColorPicker.vue.js";
16
- import W from "../IconPicker.vue.js";
17
- import X from "./CustomFields.vue.js";
18
- const pe = /* @__PURE__ */ I({
8
+ import J from "../Switch.vue.js";
9
+ import K from "../CheckBox.vue.js";
10
+ import M from "../FilePicker/FilePicker.vue.js";
11
+ import Q from "../AvatarUploader/AvatarUploader.vue.js";
12
+ import V from "../Dropdown/Dropdown.vue.js";
13
+ import W from "../MultiSelect/MultiSelect.vue.js";
14
+ import X from "../DatePicker.vue.js";
15
+ import Y from "../ColorPicker/ColorPicker.vue.js";
16
+ import Z from "../IconPicker.vue.js";
17
+ import _ from "./CustomFields.vue.js";
18
+ const ge = /* @__PURE__ */ T({
19
19
  __name: "FormField",
20
20
  props: {
21
21
  field: {},
@@ -33,17 +33,17 @@ const pe = /* @__PURE__ */ I({
33
33
  loading: { type: Boolean, default: !1 }
34
34
  },
35
35
  emits: ["change", "addonChange", "addonAction"],
36
- setup(t, { emit: A }) {
37
- const e = t, c = A, d = (a, l) => {
38
- c("change", { value: a, data: l });
39
- }, V = (a) => {
40
- c("change", { value: a });
41
- }, y = o(
36
+ setup(t, { emit: P }) {
37
+ const e = t, m = P, n = (a, l) => {
38
+ m("change", { value: a, data: l });
39
+ }, S = (a) => {
40
+ m("change", { value: a });
41
+ }, b = r(
42
42
  () => e.field.type === "number" && e.field.isSensitiveField === !0
43
- ), N = o(() => {
43
+ ), U = r(() => {
44
44
  const a = e.field.type;
45
- if (x(a))
46
- return O(a);
45
+ if (z(a))
46
+ return j(a);
47
47
  switch (a) {
48
48
  case "text":
49
49
  case "email":
@@ -52,48 +52,48 @@ const pe = /* @__PURE__ */ I({
52
52
  case "url":
53
53
  case "search":
54
54
  case "textarea":
55
- return g;
55
+ return y;
56
56
  case "number":
57
- return y.value ? g : D;
57
+ return b.value ? y : q;
58
58
  case "switch":
59
- return H;
59
+ return J;
60
60
  case "check":
61
- return q;
61
+ return K;
62
62
  case "select":
63
- return z;
63
+ return V;
64
64
  case "multiSelect":
65
- return K;
65
+ return W;
66
66
  case "date":
67
67
  case "time":
68
- return M;
68
+ return X;
69
69
  case "file":
70
70
  case "fileUploader":
71
- return G;
71
+ return M;
72
72
  case "avatarUpload":
73
- return J;
74
- case "color":
75
73
  return Q;
74
+ case "color":
75
+ return Y;
76
76
  case "iconPicker":
77
- return W;
77
+ return Z;
78
78
  case "customFields":
79
- return X;
79
+ return _;
80
80
  default:
81
- return g;
81
+ return y;
82
82
  }
83
- }), S = o(() => {
84
- const a = e.field.type, l = {
85
- disabled: e.disabled || e.field.disabled === !0,
86
- readonly: e.readonly || e.field.readonly === !0,
87
- ...e?.field || {},
83
+ }), k = r(() => {
84
+ const a = e.field.type, { disabled: l, readonly: d, ...D } = e.field, i = {
85
+ ...D,
86
+ disabled: e.disabled || l === !0,
87
+ readonly: e.readonly || d === !0,
88
88
  ...e.field.props || {},
89
89
  label: "",
90
90
  labelI18n: ""
91
- }, i = e.field.placeholderI18n ? E(e.field.placeholderI18n) : e.field.placeholder, b = e.variant === "floating" && e.label && !e.floatingActive, r = b ? "" : i;
91
+ }, C = e.field.placeholderI18n ? G(e.field.placeholderI18n) : e.field.placeholder, x = e.variant === "floating" && e.label && !e.floatingActive, s = x ? "" : C;
92
92
  return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || !a ? {
93
- ...l,
93
+ ...i,
94
94
  modelValue: e.value ?? "",
95
95
  type: a || "text",
96
- placeholder: r,
96
+ placeholder: s,
97
97
  label: e.label,
98
98
  icon: e.field.icon,
99
99
  iconRight: e.field.iconRight,
@@ -108,13 +108,13 @@ const pe = /* @__PURE__ */ I({
108
108
  max: e.field.max,
109
109
  rows: a === "textarea" ? e.field.props?.rows || 3 : void 0,
110
110
  class: `${e.field.className}`
111
- } : a === "number" && y.value ? {
112
- ...l,
111
+ } : a === "number" && b.value ? {
112
+ ...i,
113
113
  // Convert numeric value to string so Input.vue (string-based) displays it correctly
114
114
  modelValue: e.value !== void 0 && e.value !== null ? String(e.value) : "",
115
115
  // 'password' activates the eye-toggle inside Input.vue
116
116
  type: "password",
117
- placeholder: r,
117
+ placeholder: s,
118
118
  label: e.label,
119
119
  variant: e.variant,
120
120
  size: e.size,
@@ -124,7 +124,7 @@ const pe = /* @__PURE__ */ I({
124
124
  showClearButton: !1,
125
125
  class: e.field.className ?? ""
126
126
  } : a === "number" ? {
127
- ...l,
127
+ ...i,
128
128
  modelValue: e.value ?? void 0,
129
129
  min: e.field.min,
130
130
  max: e.field.max,
@@ -133,59 +133,59 @@ const pe = /* @__PURE__ */ I({
133
133
  mode: e.field.props?.mode ?? (e.variant === "transparent" ? "ghost" : "outline"),
134
134
  size: e.size,
135
135
  rounded: e.rounded,
136
- placeholder: r,
136
+ placeholder: s,
137
137
  class: e.field.className
138
138
  } : a === "switch" ? {
139
- ...l,
139
+ ...i,
140
140
  modelValue: !!e.value,
141
141
  size: "sm",
142
142
  label: ""
143
143
  // Label handled externally
144
144
  } : a === "check" ? {
145
- ...l,
145
+ ...i,
146
146
  modelValue: !!e.value,
147
147
  label: ""
148
148
  // Label handled externally
149
149
  } : a === "select" ? {
150
- ...l,
150
+ ...i,
151
151
  modelValue: e.value,
152
152
  options: e.field.options || [],
153
- placeholder: r,
153
+ placeholder: s,
154
154
  selectable: !0,
155
155
  closeOnSelect: !0,
156
156
  triggerProps: {
157
157
  variant: e.variant === "floating" ? "outline-floating" : e.variant || "outline",
158
158
  size: e.size,
159
- ...b ? { text: "​" } : {}
159
+ ...x ? { text: "​" } : {}
160
160
  }
161
161
  } : a === "multiSelect" ? {
162
- ...l,
162
+ ...i,
163
163
  modelValue: Array.isArray(e.value) ? e.value : [],
164
164
  options: e.field.options || [],
165
- placeholder: i,
165
+ placeholder: C,
166
166
  variant: e.variant,
167
167
  size: e.size,
168
168
  rounded: e.rounded
169
169
  } : a === "date" || a === "time" ? {
170
- ...l,
170
+ ...i,
171
171
  modelValue: e.value,
172
172
  mode: a === "time" ? "time" : "date",
173
- placeholder: r,
173
+ placeholder: s,
174
174
  btnProps: {
175
175
  variant: e.variant === "floating" ? "outline-floating" : e.variant || "outline",
176
176
  size: e.size,
177
177
  class: "px-3!",
178
- ...b ? { text: "​" } : {}
178
+ ...x ? { text: "​" } : {}
179
179
  }
180
180
  } : a === "fileUploader" || a === "file" ? {
181
- ...l,
181
+ ...i,
182
182
  modelValue: e.value,
183
183
  multiSelect: e.field.props?.multiple || !1,
184
184
  maxFiles: e.field.maxFiles || e.field.props?.maxFiles,
185
185
  fileTypes: e.field.props?.accept ? e.field.props.accept.split(",") : [],
186
186
  returnFormat: "base64",
187
187
  variant: a === "file" ? "input" : "dropzone",
188
- placeholder: r,
188
+ placeholder: s,
189
189
  size: e.size,
190
190
  rounded: e.rounded,
191
191
  maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0,
@@ -193,19 +193,19 @@ const pe = /* @__PURE__ */ I({
193
193
  allowRename: e.field.props?.allowRename ?? !0
194
194
  } : a === "avatarUpload" ? {
195
195
  size: "2xl",
196
- ...l,
196
+ ...i,
197
197
  modelValue: e.value,
198
198
  editable: !e.readonly,
199
199
  maxSize: e.field.maxFileSize ? e.field.maxFileSize * 1024 * 1024 : void 0,
200
200
  loading: e.loading
201
201
  } : a === "color" ? {
202
- ...l,
202
+ ...i,
203
203
  modelValue: e.value || "#000000"
204
204
  } : a === "iconPicker" ? {
205
- ...l,
205
+ ...i,
206
206
  value: e.value || "lucide:smile"
207
207
  } : a === "customFields" ? {
208
- ...l,
208
+ ...i,
209
209
  label: e?.field?.label,
210
210
  labelI18n: e?.field?.labelI18n,
211
211
  modelValue: Array.isArray(e.value) ? e.value : [],
@@ -217,142 +217,142 @@ const pe = /* @__PURE__ */ I({
217
217
  size: e.size,
218
218
  rounded: e.rounded,
219
219
  isUpdate: e.isUpdate
220
- } : x(a) ? {
221
- ...l,
220
+ } : z(a) ? {
221
+ ...i,
222
222
  value: e.value,
223
223
  values: e.values
224
- } : l;
225
- }), k = o(() => {
224
+ } : i;
225
+ }), R = r(() => {
226
226
  const a = e.field.type;
227
227
  return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || a === "textarea" || a === "switch" || a === "check" || !a ? {
228
- "update:modelValue": V
229
- } : a === "number" && y.value ? {
228
+ "update:modelValue": S
229
+ } : a === "number" && b.value ? {
230
230
  "update:modelValue": (l) => {
231
- const i = l === "" ? void 0 : Number(l);
232
- c("change", { value: isNaN(i) ? void 0 : i });
231
+ const d = l === "" ? void 0 : Number(l);
232
+ m("change", { value: isNaN(d) ? void 0 : d });
233
233
  }
234
234
  } : a === "number" ? {
235
- "update:modelValue": V
235
+ "update:modelValue": S
236
236
  } : a === "select" ? {
237
237
  onSelect: (l) => {
238
- d(l.value, l.data);
238
+ n(l.value, l.data);
239
239
  }
240
240
  } : a === "multiSelect" ? {
241
- change: (l) => d(l)
241
+ change: (l) => n(l)
242
242
  } : a === "date" || a === "time" ? {
243
- change: (l) => d(l)
243
+ change: (l) => n(l)
244
244
  } : a === "fileUploader" || a === "file" ? {
245
245
  change: (l) => {
246
- d(l);
246
+ n(l);
247
247
  },
248
248
  "update:modelValue": (l) => {
249
- d(l);
249
+ n(l);
250
250
  }
251
251
  } : a === "avatarUpload" ? {
252
252
  change: (l) => {
253
- d(l);
253
+ n(l);
254
254
  },
255
255
  "update:modelValue": (l) => {
256
- d(l);
256
+ n(l);
257
257
  }
258
258
  } : a === "color" ? {
259
- change: (l) => d(l)
259
+ change: (l) => n(l)
260
260
  } : a === "iconPicker" ? {
261
- onSelect: (l) => d(l)
261
+ onSelect: (l) => n(l)
262
262
  } : a === "customFields" ? {
263
- change: (l) => d(l)
264
- } : x(a) ? {
263
+ change: (l) => n(l)
264
+ } : z(a) ? {
265
265
  onChange: (l) => {
266
- d(l.value, l.data);
266
+ n(l.value, l.data);
267
267
  }
268
268
  } : {};
269
- }), P = o(() => v(e.field.addonLeft) || v(e.field.addonRight)), U = o(() => {
269
+ }), B = r(() => h(e.field.addonLeft) || h(e.field.addonRight)), I = r(() => {
270
270
  const a = e.field.type;
271
271
  return a === "text" || a === "email" || a === "password" || a === "tel" || a === "url" || a === "search" || !a;
272
- }), B = o(() => P.value && U.value), R = (a, l) => {
273
- c("addonChange", a.name, { value: l.value });
274
- }, w = (a) => {
275
- a.action && c("addonAction", a.action);
272
+ }), O = r(() => B.value && I.value), w = (a, l) => {
273
+ m("addonChange", a.name, { value: l.value });
274
+ }, F = (a) => {
275
+ a.action && m("addonAction", a.action);
276
276
  };
277
- return (a, l) => B.value ? (s(), u(g, f({ key: 0 }, {
278
- ...S.value,
277
+ return (a, l) => O.value ? (u(), f(y, c({ key: 0 }, {
278
+ ...k.value,
279
279
  ...t.field?.props || {}
280
- }, C(k.value)), T({ _: 2 }, [
281
- F(v)(t.field.addonLeft) ? {
280
+ }, L(R.value)), E({ _: 2 }, [
281
+ $(h)(t.field.addonLeft) ? {
282
282
  name: "addon-left",
283
- fn: n(() => [
284
- t.field.addonLeft.type === "select" ? (s(), u(z, f({
283
+ fn: o(() => [
284
+ t.field.addonLeft.type === "select" ? (u(), f(V, c({
285
285
  key: 0,
286
286
  modelValue: t.field.addonLeft.name ? t.values[t.field.addonLeft.name] : void 0,
287
287
  options: t.field.addonLeft.options || []
288
288
  }, t.field.addonLeft.props || {}, {
289
- onOnSelect: l[0] || (l[0] = (i) => R(t.field.addonLeft, i))
289
+ onOnSelect: l[0] || (l[0] = (d) => w(t.field.addonLeft, d))
290
290
  }), {
291
- trigger: n(({ selectedLabel: i }) => [
292
- L(h, { variant: "outline" }, {
293
- default: n(() => [
294
- m(p(i), 1)
291
+ trigger: o(({ selectedLabel: d }) => [
292
+ A(g, { variant: "outline" }, {
293
+ default: o(() => [
294
+ p(v(d), 1)
295
295
  ]),
296
296
  _: 2
297
297
  }, 1024)
298
298
  ]),
299
299
  _: 1
300
- }, 16, ["modelValue", "options"])) : t.field.addonLeft.type === "button" ? (s(), u(h, f({
300
+ }, 16, ["modelValue", "options"])) : t.field.addonLeft.type === "button" ? (u(), f(g, c({
301
301
  key: 1,
302
302
  variant: "outline"
303
303
  }, t.field.addonLeft.props || {}, {
304
- onClick: l[1] || (l[1] = (i) => w(t.field.addonLeft))
304
+ onClick: l[1] || (l[1] = (d) => F(t.field.addonLeft))
305
305
  }), {
306
- default: n(() => [
307
- m(p(t.field.addonLeft.text), 1)
306
+ default: o(() => [
307
+ p(v(t.field.addonLeft.text), 1)
308
308
  ]),
309
309
  _: 1
310
- }, 16)) : $("", !0)
310
+ }, 16)) : N("", !0)
311
311
  ]),
312
312
  key: "0"
313
313
  } : void 0,
314
- F(v)(t.field.addonRight) ? {
314
+ $(h)(t.field.addonRight) ? {
315
315
  name: "addon-right",
316
- fn: n(() => [
317
- t.field.addonRight.type === "select" ? (s(), u(z, f({
316
+ fn: o(() => [
317
+ t.field.addonRight.type === "select" ? (u(), f(V, c({
318
318
  key: 0,
319
319
  modelValue: t.field.addonRight.name ? t.values[t.field.addonRight.name] : void 0,
320
320
  options: t.field.addonRight.options || []
321
321
  }, t.field.addonRight.props || {}, {
322
- onOnSelect: l[2] || (l[2] = (i) => R(t.field.addonRight, i))
322
+ onOnSelect: l[2] || (l[2] = (d) => w(t.field.addonRight, d))
323
323
  }), {
324
- trigger: n(({ selectedLabel: i }) => [
325
- L(h, { variant: "outline" }, {
326
- default: n(() => [
327
- m(p(i), 1)
324
+ trigger: o(({ selectedLabel: d }) => [
325
+ A(g, { variant: "outline" }, {
326
+ default: o(() => [
327
+ p(v(d), 1)
328
328
  ]),
329
329
  _: 2
330
330
  }, 1024)
331
331
  ]),
332
332
  _: 1
333
- }, 16, ["modelValue", "options"])) : t.field.addonRight.type === "button" ? (s(), u(h, f({
333
+ }, 16, ["modelValue", "options"])) : t.field.addonRight.type === "button" ? (u(), f(g, c({
334
334
  key: 1,
335
335
  variant: "outline"
336
336
  }, t.field.addonRight.props || {}, {
337
- onClick: l[3] || (l[3] = (i) => w(t.field.addonRight))
337
+ onClick: l[3] || (l[3] = (d) => F(t.field.addonRight))
338
338
  }), {
339
- default: n(() => [
340
- m(p(t.field.addonRight.text), 1)
339
+ default: o(() => [
340
+ p(v(t.field.addonRight.text), 1)
341
341
  ]),
342
342
  _: 1
343
- }, 16)) : $("", !0)
343
+ }, 16)) : N("", !0)
344
344
  ]),
345
345
  key: "1"
346
346
  } : void 0
347
- ]), 1040)) : (s(), u(j(N.value), f({
347
+ ]), 1040)) : (u(), f(H(U.value), c({
348
348
  key: 1,
349
349
  class: ["switch", "check"].includes(t.field?.type) ? "" : "w-full"
350
350
  }, {
351
- ...S.value,
351
+ ...k.value,
352
352
  ...t.field?.props || {}
353
- }, C(k.value)), null, 16, ["class"]));
353
+ }, L(R.value)), null, 16, ["class"]));
354
354
  }
355
355
  });
356
356
  export {
357
- pe as default
357
+ ge as default
358
358
  };
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
3
3
  import v from "./Modal.vue.js";
4
4
  import N from "./CommandPalette/CommandPaletteContent.vue.js";
5
5
  import { $t as R } from "../utils/i18n.js";
6
- /* empty css */
6
+ /* empty css */
7
7
  const U = { class: "block truncate -text-fs-1.5" }, V = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, q = /* @__PURE__ */ x({
8
8
  __name: "NavbarCommandPalette",
9
9
  props: {
@@ -1,7 +1,7 @@
1
1
  import o from "./NumberInput.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a8237529"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a771336"]]);
5
5
  export {
6
6
  a as default
7
7
  };