extended-dynamic-forms 0.1.21 → 0.1.22
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/ExtendedForm.d.ts +4 -0
- package/dist/WizardForm.d.ts +26 -0
- package/dist/components/arrays/ArrayFieldItemTemplate.d.ts +3 -0
- package/dist/components/arrays/ArrayFieldTemplate.d.ts +3 -0
- package/dist/components/arrays/index.d.ts +2 -0
- package/dist/components/fields/AddressField.d.ts +3 -0
- package/dist/components/fields/CurrencyField.d.ts +4 -0
- package/dist/components/fields/PhoneField.d.ts +4 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/templates/FieldTemplate.d.ts +4 -0
- package/dist/components/templates/SubmitButton.d.ts +4 -0
- package/dist/components/templates/index.d.ts +2 -0
- package/dist/conditionals/ConditionalActions.d.ts +13 -0
- package/dist/conditionals/ConditionalContext.d.ts +32 -0
- package/dist/conditionals/DynamicArrayConditionalEngine.d.ts +77 -0
- package/dist/conditionals/SimpleConditionalEngine.d.ts +41 -0
- package/dist/conditionals/SmartJsonRulesTransformer.d.ts +10 -0
- package/dist/conditionals/index.d.ts +7 -0
- package/dist/conditionals/v2/createConditionalEngineHook.d.ts +3 -0
- package/dist/conditionals/v2/engines/schemaEngineConfig.d.ts +4 -0
- package/dist/conditionals/v2/engines/uiEngineConfig.d.ts +4 -0
- package/dist/conditionals/v2/engines/validationEngineConfig.d.ts +13 -0
- package/dist/conditionals/v2/hooks/useConditionalSchema.d.ts +4 -0
- package/dist/conditionals/v2/hooks/useConditionalUi.d.ts +4 -0
- package/dist/conditionals/v2/hooks/useConditionalValidation.d.ts +4 -0
- package/dist/conditionals/v2/index.d.ts +10 -0
- package/dist/conditionals/v2/migration.d.ts +76 -0
- package/dist/conditionals/v2/types.d.ts +37 -0
- package/dist/conditionals/v2/utils/dynamicArrayItems.d.ts +59 -0
- package/dist/conditionals/v2/utils/jsonPatch.d.ts +9 -0
- package/dist/events/FormEventContext.d.ts +19 -0
- package/dist/events/FormEventHub.d.ts +27 -0
- package/dist/events/FormEventManager.d.ts +10 -0
- package/dist/events/index.d.ts +4 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useFormDevTools.d.ts +48 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.es.js +20325 -0
- package/dist/index.umd.js +172 -0
- package/dist/layouts/index.d.ts +2 -0
- package/dist/layouts/wizard/ProgressIndicator.d.ts +10 -0
- package/dist/layouts/wizard/StepNavigation.d.ts +11 -0
- package/dist/layouts/wizard/WizardLayout.d.ts +31 -0
- package/dist/layouts/wizard/WizardNavigation.d.ts +16 -0
- package/dist/layouts/wizard/WizardObjectFieldTemplate.d.ts +4 -0
- package/dist/layouts/wizard/WizardSectionTemplate.d.ts +11 -0
- package/dist/layouts/wizard/index.d.ts +7 -0
- package/dist/types/index.d.ts +88 -0
- package/dist/utils/formDataUtils.d.ts +22 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/schemaUtils.d.ts +24 -0
- package/dist/utils/validationUtils.d.ts +26 -0
- package/dist/vanilla-entry.d.ts +208 -0
- package/dist/widgets/date/DateWidget.d.ts +4 -0
- package/dist/widgets/enhanced/EnhancedWidgets.d.ts +36 -0
- package/dist/widgets/file/FileWidget.d.ts +4 -0
- package/dist/widgets/index.d.ts +33 -0
- package/dist/widgets/input/ColorWidget.d.ts +4 -0
- package/dist/widgets/input/RangeWidget.d.ts +4 -0
- package/dist/widgets/input/RatingWidget.d.ts +4 -0
- package/package.json +2 -2
- package/dist/extended-dynamic-forms.standalone.js +0 -882
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ProgressIndicatorProps {
|
|
4
|
+
currentStep: number;
|
|
5
|
+
totalSteps: number;
|
|
6
|
+
progressPercentage: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare const ProgressIndicator: React.FC<ProgressIndicatorProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { WizardStep } from './WizardLayout';
|
|
3
|
+
|
|
4
|
+
export interface StepNavigationProps {
|
|
5
|
+
steps: WizardStep[];
|
|
6
|
+
currentStep: number;
|
|
7
|
+
onStepChange?: (stepIndex: number) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare const StepNavigation: React.FC<StepNavigationProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface WizardStep {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: React.ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
completed?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface WizardLayoutProps {
|
|
14
|
+
title: string;
|
|
15
|
+
subtitle?: string;
|
|
16
|
+
steps: WizardStep[];
|
|
17
|
+
currentStep: number;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
onStepChange?: (stepIndex: number) => void;
|
|
20
|
+
onPrevious?: () => void;
|
|
21
|
+
onNext?: () => void;
|
|
22
|
+
onSubmit?: () => void;
|
|
23
|
+
canGoNext?: boolean;
|
|
24
|
+
canGoPrevious?: boolean;
|
|
25
|
+
isLastStep?: boolean;
|
|
26
|
+
submitLabel?: string;
|
|
27
|
+
nextLabel?: string;
|
|
28
|
+
previousLabel?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const WizardLayout: React.FC<WizardLayoutProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface WizardNavigationProps {
|
|
4
|
+
onPrevious?: () => void;
|
|
5
|
+
onNext?: () => void;
|
|
6
|
+
onSubmit?: () => void;
|
|
7
|
+
canGoNext?: boolean;
|
|
8
|
+
canGoPrevious?: boolean;
|
|
9
|
+
isLastStep?: boolean;
|
|
10
|
+
submitLabel?: string;
|
|
11
|
+
nextLabel?: string;
|
|
12
|
+
previousLabel?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
export declare const WizardNavigation: React.FC<WizardNavigationProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ObjectFieldTemplateProps } from '@rjsf/utils';
|
|
3
|
+
|
|
4
|
+
export interface WizardSectionTemplateProps extends ObjectFieldTemplateProps {
|
|
5
|
+
sectionTitle?: string;
|
|
6
|
+
sectionDescription?: string;
|
|
7
|
+
sectionIcon?: React.ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare const WizardSectionTemplate: React.FC<WizardSectionTemplateProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { WizardLayout } from './WizardLayout';
|
|
2
|
+
export { ProgressIndicator } from './ProgressIndicator';
|
|
3
|
+
export { StepNavigation } from './StepNavigation';
|
|
4
|
+
export { WizardNavigation } from './WizardNavigation';
|
|
5
|
+
export { WizardObjectFieldTemplate } from './WizardObjectFieldTemplate';
|
|
6
|
+
export { WizardSectionTemplate } from './WizardSectionTemplate';
|
|
7
|
+
export type { WizardStep } from './WizardLayout';
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { FormProps } from '@rjsf/core';
|
|
2
|
+
import { RJSFSchema, UiSchema } from '@rjsf/utils';
|
|
3
|
+
|
|
4
|
+
export interface FormEventHandlers {
|
|
5
|
+
beforeSubmit?: (data: any) => Promise<any> | any;
|
|
6
|
+
afterSubmit?: (data: any) => Promise<void> | void;
|
|
7
|
+
beforeValidation?: (data: any) => Promise<any> | any;
|
|
8
|
+
afterValidation?: (data: any, errors: any) => Promise<void> | void;
|
|
9
|
+
}
|
|
10
|
+
export interface FormFieldEvent {
|
|
11
|
+
eventType: 'focus' | 'blur' | 'change';
|
|
12
|
+
fieldId: string;
|
|
13
|
+
fieldValue: any;
|
|
14
|
+
schema?: any;
|
|
15
|
+
formData?: any;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
fieldPath?: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface WebhookConfig {
|
|
20
|
+
url: string;
|
|
21
|
+
method?: 'POST' | 'PUT' | 'PATCH';
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
events?: ('focus' | 'blur' | 'change')[];
|
|
24
|
+
debounceMs?: number;
|
|
25
|
+
retries?: number;
|
|
26
|
+
timeout?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface FieldEventHandlers {
|
|
29
|
+
onFieldFocus?: (event: FormFieldEvent) => Promise<void> | void;
|
|
30
|
+
onFieldBlur?: (event: FormFieldEvent) => Promise<void> | void;
|
|
31
|
+
onFieldChange?: (event: FormFieldEvent) => Promise<void> | void;
|
|
32
|
+
}
|
|
33
|
+
export interface ExtendedFormProps extends Omit<FormProps, 'validator'>, FormEventHandlers, FieldEventHandlers {
|
|
34
|
+
schema: RJSFSchema;
|
|
35
|
+
uiSchema?: UiSchema;
|
|
36
|
+
webhooks?: WebhookConfig[];
|
|
37
|
+
conditionals?: ConditionalConfig;
|
|
38
|
+
}
|
|
39
|
+
export interface CustomWidgetProps {
|
|
40
|
+
label?: string;
|
|
41
|
+
required?: boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
readonly?: boolean;
|
|
44
|
+
autofocus?: boolean;
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
help?: string;
|
|
47
|
+
rawErrors?: string[];
|
|
48
|
+
}
|
|
49
|
+
export interface ConditionalRule {
|
|
50
|
+
conditions: Record<string, any>;
|
|
51
|
+
event: ConditionalEvent;
|
|
52
|
+
order?: number;
|
|
53
|
+
priority?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface ConditionalEvent {
|
|
56
|
+
type: string;
|
|
57
|
+
params?: Record<string, any>;
|
|
58
|
+
}
|
|
59
|
+
export interface ConditionalAction {
|
|
60
|
+
(params: any, schema: RJSFSchema, uiSchema: UiSchema, formData: any): void;
|
|
61
|
+
propTypes?: any;
|
|
62
|
+
validate?: (params: any, schema: RJSFSchema, uiSchema: UiSchema) => void;
|
|
63
|
+
}
|
|
64
|
+
export interface ConditionalActions {
|
|
65
|
+
[actionType: string]: ConditionalAction;
|
|
66
|
+
}
|
|
67
|
+
export interface ConditionalEngine {
|
|
68
|
+
new (rules: ConditionalRule[], schema: RJSFSchema): ConditionalEngineInstance;
|
|
69
|
+
}
|
|
70
|
+
export interface ConditionalEngineInstance {
|
|
71
|
+
addRule(rule: ConditionalRule): void;
|
|
72
|
+
run(formData: any): Promise<ConditionalEvent[]>;
|
|
73
|
+
}
|
|
74
|
+
export interface ConditionalConfig {
|
|
75
|
+
rules?: ConditionalRule[];
|
|
76
|
+
engine?: ConditionalEngine;
|
|
77
|
+
extraActions?: ConditionalActions;
|
|
78
|
+
onSchemaChange?: (schemas: {
|
|
79
|
+
schema: RJSFSchema;
|
|
80
|
+
uiSchema: UiSchema;
|
|
81
|
+
}) => void;
|
|
82
|
+
}
|
|
83
|
+
export interface ConditionalState {
|
|
84
|
+
currentSchema: RJSFSchema;
|
|
85
|
+
currentUiSchema: UiSchema;
|
|
86
|
+
rules: ConditionalRule[];
|
|
87
|
+
isProcessing: boolean;
|
|
88
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const formDataUtils: {
|
|
2
|
+
/**
|
|
3
|
+
* Deep clone form data to avoid mutations
|
|
4
|
+
*/
|
|
5
|
+
cloneFormData: (data: any) => any;
|
|
6
|
+
/**
|
|
7
|
+
* Merge two form data objects
|
|
8
|
+
*/
|
|
9
|
+
mergeFormData: (current: any, updates: any) => any;
|
|
10
|
+
/**
|
|
11
|
+
* Get nested value from form data using dot notation
|
|
12
|
+
*/
|
|
13
|
+
getNestedValue: (data: any, path: string) => any;
|
|
14
|
+
/**
|
|
15
|
+
* Set nested value in form data using dot notation
|
|
16
|
+
*/
|
|
17
|
+
setNestedValue: (data: any, path: string, value: any) => any;
|
|
18
|
+
/**
|
|
19
|
+
* Remove empty values from form data
|
|
20
|
+
*/
|
|
21
|
+
removeEmptyValues: (data: any) => any;
|
|
22
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RJSFSchema } from '@rjsf/utils';
|
|
2
|
+
|
|
3
|
+
export declare const schemaUtils: {
|
|
4
|
+
/**
|
|
5
|
+
* Get required fields from schema
|
|
6
|
+
*/
|
|
7
|
+
getRequiredFields: (schema: RJSFSchema) => string[];
|
|
8
|
+
/**
|
|
9
|
+
* Check if a field is required
|
|
10
|
+
*/
|
|
11
|
+
isFieldRequired: (schema: RJSFSchema, fieldName: string) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Get field schema by path
|
|
14
|
+
*/
|
|
15
|
+
getFieldSchema: (schema: RJSFSchema, path: string) => RJSFSchema | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Merge two schemas
|
|
18
|
+
*/
|
|
19
|
+
mergeSchemas: (schema1: RJSFSchema, schema2: RJSFSchema) => RJSFSchema;
|
|
20
|
+
/**
|
|
21
|
+
* Get all field paths from schema
|
|
22
|
+
*/
|
|
23
|
+
getAllFieldPaths: (schema: RJSFSchema, prefix?: string) => string[];
|
|
24
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const validationUtils: {
|
|
2
|
+
/**
|
|
3
|
+
* Validate email format
|
|
4
|
+
*/
|
|
5
|
+
isValidEmail: (email: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Validate phone number format
|
|
8
|
+
*/
|
|
9
|
+
isValidPhone: (phone: string) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Validate URL format
|
|
12
|
+
*/
|
|
13
|
+
isValidUrl: (url: string) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Validate date format
|
|
16
|
+
*/
|
|
17
|
+
isValidDate: (date: string) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Validate number in range
|
|
20
|
+
*/
|
|
21
|
+
isInRange: (value: number, min?: number, max?: number) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Custom validation messages
|
|
24
|
+
*/
|
|
25
|
+
getValidationMessage: (type: string, params?: any) => string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as ReactDOM } from 'react-dom/client';
|
|
3
|
+
import { default as dayjs } from 'dayjs';
|
|
4
|
+
|
|
5
|
+
import * as antd from 'antd';
|
|
6
|
+
import * as ExtendedDynamicFormsExports from './index';
|
|
7
|
+
declare function createForm(config: {
|
|
8
|
+
container: string | HTMLElement;
|
|
9
|
+
schema: any;
|
|
10
|
+
uiSchema?: any;
|
|
11
|
+
formData?: any;
|
|
12
|
+
onChange?: (data: any) => void;
|
|
13
|
+
onSubmit?: (data: any) => void;
|
|
14
|
+
onError?: (errors: any) => void;
|
|
15
|
+
conditionals?: any;
|
|
16
|
+
webhooks?: any;
|
|
17
|
+
widgets?: any;
|
|
18
|
+
fields?: any;
|
|
19
|
+
}): {
|
|
20
|
+
setFormData: (data: any) => void;
|
|
21
|
+
destroy: () => void;
|
|
22
|
+
};
|
|
23
|
+
declare function createWizardForm(config: {
|
|
24
|
+
container: string | HTMLElement;
|
|
25
|
+
schema: any;
|
|
26
|
+
uiSchema?: any;
|
|
27
|
+
formData?: any;
|
|
28
|
+
onStepChange?: (step: number, data: any) => void;
|
|
29
|
+
onSubmit?: (data: any) => void;
|
|
30
|
+
conditionals?: any;
|
|
31
|
+
webhooks?: any;
|
|
32
|
+
}): {
|
|
33
|
+
destroy: () => void;
|
|
34
|
+
};
|
|
35
|
+
declare const ExtendedDynamicForms: {
|
|
36
|
+
utils: {
|
|
37
|
+
createSchema: (properties: any) => {
|
|
38
|
+
type: string;
|
|
39
|
+
properties: any;
|
|
40
|
+
required: string[];
|
|
41
|
+
};
|
|
42
|
+
createUiSchema: (fields: any) => any;
|
|
43
|
+
widgets: {
|
|
44
|
+
text: string;
|
|
45
|
+
textarea: string;
|
|
46
|
+
select: string;
|
|
47
|
+
checkbox: string;
|
|
48
|
+
radio: string;
|
|
49
|
+
date: string;
|
|
50
|
+
datetime: string;
|
|
51
|
+
email: string;
|
|
52
|
+
password: string;
|
|
53
|
+
number: string;
|
|
54
|
+
file: string;
|
|
55
|
+
hidden: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
validator: import('@rjsf/validator-ajv8/lib/validator.js').default<any, ExtendedDynamicFormsExports.RJSFSchema, any>;
|
|
59
|
+
ExtendedForm: React.ForwardRefExoticComponent<Omit<ExtendedDynamicFormsExports.ExtendedFormProps, "ref"> & React.RefAttributes<any>>;
|
|
60
|
+
WizardForm: typeof ExtendedDynamicFormsExports.WizardForm;
|
|
61
|
+
customFields: {
|
|
62
|
+
address: React.FC<ExtendedDynamicFormsExports.FieldProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
63
|
+
phone: React.FC<ExtendedDynamicFormsExports.FieldProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
64
|
+
currency: React.FC<ExtendedDynamicFormsExports.FieldProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
65
|
+
};
|
|
66
|
+
customTemplates: {
|
|
67
|
+
FieldTemplate: React.FC<ExtendedDynamicFormsExports.FieldTemplateProps>;
|
|
68
|
+
ArrayFieldTemplate: (props: ExtendedDynamicFormsExports.ArrayFieldTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
ArrayFieldItemTemplate: (props: import('@rjsf/utils').ArrayFieldItemTemplateType) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
WizardObjectFieldTemplate: React.FC<ExtendedDynamicFormsExports.ObjectFieldTemplateProps>;
|
|
71
|
+
WizardSectionTemplate: React.FC<import('./layouts/wizard/WizardSectionTemplate').WizardSectionTemplateProps>;
|
|
72
|
+
ButtonTemplates: {
|
|
73
|
+
SubmitButton: React.FC<import('@rjsf/utils').SubmitButtonProps>;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
AddressField: React.FC<ExtendedDynamicFormsExports.FieldProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
77
|
+
PhoneField: React.FC<ExtendedDynamicFormsExports.FieldProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
78
|
+
CurrencyField: React.FC<ExtendedDynamicFormsExports.FieldProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
79
|
+
FieldTemplate: React.FC<ExtendedDynamicFormsExports.FieldTemplateProps>;
|
|
80
|
+
ArrayFieldTemplate: (props: ExtendedDynamicFormsExports.ArrayFieldTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
ArrayFieldItemTemplate: (props: import('@rjsf/utils').ArrayFieldItemTemplateType) => import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
WizardObjectFieldTemplate: React.FC<ExtendedDynamicFormsExports.ObjectFieldTemplateProps>;
|
|
83
|
+
WizardSectionTemplate: React.FC<import('./layouts/wizard/WizardSectionTemplate').WizardSectionTemplateProps>;
|
|
84
|
+
SubmitButton: React.FC<import('@rjsf/utils').SubmitButtonProps>;
|
|
85
|
+
customWidgets: {
|
|
86
|
+
TextWidget: typeof ExtendedDynamicFormsExports.EnhancedTextWidget;
|
|
87
|
+
TextareaWidget: typeof ExtendedDynamicFormsExports.EnhancedTextareaWidget;
|
|
88
|
+
SelectWidget: typeof ExtendedDynamicFormsExports.EnhancedSelectWidget;
|
|
89
|
+
CheckboxWidget: typeof ExtendedDynamicFormsExports.EnhancedCheckboxWidget;
|
|
90
|
+
RadioWidget: typeof ExtendedDynamicFormsExports.EnhancedRadioWidget;
|
|
91
|
+
UpDownWidget: typeof ExtendedDynamicFormsExports.EnhancedNumberWidget;
|
|
92
|
+
FileWidget: typeof ExtendedDynamicFormsExports.FileUploadWidget;
|
|
93
|
+
tel: typeof ExtendedDynamicFormsExports.TelephoneWidget;
|
|
94
|
+
email: typeof ExtendedDynamicFormsExports.EmailWidget;
|
|
95
|
+
url: typeof ExtendedDynamicFormsExports.URLWidget;
|
|
96
|
+
password: typeof ExtendedDynamicFormsExports.PasswordWidget;
|
|
97
|
+
date: typeof import('./widgets/enhanced/EnhancedWidgets').DateWidget;
|
|
98
|
+
'datetime-local': typeof ExtendedDynamicFormsExports.DateTimeWidget;
|
|
99
|
+
TelWidget: typeof ExtendedDynamicFormsExports.TelephoneWidget;
|
|
100
|
+
EmailWidget: typeof ExtendedDynamicFormsExports.EmailWidget;
|
|
101
|
+
URLWidget: typeof ExtendedDynamicFormsExports.URLWidget;
|
|
102
|
+
PasswordWidget: typeof ExtendedDynamicFormsExports.PasswordWidget;
|
|
103
|
+
DateWidget: typeof import('./widgets/enhanced/EnhancedWidgets').DateWidget;
|
|
104
|
+
DateTimeWidget: typeof ExtendedDynamicFormsExports.DateTimeWidget;
|
|
105
|
+
color: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
106
|
+
file: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
107
|
+
range: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
108
|
+
rating: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
109
|
+
};
|
|
110
|
+
ColorWidget: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
111
|
+
DateWidget: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
112
|
+
FileWidget: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
113
|
+
RangeWidget: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
114
|
+
RatingWidget: React.FC<ExtendedDynamicFormsExports.WidgetProps<any, ExtendedDynamicFormsExports.RJSFSchema, any>>;
|
|
115
|
+
EnhancedTextWidget: typeof ExtendedDynamicFormsExports.EnhancedTextWidget;
|
|
116
|
+
EnhancedTextareaWidget: typeof ExtendedDynamicFormsExports.EnhancedTextareaWidget;
|
|
117
|
+
EnhancedSelectWidget: typeof ExtendedDynamicFormsExports.EnhancedSelectWidget;
|
|
118
|
+
EnhancedCheckboxWidget: typeof ExtendedDynamicFormsExports.EnhancedCheckboxWidget;
|
|
119
|
+
EnhancedRadioWidget: typeof ExtendedDynamicFormsExports.EnhancedRadioWidget;
|
|
120
|
+
EnhancedNumberWidget: typeof ExtendedDynamicFormsExports.EnhancedNumberWidget;
|
|
121
|
+
TelephoneWidget: typeof ExtendedDynamicFormsExports.TelephoneWidget;
|
|
122
|
+
EmailWidget: typeof ExtendedDynamicFormsExports.EmailWidget;
|
|
123
|
+
URLWidget: typeof ExtendedDynamicFormsExports.URLWidget;
|
|
124
|
+
PasswordWidget: typeof ExtendedDynamicFormsExports.PasswordWidget;
|
|
125
|
+
DateTimeWidget: typeof ExtendedDynamicFormsExports.DateTimeWidget;
|
|
126
|
+
FileUploadWidget: typeof ExtendedDynamicFormsExports.FileUploadWidget;
|
|
127
|
+
enhancedWidgets: {
|
|
128
|
+
TextWidget: typeof ExtendedDynamicFormsExports.EnhancedTextWidget;
|
|
129
|
+
TextareaWidget: typeof ExtendedDynamicFormsExports.EnhancedTextareaWidget;
|
|
130
|
+
SelectWidget: typeof ExtendedDynamicFormsExports.EnhancedSelectWidget;
|
|
131
|
+
CheckboxWidget: typeof ExtendedDynamicFormsExports.EnhancedCheckboxWidget;
|
|
132
|
+
RadioWidget: typeof ExtendedDynamicFormsExports.EnhancedRadioWidget;
|
|
133
|
+
UpDownWidget: typeof ExtendedDynamicFormsExports.EnhancedNumberWidget;
|
|
134
|
+
FileWidget: typeof ExtendedDynamicFormsExports.FileUploadWidget;
|
|
135
|
+
tel: typeof ExtendedDynamicFormsExports.TelephoneWidget;
|
|
136
|
+
email: typeof ExtendedDynamicFormsExports.EmailWidget;
|
|
137
|
+
url: typeof ExtendedDynamicFormsExports.URLWidget;
|
|
138
|
+
password: typeof ExtendedDynamicFormsExports.PasswordWidget;
|
|
139
|
+
date: typeof import('./widgets/enhanced/EnhancedWidgets').DateWidget;
|
|
140
|
+
'datetime-local': typeof ExtendedDynamicFormsExports.DateTimeWidget;
|
|
141
|
+
TelWidget: typeof ExtendedDynamicFormsExports.TelephoneWidget;
|
|
142
|
+
EmailWidget: typeof ExtendedDynamicFormsExports.EmailWidget;
|
|
143
|
+
URLWidget: typeof ExtendedDynamicFormsExports.URLWidget;
|
|
144
|
+
PasswordWidget: typeof ExtendedDynamicFormsExports.PasswordWidget;
|
|
145
|
+
DateWidget: typeof import('./widgets/enhanced/EnhancedWidgets').DateWidget;
|
|
146
|
+
DateTimeWidget: typeof ExtendedDynamicFormsExports.DateTimeWidget;
|
|
147
|
+
};
|
|
148
|
+
WizardLayout: React.FC<import('./layouts/wizard/WizardLayout').WizardLayoutProps>;
|
|
149
|
+
ProgressIndicator: React.FC<import('./layouts/wizard/ProgressIndicator').ProgressIndicatorProps>;
|
|
150
|
+
StepNavigation: React.FC<import('./layouts/wizard/StepNavigation').StepNavigationProps>;
|
|
151
|
+
WizardNavigation: React.FC<import('./layouts/wizard/WizardNavigation').WizardNavigationProps>;
|
|
152
|
+
FormEventManager: typeof ExtendedDynamicFormsExports.FormEventManager;
|
|
153
|
+
FormEventHub: typeof ExtendedDynamicFormsExports.FormEventHub;
|
|
154
|
+
FormEventProvider: React.FC<import('./events/FormEventContext').FormEventProviderProps>;
|
|
155
|
+
useFormEventHub: () => import('./events/FormEventContext').FormEventContextType;
|
|
156
|
+
useFieldEventHandlers: (fieldId: string, schema?: any, fieldPath?: string[]) => {
|
|
157
|
+
onFocus: (value: any) => Promise<void>;
|
|
158
|
+
onBlur: (value: any) => Promise<void>;
|
|
159
|
+
onChange: (value: any) => Promise<void>;
|
|
160
|
+
};
|
|
161
|
+
ConditionalProcessor: typeof ExtendedDynamicFormsExports.ConditionalProcessor;
|
|
162
|
+
SimpleConditionalEngine: typeof ExtendedDynamicFormsExports.ConditionalProcessor;
|
|
163
|
+
DynamicArrayConditionalEngine: typeof ExtendedDynamicFormsExports.DynamicArrayConditionalEngine;
|
|
164
|
+
defaultActions: ExtendedDynamicFormsExports.ConditionalActions;
|
|
165
|
+
remove: ExtendedDynamicFormsExports.ConditionalAction;
|
|
166
|
+
require: ExtendedDynamicFormsExports.ConditionalAction;
|
|
167
|
+
uiAppend: ExtendedDynamicFormsExports.ConditionalAction;
|
|
168
|
+
uiOverride: ExtendedDynamicFormsExports.ConditionalAction;
|
|
169
|
+
uiReplace: ExtendedDynamicFormsExports.ConditionalAction;
|
|
170
|
+
enable: ExtendedDynamicFormsExports.ConditionalAction;
|
|
171
|
+
disable: ExtendedDynamicFormsExports.ConditionalAction;
|
|
172
|
+
optional: ExtendedDynamicFormsExports.ConditionalAction;
|
|
173
|
+
show: ExtendedDynamicFormsExports.ConditionalAction;
|
|
174
|
+
transformJsonRulesEngine: typeof ExtendedDynamicFormsExports.transformJsonRulesEngine;
|
|
175
|
+
smartTransformJsonRulesEngine: typeof ExtendedDynamicFormsExports.transformJsonRulesEngine;
|
|
176
|
+
Engine: any;
|
|
177
|
+
deepEquals(obj1: any, obj2: any): boolean;
|
|
178
|
+
formDataUtils: {
|
|
179
|
+
cloneFormData: (data: any) => any;
|
|
180
|
+
mergeFormData: (current: any, updates: any) => any;
|
|
181
|
+
getNestedValue: (data: any, path: string) => any;
|
|
182
|
+
setNestedValue: (data: any, path: string, value: any) => any;
|
|
183
|
+
removeEmptyValues: (data: any) => any;
|
|
184
|
+
};
|
|
185
|
+
schemaUtils: {
|
|
186
|
+
getRequiredFields: (schema: ExtendedDynamicFormsExports.RJSFSchema) => string[];
|
|
187
|
+
isFieldRequired: (schema: ExtendedDynamicFormsExports.RJSFSchema, fieldName: string) => boolean;
|
|
188
|
+
getFieldSchema: (schema: ExtendedDynamicFormsExports.RJSFSchema, path: string) => ExtendedDynamicFormsExports.RJSFSchema | undefined;
|
|
189
|
+
mergeSchemas: (schema1: ExtendedDynamicFormsExports.RJSFSchema, schema2: ExtendedDynamicFormsExports.RJSFSchema) => ExtendedDynamicFormsExports.RJSFSchema;
|
|
190
|
+
getAllFieldPaths: (schema: ExtendedDynamicFormsExports.RJSFSchema, prefix?: string) => string[];
|
|
191
|
+
};
|
|
192
|
+
validationUtils: {
|
|
193
|
+
isValidEmail: (email: string) => boolean;
|
|
194
|
+
isValidPhone: (phone: string) => boolean;
|
|
195
|
+
isValidUrl: (url: string) => boolean;
|
|
196
|
+
isValidDate: (date: string) => boolean;
|
|
197
|
+
isInRange: (value: number, min?: number, max?: number) => boolean;
|
|
198
|
+
getValidationMessage: (type: string, params?: any) => string;
|
|
199
|
+
};
|
|
200
|
+
useFormDevTools(formData: any, uiRules?: import('./conditionals/v2').Rule<import('./conditionals/v2').UiEffect>[], schemaRules?: import('./conditionals/v2').Rule<import('./conditionals/v2').SchemaEffect>[], validationRules?: import('./conditionals/v2').Rule<import('./conditionals/v2').ValidationEffect>[], options?: ExtendedDynamicFormsExports.DevToolsOptions): ExtendedDynamicFormsExports.DevToolsOutput;
|
|
201
|
+
createForm: typeof createForm;
|
|
202
|
+
createWizardForm: typeof createWizardForm;
|
|
203
|
+
React: typeof React;
|
|
204
|
+
ReactDOM: typeof ReactDOM;
|
|
205
|
+
antd: typeof antd;
|
|
206
|
+
dayjs: typeof dayjs;
|
|
207
|
+
};
|
|
208
|
+
export default ExtendedDynamicForms;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { WidgetProps } from '@rjsf/utils';
|
|
2
|
+
|
|
3
|
+
export declare function EnhancedTextWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function EnhancedTextareaWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function EnhancedSelectWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function EnhancedCheckboxWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function EnhancedRadioWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function EnhancedNumberWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function TelephoneWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function EmailWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function URLWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function PasswordWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function DateWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function DateTimeWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function FileUploadWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const customWidgets: {
|
|
17
|
+
TextWidget: typeof EnhancedTextWidget;
|
|
18
|
+
TextareaWidget: typeof EnhancedTextareaWidget;
|
|
19
|
+
SelectWidget: typeof EnhancedSelectWidget;
|
|
20
|
+
CheckboxWidget: typeof EnhancedCheckboxWidget;
|
|
21
|
+
RadioWidget: typeof EnhancedRadioWidget;
|
|
22
|
+
UpDownWidget: typeof EnhancedNumberWidget;
|
|
23
|
+
FileWidget: typeof FileUploadWidget;
|
|
24
|
+
tel: typeof TelephoneWidget;
|
|
25
|
+
email: typeof EmailWidget;
|
|
26
|
+
url: typeof URLWidget;
|
|
27
|
+
password: typeof PasswordWidget;
|
|
28
|
+
date: typeof DateWidget;
|
|
29
|
+
'datetime-local': typeof DateTimeWidget;
|
|
30
|
+
TelWidget: typeof TelephoneWidget;
|
|
31
|
+
EmailWidget: typeof EmailWidget;
|
|
32
|
+
URLWidget: typeof URLWidget;
|
|
33
|
+
PasswordWidget: typeof PasswordWidget;
|
|
34
|
+
DateWidget: typeof DateWidget;
|
|
35
|
+
DateTimeWidget: typeof DateTimeWidget;
|
|
36
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ColorWidget } from './input/ColorWidget';
|
|
2
|
+
import { DateWidget } from './date/DateWidget';
|
|
3
|
+
import { FileWidget } from './file/FileWidget';
|
|
4
|
+
import { RangeWidget } from './input/RangeWidget';
|
|
5
|
+
import { RatingWidget } from './input/RatingWidget';
|
|
6
|
+
import { customWidgets as enhancedWidgets, EnhancedTextWidget, EnhancedTextareaWidget, EnhancedSelectWidget, EnhancedCheckboxWidget, EnhancedRadioWidget, EnhancedNumberWidget, TelephoneWidget, EmailWidget, URLWidget, PasswordWidget, DateTimeWidget, FileUploadWidget } from './enhanced/EnhancedWidgets';
|
|
7
|
+
|
|
8
|
+
export declare const customWidgets: {
|
|
9
|
+
TextWidget: typeof EnhancedTextWidget;
|
|
10
|
+
TextareaWidget: typeof EnhancedTextareaWidget;
|
|
11
|
+
SelectWidget: typeof EnhancedSelectWidget;
|
|
12
|
+
CheckboxWidget: typeof EnhancedCheckboxWidget;
|
|
13
|
+
RadioWidget: typeof EnhancedRadioWidget;
|
|
14
|
+
UpDownWidget: typeof EnhancedNumberWidget;
|
|
15
|
+
FileWidget: typeof FileUploadWidget;
|
|
16
|
+
tel: typeof TelephoneWidget;
|
|
17
|
+
email: typeof EmailWidget;
|
|
18
|
+
url: typeof URLWidget;
|
|
19
|
+
password: typeof PasswordWidget;
|
|
20
|
+
date: typeof import('./enhanced/EnhancedWidgets').DateWidget;
|
|
21
|
+
'datetime-local': typeof DateTimeWidget;
|
|
22
|
+
TelWidget: typeof TelephoneWidget;
|
|
23
|
+
EmailWidget: typeof EmailWidget;
|
|
24
|
+
URLWidget: typeof URLWidget;
|
|
25
|
+
PasswordWidget: typeof PasswordWidget;
|
|
26
|
+
DateWidget: typeof import('./enhanced/EnhancedWidgets').DateWidget;
|
|
27
|
+
DateTimeWidget: typeof DateTimeWidget;
|
|
28
|
+
color: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
29
|
+
file: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
30
|
+
range: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
31
|
+
rating: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
32
|
+
};
|
|
33
|
+
export { ColorWidget, DateWidget, FileWidget, RangeWidget, RatingWidget, EnhancedTextWidget, EnhancedTextareaWidget, EnhancedSelectWidget, EnhancedCheckboxWidget, EnhancedRadioWidget, EnhancedNumberWidget, TelephoneWidget, EmailWidget, URLWidget, PasswordWidget, DateTimeWidget, FileUploadWidget, enhancedWidgets, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extended-dynamic-forms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 10",
|
|
34
34
|
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
|
35
35
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
|
|
36
|
-
"prepublishOnly": "npm run build
|
|
36
|
+
"prepublishOnly": "npm run build",
|
|
37
37
|
"playground": "cd playground && npm install && npm run dev",
|
|
38
38
|
"playground:build": "cd playground && npm run build",
|
|
39
39
|
"serve:examples": "npx http-server examples/vanilla-js -p 8080 -o"
|