toku-form-extensions 2.0.0 → 2.0.1

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 +1 @@
1
- {"version":3,"file":"TCustomForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TCustomForm/TCustomForm"],"names":[],"mappings":"AAIA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAuB9B,OAAO,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkuBjC,wBAOG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"TCustomForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TCustomForm/TCustomForm"],"names":[],"mappings":"AAIA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAuB9B,OAAO,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuuBjC,wBAOG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { provide as ct, inject as dt, defineComponent as we, computed as P, openBlock as S, createElementBlock as H, createVNode as y, unref as O, withCtx as j, createTextVNode as se, toDisplayString as Q, ref as W, onMounted as at, onUnmounted as ya, watchEffect as ve, Teleport as ba, Transition as gn, toRef as _a, watch as Ve, h as Qt, shallowRef as wa, isVNode as xa, createElementVNode as ae, createCommentVNode as q, createBlock as K, normalizeClass as he, Fragment as pe, renderList as Se, useCssVars as ft, renderSlot as Ta } from "vue";
1
+ import { provide as ct, inject as dt, defineComponent as we, computed as Y, openBlock as S, createElementBlock as H, createVNode as y, unref as O, withCtx as j, createTextVNode as se, toDisplayString as Q, ref as W, onMounted as at, onUnmounted as ya, watchEffect as ve, Teleport as ba, Transition as gn, toRef as _a, watch as Ve, h as Qt, shallowRef as wa, isVNode as xa, createElementVNode as ae, createCommentVNode as q, createBlock as K, normalizeClass as he, Fragment as pe, renderList as Se, useCssVars as ft, renderSlot as Ta } from "vue";
2
2
  import { TTypography as ge, TButton as rt, TTextInput as yn, TIconButton as bn, TSelect as lt, createTheme as _n, TThemeProvider as wn, TCheckbox as ot, useTheme as vt, TIcon as Ca, TSpinner as ka } from "toku-ui";
3
3
  import Da from "dompurify";
4
4
  const ze = (e) => typeof e == "string", Ft = (e) => ze(e) && e.includes("**"), xn = (e) => e instanceof Date, et = (e) => e.type === "checkbox", $a = (e) => e.expressionToBool !== void 0;
