@decaf-ts/for-angular 0.0.25 → 0.0.27

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 +1486 -1505
  2. package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
  3. package/index.d.ts +7482 -3
  4. package/package.json +15 -18
  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/stepped-form/stepped-form.component.d.ts +0 -255
  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/stepped-form/stepped-form.component.mjs +0 -306
  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 -85
  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,255 +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 SteppedFormComponent implements OnInit, OnDestroy {
8
- /**
9
- * @description The locale to be used for translations.
10
- * @summary Specifies the locale identifier to use when translating component text.
11
- * This can be set explicitly via input property to override the automatically derived
12
- * locale from the component name. The locale is typically a language code (e.g., 'en', 'fr')
13
- * or a language-region code (e.g., 'en-US', 'fr-CA') that determines which translation
14
- * set to use for the component's text content.
15
- *
16
- * @type {string}
17
- * @memberOf SteppedFormComponent
18
- */
19
- locale: string;
20
- /**
21
- * @description Number of pages in the stepped form.
22
- * @summary Represents the total number of steps/pages in the multi-step form.
23
- * This value is automatically calculated based on the page properties of the children
24
- * or can be explicitly set. Each page represents a logical group of form fields.
25
- *
26
- * @type {number}
27
- * @default 1
28
- * @memberOf SteppedFormComponent
29
- */
30
- pages: number;
31
- /**
32
- * @description The CRUD operation type for this form.
33
- * @summary Defines the type of operation being performed (CREATE, READ, UPDATE, DELETE).
34
- * This affects form behavior, validation rules, and field accessibility. For example,
35
- * READ operations might disable form fields, while CREATE operations enable all fields.
36
- *
37
- * @type {CrudOperations}
38
- * @default OperationKeys.CREATE
39
- * @memberOf SteppedFormComponent
40
- */
41
- operation: CrudOperations;
42
- /**
43
- * @description The initial page to display when the form loads.
44
- * @summary Specifies which page of the multi-step form should be shown first.
45
- * This allows starting the form at any step, useful for scenarios like editing
46
- * existing data where you might want to jump to a specific section.
47
- *
48
- * @type {number}
49
- * @default 1
50
- * @memberOf SteppedFormComponent
51
- */
52
- startPage: number;
53
- /**
54
- * @description Array of UI model metadata for all form fields.
55
- * @summary Contains the complete collection of UI model metadata that defines
56
- * the structure, validation, and presentation of form fields across all pages.
57
- * Each metadata object contains information about field type, validation rules,
58
- * page assignment, and display properties.
59
- *
60
- * @type {UIModelMetadata[]}
61
- * @memberOf SteppedFormComponent
62
- */
63
- children: UIModelMetadata[];
64
- /**
65
- * @description Angular reactive FormGroup or FormArray for form state management.
66
- * @summary The form instance that manages all form controls, validation, and form state.
67
- * When using FormArray, each array element represents a page's FormGroup. When using
68
- * FormGroup, it contains all form controls for the entire stepped form.
69
- *
70
- * @type {FormGroup | FormArray | undefined}
71
- * @memberOf SteppedFormComponent
72
- */
73
- formGroup: FormGroup | FormArray | undefined;
74
- /**
75
- * @description Array of UI model metadata for the currently active page.
76
- * @summary Contains only the UI model metadata for fields that should be displayed
77
- * on the currently active page. This is a filtered subset of the children array,
78
- * updated whenever the user navigates between pages.
79
- *
80
- * @type {UIModelMetadata[] | undefined}
81
- * @memberOf SteppedFormComponent
82
- */
83
- activeChildren: UIModelMetadata[] | undefined;
84
- /**
85
- * @description FormGroup for the currently active page.
86
- * @summary The FormGroup instance that manages form controls and validation
87
- * for the current page only. This is extracted from the main formGroup
88
- * when using FormArray structure.
89
- *
90
- * @type {FormGroup | undefined}
91
- * @memberOf SteppedFormComponent
92
- */
93
- activeFormGroup: FormGroup | undefined;
94
- /**
95
- * @description The currently active page number.
96
- * @summary Tracks which page of the multi-step form is currently being displayed.
97
- * This property is updated as users navigate through the form steps using
98
- * the next/back buttons or programmatic navigation.
99
- *
100
- * @type {number}
101
- * @memberOf SteppedFormComponent
102
- */
103
- activePage: number;
104
- /**
105
- * @description Array representing the structure of pages.
106
- * @summary Contains metadata about each page, including page numbers and indices.
107
- * This array is built during initialization to organize the form fields into
108
- * logical pages and provide navigation structure.
109
- *
110
- * @type {UIModelMetadata[]}
111
- * @memberOf SteppedFormComponent
112
- */
113
- pagesArray: UIModelMetadata[];
114
- /**
115
- * @description Subscription for timer-based operations.
116
- * @summary Manages the timer subscription used for asynchronous operations
117
- * like updating active children after page transitions. This subscription
118
- * is cleaned up in ngOnDestroy to prevent memory leaks.
119
- *
120
- * @private
121
- * @type {Subscription}
122
- * @memberOf SteppedFormComponent
123
- */
124
- private timerSubscription;
125
- /**
126
- * @description Event emitter for form submission.
127
- * @summary Emits events when the form is submitted, typically on the last page
128
- * when all validation passes. The emitted event contains the form data and
129
- * event type information for parent components to handle.
130
- *
131
- * @type {EventEmitter<BaseCustomEvent>}
132
- * @memberOf SteppedFormComponent
133
- */
134
- submitEvent: EventEmitter<BaseCustomEvent>;
135
- /**
136
- * @description Creates an instance of SteppedFormComponent.
137
- * @summary Initializes a new SteppedFormComponent instance and registers the required
138
- * Ionic icons for navigation buttons (forward and back arrows).
139
- *
140
- * @memberOf SteppedFormComponent
141
- */
142
- constructor();
143
- /**
144
- * @description Initializes the component after Angular first displays the data-bound properties.
145
- * @summary Sets up the stepped form by organizing children into pages, calculating the total
146
- * number of pages, and initializing the active page. This method processes the UI model metadata
147
- * to create a logical page structure and ensures proper page assignments for all form fields.
148
- *
149
- * @mermaid
150
- * sequenceDiagram
151
- * participant A as Angular Lifecycle
152
- * participant S as SteppedFormComponent
153
- * participant F as Form Service
154
- *
155
- * A->>S: ngOnInit()
156
- * S->>S: Set activePage = startPage
157
- * S->>S: Process children into pagesArray
158
- * S->>S: Calculate total pages
159
- * S->>S: Assign page props to children
160
- * S->>S: getCurrentFormGroup(activePage)
161
- * S->>F: Extract FormGroup for active page
162
- * F-->>S: Return activeFormGroup
163
- *
164
- * @memberOf SteppedFormComponent
165
- */
166
- ngOnInit(): void;
167
- /**
168
- * @description Cleanup method called when the component is destroyed.
169
- * @summary Unsubscribes from any active timer subscriptions to prevent memory leaks.
170
- * This is part of Angular's component lifecycle and ensures proper resource cleanup.
171
- *
172
- * @memberOf SteppedFormComponent
173
- */
174
- ngOnDestroy(): void;
175
- /**
176
- * @description Handles navigation to the next page or form submission.
177
- * @summary Validates the current page's form fields and either navigates to the next page
178
- * or submits the entire form if on the last page. Form validation must pass before
179
- * proceeding. On successful submission, emits a submit event with form data.
180
- *
181
- * @param {boolean} lastPage - Whether this is the last page of the form
182
- * @return {void}
183
- *
184
- * @mermaid
185
- * sequenceDiagram
186
- * participant U as User
187
- * participant S as SteppedFormComponent
188
- * participant F as Form Service
189
- * participant P as Parent Component
190
- *
191
- * U->>S: Click Next/Submit
192
- * S->>F: validateFields(activeFormGroup)
193
- * F-->>S: Return validation result
194
- * alt Not last page and valid
195
- * S->>S: activePage++
196
- * S->>S: getCurrentFormGroup(activePage)
197
- * else Last page and valid
198
- * S->>F: getFormData(formGroup)
199
- * F-->>S: Return form data
200
- * S->>P: submitEvent.emit({data, name: SUBMIT})
201
- * end
202
- *
203
- * @memberOf SteppedFormComponent
204
- */
205
- handleNext(lastPage?: boolean): void;
206
- /**
207
- * @description Handles navigation to the previous page.
208
- * @summary Moves the user back to the previous page in the stepped form.
209
- * This method decrements the active page number and updates the form
210
- * group and children to display the previous page's content.
211
- *
212
- * @return {void}
213
- *
214
- * @mermaid
215
- * sequenceDiagram
216
- * participant U as User
217
- * participant S as SteppedFormComponent
218
- *
219
- * U->>S: Click Back
220
- * S->>S: activePage--
221
- * S->>S: getCurrentFormGroup(activePage)
222
- * Note over S: Update active form and children
223
- *
224
- * @memberOf SteppedFormComponent
225
- */
226
- handleBack(): void;
227
- /**
228
- * @description Updates the active form group and children for the specified page.
229
- * @summary Extracts the FormGroup for the given page from the FormArray and filters
230
- * the children to show only fields belonging to that page. Uses a timer to ensure
231
- * proper Angular change detection when updating the activeChildren.
232
- *
233
- * @param {number} page - The page number to activate
234
- * @return {void}
235
- *
236
- * @private
237
- * @mermaid
238
- * sequenceDiagram
239
- * participant S as SteppedFormComponent
240
- * participant F as FormArray
241
- * participant T as Timer
242
- *
243
- * S->>F: Extract FormGroup at index (page - 1)
244
- * F-->>S: Return page FormGroup
245
- * S->>S: Set activeChildren = undefined
246
- * S->>T: timer(10).subscribe()
247
- * T-->>S: Filter children for active page
248
- * S->>S: Set activeChildren
249
- *
250
- * @memberOf SteppedFormComponent
251
- */
252
- private getCurrentFormGroup;
253
- static ɵfac: i0.ɵɵFactoryDeclaration<SteppedFormComponent, never>;
254
- static ɵcmp: i0.ɵɵComponentDeclaration<SteppedFormComponent, "ngx-decaf-stepped-form", never, { "locale": { "alias": "locale"; "required": false; }; "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>;
255
- }
@@ -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
- }