@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,555 +0,0 @@
1
- import { AfterViewInit, OnInit } from '@angular/core';
2
- import { HandlerLike, HTMLFormTarget, KeyValue } from '../../engine';
3
- import { CrudOperations, OperationKeys } from '@decaf-ts/db-decorators';
4
- import { IonAccordionGroup, ItemReorderEventDetail } from '@ionic/angular/standalone';
5
- import { FormArray } from '@angular/forms';
6
- import { NgxBaseComponent } from '../../engine';
7
- import { IFieldSetItem, IFieldSetValidationEvent } from '../../engine/interfaces';
8
- import * as i0 from "@angular/core";
9
- /**
10
- * @description Dynamic fieldset component with collapsible accordion functionality.
11
- * @summary This component provides a sophisticated fieldset container that automatically
12
- * adapts its behavior based on CRUD operations. It integrates seamlessly with Ionic's
13
- * accordion components to create expandable/collapsible sections for organizing form
14
- * content and related information. The component intelligently determines its initial
15
- * state based on the operation type, opening automatically for READ and DELETE operations
16
- * while remaining closed for CREATE and UPDATE operations.
17
- *
18
- * @example
19
- * ```html
20
- * <!-- Basic usage with automatic state management -->
21
- * <ngx-decaf-fieldset
22
- * name="Personal Information"
23
- * [operation]="OperationKeys.READ"
24
- * target="_self">
25
- * <ion-input label="Name" placeholder="Enter name"></ion-input>
26
- * <ion-input label="Email" type="email" placeholder="Enter email"></ion-input>
27
- * </ngx-decaf-fieldset>
28
- *
29
- * <!-- Advanced usage with custom operation -->
30
- * <ngx-decaf-fieldset
31
- * name="Contact Details"
32
- * [operation]="currentOperation"
33
- * target="_blank">
34
- * <!-- Complex form fields -->
35
- * </ngx-decaf-fieldset>
36
- * ```
37
- *
38
- * @mermaid
39
- * sequenceDiagram
40
- * participant U as User
41
- * participant F as FieldsetComponent
42
- * participant I as Ionic Accordion
43
- * participant D as DOM
44
- *
45
- * F->>F: ngAfterViewInit()
46
- * alt operation is READ or DELETE
47
- * F->>F: Set isOpen = true
48
- * F->>D: Query accordion element
49
- * F->>I: Set value attribute to 'open'
50
- * F->>F: Trigger change detection
51
- * end
52
- * U->>I: Click accordion header
53
- * I->>F: handleChange(event)
54
- * F->>F: Update isOpen state
55
- * F->>I: Reflect new state
56
- *
57
- * @memberOf FieldsetComponent
58
- */
59
- export declare class FieldsetComponent extends NgxBaseComponent implements OnInit, AfterViewInit {
60
- /**
61
- * @description Reference to the ion-accordion-group component for programmatic control.
62
- * @summary ViewChild reference that provides direct access to the Ionic accordion group component.
63
- * This enables programmatic control over the accordion's expand/collapse state, allowing
64
- * the component to open/close the accordion based on validation errors, CRUD operations,
65
- * or other business logic requirements.
66
- *
67
- * @type {IonAccordionGroup}
68
- * @memberOf FieldsetComponent
69
- */
70
- accordionComponent: IonAccordionGroup;
71
- /**
72
- * @description The display name or title of the fieldset section.
73
- * @summary Sets the legend or header text that appears in the accordion header. This text
74
- * provides a clear label for the collapsible section, helping users understand what content
75
- * is contained within. The name is displayed prominently and serves as the clickable area
76
- * for expanding/collapsing the fieldset.
77
- *
78
- * @type {string}
79
- * @default 'Child'
80
- * @memberOf FieldsetComponent
81
- */
82
- name: string;
83
- /**
84
- * @description The parent component identifier for hierarchical fieldset relationships.
85
- * @summary Specifies the parent component name that this fieldset belongs to in a hierarchical
86
- * form structure. This property is used for event bubbling and establishing parent-child
87
- * relationships between fieldsets in complex forms with nested structures.
88
- *
89
- * @type {string}
90
- * @default 'Child'
91
- * @memberOf FieldsetComponent
92
- */
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;
103
- /**
104
- * @description The parent component identifier for hierarchical fieldset relationships.
105
- * @summary Specifies the parent component name that this fieldset belongs to in a hierarchical
106
- * form structure. This property is used for event bubbling and establishing parent-child
107
- * relationships between fieldsets in complex forms with nested structures.
108
- *
109
- * @type {string}
110
- * @default 'Child'
111
- * @memberOf FieldsetComponent
112
- */
113
- uid: string;
114
- /**
115
- * @description Custom type definitions for specialized fieldset behavior.
116
- * @summary Defines custom data types or validation rules that should be applied to this fieldset.
117
- * Can be a single type string or array of types that determine how the fieldset handles
118
- * data validation, formatting, and display behavior for specialized use cases.
119
- *
120
- * @type {string | string[]}
121
- * @memberOf FieldsetComponent
122
- */
123
- customTypes: string | string[];
124
- /**
125
- * @description The current CRUD operation context.
126
- * @summary Determines the component's initial behavior and state based on the current operation.
127
- * This input is crucial for auto-state management: READ and DELETE operations automatically
128
- * open the fieldset to show content, while CREATE and UPDATE operations keep it closed
129
- * initially. This provides an intuitive user experience aligned with operation semantics.
130
- *
131
- * @type {OperationKeys}
132
- * @default OperationKeys.READ
133
- * @memberOf FieldsetComponent
134
- */
135
- /**
136
- * @description The CRUD operation type for the current fieldset context.
137
- * @summary Determines the component's initial behavior and state based on the current operation.
138
- * This input is crucial for auto-state management: READ and DELETE operations automatically
139
- * open the fieldset to show content, while CREATE and UPDATE operations keep it closed
140
- * initially. This provides an intuitive user experience aligned with operation semantics.
141
- *
142
- * @type {OperationKeys}
143
- * @default OperationKeys.READ
144
- * @memberOf FieldsetComponent
145
- */
146
- operation: OperationKeys;
147
- /**
148
- * @description Reactive form group associated with this fieldset.
149
- * @summary The FormGroup instance that contains all form controls within this fieldset.
150
- * Used for form validation, value management, and integration with Angular's reactive forms.
151
- *
152
- * @type {FormGroup}
153
- * @memberOf FieldsetComponent
154
- */
155
- formGroup: FormArray;
156
- /**
157
- * @description Primary title text for the fieldset content.
158
- * @summary Display title used for fieldset identification and content organization.
159
- * Provides semantic meaning to the grouped form fields.
160
- *
161
- * @type {string}
162
- * @memberOf FieldsetComponent
163
- */
164
- title: string;
165
- /**
166
- * @description Secondary descriptive text for the fieldset.
167
- * @summary Additional information that provides context or instructions
168
- * related to the fieldset content and purpose.
169
- *
170
- * @type {string}
171
- * @memberOf FieldsetComponent
172
- */
173
- description: string;
174
- /**
175
- * @description Form target attribute for nested form submissions.
176
- * @summary Specifies where to display the response after submitting forms contained within
177
- * the fieldset. This attribute mirrors the HTML form target behavior, allowing control over
178
- * whether form submissions open in the same window, new window, or specific frame. Useful
179
- * for complex form workflows and multi-step processes.
180
- *
181
- * @type {HTMLFormTarget}
182
- * @default '_self'
183
- * @memberOf FieldsetComponent
184
- */
185
- target: HTMLFormTarget;
186
- /**
187
- * @description Enables multiple item management within the fieldset.
188
- * @summary Boolean flag that determines if the fieldset supports adding multiple values.
189
- * When true, displays a reorderable list of items with add/remove functionality.
190
- *
191
- * @type {boolean}
192
- * @default false
193
- * @memberOf FieldsetComponent
194
- */
195
- multiple: boolean;
196
- /**
197
- * @description Array of raw values stored in the fieldset.
198
- * @summary Contains the actual data values that have been added to the fieldset.
199
- * This is the source of truth for the fieldset's data state.
200
- *
201
- * @type {KeyValue[]}
202
- * @default []
203
- * @memberOf FieldsetComponent
204
- */
205
- value: KeyValue[];
206
- /**
207
- * @description Event handler functions for custom fieldset actions.
208
- * @summary A record of event handler functions keyed by event names that can be triggered
209
- * within the fieldset. These handlers provide extensibility for custom business logic
210
- * and can be invoked for various fieldset operations and user interactions.
211
- *
212
- * @type {HandlerLike}
213
- * @memberOf FieldsetComponent
214
- */
215
- handlers: HandlerLike;
216
- /**
217
- * @description Array of formatted items for UI display.
218
- * @summary Contains the processed items ready for display in the component template.
219
- * These items are mapped from the raw values using the mapper configuration.
220
- *
221
- * @type {IFieldSetItem[]}
222
- * @default []
223
- * @memberOf FieldsetComponent
224
- */
225
- items: IFieldSetItem[];
226
- /**
227
- * @description Currently selected item for update operations.
228
- * @summary Holds the item being edited when in update mode. Used to track
229
- * which item is being modified and apply changes to the correct item.
230
- *
231
- * @type {IFieldSetItem | undefined}
232
- * @memberOf FieldsetComponent
233
- */
234
- updatingItem: IFieldSetItem | undefined;
235
- /**
236
- * @description Current state of the accordion (expanded or collapsed).
237
- * @summary Boolean flag that tracks whether the fieldset accordion is currently open or closed.
238
- * This property is automatically managed based on user interactions and initial operation state.
239
- * It serves as the single source of truth for the component's visibility state and is used
240
- * to coordinate between user actions and programmatic state changes. The value is automatically
241
- * set based on CRUD operations during initialization and updated through user interactions.
242
- *
243
- * @type {boolean}
244
- * @default false
245
- * @memberOf FieldsetComponent
246
- */
247
- isOpen: boolean;
248
- /**
249
- * @description Indicates whether the fieldset contains required form fields.
250
- * @summary Boolean flag that signals the presence of mandatory input fields within the fieldset.
251
- * This property is automatically set by the CollapsableDirective when required fields are detected,
252
- * and can be used to apply special styling, validation logic, or UI indicators to highlight
253
- * fieldsets that contain mandatory information. It helps with form validation feedback and
254
- * user experience by making required sections more prominent.
255
- *
256
- * @type {boolean}
257
- * @default false
258
- * @memberOf FieldsetComponent
259
- */
260
- isRequired: boolean;
261
- /**
262
- * @description Indicates whether the fieldset contains validation errors.
263
- * @summary Boolean flag that tracks if any form fields within the fieldset have validation errors.
264
- * This property is used to control accordion behavior when errors are present, preventing
265
- * users from collapsing the accordion when they need to see and address validation issues.
266
- * It's automatically updated when validation error events are received from child form fields.
267
- *
268
- * @type {boolean}
269
- * @default false
270
- * @memberOf FieldsetComponent
271
- */
272
- hasValidationErrors: boolean;
273
- /**
274
- * @description Validation error message for duplicate values.
275
- * @summary Stores the error message when a user attempts to add a duplicate value
276
- * to the fieldset. Used to display uniqueness validation feedback.
277
- *
278
- * @type {string | undefined}
279
- * @memberOf FieldsetComponent
280
- */
281
- isUniqueError: string | undefined;
282
- /**
283
- * @description Reference to CRUD operation constants for template usage.
284
- * @summary Exposes the OperationKeys enum to the component template, enabling conditional
285
- * rendering and behavior based on operation types. This protected readonly property ensures
286
- * that template logic can access operation constants while maintaining encapsulation and
287
- * preventing accidental modification of the enum values.
288
- *
289
- * @type {CrudOperations}
290
- * @default OperationKeys.CREATE
291
- * @memberOf FieldsetComponent
292
- */
293
- protected readonly OperationKeys: CrudOperations;
294
- /**
295
- * @description Angular change detection service.
296
- * @summary Injected service that provides manual control over change detection cycles.
297
- * This is essential for ensuring that programmatic DOM changes (like setting accordion
298
- * attributes) are properly reflected in the component's state and trigger appropriate
299
- * view updates when modifications occur outside the normal Angular change detection flow.
300
- *
301
- * @private
302
- * @type {ChangeDetectorRef}
303
- * @memberOf FieldsetComponent
304
- */
305
- private changeDetectorRef;
306
- /**
307
- * @description Angular Renderer2 service for safe DOM manipulation.
308
- * @summary Injected service that provides a safe, platform-agnostic way to manipulate DOM elements.
309
- * This service ensures proper handling of DOM operations across different platforms and environments,
310
- * including server-side rendering and web workers.
311
- *
312
- * @private
313
- * @type {Renderer2}
314
- * @memberOf FieldsetComponent
315
- */
316
- private renderer;
317
- /**
318
- * @description Translation service for internationalization.
319
- * @summary Injected service that provides translation capabilities for UI text.
320
- * Used to translate button labels and validation messages based on the current locale.
321
- *
322
- * @private
323
- * @type {TranslateService}
324
- * @memberOf FieldsetComponent
325
- */
326
- private translateService;
327
- /**
328
- * @description Localized label text for action buttons.
329
- * @summary Dynamic button label that changes based on the current operation mode.
330
- * Shows "Add" for create operations and "Update" for edit operations.
331
- *
332
- * @type {string}
333
- * @memberOf FieldsetComponent
334
- */
335
- buttonLabel: string;
336
- /**
337
- * @description Localized label text for action buttons.
338
- * @summary Dynamic button label that changes based on the current operation mode.
339
- * Shows "Cancel" for update operations
340
- *
341
- * @type {string}
342
- * @memberOf FieldsetComponent
343
- */
344
- buttonCancelLabel: string;
345
- /**
346
- * @description Component constructor that initializes the fieldset with icons and component name.
347
- * @summary Calls the parent NgxBaseComponent constructor with the component name and
348
- * required Ionic icons (alertCircleOutline for validation errors and createOutline for add actions).
349
- * Sets up the foundational component structure and icon registry.
350
- *
351
- * @memberOf FieldsetComponent
352
- */
353
- constructor();
354
- /**
355
- * @description Component initialization lifecycle method.
356
- * @summary Initializes the component by setting up repository relationships if a model exists,
357
- * and configures the initial button label for the add action based on the current locale.
358
- * This method ensures proper setup of translation services and component state.
359
- *
360
- * @returns {void}
361
- * @memberOf FieldsetComponent
362
- */
363
- ngOnInit(): void;
364
- /**
365
- * @description Initializes the component state after view and child components are rendered.
366
- * @summary This lifecycle hook implements intelligent auto-state management based on the current
367
- * CRUD operation. For READ and DELETE operations, the fieldset automatically opens to provide
368
- * immediate access to information, while CREATE and UPDATE operations keep it closed to maintain
369
- * a clean initial interface. The method directly manipulates the DOM to ensure proper accordion
370
- * synchronization and triggers change detection to reflect the programmatic state changes.
371
- *
372
- * @mermaid
373
- * sequenceDiagram
374
- * participant A as Angular Lifecycle
375
- * participant F as FieldsetComponent
376
- * participant D as DOM
377
- * participant C as ChangeDetector
378
- *
379
- * A->>F: ngAfterViewInit()
380
- * alt operation is READ or DELETE
381
- * F->>F: Set isOpen = true
382
- * F->>D: Query ion-accordion-group element
383
- * alt accordion element exists
384
- * F->>D: Set value attribute to 'open'
385
- * end
386
- * end
387
- * F->>C: detectChanges()
388
- * C->>F: Update view with new state
389
- *
390
- * @returns {void}
391
- * @memberOf FieldsetComponent
392
- */
393
- ngAfterViewInit(): void;
394
- /**
395
- * @description Handles removal of the fieldset with slide animation.
396
- * @summary Initiates the removal process for the fieldset with a smooth slide-up animation.
397
- * The method applies CSS classes for the slide animation and then safely removes the
398
- * element from the DOM using Renderer2. This provides a polished user experience
399
- * when removing fieldset instances from dynamic forms.
400
- *
401
- * @param {Event} event - DOM event from the remove button click
402
- * @returns {void}
403
- * @memberOf FieldsetComponent
404
- */
405
- handleRemoveComponent(event: Event): void;
406
- /**
407
- * @description Handles creating new items or triggering group addition events.
408
- * @summary Processes form validation events for item creation or emits events to trigger
409
- * the addition of new fieldset groups. When called with validation event data, it validates
410
- * uniqueness and adds the item to the fieldset. When called without parameters, it triggers
411
- * a group addition event for parent components to handle.
412
- *
413
- * @param {CustomEvent<IFieldSetValidationEvent>} [event] - Optional validation event containing form data
414
- * @returns {Promise<void>}
415
- * @memberOf FieldsetComponent
416
- *
417
- * @example
418
- * ```typescript
419
- * // Called from form validation
420
- * handleCreateItem(validationEvent);
421
- *
422
- * // Called to trigger group addition
423
- * handleCreateItem();
424
- * ```
425
- */
426
- handleCreateItem(event?: CustomEvent<IFieldSetValidationEvent>): Promise<void>;
427
- /**
428
- * @description Handles item update operations with form state management.
429
- * @summary Locates an item in the form array for editing and prepares the component
430
- * for update mode. Updates the button label to reflect the edit state and stores
431
- * the item being updated. Triggers a window event to notify parent components.
432
- *
433
- * @param {string | number} value - The identifier value of the item to update
434
- * @param {number} index - The array index position of the item
435
- * @returns {void}
436
- * @memberOf FieldsetComponent
437
- */
438
- handleUpdateItem(value: string | number, index: number): void;
439
- /**
440
- * @description Cancels the update mode and resets the UI state.
441
- * @summary Exits the update mode by resetting the button label and clearing the updating item,
442
- * restoring the component to its default state for adding new items. Notifies parent components
443
- * that the update operation has been cancelled.
444
- *
445
- * @returns {void}
446
- * @memberOf FieldsetComponent
447
- */
448
- handleCancelUpdateItem(): void;
449
- /**
450
- * @description Handles item removal operations with form array management.
451
- * @summary Processes item removal by either handling validation events or removing specific
452
- * items from the form array. When called with a validation event, it triggers value updates.
453
- * When called with an identifier, it locates and removes the matching item from the form array.
454
- *
455
- * @param {string | undefined} value - The identifier of the item to remove
456
- * @param {CustomEvent} [event] - Optional validation event for form updates
457
- * @returns {void}
458
- * @memberOf FieldsetComponent
459
- */
460
- handleRemoveItem(value: string | undefined, event?: CustomEvent): void;
461
- /**
462
- * @description Handles reordering of items within the fieldset list.
463
- * @summary Processes drag-and-drop reorder events from the ion-reorder-group component.
464
- * Updates both the display items array and the underlying value array to maintain
465
- * consistency between UI state and data state. Preserves item indices after reordering.
466
- *
467
- * @param {CustomEvent<ItemReorderEventDetail>} event - Ionic reorder event containing source and target indices
468
- * @returns {void}
469
- * @memberOf FieldsetComponent
470
- *
471
- * @example
472
- * ```html
473
- * <ion-reorder-group (ionItemReorder)="handleReorder($event)">
474
- * <!-- Reorderable items -->
475
- * </ion-reorder-group>
476
- * ```
477
- */
478
- handleReorderItems(event: CustomEvent<ItemReorderEventDetail>): void;
479
- /**
480
- * @description Handles accordion state change events from user interactions.
481
- * @summary Processes CustomEvent objects triggered when users expand or collapse the accordion.
482
- * This method extracts the new state from the event details and updates the component's
483
- * internal state accordingly. It specifically listens for ION-ACCORDION-GROUP events to
484
- * ensure proper event source validation and prevent handling of unrelated events.
485
- *
486
- * @param {CustomEvent} event - The event object containing accordion state change details
487
- * @returns {void}
488
- *
489
- * @mermaid
490
- * sequenceDiagram
491
- * participant U as User
492
- * participant I as Ion-Accordion
493
- * participant F as FieldsetComponent
494
- *
495
- * U->>I: Click accordion header
496
- * I->>F: handleChange(CustomEvent)
497
- * F->>F: Extract target and detail from event
498
- * F->>F: Validate target is ION-ACCORDION-GROUP
499
- * alt valid target
500
- * F->>F: Update isOpen = !!value
501
- * end
502
- * F->>I: Reflect updated state
503
- *
504
- * @memberOf FieldsetComponent
505
- */
506
- /**
507
- * @description Handles accordion toggle functionality with validation error consideration.
508
- * @summary Manages the expand/collapse state of the accordion while respecting validation error states.
509
- * When validation errors are present, the accordion cannot be collapsed to ensure users can see
510
- * and address the errors. When no errors exist, users can freely toggle the accordion state.
511
- * This method also stops event propagation to prevent unwanted side effects.
512
- *
513
- * @param {CustomEvent} [event] - Optional event object from user interaction
514
- * @returns {void}
515
- * @memberOf FieldsetComponent
516
- */
517
- handleAccordionToggle(event?: CustomEvent): void;
518
- /**
519
- * @description Handles validation error events from child form fields.
520
- * @summary Processes validation error events dispatched by form fields within the fieldset.
521
- * When errors are detected, the accordion is forced open and prevented from collapsing
522
- * to ensure users can see the validation messages. This method updates the component's
523
- * error state and accordion visibility accordingly.
524
- *
525
- * @param {CustomEvent} event - Custom event containing validation error details
526
- * @returns {void}
527
- * @memberOf FieldsetComponent
528
- */
529
- handleValidationError(event: CustomEvent): void;
530
- /**
531
- * @description Processes and stores a new or updated value in the fieldset.
532
- * @summary Handles both create and update operations for fieldset items. Parses and cleans
533
- * the input value, determines the operation type based on the updating state, and either
534
- * adds a new item or updates an existing one. Maintains data integrity and UI consistency.
535
- *
536
- * @returns {void}
537
- * @private
538
- * @memberOf FieldsetComponent
539
- */
540
- private setValue;
541
- /**
542
- * @description Automatically configures the field mapping based on the value structure.
543
- * @summary Analyzes the provided value object to automatically determine the primary key
544
- * and create appropriate field mappings for display purposes. Sets up the mapper object
545
- * with title, description, and index fields based on the available data structure.
546
- *
547
- * @param {KeyValue} value - Sample value object used to determine field mappings
548
- * @returns {KeyValue} The configured mapper object
549
- * @private
550
- * @memberOf FieldsetComponent
551
- */
552
- private getMapper;
553
- static ɵfac: i0.ɵɵFactoryDeclaration<FieldsetComponent, 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>;
555
- }