@@ -148,7 +148,7 @@ function Ea(e, n) {
148
148
  [["a", "z"], ["A", "Z"], "_"],
149
149
  !1,
150
150
  !1
151
- ), Z = Je("integer"), re = We([["0", "9"]], !1, !1), M = Je("decimal"), A = _e(".", !1), z = Je("string"), ee = _e("'", !1), Y = We(["'"], !0, !1), te = Je("whitespace"), oe = We([" ", " ", `
151
+ ), Z = Je("integer"), re = We([["0", "9"]], !1, !1), M = Je("decimal"), A = _e(".", !1), z = Je("string"), ee = _e("'", !1), P = We(["'"], !0, !1), te = Je("whitespace"), oe = We([" ", " ", `
152
152
  `, "\r"], !1, !1), xt = function(s, D) {
153
153
  return D.reduce(function(k, _) {
154
154
  if (_[1] === "+")
@@ -353,8 +353,8 @@ function Ea(e, n) {
353
353
  function Gt() {
354
354
  var s, D, k, _;
355
355
  if (L++, s = f, J(), e.charCodeAt(f) === 39 ? (D = T, f++) : (D = t, L === 0 && U(ee)), D !== t) {
356
- for (k = [], F.test(e.charAt(f)) ? (_ = e.charAt(f), f++) : (_ = t, L === 0 && U(Y)); _ !== t; )
357
- k.push(_), F.test(e.charAt(f)) ? (_ = e.charAt(f), f++) : (_ = t, L === 0 && U(Y));
356
+ for (k = [], F.test(e.charAt(f)) ? (_ = e.charAt(f), f++) : (_ = t, L === 0 && U(P)); _ !== t; )
357
+ k.push(_), F.test(e.charAt(f)) ? (_ = e.charAt(f), f++) : (_ = t, L === 0 && U(P));
358
358
  e.charCodeAt(f) === 39 ? (_ = T, f++) : (_ = t, L === 0 && U(ee)), _ !== t ? (ye = s, s = ra(k)) : (f = s, s = t);
359
359
  } else
360
360
  f = s, s = t;
@@ -470,9 +470,9 @@ const en = (e) => `0${e}`.slice(-2), Cn = (e) => `${e.getFullYear()}-${en(
470
470
  },
471
471
  emits: ["reset"],
472
472
  setup(e) {
473
- const n = e, t = P(
473
+ const n = e, t = Y(
474
474
  () => n.type === "error" ? n.errorMessage : n.successMessage
475
- ), a = P(
475
+ ), a = Y(
476
476
  () => n.type === "error" ? n.errorButtonLabel : n.successButtonLabel
477
477
  );
478
478
  return (r, l) => (S(), H("div", Ha, [
@@ -1009,7 +1009,7 @@ function Bt() {
1009
1009
  return dt(Vn, wa(At()));
1010
1010
  }
1011
1011
  function gr(e) {
1012
- const n = P(() => Ie(e.value) ? Ln(At(), e.value) : At(e.value));
1012
+ const n = Y(() => Ie(e.value) ? Ln(At(), e.value) : At(e.value));
1013
1013
  return ct(Vn, n), n;
1014
1014
  }
1015
1015
  function yr(e) {
@@ -1261,7 +1261,7 @@ function zr(e, {
1261
1261
  clearable: !0,
1262
1262
  range: !1,
1263
1263
  multiple: !1
1264
- }), a = ce(), r = W(null), l = P(() => t.separator || (t.range ? " ~ " : ",")), u = (C) => t.range ? Ye(C) : t.multiple ? Wr(C) : Ce(C), d = (C) => Array.isArray(C) ? C.some((h) => t.disabledDate(h)) : t.disabledDate(C), m = P(() => r.value !== null ? r.value : typeof t.renderInputText == "function" ? t.renderInputText(t.value) : u(t.value) ? Array.isArray(t.value) ? t.value.map((C) => t.formatDate(C)).join(l.value) : t.formatDate(t.value) : ""), i = (C) => {
1264
+ }), a = ce(), r = W(null), l = Y(() => t.separator || (t.range ? " ~ " : ",")), u = (C) => t.range ? Ye(C) : t.multiple ? Wr(C) : Ce(C), d = (C) => Array.isArray(C) ? C.some((h) => t.disabledDate(h)) : t.disabledDate(C), m = Y(() => r.value !== null ? r.value : typeof t.renderInputText == "function" ? t.renderInputText(t.value) : u(t.value) ? Array.isArray(t.value) ? t.value.map((C) => t.formatDate(C)).join(l.value) : t.formatDate(t.value) : ""), i = (C) => {
1265
1265
  var h;
1266
1266
  C && C.stopPropagation(), t.onChange(t.range ? [null, null] : null), (h = t.onClear) == null || h.call(t);
1267
1267
  }, c = () => {
@@ -1332,7 +1332,7 @@ function Xr(e, {
1332
1332
  confirmText: "OK"
1333
1333
  });
1334
1334
  yr(a.prefixClass), br(((t = a.formatter) == null ? void 0 : t.getWeek) || Ot);
1335
- const r = gr(_a(e, "lang")), l = W(), u = () => l.value, d = W(!1), m = P(() => !a.disabled && (typeof a.open == "boolean" ? a.open : d.value)), i = () => {
1335
+ const r = gr(_a(e, "lang")), l = W(), u = () => l.value, d = W(!1), m = Y(() => !a.disabled && (typeof a.open == "boolean" ? a.open : d.value)), i = () => {
1336
1336
  var p, b;
1337
1337
  a.disabled || m.value || (d.value = !0, (p = a["onUpdate:open"]) == null || p.call(a, !0), (b = a.onOpen) == null || b.call(a));
1338
1338
  }, c = () => {
@@ -1372,7 +1372,7 @@ function Xr(e, {
1372
1372
  default:
1373
1373
  return g(p, a.valueType);
1374
1374
  }
1375
- }, T = P(() => {
1375
+ }, T = Y(() => {
1376
1376
  const p = a.value;
1377
1377
  return a.range ? (Array.isArray(p) ? p.slice(0, 2) : [null, null]).map(C) : a.multiple ? (Array.isArray(p) ? p : []).map(C) : C(p);
1378
1378
  }), w = (p, b, o = !0) => {
@@ -1686,7 +1686,7 @@ function nl(e) {
1686
1686
  disabledDate: () => !1,
1687
1687
  getClasses: () => [],
1688
1688
  titleFormat: "YYYY-MM-DD"
1689
- }), t = P(() => (Array.isArray(n.value) ? n.value : [n.value]).filter(Ce).map(($) => n.type === "year" ? Nr($) : n.type === "month" ? cn($) : Ae($))), a = W(/* @__PURE__ */ new Date());
1689
+ }), t = Y(() => (Array.isArray(n.value) ? n.value : [n.value]).filter(Ce).map(($) => n.type === "year" ? Nr($) : n.type === "month" ? cn($) : Ae($))), a = W(/* @__PURE__ */ new Date());
1690
1690
  ve(() => {
1691
1691
  let v = n.calendar;
1692
1692
  if (!Ce(v)) {
@@ -1782,7 +1782,7 @@ function al(e) {
1782
1782
  const n = $e(e, {
1783
1783
  defaultValue: /* @__PURE__ */ new Date(),
1784
1784
  type: "date"
1785
- }), t = ce(), a = P(() => {
1785
+ }), t = ce(), a = Y(() => {
1786
1786
  let w = Array.isArray(n.defaultValue) ? n.defaultValue : [n.defaultValue, n.defaultValue];
1787
1787
  return w = w.map((v) => Ae(v)), Ye(w) ? w : [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()].map((v) => Ae(v));
1788
1788
  }), r = W([/* @__PURE__ */ new Date(NaN), /* @__PURE__ */ new Date(NaN)]);
@@ -1793,7 +1793,7 @@ function al(e) {
1793
1793
  var $;
1794
1794
  const [F, N] = r.value;
1795
1795
  Ce(F) && !Ce(N) ? (F.getTime() > w.getTime() ? r.value = [w, F] : r.value = [F, w], ($ = n["onUpdate:value"]) == null || $.call(n, r.value, v)) : r.value = [w, /* @__PURE__ */ new Date(NaN)];
1796
- }, u = W([/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()]), d = P(() => Ye(n.calendar) ? n.calendar : u.value), m = P(() => n.type === "year" ? 10 * 12 : n.type === "month" ? 1 * 12 : 1), i = (w, v) => {
1796
+ }, u = W([/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()]), d = Y(() => Ye(n.calendar) ? n.calendar : u.value), m = Y(() => n.type === "year" ? 10 * 12 : n.type === "month" ? 1 * 12 : 1), i = (w, v) => {
1797
1797
  var $;
1798
1798
  const F = jr(w[0], w[1]), N = m.value - F;
1799
1799
  if (N > 0) {
@@ -2173,7 +2173,7 @@ function jn(e) {
2173
2173
  var l;
2174
2174
  n.value = !0, (l = e.onShowTimePanelChange) == null || l.call(e, !0);
2175
2175
  };
2176
- return { timeVisible: P(() => typeof e.showTimePanel == "boolean" ? e.showTimePanel : n.value), openTimePanel: a, closeTimePanel: t };
2176
+ return { timeVisible: Y(() => typeof e.showTimePanel == "boolean" ? e.showTimePanel : n.value), openTimePanel: a, closeTimePanel: t };
2177
2177
  }
2178
2178
  function dl(e) {
2179
2179
  const n = $e(e, {
@@ -2331,17 +2331,17 @@ const gl = { class: "t-field" }, yl = ["for", "innerHTML"], bl = {
2331
2331
  },
2332
2332
  emits: ["input", "right-icon-click"],
2333
2333
  setup(e, { emit: n }) {
2334
- const t = e, a = n, r = W(!1), l = W(!1), u = P(
2334
+ const t = e, a = n, r = W(!1), l = W(!1), u = Y(
2335
2335
  () => {
2336
2336
  var T;
2337
2337
  return l.value ? "Obligatorio" : t.errorText || ((T = t.regex) == null ? void 0 : T.message);
2338
2338
  }
2339
- ), d = P(() => t.placeholder || ""), m = P(
2339
+ ), d = Y(() => t.placeholder || ""), m = Y(
2340
2340
  () => r.value ? u.value : ue(t.helperText)
2341
- ), i = P(() => {
2341
+ ), i = Y(() => {
2342
2342
  let T = "";
2343
2343
  return r.value && (T += " input-error"), T;
2344
- }), c = P(() => {
2344
+ }), c = Y(() => {
2345
2345
  let T = "t-field__helper-text";
2346
2346
  return r.value && (T += " error"), T;
2347
2347
  });
@@ -2425,7 +2425,7 @@ const Tl = /* @__PURE__ */ ke(xl, [["__scopeId", "data-v-58cf4d97"]]), Cl = { cl
2425
2425
  setup(e, { emit: n }) {
2426
2426
  const t = e, a = n, r = (x, C) => {
2427
2427
  a("input", { id: x, value: C });
2428
- }, { shouldShowField: l } = mt(), u = P(() => t.fields.filter(l)), d = P(() => {
2428
+ }, { shouldShowField: l } = mt(), u = Y(() => t.fields.filter(l)), d = Y(() => {
2429
2429
  const x = {};
2430
2430
  return u.value.forEach((C) => {
2431
2431
  x[C.name] = C.value;
@@ -2561,7 +2561,7 @@ const Fl = {
2561
2561
  },
2562
2562
  emits: ["submit-form-data", "reset", "autocomplete-subscription", "autocomplete-external-id"],
2563
2563
  setup(e, { emit: n }) {
2564
- const t = e, a = n, r = W(t.customerFields), l = W(t.invoiceFields), u = W(t.isLoading), d = W(t.submitFormStatus), m = W(t.signupCompleted), i = W(t.errorMessage), c = W(t.isAutocompleteEnabled), g = W(!t.showSendByEmail), x = P(() => [
2564
+ const t = e, a = n, r = W(t.customerFields), l = W(t.invoiceFields), u = W(t.isLoading), d = W(t.submitFormStatus), m = W(t.signupCompleted), i = W(t.errorMessage), c = W(t.isAutocompleteEnabled), g = W(!t.showSendByEmail), x = Y(() => [
2565
2565
  ...r.value,
2566
2566
  ...l.value
2567
2567
  ]), { shouldShowField: C } = mt(x), { cleanGovernmentId: h } = Tn(), T = _n({
@@ -2733,16 +2733,16 @@ const po = /* @__PURE__ */ ke(El, [["__scopeId", "data-v-7f315867"]]), Ol = { cl
2733
2733
  v3effa9a6: m.value,
2734
2734
  v04f36688: u.value
2735
2735
  }));
2736
- const a = e, r = t, l = vt(), u = P(() => l.value.colors.error), d = P(() => l.value.colors.gray.main), m = P(() => l.value.colors.gray.medium1), i = W(!1), c = W(!1), g = P(
2736
+ const a = e, r = t, l = vt(), u = Y(() => l.value.colors.error), d = Y(() => l.value.colors.gray.main), m = Y(() => l.value.colors.gray.medium1), i = W(!1), c = W(!1), g = Y(
2737
2737
  () => {
2738
2738
  var b;
2739
2739
  return c.value ? "Obligatorio" : a.errorText ?? ((b = a.regex) == null ? void 0 : b.message);
2740
2740
  }
2741
- ), x = P(() => a.placeholder || ""), C = P(
2741
+ ), x = Y(() => a.placeholder || ""), C = Y(
2742
2742
  () => i.value ? g.value : ue(a.helperText)
2743
- ), h = P(() => a.type === "number"), T = P(() => a.thousandsSeparator === "," || a.thousandsSeparator === "." ? a.thousandsSeparator : Vl), w = P(
2743
+ ), h = Y(() => a.type === "number"), T = Y(() => a.thousandsSeparator === "," || a.thousandsSeparator === "." ? a.thousandsSeparator : Vl), w = Y(
2744
2744
  () => pt(T.value)
2745
- ), v = P(() => {
2745
+ ), v = Y(() => {
2746
2746
  if (!h.value)
2747
2747
  return a.value;
2748
2748
  if (a.value === void 0 || a.value === null || a.value === "")
@@ -2853,7 +2853,7 @@ const pn = /* @__PURE__ */ ke(Bl, [["__scopeId", "data-v-70414ff4"]]), Rl = { cl
2853
2853
  r("input", { id: p, value: b });
2854
2854
  }, u = (p) => {
2855
2855
  r("blur", { id: p });
2856
- }, d = P(() => {
2856
+ }, d = Y(() => {
2857
2857
  var b;
2858
2858
  if (!((b = a.productIdsCheckboxes) != null && b.length))
2859
2859
  return !1;
@@ -2861,7 +2861,7 @@ const pn = /* @__PURE__ */ ke(Bl, [["__scopeId", "data-v-70414ff4"]]), Rl = { cl
2861
2861
  (o) => !o.disabled
2862
2862
  );
2863
2863
  return p.length ? p.every((o) => o.value === !0) : !1;
2864
- }), m = P(() => {
2864
+ }), m = Y(() => {
2865
2865
  var o;
2866
2866
  if (!((o = a.productIdsCheckboxes) != null && o.length))
2867
2867
  return !1;
@@ -2882,7 +2882,7 @@ const pn = /* @__PURE__ */ ke(Bl, [["__scopeId", "data-v-70414ff4"]]), Rl = { cl
2882
2882
  g.value.forEach((p) => {
2883
2883
  p == null || p.validate();
2884
2884
  });
2885
- }, { shouldShowField: C } = mt(), h = P(() => a.fields.filter(C)), T = P(() => {
2885
+ }, { shouldShowField: C } = mt(), h = Y(() => a.fields.filter(C)), T = Y(() => {
2886
2886
  const p = {};
2887
2887
  return h.value.forEach((b) => {
2888
2888
  p[b.name] = b.value;
@@ -3099,7 +3099,7 @@ const hn = /* @__PURE__ */ ke(eo, [["__scopeId", "data-v-6b55849a"]]), to = /* @
3099
3099
  v1d05e13c: a.value,
3100
3100
  v19b79efa: u.value
3101
3101
  }));
3102
- const n = e, t = vt(), a = P(() => t.value.colors.error), r = P(() => t.value.colors.success), l = P(() => t.value.colors.warning), u = P(() => t.value.colors.info), d = P(() => t.value.colors.inProcess), m = P(() => {
3102
+ const n = e, t = vt(), a = Y(() => t.value.colors.error), r = Y(() => t.value.colors.success), l = Y(() => t.value.colors.warning), u = Y(() => t.value.colors.info), d = Y(() => t.value.colors.inProcess), m = Y(() => {
3103
3103
  switch (n.variant) {
3104
3104
  case "success":
3105
3105
  return "check-circle";
@@ -3114,7 +3114,7 @@ const hn = /* @__PURE__ */ ke(eo, [["__scopeId", "data-v-6b55849a"]]), to = /* @
3114
3114
  default:
3115
3115
  return "information-circle";
3116
3116
  }
3117
- }), i = P(() => {
3117
+ }), i = Y(() => {
3118
3118
  switch (n.variant) {
3119
3119
  case "success":
3120
3120
  return r.value;
@@ -3175,7 +3175,7 @@ const no = /* @__PURE__ */ ke(to, [["__scopeId", "data-v-9f117c52"]]), ao = {
3175
3175
  at(() => {
3176
3176
  n.value && (t.value = n.value.offsetHeight < 260);
3177
3177
  });
3178
- const a = vt(), r = P(() => a.value.colors.gray.light2);
3178
+ const a = vt(), r = Y(() => a.value.colors.gray.light2);
3179
3179
  return (l, u) => (S(), H("div", {
3180
3180
  class: "overlay",
3181
3181
  ref_key: "overlayRef",
@@ -3244,9 +3244,9 @@ const so = /* @__PURE__ */ ke(oo, [["__scopeId", "data-v-70c61c06"]]), io = {
3244
3244
  emits: ["submit-form-data", "reset", "autocomplete-subscription", "autocomplete-external-id", "link-clicked"],
3245
3245
  setup(e, { emit: n }) {
3246
3246
  ft((M) => ({
3247
- v56a928b9: m.value,
3248
- v54734748: u.value,
3249
- v4fbcd0dc: d.value
3247
+ v2e1f4d12: m.value,
3248
+ v60478ade: u.value,
3249
+ v6cfaca1a: d.value
3250
3250
  }));
3251
3251
  const t = e, a = n, r = _n({
3252
3252
  colors: {
@@ -3254,7 +3254,7 @@ const so = /* @__PURE__ */ ke(oo, [["__scopeId", "data-v-70c61c06"]]), io = {
3254
3254
  main: t.themeColor
3255
3255
  }
3256
3256
  }
3257
- }), l = vt(), u = P(() => l.value.colors.gray.medium1), d = P(() => l.value.colors.gray.light2), m = P(() => l.value.colors.gray.main), i = (M) => M.map((A) => A.defaultOptions !== null && A.defaultOptions !== void 0 && !Array.isArray(A.defaultOptions) && typeof A.defaultOptions == "object" ? {
3257
+ }), l = vt(), u = Y(() => l.value.colors.gray.medium1), d = Y(() => l.value.colors.gray.light2), m = Y(() => l.value.colors.gray.main), i = (M) => M.map((A) => A.defaultOptions !== null && A.defaultOptions !== void 0 && !Array.isArray(A.defaultOptions) && typeof A.defaultOptions == "object" ? {
3258
3258
  ...A,
3259
3259
  defaultOptions: Object.entries(
3260
3260
  A.defaultOptions
@@ -3265,13 +3265,13 @@ const so = /* @__PURE__ */ ke(oo, [["__scopeId", "data-v-70c61c06"]]), io = {
3265
3265
  i(t.invoiceFields)
3266
3266
  ), x = W(
3267
3267
  t.checkboxes.map((M) => ({ ...M, type: "checkbox" }))
3268
- ), C = P(
3268
+ ), C = Y(
3269
3269
  () => [...c.value, ...g.value, ...x.value]
3270
- ), { shouldShowField: h } = mt(C), T = P(
3270
+ ), { shouldShowField: h } = mt(C), T = Y(
3271
3271
  () => x.value.filter(
3272
3272
  (M) => M.name === "product_ids" && h(M)
3273
3273
  )
3274
- ), w = P(
3274
+ ), w = Y(
3275
3275
  () => x.value.filter(
3276
3276
  (M) => M.name !== "product_ids" && h(M)
3277
3277
  )
@@ -3314,19 +3314,19 @@ const so = /* @__PURE__ */ ke(oo, [["__scopeId", "data-v-70c61c06"]]), io = {
3314
3314
  invoice_metadata: {},
3315
3315
  checkboxes_values: {}
3316
3316
  }, ee = x.value.filter(
3317
- (Y) => Y.name === "product_ids"
3318
- ).filter((Y) => Y.value === !0 && Y.productId).map((Y) => Y.productId);
3319
- return ee.length > 0 && (A.product_ids = ee), C.value.forEach((Y) => {
3320
- if (!((Y.relatedField || Y.expressionToBool) && !h(Y))) {
3321
- if (et(Y))
3322
- A.checkboxes_values[Y.id] = Y.value ?? !1;
3323
- else if (Y.value) {
3324
- let { value: te } = Y;
3325
- if (ze(Y.value) && Y.displayInfo && !Y.autocompleted) {
3317
+ (P) => P.name === "product_ids"
3318
+ ).filter((P) => P.value === !0 && P.productId).map((P) => P.productId);
3319
+ return ee.length > 0 && (A.product_ids = ee), C.value.forEach((P) => {
3320
+ if (!((P.relatedField || P.expressionToBool) && !h(P))) {
3321
+ if (et(P))
3322
+ A.checkboxes_values[P.id] = P.value ?? !1;
3323
+ else if (P.value) {
3324
+ let { value: te } = P;
3325
+ if (ze(P.value) && P.displayInfo && !P.autocompleted && !P.isExternalId) {
3326
3326
  const oe = qe(te, M);
3327
3327
  typeof oe == "boolean" ? te = oe ? "true" : "false" : te = oe;
3328
3328
  }
3329
- Y.name.includes("customer_metadata") ? A.customer_metadata[Y.name.replace("customer_metadata_", "")] = te : Y.name.includes("subscription_metadata") ? A.subscription_metadata[Y.name.replace("subscription_metadata_", "")] = te : Y.name.includes("invoice_metadata") ? A.invoice_metadata[Y.name.replace("invoice_metadata_", "")] = te : Y.name.includes("additional_data") ? A.additional_data[Y.name.replace("additional_data_", "")] = te : Y.name === "government_id" && t.countryIso === "CL" ? A[Y.name] = p(te, t.countryIso) : Y.name === "due_date" && xn(te) ? A[Y.name] = Cn(te) : Y.name === "product_id" ? A[Y.name] = String(te) : Y.isAccount ? A.id_account = te : A[Y.name] = te;
3329
+ P.name.includes("customer_metadata") ? A.customer_metadata[P.name.replace("customer_metadata_", "")] = te : P.name.includes("subscription_metadata") ? A.subscription_metadata[P.name.replace("subscription_metadata_", "")] = te : P.name.includes("invoice_metadata") ? A.invoice_metadata[P.name.replace("invoice_metadata_", "")] = te : P.name.includes("additional_data") ? A.additional_data[P.name.replace("additional_data_", "")] = te : P.name === "government_id" && t.countryIso === "CL" ? A[P.name] = p(te, t.countryIso) : P.name === "due_date" && xn(te) ? A[P.name] = Cn(te) : P.name === "product_id" ? A[P.name] = String(te) : P.isAccount ? A.id_account = te : A[P.name] = te;
3330
3330
  }
3331
3331
  }
3332
3332
  }), A;
@@ -3366,15 +3366,15 @@ const so = /* @__PURE__ */ ke(oo, [["__scopeId", "data-v-70c61c06"]]), io = {
3366
3366
  ])
3367
3367
  );
3368
3368
  x.value = M.map((ee) => {
3369
- const Y = {
3369
+ const P = {
3370
3370
  ...ee,
3371
3371
  type: "checkbox"
3372
- }, te = z.get(Y.id);
3372
+ }, te = z.get(P.id);
3373
3373
  return te ? {
3374
- ...Y,
3375
- value: Y.name === "product_ids" ? Y.value : te.value,
3376
- disabled: Y.disabled
3377
- } : Y;
3374
+ ...P,
3375
+ value: P.name === "product_ids" ? P.value : te.value,
3376
+ disabled: P.disabled
3377
+ } : P;
3378
3378
  });
3379
3379
  } else
3380
3380
  x.value = M.map((z) => ({
@@ -3385,7 +3385,7 @@ const so = /* @__PURE__ */ ke(oo, [["__scopeId", "data-v-70c61c06"]]), io = {
3385
3385
  { deep: !0, immediate: !1 }
3386
3386
  ), (M, A) => (S(), K(O(wn), { theme: O(r) }, {
3387
3387
  default: j(() => {
3388
- var z, ee, Y, te;
3388
+ var z, ee, P, te;
3389
3389
  return [
3390
3390
  ae("div", {
3391
3391
  class: he(["t-custom-form__layout", { "t-custom-form__layout--mobile": e.isMobile }]),
@@ -3483,7 +3483,7 @@ const so = /* @__PURE__ */ ke(oo, [["__scopeId", "data-v-70c61c06"]]), io = {
3483
3483
  "thousands-separator": e.thousandsSeparator
3484
3484
  }, null, 8, ["fields", "title", "accounts", "product-ids-checkboxes", "is-mobile", "thousands-separator"])) : q("", !0)
3485
3485
  ], 2),
3486
- (Y = e.link) != null && Y.label ? (S(), K(O(rt), {
3486
+ (P = e.link) != null && P.label ? (S(), K(O(rt), {
3487
3487
  key: 0,
3488
3488
  variant: "tertiary",
3489
3489
  class: "t-custom-form__link",
@@ -3545,7 +3545,7 @@ const so = /* @__PURE__ */ ke(oo, [["__scopeId", "data-v-70c61c06"]]), io = {
3545
3545
  }, 8, ["theme"]));
3546
3546
  }
3547
3547
  });
3548
- const ho = /* @__PURE__ */ ke(co, [["__scopeId", "data-v-ec62840a"]]);
3548
+ const ho = /* @__PURE__ */ ke(co, [["__scopeId", "data-v-c3363cac"]]);
3549
3549
  export {
3550
3550
  po as CustomForm,
3551
3551
  ho as TCustomForm