@factorialco/f0-react 12.10.0 → 12.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ArchiveThumbnail-cs8kx5Zf.js +70 -0
- package/dist/ArchiveViewer-BXUH8Lm5.js +172 -0
- package/dist/{ChatPostComposerDialog-DcmLrQk6.js → ChatPostComposerDialog-CGil1xkf.js} +4 -4
- package/dist/{CoachmarkProvider-XfLjB3dH.js → CoachmarkProvider-cZnuTk79.js} +29938 -29932
- package/dist/CodeThumbnail-Dcer4AyK.js +31 -0
- package/dist/CodeViewer-DFBwdIFm.js +98 -0
- package/dist/DocumentToolbar-vZEyzJ89.js +74 -0
- package/dist/{DocxThumbnail-kHTNnwW0.js → DocxThumbnail-CK9vFoTB.js} +2 -2
- package/dist/{DocxViewer-CqHgSExq.js → DocxViewer-DQV5Kv1n.js} +25 -23
- package/dist/ExternalLink-RdKU698E.js +22 -0
- package/dist/{F0AiProcessingOverlay-H23WHd7F.js → F0AiProcessingOverlay-DjGkQ2Nc.js} +1349 -1345
- package/dist/{popover-BjrPOMeQ.js → F0Button-FXkThQ9H.js} +3164 -8587
- package/dist/{F0CanvasPanel--hLKeQvg.js → F0CanvasPanel-BgDo2LWP.js} +9436 -9008
- package/dist/F0DocumentViewer-BXifXzUW.js +79 -0
- package/dist/F0DocumentViewer-DWuIFBHu.js +3 -0
- package/dist/F0Icon-Cj0USbCF.js +202 -0
- package/dist/{F0Map-hvgCUGk8.js → F0Map-Dwev4u-_.js} +189 -188
- package/dist/{F0Select-B-ZxVjXG.js → F0Select-BWWdEd7l.js} +6696 -6726
- package/dist/{F0Text-D92NWQRd.js → F0Text-DMZW7dhN.js} +25 -41
- package/dist/{F0VideoPlayer-CNp5hXgp.js → F0VideoPlayer-BmCmHG87.js} +412 -408
- package/dist/F0VideoPlayer-C8oYUUZM.js +1 -0
- package/dist/HtmlThumbnail-BAgkBH2r.js +60 -0
- package/dist/HtmlViewer-FRfNoxhP.js +208 -0
- package/dist/LockLocked-gdodYvT_.js +41 -0
- package/dist/{Map-eIXVKc1x.js → Map-BxGPElF2.js} +57 -54
- package/dist/{PdfThumbnail-CCSmwxQU.js → PdfThumbnail-CpGZz5Kq.js} +5 -5
- package/dist/PdfViewer-C81MK43i.js +296 -0
- package/dist/SandboxedHtmlFrame-B6YWhgyg.js +309 -0
- package/dist/{SheetViewer-BN5UYkEZ.js → SheetViewer-DPGpMNqq.js} +36 -26
- package/dist/TextThumbnail-DKNxh344.js +15 -0
- package/dist/{TextViewer-Bt0_dYB-.js → TextViewer-BH42AeG8.js} +44 -41
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +5 -5
- package/dist/bash-BcZBmoDA.js +169 -0
- package/dist/c-Dv-5_kUQ.js +187 -0
- package/dist/component-status.js +2 -2
- package/dist/core-C0MCmPil.js +842 -0
- package/dist/cpp-CMQhucZt.js +236 -0
- package/dist/csharp-CuDKSCf2.js +260 -0
- package/dist/css-Dta7Q4Li.js +145 -0
- package/dist/dart-po7Eq73d.js +134 -0
- package/dist/diff-IgsQP-8T.js +39 -0
- package/dist/dist-D-MJbPvE.js +59 -0
- package/dist/dockerfile-B4Bz9I5u.js +34 -0
- package/dist/dos-1TcyLtUq.js +57 -0
- package/dist/elixir-BnEjyLGa.js +189 -0
- package/dist/erlang-tgri7ZSv.js +218 -0
- package/dist/experimental.d.ts +24 -4
- package/dist/experimental.js +2711 -2702
- package/dist/{exports-BByQBwpi.d.ts → exports-C0yM5usu.d.ts} +1 -1
- package/dist/f0.d.ts +130 -8
- package/dist/f0.js +751 -745
- package/dist/fetchText-o_GOtiv3.js +54 -0
- package/dist/go-CEVmppuo.js +144 -0
- package/dist/graphql-BWwc-u8d.js +67 -0
- package/dist/groovy-BELuqtd6.js +127 -0
- package/dist/haskell-Cxh7aaFM.js +138 -0
- package/dist/highlight-CyebkDAD.js +114 -0
- package/dist/i18n-provider-BBhzYHef.js +150 -0
- package/dist/{i18n-provider-defaults-p0UGTA_k.js → i18n-provider-defaults-BUagKwGN.js} +32 -1
- package/dist/{i18n-provider-defaults-DQxuUMpU.d.ts → i18n-provider-defaults-CTDMMs-y.d.ts} +31 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-D3nEDg8x.d.ts → index-CduxMW5L.d.ts} +1 -1
- package/dist/ini-DA-F0rRr.js +88 -0
- package/dist/java-Bujnoc_f.js +174 -0
- package/dist/javascript-BeEhpXRE.js +431 -0
- package/dist/json-CxvE7tEw.js +42 -0
- package/dist/kotlin-DOwDGI_m.js +206 -0
- package/dist/less-DWlR-e-o.js +196 -0
- package/dist/lua-BlZiakwh.js +46 -0
- package/dist/makefile-D3841Yg4.js +57 -0
- package/dist/{maplibre-Bywi9z2G.js → maplibre-g-8NG-3q.js} +1 -1
- package/dist/markdown-D1wNG79U.js +178 -0
- package/dist/objectivec-DxtRzTBy.js +117 -0
- package/dist/ownValue-D4uSXt0d.js +4 -0
- package/dist/{pdfWorker-CKgxOaCl.js → pdfWorker-D5NB2V5s.js} +12 -9
- package/dist/pdfWorkerConfig-BwllKt1K.js +8 -0
- package/dist/perl-BWRmkuyz.js +192 -0
- package/dist/php-CjwybYSP.js +300 -0
- package/dist/popover-CQztsDta.js +4486 -0
- package/dist/{posts-DGtDUrKT.js → posts-BHRBUAYJ.js} +2 -0
- package/dist/powershell-CgKcNA5Q.js +188 -0
- package/dist/properties-Bc45MTzW.js +38 -0
- package/dist/protobuf-Bv_xSUaI.js +61 -0
- package/dist/purify.es-ZpfdAuNV.js +545 -0
- package/dist/python-D8PdGjgy.js +238 -0
- package/dist/r-DA-9ZIdU.js +140 -0
- package/dist/{renderDocx-_UmnE-yc.js → renderDocx-BW-uDyaZ.js} +2 -0
- package/dist/ruby-Bqr16BpN.js +262 -0
- package/dist/rust-BCvJMwk8.js +182 -0
- package/dist/scala-Du8mOD2z.js +162 -0
- package/dist/scss-AMxHqh46.js +155 -0
- package/dist/skeleton-DqejhQgn.js +72 -0
- package/dist/sql-BbYSgcOA.js +118 -0
- package/dist/styles.css +1 -1
- package/dist/swift-DRKtalPn.js +575 -0
- package/dist/toolbarStyles-0IygMI4H.js +52 -0
- package/dist/{types-UMYBr8Mi.d.ts → types-DlwD3i9z.d.ts} +3 -95
- package/dist/typescript-Bv8uKU6V.js +516 -0
- package/dist/{useData-B7LYSzh0.js → useData-Dkq5W4r6.js} +4917 -4876
- package/dist/useFetchedText-BR3_KLXx.js +38 -0
- package/dist/useThumbnailText-DwXQvLIe.js +22 -0
- package/dist/xml-BVpP05uE.js +162 -0
- package/dist/yaml-BNe2WG-i.js +144 -0
- package/dist/zipTree-B2zUYl6b.js +247 -0
- package/package.json +2 -1
- package/dist/DocumentToolbar-CqbY6eID.js +0 -70
- package/dist/F0DocumentViewer-BN-2IVgz.js +0 -400
- package/dist/F0DocumentViewer-D1G3M2J_.js +0 -3
- package/dist/F0VideoPlayer-D4bZBBLK.js +0 -1
- package/dist/TextThumbnail-X04JgaNI.js +0 -26
- package/dist/dist-DvxtFKDL.js +0 -78
package/dist/f0.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
|
-
import { $n as t, A as n, An as r, Bn as i, Br as a, C as o, Cn as s, Cr as c, D as l, Dn as u, E as d, En as f, Er as p, Fn as m, Ft as h, Gn as g, Gr as _, Gt as v, Hn as y, Hr as b, Ht as x, In as S, It as C, Jn as w, Jt as T, Kn as E, Kr as D, Kt as O, Ln as k, Lr as A, Lt as j, M, Mn as N, N as P, Nn as F, O as I, On as ee, P as te, Pn as ne, Pt as re, Qn as ie, Qr as ae, Qt as oe, Rn as se, Rt as L, S as ce, Sn as le, Sr as ue, St as de, T as fe, Tn as pe, Tr as me, Un as he, Ut as ge, Vn as _e, Vr as ve, Vt as ye, Wr as be, Wt as xe, X as Se, Xn as Ce, Xr as we, Yn as Te, Yr as Ee, Yt as De, Z as Oe, Zn as ke, Zr as Ae, Zt as je, _ as Me, _n as Ne, _r as Pe, _t as Fe, ar as Ie, b as Le, bn as Re, br as ze, bt as Be, c as Ve, cn as He, cr as Ue, d as We, di as Ge, dn as Ke, dr as qe, en as Je, er as Ye, f as Xe, fi as Ze, fn as Qe, fr as $e, g as et, gn as tt, gr as nt, gt as rt, h as it, hi as at, hn as ot, hr as st, ht as ct, i as lt, ii as ut, ir as dt, j as ft, jn as pt, k as mt, kn as ht, kt as gt, l as _t, ln as vt, lr as yt, mn as bt, mr as xt, ni as St, nn as Ct, nr as wt, on as Tt, or as Et, ot as Dt, p as Ot, pn as kt, pr as At, qn as jt, qr as Mt, qt as Nt, ri as Pt, rn as Ft, rr as It, s as Lt, sn as Rt, sr as zt, t as Bt, tn as Vt, tr as Ht, u as Ut, ui as Wt, un as Gt, ur as Kt, ut as qt, v as Jt, vn as Yt, vr as Xt, vt as Zt, w as Qt, wn as $t, wr as en, x as tn, xn as nn, xr as rn, xt as an, y as on, yn as sn, yr as cn, yt as ln, zn as un, zr as dn, zt as fn } from "./CoachmarkProvider-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { A as
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import { C as
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import { a as
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
2
|
+
import { $n as t, A as n, An as r, Bn as i, Br as a, C as o, Cn as s, Cr as c, D as l, Dn as u, E as d, En as f, Er as p, Fn as m, Ft as h, Gn as g, Gr as _, Gt as v, Hn as y, Hr as b, Ht as x, In as S, It as C, Jn as w, Jt as T, Kn as E, Kr as D, Kt as O, Ln as k, Lr as A, Lt as j, M, Mn as N, N as P, Nn as F, O as I, On as ee, P as te, Pn as ne, Pt as re, Qn as ie, Qr as ae, Qt as oe, Rn as se, Rt as L, S as ce, Sn as le, Sr as ue, St as de, T as fe, Tn as pe, Tr as me, Un as he, Ut as ge, Vn as _e, Vr as ve, Vt as ye, Wr as be, Wt as xe, X as Se, Xn as Ce, Xr as we, Yn as Te, Yr as Ee, Yt as De, Z as Oe, Zn as ke, Zr as Ae, Zt as je, _ as Me, _n as Ne, _r as Pe, _t as Fe, ar as Ie, b as Le, bn as Re, br as ze, bt as Be, c as Ve, cn as He, cr as Ue, d as We, di as Ge, dn as Ke, dr as qe, en as Je, er as Ye, f as Xe, fi as Ze, fn as Qe, fr as $e, g as et, gn as tt, gr as nt, gt as rt, h as it, hi as at, hn as ot, hr as st, ht as ct, i as lt, ii as ut, ir as dt, j as ft, jn as pt, k as mt, kn as ht, kt as gt, l as _t, ln as vt, lr as yt, mn as bt, mr as xt, ni as St, nn as Ct, nr as wt, on as Tt, or as Et, ot as Dt, p as Ot, pn as kt, pr as At, qn as jt, qr as Mt, qt as Nt, ri as Pt, rn as Ft, rr as It, s as Lt, sn as Rt, sr as zt, t as Bt, tn as Vt, tr as Ht, u as Ut, ui as Wt, un as Gt, ur as Kt, ut as qt, v as Jt, vn as Yt, vr as Xt, vt as Zt, w as Qt, wn as $t, wr as en, x as tn, xn as nn, xr as rn, xt as an, y as on, yn as sn, yr as cn, yt as ln, zn as un, zr as dn, zt as fn } from "./CoachmarkProvider-cZnuTk79.js";
|
|
3
|
+
import { a as R, i as pn, n as mn, o as hn, r as z, t as gn } from "./i18n-provider-BBhzYHef.js";
|
|
4
|
+
import { n as _n, t as vn } from "./skeleton-DqejhQgn.js";
|
|
5
|
+
import { A as yn, C as bn, D as xn, F as Sn, I as Cn, L as B, M as wn, N as Tn, O as En, P as Dn, R as On, S as kn, _ as An, b as jn, c as Mn, f as Nn, g as Pn, h as Fn, j as In, k as Ln, l as Rn, m as zn, p as Bn, v as Vn, w as Hn, x as Un, y as Wn } from "./tooltip-BX4dSfeL.js";
|
|
6
|
+
import { A as Gn, M as Kn, N as qn, U as Jn, b as Yn, f as Xn, h as Zn, j as Qn, m as $n, n as er, p as tr, r as nr, t as V, w as rr, wt as ir, y as ar, z as or } from "./F0Button-FXkThQ9H.js";
|
|
7
|
+
import { t as sr } from "./F0Text-DMZW7dhN.js";
|
|
8
|
+
import { A as cr, C as lr, D as ur, E as dr, F as fr, I as pr, L as mr, M as hr, N as gr, O as _r, P as vr, R as yr, S as br, T as xr, _ as Sr, a as Cr, b as wr, c as Tr, d as Er, f as Dr, g as Or, h as kr, i as Ar, j as jr, k as Mr, l as Nr, m as Pr, n as Fr, o as Ir, p as Lr, r as Rr, s as zr, t as Br, u as Vr, v as Hr, w as Ur, x as Wr, y as Gr, z as Kr } from "./F0AiProcessingOverlay-DjGkQ2Nc.js";
|
|
9
|
+
import { $n as qr, $r as Jr, $s as Yr, $t as Xr, Ba as Zr, Br as Qr, Bt as $r, C as ei, Cr as ti, D as ni, Dr as ri, E as ii, Fr as ai, Ft as oi, Ga as si, Gn as ci, Gs as li, Hr as ui, Ht as di, Ia as fi, Ir as pi, It as mi, Jn as hi, Jr as gi, Js as _i, Kn as vi, Ks as yi, Lr as bi, Ls as xi, Lt as Si, Mt as Ci, Na as wi, Ns as Ti, Pt as Ei, Qn as Di, Qt as Oi, R as ki, Ra as Ai, Rs as ji, Rt as Mi, S as Ni, Sa as Pi, T as Fi, To as Ii, Tr as Li, Ur as Ri, Vo as zi, Vt as Bi, Wa as Vi, Wn as Hi, Wr as Ui, Xn as Wi, Xr as Gi, Xs as Ki, Xt as qi, Yn as Ji, Yr as Yi, Ys as Xi, Zs as Zi, Zt as Qi, _o as $i, ar as ea, b as ta, co as na, cr as ra, da as ia, ds as aa, en as oa, eo as sa, es as ca, go as la, gs as ua, ic as da, ir as fa, is as pa, js as ma, kr as ha, mo as ga, n as _a, nn as va, or as ya, os as ba, pc as xa, qn as Sa, qo as Ca, qr as wa, qs as Ta, rr as Ea, rs as Da, sr as Oa, t as ka, tn as Aa, to as ja, tt as Ma, uc as Na, uo as Pa, us as Fa, vr as Ia, w as La, wr as Ra, x as za, xa as Ba, y as Va, yr as Ha, z as Ua, za as Wa, zr as Ga } from "./F0CanvasPanel-BgDo2LWP.js";
|
|
10
|
+
import { a as Ka, i as qa, n as Ja, o as Ya, r as Xa, t as H } from "./F0Icon-Cj0USbCF.js";
|
|
11
|
+
import { t as Za } from "./i18n-provider-defaults-BUagKwGN.js";
|
|
12
|
+
import { C as Qa, D as $a, F as eo, I as to, N as no, O as ro, S as io, V as ao, X as oo, Z as so, _ as co, a as lo, d as uo, f as fo, i as po, k as mo, l as ho, n as go, r as _o, t as vo, x as yo, y as bo } from "./useData-Dkq5W4r6.js";
|
|
13
|
+
import { $ as xo, Ar as So, B as Co, Bt as wo, Ct as To, Dn as Eo, Dr as Do, Dt as Oo, Er as ko, Fn as Ao, Ft as jo, G as Mo, H as No, It as Po, J as Fo, K as Io, L as Lo, Ln as Ro, Lt as zo, Mt as Bo, Nt as Vo, On as Ho, Ot as Uo, Pt as Wo, Rt as Go, Tr as Ko, U as qo, V as Jo, W as Yo, X as Xo, Z as Zo, _ as Qo, _t as $o, a as es, an as ts, c as ns, ct as rs, dr as is, et as as, g as os, gr as ss, gt as cs, h as ls, ht as us, i as ds, jr as fs, jt as ps, kn as ms, kr as hs, kt as gs, l as _s, lr as vs, m as ys, mt as bs, nt as xs, o as Ss, p as Cs, pr as ws, pt as Ts, q as Es, r as Ds, rn as Os, s as ks, st as As, t as js, tt as Ms, u as Ns, v as Ps, w as Fs, wr as Is, wt as Ls, xt as Rs, y as zs, yt as Bs, z as Vs } from "./F0Select-BWWdEd7l.js";
|
|
14
|
+
import { t as Hs } from "./Check-DAp9gCRh.js";
|
|
15
|
+
import { t as Us } from "./LockLocked-gdodYvT_.js";
|
|
16
|
+
import { t as Ws } from "./purify.es-ZpfdAuNV.js";
|
|
17
|
+
import { A as Gs, B as Ks, H as qs, L as Js, M as Ys, N as Xs, P as Zs, R as Qs, a as $s, ct as ec, ft as tc, gt as nc, ht as rc, i as ic, j as ac, k as oc, lt as sc, mt as cc, st as lc, t as uc, tt as dc, z as fc } from "./popover-CQztsDta.js";
|
|
18
|
+
import { a as pc, i as mc, n as hc, r as gc, t as _c } from "./F0VideoPlayer-BmCmHG87.js";
|
|
19
|
+
import { t as vc } from "./pdfWorkerConfig-BwllKt1K.js";
|
|
20
|
+
import { n as yc, t as bc } from "./F0DocumentViewer-BXifXzUW.js";
|
|
15
21
|
import * as U from "react";
|
|
16
22
|
import xc, { Children as Sc, Fragment as Cc, createContext as wc, forwardRef as Tc, isValidElement as Ec, memo as Dc, useCallback as W, useContext as Oc, useEffect as G, useId as kc, useImperativeHandle as Ac, useLayoutEffect as jc, useMemo as K, useRef as q, useState as J, useSyncExternalStore as Mc } from "react";
|
|
17
23
|
import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
@@ -19,7 +25,7 @@ import * as Nc from "react-dom";
|
|
|
19
25
|
import { createPortal as Pc } from "react-dom";
|
|
20
26
|
import './f0.css';//#region ../../node_modules/.pnpm/@base-ui+utils@0.4.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/inertValue.mjs
|
|
21
27
|
function Fc(e) {
|
|
22
|
-
return
|
|
28
|
+
return Fn(19) ? e : e ? "true" : void 0;
|
|
23
29
|
}
|
|
24
30
|
//#endregion
|
|
25
31
|
//#region src/blocks/layouts/HomeLayout/HomeLayout.tsx
|
|
@@ -35,7 +41,7 @@ var Ic = {
|
|
|
35
41
|
className: "h-full @5xl:h-auto [&>div]:h-full",
|
|
36
42
|
children: e
|
|
37
43
|
}, t));
|
|
38
|
-
return /* @__PURE__ */ X(
|
|
44
|
+
return /* @__PURE__ */ X(si, {
|
|
39
45
|
layout: "home",
|
|
40
46
|
children: /* @__PURE__ */ Z("div", {
|
|
41
47
|
ref: r,
|
|
@@ -66,23 +72,23 @@ var Ic = {
|
|
|
66
72
|
})]
|
|
67
73
|
})
|
|
68
74
|
});
|
|
69
|
-
}), Rc =
|
|
75
|
+
}), Rc = Ya({
|
|
70
76
|
base: "relative flex min-h-full w-full flex-1 flex-col gap-4 place-self-center overflow-y-auto px-page py-5",
|
|
71
77
|
variants: { variant: { narrow: "max-w-screen-lg" } }
|
|
72
|
-
}), zc = xc.forwardRef(({ children: e, variant: t, scrollable: n = !0, className: r, ...i }, a) => /* @__PURE__ */ X(
|
|
78
|
+
}), zc = xc.forwardRef(({ children: e, variant: t, scrollable: n = !0, className: r, ...i }, a) => /* @__PURE__ */ X(si, {
|
|
73
79
|
layout: "standard",
|
|
74
80
|
children: /* @__PURE__ */ X("section", {
|
|
75
81
|
ref: a,
|
|
76
|
-
className:
|
|
82
|
+
className: B("relative flex-1 overflow-auto", !n && "overflow-visible", r),
|
|
77
83
|
...i,
|
|
78
84
|
children: /* @__PURE__ */ X("div", {
|
|
79
|
-
className:
|
|
85
|
+
className: B(Rc({ variant: t }), !n && "overflow-visible"),
|
|
80
86
|
children: e
|
|
81
87
|
})
|
|
82
88
|
})
|
|
83
89
|
}));
|
|
84
90
|
zc.displayName = "StandardLayout";
|
|
85
|
-
var Bc = R(
|
|
91
|
+
var Bc = R(Xa({
|
|
86
92
|
name: "StandardLayout",
|
|
87
93
|
type: "layout"
|
|
88
94
|
}, zc)), Vc = Tc(function({ children: e, sideContent: t, mainColumnPosition: n = "left", sticky: r = !1, responsiveStackOrder: i = "side" }, a) {
|
|
@@ -90,22 +96,22 @@ var Bc = R(Zn({
|
|
|
90
96
|
ref: a,
|
|
91
97
|
className: "h-full",
|
|
92
98
|
children: /* @__PURE__ */ Z("div", {
|
|
93
|
-
className:
|
|
99
|
+
className: B("flex h-full max-w-full overflow-auto text-f1-foreground md:flex-row", "flex-col", "overflow-y-auto", r && "md:sticky md:top-0 md:max-h-full"),
|
|
94
100
|
children: [/* @__PURE__ */ X("main", {
|
|
95
|
-
className:
|
|
101
|
+
className: B("sm:min-h-xs h-fit border-0 py-5 sm:flex-1 sm:border-solid md:order-2 px-page", i === "main" ? "order-1" : "order-2", r ? "md:h-full md:max-h-full md:overflow-y-auto" : "min-h-full", n === "right" ? "sm:border-l sm:border-l-f1-border-secondary" : "sm:border-r sm:border-r-f1-border-secondary", "border-t border-solid border-t-f1-border-secondary sm:border-t-0"),
|
|
96
102
|
children: e
|
|
97
103
|
}), /* @__PURE__ */ X(Uc, {
|
|
98
104
|
sticky: r,
|
|
99
|
-
className:
|
|
105
|
+
className: B(i === "main" ? "order-2" : "order-1", n === "right" ? "md:order-1" : "md:order-3"),
|
|
100
106
|
children: t
|
|
101
107
|
})]
|
|
102
108
|
})
|
|
103
109
|
});
|
|
104
|
-
}), Hc = R(
|
|
110
|
+
}), Hc = R(Xa({
|
|
105
111
|
name: "TwoColumnLayout",
|
|
106
112
|
type: "layout"
|
|
107
113
|
}, Vc)), Uc = ({ children: e, className: t }) => /* @__PURE__ */ X("aside", {
|
|
108
|
-
className:
|
|
114
|
+
className: B("min-w-30 py-5 pl-page pr-page sm:basis-1/4 sm:pb-6 md:max-w-80 md:pl-2", t),
|
|
109
115
|
children: e
|
|
110
116
|
}), Wc = wc(null);
|
|
111
117
|
function Gc() {
|
|
@@ -203,7 +209,7 @@ function Zc({ children: e, options: t, onResizeStop: n, onChange: r, widgets: i,
|
|
|
203
209
|
n(e);
|
|
204
210
|
}), e;
|
|
205
211
|
});
|
|
206
|
-
|
|
212
|
+
vs(() => {
|
|
207
213
|
if (!s) return;
|
|
208
214
|
let e = s.save();
|
|
209
215
|
if (!Array.isArray(e)) return;
|
|
@@ -254,7 +260,7 @@ function Zc({ children: e, options: t, onResizeStop: n, onChange: r, widgets: i,
|
|
|
254
260
|
return e.forEach((e) => {
|
|
255
261
|
if (n.get(e)) {
|
|
256
262
|
let t = s.el.querySelector(`[gs-id="${e}"] .grid-stack-item-content`), r = "";
|
|
257
|
-
t && (r =
|
|
263
|
+
t && (r = Ws.sanitize(Xc(t))), n.set(e, /* @__PURE__ */ X(Jn.div, {
|
|
258
264
|
className: "h-full w-full",
|
|
259
265
|
initial: {
|
|
260
266
|
opacity: 1,
|
|
@@ -2614,7 +2620,7 @@ Sl.renderCB = (e, t) => {
|
|
|
2614
2620
|
}, Sl.resizeToContentParent = ".grid-stack-item-content", Sl.Utils = Q, Sl.Engine = nl, Sl.GDRev = "12.3.2";
|
|
2615
2621
|
//#endregion
|
|
2616
2622
|
//#region src/blocks/F0GridStack/components/grid-stack-render-provider.tsx
|
|
2617
|
-
var Cl = /* @__PURE__ */ e(
|
|
2623
|
+
var Cl = /* @__PURE__ */ e(Ro(), 1), wl = /* @__PURE__ */ new WeakMap();
|
|
2618
2624
|
function Tl({ children: e }) {
|
|
2619
2625
|
let { _gridStack: { value: t, set: n }, options: r } = Gc(), i = q(/* @__PURE__ */ new Map()), a = q(null), o = q(r), s = W((e, t) => {
|
|
2620
2626
|
if (t.id && t.grid) {
|
|
@@ -2718,8 +2724,8 @@ var El = ({ options: e, widgets: t, onChange: n, className: r, static: i, forceP
|
|
|
2718
2724
|
});
|
|
2719
2725
|
};
|
|
2720
2726
|
El.displayName = "F0GridStack";
|
|
2721
|
-
var Dl = R(
|
|
2722
|
-
let o = W((e, t, n) => /* @__PURE__ */ X(
|
|
2727
|
+
var Dl = R(_n("F0GridStack", El)), Ol = (e, t, n) => /* @__PURE__ */ X("div", { children: e }), kl = ({ widgets: e = [], editMode: t = !1, onChange: n = () => {}, WidgetWrapper: r = Ol, main: i = !1, deps: a }) => {
|
|
2728
|
+
let o = W((e, t, n) => /* @__PURE__ */ X(Jn.div, {
|
|
2723
2729
|
className: "h-full w-full",
|
|
2724
2730
|
initial: {
|
|
2725
2731
|
opacity: 0,
|
|
@@ -2887,7 +2893,7 @@ var Dl = R(tr("F0GridStack", El)), Ol = (e, t, n) => /* @__PURE__ */ X("div", {
|
|
|
2887
2893
|
_,
|
|
2888
2894
|
a
|
|
2889
2895
|
]), /* @__PURE__ */ X(El, {
|
|
2890
|
-
className:
|
|
2896
|
+
className: B(i && "h-full flex-1 overflow-auto"),
|
|
2891
2897
|
options: s,
|
|
2892
2898
|
onChange: v,
|
|
2893
2899
|
widgets: l
|
|
@@ -2902,7 +2908,7 @@ var Al = (e, t) => {
|
|
|
2902
2908
|
}, jl = (e, t) => {
|
|
2903
2909
|
let n = t;
|
|
2904
2910
|
return n.displayName = e, n.__isPageLayoutGroup = !0, n;
|
|
2905
|
-
}, Ml =
|
|
2911
|
+
}, Ml = Gn.filter((e) => e !== "ai"), Nl = Kn, Pl = ({ children: e, title: t, draggable: n = !1, actions: r, aiButton: i }) => /* @__PURE__ */ X(ae, {
|
|
2906
2912
|
header: { title: t },
|
|
2907
2913
|
draggable: n,
|
|
2908
2914
|
actions: r,
|
|
@@ -2924,7 +2930,7 @@ var Al = (e, t) => {
|
|
|
2924
2930
|
})
|
|
2925
2931
|
});
|
|
2926
2932
|
Fl.displayName = "Dashboard";
|
|
2927
|
-
var Il = jl("Dashboard", Fl), Ll = R(
|
|
2933
|
+
var Il = jl("Dashboard", Fl), Ll = R(_n("Dashboard", Il)), Rl = Ya({
|
|
2928
2934
|
base: "flex w-full flex-col p-4",
|
|
2929
2935
|
variants: { variant: {
|
|
2930
2936
|
default: "",
|
|
@@ -2935,7 +2941,7 @@ var Il = jl("Dashboard", Fl), Ll = R(tr("Dashboard", Il)), Rl = Bn({
|
|
|
2935
2941
|
let d = K(() => Bl(l.actions || []), [l.actions]), f = K(() => d.flatMap((e) => e.items), [d]), p = K(() => f.length > 0 || !!c, [f, c]);
|
|
2936
2942
|
return /* @__PURE__ */ Z("div", {
|
|
2937
2943
|
ref: u,
|
|
2938
|
-
className:
|
|
2944
|
+
className: B(Rl({ variant: t }), "relative", n),
|
|
2939
2945
|
draggable: r,
|
|
2940
2946
|
onDragStart: i,
|
|
2941
2947
|
onDragEnd: a,
|
|
@@ -2944,7 +2950,7 @@ var Il = jl("Dashboard", Fl), Ll = R(tr("Dashboard", Il)), Rl = Bn({
|
|
|
2944
2950
|
...l,
|
|
2945
2951
|
children: [p ? /* @__PURE__ */ Z("div", {
|
|
2946
2952
|
className: "absolute right-0 top-0 flex items-center justify-end gap-2 p-4",
|
|
2947
|
-
children: [c || null, f.length > 0 ? /* @__PURE__ */ X(
|
|
2953
|
+
children: [c || null, f.length > 0 ? /* @__PURE__ */ X(Pi, {
|
|
2948
2954
|
items: zl(d),
|
|
2949
2955
|
"data-testid": "actions-dropdown"
|
|
2950
2956
|
}) : null]
|
|
@@ -2960,11 +2966,11 @@ var Hl = Al("BlockContent", ({ title: e = "", description: t, titleLevel: n = "h
|
|
|
2960
2966
|
let o = n;
|
|
2961
2967
|
return /* @__PURE__ */ Z(Vl, {
|
|
2962
2968
|
...a,
|
|
2963
|
-
className:
|
|
2969
|
+
className: B("space-y-4", i),
|
|
2964
2970
|
children: [/* @__PURE__ */ Z("div", {
|
|
2965
2971
|
className: "space-y-2",
|
|
2966
2972
|
children: [/* @__PURE__ */ X(o, {
|
|
2967
|
-
className:
|
|
2973
|
+
className: B("font-semibold text-f1-foreground", {
|
|
2968
2974
|
"text-2xl": n === "h1",
|
|
2969
2975
|
"text-xl": n === "h2",
|
|
2970
2976
|
"text-lg": n === "h3",
|
|
@@ -3018,7 +3024,7 @@ var ql = ({ id: e, children: t }) => {
|
|
|
3018
3024
|
});
|
|
3019
3025
|
}, Jl = ({ blocks: e, sortable: t = !1, onSort: n = () => {}, main: r = !1 }) => {
|
|
3020
3026
|
let [i, o] = J([]);
|
|
3021
|
-
|
|
3027
|
+
vs(() => {
|
|
3022
3028
|
o(e.map((e, t) => ({
|
|
3023
3029
|
id: e.id ?? t.toString(),
|
|
3024
3030
|
render: e.render
|
|
@@ -3026,7 +3032,7 @@ var ql = ({ id: e, children: t }) => {
|
|
|
3026
3032
|
}, [e]);
|
|
3027
3033
|
let [s, c] = J(null), l = we(Ee(Mt), Ee(D, { coordinateGetter: ve }));
|
|
3028
3034
|
return /* @__PURE__ */ X("div", {
|
|
3029
|
-
className:
|
|
3035
|
+
className: B("flex flex-wrap items-stretch gap-4", r && "flex-1"),
|
|
3030
3036
|
children: /* @__PURE__ */ Z(be, {
|
|
3031
3037
|
sensors: l,
|
|
3032
3038
|
onDragStart: (e) => {
|
|
@@ -3060,30 +3066,30 @@ var Yl = Tc(function({ children: e, aside: t, header: n, variant: r = "main-asid
|
|
|
3060
3066
|
ref: i,
|
|
3061
3067
|
className: "h-full",
|
|
3062
3068
|
children: /* @__PURE__ */ Z("div", {
|
|
3063
|
-
className:
|
|
3069
|
+
className: B("flex h-full max-w-full overflow-auto text-f1-foreground md:flex-row", "flex-col", "overflow-y-auto", "md:sticky md:top-0 md:max-h-full"),
|
|
3064
3070
|
children: [/* @__PURE__ */ Z("main", {
|
|
3065
|
-
className:
|
|
3071
|
+
className: B("sm:min-h-xs h-fit border-0", "order-1 flex flex-col sm:flex-1 sm:border-solid md:order-2", "md:auto md:h-full md:max-h-full md:overflow-y-auto md:overflow-x-hidden", r === "aside-main" ? "sm:border-l sm:border-l-f1-border-secondary" : "sm:border-r sm:border-r-f1-border-secondary", "border-t border-solid border-t-f1-border-secondary sm:border-t-0"),
|
|
3066
3072
|
children: [n ? /* @__PURE__ */ X("header", {
|
|
3067
|
-
className:
|
|
3073
|
+
className: B("sticky top-0 z-30 bg-f1-background"),
|
|
3068
3074
|
children: n
|
|
3069
3075
|
}) : null, /* @__PURE__ */ X("div", {
|
|
3070
3076
|
className: "flex-1",
|
|
3071
3077
|
children: e
|
|
3072
3078
|
})]
|
|
3073
3079
|
}), t ? /* @__PURE__ */ X("aside", {
|
|
3074
|
-
className:
|
|
3080
|
+
className: B("min-w-30 sm:basis-1/4 md:max-w-80", "order-2", r === "aside-main" ? "md:order-1" : "md:order-3"),
|
|
3075
3081
|
children: t
|
|
3076
3082
|
}) : null]
|
|
3077
3083
|
})
|
|
3078
3084
|
});
|
|
3079
3085
|
}), Xl = {
|
|
3080
|
-
Page: R(
|
|
3081
|
-
Block: R(
|
|
3082
|
-
BlockContent: R(
|
|
3083
|
-
Group: R(
|
|
3084
|
-
GroupGrid: R(
|
|
3085
|
-
GroupMasonry: R(
|
|
3086
|
-
}, Zl = Bc, Ql = Hc, $l = R(
|
|
3086
|
+
Page: R(_n("Page", Yl)),
|
|
3087
|
+
Block: R(_n("Block", Vl)),
|
|
3088
|
+
BlockContent: R(_n("BlockContent", Hl)),
|
|
3089
|
+
Group: R(_n("Group", Kl)),
|
|
3090
|
+
GroupGrid: R(_n("GroupGrid", kl)),
|
|
3091
|
+
GroupMasonry: R(_n("GroupMasonry", Jl))
|
|
3092
|
+
}, Zl = Bc, Ql = Hc, $l = R(Xa({
|
|
3087
3093
|
name: "HomeLayout",
|
|
3088
3094
|
type: "layout"
|
|
3089
3095
|
}, Lc)), eu = [
|
|
@@ -3099,7 +3105,7 @@ var Yl = Tc(function({ children: e, aside: t, header: n, variant: r = "main-asid
|
|
|
3099
3105
|
show: e.show ?? !0,
|
|
3100
3106
|
invertStatus: e.invertStatus ?? !1
|
|
3101
3107
|
}, nu = ({ label: e, ...t }) => {
|
|
3102
|
-
let n =
|
|
3108
|
+
let n = Po(), r = n(t.value, { formatterOptions: { decimalPlaces: 2 } }), i = tu(t.trend), a = n(t.comparison), o = zo(r.numericValue, r.formatterOptions), s = Go(a.numericValue), c = Go(r.numericValue), l = K(() => {
|
|
3103
3109
|
if (s && i.show && s && c) return (c - s) / s * 100;
|
|
3104
3110
|
}, [
|
|
3105
3111
|
c,
|
|
@@ -3113,7 +3119,7 @@ var Yl = Tc(function({ children: e, aside: t, header: n, variant: r = "main-asid
|
|
|
3113
3119
|
children: [/* @__PURE__ */ X("span", {
|
|
3114
3120
|
className: "font-bold text-2xl",
|
|
3115
3121
|
children: o
|
|
3116
|
-
}), s === void 0 ? null : /* @__PURE__ */ X(
|
|
3122
|
+
}), s === void 0 ? null : /* @__PURE__ */ X(jo, {
|
|
3117
3123
|
percentage: l,
|
|
3118
3124
|
amount: a,
|
|
3119
3125
|
invertStatus: i.invertStatus,
|
|
@@ -3123,17 +3129,17 @@ var Yl = Tc(function({ children: e, aside: t, header: n, variant: r = "main-asid
|
|
|
3123
3129
|
});
|
|
3124
3130
|
}, ru = () => /* @__PURE__ */ Z("div", {
|
|
3125
3131
|
className: "relative flex h-full w-full cursor-progress flex-col gap-2",
|
|
3126
|
-
children: [/* @__PURE__ */ X(
|
|
3132
|
+
children: [/* @__PURE__ */ X(vn, { className: "h-3 w-full max-w-16 rounded-md" }), /* @__PURE__ */ Z("div", {
|
|
3127
3133
|
className: "flex flex-row flex-wrap items-end gap-2",
|
|
3128
|
-
children: [/* @__PURE__ */ X(
|
|
3134
|
+
children: [/* @__PURE__ */ X(vn, { className: "h-8 w-full max-w-36 rounded-sm" }), /* @__PURE__ */ X(vn, { className: "h-6 w-full max-w-18 rounded-sm" })]
|
|
3129
3135
|
})]
|
|
3130
3136
|
});
|
|
3131
3137
|
nu.displayName = "F0BigNumber";
|
|
3132
|
-
var iu =
|
|
3138
|
+
var iu = wi(nu, ru), au = R(iu), ou = [
|
|
3133
3139
|
"default",
|
|
3134
3140
|
"outline",
|
|
3135
3141
|
"neutral"
|
|
3136
|
-
], su =
|
|
3142
|
+
], su = Kn, cu = ["split", "dropdown"], lu = ["sm", "md"], uu = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => e.startsWith("data-"))), du = (e) => {
|
|
3137
3143
|
(!Number.isFinite(e) || e < 0) && (e = 0);
|
|
3138
3144
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = (e) => String(e).padStart(2, "0");
|
|
3139
3145
|
return n > 0 ? `${n}:${a(r)}:${a(i)}` : `${r}:${a(i)}`;
|
|
@@ -3235,8 +3241,8 @@ var iu = Xa(nu, ru), au = R(iu), ou = [
|
|
|
3235
3241
|
"ArrowUp",
|
|
3236
3242
|
"ArrowLeft"
|
|
3237
3243
|
]
|
|
3238
|
-
}, Su = "Slider", [Cu, wu, Tu] =
|
|
3239
|
-
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = "horizontal", disabled: s = !1, minStepsBetweenThumbs: c = 0, defaultValue: l = [r], value: u, onValueChange: d = () => {}, onValueCommit: f = () => {}, inverted: p = !1, form: m, ...h } = e, g = U.useRef(/* @__PURE__ */ new Set()), _ = U.useRef(0), v = o === "horizontal" ? Nu : Pu, [y = [], b] =
|
|
3244
|
+
}, Su = "Slider", [Cu, wu, Tu] = ec(Su), [Eu, Du] = cc(Su, [Tu]), [Ou, ku] = Eu(Su), Au = U.forwardRef((e, t) => {
|
|
3245
|
+
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = "horizontal", disabled: s = !1, minStepsBetweenThumbs: c = 0, defaultValue: l = [r], value: u, onValueChange: d = () => {}, onValueCommit: f = () => {}, inverted: p = !1, form: m, ...h } = e, g = U.useRef(/* @__PURE__ */ new Set()), _ = U.useRef(0), v = o === "horizontal" ? Nu : Pu, [y = [], b] = tc({
|
|
3240
3246
|
prop: u,
|
|
3241
3247
|
defaultProp: l,
|
|
3242
3248
|
onChange: (e) => {
|
|
@@ -3254,7 +3260,7 @@ var iu = Xa(nu, ru), au = R(iu), ou = [
|
|
|
3254
3260
|
y[_.current] !== e && f(y);
|
|
3255
3261
|
}
|
|
3256
3262
|
function T(e, t, { commit: n } = { commit: !1 }) {
|
|
3257
|
-
let o = $u(a), s = ed(Math.round((e - r) / a) * a + r, o), l =
|
|
3263
|
+
let o = $u(a), s = ed(Math.round((e - r) / a) * a + r, o), l = Oo(s, [r, i]);
|
|
3258
3264
|
b((e = []) => {
|
|
3259
3265
|
let r = Gu(e, l, t);
|
|
3260
3266
|
if (Zu(r, c * a)) {
|
|
@@ -3285,7 +3291,7 @@ var iu = Xa(nu, ru), au = R(iu), ou = [
|
|
|
3285
3291
|
"data-disabled": s ? "" : void 0,
|
|
3286
3292
|
...h,
|
|
3287
3293
|
ref: t,
|
|
3288
|
-
onPointerDown:
|
|
3294
|
+
onPointerDown: rc(h.onPointerDown, () => {
|
|
3289
3295
|
s || (x.current = y);
|
|
3290
3296
|
}),
|
|
3291
3297
|
min: r,
|
|
@@ -3314,7 +3320,7 @@ var [ju, Mu] = Eu(Su, {
|
|
|
3314
3320
|
size: "width",
|
|
3315
3321
|
direction: 1
|
|
3316
3322
|
}), Nu = U.forwardRef((e, t) => {
|
|
3317
|
-
let { min: n, max: r, dir: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: c, onStepKeyDown: l, ...u } = e, [d, f] = U.useState(null), p =
|
|
3323
|
+
let { min: n, max: r, dir: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: c, onStepKeyDown: l, ...u } = e, [d, f] = U.useState(null), p = nc(t, (e) => f(e)), m = U.useRef(void 0), h = lc(i), g = h === "ltr", _ = g && !a || !g && a;
|
|
3318
3324
|
function v(e) {
|
|
3319
3325
|
let t = m.current || d.getBoundingClientRect(), i = Qu([0, t.width], _ ? [n, r] : [r, n]);
|
|
3320
3326
|
return m.current = t, i(e - t.left);
|
|
@@ -3355,7 +3361,7 @@ var [ju, Mu] = Eu(Su, {
|
|
|
3355
3361
|
})
|
|
3356
3362
|
});
|
|
3357
3363
|
}), Pu = U.forwardRef((e, t) => {
|
|
3358
|
-
let { min: n, max: r, inverted: i, onSlideStart: a, onSlideMove: o, onSlideEnd: s, onStepKeyDown: c, ...l } = e, u = U.useRef(null), d =
|
|
3364
|
+
let { min: n, max: r, inverted: i, onSlideStart: a, onSlideMove: o, onSlideEnd: s, onStepKeyDown: c, ...l } = e, u = U.useRef(null), d = nc(t, u), f = U.useRef(void 0), p = !i;
|
|
3359
3365
|
function m(e) {
|
|
3360
3366
|
let t = f.current || u.current.getBoundingClientRect(), i = Qu([0, t.height], p ? [r, n] : [n, r]);
|
|
3361
3367
|
return f.current = t, i(e - t.top);
|
|
@@ -3396,27 +3402,27 @@ var [ju, Mu] = Eu(Su, {
|
|
|
3396
3402
|
});
|
|
3397
3403
|
}), Fu = U.forwardRef((e, t) => {
|
|
3398
3404
|
let { __scopeSlider: n, onSlideStart: r, onSlideMove: i, onSlideEnd: a, onHomeKeyDown: o, onEndKeyDown: s, onStepKeyDown: c, ...l } = e, u = ku(Su, n);
|
|
3399
|
-
return /* @__PURE__ */ X(
|
|
3405
|
+
return /* @__PURE__ */ X(sc.span, {
|
|
3400
3406
|
...l,
|
|
3401
3407
|
ref: t,
|
|
3402
|
-
onKeyDown:
|
|
3408
|
+
onKeyDown: rc(e.onKeyDown, (e) => {
|
|
3403
3409
|
e.key === "Home" ? (o(e), e.preventDefault()) : e.key === "End" ? (s(e), e.preventDefault()) : yu.concat(bu).includes(e.key) && (c(e), e.preventDefault());
|
|
3404
3410
|
}),
|
|
3405
|
-
onPointerDown:
|
|
3411
|
+
onPointerDown: rc(e.onPointerDown, (e) => {
|
|
3406
3412
|
let t = e.target;
|
|
3407
3413
|
t.setPointerCapture(e.pointerId), e.preventDefault(), u.thumbs.has(t) ? t.focus() : r(e);
|
|
3408
3414
|
}),
|
|
3409
|
-
onPointerMove:
|
|
3415
|
+
onPointerMove: rc(e.onPointerMove, (e) => {
|
|
3410
3416
|
e.target.hasPointerCapture(e.pointerId) && i(e);
|
|
3411
3417
|
}),
|
|
3412
|
-
onPointerUp:
|
|
3418
|
+
onPointerUp: rc(e.onPointerUp, (e) => {
|
|
3413
3419
|
let t = e.target;
|
|
3414
3420
|
t.hasPointerCapture(e.pointerId) && (t.releasePointerCapture(e.pointerId), a(e));
|
|
3415
3421
|
})
|
|
3416
3422
|
});
|
|
3417
3423
|
}), Iu = "SliderTrack", Lu = U.forwardRef((e, t) => {
|
|
3418
3424
|
let { __scopeSlider: n, ...r } = e, i = ku(Iu, n);
|
|
3419
|
-
return /* @__PURE__ */ X(
|
|
3425
|
+
return /* @__PURE__ */ X(sc.span, {
|
|
3420
3426
|
"data-disabled": i.disabled ? "" : void 0,
|
|
3421
3427
|
"data-orientation": i.orientation,
|
|
3422
3428
|
...r,
|
|
@@ -3425,8 +3431,8 @@ var [ju, Mu] = Eu(Su, {
|
|
|
3425
3431
|
});
|
|
3426
3432
|
Lu.displayName = Iu;
|
|
3427
3433
|
var Ru = "SliderRange", zu = U.forwardRef((e, t) => {
|
|
3428
|
-
let { __scopeSlider: n, ...r } = e, i = ku(Ru, n), a = Mu(Ru, n), o = U.useRef(null), s =
|
|
3429
|
-
return /* @__PURE__ */ X(
|
|
3434
|
+
let { __scopeSlider: n, ...r } = e, i = ku(Ru, n), a = Mu(Ru, n), o = U.useRef(null), s = nc(t, o), c = i.values.length, l = i.values.map((e) => Ku(e, i.min, i.max)), u = c > 1 ? Math.min(...l) : 0, d = 100 - Math.max(...l);
|
|
3435
|
+
return /* @__PURE__ */ X(sc.span, {
|
|
3430
3436
|
"data-orientation": i.orientation,
|
|
3431
3437
|
"data-disabled": i.disabled ? "" : void 0,
|
|
3432
3438
|
...r,
|
|
@@ -3440,14 +3446,14 @@ var Ru = "SliderRange", zu = U.forwardRef((e, t) => {
|
|
|
3440
3446
|
});
|
|
3441
3447
|
zu.displayName = Ru;
|
|
3442
3448
|
var Bu = "SliderThumb", Vu = U.forwardRef((e, t) => {
|
|
3443
|
-
let n = wu(e.__scopeSlider), [r, i] = U.useState(null), a =
|
|
3449
|
+
let n = wu(e.__scopeSlider), [r, i] = U.useState(null), a = nc(t, (e) => i(e)), o = U.useMemo(() => r ? n().findIndex((e) => e.ref.current === r) : -1, [n, r]);
|
|
3444
3450
|
return /* @__PURE__ */ X(Hu, {
|
|
3445
3451
|
...e,
|
|
3446
3452
|
ref: a,
|
|
3447
3453
|
index: o
|
|
3448
3454
|
});
|
|
3449
3455
|
}), Hu = U.forwardRef((e, t) => {
|
|
3450
|
-
let { __scopeSlider: n, index: r, name: i, ...a } = e, o = ku(Bu, n), s = Mu(Bu, n), [c, l] = U.useState(null), u =
|
|
3456
|
+
let { __scopeSlider: n, index: r, name: i, ...a } = e, o = ku(Bu, n), s = Mu(Bu, n), [c, l] = U.useState(null), u = nc(t, (e) => l(e)), d = !c || o.form || !!c.closest("form"), f = dc(c), p = o.values[r], m = p === void 0 ? 0 : Ku(p, o.min, o.max), h = qu(r, o.values.length), g = f?.[s.size], _ = g ? Yu(g, m, s.direction) : 0;
|
|
3451
3457
|
return U.useEffect(() => {
|
|
3452
3458
|
if (c) return o.thumbs.add(c), () => {
|
|
3453
3459
|
o.thumbs.delete(c);
|
|
@@ -3460,7 +3466,7 @@ var Bu = "SliderThumb", Vu = U.forwardRef((e, t) => {
|
|
|
3460
3466
|
},
|
|
3461
3467
|
children: [/* @__PURE__ */ X(Cu.ItemSlot, {
|
|
3462
3468
|
scope: e.__scopeSlider,
|
|
3463
|
-
children: /* @__PURE__ */ X(
|
|
3469
|
+
children: /* @__PURE__ */ X(sc.span, {
|
|
3464
3470
|
role: "slider",
|
|
3465
3471
|
"aria-label": e["aria-label"] || h,
|
|
3466
3472
|
"aria-valuemin": o.min,
|
|
@@ -3473,7 +3479,7 @@ var Bu = "SliderThumb", Vu = U.forwardRef((e, t) => {
|
|
|
3473
3479
|
...a,
|
|
3474
3480
|
ref: u,
|
|
3475
3481
|
style: p === void 0 ? { display: "none" } : e.style,
|
|
3476
|
-
onFocus:
|
|
3482
|
+
onFocus: rc(e.onFocus, () => {
|
|
3477
3483
|
o.valueIndexToChangeRef.current = r;
|
|
3478
3484
|
})
|
|
3479
3485
|
})
|
|
@@ -3486,7 +3492,7 @@ var Bu = "SliderThumb", Vu = U.forwardRef((e, t) => {
|
|
|
3486
3492
|
});
|
|
3487
3493
|
Vu.displayName = Bu;
|
|
3488
3494
|
var Uu = "RadioBubbleInput", Wu = U.forwardRef(({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
3489
|
-
let i = U.useRef(null), a =
|
|
3495
|
+
let i = U.useRef(null), a = nc(i, r), o = Ao(t);
|
|
3490
3496
|
return U.useEffect(() => {
|
|
3491
3497
|
let e = i.current;
|
|
3492
3498
|
if (!e) return;
|
|
@@ -3495,7 +3501,7 @@ var Uu = "RadioBubbleInput", Wu = U.forwardRef(({ __scopeSlider: e, value: t, ..
|
|
|
3495
3501
|
let n = new Event("input", { bubbles: !0 });
|
|
3496
3502
|
r.call(e, t), e.dispatchEvent(n);
|
|
3497
3503
|
}
|
|
3498
|
-
}, [o, t]), /* @__PURE__ */ X(
|
|
3504
|
+
}, [o, t]), /* @__PURE__ */ X(sc.input, {
|
|
3499
3505
|
style: { display: "none" },
|
|
3500
3506
|
...n,
|
|
3501
3507
|
ref: a,
|
|
@@ -3509,7 +3515,7 @@ function Gu(e = [], t, n) {
|
|
|
3509
3515
|
}
|
|
3510
3516
|
function Ku(e, t, n) {
|
|
3511
3517
|
let r = 100 / (n - t) * (e - t);
|
|
3512
|
-
return
|
|
3518
|
+
return Oo(r, [0, 100]);
|
|
3513
3519
|
}
|
|
3514
3520
|
function qu(e, t) {
|
|
3515
3521
|
if (t > 2) return `Value ${e + 1} of ${t}`;
|
|
@@ -3549,7 +3555,7 @@ function ed(e, t) {
|
|
|
3549
3555
|
return Math.round(e * n) / n;
|
|
3550
3556
|
}
|
|
3551
3557
|
var td = Au, nd = Lu, rd = zu, id = Vu, ad = td, od = nd, sd = rd, cd = id, ld = ({ currentTime: e, duration: t, buffered: n = 0, disabled: r, onSeek: i }) => {
|
|
3552
|
-
let a =
|
|
3558
|
+
let a = z(), [o, s] = J(null), c = q(!1), l = t > 0 ? t : 0, u = o ?? e, d = l > 0 ? Math.min(Math.max(u, 0), l) / l * 100 : 0, f = l > 0 ? Math.min(n / l * 100, 100) : 0, p = r || l === 0, m = q(null), [h, g] = J(0);
|
|
3553
3559
|
G(() => {
|
|
3554
3560
|
let e = m.current;
|
|
3555
3561
|
if (!e) return;
|
|
@@ -3582,7 +3588,7 @@ var td = Au, nd = Lu, rd = zu, id = Vu, ad = td, od = nd, sd = rd, cd = id, ld =
|
|
|
3582
3588
|
max: l || 1,
|
|
3583
3589
|
step: 1,
|
|
3584
3590
|
disabled: p,
|
|
3585
|
-
className:
|
|
3591
|
+
className: B("group relative flex w-full touch-none select-none items-center py-2", r && "opacity-50"),
|
|
3586
3592
|
children: [
|
|
3587
3593
|
/* @__PURE__ */ Z(od, {
|
|
3588
3594
|
ref: m,
|
|
@@ -3600,7 +3606,7 @@ var td = Au, nd = Lu, rd = zu, id = Vu, ad = td, od = nd, sd = rd, cd = id, ld =
|
|
|
3600
3606
|
p ? null : /* @__PURE__ */ X("span", {
|
|
3601
3607
|
"aria-hidden": !0,
|
|
3602
3608
|
style: { left: _ },
|
|
3603
|
-
className:
|
|
3609
|
+
className: B("pointer-events-none absolute top-1/2 size-3 -translate-x-1/2 -translate-y-1/2 rounded-full bg-f1-background-selected-bold opacity-0 transition-opacity", "group-hover:opacity-100 group-has-[:focus-visible]:opacity-100", "group-has-[:focus-visible]:ring-1 group-has-[:focus-visible]:ring-f1-special-ring group-has-[:focus-visible]:ring-offset-1")
|
|
3604
3610
|
}),
|
|
3605
3611
|
/* @__PURE__ */ X(cd, {
|
|
3606
3612
|
"aria-label": a.audioPlayer.seek,
|
|
@@ -3617,22 +3623,22 @@ var td = Au, nd = Lu, rd = zu, id = Vu, ad = td, od = nd, sd = rd, cd = id, ld =
|
|
|
3617
3623
|
//#region src/blocks/F0AudioPlayer/components/LanguageSelect.tsx
|
|
3618
3624
|
function ud({ value: e, options: t, onChange: n, kind: r }) {
|
|
3619
3625
|
let [i, a] = J(!1), o = t.find((t) => t.locale === e), s = o ? mc(o) : e;
|
|
3620
|
-
return /* @__PURE__ */ Z(
|
|
3626
|
+
return /* @__PURE__ */ Z(uc, {
|
|
3621
3627
|
open: i,
|
|
3622
3628
|
onOpenChange: a,
|
|
3623
|
-
children: [/* @__PURE__ */ X(
|
|
3629
|
+
children: [/* @__PURE__ */ X($s, {
|
|
3624
3630
|
asChild: !0,
|
|
3625
|
-
children: /* @__PURE__ */ X(
|
|
3631
|
+
children: /* @__PURE__ */ X(V, {
|
|
3626
3632
|
variant: "outline",
|
|
3627
3633
|
size: "sm",
|
|
3628
3634
|
label: s,
|
|
3629
3635
|
"aria-label": `${r}: ${s}`,
|
|
3630
3636
|
tooltip: r
|
|
3631
3637
|
})
|
|
3632
|
-
}), /* @__PURE__ */ X(
|
|
3638
|
+
}), /* @__PURE__ */ X(ic, {
|
|
3633
3639
|
align: "end",
|
|
3634
3640
|
sideOffset: 4,
|
|
3635
|
-
className:
|
|
3641
|
+
className: B("flex w-auto min-w-[8rem] flex-col gap-0.5 rounded-md border", "border-solid border-f1-border-secondary bg-f1-background p-1 shadow-md"),
|
|
3636
3642
|
role: "menu",
|
|
3637
3643
|
"aria-label": r,
|
|
3638
3644
|
onKeyDown: (e) => {
|
|
@@ -3662,13 +3668,13 @@ function ud({ value: e, options: t, onChange: n, kind: r }) {
|
|
|
3662
3668
|
type: "button",
|
|
3663
3669
|
role: "menuitemradio",
|
|
3664
3670
|
"aria-checked": r,
|
|
3665
|
-
className:
|
|
3671
|
+
className: B("relative flex items-center rounded-xs py-1.5 pl-8 pr-3", "cursor-pointer border-none bg-transparent text-left text-sm font-medium", "text-f1-foreground transition-colors hover:bg-f1-background-secondary", "focus-visible:bg-f1-background-secondary focus-visible:outline-none", "[&_svg]:h-3.5 [&_svg]:w-3.5"),
|
|
3666
3672
|
onClick: () => {
|
|
3667
3673
|
n(t.locale), a(!1);
|
|
3668
3674
|
},
|
|
3669
3675
|
children: [r ? /* @__PURE__ */ X("span", {
|
|
3670
3676
|
className: "absolute left-2.5 inline-flex items-center",
|
|
3671
|
-
children: /* @__PURE__ */ X(
|
|
3677
|
+
children: /* @__PURE__ */ X(Hs, {})
|
|
3672
3678
|
}) : null, mc(t)]
|
|
3673
3679
|
}, t.locale);
|
|
3674
3680
|
})
|
|
@@ -3677,7 +3683,7 @@ function ud({ value: e, options: t, onChange: n, kind: r }) {
|
|
|
3677
3683
|
}
|
|
3678
3684
|
//#endregion
|
|
3679
3685
|
//#region src/blocks/F0AudioPlayer/components/PlaybackTime.tsx
|
|
3680
|
-
var dd =
|
|
3686
|
+
var dd = Ya({
|
|
3681
3687
|
base: "shrink-0 font-medium tabular-nums text-f1-foreground-secondary",
|
|
3682
3688
|
variants: { size: {
|
|
3683
3689
|
sm: "text-xs",
|
|
@@ -3691,81 +3697,81 @@ var dd = Bn({
|
|
|
3691
3697
|
du(t)
|
|
3692
3698
|
]
|
|
3693
3699
|
}), pd = ({ isPlaying: e, disabled: t, size: n = "md", onToggle: r }) => {
|
|
3694
|
-
let i =
|
|
3700
|
+
let i = z(), a = e ? $i : la;
|
|
3695
3701
|
return /* @__PURE__ */ X("button", {
|
|
3696
3702
|
type: "button",
|
|
3697
3703
|
"aria-label": e ? i.audioPlayer.pause : i.audioPlayer.play,
|
|
3698
3704
|
disabled: t,
|
|
3699
3705
|
onClick: r,
|
|
3700
|
-
className:
|
|
3706
|
+
className: B("flex shrink-0 items-center justify-center rounded-xl border border-solid border-f1-border-secondary bg-f1-background-inverse-secondary text-f1-foreground-secondary transition-colors dark:bg-f1-background-tertiary", "hover:bg-f1-background-secondary disabled:cursor-not-allowed disabled:opacity-50", n === "sm" ? "size-8" : "size-10", On()),
|
|
3701
3707
|
children: /* @__PURE__ */ X(a, { className: n === "sm" ? "size-5" : "size-6" })
|
|
3702
3708
|
});
|
|
3703
3709
|
}, md = ({ playbackRate: e, playbackRates: t, onRateChange: n, disabled: r, extraItems: i = [], audioLanguages: a = [], audioLanguage: o, onAudioLanguageChange: s }) => {
|
|
3704
|
-
let c =
|
|
3705
|
-
return /* @__PURE__ */ Z(
|
|
3710
|
+
let c = z(), l = t.length > 0, u = a.length > 1;
|
|
3711
|
+
return /* @__PURE__ */ Z(oc, { children: [/* @__PURE__ */ X(qs, {
|
|
3706
3712
|
asChild: !0,
|
|
3707
|
-
children: /* @__PURE__ */ X(
|
|
3713
|
+
children: /* @__PURE__ */ X(V, {
|
|
3708
3714
|
variant: "ghost",
|
|
3709
3715
|
size: "sm",
|
|
3710
|
-
icon:
|
|
3716
|
+
icon: ma,
|
|
3711
3717
|
label: c.audioPlayer.options,
|
|
3712
3718
|
hideLabel: !0,
|
|
3713
3719
|
disabled: r
|
|
3714
3720
|
})
|
|
3715
|
-
}), /* @__PURE__ */ Z(
|
|
3721
|
+
}), /* @__PURE__ */ Z(Gs, {
|
|
3716
3722
|
align: "end",
|
|
3717
3723
|
className: "flex min-w-44 flex-col gap-0.5",
|
|
3718
3724
|
children: [
|
|
3719
|
-
l ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
3725
|
+
l ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Xs, {
|
|
3720
3726
|
className: "text-f1-foreground-secondary",
|
|
3721
3727
|
children: c.audioPlayer.playbackSpeed
|
|
3722
3728
|
}), t.map((t) => {
|
|
3723
3729
|
let r = t === e;
|
|
3724
|
-
return /* @__PURE__ */ Z(
|
|
3730
|
+
return /* @__PURE__ */ Z(Ys, {
|
|
3725
3731
|
onSelect: () => n(t),
|
|
3726
|
-
className:
|
|
3732
|
+
className: B("justify-between gap-3 px-3 text-sm text-f1-foreground", r && "before:absolute before:inset-x-1 before:inset-y-0 before:rounded before:bg-f1-background-selected-bold/10 before:content-[''] dark:before:bg-f1-background-selected-bold/20"),
|
|
3727
3733
|
children: [/* @__PURE__ */ Z("span", {
|
|
3728
3734
|
className: "relative",
|
|
3729
3735
|
children: [t, "x"]
|
|
3730
3736
|
}), r ? /* @__PURE__ */ X("span", {
|
|
3731
3737
|
className: "relative flex text-f1-icon-selected",
|
|
3732
|
-
children: /* @__PURE__ */ X(
|
|
3733
|
-
icon:
|
|
3738
|
+
children: /* @__PURE__ */ X(H, {
|
|
3739
|
+
icon: Do,
|
|
3734
3740
|
size: "md"
|
|
3735
3741
|
})
|
|
3736
3742
|
}) : null]
|
|
3737
3743
|
}, t);
|
|
3738
3744
|
})] }) : null,
|
|
3739
3745
|
u ? /* @__PURE__ */ Z(Y, { children: [
|
|
3740
|
-
l ? /* @__PURE__ */ X(
|
|
3741
|
-
/* @__PURE__ */ X(
|
|
3746
|
+
l ? /* @__PURE__ */ X(Js, {}) : null,
|
|
3747
|
+
/* @__PURE__ */ X(Xs, {
|
|
3742
3748
|
className: "text-f1-foreground-secondary",
|
|
3743
3749
|
children: c.audioPlayer.audio
|
|
3744
3750
|
}),
|
|
3745
3751
|
a.map((e) => {
|
|
3746
3752
|
let t = e.locale === o;
|
|
3747
|
-
return /* @__PURE__ */ Z(
|
|
3753
|
+
return /* @__PURE__ */ Z(Ys, {
|
|
3748
3754
|
onSelect: () => s?.(e.locale),
|
|
3749
|
-
className:
|
|
3755
|
+
className: B("justify-between gap-3 px-3 text-sm text-f1-foreground", t && "before:absolute before:inset-x-1 before:inset-y-0 before:rounded before:bg-f1-background-selected-bold/10 before:content-[''] dark:before:bg-f1-background-selected-bold/20"),
|
|
3750
3756
|
children: [/* @__PURE__ */ X("span", {
|
|
3751
3757
|
className: "relative",
|
|
3752
3758
|
children: mc(e)
|
|
3753
3759
|
}), t ? /* @__PURE__ */ X("span", {
|
|
3754
3760
|
className: "relative flex text-f1-icon-selected",
|
|
3755
|
-
children: /* @__PURE__ */ X(
|
|
3756
|
-
icon:
|
|
3761
|
+
children: /* @__PURE__ */ X(H, {
|
|
3762
|
+
icon: Do,
|
|
3757
3763
|
size: "md"
|
|
3758
3764
|
})
|
|
3759
3765
|
}) : null]
|
|
3760
3766
|
}, e.locale);
|
|
3761
3767
|
})
|
|
3762
3768
|
] }) : null,
|
|
3763
|
-
i.length > 0 ? /* @__PURE__ */ Z(Y, { children: [l || u ? /* @__PURE__ */ X(
|
|
3769
|
+
i.length > 0 ? /* @__PURE__ */ Z(Y, { children: [l || u ? /* @__PURE__ */ X(Js, {}) : null, i.map((e) => /* @__PURE__ */ Z(Ys, {
|
|
3764
3770
|
onSelect: () => e.onClick(),
|
|
3765
|
-
className:
|
|
3771
|
+
className: B("gap-2 px-3 text-sm", e.critical ? "text-f1-foreground-critical" : "text-f1-foreground"),
|
|
3766
3772
|
children: [e.icon ? /* @__PURE__ */ X("span", {
|
|
3767
|
-
className:
|
|
3768
|
-
children: /* @__PURE__ */ X(
|
|
3773
|
+
className: B("relative flex", e.critical ? "text-f1-icon-critical" : "text-f1-icon"),
|
|
3774
|
+
children: /* @__PURE__ */ X(H, {
|
|
3769
3775
|
icon: e.icon,
|
|
3770
3776
|
size: "md"
|
|
3771
3777
|
})
|
|
@@ -3776,8 +3782,8 @@ var dd = Bn({
|
|
|
3776
3782
|
}, e.label))] }) : null
|
|
3777
3783
|
]
|
|
3778
3784
|
})] });
|
|
3779
|
-
}, hd = (e) =>
|
|
3780
|
-
let a =
|
|
3785
|
+
}, hd = (e) => B("block w-full rounded px-2 py-1 text-left transition-colors", e ? "bg-f1-background-selected-secondary font-medium" : "bg-transparent"), gd = Dc(function({ cue: e, index: t, isActive: n, onSeek: r, cueRefs: i }) {
|
|
3786
|
+
let a = z(), { startTime: o } = e, s = r && o !== void 0, c = W((e) => {
|
|
3781
3787
|
i?.current && (i.current[t] = e);
|
|
3782
3788
|
}, [i, t]), l = W(() => {
|
|
3783
3789
|
o !== void 0 && r?.(o);
|
|
@@ -3789,15 +3795,15 @@ var dd = Bn({
|
|
|
3789
3795
|
onClick: l,
|
|
3790
3796
|
"aria-current": n || void 0,
|
|
3791
3797
|
title: a.t("audioPlayer.jumpTo", { time: du(o) }),
|
|
3792
|
-
className:
|
|
3793
|
-
children: /* @__PURE__ */ X(
|
|
3798
|
+
className: B(hd(n), On(), !n && "hover:bg-f1-background-secondary"),
|
|
3799
|
+
children: /* @__PURE__ */ X(sr, {
|
|
3794
3800
|
as: "span",
|
|
3795
3801
|
variant: "body",
|
|
3796
3802
|
content: e.text
|
|
3797
3803
|
})
|
|
3798
3804
|
}) : /* @__PURE__ */ X("div", {
|
|
3799
3805
|
className: hd(n),
|
|
3800
|
-
children: /* @__PURE__ */ X(
|
|
3806
|
+
children: /* @__PURE__ */ X(sr, {
|
|
3801
3807
|
as: "span",
|
|
3802
3808
|
variant: "body",
|
|
3803
3809
|
content: e.text
|
|
@@ -3805,7 +3811,7 @@ var dd = Bn({
|
|
|
3805
3811
|
})
|
|
3806
3812
|
});
|
|
3807
3813
|
}), _d = Dc(function({ cues: e, activeIndex: t, onSeek: n, cueRefs: r }) {
|
|
3808
|
-
let i =
|
|
3814
|
+
let i = z();
|
|
3809
3815
|
return /* @__PURE__ */ Z(Y, { children: [n ? /* @__PURE__ */ X("p", {
|
|
3810
3816
|
className: "sr-only",
|
|
3811
3817
|
children: i.audioPlayer.transcriptHint
|
|
@@ -3935,10 +3941,10 @@ var bd = (e) => {
|
|
|
3935
3941
|
"End",
|
|
3936
3942
|
" "
|
|
3937
3943
|
]), Sd = Tc((e, t) => {
|
|
3938
|
-
let { title: n, subtitle: r, actions: i, className: a, src: o, preload: s, autoPlay: c = !1, disabled: l = !1, ariaLabel: u, size: d = "md", content: f, defaultLanguage: p, details: m, expanded: h, defaultExpanded: g = !1, onExpandedChange: _, detailsMaxHeight: v = 200 } = e, y =
|
|
3944
|
+
let { title: n, subtitle: r, actions: i, className: a, src: o, preload: s, autoPlay: c = !1, disabled: l = !1, ariaLabel: u, size: d = "md", content: f, defaultLanguage: p, details: m, expanded: h, defaultExpanded: g = !1, onExpandedChange: _, detailsMaxHeight: v = 200 } = e, y = z(), b = vd(o, p), x = bd({
|
|
3939
3945
|
...e,
|
|
3940
3946
|
src: b.resolvedSrc
|
|
3941
|
-
}), S = uu(e), C =
|
|
3947
|
+
}), S = uu(e), C = Zn(), w = (e) => {
|
|
3942
3948
|
yd(x.audioRef.current), b.setLocale(e);
|
|
3943
3949
|
}, T = !f && !!(m && m.length > 0), E = K(() => hc(f?.summary, f?.transcription), [f?.summary, f?.transcription]), [D, O] = J(() => gc(E, p)), k = E.some((e) => e.locale === D) ? D : gc(E, p), A = pc(f?.summary, k), j = pc(f?.transcription, k), M = vu(x.audioRef, x.currentSrc, !j), N = j ?? M, P = Array.isArray(N) ? N : void 0, F = typeof N == "string" ? N : void 0, I = !!(F || P?.length), ee = K(() => P ? fu(P) : [], [P]), te = ee.length > 0, ne = x.pendingTime ?? x.currentTime, re = K(() => te ? pu(ee, ne) : -1, [
|
|
3944
3950
|
te,
|
|
@@ -3996,7 +4002,7 @@ var bd = (e) => {
|
|
|
3996
4002
|
se,
|
|
3997
4003
|
y.audioPlayer.summary,
|
|
3998
4004
|
y.audioPlayer.transcription
|
|
3999
|
-
]), ce = I ? "available" : "missing", le = L.length > 0, ue = L.length === 1 ? L[0] : void 0, de = (e) => ue?.value === "transcription" ? e ? y.audioPlayer.hideTranscription : y.audioPlayer.viewTranscription : ue?.value === "summary" ? e ? y.audioPlayer.hideSummary : y.audioPlayer.viewSummary : e ? y.audioPlayer.hideDetail : y.audioPlayer.viewDetail, [fe = !1, pe] =
|
|
4005
|
+
]), ce = I ? "available" : "missing", le = L.length > 0, ue = L.length === 1 ? L[0] : void 0, de = (e) => ue?.value === "transcription" ? e ? y.audioPlayer.hideTranscription : y.audioPlayer.viewTranscription : ue?.value === "summary" ? e ? y.audioPlayer.hideSummary : y.audioPlayer.viewSummary : e ? y.audioPlayer.hideDetail : y.audioPlayer.viewDetail, [fe = !1, pe] = tc({
|
|
4000
4006
|
prop: h,
|
|
4001
4007
|
defaultProp: g,
|
|
4002
4008
|
onChange: _
|
|
@@ -4021,7 +4027,7 @@ var bd = (e) => {
|
|
|
4021
4027
|
role: "group",
|
|
4022
4028
|
"aria-label": u ?? n,
|
|
4023
4029
|
"data-audio-transcription": ce,
|
|
4024
|
-
className:
|
|
4030
|
+
className: B("flex flex-col gap-2.5 rounded-2xl border border-solid border-f1-border-secondary bg-f1-background p-3", a),
|
|
4025
4031
|
...S,
|
|
4026
4032
|
children: [
|
|
4027
4033
|
/* @__PURE__ */ X("audio", {
|
|
@@ -4051,7 +4057,7 @@ var bd = (e) => {
|
|
|
4051
4057
|
})]
|
|
4052
4058
|
}), le || x.playbackRates.length > 0 || b.languages.length > 1 || i ? /* @__PURE__ */ Z("div", {
|
|
4053
4059
|
className: "flex shrink-0 items-center gap-2",
|
|
4054
|
-
children: [le ? /* @__PURE__ */ X(
|
|
4060
|
+
children: [le ? /* @__PURE__ */ X(V, {
|
|
4055
4061
|
variant: "outline",
|
|
4056
4062
|
size: "sm",
|
|
4057
4063
|
label: de(fe),
|
|
@@ -4083,7 +4089,7 @@ var bd = (e) => {
|
|
|
4083
4089
|
size: d
|
|
4084
4090
|
})]
|
|
4085
4091
|
}),
|
|
4086
|
-
le ? /* @__PURE__ */ Z(
|
|
4092
|
+
le ? /* @__PURE__ */ Z(Jn.div, {
|
|
4087
4093
|
role: "region",
|
|
4088
4094
|
"aria-label": ue ? ue.label : y.audioPlayer.details,
|
|
4089
4095
|
initial: !1,
|
|
@@ -4125,7 +4131,7 @@ var bd = (e) => {
|
|
|
4125
4131
|
}),
|
|
4126
4132
|
/* @__PURE__ */ X("div", {
|
|
4127
4133
|
className: ue ? void 0 : "pt-2.5",
|
|
4128
|
-
children: /* @__PURE__ */ X(
|
|
4134
|
+
children: /* @__PURE__ */ X(uo, {
|
|
4129
4135
|
viewportRef: ie,
|
|
4130
4136
|
style: { "--audio-details-max-h": `${v}px` },
|
|
4131
4137
|
className: "[&_[data-scroll-container]]:max-h-[var(--audio-details-max-h)]",
|
|
@@ -4143,14 +4149,14 @@ var bd = (e) => {
|
|
|
4143
4149
|
Sd.displayName = "F0AudioPlayerCard";
|
|
4144
4150
|
//#endregion
|
|
4145
4151
|
//#region src/blocks/F0AudioPlayer/F0AudioPlayer.tsx
|
|
4146
|
-
var Cd =
|
|
4152
|
+
var Cd = Ya({
|
|
4147
4153
|
base: "flex w-full items-center",
|
|
4148
4154
|
variants: { size: {
|
|
4149
4155
|
sm: "gap-2",
|
|
4150
4156
|
md: "gap-3"
|
|
4151
4157
|
} }
|
|
4152
4158
|
}), wd = Tc((e, t) => {
|
|
4153
|
-
let { src: n, preload: r, autoPlay: i = !1, disabled: a = !1, ariaLabel: o, size: s = "md", defaultLanguage: c, className: l } = e, u =
|
|
4159
|
+
let { src: n, preload: r, autoPlay: i = !1, disabled: a = !1, ariaLabel: o, size: s = "md", defaultLanguage: c, className: l } = e, u = z(), d = vd(n, c), f = bd({
|
|
4154
4160
|
...e,
|
|
4155
4161
|
src: d.resolvedSrc
|
|
4156
4162
|
}), p = uu(e), m = (e) => {
|
|
@@ -4160,7 +4166,7 @@ var Cd = Bn({
|
|
|
4160
4166
|
ref: t,
|
|
4161
4167
|
role: "group",
|
|
4162
4168
|
"aria-label": o ?? u.audioPlayer.label,
|
|
4163
|
-
className:
|
|
4169
|
+
className: B(Cd({ size: s }), l),
|
|
4164
4170
|
...p,
|
|
4165
4171
|
children: [
|
|
4166
4172
|
/* @__PURE__ */ X("audio", {
|
|
@@ -4197,7 +4203,7 @@ var Cd = Bn({
|
|
|
4197
4203
|
});
|
|
4198
4204
|
});
|
|
4199
4205
|
wd.displayName = "F0AudioPlayer";
|
|
4200
|
-
var Td =
|
|
4206
|
+
var Td = _n("F0AudioPlayer", R(wd)), Ed = _n("F0AudioPlayerCard", R(Sd)), Dd = Qn, Od = ({ actions: e }) => /* @__PURE__ */ X("div", {
|
|
4201
4207
|
className: "flex items-center gap-2",
|
|
4202
4208
|
children: e.map((e, t) => {
|
|
4203
4209
|
switch (e.type) {
|
|
@@ -4208,13 +4214,13 @@ var Td = tr("F0AudioPlayer", R(wd)), Ed = tr("F0AudioPlayerCard", R(Sd)), Dd = y
|
|
|
4208
4214
|
disabled: e.disabled,
|
|
4209
4215
|
ariaLabel: e.ariaLabel
|
|
4210
4216
|
}, t);
|
|
4211
|
-
case "dropdown": return /* @__PURE__ */ X(
|
|
4217
|
+
case "dropdown": return /* @__PURE__ */ X(Pi, {
|
|
4212
4218
|
items: e.items,
|
|
4213
4219
|
disabled: e.disabled,
|
|
4214
|
-
children: /* @__PURE__ */ X(
|
|
4220
|
+
children: /* @__PURE__ */ X(V, {
|
|
4215
4221
|
variant: "outline",
|
|
4216
4222
|
size: "sm",
|
|
4217
|
-
icon:
|
|
4223
|
+
icon: ma,
|
|
4218
4224
|
label: e.ariaLabel,
|
|
4219
4225
|
hideLabel: !0,
|
|
4220
4226
|
disabled: e.disabled
|
|
@@ -4223,8 +4229,8 @@ var Td = tr("F0AudioPlayer", R(wd)), Ed = tr("F0AudioPlayerCard", R(Sd)), Dd = y
|
|
|
4223
4229
|
}
|
|
4224
4230
|
})
|
|
4225
4231
|
}), kd = ({ item: e, open: t, onOpenChange: n }) => {
|
|
4226
|
-
let r =
|
|
4227
|
-
return /* @__PURE__ */ X(
|
|
4232
|
+
let r = Zn(), i = z().t(t ? "actions.collapseItem" : "actions.expandItem", { title: e.title }), a = !!e.actions && e.actions.length > 0;
|
|
4233
|
+
return /* @__PURE__ */ X(wa, {
|
|
4228
4234
|
open: t,
|
|
4229
4235
|
onOpenChange: n,
|
|
4230
4236
|
asChild: !0,
|
|
@@ -4232,11 +4238,11 @@ var Td = tr("F0AudioPlayer", R(wd)), Ed = tr("F0AudioPlayerCard", R(Sd)), Dd = y
|
|
|
4232
4238
|
className: "flex flex-col",
|
|
4233
4239
|
children: [/* @__PURE__ */ Z("div", {
|
|
4234
4240
|
className: "flex items-center",
|
|
4235
|
-
children: [/* @__PURE__ */ X(
|
|
4241
|
+
children: [/* @__PURE__ */ X(Yi, {
|
|
4236
4242
|
asChild: !0,
|
|
4237
4243
|
children: /* @__PURE__ */ X("button", {
|
|
4238
4244
|
type: "button",
|
|
4239
|
-
className:
|
|
4245
|
+
className: B("flex flex-1 min-w-0 items-center py-3 pl-4 pr-2 text-left", On()),
|
|
4240
4246
|
children: /* @__PURE__ */ X("span", {
|
|
4241
4247
|
className: "flex-1 truncate font-medium text-f1-foreground",
|
|
4242
4248
|
children: e.title
|
|
@@ -4250,21 +4256,21 @@ var Td = tr("F0AudioPlayer", R(wd)), Ed = tr("F0AudioPlayerCard", R(Sd)), Dd = y
|
|
|
4250
4256
|
children: e.summary
|
|
4251
4257
|
}) : null,
|
|
4252
4258
|
a ? /* @__PURE__ */ X(Od, { actions: e.actions }) : null,
|
|
4253
|
-
/* @__PURE__ */ X(
|
|
4259
|
+
/* @__PURE__ */ X(Yi, {
|
|
4254
4260
|
asChild: !0,
|
|
4255
|
-
children: /* @__PURE__ */ X(
|
|
4261
|
+
children: /* @__PURE__ */ X(V, {
|
|
4256
4262
|
variant: "outline",
|
|
4257
4263
|
size: "sm",
|
|
4258
|
-
icon: t ?
|
|
4264
|
+
icon: t ? Is : oo,
|
|
4259
4265
|
label: i,
|
|
4260
4266
|
hideLabel: !0
|
|
4261
4267
|
})
|
|
4262
4268
|
})
|
|
4263
4269
|
]
|
|
4264
4270
|
})]
|
|
4265
|
-
}), /* @__PURE__ */ X(
|
|
4271
|
+
}), /* @__PURE__ */ X(ir, {
|
|
4266
4272
|
initial: !1,
|
|
4267
|
-
children: t ? /* @__PURE__ */ X(
|
|
4273
|
+
children: t ? /* @__PURE__ */ X(Jn.div, {
|
|
4268
4274
|
initial: {
|
|
4269
4275
|
height: 0,
|
|
4270
4276
|
opacity: 0
|
|
@@ -4279,7 +4285,7 @@ var Td = tr("F0AudioPlayer", R(wd)), Ed = tr("F0AudioPlayerCard", R(Sd)), Dd = y
|
|
|
4279
4285
|
},
|
|
4280
4286
|
transition: { duration: r ? 0 : .2 },
|
|
4281
4287
|
className: "overflow-hidden",
|
|
4282
|
-
children: /* @__PURE__ */ X(
|
|
4288
|
+
children: /* @__PURE__ */ X(gi, {
|
|
4283
4289
|
forceMount: !0,
|
|
4284
4290
|
asChild: !0,
|
|
4285
4291
|
children: /* @__PURE__ */ Z("div", {
|
|
@@ -4297,13 +4303,13 @@ var Td = tr("F0AudioPlayer", R(wd)), Ed = tr("F0AudioPlayerCard", R(Sd)), Dd = y
|
|
|
4297
4303
|
}, Ad = ({ items: e = 4 }) => /* @__PURE__ */ X("div", {
|
|
4298
4304
|
"aria-busy": "true",
|
|
4299
4305
|
"aria-live": "polite",
|
|
4300
|
-
className:
|
|
4306
|
+
className: B("flex flex-col rounded-md border border-solid border-f1-border-secondary", "overflow-hidden bg-f1-background"),
|
|
4301
4307
|
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ Z(Cc, { children: [t > 0 ? /* @__PURE__ */ X("div", { className: "h-px w-full bg-f1-border-secondary" }) : null, /* @__PURE__ */ Z("div", {
|
|
4302
4308
|
className: "flex items-center gap-3 px-4 py-3",
|
|
4303
|
-
children: [/* @__PURE__ */ X(
|
|
4309
|
+
children: [/* @__PURE__ */ X(vn, { className: "h-4 flex-1 max-w-48" }), /* @__PURE__ */ X(vn, { className: "ml-auto h-7 w-7 shrink-0 rounded" })]
|
|
4304
4310
|
})] }, t))
|
|
4305
4311
|
}), jd = Tc((e, t) => {
|
|
4306
|
-
let { items: n, value: r, defaultValue: i, onValueChange: a, ...o } = e, s = K(() => i === void 0 ? n.filter((e) => e.defaultOpen).map((e) => e.id) : i, [i, n]), [c = [], l] =
|
|
4312
|
+
let { items: n, value: r, defaultValue: i, onValueChange: a, ...o } = e, s = K(() => i === void 0 ? n.filter((e) => e.defaultOpen).map((e) => e.id) : i, [i, n]), [c = [], l] = tc({
|
|
4307
4313
|
prop: r,
|
|
4308
4314
|
defaultProp: s,
|
|
4309
4315
|
onChange: a
|
|
@@ -4314,7 +4320,7 @@ var Td = tr("F0AudioPlayer", R(wd)), Ed = tr("F0AudioPlayerCard", R(Sd)), Dd = y
|
|
|
4314
4320
|
return /* @__PURE__ */ X("div", {
|
|
4315
4321
|
ref: t,
|
|
4316
4322
|
...o,
|
|
4317
|
-
className:
|
|
4323
|
+
className: B("flex flex-col rounded-md border border-solid border-f1-border-secondary", "overflow-hidden bg-f1-background"),
|
|
4318
4324
|
children: n.map((e, t) => /* @__PURE__ */ Z(Cc, { children: [t > 0 ? /* @__PURE__ */ X("div", { className: "h-px w-full bg-f1-border-secondary" }) : null, /* @__PURE__ */ X(kd, {
|
|
4319
4325
|
item: e,
|
|
4320
4326
|
open: c.includes(e.id),
|
|
@@ -4323,31 +4329,31 @@ var Td = tr("F0AudioPlayer", R(wd)), Ed = tr("F0AudioPlayerCard", R(Sd)), Dd = y
|
|
|
4323
4329
|
});
|
|
4324
4330
|
});
|
|
4325
4331
|
jd.displayName = "F0Accordion";
|
|
4326
|
-
var Md = R(
|
|
4332
|
+
var Md = R(_n("F0Accordion", wi(jd, Ad))), Nd = [
|
|
4327
4333
|
"info",
|
|
4328
4334
|
"warning",
|
|
4329
4335
|
"critical",
|
|
4330
4336
|
"positive"
|
|
4331
4337
|
], Pd = ({ count: e, list: t }) => {
|
|
4332
|
-
let [n, r] = J(!1), i = /* @__PURE__ */ X(
|
|
4333
|
-
return t?.length ? /* @__PURE__ */ Z(
|
|
4338
|
+
let [n, r] = J(!1), i = /* @__PURE__ */ X(To, { label: `+${e}` });
|
|
4339
|
+
return t?.length ? /* @__PURE__ */ Z(uc, {
|
|
4334
4340
|
open: n,
|
|
4335
4341
|
onOpenChange: r,
|
|
4336
|
-
children: [/* @__PURE__ */ X(
|
|
4342
|
+
children: [/* @__PURE__ */ X($s, {
|
|
4337
4343
|
asChild: !0,
|
|
4338
4344
|
children: /* @__PURE__ */ X("button", {
|
|
4339
|
-
className:
|
|
4345
|
+
className: On("inline-flex flex-shrink-0 items-center"),
|
|
4340
4346
|
children: i
|
|
4341
4347
|
})
|
|
4342
|
-
}), /* @__PURE__ */ X(
|
|
4348
|
+
}), /* @__PURE__ */ X(ic, {
|
|
4343
4349
|
className: "rounded-md border border-solid border-f1-border-secondary p-1 shadow-md",
|
|
4344
4350
|
align: "end",
|
|
4345
|
-
children: /* @__PURE__ */ Z(
|
|
4351
|
+
children: /* @__PURE__ */ Z(uo, {
|
|
4346
4352
|
className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[172px] flex-col",
|
|
4347
4353
|
children: [t.map((e, t) => /* @__PURE__ */ X("div", {
|
|
4348
4354
|
className: "flex w-[220px] min-w-0 items-center gap-1.5 px-2 py-1 [&:first-child]:pt-2 [&:last-child]:pb-2",
|
|
4349
|
-
children: /* @__PURE__ */ X(
|
|
4350
|
-
}, t)), /* @__PURE__ */ X(
|
|
4355
|
+
children: /* @__PURE__ */ X(To, { ...e })
|
|
4356
|
+
}, t)), /* @__PURE__ */ X(fo, {
|
|
4351
4357
|
orientation: "vertical",
|
|
4352
4358
|
className: "[&_div]:bg-f1-background"
|
|
4353
4359
|
})]
|
|
@@ -4359,9 +4365,9 @@ Pd.displayName = "ChipCounter";
|
|
|
4359
4365
|
//#endregion
|
|
4360
4366
|
//#region src/elements/F0ChipList/F0ChipList.tsx
|
|
4361
4367
|
var Fd = ({ chips: e, max: t = 4, remainingCount: n, layout: r = "compact" }) => {
|
|
4362
|
-
if (r === "fill") return /* @__PURE__ */ X(
|
|
4368
|
+
if (r === "fill") return /* @__PURE__ */ X(co, {
|
|
4363
4369
|
items: e,
|
|
4364
|
-
renderListItem: (e) => /* @__PURE__ */ X(
|
|
4370
|
+
renderListItem: (e) => /* @__PURE__ */ X(To, { ...e }),
|
|
4365
4371
|
renderDropdownItem: () => null,
|
|
4366
4372
|
forceShowingOverflowIndicator: n !== void 0,
|
|
4367
4373
|
renderOverflowIndicator: (t) => /* @__PURE__ */ X(Pd, {
|
|
@@ -4374,19 +4380,19 @@ var Fd = ({ chips: e, max: t = 4, remainingCount: n, layout: r = "compact" }) =>
|
|
|
4374
4380
|
let i = e.slice(0, t), a = e.slice(t), o = n ?? e.length - t, s = o > 0;
|
|
4375
4381
|
return /* @__PURE__ */ Z("div", {
|
|
4376
4382
|
className: "flex items-center gap-2",
|
|
4377
|
-
children: [i.map((e, t) => /* @__PURE__ */ X(
|
|
4383
|
+
children: [i.map((e, t) => /* @__PURE__ */ X(To, { ...e }, t)), s ? /* @__PURE__ */ X(Pd, {
|
|
4378
4384
|
count: o,
|
|
4379
4385
|
list: n ? void 0 : a
|
|
4380
4386
|
}) : null]
|
|
4381
4387
|
});
|
|
4382
4388
|
};
|
|
4383
4389
|
Fd.displayName = "F0ChipList";
|
|
4384
|
-
var Id = R(
|
|
4390
|
+
var Id = R(_n("F0ChipList", Fd)), Ld = [
|
|
4385
4391
|
"blur",
|
|
4386
4392
|
"escape",
|
|
4387
4393
|
"commit",
|
|
4388
4394
|
"popupClose"
|
|
4389
|
-
], Rd =
|
|
4395
|
+
], Rd = xo, zd = [
|
|
4390
4396
|
"info",
|
|
4391
4397
|
"warning",
|
|
4392
4398
|
"critical",
|
|
@@ -4394,9 +4400,9 @@ var Id = R(tr("F0ChipList", Fd)), Ld = [
|
|
|
4394
4400
|
"positive",
|
|
4395
4401
|
"transparent"
|
|
4396
4402
|
], Bd = {
|
|
4397
|
-
get: async (e) => JSON.parse(localStorage.getItem(
|
|
4403
|
+
get: async (e) => JSON.parse(localStorage.getItem(ha(e)) ?? "{}"),
|
|
4398
4404
|
set: async (e, t) => {
|
|
4399
|
-
localStorage.setItem(
|
|
4405
|
+
localStorage.setItem(ha(e), JSON.stringify(t));
|
|
4400
4406
|
}
|
|
4401
4407
|
}, Vd = ({ disableClose: e = !1, onClose: t, isOpen: n, children: i, position: a = "right", size: o = "md", primaryAction: s, secondaryAction: c, title: l, description: u, module: d, otherActions: f, tabs: p, modal: m = !1, activeTabId: h, setActiveTabId: g, disableContentPadding: _, container: v, onWidthChange: y }) => {
|
|
4402
4408
|
let [b, x] = J(n);
|
|
@@ -4458,9 +4464,9 @@ var Id = R(tr("F0ChipList", Fd)), Ld = [
|
|
|
4458
4464
|
return /* @__PURE__ */ X(Vd, { ...t });
|
|
4459
4465
|
};
|
|
4460
4466
|
Ud.displayName = "F0Drawer";
|
|
4461
|
-
var Wd =
|
|
4467
|
+
var Wd = _n("F0Drawer", Ud), Gd = 388;
|
|
4462
4468
|
function Kd({ filters: e, value: t, onChange: n, height: r, width: i = 600, className: a, showApplyButton: o = !0, applyButtonLabel: s, dataTestId: c }) {
|
|
4463
|
-
let l =
|
|
4469
|
+
let l = z(), u = Object.keys(e)[0] ?? null, [d, f] = J(u), [p, m] = J(t);
|
|
4464
4470
|
G(() => {
|
|
4465
4471
|
m(t);
|
|
4466
4472
|
}, [t]), G(() => {
|
|
@@ -4468,7 +4474,7 @@ function Kd({ filters: e, value: t, onChange: n, height: r, width: i = 600, clas
|
|
|
4468
4474
|
let t = Object.keys(e);
|
|
4469
4475
|
if (t.length > 0) {
|
|
4470
4476
|
let n = t.find((t) => {
|
|
4471
|
-
let n = p[t], r =
|
|
4477
|
+
let n = p[t], r = Ns(e[t].type);
|
|
4472
4478
|
return n !== void 0 && !r.isEmpty(n, {
|
|
4473
4479
|
schema: e[t],
|
|
4474
4480
|
i18n: l
|
|
@@ -4492,15 +4498,15 @@ function Kd({ filters: e, value: t, onChange: n, height: r, width: i = 600, clas
|
|
|
4492
4498
|
}, g = () => {
|
|
4493
4499
|
n(p);
|
|
4494
4500
|
}, _ = K(() => r || Object.entries(e).reduce((e, [t, n]) => {
|
|
4495
|
-
let r =
|
|
4501
|
+
let r = Ns(n.type);
|
|
4496
4502
|
return Math.max(e, r?.formHeight || Gd);
|
|
4497
4503
|
}, 0), [e, r]);
|
|
4498
|
-
return !e || Object.keys(e).length === 0 ? null : /* @__PURE__ */ X(
|
|
4504
|
+
return !e || Object.keys(e).length === 0 ? null : /* @__PURE__ */ X(pn, {
|
|
4499
4505
|
dataTestId: c,
|
|
4500
4506
|
children: /* @__PURE__ */ X("div", {
|
|
4501
|
-
className:
|
|
4507
|
+
className: B("overflow-hidden rounded-xl border border-solid border-f1-border-secondary bg-f1-background", a),
|
|
4502
4508
|
style: { maxWidth: i },
|
|
4503
|
-
children: /* @__PURE__ */ X(
|
|
4509
|
+
children: /* @__PURE__ */ X(Ss, {
|
|
4504
4510
|
filters: e,
|
|
4505
4511
|
tempFilters: p,
|
|
4506
4512
|
selectedFilterKey: d,
|
|
@@ -4519,11 +4525,11 @@ var qd = Kd;
|
|
|
4519
4525
|
//#endregion
|
|
4520
4526
|
//#region src/blocks/F0Form/describeFormSchema.ts
|
|
4521
4527
|
function Jd(e) {
|
|
4522
|
-
let t =
|
|
4528
|
+
let t = Aa(e).shape, n = [];
|
|
4523
4529
|
for (let [e, r] of Object.entries(t)) {
|
|
4524
|
-
let t = r, i =
|
|
4530
|
+
let t = r, i = Qi(t);
|
|
4525
4531
|
if (!i) continue;
|
|
4526
|
-
let a =
|
|
4532
|
+
let a = Xr(t, i), o = nn(t, a), s = {
|
|
4527
4533
|
name: e,
|
|
4528
4534
|
type: a,
|
|
4529
4535
|
label: i.label,
|
|
@@ -4595,9 +4601,9 @@ function Xd(e) {
|
|
|
4595
4601
|
let r = {
|
|
4596
4602
|
...n,
|
|
4597
4603
|
...e
|
|
4598
|
-
}, i =
|
|
4604
|
+
}, i = Aa(t), a = [];
|
|
4599
4605
|
for (let [e, t] of Object.entries(i.shape)) {
|
|
4600
|
-
let n =
|
|
4606
|
+
let n = Qi(t);
|
|
4601
4607
|
n?.renderIf ? Yt(n.renderIf, r) && a.push(e) : a.push(e);
|
|
4602
4608
|
}
|
|
4603
4609
|
return a;
|
|
@@ -4641,12 +4647,12 @@ var Qd = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, descriptio
|
|
|
4641
4647
|
modal: !0,
|
|
4642
4648
|
children: /* @__PURE__ */ Z("div", {
|
|
4643
4649
|
className: "flex flex-col gap-4 py-2",
|
|
4644
|
-
children: [/* @__PURE__ */ X(
|
|
4650
|
+
children: [/* @__PURE__ */ X(Ba, {
|
|
4645
4651
|
type: n,
|
|
4646
4652
|
size: "lg"
|
|
4647
4653
|
}), /* @__PURE__ */ Z("div", {
|
|
4648
4654
|
className: "flex flex-col gap-0.5",
|
|
4649
|
-
children: [/* @__PURE__ */ X(
|
|
4655
|
+
children: [/* @__PURE__ */ X(pi, {
|
|
4650
4656
|
className: "text-xl sm:text-lg",
|
|
4651
4657
|
children: r
|
|
4652
4658
|
}), /* @__PURE__ */ X(se, {
|
|
@@ -4706,8 +4712,8 @@ var Qd = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, descriptio
|
|
|
4706
4712
|
return r.map((t) => ({
|
|
4707
4713
|
...t,
|
|
4708
4714
|
actions: {
|
|
4709
|
-
primary:
|
|
4710
|
-
secondary:
|
|
4715
|
+
primary: Lo(t.actions.primary).map((n, r) => e(t, n, "primary", r)),
|
|
4716
|
+
secondary: Lo(t.actions.secondary).map((n, r) => e(t, n, "secondary", r))
|
|
4711
4717
|
}
|
|
4712
4718
|
}));
|
|
4713
4719
|
}, [r]), d = K(() => {
|
|
@@ -4759,7 +4765,7 @@ var Qd = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, descriptio
|
|
|
4759
4765
|
children: e.content
|
|
4760
4766
|
}, e.id) }, e.id)) });
|
|
4761
4767
|
}, nf = ({ children: e }) => {
|
|
4762
|
-
let t = Mc(T.subscribe, T.getSnapshot, T.getServerSnapshot), n =
|
|
4768
|
+
let t = Mc(T.subscribe, T.getSnapshot, T.getServerSnapshot), n = z(), [r, i] = J(null);
|
|
4763
4769
|
G(() => {
|
|
4764
4770
|
let e = T.acquireRenderer();
|
|
4765
4771
|
return i(e.id), e.release;
|
|
@@ -4887,7 +4893,7 @@ function cf({ field: e, value: t, onChange: n, onBlur: r, error: i, errorMessage
|
|
|
4887
4893
|
className: "text-base text-f1-foreground-secondary",
|
|
4888
4894
|
children: e.helpText
|
|
4889
4895
|
}) : null,
|
|
4890
|
-
/* @__PURE__ */ X(
|
|
4896
|
+
/* @__PURE__ */ X(Zo, { status: v })
|
|
4891
4897
|
]
|
|
4892
4898
|
}) });
|
|
4893
4899
|
}
|
|
@@ -4908,7 +4914,7 @@ function df({ children: e, ...t }) {
|
|
|
4908
4914
|
}
|
|
4909
4915
|
//#endregion
|
|
4910
4916
|
//#region src/blocks/F0Wizard/components/WizardSteps.tsx
|
|
4911
|
-
var ff =
|
|
4917
|
+
var ff = Ya({
|
|
4912
4918
|
base: "flex-1 text-base font-medium leading-5 tracking-[-0.005em]",
|
|
4913
4919
|
variants: { state: {
|
|
4914
4920
|
active: "text-f1-foreground",
|
|
@@ -4922,8 +4928,8 @@ function pf(e, t, n) {
|
|
|
4922
4928
|
function mf({ state: e, index: t }) {
|
|
4923
4929
|
return e === "completed" ? /* @__PURE__ */ X("span", {
|
|
4924
4930
|
className: "flex h-5 w-5 min-w-5 shrink-0 items-center justify-center rounded-xs bg-f1-background-secondary text-f1-foreground-secondary",
|
|
4925
|
-
children: /* @__PURE__ */ X(
|
|
4926
|
-
}) : /* @__PURE__ */ X(
|
|
4931
|
+
children: /* @__PURE__ */ X(Hs, { className: "h-3 w-3" })
|
|
4932
|
+
}) : /* @__PURE__ */ X(rr, {
|
|
4927
4933
|
value: t + 1,
|
|
4928
4934
|
type: e === "active" ? "selected" : "default",
|
|
4929
4935
|
size: "md"
|
|
@@ -4946,7 +4952,7 @@ function hf() {
|
|
|
4946
4952
|
},
|
|
4947
4953
|
disabled: !u && a !== t,
|
|
4948
4954
|
"aria-current": a === t ? "step" : void 0,
|
|
4949
|
-
className:
|
|
4955
|
+
className: B(On(), "flex cursor-pointer items-center gap-2 rounded p-2 text-left", s === "active" && "bg-f1-background-selected", u && "hover:bg-f1-background-secondary-hover", !u && a !== t && "cursor-default opacity-70"),
|
|
4950
4956
|
children: [/* @__PURE__ */ X(mf, {
|
|
4951
4957
|
state: s,
|
|
4952
4958
|
index: a
|
|
@@ -5031,9 +5037,9 @@ var _f = () => {}, vf = ({ steps: e, children: t, isOpen: n, onClose: r = _f, ti
|
|
|
5031
5037
|
allowStepSkipping: f,
|
|
5032
5038
|
autoCloseOnLastStepSubmit: p,
|
|
5033
5039
|
onClose: r
|
|
5034
|
-
}), g =
|
|
5040
|
+
}), g = z(), _ = e[h.currentStep], y = h.currentStep === 0, b = h.currentStep === e.length - 1, x = b ? _?.nextLabel ?? l ?? g.wizard.submit : _?.nextLabel ?? s ?? g.wizard.next, S = _?.previousLabel ?? c ?? g.wizard.previous, C = K(() => ({
|
|
5035
5041
|
label: x,
|
|
5036
|
-
icon: b ? void 0 :
|
|
5042
|
+
icon: b ? void 0 : da,
|
|
5037
5043
|
onClick: () => void h.goNext(),
|
|
5038
5044
|
disabled: _?.isCompleted?.() === !1 || _?.hasErrors?.() === !0,
|
|
5039
5045
|
loading: h.loading
|
|
@@ -5044,7 +5050,7 @@ var _f = () => {}, vf = ({ steps: e, children: t, isOpen: n, onClose: r = _f, ti
|
|
|
5044
5050
|
_
|
|
5045
5051
|
]), w = K(() => y ? void 0 : {
|
|
5046
5052
|
label: S,
|
|
5047
|
-
icon:
|
|
5053
|
+
icon: So,
|
|
5048
5054
|
onClick: h.goPrevious,
|
|
5049
5055
|
disabled: h.loading
|
|
5050
5056
|
}, [
|
|
@@ -5090,14 +5096,14 @@ vf.displayName = "F0Wizard", R(vf);
|
|
|
5090
5096
|
//#endregion
|
|
5091
5097
|
//#region src/blocks/F0WizardForm/F0WizardForm.tsx
|
|
5092
5098
|
function yf(e) {
|
|
5093
|
-
let t =
|
|
5094
|
-
return n.length !== 0 && n.every(([, e]) =>
|
|
5099
|
+
let t = Aa(e).shape, n = Object.entries(t);
|
|
5100
|
+
return n.length !== 0 && n.every(([, e]) => Qi(e)?.disabled === !0);
|
|
5095
5101
|
}
|
|
5096
5102
|
function bf(e, t) {
|
|
5097
5103
|
if (t) return Object.keys(t);
|
|
5098
|
-
let n =
|
|
5104
|
+
let n = Aa(e).shape, r = /* @__PURE__ */ new Set();
|
|
5099
5105
|
for (let e of Object.values(n)) {
|
|
5100
|
-
let t =
|
|
5106
|
+
let t = Qi(e);
|
|
5101
5107
|
t?.section && r.add(t.section);
|
|
5102
5108
|
}
|
|
5103
5109
|
return Array.from(r);
|
|
@@ -5105,15 +5111,15 @@ function bf(e, t) {
|
|
|
5105
5111
|
function xf(e, t) {
|
|
5106
5112
|
let n = e.shape, r = {};
|
|
5107
5113
|
for (let [e, i] of Object.entries(n)) {
|
|
5108
|
-
let n =
|
|
5114
|
+
let n = Qi(i);
|
|
5109
5115
|
n?.section && t.includes(n.section) && (r[e] = i);
|
|
5110
5116
|
}
|
|
5111
|
-
return
|
|
5117
|
+
return hi(r);
|
|
5112
5118
|
}
|
|
5113
5119
|
function Sf(e, t, n) {
|
|
5114
5120
|
let r = t ?? {};
|
|
5115
5121
|
if (n) return n({ data: r });
|
|
5116
|
-
let i =
|
|
5122
|
+
let i = Aa(e).shape;
|
|
5117
5123
|
return Object.entries(i).every(([e, t]) => {
|
|
5118
5124
|
if (t.isOptional()) return !0;
|
|
5119
5125
|
let n = r[e];
|
|
@@ -5122,7 +5128,7 @@ function Sf(e, t, n) {
|
|
|
5122
5128
|
}
|
|
5123
5129
|
var Cf = 3e3;
|
|
5124
5130
|
function wf() {
|
|
5125
|
-
let { forms: e } =
|
|
5131
|
+
let { forms: e } = z(), [t, n] = J("idle"), [r, i] = J(), a = q(null);
|
|
5126
5132
|
G(() => () => {
|
|
5127
5133
|
a.current && clearTimeout(a.current);
|
|
5128
5134
|
}, []);
|
|
@@ -5339,7 +5345,7 @@ function Of({ sectionId: e, formName: t, schema: n, sectionConfig: r, defaultVal
|
|
|
5339
5345
|
});
|
|
5340
5346
|
}
|
|
5341
5347
|
function kf({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, width: a, size: o, defaultStepIndex: s, nextLabel: c, previousLabel: l, onStepChanged: u, allowStepSkipping: f, autoCloseOnLastStepSubmit: p, linkAfterLastStepSubmit: m, autoSkipCompletedSteps: h = !1, renderCustomField: g }) {
|
|
5342
|
-
let { name: _, schema: v, sections: y, defaultValues: b, onSubmit: x, submitConfig: S, errorTriggerMode: C = "on-blur" } = e, w = S?.label, T = K(() =>
|
|
5348
|
+
let { name: _, schema: v, sections: y, defaultValues: b, onSubmit: x, submitConfig: S, errorTriggerMode: C = "on-blur" } = e, w = S?.label, T = K(() => Aa(v), [v]), E = K(() => bf(v, y), [v, y]), D = W((e) => yf(xf(T, e)), [T]), O = Qe(), k = q(b ? { ...b } : {}), A = q(s ?? 0), j = W((e) => async () => {
|
|
5343
5349
|
await O.submit();
|
|
5344
5350
|
}, [O]), M = W((e) => O.hasErrors, [O.hasErrors]), N = t ?? e.steps, P = K(() => N ?? E.map((e) => ({
|
|
5345
5351
|
title: y?.[e]?.title ?? e,
|
|
@@ -5534,8 +5540,8 @@ var Lf = { open: If }, Rf = [
|
|
|
5534
5540
|
className: "flex justify-between text-sm text-f1-foreground-secondary",
|
|
5535
5541
|
children: [/* @__PURE__ */ X("span", { children: e }), /* @__PURE__ */ X("span", { children: t })]
|
|
5536
5542
|
}), Hf = ({ visible: e, content: t, style: n }) => {
|
|
5537
|
-
let r =
|
|
5538
|
-
return /* @__PURE__ */ X(
|
|
5543
|
+
let r = Zn() ? 0 : .15;
|
|
5544
|
+
return /* @__PURE__ */ X(ir, { children: e ? /* @__PURE__ */ X(Jn.div, {
|
|
5539
5545
|
initial: {
|
|
5540
5546
|
opacity: 0,
|
|
5541
5547
|
x: "-50%",
|
|
@@ -5553,7 +5559,7 @@ var Lf = { open: If }, Rf = [
|
|
|
5553
5559
|
},
|
|
5554
5560
|
transition: { duration: r },
|
|
5555
5561
|
style: n,
|
|
5556
|
-
className:
|
|
5562
|
+
className: B("pointer-events-none absolute bottom-full mb-2", "dark whitespace-nowrap rounded-md px-2 py-1", "border border-solid border-f1-border-secondary bg-f1-background", "text-sm font-medium text-f1-foreground-inverse"),
|
|
5557
5563
|
role: "tooltip",
|
|
5558
5564
|
children: t
|
|
5559
5565
|
}) : null });
|
|
@@ -5563,11 +5569,11 @@ var Lf = { open: If }, Rf = [
|
|
|
5563
5569
|
"aria-label": "Loading slider",
|
|
5564
5570
|
"aria-busy": "true",
|
|
5565
5571
|
"aria-live": "polite",
|
|
5566
|
-
children: [e ? null : /* @__PURE__ */ X(
|
|
5572
|
+
children: [e ? null : /* @__PURE__ */ X(vn, { className: "h-4 w-24 rounded-md" }), /* @__PURE__ */ X("div", {
|
|
5567
5573
|
className: "flex items-center py-2",
|
|
5568
|
-
children: /* @__PURE__ */ X(
|
|
5574
|
+
children: /* @__PURE__ */ X(vn, { className: "h-1.5 w-full rounded-full" })
|
|
5569
5575
|
})]
|
|
5570
|
-
}), Wf =
|
|
5576
|
+
}), Wf = Ya({
|
|
5571
5577
|
base: "relative h-1.5 grow overflow-hidden rounded-full bg-f1-background-tertiary",
|
|
5572
5578
|
variants: { status: {
|
|
5573
5579
|
default: "",
|
|
@@ -5575,7 +5581,7 @@ var Lf = { open: If }, Rf = [
|
|
|
5575
5581
|
info: "",
|
|
5576
5582
|
error: ""
|
|
5577
5583
|
} }
|
|
5578
|
-
}), Gf =
|
|
5584
|
+
}), Gf = Ya({
|
|
5579
5585
|
base: "absolute h-full",
|
|
5580
5586
|
variants: {
|
|
5581
5587
|
status: {
|
|
@@ -5589,8 +5595,8 @@ var Lf = { open: If }, Rf = [
|
|
|
5589
5595
|
false: ""
|
|
5590
5596
|
}
|
|
5591
5597
|
}
|
|
5592
|
-
}), Kf = 20, qf =
|
|
5593
|
-
base:
|
|
5598
|
+
}), Kf = 20, qf = Ya({
|
|
5599
|
+
base: B("relative block rounded-full bg-f1-background border-[2px] border-solid", "transition-[transform,border-color] hover:scale-110", "motion-reduce:transition-none motion-reduce:hover:scale-100", "data-[disabled]:cursor-not-allowed data-[disabled]:hover:scale-100"),
|
|
5594
5600
|
variants: {
|
|
5595
5601
|
status: {
|
|
5596
5602
|
default: "border-f1-background-selected-bold",
|
|
@@ -5608,7 +5614,7 @@ var Lf = { open: If }, Rf = [
|
|
|
5608
5614
|
G(() => {
|
|
5609
5615
|
process.env.NODE_ENV !== "production" && !T && console.warn("F0Slider: provide a non-empty `label` or `ariaLabel` for accessibility.");
|
|
5610
5616
|
}, [T]);
|
|
5611
|
-
let [E, D] =
|
|
5617
|
+
let [E, D] = tc({
|
|
5612
5618
|
prop: u,
|
|
5613
5619
|
defaultProp: d ?? m,
|
|
5614
5620
|
onChange: f
|
|
@@ -5625,7 +5631,7 @@ var Lf = { open: If }, Rf = [
|
|
|
5625
5631
|
return /* @__PURE__ */ Z("div", {
|
|
5626
5632
|
ref: t,
|
|
5627
5633
|
...x,
|
|
5628
|
-
className:
|
|
5634
|
+
className: B("flex flex-col gap-2", c && "cursor-not-allowed"),
|
|
5629
5635
|
onPointerDownCapture: () => {
|
|
5630
5636
|
ne.current = !0;
|
|
5631
5637
|
},
|
|
@@ -5633,7 +5639,7 @@ var Lf = { open: If }, Rf = [
|
|
|
5633
5639
|
ne.current = !1;
|
|
5634
5640
|
},
|
|
5635
5641
|
children: [
|
|
5636
|
-
ae ? /* @__PURE__ */ X(
|
|
5642
|
+
ae ? /* @__PURE__ */ X(Xo, {
|
|
5637
5643
|
label: n,
|
|
5638
5644
|
required: s,
|
|
5639
5645
|
htmlFor: S,
|
|
@@ -5651,7 +5657,7 @@ var Lf = { open: If }, Rf = [
|
|
|
5651
5657
|
step: g,
|
|
5652
5658
|
disabled: c,
|
|
5653
5659
|
name: l,
|
|
5654
|
-
className:
|
|
5660
|
+
className: B("relative flex w-full touch-none select-none items-center py-2", c && "opacity-50"),
|
|
5655
5661
|
onMouseEnter: () => P(!0),
|
|
5656
5662
|
onMouseLeave: () => P(!1),
|
|
5657
5663
|
children: [
|
|
@@ -5673,10 +5679,10 @@ var Lf = { open: If }, Rf = [
|
|
|
5673
5679
|
width: Kf,
|
|
5674
5680
|
height: Kf
|
|
5675
5681
|
},
|
|
5676
|
-
className:
|
|
5682
|
+
className: B(qf({
|
|
5677
5683
|
status: ie,
|
|
5678
5684
|
disabled: c
|
|
5679
|
-
}),
|
|
5685
|
+
}), On("focus-visible:ring-offset-1")),
|
|
5680
5686
|
onFocus: () => I(!ne.current),
|
|
5681
5687
|
onBlur: () => I(!1)
|
|
5682
5688
|
}),
|
|
@@ -5695,13 +5701,13 @@ var Lf = { open: If }, Rf = [
|
|
|
5695
5701
|
id: w,
|
|
5696
5702
|
role: "status",
|
|
5697
5703
|
"aria-live": "polite",
|
|
5698
|
-
children: /* @__PURE__ */ X(
|
|
5704
|
+
children: /* @__PURE__ */ X(Zo, { status: oe })
|
|
5699
5705
|
})
|
|
5700
5706
|
]
|
|
5701
5707
|
});
|
|
5702
5708
|
});
|
|
5703
5709
|
Jf.displayName = "F0Slider";
|
|
5704
|
-
var Yf =
|
|
5710
|
+
var Yf = _n("F0Slider", wi(R(Jf), Uf)), Xf = [
|
|
5705
5711
|
"completed",
|
|
5706
5712
|
"in-progress",
|
|
5707
5713
|
"not-started"
|
|
@@ -5721,7 +5727,7 @@ var Yf = tr("F0Slider", Xa(R(Jf), Uf)), Xf = [
|
|
|
5721
5727
|
"grey",
|
|
5722
5728
|
"orange",
|
|
5723
5729
|
"radical"
|
|
5724
|
-
], Qf = 16, $f =
|
|
5730
|
+
], Qf = 16, $f = Ya({
|
|
5725
5731
|
base: "h-0.5 rounded-full bg-f1-foreground cursor-pointer",
|
|
5726
5732
|
variants: {
|
|
5727
5733
|
depth: {
|
|
@@ -5776,7 +5782,7 @@ function tp(e, t) {
|
|
|
5776
5782
|
function np({ items: e, activeItem: t, className: n, align: r = "left", variant: i = "dark" }) {
|
|
5777
5783
|
let a = K(() => tp(ep(e), t), [e, t]);
|
|
5778
5784
|
return /* @__PURE__ */ X("div", {
|
|
5779
|
-
className:
|
|
5785
|
+
className: B("flex flex-col justify-center gap-2 py-3", r === "right" ? "items-end" : "items-start", n),
|
|
5780
5786
|
children: a.map((e) => /* @__PURE__ */ X("div", { className: $f({
|
|
5781
5787
|
depth: e.depth,
|
|
5782
5788
|
variant: i,
|
|
@@ -5818,7 +5824,7 @@ function ip(e, t) {
|
|
|
5818
5824
|
}
|
|
5819
5825
|
//#endregion
|
|
5820
5826
|
//#region src/blocks/F0TableOfContentPopover/F0TableOfContentPopover.tsx
|
|
5821
|
-
var ap = 300, op = 0, sp =
|
|
5827
|
+
var ap = 300, op = 0, sp = Ya({
|
|
5822
5828
|
base: "w-auto overflow-y-auto rounded-lg border border-solid border-f1-border-secondary bg-f1-background p-0 shadow-lg",
|
|
5823
5829
|
variants: { size: {
|
|
5824
5830
|
sm: "max-h-[240px]",
|
|
@@ -5838,15 +5844,15 @@ function cp({ title: e, items: t, className: n, activeItem: r, collapsible: i =
|
|
|
5838
5844
|
});
|
|
5839
5845
|
}));
|
|
5840
5846
|
}, []);
|
|
5841
|
-
return /* @__PURE__ */ Z(
|
|
5847
|
+
return /* @__PURE__ */ Z(us, {
|
|
5842
5848
|
open: f,
|
|
5843
5849
|
onOpenChange: _,
|
|
5844
5850
|
openDelay: op,
|
|
5845
5851
|
closeDelay: ap,
|
|
5846
|
-
children: [/* @__PURE__ */ X(
|
|
5852
|
+
children: [/* @__PURE__ */ X($o, {
|
|
5847
5853
|
asChild: !0,
|
|
5848
5854
|
children: /* @__PURE__ */ X("button", {
|
|
5849
|
-
className:
|
|
5855
|
+
className: B(On(), "flex cursor-pointer items-center rounded-md px-1.5 py-1", n),
|
|
5850
5856
|
"aria-label": e ?? "Menu",
|
|
5851
5857
|
children: /* @__PURE__ */ X(np, {
|
|
5852
5858
|
items: t,
|
|
@@ -5855,13 +5861,13 @@ function cp({ title: e, items: t, className: n, activeItem: r, collapsible: i =
|
|
|
5855
5861
|
variant: u
|
|
5856
5862
|
})
|
|
5857
5863
|
})
|
|
5858
|
-
}), /* @__PURE__ */ X(
|
|
5864
|
+
}), /* @__PURE__ */ X(cs, {
|
|
5859
5865
|
ref: v,
|
|
5860
5866
|
side: c === "left" ? "right" : "left",
|
|
5861
5867
|
align: "center",
|
|
5862
5868
|
sideOffset: -28,
|
|
5863
5869
|
container: d,
|
|
5864
|
-
className:
|
|
5870
|
+
className: B(sp({ size: l }), !e && "pt-2", "scrollbar-macos"),
|
|
5865
5871
|
children: /* @__PURE__ */ X(Ft, {
|
|
5866
5872
|
title: e,
|
|
5867
5873
|
items: t,
|
|
@@ -5875,7 +5881,7 @@ function cp({ title: e, items: t, className: n, activeItem: r, collapsible: i =
|
|
|
5875
5881
|
})]
|
|
5876
5882
|
});
|
|
5877
5883
|
}
|
|
5878
|
-
var lp = R(
|
|
5884
|
+
var lp = R(_n("F0TableOfContentPopover", cp));
|
|
5879
5885
|
//#endregion
|
|
5880
5886
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/Form/utils.ts
|
|
5881
5887
|
function up(e) {
|
|
@@ -5969,8 +5975,8 @@ function mp(e) {
|
|
|
5969
5975
|
}
|
|
5970
5976
|
//#endregion
|
|
5971
5977
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/ApplyingChangesTag/ApplyingChangesTag.tsx
|
|
5972
|
-
var hp =
|
|
5973
|
-
let e =
|
|
5978
|
+
var hp = Jn.create(Ci), gp = Dc(() => {
|
|
5979
|
+
let e = z();
|
|
5974
5980
|
return /* @__PURE__ */ Z("div", {
|
|
5975
5981
|
className: "flex flex-row items-center gap-1 rounded-full border border-solid border-f1-border-secondary bg-f1-background px-2 py-1.5 pr-2.5 shadow-md",
|
|
5976
5982
|
children: [/* @__PURE__ */ X(hp, {
|
|
@@ -6322,79 +6328,79 @@ function Ap() {
|
|
|
6322
6328
|
//#endregion
|
|
6323
6329
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/constants.ts
|
|
6324
6330
|
var jp = () => {
|
|
6325
|
-
let { isQuestionTypeAllowed: e, datasets: t } = Dp(), { t: n } =
|
|
6331
|
+
let { isQuestionTypeAllowed: e, datasets: t } = Dp(), { t: n } = z(), r = [
|
|
6326
6332
|
{
|
|
6327
6333
|
label: n("surveyFormBuilder.questionTypes.rating"),
|
|
6328
|
-
icon:
|
|
6334
|
+
icon: ga,
|
|
6329
6335
|
questionType: "rating"
|
|
6330
6336
|
},
|
|
6331
6337
|
{
|
|
6332
6338
|
label: n("surveyFormBuilder.questionTypes.multipleChoice"),
|
|
6333
|
-
icon:
|
|
6339
|
+
icon: li,
|
|
6334
6340
|
questionType: "multi-select"
|
|
6335
6341
|
},
|
|
6336
6342
|
{
|
|
6337
6343
|
label: n("surveyFormBuilder.questionTypes.singleChoice"),
|
|
6338
|
-
icon:
|
|
6344
|
+
icon: Hs,
|
|
6339
6345
|
questionType: "select"
|
|
6340
6346
|
},
|
|
6341
6347
|
{
|
|
6342
6348
|
label: n("surveyFormBuilder.questionTypes.text"),
|
|
6343
|
-
icon:
|
|
6349
|
+
icon: na,
|
|
6344
6350
|
questionType: "text"
|
|
6345
6351
|
},
|
|
6346
6352
|
{
|
|
6347
6353
|
label: n("surveyFormBuilder.questionTypes.longText"),
|
|
6348
|
-
icon:
|
|
6354
|
+
icon: Da,
|
|
6349
6355
|
questionType: "longText"
|
|
6350
6356
|
},
|
|
6351
6357
|
{
|
|
6352
6358
|
label: n("surveyFormBuilder.questionTypes.numeric"),
|
|
6353
|
-
icon:
|
|
6359
|
+
icon: zi,
|
|
6354
6360
|
questionType: "numeric"
|
|
6355
6361
|
},
|
|
6356
6362
|
{
|
|
6357
6363
|
label: n("surveyFormBuilder.questionTypes.link"),
|
|
6358
|
-
icon:
|
|
6364
|
+
icon: pa,
|
|
6359
6365
|
questionType: "link"
|
|
6360
6366
|
},
|
|
6361
6367
|
{
|
|
6362
6368
|
label: n("surveyFormBuilder.questionTypes.date"),
|
|
6363
|
-
icon:
|
|
6369
|
+
icon: Yr,
|
|
6364
6370
|
questionType: "date"
|
|
6365
6371
|
},
|
|
6366
6372
|
{
|
|
6367
6373
|
label: n("surveyFormBuilder.questionTypes.file"),
|
|
6368
|
-
icon:
|
|
6374
|
+
icon: ja,
|
|
6369
6375
|
questionType: "file"
|
|
6370
6376
|
},
|
|
6371
6377
|
{
|
|
6372
6378
|
label: n("surveyFormBuilder.questionTypes.checkbox"),
|
|
6373
|
-
icon:
|
|
6379
|
+
icon: Do,
|
|
6374
6380
|
questionType: "checkbox"
|
|
6375
6381
|
}
|
|
6376
6382
|
].filter((t) => e(t.questionType)), i = e("dropdown-single") ? Object.entries(t ?? {}).map(([e, t]) => ({
|
|
6377
6383
|
label: t.title,
|
|
6378
|
-
icon: t.icon ??
|
|
6384
|
+
icon: t.icon ?? oo,
|
|
6379
6385
|
questionType: "dropdown-single",
|
|
6380
6386
|
datasetKey: e
|
|
6381
6387
|
})) : [];
|
|
6382
6388
|
return [...r, ...i];
|
|
6383
6389
|
}, Mp = {
|
|
6384
|
-
rating:
|
|
6385
|
-
"multi-select":
|
|
6386
|
-
select:
|
|
6387
|
-
text:
|
|
6388
|
-
longText:
|
|
6389
|
-
numeric:
|
|
6390
|
-
link:
|
|
6391
|
-
date:
|
|
6392
|
-
"dropdown-single":
|
|
6393
|
-
"dropdown-multi":
|
|
6394
|
-
file:
|
|
6395
|
-
checkbox:
|
|
6390
|
+
rating: ga,
|
|
6391
|
+
"multi-select": li,
|
|
6392
|
+
select: Hs,
|
|
6393
|
+
text: na,
|
|
6394
|
+
longText: Da,
|
|
6395
|
+
numeric: zi,
|
|
6396
|
+
link: pa,
|
|
6397
|
+
date: Yr,
|
|
6398
|
+
"dropdown-single": oo,
|
|
6399
|
+
"dropdown-multi": oo,
|
|
6400
|
+
file: ja,
|
|
6401
|
+
checkbox: Do
|
|
6396
6402
|
}, Np = () => {
|
|
6397
|
-
let { disabled: e, answering: t, onAddNewElement: n, isQuestionTypeAllowed: r, labels: i } = Dp(), [a, o] = J(!1), s = jp(), { t: c } =
|
|
6403
|
+
let { disabled: e, answering: t, onAddNewElement: n, isQuestionTypeAllowed: r, labels: i } = Dp(), [a, o] = J(!1), s = jp(), { t: c } = z(), l = i?.addQuestion ?? c("surveyFormBuilder.actions.addQuestion"), u = (e, t) => {
|
|
6398
6404
|
n?.({
|
|
6399
6405
|
type: e,
|
|
6400
6406
|
datasetKey: t
|
|
@@ -6404,28 +6410,28 @@ var jp = () => {
|
|
|
6404
6410
|
}, f = s.filter((e) => !e.datasetKey), p = Array.from(new Set(s.filter((e) => !!e.datasetKey).map((e) => e.datasetKey)));
|
|
6405
6411
|
return e || t ? null : /* @__PURE__ */ X("div", {
|
|
6406
6412
|
className: "ml-6 flex justify-center",
|
|
6407
|
-
children: /* @__PURE__ */ Z(
|
|
6413
|
+
children: /* @__PURE__ */ Z(oc, {
|
|
6408
6414
|
open: a,
|
|
6409
6415
|
onOpenChange: o,
|
|
6410
|
-
children: [/* @__PURE__ */ X(
|
|
6416
|
+
children: [/* @__PURE__ */ X(qs, {
|
|
6411
6417
|
asChild: !0,
|
|
6412
|
-
children: /* @__PURE__ */ X(
|
|
6413
|
-
icon:
|
|
6418
|
+
children: /* @__PURE__ */ X(V, {
|
|
6419
|
+
icon: so,
|
|
6414
6420
|
label: l,
|
|
6415
6421
|
size: "md",
|
|
6416
6422
|
variant: "outline",
|
|
6417
6423
|
hideLabel: !0
|
|
6418
6424
|
})
|
|
6419
|
-
}), /* @__PURE__ */ Z(
|
|
6425
|
+
}), /* @__PURE__ */ Z(Gs, {
|
|
6420
6426
|
align: "center",
|
|
6421
6427
|
className: "w-80",
|
|
6422
6428
|
children: [
|
|
6423
|
-
/* @__PURE__ */ X(
|
|
6429
|
+
/* @__PURE__ */ X(Ys, {
|
|
6424
6430
|
onClick: d,
|
|
6425
6431
|
children: /* @__PURE__ */ Z("div", {
|
|
6426
6432
|
className: "flex w-full flex-row items-center gap-2",
|
|
6427
|
-
children: [/* @__PURE__ */ X(
|
|
6428
|
-
icon:
|
|
6433
|
+
children: [/* @__PURE__ */ X(H, {
|
|
6434
|
+
icon: xa,
|
|
6429
6435
|
color: "default"
|
|
6430
6436
|
}), /* @__PURE__ */ X("span", {
|
|
6431
6437
|
className: "flex-1 text-base font-medium",
|
|
@@ -6433,12 +6439,12 @@ var jp = () => {
|
|
|
6433
6439
|
})]
|
|
6434
6440
|
})
|
|
6435
6441
|
}),
|
|
6436
|
-
/* @__PURE__ */ X(
|
|
6437
|
-
f.map((e) => /* @__PURE__ */ X(
|
|
6442
|
+
/* @__PURE__ */ X(Js, {}),
|
|
6443
|
+
f.map((e) => /* @__PURE__ */ X(Ys, {
|
|
6438
6444
|
onClick: () => u(e.questionType),
|
|
6439
6445
|
children: /* @__PURE__ */ Z("div", {
|
|
6440
6446
|
className: "flex w-full flex-row items-center gap-2",
|
|
6441
|
-
children: [/* @__PURE__ */ X(
|
|
6447
|
+
children: [/* @__PURE__ */ X(H, {
|
|
6442
6448
|
icon: e.icon,
|
|
6443
6449
|
color: "default"
|
|
6444
6450
|
}), /* @__PURE__ */ X("span", {
|
|
@@ -6447,13 +6453,13 @@ var jp = () => {
|
|
|
6447
6453
|
})]
|
|
6448
6454
|
})
|
|
6449
6455
|
}, e.questionType)),
|
|
6450
|
-
p.length > 0 ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
6456
|
+
p.length > 0 ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Js, {}), p.map((e) => {
|
|
6451
6457
|
let t = s.find((t) => t.datasetKey === e && t.questionType === "dropdown-single");
|
|
6452
|
-
return /* @__PURE__ */ Z(
|
|
6458
|
+
return /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
6453
6459
|
className: "mx-1 px-2 data-[state=open]:rounded-sm data-[state=closed]:bg-transparent data-[state=open]:bg-f1-background-hover",
|
|
6454
6460
|
children: /* @__PURE__ */ Z("div", {
|
|
6455
6461
|
className: "flex w-full flex-row items-center gap-2",
|
|
6456
|
-
children: [t ? /* @__PURE__ */ X(
|
|
6462
|
+
children: [t ? /* @__PURE__ */ X(H, {
|
|
6457
6463
|
icon: t.icon,
|
|
6458
6464
|
color: "default"
|
|
6459
6465
|
}) : null, /* @__PURE__ */ X("span", {
|
|
@@ -6461,24 +6467,24 @@ var jp = () => {
|
|
|
6461
6467
|
children: t?.label ?? e
|
|
6462
6468
|
})]
|
|
6463
6469
|
})
|
|
6464
|
-
}), /* @__PURE__ */ X(
|
|
6470
|
+
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ Z(fc, { children: [r("dropdown-single") ? /* @__PURE__ */ X(Ys, {
|
|
6465
6471
|
onClick: () => u("dropdown-single", e),
|
|
6466
6472
|
children: /* @__PURE__ */ Z("div", {
|
|
6467
6473
|
className: "flex w-full flex-row items-center gap-2",
|
|
6468
|
-
children: [/* @__PURE__ */ X(
|
|
6469
|
-
icon:
|
|
6474
|
+
children: [/* @__PURE__ */ X(H, {
|
|
6475
|
+
icon: Hs,
|
|
6470
6476
|
color: "default"
|
|
6471
6477
|
}), /* @__PURE__ */ X("span", {
|
|
6472
6478
|
className: "flex-1",
|
|
6473
6479
|
children: c("surveyFormBuilder.labels.singleSelection")
|
|
6474
6480
|
})]
|
|
6475
6481
|
})
|
|
6476
|
-
}) : null, r("dropdown-multi") ? /* @__PURE__ */ X(
|
|
6482
|
+
}) : null, r("dropdown-multi") ? /* @__PURE__ */ X(Ys, {
|
|
6477
6483
|
onClick: () => u("dropdown-multi", e),
|
|
6478
6484
|
children: /* @__PURE__ */ Z("div", {
|
|
6479
6485
|
className: "flex w-full flex-row items-center gap-2",
|
|
6480
|
-
children: [/* @__PURE__ */ X(
|
|
6481
|
-
icon:
|
|
6486
|
+
children: [/* @__PURE__ */ X(H, {
|
|
6487
|
+
icon: li,
|
|
6482
6488
|
color: "default"
|
|
6483
6489
|
}), /* @__PURE__ */ X("span", {
|
|
6484
6490
|
className: "flex-1",
|
|
@@ -6492,7 +6498,7 @@ var jp = () => {
|
|
|
6492
6498
|
})
|
|
6493
6499
|
});
|
|
6494
6500
|
}, Pp = ({ open: e, onConfirm: t, onCancel: n }) => {
|
|
6495
|
-
let { t: r } =
|
|
6501
|
+
let { t: r } = z();
|
|
6496
6502
|
return /* @__PURE__ */ X(Jt, {
|
|
6497
6503
|
open: e,
|
|
6498
6504
|
onClose: n,
|
|
@@ -6626,7 +6632,7 @@ function zp({ questionId: e, questionType: t, canDelete: n = !0 }) {
|
|
|
6626
6632
|
}
|
|
6627
6633
|
//#endregion
|
|
6628
6634
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/QuestionTypes/BaseQuestion/ActionsMenu/ActionsMenu.tsx
|
|
6629
|
-
var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(
|
|
6635
|
+
var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(Ys, {
|
|
6630
6636
|
className: "!pb-2.5 pr-4",
|
|
6631
6637
|
onClick: (e) => {
|
|
6632
6638
|
e.preventDefault(), r(!n);
|
|
@@ -6634,7 +6640,7 @@ var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(C
|
|
|
6634
6640
|
children: /* @__PURE__ */ Z("div", {
|
|
6635
6641
|
className: "flex w-full flex-row items-center gap-2",
|
|
6636
6642
|
children: [
|
|
6637
|
-
/* @__PURE__ */ X(
|
|
6643
|
+
/* @__PURE__ */ X(Ja, {
|
|
6638
6644
|
icon: t,
|
|
6639
6645
|
color: "default"
|
|
6640
6646
|
}),
|
|
@@ -6642,7 +6648,7 @@ var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(C
|
|
|
6642
6648
|
className: "flex-1",
|
|
6643
6649
|
children: e
|
|
6644
6650
|
}),
|
|
6645
|
-
/* @__PURE__ */ X(
|
|
6651
|
+
/* @__PURE__ */ X(Cs, {
|
|
6646
6652
|
title: e,
|
|
6647
6653
|
checked: n,
|
|
6648
6654
|
onCheckedChange: r,
|
|
@@ -6651,14 +6657,14 @@ var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(C
|
|
|
6651
6657
|
]
|
|
6652
6658
|
})
|
|
6653
6659
|
}), Vp = ({ label: e, value: t, currentDatasetKey: n, questionTypes: r, currentRatingType: i, isQuestionTypeAllowed: a, onSelectQuestionType: o, onSelectRatingType: s }) => {
|
|
6654
|
-
let { t: c } =
|
|
6655
|
-
return /* @__PURE__ */ Z(
|
|
6660
|
+
let { t: c } = z(), l = r.filter((e) => !e.datasetKey), u = Array.from(new Set(r.filter((e) => !!e.datasetKey).map((e) => e.datasetKey))), d = n ? r.find((e) => e.questionType === t && e.datasetKey === n)?.label ?? void 0 : r.find((e) => e.questionType === t && !e.datasetKey)?.label ?? void 0;
|
|
6661
|
+
return /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
6656
6662
|
className: "mx-1 px-2 data-[state=open]:rounded-sm data-[state=closed]:bg-transparent data-[state=open]:bg-f1-background-hover",
|
|
6657
6663
|
children: /* @__PURE__ */ Z("div", {
|
|
6658
6664
|
className: "flex w-full flex-row items-center gap-2",
|
|
6659
6665
|
children: [
|
|
6660
|
-
/* @__PURE__ */ X(
|
|
6661
|
-
icon:
|
|
6666
|
+
/* @__PURE__ */ X(Ja, {
|
|
6667
|
+
icon: aa,
|
|
6662
6668
|
color: "default"
|
|
6663
6669
|
}),
|
|
6664
6670
|
/* @__PURE__ */ X("span", {
|
|
@@ -6671,14 +6677,14 @@ var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(C
|
|
|
6671
6677
|
}) : null
|
|
6672
6678
|
]
|
|
6673
6679
|
})
|
|
6674
|
-
}), /* @__PURE__ */ X(
|
|
6680
|
+
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ Z(fc, { children: [l.map((e) => {
|
|
6675
6681
|
let r = e.questionType === "rating", a = t === e.questionType && !n;
|
|
6676
|
-
return r ? /* @__PURE__ */ Z(
|
|
6682
|
+
return r ? /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
6677
6683
|
className: "mx-1 mt-1 px-2 data-[state=open]:rounded-sm data-[state=closed]:bg-transparent data-[state=open]:bg-f1-background-hover",
|
|
6678
6684
|
children: /* @__PURE__ */ Z("div", {
|
|
6679
6685
|
className: "flex w-full flex-row items-center gap-2 text-base font-medium",
|
|
6680
6686
|
children: [
|
|
6681
|
-
/* @__PURE__ */ X(
|
|
6687
|
+
/* @__PURE__ */ X(Ja, {
|
|
6682
6688
|
icon: e.icon,
|
|
6683
6689
|
color: "default"
|
|
6684
6690
|
}),
|
|
@@ -6692,24 +6698,24 @@ var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(C
|
|
|
6692
6698
|
}) : null
|
|
6693
6699
|
]
|
|
6694
6700
|
})
|
|
6695
|
-
}), /* @__PURE__ */ X(
|
|
6701
|
+
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ X(fc, { children: Fp.map((e) => /* @__PURE__ */ X(Ys, {
|
|
6696
6702
|
onClick: () => s(e.value),
|
|
6697
6703
|
children: /* @__PURE__ */ Z("div", {
|
|
6698
6704
|
className: "flex w-full flex-row items-center gap-2 pl-2",
|
|
6699
6705
|
children: [/* @__PURE__ */ X("span", {
|
|
6700
6706
|
className: "flex-1",
|
|
6701
6707
|
children: e.label
|
|
6702
|
-
}), i === e.value ? /* @__PURE__ */ X(
|
|
6703
|
-
icon:
|
|
6708
|
+
}), i === e.value ? /* @__PURE__ */ X(Ja, {
|
|
6709
|
+
icon: Hs,
|
|
6704
6710
|
color: "default"
|
|
6705
6711
|
}) : null]
|
|
6706
6712
|
})
|
|
6707
|
-
}, e.value)) }) })] }, e.questionType) : /* @__PURE__ */ X(
|
|
6713
|
+
}, e.value)) }) })] }, e.questionType) : /* @__PURE__ */ X(Ys, {
|
|
6708
6714
|
onClick: () => o(e.questionType),
|
|
6709
6715
|
children: /* @__PURE__ */ Z("div", {
|
|
6710
6716
|
className: "flex w-full flex-row items-center gap-2",
|
|
6711
6717
|
children: [
|
|
6712
|
-
/* @__PURE__ */ X(
|
|
6718
|
+
/* @__PURE__ */ X(Ja, {
|
|
6713
6719
|
icon: e.icon,
|
|
6714
6720
|
color: "default"
|
|
6715
6721
|
}),
|
|
@@ -6717,21 +6723,21 @@ var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(C
|
|
|
6717
6723
|
className: "flex-1",
|
|
6718
6724
|
children: e.label
|
|
6719
6725
|
}),
|
|
6720
|
-
a ? /* @__PURE__ */ X(
|
|
6721
|
-
icon:
|
|
6726
|
+
a ? /* @__PURE__ */ X(Ja, {
|
|
6727
|
+
icon: Hs,
|
|
6722
6728
|
color: "default"
|
|
6723
6729
|
}) : null
|
|
6724
6730
|
]
|
|
6725
6731
|
})
|
|
6726
6732
|
}, e.questionType);
|
|
6727
|
-
}), u.length > 0 ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
6733
|
+
}), u.length > 0 ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Js, {}), u.map((e) => {
|
|
6728
6734
|
let i = r.find((t) => t.datasetKey === e && t.questionType === "dropdown-single");
|
|
6729
|
-
return /* @__PURE__ */ Z(
|
|
6735
|
+
return /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
6730
6736
|
className: "mx-1 px-2 data-[state=open]:rounded-sm data-[state=closed]:bg-transparent data-[state=open]:bg-f1-background-hover",
|
|
6731
6737
|
children: /* @__PURE__ */ Z("div", {
|
|
6732
6738
|
className: "flex w-full flex-row items-center gap-2",
|
|
6733
6739
|
children: [
|
|
6734
|
-
i ? /* @__PURE__ */ X(
|
|
6740
|
+
i ? /* @__PURE__ */ X(Ja, {
|
|
6735
6741
|
icon: i.icon,
|
|
6736
6742
|
color: "default"
|
|
6737
6743
|
}) : null,
|
|
@@ -6739,122 +6745,122 @@ var Bp = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(C
|
|
|
6739
6745
|
className: "flex-1 text-base font-medium",
|
|
6740
6746
|
children: i?.label ?? e
|
|
6741
6747
|
}),
|
|
6742
|
-
n === e ? /* @__PURE__ */ X(
|
|
6743
|
-
icon:
|
|
6748
|
+
n === e ? /* @__PURE__ */ X(Ja, {
|
|
6749
|
+
icon: Hs,
|
|
6744
6750
|
color: "default"
|
|
6745
6751
|
}) : null
|
|
6746
6752
|
]
|
|
6747
6753
|
})
|
|
6748
|
-
}), /* @__PURE__ */ X(
|
|
6754
|
+
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ Z(fc, { children: [a("dropdown-single") ? /* @__PURE__ */ X(Ys, {
|
|
6749
6755
|
onClick: () => o("dropdown-single", e),
|
|
6750
6756
|
children: /* @__PURE__ */ Z("div", {
|
|
6751
6757
|
className: "flex w-full flex-row items-center gap-2",
|
|
6752
6758
|
children: [
|
|
6753
|
-
/* @__PURE__ */ X(
|
|
6754
|
-
icon:
|
|
6759
|
+
/* @__PURE__ */ X(Ja, {
|
|
6760
|
+
icon: Hs,
|
|
6755
6761
|
color: "default"
|
|
6756
6762
|
}),
|
|
6757
6763
|
/* @__PURE__ */ X("span", {
|
|
6758
6764
|
className: "flex-1",
|
|
6759
6765
|
children: c("surveyFormBuilder.labels.singleSelection")
|
|
6760
6766
|
}),
|
|
6761
|
-
n === e && t === "dropdown-single" ? /* @__PURE__ */ X(
|
|
6762
|
-
icon:
|
|
6767
|
+
n === e && t === "dropdown-single" ? /* @__PURE__ */ X(Ja, {
|
|
6768
|
+
icon: Hs,
|
|
6763
6769
|
color: "default"
|
|
6764
6770
|
}) : null
|
|
6765
6771
|
]
|
|
6766
6772
|
})
|
|
6767
|
-
}) : null, a("dropdown-multi") ? /* @__PURE__ */ X(
|
|
6773
|
+
}) : null, a("dropdown-multi") ? /* @__PURE__ */ X(Ys, {
|
|
6768
6774
|
onClick: () => o("dropdown-multi", e),
|
|
6769
6775
|
children: /* @__PURE__ */ Z("div", {
|
|
6770
6776
|
className: "flex w-full flex-row items-center gap-2",
|
|
6771
6777
|
children: [
|
|
6772
|
-
/* @__PURE__ */ X(
|
|
6773
|
-
icon:
|
|
6778
|
+
/* @__PURE__ */ X(Ja, {
|
|
6779
|
+
icon: li,
|
|
6774
6780
|
color: "default"
|
|
6775
6781
|
}),
|
|
6776
6782
|
/* @__PURE__ */ X("span", {
|
|
6777
6783
|
className: "flex-1",
|
|
6778
6784
|
children: c("surveyFormBuilder.labels.multiSelection")
|
|
6779
6785
|
}),
|
|
6780
|
-
n === e && t === "dropdown-multi" ? /* @__PURE__ */ X(
|
|
6781
|
-
icon:
|
|
6786
|
+
n === e && t === "dropdown-multi" ? /* @__PURE__ */ X(Ja, {
|
|
6787
|
+
icon: Hs,
|
|
6782
6788
|
color: "default"
|
|
6783
6789
|
}) : null
|
|
6784
6790
|
]
|
|
6785
6791
|
})
|
|
6786
6792
|
}) : null] }) })] }, e);
|
|
6787
6793
|
})] }) : null] }) })] });
|
|
6788
|
-
}, Hp = ({ label: e, icon: t, onClick: n, critical: r }) => /* @__PURE__ */ X(
|
|
6794
|
+
}, Hp = ({ label: e, icon: t, onClick: n, critical: r }) => /* @__PURE__ */ X(Ys, {
|
|
6789
6795
|
onClick: n,
|
|
6790
|
-
className:
|
|
6796
|
+
className: B(r ? "text-f1-foreground-critical" : void 0),
|
|
6791
6797
|
children: /* @__PURE__ */ Z("div", {
|
|
6792
6798
|
className: "flex w-full flex-row items-center gap-2",
|
|
6793
|
-
children: [/* @__PURE__ */ X(
|
|
6799
|
+
children: [/* @__PURE__ */ X(Ja, { icon: t }), /* @__PURE__ */ X("span", {
|
|
6794
6800
|
className: "flex-1",
|
|
6795
6801
|
children: e
|
|
6796
6802
|
})]
|
|
6797
6803
|
})
|
|
6798
6804
|
}), Up = ({ showDuplicate: e, showDelete: t, withSeparator: n, onDuplicate: r, onDelete: i }) => {
|
|
6799
|
-
let { t: a } =
|
|
6800
|
-
return !e && !t ? null : /* @__PURE__ */ Z(Y, { children: [n ? /* @__PURE__ */ X(
|
|
6805
|
+
let { t: a } = z(), { labels: o } = Dp();
|
|
6806
|
+
return !e && !t ? null : /* @__PURE__ */ Z(Y, { children: [n ? /* @__PURE__ */ X(Js, {}) : null, /* @__PURE__ */ Z(ac, { children: [e ? /* @__PURE__ */ X(Hp, {
|
|
6801
6807
|
label: o?.duplicateQuestion ?? a("surveyFormBuilder.actions.duplicateQuestion"),
|
|
6802
|
-
icon:
|
|
6808
|
+
icon: ba,
|
|
6803
6809
|
onClick: r
|
|
6804
6810
|
}) : null, t ? /* @__PURE__ */ X(Hp, {
|
|
6805
6811
|
label: o?.deleteQuestion ?? a("surveyFormBuilder.actions.deleteQuestion"),
|
|
6806
|
-
icon:
|
|
6812
|
+
icon: xi,
|
|
6807
6813
|
onClick: i,
|
|
6808
6814
|
critical: !0
|
|
6809
6815
|
}) : null] })] });
|
|
6810
6816
|
};
|
|
6811
6817
|
function Wp({ open: e, setOpen: t, questionId: n, questionType: r, canDeleteQuestion: i = !0, hiddenActions: a }) {
|
|
6812
|
-
let { t: o } =
|
|
6818
|
+
let { t: o } = z(), { isQuestionTypeAllowed: s, labels: c } = Dp(), { question: l, questionTypes: u, currentRatingType: d, currentDatasetKey: f, isMultiSelectEnabled: p, isAllowCreateEnabled: m, datasetHasOnCreate: h, disallowOptionalQuestions: g, handleChangeRequired: _, handleSelectQuestionType: v, handleSelectRatingType: y, handleToggleMultiSelect: b, handleToggleAllowCreate: x, handleDuplicate: S, handleDelete: C } = zp({
|
|
6813
6819
|
questionId: n,
|
|
6814
6820
|
questionType: r,
|
|
6815
6821
|
canDelete: i
|
|
6816
6822
|
}), w = (e) => a?.includes(e) ?? !1, T = !g && !w("required"), E = !!f && !w("multiSelect"), D = !!f && h && r === "dropdown-single" && !w("allowCreate"), O = !w("questionType"), k = !w("duplicate"), A = i && !w("delete");
|
|
6817
|
-
return !T && !E && !D && !O && !k && !A ? null : /* @__PURE__ */ Z(
|
|
6823
|
+
return !T && !E && !D && !O && !k && !A ? null : /* @__PURE__ */ Z(oc, {
|
|
6818
6824
|
open: e,
|
|
6819
6825
|
onOpenChange: t,
|
|
6820
|
-
children: [/* @__PURE__ */ X(
|
|
6826
|
+
children: [/* @__PURE__ */ X(qs, {
|
|
6821
6827
|
tabIndex: -1,
|
|
6822
6828
|
asChild: !0,
|
|
6823
|
-
children: /* @__PURE__ */ X(
|
|
6824
|
-
icon:
|
|
6829
|
+
children: /* @__PURE__ */ X(V, {
|
|
6830
|
+
icon: ma,
|
|
6825
6831
|
label: o("surveyFormBuilder.labels.actions"),
|
|
6826
6832
|
size: "md",
|
|
6827
6833
|
variant: "ghost",
|
|
6828
6834
|
tooltip: !1,
|
|
6829
6835
|
hideLabel: !0
|
|
6830
6836
|
})
|
|
6831
|
-
}), /* @__PURE__ */ Z(
|
|
6837
|
+
}), /* @__PURE__ */ Z(Gs, {
|
|
6832
6838
|
className: "w-80",
|
|
6833
6839
|
align: "start",
|
|
6834
6840
|
children: [
|
|
6835
|
-
/* @__PURE__ */ X(
|
|
6841
|
+
/* @__PURE__ */ X(Xs, {
|
|
6836
6842
|
className: "p-4 pb-2 font-medium text-f1-foreground-secondary",
|
|
6837
6843
|
children: c?.questionOptions ?? o("surveyFormBuilder.labels.questionOptions")
|
|
6838
6844
|
}),
|
|
6839
|
-
T ? /* @__PURE__ */ X(
|
|
6845
|
+
T ? /* @__PURE__ */ X(ac, { children: /* @__PURE__ */ X(Bp, {
|
|
6840
6846
|
label: o("surveyFormBuilder.labels.required"),
|
|
6841
|
-
icon:
|
|
6847
|
+
icon: Na,
|
|
6842
6848
|
checked: !!l?.required,
|
|
6843
6849
|
onChange: _
|
|
6844
6850
|
}) }) : null,
|
|
6845
|
-
E ? /* @__PURE__ */ X(
|
|
6851
|
+
E ? /* @__PURE__ */ X(ac, { children: /* @__PURE__ */ X(Bp, {
|
|
6846
6852
|
label: o("surveyFormBuilder.labels.allowMultiSelection"),
|
|
6847
|
-
icon:
|
|
6853
|
+
icon: li,
|
|
6848
6854
|
checked: p,
|
|
6849
6855
|
onChange: b
|
|
6850
6856
|
}) }) : null,
|
|
6851
|
-
D ? /* @__PURE__ */ X(
|
|
6857
|
+
D ? /* @__PURE__ */ X(ac, { children: /* @__PURE__ */ X(Bp, {
|
|
6852
6858
|
label: o("surveyFormBuilder.labels.allowCreate"),
|
|
6853
|
-
icon:
|
|
6859
|
+
icon: is,
|
|
6854
6860
|
checked: m,
|
|
6855
6861
|
onChange: x
|
|
6856
6862
|
}) }) : null,
|
|
6857
|
-
O ? /* @__PURE__ */ X(
|
|
6863
|
+
O ? /* @__PURE__ */ X(ac, { children: /* @__PURE__ */ X(Vp, {
|
|
6858
6864
|
label: c?.questionType ?? o("surveyFormBuilder.labels.questionType"),
|
|
6859
6865
|
value: r,
|
|
6860
6866
|
currentDatasetKey: f,
|
|
@@ -6882,13 +6888,13 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
6882
6888
|
className: t,
|
|
6883
6889
|
children: n
|
|
6884
6890
|
});
|
|
6885
|
-
return e ? /* @__PURE__ */ X(
|
|
6891
|
+
return e ? /* @__PURE__ */ X(qn, {
|
|
6886
6892
|
instant: !0,
|
|
6887
6893
|
...e,
|
|
6888
6894
|
children: r
|
|
6889
6895
|
}) : r;
|
|
6890
6896
|
}, Kp = ({ id: e, title: t, description: n, children: r, required: i, type: a, hiddenActions: o, locked: s, lockedFields: c, lockedNote: l }) => {
|
|
6891
|
-
let { onQuestionChange: u, onAddNewElement: d, disabled: f, answering: p, getIsSingleQuestionInSection: m, getSectionContainingQuestion: h, isQuestionTypeAllowed: g, placeholders: _, labels: v } = Dp(), 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 } = Ap(), { t: A } =
|
|
6897
|
+
let { onQuestionChange: u, onAddNewElement: d, disabled: f, answering: p, getIsSingleQuestionInSection: m, getSectionContainingQuestion: h, isQuestionTypeAllowed: g, placeholders: _, labels: v } = Dp(), 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 } = Ap(), { t: A } = z(), j = _?.questionTitle ?? A("surveyFormBuilder.labels.titlePlaceholder"), M = v?.addQuestion ?? A("surveyFormBuilder.actions.addQuestion"), N = _?.questionDescription ?? A("surveyFormBuilder.labels.questionDescriptionPlaceholder"), P = (t) => {
|
|
6892
6898
|
u?.({
|
|
6893
6899
|
id: e,
|
|
6894
6900
|
type: a,
|
|
@@ -6918,7 +6924,7 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
6918
6924
|
let se = f || x || p, L = f || S || p, ce = !L || !!n, le = b || C ? { description: l?.description ?? y?.lockedNote?.description ?? A("surveyFormBuilder.labels.lockedQuestionNotice") } : null;
|
|
6919
6925
|
return /* @__PURE__ */ Z("div", {
|
|
6920
6926
|
id: `co-creation-question-${e}`,
|
|
6921
|
-
className:
|
|
6927
|
+
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"),
|
|
6922
6928
|
children: [
|
|
6923
6929
|
/* @__PURE__ */ Z("div", {
|
|
6924
6930
|
className: "flex flex-col gap-0.5",
|
|
@@ -6941,25 +6947,25 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
6941
6947
|
placeholder: j,
|
|
6942
6948
|
onChange: P,
|
|
6943
6949
|
disabled: se,
|
|
6944
|
-
className:
|
|
6950
|
+
className: B("w-full [field-sizing:content] resize-none px-2 py-1 text-lg font-semibold text-f1-foreground placeholder:text-f1-foreground-tertiary [&::-webkit-search-cancel-button]:hidden", !p && se && "!cursor-not-allowed")
|
|
6945
6951
|
}), /* @__PURE__ */ Z("div", {
|
|
6946
6952
|
className: "textarea-overlay pointer-events-none absolute left-0 top-0 h-full w-full whitespace-pre-wrap break-words px-2 py-1 text-lg font-semibold",
|
|
6947
6953
|
children: [/* @__PURE__ */ X("span", {
|
|
6948
6954
|
className: "opacity-0",
|
|
6949
6955
|
children: t || j
|
|
6950
6956
|
}), i ? /* @__PURE__ */ Z("span", {
|
|
6951
|
-
className:
|
|
6957
|
+
className: B("text-f1-foreground-critical", !t && "text-f1-foreground-secondary"),
|
|
6952
6958
|
children: [" ", "*"]
|
|
6953
6959
|
}) : null]
|
|
6954
6960
|
})] })
|
|
6955
6961
|
}),
|
|
6956
|
-
!p && b ? /* @__PURE__ */ X("div", { children: le ? /* @__PURE__ */ X(
|
|
6962
|
+
!p && b ? /* @__PURE__ */ X("div", { children: le ? /* @__PURE__ */ X(qn, {
|
|
6957
6963
|
instant: !0,
|
|
6958
6964
|
...le,
|
|
6959
6965
|
children: /* @__PURE__ */ X("span", {
|
|
6960
6966
|
className: "inline-flex",
|
|
6961
|
-
children: /* @__PURE__ */ X(
|
|
6962
|
-
icon:
|
|
6967
|
+
children: /* @__PURE__ */ X(V, {
|
|
6968
|
+
icon: Us,
|
|
6963
6969
|
label: A("surveyFormBuilder.labels.locked"),
|
|
6964
6970
|
size: "md",
|
|
6965
6971
|
variant: "ghost",
|
|
@@ -6969,8 +6975,8 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
6969
6975
|
withoutDisabledAppearance: !0
|
|
6970
6976
|
})
|
|
6971
6977
|
})
|
|
6972
|
-
}) : /* @__PURE__ */ X(
|
|
6973
|
-
icon:
|
|
6978
|
+
}) : /* @__PURE__ */ X(V, {
|
|
6979
|
+
icon: Us,
|
|
6974
6980
|
label: A("surveyFormBuilder.labels.locked"),
|
|
6975
6981
|
size: "md",
|
|
6976
6982
|
variant: "ghost",
|
|
@@ -6980,7 +6986,7 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
6980
6986
|
withoutDisabledAppearance: !0
|
|
6981
6987
|
}) }) : null,
|
|
6982
6988
|
!f && !p && !b ? /* @__PURE__ */ X("div", {
|
|
6983
|
-
className:
|
|
6989
|
+
className: B("opacity-0 group-hover/question:opacity-100", D && "opacity-100"),
|
|
6984
6990
|
children: /* @__PURE__ */ X(Wp, {
|
|
6985
6991
|
open: D,
|
|
6986
6992
|
setOpen: O,
|
|
@@ -7002,7 +7008,7 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
7002
7008
|
placeholder: N,
|
|
7003
7009
|
onChange: F,
|
|
7004
7010
|
disabled: L,
|
|
7005
|
-
className:
|
|
7011
|
+
className: B("w-full [field-sizing:content] resize-none px-2 text-f1-foreground-secondary placeholder:text-f1-foreground-tertiary disabled:text-f1-foreground-secondary [&::-webkit-search-cancel-button]:hidden", !p && L && "!cursor-not-allowed")
|
|
7006
7012
|
})
|
|
7007
7013
|
}) : null]
|
|
7008
7014
|
}),
|
|
@@ -7012,41 +7018,41 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
7012
7018
|
fallback: A(i ? "forms.validation.required" : "forms.validation.invalidType")
|
|
7013
7019
|
}) : null,
|
|
7014
7020
|
!f && !p && !b ? /* @__PURE__ */ X("div", {
|
|
7015
|
-
className:
|
|
7016
|
-
children: /* @__PURE__ */ Z(
|
|
7021
|
+
className: B("absolute bottom-0 left-1/2 translate-x-[-50%] translate-y-[50%] bg-f1-background opacity-0 group-hover/question:opacity-100", T && "opacity-100"),
|
|
7022
|
+
children: /* @__PURE__ */ Z(oc, {
|
|
7017
7023
|
open: T,
|
|
7018
7024
|
onOpenChange: E,
|
|
7019
|
-
children: [/* @__PURE__ */ X(
|
|
7025
|
+
children: [/* @__PURE__ */ X(qs, {
|
|
7020
7026
|
asChild: !0,
|
|
7021
|
-
children: /* @__PURE__ */ X(
|
|
7022
|
-
icon:
|
|
7027
|
+
children: /* @__PURE__ */ X(V, {
|
|
7028
|
+
icon: so,
|
|
7023
7029
|
label: M,
|
|
7024
7030
|
size: "sm",
|
|
7025
7031
|
variant: "outline",
|
|
7026
7032
|
hideLabel: !0
|
|
7027
7033
|
})
|
|
7028
|
-
}), /* @__PURE__ */ Z(
|
|
7034
|
+
}), /* @__PURE__ */ Z(Gs, {
|
|
7029
7035
|
align: "center",
|
|
7030
7036
|
className: "w-80",
|
|
7031
7037
|
children: [
|
|
7032
|
-
w ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
7038
|
+
w ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Ys, {
|
|
7033
7039
|
onClick: ee,
|
|
7034
7040
|
children: /* @__PURE__ */ Z("div", {
|
|
7035
7041
|
className: "flex w-full flex-row items-center gap-2",
|
|
7036
|
-
children: [/* @__PURE__ */ X(
|
|
7037
|
-
icon:
|
|
7042
|
+
children: [/* @__PURE__ */ X(H, {
|
|
7043
|
+
icon: xa,
|
|
7038
7044
|
color: "default"
|
|
7039
7045
|
}), /* @__PURE__ */ X("span", {
|
|
7040
7046
|
className: "flex-1 text-base font-medium",
|
|
7041
7047
|
children: A("surveyFormBuilder.questionTypes.section")
|
|
7042
7048
|
})]
|
|
7043
7049
|
})
|
|
7044
|
-
}), /* @__PURE__ */ X(
|
|
7045
|
-
ne.map((e) => /* @__PURE__ */ X(
|
|
7050
|
+
}), /* @__PURE__ */ X(Js, {})] }),
|
|
7051
|
+
ne.map((e) => /* @__PURE__ */ X(Ys, {
|
|
7046
7052
|
onClick: () => I(e.questionType),
|
|
7047
7053
|
children: /* @__PURE__ */ Z("div", {
|
|
7048
7054
|
className: "flex w-full flex-row items-center gap-2",
|
|
7049
|
-
children: [/* @__PURE__ */ X(
|
|
7055
|
+
children: [/* @__PURE__ */ X(H, {
|
|
7050
7056
|
icon: e.icon,
|
|
7051
7057
|
color: "default"
|
|
7052
7058
|
}), /* @__PURE__ */ X("span", {
|
|
@@ -7055,13 +7061,13 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
7055
7061
|
})]
|
|
7056
7062
|
})
|
|
7057
7063
|
}, e.questionType)),
|
|
7058
|
-
re.length > 0 ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
7064
|
+
re.length > 0 ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Js, {}), re.map((e) => {
|
|
7059
7065
|
let t = te.find((t) => t.datasetKey === e && t.questionType === "dropdown-single");
|
|
7060
|
-
return /* @__PURE__ */ Z(
|
|
7066
|
+
return /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
7061
7067
|
className: "mx-1 px-2 data-[state=open]:rounded-sm data-[state=closed]:bg-transparent data-[state=open]:bg-f1-background-hover",
|
|
7062
7068
|
children: /* @__PURE__ */ Z("div", {
|
|
7063
7069
|
className: "flex w-full flex-row items-center gap-2",
|
|
7064
|
-
children: [t ? /* @__PURE__ */ X(
|
|
7070
|
+
children: [t ? /* @__PURE__ */ X(H, {
|
|
7065
7071
|
icon: t.icon,
|
|
7066
7072
|
color: "default"
|
|
7067
7073
|
}) : null, /* @__PURE__ */ X("span", {
|
|
@@ -7069,24 +7075,24 @@ var Gp = ({ notice: e, className: t, children: n }) => {
|
|
|
7069
7075
|
children: t?.label ?? e
|
|
7070
7076
|
})]
|
|
7071
7077
|
})
|
|
7072
|
-
}), /* @__PURE__ */ X(
|
|
7078
|
+
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ Z(fc, { children: [g("dropdown-single") ? /* @__PURE__ */ X(Ys, {
|
|
7073
7079
|
onClick: () => I("dropdown-single", e),
|
|
7074
7080
|
children: /* @__PURE__ */ Z("div", {
|
|
7075
7081
|
className: "flex w-full flex-row items-center gap-2",
|
|
7076
|
-
children: [/* @__PURE__ */ X(
|
|
7077
|
-
icon:
|
|
7082
|
+
children: [/* @__PURE__ */ X(H, {
|
|
7083
|
+
icon: Hs,
|
|
7078
7084
|
color: "default"
|
|
7079
7085
|
}), /* @__PURE__ */ X("span", {
|
|
7080
7086
|
className: "flex-1",
|
|
7081
7087
|
children: A("surveyFormBuilder.labels.singleSelection")
|
|
7082
7088
|
})]
|
|
7083
7089
|
})
|
|
7084
|
-
}) : null, g("dropdown-multi") ? /* @__PURE__ */ X(
|
|
7090
|
+
}) : null, g("dropdown-multi") ? /* @__PURE__ */ X(Ys, {
|
|
7085
7091
|
onClick: () => I("dropdown-multi", e),
|
|
7086
7092
|
children: /* @__PURE__ */ Z("div", {
|
|
7087
7093
|
className: "flex w-full flex-row items-center gap-2",
|
|
7088
|
-
children: [/* @__PURE__ */ X(
|
|
7089
|
-
icon:
|
|
7094
|
+
children: [/* @__PURE__ */ X(H, {
|
|
7095
|
+
icon: li,
|
|
7090
7096
|
color: "default"
|
|
7091
7097
|
}), /* @__PURE__ */ X("span", {
|
|
7092
7098
|
className: "flex-1",
|
|
@@ -7111,10 +7117,10 @@ function qp(e) {
|
|
|
7111
7117
|
//#endregion
|
|
7112
7118
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/QuestionTypes/CheckboxQuestion/CheckboxQuestion.tsx
|
|
7113
7119
|
var Jp = ({ value: e, label: t, ...n }) => {
|
|
7114
|
-
let { onQuestionChange: r, answering: i, disabled: a, getSectionContainingQuestion: o } = Dp(), s = qp(n), { t: c } =
|
|
7120
|
+
let { onQuestionChange: r, answering: i, disabled: a, getSectionContainingQuestion: o } = Dp(), s = qp(n), { t: c } = z();
|
|
7115
7121
|
if (i) return /* @__PURE__ */ X(Kp, {
|
|
7116
7122
|
...n,
|
|
7117
|
-
children: /* @__PURE__ */ X(
|
|
7123
|
+
children: /* @__PURE__ */ X(rs, {
|
|
7118
7124
|
id: n.id,
|
|
7119
7125
|
checked: e ?? !1,
|
|
7120
7126
|
onCheckedChange: (e) => {
|
|
@@ -7134,7 +7140,7 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7134
7140
|
...n,
|
|
7135
7141
|
children: /* @__PURE__ */ Z("div", {
|
|
7136
7142
|
className: "flex items-start",
|
|
7137
|
-
children: [/* @__PURE__ */ X(
|
|
7143
|
+
children: [/* @__PURE__ */ X(rs, {
|
|
7138
7144
|
checked: !1,
|
|
7139
7145
|
disabled: !0,
|
|
7140
7146
|
hideLabel: !0,
|
|
@@ -7151,12 +7157,12 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7151
7157
|
});
|
|
7152
7158
|
},
|
|
7153
7159
|
disabled: !!l,
|
|
7154
|
-
className:
|
|
7160
|
+
className: B("w-full [field-sizing:content] resize-none bg-transparent pt-0.5 pl-2.5 text-f1-foreground-secondary outline-none placeholder:text-f1-foreground-tertiary", l && "cursor-not-allowed opacity-50")
|
|
7155
7161
|
})]
|
|
7156
7162
|
})
|
|
7157
7163
|
});
|
|
7158
7164
|
}, Yp = ({ value: e, ...t }) => {
|
|
7159
|
-
let { onQuestionChange: n } = Dp(), r = qp(t), { t: i } =
|
|
7165
|
+
let { onQuestionChange: n } = Dp(), r = qp(t), { t: i } = z(), a = {
|
|
7160
7166
|
id: t.id,
|
|
7161
7167
|
type: "date",
|
|
7162
7168
|
label: i("surveyFormBuilder.answer.label"),
|
|
@@ -7179,7 +7185,7 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7179
7185
|
})
|
|
7180
7186
|
});
|
|
7181
7187
|
}, Xp = ({ datasetKey: e, showSearchBox: t, searchBoxPlaceholder: n, ...r }) => {
|
|
7182
|
-
let { onQuestionChange: i, answering: a, datasets: o } = Dp(), s = qp(r), { t: c } =
|
|
7188
|
+
let { onQuestionChange: i, answering: a, datasets: o } = Dp(), s = qp(r), { t: c } = z(), l = o?.[e];
|
|
7183
7189
|
if (!l) throw Error(`Dataset "${e}" not found for ${r.type}`);
|
|
7184
7190
|
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) => {
|
|
7185
7191
|
try {
|
|
@@ -7249,7 +7255,7 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7249
7255
|
progress: 0,
|
|
7250
7256
|
status: "idle"
|
|
7251
7257
|
}), $p = ({ value: e, useUpload: t, accept: n, maxSizeMB: r, ...i }) => {
|
|
7252
|
-
let { onQuestionChange: a, useUpload: o } = Dp(), s = qp(i), { t: c } =
|
|
7258
|
+
let { onQuestionChange: a, useUpload: o } = Dp(), s = qp(i), { t: c } = z(), l = t ?? o, u = {
|
|
7253
7259
|
id: i.id,
|
|
7254
7260
|
type: "file",
|
|
7255
7261
|
label: c("surveyFormBuilder.answer.label"),
|
|
@@ -7275,7 +7281,7 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7275
7281
|
})
|
|
7276
7282
|
});
|
|
7277
7283
|
}, em = ({ value: e, ...t }) => {
|
|
7278
|
-
let { t: n } =
|
|
7284
|
+
let { t: n } = z(), { onQuestionChange: r, answering: i } = Dp(), a = qp(t), o = n("surveyFormBuilder.answer.linkPlaceholder"), s = {
|
|
7279
7285
|
id: t.id,
|
|
7280
7286
|
type: "text",
|
|
7281
7287
|
inputType: "url",
|
|
@@ -7300,7 +7306,7 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7300
7306
|
})
|
|
7301
7307
|
});
|
|
7302
7308
|
}, tm = ({ value: e, ...t }) => {
|
|
7303
|
-
let { t: n } =
|
|
7309
|
+
let { t: n } = z(), { onQuestionChange: r, answering: i } = Dp(), a = qp(t), o = (e) => {
|
|
7304
7310
|
r?.({
|
|
7305
7311
|
...t,
|
|
7306
7312
|
type: "numeric",
|
|
@@ -7320,8 +7326,8 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7320
7326
|
required: t.required,
|
|
7321
7327
|
maxDecimals: 0,
|
|
7322
7328
|
placeholder: s,
|
|
7323
|
-
icon:
|
|
7324
|
-
}) : /* @__PURE__ */ X(
|
|
7329
|
+
icon: zi
|
|
7330
|
+
}) : /* @__PURE__ */ X(Di, {
|
|
7325
7331
|
type: "text",
|
|
7326
7332
|
size: "md",
|
|
7327
7333
|
value: s,
|
|
@@ -7329,7 +7335,7 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7329
7335
|
disabled: !0,
|
|
7330
7336
|
label: n("surveyFormBuilder.answer.label"),
|
|
7331
7337
|
hideLabel: !0,
|
|
7332
|
-
icon:
|
|
7338
|
+
icon: zi
|
|
7333
7339
|
})
|
|
7334
7340
|
});
|
|
7335
7341
|
}, nm = ({ option: e, selected: t, onClick: n, onChangeLabel: r, disabled: i, isEmojiMode: a = !1 }) => {
|
|
@@ -7338,16 +7344,16 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7338
7344
|
i && l(!1);
|
|
7339
7345
|
}, [i]), /* @__PURE__ */ X("div", {
|
|
7340
7346
|
"data-testid": `score-edit-option-${o}`,
|
|
7341
|
-
className:
|
|
7347
|
+
className: B("group relative flex min-h-10 min-w-20 flex-1 items-center justify-center rounded-md border border-solid border-f1-border px-3 py-1.5 text-center font-medium", t && "border-f1-border-selected bg-f1-background-selected-secondary", i ? "cursor-default" : "cursor-pointer"),
|
|
7342
7348
|
onClick: () => {
|
|
7343
7349
|
i || n(o);
|
|
7344
7350
|
},
|
|
7345
|
-
children: a ? /* @__PURE__ */ Z(
|
|
7351
|
+
children: a ? /* @__PURE__ */ Z(uc, {
|
|
7346
7352
|
open: !i && c,
|
|
7347
7353
|
onOpenChange: i ? void 0 : l,
|
|
7348
|
-
children: [/* @__PURE__ */ X(
|
|
7354
|
+
children: [/* @__PURE__ */ X($s, {
|
|
7349
7355
|
asChild: !0,
|
|
7350
|
-
children: /* @__PURE__ */ X(
|
|
7356
|
+
children: /* @__PURE__ */ X(V, {
|
|
7351
7357
|
emoji: s,
|
|
7352
7358
|
label: o.toString(),
|
|
7353
7359
|
variant: "ghost",
|
|
@@ -7355,7 +7361,7 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7355
7361
|
withoutDisabledAppearance: !0,
|
|
7356
7362
|
hideLabel: !0
|
|
7357
7363
|
})
|
|
7358
|
-
}), /* @__PURE__ */ X(
|
|
7364
|
+
}), /* @__PURE__ */ X(ic, {
|
|
7359
7365
|
side: "bottom",
|
|
7360
7366
|
align: "center",
|
|
7361
7367
|
className: "w-fit border-none bg-transparent p-2 shadow-none",
|
|
@@ -7420,7 +7426,7 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7420
7426
|
children: /* @__PURE__ */ Z("div", {
|
|
7421
7427
|
className: "flex flex-col gap-3",
|
|
7422
7428
|
children: [/* @__PURE__ */ X("div", {
|
|
7423
|
-
className:
|
|
7429
|
+
className: B(u ? "flex gap-3 [&>*]:min-w-0" : "grid grid-cols-3 gap-3 @md:grid-cols-5"),
|
|
7424
7430
|
children: e.map((e) => /* @__PURE__ */ X(nm, {
|
|
7425
7431
|
option: e,
|
|
7426
7432
|
selected: t === e.value,
|
|
@@ -7444,12 +7450,12 @@ var Jp = ({ value: e, label: t, ...n }) => {
|
|
|
7444
7450
|
function om({ checked: e, disabled: t }) {
|
|
7445
7451
|
return /* @__PURE__ */ X("div", {
|
|
7446
7452
|
"aria-hidden": "true",
|
|
7447
|
-
className:
|
|
7453
|
+
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"),
|
|
7448
7454
|
children: e ? /* @__PURE__ */ X("div", { className: "h-2 w-2 rounded-full bg-f1-background" }) : null
|
|
7449
7455
|
});
|
|
7450
7456
|
}
|
|
7451
7457
|
var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i, disabled: a, answering: o, selected: s, correct: c, locked: l, type: u }) => {
|
|
7452
|
-
let { value: d, label: f } = t, { isDragging: p, setIsDragging: m, setDraggedItemId: h, draggedItemId: g } = Ap(), { t: _ } =
|
|
7458
|
+
let { value: d, label: f } = t, { isDragging: p, setIsDragging: m, setDraggedItemId: h, draggedItemId: g } = Ap(), { t: _ } = z(), v = p && g === d, y = () => {
|
|
7453
7459
|
(a || o) && n(d);
|
|
7454
7460
|
}, b = (t) => {
|
|
7455
7461
|
r({
|
|
@@ -7481,12 +7487,12 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7481
7487
|
layout: "position",
|
|
7482
7488
|
as: "div",
|
|
7483
7489
|
children: /* @__PURE__ */ Z("div", {
|
|
7484
|
-
className:
|
|
7490
|
+
className: B("group relative flex min-h-9 items-center gap-3 rounded-md bg-f1-background py-0.5 pl-2 pr-0.5 hover:bg-f1-background-hover", (a || o) && "cursor-pointer", p && "!cursor-grabbing active:!cursor-grabbing"),
|
|
7485
7491
|
onClick: y,
|
|
7486
7492
|
children: [
|
|
7487
7493
|
/* @__PURE__ */ X("div", {
|
|
7488
|
-
className:
|
|
7489
|
-
children: u === "multi-select" ? /* @__PURE__ */ X(
|
|
7494
|
+
className: B("block", E ? "group-hover:hidden" : "cursor-default", p && "cursor-grabbing [&_button]:cursor-grabbing"),
|
|
7495
|
+
children: u === "multi-select" ? /* @__PURE__ */ X(rs, {
|
|
7490
7496
|
title: f,
|
|
7491
7497
|
checked: o ? !!s : !1,
|
|
7492
7498
|
onCheckedChange: y,
|
|
@@ -7499,11 +7505,11 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7499
7505
|
})
|
|
7500
7506
|
}),
|
|
7501
7507
|
/* @__PURE__ */ X("div", {
|
|
7502
|
-
className:
|
|
7508
|
+
className: B("hidden scale-75 cursor-grab", D && "active:cursor-grabbing", E && "group-hover:block", p && "cursor-grabbing", !D && "cursor-not-allowed"),
|
|
7503
7509
|
children: /* @__PURE__ */ X("div", {
|
|
7504
|
-
className:
|
|
7505
|
-
children: /* @__PURE__ */ X(
|
|
7506
|
-
icon:
|
|
7510
|
+
className: B("flex aspect-square scale-90 items-center justify-center", u === "multi-select" ? "w-6" : "w-5"),
|
|
7511
|
+
children: /* @__PURE__ */ X(Ja, {
|
|
7512
|
+
icon: ua,
|
|
7507
7513
|
size: "sm"
|
|
7508
7514
|
})
|
|
7509
7515
|
})
|
|
@@ -7523,16 +7529,16 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7523
7529
|
}) : null,
|
|
7524
7530
|
!a && !o && !l ? /* @__PURE__ */ Z("div", {
|
|
7525
7531
|
className: "hidden flex-row items-center gap-1 group-hover:inline-block",
|
|
7526
|
-
children: [/* @__PURE__ */ X(
|
|
7532
|
+
children: [/* @__PURE__ */ X(V, {
|
|
7527
7533
|
label: _("surveyFormBuilder.selectQuestion.markAsCorrect"),
|
|
7528
7534
|
variant: "ghost",
|
|
7529
|
-
icon: c ?
|
|
7535
|
+
icon: c ? ji : yi,
|
|
7530
7536
|
onClick: x,
|
|
7531
7537
|
hideLabel: !0
|
|
7532
|
-
}), /* @__PURE__ */ X(
|
|
7538
|
+
}), /* @__PURE__ */ X(V, {
|
|
7533
7539
|
label: _("surveyFormBuilder.selectQuestion.remove"),
|
|
7534
7540
|
variant: "ghost",
|
|
7535
|
-
icon:
|
|
7541
|
+
icon: xi,
|
|
7536
7542
|
hideLabel: !0,
|
|
7537
7543
|
onClick: S
|
|
7538
7544
|
})]
|
|
@@ -7541,7 +7547,7 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7541
7547
|
})
|
|
7542
7548
|
});
|
|
7543
7549
|
}, cm = ({ options: e, ...t }) => {
|
|
7544
|
-
let { onQuestionChange: n, disabled: r, answering: i, getSectionContainingQuestion: a } = Dp(), o = new Set(e.map((e) => e.value)).size !== e.length, s = a(t.id)?.locked || t.locked, { t: c } =
|
|
7550
|
+
let { onQuestionChange: n, disabled: r, answering: i, getSectionContainingQuestion: a } = Dp(), o = new Set(e.map((e) => e.value)).size !== e.length, s = a(t.id)?.locked || t.locked, { t: c } = z(), l = K(() => ({
|
|
7545
7551
|
id: t.id,
|
|
7546
7552
|
type: t.type,
|
|
7547
7553
|
options: e
|
|
@@ -7658,17 +7664,17 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7658
7664
|
})
|
|
7659
7665
|
}) }), !r && !i && !s ? /* @__PURE__ */ X("div", {
|
|
7660
7666
|
className: "opacity-70",
|
|
7661
|
-
children: /* @__PURE__ */ X(
|
|
7667
|
+
children: /* @__PURE__ */ X(V, {
|
|
7662
7668
|
label: c("surveyFormBuilder.selectQuestion.addOption"),
|
|
7663
7669
|
variant: "ghost",
|
|
7664
|
-
icon:
|
|
7670
|
+
icon: so,
|
|
7665
7671
|
onClick: p
|
|
7666
7672
|
})
|
|
7667
7673
|
}) : null]
|
|
7668
7674
|
})
|
|
7669
7675
|
});
|
|
7670
7676
|
}, lm = ({ value: e, ...t }) => {
|
|
7671
|
-
let { onQuestionChange: n, answering: r, placeholders: i } = Dp(), a = qp(t), { t: o } =
|
|
7677
|
+
let { onQuestionChange: n, answering: r, placeholders: i } = Dp(), a = qp(t), { t: o } = z(), s = i?.answer ?? o("surveyFormBuilder.answer.textPlaceholder"), c = K(() => t.type === "text" ? {
|
|
7672
7678
|
id: t.id,
|
|
7673
7679
|
type: "text",
|
|
7674
7680
|
label: o("surveyFormBuilder.answer.label"),
|
|
@@ -7719,7 +7725,7 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7719
7725
|
default: throw Error("Invalid question type provided");
|
|
7720
7726
|
}
|
|
7721
7727
|
}, dm = () => {
|
|
7722
|
-
let { t: e } =
|
|
7728
|
+
let { t: e } = z();
|
|
7723
7729
|
return /* @__PURE__ */ Z("div", {
|
|
7724
7730
|
className: "mt-8 ml-7 flex flex-row items-center gap-4",
|
|
7725
7731
|
children: [
|
|
@@ -7745,21 +7751,21 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7745
7751
|
dragControls: c,
|
|
7746
7752
|
layout: "position",
|
|
7747
7753
|
as: "div",
|
|
7748
|
-
className:
|
|
7754
|
+
className: B(r, d && "invisible h-0 overflow-hidden"),
|
|
7749
7755
|
children: [/* @__PURE__ */ X("div", {
|
|
7750
7756
|
className: "w-full",
|
|
7751
7757
|
children: /* @__PURE__ */ Z("div", {
|
|
7752
|
-
className:
|
|
7758
|
+
className: B("group/element flex flex-row items-start gap-1", !l && !u && "pr-7", i && "cursor-grabbing"),
|
|
7753
7759
|
children: [!l && !u ? m ? /* @__PURE__ */ X("div", {
|
|
7754
7760
|
className: "mt-2 aspect-square w-6 scale-75",
|
|
7755
7761
|
"aria-hidden": !0
|
|
7756
7762
|
}) : /* @__PURE__ */ X("div", {
|
|
7757
|
-
className:
|
|
7763
|
+
className: B("mt-2 flex aspect-square w-6 scale-75 items-center opacity-0 hover:opacity-40 group-hover/element:opacity-40", !i && "cursor-grab"),
|
|
7758
7764
|
onPointerDown: (e) => {
|
|
7759
7765
|
h && c.start(e);
|
|
7760
7766
|
},
|
|
7761
|
-
children: /* @__PURE__ */ X(
|
|
7762
|
-
icon:
|
|
7767
|
+
children: /* @__PURE__ */ X(H, {
|
|
7768
|
+
icon: ua,
|
|
7763
7769
|
size: "sm"
|
|
7764
7770
|
})
|
|
7765
7771
|
}) : null, /* @__PURE__ */ X(um, { ...e.question })]
|
|
@@ -7781,22 +7787,22 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7781
7787
|
dragControls: i,
|
|
7782
7788
|
layout: "position",
|
|
7783
7789
|
children: /* @__PURE__ */ Z("div", {
|
|
7784
|
-
className:
|
|
7790
|
+
className: B("group/question-element flex flex-row items-start gap-1", t && "cursor-grabbing"),
|
|
7785
7791
|
style: { marginLeft: a || o ? 0 : -27 },
|
|
7786
7792
|
children: [!a && !o ? /* @__PURE__ */ X("div", {
|
|
7787
|
-
className:
|
|
7793
|
+
className: B("mt-2 flex aspect-square w-6 scale-75 items-center opacity-0 hover:opacity-40 group-hover/question-element:opacity-40", !t && "cursor-grab", !f && "cursor-not-allowed"),
|
|
7788
7794
|
onPointerDown: (e) => {
|
|
7789
7795
|
f && i.start(e);
|
|
7790
7796
|
},
|
|
7791
|
-
children: /* @__PURE__ */ X(
|
|
7792
|
-
icon:
|
|
7797
|
+
children: /* @__PURE__ */ X(H, {
|
|
7798
|
+
icon: ua,
|
|
7793
7799
|
size: "sm"
|
|
7794
7800
|
})
|
|
7795
7801
|
}) : null, /* @__PURE__ */ X(um, { ...e })]
|
|
7796
7802
|
})
|
|
7797
7803
|
});
|
|
7798
7804
|
}, mm = ({ id: e, title: t = "", description: n, lockedNote: r, questions: i = [], locked: a, hideQuestions: o }) => {
|
|
7799
|
-
let { onSectionChange: s, disabled: c, answering: l, deleteElement: u, onDuplicateElement: d, placeholders: f } = Dp(), [p, m] = J(!1), { t: h } =
|
|
7805
|
+
let { onSectionChange: s, disabled: c, answering: l, deleteElement: u, onDuplicateElement: d, placeholders: f } = Dp(), [p, m] = J(!1), { t: h } = z(), g = f?.sectionTitle ?? h("surveyFormBuilder.labels.sectionTitlePlaceholder"), _ = K(() => ({
|
|
7800
7806
|
id: e,
|
|
7801
7807
|
title: t,
|
|
7802
7808
|
description: n
|
|
@@ -7821,7 +7827,7 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7821
7827
|
});
|
|
7822
7828
|
}, x = [{
|
|
7823
7829
|
label: h("surveyFormBuilder.actions.duplicateSection"),
|
|
7824
|
-
icon:
|
|
7830
|
+
icon: ba,
|
|
7825
7831
|
onClick: () => {
|
|
7826
7832
|
d?.({
|
|
7827
7833
|
elementId: e,
|
|
@@ -7830,7 +7836,7 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7830
7836
|
}
|
|
7831
7837
|
}, {
|
|
7832
7838
|
label: h("surveyFormBuilder.actions.deleteSection"),
|
|
7833
|
-
icon:
|
|
7839
|
+
icon: xi,
|
|
7834
7840
|
onClick: () => {
|
|
7835
7841
|
u(e);
|
|
7836
7842
|
},
|
|
@@ -7839,14 +7845,14 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7839
7845
|
G(() => {
|
|
7840
7846
|
T.current?.focus({ preventScroll: !0 });
|
|
7841
7847
|
}, []);
|
|
7842
|
-
let E = r?.description ?? h("surveyFormBuilder.labels.lockedSectionNotice"), D = a && !l ? /* @__PURE__ */ X(
|
|
7848
|
+
let E = r?.description ?? h("surveyFormBuilder.labels.lockedSectionNotice"), D = a && !l ? /* @__PURE__ */ X(ms, {
|
|
7843
7849
|
text: h("surveyFormBuilder.labels.locked"),
|
|
7844
|
-
icon:
|
|
7850
|
+
icon: Us,
|
|
7845
7851
|
className: "bg-f1-background"
|
|
7846
7852
|
}) : null;
|
|
7847
7853
|
return /* @__PURE__ */ Z("div", {
|
|
7848
7854
|
id: `co-creation-section-${e}`,
|
|
7849
|
-
className:
|
|
7855
|
+
className: B("group/section flex w-full flex-col gap-1", a && !l ? "cursor-not-allowed" : "bg-f1-background"),
|
|
7850
7856
|
children: [C || w || a && !l ? /* @__PURE__ */ Z("div", {
|
|
7851
7857
|
className: "py-1 pl-5 pr-3",
|
|
7852
7858
|
children: [C || a && !l ? /* @__PURE__ */ Z("div", {
|
|
@@ -7860,11 +7866,11 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7860
7866
|
placeholder: g,
|
|
7861
7867
|
onChange: v,
|
|
7862
7868
|
disabled: S,
|
|
7863
|
-
className:
|
|
7869
|
+
className: B("w-full text-lg font-semibold text-f1-foreground placeholder:text-f1-foreground-tertiary [&::-webkit-search-cancel-button]:hidden", S && "cursor-not-allowed")
|
|
7864
7870
|
}) : null,
|
|
7865
7871
|
D ? /* @__PURE__ */ X("div", {
|
|
7866
7872
|
className: "ml-auto flex shrink-0 items-center",
|
|
7867
|
-
children: /* @__PURE__ */ X(
|
|
7873
|
+
children: /* @__PURE__ */ X(qn, {
|
|
7868
7874
|
description: E,
|
|
7869
7875
|
instant: !0,
|
|
7870
7876
|
children: /* @__PURE__ */ X("span", {
|
|
@@ -7874,15 +7880,15 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7874
7880
|
})
|
|
7875
7881
|
}) : null,
|
|
7876
7882
|
!c && !l && !a ? /* @__PURE__ */ X("div", {
|
|
7877
|
-
className:
|
|
7878
|
-
children: /* @__PURE__ */ X(
|
|
7883
|
+
className: B("opacity-0 group-hover/section:opacity-100", p && "opacity-100"),
|
|
7884
|
+
children: /* @__PURE__ */ X(Pi, {
|
|
7879
7885
|
items: x,
|
|
7880
|
-
icon:
|
|
7886
|
+
icon: ma,
|
|
7881
7887
|
open: p,
|
|
7882
7888
|
onOpenChange: m,
|
|
7883
7889
|
align: "start",
|
|
7884
|
-
children: /* @__PURE__ */ X(
|
|
7885
|
-
icon:
|
|
7890
|
+
children: /* @__PURE__ */ X(V, {
|
|
7891
|
+
icon: ma,
|
|
7886
7892
|
label: h("surveyFormBuilder.actions.actions"),
|
|
7887
7893
|
size: "md",
|
|
7888
7894
|
variant: "ghost",
|
|
@@ -7898,7 +7904,7 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7898
7904
|
placeholder: h("surveyFormBuilder.labels.sectionDescriptionPlaceholder"),
|
|
7899
7905
|
onChange: y,
|
|
7900
7906
|
disabled: S,
|
|
7901
|
-
className:
|
|
7907
|
+
className: B("w-full [field-sizing:content] resize-none text-f1-foreground-secondary placeholder:text-f1-foreground-tertiary disabled:text-f1-foreground-secondary [&::-webkit-search-cancel-button]:hidden", S && "cursor-not-allowed")
|
|
7902
7908
|
}) : null]
|
|
7903
7909
|
}) : null, o ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(kp, { children: /* @__PURE__ */ X(Ge, {
|
|
7904
7910
|
axis: "y",
|
|
@@ -7941,17 +7947,17 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7941
7947
|
children: /* @__PURE__ */ Z("div", {
|
|
7942
7948
|
className: "group/element w-full",
|
|
7943
7949
|
children: [/* @__PURE__ */ Z("div", {
|
|
7944
|
-
className:
|
|
7950
|
+
className: B("flex flex-row items-start gap-1 w-full", !s && !c && "pr-7", n && "cursor-grabbing"),
|
|
7945
7951
|
children: [!s && !c ? e.section.locked ? /* @__PURE__ */ X("div", {
|
|
7946
7952
|
className: "mt-2 aspect-square w-6 scale-75",
|
|
7947
7953
|
"aria-hidden": !0
|
|
7948
7954
|
}) : /* @__PURE__ */ X("div", {
|
|
7949
|
-
className:
|
|
7955
|
+
className: B("mt-2 flex aspect-square w-6 scale-75 items-center opacity-0 hover:opacity-40 group-hover/element:opacity-40", !n && "cursor-grab"),
|
|
7950
7956
|
onPointerDown: (e) => {
|
|
7951
7957
|
o.start(e);
|
|
7952
7958
|
},
|
|
7953
|
-
children: /* @__PURE__ */ X(
|
|
7954
|
-
icon:
|
|
7959
|
+
children: /* @__PURE__ */ X(H, {
|
|
7960
|
+
icon: ua,
|
|
7955
7961
|
size: "sm"
|
|
7956
7962
|
})
|
|
7957
7963
|
}) : null, /* @__PURE__ */ X(mm, {
|
|
@@ -7981,7 +7987,7 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
7981
7987
|
p || x.push({
|
|
7982
7988
|
type: "toggle",
|
|
7983
7989
|
label: l,
|
|
7984
|
-
icon:
|
|
7990
|
+
icon: Na,
|
|
7985
7991
|
checked: !!r?.required,
|
|
7986
7992
|
onCheckedChange: m
|
|
7987
7993
|
});
|
|
@@ -8021,12 +8027,12 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
8021
8027
|
selectedLabel: s === e ? t === "dropdown-multi" ? f : d : void 0,
|
|
8022
8028
|
children: [{
|
|
8023
8029
|
label: d,
|
|
8024
|
-
icon:
|
|
8030
|
+
icon: Hs,
|
|
8025
8031
|
onClick: () => h("dropdown-single", e),
|
|
8026
8032
|
selected: s === e && t === "dropdown-single"
|
|
8027
8033
|
}, {
|
|
8028
8034
|
label: f,
|
|
8029
|
-
icon:
|
|
8035
|
+
icon: li,
|
|
8030
8036
|
onClick: () => h("dropdown-multi", e),
|
|
8031
8037
|
selected: s === e && t === "dropdown-multi"
|
|
8032
8038
|
}]
|
|
@@ -8040,16 +8046,16 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
8040
8046
|
return x.push({
|
|
8041
8047
|
type: "submenu",
|
|
8042
8048
|
label: u,
|
|
8043
|
-
icon:
|
|
8049
|
+
icon: aa,
|
|
8044
8050
|
selectedLabel: E,
|
|
8045
8051
|
children: w
|
|
8046
8052
|
}), x.push({ type: "separator" }), x.push({
|
|
8047
8053
|
label: i,
|
|
8048
|
-
icon:
|
|
8054
|
+
icon: ba,
|
|
8049
8055
|
onClick: y
|
|
8050
8056
|
}), n && x.push({
|
|
8051
8057
|
label: a,
|
|
8052
|
-
icon:
|
|
8058
|
+
icon: xi,
|
|
8053
8059
|
onClick: b,
|
|
8054
8060
|
critical: !0
|
|
8055
8061
|
}), x;
|
|
@@ -8070,12 +8076,12 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
8070
8076
|
return {
|
|
8071
8077
|
id: i,
|
|
8072
8078
|
label: t.title || n,
|
|
8073
|
-
icon:
|
|
8079
|
+
icon: xa,
|
|
8074
8080
|
onClick: y,
|
|
8075
8081
|
...!h && !g && !t.locked && { otherActions: [
|
|
8076
8082
|
{
|
|
8077
8083
|
label: o,
|
|
8078
|
-
icon:
|
|
8084
|
+
icon: ba,
|
|
8079
8085
|
onClick: () => m?.({
|
|
8080
8086
|
elementId: t.id,
|
|
8081
8087
|
type: "section"
|
|
@@ -8084,7 +8090,7 @@ var sm = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
8084
8090
|
{ type: "separator" },
|
|
8085
8091
|
{
|
|
8086
8092
|
label: s,
|
|
8087
|
-
icon:
|
|
8093
|
+
icon: xi,
|
|
8088
8094
|
onClick: () => p(t.id),
|
|
8089
8095
|
critical: !0
|
|
8090
8096
|
}
|
|
@@ -8151,7 +8157,7 @@ function xm(e, t) {
|
|
|
8151
8157
|
return i;
|
|
8152
8158
|
}
|
|
8153
8159
|
var Sm = ({ elements: e, onChange: t, answering: n }) => {
|
|
8154
|
-
let { t: r } =
|
|
8160
|
+
let { t: r } = z(), { disabled: i, labels: a } = Dp(), { portalContainer: o } = Oc(Io), s = vm(e, {
|
|
8155
8161
|
untitledSectionLabel: r("surveyFormBuilder.labels.sectionTitlePlaceholder"),
|
|
8156
8162
|
untitledQuestionLabel: r("surveyFormBuilder.labels.titlePlaceholder"),
|
|
8157
8163
|
duplicateQuestionLabel: a?.duplicateQuestion ?? r("surveyFormBuilder.actions.duplicateQuestion"),
|
|
@@ -8254,7 +8260,7 @@ function Cm({ flatItems: e, onChange: t }) {
|
|
|
8254
8260
|
function wm({ children: e }) {
|
|
8255
8261
|
let { isDragging: t } = Ap();
|
|
8256
8262
|
return /* @__PURE__ */ X("div", {
|
|
8257
|
-
className:
|
|
8263
|
+
className: B("relative @container", t && "select-none"),
|
|
8258
8264
|
children: e
|
|
8259
8265
|
});
|
|
8260
8266
|
}
|
|
@@ -8263,7 +8269,7 @@ var Tm = (e, t, n) => {
|
|
|
8263
8269
|
for (; i < e.length && e[i].type === "question" && n.has(e[i].id);) r.push(e[i]), i++;
|
|
8264
8270
|
return r;
|
|
8265
8271
|
}, Em = ({ items: e, first: t, sectionByQuestionId: n }) => /* @__PURE__ */ X("div", {
|
|
8266
|
-
className:
|
|
8272
|
+
className: B("rounded-2xl bg-f1-background-secondary pb-8 pt-4", t ? "" : "mt-8"),
|
|
8267
8273
|
children: e.map((e, t) => e.type === "section-header" ? /* @__PURE__ */ X(hm, {
|
|
8268
8274
|
item: e,
|
|
8269
8275
|
className: ""
|
|
@@ -8349,8 +8355,8 @@ var Tm = (e, t, n) => {
|
|
|
8349
8355
|
onChange: n
|
|
8350
8356
|
}) : null, /* @__PURE__ */ Z("div", {
|
|
8351
8357
|
className: "relative flex flex-1 flex-col",
|
|
8352
|
-
children: [/* @__PURE__ */ Z(
|
|
8353
|
-
className:
|
|
8358
|
+
children: [/* @__PURE__ */ Z(Jn.div, {
|
|
8359
|
+
className: B("flex w-full max-w-[750px] self-center flex-col gap-6", a && "pointer-events-none"),
|
|
8354
8360
|
initial: { filter: "blur(0px)" },
|
|
8355
8361
|
animate: { filter: a ? "blur(2px)" : "none" },
|
|
8356
8362
|
exit: { filter: "blur(0px)" },
|
|
@@ -8370,7 +8376,7 @@ var Tm = (e, t, n) => {
|
|
|
8370
8376
|
})
|
|
8371
8377
|
})
|
|
8372
8378
|
}), d ? /* @__PURE__ */ X(Np, {}) : null]
|
|
8373
|
-
}), a ? /* @__PURE__ */ X(
|
|
8379
|
+
}), a ? /* @__PURE__ */ X(Jn.div, {
|
|
8374
8380
|
className: "sticky bottom-1/2 left-0 z-50 flex w-full items-center justify-center",
|
|
8375
8381
|
initial: {
|
|
8376
8382
|
opacity: 0,
|
|
@@ -8400,27 +8406,27 @@ function km({ titleWidth: e, descriptionWidth: t, answer: n }) {
|
|
|
8400
8406
|
className: "flex flex-col gap-4 rounded-xl border border-solid border-f1-border-secondary bg-f1-background p-4",
|
|
8401
8407
|
children: [/* @__PURE__ */ Z("div", {
|
|
8402
8408
|
className: "flex flex-col gap-2",
|
|
8403
|
-
children: [/* @__PURE__ */ X(
|
|
8409
|
+
children: [/* @__PURE__ */ X(vn, {
|
|
8404
8410
|
className: "h-5 rounded-sm",
|
|
8405
8411
|
style: { width: e }
|
|
8406
|
-
}), t ? /* @__PURE__ */ X(
|
|
8412
|
+
}), t ? /* @__PURE__ */ X(vn, {
|
|
8407
8413
|
className: "h-4 rounded-sm",
|
|
8408
8414
|
style: { width: t }
|
|
8409
8415
|
}) : null]
|
|
8410
8416
|
}), n]
|
|
8411
8417
|
});
|
|
8412
8418
|
}
|
|
8413
|
-
var Am = /* @__PURE__ */ X(
|
|
8419
|
+
var Am = /* @__PURE__ */ X(vn, { className: "h-10 w-full rounded-sm" }), jm = /* @__PURE__ */ X(vn, { className: "h-24 w-full rounded-sm" }), Mm = /* @__PURE__ */ X(vn, { className: "h-10 w-56 max-w-full rounded-sm" });
|
|
8414
8420
|
function Nm() {
|
|
8415
8421
|
return /* @__PURE__ */ X("div", {
|
|
8416
8422
|
className: "grid grid-cols-5 gap-2 sm:max-w-80",
|
|
8417
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(
|
|
8423
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(vn, { className: "h-9 rounded-sm" }, t))
|
|
8418
8424
|
});
|
|
8419
8425
|
}
|
|
8420
8426
|
function Pm({ count: e }) {
|
|
8421
8427
|
return /* @__PURE__ */ X("div", {
|
|
8422
8428
|
className: "flex flex-col gap-2",
|
|
8423
|
-
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(
|
|
8429
|
+
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(vn, {
|
|
8424
8430
|
className: "h-7 w-56 max-w-full rounded-sm",
|
|
8425
8431
|
style: { width: `${Math.max(52, 76 - t * 7)}%` }
|
|
8426
8432
|
}, t))
|
|
@@ -8429,7 +8435,7 @@ function Pm({ count: e }) {
|
|
|
8429
8435
|
function Fm() {
|
|
8430
8436
|
return /* @__PURE__ */ X("div", {
|
|
8431
8437
|
className: "flex flex-wrap gap-2",
|
|
8432
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(
|
|
8438
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(vn, {
|
|
8433
8439
|
className: "h-8 rounded-sm",
|
|
8434
8440
|
style: { width: `${18 + t * 3}%` }
|
|
8435
8441
|
}, t))
|
|
@@ -8445,7 +8451,7 @@ function Im() {
|
|
|
8445
8451
|
className: "flex flex-col gap-5",
|
|
8446
8452
|
children: [/* @__PURE__ */ Z("div", {
|
|
8447
8453
|
className: "flex flex-col gap-2 px-5",
|
|
8448
|
-
children: [/* @__PURE__ */ X(
|
|
8454
|
+
children: [/* @__PURE__ */ X(vn, { className: "h-6 w-56 rounded-sm" }), /* @__PURE__ */ X(vn, { className: "h-4 w-80 max-w-full rounded-sm" })]
|
|
8449
8455
|
}), /* @__PURE__ */ X("div", {
|
|
8450
8456
|
className: "flex flex-col gap-4",
|
|
8451
8457
|
children: e === 0 ? /* @__PURE__ */ Z(Y, { children: [
|
|
@@ -8513,7 +8519,7 @@ function Lm() {
|
|
|
8513
8519
|
"aria-live": "polite",
|
|
8514
8520
|
children: [/* @__PURE__ */ Z("div", {
|
|
8515
8521
|
className: "flex flex-col gap-2 px-5",
|
|
8516
|
-
children: [/* @__PURE__ */ X(
|
|
8522
|
+
children: [/* @__PURE__ */ X(vn, { className: "h-6 w-52 rounded-sm" }), /* @__PURE__ */ X(vn, { className: "h-4 w-72 max-w-full rounded-sm" })]
|
|
8517
8523
|
}), /* @__PURE__ */ X(km, {
|
|
8518
8524
|
titleWidth: "74%",
|
|
8519
8525
|
descriptionWidth: "50%",
|
|
@@ -8557,7 +8563,7 @@ function zm({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
8557
8563
|
children: [/* @__PURE__ */ X("div", {
|
|
8558
8564
|
className: c ? "flex gap-3 [&>*]:min-w-0 [&>*]:basis-0" : "grid grid-cols-3 gap-3 @md:grid-cols-5",
|
|
8559
8565
|
children: i.map((t) => /* @__PURE__ */ X("div", {
|
|
8560
|
-
className:
|
|
8566
|
+
className: B("flex min-h-10 min-w-20 grow basis-auto items-center justify-center rounded-md border border-solid border-f1-border px-3 py-1.5 text-center font-medium", s ? "cursor-not-allowed" : "cursor-pointer", e === t.value && "border-f1-border-selected bg-f1-background-selected-secondary"),
|
|
8561
8567
|
onClick: () => l(t.value),
|
|
8562
8568
|
children: /* @__PURE__ */ X("span", {
|
|
8563
8569
|
className: "text-base font-medium leading-tight [overflow-wrap:anywhere]",
|
|
@@ -8575,7 +8581,7 @@ function zm({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
8575
8581
|
function Bm({ checked: e }) {
|
|
8576
8582
|
return /* @__PURE__ */ X("div", {
|
|
8577
8583
|
"aria-hidden": "true",
|
|
8578
|
-
className:
|
|
8584
|
+
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"),
|
|
8579
8585
|
children: e ? /* @__PURE__ */ X("div", { className: "h-2 w-2 rounded-full bg-f1-background" }) : null
|
|
8580
8586
|
});
|
|
8581
8587
|
}
|
|
@@ -8594,12 +8600,12 @@ function Vm({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
8594
8600
|
children: i.map((t) => {
|
|
8595
8601
|
let n = a === "select" ? e === t.value : Array.isArray(e) && e.includes(t.value);
|
|
8596
8602
|
return /* @__PURE__ */ Z("div", {
|
|
8597
|
-
className:
|
|
8603
|
+
className: B("flex min-h-9 w-full items-center gap-3 rounded-md bg-f1-background py-0.5 pl-2 pr-0.5", s ? "cursor-not-allowed" : "cursor-pointer hover:bg-f1-background-hover"),
|
|
8598
8604
|
onClick: (e) => {
|
|
8599
8605
|
s || a === "multi-select" && e.target.closest("input") || p(t.value);
|
|
8600
8606
|
},
|
|
8601
8607
|
children: [
|
|
8602
|
-
a === "multi-select" ? /* @__PURE__ */ X(
|
|
8608
|
+
a === "multi-select" ? /* @__PURE__ */ X(rs, {
|
|
8603
8609
|
title: t.label,
|
|
8604
8610
|
checked: !!n,
|
|
8605
8611
|
onCheckedChange: () => f(t.value),
|
|
@@ -8611,8 +8617,8 @@ function Vm({ value: e, onChange: t, onBlur: n, config: r }) {
|
|
|
8611
8617
|
}),
|
|
8612
8618
|
u ? /* @__PURE__ */ X("div", {
|
|
8613
8619
|
className: "min-h-8 p-1",
|
|
8614
|
-
children: /* @__PURE__ */ X(
|
|
8615
|
-
icon: t.correct ?
|
|
8620
|
+
children: /* @__PURE__ */ X(H, {
|
|
8621
|
+
icon: t.correct ? yi : ji,
|
|
8616
8622
|
color: t.correct ? "positive" : "critical",
|
|
8617
8623
|
"aria-hidden": !0
|
|
8618
8624
|
})
|
|
@@ -8634,7 +8640,7 @@ var Hm = /^(https?:\/\/)?[\w.-]+\.[a-z]{2,}(:\d+)?(\/[^\s]*)?$/i, Um = () => ({
|
|
|
8634
8640
|
status: "idle"
|
|
8635
8641
|
});
|
|
8636
8642
|
function Wm(e, t) {
|
|
8637
|
-
return
|
|
8643
|
+
return Ji().optional().superRefine((n, r) => {
|
|
8638
8644
|
e && (!n || n.trim() === "") && r.addIssue({
|
|
8639
8645
|
code: "custom",
|
|
8640
8646
|
message: t("forms.validation.required")
|
|
@@ -8642,7 +8648,7 @@ function Wm(e, t) {
|
|
|
8642
8648
|
});
|
|
8643
8649
|
}
|
|
8644
8650
|
function Gm(e, t) {
|
|
8645
|
-
return
|
|
8651
|
+
return Ji().optional().superRefine((n, r) => {
|
|
8646
8652
|
e && (!n || n.trim() === "") ? r.addIssue({
|
|
8647
8653
|
code: "custom",
|
|
8648
8654
|
message: t("forms.validation.required")
|
|
@@ -8653,7 +8659,7 @@ function Gm(e, t) {
|
|
|
8653
8659
|
});
|
|
8654
8660
|
}
|
|
8655
8661
|
function Km(e, t) {
|
|
8656
|
-
return
|
|
8662
|
+
return Sa().optional().superRefine((n, r) => {
|
|
8657
8663
|
e && n == null && r.addIssue({
|
|
8658
8664
|
code: "custom",
|
|
8659
8665
|
message: t("forms.validation.required")
|
|
@@ -8661,7 +8667,7 @@ function Km(e, t) {
|
|
|
8661
8667
|
});
|
|
8662
8668
|
}
|
|
8663
8669
|
function qm(e, t) {
|
|
8664
|
-
return
|
|
8670
|
+
return Hi(Ji()).optional().superRefine((n, r) => {
|
|
8665
8671
|
e && (!n || n.length === 0) && r.addIssue({
|
|
8666
8672
|
code: "custom",
|
|
8667
8673
|
message: t("forms.validation.required")
|
|
@@ -8669,7 +8675,7 @@ function qm(e, t) {
|
|
|
8669
8675
|
});
|
|
8670
8676
|
}
|
|
8671
8677
|
function Jm(e, t) {
|
|
8672
|
-
return
|
|
8678
|
+
return vi().optional().superRefine((n, r) => {
|
|
8673
8679
|
e && !n && r.addIssue({
|
|
8674
8680
|
code: "custom",
|
|
8675
8681
|
message: t("forms.validation.required")
|
|
@@ -8678,7 +8684,7 @@ function Jm(e, t) {
|
|
|
8678
8684
|
}
|
|
8679
8685
|
var Ym = qm;
|
|
8680
8686
|
function Xm(e, t) {
|
|
8681
|
-
return
|
|
8687
|
+
return ci().optional().superRefine((n, r) => {
|
|
8682
8688
|
e && !n && r.addIssue({
|
|
8683
8689
|
code: "custom",
|
|
8684
8690
|
message: t("forms.validation.required")
|
|
@@ -8731,7 +8737,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8731
8737
|
placeholder: t("surveyFormBuilder.answer.textPlaceholder"),
|
|
8732
8738
|
disabled: i
|
|
8733
8739
|
};
|
|
8734
|
-
return
|
|
8740
|
+
return qi(Wm(!!e.required, t), {
|
|
8735
8741
|
...l,
|
|
8736
8742
|
fieldType: "custom",
|
|
8737
8743
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Kp, {
|
|
@@ -8759,7 +8765,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8759
8765
|
rows: 4,
|
|
8760
8766
|
disabled: i
|
|
8761
8767
|
};
|
|
8762
|
-
return
|
|
8768
|
+
return qi(Wm(!!e.required, t), {
|
|
8763
8769
|
...l,
|
|
8764
8770
|
fieldType: "custom",
|
|
8765
8771
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Kp, {
|
|
@@ -8786,7 +8792,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8786
8792
|
placeholder: t("surveyFormBuilder.answer.numericPlaceholder"),
|
|
8787
8793
|
disabled: i
|
|
8788
8794
|
};
|
|
8789
|
-
return
|
|
8795
|
+
return qi(Km(!!e.required, t), {
|
|
8790
8796
|
...l,
|
|
8791
8797
|
fieldType: "custom",
|
|
8792
8798
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Kp, {
|
|
@@ -8814,7 +8820,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8814
8820
|
placeholder: t("surveyFormBuilder.answer.linkPlaceholder"),
|
|
8815
8821
|
disabled: i
|
|
8816
8822
|
};
|
|
8817
|
-
return
|
|
8823
|
+
return qi(Gm(!!e.required, t), {
|
|
8818
8824
|
...l,
|
|
8819
8825
|
fieldType: "custom",
|
|
8820
8826
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Kp, {
|
|
@@ -8841,7 +8847,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8841
8847
|
clearable: !e.required,
|
|
8842
8848
|
disabled: i
|
|
8843
8849
|
};
|
|
8844
|
-
return
|
|
8850
|
+
return qi(Jm(!!e.required, t), {
|
|
8845
8851
|
...l,
|
|
8846
8852
|
fieldType: "custom",
|
|
8847
8853
|
render: ({ value: e, onChange: t, onBlur: r, error: i }) => /* @__PURE__ */ X(Kp, {
|
|
@@ -8877,7 +8883,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8877
8883
|
showSearchBox: r,
|
|
8878
8884
|
searchBoxPlaceholder: e.searchBoxPlaceholder
|
|
8879
8885
|
};
|
|
8880
|
-
return
|
|
8886
|
+
return qi(Wm(!!e.required, t), {
|
|
8881
8887
|
...l,
|
|
8882
8888
|
fieldType: "custom",
|
|
8883
8889
|
render: ({ value: t, onChange: r, onBlur: i, error: o }) => {
|
|
@@ -8926,7 +8932,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8926
8932
|
showSearchBox: r,
|
|
8927
8933
|
searchBoxPlaceholder: e.searchBoxPlaceholder
|
|
8928
8934
|
};
|
|
8929
|
-
return
|
|
8935
|
+
return qi(qm(!!e.required, t), {
|
|
8930
8936
|
...l,
|
|
8931
8937
|
fieldType: "custom",
|
|
8932
8938
|
render: ({ value: e, onChange: t, onBlur: n, error: r }) => /* @__PURE__ */ X(Kp, {
|
|
@@ -8953,7 +8959,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8953
8959
|
disabled: i,
|
|
8954
8960
|
showAnswerValidation: r
|
|
8955
8961
|
};
|
|
8956
|
-
return
|
|
8962
|
+
return qi(Wm(!!e.required, t), {
|
|
8957
8963
|
...l,
|
|
8958
8964
|
fieldType: "custom",
|
|
8959
8965
|
fieldConfig: n,
|
|
@@ -8976,7 +8982,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8976
8982
|
disabled: i,
|
|
8977
8983
|
showAnswerValidation: r
|
|
8978
8984
|
};
|
|
8979
|
-
return
|
|
8985
|
+
return qi(qm(!!e.required, t), {
|
|
8980
8986
|
...l,
|
|
8981
8987
|
fieldType: "custom",
|
|
8982
8988
|
fieldConfig: n,
|
|
@@ -8998,7 +9004,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
8998
9004
|
maxLabel: n.maxLabel,
|
|
8999
9005
|
disabled: i
|
|
9000
9006
|
};
|
|
9001
|
-
return
|
|
9007
|
+
return qi(Km(!!e.required, t), {
|
|
9002
9008
|
...l,
|
|
9003
9009
|
fieldType: "custom",
|
|
9004
9010
|
fieldConfig: r,
|
|
@@ -9024,7 +9030,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
9024
9030
|
useUpload: r ?? Um,
|
|
9025
9031
|
disabled: i || !r
|
|
9026
9032
|
};
|
|
9027
|
-
return
|
|
9033
|
+
return qi(Ym(!!e.required, t), {
|
|
9028
9034
|
...l,
|
|
9029
9035
|
fieldType: "custom",
|
|
9030
9036
|
render: ({ value: e, onChange: t, onBlur: n, error: r }) => /* @__PURE__ */ X(Kp, {
|
|
@@ -9050,7 +9056,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
9050
9056
|
label: n.label || c,
|
|
9051
9057
|
disabled: i
|
|
9052
9058
|
};
|
|
9053
|
-
return
|
|
9059
|
+
return qi(Xm(!!e.required, t), {
|
|
9054
9060
|
...l,
|
|
9055
9061
|
fieldType: "custom",
|
|
9056
9062
|
render: ({ value: e, onChange: t, onBlur: n, error: i }) => /* @__PURE__ */ X(Kp, {
|
|
@@ -9069,7 +9075,7 @@ function th({ q: e, t, sectionId: n, previewMode: r = !1, disableFields: i = r,
|
|
|
9069
9075
|
})
|
|
9070
9076
|
});
|
|
9071
9077
|
}
|
|
9072
|
-
default: return
|
|
9078
|
+
default: return qi(Wi(), {
|
|
9073
9079
|
...l,
|
|
9074
9080
|
fieldType: "custom",
|
|
9075
9081
|
render: () => null
|
|
@@ -9110,7 +9116,7 @@ function nh({ elements: e, mode: t, t: n, defaultValues: r, currentQuestionId: i
|
|
|
9110
9116
|
}), f[e.id] = a?.[e.id] ?? Zm(e, r);
|
|
9111
9117
|
}
|
|
9112
9118
|
return {
|
|
9113
|
-
schema:
|
|
9119
|
+
schema: hi(d),
|
|
9114
9120
|
defaultValues: f,
|
|
9115
9121
|
flatQuestions: m,
|
|
9116
9122
|
sections: p
|
|
@@ -9140,7 +9146,7 @@ function oh(e) {
|
|
|
9140
9146
|
return e.inline ? /* @__PURE__ */ X(ch, { ...e }) : /* @__PURE__ */ X(sh, { ...e });
|
|
9141
9147
|
}
|
|
9142
9148
|
function sh({ 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: f, errorTriggerMode: p = "on-blur", loading: m = !1, labels: g, preview: _ = !1, useUpload: v, datasets: y }) {
|
|
9143
|
-
let { t: b } =
|
|
9149
|
+
let { t: b } = z(), x = c === "fullscreen", S = c === "fullscreen" ? "center" : c, [C, w] = J(x), { formRef: T, submit: E, isSubmitting: D, hasErrors: O } = Qe(), k = q({}), A = K(() => Qm(e), [e]), j = Rm(A), M = A.length > 0, N = {
|
|
9144
9150
|
title: g?.empty?.title ?? b("surveyAnsweringForm.labels.empty.title"),
|
|
9145
9151
|
description: g?.empty?.description ?? b("surveyAnsweringForm.labels.empty.description"),
|
|
9146
9152
|
emoji: g?.empty?.emoji ?? b("surveyAnsweringForm.labels.empty.emoji")
|
|
@@ -9215,12 +9221,12 @@ function sh({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
9215
9221
|
]);
|
|
9216
9222
|
let _e = u && !m ? [{
|
|
9217
9223
|
label: b(C ? "surveyAnsweringForm.actions.collapse" : "surveyAnsweringForm.actions.expand"),
|
|
9218
|
-
icon: C ?
|
|
9224
|
+
icon: C ? Ca : ca,
|
|
9219
9225
|
onClick: () => w((e) => !e)
|
|
9220
9226
|
}] : void 0, ve = M ? m || F ? void 0 : I ? P && !j.isLastStep ? {
|
|
9221
9227
|
label: b("surveyAnsweringForm.actions.next"),
|
|
9222
9228
|
onClick: j.goToNext,
|
|
9223
|
-
icon:
|
|
9229
|
+
icon: da
|
|
9224
9230
|
} : {
|
|
9225
9231
|
label: b("surveyAnsweringForm.actions.submit"),
|
|
9226
9232
|
onClick: rh,
|
|
@@ -9228,7 +9234,7 @@ function sh({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
9228
9234
|
} : P && !j.isLastStep ? {
|
|
9229
9235
|
label: b("surveyAnsweringForm.actions.next"),
|
|
9230
9236
|
onClick: pe,
|
|
9231
|
-
icon:
|
|
9237
|
+
icon: da
|
|
9232
9238
|
} : {
|
|
9233
9239
|
label: b("surveyAnsweringForm.actions.submit"),
|
|
9234
9240
|
onClick: pe,
|
|
@@ -9237,9 +9243,9 @@ function sh({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
9237
9243
|
} : void 0, ye = M ? m || F ? void 0 : P && !j.isFirstStep ? {
|
|
9238
9244
|
label: b("surveyAnsweringForm.actions.previous"),
|
|
9239
9245
|
onClick: me,
|
|
9240
|
-
icon:
|
|
9246
|
+
icon: So
|
|
9241
9247
|
} : void 0 : void 0, be = n === "all-questions" && M && !m, xe = P && M && !m, Se = P && !!j.currentQuestion?.sectionTitle && !m, Ce = L === "center" || L === "fullscreen";
|
|
9242
|
-
return /* @__PURE__ */ X(
|
|
9248
|
+
return /* @__PURE__ */ X(ra, {
|
|
9243
9249
|
isOpen: o,
|
|
9244
9250
|
onClose: s,
|
|
9245
9251
|
title: r,
|
|
@@ -9256,7 +9262,7 @@ function sh({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
9256
9262
|
onChange: rh,
|
|
9257
9263
|
datasets: y,
|
|
9258
9264
|
children: /* @__PURE__ */ Z("div", {
|
|
9259
|
-
className:
|
|
9265
|
+
className: B("relative flex h-full min-h-full flex-col @container", P && !C && "min-h-[600px]"),
|
|
9260
9266
|
children: [
|
|
9261
9267
|
be ? /* @__PURE__ */ X(Sm, {
|
|
9262
9268
|
elements: e,
|
|
@@ -9265,14 +9271,14 @@ function sh({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
9265
9271
|
}) : null,
|
|
9266
9272
|
xe ? /* @__PURE__ */ X("div", {
|
|
9267
9273
|
className: "absolute left-0 right-0 top-0 [&>div>div>div]:h-1 [&>div>div>div]:rounded-none",
|
|
9268
|
-
children: /* @__PURE__ */ X(
|
|
9274
|
+
children: /* @__PURE__ */ X(Bs, {
|
|
9269
9275
|
label: "Value",
|
|
9270
9276
|
value: j.progress,
|
|
9271
9277
|
hideLabel: !0
|
|
9272
9278
|
})
|
|
9273
9279
|
}) : null,
|
|
9274
9280
|
/* @__PURE__ */ Z("div", {
|
|
9275
|
-
className:
|
|
9281
|
+
className: B("mx-auto flex w-full flex-1 justify-center flex-col @lg:w-[750px] max-w-full pt-0", Ce && "px-4 py-12"),
|
|
9276
9282
|
children: [
|
|
9277
9283
|
/* @__PURE__ */ X("div", {
|
|
9278
9284
|
className: "mb-6",
|
|
@@ -9282,7 +9288,7 @@ function sh({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
9282
9288
|
...a
|
|
9283
9289
|
})
|
|
9284
9290
|
}),
|
|
9285
|
-
m ? X(n === "stepped" ? Lm : Im, {}) : M ? null : /* @__PURE__ */ X(
|
|
9291
|
+
m ? X(n === "stepped" ? Lm : Im, {}) : M ? null : /* @__PURE__ */ X(ao, {
|
|
9286
9292
|
display: "flex",
|
|
9287
9293
|
flexDirection: "column",
|
|
9288
9294
|
height: "full",
|
|
@@ -9323,7 +9329,7 @@ function sh({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
9323
9329
|
});
|
|
9324
9330
|
}
|
|
9325
9331
|
function ch({ elements: e, title: t, description: n, resourceHeader: r, defaultValues: i, loading: a = !1, labels: o, useUpload: s, datasets: c, hideResourceHeader: l = !1 }) {
|
|
9326
|
-
let { t: u } =
|
|
9332
|
+
let { t: u } = z(), f = K(() => Qm(e), [e]).length > 0, p = {
|
|
9327
9333
|
title: o?.empty?.title ?? u("surveyAnsweringForm.labels.empty.title"),
|
|
9328
9334
|
description: o?.empty?.description ?? u("surveyAnsweringForm.labels.empty.description"),
|
|
9329
9335
|
emoji: o?.empty?.emoji ?? u("surveyAnsweringForm.labels.empty.emoji")
|
|
@@ -9361,7 +9367,7 @@ function ch({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
9361
9367
|
hideActionBar: !0
|
|
9362
9368
|
},
|
|
9363
9369
|
sections: _
|
|
9364
|
-
}) : /* @__PURE__ */ X(
|
|
9370
|
+
}) : /* @__PURE__ */ X(ao, {
|
|
9365
9371
|
display: "flex",
|
|
9366
9372
|
flexDirection: "column",
|
|
9367
9373
|
justifyContent: "center",
|
|
@@ -9379,7 +9385,7 @@ function ch({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
9379
9385
|
//#endregion
|
|
9380
9386
|
//#region src/domains/talent/surveys/surveys/SurveySampleQuestion/SurveySampleQuestion.tsx
|
|
9381
9387
|
function lh(e) {
|
|
9382
|
-
return /* @__PURE__ */ Z(
|
|
9388
|
+
return /* @__PURE__ */ Z(ao, {
|
|
9383
9389
|
display: "flex",
|
|
9384
9390
|
flexDirection: "column",
|
|
9385
9391
|
gap: "lg",
|
|
@@ -9397,21 +9403,21 @@ function lh(e) {
|
|
|
9397
9403
|
});
|
|
9398
9404
|
}
|
|
9399
9405
|
function uh({ steps: e, minLabel: t, maxLabel: n }) {
|
|
9400
|
-
return /* @__PURE__ */ Z(
|
|
9406
|
+
return /* @__PURE__ */ Z(ao, {
|
|
9401
9407
|
display: "flex",
|
|
9402
9408
|
flexDirection: "column",
|
|
9403
9409
|
gap: "sm",
|
|
9404
|
-
children: [/* @__PURE__ */ X(
|
|
9410
|
+
children: [/* @__PURE__ */ X(ao, {
|
|
9405
9411
|
display: "grid",
|
|
9406
9412
|
columns: String(e),
|
|
9407
9413
|
gap: "sm",
|
|
9408
|
-
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(
|
|
9414
|
+
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(ao, {
|
|
9409
9415
|
height: "8",
|
|
9410
9416
|
border: "default",
|
|
9411
9417
|
borderRadius: "md",
|
|
9412
9418
|
background: "primary"
|
|
9413
9419
|
}, t))
|
|
9414
|
-
}), t || n ? /* @__PURE__ */ Z(
|
|
9420
|
+
}), t || n ? /* @__PURE__ */ Z(ao, {
|
|
9415
9421
|
display: "flex",
|
|
9416
9422
|
justifyContent: "between",
|
|
9417
9423
|
alignItems: "center",
|
|
@@ -9426,11 +9432,11 @@ function uh({ steps: e, minLabel: t, maxLabel: n }) {
|
|
|
9426
9432
|
});
|
|
9427
9433
|
}
|
|
9428
9434
|
function dh({ options: e }) {
|
|
9429
|
-
return /* @__PURE__ */ X(
|
|
9435
|
+
return /* @__PURE__ */ X(ao, {
|
|
9430
9436
|
display: "flex",
|
|
9431
9437
|
flexDirection: "column",
|
|
9432
9438
|
gap: "md",
|
|
9433
|
-
children: e.map((e) => /* @__PURE__ */ Z(
|
|
9439
|
+
children: e.map((e) => /* @__PURE__ */ Z(ao, {
|
|
9434
9440
|
display: "flex",
|
|
9435
9441
|
alignItems: "center",
|
|
9436
9442
|
gap: "md",
|
|
@@ -9439,7 +9445,7 @@ function dh({ options: e }) {
|
|
|
9439
9445
|
border: "default",
|
|
9440
9446
|
borderRadius: "md",
|
|
9441
9447
|
background: "primary",
|
|
9442
|
-
children: [/* @__PURE__ */ X(
|
|
9448
|
+
children: [/* @__PURE__ */ X(ao, {
|
|
9443
9449
|
shrink: !1,
|
|
9444
9450
|
width: "4",
|
|
9445
9451
|
height: "4",
|
|
@@ -9459,14 +9465,14 @@ var fh = ({ benefits: e }) => /* @__PURE__ */ X("div", {
|
|
|
9459
9465
|
children: e.map((e, t) => /* @__PURE__ */ X(ph, { text: e }, t))
|
|
9460
9466
|
}), ph = ({ text: e }) => /* @__PURE__ */ Z("div", {
|
|
9461
9467
|
className: "flex flex-row items-start gap-2",
|
|
9462
|
-
children: [/* @__PURE__ */ X(
|
|
9463
|
-
icon:
|
|
9468
|
+
children: [/* @__PURE__ */ X(H, {
|
|
9469
|
+
icon: Do,
|
|
9464
9470
|
size: "md",
|
|
9465
9471
|
className: "text-f1-icon-positive"
|
|
9466
9472
|
}), /* @__PURE__ */ X("span", { children: e })]
|
|
9467
9473
|
}), mh = Tc(({ title: e, image: t, benefits: n, actions: r, withShadow: i = !0, module: a, moduleName: o, tag: s, promoTag: c }, l) => /* @__PURE__ */ Z("div", {
|
|
9468
9474
|
ref: l,
|
|
9469
|
-
className:
|
|
9475
|
+
className: B("bg-white flex flex-row rounded-xl border border-f1-border-secondary", i && "shadow-md"),
|
|
9470
9476
|
children: [/* @__PURE__ */ X("div", {
|
|
9471
9477
|
className: "aspect-auto flex-shrink-0 overflow-hidden rounded-xl py-1 pl-1",
|
|
9472
9478
|
children: /* @__PURE__ */ X("img", {
|
|
@@ -9483,17 +9489,17 @@ var fh = ({ benefits: e }) => /* @__PURE__ */ X("div", {
|
|
|
9483
9489
|
children: [
|
|
9484
9490
|
/* @__PURE__ */ Z("div", {
|
|
9485
9491
|
className: "flex flex-row items-center gap-2",
|
|
9486
|
-
children: [a ? /* @__PURE__ */ X(
|
|
9492
|
+
children: [a ? /* @__PURE__ */ X(eo, { module: a }) : null, o ? /* @__PURE__ */ X("p", {
|
|
9487
9493
|
className: "text-base font-medium text-f1-foreground",
|
|
9488
9494
|
children: o
|
|
9489
9495
|
}) : null]
|
|
9490
9496
|
}),
|
|
9491
9497
|
s || c ? /* @__PURE__ */ Z("div", {
|
|
9492
9498
|
className: "flex justify-start gap-2",
|
|
9493
|
-
children: [s ? /* @__PURE__ */ X(
|
|
9499
|
+
children: [s ? /* @__PURE__ */ X(ms, {
|
|
9494
9500
|
icon: s.icon,
|
|
9495
9501
|
text: s.label
|
|
9496
|
-
}) : null, c ? /* @__PURE__ */ X(
|
|
9502
|
+
}) : null, c ? /* @__PURE__ */ X(Eo, {
|
|
9497
9503
|
variant: c.variant || "positive",
|
|
9498
9504
|
text: c.label
|
|
9499
9505
|
}) : null]
|
|
@@ -9518,33 +9524,33 @@ function gh({ isOpen: e, onClose: t, title: n, children: r, module: i, portalCon
|
|
|
9518
9524
|
let [o, s] = J(e);
|
|
9519
9525
|
return G(() => {
|
|
9520
9526
|
s(e);
|
|
9521
|
-
}, [e]), /* @__PURE__ */ X(
|
|
9527
|
+
}, [e]), /* @__PURE__ */ X(ai, {
|
|
9522
9528
|
open: o,
|
|
9523
9529
|
onOpenChange: (e) => {
|
|
9524
9530
|
s(e), e || t();
|
|
9525
9531
|
},
|
|
9526
9532
|
modal: !0,
|
|
9527
|
-
children: /* @__PURE__ */ Z(
|
|
9533
|
+
children: /* @__PURE__ */ Z(bi, {
|
|
9528
9534
|
className: "max-h-[620px] w-[760px] overflow-y-auto overflow-x-hidden bg-f1-background",
|
|
9529
9535
|
container: a,
|
|
9530
9536
|
children: [/* @__PURE__ */ Z("div", {
|
|
9531
9537
|
className: "flex flex-row items-center justify-between px-4 py-4",
|
|
9532
|
-
children: [/* @__PURE__ */ Z(
|
|
9538
|
+
children: [/* @__PURE__ */ Z(pi, {
|
|
9533
9539
|
className: "flex flex-row items-center gap-2 text-lg font-semibold text-f1-foreground",
|
|
9534
|
-
children: [i ? /* @__PURE__ */ X(
|
|
9540
|
+
children: [i ? /* @__PURE__ */ X(eo, {
|
|
9535
9541
|
module: i,
|
|
9536
9542
|
size: "md"
|
|
9537
9543
|
}) : null, n]
|
|
9538
|
-
}), /* @__PURE__ */ X(
|
|
9544
|
+
}), /* @__PURE__ */ X(er, {
|
|
9539
9545
|
variant: "outline",
|
|
9540
|
-
icon:
|
|
9546
|
+
icon: ji,
|
|
9541
9547
|
onClick: t,
|
|
9542
9548
|
label: "Close modal",
|
|
9543
9549
|
hideLabel: !0
|
|
9544
9550
|
})]
|
|
9545
|
-
}), /* @__PURE__ */ Z(
|
|
9551
|
+
}), /* @__PURE__ */ Z(uo, {
|
|
9546
9552
|
className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[512px] flex-col",
|
|
9547
|
-
children: [r, /* @__PURE__ */ X(
|
|
9553
|
+
children: [r, /* @__PURE__ */ X(fo, {
|
|
9548
9554
|
orientation: "vertical",
|
|
9549
9555
|
className: "[&_div]:bg-f1-background"
|
|
9550
9556
|
})]
|
|
@@ -9586,14 +9592,14 @@ function _h({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessa
|
|
|
9586
9592
|
promoTag: g,
|
|
9587
9593
|
actions: /* @__PURE__ */ Z("div", {
|
|
9588
9594
|
className: "flex gap-3",
|
|
9589
|
-
children: [u ? /* @__PURE__ */ X(
|
|
9595
|
+
children: [u ? /* @__PURE__ */ X(V, {
|
|
9590
9596
|
variant: u.variant,
|
|
9591
9597
|
label: E ? s.label : u.label,
|
|
9592
9598
|
icon: u.icon || void 0,
|
|
9593
9599
|
onClick: w,
|
|
9594
9600
|
loading: u.loading,
|
|
9595
9601
|
size: u.size
|
|
9596
|
-
}) : null, p ? /* @__PURE__ */ X(
|
|
9602
|
+
}) : null, p ? /* @__PURE__ */ X(V, {
|
|
9597
9603
|
onClick: p.onClick,
|
|
9598
9604
|
label: p.label,
|
|
9599
9605
|
variant: p.variant,
|
|
@@ -9627,14 +9633,14 @@ function yh({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
9627
9633
|
o && o(!l);
|
|
9628
9634
|
}, [o, l]);
|
|
9629
9635
|
let f = e?.includes(".mp4");
|
|
9630
|
-
return /* @__PURE__ */ X(Y, { children: l ? null : /* @__PURE__ */ Z(
|
|
9636
|
+
return /* @__PURE__ */ X(Y, { children: l ? null : /* @__PURE__ */ Z(fi, {
|
|
9631
9637
|
style: { width: a },
|
|
9632
9638
|
className: "relative bg-f1-background p-1",
|
|
9633
|
-
children: [/* @__PURE__ */ Z(
|
|
9639
|
+
children: [/* @__PURE__ */ Z(Ai, { children: [i ? /* @__PURE__ */ X("div", {
|
|
9634
9640
|
className: "absolute right-2 top-2 z-10",
|
|
9635
|
-
children: /* @__PURE__ */ X(
|
|
9641
|
+
children: /* @__PURE__ */ X(V, {
|
|
9636
9642
|
variant: "ghost",
|
|
9637
|
-
icon:
|
|
9643
|
+
icon: ji,
|
|
9638
9644
|
size: "sm",
|
|
9639
9645
|
hideLabel: !0,
|
|
9640
9646
|
onClick: d,
|
|
@@ -9660,7 +9666,7 @@ function yh({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
9660
9666
|
className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary",
|
|
9661
9667
|
children: n
|
|
9662
9668
|
})]
|
|
9663
|
-
})] })] }), s ? /* @__PURE__ */ X(
|
|
9669
|
+
})] })] }), s ? /* @__PURE__ */ X(Wa, {
|
|
9664
9670
|
className: "p-3",
|
|
9665
9671
|
children: s.map((e) => e.type === "upsell" ? /* @__PURE__ */ X(C, {
|
|
9666
9672
|
label: e.label,
|
|
@@ -9672,7 +9678,7 @@ function yh({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
9672
9678
|
closeLabel: e.closeLabel,
|
|
9673
9679
|
showConfirmation: c && e.showConfirmation,
|
|
9674
9680
|
variant: e.variant
|
|
9675
|
-
}, e.label) : /* @__PURE__ */ X(
|
|
9681
|
+
}, e.label) : /* @__PURE__ */ X(V, {
|
|
9676
9682
|
label: e.label,
|
|
9677
9683
|
onClick: e.onClick,
|
|
9678
9684
|
variant: e.variant
|
|
@@ -9681,9 +9687,9 @@ function yh({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
9681
9687
|
}) });
|
|
9682
9688
|
}
|
|
9683
9689
|
var bh = R(yh), xh = ({ onDismiss: e }) => {
|
|
9684
|
-
let { actions: t } =
|
|
9685
|
-
return /* @__PURE__ */ X(
|
|
9686
|
-
icon:
|
|
9690
|
+
let { actions: t } = z();
|
|
9691
|
+
return /* @__PURE__ */ X(V, {
|
|
9692
|
+
icon: ji,
|
|
9687
9693
|
label: t.close,
|
|
9688
9694
|
hideLabel: !0,
|
|
9689
9695
|
variant: "outline",
|
|
@@ -9697,16 +9703,16 @@ function Sh({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
|
9697
9703
|
className: "@container",
|
|
9698
9704
|
children: /* @__PURE__ */ X("div", {
|
|
9699
9705
|
role: "status",
|
|
9700
|
-
className:
|
|
9706
|
+
className: B("w-full rounded-md p-3 text-f1-foreground [background:hsl(var(--promote-50)/0.1)]", i && "pr-2"),
|
|
9701
9707
|
children: /* @__PURE__ */ Z("div", {
|
|
9702
9708
|
className: "flex flex-row gap-2",
|
|
9703
9709
|
children: [/* @__PURE__ */ Z("div", {
|
|
9704
|
-
className:
|
|
9710
|
+
className: B("flex flex-1 flex-col items-start gap-3 @xs:flex-row @xs:justify-between", n ? "@xs:items-start" : "@xs:items-center"),
|
|
9705
9711
|
children: [/* @__PURE__ */ Z("div", {
|
|
9706
|
-
className:
|
|
9712
|
+
className: B("flex flex-row gap-2", n ? "items-start" : "items-center"),
|
|
9707
9713
|
children: [e ? /* @__PURE__ */ X("div", {
|
|
9708
9714
|
className: "flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-sm border border-solid text-f1-icon-promote [background:hsl(var(--promote-50)/0.1)] [border-color:hsl(var(--promote-50)/0.1)]",
|
|
9709
|
-
children: /* @__PURE__ */ X(
|
|
9715
|
+
children: /* @__PURE__ */ X(H, {
|
|
9710
9716
|
icon: e,
|
|
9711
9717
|
size: "sm"
|
|
9712
9718
|
})
|
|
@@ -9721,7 +9727,7 @@ function Sh({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
|
9721
9727
|
}) : null]
|
|
9722
9728
|
})]
|
|
9723
9729
|
}), /* @__PURE__ */ X("div", {
|
|
9724
|
-
className:
|
|
9730
|
+
className: B("flex flex-shrink-0 @xs:pl-0", e && "pl-8"),
|
|
9725
9731
|
children: /* @__PURE__ */ X(C, {
|
|
9726
9732
|
label: r.label,
|
|
9727
9733
|
onRequest: r.onRequest,
|
|
@@ -9736,7 +9742,7 @@ function Sh({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
|
9736
9742
|
})
|
|
9737
9743
|
})]
|
|
9738
9744
|
}), i ? /* @__PURE__ */ X("div", {
|
|
9739
|
-
className:
|
|
9745
|
+
className: B("flex-shrink-0 self-start", !n && "@xs:self-center"),
|
|
9740
9746
|
children: /* @__PURE__ */ X(xh, { onDismiss: i })
|
|
9741
9747
|
}) : null]
|
|
9742
9748
|
})
|
|
@@ -9755,7 +9761,7 @@ var Ch = R(Sh), wh = Tc(function({ primaryAction: e, secondaryAction: t, ...n },
|
|
|
9755
9761
|
showIcon: e.showIcon,
|
|
9756
9762
|
showConfirmation: e.showConfirmation,
|
|
9757
9763
|
variant: e.variant
|
|
9758
|
-
}) : /* @__PURE__ */ X(
|
|
9764
|
+
}) : /* @__PURE__ */ X(V, {
|
|
9759
9765
|
onClick: e.onClick,
|
|
9760
9766
|
label: e.label,
|
|
9761
9767
|
variant: e.variant || "default",
|
|
@@ -9774,7 +9780,7 @@ wh.displayName = "UpsellingBanner";
|
|
|
9774
9780
|
var Th = R(wh);
|
|
9775
9781
|
//#endregion
|
|
9776
9782
|
//#region src/domains/growth/upselling/UpsellingKit/UpsellingPopover/UpsellingPopover.tsx
|
|
9777
|
-
function Eh({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i = "md", showIcon: a = !0, side: o = "right", align: s = "center", icon: c =
|
|
9783
|
+
function Eh({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i = "md", showIcon: a = !0, side: o = "right", align: s = "center", icon: c = sa, mediaUrl: l, title: u, description: d, width: f = "300px", trackVisibility: p, actions: m, onClick: h, hideLabel: g = !1 }) {
|
|
9778
9784
|
let [_, v] = J(!1), [y, b] = J(null), [x, S] = J(null), C = (e) => {
|
|
9779
9785
|
t(e), h && h();
|
|
9780
9786
|
}, w = async (e) => {
|
|
@@ -9792,12 +9798,12 @@ function Eh({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
9792
9798
|
...e,
|
|
9793
9799
|
onClick: () => w(e)
|
|
9794
9800
|
} : e);
|
|
9795
|
-
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ Z(
|
|
9801
|
+
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ Z(uc, {
|
|
9796
9802
|
open: E,
|
|
9797
9803
|
onOpenChange: C,
|
|
9798
|
-
children: [/* @__PURE__ */ X(
|
|
9804
|
+
children: [/* @__PURE__ */ X($s, {
|
|
9799
9805
|
asChild: !0,
|
|
9800
|
-
children: /* @__PURE__ */ X(
|
|
9806
|
+
children: /* @__PURE__ */ X(V, {
|
|
9801
9807
|
variant: r,
|
|
9802
9808
|
label: n,
|
|
9803
9809
|
size: i,
|
|
@@ -9805,7 +9811,7 @@ function Eh({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
9805
9811
|
onClick: () => t(e),
|
|
9806
9812
|
hideLabel: g
|
|
9807
9813
|
})
|
|
9808
|
-
}), /* @__PURE__ */ X(
|
|
9814
|
+
}), /* @__PURE__ */ X(ic, {
|
|
9809
9815
|
side: o,
|
|
9810
9816
|
align: s,
|
|
9811
9817
|
className: "w-fit border-none bg-transparent p-2 shadow-none",
|
|
@@ -9833,13 +9839,13 @@ function Eh({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
9833
9839
|
}) : null] });
|
|
9834
9840
|
}
|
|
9835
9841
|
var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r, actionHref: i }) => {
|
|
9836
|
-
let a =
|
|
9837
|
-
return /* @__PURE__ */ Z(
|
|
9842
|
+
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);
|
|
9843
|
+
return /* @__PURE__ */ Z(fi, {
|
|
9838
9844
|
className: "flex flex-col overflow-hidden",
|
|
9839
|
-
children: [/* @__PURE__ */ Z(
|
|
9845
|
+
children: [/* @__PURE__ */ Z(Ai, {
|
|
9840
9846
|
className: "flex flex-col gap-4 p-0",
|
|
9841
9847
|
children: [/* @__PURE__ */ X("div", {
|
|
9842
|
-
className:
|
|
9848
|
+
className: B("overflow-hidden rounded-lg border border-f1-border", "ring-1 ring-f1-border/50 bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary"),
|
|
9843
9849
|
children: e
|
|
9844
9850
|
}), /* @__PURE__ */ Z("div", {
|
|
9845
9851
|
className: "flex flex-col gap-1",
|
|
@@ -9851,15 +9857,15 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9851
9857
|
children: n
|
|
9852
9858
|
})]
|
|
9853
9859
|
})]
|
|
9854
|
-
}), /* @__PURE__ */ X(
|
|
9860
|
+
}), /* @__PURE__ */ X(Wa, {
|
|
9855
9861
|
className: "-mx-4 -mb-4 mt-4 flex justify-end rounded-b-xl border-0 border-t border-t-f1-border bg-f1-background-secondary px-4 py-3",
|
|
9856
|
-
children: i ? /* @__PURE__ */ X(
|
|
9862
|
+
children: i ? /* @__PURE__ */ X(V, {
|
|
9857
9863
|
variant: "default",
|
|
9858
9864
|
size: "md",
|
|
9859
9865
|
label: s,
|
|
9860
9866
|
href: i,
|
|
9861
9867
|
target: "_blank"
|
|
9862
|
-
}) : /* @__PURE__ */ X(
|
|
9868
|
+
}) : /* @__PURE__ */ X(V, {
|
|
9863
9869
|
type: "button",
|
|
9864
9870
|
variant: "default",
|
|
9865
9871
|
size: "md",
|
|
@@ -9869,7 +9875,7 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9869
9875
|
})]
|
|
9870
9876
|
});
|
|
9871
9877
|
}, kh = ({ item: e, isExpanded: t, onToggle: n }) => /* @__PURE__ */ Z("div", {
|
|
9872
|
-
className:
|
|
9878
|
+
className: B("flex flex-col rounded-lg px-3 -mx-3 transition-colors duration-200", t && "bg-f1-background-secondary"),
|
|
9873
9879
|
children: [/* @__PURE__ */ Z("button", {
|
|
9874
9880
|
type: "button",
|
|
9875
9881
|
onClick: () => n(e.id),
|
|
@@ -9881,24 +9887,24 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9881
9887
|
children: e.question
|
|
9882
9888
|
}), /* @__PURE__ */ X("span", {
|
|
9883
9889
|
className: "mt-0.5 flex-shrink-0 text-f1-foreground-secondary",
|
|
9884
|
-
children: /* @__PURE__ */ X(
|
|
9885
|
-
icon: t ?
|
|
9890
|
+
children: /* @__PURE__ */ X(H, {
|
|
9891
|
+
icon: t ? oo : Ko,
|
|
9886
9892
|
size: "sm",
|
|
9887
|
-
className:
|
|
9893
|
+
className: B("transition-transform duration-200", t && "text-f1-foreground")
|
|
9888
9894
|
})
|
|
9889
9895
|
})]
|
|
9890
9896
|
}), /* @__PURE__ */ X("div", {
|
|
9891
9897
|
id: `faq-answer-${e.id}`,
|
|
9892
9898
|
role: "region",
|
|
9893
9899
|
"aria-labelledby": `faq-question-${e.id}`,
|
|
9894
|
-
className:
|
|
9900
|
+
className: B("overflow-hidden transition-all duration-200", t ? "max-h-96 opacity-100" : "max-h-0 opacity-0"),
|
|
9895
9901
|
children: /* @__PURE__ */ X("p", {
|
|
9896
9902
|
className: "pb-3 text-base text-f1-foreground-secondary",
|
|
9897
9903
|
children: e.answer
|
|
9898
9904
|
})
|
|
9899
9905
|
})]
|
|
9900
9906
|
}), Ah = ({ headerIcon: e, items: t, defaultExpandedId: n, expandedId: r, onExpandedChange: i, allowMultiple: a = !1 }) => {
|
|
9901
|
-
let o =
|
|
9907
|
+
let o = z()?.ai?.growth?.faqCard?.title ?? "Questions before getting started", s = e ?? Ii, [c, l] = J(() => new Set(n ? [n] : [])), u = r !== void 0, d = W((e) => u ? r === e : c.has(e), [
|
|
9902
9908
|
u,
|
|
9903
9909
|
r,
|
|
9904
9910
|
c
|
|
@@ -9913,13 +9919,13 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9913
9919
|
i,
|
|
9914
9920
|
a
|
|
9915
9921
|
]);
|
|
9916
|
-
return t.length === 0 ? null : /* @__PURE__ */ Z(
|
|
9922
|
+
return t.length === 0 ? null : /* @__PURE__ */ Z(fi, {
|
|
9917
9923
|
className: "flex flex-col overflow-hidden",
|
|
9918
|
-
children: [/* @__PURE__ */ Z(
|
|
9924
|
+
children: [/* @__PURE__ */ Z(Zr, {
|
|
9919
9925
|
className: "-mx-4 -mt-4 mb-2 flex flex-row items-center gap-2 rounded-t-xl bg-f1-background-secondary px-4 py-3",
|
|
9920
9926
|
children: [/* @__PURE__ */ X("div", {
|
|
9921
9927
|
className: "flex h-6 w-6 items-center justify-center rounded-full border border-f1-border-secondary",
|
|
9922
|
-
children: /* @__PURE__ */ X(
|
|
9928
|
+
children: /* @__PURE__ */ X(H, {
|
|
9923
9929
|
icon: s,
|
|
9924
9930
|
size: "sm",
|
|
9925
9931
|
className: "text-f1-foreground-secondary"
|
|
@@ -9928,7 +9934,7 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9928
9934
|
className: "text-base font-semibold text-f1-foreground",
|
|
9929
9935
|
children: o
|
|
9930
9936
|
})]
|
|
9931
|
-
}), /* @__PURE__ */ X(
|
|
9937
|
+
}), /* @__PURE__ */ X(Ai, {
|
|
9932
9938
|
className: "flex flex-col divide-y divide-f1-border p-0",
|
|
9933
9939
|
children: t.map((e) => /* @__PURE__ */ X(kh, {
|
|
9934
9940
|
item: e,
|
|
@@ -9938,14 +9944,14 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9938
9944
|
})]
|
|
9939
9945
|
});
|
|
9940
9946
|
}, jh = ({ moduleName: e, description: t, onAction: n, actionHref: r, imageSrc: i }) => {
|
|
9941
|
-
let a =
|
|
9942
|
-
return /* @__PURE__ */ Z(
|
|
9947
|
+
let a = z()?.ai?.growth?.moduleCard?.actionLabel ?? "Learn more";
|
|
9948
|
+
return /* @__PURE__ */ Z(fi, {
|
|
9943
9949
|
className: "flex flex-col overflow-hidden",
|
|
9944
|
-
children: [/* @__PURE__ */ X(
|
|
9950
|
+
children: [/* @__PURE__ */ X(Ai, {
|
|
9945
9951
|
className: "flex flex-col gap-3 p-0",
|
|
9946
9952
|
children: /* @__PURE__ */ Z("div", {
|
|
9947
9953
|
className: "flex items-start gap-3",
|
|
9948
|
-
children: [/* @__PURE__ */ X(
|
|
9954
|
+
children: [/* @__PURE__ */ X(bo, {
|
|
9949
9955
|
avatar: {
|
|
9950
9956
|
type: "company",
|
|
9951
9957
|
name: e || "",
|
|
@@ -9963,14 +9969,14 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9963
9969
|
})]
|
|
9964
9970
|
})]
|
|
9965
9971
|
})
|
|
9966
|
-
}), /* @__PURE__ */ X(
|
|
9972
|
+
}), /* @__PURE__ */ X(Wa, {
|
|
9967
9973
|
className: "-mx-4 -mb-4 mt-4 flex justify-end rounded-b-xl border-0 border-t border-t-f1-border bg-f1-background-secondary px-4 py-3",
|
|
9968
|
-
children: r ? /* @__PURE__ */ X(
|
|
9974
|
+
children: r ? /* @__PURE__ */ X(V, {
|
|
9969
9975
|
variant: "outline",
|
|
9970
9976
|
size: "md",
|
|
9971
9977
|
label: a,
|
|
9972
9978
|
href: r
|
|
9973
|
-
}) : /* @__PURE__ */ X(
|
|
9979
|
+
}) : /* @__PURE__ */ X(V, {
|
|
9974
9980
|
type: "button",
|
|
9975
9981
|
variant: "outline",
|
|
9976
9982
|
size: "md",
|
|
@@ -9980,13 +9986,13 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9980
9986
|
})]
|
|
9981
9987
|
});
|
|
9982
9988
|
}, Mh = ({ onAction: e, actionHref: t }) => {
|
|
9983
|
-
let n =
|
|
9984
|
-
return /* @__PURE__ */ Z(
|
|
9989
|
+
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";
|
|
9990
|
+
return /* @__PURE__ */ Z(fi, {
|
|
9985
9991
|
className: "flex flex-col overflow-hidden",
|
|
9986
|
-
children: [/* @__PURE__ */ Z(
|
|
9992
|
+
children: [/* @__PURE__ */ Z(Ai, {
|
|
9987
9993
|
className: "flex flex-col gap-3 p-0",
|
|
9988
|
-
children: [/* @__PURE__ */ X(
|
|
9989
|
-
icon:
|
|
9994
|
+
children: [/* @__PURE__ */ X(H, {
|
|
9995
|
+
icon: Yr,
|
|
9990
9996
|
size: "lg"
|
|
9991
9997
|
}), /* @__PURE__ */ Z("div", {
|
|
9992
9998
|
className: "flex flex-col gap-0.5",
|
|
@@ -9998,15 +10004,15 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9998
10004
|
children: i
|
|
9999
10005
|
})]
|
|
10000
10006
|
})]
|
|
10001
|
-
}), /* @__PURE__ */ X(
|
|
10007
|
+
}), /* @__PURE__ */ X(Wa, {
|
|
10002
10008
|
className: "-mx-4 -mb-4 mt-4 flex justify-end rounded-b-xl border-0 border-t border-t-f1-border bg-f1-background-secondary px-4 py-3",
|
|
10003
|
-
children: t ? /* @__PURE__ */ X(
|
|
10009
|
+
children: t ? /* @__PURE__ */ X(V, {
|
|
10004
10010
|
variant: "default",
|
|
10005
10011
|
size: "md",
|
|
10006
10012
|
label: a,
|
|
10007
10013
|
href: t,
|
|
10008
10014
|
target: "_blank"
|
|
10009
|
-
}) : /* @__PURE__ */ X(
|
|
10015
|
+
}) : /* @__PURE__ */ X(V, {
|
|
10010
10016
|
type: "button",
|
|
10011
10017
|
variant: "default",
|
|
10012
10018
|
size: "md",
|
|
@@ -10016,7 +10022,7 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
10016
10022
|
})]
|
|
10017
10023
|
});
|
|
10018
10024
|
}, Nh = ({ steps: e, onComplete: t, onSkip: n, sendAsMessage: r = !1, onSendMessage: i }) => {
|
|
10019
|
-
let [a, o] = J(0), [s, c] = J({}), l =
|
|
10025
|
+
let [a, o] = J(0), [s, c] = J({}), l = z(), u = e.length, d = e[a], f = s[a] ?? [], p = W((e, t) => {
|
|
10020
10026
|
c((n) => {
|
|
10021
10027
|
let r = n[a] ?? [], i = t ? [...r, e] : r.filter((t) => t !== e);
|
|
10022
10028
|
return {
|
|
@@ -10044,9 +10050,9 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
10044
10050
|
e,
|
|
10045
10051
|
t
|
|
10046
10052
|
]), g = a === u - 1, _ = u > 1, v = n != null;
|
|
10047
|
-
return u === 0 || !d ? null : /* @__PURE__ */ Z(
|
|
10053
|
+
return u === 0 || !d ? null : /* @__PURE__ */ Z(fi, {
|
|
10048
10054
|
className: "flex flex-col overflow-hidden",
|
|
10049
|
-
children: [/* @__PURE__ */ Z(
|
|
10055
|
+
children: [/* @__PURE__ */ Z(Ai, {
|
|
10050
10056
|
className: "flex flex-col gap-4",
|
|
10051
10057
|
children: [/* @__PURE__ */ X("h3", {
|
|
10052
10058
|
className: "text-base font-semibold text-f1-foreground",
|
|
@@ -10055,7 +10061,7 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
10055
10061
|
className: "flex flex-col gap-3",
|
|
10056
10062
|
children: d.options.map((e) => /* @__PURE__ */ X("div", {
|
|
10057
10063
|
className: "flex items-center gap-2.5",
|
|
10058
|
-
children: /* @__PURE__ */ X(
|
|
10064
|
+
children: /* @__PURE__ */ X(rs, {
|
|
10059
10065
|
id: e.id,
|
|
10060
10066
|
title: e.label,
|
|
10061
10067
|
checked: f.includes(e.id),
|
|
@@ -10063,7 +10069,7 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
10063
10069
|
})
|
|
10064
10070
|
}, e.id))
|
|
10065
10071
|
})]
|
|
10066
|
-
}), /* @__PURE__ */ Z(
|
|
10072
|
+
}), /* @__PURE__ */ Z(Wa, {
|
|
10067
10073
|
className: "-mx-4 -mb-4 mt-4 flex items-center justify-between rounded-b-xl border-0 border-t border-t-f1-border bg-f1-background-secondary px-4 py-3",
|
|
10068
10074
|
children: [/* @__PURE__ */ X("div", {
|
|
10069
10075
|
className: "flex min-w-[7.5rem] items-center justify-start gap-1",
|
|
@@ -10074,8 +10080,8 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
10074
10080
|
disabled: a <= 0,
|
|
10075
10081
|
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded text-f1-foreground-secondary transition-colors hover:bg-f1-background-tertiary hover:text-f1-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
10076
10082
|
"aria-label": "Previous",
|
|
10077
|
-
children: /* @__PURE__ */ X(
|
|
10078
|
-
icon:
|
|
10083
|
+
children: /* @__PURE__ */ X(H, {
|
|
10084
|
+
icon: ko,
|
|
10079
10085
|
size: "sm"
|
|
10080
10086
|
})
|
|
10081
10087
|
}),
|
|
@@ -10093,21 +10099,21 @@ var Dh = R(Eh), Oh = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
10093
10099
|
disabled: a >= u - 1,
|
|
10094
10100
|
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded text-f1-foreground-secondary transition-colors hover:bg-f1-background-tertiary hover:text-f1-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
10095
10101
|
"aria-label": "Next",
|
|
10096
|
-
children: /* @__PURE__ */ X(
|
|
10097
|
-
icon:
|
|
10102
|
+
children: /* @__PURE__ */ X(H, {
|
|
10103
|
+
icon: Ko,
|
|
10098
10104
|
size: "sm"
|
|
10099
10105
|
})
|
|
10100
10106
|
})
|
|
10101
10107
|
] }) : null
|
|
10102
10108
|
}), /* @__PURE__ */ Z("div", {
|
|
10103
10109
|
className: "flex items-center gap-2",
|
|
10104
|
-
children: [v ? /* @__PURE__ */ X(
|
|
10110
|
+
children: [v ? /* @__PURE__ */ X(V, {
|
|
10105
10111
|
type: "button",
|
|
10106
10112
|
variant: "ghost",
|
|
10107
10113
|
size: "md",
|
|
10108
10114
|
label: l?.ai?.growth?.questionCard?.skipLabel ?? "Skip",
|
|
10109
10115
|
onClick: n
|
|
10110
|
-
}) : null, /* @__PURE__ */ X(
|
|
10116
|
+
}) : null, /* @__PURE__ */ X(V, {
|
|
10111
10117
|
type: "button",
|
|
10112
10118
|
variant: "outline",
|
|
10113
10119
|
size: "md",
|
|
@@ -10527,7 +10533,7 @@ function mg(e, t) {
|
|
|
10527
10533
|
n.href = URL.createObjectURL(e), n.download = t, n.click(), URL.revokeObjectURL(n.href);
|
|
10528
10534
|
}
|
|
10529
10535
|
async function hg(e, t, n, { keys: r, preamble: i } = {}) {
|
|
10530
|
-
mg(await
|
|
10536
|
+
mg(await Va([{
|
|
10531
10537
|
name: "Data",
|
|
10532
10538
|
rows: fg({
|
|
10533
10539
|
columns: e,
|
|
@@ -10549,7 +10555,7 @@ function _g(e, t, n) {
|
|
|
10549
10555
|
r.href = e, r.download = `${t}.${n}`, r.click();
|
|
10550
10556
|
}
|
|
10551
10557
|
async function vg(e, t) {
|
|
10552
|
-
mg(await
|
|
10558
|
+
mg(await Va(e.map((e) => ({
|
|
10553
10559
|
name: e.name,
|
|
10554
10560
|
rows: fg(e)
|
|
10555
10561
|
}))), `${t}.xlsx`);
|
|
@@ -10580,7 +10586,7 @@ function bg(e, t, n) {
|
|
|
10580
10586
|
}
|
|
10581
10587
|
}
|
|
10582
10588
|
function xg({ chartContainerRef: e, chartConfig: t, data: n, title: r }) {
|
|
10583
|
-
let { t: i } =
|
|
10589
|
+
let { t: i } = z(), a = W((t) => {
|
|
10584
10590
|
let n = yg(e);
|
|
10585
10591
|
n && _g(t === "jpg" ? bg(n, "jpeg", "#fff") : bg(n, "png"), r, t);
|
|
10586
10592
|
}, [e, r]), o = K(() => {
|
|
@@ -10610,23 +10616,23 @@ function xg({ chartContainerRef: e, chartConfig: t, data: n, title: r }) {
|
|
|
10610
10616
|
return K(() => n ? [
|
|
10611
10617
|
{
|
|
10612
10618
|
label: i("ai.dataDownload.download", { format: "PNG" }),
|
|
10613
|
-
icon:
|
|
10619
|
+
icon: Fa,
|
|
10614
10620
|
onClick: () => a("png")
|
|
10615
10621
|
},
|
|
10616
10622
|
{
|
|
10617
10623
|
label: i("ai.dataDownload.download", { format: "JPG" }),
|
|
10618
|
-
icon:
|
|
10624
|
+
icon: Fa,
|
|
10619
10625
|
onClick: () => a("jpg")
|
|
10620
10626
|
},
|
|
10621
10627
|
{ type: "separator" },
|
|
10622
10628
|
{
|
|
10623
10629
|
label: i("ai.dataDownload.download", { format: "Excel" }),
|
|
10624
|
-
icon:
|
|
10630
|
+
icon: Pa,
|
|
10625
10631
|
onClick: s
|
|
10626
10632
|
},
|
|
10627
10633
|
{
|
|
10628
10634
|
label: i("ai.dataDownload.download", { format: "CSV" }),
|
|
10629
|
-
icon:
|
|
10635
|
+
icon: Pa,
|
|
10630
10636
|
onClick: c
|
|
10631
10637
|
}
|
|
10632
10638
|
] : [], [
|
|
@@ -10672,7 +10678,7 @@ function Sg(e, t, n, r = "") {
|
|
|
10672
10678
|
//#endregion
|
|
10673
10679
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItemFilters.tsx
|
|
10674
10680
|
function Cg({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
10675
|
-
let i =
|
|
10681
|
+
let i = z(), a = kc(), o = q(null), s = q(void 0), c = q(r), [l, u] = J(!1), [d, f] = J(null), [p, m] = J(t);
|
|
10676
10682
|
G(() => {
|
|
10677
10683
|
c.current = r;
|
|
10678
10684
|
}, [r]), G(() => () => {
|
|
@@ -10684,7 +10690,7 @@ function Cg({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
10684
10690
|
}, [h, d]), G(() => {
|
|
10685
10691
|
l || m(t);
|
|
10686
10692
|
}, [l, t]);
|
|
10687
|
-
let v = Oc(
|
|
10693
|
+
let v = Oc(Io), y = v.portalContainer && (v.position === "center" || v.position === "fullscreen") ? v.portalContainer : void 0, b = K(() => _s(e, t, i), [
|
|
10688
10694
|
e,
|
|
10689
10695
|
t,
|
|
10690
10696
|
i
|
|
@@ -10713,18 +10719,18 @@ function Cg({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
10713
10719
|
let e = o.current?.querySelector("[aria-invalid=\"true\"]");
|
|
10714
10720
|
e ? e.focus() : f(null);
|
|
10715
10721
|
};
|
|
10716
|
-
return Object.keys(_).length === 0 ? null : /* @__PURE__ */ Z(
|
|
10722
|
+
return Object.keys(_).length === 0 ? null : /* @__PURE__ */ Z(uc, {
|
|
10717
10723
|
open: l,
|
|
10718
10724
|
onOpenChange: (e) => {
|
|
10719
10725
|
u(e), r?.(e), !e && (f(null), m(t));
|
|
10720
10726
|
},
|
|
10721
10727
|
modal: !1,
|
|
10722
10728
|
children: [
|
|
10723
|
-
/* @__PURE__ */ X(
|
|
10729
|
+
/* @__PURE__ */ X($s, {
|
|
10724
10730
|
asChild: !0,
|
|
10725
|
-
children: /* @__PURE__ */ X(
|
|
10731
|
+
children: /* @__PURE__ */ X(er, {
|
|
10726
10732
|
label: i.filters.label,
|
|
10727
|
-
icon:
|
|
10733
|
+
icon: ss,
|
|
10728
10734
|
variant: "ghost",
|
|
10729
10735
|
size: "md",
|
|
10730
10736
|
hideLabel: !0,
|
|
@@ -10747,7 +10753,7 @@ function Cg({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
10747
10753
|
")"
|
|
10748
10754
|
]
|
|
10749
10755
|
}) : null,
|
|
10750
|
-
/* @__PURE__ */ X(
|
|
10756
|
+
/* @__PURE__ */ X(ic, {
|
|
10751
10757
|
ref: o,
|
|
10752
10758
|
"aria-label": i.filters.label,
|
|
10753
10759
|
className: "w-[380px] max-w-[calc(100vw-1rem)] rounded-xl border border-solid border-f1-border-secondary p-0 shadow-md",
|
|
@@ -10759,9 +10765,9 @@ function Cg({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
10759
10765
|
className: "flex h-[420px] flex-col",
|
|
10760
10766
|
children: [/* @__PURE__ */ X("div", {
|
|
10761
10767
|
className: "flex shrink-0 items-center gap-2 py-1.5 pl-1.5 pr-3",
|
|
10762
|
-
children: g ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
10768
|
+
children: g ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(V, {
|
|
10763
10769
|
label: i.filters.availableFilters,
|
|
10764
|
-
icon:
|
|
10770
|
+
icon: So,
|
|
10765
10771
|
hideLabel: !0,
|
|
10766
10772
|
variant: "ghost",
|
|
10767
10773
|
size: "sm",
|
|
@@ -10777,7 +10783,7 @@ function Cg({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
10777
10783
|
className: "flex min-h-0 flex-1 flex-col",
|
|
10778
10784
|
children: g ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("div", {
|
|
10779
10785
|
className: "min-h-0 flex-1 overflow-y-auto border-0 border-t border-solid border-f1-border-secondary",
|
|
10780
|
-
children: /* @__PURE__ */ X(
|
|
10786
|
+
children: /* @__PURE__ */ X(ns, {
|
|
10781
10787
|
selectedFilterKey: g,
|
|
10782
10788
|
definition: e,
|
|
10783
10789
|
tempFilters: p,
|
|
@@ -10791,17 +10797,17 @@ function Cg({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
10791
10797
|
})
|
|
10792
10798
|
}), /* @__PURE__ */ X("div", {
|
|
10793
10799
|
className: "flex shrink-0 items-center justify-end gap-2 border-0 border-t border-solid border-f1-border-secondary p-2",
|
|
10794
|
-
children: /* @__PURE__ */ X(
|
|
10800
|
+
children: /* @__PURE__ */ X(V, {
|
|
10795
10801
|
onClick: w,
|
|
10796
10802
|
label: i.filters.applySelection
|
|
10797
10803
|
})
|
|
10798
|
-
})] }) : /* @__PURE__ */ X(
|
|
10804
|
+
})] }) : /* @__PURE__ */ X(ks, {
|
|
10799
10805
|
definition: _,
|
|
10800
10806
|
tempFilters: p,
|
|
10801
10807
|
selectedFilterKey: g,
|
|
10802
10808
|
onFilterSelect: C,
|
|
10803
10809
|
onClickApplyFilters: () => {
|
|
10804
|
-
n(
|
|
10810
|
+
n(es(e, p, i)), u(!1), r?.(!1), f(null);
|
|
10805
10811
|
},
|
|
10806
10812
|
isCompactMode: !0
|
|
10807
10813
|
})
|
|
@@ -10856,9 +10862,9 @@ function Eg({ title: e, enabled: t, actionsCollapse: n }) {
|
|
|
10856
10862
|
//#endregion
|
|
10857
10863
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItem.tsx
|
|
10858
10864
|
function Dg({ 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: g, chartTypeOptions: _, explanation: v, isFullscreen: y = !1, descriptionAction: b, headerLines: x = 2, fitContent: S = !1, onFullscreenChange: C }) {
|
|
10859
|
-
let [w, T] = J(!1), [E, D] = J(!1), O = q(!1), [k, A] = J(!1), j =
|
|
10865
|
+
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 } = ki(), I = (e) => {
|
|
10860
10866
|
T(e), e || A(!1);
|
|
10861
|
-
}, ee = c.filter((e) => !("type" in e) || e.type === "item" || e.type === void 0), te = ee.length > 0, ne = u && f && g, re = _ && _.length > 0, ie = !!v && v.trim().length > 0, ae = !!C, oe = !d && e.trim().length > 0 && (p ? !!g : M), se = oe || te || ne || re || ie, L = !!l || ae || !!se, ce = !y && (w || E), le =
|
|
10867
|
+
}, ee = c.filter((e) => !("type" in e) || e.type === "item" || e.type === void 0), te = ee.length > 0, ne = u && f && g, re = _ && _.length > 0, ie = !!v && v.trim().length > 0, ae = !!C, oe = !d && e.trim().length > 0 && (p ? !!g : M), se = oe || te || ne || re || ie, L = !!l || ae || !!se, ce = !y && (w || E), le = B("flex flex-shrink-0 gap-0.5", !y && "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", !y && "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 = Eg({
|
|
10862
10868
|
title: e,
|
|
10863
10869
|
enabled: x > 2,
|
|
10864
10870
|
actionsCollapse: !y
|
|
@@ -10880,11 +10886,11 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10880
10886
|
}), N(t), P(!0);
|
|
10881
10887
|
}, he = (e) => {
|
|
10882
10888
|
O.current && (O.current = !1, F() && e.preventDefault());
|
|
10883
|
-
}, ge = oe ? /* @__PURE__ */ X(
|
|
10889
|
+
}, ge = oe ? /* @__PURE__ */ X(ac, { children: /* @__PURE__ */ X(Ys, {
|
|
10884
10890
|
onClick: me,
|
|
10885
10891
|
children: /* @__PURE__ */ Z("div", {
|
|
10886
10892
|
className: "flex w-full flex-row items-center gap-2",
|
|
10887
|
-
children: [/* @__PURE__ */ X(
|
|
10893
|
+
children: [/* @__PURE__ */ X(H, { icon: Vi }), /* @__PURE__ */ X("span", {
|
|
10888
10894
|
className: "flex-1",
|
|
10889
10895
|
children: j.ai.dashboardItem.askOne
|
|
10890
10896
|
})]
|
|
@@ -10914,14 +10920,14 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10914
10920
|
children: [l ? /* @__PURE__ */ X(Cg, {
|
|
10915
10921
|
...l,
|
|
10916
10922
|
onOpenChange: D
|
|
10917
|
-
}) : null, oe ? /* @__PURE__ */ Z(
|
|
10923
|
+
}) : null, oe ? /* @__PURE__ */ Z(oc, {
|
|
10918
10924
|
open: w,
|
|
10919
10925
|
onOpenChange: I,
|
|
10920
|
-
children: [/* @__PURE__ */ X(
|
|
10926
|
+
children: [/* @__PURE__ */ X(qs, {
|
|
10921
10927
|
asChild: !0,
|
|
10922
|
-
children: /* @__PURE__ */ X(
|
|
10928
|
+
children: /* @__PURE__ */ X(er, {
|
|
10923
10929
|
label: j.actions.other,
|
|
10924
|
-
icon:
|
|
10930
|
+
icon: ma,
|
|
10925
10931
|
variant: "ghost",
|
|
10926
10932
|
size: "md",
|
|
10927
10933
|
hideLabel: !0,
|
|
@@ -10929,7 +10935,7 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10929
10935
|
compact: !0,
|
|
10930
10936
|
onClick: (e) => e.stopPropagation()
|
|
10931
10937
|
})
|
|
10932
|
-
}), /* @__PURE__ */ X(
|
|
10938
|
+
}), /* @__PURE__ */ X(Gs, {
|
|
10933
10939
|
align: "end",
|
|
10934
10940
|
className: "py-1",
|
|
10935
10941
|
onCloseAutoFocus: he,
|
|
@@ -10951,22 +10957,22 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10951
10957
|
})
|
|
10952
10958
|
})]
|
|
10953
10959
|
}) : /* @__PURE__ */ Z("div", {
|
|
10954
|
-
className:
|
|
10960
|
+
className: B("group/dashitem flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background", S ? "min-h-full shrink-0" : "h-full"),
|
|
10955
10961
|
"aria-busy": r ? "true" : void 0,
|
|
10956
10962
|
"aria-live": r ? "polite" : void 0,
|
|
10957
10963
|
children: [/* @__PURE__ */ Z("div", {
|
|
10958
|
-
className:
|
|
10959
|
-
children: [/* @__PURE__ */ Z(
|
|
10964
|
+
className: B("flex flex-col px-4 py-3", L && "min-h-14"),
|
|
10965
|
+
children: [/* @__PURE__ */ Z(ao, {
|
|
10960
10966
|
ref: de.rowRef,
|
|
10961
10967
|
display: "flex",
|
|
10962
10968
|
minWidth: "0",
|
|
10963
10969
|
alignItems: fe > 1 ? "start" : "center",
|
|
10964
10970
|
children: [/* @__PURE__ */ Z("div", {
|
|
10965
|
-
className:
|
|
10966
|
-
children: [/* @__PURE__ */ X(
|
|
10971
|
+
className: B("flex min-w-0 flex-1 gap-1", fe > 1 ? "items-start" : "items-center"),
|
|
10972
|
+
children: [/* @__PURE__ */ X(nr, {
|
|
10967
10973
|
tag: "h3",
|
|
10968
10974
|
lines: fe,
|
|
10969
|
-
className:
|
|
10975
|
+
className: B("text-base font-semibold text-f1-foreground", fe > 1 && "hyphens-auto"),
|
|
10970
10976
|
children: e
|
|
10971
10977
|
}), n ? /* @__PURE__ */ X("div", {
|
|
10972
10978
|
ref: de.infoRef,
|
|
@@ -10975,33 +10981,33 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10975
10981
|
}) : null]
|
|
10976
10982
|
}), L ? /* @__PURE__ */ X("div", {
|
|
10977
10983
|
ref: de.actionsRef,
|
|
10978
|
-
className:
|
|
10984
|
+
className: B(ue, fe > 1 && "-mt-1.5"),
|
|
10979
10985
|
children: /* @__PURE__ */ X("div", {
|
|
10980
10986
|
className: "min-w-0 overflow-clip",
|
|
10981
10987
|
children: /* @__PURE__ */ Z("div", {
|
|
10982
|
-
className:
|
|
10988
|
+
className: B(le, "p-0.5 pl-2"),
|
|
10983
10989
|
children: [
|
|
10984
10990
|
l ? /* @__PURE__ */ X(Cg, {
|
|
10985
10991
|
...l,
|
|
10986
10992
|
onOpenChange: D
|
|
10987
10993
|
}) : null,
|
|
10988
|
-
ae ? /* @__PURE__ */ X(
|
|
10994
|
+
ae ? /* @__PURE__ */ X(er, {
|
|
10989
10995
|
label: y ? j.actions.collapse : j.actions.expand,
|
|
10990
|
-
icon: y ?
|
|
10996
|
+
icon: y ? Ca : ca,
|
|
10991
10997
|
variant: "ghost",
|
|
10992
10998
|
size: "md",
|
|
10993
10999
|
hideLabel: !0,
|
|
10994
11000
|
compact: !0,
|
|
10995
11001
|
onClick: () => C?.(!y)
|
|
10996
11002
|
}) : null,
|
|
10997
|
-
se ? /* @__PURE__ */ Z(
|
|
11003
|
+
se ? /* @__PURE__ */ Z(oc, {
|
|
10998
11004
|
open: w,
|
|
10999
11005
|
onOpenChange: I,
|
|
11000
|
-
children: [/* @__PURE__ */ X(
|
|
11006
|
+
children: [/* @__PURE__ */ X(qs, {
|
|
11001
11007
|
asChild: !0,
|
|
11002
|
-
children: /* @__PURE__ */ X(
|
|
11008
|
+
children: /* @__PURE__ */ X(er, {
|
|
11003
11009
|
label: j.actions.other,
|
|
11004
|
-
icon:
|
|
11010
|
+
icon: ma,
|
|
11005
11011
|
variant: "ghost",
|
|
11006
11012
|
size: "md",
|
|
11007
11013
|
hideLabel: !0,
|
|
@@ -11009,20 +11015,20 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
11009
11015
|
compact: !0,
|
|
11010
11016
|
onClick: (e) => e.stopPropagation()
|
|
11011
11017
|
})
|
|
11012
|
-
}), /* @__PURE__ */ X(
|
|
11018
|
+
}), /* @__PURE__ */ X(Gs, {
|
|
11013
11019
|
align: "end",
|
|
11014
|
-
className:
|
|
11020
|
+
className: B("py-1", k && "w-96 max-w-[90vw]"),
|
|
11015
11021
|
onCloseAutoFocus: he,
|
|
11016
11022
|
children: k && ie ? /* @__PURE__ */ X("div", {
|
|
11017
11023
|
className: "px-3 py-2 text-base text-f1-foreground [&>div]:flex [&>div]:flex-col [&>div]:gap-2",
|
|
11018
|
-
children: /* @__PURE__ */ X(
|
|
11024
|
+
children: /* @__PURE__ */ X(Ia, {
|
|
11019
11025
|
content: v,
|
|
11020
11026
|
format: "markdown"
|
|
11021
11027
|
})
|
|
11022
11028
|
}) : /* @__PURE__ */ Z(Y, { children: [
|
|
11023
11029
|
re ? /* @__PURE__ */ Z("div", {
|
|
11024
11030
|
className: "mb-1 flex flex-col items-start gap-2 border-0 border-b border-solid border-f1-border-secondary p-3",
|
|
11025
|
-
children: [/* @__PURE__ */ X(
|
|
11031
|
+
children: [/* @__PURE__ */ X(nr, {
|
|
11026
11032
|
className: "text-base font-medium text-f1-foreground-tertiary",
|
|
11027
11033
|
children: j.ai.dashboardItem.chartType
|
|
11028
11034
|
}), /* @__PURE__ */ X(Ot, {
|
|
@@ -11041,46 +11047,46 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
11041
11047
|
fullWidth: !0
|
|
11042
11048
|
})]
|
|
11043
11049
|
}) : null,
|
|
11044
|
-
ie ? /* @__PURE__ */ X(
|
|
11050
|
+
ie ? /* @__PURE__ */ X(ac, { children: /* @__PURE__ */ X(Ys, {
|
|
11045
11051
|
onSelect: (e) => {
|
|
11046
11052
|
e.preventDefault(), A(!0);
|
|
11047
11053
|
},
|
|
11048
11054
|
children: /* @__PURE__ */ Z("div", {
|
|
11049
11055
|
className: "flex w-full flex-row items-center gap-2",
|
|
11050
|
-
children: [/* @__PURE__ */ X(
|
|
11056
|
+
children: [/* @__PURE__ */ X(H, { icon: ws }), /* @__PURE__ */ X("span", {
|
|
11051
11057
|
className: "flex-1",
|
|
11052
11058
|
children: j.ai.dashboardItem.dataExplanation
|
|
11053
11059
|
})]
|
|
11054
11060
|
})
|
|
11055
11061
|
}) }) : null,
|
|
11056
11062
|
ge,
|
|
11057
|
-
te ? /* @__PURE__ */ X(
|
|
11063
|
+
te ? /* @__PURE__ */ X(ac, { children: /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
11058
11064
|
className: "mx-1 rounded-sm px-2",
|
|
11059
11065
|
children: /* @__PURE__ */ Z("div", {
|
|
11060
11066
|
className: "flex w-full flex-row items-center gap-2 pr-2",
|
|
11061
|
-
children: [/* @__PURE__ */ X(
|
|
11067
|
+
children: [/* @__PURE__ */ X(H, { icon: Ti }), /* @__PURE__ */ X("span", {
|
|
11062
11068
|
className: "flex-1 text-base font-medium",
|
|
11063
11069
|
children: j.ai.dataDownload.title
|
|
11064
11070
|
})]
|
|
11065
11071
|
})
|
|
11066
|
-
}), /* @__PURE__ */ X(
|
|
11072
|
+
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ X(fc, { children: ee.map((e) => /* @__PURE__ */ X(Ys, {
|
|
11067
11073
|
onClick: e.onClick,
|
|
11068
11074
|
children: /* @__PURE__ */ Z("div", {
|
|
11069
11075
|
className: "flex w-full flex-row items-center gap-2",
|
|
11070
|
-
children: [e.icon ? /* @__PURE__ */ X(
|
|
11076
|
+
children: [e.icon ? /* @__PURE__ */ X(H, { icon: e.icon }) : null, /* @__PURE__ */ X("span", {
|
|
11071
11077
|
className: "flex-1",
|
|
11072
11078
|
children: e.label
|
|
11073
11079
|
})]
|
|
11074
11080
|
})
|
|
11075
11081
|
}, e.label)) }) })] }) }) : null,
|
|
11076
|
-
ne ? /* @__PURE__ */ X(
|
|
11082
|
+
ne ? /* @__PURE__ */ X(ac, { children: /* @__PURE__ */ X(Ys, {
|
|
11077
11083
|
onClick: () => {
|
|
11078
11084
|
y && C?.(!1), f(g);
|
|
11079
11085
|
},
|
|
11080
|
-
className:
|
|
11086
|
+
className: B("text-f1-foreground-critical"),
|
|
11081
11087
|
children: /* @__PURE__ */ Z("div", {
|
|
11082
11088
|
className: "flex w-full flex-row items-center gap-2",
|
|
11083
|
-
children: [/* @__PURE__ */ X(
|
|
11089
|
+
children: [/* @__PURE__ */ X(H, { icon: xi }), /* @__PURE__ */ X("span", {
|
|
11084
11090
|
className: "flex-1",
|
|
11085
11091
|
children: j.actions.delete
|
|
11086
11092
|
})]
|
|
@@ -11095,7 +11101,7 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
11095
11101
|
}) : null]
|
|
11096
11102
|
}), t || b ? /* @__PURE__ */ Z("div", {
|
|
11097
11103
|
className: "relative flex items-baseline gap-1",
|
|
11098
|
-
children: [t ? /* @__PURE__ */ X(
|
|
11104
|
+
children: [t ? /* @__PURE__ */ X(nr, {
|
|
11099
11105
|
lines: pe,
|
|
11100
11106
|
className: "text-base text-f1-foreground-secondary",
|
|
11101
11107
|
children: t
|
|
@@ -11111,7 +11117,7 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
11111
11117
|
})] }) : null]
|
|
11112
11118
|
}) : null]
|
|
11113
11119
|
}), /* @__PURE__ */ X("div", {
|
|
11114
|
-
className:
|
|
11120
|
+
className: B("flex-1", !S && "min-h-0"),
|
|
11115
11121
|
children: r ? o : s
|
|
11116
11122
|
})]
|
|
11117
11123
|
});
|
|
@@ -11120,7 +11126,7 @@ function Dg({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
11120
11126
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ChartItem/PointActionPopover.tsx
|
|
11121
11127
|
var Og = 8, kg = 8;
|
|
11122
11128
|
function Ag({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
11123
|
-
let i =
|
|
11129
|
+
let i = z(), a = q(null), [o, s] = J(null);
|
|
11124
11130
|
return jc(() => {
|
|
11125
11131
|
if (!e) {
|
|
11126
11132
|
s(null);
|
|
@@ -11166,12 +11172,12 @@ function Ag({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
|
11166
11172
|
left: o?.left ?? -9999,
|
|
11167
11173
|
visibility: o ? "visible" : "hidden"
|
|
11168
11174
|
},
|
|
11169
|
-
className:
|
|
11170
|
-
children: /* @__PURE__ */ X(
|
|
11175
|
+
className: B("z-50 rounded-md bg-f1-background p-1 border border-solid border-f1-border-secondary", "drop-shadow"),
|
|
11176
|
+
children: /* @__PURE__ */ X(er, {
|
|
11171
11177
|
type: "button",
|
|
11172
11178
|
variant: "ghost",
|
|
11173
11179
|
label: i.ai.dashboardItem.askOne,
|
|
11174
|
-
icon:
|
|
11180
|
+
icon: Vi,
|
|
11175
11181
|
onClick: t
|
|
11176
11182
|
})
|
|
11177
11183
|
}), document.body);
|
|
@@ -11214,39 +11220,39 @@ function zg(e) {
|
|
|
11214
11220
|
{
|
|
11215
11221
|
label: e.dataChart.barChartVertical,
|
|
11216
11222
|
value: "bar-vertical",
|
|
11217
|
-
icon:
|
|
11223
|
+
icon: Ta,
|
|
11218
11224
|
type: "bar",
|
|
11219
11225
|
orientation: "vertical"
|
|
11220
11226
|
},
|
|
11221
11227
|
{
|
|
11222
11228
|
label: e.dataChart.barChartHorizontal,
|
|
11223
11229
|
value: "bar-horizontal",
|
|
11224
|
-
icon:
|
|
11230
|
+
icon: Ki,
|
|
11225
11231
|
type: "bar",
|
|
11226
11232
|
orientation: "horizontal"
|
|
11227
11233
|
},
|
|
11228
11234
|
{
|
|
11229
11235
|
label: e.dataChart.lineChart,
|
|
11230
11236
|
value: "line",
|
|
11231
|
-
icon:
|
|
11237
|
+
icon: Xi,
|
|
11232
11238
|
type: "line"
|
|
11233
11239
|
},
|
|
11234
11240
|
{
|
|
11235
11241
|
label: e.dataChart.funnel,
|
|
11236
11242
|
value: "funnel",
|
|
11237
|
-
icon:
|
|
11243
|
+
icon: Zi,
|
|
11238
11244
|
type: "funnel"
|
|
11239
11245
|
},
|
|
11240
11246
|
{
|
|
11241
11247
|
label: e.dataChart.pieChart,
|
|
11242
11248
|
value: "pie",
|
|
11243
|
-
icon:
|
|
11249
|
+
icon: _i,
|
|
11244
11250
|
type: "pie"
|
|
11245
11251
|
},
|
|
11246
11252
|
{
|
|
11247
11253
|
label: e.dataChart.table,
|
|
11248
11254
|
value: "table",
|
|
11249
|
-
icon:
|
|
11255
|
+
icon: Pa,
|
|
11250
11256
|
type: "table"
|
|
11251
11257
|
}
|
|
11252
11258
|
];
|
|
@@ -11414,7 +11420,7 @@ function Kg(e) {
|
|
|
11414
11420
|
return Vh(e.chart) && e.chart.type === "bar" && "orientation" in e.chart && e.chart.orientation === "horizontal";
|
|
11415
11421
|
}
|
|
11416
11422
|
function qg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c, onTransformChart: l, isFullscreen: u, onFullscreenChange: d }) {
|
|
11417
|
-
let f =
|
|
11423
|
+
let f = z(), [p, m] = J("chart"), { enabled: h, setPendingQuote: g, setOpen: _, focusChatInput: v } = ki(), y = !Vh(e.chart), b = y ? Bg : e.chart, [x, S] = J(null), C = e.useDashboardFilters !== !1, w = JSON.stringify(r?.value ?? {}), { data: T, isLoading: E, error: D, retry: O } = Sg(e.fetchData, t, C, w), k = q(null), A = K(() => T && !y ? Ug(e, T) : void 0, [
|
|
11418
11424
|
e,
|
|
11419
11425
|
T,
|
|
11420
11426
|
y
|
|
@@ -11512,7 +11518,7 @@ function qg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11512
11518
|
}) : /* @__PURE__ */ Z("div", {
|
|
11513
11519
|
ref: k,
|
|
11514
11520
|
tabIndex: -1,
|
|
11515
|
-
className:
|
|
11521
|
+
className: B("relative h-full w-full px-4 py-3", On("rounded-sm focus-visible:ring-inset focus-visible:ring-offset-0")),
|
|
11516
11522
|
children: [/* @__PURE__ */ X(dt, {
|
|
11517
11523
|
...A,
|
|
11518
11524
|
ariaLabel: e.title,
|
|
@@ -11614,7 +11620,7 @@ function e_(e, t) {
|
|
|
11614
11620
|
return o;
|
|
11615
11621
|
}
|
|
11616
11622
|
function t_({ source: e, title: t, description: n, columns: r, tableSettings: i }) {
|
|
11617
|
-
let { t: a } =
|
|
11623
|
+
let { t: a } = z(), [o, s] = J(!1), c = W(async (a) => {
|
|
11618
11624
|
if (e && !o) {
|
|
11619
11625
|
s(!0);
|
|
11620
11626
|
try {
|
|
@@ -11639,11 +11645,11 @@ function t_({ source: e, title: t, description: n, columns: r, tableSettings: i
|
|
|
11639
11645
|
]), l = W(() => c("excel"), [c]), u = W(() => c("csv"), [c]);
|
|
11640
11646
|
return K(() => e ? [{
|
|
11641
11647
|
label: a("ai.dataDownload.download", { format: "Excel" }),
|
|
11642
|
-
icon:
|
|
11648
|
+
icon: Pa,
|
|
11643
11649
|
onClick: l
|
|
11644
11650
|
}, {
|
|
11645
11651
|
label: a("ai.dataDownload.download", { format: "CSV" }),
|
|
11646
|
-
icon:
|
|
11652
|
+
icon: Pa,
|
|
11647
11653
|
onClick: u
|
|
11648
11654
|
}] : [], [
|
|
11649
11655
|
e,
|
|
@@ -11697,7 +11703,7 @@ function n_({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11697
11703
|
function r_() {
|
|
11698
11704
|
return /* @__PURE__ */ Z("div", {
|
|
11699
11705
|
className: "flex h-full items-end gap-3 px-4 pb-4",
|
|
11700
|
-
children: [/* @__PURE__ */ X(
|
|
11706
|
+
children: [/* @__PURE__ */ X(vn, { className: "h-10 w-36 rounded" }), /* @__PURE__ */ X(vn, { className: "h-4 w-16 rounded" })]
|
|
11701
11707
|
});
|
|
11702
11708
|
}
|
|
11703
11709
|
//#endregion
|
|
@@ -11752,9 +11758,9 @@ function o_({ value: e, trend: t, comparison: n }) {
|
|
|
11752
11758
|
]), /* @__PURE__ */ X("div", {
|
|
11753
11759
|
ref: r,
|
|
11754
11760
|
tabIndex: o ? 0 : void 0,
|
|
11755
|
-
className:
|
|
11761
|
+
className: B("flex h-full min-h-0 overflow-auto px-4 pb-4", c ? "items-center" : "items-end", o && On("rounded-sm focus-visible:ring-inset focus-visible:ring-offset-0")),
|
|
11756
11762
|
children: /* @__PURE__ */ Z("div", {
|
|
11757
|
-
className:
|
|
11763
|
+
className: B("flex flex-col gap-1", c && "mx-auto -translate-y-2"),
|
|
11758
11764
|
children: [/* @__PURE__ */ Z("div", {
|
|
11759
11765
|
className: "flex items-baseline gap-3",
|
|
11760
11766
|
children: [/* @__PURE__ */ X("span", {
|
|
@@ -11763,13 +11769,13 @@ function o_({ value: e, trend: t, comparison: n }) {
|
|
|
11763
11769
|
}), t && t.direction !== "flat" ? /* @__PURE__ */ Z("div", {
|
|
11764
11770
|
className: "flex shrink-0 items-center",
|
|
11765
11771
|
children: [
|
|
11766
|
-
t.direction === "up" ? /* @__PURE__ */ X(
|
|
11767
|
-
icon:
|
|
11772
|
+
t.direction === "up" ? /* @__PURE__ */ X(H, {
|
|
11773
|
+
icon: hs,
|
|
11768
11774
|
color: "positive",
|
|
11769
11775
|
size: "sm",
|
|
11770
11776
|
"aria-hidden": "true"
|
|
11771
|
-
}) : /* @__PURE__ */ X(
|
|
11772
|
-
icon:
|
|
11777
|
+
}) : /* @__PURE__ */ X(H, {
|
|
11778
|
+
icon: fs,
|
|
11773
11779
|
color: "critical",
|
|
11774
11780
|
size: "sm",
|
|
11775
11781
|
"aria-hidden": "true"
|
|
@@ -11784,7 +11790,7 @@ function o_({ value: e, trend: t, comparison: n }) {
|
|
|
11784
11790
|
}),
|
|
11785
11791
|
/* @__PURE__ */ Z("span", {
|
|
11786
11792
|
"aria-hidden": "true",
|
|
11787
|
-
className:
|
|
11793
|
+
className: B("whitespace-nowrap text-base font-medium", t.direction === "up" ? "text-f1-foreground-positive" : "text-f1-foreground-critical"),
|
|
11788
11794
|
children: [t.percent.toFixed(1), "%"]
|
|
11789
11795
|
})
|
|
11790
11796
|
]
|
|
@@ -11971,7 +11977,7 @@ function g_({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11971
11977
|
if (Math.hypot(t.clientX - n, t.clientY - r) < d_) return;
|
|
11972
11978
|
i = !0, T(e), N.current = Array.from(document.querySelectorAll("[data-ai-chat-dropzone]"));
|
|
11973
11979
|
let a = k.current.get(e)?.title ?? "";
|
|
11974
|
-
a && window.dispatchEvent(new CustomEvent(
|
|
11980
|
+
a && window.dispatchEvent(new CustomEvent(ei, { detail: {
|
|
11975
11981
|
id: e,
|
|
11976
11982
|
title: a,
|
|
11977
11983
|
onAskAi: c,
|
|
@@ -11985,7 +11991,7 @@ function g_({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11985
11991
|
}, o = (e) => {
|
|
11986
11992
|
document.removeEventListener("pointermove", a), document.removeEventListener("pointerup", s), document.removeEventListener("pointercancel", u), P.current = null;
|
|
11987
11993
|
let t = A.current, n = j.current;
|
|
11988
|
-
e && i && t && n && F(t, n), A.current = null, j.current = null, N.current = [], T(null), D(null), i && window.dispatchEvent(new CustomEvent(
|
|
11994
|
+
e && i && t && n && F(t, n), A.current = null, j.current = null, N.current = [], T(null), D(null), i && window.dispatchEvent(new CustomEvent(Ni));
|
|
11989
11995
|
}, s = (e) => {
|
|
11990
11996
|
i && (N.current = Array.from(document.querySelectorAll("[data-ai-chat-dropzone]")), j.current = I(e.clientX, e.clientY)), o(!0);
|
|
11991
11997
|
}, u = () => o(!1);
|
|
@@ -12041,7 +12047,7 @@ function g_({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
12041
12047
|
let a = e.type === "chart" && Kg(e);
|
|
12042
12048
|
return /* @__PURE__ */ X("div", {
|
|
12043
12049
|
ref: d,
|
|
12044
|
-
className:
|
|
12050
|
+
className: B("flex flex-col", a ? "min-h-full shrink-0" : "h-full min-h-0"),
|
|
12045
12051
|
children: /* @__PURE__ */ X(j_, {
|
|
12046
12052
|
item: e,
|
|
12047
12053
|
itemFilters: t?.(e),
|
|
@@ -12072,7 +12078,7 @@ function g_({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
12072
12078
|
re ? /* @__PURE__ */ X(y_, { active: !!ie(a - 1) }) : null,
|
|
12073
12079
|
/* @__PURE__ */ X("div", {
|
|
12074
12080
|
"data-dashboard-row": "",
|
|
12075
|
-
className:
|
|
12081
|
+
className: B("flex rounded-lg transition-colors duration-200", o && "bg-f1-background-hover"),
|
|
12076
12082
|
style: {
|
|
12077
12083
|
gap: c_,
|
|
12078
12084
|
height: e.height,
|
|
@@ -12157,13 +12163,13 @@ function __({ id: e, isDragging: t, showIndicatorBefore: n, showIndicatorAfter:
|
|
|
12157
12163
|
/* @__PURE__ */ Z("div", {
|
|
12158
12164
|
ref: c,
|
|
12159
12165
|
"data-card-id": e,
|
|
12160
|
-
className:
|
|
12166
|
+
className: B("group/rowitem relative min-w-0 flex-1 transition-opacity duration-150", t && "opacity-40 scale-[0.97]"),
|
|
12161
12167
|
children: [i ? /* @__PURE__ */ X("div", {
|
|
12162
12168
|
onPointerDown: (t) => a(e, t),
|
|
12163
12169
|
className: "shadow-sm absolute -left-3 top-2.5 z-20 flex cursor-grab touch-none items-center justify-center rounded bg-f1-background p-2 opacity-0 transition-opacity hover:bg-f1-background-hover active:cursor-grabbing group-hover/rowitem:opacity-100",
|
|
12164
12170
|
"aria-label": "Drag to reorder",
|
|
12165
|
-
children: /* @__PURE__ */ X(
|
|
12166
|
-
icon:
|
|
12171
|
+
children: /* @__PURE__ */ X(H, {
|
|
12172
|
+
icon: ua,
|
|
12167
12173
|
size: "xs"
|
|
12168
12174
|
})
|
|
12169
12175
|
}) : null, s]
|
|
@@ -12181,7 +12187,7 @@ function y_({ active: e }) {
|
|
|
12181
12187
|
return /* @__PURE__ */ X("div", {
|
|
12182
12188
|
className: "pointer-events-none relative flex items-center justify-center transition-all",
|
|
12183
12189
|
style: { minHeight: e ? 12 : 0 },
|
|
12184
|
-
children: /* @__PURE__ */ X("div", { className:
|
|
12190
|
+
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") })
|
|
12185
12191
|
});
|
|
12186
12192
|
}
|
|
12187
12193
|
function b_(e, t, n) {
|
|
@@ -12332,22 +12338,22 @@ function j_({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
12332
12338
|
//#endregion
|
|
12333
12339
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ExportDropdown/ExportDropdown.tsx
|
|
12334
12340
|
function M_({ onExportExcel: e, isExporting: t }) {
|
|
12335
|
-
let { t: n } =
|
|
12336
|
-
return /* @__PURE__ */ X(
|
|
12341
|
+
let { t: n } = z();
|
|
12342
|
+
return /* @__PURE__ */ X(Pi, {
|
|
12337
12343
|
items: [{
|
|
12338
12344
|
label: t ? n("ai.dataDownload.exporting") : n("ai.dataDownload.exportDashboard", { format: "Excel" }),
|
|
12339
|
-
icon:
|
|
12345
|
+
icon: Ti,
|
|
12340
12346
|
onClick: t ? () => {} : e
|
|
12341
12347
|
}],
|
|
12342
|
-
icon:
|
|
12348
|
+
icon: ma
|
|
12343
12349
|
});
|
|
12344
12350
|
}
|
|
12345
12351
|
//#endregion
|
|
12346
12352
|
//#region src/blocks/OneFilterPicker/internal/ControlledOneFilterPicker.tsx
|
|
12347
12353
|
function N_(e) {
|
|
12348
|
-
return /* @__PURE__ */ X(
|
|
12354
|
+
return /* @__PURE__ */ X(ds.Provider, {
|
|
12349
12355
|
value: "controlled",
|
|
12350
|
-
children: /* @__PURE__ */ X(
|
|
12356
|
+
children: /* @__PURE__ */ X(Ds, { ...e })
|
|
12351
12357
|
});
|
|
12352
12358
|
}
|
|
12353
12359
|
N_.displayName = "ControlledOneFilterPicker";
|
|
@@ -12372,9 +12378,9 @@ function F_() {
|
|
|
12372
12378
|
role: "status",
|
|
12373
12379
|
"aria-label": "Loading filters",
|
|
12374
12380
|
children: [
|
|
12375
|
-
/* @__PURE__ */ X(
|
|
12376
|
-
/* @__PURE__ */ X(
|
|
12377
|
-
/* @__PURE__ */ X(
|
|
12381
|
+
/* @__PURE__ */ X(vn, { className: "h-8 w-24 rounded-md" }),
|
|
12382
|
+
/* @__PURE__ */ X(vn, { className: "h-8 w-20 rounded-md" }),
|
|
12383
|
+
/* @__PURE__ */ X(vn, { className: "h-8 w-20 rounded-md" })
|
|
12378
12384
|
]
|
|
12379
12385
|
});
|
|
12380
12386
|
}
|
|
@@ -12490,7 +12496,7 @@ function B_({ items: e, filters: t, filename: n = "dashboard" }) {
|
|
|
12490
12496
|
//#endregion
|
|
12491
12497
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/F0AnalyticsDashboard.tsx
|
|
12492
12498
|
var V_ = ({ 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 }) => {
|
|
12493
|
-
let y =
|
|
12499
|
+
let y = z(), [b = {}, x] = tc({
|
|
12494
12500
|
prop: r,
|
|
12495
12501
|
defaultProp: n ?? {},
|
|
12496
12502
|
onChange: i
|
|
@@ -12514,7 +12520,7 @@ var V_ = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
12514
12520
|
]);
|
|
12515
12521
|
let O = a.length === 1, [k, A] = J(!1), j = O || k;
|
|
12516
12522
|
return /* @__PURE__ */ Z("div", {
|
|
12517
|
-
className:
|
|
12523
|
+
className: B("flex flex-col gap-5 pb-10", j && "h-full pb-0"),
|
|
12518
12524
|
children: [e || v || u || _ ? /* @__PURE__ */ Z("div", {
|
|
12519
12525
|
className: "flex items-center justify-between gap-4 px-5",
|
|
12520
12526
|
children: [/* @__PURE__ */ X("div", {
|
|
@@ -12539,7 +12545,7 @@ var V_ = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
12539
12545
|
}) : null]
|
|
12540
12546
|
})]
|
|
12541
12547
|
}) : null, /* @__PURE__ */ X("div", {
|
|
12542
|
-
className:
|
|
12548
|
+
className: B("px-5", j && "flex min-h-0 flex-1 flex-col pb-5"),
|
|
12543
12549
|
children: /* @__PURE__ */ X(g_, {
|
|
12544
12550
|
items: a,
|
|
12545
12551
|
itemFilters: c ? void 0 : o,
|
|
@@ -12560,11 +12566,11 @@ var V_ = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
12560
12566
|
});
|
|
12561
12567
|
};
|
|
12562
12568
|
V_.displayName = "F0AnalyticsDashboard";
|
|
12563
|
-
var H_ =
|
|
12569
|
+
var H_ = _n("F0AnalyticsDashboard", V_), U_ = () => Yn("(min-width: 640px)", { initializeWithValue: !1 }), W_ = () => Yn("(max-width: 639px)", { initializeWithValue: !1 }), G_ = /*#__PURE__*/ U.createContext(void 0);
|
|
12564
12570
|
process.env.NODE_ENV !== "production" && (G_.displayName = "ToastContext");
|
|
12565
12571
|
function K_() {
|
|
12566
12572
|
let e = U.useContext(G_);
|
|
12567
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
12573
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? Dn(73) : "Base UI: useToastManager must be used within <Toast.Provider>.");
|
|
12568
12574
|
return e;
|
|
12569
12575
|
}
|
|
12570
12576
|
//#endregion
|
|
@@ -12613,7 +12619,7 @@ var X_ = {
|
|
|
12613
12619
|
expanded: (e) => e.hovering || e.focused,
|
|
12614
12620
|
expandedOrOutOfFocus: (e) => e.hovering || e.focused || !e.isWindowFocused,
|
|
12615
12621
|
prevFocusElement: (e) => e.prevFocusElement
|
|
12616
|
-
}, Z_ = class extends
|
|
12622
|
+
}, Z_ = class extends Rn {
|
|
12617
12623
|
timers = /* @__PURE__ */ new Map();
|
|
12618
12624
|
areTimersPaused = !1;
|
|
12619
12625
|
constructor(e) {
|
|
@@ -12734,7 +12740,7 @@ var X_ = {
|
|
|
12734
12740
|
}
|
|
12735
12741
|
resumeTimers() {
|
|
12736
12742
|
this.areTimersPaused && (this.areTimersPaused = !1, this.timers.forEach((e, t) => {
|
|
12737
|
-
e.remaining = e.remaining > 0 ? e.remaining : e.delay, e.timeout ??=
|
|
12743
|
+
e.remaining = e.remaining > 0 ? e.remaining : e.delay, e.timeout ??= In.create(), e.timeout.start(e.remaining, () => {
|
|
12738
12744
|
this.handleTimerFired(t), e.callback();
|
|
12739
12745
|
}), e.start = Date.now();
|
|
12740
12746
|
}));
|
|
@@ -12744,14 +12750,14 @@ var X_ = {
|
|
|
12744
12750
|
}
|
|
12745
12751
|
handleDocumentPointerDown = (e) => {
|
|
12746
12752
|
if (e.pointerType !== "touch") return;
|
|
12747
|
-
let t =
|
|
12748
|
-
|
|
12753
|
+
let t = Ln(e);
|
|
12754
|
+
En(this.state.viewport, t) || (this.resumeTimers(), this.update({
|
|
12749
12755
|
hovering: !1,
|
|
12750
12756
|
focused: !1
|
|
12751
12757
|
}));
|
|
12752
12758
|
};
|
|
12753
12759
|
scheduleTimer(e, t, n) {
|
|
12754
|
-
let r = Date.now(), i = X_.expandedOrOutOfFocus(this.state) ? void 0 :
|
|
12760
|
+
let r = Date.now(), i = X_.expandedOrOutOfFocus(this.state) ? void 0 : In.create();
|
|
12755
12761
|
i?.start(t, () => {
|
|
12756
12762
|
this.handleTimerFired(e), n();
|
|
12757
12763
|
}), this.timers.set(e, {
|
|
@@ -12784,8 +12790,8 @@ var X_ = {
|
|
|
12784
12790
|
t && (n.hovering = !1, n.focused = !1), this.update(n);
|
|
12785
12791
|
}
|
|
12786
12792
|
handleFocusManagement(e) {
|
|
12787
|
-
let t =
|
|
12788
|
-
if (!this.state.viewport || !
|
|
12793
|
+
let t = xn(Wn(this.state.viewport));
|
|
12794
|
+
if (!this.state.viewport || !En(this.state.viewport, t) || !bn(t)) return;
|
|
12789
12795
|
if (e === void 0) {
|
|
12790
12796
|
this.restoreFocusToPrevElement();
|
|
12791
12797
|
return;
|
|
@@ -12797,7 +12803,7 @@ var X_ = {
|
|
|
12797
12803
|
a ? a.ref?.current?.focus() : this.restoreFocusToPrevElement();
|
|
12798
12804
|
}
|
|
12799
12805
|
}, Q_ = function(e) {
|
|
12800
|
-
let { children: t, timeout: n = 5e3, limit: r = 3, toastManager: i } = e, a =
|
|
12806
|
+
let { children: t, timeout: n = 5e3, limit: r = 3, toastManager: i } = e, a = Cn(() => new Z_({
|
|
12801
12807
|
timeout: n,
|
|
12802
12808
|
limit: r,
|
|
12803
12809
|
viewport: null,
|
|
@@ -12807,7 +12813,7 @@ var X_ = {
|
|
|
12807
12813
|
isWindowFocused: !0,
|
|
12808
12814
|
prevFocusElement: null
|
|
12809
12815
|
})).current;
|
|
12810
|
-
return
|
|
12816
|
+
return Tn(a.disposeEffect), U.useEffect(function() {
|
|
12811
12817
|
if (i) return i[" subscribe"](({ action: e, options: t }) => {
|
|
12812
12818
|
let n = t.id;
|
|
12813
12819
|
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);
|
|
@@ -12824,7 +12830,7 @@ var X_ = {
|
|
|
12824
12830
|
process.env.NODE_ENV !== "production" && (Q_.displayName = "ToastProvider");
|
|
12825
12831
|
function $_(e) {
|
|
12826
12832
|
let { store: t, timeout: n, limit: r } = e;
|
|
12827
|
-
return
|
|
12833
|
+
return Sn(() => {
|
|
12828
12834
|
t.syncProviderProps(n, r);
|
|
12829
12835
|
}, [
|
|
12830
12836
|
t,
|
|
@@ -12835,23 +12841,23 @@ function $_(e) {
|
|
|
12835
12841
|
//#endregion
|
|
12836
12842
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_date-fns@3.6.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/viewport/ToastViewportCssVars.mjs
|
|
12837
12843
|
var ev = "--toast-frontmost-height", tv = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12838
|
-
let { render: n, className: r, style: i, children: a, ...o } = e, s = K_(), c =
|
|
12844
|
+
let { render: n, className: r, style: i, children: a, ...o } = e, s = K_(), c = wn(), 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");
|
|
12839
12845
|
U.useEffect(() => {
|
|
12840
12846
|
let e = s.state.viewport;
|
|
12841
12847
|
if (!e || f) return;
|
|
12842
|
-
let t =
|
|
12848
|
+
let t = yn(e), n = Wn(e);
|
|
12843
12849
|
function r(t) {
|
|
12844
|
-
t.key === "F6" &&
|
|
12850
|
+
t.key === "F6" && Ln(t) !== e && (t.preventDefault(), s.set("prevFocusElement", xn(n)), e?.focus({ preventScroll: !0 }), s.pauseTimers(), s.set("focused", !0));
|
|
12845
12851
|
}
|
|
12846
12852
|
function i(e) {
|
|
12847
|
-
|
|
12853
|
+
Ln(e) === t && (s.set("isWindowFocused", !1), s.pauseTimers());
|
|
12848
12854
|
}
|
|
12849
12855
|
function a(n) {
|
|
12850
12856
|
if (n.relatedTarget) return;
|
|
12851
|
-
let r =
|
|
12852
|
-
(r === t || !
|
|
12857
|
+
let r = Ln(n), i = xn(Wn(e));
|
|
12858
|
+
(r === t || !En(e, r) || !bn(i)) && s.resumeTimers(), c.start(0, () => s.set("isWindowFocused", !0));
|
|
12853
12859
|
}
|
|
12854
|
-
return
|
|
12860
|
+
return Un(kn(t, "keydown", r), kn(t, "blur", i, !0), kn(t, "focus", a, !0), kn(n, "pointerdown", s.handleDocumentPointerDown, !0));
|
|
12855
12861
|
}, [
|
|
12856
12862
|
s,
|
|
12857
12863
|
c,
|
|
@@ -12863,7 +12869,7 @@ var ev = "--toast-frontmost-height", tv = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
12863
12869
|
t ? t.ref?.current?.focus() : s.restoreFocusToPrevElement();
|
|
12864
12870
|
}
|
|
12865
12871
|
function x(e) {
|
|
12866
|
-
e.key === "Tab" && e.shiftKey &&
|
|
12872
|
+
e.key === "Tab" && e.shiftKey && Ln(e.nativeEvent) === s.state.viewport && (e.preventDefault(), s.restoreFocusToPrevElement());
|
|
12867
12873
|
}
|
|
12868
12874
|
function S() {
|
|
12869
12875
|
s.state.toasts.some((e) => e.transitionStatus === "ending") || d.current || !u.current || (s.state.isWindowFocused && s.resumeTimers(), s.set("hovering", !1), u.current = !1);
|
|
@@ -12885,10 +12891,10 @@ var ev = "--toast-frontmost-height", tv = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
12885
12891
|
e.pointerType === "touch" && (d.current = !1, S());
|
|
12886
12892
|
}
|
|
12887
12893
|
function O() {
|
|
12888
|
-
l.current ? l.current = !1 : m ||
|
|
12894
|
+
l.current ? l.current = !1 : m || bn(xn(Wn(s.state.viewport))) && (s.set("focused", !0), s.pauseTimers());
|
|
12889
12895
|
}
|
|
12890
12896
|
function k(e) {
|
|
12891
|
-
m && !
|
|
12897
|
+
m && !En(s.state.viewport, e.relatedTarget) && (s.set("focused", !1), w());
|
|
12892
12898
|
}
|
|
12893
12899
|
let A = {
|
|
12894
12900
|
tabIndex: -1,
|
|
@@ -12908,7 +12914,7 @@ var ev = "--toast-frontmost-height", tv = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
12908
12914
|
onPointerUp: D,
|
|
12909
12915
|
onPointerCancel: D,
|
|
12910
12916
|
style: { [ev]: _ ? `${_}px` : void 0 }
|
|
12911
|
-
}, j = { expanded: h }, M = !f && g && /*#__PURE__*/ X(
|
|
12917
|
+
}, j = { expanded: h }, M = !f && g && /*#__PURE__*/ X(An, { onFocus: b }), N = zn("div", e, {
|
|
12912
12918
|
ref: [t, s.setViewport],
|
|
12913
12919
|
state: j,
|
|
12914
12920
|
props: [
|
|
@@ -12925,7 +12931,7 @@ var ev = "--toast-frontmost-height", tv = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
12925
12931
|
M,
|
|
12926
12932
|
N,
|
|
12927
12933
|
!m && y.length > 0 && /*#__PURE__*/ X("div", {
|
|
12928
|
-
style:
|
|
12934
|
+
style: Vn,
|
|
12929
12935
|
children: y.map((e) => /*#__PURE__*/ Z("div", {
|
|
12930
12936
|
role: "alert",
|
|
12931
12937
|
"aria-atomic": !0,
|
|
@@ -12941,13 +12947,13 @@ var nv = /*#__PURE__*/ U.createContext(void 0);
|
|
|
12941
12947
|
process.env.NODE_ENV !== "production" && (nv.displayName = "ToastRootContext");
|
|
12942
12948
|
function rv() {
|
|
12943
12949
|
let e = U.useContext(nv);
|
|
12944
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ?
|
|
12950
|
+
if (!e) throw Error(process.env.NODE_ENV === "production" ? Dn(66) : "Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.");
|
|
12945
12951
|
return e;
|
|
12946
12952
|
}
|
|
12947
12953
|
//#endregion
|
|
12948
12954
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_date-fns@3.6.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/utils/getElementTransform.mjs
|
|
12949
12955
|
function iv(e, t) {
|
|
12950
|
-
let n = (t ??
|
|
12956
|
+
let n = (t ?? yn(e).getComputedStyle(e)).transform, r = 0, i = 0, a = 1;
|
|
12951
12957
|
if (n && n !== "none") {
|
|
12952
12958
|
let e = n.match(/matrix(?:3d)?\(([^)]+)\)/);
|
|
12953
12959
|
if (e) {
|
|
@@ -12975,11 +12981,11 @@ function av(e, t, n) {
|
|
|
12975
12981
|
//#endregion
|
|
12976
12982
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_date-fns@3.6.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/root/ToastRootCssVars.mjs
|
|
12977
12983
|
var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "--toast-swipe-movement-x", uv = "--toast-swipe-movement-y", dv = "data-swipe-direction", fv = {
|
|
12978
|
-
...
|
|
12984
|
+
...Hn,
|
|
12979
12985
|
swipeDirection(e) {
|
|
12980
12986
|
return e ? { [dv]: e } : null;
|
|
12981
12987
|
}
|
|
12982
|
-
}, pv = 40, mv = 10, hv = .5, gv = 1, _v = `${
|
|
12988
|
+
}, pv = 40, mv = 10, hv = .5, gv = 1, _v = `${Nn},${Bn}`, vv = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12983
12989
|
let { toast: n, render: r, className: i, swipeDirection: a = ["down", "right"], style: o, ...s } = e, c = n.positionerProps?.anchor !== void 0, l = [];
|
|
12984
12990
|
c || (l = Array.isArray(a) ? a : [a]);
|
|
12985
12991
|
let u = l.length > 0, d = K_(), [f, p] = U.useState(void 0), [m, h] = U.useState(!1), [g, _] = U.useState(!1), [v, y] = U.useState({
|
|
@@ -13003,14 +13009,14 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13003
13009
|
x: 0,
|
|
13004
13010
|
y: 0
|
|
13005
13011
|
}), te = U.useRef(null), ne = U.useRef(null), re = d.useState("toastIndex", n.id), ie = d.useState("toastVisibleIndex", n.id), ae = d.useState("toastOffsetY", n.id), oe = d.useState("focused"), se = d.useState("expanded");
|
|
13006
|
-
|
|
13012
|
+
Mn({
|
|
13007
13013
|
open: n.transitionStatus !== "ending",
|
|
13008
13014
|
ref: O,
|
|
13009
13015
|
onComplete() {
|
|
13010
13016
|
n.transitionStatus === "ending" && d.removeToast(n.id);
|
|
13011
13017
|
}
|
|
13012
13018
|
});
|
|
13013
|
-
let L =
|
|
13019
|
+
let L = jn((e = !1) => {
|
|
13014
13020
|
let t = O.current;
|
|
13015
13021
|
if (!t) return;
|
|
13016
13022
|
let r = t.style.height;
|
|
@@ -13026,7 +13032,7 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13026
13032
|
}
|
|
13027
13033
|
e ? Nc.flushSync(a) : a();
|
|
13028
13034
|
});
|
|
13029
|
-
|
|
13035
|
+
Sn(() => {
|
|
13030
13036
|
let e = k.current;
|
|
13031
13037
|
(n.transitionStatus === "starting" || e !== n.id) && (e !== void 0 && (p(void 0), x({
|
|
13032
13038
|
x: 0,
|
|
@@ -13044,7 +13050,7 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13044
13050
|
function ce(e) {
|
|
13045
13051
|
ee.current = e, y(e);
|
|
13046
13052
|
}
|
|
13047
|
-
|
|
13053
|
+
Sn(() => () => {
|
|
13048
13054
|
ne.current?.abort();
|
|
13049
13055
|
}, []);
|
|
13050
13056
|
function le(e, t) {
|
|
@@ -13054,7 +13060,7 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13054
13060
|
y: i ? n(t) : t
|
|
13055
13061
|
};
|
|
13056
13062
|
}
|
|
13057
|
-
let ue =
|
|
13063
|
+
let ue = jn((e) => {
|
|
13058
13064
|
if (e.pointerId !== te.current) return;
|
|
13059
13065
|
te.current = null, ne.current?.abort(), ne.current = null, h(!1), _(!1), D(null);
|
|
13060
13066
|
let t = j.current;
|
|
@@ -13076,7 +13082,7 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13076
13082
|
}), p(void 0));
|
|
13077
13083
|
});
|
|
13078
13084
|
function de(e) {
|
|
13079
|
-
if (e.button !== 0 || (e.pointerType === "touch" && d.pauseTimers(),
|
|
13085
|
+
if (e.button !== 0 || (e.pointerType === "touch" && d.pauseTimers(), Ln(e.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${_v}`))) return;
|
|
13080
13086
|
P.current = !1, M.current = void 0, N.current = 0, te.current = e.pointerId, A.current = {
|
|
13081
13087
|
x: e.clientX,
|
|
13082
13088
|
y: e.clientY
|
|
@@ -13088,7 +13094,7 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13088
13094
|
}), d.set("hovering", !0), h(!0), _(!1), D(null), I.current = !0, ne.current?.abort();
|
|
13089
13095
|
let r = new AbortController();
|
|
13090
13096
|
ne.current = r;
|
|
13091
|
-
let i =
|
|
13097
|
+
let i = Wn(t);
|
|
13092
13098
|
i.addEventListener("pointerup", ue, { signal: r.signal }), i.addEventListener("pointercancel", ue, { signal: r.signal }), t.setPointerCapture?.(e.pointerId);
|
|
13093
13099
|
}
|
|
13094
13100
|
function fe(e) {
|
|
@@ -13125,7 +13131,7 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13125
13131
|
}
|
|
13126
13132
|
function pe(e) {
|
|
13127
13133
|
if (e.key === "Escape") {
|
|
13128
|
-
if (!O.current || !
|
|
13134
|
+
if (!O.current || !En(O.current, xn(Wn(O.current)))) return;
|
|
13129
13135
|
d.closeToast(n.id);
|
|
13130
13136
|
}
|
|
13131
13137
|
}
|
|
@@ -13133,9 +13139,9 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13133
13139
|
let e = O.current;
|
|
13134
13140
|
if (!u || !e) return;
|
|
13135
13141
|
function t(t) {
|
|
13136
|
-
te.current !== null &&
|
|
13142
|
+
te.current !== null && En(e, Ln(t)) && t.preventDefault();
|
|
13137
13143
|
}
|
|
13138
|
-
return
|
|
13144
|
+
return kn(e, "touchmove", t, { passive: !1 });
|
|
13139
13145
|
}, [u]);
|
|
13140
13146
|
function me() {
|
|
13141
13147
|
let e = v.x - b.x, t = v.y - b.y;
|
|
@@ -13186,7 +13192,7 @@ var ov = "--toast-index", sv = "--toast-offset-y", cv = "--toast-height", lv = "
|
|
|
13186
13192
|
type: n.type,
|
|
13187
13193
|
swiping: m,
|
|
13188
13194
|
swipeDirection: f
|
|
13189
|
-
}, ye =
|
|
13195
|
+
}, ye = zn("div", e, {
|
|
13190
13196
|
ref: [t, O],
|
|
13191
13197
|
state: ve,
|
|
13192
13198
|
stateAttributesMapping: fv,
|
|
@@ -13202,7 +13208,7 @@ process.env.NODE_ENV !== "production" && (vv.displayName = "ToastRoot");
|
|
|
13202
13208
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_date-fns@3.6.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/content/ToastContent.mjs
|
|
13203
13209
|
var yv = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
13204
13210
|
let { render: n, className: r, style: i, ...a } = e, { visibleIndex: o, expanded: s, recalculateHeight: c } = rv(), l = U.useRef(null);
|
|
13205
|
-
return
|
|
13211
|
+
return Sn(() => {
|
|
13206
13212
|
c();
|
|
13207
13213
|
let e = l.current;
|
|
13208
13214
|
if (!e || typeof ResizeObserver != "function" || typeof MutationObserver != "function") return;
|
|
@@ -13214,7 +13220,7 @@ var yv = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
|
13214
13220
|
}), () => {
|
|
13215
13221
|
t.disconnect(), n.disconnect();
|
|
13216
13222
|
};
|
|
13217
|
-
}, [c]),
|
|
13223
|
+
}, [c]), zn("div", e, {
|
|
13218
13224
|
ref: [t, l],
|
|
13219
13225
|
state: {
|
|
13220
13226
|
expanded: s,
|
|
@@ -13237,7 +13243,7 @@ function xv(e) {
|
|
|
13237
13243
|
function Sv(e, t, n) {
|
|
13238
13244
|
let { toast: r, setTitleId: i, setDescriptionId: a } = rv(), o = n === "title" ? i : a, s = t ?? (n === "title" ? r.title : r.description);
|
|
13239
13245
|
return {
|
|
13240
|
-
id:
|
|
13246
|
+
id: Pn(e),
|
|
13241
13247
|
children: s,
|
|
13242
13248
|
type: r.type,
|
|
13243
13249
|
setId: o
|
|
@@ -13245,7 +13251,7 @@ function Sv(e, t, n) {
|
|
|
13245
13251
|
}
|
|
13246
13252
|
function Cv(e, t, n) {
|
|
13247
13253
|
let r = xv(e);
|
|
13248
|
-
return
|
|
13254
|
+
return Sn(() => {
|
|
13249
13255
|
if (r) return n(t), () => {
|
|
13250
13256
|
n((e) => e === t ? void 0 : e);
|
|
13251
13257
|
};
|
|
@@ -13259,7 +13265,7 @@ function Cv(e, t, n) {
|
|
|
13259
13265
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_date-fns@3.6.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/description/ToastDescription.mjs
|
|
13260
13266
|
var wv = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
13261
13267
|
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } = Sv(a, o, "description");
|
|
13262
|
-
return Cv(
|
|
13268
|
+
return Cv(zn("p", e, {
|
|
13263
13269
|
ref: t,
|
|
13264
13270
|
state: { type: u },
|
|
13265
13271
|
props: {
|
|
@@ -13274,7 +13280,7 @@ process.env.NODE_ENV !== "production" && (wv.displayName = "ToastDescription");
|
|
|
13274
13280
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_date-fns@3.6.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/title/ToastTitle.mjs
|
|
13275
13281
|
var Tv = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
13276
13282
|
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } = Sv(a, o, "title");
|
|
13277
|
-
return Cv(
|
|
13283
|
+
return Cv(zn("h2", e, {
|
|
13278
13284
|
ref: t,
|
|
13279
13285
|
state: { type: u },
|
|
13280
13286
|
props: {
|
|
@@ -13300,12 +13306,12 @@ function Ev() {
|
|
|
13300
13306
|
//#endregion
|
|
13301
13307
|
//#region src/elements/Toast/components/ToastCloseButton.tsx
|
|
13302
13308
|
var Dv = ({ onClose: e }) => {
|
|
13303
|
-
let t =
|
|
13309
|
+
let t = z();
|
|
13304
13310
|
return /* @__PURE__ */ X("div", {
|
|
13305
13311
|
className: "dark flex-shrink-0",
|
|
13306
|
-
children: /* @__PURE__ */ X(
|
|
13312
|
+
children: /* @__PURE__ */ X(V, {
|
|
13307
13313
|
variant: "outline",
|
|
13308
|
-
icon:
|
|
13314
|
+
icon: ji,
|
|
13309
13315
|
size: "sm",
|
|
13310
13316
|
hideLabel: !0,
|
|
13311
13317
|
onClick: e,
|
|
@@ -13315,18 +13321,18 @@ var Dv = ({ onClose: e }) => {
|
|
|
13315
13321
|
}, Ov = ({ duration: e, color: t }) => /* @__PURE__ */ X("div", {
|
|
13316
13322
|
className: "absolute bottom-0 left-0 right-0 h-[3px] w-full overflow-hidden rounded-b-lg",
|
|
13317
13323
|
children: /* @__PURE__ */ X("div", {
|
|
13318
|
-
className:
|
|
13324
|
+
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),
|
|
13319
13325
|
style: { animationDuration: `${e}ms` }
|
|
13320
13326
|
})
|
|
13321
13327
|
}), kv = ({ linkActions: e, buttonActions: t, onActionClick: n }) => e.length === 0 && t.length === 0 ? null : /* @__PURE__ */ Z("div", {
|
|
13322
13328
|
className: "dark flex flex-shrink-0 flex-row flex-wrap items-center gap-3",
|
|
13323
13329
|
children: [e.map((e) => /* @__PURE__ */ X("div", {
|
|
13324
13330
|
onClick: () => n(e),
|
|
13325
|
-
children: /* @__PURE__ */ X(
|
|
13331
|
+
children: /* @__PURE__ */ X(Gi, {
|
|
13326
13332
|
href: e.href,
|
|
13327
13333
|
children: e.label
|
|
13328
13334
|
})
|
|
13329
|
-
}, `link-${e.label}`)), t.map((e) => /* @__PURE__ */ X(
|
|
13335
|
+
}, `link-${e.label}`)), t.map((e) => /* @__PURE__ */ X(V, {
|
|
13330
13336
|
label: e.label,
|
|
13331
13337
|
icon: e.icon,
|
|
13332
13338
|
variant: "outline",
|
|
@@ -13334,7 +13340,7 @@ var Dv = ({ onClose: e }) => {
|
|
|
13334
13340
|
onClick: () => n(e)
|
|
13335
13341
|
}, `button-${e.label}`))]
|
|
13336
13342
|
}), Av = (e, t) => {
|
|
13337
|
-
let n =
|
|
13343
|
+
let n = Lo(e);
|
|
13338
13344
|
return {
|
|
13339
13345
|
buttonActions: n.filter((e) => e.type === "button"),
|
|
13340
13346
|
linkActions: n.filter((e) => e.type === "link"),
|
|
@@ -13353,7 +13359,7 @@ var Dv = ({ onClose: e }) => {
|
|
|
13353
13359
|
children: t
|
|
13354
13360
|
}),
|
|
13355
13361
|
inStack: !1
|
|
13356
|
-
}), Mv = () => Oc(jv), Nv = (e) =>
|
|
13362
|
+
}), Mv = () => Oc(jv), Nv = (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"), Pv = Ya({
|
|
13357
13363
|
base: "text-base font-medium text-f1-foreground-inverse",
|
|
13358
13364
|
variants: { hasIcon: {
|
|
13359
13365
|
true: "pt-[3px]",
|
|
@@ -13378,19 +13384,19 @@ var Dv = ({ onClose: e }) => {
|
|
|
13378
13384
|
ref: c,
|
|
13379
13385
|
className: Nv(d),
|
|
13380
13386
|
children: [/* @__PURE__ */ Z("div", {
|
|
13381
|
-
className:
|
|
13387
|
+
className: B("flex flex-row gap-3", t ? "items-start" : "items-center"),
|
|
13382
13388
|
children: [
|
|
13383
13389
|
_ ? /* @__PURE__ */ X("div", {
|
|
13384
13390
|
className: "flex-shrink-0",
|
|
13385
13391
|
"aria-hidden": "true",
|
|
13386
|
-
children: /* @__PURE__ */ X(
|
|
13392
|
+
children: /* @__PURE__ */ X(Uo, {
|
|
13387
13393
|
size: "small",
|
|
13388
13394
|
className: "text-f1-foreground-inverse"
|
|
13389
13395
|
})
|
|
13390
13396
|
}) : g && /* @__PURE__ */ X("div", {
|
|
13391
13397
|
className: "flex-shrink-0",
|
|
13392
13398
|
"aria-hidden": "true",
|
|
13393
|
-
children: /* @__PURE__ */ X(
|
|
13399
|
+
children: /* @__PURE__ */ X(Ba, {
|
|
13394
13400
|
type: g,
|
|
13395
13401
|
size: "sm"
|
|
13396
13402
|
})
|
|
@@ -13429,12 +13435,12 @@ Rv.displayName = "F0Toast";
|
|
|
13429
13435
|
//#endregion
|
|
13430
13436
|
//#region src/elements/Toast/F0MessageToast.tsx
|
|
13431
13437
|
var zv = (e) => e instanceof Element && e.closest("button, a") !== null, Bv = Tc(({ avatar: e, sender: t, topic: n, message: r, moreCount: i = 0, onClick: a, duration: o, onClose: s, countdownKey: c, contentKey: l }, u) => {
|
|
13432
|
-
let d =
|
|
13438
|
+
let d = z(), { Title: f, Description: p, inStack: m } = Mv(), h = () => {
|
|
13433
13439
|
a?.(), s?.();
|
|
13434
13440
|
}, g = o != null && o > 0;
|
|
13435
13441
|
return /* @__PURE__ */ Z("div", {
|
|
13436
13442
|
ref: u,
|
|
13437
|
-
className:
|
|
13443
|
+
className: B(Nv(m), a && "cursor-pointer"),
|
|
13438
13444
|
onClick: a && !m ? (e) => {
|
|
13439
13445
|
zv(e.target) || h();
|
|
13440
13446
|
} : void 0,
|
|
@@ -13443,14 +13449,14 @@ var zv = (e) => e instanceof Element && e.closest("button, a") !== null, Bv = Tc
|
|
|
13443
13449
|
type: "button",
|
|
13444
13450
|
"aria-label": d.actions.view,
|
|
13445
13451
|
onClick: h,
|
|
13446
|
-
className:
|
|
13452
|
+
className: B("pointer-events-none absolute inset-0 rounded-lg", On("focus-visible:ring-inset"))
|
|
13447
13453
|
}) : null,
|
|
13448
13454
|
/* @__PURE__ */ Z("div", {
|
|
13449
13455
|
className: "flex flex-row items-start gap-3",
|
|
13450
13456
|
children: [
|
|
13451
13457
|
/* @__PURE__ */ X("div", {
|
|
13452
13458
|
className: "flex-shrink-0",
|
|
13453
|
-
children: /* @__PURE__ */ X(
|
|
13459
|
+
children: /* @__PURE__ */ X(bo, {
|
|
13454
13460
|
avatar: e,
|
|
13455
13461
|
size: "md"
|
|
13456
13462
|
})
|
|
@@ -13494,7 +13500,7 @@ var zv = (e) => e instanceof Element && e.closest("button, a") !== null, Bv = Tc
|
|
|
13494
13500
|
Bv.displayName = "F0MessageToast";
|
|
13495
13501
|
//#endregion
|
|
13496
13502
|
//#region src/elements/Toast/stack/ToastItem.tsx
|
|
13497
|
-
var Vv =
|
|
13503
|
+
var Vv = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 flex w-full origin-bottom select-none flex-col justify-end rounded-lg", On(), "before:pointer-events-none before:absolute before:inset-x-0 before:bottom-0 before:-z-10 before:rounded-lg before:shadow-lg before:content-['']", "before:border before:border-solid before:border-f1-border-inverse", "before:bg-f1-background-inverse before:bg-[linear-gradient(hsl(var(--neutral-90)),hsl(var(--neutral-90)))]", "dark:before:bg-f1-background-tertiary dark:before:bg-[linear-gradient(hsl(var(--neutral-5)),hsl(var(--neutral-5)))]", "before:h-[var(--height)] data-[expanded]:before:h-[var(--toast-height)]", "data-[ending-style]:before:h-full data-[expanded]:data-[ending-style]:before:h-full", "before:[transition:height_0.3s_cubic-bezier(0.22,1,0.36,1)] motion-reduce:before:[transition:none]", "[--gap:0.75rem] [--peek:6px]", "[--scale:calc(max(0,1_-_var(--toast-index)*0.05))] [--shrink:calc(1_-_var(--scale))]", "[--height:var(--toast-frontmost-height,var(--toast-height))]", "[--offset-y:calc(var(--toast-offset-y)*-1_-_var(--toast-index)*var(--gap)_+_var(--toast-swipe-movement-y))]", "z-[calc(1000_-_var(--toast-index))]", "h-[var(--height)] data-[expanded]:h-[var(--toast-height)]", "[interpolate-size:numeric-only]", "[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)_-_var(--toast-index)*var(--peek)_-_var(--shrink)*var(--height)))_scale(var(--scale))]", "data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]", "after:absolute after:left-0 after:top-full after:h-[calc(var(--gap)_+_1px)] after:w-full after:content-['']", "data-[buried]:invisible data-[buried]:opacity-0 data-[expanded]:data-[buried]:visible data-[expanded]:data-[buried]:opacity-100", "data-[starting-style]:[transform:translateY(150%)]", "data-[ending-style]:opacity-0 group-data-[clearing]/toasts:data-[ending-style]:opacity-100", "[--exit-drop:100%]", "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(calc(var(--toast-swipe-movement-y)_-_var(--toast-index)*var(--peek)_-_var(--shrink)*var(--height,0px)_+_var(--exit-drop)))_scale(var(--scale))]", "[&[data-ending-style][data-expanded]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(calc(var(--offset-y)_+_var(--exit-drop)))]", "data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)_+_150%))]", "data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)_+_150%))_translateY(var(--offset-y))]", "[transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s]", "motion-reduce:[transition:opacity_0.2s]"), Hv = B("shrink-0 overflow-hidden rounded-lg", "[--content-shift:calc(var(--toast-height,var(--height))_-_var(--height))]", "group-data-[ending-style]/toast:h-full", "[transform:translateY(var(--content-shift))] [clip-path:inset(0_0_max(0px,var(--content-shift))_0_round_theme(borderRadius.lg))]", "data-[expanded]:[transform:none] data-[expanded]:[clip-path:inset(0_0_0_0_round_theme(borderRadius.lg))]", "[transition:opacity_250ms_cubic-bezier(0.22,1,0.36,1),transform_0.3s_cubic-bezier(0.22,1,0.36,1),clip-path_0.3s_cubic-bezier(0.22,1,0.36,1)]", "data-[behind]:opacity-0 data-[expanded]:opacity-100", "data-[behind]:[transition:opacity_250ms_cubic-bezier(0.22,1,0.36,1)_300ms,transform_0.3s_cubic-bezier(0.22,1,0.36,1),clip-path_0.3s_cubic-bezier(0.22,1,0.36,1)]", "data-[expanded]:data-[behind]:[transition:opacity_250ms_cubic-bezier(0.22,1,0.36,1),transform_0.3s_cubic-bezier(0.22,1,0.36,1),clip-path_0.3s_cubic-bezier(0.22,1,0.36,1)]", "motion-reduce:[transition:opacity_250ms] motion-reduce:data-[behind]:[transition:opacity_250ms]"), Uv = ["down", "right"], Wv = {
|
|
13498
13504
|
Title: ({ className: e, children: t }) => /* @__PURE__ */ X(Tv, {
|
|
13499
13505
|
className: e,
|
|
13500
13506
|
render: /* @__PURE__ */ X("p", {}),
|
|
@@ -13571,10 +13577,10 @@ var Vv = H("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
13571
13577
|
expanded: n + (e.length > 1 ? Zv : 0)
|
|
13572
13578
|
};
|
|
13573
13579
|
}, ty = ({ onClear: e }) => {
|
|
13574
|
-
let t =
|
|
13580
|
+
let t = z(), { close: n } = Ev();
|
|
13575
13581
|
return /* @__PURE__ */ X("div", {
|
|
13576
|
-
className:
|
|
13577
|
-
children: /* @__PURE__ */ X(
|
|
13582
|
+
className: B("pointer-events-auto absolute right-0 flex h-[var(--clear-all-row)] items-start justify-end", "bottom-[calc(var(--stack-expanded-height)_-_var(--clear-all-row))]", "invisible opacity-0 [transform:translateY(calc(var(--stack-expanded-height)_-_var(--stack-collapsed-height)))]", "group-data-[expanded]/toasts:visible group-data-[expanded]/toasts:opacity-100 group-data-[expanded]/toasts:[transform:none]", "[transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s_cubic-bezier(0.22,1,0.36,1),visibility_0.5s]", "motion-reduce:[transition:opacity_0.2s,visibility_0.2s]"),
|
|
13583
|
+
children: /* @__PURE__ */ X(V, {
|
|
13578
13584
|
variant: "outline",
|
|
13579
13585
|
size: "sm",
|
|
13580
13586
|
label: t.toasts.clearAll,
|
|
@@ -13609,7 +13615,7 @@ var Vv = H("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
13609
13615
|
};
|
|
13610
13616
|
return /* @__PURE__ */ Z(tv, {
|
|
13611
13617
|
ref: a,
|
|
13612
|
-
className:
|
|
13618
|
+
className: B("group/toasts pointer-events-auto relative w-full", "h-[var(--stack-collapsed-height)] data-[expanded]:h-[var(--stack-expanded-height)]", "data-[clearing]:opacity-0", "[transition:height_0.3s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s] motion-reduce:[transition:opacity_0.2s]"),
|
|
13613
13619
|
"aria-label": e,
|
|
13614
13620
|
"data-clearing": l ? "" : void 0,
|
|
13615
13621
|
"data-window-blurred": t ? "" : void 0,
|
|
@@ -13621,7 +13627,7 @@ var Vv = H("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
13621
13627
|
});
|
|
13622
13628
|
}, iy = "#content", ay = (e) => {
|
|
13623
13629
|
let [t, n] = J({ inset: 0 });
|
|
13624
|
-
return
|
|
13630
|
+
return ar(function() {
|
|
13625
13631
|
if (!e || typeof document > "u") return;
|
|
13626
13632
|
let t = document.querySelector(iy);
|
|
13627
13633
|
if (!t) {
|
|
@@ -13652,7 +13658,7 @@ var Vv = H("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
13652
13658
|
};
|
|
13653
13659
|
}, []), e;
|
|
13654
13660
|
}, sy = Infinity, cy = ({ messages: e, app: t }) => {
|
|
13655
|
-
let [n, r] = J(!1), [i, a] = J(!1), o = ay(n || i), s = oy(), c =
|
|
13661
|
+
let [n, r] = J(!1), [i, a] = J(!1), o = ay(n || i), s = oy(), c = z();
|
|
13656
13662
|
return /* @__PURE__ */ X("div", {
|
|
13657
13663
|
className: "pointer-events-none fixed z-[100] flex flex-col-reverse items-center overflow-y-auto overflow-x-hidden py-6",
|
|
13658
13664
|
style: o,
|
|
@@ -13703,20 +13709,20 @@ var Vv = H("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
13703
13709
|
}) }, c), o) : null, e] });
|
|
13704
13710
|
}, uy = ({ children: e, link: t, privacyModeInitiallyEnabled: n, image: r, i18n: i, l10n: a, hourCycle: o, isDev: s = !1, showExperimentalWarnings: c = !1, renderDataTestIdAttribute: l = !1 }) => /* @__PURE__ */ X(at, {
|
|
13705
13711
|
reducedMotion: "user",
|
|
13706
|
-
children: /* @__PURE__ */ X(
|
|
13712
|
+
children: /* @__PURE__ */ X(hn, {
|
|
13707
13713
|
isDev: s,
|
|
13708
13714
|
showExperimentalWarnings: c,
|
|
13709
13715
|
renderDataTestIdAttribute: l,
|
|
13710
13716
|
hourCycle: o,
|
|
13711
|
-
children: /* @__PURE__ */ X(
|
|
13717
|
+
children: /* @__PURE__ */ X(Os, {
|
|
13712
13718
|
...a,
|
|
13713
|
-
children: /* @__PURE__ */ X(
|
|
13719
|
+
children: /* @__PURE__ */ X(gn, {
|
|
13714
13720
|
...i,
|
|
13715
|
-
children: /* @__PURE__ */ X(
|
|
13721
|
+
children: /* @__PURE__ */ X(or, {
|
|
13716
13722
|
...t,
|
|
13717
|
-
children: /* @__PURE__ */ X(
|
|
13723
|
+
children: /* @__PURE__ */ X(qa, { children: /* @__PURE__ */ X(St, {
|
|
13718
13724
|
initiallyEnabled: n,
|
|
13719
|
-
children: /* @__PURE__ */ X(
|
|
13725
|
+
children: /* @__PURE__ */ X(no, {
|
|
13720
13726
|
...r,
|
|
13721
13727
|
children: e
|
|
13722
13728
|
})
|
|
@@ -13727,14 +13733,14 @@ var Vv = H("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
13727
13733
|
})
|
|
13728
13734
|
}), dy = wc(null), fy = ({ children: e, fullScreen: t = !0 }) => {
|
|
13729
13735
|
let n = q(null), [r, i] = J(n.current);
|
|
13730
|
-
return
|
|
13736
|
+
return ar(() => {
|
|
13731
13737
|
i(n.current);
|
|
13732
13738
|
}, []), /* @__PURE__ */ X(dy.Provider, {
|
|
13733
13739
|
value: { element: r },
|
|
13734
13740
|
children: /* @__PURE__ */ Z("div", {
|
|
13735
13741
|
ref: n,
|
|
13736
13742
|
id: "f0-layout",
|
|
13737
|
-
className:
|
|
13743
|
+
className: B({ "flex h-screen w-screen flex-col bg-[#F5F6F8] dark:bg-[#0D1625]": t }),
|
|
13738
13744
|
children: [e, /* @__PURE__ */ X("div", {
|
|
13739
13745
|
id: "f0-overlay-root",
|
|
13740
13746
|
className: "contents"
|
|
@@ -13753,9 +13759,9 @@ var Vv = H("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
13753
13759
|
renderDataTestIdAttribute: d,
|
|
13754
13760
|
children: /* @__PURE__ */ X(fy, {
|
|
13755
13761
|
...t,
|
|
13756
|
-
children: /* @__PURE__ */ X(
|
|
13762
|
+
children: /* @__PURE__ */ X(ri, {
|
|
13757
13763
|
handler: l,
|
|
13758
|
-
children: /* @__PURE__ */ X(
|
|
13764
|
+
children: /* @__PURE__ */ X(dr, { children: /* @__PURE__ */ X(lt, {
|
|
13759
13765
|
...p,
|
|
13760
13766
|
children: /* @__PURE__ */ X(py.Provider, {
|
|
13761
13767
|
value: f,
|
|
@@ -13772,4 +13778,4 @@ var Vv = H("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
13772
13778
|
})
|
|
13773
13779
|
});
|
|
13774
13780
|
//#endregion
|
|
13775
|
-
export {
|
|
13781
|
+
export { wr as AiChatTranslationsProvider, Xt as AreaChart, Vs as Await, cn as BarChart, yt as BarChartSkeleton, t as CardSelectableContainer, ze as CategoryBarChart, Mi as ChatSpinner, To as Chip, Ir as CollapsibleGroup, rn as ComboChart, ct as DATA_COLLECTION_URL_PARAMS, rt as DATA_COLLECTION_URL_PARAM_PREFIX, Ll as Dashboard, Pe as DataChartEmptyStateView, pn as DataTestIdWrapper, vt as DndProvider, ii as DropOverlay, Xn as EmojiImage, Md as F0Accordion, wt as F0ActionBar, Si as F0ActionItem, ta as F0AiChat, Tr as F0AiChatCreditsButton, Nr as F0AiChatHeader, Ar as F0AiChatHistory, za as F0AiChatProvider, fr as F0AiChatTextArea, mr as F0AiChatUsageLimitsButton, xr as F0AiFileAttachments, Ma as F0AiFilePreviewsProvider, $r as F0AiFormRegistryProvider, Pr as F0AiInsightCard, Sr as F0AiMask, Er as F0AiMessageSources, lr as F0AiMessagesContainer, La as F0AiPong, Br as F0AiProcessingOverlay, Dr as F0AiProposalCard, Vr as F0AiTableCard, un as F0Alert, H_ as F0AnalyticsDashboard, Td as F0AudioPlayer, Ed as F0AudioPlayerCard, Or as F0AuraVoiceAnimation, bo as F0Avatar, Ba as F0AvatarAlert, mo as F0AvatarCompany, ia as F0AvatarDate, ro as F0AvatarEmoji, $a as F0AvatarFile, Qa as F0AvatarIcon, ho as F0AvatarList, eo as F0AvatarModule, io as F0AvatarPerson, yo as F0AvatarTeam, au as F0BigNumber, Mh as F0BookAMeetingCard, ao as F0Box, V as F0Button, Jr as F0ButtonDropdown, Rs as F0ButtonToggle, Mr as F0CanvasCard, ka as F0CanvasPanel, Qr as F0Card, ni as F0CardRow, Ua as F0ChatComposer, rs as F0Checkbox, Id as F0ChipList, Hr as F0ClarifyingPanel, dt as F0DataChart, _e as F0DatePicker, i as F0DatePickerInline, Oh as F0DemoCard, ra as F0Dialog, m as F0DialogAlikeContext, S as F0DialogAlikeProvider, Io as F0DialogContext, Es as F0DialogProvider, bc as F0DocumentViewer, Wd as F0Drawer, ht as F0DurationInput, Fs as F0EventCatcherProvider, Ah as F0FAQCard, Ei as F0FileItem, qd as F0FilterPickerContent, fe as F0Form, cf as F0FormField, Dl as F0GridStack, kr as F0HILActionConfirmation, Qt as F0Heading, H as F0Icon, Gi as F0Link, jh as F0ModuleCard, on as F0NotesTextEditor, Le as F0NotesTextEditorSkeleton, u as F0NumberInput, f as F0NumberInputInline, Ci as F0OneIcon, _a as F0OneSwitch, yc as F0PdfViewer, hy as F0Provider, Nh as F0QuestionCardMultiStep, Ia as F0RichTextDisplay, ft as F0RichTextEditor, ys as F0SearchInput, js as F0Select, n as F0SelectInline, Yf as F0Slider, lp as F0TableOfContentPopover, Ho as F0TagAlert, jo as F0TagBalance, Wo as F0TagCompany, Vo as F0TagDot, Ts as F0TagList, Bo as F0TagPerson, ms as F0TagRaw, Eo as F0TagStatus, ps as F0TagTeam, sr as F0Text, $t as F0TextAreaInput, s as F0TextAreaInputInline, Di as F0TextInput, le as F0TextInputInline, o as F0TimelineRow, _c as F0VideoPlayer, jf as F0WizardForm, ls as F1SearchBox, P as FILE_TYPES, oi as FileItem, dr as FormCardValueFormatterProvider, Kt as FunnelChartSkeleton, lo as GROUP_ID_SYMBOL, vo as GROUP_KEY_SEPARATOR, qe as GaugeChartSkeleton, $e as HeatmapChartSkeleton, $l as HomeLayout, kt as InlineFieldRow, bt as InlineFieldRowList, qr as Input, Xl as Layout, ue as LineChart, At as LineChartSkeleton, Fe as MAX_URL_FILTER_VALUES, tn as NotesTextEditor, ce as NotesTextEditorSkeleton, ee as NumberInput, os as OneCalendar, Qo as OneCalendarInternal, nr as OneEllipsis, h as OneEmptyState, Ds as OneFilterPicker, c as PieChart, xt as PieChartSkeleton, Fi as PongBall, St as PrivacyModeProvider, hh as ProductBlankslate, et as ProductCard, vh as ProductModal, bh as ProductWidget, en as ProgressBarChart, me as RadarChart, st as RadarChartSkeleton, Ha as RichTextDisplay, M as RichTextEditor, nt as ScatterChartSkeleton, Zl as StandardLayout, Im as SurveyAllQuestionsLoadingSkeleton, oh as SurveyAnsweringForm, Om as SurveyFormBuilder, lh as SurveySampleQuestion, Lm as SurveySteppedLoadingSkeleton, gs as Tag, bs as TagCounter, pe as Textarea, zr as ThreadItem, Cr as ThreadListSkeleton, ly as ToastProvider, Ql as TwoColumnLayout, te as UPLOAD_INPUT_ID, j as UpsellRequestResponseDialog, Ch as UpsellingAlert, Th as UpsellingBanner, C as UpsellingButton, Dh as UpsellingPopover, p as VerticalBarChart, ts as WeekStartDay, It as actionBarStatuses, Kr as actionItemStatuses, Ga as adaptDataAdapterToInfiniteScroll, cr as aiChatFileFromShowFilesItem, jr as aiChatFileFromUploadedFile, hr as aiChatFilesFromMessage, gr as aiChatMessageText, br as aiTranslations, zd as alertVariantOptions, lu as audioPlayerSizes, eu as avatarVariants, Zt as buildDataCollectionUrlParams, mn as buildTranslations, cu as buttonDropdownModes, su as buttonDropdownSizes, ou as buttonDropdownVariants, Nl as buttonSizes, Ce as buttonToggleColors, ke as buttonToggleSizes, ie as buttonToggleVariants, Ml as buttonVariants, Nd as cardAlertVariants, ui as cardImageAspectRatios, Ri as cardImageFits, Ui as cardImageSizes, wo as chartColorTokens, Ls as chipVariants, mp as computeSectionEndIds, vc as configurePdfWorker, Lr as contentTypes, Gt as createAtlaskitDriver, qo as createDataSourceDefinition, Zd as createF0FormDefinitionTester, Xd as createF0FormTester, Al as createPageLayoutBlock, jl as createPageLayoutBlockGroup, pr as createPersonMentionSource, Bd as dataCollectionLocalStorageHandler, Ld as datePickerInlineDismissReasons, Rd as datepickerSizes, Za as defaultTranslations, Bi as defineAvailableForm, Jd as describeFormSchema, O as dialog, O as dialogs, Nt as drawers, ya as durationInputSizes, Oa as durationUnits, Yt as evaluateRenderIf, _n as experimental, mi as f0FileItemSizes, qi as f0FormField, Ea as fieldsToSeconds, up as flattenElements, du as formatPlaybackTime, Lf as forms, tt as generateAnchorId, Jo as getAnimationVariants, ha as getDataCollectionStorageKey, Yo as getDataSourcePaginationType, tr as getEmojiLabel, Qi as getF0Config, Ps as getGranularityDefinition, as as getGranularityDefinitions, zs as getGranularitySimpleDefinition, sn as getSchemaDefinition, Ms as granularityDefinitions, Oi as hasF0Config, Xr as inferFieldType, pp as injectSectionEnds, go as isInfiniteScrollPagination, _o as isPageBasedPagination, oa as isZodType, Dd as linkVariants, vr as markdownRenderers, ti as mergeDataCollectionFilters, to as modules, yr as oneIconSizes, ln as parseDataCollectionUrlParams, Rf as pdfScales, Te as predefinedPresets, As as rangeSeparator, Ra as readDataCollectionStorage, fp as reconstructElements, Li as resolveDataCollectionFilters, xs as resolveGranularityDefinition, w as resolveItemNeighbors, E as resolveWindowNeighbors, fa as secondsToFields, ea as secondsToVisibleFields, zf as selectInlineDismissReasons, y as selectSizes, he as selectVariants, Be as setDataCollectionUrlParams, Bf as sliderTooltipModes, an as syncDataCollectionUrlParams, Zf as tagDotColors, Xf as timelineRowStatuses, Lt as toasts, va as unwrapZodSchema, Fr as usageLimitsPopoverSides, ki as useAiChat, Wr as useAiChatTranslations, Ht as useAudioPlayer, Gr as useCanvasEntity, Rr as useChatHistory, po as useData, Mo as useDataSource, g as useDataSourceItemNavigation, vu as useDerivedTranscription, Tt as useDndEvents, Rt as useDraggable, He as useDroppableList, $n as useEmojiConfetti, di as useF0AiFormRegistry, Fo as useF0Dialog, k as useF0DialogAlikeContext, Qe as useF0Form, Ct as useF0FormDefinition, ur as useFormCardValueFormatter, my as useFormComponent, No as useGroups, U_ as useIsDesktop, W_ as useIsMobile, jt as useItemNeighbors, Pt as usePrivacyMode, Zn as useReducedMotion, Re as useSchemaDefinition, Co as useSelectable, _r as useSetFormCardValueFormatter, Ur as useToolCallId, Ka as useXRay, R as withDataTestId, de as writeDataCollectionStorage };
|