@ram_28/kf-ai-sdk 1.0.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/LICENSE +21 -0
- package/README.md +840 -0
- package/dist/api/client.d.ts +78 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/datetime.d.ts +21 -0
- package/dist/api/datetime.d.ts.map +1 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/metadata.d.ts +75 -0
- package/dist/api/metadata.d.ts.map +1 -0
- package/dist/components/hooks/index.d.ts +8 -0
- package/dist/components/hooks/index.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/index.d.ts +5 -0
- package/dist/components/hooks/useFilter/index.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/payloadBuilder.utils.d.ts +33 -0
- package/dist/components/hooks/useFilter/payloadBuilder.utils.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/types.d.ts +137 -0
- package/dist/components/hooks/useFilter/types.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/useFilter.d.ts +3 -0
- package/dist/components/hooks/useFilter/useFilter.d.ts.map +1 -0
- package/dist/components/hooks/useFilter/validation.utils.d.ts +38 -0
- package/dist/components/hooks/useFilter/validation.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/apiClient.d.ts +71 -0
- package/dist/components/hooks/useForm/apiClient.d.ts.map +1 -0
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts +28 -0
- package/dist/components/hooks/useForm/expressionValidator.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/index.d.ts +6 -0
- package/dist/components/hooks/useForm/index.d.ts.map +1 -0
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts +88 -0
- package/dist/components/hooks/useForm/optimizedExpressionValidator.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts +28 -0
- package/dist/components/hooks/useForm/ruleClassifier.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts +29 -0
- package/dist/components/hooks/useForm/schemaParser.utils.d.ts.map +1 -0
- package/dist/components/hooks/useForm/types.d.ts +412 -0
- package/dist/components/hooks/useForm/types.d.ts.map +1 -0
- package/dist/components/hooks/useForm/useForm.d.ts +3 -0
- package/dist/components/hooks/useForm/useForm.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/apiClient.d.ts +99 -0
- package/dist/components/hooks/useKanban/apiClient.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/context.d.ts +4 -0
- package/dist/components/hooks/useKanban/context.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/dragDropManager.d.ts +27 -0
- package/dist/components/hooks/useKanban/dragDropManager.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/index.d.ts +6 -0
- package/dist/components/hooks/useKanban/index.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/types.d.ts +438 -0
- package/dist/components/hooks/useKanban/types.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/useKanban.d.ts +3 -0
- package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -0
- package/dist/components/hooks/useKanban/useKanbanSimple.d.ts +62 -0
- package/dist/components/hooks/useKanban/useKanbanSimple.d.ts.map +1 -0
- package/dist/components/hooks/useTable/index.d.ts +3 -0
- package/dist/components/hooks/useTable/index.d.ts.map +1 -0
- package/dist/components/hooks/useTable/types.d.ts +107 -0
- package/dist/components/hooks/useTable/types.d.ts.map +1 -0
- package/dist/components/hooks/useTable/useTable.d.ts +8 -0
- package/dist/components/hooks/useTable/useTable.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/kanban/Kanban.d.ts +12 -0
- package/dist/components/ui/kanban/Kanban.d.ts.map +1 -0
- package/dist/components/ui/kanban/index.d.ts +2 -0
- package/dist/components/ui/kanban/index.d.ts.map +1 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +6522 -0
- package/dist/types/base-fields.d.ts +182 -0
- package/dist/types/base-fields.d.ts.map +1 -0
- package/dist/types/common.d.ts +238 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +7 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/formatting.d.ts +52 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +98 -0
- package/sdk/api/client.ts +447 -0
- package/sdk/api/datetime.ts +33 -0
- package/sdk/api/index.ts +61 -0
- package/sdk/api/metadata.ts +148 -0
- package/sdk/components/hooks/index.ts +34 -0
- package/sdk/components/hooks/useFilter/index.ts +37 -0
- package/sdk/components/hooks/useFilter/payloadBuilder.utils.ts +298 -0
- package/sdk/components/hooks/useFilter/types.ts +158 -0
- package/sdk/components/hooks/useFilter/useFilter.llm.txt +497 -0
- package/sdk/components/hooks/useFilter/useFilter.ts +494 -0
- package/sdk/components/hooks/useFilter/validation.utils.ts +401 -0
- package/sdk/components/hooks/useForm/apiClient.ts +441 -0
- package/sdk/components/hooks/useForm/expressionValidator.utils.ts +444 -0
- package/sdk/components/hooks/useForm/index.ts +64 -0
- package/sdk/components/hooks/useForm/optimizedExpressionValidator.utils.ts +482 -0
- package/sdk/components/hooks/useForm/ruleClassifier.utils.ts +424 -0
- package/sdk/components/hooks/useForm/schemaParser.utils.ts +519 -0
- package/sdk/components/hooks/useForm/types.ts +630 -0
- package/sdk/components/hooks/useForm/useForm.llm.txt +340 -0
- package/sdk/components/hooks/useForm/useForm.ts +821 -0
- package/sdk/components/hooks/useKanban/apiClient.ts +494 -0
- package/sdk/components/hooks/useKanban/context.ts +14 -0
- package/sdk/components/hooks/useKanban/dragDropManager.ts +529 -0
- package/sdk/components/hooks/useKanban/index.ts +63 -0
- package/sdk/components/hooks/useKanban/types.ts +606 -0
- package/sdk/components/hooks/useKanban/useKanban.llm.txt +482 -0
- package/sdk/components/hooks/useKanban/useKanban.ts +725 -0
- package/sdk/components/hooks/useKanban/useKanbanSimple.ts +389 -0
- package/sdk/components/hooks/useTable/index.ts +5 -0
- package/sdk/components/hooks/useTable/types.ts +154 -0
- package/sdk/components/hooks/useTable/useTable.llm.txt +344 -0
- package/sdk/components/hooks/useTable/useTable.ts +413 -0
- package/sdk/components/index.ts +15 -0
- package/sdk/components/ui/index.ts +2 -0
- package/sdk/components/ui/kanban/Kanban.tsx +134 -0
- package/sdk/components/ui/kanban/index.ts +11 -0
- package/sdk/index.ts +13 -0
- package/sdk/types/base-fields.ts +221 -0
- package/sdk/types/common.ts +306 -0
- package/sdk/types/index.ts +5 -0
- package/sdk/utils/cn.ts +10 -0
- package/sdk/utils/formatting.ts +212 -0
- package/sdk/utils/index.ts +5 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { ExpressionTree, ValidationResult, ValidationRule } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Analyze expression dependencies for optimized watching
|
|
4
|
+
*/
|
|
5
|
+
export declare function analyzeExpressionDependencies(expression: ExpressionTree): Set<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Build dependency graph for multiple expressions
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildDependencyGraph(rules: Record<string, ValidationRule>): Map<string, Set<string>>;
|
|
10
|
+
/**
|
|
11
|
+
* Optimized expression evaluator with caching and memoization
|
|
12
|
+
*/
|
|
13
|
+
export declare class OptimizedExpressionEvaluator {
|
|
14
|
+
private resultCache;
|
|
15
|
+
private dependencyCache;
|
|
16
|
+
private compiledExpressions;
|
|
17
|
+
/**
|
|
18
|
+
* Create cache key from expression and context
|
|
19
|
+
*/
|
|
20
|
+
private createCacheKey;
|
|
21
|
+
/**
|
|
22
|
+
* Get expression dependencies (cached)
|
|
23
|
+
*/
|
|
24
|
+
getDependencies(expression: ExpressionTree): Set<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Check if expression result is cached and context hasn't changed
|
|
27
|
+
*/
|
|
28
|
+
private getCachedResult;
|
|
29
|
+
/**
|
|
30
|
+
* Evaluate expression with caching
|
|
31
|
+
*/
|
|
32
|
+
evaluate(expression: ExpressionTree, context: Record<string, any>, lastContext?: Record<string, any>): any;
|
|
33
|
+
/**
|
|
34
|
+
* Core expression evaluation logic
|
|
35
|
+
*/
|
|
36
|
+
private evaluateNode;
|
|
37
|
+
/**
|
|
38
|
+
* Get identifier value with system context support
|
|
39
|
+
*/
|
|
40
|
+
private getIdentifierValue;
|
|
41
|
+
/**
|
|
42
|
+
* Evaluate binary expressions with type coercion
|
|
43
|
+
*/
|
|
44
|
+
private evaluateBinaryExpression;
|
|
45
|
+
/**
|
|
46
|
+
* Evaluate logical expressions with short-circuiting
|
|
47
|
+
*/
|
|
48
|
+
private evaluateLogicalExpression;
|
|
49
|
+
/**
|
|
50
|
+
* Evaluate function calls with built-in functions
|
|
51
|
+
*/
|
|
52
|
+
private evaluateCallExpression;
|
|
53
|
+
/**
|
|
54
|
+
* Evaluate member expressions
|
|
55
|
+
*/
|
|
56
|
+
private evaluateMemberExpression;
|
|
57
|
+
/**
|
|
58
|
+
* Clear all caches
|
|
59
|
+
*/
|
|
60
|
+
clearCache(): void;
|
|
61
|
+
}
|
|
62
|
+
declare const globalEvaluator: OptimizedExpressionEvaluator;
|
|
63
|
+
/**
|
|
64
|
+
* Optimized field validation with caching
|
|
65
|
+
*/
|
|
66
|
+
export declare function validateFieldOptimized<T = Record<string, any>>(fieldName: string, fieldValue: any, validationRules: ValidationRule[], formValues: T, lastFormValues?: T): ValidationResult<T>;
|
|
67
|
+
/**
|
|
68
|
+
* Optimized computed value calculation
|
|
69
|
+
*/
|
|
70
|
+
export declare function calculateComputedValueOptimized(expression: ExpressionTree, formValues: Record<string, any>, lastFormValues?: Record<string, any>): any;
|
|
71
|
+
/**
|
|
72
|
+
* Get field dependencies for optimized watching
|
|
73
|
+
*/
|
|
74
|
+
export declare function getFieldDependencies(expression: ExpressionTree): string[];
|
|
75
|
+
/**
|
|
76
|
+
* Batch validate multiple fields efficiently
|
|
77
|
+
*/
|
|
78
|
+
export declare function batchValidateFields<T = Record<string, any>>(validations: Array<{
|
|
79
|
+
fieldName: string;
|
|
80
|
+
fieldValue: any;
|
|
81
|
+
rules: ValidationRule[];
|
|
82
|
+
}>, formValues: T, lastFormValues?: T): Array<ValidationResult<T>>;
|
|
83
|
+
/**
|
|
84
|
+
* Clear global expression cache
|
|
85
|
+
*/
|
|
86
|
+
export declare function clearExpressionCache(): void;
|
|
87
|
+
export { globalEvaluator as expressionEvaluator };
|
|
88
|
+
//# sourceMappingURL=optimizedExpressionValidator.utils.d.ts.map
|
|
@@ -0,0 +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,gBAAgB,EAChB,cAAc,EACf,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,cAAc,CAAC,GACpC,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,cA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jB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,GAAG,CAAC;IAChB,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC,EACF,UAAU,EAAE,CAAC,EACb,cAAc,CAAC,EAAE,CAAC,GACjB,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAI5B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAGD,OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { BDOSchema, BackendSchema, ProcessedSchema, ValidationRule, RuleType, FieldPermission } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Normalize BDO schema to ensure validation rules are in centralized format
|
|
4
|
+
* Extracts inline validation rules from fields and adds them to Rules.Validation
|
|
5
|
+
*/
|
|
6
|
+
export declare function normalizeBDOSchema(schema: BDOSchema): BDOSchema;
|
|
7
|
+
/**
|
|
8
|
+
* Classify rules by type from BDO schema
|
|
9
|
+
*/
|
|
10
|
+
export declare function classifyRules(schema: BDOSchema): ProcessedSchema["rules"];
|
|
11
|
+
export declare function createFieldRuleMapping(schema: BDOSchema, classifiedRules: ProcessedSchema["rules"]): ProcessedSchema["fieldRules"];
|
|
12
|
+
/**
|
|
13
|
+
* Calculate field permissions based on user role
|
|
14
|
+
*/
|
|
15
|
+
export declare function calculateFieldPermissions(schema: BDOSchema, userRole?: string): Record<string, FieldPermission>;
|
|
16
|
+
/**
|
|
17
|
+
* Determine if rule should execute client-side or server-side
|
|
18
|
+
*/
|
|
19
|
+
export declare function getRuleExecutionStrategy(ruleType: RuleType): "client" | "server";
|
|
20
|
+
/**
|
|
21
|
+
* Get rules that should execute for a specific trigger
|
|
22
|
+
*/
|
|
23
|
+
export declare function getRulesForField(fieldName: string, fieldRules: ProcessedSchema["fieldRules"], classifiedRules: ProcessedSchema["rules"], executionType: "client" | "server"): ValidationRule[];
|
|
24
|
+
/**
|
|
25
|
+
* Convert legacy BackendSchema to BDO format
|
|
26
|
+
*/
|
|
27
|
+
export declare function convertLegacySchema(legacySchema: BackendSchema): BDOSchema;
|
|
28
|
+
//# sourceMappingURL=ruleClassifier.utils.d.ts.map
|
|
@@ -0,0 +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,aAAa,EACb,eAAe,EACf,cAAc,EACd,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,eAAe,CAAC,OAAO,CAAC,CAqBzE;AAsDD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,eAAe,CAAC,OAAO,CAAC,GACxC,eAAe,CAAC,YAAY,CAAC,CAsD/B;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,eAAe,CAAC,YAAY,CAAC,EACzC,eAAe,EAAE,eAAe,CAAC,OAAO,CAAC,EACzC,aAAa,EAAE,QAAQ,GAAG,QAAQ,GACjC,cAAc,EAAE,CA4BlB;AAMD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,aAAa,GAAG,SAAS,CAyB1E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { BackendSchema, BDOSchema, ProcessedField, ProcessedSchema } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Process complete backend schema
|
|
4
|
+
*/
|
|
5
|
+
export declare function processSchema(schema: BackendSchema | BDOSchema, formValues?: Record<string, any>, userRole?: string): ProcessedSchema;
|
|
6
|
+
/**
|
|
7
|
+
* Update computed field values based on current form values
|
|
8
|
+
*/
|
|
9
|
+
export declare function updateComputedFields(processedSchema: ProcessedSchema, currentValues: Record<string, any>): Record<string, any>;
|
|
10
|
+
/**
|
|
11
|
+
* Build field dependency map
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildDependencyMap(processedSchema: ProcessedSchema): Record<string, string[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Validate processed schema
|
|
16
|
+
*/
|
|
17
|
+
export declare function validateSchema(processedSchema: ProcessedSchema): {
|
|
18
|
+
isValid: boolean;
|
|
19
|
+
errors: string[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Build reference field configuration for API calls
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildReferenceFieldConfig(field: ProcessedField): any;
|
|
25
|
+
/**
|
|
26
|
+
* Extract all reference field configurations from schema
|
|
27
|
+
*/
|
|
28
|
+
export declare function extractReferenceFields(processedSchema: ProcessedSchema): Record<string, any>;
|
|
29
|
+
//# sourceMappingURL=schemaParser.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaParser.utils.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/schemaParser.utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EAET,cAAc,EACd,eAAe,EAGhB,MAAM,SAAS,CAAC;AAmPjB;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,aAAa,GAAG,SAAS,EACjC,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EACpC,QAAQ,CAAC,EAAE,MAAM,GAChB,eAAe,CAyEjB;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACjC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAsBrB;AAkCD;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAkC1B;AAMD;;GAEG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,eAAe,GAAG;IAChE,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAqBA;AAMD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG,CAapE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAarB"}
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import type { UseFormRegister, Mode, FieldValues as RHFFieldValues, SubmitHandler, SubmitErrorHandler, FieldErrors, Path, PathValue, RegisterOptions, SetValueConfig, FormState } from "react-hook-form";
|
|
2
|
+
/**
|
|
3
|
+
* Extended handleSubmit that allows optional callbacks
|
|
4
|
+
* When no callback is provided, uses the SDK's built-in submit function
|
|
5
|
+
*/
|
|
6
|
+
export type ExtendedHandleSubmit<T extends RHFFieldValues> = {
|
|
7
|
+
(onValid?: SubmitHandler<T>, onInvalid?: SubmitErrorHandler<T>): (e?: React.BaseSyntheticEvent) => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Expression tree node types from backend validation system
|
|
11
|
+
*/
|
|
12
|
+
export interface ExpressionTree {
|
|
13
|
+
Type: "BinaryExpression" | "LogicalExpression" | "CallExpression" | "MemberExpression" | "AssignmentExpression" | "SystemIdentifier" | "Identifier" | "Literal";
|
|
14
|
+
Operator?: string;
|
|
15
|
+
Callee?: string;
|
|
16
|
+
Arguments?: ExpressionTree[];
|
|
17
|
+
Name?: string;
|
|
18
|
+
Source?: string;
|
|
19
|
+
Property?: {
|
|
20
|
+
Name: string;
|
|
21
|
+
Property?: {
|
|
22
|
+
Name: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
Value?: any;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Backend validation rule structure
|
|
29
|
+
*/
|
|
30
|
+
export interface ValidationRule {
|
|
31
|
+
Id: string;
|
|
32
|
+
Name: string;
|
|
33
|
+
Description: string;
|
|
34
|
+
Expression: string;
|
|
35
|
+
ExpressionTree: ExpressionTree;
|
|
36
|
+
ResultType: string;
|
|
37
|
+
Message?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Backend formula structure for computed fields
|
|
41
|
+
*/
|
|
42
|
+
export interface Formula {
|
|
43
|
+
Id?: string;
|
|
44
|
+
Name?: string;
|
|
45
|
+
Description?: string;
|
|
46
|
+
Expression: string;
|
|
47
|
+
ExpressionTree: ExpressionTree;
|
|
48
|
+
ResultType?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Backend default value structure
|
|
52
|
+
*/
|
|
53
|
+
export interface DefaultValue {
|
|
54
|
+
Expression: string;
|
|
55
|
+
ExpressionTree: ExpressionTree;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Backend reference field configuration
|
|
59
|
+
*/
|
|
60
|
+
export interface ReferenceField {
|
|
61
|
+
Mode: "Dynamic" | "Static";
|
|
62
|
+
Reference?: {
|
|
63
|
+
BusinessObject: string;
|
|
64
|
+
Fields: string[];
|
|
65
|
+
Filters?: {
|
|
66
|
+
Condition: Array<{
|
|
67
|
+
LhsField: string;
|
|
68
|
+
Operator: string;
|
|
69
|
+
RhsType: string;
|
|
70
|
+
RhsValue?: DefaultValue;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
Sort?: Array<{
|
|
74
|
+
Field: string;
|
|
75
|
+
Order: "ASC" | "DESC";
|
|
76
|
+
}>;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Backend values configuration for select fields
|
|
81
|
+
*/
|
|
82
|
+
export interface FieldValues {
|
|
83
|
+
Mode: "Static" | "Dynamic";
|
|
84
|
+
Items?: Array<{
|
|
85
|
+
Value: string | number | boolean;
|
|
86
|
+
Label: string;
|
|
87
|
+
}>;
|
|
88
|
+
Reference?: ReferenceField["Reference"];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Backend field definition structure
|
|
92
|
+
*/
|
|
93
|
+
export interface BackendFieldDefinition {
|
|
94
|
+
Id: string;
|
|
95
|
+
Name: string;
|
|
96
|
+
Type: "String" | "Number" | "Boolean" | "Date" | "DateTime" | "Reference" | "Array" | "Object" | "ActivityFlow";
|
|
97
|
+
Required?: boolean;
|
|
98
|
+
Unique?: boolean;
|
|
99
|
+
DefaultValue?: DefaultValue;
|
|
100
|
+
Formula?: Formula;
|
|
101
|
+
Computed?: boolean;
|
|
102
|
+
Validation?: string[] | ValidationRule[];
|
|
103
|
+
Values?: FieldValues;
|
|
104
|
+
Items?: {
|
|
105
|
+
Type: string;
|
|
106
|
+
Property?: Record<string, BackendFieldDefinition>;
|
|
107
|
+
};
|
|
108
|
+
Property?: Record<string, BackendFieldDefinition>;
|
|
109
|
+
Description?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Business Object Rule definitions from BDO schema
|
|
113
|
+
*/
|
|
114
|
+
export interface BusinessObjectRules {
|
|
115
|
+
Computation?: Record<string, ValidationRule>;
|
|
116
|
+
Validation?: Record<string, ValidationRule>;
|
|
117
|
+
BusinessLogic?: Record<string, ValidationRule>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Role permission definition from BDO schema
|
|
121
|
+
*/
|
|
122
|
+
export interface RolePermission {
|
|
123
|
+
Editable?: string[];
|
|
124
|
+
ReadOnly?: string[];
|
|
125
|
+
Methods?: string[];
|
|
126
|
+
Filters?: {
|
|
127
|
+
Operator: "AND" | "OR";
|
|
128
|
+
Condition: Array<{
|
|
129
|
+
LhsField: string;
|
|
130
|
+
Operator: string;
|
|
131
|
+
RhsType: "Literal" | "Field";
|
|
132
|
+
RhsValue: any;
|
|
133
|
+
}>;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Complete BDO schema structure matching your JSON
|
|
138
|
+
*/
|
|
139
|
+
export interface BDOSchema {
|
|
140
|
+
Id: string;
|
|
141
|
+
Name: string;
|
|
142
|
+
Kind: "BusinessObject";
|
|
143
|
+
Description: string;
|
|
144
|
+
Rules: BusinessObjectRules;
|
|
145
|
+
Fields: Record<string, BackendFieldDefinition>;
|
|
146
|
+
RolePermission: Record<string, RolePermission>;
|
|
147
|
+
Roles: Record<string, {
|
|
148
|
+
Name: string;
|
|
149
|
+
Description: string;
|
|
150
|
+
}>;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Complete backend schema response structure (legacy support)
|
|
154
|
+
*/
|
|
155
|
+
export interface BackendSchema {
|
|
156
|
+
[fieldName: string]: BackendFieldDefinition;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Form operation mode
|
|
160
|
+
*/
|
|
161
|
+
export type FormOperation = "create" | "update";
|
|
162
|
+
/**
|
|
163
|
+
* Form validation mode (from react-hook-form)
|
|
164
|
+
*/
|
|
165
|
+
export type FormMode = Mode;
|
|
166
|
+
/**
|
|
167
|
+
* Rule classification types
|
|
168
|
+
*/
|
|
169
|
+
export type RuleType = "Validation" | "Computation" | "BusinessLogic";
|
|
170
|
+
/**
|
|
171
|
+
* Rule execution context
|
|
172
|
+
*/
|
|
173
|
+
export interface RuleExecutionContext<T> {
|
|
174
|
+
ruleType: RuleType;
|
|
175
|
+
ruleId: string;
|
|
176
|
+
fieldName: keyof T;
|
|
177
|
+
fieldValue: any;
|
|
178
|
+
formValues: Partial<T>;
|
|
179
|
+
rule: ValidationRule;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* useForm hook options with strict typing
|
|
183
|
+
*/
|
|
184
|
+
export interface UseFormOptions<T extends Record<string, any> = Record<string, any>> {
|
|
185
|
+
/** Data source identifier (Business Object name) */
|
|
186
|
+
source: string;
|
|
187
|
+
/** Form operation type */
|
|
188
|
+
operation: FormOperation;
|
|
189
|
+
/** Record ID for update operations */
|
|
190
|
+
recordId?: string;
|
|
191
|
+
/** Default form values */
|
|
192
|
+
defaultValues?: Partial<T>;
|
|
193
|
+
/**
|
|
194
|
+
* Validation mode - controls when validation runs and errors are displayed
|
|
195
|
+
*
|
|
196
|
+
* Available modes:
|
|
197
|
+
* - "onSubmit" (default in react-hook-form): Validate only when form is submitted
|
|
198
|
+
* - "onBlur" (default in useForm): Validate when field loses focus
|
|
199
|
+
* - "onChange": Validate on every keystroke/change
|
|
200
|
+
* - "onTouched": Validate on first blur, then on every change after
|
|
201
|
+
* - "all": Validate on both blur and change
|
|
202
|
+
*
|
|
203
|
+
* **Important:** Computation (draft API calls) ALWAYS fires on blur regardless of mode,
|
|
204
|
+
* but only if the field value is valid. In "onSubmit" mode, computation will fire
|
|
205
|
+
* on blur since no validation has occurred yet (validation happens at submit time).
|
|
206
|
+
*
|
|
207
|
+
* @default "onBlur"
|
|
208
|
+
* @see https://react-hook-form.com/docs/useform for more details on validation modes
|
|
209
|
+
*/
|
|
210
|
+
mode?: FormMode;
|
|
211
|
+
/** Whether to enable schema fetching and form initialization (default: true) */
|
|
212
|
+
enabled?: boolean;
|
|
213
|
+
/** User role for permission enforcement */
|
|
214
|
+
userRole?: string;
|
|
215
|
+
/** Success callback */
|
|
216
|
+
onSuccess?: (data: T) => void;
|
|
217
|
+
/** Error callback */
|
|
218
|
+
onError?: (error: Error) => void;
|
|
219
|
+
/** Schema load error callback */
|
|
220
|
+
onSchemaError?: (error: Error) => void;
|
|
221
|
+
/** Submit error callback */
|
|
222
|
+
onSubmitError?: (error: Error) => void;
|
|
223
|
+
/** Computation rule callback (called when computation rules are triggered) */
|
|
224
|
+
onComputationRule?: (context: RuleExecutionContext<T>) => Promise<Partial<T>>;
|
|
225
|
+
/** Skip schema fetching (use for testing) */
|
|
226
|
+
skipSchemaFetch?: boolean;
|
|
227
|
+
/** Manual schema (use instead of fetching) */
|
|
228
|
+
schema?: BackendSchema | BDOSchema;
|
|
229
|
+
/**
|
|
230
|
+
* Trigger draft API call on every field change (after validation passes)
|
|
231
|
+
* If true: draft API is called for any field change
|
|
232
|
+
* If false (default): draft API is called only when computed field dependencies change
|
|
233
|
+
*/
|
|
234
|
+
draftOnEveryChange?: boolean;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Field permission for current user
|
|
238
|
+
*/
|
|
239
|
+
export interface FieldPermission {
|
|
240
|
+
/** Can user edit this field */
|
|
241
|
+
editable: boolean;
|
|
242
|
+
/** Can user see this field */
|
|
243
|
+
readable: boolean;
|
|
244
|
+
/** Is field completely hidden */
|
|
245
|
+
hidden: boolean;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Processed field metadata for form rendering
|
|
249
|
+
*/
|
|
250
|
+
export interface ProcessedField {
|
|
251
|
+
/** Field name */
|
|
252
|
+
name: string;
|
|
253
|
+
/** Field type */
|
|
254
|
+
type: "text" | "number" | "email" | "password" | "date" | "datetime-local" | "checkbox" | "select" | "textarea" | "reference";
|
|
255
|
+
/** Field label (derived from name or schema) */
|
|
256
|
+
label: string;
|
|
257
|
+
/** Whether field is required */
|
|
258
|
+
required: boolean;
|
|
259
|
+
/** Whether field is computed (read-only) */
|
|
260
|
+
computed: boolean;
|
|
261
|
+
/** Default value */
|
|
262
|
+
defaultValue?: any;
|
|
263
|
+
/** Select options (for select/reference fields) */
|
|
264
|
+
options?: Array<{
|
|
265
|
+
value: any;
|
|
266
|
+
label: string;
|
|
267
|
+
}>;
|
|
268
|
+
/** Validation rules */
|
|
269
|
+
validation: any;
|
|
270
|
+
/** Field description/help text */
|
|
271
|
+
description?: string;
|
|
272
|
+
/** Backend field definition */
|
|
273
|
+
backendField: BackendFieldDefinition;
|
|
274
|
+
/** Field permissions for current user */
|
|
275
|
+
permission: FieldPermission;
|
|
276
|
+
/** Rule classifications for this field */
|
|
277
|
+
rules: {
|
|
278
|
+
validation: string[];
|
|
279
|
+
computation: string[];
|
|
280
|
+
businessLogic: string[];
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Form schema after processing
|
|
285
|
+
*/
|
|
286
|
+
export interface ProcessedSchema {
|
|
287
|
+
/** All fields */
|
|
288
|
+
fields: Record<string, ProcessedField>;
|
|
289
|
+
/** Field names in order */
|
|
290
|
+
fieldOrder: string[];
|
|
291
|
+
/** Computed field names */
|
|
292
|
+
computedFields: string[];
|
|
293
|
+
/** Required field names */
|
|
294
|
+
requiredFields: string[];
|
|
295
|
+
/** Cross-field validation rules */
|
|
296
|
+
crossFieldValidation: ValidationRule[];
|
|
297
|
+
/** Classified rules by type */
|
|
298
|
+
rules: {
|
|
299
|
+
validation: Record<string, ValidationRule>;
|
|
300
|
+
computation: Record<string, ValidationRule>;
|
|
301
|
+
businessLogic: Record<string, ValidationRule>;
|
|
302
|
+
};
|
|
303
|
+
/** Field-to-rule mapping for quick lookup */
|
|
304
|
+
fieldRules: Record<string, {
|
|
305
|
+
validation: string[];
|
|
306
|
+
computation: string[];
|
|
307
|
+
businessLogic: string[];
|
|
308
|
+
}>;
|
|
309
|
+
/** Role permissions */
|
|
310
|
+
rolePermissions?: Record<string, RolePermission>;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* useForm hook return type with flattened state access and strict typing
|
|
314
|
+
*/
|
|
315
|
+
export interface UseFormReturn<T extends Record<string, any> = Record<string, any>> {
|
|
316
|
+
/** Register field for validation and form handling with strict typing */
|
|
317
|
+
register: <K extends Path<T>>(name: K, options?: RegisterOptions<T, K>) => ReturnType<UseFormRegister<T>>;
|
|
318
|
+
/** Handle form submission - automatically uses SDK's submit logic */
|
|
319
|
+
handleSubmit: () => (e?: React.BaseSyntheticEvent) => Promise<void>;
|
|
320
|
+
/** Watch field values with strict typing */
|
|
321
|
+
watch: <K extends Path<T> | readonly Path<T>[]>(name?: K) => K extends Path<T> ? PathValue<T, K> : K extends readonly Path<T>[] ? PathValue<T, K[number]>[] : T;
|
|
322
|
+
/** Set field value programmatically with strict typing */
|
|
323
|
+
setValue: <K extends Path<T>>(name: K, value: PathValue<T, K>, options?: SetValueConfig) => void;
|
|
324
|
+
/** Reset form to default values */
|
|
325
|
+
reset: (values?: T) => void;
|
|
326
|
+
/** Form validation errors - direct access */
|
|
327
|
+
errors: FieldErrors<T>;
|
|
328
|
+
/** Form is valid - direct access */
|
|
329
|
+
isValid: boolean;
|
|
330
|
+
/** Form has been modified - direct access */
|
|
331
|
+
isDirty: boolean;
|
|
332
|
+
/** Form is currently submitting - direct access */
|
|
333
|
+
isSubmitting: boolean;
|
|
334
|
+
/** Form submission was successful - direct access */
|
|
335
|
+
isSubmitSuccessful: boolean;
|
|
336
|
+
/** Form state object (for backward compatibility with existing components) */
|
|
337
|
+
formState: FormState<T>;
|
|
338
|
+
/** Loading initial schema/data */
|
|
339
|
+
isLoadingInitialData: boolean;
|
|
340
|
+
/** Loading record data for update */
|
|
341
|
+
isLoadingRecord: boolean;
|
|
342
|
+
/** Any loading state active */
|
|
343
|
+
isLoading: boolean;
|
|
344
|
+
/** Schema fetch error */
|
|
345
|
+
loadError: Error | null;
|
|
346
|
+
/** Form submission error */
|
|
347
|
+
submitError: Error | null;
|
|
348
|
+
/** Any error active */
|
|
349
|
+
hasError: boolean;
|
|
350
|
+
/** Raw backend schema */
|
|
351
|
+
schema: BackendSchema | null;
|
|
352
|
+
/** Processed schema for rendering */
|
|
353
|
+
processedSchema: ProcessedSchema | null;
|
|
354
|
+
/** Computed field names as typed array */
|
|
355
|
+
computedFields: Array<keyof T>;
|
|
356
|
+
/** Required field names as typed array */
|
|
357
|
+
requiredFields: Array<keyof T>;
|
|
358
|
+
/** Get field metadata with strict typing */
|
|
359
|
+
getField: <K extends keyof T>(fieldName: K) => ProcessedField | null;
|
|
360
|
+
/** Get all fields with strict typing */
|
|
361
|
+
getFields: () => Record<keyof T, ProcessedField>;
|
|
362
|
+
/** Check if field exists with strict typing */
|
|
363
|
+
hasField: <K extends keyof T>(fieldName: K) => boolean;
|
|
364
|
+
/** Check if field is required with strict typing */
|
|
365
|
+
isFieldRequired: <K extends keyof T>(fieldName: K) => boolean;
|
|
366
|
+
/** Check if field is computed with strict typing */
|
|
367
|
+
isFieldComputed: <K extends keyof T>(fieldName: K) => boolean;
|
|
368
|
+
/** Submit form manually */
|
|
369
|
+
submit: () => Promise<void>;
|
|
370
|
+
/** Refresh schema */
|
|
371
|
+
refreshSchema: () => Promise<void>;
|
|
372
|
+
/** Validate form manually */
|
|
373
|
+
validateForm: () => Promise<boolean>;
|
|
374
|
+
/** Clear all errors */
|
|
375
|
+
clearErrors: () => void;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Expression evaluation context with strict typing
|
|
379
|
+
*/
|
|
380
|
+
export interface EvaluationContext<T = Record<string, any>> {
|
|
381
|
+
/** Current form values */
|
|
382
|
+
formValues: Partial<T>;
|
|
383
|
+
/** System values (NOW, TODAY, CURRENT_USER, etc.) */
|
|
384
|
+
systemValues: Record<string, any>;
|
|
385
|
+
/** Reference data cache */
|
|
386
|
+
referenceData: Record<string, any[]>;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Validation result with strict typing
|
|
390
|
+
*/
|
|
391
|
+
export interface ValidationResult<T = Record<string, any>> {
|
|
392
|
+
/** Is validation passing */
|
|
393
|
+
isValid: boolean;
|
|
394
|
+
/** Error message if validation fails */
|
|
395
|
+
message?: string;
|
|
396
|
+
/** Field name that caused error */
|
|
397
|
+
fieldName?: keyof T;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Form submission result
|
|
401
|
+
*/
|
|
402
|
+
export interface SubmissionResult {
|
|
403
|
+
/** Was submission successful */
|
|
404
|
+
success: boolean;
|
|
405
|
+
/** Response data */
|
|
406
|
+
data?: any;
|
|
407
|
+
/** Error if submission failed */
|
|
408
|
+
error?: Error;
|
|
409
|
+
/** Created/updated record ID */
|
|
410
|
+
recordId?: string;
|
|
411
|
+
}
|
|
412
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,IAAI,EACJ,WAAW,IAAI,cAAc,EAC7B,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,IAAI,EACJ,SAAS,EACT,eAAe,EACf,cAAc,EACd,SAAS,EACV,MAAM,iBAAiB,CAAC;AAMzB;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,cAAc,IAAI;IAC3D,CACE,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,SAAS,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAChC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EACA,kBAAkB,GAClB,mBAAmB,GACnB,gBAAgB,GAChB,kBAAkB,GAClB,sBAAsB,GACtB,kBAAkB,GAClB,YAAY,GACZ,SAAS,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC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