@factorialco/f0-react 1.240.0 → 1.240.1
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/experimental.d.ts +4 -4
- package/dist/f0.d.ts +6 -5
- package/dist/f0.js +143 -143
- package/package.json +1 -1
package/dist/experimental.d.ts
CHANGED
|
@@ -5385,8 +5385,8 @@ declare global {
|
|
|
5385
5385
|
|
|
5386
5386
|
declare module "@tiptap/core" {
|
|
5387
5387
|
interface Commands<ReturnType> {
|
|
5388
|
-
|
|
5389
|
-
|
|
5388
|
+
aiBlock: {
|
|
5389
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
|
|
5390
5390
|
};
|
|
5391
5391
|
}
|
|
5392
5392
|
}
|
|
@@ -5394,8 +5394,8 @@ declare module "@tiptap/core" {
|
|
|
5394
5394
|
|
|
5395
5395
|
declare module "@tiptap/core" {
|
|
5396
5396
|
interface Commands<ReturnType> {
|
|
5397
|
-
|
|
5398
|
-
|
|
5397
|
+
liveCompanion: {
|
|
5398
|
+
insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
|
|
5399
5399
|
};
|
|
5400
5400
|
}
|
|
5401
5401
|
}
|
package/dist/f0.d.ts
CHANGED
|
@@ -2438,7 +2438,7 @@ export declare type ProductCardProps = {
|
|
|
2438
2438
|
type?: never;
|
|
2439
2439
|
});
|
|
2440
2440
|
|
|
2441
|
-
export declare function ProductModal({ isOpen, onClose, title, image, benefits, errorMessage, successMessage, loadingState, nextSteps, closeLabel, primaryAction, modalTitle, modalModule, secondaryAction, portalContainer, tag, }: ProductModalProps): JSX_2.Element;
|
|
2441
|
+
export declare function ProductModal({ isOpen, onClose, title, image, benefits, errorMessage, successMessage, loadingState, nextSteps, closeLabel, primaryAction, modalTitle, modalModule, secondaryAction, portalContainer, tag, showResponseDialog, }: ProductModalProps): JSX_2.Element;
|
|
2442
2442
|
|
|
2443
2443
|
declare type ProductModalProps = {
|
|
2444
2444
|
isOpen: boolean;
|
|
@@ -2476,6 +2476,7 @@ declare type ProductModalProps = {
|
|
|
2476
2476
|
primaryAction?: Action_2;
|
|
2477
2477
|
secondaryAction?: Action_2;
|
|
2478
2478
|
portalContainer?: HTMLElement | null;
|
|
2479
|
+
showResponseDialog?: boolean;
|
|
2479
2480
|
};
|
|
2480
2481
|
|
|
2481
2482
|
export declare function ProductWidget({ mediaUrl, title, description, onClose, dismissible, width, trackVisibility, actions, showConfirmation, }: ProductWidgetProps): JSX_2.Element;
|
|
@@ -3401,8 +3402,8 @@ declare global {
|
|
|
3401
3402
|
|
|
3402
3403
|
declare module "@tiptap/core" {
|
|
3403
3404
|
interface Commands<ReturnType> {
|
|
3404
|
-
|
|
3405
|
-
|
|
3405
|
+
aiBlock: {
|
|
3406
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
|
|
3406
3407
|
};
|
|
3407
3408
|
}
|
|
3408
3409
|
}
|
|
@@ -3410,8 +3411,8 @@ declare module "@tiptap/core" {
|
|
|
3410
3411
|
|
|
3411
3412
|
declare module "@tiptap/core" {
|
|
3412
3413
|
interface Commands<ReturnType> {
|
|
3413
|
-
|
|
3414
|
-
|
|
3414
|
+
liveCompanion: {
|
|
3415
|
+
insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
|
|
3415
3416
|
};
|
|
3416
3417
|
}
|
|
3417
3418
|
}
|
package/dist/f0.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { az as Ja, $ as Ya, aB as Xa, aK as Ka, a0 as Qa, a1 as Za, a2 as er, a3 as ar, a4 as rr, a5 as sr, a6 as tr, a7 as lr, a9 as or, aa as nr, ab as ir, ac as dr, aG as cr, ae as ur, af as fr, ag as mr, ah as hr, ak as pr, al as gr, am as vr, an as br, ap as xr, ad as Cr, ao as yr, aj as wr, aH as Nr, aA as Pr, au as Lr, ax as Sr, at as Fr, aL as kr, as as
|
|
3
|
-
import { jsx as e, jsxs as c, Fragment as
|
|
4
|
-
import * as
|
|
5
|
-
import Qe, { useState as v, forwardRef as I, useRef as
|
|
1
|
+
import { C as p, L as ge, c as ve, P as H, a as b, f as be, g as A, A as xe, B as Ce, b as ye, d as we, e as Ne, V as Pe, h as D, i as U, j as J, k as Le, l as Y, S as X, m as K, n as Se, O as Fe, o as Q, p as ke, q as Me, F as Z, r as De, s as Te, t as Ie, D as Be, u as Re, v as Oe, w as $e, x as ee, y as w, U as ae, z as Ee, E as _e, G as V, H as je, I as re, J as ze, K as Ae, M as Ve, N as qe, Q as We, R as Ge, X as He, T as Ue, W as Je, Y as Ye, Z as Xe, _ as Ke } from "./hooks-FlkC6pns.js";
|
|
2
|
+
import { az as Ja, $ as Ya, aB as Xa, aK as Ka, a0 as Qa, a1 as Za, a2 as er, a3 as ar, a4 as rr, a5 as sr, a6 as tr, a7 as lr, a9 as or, aa as nr, ab as ir, ac as dr, aG as cr, ae as ur, af as fr, ag as mr, ah as hr, ak as pr, al as gr, am as vr, an as br, ap as xr, ad as Cr, ao as yr, aj as wr, aH as Nr, aA as Pr, au as Lr, ax as Sr, at as Fr, aL as kr, as as Mr, ar as Dr, a8 as Tr, ai as Ir, aq as Br, av as Rr, aC as Or, aD as $r, aE as Er, aM as _r, aw as jr, aF as zr, aJ as Ar, ay as Vr, aI as qr } from "./hooks-FlkC6pns.js";
|
|
3
|
+
import { jsx as e, jsxs as c, Fragment as E } from "react/jsx-runtime";
|
|
4
|
+
import * as _ from "react";
|
|
5
|
+
import Qe, { useState as v, forwardRef as I, useRef as se, useImperativeHandle as Ze, Children as ea, useEffect as te, createContext as aa } from "react";
|
|
6
6
|
const Fa = {
|
|
7
7
|
approvals: {
|
|
8
8
|
history: "Approval history",
|
|
@@ -204,17 +204,17 @@ const Fa = {
|
|
|
204
204
|
noResults: "No results found",
|
|
205
205
|
loadingMore: "Loading..."
|
|
206
206
|
}
|
|
207
|
-
}, ka =
|
|
207
|
+
}, ka = p({
|
|
208
208
|
name: "Link",
|
|
209
209
|
type: "info"
|
|
210
|
-
}, ge),
|
|
210
|
+
}, ge), Ma = [
|
|
211
211
|
"person",
|
|
212
212
|
"team",
|
|
213
213
|
"company",
|
|
214
214
|
"file",
|
|
215
215
|
"flag"
|
|
216
216
|
];
|
|
217
|
-
var
|
|
217
|
+
var j = "Progress", z = 100, [ra, Da] = ve(j), [sa, ta] = ra(j), le = _.forwardRef(
|
|
218
218
|
(a, r) => {
|
|
219
219
|
const {
|
|
220
220
|
__scopeProgress: s,
|
|
@@ -223,19 +223,19 @@ var _ = "Progress", j = 100, [ra, Ma] = ve(_), [sa, ta] = ra(_), te = E.forwardR
|
|
|
223
223
|
getValueLabel: i = la,
|
|
224
224
|
...n
|
|
225
225
|
} = a;
|
|
226
|
-
(t || t === 0) && !
|
|
227
|
-
const d =
|
|
228
|
-
l !== null && !
|
|
229
|
-
const o =
|
|
226
|
+
(t || t === 0) && !q(t) && console.error(oa(`${t}`, "Progress"));
|
|
227
|
+
const d = q(t) ? t : z;
|
|
228
|
+
l !== null && !W(l, d) && console.error(na(`${l}`, "Progress"));
|
|
229
|
+
const o = W(l, d) ? l : null, f = T(o) ? i(o, d) : void 0;
|
|
230
230
|
return /* @__PURE__ */ e(sa, { scope: s, value: o, max: d, children: /* @__PURE__ */ e(
|
|
231
|
-
|
|
231
|
+
H.div,
|
|
232
232
|
{
|
|
233
233
|
"aria-valuemax": d,
|
|
234
234
|
"aria-valuemin": 0,
|
|
235
235
|
"aria-valuenow": T(o) ? o : void 0,
|
|
236
236
|
"aria-valuetext": f,
|
|
237
237
|
role: "progressbar",
|
|
238
|
-
"data-state":
|
|
238
|
+
"data-state": ie(o, d),
|
|
239
239
|
"data-value": o ?? void 0,
|
|
240
240
|
"data-max": d,
|
|
241
241
|
...n,
|
|
@@ -244,14 +244,14 @@ var _ = "Progress", j = 100, [ra, Ma] = ve(_), [sa, ta] = ra(_), te = E.forwardR
|
|
|
244
244
|
) });
|
|
245
245
|
}
|
|
246
246
|
);
|
|
247
|
-
|
|
248
|
-
var
|
|
247
|
+
le.displayName = j;
|
|
248
|
+
var oe = "ProgressIndicator", ne = _.forwardRef(
|
|
249
249
|
(a, r) => {
|
|
250
|
-
const { __scopeProgress: s, ...l } = a, t = ta(
|
|
250
|
+
const { __scopeProgress: s, ...l } = a, t = ta(oe, s);
|
|
251
251
|
return /* @__PURE__ */ e(
|
|
252
|
-
|
|
252
|
+
H.div,
|
|
253
253
|
{
|
|
254
|
-
"data-state":
|
|
254
|
+
"data-state": ie(t.value, t.max),
|
|
255
255
|
"data-value": t.value ?? void 0,
|
|
256
256
|
"data-max": t.max,
|
|
257
257
|
...l,
|
|
@@ -260,35 +260,35 @@ var le = "ProgressIndicator", oe = E.forwardRef(
|
|
|
260
260
|
);
|
|
261
261
|
}
|
|
262
262
|
);
|
|
263
|
-
|
|
263
|
+
ne.displayName = oe;
|
|
264
264
|
function la(a, r) {
|
|
265
265
|
return `${Math.round(a / r * 100)}%`;
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function ie(a, r) {
|
|
268
268
|
return a == null ? "indeterminate" : a === r ? "complete" : "loading";
|
|
269
269
|
}
|
|
270
270
|
function T(a) {
|
|
271
271
|
return typeof a == "number";
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function q(a) {
|
|
274
274
|
return T(a) && !isNaN(a) && a > 0;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function W(a, r) {
|
|
277
277
|
return T(a) && !isNaN(a) && a <= r && a >= 0;
|
|
278
278
|
}
|
|
279
279
|
function oa(a, r) {
|
|
280
|
-
return `Invalid prop \`max\` of value \`${a}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${
|
|
280
|
+
return `Invalid prop \`max\` of value \`${a}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${z}\`.`;
|
|
281
281
|
}
|
|
282
282
|
function na(a, r) {
|
|
283
283
|
return `Invalid prop \`value\` of value \`${a}\` supplied to \`${r}\`. The \`value\` prop must be:
|
|
284
284
|
- a positive number
|
|
285
|
-
- less than the value passed to \`max\` (or ${
|
|
285
|
+
- less than the value passed to \`max\` (or ${z} if no \`max\` prop is set)
|
|
286
286
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
287
287
|
|
|
288
288
|
Defaulting to \`null\`.`;
|
|
289
289
|
}
|
|
290
|
-
var
|
|
291
|
-
const
|
|
290
|
+
var de = le, ia = ne;
|
|
291
|
+
const ce = _.forwardRef(({ className: a, value: r, ...s }, l) => e(de, {
|
|
292
292
|
ref: l,
|
|
293
293
|
className: b("relative h-2 w-full overflow-hidden rounded-full bg-f1-background-secondary", a),
|
|
294
294
|
...s,
|
|
@@ -300,15 +300,15 @@ const de = E.forwardRef(({ className: a, value: r, ...s }, l) => e(ie, {
|
|
|
300
300
|
}
|
|
301
301
|
})
|
|
302
302
|
}));
|
|
303
|
-
|
|
303
|
+
ce.displayName = de.displayName;
|
|
304
304
|
const da = ({ value: a, max: r = 100, label: s, color: l }, t) => {
|
|
305
|
-
const i = l ?
|
|
305
|
+
const i = l ? A(l) : A("categorical-1"), n = a / r * 100;
|
|
306
306
|
return c("div", {
|
|
307
307
|
className: "flex items-center space-x-2",
|
|
308
308
|
"aria-live": "polite",
|
|
309
309
|
children: [e("div", {
|
|
310
310
|
className: "flex-grow",
|
|
311
|
-
children: e(
|
|
311
|
+
children: e(ce, {
|
|
312
312
|
color: i,
|
|
313
313
|
value: n,
|
|
314
314
|
className: "w-full",
|
|
@@ -322,72 +322,72 @@ const da = ({ value: a, max: r = 100, label: s, color: l }, t) => {
|
|
|
322
322
|
children: s
|
|
323
323
|
})]
|
|
324
324
|
});
|
|
325
|
-
}, ca = be(da), Ta =
|
|
325
|
+
}, ca = be(da), Ta = p(
|
|
326
326
|
{
|
|
327
327
|
name: "AreaChart",
|
|
328
328
|
type: "info"
|
|
329
329
|
},
|
|
330
330
|
xe
|
|
331
|
-
), Ia =
|
|
331
|
+
), Ia = p(
|
|
332
332
|
{
|
|
333
333
|
name: "BarChart",
|
|
334
334
|
type: "info"
|
|
335
335
|
},
|
|
336
336
|
Ce
|
|
337
|
-
),
|
|
337
|
+
), Ba = p(
|
|
338
338
|
{
|
|
339
339
|
name: "CategoryBarChart",
|
|
340
340
|
type: "info"
|
|
341
341
|
},
|
|
342
342
|
ye
|
|
343
|
-
),
|
|
343
|
+
), Ra = p(
|
|
344
344
|
{
|
|
345
345
|
name: "LineChart",
|
|
346
346
|
type: "info"
|
|
347
347
|
},
|
|
348
348
|
we
|
|
349
|
-
), Oa =
|
|
349
|
+
), Oa = p(
|
|
350
350
|
{
|
|
351
351
|
name: "PieChart",
|
|
352
352
|
type: "info"
|
|
353
353
|
},
|
|
354
354
|
Ne
|
|
355
|
-
), $a =
|
|
355
|
+
), $a = p(
|
|
356
356
|
{
|
|
357
357
|
name: "VerticalBarChart",
|
|
358
358
|
type: "info"
|
|
359
359
|
},
|
|
360
360
|
Pe
|
|
361
|
-
), Ea =
|
|
361
|
+
), Ea = p(
|
|
362
362
|
{
|
|
363
363
|
name: "ProgressBarChart",
|
|
364
364
|
type: "info"
|
|
365
365
|
},
|
|
366
366
|
ca
|
|
367
|
-
),
|
|
368
|
-
const [s, l] = v(!1), t = e(
|
|
367
|
+
), $ = ({ count: a, list: r }) => {
|
|
368
|
+
const [s, l] = v(!1), t = e(D, {
|
|
369
369
|
label: `+${a}`
|
|
370
370
|
});
|
|
371
|
-
return r != null && r.length ? c(
|
|
371
|
+
return r != null && r.length ? c(U, {
|
|
372
372
|
open: s,
|
|
373
373
|
onOpenChange: l,
|
|
374
|
-
children: [e(
|
|
374
|
+
children: [e(J, {
|
|
375
375
|
asChild: !0,
|
|
376
376
|
children: e("button", {
|
|
377
377
|
className: Le("inline-flex flex-shrink-0 items-center"),
|
|
378
378
|
children: t
|
|
379
379
|
})
|
|
380
|
-
}), e(
|
|
380
|
+
}), e(Y, {
|
|
381
381
|
className: "rounded-md border border-solid border-f1-border-secondary p-1 shadow-md",
|
|
382
382
|
align: "end",
|
|
383
|
-
children: c(
|
|
383
|
+
children: c(X, {
|
|
384
384
|
className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[172px] flex-col",
|
|
385
385
|
children: [r.map((i, n) => e("div", {
|
|
386
386
|
className: "flex w-[220px] min-w-0 items-center gap-1.5 px-2 py-1 [&:first-child]:pt-2 [&:last-child]:pb-2",
|
|
387
|
-
children: e(
|
|
387
|
+
children: e(D, {
|
|
388
388
|
...i
|
|
389
389
|
})
|
|
390
|
-
}, n)), e(
|
|
390
|
+
}, n)), e(K, {
|
|
391
391
|
orientation: "vertical",
|
|
392
392
|
className: "[&_div]:bg-f1-background"
|
|
393
393
|
})]
|
|
@@ -395,17 +395,17 @@ const da = ({ value: a, max: r = 100, label: s, color: l }, t) => {
|
|
|
395
395
|
})]
|
|
396
396
|
}) : t;
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
const
|
|
398
|
+
$.displayName = "ChipCounter";
|
|
399
|
+
const ue = ({ chips: a, max: r = 4, remainingCount: s, layout: l = "compact" }) => {
|
|
400
400
|
if (l === "fill")
|
|
401
401
|
return e(Fe, {
|
|
402
402
|
items: a,
|
|
403
|
-
renderListItem: (o) => e(
|
|
403
|
+
renderListItem: (o) => e(D, {
|
|
404
404
|
...o
|
|
405
405
|
}),
|
|
406
406
|
renderDropdownItem: () => null,
|
|
407
407
|
forceShowingOverflowIndicator: s !== void 0,
|
|
408
|
-
renderOverflowIndicator: (o) => e(
|
|
408
|
+
renderOverflowIndicator: (o) => e($, {
|
|
409
409
|
count: (s ?? 0) + o,
|
|
410
410
|
list: s ? void 0 : a.slice(a.length - o)
|
|
411
411
|
}),
|
|
@@ -415,28 +415,28 @@ const ce = ({ chips: a, max: r = 4, remainingCount: s, layout: l = "compact" })
|
|
|
415
415
|
const t = a.slice(0, r), i = a.slice(r), n = s ?? a.length - r, d = n > 0;
|
|
416
416
|
return c("div", {
|
|
417
417
|
className: "flex items-center gap-2",
|
|
418
|
-
children: [t.map((o, f) => e(
|
|
418
|
+
children: [t.map((o, f) => e(D, {
|
|
419
419
|
...o
|
|
420
|
-
}, f)), d && e(
|
|
420
|
+
}, f)), d && e($, {
|
|
421
421
|
count: n,
|
|
422
422
|
list: s ? void 0 : i
|
|
423
423
|
})]
|
|
424
424
|
});
|
|
425
425
|
};
|
|
426
|
-
|
|
427
|
-
const _a = Se("F0ChipList",
|
|
426
|
+
ue.displayName = "F0ChipList";
|
|
427
|
+
const _a = Se("F0ChipList", ue), ua = {
|
|
428
428
|
xs: 1,
|
|
429
429
|
sm: 2,
|
|
430
430
|
md: 2,
|
|
431
431
|
lg: 2
|
|
432
432
|
}, fa = I(function({ widgets: r, children: s }, l) {
|
|
433
|
-
const t =
|
|
433
|
+
const t = se(null);
|
|
434
434
|
Ze(l, () => t.current);
|
|
435
435
|
const i = ea.toArray(r).filter((n) => !!n).map((n, d) => e("div", {
|
|
436
436
|
className: "h-full @5xl:h-auto [&>div]:h-full",
|
|
437
437
|
children: n
|
|
438
438
|
}, d));
|
|
439
|
-
return e(
|
|
439
|
+
return e(Q, {
|
|
440
440
|
layout: "home",
|
|
441
441
|
children: c("div", {
|
|
442
442
|
ref: t,
|
|
@@ -484,14 +484,14 @@ const _a = Se("F0ChipList", ce), ua = {
|
|
|
484
484
|
}), ha = ({ children: a, className: r }) => e("aside", {
|
|
485
485
|
className: b("min-w-30 py-5 pl-4 pr-4 sm:basis-1/4 sm:pb-6 md:max-w-80 md:pl-2", r),
|
|
486
486
|
children: a
|
|
487
|
-
}), pa =
|
|
487
|
+
}), pa = Me({
|
|
488
488
|
base: "relative flex min-h-full w-full flex-1 flex-col gap-4 place-self-center overflow-y-auto px-6 py-5",
|
|
489
489
|
variants: {
|
|
490
490
|
variant: {
|
|
491
491
|
narrow: "max-w-screen-lg"
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
}),
|
|
494
|
+
}), fe = Qe.forwardRef(({ children: a, variant: r, className: s, ...l }, t) => e(Q, {
|
|
495
495
|
layout: "standard",
|
|
496
496
|
children: e("section", {
|
|
497
497
|
ref: t,
|
|
@@ -505,14 +505,14 @@ const _a = Se("F0ChipList", ce), ua = {
|
|
|
505
505
|
})
|
|
506
506
|
})
|
|
507
507
|
}));
|
|
508
|
-
|
|
509
|
-
const ja =
|
|
508
|
+
fe.displayName = "StandardLayout";
|
|
509
|
+
const ja = p({
|
|
510
510
|
name: "StandardLayout",
|
|
511
511
|
type: "layout"
|
|
512
|
-
},
|
|
512
|
+
}, fe), za = p({
|
|
513
513
|
name: "TwoColumnLayout",
|
|
514
514
|
type: "layout"
|
|
515
|
-
}, ma), Aa =
|
|
515
|
+
}, ma), Aa = p({
|
|
516
516
|
name: "HomeLayout",
|
|
517
517
|
type: "layout"
|
|
518
518
|
}, fa), ga = ({ benefits: a }) => e("div", {
|
|
@@ -529,7 +529,7 @@ const ja = g({
|
|
|
529
529
|
}), e("span", {
|
|
530
530
|
children: a
|
|
531
531
|
})]
|
|
532
|
-
}),
|
|
532
|
+
}), me = I(({ title: a, image: r, benefits: s, actions: l, withShadow: t = !0, module: i, moduleName: n, tag: d }, o) => c("div", {
|
|
533
533
|
ref: o,
|
|
534
534
|
className: b("bg-white flex flex-row rounded-xl border border-f1-border-secondary", t && "shadow-md"),
|
|
535
535
|
children: [e("div", {
|
|
@@ -547,7 +547,7 @@ const ja = g({
|
|
|
547
547
|
className: "flex flex-col gap-2",
|
|
548
548
|
children: [c("div", {
|
|
549
549
|
className: "flex flex-row items-center gap-2",
|
|
550
|
-
children: [i && e(
|
|
550
|
+
children: [i && e(Z, {
|
|
551
551
|
module: i
|
|
552
552
|
}), n && e("p", {
|
|
553
553
|
className: "text-base font-medium text-f1-foreground",
|
|
@@ -555,7 +555,7 @@ const ja = g({
|
|
|
555
555
|
})]
|
|
556
556
|
}), d && e("div", {
|
|
557
557
|
className: "flex justify-start",
|
|
558
|
-
children: e(
|
|
558
|
+
children: e(De, {
|
|
559
559
|
icon: d.icon,
|
|
560
560
|
text: d.label
|
|
561
561
|
})
|
|
@@ -572,38 +572,38 @@ const ja = g({
|
|
|
572
572
|
})]
|
|
573
573
|
})]
|
|
574
574
|
}));
|
|
575
|
-
|
|
575
|
+
me.displayName = "ProductBlankslate";
|
|
576
576
|
function ba({ isOpen: a, onClose: r, title: s, children: l, module: t, portalContainer: i }) {
|
|
577
577
|
const [n, d] = v(a);
|
|
578
|
-
return
|
|
578
|
+
return te(() => {
|
|
579
579
|
d(a);
|
|
580
|
-
}, [a]), e(
|
|
580
|
+
}, [a]), e(Be, {
|
|
581
581
|
open: n,
|
|
582
582
|
onOpenChange: (f) => {
|
|
583
583
|
d(f), f || r();
|
|
584
584
|
},
|
|
585
585
|
modal: !0,
|
|
586
|
-
children: c(
|
|
586
|
+
children: c(Re, {
|
|
587
587
|
className: "max-h-[620px] w-[760px] overflow-y-auto overflow-x-hidden bg-f1-background",
|
|
588
588
|
container: i,
|
|
589
589
|
children: [c("div", {
|
|
590
590
|
className: "flex flex-row items-center justify-between px-4 py-4",
|
|
591
591
|
children: [c(Oe, {
|
|
592
592
|
className: "flex flex-row items-center gap-2 text-lg font-semibold text-f1-foreground",
|
|
593
|
-
children: [t && e(
|
|
593
|
+
children: [t && e(Z, {
|
|
594
594
|
module: t,
|
|
595
595
|
size: "lg"
|
|
596
596
|
}), s]
|
|
597
597
|
}), e($e, {
|
|
598
598
|
variant: "outline",
|
|
599
|
-
icon:
|
|
599
|
+
icon: ee,
|
|
600
600
|
onClick: r,
|
|
601
601
|
label: "Close modal",
|
|
602
602
|
hideLabel: !0
|
|
603
603
|
})]
|
|
604
|
-
}), c(
|
|
604
|
+
}), c(X, {
|
|
605
605
|
className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[512px] flex-col",
|
|
606
|
-
children: [l, e(
|
|
606
|
+
children: [l, e(K, {
|
|
607
607
|
orientation: "vertical",
|
|
608
608
|
className: "[&_div]:bg-f1-background"
|
|
609
609
|
})]
|
|
@@ -611,43 +611,43 @@ function ba({ isOpen: a, onClose: r, title: s, children: l, module: t, portalCon
|
|
|
611
611
|
})
|
|
612
612
|
});
|
|
613
613
|
}
|
|
614
|
-
function Va({ isOpen: a, onClose: r, title: s, image: l, benefits: t, errorMessage: i, successMessage: n, loadingState: d, nextSteps: o, closeLabel: f, primaryAction: m, modalTitle: N, modalModule: P, secondaryAction: u, portalContainer:
|
|
615
|
-
const [
|
|
614
|
+
function Va({ isOpen: a, onClose: r, title: s, image: l, benefits: t, errorMessage: i, successMessage: n, loadingState: d, nextSteps: o, closeLabel: f, primaryAction: m, modalTitle: N, modalModule: P, secondaryAction: u, portalContainer: C, tag: k, showResponseDialog: L = !0 }) {
|
|
615
|
+
const [B, y] = v(a), [S, x] = v(null), [g, F] = v(!1), R = async () => {
|
|
616
616
|
if (m != null && m.onClick) {
|
|
617
|
-
|
|
617
|
+
F(!0);
|
|
618
618
|
try {
|
|
619
|
-
await m.onClick(),
|
|
619
|
+
await m.onClick(), y(!1), L && x("success");
|
|
620
620
|
} catch {
|
|
621
|
-
|
|
621
|
+
L && x("error");
|
|
622
622
|
} finally {
|
|
623
|
-
|
|
623
|
+
F(!1);
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
},
|
|
627
|
-
|
|
628
|
-
},
|
|
629
|
-
return c(
|
|
626
|
+
}, M = () => {
|
|
627
|
+
y(!1), r == null || r();
|
|
628
|
+
}, O = g;
|
|
629
|
+
return c(E, {
|
|
630
630
|
children: [e(ba, {
|
|
631
|
-
isOpen:
|
|
632
|
-
onClose:
|
|
631
|
+
isOpen: B,
|
|
632
|
+
onClose: M,
|
|
633
633
|
title: N,
|
|
634
634
|
module: P,
|
|
635
|
-
portalContainer:
|
|
635
|
+
portalContainer: C,
|
|
636
636
|
children: e("div", {
|
|
637
637
|
className: "pb-4 pl-4",
|
|
638
|
-
children: e(
|
|
638
|
+
children: e(me, {
|
|
639
639
|
title: s,
|
|
640
640
|
image: l,
|
|
641
641
|
benefits: t,
|
|
642
642
|
withShadow: !1,
|
|
643
|
-
tag:
|
|
643
|
+
tag: k,
|
|
644
644
|
actions: c("div", {
|
|
645
645
|
className: "flex gap-3",
|
|
646
646
|
children: [m && e(w, {
|
|
647
647
|
variant: m.variant,
|
|
648
|
-
label:
|
|
648
|
+
label: O ? d.label : m.label,
|
|
649
649
|
icon: m.icon || void 0,
|
|
650
|
-
onClick:
|
|
650
|
+
onClick: R,
|
|
651
651
|
loading: m.loading,
|
|
652
652
|
size: m.size
|
|
653
653
|
}), u && e(w, {
|
|
@@ -660,17 +660,17 @@ function Va({ isOpen: a, onClose: r, title: s, image: l, benefits: t, errorMessa
|
|
|
660
660
|
})
|
|
661
661
|
})
|
|
662
662
|
})
|
|
663
|
-
}),
|
|
663
|
+
}), S && L && e(ae, {
|
|
664
664
|
open: !0,
|
|
665
665
|
onClose: () => {
|
|
666
|
-
|
|
666
|
+
M(), x(null);
|
|
667
667
|
},
|
|
668
|
-
success:
|
|
668
|
+
success: S === "success",
|
|
669
669
|
errorMessage: i,
|
|
670
670
|
successMessage: n,
|
|
671
671
|
nextSteps: o,
|
|
672
672
|
closeLabel: f,
|
|
673
|
-
portalContainer:
|
|
673
|
+
portalContainer: C
|
|
674
674
|
})]
|
|
675
675
|
});
|
|
676
676
|
}
|
|
@@ -678,11 +678,11 @@ function xa({ mediaUrl: a, title: r, description: s, onClose: l, dismissible: t,
|
|
|
678
678
|
const [f, m] = v(!1), N = () => {
|
|
679
679
|
m(!0), l && l();
|
|
680
680
|
};
|
|
681
|
-
|
|
681
|
+
te(() => {
|
|
682
682
|
n && n(!f);
|
|
683
683
|
}, [n, f]);
|
|
684
684
|
const P = a == null ? void 0 : a.includes(".mp4");
|
|
685
|
-
return e(
|
|
685
|
+
return e(E, {
|
|
686
686
|
children: f ? null : c(Ee, {
|
|
687
687
|
style: {
|
|
688
688
|
width: i
|
|
@@ -693,7 +693,7 @@ function xa({ mediaUrl: a, title: r, description: s, onClose: l, dismissible: t,
|
|
|
693
693
|
className: "absolute right-2 top-2 z-10",
|
|
694
694
|
children: e(w, {
|
|
695
695
|
variant: "ghost",
|
|
696
|
-
icon:
|
|
696
|
+
icon: ee,
|
|
697
697
|
size: "sm",
|
|
698
698
|
hideLabel: !0,
|
|
699
699
|
onClick: N,
|
|
@@ -715,10 +715,10 @@ function xa({ mediaUrl: a, title: r, description: s, onClose: l, dismissible: t,
|
|
|
715
715
|
}))
|
|
716
716
|
}), c("div", {
|
|
717
717
|
className: "flex flex-col gap-[2px] p-3",
|
|
718
|
-
children: [e(
|
|
718
|
+
children: [e(V, {
|
|
719
719
|
className: "text-lg font-medium",
|
|
720
720
|
children: r
|
|
721
|
-
}), e(
|
|
721
|
+
}), e(V, {
|
|
722
722
|
className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary",
|
|
723
723
|
children: s
|
|
724
724
|
})]
|
|
@@ -726,7 +726,7 @@ function xa({ mediaUrl: a, title: r, description: s, onClose: l, dismissible: t,
|
|
|
726
726
|
})]
|
|
727
727
|
}), d && e(je, {
|
|
728
728
|
className: "p-3",
|
|
729
|
-
children: d.map((u) => u.type === "upsell" ? e(
|
|
729
|
+
children: d.map((u) => u.type === "upsell" ? e(re, {
|
|
730
730
|
label: u.label,
|
|
731
731
|
onRequest: u.onClick,
|
|
732
732
|
errorMessage: u.errorMessage,
|
|
@@ -746,7 +746,7 @@ function xa({ mediaUrl: a, title: r, description: s, onClose: l, dismissible: t,
|
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
748
|
const Ca = I(function({ primaryAction: r, secondaryAction: s, ...l }, t) {
|
|
749
|
-
const i = (o) => o.variant === "promote" ? e(
|
|
749
|
+
const i = (o) => o.variant === "promote" ? e(re, {
|
|
750
750
|
label: o.label,
|
|
751
751
|
onRequest: async () => {
|
|
752
752
|
await o.onClick();
|
|
@@ -775,29 +775,29 @@ const Ca = I(function({ primaryAction: r, secondaryAction: s, ...l }, t) {
|
|
|
775
775
|
});
|
|
776
776
|
});
|
|
777
777
|
Ca.displayName = "UpsellingBanner";
|
|
778
|
-
function qa({ isOpen: a, setIsOpen: r, label: s, variant: l = "promote", size: t = "md", showIcon: i = !0, side: n = "right", align: d = "center", icon: o = Ae, mediaUrl: f, title: m, description: N, width: P = "300px", trackVisibility: u, actions:
|
|
779
|
-
const [
|
|
780
|
-
r(
|
|
781
|
-
},
|
|
782
|
-
if (
|
|
783
|
-
|
|
778
|
+
function qa({ isOpen: a, setIsOpen: r, label: s, variant: l = "promote", size: t = "md", showIcon: i = !0, side: n = "right", align: d = "center", icon: o = Ae, mediaUrl: f, title: m, description: N, width: P = "300px", trackVisibility: u, actions: C, onClick: k, hideLabel: L = !1 }) {
|
|
779
|
+
const [B, y] = v(!1), [S, x] = v(null), [g, F] = v(null), R = (h) => {
|
|
780
|
+
r(h), k && k();
|
|
781
|
+
}, M = async (h) => {
|
|
782
|
+
if (h.type === "upsell") {
|
|
783
|
+
F(h);
|
|
784
784
|
try {
|
|
785
|
-
await
|
|
785
|
+
await h.onClick(), h.showConfirmation && (y(!0), x("success"));
|
|
786
786
|
} catch {
|
|
787
|
-
|
|
787
|
+
y(!0), x("error");
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
},
|
|
791
|
-
|
|
792
|
-
}, he = a && !
|
|
793
|
-
...
|
|
794
|
-
onClick: () =>
|
|
795
|
-
} :
|
|
796
|
-
return c(
|
|
797
|
-
children: [c(
|
|
790
|
+
}, O = () => {
|
|
791
|
+
x(null), y(!1), F(null), r(!1);
|
|
792
|
+
}, he = a && !B, pe = C == null ? void 0 : C.map((h) => h.type === "upsell" ? {
|
|
793
|
+
...h,
|
|
794
|
+
onClick: () => M(h)
|
|
795
|
+
} : h);
|
|
796
|
+
return c(E, {
|
|
797
|
+
children: [c(U, {
|
|
798
798
|
open: he,
|
|
799
|
-
onOpenChange:
|
|
800
|
-
children: [e(
|
|
799
|
+
onOpenChange: R,
|
|
800
|
+
children: [e(J, {
|
|
801
801
|
asChild: !0,
|
|
802
802
|
children: e(w, {
|
|
803
803
|
variant: l,
|
|
@@ -805,9 +805,9 @@ function qa({ isOpen: a, setIsOpen: r, label: s, variant: l = "promote", size: t
|
|
|
805
805
|
size: t,
|
|
806
806
|
icon: i ? o : void 0,
|
|
807
807
|
onClick: () => r(a),
|
|
808
|
-
hideLabel:
|
|
808
|
+
hideLabel: L
|
|
809
809
|
})
|
|
810
|
-
}), e(
|
|
810
|
+
}), e(Y, {
|
|
811
811
|
side: n,
|
|
812
812
|
align: d,
|
|
813
813
|
className: "w-fit border-none bg-transparent p-2 shadow-none",
|
|
@@ -823,20 +823,20 @@ function qa({ isOpen: a, setIsOpen: r, label: s, variant: l = "promote", size: t
|
|
|
823
823
|
showConfirmation: !1
|
|
824
824
|
})
|
|
825
825
|
})]
|
|
826
|
-
}), (
|
|
826
|
+
}), (g == null ? void 0 : g.type) === "upsell" && g.showConfirmation && S && e(ae, {
|
|
827
827
|
open: !0,
|
|
828
|
-
onClose:
|
|
829
|
-
success:
|
|
830
|
-
errorMessage:
|
|
831
|
-
successMessage:
|
|
832
|
-
nextSteps:
|
|
833
|
-
closeLabel:
|
|
828
|
+
onClose: O,
|
|
829
|
+
success: S === "success",
|
|
830
|
+
errorMessage: g.errorMessage,
|
|
831
|
+
successMessage: g.successMessage,
|
|
832
|
+
nextSteps: g.nextSteps,
|
|
833
|
+
closeLabel: g.closeLabel,
|
|
834
834
|
portalContainer: null
|
|
835
835
|
})]
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
838
|
const ya = aa(null), wa = ({ children: a, fullScreen: r = !0 }) => {
|
|
839
|
-
const s =
|
|
839
|
+
const s = se(null), [l, t] = v(s.current);
|
|
840
840
|
return Ke(() => {
|
|
841
841
|
t(s.current);
|
|
842
842
|
}, []), e(ya.Provider, {
|
|
@@ -884,12 +884,12 @@ const ya = aa(null), wa = ({ children: a, fullScreen: r = !0 }) => {
|
|
|
884
884
|
})
|
|
885
885
|
})
|
|
886
886
|
})
|
|
887
|
-
}),
|
|
887
|
+
}), G = (a) => `datacollection-${a}`, Ga = {
|
|
888
888
|
get: async (a) => JSON.parse(
|
|
889
|
-
localStorage.getItem(
|
|
889
|
+
localStorage.getItem(G(a)) ?? "{}"
|
|
890
890
|
),
|
|
891
891
|
set: async (a, r) => {
|
|
892
|
-
localStorage.setItem(
|
|
892
|
+
localStorage.setItem(G(a), JSON.stringify(r));
|
|
893
893
|
}
|
|
894
894
|
};
|
|
895
895
|
export {
|
|
@@ -897,7 +897,7 @@ export {
|
|
|
897
897
|
Ja as Await,
|
|
898
898
|
Ia as BarChart,
|
|
899
899
|
w as Button,
|
|
900
|
-
|
|
900
|
+
Ba as CategoryBarChart,
|
|
901
901
|
Ya as CopyButton,
|
|
902
902
|
Xa as DndProvider,
|
|
903
903
|
Ka as EmojiImage,
|
|
@@ -909,7 +909,7 @@ export {
|
|
|
909
909
|
sr as F0AvatarFile,
|
|
910
910
|
tr as F0AvatarIcon,
|
|
911
911
|
lr as F0AvatarList,
|
|
912
|
-
|
|
912
|
+
Z as F0AvatarModule,
|
|
913
913
|
or as F0AvatarPerson,
|
|
914
914
|
nr as F0AvatarTeam,
|
|
915
915
|
ir as F0Card,
|
|
@@ -924,17 +924,17 @@ export {
|
|
|
924
924
|
hr as F0TagDot,
|
|
925
925
|
pr as F0TagList,
|
|
926
926
|
gr as F0TagPerson,
|
|
927
|
-
|
|
927
|
+
De as F0TagRaw,
|
|
928
928
|
vr as F0TagStatus,
|
|
929
929
|
br as F0TagTeam,
|
|
930
930
|
xr as GROUP_ID_SYMBOL,
|
|
931
931
|
Aa as HomeLayout,
|
|
932
|
-
|
|
932
|
+
Ra as LineChart,
|
|
933
933
|
ka as Link,
|
|
934
934
|
Cr as OneFilterPicker,
|
|
935
935
|
Oa as PieChart,
|
|
936
936
|
Ue as PrivacyModeProvider,
|
|
937
|
-
|
|
937
|
+
me as ProductBlankslate,
|
|
938
938
|
yr as ProductCard,
|
|
939
939
|
Va as ProductModal,
|
|
940
940
|
xa as ProductWidget,
|
|
@@ -942,12 +942,12 @@ export {
|
|
|
942
942
|
ja as StandardLayout,
|
|
943
943
|
wr as TagCounter,
|
|
944
944
|
za as TwoColumnLayout,
|
|
945
|
-
|
|
945
|
+
ae as UpsellRequestResponseDialog,
|
|
946
946
|
Ca as UpsellingBanner,
|
|
947
|
-
|
|
947
|
+
re as UpsellingButton,
|
|
948
948
|
qa as UpsellingPopover,
|
|
949
949
|
$a as VerticalBarChart,
|
|
950
|
-
|
|
950
|
+
Ma as avatarVariants,
|
|
951
951
|
Nr as buildTranslations,
|
|
952
952
|
Pr as createAtlaskitDriver,
|
|
953
953
|
Lr as createDataSourceDefinition,
|
|
@@ -957,12 +957,12 @@ export {
|
|
|
957
957
|
Sr as getAnimationVariants,
|
|
958
958
|
Fr as getDataSourcePaginationType,
|
|
959
959
|
kr as getEmojiLabel,
|
|
960
|
-
|
|
961
|
-
|
|
960
|
+
Mr as isInfiniteScrollPagination,
|
|
961
|
+
Dr as isPageBasedPagination,
|
|
962
962
|
Tr as modules,
|
|
963
963
|
Ir as tagDotColors,
|
|
964
|
-
|
|
965
|
-
|
|
964
|
+
Br as useData,
|
|
965
|
+
Rr as useDataSource,
|
|
966
966
|
Or as useDndEvents,
|
|
967
967
|
$r as useDraggable,
|
|
968
968
|
Er as useDroppableList,
|