@decaf-ts/for-angular 0.0.22 → 0.0.24

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 (46) hide show
  1. package/components/component-renderer/component-renderer.component.d.ts +3 -2
  2. package/components/crud-field/crud-field.component.d.ts +4 -2
  3. package/components/fieldset/fieldset.component.d.ts +10 -1
  4. package/components/for-angular-components.module.d.ts +3 -2
  5. package/components/index.d.ts +1 -1
  6. package/components/layout/layout.component.d.ts +1 -24
  7. package/components/list/list.component.d.ts +1 -2
  8. package/components/model-renderer/model-renderer.component.d.ts +6 -1
  9. package/components/steped-form/steped-form.component.d.ts +243 -0
  10. package/engine/NgxBaseComponent.d.ts +3 -3
  11. package/engine/NgxCrudFormField.d.ts +1 -0
  12. package/engine/NgxFormService.d.ts +381 -48
  13. package/engine/NgxRenderingEngine.d.ts +4 -2
  14. package/engine/constants.d.ts +12 -0
  15. package/engine/interfaces.d.ts +1 -1
  16. package/engine/types.d.ts +17 -3
  17. package/esm2022/components/component-renderer/component-renderer.component.mjs +10 -4
  18. package/esm2022/components/crud-field/crud-field.component.mjs +14 -3
  19. package/esm2022/components/crud-form/crud-form.component.mjs +3 -3
  20. package/esm2022/components/empty-state/empty-state.component.mjs +2 -2
  21. package/esm2022/components/fieldset/fieldset.component.mjs +6 -4
  22. package/esm2022/components/for-angular-components.module.mjs +10 -5
  23. package/esm2022/components/index.mjs +2 -2
  24. package/esm2022/components/layout/layout.component.mjs +4 -29
  25. package/esm2022/components/list/list.component.mjs +5 -4
  26. package/esm2022/components/model-renderer/model-renderer.component.mjs +10 -3
  27. package/esm2022/components/steped-form/steped-form.component.mjs +291 -0
  28. package/esm2022/engine/NgxBaseComponent.mjs +12 -12
  29. package/esm2022/engine/NgxCrudFormField.mjs +19 -17
  30. package/esm2022/engine/NgxFormService.mjs +438 -57
  31. package/esm2022/engine/NgxRenderingEngine.mjs +21 -10
  32. package/esm2022/engine/ValidatorFactory.mjs +4 -4
  33. package/esm2022/engine/constants.mjs +6 -1
  34. package/esm2022/engine/interfaces.mjs +1 -1
  35. package/esm2022/engine/types.mjs +1 -1
  36. package/esm2022/for-angular-common.module.mjs +4 -2
  37. package/esm2022/i18n/Loader.mjs +4 -4
  38. package/fesm2022/decaf-ts-for-angular.mjs +830 -153
  39. package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
  40. package/for-angular-common.module.d.ts +8 -2
  41. package/i18n/Loader.d.ts +2 -7
  42. package/package.json +9 -9
  43. package/assets/i18n/en.json +0 -80
  44. package/assets/i18n/pt.json +0 -80
  45. package/components/list/constants.d.ts +0 -25
  46. package/esm2022/components/list/constants.mjs +0 -6
