@decaf-ts/ui-decorators 0.5.27 → 0.5.29

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.
@@ -1,5 +1,5 @@
1
1
  import "reflect-metadata";
2
- import { CrudOperationKeys } from "./types";
2
+ import { CrudOperationKeys, UILayoutCol } from "./types";
3
3
  /**
4
4
  * @description Decorator that hides a property during specific CRUD operations
5
5
  * @summary Controls property visibility based on operation type
@@ -247,7 +247,7 @@ export declare function uichild(clazz: string, tag: string, props?: Record<strin
247
247
  * @description Decorator that maps a model property to a list item component
248
248
  * @summary Specifies how a property should be rendered in a list context
249
249
  * This decorator allows you to define how a model property containing a list
250
- * should be rendered. It requires the class to be decorated with @uilistitem.
250
+ * should be rendered. It requires the class to be decorated with @uilistmodel.
251
251
  *
252
252
  * @param {string} [propName] The name of the property to pass to the list component (defaults to the property key)
253
253
  * @param {Record<string, any>} [props] Additional properties to pass to the list container
@@ -268,7 +268,7 @@ export declare function uichild(clazz: string, tag: string, props?: Record<strin
268
268
  * items: TodoItem[];
269
269
  * }
270
270
  *
271
- * @uilistitem('li', { class: 'todo-item' })
271
+ * @uilistmodel('li', { class: 'todo-item' })
272
272
  * class TodoItem extends Model {
273
273
  * @attribute()
274
274
  * text: string;
@@ -289,7 +289,7 @@ export declare function uichild(clazz: string, tag: string, props?: Record<strin
289
289
  * RenderingEngine->>Model: Get list prop metadata
290
290
  * Model->>RenderingEngine: Return prop name and container props
291
291
  * RenderingEngine->>ListContainer: Create container with props
292
- * RenderingEngine->>ListItems: Render each item using @uilistitem
292
+ * RenderingEngine->>ListItems: Render each item using @uilistmodel
293
293
  * ListContainer->>RenderingEngine: Return rendered list
294
294
  */
295
295
  export declare function uilistprop(propName?: string | undefined, props?: Record<string, any>): (target: any, propertyKey: string) => void;
