@factorialco/f0-react 1.422.3 → 1.423.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.d.ts +10 -6
- package/dist/experimental.d.ts +10 -6
- package/dist/f0.d.ts +31 -9
- package/dist/f0.js +4965 -4848
- package/dist/i18n-provider-defaults.d.ts +10 -6
- package/dist/i18n-provider-defaults.js +5 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/ai.d.ts
CHANGED
|
@@ -1198,6 +1198,7 @@ export declare const defaultTranslations: {
|
|
|
1198
1198
|
readonly link: "Link";
|
|
1199
1199
|
readonly date: "Date";
|
|
1200
1200
|
readonly dropdownSingle: "Dropdown";
|
|
1201
|
+
readonly file: "File upload";
|
|
1201
1202
|
};
|
|
1202
1203
|
readonly selectQuestion: {
|
|
1203
1204
|
readonly addOption: "Add option";
|
|
@@ -1207,6 +1208,9 @@ export declare const defaultTranslations: {
|
|
|
1207
1208
|
readonly correct: "Correct";
|
|
1208
1209
|
readonly optionPlaceholder: "Type anything you want here...";
|
|
1209
1210
|
};
|
|
1211
|
+
readonly fileQuestion: {
|
|
1212
|
+
readonly uploadButton: "Upload file";
|
|
1213
|
+
};
|
|
1210
1214
|
readonly answer: {
|
|
1211
1215
|
readonly label: "Answer";
|
|
1212
1216
|
readonly dropdownPlaceholder: "Pick an option";
|
|
@@ -1816,10 +1820,8 @@ declare module "@tiptap/core" {
|
|
|
1816
1820
|
|
|
1817
1821
|
declare module "@tiptap/core" {
|
|
1818
1822
|
interface Commands<ReturnType> {
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
src: string;
|
|
1822
|
-
}) => ReturnType;
|
|
1823
|
+
transcript: {
|
|
1824
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
1823
1825
|
};
|
|
1824
1826
|
}
|
|
1825
1827
|
}
|
|
@@ -1827,8 +1829,10 @@ declare module "@tiptap/core" {
|
|
|
1827
1829
|
|
|
1828
1830
|
declare module "@tiptap/core" {
|
|
1829
1831
|
interface Commands<ReturnType> {
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
+
videoEmbed: {
|
|
1833
|
+
setVideoEmbed: (options: {
|
|
1834
|
+
src: string;
|
|
1835
|
+
}) => ReturnType;
|
|
1832
1836
|
};
|
|
1833
1837
|
}
|
|
1834
1838
|
}
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2754,6 +2754,7 @@ declare const defaultTranslations: {
|
|
|
2754
2754
|
readonly link: "Link";
|
|
2755
2755
|
readonly date: "Date";
|
|
2756
2756
|
readonly dropdownSingle: "Dropdown";
|
|
2757
|
+
readonly file: "File upload";
|
|
2757
2758
|
};
|
|
2758
2759
|
readonly selectQuestion: {
|
|
2759
2760
|
readonly addOption: "Add option";
|
|
@@ -2763,6 +2764,9 @@ declare const defaultTranslations: {
|
|
|
2763
2764
|
readonly correct: "Correct";
|
|
2764
2765
|
readonly optionPlaceholder: "Type anything you want here...";
|
|
2765
2766
|
};
|
|
2767
|
+
readonly fileQuestion: {
|
|
2768
|
+
readonly uploadButton: "Upload file";
|
|
2769
|
+
};
|
|
2766
2770
|
readonly answer: {
|
|
2767
2771
|
readonly label: "Answer";
|
|
2768
2772
|
readonly dropdownPlaceholder: "Pick an option";
|
|
@@ -7238,10 +7242,8 @@ declare module "@tiptap/core" {
|
|
|
7238
7242
|
|
|
7239
7243
|
declare module "@tiptap/core" {
|
|
7240
7244
|
interface Commands<ReturnType> {
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
src: string;
|
|
7244
|
-
}) => ReturnType;
|
|
7245
|
+
transcript: {
|
|
7246
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
7245
7247
|
};
|
|
7246
7248
|
}
|
|
7247
7249
|
}
|
|
@@ -7249,8 +7251,10 @@ declare module "@tiptap/core" {
|
|
|
7249
7251
|
|
|
7250
7252
|
declare module "@tiptap/core" {
|
|
7251
7253
|
interface Commands<ReturnType> {
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
+
videoEmbed: {
|
|
7255
|
+
setVideoEmbed: (options: {
|
|
7256
|
+
src: string;
|
|
7257
|
+
}) => ReturnType;
|
|
7254
7258
|
};
|
|
7255
7259
|
}
|
|
7256
7260
|
}
|
package/dist/f0.d.ts
CHANGED
|
@@ -3304,6 +3304,7 @@ export declare const defaultTranslations: {
|
|
|
3304
3304
|
readonly link: "Link";
|
|
3305
3305
|
readonly date: "Date";
|
|
3306
3306
|
readonly dropdownSingle: "Dropdown";
|
|
3307
|
+
readonly file: "File upload";
|
|
3307
3308
|
};
|
|
3308
3309
|
readonly selectQuestion: {
|
|
3309
3310
|
readonly addOption: "Add option";
|
|
@@ -3313,6 +3314,9 @@ export declare const defaultTranslations: {
|
|
|
3313
3314
|
readonly correct: "Correct";
|
|
3314
3315
|
readonly optionPlaceholder: "Type anything you want here...";
|
|
3315
3316
|
};
|
|
3317
|
+
readonly fileQuestion: {
|
|
3318
|
+
readonly uploadButton: "Upload file";
|
|
3319
|
+
};
|
|
3316
3320
|
readonly answer: {
|
|
3317
3321
|
readonly label: "Answer";
|
|
3318
3322
|
readonly dropdownPlaceholder: "Pick an option";
|
|
@@ -6739,6 +6743,14 @@ declare type FileDef = {
|
|
|
6739
6743
|
*/
|
|
6740
6744
|
declare type FileFieldRenderIf = CommonRenderIfCondition | F0BaseFieldRenderIfFunction;
|
|
6741
6745
|
|
|
6746
|
+
declare type FileQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
|
|
6747
|
+
type: "file";
|
|
6748
|
+
value?: string[] | null;
|
|
6749
|
+
useUpload?: UseFileUpload;
|
|
6750
|
+
accept?: MimeType_2[];
|
|
6751
|
+
maxSizeMB?: number;
|
|
6752
|
+
};
|
|
6753
|
+
|
|
6742
6754
|
/**
|
|
6743
6755
|
* Return type of the consumer-provided upload hook
|
|
6744
6756
|
*/
|
|
@@ -8330,6 +8342,9 @@ declare type OnChangeQuestionParams = BaseQuestionOnChangeParams & ({
|
|
|
8330
8342
|
} | {
|
|
8331
8343
|
type: "date";
|
|
8332
8344
|
value?: Date | null;
|
|
8345
|
+
} | {
|
|
8346
|
+
type: "file";
|
|
8347
|
+
value?: string[] | null;
|
|
8333
8348
|
});
|
|
8334
8349
|
|
|
8335
8350
|
export declare type OnChangeSectionParams = {
|
|
@@ -8835,11 +8850,13 @@ export declare type QuestionElement = Omit<TextQuestionProps, QuestionPropsToOmi
|
|
|
8835
8850
|
type: "link";
|
|
8836
8851
|
}, QuestionPropsToOmit> | Omit<DateQuestionProps & {
|
|
8837
8852
|
type: "date";
|
|
8853
|
+
}, QuestionPropsToOmit> | Omit<FileQuestionProps & {
|
|
8854
|
+
type: "file";
|
|
8838
8855
|
}, QuestionPropsToOmit>;
|
|
8839
8856
|
|
|
8840
8857
|
declare type QuestionPropsToOmit = "onAction" | "onChange" | "onAddNewElement";
|
|
8841
8858
|
|
|
8842
|
-
export declare type QuestionType = "rating" | "select" | "multi-select" | "dropdown-single" | "text" | "longText" | "numeric" | "link" | "date";
|
|
8859
|
+
export declare type QuestionType = "rating" | "select" | "multi-select" | "dropdown-single" | "text" | "longText" | "numeric" | "link" | "date" | "file";
|
|
8843
8860
|
|
|
8844
8861
|
export declare interface RadarChartConfig {
|
|
8845
8862
|
type: "radar";
|
|
@@ -9359,7 +9376,7 @@ declare type SummaryKey<Definition extends SummariesDefinition> = Definition ext
|
|
|
9359
9376
|
|
|
9360
9377
|
declare type SummaryType = "sum";
|
|
9361
9378
|
|
|
9362
|
-
export declare function SurveyAnsweringForm({ elements, onSubmit: onSubmitProp, mode, title, description, resourceHeader, isOpen, onClose, position: positionProp, module, allowToChangeFullscreen, defaultValues, errorTriggerMode, loading, labels, preview, }: SurveyAnsweringFormProps): JSX_2.Element;
|
|
9379
|
+
export declare function SurveyAnsweringForm({ elements, onSubmit: onSubmitProp, mode, title, description, resourceHeader, isOpen, onClose, position: positionProp, module, allowToChangeFullscreen, defaultValues, errorTriggerMode, loading, labels, preview, useUpload, }: SurveyAnsweringFormProps): JSX_2.Element;
|
|
9363
9380
|
|
|
9364
9381
|
declare interface SurveyAnsweringFormBaseProps {
|
|
9365
9382
|
elements: SurveyFormBuilderElement[];
|
|
@@ -9375,6 +9392,7 @@ declare interface SurveyAnsweringFormBaseProps {
|
|
|
9375
9392
|
defaultValues?: Partial<SurveyAnswers>;
|
|
9376
9393
|
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
9377
9394
|
loading?: boolean;
|
|
9395
|
+
useUpload?: UseFileUpload;
|
|
9378
9396
|
labels?: {
|
|
9379
9397
|
empty?: {
|
|
9380
9398
|
title?: string;
|
|
@@ -9430,9 +9448,12 @@ export declare type SurveyAnswerValue = {
|
|
|
9430
9448
|
} | {
|
|
9431
9449
|
type: "date";
|
|
9432
9450
|
value: Date | null;
|
|
9451
|
+
} | {
|
|
9452
|
+
type: "file";
|
|
9453
|
+
value: string[] | null;
|
|
9433
9454
|
};
|
|
9434
9455
|
|
|
9435
|
-
export declare const SurveyFormBuilder: WithDataTestIdReturnType_7<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, }: SurveyFormBuilderProps) => JSX_2.Element>;
|
|
9456
|
+
export declare const SurveyFormBuilder: WithDataTestIdReturnType_7<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, useUpload, }: SurveyFormBuilderProps) => JSX_2.Element>;
|
|
9436
9457
|
|
|
9437
9458
|
export declare type SurveyFormBuilderCallbacks = {
|
|
9438
9459
|
onQuestionChange?: (params: OnChangeQuestionParams) => void;
|
|
@@ -9456,6 +9477,7 @@ export declare type SurveyFormBuilderProps = {
|
|
|
9456
9477
|
disallowOptionalQuestions?: boolean;
|
|
9457
9478
|
allowedQuestionTypes?: QuestionType[];
|
|
9458
9479
|
applyingChanges?: boolean;
|
|
9480
|
+
useUpload?: UseFileUpload;
|
|
9459
9481
|
};
|
|
9460
9482
|
|
|
9461
9483
|
export declare type SurveyFormSubmitResult = {
|
|
@@ -10821,10 +10843,8 @@ declare module "@tiptap/core" {
|
|
|
10821
10843
|
|
|
10822
10844
|
declare module "@tiptap/core" {
|
|
10823
10845
|
interface Commands<ReturnType> {
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
src: string;
|
|
10827
|
-
}) => ReturnType;
|
|
10846
|
+
transcript: {
|
|
10847
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
10828
10848
|
};
|
|
10829
10849
|
}
|
|
10830
10850
|
}
|
|
@@ -10832,8 +10852,10 @@ declare module "@tiptap/core" {
|
|
|
10832
10852
|
|
|
10833
10853
|
declare module "@tiptap/core" {
|
|
10834
10854
|
interface Commands<ReturnType> {
|
|
10835
|
-
|
|
10836
|
-
|
|
10855
|
+
videoEmbed: {
|
|
10856
|
+
setVideoEmbed: (options: {
|
|
10857
|
+
src: string;
|
|
10858
|
+
}) => ReturnType;
|
|
10837
10859
|
};
|
|
10838
10860
|
}
|
|
10839
10861
|
}
|