@decaf-ts/ui-decorators 0.17.1 → 0.17.3
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/ui-decorators.cjs +1 -1
- package/dist/ui-decorators.cjs.map +1 -1
- package/dist/ui-decorators.js.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/ui/decorators.cjs +2 -21
- package/lib/cjs/ui/decorators.cjs.map +1 -1
- package/lib/cjs/ui/index.cjs +1 -1
- package/lib/cjs/ui/index.cjs.map +1 -1
- package/lib/cjs/ui/interfaces/IDecafModal.cjs +4 -0
- package/lib/cjs/ui/interfaces/IDecafModal.cjs.map +1 -0
- package/lib/cjs/ui/interfaces/IDecafRouter.cjs +4 -0
- package/lib/cjs/ui/interfaces/IDecafRouter.cjs.map +1 -0
- package/lib/cjs/ui/interfaces/IDecafSpinner.cjs +4 -0
- package/lib/cjs/ui/interfaces/IDecafSpinner.cjs.map +1 -0
- package/lib/cjs/ui/interfaces/IDecafToast.cjs +4 -0
- package/lib/cjs/ui/interfaces/IDecafToast.cjs.map +1 -0
- package/lib/cjs/ui/interfaces/index.cjs +22 -0
- package/lib/cjs/ui/interfaces/index.cjs.map +1 -0
- package/lib/esm/index.js +3 -3
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/model/decorators.js.map +1 -1
- package/lib/esm/ui/DecafComponent.js.map +1 -1
- package/lib/esm/ui/Rendering.js.map +1 -1
- package/lib/esm/ui/decorators.js +2 -21
- package/lib/esm/ui/decorators.js.map +1 -1
- package/lib/esm/ui/index.js +1 -1
- package/lib/esm/ui/index.js.map +1 -1
- package/lib/esm/ui/interfaces/IDecafModal.js +10 -0
- package/lib/esm/ui/interfaces/IDecafModal.js.map +1 -0
- package/lib/esm/ui/interfaces/IDecafRouter.js +2 -0
- package/lib/esm/ui/interfaces/IDecafRouter.js.map +1 -0
- package/lib/esm/ui/interfaces/IDecafSpinner.js +2 -0
- package/lib/esm/ui/interfaces/IDecafSpinner.js.map +1 -0
- package/lib/esm/ui/interfaces/IDecafToast.js +2 -0
- package/lib/esm/ui/interfaces/IDecafToast.js.map +1 -0
- package/lib/esm/ui/interfaces/index.js +5 -0
- package/lib/esm/ui/interfaces/index.js.map +1 -0
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/lib/types/model/decorators.d.cts +1 -1
- package/lib/types/model/decorators.d.mts +1 -1
- package/lib/types/ui/Rendering.d.cts +10 -1
- package/lib/types/ui/Rendering.d.mts +10 -1
- package/lib/types/ui/decorators.d.cts +7 -6
- package/lib/types/ui/decorators.d.mts +7 -6
- package/lib/types/ui/index.d.cts +1 -1
- package/lib/types/ui/index.d.mts +1 -1
- package/lib/types/ui/interfaces/IDecafModal.d.cts +186 -0
- package/lib/types/ui/interfaces/IDecafModal.d.mts +186 -0
- package/lib/types/ui/interfaces/IDecafRouter.d.cts +108 -0
- package/lib/types/ui/interfaces/IDecafRouter.d.mts +108 -0
- package/lib/types/ui/interfaces/IDecafSpinner.d.cts +69 -0
- package/lib/types/ui/interfaces/IDecafSpinner.d.mts +69 -0
- package/lib/types/ui/interfaces/IDecafToast.d.cts +63 -0
- package/lib/types/ui/interfaces/IDecafToast.d.mts +63 -0
- package/lib/types/ui/interfaces/index.d.cts +4 -0
- package/lib/types/ui/interfaces/index.d.mts +4 -0
- package/lib/types/ui/types.d.cts +94 -0
- package/lib/types/ui/types.d.mts +94 -0
- package/package.json +1 -1
- package/lib/cjs/ui/interfaces.cjs +0 -4
- package/lib/cjs/ui/interfaces.cjs.map +0 -1
- package/lib/esm/ui/interfaces.js +0 -10
- package/lib/esm/ui/interfaces.js.map +0 -1
- package/lib/types/ui/interfaces.d.cts +0 -64
- package/lib/types/ui/interfaces.d.mts +0 -64
package/lib/types/ui/types.d.cts
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
import { OperationKeys } from "@decaf-ts/db-decorators";
|
|
10
10
|
import { ElementSizes, UIKeys, UIMediaBreakPoints } from "./constants.d.cts";
|
|
11
11
|
import { DecafEventHandler } from "./DecafEventHandler.d.cts";
|
|
12
|
+
import { DecafComponent } from "./DecafComponent.d.cts";
|
|
13
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
14
|
+
import { RenderingEngine } from "./Rendering.d.cts";
|
|
15
|
+
import { CrudOperations } from "@decaf-ts/db-decorators";
|
|
12
16
|
/**
|
|
13
17
|
* @description Interface for defining a UI field or component
|
|
14
18
|
* @summary Represents a renderable UI element with properties and children
|
|
@@ -167,6 +171,7 @@ export type UIClassMetadata = UILayoutMetadata | UIModelMetadata | UIHandlerMeta
|
|
|
167
171
|
export type UILayoutCol = number | typeof ElementSizes.half | typeof ElementSizes.full | typeof ElementSizes.auto | typeof ElementSizes.expand;
|
|
168
172
|
export type UIListItemPosition = "title" | "description" | "info" | "subinfo";
|
|
169
173
|
export type UIFunctionLike = (...args: any[]) => any | Promise<any>;
|
|
174
|
+
export type UIEventHandler = (instance: DecafComponent<Model>, renderEngine: RenderingEngine, ...args: any[]) => any | Promise<any>;
|
|
170
175
|
export type UIEventName = keyof Pick<DecafEventHandler, "render" | "initialize" | "handleClick" | "refresh">;
|
|
171
176
|
export type UIEventProperty = Record<string, UIFunctionLike>;
|
|
172
177
|
export type UIHandlerMetadata = {
|
|
@@ -183,4 +188,93 @@ export type UILayoutPropMetadata = {
|
|
|
183
188
|
row: number | string[];
|
|
184
189
|
};
|
|
185
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* @description Dismissal role returned by toast actions.
|
|
193
|
+
* @summary Represents the role reported when a toast is closed, including the
|
|
194
|
+
* default cancel role, custom roles, or an undefined result when no role is set.
|
|
195
|
+
*
|
|
196
|
+
* @typedef {('cancel' | string | undefined)} DecafToastRole
|
|
197
|
+
* @memberOf module:ui-decorators
|
|
198
|
+
*/
|
|
199
|
+
export type DecafToastRole = "cancel" | string | undefined;
|
|
186
200
|
export type UIMediaBreakPointsType = UIMediaBreakPoints.SMALL | UIMediaBreakPoints.MEDIUM | UIMediaBreakPoints.LARGE | UIMediaBreakPoints.XLARGE;
|
|
201
|
+
export type DecafSpinnerOptions = {
|
|
202
|
+
cssClass?: string;
|
|
203
|
+
duration?: number;
|
|
204
|
+
message?: string;
|
|
205
|
+
[key: string]: any;
|
|
206
|
+
};
|
|
207
|
+
export interface DecafModalOptions<T extends DecafComponent<Model>> {
|
|
208
|
+
component: T;
|
|
209
|
+
componentProps?: Partial<keyof DecafComponent<Model>> & Record<string, unknown>;
|
|
210
|
+
[key: string]: unknown;
|
|
211
|
+
}
|
|
212
|
+
export type DecafToastOptions = {
|
|
213
|
+
message: string;
|
|
214
|
+
duration: 3000;
|
|
215
|
+
position: "top" | "bottom" | "middle";
|
|
216
|
+
color?: string;
|
|
217
|
+
[key: string]: any;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* @description Interfaces for UI form components
|
|
221
|
+
* @summary Defines interfaces for form fields with CRUD operations
|
|
222
|
+
* This module contains interfaces that extend basic field properties with
|
|
223
|
+
* CRUD operation information for form generation.
|
|
224
|
+
* @module ui/interfaces
|
|
225
|
+
* @memberOf module:ui-decorators
|
|
226
|
+
*/
|
|
227
|
+
/**
|
|
228
|
+
* @description Form field interface with CRUD operation information
|
|
229
|
+
* @summary Extends basic field properties with a specific CRUD operation
|
|
230
|
+
* This interface represents a form field that is associated with a specific
|
|
231
|
+
* CRUD operation (Create, Read, Update, Delete). It combines all the standard
|
|
232
|
+
* field properties with an operation property.
|
|
233
|
+
*
|
|
234
|
+
* @interface CrudFormField
|
|
235
|
+
* @extends FieldProperties
|
|
236
|
+
* @memberOf module:ui-decorators
|
|
237
|
+
*
|
|
238
|
+
* @property {CrudOperations} operation - The CRUD operation associated with this field
|
|
239
|
+
*/
|
|
240
|
+
export interface CrudFormField extends FieldProperties {
|
|
241
|
+
/**
|
|
242
|
+
* @description The CRUD operation associated with this field
|
|
243
|
+
* @summary Specifies which operation (Create, Read, Update, Delete) this field is for
|
|
244
|
+
*/
|
|
245
|
+
operation: CrudOperations;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* @description Interface for defining a page/step in a multi-step form or wizard
|
|
249
|
+
* @summary Provides metadata for individual pages in stepped model forms
|
|
250
|
+
* This interface represents a single page or step in a multi-step form workflow.
|
|
251
|
+
* It allows defining optional title and description metadata for each page,
|
|
252
|
+
* which can be used to display step indicators, progress bars, or navigation labels.
|
|
253
|
+
* Used in conjunction with the @uisteppedmodel decorator.
|
|
254
|
+
*
|
|
255
|
+
* @interface IPagedComponentProperties
|
|
256
|
+
* @memberOf module:ui-decorators
|
|
257
|
+
*
|
|
258
|
+
* @property {string} [title] - Optional title for the page/step (e.g., "Personal Information")
|
|
259
|
+
* @property {string} [description] - Optional description providing additional context for the page
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* // Define pages for a multi-step wizard
|
|
263
|
+
* const wizardPages: IPagedComponentProperties[] = [
|
|
264
|
+
* { title: 'Personal Info', description: 'Enter your basic details' },
|
|
265
|
+
* { title: 'Contact', description: 'Provide your contact information' },
|
|
266
|
+
* { title: 'Review', description: 'Review and confirm your information' }
|
|
267
|
+
* ];
|
|
268
|
+
*
|
|
269
|
+
* @uisteppedmodel('div', wizardPages, true)
|
|
270
|
+
* class RegistrationWizard extends Model {
|
|
271
|
+
* // Properties with @uipageprop decorators
|
|
272
|
+
* }
|
|
273
|
+
*/
|
|
274
|
+
export interface IPagedComponentProperties {
|
|
275
|
+
title?: string;
|
|
276
|
+
description?: string;
|
|
277
|
+
pages?: number | IPagedComponentProperties[];
|
|
278
|
+
rows?: number | string[];
|
|
279
|
+
cols?: number | string[];
|
|
280
|
+
}
|
package/lib/types/ui/types.d.mts
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
import { OperationKeys } from "@decaf-ts/db-decorators";
|
|
10
10
|
import { ElementSizes, UIKeys, UIMediaBreakPoints } from "./constants.d.mts";
|
|
11
11
|
import { DecafEventHandler } from "./DecafEventHandler.d.mts";
|
|
12
|
+
import { DecafComponent } from "./DecafComponent.d.mts";
|
|
13
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
14
|
+
import { RenderingEngine } from "./Rendering.d.mts";
|
|
15
|
+
import { CrudOperations } from "@decaf-ts/db-decorators";
|
|
12
16
|
/**
|
|
13
17
|
* @description Interface for defining a UI field or component
|
|
14
18
|
* @summary Represents a renderable UI element with properties and children
|
|
@@ -167,6 +171,7 @@ export type UIClassMetadata = UILayoutMetadata | UIModelMetadata | UIHandlerMeta
|
|
|
167
171
|
export type UILayoutCol = number | typeof ElementSizes.half | typeof ElementSizes.full | typeof ElementSizes.auto | typeof ElementSizes.expand;
|
|
168
172
|
export type UIListItemPosition = "title" | "description" | "info" | "subinfo";
|
|
169
173
|
export type UIFunctionLike = (...args: any[]) => any | Promise<any>;
|
|
174
|
+
export type UIEventHandler = (instance: DecafComponent<Model>, renderEngine: RenderingEngine, ...args: any[]) => any | Promise<any>;
|
|
170
175
|
export type UIEventName = keyof Pick<DecafEventHandler, "render" | "initialize" | "handleClick" | "refresh">;
|
|
171
176
|
export type UIEventProperty = Record<string, UIFunctionLike>;
|
|
172
177
|
export type UIHandlerMetadata = {
|
|
@@ -183,4 +188,93 @@ export type UILayoutPropMetadata = {
|
|
|
183
188
|
row: number | string[];
|
|
184
189
|
};
|
|
185
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* @description Dismissal role returned by toast actions.
|
|
193
|
+
* @summary Represents the role reported when a toast is closed, including the
|
|
194
|
+
* default cancel role, custom roles, or an undefined result when no role is set.
|
|
195
|
+
*
|
|
196
|
+
* @typedef {('cancel' | string | undefined)} DecafToastRole
|
|
197
|
+
* @memberOf module:ui-decorators
|
|
198
|
+
*/
|
|
199
|
+
export type DecafToastRole = "cancel" | string | undefined;
|
|
186
200
|
export type UIMediaBreakPointsType = UIMediaBreakPoints.SMALL | UIMediaBreakPoints.MEDIUM | UIMediaBreakPoints.LARGE | UIMediaBreakPoints.XLARGE;
|
|
201
|
+
export type DecafSpinnerOptions = {
|
|
202
|
+
cssClass?: string;
|
|
203
|
+
duration?: number;
|
|
204
|
+
message?: string;
|
|
205
|
+
[key: string]: any;
|
|
206
|
+
};
|
|
207
|
+
export interface DecafModalOptions<T extends DecafComponent<Model>> {
|
|
208
|
+
component: T;
|
|
209
|
+
componentProps?: Partial<keyof DecafComponent<Model>> & Record<string, unknown>;
|
|
210
|
+
[key: string]: unknown;
|
|
211
|
+
}
|
|
212
|
+
export type DecafToastOptions = {
|
|
213
|
+
message: string;
|
|
214
|
+
duration: 3000;
|
|
215
|
+
position: "top" | "bottom" | "middle";
|
|
216
|
+
color?: string;
|
|
217
|
+
[key: string]: any;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* @description Interfaces for UI form components
|
|
221
|
+
* @summary Defines interfaces for form fields with CRUD operations
|
|
222
|
+
* This module contains interfaces that extend basic field properties with
|
|
223
|
+
* CRUD operation information for form generation.
|
|
224
|
+
* @module ui/interfaces
|
|
225
|
+
* @memberOf module:ui-decorators
|
|
226
|
+
*/
|
|
227
|
+
/**
|
|
228
|
+
* @description Form field interface with CRUD operation information
|
|
229
|
+
* @summary Extends basic field properties with a specific CRUD operation
|
|
230
|
+
* This interface represents a form field that is associated with a specific
|
|
231
|
+
* CRUD operation (Create, Read, Update, Delete). It combines all the standard
|
|
232
|
+
* field properties with an operation property.
|
|
233
|
+
*
|
|
234
|
+
* @interface CrudFormField
|
|
235
|
+
* @extends FieldProperties
|
|
236
|
+
* @memberOf module:ui-decorators
|
|
237
|
+
*
|
|
238
|
+
* @property {CrudOperations} operation - The CRUD operation associated with this field
|
|
239
|
+
*/
|
|
240
|
+
export interface CrudFormField extends FieldProperties {
|
|
241
|
+
/**
|
|
242
|
+
* @description The CRUD operation associated with this field
|
|
243
|
+
* @summary Specifies which operation (Create, Read, Update, Delete) this field is for
|
|
244
|
+
*/
|
|
245
|
+
operation: CrudOperations;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* @description Interface for defining a page/step in a multi-step form or wizard
|
|
249
|
+
* @summary Provides metadata for individual pages in stepped model forms
|
|
250
|
+
* This interface represents a single page or step in a multi-step form workflow.
|
|
251
|
+
* It allows defining optional title and description metadata for each page,
|
|
252
|
+
* which can be used to display step indicators, progress bars, or navigation labels.
|
|
253
|
+
* Used in conjunction with the @uisteppedmodel decorator.
|
|
254
|
+
*
|
|
255
|
+
* @interface IPagedComponentProperties
|
|
256
|
+
* @memberOf module:ui-decorators
|
|
257
|
+
*
|
|
258
|
+
* @property {string} [title] - Optional title for the page/step (e.g., "Personal Information")
|
|
259
|
+
* @property {string} [description] - Optional description providing additional context for the page
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* // Define pages for a multi-step wizard
|
|
263
|
+
* const wizardPages: IPagedComponentProperties[] = [
|
|
264
|
+
* { title: 'Personal Info', description: 'Enter your basic details' },
|
|
265
|
+
* { title: 'Contact', description: 'Provide your contact information' },
|
|
266
|
+
* { title: 'Review', description: 'Review and confirm your information' }
|
|
267
|
+
* ];
|
|
268
|
+
*
|
|
269
|
+
* @uisteppedmodel('div', wizardPages, true)
|
|
270
|
+
* class RegistrationWizard extends Model {
|
|
271
|
+
* // Properties with @uipageprop decorators
|
|
272
|
+
* }
|
|
273
|
+
*/
|
|
274
|
+
export interface IPagedComponentProperties {
|
|
275
|
+
title?: string;
|
|
276
|
+
description?: string;
|
|
277
|
+
pages?: number | IPagedComponentProperties[];
|
|
278
|
+
rows?: number | string[];
|
|
279
|
+
cols?: number | string[];
|
|
280
|
+
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["interfaces.js"],"names":[],"mappings":";;AASA,sCAAsC"}
|
package/lib/esm/ui/interfaces.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Interfaces for UI form components
|
|
3
|
-
* @summary Defines interfaces for form fields with CRUD operations
|
|
4
|
-
* This module contains interfaces that extend basic field properties with
|
|
5
|
-
* CRUD operation information for form generation.
|
|
6
|
-
* @module ui/interfaces
|
|
7
|
-
* @memberOf module:ui-decorators
|
|
8
|
-
*/
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=interfaces.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/ui/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Interfaces for UI form components
|
|
3
|
-
* @summary Defines interfaces for form fields with CRUD operations
|
|
4
|
-
* This module contains interfaces that extend basic field properties with
|
|
5
|
-
* CRUD operation information for form generation.
|
|
6
|
-
* @module ui/interfaces
|
|
7
|
-
* @memberOf module:ui-decorators
|
|
8
|
-
*/
|
|
9
|
-
import { FieldProperties } from "./types.d.cts";
|
|
10
|
-
import { CrudOperations } from "@decaf-ts/db-decorators";
|
|
11
|
-
/**
|
|
12
|
-
* @description Form field interface with CRUD operation information
|
|
13
|
-
* @summary Extends basic field properties with a specific CRUD operation
|
|
14
|
-
* This interface represents a form field that is associated with a specific
|
|
15
|
-
* CRUD operation (Create, Read, Update, Delete). It combines all the standard
|
|
16
|
-
* field properties with an operation property.
|
|
17
|
-
*
|
|
18
|
-
* @interface CrudFormField
|
|
19
|
-
* @extends FieldProperties
|
|
20
|
-
* @memberOf module:ui-decorators
|
|
21
|
-
*
|
|
22
|
-
* @property {CrudOperations} operation - The CRUD operation associated with this field
|
|
23
|
-
*/
|
|
24
|
-
export interface CrudFormField extends FieldProperties {
|
|
25
|
-
/**
|
|
26
|
-
* @description The CRUD operation associated with this field
|
|
27
|
-
* @summary Specifies which operation (Create, Read, Update, Delete) this field is for
|
|
28
|
-
*/
|
|
29
|
-
operation: CrudOperations;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @description Interface for defining a page/step in a multi-step form or wizard
|
|
33
|
-
* @summary Provides metadata for individual pages in stepped model forms
|
|
34
|
-
* This interface represents a single page or step in a multi-step form workflow.
|
|
35
|
-
* It allows defining optional title and description metadata for each page,
|
|
36
|
-
* which can be used to display step indicators, progress bars, or navigation labels.
|
|
37
|
-
* Used in conjunction with the @uisteppedmodel decorator.
|
|
38
|
-
*
|
|
39
|
-
* @interface IPagedComponentProperties
|
|
40
|
-
* @memberOf module:ui-decorators
|
|
41
|
-
*
|
|
42
|
-
* @property {string} [title] - Optional title for the page/step (e.g., "Personal Information")
|
|
43
|
-
* @property {string} [description] - Optional description providing additional context for the page
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* // Define pages for a multi-step wizard
|
|
47
|
-
* const wizardPages: IPagedComponentProperties[] = [
|
|
48
|
-
* { title: 'Personal Info', description: 'Enter your basic details' },
|
|
49
|
-
* { title: 'Contact', description: 'Provide your contact information' },
|
|
50
|
-
* { title: 'Review', description: 'Review and confirm your information' }
|
|
51
|
-
* ];
|
|
52
|
-
*
|
|
53
|
-
* @uisteppedmodel('div', wizardPages, true)
|
|
54
|
-
* class RegistrationWizard extends Model {
|
|
55
|
-
* // Properties with @uipageprop decorators
|
|
56
|
-
* }
|
|
57
|
-
*/
|
|
58
|
-
export interface IPagedComponentProperties {
|
|
59
|
-
title?: string;
|
|
60
|
-
description?: string;
|
|
61
|
-
pages?: number | IPagedComponentProperties[];
|
|
62
|
-
rows?: number | string[];
|
|
63
|
-
cols?: number | string[];
|
|
64
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Interfaces for UI form components
|
|
3
|
-
* @summary Defines interfaces for form fields with CRUD operations
|
|
4
|
-
* This module contains interfaces that extend basic field properties with
|
|
5
|
-
* CRUD operation information for form generation.
|
|
6
|
-
* @module ui/interfaces
|
|
7
|
-
* @memberOf module:ui-decorators
|
|
8
|
-
*/
|
|
9
|
-
import { FieldProperties } from "./types.d.mts";
|
|
10
|
-
import { CrudOperations } from "@decaf-ts/db-decorators";
|
|
11
|
-
/**
|
|
12
|
-
* @description Form field interface with CRUD operation information
|
|
13
|
-
* @summary Extends basic field properties with a specific CRUD operation
|
|
14
|
-
* This interface represents a form field that is associated with a specific
|
|
15
|
-
* CRUD operation (Create, Read, Update, Delete). It combines all the standard
|
|
16
|
-
* field properties with an operation property.
|
|
17
|
-
*
|
|
18
|
-
* @interface CrudFormField
|
|
19
|
-
* @extends FieldProperties
|
|
20
|
-
* @memberOf module:ui-decorators
|
|
21
|
-
*
|
|
22
|
-
* @property {CrudOperations} operation - The CRUD operation associated with this field
|
|
23
|
-
*/
|
|
24
|
-
export interface CrudFormField extends FieldProperties {
|
|
25
|
-
/**
|
|
26
|
-
* @description The CRUD operation associated with this field
|
|
27
|
-
* @summary Specifies which operation (Create, Read, Update, Delete) this field is for
|
|
28
|
-
*/
|
|
29
|
-
operation: CrudOperations;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @description Interface for defining a page/step in a multi-step form or wizard
|
|
33
|
-
* @summary Provides metadata for individual pages in stepped model forms
|
|
34
|
-
* This interface represents a single page or step in a multi-step form workflow.
|
|
35
|
-
* It allows defining optional title and description metadata for each page,
|
|
36
|
-
* which can be used to display step indicators, progress bars, or navigation labels.
|
|
37
|
-
* Used in conjunction with the @uisteppedmodel decorator.
|
|
38
|
-
*
|
|
39
|
-
* @interface IPagedComponentProperties
|
|
40
|
-
* @memberOf module:ui-decorators
|
|
41
|
-
*
|
|
42
|
-
* @property {string} [title] - Optional title for the page/step (e.g., "Personal Information")
|
|
43
|
-
* @property {string} [description] - Optional description providing additional context for the page
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* // Define pages for a multi-step wizard
|
|
47
|
-
* const wizardPages: IPagedComponentProperties[] = [
|
|
48
|
-
* { title: 'Personal Info', description: 'Enter your basic details' },
|
|
49
|
-
* { title: 'Contact', description: 'Provide your contact information' },
|
|
50
|
-
* { title: 'Review', description: 'Review and confirm your information' }
|
|
51
|
-
* ];
|
|
52
|
-
*
|
|
53
|
-
* @uisteppedmodel('div', wizardPages, true)
|
|
54
|
-
* class RegistrationWizard extends Model {
|
|
55
|
-
* // Properties with @uipageprop decorators
|
|
56
|
-
* }
|
|
57
|
-
*/
|
|
58
|
-
export interface IPagedComponentProperties {
|
|
59
|
-
title?: string;
|
|
60
|
-
description?: string;
|
|
61
|
-
pages?: number | IPagedComponentProperties[];
|
|
62
|
-
rows?: number | string[];
|
|
63
|
-
cols?: number | string[];
|
|
64
|
-
}
|