@@ -98,6 +98,7 @@ export declare class ComponentRendererComponent implements OnInit, OnDestroy {
98
98
  * @memberOf ComponentRendererComponent
99
99
  */
100
100
  component: ComponentRef<unknown>;
101
+ children: KeyValue[];
101
102
  /**
102
103
  * @description Event emitter for events from the rendered component.
103
104
  * @summary This output property emits events that originate from the dynamically rendered
@@ -216,7 +217,7 @@ export declare class ComponentRendererComponent implements OnInit, OnDestroy {
216
217
  * @memberOf ComponentRendererComponent
217
218
  */
218
219
  private createComponent;
219
- createParentComponent(): void;
220
+ private createParentComponent;
220
221
  /**
221
222
  * @description Subscribes to events emitted by the dynamic component.
222
223
  * @summary This method sets up subscriptions to all EventEmitter properties of the
@@ -273,5 +274,5 @@ export declare class ComponentRendererComponent implements OnInit, OnDestroy {
273
274
  */
274
275
  private unsubscribeEvents;
275
276
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentRendererComponent, never>;
276
- static ɵcmp: i0.ɵɵComponentDeclaration<ComponentRendererComponent, "ngx-decaf-component-renderer", never, { "tag": { "alias": "tag"; "required": true; }; "globals": { "alias": "globals"; "required": false; }; "model": { "alias": "model"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; }, { "listenEvent": "listenEvent"; }, never, never, true, never>;
277
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComponentRendererComponent, "ngx-decaf-component-renderer", never, { "tag": { "alias": "tag"; "required": true; }; "globals": { "alias": "globals"; "required": false; }; "children": { "alias": "children"; "required": false; }; "model": { "alias": "model"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; }, { "listenEvent": "listenEvent"; }, never, never, true, never>;
277
278
  }
@@ -4,6 +4,7 @@ import { AutocompleteTypes, SelectInterface } from '@ionic/core';
4
4
  import { CrudOperations } from '@decaf-ts/db-decorators';
5
5
  import { NgxCrudFormField } from '../../engine/NgxCrudFormField';
6
6
  import { CrudFieldOption, FieldUpdateMode, PossibleInputTypes, StringOrBoolean } from '../../engine/types';
7
+ import { CrudOperationKeys } from '@decaf-ts/ui-decorators';
7
8
  import * as i0 from "@angular/core";
8
9
  /**
9
10
  * @description A dynamic form field component for CRUD operations.
@@ -161,7 +162,7 @@ export declare class CrudFieldComponent extends NgxCrudFormField implements OnIn
161
162
  * @type {boolean}
162
163
  * @memberOf CrudFieldComponent
163
164
  */
164
- hidden?: boolean;
165
+ hidden: boolean | CrudOperationKeys[];
165
166
  /**
166
167
  * @description Maximum allowed value for the field.
167
168
  * @summary For number inputs, this sets the maximum allowed numeric value.
@@ -479,6 +480,7 @@ export declare class CrudFieldComponent extends NgxCrudFormField implements OnIn
479
480
  * @type {string | number}
480
481
  */
481
482
  uid: string;
483
+ page: number;
482
484
  /**
483
485
  * @description Translatability of field labels.
484
486
  * @summary Indicates whether the field labels should be translated based on the current language settings.
@@ -605,5 +607,5 @@ export declare class CrudFieldComponent extends NgxCrudFormField implements OnIn
605
607
  */
606
608
  handleFieldsetRemoveGroupEvent(event: CustomEvent): void;
607
609
  static ɵfac: i0.ɵɵFactoryDeclaration<CrudFieldComponent, never>;
608
- static ɵcmp: i0.ɵɵComponentDeclaration<CrudFieldComponent, "ngx-decaf-crud-field", never, { "operation": { "alias": "operation"; "required": true; }; "name": { "alias": "name"; "required": true; }; "path": { "alias": "path"; "required": true; }; "childOf": { "alias": "childOf"; "required": false; }; "type": { "alias": "type"; "required": true; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "format": { "alias": "format"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "max": { "alias": "max"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "min": { "alias": "min"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "step": { "alias": "step"; "required": false; }; "equals": { "alias": "equals"; "required": false; }; "different": { "alias": "different"; "required": false; }; "lessThan": { "alias": "lessThan"; "required": false; }; "lessThanOrEqual": { "alias": "lessThanOrEqual"; "required": false; }; "greaterThan": { "alias": "greaterThan"; "required": false; }; "greaterThanOrEqual": { "alias": "greaterThanOrEqual"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "cancelText": { "alias": "cancelText"; "required": false; }; "interface": { "alias": "interface"; "required": false; }; "options": { "alias": "options"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "spellcheck": { "alias": "spellcheck"; "required": false; }; "inputmode": { "alias": "inputmode"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; }; "updateOn": { "alias": "updateOn"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "translatable": { "alias": "translatable"; "required": false; }; "activeFormGroup": { "alias": "activeFormGroup"; "required": false; }; "pk": { "alias": "pk"; "required": false; }; }, {}, never, never, true, never>;
610
+ static ɵcmp: i0.ɵɵComponentDeclaration<CrudFieldComponent, "ngx-decaf-crud-field", never, { "operation": { "alias": "operation"; "required": true; }; "name": { "alias": "name"; "required": true; }; "path": { "alias": "path"; "required": true; }; "childOf": { "alias": "childOf"; "required": false; }; "type": { "alias": "type"; "required": true; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "format": { "alias": "format"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "max": { "alias": "max"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "min": { "alias": "min"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "step": { "alias": "step"; "required": false; }; "equals": { "alias": "equals"; "required": false; }; "different": { "alias": "different"; "required": false; }; "lessThan": { "alias": "lessThan"; "required": false; }; "lessThanOrEqual": { "alias": "lessThanOrEqual"; "required": false; }; "greaterThan": { "alias": "greaterThan"; "required": false; }; "greaterThanOrEqual": { "alias": "greaterThanOrEqual"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "cancelText": { "alias": "cancelText"; "required": false; }; "interface": { "alias": "interface"; "required": false; }; "options": { "alias": "options"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "spellcheck": { "alias": "spellcheck"; "required": false; }; "inputmode": { "alias": "inputmode"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; }; "updateOn": { "alias": "updateOn"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "page": { "alias": "page"; "required": false; }; "translatable": { "alias": "translatable"; "required": false; }; "activeFormGroup": { "alias": "activeFormGroup"; "required": false; }; "pk": { "alias": "pk"; "required": false; }; }, {}, never, never, true, never>;
609
611
  }
@@ -91,6 +91,15 @@ export declare class FieldsetComponent extends NgxBaseComponent implements OnIni
91
91
  * @memberOf FieldsetComponent
92
92
  */
93
93
  childOf: string;
94
+ /**
95
+ * @description Unique identifier for the current record.
96
+ * @summary A unique identifier for the current record being displayed or manipulated.
97
+ * This is typically used in conjunction with the primary key for operations on specific records.
98
+ *
99
+ * @type {string | number}
100
+ * @memberOf FieldsetComponent
101
+ */
102
+ page: number;
94
103
  /**
95
104
  * @description The parent component identifier for hierarchical fieldset relationships.
96
105
  * @summary Specifies the parent component name that this fieldset belongs to in a hierarchical
@@ -542,5 +551,5 @@ export declare class FieldsetComponent extends NgxBaseComponent implements OnIni
542
551
  */
543
552
  private getMapper;
544
553
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldsetComponent, never>;
545
- static ɵcmp: i0.ɵɵComponentDeclaration<FieldsetComponent, "ngx-decaf-fieldset", never, { "name": { "alias": "name"; "required": false; }; "childOf": { "alias": "childOf"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "customTypes": { "alias": "customTypes"; "required": false; }; "operation": { "alias": "operation"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "target": { "alias": "target"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "value": { "alias": "value"; "required": false; }; "handlers": { "alias": "handlers"; "required": false; }; }, {}, never, ["*"], true, never>;
554
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldsetComponent, "ngx-decaf-fieldset", never, { "name": { "alias": "name"; "required": false; }; "childOf": { "alias": "childOf"; "required": false; }; "page": { "alias": "page"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "customTypes": { "alias": "customTypes"; "required": false; }; "operation": { "alias": "operation"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "target": { "alias": "target"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "value": { "alias": "value"; "required": false; }; "handlers": { "alias": "handlers"; "required": false; }; }, {}, never, ["[slot=content]"], true, never>;
546
555
  }
@@ -11,9 +11,10 @@ import * as i9 from "./pagination/pagination.component";
11
11
  import * as i10 from "./fieldset/fieldset.component";
12
12
  import * as i11 from "./layout/layout.component";
13
13
  import * as i12 from "./filter/filter.component";
14
- import * as i13 from "../directives/collapsable.directive";
14
+ import * as i13 from "./steped-form/steped-form.component";
15
+ import * as i14 from "../directives/collapsable.directive";
15
16
  export declare class ForAngularComponentsModule {
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<ForAngularComponentsModule, never>;
17
- static ɵmod: i0.ɵɵNgModuleDeclaration<ForAngularComponentsModule, never, [typeof i1.ModelRendererComponent, typeof i2.ComponentRendererComponent, typeof i3.CrudFieldComponent, typeof i4.CrudFormComponent, typeof i5.EmptyStateComponent, typeof i6.ListComponent, typeof i7.ListItemComponent, typeof i8.SearchbarComponent, typeof i9.PaginationComponent, typeof i4.CrudFormComponent, typeof i10.FieldsetComponent, typeof i11.LayoutComponent, typeof i12.FilterComponent, typeof i13.CollapsableDirective], [typeof i1.ModelRendererComponent, typeof i2.ComponentRendererComponent, typeof i3.CrudFieldComponent, typeof i4.CrudFormComponent, typeof i5.EmptyStateComponent, typeof i6.ListComponent, typeof i7.ListItemComponent, typeof i8.SearchbarComponent, typeof i9.PaginationComponent, typeof i4.CrudFormComponent, typeof i10.FieldsetComponent, typeof i11.LayoutComponent, typeof i12.FilterComponent, typeof i13.CollapsableDirective]>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ForAngularComponentsModule, never, [typeof i1.ModelRendererComponent, typeof i2.ComponentRendererComponent, typeof i3.CrudFieldComponent, typeof i4.CrudFormComponent, typeof i5.EmptyStateComponent, typeof i6.ListComponent, typeof i7.ListItemComponent, typeof i8.SearchbarComponent, typeof i9.PaginationComponent, typeof i4.CrudFormComponent, typeof i10.FieldsetComponent, typeof i11.LayoutComponent, typeof i12.FilterComponent, typeof i13.StepedFormComponent, typeof i14.CollapsableDirective], [typeof i1.ModelRendererComponent, typeof i2.ComponentRendererComponent, typeof i3.CrudFieldComponent, typeof i4.CrudFormComponent, typeof i5.EmptyStateComponent, typeof i6.ListComponent, typeof i7.ListItemComponent, typeof i8.SearchbarComponent, typeof i9.PaginationComponent, typeof i4.CrudFormComponent, typeof i10.FieldsetComponent, typeof i11.LayoutComponent, typeof i12.FilterComponent, typeof i13.StepedFormComponent, typeof i14.CollapsableDirective]>;
18
19
  static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularComponentsModule>;
19
20
  }
@@ -11,6 +11,6 @@ export * from './model-renderer/model-renderer.component';
11
11
  export * from './pagination/pagination.component';
12
12
  export * from './searchbar/searchbar.component';
13
13
  export * from './crud-form/constants';
14
- export * from './list/constants';
15
14
  export * from './pagination/constants';
15
+ export * from './steped-form/steped-form.component';
16
16
  export * from './for-angular-components.module';
@@ -104,30 +104,7 @@ export declare class LayoutComponent extends NgxBaseComponent implements OnInit
104
104
  *
105
105
  * @memberOf LayoutComponent
106
106
  */
107
- ngOnInit(): void;
108
- /**
109
- * @description Initializes the layout component with processed properties.
110
- * @summary Overrides the base component's initialize method to set up the grid layout.
111
- * This method processes input properties, normalizes the breakpoint value, converts
112
- * rows and columns to their array representations, and marks the component as initialized.
113
- * The initialization ensures all properties are in the correct format for rendering.
114
- *
115
- * @mermaid
116
- * sequenceDiagram
117
- * participant L as LayoutComponent
118
- * participant B as NgxBaseComponent
119
- *
120
- * L->>B: parseProps(this)
121
- * Note over L: Process component properties
122
- * L->>L: Normalize breakpoint to lowercase
123
- * L->>L: Convert rows to array format
124
- * L->>L: Convert cols to array format
125
- * L->>L: Set initialized = true
126
- *
127
- * @override
128
- * @memberOf LayoutComponent
129
- */
130
- initialize(): void;
107
+ ngOnInit(): Promise<void>;
131
108
  static ɵfac: i0.ɵɵFactoryDeclaration<LayoutComponent, never>;
132
109
  static ɵcmp: i0.ɵɵComponentDeclaration<LayoutComponent, "ngx-decaf-layout", never, { "cols": { "alias": "cols"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "breakpoint": { "alias": "breakpoint"; "required": false; }; "children": { "alias": "children"; "required": false; }; }, {}, never, never, true, never>;
133
110
  }
@@ -6,8 +6,7 @@ import { Condition, OrderDirection, Paginator } from '@decaf-ts/core';
6
6
  import { BaseCustomEvent, RendererCustomEvent, StringOrBoolean, KeyValue, ListItemCustomEvent } from '../../engine';
7
7
  import { NgxBaseComponent } from '../../engine/NgxBaseComponent';
8
8
  import { PaginationCustomEvent } from '../pagination/constants';
9
- import { IListEmptyResult, ListComponentsTypes } from './constants';
10
- import { FunctionLike, IFilterQuery } from '../../engine';
9
+ import { FunctionLike, IFilterQuery, IListEmptyResult, ListComponentsTypes } from '../../engine';
11
10
  import * as i0 from "@angular/core";
12
11
  /**
13
12
  * @description A versatile list component that supports various data display modes.
@@ -41,6 +41,11 @@ export declare class ModelRendererComponent<M extends Model> implements OnChange
41
41
  * @description Global variables to be passed to the rendered component
42
42
  */
43
43
  globals: Record<string, unknown>;
44
+ /**
45
+ * @description Set if render content projection is allowed
46
+ * @default true
47
+ */
48
+ projectable: boolean;
44
49
  /**
45
50
  * @description Template reference for inner content
46
51
  */
@@ -88,5 +93,5 @@ export declare class ModelRendererComponent<M extends Model> implements OnChange
88
93
  private unsubscribeEvents;
89
94
  protected readonly JSON: JSON;
90
95
  static ɵfac: i0.ɵɵFactoryDeclaration<ModelRendererComponent<any>, never>;
91
- static ɵcmp: i0.ɵɵComponentDeclaration<ModelRendererComponent<any>, "ngx-decaf-model-renderer", never, { "model": { "alias": "model"; "required": true; }; "globals": { "alias": "globals"; "required": false; }; "rendererId": { "alias": "rendererId"; "required": false; }; }, { "listenEvent": "listenEvent"; }, never, never, true, never>;
96
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModelRendererComponent<any>, "ngx-decaf-model-renderer", never, { "model": { "alias": "model"; "required": true; }; "globals": { "alias": "globals"; "required": false; }; "projectable": { "alias": "projectable"; "required": false; }; "rendererId": { "alias": "rendererId"; "required": false; }; }, { "listenEvent": "listenEvent"; }, never, never, true, never>;
92
97
  }
@@ -0,0 +1,243 @@
1
+ import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
2
+ import { FormArray, FormGroup } from '@angular/forms';
3
+ import { UIModelMetadata } from '@decaf-ts/ui-decorators';
4
+ import { CrudOperations } from '@decaf-ts/db-decorators';
5
+ import { BaseCustomEvent } from '../../engine';
6
+ import * as i0 from "@angular/core";
7
+ export declare class StepedFormComponent implements OnInit, OnDestroy {
8
+ /**
9
+ * @description Number of pages in the stepped form.
10
+ * @summary Represents the total number of steps/pages in the multi-step form.
11
+ * This value is automatically calculated based on the page properties of the children
12
+ * or can be explicitly set. Each page represents a logical group of form fields.
13
+ *
14
+ * @type {number}
15
+ * @default 1
16
+ * @memberOf StepedFormComponent
17
+ */
18
+ pages: number;
19
+ /**
20
+ * @description The CRUD operation type for this form.
21
+ * @summary Defines the type of operation being performed (CREATE, READ, UPDATE, DELETE).
22
+ * This affects form behavior, validation rules, and field accessibility. For example,
23
+ * READ operations might disable form fields, while CREATE operations enable all fields.
24
+ *
25
+ * @type {CrudOperations}
26
+ * @default OperationKeys.CREATE
27
+ * @memberOf StepedFormComponent
28
+ */
29
+ operation: CrudOperations;
30
+ /**
31
+ * @description The initial page to display when the form loads.
32
+ * @summary Specifies which page of the multi-step form should be shown first.
33
+ * This allows starting the form at any step, useful for scenarios like editing
34
+ * existing data where you might want to jump to a specific section.
35
+ *
36
+ * @type {number}
37
+ * @default 1
38
+ * @memberOf StepedFormComponent
39
+ */
40
+ startPage: number;
41
+ /**
42
+ * @description Array of UI model metadata for all form fields.
43
+ * @summary Contains the complete collection of UI model metadata that defines
44
+ * the structure, validation, and presentation of form fields across all pages.
45
+ * Each metadata object contains information about field type, validation rules,
46
+ * page assignment, and display properties.
47
+ *
48
+ * @type {UIModelMetadata[]}
49
+ * @memberOf StepedFormComponent
50
+ */
51
+ children: UIModelMetadata[];
52
+ /**
53
+ * @description Angular reactive FormGroup or FormArray for form state management.
54
+ * @summary The form instance that manages all form controls, validation, and form state.
55
+ * When using FormArray, each array element represents a page's FormGroup. When using
56
+ * FormGroup, it contains all form controls for the entire stepped form.
57
+ *
58
+ * @type {FormGroup | FormArray | undefined}
59
+ * @memberOf StepedFormComponent
60
+ */
61
+ formGroup: FormGroup | FormArray | undefined;
62
+ /**
63
+ * @description Array of UI model metadata for the currently active page.
64
+ * @summary Contains only the UI model metadata for fields that should be displayed
65
+ * on the currently active page. This is a filtered subset of the children array,
66
+ * updated whenever the user navigates between pages.
67
+ *
68
+ * @type {UIModelMetadata[] | undefined}
69
+ * @memberOf StepedFormComponent
70
+ */
71
+ activeChildren: UIModelMetadata[] | undefined;
72
+ /**
73
+ * @description FormGroup for the currently active page.
74
+ * @summary The FormGroup instance that manages form controls and validation
75
+ * for the current page only. This is extracted from the main formGroup
76
+ * when using FormArray structure.
77
+ *
78
+ * @type {FormGroup | undefined}
79
+ * @memberOf StepedFormComponent
80
+ */
81
+ activeFormGroup: FormGroup | undefined;
82
+ /**
83
+ * @description The currently active page number.
84
+ * @summary Tracks which page of the multi-step form is currently being displayed.
85
+ * This property is updated as users navigate through the form steps using
86
+ * the next/back buttons or programmatic navigation.
87
+ *
88
+ * @type {number}
89
+ * @memberOf StepedFormComponent
90
+ */
91
+ activePage: number;
92
+ /**
93
+ * @description Array representing the structure of pages.
94
+ * @summary Contains metadata about each page, including page numbers and indices.
95
+ * This array is built during initialization to organize the form fields into
96
+ * logical pages and provide navigation structure.
97
+ *
98
+ * @type {UIModelMetadata[]}
99
+ * @memberOf StepedFormComponent
100
+ */
101
+ pagesArray: UIModelMetadata[];
102
+ /**
103
+ * @description Subscription for timer-based operations.
104
+ * @summary Manages the timer subscription used for asynchronous operations
105
+ * like updating active children after page transitions. This subscription
106
+ * is cleaned up in ngOnDestroy to prevent memory leaks.
107
+ *
108
+ * @private
109
+ * @type {Subscription}
110
+ * @memberOf StepedFormComponent
111
+ */
112
+ private timerSubscription;
113
+ /**
114
+ * @description Event emitter for form submission.
115
+ * @summary Emits events when the form is submitted, typically on the last page
116
+ * when all validation passes. The emitted event contains the form data and
117
+ * event type information for parent components to handle.
118
+ *
119
+ * @type {EventEmitter<BaseCustomEvent>}
120
+ * @memberOf StepedFormComponent
121
+ */
122
+ submitEvent: EventEmitter<BaseCustomEvent>;
123
+ /**
124
+ * @description Creates an instance of StepedFormComponent.
125
+ * @summary Initializes a new StepedFormComponent instance and registers the required
126
+ * Ionic icons for navigation buttons (forward and back arrows).
127
+ *
128
+ * @memberOf StepedFormComponent
129
+ */
130
+ constructor();
131
+ /**
132
+ * @description Initializes the component after Angular first displays the data-bound properties.
133
+ * @summary Sets up the stepped form by organizing children into pages, calculating the total
134
+ * number of pages, and initializing the active page. This method processes the UI model metadata
135
+ * to create a logical page structure and ensures proper page assignments for all form fields.
136
+ *
137
+ * @mermaid
138
+ * sequenceDiagram
139
+ * participant A as Angular Lifecycle
140
+ * participant S as StepedFormComponent
141
+ * participant F as Form Service
142
+ *
143
+ * A->>S: ngOnInit()
144
+ * S->>S: Set activePage = startPage
145
+ * S->>S: Process children into pagesArray
146
+ * S->>S: Calculate total pages
147
+ * S->>S: Assign page props to children
148
+ * S->>S: getCurrentFormGroup(activePage)
149
+ * S->>F: Extract FormGroup for active page
150
+ * F-->>S: Return activeFormGroup
151
+ *
152
+ * @memberOf StepedFormComponent
153
+ */
154
+ ngOnInit(): void;
155
+ /**
156
+ * @description Cleanup method called when the component is destroyed.
157
+ * @summary Unsubscribes from any active timer subscriptions to prevent memory leaks.
158
+ * This is part of Angular's component lifecycle and ensures proper resource cleanup.
159
+ *
160
+ * @memberOf StepedFormComponent
161
+ */
162
+ ngOnDestroy(): void;
163
+ /**
164
+ * @description Handles navigation to the next page or form submission.
165
+ * @summary Validates the current page's form fields and either navigates to the next page
166
+ * or submits the entire form if on the last page. Form validation must pass before
167
+ * proceeding. On successful submission, emits a submit event with form data.
168
+ *
169
+ * @param {boolean} lastPage - Whether this is the last page of the form
170
+ * @return {void}
171
+ *
172
+ * @mermaid
173
+ * sequenceDiagram
174
+ * participant U as User
175
+ * participant S as StepedFormComponent
176
+ * participant F as Form Service
177
+ * participant P as Parent Component
178
+ *
179
+ * U->>S: Click Next/Submit
180
+ * S->>F: validateFields(activeFormGroup)
181
+ * F-->>S: Return validation result
182
+ * alt Not last page and valid
183
+ * S->>S: activePage++
184
+ * S->>S: getCurrentFormGroup(activePage)
185
+ * else Last page and valid
186
+ * S->>F: getFormData(formGroup)
187
+ * F-->>S: Return form data
188
+ * S->>P: submitEvent.emit({data, name: SUBMIT})
189
+ * end
190
+ *
191
+ * @memberOf StepedFormComponent
192
+ */
193
+ handleNext(lastPage?: boolean): void;
194
+ /**
195
+ * @description Handles navigation to the previous page.
196
+ * @summary Moves the user back to the previous page in the stepped form.
197
+ * This method decrements the active page number and updates the form
198
+ * group and children to display the previous page's content.
199
+ *
200
+ * @return {void}
201
+ *
202
+ * @mermaid
203
+ * sequenceDiagram
204
+ * participant U as User
205
+ * participant S as StepedFormComponent
206
+ *
207
+ * U->>S: Click Back
208
+ * S->>S: activePage--
209
+ * S->>S: getCurrentFormGroup(activePage)
210
+ * Note over S: Update active form and children
211
+ *
212
+ * @memberOf StepedFormComponent
213
+ */
214
+ handleBack(): void;
215
+ /**
216
+ * @description Updates the active form group and children for the specified page.
217
+ * @summary Extracts the FormGroup for the given page from the FormArray and filters
218
+ * the children to show only fields belonging to that page. Uses a timer to ensure
219
+ * proper Angular change detection when updating the activeChildren.
220
+ *
221
+ * @param {number} page - The page number to activate
222
+ * @return {void}
223
+ *
224
+ * @private
225
+ * @mermaid
226
+ * sequenceDiagram
227
+ * participant S as StepedFormComponent
228
+ * participant F as FormArray
229
+ * participant T as Timer
230
+ *
231
+ * S->>F: Extract FormGroup at index (page - 1)
232
+ * F-->>S: Return page FormGroup
233
+ * S->>S: Set activeChildren = undefined
234
+ * S->>T: timer(10).subscribe()
235
+ * T-->>S: Filter children for active page
236
+ * S->>S: Set activeChildren
237
+ *
238
+ * @memberOf StepedFormComponent
239
+ */
240
+ private getCurrentFormGroup;
241
+ static ɵfac: i0.ɵɵFactoryDeclaration<StepedFormComponent, never>;
242
+ static ɵcmp: i0.ɵɵComponentDeclaration<StepedFormComponent, "ngx-decaf-steped-form", never, { "pages": { "alias": "pages"; "required": false; }; "operation": { "alias": "operation"; "required": false; }; "startPage": { "alias": "startPage"; "required": false; }; "children": { "alias": "children"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; }, { "submitEvent": "submitEvent"; }, never, never, true, never>;
243
+ }
@@ -4,7 +4,7 @@ import { Model } from '@decaf-ts/decorator-validation';
4
4
  import { CrudOperations } from '@decaf-ts/db-decorators';
5
5
  import { NgxRenderingEngine } from './NgxRenderingEngine';
6
6
  import { Logger } from '@decaf-ts/logging';
7
- import { DecafRepository } from '../components/list/constants';
7
+ import { DecafRepository } from './types';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
10
  * @description Base component class that provides common functionality for all Decaf components.
@@ -461,7 +461,7 @@ export declare abstract class NgxBaseComponent implements OnChanges {
461
461
  * an initialization message with the component name. This method is typically called
462
462
  * during the component's lifecycle setup.
463
463
  */
464
- initialize(): void;
464
+ initialize(parseProps?: boolean, skip?: string[]): Promise<void>;
465
465
  /**
466
466
  * @description Handles custom events from child components.
467
467
  * @summary Receives events from child renderer components and forwards them to parent
@@ -535,7 +535,7 @@ export declare abstract class NgxBaseComponent implements OnChanges {
535
535
  * @protected
536
536
  * @memberOf NgxBaseComponent
537
537
  */
538
- protected parseProps(instance: KeyValue): void;
538
+ protected parseProps(instance: KeyValue, skip: string[]): void;
539
539
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxBaseComponent, never>;
540
540
  static ɵcmp: i0.ɵɵComponentDeclaration<NgxBaseComponent, "ng-component", never, { "rendererId": { "alias": "rendererId"; "required": false; }; "model": { "alias": "model"; "required": false; }; "props": { "alias": "props"; "required": false; }; "item": { "alias": "item"; "required": false; }; "pk": { "alias": "pk"; "required": false; }; "route": { "alias": "route"; "required": false; }; "operations": { "alias": "operations"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "mapper": { "alias": "mapper"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "translatable": { "alias": "translatable"; "required": false; }; "className": { "alias": "className"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "renderChild": { "alias": "renderChild"; "required": false; }; }, { "listenEvent": "listenEvent"; }, never, never, true, never>;
541
541
  }
@@ -35,6 +35,7 @@ export declare abstract class NgxCrudFormField implements ControlValueAccessor,
35
35
  type: PossibleInputTypes;
36
36
  disabled?: boolean;
37
37
  uid?: string;
38
+ page: number;
38
39
  format?: string;
39
40
  hidden?: boolean | CrudOperationKeys[];
40
41
  max?: number | Date;