@factorialco/f0-react 16.7.0 → 16.7.2
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-DxxGStkI.js → ArchiveThumbnail-PuK9lQt7.js} +3 -3
- package/dist/{ArchiveViewer-nuxVYoSA.js → ArchiveViewer-EVdEZ47z.js} +5 -5
- package/dist/{ChatPostComposerDialog-B-n-Hqds.js → ChatPostComposerDialog-D_mW8jWn.js} +3 -3
- package/dist/{CoachmarkProvider-BGx__lPw.js → CoachmarkProvider-B3rD36gl.js} +10704 -10703
- package/dist/{CodeThumbnail-DqH5gHZu.js → CodeThumbnail-C_5FsBOm.js} +1 -1
- package/dist/{CodeViewer-T59a8NjB.js → CodeViewer-Jsi_2xXh.js} +6 -6
- package/dist/{DocumentToolbar-Dylh5Ap4.js → DocumentToolbar-BzByx1Dn.js} +5 -5
- package/dist/{DocxViewer-7n-AYpP4.js → DocxViewer-CSYglhFv.js} +3 -3
- package/dist/{F0AiProcessingOverlay-ODrQ_8Bz.js → F0AiProcessingOverlay-Bqx-e4_-.js} +10 -10
- package/dist/{F0Alert-Ck3zBYdd.js → F0Alert-HB_BxC2y.js} +5 -5
- package/dist/F0AudioPlayer-Cyjz-Ray.js +2 -0
- package/dist/{F0Button-K-Tsj-wR.js → F0Button-CfK_6Dfx.js} +3 -3
- package/dist/{F0CanvasPanel-8sSInjUf.js → F0CanvasPanel-Bln7jkQW.js} +18 -18
- package/dist/{F0DocumentViewer-BrWkziLK.js → F0DocumentViewer-DJ3LI-b-.js} +4 -4
- package/dist/{F0DocumentViewer-CAHZnuNS.js → F0DocumentViewer-Dld2UWye.js} +1 -1
- package/dist/{F0Icon-BBCAaVEn.js → F0Icon-BPx-9kOK.js} +1 -1
- package/dist/{F0Map-DvLUX9Ft.js → F0Map-DROScvs0.js} +7 -7
- package/dist/{F0Select-FocuIygc.js → F0Select-mxxXMo_K.js} +10 -12
- package/dist/{F0Text-40EQGsxS.js → F0Text-1893f70w.js} +2 -2
- package/dist/{F0VideoPlayer-7r47FGZM.js → F0VideoPlayer-B9TW8FVY.js} +6 -6
- package/dist/F0VideoPlayer-C6rx3JDg.js +1 -0
- package/dist/{HtmlThumbnail-B9Gz3J8v.js → HtmlThumbnail-BXothSJU.js} +1 -1
- package/dist/{HtmlViewer-CCBntGYz.js → HtmlViewer-DEUd_5sU.js} +9 -9
- package/dist/{LayoutGroup-B8iuK3D7.js → LayoutGroup-CAwOHvO6.js} +1 -1
- package/dist/{Map-D-WSG3i2.js → Map-B1ZzuTQM.js} +10 -10
- package/dist/{PdfThumbnail-etMVzOej.js → PdfThumbnail-BgDYJsQ1.js} +1 -1
- package/dist/{PdfViewer-N8tnidrx.js → PdfViewer-B8yj3t3V.js} +8 -8
- package/dist/{SandboxedHtmlFrame-DYYjEWYn.js → SandboxedHtmlFrame-jclBkupb.js} +2 -2
- package/dist/{SheetViewer-DyNij5aV.js → SheetViewer-C4ZdihC_.js} +5 -5
- package/dist/{TextViewer-Cb52tMok.js → TextViewer-BszyoMOh.js} +4 -4
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +4 -4
- package/dist/component-status.js +3 -3
- package/dist/{dist-jtkUGoUE.js → dist-BWgB2Pxk.js} +2 -2
- package/dist/{dist-Bqn2Tvbv.js → dist-CCGn12Jl.js} +1 -1
- package/dist/{dist-DQLaXxAV.js → dist-D12pKTJH.js} +1 -1
- package/dist/{dist-DT2eYug9.js → dist-DG8KKI8a.js} +1 -1
- package/dist/{dist-RnbZP6nJ.js → dist-DjDZq_T-.js} +4 -4
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +15 -15
- package/dist/{exports-DyepZL4X.d.ts → exports-DRNFj_kP.d.ts} +1 -1
- package/dist/f0.d.ts +4 -4
- package/dist/f0.js +734 -700
- package/dist/{highlight-BmHT5bVt.js → highlight-D8IVJ7ry.js} +1 -1
- package/dist/{i18n-provider-B3-P0gAN.js → i18n-provider-C-057er8.js} +1 -1
- package/dist/{i18n-provider-defaults-D4jZJwqk.js → i18n-provider-defaults-C660Phfh.js} +4 -0
- package/dist/{i18n-provider-defaults-DDg-0uul.d.ts → i18n-provider-defaults-ClM5fIad.d.ts} +4 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-Bon-AuSX.d.ts → index-Ccf5oVQR.d.ts} +13 -13
- package/dist/{maplibre-CBdPIfGt.js → maplibre-lTb3LBXs.js} +1 -1
- package/dist/{pdfWorker-GOiDQZal.js → pdfWorker-WlS_ycyi.js} +1 -1
- package/dist/{popover-Fe5Kn3Xb.js → popover-BVz3QY-0.js} +1 -1
- package/dist/{skeleton-C-H2S5ZI.js → skeleton-C__vPA8D.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{toolbarStyles-BAunJtAw.js → toolbarStyles-umCmRgJJ.js} +1 -1
- package/dist/{types-B_RODWSZ.d.ts → types-DBhqq-Lu.d.ts} +2 -2
- package/dist/{useData-CKJGQ0mx.js → useData-CaY41foq.js} +20 -14
- package/package.json +1 -1
- package/dist/F0AudioPlayer-DadfbJQp.js +0 -2
- package/dist/F0VideoPlayer-CZ2o-kkq.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, 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-
|
|
3
|
-
import { a as R, i as fn, n as pn, o as mn, r as z, t as hn } from "./i18n-provider-
|
|
4
|
-
import { n as gn, t as _n } from "./skeleton-
|
|
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-B3rD36gl.js";
|
|
3
|
+
import { a as R, i as fn, n as pn, o as mn, r as z, t as hn } from "./i18n-provider-C-057er8.js";
|
|
4
|
+
import { n as gn, t as _n } from "./skeleton-C__vPA8D.js";
|
|
5
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-NXXT56H4.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-
|
|
7
|
-
import { $c as or, $i as sr, $o as cr, $r as lr, $s as ur, Ai as dr, An as fr, B as pr, Bi as mr, Br as hr, Do as gr, En as _r, F as vr, Fi as yr, Fn as br, Gi as xr, Gn as Sr, Gr as Cr, H as wr, Ho as Tr, Hr as Er, I as Dr, In as Or, Ji as kr, Jn as Ar, Jo as jr, Jr as Mr, Ki as Nr, Kn as Pr, Ko as Fr, L as Ir, Li as Lr, Ln as Rr, Mi as zr, Mt as Br, Nn as Vr, On as Hr, Oo as Ur, Pi as Wr, Qc as Gr, Qi as Kr, Qr as qr, R as Jr, Ri as Yr, Sc as Xr, Si as Zr, Ss as Qr, Tt as $r, U as ei, Uc as ti, Ui as ni, Ur as ri, V as ii, Vr as ai, Wc as oi, Wi as si, Wr as ci, Xi as li, Xn as ui, Xo as di, Yi as fi, Yn as pi, Yo as mi, Zi as hi, Zn as gi, _c as _i, bi as vi, cs as yi, dl as bi, ea as xi, ei as Si, el as Ci, fc as wi, gc as Ti, go as Ei, gs as Di, il as Oi, ji as ki, jn as Ai, js as ji, kn as Mi, lc as Ni, ls as Pi, mi as Fi, n as Ii, na as Li, ni as Ri, nl as zi, oc as Bi, ol as Vi, pi as Hi, qi as Ui, qn as Wi, qr as Gi, qs as Ki, qt as qi, ra as Ji, ri as Yi, rl as Xi, t as Zi, ta as Qi, ti as $i, tl as ea, uc as ta, vi as na, vl as ra, vs as ia, wi as aa, xl as oa, yi as sa, z as ca, zc as la, zi as ua, zr as da } from "./F0CanvasPanel-
|
|
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-
|
|
9
|
-
import { a as Qa, i as $a, n as eo, o as to, r as no, t as H } from "./F0Icon-
|
|
10
|
-
import { t as ro } from "./i18n-provider-defaults-
|
|
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-
|
|
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-CfK_6Dfx.js";
|
|
7
|
+
import { $c as or, $i as sr, $o as cr, $r as lr, $s as ur, Ai as dr, An as fr, B as pr, Bi as mr, Br as hr, Do as gr, En as _r, F as vr, Fi as yr, Fn as br, Gi as xr, Gn as Sr, Gr as Cr, H as wr, Ho as Tr, Hr as Er, I as Dr, In as Or, Ji as kr, Jn as Ar, Jo as jr, Jr as Mr, Ki as Nr, Kn as Pr, Ko as Fr, L as Ir, Li as Lr, Ln as Rr, Mi as zr, Mt as Br, Nn as Vr, On as Hr, Oo as Ur, Pi as Wr, Qc as Gr, Qi as Kr, Qr as qr, R as Jr, Ri as Yr, Sc as Xr, Si as Zr, Ss as Qr, Tt as $r, U as ei, Uc as ti, Ui as ni, Ur as ri, V as ii, Vr as ai, Wc as oi, Wi as si, Wr as ci, Xi as li, Xn as ui, Xo as di, Yi as fi, Yn as pi, Yo as mi, Zi as hi, Zn as gi, _c as _i, bi as vi, cs as yi, dl as bi, ea as xi, ei as Si, el as Ci, fc as wi, gc as Ti, go as Ei, gs as Di, il as Oi, ji as ki, jn as Ai, js as ji, kn as Mi, lc as Ni, ls as Pi, mi as Fi, n as Ii, na as Li, ni as Ri, nl as zi, oc as Bi, ol as Vi, pi as Hi, qi as Ui, qn as Wi, qr as Gi, qs as Ki, qt as qi, ra as Ji, ri as Yi, rl as Xi, t as Zi, ta as Qi, ti as $i, tl as ea, uc as ta, vi as na, vl as ra, vs as ia, wi as aa, xl as oa, yi as sa, z as ca, zc as la, zi as ua, zr as da } from "./F0CanvasPanel-Bln7jkQW.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-Bqx-e4_-.js";
|
|
9
|
+
import { a as Qa, i as $a, n as eo, o as to, r as no, t as H } from "./F0Icon-BPx-9kOK.js";
|
|
10
|
+
import { t as ro } from "./i18n-provider-defaults-C660Phfh.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-CaY41foq.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-mxxXMo_K.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-CCGn12Jl.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-CJ7gZxxn.js";
|
|
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-
|
|
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-
|
|
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-BVz3QY-0.js";
|
|
19
|
+
import { i as cc, r as lc } from "./dist-BWgB2Pxk.js";
|
|
20
|
+
import { t as uc } from "./F0Text-1893f70w.js";
|
|
21
|
+
import { t as dc } from "./F0Alert-HB_BxC2y.js";
|
|
22
|
+
import { n as fc, r as pc, t as mc } from "./F0DocumentViewer-DJ3LI-b-.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-B9TW8FVY.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";
|
|
@@ -5792,8 +5792,36 @@ function Sf({ open: e, setOpen: t, questionId: n, questionType: r, canDeleteQues
|
|
|
5792
5792
|
});
|
|
5793
5793
|
}
|
|
5794
5794
|
//#endregion
|
|
5795
|
+
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/QuestionTypes/BaseQuestion/TextWithLinks.tsx
|
|
5796
|
+
var Cf = /((?:https?:\/\/|(?<![\w.@-])www\.)[^\s<>]+)/gi, wf = /^https?:\/\/\S/i, Tf = /^www\.[^\s.]+\.\S/i, Ef = ".,;:!?'\"”’»›…。、,.;:!?)」』】〉》", Df = {
|
|
5797
|
+
")": "(",
|
|
5798
|
+
"]": "[",
|
|
5799
|
+
"}": "{"
|
|
5800
|
+
}, Of = (e, t) => e.split(t).length - 1, kf = (e) => {
|
|
5801
|
+
let t = e.length;
|
|
5802
|
+
for (; t > 0;) {
|
|
5803
|
+
let n = e[t - 1], r = Df[n], i = e.slice(0, t), a = r !== void 0 && Of(i, n) > Of(i, r);
|
|
5804
|
+
if (!Ef.includes(n) && !a) break;
|
|
5805
|
+
--t;
|
|
5806
|
+
}
|
|
5807
|
+
return [e.slice(0, t), e.slice(t)];
|
|
5808
|
+
}, Af = (e) => wf.test(e) ? e : Tf.test(e) ? `https://${e}` : null;
|
|
5809
|
+
function jf({ text: e }) {
|
|
5810
|
+
let t = e.split(Cf);
|
|
5811
|
+
return /* @__PURE__ */ X(Y, { children: t.map((e, t) => {
|
|
5812
|
+
if (t % 2 == 0) return /* @__PURE__ */ X(yc, { children: e }, t);
|
|
5813
|
+
let [n, r] = kf(e), i = Af(n);
|
|
5814
|
+
return i ? /* @__PURE__ */ Z(yc, { children: [/* @__PURE__ */ X(Nr, {
|
|
5815
|
+
variant: "inline",
|
|
5816
|
+
href: i,
|
|
5817
|
+
target: "_blank",
|
|
5818
|
+
children: n
|
|
5819
|
+
}), r] }, t) : /* @__PURE__ */ X(yc, { children: e }, t);
|
|
5820
|
+
}) });
|
|
5821
|
+
}
|
|
5822
|
+
//#endregion
|
|
5795
5823
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/QuestionTypes/BaseQuestion/BaseQuestion.tsx
|
|
5796
|
-
var
|
|
5824
|
+
var Mf = ({ notice: e, className: t, children: n }) => {
|
|
5797
5825
|
let r = /* @__PURE__ */ X("div", {
|
|
5798
5826
|
className: t,
|
|
5799
5827
|
children: n
|
|
@@ -5803,7 +5831,7 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5803
5831
|
...e,
|
|
5804
5832
|
children: r
|
|
5805
5833
|
}) : r;
|
|
5806
|
-
},
|
|
5834
|
+
}, Nf = ({ id: e, title: t, description: n, children: r, required: i, type: a, hiddenActions: o, locked: s, lockedFields: c, lockedNote: l }) => {
|
|
5807
5835
|
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
5836
|
u?.({
|
|
5809
5837
|
id: e,
|
|
@@ -5831,19 +5859,19 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5831
5859
|
G(() => {
|
|
5832
5860
|
ae.current && ie.current?.focus({ preventScroll: !0 });
|
|
5833
5861
|
}, []);
|
|
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;
|
|
5862
|
+
let oe = f || x || p, se = f || S || p, ce = !se || !!n, le = p || f, ue = b || C ? { description: l?.description ?? y?.lockedNote?.description ?? A("surveyFormBuilder.labels.lockedQuestionNotice") } : null;
|
|
5835
5863
|
return /* @__PURE__ */ Z("div", {
|
|
5836
5864
|
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", b && !p && "cursor-not-allowed [&_*]:!cursor-not-allowed", !k && !p && !b && "hover:border-f1-border-hover", ce ? "gap-4" : "gap-2"),
|
|
5865
|
+
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 [&_a]:!cursor-pointer [&_a_*]:!cursor-pointer", !k && !p && !b && "hover:border-f1-border-hover", ce ? "gap-4" : "gap-2"),
|
|
5838
5866
|
children: [
|
|
5839
5867
|
/* @__PURE__ */ Z("div", {
|
|
5840
5868
|
className: "flex flex-col gap-0.5",
|
|
5841
5869
|
children: [/* @__PURE__ */ Z("div", {
|
|
5842
5870
|
className: "flex flex-row gap-2",
|
|
5843
5871
|
children: [
|
|
5844
|
-
/* @__PURE__ */ X(
|
|
5872
|
+
/* @__PURE__ */ X(Mf, {
|
|
5845
5873
|
className: "relative w-full",
|
|
5846
|
-
notice: C && x ?
|
|
5874
|
+
notice: C && x ? ue : null,
|
|
5847
5875
|
children: p ? /* @__PURE__ */ Z("div", {
|
|
5848
5876
|
className: "w-full whitespace-pre-wrap break-words px-2 py-1 text-lg font-semibold text-f1-foreground",
|
|
5849
5877
|
children: [t || j, i ? /* @__PURE__ */ X("span", {
|
|
@@ -5869,9 +5897,9 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5869
5897
|
}) : null]
|
|
5870
5898
|
})] })
|
|
5871
5899
|
}),
|
|
5872
|
-
!p && b ? /* @__PURE__ */ X("div", { children:
|
|
5900
|
+
!p && b ? /* @__PURE__ */ X("div", { children: ue ? /* @__PURE__ */ X(qn, {
|
|
5873
5901
|
instant: !0,
|
|
5874
|
-
...
|
|
5902
|
+
...ue,
|
|
5875
5903
|
children: /* @__PURE__ */ X("span", {
|
|
5876
5904
|
className: "inline-flex",
|
|
5877
5905
|
children: /* @__PURE__ */ X(V, {
|
|
@@ -5907,11 +5935,14 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
5907
5935
|
})
|
|
5908
5936
|
}) : null
|
|
5909
5937
|
]
|
|
5910
|
-
}),
|
|
5911
|
-
|
|
5912
|
-
children:
|
|
5913
|
-
|
|
5914
|
-
|
|
5938
|
+
}), le ? n ? /* @__PURE__ */ X(Mf, {
|
|
5939
|
+
notice: !p && C && S ? ue : null,
|
|
5940
|
+
children: /* @__PURE__ */ X("p", {
|
|
5941
|
+
className: B("w-full whitespace-pre-wrap break-words px-2 text-f1-foreground-secondary", !p && "cursor-not-allowed"),
|
|
5942
|
+
children: /* @__PURE__ */ X(jf, { text: n })
|
|
5943
|
+
})
|
|
5944
|
+
}) : null : ce ? /* @__PURE__ */ X(Mf, {
|
|
5945
|
+
notice: C && S ? ue : null,
|
|
5915
5946
|
children: /* @__PURE__ */ X("textarea", {
|
|
5916
5947
|
value: n,
|
|
5917
5948
|
"aria-label": A("surveyFormBuilder.labels.description"),
|
|
@@ -6020,15 +6051,15 @@ var Cf = ({ notice: e, className: t, children: n }) => {
|
|
|
6020
6051
|
};
|
|
6021
6052
|
//#endregion
|
|
6022
6053
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/QuestionTypes/BaseQuestion/useQuestionDisabled.ts
|
|
6023
|
-
function
|
|
6054
|
+
function Pf(e) {
|
|
6024
6055
|
let { answering: t, getSectionContainingQuestion: n } = af(), r = n(e.id)?.locked;
|
|
6025
6056
|
return t ? !1 : r || !0;
|
|
6026
6057
|
}
|
|
6027
6058
|
//#endregion
|
|
6028
6059
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/QuestionTypes/CheckboxQuestion/CheckboxQuestion.tsx
|
|
6029
|
-
var
|
|
6030
|
-
let { onQuestionChange: r, answering: i, disabled: a, getSectionContainingQuestion: o } = af(), s =
|
|
6031
|
-
if (i) return /* @__PURE__ */ X(
|
|
6060
|
+
var Ff = ({ value: e, label: t, ...n }) => {
|
|
6061
|
+
let { onQuestionChange: r, answering: i, disabled: a, getSectionContainingQuestion: o } = af(), s = Pf(n), { t: c } = z();
|
|
6062
|
+
if (i) return /* @__PURE__ */ X(Nf, {
|
|
6032
6063
|
...n,
|
|
6033
6064
|
children: /* @__PURE__ */ X(ds, {
|
|
6034
6065
|
id: n.id,
|
|
@@ -6046,7 +6077,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6046
6077
|
})
|
|
6047
6078
|
});
|
|
6048
6079
|
let l = a || o(n.id)?.locked || n.locked;
|
|
6049
|
-
return /* @__PURE__ */ X(
|
|
6080
|
+
return /* @__PURE__ */ X(Nf, {
|
|
6050
6081
|
...n,
|
|
6051
6082
|
children: /* @__PURE__ */ Z("div", {
|
|
6052
6083
|
className: "flex items-start",
|
|
@@ -6071,14 +6102,14 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6071
6102
|
})]
|
|
6072
6103
|
})
|
|
6073
6104
|
});
|
|
6074
|
-
},
|
|
6075
|
-
let { onQuestionChange: n } = af(), r =
|
|
6105
|
+
}, If = ({ value: e, ...t }) => {
|
|
6106
|
+
let { onQuestionChange: n } = af(), r = Pf(t), { t: i } = z(), a = {
|
|
6076
6107
|
id: t.id,
|
|
6077
6108
|
type: "date",
|
|
6078
6109
|
label: i("surveyFormBuilder.answer.label"),
|
|
6079
6110
|
clearable: !t.required
|
|
6080
6111
|
};
|
|
6081
|
-
return /* @__PURE__ */ X(
|
|
6112
|
+
return /* @__PURE__ */ X(Nf, {
|
|
6082
6113
|
...t,
|
|
6083
6114
|
children: /* @__PURE__ */ X(Ru, {
|
|
6084
6115
|
field: a,
|
|
@@ -6094,8 +6125,8 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6094
6125
|
hideLabel: !0
|
|
6095
6126
|
})
|
|
6096
6127
|
});
|
|
6097
|
-
},
|
|
6098
|
-
let { onQuestionChange: i, answering: a, datasets: o } = af(), s =
|
|
6128
|
+
}, Lf = ({ datasetKey: e, showSearchBox: t, searchBoxPlaceholder: n, ...r }) => {
|
|
6129
|
+
let { onQuestionChange: i, answering: a, datasets: o } = af(), s = Pf(r), { t: c } = z(), l = o?.[e];
|
|
6099
6130
|
if (!l) throw Error(`Dataset "${e}" not found for ${r.type}`);
|
|
6100
6131
|
let u = r.type === "dropdown-multi", d = t ?? !0, f = r.type === "dropdown-single" ? r.allowCreate : void 0, p = a && !u && f && l.onCreate ? async (e) => {
|
|
6101
6132
|
try {
|
|
@@ -6122,7 +6153,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6122
6153
|
searchBoxPlaceholder: n,
|
|
6123
6154
|
onCreate: p
|
|
6124
6155
|
};
|
|
6125
|
-
return /* @__PURE__ */ X(
|
|
6156
|
+
return /* @__PURE__ */ X(Nf, {
|
|
6126
6157
|
...r,
|
|
6127
6158
|
children: /* @__PURE__ */ X("div", {
|
|
6128
6159
|
className: "flex flex-col items-start [&>div]:w-full",
|
|
@@ -6145,7 +6176,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6145
6176
|
})
|
|
6146
6177
|
})
|
|
6147
6178
|
});
|
|
6148
|
-
},
|
|
6179
|
+
}, Rf = [
|
|
6149
6180
|
"image/*",
|
|
6150
6181
|
"application/pdf",
|
|
6151
6182
|
"application/msword",
|
|
@@ -6156,7 +6187,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6156
6187
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
6157
6188
|
"text/plain",
|
|
6158
6189
|
"text/csv"
|
|
6159
|
-
],
|
|
6190
|
+
], zf = () => ({
|
|
6160
6191
|
upload: async (e) => ({
|
|
6161
6192
|
type: "success",
|
|
6162
6193
|
value: `local-${e.name}-${Date.now()}`
|
|
@@ -6164,17 +6195,17 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6164
6195
|
cancelUpload: () => {},
|
|
6165
6196
|
progress: 0,
|
|
6166
6197
|
status: "idle"
|
|
6167
|
-
}),
|
|
6168
|
-
let { onQuestionChange: a, useUpload: o } = af(), s =
|
|
6198
|
+
}), Bf = ({ value: e, useUpload: t, accept: n, maxSizeMB: r, ...i }) => {
|
|
6199
|
+
let { onQuestionChange: a, useUpload: o } = af(), s = Pf(i), { t: c } = z(), l = t ?? o, u = {
|
|
6169
6200
|
id: i.id,
|
|
6170
6201
|
type: "file",
|
|
6171
6202
|
label: c("surveyFormBuilder.answer.label"),
|
|
6172
6203
|
multiple: !0,
|
|
6173
|
-
accept: n ??
|
|
6204
|
+
accept: n ?? Rf,
|
|
6174
6205
|
maxSizeMB: r,
|
|
6175
|
-
useUpload: l ??
|
|
6206
|
+
useUpload: l ?? zf
|
|
6176
6207
|
};
|
|
6177
|
-
return /* @__PURE__ */ X(
|
|
6208
|
+
return /* @__PURE__ */ X(Nf, {
|
|
6178
6209
|
...i,
|
|
6179
6210
|
children: /* @__PURE__ */ X(Ru, {
|
|
6180
6211
|
field: u,
|
|
@@ -6190,8 +6221,8 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6190
6221
|
hideLabel: !0
|
|
6191
6222
|
})
|
|
6192
6223
|
});
|
|
6193
|
-
},
|
|
6194
|
-
let { t: n } = z(), { onQuestionChange: r, answering: i } = af(), a =
|
|
6224
|
+
}, Vf = ({ value: e, ...t }) => {
|
|
6225
|
+
let { t: n } = z(), { onQuestionChange: r, answering: i } = af(), a = Pf(t), o = n("surveyFormBuilder.answer.linkPlaceholder"), s = {
|
|
6195
6226
|
id: t.id,
|
|
6196
6227
|
type: "text",
|
|
6197
6228
|
inputType: "url",
|
|
@@ -6199,7 +6230,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6199
6230
|
placeholder: o,
|
|
6200
6231
|
clearable: !t.required
|
|
6201
6232
|
};
|
|
6202
|
-
return /* @__PURE__ */ X(
|
|
6233
|
+
return /* @__PURE__ */ X(Nf, {
|
|
6203
6234
|
...t,
|
|
6204
6235
|
children: /* @__PURE__ */ X(Ru, {
|
|
6205
6236
|
field: s,
|
|
@@ -6215,15 +6246,15 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6215
6246
|
hideLabel: !0
|
|
6216
6247
|
})
|
|
6217
6248
|
});
|
|
6218
|
-
},
|
|
6219
|
-
let { t: n } = z(), { onQuestionChange: r, answering: i } = af(), a =
|
|
6249
|
+
}, Hf = ({ value: e, ...t }) => {
|
|
6250
|
+
let { t: n } = z(), { onQuestionChange: r, answering: i } = af(), a = Pf(t), o = (e) => {
|
|
6220
6251
|
r?.({
|
|
6221
6252
|
...t,
|
|
6222
6253
|
type: "numeric",
|
|
6223
6254
|
value: e
|
|
6224
6255
|
});
|
|
6225
6256
|
}, s = n("surveyFormBuilder.answer.numericPlaceholder");
|
|
6226
|
-
return /* @__PURE__ */ X(
|
|
6257
|
+
return /* @__PURE__ */ X(Nf, {
|
|
6227
6258
|
...t,
|
|
6228
6259
|
children: i ? /* @__PURE__ */ X(N, {
|
|
6229
6260
|
locale: "en-US",
|
|
@@ -6248,7 +6279,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6248
6279
|
icon: Ki
|
|
6249
6280
|
})
|
|
6250
6281
|
});
|
|
6251
|
-
},
|
|
6282
|
+
}, Uf = ({ option: e, selected: n, onClick: r, onChangeLabel: i, disabled: a, isEmojiMode: o = !1 }) => {
|
|
6252
6283
|
let { value: s, label: c } = e, [l, u] = J(!1);
|
|
6253
6284
|
return G(() => {
|
|
6254
6285
|
a && u(!1);
|
|
@@ -6303,7 +6334,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6303
6334
|
children: c
|
|
6304
6335
|
})
|
|
6305
6336
|
});
|
|
6306
|
-
},
|
|
6337
|
+
}, Wf = ({ minLabel: e, maxLabel: t }) => !e && !t ? null : /* @__PURE__ */ Z("div", {
|
|
6307
6338
|
className: "flex items-start justify-between gap-4 px-2 pb-1",
|
|
6308
6339
|
children: [/* @__PURE__ */ X("span", {
|
|
6309
6340
|
className: "text-sm text-f1-foreground-secondary",
|
|
@@ -6312,7 +6343,7 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6312
6343
|
className: "text-right text-sm text-f1-foreground-secondary",
|
|
6313
6344
|
children: t
|
|
6314
6345
|
})]
|
|
6315
|
-
}),
|
|
6346
|
+
}), Gf = ({ options: e, value: t, minLabel: n, maxLabel: r, ...i }) => {
|
|
6316
6347
|
let { onQuestionChange: a, disabled: o, answering: s, getSectionContainingQuestion: c } = af(), l = c(i.id)?.locked || i.locked, u = !!(n || r), d = Yd(e) === "emojis" && Zd(e), f = (e) => {
|
|
6317
6348
|
a?.({
|
|
6318
6349
|
id: i.id,
|
|
@@ -6331,13 +6362,13 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6331
6362
|
options: o
|
|
6332
6363
|
});
|
|
6333
6364
|
};
|
|
6334
|
-
return /* @__PURE__ */ X(
|
|
6365
|
+
return /* @__PURE__ */ X(Nf, {
|
|
6335
6366
|
...i,
|
|
6336
6367
|
children: /* @__PURE__ */ Z("div", {
|
|
6337
6368
|
className: "flex flex-col gap-3",
|
|
6338
6369
|
children: [/* @__PURE__ */ X("div", {
|
|
6339
6370
|
className: B(u ? "flex gap-3 [&>*]:min-w-0" : "grid grid-cols-3 gap-3 @md:grid-cols-5"),
|
|
6340
|
-
children: e.map((e) => /* @__PURE__ */ X(
|
|
6371
|
+
children: e.map((e) => /* @__PURE__ */ X(Uf, {
|
|
6341
6372
|
option: e,
|
|
6342
6373
|
selected: t === e.value,
|
|
6343
6374
|
onClick: f,
|
|
@@ -6345,26 +6376,26 @@ var Ef = ({ value: e, label: t, ...n }) => {
|
|
|
6345
6376
|
disabled: (o || l) && !s,
|
|
6346
6377
|
isEmojiMode: !s && d
|
|
6347
6378
|
}, e.value))
|
|
6348
|
-
}), /* @__PURE__ */ X(
|
|
6379
|
+
}), /* @__PURE__ */ X(Wf, {
|
|
6349
6380
|
minLabel: n,
|
|
6350
6381
|
maxLabel: r
|
|
6351
6382
|
})]
|
|
6352
6383
|
})
|
|
6353
6384
|
});
|
|
6354
|
-
},
|
|
6385
|
+
}, Kf = (e) => /* @__PURE__ */ X(Gf, {
|
|
6355
6386
|
...e,
|
|
6356
6387
|
type: "rating"
|
|
6357
6388
|
});
|
|
6358
6389
|
//#endregion
|
|
6359
6390
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/QuestionTypes/SelectQuestion/SelectOption/SelectOption.tsx
|
|
6360
|
-
function
|
|
6391
|
+
function qf({ checked: e, disabled: t }) {
|
|
6361
6392
|
return /* @__PURE__ */ X("div", {
|
|
6362
6393
|
"aria-hidden": "true",
|
|
6363
6394
|
className: B("flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-colors", e ? "bg-f1-background-selected-bold" : "border border-solid border-f1-border bg-f1-background", t && "opacity-50"),
|
|
6364
6395
|
children: e ? /* @__PURE__ */ X("div", { className: "h-2 w-2 rounded-full bg-f1-background" }) : null
|
|
6365
6396
|
});
|
|
6366
6397
|
}
|
|
6367
|
-
var
|
|
6398
|
+
var Jf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i, disabled: a, answering: o, selected: s, correct: c, locked: l, type: u }) => {
|
|
6368
6399
|
let { value: d, label: f } = t, { isDragging: p, setIsDragging: m, setDraggedItemId: h, draggedItemId: g } = cf(), { t: _ } = z(), v = p && g === d, y = () => {
|
|
6369
6400
|
(a || o) && n(d);
|
|
6370
6401
|
}, b = (t) => {
|
|
@@ -6409,7 +6440,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6409
6440
|
disabled: !o,
|
|
6410
6441
|
presentational: !o,
|
|
6411
6442
|
hideLabel: !0
|
|
6412
|
-
}) : /* @__PURE__ */ X(
|
|
6443
|
+
}) : /* @__PURE__ */ X(qf, {
|
|
6413
6444
|
checked: o ? !!s : !1,
|
|
6414
6445
|
disabled: !o
|
|
6415
6446
|
})
|
|
@@ -6456,7 +6487,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6456
6487
|
]
|
|
6457
6488
|
})
|
|
6458
6489
|
});
|
|
6459
|
-
},
|
|
6490
|
+
}, Yf = ({ options: e, ...t }) => {
|
|
6460
6491
|
let { onQuestionChange: n, disabled: r, answering: i, getSectionContainingQuestion: a } = af(), o = new Set(e.map((e) => e.value)).size !== e.length, s = a(t.id)?.locked || t.locked, { t: c } = z(), l = K(() => ({
|
|
6461
6492
|
id: t.id,
|
|
6462
6493
|
type: t.type,
|
|
@@ -6544,7 +6575,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6544
6575
|
options: e
|
|
6545
6576
|
});
|
|
6546
6577
|
};
|
|
6547
|
-
return o ? null : /* @__PURE__ */ X(
|
|
6578
|
+
return o ? null : /* @__PURE__ */ X(Nf, {
|
|
6548
6579
|
...t,
|
|
6549
6580
|
children: /* @__PURE__ */ Z("div", {
|
|
6550
6581
|
className: "-mx-0.5 flex flex-col items-start [&>div]:w-full",
|
|
@@ -6557,7 +6588,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6557
6588
|
let a = t.type === "select" ? t.value === e.value : Array.isArray(t.value) && t.value.includes(e.value);
|
|
6558
6589
|
return /* @__PURE__ */ X("div", {
|
|
6559
6590
|
className: "w-full [&>div]:w-full",
|
|
6560
|
-
children: /* @__PURE__ */ X(
|
|
6591
|
+
children: /* @__PURE__ */ X(Jf, {
|
|
6561
6592
|
index: n,
|
|
6562
6593
|
option: e,
|
|
6563
6594
|
correct: e.correct,
|
|
@@ -6583,8 +6614,8 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6583
6614
|
}) : null]
|
|
6584
6615
|
})
|
|
6585
6616
|
});
|
|
6586
|
-
},
|
|
6587
|
-
let { onQuestionChange: n, answering: r, placeholders: i } = af(), a =
|
|
6617
|
+
}, Xf = ({ value: e, ...t }) => {
|
|
6618
|
+
let { onQuestionChange: n, answering: r, placeholders: i } = af(), a = Pf(t), { t: o } = z(), s = i?.answer ?? o("surveyFormBuilder.answer.textPlaceholder"), c = K(() => t.type === "text" ? {
|
|
6588
6619
|
id: t.id,
|
|
6589
6620
|
type: "text",
|
|
6590
6621
|
label: o("surveyFormBuilder.answer.label"),
|
|
@@ -6603,7 +6634,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6603
6634
|
s,
|
|
6604
6635
|
o
|
|
6605
6636
|
]);
|
|
6606
|
-
return /* @__PURE__ */ X(
|
|
6637
|
+
return /* @__PURE__ */ X(Nf, {
|
|
6607
6638
|
...t,
|
|
6608
6639
|
children: /* @__PURE__ */ X(Ru, {
|
|
6609
6640
|
field: c,
|
|
@@ -6618,23 +6649,23 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6618
6649
|
hideLabel: !0
|
|
6619
6650
|
})
|
|
6620
6651
|
});
|
|
6621
|
-
},
|
|
6652
|
+
}, Zf = ({ ...e }) => {
|
|
6622
6653
|
switch (e.type) {
|
|
6623
6654
|
case "text":
|
|
6624
|
-
case "longText": return /* @__PURE__ */ X(
|
|
6625
|
-
case "rating": return /* @__PURE__ */ X(
|
|
6655
|
+
case "longText": return /* @__PURE__ */ X(Xf, { ...e });
|
|
6656
|
+
case "rating": return /* @__PURE__ */ X(Kf, { ...e });
|
|
6626
6657
|
case "select":
|
|
6627
|
-
case "multi-select": return /* @__PURE__ */ X(
|
|
6658
|
+
case "multi-select": return /* @__PURE__ */ X(Yf, { ...e });
|
|
6628
6659
|
case "dropdown-single":
|
|
6629
|
-
case "dropdown-multi": return /* @__PURE__ */ X(
|
|
6630
|
-
case "numeric": return /* @__PURE__ */ X(
|
|
6631
|
-
case "link": return /* @__PURE__ */ X(
|
|
6632
|
-
case "date": return /* @__PURE__ */ X(
|
|
6633
|
-
case "file": return /* @__PURE__ */ X(
|
|
6634
|
-
case "checkbox": return /* @__PURE__ */ X(
|
|
6660
|
+
case "dropdown-multi": return /* @__PURE__ */ X(Lf, { ...e });
|
|
6661
|
+
case "numeric": return /* @__PURE__ */ X(Hf, { ...e });
|
|
6662
|
+
case "link": return /* @__PURE__ */ X(Vf, { ...e });
|
|
6663
|
+
case "date": return /* @__PURE__ */ X(If, { ...e });
|
|
6664
|
+
case "file": return /* @__PURE__ */ X(Bf, { ...e });
|
|
6665
|
+
case "checkbox": return /* @__PURE__ */ X(Ff, { ...e });
|
|
6635
6666
|
default: throw Error("Invalid question type provided");
|
|
6636
6667
|
}
|
|
6637
|
-
},
|
|
6668
|
+
}, Qf = () => {
|
|
6638
6669
|
let { t: e } = z();
|
|
6639
6670
|
return /* @__PURE__ */ Z("div", {
|
|
6640
6671
|
className: "mt-8 ml-7 flex flex-row items-center gap-4",
|
|
@@ -6647,7 +6678,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6647
6678
|
/* @__PURE__ */ X("div", { className: "h-px flex-1 bg-f1-border-secondary" })
|
|
6648
6679
|
]
|
|
6649
6680
|
});
|
|
6650
|
-
},
|
|
6681
|
+
}, $f = Cc(({ item: e, section: t, showEndOfSection: n, className: r }) => {
|
|
6651
6682
|
let { isDragging: i, setIsDragging: a, setDraggedItemId: o, draggedItemId: s } = cf(), c = tn(), { disabled: l, answering: u } = af(), d = !!t && s === t.id, f = () => {
|
|
6652
6683
|
a(!0), o(e.question.id);
|
|
6653
6684
|
}, p = () => {
|
|
@@ -6678,11 +6709,11 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6678
6709
|
icon: Xr,
|
|
6679
6710
|
size: "sm"
|
|
6680
6711
|
})
|
|
6681
|
-
}) : null, /* @__PURE__ */ X(
|
|
6712
|
+
}) : null, /* @__PURE__ */ X(Zf, { ...e.question })]
|
|
6682
6713
|
})
|
|
6683
|
-
}), n ? /* @__PURE__ */ X(
|
|
6714
|
+
}), n ? /* @__PURE__ */ X(Qf, {}) : null]
|
|
6684
6715
|
});
|
|
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)),
|
|
6716
|
+
}, (e, t) => e.showEndOfSection === t.showEndOfSection && e.className === t.className && (0, vl.default)(e.section, t.section) && (0, vl.default)(e.item, t.item)), ep = ({ question: e }) => {
|
|
6686
6717
|
let { isDragging: t, setIsDragging: n, setDraggedItemId: r } = cf(), i = tn(), { disabled: a, answering: o, getSectionContainingQuestion: s } = af(), c = s(e.id), l = () => {
|
|
6687
6718
|
n(!0), r(e.id);
|
|
6688
6719
|
}, u = () => {
|
|
@@ -6708,10 +6739,10 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6708
6739
|
icon: Xr,
|
|
6709
6740
|
size: "sm"
|
|
6710
6741
|
})
|
|
6711
|
-
}) : null, /* @__PURE__ */ X(
|
|
6742
|
+
}) : null, /* @__PURE__ */ X(Zf, { ...e })]
|
|
6712
6743
|
})
|
|
6713
6744
|
});
|
|
6714
|
-
},
|
|
6745
|
+
}, tp = ({ id: e, title: t = "", description: n, lockedNote: r, questions: i = [], locked: a, hideQuestions: o }) => {
|
|
6715
6746
|
let { onSectionChange: s, disabled: c, answering: l, deleteElement: u, onDuplicateElement: d, placeholders: f } = af(), [p, m] = J(!1), { t: h } = z(), g = f?.sectionTitle ?? h("surveyFormBuilder.labels.sectionTitlePlaceholder"), _ = K(() => ({
|
|
6716
6747
|
id: e,
|
|
6717
6748
|
title: t,
|
|
@@ -6808,7 +6839,10 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6808
6839
|
})
|
|
6809
6840
|
}) : null
|
|
6810
6841
|
]
|
|
6811
|
-
}) : null, w && (!a || l) ? /* @__PURE__ */ X("
|
|
6842
|
+
}) : null, w && (!a || l) ? l || c ? /* @__PURE__ */ X("p", {
|
|
6843
|
+
className: B("w-full whitespace-pre-wrap break-words text-f1-foreground-secondary", !l && "cursor-not-allowed"),
|
|
6844
|
+
children: /* @__PURE__ */ X(jf, { text: n ?? "" })
|
|
6845
|
+
}) : /* @__PURE__ */ X("textarea", {
|
|
6812
6846
|
value: n,
|
|
6813
6847
|
"aria-label": h("surveyFormBuilder.labels.description"),
|
|
6814
6848
|
placeholder: h("surveyFormBuilder.labels.sectionDescriptionPlaceholder"),
|
|
@@ -6823,7 +6857,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6823
6857
|
as: "div",
|
|
6824
6858
|
children: /* @__PURE__ */ X("div", {
|
|
6825
6859
|
className: "group/section-list flex flex-col gap-4",
|
|
6826
|
-
children: i.map((e) => /* @__PURE__ */ X(
|
|
6860
|
+
children: i.map((e) => /* @__PURE__ */ X(ep, { question: e }, e.id))
|
|
6827
6861
|
})
|
|
6828
6862
|
}) }), l ? null : /* @__PURE__ */ Z("div", {
|
|
6829
6863
|
className: "mt-8 flex flex-row items-center gap-4",
|
|
@@ -6837,7 +6871,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6837
6871
|
]
|
|
6838
6872
|
})] })]
|
|
6839
6873
|
});
|
|
6840
|
-
},
|
|
6874
|
+
}, np = Cc(({ item: e, className: t }) => {
|
|
6841
6875
|
let { isDragging: n, setIsDragging: r, setDraggedItemId: i, draggedItemId: a } = cf(), o = tn(), { disabled: s, answering: c } = af(), l = a === e.section.id;
|
|
6842
6876
|
return /* @__PURE__ */ X(sn, {
|
|
6843
6877
|
value: e.id,
|
|
@@ -6870,25 +6904,25 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6870
6904
|
icon: Xr,
|
|
6871
6905
|
size: "sm"
|
|
6872
6906
|
})
|
|
6873
|
-
}) : null, /* @__PURE__ */ X(
|
|
6907
|
+
}) : null, /* @__PURE__ */ X(tp, {
|
|
6874
6908
|
...e.section,
|
|
6875
6909
|
hideQuestions: !0
|
|
6876
6910
|
})]
|
|
6877
6911
|
}), l && (e.section.questions ?? []).length > 0 ? /* @__PURE__ */ Z("div", {
|
|
6878
6912
|
className: "flex flex-col gap-4 w-full mt-4 ml-7",
|
|
6879
|
-
children: [(e.section.questions ?? []).map((e) => /* @__PURE__ */ X(
|
|
6913
|
+
children: [(e.section.questions ?? []).map((e) => /* @__PURE__ */ X(Zf, { ...e }, e.id)), /* @__PURE__ */ X(Qf, {})]
|
|
6880
6914
|
}) : null]
|
|
6881
6915
|
})
|
|
6882
6916
|
})
|
|
6883
6917
|
});
|
|
6884
|
-
}, (e, t) => e.className === t.className && (0, vl.default)(e.item, t.item)),
|
|
6918
|
+
}, (e, t) => e.className === t.className && (0, vl.default)(e.item, t.item)), rp = (e) => uf[e], ip = (e) => {
|
|
6885
6919
|
document.getElementById(e)?.scrollIntoView({
|
|
6886
6920
|
behavior: "smooth",
|
|
6887
6921
|
block: "start"
|
|
6888
6922
|
});
|
|
6889
|
-
},
|
|
6923
|
+
}, ap = (e, t) => {
|
|
6890
6924
|
let { untitledSectionLabel: n, untitledQuestionLabel: r, duplicateQuestionLabel: i, deleteQuestionLabel: a, duplicateSectionLabel: o, deleteSectionLabel: s, questionOptionsLabel: c, requiredLabel: l, questionTypeLabel: u, singleSelectionLabel: d, multiSelectionLabel: f } = t, { deleteElement: p, onDuplicateElement: m, disabled: h, answering: g } = af(), { getActionsForQuestion: _, questionTypes: v } = gf(), y = W((e) => {
|
|
6891
|
-
|
|
6925
|
+
ip(e);
|
|
6892
6926
|
}, []), b = W((e, t, n) => {
|
|
6893
6927
|
let { question: r, currentRatingType: o, currentDatasetKey: s, disallowOptionalQuestions: p, handleChangeRequired: m, handleSelectQuestionType: h, handleSelectRatingType: g, handleDuplicate: y, handleDelete: b } = _(e, t, n), x = [{
|
|
6894
6928
|
type: "label",
|
|
@@ -7008,7 +7042,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7008
7042
|
children: a.map((e) => ({
|
|
7009
7043
|
id: `co-creation-question-${e.id}`,
|
|
7010
7044
|
label: e.title || r,
|
|
7011
|
-
icon:
|
|
7045
|
+
icon: rp(e.type),
|
|
7012
7046
|
onClick: y,
|
|
7013
7047
|
...!h && !g && !t.locked && { otherActions: b(e.id, e.type, !c) }
|
|
7014
7048
|
}))
|
|
@@ -7018,7 +7052,7 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7018
7052
|
return {
|
|
7019
7053
|
id: `co-creation-question-${t.id}`,
|
|
7020
7054
|
label: t.title || r,
|
|
7021
|
-
icon:
|
|
7055
|
+
icon: rp(t.type),
|
|
7022
7056
|
onClick: y,
|
|
7023
7057
|
...!h && !g && { otherActions: b(t.id, t.type, !0) }
|
|
7024
7058
|
};
|
|
@@ -7035,18 +7069,18 @@ var zf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7035
7069
|
m,
|
|
7036
7070
|
p
|
|
7037
7071
|
]);
|
|
7038
|
-
},
|
|
7039
|
-
function
|
|
7072
|
+
}, op = "co-creation-section-", sp = "co-creation-question-";
|
|
7073
|
+
function cp(e, t) {
|
|
7040
7074
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
7041
7075
|
for (let e of t) if (e.type === "section") {
|
|
7042
7076
|
n.set(e.section.id, e.section);
|
|
7043
7077
|
for (let t of e.section.questions ?? []) r.set(t.id, t);
|
|
7044
7078
|
} else r.set(e.question.id, e.question);
|
|
7045
7079
|
let i = [], a = (e) => {
|
|
7046
|
-
if (e.id.startsWith(
|
|
7080
|
+
if (e.id.startsWith(op)) {
|
|
7047
7081
|
let t = e.id.slice(20), o = n.get(t);
|
|
7048
7082
|
if (!o) return;
|
|
7049
|
-
let s = (e.children ?? []).filter((e) => e.id.startsWith(
|
|
7083
|
+
let s = (e.children ?? []).filter((e) => e.id.startsWith(sp)).map((e) => r.get(e.id.slice(21))).filter((e) => e != null);
|
|
7050
7084
|
i.push({
|
|
7051
7085
|
type: "section",
|
|
7052
7086
|
section: {
|
|
@@ -7054,8 +7088,8 @@ function $f(e, t) {
|
|
|
7054
7088
|
questions: s
|
|
7055
7089
|
}
|
|
7056
7090
|
});
|
|
7057
|
-
for (let t of e.children ?? []) t.id.startsWith(
|
|
7058
|
-
} else if (e.id.startsWith(
|
|
7091
|
+
for (let t of e.children ?? []) t.id.startsWith(op) && a(t);
|
|
7092
|
+
} else if (e.id.startsWith(sp)) {
|
|
7059
7093
|
let t = e.id.slice(21), n = r.get(t);
|
|
7060
7094
|
n && i.push({
|
|
7061
7095
|
type: "question",
|
|
@@ -7066,8 +7100,8 @@ function $f(e, t) {
|
|
|
7066
7100
|
for (let t of e) a(t);
|
|
7067
7101
|
return i;
|
|
7068
7102
|
}
|
|
7069
|
-
var
|
|
7070
|
-
let { t: r } = z(), { disabled: i, labels: a } = af(), { portalContainer: o } = wc(Ro), s =
|
|
7103
|
+
var lp = ({ elements: e, onChange: t, answering: n }) => {
|
|
7104
|
+
let { t: r } = z(), { disabled: i, labels: a } = af(), { portalContainer: o } = wc(Ro), s = ap(e, {
|
|
7071
7105
|
untitledSectionLabel: r("surveyFormBuilder.labels.sectionTitlePlaceholder"),
|
|
7072
7106
|
untitledQuestionLabel: r("surveyFormBuilder.labels.titlePlaceholder"),
|
|
7073
7107
|
duplicateQuestionLabel: a?.duplicateQuestion ?? r("surveyFormBuilder.actions.duplicateQuestion"),
|
|
@@ -7080,7 +7114,7 @@ var ep = ({ elements: e, onChange: t, answering: n }) => {
|
|
|
7080
7114
|
singleSelectionLabel: r("surveyFormBuilder.labels.singleSelection"),
|
|
7081
7115
|
multiSelectionLabel: r("surveyFormBuilder.labels.multiSelection")
|
|
7082
7116
|
}), c = W((n) => {
|
|
7083
|
-
t(
|
|
7117
|
+
t(cp(n, e));
|
|
7084
7118
|
}, [e, t]);
|
|
7085
7119
|
return /* @__PURE__ */ X("div", {
|
|
7086
7120
|
className: "sticky left-0 top-1/2 z-10 hidden h-0 -translate-y-12 px-2 @3xl:block",
|
|
@@ -7098,7 +7132,7 @@ var ep = ({ elements: e, onChange: t, answering: n }) => {
|
|
|
7098
7132
|
};
|
|
7099
7133
|
//#endregion
|
|
7100
7134
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/Form/useReorderHandler.ts
|
|
7101
|
-
function
|
|
7135
|
+
function up({ flatItems: e, onChange: t }) {
|
|
7102
7136
|
let [n, r] = J(null), [i, a] = J(!1);
|
|
7103
7137
|
return {
|
|
7104
7138
|
handleFlatReorder: W((n) => {
|
|
@@ -7167,35 +7201,35 @@ function tp({ flatItems: e, onChange: t }) {
|
|
|
7167
7201
|
}
|
|
7168
7202
|
//#endregion
|
|
7169
7203
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/Form/Form.tsx
|
|
7170
|
-
function
|
|
7204
|
+
function dp({ children: e }) {
|
|
7171
7205
|
let { isDragging: t } = cf();
|
|
7172
7206
|
return /* @__PURE__ */ X("div", {
|
|
7173
7207
|
className: B("relative @container", t && "select-none"),
|
|
7174
7208
|
children: e
|
|
7175
7209
|
});
|
|
7176
7210
|
}
|
|
7177
|
-
var
|
|
7211
|
+
var fp = (e, t, n) => {
|
|
7178
7212
|
let r = [e[t]], i = t + 1;
|
|
7179
7213
|
for (; i < e.length && e[i].type === "question" && n.has(e[i].id);) r.push(e[i]), i++;
|
|
7180
7214
|
return r;
|
|
7181
|
-
},
|
|
7215
|
+
}, pp = ({ items: e, first: t, sectionByQuestionId: n }) => /* @__PURE__ */ X("div", {
|
|
7182
7216
|
className: B("rounded-2xl bg-f1-background-secondary pb-8 pt-4", t ? "" : "mt-8"),
|
|
7183
|
-
children: e.map((e, t) => e.type === "section-header" ? /* @__PURE__ */ X(
|
|
7217
|
+
children: e.map((e, t) => e.type === "section-header" ? /* @__PURE__ */ X(np, {
|
|
7184
7218
|
item: e,
|
|
7185
7219
|
className: ""
|
|
7186
|
-
}, e.id) : e.type === "question" ? /* @__PURE__ */ X(
|
|
7220
|
+
}, e.id) : e.type === "question" ? /* @__PURE__ */ X($f, {
|
|
7187
7221
|
item: e,
|
|
7188
7222
|
section: n.get(e.question.id),
|
|
7189
7223
|
showEndOfSection: !1,
|
|
7190
7224
|
className: t === 1 ? "mt-2" : "mt-4"
|
|
7191
7225
|
}, e.id) : null)
|
|
7192
|
-
}),
|
|
7226
|
+
}), mp = ({ items: e, lockedSectionIds: t, inSectionQuestionIds: n, sectionEndIds: r, sectionByQuestionId: i }) => {
|
|
7193
7227
|
let a = [], o = 0;
|
|
7194
7228
|
for (; o < e.length;) {
|
|
7195
7229
|
let s = e[o];
|
|
7196
7230
|
if (s.type === "section-header" && t.has(s.section.id)) {
|
|
7197
|
-
let t =
|
|
7198
|
-
a.push(/* @__PURE__ */ X(
|
|
7231
|
+
let t = fp(e, o, n);
|
|
7232
|
+
a.push(/* @__PURE__ */ X(pp, {
|
|
7199
7233
|
items: t,
|
|
7200
7234
|
first: o === 0,
|
|
7201
7235
|
sectionByQuestionId: i
|
|
@@ -7203,10 +7237,10 @@ var rp = (e, t, n) => {
|
|
|
7203
7237
|
continue;
|
|
7204
7238
|
}
|
|
7205
7239
|
let c = o === 0 ? "" : n.has(s.id) ? "mt-4" : "mt-8";
|
|
7206
|
-
s.type === "section-header" ? a.push(/* @__PURE__ */ X(
|
|
7240
|
+
s.type === "section-header" ? a.push(/* @__PURE__ */ X(np, {
|
|
7207
7241
|
item: s,
|
|
7208
7242
|
className: c
|
|
7209
|
-
}, s.id)) : s.type === "question" && a.push(/* @__PURE__ */ X(
|
|
7243
|
+
}, s.id)) : s.type === "question" && a.push(/* @__PURE__ */ X($f, {
|
|
7210
7244
|
item: s,
|
|
7211
7245
|
section: i.get(s.question.id),
|
|
7212
7246
|
showEndOfSection: r.has(s.id),
|
|
@@ -7214,7 +7248,7 @@ var rp = (e, t, n) => {
|
|
|
7214
7248
|
}, s.id)), o++;
|
|
7215
7249
|
}
|
|
7216
7250
|
return /* @__PURE__ */ X(Y, { children: a });
|
|
7217
|
-
},
|
|
7251
|
+
}, hp = R(({ elements: e, disabled: t, onChange: n, disallowOptionalQuestions: r, allowedQuestionTypes: i, applyingChanges: a, useUpload: o, datasets: s, placeholders: c, labels: l, skipDefaultSection: u }) => {
|
|
7218
7252
|
let d = !t, f = K(() => e.map((e) => e.type === "question" ? {
|
|
7219
7253
|
...e,
|
|
7220
7254
|
question: {
|
|
@@ -7238,7 +7272,7 @@ var rp = (e, t, n) => {
|
|
|
7238
7272
|
let e = /* @__PURE__ */ new Set();
|
|
7239
7273
|
for (let t of f) t.type === "section" && t.section.locked && e.add(t.section.id);
|
|
7240
7274
|
return e;
|
|
7241
|
-
}, [f]), { handleFlatReorder: b, handleConfirmLastQuestionMove: x, handleCancelLastQuestionMove: S, lastQuestionDialogOpen: C } =
|
|
7275
|
+
}, [f]), { handleFlatReorder: b, handleConfirmLastQuestionMove: x, handleCancelLastQuestionMove: S, lastQuestionDialogOpen: C } = up({
|
|
7242
7276
|
flatItems: p,
|
|
7243
7277
|
onChange: n
|
|
7244
7278
|
});
|
|
@@ -7260,7 +7294,7 @@ var rp = (e, t, n) => {
|
|
|
7260
7294
|
placeholders: c,
|
|
7261
7295
|
labels: l,
|
|
7262
7296
|
skipDefaultSection: u,
|
|
7263
|
-
children: [/* @__PURE__ */ X(sf, { children: /* @__PURE__ */ Z(
|
|
7297
|
+
children: [/* @__PURE__ */ X(sf, { children: /* @__PURE__ */ Z(dp, { children: [w ? /* @__PURE__ */ X(lp, {
|
|
7264
7298
|
elements: f,
|
|
7265
7299
|
onChange: n
|
|
7266
7300
|
}) : null, /* @__PURE__ */ Z("div", {
|
|
@@ -7277,7 +7311,7 @@ var rp = (e, t, n) => {
|
|
|
7277
7311
|
as: "div",
|
|
7278
7312
|
children: /* @__PURE__ */ X("div", {
|
|
7279
7313
|
className: "flex flex-col",
|
|
7280
|
-
children: /* @__PURE__ */ X(
|
|
7314
|
+
children: /* @__PURE__ */ X(mp, {
|
|
7281
7315
|
items: m,
|
|
7282
7316
|
lockedSectionIds: y,
|
|
7283
7317
|
inSectionQuestionIds: v,
|
|
@@ -7311,7 +7345,7 @@ var rp = (e, t, n) => {
|
|
|
7311
7345
|
});
|
|
7312
7346
|
//#endregion
|
|
7313
7347
|
//#region src/domains/talent/surveys/surveys/SurveyAnsweringForm/components/skeletons/SurveyAnsweringFormLoadingSkeletons.tsx
|
|
7314
|
-
function
|
|
7348
|
+
function gp({ titleWidth: e, descriptionWidth: t, answer: n }) {
|
|
7315
7349
|
return /* @__PURE__ */ Z("div", {
|
|
7316
7350
|
className: "flex flex-col gap-4 rounded-xl border border-solid border-f1-border-secondary bg-f1-background p-4",
|
|
7317
7351
|
children: [/* @__PURE__ */ Z("div", {
|
|
@@ -7326,14 +7360,14 @@ function sp({ titleWidth: e, descriptionWidth: t, answer: n }) {
|
|
|
7326
7360
|
}), n]
|
|
7327
7361
|
});
|
|
7328
7362
|
}
|
|
7329
|
-
var
|
|
7330
|
-
function
|
|
7363
|
+
var _p = /* @__PURE__ */ X(_n, { className: "h-10 w-full rounded-sm" }), vp = /* @__PURE__ */ X(_n, { className: "h-24 w-full rounded-sm" }), yp = /* @__PURE__ */ X(_n, { className: "h-10 w-56 max-w-full rounded-sm" });
|
|
7364
|
+
function bp() {
|
|
7331
7365
|
return /* @__PURE__ */ X("div", {
|
|
7332
7366
|
className: "grid grid-cols-5 gap-2 sm:max-w-80",
|
|
7333
7367
|
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(_n, { className: "h-9 rounded-sm" }, t))
|
|
7334
7368
|
});
|
|
7335
7369
|
}
|
|
7336
|
-
function
|
|
7370
|
+
function xp({ count: e }) {
|
|
7337
7371
|
return /* @__PURE__ */ X("div", {
|
|
7338
7372
|
className: "flex flex-col gap-2",
|
|
7339
7373
|
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(_n, {
|
|
@@ -7342,7 +7376,7 @@ function fp({ count: e }) {
|
|
|
7342
7376
|
}, t))
|
|
7343
7377
|
});
|
|
7344
7378
|
}
|
|
7345
|
-
function
|
|
7379
|
+
function Sp() {
|
|
7346
7380
|
return /* @__PURE__ */ X("div", {
|
|
7347
7381
|
className: "flex flex-wrap gap-2",
|
|
7348
7382
|
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(_n, {
|
|
@@ -7351,7 +7385,7 @@ function pp() {
|
|
|
7351
7385
|
}, t))
|
|
7352
7386
|
});
|
|
7353
7387
|
}
|
|
7354
|
-
function
|
|
7388
|
+
function Cp() {
|
|
7355
7389
|
return /* @__PURE__ */ X("div", {
|
|
7356
7390
|
className: "flex w-full flex-col gap-10",
|
|
7357
7391
|
"data-testid": "survey-answering-form-loading-all-questions",
|
|
@@ -7365,63 +7399,63 @@ function mp() {
|
|
|
7365
7399
|
}), /* @__PURE__ */ X("div", {
|
|
7366
7400
|
className: "flex flex-col gap-4",
|
|
7367
7401
|
children: e === 0 ? /* @__PURE__ */ Z(Y, { children: [
|
|
7368
|
-
/* @__PURE__ */ X(
|
|
7402
|
+
/* @__PURE__ */ X(gp, {
|
|
7369
7403
|
titleWidth: "65%",
|
|
7370
7404
|
descriptionWidth: "42%",
|
|
7371
|
-
answer:
|
|
7405
|
+
answer: _p
|
|
7372
7406
|
}),
|
|
7373
|
-
/* @__PURE__ */ X(
|
|
7407
|
+
/* @__PURE__ */ X(gp, {
|
|
7374
7408
|
titleWidth: "70%",
|
|
7375
7409
|
descriptionWidth: "55%",
|
|
7376
|
-
answer:
|
|
7410
|
+
answer: vp
|
|
7377
7411
|
}),
|
|
7378
|
-
/* @__PURE__ */ X(
|
|
7412
|
+
/* @__PURE__ */ X(gp, {
|
|
7379
7413
|
titleWidth: "58%",
|
|
7380
7414
|
descriptionWidth: "38%",
|
|
7381
|
-
answer: /* @__PURE__ */ X(
|
|
7415
|
+
answer: /* @__PURE__ */ X(bp, {})
|
|
7382
7416
|
}),
|
|
7383
|
-
/* @__PURE__ */ X(
|
|
7417
|
+
/* @__PURE__ */ X(gp, {
|
|
7384
7418
|
titleWidth: "62%",
|
|
7385
7419
|
descriptionWidth: "46%",
|
|
7386
|
-
answer: /* @__PURE__ */ X(
|
|
7420
|
+
answer: /* @__PURE__ */ X(xp, { count: 4 })
|
|
7387
7421
|
}),
|
|
7388
|
-
/* @__PURE__ */ X(
|
|
7422
|
+
/* @__PURE__ */ X(gp, {
|
|
7389
7423
|
titleWidth: "54%",
|
|
7390
7424
|
descriptionWidth: "44%",
|
|
7391
|
-
answer:
|
|
7425
|
+
answer: _p
|
|
7392
7426
|
})
|
|
7393
7427
|
] }) : /* @__PURE__ */ Z(Y, { children: [
|
|
7394
|
-
/* @__PURE__ */ X(
|
|
7428
|
+
/* @__PURE__ */ X(gp, {
|
|
7395
7429
|
titleWidth: "60%",
|
|
7396
7430
|
descriptionWidth: "50%",
|
|
7397
|
-
answer:
|
|
7431
|
+
answer: yp
|
|
7398
7432
|
}),
|
|
7399
|
-
/* @__PURE__ */ X(
|
|
7433
|
+
/* @__PURE__ */ X(gp, {
|
|
7400
7434
|
titleWidth: "66%",
|
|
7401
7435
|
descriptionWidth: "45%",
|
|
7402
|
-
answer:
|
|
7436
|
+
answer: _p
|
|
7403
7437
|
}),
|
|
7404
|
-
/* @__PURE__ */ X(
|
|
7438
|
+
/* @__PURE__ */ X(gp, {
|
|
7405
7439
|
titleWidth: "57%",
|
|
7406
7440
|
descriptionWidth: "48%",
|
|
7407
|
-
answer: /* @__PURE__ */ X(
|
|
7441
|
+
answer: /* @__PURE__ */ X(Sp, {})
|
|
7408
7442
|
}),
|
|
7409
|
-
/* @__PURE__ */ X(
|
|
7443
|
+
/* @__PURE__ */ X(gp, {
|
|
7410
7444
|
titleWidth: "64%",
|
|
7411
7445
|
descriptionWidth: "36%",
|
|
7412
|
-
answer: /* @__PURE__ */ X(
|
|
7446
|
+
answer: /* @__PURE__ */ X(xp, { count: 3 })
|
|
7413
7447
|
}),
|
|
7414
|
-
/* @__PURE__ */ X(
|
|
7448
|
+
/* @__PURE__ */ X(gp, {
|
|
7415
7449
|
titleWidth: "52%",
|
|
7416
7450
|
descriptionWidth: "40%",
|
|
7417
|
-
answer:
|
|
7451
|
+
answer: vp
|
|
7418
7452
|
})
|
|
7419
7453
|
] })
|
|
7420
7454
|
})]
|
|
7421
7455
|
}, e))
|
|
7422
7456
|
});
|
|
7423
7457
|
}
|
|
7424
|
-
function
|
|
7458
|
+
function wp() {
|
|
7425
7459
|
return /* @__PURE__ */ Z("div", {
|
|
7426
7460
|
className: "flex w-full flex-col gap-6",
|
|
7427
7461
|
"data-testid": "survey-answering-form-loading-stepped",
|
|
@@ -7430,16 +7464,16 @@ function hp() {
|
|
|
7430
7464
|
children: [/* @__PURE__ */ Z("div", {
|
|
7431
7465
|
className: "flex flex-col gap-2 px-5",
|
|
7432
7466
|
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
|
-
}), /* @__PURE__ */ X(
|
|
7467
|
+
}), /* @__PURE__ */ X(gp, {
|
|
7434
7468
|
titleWidth: "74%",
|
|
7435
7469
|
descriptionWidth: "50%",
|
|
7436
|
-
answer:
|
|
7470
|
+
answer: _p
|
|
7437
7471
|
})]
|
|
7438
7472
|
});
|
|
7439
7473
|
}
|
|
7440
7474
|
//#endregion
|
|
7441
7475
|
//#region src/domains/talent/surveys/surveys/SurveyAnsweringForm/hooks/useStepper.ts
|
|
7442
|
-
function
|
|
7476
|
+
function Tp(e) {
|
|
7443
7477
|
let [t, n] = J(0), [r, i] = J(null), a = e.length, o = a > 0 ? t / a * 100 : 0;
|
|
7444
7478
|
return {
|
|
7445
7479
|
currentStep: t,
|
|
@@ -7464,7 +7498,7 @@ function gp(e) {
|
|
|
7464
7498
|
}
|
|
7465
7499
|
//#endregion
|
|
7466
7500
|
//#region src/domains/talent/surveys/surveys/SurveyAnsweringForm/components/RatingQuestionField.tsx
|
|
7467
|
-
function
|
|
7501
|
+
function Ep({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
7468
7502
|
let { options: i, minLabel: a, maxLabel: o, disabled: s } = r, c = !!(a || o), l = (e) => {
|
|
7469
7503
|
s || (t(e), n());
|
|
7470
7504
|
};
|
|
@@ -7480,7 +7514,7 @@ function _p({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
7480
7514
|
children: t.label
|
|
7481
7515
|
})
|
|
7482
7516
|
}, t.value))
|
|
7483
|
-
}), /* @__PURE__ */ X(
|
|
7517
|
+
}), /* @__PURE__ */ X(Wf, {
|
|
7484
7518
|
minLabel: a,
|
|
7485
7519
|
maxLabel: o
|
|
7486
7520
|
})]
|
|
@@ -7488,14 +7522,14 @@ function _p({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
7488
7522
|
}
|
|
7489
7523
|
//#endregion
|
|
7490
7524
|
//#region src/domains/talent/surveys/surveys/SurveyAnsweringForm/components/SelectQuestionField.tsx
|
|
7491
|
-
function
|
|
7525
|
+
function Dp({ checked: e }) {
|
|
7492
7526
|
return /* @__PURE__ */ X("div", {
|
|
7493
7527
|
"aria-hidden": "true",
|
|
7494
7528
|
className: B("flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-colors", e ? "bg-f1-background-selected-bold" : "border border-solid border-f1-border bg-f1-background"),
|
|
7495
7529
|
children: e ? /* @__PURE__ */ X("div", { className: "h-2 w-2 rounded-full bg-f1-background" }) : null
|
|
7496
7530
|
});
|
|
7497
7531
|
}
|
|
7498
|
-
function
|
|
7532
|
+
function Op({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
7499
7533
|
let { options: i, type: a, required: o, disabled: s, showAnswerValidation: c } = r, l = i.some((e) => e.correct), u = !!c && l, d = (r) => {
|
|
7500
7534
|
s || a === "select" && (t(!o && e === r ? void 0 : r), n());
|
|
7501
7535
|
}, f = (r) => {
|
|
@@ -7520,7 +7554,7 @@ function yp({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
7520
7554
|
checked: !!n,
|
|
7521
7555
|
onCheckedChange: () => f(t.value),
|
|
7522
7556
|
hideLabel: !0
|
|
7523
|
-
}) : /* @__PURE__ */ X(
|
|
7557
|
+
}) : /* @__PURE__ */ X(Dp, { checked: !!n }),
|
|
7524
7558
|
/* @__PURE__ */ X("p", {
|
|
7525
7559
|
className: "flex-1 font-medium",
|
|
7526
7560
|
children: t.label
|
|
@@ -7540,7 +7574,7 @@ function yp({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
7540
7574
|
}
|
|
7541
7575
|
//#endregion
|
|
7542
7576
|
//#region src/domains/talent/surveys/surveys/SurveyAnsweringForm/hooks/useSurveyFormSchema.tsx
|
|
7543
|
-
var
|
|
7577
|
+
var kp = /^(https?:\/\/)?[\w.-]+\.[a-z]{2,}(:\d+)?(\/[^\s]*)?$/i, Ap = () => ({
|
|
7544
7578
|
upload: async (e) => ({
|
|
7545
7579
|
type: "success",
|
|
7546
7580
|
value: `local-${e.name}-${Date.now()}`
|
|
@@ -7549,7 +7583,7 @@ var bp = /^(https?:\/\/)?[\w.-]+\.[a-z]{2,}(:\d+)?(\/[^\s]*)?$/i, xp = () => ({
|
|
|
7549
7583
|
progress: 0,
|
|
7550
7584
|
status: "idle"
|
|
7551
7585
|
});
|
|
7552
|
-
function
|
|
7586
|
+
function jp(e, t) {
|
|
7553
7587
|
return ci().optional().superRefine((n, r) => {
|
|
7554
7588
|
e && (!n || n.trim() === "") && r.addIssue({
|
|
7555
7589
|
code: "custom",
|
|
@@ -7557,18 +7591,18 @@ function Sp(e, t) {
|
|
|
7557
7591
|
});
|
|
7558
7592
|
});
|
|
7559
7593
|
}
|
|
7560
|
-
function
|
|
7594
|
+
function Mp(e, t) {
|
|
7561
7595
|
return ci().optional().superRefine((n, r) => {
|
|
7562
7596
|
e && (!n || n.trim() === "") ? r.addIssue({
|
|
7563
7597
|
code: "custom",
|
|
7564
7598
|
message: t("forms.validation.required")
|
|
7565
|
-
}) : n && !
|
|
7599
|
+
}) : n && !kp.test(n) && r.addIssue({
|
|
7566
7600
|
code: "custom",
|
|
7567
7601
|
message: t("surveyFormBuilder.answer.invalidUrl")
|
|
7568
7602
|
});
|
|
7569
7603
|
});
|
|
7570
7604
|
}
|
|
7571
|
-
function
|
|
7605
|
+
function Np(e, t) {
|
|
7572
7606
|
return Er().optional().superRefine((n, r) => {
|
|
7573
7607
|
e && n == null && r.addIssue({
|
|
7574
7608
|
code: "custom",
|
|
@@ -7576,7 +7610,7 @@ function wp(e, t) {
|
|
|
7576
7610
|
});
|
|
7577
7611
|
});
|
|
7578
7612
|
}
|
|
7579
|
-
function
|
|
7613
|
+
function Pp(e, t) {
|
|
7580
7614
|
return da(ci()).optional().superRefine((n, r) => {
|
|
7581
7615
|
e && (!n || n.length === 0) && r.addIssue({
|
|
7582
7616
|
code: "custom",
|
|
@@ -7584,7 +7618,7 @@ function Tp(e, t) {
|
|
|
7584
7618
|
});
|
|
7585
7619
|
});
|
|
7586
7620
|
}
|
|
7587
|
-
function
|
|
7621
|
+
function Fp(e, t) {
|
|
7588
7622
|
return ai().optional().superRefine((n, r) => {
|
|
7589
7623
|
e && !n && r.addIssue({
|
|
7590
7624
|
code: "custom",
|
|
@@ -7592,8 +7626,8 @@ function Ep(e, t) {
|
|
|
7592
7626
|
});
|
|
7593
7627
|
});
|
|
7594
7628
|
}
|
|
7595
|
-
var
|
|
7596
|
-
function
|
|
7629
|
+
var Ip = Pp;
|
|
7630
|
+
function Lp(e, t) {
|
|
7597
7631
|
return hr().optional().superRefine((n, r) => {
|
|
7598
7632
|
e && !n && r.addIssue({
|
|
7599
7633
|
code: "custom",
|
|
@@ -7601,14 +7635,14 @@ function Op(e, t) {
|
|
|
7601
7635
|
});
|
|
7602
7636
|
});
|
|
7603
7637
|
}
|
|
7604
|
-
function
|
|
7638
|
+
function Rp(e, t) {
|
|
7605
7639
|
let n = t?.[e.id];
|
|
7606
7640
|
if (n) return n.value;
|
|
7607
7641
|
if (e.type === "multi-select" || e.type === "dropdown-multi") return [];
|
|
7608
7642
|
let r = e;
|
|
7609
7643
|
return r.value !== void 0 && r.value !== null ? r.value : null;
|
|
7610
7644
|
}
|
|
7611
|
-
function
|
|
7645
|
+
function zp(e) {
|
|
7612
7646
|
let t = [];
|
|
7613
7647
|
for (let n of e) if (n.type === "section") for (let e of n.section.questions ?? []) t.push({
|
|
7614
7648
|
id: e.id,
|
|
@@ -7624,10 +7658,10 @@ function Ap(e) {
|
|
|
7624
7658
|
});
|
|
7625
7659
|
return t;
|
|
7626
7660
|
}
|
|
7627
|
-
var
|
|
7628
|
-
e(n), t?.(
|
|
7661
|
+
var Bp = (e) => e != null && e !== "", Vp = (e, t) => (n) => {
|
|
7662
|
+
e(n), t?.(Bp(n));
|
|
7629
7663
|
};
|
|
7630
|
-
function
|
|
7664
|
+
function Hp({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r, formUseUpload: a, datasets: o, onSingleAnswerChange: s }) {
|
|
7631
7665
|
let c = e.title ?? "", l = {
|
|
7632
7666
|
label: c,
|
|
7633
7667
|
section: n
|
|
@@ -7647,10 +7681,10 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7647
7681
|
placeholder: t("surveyFormBuilder.answer.textPlaceholder"),
|
|
7648
7682
|
disabled: i
|
|
7649
7683
|
};
|
|
7650
|
-
return Sr(
|
|
7684
|
+
return Sr(jp(!!e.required, t), {
|
|
7651
7685
|
...l,
|
|
7652
7686
|
fieldType: "custom",
|
|
7653
|
-
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(
|
|
7687
|
+
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Nf, {
|
|
7654
7688
|
...u,
|
|
7655
7689
|
children: /* @__PURE__ */ X("div", {
|
|
7656
7690
|
className: "px-0.5",
|
|
@@ -7675,10 +7709,10 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7675
7709
|
rows: 4,
|
|
7676
7710
|
disabled: i
|
|
7677
7711
|
};
|
|
7678
|
-
return Sr(
|
|
7712
|
+
return Sr(jp(!!e.required, t), {
|
|
7679
7713
|
...l,
|
|
7680
7714
|
fieldType: "custom",
|
|
7681
|
-
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(
|
|
7715
|
+
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Nf, {
|
|
7682
7716
|
...u,
|
|
7683
7717
|
children: /* @__PURE__ */ X("div", {
|
|
7684
7718
|
className: "px-0.5",
|
|
@@ -7702,10 +7736,10 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7702
7736
|
placeholder: t("surveyFormBuilder.answer.numericPlaceholder"),
|
|
7703
7737
|
disabled: i
|
|
7704
7738
|
};
|
|
7705
|
-
return Sr(
|
|
7739
|
+
return Sr(Np(!!e.required, t), {
|
|
7706
7740
|
...l,
|
|
7707
7741
|
fieldType: "custom",
|
|
7708
|
-
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(
|
|
7742
|
+
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Nf, {
|
|
7709
7743
|
...u,
|
|
7710
7744
|
children: /* @__PURE__ */ X("div", {
|
|
7711
7745
|
className: "px-0.5",
|
|
@@ -7730,10 +7764,10 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7730
7764
|
placeholder: t("surveyFormBuilder.answer.linkPlaceholder"),
|
|
7731
7765
|
disabled: i
|
|
7732
7766
|
};
|
|
7733
|
-
return Sr(
|
|
7767
|
+
return Sr(Mp(!!e.required, t), {
|
|
7734
7768
|
...l,
|
|
7735
7769
|
fieldType: "custom",
|
|
7736
|
-
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(
|
|
7770
|
+
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Nf, {
|
|
7737
7771
|
...u,
|
|
7738
7772
|
children: /* @__PURE__ */ X("div", {
|
|
7739
7773
|
className: "px-0.5",
|
|
@@ -7757,10 +7791,10 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7757
7791
|
clearable: !e.required,
|
|
7758
7792
|
disabled: i
|
|
7759
7793
|
};
|
|
7760
|
-
return Sr(
|
|
7794
|
+
return Sr(Fp(!!e.required, t), {
|
|
7761
7795
|
...l,
|
|
7762
7796
|
fieldType: "custom",
|
|
7763
|
-
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(
|
|
7797
|
+
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Nf, {
|
|
7764
7798
|
...u,
|
|
7765
7799
|
children: /* @__PURE__ */ X("div", {
|
|
7766
7800
|
className: "px-0.5",
|
|
@@ -7793,7 +7827,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7793
7827
|
showSearchBox: r,
|
|
7794
7828
|
searchBoxPlaceholder: e.searchBoxPlaceholder
|
|
7795
7829
|
};
|
|
7796
|
-
return Sr(
|
|
7830
|
+
return Sr(jp(!!e.required, t), {
|
|
7797
7831
|
...l,
|
|
7798
7832
|
fieldType: "custom",
|
|
7799
7833
|
render: ({ value: t, onChange: r, onBlur: i, error: o }) => {
|
|
@@ -7808,7 +7842,7 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7808
7842
|
}
|
|
7809
7843
|
}
|
|
7810
7844
|
} : a;
|
|
7811
|
-
return /* @__PURE__ */ X(
|
|
7845
|
+
return /* @__PURE__ */ X(Nf, {
|
|
7812
7846
|
...u,
|
|
7813
7847
|
children: /* @__PURE__ */ X("div", {
|
|
7814
7848
|
className: "flex flex-col items-start px-0.5 [&>div]:w-full",
|
|
@@ -7842,10 +7876,10 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7842
7876
|
showSearchBox: r,
|
|
7843
7877
|
searchBoxPlaceholder: e.searchBoxPlaceholder
|
|
7844
7878
|
};
|
|
7845
|
-
return Sr(
|
|
7879
|
+
return Sr(Pp(!!e.required, t), {
|
|
7846
7880
|
...l,
|
|
7847
7881
|
fieldType: "custom",
|
|
7848
|
-
render: ({ value: e, onChange: t, onBlur: n, error: r }) => /* @__PURE__ */ X(
|
|
7882
|
+
render: ({ value: e, onChange: t, onBlur: n, error: r }) => /* @__PURE__ */ X(Nf, {
|
|
7849
7883
|
...u,
|
|
7850
7884
|
children: /* @__PURE__ */ X("div", {
|
|
7851
7885
|
className: "flex flex-col items-start px-0.5 [&>div]:w-full",
|
|
@@ -7869,15 +7903,15 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7869
7903
|
disabled: i,
|
|
7870
7904
|
showAnswerValidation: r
|
|
7871
7905
|
};
|
|
7872
|
-
return Sr(
|
|
7906
|
+
return Sr(jp(!!e.required, t), {
|
|
7873
7907
|
...l,
|
|
7874
7908
|
fieldType: "custom",
|
|
7875
7909
|
fieldConfig: n,
|
|
7876
|
-
render: ({ value: e, onChange: t, onBlur: n, config: r }) => /* @__PURE__ */ X(
|
|
7910
|
+
render: ({ value: e, onChange: t, onBlur: n, config: r }) => /* @__PURE__ */ X(Nf, {
|
|
7877
7911
|
...u,
|
|
7878
|
-
children: /* @__PURE__ */ X(
|
|
7912
|
+
children: /* @__PURE__ */ X(Op, {
|
|
7879
7913
|
value: e,
|
|
7880
|
-
onChange:
|
|
7914
|
+
onChange: Vp(t, s),
|
|
7881
7915
|
onBlur: n,
|
|
7882
7916
|
config: r
|
|
7883
7917
|
})
|
|
@@ -7892,13 +7926,13 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7892
7926
|
disabled: i,
|
|
7893
7927
|
showAnswerValidation: r
|
|
7894
7928
|
};
|
|
7895
|
-
return Sr(
|
|
7929
|
+
return Sr(Pp(!!e.required, t), {
|
|
7896
7930
|
...l,
|
|
7897
7931
|
fieldType: "custom",
|
|
7898
7932
|
fieldConfig: n,
|
|
7899
|
-
render: ({ value: e, onChange: t, onBlur: n, config: r }) => /* @__PURE__ */ X(
|
|
7933
|
+
render: ({ value: e, onChange: t, onBlur: n, config: r }) => /* @__PURE__ */ X(Nf, {
|
|
7900
7934
|
...u,
|
|
7901
|
-
children: /* @__PURE__ */ X(
|
|
7935
|
+
children: /* @__PURE__ */ X(Op, {
|
|
7902
7936
|
value: e,
|
|
7903
7937
|
onChange: t,
|
|
7904
7938
|
onBlur: n,
|
|
@@ -7914,15 +7948,15 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7914
7948
|
maxLabel: n.maxLabel,
|
|
7915
7949
|
disabled: i
|
|
7916
7950
|
};
|
|
7917
|
-
return Sr(
|
|
7951
|
+
return Sr(Np(!!e.required, t), {
|
|
7918
7952
|
...l,
|
|
7919
7953
|
fieldType: "custom",
|
|
7920
7954
|
fieldConfig: r,
|
|
7921
|
-
render: ({ value: e, onChange: t, onBlur: n, config: r }) => /* @__PURE__ */ X(
|
|
7955
|
+
render: ({ value: e, onChange: t, onBlur: n, config: r }) => /* @__PURE__ */ X(Nf, {
|
|
7922
7956
|
...u,
|
|
7923
|
-
children: /* @__PURE__ */ X(
|
|
7957
|
+
children: /* @__PURE__ */ X(Ep, {
|
|
7924
7958
|
value: e,
|
|
7925
|
-
onChange:
|
|
7959
|
+
onChange: Vp(t, s),
|
|
7926
7960
|
onBlur: n,
|
|
7927
7961
|
config: r
|
|
7928
7962
|
})
|
|
@@ -7935,15 +7969,15 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7935
7969
|
type: "file",
|
|
7936
7970
|
label: c,
|
|
7937
7971
|
multiple: !0,
|
|
7938
|
-
accept: n.accept ??
|
|
7972
|
+
accept: n.accept ?? Rf,
|
|
7939
7973
|
maxSizeMB: n.maxSizeMB,
|
|
7940
|
-
useUpload: r ??
|
|
7974
|
+
useUpload: r ?? Ap,
|
|
7941
7975
|
disabled: i || !r
|
|
7942
7976
|
};
|
|
7943
|
-
return Sr(
|
|
7977
|
+
return Sr(Ip(!!e.required, t), {
|
|
7944
7978
|
...l,
|
|
7945
7979
|
fieldType: "custom",
|
|
7946
|
-
render: ({ value: e, onChange: t, onBlur: n, error: r }) => /* @__PURE__ */ X(
|
|
7980
|
+
render: ({ value: e, onChange: t, onBlur: n, error: r }) => /* @__PURE__ */ X(Nf, {
|
|
7947
7981
|
...u,
|
|
7948
7982
|
children: /* @__PURE__ */ X("div", {
|
|
7949
7983
|
className: "px-0.5",
|
|
@@ -7966,10 +8000,10 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7966
8000
|
label: n.label || c,
|
|
7967
8001
|
disabled: i
|
|
7968
8002
|
};
|
|
7969
|
-
return Sr(
|
|
8003
|
+
return Sr(Lp(!!e.required, t), {
|
|
7970
8004
|
...l,
|
|
7971
8005
|
fieldType: "custom",
|
|
7972
|
-
render: ({ value: e, onChange: t, onBlur: n, error: i }) => /* @__PURE__ */ X(
|
|
8006
|
+
render: ({ value: e, onChange: t, onBlur: n, error: i }) => /* @__PURE__ */ X(Nf, {
|
|
7973
8007
|
...u,
|
|
7974
8008
|
children: /* @__PURE__ */ X("div", {
|
|
7975
8009
|
className: "px-0.5",
|
|
@@ -7992,12 +8026,12 @@ function Np({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
7992
8026
|
});
|
|
7993
8027
|
}
|
|
7994
8028
|
}
|
|
7995
|
-
var
|
|
7996
|
-
function
|
|
8029
|
+
var Up = "id_", Wp = (e) => `${Up}${e}`, Gp = (e) => e.slice(3);
|
|
8030
|
+
function Kp({ elements: e, mode: t, t: n, defaultValues: r, currentQuestionId: i, accumulatedValues: a, previewMode: o = !1, disableFields: s = o, useUpload: c, datasets: l, onSingleAnswerChange: u }) {
|
|
7997
8031
|
return K(() => {
|
|
7998
|
-
let d = {}, f = {}, p = {}, m =
|
|
8032
|
+
let d = {}, f = {}, p = {}, m = zp(e), h = t === "stepped";
|
|
7999
8033
|
for (let m of e) if (m.type === "section") {
|
|
8000
|
-
let e = m.section, g =
|
|
8034
|
+
let e = m.section, g = Wp(e.id);
|
|
8001
8035
|
t === "all-questions" && (p[g] = {
|
|
8002
8036
|
title: e.title ?? "",
|
|
8003
8037
|
description: e.description,
|
|
@@ -8005,8 +8039,8 @@ function Lp({ elements: e, mode: t, t: n, defaultValues: r, currentQuestionId: i
|
|
|
8005
8039
|
});
|
|
8006
8040
|
for (let p of e.questions ?? []) {
|
|
8007
8041
|
if (h && i && p.id !== i) continue;
|
|
8008
|
-
let e =
|
|
8009
|
-
d[e] =
|
|
8042
|
+
let e = Wp(p.id);
|
|
8043
|
+
d[e] = Hp({
|
|
8010
8044
|
q: p,
|
|
8011
8045
|
t: n,
|
|
8012
8046
|
sectionId: t === "all-questions" ? g : void 0,
|
|
@@ -8015,13 +8049,13 @@ function Lp({ elements: e, mode: t, t: n, defaultValues: r, currentQuestionId: i
|
|
|
8015
8049
|
formUseUpload: c,
|
|
8016
8050
|
datasets: l,
|
|
8017
8051
|
onSingleAnswerChange: u
|
|
8018
|
-
}), f[e] = a?.[e] ??
|
|
8052
|
+
}), f[e] = a?.[e] ?? Rp(p, r);
|
|
8019
8053
|
}
|
|
8020
8054
|
} else {
|
|
8021
8055
|
let e = m.question;
|
|
8022
8056
|
if (h && i && e.id !== i) continue;
|
|
8023
|
-
let t =
|
|
8024
|
-
d[t] =
|
|
8057
|
+
let t = Wp(e.id);
|
|
8058
|
+
d[t] = Hp({
|
|
8025
8059
|
q: e,
|
|
8026
8060
|
t: n,
|
|
8027
8061
|
previewMode: o,
|
|
@@ -8029,7 +8063,7 @@ function Lp({ elements: e, mode: t, t: n, defaultValues: r, currentQuestionId: i
|
|
|
8029
8063
|
formUseUpload: c,
|
|
8030
8064
|
datasets: l,
|
|
8031
8065
|
onSingleAnswerChange: u
|
|
8032
|
-
}), f[t] = a?.[t] ??
|
|
8066
|
+
}), f[t] = a?.[t] ?? Rp(e, r);
|
|
8033
8067
|
}
|
|
8034
8068
|
return {
|
|
8035
8069
|
schema: ri(d),
|
|
@@ -8052,39 +8086,39 @@ function Lp({ elements: e, mode: t, t: n, defaultValues: r, currentQuestionId: i
|
|
|
8052
8086
|
}
|
|
8053
8087
|
//#endregion
|
|
8054
8088
|
//#region src/domains/talent/surveys/surveys/SurveyAnsweringForm/SurveyAnsweringForm.tsx
|
|
8055
|
-
var
|
|
8056
|
-
function
|
|
8089
|
+
var qp = () => {}, Jp = 400;
|
|
8090
|
+
function Yp(e) {
|
|
8057
8091
|
let t = {};
|
|
8058
|
-
for (let [n, r] of Object.entries(e)) t[
|
|
8092
|
+
for (let [n, r] of Object.entries(e)) t[Gp(n)] = r === void 0 ? null : r;
|
|
8059
8093
|
return t;
|
|
8060
8094
|
}
|
|
8061
|
-
function
|
|
8095
|
+
function Xp(e) {
|
|
8062
8096
|
if (!e) return;
|
|
8063
8097
|
let t = {};
|
|
8064
|
-
for (let [n, r] of Object.entries(e)) t[n === "root" ? n :
|
|
8098
|
+
for (let [n, r] of Object.entries(e)) t[n === "root" ? n : Wp(n)] = r;
|
|
8065
8099
|
return t;
|
|
8066
8100
|
}
|
|
8067
|
-
function
|
|
8101
|
+
function Zp(e, t) {
|
|
8068
8102
|
let n = {};
|
|
8069
8103
|
for (let r of e) {
|
|
8070
8104
|
let e = r.type === "section" ? r.section.questions ?? [] : [r.question];
|
|
8071
|
-
for (let r of e) n[
|
|
8105
|
+
for (let r of e) n[Wp(r.id)] = Rp(r, t);
|
|
8072
8106
|
}
|
|
8073
8107
|
return n;
|
|
8074
8108
|
}
|
|
8075
|
-
function
|
|
8076
|
-
return e.inline ? /* @__PURE__ */ X(
|
|
8109
|
+
function Qp(e) {
|
|
8110
|
+
return e.inline ? /* @__PURE__ */ X(em, { ...e }) : /* @__PURE__ */ X($p, { ...e });
|
|
8077
8111
|
}
|
|
8078
|
-
function
|
|
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(() =>
|
|
8112
|
+
function $p({ 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 }) {
|
|
8113
|
+
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(() => zp(e), [e]), N = Tp(M), P = M.length > 0, F = {
|
|
8080
8114
|
title: m?.empty?.title ?? b("surveyAnsweringForm.labels.empty.title"),
|
|
8081
8115
|
description: m?.empty?.description ?? b("surveyAnsweringForm.labels.empty.description"),
|
|
8082
8116
|
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(
|
|
8117
|
+
}, 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(qp), ae = W(() => {
|
|
8084
8118
|
clearTimeout(ne.current);
|
|
8085
8119
|
}, []), oe = W((e) => {
|
|
8086
|
-
ae(), e && (ne.current = setTimeout(() => ie.current(),
|
|
8087
|
-
}, [ae]), { schema: se, defaultValues: ce, sections: le } =
|
|
8120
|
+
ae(), e && (ne.current = setTimeout(() => ie.current(), Jp));
|
|
8121
|
+
}, [ae]), { schema: se, defaultValues: ce, sections: le } = Kp({
|
|
8088
8122
|
elements: e,
|
|
8089
8123
|
mode: n,
|
|
8090
8124
|
t: b,
|
|
@@ -8105,7 +8139,7 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8105
8139
|
message: e.message
|
|
8106
8140
|
}) : {
|
|
8107
8141
|
success: !1,
|
|
8108
|
-
errors:
|
|
8142
|
+
errors: Xp(e.errors)
|
|
8109
8143
|
}, [pe]), he = W(async (e) => {
|
|
8110
8144
|
if (h) return { success: !0 };
|
|
8111
8145
|
if (!t) throw Error("onSubmit is required when preview is false");
|
|
@@ -8113,7 +8147,7 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8113
8147
|
...j.current,
|
|
8114
8148
|
...e
|
|
8115
8149
|
}, N.goToNext(), { success: !0 };
|
|
8116
|
-
let n =
|
|
8150
|
+
let n = Yp(I ? {
|
|
8117
8151
|
...j.current,
|
|
8118
8152
|
...e
|
|
8119
8153
|
} : e);
|
|
@@ -8144,11 +8178,11 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8144
8178
|
}, [D, N.goToPrevious]), ye = W(async () => {
|
|
8145
8179
|
if (!v) return;
|
|
8146
8180
|
let t = {
|
|
8147
|
-
...
|
|
8181
|
+
...Zp(e, d),
|
|
8148
8182
|
...j.current,
|
|
8149
8183
|
...D.current?.getValues()
|
|
8150
8184
|
};
|
|
8151
|
-
S(!0), await Promise.resolve().then(() => v.onSave(
|
|
8185
|
+
S(!0), await Promise.resolve().then(() => v.onSave(Yp(t))).catch((e) => {
|
|
8152
8186
|
console.warn("SurveyAnsweringForm: saveDraft.onSave failed", e);
|
|
8153
8187
|
}).finally(() => S(!1));
|
|
8154
8188
|
}, [
|
|
@@ -8158,7 +8192,7 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8158
8192
|
D
|
|
8159
8193
|
]), be = I && !N.isLastStep && !p && !ee, xe = te ? N.goToNext : _e;
|
|
8160
8194
|
G(() => {
|
|
8161
|
-
ie.current = be ? xe :
|
|
8195
|
+
ie.current = be ? xe : qp;
|
|
8162
8196
|
}, [be, xe]), G(() => () => ae(), [
|
|
8163
8197
|
N.currentStep,
|
|
8164
8198
|
o,
|
|
@@ -8174,7 +8208,7 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8174
8208
|
icon: bi
|
|
8175
8209
|
} : {
|
|
8176
8210
|
label: b("surveyAnsweringForm.actions.submit"),
|
|
8177
|
-
onClick:
|
|
8211
|
+
onClick: qp,
|
|
8178
8212
|
disabled: !0
|
|
8179
8213
|
} : I && !N.isLastStep ? {
|
|
8180
8214
|
label: b("surveyAnsweringForm.actions.next"),
|
|
@@ -8210,14 +8244,14 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8210
8244
|
children: /* @__PURE__ */ X(rf, {
|
|
8211
8245
|
answering: !0,
|
|
8212
8246
|
elements: e,
|
|
8213
|
-
onChange:
|
|
8247
|
+
onChange: qp,
|
|
8214
8248
|
datasets: _,
|
|
8215
8249
|
children: /* @__PURE__ */ Z("div", {
|
|
8216
8250
|
className: B("relative flex h-full min-h-full flex-col @container", I && !T && "min-h-[600px]"),
|
|
8217
8251
|
children: [
|
|
8218
|
-
Ee ? /* @__PURE__ */ X(
|
|
8252
|
+
Ee ? /* @__PURE__ */ X(lp, {
|
|
8219
8253
|
elements: e,
|
|
8220
|
-
onChange:
|
|
8254
|
+
onChange: qp,
|
|
8221
8255
|
answering: !0
|
|
8222
8256
|
}) : null,
|
|
8223
8257
|
De ? /* @__PURE__ */ X("div", {
|
|
@@ -8239,7 +8273,7 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8239
8273
|
...a
|
|
8240
8274
|
})
|
|
8241
8275
|
}),
|
|
8242
|
-
p ? X(n === "stepped" ?
|
|
8276
|
+
p ? X(n === "stepped" ? wp : Cp, {}) : P ? null : /* @__PURE__ */ X(io, {
|
|
8243
8277
|
display: "flex",
|
|
8244
8278
|
flexDirection: "column",
|
|
8245
8279
|
height: "full",
|
|
@@ -8259,7 +8293,7 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8259
8293
|
children: N.currentQuestion?.sectionTitle
|
|
8260
8294
|
}), N.currentQuestion?.sectionDescription ? /* @__PURE__ */ X("p", {
|
|
8261
8295
|
className: "whitespace-pre-line text-f1-foreground-secondary",
|
|
8262
|
-
children: N.currentQuestion
|
|
8296
|
+
children: /* @__PURE__ */ X(jf, { text: N.currentQuestion.sectionDescription })
|
|
8263
8297
|
}) : null]
|
|
8264
8298
|
}) : null,
|
|
8265
8299
|
P && !p ? /* @__PURE__ */ X(re, {
|
|
@@ -8279,12 +8313,12 @@ function Wp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8279
8313
|
})
|
|
8280
8314
|
});
|
|
8281
8315
|
}
|
|
8282
|
-
function
|
|
8283
|
-
let { t: u } = z(), d = K(() =>
|
|
8316
|
+
function em({ elements: e, title: t, description: n, resourceHeader: r, defaultValues: i, loading: a = !1, labels: o, useUpload: s, datasets: c, hideResourceHeader: l = !1 }) {
|
|
8317
|
+
let { t: u } = z(), d = K(() => zp(e), [e]).length > 0, f = {
|
|
8284
8318
|
title: o?.empty?.title ?? u("surveyAnsweringForm.labels.empty.title"),
|
|
8285
8319
|
description: o?.empty?.description ?? u("surveyAnsweringForm.labels.empty.description"),
|
|
8286
8320
|
emoji: o?.empty?.emoji ?? u("surveyAnsweringForm.labels.empty.emoji")
|
|
8287
|
-
}, { schema: p, defaultValues: m, sections: h } =
|
|
8321
|
+
}, { schema: p, defaultValues: m, sections: h } = Kp({
|
|
8288
8322
|
elements: e,
|
|
8289
8323
|
mode: "all-questions",
|
|
8290
8324
|
t: u,
|
|
@@ -8297,7 +8331,7 @@ function Gp({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
8297
8331
|
return /* @__PURE__ */ X(rf, {
|
|
8298
8332
|
answering: !0,
|
|
8299
8333
|
elements: e,
|
|
8300
|
-
onChange:
|
|
8334
|
+
onChange: qp,
|
|
8301
8335
|
datasets: c,
|
|
8302
8336
|
children: /* @__PURE__ */ Z("div", {
|
|
8303
8337
|
className: "mx-auto flex w-full max-w-3xl flex-col",
|
|
@@ -8308,7 +8342,7 @@ function Gp({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
8308
8342
|
description: n,
|
|
8309
8343
|
...r
|
|
8310
8344
|
})
|
|
8311
|
-
}), a ? /* @__PURE__ */ X(
|
|
8345
|
+
}), a ? /* @__PURE__ */ X(Cp, {}) : d ? /* @__PURE__ */ X(re, {
|
|
8312
8346
|
name: "survey-answering-inline",
|
|
8313
8347
|
schema: p,
|
|
8314
8348
|
defaultValues: m,
|
|
@@ -8335,7 +8369,7 @@ function Gp({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
8335
8369
|
}
|
|
8336
8370
|
//#endregion
|
|
8337
8371
|
//#region src/domains/talent/surveys/surveys/SurveySampleQuestion/SurveySampleQuestion.tsx
|
|
8338
|
-
function
|
|
8372
|
+
function tm(e) {
|
|
8339
8373
|
return /* @__PURE__ */ Z(io, {
|
|
8340
8374
|
display: "flex",
|
|
8341
8375
|
flexDirection: "column",
|
|
@@ -8346,14 +8380,14 @@ function Kp(e) {
|
|
|
8346
8380
|
children: [/* @__PURE__ */ X("p", {
|
|
8347
8381
|
className: "m-0 text-sm font-semibold text-f1-foreground",
|
|
8348
8382
|
children: e.question
|
|
8349
|
-
}), e.type === "rating" ? /* @__PURE__ */ X(
|
|
8383
|
+
}), e.type === "rating" ? /* @__PURE__ */ X(nm, {
|
|
8350
8384
|
steps: e.steps ?? 5,
|
|
8351
8385
|
minLabel: e.minLabel,
|
|
8352
8386
|
maxLabel: e.maxLabel
|
|
8353
|
-
}) : /* @__PURE__ */ X(
|
|
8387
|
+
}) : /* @__PURE__ */ X(rm, { options: e.options })]
|
|
8354
8388
|
});
|
|
8355
8389
|
}
|
|
8356
|
-
function
|
|
8390
|
+
function nm({ steps: e, minLabel: t, maxLabel: n }) {
|
|
8357
8391
|
return /* @__PURE__ */ Z(io, {
|
|
8358
8392
|
display: "flex",
|
|
8359
8393
|
flexDirection: "column",
|
|
@@ -8382,7 +8416,7 @@ function qp({ steps: e, minLabel: t, maxLabel: n }) {
|
|
|
8382
8416
|
}) : null]
|
|
8383
8417
|
});
|
|
8384
8418
|
}
|
|
8385
|
-
function
|
|
8419
|
+
function rm({ options: e }) {
|
|
8386
8420
|
return /* @__PURE__ */ X(io, {
|
|
8387
8421
|
display: "flex",
|
|
8388
8422
|
flexDirection: "column",
|
|
@@ -8411,17 +8445,17 @@ function Jp({ options: e }) {
|
|
|
8411
8445
|
}
|
|
8412
8446
|
//#endregion
|
|
8413
8447
|
//#region src/domains/growth/upselling/UpsellingKit/ProductBlankslate/ProductBlankslate.tsx
|
|
8414
|
-
var
|
|
8448
|
+
var im = ({ benefits: e }) => /* @__PURE__ */ X("div", {
|
|
8415
8449
|
className: "flex flex-col gap-2",
|
|
8416
|
-
children: e.map((e, t) => /* @__PURE__ */ X(
|
|
8417
|
-
}),
|
|
8450
|
+
children: e.map((e, t) => /* @__PURE__ */ X(am, { text: e }, t))
|
|
8451
|
+
}), am = ({ text: e }) => /* @__PURE__ */ Z("div", {
|
|
8418
8452
|
className: "flex flex-row items-start gap-2",
|
|
8419
8453
|
children: [/* @__PURE__ */ X(H, {
|
|
8420
8454
|
icon: Us,
|
|
8421
8455
|
size: "md",
|
|
8422
8456
|
className: "text-f1-icon-positive"
|
|
8423
8457
|
}), /* @__PURE__ */ X("span", { children: e })]
|
|
8424
|
-
}),
|
|
8458
|
+
}), om = xc(({ title: e, image: t, benefits: n, actions: r, withShadow: i = !0, module: a, moduleName: o, tag: s, promoTag: c }, l) => /* @__PURE__ */ Z("div", {
|
|
8425
8459
|
ref: l,
|
|
8426
8460
|
className: B("bg-white flex flex-row rounded-xl border border-f1-border-secondary", i && "shadow-md"),
|
|
8427
8461
|
children: [/* @__PURE__ */ X("div", {
|
|
@@ -8460,18 +8494,18 @@ var Yp = ({ benefits: e }) => /* @__PURE__ */ X("div", {
|
|
|
8460
8494
|
children: e
|
|
8461
8495
|
})
|
|
8462
8496
|
]
|
|
8463
|
-
}), /* @__PURE__ */ X(
|
|
8497
|
+
}), /* @__PURE__ */ X(im, { benefits: n })]
|
|
8464
8498
|
}), r ? /* @__PURE__ */ X("div", {
|
|
8465
8499
|
className: "flex gap-3",
|
|
8466
8500
|
children: r
|
|
8467
8501
|
}) : null]
|
|
8468
8502
|
})]
|
|
8469
8503
|
}));
|
|
8470
|
-
|
|
8471
|
-
var
|
|
8504
|
+
om.displayName = "ProductBlankslate";
|
|
8505
|
+
var sm = R(om);
|
|
8472
8506
|
//#endregion
|
|
8473
8507
|
//#region src/domains/growth/upselling/UpsellingKit/ProductModal/components/CustomModal.tsx
|
|
8474
|
-
function
|
|
8508
|
+
function cm({ isOpen: e, onClose: t, title: n, children: r, module: i, portalContainer: a }) {
|
|
8475
8509
|
let [o, s] = J(e);
|
|
8476
8510
|
return G(() => {
|
|
8477
8511
|
s(e);
|
|
@@ -8511,7 +8545,7 @@ function $p({ isOpen: e, onClose: t, title: n, children: r, module: i, portalCon
|
|
|
8511
8545
|
}
|
|
8512
8546
|
//#endregion
|
|
8513
8547
|
//#region src/domains/growth/upselling/UpsellingKit/ProductModal/ProductModal.tsx
|
|
8514
|
-
function
|
|
8548
|
+
function lm({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessage: a, successMessage: o, loadingState: s, nextSteps: c, closeLabel: l, primaryAction: u, modalTitle: d, modalModule: f, secondaryAction: p, portalContainer: m, tag: h, promoTag: g, showResponseDialog: _ = !0 }) {
|
|
8515
8549
|
let [v, y] = J(e), [b, x] = J(null), [S, C] = J(!1), w = async () => {
|
|
8516
8550
|
if (u?.onClick) {
|
|
8517
8551
|
C(!0);
|
|
@@ -8526,7 +8560,7 @@ function em({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessa
|
|
|
8526
8560
|
}, T = () => {
|
|
8527
8561
|
y(!1), t?.();
|
|
8528
8562
|
}, E = S;
|
|
8529
|
-
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
8563
|
+
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(cm, {
|
|
8530
8564
|
isOpen: v,
|
|
8531
8565
|
onClose: T,
|
|
8532
8566
|
title: d,
|
|
@@ -8534,7 +8568,7 @@ function em({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessa
|
|
|
8534
8568
|
portalContainer: m,
|
|
8535
8569
|
children: /* @__PURE__ */ X("div", {
|
|
8536
8570
|
className: "pb-4 pl-4",
|
|
8537
|
-
children: /* @__PURE__ */ X(
|
|
8571
|
+
children: /* @__PURE__ */ X(sm, {
|
|
8538
8572
|
title: n,
|
|
8539
8573
|
image: r,
|
|
8540
8574
|
benefits: i,
|
|
@@ -8573,10 +8607,10 @@ function em({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessa
|
|
|
8573
8607
|
portalContainer: m
|
|
8574
8608
|
}) : null] });
|
|
8575
8609
|
}
|
|
8576
|
-
var
|
|
8610
|
+
var um = R(lm);
|
|
8577
8611
|
//#endregion
|
|
8578
8612
|
//#region src/domains/growth/upselling/UpsellingKit/ProductWidget/ProductWidget.tsx
|
|
8579
|
-
function
|
|
8613
|
+
function dm({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i, width: a, trackVisibility: o, actions: s, showConfirmation: c = !0 }) {
|
|
8580
8614
|
let [l, u] = J(!1), d = () => {
|
|
8581
8615
|
u(!0), r && r();
|
|
8582
8616
|
};
|
|
@@ -8637,7 +8671,7 @@ function nm({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
8637
8671
|
}) : null]
|
|
8638
8672
|
}) });
|
|
8639
8673
|
}
|
|
8640
|
-
var
|
|
8674
|
+
var fm = R(dm), pm = ({ onDismiss: e }) => {
|
|
8641
8675
|
let { actions: t } = z();
|
|
8642
8676
|
return /* @__PURE__ */ X(V, {
|
|
8643
8677
|
icon: oi,
|
|
@@ -8649,7 +8683,7 @@ var rm = R(nm), im = ({ onDismiss: e }) => {
|
|
|
8649
8683
|
type: "button"
|
|
8650
8684
|
});
|
|
8651
8685
|
};
|
|
8652
|
-
function
|
|
8686
|
+
function mm({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
8653
8687
|
return /* @__PURE__ */ X("div", {
|
|
8654
8688
|
className: "@container",
|
|
8655
8689
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -8694,13 +8728,13 @@ function am({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
|
8694
8728
|
})]
|
|
8695
8729
|
}), i ? /* @__PURE__ */ X("div", {
|
|
8696
8730
|
className: B("flex-shrink-0 self-start", !n && "@xs:self-center"),
|
|
8697
|
-
children: /* @__PURE__ */ X(
|
|
8731
|
+
children: /* @__PURE__ */ X(pm, { onDismiss: i })
|
|
8698
8732
|
}) : null]
|
|
8699
8733
|
})
|
|
8700
8734
|
})
|
|
8701
8735
|
});
|
|
8702
8736
|
}
|
|
8703
|
-
var
|
|
8737
|
+
var hm = R(mm), gm = xc(function({ primaryAction: e, secondaryAction: t, ...n }, r) {
|
|
8704
8738
|
let i = (e) => e.variant === "promote" ? /* @__PURE__ */ X(E, {
|
|
8705
8739
|
label: e.label,
|
|
8706
8740
|
onRequest: e.onClick,
|
|
@@ -8727,11 +8761,11 @@ var om = R(am), sm = xc(function({ primaryAction: e, secondaryAction: t, ...n },
|
|
|
8727
8761
|
children: [e?.variant === "promote" ? i(e) : null, t?.variant === "promote" ? i(t) : null]
|
|
8728
8762
|
});
|
|
8729
8763
|
});
|
|
8730
|
-
|
|
8731
|
-
var
|
|
8764
|
+
gm.displayName = "UpsellingBanner";
|
|
8765
|
+
var _m = R(gm);
|
|
8732
8766
|
//#endregion
|
|
8733
8767
|
//#region src/domains/growth/upselling/UpsellingKit/UpsellingPopover/UpsellingPopover.tsx
|
|
8734
|
-
function
|
|
8768
|
+
function vm({ 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
8769
|
let [_, v] = J(!1), [y, b] = J(null), [x, S] = J(null), C = (e) => {
|
|
8736
8770
|
t(e), h && h();
|
|
8737
8771
|
}, w = async (e) => {
|
|
@@ -8766,7 +8800,7 @@ function lm({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
8766
8800
|
side: o,
|
|
8767
8801
|
align: s,
|
|
8768
8802
|
className: "w-fit border-none bg-transparent p-2 shadow-none",
|
|
8769
|
-
children: /* @__PURE__ */ X(
|
|
8803
|
+
children: /* @__PURE__ */ X(fm, {
|
|
8770
8804
|
mediaUrl: l,
|
|
8771
8805
|
title: u,
|
|
8772
8806
|
description: d,
|
|
@@ -8789,7 +8823,7 @@ function lm({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
8789
8823
|
portalContainer: null
|
|
8790
8824
|
}) : null] });
|
|
8791
8825
|
}
|
|
8792
|
-
var
|
|
8826
|
+
var ym = R(vm), bm = ({ preview: e, moduleName: t, description: n, onAction: r, actionHref: i }) => {
|
|
8793
8827
|
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
8828
|
return /* @__PURE__ */ Z(Fr, {
|
|
8795
8829
|
className: "flex flex-col overflow-hidden",
|
|
@@ -8825,7 +8859,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8825
8859
|
})
|
|
8826
8860
|
})]
|
|
8827
8861
|
});
|
|
8828
|
-
},
|
|
8862
|
+
}, xm = ({ item: e, isExpanded: t, onToggle: n }) => /* @__PURE__ */ Z("div", {
|
|
8829
8863
|
className: B("flex flex-col rounded-lg px-3 -mx-3 transition-colors duration-200", t && "bg-f1-background-secondary"),
|
|
8830
8864
|
children: [/* @__PURE__ */ Z("button", {
|
|
8831
8865
|
type: "button",
|
|
@@ -8854,7 +8888,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8854
8888
|
children: e.answer
|
|
8855
8889
|
})
|
|
8856
8890
|
})]
|
|
8857
|
-
}),
|
|
8891
|
+
}), Sm = ({ headerIcon: e, items: t, defaultExpandedId: n, expandedId: r, onExpandedChange: i, allowMultiple: a = !1 }) => {
|
|
8858
8892
|
let o = z()?.ai?.growth?.faqCard?.title ?? "Questions before getting started", s = e ?? ji, [c, l] = J(() => new Set(n ? [n] : [])), u = r !== void 0, d = W((e) => u ? r === e : c.has(e), [
|
|
8859
8893
|
u,
|
|
8860
8894
|
r,
|
|
@@ -8887,14 +8921,14 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8887
8921
|
})]
|
|
8888
8922
|
}), /* @__PURE__ */ X(jr, {
|
|
8889
8923
|
className: "flex flex-col divide-y divide-f1-border p-0",
|
|
8890
|
-
children: t.map((e) => /* @__PURE__ */ X(
|
|
8924
|
+
children: t.map((e) => /* @__PURE__ */ X(xm, {
|
|
8891
8925
|
item: e,
|
|
8892
8926
|
isExpanded: d(e.id),
|
|
8893
8927
|
onToggle: f
|
|
8894
8928
|
}, e.id))
|
|
8895
8929
|
})]
|
|
8896
8930
|
});
|
|
8897
|
-
},
|
|
8931
|
+
}, Cm = ({ moduleName: e, description: t, onAction: n, actionHref: r, imageSrc: i }) => {
|
|
8898
8932
|
let a = z()?.ai?.growth?.moduleCard?.actionLabel ?? "Learn more";
|
|
8899
8933
|
return /* @__PURE__ */ Z(Fr, {
|
|
8900
8934
|
className: "flex flex-col overflow-hidden",
|
|
@@ -8936,7 +8970,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8936
8970
|
})
|
|
8937
8971
|
})]
|
|
8938
8972
|
});
|
|
8939
|
-
},
|
|
8973
|
+
}, wm = ({ onAction: e, actionHref: t }) => {
|
|
8940
8974
|
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
8975
|
return /* @__PURE__ */ Z(Fr, {
|
|
8942
8976
|
className: "flex flex-col overflow-hidden",
|
|
@@ -8972,7 +9006,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8972
9006
|
})
|
|
8973
9007
|
})]
|
|
8974
9008
|
});
|
|
8975
|
-
},
|
|
9009
|
+
}, Tm = ({ steps: e, onComplete: t, onSkip: n, sendAsMessage: r = !1, onSendMessage: i }) => {
|
|
8976
9010
|
let [a, o] = J(0), [s, c] = J({}), l = z(), u = e.length, d = e[a], f = s[a] ?? [], p = W((e, t) => {
|
|
8977
9011
|
c((n) => {
|
|
8978
9012
|
let r = n[a] ?? [], i = t ? [...r, e] : r.filter((t) => t !== e);
|
|
@@ -9077,7 +9111,7 @@ var um = R(lm), dm = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9077
9111
|
};
|
|
9078
9112
|
//#endregion
|
|
9079
9113
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/chartDataAdapter.ts
|
|
9080
|
-
function
|
|
9114
|
+
function Em(e) {
|
|
9081
9115
|
let t = e.categories ?? [], n = e.series;
|
|
9082
9116
|
if (n && !Array.isArray(n) && "data" in n) {
|
|
9083
9117
|
let e = n;
|
|
@@ -9097,8 +9131,8 @@ function _m(e) {
|
|
|
9097
9131
|
}))
|
|
9098
9132
|
};
|
|
9099
9133
|
}
|
|
9100
|
-
function
|
|
9101
|
-
if (Array.isArray(e.series)) return
|
|
9134
|
+
function Dm(e) {
|
|
9135
|
+
if (Array.isArray(e.series)) return Em(e);
|
|
9102
9136
|
let t = e.series;
|
|
9103
9137
|
return t?.data ? {
|
|
9104
9138
|
categories: t.data.map((e) => e.name),
|
|
@@ -9111,7 +9145,7 @@ function vm(e) {
|
|
|
9111
9145
|
series: []
|
|
9112
9146
|
};
|
|
9113
9147
|
}
|
|
9114
|
-
function
|
|
9148
|
+
function Om(e) {
|
|
9115
9149
|
let t = e.series;
|
|
9116
9150
|
return t?.data ? {
|
|
9117
9151
|
categories: t.data.map((e) => e.name),
|
|
@@ -9124,7 +9158,7 @@ function ym(e) {
|
|
|
9124
9158
|
series: []
|
|
9125
9159
|
};
|
|
9126
9160
|
}
|
|
9127
|
-
function
|
|
9161
|
+
function km(e) {
|
|
9128
9162
|
let t = e.indicators ?? [], n = Array.isArray(e.series) ? e.series : [];
|
|
9129
9163
|
return {
|
|
9130
9164
|
categories: t.map((e) => typeof e == "string" ? e : e.name),
|
|
@@ -9134,7 +9168,7 @@ function bm(e) {
|
|
|
9134
9168
|
}))
|
|
9135
9169
|
};
|
|
9136
9170
|
}
|
|
9137
|
-
function
|
|
9171
|
+
function Am(e) {
|
|
9138
9172
|
let t = e.series;
|
|
9139
9173
|
return {
|
|
9140
9174
|
categories: [t?.name ?? "Value"],
|
|
@@ -9144,7 +9178,7 @@ function xm(e) {
|
|
|
9144
9178
|
}]
|
|
9145
9179
|
};
|
|
9146
9180
|
}
|
|
9147
|
-
var
|
|
9181
|
+
var jm = new Set(Object.keys({
|
|
9148
9182
|
bar: !0,
|
|
9149
9183
|
line: !0,
|
|
9150
9184
|
funnel: !0,
|
|
@@ -9154,22 +9188,22 @@ var Sm = new Set(Object.keys({
|
|
|
9154
9188
|
heatmap: !0,
|
|
9155
9189
|
scatter: !0
|
|
9156
9190
|
}));
|
|
9157
|
-
function
|
|
9158
|
-
return e != null &&
|
|
9191
|
+
function Mm(e) {
|
|
9192
|
+
return e != null && jm.has(e.type);
|
|
9159
9193
|
}
|
|
9160
|
-
function
|
|
9194
|
+
function Nm(e) {
|
|
9161
9195
|
return Array.isArray(e) ? String(e[0]) : e.label ?? String(e.x);
|
|
9162
9196
|
}
|
|
9163
|
-
function
|
|
9197
|
+
function Pm(e) {
|
|
9164
9198
|
let t = e.scatterSeries ?? [], n = [], r = /* @__PURE__ */ new Set();
|
|
9165
9199
|
for (let e of t) for (let t of e.data) {
|
|
9166
|
-
let e =
|
|
9200
|
+
let e = Nm(t);
|
|
9167
9201
|
r.has(e) || (r.add(e), n.push(e));
|
|
9168
9202
|
}
|
|
9169
9203
|
return {
|
|
9170
9204
|
categories: n,
|
|
9171
9205
|
series: t.map((e) => {
|
|
9172
|
-
let t = new Map(e.data.map((e) => [
|
|
9206
|
+
let t = new Map(e.data.map((e) => [Nm(e), Array.isArray(e) ? e[1] : e.y]));
|
|
9173
9207
|
return {
|
|
9174
9208
|
name: e.name,
|
|
9175
9209
|
data: n.map((e) => t.get(e) ?? 0)
|
|
@@ -9177,7 +9211,7 @@ function Tm(e) {
|
|
|
9177
9211
|
})
|
|
9178
9212
|
};
|
|
9179
9213
|
}
|
|
9180
|
-
function
|
|
9214
|
+
function Fm(e) {
|
|
9181
9215
|
let t = e.xCategories ?? [], n = e.yCategories ?? [], r = e.data ?? [];
|
|
9182
9216
|
if (t.length === 0 || n.length === 0) return {
|
|
9183
9217
|
categories: [],
|
|
@@ -9193,22 +9227,22 @@ function Em(e) {
|
|
|
9193
9227
|
}))
|
|
9194
9228
|
};
|
|
9195
9229
|
}
|
|
9196
|
-
function
|
|
9230
|
+
function Im(e, t) {
|
|
9197
9231
|
return e.scatterSeries === void 0 ? e.xCategories?.length || e.yCategories?.length || e.data && Array.isArray(e.data) && e.data.length > 0 && Array.isArray(e.data[0]) ? "heatmap" : e.indicators?.length ? "radar" : e.series && !Array.isArray(e.series) && "value" in e.series && typeof e.series.value == "number" ? "gauge" : e.series && !Array.isArray(e.series) && "data" in e.series ? t === "pie" ? "pie" : "funnel" : "bar" : "scatter";
|
|
9198
9232
|
}
|
|
9199
|
-
function
|
|
9200
|
-
switch (t ??
|
|
9233
|
+
function Lm(e, t) {
|
|
9234
|
+
switch (t ?? Im(e)) {
|
|
9201
9235
|
case "bar":
|
|
9202
|
-
case "line": return
|
|
9203
|
-
case "funnel": return
|
|
9204
|
-
case "pie": return
|
|
9205
|
-
case "radar": return
|
|
9206
|
-
case "gauge": return
|
|
9207
|
-
case "heatmap": return
|
|
9208
|
-
case "scatter": return
|
|
9236
|
+
case "line": return Em(e);
|
|
9237
|
+
case "funnel": return Dm(e);
|
|
9238
|
+
case "pie": return Om(e);
|
|
9239
|
+
case "radar": return km(e);
|
|
9240
|
+
case "gauge": return Am(e);
|
|
9241
|
+
case "heatmap": return Fm(e);
|
|
9242
|
+
case "scatter": return Pm(e);
|
|
9209
9243
|
}
|
|
9210
9244
|
}
|
|
9211
|
-
function
|
|
9245
|
+
function Rm(e) {
|
|
9212
9246
|
return {
|
|
9213
9247
|
categories: e.categories,
|
|
9214
9248
|
series: e.series.map((e) => ({
|
|
@@ -9217,7 +9251,7 @@ function km(e) {
|
|
|
9217
9251
|
}))
|
|
9218
9252
|
};
|
|
9219
9253
|
}
|
|
9220
|
-
function
|
|
9254
|
+
function zm(e) {
|
|
9221
9255
|
let t = e.series[0];
|
|
9222
9256
|
return { series: {
|
|
9223
9257
|
name: t?.name ?? "Funnel",
|
|
@@ -9227,7 +9261,7 @@ function Am(e) {
|
|
|
9227
9261
|
}))
|
|
9228
9262
|
} };
|
|
9229
9263
|
}
|
|
9230
|
-
function
|
|
9264
|
+
function Bm(e) {
|
|
9231
9265
|
let t = e.series[0];
|
|
9232
9266
|
return { series: {
|
|
9233
9267
|
name: t?.name ?? "Distribution",
|
|
@@ -9237,7 +9271,7 @@ function jm(e) {
|
|
|
9237
9271
|
}))
|
|
9238
9272
|
} };
|
|
9239
9273
|
}
|
|
9240
|
-
function
|
|
9274
|
+
function Vm(e) {
|
|
9241
9275
|
let t = e.categories.map((t, n) => Math.max(...e.series.map((e) => e.data[n] ?? 0), 1));
|
|
9242
9276
|
return {
|
|
9243
9277
|
indicators: e.categories.map((e, n) => ({
|
|
@@ -9250,7 +9284,7 @@ function Mm(e) {
|
|
|
9250
9284
|
}))
|
|
9251
9285
|
};
|
|
9252
9286
|
}
|
|
9253
|
-
function
|
|
9287
|
+
function Hm(e) {
|
|
9254
9288
|
return { scatterSeries: e.series.map((t) => ({
|
|
9255
9289
|
name: t.name,
|
|
9256
9290
|
data: e.categories.map((e, n) => ({
|
|
@@ -9260,7 +9294,7 @@ function Nm(e) {
|
|
|
9260
9294
|
}))
|
|
9261
9295
|
})) };
|
|
9262
9296
|
}
|
|
9263
|
-
function
|
|
9297
|
+
function Um(e) {
|
|
9264
9298
|
return {
|
|
9265
9299
|
series: {
|
|
9266
9300
|
value: e.series[0]?.data[0] ?? 0,
|
|
@@ -9269,26 +9303,26 @@ function Pm(e) {
|
|
|
9269
9303
|
categories: void 0
|
|
9270
9304
|
};
|
|
9271
9305
|
}
|
|
9272
|
-
function
|
|
9306
|
+
function Wm(e, t) {
|
|
9273
9307
|
switch (t) {
|
|
9274
9308
|
case "bar":
|
|
9275
|
-
case "line": return
|
|
9276
|
-
case "funnel": return
|
|
9277
|
-
case "pie": return
|
|
9278
|
-
case "radar": return
|
|
9279
|
-
case "gauge": return
|
|
9309
|
+
case "line": return Rm(e);
|
|
9310
|
+
case "funnel": return zm(e);
|
|
9311
|
+
case "pie": return Bm(e);
|
|
9312
|
+
case "radar": return Vm(e);
|
|
9313
|
+
case "gauge": return Um(e);
|
|
9280
9314
|
case "heatmap": return {
|
|
9281
9315
|
xCategories: [],
|
|
9282
9316
|
yCategories: [],
|
|
9283
9317
|
data: []
|
|
9284
9318
|
};
|
|
9285
|
-
case "scatter": return
|
|
9319
|
+
case "scatter": return Hm(e);
|
|
9286
9320
|
}
|
|
9287
9321
|
}
|
|
9288
|
-
function
|
|
9322
|
+
function Gm(e) {
|
|
9289
9323
|
return e.series.some((e) => e.data.includes(null));
|
|
9290
9324
|
}
|
|
9291
|
-
function
|
|
9325
|
+
function Km(e) {
|
|
9292
9326
|
let t = /* @__PURE__ */ new Set();
|
|
9293
9327
|
switch (t.add("table"), t.add(e), e) {
|
|
9294
9328
|
case "bar":
|
|
@@ -9307,7 +9341,7 @@ function Lm(e) {
|
|
|
9307
9341
|
}
|
|
9308
9342
|
return t;
|
|
9309
9343
|
}
|
|
9310
|
-
function
|
|
9344
|
+
function qm(e) {
|
|
9311
9345
|
switch (e) {
|
|
9312
9346
|
case "bar": return {
|
|
9313
9347
|
type: "bar",
|
|
@@ -9346,19 +9380,19 @@ function Rm(e) {
|
|
|
9346
9380
|
}
|
|
9347
9381
|
//#endregion
|
|
9348
9382
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/chartDataToTabular.ts
|
|
9349
|
-
function
|
|
9383
|
+
function Jm(e, t) {
|
|
9350
9384
|
switch (e.type) {
|
|
9351
9385
|
case "bar":
|
|
9352
|
-
case "line": return
|
|
9353
|
-
case "funnel": return
|
|
9354
|
-
case "pie": return
|
|
9355
|
-
case "radar": return
|
|
9356
|
-
case "gauge": return
|
|
9357
|
-
case "heatmap": return
|
|
9358
|
-
case "scatter": return
|
|
9386
|
+
case "line": return Ym(t);
|
|
9387
|
+
case "funnel": return Xm(t);
|
|
9388
|
+
case "pie": return Zm(t);
|
|
9389
|
+
case "radar": return Qm(t);
|
|
9390
|
+
case "gauge": return $m(t);
|
|
9391
|
+
case "heatmap": return eh(t);
|
|
9392
|
+
case "scatter": return th(e, t);
|
|
9359
9393
|
}
|
|
9360
9394
|
}
|
|
9361
|
-
function
|
|
9395
|
+
function Ym(e) {
|
|
9362
9396
|
let t = e.categories ?? [], n = e.series, r = Array.isArray(n) ? n : [];
|
|
9363
9397
|
return {
|
|
9364
9398
|
columns: ["Category", ...r.map((e) => e.name)],
|
|
@@ -9372,7 +9406,7 @@ function Bm(e) {
|
|
|
9372
9406
|
})
|
|
9373
9407
|
};
|
|
9374
9408
|
}
|
|
9375
|
-
function
|
|
9409
|
+
function Xm(e) {
|
|
9376
9410
|
if (Array.isArray(e.series)) {
|
|
9377
9411
|
let t = e.series[0];
|
|
9378
9412
|
return t ? {
|
|
@@ -9394,7 +9428,7 @@ function Vm(e) {
|
|
|
9394
9428
|
}))
|
|
9395
9429
|
};
|
|
9396
9430
|
}
|
|
9397
|
-
function
|
|
9431
|
+
function Zm(e) {
|
|
9398
9432
|
return {
|
|
9399
9433
|
columns: ["Name", "Value"],
|
|
9400
9434
|
rows: (e.series?.data ?? []).map((e) => ({
|
|
@@ -9403,7 +9437,7 @@ function Hm(e) {
|
|
|
9403
9437
|
}))
|
|
9404
9438
|
};
|
|
9405
9439
|
}
|
|
9406
|
-
function
|
|
9440
|
+
function Qm(e) {
|
|
9407
9441
|
let t = e.indicators ?? [], n = e.series, r = Array.isArray(n) ? n : [];
|
|
9408
9442
|
return {
|
|
9409
9443
|
columns: ["Indicator", ...r.map((e) => e.name)],
|
|
@@ -9414,7 +9448,7 @@ function Um(e) {
|
|
|
9414
9448
|
})
|
|
9415
9449
|
};
|
|
9416
9450
|
}
|
|
9417
|
-
function
|
|
9451
|
+
function $m(e) {
|
|
9418
9452
|
let t = e.series;
|
|
9419
9453
|
return {
|
|
9420
9454
|
columns: ["Name", "Value"],
|
|
@@ -9424,7 +9458,7 @@ function Wm(e) {
|
|
|
9424
9458
|
}]
|
|
9425
9459
|
};
|
|
9426
9460
|
}
|
|
9427
|
-
function
|
|
9461
|
+
function eh(e) {
|
|
9428
9462
|
let t = e.xCategories ?? [], n = e.yCategories ?? [];
|
|
9429
9463
|
return {
|
|
9430
9464
|
columns: [
|
|
@@ -9439,7 +9473,7 @@ function Gm(e) {
|
|
|
9439
9473
|
}))
|
|
9440
9474
|
};
|
|
9441
9475
|
}
|
|
9442
|
-
function
|
|
9476
|
+
function th(e, t) {
|
|
9443
9477
|
let n = (t.scatterSeries ?? []).flatMap((e) => e.data.map((t) => ({
|
|
9444
9478
|
series: e.name,
|
|
9445
9479
|
label: Array.isArray(t) ? "" : t.label ?? "",
|
|
@@ -9464,32 +9498,32 @@ function Km(e, t) {
|
|
|
9464
9498
|
}
|
|
9465
9499
|
//#endregion
|
|
9466
9500
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/downloadHelpers.ts
|
|
9467
|
-
function
|
|
9501
|
+
function nh(e) {
|
|
9468
9502
|
return e == null ? "" : typeof e == "boolean" ? String(e) : e instanceof Date ? e.toISOString() : typeof e == "object" ? JSON.stringify(e) : String(e);
|
|
9469
9503
|
}
|
|
9470
|
-
function
|
|
9471
|
-
return typeof e == "number" && Number.isFinite(e) ? e :
|
|
9504
|
+
function rh(e) {
|
|
9505
|
+
return typeof e == "number" && Number.isFinite(e) ? e : nh(e);
|
|
9472
9506
|
}
|
|
9473
|
-
function
|
|
9474
|
-
let i = n ?? e, a = [e, ...t.map((e) => i.map((t) =>
|
|
9507
|
+
function ih({ columns: e, rows: t, keys: n, preamble: r }) {
|
|
9508
|
+
let i = n ?? e, a = [e, ...t.map((e) => i.map((t) => rh(e[t])))];
|
|
9475
9509
|
return r?.length ? [
|
|
9476
9510
|
...r.map((e) => [e]),
|
|
9477
9511
|
[],
|
|
9478
9512
|
...a
|
|
9479
9513
|
] : a;
|
|
9480
9514
|
}
|
|
9481
|
-
function
|
|
9515
|
+
function ah(e, t) {
|
|
9482
9516
|
let n = (t ?? "").split("\n").map((e) => e.trim()).filter((e) => e.length > 0);
|
|
9483
9517
|
return n.length > 0 ? [e, ...n] : [];
|
|
9484
9518
|
}
|
|
9485
|
-
function
|
|
9519
|
+
function oh(e, t) {
|
|
9486
9520
|
let n = document.createElement("a");
|
|
9487
9521
|
n.href = URL.createObjectURL(e), n.download = t, n.click(), URL.revokeObjectURL(n.href);
|
|
9488
9522
|
}
|
|
9489
|
-
async function
|
|
9490
|
-
|
|
9523
|
+
async function sh(e, t, n, { keys: r, preamble: i } = {}) {
|
|
9524
|
+
oh(await vr([{
|
|
9491
9525
|
name: "Data",
|
|
9492
|
-
rows:
|
|
9526
|
+
rows: ih({
|
|
9493
9527
|
columns: e,
|
|
9494
9528
|
rows: t,
|
|
9495
9529
|
keys: r,
|
|
@@ -9497,30 +9531,30 @@ async function Qm(e, t, n, { keys: r, preamble: i } = {}) {
|
|
|
9497
9531
|
})
|
|
9498
9532
|
}]), `${n}.xlsx`);
|
|
9499
9533
|
}
|
|
9500
|
-
function
|
|
9534
|
+
function ch(e, t, n, r) {
|
|
9501
9535
|
let i = r ?? e, a = (e) => {
|
|
9502
|
-
let t =
|
|
9536
|
+
let t = nh(e);
|
|
9503
9537
|
return t.includes(",") || t.includes("\"") || t.includes("\n") ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
9504
9538
|
}, o = [e.map(a).join(","), ...t.map((e) => i.map((t) => a(e[t])).join(","))];
|
|
9505
|
-
|
|
9539
|
+
oh(new Blob([o.join("\n")], { type: "text/csv;charset=utf-8;" }), `${n}.csv`);
|
|
9506
9540
|
}
|
|
9507
|
-
function
|
|
9541
|
+
function lh(e, t, n) {
|
|
9508
9542
|
let r = document.createElement("a");
|
|
9509
9543
|
r.href = e, r.download = `${t}.${n}`, r.click();
|
|
9510
9544
|
}
|
|
9511
|
-
async function
|
|
9512
|
-
|
|
9545
|
+
async function uh(e, t) {
|
|
9546
|
+
oh(await vr(e.map((e) => ({
|
|
9513
9547
|
name: e.name,
|
|
9514
|
-
rows:
|
|
9548
|
+
rows: ih(e)
|
|
9515
9549
|
}))), `${t}.xlsx`);
|
|
9516
9550
|
}
|
|
9517
9551
|
//#endregion
|
|
9518
9552
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useChartDownloadActions.ts
|
|
9519
|
-
function
|
|
9553
|
+
function dh(e) {
|
|
9520
9554
|
let t = e.current?.querySelector(":scope > div");
|
|
9521
9555
|
return t ? jt(t) ?? null : null;
|
|
9522
9556
|
}
|
|
9523
|
-
function
|
|
9557
|
+
function fh(e, t, n) {
|
|
9524
9558
|
let r = Ct(document.createElement("div"), void 0, {
|
|
9525
9559
|
renderer: "canvas",
|
|
9526
9560
|
width: e.getWidth(),
|
|
@@ -9539,29 +9573,29 @@ function rh(e, t, n) {
|
|
|
9539
9573
|
r.dispose();
|
|
9540
9574
|
}
|
|
9541
9575
|
}
|
|
9542
|
-
function
|
|
9576
|
+
function ph({ chartContainerRef: e, chartConfig: t, data: n, title: r }) {
|
|
9543
9577
|
let { t: i } = z(), a = W((t) => {
|
|
9544
|
-
let n =
|
|
9545
|
-
n &&
|
|
9578
|
+
let n = dh(e);
|
|
9579
|
+
n && lh(t === "jpg" ? fh(n, "jpeg", "#fff") : fh(n, "png"), r, t);
|
|
9546
9580
|
}, [e, r]), o = K(() => {
|
|
9547
9581
|
if (!n) return t;
|
|
9548
|
-
let e =
|
|
9582
|
+
let e = Im(n, t.type);
|
|
9549
9583
|
return e === t.type ? t : {
|
|
9550
9584
|
...t,
|
|
9551
9585
|
type: e
|
|
9552
9586
|
};
|
|
9553
9587
|
}, [t, n]), s = W(() => {
|
|
9554
9588
|
if (!n) return;
|
|
9555
|
-
let e =
|
|
9556
|
-
|
|
9589
|
+
let e = Jm(o, n);
|
|
9590
|
+
sh(e.columns, e.rows, r, { keys: e.keys });
|
|
9557
9591
|
}, [
|
|
9558
9592
|
o,
|
|
9559
9593
|
n,
|
|
9560
9594
|
r
|
|
9561
9595
|
]), c = W(() => {
|
|
9562
9596
|
if (!n) return;
|
|
9563
|
-
let e =
|
|
9564
|
-
|
|
9597
|
+
let e = Jm(o, n);
|
|
9598
|
+
ch(e.columns, e.rows, r, e.keys);
|
|
9565
9599
|
}, [
|
|
9566
9600
|
o,
|
|
9567
9601
|
n,
|
|
@@ -9599,7 +9633,7 @@ function ih({ chartContainerRef: e, chartConfig: t, data: n, title: r }) {
|
|
|
9599
9633
|
}
|
|
9600
9634
|
//#endregion
|
|
9601
9635
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useDashboardItemData.ts
|
|
9602
|
-
function
|
|
9636
|
+
function mh(e, t, n, r = "") {
|
|
9603
9637
|
let [i, a] = J(void 0), [o, s] = J(!0), [c, l] = J(void 0), u = q(0), d = q(e);
|
|
9604
9638
|
d.current = e;
|
|
9605
9639
|
let f = q(t);
|
|
@@ -9631,7 +9665,7 @@ function ah(e, t, n, r = "") {
|
|
|
9631
9665
|
}
|
|
9632
9666
|
//#endregion
|
|
9633
9667
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItemFilters.tsx
|
|
9634
|
-
function
|
|
9668
|
+
function hh({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
9635
9669
|
let i = z(), a = Tc(), o = q(null), s = q(void 0), c = q(r), [l, u] = J(!1), [d, f] = J(null), [p, m] = J(t);
|
|
9636
9670
|
G(() => {
|
|
9637
9671
|
c.current = r;
|
|
@@ -9773,24 +9807,24 @@ function oh({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
9773
9807
|
}
|
|
9774
9808
|
//#endregion
|
|
9775
9809
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/useTitleFitsOneLine.ts
|
|
9776
|
-
var
|
|
9810
|
+
var gh = "(hover: hover) and (min-width: 640px)", _h = (e) => {
|
|
9777
9811
|
let { whiteSpace: t, display: n } = e.style;
|
|
9778
9812
|
e.style.whiteSpace = "nowrap", e.style.display = "block";
|
|
9779
9813
|
let r = e.scrollWidth;
|
|
9780
9814
|
return e.style.whiteSpace = t, e.style.display = n, r;
|
|
9781
9815
|
};
|
|
9782
|
-
function
|
|
9816
|
+
function vh({ title: e, enabled: t, actionsCollapse: n }) {
|
|
9783
9817
|
let r = q(null), i = q(null), a = q(null), [o, s] = J(!0);
|
|
9784
9818
|
return Dc(() => {
|
|
9785
9819
|
let e = r.current;
|
|
9786
9820
|
if (!t || !e) return;
|
|
9787
|
-
let o = window.matchMedia?.(
|
|
9821
|
+
let o = window.matchMedia?.(gh), c = () => {
|
|
9788
9822
|
let t = e.querySelector("h3");
|
|
9789
9823
|
if (!t) {
|
|
9790
9824
|
s(!0);
|
|
9791
9825
|
return;
|
|
9792
9826
|
}
|
|
9793
|
-
let r =
|
|
9827
|
+
let r = _h(t), c = n && o?.matches ? 0 : a.current?.getBoundingClientRect().width ?? 0, l = i.current, u = l ? l.getBoundingClientRect().width + 4 : 0, d = e.getBoundingClientRect().width - c - u;
|
|
9794
9828
|
s(r <= d);
|
|
9795
9829
|
};
|
|
9796
9830
|
c();
|
|
@@ -9815,10 +9849,10 @@ function lh({ title: e, enabled: t, actionsCollapse: n }) {
|
|
|
9815
9849
|
}
|
|
9816
9850
|
//#endregion
|
|
9817
9851
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItem.tsx
|
|
9818
|
-
function
|
|
9852
|
+
function yh({ 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
9853
|
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 } = Br(), I = (e) => {
|
|
9820
9854
|
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 =
|
|
9855
|
+
}, 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 = vh({
|
|
9822
9856
|
title: e,
|
|
9823
9857
|
enabled: x > 2,
|
|
9824
9858
|
actionsCollapse: !v
|
|
@@ -9871,7 +9905,7 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9871
9905
|
}) : null]
|
|
9872
9906
|
}), l || ae ? /* @__PURE__ */ Z("div", {
|
|
9873
9907
|
className: le,
|
|
9874
|
-
children: [l ? /* @__PURE__ */ X(
|
|
9908
|
+
children: [l ? /* @__PURE__ */ X(hh, {
|
|
9875
9909
|
...l,
|
|
9876
9910
|
onOpenChange: D
|
|
9877
9911
|
}) : null, ae ? /* @__PURE__ */ Z(Zs, {
|
|
@@ -9941,7 +9975,7 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9941
9975
|
children: /* @__PURE__ */ Z("div", {
|
|
9942
9976
|
className: B(le, "p-0.5 pl-2"),
|
|
9943
9977
|
children: [
|
|
9944
|
-
l ? /* @__PURE__ */ X(
|
|
9978
|
+
l ? /* @__PURE__ */ X(hh, {
|
|
9945
9979
|
...l,
|
|
9946
9980
|
onOpenChange: D
|
|
9947
9981
|
}) : null,
|
|
@@ -10078,8 +10112,8 @@ function uh({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10078
10112
|
}
|
|
10079
10113
|
//#endregion
|
|
10080
10114
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ChartItem/PointActionPopover.tsx
|
|
10081
|
-
var
|
|
10082
|
-
function
|
|
10115
|
+
var bh = 8, xh = 8;
|
|
10116
|
+
function Sh({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
10083
10117
|
let i = z(), a = q(null), [o, s] = J(null);
|
|
10084
10118
|
return Dc(() => {
|
|
10085
10119
|
if (!e) {
|
|
@@ -10088,9 +10122,9 @@ function ph({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
|
10088
10122
|
}
|
|
10089
10123
|
let t = a.current;
|
|
10090
10124
|
if (!t) return;
|
|
10091
|
-
let { offsetWidth: n, offsetHeight: r } = t, i = e.clientY - r -
|
|
10092
|
-
i <
|
|
10093
|
-
let o = e.clientX - n / 2, c = Math.min(Math.max(o,
|
|
10125
|
+
let { offsetWidth: n, offsetHeight: r } = t, i = e.clientY - r - bh;
|
|
10126
|
+
i < xh && (i = e.clientY + bh), i = Math.min(Math.max(i, xh), window.innerHeight - r - xh);
|
|
10127
|
+
let o = e.clientX - n / 2, c = Math.min(Math.max(o, xh), window.innerWidth - n - xh);
|
|
10094
10128
|
s({
|
|
10095
10129
|
top: i,
|
|
10096
10130
|
left: c
|
|
@@ -10138,38 +10172,38 @@ function ph({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
|
10138
10172
|
}
|
|
10139
10173
|
//#endregion
|
|
10140
10174
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ChartItem/pointQuote.ts
|
|
10141
|
-
function
|
|
10175
|
+
function Ch(e, t, n, r = "y") {
|
|
10142
10176
|
return t === null ? n : r === "x" && e.type === "scatter" ? Ye(e.xTooltipValueFormatter, e.xValueFormatter)(t) : Ye(e.tooltipValueFormatter, e.valueFormatter)(t);
|
|
10143
10177
|
}
|
|
10144
|
-
function
|
|
10178
|
+
function wh(e, t) {
|
|
10145
10179
|
return t ? `${e} — ${t}` : e;
|
|
10146
10180
|
}
|
|
10147
|
-
function
|
|
10181
|
+
function Th(e, t, n, r) {
|
|
10148
10182
|
let i = t.xAxisName ?? "X", a = t.yAxisName ?? "Y", o = n.seriesName ? `${n.seriesName}\n` : "", [s, c] = n.values;
|
|
10149
|
-
return `${
|
|
10183
|
+
return `${wh(e, n.category)}\n${o}${i}: ${Ch(t, s, r, "x")}\n${a}: ${Ch(t, c, r)}`;
|
|
10150
10184
|
}
|
|
10151
|
-
function
|
|
10152
|
-
let i = t.categoryFormatter ? t.categoryFormatter(n.category) : n.category, a = n.series.map(({ name: e, value: n }) => `${e}: ${
|
|
10153
|
-
return `${
|
|
10185
|
+
function Eh(e, t, n, r) {
|
|
10186
|
+
let i = t.categoryFormatter ? t.categoryFormatter(n.category) : n.category, a = n.series.map(({ name: e, value: n }) => `${e}: ${Ch(t, n, r)}`);
|
|
10187
|
+
return `${wh(e, i)}\n${a.join("\n")}`;
|
|
10154
10188
|
}
|
|
10155
|
-
function
|
|
10156
|
-
let i = t.indicators.slice(0, n.values.length).map(({ name: e }, i) => `${e}: ${
|
|
10157
|
-
return `${
|
|
10189
|
+
function Dh(e, t, n, r) {
|
|
10190
|
+
let i = t.indicators.slice(0, n.values.length).map(({ name: e }, i) => `${e}: ${Ch(t, n.values[i], r)}`);
|
|
10191
|
+
return `${wh(e, n.seriesName)}\n${i.join("\n")}`;
|
|
10158
10192
|
}
|
|
10159
|
-
function
|
|
10193
|
+
function Oh(e, t, n, r) {
|
|
10160
10194
|
let [i, a] = n.values, o = i === null ? void 0 : t.xCategories[i];
|
|
10161
|
-
return `${
|
|
10195
|
+
return `${wh(e, [a === null ? void 0 : t.yCategories[a], o].filter(Boolean).join(" — "))}\n${Ch(t, n.value, r)}`;
|
|
10162
10196
|
}
|
|
10163
|
-
function
|
|
10197
|
+
function kh(e, t, n, r) {
|
|
10164
10198
|
let i = "categoryFormatter" in t && t.categoryFormatter ? t.categoryFormatter(n.category) : n.category, a = n.seriesName ? `${n.seriesName}: ` : "";
|
|
10165
|
-
return `${
|
|
10199
|
+
return `${wh(e, i)}\n${a}${Ch(t, n.value, r)}`;
|
|
10166
10200
|
}
|
|
10167
|
-
function
|
|
10168
|
-
return t.type === "scatter" && n.values.length >= 2 ?
|
|
10201
|
+
function Ah(e, t, n, r) {
|
|
10202
|
+
return t.type === "scatter" && n.values.length >= 2 ? Th(e, t, n, r) : t.type === "line" && n.series.length > 1 ? Eh(e, t, n, r) : t.type === "radar" && t.indicators.length && n.values.length > 1 ? Dh(e, t, n, r) : t.type === "heatmap" && n.values.length >= 3 ? Oh(e, t, n, r) : kh(e, t, n, r);
|
|
10169
10203
|
}
|
|
10170
10204
|
//#endregion
|
|
10171
10205
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ChartItem/ChartItem.tsx
|
|
10172
|
-
function
|
|
10206
|
+
function jh(e) {
|
|
10173
10207
|
return [
|
|
10174
10208
|
{
|
|
10175
10209
|
label: e.dataChart.barChartVertical,
|
|
@@ -10211,8 +10245,8 @@ function Sh(e) {
|
|
|
10211
10245
|
}
|
|
10212
10246
|
];
|
|
10213
10247
|
}
|
|
10214
|
-
var
|
|
10215
|
-
function
|
|
10248
|
+
var Mh = { type: "bar" };
|
|
10249
|
+
function Nh(e) {
|
|
10216
10250
|
switch (e.type) {
|
|
10217
10251
|
case "bar": return /* @__PURE__ */ X(it, {
|
|
10218
10252
|
orientation: e.orientation,
|
|
@@ -10240,13 +10274,13 @@ function wh(e) {
|
|
|
10240
10274
|
case "scatter": return /* @__PURE__ */ X(u, { showLegend: e.showLegend ?? !1 });
|
|
10241
10275
|
}
|
|
10242
10276
|
}
|
|
10243
|
-
function
|
|
10277
|
+
function Ph(e) {
|
|
10244
10278
|
return e.referenceLines ? { referenceLines: e.referenceLines } : {};
|
|
10245
10279
|
}
|
|
10246
|
-
function
|
|
10280
|
+
function Fh(e, t, n, r) {
|
|
10247
10281
|
let i = n ?? e.chart.type;
|
|
10248
|
-
if (i ===
|
|
10249
|
-
let a =
|
|
10282
|
+
if (i === Im(t, i) && i === e.chart.type && !r) return Ih(e, t);
|
|
10283
|
+
let a = Wm(Lm(t), i), o = qm(i), s = {};
|
|
10250
10284
|
switch ("valueFormatter" in e.chart && e.chart.valueFormatter && (s.valueFormatter = e.chart.valueFormatter), "tooltipValueFormatter" in e.chart && e.chart.tooltipValueFormatter && (s.tooltipValueFormatter = e.chart.tooltipValueFormatter), "showLegend" in e.chart && (s.showLegend = e.chart.showLegend), i === "bar" && "showLabels" in e.chart && e.chart.showLabels !== void 0 && (s.showLabels = e.chart.showLabels), i) {
|
|
10251
10285
|
case "bar": {
|
|
10252
10286
|
let n = r ?? ("orientation" in e.chart ? e.chart.orientation : void 0) ?? o.orientation;
|
|
@@ -10254,7 +10288,7 @@ function Eh(e, t, n, r) {
|
|
|
10254
10288
|
...o,
|
|
10255
10289
|
...s,
|
|
10256
10290
|
...n ? { orientation: n } : {},
|
|
10257
|
-
...
|
|
10291
|
+
...Ph(t),
|
|
10258
10292
|
categories: a.categories ?? [],
|
|
10259
10293
|
series: a.series
|
|
10260
10294
|
};
|
|
@@ -10262,7 +10296,7 @@ function Eh(e, t, n, r) {
|
|
|
10262
10296
|
case "line": return {
|
|
10263
10297
|
...o,
|
|
10264
10298
|
...s,
|
|
10265
|
-
...
|
|
10299
|
+
...Ph(t),
|
|
10266
10300
|
categories: a.categories ?? [],
|
|
10267
10301
|
series: a.series
|
|
10268
10302
|
};
|
|
@@ -10297,12 +10331,12 @@ function Eh(e, t, n, r) {
|
|
|
10297
10331
|
};
|
|
10298
10332
|
}
|
|
10299
10333
|
}
|
|
10300
|
-
function
|
|
10334
|
+
function Ih(e, t) {
|
|
10301
10335
|
let { chart: n } = e;
|
|
10302
10336
|
switch (n.type) {
|
|
10303
10337
|
case "funnel": {
|
|
10304
10338
|
let e = t.series;
|
|
10305
|
-
return Array.isArray(t.series) && (e =
|
|
10339
|
+
return Array.isArray(t.series) && (e = Wm(Lm(t, "bar"), "funnel").series), {
|
|
10306
10340
|
...n,
|
|
10307
10341
|
series: e
|
|
10308
10342
|
};
|
|
@@ -10334,24 +10368,24 @@ function Dh(e, t) {
|
|
|
10334
10368
|
case "line": {
|
|
10335
10369
|
let { series: e } = t, r = t.categories ?? [];
|
|
10336
10370
|
if (e && !Array.isArray(e)) {
|
|
10337
|
-
let i =
|
|
10371
|
+
let i = Wm(Lm(t, "funnel"), n.type);
|
|
10338
10372
|
e = i.series, r = i.categories ?? [];
|
|
10339
10373
|
}
|
|
10340
10374
|
return {
|
|
10341
10375
|
...n,
|
|
10342
10376
|
...n.type === "bar" ? { showLabels: n.showLabels ?? !0 } : {},
|
|
10343
|
-
...
|
|
10377
|
+
...Ph(t),
|
|
10344
10378
|
categories: r,
|
|
10345
10379
|
series: e
|
|
10346
10380
|
};
|
|
10347
10381
|
}
|
|
10348
10382
|
}
|
|
10349
10383
|
}
|
|
10350
|
-
function
|
|
10351
|
-
let n =
|
|
10384
|
+
function Lh({ config: e, data: t }) {
|
|
10385
|
+
let n = Im(t, e.type), r = n === e.type ? e : {
|
|
10352
10386
|
...e,
|
|
10353
10387
|
type: n
|
|
10354
|
-
}, i = K(() =>
|
|
10388
|
+
}, i = K(() => Jm(r, t), [r, t]), a = K(() => ({
|
|
10355
10389
|
dataAdapter: { fetchData: () => ({ records: i.rows }) },
|
|
10356
10390
|
columns: i.columns.map((e) => ({
|
|
10357
10391
|
label: e,
|
|
@@ -10370,11 +10404,11 @@ function Oh({ config: e, data: t }) {
|
|
|
10370
10404
|
visualizations: s
|
|
10371
10405
|
});
|
|
10372
10406
|
}
|
|
10373
|
-
function
|
|
10374
|
-
return
|
|
10407
|
+
function Rh(e) {
|
|
10408
|
+
return Mm(e.chart) && e.chart.type === "bar" && "orientation" in e.chart && e.chart.orientation === "horizontal";
|
|
10375
10409
|
}
|
|
10376
|
-
function
|
|
10377
|
-
let f = z(), [p, m] = J("chart"), { enabled: h, setPendingQuote: g, setOpen: _, focusChatInput: v } = Br(), y = !
|
|
10410
|
+
function zh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c, onTransformChart: l, isFullscreen: u, onFullscreenChange: d }) {
|
|
10411
|
+
let f = z(), [p, m] = J("chart"), { enabled: h, setPendingQuote: g, setOpen: _, focusChatInput: v } = Br(), y = !Mm(e.chart), b = y ? Mh : e.chart, [x, S] = J(null), C = e.useDashboardFilters !== !1, w = JSON.stringify(r?.value ?? {}), { data: T, isLoading: E, error: D, retry: O } = mh(e.fetchData, t, C, w), k = q(null), A = K(() => T && !y ? Fh(e, T) : void 0, [
|
|
10378
10412
|
e,
|
|
10379
10413
|
T,
|
|
10380
10414
|
y
|
|
@@ -10400,7 +10434,7 @@ function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10400
10434
|
return;
|
|
10401
10435
|
}
|
|
10402
10436
|
if (!A) return;
|
|
10403
|
-
let n = { text:
|
|
10437
|
+
let n = { text: Ah(e.title, A, t, f.dataChart.noData) };
|
|
10404
10438
|
c?.({
|
|
10405
10439
|
id: e.id,
|
|
10406
10440
|
title: e.title,
|
|
@@ -10418,12 +10452,12 @@ function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10418
10452
|
g,
|
|
10419
10453
|
_,
|
|
10420
10454
|
v
|
|
10421
|
-
]), P = K(() =>
|
|
10455
|
+
]), P = K(() => jh(f), [f]), F = ph({
|
|
10422
10456
|
chartContainerRef: k,
|
|
10423
10457
|
chartConfig: b,
|
|
10424
10458
|
data: T,
|
|
10425
10459
|
title: e.title
|
|
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 ?
|
|
10460
|
+
}), 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 ? Im(T, b.type) : b.type, ne = K(() => Km(L), [L]), re = K(() => T ? Gm(Lm(T, L)) : !1, [T, L]), ie = T && Array.isArray(T.series) ? T.series.length : 1, ae = P.filter((e) => {
|
|
10427
10461
|
let t = e.type === "bar" ? "bar" : e.type;
|
|
10428
10462
|
return !(!ne.has(t) || e.type === "pie" && ie > 1 || (e.type === "pie" || e.type === "funnel") && re);
|
|
10429
10463
|
}), oe = l && L !== "scatter" && L !== "radar" && L !== "heatmap" ? ae.map((t) => {
|
|
@@ -10437,14 +10471,14 @@ function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10437
10471
|
n ? m("table") : (m("chart"), (b.type !== t.type || t.type === "bar" && te !== t.orientation) && l(e.id, t.type, t.orientation));
|
|
10438
10472
|
}
|
|
10439
10473
|
};
|
|
10440
|
-
}) : void 0, se = !!u &&
|
|
10474
|
+
}) : void 0, se = !!u && Rh(e), [ce, le] = J(0), ue = !!d && Rh(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
10475
|
label: f.actions.showAll,
|
|
10442
10476
|
onClick: () => d?.(!0)
|
|
10443
10477
|
} : fe ? {
|
|
10444
10478
|
label: f.actions.showLess,
|
|
10445
10479
|
onClick: () => d?.(!1)
|
|
10446
10480
|
} : void 0;
|
|
10447
|
-
return /* @__PURE__ */ X(
|
|
10481
|
+
return /* @__PURE__ */ X(yh, {
|
|
10448
10482
|
title: e.title,
|
|
10449
10483
|
description: me ?? e.description,
|
|
10450
10484
|
info: e.info,
|
|
@@ -10453,7 +10487,7 @@ function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10453
10487
|
isLoading: E,
|
|
10454
10488
|
error: D ?? (y ? /* @__PURE__ */ Error() : void 0),
|
|
10455
10489
|
onRetry: y ? void 0 : O,
|
|
10456
|
-
skeleton:
|
|
10490
|
+
skeleton: Nh(b),
|
|
10457
10491
|
actions: I,
|
|
10458
10492
|
itemFilters: r,
|
|
10459
10493
|
editMode: i,
|
|
@@ -10466,7 +10500,7 @@ function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10466
10500
|
isFullscreen: u,
|
|
10467
10501
|
fitContent: se,
|
|
10468
10502
|
onFullscreenChange: d,
|
|
10469
|
-
children: T && A ? p === "table" ? /* @__PURE__ */ X(
|
|
10503
|
+
children: T && A ? p === "table" ? /* @__PURE__ */ X(Lh, {
|
|
10470
10504
|
config: b,
|
|
10471
10505
|
data: T
|
|
10472
10506
|
}) : /* @__PURE__ */ Z("div", {
|
|
@@ -10482,7 +10516,7 @@ function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10482
10516
|
onHiddenCategoriesChange: le
|
|
10483
10517
|
} : {},
|
|
10484
10518
|
...se ? { showAllCategories: !0 } : {}
|
|
10485
|
-
}), /* @__PURE__ */ X(
|
|
10519
|
+
}), /* @__PURE__ */ X(Sh, {
|
|
10486
10520
|
anchor: x,
|
|
10487
10521
|
onAsk: () => {
|
|
10488
10522
|
x && N(x);
|
|
@@ -10498,7 +10532,7 @@ function Ah({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10498
10532
|
}
|
|
10499
10533
|
//#endregion
|
|
10500
10534
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/tableExport.ts
|
|
10501
|
-
function
|
|
10535
|
+
function Bh(e) {
|
|
10502
10536
|
return ((e?.find((e) => e?.type === "table"))?.options?.columns ?? []).filter((e) => typeof e?.id == "string" && typeof e?.label == "string").map((e) => ({
|
|
10503
10537
|
id: e.id,
|
|
10504
10538
|
label: e.label,
|
|
@@ -10506,7 +10540,7 @@ function jh(e) {
|
|
|
10506
10540
|
excelValue: e.excelValue
|
|
10507
10541
|
}));
|
|
10508
10542
|
}
|
|
10509
|
-
function
|
|
10543
|
+
function Vh(e, t, n = "excel") {
|
|
10510
10544
|
return e.map((e) => {
|
|
10511
10545
|
let r = {};
|
|
10512
10546
|
for (let i of t) {
|
|
@@ -10521,11 +10555,11 @@ function Mh(e, t, n = "excel") {
|
|
|
10521
10555
|
}
|
|
10522
10556
|
//#endregion
|
|
10523
10557
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useCollectionDownloadActions.ts
|
|
10524
|
-
var
|
|
10525
|
-
async function
|
|
10558
|
+
var Hh = 1e4, Uh = 100;
|
|
10559
|
+
async function Wh(e) {
|
|
10526
10560
|
return e;
|
|
10527
10561
|
}
|
|
10528
|
-
async function
|
|
10562
|
+
async function Gh(e) {
|
|
10529
10563
|
let { dataAdapter: t } = e, n = [...e.currentSortings ? [{
|
|
10530
10564
|
field: e.currentSortings.field,
|
|
10531
10565
|
order: e.currentSortings.order
|
|
@@ -10538,38 +10572,38 @@ async function Ih(e) {
|
|
|
10538
10572
|
search: e.currentSearch,
|
|
10539
10573
|
navigationFilters: e.currentNavigationFilters
|
|
10540
10574
|
}, i = t.exportFetchData ?? t.fetchData;
|
|
10541
|
-
if (!t.paginationType) return ((await
|
|
10575
|
+
if (!t.paginationType) return ((await Wh(i(r))).records ?? []).slice(0, Hh);
|
|
10542
10576
|
if (t.paginationType === "pages") {
|
|
10543
10577
|
let e = [], t = 1;
|
|
10544
|
-
for (; e.length <
|
|
10545
|
-
let n = await
|
|
10578
|
+
for (; e.length < Hh;) {
|
|
10579
|
+
let n = await Wh(i({
|
|
10546
10580
|
...r,
|
|
10547
10581
|
pagination: {
|
|
10548
10582
|
currentPage: t,
|
|
10549
|
-
perPage:
|
|
10583
|
+
perPage: Uh
|
|
10550
10584
|
}
|
|
10551
10585
|
}));
|
|
10552
10586
|
if (!n.records || n.records.length === 0 || (e.push(...n.records), "pagesCount" in n && t >= n.pagesCount)) break;
|
|
10553
10587
|
t++;
|
|
10554
10588
|
}
|
|
10555
|
-
return e.slice(0,
|
|
10589
|
+
return e.slice(0, Hh);
|
|
10556
10590
|
}
|
|
10557
10591
|
let a = [], o = null;
|
|
10558
|
-
for (; a.length <
|
|
10559
|
-
let e = await
|
|
10592
|
+
for (; a.length < Hh;) {
|
|
10593
|
+
let e = await Wh(i({
|
|
10560
10594
|
...r,
|
|
10561
10595
|
pagination: {
|
|
10562
10596
|
cursor: o,
|
|
10563
|
-
perPage:
|
|
10597
|
+
perPage: Uh
|
|
10564
10598
|
}
|
|
10565
10599
|
}));
|
|
10566
10600
|
if (!e.records || e.records.length === 0 || (a.push(...e.records), "hasMore" in e && !e.hasMore)) break;
|
|
10567
10601
|
if ("cursor" in e) o = e.cursor ?? null;
|
|
10568
10602
|
else break;
|
|
10569
10603
|
}
|
|
10570
|
-
return a.slice(0,
|
|
10604
|
+
return a.slice(0, Hh);
|
|
10571
10605
|
}
|
|
10572
|
-
function
|
|
10606
|
+
function Kh(e, t) {
|
|
10573
10607
|
let n = new Set(t?.hidden ?? []), r = e.filter((e) => !n.has(e.id)), i = t?.order;
|
|
10574
10608
|
if (!i || i.length === 0) return r;
|
|
10575
10609
|
let a = new Map(r.map((e) => [e.id, e])), o = [];
|
|
@@ -10580,18 +10614,18 @@ function Lh(e, t) {
|
|
|
10580
10614
|
for (let e of r) a.has(e.id) && o.push(e);
|
|
10581
10615
|
return o;
|
|
10582
10616
|
}
|
|
10583
|
-
function
|
|
10617
|
+
function qh({ source: e, title: t, description: n, columns: r, tableSettings: i }) {
|
|
10584
10618
|
let { t: a } = z(), [o, s] = J(!1), c = W(async (a) => {
|
|
10585
10619
|
if (e && !o) {
|
|
10586
10620
|
s(!0);
|
|
10587
10621
|
try {
|
|
10588
|
-
let o = await
|
|
10622
|
+
let o = await Gh(e), s = Kh(r, i);
|
|
10589
10623
|
if (s.length === 0 || o.length === 0) return;
|
|
10590
|
-
let c = s.map((e) => e.label), l = s.map((e) => e.id), u =
|
|
10591
|
-
a === "excel" ? await
|
|
10624
|
+
let c = s.map((e) => e.label), l = s.map((e) => e.id), u = Vh(o, s, a);
|
|
10625
|
+
a === "excel" ? await sh(c, u, t, {
|
|
10592
10626
|
keys: l,
|
|
10593
|
-
preamble:
|
|
10594
|
-
}) :
|
|
10627
|
+
preamble: ah(t, n)
|
|
10628
|
+
}) : ch(c, u, t, l);
|
|
10595
10629
|
} finally {
|
|
10596
10630
|
s(!1);
|
|
10597
10631
|
}
|
|
@@ -10621,15 +10655,15 @@ function Rh({ source: e, title: t, description: n, columns: r, tableSettings: i
|
|
|
10621
10655
|
}
|
|
10622
10656
|
//#endregion
|
|
10623
10657
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/CollectionItem/CollectionItem.tsx
|
|
10624
|
-
function
|
|
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(() =>
|
|
10658
|
+
function Jh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c, isFullscreen: l, onFullscreenChange: u }) {
|
|
10659
|
+
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(() => Bh(e.visualizations), [e]), y = qh({
|
|
10626
10660
|
source: h,
|
|
10627
10661
|
title: e.title,
|
|
10628
10662
|
description: e.description,
|
|
10629
10663
|
columns: v,
|
|
10630
10664
|
tableSettings: g
|
|
10631
10665
|
}), b = K(() => [...n ?? [], ...y], [n, y]);
|
|
10632
|
-
return /* @__PURE__ */ X(
|
|
10666
|
+
return /* @__PURE__ */ X(yh, {
|
|
10633
10667
|
title: e.title,
|
|
10634
10668
|
description: e.description,
|
|
10635
10669
|
info: e.info,
|
|
@@ -10661,7 +10695,7 @@ function zh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10661
10695
|
}
|
|
10662
10696
|
//#endregion
|
|
10663
10697
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItemSkeleton.tsx
|
|
10664
|
-
function
|
|
10698
|
+
function Yh() {
|
|
10665
10699
|
return /* @__PURE__ */ Z("div", {
|
|
10666
10700
|
className: "flex h-full items-end gap-3 px-4 pb-4",
|
|
10667
10701
|
children: [/* @__PURE__ */ X(_n, { className: "h-10 w-36 rounded" }), /* @__PURE__ */ X(_n, { className: "h-4 w-16 rounded" })]
|
|
@@ -10669,7 +10703,7 @@ function Bh() {
|
|
|
10669
10703
|
}
|
|
10670
10704
|
//#endregion
|
|
10671
10705
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/MetricItem/MetricItem.tsx
|
|
10672
|
-
function
|
|
10706
|
+
function Xh(e, t = { type: "number" }, n = 0) {
|
|
10673
10707
|
switch (t.type) {
|
|
10674
10708
|
case "currency": return new Intl.NumberFormat(void 0, {
|
|
10675
10709
|
style: "currency",
|
|
@@ -10695,7 +10729,7 @@ function Vh(e, t = { type: "number" }, n = 0) {
|
|
|
10695
10729
|
}).format(e);
|
|
10696
10730
|
}
|
|
10697
10731
|
}
|
|
10698
|
-
function
|
|
10732
|
+
function Zh(e, t) {
|
|
10699
10733
|
if (t === void 0 || t === 0) return;
|
|
10700
10734
|
let n = (e - t) / Math.abs(t) * 100;
|
|
10701
10735
|
return {
|
|
@@ -10703,7 +10737,7 @@ function Hh(e, t) {
|
|
|
10703
10737
|
direction: n > .5 ? "up" : n < -.5 ? "down" : "flat"
|
|
10704
10738
|
};
|
|
10705
10739
|
}
|
|
10706
|
-
function
|
|
10740
|
+
function Qh({ value: e, trend: t, comparison: n }) {
|
|
10707
10741
|
let r = q(null), { height: i, width: a } = st(r), [o, s] = J(!1), c = i > 220;
|
|
10708
10742
|
return Dc(() => {
|
|
10709
10743
|
let e = r.current;
|
|
@@ -10773,9 +10807,9 @@ function Uh({ value: e, trend: t, comparison: n }) {
|
|
|
10773
10807
|
})
|
|
10774
10808
|
});
|
|
10775
10809
|
}
|
|
10776
|
-
function
|
|
10777
|
-
let l = e.useDashboardFilters !== !1, u = JSON.stringify(r?.value ?? {}), { data: d, isLoading: f, error: p, retry: m } =
|
|
10778
|
-
return /* @__PURE__ */ X(
|
|
10810
|
+
function $h({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c }) {
|
|
10811
|
+
let l = e.useDashboardFilters !== !1, u = JSON.stringify(r?.value ?? {}), { data: d, isLoading: f, error: p, retry: m } = mh(e.fetchData, t, l, u), h = d ? Zh(d.value, d.previousValue) : void 0, g = (t) => e.valueFormatter ? e.valueFormatter(t) : Xh(t, e.format, e.decimals);
|
|
10812
|
+
return /* @__PURE__ */ X(yh, {
|
|
10779
10813
|
title: e.title,
|
|
10780
10814
|
description: e.description,
|
|
10781
10815
|
headerLines: d && !d.comparison ? 3 : 2,
|
|
@@ -10784,7 +10818,7 @@ function Wh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10784
10818
|
isLoading: f,
|
|
10785
10819
|
error: p,
|
|
10786
10820
|
onRetry: m,
|
|
10787
|
-
skeleton: /* @__PURE__ */ X(
|
|
10821
|
+
skeleton: /* @__PURE__ */ X(Yh, {}),
|
|
10788
10822
|
actions: n,
|
|
10789
10823
|
itemFilters: r,
|
|
10790
10824
|
editMode: i,
|
|
@@ -10793,7 +10827,7 @@ function Wh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10793
10827
|
onAskAi: s,
|
|
10794
10828
|
onAskAiTarget: c,
|
|
10795
10829
|
itemId: e.id,
|
|
10796
|
-
children: d ? /* @__PURE__ */ X(
|
|
10830
|
+
children: d ? /* @__PURE__ */ X(Qh, {
|
|
10797
10831
|
value: g(d.value),
|
|
10798
10832
|
trend: h,
|
|
10799
10833
|
comparison: d.comparison ? {
|
|
@@ -10806,16 +10840,16 @@ function Wh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10806
10840
|
}
|
|
10807
10841
|
//#endregion
|
|
10808
10842
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardGrid/DashboardGrid.tsx
|
|
10809
|
-
var
|
|
10843
|
+
var eg = 12, tg = 4, ng = 640, rg = 4, ig = {
|
|
10810
10844
|
chart: 336,
|
|
10811
10845
|
metric: 144,
|
|
10812
10846
|
collection: 480
|
|
10813
|
-
},
|
|
10847
|
+
}, ag = 336, og = {
|
|
10814
10848
|
chart: 240,
|
|
10815
10849
|
metric: 120,
|
|
10816
10850
|
collection: 300
|
|
10817
|
-
},
|
|
10818
|
-
function
|
|
10851
|
+
}, sg = 120;
|
|
10852
|
+
function cg({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, onLayoutChange: a, resetKey: o, onTransformChart: s, onAskAi: c, onAskAiTarget: l, onFullscreenChange: u }) {
|
|
10819
10853
|
let d = q(null), [f, p] = J(!1), [m, h] = J(null);
|
|
10820
10854
|
G(() => {
|
|
10821
10855
|
u?.(!!m);
|
|
@@ -10824,19 +10858,19 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10824
10858
|
let t = /* @__PURE__ */ new Map();
|
|
10825
10859
|
for (let n of e) t.set(n.id, n);
|
|
10826
10860
|
return t;
|
|
10827
|
-
}, [e]), [_, v] = J(() =>
|
|
10861
|
+
}, [e]), [_, v] = J(() => hg(e)), y = q(gg(e));
|
|
10828
10862
|
G(() => {
|
|
10829
|
-
let t =
|
|
10830
|
-
t !== y.current && (y.current = t, v(
|
|
10863
|
+
let t = gg(e);
|
|
10864
|
+
t !== y.current && (y.current = t, v(hg(e)));
|
|
10831
10865
|
}, [e]);
|
|
10832
10866
|
let b = q(o);
|
|
10833
10867
|
G(() => {
|
|
10834
|
-
o !== void 0 && o !== b.current && (b.current = o, v(
|
|
10868
|
+
o !== void 0 && o !== b.current && (b.current = o, v(hg(e)));
|
|
10835
10869
|
}, [o, e]), G(() => {
|
|
10836
10870
|
let e = d.current;
|
|
10837
10871
|
if (!e) return;
|
|
10838
10872
|
let t = new ResizeObserver((e) => {
|
|
10839
|
-
for (let t of e) p(t.contentRect.width <
|
|
10873
|
+
for (let t of e) p(t.contentRect.width < ng);
|
|
10840
10874
|
});
|
|
10841
10875
|
return t.observe(e), () => t.disconnect();
|
|
10842
10876
|
}, []), G(() => {
|
|
@@ -10889,7 +10923,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10889
10923
|
let r = n.map((t) => ({
|
|
10890
10924
|
...t,
|
|
10891
10925
|
ids: t.ids.filter((t) => t !== e)
|
|
10892
|
-
})), i = k.current.get(e), a = i ?
|
|
10926
|
+
})), i = k.current.get(e), a = i ? Sg(i) : ag;
|
|
10893
10927
|
if (t.type === "new-row") r.splice(t.afterRowIdx + 1, 0, {
|
|
10894
10928
|
ids: [e],
|
|
10895
10929
|
height: a
|
|
@@ -10901,7 +10935,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10901
10935
|
else {
|
|
10902
10936
|
let n = Math.min(t.position, r[t.rowIdx].ids.length);
|
|
10903
10937
|
r[t.rowIdx].ids.splice(n, 0, e);
|
|
10904
|
-
let i =
|
|
10938
|
+
let i = yg(r[t.rowIdx], k.current);
|
|
10905
10939
|
r[t.rowIdx].height < i && (r[t.rowIdx] = {
|
|
10906
10940
|
...r[t.rowIdx],
|
|
10907
10941
|
height: i
|
|
@@ -10910,23 +10944,23 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10910
10944
|
return r = r.filter((e) => e.ids.length > 0), x(r), r;
|
|
10911
10945
|
});
|
|
10912
10946
|
}, [x]), I = W((e, t) => {
|
|
10913
|
-
if (
|
|
10947
|
+
if (fg(N.current, e, t)) return null;
|
|
10914
10948
|
let n = d.current ? Array.from(d.current.querySelectorAll("[data-dashboard-row]")) : [], r = O.current;
|
|
10915
10949
|
if (n.length === 0 || n.length !== r.length) return null;
|
|
10916
|
-
let i = n.map((e) => e.getBoundingClientRect()), a =
|
|
10950
|
+
let i = n.map((e) => e.getBoundingClientRect()), a = pg(i, t), o = i[a], s = r[a], c = A.current, l = c ? s.ids.includes(c) : !1, u = o.height / 3;
|
|
10917
10951
|
return t < o.top + u ? {
|
|
10918
10952
|
type: "new-row",
|
|
10919
10953
|
afterRowIdx: a - 1
|
|
10920
10954
|
} : t > o.bottom - u ? {
|
|
10921
10955
|
type: "new-row",
|
|
10922
10956
|
afterRowIdx: a
|
|
10923
|
-
} : l && s.ids.length === 1 ? null : s.ids.length >=
|
|
10957
|
+
} : l && s.ids.length === 1 ? null : s.ids.length >= tg && !l ? {
|
|
10924
10958
|
type: "new-row",
|
|
10925
10959
|
afterRowIdx: a
|
|
10926
10960
|
} : {
|
|
10927
10961
|
type: "into-row",
|
|
10928
10962
|
rowIdx: a,
|
|
10929
|
-
position:
|
|
10963
|
+
position: mg(n[a].querySelectorAll("[data-card-id]"), e, s.ids.length)
|
|
10930
10964
|
};
|
|
10931
10965
|
}, []), ee = W((e, t) => {
|
|
10932
10966
|
if (typeof t.button == "number" && t.button !== 0) return;
|
|
@@ -10935,7 +10969,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10935
10969
|
A.current = e, j.current = null, D(null);
|
|
10936
10970
|
let a = (t) => {
|
|
10937
10971
|
if (!i) {
|
|
10938
|
-
if (Math.hypot(t.clientX - n, t.clientY - r) <
|
|
10972
|
+
if (Math.hypot(t.clientX - n, t.clientY - r) < rg) return;
|
|
10939
10973
|
i = !0, T(e), N.current = Array.from(document.querySelectorAll("[data-ai-chat-dropzone]"));
|
|
10940
10974
|
let a = k.current.get(e)?.title ?? "";
|
|
10941
10975
|
a && window.dispatchEvent(new CustomEvent(ca, { detail: {
|
|
@@ -10965,7 +10999,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10965
10999
|
]);
|
|
10966
11000
|
G(() => () => P.current?.(), []);
|
|
10967
11001
|
let te = W((e, t, n, r) => {
|
|
10968
|
-
let i = Math.max(
|
|
11002
|
+
let i = Math.max(yg(_[e], g), r), a = (r) => {
|
|
10969
11003
|
let a = Math.max(i, n + r.clientY - t);
|
|
10970
11004
|
v((t) => t.map((t, n) => n === e ? {
|
|
10971
11005
|
...t,
|
|
@@ -10988,7 +11022,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10988
11022
|
return /* @__PURE__ */ X("div", {
|
|
10989
11023
|
ref: d,
|
|
10990
11024
|
className: "flex h-full min-h-0 flex-col",
|
|
10991
|
-
children: /* @__PURE__ */ X(
|
|
11025
|
+
children: /* @__PURE__ */ X(Cg, {
|
|
10992
11026
|
item: a,
|
|
10993
11027
|
itemFilters: t?.(a),
|
|
10994
11028
|
filters: n,
|
|
@@ -11005,11 +11039,11 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11005
11039
|
if (m) {
|
|
11006
11040
|
let e = g.get(m);
|
|
11007
11041
|
if (e) {
|
|
11008
|
-
let a = e.type === "chart" &&
|
|
11042
|
+
let a = e.type === "chart" && Rh(e);
|
|
11009
11043
|
return /* @__PURE__ */ X("div", {
|
|
11010
11044
|
ref: d,
|
|
11011
11045
|
className: B("flex flex-col", a ? "min-h-full shrink-0" : "h-full min-h-0"),
|
|
11012
|
-
children: /* @__PURE__ */ X(
|
|
11046
|
+
children: /* @__PURE__ */ X(Cg, {
|
|
11013
11047
|
item: e,
|
|
11014
11048
|
itemFilters: t?.(e),
|
|
11015
11049
|
filters: n,
|
|
@@ -11029,19 +11063,19 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11029
11063
|
return /* @__PURE__ */ Z("div", {
|
|
11030
11064
|
ref: d,
|
|
11031
11065
|
className: "flex flex-col",
|
|
11032
|
-
style: { gap:
|
|
11066
|
+
style: { gap: eg },
|
|
11033
11067
|
children: [
|
|
11034
11068
|
L.map((e, a) => {
|
|
11035
11069
|
let o = w && E?.type === "into-row" && E.rowIdx === a, u = e.ids.some((e) => g.get(e)?.type === "collection");
|
|
11036
11070
|
return /* @__PURE__ */ Z("div", {
|
|
11037
11071
|
className: "relative",
|
|
11038
11072
|
children: [
|
|
11039
|
-
ne ? /* @__PURE__ */ X(
|
|
11073
|
+
ne ? /* @__PURE__ */ X(dg, { active: !!re(a - 1) }) : null,
|
|
11040
11074
|
/* @__PURE__ */ X("div", {
|
|
11041
11075
|
"data-dashboard-row": "",
|
|
11042
11076
|
className: B("flex rounded-lg transition-colors duration-200", o && "bg-f1-background-hover"),
|
|
11043
11077
|
style: {
|
|
11044
|
-
gap:
|
|
11078
|
+
gap: eg,
|
|
11045
11079
|
height: e.height,
|
|
11046
11080
|
...u ? {
|
|
11047
11081
|
overflowY: "clip",
|
|
@@ -11052,7 +11086,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11052
11086
|
let d = g.get(a);
|
|
11053
11087
|
if (!d) return null;
|
|
11054
11088
|
let f = w === a, p = o && E?.type === "into-row" && E.position === u, m = o && E?.type === "into-row" && E.position === e.ids.length && u === e.ids.length - 1;
|
|
11055
|
-
return /* @__PURE__ */ X(
|
|
11089
|
+
return /* @__PURE__ */ X(lg, {
|
|
11056
11090
|
id: a,
|
|
11057
11091
|
isDragging: f,
|
|
11058
11092
|
showIndicatorBefore: !!p,
|
|
@@ -11060,7 +11094,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11060
11094
|
draggable: ne,
|
|
11061
11095
|
onGripPointerDown: ee,
|
|
11062
11096
|
onContentHeightChange: S,
|
|
11063
|
-
children: /* @__PURE__ */ X(
|
|
11097
|
+
children: /* @__PURE__ */ X(Cg, {
|
|
11064
11098
|
item: d,
|
|
11065
11099
|
itemFilters: t?.(d),
|
|
11066
11100
|
filters: n,
|
|
@@ -11080,14 +11114,14 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11080
11114
|
onMouseDown: (t) => {
|
|
11081
11115
|
t.preventDefault();
|
|
11082
11116
|
let n = t.currentTarget.parentElement?.querySelector("[data-dashboard-row]"), r = Math.max(n?.getBoundingClientRect().height ?? 0, e.height), i = new Set(e.ids.filter((e) => g.get(e)?.type !== "chart"));
|
|
11083
|
-
te(a, t.clientY, r,
|
|
11117
|
+
te(a, t.clientY, r, bg(n, i));
|
|
11084
11118
|
},
|
|
11085
11119
|
children: /* @__PURE__ */ X("div", { className: "h-1 w-16 rounded-full bg-transparent transition-colors group-hover/resize:bg-f1-foreground-tertiary" })
|
|
11086
11120
|
}) : null
|
|
11087
11121
|
]
|
|
11088
11122
|
}, a);
|
|
11089
11123
|
}),
|
|
11090
|
-
ne ? /* @__PURE__ */ X(
|
|
11124
|
+
ne ? /* @__PURE__ */ X(dg, { active: !!re(L.length - 1) }) : null,
|
|
11091
11125
|
w ? /* @__PURE__ */ X("div", {
|
|
11092
11126
|
ref: M,
|
|
11093
11127
|
className: "pointer-events-none fixed left-0 top-0 z-50 max-w-xs truncate rounded-lg border border-solid border-f1-border-secondary bg-f1-background px-3 py-2 text-sm font-medium text-f1-foreground shadow-lg",
|
|
@@ -11097,7 +11131,7 @@ function $h({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11097
11131
|
]
|
|
11098
11132
|
});
|
|
11099
11133
|
}
|
|
11100
|
-
function
|
|
11134
|
+
function lg({ id: e, isDragging: t, showIndicatorBefore: n, showIndicatorAfter: r, draggable: i, onGripPointerDown: a, onContentHeightChange: o, children: s }) {
|
|
11101
11135
|
let c = q(null);
|
|
11102
11136
|
return G(() => {
|
|
11103
11137
|
let t = c.current;
|
|
@@ -11120,7 +11154,7 @@ function eg({ id: e, isDragging: t, showIndicatorBefore: n, showIndicatorAfter:
|
|
|
11120
11154
|
n = !0, s.disconnect(), l.disconnect();
|
|
11121
11155
|
};
|
|
11122
11156
|
}, [e, o]), /* @__PURE__ */ Z(Y, { children: [
|
|
11123
|
-
n ? /* @__PURE__ */ X(
|
|
11157
|
+
n ? /* @__PURE__ */ X(ug, {}) : null,
|
|
11124
11158
|
/* @__PURE__ */ Z("div", {
|
|
11125
11159
|
ref: c,
|
|
11126
11160
|
"data-card-id": e,
|
|
@@ -11135,44 +11169,44 @@ function eg({ id: e, isDragging: t, showIndicatorBefore: n, showIndicatorAfter:
|
|
|
11135
11169
|
})
|
|
11136
11170
|
}) : null, s]
|
|
11137
11171
|
}),
|
|
11138
|
-
r ? /* @__PURE__ */ X(
|
|
11172
|
+
r ? /* @__PURE__ */ X(ug, {}) : null
|
|
11139
11173
|
] });
|
|
11140
11174
|
}
|
|
11141
|
-
function
|
|
11175
|
+
function ug() {
|
|
11142
11176
|
return /* @__PURE__ */ X("div", {
|
|
11143
11177
|
className: "mx-[-2px] w-1 flex-shrink-0 self-stretch py-2",
|
|
11144
11178
|
children: /* @__PURE__ */ X("div", { className: "h-full w-full rounded-full bg-f1-background-secondary-hover" })
|
|
11145
11179
|
});
|
|
11146
11180
|
}
|
|
11147
|
-
function
|
|
11181
|
+
function dg({ active: e }) {
|
|
11148
11182
|
return /* @__PURE__ */ X("div", {
|
|
11149
11183
|
className: "pointer-events-none relative flex items-center justify-center transition-all",
|
|
11150
11184
|
style: { minHeight: e ? 12 : 0 },
|
|
11151
11185
|
children: /* @__PURE__ */ X("div", { className: B("absolute inset-x-0 top-1/2 h-1 -translate-y-1/2 rounded-full transition-colors", e ? "bg-f1-background-secondary-hover" : "bg-transparent") })
|
|
11152
11186
|
});
|
|
11153
11187
|
}
|
|
11154
|
-
function
|
|
11188
|
+
function fg(e, t, n) {
|
|
11155
11189
|
for (let r of e) {
|
|
11156
11190
|
let e = r.getBoundingClientRect();
|
|
11157
11191
|
if (t >= e.left && t <= e.right && n >= e.top && n <= e.bottom) return !0;
|
|
11158
11192
|
}
|
|
11159
11193
|
return !1;
|
|
11160
11194
|
}
|
|
11161
|
-
function
|
|
11195
|
+
function pg(e, t) {
|
|
11162
11196
|
for (let n = 0; n < e.length - 1; n++) if (t < (e[n].bottom + e[n + 1].top) / 2) return n;
|
|
11163
11197
|
return e.length - 1;
|
|
11164
11198
|
}
|
|
11165
|
-
function
|
|
11199
|
+
function mg(e, t, n) {
|
|
11166
11200
|
for (let n = 0; n < e.length; n++) {
|
|
11167
11201
|
let r = e[n].getBoundingClientRect();
|
|
11168
11202
|
if (t < r.left + r.width / 2) return n;
|
|
11169
11203
|
}
|
|
11170
11204
|
return n;
|
|
11171
11205
|
}
|
|
11172
|
-
function
|
|
11173
|
-
return e.some((e) => e.y !== void 0) ?
|
|
11206
|
+
function hg(e) {
|
|
11207
|
+
return e.some((e) => e.y !== void 0) ? _g(e) : vg(e);
|
|
11174
11208
|
}
|
|
11175
|
-
function
|
|
11209
|
+
function gg(e) {
|
|
11176
11210
|
return JSON.stringify(e.map((e) => [
|
|
11177
11211
|
e.id,
|
|
11178
11212
|
e.type,
|
|
@@ -11183,10 +11217,10 @@ function sg(e) {
|
|
|
11183
11217
|
e.colSpan ?? null
|
|
11184
11218
|
]));
|
|
11185
11219
|
}
|
|
11186
|
-
function
|
|
11220
|
+
function _g(e) {
|
|
11187
11221
|
let t = [...e].sort((e, t) => (e.y ?? 0) - (t.y ?? 0) || (e.x ?? 0) - (t.x ?? 0)), n = /* @__PURE__ */ new Map();
|
|
11188
11222
|
for (let e of t) {
|
|
11189
|
-
let t = e.y ?? 0, r =
|
|
11223
|
+
let t = e.y ?? 0, r = Sg(e), i = n.get(t);
|
|
11190
11224
|
i || (i = {
|
|
11191
11225
|
ids: [],
|
|
11192
11226
|
maxHeight: 0
|
|
@@ -11197,11 +11231,11 @@ function cg(e) {
|
|
|
11197
11231
|
height: e.maxHeight
|
|
11198
11232
|
}));
|
|
11199
11233
|
}
|
|
11200
|
-
function
|
|
11234
|
+
function vg(e) {
|
|
11201
11235
|
let t = [], n = [], r = 0, i = 0;
|
|
11202
11236
|
for (let a of e) {
|
|
11203
|
-
let e =
|
|
11204
|
-
r + e >
|
|
11237
|
+
let e = xg(a), o = Sg(a);
|
|
11238
|
+
r + e > tg && n.length > 0 && (t.push({
|
|
11205
11239
|
ids: n,
|
|
11206
11240
|
height: i
|
|
11207
11241
|
}), n = [], r = 0, i = 0), n.push(a.id), r += e, o > i && (i = o);
|
|
@@ -11211,17 +11245,17 @@ function lg(e) {
|
|
|
11211
11245
|
height: i
|
|
11212
11246
|
}), t;
|
|
11213
11247
|
}
|
|
11214
|
-
function
|
|
11215
|
-
let n =
|
|
11248
|
+
function yg(e, t) {
|
|
11249
|
+
let n = sg;
|
|
11216
11250
|
for (let r of e.ids) {
|
|
11217
11251
|
let e = t.get(r);
|
|
11218
11252
|
if (!e) continue;
|
|
11219
|
-
let i =
|
|
11253
|
+
let i = og[e.type] ?? sg;
|
|
11220
11254
|
i > n && (n = i);
|
|
11221
11255
|
}
|
|
11222
11256
|
return n;
|
|
11223
11257
|
}
|
|
11224
|
-
function
|
|
11258
|
+
function bg(e, t) {
|
|
11225
11259
|
if (!e || t.size === 0) return 0;
|
|
11226
11260
|
let n = e.style.height, r = e.style.minHeight, i = () => {
|
|
11227
11261
|
let n = 0;
|
|
@@ -11237,15 +11271,15 @@ function dg(e, t) {
|
|
|
11237
11271
|
let o = Math.max(a, i());
|
|
11238
11272
|
return e.style.height = n, e.style.minHeight = r, o;
|
|
11239
11273
|
}
|
|
11240
|
-
function
|
|
11241
|
-
return e.type === "metric" ? 1 : e.type === "chart" ? 2 : e.type === "collection" ?
|
|
11274
|
+
function xg(e) {
|
|
11275
|
+
return e.type === "metric" ? 1 : e.type === "chart" ? 2 : e.type === "collection" ? tg : 2;
|
|
11242
11276
|
}
|
|
11243
|
-
function
|
|
11244
|
-
return e.itemHeight && e.itemHeight > 0 ? e.itemHeight : e.rowSpan ? e.rowSpan * 48 :
|
|
11277
|
+
function Sg(e) {
|
|
11278
|
+
return e.itemHeight && e.itemHeight > 0 ? e.itemHeight : e.rowSpan ? e.rowSpan * 48 : ig[e.type] ?? ag;
|
|
11245
11279
|
}
|
|
11246
|
-
function
|
|
11280
|
+
function Cg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, onDelete: o, onTransformChart: s, onAskAi: c, onAskAiTarget: l, isFullscreen: u, onFullscreenChange: d }) {
|
|
11247
11281
|
switch (e.type) {
|
|
11248
|
-
case "chart": return /* @__PURE__ */ X(
|
|
11282
|
+
case "chart": return /* @__PURE__ */ X(zh, {
|
|
11249
11283
|
item: e,
|
|
11250
11284
|
filters: t,
|
|
11251
11285
|
actions: n,
|
|
@@ -11259,7 +11293,7 @@ function mg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11259
11293
|
isFullscreen: u,
|
|
11260
11294
|
onFullscreenChange: d
|
|
11261
11295
|
});
|
|
11262
|
-
case "metric": return /* @__PURE__ */ X(
|
|
11296
|
+
case "metric": return /* @__PURE__ */ X($h, {
|
|
11263
11297
|
item: e,
|
|
11264
11298
|
filters: t,
|
|
11265
11299
|
actions: n,
|
|
@@ -11272,7 +11306,7 @@ function mg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11272
11306
|
isFullscreen: u,
|
|
11273
11307
|
onFullscreenChange: d
|
|
11274
11308
|
});
|
|
11275
|
-
case "collection": return /* @__PURE__ */ X(
|
|
11309
|
+
case "collection": return /* @__PURE__ */ X(Jh, {
|
|
11276
11310
|
item: e,
|
|
11277
11311
|
filters: t,
|
|
11278
11312
|
actions: n,
|
|
@@ -11287,7 +11321,7 @@ function mg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11287
11321
|
});
|
|
11288
11322
|
default: {
|
|
11289
11323
|
let t = e;
|
|
11290
|
-
return /* @__PURE__ */ X(
|
|
11324
|
+
return /* @__PURE__ */ X(yh, {
|
|
11291
11325
|
title: t.title ?? "Unknown",
|
|
11292
11326
|
isLoading: !1,
|
|
11293
11327
|
error: /* @__PURE__ */ Error(`Unknown dashboard item type: "${t.type}"`),
|
|
@@ -11298,7 +11332,7 @@ function mg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11298
11332
|
}
|
|
11299
11333
|
//#endregion
|
|
11300
11334
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ExportDropdown/ExportDropdown.tsx
|
|
11301
|
-
function
|
|
11335
|
+
function wg({ onExportExcel: e, isExporting: t }) {
|
|
11302
11336
|
let { t: n } = z();
|
|
11303
11337
|
return /* @__PURE__ */ X(Ur, {
|
|
11304
11338
|
items: [{
|
|
@@ -11311,17 +11345,17 @@ function hg({ onExportExcel: e, isExporting: t }) {
|
|
|
11311
11345
|
}
|
|
11312
11346
|
//#endregion
|
|
11313
11347
|
//#region src/blocks/OneFilterPicker/internal/ControlledOneFilterPicker.tsx
|
|
11314
|
-
function
|
|
11348
|
+
function Tg(e) {
|
|
11315
11349
|
return /* @__PURE__ */ X(as.Provider, {
|
|
11316
11350
|
value: "controlled",
|
|
11317
11351
|
children: /* @__PURE__ */ X(Ds, { ...e })
|
|
11318
11352
|
});
|
|
11319
11353
|
}
|
|
11320
|
-
|
|
11354
|
+
Tg.displayName = "ControlledOneFilterPicker";
|
|
11321
11355
|
//#endregion
|
|
11322
11356
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/FilterBar/FilterBar.tsx
|
|
11323
|
-
function
|
|
11324
|
-
return !e && !n ? null : /* @__PURE__ */ X(
|
|
11357
|
+
function Eg({ filters: e, value: t, presets: n, presetsLoading: r, onChange: i, disabled: a }) {
|
|
11358
|
+
return !e && !n ? null : /* @__PURE__ */ X(Tg, {
|
|
11325
11359
|
filters: e,
|
|
11326
11360
|
value: t,
|
|
11327
11361
|
presets: n,
|
|
@@ -11333,7 +11367,7 @@ function _g({ filters: e, value: t, presets: n, presetsLoading: r, onChange: i,
|
|
|
11333
11367
|
}
|
|
11334
11368
|
//#endregion
|
|
11335
11369
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/FilterBar/FilterBarSkeleton.tsx
|
|
11336
|
-
function
|
|
11370
|
+
function Dg() {
|
|
11337
11371
|
return /* @__PURE__ */ Z("div", {
|
|
11338
11372
|
className: "flex items-center gap-1",
|
|
11339
11373
|
role: "status",
|
|
@@ -11347,23 +11381,23 @@ function vg() {
|
|
|
11347
11381
|
}
|
|
11348
11382
|
//#endregion
|
|
11349
11383
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/extractColumns.ts
|
|
11350
|
-
function
|
|
11384
|
+
function Og(e) {
|
|
11351
11385
|
if (e.length === 0) return [];
|
|
11352
11386
|
let t = e[0];
|
|
11353
11387
|
return Object.keys(t).filter((e) => typeof e == "string" && !e.startsWith("_"));
|
|
11354
11388
|
}
|
|
11355
11389
|
//#endregion
|
|
11356
11390
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useDashboardExport.ts
|
|
11357
|
-
function
|
|
11391
|
+
function kg(e, t) {
|
|
11358
11392
|
return e.useDashboardFilters === !1 ? {} : t;
|
|
11359
11393
|
}
|
|
11360
|
-
async function
|
|
11394
|
+
async function Ag(e, t) {
|
|
11361
11395
|
if (e.length === 0) return null;
|
|
11362
11396
|
let n = await Promise.all(e.map(async (e) => {
|
|
11363
11397
|
try {
|
|
11364
11398
|
return {
|
|
11365
11399
|
item: e,
|
|
11366
|
-
data: await e.fetchData(
|
|
11400
|
+
data: await e.fetchData(kg(e, t))
|
|
11367
11401
|
};
|
|
11368
11402
|
} catch (t) {
|
|
11369
11403
|
return console.warn(`[useDashboardExport] Failed to export metric "${e.title}":`, t), null;
|
|
@@ -11387,14 +11421,14 @@ async function xg(e, t) {
|
|
|
11387
11421
|
rows: r
|
|
11388
11422
|
};
|
|
11389
11423
|
}
|
|
11390
|
-
async function
|
|
11391
|
-
let n = [], r = await
|
|
11424
|
+
async function jg(e, t) {
|
|
11425
|
+
let n = [], r = await Ag(e.filter((e) => e.type === "metric"), t);
|
|
11392
11426
|
r && n.push(r);
|
|
11393
11427
|
let i = e.filter((e) => e.type !== "metric").map(async (e) => {
|
|
11394
11428
|
if (e.type === "chart") try {
|
|
11395
|
-
let n = await e.fetchData(
|
|
11396
|
-
if (!
|
|
11397
|
-
let r =
|
|
11429
|
+
let n = await e.fetchData(kg(e, t));
|
|
11430
|
+
if (!Mm(e.chart)) return console.warn(`[useDashboardExport] Skipped chart "${e.title}": unsupported chart type`), null;
|
|
11431
|
+
let r = Jm(e.chart, n);
|
|
11398
11432
|
return {
|
|
11399
11433
|
name: e.title,
|
|
11400
11434
|
columns: r.columns,
|
|
@@ -11405,7 +11439,7 @@ async function Sg(e, t) {
|
|
|
11405
11439
|
return console.warn(`[useDashboardExport] Failed to export chart "${e.title}":`, t), null;
|
|
11406
11440
|
}
|
|
11407
11441
|
if (e.type === "collection") try {
|
|
11408
|
-
let n = await e.createSource(
|
|
11442
|
+
let n = await e.createSource(kg(e, t)).dataAdapter.fetchData({
|
|
11409
11443
|
filters: {},
|
|
11410
11444
|
sortings: [],
|
|
11411
11445
|
pagination: {
|
|
@@ -11414,16 +11448,16 @@ async function Sg(e, t) {
|
|
|
11414
11448
|
}
|
|
11415
11449
|
}), r = "records" in n ? n.records : n;
|
|
11416
11450
|
if (r.length === 0) return null;
|
|
11417
|
-
let i =
|
|
11451
|
+
let i = ah(e.title, e.description), a = Bh(e.visualizations);
|
|
11418
11452
|
return a.length > 0 ? {
|
|
11419
11453
|
name: e.title,
|
|
11420
11454
|
columns: a.map((e) => e.label),
|
|
11421
11455
|
keys: a.map((e) => e.id),
|
|
11422
|
-
rows:
|
|
11456
|
+
rows: Vh(r, a),
|
|
11423
11457
|
preamble: i
|
|
11424
11458
|
} : {
|
|
11425
11459
|
name: e.title,
|
|
11426
|
-
columns:
|
|
11460
|
+
columns: Og(r),
|
|
11427
11461
|
rows: r,
|
|
11428
11462
|
preamble: i
|
|
11429
11463
|
};
|
|
@@ -11435,7 +11469,7 @@ async function Sg(e, t) {
|
|
|
11435
11469
|
for (let e of a) e && n.push(e);
|
|
11436
11470
|
return n;
|
|
11437
11471
|
}
|
|
11438
|
-
function
|
|
11472
|
+
function Mg({ items: e, filters: t, filename: n = "dashboard" }) {
|
|
11439
11473
|
let [r, i] = J(!1), a = q(e);
|
|
11440
11474
|
a.current = e;
|
|
11441
11475
|
let o = q(t);
|
|
@@ -11445,8 +11479,8 @@ function Cg({ items: e, filters: t, filename: n = "dashboard" }) {
|
|
|
11445
11479
|
exportAsExcel: W(async () => {
|
|
11446
11480
|
i(!0);
|
|
11447
11481
|
try {
|
|
11448
|
-
let e = await
|
|
11449
|
-
e.length > 0 && await
|
|
11482
|
+
let e = await jg(a.current, o.current);
|
|
11483
|
+
e.length > 0 && await uh(e, s.current);
|
|
11450
11484
|
} finally {
|
|
11451
11485
|
i(!1);
|
|
11452
11486
|
}
|
|
@@ -11456,7 +11490,7 @@ function Cg({ items: e, filters: t, filename: n = "dashboard" }) {
|
|
|
11456
11490
|
}
|
|
11457
11491
|
//#endregion
|
|
11458
11492
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/F0AnalyticsDashboard.tsx
|
|
11459
|
-
var
|
|
11493
|
+
var Ng = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFiltersChange: i, items: a, itemFilters: o, editMode: s, readOnly: c = !1, onLayoutChange: l, enableExport: u, exportFilename: d, onExportReady: f, resetKey: p, onTransformChart: m, onAskAi: h, onAskAiTarget: g, navigationFilters: _, filtersLoading: v }) => {
|
|
11460
11494
|
let y = z(), [b = {}, x] = qs({
|
|
11461
11495
|
prop: r,
|
|
11462
11496
|
defaultProp: n ?? {},
|
|
@@ -11466,7 +11500,7 @@ var wg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11466
11500
|
let e = {};
|
|
11467
11501
|
for (let [t, n] of Object.entries(_)) e[t] = dn[n.type].valueConverter?.(n.defaultValue, n, y) ?? n.defaultValue;
|
|
11468
11502
|
return e;
|
|
11469
|
-
}, []), [C, w] = J(S), { exportAsExcel: T, isExporting: E } =
|
|
11503
|
+
}, []), [C, w] = J(S), { exportAsExcel: T, isExporting: E } = Mg({
|
|
11470
11504
|
items: a,
|
|
11471
11505
|
filters: b,
|
|
11472
11506
|
filename: d
|
|
@@ -11486,13 +11520,13 @@ var wg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11486
11520
|
className: "flex items-center justify-between gap-4 px-5",
|
|
11487
11521
|
children: [/* @__PURE__ */ X("div", {
|
|
11488
11522
|
className: "w-full",
|
|
11489
|
-
children: e ? /* @__PURE__ */ X(
|
|
11523
|
+
children: e ? /* @__PURE__ */ X(Eg, {
|
|
11490
11524
|
filters: e,
|
|
11491
11525
|
value: b,
|
|
11492
11526
|
presets: t,
|
|
11493
11527
|
onChange: x,
|
|
11494
11528
|
disabled: c
|
|
11495
|
-
}) : v ? /* @__PURE__ */ X(
|
|
11529
|
+
}) : v ? /* @__PURE__ */ X(Dg, {}) : null
|
|
11496
11530
|
}), /* @__PURE__ */ Z("div", {
|
|
11497
11531
|
className: "flex shrink-0 items-center gap-2",
|
|
11498
11532
|
children: [_ ? /* @__PURE__ */ X(le, {
|
|
@@ -11500,14 +11534,14 @@ var wg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11500
11534
|
currentNavigationFilters: C,
|
|
11501
11535
|
onChangeNavigationFilters: w,
|
|
11502
11536
|
disabled: c
|
|
11503
|
-
}) : null, u ? /* @__PURE__ */ X(
|
|
11537
|
+
}) : null, u ? /* @__PURE__ */ X(wg, {
|
|
11504
11538
|
onExportExcel: T,
|
|
11505
11539
|
isExporting: E
|
|
11506
11540
|
}) : null]
|
|
11507
11541
|
})]
|
|
11508
11542
|
}) : null, /* @__PURE__ */ X("div", {
|
|
11509
11543
|
className: B("px-5", j && "flex min-h-0 flex-1 flex-col pb-5"),
|
|
11510
|
-
children: /* @__PURE__ */ X(
|
|
11544
|
+
children: /* @__PURE__ */ X(cg, {
|
|
11511
11545
|
items: a,
|
|
11512
11546
|
itemFilters: c ? void 0 : o,
|
|
11513
11547
|
filters: {
|
|
@@ -11526,17 +11560,17 @@ var wg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11526
11560
|
})]
|
|
11527
11561
|
});
|
|
11528
11562
|
};
|
|
11529
|
-
|
|
11530
|
-
var
|
|
11531
|
-
process.env.NODE_ENV !== "production" && (
|
|
11532
|
-
function
|
|
11533
|
-
let e = U.useContext(
|
|
11563
|
+
Ng.displayName = "F0AnalyticsDashboard";
|
|
11564
|
+
var Pg = gn("F0AnalyticsDashboard", Ng), Fg = () => ar("(min-width: 640px)", { initializeWithValue: !1 }), Ig = () => ar("(max-width: 639px)", { initializeWithValue: !1 }), Lg = /*#__PURE__*/ U.createContext(void 0);
|
|
11565
|
+
process.env.NODE_ENV !== "production" && (Lg.displayName = "ToastContext");
|
|
11566
|
+
function Rg() {
|
|
11567
|
+
let e = U.useContext(Lg);
|
|
11534
11568
|
if (!e) throw Error(process.env.NODE_ENV === "production" ? En(73) : "Base UI: useToastManager must be used within <Toast.Provider>.");
|
|
11535
11569
|
return e;
|
|
11536
11570
|
}
|
|
11537
11571
|
//#endregion
|
|
11538
11572
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/utils/resolvePromiseOptions.mjs
|
|
11539
|
-
function
|
|
11573
|
+
function zg(e, t) {
|
|
11540
11574
|
if (typeof e == "string") return { description: e };
|
|
11541
11575
|
if (typeof e == "function") {
|
|
11542
11576
|
let n = e(t);
|
|
@@ -11546,7 +11580,7 @@ function Ag(e, t) {
|
|
|
11546
11580
|
}
|
|
11547
11581
|
//#endregion
|
|
11548
11582
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/store.mjs
|
|
11549
|
-
function
|
|
11583
|
+
function Bg(e) {
|
|
11550
11584
|
let t = /* @__PURE__ */ new Map(), n = 0, r = 0;
|
|
11551
11585
|
return e.forEach((e, i) => {
|
|
11552
11586
|
let a = e.transitionStatus === "ending";
|
|
@@ -11558,7 +11592,7 @@ function jg(e) {
|
|
|
11558
11592
|
}), r += e.height || 0, a || (n += 1);
|
|
11559
11593
|
}), t;
|
|
11560
11594
|
}
|
|
11561
|
-
function
|
|
11595
|
+
function Vg(e, t) {
|
|
11562
11596
|
let n = 0;
|
|
11563
11597
|
return e.map((e) => {
|
|
11564
11598
|
if (e.transitionStatus === "ending") return e;
|
|
@@ -11569,7 +11603,7 @@ function Mg(e, t) {
|
|
|
11569
11603
|
};
|
|
11570
11604
|
});
|
|
11571
11605
|
}
|
|
11572
|
-
var
|
|
11606
|
+
var Hg = {
|
|
11573
11607
|
toasts: (e) => e.toasts,
|
|
11574
11608
|
isEmpty: (e) => e.toasts.length === 0,
|
|
11575
11609
|
toast: (e, t) => e.toastMetadata.get(t)?.value,
|
|
@@ -11580,14 +11614,14 @@ var Ng = {
|
|
|
11580
11614
|
expanded: (e) => e.hovering || e.focused,
|
|
11581
11615
|
expandedOrOutOfFocus: (e) => e.hovering || e.focused || !e.isWindowFocused,
|
|
11582
11616
|
prevFocusElement: (e) => e.prevFocusElement
|
|
11583
|
-
},
|
|
11617
|
+
}, Ug = class extends Ln {
|
|
11584
11618
|
timers = /* @__PURE__ */ new Map();
|
|
11585
11619
|
areTimersPaused = !1;
|
|
11586
11620
|
constructor(e) {
|
|
11587
11621
|
super({
|
|
11588
11622
|
...e,
|
|
11589
|
-
toastMetadata:
|
|
11590
|
-
}, {},
|
|
11623
|
+
toastMetadata: Bg(e.toasts)
|
|
11624
|
+
}, {}, Hg);
|
|
11591
11625
|
}
|
|
11592
11626
|
setViewport = (e) => {
|
|
11593
11627
|
this.set("viewport", e);
|
|
@@ -11600,8 +11634,8 @@ var Ng = {
|
|
|
11600
11634
|
limit: t
|
|
11601
11635
|
};
|
|
11602
11636
|
if (n) {
|
|
11603
|
-
let e =
|
|
11604
|
-
r.toasts = e, r.toastMetadata =
|
|
11637
|
+
let e = Vg(this.state.toasts, t);
|
|
11638
|
+
r.toasts = e, r.toastMetadata = Bg(e);
|
|
11605
11639
|
}
|
|
11606
11640
|
this.update(r);
|
|
11607
11641
|
}
|
|
@@ -11611,7 +11645,7 @@ var Ng = {
|
|
|
11611
11645
|
}), this.timers.clear();
|
|
11612
11646
|
};
|
|
11613
11647
|
removeToast(e, t = !1) {
|
|
11614
|
-
let n =
|
|
11648
|
+
let n = Hg.toastIndex(this.state, e);
|
|
11615
11649
|
if (n === -1) return;
|
|
11616
11650
|
let r = this.state.toasts[n];
|
|
11617
11651
|
t || r?.onRemove?.();
|
|
@@ -11621,7 +11655,7 @@ var Ng = {
|
|
|
11621
11655
|
addToast = (e) => {
|
|
11622
11656
|
let { timeout: t, limit: n } = this.state, r = e.id || et("toast");
|
|
11623
11657
|
if (e.id) {
|
|
11624
|
-
let t =
|
|
11658
|
+
let t = Hg.toast(this.state, e.id);
|
|
11625
11659
|
if (t) {
|
|
11626
11660
|
if (t.transitionStatus === "ending") this.removeToast(e.id, !0);
|
|
11627
11661
|
else {
|
|
@@ -11636,16 +11670,16 @@ var Ng = {
|
|
|
11636
11670
|
updateKey: 0,
|
|
11637
11671
|
transitionStatus: "starting"
|
|
11638
11672
|
}, a = [i, ...this.state.toasts];
|
|
11639
|
-
this.setToasts(
|
|
11673
|
+
this.setToasts(Vg(a, n));
|
|
11640
11674
|
let o = i.timeout ?? t;
|
|
11641
|
-
return i.type !== "loading" && o > 0 && this.scheduleTimer(r, o, () => this.closeToast(r)),
|
|
11675
|
+
return i.type !== "loading" && o > 0 && this.scheduleTimer(r, o, () => this.closeToast(r)), Hg.expandedOrOutOfFocus(this.state) && this.pauseTimers(), r;
|
|
11642
11676
|
};
|
|
11643
11677
|
updateToast = (e, t) => {
|
|
11644
|
-
let n =
|
|
11678
|
+
let n = Hg.toast(this.state, e);
|
|
11645
11679
|
n && n.transitionStatus !== "ending" && this.updateToastInternal(e, typeof t == "function" ? t(n) : t, !1, !0);
|
|
11646
11680
|
};
|
|
11647
11681
|
updateToastInternal = (e, t, n = !1, r = !1) => {
|
|
11648
|
-
let { timeout: i, toasts: a } = this.state, o =
|
|
11682
|
+
let { timeout: i, toasts: a } = this.state, o = Hg.toast(this.state, e);
|
|
11649
11683
|
if (!o || o.transitionStatus === "ending") return;
|
|
11650
11684
|
let s = {
|
|
11651
11685
|
...o,
|
|
@@ -11654,17 +11688,17 @@ var Ng = {
|
|
|
11654
11688
|
};
|
|
11655
11689
|
this.setToasts(a.map((t) => t.id === e ? s : t));
|
|
11656
11690
|
let c = s.timeout ?? i, l = o.timeout ?? i, u = Object.hasOwn(t, "timeout"), d = s.transitionStatus !== "ending" && s.type !== "loading" && c > 0, f = this.timers.has(e), p = l !== c, m = o.type === "loading";
|
|
11657
|
-
!d && f ? this.clearTimer(e) : d && (!f || p || u || m || n) && (this.clearTimer(e), this.scheduleTimer(e, c, () => this.closeToast(e)),
|
|
11691
|
+
!d && f ? this.clearTimer(e) : d && (!f || p || u || m || n) && (this.clearTimer(e), this.scheduleTimer(e, c, () => this.closeToast(e)), Hg.expandedOrOutOfFocus(this.state) && this.pauseTimers());
|
|
11658
11692
|
};
|
|
11659
11693
|
closeToast = (e) => {
|
|
11660
11694
|
let t = e === void 0, { limit: n, toasts: r } = this.state, i;
|
|
11661
11695
|
if (t) i = r, this.clearTimers();
|
|
11662
11696
|
else {
|
|
11663
|
-
let t =
|
|
11697
|
+
let t = Hg.toast(this.state, e);
|
|
11664
11698
|
if (!t) return;
|
|
11665
11699
|
i = [t], this.clearTimer(e);
|
|
11666
11700
|
}
|
|
11667
|
-
let a =
|
|
11701
|
+
let a = Vg(r.map((n) => t || n.id === e ? {
|
|
11668
11702
|
...n,
|
|
11669
11703
|
transitionStatus: "ending",
|
|
11670
11704
|
height: 0
|
|
@@ -11674,18 +11708,18 @@ var Ng = {
|
|
|
11674
11708
|
}), this.handleFocusManagement(e);
|
|
11675
11709
|
};
|
|
11676
11710
|
promiseToast = (e, t) => {
|
|
11677
|
-
let n =
|
|
11711
|
+
let n = zg(t.loading), r = this.addToast({
|
|
11678
11712
|
...n,
|
|
11679
11713
|
type: "loading"
|
|
11680
11714
|
}), i = e.then((e) => {
|
|
11681
|
-
let n =
|
|
11715
|
+
let n = zg(t.success, e);
|
|
11682
11716
|
return this.updateToast(r, {
|
|
11683
11717
|
...n,
|
|
11684
11718
|
type: "success",
|
|
11685
11719
|
timeout: n.timeout
|
|
11686
11720
|
}), e;
|
|
11687
11721
|
}).catch((e) => {
|
|
11688
|
-
let n =
|
|
11722
|
+
let n = zg(t.error, e);
|
|
11689
11723
|
return this.updateToast(r, {
|
|
11690
11724
|
...n,
|
|
11691
11725
|
type: "error",
|
|
@@ -11718,7 +11752,7 @@ var Ng = {
|
|
|
11718
11752
|
}));
|
|
11719
11753
|
};
|
|
11720
11754
|
scheduleTimer(e, t, n) {
|
|
11721
|
-
let r = Date.now(), i =
|
|
11755
|
+
let r = Date.now(), i = Hg.expandedOrOutOfFocus(this.state) ? void 0 : Fn.create();
|
|
11722
11756
|
i?.start(t, () => {
|
|
11723
11757
|
this.handleTimerFired(e), n();
|
|
11724
11758
|
}), this.timers.set(e, {
|
|
@@ -11746,7 +11780,7 @@ var Ng = {
|
|
|
11746
11780
|
setToasts(e, t = e.length === 0) {
|
|
11747
11781
|
let n = {
|
|
11748
11782
|
toasts: e,
|
|
11749
|
-
toastMetadata:
|
|
11783
|
+
toastMetadata: Bg(e)
|
|
11750
11784
|
};
|
|
11751
11785
|
t && (n.hovering = !1, n.focused = !1), this.update(n);
|
|
11752
11786
|
}
|
|
@@ -11757,14 +11791,14 @@ var Ng = {
|
|
|
11757
11791
|
this.restoreFocusToPrevElement();
|
|
11758
11792
|
return;
|
|
11759
11793
|
}
|
|
11760
|
-
let n =
|
|
11794
|
+
let n = Hg.toasts(this.state), r = Hg.toastIndex(this.state, e), i = (e, t) => {
|
|
11761
11795
|
for (let r = e; r >= 0 && r < n.length; r += t) if (n[r].transitionStatus !== "ending") return n[r];
|
|
11762
11796
|
return null;
|
|
11763
11797
|
}, a = i(r + 1, 1) ?? i(r - 1, -1);
|
|
11764
11798
|
a ? a.ref?.current?.focus() : this.restoreFocusToPrevElement();
|
|
11765
11799
|
}
|
|
11766
|
-
},
|
|
11767
|
-
let { children: t, timeout: n = 5e3, limit: r = 3, toastManager: i } = e, a = Sn(() => new
|
|
11800
|
+
}, Wg = function(e) {
|
|
11801
|
+
let { children: t, timeout: n = 5e3, limit: r = 3, toastManager: i } = e, a = Sn(() => new Ug({
|
|
11768
11802
|
timeout: n,
|
|
11769
11803
|
limit: r,
|
|
11770
11804
|
viewport: null,
|
|
@@ -11779,17 +11813,17 @@ var Ng = {
|
|
|
11779
11813
|
let n = t.id;
|
|
11780
11814
|
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);
|
|
11781
11815
|
});
|
|
11782
|
-
}, [a, i]), /*#__PURE__*/ Z(
|
|
11816
|
+
}, [a, i]), /*#__PURE__*/ Z(Lg.Provider, {
|
|
11783
11817
|
value: a,
|
|
11784
|
-
children: [/*#__PURE__*/ X(
|
|
11818
|
+
children: [/*#__PURE__*/ X(Gg, {
|
|
11785
11819
|
store: a,
|
|
11786
11820
|
timeout: n,
|
|
11787
11821
|
limit: r
|
|
11788
11822
|
}), t]
|
|
11789
11823
|
});
|
|
11790
11824
|
};
|
|
11791
|
-
process.env.NODE_ENV !== "production" && (
|
|
11792
|
-
function
|
|
11825
|
+
process.env.NODE_ENV !== "production" && (Wg.displayName = "ToastProvider");
|
|
11826
|
+
function Gg(e) {
|
|
11793
11827
|
let { store: t, timeout: n, limit: r } = e;
|
|
11794
11828
|
return xn(() => {
|
|
11795
11829
|
t.syncProviderProps(n, r);
|
|
@@ -11801,8 +11835,8 @@ function Ig(e) {
|
|
|
11801
11835
|
}
|
|
11802
11836
|
//#endregion
|
|
11803
11837
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/viewport/ToastViewportCssVars.mjs
|
|
11804
|
-
var
|
|
11805
|
-
let { render: n, className: r, style: i, children: a, ...o } = e, s =
|
|
11838
|
+
var Kg = "--toast-frontmost-height", qg = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
11839
|
+
let { render: n, className: r, style: i, children: a, ...o } = e, s = Rg(), 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
11840
|
U.useEffect(() => {
|
|
11807
11841
|
let e = s.state.viewport;
|
|
11808
11842
|
if (!e || f) return;
|
|
@@ -11874,7 +11908,7 @@ var Lg = "--toast-frontmost-height", Rg = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
11874
11908
|
onPointerDown: E,
|
|
11875
11909
|
onPointerUp: D,
|
|
11876
11910
|
onPointerCancel: D,
|
|
11877
|
-
style: { [
|
|
11911
|
+
style: { [Kg]: _ ? `${_}px` : void 0 }
|
|
11878
11912
|
}, j = { expanded: h }, M = !f && g && /*#__PURE__*/ X(kn, { onFocus: b }), N = Rn("div", e, {
|
|
11879
11913
|
ref: [t, s.setViewport],
|
|
11880
11914
|
state: j,
|
|
@@ -11901,19 +11935,19 @@ var Lg = "--toast-frontmost-height", Rg = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
11901
11935
|
})
|
|
11902
11936
|
] });
|
|
11903
11937
|
});
|
|
11904
|
-
process.env.NODE_ENV !== "production" && (
|
|
11938
|
+
process.env.NODE_ENV !== "production" && (qg.displayName = "ToastViewport");
|
|
11905
11939
|
//#endregion
|
|
11906
11940
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/root/ToastRootContext.mjs
|
|
11907
|
-
var
|
|
11908
|
-
process.env.NODE_ENV !== "production" && (
|
|
11909
|
-
function
|
|
11910
|
-
let e = U.useContext(
|
|
11941
|
+
var Jg = /*#__PURE__*/ U.createContext(void 0);
|
|
11942
|
+
process.env.NODE_ENV !== "production" && (Jg.displayName = "ToastRootContext");
|
|
11943
|
+
function Yg() {
|
|
11944
|
+
let e = U.useContext(Jg);
|
|
11911
11945
|
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
11946
|
return e;
|
|
11913
11947
|
}
|
|
11914
11948
|
//#endregion
|
|
11915
11949
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/utils/getElementTransform.mjs
|
|
11916
|
-
function
|
|
11950
|
+
function Xg(e, t) {
|
|
11917
11951
|
let n = (t ?? vn(e).getComputedStyle(e)).transform, r = 0, i = 0, a = 1;
|
|
11918
11952
|
if (n && n !== "none") {
|
|
11919
11953
|
let e = n.match(/matrix(?:3d)?\(([^)]+)\)/);
|
|
@@ -11930,7 +11964,7 @@ function Vg(e, t) {
|
|
|
11930
11964
|
}
|
|
11931
11965
|
//#endregion
|
|
11932
11966
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/utils/useSwipeDismiss.mjs
|
|
11933
|
-
function
|
|
11967
|
+
function Zg(e, t, n) {
|
|
11934
11968
|
switch (e) {
|
|
11935
11969
|
case "up": return -n;
|
|
11936
11970
|
case "down": return n;
|
|
@@ -11941,15 +11975,15 @@ function Hg(e, t, n) {
|
|
|
11941
11975
|
}
|
|
11942
11976
|
//#endregion
|
|
11943
11977
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/root/ToastRootCssVars.mjs
|
|
11944
|
-
var
|
|
11978
|
+
var Qg = "--toast-index", $g = "--toast-offset-y", e_ = "--toast-height", t_ = "--toast-swipe-movement-x", n_ = "--toast-swipe-movement-y", r_ = "data-swipe-direction", i_ = {
|
|
11945
11979
|
...Vn,
|
|
11946
11980
|
swipeDirection(e) {
|
|
11947
|
-
return e ? { [
|
|
11981
|
+
return e ? { [r_]: e } : null;
|
|
11948
11982
|
}
|
|
11949
|
-
},
|
|
11983
|
+
}, a_ = 40, o_ = 10, s_ = .5, c_ = 1, l_ = `${Mn},${zn}`, u_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
11950
11984
|
let { toast: n, render: r, className: i, swipeDirection: a = ["down", "right"], style: o, ...s } = e, c = n.positionerProps?.anchor !== void 0, l = [];
|
|
11951
11985
|
c || (l = Array.isArray(a) ? a : [a]);
|
|
11952
|
-
let u = l.length > 0, d =
|
|
11986
|
+
let u = l.length > 0, d = Rg(), [f, p] = U.useState(void 0), [m, h] = U.useState(!1), [g, _] = U.useState(!1), [v, y] = U.useState({
|
|
11953
11987
|
x: 0,
|
|
11954
11988
|
y: 0
|
|
11955
11989
|
}), [b, x] = U.useState({
|
|
@@ -12015,7 +12049,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12015
12049
|
L.current?.abort();
|
|
12016
12050
|
}, []);
|
|
12017
12051
|
function le(e, t) {
|
|
12018
|
-
let n = (e) => e > 0 ? e **
|
|
12052
|
+
let n = (e) => e > 0 ? e ** s_ : -(Math.abs(e) ** s_), r = e > 0 && !l.includes("right") || e < 0 && !l.includes("left"), i = t > 0 && !l.includes("down") || t < 0 && !l.includes("up");
|
|
12019
12053
|
return {
|
|
12020
12054
|
x: r ? n(e) : e,
|
|
12021
12055
|
y: i ? n(t) : t
|
|
@@ -12033,7 +12067,7 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12033
12067
|
return;
|
|
12034
12068
|
}
|
|
12035
12069
|
let r = ee.current, i = r.x - t.x, a = r.y - t.y, o;
|
|
12036
|
-
for (let e of l) if (
|
|
12070
|
+
for (let e of l) if (Zg(e, i, a) > a_) {
|
|
12037
12071
|
o = e;
|
|
12038
12072
|
break;
|
|
12039
12073
|
}
|
|
@@ -12043,12 +12077,12 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12043
12077
|
}), p(void 0));
|
|
12044
12078
|
});
|
|
12045
12079
|
function de(e) {
|
|
12046
|
-
if (e.button !== 0 || (e.pointerType === "touch" && d.pauseTimers(), In(e.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${
|
|
12080
|
+
if (e.button !== 0 || (e.pointerType === "touch" && d.pauseTimers(), In(e.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${l_}`))) return;
|
|
12047
12081
|
P.current = !1, M.current = void 0, N.current = 0, te.current = e.pointerId, A.current = {
|
|
12048
12082
|
x: e.clientX,
|
|
12049
12083
|
y: e.clientY
|
|
12050
12084
|
}, F.current = A.current;
|
|
12051
|
-
let t = e.currentTarget, n =
|
|
12085
|
+
let t = e.currentTarget, n = Xg(t);
|
|
12052
12086
|
j.current = n, x(n), ce({
|
|
12053
12087
|
x: n.x,
|
|
12054
12088
|
y: n.y
|
|
@@ -12073,16 +12107,16 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12073
12107
|
y: F.current.y
|
|
12074
12108
|
});
|
|
12075
12109
|
let a = n - A.current.x, o = t - A.current.y, s = t - F.current.y, c = n - F.current.x, u = E;
|
|
12076
|
-
if (!g && Math.sqrt(a * a + o * o) >=
|
|
12110
|
+
if (!g && Math.sqrt(a * a + o * o) >= c_) {
|
|
12077
12111
|
_(!0);
|
|
12078
12112
|
let e = l.includes("left") || l.includes("right"), t = l.includes("up") || l.includes("down");
|
|
12079
12113
|
e && t && (u = Math.abs(a) > Math.abs(o) ? "horizontal" : "vertical", D(u));
|
|
12080
12114
|
}
|
|
12081
12115
|
let d;
|
|
12082
|
-
if (!M.current) u === "vertical" ? o > 0 ? d = "down" : o < 0 && (d = "up") : u === "horizontal" ? a > 0 ? d = "right" : a < 0 && (d = "left") : d = Math.abs(a) >= Math.abs(o) ? a > 0 ? "right" : "left" : o > 0 ? "down" : "up", d && l.includes(d) && (M.current = d, N.current =
|
|
12116
|
+
if (!M.current) u === "vertical" ? o > 0 ? d = "down" : o < 0 && (d = "up") : u === "horizontal" ? a > 0 ? d = "right" : a < 0 && (d = "left") : d = Math.abs(a) >= Math.abs(o) ? a > 0 ? "right" : "left" : o > 0 ? "down" : "up", d && l.includes(d) && (M.current = d, N.current = Zg(d, a, o), p(d));
|
|
12083
12117
|
else {
|
|
12084
|
-
let e = M.current, t =
|
|
12085
|
-
t >
|
|
12118
|
+
let e = M.current, t = Zg(e, c, s);
|
|
12119
|
+
t > a_ ? (P.current = !1, p(e)) : !(l.includes("left") && l.includes("right")) && !(l.includes("up") && l.includes("down")) && N.current - t >= o_ && (P.current = !0);
|
|
12086
12120
|
}
|
|
12087
12121
|
let f = le(a, o), m = j.current.x, h = j.current.y, v = l.includes("left") || l.includes("right"), y = l.includes("up") || l.includes("down");
|
|
12088
12122
|
u !== "vertical" && v && (m += f.x), u !== "horizontal" && y && (h += f.y), ce({
|
|
@@ -12109,8 +12143,8 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12109
12143
|
return {
|
|
12110
12144
|
transition: m ? "none" : void 0,
|
|
12111
12145
|
transform: m ? `translateX(${v.x}px) translateY(${v.y}px) scale(${b.scale})` : void 0,
|
|
12112
|
-
[
|
|
12113
|
-
[
|
|
12146
|
+
[t_]: `${e}px`,
|
|
12147
|
+
[n_]: `${t}px`
|
|
12114
12148
|
};
|
|
12115
12149
|
}
|
|
12116
12150
|
let he = n.priority === "high", ge = {
|
|
@@ -12128,9 +12162,9 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12128
12162
|
inert: jc(n.limited),
|
|
12129
12163
|
style: {
|
|
12130
12164
|
...me(),
|
|
12131
|
-
[
|
|
12132
|
-
[
|
|
12133
|
-
[
|
|
12165
|
+
[Qg]: n.transitionStatus === "ending" ? ne : re,
|
|
12166
|
+
[$g]: `${ie}px`,
|
|
12167
|
+
[e_]: n.height ? `${n.height}px` : void 0
|
|
12134
12168
|
}
|
|
12135
12169
|
}, _e = U.useMemo(() => ({
|
|
12136
12170
|
toast: n,
|
|
@@ -12156,19 +12190,19 @@ var Ug = "--toast-index", Wg = "--toast-offset-y", Gg = "--toast-height", Kg = "
|
|
|
12156
12190
|
}, ye = Rn("div", e, {
|
|
12157
12191
|
ref: [t, O],
|
|
12158
12192
|
state: ve,
|
|
12159
|
-
stateAttributesMapping:
|
|
12193
|
+
stateAttributesMapping: i_,
|
|
12160
12194
|
props: [ge, s]
|
|
12161
12195
|
});
|
|
12162
|
-
return /*#__PURE__*/ X(
|
|
12196
|
+
return /*#__PURE__*/ X(Jg.Provider, {
|
|
12163
12197
|
value: _e,
|
|
12164
12198
|
children: ye
|
|
12165
12199
|
});
|
|
12166
12200
|
});
|
|
12167
|
-
process.env.NODE_ENV !== "production" && (
|
|
12201
|
+
process.env.NODE_ENV !== "production" && (u_.displayName = "ToastRoot");
|
|
12168
12202
|
//#endregion
|
|
12169
12203
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/content/ToastContent.mjs
|
|
12170
|
-
var
|
|
12171
|
-
let { render: n, className: r, style: i, ...a } = e, { visibleIndex: o, expanded: s, recalculateHeight: c } =
|
|
12204
|
+
var d_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12205
|
+
let { render: n, className: r, style: i, ...a } = e, { visibleIndex: o, expanded: s, recalculateHeight: c } = Yg(), l = U.useRef(null);
|
|
12172
12206
|
return xn(() => {
|
|
12173
12207
|
c();
|
|
12174
12208
|
let e = l.current;
|
|
@@ -12190,19 +12224,19 @@ var n_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
|
12190
12224
|
props: a
|
|
12191
12225
|
});
|
|
12192
12226
|
});
|
|
12193
|
-
process.env.NODE_ENV !== "production" && (
|
|
12227
|
+
process.env.NODE_ENV !== "production" && (d_.displayName = "ToastContent");
|
|
12194
12228
|
//#endregion
|
|
12195
12229
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/utils/isRenderableNode.mjs
|
|
12196
|
-
function
|
|
12197
|
-
return e == null || typeof e == "boolean" || e === "" ? !1 : !Array.isArray(e) || e.some(
|
|
12230
|
+
function f_(e) {
|
|
12231
|
+
return e == null || typeof e == "boolean" || e === "" ? !1 : !Array.isArray(e) || e.some(f_);
|
|
12198
12232
|
}
|
|
12199
|
-
function
|
|
12200
|
-
return /*#__PURE__*/ U.isValidElement(e) &&
|
|
12233
|
+
function p_(e) {
|
|
12234
|
+
return /*#__PURE__*/ U.isValidElement(e) && f_(e.props.children);
|
|
12201
12235
|
}
|
|
12202
12236
|
//#endregion
|
|
12203
12237
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/utils/useToastLabelPart.mjs
|
|
12204
|
-
function
|
|
12205
|
-
let { toast: r, setTitleId: i, setDescriptionId: a } =
|
|
12238
|
+
function m_(e, t, n) {
|
|
12239
|
+
let { toast: r, setTitleId: i, setDescriptionId: a } = Yg(), o = n === "title" ? i : a, s = t ?? (n === "title" ? r.title : r.description);
|
|
12206
12240
|
return {
|
|
12207
12241
|
id: Nn(e),
|
|
12208
12242
|
children: s,
|
|
@@ -12210,8 +12244,8 @@ function a_(e, t, n) {
|
|
|
12210
12244
|
setId: o
|
|
12211
12245
|
};
|
|
12212
12246
|
}
|
|
12213
|
-
function
|
|
12214
|
-
let r =
|
|
12247
|
+
function h_(e, t, n) {
|
|
12248
|
+
let r = p_(e);
|
|
12215
12249
|
return xn(() => {
|
|
12216
12250
|
if (r) return n(t), () => {
|
|
12217
12251
|
n((e) => e === t ? void 0 : e);
|
|
@@ -12224,9 +12258,9 @@ function o_(e, t, n) {
|
|
|
12224
12258
|
}
|
|
12225
12259
|
//#endregion
|
|
12226
12260
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/description/ToastDescription.mjs
|
|
12227
|
-
var
|
|
12228
|
-
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } =
|
|
12229
|
-
return
|
|
12261
|
+
var g_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12262
|
+
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } = m_(a, o, "description");
|
|
12263
|
+
return h_(Rn("p", e, {
|
|
12230
12264
|
ref: t,
|
|
12231
12265
|
state: { type: u },
|
|
12232
12266
|
props: {
|
|
@@ -12236,12 +12270,12 @@ var s_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
|
12236
12270
|
}
|
|
12237
12271
|
}), c, d);
|
|
12238
12272
|
});
|
|
12239
|
-
process.env.NODE_ENV !== "production" && (
|
|
12273
|
+
process.env.NODE_ENV !== "production" && (g_.displayName = "ToastDescription");
|
|
12240
12274
|
//#endregion
|
|
12241
12275
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/title/ToastTitle.mjs
|
|
12242
|
-
var
|
|
12243
|
-
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } =
|
|
12244
|
-
return
|
|
12276
|
+
var __ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12277
|
+
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } = m_(a, o, "title");
|
|
12278
|
+
return h_(Rn("h2", e, {
|
|
12245
12279
|
ref: t,
|
|
12246
12280
|
state: { type: u },
|
|
12247
12281
|
props: {
|
|
@@ -12251,11 +12285,11 @@ var c_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
|
12251
12285
|
}
|
|
12252
12286
|
}), c, d);
|
|
12253
12287
|
});
|
|
12254
|
-
process.env.NODE_ENV !== "production" && (
|
|
12288
|
+
process.env.NODE_ENV !== "production" && (__.displayName = "ToastTitle");
|
|
12255
12289
|
//#endregion
|
|
12256
12290
|
//#region ../../node_modules/.bun/@base-ui+react@1.8.0+2ae3ffd426cfecdc/node_modules/@base-ui/react/toast/useToastManager.mjs
|
|
12257
|
-
function
|
|
12258
|
-
let e =
|
|
12291
|
+
function v_() {
|
|
12292
|
+
let e = Rg(), t = e.useState("toasts");
|
|
12259
12293
|
return U.useMemo(() => ({
|
|
12260
12294
|
toasts: t,
|
|
12261
12295
|
add: e.addToast,
|
|
@@ -12266,7 +12300,7 @@ function l_() {
|
|
|
12266
12300
|
}
|
|
12267
12301
|
//#endregion
|
|
12268
12302
|
//#region src/elements/Toast/components/ToastCloseButton.tsx
|
|
12269
|
-
var
|
|
12303
|
+
var y_ = ({ onClose: e }) => {
|
|
12270
12304
|
let t = z();
|
|
12271
12305
|
return /* @__PURE__ */ X("div", {
|
|
12272
12306
|
className: "dark flex-shrink-0",
|
|
@@ -12279,13 +12313,13 @@ var u_ = ({ onClose: e }) => {
|
|
|
12279
12313
|
label: t.actions.close
|
|
12280
12314
|
})
|
|
12281
12315
|
});
|
|
12282
|
-
},
|
|
12316
|
+
}, b_ = ({ duration: e, color: t }) => /* @__PURE__ */ X("div", {
|
|
12283
12317
|
className: "absolute bottom-0 left-0 right-0 h-[3px] w-full overflow-hidden rounded-b-lg",
|
|
12284
12318
|
children: /* @__PURE__ */ X("div", {
|
|
12285
12319
|
className: B("h-full w-full animate-toast-countdown", "group-data-[expanded]/toast:[animation-play-state:paused]", "group-data-[window-blurred]/toasts:[animation-play-state:paused]", t),
|
|
12286
12320
|
style: { animationDuration: `${e}ms` }
|
|
12287
12321
|
})
|
|
12288
|
-
}),
|
|
12322
|
+
}), x_ = ({ linkActions: e, buttonActions: t, onActionClick: n }) => e.length === 0 && t.length === 0 ? null : /* @__PURE__ */ Z("div", {
|
|
12289
12323
|
className: "dark flex flex-shrink-0 flex-row flex-wrap items-center gap-3",
|
|
12290
12324
|
children: [e.map((e) => /* @__PURE__ */ X("div", {
|
|
12291
12325
|
onClick: () => n(e),
|
|
@@ -12300,7 +12334,7 @@ var u_ = ({ onClose: e }) => {
|
|
|
12300
12334
|
size: "sm",
|
|
12301
12335
|
onClick: () => n(e)
|
|
12302
12336
|
}, `button-${e.label}`))]
|
|
12303
|
-
}),
|
|
12337
|
+
}), S_ = (e, t) => {
|
|
12304
12338
|
let n = Yo(e);
|
|
12305
12339
|
return {
|
|
12306
12340
|
buttonActions: n.filter((e) => e.type === "button"),
|
|
@@ -12310,7 +12344,7 @@ var u_ = ({ onClose: e }) => {
|
|
|
12310
12344
|
e.type === "button" && e.onClick(), e.keepOpen || t?.();
|
|
12311
12345
|
}
|
|
12312
12346
|
};
|
|
12313
|
-
},
|
|
12347
|
+
}, C_ = bc({
|
|
12314
12348
|
Title: ({ className: e, children: t }) => /* @__PURE__ */ X("p", {
|
|
12315
12349
|
className: e,
|
|
12316
12350
|
children: t
|
|
@@ -12320,30 +12354,30 @@ var u_ = ({ onClose: e }) => {
|
|
|
12320
12354
|
children: t
|
|
12321
12355
|
}),
|
|
12322
12356
|
inStack: !1
|
|
12323
|
-
}),
|
|
12357
|
+
}), w_ = () => wc(C_), T_ = (e) => B("pointer-events-auto relative flex w-full flex-col gap-3 overflow-hidden rounded-lg p-3", !e && "bg-f1-background-inverse dark:bg-f1-background-tertiary"), E_ = to({
|
|
12324
12358
|
base: "text-base font-medium text-f1-foreground-inverse",
|
|
12325
12359
|
variants: { hasIcon: {
|
|
12326
12360
|
true: "pt-[3px]",
|
|
12327
12361
|
false: ""
|
|
12328
12362
|
} },
|
|
12329
12363
|
defaultVariants: { hasIcon: !1 }
|
|
12330
|
-
}),
|
|
12364
|
+
}), D_ = "line-clamp-3 text-base text-f1-foreground-inverse-secondary", O_ = {
|
|
12331
12365
|
error: "critical",
|
|
12332
12366
|
warning: "warning",
|
|
12333
12367
|
success: "positive",
|
|
12334
12368
|
loading: null,
|
|
12335
12369
|
default: null
|
|
12336
|
-
},
|
|
12370
|
+
}, k_ = {
|
|
12337
12371
|
error: "bg-f1-icon-critical",
|
|
12338
12372
|
warning: "bg-f1-icon-warning",
|
|
12339
12373
|
success: "bg-f1-icon-positive",
|
|
12340
12374
|
loading: "bg-f1-foreground-inverse-secondary",
|
|
12341
12375
|
default: "bg-f1-foreground-inverse-secondary"
|
|
12342
|
-
},
|
|
12343
|
-
let { Title: l, Description: u, inStack: d } =
|
|
12376
|
+
}, A_ = xc(({ title: e, description: t, variant: n = "default", duration: r, onClose: i, actions: a, countdownKey: o, contentKey: s }, c) => {
|
|
12377
|
+
let { Title: l, Description: u, inStack: d } = w_(), { buttonActions: f, linkActions: p, hasActions: m, handleActionClick: h } = S_(a, i), g = O_[n], _ = n === "loading", v = !_ && r != null && r > 0;
|
|
12344
12378
|
return /* @__PURE__ */ Z("div", {
|
|
12345
12379
|
ref: c,
|
|
12346
|
-
className:
|
|
12380
|
+
className: T_(d),
|
|
12347
12381
|
children: [/* @__PURE__ */ Z("div", {
|
|
12348
12382
|
className: B("flex flex-row gap-3", t ? "items-start" : "items-center"),
|
|
12349
12383
|
children: [
|
|
@@ -12366,44 +12400,44 @@ var u_ = ({ onClose: e }) => {
|
|
|
12366
12400
|
className: "flex flex-1 animate-toast-content-in flex-col gap-1 motion-reduce:animate-none",
|
|
12367
12401
|
children: [
|
|
12368
12402
|
e ? /* @__PURE__ */ X(l, {
|
|
12369
|
-
className:
|
|
12403
|
+
className: E_({ hasIcon: !!g || _ }),
|
|
12370
12404
|
children: e
|
|
12371
12405
|
}) : null,
|
|
12372
12406
|
t && e ? /* @__PURE__ */ X(u, {
|
|
12373
|
-
className:
|
|
12407
|
+
className: D_,
|
|
12374
12408
|
children: t
|
|
12375
12409
|
}) : null,
|
|
12376
12410
|
t && !e ? /* @__PURE__ */ X(l, {
|
|
12377
|
-
className:
|
|
12411
|
+
className: D_,
|
|
12378
12412
|
children: t
|
|
12379
12413
|
}) : null
|
|
12380
12414
|
]
|
|
12381
12415
|
}, s),
|
|
12382
|
-
/* @__PURE__ */ X(
|
|
12416
|
+
/* @__PURE__ */ X(x_, {
|
|
12383
12417
|
linkActions: p,
|
|
12384
12418
|
buttonActions: f,
|
|
12385
12419
|
onActionClick: h
|
|
12386
12420
|
}),
|
|
12387
|
-
i && !_ && (!m || !v) ? /* @__PURE__ */ X(
|
|
12421
|
+
i && !_ && (!m || !v) ? /* @__PURE__ */ X(y_, { onClose: i }) : null
|
|
12388
12422
|
]
|
|
12389
|
-
}), v ? /* @__PURE__ */ X(
|
|
12423
|
+
}), v ? /* @__PURE__ */ X(b_, {
|
|
12390
12424
|
duration: r,
|
|
12391
|
-
color:
|
|
12425
|
+
color: k_[n]
|
|
12392
12426
|
}, o) : null]
|
|
12393
12427
|
});
|
|
12394
12428
|
});
|
|
12395
|
-
|
|
12429
|
+
A_.displayName = "F0Toast";
|
|
12396
12430
|
//#endregion
|
|
12397
12431
|
//#region src/elements/Toast/F0MessageToast.tsx
|
|
12398
|
-
var
|
|
12399
|
-
let d = z(), { Title: f, Description: p, inStack: m } =
|
|
12432
|
+
var j_ = (e) => e instanceof Element && e.closest("button, a") !== null, M_ = xc(({ avatar: e, sender: t, topic: n, message: r, moreCount: i = 0, onClick: a, duration: o, onClose: s, countdownKey: c, contentKey: l }, u) => {
|
|
12433
|
+
let d = z(), { Title: f, Description: p, inStack: m } = w_(), h = () => {
|
|
12400
12434
|
a?.(), s?.();
|
|
12401
12435
|
}, g = o != null && o > 0;
|
|
12402
12436
|
return /* @__PURE__ */ Z("div", {
|
|
12403
12437
|
ref: u,
|
|
12404
|
-
className: B(
|
|
12438
|
+
className: B(T_(m), a && "cursor-pointer"),
|
|
12405
12439
|
onClick: a && !m ? (e) => {
|
|
12406
|
-
|
|
12440
|
+
j_(e.target) || h();
|
|
12407
12441
|
} : void 0,
|
|
12408
12442
|
children: [
|
|
12409
12443
|
a ? /* @__PURE__ */ X("button", {
|
|
@@ -12447,44 +12481,44 @@ var S_ = (e) => e instanceof Element && e.closest("button, a") !== null, C_ = xc
|
|
|
12447
12481
|
}, l),
|
|
12448
12482
|
s ? /* @__PURE__ */ X("div", {
|
|
12449
12483
|
className: "relative flex-shrink-0",
|
|
12450
|
-
children: /* @__PURE__ */ X(
|
|
12484
|
+
children: /* @__PURE__ */ X(y_, { onClose: s })
|
|
12451
12485
|
}) : null
|
|
12452
12486
|
]
|
|
12453
12487
|
}),
|
|
12454
|
-
g ? /* @__PURE__ */ X(
|
|
12488
|
+
g ? /* @__PURE__ */ X(b_, {
|
|
12455
12489
|
duration: o,
|
|
12456
12490
|
color: "bg-f1-foreground-inverse-secondary"
|
|
12457
12491
|
}, c) : null
|
|
12458
12492
|
]
|
|
12459
12493
|
});
|
|
12460
12494
|
});
|
|
12461
|
-
|
|
12495
|
+
M_.displayName = "F0MessageToast";
|
|
12462
12496
|
//#endregion
|
|
12463
12497
|
//#region src/elements/Toast/stack/ToastItem.tsx
|
|
12464
|
-
var
|
|
12465
|
-
Title: ({ className: e, children: t }) => /* @__PURE__ */ X(
|
|
12498
|
+
var N_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w-full origin-top select-none flex-col justify-start rounded-lg", Dn(), "before:pointer-events-none before:absolute before:inset-x-0 before:top-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 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)_+_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:bottom-full after:left-0 after:hidden after:h-[calc(var(--gap)_+_1px)] after:w-full after:content-['']", "data-[expanded]:after:block data-[expanded]:data-[front]:after:hidden", "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-rise: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-rise)))_scale(var(--scale))]", "[&[data-ending-style][data-expanded]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(calc(var(--offset-y)_-_var(--exit-rise)))]", "data-[ending-style]:data-[swipe-direction=up]:[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]"), P_ = B("shrink-0 overflow-hidden rounded-lg", "[--content-shift:calc(var(--toast-height,var(--height))_-_var(--height))]", "group-data-[ending-style]/toast:h-full", "[clip-path:inset(0_0_max(0px,var(--content-shift))_0_round_theme(borderRadius.lg))]", "data-[expanded]:[clip-path:inset(0_0_0_0_round_theme(borderRadius.lg))]", "[transition:opacity_250ms_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,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),clip-path_0.3s_cubic-bezier(0.22,1,0.36,1)]", "motion-reduce:[transition:opacity_250ms] motion-reduce:data-[behind]:[transition:opacity_250ms]"), F_ = ["up", "right"], I_ = {
|
|
12499
|
+
Title: ({ className: e, children: t }) => /* @__PURE__ */ X(__, {
|
|
12466
12500
|
className: e,
|
|
12467
12501
|
render: /* @__PURE__ */ X("p", {}),
|
|
12468
12502
|
children: t
|
|
12469
12503
|
}),
|
|
12470
|
-
Description: ({ className: e, children: t }) => /* @__PURE__ */ X(
|
|
12504
|
+
Description: ({ className: e, children: t }) => /* @__PURE__ */ X(g_, {
|
|
12471
12505
|
className: e,
|
|
12472
12506
|
children: t
|
|
12473
12507
|
}),
|
|
12474
12508
|
inStack: !0
|
|
12475
|
-
},
|
|
12509
|
+
}, L_ = ({ data: e, duration: t, countdownKey: n, contentKey: r, onClose: i }) => e.type === "message" ? /* @__PURE__ */ X(M_, {
|
|
12476
12510
|
...e.props,
|
|
12477
12511
|
duration: t,
|
|
12478
12512
|
countdownKey: n,
|
|
12479
12513
|
contentKey: r,
|
|
12480
12514
|
onClose: i
|
|
12481
|
-
}) : /* @__PURE__ */ X(
|
|
12515
|
+
}) : /* @__PURE__ */ X(A_, {
|
|
12482
12516
|
...e.props,
|
|
12483
12517
|
duration: t,
|
|
12484
12518
|
countdownKey: n,
|
|
12485
12519
|
contentKey: r,
|
|
12486
12520
|
onClose: i
|
|
12487
|
-
}),
|
|
12521
|
+
}), R_ = 6, z_ = (e) => {
|
|
12488
12522
|
let t = q(null);
|
|
12489
12523
|
return e ? {
|
|
12490
12524
|
onPointerDown: (e) => {
|
|
@@ -12496,29 +12530,29 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12496
12530
|
},
|
|
12497
12531
|
onPointerMove: (e) => {
|
|
12498
12532
|
let n = t.current;
|
|
12499
|
-
n && Math.hypot(e.clientX - n.x, e.clientY - n.y) >
|
|
12533
|
+
n && Math.hypot(e.clientX - n.x, e.clientY - n.y) > R_ && (n.dragged = !0);
|
|
12500
12534
|
},
|
|
12501
12535
|
onClick: (n) => {
|
|
12502
12536
|
let r = t.current?.dragged ?? !1;
|
|
12503
|
-
t.current = null, !r && !
|
|
12537
|
+
t.current = null, !r && !j_(n.target) && e();
|
|
12504
12538
|
}
|
|
12505
12539
|
} : {};
|
|
12506
|
-
},
|
|
12507
|
-
let { close: r } =
|
|
12540
|
+
}, B_ = ({ toast: e, front: t, buried: n }) => {
|
|
12541
|
+
let { close: r } = v_(), i = e.data?.type === "message" ? e.data.props.onClick : void 0, a = z_(i ? () => {
|
|
12508
12542
|
i(), r(e.id);
|
|
12509
12543
|
} : void 0);
|
|
12510
|
-
return e.data ? /* @__PURE__ */ X(
|
|
12544
|
+
return e.data ? /* @__PURE__ */ X(u_, {
|
|
12511
12545
|
toast: e,
|
|
12512
|
-
swipeDirection:
|
|
12546
|
+
swipeDirection: F_,
|
|
12513
12547
|
"data-front": t ? "" : void 0,
|
|
12514
12548
|
"data-buried": n ? "" : void 0,
|
|
12515
|
-
className:
|
|
12549
|
+
className: N_,
|
|
12516
12550
|
...a,
|
|
12517
|
-
children: /* @__PURE__ */ X(
|
|
12518
|
-
className:
|
|
12519
|
-
children: /* @__PURE__ */ X(
|
|
12520
|
-
value:
|
|
12521
|
-
children: /* @__PURE__ */ X(
|
|
12551
|
+
children: /* @__PURE__ */ X(d_, {
|
|
12552
|
+
className: P_,
|
|
12553
|
+
children: /* @__PURE__ */ X(C_.Provider, {
|
|
12554
|
+
value: I_,
|
|
12555
|
+
children: /* @__PURE__ */ X(L_, {
|
|
12522
12556
|
data: e.data,
|
|
12523
12557
|
duration: e.timeout,
|
|
12524
12558
|
countdownKey: `${e.data.revision}-${e.updateKey ?? 0}`,
|
|
@@ -12528,18 +12562,18 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12528
12562
|
})
|
|
12529
12563
|
})
|
|
12530
12564
|
}) : null;
|
|
12531
|
-
},
|
|
12565
|
+
}, V_ = 12, H_ = 6, U_ = 2, W_ = 3, G_ = (e) => {
|
|
12532
12566
|
if (e.length === 0) return {
|
|
12533
12567
|
collapsed: 0,
|
|
12534
12568
|
expanded: 0
|
|
12535
12569
|
};
|
|
12536
|
-
let t = e[0].height ?? 0, n = e.reduce((e, t) => e + (t.height ?? 0), 0) +
|
|
12570
|
+
let t = e[0].height ?? 0, n = e.reduce((e, t) => e + (t.height ?? 0), 0) + V_ * (e.length - 1);
|
|
12537
12571
|
return {
|
|
12538
|
-
collapsed: t +
|
|
12572
|
+
collapsed: t + H_ * Math.min(e.length - 1, U_),
|
|
12539
12573
|
expanded: n
|
|
12540
12574
|
};
|
|
12541
|
-
},
|
|
12542
|
-
let t = z(), { close: n } =
|
|
12575
|
+
}, K_ = ({ onClear: e }) => {
|
|
12576
|
+
let t = z(), { close: n } = v_();
|
|
12543
12577
|
return /* @__PURE__ */ X("div", {
|
|
12544
12578
|
className: "pointer-events-auto invisible absolute inset-x-0 bottom-full flex h-8 items-start justify-end group-data-[expanded]/toasts:visible",
|
|
12545
12579
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -12554,18 +12588,18 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12554
12588
|
})
|
|
12555
12589
|
})
|
|
12556
12590
|
});
|
|
12557
|
-
},
|
|
12558
|
-
let { update: t } =
|
|
12591
|
+
}, q_ = (e) => {
|
|
12592
|
+
let { update: t } = v_();
|
|
12559
12593
|
Dc(function() {
|
|
12560
12594
|
e.forEach((e, n) => {
|
|
12561
12595
|
if (!e.data) return;
|
|
12562
|
-
let r = n >=
|
|
12596
|
+
let r = n >= W_ ? 0 : e.data.duration;
|
|
12563
12597
|
(e.timeout ?? 0) !== r && t(e.id, { timeout: r });
|
|
12564
12598
|
});
|
|
12565
12599
|
}, [e, t]);
|
|
12566
|
-
},
|
|
12567
|
-
let { toasts: a } =
|
|
12568
|
-
|
|
12600
|
+
}, J_ = ({ label: e, isWindowBlurred: t, stackRef: n, belowStack: r, onHasToastsChange: i }) => {
|
|
12601
|
+
let { toasts: a } = v_(), o = q(null), s = a.filter((e) => e.transitionStatus !== "ending"), [c, l] = J(/* @__PURE__ */ new Set()), u = a.length > 0 && a.every((e) => e.transitionStatus === "ending" && c.has(e.id));
|
|
12602
|
+
q_(s), Ec(n, () => ({
|
|
12569
12603
|
isInUse: () => o.current?.hasAttribute("data-expanded") ?? !1,
|
|
12570
12604
|
frontToastId: () => s[0]?.id
|
|
12571
12605
|
}), [s]);
|
|
@@ -12573,11 +12607,11 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12573
12607
|
G(function() {
|
|
12574
12608
|
i(f);
|
|
12575
12609
|
}, [f, i]);
|
|
12576
|
-
let p =
|
|
12610
|
+
let p = G_(s), m = {
|
|
12577
12611
|
"--stack-collapsed-height": `${p.collapsed}px`,
|
|
12578
12612
|
"--stack-expanded-height": `${p.expanded}px`
|
|
12579
12613
|
};
|
|
12580
|
-
return /* @__PURE__ */ Z(
|
|
12614
|
+
return /* @__PURE__ */ Z(qg, {
|
|
12581
12615
|
ref: o,
|
|
12582
12616
|
className: B("group/toasts pointer-events-auto relative w-full empty:hidden", "h-[var(--stack-collapsed-height)] data-[expanded]:h-[var(--stack-expanded-height)]", "data-[clearing]:opacity-0", "data-[clear-all]:data-[expanded]:mt-4 data-[clear-all]:data-[below-stack]:data-[expanded]:mt-7", "[transition:height_0.3s_cubic-bezier(0.22,1,0.36,1),margin-top_0.3s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s] motion-reduce:[transition:opacity_0.2s]"),
|
|
12583
12617
|
"aria-label": e,
|
|
@@ -12586,17 +12620,17 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12586
12620
|
"data-clear-all": d ? "" : void 0,
|
|
12587
12621
|
"data-window-blurred": t ? "" : void 0,
|
|
12588
12622
|
style: m,
|
|
12589
|
-
children: [a.map((e) => /* @__PURE__ */ X(
|
|
12623
|
+
children: [a.map((e) => /* @__PURE__ */ X(B_, {
|
|
12590
12624
|
toast: e,
|
|
12591
12625
|
front: s[0] === e,
|
|
12592
|
-
buried: s.indexOf(e) >=
|
|
12593
|
-
}, `${e.id}:${e.data?.renderKey ?? 0}`)), d ? /* @__PURE__ */ X(
|
|
12626
|
+
buried: s.indexOf(e) >= W_
|
|
12627
|
+
}, `${e.id}:${e.data?.renderKey ?? 0}`)), d ? /* @__PURE__ */ X(K_, { onClear: () => l(new Set(s.map((e) => e.id))) }) : null]
|
|
12594
12628
|
});
|
|
12595
|
-
},
|
|
12629
|
+
}, Y_ = "#content", X_ = (e) => {
|
|
12596
12630
|
let [t, n] = J({ inset: 0 });
|
|
12597
12631
|
return Qn(function() {
|
|
12598
12632
|
if (!e || typeof document > "u") return;
|
|
12599
|
-
let t = document.querySelector(
|
|
12633
|
+
let t = document.querySelector(Y_);
|
|
12600
12634
|
if (!t) {
|
|
12601
12635
|
n({ inset: 0 });
|
|
12602
12636
|
return;
|
|
@@ -12616,7 +12650,7 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12616
12650
|
i.disconnect(), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
|
|
12617
12651
|
};
|
|
12618
12652
|
}, [e]), t;
|
|
12619
|
-
},
|
|
12653
|
+
}, Z_ = () => {
|
|
12620
12654
|
let [e, t] = J(!1);
|
|
12621
12655
|
return G(function() {
|
|
12622
12656
|
let e = () => t(!0), n = () => t(!1);
|
|
@@ -12624,27 +12658,27 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12624
12658
|
window.removeEventListener("blur", e), window.removeEventListener("focus", n);
|
|
12625
12659
|
};
|
|
12626
12660
|
}, []), e;
|
|
12627
|
-
},
|
|
12628
|
-
let [n, r] = J(!1), [i, a] = J(!1), o =
|
|
12661
|
+
}, Q_ = Infinity, $_ = ({ messages: e, app: t }) => {
|
|
12662
|
+
let [n, r] = J(!1), [i, a] = J(!1), o = X_(n || i), s = Z_(), c = z();
|
|
12629
12663
|
return /* @__PURE__ */ X("div", {
|
|
12630
12664
|
className: "pointer-events-none fixed z-[1260] flex flex-col items-center overflow-y-auto overflow-x-hidden py-6 sm:items-end sm:px-6",
|
|
12631
12665
|
style: o,
|
|
12632
12666
|
children: /* @__PURE__ */ Z("div", {
|
|
12633
12667
|
className: "flex w-[calc(100%-2rem)] shrink-0 flex-col gap-3 sm:w-96",
|
|
12634
|
-
children: [/* @__PURE__ */ X(
|
|
12668
|
+
children: [/* @__PURE__ */ X(Wg, {
|
|
12635
12669
|
toastManager: t.manager,
|
|
12636
|
-
limit:
|
|
12637
|
-
children: /* @__PURE__ */ X(
|
|
12670
|
+
limit: Q_,
|
|
12671
|
+
children: /* @__PURE__ */ X(J_, {
|
|
12638
12672
|
label: c.notifications,
|
|
12639
12673
|
isWindowBlurred: s,
|
|
12640
12674
|
stackRef: t.stackRef,
|
|
12641
12675
|
belowStack: !1,
|
|
12642
12676
|
onHasToastsChange: a
|
|
12643
12677
|
})
|
|
12644
|
-
}), /* @__PURE__ */ X(
|
|
12678
|
+
}), /* @__PURE__ */ X(Wg, {
|
|
12645
12679
|
toastManager: e.manager,
|
|
12646
|
-
limit:
|
|
12647
|
-
children: /* @__PURE__ */ X(
|
|
12680
|
+
limit: Q_,
|
|
12681
|
+
children: /* @__PURE__ */ X(J_, {
|
|
12648
12682
|
label: c.toasts.messages,
|
|
12649
12683
|
isWindowBlurred: s,
|
|
12650
12684
|
stackRef: e.stackRef,
|
|
@@ -12654,7 +12688,7 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12654
12688
|
})]
|
|
12655
12689
|
})
|
|
12656
12690
|
});
|
|
12657
|
-
},
|
|
12691
|
+
}, ev = ({ children: e, portalTargets: t = {
|
|
12658
12692
|
mobile: "#f0-overlay-root",
|
|
12659
12693
|
desktop: "#f0-overlay-root"
|
|
12660
12694
|
} }) => {
|
|
@@ -12663,7 +12697,7 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12663
12697
|
let { id: e, release: t } = We.acquireRenderer();
|
|
12664
12698
|
return n.current = e, t;
|
|
12665
12699
|
}, []);
|
|
12666
|
-
let i = r !== null && r === n.current, a =
|
|
12700
|
+
let i = r !== null && r === n.current, a = Ig(), [o, s] = J(null), [c, l] = J(0), u = q(null);
|
|
12667
12701
|
return G(function() {
|
|
12668
12702
|
if (typeof document > "u") return;
|
|
12669
12703
|
let e = a ? t?.mobile || "body" : t?.desktop || "body", n = document.querySelector(e) ?? document.body;
|
|
@@ -12672,11 +12706,11 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12672
12706
|
a,
|
|
12673
12707
|
t?.mobile,
|
|
12674
12708
|
t?.desktop
|
|
12675
|
-
]), /* @__PURE__ */ Z(Y, { children: [i && o != null ? Ac(/* @__PURE__ */ X(yc, { children: /* @__PURE__ */ X(
|
|
12709
|
+
]), /* @__PURE__ */ Z(Y, { children: [i && o != null ? Ac(/* @__PURE__ */ X(yc, { children: /* @__PURE__ */ X($_, {
|
|
12676
12710
|
messages: Wt,
|
|
12677
12711
|
app: vt
|
|
12678
12712
|
}) }, c), o) : null, e] });
|
|
12679
|
-
},
|
|
12713
|
+
}, tv = ({ 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, {
|
|
12680
12714
|
reducedMotion: "user",
|
|
12681
12715
|
children: /* @__PURE__ */ X(mn, {
|
|
12682
12716
|
isDev: s,
|
|
@@ -12701,11 +12735,11 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12701
12735
|
})
|
|
12702
12736
|
})
|
|
12703
12737
|
})
|
|
12704
|
-
}),
|
|
12738
|
+
}), nv = bc(null), rv = ({ children: e, fullScreen: t = !0 }) => {
|
|
12705
12739
|
let n = q(null), [r, i] = J(n.current);
|
|
12706
12740
|
return Qn(() => {
|
|
12707
12741
|
i(n.current);
|
|
12708
|
-
}, []), /* @__PURE__ */ X(
|
|
12742
|
+
}, []), /* @__PURE__ */ X(nv.Provider, {
|
|
12709
12743
|
value: { element: r },
|
|
12710
12744
|
children: /* @__PURE__ */ Z("div", {
|
|
12711
12745
|
ref: n,
|
|
@@ -12717,7 +12751,7 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12717
12751
|
})]
|
|
12718
12752
|
})
|
|
12719
12753
|
});
|
|
12720
|
-
},
|
|
12754
|
+
}, iv = bc(void 0), av = () => wc(iv), ov = ({ children: e, layout: t, link: n, privacyModeInitiallyEnabled: r, image: i, i18n: a, l10n: o, hourCycle: s, isDev: c = !1, dataCollectionStorageHandler: l, showExperimentalWarnings: u = !1, renderDataTestIdAttribute: d = !1, newButtonStyles: f = !1, formComponent: p, map: m }) => /* @__PURE__ */ X(tv, {
|
|
12721
12755
|
link: n,
|
|
12722
12756
|
privacyModeInitiallyEnabled: r,
|
|
12723
12757
|
image: i,
|
|
@@ -12728,15 +12762,15 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12728
12762
|
showExperimentalWarnings: u,
|
|
12729
12763
|
renderDataTestIdAttribute: d,
|
|
12730
12764
|
newButtonStyles: f,
|
|
12731
|
-
children: /* @__PURE__ */ X(
|
|
12765
|
+
children: /* @__PURE__ */ X(rv, {
|
|
12732
12766
|
...t,
|
|
12733
12767
|
children: /* @__PURE__ */ X(Zr, {
|
|
12734
12768
|
handler: l,
|
|
12735
12769
|
children: /* @__PURE__ */ X(Ea, { children: /* @__PURE__ */ X(lt, {
|
|
12736
12770
|
...m,
|
|
12737
|
-
children: /* @__PURE__ */ X(
|
|
12771
|
+
children: /* @__PURE__ */ X(iv.Provider, {
|
|
12738
12772
|
value: p,
|
|
12739
|
-
children: /* @__PURE__ */ X(Nu, { children: /* @__PURE__ */ X(
|
|
12773
|
+
children: /* @__PURE__ */ X(Nu, { children: /* @__PURE__ */ X(ev, {
|
|
12740
12774
|
portalTargets: {
|
|
12741
12775
|
mobile: "#f0-overlay-root",
|
|
12742
12776
|
desktop: "#f0-overlay-root"
|
|
@@ -12749,4 +12783,4 @@ var w_ = B("group/toast pointer-events-auto absolute left-0 right-0 top-0 flex w
|
|
|
12749
12783
|
})
|
|
12750
12784
|
});
|
|
12751
12785
|
//#endregion
|
|
12752
|
-
export { Xa as AiChatTranslationsProvider, be as AreaChart, Oo as Await, g as BarChart, it as BarChartSkeleton, Bt as CardSelectableContainer, p as CategoryBarChart, Vr 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, Ai as F0ActionItem, Dr as F0AiChat, Aa as F0AiChatHeader, Oa as F0AiChatHistory, Ir as F0AiChatProvider, Ca as F0AiChatTextArea, ya as F0AiChatUsageLimitsButton, Ja as F0AiFileAttachments, qi as F0AiFilePreviewsProvider, br as F0AiFormRegistryProvider, Ha as F0AiInsightCard, Na as F0AiMask, Ka as F0AiMessageSources, Ta as F0AiMessagesContainer, pr as F0AiPong, Ga as F0AiProcessingOverlay, ja as F0AiProposalCard, Ra as F0AiTableCard, dc as F0Alert,
|
|
12786
|
+
export { Xa as AiChatTranslationsProvider, be as AreaChart, Oo as Await, g as BarChart, it as BarChartSkeleton, Bt as CardSelectableContainer, p as CategoryBarChart, Vr 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, Ai as F0ActionItem, Dr as F0AiChat, Aa as F0AiChatHeader, Oa as F0AiChatHistory, Ir as F0AiChatProvider, Ca as F0AiChatTextArea, ya as F0AiChatUsageLimitsButton, Ja as F0AiFileAttachments, qi as F0AiFilePreviewsProvider, br as F0AiFormRegistryProvider, Ha as F0AiInsightCard, Na as F0AiMask, Ka as F0AiMessageSources, Ta as F0AiMessagesContainer, pr as F0AiPong, Ga as F0AiProcessingOverlay, ja as F0AiProposalCard, Ra as F0AiTableCard, dc as F0Alert, Pg as F0AnalyticsDashboard, Ui as F0AudioPlayer, kr as F0AudioPlayerCard, Pa as F0AuraVoiceAnimation, uo as F0Avatar, gr as F0AvatarAlert, so as F0AvatarCompany, Ei 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, wm as F0BookAMeetingCard, io as F0Box, V as F0Button, Ji as F0ButtonDropdown, zs as F0ButtonToggle, Sa as F0CanvasCard, Zi as F0CanvasPanel, yr as F0Card, ei as F0CardRow, wa as F0ChatComposer, ds as F0Checkbox, mu as F0ChipList, Da as F0ClarifyingPanel, Kt as F0DataChart, ke as F0DatePicker, D as F0DatePickerInline, bm 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, Sm as F0FAQCard, Hr as F0FileItem, wu as F0FilterPickerContent, d as F0Form, Ru as F0FormField, Sl as F0GridStack, za as F0HILActionConfirmation, m as F0Heading, H as F0Icon, Nr as F0Link, Cm as F0ModuleCard, en as F0NotesTextEditor, he as F0NotesTextEditorSkeleton, N as F0NumberInput, T as F0NumberInputInline, _r as F0OneIcon, Ii as F0OneSwitch, fc as F0PdfViewer, ov as F0Provider, Tm as F0QuestionCardMultiStep, Hi 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, Mi 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, Mr 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, ii as PongBall, Je as PrivacyModeProvider, sm as ProductBlankslate, qt as ProductCard, um as ProductModal, fm as ProductWidget, mt as ProgressBarChart, ee as RadarChart, _e as RadarChartSkeleton, Fi as RichTextDisplay, se as RichTextEditor, u as ScatterChartSkeleton, Kl as StandardLayout, Cp as SurveyAllQuestionsLoadingSkeleton, Qp as SurveyAnsweringForm, hp as SurveyFormBuilder, tm as SurveySampleQuestion, wp as SurveySteppedLoadingSkeleton, ys as Tag, is as TagCounter, v as Textarea, Wa as ThreadItem, Fa as ThreadListSkeleton, ev as ToastProvider, ql as TwoColumnLayout, w as UPLOAD_INPUT_ID, P as UpsellRequestResponseDialog, hm as UpsellingAlert, _m as UpsellingBanner, E as UpsellingButton, ym 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, Lr as cardImageAspectRatios, Yr as cardImageFits, ua as cardImageSizes, mr 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, $i as durationInputSizes, Ri as durationUnits, $r as escapeUserText, ie as evaluateRenderIf, gn as experimental, fr as f0FileItemSizes, Sr as f0FormField, qr as fieldsToSeconds, Vd as flattenElements, Li as formatPlaybackTime, pd as forms, h as generateAnchorId, $o as getAnimationVariants, aa as getDataCollectionStorageKey, zo as getDataSourcePaginationType, rr as getEmojiLabel, Pr as getF0Config, Fs as getGranularityDefinition, Cs as getGranularityDefinitions, Bs as getGranularitySimpleDefinition, gt as getSchemaDefinition, ks as granularityDefinitions, Wi as hasF0Config, Ar as inferFieldType, Wd as injectSectionEnds, yo as isInfiniteScrollPagination, bo as isPageBasedPagination, pi 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, sa as readDataCollectionStorage, Ud as reconstructElements, vi as resolveDataCollectionFilters, gs as resolveGranularityDefinition, Dt as resolveItemNeighbors, Qe as resolveWindowNeighbors, lr as secondsToFields, Si 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, gi as unwrapZodSchema, Ba as usageLimitsPopoverSides, Br as useAiChat, ka as useAiChatTranslations, Qi as useAudioPlayer, qa as useCanvasEntity, Ua as useChatHistory, mo as useData, Es as useDataSource, n as useDataSourceItemNavigation, xi as useDerivedTranscription, Ot as useDndEvents, zt as useDraggable, Ge as useDroppableList, tr as useEmojiConfetti, Rr as useF0AiFormRegistry, ts as useF0Dialog, A as useF0DialogAlikeContext, ge as useF0Form, Et as useF0FormDefinition, ga as useFormCardValueFormatter, av as useFormComponent, es as useGroups, Fg as useIsDesktop, Ig 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 };
|