extended-dynamic-forms 0.1.12 → 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 {};
@@ -12,6 +12,10 @@ export declare function applyConditionalState(schema: RJSFSchema, uiSchema: UiSc
12
12
  schema: RJSFSchema;
13
13
  uiSchema: UiSchema;
14
14
  };
15
+ /**
16
+ * Flatten nested objects for fact extraction
17
+ */
18
+ export declare function flattenFormData(obj: any, prefix?: string, separator?: string): Record<string, any>;
15
19
  /**
16
20
  * Extract field value from form data using field path
17
21
  */