@decaf-ts/ui-decorators 0.17.1 → 0.17.4

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.
Files changed (127) hide show
  1. package/dist/ui-decorators.cjs +1 -1
  2. package/dist/ui-decorators.cjs.map +1 -1
  3. package/dist/ui-decorators.js.map +1 -1
  4. package/lib/cjs/graph/constants.cjs +1 -1
  5. package/lib/cjs/graph/constants.cjs.map +1 -1
  6. package/lib/cjs/graph/decorators.cjs +3 -3
  7. package/lib/cjs/graph/decorators.cjs.map +1 -1
  8. package/lib/cjs/graph/index.cjs +1 -1
  9. package/lib/cjs/graph/index.cjs.map +1 -1
  10. package/lib/cjs/graph/overrides/Rendering.cjs +1 -1
  11. package/lib/cjs/graph/overrides/Rendering.cjs.map +1 -1
  12. package/lib/cjs/graph/overrides/index.cjs +1 -1
  13. package/lib/cjs/graph/overrides/index.cjs.map +1 -1
  14. package/lib/cjs/graph/overrides/overrides.cjs +1 -1
  15. package/lib/cjs/graph/overrides/overrides.cjs.map +1 -1
  16. package/lib/cjs/graph/reader.cjs +89 -6
  17. package/lib/cjs/graph/reader.cjs.map +1 -1
  18. package/lib/cjs/graph/snapshot.cjs +1 -1
  19. package/lib/cjs/graph/snapshot.cjs.map +1 -1
  20. package/lib/cjs/graph/types.cjs +1 -1
  21. package/lib/cjs/graph/types.cjs.map +1 -1
  22. package/lib/cjs/index.cjs +4 -4
  23. package/lib/cjs/index.cjs.map +1 -1
  24. package/lib/cjs/model/Renderable.cjs +1 -1
  25. package/lib/cjs/model/Renderable.cjs.map +1 -1
  26. package/lib/cjs/model/decorators.cjs +1 -1
  27. package/lib/cjs/model/decorators.cjs.map +1 -1
  28. package/lib/cjs/model/index.cjs +1 -1
  29. package/lib/cjs/model/index.cjs.map +1 -1
  30. package/lib/cjs/model/model.cjs +1 -1
  31. package/lib/cjs/model/model.cjs.map +1 -1
  32. package/lib/cjs/model/overrides.cjs +1 -1
  33. package/lib/cjs/model/overrides.cjs.map +1 -1
  34. package/lib/cjs/overrides/ModelBuilderExtensions.cjs +1 -1
  35. package/lib/cjs/overrides/ModelBuilderExtensions.cjs.map +1 -1
  36. package/lib/cjs/overrides/index.cjs +1 -1
  37. package/lib/cjs/overrides/index.cjs.map +1 -1
  38. package/lib/cjs/ui/DecafComponent.cjs +1 -1
  39. package/lib/cjs/ui/DecafComponent.cjs.map +1 -1
  40. package/lib/cjs/ui/DecafEventHandler.cjs +1 -1
  41. package/lib/cjs/ui/DecafEventHandler.cjs.map +1 -1
  42. package/lib/cjs/ui/DecafTranslateService.cjs +1 -1
  43. package/lib/cjs/ui/DecafTranslateService.cjs.map +1 -1
  44. package/lib/cjs/ui/Rendering.cjs +1 -1
  45. package/lib/cjs/ui/Rendering.cjs.map +1 -1
  46. package/lib/cjs/ui/UIValidator.cjs +1 -1
  47. package/lib/cjs/ui/UIValidator.cjs.map +1 -1
  48. package/lib/cjs/ui/constants.cjs +1 -1
  49. package/lib/cjs/ui/constants.cjs.map +1 -1
  50. package/lib/cjs/ui/decorators.cjs +3 -22
  51. package/lib/cjs/ui/decorators.cjs.map +1 -1
  52. package/lib/cjs/ui/errors.cjs +1 -1
  53. package/lib/cjs/ui/errors.cjs.map +1 -1
  54. package/lib/cjs/ui/index.cjs +2 -2
  55. package/lib/cjs/ui/index.cjs.map +1 -1
  56. package/lib/cjs/ui/interfaces/IDecafModal.cjs +4 -0
  57. package/lib/cjs/ui/interfaces/IDecafModal.cjs.map +1 -0
  58. package/lib/cjs/ui/interfaces/IDecafRouter.cjs +4 -0
  59. package/lib/cjs/ui/interfaces/IDecafRouter.cjs.map +1 -0
  60. package/lib/cjs/ui/interfaces/IDecafSpinner.cjs +4 -0
  61. package/lib/cjs/ui/interfaces/IDecafSpinner.cjs.map +1 -0
  62. package/lib/cjs/ui/interfaces/IDecafToast.cjs +4 -0
  63. package/lib/cjs/ui/interfaces/IDecafToast.cjs.map +1 -0
  64. package/lib/cjs/ui/interfaces/index.cjs +22 -0
  65. package/lib/cjs/ui/interfaces/index.cjs.map +1 -0
  66. package/lib/cjs/ui/overrides.cjs +1 -1
  67. package/lib/cjs/ui/overrides.cjs.map +1 -1
  68. package/lib/cjs/ui/types.cjs +1 -1
  69. package/lib/cjs/ui/types.cjs.map +1 -1
  70. package/lib/cjs/ui/utils.cjs +1 -1
  71. package/lib/cjs/ui/utils.cjs.map +1 -1
  72. package/lib/cjs/ui/validator.cjs +1 -1
  73. package/lib/cjs/ui/validator.cjs.map +1 -1
  74. package/lib/esm/graph/decorators.js +2 -2
  75. package/lib/esm/graph/decorators.js.map +1 -1
  76. package/lib/esm/graph/reader.js +88 -5
  77. package/lib/esm/graph/reader.js.map +1 -1
  78. package/lib/esm/index.js +3 -3
  79. package/lib/esm/index.js.map +1 -1
  80. package/lib/esm/model/decorators.js.map +1 -1
  81. package/lib/esm/ui/DecafComponent.js.map +1 -1
  82. package/lib/esm/ui/Rendering.js.map +1 -1
  83. package/lib/esm/ui/decorators.js +2 -21
  84. package/lib/esm/ui/decorators.js.map +1 -1
  85. package/lib/esm/ui/index.js +1 -1
  86. package/lib/esm/ui/index.js.map +1 -1
  87. package/lib/esm/ui/interfaces/IDecafModal.js +10 -0
  88. package/lib/esm/ui/interfaces/IDecafModal.js.map +1 -0
  89. package/lib/esm/ui/interfaces/IDecafRouter.js +2 -0
  90. package/lib/esm/ui/interfaces/IDecafRouter.js.map +1 -0
  91. package/lib/esm/ui/interfaces/IDecafSpinner.js +2 -0
  92. package/lib/esm/ui/interfaces/IDecafSpinner.js.map +1 -0
  93. package/lib/esm/ui/interfaces/IDecafToast.js +2 -0
  94. package/lib/esm/ui/interfaces/IDecafToast.js.map +1 -0
  95. package/lib/esm/ui/interfaces/index.js +5 -0
  96. package/lib/esm/ui/interfaces/index.js.map +1 -0
  97. package/lib/types/graph/constants.d.cts +47 -0
  98. package/lib/types/graph/constants.d.mts +47 -0
  99. package/lib/types/index.d.cts +3 -3
  100. package/lib/types/index.d.mts +3 -3
  101. package/lib/types/model/decorators.d.cts +1 -1
  102. package/lib/types/model/decorators.d.mts +1 -1
  103. package/lib/types/ui/Rendering.d.cts +10 -1
  104. package/lib/types/ui/Rendering.d.mts +10 -1
  105. package/lib/types/ui/decorators.d.cts +7 -6
  106. package/lib/types/ui/decorators.d.mts +7 -6
  107. package/lib/types/ui/index.d.cts +1 -1
  108. package/lib/types/ui/index.d.mts +1 -1
  109. package/lib/types/ui/interfaces/IDecafModal.d.cts +186 -0
  110. package/lib/types/ui/interfaces/IDecafModal.d.mts +186 -0
  111. package/lib/types/ui/interfaces/IDecafRouter.d.cts +108 -0
  112. package/lib/types/ui/interfaces/IDecafRouter.d.mts +108 -0
  113. package/lib/types/ui/interfaces/IDecafSpinner.d.cts +69 -0
  114. package/lib/types/ui/interfaces/IDecafSpinner.d.mts +69 -0
  115. package/lib/types/ui/interfaces/IDecafToast.d.cts +63 -0
  116. package/lib/types/ui/interfaces/IDecafToast.d.mts +63 -0
  117. package/lib/types/ui/interfaces/index.d.cts +4 -0
  118. package/lib/types/ui/interfaces/index.d.mts +4 -0
  119. package/lib/types/ui/types.d.cts +94 -0
  120. package/lib/types/ui/types.d.mts +94 -0
  121. package/package.json +1 -1
  122. package/lib/cjs/ui/interfaces.cjs +0 -4
  123. package/lib/cjs/ui/interfaces.cjs.map +0 -1
  124. package/lib/esm/ui/interfaces.js +0 -10
  125. package/lib/esm/ui/interfaces.js.map +0 -1
  126. package/lib/types/ui/interfaces.d.cts +0 -64
  127. package/lib/types/ui/interfaces.d.mts +0 -64
@@ -0,0 +1,4 @@
1
+ export * from "./IDecafModal.d.mts";
2
+ export * from "./IDecafToast.d.mts";
3
+ export * from "./IDecafSpinner.d.mts";
4
+ export * from "./IDecafRouter.d.mts";
@@ -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
+ }
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/ui-decorators",
3
- "version": "0.17.1",
3
+ "version": "0.17.4",
4
4
  "description": "Extension of decorator validation to ui elements to allow for web integration",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=interfaces.js.map
4
- //# sourceMappingURL=interfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["interfaces.js"],"names":[],"mappings":";;AASA,sCAAsC"}
@@ -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
- }