@ram_28/kf-ai-sdk 1.0.7 → 1.0.9
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/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/components/hooks/index.d.ts +2 -1
- package/dist/components/hooks/index.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/index.d.ts +3 -3
- package/dist/components/hooks/useFilter/index.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/types.d.ts +83 -109
- package/dist/components/hooks/useFilter/types.d.ts.map +1 -1
- package/dist/components/hooks/useFilter/useFilter.d.ts +1 -1
- package/dist/components/hooks/useFilter/useFilter.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 +86 -93
- package/dist/components/hooks/useForm/types.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/index.d.ts +1 -1
- package/dist/components/hooks/useKanban/index.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/types.d.ts +6 -46
- package/dist/components/hooks/useKanban/types.d.ts.map +1 -1
- package/dist/components/hooks/useKanban/useKanban.d.ts.map +1 -1
- package/dist/components/hooks/useTable/types.d.ts +5 -33
- package/dist/components/hooks/useTable/types.d.ts.map +1 -1
- package/dist/components/hooks/useTable/useTable.d.ts +0 -5
- package/dist/components/hooks/useTable/useTable.d.ts.map +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.mjs +1990 -2234
- package/dist/types/common.d.ts +35 -26
- package/dist/types/common.d.ts.map +1 -1
- package/package.json +1 -1
- package/sdk/api/index.ts +7 -3
- package/sdk/components/hooks/index.ts +24 -4
- package/sdk/components/hooks/useFilter/index.ts +19 -18
- package/sdk/components/hooks/useFilter/types.ts +157 -123
- package/sdk/components/hooks/useFilter/useFilter.ts +259 -393
- 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 +107 -113
- package/sdk/components/hooks/useForm/useForm.ts +54 -54
- package/sdk/components/hooks/useKanban/index.ts +0 -1
- package/sdk/components/hooks/useKanban/types.ts +8 -66
- package/sdk/components/hooks/useKanban/useKanban.ts +14 -75
- package/sdk/components/hooks/useTable/types.ts +7 -60
- package/sdk/components/hooks/useTable/useTable.ts +13 -121
- package/sdk/types/common.ts +42 -26
- package/dist/components/hooks/useFilter/payloadBuilder.utils.d.ts +0 -33
- package/dist/components/hooks/useFilter/payloadBuilder.utils.d.ts.map +0 -1
- package/sdk/components/hooks/useFilter/payloadBuilder.utils.ts +0 -298
package/dist/api/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export type { ResourceClient } from "./client";
|
|
|
3
3
|
export { encodeDatetime, decodeDatetime, encodeDate, decodeDate, } from "./datetime";
|
|
4
4
|
export { getBdoSchema, listMetadata } from "./metadata";
|
|
5
5
|
export type { BackendSchema, MetadataItem, FieldMetadata } from "./metadata";
|
|
6
|
-
export type { SortDirection, SortOption, Sort,
|
|
6
|
+
export type { SortDirection, SortOption, Sort, Condition, ConditionGroup, ConditionGroupOperator, Filter, FilterRHSType, ConditionOperator, FilterCondition, FilterOperator, FilterLogical, FilterNode, ListOptions, ListResponse, ReadResponse, CreateUpdateResponse, DeleteResponse, CountResponse, DateTimeEncoded, DateEncoded, MetricType, MetricField, MetricOptions, MetricResponse, PivotHeaderItem, PivotResponseData, PivotOptions, PivotResponse, DraftResponse, FieldsResponse, } from "../types/common";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sdk/api/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,GAAG,EACH,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EACL,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG7E,YAAY,EAEV,aAAa,EACb,UAAU,EACV,IAAI,EAEJ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../sdk/api/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,GAAG,EACH,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,OAAO,EACL,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG7E,YAAY,EAEV,aAAa,EACb,UAAU,EACV,IAAI,EAEJ,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,MAAM,EACN,aAAa,EACb,iBAAiB,EAEjB,eAAe,EACf,cAAc,EACd,aAAa,EACb,UAAU,EAEV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,aAAa,EAEb,eAAe,EACf,WAAW,EAEX,UAAU,EACV,WAAW,EACX,aAAa,EACb,cAAc,EAEd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,aAAa,EAEb,aAAa,EAEb,cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
export { useFilter } from
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
1
|
+
export { useFilter } from "./useFilter";
|
|
2
|
+
export type { Condition, ConditionGroup, ConditionGroupOperator, Filter, FilterRHSType, UseFilterOptions, UseFilterReturn, FilterCondition, FilterOperator, } from "./types";
|
|
3
|
+
export { isCondition, isConditionGroup, isFilterCondition, isFilterLogical, } from "./types";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useFilter/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useFilter/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,YAAY,EACV,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,eAAe,EAEf,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,WAAW,EACX,gBAAgB,EAEhB,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
|
@@ -1,120 +1,94 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Condition, ConditionGroup, ConditionGroupOperator, Filter, FilterRHSType, FilterCondition, FilterOperator } from "../../../types/common";
|
|
2
|
+
export type { Condition, ConditionGroup, ConditionGroupOperator, Filter, FilterRHSType, FilterCondition, FilterOperator, };
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* Supports both simple conditions and nested logical groups
|
|
4
|
+
* Type guard to check if an item is a ConditionGroup (has nested Condition array)
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
/** Unique identifier for internal management */
|
|
8
|
-
id: string;
|
|
9
|
-
/** Filter operator (can be condition or logical operator) */
|
|
10
|
-
operator: FilterOperator | LogicalOperator;
|
|
11
|
-
/** Left-hand side field name (required for condition operators) */
|
|
12
|
-
lhsField?: string;
|
|
13
|
-
/** Right-hand side value (required for condition operators) */
|
|
14
|
-
rhsValue?: any;
|
|
15
|
-
/** Right-hand side type (defaults to Constant) */
|
|
16
|
-
rhsType?: FilterRHSType;
|
|
17
|
-
/** Nested conditions (for logical operators: And, Or, Not) */
|
|
18
|
-
children?: FilterConditionWithId[];
|
|
19
|
-
/** Validation state */
|
|
20
|
-
isValid: boolean;
|
|
21
|
-
/** Specific validation errors */
|
|
22
|
-
validationErrors?: string[];
|
|
23
|
-
}
|
|
6
|
+
export declare const isConditionGroup: (item: Condition | ConditionGroup) => item is ConditionGroup;
|
|
24
7
|
/**
|
|
25
|
-
* Type
|
|
26
|
-
|
|
8
|
+
* Type guard to check if an item is a leaf Condition (has LHSField)
|
|
9
|
+
*/
|
|
10
|
+
export declare const isCondition: (item: Condition | ConditionGroup) => item is Condition;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `isConditionGroup` instead
|
|
13
|
+
*/
|
|
14
|
+
export declare const isFilterLogical: (item: Condition | ConditionGroup) => item is ConditionGroup;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `isCondition` instead
|
|
17
|
+
*/
|
|
18
|
+
export declare const isFilterCondition: (item: Condition | ConditionGroup) => item is Condition;
|
|
19
|
+
/**
|
|
20
|
+
* Hook options (minimal configuration)
|
|
27
21
|
*/
|
|
28
|
-
export interface TypedFilterConditionInput<T> {
|
|
29
|
-
/** Filter operator (can be condition or logical operator) */
|
|
30
|
-
operator: FilterOperator | LogicalOperator;
|
|
31
|
-
/** Left-hand side field name - constrained to keyof T */
|
|
32
|
-
lhsField?: keyof T & string;
|
|
33
|
-
/** Right-hand side value */
|
|
34
|
-
rhsValue?: T[keyof T] | T[keyof T][] | any;
|
|
35
|
-
/** Right-hand side type (defaults to Constant) */
|
|
36
|
-
rhsType?: FilterRHSType;
|
|
37
|
-
/** Nested conditions (for logical operators: And, Or, Not) */
|
|
38
|
-
children?: TypedFilterConditionInput<T>[];
|
|
39
|
-
}
|
|
40
|
-
export interface FilterState {
|
|
41
|
-
/** Logical operator for combining conditions */
|
|
42
|
-
logicalOperator: LogicalOperator;
|
|
43
|
-
/** Array of filter conditions with IDs */
|
|
44
|
-
conditions: FilterConditionWithId[];
|
|
45
|
-
}
|
|
46
|
-
export interface ValidationResult {
|
|
47
|
-
/** Whether the validation passed */
|
|
48
|
-
isValid: boolean;
|
|
49
|
-
/** Array of error messages */
|
|
50
|
-
errors: string[];
|
|
51
|
-
}
|
|
52
|
-
export interface ValidationError {
|
|
53
|
-
/** ID of the condition with errors */
|
|
54
|
-
conditionId: string;
|
|
55
|
-
/** Field name */
|
|
56
|
-
field: string;
|
|
57
|
-
/** Error message */
|
|
58
|
-
message: string;
|
|
59
|
-
}
|
|
60
22
|
export interface UseFilterOptions {
|
|
61
23
|
/** Initial filter conditions */
|
|
62
|
-
initialConditions?:
|
|
63
|
-
/** Initial
|
|
64
|
-
|
|
65
|
-
/** Whether to validate conditions on change */
|
|
66
|
-
validateOnChange?: boolean;
|
|
67
|
-
/** Callback when condition is added */
|
|
68
|
-
onConditionAdd?: (condition: FilterConditionWithId) => void;
|
|
69
|
-
/** Callback when condition is updated */
|
|
70
|
-
onConditionUpdate?: (condition: FilterConditionWithId) => void;
|
|
71
|
-
/** Callback when condition is removed */
|
|
72
|
-
onConditionRemove?: (conditionId: string) => void;
|
|
73
|
-
/** Callback when validation errors occur */
|
|
74
|
-
onValidationError?: (errors: ValidationError[]) => void;
|
|
24
|
+
initialConditions?: Array<Condition | ConditionGroup>;
|
|
25
|
+
/** Initial operator for combining conditions (defaults to "And") */
|
|
26
|
+
initialOperator?: ConditionGroupOperator;
|
|
75
27
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
validationErrors: ValidationError[];
|
|
87
|
-
/** Add a new filter condition (type-safe: lhsField constrained to keyof T) */
|
|
88
|
-
addCondition: (condition: TypedFilterConditionInput<T>) => string;
|
|
89
|
-
/** Update an existing condition */
|
|
90
|
-
updateCondition: (id: string, updates: Partial<TypedFilterConditionInput<T>>) => boolean;
|
|
91
|
-
/** Remove a condition by ID */
|
|
92
|
-
removeCondition: (id: string) => boolean;
|
|
93
|
-
/** Clear all conditions */
|
|
94
|
-
clearConditions: () => void;
|
|
95
|
-
/** Get a specific condition by ID */
|
|
96
|
-
getCondition: (id: string) => FilterConditionWithId | undefined;
|
|
97
|
-
/** Set the root logical operator */
|
|
98
|
-
setLogicalOperator: (operator: LogicalOperator) => void;
|
|
99
|
-
/** Replace all conditions */
|
|
100
|
-
setConditions: (conditions: FilterConditionWithId[]) => void;
|
|
101
|
-
/** Replace a specific condition */
|
|
102
|
-
replaceCondition: (id: string, newCondition: TypedFilterConditionInput<T>) => boolean;
|
|
103
|
-
/** Validate a single condition */
|
|
104
|
-
validateCondition: (condition: Partial<FilterConditionWithId>) => ValidationResult;
|
|
105
|
-
/** Validate all current conditions */
|
|
106
|
-
validateAllConditions: () => ValidationResult;
|
|
107
|
-
/** Export current filter state */
|
|
108
|
-
exportState: () => FilterState;
|
|
109
|
-
/** Import a filter state */
|
|
110
|
-
importState: (state: FilterState) => void;
|
|
111
|
-
/** Reset to initial state */
|
|
112
|
-
resetToInitial: () => void;
|
|
113
|
-
/** Get total number of conditions */
|
|
114
|
-
getConditionCount: () => number;
|
|
28
|
+
/**
|
|
29
|
+
* Hook return interface with nested filter support
|
|
30
|
+
*/
|
|
31
|
+
export interface UseFilterReturn {
|
|
32
|
+
/** Current operator for combining root-level conditions ("And" | "Or" | "Not") */
|
|
33
|
+
operator: ConditionGroupOperator;
|
|
34
|
+
/** Current filter items (with id populated) */
|
|
35
|
+
items: Array<Condition | ConditionGroup>;
|
|
36
|
+
/** Ready-to-use API payload (id stripped, undefined if no conditions) */
|
|
37
|
+
payload: Filter | undefined;
|
|
115
38
|
/** Whether any conditions exist */
|
|
116
39
|
hasConditions: boolean;
|
|
117
|
-
/**
|
|
118
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Add a leaf condition at root level
|
|
42
|
+
* @returns The id of the created condition
|
|
43
|
+
*/
|
|
44
|
+
add: (condition: Omit<Condition, "id">) => string;
|
|
45
|
+
/**
|
|
46
|
+
* Add a condition group at root level
|
|
47
|
+
* @returns The id of the created group
|
|
48
|
+
*/
|
|
49
|
+
addGroup: (operator: ConditionGroupOperator) => string;
|
|
50
|
+
/**
|
|
51
|
+
* Add a leaf condition to a specific parent group
|
|
52
|
+
* @param parentId - The id of the parent ConditionGroup
|
|
53
|
+
* @returns The id of the created condition
|
|
54
|
+
*/
|
|
55
|
+
addTo: (parentId: string, condition: Omit<Condition, "id">) => string;
|
|
56
|
+
/**
|
|
57
|
+
* Add a condition group to a specific parent group
|
|
58
|
+
* @param parentId - The id of the parent ConditionGroup
|
|
59
|
+
* @returns The id of the created group
|
|
60
|
+
*/
|
|
61
|
+
addGroupTo: (parentId: string, operator: ConditionGroupOperator) => string;
|
|
62
|
+
/**
|
|
63
|
+
* Update a leaf condition by id
|
|
64
|
+
* @param id - The id of the condition to update
|
|
65
|
+
* @param updates - Partial updates to apply
|
|
66
|
+
*/
|
|
67
|
+
update: (id: string, updates: Partial<Omit<Condition, "id">>) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Update a condition group's operator by id
|
|
70
|
+
* @param id - The id of the group to update
|
|
71
|
+
* @param operator - The new operator
|
|
72
|
+
*/
|
|
73
|
+
updateOperator: (id: string, operator: ConditionGroupOperator) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Remove a condition or group by id
|
|
76
|
+
* @param id - The id of the item to remove
|
|
77
|
+
*/
|
|
78
|
+
remove: (id: string) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Get a condition or group by id
|
|
81
|
+
* @param id - The id to look up
|
|
82
|
+
* @returns The item or undefined if not found
|
|
83
|
+
*/
|
|
84
|
+
get: (id: string) => Condition | ConditionGroup | undefined;
|
|
85
|
+
/** Clear all conditions */
|
|
86
|
+
clear: () => void;
|
|
87
|
+
/** Set the root operator for combining conditions */
|
|
88
|
+
setOperator: (op: ConditionGroupOperator) => void;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated Use `items` instead
|
|
91
|
+
*/
|
|
92
|
+
conditions: Array<Condition | ConditionGroup>;
|
|
119
93
|
}
|
|
120
94
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useFilter/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useFilter/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,MAAM,EACN,aAAa,EAEb,eAAe,EACf,cAAc,EACf,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,MAAM,EACN,aAAa,EAEb,eAAe,EACf,cAAc,GACf,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,SAAS,GAAG,cAAc,KAC/B,IAAI,IAAI,cAEV,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,MAAM,SAAS,GAAG,cAAc,KAC/B,IAAI,IAAI,SAEV,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,eAAe,SArBpB,SAAS,GAAG,cAAc,KAC/B,IAAI,IAAI,cAoBoC,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,iBAAiB,SAjBtB,SAAS,GAAG,cAAc,KAC/B,IAAI,IAAI,SAgBiC,CAAC;AAM7C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,cAAc,CAAC,CAAC;IACtD,oEAAoE;IACpE,eAAe,CAAC,EAAE,sBAAsB,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAK9B,kFAAkF;IAClF,QAAQ,EAAE,sBAAsB,CAAC;IAEjC,+CAA+C;IAC/C,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,cAAc,CAAC,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"./types";
|
|
2
|
-
export declare function useFilter
|
|
2
|
+
export declare function useFilter(options?: UseFilterOptions): UseFilterReturn;
|
|
3
3
|
//# sourceMappingURL=useFilter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFilter.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useFilter/useFilter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFilter.d.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useFilter/useFilter.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA6KjE,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CA8JzE"}
|
|
@@ -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.ts","sourceRoot":"","sources":["../../../../sdk/components/hooks/useForm/apiClient.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAM1E;;GAEG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAmBxE;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,MAAU,GACrB,OAAO,CAAC,SAAS,CAAC,CAmBpB;AAMD;;GAEG;AACH,wBAAsB,WAAW,CAAC,CAAC,GAAG,GAAG,EACvC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,CAAC,CAAC,CAUZ;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,CAAC,GAAG,GAAG,EAC1C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,gBAAgB,CAAC,CAoC3B;AAMD;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,cAAc,EAAE,MAAM,EACtB,MAAM,GAAE,MAAM,EAAY,EAC1B,OAAO,CAAC,EAAE,GAAG,EACb,IAAI,CAAC,EAAE,GAAG,GACT,OAAO,CAAC,GAAG,EAAE,CAAC,CA0BhB;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE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,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,c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|
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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cAAc,CAAC,EAAE,CAAC,GACjB,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAIjC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAGD,OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE,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"}
|