@ram_28/kf-ai-sdk 1.0.8 → 1.0.10
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/components/hooks/index.d.ts +2 -1
- package/dist/components/hooks/index.d.ts.map +1 -1
- package/dist/components/hooks/useForm/apiClient.d.ts +4 -4
- package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -1
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +3 -3
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/index.d.ts +7 -4
- package/dist/components/hooks/useForm/index.d.ts.map +1 -1
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +5 -5
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +7 -6
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts +8 -8
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -1
- package/dist/components/hooks/useForm/types.d.ts +130 -112
- package/dist/components/hooks/useForm/types.d.ts.map +1 -1
- package/dist/components/hooks/useForm/useForm.d.ts.map +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.mjs +2082 -2067
- package/package.json +1 -1
- package/sdk/components/hooks/index.ts +24 -4
- package/sdk/components/hooks/useForm/apiClient.ts +5 -5
- package/sdk/components/hooks/useForm/expressionValidator.utils.ts +11 -11
- package/sdk/components/hooks/useForm/index.ts +41 -45
- package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +7 -7
- package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +21 -20
- package/sdk/components/hooks/useForm/schemaParser.utils.ts +36 -41
- package/sdk/components/hooks/useForm/types.ts +156 -141
- package/sdk/components/hooks/useForm/useForm.ts +155 -142
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { useTable } from "./useTable";
|
|
2
2
|
export type { UseTableOptions, UseTableReturn, ColumnDefinition, } from "./useTable";
|
|
3
3
|
export { useForm } from "./useForm";
|
|
4
|
-
export type { UseFormOptions, UseFormReturn,
|
|
4
|
+
export type { UseFormOptions, UseFormReturn, FormOperation, FormMode, FormFieldConfig, FormSchemaConfig, FormFieldType, SelectOption, FieldPermission, FieldValidationResult, SubmissionResult, BDOSchema, BDOFieldDefinition, SchemaValidationRule, } from "./useForm";
|
|
5
|
+
export { parseApiError, isNetworkError, isValidationError, clearFormCache, } from "./useForm";
|
|
5
6
|
export { useKanban } from "./useKanban";
|
|
6
7
|
export type { UseKanbanOptions, UseKanbanReturn, KanbanCard, KanbanColumn, ColumnDefinition as KanbanColumnDefinition, } from "./useKanban";
|
|
7
8
|
export * from "./useFilter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../sdk/components/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../sdk/components/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAEV,cAAc,EACd,aAAa,EACb,aAAa,EACb,QAAQ,EAGR,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,eAAe,EAGf,qBAAqB,EACrB,gBAAgB,EAGhB,SAAS,EACT,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,GACf,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,gBAAgB,IAAI,sBAAsB,GAC3C,MAAM,aAAa,CAAC;AAGrB,cAAc,aAAa,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BDOSchema, FormOperation, SubmissionResult } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Fetch BDO schema from backend metadata endpoint
|
|
4
4
|
*/
|
|
5
|
-
export declare function fetchFormSchema(source: string): Promise<
|
|
5
|
+
export declare function fetchFormSchema(source: string): Promise<BDOSchema>;
|
|
6
6
|
/**
|
|
7
7
|
* Fetch form schema with retry logic
|
|
8
8
|
*/
|
|
9
|
-
export declare function fetchFormSchemaWithRetry(source: string, maxRetries?: number): Promise<
|
|
9
|
+
export declare function fetchFormSchemaWithRetry(source: string, maxRetries?: number): Promise<BDOSchema>;
|
|
10
10
|
/**
|
|
11
11
|
* Fetch existing record for update operations
|
|
12
12
|
*/
|
|
@@ -63,7 +63,7 @@ export declare function clearCache(keyPrefix?: string): void;
|
|
|
63
63
|
/**
|
|
64
64
|
* Fetch schema with caching
|
|
65
65
|
*/
|
|
66
|
-
export declare function fetchFormSchemaWithCache(source: string): Promise<
|
|
66
|
+
export declare function fetchFormSchemaWithCache(source: string): Promise<BDOSchema>;
|
|
67
67
|
/**
|
|
68
68
|
* Fetch reference data with caching
|
|
69
69
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiClient.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/apiClient.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"apiClient.d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IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAexC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,cAAc,EAAE,MAAM,EAAE,EACxB,SAAS,GAAE,aAAwB,EACnC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GACxB,OAAO,CAAC,CAAC,CAAC,CA0CZ;AAMD;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAkBhD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAOlD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAOrD;AAWD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,GAAG,EACT,UAAU,GAAE,MAAW,GACtB,IAAI,CAMN;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAapD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CASnD;AAMD;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,CAAC,CAYpB;AAED;;GAEG;AACH,wBAAsB,2BAA2B,CAC/C,cAAc,EAAE,MAAM,EACtB,MAAM,GAAE,MAAM,EAAY,EAC1B,OAAO,CAAC,EAAE,GAAG,EACb,IAAI,CAAC,EAAE,GAAG,GACT,OAAO,CAAC,GAAG,EAAE,CAAC,CAYhB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExpressionTree,
|
|
1
|
+
import type { ExpressionTree, FieldValidationResult, SchemaValidationRule } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Evaluate a complete expression tree
|
|
4
4
|
*/
|
|
@@ -6,7 +6,7 @@ export declare function evaluateExpression(expressionTree: ExpressionTree, formV
|
|
|
6
6
|
/**
|
|
7
7
|
* Validate a field using backend validation rules
|
|
8
8
|
*/
|
|
9
|
-
export declare function validateField<T = Record<string, any>>(fieldName: string, fieldValue: any, validationRules:
|
|
9
|
+
export declare function validateField<T = Record<string, any>>(fieldName: string, fieldValue: any, validationRules: SchemaValidationRule[], formValues: T, referenceData?: Record<string, any>): FieldValidationResult<T>;
|
|
10
10
|
/**
|
|
11
11
|
* Validate all cross-field validation rules
|
|
12
12
|
*/
|
|
@@ -16,7 +16,7 @@ export declare function validateCrossField<T = Record<string, any>>(validationRu
|
|
|
16
16
|
ExpressionTree: ExpressionTree;
|
|
17
17
|
};
|
|
18
18
|
Message: string;
|
|
19
|
-
}>, formValues: T, referenceData?: Record<string, any>):
|
|
19
|
+
}>, formValues: T, referenceData?: Record<string, any>): FieldValidationResult<T>[];
|
|
20
20
|
/**
|
|
21
21
|
* Calculate computed field value
|
|
22
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expressionValidator.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/expressionValidator.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,cAAc,EAEd,
|
|
1
|
+
{"version":3,"file":"expressionValidator.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/expressionValidator.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,cAAc,EAEd,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AA6SjB;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC/B,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GACtC,GAAG,CAaL;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnD,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,GAAG,EACf,eAAe,EAAE,oBAAoB,EAAE,EACvC,UAAU,EAAE,CAAC,EACb,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GACtC,qBAAqB,CAAC,CAAC,CAAC,CAgC1B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACxD,eAAe,EAAE,KAAK,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE;QAAE,cAAc,EAAE,cAAc,CAAA;KAAE,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,EACF,UAAU,EAAE,CAAC,EACb,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GACtC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAwB5B;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC/B,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GACtC,GAAG,CAOL;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,cAAc,EAC9B,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EACpC,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GACtC,GAAG,CAOL"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { useForm } from './useForm';
|
|
2
|
-
export type { UseFormOptions, UseFormReturn,
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
2
|
+
export type { UseFormOptions, UseFormReturn, FormOperation, FormMode, } from './types';
|
|
3
|
+
export type { FormFieldConfig, FormSchemaConfig, FormFieldType, SelectOption, FieldPermission, FieldRuleIds, } from './types';
|
|
4
|
+
export type { FieldValidationResult, SubmissionResult, } from './types';
|
|
5
|
+
export type { BDOSchema, BDOFieldDefinition, SchemaValidationRule, ComputedFieldFormula, DefaultValueExpression, ReferenceFieldConfig, FieldOptionsConfig, ExpressionTree, BusinessObjectRules, RolePermission, RuleType, } from './types';
|
|
6
|
+
export type { ExpressionContext, } from './types';
|
|
7
|
+
export { parseApiError, isNetworkError, isValidationError, } from './apiClient';
|
|
8
|
+
export { clearCache as clearFormCache } from './apiClient';
|
|
6
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,YAAY,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,YAAY,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,QAAQ,GACT,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,GACb,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,QAAQ,GACT,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExpressionTree,
|
|
1
|
+
import type { ExpressionTree, FieldValidationResult, SchemaValidationRule } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Analyze expression dependencies for optimized watching
|
|
4
4
|
*/
|
|
@@ -6,7 +6,7 @@ export declare function analyzeExpressionDependencies(expression: ExpressionTree
|
|
|
6
6
|
/**
|
|
7
7
|
* Build dependency graph for multiple expressions
|
|
8
8
|
*/
|
|
9
|
-
export declare function buildDependencyGraph(rules: Record<string,
|
|
9
|
+
export declare function buildDependencyGraph(rules: Record<string, SchemaValidationRule>): Map<string, Set<string>>;
|
|
10
10
|
/**
|
|
11
11
|
* Optimized expression evaluator with caching and memoization
|
|
12
12
|
*/
|
|
@@ -63,7 +63,7 @@ declare const globalEvaluator: OptimizedExpressionEvaluator;
|
|
|
63
63
|
/**
|
|
64
64
|
* Optimized field validation with caching
|
|
65
65
|
*/
|
|
66
|
-
export declare function validateFieldOptimized<T = Record<string, any>>(fieldName: string, fieldValue: any, validationRules:
|
|
66
|
+
export declare function validateFieldOptimized<T = Record<string, any>>(fieldName: string, fieldValue: any, validationRules: SchemaValidationRule[], formValues: T, lastFormValues?: T): FieldValidationResult<T>;
|
|
67
67
|
/**
|
|
68
68
|
* Optimized computed value calculation
|
|
69
69
|
*/
|
|
@@ -78,8 +78,8 @@ export declare function getFieldDependencies(expression: ExpressionTree): string
|
|
|
78
78
|
export declare function batchValidateFields<T = Record<string, any>>(validations: Array<{
|
|
79
79
|
fieldName: string;
|
|
80
80
|
fieldValue: any;
|
|
81
|
-
rules:
|
|
82
|
-
}>, formValues: T, lastFormValues?: T): Array<
|
|
81
|
+
rules: SchemaValidationRule[];
|
|
82
|
+
}>, formValues: T, lastFormValues?: T): Array<FieldValidationResult<T>>;
|
|
83
83
|
/**
|
|
84
84
|
* Clear global expression cache
|
|
85
85
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimizedExpressionValidator.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"optimizedExpressionValidator.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AA+CjB;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,cAAc,GACzB,GAAG,CAAC,MAAM,CAAC,CA6Bb;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAC1C,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAS1B;AAMD;;GAEG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,mBAAmB,CAA+B;IAE1D;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,eAAe,CAAC,UAAU,EAAE,cAAc,GAAG,GAAG,CAAC,MAAM,CAAC;IAYxD;;OAEG;IACH,OAAO,CAAC,eAAe;IAqBvB;;OAEG;IACH,QAAQ,CACN,UAAU,EAAE,cAAc,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAChC,GAAG;IAeN;;OAEG;IACH,OAAO,CAAC,YAAY;IAyBpB;;OAEG;IACH,OAAO,CAA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E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BDOSchema,
|
|
1
|
+
import type { BDOSchema, BDOFieldDefinition, FormSchemaConfig, SchemaValidationRule, RuleType, FieldPermission } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Normalize BDO schema to ensure validation rules are in centralized format
|
|
4
4
|
* Extracts inline validation rules from fields and adds them to Rules.Validation
|
|
@@ -7,8 +7,8 @@ export declare function normalizeBDOSchema(schema: BDOSchema): BDOSchema;
|
|
|
7
7
|
/**
|
|
8
8
|
* Classify rules by type from BDO schema
|
|
9
9
|
*/
|
|
10
|
-
export declare function classifyRules(schema: BDOSchema):
|
|
11
|
-
export declare function createFieldRuleMapping(schema: BDOSchema, classifiedRules:
|
|
10
|
+
export declare function classifyRules(schema: BDOSchema): FormSchemaConfig["rules"];
|
|
11
|
+
export declare function createFieldRuleMapping(schema: BDOSchema, classifiedRules: FormSchemaConfig["rules"]): FormSchemaConfig["fieldRules"];
|
|
12
12
|
/**
|
|
13
13
|
* Calculate field permissions based on user role
|
|
14
14
|
*/
|
|
@@ -20,9 +20,10 @@ export declare function getRuleExecutionStrategy(ruleType: RuleType): "client" |
|
|
|
20
20
|
/**
|
|
21
21
|
* Get rules that should execute for a specific trigger
|
|
22
22
|
*/
|
|
23
|
-
export declare function getRulesForField(fieldName: string, fieldRules:
|
|
23
|
+
export declare function getRulesForField(fieldName: string, fieldRules: FormSchemaConfig["fieldRules"], classifiedRules: FormSchemaConfig["rules"], executionType: "client" | "server"): SchemaValidationRule[];
|
|
24
24
|
/**
|
|
25
|
-
* Convert legacy
|
|
25
|
+
* Convert legacy schema format to BDO format
|
|
26
|
+
* @deprecated Legacy schema format is no longer supported
|
|
26
27
|
*/
|
|
27
|
-
export declare function convertLegacySchema(legacySchema:
|
|
28
|
+
export declare function convertLegacySchema(legacySchema: Record<string, BDOFieldDefinition>): BDOSchema;
|
|
28
29
|
//# sourceMappingURL=ruleClassifier.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruleClassifier.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/ruleClassifier.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"ruleClassifier.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/ruleClassifier.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,QAAQ,EACR,eAAe,EAChB,MAAM,SAAS,CAAC;AAkCjB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,CAyF/D;AAMD;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAqB1E;AAsDD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,gBAAgB,CAAC,OAAO,CAAC,GACzC,gBAAgB,CAAC,YAAY,CAAC,CAsDhC;AAMD;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAsCjC;AAMD;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,QAAQ,GACjB,QAAQ,GAAG,QAAQ,CAUrB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,EAC1C,eAAe,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAC1C,aAAa,EAAE,QAAQ,GAAG,QAAQ,GACjC,oBAAoB,EAAE,CA4BxB;AAMD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG,SAAS,CAyB/F"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BDOSchema, FormFieldConfig, FormSchemaConfig } from "./types";
|
|
2
2
|
/**
|
|
3
|
-
* Process complete
|
|
3
|
+
* Process complete BDO schema
|
|
4
4
|
*/
|
|
5
|
-
export declare function processSchema(schema:
|
|
5
|
+
export declare function processSchema(schema: BDOSchema, formValues?: Record<string, any>, userRole?: string): FormSchemaConfig;
|
|
6
6
|
/**
|
|
7
7
|
* Update computed field values based on current form values
|
|
8
8
|
*/
|
|
9
|
-
export declare function updateComputedFields(processedSchema:
|
|
9
|
+
export declare function updateComputedFields(processedSchema: FormSchemaConfig, currentValues: Record<string, any>): Record<string, any>;
|
|
10
10
|
/**
|
|
11
11
|
* Build field dependency map
|
|
12
12
|
*/
|
|
13
|
-
export declare function buildDependencyMap(processedSchema:
|
|
13
|
+
export declare function buildDependencyMap(processedSchema: FormSchemaConfig): Record<string, string[]>;
|
|
14
14
|
/**
|
|
15
15
|
* Validate processed schema
|
|
16
16
|
*/
|
|
17
|
-
export declare function validateSchema(processedSchema:
|
|
17
|
+
export declare function validateSchema(processedSchema: FormSchemaConfig): {
|
|
18
18
|
isValid: boolean;
|
|
19
19
|
errors: string[];
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* Build reference field configuration for API calls
|
|
23
23
|
*/
|
|
24
|
-
export declare function buildReferenceFieldConfig(field:
|
|
24
|
+
export declare function buildReferenceFieldConfig(field: FormFieldConfig): any;
|
|
25
25
|
/**
|
|
26
26
|
* Extract all reference field configurations from schema
|
|
27
27
|
*/
|
|
28
|
-
export declare function extractReferenceFields(processedSchema:
|
|
28
|
+
export declare function extractReferenceFields(processedSchema: FormSchemaConfig): Record<string, any>;
|
|
29
29
|
//# sourceMappingURL=schemaParser.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaParser.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/schemaParser.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"schemaParser.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/schemaParser.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,SAAS,EAET,eAAe,EACf,gBAAgB,EAGjB,MAAM,SAAS,CAAC;AAkPjB;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,EACjB,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EACpC,QAAQ,CAAC,EAAE,MAAM,GAChB,gBAAgB,CAsElB;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,gBAAgB,EACjC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAsBrB;AAkCD;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,gBAAgB,GAChC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAkC1B;AAMD;;GAEG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,gBAAgB,GAAG;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAqBA;AAMD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAarE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,gBAAgB,GAChC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAarB"}
|