@factorialco/f0-react 1.388.4 → 1.390.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/{DataCollectionStorageProvider-Dhth1f1i.js → DataCollectionStorageProvider-DliGArb_.js} +9984 -9692
- package/dist/{F0AiChat-BXyvQ3uC.js → F0AiChat-nPbqtFaA.js} +12975 -12899
- package/dist/{F0HILActionConfirmation-BirXmMOJ.js → F0HILActionConfirmation-B5UWkFgg.js} +1 -1
- package/dist/ai.d.ts +5 -0
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +62 -1
- package/dist/experimental.js +9286 -8625
- package/dist/f0.d.ts +79 -10
- package/dist/f0.js +2276 -2458
- package/dist/i18n-provider-defaults.d.ts +5 -0
- package/dist/i18n-provider-defaults.js +8 -3
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as G, jsxs as le } from "react/jsx-runtime";
|
|
2
2
|
import { useInsertionEffect as Ge, createContext as ke, useContext as $e, useRef as _, useEffect as ne, useState as _e, useCallback as Ye, useMemo as ze } from "react";
|
|
3
|
-
import { G as qe, J as We, K as He, M as je, N as Ne, Q as Ke, R as Qe, V as Je, W as Ze, X as et, Y as Ce, Z as tt, _ as rt, $ as nt, a0 as it, a1 as ot, a2 as at, a3 as st, a4 as ie, a5 as ct, a6 as ut, a7 as lt, a8 as ft, a9 as mt, aa as dt, ab as fe, ac as ht } from "./F0AiChat-
|
|
3
|
+
import { G as qe, J as We, K as He, M as je, N as Ne, Q as Ke, R as Qe, V as Je, W as Ze, X as et, Y as Ce, Z as tt, _ as rt, $ as nt, a0 as it, a1 as ot, a2 as at, a3 as st, a4 as ie, a5 as ct, a6 as ut, a7 as lt, a8 as ft, a9 as mt, aa as dt, ab as fe, ac as ht } from "./F0AiChat-nPbqtFaA.js";
|
|
4
4
|
import { useTrackVolume as pt } from "@livekit/components-react";
|
|
5
5
|
function vt(t, e, r) {
|
|
6
6
|
Ge(() => t.on(e, r), [t, e, r]);
|
package/dist/ai.d.ts
CHANGED
|
@@ -725,6 +725,8 @@ export declare const defaultTranslations: {
|
|
|
725
725
|
readonly deleteQuestion: "Delete question";
|
|
726
726
|
readonly duplicateSection: "Duplicate section";
|
|
727
727
|
readonly deleteSection: "Delete section";
|
|
728
|
+
readonly confirmMoveLastQuestion: "Move question";
|
|
729
|
+
readonly cancelMoveLastQuestion: "Cancel";
|
|
728
730
|
};
|
|
729
731
|
readonly questionTypes: {
|
|
730
732
|
readonly section: "Section";
|
|
@@ -736,6 +738,7 @@ export declare const defaultTranslations: {
|
|
|
736
738
|
readonly numeric: "Numeric";
|
|
737
739
|
readonly link: "Link";
|
|
738
740
|
readonly date: "Date";
|
|
741
|
+
readonly dropdownSingle: "Dropdown";
|
|
739
742
|
};
|
|
740
743
|
readonly selectQuestion: {
|
|
741
744
|
readonly addOption: "Add option";
|
|
@@ -762,6 +765,8 @@ export declare const defaultTranslations: {
|
|
|
762
765
|
readonly questionOptions: "Question options";
|
|
763
766
|
readonly actions: "Actions";
|
|
764
767
|
readonly sectionTitlePlaceholder: "Section title";
|
|
768
|
+
readonly lastQuestionDialogTitle: "Remove last question from section";
|
|
769
|
+
readonly lastQuestionDialogDescription: "Moving this question will leave the section empty and it will be removed. Do you want to continue?";
|
|
765
770
|
};
|
|
766
771
|
};
|
|
767
772
|
readonly richTextEditor: {
|
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, q as o, E as i, h as r, F as l, a as c, D as A, i as u, b as F, j as h, w as C, x as m, y as T, z as d, c as f, r as S, s as p, t as I, H as g, I as k, m as x, L as H, O as P, v as b, P as w, S as M, T as O, n as v, o as D, p as E, U as L, k as R, l as q, d as y, e as z, u as B, g as U, f as j } from "./F0AiChat-
|
|
1
|
+
import { A as e, B as t, C as n, q as o, E as i, h as r, F as l, a as c, D as A, i as u, b as F, j as h, w as C, x as m, y as T, z as d, c as f, r as S, s as p, t as I, H as g, I as k, m as x, L as H, O as P, v as b, P as w, S as M, T as O, n as v, o as D, p as E, U as L, k as R, l as q, d as y, e as z, u as B, g as U, f as j } from "./F0AiChat-nPbqtFaA.js";
|
|
2
2
|
import { defaultTranslations as G } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as K, F as N, c as Q, b as W, a as X, o as Y, u as Z } from "./F0HILActionConfirmation-
|
|
3
|
+
import { A as K, F as N, c as Q, b as W, a as X, o as Y, u as Z } from "./F0HILActionConfirmation-B5UWkFgg.js";
|
|
4
4
|
export {
|
|
5
5
|
e as A,
|
|
6
6
|
K as AiChatTranslationsProvider,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -1738,6 +1738,8 @@ declare type CompareToDef = {
|
|
|
1738
1738
|
|
|
1739
1739
|
declare type CompareToDefKey = string;
|
|
1740
1740
|
|
|
1741
|
+
export declare function computeSectionEndIds(elements: CoCreationFormElement[]): Set<string>;
|
|
1742
|
+
|
|
1741
1743
|
declare type Content = (ComponentProps<typeof DataList.Item> & {
|
|
1742
1744
|
type: "item";
|
|
1743
1745
|
}) | (ComponentProps<typeof DataList.PersonItem> & {
|
|
@@ -1912,6 +1914,8 @@ export declare type DataCollectionSourceDefinition<R extends RecordType = Record
|
|
|
1912
1914
|
itemActions?: ItemActions;
|
|
1913
1915
|
/** Available primary actions that can be performed on the collection */
|
|
1914
1916
|
primaryActions?: PrimaryActionsDefinitionFn;
|
|
1917
|
+
/** Label for the primary actions dropdown trigger button */
|
|
1918
|
+
primaryActionsLabel?: string;
|
|
1915
1919
|
/** Available secondary actions that can be performed on the collection */
|
|
1916
1920
|
secondaryActions?: SecondaryActionsDefinition;
|
|
1917
1921
|
/** Available summaries fields. If not provided, summaries is not allowed. */
|
|
@@ -2677,6 +2681,8 @@ declare const defaultTranslations: {
|
|
|
2677
2681
|
readonly deleteQuestion: "Delete question";
|
|
2678
2682
|
readonly duplicateSection: "Duplicate section";
|
|
2679
2683
|
readonly deleteSection: "Delete section";
|
|
2684
|
+
readonly confirmMoveLastQuestion: "Move question";
|
|
2685
|
+
readonly cancelMoveLastQuestion: "Cancel";
|
|
2680
2686
|
};
|
|
2681
2687
|
readonly questionTypes: {
|
|
2682
2688
|
readonly section: "Section";
|
|
@@ -2688,6 +2694,7 @@ declare const defaultTranslations: {
|
|
|
2688
2694
|
readonly numeric: "Numeric";
|
|
2689
2695
|
readonly link: "Link";
|
|
2690
2696
|
readonly date: "Date";
|
|
2697
|
+
readonly dropdownSingle: "Dropdown";
|
|
2691
2698
|
};
|
|
2692
2699
|
readonly selectQuestion: {
|
|
2693
2700
|
readonly addOption: "Add option";
|
|
@@ -2714,6 +2721,8 @@ declare const defaultTranslations: {
|
|
|
2714
2721
|
readonly questionOptions: "Question options";
|
|
2715
2722
|
readonly actions: "Actions";
|
|
2716
2723
|
readonly sectionTitlePlaceholder: "Section title";
|
|
2724
|
+
readonly lastQuestionDialogTitle: "Remove last question from section";
|
|
2725
|
+
readonly lastQuestionDialogDescription: "Moving this question will leave the section empty and it will be removed. Do you want to continue?";
|
|
2717
2726
|
};
|
|
2718
2727
|
};
|
|
2719
2728
|
readonly richTextEditor: {
|
|
@@ -3813,6 +3822,20 @@ declare type FlagAvatarVariant = Extract<AvatarVariant, {
|
|
|
3813
3822
|
type: "flag";
|
|
3814
3823
|
}>;
|
|
3815
3824
|
|
|
3825
|
+
export declare type FlatFormItem = {
|
|
3826
|
+
type: "section-header";
|
|
3827
|
+
id: string;
|
|
3828
|
+
section: SectionElement;
|
|
3829
|
+
} | {
|
|
3830
|
+
type: "question";
|
|
3831
|
+
id: string;
|
|
3832
|
+
question: QuestionElement;
|
|
3833
|
+
} | {
|
|
3834
|
+
type: "section-end";
|
|
3835
|
+
id: string;
|
|
3836
|
+
sectionId: string;
|
|
3837
|
+
};
|
|
3838
|
+
|
|
3816
3839
|
export declare type FlattenedItem = {
|
|
3817
3840
|
parent: EntitySelectEntity | null;
|
|
3818
3841
|
subItem: EntitySelectSubEntity & {
|
|
@@ -3821,6 +3844,8 @@ export declare type FlattenedItem = {
|
|
|
3821
3844
|
};
|
|
3822
3845
|
};
|
|
3823
3846
|
|
|
3847
|
+
export declare function flattenElements(elements: CoCreationFormElement[]): FlatFormItem[];
|
|
3848
|
+
|
|
3824
3849
|
declare type FontSize = (typeof fontSizes)[number];
|
|
3825
3850
|
|
|
3826
3851
|
declare const fontSizes: readonly ["sm", "md", "lg"];
|
|
@@ -4137,6 +4162,21 @@ export declare type InfiniteScrollPaginatedResponse<TRecord> = BasePaginatedResp
|
|
|
4137
4162
|
hasMore: boolean;
|
|
4138
4163
|
};
|
|
4139
4164
|
|
|
4165
|
+
/**
|
|
4166
|
+
* Re-inject section-end markers into a flat list that has none.
|
|
4167
|
+
*
|
|
4168
|
+
* Uses `inSectionQuestionIds` (the set of question IDs that originally
|
|
4169
|
+
* belonged to *any* section) to determine where each section ends:
|
|
4170
|
+
* - Questions in the set stay inside the current section.
|
|
4171
|
+
* - Original standalone questions (NOT in the set) cause the section to close
|
|
4172
|
+
* before them so they remain standalone.
|
|
4173
|
+
*
|
|
4174
|
+
* This allows cross-section moves (a question from section B placed after
|
|
4175
|
+
* section A's header joins section A) while keeping standalone questions
|
|
4176
|
+
* outside sections unless the user explicitly drags them between section items.
|
|
4177
|
+
*/
|
|
4178
|
+
export declare function injectSectionEnds(items: FlatFormItem[], inSectionQuestionIds: Set<string>): FlatFormItem[];
|
|
4179
|
+
|
|
4140
4180
|
/**
|
|
4141
4181
|
* @experimental This is an experimental component use it at your own risk
|
|
4142
4182
|
*/
|
|
@@ -5448,7 +5488,7 @@ declare interface PrimaryActionButton extends PrimaryAction {
|
|
|
5448
5488
|
onClick: () => void;
|
|
5449
5489
|
}
|
|
5450
5490
|
|
|
5451
|
-
export declare type PrimaryActionItemDefinition = Pick<DropdownItemObject, "label" | "icon"> & {
|
|
5491
|
+
export declare type PrimaryActionItemDefinition = Pick<DropdownItemObject, "label" | "icon" | "description"> & {
|
|
5452
5492
|
loading?: boolean;
|
|
5453
5493
|
onClick?: () => void | Promise<void>;
|
|
5454
5494
|
disabled?: boolean;
|
|
@@ -5733,6 +5773,8 @@ declare interface ReactionsProps {
|
|
|
5733
5773
|
};
|
|
5734
5774
|
}
|
|
5735
5775
|
|
|
5776
|
+
export declare function reconstructElements(flatItems: FlatFormItem[]): CoCreationFormElement[];
|
|
5777
|
+
|
|
5736
5778
|
/**
|
|
5737
5779
|
* Utility type to get all possible paths through an object using dot notation
|
|
5738
5780
|
* @template T - The object type to traverse
|
|
@@ -6498,8 +6540,27 @@ export declare type TOCItemAction = {
|
|
|
6498
6540
|
label: string;
|
|
6499
6541
|
onClick: () => void;
|
|
6500
6542
|
icon?: IconType;
|
|
6543
|
+
critical?: boolean;
|
|
6544
|
+
/** Show a check icon to indicate this item is selected */
|
|
6545
|
+
selected?: boolean;
|
|
6501
6546
|
} | {
|
|
6502
6547
|
type: "separator";
|
|
6548
|
+
} | {
|
|
6549
|
+
type: "label";
|
|
6550
|
+
text: string;
|
|
6551
|
+
} | {
|
|
6552
|
+
type: "toggle";
|
|
6553
|
+
label: string;
|
|
6554
|
+
icon?: IconType;
|
|
6555
|
+
checked: boolean;
|
|
6556
|
+
onCheckedChange: (checked: boolean) => void;
|
|
6557
|
+
} | {
|
|
6558
|
+
type: "submenu";
|
|
6559
|
+
label: string;
|
|
6560
|
+
icon?: IconType;
|
|
6561
|
+
/** Currently selected option label shown inline */
|
|
6562
|
+
selectedLabel?: string;
|
|
6563
|
+
children: TOCItemAction[];
|
|
6503
6564
|
};
|
|
6504
6565
|
|
|
6505
6566
|
declare interface TOCItemProps {
|