extended-dynamic-forms 0.3.9 → 0.3.11
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 +15 -1
- package/dist/WizardForm.d.ts +2 -1
- package/dist/events/FormEventContext.d.ts +4 -0
- package/dist/index.es.js +26783 -22702
- package/dist/index.umd.js +1614 -1593
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/templateEngine.d.ts +24 -0
- package/dist/widgets/base/types.d.ts +114 -39
- package/dist/widgets/base/utils.d.ts +44 -1
- package/dist/widgets/choice/ChoiceWidget.types.d.ts +32 -1
- package/dist/widgets/choice/hooks/useFormDataSource.d.ts +9 -0
- package/dist/widgets/choice/providers/ApiDataSource.d.ts +3 -0
- package/dist/widgets/choice/utils/responseMapper.d.ts +4 -0
- package/dist/widgets/display/DividerWidget.d.ts +6 -0
- package/dist/widgets/display/HtmlWidget.d.ts +6 -0
- package/dist/widgets/display/SpacerWidget.d.ts +6 -0
- package/dist/widgets/display/TitleWidget.d.ts +6 -0
- package/dist/widgets/display/index.d.ts +4 -0
- package/dist/widgets/index.d.ts +15 -1
- package/package.json +8 -11
- package/dist/widgets/choice/hooks/__tests__/useChoiceWidget.test.d.ts +0 -1
- package/dist/widgets/choice/hooks/__tests__/useDataSource.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ Conditional logic is configured with pure JSON via `x-edf:rules` in your `schema
|
|
|
11
11
|
- Cannot be installed from npm due to local file dependencies
|
|
12
12
|
- JSON logic conditions don't work with vanilla JavaScript builds
|
|
13
13
|
- Array drag-and-drop is not implemented
|
|
14
|
-
-
|
|
14
|
+
- Automated coverage is provided by logic and snapshot suites; component/UI tests
|
|
15
|
+
are intentionally omitted
|
|
15
16
|
- JSON Patch implementation supports add/remove/replace only (not move/copy/test)
|
|
16
17
|
|
|
17
18
|
## Overview
|
|
@@ -49,6 +50,19 @@ npm run dev
|
|
|
49
50
|
|
|
50
51
|
**Important:** The library is currently designed for internal use or as part of a monorepo setup. Standalone npm package distribution is not yet supported.
|
|
51
52
|
|
|
53
|
+
## Testing
|
|
54
|
+
|
|
55
|
+
The project uses Vitest with **Node** environment to cover pure logic and serialized
|
|
56
|
+
outputs. Component or DOM-level tests are intentionally excluded.
|
|
57
|
+
|
|
58
|
+
- Run the full suite: `npm test`
|
|
59
|
+
- Logic-only focus: `npm test -- tests/logic`
|
|
60
|
+
- Snapshot updates: `npm test -- tests/snapshots -- -u`
|
|
61
|
+
|
|
62
|
+
After pulling dependencies or updating `package.json`, run `npm install` (or
|
|
63
|
+
`yarn install`) so the lockfile reflects removed packages such as
|
|
64
|
+
`@testing-library/*` and `jsdom`.
|
|
65
|
+
|
|
52
66
|
## Core Architecture
|
|
53
67
|
|
|
54
68
|
### Declarative Conditionals (JSON-only)
|
package/dist/WizardForm.d.ts
CHANGED
|
@@ -27,5 +27,6 @@ export interface WizardFormProps {
|
|
|
27
27
|
widgets?: any;
|
|
28
28
|
fields?: any;
|
|
29
29
|
templates?: any;
|
|
30
|
+
enableDynamicBinding?: boolean;
|
|
30
31
|
}
|
|
31
|
-
export declare function WizardForm({ schema, uiSchema, webhooks, formData: initialFormData, onSubmit, onStepChange, onFieldFocus, onFieldBlur, onFieldChange, onLiveChange, showProgressBar, showStepDescription, submitButtonText, liveValidate, showErrorList, onWebhookStart, onWebhookComplete, onWebhookError, widgets, fields, templates, }: WizardFormProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function WizardForm({ schema, uiSchema, webhooks, formData: initialFormData, onSubmit, onStepChange, onFieldFocus, onFieldBlur, onFieldChange, onLiveChange, showProgressBar, showStepDescription, submitButtonText, liveValidate, showErrorList, onWebhookStart, onWebhookComplete, onWebhookError, widgets, fields, templates, enableDynamicBinding, }: WizardFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,12 +5,16 @@ import { FormEventManager } from './FormEventManager';
|
|
|
5
5
|
export interface FormEventContextType {
|
|
6
6
|
eventHub: FormEventHub;
|
|
7
7
|
formData?: any;
|
|
8
|
+
bindingData?: any;
|
|
9
|
+
formContext?: any;
|
|
8
10
|
}
|
|
9
11
|
declare const FormEventContext: React.Context<FormEventContextType | null>;
|
|
10
12
|
export { FormEventContext, FormEventManager };
|
|
11
13
|
export interface FormEventProviderProps {
|
|
12
14
|
eventHub: FormEventHub;
|
|
13
15
|
formData?: any;
|
|
16
|
+
bindingData?: any;
|
|
17
|
+
formContext?: any;
|
|
14
18
|
children: ReactNode;
|
|
15
19
|
}
|
|
16
20
|
export declare const FormEventProvider: React.FC<FormEventProviderProps>;
|