extended-dynamic-forms 0.1.13 → 0.1.14

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.
@@ -1,3 +1,4 @@
1
1
  export { ConditionalForm } from './ConditionalForm';
2
2
  export * from './types';
3
3
  export * from './utils';
4
+ export * from './initialStateUtils';
@@ -0,0 +1,18 @@
1
+ import { ConditionalRule, ConditionalState } from './types';
2
+
3
+ interface FieldEventMapping {
4
+ field: string;
5
+ events: Array<{
6
+ type: 'show' | 'hide' | 'require' | 'unrequire' | 'disable' | 'enable';
7
+ rule: ConditionalRule;
8
+ }>;
9
+ }
10
+ /**
11
+ * Analyze rules to determine which fields are affected by which events
12
+ */
13
+ export declare function analyzeRules(rules: ConditionalRule[]): Map<string, FieldEventMapping>;
14
+ /**
15
+ * Determine initial state based on rules and initial form data
16
+ */
17
+ export declare function determineInitialState(rules: ConditionalRule[], initialFormData: any, debug?: boolean): Promise<ConditionalState>;
18
+ export {};