@judo/actions 0.1.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 +277 -0
- package/README.md +257 -0
- package/dist/api/constants.d.ts +27 -0
- package/dist/api/constants.d.ts.map +1 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/judo-rest-api.d.ts +262 -0
- package/dist/api/judo-rest-api.d.ts.map +1 -0
- package/dist/api/model-converters.d.ts +29 -0
- package/dist/api/model-converters.d.ts.map +1 -0
- package/dist/api/path-builder.d.ts +50 -0
- package/dist/api/path-builder.d.ts.map +1 -0
- package/dist/api/transfer-deserializer.d.ts +46 -0
- package/dist/api/transfer-deserializer.d.ts.map +1 -0
- package/dist/api/transfer-serializer.d.ts +85 -0
- package/dist/api/transfer-serializer.d.ts.map +1 -0
- package/dist/api/types.d.ts +278 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/handlers/autocomplete/autocomplete-handlers.d.ts +20 -0
- package/dist/handlers/autocomplete/autocomplete-handlers.d.ts.map +1 -0
- package/dist/handlers/autocomplete/index.d.ts +2 -0
- package/dist/handlers/autocomplete/index.d.ts.map +1 -0
- package/dist/handlers/crud/crud-handlers.d.ts +76 -0
- package/dist/handlers/crud/crud-handlers.d.ts.map +1 -0
- package/dist/handlers/crud/index.d.ts +2 -0
- package/dist/handlers/crud/index.d.ts.map +1 -0
- package/dist/handlers/form/form-handlers.d.ts +28 -0
- package/dist/handlers/form/form-handlers.d.ts.map +1 -0
- package/dist/handlers/form/index.d.ts +2 -0
- package/dist/handlers/form/index.d.ts.map +1 -0
- package/dist/handlers/index.d.ts +10 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/navigation/index.d.ts +2 -0
- package/dist/handlers/navigation/index.d.ts.map +1 -0
- package/dist/handlers/navigation/navigation-handlers.d.ts +23 -0
- package/dist/handlers/navigation/navigation-handlers.d.ts.map +1 -0
- package/dist/handlers/operation/index.d.ts +2 -0
- package/dist/handlers/operation/index.d.ts.map +1 -0
- package/dist/handlers/operation/operation-handlers.d.ts +43 -0
- package/dist/handlers/operation/operation-handlers.d.ts.map +1 -0
- package/dist/handlers/other/index.d.ts +2 -0
- package/dist/handlers/other/index.d.ts.map +1 -0
- package/dist/handlers/other/other-handlers.d.ts +10 -0
- package/dist/handlers/other/other-handlers.d.ts.map +1 -0
- package/dist/handlers/relation/index.d.ts +2 -0
- package/dist/handlers/relation/index.d.ts.map +1 -0
- package/dist/handlers/relation/relation-handlers.d.ts +49 -0
- package/dist/handlers/relation/relation-handlers.d.ts.map +1 -0
- package/dist/handlers/selector/index.d.ts +2 -0
- package/dist/handlers/selector/index.d.ts.map +1 -0
- package/dist/handlers/selector/selector-handlers.d.ts +30 -0
- package/dist/handlers/selector/selector-handlers.d.ts.map +1 -0
- package/dist/handlers/table/index.d.ts +2 -0
- package/dist/handlers/table/index.d.ts.map +1 -0
- package/dist/handlers/table/table-handlers.d.ts +18 -0
- package/dist/handlers/table/table-handlers.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-action-dispatcher.d.ts +61 -0
- package/dist/hooks/use-action-dispatcher.d.ts.map +1 -0
- package/dist/hooks/use-action-handler.d.ts +29 -0
- package/dist/hooks/use-action-handler.d.ts.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1427 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle/execute-with-lifecycle.d.ts +20 -0
- package/dist/lifecycle/execute-with-lifecycle.d.ts.map +1 -0
- package/dist/lifecycle/index.d.ts +2 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/provider/api-context.d.ts +30 -0
- package/dist/provider/api-context.d.ts.map +1 -0
- package/dist/provider/index.d.ts +2 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/registry/action-handler-registry.d.ts +11 -0
- package/dist/registry/action-handler-registry.d.ts.map +1 -0
- package/dist/registry/index.d.ts +2 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/types-BsQmyhQI.js +14 -0
- package/dist/types-BsQmyhQI.js.map +1 -0
- package/dist/types-CbA9-fcJ.js +2 -0
- package/dist/types.d.ts +260 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JUDO REST API types.
|
|
3
|
+
* Based on REST_REQUEST_MAPPING_SPECIFICATION.md
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* HTTP method types used in the REST layer.
|
|
7
|
+
* GET is used for template retrieval, file downloads, metadata, principal.
|
|
8
|
+
* POST is used for all other operations (CRUD, list, range, operations, validation).
|
|
9
|
+
*/
|
|
10
|
+
export type HttpMethod = "GET" | "POST";
|
|
11
|
+
/**
|
|
12
|
+
* Response type indicating how to handle the response body.
|
|
13
|
+
*/
|
|
14
|
+
export type ResponseType = "json" | "blob";
|
|
15
|
+
/**
|
|
16
|
+
* How to deserialize the response.
|
|
17
|
+
* - single: Deserialize as a single transfer
|
|
18
|
+
* - array: Deserialize as an array of transfers
|
|
19
|
+
* - void: No deserialization needed (response is empty)
|
|
20
|
+
* - nullable: Deserialize as single transfer or null
|
|
21
|
+
*/
|
|
22
|
+
export type DeserializationType = "single" | "array" | "void" | "nullable";
|
|
23
|
+
/**
|
|
24
|
+
* Service type categories.
|
|
25
|
+
*/
|
|
26
|
+
export type ServiceType = "class" | "relation" | "access";
|
|
27
|
+
/**
|
|
28
|
+
* Configuration for deserializing the response.
|
|
29
|
+
*/
|
|
30
|
+
export interface ResponseDeserializerConfig {
|
|
31
|
+
/** Type of deserialization to apply */
|
|
32
|
+
type: DeserializationType;
|
|
33
|
+
/** Target class FQName for deserialization (if applicable) */
|
|
34
|
+
targetClassFqName?: string;
|
|
35
|
+
/** Whether the target is a stored (persisted) transfer */
|
|
36
|
+
isStored: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Transfer serializer interface for transforming transfers before sending.
|
|
40
|
+
* The input type is unknown to support any transfer type.
|
|
41
|
+
*/
|
|
42
|
+
export interface TransferSerializer {
|
|
43
|
+
/** Serialize an transfer for sending in request body */
|
|
44
|
+
serialize(transfer: unknown): unknown;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Transfer deserializer interface for transforming responses.
|
|
48
|
+
* The output type is unknown to support any transfer type.
|
|
49
|
+
*/
|
|
50
|
+
export interface TransferDeserializer {
|
|
51
|
+
/** Deserialize a response into an transfer */
|
|
52
|
+
deserialize(data: unknown): unknown;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Classification of temporal (date/time) field types.
|
|
56
|
+
*
|
|
57
|
+
* - `date`: Date-only value (`YYYY-MM-DD`) — converted to `Date` at local midnight
|
|
58
|
+
* - `time`: Time-only value (`HH:mm[:ss]`) — kept as `string` (no `Date` conversion)
|
|
59
|
+
* - `timestamp`: Full datetime with timezone (`YYYY-MM-DDTHH:mm:ss[.SSS]Z`) — converted to `Date`
|
|
60
|
+
*/
|
|
61
|
+
export type TemporalFieldType = "date" | "time" | "timestamp";
|
|
62
|
+
/**
|
|
63
|
+
* Registry mapping transfer type FQNs to their temporal field declarations.
|
|
64
|
+
*
|
|
65
|
+
* Keys match `__entityType` values from API responses (e.g., `"Demo::OrderDTO"`).
|
|
66
|
+
* Values map field names to their temporal type for serialization/deserialization.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const registry: TemporalFieldRegistry = {
|
|
71
|
+
* "Demo::OrderDTO": { orderDate: "date", createdAt: "timestamp" },
|
|
72
|
+
* "Demo::MissionDTO": { startDate: "date", endDate: "date" },
|
|
73
|
+
* };
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export type TemporalFieldRegistry = Record<string, Record<string, TemporalFieldType>>;
|
|
77
|
+
/**
|
|
78
|
+
* Configuration for JUDO REST API client.
|
|
79
|
+
*/
|
|
80
|
+
export interface JudoRestApiConfig {
|
|
81
|
+
/** Base URL for the API (e.g., http://localhost:8080) */
|
|
82
|
+
baseUrl: string;
|
|
83
|
+
/** Application base path (e.g., /api) */
|
|
84
|
+
basePath: string;
|
|
85
|
+
/** Application model name (e.g., edemokracia) */
|
|
86
|
+
modelName: string;
|
|
87
|
+
/** Actor path (e.g., admin/Admin) */
|
|
88
|
+
actorPath: string;
|
|
89
|
+
/** Request timeout in milliseconds */
|
|
90
|
+
timeout?: number;
|
|
91
|
+
/** Default headers to include in all requests */
|
|
92
|
+
defaultHeaders?: Record<string, string>;
|
|
93
|
+
/** Optional custom fetch implementation */
|
|
94
|
+
fetch?: typeof fetch;
|
|
95
|
+
/** Optional request interceptor */
|
|
96
|
+
onRequest?: (request: RequestInit) => RequestInit | Promise<RequestInit>;
|
|
97
|
+
/** Optional response interceptor */
|
|
98
|
+
onResponse?: (response: Response) => Response | Promise<Response>;
|
|
99
|
+
/** Optional error handler */
|
|
100
|
+
onError?: (error: Error) => void;
|
|
101
|
+
/**
|
|
102
|
+
* Optional transfer serializer for transforming transfers before sending.
|
|
103
|
+
* If not provided, transfers are sent as-is (JSON.stringify).
|
|
104
|
+
*/
|
|
105
|
+
transferSerializer?: TransferSerializer;
|
|
106
|
+
/**
|
|
107
|
+
* Optional transfer deserializer for transforming responses.
|
|
108
|
+
* If not provided, responses are used as-is (JSON.parse result).
|
|
109
|
+
*/
|
|
110
|
+
transferDeserializer?: TransferDeserializer;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Query customizer for list/get operations.
|
|
114
|
+
*/
|
|
115
|
+
export interface QueryCustomizer {
|
|
116
|
+
_mask?: string;
|
|
117
|
+
_orderBy?: Array<{
|
|
118
|
+
attribute: string;
|
|
119
|
+
descending?: boolean;
|
|
120
|
+
}>;
|
|
121
|
+
_seek?: {
|
|
122
|
+
limit?: number;
|
|
123
|
+
lastItem?: unknown;
|
|
124
|
+
};
|
|
125
|
+
_filter?: unknown;
|
|
126
|
+
_identifier?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Base transfer data interface.
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
export interface TransferData {
|
|
133
|
+
[key: string]: unknown;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Strict transfer data — a TransferData whose *own* properties conform to `T`.
|
|
137
|
+
*
|
|
138
|
+
* Use in generated code and userland APIs where the exact field set is known.
|
|
139
|
+
*
|
|
140
|
+
* @typeParam T - Strict field definitions (e.g. `{ name: string; age: number }`)
|
|
141
|
+
*/
|
|
142
|
+
export type StrictTransferData<T extends Record<string, unknown> = Record<string, unknown>> = TransferData & T;
|
|
143
|
+
/**
|
|
144
|
+
* Stored transfer with identifiers.
|
|
145
|
+
*/
|
|
146
|
+
export interface TransferStored extends TransferData {
|
|
147
|
+
__identifier?: string;
|
|
148
|
+
__signedIdentifier?: string;
|
|
149
|
+
__typename?: string;
|
|
150
|
+
__entityType?: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Strict stored transfer — a TransferStored with compile-time field types from `T`.
|
|
154
|
+
*
|
|
155
|
+
* @typeParam T - Strict field definitions
|
|
156
|
+
*/
|
|
157
|
+
export type StrictTransferStored<T extends Record<string, unknown> = Record<string, unknown>> = TransferStored & T;
|
|
158
|
+
/**
|
|
159
|
+
* Response wrapper for JUDO REST responses.
|
|
160
|
+
*/
|
|
161
|
+
export interface JudoRestResponse<T> {
|
|
162
|
+
data: T;
|
|
163
|
+
status: number;
|
|
164
|
+
headers: Headers;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Path context for building REST paths.
|
|
168
|
+
*/
|
|
169
|
+
export interface PathContext {
|
|
170
|
+
/** Package name tokens (e.g., ["admin"]) */
|
|
171
|
+
packageNameTokens: string[];
|
|
172
|
+
/** Simple name (e.g., "Issue") */
|
|
173
|
+
simpleName: string;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Class type metadata for path building.
|
|
177
|
+
*/
|
|
178
|
+
export interface ClassTypeMetadata extends PathContext {
|
|
179
|
+
/** Fully qualified name */
|
|
180
|
+
fqName?: string;
|
|
181
|
+
/** Whether the class is mapped */
|
|
182
|
+
isMapped?: boolean;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Relation type metadata for path building.
|
|
186
|
+
*/
|
|
187
|
+
export interface RelationMetadata {
|
|
188
|
+
/** Relation name */
|
|
189
|
+
name: string;
|
|
190
|
+
/** Owner class metadata */
|
|
191
|
+
owner: ClassTypeMetadata;
|
|
192
|
+
/** Target class metadata */
|
|
193
|
+
target: ClassTypeMetadata;
|
|
194
|
+
/** Whether this is an access relation */
|
|
195
|
+
isAccess?: boolean;
|
|
196
|
+
/** Whether this is a collection relation */
|
|
197
|
+
isCollection?: boolean;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Operation type metadata.
|
|
201
|
+
*/
|
|
202
|
+
export interface OperationMetadata {
|
|
203
|
+
/** Operation name */
|
|
204
|
+
name: string;
|
|
205
|
+
/** Whether the operation is static */
|
|
206
|
+
isStatic?: boolean;
|
|
207
|
+
/** Whether the operation is mapped */
|
|
208
|
+
isMapped?: boolean;
|
|
209
|
+
/** Whether the operation has input */
|
|
210
|
+
hasInput?: boolean;
|
|
211
|
+
/** Whether the operation has output */
|
|
212
|
+
hasOutput?: boolean;
|
|
213
|
+
/** Input type metadata */
|
|
214
|
+
inputType?: ClassTypeMetadata;
|
|
215
|
+
/** Output type metadata */
|
|
216
|
+
outputType?: ClassTypeMetadata;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Range request body structure.
|
|
220
|
+
*/
|
|
221
|
+
export interface RangeRequestBody {
|
|
222
|
+
owner?: TransferStored;
|
|
223
|
+
queryCustomizer?: QueryCustomizer;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Validation feedback item from REST API.
|
|
227
|
+
* Returned in response body for 400 validation errors.
|
|
228
|
+
*/
|
|
229
|
+
export interface FeedbackItem {
|
|
230
|
+
/** Error code identifier */
|
|
231
|
+
code: string;
|
|
232
|
+
/** Severity level of the feedback */
|
|
233
|
+
level: "ERROR" | "WARNING" | "INFO";
|
|
234
|
+
/**
|
|
235
|
+
* Location of the error - typically the attribute path.
|
|
236
|
+
* For nested properties, format is: "relationName.attributeName"
|
|
237
|
+
* For simple attributes, format is: "attributeName"
|
|
238
|
+
*/
|
|
239
|
+
location: string;
|
|
240
|
+
/** Human-readable error message */
|
|
241
|
+
message?: string;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Validation error thrown when API returns 400 status.
|
|
245
|
+
* Contains array of FeedbackItem with field-level error details.
|
|
246
|
+
*/
|
|
247
|
+
export declare class ValidationError extends Error {
|
|
248
|
+
readonly feedbackItems: FeedbackItem[];
|
|
249
|
+
readonly status: number;
|
|
250
|
+
constructor(feedbackItems: FeedbackItem[]);
|
|
251
|
+
/**
|
|
252
|
+
* Get errors as a map of field location to error message.
|
|
253
|
+
* Useful for setting form field errors.
|
|
254
|
+
*/
|
|
255
|
+
toFieldErrors(): Record<string, string>;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Result type for dialog submission.
|
|
259
|
+
* Used for create dialogs opened from eager/lazy components.
|
|
260
|
+
*/
|
|
261
|
+
export type DialogResult<T = TransferData> = {
|
|
262
|
+
outcome: "cancel";
|
|
263
|
+
} | {
|
|
264
|
+
outcome: "submit";
|
|
265
|
+
data: T;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Callback for dialog submission.
|
|
269
|
+
* Called when user submits the create form.
|
|
270
|
+
*/
|
|
271
|
+
export type OnDialogSubmit<T = TransferData> = (data: T) => Promise<void>;
|
|
272
|
+
/**
|
|
273
|
+
* Callback for dialog validation.
|
|
274
|
+
* Called before submission to validate form data.
|
|
275
|
+
* Returns field errors or null if valid.
|
|
276
|
+
*/
|
|
277
|
+
export type OnDialogValidate<T = TransferData> = (data: T) => Promise<Record<string, string> | null>;
|
|
278
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAM1D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,uCAAuC;IACvC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0DAA0D;IAC1D,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,wDAAwD;IACxD,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,8CAA8C;IAC9C,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;CACpC;AAMD;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;AAE9D;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAMtF;;GAEG;AACH,MAAM,WAAW,iBAA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CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC;AAEpG;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,YAAY,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,YAAY,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ActionHandlerHookWithMeta } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Handle autocomplete range query - hook factory.
|
|
4
|
+
* Fetches range data for autocomplete via REST API.
|
|
5
|
+
* Supports both legacy callback mode and API mode.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useAutocompleteRangeActionHandler: ActionHandlerHookWithMeta;
|
|
8
|
+
/**
|
|
9
|
+
* Handle autocomplete set action - hook factory.
|
|
10
|
+
* Sets a single-valued relation via autocomplete selection.
|
|
11
|
+
* Supports both legacy callback mode and API mode.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useAutocompleteSetActionHandler: ActionHandlerHookWithMeta;
|
|
14
|
+
/**
|
|
15
|
+
* Handle autocomplete add action - hook factory.
|
|
16
|
+
* Adds selected transfers to a collection relation via autocomplete.
|
|
17
|
+
* Supports both legacy callback mode and API mode.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useAutocompleteAddActionHandler: ActionHandlerHookWithMeta;
|
|
20
|
+
//# sourceMappingURL=autocomplete-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete-handlers.d.ts","sourceRoot":"","sources":["../../../src/handlers/autocomplete/autocomplete-handlers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAU,yBAAyB,EAA6B,MAAM,aAAa,CAAC;AAoChG;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,EA4CxC,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAkCtC,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAmCtC,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/autocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,+BAA+B,GAC/B,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ActionHandlerHookWithMeta } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Handle data refresh - hook factory.
|
|
4
|
+
* Calls REST API to refresh transfer data OR list relation data.
|
|
5
|
+
*
|
|
6
|
+
* Three modes:
|
|
7
|
+
* 1. Access relation list: When action.ownerDataElement is an access RelationType (top-level table)
|
|
8
|
+
* 2. Transfer relation list: When action.ownerDataElement is a non-access RelationType with owner transfer
|
|
9
|
+
* 3. Single transfer refresh: When context.transfer has an identifier
|
|
10
|
+
*
|
|
11
|
+
* Supports both legacy callback mode and API mode.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useRefreshActionHandler: ActionHandlerHookWithMeta;
|
|
14
|
+
/**
|
|
15
|
+
* Handle transfer create - hook factory.
|
|
16
|
+
*
|
|
17
|
+
* Create behavior varies based on context:
|
|
18
|
+
*
|
|
19
|
+
* 1. **Eager components** (isEager=true):
|
|
20
|
+
* - Validates data via validateCreateRelation API if relation is provided
|
|
21
|
+
* - If validation fails, sets field errors via validation context (dialog stays open)
|
|
22
|
+
* - If validation passes, returns data to caller (no REST create call)
|
|
23
|
+
* - Caller (table/link) adds transfer to local __items array
|
|
24
|
+
* - Transfer is persisted when parent is saved
|
|
25
|
+
*
|
|
26
|
+
* 2. **Lazy components** (isEager=false, default):
|
|
27
|
+
* - Validates data via validateCreateRelation API
|
|
28
|
+
* - If validation fails, sets field errors via validation context (dialog stays open)
|
|
29
|
+
* - If validation passes, creates transfer via createRelation API
|
|
30
|
+
* - BLOCKED if on a FORM page (forms save all data together)
|
|
31
|
+
* - BLOCKED if on a VIEW page that is in edit mode (unsaved changes)
|
|
32
|
+
*
|
|
33
|
+
* After creation, optionally navigates to view page based on autoOpenAfterCreate.
|
|
34
|
+
*
|
|
35
|
+
* Supports both legacy callback mode and API mode.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useCreateActionHandler: ActionHandlerHookWithMeta;
|
|
38
|
+
/**
|
|
39
|
+
* Handle transfer update - hook factory.
|
|
40
|
+
* Updates an existing transfer via REST API.
|
|
41
|
+
* Supports both legacy callback mode and API mode.
|
|
42
|
+
*
|
|
43
|
+
* In eager mode (aggregated child transfers opened from an eager table):
|
|
44
|
+
* - Skips REST API calls entirely
|
|
45
|
+
* - Updates the parent transfer's relation array with the modified transfer data
|
|
46
|
+
* - The actual persistence happens when the aggregate root (parent) is saved
|
|
47
|
+
*/
|
|
48
|
+
export declare const useUpdateActionHandler: ActionHandlerHookWithMeta;
|
|
49
|
+
/**
|
|
50
|
+
* Handle transfer delete - hook factory.
|
|
51
|
+
* Deletes an transfer via REST API.
|
|
52
|
+
* Supports both legacy callback mode and API mode.
|
|
53
|
+
*/
|
|
54
|
+
export declare const useDeleteActionHandler: ActionHandlerHookWithMeta;
|
|
55
|
+
/**
|
|
56
|
+
* Handle bulk delete - hook factory.
|
|
57
|
+
* Deletes multiple selected transfers via REST API.
|
|
58
|
+
* Supports both legacy callback mode and API mode.
|
|
59
|
+
*/
|
|
60
|
+
export declare const useBulkDeleteActionHandler: ActionHandlerHookWithMeta;
|
|
61
|
+
/**
|
|
62
|
+
* Handle single row delete from table - hook factory.
|
|
63
|
+
* Deletes a single transfer from a table row via REST API.
|
|
64
|
+
* Supports both legacy callback mode and API mode.
|
|
65
|
+
*/
|
|
66
|
+
export declare const useRowDeleteActionHandler: ActionHandlerHookWithMeta;
|
|
67
|
+
/**
|
|
68
|
+
* Get template for new transfer - hook factory.
|
|
69
|
+
* Fetches default values for a new transfer via REST API.
|
|
70
|
+
* Supports both legacy callback mode and API mode.
|
|
71
|
+
*
|
|
72
|
+
* Stores template data using pageTransferId from context (if available) or "new" as fallback.
|
|
73
|
+
* This ensures the form bindings can find the data at the correct transfer ID.
|
|
74
|
+
*/
|
|
75
|
+
export declare const useGetTemplateActionHandler: ActionHandlerHookWithMeta;
|
|
76
|
+
//# sourceMappingURL=crud-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crud-handlers.d.ts","sourceRoot":"","sources":["../../../src/handlers/crud/crud-handlers.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAU,yBAAyB,EAA6B,MAAM,aAAa,CAAC;AAyJhG;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAqS9B,yBAAyB,CAAC;AAShC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,sBAAsB,EAuO7B,yBAAyB,CAAC;AAGhC;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAgI7B,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAsC7B,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAwCjC,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAmFhC,yBAAyB,CAAC;AAGhC;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,EA4BlC,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/crud/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,GAC3B,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ActionHandlerHookWithMeta } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Handle form open for editing - hook factory.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useOpenFormActionHandler: ActionHandlerHookWithMeta;
|
|
6
|
+
/**
|
|
7
|
+
* Handle form open for create - hook factory.
|
|
8
|
+
*
|
|
9
|
+
* Creates a dialog for creating new transfers. The behavior depends on the source component:
|
|
10
|
+
*
|
|
11
|
+
* **Eager Components** (tables/links with isEager=true):
|
|
12
|
+
* - Dialog submission returns data to the caller
|
|
13
|
+
* - Caller (table/link) adds transfer to local __items array
|
|
14
|
+
* - No REST call until parent transfer is saved
|
|
15
|
+
* - onSubmitCreate callback is provided in dialog params
|
|
16
|
+
*
|
|
17
|
+
* **Lazy Components** (default):
|
|
18
|
+
* - Dialog submission calls validateCreateRelation API
|
|
19
|
+
* - If validation passes, calls createRelation API
|
|
20
|
+
* - If validation fails, displays field errors and stays open
|
|
21
|
+
* - After successful create, caller is notified via onDialogClose callback
|
|
22
|
+
*/
|
|
23
|
+
export declare const useOpenCreateFormActionHandler: ActionHandlerHookWithMeta;
|
|
24
|
+
/**
|
|
25
|
+
* Handle form open for operation input - hook factory.
|
|
26
|
+
*/
|
|
27
|
+
export declare const useOpenOperationInputFormActionHandler: ActionHandlerHookWithMeta;
|
|
28
|
+
//# sourceMappingURL=form-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-handlers.d.ts","sourceRoot":"","sources":["../../../src/handlers/form/form-handlers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,yBAAyB,EAA2C,MAAM,aAAa,CAAC;AAE9G;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAc/B,yBAAyB,CAAC;AAGhC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,8BAA8B,EAiDrC,yBAAyB,CAAC;AAGhC;;GAEG;AACH,eAAO,MAAM,sCAAsC,EAoB7C,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,wBAAwB,EACxB,8BAA8B,EAC9B,sCAAsC,GACtC,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { useBackActionHandler, useOpenPageActionHandler, useRowOpenPageActionHandler, useCancelActionHandler, } from './navigation/index';
|
|
2
|
+
export { useOpenFormActionHandler, useOpenCreateFormActionHandler, useOpenOperationInputFormActionHandler, } from './form/index';
|
|
3
|
+
export { useOpenSelectorActionHandler, useOpenAddSelectorActionHandler, useOpenSetSelectorActionHandler, useOpenOperationInputSelectorActionHandler, useSelectorRangeActionHandler, } from './selector/index';
|
|
4
|
+
export { useRefreshActionHandler, useCreateActionHandler, useUpdateActionHandler, useDeleteActionHandler, useBulkDeleteActionHandler, useRowDeleteActionHandler, useGetTemplateActionHandler, } from './crud/index';
|
|
5
|
+
export { useSetActionHandler, useUnsetActionHandler, useAddActionHandler, useRemoveActionHandler, useBulkRemoveActionHandler, useClearActionHandler, useRefreshRelationActionHandler, useFilterRelationActionHandler, } from './relation/index';
|
|
6
|
+
export { useFilterActionHandler, useExportActionHandler, useInlineCreateRowActionHandler } from './table/index';
|
|
7
|
+
export { useCallOperationActionHandler, useBulkCallOperationActionHandler, useInputFormCallOperationActionHandler, useInputSelectorCallOperationActionHandler, useParameterlessCallOperationActionHandler, } from './operation/index';
|
|
8
|
+
export { useAutocompleteRangeActionHandler, useAutocompleteSetActionHandler, useAutocompleteAddActionHandler, } from './autocomplete/index';
|
|
9
|
+
export { usePreFetchActionHandler, useCustomActionHandler } from './other/index';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACN,wBAAwB,EACxB,8BAA8B,EAC9B,sCAAsC,GACtC,MAAM,cAAc,CAAC;AAGtB,OAAO,EACN,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,0CAA0C,EAC1C,6BAA6B,GAC7B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,GAC3B,MAAM,cAAc,CAAC;AAGtB,OAAO,EACN,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,+BAA+B,EAC/B,8BAA8B,GAC9B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAGhH,OAAO,EACN,6BAA6B,EAC7B,iCAAiC,EACjC,sCAAsC,EACtC,0CAA0C,EAC1C,0CAA0C,GAC1C,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,+BAA+B,GAC/B,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,GACtB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ActionHandlerHookWithMeta } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Handle back navigation - hook factory.
|
|
4
|
+
*/
|
|
5
|
+
export declare const useBackActionHandler: ActionHandlerHookWithMeta;
|
|
6
|
+
/**
|
|
7
|
+
* Handle page navigation - hook factory.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useOpenPageActionHandler: ActionHandlerHookWithMeta;
|
|
10
|
+
/**
|
|
11
|
+
* Handle row-based page navigation (from table row) - hook factory.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useRowOpenPageActionHandler: ActionHandlerHookWithMeta;
|
|
14
|
+
/**
|
|
15
|
+
* Handle cancel action (close dialog or go back) - hook factory.
|
|
16
|
+
*
|
|
17
|
+
* Behavior depends on context:
|
|
18
|
+
* - In a dialog: closes the dialog
|
|
19
|
+
* - On a VIEW page with edits: resets transfer to original data (no navigation)
|
|
20
|
+
* - Otherwise: navigates back
|
|
21
|
+
*/
|
|
22
|
+
export declare const useCancelActionHandler: ActionHandlerHookWithMeta;
|
|
23
|
+
//# sourceMappingURL=navigation-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-handlers.d.ts","sourceRoot":"","sources":["../../../src/handlers/navigation/navigation-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,yBAAyB,EAA6B,MAAM,aAAa,CAAC;AAEhG;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAY3B,yBAAyB,CAAC;AAGhC;;GAEG;AACH,eAAO,MAAM,wBAAwB,EA8B/B,yBAAyB,CAAC;AAGhC;;GAEG;AACH,eAAO,MAAM,2BAA2B,EA8BlC,yBAAyB,CAAC;AAGhC;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAmB7B,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/operation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,6BAA6B,EAC7B,iCAAiC,EACjC,sCAAsC,EACtC,0CAA0C,EAC1C,0CAA0C,GAC1C,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ActionHandlerHookWithMeta } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Handle operation calls - hook factory.
|
|
4
|
+
* Calls a bound operation via REST API.
|
|
5
|
+
* Supports both legacy callback mode and API mode.
|
|
6
|
+
* Opens output dialog if operation returns data and action has targetPageDefinition.
|
|
7
|
+
* Shows success toast on success, error toast on failure.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useCallOperationActionHandler: ActionHandlerHookWithMeta;
|
|
10
|
+
/**
|
|
11
|
+
* Handle bulk operation calls - hook factory.
|
|
12
|
+
* Calls an operation on multiple selected transfers.
|
|
13
|
+
* Supports both legacy callback mode and API mode.
|
|
14
|
+
* Shows success toast on success, error toast on failure.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useBulkCallOperationActionHandler: ActionHandlerHookWithMeta;
|
|
17
|
+
/**
|
|
18
|
+
* Handle operation with input form - hook factory.
|
|
19
|
+
* Calls an operation with form data as input.
|
|
20
|
+
* Supports both legacy callback mode and API mode.
|
|
21
|
+
* Opens output dialog if operation returns data and action has targetPageDefinition.
|
|
22
|
+
* Shows success toast on success, error toast on failure.
|
|
23
|
+
* Only closes dialog on success.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useInputFormCallOperationActionHandler: ActionHandlerHookWithMeta;
|
|
26
|
+
/**
|
|
27
|
+
* Handle operation with input selector - hook factory.
|
|
28
|
+
* Calls an operation with selected transfer as input.
|
|
29
|
+
* Supports both legacy callback mode and API mode.
|
|
30
|
+
* Opens output dialog if operation returns data and action has targetPageDefinition.
|
|
31
|
+
* Shows success toast on success, error toast on failure.
|
|
32
|
+
* Only closes dialog on success.
|
|
33
|
+
*/
|
|
34
|
+
export declare const useInputSelectorCallOperationActionHandler: ActionHandlerHookWithMeta;
|
|
35
|
+
/**
|
|
36
|
+
* Handle parameterless operation calls - hook factory.
|
|
37
|
+
* Calls an operation with no input.
|
|
38
|
+
* Supports both legacy callback mode and API mode.
|
|
39
|
+
* Opens output dialog if operation returns data and action has targetPageDefinition.
|
|
40
|
+
* Shows success toast on success, error toast on failure.
|
|
41
|
+
*/
|
|
42
|
+
export declare const useParameterlessCallOperationActionHandler: ActionHandlerHookWithMeta;
|
|
43
|
+
//# sourceMappingURL=operation-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-handlers.d.ts","sourceRoot":"","sources":["../../../src/handlers/operation/operation-handlers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAU,yBAAyB,EAAkD,MAAM,aAAa,CAAC;AA8IrH;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EA8CpC,yBAAyB,CAAC;AAGhC;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,EAiDxC,yBAAyB,CAAC;AAGhC;;;;;;;GAOG;AACH,eAAO,MAAM,sCAAsC,EAuE7C,yBAAyB,CAAC;AAGhC;;;;;;;GAOG;AACH,eAAO,MAAM,0CAA0C,EAiEjD,yBAAyB,CAAC;AAGhC;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C,EA8CjD,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/other/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActionHandlerHookWithMeta } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Handle pre-fetch action (load data before navigation) - hook factory.
|
|
4
|
+
*/
|
|
5
|
+
export declare const usePreFetchActionHandler: ActionHandlerHookWithMeta;
|
|
6
|
+
/**
|
|
7
|
+
* Handle custom action (user-defined logic) - hook factory.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useCustomActionHandler: ActionHandlerHookWithMeta;
|
|
10
|
+
//# sourceMappingURL=other-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"other-handlers.d.ts","sourceRoot":"","sources":["../../../src/handlers/other/other-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,yBAAyB,EAA2C,MAAM,aAAa,CAAC;AAE9G;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAoB/B,yBAAyB,CAAC;AAGhC;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAY7B,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useSetActionHandler, useUnsetActionHandler, useAddActionHandler, useRemoveActionHandler, useBulkRemoveActionHandler, useClearActionHandler, useRefreshRelationActionHandler, useFilterRelationActionHandler, } from './relation-handlers';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/relation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,+BAA+B,EAC/B,8BAA8B,GAC9B,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ActionHandlerHookWithMeta } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Handle relation set (single) - hook factory.
|
|
4
|
+
* Sets a single-valued relation to a selected transfer.
|
|
5
|
+
* Supports both legacy callback mode and API mode.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useSetActionHandler: ActionHandlerHookWithMeta;
|
|
8
|
+
/**
|
|
9
|
+
* Handle relation unset - hook factory.
|
|
10
|
+
* Clears a single-valued relation.
|
|
11
|
+
* Supports both legacy callback mode and API mode.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useUnsetActionHandler: ActionHandlerHookWithMeta;
|
|
14
|
+
/**
|
|
15
|
+
* Handle relation add (multi) - hook factory.
|
|
16
|
+
* Adds selected transfers to a collection relation.
|
|
17
|
+
* Supports both legacy callback mode and API mode.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useAddActionHandler: ActionHandlerHookWithMeta;
|
|
20
|
+
/**
|
|
21
|
+
* Handle relation remove - hook factory.
|
|
22
|
+
* Removes a single transfer from a collection relation.
|
|
23
|
+
* Supports both legacy callback mode and API mode.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useRemoveActionHandler: ActionHandlerHookWithMeta;
|
|
26
|
+
/**
|
|
27
|
+
* Handle bulk remove - hook factory.
|
|
28
|
+
* Removes multiple selected transfers from a collection relation.
|
|
29
|
+
* Supports both legacy callback mode and API mode.
|
|
30
|
+
*/
|
|
31
|
+
export declare const useBulkRemoveActionHandler: ActionHandlerHookWithMeta;
|
|
32
|
+
/**
|
|
33
|
+
* Handle relation clear - hook factory.
|
|
34
|
+
* Clears all transfers from a collection relation (unset for collection).
|
|
35
|
+
* Supports both legacy callback mode and API mode.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useClearActionHandler: ActionHandlerHookWithMeta;
|
|
38
|
+
/**
|
|
39
|
+
* Handle relation refresh - hook factory.
|
|
40
|
+
* Refreshes/reloads a relation's data.
|
|
41
|
+
* Supports both legacy callback mode and API mode.
|
|
42
|
+
*/
|
|
43
|
+
export declare const useRefreshRelationActionHandler: ActionHandlerHookWithMeta;
|
|
44
|
+
/**
|
|
45
|
+
* Handle relation filter - hook factory.
|
|
46
|
+
* Applies a filter to a relation (UI-side operation, no REST call).
|
|
47
|
+
*/
|
|
48
|
+
export declare const useFilterRelationActionHandler: ActionHandlerHookWithMeta;
|
|
49
|
+
//# sourceMappingURL=relation-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation-handlers.d.ts","sourceRoot":"","sources":["../../../src/handlers/relation/relation-handlers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAU,yBAAyB,EAA6B,MAAM,aAAa,CAAC;AAyChG;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAoC1B,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAwB5B,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAmC1B,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAyE7B,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAiFjC,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAyB5B,yBAAyB,CAAC;AAGhC;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EA6BtC,yBAAyB,CAAC;AAGhC;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EASrC,yBAAyB,CAAC"}
|