@levo-so/studio 0.3.24 → 0.3.26

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,5 +1,5 @@
1
1
  "use client";
2
- import { r as e } from "./dist-IMRD6dob.js";
2
+ import { r as e } from "./dist-vBo7O9cF.js";
3
3
  import { r as t } from "./useLogin-BYVekOp9.js";
4
4
  import { t as n } from "./card-BIebVDA0.js";
5
5
  import { t as r } from "./MessageFooter-DrlKXE9a.js";
@@ -8,7 +8,7 @@ var s = {
8
8
  title: "_title_s7k8g_7",
9
9
  subtitle: "_subtitle_s7k8g_14",
10
10
  formWrapper: "_formWrapper_s7k8g_20"
11
- }, c = r(() => import("./PendingApprovalCard-5iFAeE1s.js")), l = ({ logo: r, siteName: l, page: u }) => {
11
+ }, c = r(() => import("./PendingApprovalCard-BjSHrAHA.js")), l = ({ logo: r, siteName: l, page: u }) => {
12
12
  let [d, f] = i(!1), [p, m] = i(!1), h = u.access?.find((e) => e.kind === "gating" && e.enabled)?.options;
13
13
  return p ? /* @__PURE__ */ a(n, {
14
14
  fallback: /* @__PURE__ */ a("div", {}),
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { r as e } from "./dist-IMRD6dob.js";
2
+ import { r as e } from "./dist-vBo7O9cF.js";
3
3
  import { t } from "./card-BIebVDA0.js";
4
4
  import { t as n } from "./MessageFooter-DrlKXE9a.js";
5
5
  import { useState as r } from "react";
@@ -1,7 +1,7 @@
1
1
  import { D as e, a as t, c as n, r, s as i } from "./price-BUDkN5Me.js";
2
2
  import { n as a, t as o } from "./fontSize-DowUyWe-.js";
3
3
  import { a as s, i as c, t as l } from "./inlineRteTheme-DFg69bqP.js";
4
- import { a as u, i as d, l as f, n as p, o as m, r as h, u as g } from "./PopupDialog-DwAAJ8JS-9xm5jrXW.js";
4
+ import { a as u, i as d, l as f, n as p, o as m, r as h, u as g } from "./PopupDialog-DwAAJ8JS-1gMlHxwM.js";
5
5
  import { c as _ } from "react/compiler-runtime";
6
6
  import { LevoProvider as v } from "@levo-so/react";
7
7
  import { Suspense as y, lazy as b, useMemo as x, useState as S } from "react";
@@ -73,7 +73,7 @@ var Q = [
73
73
  ...r,
74
74
  children: a
75
75
  }) : null;
76
- }, te = /* @__PURE__ */ g({ PopupBody: () => oe }), ne = b(() => import("./dist-IMRD6dob.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = l({ baseSpacing: ".625rem" }), ie = { style: r({ form: { gap: "1rem" } }) }, ae = {
76
+ }, te = /* @__PURE__ */ g({ PopupBody: () => oe }), ne = b(() => import("./dist-vBo7O9cF.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = l({ baseSpacing: ".625rem" }), ie = { style: r({ form: { gap: "1rem" } }) }, ae = {
77
77
  left: p,
78
78
  center: d,
79
79
  right: f
@@ -172,7 +172,7 @@ var R = Object.defineProperty, z = (e, t) => {
172
172
  ...a,
173
173
  children: r
174
174
  }), n[15] = r, n[16] = a, n[17] = _, n[18] = v) : v = n[18], v;
175
- }, ce = y(() => import("./PopupBody-DWM55Zh5-DuOPsCAn.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), le = (e) => {
175
+ }, ce = y(() => import("./PopupBody-DWM55Zh5-DsryJsq8.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), le = (e) => {
176
176
  let t = g(7), { size: n } = e, r = n ?? "medium", i;
177
177
  t[0] === r ? i = t[1] : (i = U({ size: r }), t[0] = r, t[1] = i);
178
178
  let a, o, s;
@@ -1,5 +1,5 @@
1
1
  import { c as e, f as t, l as n } from "./themeMapping-DH_NoXK8-H-EHXbBt.js";
2
- import { c as r, r as i, s as a, t as o, u as s } from "./PopupDialog-DwAAJ8JS-9xm5jrXW.js";
2
+ import { c as r, r as i, s as a, t as o, u as s } from "./PopupDialog-DwAAJ8JS-1gMlHxwM.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { $activity as l, $isIdentityContextReady as u, $pageLifecycle as d, $scrollBehavior as f, $session as p, getTabCount as m } from "@levo-so/insights/stores";
5
5
  import { useLevo as h, useLevoInsights as g } from "@levo-so/react";
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { c as e } from "./dist-IMRD6dob.js";
2
+ import { c as e } from "./dist-vBo7O9cF.js";
3
3
  import { r as t } from "./useLogin-BYVekOp9.js";
4
4
  import { t as n } from "./Spinner-LdYfm4S7.js";
5
5
  import { t as r } from "./card-BIebVDA0.js";
package/collection.d.ts CHANGED
@@ -72,6 +72,8 @@ declare interface ICommonRendererProps {
72
72
  settings?: {
73
73
  enableVerification?: boolean;
74
74
  };
75
+ /** Rides along in record/array renderers' props so overrides reach nested fields too. */
76
+ widgets?: Partial<IWidgetRegistry>;
75
77
  }
76
78
 
77
79
  export declare interface IFormBuilderProps extends ILevoFormContext {
package/collection.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o } from "./dist-IMRD6dob.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o } from "./dist-vBo7O9cF.js";
2
2
  export { t as CollectionForm, a as CollectionFormBuilder, r as CollectionFormRenderer, n as FormBuilder, i as LevoFormProvider, e as useLevoForm, o as useLevoFormContext };
@@ -981,7 +981,7 @@ var Fe = Object.defineProperty, Ie = (e, t) => {
981
981
  id: m,
982
982
  value: w ? Cn : g ? n?.isMulti ? i?.filter((e) => g?.includes(e?.value)) : i?.find((e) => e?.value === g) : null,
983
983
  onChange: (e) => {
984
- O && e?.value === Cn.value && e?.label === Cn.label ? (T(!0), C(""), v("")) : (T(!1), n?.isMulti ? v(e?.map((e) => e?.value)) : v(e?.value));
984
+ O && e?.value === Cn.value && e?.label === Cn.label ? (T(!0), C(""), v("")) : (T(!1), n?.isMulti ? v(e?.map((e) => e?.value)) : v(e?.value ?? null));
985
985
  },
986
986
  onBlur: () => _(),
987
987
  options: i,
@@ -1958,7 +1958,7 @@ var zr = "_156u72w0", Br = "_156u72w1", Vr = (e) => Array.isArray(e) && e.every(
1958
1958
  field_key: e.key || void 0,
1959
1959
  field_label: e.label || void 0
1960
1960
  } : void 0, A = (e) => {
1961
- _(i ? e : e?.[0]);
1961
+ _(i ? e : e?.[0] ?? null);
1962
1962
  }, j = async (e) => {
1963
1963
  let t = new FormData(), n = i ? e : e.slice(0, 1);
1964
1964
  if (n.length !== 0) {
@@ -2158,39 +2158,41 @@ var zr = "_156u72w0", Br = "_156u72w1", Vr = (e) => Array.isArray(e) && e.every(
2158
2158
  children: [g, v]
2159
2159
  }), n[22] = g, n[23] = v, n[24] = y) : y = n[24], y;
2160
2160
  }, Xr = (e) => {
2161
- let t = O(16), n, r;
2161
+ let t = O(18), n, r;
2162
2162
  t[0] === e ? (n = t[1], r = t[2]) : ({widgets: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
2163
2163
  let i = dt(n.schema, n.field), { field_interface: a, key: o, hidden: s } = i, c = a === void 0 ? "" : a;
2164
2164
  if (!c || !(o !== void 0 && o) || s) return null;
2165
2165
  switch (c) {
2166
2166
  case q.ArrayWidget: {
2167
2167
  let e;
2168
- return t[3] !== i || t[4] !== n ? (e = /* @__PURE__ */ G(Vt, {
2168
+ return t[3] !== i || t[4] !== n || t[5] !== r ? (e = /* @__PURE__ */ G(Vt, {
2169
2169
  ...n,
2170
+ widgets: r,
2170
2171
  field: i
2171
- }), t[3] = i, t[4] = n, t[5] = e) : e = t[5], e;
2172
+ }), t[3] = i, t[4] = n, t[5] = r, t[6] = e) : e = t[6], e;
2172
2173
  }
2173
2174
  case q.RecordWidget: {
2174
2175
  let e;
2175
- return t[6] !== i || t[7] !== n ? (e = /* @__PURE__ */ G(Yr, {
2176
+ return t[7] !== i || t[8] !== n || t[9] !== r ? (e = /* @__PURE__ */ G(Yr, {
2176
2177
  ...n,
2178
+ widgets: r,
2177
2179
  field: i
2178
- }), t[6] = i, t[7] = n, t[8] = e) : e = t[8], e;
2180
+ }), t[7] = i, t[8] = n, t[9] = r, t[10] = e) : e = t[10], e;
2179
2181
  }
2180
2182
  case q.CollectionWidget: {
2181
2183
  let e;
2182
- return t[9] !== i || t[10] !== n ? (e = /* @__PURE__ */ G(mn, {
2184
+ return t[11] !== i || t[12] !== n ? (e = /* @__PURE__ */ G(mn, {
2183
2185
  ...n,
2184
2186
  field: i
2185
- }), t[9] = i, t[10] = n, t[11] = e) : e = t[11], e;
2187
+ }), t[11] = i, t[12] = n, t[13] = e) : e = t[13], e;
2186
2188
  }
2187
2189
  default: {
2188
2190
  let e;
2189
- return t[12] !== i || t[13] !== n || t[14] !== r ? (e = /* @__PURE__ */ G(Jr, {
2191
+ return t[14] !== i || t[15] !== n || t[16] !== r ? (e = /* @__PURE__ */ G(Jr, {
2190
2192
  widgets: r,
2191
2193
  ...n,
2192
2194
  field: i
2193
- }), t[12] = i, t[13] = n, t[14] = r, t[15] = e) : e = t[15], e;
2195
+ }), t[14] = i, t[15] = n, t[16] = r, t[17] = e) : e = t[17], e;
2194
2196
  }
2195
2197
  }
2196
2198
  };
@@ -2892,17 +2894,7 @@ var Yi = "_1vist8m0", Xi = (e) => {
2892
2894
  className: i,
2893
2895
  children: "Create new"
2894
2896
  }), t[2] = i, t[3] = a), a;
2895
- }, Zi = "zx38wb0", Qi = (e) => {
2896
- let t = O(5), { children: n, className: r } = e, { uiConfig: i } = _i();
2897
- if (i?.hideSectionHeadings) return null;
2898
- let a;
2899
- t[0] === r ? a = t[1] : (a = Z(Zi, r), t[0] = r, t[1] = a);
2900
- let o;
2901
- return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */ G("h3", {
2902
- className: a,
2903
- children: n
2904
- }), t[2] = n, t[3] = a, t[4] = o) : o = t[4], o;
2905
- }, $i = "q22d794", ea = "q22d795", ta = "q22d796", na = "q22d797", ra = "q22d798", ia = 5, aa = "Thank you!", oa = "Your response has been submitted successfully.", sa = () => {
2897
+ }, Zi = "q22d794", Qi = "q22d795", $i = "q22d796", ea = "q22d797", ta = "q22d798", na = 5, ra = "Thank you!", ia = "Your response has been submitted successfully.", aa = () => {
2906
2898
  let e = O(1), t;
2907
2899
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ K("svg", {
2908
2900
  xmlns: "http://www.w3.org/2000/svg",
@@ -2914,8 +2906,8 @@ var Yi = "_1vist8m0", Xi = (e) => {
2914
2906
  strokeLinejoin: "round",
2915
2907
  children: [/* @__PURE__ */ G("title", { children: "Check Icon" }), /* @__PURE__ */ G("path", { d: "M20 6 9 17l-5-5" })]
2916
2908
  }), e[0] = t) : t = e[0], t;
2917
- }, ca = ({ onDismiss: e }) => {
2918
- let { successConfig: t, schema: r } = _i(), i = r?.settings?.success_message, [a, o] = U(ia), s = (e) => !e || e.replace(/<[^>]*>/g, "").trim() === "", c = t?.title || i?.title || aa, l = t?.message || i?.message, u = s(l) ? oa : l, d = t?.action || i?.action, f = d?.type ?? "none", p = f === "redirect" ? d?.value : void 0, m = (() => {
2909
+ }, oa = ({ onDismiss: e }) => {
2910
+ let { successConfig: t, schema: r } = _i(), i = r?.settings?.success_message, [a, o] = U(na), s = (e) => !e || e.replace(/<[^>]*>/g, "").trim() === "", c = t?.title || i?.title || ra, l = t?.message || i?.message, u = s(l) ? ia : l, d = t?.action || i?.action, f = d?.type ?? "none", p = f === "redirect" ? d?.value : void 0, m = (() => {
2919
2911
  let e = p?.trim();
2920
2912
  if (e && !e.startsWith("//")) {
2921
2913
  if (e.startsWith("/")) return e;
@@ -2936,20 +2928,20 @@ var Yi = "_1vist8m0", Xi = (e) => {
2936
2928
  m && (window.location.href = m);
2937
2929
  }, [m]);
2938
2930
  return /* @__PURE__ */ G("div", {
2939
- className: $i,
2931
+ className: Zi,
2940
2932
  children: /* @__PURE__ */ K("div", {
2941
- className: ea,
2933
+ className: Qi,
2942
2934
  children: [
2943
2935
  /* @__PURE__ */ G("div", {
2944
- className: ta,
2945
- children: /* @__PURE__ */ G(sa, {})
2936
+ className: $i,
2937
+ children: /* @__PURE__ */ G(aa, {})
2946
2938
  }),
2947
2939
  /* @__PURE__ */ G("h2", {
2948
- className: na,
2940
+ className: ea,
2949
2941
  children: c
2950
2942
  }),
2951
2943
  /* @__PURE__ */ G("div", {
2952
- className: ra,
2944
+ className: ta,
2953
2945
  dangerouslySetInnerHTML: { __html: u }
2954
2946
  }),
2955
2947
  f === "submit_another" && /* @__PURE__ */ G("div", {
@@ -2980,14 +2972,14 @@ var Yi = "_1vist8m0", Xi = (e) => {
2980
2972
  ]
2981
2973
  })
2982
2974
  });
2983
- }, la = (e) => {
2975
+ }, sa = (e) => {
2984
2976
  let t = O(29), { isError: n, contentId: r, publishedId: i, getContentId: a, allFormValues: o } = e, { collection: s } = M(), { schema: c, isLoggedIn: l, preview: u } = _i(), { formState: d } = le(), f = ue(), p;
2985
2977
  t[0] !== s || t[1] !== r || t[2] !== a || t[3] !== n || t[4] !== l || t[5] !== u || t[6] !== i || t[7] !== c?.allow_draft || t[8] !== c?.key ? (p = (e) => {
2986
2978
  u || i || c?.key && !n && c?.allow_draft && (l ? r ? s.editDraftEntry(c?.key, r, e).then((e) => {
2987
2979
  e?.content?.data?._id && a(e?.content?.data?._id);
2988
- }).catch(ua) : s.saveDraftEntry(c?.key, e).then((e) => {
2980
+ }).catch(ca) : s.saveDraftEntry(c?.key, e).then((e) => {
2989
2981
  e?.content?.data?._id && a(e?.content?.data?._id);
2990
- }).catch(da) : xi(c?.key, e));
2982
+ }).catch(la) : xi(c?.key, e));
2991
2983
  }, t[0] = s, t[1] = r, t[2] = a, t[3] = n, t[4] = l, t[5] = u, t[6] = i, t[7] = c?.allow_draft, t[8] = c?.key, t[9] = p) : p = t[9];
2992
2984
  let m = Pe(p, 100), { isDirty: h, isSubmitting: g, isSubmitSuccessful: _ } = d, v;
2993
2985
  t[10] !== o || t[11] !== m || t[12] !== f || t[13] !== h || t[14] !== n || t[15] !== _ || t[16] !== g || t[17] !== u ? (v = () => {
@@ -3015,15 +3007,47 @@ var Yi = "_1vist8m0", Xi = (e) => {
3015
3007
  u
3016
3008
  ], t[19] = r, t[20] = f, t[21] = h, t[22] = n, t[23] = l, t[24] = _, t[25] = g, t[26] = u, t[27] = i, t[28] = y) : y = t[28], B(v, y), null;
3017
3009
  };
3018
- function ua() {
3010
+ function ca() {
3019
3011
  console.error("saving entry failed");
3020
3012
  }
3021
- function da() {
3013
+ function la() {
3022
3014
  console.error("saving entry failed");
3023
3015
  }
3024
3016
  //#endregion
3025
3017
  //#region ../../libraries/react-collection/dist/lib/variants/DefaultFormVariant/DefaultFormVariant.cssm.js
3026
- var fa = "fil1ri0", pa = "fil1ri1", ma = "fil1ri2", ha = "fil1ri5", ga = () => {
3018
+ var ua = "fil1ri0", da = "fil1ri1", fa = "zx38wb0", pa = (e) => {
3019
+ let t = O(5), { children: n, className: r } = e, { uiConfig: i } = _i();
3020
+ if (i?.hideSectionHeadings) return null;
3021
+ let a;
3022
+ t[0] === r ? a = t[1] : (a = Z(fa, r), t[0] = r, t[1] = a);
3023
+ let o;
3024
+ return t[2] !== n || t[3] !== a ? (o = /* @__PURE__ */ G("h3", {
3025
+ className: a,
3026
+ children: n
3027
+ }), t[2] = n, t[3] = a, t[4] = o) : o = t[4], o;
3028
+ }, ma = "_1hdk5oz0", ha = "_1hdk5oz1", ga = (e) => {
3029
+ let t = O(12), { schema: n, section: r, widgets: i, enableVerification: a } = e;
3030
+ if (!ft(n, r)) return null;
3031
+ let o;
3032
+ t[0] === r ? o = t[1] : (o = r?.label && /* @__PURE__ */ G(pa, { children: r.label }), t[0] = r, t[1] = o);
3033
+ let s;
3034
+ t[2] !== a || t[3] !== n || t[4] !== r?.fields || t[5] !== i ? (s = r?.fields?.map((e) => /* @__PURE__ */ G(Xr, {
3035
+ field: e,
3036
+ widgets: i,
3037
+ schema: n,
3038
+ settings: { enableVerification: a }
3039
+ }, e?.key)), t[2] = a, t[3] = n, t[4] = r?.fields, t[5] = i, t[6] = s) : s = t[6];
3040
+ let c;
3041
+ t[7] === s ? c = t[8] : (c = /* @__PURE__ */ G("div", {
3042
+ className: ha,
3043
+ children: s
3044
+ }), t[7] = s, t[8] = c);
3045
+ let l;
3046
+ return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */ K("div", {
3047
+ className: ma,
3048
+ children: [o, c]
3049
+ }), t[9] = o, t[10] = c, t[11] = l) : l = t[11], l;
3050
+ }, _a = () => {
3027
3051
  let e = O(51), { schema: t, containerStyles: r, submitButtonConfig: i, isDisabled: a, widgets: o, disableCaptcha: s, debug: c, enableVerification: l } = _i(), u;
3028
3052
  e[0] === t ? u = e[1] : (u = { schema: t }, e[0] = t, e[1] = u);
3029
3053
  let { methods: d, isError: f, isLoading: p, contentId: m, publishedId: h, handleContentId: g, submitToRemote: _, allFormValues: v, showSuccessOverlay: y, dismissSuccessOverlay: b } = Ci(u), { handleSubmit: x, watch: S, formState: C } = d, { isSubmitting: w } = C, T;
@@ -3037,12 +3061,12 @@ var fa = "fil1ri0", pa = "fil1ri1", ma = "fil1ri2", ha = "fil1ri5", ga = () => {
3037
3061
  let A = k;
3038
3062
  if (y) {
3039
3063
  let t;
3040
- return e[9] === b ? t = e[10] : (t = /* @__PURE__ */ G(ca, { onDismiss: b }), e[9] = b, e[10] = t), t;
3064
+ return e[9] === b ? t = e[10] : (t = /* @__PURE__ */ G(oa, { onDismiss: b }), e[9] = b, e[10] = t), t;
3041
3065
  }
3042
3066
  let j;
3043
3067
  e[11] === c ? j = e[12] : (j = c && /* @__PURE__ */ G(Ui, {}), e[11] = c, e[12] = j);
3044
3068
  let M = m || "", N = h || "", P;
3045
- e[13] !== v || e[14] !== g || e[15] !== f || e[16] !== M || e[17] !== N ? (P = /* @__PURE__ */ G(la, {
3069
+ e[13] !== v || e[14] !== g || e[15] !== f || e[16] !== M || e[17] !== N ? (P = /* @__PURE__ */ G(sa, {
3046
3070
  getContentId: g,
3047
3071
  isError: f,
3048
3072
  contentId: M,
@@ -3050,13 +3074,13 @@ var fa = "fil1ri0", pa = "fil1ri1", ma = "fil1ri2", ha = "fil1ri5", ga = () => {
3050
3074
  allFormValues: v
3051
3075
  }), e[13] = v, e[14] = g, e[15] = f, e[16] = M, e[17] = N, e[18] = P) : P = e[18];
3052
3076
  let F;
3053
- e[19] === r ? F = e[20] : (F = Z(fa, r), e[19] = r, e[20] = F);
3077
+ e[19] === r ? F = e[20] : (F = Z(ua, r), e[19] = r, e[20] = F);
3054
3078
  let I;
3055
3079
  e[21] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ G(Xi, {}), e[21] = I) : I = e[21];
3056
- let L = p && "fil1ri3", R;
3057
- e[22] === L ? R = e[23] : (R = Z(pa, L), e[22] = L, e[23] = R);
3080
+ let L = p && "fil1ri2", R;
3081
+ e[22] === L ? R = e[23] : (R = Z(da, L), e[22] = L, e[23] = R);
3058
3082
  let z;
3059
- e[24] !== l || e[25] !== t || e[26] !== o ? (z = t?.sections?.map((e) => /* @__PURE__ */ G(_a, {
3083
+ e[24] !== l || e[25] !== t || e[26] !== o ? (z = t?.sections?.map((e) => /* @__PURE__ */ G(ga, {
3060
3084
  schema: t,
3061
3085
  section: e,
3062
3086
  widgets: o,
@@ -3066,7 +3090,7 @@ var fa = "fil1ri0", pa = "fil1ri1", ma = "fil1ri2", ha = "fil1ri5", ga = () => {
3066
3090
  e[28] === s ? B = e[29] : (B = !s && /* @__PURE__ */ G(Vi, {}), e[28] = s, e[29] = B);
3067
3091
  let V;
3068
3092
  e[30] !== E || e[31] !== a || e[32] !== w || e[33] !== i?.show || e[34] !== i?.styles || e[35] !== i?.text ? (V = i?.show && /* @__PURE__ */ G("div", {
3069
- className: "fil1ri4",
3093
+ className: "fil1ri3",
3070
3094
  children: /* @__PURE__ */ G(n, {
3071
3095
  className: i?.styles,
3072
3096
  disabled: a || w,
@@ -3099,28 +3123,6 @@ var fa = "fil1ri0", pa = "fil1ri1", ma = "fil1ri2", ha = "fil1ri5", ga = () => {
3099
3123
  U
3100
3124
  ]
3101
3125
  }), e[46] = d, e[47] = U, e[48] = j, e[49] = P, e[50] = W) : W = e[50], W;
3102
- }, _a = (e) => {
3103
- let t = O(12), { schema: n, section: r, widgets: i, enableVerification: a } = e;
3104
- if (!ft(n, r)) return null;
3105
- let o;
3106
- t[0] === r ? o = t[1] : (o = r?.label && /* @__PURE__ */ G(Qi, { children: r.label }), t[0] = r, t[1] = o);
3107
- let s;
3108
- t[2] !== a || t[3] !== n || t[4] !== r?.fields || t[5] !== i ? (s = r?.fields?.map((e) => /* @__PURE__ */ G(Xr, {
3109
- field: e,
3110
- widgets: i,
3111
- schema: n,
3112
- settings: { enableVerification: a }
3113
- }, e?.key)), t[2] = a, t[3] = n, t[4] = r?.fields, t[5] = i, t[6] = s) : s = t[6];
3114
- let c;
3115
- t[7] === s ? c = t[8] : (c = /* @__PURE__ */ G("div", {
3116
- className: ha,
3117
- children: s
3118
- }), t[7] = s, t[8] = c);
3119
- let l;
3120
- return t[9] !== o || t[10] !== c ? (l = /* @__PURE__ */ K("div", {
3121
- className: ma,
3122
- children: [o, c]
3123
- }), t[9] = o, t[10] = c, t[11] = l) : l = t[11], l;
3124
3126
  }, va = "_1kah2gz0", ya = "_1kah2gz1", ba = "_1kah2gz3", xa = (e) => {
3125
3127
  let t = O(12), { totalSteps: n, currentStepIndex: r, hasLevoErrors: i } = e, { formState: a } = le(), { errors: o } = a, s = Object.keys(o || {}).length > 0 || i, c = Math.floor((r + 1) * 100 / n), l = s && "_1kah2gz2", u;
3126
3128
  t[0] === l ? u = t[1] : (u = Z(ya, l), t[0] = l, t[1] = u);
@@ -3226,10 +3228,10 @@ var fa = "fil1ri0", pa = "fil1ri1", ma = "fil1ri2", ha = "fil1ri5", ga = () => {
3226
3228
  ], e[32] = C, e[33] = y, e[34] = W, e[35] = oe, e[36] = Q) : (oe = e[35], Q = e[36]), B(oe, Q), !r || l.length === 0) return null;
3227
3229
  if (R) {
3228
3230
  let t;
3229
- return e[37] === z ? t = e[38] : (t = /* @__PURE__ */ G(ca, { onDismiss: z }), e[37] = z, e[38] = t), t;
3231
+ return e[37] === z ? t = e[38] : (t = /* @__PURE__ */ G(oa, { onDismiss: z }), e[37] = z, e[38] = t), t;
3230
3232
  }
3231
3233
  let se = J || L, ce = F || "", le = I || "", ue;
3232
- e[39] !== P || e[40] !== M || e[41] !== N || e[42] !== ce || e[43] !== le ? (ue = /* @__PURE__ */ G(la, {
3234
+ e[39] !== P || e[40] !== M || e[41] !== N || e[42] !== ce || e[43] !== le ? (ue = /* @__PURE__ */ G(sa, {
3233
3235
  getContentId: M,
3234
3236
  isError: N,
3235
3237
  contentId: ce,
@@ -3239,7 +3241,7 @@ var fa = "fil1ri0", pa = "fil1ri1", ma = "fil1ri2", ha = "fil1ri5", ga = () => {
3239
3241
  let de;
3240
3242
  e[45] === Symbol.for("react.memo_cache_sentinel") ? (de = /* @__PURE__ */ G(Xi, { className: Ta }), e[45] = de) : de = e[45];
3241
3243
  let pe = C?.sectionLabel, me;
3242
- e[46] === pe ? me = e[47] : (me = /* @__PURE__ */ G(Qi, {
3244
+ e[46] === pe ? me = e[47] : (me = /* @__PURE__ */ G(pa, {
3243
3245
  className: wa,
3244
3246
  children: pe
3245
3247
  }), e[46] = pe, e[47] = me);
@@ -3431,10 +3433,10 @@ var ka = "zlgzzn0", Aa = "zlgzzn1", ja = "zlgzznb", Ma = "zlgzznc", Na = (e, t)
3431
3433
  ], e[47] = g, e[48] = S, e[49] = y, e[50] = J, e[51] = de) : de = e[51], B(ue, de), !r || l.length === 0) return null;
3432
3434
  if (V) {
3433
3435
  let t;
3434
- return e[52] === H ? t = e[53] : (t = /* @__PURE__ */ G(ca, { onDismiss: H }), e[52] = H, e[53] = t), t;
3436
+ return e[52] === H ? t = e[53] : (t = /* @__PURE__ */ G(oa, { onDismiss: H }), e[52] = H, e[53] = t), t;
3435
3437
  }
3436
3438
  let pe = ee || z || ne === "verifying" && C, me = L || "", he = R || "", ge;
3437
- e[54] !== I || e[55] !== P || e[56] !== F || e[57] !== me || e[58] !== he ? (ge = /* @__PURE__ */ G(la, {
3439
+ e[54] !== I || e[55] !== P || e[56] !== F || e[57] !== me || e[58] !== he ? (ge = /* @__PURE__ */ G(sa, {
3438
3440
  getContentId: P,
3439
3441
  isError: F,
3440
3442
  contentId: me,
@@ -3444,7 +3446,7 @@ var ka = "zlgzzn0", Aa = "zlgzzn1", ja = "zlgzznb", Ma = "zlgzznc", Na = (e, t)
3444
3446
  let _e;
3445
3447
  e[60] === Symbol.for("react.memo_cache_sentinel") ? (_e = /* @__PURE__ */ G(Xi, { className: Ma }), e[60] = _e) : _e = e[60];
3446
3448
  let ve = S?.label, ye;
3447
- e[61] === ve ? ye = e[62] : (ye = /* @__PURE__ */ G(Qi, {
3449
+ e[61] === ve ? ye = e[62] : (ye = /* @__PURE__ */ G(pa, {
3448
3450
  className: ja,
3449
3451
  children: ve
3450
3452
  }), e[61] = ve, e[62] = ye);
@@ -3633,10 +3635,10 @@ var La = "_1f3ynb50", Ra = "_1f3ynb54", za = "_1f3ynb55", Ba = (e, t) => e?.sect
3633
3635
  y
3634
3636
  ], t[30] = y, t[31] = _, t[32] = z, t[33] = te, t[34] = ne) : (te = t[33], ne = t[34]), B(ne, te), I) {
3635
3637
  let e;
3636
- return t[35] === L ? e = t[36] : (e = /* @__PURE__ */ G(ca, { onDismiss: L }), t[35] = L, t[36] = e), e;
3638
+ return t[35] === L ? e = t[36] : (e = /* @__PURE__ */ G(oa, { onDismiss: L }), t[35] = L, t[36] = e), e;
3637
3639
  }
3638
3640
  let re = W || J === "verifying" && S, ie = N || "", oe = P || "", Q;
3639
- t[37] !== F || t[38] !== j || t[39] !== M || t[40] !== ie || t[41] !== oe ? (Q = /* @__PURE__ */ G(la, {
3641
+ t[37] !== F || t[38] !== j || t[39] !== M || t[40] !== ie || t[41] !== oe ? (Q = /* @__PURE__ */ G(sa, {
3640
3642
  getContentId: j,
3641
3643
  isError: M,
3642
3644
  contentId: ie,
@@ -3648,7 +3650,7 @@ var La = "_1f3ynb50", Ra = "_1f3ynb54", za = "_1f3ynb55", Ba = (e, t) => e?.sect
3648
3650
  let le;
3649
3651
  t[46] === Symbol.for("react.memo_cache_sentinel") ? (le = /* @__PURE__ */ G(Xi, {}), t[46] = le) : le = t[46];
3650
3652
  let ue = y?.label || "Details", de;
3651
- t[47] === ue ? de = t[48] : (de = /* @__PURE__ */ G(Qi, { children: /* @__PURE__ */ G("span", { children: ue }) }), t[47] = ue, t[48] = de);
3653
+ t[47] === ue ? de = t[48] : (de = /* @__PURE__ */ G(pa, { children: /* @__PURE__ */ G("span", { children: ue }) }), t[47] = ue, t[48] = de);
3652
3654
  let fe;
3653
3655
  t[49] !== y?.fields || t[50] !== h || t[51] !== u || t[52] !== m ? (fe = y?.fields?.map((e) => e && !e.hidden ? /* @__PURE__ */ G(Xr, {
3654
3656
  field: e,
@@ -3727,7 +3729,7 @@ var Ka = (e) => {
3727
3729
  let s;
3728
3730
  t[5] === n ? s = t[6] : (s = /* @__PURE__ */ G(F, {
3729
3731
  fallback: o,
3730
- children: G(n === "single-field" ? Da : n === "steps" ? Va : n === "steps-2" ? Pa : ga, {})
3732
+ children: G(n === "single-field" ? Da : n === "steps" ? Va : n === "steps-2" ? Pa : _a, {})
3731
3733
  }), t[5] = n, t[6] = s);
3732
3734
  let c;
3733
3735
  return t[7] !== a || t[8] !== n || t[9] !== r || t[10] !== s ? (c = /* @__PURE__ */ G(gi, {
package/index.d.ts CHANGED
@@ -1231,6 +1231,8 @@ declare interface ICommonRendererProps {
1231
1231
  settings?: {
1232
1232
  enableVerification?: boolean;
1233
1233
  };
1234
+ /** Rides along in record/array renderers' props so overrides reach nested fields too. */
1235
+ widgets?: Partial<IWidgetRegistry>;
1234
1236
  }
1235
1237
 
1236
1238
  /**
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { l as e, r as t } from "./dist-IMRD6dob.js";
2
+ import { l as e, r as t } from "./dist-vBo7O9cF.js";
3
3
  import { r as n } from "./price-BUDkN5Me.js";
4
4
  import { c as r, d as i, f as a, h as o, i as s, o as c, t as l, u } from "./themeMapping-DH_NoXK8-H-EHXbBt.js";
5
5
  import { n as d, r as f, t as p } from "./useLogin-BYVekOp9.js";
@@ -83,7 +83,7 @@ import { FlagImage as Yn, defaultCountries as Xn, parseCountry as Zn } from "rea
83
83
  var Qn = async (e, t) => {
84
84
  let n = {};
85
85
  return t?.site_id && (n.site_id = t.site_id), t?.locale && (n.locale = t.locale), t?.country && (n.country = t.country), (await e.url("/v1/studio/popup/list-active").query(n).get().json())?.content?.data ?? [];
86
- }, $n = M(() => import("./PopupRenderer-BVtV4b9I-BdPryfLY.js").then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), er = (e) => {
86
+ }, $n = M(() => import("./PopupRenderer-BVtV4b9I-IVW7SyIb.js").then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), er = (e) => {
87
87
  let t = k(9), { siteId: n, pageId: r } = e, { fetch: i, logger: o } = A(), [s, c] = L(null), l = I(!1), u, d;
88
88
  if (t[0] !== i || t[1] !== o || t[2] !== n ? (u = () => {
89
89
  if (l.current) return;
@@ -4147,7 +4147,7 @@ var Co = ({ site: e }) => {
4147
4147
  siteSlug: e?.slug,
4148
4148
  siteName: e?.name
4149
4149
  })] });
4150
- }, wo = { loadingContainer: "_loadingContainer_1d4on_1" }, To = M(() => import("./LoginCard-BVjeN1J0.js")), Eo = M(() => import("./EntryCard-CZfljZAY.js")), Do = M(() => import("./MessageCard-B5MbVDJ8.js")), Oo = M(() => import("./ProfileCard-WgFT-T4U.js")), ko = {
4150
+ }, wo = { loadingContainer: "_loadingContainer_1d4on_1" }, To = M(() => import("./LoginCard-BuJtu8Qi.js")), Eo = M(() => import("./EntryCard-CkmYAlSr.js")), Do = M(() => import("./MessageCard-B5MbVDJ8.js")), Oo = M(() => import("./ProfileCard-BiCPzk3n.js")), ko = {
4151
4151
  "authentication.NOT_LOGGED_IN": ({ logo: e, siteName: t, page: n }) => /* @__PURE__ */ z(de, {
4152
4152
  fallback: /* @__PURE__ */ z("div", {}),
4153
4153
  children: /* @__PURE__ */ z(To, {
@@ -6726,7 +6726,7 @@ var kl = X(Sl), Al = pe(({ children: e, className: t, elementKey: n, generatedCl
6726
6726
  children: [/* @__PURE__ */ z(fl, { backgroundVideo: a?.backgroundVideo }), e]
6727
6727
  }));
6728
6728
  Al.displayName = "BaseContainer";
6729
- var jl = X(Al), Ml = M(() => import("./dist-IMRD6dob.js").then((e) => e.t).then((e) => ({ default: e.CollectionForm }))), Nl = X(({ elementKey: e, generatedClassName: t, config: n, className: r, initialValues: i, theme: a, onSubmit: o, isLoading: s }) => /* @__PURE__ */ z("div", {
6729
+ var jl = X(Al), Ml = M(() => import("./dist-vBo7O9cF.js").then((e) => e.t).then((e) => ({ default: e.CollectionForm }))), Nl = X(({ elementKey: e, generatedClassName: t, config: n, className: r, initialValues: i, theme: a, onSubmit: o, isLoading: s }) => /* @__PURE__ */ z("div", {
6730
6730
  "data-levo_element_key": e,
6731
6731
  className: C(r, t),
6732
6732
  children: /* @__PURE__ */ z(de, {
@@ -6748,7 +6748,7 @@ var jl = X(Al), Ml = M(() => import("./dist-IMRD6dob.js").then((e) => e.t).then(
6748
6748
  isLoading: s
6749
6749
  })
6750
6750
  })
6751
- })), Pl = M(() => import("./dist-IMRD6dob.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormRenderer }))), Fl = X(({ elementKey: e, generatedClassName: t, config: r, className: i, initialValues: a, theme: s }) => {
6751
+ })), Pl = M(() => import("./dist-vBo7O9cF.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormRenderer }))), Fl = X(({ elementKey: e, generatedClassName: t, config: r, className: i, initialValues: a, theme: s }) => {
6752
6752
  let { workspace: c, isLoggedIn: l, isAuthLoaded: u } = f(), d = F(() => {
6753
6753
  if (!r?.theme && !s) return;
6754
6754
  let e = r?.theme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levo-so/studio",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "author": "Levo Engineering <devs@theinternetfolks.com>",
5
5
  "description": "Levo Studio components and utilities for building block-based pages",
6
6
  "type": "module",
@@ -108,7 +108,7 @@
108
108
  "libphonenumber-js": "1.12.31",
109
109
  "lucide-react": "0.575.0",
110
110
  "motion": "12.23.12",
111
- "radix-ui": "1.4.3",
111
+ "radix-ui": "1.7.0",
112
112
  "react-day-picker": "9.14.0",
113
113
  "react-icons": "5.2.1",
114
114
  "react-international-phone": "4.6.0",
@@ -120,9 +120,9 @@
120
120
  "yup": "1.7.1"
121
121
  },
122
122
  "peerDependencies": {
123
- "@levo-so/insights": "0.3.24",
124
- "@levo-so/core": "0.3.24",
125
- "@levo-so/react": "0.3.24",
123
+ "@levo-so/insights": "0.3.26",
124
+ "@levo-so/core": "0.3.26",
125
+ "@levo-so/react": "0.3.26",
126
126
  "react": ">=19",
127
127
  "next": ">=14",
128
128
  "react-dom": ">=19"