@factorialco/f0-react 15.1.0 → 16.1.0
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.
- package/dist/{ArchiveThumbnail-CMOY3hug.js → ArchiveThumbnail-BRDRbsJ6.js} +1 -1
- package/dist/{ArchiveViewer-Bc5iN2gm.js → ArchiveViewer-BeSsY6iL.js} +2 -2
- package/dist/{ChatPostComposerDialog-NOdBRHQW.js → ChatPostComposerDialog-DphlBKTu.js} +2 -2
- package/dist/{CoachmarkProvider-CQE9J_S1.js → CoachmarkProvider-i1d6b_We.js} +21881 -21873
- package/dist/{CodeThumbnail-JLPjPSHE.js → CodeThumbnail-DsZdLZyi.js} +1 -1
- package/dist/{CodeViewer-HhRZ_KtU.js → CodeViewer-CqJUf6Qc.js} +4 -4
- package/dist/{DocumentToolbar-C3YeGLiY.js → DocumentToolbar-_ENhRsXU.js} +4 -4
- package/dist/{DocxViewer-B_pUywX2.js → DocxViewer-DJpRHNoo.js} +1 -1
- package/dist/{F0AiProcessingOverlay-CreyUmNt.js → F0AiProcessingOverlay-ChpomyZU.js} +1109 -1108
- package/dist/{F0Alert-Dfw9wvmG.js → F0Alert-Br1ytekS.js} +3 -3
- package/dist/F0AudioPlayer-OGv5WPST.js +2 -0
- package/dist/{F0Button-Hs9dD3kp.js → F0Button-BCWiHDDV.js} +5 -19
- package/dist/{F0CanvasPanel-QAikAHrt.js → F0CanvasPanel-sui4AhZR.js} +7331 -7350
- package/dist/{F0DocumentViewer-DtBBvHeY.js → F0DocumentViewer-CnWBEUZY.js} +2 -2
- package/dist/{F0DocumentViewer-BBZNZzXF.js → F0DocumentViewer-Jbml8b5g.js} +1 -1
- package/dist/{F0Map-DrGsOz1c.js → F0Map-dh_qX-yp.js} +46 -46
- package/dist/{F0Select-D8elfH2c.js → F0Select-CPIJ4yN6.js} +4 -4
- package/dist/{F0Text-BdLMC6rw.js → F0Text-MqvXgPpZ.js} +1 -1
- package/dist/{F0VideoPlayer-mLzBl6O5.js → F0VideoPlayer-B4XbzPFW.js} +23 -23
- package/dist/F0VideoPlayer-KY4KPEF4.js +1 -0
- package/dist/{HtmlThumbnail-C2fHnIU5.js → HtmlThumbnail-RLEVY9G9.js} +1 -1
- package/dist/{HtmlViewer-CNHsP0_Q.js → HtmlViewer-qEqTDcvl.js} +6 -6
- package/dist/{LayoutGroup-B5tU1ztA.js → LayoutGroup-Bc1Iudo_.js} +1 -1
- package/dist/{Map-Cfzh4DYS.js → Map-KB40H67k.js} +9 -9
- package/dist/{PdfThumbnail-BhMepsUK.js → PdfThumbnail-BNUBnoZl.js} +1 -1
- package/dist/{PdfViewer-CL30Vr4B.js → PdfViewer-C7ZgxDg-.js} +8 -8
- package/dist/{SandboxedHtmlFrame-QjmWXSV-.js → SandboxedHtmlFrame-BNNZgkcF.js} +1 -1
- package/dist/{SheetViewer-Cs_vLeh4.js → SheetViewer-95DeSviP.js} +3 -3
- package/dist/{TextViewer-CGoMovpP.js → TextViewer-xTlKKzFD.js} +2 -2
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +2 -2
- package/dist/component-status.js +5 -27
- package/dist/{dist-DpAd2wW2.js → dist-BEGjI3Xp.js} +4 -4
- package/dist/{dist-CJIEhLuL.js → dist-BKmw8oWk.js} +1 -1
- package/dist/{dist-CQSuXDpA.js → dist-Bdbhtnvl.js} +1 -1
- package/dist/{dist-DVsrUl0U.js → dist-CAC7X0BZ.js} +1 -1
- package/dist/{dist-C8J2FPJo.js → dist-DFNqqmLn.js} +1 -1
- package/dist/experimental.d.ts +14 -14
- package/dist/experimental.js +3632 -3463
- package/dist/{exports-BSI98RKf.d.ts → exports-BCwj4qmp.d.ts} +1 -1
- package/dist/f0.d.ts +3 -3
- package/dist/f0.js +729 -729
- package/dist/{highlight-DUGKJ8WM.js → highlight-DKymZz5X.js} +1 -1
- package/dist/{index-CeGTmQfe.d.ts → index-DyzQfXF1.d.ts} +4 -4
- package/dist/{maplibre-iSstWV_1.js → maplibre-Z3vYx0dg.js} +1 -1
- package/dist/{pdfWorker-DwNAnhfp.js → pdfWorker-Bk2BQcyn.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{toolbarStyles-DGCICoyx.js → toolbarStyles-CDHbnt8G.js} +1 -1
- package/dist/{types-Brch_2zb.d.ts → types-D1p-rbhL.d.ts} +1 -1
- package/dist/{useData-D4FE64eT.js → useData-BtGI0HO3.js} +2 -2
- package/package.json +1 -1
- package/tailwind.config.ts +3 -3
- package/dist/F0AudioPlayer-BqKZE5cb.js +0 -2
- package/dist/F0VideoPlayer-BzehPrsz.js +0 -1
package/dist/f0.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
|
-
import { $ as t, $n as n, $r as r,
|
|
3
|
-
import { a as R, i as
|
|
4
|
-
import { n as
|
|
5
|
-
import { A as
|
|
6
|
-
import { E as
|
|
7
|
-
import { $c as
|
|
8
|
-
import { A as fa, B as pa, C as ma, D as ha, E as ga, F as _a, I as va, L as ya, M as ba, N as xa, O as Sa, P as Ca, R as wa, S as Ta, T as Ea, _ as Da, a as Oa, b as ka, c as Aa, d as ja, f as Ma, g as Na, h as Pa, i as Fa, j as Ia, k as La, l as Ra, m as za, n as Ba, o as Va, p as Ha, r as Ua, s as Wa, t as Ga, u as Ka, v as qa, w as Ja, x as Ya, y as Xa, z as Za } from "./F0AiProcessingOverlay-
|
|
2
|
+
import { $ as t, $n as n, $r as r, A as i, An as a, Ar as o, Bn as s, C as c, Cn as l, Cr as u, D as d, Dn as f, Dr as p, E as m, En as h, Er as g, F as _, Fn as v, Ft as y, Gn as b, Gt as x, Hn as S, Ht as C, I as w, In as T, It as E, Jn as D, Jr as O, Jt as k, Kn as A, Kr as j, Kt as M, Ln as N, Lt as P, M as F, Mn as I, Mr as ee, N as te, Nn as L, Nr as ne, O as re, On as ie, Or as ae, Ot as oe, P as se, Pn as ce, Pt as le, Q as ue, Qr as de, Qt as fe, Rn as pe, Rt as me, S as he, Sn as ge, Sr as _e, T as ve, Tn as ye, Tr as be, Un as xe, Ut as Se, Vn as Ce, Vt as we, Wn as Te, Wr as Ee, Wt as De, Xn as Oe, Yn as ke, Yr as Ae, Yt as je, Zn as Me, Zr as Ne, Zt as Pe, _ as Fe, _r as Ie, _t as Le, ai as Re, ar as ze, b as Be, bi as Ve, br as He, bt as Ue, c as We, cn as Ge, cr as Ke, d as qe, di as Je, dr as Ye, ei as Xe, en as Ze, er as Qe, et as $e, f as et, fi as tt, fr as nt, ft as rt, gr as it, gt as at, h as ot, hr as st, ht as ct, i as lt, ii as ut, ir as dt, j as ft, jn as pt, jr as mt, k as ht, kn as gt, kr as _t, l as vt, ln as yt, lr as bt, lt as xt, m as St, mr as Ct, mt as wt, ni as Tt, nn as Et, nr as Dt, on as Ot, or as kt, pi as At, pr as jt, qn as Mt, qr as Nt, qt as Pt, ri as Ft, rn as It, rr as Lt, s as Rt, sn as zt, sr as Bt, t as Vt, tn as Ht, tr as Ut, u as Wt, un as Gt, ur as Kt, v as qt, vr as Jt, vt as Yt, w as Xt, wi as Zt, wn as Qt, wr as $t, x as en, xi as tn, xn as nn, xr as rn, xt as an, y as on, yi as sn, yr as cn, yt as ln, zn as un, zt as dn } from "./CoachmarkProvider-i1d6b_We.js";
|
|
3
|
+
import { a as R, i as fn, n as pn, o as mn, r as z, t as hn } from "./i18n-provider-DoTL-0tJ.js";
|
|
4
|
+
import { n as gn, t as _n } from "./skeleton-BsalZgC5.js";
|
|
5
|
+
import { A as vn, C as yn, D as bn, F as xn, I as Sn, L as B, M as Cn, N as wn, O as Tn, P as En, R as Dn, S as On, _ as kn, b as An, c as jn, f as Mn, g as Nn, h as Pn, j as Fn, k as In, l as Ln, m as Rn, p as zn, v as Bn, w as Vn, x as Hn, y as Un } from "./tooltip-DFMOxXQO.js";
|
|
6
|
+
import { E as Wn, F as Gn, H as Kn, I as qn, K as Jn, N as Yn, P as Xn, Y as Zn, b as Qn, f as $n, h as er, m as tr, n as nr, p as rr, r as ir, t as V, x as ar } from "./F0Button-BCWiHDDV.js";
|
|
7
|
+
import { $c as or, $i as sr, $r as cr, Ai as lr, An as ur, B as dr, Bc as fr, Bi as pr, Br as mr, Do as hr, En as gr, F as _r, Fi as vr, Fn as yr, Gi as br, Gn as xr, Go as Sr, Gr as Cr, H as wr, Hr as Tr, I as Er, Ic as Dr, In as Or, Ji as kr, Jn as Ar, Jr as jr, Ki as Mr, Kn as Nr, Ko as Pr, L as Fr, Li as Ir, Ln as Lr, Mi as Rr, Mt as zr, Nn as Br, On as Vr, Oo as Hr, Os as Ur, Pi as Wr, Qc as Gr, Qi as Kr, Qr as qr, R as Jr, Ri as Yr, Si as Xr, Tt as Zr, U as Qr, Ui as $r, Uo as ei, Ur as ti, V as ni, Vc as ri, Vr as ii, Wi as ai, Wr as oi, Ws as si, Xc as ci, Xi as li, Xn as ui, Xo as di, Xs as fi, Yc as pi, Yi as mi, Yn as hi, Zc as gi, Zi as _i, Zn as vi, as as yi, bi, cl as xi, ea as Si, ei as Ci, el as wi, go as Ti, hl as Ei, hs as Di, ji as Oi, jn as ki, kn as Ai, lc as ji, mc as Mi, mi as Ni, n as Pi, na as Fi, ni as Ii, oc as Li, os as Ri, pc as zi, pi as Bi, ps as Vi, qi as Hi, qn as Ui, qo as Wi, qr as Gi, qt as Ki, ra as qi, rc as Ji, ri as Yi, rl as Xi, sc as Zi, t as Qi, ta as $i, ti as ea, tl as ta, vi as na, vl as ra, wi as ia, yc as aa, yi as oa, ys as sa, z as ca, zi as la, zo as ua, zr as da } from "./F0CanvasPanel-sui4AhZR.js";
|
|
8
|
+
import { A as fa, B as pa, C as ma, D as ha, E as ga, F as _a, I as va, L as ya, M as ba, N as xa, O as Sa, P as Ca, R as wa, S as Ta, T as Ea, _ as Da, a as Oa, b as ka, c as Aa, d as ja, f as Ma, g as Na, h as Pa, i as Fa, j as Ia, k as La, l as Ra, m as za, n as Ba, o as Va, p as Ha, r as Ua, s as Wa, t as Ga, u as Ka, v as qa, w as Ja, x as Ya, y as Xa, z as Za } from "./F0AiProcessingOverlay-ChpomyZU.js";
|
|
9
9
|
import { a as Qa, i as $a, n as eo, o as to, r as no, t as H } from "./F0Icon-C0Ks-zGo.js";
|
|
10
10
|
import { t as ro } from "./i18n-provider-defaults-ZqFx7uFw.js";
|
|
11
|
-
import { F as io, G as ao, M as oo, S as so, W as co, a as lo, f as uo, g as fo, h as po, i as mo, j as ho, k as go, l as _o, m as vo, n as yo, r as bo, t as xo, u as So, x as Co, y as wo } from "./useData-
|
|
12
|
-
import { $ as To, An as Eo, Ar as Do, B as Oo, Bt as ko, Dn as Ao, Dt as jo, Er as Mo, Et as No, Ft as Po, G as Fo, H as Io, It as Lo, J as Ro, K as zo, Ln as Bo, Lt as Vo, Mt as Ho, Nt as Uo, On as Wo, Or as Go, Ot as Ko, Pt as qo, Q as Jo, R as Yo, Rt as Xo, St as Zo, Tr as Qo, U as $o, W as es, X as ts, Y as ns, _ as rs, _t as is, a as as, an as os, bt as ss, c as cs, d as ls, dr as us, dt as ds, g as fs, gr as ps, gt as ms, h as hs, it as gs, jt as _s, kr as vs, kt as ys, l as bs, lr as xs, m as Ss, nt as Cs, o as ws, pr as Ts, q as Es, r as Ds, rn as Os, rt as ks, s as As, t as js, tt as Ms, u as Ns, ut as Ps, v as Fs, vt as Is, w as Ls, wr as Rs, wt as zs, y as Bs, yt as Vs } from "./F0Select-
|
|
11
|
+
import { F as io, G as ao, M as oo, S as so, W as co, a as lo, f as uo, g as fo, h as po, i as mo, j as ho, k as go, l as _o, m as vo, n as yo, r as bo, t as xo, u as So, x as Co, y as wo } from "./useData-BtGI0HO3.js";
|
|
12
|
+
import { $ as To, An as Eo, Ar as Do, B as Oo, Bt as ko, Dn as Ao, Dt as jo, Er as Mo, Et as No, Ft as Po, G as Fo, H as Io, It as Lo, J as Ro, K as zo, Ln as Bo, Lt as Vo, Mt as Ho, Nt as Uo, On as Wo, Or as Go, Ot as Ko, Pt as qo, Q as Jo, R as Yo, Rt as Xo, St as Zo, Tr as Qo, U as $o, W as es, X as ts, Y as ns, _ as rs, _t as is, a as as, an as os, bt as ss, c as cs, d as ls, dr as us, dt as ds, g as fs, gr as ps, gt as ms, h as hs, it as gs, jt as _s, kr as vs, kt as ys, l as bs, lr as xs, m as Ss, nt as Cs, o as ws, pr as Ts, q as Es, r as Ds, rn as Os, rt as ks, s as As, t as js, tt as Ms, u as Ns, ut as Ps, v as Fs, vt as Is, w as Ls, wr as Rs, wt as zs, y as Bs, yt as Vs } from "./F0Select-CPIJ4yN6.js";
|
|
13
13
|
import { t as Hs } from "./Check-DAp9gCRh.js";
|
|
14
|
-
import { a as Us } from "./dist-
|
|
14
|
+
import { a as Us } from "./dist-BKmw8oWk.js";
|
|
15
15
|
import { t as Ws } from "./Ellipsis-CBouJQYY.js";
|
|
16
16
|
import { t as Gs } from "./LockLocked-gdodYvT_.js";
|
|
17
17
|
import { t as Ks } from "./purify.es-ZpfdAuNV.js";
|
|
18
18
|
import { J as qs, S as Js, a as Ys, b as Xs, d as Zs, f as Qs, g as $s, h as ec, i as tc, m as nc, p as rc, t as ic, w as ac, x as oc, y as sc } from "./popover-CCSQvMSp.js";
|
|
19
|
-
import { i as cc, r as lc } from "./dist-
|
|
20
|
-
import { t as uc } from "./F0Text-
|
|
21
|
-
import { t as dc } from "./F0Alert-
|
|
22
|
-
import { n as fc, r as pc, t as mc } from "./F0DocumentViewer-
|
|
19
|
+
import { i as cc, r as lc } from "./dist-DFNqqmLn.js";
|
|
20
|
+
import { t as uc } from "./F0Text-MqvXgPpZ.js";
|
|
21
|
+
import { t as dc } from "./F0Alert-Br1ytekS.js";
|
|
22
|
+
import { n as fc, r as pc, t as mc } from "./F0DocumentViewer-CnWBEUZY.js";
|
|
23
23
|
import { t as hc } from "./pdfWorkerConfig-BwllKt1K.js";
|
|
24
|
-
import { t as gc } from "./F0VideoPlayer-
|
|
24
|
+
import { t as gc } from "./F0VideoPlayer-B4XbzPFW.js";
|
|
25
25
|
import * as U from "react";
|
|
26
26
|
import _c, { Children as vc, Fragment as yc, createContext as bc, forwardRef as xc, isValidElement as Sc, memo as Cc, useCallback as W, useContext as wc, useEffect as G, useId as Tc, useImperativeHandle as Ec, useLayoutEffect as Dc, useMemo as K, useRef as q, useState as J, useSyncExternalStore as Oc } from "react";
|
|
27
27
|
import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
@@ -29,7 +29,7 @@ import * as kc from "react-dom";
|
|
|
29
29
|
import { createPortal as Ac } from "react-dom";
|
|
30
30
|
import './f0.css';//#region ../../node_modules/.pnpm/@base-ui+utils@0.4.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/inertValue.mjs
|
|
31
31
|
function jc(e) {
|
|
32
|
-
return
|
|
32
|
+
return Pn(19) ? e : e ? "true" : void 0;
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/blocks/layouts/HomeLayout/HomeLayout.tsx
|
|
@@ -45,14 +45,14 @@ var Mc = {
|
|
|
45
45
|
className: "h-full @5xl:h-auto [&>div]:h-full",
|
|
46
46
|
children: e
|
|
47
47
|
}, t));
|
|
48
|
-
return /* @__PURE__ */ X(
|
|
48
|
+
return /* @__PURE__ */ X(di, {
|
|
49
49
|
layout: "home",
|
|
50
50
|
children: /* @__PURE__ */ Z("div", {
|
|
51
51
|
ref: r,
|
|
52
52
|
className: "@container",
|
|
53
53
|
children: [/* @__PURE__ */ Z("div", {
|
|
54
54
|
className: "flex flex-col gap-6 px-5 pt-4 @md:pt-2 @5xl:hidden",
|
|
55
|
-
children: [/* @__PURE__ */ X(
|
|
55
|
+
children: [/* @__PURE__ */ X(At, {
|
|
56
56
|
columns: Mc,
|
|
57
57
|
showArrows: !1,
|
|
58
58
|
children: i
|
|
@@ -79,7 +79,7 @@ var Mc = {
|
|
|
79
79
|
}), Pc = to({
|
|
80
80
|
base: "relative flex min-h-full w-full flex-1 flex-col gap-4 place-self-center overflow-y-auto px-page py-5",
|
|
81
81
|
variants: { variant: { narrow: "max-w-screen-lg" } }
|
|
82
|
-
}), Fc = _c.forwardRef(({ children: e, variant: t, scrollable: n = !0, className: r, ...i }, a) => /* @__PURE__ */ X(
|
|
82
|
+
}), Fc = _c.forwardRef(({ children: e, variant: t, scrollable: n = !0, className: r, ...i }, a) => /* @__PURE__ */ X(di, {
|
|
83
83
|
layout: "standard",
|
|
84
84
|
children: /* @__PURE__ */ X("section", {
|
|
85
85
|
ref: a,
|
|
@@ -238,7 +238,7 @@ function Kc({ children: e, options: t, onResizeStop: n, onChange: r, widgets: i,
|
|
|
238
238
|
return e.forEach((e) => {
|
|
239
239
|
if (n.get(e)) {
|
|
240
240
|
let t = s.el.querySelector(`[gs-id="${e}"] .grid-stack-item-content`), r = "";
|
|
241
|
-
t && (r = Ks.sanitize(Gc(t))), n.set(e, /* @__PURE__ */ X(
|
|
241
|
+
t && (r = Ks.sanitize(Gc(t))), n.set(e, /* @__PURE__ */ X(Jn.div, {
|
|
242
242
|
className: "h-full w-full",
|
|
243
243
|
initial: {
|
|
244
244
|
opacity: 1,
|
|
@@ -2702,8 +2702,8 @@ var xl = ({ options: e, widgets: t, onChange: n, className: r, static: i, forceP
|
|
|
2702
2702
|
});
|
|
2703
2703
|
};
|
|
2704
2704
|
xl.displayName = "F0GridStack";
|
|
2705
|
-
var Sl = R(
|
|
2706
|
-
let o = W((e, t, n) => /* @__PURE__ */ X(
|
|
2705
|
+
var Sl = R(gn("F0GridStack", xl)), Cl = (e, t, n) => /* @__PURE__ */ X("div", { children: e }), wl = ({ widgets: e = [], editMode: t = !1, onChange: n = () => {}, WidgetWrapper: r = Cl, main: i = !1, deps: a }) => {
|
|
2706
|
+
let o = W((e, t, n) => /* @__PURE__ */ X(Jn.div, {
|
|
2707
2707
|
className: "h-full w-full",
|
|
2708
2708
|
initial: {
|
|
2709
2709
|
opacity: 0,
|
|
@@ -2886,7 +2886,7 @@ var Tl = (e, t) => {
|
|
|
2886
2886
|
}, El = (e, t) => {
|
|
2887
2887
|
let n = t;
|
|
2888
2888
|
return n.displayName = e, n.__isPageLayoutGroup = !0, n;
|
|
2889
|
-
}, Dl =
|
|
2889
|
+
}, Dl = Yn, Ol = Gn, kl = ({ children: e, title: t, draggable: n = !1, actions: r, aiButton: i }) => /* @__PURE__ */ X(Re, {
|
|
2890
2890
|
header: { title: t },
|
|
2891
2891
|
draggable: n,
|
|
2892
2892
|
actions: r,
|
|
@@ -2908,7 +2908,7 @@ var Tl = (e, t) => {
|
|
|
2908
2908
|
})
|
|
2909
2909
|
});
|
|
2910
2910
|
Al.displayName = "Dashboard";
|
|
2911
|
-
var jl = El("Dashboard", Al), Ml = R(
|
|
2911
|
+
var jl = El("Dashboard", Al), Ml = R(gn("Dashboard", jl)), Nl = to({
|
|
2912
2912
|
base: "flex w-full flex-col p-4",
|
|
2913
2913
|
variants: { variant: {
|
|
2914
2914
|
default: "",
|
|
@@ -2986,8 +2986,8 @@ Vl.displayName = "GroupLinear", Vl.__isPageLayoutGroup = !0;
|
|
|
2986
2986
|
//#endregion
|
|
2987
2987
|
//#region src/blocks/layouts/Layout/groups/GroupMasonry/components/SortableBlock.tsx
|
|
2988
2988
|
var Hl = ({ id: e, children: t }) => {
|
|
2989
|
-
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o } =
|
|
2990
|
-
transform:
|
|
2989
|
+
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o } = Ae({ id: e }), s = {
|
|
2990
|
+
transform: ut.Translate.toString(a),
|
|
2991
2991
|
transition: o,
|
|
2992
2992
|
flex: "1 1",
|
|
2993
2993
|
display: "flex",
|
|
@@ -3008,7 +3008,7 @@ var Hl = ({ id: e, children: t }) => {
|
|
|
3008
3008
|
render: e.render
|
|
3009
3009
|
})));
|
|
3010
3010
|
}, [e]);
|
|
3011
|
-
let [s, c] = J(null), l =
|
|
3011
|
+
let [s, c] = J(null), l = Ft(Tt(Xe), Tt(r, { coordinateGetter: O }));
|
|
3012
3012
|
return /* @__PURE__ */ X("div", {
|
|
3013
3013
|
className: B("flex flex-wrap items-stretch gap-4", i && "flex-1"),
|
|
3014
3014
|
children: /* @__PURE__ */ Z(Ne, {
|
|
@@ -3020,16 +3020,16 @@ var Hl = ({ id: e, children: t }) => {
|
|
|
3020
3020
|
let { active: t, over: n } = e;
|
|
3021
3021
|
c(null), n && t.id !== n.id && o((e) => {
|
|
3022
3022
|
let r = e.findIndex((e) => e.id === t.id), i = e.findIndex((e) => e.id === n.id);
|
|
3023
|
-
return
|
|
3023
|
+
return Nt(e, r, i);
|
|
3024
3024
|
});
|
|
3025
3025
|
},
|
|
3026
|
-
children: [/* @__PURE__ */ X(
|
|
3026
|
+
children: [/* @__PURE__ */ X(j, {
|
|
3027
3027
|
items: a,
|
|
3028
3028
|
children: a.map((e) => /* @__PURE__ */ X(Hl, {
|
|
3029
3029
|
id: e.id,
|
|
3030
3030
|
children: e.render
|
|
3031
3031
|
}, e.id))
|
|
3032
|
-
}), /* @__PURE__ */ X(
|
|
3032
|
+
}), /* @__PURE__ */ X(de, { children: s ? /* @__PURE__ */ X(Hl, {
|
|
3033
3033
|
id: s,
|
|
3034
3034
|
children: a.find((e) => e.id === s)?.render
|
|
3035
3035
|
}) : null })]
|
|
@@ -3061,12 +3061,12 @@ var Wl = xc(function({ children: e, aside: t, header: n, variant: r = "main-asid
|
|
|
3061
3061
|
})
|
|
3062
3062
|
});
|
|
3063
3063
|
}), Gl = {
|
|
3064
|
-
Page: R(
|
|
3065
|
-
Block: R(
|
|
3066
|
-
BlockContent: R(
|
|
3067
|
-
Group: R(
|
|
3068
|
-
GroupGrid: R(
|
|
3069
|
-
GroupMasonry: R(
|
|
3064
|
+
Page: R(gn("Page", Wl)),
|
|
3065
|
+
Block: R(gn("Block", Il)),
|
|
3066
|
+
BlockContent: R(gn("BlockContent", Ll)),
|
|
3067
|
+
Group: R(gn("Group", Vl)),
|
|
3068
|
+
GroupGrid: R(gn("GroupGrid", wl)),
|
|
3069
|
+
GroupMasonry: R(gn("GroupMasonry", Ul))
|
|
3070
3070
|
}, Kl = Ic, ql = Rc, Jl = R(no({
|
|
3071
3071
|
name: "HomeLayout",
|
|
3072
3072
|
type: "layout"
|
|
@@ -3107,9 +3107,9 @@ var Wl = xc(function({ children: e, aside: t, header: n, variant: r = "main-asid
|
|
|
3107
3107
|
});
|
|
3108
3108
|
}, Ql = () => /* @__PURE__ */ Z("div", {
|
|
3109
3109
|
className: "relative flex h-full w-full cursor-progress flex-col gap-2",
|
|
3110
|
-
children: [/* @__PURE__ */ X(
|
|
3110
|
+
children: [/* @__PURE__ */ X(_n, { className: "h-3 w-full max-w-16 rounded-md" }), /* @__PURE__ */ Z("div", {
|
|
3111
3111
|
className: "flex flex-row flex-wrap items-end gap-2",
|
|
3112
|
-
children: [/* @__PURE__ */ X(
|
|
3112
|
+
children: [/* @__PURE__ */ X(_n, { className: "h-8 w-full max-w-36 rounded-sm" }), /* @__PURE__ */ X(_n, { className: "h-6 w-full max-w-18 rounded-sm" })]
|
|
3113
3113
|
})]
|
|
3114
3114
|
});
|
|
3115
3115
|
Zl.displayName = "F0BigNumber";
|
|
@@ -3117,11 +3117,11 @@ var $l = ua(Zl, Ql), eu = R($l), tu = [
|
|
|
3117
3117
|
"default",
|
|
3118
3118
|
"outline",
|
|
3119
3119
|
"neutral"
|
|
3120
|
-
], nu =
|
|
3120
|
+
], nu = Gn, ru = ["split", "dropdown"], iu = ["sm", "md"], au = [...Xn, "inline"], ou = ({ actions: e }) => /* @__PURE__ */ X("div", {
|
|
3121
3121
|
className: "flex items-center gap-2",
|
|
3122
3122
|
children: e.map((e, t) => {
|
|
3123
3123
|
switch (e.type) {
|
|
3124
|
-
case "segmentedControl": return /* @__PURE__ */ X(
|
|
3124
|
+
case "segmentedControl": return /* @__PURE__ */ X(mi, {
|
|
3125
3125
|
items: e.items,
|
|
3126
3126
|
value: e.value,
|
|
3127
3127
|
onChange: e.onChange,
|
|
@@ -3143,8 +3143,8 @@ var $l = ua(Zl, Ql), eu = R($l), tu = [
|
|
|
3143
3143
|
}
|
|
3144
3144
|
})
|
|
3145
3145
|
}), su = ({ item: e, open: t, onOpenChange: n }) => {
|
|
3146
|
-
let r =
|
|
3147
|
-
return /* @__PURE__ */ X(
|
|
3146
|
+
let r = er(), i = z().t(t ? "actions.collapseItem" : "actions.expandItem", { title: e.title }), a = !!e.actions && e.actions.length > 0;
|
|
3147
|
+
return /* @__PURE__ */ X($r, {
|
|
3148
3148
|
open: t,
|
|
3149
3149
|
onOpenChange: n,
|
|
3150
3150
|
asChild: !0,
|
|
@@ -3152,11 +3152,11 @@ var $l = ua(Zl, Ql), eu = R($l), tu = [
|
|
|
3152
3152
|
className: "flex flex-col",
|
|
3153
3153
|
children: [/* @__PURE__ */ Z("div", {
|
|
3154
3154
|
className: "flex items-center",
|
|
3155
|
-
children: [/* @__PURE__ */ X(
|
|
3155
|
+
children: [/* @__PURE__ */ X(br, {
|
|
3156
3156
|
asChild: !0,
|
|
3157
3157
|
children: /* @__PURE__ */ X("button", {
|
|
3158
3158
|
type: "button",
|
|
3159
|
-
className: B("flex flex-1 min-w-0 items-center py-3 pl-4 pr-2 text-left",
|
|
3159
|
+
className: B("flex flex-1 min-w-0 items-center py-3 pl-4 pr-2 text-left", Dn()),
|
|
3160
3160
|
children: /* @__PURE__ */ X("span", {
|
|
3161
3161
|
className: "flex-1 truncate font-medium text-f1-foreground",
|
|
3162
3162
|
children: e.title
|
|
@@ -3170,7 +3170,7 @@ var $l = ua(Zl, Ql), eu = R($l), tu = [
|
|
|
3170
3170
|
children: e.summary
|
|
3171
3171
|
}) : null,
|
|
3172
3172
|
a ? /* @__PURE__ */ X(ou, { actions: e.actions }) : null,
|
|
3173
|
-
/* @__PURE__ */ X(
|
|
3173
|
+
/* @__PURE__ */ X(br, {
|
|
3174
3174
|
asChild: !0,
|
|
3175
3175
|
children: /* @__PURE__ */ X(V, {
|
|
3176
3176
|
variant: "outline",
|
|
@@ -3182,9 +3182,9 @@ var $l = ua(Zl, Ql), eu = R($l), tu = [
|
|
|
3182
3182
|
})
|
|
3183
3183
|
]
|
|
3184
3184
|
})]
|
|
3185
|
-
}), /* @__PURE__ */ X(
|
|
3185
|
+
}), /* @__PURE__ */ X(Zn, {
|
|
3186
3186
|
initial: !1,
|
|
3187
|
-
children: t ? /* @__PURE__ */ X(
|
|
3187
|
+
children: t ? /* @__PURE__ */ X(Jn.div, {
|
|
3188
3188
|
initial: {
|
|
3189
3189
|
height: 0,
|
|
3190
3190
|
opacity: 0
|
|
@@ -3199,7 +3199,7 @@ var $l = ua(Zl, Ql), eu = R($l), tu = [
|
|
|
3199
3199
|
},
|
|
3200
3200
|
transition: { duration: r ? 0 : .2 },
|
|
3201
3201
|
className: "overflow-hidden",
|
|
3202
|
-
children: /* @__PURE__ */ X(
|
|
3202
|
+
children: /* @__PURE__ */ X(ai, {
|
|
3203
3203
|
forceMount: !0,
|
|
3204
3204
|
asChild: !0,
|
|
3205
3205
|
children: /* @__PURE__ */ Z("div", {
|
|
@@ -3220,7 +3220,7 @@ var $l = ua(Zl, Ql), eu = R($l), tu = [
|
|
|
3220
3220
|
className: B("flex flex-col rounded-md border border-solid border-f1-border-secondary", "overflow-hidden bg-f1-background"),
|
|
3221
3221
|
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ Z(yc, { children: [t > 0 ? /* @__PURE__ */ X("div", { className: "h-px w-full bg-f1-border-secondary" }) : null, /* @__PURE__ */ Z("div", {
|
|
3222
3222
|
className: "flex items-center gap-3 px-4 py-3",
|
|
3223
|
-
children: [/* @__PURE__ */ X(
|
|
3223
|
+
children: [/* @__PURE__ */ X(_n, { className: "h-4 flex-1 max-w-48" }), /* @__PURE__ */ X(_n, { className: "ml-auto h-7 w-7 shrink-0 rounded" })]
|
|
3224
3224
|
})] }, t))
|
|
3225
3225
|
}), lu = xc((e, t) => {
|
|
3226
3226
|
let { items: n, value: r, defaultValue: i, onValueChange: a, ...o } = e, s = K(() => i === void 0 ? n.filter((e) => e.defaultOpen).map((e) => e.id) : i, [i, n]), [c = [], l] = qs({
|
|
@@ -3243,7 +3243,7 @@ var $l = ua(Zl, Ql), eu = R($l), tu = [
|
|
|
3243
3243
|
});
|
|
3244
3244
|
});
|
|
3245
3245
|
lu.displayName = "F0Accordion";
|
|
3246
|
-
var uu = R(
|
|
3246
|
+
var uu = R(gn("F0Accordion", ua(lu, cu))), du = [
|
|
3247
3247
|
"info",
|
|
3248
3248
|
"warning",
|
|
3249
3249
|
"critical",
|
|
@@ -3256,7 +3256,7 @@ var uu = R(hn("F0Accordion", ua(lu, cu))), du = [
|
|
|
3256
3256
|
children: [/* @__PURE__ */ X(Ys, {
|
|
3257
3257
|
asChild: !0,
|
|
3258
3258
|
children: /* @__PURE__ */ X("button", {
|
|
3259
|
-
className:
|
|
3259
|
+
className: Dn("inline-flex flex-shrink-0 items-center"),
|
|
3260
3260
|
children: i
|
|
3261
3261
|
})
|
|
3262
3262
|
}), /* @__PURE__ */ X(tc, {
|
|
@@ -3301,7 +3301,7 @@ var pu = ({ chips: e, max: t = 4, remainingCount: n, layout: r = "compact" }) =>
|
|
|
3301
3301
|
});
|
|
3302
3302
|
};
|
|
3303
3303
|
pu.displayName = "F0ChipList";
|
|
3304
|
-
var mu = R(
|
|
3304
|
+
var mu = R(gn("F0ChipList", pu)), hu = [
|
|
3305
3305
|
"blur",
|
|
3306
3306
|
"escape",
|
|
3307
3307
|
"commit",
|
|
@@ -3318,13 +3318,13 @@ var mu = R(hn("F0ChipList", pu)), hu = [
|
|
|
3318
3318
|
set: async (e, t) => {
|
|
3319
3319
|
localStorage.setItem(ia(e), JSON.stringify(t));
|
|
3320
3320
|
}
|
|
3321
|
-
}, yu = ({ disableClose: e = !1, onClose: t, isOpen: n, children: r, position: i = "right", size: a = "md", primaryAction: o, secondaryAction:
|
|
3321
|
+
}, yu = ({ disableClose: e = !1, onClose: t, isOpen: n, children: r, position: i = "right", size: a = "md", primaryAction: o, secondaryAction: c, title: l, description: u, module: d, otherActions: f, tabs: p, modal: m = !1, activeTabId: h, setActiveTabId: g, disableContentPadding: _, container: v, onWidthChange: y }) => {
|
|
3322
3322
|
let [b, x] = J(n);
|
|
3323
3323
|
G(() => {
|
|
3324
3324
|
x(n);
|
|
3325
3325
|
}, [n]);
|
|
3326
|
-
let
|
|
3327
|
-
/* @__PURE__ */ X(
|
|
3326
|
+
let C = K(() => /* @__PURE__ */ Z(Y, { children: [
|
|
3327
|
+
/* @__PURE__ */ X(Ce, {
|
|
3328
3328
|
title: l,
|
|
3329
3329
|
description: u,
|
|
3330
3330
|
module: d,
|
|
@@ -3334,13 +3334,13 @@ var mu = R(hn("F0ChipList", pu)), hu = [
|
|
|
3334
3334
|
setActiveTabId: g,
|
|
3335
3335
|
disableClose: e
|
|
3336
3336
|
}),
|
|
3337
|
-
/* @__PURE__ */ X(
|
|
3337
|
+
/* @__PURE__ */ X(xe, {
|
|
3338
3338
|
disableContentPadding: _ ?? !1,
|
|
3339
3339
|
children: r
|
|
3340
3340
|
}),
|
|
3341
|
-
/* @__PURE__ */ X(
|
|
3341
|
+
/* @__PURE__ */ X(S, {
|
|
3342
3342
|
primaryAction: o ?? [],
|
|
3343
|
-
secondaryAction:
|
|
3343
|
+
secondaryAction: c ?? [],
|
|
3344
3344
|
onClose: () => x(!1)
|
|
3345
3345
|
})
|
|
3346
3346
|
] }), [
|
|
@@ -3355,9 +3355,9 @@ var mu = R(hn("F0ChipList", pu)), hu = [
|
|
|
3355
3355
|
_,
|
|
3356
3356
|
r,
|
|
3357
3357
|
o,
|
|
3358
|
-
|
|
3358
|
+
c
|
|
3359
3359
|
]);
|
|
3360
|
-
return /* @__PURE__ */ X(
|
|
3360
|
+
return /* @__PURE__ */ X(s, {
|
|
3361
3361
|
isOpen: n && b,
|
|
3362
3362
|
onClose: t,
|
|
3363
3363
|
position: i,
|
|
@@ -3368,11 +3368,11 @@ var mu = R(hn("F0ChipList", pu)), hu = [
|
|
|
3368
3368
|
onOpenChange: x,
|
|
3369
3369
|
container: v,
|
|
3370
3370
|
onWidthChange: y,
|
|
3371
|
-
children:
|
|
3371
|
+
children: C
|
|
3372
3372
|
});
|
|
3373
3373
|
}, bu = (e) => /* @__PURE__ */ X(yu, { ...e });
|
|
3374
3374
|
bu.displayName = "F0Drawer";
|
|
3375
|
-
var xu =
|
|
3375
|
+
var xu = gn("F0Drawer", bu), Su = 388;
|
|
3376
3376
|
function Cu({ filters: e, value: t, onChange: n, height: r, width: i = 600, className: a, showApplyButton: o = !0, applyButtonLabel: s, dataTestId: c }) {
|
|
3377
3377
|
let l = z(), u = Object.keys(e)[0] ?? null, [d, f] = J(u), [p, m] = J(t);
|
|
3378
3378
|
G(() => {
|
|
@@ -3409,7 +3409,7 @@ function Cu({ filters: e, value: t, onChange: n, height: r, width: i = 600, clas
|
|
|
3409
3409
|
let r = ls(n.type);
|
|
3410
3410
|
return Math.max(e, r?.formHeight || Su);
|
|
3411
3411
|
}, 0), [e, r]);
|
|
3412
|
-
return !e || Object.keys(e).length === 0 ? null : /* @__PURE__ */ X(
|
|
3412
|
+
return !e || Object.keys(e).length === 0 ? null : /* @__PURE__ */ X(fn, {
|
|
3413
3413
|
dataTestId: c,
|
|
3414
3414
|
children: /* @__PURE__ */ X("div", {
|
|
3415
3415
|
className: B("overflow-hidden rounded-xl border border-solid border-f1-border-secondary bg-f1-background", a),
|
|
@@ -3435,26 +3435,26 @@ var wu = Cu;
|
|
|
3435
3435
|
function Tu(e) {
|
|
3436
3436
|
let t = ui(e).shape, n = [];
|
|
3437
3437
|
for (let [e, r] of Object.entries(t)) {
|
|
3438
|
-
let t = r, i =
|
|
3438
|
+
let t = r, i = Nr(t);
|
|
3439
3439
|
if (!i) continue;
|
|
3440
|
-
let a =
|
|
3440
|
+
let a = Ar(t, i), o = pt(t, a), s = {
|
|
3441
3441
|
name: e,
|
|
3442
3442
|
type: a,
|
|
3443
3443
|
label: i.label,
|
|
3444
|
-
required:
|
|
3444
|
+
required: o
|
|
3445
3445
|
};
|
|
3446
|
-
if (i.placeholder && (
|
|
3447
|
-
if ("source" in i && i.source)
|
|
3446
|
+
if (i.placeholder && (s.placeholder = i.placeholder), i.helpText && (s.helpText = i.helpText), i.section && (s.section = i.section), i.customFieldName && (s.customFieldName = i.customFieldName), a === "select") {
|
|
3447
|
+
if ("source" in i && i.source) s.optionsSource = "dynamic";
|
|
3448
3448
|
else if ("options" in i && i.options) {
|
|
3449
3449
|
let e = [];
|
|
3450
3450
|
for (let t of i.options) "label" in t && "value" in t && e.push({
|
|
3451
3451
|
label: t.label,
|
|
3452
3452
|
value: t.value
|
|
3453
3453
|
});
|
|
3454
|
-
|
|
3454
|
+
s.options = e;
|
|
3455
3455
|
}
|
|
3456
3456
|
}
|
|
3457
|
-
n.push(
|
|
3457
|
+
n.push(s);
|
|
3458
3458
|
}
|
|
3459
3459
|
return n;
|
|
3460
3460
|
}
|
|
@@ -3480,7 +3480,7 @@ function Du(e) {
|
|
|
3480
3480
|
let i = {
|
|
3481
3481
|
...n,
|
|
3482
3482
|
...e
|
|
3483
|
-
}, a =
|
|
3483
|
+
}, a = nn(t, i), o = {};
|
|
3484
3484
|
for (let [e, t] of Object.entries(i)) o[e] = t === null ? void 0 : t;
|
|
3485
3485
|
let s = r ? { errorMap: r } : void 0, c = await a.safeParseAsync(o, s);
|
|
3486
3486
|
if (c.success) return {
|
|
@@ -3511,8 +3511,8 @@ function Du(e) {
|
|
|
3511
3511
|
...e
|
|
3512
3512
|
}, i = ui(t), a = [];
|
|
3513
3513
|
for (let [e, t] of Object.entries(i.shape)) {
|
|
3514
|
-
let n =
|
|
3515
|
-
n?.renderIf ?
|
|
3514
|
+
let n = Nr(t);
|
|
3515
|
+
n?.renderIf ? ie(n.renderIf, r) && a.push(e) : a.push(e);
|
|
3516
3516
|
}
|
|
3517
3517
|
return a;
|
|
3518
3518
|
},
|
|
@@ -3543,7 +3543,7 @@ function Ou(e, t) {
|
|
|
3543
3543
|
}
|
|
3544
3544
|
//#endregion
|
|
3545
3545
|
//#region src/blocks/dialog-alike/F0Dialog/internal/DialogNotification.tsx
|
|
3546
|
-
var ku = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, description: i, primaryAction: a, secondaryAction: o, dismissable: s = !1 }) => /* @__PURE__ */ X(
|
|
3546
|
+
var ku = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, description: i, primaryAction: a, secondaryAction: o, dismissable: s = !1 }) => /* @__PURE__ */ X(je, {
|
|
3547
3547
|
isOpen: e,
|
|
3548
3548
|
onClose: t,
|
|
3549
3549
|
variant: "notification",
|
|
@@ -3555,15 +3555,15 @@ var ku = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, descriptio
|
|
|
3555
3555
|
modal: !0,
|
|
3556
3556
|
children: /* @__PURE__ */ Z("div", {
|
|
3557
3557
|
className: "flex flex-col gap-4 py-2",
|
|
3558
|
-
children: [/* @__PURE__ */ X(
|
|
3558
|
+
children: [/* @__PURE__ */ X(hr, {
|
|
3559
3559
|
type: n,
|
|
3560
3560
|
size: "lg"
|
|
3561
3561
|
}), /* @__PURE__ */ Z("div", {
|
|
3562
3562
|
className: "flex flex-col gap-0.5",
|
|
3563
|
-
children: [/* @__PURE__ */ X(
|
|
3563
|
+
children: [/* @__PURE__ */ X(Oi, {
|
|
3564
3564
|
className: "text-xl sm:text-lg",
|
|
3565
3565
|
children: r
|
|
3566
|
-
}), /* @__PURE__ */ X(
|
|
3566
|
+
}), /* @__PURE__ */ X(Mt, {
|
|
3567
3567
|
className: "text-lg sm:text-base",
|
|
3568
3568
|
children: i
|
|
3569
3569
|
})]
|
|
@@ -3659,7 +3659,7 @@ var ku = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, descriptio
|
|
|
3659
3659
|
position: e.position,
|
|
3660
3660
|
module: e.module,
|
|
3661
3661
|
children: e.content
|
|
3662
|
-
}, e.id) : /* @__PURE__ */ X(
|
|
3662
|
+
}, e.id) : /* @__PURE__ */ X(je, {
|
|
3663
3663
|
disableClose: c(e.id),
|
|
3664
3664
|
isOpen: s.has(e.id),
|
|
3665
3665
|
size: e.size,
|
|
@@ -3673,14 +3673,14 @@ var ku = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, descriptio
|
|
|
3673
3673
|
children: e.content
|
|
3674
3674
|
}, e.id) }, e.id)) });
|
|
3675
3675
|
}, Nu = ({ children: e }) => {
|
|
3676
|
-
let t = Oc(
|
|
3676
|
+
let t = Oc(k.subscribe, k.getSnapshot, k.getServerSnapshot), n = z(), [r, i] = J(null);
|
|
3677
3677
|
G(() => {
|
|
3678
|
-
let e =
|
|
3678
|
+
let e = k.acquireRenderer();
|
|
3679
3679
|
return i(e.id), e.release;
|
|
3680
3680
|
}, []);
|
|
3681
|
-
let a = Oc(
|
|
3681
|
+
let a = Oc(k.subscribeRenderer, k.getActiveRendererId, () => null), o = r !== null && r === a;
|
|
3682
3682
|
return G(() => {
|
|
3683
|
-
|
|
3683
|
+
k.setDefaultActionLabels({
|
|
3684
3684
|
ok: n.actions.ok,
|
|
3685
3685
|
cancel: n.actions.cancel
|
|
3686
3686
|
});
|
|
@@ -3727,47 +3727,47 @@ var ku = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, descriptio
|
|
|
3727
3727
|
//#endregion
|
|
3728
3728
|
//#region src/blocks/F0FormField/F0FormField.tsx
|
|
3729
3729
|
function Lu({ children: e }) {
|
|
3730
|
-
let t =
|
|
3730
|
+
let t = f(), n = K(() => t && {
|
|
3731
3731
|
...t,
|
|
3732
3732
|
registerInlineRow: void 0,
|
|
3733
3733
|
nullableEmptyFields: void 0
|
|
3734
3734
|
}, [t]);
|
|
3735
|
-
return /* @__PURE__ */ X(
|
|
3735
|
+
return /* @__PURE__ */ X(ye.Provider, {
|
|
3736
3736
|
value: n,
|
|
3737
|
-
children: /* @__PURE__ */ X(
|
|
3737
|
+
children: /* @__PURE__ */ X(fe.Provider, {
|
|
3738
3738
|
value: null,
|
|
3739
3739
|
children: e
|
|
3740
3740
|
})
|
|
3741
3741
|
});
|
|
3742
3742
|
}
|
|
3743
|
-
function Ru({ field: e, value: t, onChange: n, onBlur: r, error:
|
|
3744
|
-
let
|
|
3743
|
+
function Ru({ field: e, value: t, onChange: n, onBlur: r, error: a, errorMessage: o, status: s, loading: c, required: l, disabled: u, hideLabel: d, initialFiles: f, inline: p }) {
|
|
3744
|
+
let m = Tc(), h = l ?? (e.validation ? pt(e.validation) : !1), g = !d && e.type !== "checkbox" && e.type !== "custom", _ = {
|
|
3745
3745
|
value: t,
|
|
3746
3746
|
onChange: n,
|
|
3747
3747
|
onBlur: r ?? (() => {}),
|
|
3748
3748
|
name: e.id,
|
|
3749
3749
|
ref: () => {}
|
|
3750
|
-
},
|
|
3751
|
-
error:
|
|
3750
|
+
}, v = {
|
|
3751
|
+
error: a || s?.type === "error" ? {
|
|
3752
3752
|
type: "custom",
|
|
3753
|
-
message:
|
|
3753
|
+
message: o ?? s?.message
|
|
3754
3754
|
} : void 0,
|
|
3755
|
-
isValidating: !!
|
|
3756
|
-
},
|
|
3755
|
+
isValidating: !!c
|
|
3756
|
+
}, y = a ? {
|
|
3757
3757
|
type: "error",
|
|
3758
|
-
message:
|
|
3759
|
-
} :
|
|
3758
|
+
message: o
|
|
3759
|
+
} : s, b = u === void 0 ? e : {
|
|
3760
3760
|
...e,
|
|
3761
|
-
disabled:
|
|
3762
|
-
},
|
|
3763
|
-
return
|
|
3764
|
-
id:
|
|
3765
|
-
children: /* @__PURE__ */ X(
|
|
3766
|
-
field:
|
|
3767
|
-
formField:
|
|
3768
|
-
fieldState:
|
|
3761
|
+
disabled: u
|
|
3762
|
+
}, x = e.type === "file" ? f : void 0;
|
|
3763
|
+
return p ? /* @__PURE__ */ X(Lu, { children: /* @__PURE__ */ X("div", {
|
|
3764
|
+
id: m,
|
|
3765
|
+
children: /* @__PURE__ */ X(Qt, { children: /* @__PURE__ */ X(i, {
|
|
3766
|
+
field: b,
|
|
3767
|
+
formField: _,
|
|
3768
|
+
fieldState: v,
|
|
3769
3769
|
isSubmitting: !1,
|
|
3770
|
-
isRequired:
|
|
3770
|
+
isRequired: h,
|
|
3771
3771
|
values: {},
|
|
3772
3772
|
readSnapshot: () => ({
|
|
3773
3773
|
value: t,
|
|
@@ -3777,31 +3777,31 @@ function Ru({ field: e, value: t, onChange: n, onBlur: r, error: i, errorMessage
|
|
|
3777
3777
|
}) })
|
|
3778
3778
|
}) }) : /* @__PURE__ */ X(Lu, { children: /* @__PURE__ */ Z("div", {
|
|
3779
3779
|
className: "space-y-2",
|
|
3780
|
-
id:
|
|
3780
|
+
id: m,
|
|
3781
3781
|
children: [
|
|
3782
|
-
|
|
3782
|
+
g ? /* @__PURE__ */ Z("label", {
|
|
3783
3783
|
htmlFor: e.id,
|
|
3784
3784
|
className: "text-base font-medium leading-normal text-f1-foreground-secondary",
|
|
3785
|
-
children: [e.label,
|
|
3785
|
+
children: [e.label, h ? /* @__PURE__ */ X("span", {
|
|
3786
3786
|
className: "ml-0.5 text-f1-foreground-critical",
|
|
3787
3787
|
children: "*"
|
|
3788
3788
|
}) : null]
|
|
3789
3789
|
}) : null,
|
|
3790
|
-
|
|
3791
|
-
field:
|
|
3792
|
-
formField:
|
|
3793
|
-
fieldState:
|
|
3790
|
+
ft({
|
|
3791
|
+
field: b,
|
|
3792
|
+
formField: _,
|
|
3793
|
+
fieldState: v,
|
|
3794
3794
|
isSubmitting: !1,
|
|
3795
|
-
isRequired:
|
|
3795
|
+
isRequired: h,
|
|
3796
3796
|
values: {},
|
|
3797
|
-
initialFiles:
|
|
3798
|
-
fieldStatus:
|
|
3797
|
+
initialFiles: x,
|
|
3798
|
+
fieldStatus: y
|
|
3799
3799
|
}),
|
|
3800
3800
|
e.helpText ? /* @__PURE__ */ X("p", {
|
|
3801
3801
|
className: "text-base text-f1-foreground-secondary",
|
|
3802
3802
|
children: e.helpText
|
|
3803
3803
|
}) : null,
|
|
3804
|
-
/* @__PURE__ */ X(To, { status:
|
|
3804
|
+
/* @__PURE__ */ X(To, { status: y })
|
|
3805
3805
|
]
|
|
3806
3806
|
}) });
|
|
3807
3807
|
}
|
|
@@ -3837,7 +3837,7 @@ function Wu({ state: e, index: t }) {
|
|
|
3837
3837
|
return e === "completed" ? /* @__PURE__ */ X("span", {
|
|
3838
3838
|
className: "flex h-5 w-5 min-w-5 shrink-0 items-center justify-center rounded-xs bg-f1-background-secondary text-f1-foreground-secondary",
|
|
3839
3839
|
children: /* @__PURE__ */ X(Hs, { className: "h-3 w-3" })
|
|
3840
|
-
}) : /* @__PURE__ */ X(
|
|
3840
|
+
}) : /* @__PURE__ */ X(Wn, {
|
|
3841
3841
|
value: t + 1,
|
|
3842
3842
|
type: e === "active" ? "selected" : "default",
|
|
3843
3843
|
size: "md"
|
|
@@ -3860,7 +3860,7 @@ function Gu() {
|
|
|
3860
3860
|
},
|
|
3861
3861
|
disabled: !u && a !== t,
|
|
3862
3862
|
"aria-current": a === t ? "step" : void 0,
|
|
3863
|
-
className: B(
|
|
3863
|
+
className: B(Dn(), "flex cursor-pointer items-center gap-2 rounded p-2 text-left", s === "active" && "bg-f1-background-selected", u && "hover:bg-f1-background-secondary-hover", !u && a !== t && "cursor-default opacity-70"),
|
|
3864
3864
|
children: [/* @__PURE__ */ X(Wu, {
|
|
3865
3865
|
state: s,
|
|
3866
3866
|
index: a
|
|
@@ -3945,9 +3945,9 @@ var qu = () => {}, Ju = ({ steps: e, children: t, isOpen: n, onClose: r = qu, ti
|
|
|
3945
3945
|
allowStepSkipping: f,
|
|
3946
3946
|
autoCloseOnLastStepSubmit: p,
|
|
3947
3947
|
onClose: r
|
|
3948
|
-
}), g = z(), _ = e[h.currentStep], v = h.currentStep === 0, y = h.currentStep === e.length - 1, b = y ? _?.nextLabel ?? l ?? g.wizard.submit : _?.nextLabel ?? s ?? g.wizard.next,
|
|
3948
|
+
}), g = z(), _ = e[h.currentStep], v = h.currentStep === 0, y = h.currentStep === e.length - 1, b = y ? _?.nextLabel ?? l ?? g.wizard.submit : _?.nextLabel ?? s ?? g.wizard.next, S = _?.previousLabel ?? c ?? g.wizard.previous, C = K(() => ({
|
|
3949
3949
|
label: b,
|
|
3950
|
-
icon: y ? void 0 :
|
|
3950
|
+
icon: y ? void 0 : xi,
|
|
3951
3951
|
onClick: () => void h.goNext(),
|
|
3952
3952
|
disabled: _?.isCompleted?.() === !1 || _?.hasErrors?.() === !0,
|
|
3953
3953
|
loading: h.loading
|
|
@@ -3956,24 +3956,24 @@ var qu = () => {}, Ju = ({ steps: e, children: t, isOpen: n, onClose: r = qu, ti
|
|
|
3956
3956
|
y,
|
|
3957
3957
|
h,
|
|
3958
3958
|
_
|
|
3959
|
-
]),
|
|
3960
|
-
label:
|
|
3959
|
+
]), w = K(() => v ? void 0 : {
|
|
3960
|
+
label: S,
|
|
3961
3961
|
icon: vs,
|
|
3962
3962
|
onClick: h.goPrevious,
|
|
3963
3963
|
disabled: h.loading
|
|
3964
3964
|
}, [
|
|
3965
3965
|
v,
|
|
3966
|
-
|
|
3966
|
+
S,
|
|
3967
3967
|
h
|
|
3968
3968
|
]);
|
|
3969
|
-
return /* @__PURE__ */ X(
|
|
3969
|
+
return /* @__PURE__ */ X(x, {
|
|
3970
3970
|
isOpen: n,
|
|
3971
3971
|
onClose: r,
|
|
3972
3972
|
size: a,
|
|
3973
3973
|
modal: !0,
|
|
3974
3974
|
title: i,
|
|
3975
|
-
primaryAction:
|
|
3976
|
-
secondaryAction:
|
|
3975
|
+
primaryAction: C,
|
|
3976
|
+
secondaryAction: w,
|
|
3977
3977
|
disableContentPadding: !0,
|
|
3978
3978
|
children: /* @__PURE__ */ X(Vu, {
|
|
3979
3979
|
currentStep: h.currentStep,
|
|
@@ -4005,13 +4005,13 @@ Ju.displayName = "F0Wizard", R(Ju);
|
|
|
4005
4005
|
//#region src/blocks/F0WizardForm/F0WizardForm.tsx
|
|
4006
4006
|
function Yu(e) {
|
|
4007
4007
|
let t = ui(e).shape, n = Object.entries(t);
|
|
4008
|
-
return n.length !== 0 && n.every(([, e]) =>
|
|
4008
|
+
return n.length !== 0 && n.every(([, e]) => Nr(e)?.disabled === !0);
|
|
4009
4009
|
}
|
|
4010
4010
|
function Xu(e, t) {
|
|
4011
4011
|
if (t) return Object.keys(t);
|
|
4012
4012
|
let n = ui(e).shape, r = /* @__PURE__ */ new Set();
|
|
4013
4013
|
for (let e of Object.values(n)) {
|
|
4014
|
-
let t =
|
|
4014
|
+
let t = Nr(e);
|
|
4015
4015
|
t?.section && r.add(t.section);
|
|
4016
4016
|
}
|
|
4017
4017
|
return Array.from(r);
|
|
@@ -4019,10 +4019,10 @@ function Xu(e, t) {
|
|
|
4019
4019
|
function Zu(e, t) {
|
|
4020
4020
|
let n = e.shape, r = {};
|
|
4021
4021
|
for (let [e, i] of Object.entries(n)) {
|
|
4022
|
-
let n =
|
|
4022
|
+
let n = Nr(i);
|
|
4023
4023
|
n?.section && t.includes(n.section) && (r[e] = i);
|
|
4024
4024
|
}
|
|
4025
|
-
return
|
|
4025
|
+
return ti(r);
|
|
4026
4026
|
}
|
|
4027
4027
|
function Qu(e, t, n) {
|
|
4028
4028
|
let r = t ?? {};
|
|
@@ -4047,7 +4047,7 @@ function ed() {
|
|
|
4047
4047
|
}, []), s = t === "success" ? r ?? e.actionBar.saved : void 0;
|
|
4048
4048
|
return {
|
|
4049
4049
|
showSuccess: o,
|
|
4050
|
-
ActionBar: K(() => /* @__PURE__ */ X(
|
|
4050
|
+
ActionBar: K(() => /* @__PURE__ */ X(Ke, {
|
|
4051
4051
|
isOpen: t === "success",
|
|
4052
4052
|
variant: "light",
|
|
4053
4053
|
status: t,
|
|
@@ -4224,7 +4224,7 @@ function rd({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4224
4224
|
});
|
|
4225
4225
|
}
|
|
4226
4226
|
function id({ sectionId: e, formName: t, schema: n, sectionConfig: r, defaultValues: i, onSubmit: a, submitConfig: o, errorTriggerMode: s, sectionForms: c, onErrorStateChange: l, renderCustomField: u, isLoading: d }) {
|
|
4227
|
-
let f =
|
|
4227
|
+
let f = ge();
|
|
4228
4228
|
G(() => (c[e] = f, () => {
|
|
4229
4229
|
c[e] = null;
|
|
4230
4230
|
}), [
|
|
@@ -4235,7 +4235,7 @@ function id({ sectionId: e, formName: t, schema: n, sectionConfig: r, defaultVal
|
|
|
4235
4235
|
let p = q(l);
|
|
4236
4236
|
return p.current = l, G(() => {
|
|
4237
4237
|
p.current(f.hasErrors);
|
|
4238
|
-
}, [f.hasErrors]), /* @__PURE__ */ X(
|
|
4238
|
+
}, [f.hasErrors]), /* @__PURE__ */ X(ht, {
|
|
4239
4239
|
formName: t,
|
|
4240
4240
|
sectionId: e,
|
|
4241
4241
|
schema: n,
|
|
@@ -4253,7 +4253,7 @@ function id({ sectionId: e, formName: t, schema: n, sectionConfig: r, defaultVal
|
|
|
4253
4253
|
});
|
|
4254
4254
|
}
|
|
4255
4255
|
function ad({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, width: a, size: o, defaultStepIndex: s, nextLabel: c, previousLabel: l, onStepChanged: u, allowStepSkipping: d, autoCloseOnLastStepSubmit: f, linkAfterLastStepSubmit: p, autoSkipCompletedSteps: m = !1, renderCustomField: h }) {
|
|
4256
|
-
let { name: g, schema: _, sections: v, defaultValues: y, onSubmit: b, submitConfig: x, errorTriggerMode: S = "on-blur" } = e, C = x?.label, w = K(() => ui(_), [_]), T = K(() => Xu(_, v), [_, v]), E = W((e) => Yu(Zu(w, e)), [w]), D =
|
|
4256
|
+
let { name: g, schema: _, sections: v, defaultValues: y, onSubmit: b, submitConfig: x, errorTriggerMode: S = "on-blur" } = e, C = x?.label, w = K(() => ui(_), [_]), T = K(() => Xu(_, v), [_, v]), E = W((e) => Yu(Zu(w, e)), [w]), D = ge(), O = q(y ? { ...y } : {}), k = q(s ?? 0), A = W((e) => async () => {
|
|
4257
4257
|
await D.submit();
|
|
4258
4258
|
}, [D]), j = W((e) => D.hasErrors, [D.hasErrors]), M = t ?? e.steps, N = K(() => M ?? T.map((e) => ({
|
|
4259
4259
|
title: v?.[e]?.title ?? e,
|
|
@@ -4298,13 +4298,13 @@ function ad({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4298
4298
|
j,
|
|
4299
4299
|
m,
|
|
4300
4300
|
P
|
|
4301
|
-
]), ee = q(null), te = q(null), { showSuccess: L, ActionBar: ne } = ed(),
|
|
4301
|
+
]), ee = q(null), te = q(null), { showSuccess: L, ActionBar: ne } = ed(), ie = W(async (e) => {
|
|
4302
4302
|
Object.assign(O.current, e);
|
|
4303
4303
|
let t = { ...O.current };
|
|
4304
4304
|
te.current = t;
|
|
4305
4305
|
let n = await b({ data: t });
|
|
4306
4306
|
return ee.current = n, n;
|
|
4307
|
-
}, [b]),
|
|
4307
|
+
}, [b]), ae = W(() => {
|
|
4308
4308
|
let e = ee.current;
|
|
4309
4309
|
if (e?.success) {
|
|
4310
4310
|
if (L(e.message), p) {
|
|
@@ -4317,7 +4317,7 @@ function ad({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4317
4317
|
p,
|
|
4318
4318
|
r,
|
|
4319
4319
|
L
|
|
4320
|
-
]),
|
|
4320
|
+
]), oe = W((e) => {
|
|
4321
4321
|
let t = D.getValues();
|
|
4322
4322
|
Object.assign(O.current, t), k.current = e, u?.(e);
|
|
4323
4323
|
}, [D, u]);
|
|
@@ -4331,19 +4331,19 @@ function ad({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4331
4331
|
nextLabel: c,
|
|
4332
4332
|
previousLabel: l,
|
|
4333
4333
|
submitLabel: C,
|
|
4334
|
-
onSubmit:
|
|
4335
|
-
onStepChanged:
|
|
4334
|
+
onSubmit: ae,
|
|
4335
|
+
onStepChanged: oe,
|
|
4336
4336
|
allowStepSkipping: d,
|
|
4337
4337
|
children: ({ currentStep: t }) => {
|
|
4338
4338
|
let n = nd(t, T, M), r = Zu(w, n), i = n.reduce((e, t) => (v?.[t] && (e[t] = v[t]), e), {});
|
|
4339
4339
|
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("div", {
|
|
4340
4340
|
className: "pb-5",
|
|
4341
|
-
children: /* @__PURE__ */ X(
|
|
4341
|
+
children: /* @__PURE__ */ X(re, {
|
|
4342
4342
|
name: `${g}-step-${t}`,
|
|
4343
4343
|
schema: r,
|
|
4344
4344
|
sections: i,
|
|
4345
4345
|
defaultValues: O.current,
|
|
4346
|
-
onSubmit:
|
|
4346
|
+
onSubmit: ie,
|
|
4347
4347
|
submitConfig: {
|
|
4348
4348
|
hideSubmitButton: !0,
|
|
4349
4349
|
hideActionBar: !0
|
|
@@ -4405,9 +4405,9 @@ function ud({ options: e, isOpen: t, onResolve: n }) {
|
|
|
4405
4405
|
function dd(e) {
|
|
4406
4406
|
return new Promise((t) => {
|
|
4407
4407
|
let n = e.id ?? Ee(), r = !1, i = (e) => {
|
|
4408
|
-
r || (r = !0, t(e),
|
|
4408
|
+
r || (r = !0, t(e), Se(n));
|
|
4409
4409
|
};
|
|
4410
|
-
|
|
4410
|
+
C({
|
|
4411
4411
|
id: n,
|
|
4412
4412
|
onDismiss: () => i({ completed: !1 }),
|
|
4413
4413
|
render: ({ isOpen: t }) => /* @__PURE__ */ X(ud, {
|
|
@@ -4422,7 +4422,7 @@ function dd(e) {
|
|
|
4422
4422
|
//#region src/facade/forms/forms.ts
|
|
4423
4423
|
function fd(e) {
|
|
4424
4424
|
let { mode: t, ...n } = e;
|
|
4425
|
-
return t === "wizard" ? dd(n) :
|
|
4425
|
+
return t === "wizard" ? dd(n) : we(n);
|
|
4426
4426
|
}
|
|
4427
4427
|
var pd = { open: fd }, md = [
|
|
4428
4428
|
"escape",
|
|
@@ -4437,8 +4437,8 @@ var pd = { open: fd }, md = [
|
|
|
4437
4437
|
className: "flex justify-between text-sm text-f1-foreground-secondary",
|
|
4438
4438
|
children: [/* @__PURE__ */ X("span", { children: e }), /* @__PURE__ */ X("span", { children: t })]
|
|
4439
4439
|
}), _d = ({ visible: e, content: t, style: n }) => {
|
|
4440
|
-
let r =
|
|
4441
|
-
return /* @__PURE__ */ X(
|
|
4440
|
+
let r = er() ? 0 : .15;
|
|
4441
|
+
return /* @__PURE__ */ X(Zn, { children: e ? /* @__PURE__ */ X(Jn.div, {
|
|
4442
4442
|
initial: {
|
|
4443
4443
|
opacity: 0,
|
|
4444
4444
|
x: "-50%",
|
|
@@ -4466,9 +4466,9 @@ var pd = { open: fd }, md = [
|
|
|
4466
4466
|
"aria-label": "Loading slider",
|
|
4467
4467
|
"aria-busy": "true",
|
|
4468
4468
|
"aria-live": "polite",
|
|
4469
|
-
children: [e ? null : /* @__PURE__ */ X(
|
|
4469
|
+
children: [e ? null : /* @__PURE__ */ X(_n, { className: "h-4 w-24 rounded-md" }), /* @__PURE__ */ X("div", {
|
|
4470
4470
|
className: "flex items-center py-2",
|
|
4471
|
-
children: /* @__PURE__ */ X(
|
|
4471
|
+
children: /* @__PURE__ */ X(_n, { className: "h-1.5 w-full rounded-full" })
|
|
4472
4472
|
})]
|
|
4473
4473
|
}), yd = to({
|
|
4474
4474
|
base: "relative h-1.5 grow overflow-hidden rounded-full bg-f1-background-tertiary",
|
|
@@ -4558,14 +4558,14 @@ var pd = { open: fd }, md = [
|
|
|
4558
4558
|
onMouseEnter: () => P(!0),
|
|
4559
4559
|
onMouseLeave: () => P(!1),
|
|
4560
4560
|
children: [
|
|
4561
|
-
/* @__PURE__ */ X(
|
|
4561
|
+
/* @__PURE__ */ X(sr, {
|
|
4562
4562
|
className: yd({ status: re }),
|
|
4563
|
-
children: /* @__PURE__ */ X(
|
|
4563
|
+
children: /* @__PURE__ */ X(_i, { className: bd({
|
|
4564
4564
|
status: re,
|
|
4565
4565
|
disabled: c
|
|
4566
4566
|
}) })
|
|
4567
4567
|
}),
|
|
4568
|
-
/* @__PURE__ */ X(
|
|
4568
|
+
/* @__PURE__ */ X(Kr, {
|
|
4569
4569
|
id: S,
|
|
4570
4570
|
"aria-label": ie ? void 0 : T,
|
|
4571
4571
|
"aria-labelledby": ie ? C : void 0,
|
|
@@ -4579,7 +4579,7 @@ var pd = { open: fd }, md = [
|
|
|
4579
4579
|
className: B(Sd({
|
|
4580
4580
|
status: re,
|
|
4581
4581
|
disabled: c
|
|
4582
|
-
}),
|
|
4582
|
+
}), Dn("focus-visible:ring-offset-1")),
|
|
4583
4583
|
onFocus: () => I(!L.current),
|
|
4584
4584
|
onBlur: () => I(!1)
|
|
4585
4585
|
}),
|
|
@@ -4604,7 +4604,7 @@ var pd = { open: fd }, md = [
|
|
|
4604
4604
|
});
|
|
4605
4605
|
});
|
|
4606
4606
|
Cd.displayName = "F0Slider";
|
|
4607
|
-
var wd =
|
|
4607
|
+
var wd = gn("F0Slider", ua(R(Cd), vd)), Td = [
|
|
4608
4608
|
"completed",
|
|
4609
4609
|
"in-progress",
|
|
4610
4610
|
"not-started",
|
|
@@ -4762,7 +4762,7 @@ function zd({ title: e, items: t, className: n, activeItem: r, collapsible: i =
|
|
|
4762
4762
|
children: [/* @__PURE__ */ X(ss, {
|
|
4763
4763
|
asChild: !0,
|
|
4764
4764
|
children: /* @__PURE__ */ X("button", {
|
|
4765
|
-
className: B(
|
|
4765
|
+
className: B(Dn(), "flex cursor-pointer items-center rounded-md px-1.5 py-1", n),
|
|
4766
4766
|
"aria-label": e ?? "Menu",
|
|
4767
4767
|
children: /* @__PURE__ */ X(Nd, {
|
|
4768
4768
|
items: t,
|
|
@@ -4778,7 +4778,7 @@ function zd({ title: e, items: t, className: n, activeItem: r, collapsible: i =
|
|
|
4778
4778
|
sideOffset: -28,
|
|
4779
4779
|
container: d,
|
|
4780
4780
|
className: B(Rd({ size: l }), !e && "pt-2", "scrollbar-macos"),
|
|
4781
|
-
children: /* @__PURE__ */ X(
|
|
4781
|
+
children: /* @__PURE__ */ X(It, {
|
|
4782
4782
|
title: e,
|
|
4783
4783
|
items: t,
|
|
4784
4784
|
activeItem: r,
|
|
@@ -4791,7 +4791,7 @@ function zd({ title: e, items: t, className: n, activeItem: r, collapsible: i =
|
|
|
4791
4791
|
})]
|
|
4792
4792
|
});
|
|
4793
4793
|
}
|
|
4794
|
-
var Bd = R(
|
|
4794
|
+
var Bd = R(gn("F0TableOfContentPopover", zd));
|
|
4795
4795
|
//#endregion
|
|
4796
4796
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/Form/utils.ts
|
|
4797
4797
|
function Vd(e) {
|
|
@@ -4885,7 +4885,7 @@ function Gd(e) {
|
|
|
4885
4885
|
}
|
|
4886
4886
|
//#endregion
|
|
4887
4887
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/ApplyingChangesTag/ApplyingChangesTag.tsx
|
|
4888
|
-
var Kd =
|
|
4888
|
+
var Kd = Jn.create(gr), qd = Cc(() => {
|
|
4889
4889
|
let e = z();
|
|
4890
4890
|
return /* @__PURE__ */ Z("div", {
|
|
4891
4891
|
className: "flex flex-row items-center gap-1 rounded-full border border-solid border-f1-border-secondary bg-f1-background px-2 py-1.5 pr-2.5 shadow-md",
|
|
@@ -5022,15 +5022,15 @@ var Kd = qn.create(hr), qd = Cc(() => {
|
|
|
5022
5022
|
return t;
|
|
5023
5023
|
}, nf = bc(void 0);
|
|
5024
5024
|
function rf({ elements: e, children: t, disabled: n, answering: r, disallowOptionalQuestions: i, onChange: a, allowedQuestionTypes: o, errors: s, onFieldBlur: c, useUpload: l, datasets: u, placeholders: d, labels: f, skipDefaultSection: p }) {
|
|
5025
|
-
let m =
|
|
5026
|
-
|
|
5027
|
-
let
|
|
5028
|
-
|
|
5029
|
-
let
|
|
5025
|
+
let m = oe(o), h = oe(s), g = oe(u), _ = oe(d), v = oe(f), y = q(e);
|
|
5026
|
+
y.current = e;
|
|
5027
|
+
let b = q(a);
|
|
5028
|
+
b.current = a;
|
|
5029
|
+
let x = K(() => {
|
|
5030
5030
|
let t = e[e.length - 1];
|
|
5031
5031
|
if (t) return t.type === "section" ? t.section.id : t.question.id;
|
|
5032
|
-
}, [e]),
|
|
5033
|
-
let t = e.id, n =
|
|
5032
|
+
}, [e]), S = W((e) => {
|
|
5033
|
+
let t = e.id, n = y.current.map((n) => {
|
|
5034
5034
|
if (n.type === "question") return n.question.id === t ? {
|
|
5035
5035
|
...n,
|
|
5036
5036
|
question: {
|
|
@@ -5053,23 +5053,23 @@ function rf({ elements: e, children: t, disabled: n, answering: r, disallowOptio
|
|
|
5053
5053
|
}
|
|
5054
5054
|
return n;
|
|
5055
5055
|
});
|
|
5056
|
-
|
|
5057
|
-
}, []),
|
|
5058
|
-
let t = e.id, n =
|
|
5056
|
+
b.current(n);
|
|
5057
|
+
}, []), C = W((e) => {
|
|
5058
|
+
let t = e.id, n = y.current.map((n) => n.type === "section" && n.section.id === t ? {
|
|
5059
5059
|
...n,
|
|
5060
5060
|
section: {
|
|
5061
5061
|
...n.section,
|
|
5062
5062
|
...e
|
|
5063
5063
|
}
|
|
5064
5064
|
} : n);
|
|
5065
|
-
|
|
5066
|
-
}, []),
|
|
5067
|
-
let n = [...
|
|
5065
|
+
b.current(n);
|
|
5066
|
+
}, []), w = W(({ element: e, afterId: t }) => {
|
|
5067
|
+
let n = [...y.current];
|
|
5068
5068
|
t ? (((t) => {
|
|
5069
5069
|
n.forEach((r, i) => {
|
|
5070
5070
|
r.type === "section" && r.section.id === t && n.splice(i + 1, 0, e), r.type === "question" && r.question.id === t && n.splice(i + 1, 0, e);
|
|
5071
5071
|
});
|
|
5072
|
-
})(t), e.type === "question" && n.length ===
|
|
5072
|
+
})(t), e.type === "question" && n.length === y.current.length && n.forEach((r, i) => {
|
|
5073
5073
|
if (r.type !== "section") return;
|
|
5074
5074
|
let a = [...r.section.questions ?? []];
|
|
5075
5075
|
a?.forEach((n, r) => {
|
|
@@ -5081,8 +5081,8 @@ function rf({ elements: e, children: t, disabled: n, answering: r, disallowOptio
|
|
|
5081
5081
|
questions: a
|
|
5082
5082
|
}
|
|
5083
5083
|
});
|
|
5084
|
-
}),
|
|
5085
|
-
}, []),
|
|
5084
|
+
}), b.current(n)) : (n.push(e), b.current(n));
|
|
5085
|
+
}, []), T = W(({ type: e, afterId: t, datasetKey: n }) => {
|
|
5086
5086
|
if ((e === "dropdown-single" || e === "dropdown-multi") && !n) throw Error(`${e} questions require a datasetKey`);
|
|
5087
5087
|
let r = $d(e === "section" ? "section" : "question"), i = tf(m), a = e === "section" ? {
|
|
5088
5088
|
type: "section",
|
|
@@ -5110,12 +5110,12 @@ function rf({ elements: e, children: t, disabled: n, answering: r, disallowOptio
|
|
|
5110
5110
|
...n ? { datasetKey: n } : {}
|
|
5111
5111
|
}
|
|
5112
5112
|
};
|
|
5113
|
-
|
|
5113
|
+
w({
|
|
5114
5114
|
element: a,
|
|
5115
5115
|
afterId: t
|
|
5116
5116
|
});
|
|
5117
|
-
}, [
|
|
5118
|
-
let t =
|
|
5117
|
+
}, [w, m]), E = W(({ elementId: e }) => {
|
|
5118
|
+
let t = y.current.flatMap((e) => e.type === "section" ? [e, ...e.section.questions ?? []] : [e.question]).find((t) => t.type === "section" ? t.section.id === e : t.id === e), n;
|
|
5119
5119
|
t && (n = t.type === "section" ? {
|
|
5120
5120
|
...t,
|
|
5121
5121
|
section: {
|
|
@@ -5132,78 +5132,78 @@ function rf({ elements: e, children: t, disabled: n, answering: r, disallowOptio
|
|
|
5132
5132
|
...t,
|
|
5133
5133
|
id: $d("question")
|
|
5134
5134
|
}
|
|
5135
|
-
}), n &&
|
|
5135
|
+
}), n && w({
|
|
5136
5136
|
element: n,
|
|
5137
5137
|
afterId: e
|
|
5138
5138
|
});
|
|
5139
|
-
}, [
|
|
5140
|
-
let t =
|
|
5141
|
-
t.length ===
|
|
5139
|
+
}, [w]), D = W((e) => y.current.flatMap((e) => e.type === "question" ? [e.question] : e.section.questions ?? []).find((t) => t?.id === e), []), O = W((e) => {
|
|
5140
|
+
let t = y.current.filter((t) => t.type === "section" ? t.section.id !== e : t.type !== "question" || t.question.id !== e);
|
|
5141
|
+
t.length === y.current.length && (t = t.map((t) => t.type === "section" ? {
|
|
5142
5142
|
...t,
|
|
5143
5143
|
section: {
|
|
5144
5144
|
...t.section,
|
|
5145
5145
|
questions: t.section.questions?.filter((t) => t.id !== e)
|
|
5146
5146
|
}
|
|
5147
|
-
} : t)),
|
|
5148
|
-
}, []),
|
|
5149
|
-
let t =
|
|
5147
|
+
} : t)), b.current(t);
|
|
5148
|
+
}, []), k = W((e) => {
|
|
5149
|
+
let t = y.current.find((t) => t.type === "section" && t.section.questions?.some((t) => t.id === e));
|
|
5150
5150
|
return t?.type === "section" && t?.section.questions?.length === 1;
|
|
5151
|
-
}, []),
|
|
5152
|
-
let t =
|
|
5151
|
+
}, []), A = W((e) => {
|
|
5152
|
+
let t = y.current.find((t) => t.type === "section" && t.section.questions?.some((t) => t.id === e));
|
|
5153
5153
|
return t?.type === "section" ? t.section : void 0;
|
|
5154
|
-
}, []),
|
|
5154
|
+
}, []), j = q(!0), M = !e.length;
|
|
5155
5155
|
G(() => {
|
|
5156
|
-
|
|
5156
|
+
j.current && (j.current = !1, M && !n && !r && !p && T({ type: "section" }));
|
|
5157
5157
|
}, [
|
|
5158
|
-
|
|
5159
|
-
|
|
5158
|
+
M,
|
|
5159
|
+
T,
|
|
5160
5160
|
n,
|
|
5161
5161
|
r,
|
|
5162
5162
|
p
|
|
5163
5163
|
]);
|
|
5164
|
-
let
|
|
5165
|
-
onQuestionChange:
|
|
5166
|
-
onSectionChange:
|
|
5167
|
-
onAddNewElement:
|
|
5168
|
-
onDuplicateElement:
|
|
5169
|
-
getIsSingleQuestionInSection:
|
|
5170
|
-
getSectionContainingQuestion:
|
|
5164
|
+
let N = W((e) => e === "file" && !l ? !1 : !m || m.includes(e), [m, l]), P = K(() => ({
|
|
5165
|
+
onQuestionChange: S,
|
|
5166
|
+
onSectionChange: C,
|
|
5167
|
+
onAddNewElement: T,
|
|
5168
|
+
onDuplicateElement: E,
|
|
5169
|
+
getIsSingleQuestionInSection: k,
|
|
5170
|
+
getSectionContainingQuestion: A,
|
|
5171
5171
|
disabled: n,
|
|
5172
5172
|
answering: r,
|
|
5173
|
-
getQuestionById:
|
|
5174
|
-
deleteElement:
|
|
5175
|
-
lastElementId:
|
|
5173
|
+
getQuestionById: D,
|
|
5174
|
+
deleteElement: O,
|
|
5175
|
+
lastElementId: x,
|
|
5176
5176
|
disallowOptionalQuestions: i,
|
|
5177
|
-
isQuestionTypeAllowed:
|
|
5177
|
+
isQuestionTypeAllowed: N,
|
|
5178
5178
|
errors: h,
|
|
5179
5179
|
onFieldBlur: c,
|
|
5180
5180
|
useUpload: l,
|
|
5181
5181
|
datasets: g,
|
|
5182
|
-
placeholders:
|
|
5183
|
-
labels:
|
|
5182
|
+
placeholders: _,
|
|
5183
|
+
labels: v
|
|
5184
5184
|
}), [
|
|
5185
|
+
S,
|
|
5185
5186
|
C,
|
|
5186
|
-
|
|
5187
|
+
T,
|
|
5187
5188
|
E,
|
|
5188
|
-
|
|
5189
|
+
k,
|
|
5189
5190
|
A,
|
|
5190
|
-
j,
|
|
5191
5191
|
n,
|
|
5192
5192
|
r,
|
|
5193
|
+
D,
|
|
5193
5194
|
O,
|
|
5194
|
-
|
|
5195
|
-
S,
|
|
5195
|
+
x,
|
|
5196
5196
|
i,
|
|
5197
|
-
|
|
5197
|
+
N,
|
|
5198
5198
|
h,
|
|
5199
5199
|
c,
|
|
5200
5200
|
l,
|
|
5201
5201
|
g,
|
|
5202
|
-
|
|
5203
|
-
|
|
5202
|
+
_,
|
|
5203
|
+
v
|
|
5204
5204
|
]);
|
|
5205
5205
|
return /* @__PURE__ */ X(nf.Provider, {
|
|
5206
|
-
value:
|
|
5206
|
+
value: P,
|
|
5207
5207
|
children: t
|
|
5208
5208
|
});
|
|
5209
5209
|
}
|
|
@@ -5241,7 +5241,7 @@ var lf = () => {
|
|
|
5241
5241
|
let { isQuestionTypeAllowed: e, datasets: t } = af(), { t: n } = z(), r = [
|
|
5242
5242
|
{
|
|
5243
5243
|
label: n("surveyFormBuilder.questionTypes.rating"),
|
|
5244
|
-
icon:
|
|
5244
|
+
icon: sa,
|
|
5245
5245
|
questionType: "rating"
|
|
5246
5246
|
},
|
|
5247
5247
|
{
|
|
@@ -5256,32 +5256,32 @@ var lf = () => {
|
|
|
5256
5256
|
},
|
|
5257
5257
|
{
|
|
5258
5258
|
label: n("surveyFormBuilder.questionTypes.text"),
|
|
5259
|
-
icon:
|
|
5259
|
+
icon: Vi,
|
|
5260
5260
|
questionType: "text"
|
|
5261
5261
|
},
|
|
5262
5262
|
{
|
|
5263
5263
|
label: n("surveyFormBuilder.questionTypes.longText"),
|
|
5264
|
-
icon:
|
|
5264
|
+
icon: Li,
|
|
5265
5265
|
questionType: "longText"
|
|
5266
5266
|
},
|
|
5267
5267
|
{
|
|
5268
5268
|
label: n("surveyFormBuilder.questionTypes.numeric"),
|
|
5269
|
-
icon:
|
|
5269
|
+
icon: si,
|
|
5270
5270
|
questionType: "numeric"
|
|
5271
5271
|
},
|
|
5272
5272
|
{
|
|
5273
5273
|
label: n("surveyFormBuilder.questionTypes.link"),
|
|
5274
|
-
icon:
|
|
5274
|
+
icon: Zi,
|
|
5275
5275
|
questionType: "link"
|
|
5276
5276
|
},
|
|
5277
5277
|
{
|
|
5278
5278
|
label: n("surveyFormBuilder.questionTypes.date"),
|
|
5279
|
-
icon:
|
|
5279
|
+
icon: Xi,
|
|
5280
5280
|
questionType: "date"
|
|
5281
5281
|
},
|
|
5282
5282
|
{
|
|
5283
5283
|
label: n("surveyFormBuilder.questionTypes.file"),
|
|
5284
|
-
icon:
|
|
5284
|
+
icon: Ri,
|
|
5285
5285
|
questionType: "file"
|
|
5286
5286
|
},
|
|
5287
5287
|
{
|
|
@@ -5297,17 +5297,17 @@ var lf = () => {
|
|
|
5297
5297
|
})) : [];
|
|
5298
5298
|
return [...r, ...i];
|
|
5299
5299
|
}, uf = {
|
|
5300
|
-
rating:
|
|
5300
|
+
rating: sa,
|
|
5301
5301
|
"multi-select": pi,
|
|
5302
5302
|
select: Hs,
|
|
5303
|
-
text:
|
|
5304
|
-
longText:
|
|
5305
|
-
numeric:
|
|
5306
|
-
link:
|
|
5307
|
-
date:
|
|
5303
|
+
text: Vi,
|
|
5304
|
+
longText: Li,
|
|
5305
|
+
numeric: si,
|
|
5306
|
+
link: Zi,
|
|
5307
|
+
date: Xi,
|
|
5308
5308
|
"dropdown-single": co,
|
|
5309
5309
|
"dropdown-multi": co,
|
|
5310
|
-
file:
|
|
5310
|
+
file: Ri,
|
|
5311
5311
|
checkbox: Us
|
|
5312
5312
|
}, df = () => {
|
|
5313
5313
|
let { disabled: e, answering: t, onAddNewElement: n, isQuestionTypeAllowed: r, labels: i } = af(), [a, o] = J(!1), s = lf(), { t: c } = z(), l = i?.addQuestion ?? c("surveyFormBuilder.actions.addQuestion"), u = (e, t) => {
|
|
@@ -5341,7 +5341,7 @@ var lf = () => {
|
|
|
5341
5341
|
children: /* @__PURE__ */ Z("div", {
|
|
5342
5342
|
className: "flex w-full flex-row items-center gap-2",
|
|
5343
5343
|
children: [/* @__PURE__ */ X(H, {
|
|
5344
|
-
icon:
|
|
5344
|
+
icon: ra,
|
|
5345
5345
|
color: "default"
|
|
5346
5346
|
}), /* @__PURE__ */ X("span", {
|
|
5347
5347
|
className: "flex-1 text-base font-medium",
|
|
@@ -5409,7 +5409,7 @@ var lf = () => {
|
|
|
5409
5409
|
});
|
|
5410
5410
|
}, ff = ({ open: e, onConfirm: t, onCancel: n }) => {
|
|
5411
5411
|
let { t: r } = z();
|
|
5412
|
-
return /* @__PURE__ */ X(
|
|
5412
|
+
return /* @__PURE__ */ X(Be, {
|
|
5413
5413
|
open: e,
|
|
5414
5414
|
onClose: n,
|
|
5415
5415
|
header: {
|
|
@@ -5574,7 +5574,7 @@ var vf = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(n
|
|
|
5574
5574
|
className: "flex w-full flex-row items-center gap-2",
|
|
5575
5575
|
children: [
|
|
5576
5576
|
/* @__PURE__ */ X(eo, {
|
|
5577
|
-
icon:
|
|
5577
|
+
icon: Mi,
|
|
5578
5578
|
color: "default"
|
|
5579
5579
|
}),
|
|
5580
5580
|
/* @__PURE__ */ X("span", {
|
|
@@ -5715,11 +5715,11 @@ var vf = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(n
|
|
|
5715
5715
|
let { t: a } = z(), { labels: o } = af();
|
|
5716
5716
|
return !e && !t ? null : /* @__PURE__ */ Z(Y, { children: [n ? /* @__PURE__ */ X(sc, {}) : null, /* @__PURE__ */ Z(rc, { children: [e ? /* @__PURE__ */ X(bf, {
|
|
5717
5717
|
label: o?.duplicateQuestion ?? a("surveyFormBuilder.actions.duplicateQuestion"),
|
|
5718
|
-
icon:
|
|
5718
|
+
icon: ji,
|
|
5719
5719
|
onClick: r
|
|
5720
5720
|
}) : null, t ? /* @__PURE__ */ X(bf, {
|
|
5721
5721
|
label: o?.deleteQuestion ?? a("surveyFormBuilder.actions.deleteQuestion"),
|
|
5722
|
-
icon:
|
|
5722
|
+
icon: fr,
|
|
5723
5723
|
onClick: i,
|
|
5724
5724
|
critical: !0
|
|
5725
5725
|
}) : null] })] });
|
|
@@ -5754,7 +5754,7 @@ function Sf({ open: e, setOpen: t, questionId: n, questionType: r, canDeleteQues
|
|
|
5754
5754
|
}),
|
|
5755
5755
|
T ? /* @__PURE__ */ X(rc, { children: /* @__PURE__ */ X(vf, {
|
|
5756
5756
|
label: o("surveyFormBuilder.labels.required"),
|
|
5757
|
-
icon:
|
|
5757
|
+
icon: Ei,
|
|
5758
5758
|
checked: !!l?.required,
|
|
5759
5759
|
onChange: _
|
|
5760
5760
|
}) }) : null,
|
|
@@ -5798,43 +5798,43 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5798
5798
|
className: t,
|
|
5799
5799
|
children: n
|
|
5800
5800
|
});
|
|
5801
|
-
return e ? /* @__PURE__ */ X(
|
|
5801
|
+
return e ? /* @__PURE__ */ X(qn, {
|
|
5802
5802
|
instant: !0,
|
|
5803
5803
|
...e,
|
|
5804
5804
|
children: r
|
|
5805
5805
|
}) : r;
|
|
5806
|
-
}, wf = ({ id: e, title: t, description: n, children: r, required:
|
|
5807
|
-
let { onQuestionChange:
|
|
5808
|
-
|
|
5806
|
+
}, wf = ({ id: e, title: t, description: n, children: r, required: i, type: a, hiddenActions: o, locked: s, lockedFields: c, lockedNote: l }) => {
|
|
5807
|
+
let { onQuestionChange: u, onAddNewElement: d, disabled: f, answering: p, getIsSingleQuestionInSection: m, getSectionContainingQuestion: h, isQuestionTypeAllowed: g, placeholders: _, labels: v } = af(), y = h(e), b = !!y?.locked || !!s, x = b || !!c?.includes("title"), S = b || !!c?.includes("description"), C = !b && (x || S), w = !!y, [T, E] = J(!1), [D, O] = J(!1), { isDragging: k } = cf(), { t: A } = z(), j = _?.questionTitle ?? A("surveyFormBuilder.labels.titlePlaceholder"), M = v?.addQuestion ?? A("surveyFormBuilder.actions.addQuestion"), N = _?.questionDescription ?? A("surveyFormBuilder.labels.questionDescriptionPlaceholder"), P = (t) => {
|
|
5808
|
+
u?.({
|
|
5809
5809
|
id: e,
|
|
5810
|
-
type:
|
|
5810
|
+
type: a,
|
|
5811
5811
|
title: t.target.value
|
|
5812
5812
|
});
|
|
5813
|
-
},
|
|
5814
|
-
|
|
5813
|
+
}, F = (t) => {
|
|
5814
|
+
u?.({
|
|
5815
5815
|
id: e,
|
|
5816
|
-
type:
|
|
5816
|
+
type: a,
|
|
5817
5817
|
description: t.target.value
|
|
5818
5818
|
});
|
|
5819
|
-
},
|
|
5820
|
-
|
|
5819
|
+
}, I = (t, n) => {
|
|
5820
|
+
d?.({
|
|
5821
5821
|
type: t,
|
|
5822
5822
|
afterId: e,
|
|
5823
5823
|
datasetKey: n
|
|
5824
5824
|
});
|
|
5825
|
-
},
|
|
5826
|
-
|
|
5825
|
+
}, ee = () => {
|
|
5826
|
+
d?.({
|
|
5827
5827
|
type: "section",
|
|
5828
5828
|
afterId: e
|
|
5829
5829
|
});
|
|
5830
|
-
},
|
|
5830
|
+
}, te = lf(), L = te.filter((e) => !e.datasetKey), ne = Array.from(new Set(te.filter((e) => !!e.datasetKey).map((e) => e.datasetKey))), re = m(e), ie = q(null), ae = q(!re);
|
|
5831
5831
|
G(() => {
|
|
5832
|
-
|
|
5832
|
+
ae.current && ie.current?.focus({ preventScroll: !0 });
|
|
5833
5833
|
}, []);
|
|
5834
|
-
let
|
|
5834
|
+
let oe = f || x || p, se = f || S || p, ce = !se || !!n, le = b || C ? { description: l?.description ?? y?.lockedNote?.description ?? A("surveyFormBuilder.labels.lockedQuestionNotice") } : null;
|
|
5835
5835
|
return /* @__PURE__ */ Z("div", {
|
|
5836
5836
|
id: `co-creation-question-${e}`,
|
|
5837
|
-
className: B("group/question relative flex w-full flex-col rounded-xl border border-solid border-f1-border bg-f1-background px-3 py-3",
|
|
5837
|
+
className: B("group/question relative flex w-full flex-col rounded-xl border border-solid border-f1-border bg-f1-background px-3 py-3", b && !p && "cursor-not-allowed [&_*]:!cursor-not-allowed", !k && !p && !b && "hover:border-f1-border-hover", ce ? "gap-4" : "gap-2"),
|
|
5838
5838
|
children: [
|
|
5839
5839
|
/* @__PURE__ */ Z("div", {
|
|
5840
5840
|
className: "flex flex-col gap-0.5",
|
|
@@ -5843,40 +5843,40 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5843
5843
|
children: [
|
|
5844
5844
|
/* @__PURE__ */ X(Cf, {
|
|
5845
5845
|
className: "relative w-full",
|
|
5846
|
-
notice:
|
|
5847
|
-
children:
|
|
5846
|
+
notice: C && x ? le : null,
|
|
5847
|
+
children: p ? /* @__PURE__ */ Z("div", {
|
|
5848
5848
|
className: "w-full whitespace-pre-wrap break-words px-2 py-1 text-lg font-semibold text-f1-foreground",
|
|
5849
|
-
children: [t ||
|
|
5849
|
+
children: [t || j, i ? /* @__PURE__ */ X("span", {
|
|
5850
5850
|
className: "text-f1-foreground-critical",
|
|
5851
5851
|
children: " *"
|
|
5852
5852
|
}) : null]
|
|
5853
5853
|
}) : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("textarea", {
|
|
5854
|
-
ref:
|
|
5854
|
+
ref: ie,
|
|
5855
5855
|
value: t,
|
|
5856
|
-
"aria-label":
|
|
5857
|
-
placeholder:
|
|
5858
|
-
onChange:
|
|
5859
|
-
disabled:
|
|
5860
|
-
className: B("w-full [field-sizing:content] resize-none px-2 py-1 text-lg font-semibold text-f1-foreground placeholder:text-f1-foreground-tertiary [&::-webkit-search-cancel-button]:hidden", !
|
|
5856
|
+
"aria-label": A("surveyFormBuilder.labels.title"),
|
|
5857
|
+
placeholder: j,
|
|
5858
|
+
onChange: P,
|
|
5859
|
+
disabled: oe,
|
|
5860
|
+
className: B("w-full [field-sizing:content] resize-none px-2 py-1 text-lg font-semibold text-f1-foreground placeholder:text-f1-foreground-tertiary [&::-webkit-search-cancel-button]:hidden", !p && oe && "!cursor-not-allowed")
|
|
5861
5861
|
}), /* @__PURE__ */ Z("div", {
|
|
5862
5862
|
className: "textarea-overlay pointer-events-none absolute left-0 top-0 h-full w-full whitespace-pre-wrap break-words px-2 py-1 text-lg font-semibold",
|
|
5863
5863
|
children: [/* @__PURE__ */ X("span", {
|
|
5864
5864
|
className: "opacity-0",
|
|
5865
|
-
children: t ||
|
|
5866
|
-
}),
|
|
5865
|
+
children: t || j
|
|
5866
|
+
}), i ? /* @__PURE__ */ Z("span", {
|
|
5867
5867
|
className: B("text-f1-foreground-critical", !t && "text-f1-foreground-secondary"),
|
|
5868
5868
|
children: [" ", "*"]
|
|
5869
5869
|
}) : null]
|
|
5870
5870
|
})] })
|
|
5871
5871
|
}),
|
|
5872
|
-
!
|
|
5872
|
+
!p && b ? /* @__PURE__ */ X("div", { children: le ? /* @__PURE__ */ X(qn, {
|
|
5873
5873
|
instant: !0,
|
|
5874
|
-
...
|
|
5874
|
+
...le,
|
|
5875
5875
|
children: /* @__PURE__ */ X("span", {
|
|
5876
5876
|
className: "inline-flex",
|
|
5877
5877
|
children: /* @__PURE__ */ X(V, {
|
|
5878
5878
|
icon: Gs,
|
|
5879
|
-
label:
|
|
5879
|
+
label: A("surveyFormBuilder.labels.locked"),
|
|
5880
5880
|
size: "md",
|
|
5881
5881
|
variant: "ghost",
|
|
5882
5882
|
tooltip: !1,
|
|
@@ -5887,7 +5887,7 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5887
5887
|
})
|
|
5888
5888
|
}) : /* @__PURE__ */ X(V, {
|
|
5889
5889
|
icon: Gs,
|
|
5890
|
-
label:
|
|
5890
|
+
label: A("surveyFormBuilder.labels.locked"),
|
|
5891
5891
|
size: "md",
|
|
5892
5892
|
variant: "ghost",
|
|
5893
5893
|
tooltip: !1,
|
|
@@ -5895,48 +5895,48 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5895
5895
|
disabled: !0,
|
|
5896
5896
|
withoutDisabledAppearance: !0
|
|
5897
5897
|
}) }) : null,
|
|
5898
|
-
!
|
|
5899
|
-
className: B("opacity-0 group-hover/question:opacity-100",
|
|
5898
|
+
!f && !p && !b ? /* @__PURE__ */ X("div", {
|
|
5899
|
+
className: B("opacity-0 group-hover/question:opacity-100", D && "opacity-100"),
|
|
5900
5900
|
children: /* @__PURE__ */ X(Sf, {
|
|
5901
|
-
open:
|
|
5902
|
-
setOpen:
|
|
5901
|
+
open: D,
|
|
5902
|
+
setOpen: O,
|
|
5903
5903
|
questionId: e,
|
|
5904
|
-
questionType:
|
|
5905
|
-
canDeleteQuestion: !
|
|
5906
|
-
hiddenActions:
|
|
5904
|
+
questionType: a,
|
|
5905
|
+
canDeleteQuestion: !w || !re,
|
|
5906
|
+
hiddenActions: o
|
|
5907
5907
|
})
|
|
5908
5908
|
}) : null
|
|
5909
5909
|
]
|
|
5910
|
-
}),
|
|
5910
|
+
}), p ? n ? /* @__PURE__ */ X("p", {
|
|
5911
5911
|
className: "w-full whitespace-pre-wrap break-words px-2 text-f1-foreground-secondary",
|
|
5912
5912
|
children: n
|
|
5913
|
-
}) : null :
|
|
5914
|
-
notice:
|
|
5913
|
+
}) : null : ce ? /* @__PURE__ */ X(Cf, {
|
|
5914
|
+
notice: C && S ? le : null,
|
|
5915
5915
|
children: /* @__PURE__ */ X("textarea", {
|
|
5916
5916
|
value: n,
|
|
5917
|
-
"aria-label":
|
|
5918
|
-
placeholder:
|
|
5919
|
-
onChange:
|
|
5920
|
-
disabled:
|
|
5921
|
-
className: B("w-full [field-sizing:content] resize-none px-2 text-f1-foreground-secondary placeholder:text-f1-foreground-tertiary disabled:text-f1-foreground-secondary [&::-webkit-search-cancel-button]:hidden", !
|
|
5917
|
+
"aria-label": A("surveyFormBuilder.labels.description"),
|
|
5918
|
+
placeholder: N,
|
|
5919
|
+
onChange: F,
|
|
5920
|
+
disabled: se,
|
|
5921
|
+
className: B("w-full [field-sizing:content] resize-none px-2 text-f1-foreground-secondary placeholder:text-f1-foreground-tertiary disabled:text-f1-foreground-secondary [&::-webkit-search-cancel-button]:hidden", !p && se && "!cursor-not-allowed")
|
|
5922
5922
|
})
|
|
5923
5923
|
}) : null]
|
|
5924
5924
|
}),
|
|
5925
5925
|
r,
|
|
5926
|
-
|
|
5926
|
+
p ? /* @__PURE__ */ X(Ze, {
|
|
5927
5927
|
className: "-mt-2",
|
|
5928
|
-
fallback:
|
|
5928
|
+
fallback: A(i ? "forms.validation.required" : "forms.validation.invalidType")
|
|
5929
5929
|
}) : null,
|
|
5930
|
-
!
|
|
5931
|
-
className: B("absolute bottom-0 left-1/2 translate-x-[-50%] translate-y-[50%] bg-f1-background opacity-0 group-hover/question:opacity-100",
|
|
5930
|
+
!f && !p && !b ? /* @__PURE__ */ X("div", {
|
|
5931
|
+
className: B("absolute bottom-0 left-1/2 translate-x-[-50%] translate-y-[50%] bg-f1-background opacity-0 group-hover/question:opacity-100", T && "opacity-100"),
|
|
5932
5932
|
children: /* @__PURE__ */ Z(Zs, {
|
|
5933
|
-
open:
|
|
5934
|
-
onOpenChange:
|
|
5933
|
+
open: T,
|
|
5934
|
+
onOpenChange: E,
|
|
5935
5935
|
children: [/* @__PURE__ */ X(ac, {
|
|
5936
5936
|
asChild: !0,
|
|
5937
5937
|
children: /* @__PURE__ */ X(V, {
|
|
5938
5938
|
icon: ao,
|
|
5939
|
-
label:
|
|
5939
|
+
label: M,
|
|
5940
5940
|
size: "sm",
|
|
5941
5941
|
variant: "outline",
|
|
5942
5942
|
hideLabel: !0
|
|
@@ -5945,21 +5945,21 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5945
5945
|
align: "center",
|
|
5946
5946
|
className: "w-80",
|
|
5947
5947
|
children: [
|
|
5948
|
-
|
|
5949
|
-
onClick:
|
|
5948
|
+
w ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(nc, {
|
|
5949
|
+
onClick: ee,
|
|
5950
5950
|
children: /* @__PURE__ */ Z("div", {
|
|
5951
5951
|
className: "flex w-full flex-row items-center gap-2",
|
|
5952
5952
|
children: [/* @__PURE__ */ X(H, {
|
|
5953
|
-
icon:
|
|
5953
|
+
icon: ra,
|
|
5954
5954
|
color: "default"
|
|
5955
5955
|
}), /* @__PURE__ */ X("span", {
|
|
5956
5956
|
className: "flex-1 text-base font-medium",
|
|
5957
|
-
children:
|
|
5957
|
+
children: A("surveyFormBuilder.questionTypes.section")
|
|
5958
5958
|
})]
|
|
5959
5959
|
})
|
|
5960
5960
|
}), /* @__PURE__ */ X(sc, {})] }),
|
|
5961
|
-
|
|
5962
|
-
onClick: () =>
|
|
5961
|
+
L.map((e) => /* @__PURE__ */ X(nc, {
|
|
5962
|
+
onClick: () => I(e.questionType),
|
|
5963
5963
|
children: /* @__PURE__ */ Z("div", {
|
|
5964
5964
|
className: "flex w-full flex-row items-center gap-2",
|
|
5965
5965
|
children: [/* @__PURE__ */ X(H, {
|
|
@@ -5971,8 +5971,8 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5971
5971
|
})]
|
|
5972
5972
|
})
|
|
5973
5973
|
}, e.questionType)),
|
|
5974
|
-
|
|
5975
|
-
let t =
|
|
5974
|
+
ne.length > 0 ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(sc, {}), ne.map((e) => {
|
|
5975
|
+
let t = te.find((t) => t.datasetKey === e && t.questionType === "dropdown-single");
|
|
5976
5976
|
return /* @__PURE__ */ Z(Xs, { children: [/* @__PURE__ */ X(Js, {
|
|
5977
5977
|
className: "mx-1 px-2 data-[state=open]:rounded-sm data-[state=closed]:bg-transparent data-[state=open]:bg-f1-background-hover",
|
|
5978
5978
|
children: /* @__PURE__ */ Z("div", {
|
|
@@ -5985,8 +5985,8 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5985
5985
|
children: t?.label ?? e
|
|
5986
5986
|
})]
|
|
5987
5987
|
})
|
|
5988
|
-
}), /* @__PURE__ */ X($s, { children: /* @__PURE__ */ Z(oc, { children: [
|
|
5989
|
-
onClick: () =>
|
|
5988
|
+
}), /* @__PURE__ */ X($s, { children: /* @__PURE__ */ Z(oc, { children: [g("dropdown-single") ? /* @__PURE__ */ X(nc, {
|
|
5989
|
+
onClick: () => I("dropdown-single", e),
|
|
5990
5990
|
children: /* @__PURE__ */ Z("div", {
|
|
5991
5991
|
className: "flex w-full flex-row items-center gap-2",
|
|
5992
5992
|
children: [/* @__PURE__ */ X(H, {
|
|
@@ -5994,11 +5994,11 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5994
5994
|
color: "default"
|
|
5995
5995
|
}), /* @__PURE__ */ X("span", {
|
|
5996
5996
|
className: "flex-1",
|
|
5997
|
-
children:
|
|
5997
|
+
children: A("surveyFormBuilder.labels.singleSelection")
|
|
5998
5998
|
})]
|
|
5999
5999
|
})
|
|
6000
|
-
}) : null,
|
|
6001
|
-
onClick: () =>
|
|
6000
|
+
}) : null, g("dropdown-multi") ? /* @__PURE__ */ X(nc, {
|
|
6001
|
+
onClick: () => I("dropdown-multi", e),
|
|
6002
6002
|
children: /* @__PURE__ */ Z("div", {
|
|
6003
6003
|
className: "flex w-full flex-row items-center gap-2",
|
|
6004
6004
|
children: [/* @__PURE__ */ X(H, {
|
|
@@ -6006,7 +6006,7 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
6006
6006
|
color: "default"
|
|
6007
6007
|
}), /* @__PURE__ */ X("span", {
|
|
6008
6008
|
className: "flex-1",
|
|
6009
|
-
children:
|
|
6009
|
+
children: A("surveyFormBuilder.labels.multiSelection")
|
|
6010
6010
|
})]
|
|
6011
6011
|
})
|
|
6012
6012
|
}) : null] }) })] }, e);
|
|
@@ -6225,7 +6225,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6225
6225
|
}, s = n("surveyFormBuilder.answer.numericPlaceholder");
|
|
6226
6226
|
return /* @__PURE__ */ X(wf, {
|
|
6227
6227
|
...t,
|
|
6228
|
-
children: i ? /* @__PURE__ */ X(
|
|
6228
|
+
children: i ? /* @__PURE__ */ X(N, {
|
|
6229
6229
|
locale: "en-US",
|
|
6230
6230
|
size: "md",
|
|
6231
6231
|
value: e,
|
|
@@ -6236,8 +6236,8 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6236
6236
|
required: t.required,
|
|
6237
6237
|
maxDecimals: 0,
|
|
6238
6238
|
placeholder: s,
|
|
6239
|
-
icon:
|
|
6240
|
-
}) : /* @__PURE__ */ X(
|
|
6239
|
+
icon: si
|
|
6240
|
+
}) : /* @__PURE__ */ X(Gi, {
|
|
6241
6241
|
type: "text",
|
|
6242
6242
|
size: "md",
|
|
6243
6243
|
value: s,
|
|
@@ -6245,7 +6245,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6245
6245
|
disabled: !0,
|
|
6246
6246
|
label: n("surveyFormBuilder.answer.label"),
|
|
6247
6247
|
hideLabel: !0,
|
|
6248
|
-
icon:
|
|
6248
|
+
icon: si
|
|
6249
6249
|
})
|
|
6250
6250
|
});
|
|
6251
6251
|
}, Pf = ({ option: e, selected: n, onClick: r, onChangeLabel: i, disabled: a, isEmojiMode: o = !1 }) => {
|
|
@@ -6278,7 +6278,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6278
6278
|
onClick: (e) => {
|
|
6279
6279
|
e.preventDefault(), e.stopPropagation();
|
|
6280
6280
|
},
|
|
6281
|
-
children: /* @__PURE__ */ X(
|
|
6281
|
+
children: /* @__PURE__ */ X(ue, {
|
|
6282
6282
|
data: t,
|
|
6283
6283
|
onEmojiSelect: (e) => {
|
|
6284
6284
|
i?.(s, e.native), u(!1);
|
|
@@ -6389,7 +6389,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6389
6389
|
}, T = () => {
|
|
6390
6390
|
m(!1), h(null);
|
|
6391
6391
|
}, E = p ? v : !a && !o, D = !a && !o && !l;
|
|
6392
|
-
return /* @__PURE__ */ X(
|
|
6392
|
+
return /* @__PURE__ */ X(sn, {
|
|
6393
6393
|
value: t,
|
|
6394
6394
|
onDragStart: w,
|
|
6395
6395
|
onDragEnd: T,
|
|
@@ -6442,13 +6442,13 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6442
6442
|
children: [/* @__PURE__ */ X(V, {
|
|
6443
6443
|
label: _("surveyFormBuilder.selectQuestion.markAsCorrect"),
|
|
6444
6444
|
variant: "ghost",
|
|
6445
|
-
icon: c ?
|
|
6445
|
+
icon: c ? ri : ci,
|
|
6446
6446
|
onClick: x,
|
|
6447
6447
|
hideLabel: !0
|
|
6448
6448
|
}), /* @__PURE__ */ X(V, {
|
|
6449
6449
|
label: _("surveyFormBuilder.selectQuestion.remove"),
|
|
6450
6450
|
variant: "ghost",
|
|
6451
|
-
icon:
|
|
6451
|
+
icon: fr,
|
|
6452
6452
|
hideLabel: !0,
|
|
6453
6453
|
onClick: S
|
|
6454
6454
|
})]
|
|
@@ -6548,7 +6548,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6548
6548
|
...t,
|
|
6549
6549
|
children: /* @__PURE__ */ Z("div", {
|
|
6550
6550
|
className: "-mx-0.5 flex flex-col items-start [&>div]:w-full",
|
|
6551
|
-
children: [/* @__PURE__ */ X(sf, { children: /* @__PURE__ */ X(
|
|
6551
|
+
children: [/* @__PURE__ */ X(sf, { children: /* @__PURE__ */ X(Ve, {
|
|
6552
6552
|
axis: "y",
|
|
6553
6553
|
values: e,
|
|
6554
6554
|
onReorder: m,
|
|
@@ -6648,12 +6648,12 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6648
6648
|
]
|
|
6649
6649
|
});
|
|
6650
6650
|
}, Wf = Cc(({ item: e, section: t, showEndOfSection: n, className: r }) => {
|
|
6651
|
-
let { isDragging: i, setIsDragging: a, setDraggedItemId: o, draggedItemId: s } = cf(), c =
|
|
6651
|
+
let { isDragging: i, setIsDragging: a, setDraggedItemId: o, draggedItemId: s } = cf(), c = tn(), { disabled: l, answering: u } = af(), d = !!t && s === t.id, f = () => {
|
|
6652
6652
|
a(!0), o(e.question.id);
|
|
6653
6653
|
}, p = () => {
|
|
6654
6654
|
a(!1), o(null);
|
|
6655
6655
|
}, m = t?.locked, h = !l && !u && !m;
|
|
6656
|
-
return /* @__PURE__ */ Z(
|
|
6656
|
+
return /* @__PURE__ */ Z(sn, {
|
|
6657
6657
|
value: e.id,
|
|
6658
6658
|
onDragStart: f,
|
|
6659
6659
|
onDragEnd: p,
|
|
@@ -6683,12 +6683,12 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6683
6683
|
}), n ? /* @__PURE__ */ X(Uf, {}) : null]
|
|
6684
6684
|
});
|
|
6685
6685
|
}, (e, t) => e.showEndOfSection === t.showEndOfSection && e.className === t.className && (0, vl.default)(e.section, t.section) && (0, vl.default)(e.item, t.item)), Gf = ({ question: e }) => {
|
|
6686
|
-
let { isDragging: t, setIsDragging: n, setDraggedItemId: r } = cf(), i =
|
|
6686
|
+
let { isDragging: t, setIsDragging: n, setDraggedItemId: r } = cf(), i = tn(), { disabled: a, answering: o, getSectionContainingQuestion: s } = af(), c = s(e.id), l = () => {
|
|
6687
6687
|
n(!0), r(e.id);
|
|
6688
6688
|
}, u = () => {
|
|
6689
6689
|
n(!1), r(null);
|
|
6690
6690
|
}, d = c?.locked, f = !a && !o && !d;
|
|
6691
|
-
return /* @__PURE__ */ X(
|
|
6691
|
+
return /* @__PURE__ */ X(sn, {
|
|
6692
6692
|
value: e,
|
|
6693
6693
|
as: "div",
|
|
6694
6694
|
onDragStart: l,
|
|
@@ -6737,7 +6737,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6737
6737
|
});
|
|
6738
6738
|
}, x = [{
|
|
6739
6739
|
label: h("surveyFormBuilder.actions.duplicateSection"),
|
|
6740
|
-
icon:
|
|
6740
|
+
icon: ji,
|
|
6741
6741
|
onClick: () => {
|
|
6742
6742
|
d?.({
|
|
6743
6743
|
elementId: e,
|
|
@@ -6746,7 +6746,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6746
6746
|
}
|
|
6747
6747
|
}, {
|
|
6748
6748
|
label: h("surveyFormBuilder.actions.deleteSection"),
|
|
6749
|
-
icon:
|
|
6749
|
+
icon: fr,
|
|
6750
6750
|
onClick: () => {
|
|
6751
6751
|
u(e);
|
|
6752
6752
|
},
|
|
@@ -6780,7 +6780,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6780
6780
|
}) : null,
|
|
6781
6781
|
D ? /* @__PURE__ */ X("div", {
|
|
6782
6782
|
className: "ml-auto flex shrink-0 items-center",
|
|
6783
|
-
children: /* @__PURE__ */ X(
|
|
6783
|
+
children: /* @__PURE__ */ X(qn, {
|
|
6784
6784
|
description: E,
|
|
6785
6785
|
instant: !0,
|
|
6786
6786
|
children: /* @__PURE__ */ X("span", {
|
|
@@ -6816,7 +6816,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6816
6816
|
disabled: S,
|
|
6817
6817
|
className: B("w-full [field-sizing:content] resize-none text-f1-foreground-secondary placeholder:text-f1-foreground-tertiary disabled:text-f1-foreground-secondary [&::-webkit-search-cancel-button]:hidden", S && "cursor-not-allowed")
|
|
6818
6818
|
}) : null]
|
|
6819
|
-
}) : null, o ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(sf, { children: /* @__PURE__ */ X(
|
|
6819
|
+
}) : null, o ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(sf, { children: /* @__PURE__ */ X(Ve, {
|
|
6820
6820
|
axis: "y",
|
|
6821
6821
|
values: i,
|
|
6822
6822
|
onReorder: b,
|
|
@@ -6838,8 +6838,8 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6838
6838
|
})] })]
|
|
6839
6839
|
});
|
|
6840
6840
|
}, qf = Cc(({ item: e, className: t }) => {
|
|
6841
|
-
let { isDragging: n, setIsDragging: r, setDraggedItemId: i, draggedItemId: a } = cf(), o =
|
|
6842
|
-
return /* @__PURE__ */ X(
|
|
6841
|
+
let { isDragging: n, setIsDragging: r, setDraggedItemId: i, draggedItemId: a } = cf(), o = tn(), { disabled: s, answering: c } = af(), l = a === e.section.id;
|
|
6842
|
+
return /* @__PURE__ */ X(sn, {
|
|
6843
6843
|
value: e.id,
|
|
6844
6844
|
onDragStart: () => {
|
|
6845
6845
|
r(!0), i(e.section.id);
|
|
@@ -6897,7 +6897,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6897
6897
|
p || x.push({
|
|
6898
6898
|
type: "toggle",
|
|
6899
6899
|
label: l,
|
|
6900
|
-
icon:
|
|
6900
|
+
icon: Ei,
|
|
6901
6901
|
checked: !!r?.required,
|
|
6902
6902
|
onCheckedChange: m
|
|
6903
6903
|
});
|
|
@@ -6956,16 +6956,16 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6956
6956
|
return x.push({
|
|
6957
6957
|
type: "submenu",
|
|
6958
6958
|
label: u,
|
|
6959
|
-
icon:
|
|
6959
|
+
icon: Mi,
|
|
6960
6960
|
selectedLabel: E,
|
|
6961
6961
|
children: w
|
|
6962
6962
|
}), x.push({ type: "separator" }), x.push({
|
|
6963
6963
|
label: i,
|
|
6964
|
-
icon:
|
|
6964
|
+
icon: ji,
|
|
6965
6965
|
onClick: y
|
|
6966
6966
|
}), n && x.push({
|
|
6967
6967
|
label: a,
|
|
6968
|
-
icon:
|
|
6968
|
+
icon: fr,
|
|
6969
6969
|
onClick: b,
|
|
6970
6970
|
critical: !0
|
|
6971
6971
|
}), x;
|
|
@@ -6986,12 +6986,12 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6986
6986
|
return {
|
|
6987
6987
|
id: i,
|
|
6988
6988
|
label: t.title || n,
|
|
6989
|
-
icon:
|
|
6989
|
+
icon: ra,
|
|
6990
6990
|
onClick: y,
|
|
6991
6991
|
...!h && !g && !t.locked && { otherActions: [
|
|
6992
6992
|
{
|
|
6993
6993
|
label: o,
|
|
6994
|
-
icon:
|
|
6994
|
+
icon: ji,
|
|
6995
6995
|
onClick: () => m?.({
|
|
6996
6996
|
elementId: t.id,
|
|
6997
6997
|
type: "section"
|
|
@@ -7000,7 +7000,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7000
7000
|
{ type: "separator" },
|
|
7001
7001
|
{
|
|
7002
7002
|
label: s,
|
|
7003
|
-
icon:
|
|
7003
|
+
icon: fr,
|
|
7004
7004
|
onClick: () => p(t.id),
|
|
7005
7005
|
critical: !0
|
|
7006
7006
|
}
|
|
@@ -7265,12 +7265,12 @@ var rp = (e, t, n) => {
|
|
|
7265
7265
|
onChange: n
|
|
7266
7266
|
}) : null, /* @__PURE__ */ Z("div", {
|
|
7267
7267
|
className: "relative flex flex-1 flex-col",
|
|
7268
|
-
children: [/* @__PURE__ */ Z(
|
|
7268
|
+
children: [/* @__PURE__ */ Z(Jn.div, {
|
|
7269
7269
|
className: B("flex w-full max-w-[750px] self-center flex-col gap-6", a && "pointer-events-none"),
|
|
7270
7270
|
initial: { filter: "blur(0px)" },
|
|
7271
7271
|
animate: { filter: a ? "blur(2px)" : "none" },
|
|
7272
7272
|
exit: { filter: "blur(0px)" },
|
|
7273
|
-
children: [/* @__PURE__ */ X(
|
|
7273
|
+
children: [/* @__PURE__ */ X(Ve, {
|
|
7274
7274
|
axis: "y",
|
|
7275
7275
|
values: h,
|
|
7276
7276
|
onReorder: b,
|
|
@@ -7286,7 +7286,7 @@ var rp = (e, t, n) => {
|
|
|
7286
7286
|
})
|
|
7287
7287
|
})
|
|
7288
7288
|
}), d ? /* @__PURE__ */ X(df, {}) : null]
|
|
7289
|
-
}), a ? /* @__PURE__ */ X(
|
|
7289
|
+
}), a ? /* @__PURE__ */ X(Jn.div, {
|
|
7290
7290
|
className: "sticky bottom-1/2 left-0 z-50 flex w-full items-center justify-center",
|
|
7291
7291
|
initial: {
|
|
7292
7292
|
opacity: 0,
|
|
@@ -7316,27 +7316,27 @@ function sp({ titleWidth: e, descriptionWidth: t, answer: n }) {
|
|
|
7316
7316
|
className: "flex flex-col gap-4 rounded-xl border border-solid border-f1-border-secondary bg-f1-background p-4",
|
|
7317
7317
|
children: [/* @__PURE__ */ Z("div", {
|
|
7318
7318
|
className: "flex flex-col gap-2",
|
|
7319
|
-
children: [/* @__PURE__ */ X(
|
|
7319
|
+
children: [/* @__PURE__ */ X(_n, {
|
|
7320
7320
|
className: "h-5 rounded-sm",
|
|
7321
7321
|
style: { width: e }
|
|
7322
|
-
}), t ? /* @__PURE__ */ X(
|
|
7322
|
+
}), t ? /* @__PURE__ */ X(_n, {
|
|
7323
7323
|
className: "h-4 rounded-sm",
|
|
7324
7324
|
style: { width: t }
|
|
7325
7325
|
}) : null]
|
|
7326
7326
|
}), n]
|
|
7327
7327
|
});
|
|
7328
7328
|
}
|
|
7329
|
-
var cp = /* @__PURE__ */ X(
|
|
7329
|
+
var cp = /* @__PURE__ */ X(_n, { className: "h-10 w-full rounded-sm" }), lp = /* @__PURE__ */ X(_n, { className: "h-24 w-full rounded-sm" }), up = /* @__PURE__ */ X(_n, { className: "h-10 w-56 max-w-full rounded-sm" });
|
|
7330
7330
|
function dp() {
|
|
7331
7331
|
return /* @__PURE__ */ X("div", {
|
|
7332
7332
|
className: "grid grid-cols-5 gap-2 sm:max-w-80",
|
|
7333
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(
|
|
7333
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(_n, { className: "h-9 rounded-sm" }, t))
|
|
7334
7334
|
});
|
|
7335
7335
|
}
|
|
7336
7336
|
function fp({ count: e }) {
|
|
7337
7337
|
return /* @__PURE__ */ X("div", {
|
|
7338
7338
|
className: "flex flex-col gap-2",
|
|
7339
|
-
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(
|
|
7339
|
+
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(_n, {
|
|
7340
7340
|
className: "h-7 w-56 max-w-full rounded-sm",
|
|
7341
7341
|
style: { width: `${Math.max(52, 76 - t * 7)}%` }
|
|
7342
7342
|
}, t))
|
|
@@ -7345,7 +7345,7 @@ function fp({ count: e }) {
|
|
|
7345
7345
|
function pp() {
|
|
7346
7346
|
return /* @__PURE__ */ X("div", {
|
|
7347
7347
|
className: "flex flex-wrap gap-2",
|
|
7348
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(
|
|
7348
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(_n, {
|
|
7349
7349
|
className: "h-8 rounded-sm",
|
|
7350
7350
|
style: { width: `${18 + t * 3}%` }
|
|
7351
7351
|
}, t))
|
|
@@ -7361,7 +7361,7 @@ function mp() {
|
|
|
7361
7361
|
className: "flex flex-col gap-5",
|
|
7362
7362
|
children: [/* @__PURE__ */ Z("div", {
|
|
7363
7363
|
className: "flex flex-col gap-2 px-5",
|
|
7364
|
-
children: [/* @__PURE__ */ X(
|
|
7364
|
+
children: [/* @__PURE__ */ X(_n, { className: "h-6 w-56 rounded-sm" }), /* @__PURE__ */ X(_n, { className: "h-4 w-80 max-w-full rounded-sm" })]
|
|
7365
7365
|
}), /* @__PURE__ */ X("div", {
|
|
7366
7366
|
className: "flex flex-col gap-4",
|
|
7367
7367
|
children: e === 0 ? /* @__PURE__ */ Z(Y, { children: [
|
|
@@ -7429,7 +7429,7 @@ function hp() {
|
|
|
7429
7429
|
"aria-live": "polite",
|
|
7430
7430
|
children: [/* @__PURE__ */ Z("div", {
|
|
7431
7431
|
className: "flex flex-col gap-2 px-5",
|
|
7432
|
-
children: [/* @__PURE__ */ X(
|
|
7432
|
+
children: [/* @__PURE__ */ X(_n, { className: "h-6 w-52 rounded-sm" }), /* @__PURE__ */ X(_n, { className: "h-4 w-72 max-w-full rounded-sm" })]
|
|
7433
7433
|
}), /* @__PURE__ */ X(sp, {
|
|
7434
7434
|
titleWidth: "74%",
|
|
7435
7435
|
descriptionWidth: "50%",
|
|
@@ -7528,7 +7528,7 @@ function yp({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
7528
7528
|
u ? /* @__PURE__ */ X("div", {
|
|
7529
7529
|
className: "min-h-8 p-1",
|
|
7530
7530
|
children: /* @__PURE__ */ X(H, {
|
|
7531
|
-
icon: t.correct ?
|
|
7531
|
+
icon: t.correct ? ci : ri,
|
|
7532
7532
|
color: t.correct ? "positive" : "critical",
|
|
7533
7533
|
"aria-hidden": !0
|
|
7534
7534
|
})
|
|
@@ -7550,7 +7550,7 @@ var bp = /^(https?:\/\/)?[\w.-]+\.[a-z]{2,}(:\d+)?(\/[^\s]*)?$/i, xp = () => ({
|
|
|
7550
7550
|
status: "idle"
|
|
7551
7551
|
});
|
|
7552
7552
|
function Sp(e, t) {
|
|
7553
|
-
return
|
|
7553
|
+
return oi().optional().superRefine((n, r) => {
|
|
7554
7554
|
e && (!n || n.trim() === "") && r.addIssue({
|
|
7555
7555
|
code: "custom",
|
|
7556
7556
|
message: t("forms.validation.required")
|
|
@@ -7558,7 +7558,7 @@ function Sp(e, t) {
|
|
|
7558
7558
|
});
|
|
7559
7559
|
}
|
|
7560
7560
|
function Cp(e, t) {
|
|
7561
|
-
return
|
|
7561
|
+
return oi().optional().superRefine((n, r) => {
|
|
7562
7562
|
e && (!n || n.trim() === "") ? r.addIssue({
|
|
7563
7563
|
code: "custom",
|
|
7564
7564
|
message: t("forms.validation.required")
|
|
@@ -7577,7 +7577,7 @@ function wp(e, t) {
|
|
|
7577
7577
|
});
|
|
7578
7578
|
}
|
|
7579
7579
|
function Tp(e, t) {
|
|
7580
|
-
return da(
|
|
7580
|
+
return da(oi()).optional().superRefine((n, r) => {
|
|
7581
7581
|
e && (!n || n.length === 0) && r.addIssue({
|
|
7582
7582
|
code: "custom",
|
|
7583
7583
|
message: t("forms.validation.required")
|
|
@@ -7585,7 +7585,7 @@ function Tp(e, t) {
|
|
|
7585
7585
|
});
|
|
7586
7586
|
}
|
|
7587
7587
|
function Ep(e, t) {
|
|
7588
|
-
return
|
|
7588
|
+
return ii().optional().superRefine((n, r) => {
|
|
7589
7589
|
e && !n && r.addIssue({
|
|
7590
7590
|
code: "custom",
|
|
7591
7591
|
message: t("forms.validation.required")
|
|
@@ -7594,7 +7594,7 @@ function Ep(e, t) {
|
|
|
7594
7594
|
}
|
|
7595
7595
|
var Dp = Tp;
|
|
7596
7596
|
function Op(e, t) {
|
|
7597
|
-
return
|
|
7597
|
+
return mr().optional().superRefine((n, r) => {
|
|
7598
7598
|
e && !n && r.addIssue({
|
|
7599
7599
|
code: "custom",
|
|
7600
7600
|
message: t("forms.validation.required")
|
|
@@ -7647,7 +7647,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7647
7647
|
placeholder: t("surveyFormBuilder.answer.textPlaceholder"),
|
|
7648
7648
|
disabled: i
|
|
7649
7649
|
};
|
|
7650
|
-
return
|
|
7650
|
+
return xr(Sp(!!e.required, t), {
|
|
7651
7651
|
...l,
|
|
7652
7652
|
fieldType: "custom",
|
|
7653
7653
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(wf, {
|
|
@@ -7675,7 +7675,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7675
7675
|
rows: 4,
|
|
7676
7676
|
disabled: i
|
|
7677
7677
|
};
|
|
7678
|
-
return
|
|
7678
|
+
return xr(Sp(!!e.required, t), {
|
|
7679
7679
|
...l,
|
|
7680
7680
|
fieldType: "custom",
|
|
7681
7681
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(wf, {
|
|
@@ -7702,7 +7702,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7702
7702
|
placeholder: t("surveyFormBuilder.answer.numericPlaceholder"),
|
|
7703
7703
|
disabled: i
|
|
7704
7704
|
};
|
|
7705
|
-
return
|
|
7705
|
+
return xr(wp(!!e.required, t), {
|
|
7706
7706
|
...l,
|
|
7707
7707
|
fieldType: "custom",
|
|
7708
7708
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(wf, {
|
|
@@ -7730,7 +7730,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7730
7730
|
placeholder: t("surveyFormBuilder.answer.linkPlaceholder"),
|
|
7731
7731
|
disabled: i
|
|
7732
7732
|
};
|
|
7733
|
-
return
|
|
7733
|
+
return xr(Cp(!!e.required, t), {
|
|
7734
7734
|
...l,
|
|
7735
7735
|
fieldType: "custom",
|
|
7736
7736
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(wf, {
|
|
@@ -7757,7 +7757,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7757
7757
|
clearable: !e.required,
|
|
7758
7758
|
disabled: i
|
|
7759
7759
|
};
|
|
7760
|
-
return
|
|
7760
|
+
return xr(Ep(!!e.required, t), {
|
|
7761
7761
|
...l,
|
|
7762
7762
|
fieldType: "custom",
|
|
7763
7763
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(wf, {
|
|
@@ -7793,7 +7793,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7793
7793
|
showSearchBox: r,
|
|
7794
7794
|
searchBoxPlaceholder: e.searchBoxPlaceholder
|
|
7795
7795
|
};
|
|
7796
|
-
return
|
|
7796
|
+
return xr(Sp(!!e.required, t), {
|
|
7797
7797
|
...l,
|
|
7798
7798
|
fieldType: "custom",
|
|
7799
7799
|
render: ({ value: t, onChange: r, onBlur: i, error: o }) => {
|
|
@@ -7842,7 +7842,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7842
7842
|
showSearchBox: r,
|
|
7843
7843
|
searchBoxPlaceholder: e.searchBoxPlaceholder
|
|
7844
7844
|
};
|
|
7845
|
-
return
|
|
7845
|
+
return xr(Tp(!!e.required, t), {
|
|
7846
7846
|
...l,
|
|
7847
7847
|
fieldType: "custom",
|
|
7848
7848
|
render: ({ value: e, onChange: t, onBlur: n, error: r }) => /* @__PURE__ */ X(wf, {
|
|
@@ -7869,7 +7869,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7869
7869
|
disabled: i,
|
|
7870
7870
|
showAnswerValidation: r
|
|
7871
7871
|
};
|
|
7872
|
-
return
|
|
7872
|
+
return xr(Sp(!!e.required, t), {
|
|
7873
7873
|
...l,
|
|
7874
7874
|
fieldType: "custom",
|
|
7875
7875
|
fieldConfig: n,
|
|
@@ -7892,7 +7892,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7892
7892
|
disabled: i,
|
|
7893
7893
|
showAnswerValidation: r
|
|
7894
7894
|
};
|
|
7895
|
-
return
|
|
7895
|
+
return xr(Tp(!!e.required, t), {
|
|
7896
7896
|
...l,
|
|
7897
7897
|
fieldType: "custom",
|
|
7898
7898
|
fieldConfig: n,
|
|
@@ -7914,7 +7914,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7914
7914
|
maxLabel: n.maxLabel,
|
|
7915
7915
|
disabled: i
|
|
7916
7916
|
};
|
|
7917
|
-
return
|
|
7917
|
+
return xr(wp(!!e.required, t), {
|
|
7918
7918
|
...l,
|
|
7919
7919
|
fieldType: "custom",
|
|
7920
7920
|
fieldConfig: r,
|
|
@@ -7940,7 +7940,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7940
7940
|
useUpload: r ?? xp,
|
|
7941
7941
|
disabled: i || !r
|
|
7942
7942
|
};
|
|
7943
|
-
return
|
|
7943
|
+
return xr(Dp(!!e.required, t), {
|
|
7944
7944
|
...l,
|
|
7945
7945
|
fieldType: "custom",
|
|
7946
7946
|
render: ({ value: e, onChange: t, onBlur: n, error: r }) => /* @__PURE__ */ X(wf, {
|
|
@@ -7966,7 +7966,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7966
7966
|
label: n.label || c,
|
|
7967
7967
|
disabled: i
|
|
7968
7968
|
};
|
|
7969
|
-
return
|
|
7969
|
+
return xr(Op(!!e.required, t), {
|
|
7970
7970
|
...l,
|
|
7971
7971
|
fieldType: "custom",
|
|
7972
7972
|
render: ({ value: e, onChange: t, onBlur: n, error: i }) => /* @__PURE__ */ X(wf, {
|
|
@@ -7985,7 +7985,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7985
7985
|
})
|
|
7986
7986
|
});
|
|
7987
7987
|
}
|
|
7988
|
-
default: return
|
|
7988
|
+
default: return xr(Cr(), {
|
|
7989
7989
|
...l,
|
|
7990
7990
|
fieldType: "custom",
|
|
7991
7991
|
render: () => null
|
|
@@ -8032,7 +8032,7 @@ function Lp({ elements: e, mode: t, t: n, defaultValues: r, currentQuestionId: i
|
|
|
8032
8032
|
}), f[t] = a?.[t] ?? kp(e, r);
|
|
8033
8033
|
}
|
|
8034
8034
|
return {
|
|
8035
|
-
schema:
|
|
8035
|
+
schema: ti(d),
|
|
8036
8036
|
defaultValues: f,
|
|
8037
8037
|
flatQuestions: m,
|
|
8038
8038
|
sections: p
|
|
@@ -8076,160 +8076,160 @@ function Up(e) {
|
|
|
8076
8076
|
return e.inline ? /* @__PURE__ */ X(Gp, { ...e }) : /* @__PURE__ */ X(Wp, { ...e });
|
|
8077
8077
|
}
|
|
8078
8078
|
function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resourceHeader: a, isOpen: o, onClose: s, position: c = "center", module: l, allowToChangeFullscreen: u = !1, defaultValues: d, errorTriggerMode: f = "on-blur", loading: p = !1, labels: m, preview: h = !1, useUpload: g, datasets: _, saveDraft: v }) {
|
|
8079
|
-
let { t:
|
|
8080
|
-
title: m?.empty?.title ??
|
|
8081
|
-
description: m?.empty?.description ??
|
|
8082
|
-
emoji: m?.empty?.emoji ??
|
|
8083
|
-
},
|
|
8084
|
-
clearTimeout(
|
|
8085
|
-
}, []),
|
|
8086
|
-
|
|
8087
|
-
}, [
|
|
8079
|
+
let { t: b } = z(), [x, S] = J(!1), C = c === "fullscreen", w = c === "fullscreen" ? "center" : c, [T, E] = J(C), { formRef: D, submit: O, isSubmitting: k, hasErrors: A } = ge(), j = q({}), M = K(() => Ap(e), [e]), N = gp(M), P = M.length > 0, F = {
|
|
8080
|
+
title: m?.empty?.title ?? b("surveyAnsweringForm.labels.empty.title"),
|
|
8081
|
+
description: m?.empty?.description ?? b("surveyAnsweringForm.labels.empty.description"),
|
|
8082
|
+
emoji: m?.empty?.emoji ?? b("surveyAnsweringForm.labels.empty.emoji")
|
|
8083
|
+
}, I = n === "stepped", ee = h && !!d && Object.keys(d).length > 0, te = h && !ee, L = I ? N.currentQuestion?.id : void 0, ne = q(void 0), ie = q(Rp), ae = W(() => {
|
|
8084
|
+
clearTimeout(ne.current);
|
|
8085
|
+
}, []), oe = W((e) => {
|
|
8086
|
+
ae(), e && (ne.current = setTimeout(() => ie.current(), zp));
|
|
8087
|
+
}, [ae]), { schema: se, defaultValues: ce, sections: le } = Lp({
|
|
8088
8088
|
elements: e,
|
|
8089
8089
|
mode: n,
|
|
8090
|
-
t:
|
|
8090
|
+
t: b,
|
|
8091
8091
|
defaultValues: d,
|
|
8092
|
-
currentQuestionId:
|
|
8093
|
-
accumulatedValues:
|
|
8092
|
+
currentQuestionId: L,
|
|
8093
|
+
accumulatedValues: I ? j.current : void 0,
|
|
8094
8094
|
previewMode: h,
|
|
8095
|
-
disableFields:
|
|
8095
|
+
disableFields: ee,
|
|
8096
8096
|
useUpload: g,
|
|
8097
8097
|
datasets: _,
|
|
8098
|
-
onSingleAnswerChange:
|
|
8099
|
-
}),
|
|
8100
|
-
|
|
8101
|
-
|
|
8098
|
+
onSingleAnswerChange: I ? oe : void 0
|
|
8099
|
+
}), ue = T ? "fullscreen" : w, de = ue === "center" ? "xl" : void 0, fe = q(null), pe = W((e) => {
|
|
8100
|
+
fe.current && clearTimeout(fe.current), fe.current = setTimeout(() => {
|
|
8101
|
+
fe.current = null, s();
|
|
8102
8102
|
}, e);
|
|
8103
|
-
}, [s]), me = W((e) => e.success ? (
|
|
8103
|
+
}, [s]), me = W((e) => e.success ? (pe(e.message ? 1e3 : 0), {
|
|
8104
8104
|
success: !0,
|
|
8105
8105
|
message: e.message
|
|
8106
8106
|
}) : {
|
|
8107
8107
|
success: !1,
|
|
8108
8108
|
errors: Vp(e.errors)
|
|
8109
|
-
}, [
|
|
8109
|
+
}, [pe]), he = W(async (e) => {
|
|
8110
8110
|
if (h) return { success: !0 };
|
|
8111
8111
|
if (!t) throw Error("onSubmit is required when preview is false");
|
|
8112
|
-
if (
|
|
8113
|
-
...
|
|
8112
|
+
if (I && !N.isLastStep) return j.current = {
|
|
8113
|
+
...j.current,
|
|
8114
8114
|
...e
|
|
8115
|
-
},
|
|
8116
|
-
let n = Bp(
|
|
8117
|
-
...
|
|
8115
|
+
}, N.goToNext(), { success: !0 };
|
|
8116
|
+
let n = Bp(I ? {
|
|
8117
|
+
...j.current,
|
|
8118
8118
|
...e
|
|
8119
8119
|
} : e);
|
|
8120
|
-
if (
|
|
8121
|
-
|
|
8120
|
+
if (I) {
|
|
8121
|
+
N.setProgress(100);
|
|
8122
8122
|
let [e] = await Promise.all([t(n), new Promise((e) => setTimeout(e, 1e3))]);
|
|
8123
|
-
return e.success ||
|
|
8123
|
+
return e.success || N.setProgress(null), me(e);
|
|
8124
8124
|
}
|
|
8125
8125
|
return me(await t(n));
|
|
8126
8126
|
}, [
|
|
8127
8127
|
t,
|
|
8128
8128
|
h,
|
|
8129
8129
|
me,
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
]),
|
|
8130
|
+
I,
|
|
8131
|
+
N.isLastStep,
|
|
8132
|
+
N.goToNext,
|
|
8133
|
+
N.setProgress
|
|
8134
|
+
]), _e = W(async () => {
|
|
8135
8135
|
try {
|
|
8136
|
-
await
|
|
8136
|
+
await O();
|
|
8137
8137
|
} catch {}
|
|
8138
|
-
}, [
|
|
8139
|
-
let e =
|
|
8140
|
-
|
|
8141
|
-
...
|
|
8138
|
+
}, [O]), ve = W(() => {
|
|
8139
|
+
let e = D.current?.getValues() ?? {};
|
|
8140
|
+
j.current = {
|
|
8141
|
+
...j.current,
|
|
8142
8142
|
...e
|
|
8143
|
-
},
|
|
8144
|
-
}, [
|
|
8143
|
+
}, N.goToPrevious();
|
|
8144
|
+
}, [D, N.goToPrevious]), ye = W(async () => {
|
|
8145
8145
|
if (!v) return;
|
|
8146
8146
|
let t = {
|
|
8147
8147
|
...Hp(e, d),
|
|
8148
|
-
...
|
|
8149
|
-
...
|
|
8148
|
+
...j.current,
|
|
8149
|
+
...D.current?.getValues()
|
|
8150
8150
|
};
|
|
8151
|
-
|
|
8151
|
+
S(!0), await Promise.resolve().then(() => v.onSave(Bp(t))).catch((e) => {
|
|
8152
8152
|
console.warn("SurveyAnsweringForm: saveDraft.onSave failed", e);
|
|
8153
|
-
}).finally(() =>
|
|
8153
|
+
}).finally(() => S(!1));
|
|
8154
8154
|
}, [
|
|
8155
8155
|
v,
|
|
8156
8156
|
e,
|
|
8157
8157
|
d,
|
|
8158
|
-
|
|
8159
|
-
]),
|
|
8158
|
+
D
|
|
8159
|
+
]), be = I && !N.isLastStep && !p && !ee, xe = te ? N.goToNext : _e;
|
|
8160
8160
|
G(() => {
|
|
8161
|
-
|
|
8162
|
-
}, [
|
|
8163
|
-
|
|
8161
|
+
ie.current = be ? xe : Rp;
|
|
8162
|
+
}, [be, xe]), G(() => () => ae(), [
|
|
8163
|
+
N.currentStep,
|
|
8164
8164
|
o,
|
|
8165
|
-
|
|
8165
|
+
ae
|
|
8166
8166
|
]);
|
|
8167
|
-
let
|
|
8168
|
-
label:
|
|
8169
|
-
icon:
|
|
8170
|
-
onClick: () =>
|
|
8171
|
-
}] : void 0,
|
|
8172
|
-
label:
|
|
8173
|
-
onClick:
|
|
8174
|
-
icon:
|
|
8167
|
+
let Se = u && !p ? [{
|
|
8168
|
+
label: b(T ? "surveyAnsweringForm.actions.collapse" : "surveyAnsweringForm.actions.expand"),
|
|
8169
|
+
icon: T ? fi : Ji,
|
|
8170
|
+
onClick: () => E((e) => !e)
|
|
8171
|
+
}] : void 0, Ce = P ? p || ee ? void 0 : te ? I && !N.isLastStep ? {
|
|
8172
|
+
label: b("surveyAnsweringForm.actions.next"),
|
|
8173
|
+
onClick: N.goToNext,
|
|
8174
|
+
icon: xi
|
|
8175
8175
|
} : {
|
|
8176
|
-
label:
|
|
8176
|
+
label: b("surveyAnsweringForm.actions.submit"),
|
|
8177
8177
|
onClick: Rp,
|
|
8178
8178
|
disabled: !0
|
|
8179
|
-
} :
|
|
8180
|
-
label:
|
|
8181
|
-
onClick:
|
|
8182
|
-
icon:
|
|
8183
|
-
disabled:
|
|
8179
|
+
} : I && !N.isLastStep ? {
|
|
8180
|
+
label: b("surveyAnsweringForm.actions.next"),
|
|
8181
|
+
onClick: _e,
|
|
8182
|
+
icon: xi,
|
|
8183
|
+
disabled: x
|
|
8184
8184
|
} : {
|
|
8185
|
-
label:
|
|
8186
|
-
onClick: ge,
|
|
8187
|
-
disabled: O || k || b,
|
|
8188
|
-
loading: O
|
|
8189
|
-
} : void 0, Ce = N ? p || I ? void 0 : F && !M.isFirstStep ? {
|
|
8190
|
-
label: y("surveyAnsweringForm.actions.previous"),
|
|
8185
|
+
label: b("surveyAnsweringForm.actions.submit"),
|
|
8191
8186
|
onClick: _e,
|
|
8187
|
+
disabled: k || A || x,
|
|
8188
|
+
loading: k
|
|
8189
|
+
} : void 0, we = P ? p || ee ? void 0 : I && !N.isFirstStep ? {
|
|
8190
|
+
label: b("surveyAnsweringForm.actions.previous"),
|
|
8191
|
+
onClick: ve,
|
|
8192
8192
|
icon: vs
|
|
8193
|
-
} : void 0 : void 0,
|
|
8193
|
+
} : void 0 : void 0, Te = v && P && !p && !h ? [{
|
|
8194
8194
|
label: v.label,
|
|
8195
|
-
onClick:
|
|
8196
|
-
disabled:
|
|
8197
|
-
}] : void 0,
|
|
8195
|
+
onClick: ye,
|
|
8196
|
+
disabled: k
|
|
8197
|
+
}] : void 0, Ee = n === "all-questions" && P && !p, De = I && P && !p, Oe = I && !!N.currentQuestion?.sectionTitle && !p, ke = ue === "center" || ue === "fullscreen";
|
|
8198
8198
|
return /* @__PURE__ */ X(Yi, {
|
|
8199
8199
|
isOpen: o,
|
|
8200
8200
|
onClose: s,
|
|
8201
8201
|
title: r,
|
|
8202
8202
|
module: l,
|
|
8203
|
-
position:
|
|
8204
|
-
width:
|
|
8205
|
-
primaryAction:
|
|
8206
|
-
secondaryAction:
|
|
8207
|
-
secondaryActions:
|
|
8208
|
-
otherActions:
|
|
8209
|
-
disableContentPadding:
|
|
8203
|
+
position: ue,
|
|
8204
|
+
width: de,
|
|
8205
|
+
primaryAction: Ce,
|
|
8206
|
+
secondaryAction: we,
|
|
8207
|
+
secondaryActions: Te,
|
|
8208
|
+
otherActions: Se,
|
|
8209
|
+
disableContentPadding: ke,
|
|
8210
8210
|
children: /* @__PURE__ */ X(rf, {
|
|
8211
8211
|
answering: !0,
|
|
8212
8212
|
elements: e,
|
|
8213
8213
|
onChange: Rp,
|
|
8214
8214
|
datasets: _,
|
|
8215
8215
|
children: /* @__PURE__ */ Z("div", {
|
|
8216
|
-
className: B("relative flex h-full min-h-full flex-col @container",
|
|
8216
|
+
className: B("relative flex h-full min-h-full flex-col @container", I && !T && "min-h-[600px]"),
|
|
8217
8217
|
children: [
|
|
8218
|
-
|
|
8218
|
+
Ee ? /* @__PURE__ */ X(ep, {
|
|
8219
8219
|
elements: e,
|
|
8220
8220
|
onChange: Rp,
|
|
8221
8221
|
answering: !0
|
|
8222
8222
|
}) : null,
|
|
8223
|
-
|
|
8223
|
+
De ? /* @__PURE__ */ X("div", {
|
|
8224
8224
|
className: "absolute left-0 right-0 top-0 [&>div>div>div]:h-1 [&>div>div>div]:rounded-none",
|
|
8225
8225
|
children: /* @__PURE__ */ X(Zo, {
|
|
8226
8226
|
label: "Value",
|
|
8227
|
-
value:
|
|
8227
|
+
value: N.progress,
|
|
8228
8228
|
hideLabel: !0
|
|
8229
8229
|
})
|
|
8230
8230
|
}) : null,
|
|
8231
8231
|
/* @__PURE__ */ Z("div", {
|
|
8232
|
-
className: B("mx-auto flex w-full flex-1 justify-center flex-col @lg:w-[750px] max-w-full pt-0",
|
|
8232
|
+
className: B("mx-auto flex w-full flex-1 justify-center flex-col @lg:w-[750px] max-w-full pt-0", ke && "px-4 py-12"),
|
|
8233
8233
|
children: [
|
|
8234
8234
|
/* @__PURE__ */ X("div", {
|
|
8235
8235
|
className: "mb-6",
|
|
@@ -8239,39 +8239,39 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8239
8239
|
...a
|
|
8240
8240
|
})
|
|
8241
8241
|
}),
|
|
8242
|
-
p ? X(n === "stepped" ? hp : mp, {}) :
|
|
8242
|
+
p ? X(n === "stepped" ? hp : mp, {}) : P ? null : /* @__PURE__ */ X(io, {
|
|
8243
8243
|
display: "flex",
|
|
8244
8244
|
flexDirection: "column",
|
|
8245
8245
|
height: "full",
|
|
8246
8246
|
justifyContent: "center",
|
|
8247
8247
|
alignItems: "center",
|
|
8248
8248
|
paddingX: "lg",
|
|
8249
|
-
children: /* @__PURE__ */ X(
|
|
8250
|
-
emoji:
|
|
8251
|
-
title:
|
|
8252
|
-
description:
|
|
8249
|
+
children: /* @__PURE__ */ X(y, {
|
|
8250
|
+
emoji: F.emoji,
|
|
8251
|
+
title: F.title,
|
|
8252
|
+
description: F.description
|
|
8253
8253
|
})
|
|
8254
8254
|
}),
|
|
8255
|
-
|
|
8255
|
+
Oe ? /* @__PURE__ */ Z("div", {
|
|
8256
8256
|
className: "py-1 pl-5",
|
|
8257
8257
|
children: [/* @__PURE__ */ X("span", {
|
|
8258
8258
|
className: "text-lg font-semibold text-f1-foreground",
|
|
8259
|
-
children:
|
|
8260
|
-
}),
|
|
8259
|
+
children: N.currentQuestion?.sectionTitle
|
|
8260
|
+
}), N.currentQuestion?.sectionDescription ? /* @__PURE__ */ X("p", {
|
|
8261
8261
|
className: "whitespace-pre-line text-f1-foreground-secondary",
|
|
8262
|
-
children:
|
|
8262
|
+
children: N.currentQuestion?.sectionDescription
|
|
8263
8263
|
}) : null]
|
|
8264
8264
|
}) : null,
|
|
8265
|
-
|
|
8266
|
-
formRef:
|
|
8265
|
+
P && !p ? /* @__PURE__ */ X(re, {
|
|
8266
|
+
formRef: D,
|
|
8267
8267
|
name: "survey-answering",
|
|
8268
|
-
schema:
|
|
8269
|
-
defaultValues:
|
|
8268
|
+
schema: se,
|
|
8269
|
+
defaultValues: ce,
|
|
8270
8270
|
onSubmit: he,
|
|
8271
8271
|
submitConfig: { hideSubmitButton: !0 },
|
|
8272
8272
|
errorTriggerMode: f,
|
|
8273
|
-
sections:
|
|
8274
|
-
},
|
|
8273
|
+
sections: le
|
|
8274
|
+
}, I ? N.currentStep : void 0) : null
|
|
8275
8275
|
]
|
|
8276
8276
|
})
|
|
8277
8277
|
]
|
|
@@ -8308,7 +8308,7 @@ function Gp({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
8308
8308
|
description: n,
|
|
8309
8309
|
...r
|
|
8310
8310
|
})
|
|
8311
|
-
}), a ? /* @__PURE__ */ X(mp, {}) : d ? /* @__PURE__ */ X(
|
|
8311
|
+
}), a ? /* @__PURE__ */ X(mp, {}) : d ? /* @__PURE__ */ X(re, {
|
|
8312
8312
|
name: "survey-answering-inline",
|
|
8313
8313
|
schema: p,
|
|
8314
8314
|
defaultValues: m,
|
|
@@ -8324,7 +8324,7 @@ function Gp({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
8324
8324
|
justifyContent: "center",
|
|
8325
8325
|
alignItems: "center",
|
|
8326
8326
|
paddingX: "lg",
|
|
8327
|
-
children: /* @__PURE__ */ X(
|
|
8327
|
+
children: /* @__PURE__ */ X(y, {
|
|
8328
8328
|
emoji: f.emoji,
|
|
8329
8329
|
title: f.title,
|
|
8330
8330
|
description: f.description
|
|
@@ -8475,7 +8475,7 @@ function $p({ isOpen: e, onClose: t, title: n, children: r, module: i, portalCon
|
|
|
8475
8475
|
let [o, s] = J(e);
|
|
8476
8476
|
return G(() => {
|
|
8477
8477
|
s(e);
|
|
8478
|
-
}, [e]), /* @__PURE__ */ X(
|
|
8478
|
+
}, [e]), /* @__PURE__ */ X(lr, {
|
|
8479
8479
|
open: o,
|
|
8480
8480
|
onOpenChange: (e) => {
|
|
8481
8481
|
s(e), e || t();
|
|
@@ -8486,15 +8486,15 @@ function $p({ isOpen: e, onClose: t, title: n, children: r, module: i, portalCon
|
|
|
8486
8486
|
container: a,
|
|
8487
8487
|
children: [/* @__PURE__ */ Z("div", {
|
|
8488
8488
|
className: "flex flex-row items-center justify-between px-4 py-4",
|
|
8489
|
-
children: [/* @__PURE__ */ Z(
|
|
8489
|
+
children: [/* @__PURE__ */ Z(Oi, {
|
|
8490
8490
|
className: "flex flex-row items-center gap-2 text-lg font-semibold text-f1-foreground",
|
|
8491
8491
|
children: [i ? /* @__PURE__ */ X(ho, {
|
|
8492
8492
|
module: i,
|
|
8493
8493
|
size: "md"
|
|
8494
8494
|
}) : null, n]
|
|
8495
|
-
}), /* @__PURE__ */ X(
|
|
8495
|
+
}), /* @__PURE__ */ X(nr, {
|
|
8496
8496
|
variant: "outline",
|
|
8497
|
-
icon:
|
|
8497
|
+
icon: ri,
|
|
8498
8498
|
onClick: t,
|
|
8499
8499
|
label: "Close modal",
|
|
8500
8500
|
hideLabel: !0
|
|
@@ -8560,7 +8560,7 @@ function em({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessa
|
|
|
8560
8560
|
})
|
|
8561
8561
|
})
|
|
8562
8562
|
})
|
|
8563
|
-
}), b && _ ? /* @__PURE__ */ X(
|
|
8563
|
+
}), b && _ ? /* @__PURE__ */ X(P, {
|
|
8564
8564
|
open: !0,
|
|
8565
8565
|
onClose: () => {
|
|
8566
8566
|
T(), x(null);
|
|
@@ -8584,14 +8584,14 @@ function nm({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
8584
8584
|
o && o(!l);
|
|
8585
8585
|
}, [o, l]);
|
|
8586
8586
|
let f = e?.includes(".mp4");
|
|
8587
|
-
return /* @__PURE__ */ X(Y, { children: l ? null : /* @__PURE__ */ Z(
|
|
8587
|
+
return /* @__PURE__ */ X(Y, { children: l ? null : /* @__PURE__ */ Z(ei, {
|
|
8588
8588
|
style: { width: a },
|
|
8589
8589
|
className: "relative bg-f1-background p-1",
|
|
8590
|
-
children: [/* @__PURE__ */ Z(
|
|
8590
|
+
children: [/* @__PURE__ */ Z(Sr, { children: [i ? /* @__PURE__ */ X("div", {
|
|
8591
8591
|
className: "absolute right-2 top-2 z-10",
|
|
8592
8592
|
children: /* @__PURE__ */ X(V, {
|
|
8593
8593
|
variant: "ghost",
|
|
8594
|
-
icon:
|
|
8594
|
+
icon: ri,
|
|
8595
8595
|
size: "sm",
|
|
8596
8596
|
hideLabel: !0,
|
|
8597
8597
|
onClick: d,
|
|
@@ -8610,16 +8610,16 @@ function nm({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
8610
8610
|
className: "h-full w-full rounded-md"
|
|
8611
8611
|
}) : null }), /* @__PURE__ */ Z("div", {
|
|
8612
8612
|
className: "flex flex-col gap-[2px] p-3",
|
|
8613
|
-
children: [/* @__PURE__ */ X(
|
|
8613
|
+
children: [/* @__PURE__ */ X(Ht, {
|
|
8614
8614
|
className: "text-lg font-medium",
|
|
8615
8615
|
children: t
|
|
8616
|
-
}), /* @__PURE__ */ X(
|
|
8616
|
+
}), /* @__PURE__ */ X(Ht, {
|
|
8617
8617
|
className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary",
|
|
8618
8618
|
children: n
|
|
8619
8619
|
})]
|
|
8620
|
-
})] })] }), s ? /* @__PURE__ */ X(
|
|
8620
|
+
})] })] }), s ? /* @__PURE__ */ X(Pr, {
|
|
8621
8621
|
className: "p-3",
|
|
8622
|
-
children: s.map((e) => e.type === "upsell" ? /* @__PURE__ */ X(
|
|
8622
|
+
children: s.map((e) => e.type === "upsell" ? /* @__PURE__ */ X(E, {
|
|
8623
8623
|
label: e.label,
|
|
8624
8624
|
onRequest: e.onClick,
|
|
8625
8625
|
errorMessage: e.errorMessage,
|
|
@@ -8640,7 +8640,7 @@ function nm({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
8640
8640
|
var rm = R(nm), im = ({ onDismiss: e }) => {
|
|
8641
8641
|
let { actions: t } = z();
|
|
8642
8642
|
return /* @__PURE__ */ X(V, {
|
|
8643
|
-
icon:
|
|
8643
|
+
icon: ri,
|
|
8644
8644
|
label: t.close,
|
|
8645
8645
|
hideLabel: !0,
|
|
8646
8646
|
variant: "outline",
|
|
@@ -8679,7 +8679,7 @@ function am({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
|
8679
8679
|
})]
|
|
8680
8680
|
}), /* @__PURE__ */ X("div", {
|
|
8681
8681
|
className: B("flex flex-shrink-0 @xs:pl-0", e && "pl-8"),
|
|
8682
|
-
children: /* @__PURE__ */ X(
|
|
8682
|
+
children: /* @__PURE__ */ X(E, {
|
|
8683
8683
|
label: r.label,
|
|
8684
8684
|
onRequest: r.onRequest,
|
|
8685
8685
|
errorMessage: r.errorMessage,
|
|
@@ -8701,7 +8701,7 @@ function am({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
|
8701
8701
|
});
|
|
8702
8702
|
}
|
|
8703
8703
|
var om = R(am), sm = xc(function({ primaryAction: e, secondaryAction: t, ...n }, r) {
|
|
8704
|
-
let i = (e) => e.variant === "promote" ? /* @__PURE__ */ X(
|
|
8704
|
+
let i = (e) => e.variant === "promote" ? /* @__PURE__ */ X(E, {
|
|
8705
8705
|
label: e.label,
|
|
8706
8706
|
onRequest: e.onClick,
|
|
8707
8707
|
errorMessage: e.errorMessage,
|
|
@@ -8719,7 +8719,7 @@ var om = R(am), sm = xc(function({ primaryAction: e, secondaryAction: t, ...n },
|
|
|
8719
8719
|
size: "md",
|
|
8720
8720
|
icon: e.icon
|
|
8721
8721
|
}), a = e?.variant === "promote" ? void 0 : e, o = t?.variant === "promote" ? void 0 : t;
|
|
8722
|
-
return /* @__PURE__ */ Z(
|
|
8722
|
+
return /* @__PURE__ */ Z(Fe, {
|
|
8723
8723
|
ref: r,
|
|
8724
8724
|
...n,
|
|
8725
8725
|
primaryAction: a,
|
|
@@ -8731,7 +8731,7 @@ sm.displayName = "UpsellingBanner";
|
|
|
8731
8731
|
var cm = R(sm);
|
|
8732
8732
|
//#endregion
|
|
8733
8733
|
//#region src/domains/growth/upselling/UpsellingKit/UpsellingPopover/UpsellingPopover.tsx
|
|
8734
|
-
function lm({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i = "md", showIcon: a = !0, side: o = "right", align: s = "center", icon: c =
|
|
8734
|
+
function lm({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i = "md", showIcon: a = !0, side: o = "right", align: s = "center", icon: c = yi, mediaUrl: l, title: u, description: d, width: f = "300px", trackVisibility: p, actions: m, onClick: h, hideLabel: g = !1 }) {
|
|
8735
8735
|
let [_, v] = J(!1), [y, b] = J(null), [x, S] = J(null), C = (e) => {
|
|
8736
8736
|
t(e), h && h();
|
|
8737
8737
|
}, w = async (e) => {
|
|
@@ -8778,7 +8778,7 @@ function lm({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
8778
8778
|
showConfirmation: !1
|
|
8779
8779
|
})
|
|
8780
8780
|
})]
|
|
8781
|
-
}), x?.type === "upsell" && x.showConfirmation && y ? /* @__PURE__ */ X(
|
|
8781
|
+
}), x?.type === "upsell" && x.showConfirmation && y ? /* @__PURE__ */ X(P, {
|
|
8782
8782
|
open: !0,
|
|
8783
8783
|
onClose: T,
|
|
8784
8784
|
success: y === "success",
|
|
@@ -8791,9 +8791,9 @@ function lm({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
8791
8791
|
}
|
|
8792
8792
|
var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r, actionHref: i }) => {
|
|
8793
8793
|
let a = z(), o = a?.ai?.growth?.demoCard?.title ?? "Show {{moduleName}} in action", s = a?.ai?.growth?.demoCard?.actionLabel ?? "Start demo", c = o.replace("{{moduleName}}", t);
|
|
8794
|
-
return /* @__PURE__ */ Z(
|
|
8794
|
+
return /* @__PURE__ */ Z(ei, {
|
|
8795
8795
|
className: "flex flex-col overflow-hidden",
|
|
8796
|
-
children: [/* @__PURE__ */ Z(
|
|
8796
|
+
children: [/* @__PURE__ */ Z(Sr, {
|
|
8797
8797
|
className: "flex flex-col gap-4 p-0",
|
|
8798
8798
|
children: [/* @__PURE__ */ X("div", {
|
|
8799
8799
|
className: B("overflow-hidden rounded-lg border border-f1-border", "ring-1 ring-f1-border/50 bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary"),
|
|
@@ -8808,7 +8808,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8808
8808
|
children: n
|
|
8809
8809
|
})]
|
|
8810
8810
|
})]
|
|
8811
|
-
}), /* @__PURE__ */ X(
|
|
8811
|
+
}), /* @__PURE__ */ X(Pr, {
|
|
8812
8812
|
className: "-mx-4 -mb-4 mt-4 flex justify-end rounded-b-xl border-0 border-t border-t-f1-border bg-f1-background-secondary px-4 py-3",
|
|
8813
8813
|
children: i ? /* @__PURE__ */ X(V, {
|
|
8814
8814
|
variant: "default",
|
|
@@ -8855,7 +8855,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8855
8855
|
})
|
|
8856
8856
|
})]
|
|
8857
8857
|
}), pm = ({ headerIcon: e, items: t, defaultExpandedId: n, expandedId: r, onExpandedChange: i, allowMultiple: a = !1 }) => {
|
|
8858
|
-
let o = z()?.ai?.growth?.faqCard?.title ?? "Questions before getting started", s = e ??
|
|
8858
|
+
let o = z()?.ai?.growth?.faqCard?.title ?? "Questions before getting started", s = e ?? Ur, [c, l] = J(() => new Set(n ? [n] : [])), u = r !== void 0, d = W((e) => u ? r === e : c.has(e), [
|
|
8859
8859
|
u,
|
|
8860
8860
|
r,
|
|
8861
8861
|
c
|
|
@@ -8870,9 +8870,9 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8870
8870
|
i,
|
|
8871
8871
|
a
|
|
8872
8872
|
]);
|
|
8873
|
-
return t.length === 0 ? null : /* @__PURE__ */ Z(
|
|
8873
|
+
return t.length === 0 ? null : /* @__PURE__ */ Z(ei, {
|
|
8874
8874
|
className: "flex flex-col overflow-hidden",
|
|
8875
|
-
children: [/* @__PURE__ */ Z(
|
|
8875
|
+
children: [/* @__PURE__ */ Z(Wi, {
|
|
8876
8876
|
className: "-mx-4 -mt-4 mb-2 flex flex-row items-center gap-2 rounded-t-xl bg-f1-background-secondary px-4 py-3",
|
|
8877
8877
|
children: [/* @__PURE__ */ X("div", {
|
|
8878
8878
|
className: "flex h-6 w-6 items-center justify-center rounded-full border border-f1-border-secondary",
|
|
@@ -8885,7 +8885,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8885
8885
|
className: "text-base font-semibold text-f1-foreground",
|
|
8886
8886
|
children: o
|
|
8887
8887
|
})]
|
|
8888
|
-
}), /* @__PURE__ */ X(
|
|
8888
|
+
}), /* @__PURE__ */ X(Sr, {
|
|
8889
8889
|
className: "flex flex-col divide-y divide-f1-border p-0",
|
|
8890
8890
|
children: t.map((e) => /* @__PURE__ */ X(fm, {
|
|
8891
8891
|
item: e,
|
|
@@ -8896,9 +8896,9 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8896
8896
|
});
|
|
8897
8897
|
}, mm = ({ moduleName: e, description: t, onAction: n, actionHref: r, imageSrc: i }) => {
|
|
8898
8898
|
let a = z()?.ai?.growth?.moduleCard?.actionLabel ?? "Learn more";
|
|
8899
|
-
return /* @__PURE__ */ Z(
|
|
8899
|
+
return /* @__PURE__ */ Z(ei, {
|
|
8900
8900
|
className: "flex flex-col overflow-hidden",
|
|
8901
|
-
children: [/* @__PURE__ */ X(
|
|
8901
|
+
children: [/* @__PURE__ */ X(Sr, {
|
|
8902
8902
|
className: "flex flex-col gap-3 p-0",
|
|
8903
8903
|
children: /* @__PURE__ */ Z("div", {
|
|
8904
8904
|
className: "flex items-start gap-3",
|
|
@@ -8920,7 +8920,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8920
8920
|
})]
|
|
8921
8921
|
})]
|
|
8922
8922
|
})
|
|
8923
|
-
}), /* @__PURE__ */ X(
|
|
8923
|
+
}), /* @__PURE__ */ X(Pr, {
|
|
8924
8924
|
className: "-mx-4 -mb-4 mt-4 flex justify-end rounded-b-xl border-0 border-t border-t-f1-border bg-f1-background-secondary px-4 py-3",
|
|
8925
8925
|
children: r ? /* @__PURE__ */ X(V, {
|
|
8926
8926
|
variant: "outline",
|
|
@@ -8938,12 +8938,12 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8938
8938
|
});
|
|
8939
8939
|
}, hm = ({ onAction: e, actionHref: t }) => {
|
|
8940
8940
|
let n = z()?.ai?.growth?.bookAMeetingCard, r = n?.title ?? "Talk with an expert", i = n?.schedule ?? "Mon-Fri · 09:00-21:00 (CEST)", a = n?.actionLabel ?? "Book a meeting";
|
|
8941
|
-
return /* @__PURE__ */ Z(
|
|
8941
|
+
return /* @__PURE__ */ Z(ei, {
|
|
8942
8942
|
className: "flex flex-col overflow-hidden",
|
|
8943
|
-
children: [/* @__PURE__ */ Z(
|
|
8943
|
+
children: [/* @__PURE__ */ Z(Sr, {
|
|
8944
8944
|
className: "flex flex-col gap-3 p-0",
|
|
8945
8945
|
children: [/* @__PURE__ */ X(H, {
|
|
8946
|
-
icon:
|
|
8946
|
+
icon: Xi,
|
|
8947
8947
|
size: "lg"
|
|
8948
8948
|
}), /* @__PURE__ */ Z("div", {
|
|
8949
8949
|
className: "flex flex-col gap-0.5",
|
|
@@ -8955,7 +8955,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8955
8955
|
children: i
|
|
8956
8956
|
})]
|
|
8957
8957
|
})]
|
|
8958
|
-
}), /* @__PURE__ */ X(
|
|
8958
|
+
}), /* @__PURE__ */ X(Pr, {
|
|
8959
8959
|
className: "-mx-4 -mb-4 mt-4 flex justify-end rounded-b-xl border-0 border-t border-t-f1-border bg-f1-background-secondary px-4 py-3",
|
|
8960
8960
|
children: t ? /* @__PURE__ */ X(V, {
|
|
8961
8961
|
variant: "default",
|
|
@@ -9001,9 +9001,9 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9001
9001
|
e,
|
|
9002
9002
|
t
|
|
9003
9003
|
]), g = a === u - 1, _ = u > 1, v = n != null;
|
|
9004
|
-
return u === 0 || !d ? null : /* @__PURE__ */ Z(
|
|
9004
|
+
return u === 0 || !d ? null : /* @__PURE__ */ Z(ei, {
|
|
9005
9005
|
className: "flex flex-col overflow-hidden",
|
|
9006
|
-
children: [/* @__PURE__ */ Z(
|
|
9006
|
+
children: [/* @__PURE__ */ Z(Sr, {
|
|
9007
9007
|
className: "flex flex-col gap-4",
|
|
9008
9008
|
children: [/* @__PURE__ */ X("h3", {
|
|
9009
9009
|
className: "text-base font-semibold text-f1-foreground",
|
|
@@ -9020,7 +9020,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9020
9020
|
})
|
|
9021
9021
|
}, e.id))
|
|
9022
9022
|
})]
|
|
9023
|
-
}), /* @__PURE__ */ Z(
|
|
9023
|
+
}), /* @__PURE__ */ Z(Pr, {
|
|
9024
9024
|
className: "-mx-4 -mb-4 mt-4 flex items-center justify-between rounded-b-xl border-0 border-t border-t-f1-border bg-f1-background-secondary px-4 py-3",
|
|
9025
9025
|
children: [/* @__PURE__ */ X("div", {
|
|
9026
9026
|
className: "flex min-w-[7.5rem] items-center justify-start gap-1",
|
|
@@ -9093,7 +9093,7 @@ function _m(e) {
|
|
|
9093
9093
|
categories: t,
|
|
9094
9094
|
series: (Array.isArray(n) ? n : []).map((e) => ({
|
|
9095
9095
|
name: e.name,
|
|
9096
|
-
data: (e.data ?? []).map(
|
|
9096
|
+
data: (e.data ?? []).map(nt)
|
|
9097
9097
|
}))
|
|
9098
9098
|
};
|
|
9099
9099
|
}
|
|
@@ -9366,7 +9366,7 @@ function Bm(e) {
|
|
|
9366
9366
|
let n = { Category: e };
|
|
9367
9367
|
for (let e of r) {
|
|
9368
9368
|
let r = e.data[t];
|
|
9369
|
-
n[e.name] = r === void 0 ? null :
|
|
9369
|
+
n[e.name] = r === void 0 ? null : nt(r);
|
|
9370
9370
|
}
|
|
9371
9371
|
return n;
|
|
9372
9372
|
})
|
|
@@ -9487,7 +9487,7 @@ function Zm(e, t) {
|
|
|
9487
9487
|
n.href = URL.createObjectURL(e), n.download = t, n.click(), URL.revokeObjectURL(n.href);
|
|
9488
9488
|
}
|
|
9489
9489
|
async function Qm(e, t, n, { keys: r, preamble: i } = {}) {
|
|
9490
|
-
Zm(await
|
|
9490
|
+
Zm(await _r([{
|
|
9491
9491
|
name: "Data",
|
|
9492
9492
|
rows: Ym({
|
|
9493
9493
|
columns: e,
|
|
@@ -9509,7 +9509,7 @@ function eh(e, t, n) {
|
|
|
9509
9509
|
r.href = e, r.download = `${t}.${n}`, r.click();
|
|
9510
9510
|
}
|
|
9511
9511
|
async function th(e, t) {
|
|
9512
|
-
Zm(await
|
|
9512
|
+
Zm(await _r(e.map((e) => ({
|
|
9513
9513
|
name: e.name,
|
|
9514
9514
|
rows: Ym(e)
|
|
9515
9515
|
}))), `${t}.xlsx`);
|
|
@@ -9518,10 +9518,10 @@ async function th(e, t) {
|
|
|
9518
9518
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useChartDownloadActions.ts
|
|
9519
9519
|
function nh(e) {
|
|
9520
9520
|
let t = e.current?.querySelector(":scope > div");
|
|
9521
|
-
return t ?
|
|
9521
|
+
return t ? jt(t) ?? null : null;
|
|
9522
9522
|
}
|
|
9523
9523
|
function rh(e, t, n) {
|
|
9524
|
-
let r =
|
|
9524
|
+
let r = Ct(document.createElement("div"), void 0, {
|
|
9525
9525
|
renderer: "canvas",
|
|
9526
9526
|
width: e.getWidth(),
|
|
9527
9527
|
height: e.getHeight()
|
|
@@ -9570,23 +9570,23 @@ function ih({ chartContainerRef: e, chartConfig: t, data: n, title: r }) {
|
|
|
9570
9570
|
return K(() => n ? [
|
|
9571
9571
|
{
|
|
9572
9572
|
label: i("ai.dataDownload.download", { format: "PNG" }),
|
|
9573
|
-
icon:
|
|
9573
|
+
icon: zi,
|
|
9574
9574
|
onClick: () => a("png")
|
|
9575
9575
|
},
|
|
9576
9576
|
{
|
|
9577
9577
|
label: i("ai.dataDownload.download", { format: "JPG" }),
|
|
9578
|
-
icon:
|
|
9578
|
+
icon: zi,
|
|
9579
9579
|
onClick: () => a("jpg")
|
|
9580
9580
|
},
|
|
9581
9581
|
{ type: "separator" },
|
|
9582
9582
|
{
|
|
9583
9583
|
label: i("ai.dataDownload.download", { format: "Excel" }),
|
|
9584
|
-
icon:
|
|
9584
|
+
icon: Di,
|
|
9585
9585
|
onClick: s
|
|
9586
9586
|
},
|
|
9587
9587
|
{
|
|
9588
9588
|
label: i("ai.dataDownload.download", { format: "CSV" }),
|
|
9589
|
-
icon:
|
|
9589
|
+
icon: Di,
|
|
9590
9590
|
onClick: c
|
|
9591
9591
|
}
|
|
9592
9592
|
] : [], [
|
|
@@ -9682,7 +9682,7 @@ function oh({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
9682
9682
|
children: [
|
|
9683
9683
|
/* @__PURE__ */ X(Ys, {
|
|
9684
9684
|
asChild: !0,
|
|
9685
|
-
children: /* @__PURE__ */ X(
|
|
9685
|
+
children: /* @__PURE__ */ X(nr, {
|
|
9686
9686
|
label: i.filters.label,
|
|
9687
9687
|
icon: ps,
|
|
9688
9688
|
variant: "ghost",
|
|
@@ -9815,14 +9815,14 @@ function lh({ title: e, enabled: t, actionsCollapse: n }) {
|
|
|
9815
9815
|
}
|
|
9816
9816
|
//#endregion
|
|
9817
9817
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItem.tsx
|
|
9818
|
-
function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry: a, skeleton: o, children: s, actions: c = [], itemFilters: l, editMode: u, readOnly: d = !1, handleDelete: f, onAskAi: p, onAskAiTarget: m, itemId: h, chartTypeOptions: g, explanation: _, isFullscreen: v = !1, descriptionAction:
|
|
9819
|
-
let [
|
|
9820
|
-
|
|
9821
|
-
},
|
|
9818
|
+
function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry: a, skeleton: o, children: s, actions: c = [], itemFilters: l, editMode: u, readOnly: d = !1, handleDelete: f, onAskAi: p, onAskAiTarget: m, itemId: h, chartTypeOptions: g, explanation: _, isFullscreen: v = !1, descriptionAction: b, headerLines: x = 2, fitContent: S = !1, onFullscreenChange: C }) {
|
|
9819
|
+
let [w, T] = J(!1), [E, D] = J(!1), O = q(!1), [k, A] = J(!1), j = z(), { enabled: M, setPendingQuote: N, setOpen: P, focusChatInput: F } = zr(), I = (e) => {
|
|
9820
|
+
T(e), e || A(!1);
|
|
9821
|
+
}, ee = c.filter((e) => !("type" in e) || e.type === "item" || e.type === void 0), te = ee.length > 0, L = u && f && h, ne = g && g.length > 0, re = !!_ && _.trim().length > 0, ie = !!C, ae = !d && e.trim().length > 0 && (p ? !!h : M), oe = ae || te || L || ne || re, se = !!l || ie || !!oe, ce = !v && (w || E), le = B("flex flex-shrink-0 gap-0.5", !v && "opacity-100 transition-opacity delay-150 duration-150 focus-within:delay-0 group-hover/dashitem:delay-0 sm:[@media(hover:hover)]:opacity-0 focus-within:sm:opacity-100 group-hover/dashitem:sm:opacity-100", ce && "delay-0 !opacity-100"), ue = B("-my-2 -mr-0.5 isolate grid flex-shrink-0", !v && "transition-[grid-template-columns] delay-150 duration-150 focus-within:delay-0 group-hover/dashitem:delay-0 motion-reduce:duration-0 sm:[@media(hover:hover)]:grid-cols-[0fr] focus-within:sm:grid-cols-[1fr] group-hover/dashitem:sm:grid-cols-[1fr]", ce && "delay-0 !grid-cols-[1fr]"), de = lh({
|
|
9822
9822
|
title: e,
|
|
9823
|
-
enabled:
|
|
9823
|
+
enabled: x > 2,
|
|
9824
9824
|
actionsCollapse: !v
|
|
9825
|
-
}),
|
|
9825
|
+
}), fe = de.fits ? 1 : 2, pe = x - fe, me = () => {
|
|
9826
9826
|
if (p) {
|
|
9827
9827
|
if (!h) return;
|
|
9828
9828
|
p({
|
|
@@ -9831,22 +9831,22 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9831
9831
|
});
|
|
9832
9832
|
return;
|
|
9833
9833
|
}
|
|
9834
|
-
v &&
|
|
9834
|
+
v && C?.(!1), O.current = !0;
|
|
9835
9835
|
let t = { text: e };
|
|
9836
9836
|
h && m?.({
|
|
9837
9837
|
id: h,
|
|
9838
9838
|
title: e,
|
|
9839
9839
|
quote: t
|
|
9840
|
-
}),
|
|
9840
|
+
}), N(t), P(!0);
|
|
9841
9841
|
}, he = (e) => {
|
|
9842
|
-
|
|
9843
|
-
}, ge =
|
|
9842
|
+
O.current && (O.current = !1, F() && e.preventDefault());
|
|
9843
|
+
}, ge = ae ? /* @__PURE__ */ X(rc, { children: /* @__PURE__ */ X(nc, {
|
|
9844
9844
|
onClick: me,
|
|
9845
9845
|
children: /* @__PURE__ */ Z("div", {
|
|
9846
9846
|
className: "flex w-full flex-row items-center gap-2",
|
|
9847
|
-
children: [/* @__PURE__ */ X(H, { icon:
|
|
9847
|
+
children: [/* @__PURE__ */ X(H, { icon: $e }), /* @__PURE__ */ X("span", {
|
|
9848
9848
|
className: "flex-1",
|
|
9849
|
-
children:
|
|
9849
|
+
children: j.ai.dashboardItem.askOne
|
|
9850
9850
|
})]
|
|
9851
9851
|
})
|
|
9852
9852
|
}) }) : null;
|
|
@@ -9869,23 +9869,23 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9869
9869
|
className: "text-base text-f1-foreground-secondary",
|
|
9870
9870
|
children: t
|
|
9871
9871
|
}) : null]
|
|
9872
|
-
}), l ||
|
|
9873
|
-
className:
|
|
9872
|
+
}), l || ae ? /* @__PURE__ */ Z("div", {
|
|
9873
|
+
className: le,
|
|
9874
9874
|
children: [l ? /* @__PURE__ */ X(oh, {
|
|
9875
9875
|
...l,
|
|
9876
|
-
onOpenChange:
|
|
9877
|
-
}) : null,
|
|
9878
|
-
open:
|
|
9879
|
-
onOpenChange:
|
|
9876
|
+
onOpenChange: D
|
|
9877
|
+
}) : null, ae ? /* @__PURE__ */ Z(Zs, {
|
|
9878
|
+
open: w,
|
|
9879
|
+
onOpenChange: I,
|
|
9880
9880
|
children: [/* @__PURE__ */ X(ac, {
|
|
9881
9881
|
asChild: !0,
|
|
9882
|
-
children: /* @__PURE__ */ X(
|
|
9883
|
-
label:
|
|
9882
|
+
children: /* @__PURE__ */ X(nr, {
|
|
9883
|
+
label: j.actions.other,
|
|
9884
9884
|
icon: Ws,
|
|
9885
9885
|
variant: "ghost",
|
|
9886
9886
|
size: "md",
|
|
9887
9887
|
hideLabel: !0,
|
|
9888
|
-
pressed:
|
|
9888
|
+
pressed: w,
|
|
9889
9889
|
compact: !0,
|
|
9890
9890
|
onClick: (e) => e.stopPropagation()
|
|
9891
9891
|
})
|
|
@@ -9899,93 +9899,93 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9899
9899
|
}) : null]
|
|
9900
9900
|
}), /* @__PURE__ */ X("div", {
|
|
9901
9901
|
className: "min-h-0 flex-1 overflow-auto",
|
|
9902
|
-
children: /* @__PURE__ */ X(
|
|
9902
|
+
children: /* @__PURE__ */ X(y, {
|
|
9903
9903
|
variant: "critical",
|
|
9904
|
-
title:
|
|
9904
|
+
title: j.ai.dashboardItem.errorTitle,
|
|
9905
9905
|
description: i.message,
|
|
9906
9906
|
actions: a ? [{
|
|
9907
9907
|
type: "default",
|
|
9908
|
-
label:
|
|
9908
|
+
label: j.ai.dashboardItem.retry,
|
|
9909
9909
|
onClick: a
|
|
9910
9910
|
}] : []
|
|
9911
9911
|
})
|
|
9912
9912
|
})]
|
|
9913
9913
|
}) : /* @__PURE__ */ Z("div", {
|
|
9914
|
-
className: B("group/dashitem [--f0-page-room:0px] flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background",
|
|
9914
|
+
className: B("group/dashitem [--f0-page-room:0px] flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background", S ? "min-h-full shrink-0" : "h-full"),
|
|
9915
9915
|
"aria-busy": r ? "true" : void 0,
|
|
9916
9916
|
"aria-live": r ? "polite" : void 0,
|
|
9917
9917
|
children: [/* @__PURE__ */ Z("div", {
|
|
9918
|
-
className: B("flex flex-col px-4 py-3",
|
|
9918
|
+
className: B("flex flex-col px-4 py-3", se && "min-h-14"),
|
|
9919
9919
|
children: [/* @__PURE__ */ Z(io, {
|
|
9920
|
-
ref:
|
|
9920
|
+
ref: de.rowRef,
|
|
9921
9921
|
display: "flex",
|
|
9922
9922
|
minWidth: "0",
|
|
9923
|
-
alignItems:
|
|
9923
|
+
alignItems: fe > 1 ? "start" : "center",
|
|
9924
9924
|
children: [/* @__PURE__ */ Z("div", {
|
|
9925
|
-
className: B("flex min-w-0 flex-1 gap-1",
|
|
9926
|
-
children: [/* @__PURE__ */ X(
|
|
9925
|
+
className: B("flex min-w-0 flex-1 gap-1", fe > 1 ? "items-start" : "items-center"),
|
|
9926
|
+
children: [/* @__PURE__ */ X(ir, {
|
|
9927
9927
|
tag: "h3",
|
|
9928
|
-
lines:
|
|
9929
|
-
className: B("text-base font-semibold text-f1-foreground",
|
|
9928
|
+
lines: fe,
|
|
9929
|
+
className: B("text-base font-semibold text-f1-foreground", fe > 1 && "hyphens-auto"),
|
|
9930
9930
|
children: e
|
|
9931
9931
|
}), n ? /* @__PURE__ */ X("div", {
|
|
9932
|
-
ref:
|
|
9932
|
+
ref: de.infoRef,
|
|
9933
9933
|
className: "flex h-5 shrink-0 items-center text-f1-foreground-secondary",
|
|
9934
9934
|
children: /* @__PURE__ */ X(Pe, { info: n })
|
|
9935
9935
|
}) : null]
|
|
9936
|
-
}),
|
|
9937
|
-
ref:
|
|
9938
|
-
className: B(
|
|
9936
|
+
}), se ? /* @__PURE__ */ X("div", {
|
|
9937
|
+
ref: de.actionsRef,
|
|
9938
|
+
className: B(ue, fe > 1 && "-mt-1.5"),
|
|
9939
9939
|
children: /* @__PURE__ */ X("div", {
|
|
9940
9940
|
className: "min-w-0 overflow-clip",
|
|
9941
9941
|
children: /* @__PURE__ */ Z("div", {
|
|
9942
|
-
className: B(
|
|
9942
|
+
className: B(le, "p-0.5 pl-2"),
|
|
9943
9943
|
children: [
|
|
9944
9944
|
l ? /* @__PURE__ */ X(oh, {
|
|
9945
9945
|
...l,
|
|
9946
|
-
onOpenChange:
|
|
9946
|
+
onOpenChange: D
|
|
9947
9947
|
}) : null,
|
|
9948
|
-
|
|
9949
|
-
label: v ?
|
|
9950
|
-
icon: v ?
|
|
9948
|
+
ie ? /* @__PURE__ */ X(nr, {
|
|
9949
|
+
label: v ? j.actions.collapse : j.actions.expand,
|
|
9950
|
+
icon: v ? fi : Ji,
|
|
9951
9951
|
variant: "ghost",
|
|
9952
9952
|
size: "md",
|
|
9953
9953
|
hideLabel: !0,
|
|
9954
9954
|
compact: !0,
|
|
9955
|
-
onClick: () =>
|
|
9955
|
+
onClick: () => C?.(!v)
|
|
9956
9956
|
}) : null,
|
|
9957
|
-
|
|
9958
|
-
open:
|
|
9959
|
-
onOpenChange:
|
|
9957
|
+
oe ? /* @__PURE__ */ Z(Zs, {
|
|
9958
|
+
open: w,
|
|
9959
|
+
onOpenChange: I,
|
|
9960
9960
|
children: [/* @__PURE__ */ X(ac, {
|
|
9961
9961
|
asChild: !0,
|
|
9962
|
-
children: /* @__PURE__ */ X(
|
|
9963
|
-
label:
|
|
9962
|
+
children: /* @__PURE__ */ X(nr, {
|
|
9963
|
+
label: j.actions.other,
|
|
9964
9964
|
icon: Ws,
|
|
9965
9965
|
variant: "ghost",
|
|
9966
9966
|
size: "md",
|
|
9967
9967
|
hideLabel: !0,
|
|
9968
|
-
pressed:
|
|
9968
|
+
pressed: w,
|
|
9969
9969
|
compact: !0,
|
|
9970
9970
|
onClick: (e) => e.stopPropagation()
|
|
9971
9971
|
})
|
|
9972
9972
|
}), /* @__PURE__ */ X(Qs, {
|
|
9973
9973
|
align: "end",
|
|
9974
|
-
className: B("py-1",
|
|
9974
|
+
className: B("py-1", k && "w-96 max-w-[90vw]"),
|
|
9975
9975
|
onCloseAutoFocus: he,
|
|
9976
|
-
children:
|
|
9976
|
+
children: k && re ? /* @__PURE__ */ X("div", {
|
|
9977
9977
|
className: "px-3 py-2 text-base text-f1-foreground [&>div]:flex [&>div]:flex-col [&>div]:gap-2",
|
|
9978
|
-
children: /* @__PURE__ */ X(
|
|
9978
|
+
children: /* @__PURE__ */ X(Bi, {
|
|
9979
9979
|
content: _,
|
|
9980
9980
|
format: "markdown"
|
|
9981
9981
|
})
|
|
9982
9982
|
}) : /* @__PURE__ */ Z(Y, { children: [
|
|
9983
|
-
|
|
9983
|
+
ne ? /* @__PURE__ */ Z("div", {
|
|
9984
9984
|
className: "mb-1 flex flex-col items-start gap-2 border-0 border-b border-solid border-f1-border-secondary p-3",
|
|
9985
|
-
children: [/* @__PURE__ */ X(
|
|
9985
|
+
children: [/* @__PURE__ */ X(ir, {
|
|
9986
9986
|
className: "text-base font-medium text-f1-foreground-tertiary",
|
|
9987
|
-
children:
|
|
9988
|
-
}), /* @__PURE__ */ X(
|
|
9987
|
+
children: j.ai.dashboardItem.chartType
|
|
9988
|
+
}), /* @__PURE__ */ X(ot, {
|
|
9989
9989
|
items: g.map((e) => ({
|
|
9990
9990
|
value: e.value,
|
|
9991
9991
|
icon: e.icon,
|
|
@@ -10001,29 +10001,29 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10001
10001
|
fullWidth: !0
|
|
10002
10002
|
})]
|
|
10003
10003
|
}) : null,
|
|
10004
|
-
|
|
10004
|
+
re ? /* @__PURE__ */ X(rc, { children: /* @__PURE__ */ X(nc, {
|
|
10005
10005
|
onSelect: (e) => {
|
|
10006
|
-
e.preventDefault(),
|
|
10006
|
+
e.preventDefault(), A(!0);
|
|
10007
10007
|
},
|
|
10008
10008
|
children: /* @__PURE__ */ Z("div", {
|
|
10009
10009
|
className: "flex w-full flex-row items-center gap-2",
|
|
10010
10010
|
children: [/* @__PURE__ */ X(H, { icon: Ts }), /* @__PURE__ */ X("span", {
|
|
10011
10011
|
className: "flex-1",
|
|
10012
|
-
children:
|
|
10012
|
+
children: j.ai.dashboardItem.dataExplanation
|
|
10013
10013
|
})]
|
|
10014
10014
|
})
|
|
10015
10015
|
}) }) : null,
|
|
10016
10016
|
ge,
|
|
10017
|
-
|
|
10017
|
+
te ? /* @__PURE__ */ X(rc, { children: /* @__PURE__ */ Z(Xs, { children: [/* @__PURE__ */ X(Js, {
|
|
10018
10018
|
className: "mx-1 rounded-sm px-2",
|
|
10019
10019
|
children: /* @__PURE__ */ Z("div", {
|
|
10020
10020
|
className: "flex w-full flex-row items-center gap-2 pr-2",
|
|
10021
|
-
children: [/* @__PURE__ */ X(H, { icon:
|
|
10021
|
+
children: [/* @__PURE__ */ X(H, { icon: Dr }), /* @__PURE__ */ X("span", {
|
|
10022
10022
|
className: "flex-1 text-base font-medium",
|
|
10023
|
-
children:
|
|
10023
|
+
children: j.ai.dataDownload.title
|
|
10024
10024
|
})]
|
|
10025
10025
|
})
|
|
10026
|
-
}), /* @__PURE__ */ X($s, { children: /* @__PURE__ */ X(oc, { children:
|
|
10026
|
+
}), /* @__PURE__ */ X($s, { children: /* @__PURE__ */ X(oc, { children: ee.map((e) => /* @__PURE__ */ X(nc, {
|
|
10027
10027
|
onClick: e.onClick,
|
|
10028
10028
|
children: /* @__PURE__ */ Z("div", {
|
|
10029
10029
|
className: "flex w-full flex-row items-center gap-2",
|
|
@@ -10033,16 +10033,16 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10033
10033
|
})]
|
|
10034
10034
|
})
|
|
10035
10035
|
}, e.label)) }) })] }) }) : null,
|
|
10036
|
-
|
|
10036
|
+
L ? /* @__PURE__ */ X(rc, { children: /* @__PURE__ */ X(nc, {
|
|
10037
10037
|
onClick: () => {
|
|
10038
|
-
v &&
|
|
10038
|
+
v && C?.(!1), f(h);
|
|
10039
10039
|
},
|
|
10040
10040
|
className: B("text-f1-foreground-critical"),
|
|
10041
10041
|
children: /* @__PURE__ */ Z("div", {
|
|
10042
10042
|
className: "flex w-full flex-row items-center gap-2",
|
|
10043
|
-
children: [/* @__PURE__ */ X(H, { icon:
|
|
10043
|
+
children: [/* @__PURE__ */ X(H, { icon: fr }), /* @__PURE__ */ X("span", {
|
|
10044
10044
|
className: "flex-1",
|
|
10045
|
-
children:
|
|
10045
|
+
children: j.actions.delete
|
|
10046
10046
|
})]
|
|
10047
10047
|
})
|
|
10048
10048
|
}) }) : null
|
|
@@ -10053,25 +10053,25 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10053
10053
|
})
|
|
10054
10054
|
})
|
|
10055
10055
|
}) : null]
|
|
10056
|
-
}), t ||
|
|
10056
|
+
}), t || b ? /* @__PURE__ */ Z("div", {
|
|
10057
10057
|
className: "relative flex items-baseline gap-1",
|
|
10058
|
-
children: [t ? /* @__PURE__ */ X(
|
|
10059
|
-
lines:
|
|
10058
|
+
children: [t ? /* @__PURE__ */ X(ir, {
|
|
10059
|
+
lines: pe,
|
|
10060
10060
|
className: "text-base text-f1-foreground-secondary",
|
|
10061
10061
|
children: t
|
|
10062
|
-
}) : null,
|
|
10062
|
+
}) : null, b ? /* @__PURE__ */ Z(Y, { children: [t ? /* @__PURE__ */ X("span", {
|
|
10063
10063
|
"aria-hidden": "true",
|
|
10064
10064
|
className: "shrink-0 text-base text-f1-foreground-tertiary",
|
|
10065
10065
|
children: "·"
|
|
10066
10066
|
}) : null, /* @__PURE__ */ X("button", {
|
|
10067
10067
|
type: "button",
|
|
10068
|
-
onClick:
|
|
10068
|
+
onClick: b.onClick,
|
|
10069
10069
|
className: "shrink-0 cursor-pointer whitespace-nowrap border-0 bg-transparent p-0 text-base font-medium text-f1-foreground-secondary underline hover:text-f1-foreground",
|
|
10070
|
-
children:
|
|
10070
|
+
children: b.label
|
|
10071
10071
|
})] }) : null]
|
|
10072
10072
|
}) : null]
|
|
10073
10073
|
}), /* @__PURE__ */ X("div", {
|
|
10074
|
-
className: B("flex-1", !
|
|
10074
|
+
className: B("flex-1", !S && "min-h-0"),
|
|
10075
10075
|
children: r ? o : s
|
|
10076
10076
|
})]
|
|
10077
10077
|
});
|
|
@@ -10127,11 +10127,11 @@ function ph({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
|
10127
10127
|
visibility: o ? "visible" : "hidden"
|
|
10128
10128
|
},
|
|
10129
10129
|
className: B("z-50 rounded-md bg-f1-background p-1 border border-solid border-f1-border-secondary", "drop-shadow"),
|
|
10130
|
-
children: /* @__PURE__ */ X(
|
|
10130
|
+
children: /* @__PURE__ */ X(nr, {
|
|
10131
10131
|
type: "button",
|
|
10132
10132
|
variant: "ghost",
|
|
10133
10133
|
label: i.ai.dashboardItem.askOne,
|
|
10134
|
-
icon:
|
|
10134
|
+
icon: $e,
|
|
10135
10135
|
onClick: t
|
|
10136
10136
|
})
|
|
10137
10137
|
}), document.body);
|
|
@@ -10139,7 +10139,7 @@ function ph({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
|
10139
10139
|
//#endregion
|
|
10140
10140
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ChartItem/pointQuote.ts
|
|
10141
10141
|
function mh(e, t, n, r = "y") {
|
|
10142
|
-
return t === null ? n : r === "x" && e.type === "scatter" ?
|
|
10142
|
+
return t === null ? n : r === "x" && e.type === "scatter" ? Ye(e.xTooltipValueFormatter, e.xValueFormatter)(t) : Ye(e.tooltipValueFormatter, e.valueFormatter)(t);
|
|
10143
10143
|
}
|
|
10144
10144
|
function hh(e, t) {
|
|
10145
10145
|
return t ? `${e} — ${t}` : e;
|
|
@@ -10174,39 +10174,39 @@ function Sh(e) {
|
|
|
10174
10174
|
{
|
|
10175
10175
|
label: e.dataChart.barChartVertical,
|
|
10176
10176
|
value: "bar-vertical",
|
|
10177
|
-
icon:
|
|
10177
|
+
icon: gi,
|
|
10178
10178
|
type: "bar",
|
|
10179
10179
|
orientation: "vertical"
|
|
10180
10180
|
},
|
|
10181
10181
|
{
|
|
10182
10182
|
label: e.dataChart.barChartHorizontal,
|
|
10183
10183
|
value: "bar-horizontal",
|
|
10184
|
-
icon:
|
|
10184
|
+
icon: wi,
|
|
10185
10185
|
type: "bar",
|
|
10186
10186
|
orientation: "horizontal"
|
|
10187
10187
|
},
|
|
10188
10188
|
{
|
|
10189
10189
|
label: e.dataChart.lineChart,
|
|
10190
10190
|
value: "line",
|
|
10191
|
-
icon:
|
|
10191
|
+
icon: or,
|
|
10192
10192
|
type: "line"
|
|
10193
10193
|
},
|
|
10194
10194
|
{
|
|
10195
10195
|
label: e.dataChart.funnel,
|
|
10196
10196
|
value: "funnel",
|
|
10197
|
-
icon:
|
|
10197
|
+
icon: ta,
|
|
10198
10198
|
type: "funnel"
|
|
10199
10199
|
},
|
|
10200
10200
|
{
|
|
10201
10201
|
label: e.dataChart.pieChart,
|
|
10202
10202
|
value: "pie",
|
|
10203
|
-
icon:
|
|
10203
|
+
icon: Gr,
|
|
10204
10204
|
type: "pie"
|
|
10205
10205
|
},
|
|
10206
10206
|
{
|
|
10207
10207
|
label: e.dataChart.table,
|
|
10208
10208
|
value: "table",
|
|
10209
|
-
icon:
|
|
10209
|
+
icon: Di,
|
|
10210
10210
|
type: "table"
|
|
10211
10211
|
}
|
|
10212
10212
|
];
|
|
@@ -10214,30 +10214,30 @@ function Sh(e) {
|
|
|
10214
10214
|
var Ch = { type: "bar" };
|
|
10215
10215
|
function wh(e) {
|
|
10216
10216
|
switch (e.type) {
|
|
10217
|
-
case "bar": return /* @__PURE__ */ X(
|
|
10217
|
+
case "bar": return /* @__PURE__ */ X(it, {
|
|
10218
10218
|
orientation: e.orientation,
|
|
10219
10219
|
stacked: e.stacked,
|
|
10220
10220
|
showLegend: e.showLegend
|
|
10221
10221
|
});
|
|
10222
|
-
case "line": return /* @__PURE__ */ X(
|
|
10222
|
+
case "line": return /* @__PURE__ */ X(He, {
|
|
10223
10223
|
lineType: e.lineType,
|
|
10224
10224
|
showArea: e.showArea,
|
|
10225
10225
|
showDots: e.showDots,
|
|
10226
10226
|
showLegend: e.showLegend
|
|
10227
10227
|
});
|
|
10228
|
-
case "funnel": return /* @__PURE__ */ X(
|
|
10228
|
+
case "funnel": return /* @__PURE__ */ X(Ie, {
|
|
10229
10229
|
orient: e.orient,
|
|
10230
10230
|
sort: e.sort,
|
|
10231
10231
|
showLegend: e.showLegend
|
|
10232
10232
|
});
|
|
10233
|
-
case "pie": return /* @__PURE__ */ X(
|
|
10233
|
+
case "pie": return /* @__PURE__ */ X(rn, {
|
|
10234
10234
|
innerRadius: e.innerRadius,
|
|
10235
10235
|
showLegend: e.showLegend
|
|
10236
10236
|
});
|
|
10237
|
-
case "radar": return /* @__PURE__ */ X(
|
|
10238
|
-
case "gauge": return /* @__PURE__ */ X(
|
|
10239
|
-
case "heatmap": return /* @__PURE__ */ X(
|
|
10240
|
-
case "scatter": return /* @__PURE__ */ X(
|
|
10237
|
+
case "radar": return /* @__PURE__ */ X(_e, { showLegend: e.showLegend });
|
|
10238
|
+
case "gauge": return /* @__PURE__ */ X(Jt, {});
|
|
10239
|
+
case "heatmap": return /* @__PURE__ */ X(cn, {});
|
|
10240
|
+
case "scatter": return /* @__PURE__ */ X(u, { showLegend: e.showLegend ?? !1 });
|
|
10241
10241
|
}
|
|
10242
10242
|
}
|
|
10243
10243
|
function Th(e) {
|
|
@@ -10357,14 +10357,14 @@ function Oh({ config: e, data: t }) {
|
|
|
10357
10357
|
label: e,
|
|
10358
10358
|
id: e
|
|
10359
10359
|
}))
|
|
10360
|
-
}), [i]), o =
|
|
10360
|
+
}), [i]), o = me(a, [i]), s = K(() => [{
|
|
10361
10361
|
type: "table",
|
|
10362
10362
|
options: { columns: i.columns.map((e, t) => ({
|
|
10363
10363
|
label: e,
|
|
10364
10364
|
render: (n) => String(n[i.keys?.[t] ?? e] ?? "")
|
|
10365
10365
|
})) }
|
|
10366
10366
|
}], [i.columns]);
|
|
10367
|
-
return /* @__PURE__ */ X(
|
|
10367
|
+
return /* @__PURE__ */ X(xt, {
|
|
10368
10368
|
fullHeight: !0,
|
|
10369
10369
|
source: o,
|
|
10370
10370
|
visualizations: s
|
|
@@ -10374,87 +10374,87 @@ function kh(e) {
|
|
|
10374
10374
|
return Cm(e.chart) && e.chart.type === "bar" && "orientation" in e.chart && e.chart.orientation === "horizontal";
|
|
10375
10375
|
}
|
|
10376
10376
|
function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c, onTransformChart: l, isFullscreen: u, onFullscreenChange: d }) {
|
|
10377
|
-
let f = z(), [
|
|
10377
|
+
let f = z(), [p, m] = J("chart"), { enabled: h, setPendingQuote: g, setOpen: _, focusChatInput: v } = zr(), y = !Cm(e.chart), b = y ? Ch : e.chart, [x, S] = J(null), C = e.useDashboardFilters !== !1, w = JSON.stringify(r?.value ?? {}), { data: T, isLoading: E, error: D, retry: O } = ah(e.fetchData, t, C, w), k = q(null), A = K(() => T && !y ? Eh(e, T) : void 0, [
|
|
10378
10378
|
e,
|
|
10379
|
-
|
|
10380
|
-
|
|
10379
|
+
T,
|
|
10380
|
+
y
|
|
10381
10381
|
]);
|
|
10382
10382
|
G(() => {
|
|
10383
|
-
|
|
10383
|
+
S(null);
|
|
10384
10384
|
}, [
|
|
10385
|
+
T,
|
|
10385
10386
|
E,
|
|
10386
|
-
|
|
10387
|
-
x.type
|
|
10387
|
+
b.type
|
|
10388
10388
|
]);
|
|
10389
|
-
let
|
|
10389
|
+
let j = a ? "none" : s ? "host" : h ? "chat" : "none", M = j !== "none" && e.title.trim().length > 0;
|
|
10390
10390
|
G(() => {
|
|
10391
|
-
|
|
10392
|
-
}, [
|
|
10393
|
-
let
|
|
10391
|
+
S(null);
|
|
10392
|
+
}, [j]);
|
|
10393
|
+
let N = W((t) => {
|
|
10394
10394
|
if (s) {
|
|
10395
10395
|
s({
|
|
10396
10396
|
id: e.id,
|
|
10397
10397
|
title: e.title,
|
|
10398
10398
|
point: t
|
|
10399
|
-
}),
|
|
10399
|
+
}), S(null);
|
|
10400
10400
|
return;
|
|
10401
10401
|
}
|
|
10402
|
-
if (!
|
|
10403
|
-
let n = { text: xh(e.title,
|
|
10402
|
+
if (!A) return;
|
|
10403
|
+
let n = { text: xh(e.title, A, t, f.dataChart.noData) };
|
|
10404
10404
|
c?.({
|
|
10405
10405
|
id: e.id,
|
|
10406
10406
|
title: e.title,
|
|
10407
10407
|
point: t,
|
|
10408
10408
|
quote: n
|
|
10409
|
-
}),
|
|
10409
|
+
}), g(n), u && d?.(!1), _(!0), v(), S(null);
|
|
10410
10410
|
}, [
|
|
10411
10411
|
e,
|
|
10412
|
-
|
|
10412
|
+
A,
|
|
10413
10413
|
f,
|
|
10414
10414
|
s,
|
|
10415
10415
|
c,
|
|
10416
10416
|
u,
|
|
10417
10417
|
d,
|
|
10418
|
+
g,
|
|
10418
10419
|
_,
|
|
10419
|
-
v
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
data: E,
|
|
10420
|
+
v
|
|
10421
|
+
]), P = K(() => Sh(f), [f]), F = ih({
|
|
10422
|
+
chartContainerRef: k,
|
|
10423
|
+
chartConfig: b,
|
|
10424
|
+
data: T,
|
|
10425
10425
|
title: e.title
|
|
10426
|
-
}),
|
|
10426
|
+
}), I = K(() => [...n ?? [], ...F], [n, F]), ee = W(() => S(null), []), te = b.type === "bar" ? "orientation" in b ? b.orientation ?? "vertical" : "vertical" : void 0, L = T ? Dm(T, b.type) : b.type, ne = K(() => Lm(L), [L]), re = K(() => T ? Im(Om(T, L)) : !1, [T, L]), ie = T && Array.isArray(T.series) ? T.series.length : 1, ae = P.filter((e) => {
|
|
10427
10427
|
let t = e.type === "bar" ? "bar" : e.type;
|
|
10428
|
-
return !(!
|
|
10429
|
-
}),
|
|
10430
|
-
let n = t.type === "table", r = n ?
|
|
10428
|
+
return !(!ne.has(t) || e.type === "pie" && ie > 1 || (e.type === "pie" || e.type === "funnel") && re);
|
|
10429
|
+
}), oe = l && L !== "scatter" && L !== "radar" && L !== "heatmap" ? ae.map((t) => {
|
|
10430
|
+
let n = t.type === "table", r = n ? p === "table" : p === "chart" && b.type === t.type && (t.type !== "bar" || te === t.orientation);
|
|
10431
10431
|
return {
|
|
10432
10432
|
label: t.label,
|
|
10433
10433
|
value: t.value,
|
|
10434
10434
|
icon: t.icon,
|
|
10435
10435
|
isActive: r,
|
|
10436
10436
|
onSelect: () => {
|
|
10437
|
-
n ?
|
|
10437
|
+
n ? m("table") : (m("chart"), (b.type !== t.type || t.type === "bar" && te !== t.orientation) && l(e.id, t.type, t.orientation));
|
|
10438
10438
|
}
|
|
10439
10439
|
};
|
|
10440
|
-
}) : void 0,
|
|
10440
|
+
}) : void 0, se = !!u && kh(e), [ce, le] = J(0), ue = !!d && kh(e), de = ue && !u && ce > 0, fe = ue && !!u, pe = T?.categories?.length ?? 0, me = de ? f.dataChart.windowedCategories.replace("{{count}}", String(Math.max(0, pe - ce))).replace("{{total}}", String(pe)) : void 0, he = de ? {
|
|
10441
10441
|
label: f.actions.showAll,
|
|
10442
10442
|
onClick: () => d?.(!0)
|
|
10443
|
-
} :
|
|
10443
|
+
} : fe ? {
|
|
10444
10444
|
label: f.actions.showLess,
|
|
10445
10445
|
onClick: () => d?.(!1)
|
|
10446
10446
|
} : void 0;
|
|
10447
10447
|
return /* @__PURE__ */ X(uh, {
|
|
10448
10448
|
title: e.title,
|
|
10449
|
-
description:
|
|
10449
|
+
description: me ?? e.description,
|
|
10450
10450
|
info: e.info,
|
|
10451
|
-
...
|
|
10451
|
+
...he ? { descriptionAction: he } : {},
|
|
10452
10452
|
explanation: e.explanation,
|
|
10453
|
-
isLoading:
|
|
10454
|
-
error:
|
|
10455
|
-
onRetry:
|
|
10456
|
-
skeleton: wh(
|
|
10457
|
-
actions:
|
|
10453
|
+
isLoading: E,
|
|
10454
|
+
error: D ?? (y ? /* @__PURE__ */ Error() : void 0),
|
|
10455
|
+
onRetry: y ? void 0 : O,
|
|
10456
|
+
skeleton: wh(b),
|
|
10457
|
+
actions: I,
|
|
10458
10458
|
itemFilters: r,
|
|
10459
10459
|
editMode: i,
|
|
10460
10460
|
readOnly: a,
|
|
@@ -10462,37 +10462,37 @@ function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10462
10462
|
onAskAi: s,
|
|
10463
10463
|
onAskAiTarget: c,
|
|
10464
10464
|
itemId: e.id,
|
|
10465
|
-
chartTypeOptions:
|
|
10465
|
+
chartTypeOptions: oe,
|
|
10466
10466
|
isFullscreen: u,
|
|
10467
|
-
fitContent:
|
|
10467
|
+
fitContent: se,
|
|
10468
10468
|
onFullscreenChange: d,
|
|
10469
|
-
children:
|
|
10470
|
-
config:
|
|
10471
|
-
data:
|
|
10469
|
+
children: T && A ? p === "table" ? /* @__PURE__ */ X(Oh, {
|
|
10470
|
+
config: b,
|
|
10471
|
+
data: T
|
|
10472
10472
|
}) : /* @__PURE__ */ Z("div", {
|
|
10473
|
-
ref:
|
|
10473
|
+
ref: k,
|
|
10474
10474
|
tabIndex: -1,
|
|
10475
|
-
className: B("relative h-full w-full px-4 py-3",
|
|
10476
|
-
children: [/* @__PURE__ */ X(
|
|
10477
|
-
...
|
|
10475
|
+
className: B("relative h-full w-full px-4 py-3", Dn("rounded-sm focus-visible:ring-inset focus-visible:ring-offset-0")),
|
|
10476
|
+
children: [/* @__PURE__ */ X(Kt, {
|
|
10477
|
+
...A,
|
|
10478
10478
|
ariaLabel: e.title,
|
|
10479
|
-
onPointClick:
|
|
10480
|
-
...
|
|
10479
|
+
onPointClick: M ? (e) => S(e) : void 0,
|
|
10480
|
+
...ue ? {
|
|
10481
10481
|
windowCategories: !0,
|
|
10482
|
-
onHiddenCategoriesChange:
|
|
10482
|
+
onHiddenCategoriesChange: le
|
|
10483
10483
|
} : {},
|
|
10484
|
-
...
|
|
10484
|
+
...se ? { showAllCategories: !0 } : {}
|
|
10485
10485
|
}), /* @__PURE__ */ X(ph, {
|
|
10486
|
-
anchor:
|
|
10486
|
+
anchor: x,
|
|
10487
10487
|
onAsk: () => {
|
|
10488
|
-
|
|
10488
|
+
x && N(x);
|
|
10489
10489
|
},
|
|
10490
|
-
onDismiss:
|
|
10491
|
-
returnFocusTo:
|
|
10490
|
+
onDismiss: ee,
|
|
10491
|
+
returnFocusTo: k
|
|
10492
10492
|
})]
|
|
10493
|
-
}) :
|
|
10493
|
+
}) : E ? null : /* @__PURE__ */ X("div", {
|
|
10494
10494
|
className: "h-full w-full px-4 py-3",
|
|
10495
|
-
children: /* @__PURE__ */ X(
|
|
10495
|
+
children: /* @__PURE__ */ X($t, {})
|
|
10496
10496
|
})
|
|
10497
10497
|
});
|
|
10498
10498
|
}
|
|
@@ -10513,7 +10513,7 @@ function Mh(e, t, n = "excel") {
|
|
|
10513
10513
|
let t = n === "excel" ? i.excelValue ?? i.render : i.render;
|
|
10514
10514
|
if (t) {
|
|
10515
10515
|
let n = t(e);
|
|
10516
|
-
r[i.id] =
|
|
10516
|
+
r[i.id] = St(n) ?? rt(n);
|
|
10517
10517
|
} else r[i.id] = e[i.id];
|
|
10518
10518
|
}
|
|
10519
10519
|
return r;
|
|
@@ -10606,11 +10606,11 @@ function Rh({ source: e, title: t, description: n, columns: r, tableSettings: i
|
|
|
10606
10606
|
]), l = W(() => c("excel"), [c]), u = W(() => c("csv"), [c]);
|
|
10607
10607
|
return K(() => e ? [{
|
|
10608
10608
|
label: a("ai.dataDownload.download", { format: "Excel" }),
|
|
10609
|
-
icon:
|
|
10609
|
+
icon: Di,
|
|
10610
10610
|
onClick: l
|
|
10611
10611
|
}, {
|
|
10612
10612
|
label: a("ai.dataDownload.download", { format: "CSV" }),
|
|
10613
|
-
icon:
|
|
10613
|
+
icon: Di,
|
|
10614
10614
|
onClick: u
|
|
10615
10615
|
}] : [], [
|
|
10616
10616
|
e,
|
|
@@ -10622,7 +10622,7 @@ function Rh({ source: e, title: t, description: n, columns: r, tableSettings: i
|
|
|
10622
10622
|
//#endregion
|
|
10623
10623
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/CollectionItem/CollectionItem.tsx
|
|
10624
10624
|
function zh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c, isFullscreen: l, onFullscreenChange: u }) {
|
|
10625
|
-
let d = e.useDashboardFilters === !1 ? {} : t, f = JSON.stringify(d), p = JSON.stringify(r?.value ?? {}), m = K(() => e.createSource(d), [f, p]), h =
|
|
10625
|
+
let d = e.useDashboardFilters === !1 ? {} : t, f = JSON.stringify(d), p = JSON.stringify(r?.value ?? {}), m = K(() => e.createSource(d), [f, p]), h = me(m, [f, p]), [g, _] = J(), v = K(() => jh(e.visualizations), [e]), y = Rh({
|
|
10626
10626
|
source: h,
|
|
10627
10627
|
title: e.title,
|
|
10628
10628
|
description: e.description,
|
|
@@ -10645,7 +10645,7 @@ function zh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10645
10645
|
itemId: e.id,
|
|
10646
10646
|
isFullscreen: l,
|
|
10647
10647
|
onFullscreenChange: u,
|
|
10648
|
-
children: /* @__PURE__ */ X(
|
|
10648
|
+
children: /* @__PURE__ */ X(xt, {
|
|
10649
10649
|
fullHeight: !0,
|
|
10650
10650
|
source: h,
|
|
10651
10651
|
visualizations: e.visualizations,
|
|
@@ -10664,7 +10664,7 @@ function zh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10664
10664
|
function Bh() {
|
|
10665
10665
|
return /* @__PURE__ */ Z("div", {
|
|
10666
10666
|
className: "flex h-full items-end gap-3 px-4 pb-4",
|
|
10667
|
-
children: [/* @__PURE__ */ X(
|
|
10667
|
+
children: [/* @__PURE__ */ X(_n, { className: "h-10 w-36 rounded" }), /* @__PURE__ */ X(_n, { className: "h-4 w-16 rounded" })]
|
|
10668
10668
|
});
|
|
10669
10669
|
}
|
|
10670
10670
|
//#endregion
|
|
@@ -10704,7 +10704,7 @@ function Hh(e, t) {
|
|
|
10704
10704
|
};
|
|
10705
10705
|
}
|
|
10706
10706
|
function Uh({ value: e, trend: t, comparison: n }) {
|
|
10707
|
-
let r = q(null), { height: i, width: a } =
|
|
10707
|
+
let r = q(null), { height: i, width: a } = st(r), [o, s] = J(!1), c = i > 220;
|
|
10708
10708
|
return Dc(() => {
|
|
10709
10709
|
let e = r.current;
|
|
10710
10710
|
s(e !== null && (e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight));
|
|
@@ -10719,7 +10719,7 @@ function Uh({ value: e, trend: t, comparison: n }) {
|
|
|
10719
10719
|
]), /* @__PURE__ */ X("div", {
|
|
10720
10720
|
ref: r,
|
|
10721
10721
|
tabIndex: o ? 0 : void 0,
|
|
10722
|
-
className: B("flex h-full min-h-0 overflow-auto px-4 pb-4", c ? "items-center" : "items-end", o &&
|
|
10722
|
+
className: B("flex h-full min-h-0 overflow-auto px-4 pb-4", c ? "items-center" : "items-end", o && Dn("rounded-sm focus-visible:ring-inset focus-visible:ring-offset-0")),
|
|
10723
10723
|
children: /* @__PURE__ */ Z("div", {
|
|
10724
10724
|
className: B("flex flex-col gap-1", c && "mx-auto -translate-y-2"),
|
|
10725
10725
|
children: [/* @__PURE__ */ Z("div", {
|
|
@@ -10952,7 +10952,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10952
10952
|
}, o = (e) => {
|
|
10953
10953
|
document.removeEventListener("pointermove", a), document.removeEventListener("pointerup", s), document.removeEventListener("pointercancel", u), P.current = null;
|
|
10954
10954
|
let t = A.current, n = j.current;
|
|
10955
|
-
e && i && t && n && F(t, n), A.current = null, j.current = null, N.current = [], T(null), D(null), i && window.dispatchEvent(new CustomEvent(
|
|
10955
|
+
e && i && t && n && F(t, n), A.current = null, j.current = null, N.current = [], T(null), D(null), i && window.dispatchEvent(new CustomEvent(Jr));
|
|
10956
10956
|
}, s = (e) => {
|
|
10957
10957
|
i && (N.current = Array.from(document.querySelectorAll("[data-ai-chat-dropzone]")), j.current = I(e.clientX, e.clientY)), o(!0);
|
|
10958
10958
|
}, u = () => o(!1);
|
|
@@ -11303,7 +11303,7 @@ function hg({ onExportExcel: e, isExporting: t }) {
|
|
|
11303
11303
|
return /* @__PURE__ */ X(Hr, {
|
|
11304
11304
|
items: [{
|
|
11305
11305
|
label: t ? n("ai.dataDownload.exporting") : n("ai.dataDownload.exportDashboard", { format: "Excel" }),
|
|
11306
|
-
icon:
|
|
11306
|
+
icon: Dr,
|
|
11307
11307
|
onClick: t ? () => {} : e
|
|
11308
11308
|
}],
|
|
11309
11309
|
icon: Ws
|
|
@@ -11339,9 +11339,9 @@ function vg() {
|
|
|
11339
11339
|
role: "status",
|
|
11340
11340
|
"aria-label": "Loading filters",
|
|
11341
11341
|
children: [
|
|
11342
|
-
/* @__PURE__ */ X(
|
|
11343
|
-
/* @__PURE__ */ X(
|
|
11344
|
-
/* @__PURE__ */ X(
|
|
11342
|
+
/* @__PURE__ */ X(_n, { className: "h-8 w-24 rounded-md" }),
|
|
11343
|
+
/* @__PURE__ */ X(_n, { className: "h-8 w-20 rounded-md" }),
|
|
11344
|
+
/* @__PURE__ */ X(_n, { className: "h-8 w-20 rounded-md" })
|
|
11345
11345
|
]
|
|
11346
11346
|
});
|
|
11347
11347
|
}
|
|
@@ -11464,7 +11464,7 @@ var wg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11464
11464
|
}), S = K(() => {
|
|
11465
11465
|
if (!_) return {};
|
|
11466
11466
|
let e = {};
|
|
11467
|
-
for (let [t, n] of Object.entries(_)) e[t] =
|
|
11467
|
+
for (let [t, n] of Object.entries(_)) e[t] = dn[n.type].valueConverter?.(n.defaultValue, n, y) ?? n.defaultValue;
|
|
11468
11468
|
return e;
|
|
11469
11469
|
}, []), [C, w] = J(S), { exportAsExcel: T, isExporting: E } = Cg({
|
|
11470
11470
|
items: a,
|
|
@@ -11495,7 +11495,7 @@ var wg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11495
11495
|
}) : v ? /* @__PURE__ */ X(vg, {}) : null
|
|
11496
11496
|
}), /* @__PURE__ */ Z("div", {
|
|
11497
11497
|
className: "flex shrink-0 items-center gap-2",
|
|
11498
|
-
children: [_ ? /* @__PURE__ */ X(
|
|
11498
|
+
children: [_ ? /* @__PURE__ */ X(le, {
|
|
11499
11499
|
navigationFilters: _,
|
|
11500
11500
|
currentNavigationFilters: C,
|
|
11501
11501
|
onChangeNavigationFilters: w,
|
|
@@ -11527,11 +11527,11 @@ var wg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11527
11527
|
});
|
|
11528
11528
|
};
|
|
11529
11529
|
wg.displayName = "F0AnalyticsDashboard";
|
|
11530
|
-
var Tg =
|
|
11530
|
+
var Tg = gn("F0AnalyticsDashboard", wg), Eg = () => ar("(min-width: 640px)", { initializeWithValue: !1 }), Dg = () => ar("(max-width: 639px)", { initializeWithValue: !1 }), Og = /*#__PURE__*/ U.createContext(void 0);
|
|
11531
11531
|
process.env.NODE_ENV !== "production" && (Og.displayName = "ToastContext");
|
|
11532
11532
|
function kg() {
|
|
11533
11533
|
let e = U.useContext(Og);
|
|
11534
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
11534
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? En(73) : "Base UI: useToastManager must be used within <Toast.Provider>.");
|
|
11535
11535
|
return e;
|
|
11536
11536
|
}
|
|
11537
11537
|
//#endregion
|
|
@@ -11580,7 +11580,7 @@ var Ng = {
|
|
|
11580
11580
|
expanded: (e) => e.hovering || e.focused,
|
|
11581
11581
|
expandedOrOutOfFocus: (e) => e.hovering || e.focused || !e.isWindowFocused,
|
|
11582
11582
|
prevFocusElement: (e) => e.prevFocusElement
|
|
11583
|
-
}, Pg = class extends
|
|
11583
|
+
}, Pg = class extends Ln {
|
|
11584
11584
|
timers = /* @__PURE__ */ new Map();
|
|
11585
11585
|
areTimersPaused = !1;
|
|
11586
11586
|
constructor(e) {
|
|
@@ -11619,7 +11619,7 @@ var Ng = {
|
|
|
11619
11619
|
i.splice(n, 1), this.setToasts(i);
|
|
11620
11620
|
}
|
|
11621
11621
|
addToast = (e) => {
|
|
11622
|
-
let { timeout: t, limit: n } = this.state, r = e.id ||
|
|
11622
|
+
let { timeout: t, limit: n } = this.state, r = e.id || et("toast");
|
|
11623
11623
|
if (e.id) {
|
|
11624
11624
|
let t = Ng.toast(this.state, e.id);
|
|
11625
11625
|
if (t) {
|
|
@@ -11701,7 +11701,7 @@ var Ng = {
|
|
|
11701
11701
|
}
|
|
11702
11702
|
resumeTimers() {
|
|
11703
11703
|
this.areTimersPaused && (this.areTimersPaused = !1, this.timers.forEach((e, t) => {
|
|
11704
|
-
e.remaining = e.remaining > 0 ? e.remaining : e.delay, e.timeout ??=
|
|
11704
|
+
e.remaining = e.remaining > 0 ? e.remaining : e.delay, e.timeout ??= Fn.create(), e.timeout.start(e.remaining, () => {
|
|
11705
11705
|
this.handleTimerFired(t), e.callback();
|
|
11706
11706
|
}), e.start = Date.now();
|
|
11707
11707
|
}));
|
|
@@ -11711,14 +11711,14 @@ var Ng = {
|
|
|
11711
11711
|
}
|
|
11712
11712
|
handleDocumentPointerDown = (e) => {
|
|
11713
11713
|
if (e.pointerType !== "touch") return;
|
|
11714
|
-
let t =
|
|
11715
|
-
|
|
11714
|
+
let t = In(e);
|
|
11715
|
+
Tn(this.state.viewport, t) || (this.resumeTimers(), this.update({
|
|
11716
11716
|
hovering: !1,
|
|
11717
11717
|
focused: !1
|
|
11718
11718
|
}));
|
|
11719
11719
|
};
|
|
11720
11720
|
scheduleTimer(e, t, n) {
|
|
11721
|
-
let r = Date.now(), i = Ng.expandedOrOutOfFocus(this.state) ? void 0 :
|
|
11721
|
+
let r = Date.now(), i = Ng.expandedOrOutOfFocus(this.state) ? void 0 : Fn.create();
|
|
11722
11722
|
i?.start(t, () => {
|
|
11723
11723
|
this.handleTimerFired(e), n();
|
|
11724
11724
|
}), this.timers.set(e, {
|
|
@@ -11751,8 +11751,8 @@ var Ng = {
|
|
|
11751
11751
|
t && (n.hovering = !1, n.focused = !1), this.update(n);
|
|
11752
11752
|
}
|
|
11753
11753
|
handleFocusManagement(e) {
|
|
11754
|
-
let t =
|
|
11755
|
-
if (!this.state.viewport || !
|
|
11754
|
+
let t = bn(Un(this.state.viewport));
|
|
11755
|
+
if (!this.state.viewport || !Tn(this.state.viewport, t) || !yn(t)) return;
|
|
11756
11756
|
if (e === void 0) {
|
|
11757
11757
|
this.restoreFocusToPrevElement();
|
|
11758
11758
|
return;
|
|
@@ -11764,7 +11764,7 @@ var Ng = {
|
|
|
11764
11764
|
a ? a.ref?.current?.focus() : this.restoreFocusToPrevElement();
|
|
11765
11765
|
}
|
|
11766
11766
|
}, Fg = function(e) {
|
|
11767
|
-
let { children: t, timeout: n = 5e3, limit: r = 3, toastManager: i } = e, a =
|
|
11767
|
+
let { children: t, timeout: n = 5e3, limit: r = 3, toastManager: i } = e, a = Sn(() => new Pg({
|
|
11768
11768
|
timeout: n,
|
|
11769
11769
|
limit: r,
|
|
11770
11770
|
viewport: null,
|
|
@@ -11774,7 +11774,7 @@ var Ng = {
|
|
|
11774
11774
|
isWindowFocused: !0,
|
|
11775
11775
|
prevFocusElement: null
|
|
11776
11776
|
})).current;
|
|
11777
|
-
return
|
|
11777
|
+
return wn(a.disposeEffect), U.useEffect(function() {
|
|
11778
11778
|
if (i) return i[" subscribe"](({ action: e, options: t }) => {
|
|
11779
11779
|
let n = t.id;
|
|
11780
11780
|
e === "promise" && t.promise ? a.promiseToast(t.promise, t) : e === "update" && n ? a.updateToast(n, t.updates) : e === "close" ? a.closeToast(n) : a.addToast(t);
|
|
@@ -11791,7 +11791,7 @@ var Ng = {
|
|
|
11791
11791
|
process.env.NODE_ENV !== "production" && (Fg.displayName = "ToastProvider");
|
|
11792
11792
|
function Ig(e) {
|
|
11793
11793
|
let { store: t, timeout: n, limit: r } = e;
|
|
11794
|
-
return
|
|
11794
|
+
return xn(() => {
|
|
11795
11795
|
t.syncProviderProps(n, r);
|
|
11796
11796
|
}, [
|
|
11797
11797
|
t,
|
|
@@ -11802,23 +11802,23 @@ function Ig(e) {
|
|
|
11802
11802
|
//#endregion
|
|
11803
11803
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/viewport/ToastViewportCssVars.mjs
|
|
11804
11804
|
var Lg = "--toast-frontmost-height", Rg = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
11805
|
-
let { render: n, className: r, style: i, children: a, ...o } = e, s = kg(), c =
|
|
11805
|
+
let { render: n, className: r, style: i, children: a, ...o } = e, s = kg(), c = Cn(), l = U.useRef(!1), u = U.useRef(!1), d = U.useRef(!1), f = s.useState("isEmpty"), p = s.useState("toasts"), m = s.useState("focused"), h = s.useState("expanded"), g = s.useState("prevFocusElement"), _ = p[0]?.height, v = p.some((e) => e.transitionStatus === "ending"), y = p.filter((e) => e.priority === "high");
|
|
11806
11806
|
U.useEffect(() => {
|
|
11807
11807
|
let e = s.state.viewport;
|
|
11808
11808
|
if (!e || f) return;
|
|
11809
|
-
let t =
|
|
11809
|
+
let t = vn(e), n = Un(e);
|
|
11810
11810
|
function r(t) {
|
|
11811
|
-
t.key === "F6" &&
|
|
11811
|
+
t.key === "F6" && In(t) !== e && (t.preventDefault(), s.set("prevFocusElement", bn(n)), e?.focus({ preventScroll: !0 }), s.pauseTimers(), s.set("focused", !0));
|
|
11812
11812
|
}
|
|
11813
11813
|
function i(e) {
|
|
11814
|
-
|
|
11814
|
+
In(e) === t && (s.set("isWindowFocused", !1), s.pauseTimers());
|
|
11815
11815
|
}
|
|
11816
11816
|
function a(n) {
|
|
11817
11817
|
if (n.relatedTarget) return;
|
|
11818
|
-
let r =
|
|
11819
|
-
(r === t || !
|
|
11818
|
+
let r = In(n), i = bn(Un(e));
|
|
11819
|
+
(r === t || !Tn(e, r) || !yn(i)) && s.resumeTimers(), c.start(0, () => s.set("isWindowFocused", !0));
|
|
11820
11820
|
}
|
|
11821
|
-
return
|
|
11821
|
+
return Hn(On(t, "keydown", r), On(t, "blur", i, !0), On(t, "focus", a, !0), On(n, "pointerdown", s.handleDocumentPointerDown, !0));
|
|
11822
11822
|
}, [
|
|
11823
11823
|
s,
|
|
11824
11824
|
c,
|
|
@@ -11830,7 +11830,7 @@ var Lg = "--toast-frontmost-height", Rg = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
11830
11830
|
t ? t.ref?.current?.focus() : s.restoreFocusToPrevElement();
|
|
11831
11831
|
}
|
|
11832
11832
|
function x(e) {
|
|
11833
|
-
e.key === "Tab" && e.shiftKey &&
|
|
11833
|
+
e.key === "Tab" && e.shiftKey && In(e.nativeEvent) === s.state.viewport && (e.preventDefault(), s.restoreFocusToPrevElement());
|
|
11834
11834
|
}
|
|
11835
11835
|
function S() {
|
|
11836
11836
|
s.state.toasts.some((e) => e.transitionStatus === "ending") || d.current || !u.current || (s.state.isWindowFocused && s.resumeTimers(), s.set("hovering", !1), u.current = !1);
|
|
@@ -11852,10 +11852,10 @@ var Lg = "--toast-frontmost-height", Rg = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
11852
11852
|
e.pointerType === "touch" && (d.current = !1, S());
|
|
11853
11853
|
}
|
|
11854
11854
|
function O() {
|
|
11855
|
-
l.current ? l.current = !1 : m ||
|
|
11855
|
+
l.current ? l.current = !1 : m || yn(bn(Un(s.state.viewport))) && (s.set("focused", !0), s.pauseTimers());
|
|
11856
11856
|
}
|
|
11857
11857
|
function k(e) {
|
|
11858
|
-
m && !
|
|
11858
|
+
m && !Tn(s.state.viewport, e.relatedTarget) && (s.set("focused", !1), w());
|
|
11859
11859
|
}
|
|
11860
11860
|
let A = {
|
|
11861
11861
|
tabIndex: -1,
|
|
@@ -11875,7 +11875,7 @@ var Lg = "--toast-frontmost-height", Rg = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
11875
11875
|
onPointerUp: D,
|
|
11876
11876
|
onPointerCancel: D,
|
|
11877
11877
|
style: { [Lg]: _ ? `${_}px` : void 0 }
|
|
11878
|
-
}, j = { expanded: h }, M = !f && g && /*#__PURE__*/ X(
|
|
11878
|
+
}, j = { expanded: h }, M = !f && g && /*#__PURE__*/ X(kn, { onFocus: b }), N = Rn("div", e, {
|
|
11879
11879
|
ref: [t, s.setViewport],
|
|
11880
11880
|
state: j,
|
|
11881
11881
|
props: [
|
|
@@ -11892,7 +11892,7 @@ var Lg = "--toast-frontmost-height", Rg = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
11892
11892
|
M,
|
|
11893
11893
|
N,
|
|
11894
11894
|
!m && y.length > 0 && /*#__PURE__*/ X("div", {
|
|
11895
|
-
style:
|
|
11895
|
+
style: Bn,
|
|
11896
11896
|
children: y.map((e) => /*#__PURE__*/ Z("div", {
|
|
11897
11897
|
role: "alert",
|
|
11898
11898
|
"aria-atomic": !0,
|
|
@@ -11908,13 +11908,13 @@ var zg = /*#__PURE__*/ U.createContext(void 0);
|
|
|
11908
11908
|
process.env.NODE_ENV !== "production" && (zg.displayName = "ToastRootContext");
|
|
11909
11909
|
function Bg() {
|
|
11910
11910
|
let e = U.useContext(zg);
|
|
11911
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
11911
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? En(66) : "Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.");
|
|
11912
11912
|
return e;
|
|
11913
11913
|
}
|
|
11914
11914
|
//#endregion
|
|
11915
11915
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/utils/getElementTransform.mjs
|
|
11916
11916
|
function Vg(e, t) {
|
|
11917
|
-
let n = (t ??
|
|
11917
|
+
let n = (t ?? vn(e).getComputedStyle(e)).transform, r = 0, i = 0, a = 1;
|
|
11918
11918
|
if (n && n !== "none") {
|
|
11919
11919
|
let e = n.match(/matrix(?:3d)?\(([^)]+)\)/);
|
|
11920
11920
|
if (e) {
|
|
@@ -11942,11 +11942,11 @@ function Hg(e, t, n) {
|
|
|
11942
11942
|
//#endregion
|
|
11943
11943
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/root/ToastRootCssVars.mjs
|
|
11944
11944
|
var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "--toast-swipe-movement-x", qg = "--toast-swipe-movement-y", Jg = "data-swipe-direction", Yg = {
|
|
11945
|
-
...
|
|
11945
|
+
...Vn,
|
|
11946
11946
|
swipeDirection(e) {
|
|
11947
11947
|
return e ? { [Jg]: e } : null;
|
|
11948
11948
|
}
|
|
11949
|
-
}, Xg = 40, Zg = 10, Qg = .5, $g = 1, e_ = `${
|
|
11949
|
+
}, Xg = 40, Zg = 10, Qg = .5, $g = 1, e_ = `${Mn},${zn}`, t_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
11950
11950
|
let { toast: n, render: r, className: i, swipeDirection: a = ["down", "right"], style: o, ...s } = e, c = n.positionerProps?.anchor !== void 0, l = [];
|
|
11951
11951
|
c || (l = Array.isArray(a) ? a : [a]);
|
|
11952
11952
|
let u = l.length > 0, d = kg(), [f, p] = U.useState(void 0), [m, h] = U.useState(!1), [g, _] = U.useState(!1), [v, y] = U.useState({
|
|
@@ -11970,14 +11970,14 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
11970
11970
|
x: 0,
|
|
11971
11971
|
y: 0
|
|
11972
11972
|
}), te = U.useRef(null), L = U.useRef(null), ne = d.useState("toastIndex", n.id), re = d.useState("toastVisibleIndex", n.id), ie = d.useState("toastOffsetY", n.id), ae = d.useState("focused"), oe = d.useState("expanded");
|
|
11973
|
-
|
|
11973
|
+
jn({
|
|
11974
11974
|
open: n.transitionStatus !== "ending",
|
|
11975
11975
|
ref: O,
|
|
11976
11976
|
onComplete() {
|
|
11977
11977
|
n.transitionStatus === "ending" && d.removeToast(n.id);
|
|
11978
11978
|
}
|
|
11979
11979
|
});
|
|
11980
|
-
let se =
|
|
11980
|
+
let se = An((e = !1) => {
|
|
11981
11981
|
let t = O.current;
|
|
11982
11982
|
if (!t) return;
|
|
11983
11983
|
let r = t.style.height;
|
|
@@ -11993,7 +11993,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
11993
11993
|
}
|
|
11994
11994
|
e ? kc.flushSync(a) : a();
|
|
11995
11995
|
});
|
|
11996
|
-
|
|
11996
|
+
xn(() => {
|
|
11997
11997
|
let e = k.current;
|
|
11998
11998
|
(n.transitionStatus === "starting" || e !== n.id) && (e !== void 0 && (p(void 0), x({
|
|
11999
11999
|
x: 0,
|
|
@@ -12011,7 +12011,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12011
12011
|
function ce(e) {
|
|
12012
12012
|
ee.current = e, y(e);
|
|
12013
12013
|
}
|
|
12014
|
-
|
|
12014
|
+
xn(() => () => {
|
|
12015
12015
|
L.current?.abort();
|
|
12016
12016
|
}, []);
|
|
12017
12017
|
function le(e, t) {
|
|
@@ -12021,7 +12021,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12021
12021
|
y: i ? n(t) : t
|
|
12022
12022
|
};
|
|
12023
12023
|
}
|
|
12024
|
-
let ue =
|
|
12024
|
+
let ue = An((e) => {
|
|
12025
12025
|
if (e.pointerId !== te.current) return;
|
|
12026
12026
|
te.current = null, L.current?.abort(), L.current = null, h(!1), _(!1), D(null);
|
|
12027
12027
|
let t = j.current;
|
|
@@ -12043,7 +12043,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12043
12043
|
}), p(void 0));
|
|
12044
12044
|
});
|
|
12045
12045
|
function de(e) {
|
|
12046
|
-
if (e.button !== 0 || (e.pointerType === "touch" && d.pauseTimers(),
|
|
12046
|
+
if (e.button !== 0 || (e.pointerType === "touch" && d.pauseTimers(), In(e.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${e_}`))) return;
|
|
12047
12047
|
P.current = !1, M.current = void 0, N.current = 0, te.current = e.pointerId, A.current = {
|
|
12048
12048
|
x: e.clientX,
|
|
12049
12049
|
y: e.clientY
|
|
@@ -12055,7 +12055,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12055
12055
|
}), d.set("hovering", !0), h(!0), _(!1), D(null), I.current = !0, L.current?.abort();
|
|
12056
12056
|
let r = new AbortController();
|
|
12057
12057
|
L.current = r;
|
|
12058
|
-
let i =
|
|
12058
|
+
let i = Un(t);
|
|
12059
12059
|
i.addEventListener("pointerup", ue, { signal: r.signal }), i.addEventListener("pointercancel", ue, { signal: r.signal }), t.setPointerCapture?.(e.pointerId);
|
|
12060
12060
|
}
|
|
12061
12061
|
function fe(e) {
|
|
@@ -12092,7 +12092,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12092
12092
|
}
|
|
12093
12093
|
function pe(e) {
|
|
12094
12094
|
if (e.key === "Escape") {
|
|
12095
|
-
if (!O.current || !
|
|
12095
|
+
if (!O.current || !Tn(O.current, bn(Un(O.current)))) return;
|
|
12096
12096
|
d.closeToast(n.id);
|
|
12097
12097
|
}
|
|
12098
12098
|
}
|
|
@@ -12100,9 +12100,9 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12100
12100
|
let e = O.current;
|
|
12101
12101
|
if (!u || !e) return;
|
|
12102
12102
|
function t(t) {
|
|
12103
|
-
te.current !== null &&
|
|
12103
|
+
te.current !== null && Tn(e, In(t)) && t.preventDefault();
|
|
12104
12104
|
}
|
|
12105
|
-
return
|
|
12105
|
+
return On(e, "touchmove", t, { passive: !1 });
|
|
12106
12106
|
}, [u]);
|
|
12107
12107
|
function me() {
|
|
12108
12108
|
let e = v.x - b.x, t = v.y - b.y;
|
|
@@ -12153,7 +12153,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12153
12153
|
type: n.type,
|
|
12154
12154
|
swiping: m,
|
|
12155
12155
|
swipeDirection: f
|
|
12156
|
-
}, ye =
|
|
12156
|
+
}, ye = Rn("div", e, {
|
|
12157
12157
|
ref: [t, O],
|
|
12158
12158
|
state: ve,
|
|
12159
12159
|
stateAttributesMapping: Yg,
|
|
@@ -12169,7 +12169,7 @@ process.env.NODE_ENV !== "production" && (t_.displayName = "ToastRoot");
|
|
|
12169
12169
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/content/ToastContent.mjs
|
|
12170
12170
|
var n_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12171
12171
|
let { render: n, className: r, style: i, ...a } = e, { visibleIndex: o, expanded: s, recalculateHeight: c } = Bg(), l = U.useRef(null);
|
|
12172
|
-
return
|
|
12172
|
+
return xn(() => {
|
|
12173
12173
|
c();
|
|
12174
12174
|
let e = l.current;
|
|
12175
12175
|
if (!e || typeof ResizeObserver != "function" || typeof MutationObserver != "function") return;
|
|
@@ -12181,7 +12181,7 @@ var n_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
|
12181
12181
|
}), () => {
|
|
12182
12182
|
t.disconnect(), n.disconnect();
|
|
12183
12183
|
};
|
|
12184
|
-
}, [c]),
|
|
12184
|
+
}, [c]), Rn("div", e, {
|
|
12185
12185
|
ref: [t, l],
|
|
12186
12186
|
state: {
|
|
12187
12187
|
expanded: s,
|
|
@@ -12204,7 +12204,7 @@ function i_(e) {
|
|
|
12204
12204
|
function a_(e, t, n) {
|
|
12205
12205
|
let { toast: r, setTitleId: i, setDescriptionId: a } = Bg(), o = n === "title" ? i : a, s = t ?? (n === "title" ? r.title : r.description);
|
|
12206
12206
|
return {
|
|
12207
|
-
id:
|
|
12207
|
+
id: Nn(e),
|
|
12208
12208
|
children: s,
|
|
12209
12209
|
type: r.type,
|
|
12210
12210
|
setId: o
|
|
@@ -12212,7 +12212,7 @@ function a_(e, t, n) {
|
|
|
12212
12212
|
}
|
|
12213
12213
|
function o_(e, t, n) {
|
|
12214
12214
|
let r = i_(e);
|
|
12215
|
-
return
|
|
12215
|
+
return xn(() => {
|
|
12216
12216
|
if (r) return n(t), () => {
|
|
12217
12217
|
n((e) => e === t ? void 0 : e);
|
|
12218
12218
|
};
|
|
@@ -12226,7 +12226,7 @@ function o_(e, t, n) {
|
|
|
12226
12226
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/description/ToastDescription.mjs
|
|
12227
12227
|
var s_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12228
12228
|
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } = a_(a, o, "description");
|
|
12229
|
-
return o_(
|
|
12229
|
+
return o_(Rn("p", e, {
|
|
12230
12230
|
ref: t,
|
|
12231
12231
|
state: { type: u },
|
|
12232
12232
|
props: {
|
|
@@ -12241,7 +12241,7 @@ process.env.NODE_ENV !== "production" && (s_.displayName = "ToastDescription");
|
|
|
12241
12241
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/title/ToastTitle.mjs
|
|
12242
12242
|
var c_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12243
12243
|
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } = a_(a, o, "title");
|
|
12244
|
-
return o_(
|
|
12244
|
+
return o_(Rn("h2", e, {
|
|
12245
12245
|
ref: t,
|
|
12246
12246
|
state: { type: u },
|
|
12247
12247
|
props: {
|
|
@@ -12272,7 +12272,7 @@ var u_ = ({ onClose: e }) => {
|
|
|
12272
12272
|
className: "dark flex-shrink-0",
|
|
12273
12273
|
children: /* @__PURE__ */ X(V, {
|
|
12274
12274
|
variant: "outline",
|
|
12275
|
-
icon:
|
|
12275
|
+
icon: ri,
|
|
12276
12276
|
size: "sm",
|
|
12277
12277
|
hideLabel: !0,
|
|
12278
12278
|
onClick: e,
|
|
@@ -12289,7 +12289,7 @@ var u_ = ({ onClose: e }) => {
|
|
|
12289
12289
|
className: "dark flex flex-shrink-0 flex-row flex-wrap items-center gap-3",
|
|
12290
12290
|
children: [e.map((e) => /* @__PURE__ */ X("div", {
|
|
12291
12291
|
onClick: () => n(e),
|
|
12292
|
-
children: /* @__PURE__ */ X(
|
|
12292
|
+
children: /* @__PURE__ */ X(Mr, {
|
|
12293
12293
|
href: e.href,
|
|
12294
12294
|
children: e.label
|
|
12295
12295
|
})
|
|
@@ -12357,7 +12357,7 @@ var u_ = ({ onClose: e }) => {
|
|
|
12357
12357
|
}) : g && /* @__PURE__ */ X("div", {
|
|
12358
12358
|
className: "flex-shrink-0",
|
|
12359
12359
|
"aria-hidden": "true",
|
|
12360
|
-
children: /* @__PURE__ */ X(
|
|
12360
|
+
children: /* @__PURE__ */ X(hr, {
|
|
12361
12361
|
type: g,
|
|
12362
12362
|
size: "sm"
|
|
12363
12363
|
})
|
|
@@ -12410,7 +12410,7 @@ var S_ = (e) => e instanceof Element && e.closest("button, a") !== null, C_ = xc
|
|
|
12410
12410
|
type: "button",
|
|
12411
12411
|
"aria-label": d.actions.view,
|
|
12412
12412
|
onClick: h,
|
|
12413
|
-
className: B("pointer-events-none absolute inset-0 rounded-lg",
|
|
12413
|
+
className: B("pointer-events-none absolute inset-0 rounded-lg", Dn("focus-visible:ring-inset"))
|
|
12414
12414
|
}) : null,
|
|
12415
12415
|
/* @__PURE__ */ Z("div", {
|
|
12416
12416
|
className: "flex flex-row items-start gap-3",
|
|
@@ -12441,7 +12441,7 @@ var S_ = (e) => e instanceof Element && e.closest("button, a") !== null, C_ = xc
|
|
|
12441
12441
|
}),
|
|
12442
12442
|
i > 0 ? /* @__PURE__ */ X("p", {
|
|
12443
12443
|
className: "text-sm text-f1-foreground-inverse-secondary",
|
|
12444
|
-
children:
|
|
12444
|
+
children: qe(d.toasts.moreMessages, i)
|
|
12445
12445
|
}) : null
|
|
12446
12446
|
]
|
|
12447
12447
|
}, l),
|
|
@@ -12461,7 +12461,7 @@ var S_ = (e) => e instanceof Element && e.closest("button, a") !== null, C_ = xc
|
|
|
12461
12461
|
C_.displayName = "F0MessageToast";
|
|
12462
12462
|
//#endregion
|
|
12463
12463
|
//#region src/elements/Toast/stack/ToastItem.tsx
|
|
12464
|
-
var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 flex w-full origin-bottom select-none flex-col justify-end rounded-lg",
|
|
12464
|
+
var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 flex w-full origin-bottom select-none flex-col justify-end rounded-lg", Dn(), "before:pointer-events-none before:absolute before:inset-x-0 before:bottom-0 before:-z-10 before:rounded-lg before:shadow-lg before:content-['']", "before:border before:border-solid before:border-f1-border-inverse", "before:bg-f1-background-inverse before:bg-[linear-gradient(hsl(var(--neutral-90)),hsl(var(--neutral-90)))]", "dark:before:bg-f1-background-tertiary dark:before:bg-[linear-gradient(hsl(var(--neutral-5)),hsl(var(--neutral-5)))]", "before:h-[var(--height)] data-[expanded]:before:h-[var(--toast-height)]", "data-[ending-style]:before:h-full data-[expanded]:data-[ending-style]:before:h-full", "before:[transition:height_0.3s_cubic-bezier(0.22,1,0.36,1)] motion-reduce:before:[transition:none]", "[--gap:0.75rem] [--peek:6px]", "[--scale:calc(max(0,1_-_var(--toast-index)*0.05))] [--shrink:calc(1_-_var(--scale))]", "[--height:var(--toast-frontmost-height,var(--toast-height))]", "[--offset-y:calc(var(--toast-offset-y)*-1_-_var(--toast-index)*var(--gap)_+_var(--toast-swipe-movement-y))]", "z-[calc(1000_-_var(--toast-index))]", "h-[var(--height)] data-[expanded]:h-[var(--toast-height)]", "[interpolate-size:numeric-only]", "[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)_-_var(--toast-index)*var(--peek)_-_var(--shrink)*var(--height)))_scale(var(--scale))]", "data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]", "after:absolute after:left-0 after:top-full after:h-[calc(var(--gap)_+_1px)] after:w-full after:content-['']", "data-[buried]:invisible data-[buried]:opacity-0 data-[expanded]:data-[buried]:visible data-[expanded]:data-[buried]:opacity-100", "data-[starting-style]:[transform:translateY(150%)]", "data-[ending-style]:opacity-0 group-data-[clearing]/toasts:data-[ending-style]:opacity-100", "[--exit-drop:100%]", "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(calc(var(--toast-swipe-movement-y)_-_var(--toast-index)*var(--peek)_-_var(--shrink)*var(--height,0px)_+_var(--exit-drop)))_scale(var(--scale))]", "[&[data-ending-style][data-expanded]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(calc(var(--offset-y)_+_var(--exit-drop)))]", "data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)_+_150%))]", "data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)_+_150%))_translateY(var(--offset-y))]", "[transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s]", "motion-reduce:[transition:opacity_0.2s]"), T_ = B("shrink-0 overflow-hidden rounded-lg", "[--content-shift:calc(var(--toast-height,var(--height))_-_var(--height))]", "group-data-[ending-style]/toast:h-full", "[transform:translateY(var(--content-shift))] [clip-path:inset(0_0_max(0px,var(--content-shift))_0_round_theme(borderRadius.lg))]", "data-[expanded]:[transform:none] data-[expanded]:[clip-path:inset(0_0_0_0_round_theme(borderRadius.lg))]", "[transition:opacity_250ms_cubic-bezier(0.22,1,0.36,1),transform_0.3s_cubic-bezier(0.22,1,0.36,1),clip-path_0.3s_cubic-bezier(0.22,1,0.36,1)]", "data-[behind]:opacity-0 data-[expanded]:opacity-100", "data-[behind]:[transition:opacity_250ms_cubic-bezier(0.22,1,0.36,1)_300ms,transform_0.3s_cubic-bezier(0.22,1,0.36,1),clip-path_0.3s_cubic-bezier(0.22,1,0.36,1)]", "data-[expanded]:data-[behind]:[transition:opacity_250ms_cubic-bezier(0.22,1,0.36,1),transform_0.3s_cubic-bezier(0.22,1,0.36,1),clip-path_0.3s_cubic-bezier(0.22,1,0.36,1)]", "motion-reduce:[transition:opacity_250ms] motion-reduce:data-[behind]:[transition:opacity_250ms]"), E_ = ["down", "right"], D_ = {
|
|
12465
12465
|
Title: ({ className: e, children: t }) => /* @__PURE__ */ X(c_, {
|
|
12466
12466
|
className: e,
|
|
12467
12467
|
render: /* @__PURE__ */ X("p", {}),
|
|
@@ -12588,7 +12588,7 @@ var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12588
12588
|
});
|
|
12589
12589
|
}, V_ = "#content", H_ = (e) => {
|
|
12590
12590
|
let [t, n] = J({ inset: 0 });
|
|
12591
|
-
return
|
|
12591
|
+
return Qn(function() {
|
|
12592
12592
|
if (!e || typeof document > "u") return;
|
|
12593
12593
|
let t = document.querySelector(V_);
|
|
12594
12594
|
if (!t) {
|
|
@@ -12650,9 +12650,9 @@ var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12650
12650
|
mobile: "#f0-overlay-root",
|
|
12651
12651
|
desktop: "#f0-overlay-root"
|
|
12652
12652
|
} }) => {
|
|
12653
|
-
let n = q(null), r = Oc(
|
|
12653
|
+
let n = q(null), r = Oc(We.subscribeRenderer, We.getActiveRendererId, () => null);
|
|
12654
12654
|
G(function() {
|
|
12655
|
-
let { id: e, release: t } =
|
|
12655
|
+
let { id: e, release: t } = We.acquireRenderer();
|
|
12656
12656
|
return n.current = e, t;
|
|
12657
12657
|
}, []);
|
|
12658
12658
|
let i = r !== null && r === n.current, a = Dg(), [o, s] = J(null), [c, l] = J(0), u = q(null);
|
|
@@ -12665,12 +12665,12 @@ var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12665
12665
|
t?.mobile,
|
|
12666
12666
|
t?.desktop
|
|
12667
12667
|
]), /* @__PURE__ */ Z(Y, { children: [i && o != null ? Ac(/* @__PURE__ */ X(yc, { children: /* @__PURE__ */ X(G_, {
|
|
12668
|
-
messages:
|
|
12669
|
-
app:
|
|
12668
|
+
messages: Wt,
|
|
12669
|
+
app: vt
|
|
12670
12670
|
}) }, c), o) : null, e] });
|
|
12671
|
-
}, q_ = ({ children: e, link: t, privacyModeInitiallyEnabled: n, image: r, i18n: i, l10n: a, hourCycle: o, isDev: s = !1, showExperimentalWarnings: c = !1, renderDataTestIdAttribute: l = !1, newButtonStyles: u = !1 }) => /* @__PURE__ */ X(
|
|
12671
|
+
}, q_ = ({ children: e, link: t, privacyModeInitiallyEnabled: n, image: r, i18n: i, l10n: a, hourCycle: o, isDev: s = !1, showExperimentalWarnings: c = !1, renderDataTestIdAttribute: l = !1, newButtonStyles: u = !1 }) => /* @__PURE__ */ X(Zt, {
|
|
12672
12672
|
reducedMotion: "user",
|
|
12673
|
-
children: /* @__PURE__ */ X(
|
|
12673
|
+
children: /* @__PURE__ */ X(mn, {
|
|
12674
12674
|
isDev: s,
|
|
12675
12675
|
showExperimentalWarnings: c,
|
|
12676
12676
|
renderDataTestIdAttribute: l,
|
|
@@ -12678,11 +12678,11 @@ var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12678
12678
|
newButtonStyles: u,
|
|
12679
12679
|
children: /* @__PURE__ */ X(Os, {
|
|
12680
12680
|
...a,
|
|
12681
|
-
children: /* @__PURE__ */ X(
|
|
12681
|
+
children: /* @__PURE__ */ X(hn, {
|
|
12682
12682
|
...i,
|
|
12683
|
-
children: /* @__PURE__ */ X(
|
|
12683
|
+
children: /* @__PURE__ */ X(Kn, {
|
|
12684
12684
|
...t,
|
|
12685
|
-
children: /* @__PURE__ */ X($a, { children: /* @__PURE__ */ X(
|
|
12685
|
+
children: /* @__PURE__ */ X($a, { children: /* @__PURE__ */ X(Je, {
|
|
12686
12686
|
initiallyEnabled: n,
|
|
12687
12687
|
children: /* @__PURE__ */ X(go, {
|
|
12688
12688
|
...r,
|
|
@@ -12695,7 +12695,7 @@ var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12695
12695
|
})
|
|
12696
12696
|
}), J_ = bc(null), Y_ = ({ children: e, fullScreen: t = !0 }) => {
|
|
12697
12697
|
let n = q(null), [r, i] = J(n.current);
|
|
12698
|
-
return
|
|
12698
|
+
return Qn(() => {
|
|
12699
12699
|
i(n.current);
|
|
12700
12700
|
}, []), /* @__PURE__ */ X(J_.Provider, {
|
|
12701
12701
|
value: { element: r },
|
|
@@ -12722,9 +12722,9 @@ var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12722
12722
|
newButtonStyles: f,
|
|
12723
12723
|
children: /* @__PURE__ */ X(Y_, {
|
|
12724
12724
|
...t,
|
|
12725
|
-
children: /* @__PURE__ */ X(
|
|
12725
|
+
children: /* @__PURE__ */ X(Xr, {
|
|
12726
12726
|
handler: l,
|
|
12727
|
-
children: /* @__PURE__ */ X(Ea, { children: /* @__PURE__ */ X(
|
|
12727
|
+
children: /* @__PURE__ */ X(Ea, { children: /* @__PURE__ */ X(lt, {
|
|
12728
12728
|
...m,
|
|
12729
12729
|
children: /* @__PURE__ */ X(X_.Provider, {
|
|
12730
12730
|
value: p,
|
|
@@ -12733,7 +12733,7 @@ var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12733
12733
|
mobile: "#f0-overlay-root",
|
|
12734
12734
|
desktop: "#f0-overlay-root"
|
|
12735
12735
|
},
|
|
12736
|
-
children: /* @__PURE__ */ X(Fu, { children: /* @__PURE__ */ X(
|
|
12736
|
+
children: /* @__PURE__ */ X(Fu, { children: /* @__PURE__ */ X(Vt, { children: e }) })
|
|
12737
12737
|
}) })
|
|
12738
12738
|
})
|
|
12739
12739
|
}) })
|
|
@@ -12741,4 +12741,4 @@ var w_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12741
12741
|
})
|
|
12742
12742
|
});
|
|
12743
12743
|
//#endregion
|
|
12744
|
-
export { Xa as AiChatTranslationsProvider,
|
|
12744
|
+
export { Xa as AiChatTranslationsProvider, be as AreaChart, Oo as Await, g as BarChart, it as BarChartSkeleton, Bt as CardSelectableContainer, p as CategoryBarChart, Br as ChatSpinner, No as Chip, Va as CollapsibleGroup, ae as ComboChart, wt as DATA_COLLECTION_URL_PARAMS, ct as DATA_COLLECTION_URL_PARAM_PREFIX, Ml as Dashboard, $t as DataChartEmptyStateView, fn as DataTestIdWrapper, yt as DndProvider, wr as DropOverlay, $n as EmojiImage, uu as F0Accordion, Ke as F0ActionBar, ki as F0ActionItem, Er as F0AiChat, Aa as F0AiChatHeader, Oa as F0AiChatHistory, Fr as F0AiChatProvider, Ca as F0AiChatTextArea, ya as F0AiChatUsageLimitsButton, Ja as F0AiFileAttachments, Ki as F0AiFilePreviewsProvider, yr as F0AiFormRegistryProvider, Ha as F0AiInsightCard, Na as F0AiMask, Ka as F0AiMessageSources, Ta as F0AiMessagesContainer, dr as F0AiPong, Ga as F0AiProcessingOverlay, ja as F0AiProposalCard, Ra as F0AiTableCard, dc as F0Alert, Tg as F0AnalyticsDashboard, Hi as F0AudioPlayer, kr as F0AudioPlayerCard, Pa as F0AuraVoiceAnimation, uo as F0Avatar, hr as F0AvatarAlert, so as F0AvatarCompany, Ti as F0AvatarDate, Co as F0AvatarEmoji, wo as F0AvatarFile, fo as F0AvatarIcon, _o as F0AvatarList, ho as F0AvatarModule, po as F0AvatarPerson, vo as F0AvatarTeam, eu as F0BigNumber, hm as F0BookAMeetingCard, io as F0Box, V as F0Button, qi as F0ButtonDropdown, zs as F0ButtonToggle, Sa as F0CanvasCard, Qi as F0CanvasPanel, vr as F0Card, Qr as F0CardRow, wa as F0ChatComposer, ds as F0Checkbox, mu as F0ChipList, Da as F0ClarifyingPanel, Kt as F0DataChart, ke as F0DatePicker, D as F0DatePickerInline, dm as F0DemoCard, Yi as F0Dialog, Te as F0DialogAlikeContext, b as F0DialogAlikeProvider, Ro as F0DialogContext, ns as F0DialogProvider, mc as F0DocumentViewer, xu as F0Drawer, un as F0DurationInput, Ls as F0EventCatcherProvider, pm as F0FAQCard, Vr as F0FileItem, wu as F0FilterPickerContent, d as F0Form, Ru as F0FormField, Sl as F0GridStack, za as F0HILActionConfirmation, m as F0Heading, H as F0Icon, Mr as F0Link, mm as F0ModuleCard, en as F0NotesTextEditor, he as F0NotesTextEditorSkeleton, N as F0NumberInput, T as F0NumberInputInline, gr as F0OneIcon, Pi as F0OneSwitch, fc as F0PdfViewer, Q_ as F0Provider, gm as F0QuestionCardMultiStep, Bi as F0RichTextDisplay, te as F0RichTextEditor, hs as F0SearchInput, js as F0Select, F as F0SelectInline, wd as F0Slider, Bd as F0TableOfContentPopover, Wo as F0TagAlert, Po as F0TagBalance, qo as F0TagCompany, Uo as F0TagDot, ms as F0TagList, Ho as F0TagPerson, Eo as F0TagRaw, Ao as F0TagStatus, _s as F0TagTeam, uc as F0Text, ce as F0TextAreaInput, L as F0TextAreaInputInline, Gi as F0TextInput, I as F0TextInputInline, ve as F0TimelineRow, gc as F0VideoPlayer, sd as F0WizardForm, fs as F1SearchBox, _ as FILE_TYPES, Ai as FileItem, Ea as FormCardValueFormatterProvider, Ie as FunnelChartSkeleton, lo as GROUP_ID_SYMBOL, xo as GROUP_KEY_SEPARATOR, Jt as GaugeChartSkeleton, cn as HeatmapChartSkeleton, Jl as HomeLayout, l as InlineFieldRow, Qt as InlineFieldRowList, jr as Input, Gl as Layout, _t as LineChart, He as LineChartSkeleton, at as MAX_URL_FILTER_VALUES, c as NotesTextEditor, Xt as NotesTextEditorSkeleton, pe as NumberInput, rs as OneCalendar, ir as OneEllipsis, y as OneEmptyState, Ds as OneFilterPicker, o as PieChart, rn as PieChartSkeleton, ni as PongBall, Je as PrivacyModeProvider, Qp as ProductBlankslate, qt as ProductCard, tm as ProductModal, rm as ProductWidget, mt as ProgressBarChart, ee as RadarChart, _e as RadarChartSkeleton, Ni as RichTextDisplay, se as RichTextEditor, u as ScatterChartSkeleton, Kl as StandardLayout, mp as SurveyAllQuestionsLoadingSkeleton, Up as SurveyAnsweringForm, op as SurveyFormBuilder, Kp as SurveySampleQuestion, hp as SurveySteppedLoadingSkeleton, ys as Tag, is as TagCounter, v as Textarea, Wa as ThreadItem, Fa as ThreadListSkeleton, K_ as ToastProvider, ql as TwoColumnLayout, w as UPLOAD_INPUT_ID, P as UpsellRequestResponseDialog, om as UpsellingAlert, cm as UpsellingBanner, E as UpsellingButton, um as UpsellingPopover, ne as VerticalBarChart, os as WeekStartDay, va as WelcomeScreenCardsRow, bt as actionBarStatuses, pa as actionItemStatuses, Wr as adaptDataAdapterToInfiniteScroll, La as aiChatFileFromShowFilesItem, fa as aiChatFileFromUploadedFile, Ia as aiChatFilesFromMessage, ba as aiChatMessageText, Ya as aiTranslations, _u as alertVariantOptions, iu as audioPlayerSizes, Yl as avatarVariants, Le as buildDataCollectionUrlParams, pn as buildTranslations, ru as buttonDropdownModes, nu as buttonDropdownSizes, tu as buttonDropdownVariants, Ol as buttonSizes, dt as buttonToggleColors, ze as buttonToggleSizes, kt as buttonToggleVariants, Dl as buttonVariants, du as cardAlertVariants, Ir as cardImageAspectRatios, Yr as cardImageFits, la as cardImageSizes, pr as cardLayouts, ko as chartColorTokens, jo as chipVariants, Gd as computeSectionEndIds, hc as configurePdfWorker, Ma as contentTypes, Gt as createAtlaskitDriver, Fo as createDataSourceDefinition, Ou as createF0FormDefinitionTester, Du as createF0FormTester, Tl as createPageLayoutBlock, El as createPageLayoutBlockGroup, _a as createPersonMentionSource, vu as dataCollectionLocalStorageHandler, hu as datePickerInlineDismissReasons, gu as datepickerSizes, ro as defaultTranslations, Or as defineAvailableForm, Tu as describeFormSchema, M as dialog, M as dialogs, Pt as drawers, ea as durationInputSizes, Ii as durationUnits, Zr as escapeUserText, ie as evaluateRenderIf, gn as experimental, ur as f0FileItemSizes, xr as f0FormField, qr as fieldsToSeconds, Vd as flattenElements, Fi as formatPlaybackTime, pd as forms, h as generateAnchorId, $o as getAnimationVariants, ia as getDataCollectionStorageKey, zo as getDataSourcePaginationType, rr as getEmojiLabel, Nr as getF0Config, Fs as getGranularityDefinition, Cs as getGranularityDefinitions, Bs as getGranularitySimpleDefinition, gt as getSchemaDefinition, ks as granularityDefinitions, Ui as hasF0Config, Ar as inferFieldType, Wd as injectSectionEnds, yo as isInfiniteScrollPagination, bo as isPageBasedPagination, hi as isZodType, au as linkVariants, xa as markdownRenderers, na as mergeDataCollectionFilters, oo as modules, Za as oneIconSizes, Yt as parseDataCollectionUrlParams, pc as pdfScales, Lt as predefinedPresets, Ps as rangeSeparator, oa as readDataCollectionStorage, Ud as reconstructElements, bi as resolveDataCollectionFilters, gs as resolveGranularityDefinition, Dt as resolveItemNeighbors, Qe as resolveWindowNeighbors, cr as secondsToFields, Ci as secondsToVisibleFields, md as selectInlineDismissReasons, Oe as selectSizes, Me as selectVariants, ln as setDataCollectionUrlParams, hd as sliderTooltipModes, Ue as syncDataCollectionUrlParams, Od as tagDotColors, Ed as timelineRowApproverStatuses, Td as timelineRowStatuses, Dd as timelineRowTagVariants, Rt as toasts, vi as unwrapZodSchema, Ba as usageLimitsPopoverSides, zr as useAiChat, ka as useAiChatTranslations, $i as useAudioPlayer, qa as useCanvasEntity, Ua as useChatHistory, mo as useData, Es as useDataSource, n as useDataSourceItemNavigation, Si as useDerivedTranscription, Ot as useDndEvents, zt as useDraggable, Ge as useDroppableList, tr as useEmojiConfetti, Lr as useF0AiFormRegistry, ts as useF0Dialog, A as useF0DialogAlikeContext, ge as useF0Form, Et as useF0FormDefinition, ga as useFormCardValueFormatter, Z_ as useFormComponent, es as useGroups, Eg as useIsDesktop, Dg as useIsMobile, Ut as useItemNeighbors, tt as usePrivacyMode, er as useReducedMotion, a as useSchemaDefinition, Io as useSelectable, ha as useSetFormCardValueFormatter, ma as useToolCallId, Qa as useXRay, R as withDataTestId, an as writeDataCollectionStorage };
|