@sonata-innovations/fiber-fbre 3.2.1 → 3.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/README.md +26 -3
- package/dist/fiber-fbre.cjs +1 -1
- package/dist/fiber-fbre.css +1 -1
- package/dist/fiber-fbre.js +1346 -1299
- package/dist/index.d.ts +26 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { ComponentYesNoProperties } from '@sonata-innovations/fiber-types';
|
|
|
31
31
|
import { ConditionGroup } from '@sonata-innovations/fiber-types';
|
|
32
32
|
import { ConditionOperator } from '@sonata-innovations/fiber-types';
|
|
33
33
|
import { ConditionRule } from '@sonata-innovations/fiber-types';
|
|
34
|
+
import { ConfirmationConfig } from '@sonata-innovations/fiber-types';
|
|
34
35
|
import { ControlsConfig } from '@sonata-innovations/fiber-types';
|
|
35
36
|
import { DateFormat } from '@sonata-innovations/fiber-types';
|
|
36
37
|
import { FC } from 'react';
|
|
@@ -143,6 +144,22 @@ export { ConditionOperator }
|
|
|
143
144
|
|
|
144
145
|
export { ConditionRule }
|
|
145
146
|
|
|
147
|
+
export { ConfirmationConfig }
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Parent-supplied override for the terminal confirmation screen.
|
|
151
|
+
*
|
|
152
|
+
* Returned (directly or via a resolved Promise) from `onFlowComplete`. When an
|
|
153
|
+
* object is returned it replaces the flow's configured `confirmation` message —
|
|
154
|
+
* useful for content only known after submit, e.g. a server-generated
|
|
155
|
+
* reference number. `title`/`body` support the same `${...}` reference markup
|
|
156
|
+
* as the configured message.
|
|
157
|
+
*/
|
|
158
|
+
export declare type ConfirmationResult = {
|
|
159
|
+
title?: string;
|
|
160
|
+
body?: string;
|
|
161
|
+
};
|
|
162
|
+
|
|
146
163
|
export { ControlsConfig }
|
|
147
164
|
|
|
148
165
|
export { DateFormat }
|
|
@@ -173,7 +190,15 @@ declare interface FBRECallbackProps {
|
|
|
173
190
|
screenIndex?: number;
|
|
174
191
|
context?: Record<string, string | boolean | number>;
|
|
175
192
|
storeRef?: React.MutableRefObject<StoreApi<FBREStoreState> | null>;
|
|
176
|
-
|
|
193
|
+
/**
|
|
194
|
+
* Called when the flow is submitted, with the collected {@link FlowData}.
|
|
195
|
+
* Return (or resolve with) a {@link ConfirmationResult} to override the
|
|
196
|
+
* flow's configured confirmation message — e.g. with a server-generated
|
|
197
|
+
* reference number. Returning a Promise keeps the submit button in its
|
|
198
|
+
* in-flight state until it settles; a rejection surfaces as a completion
|
|
199
|
+
* error and the confirmation is not shown.
|
|
200
|
+
*/
|
|
201
|
+
onFlowComplete: (data: FlowData) => void | ConfirmationResult | Promise<void | ConfirmationResult>;
|
|
177
202
|
onScreenChange?: (index: number, data: any) => void;
|
|
178
203
|
onScreenValidationChange?: (index: number, data: any) => void;
|
|
179
204
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonata-innovations/fiber-fbre",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Fiber Render Engine — renders Flow JSON forms with conditional logic, validation, and screen transitions",
|
|
5
5
|
"keywords": ["fiber", "form-builder", "form-renderer", "react", "flow-json", "data-collection"],
|
|
6
6
|
"license": "MIT",
|