@ostack.tech/ui-kform 0.1.2 → 0.2.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/chunks/en-C1hDoCmB.js +135 -0
- package/dist/chunks/en-C1hDoCmB.js.map +1 -0
- package/dist/locales/en-GB.js +10 -0
- package/dist/locales/en-GB.js.map +1 -0
- package/dist/locales/en-US.js +10 -0
- package/dist/locales/en-US.js.map +1 -0
- package/dist/locales/fr.js +137 -0
- package/dist/locales/fr.js.map +1 -0
- package/dist/locales/pt.js +137 -0
- package/dist/locales/pt.js.map +1 -0
- package/dist/ostack-ui-kform.js +1129 -1472
- package/dist/ostack-ui-kform.js.map +1 -1
- package/dist/types/components/Annexes/Annex.d.ts +5 -5
- package/dist/types/components/Annexes/Annexes.d.ts +10 -10
- package/dist/types/components/Annexes/AnnexesContext.d.ts +5 -5
- package/dist/types/components/Annexes/AnnexesManager.d.ts +15 -15
- package/dist/types/components/Annexes/AnnexesMenu.d.ts +4 -4
- package/dist/types/components/Annexes/AnnexesTabList.d.ts +3 -3
- package/dist/types/components/CheckboxControl/CheckboxControl.d.ts +6 -6
- package/dist/types/components/CheckboxGroupControl/CheckboxGroupControl.d.ts +9 -9
- package/dist/types/components/ControlField/ControlField.d.ts +3 -3
- package/dist/types/components/ControlField/ControlFieldContext.d.ts +1 -2
- package/dist/types/components/DateControl/DateControl.d.ts +6 -6
- package/dist/types/components/DateRangeControl/DateRangeControl.d.ts +9 -9
- package/dist/types/components/FileControl/FileControl.d.ts +9 -9
- package/dist/types/components/FormApp/FormApp.d.ts +23 -15
- package/dist/types/components/FormApp/FormAppAutoFocus.d.ts +2 -0
- package/dist/types/components/FormApp/FormAppContext.d.ts +11 -13
- package/dist/types/components/FormApp/FormAppElement.d.ts +9 -0
- package/dist/types/components/FormApp/FormAppIssueMessages.d.ts +3 -3
- package/dist/types/components/FormApp/FormAppStatus.d.ts +2 -2
- package/dist/types/components/FormPages/FormPage.d.ts +17 -17
- package/dist/types/components/FormPages/FormPageHeader.d.ts +3 -3
- package/dist/types/components/FormPages/FormPages.d.ts +7 -7
- package/dist/types/components/FormPages/FormPagesContext.d.ts +4 -4
- package/dist/types/components/FormPages/FormPagesNavigation.d.ts +5 -5
- package/dist/types/components/FormPages/FormPagesSelect.d.ts +3 -3
- package/dist/types/components/FormPages/FormPagesSidebar.d.ts +3 -3
- package/dist/types/components/FormStepper/FormStepContent.d.ts +5 -5
- package/dist/types/components/FormStepper/FormStepList.d.ts +3 -3
- package/dist/types/components/FormStepper/FormStepper.d.ts +5 -5
- package/dist/types/components/FormStepper/FormStepperContext.d.ts +3 -3
- package/dist/types/components/IssueAlert/IssueAlert.d.ts +4 -4
- package/dist/types/components/IssueMessage/IssueMessage.d.ts +4 -4
- package/dist/types/components/IssueMessages/IssueMessages.d.ts +6 -6
- package/dist/types/components/IssuesPanel/IssuesPanel.d.ts +25 -25
- package/dist/types/components/IssuesPanel/IssuesPanelMessagesCard.d.ts +4 -4
- package/dist/types/components/IssuesPanel/IssuesPanelSummaryCard.d.ts +4 -4
- package/dist/types/components/IssuesPopover/IssuesPopover.d.ts +3 -3
- package/dist/types/components/LoadAction/LoadAction.d.ts +2 -2
- package/dist/types/components/NumericControl/NumericControl.d.ts +6 -6
- package/dist/types/components/PathLink/PathLink.d.ts +2 -2
- package/dist/types/components/RadioGroupControl/RadioGroupControl.d.ts +9 -9
- package/dist/types/components/SaveAction/SaveAction.d.ts +6 -6
- package/dist/types/components/SelectControl/SelectControl.d.ts +6 -6
- package/dist/types/components/SelectMultipleControl/SelectMultipleControl.d.ts +6 -6
- package/dist/types/components/SubmitAction/SubmitAction.d.ts +20 -20
- package/dist/types/components/TableControl/TableControl.d.ts +7 -7
- package/dist/types/components/TableControl/TableControlAddRowTrigger.d.ts +4 -4
- package/dist/types/components/TableControl/TableControlApi.d.ts +2 -2
- package/dist/types/components/TableControl/TableControlCell.d.ts +3 -3
- package/dist/types/components/TableControl/TableControlColumn.d.ts +3 -3
- package/dist/types/components/TableControl/TableControlContent.d.ts +3 -3
- package/dist/types/components/TableControl/TableControlContext.d.ts +4 -4
- package/dist/types/components/TableControl/TableControlRemoveRowTrigger.d.ts +9 -9
- package/dist/types/components/TableControl/TableControlRow.d.ts +3 -3
- package/dist/types/components/TextControl/TextControl.d.ts +8 -8
- package/dist/types/components/TopBar/TopBar.d.ts +3 -3
- package/dist/types/components/TopBar/TopBarActions.d.ts +3 -3
- package/dist/types/components/ValidateAction/ValidateAction.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/locales/en-GB.d.ts +3 -0
- package/dist/types/locales/en-US.d.ts +3 -0
- package/dist/types/{locale → locales}/en.d.ts +2 -2
- package/dist/types/locales/fr.d.ts +3 -0
- package/dist/types/locales/index.d.ts +4 -0
- package/dist/types/locales/pt.d.ts +3 -0
- package/dist/types/providers/LocalizationProvider/LocalizationContext.d.ts +6 -4
- package/dist/types/{locale → providers/LocalizationProvider}/LocalizationObject.d.ts +14 -15
- package/dist/types/providers/LocalizationProvider/LocalizationProvider.d.ts +17 -6
- package/dist/types/providers/LocalizationProvider/index.d.ts +1 -0
- package/dist/types/providers/LocalizationProvider/useLocale.d.ts +6 -3
- package/dist/types/providers/PrefixSuffixProvider/PrefixSuffixContext.d.ts +1 -4
- package/dist/types/providers/PrefixSuffixProvider/PrefixSuffixProvider.d.ts +3 -3
- package/dist/types/providers/PrefixSuffixProvider/defaultPrefixSuffix.d.ts +12 -0
- package/dist/types/providers/PrefixSuffixProvider/index.d.ts +1 -0
- package/dist/types/utils/options.d.ts +4 -4
- package/dist/types/utils/selectionTransformations.d.ts +2 -1
- package/dist/types/utils/useControlAutofocus.d.ts +2 -2
- package/dist/types/utils/useControlIssues.d.ts +3 -3
- package/dist/types/utils/useFormLoader.d.ts +3 -3
- package/dist/types/utils/useFormSaver.d.ts +3 -3
- package/dist/types/utils/useRegisterControl.d.ts +6 -6
- package/package.json +21 -5
- package/dist/ostack-ui-kform.cjs +0 -7534
- package/dist/ostack-ui-kform.cjs.map +0 -1
- package/dist/types/locale/defaultLocale.d.ts +0 -3
- package/dist/types/locale/en-GB.d.ts +0 -3
- package/dist/types/locale/en-US.d.ts +0 -3
- package/dist/types/locale/fr-FR.d.ts +0 -3
- package/dist/types/locale/index.d.ts +0 -6
- package/dist/types/locale/pt-PT.d.ts +0 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Path } from "@ostack.tech/kform";
|
|
2
2
|
import { ErrorBoundary, TabContent } from "@ostack.tech/ui";
|
|
3
|
-
import
|
|
3
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
|
|
4
4
|
import { type IssueMessagesByCode } from "../IssueMessages";
|
|
5
5
|
/** Properties of the annex component. */
|
|
6
|
-
export interface AnnexProps extends Omit<
|
|
6
|
+
export interface AnnexProps extends Omit<ComponentPropsWithoutRef<typeof TabContent>, "value" | "children"> {
|
|
7
7
|
/** Annex path. This should match the path of the annex provided to `Annexes`. */
|
|
8
8
|
path?: string | Path;
|
|
9
9
|
/** Sets the annex as disabled. */
|
|
@@ -39,8 +39,8 @@ export interface AnnexProps extends Omit<React.ComponentPropsWithoutRef<typeof T
|
|
|
39
39
|
*/
|
|
40
40
|
issueMessages?: Record<string, IssueMessagesByCode>;
|
|
41
41
|
/** Properties to pass to the `ErrorBoundary` component. */
|
|
42
|
-
errorBoundaryProps?:
|
|
43
|
-
children?:
|
|
42
|
+
errorBoundaryProps?: ComponentPropsWithRef<typeof ErrorBoundary>;
|
|
43
|
+
children?: ReactNode;
|
|
44
44
|
}
|
|
45
45
|
/** Component containing the content of an annex. */
|
|
46
|
-
export declare const Annex:
|
|
46
|
+
export declare const Annex: import("react").ForwardRefExoticComponent<AnnexProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type AbsolutePath, type Path } from "@ostack.tech/kform";
|
|
2
2
|
import { Tabs } from "@ostack.tech/ui";
|
|
3
|
-
import
|
|
3
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
4
4
|
/** Properties of the annexes component. */
|
|
5
|
-
export interface AnnexesProps extends Omit<
|
|
5
|
+
export interface AnnexesProps extends Omit<ComponentPropsWithoutRef<typeof Tabs>, "defaultValue" | "value" | "onValueChange"> {
|
|
6
6
|
/** Base path for all declared annexes. */
|
|
7
7
|
path?: string | Path;
|
|
8
8
|
/** List of all annexes. */
|
|
@@ -29,7 +29,7 @@ export interface AnnexesProps extends Omit<React.ComponentPropsWithoutRef<typeof
|
|
|
29
29
|
* @param removedAnnexPath Path of the removed annex.
|
|
30
30
|
*/
|
|
31
31
|
onAnnexRemove?: (removedAnnexPath: AbsolutePath) => void;
|
|
32
|
-
children?:
|
|
32
|
+
children?: ReactNode;
|
|
33
33
|
}
|
|
34
34
|
/** Object representation of an annex. */
|
|
35
35
|
export interface AnnexObject<T = any> {
|
|
@@ -40,22 +40,22 @@ export interface AnnexObject<T = any> {
|
|
|
40
40
|
*/
|
|
41
41
|
path: string | Path;
|
|
42
42
|
/** Annex's title. */
|
|
43
|
-
title:
|
|
43
|
+
title: ReactNode | ((value: T) => ReactNode);
|
|
44
44
|
/** Annex's subtitle. */
|
|
45
|
-
subtitle?:
|
|
45
|
+
subtitle?: ReactNode | ((value: T, index?: number) => ReactNode);
|
|
46
46
|
/** Annex's description. */
|
|
47
|
-
description?:
|
|
47
|
+
description?: ReactNode;
|
|
48
48
|
/**
|
|
49
49
|
* Annex's label in the issues panel. The `title` and `subtitle` are used by
|
|
50
50
|
* default.
|
|
51
51
|
*/
|
|
52
|
-
issuesPanelLabel?:
|
|
53
|
-
itemTitle?:
|
|
52
|
+
issuesPanelLabel?: ReactNode | ((value: T) => ReactNode);
|
|
53
|
+
itemTitle?: ReactNode | ((value: T, index: number) => ReactNode);
|
|
54
54
|
/**
|
|
55
55
|
* Issues panel label for each annex of a collection of annexes. The
|
|
56
56
|
* `subtitle` and index of the item are used by default.
|
|
57
57
|
*/
|
|
58
|
-
itemIssuesPanelLabel?:
|
|
58
|
+
itemIssuesPanelLabel?: ReactNode | ((value: T, index: number) => ReactNode);
|
|
59
59
|
/**
|
|
60
60
|
* Title of the annex as a string to display in the document's title.
|
|
61
61
|
*
|
|
@@ -92,4 +92,4 @@ export interface AnnexObject<T = any> {
|
|
|
92
92
|
getValue?: (value: T) => T | null | undefined | Promise<T | null | undefined>;
|
|
93
93
|
}
|
|
94
94
|
/** Root component used to render form annexes. */
|
|
95
|
-
export declare const Annexes:
|
|
95
|
+
export declare const Annexes: import("react").ForwardRefExoticComponent<AnnexesProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbsolutePath, type DisplayStatus, type FormManager, type Path, type Schema, type SealedValidationIssue, type TableRowId } from "@ostack.tech/kform";
|
|
2
|
-
import
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
3
|
import { type AnnexesProps, type AnnexObject } from "./Annexes.tsx";
|
|
4
4
|
/** Value of the annexes' context. */
|
|
5
5
|
export type AnnexesContextValue = AnnexesStore;
|
|
@@ -10,9 +10,9 @@ export interface ResolvedAnnexObject extends AnnexObject {
|
|
|
10
10
|
/** Annex state. */
|
|
11
11
|
export interface AnnexState {
|
|
12
12
|
path: AbsolutePath;
|
|
13
|
-
title:
|
|
14
|
-
subtitle?:
|
|
15
|
-
description?:
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
subtitle?: ReactNode;
|
|
15
|
+
description?: ReactNode;
|
|
16
16
|
documentTitle?: string | null;
|
|
17
17
|
isRepetitive: boolean;
|
|
18
18
|
schema: Schema;
|
|
@@ -57,7 +57,7 @@ export interface AnnexesActions {
|
|
|
57
57
|
/** Annexes' store. */
|
|
58
58
|
export type AnnexesStore = ReturnType<typeof useCreateAnnexesContext>;
|
|
59
59
|
/** Annexes' context. */
|
|
60
|
-
export declare const AnnexesContext:
|
|
60
|
+
export declare const AnnexesContext: import("react").Context<(Omit<import("zustand").StoreApi<AnnexesState>, "subscribe"> & {
|
|
61
61
|
subscribe: {
|
|
62
62
|
(listener: (selectedState: AnnexesState, previousSelectedState: AnnexesState) => void): () => void;
|
|
63
63
|
<U>(selector: (state: AnnexesState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type Button, type DropdownMenu, type DropdownMenuContent, type TabList } from "@ostack.tech/ui";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode } from "react";
|
|
3
3
|
/** Properties of the annexes' manager component. */
|
|
4
|
-
export interface AnnexesManagerProps extends
|
|
4
|
+
export interface AnnexesManagerProps extends ComponentPropsWithoutRef<"nav"> {
|
|
5
5
|
/** Text of the menu button. */
|
|
6
|
-
menuButtonText?:
|
|
6
|
+
menuButtonText?: ReactNode;
|
|
7
7
|
/** Text of the "add annex" item. */
|
|
8
|
-
addAnnexText?:
|
|
8
|
+
addAnnexText?: ReactNode;
|
|
9
9
|
/** Label of the remove annex button, announced by assistive technologies. */
|
|
10
10
|
removeAnnexButtonLabel?: string;
|
|
11
11
|
/**
|
|
@@ -14,34 +14,34 @@ export interface AnnexesManagerProps extends React.ComponentPropsWithoutRef<"nav
|
|
|
14
14
|
*/
|
|
15
15
|
removeAnnexKeyboardHint?: string;
|
|
16
16
|
/** Title of the "remove annex" confirm dialog. */
|
|
17
|
-
removeAnnexConfirmDialogTitle?:
|
|
17
|
+
removeAnnexConfirmDialogTitle?: ReactNode;
|
|
18
18
|
/**
|
|
19
19
|
* Function that should return the message of the "remove annex" confirm
|
|
20
20
|
* dialog, given a node with the name of the annex.
|
|
21
21
|
*
|
|
22
22
|
* @param annexName Node containing the name of the annex.
|
|
23
23
|
*/
|
|
24
|
-
removeAnnexConfirmDialogMessage?: (annexName:
|
|
24
|
+
removeAnnexConfirmDialogMessage?: (annexName: ReactNode) => ReactNode;
|
|
25
25
|
/** Text of the "remove annex" confirm dialog OK button. */
|
|
26
|
-
removeAnnexConfirmDialogOkText?:
|
|
26
|
+
removeAnnexConfirmDialogOkText?: ReactNode;
|
|
27
27
|
/** Text of the "remove annex" confirm dialog cancel button. */
|
|
28
|
-
removeAnnexConfirmDialogCancelText?:
|
|
28
|
+
removeAnnexConfirmDialogCancelText?: ReactNode;
|
|
29
29
|
/** Properties to pass to the menu container element. */
|
|
30
|
-
menuContainerProps?:
|
|
30
|
+
menuContainerProps?: ComponentPropsWithRef<"div">;
|
|
31
31
|
/** Properties to pass to the menu trigger component. */
|
|
32
|
-
menuTriggerProps?: Omit<
|
|
32
|
+
menuTriggerProps?: Omit<ComponentPropsWithRef<typeof Button>, "icon">;
|
|
33
33
|
/** Properties to pass to the menu content component. */
|
|
34
|
-
menuContentProps?:
|
|
34
|
+
menuContentProps?: ComponentPropsWithRef<typeof DropdownMenuContent>;
|
|
35
35
|
/** Properties to pass to the menu component. */
|
|
36
|
-
menuProps?:
|
|
36
|
+
menuProps?: ComponentPropsWithRef<typeof DropdownMenu>;
|
|
37
37
|
/** Properties to pass to the tab-list container element. */
|
|
38
|
-
tabListContainerProps?:
|
|
38
|
+
tabListContainerProps?: ComponentPropsWithRef<"div">;
|
|
39
39
|
/** Properties to pass to the tab-list component. */
|
|
40
|
-
tabListProps?:
|
|
40
|
+
tabListProps?: ComponentPropsWithRef<typeof TabList>;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Component used to manage the form's annexes. Provides a menu that allows
|
|
44
44
|
* changing, adding, and removing annexes, as well as a list of tabs for each
|
|
45
45
|
* existing annex.
|
|
46
46
|
*/
|
|
47
|
-
export declare const AnnexesManager:
|
|
47
|
+
export declare const AnnexesManager: import("react").ForwardRefExoticComponent<AnnexesManagerProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Button, DropdownMenu, DropdownMenuContent } from "@ostack.tech/ui";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef } from "react";
|
|
3
3
|
import { type AnnexesManager } from "./AnnexesManager.tsx";
|
|
4
4
|
/** Properties of the annexes' menu. */
|
|
5
|
-
export interface AnnexesMenuProps extends Pick<
|
|
6
|
-
menuTriggerProps?: Omit<
|
|
7
|
-
menuContentProps?:
|
|
5
|
+
export interface AnnexesMenuProps extends Pick<ComponentPropsWithoutRef<typeof AnnexesManager>, "menuButtonText" | "addAnnexText" | "removeAnnexButtonLabel" | "removeAnnexKeyboardHint" | "removeAnnexConfirmDialogTitle" | "removeAnnexConfirmDialogMessage" | "removeAnnexConfirmDialogOkText" | "removeAnnexConfirmDialogCancelText">, ComponentPropsWithoutRef<typeof DropdownMenu> {
|
|
6
|
+
menuTriggerProps?: Omit<ComponentPropsWithRef<typeof Button>, "icon">;
|
|
7
|
+
menuContentProps?: ComponentPropsWithRef<typeof DropdownMenuContent>;
|
|
8
8
|
}
|
|
9
9
|
/** Component that allows to navigate between, add, and remove annexes. */
|
|
10
10
|
export declare function AnnexesMenu({ menuButtonText, addAnnexText, removeAnnexButtonLabel, removeAnnexKeyboardHint, removeAnnexConfirmDialogTitle, removeAnnexConfirmDialogMessage, removeAnnexConfirmDialogOkText, removeAnnexConfirmDialogCancelText, defaultOpen, open: controlledOpen, onOpenChange, menuTriggerProps, menuContentProps, ...otherProps }: AnnexesMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TabList } from "@ostack.tech/ui";
|
|
2
|
-
import
|
|
2
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
3
3
|
/** Properties of the annex tab list component. */
|
|
4
|
-
export interface AnnexTabListProps extends
|
|
4
|
+
export interface AnnexTabListProps extends ComponentPropsWithoutRef<typeof TabList> {
|
|
5
5
|
hideNonActiveOnSmallScreens: boolean;
|
|
6
6
|
}
|
|
7
7
|
/** List of annex tabs. */
|
|
8
|
-
export declare const AnnexesTabList:
|
|
8
|
+
export declare const AnnexesTabList: import("react").ForwardRefExoticComponent<AnnexTabListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Path } from "@ostack.tech/kform";
|
|
2
2
|
import { type InputController, type InputOptions } from "@ostack.tech/kform-react";
|
|
3
3
|
import { Checkbox, type CheckboxChecked } from "@ostack.tech/ui";
|
|
4
|
-
import
|
|
4
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ComponentRef, type ReactNode, type Ref } from "react";
|
|
5
5
|
import { type IssueMessages, type IssueMessagesByCode } from "../IssueMessages";
|
|
6
6
|
/** Properties of the checkbox control component. */
|
|
7
|
-
export interface CheckboxControlProps<T extends boolean | null = boolean | null> extends Omit<InputOptions<T, CheckboxChecked,
|
|
7
|
+
export interface CheckboxControlProps<T extends boolean | null = boolean | null> extends Omit<InputOptions<T, CheckboxChecked, ComponentRef<typeof Checkbox>>, "enabled" | "format" | "parse">, Omit<ComponentPropsWithoutRef<typeof Checkbox>, "defaultChecked" | "checked" | "status"> {
|
|
8
8
|
/** Path to the value. */
|
|
9
9
|
path?: string | Path;
|
|
10
10
|
/**
|
|
@@ -19,7 +19,7 @@ export interface CheckboxControlProps<T extends boolean | null = boolean | null>
|
|
|
19
19
|
*
|
|
20
20
|
* This label has priority over the field's `ControlLabel`.
|
|
21
21
|
*/
|
|
22
|
-
issuesPanelLabel?:
|
|
22
|
+
issuesPanelLabel?: ReactNode;
|
|
23
23
|
/**
|
|
24
24
|
* Whether to display the issues associated with this control.
|
|
25
25
|
*
|
|
@@ -37,12 +37,12 @@ export interface CheckboxControlProps<T extends boolean | null = boolean | null>
|
|
|
37
37
|
*/
|
|
38
38
|
preventAutoFocus?: boolean;
|
|
39
39
|
/** Reference to the control's API. */
|
|
40
|
-
apiRef?:
|
|
40
|
+
apiRef?: Ref<InputController<T, CheckboxChecked, ComponentRef<typeof Checkbox>> | undefined>;
|
|
41
41
|
/** Properties to pass to the `IssueMessages` component. */
|
|
42
|
-
issueMessagesProps?: Omit<
|
|
42
|
+
issueMessagesProps?: Omit<ComponentPropsWithRef<typeof IssueMessages>, "path" | "issues" | "messages" | "unwrapped">;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Checkbox control component supporting (possibly nullable) schemas of type
|
|
46
46
|
* "Boolean". `null` values are represented as an "indeterminate" checkbox.
|
|
47
47
|
*/
|
|
48
|
-
export declare const CheckboxControl:
|
|
48
|
+
export declare const CheckboxControl: import("react").ForwardRefExoticComponent<CheckboxControlProps<boolean | null> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { type Path } from "@ostack.tech/kform";
|
|
2
2
|
import { type Listable, type ListableInputController, type ListableInputOptions } from "@ostack.tech/kform-react";
|
|
3
3
|
import { Checkbox, CheckboxGroup } from "@ostack.tech/ui";
|
|
4
|
-
import
|
|
4
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ComponentRef, type Key, type ReactNode, type Ref } from "react";
|
|
5
5
|
import { type IssueMessages, type IssueMessagesByCode } from "../IssueMessages";
|
|
6
6
|
/** Checkbox in object notation. */
|
|
7
|
-
export type CheckboxObject<T = unknown> = Omit<
|
|
7
|
+
export type CheckboxObject<T = unknown> = Omit<ComponentPropsWithRef<typeof Checkbox>, "defaultChecked" | "checked" | "value" | "children"> & {
|
|
8
8
|
/** Option value. */
|
|
9
9
|
value: T;
|
|
10
10
|
/** Option's rendered text. */
|
|
11
|
-
text?:
|
|
11
|
+
text?: ReactNode;
|
|
12
12
|
/** Option's unique key. */
|
|
13
|
-
key?:
|
|
13
|
+
key?: Key;
|
|
14
14
|
};
|
|
15
15
|
/** Properties of the checkbox group control component. */
|
|
16
|
-
export interface CheckboxGroupControlProps<T = unknown, TListable extends Listable<T> | null = Listable<T> | null> extends Omit<ListableInputOptions<T, TListable, string[],
|
|
16
|
+
export interface CheckboxGroupControlProps<T = unknown, TListable extends Listable<T> | null = Listable<T> | null> extends Omit<ListableInputOptions<T, TListable, string[], ComponentRef<typeof CheckboxGroup>>, "enabled" | "formatFromArray" | "parseToArray">, Omit<ComponentPropsWithoutRef<typeof CheckboxGroup>, "defaultValue" | "value" | "onValueChange" | "children" | "status"> {
|
|
17
17
|
/** Path to the value. */
|
|
18
18
|
path?: string | Path;
|
|
19
19
|
/** Checkbox group control options. */
|
|
@@ -30,7 +30,7 @@ export interface CheckboxGroupControlProps<T = unknown, TListable extends Listab
|
|
|
30
30
|
*
|
|
31
31
|
* This label has priority over the field's `ControlLabel`.
|
|
32
32
|
*/
|
|
33
|
-
issuesPanelLabel?:
|
|
33
|
+
issuesPanelLabel?: ReactNode;
|
|
34
34
|
/**
|
|
35
35
|
* Whether to display the issues associated with this control.
|
|
36
36
|
*
|
|
@@ -48,9 +48,9 @@ export interface CheckboxGroupControlProps<T = unknown, TListable extends Listab
|
|
|
48
48
|
*/
|
|
49
49
|
preventAutoFocus?: boolean;
|
|
50
50
|
/** Reference to the control's API. */
|
|
51
|
-
apiRef?:
|
|
51
|
+
apiRef?: Ref<ListableInputController<T, TListable, string[], ComponentRef<typeof CheckboxGroup>> | undefined>;
|
|
52
52
|
/** Properties to pass to the `IssueMessages` component. */
|
|
53
|
-
issueMessagesProps?: Omit<
|
|
53
|
+
issueMessagesProps?: Omit<ComponentPropsWithRef<typeof IssueMessages>, "path" | "issues" | "messages" | "unwrapped">;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Checkbox group control component supporting (possibly nullable) listable
|
|
@@ -60,4 +60,4 @@ export interface CheckboxGroupControlProps<T = unknown, TListable extends Listab
|
|
|
60
60
|
* the control contains no elements. Note, however, that the form may still hold
|
|
61
61
|
* an empty listable as value if set programmatically.
|
|
62
62
|
*/
|
|
63
|
-
export declare const CheckboxGroupControl:
|
|
63
|
+
export declare const CheckboxGroupControl: import("react").ForwardRefExoticComponent<CheckboxGroupControlProps<unknown, Listable<unknown> | null> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Path } from "@ostack.tech/kform";
|
|
2
2
|
import { Field } from "@ostack.tech/ui";
|
|
3
|
-
import
|
|
3
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
4
4
|
/** Properties of the control field component. */
|
|
5
|
-
export interface ControlFieldProps extends
|
|
5
|
+
export interface ControlFieldProps extends ComponentPropsWithoutRef<typeof Field> {
|
|
6
6
|
/** Path of the field; inner control paths will be relative to this path. */
|
|
7
7
|
path?: string | Path;
|
|
8
8
|
/**
|
|
@@ -47,4 +47,4 @@ export interface ControlFieldProps extends React.ComponentPropsWithoutRef<typeof
|
|
|
47
47
|
* Aria descriptions and error messages are set on the control based on the
|
|
48
48
|
* provided helper texts or feedbacks.
|
|
49
49
|
*/
|
|
50
|
-
export declare const ControlField:
|
|
50
|
+
export declare const ControlField: import("react").ForwardRefExoticComponent<ControlFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type AbsolutePath, type FormManager, type Schema, type SealedValidationIssue } from "@ostack.tech/kform";
|
|
2
2
|
import { type Controller } from "@ostack.tech/kform-react";
|
|
3
|
-
import * as React from "react";
|
|
4
3
|
/** Value of the control field context. */
|
|
5
4
|
export type ControlFieldContextValue = ControlFieldStore;
|
|
6
5
|
/** State of the control field. */
|
|
@@ -18,7 +17,7 @@ export interface ControlState {
|
|
|
18
17
|
/** Control field store. */
|
|
19
18
|
export type ControlFieldStore = ReturnType<typeof useCreateControlFieldContext>;
|
|
20
19
|
/** Control field context. */
|
|
21
|
-
export declare const ControlFieldContext:
|
|
20
|
+
export declare const ControlFieldContext: import("react").Context<import("zustand").StoreApi<ControlFieldState> | null>;
|
|
22
21
|
/** Hook which creates the control field context value. */
|
|
23
22
|
export declare function useCreateControlFieldContext(): import("zustand").StoreApi<ControlFieldState>;
|
|
24
23
|
/** Hook that returns access to the control field's store. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Path } from "@ostack.tech/kform";
|
|
2
2
|
import { type Temporal, type TemporalInputController, type TemporalInputOptions } from "@ostack.tech/kform-react";
|
|
3
3
|
import { DateInput } from "@ostack.tech/ui";
|
|
4
|
-
import
|
|
4
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ComponentRef, type ReactNode, type Ref } from "react";
|
|
5
5
|
import { type IssueMessages, type IssueMessagesByCode } from "../IssueMessages";
|
|
6
6
|
/** Properties of the date control component. */
|
|
7
|
-
export interface DateControlProps<T extends Temporal | null = Temporal | null> extends Omit<TemporalInputOptions<T, string,
|
|
7
|
+
export interface DateControlProps<T extends Temporal | null = Temporal | null> extends Omit<TemporalInputOptions<T, string, ComponentRef<typeof DateInput>>, "enabled" | "formatFromString" | "parseToString">, Omit<ComponentPropsWithoutRef<typeof DateInput>, "defaultValue" | "value" | "onValueChange" | "status"> {
|
|
8
8
|
/** Path to the value. */
|
|
9
9
|
path?: string | Path;
|
|
10
10
|
/**
|
|
@@ -19,7 +19,7 @@ export interface DateControlProps<T extends Temporal | null = Temporal | null> e
|
|
|
19
19
|
*
|
|
20
20
|
* This label has priority over the field's `ControlLabel`.
|
|
21
21
|
*/
|
|
22
|
-
issuesPanelLabel?:
|
|
22
|
+
issuesPanelLabel?: ReactNode;
|
|
23
23
|
/**
|
|
24
24
|
* Whether to display the issues associated with this control.
|
|
25
25
|
*
|
|
@@ -37,9 +37,9 @@ export interface DateControlProps<T extends Temporal | null = Temporal | null> e
|
|
|
37
37
|
*/
|
|
38
38
|
preventAutoFocus?: boolean;
|
|
39
39
|
/** Reference to the control's API. */
|
|
40
|
-
apiRef?:
|
|
40
|
+
apiRef?: Ref<TemporalInputController<T, string, ComponentRef<typeof DateInput>> | undefined>;
|
|
41
41
|
/** Properties to pass to the `IssueMessages` component. */
|
|
42
|
-
issueMessagesProps?: Omit<
|
|
42
|
+
issueMessagesProps?: Omit<ComponentPropsWithRef<typeof IssueMessages>, "path" | "issues" | "messages" | "unwrapped">;
|
|
43
43
|
}
|
|
44
44
|
/** Date control component supporting nullable temporal schemas. */
|
|
45
|
-
export declare const DateControl:
|
|
45
|
+
export declare const DateControl: import("react").ForwardRefExoticComponent<DateControlProps<Temporal | null> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Path } from "@ostack.tech/kform";
|
|
2
2
|
import { type Temporal, type TemporalInputController, type TemporalInputOptions } from "@ostack.tech/kform-react";
|
|
3
3
|
import { DateRangeInput } from "@ostack.tech/ui";
|
|
4
|
-
import
|
|
4
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactNode, type Ref } from "react";
|
|
5
5
|
import { type IssueMessages, type IssueMessagesByCode } from "../IssueMessages";
|
|
6
6
|
/** Properties of the date-range control component. */
|
|
7
|
-
export interface DateRangeControlProps<TStart extends Temporal | null = Temporal | null, TEnd extends Temporal | null = TStart> extends Omit<
|
|
7
|
+
export interface DateRangeControlProps<TStart extends Temporal | null = Temporal | null, TEnd extends Temporal | null = TStart> extends Omit<ComponentPropsWithoutRef<typeof DateRangeInput>, "defaultValue" | "value"> {
|
|
8
8
|
/** Path to the start value. */
|
|
9
9
|
startPath: string | Path;
|
|
10
10
|
/** Path to the end value. */
|
|
@@ -27,17 +27,17 @@ export interface DateRangeControlProps<TStart extends Temporal | null = Temporal
|
|
|
27
27
|
*
|
|
28
28
|
* This label has priority over the field's `ControlLabel`.
|
|
29
29
|
*/
|
|
30
|
-
issuesPanelLabel?:
|
|
30
|
+
issuesPanelLabel?: ReactNode;
|
|
31
31
|
/**
|
|
32
32
|
* Label suffix to use in the issues panel when displaying issues associated
|
|
33
33
|
* with this field's start date.
|
|
34
34
|
*/
|
|
35
|
-
issuesPanelStartLabelSuffix?:
|
|
35
|
+
issuesPanelStartLabelSuffix?: ReactNode;
|
|
36
36
|
/**
|
|
37
37
|
* Label suffix to use in the issues panel when displaying issues associated
|
|
38
38
|
* with this field's end date.
|
|
39
39
|
*/
|
|
40
|
-
issuesPanelEndLabelSuffix?:
|
|
40
|
+
issuesPanelEndLabelSuffix?: ReactNode;
|
|
41
41
|
/**
|
|
42
42
|
* Whether to display the issues associated with this control.
|
|
43
43
|
*
|
|
@@ -55,11 +55,11 @@ export interface DateRangeControlProps<TStart extends Temporal | null = Temporal
|
|
|
55
55
|
*/
|
|
56
56
|
preventAutoFocus?: boolean;
|
|
57
57
|
/** Reference to the start control's API. */
|
|
58
|
-
startApiRef?:
|
|
58
|
+
startApiRef?: Ref<TemporalInputController<TStart, string> | undefined>;
|
|
59
59
|
/** Reference to the end control's API. */
|
|
60
|
-
endApiRef?:
|
|
60
|
+
endApiRef?: Ref<TemporalInputController<TEnd, string> | undefined>;
|
|
61
61
|
/** Properties to pass to the `IssueMessages` component. */
|
|
62
|
-
issueMessagesProps?: Omit<
|
|
62
|
+
issueMessagesProps?: Omit<ComponentPropsWithRef<typeof IssueMessages>, "path" | "issues" | "messages" | "unwrapped">;
|
|
63
63
|
onStartInitialized?: TemporalInputOptions<TStart, string>["onInitialized"];
|
|
64
64
|
onStartFormManagerEvent?: TemporalInputOptions<TStart, string>["onFormManagerEvent"];
|
|
65
65
|
onStartValueChange?: TemporalInputOptions<TStart, string>["onValueChange"];
|
|
@@ -76,4 +76,4 @@ export interface DateRangeControlProps<TStart extends Temporal | null = Temporal
|
|
|
76
76
|
onEndTouchedStatusChange?: TemporalInputOptions<TEnd, string>["onTouchedStatusChange"];
|
|
77
77
|
}
|
|
78
78
|
/** Date-range control component supporting nullable temporal schemas. */
|
|
79
|
-
export declare const DateRangeControl:
|
|
79
|
+
export declare const DateRangeControl: import("react").ForwardRefExoticComponent<DateRangeControlProps<Temporal | null, Temporal | null> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type File as KFormFile, type Path } from "@ostack.tech/kform";
|
|
2
2
|
import { type FileInputController, type FileInputOptions } from "@ostack.tech/kform-react";
|
|
3
3
|
import { Input } from "@ostack.tech/ui";
|
|
4
|
-
import
|
|
4
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ComponentRef, type ReactNode, type Ref } from "react";
|
|
5
5
|
import { type IssueMessages, type IssueMessagesByCode } from "../IssueMessages";
|
|
6
6
|
/**
|
|
7
7
|
* File control's interaction with the selected file:
|
|
@@ -15,7 +15,7 @@ import { type IssueMessages, type IssueMessagesByCode } from "../IssueMessages";
|
|
|
15
15
|
*/
|
|
16
16
|
export type FileControlFileInteraction = "view" | "download" | "none";
|
|
17
17
|
/** Properties of the file control component. */
|
|
18
|
-
export interface FileControlProps<T extends KFormFile | null = KFormFile | null> extends Omit<FileInputOptions<T, FileList,
|
|
18
|
+
export interface FileControlProps<T extends KFormFile | null = KFormFile | null> extends Omit<FileInputOptions<T, FileList, ComponentRef<typeof Input>>, "enabled" | "formatFromFileList" | "parseToFileList">, Omit<ComponentPropsWithoutRef<typeof Input>, "type" | "multiple" | "defaultValue" | "value" | "onValueChange" | "status" | "align"> {
|
|
19
19
|
/** Path to the value. */
|
|
20
20
|
path?: string | Path;
|
|
21
21
|
/**
|
|
@@ -30,7 +30,7 @@ export interface FileControlProps<T extends KFormFile | null = KFormFile | null>
|
|
|
30
30
|
*
|
|
31
31
|
* This label has priority over the field's `ControlLabel`.
|
|
32
32
|
*/
|
|
33
|
-
issuesPanelLabel?:
|
|
33
|
+
issuesPanelLabel?: ReactNode;
|
|
34
34
|
/**
|
|
35
35
|
* Whether to display the issues associated with this control.
|
|
36
36
|
*
|
|
@@ -48,7 +48,7 @@ export interface FileControlProps<T extends KFormFile | null = KFormFile | null>
|
|
|
48
48
|
*/
|
|
49
49
|
preventAutoFocus?: boolean;
|
|
50
50
|
/** Reference to the control's API. */
|
|
51
|
-
apiRef?:
|
|
51
|
+
apiRef?: Ref<FileInputController<T, FileList, ComponentRef<typeof Input>> | undefined>;
|
|
52
52
|
/**
|
|
53
53
|
* Type of interaction with the selected file.
|
|
54
54
|
*
|
|
@@ -56,13 +56,13 @@ export interface FileControlProps<T extends KFormFile | null = KFormFile | null>
|
|
|
56
56
|
*/
|
|
57
57
|
fileInteraction?: FileControlFileInteraction;
|
|
58
58
|
/** Label of the button used to open the file viewer. */
|
|
59
|
-
viewFileButtonLabel?:
|
|
59
|
+
viewFileButtonLabel?: ReactNode;
|
|
60
60
|
/** Label of the button used to download the file. */
|
|
61
|
-
downloadFileButtonLabel?:
|
|
61
|
+
downloadFileButtonLabel?: ReactNode;
|
|
62
62
|
/** Text displayed when the file cannot be viewed. */
|
|
63
|
-
fallbackText?:
|
|
63
|
+
fallbackText?: ReactNode;
|
|
64
64
|
/** Properties to pass to the `IssueMessages` component. */
|
|
65
|
-
issueMessagesProps?: Omit<
|
|
65
|
+
issueMessagesProps?: Omit<ComponentPropsWithRef<typeof IssueMessages>, "path" | "issues" | "messages" | "unwrapped">;
|
|
66
66
|
}
|
|
67
67
|
/** File control component supporting (possibly nullable) file schemas. */
|
|
68
|
-
export declare const FileControl:
|
|
68
|
+
export declare const FileControl: import("react").ForwardRefExoticComponent<FileControlProps<KFormFile | null> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { AbsolutePath, type Path, type Schema, type SchemaKt } from "@ostack.tech/kform";
|
|
2
2
|
import { type Controller, type FormOptions } from "@ostack.tech/kform-react";
|
|
3
3
|
import { type Responsive, Root } from "@ostack.tech/ui";
|
|
4
|
-
import
|
|
5
|
-
import { type LocalizationObject } from "../../
|
|
4
|
+
import { type ComponentPropsWithoutRef, type ReactNode, type Ref } from "react";
|
|
5
|
+
import { type LocalizationObject } from "../../providers/LocalizationProvider/LocalizationObject.ts";
|
|
6
6
|
import { type IssueMessagesByCode } from "../IssueMessages";
|
|
7
7
|
/** Mode of displaying issue messages. */
|
|
8
8
|
export type IssuesDisplayMode = "inline" | "panel";
|
|
9
9
|
/** Properties of the form app component. */
|
|
10
|
-
export type FormAppProps<T = any> = Pick<
|
|
10
|
+
export type FormAppProps<T = any> = Pick<ComponentPropsWithoutRef<typeof Root>, "enableErrorReporting" | "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions" | "baseDocumentTitle" | "documentTitleBaseSeparator" | "documentTitleBreadcrumbsSeparator" | "portalsContainer" | "tooltipsDelayDuration" | "tooltipsSkipDelayDuration" | "disableTooltipsHoverableContent" | "toastsLabel" | "toastsDuration" | "toastsSwipeDirection" | "toastsSwipeThreshold" | "toastViewportHotkey" | "toastViewportLabel" | "toastViewportProps" | "errorBoundaryProps"> & FormOptions<T> & Omit<ComponentPropsWithoutRef<"form">, "onSubmit" | "onReset"> & {
|
|
11
11
|
/** Schema of the form. */
|
|
12
12
|
schema: Schema<T> | SchemaKt;
|
|
13
13
|
/**
|
|
14
14
|
* Label to use in the issues panel when displaying issues associated with
|
|
15
15
|
* the form app.
|
|
16
16
|
*/
|
|
17
|
-
issuesPanelLabel?:
|
|
17
|
+
issuesPanelLabel?: ReactNode;
|
|
18
18
|
/** Whether to disable the whole form. */
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
/** Whether to set the whole form as read-only. */
|
|
@@ -26,12 +26,16 @@ export type FormAppProps<T = any> = Pick<React.ComponentPropsWithoutRef<typeof R
|
|
|
26
26
|
* This prefix-suffix should match the `$prefix-suffix` SCSS variable.
|
|
27
27
|
*/
|
|
28
28
|
prefixSuffix?: string;
|
|
29
|
+
/** Uncontrolled form app locale. */
|
|
30
|
+
defaultLocale?: LocalizationObject;
|
|
31
|
+
/** Controlled form app locale. */
|
|
32
|
+
locale?: LocalizationObject;
|
|
29
33
|
/**
|
|
30
|
-
*
|
|
34
|
+
* Function called when the locale changes.
|
|
31
35
|
*
|
|
32
|
-
* @
|
|
36
|
+
* @param locale New locale.
|
|
33
37
|
*/
|
|
34
|
-
|
|
38
|
+
onLocaleChange?: (locale: LocalizationObject) => void;
|
|
35
39
|
/**
|
|
36
40
|
* Mapping of issue messages from the path of the field with issues to the
|
|
37
41
|
* issue messages of said field (which are themselves grouped by their
|
|
@@ -92,7 +96,7 @@ export type FormAppProps<T = any> = Pick<React.ComponentPropsWithoutRef<typeof R
|
|
|
92
96
|
*/
|
|
93
97
|
minHeight?: Responsive<number | string>;
|
|
94
98
|
/** Reference to the form app's API. */
|
|
95
|
-
apiRef?:
|
|
99
|
+
apiRef?: Ref<FormAppApi<T> | undefined>;
|
|
96
100
|
};
|
|
97
101
|
/** Imperative form app API. */
|
|
98
102
|
export type FormAppApi<T = unknown> = Controller<T> & {
|
|
@@ -121,14 +125,14 @@ export type FormAppApi<T = unknown> = Controller<T> & {
|
|
|
121
125
|
* ostack/UI's `locale` is automatically provided to the ostack/UI `Root`
|
|
122
126
|
* component from the provided `FormApp` `locale`.
|
|
123
127
|
*/
|
|
124
|
-
export declare const FormApp:
|
|
128
|
+
export declare const FormApp: import("react").ForwardRefExoticComponent<Pick<Omit<import("@ostack.tech/ui").RootProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "reportError" | "errorReportingUrl" | "errorReportingMethod" | "encodeErrorReport" | "encodedErrorReportMimeType" | "errorReportingOptions" | "baseDocumentTitle" | "enableErrorReporting" | "documentTitleBaseSeparator" | "documentTitleBreadcrumbsSeparator" | "portalsContainer" | "tooltipsDelayDuration" | "tooltipsSkipDelayDuration" | "disableTooltipsHoverableContent" | "toastsLabel" | "toastsDuration" | "toastsSwipeDirection" | "toastsSwipeThreshold" | "toastViewportHotkey" | "toastViewportLabel" | "toastViewportProps" | "errorBoundaryProps"> & Omit<import("@ostack.tech/kform-react").ControllerOptions<any, import("@ostack.tech/kform-react").FormControllerState<any>>, "formManager"> & import("@ostack.tech/kform-react").FormOwnOptions<any, unknown> & Omit<Omit<import("react").DetailedHTMLProps<import("react").FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref">, "onReset" | "onSubmit"> & {
|
|
125
129
|
/** Schema of the form. */
|
|
126
130
|
schema: SchemaKt | Schema<any>;
|
|
127
131
|
/**
|
|
128
132
|
* Label to use in the issues panel when displaying issues associated with
|
|
129
133
|
* the form app.
|
|
130
134
|
*/
|
|
131
|
-
issuesPanelLabel?:
|
|
135
|
+
issuesPanelLabel?: ReactNode;
|
|
132
136
|
/** Whether to disable the whole form. */
|
|
133
137
|
disabled?: boolean;
|
|
134
138
|
/** Whether to set the whole form as read-only. */
|
|
@@ -140,12 +144,16 @@ export declare const FormApp: React.ForwardRefExoticComponent<Pick<Omit<import("
|
|
|
140
144
|
* This prefix-suffix should match the `$prefix-suffix` SCSS variable.
|
|
141
145
|
*/
|
|
142
146
|
prefixSuffix?: string;
|
|
147
|
+
/** Uncontrolled form app locale. */
|
|
148
|
+
defaultLocale?: LocalizationObject;
|
|
149
|
+
/** Controlled form app locale. */
|
|
150
|
+
locale?: LocalizationObject;
|
|
143
151
|
/**
|
|
144
|
-
*
|
|
152
|
+
* Function called when the locale changes.
|
|
145
153
|
*
|
|
146
|
-
* @
|
|
154
|
+
* @param locale New locale.
|
|
147
155
|
*/
|
|
148
|
-
|
|
156
|
+
onLocaleChange?: (locale: LocalizationObject) => void;
|
|
149
157
|
/**
|
|
150
158
|
* Mapping of issue messages from the path of the field with issues to the
|
|
151
159
|
* issue messages of said field (which are themselves grouped by their
|
|
@@ -206,5 +214,5 @@ export declare const FormApp: React.ForwardRefExoticComponent<Pick<Omit<import("
|
|
|
206
214
|
*/
|
|
207
215
|
minHeight?: Responsive<number | string>;
|
|
208
216
|
/** Reference to the form app's API. */
|
|
209
|
-
apiRef?:
|
|
210
|
-
} &
|
|
217
|
+
apiRef?: Ref<FormAppApi<any> | undefined> | undefined;
|
|
218
|
+
} & import("react").RefAttributes<HTMLFormElement>>;
|