@factorialco/f0-react 14.23.1 → 14.24.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/component-status.js +1 -1
- package/dist/f0.d.ts +20 -0
- package/dist/f0.js +946 -917
- package/package.json +1 -1
package/dist/f0.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
|
-
import { $ as t, $n as n, $r as r, $t as i, A as a, An as o, Ar as s, Bn as c, Bt as l, C as u, Ci as d, Cn as f, Cr as p, D as m, Dn as h, Dr as g, Dt as _, E as v, En as y, Er as b, F as x, Fn as S, Ft as C, Gn as w, Gr as T, Gt as E, Hn as D, Ht as O, I as k, In as A, It as j, Jn as M, Jr as N, Jt as P, Kn as F, Kr as
|
|
3
|
-
import { a as
|
|
4
|
-
import { n as
|
|
2
|
+
import { $ as t, $n as n, $r as r, $t as i, A as a, An as o, Ar as s, Bn as c, Bt as l, C as u, Ci as d, Cn as f, Cr as p, D as m, Dn as h, Dr as g, Dt as _, E as v, En as y, Er as b, F as x, Fn as S, Ft as C, Gn as w, Gr as T, Gt as E, Hn as D, Ht as O, I as k, In as A, It as j, Jn as M, Jr as N, Jt as P, Kn as F, Kr as I, Kt as ee, Ln as te, Lt as L, M as ne, Mn as re, Mr as ie, N as ae, Nn as oe, Nt as se, O as ce, On as le, Or as ue, P as de, Pn as fe, Pt as pe, Q as me, Qn as he, Qr as ge, Rn as _e, Rt as ve, S as ye, Sn as be, Sr as xe, T as Se, Tn as Ce, Tr as we, Un as Te, Ur as Ee, Ut as De, Vn as Oe, Vt as ke, Wn as Ae, Wt as je, Xn as Me, Xr as Ne, Xt as Pe, Yn as Fe, Zr as Ie, Zt as Le, _ as Re, _r as ze, _t as Be, an as Ve, ar as He, b as Ue, bi as We, bn as Ge, br as Ke, bt as qe, c as Je, cn as Ye, cr as Xe, ct as Ze, d as Qe, di as $e, dr as et, dt as tt, en as nt, er as rt, f as it, fi as at, fr as ot, gr as st, gt as ct, h as lt, hr as ut, ht as dt, i as ft, ii as pt, ir as mt, j as ht, jn as gt, jr as _t, k as vt, kn as yt, kr as bt, l as xt, ln as St, lr as Ct, m as wt, mr as Tt, mt as Et, ni as Dt, nn as Ot, nr as kt, on as At, or as jt, pr as Mt, pt as Nt, qn as Pt, qr as Ft, qt as It, ri as Lt, rr as Rt, s as zt, sn as Bt, sr as Vt, t as Ht, ti as Ut, tn as Wt, tr as Gt, u as Kt, ui as qt, ur as Jt, v as Yt, vi as Xt, vr as Zt, vt as Qt, w as $t, wn as en, wr as tn, x as nn, xn as rn, xr as an, y as on, yi as sn, yr as cn, yt as ln, zn as un } from "./CoachmarkProvider-DXN2crWr.js";
|
|
3
|
+
import { a as R, i as dn, n as fn, o as pn, r as z, t as mn } from "./i18n-provider-DzFN07EQ.js";
|
|
4
|
+
import { n as hn, t as gn } from "./skeleton-DISb7cNz.js";
|
|
5
5
|
import { A as _n, C as vn, D as yn, F as bn, I as xn, L as B, M as Sn, N as Cn, O as wn, P as Tn, R as En, S as Dn, _ as On, b as kn, c as An, f as jn, g as Mn, h as Nn, j as Pn, k as Fn, l as In, m as Ln, p as Rn, v as zn, w as Bn, x as Vn, y as Hn } from "./tooltip-DFMOxXQO.js";
|
|
6
6
|
import { A as Un, K as Wn, M as Gn, N as Kn, U as qn, b as Jn, f as Yn, h as Xn, j as Zn, m as Qn, n as $n, p as er, r as tr, t as V, w as nr, y as rr, z as ir } from "./F0Button-D5dCyc5y.js";
|
|
7
7
|
import { Ai as ar, An as or, B as sr, Bc as cr, Bi as lr, Br as ur, Bs as dr, Cc as fr, Ci as pr, Cr as mr, Di as hr, Do as gr, Dr as _r, Ds as vr, Ei as yr, Eo as br, Er as xr, F as Sr, Fc as Cr, Fi as wr, Fn as Tr, Gc as Er, Ho as Dr, I as Or, Ic as kr, Ii as Ar, Ir as jr, Ks as Mr, L as Nr, Lc as Pr, Li as Fr, Lr as Ir, M as Lr, Mc as Rr, Mi as zr, Mn as Br, Mo as Vr, Mr as Hr, N as Ur, Nc as Wr, Ni as Gr, Nn as Kr, No as qr, Ns as Jr, Oi as Yr, Oo as Xr, Or as Zr, P as Qr, Pc as $r, Pi as ei, Pn as ti, Qa as ni, Qc as ri, Qo as ii, Qr as ai, R as oi, Rc as si, Ri as ci, Rr as li, Si as ui, Tr as di, Uo as fi, Us as pi, Vr as mi, Ws as hi, Xo as gi, Xs as _i, Zr as vi, Zs as yi, _n as bi, bn as xi, bo as Si, ci as Ci, co as wi, dn as Ti, ds as Ei, gi as Di, gn as Oi, hi as ki, hn as Ai, ii as ji, ji as Mi, jn as Ni, jr as Pi, jt as Fi, ki as Ii, kn as Li, kr as Ri, lo as zi, mi as Bi, mn as Vi, n as Hi, nc as Ui, ni as Wi, ns as Gi, oi as Ki, pn as qi, ri as Ji, rt as Yi, t as Xi, tl as Zi, vi as Qi, wc as $i, wo as ea, wr as ta, xi as na, xn as ra, yc as ia, yi as aa, yn as oa, z as sa, zi as ca, zr as la } from "./F0CanvasPanel-DYzczaYb.js";
|
|
@@ -52,7 +52,7 @@ var Ac = {
|
|
|
52
52
|
className: "@container",
|
|
53
53
|
children: [/* @__PURE__ */ Z("div", {
|
|
54
54
|
className: "flex flex-col gap-6 px-5 pt-4 @md:pt-2 @5xl:hidden",
|
|
55
|
-
children: [/* @__PURE__ */ X(
|
|
55
|
+
children: [/* @__PURE__ */ X(at, {
|
|
56
56
|
columns: Ac,
|
|
57
57
|
showArrows: !1,
|
|
58
58
|
children: i
|
|
@@ -92,7 +92,7 @@ var Ac = {
|
|
|
92
92
|
})
|
|
93
93
|
}));
|
|
94
94
|
Nc.displayName = "StandardLayout";
|
|
95
|
-
var Pc =
|
|
95
|
+
var Pc = R(eo({
|
|
96
96
|
name: "StandardLayout",
|
|
97
97
|
type: "layout"
|
|
98
98
|
}, Nc)), Fc = yc(function({ children: e, sideContent: t, mainColumnPosition: n = "left", sticky: r = !1, responsiveStackOrder: i = "side" }, a) {
|
|
@@ -111,7 +111,7 @@ var Pc = L(eo({
|
|
|
111
111
|
})]
|
|
112
112
|
})
|
|
113
113
|
});
|
|
114
|
-
}), Ic =
|
|
114
|
+
}), Ic = R(eo({
|
|
115
115
|
name: "TwoColumnLayout",
|
|
116
116
|
type: "layout"
|
|
117
117
|
}, Fc)), Lc = ({ children: e, className: t }) => /* @__PURE__ */ X("aside", {
|
|
@@ -2728,7 +2728,7 @@ var bl = ({ options: e, widgets: t, onChange: n, className: r, static: i, forceP
|
|
|
2728
2728
|
});
|
|
2729
2729
|
};
|
|
2730
2730
|
bl.displayName = "F0GridStack";
|
|
2731
|
-
var xl =
|
|
2731
|
+
var xl = R(hn("F0GridStack", bl)), Sl = (e, t, n) => /* @__PURE__ */ X("div", { children: e }), Cl = ({ widgets: e = [], editMode: t = !1, onChange: n = () => {}, WidgetWrapper: r = Sl, main: i = !1, deps: a }) => {
|
|
2732
2732
|
let o = W((e, t, n) => /* @__PURE__ */ X(qn.div, {
|
|
2733
2733
|
className: "h-full w-full",
|
|
2734
2734
|
initial: {
|
|
@@ -2912,7 +2912,7 @@ var wl = (e, t) => {
|
|
|
2912
2912
|
}, Tl = (e, t) => {
|
|
2913
2913
|
let n = t;
|
|
2914
2914
|
return n.displayName = e, n.__isPageLayoutGroup = !0, n;
|
|
2915
|
-
}, El = Un.filter((e) => e !== "ai"), Dl = Gn, Ol = ({ children: e, title: t, draggable: n = !1, actions: r, aiButton: i }) => /* @__PURE__ */ X(
|
|
2915
|
+
}, El = Un.filter((e) => e !== "ai"), Dl = Gn, Ol = ({ children: e, title: t, draggable: n = !1, actions: r, aiButton: i }) => /* @__PURE__ */ X(pt, {
|
|
2916
2916
|
header: { title: t },
|
|
2917
2917
|
draggable: n,
|
|
2918
2918
|
actions: r,
|
|
@@ -2934,7 +2934,7 @@ var wl = (e, t) => {
|
|
|
2934
2934
|
})
|
|
2935
2935
|
});
|
|
2936
2936
|
kl.displayName = "Dashboard";
|
|
2937
|
-
var Al = Tl("Dashboard", kl), jl =
|
|
2937
|
+
var Al = Tl("Dashboard", kl), jl = R(hn("Dashboard", Al)), Ml = $a({
|
|
2938
2938
|
base: "flex w-full flex-col p-4",
|
|
2939
2939
|
variants: { variant: {
|
|
2940
2940
|
default: "",
|
|
@@ -3013,7 +3013,7 @@ Bl.displayName = "GroupLinear", Bl.__isPageLayoutGroup = !0;
|
|
|
3013
3013
|
//#region src/blocks/layouts/Layout/groups/GroupMasonry/components/SortableBlock.tsx
|
|
3014
3014
|
var Vl = ({ id: e, children: t }) => {
|
|
3015
3015
|
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o } = N({ id: e }), s = {
|
|
3016
|
-
transform:
|
|
3016
|
+
transform: Lt.Translate.toString(a),
|
|
3017
3017
|
transition: o,
|
|
3018
3018
|
flex: "1 1",
|
|
3019
3019
|
display: "flex",
|
|
@@ -3034,10 +3034,10 @@ var Vl = ({ id: e, children: t }) => {
|
|
|
3034
3034
|
render: e.render
|
|
3035
3035
|
})));
|
|
3036
3036
|
}, [e]);
|
|
3037
|
-
let [s, c] = J(null), l =
|
|
3037
|
+
let [s, c] = J(null), l = Dt(Ut(r), Ut(ge, { coordinateGetter: Ft }));
|
|
3038
3038
|
return /* @__PURE__ */ X("div", {
|
|
3039
3039
|
className: B("flex flex-wrap items-stretch gap-4", i && "flex-1"),
|
|
3040
|
-
children: /* @__PURE__ */ Z(
|
|
3040
|
+
children: /* @__PURE__ */ Z(Ne, {
|
|
3041
3041
|
sensors: l,
|
|
3042
3042
|
onDragStart: (e) => {
|
|
3043
3043
|
c(e.active.id);
|
|
@@ -3046,7 +3046,7 @@ var Vl = ({ id: e, children: t }) => {
|
|
|
3046
3046
|
let { active: t, over: n } = e;
|
|
3047
3047
|
c(null), n && t.id !== n.id && o((e) => {
|
|
3048
3048
|
let r = e.findIndex((e) => e.id === t.id), i = e.findIndex((e) => e.id === n.id);
|
|
3049
|
-
return
|
|
3049
|
+
return I(e, r, i);
|
|
3050
3050
|
});
|
|
3051
3051
|
},
|
|
3052
3052
|
children: [/* @__PURE__ */ X(T, {
|
|
@@ -3055,7 +3055,7 @@ var Vl = ({ id: e, children: t }) => {
|
|
|
3055
3055
|
id: e.id,
|
|
3056
3056
|
children: e.render
|
|
3057
3057
|
}, e.id))
|
|
3058
|
-
}), /* @__PURE__ */ X(
|
|
3058
|
+
}), /* @__PURE__ */ X(Ie, { children: s ? /* @__PURE__ */ X(Vl, {
|
|
3059
3059
|
id: s,
|
|
3060
3060
|
children: a.find((e) => e.id === s)?.render
|
|
3061
3061
|
}) : null })]
|
|
@@ -3087,13 +3087,13 @@ var Ul = yc(function({ children: e, aside: t, header: n, variant: r = "main-asid
|
|
|
3087
3087
|
})
|
|
3088
3088
|
});
|
|
3089
3089
|
}), Wl = {
|
|
3090
|
-
Page:
|
|
3091
|
-
Block:
|
|
3092
|
-
BlockContent:
|
|
3093
|
-
Group:
|
|
3094
|
-
GroupGrid:
|
|
3095
|
-
GroupMasonry:
|
|
3096
|
-
}, Gl = Pc, Kl = Ic, ql =
|
|
3090
|
+
Page: R(hn("Page", Ul)),
|
|
3091
|
+
Block: R(hn("Block", Fl)),
|
|
3092
|
+
BlockContent: R(hn("BlockContent", Il)),
|
|
3093
|
+
Group: R(hn("Group", Bl)),
|
|
3094
|
+
GroupGrid: R(hn("GroupGrid", Cl)),
|
|
3095
|
+
GroupMasonry: R(hn("GroupMasonry", Hl))
|
|
3096
|
+
}, Gl = Pc, Kl = Ic, ql = R(eo({
|
|
3097
3097
|
name: "HomeLayout",
|
|
3098
3098
|
type: "layout"
|
|
3099
3099
|
}, jc)), Jl = [
|
|
@@ -3133,13 +3133,13 @@ var Ul = yc(function({ children: e, aside: t, header: n, variant: r = "main-asid
|
|
|
3133
3133
|
});
|
|
3134
3134
|
}, Zl = () => /* @__PURE__ */ Z("div", {
|
|
3135
3135
|
className: "relative flex h-full w-full cursor-progress flex-col gap-2",
|
|
3136
|
-
children: [/* @__PURE__ */ X(
|
|
3136
|
+
children: [/* @__PURE__ */ X(gn, { className: "h-3 w-full max-w-16 rounded-md" }), /* @__PURE__ */ Z("div", {
|
|
3137
3137
|
className: "flex flex-row flex-wrap items-end gap-2",
|
|
3138
|
-
children: [/* @__PURE__ */ X(
|
|
3138
|
+
children: [/* @__PURE__ */ X(gn, { className: "h-8 w-full max-w-36 rounded-sm" }), /* @__PURE__ */ X(gn, { className: "h-6 w-full max-w-18 rounded-sm" })]
|
|
3139
3139
|
})]
|
|
3140
3140
|
});
|
|
3141
3141
|
Xl.displayName = "F0BigNumber";
|
|
3142
|
-
var Ql = Si(Xl, Zl), $l =
|
|
3142
|
+
var Ql = Si(Xl, Zl), $l = R(Ql), eu = [
|
|
3143
3143
|
"default",
|
|
3144
3144
|
"outline",
|
|
3145
3145
|
"neutral"
|
|
@@ -3169,7 +3169,7 @@ var Ql = Si(Xl, Zl), $l = L(Ql), eu = [
|
|
|
3169
3169
|
}
|
|
3170
3170
|
})
|
|
3171
3171
|
}), ou = ({ item: e, open: t, onOpenChange: n }) => {
|
|
3172
|
-
let r = Xn(), i =
|
|
3172
|
+
let r = Xn(), i = z().t(t ? "actions.collapseItem" : "actions.expandItem", { title: e.title }), a = !!e.actions && e.actions.length > 0;
|
|
3173
3173
|
return /* @__PURE__ */ X(yr, {
|
|
3174
3174
|
open: t,
|
|
3175
3175
|
onOpenChange: n,
|
|
@@ -3246,7 +3246,7 @@ var Ql = Si(Xl, Zl), $l = L(Ql), eu = [
|
|
|
3246
3246
|
className: B("flex flex-col rounded-md border border-solid border-f1-border-secondary", "overflow-hidden bg-f1-background"),
|
|
3247
3247
|
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ Z(_c, { children: [t > 0 ? /* @__PURE__ */ X("div", { className: "h-px w-full bg-f1-border-secondary" }) : null, /* @__PURE__ */ Z("div", {
|
|
3248
3248
|
className: "flex items-center gap-3 px-4 py-3",
|
|
3249
|
-
children: [/* @__PURE__ */ X(
|
|
3249
|
+
children: [/* @__PURE__ */ X(gn, { className: "h-4 flex-1 max-w-48" }), /* @__PURE__ */ X(gn, { className: "ml-auto h-7 w-7 shrink-0 rounded" })]
|
|
3250
3250
|
})] }, t))
|
|
3251
3251
|
}), cu = yc((e, t) => {
|
|
3252
3252
|
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] = ec({
|
|
@@ -3269,7 +3269,7 @@ var Ql = Si(Xl, Zl), $l = L(Ql), eu = [
|
|
|
3269
3269
|
});
|
|
3270
3270
|
});
|
|
3271
3271
|
cu.displayName = "F0Accordion";
|
|
3272
|
-
var lu =
|
|
3272
|
+
var lu = R(hn("F0Accordion", Si(cu, su))), uu = [
|
|
3273
3273
|
"info",
|
|
3274
3274
|
"warning",
|
|
3275
3275
|
"critical",
|
|
@@ -3327,7 +3327,7 @@ var fu = ({ chips: e, max: t = 4, remainingCount: n, layout: r = "compact" }) =>
|
|
|
3327
3327
|
});
|
|
3328
3328
|
};
|
|
3329
3329
|
fu.displayName = "F0ChipList";
|
|
3330
|
-
var pu =
|
|
3330
|
+
var pu = R(hn("F0ChipList", fu)), mu = [
|
|
3331
3331
|
"blur",
|
|
3332
3332
|
"escape",
|
|
3333
3333
|
"commit",
|
|
@@ -3364,7 +3364,7 @@ var pu = L(gn("F0ChipList", fu)), mu = [
|
|
|
3364
3364
|
disableContentPadding: _ ?? !1,
|
|
3365
3365
|
children: r
|
|
3366
3366
|
}),
|
|
3367
|
-
/* @__PURE__ */ X(
|
|
3367
|
+
/* @__PURE__ */ X(Oe, {
|
|
3368
3368
|
primaryAction: o ?? [],
|
|
3369
3369
|
secondaryAction: s ?? [],
|
|
3370
3370
|
onClose: () => x(!1)
|
|
@@ -3383,7 +3383,7 @@ var pu = L(gn("F0ChipList", fu)), mu = [
|
|
|
3383
3383
|
o,
|
|
3384
3384
|
s
|
|
3385
3385
|
]);
|
|
3386
|
-
return /* @__PURE__ */ X(
|
|
3386
|
+
return /* @__PURE__ */ X(un, {
|
|
3387
3387
|
isOpen: b,
|
|
3388
3388
|
onClose: t,
|
|
3389
3389
|
position: i,
|
|
@@ -3398,9 +3398,9 @@ var pu = L(gn("F0ChipList", fu)), mu = [
|
|
|
3398
3398
|
});
|
|
3399
3399
|
}, yu = (e) => /* @__PURE__ */ X(vu, { ...e });
|
|
3400
3400
|
yu.displayName = "F0Drawer";
|
|
3401
|
-
var bu =
|
|
3401
|
+
var bu = hn("F0Drawer", yu), xu = 388;
|
|
3402
3402
|
function Su({ filters: e, value: t, onChange: n, height: r, width: i = 600, className: a, showApplyButton: o = !0, applyButtonLabel: s, dataTestId: c }) {
|
|
3403
|
-
let l =
|
|
3403
|
+
let l = z(), u = Object.keys(e)[0] ?? null, [d, f] = J(u), [p, m] = J(t);
|
|
3404
3404
|
G(() => {
|
|
3405
3405
|
m(t);
|
|
3406
3406
|
}, [t]), G(() => {
|
|
@@ -3435,7 +3435,7 @@ function Su({ filters: e, value: t, onChange: n, height: r, width: i = 600, clas
|
|
|
3435
3435
|
let r = ss(n.type);
|
|
3436
3436
|
return Math.max(e, r?.formHeight || xu);
|
|
3437
3437
|
}, 0), [e, r]);
|
|
3438
|
-
return !e || Object.keys(e).length === 0 ? null : /* @__PURE__ */ X(
|
|
3438
|
+
return !e || Object.keys(e).length === 0 ? null : /* @__PURE__ */ X(dn, {
|
|
3439
3439
|
dataTestId: c,
|
|
3440
3440
|
children: /* @__PURE__ */ X("div", {
|
|
3441
3441
|
className: B("overflow-hidden rounded-xl border border-solid border-f1-border-secondary bg-f1-background", a),
|
|
@@ -3506,7 +3506,7 @@ function Eu(e) {
|
|
|
3506
3506
|
let i = {
|
|
3507
3507
|
...n,
|
|
3508
3508
|
...e
|
|
3509
|
-
}, a =
|
|
3509
|
+
}, a = Ge(t, i), o = {};
|
|
3510
3510
|
for (let [e, t] of Object.entries(i)) o[e] = t === null ? void 0 : t;
|
|
3511
3511
|
let s = r ? { errorMap: r } : void 0, c = await a.safeParseAsync(o, s);
|
|
3512
3512
|
if (c.success) return {
|
|
@@ -3699,25 +3699,25 @@ var Ou = ({ isOpen: e = !1, onClose: t = () => {}, type: n, title: r, descriptio
|
|
|
3699
3699
|
children: e.content
|
|
3700
3700
|
}, e.id) }, e.id)) });
|
|
3701
3701
|
}, Mu = ({ children: e }) => {
|
|
3702
|
-
let t = Ec(
|
|
3702
|
+
let t = Ec(It.subscribe, It.getSnapshot, It.getServerSnapshot), n = z(), [r, i] = J(null);
|
|
3703
3703
|
G(() => {
|
|
3704
|
-
let e =
|
|
3704
|
+
let e = It.acquireRenderer();
|
|
3705
3705
|
return i(e.id), e.release;
|
|
3706
3706
|
}, []);
|
|
3707
|
-
let a = Ec(
|
|
3707
|
+
let a = Ec(It.subscribeRenderer, It.getActiveRendererId, () => null), o = r !== null && r === a;
|
|
3708
3708
|
return G(() => {
|
|
3709
|
-
|
|
3709
|
+
It.setDefaultActionLabels({
|
|
3710
3710
|
ok: n.actions.ok,
|
|
3711
3711
|
cancel: n.actions.cancel
|
|
3712
3712
|
});
|
|
3713
3713
|
}, [n]), /* @__PURE__ */ Z(Y, { children: [o && typeof document < "u" ? Oc(/* @__PURE__ */ X(ju, { items: t }), document.body) : null, e] });
|
|
3714
3714
|
}, Nu = 200, Pu = ({ children: e }) => {
|
|
3715
|
-
let t = Ec(
|
|
3715
|
+
let t = Ec(De.subscribe, De.getSnapshot, De.getServerSnapshot), [n, r] = J(null);
|
|
3716
3716
|
G(() => {
|
|
3717
|
-
let e =
|
|
3717
|
+
let e = De.acquireRenderer();
|
|
3718
3718
|
return r(e.id), e.release;
|
|
3719
3719
|
}, []);
|
|
3720
|
-
let i = Ec(
|
|
3720
|
+
let i = Ec(De.subscribeRenderer, De.getActiveRendererId, () => null);
|
|
3721
3721
|
return /* @__PURE__ */ Z(Y, { children: [n !== null && n === i && typeof document < "u" ? Oc(/* @__PURE__ */ X(Fu, { items: t }), document.body) : null, e] });
|
|
3722
3722
|
}, Fu = ({ items: e }) => {
|
|
3723
3723
|
let [t, n] = J(e), r = q(e), i = q(/* @__PURE__ */ new Map());
|
|
@@ -3758,9 +3758,9 @@ function Iu({ children: e }) {
|
|
|
3758
3758
|
registerInlineRow: void 0,
|
|
3759
3759
|
nullableEmptyFields: void 0
|
|
3760
3760
|
}, [t]);
|
|
3761
|
-
return /* @__PURE__ */ X(
|
|
3761
|
+
return /* @__PURE__ */ X(en.Provider, {
|
|
3762
3762
|
value: n,
|
|
3763
|
-
children: /* @__PURE__ */ X(
|
|
3763
|
+
children: /* @__PURE__ */ X(Le.Provider, {
|
|
3764
3764
|
value: null,
|
|
3765
3765
|
children: e
|
|
3766
3766
|
})
|
|
@@ -3813,7 +3813,7 @@ function Lu({ field: e, value: t, onChange: n, onBlur: r, error: i, errorMessage
|
|
|
3813
3813
|
children: "*"
|
|
3814
3814
|
}) : null]
|
|
3815
3815
|
}) : null,
|
|
3816
|
-
|
|
3816
|
+
ht({
|
|
3817
3817
|
field: S,
|
|
3818
3818
|
formField: y,
|
|
3819
3819
|
fieldState: b,
|
|
@@ -3971,7 +3971,7 @@ var Ku = () => {}, qu = ({ steps: e, children: t, isOpen: n, onClose: r = Ku, ti
|
|
|
3971
3971
|
allowStepSkipping: f,
|
|
3972
3972
|
autoCloseOnLastStepSubmit: p,
|
|
3973
3973
|
onClose: r
|
|
3974
|
-
}), g =
|
|
3974
|
+
}), g = z(), _ = e[h.currentStep], v = h.currentStep === 0, y = h.currentStep === e.length - 1, b = y ? _?.nextLabel ?? l ?? g.wizard.submit : _?.nextLabel ?? s ?? g.wizard.next, x = _?.previousLabel ?? c ?? g.wizard.previous, S = K(() => ({
|
|
3975
3975
|
label: b,
|
|
3976
3976
|
icon: y ? void 0 : Er,
|
|
3977
3977
|
onClick: () => void h.goNext(),
|
|
@@ -3992,7 +3992,7 @@ var Ku = () => {}, qu = ({ steps: e, children: t, isOpen: n, onClose: r = Ku, ti
|
|
|
3992
3992
|
x,
|
|
3993
3993
|
h
|
|
3994
3994
|
]);
|
|
3995
|
-
return /* @__PURE__ */ X(
|
|
3995
|
+
return /* @__PURE__ */ X(je, {
|
|
3996
3996
|
isOpen: n,
|
|
3997
3997
|
onClose: r,
|
|
3998
3998
|
size: a,
|
|
@@ -4026,7 +4026,7 @@ var Ku = () => {}, qu = ({ steps: e, children: t, isOpen: n, onClose: r = Ku, ti
|
|
|
4026
4026
|
})
|
|
4027
4027
|
});
|
|
4028
4028
|
};
|
|
4029
|
-
qu.displayName = "F0Wizard",
|
|
4029
|
+
qu.displayName = "F0Wizard", R(qu);
|
|
4030
4030
|
//#endregion
|
|
4031
4031
|
//#region src/blocks/F0WizardForm/F0WizardForm.tsx
|
|
4032
4032
|
function Ju(e) {
|
|
@@ -4062,7 +4062,7 @@ function Zu(e, t, n) {
|
|
|
4062
4062
|
}
|
|
4063
4063
|
var Qu = 3e3;
|
|
4064
4064
|
function $u() {
|
|
4065
|
-
let { forms: e } =
|
|
4065
|
+
let { forms: e } = z(), [t, n] = J("idle"), [r, i] = J(), a = q(null);
|
|
4066
4066
|
G(() => () => {
|
|
4067
4067
|
a.current && clearTimeout(a.current);
|
|
4068
4068
|
}, []);
|
|
@@ -4073,7 +4073,7 @@ function $u() {
|
|
|
4073
4073
|
}, []), s = t === "success" ? r ?? e.actionBar.saved : void 0;
|
|
4074
4074
|
return {
|
|
4075
4075
|
showSuccess: o,
|
|
4076
|
-
ActionBar: K(() => /* @__PURE__ */ X(
|
|
4076
|
+
ActionBar: K(() => /* @__PURE__ */ X(Vt, {
|
|
4077
4077
|
isOpen: t === "success",
|
|
4078
4078
|
variant: "light",
|
|
4079
4079
|
status: t,
|
|
@@ -4125,43 +4125,43 @@ function nd({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4125
4125
|
w,
|
|
4126
4126
|
E,
|
|
4127
4127
|
k
|
|
4128
|
-
]), F = W((e) => td(e, w, E).some((e) => M.current[e] === !0), [w, E]),
|
|
4128
|
+
]), F = W((e) => td(e, w, E).some((e) => M.current[e] === !0), [w, E]), I = K(() => E ?? w.map((e) => ({
|
|
4129
4129
|
title: v?.[e]?.title ?? e,
|
|
4130
4130
|
sectionIds: [e]
|
|
4131
4131
|
})), [
|
|
4132
4132
|
E,
|
|
4133
4133
|
w,
|
|
4134
4134
|
v
|
|
4135
|
-
]),
|
|
4135
|
+
]), ee = W((e) => {
|
|
4136
4136
|
if (!m) return !1;
|
|
4137
|
-
let t =
|
|
4137
|
+
let t = I[e];
|
|
4138
4138
|
return t ? t.sectionIds.every((e) => {
|
|
4139
4139
|
let n = _[e];
|
|
4140
4140
|
return n ? Zu(n, y?.[e] ?? D.current[e], t.isCompleted) : !1;
|
|
4141
4141
|
}) : !1;
|
|
4142
4142
|
}, [
|
|
4143
4143
|
m,
|
|
4144
|
-
|
|
4144
|
+
I,
|
|
4145
4145
|
_,
|
|
4146
4146
|
y
|
|
4147
|
-
]),
|
|
4147
|
+
]), te = K(() => {
|
|
4148
4148
|
if (s !== void 0) return s;
|
|
4149
4149
|
if (!m) return;
|
|
4150
|
-
let e =
|
|
4151
|
-
return e === -1 ?
|
|
4150
|
+
let e = I.findIndex((e, t) => !ee(t));
|
|
4151
|
+
return e === -1 ? I.length - 1 : e;
|
|
4152
4152
|
}, [
|
|
4153
4153
|
s,
|
|
4154
4154
|
m,
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
]),
|
|
4155
|
+
I,
|
|
4156
|
+
ee
|
|
4157
|
+
]), L = K(() => ed({
|
|
4158
4158
|
sectionIds: w,
|
|
4159
4159
|
sections: v,
|
|
4160
4160
|
customSteps: E,
|
|
4161
4161
|
isStepAllDisabled: N,
|
|
4162
4162
|
onNextForStep: P,
|
|
4163
4163
|
hasErrorsForStep: F,
|
|
4164
|
-
isStepDataFilled: m ?
|
|
4164
|
+
isStepDataFilled: m ? ee : void 0
|
|
4165
4165
|
}), [
|
|
4166
4166
|
w,
|
|
4167
4167
|
v,
|
|
@@ -4171,17 +4171,17 @@ function nd({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4171
4171
|
F,
|
|
4172
4172
|
A,
|
|
4173
4173
|
m,
|
|
4174
|
-
|
|
4175
|
-
]),
|
|
4174
|
+
ee
|
|
4175
|
+
]), ne = q(null), { showSuccess: re, ActionBar: ie } = $u(), ae = W((e) => async (t) => {
|
|
4176
4176
|
D.current[e] = t;
|
|
4177
4177
|
let n = await b({
|
|
4178
4178
|
sectionId: e,
|
|
4179
4179
|
data: t,
|
|
4180
4180
|
fullData: { ...D.current }
|
|
4181
4181
|
});
|
|
4182
|
-
return
|
|
4183
|
-
}, [b,
|
|
4184
|
-
if (
|
|
4182
|
+
return ne.current = n, n.success && n.message && re(n.message), n;
|
|
4183
|
+
}, [b, re]), oe = W(() => {
|
|
4184
|
+
if (ne.current?.success) {
|
|
4185
4185
|
if (p) {
|
|
4186
4186
|
let e = p({ fullData: { ...D.current } });
|
|
4187
4187
|
window.location.href = e;
|
|
@@ -4191,7 +4191,7 @@ function nd({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4191
4191
|
f,
|
|
4192
4192
|
p,
|
|
4193
4193
|
r
|
|
4194
|
-
]),
|
|
4194
|
+
]), se = W(() => {
|
|
4195
4195
|
let e = td(O.current, w, E);
|
|
4196
4196
|
for (let t of e) {
|
|
4197
4197
|
let e = k[t];
|
|
@@ -4201,21 +4201,21 @@ function nd({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4201
4201
|
w,
|
|
4202
4202
|
E,
|
|
4203
4203
|
k
|
|
4204
|
-
]),
|
|
4205
|
-
|
|
4206
|
-
}, [
|
|
4204
|
+
]), ce = W((e) => {
|
|
4205
|
+
se(), O.current = e, u?.(e);
|
|
4206
|
+
}, [se, u]);
|
|
4207
4207
|
return /* @__PURE__ */ X(qu, {
|
|
4208
|
-
steps:
|
|
4208
|
+
steps: L,
|
|
4209
4209
|
isOpen: n,
|
|
4210
4210
|
onClose: r,
|
|
4211
4211
|
title: i,
|
|
4212
4212
|
size: o ?? a,
|
|
4213
|
-
defaultStepIndex:
|
|
4213
|
+
defaultStepIndex: te,
|
|
4214
4214
|
nextLabel: c,
|
|
4215
4215
|
previousLabel: l,
|
|
4216
4216
|
submitLabel: C,
|
|
4217
|
-
onSubmit:
|
|
4218
|
-
onStepChanged:
|
|
4217
|
+
onSubmit: oe,
|
|
4218
|
+
onStepChanged: ce,
|
|
4219
4219
|
allowStepSkipping: d,
|
|
4220
4220
|
children: ({ currentStep: t }) => {
|
|
4221
4221
|
let n = td(t, w, E);
|
|
@@ -4231,7 +4231,7 @@ function nd({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4231
4231
|
schema: n,
|
|
4232
4232
|
sectionConfig: r,
|
|
4233
4233
|
defaultValues: i ?? a,
|
|
4234
|
-
onSubmit:
|
|
4234
|
+
onSubmit: ae(t),
|
|
4235
4235
|
submitConfig: x,
|
|
4236
4236
|
errorTriggerMode: S,
|
|
4237
4237
|
sectionForms: k,
|
|
@@ -4245,12 +4245,12 @@ function nd({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4245
4245
|
isLoading: e.isLoading
|
|
4246
4246
|
}, t);
|
|
4247
4247
|
})
|
|
4248
|
-
}),
|
|
4248
|
+
}), ie] });
|
|
4249
4249
|
}
|
|
4250
4250
|
});
|
|
4251
4251
|
}
|
|
4252
4252
|
function rd({ sectionId: e, formName: t, schema: n, sectionConfig: r, defaultValues: i, onSubmit: a, submitConfig: o, errorTriggerMode: s, sectionForms: c, onErrorStateChange: l, renderCustomField: u, isLoading: d }) {
|
|
4253
|
-
let f =
|
|
4253
|
+
let f = rn();
|
|
4254
4254
|
G(() => (c[e] = f, () => {
|
|
4255
4255
|
c[e] = null;
|
|
4256
4256
|
}), [
|
|
@@ -4261,7 +4261,7 @@ function rd({ sectionId: e, formName: t, schema: n, sectionConfig: r, defaultVal
|
|
|
4261
4261
|
let p = q(l);
|
|
4262
4262
|
return p.current = l, G(() => {
|
|
4263
4263
|
p.current(f.hasErrors);
|
|
4264
|
-
}, [f.hasErrors]), /* @__PURE__ */ X(
|
|
4264
|
+
}, [f.hasErrors]), /* @__PURE__ */ X(vt, {
|
|
4265
4265
|
formName: t,
|
|
4266
4266
|
sectionId: e,
|
|
4267
4267
|
schema: n,
|
|
@@ -4279,7 +4279,7 @@ function rd({ sectionId: e, formName: t, schema: n, sectionConfig: r, defaultVal
|
|
|
4279
4279
|
});
|
|
4280
4280
|
}
|
|
4281
4281
|
function id({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, width: a, size: o, defaultStepIndex: s, nextLabel: c, previousLabel: l, onStepChanged: u, allowStepSkipping: d, autoCloseOnLastStepSubmit: f, linkAfterLastStepSubmit: p, autoSkipCompletedSteps: m = !1, renderCustomField: h }) {
|
|
4282
|
-
let { name: g, schema: _, sections: v, defaultValues: y, onSubmit: b, submitConfig: x, errorTriggerMode: S = "on-blur" } = e, C = x?.label, w = K(() => ti(_), [_]), T = K(() => Yu(_, v), [_, v]), E = W((e) => Ju(Xu(w, e)), [w]), D =
|
|
4282
|
+
let { name: g, schema: _, sections: v, defaultValues: y, onSubmit: b, submitConfig: x, errorTriggerMode: S = "on-blur" } = e, C = x?.label, w = K(() => ti(_), [_]), T = K(() => Yu(_, v), [_, v]), E = W((e) => Ju(Xu(w, e)), [w]), D = rn(), O = q(y ? { ...y } : {}), k = q(s ?? 0), A = W((e) => async () => {
|
|
4283
4283
|
await D.submit();
|
|
4284
4284
|
}, [D]), j = W((e) => D.hasErrors, [D.hasErrors]), M = t ?? e.steps, N = K(() => M ?? T.map((e) => ({
|
|
4285
4285
|
title: v?.[e]?.title ?? e,
|
|
@@ -4307,7 +4307,7 @@ function id({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4307
4307
|
m,
|
|
4308
4308
|
N,
|
|
4309
4309
|
P
|
|
4310
|
-
]),
|
|
4310
|
+
]), I = K(() => ed({
|
|
4311
4311
|
sectionIds: T,
|
|
4312
4312
|
sections: v,
|
|
4313
4313
|
customSteps: M,
|
|
@@ -4324,17 +4324,17 @@ function id({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4324
4324
|
j,
|
|
4325
4325
|
m,
|
|
4326
4326
|
P
|
|
4327
|
-
]),
|
|
4327
|
+
]), ee = q(null), te = q(null), { showSuccess: L, ActionBar: ne } = $u(), re = W(async (e) => {
|
|
4328
4328
|
Object.assign(O.current, e);
|
|
4329
4329
|
let t = { ...O.current };
|
|
4330
|
-
|
|
4330
|
+
te.current = t;
|
|
4331
4331
|
let n = await b({ data: t });
|
|
4332
|
-
return
|
|
4333
|
-
}, [b]),
|
|
4334
|
-
let e =
|
|
4332
|
+
return ee.current = n, n;
|
|
4333
|
+
}, [b]), ie = W(() => {
|
|
4334
|
+
let e = ee.current;
|
|
4335
4335
|
if (e?.success) {
|
|
4336
|
-
if (
|
|
4337
|
-
let e = p({ fullData:
|
|
4336
|
+
if (L(e.message), p) {
|
|
4337
|
+
let e = p({ fullData: te.current });
|
|
4338
4338
|
window.location.href = e;
|
|
4339
4339
|
} else f && r?.();
|
|
4340
4340
|
}
|
|
@@ -4342,13 +4342,13 @@ function id({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4342
4342
|
f,
|
|
4343
4343
|
p,
|
|
4344
4344
|
r,
|
|
4345
|
-
|
|
4346
|
-
]),
|
|
4345
|
+
L
|
|
4346
|
+
]), ae = W((e) => {
|
|
4347
4347
|
let t = D.getValues();
|
|
4348
4348
|
Object.assign(O.current, t), k.current = e, u?.(e);
|
|
4349
4349
|
}, [D, u]);
|
|
4350
4350
|
return /* @__PURE__ */ X(qu, {
|
|
4351
|
-
steps:
|
|
4351
|
+
steps: I,
|
|
4352
4352
|
isOpen: n,
|
|
4353
4353
|
onClose: r,
|
|
4354
4354
|
title: i,
|
|
@@ -4357,19 +4357,19 @@ function id({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4357
4357
|
nextLabel: c,
|
|
4358
4358
|
previousLabel: l,
|
|
4359
4359
|
submitLabel: C,
|
|
4360
|
-
onSubmit:
|
|
4361
|
-
onStepChanged:
|
|
4360
|
+
onSubmit: ie,
|
|
4361
|
+
onStepChanged: ae,
|
|
4362
4362
|
allowStepSkipping: d,
|
|
4363
4363
|
children: ({ currentStep: t }) => {
|
|
4364
4364
|
let n = td(t, T, M), r = Xu(w, n), i = n.reduce((e, t) => (v?.[t] && (e[t] = v[t]), e), {});
|
|
4365
4365
|
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("div", {
|
|
4366
4366
|
className: "pb-5",
|
|
4367
|
-
children: /* @__PURE__ */ X(
|
|
4367
|
+
children: /* @__PURE__ */ X(ce, {
|
|
4368
4368
|
name: `${g}-step-${t}`,
|
|
4369
4369
|
schema: r,
|
|
4370
4370
|
sections: i,
|
|
4371
4371
|
defaultValues: O.current,
|
|
4372
|
-
onSubmit:
|
|
4372
|
+
onSubmit: re,
|
|
4373
4373
|
submitConfig: {
|
|
4374
4374
|
hideSubmitButton: !0,
|
|
4375
4375
|
hideActionBar: !0
|
|
@@ -4379,7 +4379,7 @@ function id({ formDefinition: e, steps: t, isOpen: n, onClose: r, title: i, widt
|
|
|
4379
4379
|
renderCustomField: h,
|
|
4380
4380
|
isLoading: e.isLoading
|
|
4381
4381
|
}, t)
|
|
4382
|
-
}),
|
|
4382
|
+
}), ne] });
|
|
4383
4383
|
}
|
|
4384
4384
|
});
|
|
4385
4385
|
}
|
|
@@ -4387,7 +4387,7 @@ function ad(e) {
|
|
|
4387
4387
|
return e.formDefinition._brand === "per-section" ? /* @__PURE__ */ X(nd, { ...e }) : /* @__PURE__ */ X(id, { ...e });
|
|
4388
4388
|
}
|
|
4389
4389
|
ad.displayName = "F0WizardForm";
|
|
4390
|
-
var od =
|
|
4390
|
+
var od = R(ad), sd = ad;
|
|
4391
4391
|
function cd(e, t) {
|
|
4392
4392
|
if (e._brand === "per-section") {
|
|
4393
4393
|
let n = e;
|
|
@@ -4430,10 +4430,10 @@ function ld({ options: e, isOpen: t, onResolve: n }) {
|
|
|
4430
4430
|
}
|
|
4431
4431
|
function ud(e) {
|
|
4432
4432
|
return new Promise((t) => {
|
|
4433
|
-
let n = e.id ??
|
|
4433
|
+
let n = e.id ?? Ee(), r = !1, i = (e) => {
|
|
4434
4434
|
r || (r = !0, t(e), O(n));
|
|
4435
4435
|
};
|
|
4436
|
-
|
|
4436
|
+
ke({
|
|
4437
4437
|
id: n,
|
|
4438
4438
|
onDismiss: () => i({ completed: !1 }),
|
|
4439
4439
|
render: ({ isOpen: t }) => /* @__PURE__ */ X(ld, {
|
|
@@ -4492,9 +4492,9 @@ var fd = { open: dd }, pd = [
|
|
|
4492
4492
|
"aria-label": "Loading slider",
|
|
4493
4493
|
"aria-busy": "true",
|
|
4494
4494
|
"aria-live": "polite",
|
|
4495
|
-
children: [e ? null : /* @__PURE__ */ X(
|
|
4495
|
+
children: [e ? null : /* @__PURE__ */ X(gn, { className: "h-4 w-24 rounded-md" }), /* @__PURE__ */ X("div", {
|
|
4496
4496
|
className: "flex items-center py-2",
|
|
4497
|
-
children: /* @__PURE__ */ X(
|
|
4497
|
+
children: /* @__PURE__ */ X(gn, { className: "h-1.5 w-full rounded-full" })
|
|
4498
4498
|
})]
|
|
4499
4499
|
}), vd = $a({
|
|
4500
4500
|
base: "relative h-1.5 grow overflow-hidden rounded-full bg-f1-background-tertiary",
|
|
@@ -4547,22 +4547,22 @@ var fd = { open: dd }, pd = [
|
|
|
4547
4547
|
}, [D]), M = W((e) => {
|
|
4548
4548
|
let [t] = e;
|
|
4549
4549
|
t !== void 0 && p?.(t);
|
|
4550
|
-
}, [p]), [N, P] = J(!1), [F,
|
|
4550
|
+
}, [p]), [N, P] = J(!1), [F, I] = J(!1), [ee, te] = J(!1), L = q(!1), ne = b === "always" || b === "onHover" && (N || F || ee), re = o?.type ?? "default", ie = !i && n.trim().length > 0, ae = o ?? (a ? {
|
|
4551
4551
|
type: "default",
|
|
4552
4552
|
message: a
|
|
4553
|
-
} : void 0),
|
|
4553
|
+
} : void 0), oe = a || o?.message ? w : void 0;
|
|
4554
4554
|
return /* @__PURE__ */ Z("div", {
|
|
4555
4555
|
ref: t,
|
|
4556
4556
|
...x,
|
|
4557
4557
|
className: B("flex flex-col gap-2", c && "cursor-not-allowed"),
|
|
4558
4558
|
onPointerDownCapture: () => {
|
|
4559
|
-
|
|
4559
|
+
L.current = !0;
|
|
4560
4560
|
},
|
|
4561
4561
|
onPointerUp: () => {
|
|
4562
|
-
|
|
4562
|
+
L.current = !1;
|
|
4563
4563
|
},
|
|
4564
4564
|
children: [
|
|
4565
|
-
|
|
4565
|
+
ie ? /* @__PURE__ */ X(Go, {
|
|
4566
4566
|
label: n,
|
|
4567
4567
|
required: s,
|
|
4568
4568
|
htmlFor: S,
|
|
@@ -4573,8 +4573,8 @@ var fd = { open: dd }, pd = [
|
|
|
4573
4573
|
value: [O],
|
|
4574
4574
|
onValueChange: j,
|
|
4575
4575
|
onValueCommit: M,
|
|
4576
|
-
onPointerDown: () =>
|
|
4577
|
-
onPointerUp: () =>
|
|
4576
|
+
onPointerDown: () => te(!0),
|
|
4577
|
+
onPointerUp: () => te(!1),
|
|
4578
4578
|
min: m,
|
|
4579
4579
|
max: h,
|
|
4580
4580
|
step: g,
|
|
@@ -4585,32 +4585,32 @@ var fd = { open: dd }, pd = [
|
|
|
4585
4585
|
onMouseLeave: () => P(!1),
|
|
4586
4586
|
children: [
|
|
4587
4587
|
/* @__PURE__ */ X(Ar, {
|
|
4588
|
-
className: vd({ status:
|
|
4588
|
+
className: vd({ status: re }),
|
|
4589
4589
|
children: /* @__PURE__ */ X(ei, { className: yd({
|
|
4590
|
-
status:
|
|
4590
|
+
status: re,
|
|
4591
4591
|
disabled: c
|
|
4592
4592
|
}) })
|
|
4593
4593
|
}),
|
|
4594
4594
|
/* @__PURE__ */ X(wr, {
|
|
4595
4595
|
id: S,
|
|
4596
|
-
"aria-label":
|
|
4597
|
-
"aria-labelledby":
|
|
4596
|
+
"aria-label": ie ? void 0 : T,
|
|
4597
|
+
"aria-labelledby": ie ? C : void 0,
|
|
4598
4598
|
"aria-valuetext": y(O),
|
|
4599
|
-
"aria-describedby":
|
|
4599
|
+
"aria-describedby": oe,
|
|
4600
4600
|
"aria-required": s,
|
|
4601
4601
|
style: {
|
|
4602
4602
|
width: bd,
|
|
4603
4603
|
height: bd
|
|
4604
4604
|
},
|
|
4605
4605
|
className: B(xd({
|
|
4606
|
-
status:
|
|
4606
|
+
status: re,
|
|
4607
4607
|
disabled: c
|
|
4608
4608
|
}), En("focus-visible:ring-offset-1")),
|
|
4609
|
-
onFocus: () =>
|
|
4610
|
-
onBlur: () =>
|
|
4609
|
+
onFocus: () => I(!L.current),
|
|
4610
|
+
onBlur: () => I(!1)
|
|
4611
4611
|
}),
|
|
4612
4612
|
b === "never" ? null : /* @__PURE__ */ X(gd, {
|
|
4613
|
-
visible:
|
|
4613
|
+
visible: ne,
|
|
4614
4614
|
content: y(O),
|
|
4615
4615
|
style: { left: `calc(${k}% + ${A}px)` }
|
|
4616
4616
|
})
|
|
@@ -4624,13 +4624,13 @@ var fd = { open: dd }, pd = [
|
|
|
4624
4624
|
id: w,
|
|
4625
4625
|
role: "status",
|
|
4626
4626
|
"aria-live": "polite",
|
|
4627
|
-
children: /* @__PURE__ */ X(Co, { status:
|
|
4627
|
+
children: /* @__PURE__ */ X(Co, { status: ae })
|
|
4628
4628
|
})
|
|
4629
4629
|
]
|
|
4630
4630
|
});
|
|
4631
4631
|
});
|
|
4632
4632
|
Sd.displayName = "F0Slider";
|
|
4633
|
-
var Cd =
|
|
4633
|
+
var Cd = hn("F0Slider", Si(R(Sd), _d)), wd = [
|
|
4634
4634
|
"completed",
|
|
4635
4635
|
"in-progress",
|
|
4636
4636
|
"not-started",
|
|
@@ -4804,7 +4804,7 @@ function Rd({ title: e, items: t, className: n, activeItem: r, collapsible: i =
|
|
|
4804
4804
|
sideOffset: -28,
|
|
4805
4805
|
container: d,
|
|
4806
4806
|
className: B(Ld({ size: l }), !e && "pt-2", "scrollbar-macos"),
|
|
4807
|
-
children: /* @__PURE__ */ X(
|
|
4807
|
+
children: /* @__PURE__ */ X(Ot, {
|
|
4808
4808
|
title: e,
|
|
4809
4809
|
items: t,
|
|
4810
4810
|
activeItem: r,
|
|
@@ -4817,7 +4817,7 @@ function Rd({ title: e, items: t, className: n, activeItem: r, collapsible: i =
|
|
|
4817
4817
|
})]
|
|
4818
4818
|
});
|
|
4819
4819
|
}
|
|
4820
|
-
var zd =
|
|
4820
|
+
var zd = R(hn("F0TableOfContentPopover", Rd));
|
|
4821
4821
|
//#endregion
|
|
4822
4822
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/Form/utils.ts
|
|
4823
4823
|
function Bd(e) {
|
|
@@ -4912,7 +4912,7 @@ function Wd(e) {
|
|
|
4912
4912
|
//#endregion
|
|
4913
4913
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/ApplyingChangesTag/ApplyingChangesTag.tsx
|
|
4914
4914
|
var Gd = qn.create(Ti), Kd = xc(() => {
|
|
4915
|
-
let e =
|
|
4915
|
+
let e = z();
|
|
4916
4916
|
return /* @__PURE__ */ Z("div", {
|
|
4917
4917
|
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",
|
|
4918
4918
|
children: [/* @__PURE__ */ X(Gd, {
|
|
@@ -5264,7 +5264,7 @@ function sf() {
|
|
|
5264
5264
|
//#endregion
|
|
5265
5265
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/constants.ts
|
|
5266
5266
|
var cf = () => {
|
|
5267
|
-
let { isQuestionTypeAllowed: e, datasets: t } = rf(), { t: n } =
|
|
5267
|
+
let { isQuestionTypeAllowed: e, datasets: t } = rf(), { t: n } = z(), r = [
|
|
5268
5268
|
{
|
|
5269
5269
|
label: n("surveyFormBuilder.questionTypes.rating"),
|
|
5270
5270
|
icon: Gi,
|
|
@@ -5336,7 +5336,7 @@ var cf = () => {
|
|
|
5336
5336
|
file: fi,
|
|
5337
5337
|
checkbox: Vs
|
|
5338
5338
|
}, uf = () => {
|
|
5339
|
-
let { disabled: e, answering: t, onAddNewElement: n, isQuestionTypeAllowed: r, labels: i } = rf(), [a, o] = J(!1), s = cf(), { t: c } =
|
|
5339
|
+
let { disabled: e, answering: t, onAddNewElement: n, isQuestionTypeAllowed: r, labels: i } = rf(), [a, o] = J(!1), s = cf(), { t: c } = z(), l = i?.addQuestion ?? c("surveyFormBuilder.actions.addQuestion"), u = (e, t) => {
|
|
5340
5340
|
n?.({
|
|
5341
5341
|
type: e,
|
|
5342
5342
|
datasetKey: t
|
|
@@ -5434,8 +5434,8 @@ var cf = () => {
|
|
|
5434
5434
|
})
|
|
5435
5435
|
});
|
|
5436
5436
|
}, df = ({ open: e, onConfirm: t, onCancel: n }) => {
|
|
5437
|
-
let { t: r } =
|
|
5438
|
-
return /* @__PURE__ */ X(
|
|
5437
|
+
let { t: r } = z();
|
|
5438
|
+
return /* @__PURE__ */ X(Ue, {
|
|
5439
5439
|
open: e,
|
|
5440
5440
|
onClose: n,
|
|
5441
5441
|
header: {
|
|
@@ -5593,7 +5593,7 @@ var _f = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(Y
|
|
|
5593
5593
|
]
|
|
5594
5594
|
})
|
|
5595
5595
|
}), vf = ({ label: e, value: t, currentDatasetKey: n, questionTypes: r, currentRatingType: i, isQuestionTypeAllowed: a, onSelectQuestionType: o, onSelectRatingType: s }) => {
|
|
5596
|
-
let { t: c } =
|
|
5596
|
+
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;
|
|
5597
5597
|
return /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
5598
5598
|
className: "mx-1 px-2 data-[state=open]:rounded-sm data-[state=closed]:bg-transparent data-[state=open]:bg-f1-background-hover",
|
|
5599
5599
|
children: /* @__PURE__ */ Z("div", {
|
|
@@ -5738,7 +5738,7 @@ var _f = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(Y
|
|
|
5738
5738
|
})]
|
|
5739
5739
|
})
|
|
5740
5740
|
}), bf = ({ showDuplicate: e, showDelete: t, withSeparator: n, onDuplicate: r, onDelete: i }) => {
|
|
5741
|
-
let { t: a } =
|
|
5741
|
+
let { t: a } = z(), { labels: o } = rf();
|
|
5742
5742
|
return !e && !t ? null : /* @__PURE__ */ Z(Y, { children: [n ? /* @__PURE__ */ X(Js, {}) : null, /* @__PURE__ */ Z(nc, { children: [e ? /* @__PURE__ */ X(yf, {
|
|
5743
5743
|
label: o?.duplicateQuestion ?? a("surveyFormBuilder.actions.duplicateQuestion"),
|
|
5744
5744
|
icon: Mr,
|
|
@@ -5751,7 +5751,7 @@ var _f = ({ label: e, icon: t, checked: n, onChange: r }) => /* @__PURE__ */ X(Y
|
|
|
5751
5751
|
}) : null] })] });
|
|
5752
5752
|
};
|
|
5753
5753
|
function xf({ open: e, setOpen: t, questionId: n, questionType: r, canDeleteQuestion: i = !0, hiddenActions: a }) {
|
|
5754
|
-
let { t: o } =
|
|
5754
|
+
let { t: o } = z(), { isQuestionTypeAllowed: s, labels: c } = rf(), { 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 } = gf({
|
|
5755
5755
|
questionId: n,
|
|
5756
5756
|
questionType: r,
|
|
5757
5757
|
canDelete: i
|
|
@@ -5830,37 +5830,37 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5830
5830
|
children: r
|
|
5831
5831
|
}) : r;
|
|
5832
5832
|
}, Cf = ({ id: e, title: t, description: n, children: r, required: a, type: o, hiddenActions: s, locked: c, lockedFields: l, lockedNote: u }) => {
|
|
5833
|
-
let { onQuestionChange: d, onAddNewElement: f, disabled: p, answering: m, getIsSingleQuestionInSection: h, getSectionContainingQuestion: g, isQuestionTypeAllowed: _, placeholders: v, labels: y } = rf(), b = g(e), x = !!b?.locked || !!c, S = x || !!l?.includes("title"), C = x || !!l?.includes("description"), w = !x && (S || C), T = !!b, [E, D] = J(!1), [O, k] = J(!1), { isDragging: A } = sf(), { t: j } =
|
|
5833
|
+
let { onQuestionChange: d, onAddNewElement: f, disabled: p, answering: m, getIsSingleQuestionInSection: h, getSectionContainingQuestion: g, isQuestionTypeAllowed: _, placeholders: v, labels: y } = rf(), b = g(e), x = !!b?.locked || !!c, S = x || !!l?.includes("title"), C = x || !!l?.includes("description"), w = !x && (S || C), T = !!b, [E, D] = J(!1), [O, k] = J(!1), { isDragging: A } = sf(), { t: j } = z(), M = v?.questionTitle ?? j("surveyFormBuilder.labels.titlePlaceholder"), N = y?.addQuestion ?? j("surveyFormBuilder.actions.addQuestion"), P = v?.questionDescription ?? j("surveyFormBuilder.labels.questionDescriptionPlaceholder"), F = (t) => {
|
|
5834
5834
|
d?.({
|
|
5835
5835
|
id: e,
|
|
5836
5836
|
type: o,
|
|
5837
5837
|
title: t.target.value
|
|
5838
5838
|
});
|
|
5839
|
-
},
|
|
5839
|
+
}, I = (t) => {
|
|
5840
5840
|
d?.({
|
|
5841
5841
|
id: e,
|
|
5842
5842
|
type: o,
|
|
5843
5843
|
description: t.target.value
|
|
5844
5844
|
});
|
|
5845
|
-
},
|
|
5845
|
+
}, ee = (t, n) => {
|
|
5846
5846
|
f?.({
|
|
5847
5847
|
type: t,
|
|
5848
5848
|
afterId: e,
|
|
5849
5849
|
datasetKey: n
|
|
5850
5850
|
});
|
|
5851
|
-
},
|
|
5851
|
+
}, te = () => {
|
|
5852
5852
|
f?.({
|
|
5853
5853
|
type: "section",
|
|
5854
5854
|
afterId: e
|
|
5855
5855
|
});
|
|
5856
|
-
},
|
|
5856
|
+
}, L = cf(), ne = L.filter((e) => !e.datasetKey), re = Array.from(new Set(L.filter((e) => !!e.datasetKey).map((e) => e.datasetKey))), ie = h(e), ae = q(null), oe = q(!ie);
|
|
5857
5857
|
G(() => {
|
|
5858
|
-
|
|
5858
|
+
oe.current && ae.current?.focus({ preventScroll: !0 });
|
|
5859
5859
|
}, []);
|
|
5860
|
-
let
|
|
5860
|
+
let se = p || S || m, ce = p || C || m, le = !ce || !!n, ue = x || w ? { description: u?.description ?? b?.lockedNote?.description ?? j("surveyFormBuilder.labels.lockedQuestionNotice") } : null;
|
|
5861
5861
|
return /* @__PURE__ */ Z("div", {
|
|
5862
5862
|
id: `co-creation-question-${e}`,
|
|
5863
|
-
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", x && !m && "cursor-not-allowed [&_*]:!cursor-not-allowed", !A && !m && !x && "hover:border-f1-border-hover",
|
|
5863
|
+
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", x && !m && "cursor-not-allowed [&_*]:!cursor-not-allowed", !A && !m && !x && "hover:border-f1-border-hover", le ? "gap-4" : "gap-2"),
|
|
5864
5864
|
children: [
|
|
5865
5865
|
/* @__PURE__ */ Z("div", {
|
|
5866
5866
|
className: "flex flex-col gap-0.5",
|
|
@@ -5869,7 +5869,7 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5869
5869
|
children: [
|
|
5870
5870
|
/* @__PURE__ */ X(Sf, {
|
|
5871
5871
|
className: "relative w-full",
|
|
5872
|
-
notice: w && S ?
|
|
5872
|
+
notice: w && S ? ue : null,
|
|
5873
5873
|
children: m ? /* @__PURE__ */ Z("div", {
|
|
5874
5874
|
className: "w-full whitespace-pre-wrap break-words px-2 py-1 text-lg font-semibold text-f1-foreground",
|
|
5875
5875
|
children: [t || M, a ? /* @__PURE__ */ X("span", {
|
|
@@ -5877,13 +5877,13 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5877
5877
|
children: " *"
|
|
5878
5878
|
}) : null]
|
|
5879
5879
|
}) : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("textarea", {
|
|
5880
|
-
ref:
|
|
5880
|
+
ref: ae,
|
|
5881
5881
|
value: t,
|
|
5882
5882
|
"aria-label": j("surveyFormBuilder.labels.title"),
|
|
5883
5883
|
placeholder: M,
|
|
5884
5884
|
onChange: F,
|
|
5885
|
-
disabled:
|
|
5886
|
-
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", !m &&
|
|
5885
|
+
disabled: se,
|
|
5886
|
+
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", !m && se && "!cursor-not-allowed")
|
|
5887
5887
|
}), /* @__PURE__ */ Z("div", {
|
|
5888
5888
|
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",
|
|
5889
5889
|
children: [/* @__PURE__ */ X("span", {
|
|
@@ -5895,9 +5895,9 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5895
5895
|
}) : null]
|
|
5896
5896
|
})] })
|
|
5897
5897
|
}),
|
|
5898
|
-
!m && x ? /* @__PURE__ */ X("div", { children:
|
|
5898
|
+
!m && x ? /* @__PURE__ */ X("div", { children: ue ? /* @__PURE__ */ X(Kn, {
|
|
5899
5899
|
instant: !0,
|
|
5900
|
-
...
|
|
5900
|
+
...ue,
|
|
5901
5901
|
children: /* @__PURE__ */ X("span", {
|
|
5902
5902
|
className: "inline-flex",
|
|
5903
5903
|
children: /* @__PURE__ */ X(V, {
|
|
@@ -5928,7 +5928,7 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5928
5928
|
setOpen: k,
|
|
5929
5929
|
questionId: e,
|
|
5930
5930
|
questionType: o,
|
|
5931
|
-
canDeleteQuestion: !T || !
|
|
5931
|
+
canDeleteQuestion: !T || !ie,
|
|
5932
5932
|
hiddenActions: s
|
|
5933
5933
|
})
|
|
5934
5934
|
}) : null
|
|
@@ -5936,15 +5936,15 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5936
5936
|
}), m ? n ? /* @__PURE__ */ X("p", {
|
|
5937
5937
|
className: "w-full whitespace-pre-wrap break-words px-2 text-f1-foreground-secondary",
|
|
5938
5938
|
children: n
|
|
5939
|
-
}) : null :
|
|
5940
|
-
notice: w && C ?
|
|
5939
|
+
}) : null : le ? /* @__PURE__ */ X(Sf, {
|
|
5940
|
+
notice: w && C ? ue : null,
|
|
5941
5941
|
children: /* @__PURE__ */ X("textarea", {
|
|
5942
5942
|
value: n,
|
|
5943
5943
|
"aria-label": j("surveyFormBuilder.labels.description"),
|
|
5944
5944
|
placeholder: P,
|
|
5945
|
-
onChange:
|
|
5946
|
-
disabled:
|
|
5947
|
-
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", !m &&
|
|
5945
|
+
onChange: I,
|
|
5946
|
+
disabled: ce,
|
|
5947
|
+
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", !m && ce && "!cursor-not-allowed")
|
|
5948
5948
|
})
|
|
5949
5949
|
}) : null]
|
|
5950
5950
|
}),
|
|
@@ -5972,7 +5972,7 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5972
5972
|
className: "w-80",
|
|
5973
5973
|
children: [
|
|
5974
5974
|
T ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Ys, {
|
|
5975
|
-
onClick:
|
|
5975
|
+
onClick: te,
|
|
5976
5976
|
children: /* @__PURE__ */ Z("div", {
|
|
5977
5977
|
className: "flex w-full flex-row items-center gap-2",
|
|
5978
5978
|
children: [/* @__PURE__ */ X(H, {
|
|
@@ -5984,8 +5984,8 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5984
5984
|
})]
|
|
5985
5985
|
})
|
|
5986
5986
|
}), /* @__PURE__ */ X(Js, {})] }),
|
|
5987
|
-
|
|
5988
|
-
onClick: () =>
|
|
5987
|
+
ne.map((e) => /* @__PURE__ */ X(Ys, {
|
|
5988
|
+
onClick: () => ee(e.questionType),
|
|
5989
5989
|
children: /* @__PURE__ */ Z("div", {
|
|
5990
5990
|
className: "flex w-full flex-row items-center gap-2",
|
|
5991
5991
|
children: [/* @__PURE__ */ X(H, {
|
|
@@ -5997,8 +5997,8 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
5997
5997
|
})]
|
|
5998
5998
|
})
|
|
5999
5999
|
}, e.questionType)),
|
|
6000
|
-
|
|
6001
|
-
let t =
|
|
6000
|
+
re.length > 0 ? /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Js, {}), re.map((e) => {
|
|
6001
|
+
let t = L.find((t) => t.datasetKey === e && t.questionType === "dropdown-single");
|
|
6002
6002
|
return /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
6003
6003
|
className: "mx-1 px-2 data-[state=open]:rounded-sm data-[state=closed]:bg-transparent data-[state=open]:bg-f1-background-hover",
|
|
6004
6004
|
children: /* @__PURE__ */ Z("div", {
|
|
@@ -6012,7 +6012,7 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
6012
6012
|
})]
|
|
6013
6013
|
})
|
|
6014
6014
|
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ Z(ac, { children: [_("dropdown-single") ? /* @__PURE__ */ X(Ys, {
|
|
6015
|
-
onClick: () =>
|
|
6015
|
+
onClick: () => ee("dropdown-single", e),
|
|
6016
6016
|
children: /* @__PURE__ */ Z("div", {
|
|
6017
6017
|
className: "flex w-full flex-row items-center gap-2",
|
|
6018
6018
|
children: [/* @__PURE__ */ X(H, {
|
|
@@ -6024,7 +6024,7 @@ var Sf = ({ notice: e, className: t, children: n }) => {
|
|
|
6024
6024
|
})]
|
|
6025
6025
|
})
|
|
6026
6026
|
}) : null, _("dropdown-multi") ? /* @__PURE__ */ X(Ys, {
|
|
6027
|
-
onClick: () =>
|
|
6027
|
+
onClick: () => ee("dropdown-multi", e),
|
|
6028
6028
|
children: /* @__PURE__ */ Z("div", {
|
|
6029
6029
|
className: "flex w-full flex-row items-center gap-2",
|
|
6030
6030
|
children: [/* @__PURE__ */ X(H, {
|
|
@@ -6053,7 +6053,7 @@ function wf(e) {
|
|
|
6053
6053
|
//#endregion
|
|
6054
6054
|
//#region src/domains/talent/surveys/surveys/SurveyFormBuilder/QuestionTypes/CheckboxQuestion/CheckboxQuestion.tsx
|
|
6055
6055
|
var Tf = ({ value: e, label: t, ...n }) => {
|
|
6056
|
-
let { onQuestionChange: r, answering: i, disabled: a, getSectionContainingQuestion: o } = rf(), s = wf(n), { t: c } =
|
|
6056
|
+
let { onQuestionChange: r, answering: i, disabled: a, getSectionContainingQuestion: o } = rf(), s = wf(n), { t: c } = z();
|
|
6057
6057
|
if (i) return /* @__PURE__ */ X(Cf, {
|
|
6058
6058
|
...n,
|
|
6059
6059
|
children: /* @__PURE__ */ X(cs, {
|
|
@@ -6098,7 +6098,7 @@ var Tf = ({ value: e, label: t, ...n }) => {
|
|
|
6098
6098
|
})
|
|
6099
6099
|
});
|
|
6100
6100
|
}, Ef = ({ value: e, ...t }) => {
|
|
6101
|
-
let { onQuestionChange: n } = rf(), r = wf(t), { t: i } =
|
|
6101
|
+
let { onQuestionChange: n } = rf(), r = wf(t), { t: i } = z(), a = {
|
|
6102
6102
|
id: t.id,
|
|
6103
6103
|
type: "date",
|
|
6104
6104
|
label: i("surveyFormBuilder.answer.label"),
|
|
@@ -6121,7 +6121,7 @@ var Tf = ({ value: e, label: t, ...n }) => {
|
|
|
6121
6121
|
})
|
|
6122
6122
|
});
|
|
6123
6123
|
}, Df = ({ datasetKey: e, showSearchBox: t, searchBoxPlaceholder: n, ...r }) => {
|
|
6124
|
-
let { onQuestionChange: i, answering: a, datasets: o } = rf(), s = wf(r), { t: c } =
|
|
6124
|
+
let { onQuestionChange: i, answering: a, datasets: o } = rf(), s = wf(r), { t: c } = z(), l = o?.[e];
|
|
6125
6125
|
if (!l) throw Error(`Dataset "${e}" not found for ${r.type}`);
|
|
6126
6126
|
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) => {
|
|
6127
6127
|
try {
|
|
@@ -6191,7 +6191,7 @@ var Tf = ({ value: e, label: t, ...n }) => {
|
|
|
6191
6191
|
progress: 0,
|
|
6192
6192
|
status: "idle"
|
|
6193
6193
|
}), Af = ({ value: e, useUpload: t, accept: n, maxSizeMB: r, ...i }) => {
|
|
6194
|
-
let { onQuestionChange: a, useUpload: o } = rf(), s = wf(i), { t: c } =
|
|
6194
|
+
let { onQuestionChange: a, useUpload: o } = rf(), s = wf(i), { t: c } = z(), l = t ?? o, u = {
|
|
6195
6195
|
id: i.id,
|
|
6196
6196
|
type: "file",
|
|
6197
6197
|
label: c("surveyFormBuilder.answer.label"),
|
|
@@ -6217,7 +6217,7 @@ var Tf = ({ value: e, label: t, ...n }) => {
|
|
|
6217
6217
|
})
|
|
6218
6218
|
});
|
|
6219
6219
|
}, jf = ({ value: e, ...t }) => {
|
|
6220
|
-
let { t: n } =
|
|
6220
|
+
let { t: n } = z(), { onQuestionChange: r, answering: i } = rf(), a = wf(t), o = n("surveyFormBuilder.answer.linkPlaceholder"), s = {
|
|
6221
6221
|
id: t.id,
|
|
6222
6222
|
type: "text",
|
|
6223
6223
|
inputType: "url",
|
|
@@ -6242,7 +6242,7 @@ var Tf = ({ value: e, label: t, ...n }) => {
|
|
|
6242
6242
|
})
|
|
6243
6243
|
});
|
|
6244
6244
|
}, Mf = ({ value: e, ...t }) => {
|
|
6245
|
-
let { t: n } =
|
|
6245
|
+
let { t: n } = z(), { onQuestionChange: r, answering: i } = rf(), a = wf(t), o = (e) => {
|
|
6246
6246
|
r?.({
|
|
6247
6247
|
...t,
|
|
6248
6248
|
type: "numeric",
|
|
@@ -6304,7 +6304,7 @@ var Tf = ({ value: e, label: t, ...n }) => {
|
|
|
6304
6304
|
onClick: (e) => {
|
|
6305
6305
|
e.preventDefault(), e.stopPropagation();
|
|
6306
6306
|
},
|
|
6307
|
-
children: /* @__PURE__ */ X(
|
|
6307
|
+
children: /* @__PURE__ */ X(me, {
|
|
6308
6308
|
data: t,
|
|
6309
6309
|
onEmojiSelect: (e) => {
|
|
6310
6310
|
i?.(s, e.native), u(!1);
|
|
@@ -6391,7 +6391,7 @@ function Lf({ checked: e, disabled: t }) {
|
|
|
6391
6391
|
});
|
|
6392
6392
|
}
|
|
6393
6393
|
var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i, disabled: a, answering: o, selected: s, correct: c, locked: l, type: u }) => {
|
|
6394
|
-
let { value: d, label: f } = t, { isDragging: p, setIsDragging: m, setDraggedItemId: h, draggedItemId: g } = sf(), { t: _ } =
|
|
6394
|
+
let { value: d, label: f } = t, { isDragging: p, setIsDragging: m, setDraggedItemId: h, draggedItemId: g } = sf(), { t: _ } = z(), v = p && g === d, y = () => {
|
|
6395
6395
|
(a || o) && n(d);
|
|
6396
6396
|
}, b = (t) => {
|
|
6397
6397
|
r({
|
|
@@ -6415,7 +6415,7 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6415
6415
|
}, T = () => {
|
|
6416
6416
|
m(!1), h(null);
|
|
6417
6417
|
}, E = p ? v : !a && !o, D = !a && !o && !l;
|
|
6418
|
-
return /* @__PURE__ */ X(
|
|
6418
|
+
return /* @__PURE__ */ X(Xt, {
|
|
6419
6419
|
value: t,
|
|
6420
6420
|
onDragStart: w,
|
|
6421
6421
|
onDragEnd: T,
|
|
@@ -6483,7 +6483,7 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6483
6483
|
})
|
|
6484
6484
|
});
|
|
6485
6485
|
}, zf = ({ options: e, ...t }) => {
|
|
6486
|
-
let { onQuestionChange: n, disabled: r, answering: i, getSectionContainingQuestion: a } = rf(), o = new Set(e.map((e) => e.value)).size !== e.length, s = a(t.id)?.locked || t.locked, { t: c } =
|
|
6486
|
+
let { onQuestionChange: n, disabled: r, answering: i, getSectionContainingQuestion: a } = rf(), o = new Set(e.map((e) => e.value)).size !== e.length, s = a(t.id)?.locked || t.locked, { t: c } = z(), l = K(() => ({
|
|
6487
6487
|
id: t.id,
|
|
6488
6488
|
type: t.type,
|
|
6489
6489
|
options: e
|
|
@@ -6503,7 +6503,7 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6503
6503
|
}, a = new Set(r.map((e) => e.value)).size !== r.length;
|
|
6504
6504
|
a && (r = r.map((e) => ({
|
|
6505
6505
|
...e,
|
|
6506
|
-
value:
|
|
6506
|
+
value: Ee()
|
|
6507
6507
|
})), a && n?.({
|
|
6508
6508
|
...i,
|
|
6509
6509
|
options: r
|
|
@@ -6574,7 +6574,7 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6574
6574
|
...t,
|
|
6575
6575
|
children: /* @__PURE__ */ Z("div", {
|
|
6576
6576
|
className: "-mx-0.5 flex flex-col items-start [&>div]:w-full",
|
|
6577
|
-
children: [/* @__PURE__ */ X(of, { children: /* @__PURE__ */ X(
|
|
6577
|
+
children: [/* @__PURE__ */ X(of, { children: /* @__PURE__ */ X(sn, {
|
|
6578
6578
|
axis: "y",
|
|
6579
6579
|
values: e,
|
|
6580
6580
|
onReorder: m,
|
|
@@ -6610,7 +6610,7 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6610
6610
|
})
|
|
6611
6611
|
});
|
|
6612
6612
|
}, Bf = ({ value: e, ...t }) => {
|
|
6613
|
-
let { onQuestionChange: n, answering: r, placeholders: i } = rf(), a = wf(t), { t: o } =
|
|
6613
|
+
let { onQuestionChange: n, answering: r, placeholders: i } = rf(), a = wf(t), { t: o } = z(), s = i?.answer ?? o("surveyFormBuilder.answer.textPlaceholder"), c = K(() => t.type === "text" ? {
|
|
6614
6614
|
id: t.id,
|
|
6615
6615
|
type: "text",
|
|
6616
6616
|
label: o("surveyFormBuilder.answer.label"),
|
|
@@ -6661,7 +6661,7 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6661
6661
|
default: throw Error("Invalid question type provided");
|
|
6662
6662
|
}
|
|
6663
6663
|
}, Hf = () => {
|
|
6664
|
-
let { t: e } =
|
|
6664
|
+
let { t: e } = z();
|
|
6665
6665
|
return /* @__PURE__ */ Z("div", {
|
|
6666
6666
|
className: "mt-8 ml-7 flex flex-row items-center gap-4",
|
|
6667
6667
|
children: [
|
|
@@ -6674,12 +6674,12 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6674
6674
|
]
|
|
6675
6675
|
});
|
|
6676
6676
|
}, Uf = xc(({ item: e, section: t, showEndOfSection: n, className: r }) => {
|
|
6677
|
-
let { isDragging: i, setIsDragging: a, setDraggedItemId: o, draggedItemId: s } = sf(), c =
|
|
6677
|
+
let { isDragging: i, setIsDragging: a, setDraggedItemId: o, draggedItemId: s } = sf(), c = We(), { disabled: l, answering: u } = rf(), d = !!t && s === t.id, f = () => {
|
|
6678
6678
|
a(!0), o(e.question.id);
|
|
6679
6679
|
}, p = () => {
|
|
6680
6680
|
a(!1), o(null);
|
|
6681
6681
|
}, m = t?.locked, h = !l && !u && !m;
|
|
6682
|
-
return /* @__PURE__ */ Z(
|
|
6682
|
+
return /* @__PURE__ */ Z(Xt, {
|
|
6683
6683
|
value: e.id,
|
|
6684
6684
|
onDragStart: f,
|
|
6685
6685
|
onDragEnd: p,
|
|
@@ -6709,12 +6709,12 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6709
6709
|
}), n ? /* @__PURE__ */ X(Hf, {}) : null]
|
|
6710
6710
|
});
|
|
6711
6711
|
}, (e, t) => e.showEndOfSection === t.showEndOfSection && e.className === t.className && (0, _l.default)(e.section, t.section) && (0, _l.default)(e.item, t.item)), Wf = ({ question: e }) => {
|
|
6712
|
-
let { isDragging: t, setIsDragging: n, setDraggedItemId: r } = sf(), i =
|
|
6712
|
+
let { isDragging: t, setIsDragging: n, setDraggedItemId: r } = sf(), i = We(), { disabled: a, answering: o, getSectionContainingQuestion: s } = rf(), c = s(e.id), l = () => {
|
|
6713
6713
|
n(!0), r(e.id);
|
|
6714
6714
|
}, u = () => {
|
|
6715
6715
|
n(!1), r(null);
|
|
6716
6716
|
}, d = c?.locked, f = !a && !o && !d;
|
|
6717
|
-
return /* @__PURE__ */ X(
|
|
6717
|
+
return /* @__PURE__ */ X(Xt, {
|
|
6718
6718
|
value: e,
|
|
6719
6719
|
as: "div",
|
|
6720
6720
|
onDragStart: l,
|
|
@@ -6738,7 +6738,7 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6738
6738
|
})
|
|
6739
6739
|
});
|
|
6740
6740
|
}, Gf = ({ id: e, title: t = "", description: n, lockedNote: r, questions: i = [], locked: a, hideQuestions: o }) => {
|
|
6741
|
-
let { onSectionChange: s, disabled: c, answering: l, deleteElement: u, onDuplicateElement: d, placeholders: f } = rf(), [p, m] = J(!1), { t: h } =
|
|
6741
|
+
let { onSectionChange: s, disabled: c, answering: l, deleteElement: u, onDuplicateElement: d, placeholders: f } = rf(), [p, m] = J(!1), { t: h } = z(), g = f?.sectionTitle ?? h("surveyFormBuilder.labels.sectionTitlePlaceholder"), _ = K(() => ({
|
|
6742
6742
|
id: e,
|
|
6743
6743
|
title: t,
|
|
6744
6744
|
description: n
|
|
@@ -6842,7 +6842,7 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6842
6842
|
disabled: S,
|
|
6843
6843
|
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")
|
|
6844
6844
|
}) : null]
|
|
6845
|
-
}) : null, o ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(of, { children: /* @__PURE__ */ X(
|
|
6845
|
+
}) : null, o ? null : /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(of, { children: /* @__PURE__ */ X(sn, {
|
|
6846
6846
|
axis: "y",
|
|
6847
6847
|
values: i,
|
|
6848
6848
|
onReorder: b,
|
|
@@ -6864,8 +6864,8 @@ var Rf = ({ index: e, option: t, onClick: n, onClickAction: r, onChangeLabel: i,
|
|
|
6864
6864
|
})] })]
|
|
6865
6865
|
});
|
|
6866
6866
|
}, Kf = xc(({ item: e, className: t }) => {
|
|
6867
|
-
let { isDragging: n, setIsDragging: r, setDraggedItemId: i, draggedItemId: a } = sf(), o =
|
|
6868
|
-
return /* @__PURE__ */ X(
|
|
6867
|
+
let { isDragging: n, setIsDragging: r, setDraggedItemId: i, draggedItemId: a } = sf(), o = We(), { disabled: s, answering: c } = rf(), l = a === e.section.id;
|
|
6868
|
+
return /* @__PURE__ */ X(Xt, {
|
|
6869
6869
|
value: e.id,
|
|
6870
6870
|
onDragStart: () => {
|
|
6871
6871
|
r(!0), i(e.section.id);
|
|
@@ -7093,7 +7093,7 @@ function Qf(e, t) {
|
|
|
7093
7093
|
return i;
|
|
7094
7094
|
}
|
|
7095
7095
|
var $f = ({ elements: e, onChange: t, answering: n }) => {
|
|
7096
|
-
let { t: r } =
|
|
7096
|
+
let { t: r } = z(), { disabled: i, labels: a } = rf(), { portalContainer: o } = Sc(Io), s = Yf(e, {
|
|
7097
7097
|
untitledSectionLabel: r("surveyFormBuilder.labels.sectionTitlePlaceholder"),
|
|
7098
7098
|
untitledQuestionLabel: r("surveyFormBuilder.labels.titlePlaceholder"),
|
|
7099
7099
|
duplicateQuestionLabel: a?.duplicateQuestion ?? r("surveyFormBuilder.actions.duplicateQuestion"),
|
|
@@ -7240,7 +7240,7 @@ var np = (e, t, n) => {
|
|
|
7240
7240
|
}, s.id)), o++;
|
|
7241
7241
|
}
|
|
7242
7242
|
return /* @__PURE__ */ X(Y, { children: a });
|
|
7243
|
-
}, ap =
|
|
7243
|
+
}, ap = R(({ elements: e, disabled: t, onChange: n, disallowOptionalQuestions: r, allowedQuestionTypes: i, applyingChanges: a, useUpload: o, datasets: s, placeholders: c, labels: l, skipDefaultSection: u }) => {
|
|
7244
7244
|
let d = !t, f = K(() => e.map((e) => e.type === "question" ? {
|
|
7245
7245
|
...e,
|
|
7246
7246
|
question: {
|
|
@@ -7296,7 +7296,7 @@ var np = (e, t, n) => {
|
|
|
7296
7296
|
initial: { filter: "blur(0px)" },
|
|
7297
7297
|
animate: { filter: a ? "blur(2px)" : "none" },
|
|
7298
7298
|
exit: { filter: "blur(0px)" },
|
|
7299
|
-
children: [/* @__PURE__ */ X(
|
|
7299
|
+
children: [/* @__PURE__ */ X(sn, {
|
|
7300
7300
|
axis: "y",
|
|
7301
7301
|
values: h,
|
|
7302
7302
|
onReorder: b,
|
|
@@ -7342,27 +7342,27 @@ function op({ titleWidth: e, descriptionWidth: t, answer: n }) {
|
|
|
7342
7342
|
className: "flex flex-col gap-4 rounded-xl border border-solid border-f1-border-secondary bg-f1-background p-4",
|
|
7343
7343
|
children: [/* @__PURE__ */ Z("div", {
|
|
7344
7344
|
className: "flex flex-col gap-2",
|
|
7345
|
-
children: [/* @__PURE__ */ X(
|
|
7345
|
+
children: [/* @__PURE__ */ X(gn, {
|
|
7346
7346
|
className: "h-5 rounded-sm",
|
|
7347
7347
|
style: { width: e }
|
|
7348
|
-
}), t ? /* @__PURE__ */ X(
|
|
7348
|
+
}), t ? /* @__PURE__ */ X(gn, {
|
|
7349
7349
|
className: "h-4 rounded-sm",
|
|
7350
7350
|
style: { width: t }
|
|
7351
7351
|
}) : null]
|
|
7352
7352
|
}), n]
|
|
7353
7353
|
});
|
|
7354
7354
|
}
|
|
7355
|
-
var sp = /* @__PURE__ */ X(
|
|
7355
|
+
var sp = /* @__PURE__ */ X(gn, { className: "h-10 w-full rounded-sm" }), cp = /* @__PURE__ */ X(gn, { className: "h-24 w-full rounded-sm" }), lp = /* @__PURE__ */ X(gn, { className: "h-10 w-56 max-w-full rounded-sm" });
|
|
7356
7356
|
function up() {
|
|
7357
7357
|
return /* @__PURE__ */ X("div", {
|
|
7358
7358
|
className: "grid grid-cols-5 gap-2 sm:max-w-80",
|
|
7359
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(
|
|
7359
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(gn, { className: "h-9 rounded-sm" }, t))
|
|
7360
7360
|
});
|
|
7361
7361
|
}
|
|
7362
7362
|
function dp({ count: e }) {
|
|
7363
7363
|
return /* @__PURE__ */ X("div", {
|
|
7364
7364
|
className: "flex flex-col gap-2",
|
|
7365
|
-
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(
|
|
7365
|
+
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ X(gn, {
|
|
7366
7366
|
className: "h-7 w-56 max-w-full rounded-sm",
|
|
7367
7367
|
style: { width: `${Math.max(52, 76 - t * 7)}%` }
|
|
7368
7368
|
}, t))
|
|
@@ -7371,7 +7371,7 @@ function dp({ count: e }) {
|
|
|
7371
7371
|
function fp() {
|
|
7372
7372
|
return /* @__PURE__ */ X("div", {
|
|
7373
7373
|
className: "flex flex-wrap gap-2",
|
|
7374
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(
|
|
7374
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ X(gn, {
|
|
7375
7375
|
className: "h-8 rounded-sm",
|
|
7376
7376
|
style: { width: `${18 + t * 3}%` }
|
|
7377
7377
|
}, t))
|
|
@@ -7387,7 +7387,7 @@ function pp() {
|
|
|
7387
7387
|
className: "flex flex-col gap-5",
|
|
7388
7388
|
children: [/* @__PURE__ */ Z("div", {
|
|
7389
7389
|
className: "flex flex-col gap-2 px-5",
|
|
7390
|
-
children: [/* @__PURE__ */ X(
|
|
7390
|
+
children: [/* @__PURE__ */ X(gn, { className: "h-6 w-56 rounded-sm" }), /* @__PURE__ */ X(gn, { className: "h-4 w-80 max-w-full rounded-sm" })]
|
|
7391
7391
|
}), /* @__PURE__ */ X("div", {
|
|
7392
7392
|
className: "flex flex-col gap-4",
|
|
7393
7393
|
children: e === 0 ? /* @__PURE__ */ Z(Y, { children: [
|
|
@@ -7455,7 +7455,7 @@ function mp() {
|
|
|
7455
7455
|
"aria-live": "polite",
|
|
7456
7456
|
children: [/* @__PURE__ */ Z("div", {
|
|
7457
7457
|
className: "flex flex-col gap-2 px-5",
|
|
7458
|
-
children: [/* @__PURE__ */ X(
|
|
7458
|
+
children: [/* @__PURE__ */ X(gn, { className: "h-6 w-52 rounded-sm" }), /* @__PURE__ */ X(gn, { className: "h-4 w-72 max-w-full rounded-sm" })]
|
|
7459
7459
|
}), /* @__PURE__ */ X(op, {
|
|
7460
7460
|
titleWidth: "74%",
|
|
7461
7461
|
descriptionWidth: "50%",
|
|
@@ -8078,185 +8078,214 @@ function Ip(e) {
|
|
|
8078
8078
|
for (let [n, r] of Object.entries(e)) t[n] = r === void 0 ? null : r;
|
|
8079
8079
|
return t;
|
|
8080
8080
|
}
|
|
8081
|
-
function Lp(e) {
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
}, [
|
|
8081
|
+
function Lp(e, t) {
|
|
8082
|
+
let n = {};
|
|
8083
|
+
for (let r of e) {
|
|
8084
|
+
let e = r.type === "section" ? r.section.questions ?? [] : [r.question];
|
|
8085
|
+
for (let r of e) n[r.id] = Op(r, t);
|
|
8086
|
+
}
|
|
8087
|
+
return n;
|
|
8088
|
+
}
|
|
8089
|
+
function Rp(e) {
|
|
8090
|
+
return e.inline ? /* @__PURE__ */ X(Bp, { ...e }) : /* @__PURE__ */ X(zp, { ...e });
|
|
8091
|
+
}
|
|
8092
|
+
function zp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resourceHeader: a, isOpen: o, onClose: s, position: c = "center", module: l, allowToChangeFullscreen: u = !1, defaultValues: d, errorTriggerMode: f = "on-blur", loading: p = !1, labels: m, preview: h = !1, useUpload: g, datasets: _, saveDraft: v }) {
|
|
8093
|
+
let { t: y } = z(), [b, x] = J(!1), S = c === "fullscreen", C = c === "fullscreen" ? "center" : c, [w, T] = J(S), { formRef: E, submit: D, isSubmitting: O, hasErrors: k } = rn(), A = q({}), j = K(() => kp(e), [e]), M = hp(j), N = j.length > 0, P = {
|
|
8094
|
+
title: m?.empty?.title ?? y("surveyAnsweringForm.labels.empty.title"),
|
|
8095
|
+
description: m?.empty?.description ?? y("surveyAnsweringForm.labels.empty.description"),
|
|
8096
|
+
emoji: m?.empty?.emoji ?? y("surveyAnsweringForm.labels.empty.emoji")
|
|
8097
|
+
}, F = n === "stepped", I = h && !!d && Object.keys(d).length > 0, ee = h && !I, te = F ? M.currentQuestion?.id : void 0, L = q(void 0), ne = q(Pp), re = W(() => {
|
|
8098
|
+
clearTimeout(L.current);
|
|
8099
|
+
}, []), ie = W((e) => {
|
|
8100
|
+
re(), e && (L.current = setTimeout(() => ne.current(), Fp));
|
|
8101
|
+
}, [re]), { schema: ae, defaultValues: oe, sections: se } = Np({
|
|
8094
8102
|
elements: e,
|
|
8095
8103
|
mode: n,
|
|
8096
|
-
t:
|
|
8104
|
+
t: y,
|
|
8097
8105
|
defaultValues: d,
|
|
8098
|
-
currentQuestionId:
|
|
8099
|
-
accumulatedValues:
|
|
8106
|
+
currentQuestionId: te,
|
|
8107
|
+
accumulatedValues: F ? A.current : void 0,
|
|
8100
8108
|
previewMode: h,
|
|
8101
|
-
disableFields:
|
|
8109
|
+
disableFields: I,
|
|
8102
8110
|
useUpload: g,
|
|
8103
8111
|
datasets: _,
|
|
8104
|
-
onSingleAnswerChange:
|
|
8105
|
-
}),
|
|
8106
|
-
|
|
8107
|
-
|
|
8112
|
+
onSingleAnswerChange: F ? ie : void 0
|
|
8113
|
+
}), le = w ? "fullscreen" : C, ue = le === "center" ? "xl" : void 0, de = q(null), fe = W((e) => {
|
|
8114
|
+
de.current && clearTimeout(de.current), de.current = setTimeout(() => {
|
|
8115
|
+
de.current = null, s();
|
|
8108
8116
|
}, e);
|
|
8109
|
-
}, [s]),
|
|
8117
|
+
}, [s]), me = W((e) => e.success ? (fe(e.message ? 1e3 : 0), {
|
|
8110
8118
|
success: !0,
|
|
8111
8119
|
message: e.message
|
|
8112
8120
|
}) : {
|
|
8113
8121
|
success: !1,
|
|
8114
8122
|
errors: e.errors
|
|
8115
|
-
}, [
|
|
8123
|
+
}, [fe]), he = W(async (e) => {
|
|
8116
8124
|
if (h) return { success: !0 };
|
|
8117
8125
|
if (!t) throw Error("onSubmit is required when preview is false");
|
|
8118
|
-
if (
|
|
8119
|
-
...
|
|
8126
|
+
if (F && !M.isLastStep) return A.current = {
|
|
8127
|
+
...A.current,
|
|
8120
8128
|
...e
|
|
8121
|
-
},
|
|
8122
|
-
let n = Ip(
|
|
8123
|
-
...
|
|
8129
|
+
}, M.goToNext(), { success: !0 };
|
|
8130
|
+
let n = Ip(F ? {
|
|
8131
|
+
...A.current,
|
|
8124
8132
|
...e
|
|
8125
8133
|
} : e);
|
|
8126
|
-
if (
|
|
8127
|
-
|
|
8134
|
+
if (F) {
|
|
8135
|
+
M.setProgress(100);
|
|
8128
8136
|
let [e] = await Promise.all([t(n), new Promise((e) => setTimeout(e, 1e3))]);
|
|
8129
|
-
return e.success ||
|
|
8137
|
+
return e.success || M.setProgress(null), me(e);
|
|
8130
8138
|
}
|
|
8131
|
-
return
|
|
8139
|
+
return me(await t(n));
|
|
8132
8140
|
}, [
|
|
8133
8141
|
t,
|
|
8134
8142
|
h,
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
]),
|
|
8143
|
+
me,
|
|
8144
|
+
F,
|
|
8145
|
+
M.isLastStep,
|
|
8146
|
+
M.goToNext,
|
|
8147
|
+
M.setProgress
|
|
8148
|
+
]), ge = W(async () => {
|
|
8141
8149
|
try {
|
|
8142
|
-
await
|
|
8150
|
+
await D();
|
|
8143
8151
|
} catch {}
|
|
8144
|
-
}, [
|
|
8145
|
-
let e =
|
|
8146
|
-
|
|
8147
|
-
...
|
|
8152
|
+
}, [D]), _e = W(() => {
|
|
8153
|
+
let e = E.current?.getValues() ?? {};
|
|
8154
|
+
A.current = {
|
|
8155
|
+
...A.current,
|
|
8148
8156
|
...e
|
|
8149
|
-
},
|
|
8150
|
-
}, [
|
|
8157
|
+
}, M.goToPrevious();
|
|
8158
|
+
}, [E, M.goToPrevious]), ve = W(async () => {
|
|
8159
|
+
if (!v) return;
|
|
8160
|
+
let t = {
|
|
8161
|
+
...Lp(e, d),
|
|
8162
|
+
...A.current,
|
|
8163
|
+
...E.current?.getValues()
|
|
8164
|
+
};
|
|
8165
|
+
x(!0), await Promise.resolve().then(() => v.onSave(Ip(t))).catch((e) => {
|
|
8166
|
+
console.warn("SurveyAnsweringForm: saveDraft.onSave failed", e);
|
|
8167
|
+
}).finally(() => x(!1));
|
|
8168
|
+
}, [
|
|
8169
|
+
v,
|
|
8170
|
+
e,
|
|
8171
|
+
d,
|
|
8172
|
+
E
|
|
8173
|
+
]), ye = F && !M.isLastStep && !p && !I, be = ee ? M.goToNext : ge;
|
|
8151
8174
|
G(() => {
|
|
8152
|
-
|
|
8153
|
-
}, [
|
|
8154
|
-
|
|
8175
|
+
ne.current = ye ? be : Pp;
|
|
8176
|
+
}, [ye, be]), G(() => () => re(), [
|
|
8177
|
+
M.currentStep,
|
|
8155
8178
|
o,
|
|
8156
|
-
|
|
8179
|
+
re
|
|
8157
8180
|
]);
|
|
8158
|
-
let
|
|
8159
|
-
label:
|
|
8160
|
-
icon:
|
|
8161
|
-
onClick: () =>
|
|
8162
|
-
}] : void 0,
|
|
8163
|
-
label:
|
|
8164
|
-
onClick:
|
|
8181
|
+
let xe = u && !p ? [{
|
|
8182
|
+
label: y(w ? "surveyAnsweringForm.actions.collapse" : "surveyAnsweringForm.actions.expand"),
|
|
8183
|
+
icon: w ? Jr : dr,
|
|
8184
|
+
onClick: () => T((e) => !e)
|
|
8185
|
+
}] : void 0, Se = N ? p || I ? void 0 : ee ? F && !M.isLastStep ? {
|
|
8186
|
+
label: y("surveyAnsweringForm.actions.next"),
|
|
8187
|
+
onClick: M.goToNext,
|
|
8165
8188
|
icon: Er
|
|
8166
8189
|
} : {
|
|
8167
|
-
label:
|
|
8190
|
+
label: y("surveyAnsweringForm.actions.submit"),
|
|
8168
8191
|
onClick: Pp,
|
|
8169
8192
|
disabled: !0
|
|
8170
|
-
} :
|
|
8171
|
-
label:
|
|
8172
|
-
onClick:
|
|
8173
|
-
icon: Er
|
|
8193
|
+
} : F && !M.isLastStep ? {
|
|
8194
|
+
label: y("surveyAnsweringForm.actions.next"),
|
|
8195
|
+
onClick: ge,
|
|
8196
|
+
icon: Er,
|
|
8197
|
+
disabled: b
|
|
8174
8198
|
} : {
|
|
8175
|
-
label:
|
|
8176
|
-
onClick:
|
|
8177
|
-
disabled:
|
|
8178
|
-
loading:
|
|
8179
|
-
} : void 0,
|
|
8180
|
-
label:
|
|
8181
|
-
onClick:
|
|
8199
|
+
label: y("surveyAnsweringForm.actions.submit"),
|
|
8200
|
+
onClick: ge,
|
|
8201
|
+
disabled: O || k || b,
|
|
8202
|
+
loading: O
|
|
8203
|
+
} : void 0, Ce = N ? p || I ? void 0 : F && !M.isFirstStep ? {
|
|
8204
|
+
label: y("surveyAnsweringForm.actions.previous"),
|
|
8205
|
+
onClick: _e,
|
|
8182
8206
|
icon: Ho
|
|
8183
|
-
} : void 0 : void 0,
|
|
8207
|
+
} : void 0 : void 0, we = v && N && !p && !h ? [{
|
|
8208
|
+
label: v.label,
|
|
8209
|
+
onClick: ve,
|
|
8210
|
+
disabled: O
|
|
8211
|
+
}] : void 0, Te = n === "all-questions" && N && !p, Ee = F && N && !p, De = F && !!M.currentQuestion?.sectionTitle && !p, Oe = le === "center" || le === "fullscreen";
|
|
8184
8212
|
return /* @__PURE__ */ X(mi, {
|
|
8185
8213
|
isOpen: o,
|
|
8186
8214
|
onClose: s,
|
|
8187
8215
|
title: r,
|
|
8188
8216
|
module: l,
|
|
8189
|
-
position:
|
|
8190
|
-
width:
|
|
8191
|
-
primaryAction:
|
|
8192
|
-
secondaryAction:
|
|
8193
|
-
|
|
8194
|
-
|
|
8217
|
+
position: le,
|
|
8218
|
+
width: ue,
|
|
8219
|
+
primaryAction: Se,
|
|
8220
|
+
secondaryAction: Ce,
|
|
8221
|
+
secondaryActions: we,
|
|
8222
|
+
otherActions: xe,
|
|
8223
|
+
disableContentPadding: Oe,
|
|
8195
8224
|
children: /* @__PURE__ */ X(nf, {
|
|
8196
8225
|
answering: !0,
|
|
8197
8226
|
elements: e,
|
|
8198
8227
|
onChange: Pp,
|
|
8199
8228
|
datasets: _,
|
|
8200
8229
|
children: /* @__PURE__ */ Z("div", {
|
|
8201
|
-
className: B("relative flex h-full min-h-full flex-col @container",
|
|
8230
|
+
className: B("relative flex h-full min-h-full flex-col @container", F && !w && "min-h-[600px]"),
|
|
8202
8231
|
children: [
|
|
8203
|
-
|
|
8232
|
+
Te ? /* @__PURE__ */ X($f, {
|
|
8204
8233
|
elements: e,
|
|
8205
8234
|
onChange: Pp,
|
|
8206
8235
|
answering: !0
|
|
8207
8236
|
}) : null,
|
|
8208
|
-
|
|
8237
|
+
Ee ? /* @__PURE__ */ X("div", {
|
|
8209
8238
|
className: "absolute left-0 right-0 top-0 [&>div>div>div]:h-1 [&>div>div>div]:rounded-none",
|
|
8210
8239
|
children: /* @__PURE__ */ X(Jo, {
|
|
8211
8240
|
label: "Value",
|
|
8212
|
-
value:
|
|
8241
|
+
value: M.progress,
|
|
8213
8242
|
hideLabel: !0
|
|
8214
8243
|
})
|
|
8215
8244
|
}) : null,
|
|
8216
8245
|
/* @__PURE__ */ Z("div", {
|
|
8217
|
-
className: B("mx-auto flex w-full flex-1 justify-center flex-col @lg:w-[750px] max-w-full pt-0",
|
|
8246
|
+
className: B("mx-auto flex w-full flex-1 justify-center flex-col @lg:w-[750px] max-w-full pt-0", Oe && "px-4 py-12"),
|
|
8218
8247
|
children: [
|
|
8219
8248
|
/* @__PURE__ */ X("div", {
|
|
8220
8249
|
className: "mb-6",
|
|
8221
|
-
children: /* @__PURE__ */ X(
|
|
8250
|
+
children: /* @__PURE__ */ X(on, {
|
|
8222
8251
|
title: r,
|
|
8223
8252
|
description: i,
|
|
8224
8253
|
...a
|
|
8225
8254
|
})
|
|
8226
8255
|
}),
|
|
8227
|
-
p ? X(n === "stepped" ? mp : pp, {}) :
|
|
8256
|
+
p ? X(n === "stepped" ? mp : pp, {}) : N ? null : /* @__PURE__ */ X(io, {
|
|
8228
8257
|
display: "flex",
|
|
8229
8258
|
flexDirection: "column",
|
|
8230
8259
|
height: "full",
|
|
8231
8260
|
justifyContent: "center",
|
|
8232
8261
|
alignItems: "center",
|
|
8233
8262
|
paddingX: "lg",
|
|
8234
|
-
children: /* @__PURE__ */ X(
|
|
8235
|
-
emoji:
|
|
8236
|
-
title:
|
|
8237
|
-
description:
|
|
8263
|
+
children: /* @__PURE__ */ X(pe, {
|
|
8264
|
+
emoji: P.emoji,
|
|
8265
|
+
title: P.title,
|
|
8266
|
+
description: P.description
|
|
8238
8267
|
})
|
|
8239
8268
|
}),
|
|
8240
|
-
|
|
8269
|
+
De ? /* @__PURE__ */ Z("div", {
|
|
8241
8270
|
className: "py-1 pl-5",
|
|
8242
8271
|
children: [/* @__PURE__ */ X("span", {
|
|
8243
8272
|
className: "text-lg font-semibold text-f1-foreground",
|
|
8244
|
-
children:
|
|
8245
|
-
}),
|
|
8273
|
+
children: M.currentQuestion?.sectionTitle
|
|
8274
|
+
}), M.currentQuestion?.sectionDescription ? /* @__PURE__ */ X("p", {
|
|
8246
8275
|
className: "whitespace-pre-line text-f1-foreground-secondary",
|
|
8247
|
-
children:
|
|
8276
|
+
children: M.currentQuestion?.sectionDescription
|
|
8248
8277
|
}) : null]
|
|
8249
8278
|
}) : null,
|
|
8250
|
-
|
|
8251
|
-
formRef:
|
|
8279
|
+
N && !p ? /* @__PURE__ */ X(ce, {
|
|
8280
|
+
formRef: E,
|
|
8252
8281
|
name: "survey-answering",
|
|
8253
|
-
schema:
|
|
8254
|
-
defaultValues:
|
|
8255
|
-
onSubmit:
|
|
8282
|
+
schema: ae,
|
|
8283
|
+
defaultValues: oe,
|
|
8284
|
+
onSubmit: he,
|
|
8256
8285
|
submitConfig: { hideSubmitButton: !0 },
|
|
8257
8286
|
errorTriggerMode: f,
|
|
8258
|
-
sections:
|
|
8259
|
-
},
|
|
8287
|
+
sections: se
|
|
8288
|
+
}, F ? M.currentStep : void 0) : null
|
|
8260
8289
|
]
|
|
8261
8290
|
})
|
|
8262
8291
|
]
|
|
@@ -8264,8 +8293,8 @@ function Rp({ elements: e, onSubmit: t, mode: n, title: r, description: i, resou
|
|
|
8264
8293
|
})
|
|
8265
8294
|
});
|
|
8266
8295
|
}
|
|
8267
|
-
function
|
|
8268
|
-
let { t: u } =
|
|
8296
|
+
function Bp({ elements: e, title: t, description: n, resourceHeader: r, defaultValues: i, loading: a = !1, labels: o, useUpload: s, datasets: c, hideResourceHeader: l = !1 }) {
|
|
8297
|
+
let { t: u } = z(), d = K(() => kp(e), [e]).length > 0, f = {
|
|
8269
8298
|
title: o?.empty?.title ?? u("surveyAnsweringForm.labels.empty.title"),
|
|
8270
8299
|
description: o?.empty?.description ?? u("surveyAnsweringForm.labels.empty.description"),
|
|
8271
8300
|
emoji: o?.empty?.emoji ?? u("surveyAnsweringForm.labels.empty.emoji")
|
|
@@ -8288,12 +8317,12 @@ function zp({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
8288
8317
|
className: "mx-auto flex w-full max-w-3xl flex-col",
|
|
8289
8318
|
children: [l ? null : /* @__PURE__ */ X("div", {
|
|
8290
8319
|
className: "mb-6",
|
|
8291
|
-
children: /* @__PURE__ */ X(
|
|
8320
|
+
children: /* @__PURE__ */ X(on, {
|
|
8292
8321
|
title: t,
|
|
8293
8322
|
description: n,
|
|
8294
8323
|
...r
|
|
8295
8324
|
})
|
|
8296
|
-
}), a ? /* @__PURE__ */ X(pp, {}) : d ? /* @__PURE__ */ X(
|
|
8325
|
+
}), a ? /* @__PURE__ */ X(pp, {}) : d ? /* @__PURE__ */ X(ce, {
|
|
8297
8326
|
name: "survey-answering-inline",
|
|
8298
8327
|
schema: p,
|
|
8299
8328
|
defaultValues: m,
|
|
@@ -8309,7 +8338,7 @@ function zp({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
8309
8338
|
justifyContent: "center",
|
|
8310
8339
|
alignItems: "center",
|
|
8311
8340
|
paddingX: "lg",
|
|
8312
|
-
children: /* @__PURE__ */ X(
|
|
8341
|
+
children: /* @__PURE__ */ X(pe, {
|
|
8313
8342
|
emoji: f.emoji,
|
|
8314
8343
|
title: f.title,
|
|
8315
8344
|
description: f.description
|
|
@@ -8320,7 +8349,7 @@ function zp({ elements: e, title: t, description: n, resourceHeader: r, defaultV
|
|
|
8320
8349
|
}
|
|
8321
8350
|
//#endregion
|
|
8322
8351
|
//#region src/domains/talent/surveys/surveys/SurveySampleQuestion/SurveySampleQuestion.tsx
|
|
8323
|
-
function
|
|
8352
|
+
function Vp(e) {
|
|
8324
8353
|
return /* @__PURE__ */ Z(io, {
|
|
8325
8354
|
display: "flex",
|
|
8326
8355
|
flexDirection: "column",
|
|
@@ -8331,14 +8360,14 @@ function Bp(e) {
|
|
|
8331
8360
|
children: [/* @__PURE__ */ X("p", {
|
|
8332
8361
|
className: "m-0 text-sm font-semibold text-f1-foreground",
|
|
8333
8362
|
children: e.question
|
|
8334
|
-
}), e.type === "rating" ? /* @__PURE__ */ X(
|
|
8363
|
+
}), e.type === "rating" ? /* @__PURE__ */ X(Hp, {
|
|
8335
8364
|
steps: e.steps ?? 5,
|
|
8336
8365
|
minLabel: e.minLabel,
|
|
8337
8366
|
maxLabel: e.maxLabel
|
|
8338
|
-
}) : /* @__PURE__ */ X(
|
|
8367
|
+
}) : /* @__PURE__ */ X(Up, { options: e.options })]
|
|
8339
8368
|
});
|
|
8340
8369
|
}
|
|
8341
|
-
function
|
|
8370
|
+
function Hp({ steps: e, minLabel: t, maxLabel: n }) {
|
|
8342
8371
|
return /* @__PURE__ */ Z(io, {
|
|
8343
8372
|
display: "flex",
|
|
8344
8373
|
flexDirection: "column",
|
|
@@ -8367,7 +8396,7 @@ function Vp({ steps: e, minLabel: t, maxLabel: n }) {
|
|
|
8367
8396
|
}) : null]
|
|
8368
8397
|
});
|
|
8369
8398
|
}
|
|
8370
|
-
function
|
|
8399
|
+
function Up({ options: e }) {
|
|
8371
8400
|
return /* @__PURE__ */ X(io, {
|
|
8372
8401
|
display: "flex",
|
|
8373
8402
|
flexDirection: "column",
|
|
@@ -8396,17 +8425,17 @@ function Hp({ options: e }) {
|
|
|
8396
8425
|
}
|
|
8397
8426
|
//#endregion
|
|
8398
8427
|
//#region src/domains/growth/upselling/UpsellingKit/ProductBlankslate/ProductBlankslate.tsx
|
|
8399
|
-
var
|
|
8428
|
+
var Wp = ({ benefits: e }) => /* @__PURE__ */ X("div", {
|
|
8400
8429
|
className: "flex flex-col gap-2",
|
|
8401
|
-
children: e.map((e, t) => /* @__PURE__ */ X(
|
|
8402
|
-
}),
|
|
8430
|
+
children: e.map((e, t) => /* @__PURE__ */ X(Gp, { text: e }, t))
|
|
8431
|
+
}), Gp = ({ text: e }) => /* @__PURE__ */ Z("div", {
|
|
8403
8432
|
className: "flex flex-row items-start gap-2",
|
|
8404
8433
|
children: [/* @__PURE__ */ X(H, {
|
|
8405
8434
|
icon: Vs,
|
|
8406
8435
|
size: "md",
|
|
8407
8436
|
className: "text-f1-icon-positive"
|
|
8408
8437
|
}), /* @__PURE__ */ X("span", { children: e })]
|
|
8409
|
-
}),
|
|
8438
|
+
}), Kp = yc(({ title: e, image: t, benefits: n, actions: r, withShadow: i = !0, module: a, moduleName: o, tag: s, promoTag: c }, l) => /* @__PURE__ */ Z("div", {
|
|
8410
8439
|
ref: l,
|
|
8411
8440
|
className: B("bg-white flex flex-row rounded-xl border border-f1-border-secondary", i && "shadow-md"),
|
|
8412
8441
|
children: [/* @__PURE__ */ X("div", {
|
|
@@ -8445,18 +8474,18 @@ var Up = ({ benefits: e }) => /* @__PURE__ */ X("div", {
|
|
|
8445
8474
|
children: e
|
|
8446
8475
|
})
|
|
8447
8476
|
]
|
|
8448
|
-
}), /* @__PURE__ */ X(
|
|
8477
|
+
}), /* @__PURE__ */ X(Wp, { benefits: n })]
|
|
8449
8478
|
}), r ? /* @__PURE__ */ X("div", {
|
|
8450
8479
|
className: "flex gap-3",
|
|
8451
8480
|
children: r
|
|
8452
8481
|
}) : null]
|
|
8453
8482
|
})]
|
|
8454
8483
|
}));
|
|
8455
|
-
|
|
8456
|
-
var
|
|
8484
|
+
Kp.displayName = "ProductBlankslate";
|
|
8485
|
+
var qp = R(Kp);
|
|
8457
8486
|
//#endregion
|
|
8458
8487
|
//#region src/domains/growth/upselling/UpsellingKit/ProductModal/components/CustomModal.tsx
|
|
8459
|
-
function
|
|
8488
|
+
function Jp({ isOpen: e, onClose: t, title: n, children: r, module: i, portalContainer: a }) {
|
|
8460
8489
|
let [o, s] = J(e);
|
|
8461
8490
|
return G(() => {
|
|
8462
8491
|
s(e);
|
|
@@ -8496,7 +8525,7 @@ function qp({ isOpen: e, onClose: t, title: n, children: r, module: i, portalCon
|
|
|
8496
8525
|
}
|
|
8497
8526
|
//#endregion
|
|
8498
8527
|
//#region src/domains/growth/upselling/UpsellingKit/ProductModal/ProductModal.tsx
|
|
8499
|
-
function
|
|
8528
|
+
function Yp({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessage: a, successMessage: o, loadingState: s, nextSteps: c, closeLabel: l, primaryAction: u, modalTitle: d, modalModule: f, secondaryAction: p, portalContainer: m, tag: h, promoTag: g, showResponseDialog: _ = !0 }) {
|
|
8500
8529
|
let [v, y] = J(e), [b, x] = J(null), [S, C] = J(!1), w = async () => {
|
|
8501
8530
|
if (u?.onClick) {
|
|
8502
8531
|
C(!0);
|
|
@@ -8511,7 +8540,7 @@ function Jp({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessa
|
|
|
8511
8540
|
}, T = () => {
|
|
8512
8541
|
y(!1), t?.();
|
|
8513
8542
|
}, E = S;
|
|
8514
|
-
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
8543
|
+
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Jp, {
|
|
8515
8544
|
isOpen: v,
|
|
8516
8545
|
onClose: T,
|
|
8517
8546
|
title: d,
|
|
@@ -8519,7 +8548,7 @@ function Jp({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessa
|
|
|
8519
8548
|
portalContainer: m,
|
|
8520
8549
|
children: /* @__PURE__ */ X("div", {
|
|
8521
8550
|
className: "pb-4 pl-4",
|
|
8522
|
-
children: /* @__PURE__ */ X(
|
|
8551
|
+
children: /* @__PURE__ */ X(qp, {
|
|
8523
8552
|
title: n,
|
|
8524
8553
|
image: r,
|
|
8525
8554
|
benefits: i,
|
|
@@ -8558,10 +8587,10 @@ function Jp({ isOpen: e, onClose: t, title: n, image: r, benefits: i, errorMessa
|
|
|
8558
8587
|
portalContainer: m
|
|
8559
8588
|
}) : null] });
|
|
8560
8589
|
}
|
|
8561
|
-
var
|
|
8590
|
+
var Xp = R(Yp);
|
|
8562
8591
|
//#endregion
|
|
8563
8592
|
//#region src/domains/growth/upselling/UpsellingKit/ProductWidget/ProductWidget.tsx
|
|
8564
|
-
function
|
|
8593
|
+
function Zp({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i, width: a, trackVisibility: o, actions: s, showConfirmation: c = !0 }) {
|
|
8565
8594
|
let [l, u] = J(!1), d = () => {
|
|
8566
8595
|
u(!0), r && r();
|
|
8567
8596
|
};
|
|
@@ -8595,10 +8624,10 @@ function Xp({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
8595
8624
|
className: "h-full w-full rounded-md"
|
|
8596
8625
|
}) : null }), /* @__PURE__ */ Z("div", {
|
|
8597
8626
|
className: "flex flex-col gap-[2px] p-3",
|
|
8598
|
-
children: [/* @__PURE__ */ X(
|
|
8627
|
+
children: [/* @__PURE__ */ X(nt, {
|
|
8599
8628
|
className: "text-lg font-medium",
|
|
8600
8629
|
children: t
|
|
8601
|
-
}), /* @__PURE__ */ X(
|
|
8630
|
+
}), /* @__PURE__ */ X(nt, {
|
|
8602
8631
|
className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary",
|
|
8603
8632
|
children: n
|
|
8604
8633
|
})]
|
|
@@ -8622,8 +8651,8 @@ function Xp({ mediaUrl: e, title: t, description: n, onClose: r, dismissible: i,
|
|
|
8622
8651
|
}) : null]
|
|
8623
8652
|
}) });
|
|
8624
8653
|
}
|
|
8625
|
-
var
|
|
8626
|
-
let { actions: t } =
|
|
8654
|
+
var Qp = R(Zp), $p = ({ onDismiss: e }) => {
|
|
8655
|
+
let { actions: t } = z();
|
|
8627
8656
|
return /* @__PURE__ */ X(V, {
|
|
8628
8657
|
icon: $i,
|
|
8629
8658
|
label: t.close,
|
|
@@ -8634,7 +8663,7 @@ var Zp = L(Xp), Qp = ({ onDismiss: e }) => {
|
|
|
8634
8663
|
type: "button"
|
|
8635
8664
|
});
|
|
8636
8665
|
};
|
|
8637
|
-
function
|
|
8666
|
+
function em({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
8638
8667
|
return /* @__PURE__ */ X("div", {
|
|
8639
8668
|
className: "@container",
|
|
8640
8669
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -8679,13 +8708,13 @@ function $p({ icon: e, title: t, description: n, action: r, onDismiss: i }) {
|
|
|
8679
8708
|
})]
|
|
8680
8709
|
}), i ? /* @__PURE__ */ X("div", {
|
|
8681
8710
|
className: B("flex-shrink-0 self-start", !n && "@xs:self-center"),
|
|
8682
|
-
children: /* @__PURE__ */ X(
|
|
8711
|
+
children: /* @__PURE__ */ X($p, { onDismiss: i })
|
|
8683
8712
|
}) : null]
|
|
8684
8713
|
})
|
|
8685
8714
|
})
|
|
8686
8715
|
});
|
|
8687
8716
|
}
|
|
8688
|
-
var
|
|
8717
|
+
var tm = R(em), nm = yc(function({ primaryAction: e, secondaryAction: t, ...n }, r) {
|
|
8689
8718
|
let i = (e) => e.variant === "promote" ? /* @__PURE__ */ X(C, {
|
|
8690
8719
|
label: e.label,
|
|
8691
8720
|
onRequest: e.onClick,
|
|
@@ -8704,7 +8733,7 @@ var em = L($p), tm = yc(function({ primaryAction: e, secondaryAction: t, ...n },
|
|
|
8704
8733
|
size: "md",
|
|
8705
8734
|
icon: e.icon
|
|
8706
8735
|
}), a = e?.variant === "promote" ? void 0 : e, o = t?.variant === "promote" ? void 0 : t;
|
|
8707
|
-
return /* @__PURE__ */ Z(
|
|
8736
|
+
return /* @__PURE__ */ Z(Re, {
|
|
8708
8737
|
ref: r,
|
|
8709
8738
|
...n,
|
|
8710
8739
|
primaryAction: a,
|
|
@@ -8712,11 +8741,11 @@ var em = L($p), tm = yc(function({ primaryAction: e, secondaryAction: t, ...n },
|
|
|
8712
8741
|
children: [e?.variant === "promote" ? i(e) : null, t?.variant === "promote" ? i(t) : null]
|
|
8713
8742
|
});
|
|
8714
8743
|
});
|
|
8715
|
-
|
|
8716
|
-
var
|
|
8744
|
+
nm.displayName = "UpsellingBanner";
|
|
8745
|
+
var rm = R(nm);
|
|
8717
8746
|
//#endregion
|
|
8718
8747
|
//#region src/domains/growth/upselling/UpsellingKit/UpsellingPopover/UpsellingPopover.tsx
|
|
8719
|
-
function
|
|
8748
|
+
function im({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i = "md", showIcon: a = !0, side: o = "right", align: s = "center", icon: c = Dr, mediaUrl: l, title: u, description: d, width: f = "300px", trackVisibility: p, actions: m, onClick: h, hideLabel: g = !1 }) {
|
|
8720
8749
|
let [_, v] = J(!1), [y, b] = J(null), [x, S] = J(null), C = (e) => {
|
|
8721
8750
|
t(e), h && h();
|
|
8722
8751
|
}, w = async (e) => {
|
|
@@ -8751,7 +8780,7 @@ function rm({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
8751
8780
|
side: o,
|
|
8752
8781
|
align: s,
|
|
8753
8782
|
className: "w-fit border-none bg-transparent p-2 shadow-none",
|
|
8754
|
-
children: /* @__PURE__ */ X(
|
|
8783
|
+
children: /* @__PURE__ */ X(Qp, {
|
|
8755
8784
|
mediaUrl: l,
|
|
8756
8785
|
title: u,
|
|
8757
8786
|
description: d,
|
|
@@ -8774,8 +8803,8 @@ function rm({ isOpen: e, setIsOpen: t, label: n, variant: r = "promote", size: i
|
|
|
8774
8803
|
portalContainer: null
|
|
8775
8804
|
}) : null] });
|
|
8776
8805
|
}
|
|
8777
|
-
var
|
|
8778
|
-
let a =
|
|
8806
|
+
var am = R(im), om = ({ preview: e, moduleName: t, description: n, onAction: r, actionHref: i }) => {
|
|
8807
|
+
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);
|
|
8779
8808
|
return /* @__PURE__ */ Z(ea, {
|
|
8780
8809
|
className: "flex flex-col overflow-hidden",
|
|
8781
8810
|
children: [/* @__PURE__ */ Z(br, {
|
|
@@ -8810,7 +8839,7 @@ var im = L(rm), am = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8810
8839
|
})
|
|
8811
8840
|
})]
|
|
8812
8841
|
});
|
|
8813
|
-
},
|
|
8842
|
+
}, sm = ({ item: e, isExpanded: t, onToggle: n }) => /* @__PURE__ */ Z("div", {
|
|
8814
8843
|
className: B("flex flex-col rounded-lg px-3 -mx-3 transition-colors duration-200", t && "bg-f1-background-secondary"),
|
|
8815
8844
|
children: [/* @__PURE__ */ Z("button", {
|
|
8816
8845
|
type: "button",
|
|
@@ -8839,8 +8868,8 @@ var im = L(rm), am = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8839
8868
|
children: e.answer
|
|
8840
8869
|
})
|
|
8841
8870
|
})]
|
|
8842
|
-
}),
|
|
8843
|
-
let o =
|
|
8871
|
+
}), cm = ({ headerIcon: e, items: t, defaultExpandedId: n, expandedId: r, onExpandedChange: i, allowMultiple: a = !1 }) => {
|
|
8872
|
+
let o = z()?.ai?.growth?.faqCard?.title ?? "Questions before getting started", s = e ?? Ei, [c, l] = J(() => new Set(n ? [n] : [])), u = r !== void 0, d = W((e) => u ? r === e : c.has(e), [
|
|
8844
8873
|
u,
|
|
8845
8874
|
r,
|
|
8846
8875
|
c
|
|
@@ -8872,15 +8901,15 @@ var im = L(rm), am = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8872
8901
|
})]
|
|
8873
8902
|
}), /* @__PURE__ */ X(br, {
|
|
8874
8903
|
className: "flex flex-col divide-y divide-f1-border p-0",
|
|
8875
|
-
children: t.map((e) => /* @__PURE__ */ X(
|
|
8904
|
+
children: t.map((e) => /* @__PURE__ */ X(sm, {
|
|
8876
8905
|
item: e,
|
|
8877
8906
|
isExpanded: d(e.id),
|
|
8878
8907
|
onToggle: f
|
|
8879
8908
|
}, e.id))
|
|
8880
8909
|
})]
|
|
8881
8910
|
});
|
|
8882
|
-
},
|
|
8883
|
-
let a =
|
|
8911
|
+
}, lm = ({ moduleName: e, description: t, onAction: n, actionHref: r, imageSrc: i }) => {
|
|
8912
|
+
let a = z()?.ai?.growth?.moduleCard?.actionLabel ?? "Learn more";
|
|
8884
8913
|
return /* @__PURE__ */ Z(ea, {
|
|
8885
8914
|
className: "flex flex-col overflow-hidden",
|
|
8886
8915
|
children: [/* @__PURE__ */ X(br, {
|
|
@@ -8921,8 +8950,8 @@ var im = L(rm), am = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8921
8950
|
})
|
|
8922
8951
|
})]
|
|
8923
8952
|
});
|
|
8924
|
-
},
|
|
8925
|
-
let n =
|
|
8953
|
+
}, um = ({ onAction: e, actionHref: t }) => {
|
|
8954
|
+
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";
|
|
8926
8955
|
return /* @__PURE__ */ Z(ea, {
|
|
8927
8956
|
className: "flex flex-col overflow-hidden",
|
|
8928
8957
|
children: [/* @__PURE__ */ Z(br, {
|
|
@@ -8957,8 +8986,8 @@ var im = L(rm), am = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
8957
8986
|
})
|
|
8958
8987
|
})]
|
|
8959
8988
|
});
|
|
8960
|
-
},
|
|
8961
|
-
let [a, o] = J(0), [s, c] = J({}), l =
|
|
8989
|
+
}, dm = ({ steps: e, onComplete: t, onSkip: n, sendAsMessage: r = !1, onSendMessage: i }) => {
|
|
8990
|
+
let [a, o] = J(0), [s, c] = J({}), l = z(), u = e.length, d = e[a], f = s[a] ?? [], p = W((e, t) => {
|
|
8962
8991
|
c((n) => {
|
|
8963
8992
|
let r = n[a] ?? [], i = t ? [...r, e] : r.filter((t) => t !== e);
|
|
8964
8993
|
return {
|
|
@@ -9062,7 +9091,7 @@ var im = L(rm), am = ({ preview: e, moduleName: t, description: n, onAction: r,
|
|
|
9062
9091
|
};
|
|
9063
9092
|
//#endregion
|
|
9064
9093
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/chartDataAdapter.ts
|
|
9065
|
-
function
|
|
9094
|
+
function fm(e) {
|
|
9066
9095
|
let t = e.categories ?? [], n = e.series;
|
|
9067
9096
|
if (n && !Array.isArray(n) && "data" in n) {
|
|
9068
9097
|
let e = n;
|
|
@@ -9078,12 +9107,12 @@ function dm(e) {
|
|
|
9078
9107
|
categories: t,
|
|
9079
9108
|
series: (Array.isArray(n) ? n : []).map((e) => ({
|
|
9080
9109
|
name: e.name,
|
|
9081
|
-
data: (e.data ?? []).map(
|
|
9110
|
+
data: (e.data ?? []).map(et)
|
|
9082
9111
|
}))
|
|
9083
9112
|
};
|
|
9084
9113
|
}
|
|
9085
|
-
function
|
|
9086
|
-
if (Array.isArray(e.series)) return
|
|
9114
|
+
function pm(e) {
|
|
9115
|
+
if (Array.isArray(e.series)) return fm(e);
|
|
9087
9116
|
let t = e.series;
|
|
9088
9117
|
return t?.data ? {
|
|
9089
9118
|
categories: t.data.map((e) => e.name),
|
|
@@ -9096,7 +9125,7 @@ function fm(e) {
|
|
|
9096
9125
|
series: []
|
|
9097
9126
|
};
|
|
9098
9127
|
}
|
|
9099
|
-
function
|
|
9128
|
+
function mm(e) {
|
|
9100
9129
|
let t = e.series;
|
|
9101
9130
|
return t?.data ? {
|
|
9102
9131
|
categories: t.data.map((e) => e.name),
|
|
@@ -9109,7 +9138,7 @@ function pm(e) {
|
|
|
9109
9138
|
series: []
|
|
9110
9139
|
};
|
|
9111
9140
|
}
|
|
9112
|
-
function
|
|
9141
|
+
function hm(e) {
|
|
9113
9142
|
let t = e.indicators ?? [], n = Array.isArray(e.series) ? e.series : [];
|
|
9114
9143
|
return {
|
|
9115
9144
|
categories: t.map((e) => typeof e == "string" ? e : e.name),
|
|
@@ -9119,7 +9148,7 @@ function mm(e) {
|
|
|
9119
9148
|
}))
|
|
9120
9149
|
};
|
|
9121
9150
|
}
|
|
9122
|
-
function
|
|
9151
|
+
function gm(e) {
|
|
9123
9152
|
let t = e.series;
|
|
9124
9153
|
return {
|
|
9125
9154
|
categories: [t?.name ?? "Value"],
|
|
@@ -9129,7 +9158,7 @@ function hm(e) {
|
|
|
9129
9158
|
}]
|
|
9130
9159
|
};
|
|
9131
9160
|
}
|
|
9132
|
-
var
|
|
9161
|
+
var _m = new Set(Object.keys({
|
|
9133
9162
|
bar: !0,
|
|
9134
9163
|
line: !0,
|
|
9135
9164
|
funnel: !0,
|
|
@@ -9139,22 +9168,22 @@ var gm = new Set(Object.keys({
|
|
|
9139
9168
|
heatmap: !0,
|
|
9140
9169
|
scatter: !0
|
|
9141
9170
|
}));
|
|
9142
|
-
function _m(e) {
|
|
9143
|
-
return e != null && gm.has(e.type);
|
|
9144
|
-
}
|
|
9145
9171
|
function vm(e) {
|
|
9146
|
-
return
|
|
9172
|
+
return e != null && _m.has(e.type);
|
|
9147
9173
|
}
|
|
9148
9174
|
function ym(e) {
|
|
9175
|
+
return Array.isArray(e) ? String(e[0]) : e.label ?? String(e.x);
|
|
9176
|
+
}
|
|
9177
|
+
function bm(e) {
|
|
9149
9178
|
let t = e.scatterSeries ?? [], n = [], r = /* @__PURE__ */ new Set();
|
|
9150
9179
|
for (let e of t) for (let t of e.data) {
|
|
9151
|
-
let e =
|
|
9180
|
+
let e = ym(t);
|
|
9152
9181
|
r.has(e) || (r.add(e), n.push(e));
|
|
9153
9182
|
}
|
|
9154
9183
|
return {
|
|
9155
9184
|
categories: n,
|
|
9156
9185
|
series: t.map((e) => {
|
|
9157
|
-
let t = new Map(e.data.map((e) => [
|
|
9186
|
+
let t = new Map(e.data.map((e) => [ym(e), Array.isArray(e) ? e[1] : e.y]));
|
|
9158
9187
|
return {
|
|
9159
9188
|
name: e.name,
|
|
9160
9189
|
data: n.map((e) => t.get(e) ?? 0)
|
|
@@ -9162,7 +9191,7 @@ function ym(e) {
|
|
|
9162
9191
|
})
|
|
9163
9192
|
};
|
|
9164
9193
|
}
|
|
9165
|
-
function
|
|
9194
|
+
function xm(e) {
|
|
9166
9195
|
let t = e.xCategories ?? [], n = e.yCategories ?? [], r = e.data ?? [];
|
|
9167
9196
|
if (t.length === 0 || n.length === 0) return {
|
|
9168
9197
|
categories: [],
|
|
@@ -9178,22 +9207,22 @@ function bm(e) {
|
|
|
9178
9207
|
}))
|
|
9179
9208
|
};
|
|
9180
9209
|
}
|
|
9181
|
-
function
|
|
9210
|
+
function Sm(e, t) {
|
|
9182
9211
|
return e.scatterSeries === void 0 ? e.xCategories?.length || e.yCategories?.length || e.data && Array.isArray(e.data) && e.data.length > 0 && Array.isArray(e.data[0]) ? "heatmap" : e.indicators?.length ? "radar" : e.series && !Array.isArray(e.series) && "value" in e.series && typeof e.series.value == "number" ? "gauge" : e.series && !Array.isArray(e.series) && "data" in e.series ? t === "pie" ? "pie" : "funnel" : "bar" : "scatter";
|
|
9183
9212
|
}
|
|
9184
|
-
function
|
|
9185
|
-
switch (t ??
|
|
9213
|
+
function Cm(e, t) {
|
|
9214
|
+
switch (t ?? Sm(e)) {
|
|
9186
9215
|
case "bar":
|
|
9187
|
-
case "line": return
|
|
9188
|
-
case "funnel": return
|
|
9189
|
-
case "pie": return
|
|
9190
|
-
case "radar": return
|
|
9191
|
-
case "gauge": return
|
|
9192
|
-
case "heatmap": return
|
|
9193
|
-
case "scatter": return
|
|
9216
|
+
case "line": return fm(e);
|
|
9217
|
+
case "funnel": return pm(e);
|
|
9218
|
+
case "pie": return mm(e);
|
|
9219
|
+
case "radar": return hm(e);
|
|
9220
|
+
case "gauge": return gm(e);
|
|
9221
|
+
case "heatmap": return xm(e);
|
|
9222
|
+
case "scatter": return bm(e);
|
|
9194
9223
|
}
|
|
9195
9224
|
}
|
|
9196
|
-
function
|
|
9225
|
+
function wm(e) {
|
|
9197
9226
|
return {
|
|
9198
9227
|
categories: e.categories,
|
|
9199
9228
|
series: e.series.map((e) => ({
|
|
@@ -9202,7 +9231,7 @@ function Cm(e) {
|
|
|
9202
9231
|
}))
|
|
9203
9232
|
};
|
|
9204
9233
|
}
|
|
9205
|
-
function
|
|
9234
|
+
function Tm(e) {
|
|
9206
9235
|
let t = e.series[0];
|
|
9207
9236
|
return { series: {
|
|
9208
9237
|
name: t?.name ?? "Funnel",
|
|
@@ -9212,7 +9241,7 @@ function wm(e) {
|
|
|
9212
9241
|
}))
|
|
9213
9242
|
} };
|
|
9214
9243
|
}
|
|
9215
|
-
function
|
|
9244
|
+
function Em(e) {
|
|
9216
9245
|
let t = e.series[0];
|
|
9217
9246
|
return { series: {
|
|
9218
9247
|
name: t?.name ?? "Distribution",
|
|
@@ -9222,7 +9251,7 @@ function Tm(e) {
|
|
|
9222
9251
|
}))
|
|
9223
9252
|
} };
|
|
9224
9253
|
}
|
|
9225
|
-
function
|
|
9254
|
+
function Dm(e) {
|
|
9226
9255
|
let t = e.categories.map((t, n) => Math.max(...e.series.map((e) => e.data[n] ?? 0), 1));
|
|
9227
9256
|
return {
|
|
9228
9257
|
indicators: e.categories.map((e, n) => ({
|
|
@@ -9235,7 +9264,7 @@ function Em(e) {
|
|
|
9235
9264
|
}))
|
|
9236
9265
|
};
|
|
9237
9266
|
}
|
|
9238
|
-
function
|
|
9267
|
+
function Om(e) {
|
|
9239
9268
|
return { scatterSeries: e.series.map((t) => ({
|
|
9240
9269
|
name: t.name,
|
|
9241
9270
|
data: e.categories.map((e, n) => ({
|
|
@@ -9245,7 +9274,7 @@ function Dm(e) {
|
|
|
9245
9274
|
}))
|
|
9246
9275
|
})) };
|
|
9247
9276
|
}
|
|
9248
|
-
function
|
|
9277
|
+
function km(e) {
|
|
9249
9278
|
return {
|
|
9250
9279
|
series: {
|
|
9251
9280
|
value: e.series[0]?.data[0] ?? 0,
|
|
@@ -9254,26 +9283,26 @@ function Om(e) {
|
|
|
9254
9283
|
categories: void 0
|
|
9255
9284
|
};
|
|
9256
9285
|
}
|
|
9257
|
-
function
|
|
9286
|
+
function Am(e, t) {
|
|
9258
9287
|
switch (t) {
|
|
9259
9288
|
case "bar":
|
|
9260
|
-
case "line": return
|
|
9261
|
-
case "funnel": return
|
|
9262
|
-
case "pie": return
|
|
9263
|
-
case "radar": return
|
|
9264
|
-
case "gauge": return
|
|
9289
|
+
case "line": return wm(e);
|
|
9290
|
+
case "funnel": return Tm(e);
|
|
9291
|
+
case "pie": return Em(e);
|
|
9292
|
+
case "radar": return Dm(e);
|
|
9293
|
+
case "gauge": return km(e);
|
|
9265
9294
|
case "heatmap": return {
|
|
9266
9295
|
xCategories: [],
|
|
9267
9296
|
yCategories: [],
|
|
9268
9297
|
data: []
|
|
9269
9298
|
};
|
|
9270
|
-
case "scatter": return
|
|
9299
|
+
case "scatter": return Om(e);
|
|
9271
9300
|
}
|
|
9272
9301
|
}
|
|
9273
|
-
function
|
|
9302
|
+
function jm(e) {
|
|
9274
9303
|
return e.series.some((e) => e.data.includes(null));
|
|
9275
9304
|
}
|
|
9276
|
-
function
|
|
9305
|
+
function Mm(e) {
|
|
9277
9306
|
let t = /* @__PURE__ */ new Set();
|
|
9278
9307
|
switch (t.add("table"), t.add(e), e) {
|
|
9279
9308
|
case "bar":
|
|
@@ -9292,7 +9321,7 @@ function jm(e) {
|
|
|
9292
9321
|
}
|
|
9293
9322
|
return t;
|
|
9294
9323
|
}
|
|
9295
|
-
function
|
|
9324
|
+
function Nm(e) {
|
|
9296
9325
|
switch (e) {
|
|
9297
9326
|
case "bar": return {
|
|
9298
9327
|
type: "bar",
|
|
@@ -9331,19 +9360,19 @@ function Mm(e) {
|
|
|
9331
9360
|
}
|
|
9332
9361
|
//#endregion
|
|
9333
9362
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/chartDataToTabular.ts
|
|
9334
|
-
function
|
|
9363
|
+
function Pm(e, t) {
|
|
9335
9364
|
switch (e.type) {
|
|
9336
9365
|
case "bar":
|
|
9337
|
-
case "line": return
|
|
9338
|
-
case "funnel": return
|
|
9339
|
-
case "pie": return
|
|
9340
|
-
case "radar": return
|
|
9341
|
-
case "gauge": return
|
|
9342
|
-
case "heatmap": return
|
|
9343
|
-
case "scatter": return
|
|
9366
|
+
case "line": return Fm(t);
|
|
9367
|
+
case "funnel": return Im(t);
|
|
9368
|
+
case "pie": return Lm(t);
|
|
9369
|
+
case "radar": return Rm(t);
|
|
9370
|
+
case "gauge": return zm(t);
|
|
9371
|
+
case "heatmap": return Bm(t);
|
|
9372
|
+
case "scatter": return Vm(e, t);
|
|
9344
9373
|
}
|
|
9345
9374
|
}
|
|
9346
|
-
function
|
|
9375
|
+
function Fm(e) {
|
|
9347
9376
|
let t = e.categories ?? [], n = e.series, r = Array.isArray(n) ? n : [];
|
|
9348
9377
|
return {
|
|
9349
9378
|
columns: ["Category", ...r.map((e) => e.name)],
|
|
@@ -9351,13 +9380,13 @@ function Pm(e) {
|
|
|
9351
9380
|
let n = { Category: e };
|
|
9352
9381
|
for (let e of r) {
|
|
9353
9382
|
let r = e.data[t];
|
|
9354
|
-
n[e.name] = r === void 0 ? null :
|
|
9383
|
+
n[e.name] = r === void 0 ? null : et(r);
|
|
9355
9384
|
}
|
|
9356
9385
|
return n;
|
|
9357
9386
|
})
|
|
9358
9387
|
};
|
|
9359
9388
|
}
|
|
9360
|
-
function
|
|
9389
|
+
function Im(e) {
|
|
9361
9390
|
if (Array.isArray(e.series)) {
|
|
9362
9391
|
let t = e.series[0];
|
|
9363
9392
|
return t ? {
|
|
@@ -9379,7 +9408,7 @@ function Fm(e) {
|
|
|
9379
9408
|
}))
|
|
9380
9409
|
};
|
|
9381
9410
|
}
|
|
9382
|
-
function
|
|
9411
|
+
function Lm(e) {
|
|
9383
9412
|
return {
|
|
9384
9413
|
columns: ["Name", "Value"],
|
|
9385
9414
|
rows: (e.series?.data ?? []).map((e) => ({
|
|
@@ -9388,7 +9417,7 @@ function Im(e) {
|
|
|
9388
9417
|
}))
|
|
9389
9418
|
};
|
|
9390
9419
|
}
|
|
9391
|
-
function
|
|
9420
|
+
function Rm(e) {
|
|
9392
9421
|
let t = e.indicators ?? [], n = e.series, r = Array.isArray(n) ? n : [];
|
|
9393
9422
|
return {
|
|
9394
9423
|
columns: ["Indicator", ...r.map((e) => e.name)],
|
|
@@ -9399,7 +9428,7 @@ function Lm(e) {
|
|
|
9399
9428
|
})
|
|
9400
9429
|
};
|
|
9401
9430
|
}
|
|
9402
|
-
function
|
|
9431
|
+
function zm(e) {
|
|
9403
9432
|
let t = e.series;
|
|
9404
9433
|
return {
|
|
9405
9434
|
columns: ["Name", "Value"],
|
|
@@ -9409,7 +9438,7 @@ function Rm(e) {
|
|
|
9409
9438
|
}]
|
|
9410
9439
|
};
|
|
9411
9440
|
}
|
|
9412
|
-
function
|
|
9441
|
+
function Bm(e) {
|
|
9413
9442
|
let t = e.xCategories ?? [], n = e.yCategories ?? [];
|
|
9414
9443
|
return {
|
|
9415
9444
|
columns: [
|
|
@@ -9424,7 +9453,7 @@ function zm(e) {
|
|
|
9424
9453
|
}))
|
|
9425
9454
|
};
|
|
9426
9455
|
}
|
|
9427
|
-
function
|
|
9456
|
+
function Vm(e, t) {
|
|
9428
9457
|
let n = (t.scatterSeries ?? []).flatMap((e) => e.data.map((t) => ({
|
|
9429
9458
|
series: e.name,
|
|
9430
9459
|
label: Array.isArray(t) ? "" : t.label ?? "",
|
|
@@ -9449,32 +9478,32 @@ function Bm(e, t) {
|
|
|
9449
9478
|
}
|
|
9450
9479
|
//#endregion
|
|
9451
9480
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/downloadHelpers.ts
|
|
9452
|
-
function
|
|
9481
|
+
function Hm(e) {
|
|
9453
9482
|
return e == null ? "" : typeof e == "boolean" ? String(e) : e instanceof Date ? e.toISOString() : typeof e == "object" ? JSON.stringify(e) : String(e);
|
|
9454
9483
|
}
|
|
9455
|
-
function
|
|
9456
|
-
return typeof e == "number" && Number.isFinite(e) ? e :
|
|
9484
|
+
function Um(e) {
|
|
9485
|
+
return typeof e == "number" && Number.isFinite(e) ? e : Hm(e);
|
|
9457
9486
|
}
|
|
9458
|
-
function
|
|
9459
|
-
let i = n ?? e, a = [e, ...t.map((e) => i.map((t) =>
|
|
9487
|
+
function Wm({ columns: e, rows: t, keys: n, preamble: r }) {
|
|
9488
|
+
let i = n ?? e, a = [e, ...t.map((e) => i.map((t) => Um(e[t])))];
|
|
9460
9489
|
return r?.length ? [
|
|
9461
9490
|
...r.map((e) => [e]),
|
|
9462
9491
|
[],
|
|
9463
9492
|
...a
|
|
9464
9493
|
] : a;
|
|
9465
9494
|
}
|
|
9466
|
-
function
|
|
9495
|
+
function Gm(e, t) {
|
|
9467
9496
|
let n = (t ?? "").split("\n").map((e) => e.trim()).filter((e) => e.length > 0);
|
|
9468
9497
|
return n.length > 0 ? [e, ...n] : [];
|
|
9469
9498
|
}
|
|
9470
|
-
function
|
|
9499
|
+
function Km(e, t) {
|
|
9471
9500
|
let n = document.createElement("a");
|
|
9472
9501
|
n.href = URL.createObjectURL(e), n.download = t, n.click(), URL.revokeObjectURL(n.href);
|
|
9473
9502
|
}
|
|
9474
|
-
async function
|
|
9475
|
-
|
|
9503
|
+
async function qm(e, t, n, { keys: r, preamble: i } = {}) {
|
|
9504
|
+
Km(await Lr([{
|
|
9476
9505
|
name: "Data",
|
|
9477
|
-
rows:
|
|
9506
|
+
rows: Wm({
|
|
9478
9507
|
columns: e,
|
|
9479
9508
|
rows: t,
|
|
9480
9509
|
keys: r,
|
|
@@ -9482,31 +9511,31 @@ async function Km(e, t, n, { keys: r, preamble: i } = {}) {
|
|
|
9482
9511
|
})
|
|
9483
9512
|
}]), `${n}.xlsx`);
|
|
9484
9513
|
}
|
|
9485
|
-
function
|
|
9514
|
+
function Jm(e, t, n, r) {
|
|
9486
9515
|
let i = r ?? e, a = (e) => {
|
|
9487
|
-
let t =
|
|
9516
|
+
let t = Hm(e);
|
|
9488
9517
|
return t.includes(",") || t.includes("\"") || t.includes("\n") ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
9489
9518
|
}, o = [e.map(a).join(","), ...t.map((e) => i.map((t) => a(e[t])).join(","))];
|
|
9490
|
-
|
|
9519
|
+
Km(new Blob([o.join("\n")], { type: "text/csv;charset=utf-8;" }), `${n}.csv`);
|
|
9491
9520
|
}
|
|
9492
|
-
function
|
|
9521
|
+
function Ym(e, t, n) {
|
|
9493
9522
|
let r = document.createElement("a");
|
|
9494
9523
|
r.href = e, r.download = `${t}.${n}`, r.click();
|
|
9495
9524
|
}
|
|
9496
|
-
async function
|
|
9497
|
-
|
|
9525
|
+
async function Xm(e, t) {
|
|
9526
|
+
Km(await Lr(e.map((e) => ({
|
|
9498
9527
|
name: e.name,
|
|
9499
|
-
rows:
|
|
9528
|
+
rows: Wm(e)
|
|
9500
9529
|
}))), `${t}.xlsx`);
|
|
9501
9530
|
}
|
|
9502
9531
|
//#endregion
|
|
9503
9532
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useChartDownloadActions.ts
|
|
9504
|
-
function
|
|
9533
|
+
function Zm(e) {
|
|
9505
9534
|
let t = e.current?.querySelector(":scope > div");
|
|
9506
|
-
return t ?
|
|
9535
|
+
return t ? ot(t) ?? null : null;
|
|
9507
9536
|
}
|
|
9508
|
-
function
|
|
9509
|
-
let r =
|
|
9537
|
+
function Qm(e, t, n) {
|
|
9538
|
+
let r = Mt(document.createElement("div"), void 0, {
|
|
9510
9539
|
renderer: "canvas",
|
|
9511
9540
|
width: e.getWidth(),
|
|
9512
9541
|
height: e.getHeight()
|
|
@@ -9524,29 +9553,29 @@ function Zm(e, t, n) {
|
|
|
9524
9553
|
r.dispose();
|
|
9525
9554
|
}
|
|
9526
9555
|
}
|
|
9527
|
-
function
|
|
9528
|
-
let { t: i } =
|
|
9529
|
-
let n =
|
|
9530
|
-
n &&
|
|
9556
|
+
function $m({ chartContainerRef: e, chartConfig: t, data: n, title: r }) {
|
|
9557
|
+
let { t: i } = z(), a = W((t) => {
|
|
9558
|
+
let n = Zm(e);
|
|
9559
|
+
n && Ym(t === "jpg" ? Qm(n, "jpeg", "#fff") : Qm(n, "png"), r, t);
|
|
9531
9560
|
}, [e, r]), o = K(() => {
|
|
9532
9561
|
if (!n) return t;
|
|
9533
|
-
let e =
|
|
9562
|
+
let e = Sm(n, t.type);
|
|
9534
9563
|
return e === t.type ? t : {
|
|
9535
9564
|
...t,
|
|
9536
9565
|
type: e
|
|
9537
9566
|
};
|
|
9538
9567
|
}, [t, n]), s = W(() => {
|
|
9539
9568
|
if (!n) return;
|
|
9540
|
-
let e =
|
|
9541
|
-
|
|
9569
|
+
let e = Pm(o, n);
|
|
9570
|
+
qm(e.columns, e.rows, r, { keys: e.keys });
|
|
9542
9571
|
}, [
|
|
9543
9572
|
o,
|
|
9544
9573
|
n,
|
|
9545
9574
|
r
|
|
9546
9575
|
]), c = W(() => {
|
|
9547
9576
|
if (!n) return;
|
|
9548
|
-
let e =
|
|
9549
|
-
|
|
9577
|
+
let e = Pm(o, n);
|
|
9578
|
+
Jm(e.columns, e.rows, r, e.keys);
|
|
9550
9579
|
}, [
|
|
9551
9580
|
o,
|
|
9552
9581
|
n,
|
|
@@ -9584,7 +9613,7 @@ function Qm({ chartContainerRef: e, chartConfig: t, data: n, title: r }) {
|
|
|
9584
9613
|
}
|
|
9585
9614
|
//#endregion
|
|
9586
9615
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useDashboardItemData.ts
|
|
9587
|
-
function
|
|
9616
|
+
function eh(e, t, n, r = "") {
|
|
9588
9617
|
let [i, a] = J(void 0), [o, s] = J(!0), [c, l] = J(void 0), u = q(0), d = q(e);
|
|
9589
9618
|
d.current = e;
|
|
9590
9619
|
let f = q(t);
|
|
@@ -9616,8 +9645,8 @@ function $m(e, t, n, r = "") {
|
|
|
9616
9645
|
}
|
|
9617
9646
|
//#endregion
|
|
9618
9647
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItemFilters.tsx
|
|
9619
|
-
function
|
|
9620
|
-
let i =
|
|
9648
|
+
function th({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
9649
|
+
let i = z(), a = Cc(), o = q(null), s = q(void 0), c = q(r), [l, u] = J(!1), [d, f] = J(null), [p, m] = J(t);
|
|
9621
9650
|
G(() => {
|
|
9622
9651
|
c.current = r;
|
|
9623
9652
|
}, [r]), G(() => () => {
|
|
@@ -9758,24 +9787,24 @@ function eh({ filters: e, value: t, onChange: n, onOpenChange: r }) {
|
|
|
9758
9787
|
}
|
|
9759
9788
|
//#endregion
|
|
9760
9789
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/useTitleFitsOneLine.ts
|
|
9761
|
-
var
|
|
9790
|
+
var nh = "(hover: hover) and (min-width: 640px)", rh = (e) => {
|
|
9762
9791
|
let { whiteSpace: t, display: n } = e.style;
|
|
9763
9792
|
e.style.whiteSpace = "nowrap", e.style.display = "block";
|
|
9764
9793
|
let r = e.scrollWidth;
|
|
9765
9794
|
return e.style.whiteSpace = t, e.style.display = n, r;
|
|
9766
9795
|
};
|
|
9767
|
-
function
|
|
9796
|
+
function ih({ title: e, enabled: t, actionsCollapse: n }) {
|
|
9768
9797
|
let r = q(null), i = q(null), a = q(null), [o, s] = J(!0);
|
|
9769
9798
|
return Tc(() => {
|
|
9770
9799
|
let e = r.current;
|
|
9771
9800
|
if (!t || !e) return;
|
|
9772
|
-
let o = window.matchMedia?.(
|
|
9801
|
+
let o = window.matchMedia?.(nh), c = () => {
|
|
9773
9802
|
let t = e.querySelector("h3");
|
|
9774
9803
|
if (!t) {
|
|
9775
9804
|
s(!0);
|
|
9776
9805
|
return;
|
|
9777
9806
|
}
|
|
9778
|
-
let r =
|
|
9807
|
+
let r = rh(t), c = n && o?.matches ? 0 : a.current?.getBoundingClientRect().width ?? 0, l = i.current, u = l ? l.getBoundingClientRect().width + 4 : 0, d = e.getBoundingClientRect().width - c - u;
|
|
9779
9808
|
s(r <= d);
|
|
9780
9809
|
};
|
|
9781
9810
|
c();
|
|
@@ -9800,14 +9829,14 @@ function rh({ title: e, enabled: t, actionsCollapse: n }) {
|
|
|
9800
9829
|
}
|
|
9801
9830
|
//#endregion
|
|
9802
9831
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItem.tsx
|
|
9803
|
-
function
|
|
9804
|
-
let [C, w] = J(!1), [T, E] = J(!1), D = q(!1), [O, k] = J(!1), A =
|
|
9832
|
+
function ah({ title: e, description: t, info: n, isLoading: r, error: i, onRetry: a, skeleton: o, children: s, actions: c = [], itemFilters: l, editMode: u, readOnly: d = !1, handleDelete: f, onAskAi: p, onAskAiTarget: m, itemId: h, chartTypeOptions: g, explanation: _, isFullscreen: v = !1, descriptionAction: y, headerLines: b = 2, fitContent: x = !1, onFullscreenChange: S }) {
|
|
9833
|
+
let [C, w] = J(!1), [T, E] = J(!1), D = q(!1), [O, k] = J(!1), A = z(), { enabled: j, setPendingQuote: M, setOpen: N, focusChatInput: P } = Yi(), F = (e) => {
|
|
9805
9834
|
w(e), e || k(!1);
|
|
9806
|
-
},
|
|
9835
|
+
}, I = c.filter((e) => !("type" in e) || e.type === "item" || e.type === void 0), ee = I.length > 0, te = u && f && h, L = g && g.length > 0, ne = !!_ && _.trim().length > 0, re = !!S, ie = !d && e.trim().length > 0 && (p ? !!h : j), ae = ie || ee || te || L || ne, oe = !!l || re || !!ae, se = !v && (C || T), ce = B("flex flex-shrink-0 gap-0.5", !v && "opacity-100 transition-opacity delay-150 duration-150 focus-within:delay-0 group-hover/dashitem:delay-0 sm:[@media(hover:hover)]:opacity-0 focus-within:sm:opacity-100 group-hover/dashitem:sm:opacity-100", se && "delay-0 !opacity-100"), le = B("-my-2 -mr-0.5 isolate grid flex-shrink-0", !v && "transition-[grid-template-columns] delay-150 duration-150 focus-within:delay-0 group-hover/dashitem:delay-0 motion-reduce:duration-0 sm:[@media(hover:hover)]:grid-cols-[0fr] focus-within:sm:grid-cols-[1fr] group-hover/dashitem:sm:grid-cols-[1fr]", se && "delay-0 !grid-cols-[1fr]"), ue = ih({
|
|
9807
9836
|
title: e,
|
|
9808
9837
|
enabled: b > 2,
|
|
9809
9838
|
actionsCollapse: !v
|
|
9810
|
-
}),
|
|
9839
|
+
}), de = ue.fits ? 1 : 2, fe = b - de, me = () => {
|
|
9811
9840
|
if (p) {
|
|
9812
9841
|
if (!h) return;
|
|
9813
9842
|
p({
|
|
@@ -9823,10 +9852,10 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9823
9852
|
title: e,
|
|
9824
9853
|
quote: t
|
|
9825
9854
|
}), M(t), N(!0);
|
|
9826
|
-
},
|
|
9855
|
+
}, he = (e) => {
|
|
9827
9856
|
D.current && (D.current = !1, P() && e.preventDefault());
|
|
9828
|
-
},
|
|
9829
|
-
onClick:
|
|
9857
|
+
}, ge = ie ? /* @__PURE__ */ X(nc, { children: /* @__PURE__ */ X(Ys, {
|
|
9858
|
+
onClick: me,
|
|
9830
9859
|
children: /* @__PURE__ */ Z("div", {
|
|
9831
9860
|
className: "flex w-full flex-row items-center gap-2",
|
|
9832
9861
|
children: [/* @__PURE__ */ X(H, { icon: Vr }), /* @__PURE__ */ X("span", {
|
|
@@ -9848,18 +9877,18 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9848
9877
|
children: e
|
|
9849
9878
|
}), n ? /* @__PURE__ */ X("div", {
|
|
9850
9879
|
className: "flex shrink-0 items-center text-f1-foreground-secondary",
|
|
9851
|
-
children: /* @__PURE__ */ X(
|
|
9880
|
+
children: /* @__PURE__ */ X(Pe, { info: n })
|
|
9852
9881
|
}) : null]
|
|
9853
9882
|
}), t ? /* @__PURE__ */ X("p", {
|
|
9854
9883
|
className: "text-base text-f1-foreground-secondary",
|
|
9855
9884
|
children: t
|
|
9856
9885
|
}) : null]
|
|
9857
|
-
}), l ||
|
|
9858
|
-
className:
|
|
9859
|
-
children: [l ? /* @__PURE__ */ X(
|
|
9886
|
+
}), l || ie ? /* @__PURE__ */ Z("div", {
|
|
9887
|
+
className: ce,
|
|
9888
|
+
children: [l ? /* @__PURE__ */ X(th, {
|
|
9860
9889
|
...l,
|
|
9861
9890
|
onOpenChange: E
|
|
9862
|
-
}) : null,
|
|
9891
|
+
}) : null, ie ? /* @__PURE__ */ Z(rc, {
|
|
9863
9892
|
open: C,
|
|
9864
9893
|
onOpenChange: F,
|
|
9865
9894
|
children: [/* @__PURE__ */ X(qs, {
|
|
@@ -9877,14 +9906,14 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9877
9906
|
}), /* @__PURE__ */ X(Gs, {
|
|
9878
9907
|
align: "end",
|
|
9879
9908
|
className: "py-1",
|
|
9880
|
-
onCloseAutoFocus:
|
|
9881
|
-
children:
|
|
9909
|
+
onCloseAutoFocus: he,
|
|
9910
|
+
children: ge
|
|
9882
9911
|
})]
|
|
9883
9912
|
}) : null]
|
|
9884
9913
|
}) : null]
|
|
9885
9914
|
}), /* @__PURE__ */ X("div", {
|
|
9886
9915
|
className: "min-h-0 flex-1 overflow-auto",
|
|
9887
|
-
children: /* @__PURE__ */ X(
|
|
9916
|
+
children: /* @__PURE__ */ X(pe, {
|
|
9888
9917
|
variant: "critical",
|
|
9889
9918
|
title: A.ai.dashboardItem.errorTitle,
|
|
9890
9919
|
description: i.message,
|
|
@@ -9900,37 +9929,37 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9900
9929
|
"aria-busy": r ? "true" : void 0,
|
|
9901
9930
|
"aria-live": r ? "polite" : void 0,
|
|
9902
9931
|
children: [/* @__PURE__ */ Z("div", {
|
|
9903
|
-
className: B("flex flex-col px-4 py-3",
|
|
9932
|
+
className: B("flex flex-col px-4 py-3", oe && "min-h-14"),
|
|
9904
9933
|
children: [/* @__PURE__ */ Z(io, {
|
|
9905
|
-
ref:
|
|
9934
|
+
ref: ue.rowRef,
|
|
9906
9935
|
display: "flex",
|
|
9907
9936
|
minWidth: "0",
|
|
9908
|
-
alignItems:
|
|
9937
|
+
alignItems: de > 1 ? "start" : "center",
|
|
9909
9938
|
children: [/* @__PURE__ */ Z("div", {
|
|
9910
|
-
className: B("flex min-w-0 flex-1 gap-1",
|
|
9939
|
+
className: B("flex min-w-0 flex-1 gap-1", de > 1 ? "items-start" : "items-center"),
|
|
9911
9940
|
children: [/* @__PURE__ */ X(tr, {
|
|
9912
9941
|
tag: "h3",
|
|
9913
|
-
lines:
|
|
9914
|
-
className: B("text-base font-semibold text-f1-foreground",
|
|
9942
|
+
lines: de,
|
|
9943
|
+
className: B("text-base font-semibold text-f1-foreground", de > 1 && "hyphens-auto"),
|
|
9915
9944
|
children: e
|
|
9916
9945
|
}), n ? /* @__PURE__ */ X("div", {
|
|
9917
|
-
ref:
|
|
9946
|
+
ref: ue.infoRef,
|
|
9918
9947
|
className: "flex h-5 shrink-0 items-center text-f1-foreground-secondary",
|
|
9919
|
-
children: /* @__PURE__ */ X(
|
|
9948
|
+
children: /* @__PURE__ */ X(Pe, { info: n })
|
|
9920
9949
|
}) : null]
|
|
9921
|
-
}),
|
|
9922
|
-
ref:
|
|
9923
|
-
className: B(
|
|
9950
|
+
}), oe ? /* @__PURE__ */ X("div", {
|
|
9951
|
+
ref: ue.actionsRef,
|
|
9952
|
+
className: B(le, de > 1 && "-mt-1.5"),
|
|
9924
9953
|
children: /* @__PURE__ */ X("div", {
|
|
9925
9954
|
className: "min-w-0 overflow-clip",
|
|
9926
9955
|
children: /* @__PURE__ */ Z("div", {
|
|
9927
|
-
className: B(
|
|
9956
|
+
className: B(ce, "p-0.5 pl-2"),
|
|
9928
9957
|
children: [
|
|
9929
|
-
l ? /* @__PURE__ */ X(
|
|
9958
|
+
l ? /* @__PURE__ */ X(th, {
|
|
9930
9959
|
...l,
|
|
9931
9960
|
onOpenChange: E
|
|
9932
9961
|
}) : null,
|
|
9933
|
-
|
|
9962
|
+
re ? /* @__PURE__ */ X($n, {
|
|
9934
9963
|
label: v ? A.actions.collapse : A.actions.expand,
|
|
9935
9964
|
icon: v ? Jr : dr,
|
|
9936
9965
|
variant: "ghost",
|
|
@@ -9939,7 +9968,7 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9939
9968
|
compact: !0,
|
|
9940
9969
|
onClick: () => S?.(!v)
|
|
9941
9970
|
}) : null,
|
|
9942
|
-
|
|
9971
|
+
ae ? /* @__PURE__ */ Z(rc, {
|
|
9943
9972
|
open: C,
|
|
9944
9973
|
onOpenChange: F,
|
|
9945
9974
|
children: [/* @__PURE__ */ X(qs, {
|
|
@@ -9957,20 +9986,20 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9957
9986
|
}), /* @__PURE__ */ X(Gs, {
|
|
9958
9987
|
align: "end",
|
|
9959
9988
|
className: B("py-1", O && "w-96 max-w-[90vw]"),
|
|
9960
|
-
onCloseAutoFocus:
|
|
9961
|
-
children: O &&
|
|
9989
|
+
onCloseAutoFocus: he,
|
|
9990
|
+
children: O && ne ? /* @__PURE__ */ X("div", {
|
|
9962
9991
|
className: "px-3 py-2 text-base text-f1-foreground [&>div]:flex [&>div]:flex-col [&>div]:gap-2",
|
|
9963
9992
|
children: /* @__PURE__ */ X(vi, {
|
|
9964
9993
|
content: _,
|
|
9965
9994
|
format: "markdown"
|
|
9966
9995
|
})
|
|
9967
9996
|
}) : /* @__PURE__ */ Z(Y, { children: [
|
|
9968
|
-
|
|
9997
|
+
L ? /* @__PURE__ */ Z("div", {
|
|
9969
9998
|
className: "mb-1 flex flex-col items-start gap-2 border-0 border-b border-solid border-f1-border-secondary p-3",
|
|
9970
9999
|
children: [/* @__PURE__ */ X(tr, {
|
|
9971
10000
|
className: "text-base font-medium text-f1-foreground-tertiary",
|
|
9972
10001
|
children: A.ai.dashboardItem.chartType
|
|
9973
|
-
}), /* @__PURE__ */ X(
|
|
10002
|
+
}), /* @__PURE__ */ X(lt, {
|
|
9974
10003
|
items: g.map((e) => ({
|
|
9975
10004
|
value: e.value,
|
|
9976
10005
|
icon: e.icon,
|
|
@@ -9986,7 +10015,7 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9986
10015
|
fullWidth: !0
|
|
9987
10016
|
})]
|
|
9988
10017
|
}) : null,
|
|
9989
|
-
|
|
10018
|
+
ne ? /* @__PURE__ */ X(nc, { children: /* @__PURE__ */ X(Ys, {
|
|
9990
10019
|
onSelect: (e) => {
|
|
9991
10020
|
e.preventDefault(), k(!0);
|
|
9992
10021
|
},
|
|
@@ -9998,8 +10027,8 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
9998
10027
|
})]
|
|
9999
10028
|
})
|
|
10000
10029
|
}) }) : null,
|
|
10001
|
-
|
|
10002
|
-
|
|
10030
|
+
ge,
|
|
10031
|
+
ee ? /* @__PURE__ */ X(nc, { children: /* @__PURE__ */ Z(Qs, { children: [/* @__PURE__ */ X(Ks, {
|
|
10003
10032
|
className: "mx-1 rounded-sm px-2",
|
|
10004
10033
|
children: /* @__PURE__ */ Z("div", {
|
|
10005
10034
|
className: "flex w-full flex-row items-center gap-2 pr-2",
|
|
@@ -10008,7 +10037,7 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10008
10037
|
children: A.ai.dataDownload.title
|
|
10009
10038
|
})]
|
|
10010
10039
|
})
|
|
10011
|
-
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ X(ac, { children:
|
|
10040
|
+
}), /* @__PURE__ */ X(Zs, { children: /* @__PURE__ */ X(ac, { children: I.map((e) => /* @__PURE__ */ X(Ys, {
|
|
10012
10041
|
onClick: e.onClick,
|
|
10013
10042
|
children: /* @__PURE__ */ Z("div", {
|
|
10014
10043
|
className: "flex w-full flex-row items-center gap-2",
|
|
@@ -10018,7 +10047,7 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10018
10047
|
})]
|
|
10019
10048
|
})
|
|
10020
10049
|
}, e.label)) }) })] }) }) : null,
|
|
10021
|
-
|
|
10050
|
+
te ? /* @__PURE__ */ X(nc, { children: /* @__PURE__ */ X(Ys, {
|
|
10022
10051
|
onClick: () => {
|
|
10023
10052
|
v && S?.(!1), f(h);
|
|
10024
10053
|
},
|
|
@@ -10041,7 +10070,7 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10041
10070
|
}), t || y ? /* @__PURE__ */ Z("div", {
|
|
10042
10071
|
className: "relative flex items-baseline gap-1",
|
|
10043
10072
|
children: [t ? /* @__PURE__ */ X(tr, {
|
|
10044
|
-
lines:
|
|
10073
|
+
lines: fe,
|
|
10045
10074
|
className: "text-base text-f1-foreground-secondary",
|
|
10046
10075
|
children: t
|
|
10047
10076
|
}) : null, y ? /* @__PURE__ */ Z(Y, { children: [t ? /* @__PURE__ */ X("span", {
|
|
@@ -10063,9 +10092,9 @@ function ih({ title: e, description: t, info: n, isLoading: r, error: i, onRetry
|
|
|
10063
10092
|
}
|
|
10064
10093
|
//#endregion
|
|
10065
10094
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ChartItem/PointActionPopover.tsx
|
|
10066
|
-
var
|
|
10067
|
-
function
|
|
10068
|
-
let i =
|
|
10095
|
+
var oh = 8, sh = 8;
|
|
10096
|
+
function ch({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
10097
|
+
let i = z(), a = q(null), [o, s] = J(null);
|
|
10069
10098
|
return Tc(() => {
|
|
10070
10099
|
if (!e) {
|
|
10071
10100
|
s(null);
|
|
@@ -10073,9 +10102,9 @@ function sh({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
|
10073
10102
|
}
|
|
10074
10103
|
let t = a.current;
|
|
10075
10104
|
if (!t) return;
|
|
10076
|
-
let { offsetWidth: n, offsetHeight: r } = t, i = e.clientY - r -
|
|
10077
|
-
i <
|
|
10078
|
-
let o = e.clientX - n / 2, c = Math.min(Math.max(o,
|
|
10105
|
+
let { offsetWidth: n, offsetHeight: r } = t, i = e.clientY - r - oh;
|
|
10106
|
+
i < sh && (i = e.clientY + oh), i = Math.min(Math.max(i, sh), window.innerHeight - r - sh);
|
|
10107
|
+
let o = e.clientX - n / 2, c = Math.min(Math.max(o, sh), window.innerWidth - n - sh);
|
|
10079
10108
|
s({
|
|
10080
10109
|
top: i,
|
|
10081
10110
|
left: c
|
|
@@ -10123,38 +10152,38 @@ function sh({ anchor: e, onAsk: t, onDismiss: n, returnFocusTo: r }) {
|
|
|
10123
10152
|
}
|
|
10124
10153
|
//#endregion
|
|
10125
10154
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ChartItem/pointQuote.ts
|
|
10126
|
-
function
|
|
10127
|
-
return t === null ? n : r === "x" && e.type === "scatter" ?
|
|
10155
|
+
function lh(e, t, n, r = "y") {
|
|
10156
|
+
return t === null ? n : r === "x" && e.type === "scatter" ? Jt(e.xTooltipValueFormatter, e.xValueFormatter)(t) : Jt(e.tooltipValueFormatter, e.valueFormatter)(t);
|
|
10128
10157
|
}
|
|
10129
|
-
function
|
|
10158
|
+
function uh(e, t) {
|
|
10130
10159
|
return t ? `${e} — ${t}` : e;
|
|
10131
10160
|
}
|
|
10132
|
-
function uh(e, t, n, r) {
|
|
10133
|
-
let i = t.xAxisName ?? "X", a = t.yAxisName ?? "Y", o = n.seriesName ? `${n.seriesName}\n` : "", [s, c] = n.values;
|
|
10134
|
-
return `${lh(e, n.category)}\n${o}${i}: ${ch(t, s, r, "x")}\n${a}: ${ch(t, c, r)}`;
|
|
10135
|
-
}
|
|
10136
10161
|
function dh(e, t, n, r) {
|
|
10137
|
-
let i = t.
|
|
10138
|
-
return `${
|
|
10162
|
+
let i = t.xAxisName ?? "X", a = t.yAxisName ?? "Y", o = n.seriesName ? `${n.seriesName}\n` : "", [s, c] = n.values;
|
|
10163
|
+
return `${uh(e, n.category)}\n${o}${i}: ${lh(t, s, r, "x")}\n${a}: ${lh(t, c, r)}`;
|
|
10139
10164
|
}
|
|
10140
10165
|
function fh(e, t, n, r) {
|
|
10141
|
-
let i = t.
|
|
10142
|
-
return `${
|
|
10166
|
+
let i = t.categoryFormatter ? t.categoryFormatter(n.category) : n.category, a = n.series.map(({ name: e, value: n }) => `${e}: ${lh(t, n, r)}`);
|
|
10167
|
+
return `${uh(e, i)}\n${a.join("\n")}`;
|
|
10143
10168
|
}
|
|
10144
10169
|
function ph(e, t, n, r) {
|
|
10145
|
-
let
|
|
10146
|
-
return `${
|
|
10170
|
+
let i = t.indicators.slice(0, n.values.length).map(({ name: e }, i) => `${e}: ${lh(t, n.values[i], r)}`);
|
|
10171
|
+
return `${uh(e, n.seriesName)}\n${i.join("\n")}`;
|
|
10147
10172
|
}
|
|
10148
10173
|
function mh(e, t, n, r) {
|
|
10149
|
-
let i =
|
|
10150
|
-
return `${
|
|
10174
|
+
let [i, a] = n.values, o = i === null ? void 0 : t.xCategories[i];
|
|
10175
|
+
return `${uh(e, [a === null ? void 0 : t.yCategories[a], o].filter(Boolean).join(" — "))}\n${lh(t, n.value, r)}`;
|
|
10151
10176
|
}
|
|
10152
10177
|
function hh(e, t, n, r) {
|
|
10153
|
-
|
|
10178
|
+
let i = "categoryFormatter" in t && t.categoryFormatter ? t.categoryFormatter(n.category) : n.category, a = n.seriesName ? `${n.seriesName}: ` : "";
|
|
10179
|
+
return `${uh(e, i)}\n${a}${lh(t, n.value, r)}`;
|
|
10180
|
+
}
|
|
10181
|
+
function gh(e, t, n, r) {
|
|
10182
|
+
return t.type === "scatter" && n.values.length >= 2 ? dh(e, t, n, r) : t.type === "line" && n.series.length > 1 ? fh(e, t, n, r) : t.type === "radar" && t.indicators.length && n.values.length > 1 ? ph(e, t, n, r) : t.type === "heatmap" && n.values.length >= 3 ? mh(e, t, n, r) : hh(e, t, n, r);
|
|
10154
10183
|
}
|
|
10155
10184
|
//#endregion
|
|
10156
10185
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ChartItem/ChartItem.tsx
|
|
10157
|
-
function
|
|
10186
|
+
function _h(e) {
|
|
10158
10187
|
return [
|
|
10159
10188
|
{
|
|
10160
10189
|
label: e.dataChart.barChartVertical,
|
|
@@ -10196,42 +10225,42 @@ function gh(e) {
|
|
|
10196
10225
|
}
|
|
10197
10226
|
];
|
|
10198
10227
|
}
|
|
10199
|
-
var
|
|
10200
|
-
function
|
|
10228
|
+
var vh = { type: "bar" };
|
|
10229
|
+
function yh(e) {
|
|
10201
10230
|
switch (e.type) {
|
|
10202
|
-
case "bar": return /* @__PURE__ */ X(
|
|
10231
|
+
case "bar": return /* @__PURE__ */ X(ut, {
|
|
10203
10232
|
orientation: e.orientation,
|
|
10204
10233
|
stacked: e.stacked,
|
|
10205
10234
|
showLegend: e.showLegend
|
|
10206
10235
|
});
|
|
10207
|
-
case "line": return /* @__PURE__ */ X(
|
|
10236
|
+
case "line": return /* @__PURE__ */ X(cn, {
|
|
10208
10237
|
lineType: e.lineType,
|
|
10209
10238
|
showArea: e.showArea,
|
|
10210
10239
|
showDots: e.showDots,
|
|
10211
10240
|
showLegend: e.showLegend
|
|
10212
10241
|
});
|
|
10213
|
-
case "funnel": return /* @__PURE__ */ X(
|
|
10242
|
+
case "funnel": return /* @__PURE__ */ X(st, {
|
|
10214
10243
|
orient: e.orient,
|
|
10215
10244
|
sort: e.sort,
|
|
10216
10245
|
showLegend: e.showLegend
|
|
10217
10246
|
});
|
|
10218
|
-
case "pie": return /* @__PURE__ */ X(
|
|
10247
|
+
case "pie": return /* @__PURE__ */ X(Ke, {
|
|
10219
10248
|
innerRadius: e.innerRadius,
|
|
10220
10249
|
showLegend: e.showLegend
|
|
10221
10250
|
});
|
|
10222
|
-
case "radar": return /* @__PURE__ */ X(
|
|
10223
|
-
case "gauge": return /* @__PURE__ */ X(
|
|
10224
|
-
case "heatmap": return /* @__PURE__ */ X(
|
|
10225
|
-
case "scatter": return /* @__PURE__ */ X(
|
|
10251
|
+
case "radar": return /* @__PURE__ */ X(an, { showLegend: e.showLegend });
|
|
10252
|
+
case "gauge": return /* @__PURE__ */ X(ze, {});
|
|
10253
|
+
case "heatmap": return /* @__PURE__ */ X(Zt, {});
|
|
10254
|
+
case "scatter": return /* @__PURE__ */ X(xe, { showLegend: e.showLegend ?? !1 });
|
|
10226
10255
|
}
|
|
10227
10256
|
}
|
|
10228
|
-
function
|
|
10257
|
+
function bh(e) {
|
|
10229
10258
|
return e.referenceLines ? { referenceLines: e.referenceLines } : {};
|
|
10230
10259
|
}
|
|
10231
|
-
function
|
|
10260
|
+
function xh(e, t, n, r) {
|
|
10232
10261
|
let i = n ?? e.chart.type;
|
|
10233
|
-
if (i ===
|
|
10234
|
-
let a =
|
|
10262
|
+
if (i === Sm(t, i) && i === e.chart.type && !r) return Sh(e, t);
|
|
10263
|
+
let a = Am(Cm(t), i), o = Nm(i), s = {};
|
|
10235
10264
|
switch ("valueFormatter" in e.chart && e.chart.valueFormatter && (s.valueFormatter = e.chart.valueFormatter), "tooltipValueFormatter" in e.chart && e.chart.tooltipValueFormatter && (s.tooltipValueFormatter = e.chart.tooltipValueFormatter), "showLegend" in e.chart && (s.showLegend = e.chart.showLegend), i === "bar" && "showLabels" in e.chart && e.chart.showLabels !== void 0 && (s.showLabels = e.chart.showLabels), i) {
|
|
10236
10265
|
case "bar": {
|
|
10237
10266
|
let n = r ?? ("orientation" in e.chart ? e.chart.orientation : void 0) ?? o.orientation;
|
|
@@ -10239,7 +10268,7 @@ function bh(e, t, n, r) {
|
|
|
10239
10268
|
...o,
|
|
10240
10269
|
...s,
|
|
10241
10270
|
...n ? { orientation: n } : {},
|
|
10242
|
-
...
|
|
10271
|
+
...bh(t),
|
|
10243
10272
|
categories: a.categories ?? [],
|
|
10244
10273
|
series: a.series
|
|
10245
10274
|
};
|
|
@@ -10247,7 +10276,7 @@ function bh(e, t, n, r) {
|
|
|
10247
10276
|
case "line": return {
|
|
10248
10277
|
...o,
|
|
10249
10278
|
...s,
|
|
10250
|
-
...
|
|
10279
|
+
...bh(t),
|
|
10251
10280
|
categories: a.categories ?? [],
|
|
10252
10281
|
series: a.series
|
|
10253
10282
|
};
|
|
@@ -10282,12 +10311,12 @@ function bh(e, t, n, r) {
|
|
|
10282
10311
|
};
|
|
10283
10312
|
}
|
|
10284
10313
|
}
|
|
10285
|
-
function
|
|
10314
|
+
function Sh(e, t) {
|
|
10286
10315
|
let { chart: n } = e;
|
|
10287
10316
|
switch (n.type) {
|
|
10288
10317
|
case "funnel": {
|
|
10289
10318
|
let e = t.series;
|
|
10290
|
-
return Array.isArray(t.series) && (e =
|
|
10319
|
+
return Array.isArray(t.series) && (e = Am(Cm(t, "bar"), "funnel").series), {
|
|
10291
10320
|
...n,
|
|
10292
10321
|
series: e
|
|
10293
10322
|
};
|
|
@@ -10319,47 +10348,47 @@ function xh(e, t) {
|
|
|
10319
10348
|
case "line": {
|
|
10320
10349
|
let { series: e } = t, r = t.categories ?? [];
|
|
10321
10350
|
if (e && !Array.isArray(e)) {
|
|
10322
|
-
let i =
|
|
10351
|
+
let i = Am(Cm(t, "funnel"), n.type);
|
|
10323
10352
|
e = i.series, r = i.categories ?? [];
|
|
10324
10353
|
}
|
|
10325
10354
|
return {
|
|
10326
10355
|
...n,
|
|
10327
10356
|
...n.type === "bar" ? { showLabels: n.showLabels ?? !0 } : {},
|
|
10328
|
-
...
|
|
10357
|
+
...bh(t),
|
|
10329
10358
|
categories: r,
|
|
10330
10359
|
series: e
|
|
10331
10360
|
};
|
|
10332
10361
|
}
|
|
10333
10362
|
}
|
|
10334
10363
|
}
|
|
10335
|
-
function
|
|
10336
|
-
let n =
|
|
10364
|
+
function Ch({ config: e, data: t }) {
|
|
10365
|
+
let n = Sm(t, e.type), r = n === e.type ? e : {
|
|
10337
10366
|
...e,
|
|
10338
10367
|
type: n
|
|
10339
|
-
}, i = K(() =>
|
|
10368
|
+
}, i = K(() => Pm(r, t), [r, t]), a = K(() => ({
|
|
10340
10369
|
dataAdapter: { fetchData: () => ({ records: i.rows }) },
|
|
10341
10370
|
columns: i.columns.map((e) => ({
|
|
10342
10371
|
label: e,
|
|
10343
10372
|
id: e
|
|
10344
10373
|
}))
|
|
10345
|
-
}), [i]), o =
|
|
10374
|
+
}), [i]), o = L(a, [i]), s = K(() => [{
|
|
10346
10375
|
type: "table",
|
|
10347
10376
|
options: { columns: i.columns.map((e, t) => ({
|
|
10348
10377
|
label: e,
|
|
10349
10378
|
render: (n) => String(n[i.keys?.[t] ?? e] ?? "")
|
|
10350
10379
|
})) }
|
|
10351
10380
|
}], [i.columns]);
|
|
10352
|
-
return /* @__PURE__ */ X(
|
|
10381
|
+
return /* @__PURE__ */ X(Ze, {
|
|
10353
10382
|
fullHeight: !0,
|
|
10354
10383
|
source: o,
|
|
10355
10384
|
visualizations: s
|
|
10356
10385
|
});
|
|
10357
10386
|
}
|
|
10358
|
-
function
|
|
10359
|
-
return
|
|
10387
|
+
function wh(e) {
|
|
10388
|
+
return vm(e.chart) && e.chart.type === "bar" && "orientation" in e.chart && e.chart.orientation === "horizontal";
|
|
10360
10389
|
}
|
|
10361
|
-
function
|
|
10362
|
-
let f =
|
|
10390
|
+
function Th({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c, onTransformChart: l, isFullscreen: u, onFullscreenChange: d }) {
|
|
10391
|
+
let f = z(), [m, h] = J("chart"), { enabled: g, setPendingQuote: _, setOpen: v, focusChatInput: y } = Yi(), b = !vm(e.chart), x = b ? vh : e.chart, [S, C] = J(null), w = e.useDashboardFilters !== !1, T = JSON.stringify(r?.value ?? {}), { data: E, isLoading: D, error: O, retry: k } = eh(e.fetchData, t, w, T), A = q(null), j = K(() => E && !b ? xh(e, E) : void 0, [
|
|
10363
10392
|
e,
|
|
10364
10393
|
E,
|
|
10365
10394
|
b
|
|
@@ -10385,7 +10414,7 @@ function wh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10385
10414
|
return;
|
|
10386
10415
|
}
|
|
10387
10416
|
if (!j) return;
|
|
10388
|
-
let n = { text:
|
|
10417
|
+
let n = { text: gh(e.title, j, t, f.dataChart.noData) };
|
|
10389
10418
|
c?.({
|
|
10390
10419
|
id: e.id,
|
|
10391
10420
|
title: e.title,
|
|
@@ -10403,43 +10432,43 @@ function wh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10403
10432
|
_,
|
|
10404
10433
|
v,
|
|
10405
10434
|
y
|
|
10406
|
-
]), F = K(() =>
|
|
10435
|
+
]), F = K(() => _h(f), [f]), I = $m({
|
|
10407
10436
|
chartContainerRef: A,
|
|
10408
10437
|
chartConfig: x,
|
|
10409
10438
|
data: E,
|
|
10410
10439
|
title: e.title
|
|
10411
|
-
}),
|
|
10440
|
+
}), ee = K(() => [...n ?? [], ...I], [n, I]), te = W(() => C(null), []), L = x.type === "bar" ? "orientation" in x ? x.orientation ?? "vertical" : "vertical" : void 0, ne = E ? Sm(E, x.type) : x.type, re = K(() => Mm(ne), [ne]), ie = K(() => E ? jm(Cm(E, ne)) : !1, [E, ne]), ae = E && Array.isArray(E.series) ? E.series.length : 1, oe = F.filter((e) => {
|
|
10412
10441
|
let t = e.type === "bar" ? "bar" : e.type;
|
|
10413
|
-
return !(!
|
|
10414
|
-
}),
|
|
10415
|
-
let n = t.type === "table", r = n ? m === "table" : m === "chart" && x.type === t.type && (t.type !== "bar" ||
|
|
10442
|
+
return !(!re.has(t) || e.type === "pie" && ae > 1 || (e.type === "pie" || e.type === "funnel") && ie);
|
|
10443
|
+
}), se = l && ne !== "scatter" && ne !== "radar" && ne !== "heatmap" ? oe.map((t) => {
|
|
10444
|
+
let n = t.type === "table", r = n ? m === "table" : m === "chart" && x.type === t.type && (t.type !== "bar" || L === t.orientation);
|
|
10416
10445
|
return {
|
|
10417
10446
|
label: t.label,
|
|
10418
10447
|
value: t.value,
|
|
10419
10448
|
icon: t.icon,
|
|
10420
10449
|
isActive: r,
|
|
10421
10450
|
onSelect: () => {
|
|
10422
|
-
n ? h("table") : (h("chart"), (x.type !== t.type || t.type === "bar" &&
|
|
10451
|
+
n ? h("table") : (h("chart"), (x.type !== t.type || t.type === "bar" && L !== t.orientation) && l(e.id, t.type, t.orientation));
|
|
10423
10452
|
}
|
|
10424
10453
|
};
|
|
10425
|
-
}) : void 0,
|
|
10454
|
+
}) : void 0, ce = !!u && wh(e), [le, ue] = J(0), de = !!d && wh(e), fe = de && !u && le > 0, pe = de && !!u, me = E?.categories?.length ?? 0, he = fe ? f.dataChart.windowedCategories.replace("{{count}}", String(Math.max(0, me - le))).replace("{{total}}", String(me)) : void 0, ge = fe ? {
|
|
10426
10455
|
label: f.actions.showAll,
|
|
10427
10456
|
onClick: () => d?.(!0)
|
|
10428
|
-
} :
|
|
10457
|
+
} : pe ? {
|
|
10429
10458
|
label: f.actions.showLess,
|
|
10430
10459
|
onClick: () => d?.(!1)
|
|
10431
10460
|
} : void 0;
|
|
10432
|
-
return /* @__PURE__ */ X(
|
|
10461
|
+
return /* @__PURE__ */ X(ah, {
|
|
10433
10462
|
title: e.title,
|
|
10434
|
-
description:
|
|
10463
|
+
description: he ?? e.description,
|
|
10435
10464
|
info: e.info,
|
|
10436
|
-
...
|
|
10465
|
+
...ge ? { descriptionAction: ge } : {},
|
|
10437
10466
|
explanation: e.explanation,
|
|
10438
10467
|
isLoading: D,
|
|
10439
10468
|
error: O ?? (b ? /* @__PURE__ */ Error() : void 0),
|
|
10440
10469
|
onRetry: b ? void 0 : k,
|
|
10441
|
-
skeleton:
|
|
10442
|
-
actions:
|
|
10470
|
+
skeleton: yh(x),
|
|
10471
|
+
actions: ee,
|
|
10443
10472
|
itemFilters: r,
|
|
10444
10473
|
editMode: i,
|
|
10445
10474
|
readOnly: a,
|
|
@@ -10447,32 +10476,32 @@ function wh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10447
10476
|
onAskAi: s,
|
|
10448
10477
|
onAskAiTarget: c,
|
|
10449
10478
|
itemId: e.id,
|
|
10450
|
-
chartTypeOptions:
|
|
10479
|
+
chartTypeOptions: se,
|
|
10451
10480
|
isFullscreen: u,
|
|
10452
|
-
fitContent:
|
|
10481
|
+
fitContent: ce,
|
|
10453
10482
|
onFullscreenChange: d,
|
|
10454
|
-
children: E && j ? m === "table" ? /* @__PURE__ */ X(
|
|
10483
|
+
children: E && j ? m === "table" ? /* @__PURE__ */ X(Ch, {
|
|
10455
10484
|
config: x,
|
|
10456
10485
|
data: E
|
|
10457
10486
|
}) : /* @__PURE__ */ Z("div", {
|
|
10458
10487
|
ref: A,
|
|
10459
10488
|
tabIndex: -1,
|
|
10460
10489
|
className: B("relative h-full w-full px-4 py-3", En("rounded-sm focus-visible:ring-inset focus-visible:ring-offset-0")),
|
|
10461
|
-
children: [/* @__PURE__ */ X(
|
|
10490
|
+
children: [/* @__PURE__ */ X(Ct, {
|
|
10462
10491
|
...j,
|
|
10463
10492
|
ariaLabel: e.title,
|
|
10464
10493
|
onPointClick: N ? (e) => C(e) : void 0,
|
|
10465
|
-
...
|
|
10494
|
+
...de ? {
|
|
10466
10495
|
windowCategories: !0,
|
|
10467
|
-
onHiddenCategoriesChange:
|
|
10496
|
+
onHiddenCategoriesChange: ue
|
|
10468
10497
|
} : {},
|
|
10469
|
-
...
|
|
10470
|
-
}), /* @__PURE__ */ X(
|
|
10498
|
+
...ce ? { showAllCategories: !0 } : {}
|
|
10499
|
+
}), /* @__PURE__ */ X(ch, {
|
|
10471
10500
|
anchor: S,
|
|
10472
10501
|
onAsk: () => {
|
|
10473
10502
|
S && P(S);
|
|
10474
10503
|
},
|
|
10475
|
-
onDismiss:
|
|
10504
|
+
onDismiss: te,
|
|
10476
10505
|
returnFocusTo: A
|
|
10477
10506
|
})]
|
|
10478
10507
|
}) : D ? null : /* @__PURE__ */ X("div", {
|
|
@@ -10483,7 +10512,7 @@ function wh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10483
10512
|
}
|
|
10484
10513
|
//#endregion
|
|
10485
10514
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/tableExport.ts
|
|
10486
|
-
function
|
|
10515
|
+
function Eh(e) {
|
|
10487
10516
|
return ((e?.find((e) => e?.type === "table"))?.options?.columns ?? []).filter((e) => typeof e?.id == "string" && typeof e?.label == "string").map((e) => ({
|
|
10488
10517
|
id: e.id,
|
|
10489
10518
|
label: e.label,
|
|
@@ -10491,14 +10520,14 @@ function Th(e) {
|
|
|
10491
10520
|
excelValue: e.excelValue
|
|
10492
10521
|
}));
|
|
10493
10522
|
}
|
|
10494
|
-
function
|
|
10523
|
+
function Dh(e, t, n = "excel") {
|
|
10495
10524
|
return e.map((e) => {
|
|
10496
10525
|
let r = {};
|
|
10497
10526
|
for (let i of t) {
|
|
10498
10527
|
let t = n === "excel" ? i.excelValue ?? i.render : i.render;
|
|
10499
10528
|
if (t) {
|
|
10500
10529
|
let n = t(e);
|
|
10501
|
-
r[i.id] =
|
|
10530
|
+
r[i.id] = wt(n) ?? tt(n);
|
|
10502
10531
|
} else r[i.id] = e[i.id];
|
|
10503
10532
|
}
|
|
10504
10533
|
return r;
|
|
@@ -10506,11 +10535,11 @@ function Eh(e, t, n = "excel") {
|
|
|
10506
10535
|
}
|
|
10507
10536
|
//#endregion
|
|
10508
10537
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useCollectionDownloadActions.ts
|
|
10509
|
-
var
|
|
10510
|
-
async function
|
|
10538
|
+
var Oh = 1e4, kh = 100;
|
|
10539
|
+
async function Ah(e) {
|
|
10511
10540
|
return e;
|
|
10512
10541
|
}
|
|
10513
|
-
async function
|
|
10542
|
+
async function jh(e) {
|
|
10514
10543
|
let { dataAdapter: t } = e, n = [...e.currentSortings ? [{
|
|
10515
10544
|
field: e.currentSortings.field,
|
|
10516
10545
|
order: e.currentSortings.order
|
|
@@ -10523,38 +10552,38 @@ async function Ah(e) {
|
|
|
10523
10552
|
search: e.currentSearch,
|
|
10524
10553
|
navigationFilters: e.currentNavigationFilters
|
|
10525
10554
|
}, i = t.exportFetchData ?? t.fetchData;
|
|
10526
|
-
if (!t.paginationType) return ((await
|
|
10555
|
+
if (!t.paginationType) return ((await Ah(i(r))).records ?? []).slice(0, Oh);
|
|
10527
10556
|
if (t.paginationType === "pages") {
|
|
10528
10557
|
let e = [], t = 1;
|
|
10529
|
-
for (; e.length <
|
|
10530
|
-
let n = await
|
|
10558
|
+
for (; e.length < Oh;) {
|
|
10559
|
+
let n = await Ah(i({
|
|
10531
10560
|
...r,
|
|
10532
10561
|
pagination: {
|
|
10533
10562
|
currentPage: t,
|
|
10534
|
-
perPage:
|
|
10563
|
+
perPage: kh
|
|
10535
10564
|
}
|
|
10536
10565
|
}));
|
|
10537
10566
|
if (!n.records || n.records.length === 0 || (e.push(...n.records), "pagesCount" in n && t >= n.pagesCount)) break;
|
|
10538
10567
|
t++;
|
|
10539
10568
|
}
|
|
10540
|
-
return e.slice(0,
|
|
10569
|
+
return e.slice(0, Oh);
|
|
10541
10570
|
}
|
|
10542
10571
|
let a = [], o = null;
|
|
10543
|
-
for (; a.length <
|
|
10544
|
-
let e = await
|
|
10572
|
+
for (; a.length < Oh;) {
|
|
10573
|
+
let e = await Ah(i({
|
|
10545
10574
|
...r,
|
|
10546
10575
|
pagination: {
|
|
10547
10576
|
cursor: o,
|
|
10548
|
-
perPage:
|
|
10577
|
+
perPage: kh
|
|
10549
10578
|
}
|
|
10550
10579
|
}));
|
|
10551
10580
|
if (!e.records || e.records.length === 0 || (a.push(...e.records), "hasMore" in e && !e.hasMore)) break;
|
|
10552
10581
|
if ("cursor" in e) o = e.cursor ?? null;
|
|
10553
10582
|
else break;
|
|
10554
10583
|
}
|
|
10555
|
-
return a.slice(0,
|
|
10584
|
+
return a.slice(0, Oh);
|
|
10556
10585
|
}
|
|
10557
|
-
function
|
|
10586
|
+
function Mh(e, t) {
|
|
10558
10587
|
let n = new Set(t?.hidden ?? []), r = e.filter((e) => !n.has(e.id)), i = t?.order;
|
|
10559
10588
|
if (!i || i.length === 0) return r;
|
|
10560
10589
|
let a = new Map(r.map((e) => [e.id, e])), o = [];
|
|
@@ -10565,18 +10594,18 @@ function jh(e, t) {
|
|
|
10565
10594
|
for (let e of r) a.has(e.id) && o.push(e);
|
|
10566
10595
|
return o;
|
|
10567
10596
|
}
|
|
10568
|
-
function
|
|
10569
|
-
let { t: a } =
|
|
10597
|
+
function Nh({ source: e, title: t, description: n, columns: r, tableSettings: i }) {
|
|
10598
|
+
let { t: a } = z(), [o, s] = J(!1), c = W(async (a) => {
|
|
10570
10599
|
if (e && !o) {
|
|
10571
10600
|
s(!0);
|
|
10572
10601
|
try {
|
|
10573
|
-
let o = await
|
|
10602
|
+
let o = await jh(e), s = Mh(r, i);
|
|
10574
10603
|
if (s.length === 0 || o.length === 0) return;
|
|
10575
|
-
let c = s.map((e) => e.label), l = s.map((e) => e.id), u =
|
|
10576
|
-
a === "excel" ? await
|
|
10604
|
+
let c = s.map((e) => e.label), l = s.map((e) => e.id), u = Dh(o, s, a);
|
|
10605
|
+
a === "excel" ? await qm(c, u, t, {
|
|
10577
10606
|
keys: l,
|
|
10578
|
-
preamble:
|
|
10579
|
-
}) :
|
|
10607
|
+
preamble: Gm(t, n)
|
|
10608
|
+
}) : Jm(c, u, t, l);
|
|
10580
10609
|
} finally {
|
|
10581
10610
|
s(!1);
|
|
10582
10611
|
}
|
|
@@ -10606,15 +10635,15 @@ function Mh({ source: e, title: t, description: n, columns: r, tableSettings: i
|
|
|
10606
10635
|
}
|
|
10607
10636
|
//#endregion
|
|
10608
10637
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/CollectionItem/CollectionItem.tsx
|
|
10609
|
-
function
|
|
10610
|
-
let d = e.useDashboardFilters === !1 ? {} : t, f = JSON.stringify(d), p = JSON.stringify(r?.value ?? {}), m = K(() => e.createSource(d), [f, p]), h =
|
|
10638
|
+
function Ph({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c, isFullscreen: l, onFullscreenChange: u }) {
|
|
10639
|
+
let d = e.useDashboardFilters === !1 ? {} : t, f = JSON.stringify(d), p = JSON.stringify(r?.value ?? {}), m = K(() => e.createSource(d), [f, p]), h = L(m, [f, p]), [g, _] = J(), v = K(() => Eh(e.visualizations), [e]), y = Nh({
|
|
10611
10640
|
source: h,
|
|
10612
10641
|
title: e.title,
|
|
10613
10642
|
description: e.description,
|
|
10614
10643
|
columns: v,
|
|
10615
10644
|
tableSettings: g
|
|
10616
10645
|
}), b = K(() => [...n ?? [], ...y], [n, y]);
|
|
10617
|
-
return /* @__PURE__ */ X(
|
|
10646
|
+
return /* @__PURE__ */ X(ah, {
|
|
10618
10647
|
title: e.title,
|
|
10619
10648
|
description: e.description,
|
|
10620
10649
|
info: e.info,
|
|
@@ -10630,7 +10659,7 @@ function Nh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10630
10659
|
itemId: e.id,
|
|
10631
10660
|
isFullscreen: l,
|
|
10632
10661
|
onFullscreenChange: u,
|
|
10633
|
-
children: /* @__PURE__ */ X(
|
|
10662
|
+
children: /* @__PURE__ */ X(Ze, {
|
|
10634
10663
|
fullHeight: !0,
|
|
10635
10664
|
source: h,
|
|
10636
10665
|
visualizations: e.visualizations,
|
|
@@ -10646,15 +10675,15 @@ function Nh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10646
10675
|
}
|
|
10647
10676
|
//#endregion
|
|
10648
10677
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardItem/DashboardItemSkeleton.tsx
|
|
10649
|
-
function
|
|
10678
|
+
function Fh() {
|
|
10650
10679
|
return /* @__PURE__ */ Z("div", {
|
|
10651
10680
|
className: "flex h-full items-end gap-3 px-4 pb-4",
|
|
10652
|
-
children: [/* @__PURE__ */ X(
|
|
10681
|
+
children: [/* @__PURE__ */ X(gn, { className: "h-10 w-36 rounded" }), /* @__PURE__ */ X(gn, { className: "h-4 w-16 rounded" })]
|
|
10653
10682
|
});
|
|
10654
10683
|
}
|
|
10655
10684
|
//#endregion
|
|
10656
10685
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/MetricItem/MetricItem.tsx
|
|
10657
|
-
function
|
|
10686
|
+
function Ih(e, t = { type: "number" }, n = 0) {
|
|
10658
10687
|
switch (t.type) {
|
|
10659
10688
|
case "currency": return new Intl.NumberFormat(void 0, {
|
|
10660
10689
|
style: "currency",
|
|
@@ -10680,7 +10709,7 @@ function Fh(e, t = { type: "number" }, n = 0) {
|
|
|
10680
10709
|
}).format(e);
|
|
10681
10710
|
}
|
|
10682
10711
|
}
|
|
10683
|
-
function
|
|
10712
|
+
function Lh(e, t) {
|
|
10684
10713
|
if (t === void 0 || t === 0) return;
|
|
10685
10714
|
let n = (e - t) / Math.abs(t) * 100;
|
|
10686
10715
|
return {
|
|
@@ -10688,8 +10717,8 @@ function Ih(e, t) {
|
|
|
10688
10717
|
direction: n > .5 ? "up" : n < -.5 ? "down" : "flat"
|
|
10689
10718
|
};
|
|
10690
10719
|
}
|
|
10691
|
-
function
|
|
10692
|
-
let r = q(null), { height: i, width: a } =
|
|
10720
|
+
function Rh({ value: e, trend: t, comparison: n }) {
|
|
10721
|
+
let r = q(null), { height: i, width: a } = Tt(r), [o, s] = J(!1), c = i > 220;
|
|
10693
10722
|
return Tc(() => {
|
|
10694
10723
|
let e = r.current;
|
|
10695
10724
|
s(e !== null && (e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight));
|
|
@@ -10750,7 +10779,7 @@ function Lh({ value: e, trend: t, comparison: n }) {
|
|
|
10750
10779
|
" ",
|
|
10751
10780
|
n.value
|
|
10752
10781
|
]
|
|
10753
|
-
}), n.info ? /* @__PURE__ */ X(
|
|
10782
|
+
}), n.info ? /* @__PURE__ */ X(Pe, {
|
|
10754
10783
|
info: n.info,
|
|
10755
10784
|
label: n.label
|
|
10756
10785
|
}) : null]
|
|
@@ -10758,9 +10787,9 @@ function Lh({ value: e, trend: t, comparison: n }) {
|
|
|
10758
10787
|
})
|
|
10759
10788
|
});
|
|
10760
10789
|
}
|
|
10761
|
-
function
|
|
10762
|
-
let l = e.useDashboardFilters !== !1, u = JSON.stringify(r?.value ?? {}), { data: d, isLoading: f, error: p, retry: m } =
|
|
10763
|
-
return /* @__PURE__ */ X(
|
|
10790
|
+
function zh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, handleDelete: o, onAskAi: s, onAskAiTarget: c }) {
|
|
10791
|
+
let l = e.useDashboardFilters !== !1, u = JSON.stringify(r?.value ?? {}), { data: d, isLoading: f, error: p, retry: m } = eh(e.fetchData, t, l, u), h = d ? Lh(d.value, d.previousValue) : void 0, g = (t) => e.valueFormatter ? e.valueFormatter(t) : Ih(t, e.format, e.decimals);
|
|
10792
|
+
return /* @__PURE__ */ X(ah, {
|
|
10764
10793
|
title: e.title,
|
|
10765
10794
|
description: e.description,
|
|
10766
10795
|
headerLines: d && !d.comparison ? 3 : 2,
|
|
@@ -10769,7 +10798,7 @@ function Rh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10769
10798
|
isLoading: f,
|
|
10770
10799
|
error: p,
|
|
10771
10800
|
onRetry: m,
|
|
10772
|
-
skeleton: /* @__PURE__ */ X(
|
|
10801
|
+
skeleton: /* @__PURE__ */ X(Fh, {}),
|
|
10773
10802
|
actions: n,
|
|
10774
10803
|
itemFilters: r,
|
|
10775
10804
|
editMode: i,
|
|
@@ -10778,7 +10807,7 @@ function Rh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10778
10807
|
onAskAi: s,
|
|
10779
10808
|
onAskAiTarget: c,
|
|
10780
10809
|
itemId: e.id,
|
|
10781
|
-
children: d ? /* @__PURE__ */ X(
|
|
10810
|
+
children: d ? /* @__PURE__ */ X(Rh, {
|
|
10782
10811
|
value: g(d.value),
|
|
10783
10812
|
trend: h,
|
|
10784
10813
|
comparison: d.comparison ? {
|
|
@@ -10791,16 +10820,16 @@ function Rh({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
10791
10820
|
}
|
|
10792
10821
|
//#endregion
|
|
10793
10822
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/DashboardGrid/DashboardGrid.tsx
|
|
10794
|
-
var
|
|
10823
|
+
var Bh = 12, Vh = 4, Hh = 640, Uh = 4, Wh = {
|
|
10795
10824
|
chart: 336,
|
|
10796
10825
|
metric: 144,
|
|
10797
10826
|
collection: 480
|
|
10798
|
-
},
|
|
10827
|
+
}, Gh = 336, Kh = {
|
|
10799
10828
|
chart: 240,
|
|
10800
10829
|
metric: 120,
|
|
10801
10830
|
collection: 300
|
|
10802
|
-
},
|
|
10803
|
-
function
|
|
10831
|
+
}, qh = 120;
|
|
10832
|
+
function Jh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, onLayoutChange: a, resetKey: o, onTransformChart: s, onAskAi: c, onAskAiTarget: l, onFullscreenChange: u }) {
|
|
10804
10833
|
let d = q(null), [f, p] = J(!1), [m, h] = J(null);
|
|
10805
10834
|
G(() => {
|
|
10806
10835
|
u?.(!!m);
|
|
@@ -10809,19 +10838,19 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10809
10838
|
let t = /* @__PURE__ */ new Map();
|
|
10810
10839
|
for (let n of e) t.set(n.id, n);
|
|
10811
10840
|
return t;
|
|
10812
|
-
}, [e]), [_, v] = J(() =>
|
|
10841
|
+
}, [e]), [_, v] = J(() => tg(e)), y = q(ng(e));
|
|
10813
10842
|
G(() => {
|
|
10814
|
-
let t =
|
|
10815
|
-
t !== y.current && (y.current = t, v(
|
|
10843
|
+
let t = ng(e);
|
|
10844
|
+
t !== y.current && (y.current = t, v(tg(e)));
|
|
10816
10845
|
}, [e]);
|
|
10817
10846
|
let b = q(o);
|
|
10818
10847
|
G(() => {
|
|
10819
|
-
o !== void 0 && o !== b.current && (b.current = o, v(
|
|
10848
|
+
o !== void 0 && o !== b.current && (b.current = o, v(tg(e)));
|
|
10820
10849
|
}, [o, e]), G(() => {
|
|
10821
10850
|
let e = d.current;
|
|
10822
10851
|
if (!e) return;
|
|
10823
10852
|
let t = new ResizeObserver((e) => {
|
|
10824
|
-
for (let t of e) p(t.contentRect.width <
|
|
10853
|
+
for (let t of e) p(t.contentRect.width < Hh);
|
|
10825
10854
|
});
|
|
10826
10855
|
return t.observe(e), () => t.disconnect();
|
|
10827
10856
|
}, []), G(() => {
|
|
@@ -10874,7 +10903,7 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10874
10903
|
let r = n.map((t) => ({
|
|
10875
10904
|
...t,
|
|
10876
10905
|
ids: t.ids.filter((t) => t !== e)
|
|
10877
|
-
})), i = k.current.get(e), a = i ?
|
|
10906
|
+
})), i = k.current.get(e), a = i ? cg(i) : Gh;
|
|
10878
10907
|
if (t.type === "new-row") r.splice(t.afterRowIdx + 1, 0, {
|
|
10879
10908
|
ids: [e],
|
|
10880
10909
|
height: a
|
|
@@ -10886,7 +10915,7 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10886
10915
|
else {
|
|
10887
10916
|
let n = Math.min(t.position, r[t.rowIdx].ids.length);
|
|
10888
10917
|
r[t.rowIdx].ids.splice(n, 0, e);
|
|
10889
|
-
let i =
|
|
10918
|
+
let i = ag(r[t.rowIdx], k.current);
|
|
10890
10919
|
r[t.rowIdx].height < i && (r[t.rowIdx] = {
|
|
10891
10920
|
...r[t.rowIdx],
|
|
10892
10921
|
height: i
|
|
@@ -10894,33 +10923,33 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10894
10923
|
}
|
|
10895
10924
|
return r = r.filter((e) => e.ids.length > 0), x(r), r;
|
|
10896
10925
|
});
|
|
10897
|
-
}, [x]),
|
|
10898
|
-
if (
|
|
10926
|
+
}, [x]), I = W((e, t) => {
|
|
10927
|
+
if (Qh(N.current, e, t)) return null;
|
|
10899
10928
|
let n = d.current ? Array.from(d.current.querySelectorAll("[data-dashboard-row]")) : [], r = O.current;
|
|
10900
10929
|
if (n.length === 0 || n.length !== r.length) return null;
|
|
10901
|
-
let i = n.map((e) => e.getBoundingClientRect()), a =
|
|
10930
|
+
let i = n.map((e) => e.getBoundingClientRect()), a = $h(i, t), o = i[a], s = r[a], c = A.current, l = c ? s.ids.includes(c) : !1, u = o.height / 3;
|
|
10902
10931
|
return t < o.top + u ? {
|
|
10903
10932
|
type: "new-row",
|
|
10904
10933
|
afterRowIdx: a - 1
|
|
10905
10934
|
} : t > o.bottom - u ? {
|
|
10906
10935
|
type: "new-row",
|
|
10907
10936
|
afterRowIdx: a
|
|
10908
|
-
} : l && s.ids.length === 1 ? null : s.ids.length >=
|
|
10937
|
+
} : l && s.ids.length === 1 ? null : s.ids.length >= Vh && !l ? {
|
|
10909
10938
|
type: "new-row",
|
|
10910
10939
|
afterRowIdx: a
|
|
10911
10940
|
} : {
|
|
10912
10941
|
type: "into-row",
|
|
10913
10942
|
rowIdx: a,
|
|
10914
|
-
position:
|
|
10943
|
+
position: eg(n[a].querySelectorAll("[data-card-id]"), e, s.ids.length)
|
|
10915
10944
|
};
|
|
10916
|
-
}, []),
|
|
10945
|
+
}, []), ee = W((e, t) => {
|
|
10917
10946
|
if (typeof t.button == "number" && t.button !== 0) return;
|
|
10918
10947
|
t.preventDefault(), t.stopPropagation();
|
|
10919
10948
|
let n = t.clientX, r = t.clientY, i = !1;
|
|
10920
10949
|
A.current = e, j.current = null, D(null);
|
|
10921
10950
|
let a = (t) => {
|
|
10922
10951
|
if (!i) {
|
|
10923
|
-
if (Math.hypot(t.clientX - n, t.clientY - r) <
|
|
10952
|
+
if (Math.hypot(t.clientX - n, t.clientY - r) < Uh) return;
|
|
10924
10953
|
i = !0, T(e), N.current = Array.from(document.querySelectorAll("[data-ai-chat-dropzone]"));
|
|
10925
10954
|
let a = k.current.get(e)?.title ?? "";
|
|
10926
10955
|
a && window.dispatchEvent(new CustomEvent(Or, { detail: {
|
|
@@ -10932,25 +10961,25 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10932
10961
|
}
|
|
10933
10962
|
let a = M.current;
|
|
10934
10963
|
a && (a.style.transform = `translate(${t.clientX + 12}px, ${t.clientY + 16}px)`);
|
|
10935
|
-
let o =
|
|
10964
|
+
let o = I(t.clientX, t.clientY);
|
|
10936
10965
|
JSON.stringify(o) !== JSON.stringify(j.current) && (j.current = o, D(o));
|
|
10937
10966
|
}, o = (e) => {
|
|
10938
10967
|
document.removeEventListener("pointermove", a), document.removeEventListener("pointerup", s), document.removeEventListener("pointercancel", u), P.current = null;
|
|
10939
10968
|
let t = A.current, n = j.current;
|
|
10940
10969
|
e && i && t && n && F(t, n), A.current = null, j.current = null, N.current = [], T(null), D(null), i && window.dispatchEvent(new CustomEvent(Sr));
|
|
10941
10970
|
}, s = (e) => {
|
|
10942
|
-
i && (N.current = Array.from(document.querySelectorAll("[data-ai-chat-dropzone]")), j.current =
|
|
10971
|
+
i && (N.current = Array.from(document.querySelectorAll("[data-ai-chat-dropzone]")), j.current = I(e.clientX, e.clientY)), o(!0);
|
|
10943
10972
|
}, u = () => o(!1);
|
|
10944
10973
|
P.current = () => o(!1), document.addEventListener("pointermove", a), document.addEventListener("pointerup", s), document.addEventListener("pointercancel", u);
|
|
10945
10974
|
}, [
|
|
10946
10975
|
F,
|
|
10947
10976
|
c,
|
|
10948
10977
|
l,
|
|
10949
|
-
|
|
10978
|
+
I
|
|
10950
10979
|
]);
|
|
10951
10980
|
G(() => () => P.current?.(), []);
|
|
10952
|
-
let
|
|
10953
|
-
let i = Math.max(
|
|
10981
|
+
let te = W((e, t, n, r) => {
|
|
10982
|
+
let i = Math.max(ag(_[e], g), r), a = (r) => {
|
|
10954
10983
|
let a = Math.max(i, n + r.clientY - t);
|
|
10955
10984
|
v((t) => t.map((t, n) => n === e ? {
|
|
10956
10985
|
...t,
|
|
@@ -10964,16 +10993,16 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10964
10993
|
_,
|
|
10965
10994
|
x,
|
|
10966
10995
|
g
|
|
10967
|
-
]),
|
|
10996
|
+
]), L = f ? _.flatMap((e) => e.ids.map((t) => ({
|
|
10968
10997
|
ids: [t],
|
|
10969
10998
|
height: e.height
|
|
10970
|
-
}))) : _,
|
|
10999
|
+
}))) : _, ne = !!r && !f, re = (e) => w && E?.type === "new-row" && E.afterRowIdx === e;
|
|
10971
11000
|
if (e.length === 1) {
|
|
10972
11001
|
let a = e[0];
|
|
10973
11002
|
return /* @__PURE__ */ X("div", {
|
|
10974
11003
|
ref: d,
|
|
10975
11004
|
className: "flex h-full min-h-0 flex-col",
|
|
10976
|
-
children: /* @__PURE__ */ X(
|
|
11005
|
+
children: /* @__PURE__ */ X(lg, {
|
|
10977
11006
|
item: a,
|
|
10978
11007
|
itemFilters: t?.(a),
|
|
10979
11008
|
filters: n,
|
|
@@ -10990,11 +11019,11 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
10990
11019
|
if (m) {
|
|
10991
11020
|
let e = g.get(m);
|
|
10992
11021
|
if (e) {
|
|
10993
|
-
let a = e.type === "chart" &&
|
|
11022
|
+
let a = e.type === "chart" && wh(e);
|
|
10994
11023
|
return /* @__PURE__ */ X("div", {
|
|
10995
11024
|
ref: d,
|
|
10996
11025
|
className: B("flex flex-col", a ? "min-h-full shrink-0" : "h-full min-h-0"),
|
|
10997
|
-
children: /* @__PURE__ */ X(
|
|
11026
|
+
children: /* @__PURE__ */ X(lg, {
|
|
10998
11027
|
item: e,
|
|
10999
11028
|
itemFilters: t?.(e),
|
|
11000
11029
|
filters: n,
|
|
@@ -11014,19 +11043,19 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11014
11043
|
return /* @__PURE__ */ Z("div", {
|
|
11015
11044
|
ref: d,
|
|
11016
11045
|
className: "flex flex-col",
|
|
11017
|
-
style: { gap:
|
|
11046
|
+
style: { gap: Bh },
|
|
11018
11047
|
children: [
|
|
11019
|
-
|
|
11048
|
+
L.map((e, a) => {
|
|
11020
11049
|
let o = w && E?.type === "into-row" && E.rowIdx === a, u = e.ids.some((e) => g.get(e)?.type === "collection");
|
|
11021
11050
|
return /* @__PURE__ */ Z("div", {
|
|
11022
11051
|
className: "relative",
|
|
11023
11052
|
children: [
|
|
11024
|
-
|
|
11053
|
+
ne ? /* @__PURE__ */ X(Zh, { active: !!re(a - 1) }) : null,
|
|
11025
11054
|
/* @__PURE__ */ X("div", {
|
|
11026
11055
|
"data-dashboard-row": "",
|
|
11027
11056
|
className: B("flex rounded-lg transition-colors duration-200", o && "bg-f1-background-hover"),
|
|
11028
11057
|
style: {
|
|
11029
|
-
gap:
|
|
11058
|
+
gap: Bh,
|
|
11030
11059
|
height: e.height,
|
|
11031
11060
|
...u ? {
|
|
11032
11061
|
overflowY: "clip",
|
|
@@ -11037,15 +11066,15 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11037
11066
|
let d = g.get(a);
|
|
11038
11067
|
if (!d) return null;
|
|
11039
11068
|
let f = w === a, p = o && E?.type === "into-row" && E.position === u, m = o && E?.type === "into-row" && E.position === e.ids.length && u === e.ids.length - 1;
|
|
11040
|
-
return /* @__PURE__ */ X(
|
|
11069
|
+
return /* @__PURE__ */ X(Yh, {
|
|
11041
11070
|
id: a,
|
|
11042
11071
|
isDragging: f,
|
|
11043
11072
|
showIndicatorBefore: !!p,
|
|
11044
11073
|
showIndicatorAfter: !!m,
|
|
11045
|
-
draggable:
|
|
11046
|
-
onGripPointerDown:
|
|
11074
|
+
draggable: ne,
|
|
11075
|
+
onGripPointerDown: ee,
|
|
11047
11076
|
onContentHeightChange: S,
|
|
11048
|
-
children: /* @__PURE__ */ X(
|
|
11077
|
+
children: /* @__PURE__ */ X(lg, {
|
|
11049
11078
|
item: d,
|
|
11050
11079
|
itemFilters: t?.(d),
|
|
11051
11080
|
filters: n,
|
|
@@ -11060,19 +11089,19 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11060
11089
|
}, a);
|
|
11061
11090
|
})
|
|
11062
11091
|
}),
|
|
11063
|
-
|
|
11092
|
+
ne ? /* @__PURE__ */ X("div", {
|
|
11064
11093
|
className: "group/resize absolute -bottom-3.5 mx-auto flex h-3 w-full items-center justify-center hover:cursor-ns-resize",
|
|
11065
11094
|
onMouseDown: (t) => {
|
|
11066
11095
|
t.preventDefault();
|
|
11067
11096
|
let n = t.currentTarget.parentElement?.querySelector("[data-dashboard-row]"), r = Math.max(n?.getBoundingClientRect().height ?? 0, e.height), i = new Set(e.ids.filter((e) => g.get(e)?.type !== "chart"));
|
|
11068
|
-
|
|
11097
|
+
te(a, t.clientY, r, og(n, i));
|
|
11069
11098
|
},
|
|
11070
11099
|
children: /* @__PURE__ */ X("div", { className: "h-1 w-16 rounded-full bg-transparent transition-colors group-hover/resize:bg-f1-foreground-tertiary" })
|
|
11071
11100
|
}) : null
|
|
11072
11101
|
]
|
|
11073
11102
|
}, a);
|
|
11074
11103
|
}),
|
|
11075
|
-
|
|
11104
|
+
ne ? /* @__PURE__ */ X(Zh, { active: !!re(L.length - 1) }) : null,
|
|
11076
11105
|
w ? /* @__PURE__ */ X("div", {
|
|
11077
11106
|
ref: M,
|
|
11078
11107
|
className: "pointer-events-none fixed left-0 top-0 z-50 max-w-xs truncate rounded-lg border border-solid border-f1-border-secondary bg-f1-background px-3 py-2 text-sm font-medium text-f1-foreground shadow-lg",
|
|
@@ -11082,7 +11111,7 @@ function qh({ items: e, itemFilters: t, filters: n, editMode: r, readOnly: i, on
|
|
|
11082
11111
|
]
|
|
11083
11112
|
});
|
|
11084
11113
|
}
|
|
11085
|
-
function
|
|
11114
|
+
function Yh({ id: e, isDragging: t, showIndicatorBefore: n, showIndicatorAfter: r, draggable: i, onGripPointerDown: a, onContentHeightChange: o, children: s }) {
|
|
11086
11115
|
let c = q(null);
|
|
11087
11116
|
return G(() => {
|
|
11088
11117
|
let t = c.current;
|
|
@@ -11105,7 +11134,7 @@ function Jh({ id: e, isDragging: t, showIndicatorBefore: n, showIndicatorAfter:
|
|
|
11105
11134
|
n = !0, s.disconnect(), l.disconnect();
|
|
11106
11135
|
};
|
|
11107
11136
|
}, [e, o]), /* @__PURE__ */ Z(Y, { children: [
|
|
11108
|
-
n ? /* @__PURE__ */ X(
|
|
11137
|
+
n ? /* @__PURE__ */ X(Xh, {}) : null,
|
|
11109
11138
|
/* @__PURE__ */ Z("div", {
|
|
11110
11139
|
ref: c,
|
|
11111
11140
|
"data-card-id": e,
|
|
@@ -11120,44 +11149,44 @@ function Jh({ id: e, isDragging: t, showIndicatorBefore: n, showIndicatorAfter:
|
|
|
11120
11149
|
})
|
|
11121
11150
|
}) : null, s]
|
|
11122
11151
|
}),
|
|
11123
|
-
r ? /* @__PURE__ */ X(
|
|
11152
|
+
r ? /* @__PURE__ */ X(Xh, {}) : null
|
|
11124
11153
|
] });
|
|
11125
11154
|
}
|
|
11126
|
-
function
|
|
11155
|
+
function Xh() {
|
|
11127
11156
|
return /* @__PURE__ */ X("div", {
|
|
11128
11157
|
className: "mx-[-2px] w-1 flex-shrink-0 self-stretch py-2",
|
|
11129
11158
|
children: /* @__PURE__ */ X("div", { className: "h-full w-full rounded-full bg-f1-background-secondary-hover" })
|
|
11130
11159
|
});
|
|
11131
11160
|
}
|
|
11132
|
-
function
|
|
11161
|
+
function Zh({ active: e }) {
|
|
11133
11162
|
return /* @__PURE__ */ X("div", {
|
|
11134
11163
|
className: "pointer-events-none relative flex items-center justify-center transition-all",
|
|
11135
11164
|
style: { minHeight: e ? 12 : 0 },
|
|
11136
11165
|
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") })
|
|
11137
11166
|
});
|
|
11138
11167
|
}
|
|
11139
|
-
function
|
|
11168
|
+
function Qh(e, t, n) {
|
|
11140
11169
|
for (let r of e) {
|
|
11141
11170
|
let e = r.getBoundingClientRect();
|
|
11142
11171
|
if (t >= e.left && t <= e.right && n >= e.top && n <= e.bottom) return !0;
|
|
11143
11172
|
}
|
|
11144
11173
|
return !1;
|
|
11145
11174
|
}
|
|
11146
|
-
function
|
|
11175
|
+
function $h(e, t) {
|
|
11147
11176
|
for (let n = 0; n < e.length - 1; n++) if (t < (e[n].bottom + e[n + 1].top) / 2) return n;
|
|
11148
11177
|
return e.length - 1;
|
|
11149
11178
|
}
|
|
11150
|
-
function
|
|
11179
|
+
function eg(e, t, n) {
|
|
11151
11180
|
for (let n = 0; n < e.length; n++) {
|
|
11152
11181
|
let r = e[n].getBoundingClientRect();
|
|
11153
11182
|
if (t < r.left + r.width / 2) return n;
|
|
11154
11183
|
}
|
|
11155
11184
|
return n;
|
|
11156
11185
|
}
|
|
11157
|
-
function eg(e) {
|
|
11158
|
-
return e.some((e) => e.y !== void 0) ? ng(e) : rg(e);
|
|
11159
|
-
}
|
|
11160
11186
|
function tg(e) {
|
|
11187
|
+
return e.some((e) => e.y !== void 0) ? rg(e) : ig(e);
|
|
11188
|
+
}
|
|
11189
|
+
function ng(e) {
|
|
11161
11190
|
return JSON.stringify(e.map((e) => [
|
|
11162
11191
|
e.id,
|
|
11163
11192
|
e.type,
|
|
@@ -11168,10 +11197,10 @@ function tg(e) {
|
|
|
11168
11197
|
e.colSpan ?? null
|
|
11169
11198
|
]));
|
|
11170
11199
|
}
|
|
11171
|
-
function
|
|
11200
|
+
function rg(e) {
|
|
11172
11201
|
let t = [...e].sort((e, t) => (e.y ?? 0) - (t.y ?? 0) || (e.x ?? 0) - (t.x ?? 0)), n = /* @__PURE__ */ new Map();
|
|
11173
11202
|
for (let e of t) {
|
|
11174
|
-
let t = e.y ?? 0, r =
|
|
11203
|
+
let t = e.y ?? 0, r = cg(e), i = n.get(t);
|
|
11175
11204
|
i || (i = {
|
|
11176
11205
|
ids: [],
|
|
11177
11206
|
maxHeight: 0
|
|
@@ -11182,11 +11211,11 @@ function ng(e) {
|
|
|
11182
11211
|
height: e.maxHeight
|
|
11183
11212
|
}));
|
|
11184
11213
|
}
|
|
11185
|
-
function
|
|
11214
|
+
function ig(e) {
|
|
11186
11215
|
let t = [], n = [], r = 0, i = 0;
|
|
11187
11216
|
for (let a of e) {
|
|
11188
|
-
let e =
|
|
11189
|
-
r + e >
|
|
11217
|
+
let e = sg(a), o = cg(a);
|
|
11218
|
+
r + e > Vh && n.length > 0 && (t.push({
|
|
11190
11219
|
ids: n,
|
|
11191
11220
|
height: i
|
|
11192
11221
|
}), n = [], r = 0, i = 0), n.push(a.id), r += e, o > i && (i = o);
|
|
@@ -11196,17 +11225,17 @@ function rg(e) {
|
|
|
11196
11225
|
height: i
|
|
11197
11226
|
}), t;
|
|
11198
11227
|
}
|
|
11199
|
-
function
|
|
11200
|
-
let n =
|
|
11228
|
+
function ag(e, t) {
|
|
11229
|
+
let n = qh;
|
|
11201
11230
|
for (let r of e.ids) {
|
|
11202
11231
|
let e = t.get(r);
|
|
11203
11232
|
if (!e) continue;
|
|
11204
|
-
let i =
|
|
11233
|
+
let i = Kh[e.type] ?? qh;
|
|
11205
11234
|
i > n && (n = i);
|
|
11206
11235
|
}
|
|
11207
11236
|
return n;
|
|
11208
11237
|
}
|
|
11209
|
-
function
|
|
11238
|
+
function og(e, t) {
|
|
11210
11239
|
if (!e || t.size === 0) return 0;
|
|
11211
11240
|
let n = e.style.height, r = e.style.minHeight, i = () => {
|
|
11212
11241
|
let n = 0;
|
|
@@ -11222,15 +11251,15 @@ function ag(e, t) {
|
|
|
11222
11251
|
let o = Math.max(a, i());
|
|
11223
11252
|
return e.style.height = n, e.style.minHeight = r, o;
|
|
11224
11253
|
}
|
|
11225
|
-
function og(e) {
|
|
11226
|
-
return e.type === "metric" ? 1 : e.type === "chart" ? 2 : e.type === "collection" ? Bh : 2;
|
|
11227
|
-
}
|
|
11228
11254
|
function sg(e) {
|
|
11229
|
-
return e.
|
|
11255
|
+
return e.type === "metric" ? 1 : e.type === "chart" ? 2 : e.type === "collection" ? Vh : 2;
|
|
11230
11256
|
}
|
|
11231
|
-
function cg(
|
|
11257
|
+
function cg(e) {
|
|
11258
|
+
return e.itemHeight && e.itemHeight > 0 ? e.itemHeight : e.rowSpan ? e.rowSpan * 48 : Wh[e.type] ?? Gh;
|
|
11259
|
+
}
|
|
11260
|
+
function lg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, readOnly: a, onDelete: o, onTransformChart: s, onAskAi: c, onAskAiTarget: l, isFullscreen: u, onFullscreenChange: d }) {
|
|
11232
11261
|
switch (e.type) {
|
|
11233
|
-
case "chart": return /* @__PURE__ */ X(
|
|
11262
|
+
case "chart": return /* @__PURE__ */ X(Th, {
|
|
11234
11263
|
item: e,
|
|
11235
11264
|
filters: t,
|
|
11236
11265
|
actions: n,
|
|
@@ -11244,7 +11273,7 @@ function cg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11244
11273
|
isFullscreen: u,
|
|
11245
11274
|
onFullscreenChange: d
|
|
11246
11275
|
});
|
|
11247
|
-
case "metric": return /* @__PURE__ */ X(
|
|
11276
|
+
case "metric": return /* @__PURE__ */ X(zh, {
|
|
11248
11277
|
item: e,
|
|
11249
11278
|
filters: t,
|
|
11250
11279
|
actions: n,
|
|
@@ -11257,7 +11286,7 @@ function cg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11257
11286
|
isFullscreen: u,
|
|
11258
11287
|
onFullscreenChange: d
|
|
11259
11288
|
});
|
|
11260
|
-
case "collection": return /* @__PURE__ */ X(
|
|
11289
|
+
case "collection": return /* @__PURE__ */ X(Ph, {
|
|
11261
11290
|
item: e,
|
|
11262
11291
|
filters: t,
|
|
11263
11292
|
actions: n,
|
|
@@ -11272,7 +11301,7 @@ function cg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11272
11301
|
});
|
|
11273
11302
|
default: {
|
|
11274
11303
|
let t = e;
|
|
11275
|
-
return /* @__PURE__ */ X(
|
|
11304
|
+
return /* @__PURE__ */ X(ah, {
|
|
11276
11305
|
title: t.title ?? "Unknown",
|
|
11277
11306
|
isLoading: !1,
|
|
11278
11307
|
error: /* @__PURE__ */ Error(`Unknown dashboard item type: "${t.type}"`),
|
|
@@ -11283,8 +11312,8 @@ function cg({ item: e, filters: t, actions: n, itemFilters: r, editMode: i, read
|
|
|
11283
11312
|
}
|
|
11284
11313
|
//#endregion
|
|
11285
11314
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/ExportDropdown/ExportDropdown.tsx
|
|
11286
|
-
function
|
|
11287
|
-
let { t: n } =
|
|
11315
|
+
function ug({ onExportExcel: e, isExporting: t }) {
|
|
11316
|
+
let { t: n } = z();
|
|
11288
11317
|
return /* @__PURE__ */ X(zi, {
|
|
11289
11318
|
items: [{
|
|
11290
11319
|
label: t ? n("ai.dataDownload.exporting") : n("ai.dataDownload.exportDashboard", { format: "Excel" }),
|
|
@@ -11296,17 +11325,17 @@ function lg({ onExportExcel: e, isExporting: t }) {
|
|
|
11296
11325
|
}
|
|
11297
11326
|
//#endregion
|
|
11298
11327
|
//#region src/blocks/OneFilterPicker/internal/ControlledOneFilterPicker.tsx
|
|
11299
|
-
function
|
|
11328
|
+
function dg(e) {
|
|
11300
11329
|
return /* @__PURE__ */ X(ns.Provider, {
|
|
11301
11330
|
value: "controlled",
|
|
11302
11331
|
children: /* @__PURE__ */ X(ws, { ...e })
|
|
11303
11332
|
});
|
|
11304
11333
|
}
|
|
11305
|
-
|
|
11334
|
+
dg.displayName = "ControlledOneFilterPicker";
|
|
11306
11335
|
//#endregion
|
|
11307
11336
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/FilterBar/FilterBar.tsx
|
|
11308
|
-
function
|
|
11309
|
-
return !e && !n ? null : /* @__PURE__ */ X(
|
|
11337
|
+
function fg({ filters: e, value: t, presets: n, presetsLoading: r, onChange: i, disabled: a }) {
|
|
11338
|
+
return !e && !n ? null : /* @__PURE__ */ X(dg, {
|
|
11310
11339
|
filters: e,
|
|
11311
11340
|
value: t,
|
|
11312
11341
|
presets: n,
|
|
@@ -11318,37 +11347,37 @@ function dg({ filters: e, value: t, presets: n, presetsLoading: r, onChange: i,
|
|
|
11318
11347
|
}
|
|
11319
11348
|
//#endregion
|
|
11320
11349
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/components/FilterBar/FilterBarSkeleton.tsx
|
|
11321
|
-
function
|
|
11350
|
+
function pg() {
|
|
11322
11351
|
return /* @__PURE__ */ Z("div", {
|
|
11323
11352
|
className: "flex items-center gap-1",
|
|
11324
11353
|
role: "status",
|
|
11325
11354
|
"aria-label": "Loading filters",
|
|
11326
11355
|
children: [
|
|
11327
|
-
/* @__PURE__ */ X(
|
|
11328
|
-
/* @__PURE__ */ X(
|
|
11329
|
-
/* @__PURE__ */ X(
|
|
11356
|
+
/* @__PURE__ */ X(gn, { className: "h-8 w-24 rounded-md" }),
|
|
11357
|
+
/* @__PURE__ */ X(gn, { className: "h-8 w-20 rounded-md" }),
|
|
11358
|
+
/* @__PURE__ */ X(gn, { className: "h-8 w-20 rounded-md" })
|
|
11330
11359
|
]
|
|
11331
11360
|
});
|
|
11332
11361
|
}
|
|
11333
11362
|
//#endregion
|
|
11334
11363
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/utils/extractColumns.ts
|
|
11335
|
-
function
|
|
11364
|
+
function mg(e) {
|
|
11336
11365
|
if (e.length === 0) return [];
|
|
11337
11366
|
let t = e[0];
|
|
11338
11367
|
return Object.keys(t).filter((e) => typeof e == "string" && !e.startsWith("_"));
|
|
11339
11368
|
}
|
|
11340
11369
|
//#endregion
|
|
11341
11370
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/hooks/useDashboardExport.ts
|
|
11342
|
-
function
|
|
11371
|
+
function hg(e, t) {
|
|
11343
11372
|
return e.useDashboardFilters === !1 ? {} : t;
|
|
11344
11373
|
}
|
|
11345
|
-
async function
|
|
11374
|
+
async function gg(e, t) {
|
|
11346
11375
|
if (e.length === 0) return null;
|
|
11347
11376
|
let n = await Promise.all(e.map(async (e) => {
|
|
11348
11377
|
try {
|
|
11349
11378
|
return {
|
|
11350
11379
|
item: e,
|
|
11351
|
-
data: await e.fetchData(
|
|
11380
|
+
data: await e.fetchData(hg(e, t))
|
|
11352
11381
|
};
|
|
11353
11382
|
} catch (t) {
|
|
11354
11383
|
return console.warn(`[useDashboardExport] Failed to export metric "${e.title}":`, t), null;
|
|
@@ -11372,14 +11401,14 @@ async function hg(e, t) {
|
|
|
11372
11401
|
rows: r
|
|
11373
11402
|
};
|
|
11374
11403
|
}
|
|
11375
|
-
async function
|
|
11376
|
-
let n = [], r = await
|
|
11404
|
+
async function _g(e, t) {
|
|
11405
|
+
let n = [], r = await gg(e.filter((e) => e.type === "metric"), t);
|
|
11377
11406
|
r && n.push(r);
|
|
11378
11407
|
let i = e.filter((e) => e.type !== "metric").map(async (e) => {
|
|
11379
11408
|
if (e.type === "chart") try {
|
|
11380
|
-
let n = await e.fetchData(
|
|
11381
|
-
if (!
|
|
11382
|
-
let r =
|
|
11409
|
+
let n = await e.fetchData(hg(e, t));
|
|
11410
|
+
if (!vm(e.chart)) return console.warn(`[useDashboardExport] Skipped chart "${e.title}": unsupported chart type`), null;
|
|
11411
|
+
let r = Pm(e.chart, n);
|
|
11383
11412
|
return {
|
|
11384
11413
|
name: e.title,
|
|
11385
11414
|
columns: r.columns,
|
|
@@ -11390,7 +11419,7 @@ async function gg(e, t) {
|
|
|
11390
11419
|
return console.warn(`[useDashboardExport] Failed to export chart "${e.title}":`, t), null;
|
|
11391
11420
|
}
|
|
11392
11421
|
if (e.type === "collection") try {
|
|
11393
|
-
let n = await e.createSource(
|
|
11422
|
+
let n = await e.createSource(hg(e, t)).dataAdapter.fetchData({
|
|
11394
11423
|
filters: {},
|
|
11395
11424
|
sortings: [],
|
|
11396
11425
|
pagination: {
|
|
@@ -11399,16 +11428,16 @@ async function gg(e, t) {
|
|
|
11399
11428
|
}
|
|
11400
11429
|
}), r = "records" in n ? n.records : n;
|
|
11401
11430
|
if (r.length === 0) return null;
|
|
11402
|
-
let i =
|
|
11431
|
+
let i = Gm(e.title, e.description), a = Eh(e.visualizations);
|
|
11403
11432
|
return a.length > 0 ? {
|
|
11404
11433
|
name: e.title,
|
|
11405
11434
|
columns: a.map((e) => e.label),
|
|
11406
11435
|
keys: a.map((e) => e.id),
|
|
11407
|
-
rows:
|
|
11436
|
+
rows: Dh(r, a),
|
|
11408
11437
|
preamble: i
|
|
11409
11438
|
} : {
|
|
11410
11439
|
name: e.title,
|
|
11411
|
-
columns:
|
|
11440
|
+
columns: mg(r),
|
|
11412
11441
|
rows: r,
|
|
11413
11442
|
preamble: i
|
|
11414
11443
|
};
|
|
@@ -11420,7 +11449,7 @@ async function gg(e, t) {
|
|
|
11420
11449
|
for (let e of a) e && n.push(e);
|
|
11421
11450
|
return n;
|
|
11422
11451
|
}
|
|
11423
|
-
function
|
|
11452
|
+
function vg({ items: e, filters: t, filename: n = "dashboard" }) {
|
|
11424
11453
|
let [r, i] = J(!1), a = q(e);
|
|
11425
11454
|
a.current = e;
|
|
11426
11455
|
let o = q(t);
|
|
@@ -11430,8 +11459,8 @@ function _g({ items: e, filters: t, filename: n = "dashboard" }) {
|
|
|
11430
11459
|
exportAsExcel: W(async () => {
|
|
11431
11460
|
i(!0);
|
|
11432
11461
|
try {
|
|
11433
|
-
let e = await
|
|
11434
|
-
e.length > 0 && await
|
|
11462
|
+
let e = await _g(a.current, o.current);
|
|
11463
|
+
e.length > 0 && await Xm(e, s.current);
|
|
11435
11464
|
} finally {
|
|
11436
11465
|
i(!1);
|
|
11437
11466
|
}
|
|
@@ -11441,17 +11470,17 @@ function _g({ items: e, filters: t, filename: n = "dashboard" }) {
|
|
|
11441
11470
|
}
|
|
11442
11471
|
//#endregion
|
|
11443
11472
|
//#region src/domains/platform/ai/analytics/F0AnalyticsDashboard/F0AnalyticsDashboard.tsx
|
|
11444
|
-
var
|
|
11445
|
-
let y =
|
|
11473
|
+
var yg = ({ 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 }) => {
|
|
11474
|
+
let y = z(), [b = {}, x] = ec({
|
|
11446
11475
|
prop: r,
|
|
11447
11476
|
defaultProp: n ?? {},
|
|
11448
11477
|
onChange: i
|
|
11449
11478
|
}), S = K(() => {
|
|
11450
11479
|
if (!_) return {};
|
|
11451
11480
|
let e = {};
|
|
11452
|
-
for (let [t, n] of Object.entries(_)) e[t] =
|
|
11481
|
+
for (let [t, n] of Object.entries(_)) e[t] = ve[n.type].valueConverter?.(n.defaultValue, n, y) ?? n.defaultValue;
|
|
11453
11482
|
return e;
|
|
11454
|
-
}, []), [C, w] = J(S), { exportAsExcel: T, isExporting: E } =
|
|
11483
|
+
}, []), [C, w] = J(S), { exportAsExcel: T, isExporting: E } = vg({
|
|
11455
11484
|
items: a,
|
|
11456
11485
|
filters: b,
|
|
11457
11486
|
filename: d
|
|
@@ -11471,28 +11500,28 @@ var vg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11471
11500
|
className: "flex items-center justify-between gap-4 px-5",
|
|
11472
11501
|
children: [/* @__PURE__ */ X("div", {
|
|
11473
11502
|
className: "w-full",
|
|
11474
|
-
children: e ? /* @__PURE__ */ X(
|
|
11503
|
+
children: e ? /* @__PURE__ */ X(fg, {
|
|
11475
11504
|
filters: e,
|
|
11476
11505
|
value: b,
|
|
11477
11506
|
presets: t,
|
|
11478
11507
|
onChange: x,
|
|
11479
11508
|
disabled: c
|
|
11480
|
-
}) : v ? /* @__PURE__ */ X(
|
|
11509
|
+
}) : v ? /* @__PURE__ */ X(pg, {}) : null
|
|
11481
11510
|
}), /* @__PURE__ */ Z("div", {
|
|
11482
11511
|
className: "flex shrink-0 items-center gap-2",
|
|
11483
|
-
children: [_ ? /* @__PURE__ */ X(
|
|
11512
|
+
children: [_ ? /* @__PURE__ */ X(se, {
|
|
11484
11513
|
navigationFilters: _,
|
|
11485
11514
|
currentNavigationFilters: C,
|
|
11486
11515
|
onChangeNavigationFilters: w,
|
|
11487
11516
|
disabled: c
|
|
11488
|
-
}) : null, u ? /* @__PURE__ */ X(
|
|
11517
|
+
}) : null, u ? /* @__PURE__ */ X(ug, {
|
|
11489
11518
|
onExportExcel: T,
|
|
11490
11519
|
isExporting: E
|
|
11491
11520
|
}) : null]
|
|
11492
11521
|
})]
|
|
11493
11522
|
}) : null, /* @__PURE__ */ X("div", {
|
|
11494
11523
|
className: B("px-5", j && "flex min-h-0 flex-1 flex-col pb-5"),
|
|
11495
|
-
children: /* @__PURE__ */ X(
|
|
11524
|
+
children: /* @__PURE__ */ X(Jh, {
|
|
11496
11525
|
items: a,
|
|
11497
11526
|
itemFilters: c ? void 0 : o,
|
|
11498
11527
|
filters: {
|
|
@@ -11511,17 +11540,17 @@ var vg = ({ filters: e, presets: t, defaultFilters: n, filtersValue: r, onFilter
|
|
|
11511
11540
|
})]
|
|
11512
11541
|
});
|
|
11513
11542
|
};
|
|
11514
|
-
|
|
11515
|
-
var
|
|
11516
|
-
process.env.NODE_ENV !== "production" && (
|
|
11517
|
-
function
|
|
11518
|
-
let e = U.useContext(
|
|
11543
|
+
yg.displayName = "F0AnalyticsDashboard";
|
|
11544
|
+
var bg = hn("F0AnalyticsDashboard", yg), xg = () => Jn("(min-width: 640px)", { initializeWithValue: !1 }), Sg = () => Jn("(max-width: 639px)", { initializeWithValue: !1 }), Cg = /*#__PURE__*/ U.createContext(void 0);
|
|
11545
|
+
process.env.NODE_ENV !== "production" && (Cg.displayName = "ToastContext");
|
|
11546
|
+
function wg() {
|
|
11547
|
+
let e = U.useContext(Cg);
|
|
11519
11548
|
if (!e) throw Error(process.env.NODE_ENV === "production" ? Tn(73) : "Base UI: useToastManager must be used within <Toast.Provider>.");
|
|
11520
11549
|
return e;
|
|
11521
11550
|
}
|
|
11522
11551
|
//#endregion
|
|
11523
11552
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/utils/resolvePromiseOptions.mjs
|
|
11524
|
-
function
|
|
11553
|
+
function Tg(e, t) {
|
|
11525
11554
|
if (typeof e == "string") return { description: e };
|
|
11526
11555
|
if (typeof e == "function") {
|
|
11527
11556
|
let n = e(t);
|
|
@@ -11531,7 +11560,7 @@ function wg(e, t) {
|
|
|
11531
11560
|
}
|
|
11532
11561
|
//#endregion
|
|
11533
11562
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/store.mjs
|
|
11534
|
-
function
|
|
11563
|
+
function Eg(e) {
|
|
11535
11564
|
let t = /* @__PURE__ */ new Map(), n = 0, r = 0;
|
|
11536
11565
|
return e.forEach((e, i) => {
|
|
11537
11566
|
let a = e.transitionStatus === "ending";
|
|
@@ -11543,7 +11572,7 @@ function Tg(e) {
|
|
|
11543
11572
|
}), r += e.height || 0, a || (n += 1);
|
|
11544
11573
|
}), t;
|
|
11545
11574
|
}
|
|
11546
|
-
function
|
|
11575
|
+
function Dg(e, t) {
|
|
11547
11576
|
let n = 0;
|
|
11548
11577
|
return e.map((e) => {
|
|
11549
11578
|
if (e.transitionStatus === "ending") return e;
|
|
@@ -11554,7 +11583,7 @@ function Eg(e, t) {
|
|
|
11554
11583
|
};
|
|
11555
11584
|
});
|
|
11556
11585
|
}
|
|
11557
|
-
var
|
|
11586
|
+
var Og = {
|
|
11558
11587
|
toasts: (e) => e.toasts,
|
|
11559
11588
|
isEmpty: (e) => e.toasts.length === 0,
|
|
11560
11589
|
toast: (e, t) => e.toastMetadata.get(t)?.value,
|
|
@@ -11565,14 +11594,14 @@ var Dg = {
|
|
|
11565
11594
|
expanded: (e) => e.hovering || e.focused,
|
|
11566
11595
|
expandedOrOutOfFocus: (e) => e.hovering || e.focused || !e.isWindowFocused,
|
|
11567
11596
|
prevFocusElement: (e) => e.prevFocusElement
|
|
11568
|
-
},
|
|
11597
|
+
}, kg = class extends In {
|
|
11569
11598
|
timers = /* @__PURE__ */ new Map();
|
|
11570
11599
|
areTimersPaused = !1;
|
|
11571
11600
|
constructor(e) {
|
|
11572
11601
|
super({
|
|
11573
11602
|
...e,
|
|
11574
|
-
toastMetadata:
|
|
11575
|
-
}, {},
|
|
11603
|
+
toastMetadata: Eg(e.toasts)
|
|
11604
|
+
}, {}, Og);
|
|
11576
11605
|
}
|
|
11577
11606
|
setViewport = (e) => {
|
|
11578
11607
|
this.set("viewport", e);
|
|
@@ -11585,8 +11614,8 @@ var Dg = {
|
|
|
11585
11614
|
limit: t
|
|
11586
11615
|
};
|
|
11587
11616
|
if (n) {
|
|
11588
|
-
let e =
|
|
11589
|
-
r.toasts = e, r.toastMetadata =
|
|
11617
|
+
let e = Dg(this.state.toasts, t);
|
|
11618
|
+
r.toasts = e, r.toastMetadata = Eg(e);
|
|
11590
11619
|
}
|
|
11591
11620
|
this.update(r);
|
|
11592
11621
|
}
|
|
@@ -11596,7 +11625,7 @@ var Dg = {
|
|
|
11596
11625
|
}), this.timers.clear();
|
|
11597
11626
|
};
|
|
11598
11627
|
removeToast(e, t = !1) {
|
|
11599
|
-
let n =
|
|
11628
|
+
let n = Og.toastIndex(this.state, e);
|
|
11600
11629
|
if (n === -1) return;
|
|
11601
11630
|
let r = this.state.toasts[n];
|
|
11602
11631
|
t || r?.onRemove?.();
|
|
@@ -11604,9 +11633,9 @@ var Dg = {
|
|
|
11604
11633
|
i.splice(n, 1), this.setToasts(i);
|
|
11605
11634
|
}
|
|
11606
11635
|
addToast = (e) => {
|
|
11607
|
-
let { timeout: t, limit: n } = this.state, r = e.id ||
|
|
11636
|
+
let { timeout: t, limit: n } = this.state, r = e.id || it("toast");
|
|
11608
11637
|
if (e.id) {
|
|
11609
|
-
let t =
|
|
11638
|
+
let t = Og.toast(this.state, e.id);
|
|
11610
11639
|
if (t) {
|
|
11611
11640
|
if (t.transitionStatus === "ending") this.removeToast(e.id, !0);
|
|
11612
11641
|
else {
|
|
@@ -11621,16 +11650,16 @@ var Dg = {
|
|
|
11621
11650
|
updateKey: 0,
|
|
11622
11651
|
transitionStatus: "starting"
|
|
11623
11652
|
}, a = [i, ...this.state.toasts];
|
|
11624
|
-
this.setToasts(
|
|
11653
|
+
this.setToasts(Dg(a, n));
|
|
11625
11654
|
let o = i.timeout ?? t;
|
|
11626
|
-
return i.type !== "loading" && o > 0 && this.scheduleTimer(r, o, () => this.closeToast(r)),
|
|
11655
|
+
return i.type !== "loading" && o > 0 && this.scheduleTimer(r, o, () => this.closeToast(r)), Og.expandedOrOutOfFocus(this.state) && this.pauseTimers(), r;
|
|
11627
11656
|
};
|
|
11628
11657
|
updateToast = (e, t) => {
|
|
11629
|
-
let n =
|
|
11658
|
+
let n = Og.toast(this.state, e);
|
|
11630
11659
|
n && n.transitionStatus !== "ending" && this.updateToastInternal(e, typeof t == "function" ? t(n) : t, !1, !0);
|
|
11631
11660
|
};
|
|
11632
11661
|
updateToastInternal = (e, t, n = !1, r = !1) => {
|
|
11633
|
-
let { timeout: i, toasts: a } = this.state, o =
|
|
11662
|
+
let { timeout: i, toasts: a } = this.state, o = Og.toast(this.state, e);
|
|
11634
11663
|
if (!o || o.transitionStatus === "ending") return;
|
|
11635
11664
|
let s = {
|
|
11636
11665
|
...o,
|
|
@@ -11639,17 +11668,17 @@ var Dg = {
|
|
|
11639
11668
|
};
|
|
11640
11669
|
this.setToasts(a.map((t) => t.id === e ? s : t));
|
|
11641
11670
|
let c = s.timeout ?? i, l = o.timeout ?? i, u = Object.hasOwn(t, "timeout"), d = s.transitionStatus !== "ending" && s.type !== "loading" && c > 0, f = this.timers.has(e), p = l !== c, m = o.type === "loading";
|
|
11642
|
-
!d && f ? this.clearTimer(e) : d && (!f || p || u || m || n) && (this.clearTimer(e), this.scheduleTimer(e, c, () => this.closeToast(e)),
|
|
11671
|
+
!d && f ? this.clearTimer(e) : d && (!f || p || u || m || n) && (this.clearTimer(e), this.scheduleTimer(e, c, () => this.closeToast(e)), Og.expandedOrOutOfFocus(this.state) && this.pauseTimers());
|
|
11643
11672
|
};
|
|
11644
11673
|
closeToast = (e) => {
|
|
11645
11674
|
let t = e === void 0, { limit: n, toasts: r } = this.state, i;
|
|
11646
11675
|
if (t) i = r, this.clearTimers();
|
|
11647
11676
|
else {
|
|
11648
|
-
let t =
|
|
11677
|
+
let t = Og.toast(this.state, e);
|
|
11649
11678
|
if (!t) return;
|
|
11650
11679
|
i = [t], this.clearTimer(e);
|
|
11651
11680
|
}
|
|
11652
|
-
let a =
|
|
11681
|
+
let a = Dg(r.map((n) => t || n.id === e ? {
|
|
11653
11682
|
...n,
|
|
11654
11683
|
transitionStatus: "ending",
|
|
11655
11684
|
height: 0
|
|
@@ -11659,18 +11688,18 @@ var Dg = {
|
|
|
11659
11688
|
}), this.handleFocusManagement(e);
|
|
11660
11689
|
};
|
|
11661
11690
|
promiseToast = (e, t) => {
|
|
11662
|
-
let n =
|
|
11691
|
+
let n = Tg(t.loading), r = this.addToast({
|
|
11663
11692
|
...n,
|
|
11664
11693
|
type: "loading"
|
|
11665
11694
|
}), i = e.then((e) => {
|
|
11666
|
-
let n =
|
|
11695
|
+
let n = Tg(t.success, e);
|
|
11667
11696
|
return this.updateToast(r, {
|
|
11668
11697
|
...n,
|
|
11669
11698
|
type: "success",
|
|
11670
11699
|
timeout: n.timeout
|
|
11671
11700
|
}), e;
|
|
11672
11701
|
}).catch((e) => {
|
|
11673
|
-
let n =
|
|
11702
|
+
let n = Tg(t.error, e);
|
|
11674
11703
|
return this.updateToast(r, {
|
|
11675
11704
|
...n,
|
|
11676
11705
|
type: "error",
|
|
@@ -11703,7 +11732,7 @@ var Dg = {
|
|
|
11703
11732
|
}));
|
|
11704
11733
|
};
|
|
11705
11734
|
scheduleTimer(e, t, n) {
|
|
11706
|
-
let r = Date.now(), i =
|
|
11735
|
+
let r = Date.now(), i = Og.expandedOrOutOfFocus(this.state) ? void 0 : Pn.create();
|
|
11707
11736
|
i?.start(t, () => {
|
|
11708
11737
|
this.handleTimerFired(e), n();
|
|
11709
11738
|
}), this.timers.set(e, {
|
|
@@ -11731,7 +11760,7 @@ var Dg = {
|
|
|
11731
11760
|
setToasts(e, t = e.length === 0) {
|
|
11732
11761
|
let n = {
|
|
11733
11762
|
toasts: e,
|
|
11734
|
-
toastMetadata:
|
|
11763
|
+
toastMetadata: Eg(e)
|
|
11735
11764
|
};
|
|
11736
11765
|
t && (n.hovering = !1, n.focused = !1), this.update(n);
|
|
11737
11766
|
}
|
|
@@ -11742,14 +11771,14 @@ var Dg = {
|
|
|
11742
11771
|
this.restoreFocusToPrevElement();
|
|
11743
11772
|
return;
|
|
11744
11773
|
}
|
|
11745
|
-
let n =
|
|
11774
|
+
let n = Og.toasts(this.state), r = Og.toastIndex(this.state, e), i = (e, t) => {
|
|
11746
11775
|
for (let r = e; r >= 0 && r < n.length; r += t) if (n[r].transitionStatus !== "ending") return n[r];
|
|
11747
11776
|
return null;
|
|
11748
11777
|
}, a = i(r + 1, 1) ?? i(r - 1, -1);
|
|
11749
11778
|
a ? a.ref?.current?.focus() : this.restoreFocusToPrevElement();
|
|
11750
11779
|
}
|
|
11751
|
-
},
|
|
11752
|
-
let { children: t, timeout: n = 5e3, limit: r = 3, toastManager: i } = e, a = xn(() => new
|
|
11780
|
+
}, Ag = function(e) {
|
|
11781
|
+
let { children: t, timeout: n = 5e3, limit: r = 3, toastManager: i } = e, a = xn(() => new kg({
|
|
11753
11782
|
timeout: n,
|
|
11754
11783
|
limit: r,
|
|
11755
11784
|
viewport: null,
|
|
@@ -11764,17 +11793,17 @@ var Dg = {
|
|
|
11764
11793
|
let n = t.id;
|
|
11765
11794
|
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);
|
|
11766
11795
|
});
|
|
11767
|
-
}, [a, i]), /*#__PURE__*/ Z(
|
|
11796
|
+
}, [a, i]), /*#__PURE__*/ Z(Cg.Provider, {
|
|
11768
11797
|
value: a,
|
|
11769
|
-
children: [/*#__PURE__*/ X(
|
|
11798
|
+
children: [/*#__PURE__*/ X(jg, {
|
|
11770
11799
|
store: a,
|
|
11771
11800
|
timeout: n,
|
|
11772
11801
|
limit: r
|
|
11773
11802
|
}), t]
|
|
11774
11803
|
});
|
|
11775
11804
|
};
|
|
11776
|
-
process.env.NODE_ENV !== "production" && (
|
|
11777
|
-
function
|
|
11805
|
+
process.env.NODE_ENV !== "production" && (Ag.displayName = "ToastProvider");
|
|
11806
|
+
function jg(e) {
|
|
11778
11807
|
let { store: t, timeout: n, limit: r } = e;
|
|
11779
11808
|
return bn(() => {
|
|
11780
11809
|
t.syncProviderProps(n, r);
|
|
@@ -11786,8 +11815,8 @@ function Ag(e) {
|
|
|
11786
11815
|
}
|
|
11787
11816
|
//#endregion
|
|
11788
11817
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/viewport/ToastViewportCssVars.mjs
|
|
11789
|
-
var
|
|
11790
|
-
let { render: n, className: r, style: i, children: a, ...o } = e, s =
|
|
11818
|
+
var Mg = "--toast-frontmost-height", Ng = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
11819
|
+
let { render: n, className: r, style: i, children: a, ...o } = e, s = wg(), c = Sn(), 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");
|
|
11791
11820
|
U.useEffect(() => {
|
|
11792
11821
|
let e = s.state.viewport;
|
|
11793
11822
|
if (!e || f) return;
|
|
@@ -11859,7 +11888,7 @@ var jg = "--toast-frontmost-height", Mg = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
11859
11888
|
onPointerDown: E,
|
|
11860
11889
|
onPointerUp: D,
|
|
11861
11890
|
onPointerCancel: D,
|
|
11862
|
-
style: { [
|
|
11891
|
+
style: { [Mg]: _ ? `${_}px` : void 0 }
|
|
11863
11892
|
}, j = { expanded: h }, M = !f && g && /*#__PURE__*/ X(On, { onFocus: b }), N = Ln("div", e, {
|
|
11864
11893
|
ref: [t, s.setViewport],
|
|
11865
11894
|
state: j,
|
|
@@ -11886,19 +11915,19 @@ var jg = "--toast-frontmost-height", Mg = /*#__PURE__*/ U.forwardRef(function(e,
|
|
|
11886
11915
|
})
|
|
11887
11916
|
] });
|
|
11888
11917
|
});
|
|
11889
|
-
process.env.NODE_ENV !== "production" && (
|
|
11918
|
+
process.env.NODE_ENV !== "production" && (Ng.displayName = "ToastViewport");
|
|
11890
11919
|
//#endregion
|
|
11891
11920
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/root/ToastRootContext.mjs
|
|
11892
|
-
var
|
|
11893
|
-
process.env.NODE_ENV !== "production" && (
|
|
11894
|
-
function
|
|
11895
|
-
let e = U.useContext(
|
|
11921
|
+
var Pg = /*#__PURE__*/ U.createContext(void 0);
|
|
11922
|
+
process.env.NODE_ENV !== "production" && (Pg.displayName = "ToastRootContext");
|
|
11923
|
+
function Fg() {
|
|
11924
|
+
let e = U.useContext(Pg);
|
|
11896
11925
|
if (!e) throw Error(process.env.NODE_ENV === "production" ? Tn(66) : "Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.");
|
|
11897
11926
|
return e;
|
|
11898
11927
|
}
|
|
11899
11928
|
//#endregion
|
|
11900
11929
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/utils/getElementTransform.mjs
|
|
11901
|
-
function
|
|
11930
|
+
function Ig(e, t) {
|
|
11902
11931
|
let n = (t ?? _n(e).getComputedStyle(e)).transform, r = 0, i = 0, a = 1;
|
|
11903
11932
|
if (n && n !== "none") {
|
|
11904
11933
|
let e = n.match(/matrix(?:3d)?\(([^)]+)\)/);
|
|
@@ -11915,7 +11944,7 @@ function Fg(e, t) {
|
|
|
11915
11944
|
}
|
|
11916
11945
|
//#endregion
|
|
11917
11946
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/utils/useSwipeDismiss.mjs
|
|
11918
|
-
function
|
|
11947
|
+
function Lg(e, t, n) {
|
|
11919
11948
|
switch (e) {
|
|
11920
11949
|
case "up": return -n;
|
|
11921
11950
|
case "down": return n;
|
|
@@ -11926,15 +11955,15 @@ function Ig(e, t, n) {
|
|
|
11926
11955
|
}
|
|
11927
11956
|
//#endregion
|
|
11928
11957
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/root/ToastRootCssVars.mjs
|
|
11929
|
-
var
|
|
11958
|
+
var Rg = "--toast-index", zg = "--toast-offset-y", Bg = "--toast-height", Vg = "--toast-swipe-movement-x", Hg = "--toast-swipe-movement-y", Ug = "data-swipe-direction", Wg = {
|
|
11930
11959
|
...Bn,
|
|
11931
11960
|
swipeDirection(e) {
|
|
11932
|
-
return e ? { [
|
|
11961
|
+
return e ? { [Ug]: e } : null;
|
|
11933
11962
|
}
|
|
11934
|
-
},
|
|
11963
|
+
}, Gg = 40, Kg = 10, qg = .5, Jg = 1, Yg = `${jn},${Rn}`, Xg = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
11935
11964
|
let { toast: n, render: r, className: i, swipeDirection: a = ["down", "right"], style: o, ...s } = e, c = n.positionerProps?.anchor !== void 0, l = [];
|
|
11936
11965
|
c || (l = Array.isArray(a) ? a : [a]);
|
|
11937
|
-
let u = l.length > 0, d =
|
|
11966
|
+
let u = l.length > 0, d = wg(), [f, p] = U.useState(void 0), [m, h] = U.useState(!1), [g, _] = U.useState(!1), [v, y] = U.useState({
|
|
11938
11967
|
x: 0,
|
|
11939
11968
|
y: 0
|
|
11940
11969
|
}), [b, x] = U.useState({
|
|
@@ -11951,10 +11980,10 @@ var Lg = "--toast-index", Rg = "--toast-offset-y", zg = "--toast-height", Bg = "
|
|
|
11951
11980
|
}), M = U.useRef(void 0), N = U.useRef(0), P = U.useRef(!1), F = U.useRef({
|
|
11952
11981
|
x: 0,
|
|
11953
11982
|
y: 0
|
|
11954
|
-
}),
|
|
11983
|
+
}), I = U.useRef(!1), ee = U.useRef({
|
|
11955
11984
|
x: 0,
|
|
11956
11985
|
y: 0
|
|
11957
|
-
}),
|
|
11986
|
+
}), te = U.useRef(null), L = U.useRef(null), ne = d.useState("toastIndex", n.id), re = d.useState("toastVisibleIndex", n.id), ie = d.useState("toastOffsetY", n.id), ae = d.useState("focused"), oe = d.useState("expanded");
|
|
11958
11987
|
An({
|
|
11959
11988
|
open: n.transitionStatus !== "ending",
|
|
11960
11989
|
ref: O,
|
|
@@ -11962,7 +11991,7 @@ var Lg = "--toast-index", Rg = "--toast-offset-y", zg = "--toast-height", Bg = "
|
|
|
11962
11991
|
n.transitionStatus === "ending" && d.removeToast(n.id);
|
|
11963
11992
|
}
|
|
11964
11993
|
});
|
|
11965
|
-
let
|
|
11994
|
+
let se = kn((e = !1) => {
|
|
11966
11995
|
let t = O.current;
|
|
11967
11996
|
if (!t) return;
|
|
11968
11997
|
let r = t.style.height;
|
|
@@ -11984,68 +12013,68 @@ var Lg = "--toast-index", Rg = "--toast-offset-y", zg = "--toast-height", Bg = "
|
|
|
11984
12013
|
x: 0,
|
|
11985
12014
|
y: 0,
|
|
11986
12015
|
scale: 1
|
|
11987
|
-
}),
|
|
12016
|
+
}), ce({
|
|
11988
12017
|
x: 0,
|
|
11989
12018
|
y: 0
|
|
11990
|
-
})), k.current = n.id,
|
|
12019
|
+
})), k.current = n.id, se());
|
|
11991
12020
|
}, [
|
|
11992
|
-
|
|
12021
|
+
se,
|
|
11993
12022
|
n.id,
|
|
11994
12023
|
n.transitionStatus
|
|
11995
12024
|
]);
|
|
11996
|
-
function
|
|
11997
|
-
|
|
12025
|
+
function ce(e) {
|
|
12026
|
+
ee.current = e, y(e);
|
|
11998
12027
|
}
|
|
11999
12028
|
bn(() => () => {
|
|
12000
|
-
|
|
12029
|
+
L.current?.abort();
|
|
12001
12030
|
}, []);
|
|
12002
|
-
function
|
|
12003
|
-
let n = (e) => e > 0 ? e **
|
|
12031
|
+
function le(e, t) {
|
|
12032
|
+
let n = (e) => e > 0 ? e ** qg : -(Math.abs(e) ** qg), r = e > 0 && !l.includes("right") || e < 0 && !l.includes("left"), i = t > 0 && !l.includes("down") || t < 0 && !l.includes("up");
|
|
12004
12033
|
return {
|
|
12005
12034
|
x: r ? n(e) : e,
|
|
12006
12035
|
y: i ? n(t) : t
|
|
12007
12036
|
};
|
|
12008
12037
|
}
|
|
12009
|
-
let
|
|
12010
|
-
if (e.pointerId !==
|
|
12011
|
-
|
|
12038
|
+
let ue = kn((e) => {
|
|
12039
|
+
if (e.pointerId !== te.current) return;
|
|
12040
|
+
te.current = null, L.current?.abort(), L.current = null, h(!1), _(!1), D(null);
|
|
12012
12041
|
let t = j.current;
|
|
12013
12042
|
if (e.type === "pointercancel" || P.current) {
|
|
12014
|
-
|
|
12043
|
+
ce({
|
|
12015
12044
|
x: t.x,
|
|
12016
12045
|
y: t.y
|
|
12017
12046
|
}), p(void 0);
|
|
12018
12047
|
return;
|
|
12019
12048
|
}
|
|
12020
|
-
let r =
|
|
12021
|
-
for (let e of l) if (
|
|
12049
|
+
let r = ee.current, i = r.x - t.x, a = r.y - t.y, o;
|
|
12050
|
+
for (let e of l) if (Lg(e, i, a) > Gg) {
|
|
12022
12051
|
o = e;
|
|
12023
12052
|
break;
|
|
12024
12053
|
}
|
|
12025
|
-
o ? (p(o), d.closeToast(n.id)) : (
|
|
12054
|
+
o ? (p(o), d.closeToast(n.id)) : (ce({
|
|
12026
12055
|
x: t.x,
|
|
12027
12056
|
y: t.y
|
|
12028
12057
|
}), p(void 0));
|
|
12029
12058
|
});
|
|
12030
|
-
function
|
|
12031
|
-
if (e.button !== 0 || (e.pointerType === "touch" && d.pauseTimers(), Fn(e.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${
|
|
12032
|
-
P.current = !1, M.current = void 0, N.current = 0,
|
|
12059
|
+
function de(e) {
|
|
12060
|
+
if (e.button !== 0 || (e.pointerType === "touch" && d.pauseTimers(), Fn(e.nativeEvent)?.closest(`button,a,input,textarea,[role="button"],${Yg}`))) return;
|
|
12061
|
+
P.current = !1, M.current = void 0, N.current = 0, te.current = e.pointerId, A.current = {
|
|
12033
12062
|
x: e.clientX,
|
|
12034
12063
|
y: e.clientY
|
|
12035
12064
|
}, F.current = A.current;
|
|
12036
|
-
let t = e.currentTarget, n =
|
|
12037
|
-
j.current = n, x(n),
|
|
12065
|
+
let t = e.currentTarget, n = Ig(t);
|
|
12066
|
+
j.current = n, x(n), ce({
|
|
12038
12067
|
x: n.x,
|
|
12039
12068
|
y: n.y
|
|
12040
|
-
}), d.set("hovering", !0), h(!0), _(!1), D(null),
|
|
12069
|
+
}), d.set("hovering", !0), h(!0), _(!1), D(null), I.current = !0, L.current?.abort();
|
|
12041
12070
|
let r = new AbortController();
|
|
12042
|
-
|
|
12071
|
+
L.current = r;
|
|
12043
12072
|
let i = Hn(t);
|
|
12044
|
-
i.addEventListener("pointerup",
|
|
12073
|
+
i.addEventListener("pointerup", ue, { signal: r.signal }), i.addEventListener("pointercancel", ue, { signal: r.signal }), t.setPointerCapture?.(e.pointerId);
|
|
12045
12074
|
}
|
|
12046
|
-
function
|
|
12047
|
-
if (e.pointerId !==
|
|
12048
|
-
e.preventDefault(),
|
|
12075
|
+
function fe(e) {
|
|
12076
|
+
if (e.pointerId !== te.current) return;
|
|
12077
|
+
e.preventDefault(), I.current &&= (A.current = {
|
|
12049
12078
|
x: e.clientX,
|
|
12050
12079
|
y: e.clientY
|
|
12051
12080
|
}, !1);
|
|
@@ -12058,24 +12087,24 @@ var Lg = "--toast-index", Rg = "--toast-offset-y", zg = "--toast-height", Bg = "
|
|
|
12058
12087
|
y: F.current.y
|
|
12059
12088
|
});
|
|
12060
12089
|
let a = n - A.current.x, o = t - A.current.y, s = t - F.current.y, c = n - F.current.x, u = E;
|
|
12061
|
-
if (!g && Math.sqrt(a * a + o * o) >=
|
|
12090
|
+
if (!g && Math.sqrt(a * a + o * o) >= Jg) {
|
|
12062
12091
|
_(!0);
|
|
12063
12092
|
let e = l.includes("left") || l.includes("right"), t = l.includes("up") || l.includes("down");
|
|
12064
12093
|
e && t && (u = Math.abs(a) > Math.abs(o) ? "horizontal" : "vertical", D(u));
|
|
12065
12094
|
}
|
|
12066
12095
|
let d;
|
|
12067
|
-
if (!M.current) u === "vertical" ? o > 0 ? d = "down" : o < 0 && (d = "up") : u === "horizontal" ? a > 0 ? d = "right" : a < 0 && (d = "left") : d = Math.abs(a) >= Math.abs(o) ? a > 0 ? "right" : "left" : o > 0 ? "down" : "up", d && l.includes(d) && (M.current = d, N.current =
|
|
12096
|
+
if (!M.current) u === "vertical" ? o > 0 ? d = "down" : o < 0 && (d = "up") : u === "horizontal" ? a > 0 ? d = "right" : a < 0 && (d = "left") : d = Math.abs(a) >= Math.abs(o) ? a > 0 ? "right" : "left" : o > 0 ? "down" : "up", d && l.includes(d) && (M.current = d, N.current = Lg(d, a, o), p(d));
|
|
12068
12097
|
else {
|
|
12069
|
-
let e = M.current, t =
|
|
12070
|
-
t >
|
|
12098
|
+
let e = M.current, t = Lg(e, c, s);
|
|
12099
|
+
t > Gg ? (P.current = !1, p(e)) : !(l.includes("left") && l.includes("right")) && !(l.includes("up") && l.includes("down")) && N.current - t >= Kg && (P.current = !0);
|
|
12071
12100
|
}
|
|
12072
|
-
let f =
|
|
12073
|
-
u !== "vertical" && v && (m += f.x), u !== "horizontal" && y && (h += f.y),
|
|
12101
|
+
let f = le(a, o), m = j.current.x, h = j.current.y, v = l.includes("left") || l.includes("right"), y = l.includes("up") || l.includes("down");
|
|
12102
|
+
u !== "vertical" && v && (m += f.x), u !== "horizontal" && y && (h += f.y), ce({
|
|
12074
12103
|
x: m,
|
|
12075
12104
|
y: h
|
|
12076
12105
|
});
|
|
12077
12106
|
}
|
|
12078
|
-
function
|
|
12107
|
+
function pe(e) {
|
|
12079
12108
|
if (e.key === "Escape") {
|
|
12080
12109
|
if (!O.current || !wn(O.current, yn(Hn(O.current)))) return;
|
|
12081
12110
|
d.closeToast(n.id);
|
|
@@ -12085,75 +12114,75 @@ var Lg = "--toast-index", Rg = "--toast-offset-y", zg = "--toast-height", Bg = "
|
|
|
12085
12114
|
let e = O.current;
|
|
12086
12115
|
if (!u || !e) return;
|
|
12087
12116
|
function t(t) {
|
|
12088
|
-
|
|
12117
|
+
te.current !== null && wn(e, Fn(t)) && t.preventDefault();
|
|
12089
12118
|
}
|
|
12090
12119
|
return Dn(e, "touchmove", t, { passive: !1 });
|
|
12091
12120
|
}, [u]);
|
|
12092
|
-
function
|
|
12121
|
+
function me() {
|
|
12093
12122
|
let e = v.x - b.x, t = v.y - b.y;
|
|
12094
12123
|
return {
|
|
12095
12124
|
transition: m ? "none" : void 0,
|
|
12096
12125
|
transform: m ? `translateX(${v.x}px) translateY(${v.y}px) scale(${b.scale})` : void 0,
|
|
12097
|
-
[
|
|
12098
|
-
[
|
|
12126
|
+
[Vg]: `${e}px`,
|
|
12127
|
+
[Hg]: `${t}px`
|
|
12099
12128
|
};
|
|
12100
12129
|
}
|
|
12101
|
-
let
|
|
12102
|
-
role:
|
|
12130
|
+
let he = n.priority === "high", ge = {
|
|
12131
|
+
role: he ? "alertdialog" : "dialog",
|
|
12103
12132
|
tabIndex: 0,
|
|
12104
12133
|
"aria-modal": !1,
|
|
12105
12134
|
"aria-labelledby": S,
|
|
12106
12135
|
"aria-describedby": w,
|
|
12107
|
-
"aria-hidden":
|
|
12108
|
-
onPointerDown: u ?
|
|
12109
|
-
onPointerMove: u ?
|
|
12110
|
-
onPointerUp: u ?
|
|
12111
|
-
onPointerCancel: u ?
|
|
12112
|
-
onKeyDown:
|
|
12136
|
+
"aria-hidden": he && !ae ? !0 : void 0,
|
|
12137
|
+
onPointerDown: u ? de : void 0,
|
|
12138
|
+
onPointerMove: u ? fe : void 0,
|
|
12139
|
+
onPointerUp: u ? ue : void 0,
|
|
12140
|
+
onPointerCancel: u ? ue : void 0,
|
|
12141
|
+
onKeyDown: pe,
|
|
12113
12142
|
inert: kc(n.limited),
|
|
12114
12143
|
style: {
|
|
12115
|
-
...
|
|
12116
|
-
[
|
|
12117
|
-
[
|
|
12118
|
-
[
|
|
12144
|
+
...me(),
|
|
12145
|
+
[Rg]: n.transitionStatus === "ending" ? ne : re,
|
|
12146
|
+
[zg]: `${ie}px`,
|
|
12147
|
+
[Bg]: n.height ? `${n.height}px` : void 0
|
|
12119
12148
|
}
|
|
12120
|
-
},
|
|
12149
|
+
}, _e = U.useMemo(() => ({
|
|
12121
12150
|
toast: n,
|
|
12122
12151
|
setTitleId: C,
|
|
12123
12152
|
setDescriptionId: T,
|
|
12124
|
-
recalculateHeight:
|
|
12125
|
-
visibleIndex:
|
|
12126
|
-
expanded:
|
|
12153
|
+
recalculateHeight: se,
|
|
12154
|
+
visibleIndex: re,
|
|
12155
|
+
expanded: oe
|
|
12127
12156
|
}), [
|
|
12128
12157
|
n,
|
|
12129
12158
|
C,
|
|
12130
12159
|
T,
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
]),
|
|
12160
|
+
se,
|
|
12161
|
+
re,
|
|
12162
|
+
oe
|
|
12163
|
+
]), ve = {
|
|
12135
12164
|
transitionStatus: n.transitionStatus,
|
|
12136
|
-
expanded:
|
|
12165
|
+
expanded: oe,
|
|
12137
12166
|
limited: n.limited || !1,
|
|
12138
12167
|
type: n.type,
|
|
12139
12168
|
swiping: m,
|
|
12140
12169
|
swipeDirection: f
|
|
12141
|
-
},
|
|
12170
|
+
}, ye = Ln("div", e, {
|
|
12142
12171
|
ref: [t, O],
|
|
12143
|
-
state:
|
|
12144
|
-
stateAttributesMapping:
|
|
12145
|
-
props: [
|
|
12172
|
+
state: ve,
|
|
12173
|
+
stateAttributesMapping: Wg,
|
|
12174
|
+
props: [ge, s]
|
|
12146
12175
|
});
|
|
12147
|
-
return /*#__PURE__*/ X(
|
|
12148
|
-
value:
|
|
12149
|
-
children:
|
|
12176
|
+
return /*#__PURE__*/ X(Pg.Provider, {
|
|
12177
|
+
value: _e,
|
|
12178
|
+
children: ye
|
|
12150
12179
|
});
|
|
12151
12180
|
});
|
|
12152
|
-
process.env.NODE_ENV !== "production" && (
|
|
12181
|
+
process.env.NODE_ENV !== "production" && (Xg.displayName = "ToastRoot");
|
|
12153
12182
|
//#endregion
|
|
12154
12183
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/content/ToastContent.mjs
|
|
12155
|
-
var
|
|
12156
|
-
let { render: n, className: r, style: i, ...a } = e, { visibleIndex: o, expanded: s, recalculateHeight: c } =
|
|
12184
|
+
var Zg = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12185
|
+
let { render: n, className: r, style: i, ...a } = e, { visibleIndex: o, expanded: s, recalculateHeight: c } = Fg(), l = U.useRef(null);
|
|
12157
12186
|
return bn(() => {
|
|
12158
12187
|
c();
|
|
12159
12188
|
let e = l.current;
|
|
@@ -12175,19 +12204,19 @@ var Xg = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
|
12175
12204
|
props: a
|
|
12176
12205
|
});
|
|
12177
12206
|
});
|
|
12178
|
-
process.env.NODE_ENV !== "production" && (
|
|
12207
|
+
process.env.NODE_ENV !== "production" && (Zg.displayName = "ToastContent");
|
|
12179
12208
|
//#endregion
|
|
12180
12209
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/utils/isRenderableNode.mjs
|
|
12181
|
-
function Zg(e) {
|
|
12182
|
-
return e == null || typeof e == "boolean" || e === "" ? !1 : !Array.isArray(e) || e.some(Zg);
|
|
12183
|
-
}
|
|
12184
12210
|
function Qg(e) {
|
|
12185
|
-
return
|
|
12211
|
+
return e == null || typeof e == "boolean" || e === "" ? !1 : !Array.isArray(e) || e.some(Qg);
|
|
12212
|
+
}
|
|
12213
|
+
function $g(e) {
|
|
12214
|
+
return /*#__PURE__*/ U.isValidElement(e) && Qg(e.props.children);
|
|
12186
12215
|
}
|
|
12187
12216
|
//#endregion
|
|
12188
12217
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/utils/useToastLabelPart.mjs
|
|
12189
|
-
function
|
|
12190
|
-
let { toast: r, setTitleId: i, setDescriptionId: a } =
|
|
12218
|
+
function e_(e, t, n) {
|
|
12219
|
+
let { toast: r, setTitleId: i, setDescriptionId: a } = Fg(), o = n === "title" ? i : a, s = t ?? (n === "title" ? r.title : r.description);
|
|
12191
12220
|
return {
|
|
12192
12221
|
id: Mn(e),
|
|
12193
12222
|
children: s,
|
|
@@ -12195,8 +12224,8 @@ function $g(e, t, n) {
|
|
|
12195
12224
|
setId: o
|
|
12196
12225
|
};
|
|
12197
12226
|
}
|
|
12198
|
-
function
|
|
12199
|
-
let r =
|
|
12227
|
+
function t_(e, t, n) {
|
|
12228
|
+
let r = $g(e);
|
|
12200
12229
|
return bn(() => {
|
|
12201
12230
|
if (r) return n(t), () => {
|
|
12202
12231
|
n((e) => e === t ? void 0 : e);
|
|
@@ -12209,9 +12238,9 @@ function e_(e, t, n) {
|
|
|
12209
12238
|
}
|
|
12210
12239
|
//#endregion
|
|
12211
12240
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/description/ToastDescription.mjs
|
|
12212
|
-
var
|
|
12213
|
-
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } =
|
|
12214
|
-
return
|
|
12241
|
+
var n_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12242
|
+
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } = e_(a, o, "description");
|
|
12243
|
+
return t_(Ln("p", e, {
|
|
12215
12244
|
ref: t,
|
|
12216
12245
|
state: { type: u },
|
|
12217
12246
|
props: {
|
|
@@ -12221,12 +12250,12 @@ var t_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
|
12221
12250
|
}
|
|
12222
12251
|
}), c, d);
|
|
12223
12252
|
});
|
|
12224
|
-
process.env.NODE_ENV !== "production" && (
|
|
12253
|
+
process.env.NODE_ENV !== "production" && (n_.displayName = "ToastDescription");
|
|
12225
12254
|
//#endregion
|
|
12226
12255
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/title/ToastTitle.mjs
|
|
12227
|
-
var
|
|
12228
|
-
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } =
|
|
12229
|
-
return
|
|
12256
|
+
var r_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
12257
|
+
let { render: n, className: r, style: i, id: a, children: o, ...s } = e, { id: c, children: l, type: u, setId: d } = e_(a, o, "title");
|
|
12258
|
+
return t_(Ln("h2", e, {
|
|
12230
12259
|
ref: t,
|
|
12231
12260
|
state: { type: u },
|
|
12232
12261
|
props: {
|
|
@@ -12236,11 +12265,11 @@ var n_ = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
|
12236
12265
|
}
|
|
12237
12266
|
}), c, d);
|
|
12238
12267
|
});
|
|
12239
|
-
process.env.NODE_ENV !== "production" && (
|
|
12268
|
+
process.env.NODE_ENV !== "production" && (r_.displayName = "ToastTitle");
|
|
12240
12269
|
//#endregion
|
|
12241
12270
|
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/toast/useToastManager.mjs
|
|
12242
|
-
function
|
|
12243
|
-
let e =
|
|
12271
|
+
function i_() {
|
|
12272
|
+
let e = wg(), t = e.useState("toasts");
|
|
12244
12273
|
return U.useMemo(() => ({
|
|
12245
12274
|
toasts: t,
|
|
12246
12275
|
add: e.addToast,
|
|
@@ -12251,8 +12280,8 @@ function r_() {
|
|
|
12251
12280
|
}
|
|
12252
12281
|
//#endregion
|
|
12253
12282
|
//#region src/elements/Toast/components/ToastCloseButton.tsx
|
|
12254
|
-
var
|
|
12255
|
-
let t =
|
|
12283
|
+
var a_ = ({ onClose: e }) => {
|
|
12284
|
+
let t = z();
|
|
12256
12285
|
return /* @__PURE__ */ X("div", {
|
|
12257
12286
|
className: "dark flex-shrink-0",
|
|
12258
12287
|
children: /* @__PURE__ */ X(V, {
|
|
@@ -12264,13 +12293,13 @@ var i_ = ({ onClose: e }) => {
|
|
|
12264
12293
|
label: t.actions.close
|
|
12265
12294
|
})
|
|
12266
12295
|
});
|
|
12267
|
-
},
|
|
12296
|
+
}, o_ = ({ duration: e, color: t }) => /* @__PURE__ */ X("div", {
|
|
12268
12297
|
className: "absolute bottom-0 left-0 right-0 h-[3px] w-full overflow-hidden rounded-b-lg",
|
|
12269
12298
|
children: /* @__PURE__ */ X("div", {
|
|
12270
12299
|
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),
|
|
12271
12300
|
style: { animationDuration: `${e}ms` }
|
|
12272
12301
|
})
|
|
12273
|
-
}),
|
|
12302
|
+
}), s_ = ({ linkActions: e, buttonActions: t, onActionClick: n }) => e.length === 0 && t.length === 0 ? null : /* @__PURE__ */ Z("div", {
|
|
12274
12303
|
className: "dark flex flex-shrink-0 flex-row flex-wrap items-center gap-3",
|
|
12275
12304
|
children: [e.map((e) => /* @__PURE__ */ X("div", {
|
|
12276
12305
|
onClick: () => n(e),
|
|
@@ -12285,7 +12314,7 @@ var i_ = ({ onClose: e }) => {
|
|
|
12285
12314
|
size: "sm",
|
|
12286
12315
|
onClick: () => n(e)
|
|
12287
12316
|
}, `button-${e.label}`))]
|
|
12288
|
-
}),
|
|
12317
|
+
}), c_ = (e, t) => {
|
|
12289
12318
|
let n = Ko(e);
|
|
12290
12319
|
return {
|
|
12291
12320
|
buttonActions: n.filter((e) => e.type === "button"),
|
|
@@ -12295,7 +12324,7 @@ var i_ = ({ onClose: e }) => {
|
|
|
12295
12324
|
e.type === "button" && e.onClick(), e.keepOpen || t?.();
|
|
12296
12325
|
}
|
|
12297
12326
|
};
|
|
12298
|
-
},
|
|
12327
|
+
}, l_ = vc({
|
|
12299
12328
|
Title: ({ className: e, children: t }) => /* @__PURE__ */ X("p", {
|
|
12300
12329
|
className: e,
|
|
12301
12330
|
children: t
|
|
@@ -12305,30 +12334,30 @@ var i_ = ({ onClose: e }) => {
|
|
|
12305
12334
|
children: t
|
|
12306
12335
|
}),
|
|
12307
12336
|
inStack: !1
|
|
12308
|
-
}),
|
|
12337
|
+
}), u_ = () => Sc(l_), d_ = (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"), f_ = $a({
|
|
12309
12338
|
base: "text-base font-medium text-f1-foreground-inverse",
|
|
12310
12339
|
variants: { hasIcon: {
|
|
12311
12340
|
true: "pt-[3px]",
|
|
12312
12341
|
false: ""
|
|
12313
12342
|
} },
|
|
12314
12343
|
defaultVariants: { hasIcon: !1 }
|
|
12315
|
-
}),
|
|
12344
|
+
}), p_ = "line-clamp-3 text-base text-f1-foreground-inverse-secondary", m_ = {
|
|
12316
12345
|
error: "critical",
|
|
12317
12346
|
warning: "warning",
|
|
12318
12347
|
success: "positive",
|
|
12319
12348
|
loading: null,
|
|
12320
12349
|
default: null
|
|
12321
|
-
},
|
|
12350
|
+
}, h_ = {
|
|
12322
12351
|
error: "bg-f1-icon-critical",
|
|
12323
12352
|
warning: "bg-f1-icon-warning",
|
|
12324
12353
|
success: "bg-f1-icon-positive",
|
|
12325
12354
|
loading: "bg-f1-foreground-inverse-secondary",
|
|
12326
12355
|
default: "bg-f1-foreground-inverse-secondary"
|
|
12327
|
-
},
|
|
12328
|
-
let { Title: l, Description: u, inStack: d } =
|
|
12356
|
+
}, g_ = yc(({ title: e, description: t, variant: n = "default", duration: r, onClose: i, actions: a, countdownKey: o, contentKey: s }, c) => {
|
|
12357
|
+
let { Title: l, Description: u, inStack: d } = u_(), { buttonActions: f, linkActions: p, hasActions: m, handleActionClick: h } = c_(a, i), g = m_[n], _ = n === "loading", v = !_ && r != null && r > 0;
|
|
12329
12358
|
return /* @__PURE__ */ Z("div", {
|
|
12330
12359
|
ref: c,
|
|
12331
|
-
className:
|
|
12360
|
+
className: d_(d),
|
|
12332
12361
|
children: [/* @__PURE__ */ Z("div", {
|
|
12333
12362
|
className: B("flex flex-row gap-3", t ? "items-start" : "items-center"),
|
|
12334
12363
|
children: [
|
|
@@ -12351,44 +12380,44 @@ var i_ = ({ onClose: e }) => {
|
|
|
12351
12380
|
className: "flex flex-1 animate-toast-content-in flex-col gap-1 motion-reduce:animate-none",
|
|
12352
12381
|
children: [
|
|
12353
12382
|
e ? /* @__PURE__ */ X(l, {
|
|
12354
|
-
className:
|
|
12383
|
+
className: f_({ hasIcon: !!g || _ }),
|
|
12355
12384
|
children: e
|
|
12356
12385
|
}) : null,
|
|
12357
12386
|
t && e ? /* @__PURE__ */ X(u, {
|
|
12358
|
-
className:
|
|
12387
|
+
className: p_,
|
|
12359
12388
|
children: t
|
|
12360
12389
|
}) : null,
|
|
12361
12390
|
t && !e ? /* @__PURE__ */ X(l, {
|
|
12362
|
-
className:
|
|
12391
|
+
className: p_,
|
|
12363
12392
|
children: t
|
|
12364
12393
|
}) : null
|
|
12365
12394
|
]
|
|
12366
12395
|
}, s),
|
|
12367
|
-
/* @__PURE__ */ X(
|
|
12396
|
+
/* @__PURE__ */ X(s_, {
|
|
12368
12397
|
linkActions: p,
|
|
12369
12398
|
buttonActions: f,
|
|
12370
12399
|
onActionClick: h
|
|
12371
12400
|
}),
|
|
12372
|
-
i && !_ && (!m || !v) ? /* @__PURE__ */ X(
|
|
12401
|
+
i && !_ && (!m || !v) ? /* @__PURE__ */ X(a_, { onClose: i }) : null
|
|
12373
12402
|
]
|
|
12374
|
-
}), v ? /* @__PURE__ */ X(
|
|
12403
|
+
}), v ? /* @__PURE__ */ X(o_, {
|
|
12375
12404
|
duration: r,
|
|
12376
|
-
color:
|
|
12405
|
+
color: h_[n]
|
|
12377
12406
|
}, o) : null]
|
|
12378
12407
|
});
|
|
12379
12408
|
});
|
|
12380
|
-
|
|
12409
|
+
g_.displayName = "F0Toast";
|
|
12381
12410
|
//#endregion
|
|
12382
12411
|
//#region src/elements/Toast/F0MessageToast.tsx
|
|
12383
|
-
var
|
|
12384
|
-
let d =
|
|
12412
|
+
var __ = (e) => e instanceof Element && e.closest("button, a") !== null, v_ = yc(({ avatar: e, sender: t, topic: n, message: r, moreCount: i = 0, onClick: a, duration: o, onClose: s, countdownKey: c, contentKey: l }, u) => {
|
|
12413
|
+
let d = z(), { Title: f, Description: p, inStack: m } = u_(), h = () => {
|
|
12385
12414
|
a?.(), s?.();
|
|
12386
12415
|
}, g = o != null && o > 0;
|
|
12387
12416
|
return /* @__PURE__ */ Z("div", {
|
|
12388
12417
|
ref: u,
|
|
12389
|
-
className: B(
|
|
12418
|
+
className: B(d_(m), a && "cursor-pointer"),
|
|
12390
12419
|
onClick: a && !m ? (e) => {
|
|
12391
|
-
|
|
12420
|
+
__(e.target) || h();
|
|
12392
12421
|
} : void 0,
|
|
12393
12422
|
children: [
|
|
12394
12423
|
a ? /* @__PURE__ */ X("button", {
|
|
@@ -12426,50 +12455,50 @@ var g_ = (e) => e instanceof Element && e.closest("button, a") !== null, __ = yc
|
|
|
12426
12455
|
}),
|
|
12427
12456
|
i > 0 ? /* @__PURE__ */ X("p", {
|
|
12428
12457
|
className: "text-sm text-f1-foreground-inverse-secondary",
|
|
12429
|
-
children:
|
|
12458
|
+
children: Qe(d.toasts.moreMessages, i)
|
|
12430
12459
|
}) : null
|
|
12431
12460
|
]
|
|
12432
12461
|
}, l),
|
|
12433
12462
|
s ? /* @__PURE__ */ X("div", {
|
|
12434
12463
|
className: "relative flex-shrink-0",
|
|
12435
|
-
children: /* @__PURE__ */ X(
|
|
12464
|
+
children: /* @__PURE__ */ X(a_, { onClose: s })
|
|
12436
12465
|
}) : null
|
|
12437
12466
|
]
|
|
12438
12467
|
}),
|
|
12439
|
-
g ? /* @__PURE__ */ X(
|
|
12468
|
+
g ? /* @__PURE__ */ X(o_, {
|
|
12440
12469
|
duration: o,
|
|
12441
12470
|
color: "bg-f1-foreground-inverse-secondary"
|
|
12442
12471
|
}, c) : null
|
|
12443
12472
|
]
|
|
12444
12473
|
});
|
|
12445
12474
|
});
|
|
12446
|
-
|
|
12475
|
+
v_.displayName = "F0MessageToast";
|
|
12447
12476
|
//#endregion
|
|
12448
12477
|
//#region src/elements/Toast/stack/ToastItem.tsx
|
|
12449
|
-
var
|
|
12450
|
-
Title: ({ className: e, children: t }) => /* @__PURE__ */ X(
|
|
12478
|
+
var y_ = 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", En(), "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]"), b_ = 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]"), x_ = ["down", "right"], S_ = {
|
|
12479
|
+
Title: ({ className: e, children: t }) => /* @__PURE__ */ X(r_, {
|
|
12451
12480
|
className: e,
|
|
12452
12481
|
render: /* @__PURE__ */ X("p", {}),
|
|
12453
12482
|
children: t
|
|
12454
12483
|
}),
|
|
12455
|
-
Description: ({ className: e, children: t }) => /* @__PURE__ */ X(
|
|
12484
|
+
Description: ({ className: e, children: t }) => /* @__PURE__ */ X(n_, {
|
|
12456
12485
|
className: e,
|
|
12457
12486
|
children: t
|
|
12458
12487
|
}),
|
|
12459
12488
|
inStack: !0
|
|
12460
|
-
},
|
|
12489
|
+
}, C_ = ({ data: e, duration: t, countdownKey: n, contentKey: r, onClose: i }) => e.type === "message" ? /* @__PURE__ */ X(v_, {
|
|
12461
12490
|
...e.props,
|
|
12462
12491
|
duration: t,
|
|
12463
12492
|
countdownKey: n,
|
|
12464
12493
|
contentKey: r,
|
|
12465
12494
|
onClose: i
|
|
12466
|
-
}) : /* @__PURE__ */ X(
|
|
12495
|
+
}) : /* @__PURE__ */ X(g_, {
|
|
12467
12496
|
...e.props,
|
|
12468
12497
|
duration: t,
|
|
12469
12498
|
countdownKey: n,
|
|
12470
12499
|
contentKey: r,
|
|
12471
12500
|
onClose: i
|
|
12472
|
-
}),
|
|
12501
|
+
}), w_ = 6, T_ = (e) => {
|
|
12473
12502
|
let t = q(null);
|
|
12474
12503
|
return e ? {
|
|
12475
12504
|
onPointerDown: (e) => {
|
|
@@ -12481,28 +12510,28 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12481
12510
|
},
|
|
12482
12511
|
onPointerMove: (e) => {
|
|
12483
12512
|
let n = t.current;
|
|
12484
|
-
n && Math.hypot(e.clientX - n.x, e.clientY - n.y) >
|
|
12513
|
+
n && Math.hypot(e.clientX - n.x, e.clientY - n.y) > w_ && (n.dragged = !0);
|
|
12485
12514
|
},
|
|
12486
12515
|
onClick: (n) => {
|
|
12487
12516
|
let r = t.current?.dragged ?? !1;
|
|
12488
|
-
t.current = null, !r && !
|
|
12517
|
+
t.current = null, !r && !__(n.target) && e();
|
|
12489
12518
|
}
|
|
12490
12519
|
} : {};
|
|
12491
|
-
},
|
|
12492
|
-
let { close: n } =
|
|
12520
|
+
}, E_ = ({ toast: e, buried: t }) => {
|
|
12521
|
+
let { close: n } = i_(), r = e.data?.type === "message" ? e.data.props.onClick : void 0, i = T_(r ? () => {
|
|
12493
12522
|
r(), n(e.id);
|
|
12494
12523
|
} : void 0);
|
|
12495
|
-
return e.data ? /* @__PURE__ */ X(
|
|
12524
|
+
return e.data ? /* @__PURE__ */ X(Xg, {
|
|
12496
12525
|
toast: e,
|
|
12497
|
-
swipeDirection:
|
|
12526
|
+
swipeDirection: x_,
|
|
12498
12527
|
"data-buried": t ? "" : void 0,
|
|
12499
|
-
className:
|
|
12528
|
+
className: y_,
|
|
12500
12529
|
...i,
|
|
12501
|
-
children: /* @__PURE__ */ X(
|
|
12502
|
-
className:
|
|
12503
|
-
children: /* @__PURE__ */ X(
|
|
12504
|
-
value:
|
|
12505
|
-
children: /* @__PURE__ */ X(
|
|
12530
|
+
children: /* @__PURE__ */ X(Zg, {
|
|
12531
|
+
className: b_,
|
|
12532
|
+
children: /* @__PURE__ */ X(l_.Provider, {
|
|
12533
|
+
value: S_,
|
|
12534
|
+
children: /* @__PURE__ */ X(C_, {
|
|
12506
12535
|
data: e.data,
|
|
12507
12536
|
duration: e.timeout,
|
|
12508
12537
|
countdownKey: `${e.data.revision}-${e.updateKey ?? 0}`,
|
|
@@ -12512,18 +12541,18 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12512
12541
|
})
|
|
12513
12542
|
})
|
|
12514
12543
|
}) : null;
|
|
12515
|
-
},
|
|
12544
|
+
}, D_ = 12, O_ = 6, k_ = 36, A_ = 2, j_ = 3, M_ = (e) => {
|
|
12516
12545
|
if (e.length === 0) return {
|
|
12517
12546
|
collapsed: 0,
|
|
12518
12547
|
expanded: 0
|
|
12519
12548
|
};
|
|
12520
|
-
let t = e[0].height ?? 0, n = e.reduce((e, t) => e + (t.height ?? 0), 0) +
|
|
12549
|
+
let t = e[0].height ?? 0, n = e.reduce((e, t) => e + (t.height ?? 0), 0) + D_ * (e.length - 1);
|
|
12521
12550
|
return {
|
|
12522
|
-
collapsed: t +
|
|
12523
|
-
expanded: n + (e.length > 1 ?
|
|
12551
|
+
collapsed: t + O_ * Math.min(e.length - 1, A_),
|
|
12552
|
+
expanded: n + (e.length > 1 ? k_ : 0)
|
|
12524
12553
|
};
|
|
12525
|
-
},
|
|
12526
|
-
let t =
|
|
12554
|
+
}, N_ = ({ onClear: e }) => {
|
|
12555
|
+
let t = z(), { close: n } = i_();
|
|
12527
12556
|
return /* @__PURE__ */ X("div", {
|
|
12528
12557
|
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]"),
|
|
12529
12558
|
children: /* @__PURE__ */ X(V, {
|
|
@@ -12535,18 +12564,18 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12535
12564
|
}
|
|
12536
12565
|
})
|
|
12537
12566
|
});
|
|
12538
|
-
},
|
|
12539
|
-
let { update: t } =
|
|
12567
|
+
}, P_ = (e) => {
|
|
12568
|
+
let { update: t } = i_();
|
|
12540
12569
|
Tc(function() {
|
|
12541
12570
|
e.forEach((e, n) => {
|
|
12542
12571
|
if (!e.data) return;
|
|
12543
|
-
let r = n >=
|
|
12572
|
+
let r = n >= j_ ? 0 : e.data.duration;
|
|
12544
12573
|
(e.timeout ?? 0) !== r && t(e.id, { timeout: r });
|
|
12545
12574
|
});
|
|
12546
12575
|
}, [e, t]);
|
|
12547
|
-
},
|
|
12548
|
-
let { toasts: i } =
|
|
12549
|
-
|
|
12576
|
+
}, F_ = ({ label: e, isWindowBlurred: t, stackRef: n, onHasToastsChange: r }) => {
|
|
12577
|
+
let { toasts: i } = i_(), a = q(null), o = i.filter((e) => e.transitionStatus !== "ending"), [s, c] = J(/* @__PURE__ */ new Set()), l = i.length > 0 && i.every((e) => e.transitionStatus === "ending" && s.has(e.id));
|
|
12578
|
+
P_(o), wc(n, () => ({
|
|
12550
12579
|
isInUse: () => a.current?.hasAttribute("data-expanded") ?? !1,
|
|
12551
12580
|
frontToastId: () => o[0]?.id
|
|
12552
12581
|
}), [o]);
|
|
@@ -12554,28 +12583,28 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12554
12583
|
G(function() {
|
|
12555
12584
|
r(u);
|
|
12556
12585
|
}, [u, r]);
|
|
12557
|
-
let d =
|
|
12586
|
+
let d = M_(o), f = {
|
|
12558
12587
|
"--stack-collapsed-height": `${d.collapsed}px`,
|
|
12559
12588
|
"--stack-expanded-height": `${d.expanded}px`,
|
|
12560
|
-
"--clear-all-row": `${
|
|
12589
|
+
"--clear-all-row": `${k_}px`
|
|
12561
12590
|
};
|
|
12562
|
-
return /* @__PURE__ */ Z(
|
|
12591
|
+
return /* @__PURE__ */ Z(Ng, {
|
|
12563
12592
|
ref: a,
|
|
12564
12593
|
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]"),
|
|
12565
12594
|
"aria-label": e,
|
|
12566
12595
|
"data-clearing": l ? "" : void 0,
|
|
12567
12596
|
"data-window-blurred": t ? "" : void 0,
|
|
12568
12597
|
style: f,
|
|
12569
|
-
children: [i.map((e) => /* @__PURE__ */ X(
|
|
12598
|
+
children: [i.map((e) => /* @__PURE__ */ X(E_, {
|
|
12570
12599
|
toast: e,
|
|
12571
|
-
buried: o.indexOf(e) >=
|
|
12572
|
-
}, `${e.id}:${e.data?.renderKey ?? 0}`)), o.length > 1 || l ? /* @__PURE__ */ X(
|
|
12600
|
+
buried: o.indexOf(e) >= j_
|
|
12601
|
+
}, `${e.id}:${e.data?.renderKey ?? 0}`)), o.length > 1 || l ? /* @__PURE__ */ X(N_, { onClear: () => c(new Set(o.map((e) => e.id))) }) : null]
|
|
12573
12602
|
});
|
|
12574
|
-
},
|
|
12603
|
+
}, I_ = "#content", L_ = (e) => {
|
|
12575
12604
|
let [t, n] = J({ inset: 0 });
|
|
12576
12605
|
return rr(function() {
|
|
12577
12606
|
if (!e || typeof document > "u") return;
|
|
12578
|
-
let t = document.querySelector(
|
|
12607
|
+
let t = document.querySelector(I_);
|
|
12579
12608
|
if (!t) {
|
|
12580
12609
|
n({ inset: 0 });
|
|
12581
12610
|
return;
|
|
@@ -12595,7 +12624,7 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12595
12624
|
i.disconnect(), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
|
|
12596
12625
|
};
|
|
12597
12626
|
}, [e]), t;
|
|
12598
|
-
},
|
|
12627
|
+
}, R_ = () => {
|
|
12599
12628
|
let [e, t] = J(!1);
|
|
12600
12629
|
return G(function() {
|
|
12601
12630
|
let e = () => t(!0), n = () => t(!1);
|
|
@@ -12603,26 +12632,26 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12603
12632
|
window.removeEventListener("blur", e), window.removeEventListener("focus", n);
|
|
12604
12633
|
};
|
|
12605
12634
|
}, []), e;
|
|
12606
|
-
},
|
|
12607
|
-
let [n, r] = J(!1), [i, a] = J(!1), o =
|
|
12635
|
+
}, z_ = Infinity, B_ = ({ messages: e, app: t }) => {
|
|
12636
|
+
let [n, r] = J(!1), [i, a] = J(!1), o = L_(n || i), s = R_(), c = z();
|
|
12608
12637
|
return /* @__PURE__ */ X("div", {
|
|
12609
12638
|
className: "pointer-events-none fixed z-[1260] flex flex-col-reverse items-center overflow-y-auto overflow-x-hidden py-6",
|
|
12610
12639
|
style: o,
|
|
12611
12640
|
children: /* @__PURE__ */ Z("div", {
|
|
12612
12641
|
className: "flex w-[calc(100%-2rem)] shrink-0 flex-col gap-3 sm:w-96",
|
|
12613
|
-
children: [/* @__PURE__ */ X(
|
|
12642
|
+
children: [/* @__PURE__ */ X(Ag, {
|
|
12614
12643
|
toastManager: e.manager,
|
|
12615
|
-
limit:
|
|
12616
|
-
children: /* @__PURE__ */ X(
|
|
12644
|
+
limit: z_,
|
|
12645
|
+
children: /* @__PURE__ */ X(F_, {
|
|
12617
12646
|
label: c.toasts.messages,
|
|
12618
12647
|
isWindowBlurred: s,
|
|
12619
12648
|
stackRef: e.stackRef,
|
|
12620
12649
|
onHasToastsChange: r
|
|
12621
12650
|
})
|
|
12622
|
-
}), /* @__PURE__ */ X(
|
|
12651
|
+
}), /* @__PURE__ */ X(Ag, {
|
|
12623
12652
|
toastManager: t.manager,
|
|
12624
|
-
limit:
|
|
12625
|
-
children: /* @__PURE__ */ X(
|
|
12653
|
+
limit: z_,
|
|
12654
|
+
children: /* @__PURE__ */ X(F_, {
|
|
12626
12655
|
label: c.notifications,
|
|
12627
12656
|
isWindowBlurred: s,
|
|
12628
12657
|
stackRef: t.stackRef,
|
|
@@ -12631,16 +12660,16 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12631
12660
|
})]
|
|
12632
12661
|
})
|
|
12633
12662
|
});
|
|
12634
|
-
},
|
|
12663
|
+
}, V_ = ({ children: e, portalTargets: t = {
|
|
12635
12664
|
mobile: "#f0-overlay-root",
|
|
12636
12665
|
desktop: "#f0-overlay-root"
|
|
12637
12666
|
} }) => {
|
|
12638
|
-
let n = q(null), r = Ec(
|
|
12667
|
+
let n = q(null), r = Ec(Je.subscribeRenderer, Je.getActiveRendererId, () => null);
|
|
12639
12668
|
G(function() {
|
|
12640
|
-
let { id: e, release: t } =
|
|
12669
|
+
let { id: e, release: t } = Je.acquireRenderer();
|
|
12641
12670
|
return n.current = e, t;
|
|
12642
12671
|
}, []);
|
|
12643
|
-
let i = r !== null && r === n.current, a =
|
|
12672
|
+
let i = r !== null && r === n.current, a = Sg(), [o, s] = J(null), [c, l] = J(0), u = q(null);
|
|
12644
12673
|
return G(function() {
|
|
12645
12674
|
if (typeof document > "u") return;
|
|
12646
12675
|
let e = a ? t?.mobile || "body" : t?.desktop || "body", n = document.querySelector(e) ?? document.body;
|
|
@@ -12649,13 +12678,13 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12649
12678
|
a,
|
|
12650
12679
|
t?.mobile,
|
|
12651
12680
|
t?.desktop
|
|
12652
|
-
]), /* @__PURE__ */ Z(Y, { children: [i && o != null ? Oc(/* @__PURE__ */ X(_c, { children: /* @__PURE__ */ X(
|
|
12653
|
-
messages:
|
|
12654
|
-
app:
|
|
12681
|
+
]), /* @__PURE__ */ Z(Y, { children: [i && o != null ? Oc(/* @__PURE__ */ X(_c, { children: /* @__PURE__ */ X(B_, {
|
|
12682
|
+
messages: Kt,
|
|
12683
|
+
app: xt
|
|
12655
12684
|
}) }, c), o) : null, e] });
|
|
12656
|
-
},
|
|
12685
|
+
}, H_ = ({ children: e, link: t, privacyModeInitiallyEnabled: n, image: r, i18n: i, l10n: a, hourCycle: o, isDev: s = !1, showExperimentalWarnings: c = !1, renderDataTestIdAttribute: l = !1, newButtonStyles: u = !1 }) => /* @__PURE__ */ X(d, {
|
|
12657
12686
|
reducedMotion: "user",
|
|
12658
|
-
children: /* @__PURE__ */ X(
|
|
12687
|
+
children: /* @__PURE__ */ X(pn, {
|
|
12659
12688
|
isDev: s,
|
|
12660
12689
|
showExperimentalWarnings: c,
|
|
12661
12690
|
renderDataTestIdAttribute: l,
|
|
@@ -12663,11 +12692,11 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12663
12692
|
newButtonStyles: u,
|
|
12664
12693
|
children: /* @__PURE__ */ X(Ts, {
|
|
12665
12694
|
...a,
|
|
12666
|
-
children: /* @__PURE__ */ X(
|
|
12695
|
+
children: /* @__PURE__ */ X(mn, {
|
|
12667
12696
|
...i,
|
|
12668
12697
|
children: /* @__PURE__ */ X(ir, {
|
|
12669
12698
|
...t,
|
|
12670
|
-
children: /* @__PURE__ */ X(Za, { children: /* @__PURE__ */ X(
|
|
12699
|
+
children: /* @__PURE__ */ X(Za, { children: /* @__PURE__ */ X(qt, {
|
|
12671
12700
|
initiallyEnabled: n,
|
|
12672
12701
|
children: /* @__PURE__ */ X(no, {
|
|
12673
12702
|
...r,
|
|
@@ -12678,11 +12707,11 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12678
12707
|
})
|
|
12679
12708
|
})
|
|
12680
12709
|
})
|
|
12681
|
-
}),
|
|
12710
|
+
}), U_ = vc(null), W_ = ({ children: e, fullScreen: t = !0 }) => {
|
|
12682
12711
|
let n = q(null), [r, i] = J(n.current);
|
|
12683
12712
|
return rr(() => {
|
|
12684
12713
|
i(n.current);
|
|
12685
|
-
}, []), /* @__PURE__ */ X(
|
|
12714
|
+
}, []), /* @__PURE__ */ X(U_.Provider, {
|
|
12686
12715
|
value: { element: r },
|
|
12687
12716
|
children: /* @__PURE__ */ Z("div", {
|
|
12688
12717
|
ref: n,
|
|
@@ -12694,7 +12723,7 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12694
12723
|
})]
|
|
12695
12724
|
})
|
|
12696
12725
|
});
|
|
12697
|
-
},
|
|
12726
|
+
}, G_ = vc(void 0), K_ = () => Sc(G_), q_ = ({ children: e, layout: t, link: n, privacyModeInitiallyEnabled: r, image: i, i18n: a, l10n: o, hourCycle: s, isDev: c = !1, dataCollectionStorageHandler: l, showExperimentalWarnings: u = !1, renderDataTestIdAttribute: d = !1, newButtonStyles: f = !1, formComponent: p, map: m }) => /* @__PURE__ */ X(H_, {
|
|
12698
12727
|
link: n,
|
|
12699
12728
|
privacyModeInitiallyEnabled: r,
|
|
12700
12729
|
image: i,
|
|
@@ -12705,20 +12734,20 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12705
12734
|
showExperimentalWarnings: u,
|
|
12706
12735
|
renderDataTestIdAttribute: d,
|
|
12707
12736
|
newButtonStyles: f,
|
|
12708
|
-
children: /* @__PURE__ */ X(
|
|
12737
|
+
children: /* @__PURE__ */ X(W_, {
|
|
12709
12738
|
...t,
|
|
12710
12739
|
children: /* @__PURE__ */ X(Ki, {
|
|
12711
12740
|
handler: l,
|
|
12712
|
-
children: /* @__PURE__ */ X(ma, { children: /* @__PURE__ */ X(
|
|
12741
|
+
children: /* @__PURE__ */ X(ma, { children: /* @__PURE__ */ X(ft, {
|
|
12713
12742
|
...m,
|
|
12714
|
-
children: /* @__PURE__ */ X(
|
|
12743
|
+
children: /* @__PURE__ */ X(G_.Provider, {
|
|
12715
12744
|
value: p,
|
|
12716
|
-
children: /* @__PURE__ */ X(Mu, { children: /* @__PURE__ */ X(
|
|
12745
|
+
children: /* @__PURE__ */ X(Mu, { children: /* @__PURE__ */ X(V_, {
|
|
12717
12746
|
portalTargets: {
|
|
12718
12747
|
mobile: "#f0-overlay-root",
|
|
12719
12748
|
desktop: "#f0-overlay-root"
|
|
12720
12749
|
},
|
|
12721
|
-
children: /* @__PURE__ */ X(Pu, { children: /* @__PURE__ */ X(
|
|
12750
|
+
children: /* @__PURE__ */ X(Pu, { children: /* @__PURE__ */ X(Ht, { children: e }) })
|
|
12722
12751
|
}) })
|
|
12723
12752
|
})
|
|
12724
12753
|
}) })
|
|
@@ -12726,4 +12755,4 @@ var v_ = B("group/toast pointer-events-auto absolute bottom-0 left-0 right-0 fle
|
|
|
12726
12755
|
})
|
|
12727
12756
|
});
|
|
12728
12757
|
//#endregion
|
|
12729
|
-
export { Da as AiChatTranslationsProvider,
|
|
12758
|
+
export { Da as AiChatTranslationsProvider, tn as AreaChart, wo as Await, we as BarChart, ut as BarChartSkeleton, jt as CardSelectableContainer, b as CategoryBarChart, bi as ChatSpinner, Ao as Chip, za as CollapsibleGroup, g as ComboChart, Nt as DATA_COLLECTION_URL_PARAMS, Et as DATA_COLLECTION_URL_PARAM_PREFIX, jl as Dashboard, p as DataChartEmptyStateView, dn as DataTestIdWrapper, Ye as DndProvider, sa as DropOverlay, Yn as EmojiImage, lu as F0Accordion, Vt as F0ActionBar, Oi as F0ActionItem, Ur as F0AiChat, Oa as F0AiChatCreditsButton, Ia as F0AiChatHeader, Na as F0AiChatHistory, Qr as F0AiChatProvider, ha as F0AiChatTextArea, _a as F0AiChatUsageLimitsButton, wa as F0AiFileAttachments, Fi as F0AiFilePreviewsProvider, oa as F0AiFormRegistryProvider, La as F0AiInsightCard, Ta as F0AiMask, ka as F0AiMessageSources, fa as F0AiMessagesContainer, Nr as F0AiPong, Ua as F0AiProcessingOverlay, Aa as F0AiProposalCard, Wa as F0AiTableCard, lc as F0Alert, bg as F0AnalyticsDashboard, ar as F0AudioPlayer, Mi as F0AudioPlayerCard, ja as F0AuraVoiceAnimation, lo as F0Avatar, wi as F0AvatarAlert, oo as F0AvatarCompany, ni as F0AvatarDate, xo as F0AvatarEmoji, So as F0AvatarFile, uo as F0AvatarIcon, ho as F0AvatarList, ao as F0AvatarModule, fo as F0AvatarPerson, go as F0AvatarTeam, $l as F0BigNumber, um as F0BookAMeetingCard, io as F0Box, V as F0Button, lr as F0ButtonDropdown, Ls as F0ButtonToggle, Fa as F0CanvasCard, Xi as F0CanvasPanel, aa as F0Card, sr as F0CardRow, Sa as F0ChatComposer, cs as F0Checkbox, pu as F0ChipList, Ga as F0ClarifyingPanel, Ct as F0DataChart, M as F0DatePicker, Pt as F0DatePickerInline, om as F0DemoCard, mi as F0Dialog, Te as F0DialogAlikeContext, Ae as F0DialogAlikeProvider, Io as F0DialogContext, $o as F0DialogProvider, fc as F0DocumentViewer, bu as F0Drawer, _e as F0DurationInput, Fs as F0EventCatcherProvider, cm as F0FAQCard, qi as F0FileItem, Cu as F0FilterPickerContent, m as F0Form, Lu as F0FormField, xl as F0GridStack, Ma as F0HILActionConfirmation, v as F0Heading, H as F0Icon, Ii as F0Link, lm as F0ModuleCard, nn as F0NotesTextEditor, ye as F0NotesTextEditorSkeleton, A as F0NumberInput, S as F0NumberInputInline, Ti as F0OneIcon, Hi as F0OneSwitch, uc as F0PdfViewer, q_ as F0Provider, dm as F0QuestionCardMultiStep, vi as F0RichTextDisplay, ae as F0RichTextEditor, fs as F0SearchInput, Os as F0Select, ne as F0SelectInline, Cd as F0Slider, zd as F0TableOfContentPopover, Vo as F0TagAlert, jo as F0TagBalance, Wo as F0TagCompany, Bo as F0TagDot, ds as F0TagList, zo as F0TagPerson, gs as F0TagRaw, Do as F0TagStatus, hs as F0TagTeam, cc as F0Text, oe as F0TextAreaInput, re as F0TextAreaInputInline, Pi as F0TextInput, gt as F0TextInputInline, Se as F0TimelineRow, mc as F0VideoPlayer, od as F0WizardForm, us as F1SearchBox, x as FILE_TYPES, Vi as FileItem, ma as FormCardValueFormatterProvider, st as FunnelChartSkeleton, co as GROUP_ID_SYMBOL, yo as GROUP_KEY_SEPARATOR, ze as GaugeChartSkeleton, Zt as HeatmapChartSkeleton, ql as HomeLayout, be as InlineFieldRow, f as InlineFieldRowList, Hr as Input, Wl as Layout, ue as LineChart, cn as LineChartSkeleton, dt as MAX_URL_FILTER_VALUES, u as NotesTextEditor, $t as NotesTextEditorSkeleton, te as NumberInput, es as OneCalendar, tr as OneEllipsis, pe as OneEmptyState, ws as OneFilterPicker, bt as PieChart, Ke as PieChartSkeleton, oi as PongBall, qt as PrivacyModeProvider, qp as ProductBlankslate, Yt as ProductCard, Xp as ProductModal, Qp as ProductWidget, s as ProgressBarChart, _t as RadarChart, an as RadarChartSkeleton, ai as RichTextDisplay, de as RichTextEditor, xe as ScatterChartSkeleton, Gl as StandardLayout, pp as SurveyAllQuestionsLoadingSkeleton, Rp as SurveyAnsweringForm, ap as SurveyFormBuilder, Vp as SurveySampleQuestion, mp as SurveySteppedLoadingSkeleton, vs as Tag, ts as TagCounter, fe as Textarea, Ha as ThreadItem, Ea as ThreadListSkeleton, V_ as ToastProvider, Kl as TwoColumnLayout, k as UPLOAD_INPUT_ID, j as UpsellRequestResponseDialog, tm as UpsellingAlert, rm as UpsellingBanner, C as UpsellingButton, am as UpsellingPopover, ie as VerticalBarChart, rs as WeekStartDay, Xe as actionBarStatuses, da as actionItemStatuses, Qi as adaptDataAdapterToInfiniteScroll, ua as aiChatFileFromShowFilesItem, Pa as aiChatFileFromUploadedFile, va as aiChatFilesFromMessage, ya as aiChatMessageText, Ca as aiTranslations, gu as alertVariantOptions, ru as audioPlayerSizes, Jl as avatarVariants, ct as buildDataCollectionUrlParams, fn as buildTranslations, nu as buttonDropdownModes, tu as buttonDropdownSizes, eu as buttonDropdownVariants, Dl as buttonSizes, Rt as buttonToggleColors, mt as buttonToggleSizes, He as buttonToggleVariants, El as buttonVariants, uu as cardAlertVariants, na as cardImageAspectRatios, ui as cardImageFits, pr as cardImageSizes, To as chartColorTokens, ko as chipVariants, Wd as computeSectionEndIds, pc as configurePdfWorker, Ba as contentTypes, St as createAtlaskitDriver, Mo as createDataSourceDefinition, Du as createF0FormDefinitionTester, Eu as createF0FormTester, wl as createPageLayoutBlock, Tl as createPageLayoutBlockGroup, ga as createPersonMentionSource, _u as dataCollectionLocalStorageHandler, mu as datePickerInlineDismissReasons, hu as datepickerSizes, to as defaultTranslations, xi as defineAvailableForm, wu as describeFormSchema, E as dialog, E as dialogs, ee as drawers, la as durationInputSizes, ur as durationUnits, h as evaluateRenderIf, hn as experimental, Ai as f0FileItemSizes, Li as f0FormField, jr as fieldsToSeconds, Bd as flattenElements, ca as formatPlaybackTime, fd as forms, Ce as generateAnchorId, Xo as getAnimationVariants, Ci as getDataCollectionStorageKey, Lo as getDataSourcePaginationType, er as getEmojiLabel, or as getF0Config, Ns as getGranularityDefinition, xs as getGranularityDefinitions, Rs as getGranularitySimpleDefinition, le as getSchemaDefinition, Es as granularityDefinitions, Ni as hasF0Config, Br as inferFieldType, Ud as injectSectionEnds, _o as isInfiniteScrollPagination, vo as isPageBasedPagination, Kr as isZodType, iu as linkVariants, xa as markdownRenderers, Wi as mergeDataCollectionFilters, mo as modules, Ya as oneIconSizes, Be as parseDataCollectionUrlParams, dc as pdfScales, kt as predefinedPresets, Ms as rangeSeparator, Ji as readDataCollectionStorage, Hd as reconstructElements, ji as resolveDataCollectionFilters, ms as resolveGranularityDefinition, Gt as resolveItemNeighbors, n as resolveWindowNeighbors, Ir as secondsToFields, li as secondsToVisibleFields, pd as selectInlineDismissReasons, Fe as selectSizes, Me as selectVariants, Qt as setDataCollectionUrlParams, md as sliderTooltipModes, ln as syncDataCollectionUrlParams, Dd as tagDotColors, Td as timelineRowApproverStatuses, wd as timelineRowStatuses, Ed as timelineRowTagVariants, zt as toasts, Tr as unwrapZodSchema, Ra as usageLimitsPopoverSides, Yi as useAiChat, qa as useAiChatTranslations, ci as useAudioPlayer, Ja as useCanvasEntity, Va as useChatHistory, po as useData, Cs as useDataSource, he as useDataSourceItemNavigation, Fr as useDerivedTranscription, Ve as useDndEvents, At as useDraggable, Bt as useDroppableList, Qn as useEmojiConfetti, ra as useF0AiFormRegistry, Qo as useF0Dialog, w as useF0DialogAlikeContext, rn as useF0Form, Wt as useF0FormDefinition, pa as useFormCardValueFormatter, K_ as useFormComponent, Zo as useGroups, xg as useIsDesktop, Sg as useIsMobile, rt as useItemNeighbors, $e as usePrivacyMode, Xn as useReducedMotion, yt as useSchemaDefinition, No as useSelectable, ba as useSetFormCardValueFormatter, Ka as useToolCallId, Xa as useXRay, R as withDataTestId, qe as writeDataCollectionStorage };
|