vlite3 1.3.4 → 1.3.5

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.
@@ -24,8 +24,18 @@ interface Props {
24
24
  * already rendered in a dedicated side panel.
25
25
  */
26
26
  excludeTypes?: string[];
27
+ layout?: 'vertical' | 'inline';
27
28
  }
28
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
+ declare function __VLS_template(): {
30
+ attrs: Partial<{}>;
31
+ slots: {
32
+ default?(_: {}): any;
33
+ };
34
+ refs: {};
35
+ rootEl: HTMLDivElement;
36
+ };
37
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
38
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
39
  change: (name: string, payload: IFormFieldChangePayload) => any;
30
40
  addonAction: (action: string) => any;
31
41
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
@@ -36,8 +46,15 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
36
46
  size: InputSize;
37
47
  rounded: InputRounded;
38
48
  showRequiredAsterisk: boolean;
49
+ layout: "vertical" | "inline";
39
50
  isUpdate: boolean;
40
51
  fieldLoading: Record<string, boolean>;
41
52
  excludeTypes: string[];
42
53
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
54
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
43
55
  export default _default;
56
+ type __VLS_WithTemplateSlots<T, S> = T & {
57
+ new (): {
58
+ $slots: S;
59
+ };
60
+ };
@@ -1,7 +1,7 @@
1
1
  import o from "./FormFields.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-14e67e92"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-52d177e7"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,21 +1,18 @@
1
- import { defineComponent as J, computed as K, ref as Q, openBlock as o, createElementBlock as u, normalizeClass as y, Fragment as p, renderList as W, withMemo as X, unref as d, createBlock as b, withCtx as D, resolveDynamicComponent as B, createTextVNode as A, toDisplayString as k, createCommentVNode as i, createElementVNode as Y, createVNode as Z, markRaw as _ } from "vue";
2
- import { isComponent as m, getNestedValue as V, resolveFieldType as ee } from "./utils/form.utils.js";
3
- import q from "../Label.vue.js";
4
- import te from "./FormField.vue.js";
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";
3
+ import B from "../Label.vue.js";
4
+ import ae from "./FormField.vue.js";
5
5
  import { $t as ne } from "../../utils/i18n.js";
