@decaf-ts/for-angular 0.0.24 → 0.0.26

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 (78) hide show
  1. package/fesm2022/decaf-ts-for-angular.mjs +1512 -1517
  2. package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
  3. package/index.d.ts +7470 -3
  4. package/package.json +14 -17
  5. package/components/component-renderer/component-renderer.component.d.ts +0 -278
  6. package/components/crud-field/crud-field.component.d.ts +0 -611
  7. package/components/crud-form/constants.d.ts +0 -5
  8. package/components/crud-form/crud-form.component.d.ts +0 -288
  9. package/components/crud-form/types.d.ts +0 -17
  10. package/components/empty-state/empty-state.component.d.ts +0 -300
  11. package/components/fieldset/fieldset.component.d.ts +0 -555
  12. package/components/filter/filter.component.d.ts +0 -514
  13. package/components/for-angular-components.module.d.ts +0 -20
  14. package/components/index.d.ts +0 -16
  15. package/components/layout/layout.component.d.ts +0 -110
  16. package/components/list/list.component.d.ts +0 -848
  17. package/components/list-item/list-item.component.d.ts +0 -390
  18. package/components/model-renderer/model-renderer.component.d.ts +0 -97
  19. package/components/pagination/constants.d.ts +0 -7
  20. package/components/pagination/pagination.component.d.ts +0 -264
  21. package/components/searchbar/searchbar.component.d.ts +0 -407
  22. package/components/steped-form/steped-form.component.d.ts +0 -243
  23. package/directives/collapsable.directive.d.ts +0 -9
  24. package/directives/index.d.ts +0 -1
  25. package/engine/DynamicModule.d.ts +0 -17
  26. package/engine/NgxBaseComponent.d.ts +0 -541
  27. package/engine/NgxCrudFormField.d.ts +0 -123
  28. package/engine/NgxFormService.d.ts +0 -601
  29. package/engine/NgxRenderingEngine.d.ts +0 -282
  30. package/engine/ValidatorFactory.d.ts +0 -15
  31. package/engine/constants.d.ts +0 -168
  32. package/engine/decorators.d.ts +0 -25
  33. package/engine/index.d.ts +0 -18
  34. package/engine/interfaces.d.ts +0 -271
  35. package/engine/types.d.ts +0 -200
  36. package/esm2022/components/component-renderer/component-renderer.component.mjs +0 -321
  37. package/esm2022/components/crud-field/crud-field.component.mjs +0 -518
  38. package/esm2022/components/crud-form/constants.mjs +0 -14
  39. package/esm2022/components/crud-form/crud-form.component.mjs +0 -259
  40. package/esm2022/components/crud-form/types.mjs +0 -2
  41. package/esm2022/components/empty-state/empty-state.component.mjs +0 -345
  42. package/esm2022/components/fieldset/fieldset.component.mjs +0 -677
  43. package/esm2022/components/filter/filter.component.mjs +0 -700
  44. package/esm2022/components/for-angular-components.module.mjs +0 -84
  45. package/esm2022/components/index.mjs +0 -20
  46. package/esm2022/components/layout/layout.component.mjs +0 -150
  47. package/esm2022/components/list/list.component.mjs +0 -1238
  48. package/esm2022/components/list-item/list-item.component.mjs +0 -405
  49. package/esm2022/components/model-renderer/model-renderer.component.mjs +0 -144
  50. package/esm2022/components/pagination/constants.mjs +0 -2
  51. package/esm2022/components/pagination/pagination.component.mjs +0 -321
  52. package/esm2022/components/searchbar/searchbar.component.mjs +0 -491
  53. package/esm2022/components/steped-form/steped-form.component.mjs +0 -291
  54. package/esm2022/decaf-ts-for-angular.mjs +0 -5
  55. package/esm2022/directives/collapsable.directive.mjs +0 -29
  56. package/esm2022/directives/index.mjs +0 -2
  57. package/esm2022/engine/DynamicModule.mjs +0 -18
  58. package/esm2022/engine/NgxBaseComponent.mjs +0 -541
  59. package/esm2022/engine/NgxCrudFormField.mjs +0 -137
  60. package/esm2022/engine/NgxFormService.mjs +0 -917
  61. package/esm2022/engine/NgxRenderingEngine.mjs +0 -376
  62. package/esm2022/engine/ValidatorFactory.mjs +0 -106
  63. package/esm2022/engine/constants.mjs +0 -170
  64. package/esm2022/engine/decorators.mjs +0 -38
  65. package/esm2022/engine/index.mjs +0 -19
  66. package/esm2022/engine/interfaces.mjs +0 -4
  67. package/esm2022/engine/types.mjs +0 -2
  68. package/esm2022/for-angular-common.module.mjs +0 -84
  69. package/esm2022/helpers/index.mjs +0 -13
  70. package/esm2022/helpers/utils.mjs +0 -436
  71. package/esm2022/i18n/Loader.mjs +0 -86
  72. package/esm2022/i18n/data/en.json +0 -80
  73. package/esm2022/public-apis.mjs +0 -15
  74. package/for-angular-common.module.d.ts +0 -50
  75. package/helpers/index.d.ts +0 -12
  76. package/helpers/utils.d.ts +0 -279
  77. package/i18n/Loader.d.ts +0 -43
  78. package/public-apis.d.ts +0 -14
@@ -1,243 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class CollapsableDirective implements OnInit {
4
- private element;
5
- private injector;
6
- ngOnInit(): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<CollapsableDirective, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<CollapsableDirective, "[decafCollapsable]", never, {}, {}, never, never, true, never>;
9
- }
@@ -1 +0,0 @@
1
- export * from './collapsable.directive';
@@ -1,17 +0,0 @@
1
- /**
2
- * @description Abstract base class for dynamic Angular modules
3
- * @summary The DynamicModule serves as a base class for Angular modules that need to be
4
- * dynamically loaded or configured at runtime. It provides a common type for the rendering
5
- * engine to identify and work with dynamic modules.
6
- * @class DynamicModule
7
- * @example
8
- * ```typescript
9
- * @NgModule({
10
- * declarations: [MyComponent],
11
- * imports: [CommonModule]
12
- * })
13
- * export class MyDynamicModule extends DynamicModule {}
14
- * ```
15
- */
16
- export declare abstract class DynamicModule {
17
- }