@factorialco/f0-react 2.1.0 → 2.3.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/ai.js +2 -2
- package/dist/experimental.d.ts +40 -0
- package/dist/experimental.js +4 -4
- package/dist/f0.d.ts +73 -0
- package/dist/f0.js +1210 -1153
- package/dist/{index-B4mNCbMc.js → index-C3C31VSu.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-BQbiqg33.js → types-zUkcMLoO.js} +1 -1
- package/dist/{useDataCollectionSource-BrDW9ABH.js → useDataCollectionSource-BNMQa-mV.js} +22838 -22678
- package/package.json +1 -1
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as o, l as e, k as r, F as t, a as n, C as i, b as d, m as C, n as F, e as l, h as m, I as u, g as h, c as A, i as D, u as c, j as v, f as I } from "./useDataCollectionSource-
|
|
1
|
+
import { d as o, l as e, k as r, F as t, a as n, C as i, b as d, m as C, n as F, e as l, h as m, I as u, g as h, c as A, i as D, u as c, j as v, f as I } from "./useDataCollectionSource-BNMQa-mV.js";
|
|
2
2
|
import { defaultTranslations as b } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as S, C as T, c as p, D as P, a as w, b as x, e as H, f as M, g as V, h as k, p as j, l as y, m as O, n as q, i as z, F as B, d as E, M as L, k as W, j as G, q as J, o as K, s as N, u as Q } from "./types-
|
|
3
|
+
import { A as S, C as T, c as p, D as P, a as w, b as x, e as H, f as M, g as V, h as k, p as j, l as y, m as O, n as q, i as z, F as B, d as E, M as L, k as W, j as G, q as J, o as K, s as N, u as Q } from "./types-zUkcMLoO.js";
|
|
4
4
|
export {
|
|
5
5
|
S as AiChatTranslationsProvider,
|
|
6
6
|
o as CanvasCard,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -3720,6 +3720,46 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
|
|
|
3720
3720
|
* Falls back to sensible defaults when omitted.
|
|
3721
3721
|
*/
|
|
3722
3722
|
numberConfig?: NumberCellConfig<R>;
|
|
3723
|
+
/**
|
|
3724
|
+
* Called after this cell's value changes. Use to compute derived values
|
|
3725
|
+
* and update other cells in the same row.
|
|
3726
|
+
*
|
|
3727
|
+
* Works with every cell type (text, number, date, select, etc.).
|
|
3728
|
+
*
|
|
3729
|
+
* @example
|
|
3730
|
+
* formula: ({ value, setCellValue }) => {
|
|
3731
|
+
* const hours = roleHoursMap[value as string]
|
|
3732
|
+
* if (hours != null) setCellValue("plannedHours", hours)
|
|
3733
|
+
* }
|
|
3734
|
+
*/
|
|
3735
|
+
formula?: (params: {
|
|
3736
|
+
/** The new value of this cell. */
|
|
3737
|
+
value: unknown;
|
|
3738
|
+
/** The current row item (before this change is applied). */
|
|
3739
|
+
item: R;
|
|
3740
|
+
/** For select cells: the full record associated with the selected option. */
|
|
3741
|
+
selectedItem?: RecordType;
|
|
3742
|
+
/** Update another cell in the same row by column id. */
|
|
3743
|
+
setCellValue: (columnId: string, value: unknown) => void;
|
|
3744
|
+
}) => void;
|
|
3745
|
+
/**
|
|
3746
|
+
* Returns a hint to display as an icon with tooltip inside the cell.
|
|
3747
|
+
* Use to warn the user when a value diverges from its formula-inferred value.
|
|
3748
|
+
*
|
|
3749
|
+
* Return `undefined` to hide the hint.
|
|
3750
|
+
*
|
|
3751
|
+
* @example
|
|
3752
|
+
* cellHint: (item) => {
|
|
3753
|
+
* if (item._inferredSalary != null && item.salary !== item._inferredSalary) {
|
|
3754
|
+
* return { icon: AlertCircle, message: `Differs from catalog (${item._inferredSalary})` }
|
|
3755
|
+
* }
|
|
3756
|
+
* }
|
|
3757
|
+
*/
|
|
3758
|
+
cellHint?: (item: R) => {
|
|
3759
|
+
icon: IconType;
|
|
3760
|
+
message: string;
|
|
3761
|
+
iconColor?: F0IconProps["color"];
|
|
3762
|
+
} | undefined;
|
|
3723
3763
|
};
|
|
3724
3764
|
|
|
3725
3765
|
declare type EditableTableVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = Omit<TableVisualizationOptions<R, _Filters, Sortings, Summaries>, "columns"> & {
|
package/dist/experimental.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { o as oa, B as ca, p as da, D as ua, q as Ft, r as Te, s as fa, t as b, v as Z, w as pe, u as se, T as ma, x as ha, y as ba, R as pa, z as ga, A as oe, E as xa, G as ht, H as rt, J as Re, K as Ee, L as va, M as wa, N as $, O as ya, P as Na, Q as _e, S as ln, U as Ca, V as ka, W as R, X as sn, Y as E, Z as ve, _ as Sa, $ as Ia, a0 as Fa, a1 as Aa, a2 as La, a3 as Ce, a4 as on, a5 as Ea, a6 as ge, a7 as $e, a8 as _a, a9 as bt, n as cn, aa as Ne, ab as Oa, ac as dn, ad as ne, ae as H, af as un, ag as fn, ah as Ta, ai as mn, aj as me, ak as ee, al as Da, am as za, an as Pa, ao as Ba, ap as be, aq as Ge, ar as Ra, as as $a, at as Wa, au as Ma, av as He, aw as hn, ax as ja, ay as Va, az as Ga, aA as We, aB as Ha, aC as Ua, aD as Ka, aE as qa, aF as Ya, aG as Za, aH as Xa, aI as Ja, aJ as Qa, aK as er, aL as lt, aM as it, aN as bn, aO as tr, aP as nr, aQ as pn, aR as ar, aS as rr, aT as Ue, aU as pt, aV as gn, aW as lr, aX as xn, aY as ir, aZ as sr, a_ as or, a$ as Le, b0 as cr, b1 as De, b2 as At, b3 as st, b4 as dr, b5 as ur, a as fr, g as mr, b6 as hr, b7 as vn, b8 as br, b9 as pr, F as gr, ba as wn, bb as xr, bc as yn, bd as vr, be as Lt, bf as wr, bg as yr, bh as Nr, bi as Cr, bj as Nn, bk as kr, bl as Sr, bm as Ir, bn as Fr, bo as Ar, bp as Cn, bq as ue, br as kn, bs as gt, bt as xt, bu as vt, bv as Sn, bw as wt, bx as In, by as Fn, bz as Lr, bA as Er, bB as _r, bC as Or, bD as Tr, bE as Dr, bF as zr, bG as Pr, bH as Br, bI as Rr, bJ as $r, bK as Et, bL as _t, bM as Ot, bN as Wr, bO as Mr, bP as jr, bQ as Vr, bR as An, bS as Gr, bT as Hr, bU as Ur } from "./useDataCollectionSource-
|
|
2
|
-
import { cd as Ac, cc as Lc, bX as Ec, cp as _c, c6 as Oc, c7 as Tc, bW as Dc, c9 as zc, bY as Pc, cB as Bc, cz as Rc, bZ as $c, ca as Wc, cb as Mc, c8 as jc, b_ as Vc, cl as Gc, cm as Hc, cq as Uc, cx as Kc, cy as qc, c4 as Yc, cA as Zc, c5 as Xc, b$ as Jc, cf as Qc, ce as ed, c0 as td, c1 as nd, c2 as ad, cn as rd, cC as ld, bV as id, co as sd, cs as od, ct as cd, ck as dd, ch as ud, cj as fd, cg as md, c3 as hd, ci as bd, cu as pd, cv as gd, cr as xd, cw as vd } from "./useDataCollectionSource-
|
|
1
|
+
import { o as oa, B as ca, p as da, D as ua, q as Ft, r as Te, s as fa, t as b, v as Z, w as pe, u as se, T as ma, x as ha, y as ba, R as pa, z as ga, A as oe, E as xa, G as ht, H as rt, J as Re, K as Ee, L as va, M as wa, N as $, O as ya, P as Na, Q as _e, S as ln, U as Ca, V as ka, W as R, X as sn, Y as E, Z as ve, _ as Sa, $ as Ia, a0 as Fa, a1 as Aa, a2 as La, a3 as Ce, a4 as on, a5 as Ea, a6 as ge, a7 as $e, a8 as _a, a9 as bt, n as cn, aa as Ne, ab as Oa, ac as dn, ad as ne, ae as H, af as un, ag as fn, ah as Ta, ai as mn, aj as me, ak as ee, al as Da, am as za, an as Pa, ao as Ba, ap as be, aq as Ge, ar as Ra, as as $a, at as Wa, au as Ma, av as He, aw as hn, ax as ja, ay as Va, az as Ga, aA as We, aB as Ha, aC as Ua, aD as Ka, aE as qa, aF as Ya, aG as Za, aH as Xa, aI as Ja, aJ as Qa, aK as er, aL as lt, aM as it, aN as bn, aO as tr, aP as nr, aQ as pn, aR as ar, aS as rr, aT as Ue, aU as pt, aV as gn, aW as lr, aX as xn, aY as ir, aZ as sr, a_ as or, a$ as Le, b0 as cr, b1 as De, b2 as At, b3 as st, b4 as dr, b5 as ur, a as fr, g as mr, b6 as hr, b7 as vn, b8 as br, b9 as pr, F as gr, ba as wn, bb as xr, bc as yn, bd as vr, be as Lt, bf as wr, bg as yr, bh as Nr, bi as Cr, bj as Nn, bk as kr, bl as Sr, bm as Ir, bn as Fr, bo as Ar, bp as Cn, bq as ue, br as kn, bs as gt, bt as xt, bu as vt, bv as Sn, bw as wt, bx as In, by as Fn, bz as Lr, bA as Er, bB as _r, bC as Or, bD as Tr, bE as Dr, bF as zr, bG as Pr, bH as Br, bI as Rr, bJ as $r, bK as Et, bL as _t, bM as Ot, bN as Wr, bO as Mr, bP as jr, bQ as Vr, bR as An, bS as Gr, bT as Hr, bU as Ur } from "./useDataCollectionSource-BNMQa-mV.js";
|
|
2
|
+
import { cd as Ac, cc as Lc, bX as Ec, cp as _c, c6 as Oc, c7 as Tc, bW as Dc, c9 as zc, bY as Pc, cB as Bc, cz as Rc, bZ as $c, ca as Wc, cb as Mc, c8 as jc, b_ as Vc, cl as Gc, cm as Hc, cq as Uc, cx as Kc, cy as qc, c4 as Yc, cA as Zc, c5 as Xc, b$ as Jc, cf as Qc, ce as ed, c0 as td, c1 as nd, c2 as ad, cn as rd, cC as ld, bV as id, co as sd, cs as od, ct as cd, ck as dd, ch as ud, cj as fd, cg as md, c3 as hd, ci as bd, cu as pd, cv as gd, cr as xd, cw as vd } from "./useDataCollectionSource-BNMQa-mV.js";
|
|
3
3
|
import { jsx as e, jsxs as o, Fragment as U } from "react/jsx-runtime";
|
|
4
4
|
import re, { forwardRef as j, useRef as V, useTransition as Kr, useState as _, useLayoutEffect as Ln, useId as qr, useContext as Ke, createContext as yt, useEffect as W, useCallback as Q, useMemo as K, Fragment as Yr, isValidElement as Zr, cloneElement as En, Children as _n } from "react";
|
|
5
|
-
import { C as Xr, P as Jr, g as On, c as Qr, F as ot, f as el, a as tl, A as nl, B as al, L as rl, b as ll, V as il, d as sl, e as Tt, h as ol, i as cl } from "./index-
|
|
6
|
-
import { l as yd, m as Nd, j as Cd, n as kd, s as Sd, D as Id, k as Fd, o as Ad, v as Ld, w as Ed, N as _d, x as Od, p as Td, r as Dd, R as zd, q as Pd, u as Bd, t as Rd } from "./index-
|
|
5
|
+
import { C as Xr, P as Jr, g as On, c as Qr, F as ot, f as el, a as tl, A as nl, B as al, L as rl, b as ll, V as il, d as sl, e as Tt, h as ol, i as cl } from "./index-C3C31VSu.js";
|
|
6
|
+
import { l as yd, m as Nd, j as Cd, n as kd, s as Sd, D as Id, k as Fd, o as Ad, v as Ld, w as Ed, N as _d, x as Od, p as Td, r as Dd, R as zd, q as Pd, u as Bd, t as Rd } from "./index-C3C31VSu.js";
|
|
7
7
|
const dl = oa("Search", [
|
|
8
8
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
9
9
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
package/dist/f0.d.ts
CHANGED
|
@@ -1059,6 +1059,16 @@ export declare const aiTranslations: {
|
|
|
1059
1059
|
};
|
|
1060
1060
|
};
|
|
1061
1061
|
|
|
1062
|
+
declare type AlertAction = {
|
|
1063
|
+
label: string;
|
|
1064
|
+
onRequest: UpsellingButtonProps["onRequest"];
|
|
1065
|
+
errorMessage: UpsellingButtonProps["errorMessage"];
|
|
1066
|
+
successMessage: UpsellingButtonProps["successMessage"];
|
|
1067
|
+
loadingState: UpsellingButtonProps["loadingState"];
|
|
1068
|
+
nextSteps: UpsellingButtonProps["nextSteps"];
|
|
1069
|
+
closeLabel: UpsellingButtonProps["closeLabel"];
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1062
1072
|
export declare type AlertAvatarProps = VariantProps<typeof alertAvatarVariants> & {
|
|
1063
1073
|
type: (typeof alertAvatarTypes)[number];
|
|
1064
1074
|
size?: (typeof alertAvatarSizes)[number];
|
|
@@ -5035,6 +5045,46 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
|
|
|
5035
5045
|
* Falls back to sensible defaults when omitted.
|
|
5036
5046
|
*/
|
|
5037
5047
|
numberConfig?: NumberCellConfig<R>;
|
|
5048
|
+
/**
|
|
5049
|
+
* Called after this cell's value changes. Use to compute derived values
|
|
5050
|
+
* and update other cells in the same row.
|
|
5051
|
+
*
|
|
5052
|
+
* Works with every cell type (text, number, date, select, etc.).
|
|
5053
|
+
*
|
|
5054
|
+
* @example
|
|
5055
|
+
* formula: ({ value, setCellValue }) => {
|
|
5056
|
+
* const hours = roleHoursMap[value as string]
|
|
5057
|
+
* if (hours != null) setCellValue("plannedHours", hours)
|
|
5058
|
+
* }
|
|
5059
|
+
*/
|
|
5060
|
+
formula?: (params: {
|
|
5061
|
+
/** The new value of this cell. */
|
|
5062
|
+
value: unknown;
|
|
5063
|
+
/** The current row item (before this change is applied). */
|
|
5064
|
+
item: R;
|
|
5065
|
+
/** For select cells: the full record associated with the selected option. */
|
|
5066
|
+
selectedItem?: RecordType;
|
|
5067
|
+
/** Update another cell in the same row by column id. */
|
|
5068
|
+
setCellValue: (columnId: string, value: unknown) => void;
|
|
5069
|
+
}) => void;
|
|
5070
|
+
/**
|
|
5071
|
+
* Returns a hint to display as an icon with tooltip inside the cell.
|
|
5072
|
+
* Use to warn the user when a value diverges from its formula-inferred value.
|
|
5073
|
+
*
|
|
5074
|
+
* Return `undefined` to hide the hint.
|
|
5075
|
+
*
|
|
5076
|
+
* @example
|
|
5077
|
+
* cellHint: (item) => {
|
|
5078
|
+
* if (item._inferredSalary != null && item.salary !== item._inferredSalary) {
|
|
5079
|
+
* return { icon: AlertCircle, message: `Differs from catalog (${item._inferredSalary})` }
|
|
5080
|
+
* }
|
|
5081
|
+
* }
|
|
5082
|
+
*/
|
|
5083
|
+
cellHint?: (item: R) => {
|
|
5084
|
+
icon: IconType;
|
|
5085
|
+
message: string;
|
|
5086
|
+
iconColor?: F0IconProps["color"];
|
|
5087
|
+
} | undefined;
|
|
5038
5088
|
};
|
|
5039
5089
|
|
|
5040
5090
|
declare type EditableTableVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = Omit<TableVisualizationOptions<R, _Filters, Sortings, Summaries>, "columns"> & {
|
|
@@ -13424,6 +13474,29 @@ declare type UpsellAction = BaseAction & {
|
|
|
13424
13474
|
showConfirmation: boolean;
|
|
13425
13475
|
};
|
|
13426
13476
|
|
|
13477
|
+
export declare const UpsellingAlert: WithDataTestIdReturnType_4<typeof _UpsellingAlert>;
|
|
13478
|
+
|
|
13479
|
+
declare function _UpsellingAlert({ icon, title, description, action, }: UpsellingAlertProps): JSX_2.Element;
|
|
13480
|
+
|
|
13481
|
+
export declare interface UpsellingAlertProps {
|
|
13482
|
+
/**
|
|
13483
|
+
* Optional icon displayed as an avatar on the left side of the alert.
|
|
13484
|
+
*/
|
|
13485
|
+
icon?: IconType;
|
|
13486
|
+
/**
|
|
13487
|
+
* The title of the alert
|
|
13488
|
+
*/
|
|
13489
|
+
title: string;
|
|
13490
|
+
/**
|
|
13491
|
+
* The description of the alert
|
|
13492
|
+
*/
|
|
13493
|
+
description?: string;
|
|
13494
|
+
/**
|
|
13495
|
+
* The upselling action button configuration.
|
|
13496
|
+
*/
|
|
13497
|
+
action: AlertAction;
|
|
13498
|
+
}
|
|
13499
|
+
|
|
13427
13500
|
export declare const UpsellingBanner: WithDataTestIdReturnType_4<ForwardRefExoticComponent<Omit<BaseBannerProps, "children" | "primaryAction" | "secondaryAction"> & {
|
|
13428
13501
|
primaryAction?: DefaultAction | PromoteAction;
|
|
13429
13502
|
secondaryAction?: DefaultAction | PromoteAction;
|