@ostack.tech/ui-kform 1.3.0-beta.1 → 1.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/LICENSE +202 -0
- package/README.md +14 -1
- package/dist/ostack-ui-kform.css +3 -0
- package/dist/ostack-ui-kform.js +2068 -1965
- package/dist/ostack-ui-kform.js.map +1 -1
- package/package.json +4 -9
- package/scss/components/Annexes/_Annexes-variables.scss +3 -0
- package/scss/components/Annexes/_Annexes.scss +4 -0
- package/types/components/Annexes/Annex.d.ts +8 -8
- package/types/components/CheckboxControl/CheckboxControl.d.ts +1 -1
- package/types/components/CheckboxGroupControl/CheckboxGroupControl.d.ts +1 -1
- package/types/components/DateControl/DateControl.d.ts +1 -1
- package/types/components/DateRangeControl/DateRangeControl.d.ts +3 -1
- package/types/components/FileControl/FileControl.d.ts +1 -1
- package/types/components/FormApp/FormApp.d.ts +8 -8
- package/types/components/FormApp/FormAppIssueMessages.d.ts +6 -6
- package/types/components/FormPages/FormPage.d.ts +8 -8
- package/types/components/FormPages/FormPages.d.ts +1 -1
- package/types/components/FormStepper/FormStep.d.ts +9 -9
- package/types/components/FormStepper/FormStepper.d.ts +2 -2
- package/types/components/FormStepper/FormStepperFinishTrigger.d.ts +2 -2
- package/types/components/FormStepper/FormStepperNextTrigger.d.ts +2 -2
- package/types/components/FormStepper/FormStepperPreviousTrigger.d.ts +2 -2
- package/types/components/FormStepper/FormStepperState.d.ts +2 -2
- package/types/components/NumericControl/NumericControl.d.ts +2 -2
- package/types/components/RadioGroupControl/RadioGroupControl.d.ts +1 -1
- package/types/components/SelectControl/SelectControl.d.ts +1 -1
- package/types/components/SelectControl/SelectControlItemGroup.d.ts +2 -2
- package/types/components/SelectMultipleControl/SelectMultipleControl.d.ts +1 -1
- package/types/components/TableControl/TableControl.d.ts +12 -4
- package/types/components/TableControl/TableControlPagination.d.ts +2 -2
- package/types/components/TableControl/TableControlRemoveRowTrigger.d.ts +1 -1
- package/types/components/TableControl/TableControlRowsPerPage.d.ts +2 -2
- package/types/components/TextControl/TextControl.d.ts +2 -2
- package/types/utils/extractConfirmDialogOptions.d.ts +8 -2
- package/types/utils/useFormLoader.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ostack.tech/ui-kform",
|
|
3
|
-
"version": "1.3.0
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Integration of ostack/UI with ostack/KForm.",
|
|
5
5
|
"homepage": "https://ui.ostack.tech/",
|
|
6
|
+
"license": "Apache-2.0",
|
|
6
7
|
"author": {
|
|
7
8
|
"name": "Opensoft",
|
|
8
9
|
"url": "https://opensoft.pt/en/"
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"./package.json": "./package.json"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
47
|
+
"prepack": "cpy ../../LICENSE ./",
|
|
46
48
|
"build": "tsc -b && vite build && npm run copy:scss",
|
|
47
49
|
"copy:scss": "cpy 'src/**/*.scss' '!src/**/*.stories.scss' scss/",
|
|
48
50
|
"test": "vitest --run"
|
|
@@ -52,26 +54,19 @@
|
|
|
52
54
|
"esm-env": "^1.2.2"
|
|
53
55
|
},
|
|
54
56
|
"peerDependencies": {
|
|
55
|
-
"@fortawesome/fontawesome-svg-core": "^6.2.0 || ^7.0.0",
|
|
56
57
|
"@fortawesome/free-regular-svg-icons": "^6.2.0 || ^7.0.0",
|
|
57
58
|
"@fortawesome/free-solid-svg-icons": "^6.2.0 || ^7.0.0",
|
|
58
59
|
"@ostack.tech/kform": "^1.2.0",
|
|
59
60
|
"@ostack.tech/kform-react": "^1.2.0",
|
|
60
|
-
"@ostack.tech/ui": "~1.3.0
|
|
61
|
+
"@ostack.tech/ui": "~1.3.0",
|
|
61
62
|
"@types/react": "^19.0.0",
|
|
62
|
-
"@types/react-dom": "^19.0.0",
|
|
63
63
|
"date-fns": "^4.1.0",
|
|
64
64
|
"react": "^19.0.0",
|
|
65
|
-
"react-dom": "^19.0.0",
|
|
66
|
-
"react-to-print": "^3.0.0",
|
|
67
65
|
"zustand": "^5.0.0"
|
|
68
66
|
},
|
|
69
67
|
"peerDependenciesMeta": {
|
|
70
68
|
"@types/react": {
|
|
71
69
|
"optional": true
|
|
72
|
-
},
|
|
73
|
-
"@types/react-dom": {
|
|
74
|
-
"optional": true
|
|
75
70
|
}
|
|
76
71
|
}
|
|
77
72
|
}
|
|
@@ -9,6 +9,9 @@ $annexes-menu-trigger-open-z-index: calc(
|
|
|
9
9
|
var(--#{o-ui.$prefix}layer-z-index, 0) + var(--#{o-ui.$prefix}z-index-dropdown) + 1
|
|
10
10
|
) !default;
|
|
11
11
|
|
|
12
|
+
// Menu trigger - Icon
|
|
13
|
+
$annexes-menu-trigger-icon-font-size: var(--#{o-ui.$prefix}font-size-xs);
|
|
14
|
+
|
|
12
15
|
// Tab issues
|
|
13
16
|
$annexes-tab-issues-popover-button-icon-border-width: 1px !default;
|
|
14
17
|
$annexes-tab-issues-popover-button-padding: calc(
|
|
@@ -77,15 +77,15 @@ export interface AnnexProps extends AnnexObject, Omit<TabContentProps, "value" |
|
|
|
77
77
|
* Example value:
|
|
78
78
|
*
|
|
79
79
|
* ```tsx
|
|
80
|
-
* {
|
|
81
|
-
* "
|
|
82
|
-
*
|
|
80
|
+
* const ISSUE_MESSAGES = {
|
|
81
|
+
* "/**": {
|
|
82
|
+
* valueMissing: "Field is required.",
|
|
83
83
|
* },
|
|
84
|
-
* "field": {
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* }
|
|
88
|
-
* }
|
|
84
|
+
* "/my/field": {
|
|
85
|
+
* valueMissing: "My field cannot be left empty!",
|
|
86
|
+
* someOtherError: "Text of the other error.",
|
|
87
|
+
* },
|
|
88
|
+
* };
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
91
|
issueMessages?: Record<string, IssueMessagesByCode>;
|
|
@@ -64,4 +64,4 @@ export interface CheckboxControlProps<T extends boolean | null = boolean | null>
|
|
|
64
64
|
* }
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
export declare function CheckboxControl<T extends boolean | null = boolean | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, endAdornment, onFocus, onCheckedChange, onBlurToOutside, debug, ref, ...otherProps }: CheckboxControlProps<T>): import("react").JSX.Element;
|
|
67
|
+
export declare function CheckboxControl<T extends boolean | null = boolean | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, endAdornment, onFocus, onCheckedChange, onBlurToOutside, debug, ref, ...otherProps }: CheckboxControlProps<T>): import("react").JSX.Element;
|
|
@@ -87,4 +87,4 @@ export interface CheckboxGroupControlProps<T = unknown, TListable extends Listab
|
|
|
87
87
|
* }
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
90
|
-
export declare function CheckboxGroupControl<T = unknown, TListable extends Listable<T> | null = Listable<T> | null>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, minChecked, maxChecked, loading, showSpinner, disabled, readOnly, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: CheckboxGroupControlProps<T, TListable>): import("react").JSX.Element;
|
|
90
|
+
export declare function CheckboxGroupControl<T = unknown, TListable extends Listable<T> | null = Listable<T> | null>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, minChecked, maxChecked, loading, showSpinner, disabled, readOnly, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: CheckboxGroupControlProps<T, TListable>): import("react").JSX.Element;
|
|
@@ -67,4 +67,4 @@ export interface DateControlProps<T extends Temporal | null = Temporal | null> e
|
|
|
67
67
|
* }
|
|
68
68
|
* ```
|
|
69
69
|
*/
|
|
70
|
-
export declare function DateControl<T extends Temporal | null = Temporal | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, format: dateFormat, required, minDate, maxDate, loading, showSpinner, disabled, readOnly, onFocus, onBlurToOutside, endAdornment, debug, ref, ...otherProps }: DateControlProps<T>): import("react").JSX.Element;
|
|
70
|
+
export declare function DateControl<T extends Temporal | null = Temporal | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, format: dateFormat, required, minDate, maxDate, loading, showSpinner, disabled, readOnly, onFocus, onBlurToOutside, endAdornment, debug, ref, ...otherProps }: DateControlProps<T>): import("react").JSX.Element;
|
|
@@ -62,6 +62,7 @@ export interface DateRangeControlProps<TStart extends Temporal | null = Temporal
|
|
|
62
62
|
/** Properties to pass to the `IssueMessages` component. */
|
|
63
63
|
issueMessagesProps?: Omit<IssueMessagesProps, "path" | "issues" | "messages" | "unwrapped">;
|
|
64
64
|
onStartInitialized?: TemporalInputOptions<TStart>["onInitialized"];
|
|
65
|
+
onStartUninitialized?: TemporalInputOptions<TStart>["onUninitialized"];
|
|
65
66
|
onStartFormManagerEvent?: TemporalInputOptions<TStart>["onFormManagerEvent"];
|
|
66
67
|
onStartValueChange?: TemporalInputOptions<TStart>["onValueChange"];
|
|
67
68
|
onStartValidationStatusChange?: TemporalInputOptions<TStart>["onValidationStatusChange"];
|
|
@@ -69,6 +70,7 @@ export interface DateRangeControlProps<TStart extends Temporal | null = Temporal
|
|
|
69
70
|
onStartDirtyStatusChange?: TemporalInputOptions<TStart>["onDirtyStatusChange"];
|
|
70
71
|
onStartTouchedStatusChange?: TemporalInputOptions<TStart>["onTouchedStatusChange"];
|
|
71
72
|
onEndInitialized?: TemporalInputOptions<TEnd>["onInitialized"];
|
|
73
|
+
onEndUninitialized?: TemporalInputOptions<TEnd>["onUninitialized"];
|
|
72
74
|
onEndFormManagerEvent?: TemporalInputOptions<TEnd>["onFormManagerEvent"];
|
|
73
75
|
onEndValueChange?: TemporalInputOptions<TEnd>["onValueChange"];
|
|
74
76
|
onEndValidationStatusChange?: TemporalInputOptions<TEnd>["onValidationStatusChange"];
|
|
@@ -102,4 +104,4 @@ export interface DateRangeControlProps<TStart extends Temporal | null = Temporal
|
|
|
102
104
|
* }
|
|
103
105
|
* ```
|
|
104
106
|
*/
|
|
105
|
-
export declare function DateRangeControl<TStart extends Temporal | null = Temporal | null, TEnd extends Temporal | null = TStart>({ startPath, endPath, startIssueMessages, endIssueMessages, issuesPanelLabel, issuesPanelStartLabelSuffix: issuesPanelStartLabelSuffixProp, issuesPanelEndLabelSuffix: issuesPanelEndLabelSuffixProp, displayIssues, preventAutoFocus, startApiRef, endApiRef, issueMessagesProps, required, minDate, maxDate, loading, showSpinners, showStartSpinner, showEndSpinner, disabled, readOnly, startInputProps, endInputProps, onStartInitialized, onStartFormManagerEvent, onStartValueChange, onStartValidationStatusChange, onStartDisplayStatusChange, onStartDirtyStatusChange, onStartTouchedStatusChange, onEndInitialized, onEndFormManagerEvent, onEndValueChange, onEndValidationStatusChange, onEndDisplayStatusChange, onEndDirtyStatusChange, onEndTouchedStatusChange, onValueChange, format: dateFormat, onBlurToOutside, startMiddleAdornment, endAdornment, debug, ...otherProps }: DateRangeControlProps<TStart, TEnd>): import("react").JSX.Element;
|
|
107
|
+
export declare function DateRangeControl<TStart extends Temporal | null = Temporal | null, TEnd extends Temporal | null = TStart>({ startPath, endPath, startIssueMessages, endIssueMessages, issuesPanelLabel, issuesPanelStartLabelSuffix: issuesPanelStartLabelSuffixProp, issuesPanelEndLabelSuffix: issuesPanelEndLabelSuffixProp, displayIssues, preventAutoFocus, startApiRef, endApiRef, issueMessagesProps, required, minDate, maxDate, loading, showSpinners, showStartSpinner, showEndSpinner, disabled, readOnly, startInputProps, endInputProps, onStartInitialized, onStartUninitialized, onStartFormManagerEvent, onStartValueChange, onStartValidationStatusChange, onStartDisplayStatusChange, onStartDirtyStatusChange, onStartTouchedStatusChange, onEndInitialized, onEndUninitialized, onEndFormManagerEvent, onEndValueChange, onEndValidationStatusChange, onEndDisplayStatusChange, onEndDirtyStatusChange, onEndTouchedStatusChange, onValueChange, format: dateFormat, onBlurToOutside, startMiddleAdornment, endAdornment, debug, ...otherProps }: DateRangeControlProps<TStart, TEnd>): import("react").JSX.Element;
|
|
@@ -88,4 +88,4 @@ export interface FileControlProps<T extends KFormFile | null = KFormFile | null>
|
|
|
88
88
|
* }
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
export declare function FileControl<T extends KFormFile | null = KFormFile | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, fileInteraction, viewFileButtonLabel: viewFileButtonLabelProp, downloadFileButtonLabel: downloadFileButtonLabelProp, fallbackText: fallbackTextProp, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, accept, loading, showSpinner, disabled, readOnly, showClearButton: showClearButtonProp, clearDescription: clearDescriptionProp, endAdornment, onChange, onKeyDown, onFocus, onBlurToOutside, debug, clearButtonProps, ref, ...otherProps }: FileControlProps<T>): import("react").JSX.Element;
|
|
91
|
+
export declare function FileControl<T extends KFormFile | null = KFormFile | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, fileInteraction, viewFileButtonLabel: viewFileButtonLabelProp, downloadFileButtonLabel: downloadFileButtonLabelProp, fallbackText: fallbackTextProp, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, accept, loading, showSpinner, disabled, readOnly, showClearButton: showClearButtonProp, clearDescription: clearDescriptionProp, endAdornment, onChange, onKeyDown, onFocus, onBlurToOutside, debug, clearButtonProps, ref, ...otherProps }: FileControlProps<T>): import("react").JSX.Element;
|
|
@@ -53,23 +53,23 @@ export interface FormAppProps<T = any> extends Pick<RootProps, "enableErrorRepor
|
|
|
53
53
|
* Example value:
|
|
54
54
|
*
|
|
55
55
|
* ```tsx
|
|
56
|
-
* {
|
|
56
|
+
* const ISSUE_MESSAGES = {
|
|
57
57
|
* "/**": {
|
|
58
|
-
*
|
|
58
|
+
* valueMissing: "Field is required.",
|
|
59
59
|
* },
|
|
60
60
|
* "/my/field": {
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* }
|
|
64
|
-
* }
|
|
61
|
+
* valueMissing: "My field cannot be left empty!",
|
|
62
|
+
* someOtherError: "Text of the other error.",
|
|
63
|
+
* },
|
|
64
|
+
* };
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
67
|
issueMessages?: Record<string, IssueMessagesByCode>;
|
|
68
68
|
/**
|
|
69
69
|
* Mode of displaying issues:
|
|
70
70
|
*
|
|
71
|
-
* - `inline` mode
|
|
72
|
-
* bottom issues panel only functions as an aid for navigating issues.
|
|
71
|
+
* - `inline` mode displays issue messages near the component containing the issues. In this mode
|
|
72
|
+
* the bottom issues panel only functions as an aid for navigating issues.
|
|
73
73
|
* - `panel` mode displays issue messages within the bottom issues panel.
|
|
74
74
|
*
|
|
75
75
|
* @default "inline"
|
|
@@ -16,15 +16,15 @@ export interface FormAppIssueMessagesProps {
|
|
|
16
16
|
* Example value:
|
|
17
17
|
*
|
|
18
18
|
* ```tsx
|
|
19
|
-
* {
|
|
19
|
+
* const ISSUE_MESSAGES = {
|
|
20
20
|
* "/**": {
|
|
21
|
-
*
|
|
21
|
+
* valueMissing: "Field is required.",
|
|
22
22
|
* },
|
|
23
23
|
* "/my/field": {
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* }
|
|
27
|
-
* }
|
|
24
|
+
* valueMissing: "My field cannot be left empty!",
|
|
25
|
+
* someOtherError: "Text of the other error.",
|
|
26
|
+
* },
|
|
27
|
+
* };
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
issueMessages?: Record<string, IssueMessagesByCode>;
|
|
@@ -44,15 +44,15 @@ export interface FormPageProps extends FormPageObject, Omit<ComponentProps<"sect
|
|
|
44
44
|
* Example value:
|
|
45
45
|
*
|
|
46
46
|
* ```tsx
|
|
47
|
-
* {
|
|
48
|
-
* "
|
|
49
|
-
*
|
|
47
|
+
* const ISSUE_MESSAGES = {
|
|
48
|
+
* "/**": {
|
|
49
|
+
* valueMissing: "Field is required.",
|
|
50
50
|
* },
|
|
51
|
-
* "field": {
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* }
|
|
55
|
-
* }
|
|
51
|
+
* "/my/field": {
|
|
52
|
+
* valueMissing: "My field cannot be left empty!",
|
|
53
|
+
* someOtherError: "Text of the other error.",
|
|
54
|
+
* },
|
|
55
|
+
* };
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
58
58
|
issueMessages?: Record<string, IssueMessagesByCode>;
|
|
@@ -41,7 +41,7 @@ export interface FormPagesProps extends ComponentProps<"div"> {
|
|
|
41
41
|
* return (
|
|
42
42
|
* <FormPages>
|
|
43
43
|
* <FormPagesNavigation />
|
|
44
|
-
* <FormPage path="/
|
|
44
|
+
* <FormPage path="/filingInfo" title="Filing information" code="0">
|
|
45
45
|
* Filing information page…
|
|
46
46
|
* </FormPage>
|
|
47
47
|
* <FormPage path="/exemptions" title="Exemptions & declarations" code="1">
|
|
@@ -39,15 +39,15 @@ export interface FormStepProps extends FormStepObject, Omit<StepContentProps, "i
|
|
|
39
39
|
* Example value:
|
|
40
40
|
*
|
|
41
41
|
* ```tsx
|
|
42
|
-
* {
|
|
43
|
-
* "
|
|
44
|
-
*
|
|
42
|
+
* const ISSUE_MESSAGES = {
|
|
43
|
+
* "/**": {
|
|
44
|
+
* valueMissing: "Field is required.",
|
|
45
45
|
* },
|
|
46
|
-
* "field": {
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* }
|
|
50
|
-
* }
|
|
46
|
+
* "/my/field": {
|
|
47
|
+
* valueMissing: "My field cannot be left empty!",
|
|
48
|
+
* someOtherError: "Text of the other error.",
|
|
49
|
+
* },
|
|
50
|
+
* };
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
53
|
issueMessages?: Record<string, IssueMessagesByCode>;
|
|
@@ -57,4 +57,4 @@ export interface FormStepProps extends FormStepObject, Omit<StepContentProps, "i
|
|
|
57
57
|
/** Single form step. */
|
|
58
58
|
export declare function FormStep({ path, title: _title, documentTitle: _documentTitle, issuesPanelLabel: _issuesPanelLabel, disabled, readOnly, issueMessages, errorBoundaryProps, className, children, ...otherProps }: FormStepProps): false | import("react").JSX.Element;
|
|
59
59
|
/** @deprecated Use `FormStep` instead. */
|
|
60
|
-
export declare
|
|
60
|
+
export declare function FormStepContent(props: FormStepProps): import("react").JSX.Element;
|
|
@@ -51,12 +51,12 @@ export interface FormStepperProps extends Omit<StepperProps, "defaultActiveStep"
|
|
|
51
51
|
/**
|
|
52
52
|
* The form stepper component can be used to split parts of a form into separate steps. It is built
|
|
53
53
|
* on top of the [`Stepper`](/docs/ostack-ui-disclosure-stepper--docs) component. Although not
|
|
54
|
-
* strictly mandatory, each
|
|
54
|
+
* strictly mandatory, each step is typically represented by its own class, with its own schema and
|
|
55
55
|
* distinct path.
|
|
56
56
|
*
|
|
57
57
|
* It composes the following subcomponents:
|
|
58
58
|
*
|
|
59
|
-
* - `FormStepList`: Component used to navigate between form
|
|
59
|
+
* - `FormStepList`: Component used to navigate between form steps.
|
|
60
60
|
* - `FormStep`: The content of a single step of the form.
|
|
61
61
|
* - `FormStepperPreviousTrigger`: Trigger to navigate to the previous step.
|
|
62
62
|
* - `FormStepperNextTrigger`: Trigger to navigate to the next step.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type StepperFinishTriggerProps } from "@ostack.tech/ui";
|
|
2
2
|
/** Properties of the form stepper finish trigger component. */
|
|
3
3
|
export type FormStepperFinishTriggerProps = StepperFinishTriggerProps;
|
|
4
4
|
/** Trigger used to conclude the form stepper. */
|
|
5
|
-
export declare
|
|
5
|
+
export declare function FormStepperFinishTrigger(props: StepperFinishTriggerProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type StepperNextTriggerProps } from "@ostack.tech/ui";
|
|
2
2
|
/** Properties of the form stepper next trigger component. */
|
|
3
3
|
export type FormStepperNextTriggerProps = StepperNextTriggerProps;
|
|
4
4
|
/** Trigger used to go to the next step of the form stepper. */
|
|
5
|
-
export declare
|
|
5
|
+
export declare function FormStepperNextTrigger(props: StepperNextTriggerProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type StepperPreviousTriggerProps } from "@ostack.tech/ui";
|
|
2
2
|
/** Properties of the form stepper previous trigger component. */
|
|
3
3
|
export type FormStepperPreviousTriggerProps = StepperPreviousTriggerProps;
|
|
4
4
|
/** Trigger used to go to the previous step of the form stepper. */
|
|
5
|
-
export declare
|
|
5
|
+
export declare function FormStepperPreviousTrigger(props: StepperPreviousTriggerProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type StepperStateProps } from "@ostack.tech/ui";
|
|
2
2
|
/** Properties of the form stepper state component. */
|
|
3
3
|
export type FormStepperStateProps = StepperStateProps;
|
|
4
4
|
/** Component used to access the state of the form stepper and act on its API. */
|
|
5
|
-
export declare
|
|
5
|
+
export declare function FormStepperState(props: StepperStateProps): import("react").JSX.Element;
|
|
@@ -67,7 +67,7 @@ export interface NumericControlProps<T extends Numeric | null = Numeric | null>
|
|
|
67
67
|
* - [`Required`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-required/index.html):
|
|
68
68
|
* Sets the `required` property.
|
|
69
69
|
* - [`Min`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-min/index.html)/[`Max`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-max/index.html)/[`ExclusiveMin`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-exclusive-min/index.html)/[`ExclusiveMax`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-exclusive-max/index.html):
|
|
70
|
-
* Sets the `min`/`max`/`
|
|
70
|
+
* Sets the `min`/`max`/`exclusiveMin`/`exclusiveMax` properties.
|
|
71
71
|
* - [`Scale`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-scale/index.html)/[`MaxScale`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-max-scale/index.html):
|
|
72
72
|
* Sets the `scale` property.
|
|
73
73
|
*
|
|
@@ -84,4 +84,4 @@ export interface NumericControlProps<T extends Numeric | null = Numeric | null>
|
|
|
84
84
|
* }
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
|
-
export declare function NumericControl<T extends Numeric | null = Numeric | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, valueIsInteger, scale, required, min, max, exclusiveMin, exclusiveMax, loading, showSpinner, disabled, readOnly, endAdornment, onFocus, onBlurToOutside, debug, ref, ...otherProps }: NumericControlProps<T>): import("react").JSX.Element;
|
|
87
|
+
export declare function NumericControl<T extends Numeric | null = Numeric | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, valueIsInteger, scale, required, min, max, exclusiveMin, exclusiveMax, loading, showSpinner, disabled, readOnly, endAdornment, onFocus, onBlurToOutside, debug, ref, ...otherProps }: NumericControlProps<T>): import("react").JSX.Element;
|
|
@@ -81,4 +81,4 @@ export interface RadioGroupControlProps<T = unknown> extends Omit<InputOptions<T
|
|
|
81
81
|
* }
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
84
|
-
export declare function RadioGroupControl<T = unknown>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, showClearButton, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: RadioGroupControlProps<T>): import("react").JSX.Element;
|
|
84
|
+
export declare function RadioGroupControl<T = unknown>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, showClearButton, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: RadioGroupControlProps<T>): import("react").JSX.Element;
|
|
@@ -82,4 +82,4 @@ export interface SelectControlProps<T = unknown> extends Omit<InputOptions<T, T,
|
|
|
82
82
|
* }
|
|
83
83
|
* ```
|
|
84
84
|
*/
|
|
85
|
-
export declare function SelectControl<T = unknown>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, showClearButton, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: SelectControlProps<T>): import("react").JSX.Element;
|
|
85
|
+
export declare function SelectControl<T = unknown>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, loading, showSpinner, disabled, readOnly, showClearButton, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: SelectControlProps<T>): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OptionsGroupProps } from "@ostack.tech/ui";
|
|
2
2
|
import type { Key, ReactNode } from "react";
|
|
3
3
|
import type { SelectControlItemObject } from "./SelectControlItem.tsx";
|
|
4
4
|
/** Select control item group in object notation. */
|
|
5
|
-
export interface SelectControlItemGroupObject<T = unknown> extends Omit<
|
|
5
|
+
export interface SelectControlItemGroupObject<T = unknown> extends Omit<OptionsGroupProps, "children"> {
|
|
6
6
|
/** Group's options. */
|
|
7
7
|
options: SelectControlItemObject<T>[];
|
|
8
8
|
/** Group's unique key. */
|
|
@@ -93,4 +93,4 @@ export interface SelectMultipleControlProps<T = unknown, TListable extends Lista
|
|
|
93
93
|
* }
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
|
-
export declare function SelectMultipleControl<T = unknown, TListable extends Listable<T> | null = Listable<T> | null>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, maxSelected, loading, showSpinner, disabled, readOnly, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: SelectMultipleControlProps<T, TListable>): import("react").JSX.Element;
|
|
96
|
+
export declare function SelectMultipleControl<T = unknown, TListable extends Listable<T> | null = Listable<T> | null>({ path, options: optionsProp, issueMessages, issuesPanelLabel, displayIssues, unknownValueLabel: unknownValueLabelProp, preventAutoFocus, apiRef, issueMessagesProps, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, maxSelected, loading, showSpinner, disabled, readOnly, endAdornment, onFocus, onBlurToOutside, children, debug, ref, ...otherProps }: SelectMultipleControlProps<T, TListable>): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Path, type Table } from "@ostack.tech/kform";
|
|
2
2
|
import { type ControllerOptions } from "@ostack.tech/kform-react";
|
|
3
|
-
import { type DataTableProps } from "@ostack.tech/ui";
|
|
3
|
+
import { type DataTableProps, type DataTableDisplayMode } from "@ostack.tech/ui";
|
|
4
4
|
import { type ReactNode, type Ref } from "react";
|
|
5
5
|
import type { IssueMessagesByCode, IssueMessagesProps } from "../IssueMessages";
|
|
6
6
|
import type { TableControlApi } from "./TableControlApi.ts";
|
|
@@ -15,6 +15,13 @@ export interface TableControlProps<T = unknown, TTable extends Table<T> | null =
|
|
|
15
15
|
path?: string | Path;
|
|
16
16
|
/** Table control columns in object notation. */
|
|
17
17
|
columns?: TableControlColumnObjects<T>;
|
|
18
|
+
/**
|
|
19
|
+
* Display mode of the table control. Rows are displayed either in pages or within an infinite
|
|
20
|
+
* scroll component.
|
|
21
|
+
*
|
|
22
|
+
* @default "scrolled"
|
|
23
|
+
*/
|
|
24
|
+
displayMode?: DataTableDisplayMode;
|
|
18
25
|
/**
|
|
19
26
|
* Issue messages of this control.
|
|
20
27
|
*
|
|
@@ -91,7 +98,7 @@ export interface TableControlProps<T = unknown, TTable extends Table<T> | null =
|
|
|
91
98
|
* - `TableControlContent`: Main content of the table control, containing the table itself.
|
|
92
99
|
* - `TableControlAddRowTrigger`: Trigger used to add a new row to the table.
|
|
93
100
|
* - `TableControlRemoveRowTrigger`: Trigger used to remove a row from the table.
|
|
94
|
-
* - `
|
|
101
|
+
* - `TableControlPagination`: Optional pagination component of the table control, showing the current
|
|
95
102
|
* scroll progress in the default `scrolled` mode and allowing the selection of the current page
|
|
96
103
|
* in `paged` mode.
|
|
97
104
|
* - `TableControlRowsPerPage`: Optional component allowing the selection of the number of rows to
|
|
@@ -105,7 +112,7 @@ export interface TableControlProps<T = unknown, TTable extends Table<T> | null =
|
|
|
105
112
|
* - [`Required`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-required/index.html):
|
|
106
113
|
* Sets the `required` property.
|
|
107
114
|
* - [`Size`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-size/index.html)/[`MaxSize`](https://kform.ostack.tech/api/packages/kform/tech.ostack.kform.validations/-max-size/index.html):
|
|
108
|
-
* Sets the `maxRows`
|
|
115
|
+
* Sets the `maxRows` property.
|
|
109
116
|
*
|
|
110
117
|
* Example usage:
|
|
111
118
|
*
|
|
@@ -116,6 +123,7 @@ export interface TableControlProps<T = unknown, TTable extends Table<T> | null =
|
|
|
116
123
|
* TableControlActionsColumn,
|
|
117
124
|
* TableControlAddRowTrigger,
|
|
118
125
|
* TableControlColumn,
|
|
126
|
+
* TableControlColumns,
|
|
119
127
|
* TableControlContent,
|
|
120
128
|
* TextControl,
|
|
121
129
|
* } from "@ostack.tech/ui-kform";
|
|
@@ -139,7 +147,7 @@ export interface TableControlProps<T = unknown, TTable extends Table<T> | null =
|
|
|
139
147
|
* }
|
|
140
148
|
* ```
|
|
141
149
|
*/
|
|
142
|
-
export declare function TableControl<T = unknown, TTable extends Table<T> | null = Table<T> | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, columns: columnsProp, required, maxRows, getRowValue, disabled, readOnly, className, debug, children, ...otherProps }: TableControlProps<T, TTable>): import("react").JSX.Element;
|
|
150
|
+
export declare function TableControl<T = unknown, TTable extends Table<T> | null = Table<T> | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, apiRef, issueMessagesProps, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, columns: columnsProp, required, maxRows, getRowValue, disabled, readOnly, className, debug, children, ...otherProps }: TableControlProps<T, TTable>): import("react").JSX.Element;
|
|
143
151
|
/** Properties of the table control cell renderer. */
|
|
144
152
|
export interface TableControlCellRendererProps<T = unknown> {
|
|
145
153
|
render: (rowController: TableControlRowController<T>) => ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type DataTablePaginationProps } from "@ostack.tech/ui";
|
|
2
2
|
/** Properties of the table control pagination component. */
|
|
3
3
|
export type TableControlPaginationProps = DataTablePaginationProps;
|
|
4
4
|
/** Table control pagination. */
|
|
5
|
-
export declare
|
|
5
|
+
export declare function TableControlPagination(props: TableControlPaginationProps): import("react").JSX.Element;
|
|
@@ -49,6 +49,6 @@ export interface TableControlRemoveRowTriggerChildrenProps extends TableControlR
|
|
|
49
49
|
* Trigger used to remove a row of a table controlled by a table control.
|
|
50
50
|
*
|
|
51
51
|
* By default, it renders an icon button with label `defaultButtonLabel`, however, this can be
|
|
52
|
-
*
|
|
52
|
+
* overridden by providing `children`.
|
|
53
53
|
*/
|
|
54
54
|
export declare function TableControlRemoveRowTrigger({ onConfirmRowRemoval, onRowRemoved, confirmDialogMessage: confirmDialogMessageProp, confirmDialogTitle: confirmDialogTitleProp, confirmDialogOkText: confirmDialogOkTextProp, confirmDialogCancelText: confirmDialogCancelTextProp, showConfirmation: showConfirmationProp, showWhenReadOnly, disabled, onClick, children, ...otherProps }: TableControlRemoveRowTriggerProps): import("react").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type DataTableRowsPerPageProps } from "@ostack.tech/ui";
|
|
2
2
|
/** Properties of the table control rows per page component. */
|
|
3
3
|
export type TableControlRowsPerPageProps = DataTableRowsPerPageProps;
|
|
4
4
|
/** Table control rows per page. */
|
|
5
|
-
export declare
|
|
5
|
+
export declare function TableControlRowsPerPage(props: TableControlRowsPerPageProps): import("react").JSX.Element;
|
|
@@ -44,7 +44,7 @@ export type TextControlPropsBase<T extends string | null = string | null> = Omit
|
|
|
44
44
|
/** Reference to the control's API. */
|
|
45
45
|
apiRef?: Ref<InputController<T, string, ComponentRef<typeof Input | typeof TextArea>> | undefined>;
|
|
46
46
|
/** Properties to pass to the `IssueMessages` component. */
|
|
47
|
-
issueMessagesProps?: Omit<IssueMessagesProps, "path" | "issues" | "messages">;
|
|
47
|
+
issueMessagesProps?: Omit<IssueMessagesProps, "path" | "issues" | "messages" | "unwrapped">;
|
|
48
48
|
};
|
|
49
49
|
/** Properties of the text control component when `multiline` is **not** set. */
|
|
50
50
|
export type TextControlInputProps<T extends string | null = string | null> = Omit<InputProps, "defaultValue" | "value" | "onValueChange" | "status" | "validate" | "validationMode"> & TextControlPropsBase<T> & {
|
|
@@ -83,4 +83,4 @@ export type TextControlTextAreaProps<T extends string | null = string | null> =
|
|
|
83
83
|
* }
|
|
84
84
|
* ```
|
|
85
85
|
*/
|
|
86
|
-
export declare function TextControl<T extends string | null = string | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, multiline, apiRef, issueMessagesProps, formManager, onInitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, minLength, maxLength, pattern, loading, showSpinner, disabled, readOnly, endAdornment, onChange, onFocus, onBlurToOutside, debug, ref, ...otherProps }: TextControlProps<T>): import("react").JSX.Element;
|
|
86
|
+
export declare function TextControl<T extends string | null = string | null>({ path, issueMessages, issuesPanelLabel, displayIssues, preventAutoFocus, multiline, apiRef, issueMessagesProps, formManager, onInitialized, onUninitialized, onFormManagerEvent, onValueChange, onValidationStatusChange, onDisplayStatusChange, onDirtyStatusChange, onTouchedStatusChange, required, minLength, maxLength, pattern, loading, showSpinner, disabled, readOnly, endAdornment, onChange, onFocus, onBlurToOutside, debug, ref, ...otherProps }: TextControlProps<T>): import("react").JSX.Element;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { ConfirmDialogOptions } from "@ostack.tech/ui";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
|
+
/** Confirm dialog options plus a message property. */
|
|
4
|
+
type PrefixableConfirmDialogOptions = ConfirmDialogOptions & {
|
|
5
|
+
/** Message of the confirmation dialog. */
|
|
6
|
+
message?: ReactNode;
|
|
7
|
+
};
|
|
3
8
|
/** Confirm dialog options with a prefix. */
|
|
4
9
|
export type PrefixedConfirmDialogOptions<TPrefix extends string = "confirmDialog"> = {
|
|
5
|
-
[K in keyof
|
|
6
|
-
}
|
|
10
|
+
[K in keyof PrefixableConfirmDialogOptions as `${TPrefix}${Capitalize<string & K>}`]: PrefixableConfirmDialogOptions[K];
|
|
11
|
+
};
|
|
7
12
|
/** Result of the {@link extractConfirmDialogOptions} function. */
|
|
8
13
|
export type ExtractConfirmDialogOptionsResult<TOptions extends PrefixedConfirmDialogOptions<TPrefix>, TPrefix extends string = "confirmDialog", TNewPrefix extends string = ""> = [
|
|
9
14
|
TNewPrefix extends "" ? ConfirmDialogOptions : PrefixedConfirmDialogOptions<TNewPrefix>,
|
|
@@ -11,3 +16,4 @@ export type ExtractConfirmDialogOptionsResult<TOptions extends PrefixedConfirmDi
|
|
|
11
16
|
];
|
|
12
17
|
/** Function used to extract confirm dialog options with a given prefix. */
|
|
13
18
|
export declare function extractConfirmDialogOptions<TOptions extends PrefixedConfirmDialogOptions<TPrefix>, TPrefix extends string = "confirmDialog", TNewPrefix extends string = "">(options: TOptions, prefix?: TPrefix, newPrefix?: TNewPrefix): ExtractConfirmDialogOptionsResult<TOptions, TPrefix, TNewPrefix>;
|
|
19
|
+
export {};
|