@@ -305,41 +305,104 @@ export declare function uilistprop(propName?: string | undefined, props?: Record
305
305
  * @param {Record<string, any>} [props={}] Additional properties to pass to the layout item
306
306
  * @return {Function} A property decorator function
307
307
  *
308
- * @function uilayoutitem
308
+ * @function uilayoutprop
309
309
  * @category Property Decorators
310
310
  *
311
311
  * @example
312
312
  * // Position properties in a grid layout
313
- * @uimodel('user-form')
313
+ * @uilayout('user-form', 2, 3) // 2 columns, 3 rows
314
+ * @model()
314
315
  * class UserForm {
315
316
  * @attribute()
316
- * @uilayoutitem(1, 1) // First column, first row
317
+ * @uilayoutprop(1, 1) // One column, first row
317
318
  * firstName: string;
318
319
  *
319
320
  * @attribute()
320
- * @uilayoutitem(2, 1) // Second column, first row
321
+ * @uilayoutprop(2, 1) // One column, first row
321
322
  * lastName: string;
322
323
  *
323
324
  * @attribute()
324
- * @uilayoutitem(1, 2, { colspan: 2 }) // First column, second row, spans 2 columns
325
+ * @uilayoutprop(1, 2) // One column, second row
325
326
  * email: string;
326
327
  *
327
328
  * @attribute()
328
- * @uilayoutitem(1, 3, { class: 'full-width' }) // First column, third row with custom class
329
+ * @uilayoutprop(2, 3) // All columns, third row
329
330
  * bio: string;
330
331
  * }
331
332
  *
332
333
  * @mermaid
333
334
  * sequenceDiagram
334
335
  * participant Model
335
- * participant uilayoutitem
336
+ * participant uilayoutprop
336
337
  * participant RenderingEngine
337
338
  * participant LayoutContainer
338
- * Model->>uilayoutitem: Apply to property
339
- * uilayoutitem->>Model: Add layout item metadata
339
+ * Model->>uilayoutprop: Apply to property
340
+ * uilayoutprop->>Model: Add layout item metadata
340
341
  * RenderingEngine->>Model: Get layout item metadata
341
342
  * Model->>RenderingEngine: Return column, row, and props
342
343
  * RenderingEngine->>LayoutContainer: Position element at grid coordinates
343
344
  * LayoutContainer->>RenderingEngine: Return positioned element
344
345
  */
345
- export declare function uilayoutitem(col: number, row?: number, props?: Record<string, any>): (target: any, propertyKey: string) => void;
346
+ export declare function uilayoutprop(col?: UILayoutCol, row?: number): (target: any, propertyKey: string) => void;
347
+ /**
348
+ * @description Decorator that assigns a property to a specific page in multi-page forms
349
+ * @summary Specifies which page a property should appear on in paginated UI layouts
350
+ * This decorator applies metadata to the property, indicating which page number it belongs to
351
+ * in a multi-page form or wizard. Properties with the same page number are grouped together
352
+ * and rendered on the same page. This is typically used in conjunction with @uisteppedmodel to
353
+ * organize large forms into manageable sections.
354
+ *
355
+ * @param {number} [page=1] The page number where the property should appear (default is 1)
356
+ * @return {Function} A property decorator function
357
+ *
358
+ * @function uipageprop
359
+ * @category Property Decorators
360
+ *
361
+ * @example
362
+ * // Create a multi-step registration form with page-based layout
363
+ * @uisteppedmodel('registration-form', 2, true)
364
+ * @model()
365
+ * class RegistrationForm {
366
+ * // Page 1: Personal Information
367
+ * @attribute()
368
+ * @uipageprop(1)
369
+ * firstName: string;
370
+ *
371
+ * @attribute()
372
+ * @uipageprop(1)
373
+ * lastName: string;
374
+ *
375
+ * @attribute()
376
+ * @uipageprop(1)
377
+ * dateOfBirth: Date;
378
+ *
379
+ * // Page 2: Contact Information
380
+ * @attribute()
381
+ * @uipageprop(2)
382
+ * email: string;
383
+ *
384
+ * @attribute()
385
+ * @uipageprop(2)
386
+ * phone: string;
387
+ *
388
+ * // Page 3: Confirmation
389
+ * @attribute()
390
+ * @uipageprop(3)
391
+ * acceptTerms: boolean;
392
+ * }
393
+ *
394
+ * @mermaid
395
+ * sequenceDiagram
396
+ * participant Model
397
+ * participant uipageprop
398
+ * participant RenderingEngine
399
+ * participant PaginationController
400
+ * participant UI
401
+ * Model->>uipageprop: Apply to property
402
+ * uipageprop->>Model: Add page metadata
403
+ * RenderingEngine->>Model: Get page metadata
404
+ * Model->>RenderingEngine: Return page number
405
+ * RenderingEngine->>PaginationController: Group properties by page
406
+ * PaginationController->>UI: Render current page properties
407
+ */
408
+ export declare function uipageprop(page?: number): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/ui/decorators.ts"],"names":[],"mappings":";;AAgDA,wBAKC;AAgCD,0BAKC;AAsCD,wBAOC;AA4CD,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J,CAAC"}
@@ -28,3 +28,37 @@ export interface CrudFormField extends FieldProperties {
28
28
  */
29
29
  operation: CrudOperations;
30
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
+ }
package/lib/ui/types.d.ts CHANGED
@@ -86,7 +86,8 @@ export interface FieldProperties {
86
86
  multiple?: boolean;
87
87
  customTypes?: string | string[];
88
88
  options?: Record<string, unknown>[];
89
- pages?: number;
89
+ row?: number;
90
+ col?: number;
90
91
  page?: number;
91
92
  [UIKeys.EQUALS]?: string;
92
93
  [UIKeys.DIFF]?: string;
@@ -131,10 +132,10 @@ export type UIListPropMetadata = {
131
132
  props: Record<string, any>;
132
133
  };
133
134
  /**
134
- * @typedef UIListItemModelMetadata
135
+ * @typedef UIListModelMetadata
135
136
  * @memberOf module:ui-decorators
136
137
  */
137
- export type UIListItemModelMetadata = {
138
+ export type UIListModelMetadata = {
138
139
  item: UIListItemElementMetadata;
139
140
  };
140
141
  /**
@@ -152,8 +153,8 @@ export type UIListItemElementMetadata = {
152
153
  */
153
154
  export type UILayoutMetadata = {
154
155
  props: {
155
- cols?: number | string[];
156
- rows?: number;
156
+ cols?: number;
157
+ rows?: number | string[];
157
158
  props?: Record<string, any>;
158
159
  };
159
160
  };
@@ -161,16 +162,22 @@ export type UILayoutMetadata = {
161
162
  * @typedef UIClassMetadata
162
163
  * @memberOf module:ui-decorators
163
164
  */
164
- export type UIClassMetadata = UILayoutMetadata | UIModelMetadata | UIListItemModelMetadata;
165
+ export type UIClassMetadata = UILayoutMetadata | UIModelMetadata | UIListModelMetadata;
165
166
  /**
166
- * @typedef UILayoutItemMetadata
167
+ * @typedef UILayoutCol
167
168
  * @memberOf ui-decorators.ui.decorators
168
169
  */
169
- export type UILayoutItemMetadata = {
170
+ export type UILayoutCol = number | 'half' | 'full' | 'auto' | 'expand';
171
+ /**
172
+ * @typedef UILayoutPropMetadata
173
+ * @memberOf ui-decorators.ui.decorators
174
+ */
175
+ export type UILayoutPropMetadata = {
170
176
  name: string;
171
- props: Record<string, any>;
172
- col: number | string[];
173
- row: number | string[];
177
+ props: Record<string, any> & {
178
+ col: UILayoutCol;
179
+ row: number | string[];
180
+ };
174
181
  };
175
182
  /**
176
183
  * @typedef UIMediaBreakPoints
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/ui-decorators",
3
- "version": "0.5.27",
3
+ "version": "0.5.29",
4
4
  "description": "Extension of decorator validation to ui elements to allow for web integration",
5
5
  "type": "module",
6
6
  "exports": {
@@ -63,8 +63,16 @@
63
63
  "components",
64
64
  "forms",
65
65
  "validation",
66
+ "layouts",
67
+ "response",
68
+ "automatic",
66
69
  "react",
67
70
  "angular",
71
+ "vue",
72
+ "ionic",
73
+ "nextjs",
74
+ "web",
75
+ "mobile",
68
76
  "dynamic-ui"
69
77
  ],
70
78
  "author": "Tiago Venceslau and Contributors",
@@ -74,39 +82,12 @@
74
82
  },
75
83
  "homepage": "https://github.com/decaf-ts/ui-decorators#readme",
76
84
  "devDependencies": {
77
- "@decaf-ts/logging": "latest",
78
- "@decaf-ts/utils": "latest",
79
- "@eslint/js": "^9.25.1",
80
- "@stylistic/eslint-plugin": "^4.2.0",
81
- "@types/jest": "^29.5.14",
82
- "clean-publish": "^5.1.0",
83
- "dpdm": "^3.14.0",
84
- "eslint": "^9.25.1",
85
- "eslint-config-prettier": "^10.1.2",
86
- "eslint-plugin-prettier": "^5.2.6",
87
- "globals": "^16.0.0",
88
- "jest": "^29.7.0",
89
- "jest-html-reporters": "^3.1.7",
90
- "jest-junit": "^16.0.0",
91
- "jsdoc": "^4.0.4",
92
- "jsdoc-mermaid": "^1.0.0",
93
- "markdown-include": "^0.4.3",
94
- "minimist": "^1.2.8",
95
- "nodemon": "^3.1.9",
96
- "npm-check-updates": "^18.0.0",
97
- "prettier": "3.5.3",
98
- "rimraf": "^6.0.1",
99
- "ts-jest": "^29.3.2",
100
- "ts-loader": "^9.5.2",
101
- "ts-node": "^10.9.2",
102
- "typescript": "^5.8.3",
103
- "typescript-eslint": "^8.31.0"
85
+ "@decaf-ts/utils": "latest"
104
86
  },
105
- "peerDependencies": {
87
+ "dependencies": {
106
88
  "@decaf-ts/db-decorators": "latest",
107
89
  "@decaf-ts/decoration": "latest",
108
90
  "@decaf-ts/decorator-validation": "latest",
109
- "@decaf-ts/reflection": "latest",
110
- "reflect-metadata": "^0.2.1"
91
+ "@decaf-ts/reflection": "latest"
111
92
  }
112
93
  }