reactaform 1.4.4 → 1.8.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 +72 -12
- package/dist/components/LayoutComponents.d.ts +77 -0
- package/dist/components/PopupOptionMenu.d.ts +16 -0
- package/dist/components/ReactaForm.d.ts +4 -0
- package/dist/components/ReactaFormProvider.d.ts +3 -0
- package/dist/components/ReactaFormRenderer.d.ts +10 -0
- package/dist/components/Tooltip.d.ts +8 -0
- package/dist/components/fields/CheckboxInput.d.ts +5 -0
- package/dist/components/fields/ColorInput.d.ts +16 -0
- package/dist/components/fields/DateInput.d.ts +11 -0
- package/dist/components/fields/DropdownInput.d.ts +16 -0
- package/dist/components/fields/EmailInput.d.ts +6 -0
- package/dist/components/fields/FileInput.d.ts +5 -0
- package/dist/components/fields/FloatArrayInput.d.ts +8 -0
- package/dist/components/fields/FloatInput.d.ts +9 -0
- package/dist/components/fields/ImageDisplay.d.ts +18 -0
- package/dist/components/fields/IntegerArrayInput.d.ts +9 -0
- package/dist/components/fields/IntegerInput.d.ts +6 -0
- package/dist/components/fields/MultiSelection.d.ts +9 -0
- package/dist/components/fields/MultilineTextInput.d.ts +6 -0
- package/dist/components/fields/NumericStepperInput.d.ts +6 -0
- package/dist/components/fields/PasswordInput.d.ts +6 -0
- package/dist/components/fields/PhoneInput.d.ts +6 -0
- package/dist/components/fields/RadioInput.d.ts +8 -0
- package/dist/components/fields/RatingInput.d.ts +9 -0
- package/dist/components/fields/Separator.d.ts +21 -0
- package/dist/components/fields/SliderInput.d.ts +5 -0
- package/dist/components/fields/SpinInput.d.ts +5 -0
- package/dist/components/fields/SwitchInput.d.ts +13 -0
- package/dist/components/fields/TextInput.d.ts +6 -0
- package/dist/components/fields/TimeInput.d.ts +6 -0
- package/dist/components/fields/UnitValueInput.d.ts +8 -0
- package/dist/components/fields/UrlInput.d.ts +21 -0
- package/dist/components/renderFields.d.ts +3 -0
- package/dist/core/baseRegistry.d.ts +15 -0
- package/dist/core/componentRegistry.d.ts +8 -0
- package/dist/core/debounceConfig.d.ts +6 -0
- package/dist/core/debounceEnv.d.ts +1 -0
- package/dist/core/fieldVisibility.d.ts +25 -0
- package/dist/core/index.d.ts +23 -0
- package/dist/core/pluginRegistry.d.ts +44 -0
- package/dist/core/reactaFormModel.d.ts +31 -0
- package/dist/core/reactaFormTypes.d.ts +141 -0
- package/dist/core/submissionHandlerRegistry.d.ts +7 -0
- package/dist/core/submitForm.d.ts +9 -0
- package/dist/hooks/useDebouncedCallback.d.ts +27 -0
- package/dist/hooks/useDropdownPosition.d.ts +6 -0
- package/dist/hooks/useReactaFormContext.d.ts +4 -0
- package/dist/hooks/useUncontrolledValidatedInput.d.ts +18 -0
- package/dist/hooks/useUnitValueField.d.ts +13 -0
- package/dist/index.d.ts +9 -6
- package/dist/reactaform.cjs.js +18 -5
- package/dist/reactaform.css +1 -1
- package/dist/reactaform.es.js +2771 -2738
- package/dist/themes/ant-design-dark.css +31 -0
- package/dist/themes/ant-design.css +42 -0
- package/dist/themes/blueprint-dark.css +31 -0
- package/dist/themes/blueprint.css +43 -0
- package/dist/themes/compact-variant.css +8 -0
- package/dist/themes/fluent.css +40 -0
- package/dist/themes/glass-morphism.css +25 -0
- package/dist/themes/high-contrast-accessible.css +22 -0
- package/dist/themes/ios-mobile.css +32 -0
- package/dist/themes/macos-native.css +32 -0
- package/dist/themes/material-dark.css +27 -0
- package/dist/themes/material.css +46 -0
- package/dist/themes/midnight-dark.css +24 -0
- package/dist/themes/modern-light.css +23 -0
- package/dist/themes/neon-cyber-dark.css +24 -0
- package/dist/themes/shadcn.css +40 -0
- package/dist/themes/soft-pastel.css +24 -0
- package/dist/themes/spacious-variant.css +9 -0
- package/dist/themes/tailwind-dark.css +30 -0
- package/dist/themes/tailwind.css +50 -0
- package/dist/utils/cssClasses.d.ts +14 -0
- package/dist/utils/definitionSerializers.d.ts +62 -0
- package/dist/utils/groupingHelpers.d.ts +24 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/themeUtils.d.ts +31 -0
- package/dist/utils/translationCache.d.ts +43 -0
- package/dist/utils/unitValueMapper.d.ts +14 -0
- package/dist/validation/index.d.ts +13 -0
- package/dist/validation/validateColorField.d.ts +2 -0
- package/dist/validation/validateDateField.d.ts +2 -0
- package/dist/validation/validateEmailField.d.ts +2 -0
- package/dist/validation/validateFieldPattern.d.ts +3 -0
- package/dist/validation/validateFloatField.d.ts +3 -0
- package/dist/validation/validateIntegerField.d.ts +3 -0
- package/dist/validation/validatePhoneField.d.ts +2 -0
- package/dist/validation/validateRatingField.d.ts +2 -0
- package/dist/validation/validateSelectionFields.d.ts +3 -0
- package/dist/validation/validateTextField.d.ts +2 -0
- package/dist/validation/validateTimeField.d.ts +2 -0
- package/dist/validation/validateUnitValueField.d.ts +2 -0
- package/dist/validation/validateUrlField.d.ts +2 -0
- package/dist/validation/validation.d.ts +12 -0
- package/dist/validation/validationHandlerRegistry.d.ts +19 -0
- package/package.json +15 -13
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced Plugin Registry for ReactaForm
|
|
3
|
+
* Tracks installed plugins, components, validators, submission handlers
|
|
4
|
+
* Handles conflicts with customizable strategy
|
|
5
|
+
*/
|
|
6
|
+
import type { FieldValidationHandler, FormValidationHandler, FormSubmissionHandler } from './reactaFormTypes';
|
|
7
|
+
/** Conflict resolution strategies */
|
|
8
|
+
export type ConflictResolution = 'error' | 'warn' | 'override' | 'skip';
|
|
9
|
+
/** Plugin registration options */
|
|
10
|
+
export interface PluginRegistrationOptions {
|
|
11
|
+
conflictResolution?: ConflictResolution;
|
|
12
|
+
onConflict?: (conflict: PluginConflict) => boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Plugin conflict information */
|
|
15
|
+
export interface PluginConflict {
|
|
16
|
+
type: 'component' | 'fieldValidator' | 'formValidator' | 'submissionHandler' | 'plugin';
|
|
17
|
+
name: string;
|
|
18
|
+
existingPlugin: string;
|
|
19
|
+
newPlugin: string;
|
|
20
|
+
}
|
|
21
|
+
/** ReactaForm plugin definition */
|
|
22
|
+
export interface ReactaFormPlugin {
|
|
23
|
+
name: string;
|
|
24
|
+
version: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
components?: Record<string, React.ComponentType<unknown>>;
|
|
27
|
+
fieldValidators?: Record<string, Record<string, FieldValidationHandler>>;
|
|
28
|
+
formValidators?: Record<string, FormValidationHandler>;
|
|
29
|
+
submissionHandlers?: Record<string, FormSubmissionHandler>;
|
|
30
|
+
setup?: () => void;
|
|
31
|
+
cleanup?: () => void;
|
|
32
|
+
}
|
|
33
|
+
/** Register a plugin */
|
|
34
|
+
export declare function registerPlugin(plugin: ReactaFormPlugin, options?: PluginRegistrationOptions): void;
|
|
35
|
+
/** Unregister plugin */
|
|
36
|
+
export declare function unregisterPlugin(pluginName: string, removeRegistrations?: boolean): boolean;
|
|
37
|
+
/** Get a plugin by name */
|
|
38
|
+
export declare function getPlugin(pluginName: string): ReactaFormPlugin | undefined;
|
|
39
|
+
/** Get all installed plugins */
|
|
40
|
+
export declare function getAllPlugins(): ReactaFormPlugin[];
|
|
41
|
+
/** Check if plugin is registered */
|
|
42
|
+
export declare function hasPlugin(pluginName: string): boolean;
|
|
43
|
+
/** Helper to register multiple components at once */
|
|
44
|
+
export declare function registerComponents(components: Record<string, React.ComponentType<unknown>>): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactaDefinition, ReactaInstance } from "./reactaFormTypes";
|
|
2
|
+
export interface LoadDefinitionOptions {
|
|
3
|
+
validateSchema?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface DefinitionLoadResult {
|
|
6
|
+
success: boolean;
|
|
7
|
+
definition?: ReactaDefinition;
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface InstanceLoadResult {
|
|
11
|
+
success: boolean;
|
|
12
|
+
instance?: ReactaInstance;
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Validates that a definition object has the required structure
|
|
17
|
+
*/
|
|
18
|
+
export declare function validateDefinitionSchema(definition: ReactaDefinition): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Load definition from a JSON string. This intentionally does not perform any file I/O.
|
|
21
|
+
*/
|
|
22
|
+
export declare function loadJsonDefinition(jsonData: string, options?: LoadDefinitionOptions): Promise<DefinitionLoadResult>;
|
|
23
|
+
/**
|
|
24
|
+
* Create instance from definition with validation and error handling
|
|
25
|
+
*/
|
|
26
|
+
export declare function createInstanceFromDefinition(definition: ReactaDefinition, name: string): InstanceLoadResult;
|
|
27
|
+
/**
|
|
28
|
+
* Load instance data with validation
|
|
29
|
+
*/
|
|
30
|
+
export declare function loadInstance(instanceData: string | Record<string, unknown>): InstanceLoadResult;
|
|
31
|
+
export declare function upgradeInstanceToLatestDefinition(oldInstance: ReactaInstance, latestDefinition: ReactaDefinition, callback?: (oldInstance: ReactaInstance, newInstance: Record<string, unknown>, latestDefinition: ReactaDefinition) => void): InstanceLoadResult;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type Integer = number;
|
|
3
|
+
type Float = number;
|
|
4
|
+
export type FieldValueType = boolean | Integer | Float | string | Integer[] | Float[] | string[] | [number, string] | File | File[];
|
|
5
|
+
export type ErrorType = string | null;
|
|
6
|
+
export type ParentField = Record<string, string[] | Integer[] | boolean[]>;
|
|
7
|
+
export type ValidationHandlerName = string | [string] | [string, string];
|
|
8
|
+
export interface DefinitionPropertyField {
|
|
9
|
+
name: string;
|
|
10
|
+
displayName: string;
|
|
11
|
+
type: string;
|
|
12
|
+
defaultValue: FieldValueType;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
parents?: ParentField;
|
|
15
|
+
children?: Record<string, string[]>;
|
|
16
|
+
group?: string;
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
labelLayout?: 'row' | 'column-left' | 'column-center';
|
|
19
|
+
validationHandlerName?: ValidationHandlerName;
|
|
20
|
+
dimension?: string;
|
|
21
|
+
defaultUnit?: string;
|
|
22
|
+
options?: Array<{
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}>;
|
|
26
|
+
minLength?: number;
|
|
27
|
+
maxLength?: number;
|
|
28
|
+
pattern?: string;
|
|
29
|
+
patternErrorMessage?: string;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
min?: number;
|
|
32
|
+
max?: number;
|
|
33
|
+
minInclusive?: boolean;
|
|
34
|
+
maxInclusive?: boolean;
|
|
35
|
+
step?: number;
|
|
36
|
+
minCount?: number;
|
|
37
|
+
maxCount?: number;
|
|
38
|
+
minDate?: string;
|
|
39
|
+
maxDate?: string;
|
|
40
|
+
includeSeconds?: boolean;
|
|
41
|
+
layout?: 'horizontal' | 'vertical' | 'row' | 'column';
|
|
42
|
+
alignment?: 'left' | 'center' | 'right';
|
|
43
|
+
width?: number;
|
|
44
|
+
height?: number;
|
|
45
|
+
localized?: string;
|
|
46
|
+
minHeight?: string;
|
|
47
|
+
accept?: string;
|
|
48
|
+
multiple?: boolean;
|
|
49
|
+
allowRelative?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface ReactaDefinition {
|
|
52
|
+
name: string;
|
|
53
|
+
version: string;
|
|
54
|
+
displayName: string;
|
|
55
|
+
localization?: string;
|
|
56
|
+
properties: DefinitionPropertyField[];
|
|
57
|
+
validationHandlerName?: string;
|
|
58
|
+
submitHandlerName?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface ReactaInstance {
|
|
61
|
+
name: string;
|
|
62
|
+
definition: string;
|
|
63
|
+
version: string;
|
|
64
|
+
values: Record<string, FieldValueType>;
|
|
65
|
+
}
|
|
66
|
+
export interface ReactaFormProps {
|
|
67
|
+
definitionData: string | Record<string, unknown>;
|
|
68
|
+
language?: string;
|
|
69
|
+
instance?: ReactaInstance;
|
|
70
|
+
className?: string;
|
|
71
|
+
theme?: string;
|
|
72
|
+
style?: React.CSSProperties;
|
|
73
|
+
}
|
|
74
|
+
export type TranslationFunction = (text: string, ...args: unknown[]) => string;
|
|
75
|
+
export type FieldValidationHandler = (fieldName: string, value: FieldValueType | unknown, t: TranslationFunction) => string | undefined;
|
|
76
|
+
export type FormValidationHandler = (valuesMap: Record<string, FieldValueType | unknown>, t: TranslationFunction) => string[] | undefined | Promise<string[] | undefined>;
|
|
77
|
+
export type FormSubmissionHandler = (definition: ReactaDefinition | Record<string, unknown>, instanceName: string | null, valuesMap: Record<string, FieldValueType | unknown>, t: TranslationFunction) => string[] | undefined | Promise<string[] | undefined>;
|
|
78
|
+
export type InputOnChange<T> = (value: T | string, error: string | null) => void;
|
|
79
|
+
export interface BaseInputProps<TValue = unknown, TField extends DefinitionPropertyField = DefinitionPropertyField> {
|
|
80
|
+
field: TField;
|
|
81
|
+
value: TValue;
|
|
82
|
+
placeholder?: string;
|
|
83
|
+
onChange?: InputOnChange<TValue>;
|
|
84
|
+
onError?: (error: string | null) => void;
|
|
85
|
+
}
|
|
86
|
+
export type ReactaFormContextType = {
|
|
87
|
+
definitionName: string;
|
|
88
|
+
language: string;
|
|
89
|
+
theme: string;
|
|
90
|
+
formStyle: {
|
|
91
|
+
container?: React.CSSProperties;
|
|
92
|
+
titleStyle?: React.CSSProperties;
|
|
93
|
+
};
|
|
94
|
+
fieldStyle: Record<string, unknown>;
|
|
95
|
+
t: TranslationFunction;
|
|
96
|
+
};
|
|
97
|
+
export type ReactaFormProviderProps = {
|
|
98
|
+
children: ReactNode;
|
|
99
|
+
definitionName?: string;
|
|
100
|
+
defaultStyle?: Record<string, unknown>;
|
|
101
|
+
defaultLanguage?: string;
|
|
102
|
+
defaultTheme?: string;
|
|
103
|
+
defaultLocalizeName?: string;
|
|
104
|
+
className?: string;
|
|
105
|
+
};
|
|
106
|
+
export type TranslationMap = Record<string, string>;
|
|
107
|
+
export type TranslationCache = Map<string, TranslationMap>;
|
|
108
|
+
export interface RegistryResult<T = unknown> {
|
|
109
|
+
success: boolean;
|
|
110
|
+
data?: T;
|
|
111
|
+
error?: string;
|
|
112
|
+
}
|
|
113
|
+
export interface FieldGroup {
|
|
114
|
+
name: string;
|
|
115
|
+
displayName: string;
|
|
116
|
+
description?: string;
|
|
117
|
+
collapsed?: boolean;
|
|
118
|
+
order?: number;
|
|
119
|
+
}
|
|
120
|
+
export interface ValidationResult {
|
|
121
|
+
isValid: boolean;
|
|
122
|
+
errors: string[];
|
|
123
|
+
warnings?: string[];
|
|
124
|
+
}
|
|
125
|
+
export type FormEventType = 'init' | 'change' | 'validate' | 'submit' | 'reset';
|
|
126
|
+
export interface FormEvent {
|
|
127
|
+
type: FormEventType;
|
|
128
|
+
timestamp: Date;
|
|
129
|
+
data?: unknown;
|
|
130
|
+
}
|
|
131
|
+
export interface EnhancedDefinitionPropertyField extends DefinitionPropertyField {
|
|
132
|
+
category?: string;
|
|
133
|
+
tags?: string[];
|
|
134
|
+
dependencies?: string[];
|
|
135
|
+
conditional?: {
|
|
136
|
+
field: string;
|
|
137
|
+
value: unknown;
|
|
138
|
+
operator?: 'equals' | 'not_equals' | 'contains' | 'greater_than' | 'less_than';
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FormSubmissionHandler } from "./reactaFormTypes";
|
|
2
|
+
import BaseRegistry from "./baseRegistry";
|
|
3
|
+
declare const registry: BaseRegistry<FormSubmissionHandler>;
|
|
4
|
+
export declare function registerSubmissionHandler(submitterName: string, fn: FormSubmissionHandler): void;
|
|
5
|
+
export declare function getFormSubmissionHandler(submitterName: string): FormSubmissionHandler | undefined;
|
|
6
|
+
export declare function getSubmissionHandler(submitterName: string): FormSubmissionHandler | undefined;
|
|
7
|
+
export default registry;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactaDefinition, FieldValueType, ReactaInstance, TranslationFunction } from "./reactaFormTypes";
|
|
2
|
+
export interface SubmitResult {
|
|
3
|
+
success: boolean;
|
|
4
|
+
message: string;
|
|
5
|
+
data?: Record<string, unknown>;
|
|
6
|
+
errors?: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function submitForm(definition: ReactaDefinition, instance: ReactaInstance | null, valuesMap: Record<string, FieldValueType | unknown>, t: TranslationFunction, errors: Record<string, string>): Promise<SubmitResult>;
|
|
9
|
+
export default submitForm;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type DebouncedCallback = {
|
|
2
|
+
callback: (...args: unknown[]) => void;
|
|
3
|
+
cancel: () => void;
|
|
4
|
+
flush: () => void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* useDebouncedCallback
|
|
8
|
+
* - callback: function to call
|
|
9
|
+
* - wait: debounce delay in ms
|
|
10
|
+
* - options.leading: if true, call on leading edge (optional)
|
|
11
|
+
*
|
|
12
|
+
* Returns { callback, cancel, flush } where callback is debounced.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useDebouncedCallback(callback: (...args: unknown[]) => unknown, wait?: number, options?: {
|
|
15
|
+
leading?: boolean;
|
|
16
|
+
trailing?: boolean;
|
|
17
|
+
}): DebouncedCallback;
|
|
18
|
+
/**
|
|
19
|
+
* createDebouncedCallback - non-hook variant that returns the same API but
|
|
20
|
+
* doesn't use React hooks. Useful for creating many debounced callbacks
|
|
21
|
+
* programmatically (e.g., driven from a static schema) while handling
|
|
22
|
+
* lifecycle cleanup manually.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createDebouncedCallback(callback: (...args: unknown[]) => unknown, wait?: number, options?: {
|
|
25
|
+
leading?: boolean;
|
|
26
|
+
trailing?: boolean;
|
|
27
|
+
}): DebouncedCallback;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReactaFormContextType } from '../core/reactaFormTypes';
|
|
2
|
+
export declare const ReactaFormContext: import("react").Context<ReactaFormContextType | undefined>;
|
|
3
|
+
declare const useReactaFormContext: () => ReactaFormContextType;
|
|
4
|
+
export default useReactaFormContext;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type UseUncontrolledValidatedInputProps = {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string, error: string | null) => void;
|
|
5
|
+
onError?: (error: string | null) => void;
|
|
6
|
+
validate: (value: string) => string | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Handles:
|
|
10
|
+
* - Uncontrolled input
|
|
11
|
+
* - Validation
|
|
12
|
+
* - Error sync
|
|
13
|
+
*/
|
|
14
|
+
export declare function useUncontrolledValidatedInput<T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement>({ value, onChange, onError, validate, }: UseUncontrolledValidatedInputProps): {
|
|
15
|
+
inputRef: React.MutableRefObject<T | null>;
|
|
16
|
+
error: string | null;
|
|
17
|
+
handleChange: (e: React.ChangeEvent<T>) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DefinitionPropertyField } from "../core/reactaFormTypes";
|
|
2
|
+
export declare function useUnitValueField(definitionName: string, field: DefinitionPropertyField, value: [string | number, string], unitFactors: {
|
|
3
|
+
default: string;
|
|
4
|
+
labels: Record<string, string>;
|
|
5
|
+
reverseLabels?: Record<string, string>;
|
|
6
|
+
}, t: (key: string) => string, onChange?: (v: [string, string], err: string | null) => void, onError?: (err: string | null) => void): {
|
|
7
|
+
value: string;
|
|
8
|
+
unit: string;
|
|
9
|
+
error: string | null;
|
|
10
|
+
setValue: (v: string) => void;
|
|
11
|
+
setUnit: (u: string) => void;
|
|
12
|
+
setBoth: (v: string, u: string) => void;
|
|
13
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,17 +7,20 @@ export { default as useReactaFormContext } from './hooks/useReactaFormContext';
|
|
|
7
7
|
export { StandardFieldLayout } from './components/LayoutComponents';
|
|
8
8
|
export { CSS_CLASSES, combineClasses } from './utils/cssClasses';
|
|
9
9
|
export type { ReactaFormContextType, ReactaFormProviderProps, DefinitionPropertyField, ReactaDefinition, ReactaInstance, ReactaFormProps, FieldValueType, ErrorType, FieldValidationHandler, FormValidationHandler, FormSubmissionHandler, InputOnChange, BaseInputProps, TranslationFunction, } from './core/reactaFormTypes';
|
|
10
|
-
export { registerComponent, getComponent, } from './core/
|
|
11
|
-
export { validateFieldValue
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
export { registerComponent, getComponent, } from './core/componentRegistry';
|
|
11
|
+
export { validateFieldValue, // Deprecated, use validateFieldWithHandler instead
|
|
12
|
+
validateFieldWithHandler } from './validation/validation';
|
|
13
|
+
import './validation';
|
|
14
|
+
export { registerPlugin, unregisterPlugin, getPlugin, getAllPlugins, hasPlugin, registerComponents, } from './core/pluginRegistry';
|
|
15
|
+
export type { ReactaFormPlugin, ConflictResolution, PluginRegistrationOptions, PluginConflict, } from './core/pluginRegistry';
|
|
14
16
|
export type { LoadDefinitionOptions, DefinitionLoadResult, InstanceLoadResult, } from './core/reactaFormModel';
|
|
15
17
|
export { loadJsonDefinition, createInstanceFromDefinition, // Create new instance with default values
|
|
16
18
|
loadInstance, // Load existing instance (valuesMap)
|
|
17
19
|
upgradeInstanceToLatestDefinition } from './core/reactaFormModel';
|
|
18
|
-
export { registerSubmissionHandler, } from './core/
|
|
19
|
-
export { registerFieldValidationHandler, registerFormValidationHandler, } from './
|
|
20
|
+
export { registerSubmissionHandler, } from './core/submissionHandlerRegistry';
|
|
21
|
+
export { registerFieldValidationHandler, registerFormValidationHandler, } from './validation/validationHandlerRegistry';
|
|
20
22
|
export type { DebouncedCallback } from './hooks/useDebouncedCallback';
|
|
21
23
|
export { useDebouncedCallback } from './hooks/useDebouncedCallback';
|
|
22
24
|
export * as Units from './utils/unitValueMapper';
|
|
25
|
+
export { isDarkTheme } from './utils/themeUtils';
|
|
23
26
|
export { serializeInstance, deserializeInstance, serializeDefinition, deserializeDefinition } from './utils/definitionSerializers';
|