@factorialco/f0-react 1.427.1 → 1.427.3

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.
@@ -135,7 +135,9 @@ export declare type ActionBarGroup = {
135
135
 
136
136
  export declare type ActionBarItem = ActionType;
137
137
 
138
- export declare type ActionBarStatus = "idle" | "loading" | "success";
138
+ export declare type ActionBarStatus = (typeof actionBarStatuses)[number];
139
+
140
+ export declare const actionBarStatuses: readonly ["idle", "loading", "success", "error"];
139
141
 
140
142
  declare type ActionBaseProps = ActionCommonProps & DataAttributes;
141
143
 
@@ -3279,6 +3281,7 @@ declare interface F0ActionBarProps {
3279
3281
  * - "idle": Default state, shows an alert icon (pending changes)
3280
3282
  * - "loading": Shows a spinner and disables all actions
3281
3283
  * - "success": Shows a checkmark icon and disables all actions
3284
+ * - "error": Shows an error icon with persistent error styling
3282
3285
  * @default "idle"
3283
3286
  */
3284
3287
  status?: ActionBarStatus;
@@ -3,8 +3,8 @@ import { eW as WI, eV as VI, eT as UI, aE as GI, eU as KI, aJ as qI, f2 as YI, f
3
3
  import { jsx as c, jsxs as g, Fragment as re } from "react/jsx-runtime";
4
4
  import * as Sn from "react";
5
5
  import z, { PureComponent as Ep, forwardRef as P, useRef as K, useTransition as Tp, useState as R, useLayoutEffect as Ua, useContext as Hs, createContext as Ws, useCallback as J, useMemo as ee, useEffect as V, useId as Ga, useImperativeHandle as Ka, memo as qa, Fragment as Dp, isValidElement as Lp, cloneElement as Ya, Children as Ja } from "react";
6
- import { f as Yt, ac as Nn, e as tr, ad as Rp, L as wi, ae as Op, A as Mp, i as nr, k as Pp, G as Fp, g as Ro, af as zp, j as Oo, n as $p, ag as Xa, ah as Za, ai as Bp, C as jp, aa as Hp, aj as je, ak as ot, al as Ee, am as Wp, an as mr, ao as Ue, ap as Qa, aq as Me, ar as Vs, as as $e, at as Mo, au as Vp, av as ec, aw as Ie, ax as Fe, ay as In, az as Dr, aA as tc, aB as Up, aC as Wt, aD as Gp, aE as Kp, aF as qp, aG as Wn, aH as Vn, aI as Us, aJ as Yp, aK as nc, aL as rc, aM as ic, aN as Jp, aO as sc, aP as oc, aQ as lc, aR as ac, aS as cc, aT as dc, a3 as Po, aU as Xp, aV as Fo, aW as Zp, aX as Qp, aY as em, w as tm, x as nm, z as rm, J as im, K as sm, s as om, aZ as uc, a_ as lm, a$ as am, b0 as cm, b1 as fc, a7 as Ui, b2 as dm, b3 as um, b4 as fm, b5 as hm, b6 as pm, b7 as mm, b8 as gm, $ as bm, b9 as wm, ba as xm, bb as ym, bc as vm, ab as hc, M as km, N as Cm, P as Sm, Q as Nm, V as Im, O as Am, bd as zo, be as _m, bf as Em, l as Tm } from "./index-B4grzr_W.js";
7
- import { a5 as pA, W as mA, a0 as gA, R as bA, _ as wA, bj as xA, bi as yA, bg as vA, bh as kA, a4 as CA, T as SA, Z as NA, U as IA, a8 as AA, a9 as _A } from "./index-B4grzr_W.js";
6
+ import { f as Yt, ac as Nn, e as tr, ad as Rp, L as wi, ae as Op, A as Mp, i as nr, k as Pp, G as Fp, g as Ro, af as zp, j as Oo, n as $p, ag as Xa, ah as Za, ai as Bp, C as jp, aa as Hp, aj as je, ak as ot, al as Ee, am as Wp, an as mr, ao as Ue, ap as Qa, aq as Me, ar as Vs, as as $e, at as Mo, au as Vp, av as ec, aw as Ie, ax as Fe, ay as In, az as Dr, aA as tc, aB as Up, aC as Wt, aD as Gp, aE as Kp, aF as qp, aG as Wn, aH as Vn, aI as Us, aJ as Yp, aK as nc, aL as rc, aM as ic, aN as Jp, aO as sc, aP as oc, aQ as lc, aR as ac, aS as cc, aT as dc, a3 as Po, aU as Xp, aV as Fo, aW as Zp, aX as Qp, aY as em, w as tm, x as nm, z as rm, J as im, K as sm, s as om, aZ as uc, a_ as lm, a$ as am, b0 as cm, b1 as fc, a7 as Ui, b2 as dm, b3 as um, b4 as fm, b5 as hm, b6 as pm, b7 as mm, b8 as gm, $ as bm, b9 as wm, ba as xm, bb as ym, bc as vm, ab as hc, M as km, N as Cm, P as Sm, Q as Nm, V as Im, O as Am, bd as zo, be as _m, bf as Em, l as Tm } from "./index-BELt7PBQ.js";
7
+ import { a5 as pA, W as mA, a0 as gA, R as bA, _ as wA, bk as xA, bj as yA, bh as vA, bi as kA, a4 as CA, T as SA, Z as NA, U as IA, bg as AA, a8 as _A, a9 as EA } from "./index-BELt7PBQ.js";
8
8
  import './experimental.css';const Dm = hf("Search", [
9
9
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
10
10
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
@@ -22302,14 +22302,15 @@ export {
22302
22302
  As as WidgetSimpleListItem,
22303
22303
  PI as WidgetStrip,
22304
22304
  G1 as _RadarChart,
22305
+ AA as actionBarStatuses,
22305
22306
  iA as getGranularityDefinition,
22306
22307
  sA as getGranularityDefinitions,
22307
22308
  oA as getGranularitySimpleDefinition,
22308
22309
  lA as granularityDefinitions,
22309
22310
  aA as modules,
22310
- AA as predefinedPresets,
22311
+ _A as predefinedPresets,
22311
22312
  cA as rangeSeparator,
22312
- _A as selectSizes,
22313
+ EA as selectSizes,
22313
22314
  ei as useAiPromotionChat,
22314
22315
  dA as useDataCollectionData,
22315
22316
  uA as useDataCollectionSource,
package/dist/f0.js CHANGED
@@ -4,8 +4,8 @@ import { jsx as c, jsxs as O, Fragment as ht } from "react/jsx-runtime";
4
4
  import * as St from "react";
5
5
  import K, { forwardRef as nt, useRef as W, useImperativeHandle as Xd, Children as Ar, useCallback as P, useMemo as V, useState as ee, useEffect as ie, createElement as fr, isValidElement as al, Fragment as il, useLayoutEffect as Yd, createContext as Tt, memo as ol, useReducer as Jd, useContext as et, cloneElement as ef, PureComponent as tf, useId as Aa } from "react";
6
6
  import { unstable_batchedUpdates as mr, createPortal as nf, flushSync as rf } from "react-dom";
7
- import { C as sf, S as mi, a as af, f as Ss, L as Rn, b as of, A as lf, i as hr, c as ll, E as cf, g as yr, d as uf, e as df, h as ff, j as pn, k as cl, u as mf, G as hf, l as pf, m as hi, r as gf, n as vf, o as ul, p as bf, B as dl, X as fl, Y as Us, q as yf, s as ml, t as xf, v as wf, w as Sf, x as _f, y as kf, z as Cf, D as Nf, F as Df, H as pi, I as Af, J as Ff, K as Tf, M as Of, N as Ef, O as If, P as Rf, Q as Pf, V as Lf, R as Qs, T as Mf, U as jf, W as Bf, Z as hl, _ as Fa, $ as pl, a0 as Vf, a1 as $f, a2 as zf, a3 as qf, a4 as Zf, a5 as Wf, a6 as Uf } from "./index-B4grzr_W.js";
8
- import { a7 as u1, aa as d1, a8 as f1, a9 as m1, ab as h1 } from "./index-B4grzr_W.js";
7
+ import { C as sf, S as mi, a as af, f as Ss, L as Rn, b as of, A as lf, i as hr, c as ll, E as cf, g as yr, d as uf, e as df, h as ff, j as pn, k as cl, u as mf, G as hf, l as pf, m as hi, r as gf, n as vf, o as ul, p as bf, B as dl, X as fl, Y as Us, q as yf, s as ml, t as xf, v as wf, w as Sf, x as _f, y as kf, z as Cf, D as Nf, F as Df, H as pi, I as Af, J as Ff, K as Tf, M as Of, N as Ef, O as If, P as Rf, Q as Pf, V as Lf, R as Qs, T as Mf, U as jf, W as Bf, Z as hl, _ as Fa, $ as pl, a0 as Vf, a1 as $f, a2 as zf, a3 as qf, a4 as Zf, a5 as Wf, a6 as Uf } from "./index-BELt7PBQ.js";
8
+ import { a7 as u1, aa as d1, a8 as f1, a9 as m1, ab as h1 } from "./index-BELt7PBQ.js";
9
9
  import { A as g1, F as v1, c as b1, d as y1, b as x1, a as w1, o as S1, u as _1 } from "./F0HILActionConfirmation-CFsdU07x.js";
10
10
  import { defaultTranslations as C1 } from "./i18n-provider-defaults.js";
11
11
  const Qf = {
@@ -1185,10 +1185,10 @@ function Tm(e) {
1185
1185
  }));
1186
1186
  return n ? nf(d, n) : d;
1187
1187
  }
1188
- var qe;
1188
+ var Ze;
1189
1189
  (function(e) {
1190
1190
  e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
1191
- })(qe || (qe = {}));
1191
+ })(Ze || (Ze = {}));
1192
1192
  function Er() {
1193
1193
  }
1194
1194
  function vi(e, t) {
@@ -2631,7 +2631,7 @@ function Ch() {
2631
2631
  }
2632
2632
  function Nh(e, t) {
2633
2633
  switch (t.type) {
2634
- case qe.DragStart:
2634
+ case Ze.DragStart:
2635
2635
  return {
2636
2636
  ...e,
2637
2637
  draggable: {
@@ -2640,7 +2640,7 @@ function Nh(e, t) {
2640
2640
  active: t.active
2641
2641
  }
2642
2642
  };
2643
- case qe.DragMove:
2643
+ case Ze.DragMove:
2644
2644
  return e.draggable.active == null ? e : {
2645
2645
  ...e,
2646
2646
  draggable: {
@@ -2651,8 +2651,8 @@ function Nh(e, t) {
2651
2651
  }
2652
2652
  }
2653
2653
  };
2654
- case qe.DragEnd:
2655
- case qe.DragCancel:
2654
+ case Ze.DragEnd:
2655
+ case Ze.DragCancel:
2656
2656
  return {
2657
2657
  ...e,
2658
2658
  draggable: {
@@ -2668,7 +2668,7 @@ function Nh(e, t) {
2668
2668
  }
2669
2669
  }
2670
2670
  };
2671
- case qe.RegisterDroppable: {
2671
+ case Ze.RegisterDroppable: {
2672
2672
  const {
2673
2673
  element: n
2674
2674
  } = t, {
@@ -2682,7 +2682,7 @@ function Nh(e, t) {
2682
2682
  }
2683
2683
  };
2684
2684
  }
2685
- case qe.SetDroppableDisabled: {
2685
+ case Ze.SetDroppableDisabled: {
2686
2686
  const {
2687
2687
  id: n,
2688
2688
  key: r,
@@ -2702,7 +2702,7 @@ function Nh(e, t) {
2702
2702
  }
2703
2703
  };
2704
2704
  }
2705
- case qe.UnregisterDroppable: {
2705
+ case Ze.UnregisterDroppable: {
2706
2706
  const {
2707
2707
  id: n,
2708
2708
  key: r
@@ -2985,7 +2985,7 @@ const Th = /* @__PURE__ */ ol(function(t) {
2985
2985
  };
2986
2986
  mr(() => {
2987
2987
  Bt?.(On), k(Ut.Initializing), v({
2988
- type: qe.DragStart,
2988
+ type: Ze.DragStart,
2989
2989
  initialCoordinates: Qe,
2990
2990
  active: Zt
2991
2991
  }), p({
@@ -2996,12 +2996,12 @@ const Th = /* @__PURE__ */ ol(function(t) {
2996
2996
  },
2997
2997
  onMove(Qe) {
2998
2998
  v({
2999
- type: qe.DragMove,
2999
+ type: Ze.DragMove,
3000
3000
  coordinates: Qe
3001
3001
  });
3002
3002
  },
3003
- onEnd: fn(qe.DragEnd),
3004
- onCancel: fn(qe.DragCancel)
3003
+ onEnd: fn(Ze.DragEnd),
3004
+ onCancel: fn(Ze.DragCancel)
3005
3005
  });
3006
3006
  Ot.current = Et;
3007
3007
  function fn(Qe) {
@@ -3023,13 +3023,13 @@ const Th = /* @__PURE__ */ ol(function(t) {
3023
3023
  collisions: Bt,
3024
3024
  delta: En,
3025
3025
  over: On
3026
- }, Qe === qe.DragEnd && typeof In == "function" && await Promise.resolve(In(Wt)) && (Qe = qe.DragCancel);
3026
+ }, Qe === Ze.DragEnd && typeof In == "function" && await Promise.resolve(In(Wt)) && (Qe = Ze.DragCancel);
3027
3027
  }
3028
3028
  M.current = null, mr(() => {
3029
3029
  v({
3030
3030
  type: Qe
3031
3031
  }), k(Ut.Uninitialized), Ie(null), le(null), ce(null), Ot.current = null;
3032
- const In = Qe === qe.DragEnd ? "onDragEnd" : "onDragCancel";
3032
+ const In = Qe === Ze.DragEnd ? "onDragEnd" : "onDragCancel";
3033
3033
  if (Wt) {
3034
3034
  const ys = te.current[In];
3035
3035
  ys?.(Wt), p({
@@ -3316,7 +3316,7 @@ function Lh(e) {
3316
3316
  !b || !k.current || (b.disconnect(), f.current = !1, b.observe(k.current));
3317
3317
  }, [k, b]), ie(
3318
3318
  () => (o({
3319
- type: qe.RegisterDroppable,
3319
+ type: Ze.RegisterDroppable,
3320
3320
  element: {
3321
3321
  id: r,
3322
3322
  key: a,
@@ -3326,7 +3326,7 @@ function Lh(e) {
3326
3326
  data: _
3327
3327
  }
3328
3328
  }), () => o({
3329
- type: qe.UnregisterDroppable,
3329
+ type: Ze.UnregisterDroppable,
3330
3330
  key: a,
3331
3331
  id: r
3332
3332
  })),
@@ -3334,7 +3334,7 @@ function Lh(e) {
3334
3334
  [r]
3335
3335
  ), ie(() => {
3336
3336
  n !== d.current.disabled && (o({
3337
- type: qe.SetDroppableDisabled,
3337
+ type: Ze.SetDroppableDisabled,
3338
3338
  id: r,
3339
3339
  key: a,
3340
3340
  disabled: n
@@ -6840,9 +6840,9 @@ function Sg(e) {
6840
6840
  return !1;
6841
6841
  return !0;
6842
6842
  }
6843
- function ze(e, t) {
6843
+ function qe(e, t) {
6844
6844
  const n = Array.isArray(t) ? t : za(t) ? [t] : bc(t), r = n.length === 1 ? e : wg(e, n), s = n.length - 1, a = n[s];
6845
- return r && delete r[a], s !== 0 && (Be(r) && at(r) || Array.isArray(r) && Sg(r)) && ze(e, n.slice(0, -1)), e;
6845
+ return r && delete r[a], s !== 0 && (Be(r) && at(r) || Array.isArray(r) && Sg(r)) && qe(e, n.slice(0, -1)), e;
6846
6846
  }
6847
6847
  var Fs = () => {
6848
6848
  let e = [];
@@ -6947,7 +6947,7 @@ function Zi(e, t, n) {
6947
6947
  name: n
6948
6948
  };
6949
6949
  }
6950
- var Dg = (e, t, n, r, s) => s.isOnAll ? !1 : !n && s.isOnTouch ? !(t || e) : (n ? r.isOnBlur : s.isOnBlur) ? !e : (n ? r.isOnChange : s.isOnChange) ? e : !0, Ag = (e, t) => !cs(H(e, t)).length && ze(e, t);
6950
+ var Dg = (e, t, n, r, s) => s.isOnAll ? !1 : !n && s.isOnTouch ? !(t || e) : (n ? r.isOnBlur : s.isOnBlur) ? !e : (n ? r.isOnChange : s.isOnChange) ? e : !0, Ag = (e, t) => !cs(H(e, t)).length && qe(e, t);
6951
6951
  const Fg = {
6952
6952
  mode: Dt.onSubmit,
6953
6953
  reValidateMode: Dt.onChange,
@@ -7005,7 +7005,7 @@ function Tg(e = {}) {
7005
7005
  }
7006
7006
  }, v = (y, A) => {
7007
7007
  !t.disabled && (d.isValidating || d.validatingFields) && ((y || Array.from(o.mount)).forEach((T) => {
7008
- T && (A ? Ne(n.validatingFields, T, A) : ze(n.validatingFields, T));
7008
+ T && (A ? Ne(n.validatingFields, T, A) : qe(n.validatingFields, T));
7009
7009
  }), f.state.next({
7010
7010
  validatingFields: n.validatingFields,
7011
7011
  isValidating: !at(n.validatingFields)
@@ -7058,7 +7058,7 @@ function Tg(e = {}) {
7058
7058
  if (!T || Z) {
7059
7059
  d.isDirty && (re = n.isDirty, n.isDirty = de.isDirty = N(), L = re !== de.isDirty);
7060
7060
  const _e = Ee || Gt(H(s, y), A);
7061
- re = !!(!Ee && H(n.dirtyFields, y)), _e || Ee ? ze(n.dirtyFields, y) : Ne(n.dirtyFields, y, !0), de.dirtyFields = n.dirtyFields, L = L || d.dirtyFields && re !== !_e;
7061
+ re = !!(!Ee && H(n.dirtyFields, y)), _e || Ee ? qe(n.dirtyFields, y) : Ne(n.dirtyFields, y, !0), de.dirtyFields = n.dirtyFields, L = L || d.dirtyFields && re !== !_e;
7062
7062
  }
7063
7063
  if (T) {
7064
7064
  const _e = H(n.touchedFields, y);
@@ -7069,7 +7069,7 @@ function Tg(e = {}) {
7069
7069
  return L ? de : {};
7070
7070
  }, _ = (y, A, T, Z) => {
7071
7071
  const j = H(n.errors, y), L = d.isValid && wt(A) && n.isValid !== A;
7072
- if (t.delayError && T ? (l = w(() => b(y, T)), l(t.delayError)) : (clearTimeout(u), l = null, T ? Ne(n.errors, y, T) : ze(n.errors, y)), (T ? !Gt(j, T) : j) || !at(Z) || L) {
7072
+ if (t.delayError && T ? (l = w(() => b(y, T)), l(t.delayError)) : (clearTimeout(u), l = null, T ? Ne(n.errors, y, T) : qe(n.errors, y)), (T ? !Gt(j, T) : j) || !at(Z) || L) {
7073
7073
  const re = {
7074
7074
  ...Z,
7075
7075
  ...L && wt(A) ? { isValid: A } : {},
@@ -7090,7 +7090,7 @@ function Tg(e = {}) {
7090
7090
  if (y)
7091
7091
  for (const T of y) {
7092
7092
  const Z = H(A, T);
7093
- Z ? Ne(n.errors, T, Z) : ze(n.errors, T);
7093
+ Z ? Ne(n.errors, T, Z) : qe(n.errors, T);
7094
7094
  }
7095
7095
  else
7096
7096
  n.errors = A;
@@ -7108,7 +7108,7 @@ function Tg(e = {}) {
7108
7108
  const _e = await zi(j, o.disabled, a, x, t.shouldUseNativeValidation && !A, de);
7109
7109
  if (Ee && d.validatingFields && v([Z]), _e[L.name] && (T.valid = !1, A))
7110
7110
  break;
7111
- !A && (H(_e, L.name) ? de ? xg(n.errors, _e, L.name) : Ne(n.errors, L.name, _e[L.name]) : ze(n.errors, L.name));
7111
+ !A && (H(_e, L.name) ? de ? xg(n.errors, _e, L.name) : Ne(n.errors, L.name, _e[L.name]) : qe(n.errors, L.name));
7112
7112
  }
7113
7113
  !at(re) && await F(re, A, T);
7114
7114
  }
@@ -7209,7 +7209,7 @@ function Tg(e = {}) {
7209
7209
  isValidating: !!H(n.validatingFields, y),
7210
7210
  isTouched: !!H((A || n).touchedFields, y)
7211
7211
  }), $ = (y) => {
7212
- y && Un(y).forEach((A) => ze(n.errors, A)), f.state.next({
7212
+ y && Un(y).forEach((A) => qe(n.errors, A)), f.state.next({
7213
7213
  errors: y ? n.errors : {}
7214
7214
  });
7215
7215
  }, fe = (y, A, T) => {
@@ -7227,7 +7227,7 @@ function Tg(e = {}) {
7227
7227
  next: (T) => y(E(void 0, A), T)
7228
7228
  }) : E(y, A, !0), ae = (y, A = {}) => {
7229
7229
  for (const T of y ? Un(y) : o.mount)
7230
- o.mount.delete(T), o.array.delete(T), A.keepValue || (ze(r, T), ze(a, T)), !A.keepError && ze(n.errors, T), !A.keepDirty && ze(n.dirtyFields, T), !A.keepTouched && ze(n.touchedFields, T), !A.keepIsValidating && ze(n.validatingFields, T), !t.shouldUnregister && !A.keepDefaultValue && ze(s, T);
7230
+ o.mount.delete(T), o.array.delete(T), A.keepValue || (qe(r, T), qe(a, T)), !A.keepError && qe(n.errors, T), !A.keepDirty && qe(n.dirtyFields, T), !A.keepTouched && qe(n.touchedFields, T), !A.keepIsValidating && qe(n.validatingFields, T), !t.shouldUnregister && !A.keepDefaultValue && qe(s, T);
7231
7231
  f.values.next({
7232
7232
  values: { ...a }
7233
7233
  }), f.state.next({
@@ -7308,7 +7308,7 @@ function Tg(e = {}) {
7308
7308
  n.errors = L, j = re;
7309
7309
  } else
7310
7310
  await F(r);
7311
- if (ze(n.errors, "root"), at(n.errors)) {
7311
+ if (qe(n.errors, "root"), at(n.errors)) {
7312
7312
  f.state.next({
7313
7313
  errors: {}
7314
7314
  });
@@ -7328,7 +7328,7 @@ function Tg(e = {}) {
7328
7328
  }), Z)
7329
7329
  throw Z;
7330
7330
  }, De = (y, A = {}) => {
7331
- H(r, y) && (je(A.defaultValue) ? G(y, st(H(s, y))) : (G(y, A.defaultValue), Ne(s, y, st(A.defaultValue))), A.keepTouched || ze(n.touchedFields, y), A.keepDirty || (ze(n.dirtyFields, y), n.isDirty = A.defaultValue ? N(y, st(H(s, y))) : N()), A.keepError || (ze(n.errors, y), d.isValid && g()), f.state.next({ ...n }));
7331
+ H(r, y) && (je(A.defaultValue) ? G(y, st(H(s, y))) : (G(y, A.defaultValue), Ne(s, y, st(A.defaultValue))), A.keepTouched || qe(n.touchedFields, y), A.keepDirty || (qe(n.dirtyFields, y), n.isDirty = A.defaultValue ? N(y, st(H(s, y))) : N()), A.keepError || (qe(n.errors, y), d.isValid && g()), f.state.next({ ...n }));
7332
7332
  }, Te = (y, A = {}) => {
7333
7333
  const T = y ? st(y) : s, Z = st(T), j = at(y), L = j ? s : Z;
7334
7334
  if (A.keepDefaultValues || (s = T), !A.keepValues) {
@@ -16055,7 +16055,7 @@ function Nu({
16055
16055
  );
16056
16056
  return /* @__PURE__ */ c(Cu.Provider, { value: R, children: t });
16057
16057
  }
16058
- function Ze() {
16058
+ function ze() {
16059
16059
  const e = et(Cu);
16060
16060
  if (!e)
16061
16061
  throw new Error(
@@ -16086,7 +16086,7 @@ function Tn() {
16086
16086
  };
16087
16087
  }
16088
16088
  const ni = () => {
16089
- const { isQuestionTypeAllowed: e } = Ze(), { t } = Fe();
16089
+ const { isQuestionTypeAllowed: e } = ze(), { t } = Fe();
16090
16090
  return [
16091
16091
  {
16092
16092
  label: t("surveyFormBuilder.questionTypes.rating"),
@@ -16159,7 +16159,7 @@ const ni = () => {
16159
16159
  file: Sa,
16160
16160
  checkbox: Yr
16161
16161
  }, Zy = () => {
16162
- const { disabled: e, answering: t, onAddNewElement: n } = Ze(), r = ni(), { t: s } = Fe(), a = (l) => {
16162
+ const { disabled: e, answering: t, onAddNewElement: n } = ze(), r = ni(), { t: s } = Fe(), a = (l) => {
16163
16163
  n?.({
16164
16164
  type: l
16165
16165
  });
@@ -16241,7 +16241,7 @@ function Au() {
16241
16241
  deleteElement: n,
16242
16242
  onDuplicateElement: r,
16243
16243
  disallowOptionalQuestions: s
16244
- } = Ze(), a = ni();
16244
+ } = ze(), a = ni();
16245
16245
  return { getActionsForQuestion: P(
16246
16246
  (o, l, u) => {
16247
16247
  const d = t(o), f = Uy(l, d);
@@ -16483,7 +16483,7 @@ function Xy({
16483
16483
  ] });
16484
16484
  }
16485
16485
  function dn(e) {
16486
- const { answering: t, getSectionContainingQuestion: n } = Ze(), r = n(e.id), s = e.locked || r?.locked;
16486
+ const { answering: t, getSectionContainingQuestion: n } = ze(), r = n(e.id), s = e.locked || r?.locked;
16487
16487
  return t ? !1 : s || !0;
16488
16488
  }
16489
16489
  const So = {
@@ -16504,7 +16504,7 @@ const So = {
16504
16504
  answering: d,
16505
16505
  getIsSingleQuestionInSection: f,
16506
16506
  getSectionContainingQuestion: h
16507
- } = Ze(), m = h(e), x = m?.locked || a, w = !!m, [g, v] = ee(!1), [p, b] = ee(!1), { isDragging: C } = Tn(), { t: k } = Fe(), S = (G) => {
16507
+ } = ze(), m = h(e), x = m?.locked || a, w = !!m, [g, v] = ee(!1), [p, b] = ee(!1), { isDragging: C } = Tn(), { t: k } = Fe(), S = (G) => {
16508
16508
  o?.({
16509
16509
  id: e,
16510
16510
  type: i,
@@ -16671,7 +16671,7 @@ const So = {
16671
16671
  label: t,
16672
16672
  ...n
16673
16673
  }) => {
16674
- const { onQuestionChange: r, answering: s, disabled: a } = Ze(), i = dn(n), { t: o } = Fe();
16674
+ const { onQuestionChange: r, answering: s, disabled: a } = ze(), i = dn(n), { t: o } = Fe();
16675
16675
  if (s)
16676
16676
  return /* @__PURE__ */ c(Me, { ...n, children: /* @__PURE__ */ c("div", { className: "px-0.5", children: /* @__PURE__ */ c(
16677
16677
  Gn,
@@ -16719,7 +16719,7 @@ const So = {
16719
16719
  value: e,
16720
16720
  ...t
16721
16721
  }) => {
16722
- const { onQuestionChange: n } = Ze(), r = dn(t), { t: s } = Fe(), a = {
16722
+ const { onQuestionChange: n } = ze(), r = dn(t), { t: s } = Fe(), a = {
16723
16723
  id: t.id,
16724
16724
  type: "date",
16725
16725
  label: s("surveyFormBuilder.answer.label"),
@@ -16745,7 +16745,7 @@ const So = {
16745
16745
  options: e,
16746
16746
  ...t
16747
16747
  }) => {
16748
- const { onQuestionChange: n, answering: r } = Ze(), s = dn(t), { t: a } = Fe(), i = V(
16748
+ const { onQuestionChange: n, answering: r } = ze(), s = dn(t), { t: a } = Fe(), i = V(
16749
16749
  () => e.map((u) => ({ value: u.value, label: u.label })),
16750
16750
  [e]
16751
16751
  ), o = a("surveyFormBuilder.answer.dropdownPlaceholder"), l = V(
@@ -16815,7 +16815,7 @@ const So = {
16815
16815
  maxSizeMB: r,
16816
16816
  ...s
16817
16817
  }) => {
16818
- const { onQuestionChange: a, useUpload: i } = Ze(), o = dn(s), { t: l } = Fe(), u = t ?? i, d = {
16818
+ const { onQuestionChange: a, useUpload: i } = ze(), o = dn(s), { t: l } = Fe(), u = t ?? i, d = {
16819
16819
  id: s.id,
16820
16820
  type: "file",
16821
16821
  label: l("surveyFormBuilder.answer.label"),
@@ -16844,7 +16844,7 @@ const So = {
16844
16844
  value: e,
16845
16845
  ...t
16846
16846
  }) => {
16847
- const { t: n } = Fe(), { onQuestionChange: r, answering: s } = Ze(), a = dn(t), i = n("surveyFormBuilder.answer.linkPlaceholder"), o = {
16847
+ const { t: n } = Fe(), { onQuestionChange: r, answering: s } = ze(), a = dn(t), i = n("surveyFormBuilder.answer.linkPlaceholder"), o = {
16848
16848
  id: t.id,
16849
16849
  type: "text",
16850
16850
  inputType: "url",
@@ -16872,7 +16872,7 @@ const So = {
16872
16872
  value: e,
16873
16873
  ...t
16874
16874
  }) => {
16875
- const { t: n } = Fe(), { onQuestionChange: r, answering: s } = Ze(), a = dn(t), i = (l) => {
16875
+ const { t: n } = Fe(), { onQuestionChange: r, answering: s } = ze(), a = dn(t), i = (l) => {
16876
16876
  r?.({
16877
16877
  ...t,
16878
16878
  type: "numeric",
@@ -16979,7 +16979,7 @@ const So = {
16979
16979
  value: t,
16980
16980
  ...n
16981
16981
  }) => {
16982
- const { onQuestionChange: r, disabled: s, answering: a } = Ze(), o = ku(e) === "emojis", l = (d) => {
16982
+ const { onQuestionChange: r, disabled: s, answering: a } = ze(), o = ku(e) === "emojis", l = (d) => {
16983
16983
  r?.({
16984
16984
  id: n.id,
16985
16985
  value: d,
@@ -17162,7 +17162,7 @@ const ux = {
17162
17162
  disabled: r,
17163
17163
  answering: s,
17164
17164
  getSectionContainingQuestion: a
17165
- } = Ze(), i = new Set(e.map((g) => g.value)).size !== e.length, o = a(t.id), l = t.locked || o?.locked, { t: u } = Fe(), d = V(
17165
+ } = ze(), i = new Set(e.map((g) => g.value)).size !== e.length, o = a(t.id), l = t.locked || o?.locked, { t: u } = Fe(), d = V(
17166
17166
  () => ({
17167
17167
  id: t.id,
17168
17168
  type: t.type,
@@ -17292,7 +17292,7 @@ const ux = {
17292
17292
  value: e,
17293
17293
  ...t
17294
17294
  }) => {
17295
- const { onQuestionChange: n, answering: r } = Ze(), s = dn(t), { t: a } = Fe(), i = a("surveyFormBuilder.answer.textPlaceholder"), o = V(
17295
+ const { onQuestionChange: n, answering: r } = ze(), s = dn(t), { t: a } = Fe(), i = a("surveyFormBuilder.answer.textPlaceholder"), o = V(
17296
17296
  () => t.type === "text" ? {
17297
17297
  id: t.id,
17298
17298
  type: "text",
@@ -17366,7 +17366,7 @@ const ux = {
17366
17366
  showEndOfSection: t,
17367
17367
  className: n
17368
17368
  }) => {
17369
- const { isDragging: r, setIsDragging: s, setDraggedItemId: a, draggedItemId: i } = Tn(), o = Da(), { disabled: l, answering: u, getSectionContainingQuestion: d } = Ze(), f = d(e.question.id), h = !!f && i === f.id, m = () => {
17369
+ const { isDragging: r, setIsDragging: s, setDraggedItemId: a, draggedItemId: i } = Tn(), o = Da(), { disabled: l, answering: u, getSectionContainingQuestion: d } = ze(), f = d(e.question.id), h = !!f && i === f.id, m = () => {
17370
17370
  s(!0), a(e.question.id);
17371
17371
  }, x = () => {
17372
17372
  s(!1), a(null);
@@ -17422,7 +17422,7 @@ const ux = {
17422
17422
  }
17423
17423
  );
17424
17424
  }, px = ({ question: e }) => {
17425
- const { isDragging: t, setIsDragging: n, setDraggedItemId: r } = Tn(), s = Da(), { disabled: a, answering: i, getSectionContainingQuestion: o } = Ze(), l = o(e.id), u = () => {
17425
+ const { isDragging: t, setIsDragging: n, setDraggedItemId: r } = Tn(), s = Da(), { disabled: a, answering: i, getSectionContainingQuestion: o } = ze(), l = o(e.id), u = () => {
17426
17426
  n(!0), r(e.id);
17427
17427
  }, d = () => {
17428
17428
  n(!1), r(null);
@@ -17487,7 +17487,7 @@ const ux = {
17487
17487
  answering: l,
17488
17488
  deleteElement: u,
17489
17489
  onDuplicateElement: d
17490
- } = Ze(), [f, h] = ee(!1), { t: m } = Fe(), x = V(
17490
+ } = ze(), [f, h] = ee(!1), { t: m } = Fe(), x = V(
17491
17491
  () => ({
17492
17492
  id: e,
17493
17493
  title: t,
@@ -17619,7 +17619,7 @@ const ux = {
17619
17619
  item: e,
17620
17620
  className: t
17621
17621
  }) => {
17622
- const { isDragging: n, setIsDragging: r, setDraggedItemId: s, draggedItemId: a } = Tn(), i = Da(), { disabled: o, answering: l } = Ze(), u = a === e.section.id, d = () => {
17622
+ const { isDragging: n, setIsDragging: r, setDraggedItemId: s, draggedItemId: a } = Tn(), i = Da(), { disabled: o, answering: l } = ze(), u = a === e.section.id, d = () => {
17623
17623
  r(!0), s(e.section.id);
17624
17624
  }, f = () => {
17625
17625
  r(!1), s(null);
@@ -17682,7 +17682,7 @@ const ux = {
17682
17682
  questionOptionsLabel: l,
17683
17683
  requiredLabel: u,
17684
17684
  questionTypeLabel: d
17685
- } = t, { deleteElement: f, onDuplicateElement: h, disabled: m, answering: x } = Ze(), { getActionsForQuestion: w, questionTypes: g } = Au(), v = P((b) => {
17685
+ } = t, { deleteElement: f, onDuplicateElement: h, disabled: m, answering: x } = ze(), { getActionsForQuestion: w, questionTypes: g } = Au(), v = P((b) => {
17686
17686
  yx(b);
17687
17687
  }, []), p = P(
17688
17688
  (b, C, k) => {
@@ -17865,7 +17865,7 @@ const Ou = ({
17865
17865
  onChange: t,
17866
17866
  answering: n
17867
17867
  }) => {
17868
- const { t: r } = Fe(), { portalContainer: s } = et(Ad), a = xx(e, {
17868
+ const { t: r } = Fe(), { disabled: s } = ze(), { portalContainer: a } = et(Ad), i = xx(e, {
17869
17869
  untitledSectionLabel: r("surveyFormBuilder.labels.sectionTitlePlaceholder"),
17870
17870
  untitledQuestionLabel: r("surveyFormBuilder.labels.titlePlaceholder"),
17871
17871
  duplicateQuestionLabel: r("surveyFormBuilder.actions.duplicateQuestion"),
@@ -17875,23 +17875,23 @@ const Ou = ({
17875
17875
  questionOptionsLabel: r("surveyFormBuilder.labels.questionOptions"),
17876
17876
  requiredLabel: r("surveyFormBuilder.labels.required"),
17877
17877
  questionTypeLabel: r("surveyFormBuilder.labels.questionType")
17878
- }), i = P(
17879
- (o) => {
17880
- t(wx(o, e));
17878
+ }), o = P(
17879
+ (l) => {
17880
+ t(wx(l, e));
17881
17881
  },
17882
17882
  [e, t]
17883
17883
  );
17884
17884
  return /* @__PURE__ */ c("div", { className: "sticky left-0 top-1/2 z-10 hidden h-0 -translate-y-12 px-2 @3xl:block", children: /* @__PURE__ */ c(
17885
17885
  Su,
17886
17886
  {
17887
- items: a,
17887
+ items: i,
17888
17888
  barsAlign: "left",
17889
17889
  size: "md",
17890
17890
  collapsible: !0,
17891
17891
  showChildrenCounter: !0,
17892
- sortable: !n,
17893
- onReorder: i,
17894
- portalContainer: s
17892
+ sortable: !n && !s,
17893
+ onReorder: o,
17894
+ portalContainer: a
17895
17895
  }
17896
17896
  ) });
17897
17897
  };