6
- const ae = {
6
+ const se = {
7
7
  key: 0,
8
8
  class: "text-destructive ml-0.5"
9
- }, se = ["onFocusin", "onFocusout"], re = ["for"], oe = {
9
+ }, re = ["onFocusin", "onFocusout"], oe = ["for"], ue = {
10
10
  key: 0,
11
11
  class: "text-destructive ml-0.5"
12
- }, ue = {
12
+ }, le = {
13
13
  key: 0,
14
14
  class: "text-destructive ml-0.5"
15
- }, ce = {
16
- key: 2,
17
- class: "mt-1 -text-fs-2.5 text-destructive"
18
- }, ve = /* @__PURE__ */ J({
15
+ }, he = /* @__PURE__ */ J({
19
16
  __name: "FormFields",
20
17
  props: {
21
18
  schema: {},
@@ -31,47 +28,48 @@ const ae = {
31
28
  isFieldVisible: {},
32
29
  isFieldDisabled: {},
33
30
  isFieldReadonly: {},
34
- excludeTypes: { default: () => [] }
31
+ excludeTypes: { default: () => [] },
32
+ layout: { default: "vertical" }
35
33
  },
36
34
  emits: ["change", "addonAction"],
37
- setup(a, { emit: $ }) {
38
- const r = a, F = $, E = K(() => {
35
+ setup(n, { emit: $ }) {
36
+ const r = n, k = $, q = K(() => {
39
37
  if (r.className) return r.className;
40
- }), s = (t) => ee(t, {
38
+ }), s = (t) => te(t, {
41
39
  values: r.values,
42
40
  globalValues: r.values,
43
41
  isUpdate: r.isUpdate
44
- }), I = (t) => {
42
+ }), E = (t) => {
45
43
  if (!r.excludeTypes || r.excludeTypes.length === 0) return !0;
46
- const n = s(t);
47
- return !n || !r.excludeTypes.includes(n);
48
- }, x = (t) => V(r.values, t.name), h = (t) => r.errors[t.name] || "", f = (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, c = (t) => t.labelI18n ? ne(t.labelI18n) : t.label, R = (t) => {
44
+ const a = s(t);
45
+ return !a || !r.excludeTypes.includes(a);
46
+ }, F = (t) => V(r.values, t.name), h = (t) => r.errors[t.name] || "", I = (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(t.labelI18n) : t.label, R = (t) => {
49
47
  if (t)
50
- return m(t) ? _(t) : t;
51
- }, j = (t, n) => {
52
- F("change", t.name, n);
53
- }, P = (t) => t.itemClass || "", S = (t, n) => {
54
- F("change", t, n);
48
+ return v(t) ? ee(t) : t;
49
+ }, S = (t, a) => {
50
+ k("change", t.name, a);
51
+ }, j = (t) => t.itemClass || "", P = (t, a) => {
52
+ k("change", t, a);
55
53
  }, H = (t) => {
56
- F("addonAction", t);
57
- }, v = (t) => t && typeof t == "object" && t.name ? t.name : null, g = Q({}), M = (t) => {
58
- g.value[t] = !0;
54
+ k("addonAction", t);
55
+ }, g = (t) => t && typeof t == "object" && t.name ? t.name : null, y = Q({}), M = (t) => {
56
+ y.value[t] = !0;
59
57
  }, O = (t) => {
60
- g.value[t] = !1;
58
+ y.value[t] = !1;
61
59
  }, L = (t) => {
62
- const n = x(t), e = s(t);
63
- let l = n != null && n !== "" && !(Array.isArray(n) && n.length === 0);
64
- const z = typeof n == "number" && !isNaN(n);
65
- return e === "dateRangePicker" && n && typeof n == "object" && (l = !!(n.startDate || n.endDate || n.start || n.end)), T(t) || e === "number" ? g.value[t.name] || l || z : l || z;
66
- }, T = (t) => {
67
- const n = s(t) || "text";
68
- return ["text", "email", "password", "tel", "url", "search", "textarea"].includes(n);
60
+ const a = F(t), e = s(t);
61
+ let i = a != null && a !== "" && !(Array.isArray(a) && a.length === 0);
62
+ const T = typeof a == "number" && !isNaN(a);
63
+ return e === "dateRangePicker" && a && typeof a == "object" && (i = !!(a.startDate || a.endDate || a.start || a.end)), f(t) || e === "number" ? y.value[t.name] || i || T : i || T;
64
+ }, f = (t) => {
65
+ const a = s(t) || "text";
66
+ return ["text", "email", "password", "tel", "url", "search", "textarea"].includes(a);
69
67
  }, G = (t) => {
70
- const n = s(t);
71
- return n === "number" ? (t.props?.variant ?? "split") === "split" ? "left-4" : "left-3" : n === "date" || n === "time" || n === "color" || n === "dateRangePicker" ? "left-10" : "left-3";
68
+ const a = s(t);
69
+ return a === "number" ? (t.props?.variant ?? "split") === "split" ? "left-4" : "left-3" : a === "date" || a === "time" || a === "color" || a === "dateRangePicker" ? "left-10" : "left-3";
72
70
  }, w = (t) => {
73
71
  if (r.variant !== "floating") return !1;
74
- const n = s(t) || "text";
72
+ const a = s(t) || "text";
75
73
  return ![
76
74
  "switch",
77
75
  "check",
@@ -80,116 +78,130 @@ const ae = {
80
78
  "fileUploader",
81
79
  "file",
82
80
  "choiceBox"
83
- ].includes(n);
84
- }, U = (t) => {
85
- const n = c(t);
86
- if (!(!n || m(n)))
87
- return n;
81
+ ].includes(a);
82
+ }, z = (t) => {
83
+ const a = l(t);
84
+ if (!(!a || v(a)))
85
+ return a;
88
86
  };
89
- return (t, n) => (o(), u("div", {
90
- class: y(["grid", a.variant === "floating" ? "gap-5 mt-1" : "gap-4", E.value])
87
+ return (t, a) => (o(), u("div", {
88
+ class: d([
89
+ n.layout === "inline" ? "flex flex-row flex-wrap items-end w-full " : "grid",
90
+ n.variant === "floating" ? "gap-5 mt-1" : "gap-4",
91
+ q.value
92
+ ])
91
93
  }, [
92
- (o(!0), u(p, null, W(a.schema, (e) => (o(), u(p, {
94
+ (o(!0), u(b, null, W(n.schema, (e) => (o(), u(b, {
93
95
  key: e.name
94
96
  }, [
95
- f(e) && I(e) ? X([
97
+ I(e) && E(e) ? X([
96
98
  e,
97
- x(e),
99
+ F(e),
98
100
  h(e),
99
101
  C(e),
100
102
  N(e),
101
- g.value[e.name],
102
- a.variant,
103
- a.size,
104
- a.rounded,
105
- a.isUpdate,
106
- a.showRequiredAsterisk,
107
- a.fieldLoading[e.name],
103
+ y.value[e.name],
104
+ n.variant,
105
+ n.size,
106
+ n.rounded,
107
+ n.isUpdate,
108
+ n.showRequiredAsterisk,
109
+ n.fieldLoading[e.name],
108
110
  s(e),
109
- d(m)(s(e)) || s(e) === "customFields" ? a.values : null,
110
- v(e.addonLeft) ? d(V)(a.values, v(e.addonLeft)) : null,
111
- v(e.addonRight) ? d(V)(a.values, v(e.addonRight)) : null
111
+ m(v)(s(e)) || s(e) === "customFields" ? n.values : null,
112
+ g(e.addonLeft) ? m(V)(n.values, g(e.addonLeft)) : null,
113
+ g(e.addonRight) ? m(V)(n.values, g(e.addonRight)) : null
112
114
  ], () => (o(), u("div", {
113
115
  key: 0,
114
- class: y(["max-md:col-span-full! form-field-item", P(e)])
116
+ class: d([
117
+ "max-md:col-span-full! form-field-item relative",
118
+ j(e),
119
+ n.layout === "inline" ? "pb-5 " : ""
120
+ ])
115
121
  }, [
116
- c(e) && s(e) !== "switch" && s(e) !== "check" && s(e) !== "customFields" && s(e) !== "choiceBox" && !w(e) ? (o(), b(q, {
122
+ l(e) && s(e) !== "switch" && s(e) !== "check" && s(e) !== "customFields" && s(e) !== "choiceBox" && !w(e) ? (o(), p(B, {
117
123
  key: 0,
118
124
  size: "md",
119
125
  for: e.name,
120
126
  class: "mb-2 block font-medium"
121
127
  }, {
122
- default: D(() => [
123
- d(m)(c(e)) ? (o(), b(B(R(c(e))), { key: 0 })) : (o(), u(p, { key: 1 }, [
124
- A(k(c(e)) + " ", 1),
125
- e.required && a.showRequiredAsterisk ? (o(), u("span", ae, "*")) : i("", !0)
128
+ default: U(() => [
129
+ m(v)(l(e)) ? (o(), p(D(R(l(e))), { key: 0 })) : (o(), u(b, { key: 1 }, [
130
+ A(x(l(e)) + " ", 1),
131
+ e.required && n.showRequiredAsterisk ? (o(), u("span", se, "*")) : c("", !0)
126
132
  ], 64))
127
133
  ]),
128
134
  _: 2
129
- }, 1032, ["for"])) : i("", !0),
135
+ }, 1032, ["for"])) : c("", !0),
130
136
  Y("div", {
131
- class: y(["relative", [
137
+ class: d(["relative", [
132
138
  s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? "w-auto" : "w-full",
133
139
  s(e) === "switch" || s(e) === "check" ? "mt-auto" : ""
134
140
  ]]),
135
- onFocusin: (l) => M(e.name),
136
- onFocusout: (l) => O(e.name)
141
+ onFocusin: (i) => M(e.name),
142
+ onFocusout: (i) => O(e.name)
137
143
  }, [
138
- w(e) && U(e) && !T(e) ? (o(), u("label", {
144
+ w(e) && z(e) && !f(e) ? (o(), u("label", {
139
145
  key: 0,
140
146
  for: e.name,
141
- class: y([
147
+ class: d([
142
148
  "absolute transition-all duration-200 ease-in-out pointer-events-none z-20",
143
149
  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)}`
144
150
  ])
145
151
  }, [
146
- d(m)(c(e)) ? (o(), b(B(R(c(e))), { key: 0 })) : (o(), u(p, { key: 1 }, [
147
- A(k(c(e)) + " ", 1),
148
- e.required ? (o(), u("span", oe, "*")) : i("", !0)
152
+ m(v)(l(e)) ? (o(), p(D(R(l(e))), { key: 0 })) : (o(), u(b, { key: 1 }, [
153
+ A(x(l(e)) + " ", 1),
154
+ e.required ? (o(), u("span", ue, "*")) : c("", !0)
149
155
  ], 64))
150
- ], 10, re)) : i("", !0),
151
- Z(te, {
156
+ ], 10, oe)) : c("", !0),
157
+ Z(ae, {
152
158
  field: r.variant === "floating" ? {
153
159
  ...e,
154
160
  placeholder: void 0,
155
161
  placeholderI18n: void 0,
156
162
  props: { ...e.props || {}, id: e.name }
157
163
  } : { ...e, props: { ...e.props || {}, id: e.name } },
158
- value: x(e),
164
+ value: F(e),
159
165
  floatingActive: L(e),
160
- label: s(e) === "customFields" ? void 0 : w(e) ? U(e) : void 0,
161
- values: a.values,
162
- errors: a.errors,
163
- variant: a.variant,
164
- size: a.size,
165
- rounded: a.rounded,
166
+ label: s(e) === "customFields" ? void 0 : w(e) ? z(e) : void 0,
167
+ values: n.values,
168
+ errors: n.errors,
169
+ variant: n.variant,
170
+ size: n.size,
171
+ rounded: n.rounded,
166
172
  disabled: C(e),
167
173
  readonly: N(e),
168
174
  error: h(e),
169
- isUpdate: a.isUpdate,
170
- loading: a.fieldLoading[e.name],
171
- onChange: (l) => j(e, l),
172
- onAddonChange: S,
175
+ isUpdate: n.isUpdate,
176
+ loading: n.fieldLoading[e.name],
177
+ onChange: (i) => S(e, i),
178
+ onAddonChange: P,
173
179
  onAddonAction: H
174
180
  }, null, 8, ["field", "value", "floatingActive", "label", "values", "errors", "variant", "size", "rounded", "disabled", "readonly", "error", "isUpdate", "loading", "onChange"])
175
- ], 42, se),
176
- s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? (o(), b(q, {
181
+ ], 42, re),
182
+ s(e) === "check" || s(e) === "switch" && e.props?.switchVariant === "basic" ? (o(), p(B, {
177
183
  key: 1,
178
184
  for: e.name,
179
185
  class: "ml-2 text-sm font-medium cursor-pointer"
180
186
  }, {
181
- default: D(() => [
182
- A(k(c(e)) + " ", 1),
183
- e.required ? (o(), u("span", ue, "*")) : i("", !0)
187
+ default: U(() => [
188
+ A(x(l(e)) + " ", 1),
189
+ e.required ? (o(), u("span", le, "*")) : c("", !0)
184
190
  ]),
185
191
  _: 2
186
- }, 1032, ["for"])) : i("", !0),
187
- h(e) ? (o(), u("p", ce, k(h(e)), 1)) : i("", !0)
188
- ], 2)), n, 0) : i("", !0)
189
- ], 64))), 128))
192
+ }, 1032, ["for"])) : c("", !0),
193
+ h(e) ? (o(), u("p", {
194
+ key: 2,
195
+ class: d([
196
+ n.layout === "inline" ? "absolute capitalize bottom-0 left-0 mt-0 -text-fs-2.5 text-destructive whitespace-nowrap" : "mt-1 -text-fs-2.5 text-destructive"
197
+ ])
198
+ }, x(h(e)), 3)) : c("", !0)
199
+ ], 2)), a, 0) : c("", !0)
200
+ ], 64))), 128)),
201
+ _(t.$slots, "default", {}, void 0, !0)
190
202
  ], 2));
191
203
  }
192
204
  });
193
205
  export {
194
- ve as default
206
+ he as default
195
207
  };
@@ -218,6 +218,8 @@ export interface IFormProps {
218
218
  pageHeaderClass?: string;
219
219
  /** Props to pass to the back button in page mode */
220
220
  backButtonProps?: ButtonProps;
221
+ /** Form layout style */
222
+ layout?: 'vertical' | 'inline';
221
223
  }
222
224
  /**
223
225
  * Form submit payload
@@ -4,6 +4,7 @@ import I from "../Button.vue.js";
4
4
  import fe from "../Timeline/Timeline.vue.js";
5
5
  import "@iconify/vue";
6
6
  import { $t as j } from "../../utils/i18n.js";
7
+ import "../../core/config.js";
7
8
  import he from "./ImportStep1.vue.js";
8
9
  import ge from "./ImportStep2.vue.js";
9
10
  import be from "./ImportStep3.vue.js";
@@ -12,7 +13,7 @@ import { showToast as E } from "../../composables/useNotifications.js";
12
13
  const xe = { class: "px-2" }, ye = { class: "min-h-[300px]" }, De = {
13
14
  key: 0,
14
15
  class: "mt-4 p-3 bg-destructive/10 border border-destructive/20 rounded-lg text-sm text-destructive"
15
- }, ke = { class: "list-disc pl-5 space-y-1" }, _e = { class: "flex items-center justify-between w-full" }, Ie = { key: 1 }, Ve = /* @__PURE__ */ ne({
16
+ }, ke = { class: "list-disc pl-5 space-y-1" }, _e = { class: "flex items-center justify-between w-full" }, Ie = { key: 1 }, ze = /* @__PURE__ */ ne({
16
17
  __name: "ImportData",
17
18
  props: {
18
19
  title: { default: "Import Data" },
@@ -253,5 +254,5 @@ const xe = { class: "px-2" }, ye = { class: "min-h-[300px]" }, De = {
253
254
  }
254
255
  });
255
256
  export {
256
- Ve as default
257
+ ze as default
257
258
  };
@@ -22,8 +22,8 @@ interface Props {
22
22
  }
23
23
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
24
24
  placeholder: string;
25
- items: import('./CommandPalette').CommandPaletteItem[];
26
25
  enabled: boolean;
26
+ items: import('./CommandPalette').CommandPaletteItem[];
27
27
  menuItems: SidebarMenuItemSchema[];
28
28
  maxResultsPerGroup: number;
29
29
  shortcutKey: string;
@@ -333,9 +333,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
333
333
  declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
334
334
  delete: (items: any[]) => any;
335
335
  add: () => any;
336
+ "change-view": (view: string) => any;
336
337
  }, string, import('vue').PublicProps, Readonly<ScreenProps> & Readonly<{
337
338
  onDelete?: (items: any[]) => any;
338
339
  onAdd?: () => any;
340
+ "onChange-view"?: (view: string) => any;
339
341
  }>, {
340
342
  name: string;
341
343
  data: any[];