@decaf-ts/for-angular 0.0.31 → 0.0.33
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.
- package/README.md +1 -1
- package/assets/images/decaf-logo-lw.svg +2 -2
- package/fesm2022/decaf-ts-for-angular.mjs +2884 -2466
- package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
- package/index.d.ts +1202 -1266
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,219 +1,219 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, Type, Injector, EnvironmentInjector, ComponentMirror, ViewContainerRef, ComponentRef, TemplateRef, OnChanges, EventEmitter, SimpleChanges, OnInit, OnDestroy, AfterViewInit, InjectionToken, Provider, ModuleWithProviders } from '@angular/core';
|
|
3
|
-
import { IonInput, IonSelect, IonTextarea, IonCheckbox, SpinnerTypes, InfiniteScrollCustomEvent, RefresherCustomEvent } from '@ionic/angular';
|
|
4
|
-
import { TextFieldTypes, SelectInterface, AutocompleteTypes, PredefinedColors } from '@ionic/core';
|
|
2
|
+
import { ElementRef, Type, Injector, EnvironmentInjector, ComponentMirror, ViewContainerRef, ComponentRef, TemplateRef, OnChanges, ChangeDetectorRef, Renderer2, EventEmitter, SimpleChanges, OnInit, OnDestroy, AfterViewInit, InjectionToken, Provider, ModuleWithProviders } from '@angular/core';
|
|
5
3
|
import * as i2 from '@angular/forms';
|
|
6
|
-
import { FormGroup,
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { FormGroup, FormArray, FormControl, ControlValueAccessor, AbstractControl } from '@angular/forms';
|
|
5
|
+
import { Repository, Adapter, OrderDirection, Paginator, Condition } from '@decaf-ts/core';
|
|
6
|
+
import { IonInput, IonSelect, IonTextarea, IonCheckbox, MenuController, SpinnerTypes, InfiniteScrollCustomEvent, RefresherCustomEvent } from '@ionic/angular';
|
|
7
|
+
import { TextFieldTypes, SelectInterface, AutocompleteTypes, CheckboxCustomEvent, PredefinedColors } from '@ionic/core';
|
|
9
8
|
import { RepositoryFlags, Context, CrudOperations, OperationKeys } from '@decaf-ts/db-decorators';
|
|
10
9
|
import * as _decaf_ts_decorator_validation from '@decaf-ts/decorator-validation';
|
|
11
|
-
import { Model, Constructor } from '@decaf-ts/decorator-validation';
|
|
12
|
-
import {
|
|
10
|
+
import { Model, Constructor, ModelConstructor } from '@decaf-ts/decorator-validation';
|
|
11
|
+
import { FieldProperties, CrudOperationKeys, RenderingEngine, FieldDefinition, UIModelMetadata, UIMediaBreakPointsType } from '@decaf-ts/ui-decorators';
|
|
12
|
+
import { LoggedClass, Logger } from '@decaf-ts/logging';
|
|
13
|
+
import { Router } from '@angular/router';
|
|
13
14
|
import * as i3 from '@ngx-translate/core';
|
|
14
|
-
import { TranslateService, TranslateLoader, TranslationObject } from '@ngx-translate/core';
|
|
15
|
-
import { SafeHtml } from '@angular/platform-browser';
|
|
15
|
+
import { TranslateService, TranslateLoader, TranslationObject, TranslateParser, RootTranslateServiceConfig } from '@ngx-translate/core';
|
|
16
|
+
import { Title, SafeHtml } from '@angular/platform-browser';
|
|
16
17
|
import { IonAccordionGroup, ItemReorderEventDetail } from '@ionic/angular/standalone';
|
|
17
18
|
import { Subscription, Observable } from 'rxjs';
|
|
19
|
+
import { NgxParentComponentDirective as NgxParentComponentDirective$1 } from 'src/lib/engine/NgxParentComponentDirective';
|
|
18
20
|
import { InjectablesRegistry } from '@decaf-ts/injectable-decorators';
|
|
19
21
|
import { HttpClient } from '@angular/common/http';
|
|
20
22
|
import * as i1 from '@angular/common';
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
|
-
* @
|
|
24
|
-
* @
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
* @module module:lib/engine/types
|
|
26
|
+
* @description Shared type aliases and helper types used by the rendering engine and components.
|
|
27
|
+
* @summary Defines common TypeScript types, typedefs, and unions used across engine, components,
|
|
28
|
+
* and form helpers (e.g., KeyValue, FunctionLike, AngularFieldDefinition, FieldUpdateMode).
|
|
29
|
+
*
|
|
30
|
+
* @link {@link KeyValue}
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
type HandlerLike = Record<string, (...args: unknown[]) => unknown | Promise<unknown>>;
|
|
34
|
+
interface RawQuery<M extends Model> {
|
|
35
|
+
select: undefined | (keyof M)[];
|
|
36
|
+
from: Constructor<M>;
|
|
37
|
+
where: (el: M) => boolean;
|
|
38
|
+
sort?: (el: M, el2: M) => number;
|
|
39
|
+
limit?: number;
|
|
40
|
+
skip?: number;
|
|
41
|
+
}
|
|
42
|
+
type DecafRepositoryAdapter<F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = Adapter<any, any, RawQuery<any>, F, C>;
|
|
43
|
+
type DecafRepository<M extends Model> = Repository<M, RawQuery<M>, DecafRepositoryAdapter<RepositoryFlags, Context<RepositoryFlags>>, RepositoryFlags, Context<RepositoryFlags>>;
|
|
44
|
+
/**
|
|
45
|
+
* @description Generic key-value pair type
|
|
46
|
+
* @summary Represents a generic object with string keys and any type of values.
|
|
47
|
+
* This is commonly used for dynamic data structures where the properties are not known at compile time.
|
|
48
|
+
* @typedef {Record<string, any>} KeyValue
|
|
40
49
|
* @memberOf module:engine
|
|
41
50
|
*/
|
|
42
|
-
|
|
43
|
-
REFLECT: string;
|
|
44
|
-
DYNAMIC: string;
|
|
45
|
-
ANNOTATIONS: string;
|
|
46
|
-
ECMP: string;
|
|
47
|
-
NG_REFLECT: string;
|
|
48
|
-
RENDERED: string;
|
|
49
|
-
MAPPER: string;
|
|
50
|
-
CHILDREN: string;
|
|
51
|
-
LISTABLE: string;
|
|
52
|
-
RENDER: string;
|
|
53
|
-
RENDERED_ID: string;
|
|
54
|
-
PARENT: string;
|
|
55
|
-
VALIDATION_PARENT_KEY: symbol;
|
|
56
|
-
FORM_GROUP_COMPONENT_PROPS: string;
|
|
57
|
-
};
|
|
51
|
+
type KeyValue = Record<string, any>;
|
|
58
52
|
/**
|
|
59
|
-
* @description
|
|
60
|
-
* @summary
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @
|
|
64
|
-
* @property {string} INVALID - Constant representing an invalid form state
|
|
65
|
-
* @const FormConstants
|
|
53
|
+
* @description Generic function type
|
|
54
|
+
* @summary Represents a function that accepts any number of arguments of any type
|
|
55
|
+
* and returns any type. This is useful for defining function parameters or variables
|
|
56
|
+
* where the exact function signature is not known at compile time.
|
|
57
|
+
* @typedef FunctionLike
|
|
66
58
|
* @memberOf module:engine
|
|
67
59
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
60
|
+
type FunctionLike = (...args: any[]) => any;
|
|
61
|
+
/**
|
|
62
|
+
* @description Element size options for UI components
|
|
63
|
+
* @summary Defines the possible size values that can be applied to UI elements.
|
|
64
|
+
* These sizes control the dimensions and layout behavior of components.
|
|
65
|
+
* @typedef {('small'|'medium'|'large'|'xlarge'|'2xlarge'|'auto'|'expand'|'block')} ElementSizes
|
|
66
|
+
* @memberOf module:engine
|
|
67
|
+
*/
|
|
68
|
+
type ElementSizes = 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | 'auto' | 'expand' | 'block';
|
|
69
|
+
/**
|
|
70
|
+
* @description Basic position options for UI elements
|
|
71
|
+
* @summary Defines the possible position values that can be applied to UI elements.
|
|
72
|
+
* These positions control the alignment and placement of components.
|
|
73
|
+
* @typedef {('left'|'center'|'right'|'top'|'bottom')} ElementPositions
|
|
74
|
+
* @memberOf module:engine
|
|
75
|
+
*/
|
|
76
|
+
type ElementPositions = 'left' | 'center' | 'right' | 'top' | 'bottom';
|
|
77
|
+
/**
|
|
78
|
+
* @description Extended position options for flex layouts
|
|
79
|
+
* @summary Extends the basic ElementPositions with additional flex-specific position values.
|
|
80
|
+
* These positions are used for controlling alignment and distribution in flex containers.
|
|
81
|
+
* @typedef {(ElementPositions|'stretch'|'middle'|'around'|'between')} FlexPositions
|
|
82
|
+
* @memberOf module:engine
|
|
83
|
+
*/
|
|
84
|
+
type FlexPositions = ElementPositions | 'stretch' | 'middle' | 'around' | 'between';
|
|
85
|
+
/**
|
|
86
|
+
* @description Update mode options for form fields
|
|
87
|
+
* @summary Defines when form field values should be updated in the model.
|
|
88
|
+
* - 'change': Update on every change event
|
|
89
|
+
* - 'blur': Update when the field loses focus
|
|
90
|
+
* - 'submit': Update only when the form is submitted
|
|
91
|
+
* @typedef {('change'|'blur'|'submit')} FieldUpdateMode
|
|
92
|
+
* @memberOf module:engine
|
|
93
|
+
*/
|
|
94
|
+
type FieldUpdateMode = 'change' | 'blur' | 'submit';
|
|
95
|
+
/**
|
|
96
|
+
* @description Possible input types for form fields
|
|
97
|
+
* @summary Defines the possible input types that can be used in form fields.
|
|
98
|
+
* Includes standard HTML input types like checkbox, radio, and select,
|
|
99
|
+
* as well as Ionic's TextFieldTypes and textarea.
|
|
100
|
+
* @typedef {('checkbox'|'radio'|'select'|TextFieldTypes|'textarea')} PossibleInputTypes
|
|
101
|
+
* @memberOf module:engine
|
|
102
|
+
*/
|
|
103
|
+
type PossibleInputTypes = 'checkbox' | 'radio' | 'select' | TextFieldTypes | 'textarea';
|
|
104
|
+
/**
|
|
105
|
+
* @description Field definition for Angular components
|
|
106
|
+
* @summary A comprehensive type that combines properties from various Ionic components
|
|
107
|
+
* to define the structure of a field in an Angular form. It omits certain properties
|
|
108
|
+
* from IonInput, picks specific properties from IonSelect, IonTextarea, and IonCheckbox,
|
|
109
|
+
* and adds custom properties like type and className.
|
|
110
|
+
* @typedef {Object} AngularFieldDefinition
|
|
111
|
+
* @property {PossibleInputTypes} type - The type of input field
|
|
112
|
+
* @property {string|string[]} className - CSS class name(s) for the field
|
|
113
|
+
* @property {string} [cancelText] - Text for the cancel button (from IonSelect)
|
|
114
|
+
* @property {string} [interface] - Interface style for select (from IonSelect)
|
|
115
|
+
* @property {string} [selectedText] - Text for selected option (from IonSelect)
|
|
116
|
+
* @property {Object} [interfaceOptions] - Options for the interface (from IonSelect)
|
|
117
|
+
* @property {number} [rows] - Number of rows for textarea (from IonTextarea)
|
|
118
|
+
* @property {number} [cols] - Number of columns for textarea (from IonTextarea)
|
|
119
|
+
* @property {string} [alignment] - Alignment of checkbox (from IonCheckbox)
|
|
120
|
+
* @property {string} [justify] - Justification of checkbox (from IonCheckbox)
|
|
121
|
+
* @property {boolean} [checked] - Whether checkbox is checked (from IonCheckbox)
|
|
122
|
+
* @memberOf module:engine
|
|
123
|
+
*/
|
|
124
|
+
type AngularFieldDefinition = Omit<IonInput, 'ionInput' | 'ionFocus' | 'ionChange' | 'ionBlur' | 'getInputElement' | 'setFocus' | 'label' | 'el' | 'z' | 'type'> & Pick<IonSelect, 'cancelText' | 'interface' | 'selectedText' | 'interfaceOptions'> & Pick<IonTextarea, 'rows' | 'cols'> & Pick<IonCheckbox, 'alignment' | 'justify' | 'checked'> & {
|
|
125
|
+
type: PossibleInputTypes;
|
|
126
|
+
className: string | string[];
|
|
127
|
+
} & Record<string, unknown>;
|
|
128
|
+
/**
|
|
129
|
+
* @description String or boolean representation of a boolean value
|
|
130
|
+
* @summary Represents a value that can be either a boolean or a string representation of a boolean.
|
|
131
|
+
* This is useful for handling attribute values that can be specified as either strings or booleans.
|
|
132
|
+
* @typedef {('true'|'false'|boolean)} StringOrBoolean
|
|
133
|
+
* @memberOf module:engine
|
|
134
|
+
*/
|
|
135
|
+
type StringOrBoolean = 'true' | 'false' | boolean;
|
|
136
|
+
/**
|
|
137
|
+
* @description Option type for CRUD field inputs
|
|
138
|
+
* @summary Represents a union type that can be either a SelectOption or RadioOption.
|
|
139
|
+
* This is used for defining options in form fields that support both select and radio input types.
|
|
140
|
+
* @typedef {(SelectOption|RadioOption)} CrudFieldOption
|
|
141
|
+
* @memberOf module:engine
|
|
142
|
+
*/
|
|
143
|
+
type CrudFieldOption = SelectOption | RadioOption;
|
|
144
|
+
/**
|
|
145
|
+
* @description Option type for select inputs
|
|
146
|
+
* @summary Extends the InputOption interface with a selected property to indicate
|
|
147
|
+
* whether the option is selected by default.
|
|
148
|
+
* @memberOf module:engine
|
|
149
|
+
*/
|
|
150
|
+
type SelectOption = InputOption & {
|
|
151
|
+
selected?: boolean;
|
|
71
152
|
};
|
|
72
153
|
/**
|
|
73
|
-
* @description
|
|
74
|
-
* @summary
|
|
75
|
-
*
|
|
76
|
-
* @enum {string}
|
|
77
|
-
* @readonly
|
|
78
|
-
* @property {string} BACK_BUTTON_NAVIGATION - Event fired when back button navigation ends
|
|
79
|
-
* @property {string} REFRESH_EVENT - Event fired when a refresh action occurs
|
|
80
|
-
* @property {string} CLICK_EVENT - Event fired when a click action occurs
|
|
81
|
-
* @property {string} SUBMIT_EVENT - Event fired when a form submission occurs
|
|
154
|
+
* @description Option type for radio inputs
|
|
155
|
+
* @summary Extends the InputOption interface with a checked property to indicate
|
|
156
|
+
* whether the option is checked by default.
|
|
82
157
|
* @memberOf module:engine
|
|
83
158
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
REFRESH: string;
|
|
87
|
-
CLICK: string;
|
|
88
|
-
SUBMIT: string;
|
|
89
|
-
VALIDATION_ERROR: string;
|
|
90
|
-
FIELDSET_ADD_GROUP: string;
|
|
91
|
-
FIELDSET_UPDATE_GROUP: string;
|
|
92
|
-
FIELDSET_REMOVE_GROUP: string;
|
|
159
|
+
type RadioOption = InputOption & {
|
|
160
|
+
checked?: boolean;
|
|
93
161
|
};
|
|
94
162
|
/**
|
|
95
|
-
* @description
|
|
96
|
-
* @summary
|
|
97
|
-
*
|
|
98
|
-
* @enum {number}
|
|
99
|
-
* @readonly
|
|
100
|
-
* @property {number} ALL - Log everything (most verbose)
|
|
101
|
-
* @property {number} DEBUG - Log debug information
|
|
102
|
-
* @property {number} INFO - Log informational messages
|
|
103
|
-
* @property {number} WARN - Log warnings
|
|
104
|
-
* @property {number} ERROR - Log errors
|
|
105
|
-
* @property {number} CRITICAL - Log critical errors (least verbose)
|
|
163
|
+
* @description Option type for checkbox inputs
|
|
164
|
+
* @summary Alias for RadioOption, as checkbox options have the same structure as radio options.
|
|
165
|
+
* @typedef {RadioOption} CheckboxOption
|
|
106
166
|
* @memberOf module:engine
|
|
107
167
|
*/
|
|
108
|
-
|
|
109
|
-
ALL = 0,
|
|
110
|
-
DEBUG = 1,
|
|
111
|
-
INFO = 2,
|
|
112
|
-
WARN = 3,
|
|
113
|
-
ERROR = 4,
|
|
114
|
-
CRITICAL = 5
|
|
115
|
-
}
|
|
168
|
+
type CheckboxOption = RadioOption;
|
|
116
169
|
/**
|
|
117
|
-
* @description
|
|
118
|
-
* @summary
|
|
119
|
-
*
|
|
120
|
-
* @
|
|
121
|
-
* @readonly
|
|
122
|
-
* @property {string} BACK - Navigate back to the previous page
|
|
123
|
-
* @property {string} FORWARD - Navigate forward to the next page
|
|
124
|
-
* @property {string} ROOT - Navigate to the root/home page
|
|
170
|
+
* @description Target options for HTML forms
|
|
171
|
+
* @summary Defines the possible target values for HTML forms, including standard targets
|
|
172
|
+
* like '_blank', '_self', '_parent', and '_top', as well as custom string values.
|
|
173
|
+
* @typedef {('_blank'|'_self'|'_parent'|'_top'|string)} HTMLFormTarget
|
|
125
174
|
* @memberOf module:engine
|
|
126
175
|
*/
|
|
127
|
-
|
|
128
|
-
BACK = "back",
|
|
129
|
-
FORWARD = "forward",
|
|
130
|
-
ROOT = "root"
|
|
131
|
-
}
|
|
176
|
+
type HTMLFormTarget = '_blank' | '_self' | '_parent' | '_top' | string;
|
|
132
177
|
/**
|
|
133
|
-
* @description
|
|
134
|
-
* @summary
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* @
|
|
138
|
-
* @property {string} LIST_ITEM - Tag name for list item component
|
|
139
|
-
* @property {string} LIST_INFINITE - Tag name for infinite scrolling list component
|
|
140
|
-
* @property {string} LIST_PAGINATED - Tag name for paginated list component
|
|
178
|
+
* @description Type for form service controls
|
|
179
|
+
* @summary Defines the structure of form controls managed by the form service.
|
|
180
|
+
* It's a nested record where the outer key is the form group name, the inner key
|
|
181
|
+
* is the control name, and the value contains the form group and field properties.
|
|
182
|
+
* @typedef {Record<string, Record<string, { control: FormGroup; props: AngularFieldDefinition }>>} FormServiceControls
|
|
141
183
|
* @memberOf module:engine
|
|
142
184
|
*/
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
LIST_INFINITE = "ngx-decaf-list-infinite",
|
|
146
|
-
LIST_PAGINATED = "ngx-decaf-list-paginated"
|
|
147
|
-
}
|
|
185
|
+
type FormServiceControls = Record<string, Record<string, FormServiceControl>>;
|
|
186
|
+
type FormParent = FormGroup | FormArray;
|
|
148
187
|
/**
|
|
149
|
-
* @description
|
|
150
|
-
* @summary
|
|
151
|
-
*
|
|
152
|
-
* @
|
|
153
|
-
* @readonly
|
|
154
|
-
* @property {string} MODEL - Property name for the component's data model
|
|
155
|
-
* @property {string} LOCALE - Property name for localization settings
|
|
156
|
-
* @property {string} PK - Property name for primary key
|
|
157
|
-
* @property {string} ITEMS - Property name for collection items
|
|
158
|
-
* @property {string} ROUTE - Property name for routing information
|
|
159
|
-
* @property {string} OPERATIONS - Property name for available operations
|
|
160
|
-
* @property {string} UID - Property name for unique identifier
|
|
161
|
-
* @property {string} TRANSLATABLE - Property name for translation flag
|
|
162
|
-
* @property {string} MAPPER - Property name for property mapper
|
|
163
|
-
* @property {string} INITIALIZED - Property name for initialization state
|
|
188
|
+
* @description Form parent group tuple
|
|
189
|
+
* @summary Represents a tuple containing a FormGroup and its associated string identifier.
|
|
190
|
+
* This is used for managing hierarchical form structures and parent-child relationships.
|
|
191
|
+
* @typedef {[FormParent, string]} FormParentGroup
|
|
164
192
|
* @memberOf module:engine
|
|
165
193
|
*/
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
LOCALE = "locale",
|
|
169
|
-
PK = "pk",
|
|
170
|
-
ITEMS = "items",
|
|
171
|
-
ROUTE = "route",
|
|
172
|
-
OPERATIONS = "operations",
|
|
173
|
-
UID = "uid",
|
|
174
|
-
TRANSLATABLE = "translatable",
|
|
175
|
-
MAPPER = "mapper",
|
|
176
|
-
INITIALIZED = "initialized"
|
|
177
|
-
}
|
|
178
|
-
declare enum ListComponentsTypes {
|
|
179
|
-
INFINITE = "infinite",
|
|
180
|
-
PAGINATED = "paginated"
|
|
181
|
-
}
|
|
182
|
-
interface IListEmptyResult {
|
|
183
|
-
title: string;
|
|
184
|
-
subtitle: string;
|
|
185
|
-
showButton: boolean;
|
|
186
|
-
buttonText: string;
|
|
187
|
-
link: string;
|
|
188
|
-
icon: string;
|
|
189
|
-
}
|
|
194
|
+
type FormParentGroup = [FormParent, string];
|
|
195
|
+
type I18nResourceConfigType = I18nResourceConfig | I18nResourceConfig[];
|
|
190
196
|
|
|
191
197
|
/**
|
|
192
|
-
* @
|
|
193
|
-
* @
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
* @
|
|
198
|
-
* @mermaid
|
|
199
|
-
* sequenceDiagram
|
|
200
|
-
* participant C as Component Class
|
|
201
|
-
* participant D as Dynamic Decorator
|
|
202
|
-
* participant R as NgxRenderingEngine
|
|
203
|
-
* participant M as Angular Metadata
|
|
204
|
-
* C->>D: Apply decorator
|
|
205
|
-
* D->>M: reflectComponentType()
|
|
206
|
-
* M-->>D: Return component metadata
|
|
207
|
-
* alt No metadata found
|
|
208
|
-
* D->>D: Throw InternalError
|
|
209
|
-
* else Metadata found
|
|
210
|
-
* D->>R: registerComponent(selector, constructor)
|
|
211
|
-
* D->>C: Apply metadata
|
|
212
|
-
* end
|
|
213
|
-
* @category Decorators
|
|
198
|
+
* @module module:lib/engine/interfaces
|
|
199
|
+
* @description Type and interface definitions used by the Angular rendering engine.
|
|
200
|
+
* @summary Exposes interfaces for component input metadata, rendering outputs, form events,
|
|
201
|
+
* and supporting types used across the engine and components.
|
|
202
|
+
*
|
|
203
|
+
* @link {@link AngularDynamicOutput}
|
|
214
204
|
*/
|
|
215
|
-
declare function Dynamic(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
|
216
205
|
|
|
206
|
+
/**
|
|
207
|
+
* @description Interface for models that can be rendered
|
|
208
|
+
* @summary Defines the basic structure for models that can be rendered by the engine.
|
|
209
|
+
* Contains an optional rendererId that uniquely identifies the rendered instance.
|
|
210
|
+
* @interface IRenderedModel
|
|
211
|
+
* @property {string} [rendererId] - Optional unique ID for the rendered model instance
|
|
212
|
+
* @memberOf module:engine
|
|
213
|
+
*/
|
|
214
|
+
interface IRenderedModel {
|
|
215
|
+
rendererId?: string;
|
|
216
|
+
}
|
|
217
217
|
/**
|
|
218
218
|
* @description Interface for components that hold an ElementRef
|
|
219
219
|
* @summary Defines a component holder interface that provides access to the underlying DOM element through ElementRef
|
|
@@ -238,7 +238,7 @@ interface IFormElement extends IComponentHolder {
|
|
|
238
238
|
* @description The Angular FormGroup associated with this form element
|
|
239
239
|
* @property {FormGroup|undefined} formGroup - The form group instance for managing form controls and validation
|
|
240
240
|
*/
|
|
241
|
-
formGroup:
|
|
241
|
+
formGroup: FormParent | undefined;
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
244
|
* @description Interface for fieldset item representation in the UI.
|
|
@@ -325,6 +325,8 @@ interface IComponentInput extends FieldProperties {
|
|
|
325
325
|
updateMode?: FieldUpdateMode;
|
|
326
326
|
formGroup?: FormGroup;
|
|
327
327
|
formControl?: FormControl;
|
|
328
|
+
model?: Model | string;
|
|
329
|
+
operation?: CrudOperationKeys | undefined;
|
|
328
330
|
}
|
|
329
331
|
/**
|
|
330
332
|
* @description Component configuration structure
|
|
@@ -392,6 +394,7 @@ interface AngularDynamicOutput {
|
|
|
392
394
|
instance?: Type<unknown>;
|
|
393
395
|
formGroup?: FormGroup;
|
|
394
396
|
formControl?: FormControl;
|
|
397
|
+
projectable?: boolean;
|
|
395
398
|
}
|
|
396
399
|
/**
|
|
397
400
|
* @description Base option type for input components
|
|
@@ -439,17 +442,17 @@ interface FormServiceControl {
|
|
|
439
442
|
/**
|
|
440
443
|
* @description Interface for list item custom events
|
|
441
444
|
* @summary Defines the structure of custom events triggered by list items.
|
|
442
|
-
* Extends
|
|
445
|
+
* Extends IBaseCustomEvent with additional properties for the action and primary key.
|
|
443
446
|
* @interface ListItemCustomEvent
|
|
444
447
|
* @property {string} action - The action performed on the list item
|
|
445
448
|
* @property {string} [pk] - Optional primary key of the affected item
|
|
446
|
-
* @property {any} data - The data associated with the event (inherited from
|
|
447
|
-
* @property {HTMLElement} [target] - The target element (inherited from
|
|
448
|
-
* @property {string} [name] - The name of the event (inherited from
|
|
449
|
-
* @property {string} component - The component that triggered the event (inherited from
|
|
449
|
+
* @property {any} data - The data associated with the event (inherited from IBaseCustomEvent)
|
|
450
|
+
* @property {HTMLElement} [target] - The target element (inherited from IBaseCustomEvent)
|
|
451
|
+
* @property {string} [name] - The name of the event (inherited from IBaseCustomEvent)
|
|
452
|
+
* @property {string} component - The component that triggered the event (inherited from IBaseCustomEvent)
|
|
450
453
|
* @memberOf module:engine
|
|
451
454
|
*/
|
|
452
|
-
interface ListItemCustomEvent extends
|
|
455
|
+
interface ListItemCustomEvent extends IBaseCustomEvent {
|
|
453
456
|
action: string;
|
|
454
457
|
pk?: string;
|
|
455
458
|
}
|
|
@@ -457,14 +460,14 @@ interface ListItemCustomEvent extends BaseCustomEvent {
|
|
|
457
460
|
* @description Base interface for custom events
|
|
458
461
|
* @summary Defines the base structure for custom events in the application.
|
|
459
462
|
* Contains properties for the event data, target element, name, and component.
|
|
460
|
-
* @interface
|
|
463
|
+
* @interface IBaseCustomEvent
|
|
461
464
|
* @property {any} data - The data associated with the event
|
|
462
465
|
* @property {HTMLElement} [target] - The target element that triggered the event
|
|
463
466
|
* @property {string} [name] - The name of the event
|
|
464
467
|
* @property {string} component - The component that triggered the event
|
|
465
468
|
* @memberOf module:engine
|
|
466
469
|
*/
|
|
467
|
-
interface
|
|
470
|
+
interface IBaseCustomEvent {
|
|
468
471
|
name: string;
|
|
469
472
|
component?: string;
|
|
470
473
|
data?: unknown;
|
|
@@ -480,200 +483,265 @@ interface I18nResourceConfig {
|
|
|
480
483
|
prefix: string;
|
|
481
484
|
suffix: string;
|
|
482
485
|
}
|
|
483
|
-
|
|
484
|
-
type HandlerLike = Record<string, (...args: unknown[]) => unknown | Promise<unknown>>;
|
|
485
|
-
interface RawQuery<M extends Model> {
|
|
486
|
-
select: undefined | (keyof M)[];
|
|
487
|
-
from: Constructor<M>;
|
|
488
|
-
where: (el: M) => boolean;
|
|
489
|
-
sort?: (el: M, el2: M) => number;
|
|
490
|
-
limit?: number;
|
|
491
|
-
skip?: number;
|
|
492
|
-
}
|
|
493
|
-
type DecafRepositoryAdapter<F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = Adapter<any, any, RawQuery<any>, F, C>;
|
|
494
|
-
type DecafRepository<M extends Model> = Repository<M, RawQuery<M>, DecafRepositoryAdapter<RepositoryFlags, Context<RepositoryFlags>>, RepositoryFlags, Context<RepositoryFlags>>;
|
|
495
486
|
/**
|
|
496
|
-
* @description
|
|
497
|
-
* @summary
|
|
498
|
-
* This is
|
|
499
|
-
* @typedef
|
|
500
|
-
* @
|
|
501
|
-
*/
|
|
502
|
-
type KeyValue = Record<string, any>;
|
|
503
|
-
/**
|
|
504
|
-
* @description Generic function type
|
|
505
|
-
* @summary Represents a function that accepts any number of arguments of any type
|
|
506
|
-
* and returns any type. This is useful for defining function parameters or variables
|
|
507
|
-
* where the exact function signature is not known at compile time.
|
|
508
|
-
* @typedef FunctionLike
|
|
509
|
-
* @memberOf module:engine
|
|
510
|
-
*/
|
|
511
|
-
type FunctionLike = (...args: any[]) => any;
|
|
512
|
-
/**
|
|
513
|
-
* @description Element size options for UI components
|
|
514
|
-
* @summary Defines the possible size values that can be applied to UI elements.
|
|
515
|
-
* These sizes control the dimensions and layout behavior of components.
|
|
516
|
-
* @typedef {('small'|'medium'|'large'|'xlarge'|'2xlarge'|'auto'|'expand'|'block')} ElementSizes
|
|
517
|
-
* @memberOf module:engine
|
|
518
|
-
*/
|
|
519
|
-
type ElementSizes = 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | 'auto' | 'expand' | 'block';
|
|
520
|
-
/**
|
|
521
|
-
* @description Basic position options for UI elements
|
|
522
|
-
* @summary Defines the possible position values that can be applied to UI elements.
|
|
523
|
-
* These positions control the alignment and placement of components.
|
|
524
|
-
* @typedef {('left'|'center'|'right'|'top'|'bottom')} ElementPositions
|
|
525
|
-
* @memberOf module:engine
|
|
526
|
-
*/
|
|
527
|
-
type ElementPositions = 'left' | 'center' | 'right' | 'top' | 'bottom';
|
|
528
|
-
/**
|
|
529
|
-
* @description Extended position options for flex layouts
|
|
530
|
-
* @summary Extends the basic ElementPositions with additional flex-specific position values.
|
|
531
|
-
* These positions are used for controlling alignment and distribution in flex containers.
|
|
532
|
-
* @typedef {(ElementPositions|'stretch'|'middle'|'around'|'between')} FlexPositions
|
|
533
|
-
* @memberOf module:engine
|
|
534
|
-
*/
|
|
535
|
-
type FlexPositions = ElementPositions | 'stretch' | 'middle' | 'around' | 'between';
|
|
536
|
-
/**
|
|
537
|
-
* @description Update mode options for form fields
|
|
538
|
-
* @summary Defines when form field values should be updated in the model.
|
|
539
|
-
* - 'change': Update on every change event
|
|
540
|
-
* - 'blur': Update when the field loses focus
|
|
541
|
-
* - 'submit': Update only when the form is submitted
|
|
542
|
-
* @typedef {('change'|'blur'|'submit')} FieldUpdateMode
|
|
543
|
-
* @memberOf module:engine
|
|
544
|
-
*/
|
|
545
|
-
type FieldUpdateMode = 'change' | 'blur' | 'submit';
|
|
546
|
-
/**
|
|
547
|
-
* @description Interface for models that can be rendered
|
|
548
|
-
* @summary Defines the basic structure for models that can be rendered by the engine.
|
|
549
|
-
* Contains an optional rendererId that uniquely identifies the rendered instance.
|
|
550
|
-
* @interface RenderedModel
|
|
551
|
-
* @property {string} [rendererId] - Optional unique ID for the rendered model instance
|
|
487
|
+
* @description CRUD form event type
|
|
488
|
+
* @summary Extends IBaseCustomEvent to include optional handlers for CRUD form operations.
|
|
489
|
+
* This event type is used for form-related actions like create, read, update, and delete operations.
|
|
490
|
+
* @typedef ICrudFormEvent
|
|
491
|
+
* @property {Record<string, any>} [handlers] - Optional handlers for form operations
|
|
552
492
|
* @memberOf module:engine
|
|
553
493
|
*/
|
|
554
|
-
interface
|
|
555
|
-
|
|
494
|
+
interface ICrudFormEvent extends IBaseCustomEvent {
|
|
495
|
+
handlers?: Record<string, unknown>;
|
|
556
496
|
}
|
|
557
497
|
/**
|
|
558
|
-
* @description
|
|
559
|
-
* @summary
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
* @typedef {('checkbox'|'radio'|'select'|TextFieldTypes|'textarea')} PossibleInputTypes
|
|
498
|
+
* @description Pagination custom event
|
|
499
|
+
* @summary Event emitted by pagination components to signal page navigation.
|
|
500
|
+
* Extends IBaseCustomEvent and carries a payload with the target page number and navigation direction.
|
|
501
|
+
* @interface IPaginationCustomEvent
|
|
563
502
|
* @memberOf module:engine
|
|
564
503
|
*/
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
* and adds custom properties like type and className.
|
|
572
|
-
* @typedef {Object} AngularFieldDefinition
|
|
573
|
-
* @property {PossibleInputTypes} type - The type of input field
|
|
574
|
-
* @property {string|string[]} className - CSS class name(s) for the field
|
|
575
|
-
* @property {string} [cancelText] - Text for the cancel button (from IonSelect)
|
|
576
|
-
* @property {string} [interface] - Interface style for select (from IonSelect)
|
|
577
|
-
* @property {string} [selectedText] - Text for selected option (from IonSelect)
|
|
578
|
-
* @property {Object} [interfaceOptions] - Options for the interface (from IonSelect)
|
|
579
|
-
* @property {number} [rows] - Number of rows for textarea (from IonTextarea)
|
|
580
|
-
* @property {number} [cols] - Number of columns for textarea (from IonTextarea)
|
|
581
|
-
* @property {string} [alignment] - Alignment of checkbox (from IonCheckbox)
|
|
582
|
-
* @property {string} [justify] - Justification of checkbox (from IonCheckbox)
|
|
583
|
-
* @property {boolean} [checked] - Whether checkbox is checked (from IonCheckbox)
|
|
584
|
-
* @memberOf module:engine
|
|
585
|
-
*/
|
|
586
|
-
type AngularFieldDefinition = Omit<IonInput, 'ionInput' | 'ionFocus' | 'ionChange' | 'ionBlur' | 'getInputElement' | 'setFocus' | 'label' | 'el' | 'z' | 'type'> & Pick<IonSelect, 'cancelText' | 'interface' | 'selectedText' | 'interfaceOptions'> & Pick<IonTextarea, 'rows' | 'cols'> & Pick<IonCheckbox, 'alignment' | 'justify' | 'checked'> & {
|
|
587
|
-
type: PossibleInputTypes;
|
|
588
|
-
className: string | string[];
|
|
589
|
-
} & Record<string, unknown>;
|
|
590
|
-
/**
|
|
591
|
-
* @description String or boolean representation of a boolean value
|
|
592
|
-
* @summary Represents a value that can be either a boolean or a string representation of a boolean.
|
|
593
|
-
* This is useful for handling attribute values that can be specified as either strings or booleans.
|
|
594
|
-
* @typedef {('true'|'false'|boolean)} StringOrBoolean
|
|
595
|
-
* @memberOf module:engine
|
|
596
|
-
*/
|
|
597
|
-
type StringOrBoolean = 'true' | 'false' | boolean;
|
|
504
|
+
interface IPaginationCustomEvent extends IBaseCustomEvent {
|
|
505
|
+
data: {
|
|
506
|
+
page: number;
|
|
507
|
+
direction: 'next' | 'previous';
|
|
508
|
+
};
|
|
509
|
+
}
|
|
598
510
|
/**
|
|
599
|
-
* @description
|
|
600
|
-
* @summary Represents a
|
|
601
|
-
*
|
|
602
|
-
* @
|
|
511
|
+
* @description Menu item definition
|
|
512
|
+
* @summary Represents a single item in a navigation or contextual menu.
|
|
513
|
+
* Includes the visible label and optional metadata such as accessibility title, target URL, icon, and color.
|
|
514
|
+
* @interface IMenuItem
|
|
603
515
|
* @memberOf module:engine
|
|
604
516
|
*/
|
|
605
|
-
|
|
517
|
+
interface IMenuItem {
|
|
518
|
+
label: string;
|
|
519
|
+
title?: string;
|
|
520
|
+
url?: string;
|
|
521
|
+
icon?: string;
|
|
522
|
+
color?: string;
|
|
523
|
+
}
|
|
524
|
+
interface IFormReactiveSubmitEvent {
|
|
525
|
+
data: Record<string, unknown>;
|
|
526
|
+
}
|
|
527
|
+
interface ICrudFormOptions {
|
|
528
|
+
buttons: {
|
|
529
|
+
submit: {
|
|
530
|
+
icon?: string;
|
|
531
|
+
iconSlot?: 'start' | 'end';
|
|
532
|
+
text?: string;
|
|
533
|
+
};
|
|
534
|
+
clear?: {
|
|
535
|
+
icon?: string;
|
|
536
|
+
iconSlot?: 'start' | 'end';
|
|
537
|
+
text?: string;
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
interface IListEmptyResult {
|
|
542
|
+
title: string;
|
|
543
|
+
subtitle: string;
|
|
544
|
+
showButton: boolean;
|
|
545
|
+
buttonText: string;
|
|
546
|
+
link: string;
|
|
547
|
+
icon: string;
|
|
548
|
+
}
|
|
549
|
+
|
|
606
550
|
/**
|
|
607
|
-
* @description
|
|
608
|
-
* @summary
|
|
609
|
-
*
|
|
551
|
+
* @description Angular engine key constants
|
|
552
|
+
* @summary Contains key strings used by the Angular rendering engine for reflection,
|
|
553
|
+
* dynamic component creation, and other engine operations.
|
|
554
|
+
* @typedef {Object} AngularEngineKeys
|
|
555
|
+
* @property {string} REFLECT - Prefix for reflection metadata keys
|
|
556
|
+
* @property {string} DYNAMIC - Key for dynamic component identification
|
|
557
|
+
* @property {string} ANNOTATIONS - Key for component annotations
|
|
558
|
+
* @property {string} ECMP - Key for embedded components
|
|
559
|
+
* @property {string} NG_REFLECT - Prefix for Angular reflection attributes
|
|
560
|
+
* @property {string} RENDERED - Prefix for rendered component markers
|
|
561
|
+
* @property {string} MAPPER - Key for property mappers
|
|
562
|
+
* @property {string} CHILDREN - Key for child components
|
|
563
|
+
* @property {string} LISTABLE - Key for listable components
|
|
564
|
+
* @property {string} RENDER - Key for renderable components
|
|
565
|
+
* @property {string} RENDERED_ID - Template for rendered component IDs
|
|
566
|
+
* @property {string} PARENT - Key for comparison decorators and validators
|
|
567
|
+
* @const AngularEngineKeys
|
|
610
568
|
* @memberOf module:engine
|
|
611
569
|
*/
|
|
612
|
-
|
|
613
|
-
|
|
570
|
+
declare const AngularEngineKeys: {
|
|
571
|
+
REFLECT: string;
|
|
572
|
+
DYNAMIC: string;
|
|
573
|
+
ANNOTATIONS: string;
|
|
574
|
+
ECMP: string;
|
|
575
|
+
NG_REFLECT: string;
|
|
576
|
+
RENDERED: string;
|
|
577
|
+
MAPPER: string;
|
|
578
|
+
CHILDREN: string;
|
|
579
|
+
LISTABLE: string;
|
|
580
|
+
RENDER: string;
|
|
581
|
+
RENDERED_ID: string;
|
|
582
|
+
PARENT: string;
|
|
583
|
+
VALIDATION_PARENT_KEY: symbol;
|
|
614
584
|
};
|
|
615
585
|
/**
|
|
616
|
-
* @description
|
|
617
|
-
* @summary
|
|
618
|
-
*
|
|
586
|
+
* @description Form validation state constants
|
|
587
|
+
* @summary Contains constants representing the possible validation states of a form.
|
|
588
|
+
* These are used to check and handle form validation throughout the application.
|
|
589
|
+
* @typedef {Object} FormConstants
|
|
590
|
+
* @property {string} VALID - Constant representing a valid form state
|
|
591
|
+
* @property {string} INVALID - Constant representing an invalid form state
|
|
592
|
+
* @const FormConstants
|
|
619
593
|
* @memberOf module:engine
|
|
620
594
|
*/
|
|
621
|
-
|
|
622
|
-
|
|
595
|
+
declare const FormConstants: {
|
|
596
|
+
readonly VALID: "VALID";
|
|
597
|
+
readonly INVALID: "INVALID";
|
|
623
598
|
};
|
|
624
599
|
/**
|
|
625
|
-
* @description
|
|
626
|
-
* @summary
|
|
627
|
-
*
|
|
600
|
+
* @description Event name constants
|
|
601
|
+
* @summary Enum containing constants for event names used throughout the application.
|
|
602
|
+
* These are used to standardize event naming and handling.
|
|
603
|
+
* @enum {string}
|
|
604
|
+
* @readonly
|
|
605
|
+
* @property {string} BACK_BUTTON_NAVIGATION - Event fired when back button navigation ends
|
|
606
|
+
* @property {string} REFRESH_EVENT - Event fired when a refresh action occurs
|
|
607
|
+
* @property {string} CLICK_EVENT - Event fired when a click action occurs
|
|
608
|
+
* @property {string} SUBMIT_EVENT - Event fired when a form submission occurs
|
|
628
609
|
* @memberOf module:engine
|
|
629
610
|
*/
|
|
630
|
-
|
|
611
|
+
declare const EventConstants: {
|
|
612
|
+
readonly BACK_BUTTON_NAVIGATION: "backButtonNavigationEndEvent";
|
|
613
|
+
readonly REFRESH: "RefreshEvent";
|
|
614
|
+
readonly CLICK: "ClickEvent";
|
|
615
|
+
readonly SUBMIT: "SubmitEvent";
|
|
616
|
+
readonly VALIDATION_ERROR: "validationErrorEvent";
|
|
617
|
+
readonly FIELDSET_ADD_GROUP: "fieldsetAddGroupEvent";
|
|
618
|
+
readonly FIELDSET_UPDATE_GROUP: "fieldsetUpdateGroupEvent";
|
|
619
|
+
readonly FIELDSET_REMOVE_GROUP: "fieldsetRemoveGroupEvent";
|
|
620
|
+
};
|
|
631
621
|
/**
|
|
632
|
-
* @description
|
|
633
|
-
* @summary
|
|
634
|
-
*
|
|
635
|
-
* @
|
|
622
|
+
* @description Logger level constants
|
|
623
|
+
* @summary Enum defining the logging levels used in the application's logging system.
|
|
624
|
+
* Lower values represent more verbose logging, while higher values represent more critical logs.
|
|
625
|
+
* @enum {number}
|
|
626
|
+
* @readonly
|
|
627
|
+
* @property {number} ALL - Log everything (most verbose)
|
|
628
|
+
* @property {number} DEBUG - Log debug information
|
|
629
|
+
* @property {number} INFO - Log informational messages
|
|
630
|
+
* @property {number} WARN - Log warnings
|
|
631
|
+
* @property {number} ERROR - Log errors
|
|
632
|
+
* @property {number} CRITICAL - Log critical errors (least verbose)
|
|
636
633
|
* @memberOf module:engine
|
|
637
634
|
*/
|
|
638
|
-
|
|
635
|
+
declare enum LoggerLevels {
|
|
636
|
+
ALL = 0,
|
|
637
|
+
DEBUG = 1,
|
|
638
|
+
INFO = 2,
|
|
639
|
+
WARN = 3,
|
|
640
|
+
ERROR = 4,
|
|
641
|
+
CRITICAL = 5
|
|
642
|
+
}
|
|
639
643
|
/**
|
|
640
|
-
* @description
|
|
641
|
-
* @summary
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
* @
|
|
644
|
+
* @description Route direction constants
|
|
645
|
+
* @summary Enum defining the possible navigation directions in the application.
|
|
646
|
+
* Used for controlling navigation flow and animation directions.
|
|
647
|
+
* @enum {string}
|
|
648
|
+
* @readonly
|
|
649
|
+
* @property {string} BACK - Navigate back to the previous page
|
|
650
|
+
* @property {string} FORWARD - Navigate forward to the next page
|
|
651
|
+
* @property {string} ROOT - Navigate to the root/home page
|
|
645
652
|
* @memberOf module:engine
|
|
646
653
|
*/
|
|
647
|
-
|
|
654
|
+
declare enum RouteDirections {
|
|
655
|
+
BACK = "back",
|
|
656
|
+
FORWARD = "forward",
|
|
657
|
+
ROOT = "root"
|
|
658
|
+
}
|
|
648
659
|
/**
|
|
649
|
-
* @description
|
|
650
|
-
* @summary
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
* @
|
|
660
|
+
* @description Component tag name constants
|
|
661
|
+
* @summary Enum defining the tag names for custom components used in the application.
|
|
662
|
+
* These tag names are used for component registration and rendering.
|
|
663
|
+
* @enum {string}
|
|
664
|
+
* @readonly
|
|
665
|
+
* @property {string} LIST_ITEM - Tag name for list item component
|
|
666
|
+
* @property {string} LIST_INFINITE - Tag name for infinite scrolling list component
|
|
667
|
+
* @property {string} LIST_PAGINATED - Tag name for paginated list component
|
|
654
668
|
* @memberOf module:engine
|
|
655
669
|
*/
|
|
656
|
-
|
|
670
|
+
declare enum ComponentsTagNames {
|
|
671
|
+
LIST_ITEM = "ngx-decaf-list-item",
|
|
672
|
+
LIST_INFINITE = "ngx-decaf-list-infinite",
|
|
673
|
+
LIST_PAGINATED = "ngx-decaf-list-paginated",
|
|
674
|
+
CRUD_FIELD = "ngx-decaf-crud-field",
|
|
675
|
+
LAYOUT_COMPONENT = "ngx-decaf-layout"
|
|
676
|
+
}
|
|
657
677
|
/**
|
|
658
|
-
* @description
|
|
659
|
-
* @summary
|
|
660
|
-
*
|
|
661
|
-
* @
|
|
662
|
-
* @
|
|
678
|
+
* @description Base component property name constants
|
|
679
|
+
* @summary Enum defining the standard property names used by base components in the application.
|
|
680
|
+
* These property names are used for consistent property access across components.
|
|
681
|
+
* @enum {string}
|
|
682
|
+
* @readonly
|
|
683
|
+
* @property {string} MODEL - Property name for the component's data model
|
|
684
|
+
* @property {string} LOCALE - Property name for localization settings
|
|
685
|
+
* @property {string} PK - Property name for primary key
|
|
686
|
+
* @property {string} ITEMS - Property name for collection items
|
|
687
|
+
* @property {string} ROUTE - Property name for routing information
|
|
688
|
+
* @property {string} OPERATIONS - Property name for available operations
|
|
689
|
+
* @property {string} UID - Property name for unique identifier
|
|
690
|
+
* @property {string} TRANSLATABLE - Property name for translation flag
|
|
691
|
+
* @property {string} MAPPER - Property name for property mapper
|
|
692
|
+
* @property {string} INITIALIZED - Property name for initialization state
|
|
663
693
|
* @memberOf module:engine
|
|
664
694
|
*/
|
|
665
|
-
|
|
666
|
-
|
|
695
|
+
declare enum BaseComponentProps {
|
|
696
|
+
MODEL = "model",
|
|
697
|
+
LOCALE = "locale",
|
|
698
|
+
LOCALE_ROOT = "locale_root",
|
|
699
|
+
PK = "pk",
|
|
700
|
+
ITEMS = "items",
|
|
701
|
+
ROUTE = "route",
|
|
702
|
+
OPERATIONS = "operations",
|
|
703
|
+
UID = "uid",
|
|
704
|
+
TRANSLATABLE = "translatable",
|
|
705
|
+
MAPPER = "mapper",
|
|
706
|
+
INITIALIZED = "initialized",
|
|
707
|
+
COMPONENT_NAME = "componentName",
|
|
708
|
+
PARENT_COMPONENT = "parentComponent",
|
|
709
|
+
FORM_GROUP_COMPONENT_PROPS = "componentProps"
|
|
710
|
+
}
|
|
711
|
+
declare enum ListComponentsTypes {
|
|
712
|
+
INFINITE = "infinite",
|
|
713
|
+
PAGINATED = "paginated"
|
|
714
|
+
}
|
|
715
|
+
declare const CssClasses: {
|
|
716
|
+
BUTTONS_CONTAINER: string;
|
|
667
717
|
};
|
|
668
|
-
|
|
718
|
+
declare const DefaultFormReactiveOptions: ICrudFormOptions;
|
|
719
|
+
|
|
669
720
|
/**
|
|
670
|
-
* @description
|
|
671
|
-
* @summary
|
|
672
|
-
* This
|
|
673
|
-
*
|
|
674
|
-
* @
|
|
721
|
+
* @description Marks an Angular component as dynamically loadable
|
|
722
|
+
* @summary Decorator that registers an Angular component with the NgxRenderingEngine for dynamic loading.
|
|
723
|
+
* This decorator must be applied before the @Component decorator to properly extract component metadata.
|
|
724
|
+
* It adds metadata to the component class and registers it with the rendering engine using its selector.
|
|
725
|
+
* @function Dynamic
|
|
726
|
+
* @return {Function} A decorator function that can be applied to Angular component classes
|
|
727
|
+
* @mermaid
|
|
728
|
+
* sequenceDiagram
|
|
729
|
+
* participant C as Component Class
|
|
730
|
+
* participant D as Dynamic Decorator
|
|
731
|
+
* participant R as NgxRenderingEngine
|
|
732
|
+
* participant M as Angular Metadata
|
|
733
|
+
* C->>D: Apply decorator
|
|
734
|
+
* D->>M: reflectComponentType()
|
|
735
|
+
* M-->>D: Return component metadata
|
|
736
|
+
* alt No metadata found
|
|
737
|
+
* D->>D: Throw InternalError
|
|
738
|
+
* else Metadata found
|
|
739
|
+
* D->>R: registerComponent(selector, constructor)
|
|
740
|
+
* D->>C: Apply metadata
|
|
741
|
+
* end
|
|
742
|
+
* @category Decorators
|
|
675
743
|
*/
|
|
676
|
-
|
|
744
|
+
declare function Dynamic(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
|
677
745
|
|
|
678
746
|
/**
|
|
679
747
|
* @description Abstract base class for dynamic Angular modules
|
|
@@ -693,6 +761,16 @@ type FormParentGroup = [FormParent, string];
|
|
|
693
761
|
declare abstract class DynamicModule {
|
|
694
762
|
}
|
|
695
763
|
|
|
764
|
+
/**
|
|
765
|
+
* @module module:lib/engine/NgxRenderingEngine
|
|
766
|
+
* @description Angular rendering engine for Decaf model-driven UIs.
|
|
767
|
+
* @summary Implements NgxRenderingEngine which converts model decorator metadata
|
|
768
|
+
* into Angular components, manages component registration, and orchestrates
|
|
769
|
+
* dynamic component creation and input mapping.
|
|
770
|
+
*
|
|
771
|
+
* @link {@link NgxRenderingEngine}
|
|
772
|
+
*/
|
|
773
|
+
|
|
696
774
|
/**
|
|
697
775
|
* @description Angular implementation of the RenderingEngine with enhanced features
|
|
698
776
|
* @summary This class extends the base RenderingEngine to provide Angular-specific rendering capabilities
|
|
@@ -778,7 +856,6 @@ declare class NgxRenderingEngine extends RenderingEngine<AngularFieldDefinition,
|
|
|
778
856
|
* @type {Type<unknown> | undefined}
|
|
779
857
|
*/
|
|
780
858
|
private static _instance;
|
|
781
|
-
private static _projectable;
|
|
782
859
|
private static _parentProps;
|
|
783
860
|
/**
|
|
784
861
|
* @description Constructs a new NgxRenderingEngine instance
|
|
@@ -892,7 +969,7 @@ declare class NgxRenderingEngine extends RenderingEngine<AngularFieldDefinition,
|
|
|
892
969
|
* FromField-->>Render: AngularDynamicOutput
|
|
893
970
|
* Render-->>Client: return AngularDynamicOutput
|
|
894
971
|
*/
|
|
895
|
-
render<M extends Model>(model: M, globalProps: Record<string, unknown>, vcr: ViewContainerRef, injector: Injector, tpl: TemplateRef<unknown
|
|
972
|
+
render<M extends Model>(model: M, globalProps: Record<string, unknown>, vcr: ViewContainerRef, injector: Injector, tpl: TemplateRef<unknown>): AngularDynamicOutput;
|
|
896
973
|
/**
|
|
897
974
|
* @description Initializes the rendering engine
|
|
898
975
|
* @summary This method initializes the rendering engine. It checks if the engine is already initialized
|
|
@@ -972,69 +1049,18 @@ declare class NgxRenderingEngine extends RenderingEngine<AngularFieldDefinition,
|
|
|
972
1049
|
}
|
|
973
1050
|
|
|
974
1051
|
/**
|
|
975
|
-
* @
|
|
976
|
-
* @
|
|
977
|
-
*
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
* its capabilities for handling translations, accessing DOM elements, and applying custom styling.
|
|
981
|
-
*
|
|
982
|
-
* @template M - The model type that this component works with
|
|
983
|
-
* @param {string} instance - The component instance token used for identification
|
|
984
|
-
* @param {string} locale - The locale to be used for translations
|
|
985
|
-
* @param {StringOrBoolean} translatable - Whether the component should be translated
|
|
986
|
-
* @param {string} className - Additional CSS classes to apply to the component
|
|
987
|
-
* @param {"ios" | "md" | undefined} mode - Component platform style
|
|
988
|
-
*
|
|
989
|
-
* @component NgxBaseComponent
|
|
990
|
-
* @example
|
|
991
|
-
* ```typescript
|
|
992
|
-
* @Component({
|
|
993
|
-
* selector: 'app-my-component',
|
|
994
|
-
* templateUrl: './my-component.component.html',
|
|
995
|
-
* styleUrls: ['./my-component.component.scss']
|
|
996
|
-
* })
|
|
997
|
-
* export class MyComponent extends NgxBaseComponent {
|
|
998
|
-
* constructor(@Inject('instanceToken') instance: string) {
|
|
999
|
-
* super(instance);
|
|
1000
|
-
* }
|
|
1001
|
-
*
|
|
1002
|
-
* ngOnInit() {
|
|
1003
|
-
* this.initialize();
|
|
1004
|
-
* // Component-specific initialization
|
|
1005
|
-
* }
|
|
1006
|
-
* }
|
|
1007
|
-
* ```
|
|
1008
|
-
* @mermaid
|
|
1009
|
-
* sequenceDiagram
|
|
1010
|
-
* participant App as Application
|
|
1011
|
-
* participant Comp as Component
|
|
1012
|
-
* participant Base as NgxBaseComponent
|
|
1013
|
-
* participant Engine as NgxRenderingEngine
|
|
1014
|
-
*
|
|
1015
|
-
* App->>Comp: Create component
|
|
1016
|
-
* Comp->>Base: super(instance)
|
|
1017
|
-
* Base->>Base: Set componentName & componentLocale
|
|
1018
|
-
*
|
|
1019
|
-
* App->>Comp: Set @Input properties
|
|
1020
|
-
* Comp->>Base: ngOnChanges(changes)
|
|
1052
|
+
* @module module:lib/engine/NgxDecafComponentDirective
|
|
1053
|
+
* @description Base decaf component abstraction providing shared inputs and utilities.
|
|
1054
|
+
* @summary NgxDecafComponentDirective is the abstract foundation for Decaf components and provides common
|
|
1055
|
+
* inputs (model, mapper, pk, props), logging, repository resolution, and event dispatch helpers.
|
|
1056
|
+
* It centralizes shared behavior for child components and simplifies integration with the rendering engine.
|
|
1021
1057
|
*
|
|
1022
|
-
*
|
|
1023
|
-
* Base->>Base: getModel(model)
|
|
1024
|
-
* Base->>Engine: getDecorators(model, {})
|
|
1025
|
-
* Engine-->>Base: Return decorator metadata
|
|
1026
|
-
* Base->>Base: Configure mapper and item
|
|
1027
|
-
* Base->>Base: getLocale(translatable)
|
|
1028
|
-
* else locale/translatable changed
|
|
1029
|
-
* Base->>Base: getLocale(translatable)
|
|
1030
|
-
* end
|
|
1031
|
-
*
|
|
1032
|
-
* App->>Comp: ngOnInit()
|
|
1033
|
-
* Comp->>Base: initialize()
|
|
1034
|
-
* Base->>Base: Set initialized flag
|
|
1058
|
+
* @link {@link NgxDecafComponentDirective}
|
|
1035
1059
|
*/
|
|
1036
|
-
|
|
1037
|
-
|
|
1060
|
+
|
|
1061
|
+
declare abstract class NgxDecafComponentDirective extends LoggedClass implements OnChanges {
|
|
1062
|
+
protected componentName?: string | undefined;
|
|
1063
|
+
protected localeRoot?: string | undefined;
|
|
1038
1064
|
/**
|
|
1039
1065
|
* @description Reference to the component's element.
|
|
1040
1066
|
* @summary Provides direct access to the native DOM element of the component through Angular's
|
|
@@ -1043,88 +1069,40 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1043
1069
|
* identified by the 'component' template reference variable.
|
|
1044
1070
|
*
|
|
1045
1071
|
* @type {ElementRef}
|
|
1046
|
-
* @memberOf
|
|
1072
|
+
* @memberOf NgxDecafComponentDirective
|
|
1047
1073
|
*/
|
|
1048
1074
|
component: ElementRef;
|
|
1075
|
+
name: string;
|
|
1076
|
+
childOf: string | undefined;
|
|
1049
1077
|
/**
|
|
1050
|
-
* @description
|
|
1051
|
-
* @summary
|
|
1052
|
-
* This
|
|
1053
|
-
* locale, and potentially for component identification in debugging or error reporting.
|
|
1054
|
-
*
|
|
1055
|
-
* The `componentName` is set during the component's initialization process and should not
|
|
1056
|
-
* be modified externally. It's marked as protected to allow access in derived classes while
|
|
1057
|
-
* preventing direct access from outside the component hierarchy.
|
|
1058
|
-
*
|
|
1059
|
-
* @type {string}
|
|
1060
|
-
* @protected
|
|
1061
|
-
* @memberOf NgxBaseComponent
|
|
1062
|
-
*
|
|
1063
|
-
* @example
|
|
1064
|
-
* // Inside a derived component class
|
|
1065
|
-
* console.log(this.componentName); // Outputs: "MyCustomComponent"
|
|
1066
|
-
*/
|
|
1067
|
-
componentName: string;
|
|
1068
|
-
/**
|
|
1069
|
-
* @description Unique identifier for the renderer.
|
|
1070
|
-
* @summary A unique identifier used to reference the component's renderer instance.
|
|
1071
|
-
* This can be used for targeting specific renderer instances when multiple components
|
|
1072
|
-
* are present on the same page.
|
|
1078
|
+
* @description Unique identifier for the current record.
|
|
1079
|
+
* @summary A unique identifier for the current record being displayed or manipulated.
|
|
1080
|
+
* This is typically used in conjunction with the primary key for operations on specific records.
|
|
1073
1081
|
*
|
|
1074
|
-
* @type {string}
|
|
1075
|
-
* @memberOf
|
|
1082
|
+
* @type {string | number}
|
|
1083
|
+
* @memberOf NgxDecafComponentDirective
|
|
1076
1084
|
*/
|
|
1077
|
-
|
|
1085
|
+
uid: string | number;
|
|
1078
1086
|
/**
|
|
1079
1087
|
* @description Repository model for data operations.
|
|
1080
1088
|
* @summary The data model repository that this component will use for CRUD operations.
|
|
1081
1089
|
* This provides a connection to the data layer for retrieving and manipulating data.
|
|
1082
1090
|
*
|
|
1083
1091
|
* @type {Model| undefined}
|
|
1084
|
-
* @memberOf
|
|
1085
|
-
*/
|
|
1086
|
-
model: Model | undefined;
|
|
1087
|
-
/**
|
|
1088
|
-
* @description The repository for interacting with the data model.
|
|
1089
|
-
* @summary Provides a connection to the data layer for retrieving and manipulating data.
|
|
1090
|
-
* This is an instance of the `DecafRepository` class from the `@decaf-ts/core` package,
|
|
1091
|
-
* which is initialized in the `repository` getter method.
|
|
1092
|
-
*
|
|
1093
|
-
* The repository is used to perform CRUD (Create, Read, Update, Delete) operations on the
|
|
1094
|
-
* data model, such as fetching data, creating new items, updating existing items, and deleting
|
|
1095
|
-
* items. It also provides methods for querying and filtering data based on specific criteria.
|
|
1096
|
-
*
|
|
1097
|
-
* @type {DecafRepository<Model>}
|
|
1098
|
-
* @private
|
|
1099
|
-
* @memberOf NgxBaseComponent
|
|
1100
|
-
*/
|
|
1101
|
-
protected _repository?: DecafRepository<Model>;
|
|
1102
|
-
/**
|
|
1103
|
-
* @description Dynamic properties configuration object.
|
|
1104
|
-
* @summary Contains key-value pairs of dynamic properties that can be applied to the component
|
|
1105
|
-
* at runtime. This flexible configuration object allows for dynamic property assignment without
|
|
1106
|
-
* requiring explicit input bindings for every possible configuration option. Properties from
|
|
1107
|
-
* this object are parsed and applied to the component instance through the parseProps method,
|
|
1108
|
-
* enabling customizable component behavior based on external configuration.
|
|
1109
|
-
*
|
|
1110
|
-
* @type {Record<string, unknown>}
|
|
1111
|
-
* @default {}
|
|
1112
|
-
* @memberOf NgxBaseComponent
|
|
1092
|
+
* @memberOf NgxDecafComponentDirective
|
|
1113
1093
|
*/
|
|
1114
|
-
|
|
1094
|
+
model: Model | string | undefined;
|
|
1115
1095
|
/**
|
|
1116
|
-
* @description
|
|
1117
|
-
* @summary
|
|
1118
|
-
*
|
|
1119
|
-
* and
|
|
1120
|
-
*
|
|
1121
|
-
* Additional properties can be included to customize the rendering behavior.
|
|
1096
|
+
* @description The primary data model used for CRUD operations.
|
|
1097
|
+
* @summary This input provides the main Model instance that the form interacts with for
|
|
1098
|
+
* creating, reading, updating, or deleting records. It serves as the source of schema
|
|
1099
|
+
* and validation rules for the form fields, and is required for most operations except
|
|
1100
|
+
* for certain read or delete scenarios.
|
|
1122
1101
|
*
|
|
1123
|
-
* @type {
|
|
1124
|
-
* @
|
|
1125
|
-
* @memberOf NgxBaseComponent
|
|
1102
|
+
* @type {Model | undefined}
|
|
1103
|
+
* @memberOf NgxDecafComponentDirective
|
|
1126
1104
|
*/
|
|
1127
|
-
|
|
1105
|
+
modelId: Model | undefined;
|
|
1128
1106
|
/**
|
|
1129
1107
|
* @description Primary key field name for the model.
|
|
1130
1108
|
* @summary Specifies which field in the model should be used as the primary key.
|
|
@@ -1132,69 +1110,47 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1132
1110
|
*
|
|
1133
1111
|
* @type {string}
|
|
1134
1112
|
* @default 'id'
|
|
1135
|
-
* @memberOf
|
|
1113
|
+
* @memberOf NgxDecafComponentDirective
|
|
1136
1114
|
*/
|
|
1137
1115
|
pk: string;
|
|
1138
1116
|
/**
|
|
1139
|
-
* @description
|
|
1140
|
-
* @summary Defines
|
|
1141
|
-
* This
|
|
1117
|
+
* @description Field mapping configuration.
|
|
1118
|
+
* @summary Defines how fields from the data model should be mapped to properties used by the component.
|
|
1119
|
+
* This allows for flexible data binding between the model and the component's display logic.
|
|
1142
1120
|
*
|
|
1143
|
-
* @type {string}
|
|
1144
|
-
* @memberOf
|
|
1121
|
+
* @type {Record<string, string>}
|
|
1122
|
+
* @memberOf NgxDecafComponentDirective
|
|
1145
1123
|
*/
|
|
1146
|
-
|
|
1124
|
+
mapper: Record<string, string> | FunctionLike;
|
|
1147
1125
|
/**
|
|
1148
1126
|
* @description Available CRUD operations for this component.
|
|
1149
1127
|
* @summary Defines which CRUD operations (Create, Read, Update, Delete) are available
|
|
1150
1128
|
* for this component. This affects which operations can be performed on the data.
|
|
1151
1129
|
*
|
|
1152
1130
|
* @default [OperationKeys.READ]
|
|
1153
|
-
* @memberOf
|
|
1131
|
+
* @memberOf NgxDecafComponentDirective
|
|
1154
1132
|
*/
|
|
1155
1133
|
operations: CrudOperations[];
|
|
1156
1134
|
/**
|
|
1157
|
-
* @description
|
|
1158
|
-
* @summary
|
|
1159
|
-
* This is typically used
|
|
1160
|
-
*
|
|
1161
|
-
* @type {string | number}
|
|
1162
|
-
* @memberOf NgxBaseComponent
|
|
1163
|
-
*/
|
|
1164
|
-
uid: string | number;
|
|
1165
|
-
/**
|
|
1166
|
-
* @description Field mapping configuration.
|
|
1167
|
-
* @summary Defines how fields from the data model should be mapped to properties used by the component.
|
|
1168
|
-
* This allows for flexible data binding between the model and the component's display logic.
|
|
1169
|
-
*
|
|
1170
|
-
* @type {Record<string, string>}
|
|
1171
|
-
* @memberOf NgxBaseComponent
|
|
1172
|
-
*/
|
|
1173
|
-
mapper: Record<string, string>;
|
|
1174
|
-
/**
|
|
1175
|
-
* @description The locale to be used for translations.
|
|
1176
|
-
* @summary Specifies the locale identifier to use when translating component text.
|
|
1177
|
-
* This can be set explicitly via input property to override the automatically derived
|
|
1178
|
-
* locale from the component name. The locale is typically a language code (e.g., 'en', 'fr')
|
|
1179
|
-
* or a language-region code (e.g., 'en-US', 'fr-CA') that determines which translation
|
|
1180
|
-
* set to use for the component's text content.
|
|
1135
|
+
* @description Primary key field name for the model.
|
|
1136
|
+
* @summary Specifies which field in the model should be used as the primary key.
|
|
1137
|
+
* This is typically used for identifying unique records in operations like update and delete.
|
|
1181
1138
|
*
|
|
1182
|
-
* @type {
|
|
1183
|
-
* @
|
|
1139
|
+
* @type {number}
|
|
1140
|
+
* @default 1
|
|
1141
|
+
* @memberOf NgxDecafComponentDirective
|
|
1184
1142
|
*/
|
|
1185
|
-
|
|
1143
|
+
row: number;
|
|
1186
1144
|
/**
|
|
1187
|
-
* @description
|
|
1188
|
-
* @summary
|
|
1189
|
-
*
|
|
1190
|
-
* When false, text is displayed as-is without translation. This property accepts either
|
|
1191
|
-
* a boolean value or a string that can be converted to a boolean (e.g., 'true', 'false', '1', '0').
|
|
1145
|
+
* @description Primary key field name for the model.
|
|
1146
|
+
* @summary Specifies which field in the model should be used as the primary key.
|
|
1147
|
+
* This is typically used for identifying unique records in operations like update and delete.
|
|
1192
1148
|
*
|
|
1193
|
-
* @type {
|
|
1194
|
-
* @default
|
|
1195
|
-
* @memberOf
|
|
1149
|
+
* @type {number}
|
|
1150
|
+
* @default 1
|
|
1151
|
+
* @memberOf NgxDecafComponentDirective
|
|
1196
1152
|
*/
|
|
1197
|
-
|
|
1153
|
+
col: number;
|
|
1198
1154
|
/**
|
|
1199
1155
|
* @description Additional CSS class names to apply to the component.
|
|
1200
1156
|
* @summary Allows custom CSS classes to be added to the component's root element.
|
|
@@ -1204,76 +1160,68 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1204
1160
|
*
|
|
1205
1161
|
* @type {string}
|
|
1206
1162
|
* @default ""
|
|
1207
|
-
* @memberOf
|
|
1163
|
+
* @memberOf NgxDecafComponentDirective
|
|
1208
1164
|
*/
|
|
1209
1165
|
className: string;
|
|
1210
1166
|
/**
|
|
1211
|
-
* @description
|
|
1212
|
-
* @summary
|
|
1213
|
-
*
|
|
1214
|
-
*
|
|
1215
|
-
* and icons. Setting this property allows components to maintain platform-specific styling
|
|
1216
|
-
* for a more native look and feel.
|
|
1167
|
+
* @description The repository for interacting with the data model.
|
|
1168
|
+
* @summary Provides a connection to the data layer for retrieving and manipulating data.
|
|
1169
|
+
* This is an instance of the `DecafRepository` class from the `@decaf-ts/core` package,
|
|
1170
|
+
* which is initialized in the `repository` getter method.
|
|
1217
1171
|
*
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1220
|
-
*
|
|
1221
|
-
*/
|
|
1222
|
-
mode: 'ios' | 'md' | undefined;
|
|
1223
|
-
/**
|
|
1224
|
-
* @description The locale derived from the component's class name.
|
|
1225
|
-
* @summary Stores the automatically derived locale based on the component's class name.
|
|
1226
|
-
* This is determined during component initialization and serves as a fallback when no
|
|
1227
|
-
* explicit locale is provided via the locale input property. The derivation is handled
|
|
1228
|
-
* by the getLocaleContext utility function, which extracts a locale identifier
|
|
1229
|
-
* from the component's class name.
|
|
1172
|
+
* The repository is used to perform CRUD (Create, Read, Update, Delete) operations on the
|
|
1173
|
+
* data model, such as fetching data, creating new items, updating existing items, and deleting
|
|
1174
|
+
* items. It also provides methods for querying and filtering data based on specific criteria.
|
|
1230
1175
|
*
|
|
1231
|
-
* @type {
|
|
1232
|
-
* @
|
|
1176
|
+
* @type {DecafRepository<Model>}
|
|
1177
|
+
* @private
|
|
1178
|
+
* @memberOf NgxDecafComponentDirective
|
|
1233
1179
|
*/
|
|
1234
|
-
|
|
1180
|
+
protected _repository?: DecafRepository<Model>;
|
|
1235
1181
|
/**
|
|
1236
|
-
* @description
|
|
1237
|
-
* @summary
|
|
1238
|
-
*
|
|
1239
|
-
*
|
|
1240
|
-
* child components will be skipped. This provides control over the rendering depth.
|
|
1182
|
+
* @description Root component of the Decaf-ts for Angular application
|
|
1183
|
+
* @summary This component serves as the main entry point for the application.
|
|
1184
|
+
* It sets up the navigation menu, handles routing events, and initializes
|
|
1185
|
+
* the application state. It also manages the application title and menu visibility.
|
|
1241
1186
|
*
|
|
1242
|
-
* @
|
|
1243
|
-
* @
|
|
1244
|
-
* @memberOf
|
|
1187
|
+
* @private
|
|
1188
|
+
* @type {MenuController}
|
|
1189
|
+
* @memberOf NgxDecafComponentDirective
|
|
1245
1190
|
*/
|
|
1246
|
-
|
|
1191
|
+
protected menuController: MenuController;
|
|
1247
1192
|
/**
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1193
|
+
* @description Angular change detection service.
|
|
1194
|
+
* @summary Injected service that provides manual control over change detection cycles.
|
|
1195
|
+
* This is essential for ensuring that programmatic DOM changes (like setting accordion
|
|
1196
|
+
* attributes) are properly reflected in the component's state and trigger appropriate
|
|
1197
|
+
* view updates when modifications occur outside the normal Angular change detection flow.
|
|
1198
|
+
*
|
|
1199
|
+
* @protected
|
|
1200
|
+
* @type {ChangeDetectorRef}
|
|
1201
|
+
* @memberOf CrudFormComponent
|
|
1202
|
+
*/
|
|
1203
|
+
protected changeDetectorRef: ChangeDetectorRef;
|
|
1257
1204
|
/**
|
|
1258
|
-
* @description
|
|
1259
|
-
* @summary
|
|
1260
|
-
* This
|
|
1261
|
-
*
|
|
1262
|
-
* to enable coordinated behavior across the application.
|
|
1205
|
+
* @description Angular Renderer2 service for safe DOM manipulation.
|
|
1206
|
+
* @summary Injected service that provides a safe, platform-agnostic way to manipulate DOM elements.
|
|
1207
|
+
* This service ensures proper handling of DOM operations across different platforms and environments,
|
|
1208
|
+
* including server-side rendering and web workers.
|
|
1263
1209
|
*
|
|
1264
|
-
* @
|
|
1265
|
-
* @
|
|
1210
|
+
* @protected
|
|
1211
|
+
* @type {Renderer2}
|
|
1212
|
+
* @memberOf CrudFormComponent
|
|
1266
1213
|
*/
|
|
1267
|
-
|
|
1214
|
+
protected renderer: Renderer2;
|
|
1268
1215
|
/**
|
|
1269
|
-
* @description
|
|
1270
|
-
* @summary
|
|
1271
|
-
*
|
|
1272
|
-
* This engine is used to extract decorator metadata and render child components.
|
|
1216
|
+
* @description Translation service for internationalization.
|
|
1217
|
+
* @summary Injected service that provides translation capabilities for UI text.
|
|
1218
|
+
* Used to translate button labels and validation messages based on the current locale.
|
|
1273
1219
|
*
|
|
1274
|
-
* @
|
|
1220
|
+
* @protected
|
|
1221
|
+
* @type {TranslateService}
|
|
1222
|
+
* @memberOf CrudFormComponent
|
|
1275
1223
|
*/
|
|
1276
|
-
|
|
1224
|
+
protected translateService: TranslateService;
|
|
1277
1225
|
/**
|
|
1278
1226
|
* @description Logger instance for the component.
|
|
1279
1227
|
* @summary Provides logging capabilities for the component, allowing for consistent
|
|
@@ -1286,44 +1234,88 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1286
1234
|
*
|
|
1287
1235
|
* @type {Logger}
|
|
1288
1236
|
* @private
|
|
1289
|
-
* @memberOf
|
|
1237
|
+
* @memberOf NgxDecafComponentDirective
|
|
1290
1238
|
*/
|
|
1291
1239
|
logger: Logger;
|
|
1292
1240
|
/**
|
|
1293
|
-
* @description
|
|
1294
|
-
* @summary
|
|
1295
|
-
* This
|
|
1296
|
-
*
|
|
1297
|
-
*
|
|
1241
|
+
* @description Event emitter for custom renderer events.
|
|
1242
|
+
* @summary Emits custom events that occur within child components or the layout itself.
|
|
1243
|
+
* This allows parent components to listen for and respond to user interactions or
|
|
1244
|
+
* state changes within the grid layout. Events are passed up the component hierarchy
|
|
1245
|
+
* to enable coordinated behavior across the application.
|
|
1246
|
+
*
|
|
1247
|
+
* @type {EventEmitter<IBaseCustomEvent>}
|
|
1248
|
+
* @memberOf NgxDecafComponentDirective
|
|
1249
|
+
*/
|
|
1250
|
+
listenEvent: EventEmitter<IBaseCustomEvent>;
|
|
1251
|
+
/**
|
|
1252
|
+
* @description Angular Router instance for navigation
|
|
1253
|
+
* @summary Injected Router service used for programmatic navigation
|
|
1254
|
+
* to other pages after successful login or other routing operations.
|
|
1255
|
+
*
|
|
1256
|
+
* @private
|
|
1257
|
+
* @type {Router}
|
|
1258
|
+
* @memberOf NgxDecafComponentDirective
|
|
1259
|
+
*/
|
|
1260
|
+
protected router: Router;
|
|
1261
|
+
/**
|
|
1262
|
+
* @description Angular Router instance for navigation
|
|
1263
|
+
* @summary Injected Router service used for programmatic navigation
|
|
1264
|
+
* to other pages after successful login or other routing operations.
|
|
1298
1265
|
*
|
|
1299
|
-
*
|
|
1300
|
-
*
|
|
1301
|
-
*
|
|
1302
|
-
|
|
1266
|
+
* @private
|
|
1267
|
+
* @type {Router}
|
|
1268
|
+
* @memberOf NgxDecafComponentDirective
|
|
1269
|
+
*/
|
|
1270
|
+
locale?: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* @description Configuration for list item rendering
|
|
1273
|
+
* @summary Defines how list items should be rendered in the component.
|
|
1274
|
+
* This property holds a configuration object that specifies the tag name
|
|
1275
|
+
* and other properties needed to render list items correctly. The tag property
|
|
1276
|
+
* identifies which component should be used to render each item in a list.
|
|
1277
|
+
* Additional properties can be included to customize the rendering behavior.
|
|
1303
1278
|
*
|
|
1304
|
-
* @
|
|
1279
|
+
* @type {Record<string, unknown>}
|
|
1280
|
+
* @default {tag: ""}
|
|
1281
|
+
* @memberOf NgxDecafComponentDirective
|
|
1282
|
+
*/
|
|
1283
|
+
item: Record<string, unknown>;
|
|
1284
|
+
/**
|
|
1285
|
+
* @description Dynamic properties configuration object.
|
|
1286
|
+
* @summary Contains key-value pairs of dynamic properties that can be applied to the component
|
|
1287
|
+
* at runtime. This flexible configuration object allows for dynamic property assignment without
|
|
1288
|
+
* requiring explicit input bindings for every possible configuration option. Properties from
|
|
1289
|
+
* this object are parsed and applied to the component instance through the parseProps method,
|
|
1290
|
+
* enabling customizable component behavior based on external configuration.
|
|
1305
1291
|
*
|
|
1306
|
-
* @
|
|
1307
|
-
*
|
|
1308
|
-
*
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
*
|
|
1292
|
+
* @type {Record<string, unknown>}
|
|
1293
|
+
* @default {}
|
|
1294
|
+
* @memberOf NgxDecafComponentDirective
|
|
1295
|
+
*/
|
|
1296
|
+
props: Record<string, unknown>;
|
|
1297
|
+
/**
|
|
1298
|
+
* @description Base route for navigation related to this component.
|
|
1299
|
+
* @summary Defines the base route path used for navigation actions related to this component.
|
|
1300
|
+
* This is often used as a prefix for constructing navigation URLs.
|
|
1313
1301
|
*
|
|
1314
|
-
*
|
|
1315
|
-
*
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
*
|
|
1320
|
-
*
|
|
1321
|
-
*
|
|
1322
|
-
*
|
|
1302
|
+
* @type {string}
|
|
1303
|
+
* @memberOf NgxDecafComponentDirective
|
|
1304
|
+
*/
|
|
1305
|
+
route: string;
|
|
1306
|
+
/**
|
|
1307
|
+
* @description Flag indicating if the component has been initialized
|
|
1308
|
+
* @summary Tracks whether the component has completed its initialization process.
|
|
1309
|
+
* This flag is used to prevent duplicate initialization and to determine if
|
|
1310
|
+
* certain operations that require initialization can be performed.
|
|
1323
1311
|
*
|
|
1324
|
-
* @
|
|
1312
|
+
* @type {boolean}
|
|
1313
|
+
* @default false
|
|
1314
|
+
* @memberOf NgxDecafComponentDirective
|
|
1325
1315
|
*/
|
|
1326
|
-
|
|
1316
|
+
initialized: boolean;
|
|
1317
|
+
constructor(componentName?: string | undefined, localeRoot?: string | undefined);
|
|
1318
|
+
get localeContext(): string;
|
|
1327
1319
|
/**
|
|
1328
1320
|
* @description Getter for the repository instance.
|
|
1329
1321
|
* @summary Provides a connection to the data layer for retrieving and manipulating data.
|
|
@@ -1336,7 +1328,7 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1336
1328
|
*
|
|
1337
1329
|
* @returns {DecafRepository<Model>} The initialized repository instance.
|
|
1338
1330
|
* @private
|
|
1339
|
-
* @memberOf
|
|
1331
|
+
* @memberOf NgxDecafComponentDirective
|
|
1340
1332
|
*/
|
|
1341
1333
|
protected get repository(): DecafRepository<Model>;
|
|
1342
1334
|
/**
|
|
@@ -1352,39 +1344,9 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1352
1344
|
* @return {void}
|
|
1353
1345
|
*/
|
|
1354
1346
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
* and available locale settings. This method first converts the translatable parameter to a boolean
|
|
1359
|
-
* using the stringToBoolean utility function. If translatable is false, it returns an empty string,
|
|
1360
|
-
* indicating no translation should be performed. If translatable is true, it checks for an explicitly
|
|
1361
|
-
* provided locale via the locale property. If no explicit locale is available, it falls back to the
|
|
1362
|
-
* componentLocale derived from the component's class name.
|
|
1363
|
-
*
|
|
1364
|
-
* @param {StringOrBoolean} translatable - Whether the component should be translated
|
|
1365
|
-
* @return {string} The locale string to use for translation, or empty string if not translatable
|
|
1366
|
-
*
|
|
1367
|
-
* @mermaid
|
|
1368
|
-
* sequenceDiagram
|
|
1369
|
-
* participant C as Component
|
|
1370
|
-
* participant N as NgxBaseComponent
|
|
1371
|
-
* participant S as StringUtils
|
|
1372
|
-
*
|
|
1373
|
-
* C->>N: getLocale(translatable)
|
|
1374
|
-
* N->>S: stringToBoolean(translatable)
|
|
1375
|
-
* S-->>N: Return boolean value
|
|
1376
|
-
* N->>N: Store in this.translatable
|
|
1377
|
-
* alt translatable is false
|
|
1378
|
-
* N-->>C: Return empty string
|
|
1379
|
-
* else translatable is true
|
|
1380
|
-
* alt this.locale is defined
|
|
1381
|
-
* N-->>C: Return this.locale
|
|
1382
|
-
* else this.locale is not defined
|
|
1383
|
-
* N-->>C: Return this.componentLocale
|
|
1384
|
-
* end
|
|
1385
|
-
* end
|
|
1386
|
-
*/
|
|
1387
|
-
getLocale(translatable: StringOrBoolean): string;
|
|
1347
|
+
protected translate(phrase: string | string[], params?: object | string): Promise<string>;
|
|
1348
|
+
protected initialize(...args: unknown[]): Promise<void>;
|
|
1349
|
+
protected getLocale(locale?: string): string;
|
|
1388
1350
|
/**
|
|
1389
1351
|
* @description Gets the route for the component
|
|
1390
1352
|
* @summary Retrieves the route path for the component, generating one based on the model
|
|
@@ -1405,66 +1367,19 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1405
1367
|
* @param {string | Model} model - The model instance or identifier string
|
|
1406
1368
|
* @return {void}
|
|
1407
1369
|
*/
|
|
1408
|
-
getModel(model: string | Model): void;
|
|
1370
|
+
getModel<M extends Model>(model: string | Model | ModelConstructor<M>): void;
|
|
1409
1371
|
/**
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1372
|
+
* @description Configures component properties based on model metadata
|
|
1373
|
+
* @summary Extracts and applies configuration from the model's decorators to set up
|
|
1374
|
+
* the component. This method uses the rendering engine to retrieve decorator metadata
|
|
1375
|
+
* from the model, then configures the component's mapper and item properties accordingly.
|
|
1376
|
+
* It ensures the route is properly set and merges various properties from the model's
|
|
1377
|
+
* metadata into the component's configuration.
|
|
1378
|
+
*
|
|
1379
|
+
* @param {Model} model - The model to extract configuration from
|
|
1380
|
+
* @return {void}
|
|
1381
|
+
*/
|
|
1420
1382
|
setModelDefinitions(model: Model): void;
|
|
1421
|
-
/**
|
|
1422
|
-
* @description Initializes the component
|
|
1423
|
-
* @summary Performs one-time initialization of the component. This method checks if
|
|
1424
|
-
* the component has already been initialized to prevent duplicate initialization.
|
|
1425
|
-
* When called for the first time, it sets the initialized flag to true and logs
|
|
1426
|
-
* an initialization message with the component name. This method is typically called
|
|
1427
|
-
* during the component's lifecycle setup.
|
|
1428
|
-
*/
|
|
1429
|
-
initialize(parseProps?: boolean, skip?: string[]): Promise<void>;
|
|
1430
|
-
/**
|
|
1431
|
-
* @description Handles custom events from child components.
|
|
1432
|
-
* @summary Receives events from child renderer components and forwards them to parent
|
|
1433
|
-
* components through the listenEvent output. This creates an event propagation chain
|
|
1434
|
-
* that allows events to bubble up through the component hierarchy, enabling coordinated
|
|
1435
|
-
* responses to user interactions across the layout structure.
|
|
1436
|
-
*
|
|
1437
|
-
* @param {RendererCustomEvent} event - The custom event from a child component
|
|
1438
|
-
* @return {void}
|
|
1439
|
-
*
|
|
1440
|
-
* @mermaid
|
|
1441
|
-
* sequenceDiagram
|
|
1442
|
-
* participant C as Child Component
|
|
1443
|
-
* participant L as NgxBaseComponent
|
|
1444
|
-
* participant P as Parent Component
|
|
1445
|
-
*
|
|
1446
|
-
* C->>L: Emit RendererCustomEvent
|
|
1447
|
-
* L->>L: handleEvent(event)
|
|
1448
|
-
* L->>P: listenEvent.emit(event)
|
|
1449
|
-
* Note over P: Handle event in parent
|
|
1450
|
-
*
|
|
1451
|
-
* @memberOf NgxBaseComponent
|
|
1452
|
-
*/
|
|
1453
|
-
handleEvent(event: RendererCustomEvent): void;
|
|
1454
|
-
/**
|
|
1455
|
-
* @description Tracks items in ngFor loops for optimal change detection.
|
|
1456
|
-
* @summary Provides a tracking function for Angular's *ngFor directive to optimize rendering
|
|
1457
|
-
* performance. This method generates unique identifiers for list items based on their index
|
|
1458
|
-
* and content, allowing Angular to efficiently track changes and minimize DOM manipulations
|
|
1459
|
-
* during list updates. The tracking function is essential for maintaining component state
|
|
1460
|
-
* and preventing unnecessary re-rendering of unchanged items.
|
|
1461
|
-
*
|
|
1462
|
-
* @param {number} index - The index of the item in the list
|
|
1463
|
-
* @param {KeyValue | string | number} item - The item data to track
|
|
1464
|
-
* @returns {string | number} A unique identifier for the item
|
|
1465
|
-
* @memberOf NgxBaseComponent
|
|
1466
|
-
*/
|
|
1467
|
-
trackItemFn(index: number, item: KeyValue | string | number): string | number;
|
|
1468
1383
|
/**
|
|
1469
1384
|
* @description Parses and applies properties from the props object to the component instance.
|
|
1470
1385
|
* @summary This method iterates through the properties of the provided instance object
|
|
@@ -1483,7 +1398,7 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1483
1398
|
* @mermaid
|
|
1484
1399
|
* sequenceDiagram
|
|
1485
1400
|
* participant C as Component
|
|
1486
|
-
* participant B as
|
|
1401
|
+
* participant B as NgxBaseComponentDirective
|
|
1487
1402
|
* participant P as Props Object
|
|
1488
1403
|
*
|
|
1489
1404
|
* C->>B: parseProps(instance)
|
|
@@ -1498,27 +1413,67 @@ declare abstract class NgxBaseComponent implements OnChanges {
|
|
|
1498
1413
|
* end
|
|
1499
1414
|
*
|
|
1500
1415
|
* @protected
|
|
1501
|
-
* @memberOf
|
|
1416
|
+
* @memberOf NgxBaseComponentDirective
|
|
1417
|
+
*/
|
|
1418
|
+
protected parseProps(instance: KeyValue, skip?: string[]): void;
|
|
1419
|
+
/**
|
|
1420
|
+
* @description Tracks items in ngFor loops for optimal change detection.
|
|
1421
|
+
* @summary Provides a tracking function for Angular's *ngFor directive to optimize rendering
|
|
1422
|
+
* performance. This method generates unique identifiers for list items based on their index
|
|
1423
|
+
* and content, allowing Angular to efficiently track changes and minimize DOM manipulations
|
|
1424
|
+
* during list updates. The tracking function is essential for maintaining component state
|
|
1425
|
+
* and preventing unnecessary re-rendering of unchanged items.
|
|
1426
|
+
*
|
|
1427
|
+
* @param {number} index - The index of the item in the list
|
|
1428
|
+
* @param {KeyValue | string | number} item - The item data to track
|
|
1429
|
+
* @returns {string | number} A unique identifier for the item
|
|
1430
|
+
* @memberOf NgxDecafComponentDirective
|
|
1502
1431
|
*/
|
|
1503
|
-
protected
|
|
1504
|
-
|
|
1505
|
-
static
|
|
1432
|
+
protected trackItemFn(index: number, item: KeyValue | string | number): string | number;
|
|
1433
|
+
handleEvent(event: IBaseCustomEvent | ICrudFormEvent | CustomEvent): Promise<void>;
|
|
1434
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxDecafComponentDirective, never>;
|
|
1435
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDecafComponentDirective, never, never, { "name": { "alias": "name"; "required": false; }; "childOf": { "alias": "childOf"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "model": { "alias": "model"; "required": false; }; "modelId": { "alias": "modelId"; "required": false; }; "pk": { "alias": "pk"; "required": false; }; "mapper": { "alias": "mapper"; "required": false; }; "operations": { "alias": "operations"; "required": false; }; "row": { "alias": "row"; "required": false; }; "col": { "alias": "col"; "required": false; }; "className": { "alias": "className"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "item": { "alias": "item"; "required": false; }; "props": { "alias": "props"; "required": false; }; "route": { "alias": "route"; "required": false; }; }, { "listenEvent": "listenEvent"; }, never, never, true, never>;
|
|
1506
1436
|
}
|
|
1507
1437
|
|
|
1508
1438
|
/**
|
|
1509
|
-
* @class
|
|
1439
|
+
* @class NgxDecafFormFieldDirective
|
|
1510
1440
|
* @implements {FieldProperties}
|
|
1511
1441
|
* @implements {ControlValueAccessor}
|
|
1512
1442
|
* @summary Abstract class representing a CRUD form field for Angular applications
|
|
1513
1443
|
* @description This class provides the base implementation for CRUD form fields in Angular,
|
|
1514
1444
|
* implementing both CrudFormField and ControlValueAccessor interfaces.
|
|
1515
1445
|
*/
|
|
1516
|
-
declare abstract class
|
|
1446
|
+
declare abstract class NgxDecafFormFieldDirective extends NgxDecafComponentDirective implements ControlValueAccessor, FieldProperties {
|
|
1517
1447
|
/**
|
|
1518
|
-
* @
|
|
1519
|
-
* @
|
|
1448
|
+
* @description Index of the currently active form group in a form array.
|
|
1449
|
+
* @summary When working with multiple form groups (form arrays), this indicates
|
|
1450
|
+
* which form group is currently active or being edited. This is used to manage
|
|
1451
|
+
* focus and data binding in multi-entry scenarios.
|
|
1452
|
+
*
|
|
1453
|
+
* @type {number}
|
|
1454
|
+
* @default 0
|
|
1455
|
+
* @memberOf NgxDecafFormFieldDirective
|
|
1520
1456
|
*/
|
|
1521
|
-
|
|
1457
|
+
activeFormGroupIndex: number;
|
|
1458
|
+
/**
|
|
1459
|
+
* @description FormArray containing multiple form groups for this field.
|
|
1460
|
+
* @summary When this field is part of a multi-entry structure, this FormArray
|
|
1461
|
+
* contains all the form groups. This enables management of multiple instances
|
|
1462
|
+
* of the same field structure within a single form.
|
|
1463
|
+
*
|
|
1464
|
+
* @type {FormArray}
|
|
1465
|
+
* @memberOf CrudFieldComponent
|
|
1466
|
+
*/
|
|
1467
|
+
parentComponent: FormParent;
|
|
1468
|
+
/**
|
|
1469
|
+
* @description Field mapping configuration.
|
|
1470
|
+
* @summary Defines how fields from the data model should be mapped to properties used by the component.
|
|
1471
|
+
* This allows for flexible data binding between the model and the component's display logic.
|
|
1472
|
+
*
|
|
1473
|
+
* @type {KeyValue | FunctionLike}
|
|
1474
|
+
* @memberOf CrudFieldComponent
|
|
1475
|
+
*/
|
|
1476
|
+
optionsMapper: KeyValue | FunctionLike;
|
|
1522
1477
|
/**
|
|
1523
1478
|
* @summary Current CRUD operation
|
|
1524
1479
|
* @description Represents the current CRUD operation being performed
|
|
@@ -1530,12 +1485,9 @@ declare abstract class NgxCrudFormField implements ControlValueAccessor, FieldPr
|
|
|
1530
1485
|
*/
|
|
1531
1486
|
formGroup: FormGroup | undefined;
|
|
1532
1487
|
formControl: FormControl;
|
|
1533
|
-
name: string;
|
|
1534
1488
|
path: string;
|
|
1535
|
-
childOf?: string;
|
|
1536
1489
|
type: PossibleInputTypes;
|
|
1537
1490
|
disabled?: boolean;
|
|
1538
|
-
uid?: string;
|
|
1539
1491
|
page: number;
|
|
1540
1492
|
format?: string;
|
|
1541
1493
|
hidden?: boolean | CrudOperationKeys[];
|
|
@@ -1553,15 +1505,25 @@ declare abstract class NgxCrudFormField implements ControlValueAccessor, FieldPr
|
|
|
1553
1505
|
lessThanOrEqual?: string;
|
|
1554
1506
|
greaterThan?: string;
|
|
1555
1507
|
greaterThanOrEqual?: string;
|
|
1556
|
-
value: string | number | Date;
|
|
1508
|
+
value: string | number | Date | string[];
|
|
1557
1509
|
multiple: boolean;
|
|
1558
|
-
|
|
1559
|
-
private validationErrorEventDispateched;
|
|
1510
|
+
private validationErrorEventDispatched;
|
|
1560
1511
|
/**
|
|
1561
1512
|
* @summary Parent HTML element
|
|
1562
1513
|
* @description Reference to the parent HTML element of the field
|
|
1563
1514
|
*/
|
|
1564
1515
|
protected parent?: HTMLElement;
|
|
1516
|
+
constructor();
|
|
1517
|
+
/**
|
|
1518
|
+
* @description Gets the currently active form group based on context.
|
|
1519
|
+
* @summary Returns the appropriate FormGroup based on whether this field supports
|
|
1520
|
+
* multiple values. For single-value fields, returns the main form group.
|
|
1521
|
+
* For multi-value fields, returns the form group at the active index from the parent FormArray.
|
|
1522
|
+
*
|
|
1523
|
+
* @returns {FormGroup} The currently active FormGroup for this field
|
|
1524
|
+
* @memberOf CrudFieldComponent
|
|
1525
|
+
*/
|
|
1526
|
+
get activeFormGroup(): FormGroup;
|
|
1565
1527
|
/**
|
|
1566
1528
|
* @summary String formatting function
|
|
1567
1529
|
* @description Provides access to the sf function for error message formatting
|
|
@@ -1610,22 +1572,27 @@ declare abstract class NgxCrudFormField implements ControlValueAccessor, FieldPr
|
|
|
1610
1572
|
* @returns {HTMLElement} The parent element of the field
|
|
1611
1573
|
*/
|
|
1612
1574
|
afterViewInit(): HTMLElement;
|
|
1613
|
-
|
|
1614
|
-
* @summary Cleanup on component destruction
|
|
1615
|
-
* @description Unregisters the field when the component is destroyed
|
|
1616
|
-
*/
|
|
1575
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1617
1576
|
onDestroy(): void;
|
|
1618
|
-
|
|
1619
|
-
* @summary Get field errors
|
|
1620
|
-
* @description Retrieves all errors associated with the field
|
|
1621
|
-
* @returns {string|void} An array of error objects
|
|
1622
|
-
*/
|
|
1577
|
+
setValue(value: unknown): void;
|
|
1623
1578
|
getErrors(parent: HTMLElement): string | void;
|
|
1579
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxDecafFormFieldDirective, never>;
|
|
1580
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxDecafFormFieldDirective, never, never, { "activeFormGroupIndex": { "alias": "activeFormGroupIndex"; "required": false; }; "parentComponent": { "alias": "parentComponent"; "required": false; }; "optionsMapper": { "alias": "optionsMapper"; "required": false; }; }, {}, never, never, true, never>;
|
|
1624
1581
|
}
|
|
1625
1582
|
|
|
1583
|
+
/**
|
|
1584
|
+
* @module module:lib/engine/NgxDecafFormService
|
|
1585
|
+
* @description Utilities to create and manage Angular forms in Decaf components.
|
|
1586
|
+
* @summary The NgxDecafFormService exposes helpers to build FormGroup/FormArray instances
|
|
1587
|
+
* from component metadata or UI model definitions, register forms in a registry,
|
|
1588
|
+
* validate and extract form data, and create controls with appropriate validators.
|
|
1589
|
+
*
|
|
1590
|
+
* @link {@link NgxDecafFormService}
|
|
1591
|
+
*/
|
|
1592
|
+
|
|
1626
1593
|
/**
|
|
1627
1594
|
* @description Service for managing Angular forms and form controls.
|
|
1628
|
-
* @summary The
|
|
1595
|
+
* @summary The NgxDecafFormService provides utility methods for creating, managing, and validating Angular forms and form controls. It includes functionality for registering forms, adding controls, validating fields, and handling form data.
|
|
1629
1596
|
*
|
|
1630
1597
|
* @class
|
|
1631
1598
|
* @param {WeakMap<AbstractControl, FieldProperties>} controls - A WeakMap to store control properties.
|
|
@@ -1637,18 +1604,18 @@ declare abstract class NgxCrudFormField implements ControlValueAccessor, FieldPr
|
|
|
1637
1604
|
* { inputs: { name: 'username', type: 'text', required: true } },
|
|
1638
1605
|
* { inputs: { name: 'password', type: 'password', minLength: 8 } }
|
|
1639
1606
|
* ];
|
|
1640
|
-
* const form =
|
|
1607
|
+
* const form = NgxDecafFormService.createFormFromComponents('loginForm', components, true);
|
|
1641
1608
|
*
|
|
1642
1609
|
* // Validating fields
|
|
1643
|
-
*
|
|
1610
|
+
* NgxDecafFormService.validateFields(form);
|
|
1644
1611
|
*
|
|
1645
1612
|
* // Getting form data
|
|
1646
|
-
* const formData =
|
|
1613
|
+
* const formData = NgxDecafFormService.getFormData(form);
|
|
1647
1614
|
*
|
|
1648
1615
|
* @mermaid
|
|
1649
1616
|
* sequenceDiagram
|
|
1650
1617
|
* participant C as Component
|
|
1651
|
-
* participant NFS as
|
|
1618
|
+
* participant NFS as NgxDecafFormService
|
|
1652
1619
|
* participant AF as Angular Forms
|
|
1653
1620
|
* C->>NFS: createFormFromComponents()
|
|
1654
1621
|
* NFS->>AF: new FormGroup()
|
|
@@ -1661,7 +1628,7 @@ declare abstract class NgxCrudFormField implements ControlValueAccessor, FieldPr
|
|
|
1661
1628
|
* NFS->>AF: Get control values
|
|
1662
1629
|
* NFS-->>C: Return form data
|
|
1663
1630
|
*/
|
|
1664
|
-
declare class
|
|
1631
|
+
declare class NgxDecafFormService {
|
|
1665
1632
|
/**
|
|
1666
1633
|
* @description WeakMap that stores control properties for form controls.
|
|
1667
1634
|
* @summary A WeakMap that associates AbstractControl instances with their corresponding FieldProperties.
|
|
@@ -1670,7 +1637,7 @@ declare class NgxFormService {
|
|
|
1670
1637
|
* @type {WeakMap<AbstractControl, FieldProperties>}
|
|
1671
1638
|
* @private
|
|
1672
1639
|
* @static
|
|
1673
|
-
* @memberOf
|
|
1640
|
+
* @memberOf NgxDecafFormService
|
|
1674
1641
|
*/
|
|
1675
1642
|
private static controls;
|
|
1676
1643
|
/**
|
|
@@ -1681,7 +1648,7 @@ declare class NgxFormService {
|
|
|
1681
1648
|
* @type {Map<string, FormGroup>}
|
|
1682
1649
|
* @private
|
|
1683
1650
|
* @static
|
|
1684
|
-
* @memberOf
|
|
1651
|
+
* @memberOf NgxDecafFormService
|
|
1685
1652
|
*/
|
|
1686
1653
|
private static formRegistry;
|
|
1687
1654
|
/**
|
|
@@ -1698,7 +1665,7 @@ declare class NgxFormService {
|
|
|
1698
1665
|
* @mermaid
|
|
1699
1666
|
* sequenceDiagram
|
|
1700
1667
|
* participant C as Component
|
|
1701
|
-
* participant NFS as
|
|
1668
|
+
* participant NFS as NgxDecafFormService
|
|
1702
1669
|
* participant FR as Form Registry
|
|
1703
1670
|
* participant AF as Angular Forms
|
|
1704
1671
|
*
|
|
@@ -1717,9 +1684,9 @@ declare class NgxFormService {
|
|
|
1717
1684
|
* NFS-->>C: Return FormGroup | FormArray
|
|
1718
1685
|
*
|
|
1719
1686
|
* @static
|
|
1720
|
-
* @memberOf
|
|
1687
|
+
* @memberOf NgxDecafFormService
|
|
1721
1688
|
*/
|
|
1722
|
-
static createForm(id: string,
|
|
1689
|
+
static createForm(id: string, formArray?: boolean, registry?: boolean): FormGroup | FormArray;
|
|
1723
1690
|
/**
|
|
1724
1691
|
* @description Adds a form to the registry.
|
|
1725
1692
|
* @summary Registers a FormGroup or FormArray with a unique identifier for global access throughout
|
|
@@ -1732,9 +1699,10 @@ declare class NgxFormService {
|
|
|
1732
1699
|
* @throws {Error} If a FormGroup with the given id is already registered
|
|
1733
1700
|
*
|
|
1734
1701
|
* @static
|
|
1735
|
-
* @memberOf
|
|
1702
|
+
* @memberOf NgxDecafFormService
|
|
1736
1703
|
*/
|
|
1737
1704
|
static addRegistry(formId: string, formGroup: FormParent): void;
|
|
1705
|
+
static getOnRegistry(id?: string): FormParent | undefined;
|
|
1738
1706
|
/**
|
|
1739
1707
|
* @description Removes a form from the registry.
|
|
1740
1708
|
* @summary Deletes a FormGroup or FormArray from the registry using its unique identifier.
|
|
@@ -1745,7 +1713,7 @@ declare class NgxFormService {
|
|
|
1745
1713
|
* @return {void}
|
|
1746
1714
|
*
|
|
1747
1715
|
* @static
|
|
1748
|
-
* @memberOf
|
|
1716
|
+
* @memberOf NgxDecafFormService
|
|
1749
1717
|
*/
|
|
1750
1718
|
static removeRegistry(formId: string): void;
|
|
1751
1719
|
/**
|
|
@@ -1763,7 +1731,7 @@ declare class NgxFormService {
|
|
|
1763
1731
|
* @private
|
|
1764
1732
|
* @mermaid
|
|
1765
1733
|
* sequenceDiagram
|
|
1766
|
-
* participant NFS as
|
|
1734
|
+
* participant NFS as NgxDecafFormService
|
|
1767
1735
|
* participant FG as FormGroup
|
|
1768
1736
|
* participant FA as FormArray
|
|
1769
1737
|
*
|
|
@@ -1782,7 +1750,7 @@ declare class NgxFormService {
|
|
|
1782
1750
|
* NFS-->>NFS: Return [parentGroup, controlName]
|
|
1783
1751
|
*
|
|
1784
1752
|
* @static
|
|
1785
|
-
* @memberOf
|
|
1753
|
+
* @memberOf NgxDecafFormService
|
|
1786
1754
|
*/
|
|
1787
1755
|
private static resolveParentGroup;
|
|
1788
1756
|
/**
|
|
@@ -1796,7 +1764,7 @@ declare class NgxFormService {
|
|
|
1796
1764
|
* @return {Partial<FieldProperties>} The component properties or a specific property if key is provided
|
|
1797
1765
|
*
|
|
1798
1766
|
* @static
|
|
1799
|
-
* @memberOf
|
|
1767
|
+
* @memberOf NgxDecafFormService
|
|
1800
1768
|
*/
|
|
1801
1769
|
static getComponentPropsFromGroupArray(formGroup: FormGroup | FormArray, key?: string, groupArrayName?: string | undefined): Partial<FieldProperties>;
|
|
1802
1770
|
/**
|
|
@@ -1805,15 +1773,14 @@ declare class NgxFormService {
|
|
|
1805
1773
|
* component properties stored in the parent's metadata. This is used for dynamic form arrays
|
|
1806
1774
|
* where new groups need to be added at runtime.
|
|
1807
1775
|
*
|
|
1808
|
-
* @param {
|
|
1809
|
-
* @param {
|
|
1810
|
-
* @param {number} [index=1] - The index position where the new group should be added
|
|
1776
|
+
* @param {FormParent} parentForm - The root form group containing the parent FormArray
|
|
1777
|
+
* @param {number} index - The index position where the new group should be added
|
|
1811
1778
|
* @return {FormGroup} The newly created and added FormGroup
|
|
1812
1779
|
*
|
|
1813
1780
|
* @static
|
|
1814
|
-
* @memberOf
|
|
1781
|
+
* @memberOf NgxDecafFormService
|
|
1815
1782
|
*/
|
|
1816
|
-
static addGroupToParent(
|
|
1783
|
+
static addGroupToParent(parentForm: FormParent, index?: number): FormArray;
|
|
1817
1784
|
/**
|
|
1818
1785
|
* @description Retrieves a FormGroup from a parent FormArray at the specified index.
|
|
1819
1786
|
* @summary Gets a FormGroup from the specified parent FormArray. If the group doesn't exist
|
|
@@ -1825,9 +1792,10 @@ declare class NgxFormService {
|
|
|
1825
1792
|
* @return {FormGroup} The FormGroup at the specified index
|
|
1826
1793
|
*
|
|
1827
1794
|
* @static
|
|
1828
|
-
* @memberOf
|
|
1795
|
+
* @memberOf NgxDecafFormService
|
|
1829
1796
|
*/
|
|
1830
|
-
static getGroupFromParent(formGroup:
|
|
1797
|
+
static getGroupFromParent(formGroup: FormParent, parentName: string, index?: number): FormGroup;
|
|
1798
|
+
static cloneFormControl(control: AbstractControl): AbstractControl;
|
|
1831
1799
|
/**
|
|
1832
1800
|
* @description Checks if a value is unique within a FormArray group.
|
|
1833
1801
|
* @summary Validates that the primary key value in a FormGroup is unique among all groups
|
|
@@ -1839,9 +1807,9 @@ declare class NgxFormService {
|
|
|
1839
1807
|
* @return {boolean} True if the value is unique, false otherwise
|
|
1840
1808
|
*
|
|
1841
1809
|
* @static
|
|
1842
|
-
* @memberOf
|
|
1810
|
+
* @memberOf NgxDecafFormService
|
|
1843
1811
|
*/
|
|
1844
|
-
static isUniqueOnGroup(formGroup: FormGroup,
|
|
1812
|
+
static isUniqueOnGroup(formGroup: FormGroup, operation?: OperationKeys, index?: number): boolean;
|
|
1845
1813
|
/**
|
|
1846
1814
|
* @description Enables all controls within a FormGroup or FormArray.
|
|
1847
1815
|
* @summary Recursively enables all form controls within the provided FormGroup or FormArray.
|
|
@@ -1851,7 +1819,7 @@ declare class NgxFormService {
|
|
|
1851
1819
|
* @return {void}
|
|
1852
1820
|
*
|
|
1853
1821
|
* @static
|
|
1854
|
-
* @memberOf
|
|
1822
|
+
* @memberOf NgxDecafFormService
|
|
1855
1823
|
*/
|
|
1856
1824
|
static enableAllGroupControls(formGroup: FormArray | FormGroup): void;
|
|
1857
1825
|
/**
|
|
@@ -1868,7 +1836,7 @@ declare class NgxFormService {
|
|
|
1868
1836
|
*
|
|
1869
1837
|
* @private
|
|
1870
1838
|
* @static
|
|
1871
|
-
* @memberOf
|
|
1839
|
+
* @memberOf NgxDecafFormService
|
|
1872
1840
|
*/
|
|
1873
1841
|
private static addFormControl;
|
|
1874
1842
|
/**
|
|
@@ -1885,7 +1853,7 @@ declare class NgxFormService {
|
|
|
1885
1853
|
* @mermaid
|
|
1886
1854
|
* sequenceDiagram
|
|
1887
1855
|
* participant C as Component
|
|
1888
|
-
* participant NFS as
|
|
1856
|
+
* participant NFS as NgxDecafFormService
|
|
1889
1857
|
* participant FR as Form Registry
|
|
1890
1858
|
*
|
|
1891
1859
|
* C->>NFS: getControlFromForm(formId, path?)
|
|
@@ -1908,7 +1876,7 @@ declare class NgxFormService {
|
|
|
1908
1876
|
* end
|
|
1909
1877
|
*
|
|
1910
1878
|
* @static
|
|
1911
|
-
* @memberOf
|
|
1879
|
+
* @memberOf NgxDecafFormService
|
|
1912
1880
|
*/
|
|
1913
1881
|
static getControlFromForm(formId: string, path?: string): AbstractControl;
|
|
1914
1882
|
/**
|
|
@@ -1925,7 +1893,7 @@ declare class NgxFormService {
|
|
|
1925
1893
|
* @mermaid
|
|
1926
1894
|
* sequenceDiagram
|
|
1927
1895
|
* participant C as Component
|
|
1928
|
-
* participant NFS as
|
|
1896
|
+
* participant NFS as NgxDecafFormService
|
|
1929
1897
|
* participant AF as Angular Forms
|
|
1930
1898
|
*
|
|
1931
1899
|
* C->>NFS: createFormFromChildren(id, registry, children)
|
|
@@ -1940,7 +1908,7 @@ declare class NgxFormService {
|
|
|
1940
1908
|
* NFS-->>C: Return FormGroup
|
|
1941
1909
|
*
|
|
1942
1910
|
* @static
|
|
1943
|
-
* @memberOf
|
|
1911
|
+
* @memberOf NgxDecafFormService
|
|
1944
1912
|
*/
|
|
1945
1913
|
static createFormFromChildren(id: string, registry?: boolean, children?: UIModelMetadata[]): FormGroup;
|
|
1946
1914
|
/**
|
|
@@ -1957,7 +1925,7 @@ declare class NgxFormService {
|
|
|
1957
1925
|
* @mermaid
|
|
1958
1926
|
* sequenceDiagram
|
|
1959
1927
|
* participant C as Component
|
|
1960
|
-
* participant NFS as
|
|
1928
|
+
* participant NFS as NgxDecafFormService
|
|
1961
1929
|
* participant AF as Angular Forms
|
|
1962
1930
|
*
|
|
1963
1931
|
* C->>NFS: createFormFromComponents(id, components, registry)
|
|
@@ -1972,7 +1940,7 @@ declare class NgxFormService {
|
|
|
1972
1940
|
* NFS-->>C: Return FormGroup
|
|
1973
1941
|
*
|
|
1974
1942
|
* @static
|
|
1975
|
-
* @memberOf
|
|
1943
|
+
* @memberOf NgxDecafFormService
|
|
1976
1944
|
*/
|
|
1977
1945
|
static createFormFromComponents(id: string, components: IComponentConfig[], registry?: boolean): FormGroup;
|
|
1978
1946
|
/**
|
|
@@ -1989,7 +1957,7 @@ declare class NgxFormService {
|
|
|
1989
1957
|
* @mermaid
|
|
1990
1958
|
* sequenceDiagram
|
|
1991
1959
|
* participant C as Component
|
|
1992
|
-
* participant NFS as
|
|
1960
|
+
* participant NFS as NgxDecafFormService
|
|
1993
1961
|
* participant F as Form
|
|
1994
1962
|
*
|
|
1995
1963
|
* C->>NFS: addControlFromProps(id, componentProps, parentProps?)
|
|
@@ -2005,9 +1973,9 @@ declare class NgxFormService {
|
|
|
2005
1973
|
* NFS-->>C: Return form/control
|
|
2006
1974
|
*
|
|
2007
1975
|
* @static
|
|
2008
|
-
* @memberOf
|
|
1976
|
+
* @memberOf NgxDecafFormService
|
|
2009
1977
|
*/
|
|
2010
|
-
static addControlFromProps(id: string, componentProperties: FieldProperties, parentProps?: FieldProperties):
|
|
1978
|
+
static addControlFromProps(id: string, componentProperties: FieldProperties, parentProps?: FieldProperties): FormParent;
|
|
2011
1979
|
/**
|
|
2012
1980
|
* @description Retrieves form data from a FormGroup.
|
|
2013
1981
|
* @summary Extracts and processes the data from a FormGroup, handling different input types and nested form groups.
|
|
@@ -2020,7 +1988,7 @@ declare class NgxFormService {
|
|
|
2020
1988
|
* @mermaid
|
|
2021
1989
|
* sequenceDiagram
|
|
2022
1990
|
* participant C as Component
|
|
2023
|
-
* participant NFS as
|
|
1991
|
+
* participant NFS as NgxDecafFormService
|
|
2024
1992
|
* participant FG as FormGroup
|
|
2025
1993
|
* participant FC as FormControl
|
|
2026
1994
|
*
|
|
@@ -2049,7 +2017,7 @@ declare class NgxFormService {
|
|
|
2049
2017
|
* NFS-->>C: Return processed data object
|
|
2050
2018
|
*
|
|
2051
2019
|
* @static
|
|
2052
|
-
* @memberOf
|
|
2020
|
+
* @memberOf NgxDecafFormService
|
|
2053
2021
|
*/
|
|
2054
2022
|
static getFormData(formGroup: FormGroup): Record<string, unknown>;
|
|
2055
2023
|
/**
|
|
@@ -2067,7 +2035,7 @@ declare class NgxFormService {
|
|
|
2067
2035
|
* @mermaid
|
|
2068
2036
|
* sequenceDiagram
|
|
2069
2037
|
* participant C as Component
|
|
2070
|
-
* participant NFS as
|
|
2038
|
+
* participant NFS as NgxDecafFormService
|
|
2071
2039
|
* participant FC as FormControl
|
|
2072
2040
|
* participant FG as FormGroup
|
|
2073
2041
|
* participant FA as FormArray
|
|
@@ -2099,13 +2067,13 @@ declare class NgxFormService {
|
|
|
2099
2067
|
* end
|
|
2100
2068
|
*
|
|
2101
2069
|
* @static
|
|
2102
|
-
* @memberOf
|
|
2070
|
+
* @memberOf NgxDecafFormService
|
|
2103
2071
|
*/
|
|
2104
2072
|
static validateFields(control: AbstractControl, pk?: string, path?: string): boolean;
|
|
2105
2073
|
/**
|
|
2106
2074
|
* @description Generates validators from component properties.
|
|
2107
2075
|
* @summary Creates an array of ValidatorFn based on the supported validation keys in the component properties.
|
|
2108
|
-
* @param {
|
|
2076
|
+
* @param {KeyValue} props - The component properties.
|
|
2109
2077
|
* @return {ValidatorFn[]} An array of validator functions.
|
|
2110
2078
|
*/
|
|
2111
2079
|
private static validatorsFromProps;
|
|
@@ -2122,7 +2090,7 @@ declare class NgxFormService {
|
|
|
2122
2090
|
* @mermaid
|
|
2123
2091
|
* sequenceDiagram
|
|
2124
2092
|
* participant C as Component
|
|
2125
|
-
* participant NFS as
|
|
2093
|
+
* participant NFS as NgxDecafFormService
|
|
2126
2094
|
* participant VF as ValidatorFactory
|
|
2127
2095
|
* participant AF as Angular Forms
|
|
2128
2096
|
*
|
|
@@ -2142,7 +2110,7 @@ declare class NgxFormService {
|
|
|
2142
2110
|
* NFS-->>C: Return configured FormControl
|
|
2143
2111
|
*
|
|
2144
2112
|
* @static
|
|
2145
|
-
* @memberOf
|
|
2113
|
+
* @memberOf NgxDecafFormService
|
|
2146
2114
|
*/
|
|
2147
2115
|
static fromProps(props: FieldProperties, updateMode?: FieldUpdateMode): FormControl;
|
|
2148
2116
|
/**
|
|
@@ -2155,7 +2123,7 @@ declare class NgxFormService {
|
|
|
2155
2123
|
* @return {FieldProperties} The properties associated with the control, or empty object if not found
|
|
2156
2124
|
*
|
|
2157
2125
|
* @static
|
|
2158
|
-
* @memberOf
|
|
2126
|
+
* @memberOf NgxDecafFormService
|
|
2159
2127
|
*/
|
|
2160
2128
|
static getPropsFromControl(control: FormControl | FormArray | FormGroup): FieldProperties;
|
|
2161
2129
|
/**
|
|
@@ -2172,7 +2140,7 @@ declare class NgxFormService {
|
|
|
2172
2140
|
* @mermaid
|
|
2173
2141
|
* sequenceDiagram
|
|
2174
2142
|
* participant C as Component
|
|
2175
|
-
* participant NFS as
|
|
2143
|
+
* participant NFS as NgxDecafFormService
|
|
2176
2144
|
* participant DOM as DOM Tree
|
|
2177
2145
|
*
|
|
2178
2146
|
* C->>NFS: getParentEl(element, tagName)
|
|
@@ -2187,7 +2155,7 @@ declare class NgxFormService {
|
|
|
2187
2155
|
* end
|
|
2188
2156
|
*
|
|
2189
2157
|
* @static
|
|
2190
|
-
* @memberOf
|
|
2158
|
+
* @memberOf NgxDecafFormService
|
|
2191
2159
|
*/
|
|
2192
2160
|
static getParentEl(el: HTMLElement, tag: string): HTMLElement;
|
|
2193
2161
|
/**
|
|
@@ -2201,7 +2169,7 @@ declare class NgxFormService {
|
|
|
2201
2169
|
* @return {void}
|
|
2202
2170
|
*
|
|
2203
2171
|
* @static
|
|
2204
|
-
* @memberOf
|
|
2172
|
+
* @memberOf NgxDecafFormService
|
|
2205
2173
|
*/
|
|
2206
2174
|
static register(control: AbstractControl, props: FieldProperties): void;
|
|
2207
2175
|
/**
|
|
@@ -2219,6 +2187,32 @@ declare class NgxFormService {
|
|
|
2219
2187
|
static reset(formGroup: FormGroup | FormControl): void;
|
|
2220
2188
|
}
|
|
2221
2189
|
|
|
2190
|
+
/**
|
|
2191
|
+
* @module module:lib/engine/NgxEventHandler
|
|
2192
|
+
* @description Event handler base class used by Decaf components.
|
|
2193
|
+
* @summary Defines NgxEventHandler which standardizes event handling logic and provides
|
|
2194
|
+
* logging support for handlers that process custom events emitted by components.
|
|
2195
|
+
*
|
|
2196
|
+
* @link {@link NgxEventHandler}
|
|
2197
|
+
*/
|
|
2198
|
+
|
|
2199
|
+
declare abstract class NgxEventHandler<PAYLOAD> extends LoggedClass {
|
|
2200
|
+
abstract handle(evt: IBaseCustomEvent | CustomEvent<PAYLOAD>): Promise<unknown>;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
declare abstract class NgxPageDirective extends NgxDecafComponentDirective {
|
|
2204
|
+
protected localeRoot?: string | undefined;
|
|
2205
|
+
protected hasMenu: boolean;
|
|
2206
|
+
title: string;
|
|
2207
|
+
protected menu: IMenuItem[];
|
|
2208
|
+
protected titleService: Title;
|
|
2209
|
+
constructor(localeRoot?: string | undefined, hasMenu?: boolean);
|
|
2210
|
+
ionViewWillEnter(): Promise<void>;
|
|
2211
|
+
protected setPageTitle(route: string, menu?: IMenuItem[]): void;
|
|
2212
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxPageDirective, never>;
|
|
2213
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxPageDirective, never, never, {}, {}, never, never, true, never>;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2222
2216
|
/**
|
|
2223
2217
|
* @description Dynamic component renderer for Decaf Angular applications.
|
|
2224
2218
|
* @summary This component provides a flexible way to dynamically render Angular components
|
|
@@ -2242,7 +2236,7 @@ declare class NgxFormService {
|
|
|
2242
2236
|
* +Record~string, unknown~ globals
|
|
2243
2237
|
* +EnvironmentInjector injector
|
|
2244
2238
|
* +ComponentRef~unknown~ component
|
|
2245
|
-
* +EventEmitter~
|
|
2239
|
+
* +EventEmitter~IBaseCustomEvent~ listenEvent
|
|
2246
2240
|
* +ngOnInit()
|
|
2247
2241
|
* +ngOnDestroy()
|
|
2248
2242
|
* +ngOnChanges(changes)
|
|
@@ -2315,6 +2309,7 @@ declare class ComponentRendererComponent implements OnInit, OnDestroy {
|
|
|
2315
2309
|
*/
|
|
2316
2310
|
component: ComponentRef<unknown>;
|
|
2317
2311
|
children: KeyValue[];
|
|
2312
|
+
projectable: boolean;
|
|
2318
2313
|
/**
|
|
2319
2314
|
* @description Event emitter for events from the rendered component.
|
|
2320
2315
|
* @summary This output property emits events that originate from the dynamically rendered
|
|
@@ -2322,10 +2317,10 @@ declare class ComponentRendererComponent implements OnInit, OnDestroy {
|
|
|
2322
2317
|
* dynamic component, creating a communication channel between the parent and the dynamically
|
|
2323
2318
|
* rendered child.
|
|
2324
2319
|
*
|
|
2325
|
-
* @type {EventEmitter<
|
|
2320
|
+
* @type {EventEmitter<IBaseCustomEvent>}
|
|
2326
2321
|
* @memberOf ComponentRendererComponent
|
|
2327
2322
|
*/
|
|
2328
|
-
listenEvent: EventEmitter<
|
|
2323
|
+
listenEvent: EventEmitter<IBaseCustomEvent>;
|
|
2329
2324
|
/**
|
|
2330
2325
|
* @description Logger instance for the component.
|
|
2331
2326
|
* @summary This property holds a Logger instance specific to this component.
|
|
@@ -2345,6 +2340,14 @@ declare class ComponentRendererComponent implements OnInit, OnDestroy {
|
|
|
2345
2340
|
* @type {Model| undefined}
|
|
2346
2341
|
*/
|
|
2347
2342
|
model: Model | undefined;
|
|
2343
|
+
/**
|
|
2344
|
+
* @description Repository model for data operations.
|
|
2345
|
+
* @summary The data model repository that this component will use for CRUD operations.
|
|
2346
|
+
* This provides a connection to the data layer for retrieving and manipulating data.
|
|
2347
|
+
*
|
|
2348
|
+
* @type {Model| undefined}
|
|
2349
|
+
*/
|
|
2350
|
+
parentComponent: FormParent | ElementRef<unknown> | undefined;
|
|
2348
2351
|
parent: undefined | KeyValue;
|
|
2349
2352
|
inner?: TemplateRef<unknown>;
|
|
2350
2353
|
uid: string;
|
|
@@ -2490,13 +2493,22 @@ declare class ComponentRendererComponent implements OnInit, OnDestroy {
|
|
|
2490
2493
|
*/
|
|
2491
2494
|
private unsubscribeEvents;
|
|
2492
2495
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentRendererComponent, never>;
|
|
2493
|
-
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>;
|
|
2496
|
+
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; }; "projectable": { "alias": "projectable"; "required": false; }; "model": { "alias": "model"; "required": false; }; "parentComponent": { "alias": "parentComponent"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; }, { "listenEvent": "listenEvent"; }, never, never, true, never>;
|
|
2494
2497
|
}
|
|
2495
2498
|
|
|
2499
|
+
/**
|
|
2500
|
+
* @module module:lib/components/crud-field/crud-field.component
|
|
2501
|
+
* @description CRUD field component module.
|
|
2502
|
+
* @summary Exposes `CrudFieldComponent`, a dynamic form field used in CRUD forms supporting
|
|
2503
|
+
* many input types, validation and integration with `NgxDecafFormFieldDirective` utilities.
|
|
2504
|
+
*
|
|
2505
|
+
* @link {@link CrudFieldComponent}
|
|
2506
|
+
*/
|
|
2507
|
+
|
|
2496
2508
|
/**
|
|
2497
2509
|
* @description A dynamic form field component for CRUD operations.
|
|
2498
2510
|
* @summary The CrudFieldComponent is a versatile form field component that adapts to different
|
|
2499
|
-
* input types and CRUD operations. It extends
|
|
2511
|
+
* input types and CRUD operations. It extends NgxDecafFormFieldDirective to inherit form handling capabilities
|
|
2500
2512
|
* and implements lifecycle hooks to properly initialize, render, and clean up. This component
|
|
2501
2513
|
* supports various input types (text, number, date, select, etc.), validation rules, and styling
|
|
2502
2514
|
* options, making it suitable for building dynamic forms for create, read, update, and delete
|
|
@@ -2536,7 +2548,7 @@ declare class ComponentRendererComponent implements OnInit, OnDestroy {
|
|
|
2536
2548
|
*
|
|
2537
2549
|
* @memberOf module:for-angular
|
|
2538
2550
|
*/
|
|
2539
|
-
declare class CrudFieldComponent extends
|
|
2551
|
+
declare class CrudFieldComponent extends NgxDecafFormFieldDirective implements OnInit, OnDestroy, AfterViewInit {
|
|
2540
2552
|
/**
|
|
2541
2553
|
* @description The CRUD operation being performed.
|
|
2542
2554
|
* @summary Specifies which CRUD operation (Create, Read, Update, Delete) the field is being used for.
|
|
@@ -2605,7 +2617,7 @@ declare class CrudFieldComponent extends NgxCrudFormField implements OnInit, OnD
|
|
|
2605
2617
|
* @default ''
|
|
2606
2618
|
* @memberOf CrudFieldComponent
|
|
2607
2619
|
*/
|
|
2608
|
-
value: string | number | Date;
|
|
2620
|
+
value: string | number | Date | string[];
|
|
2609
2621
|
/**
|
|
2610
2622
|
* @description Whether the field is disabled.
|
|
2611
2623
|
* @summary When true, the field will be rendered in a disabled state, preventing user interaction.
|
|
@@ -2781,24 +2793,6 @@ declare class CrudFieldComponent extends NgxCrudFormField implements OnInit, OnD
|
|
|
2781
2793
|
* @memberOf CrudFieldComponent
|
|
2782
2794
|
*/
|
|
2783
2795
|
greaterThanOrEqual?: string;
|
|
2784
|
-
/**
|
|
2785
|
-
* @description Number of columns for textarea inputs.
|
|
2786
|
-
* @summary For textarea inputs, this sets the visible width of the text area in average character widths.
|
|
2787
|
-
* This is used alongside rows to define the dimensions of the textarea.
|
|
2788
|
-
*
|
|
2789
|
-
* @type {number}
|
|
2790
|
-
* @memberOf CrudFieldComponent
|
|
2791
|
-
*/
|
|
2792
|
-
cols?: number;
|
|
2793
|
-
/**
|
|
2794
|
-
* @description Number of rows for textarea inputs.
|
|
2795
|
-
* @summary For textarea inputs, this sets the visible height of the text area in lines of text.
|
|
2796
|
-
* This is used alongside cols to define the dimensions of the textarea.
|
|
2797
|
-
*
|
|
2798
|
-
* @type {number}
|
|
2799
|
-
* @memberOf CrudFieldComponent
|
|
2800
|
-
*/
|
|
2801
|
-
rows?: number;
|
|
2802
2796
|
/**
|
|
2803
2797
|
* @description Alignment of the field content.
|
|
2804
2798
|
* @summary Controls the horizontal alignment of the field content.
|
|
@@ -2852,7 +2846,7 @@ declare class CrudFieldComponent extends NgxCrudFormField implements OnInit, OnD
|
|
|
2852
2846
|
* @type {CrudFieldOption[]}
|
|
2853
2847
|
* @memberOf CrudFieldComponent
|
|
2854
2848
|
*/
|
|
2855
|
-
options: CrudFieldOption[];
|
|
2849
|
+
options: FunctionLike | CrudFieldOption[] | KeyValue[];
|
|
2856
2850
|
/**
|
|
2857
2851
|
* @description Mode of the field.
|
|
2858
2852
|
* @summary Specifies the visual mode of the field, such as 'ios' or 'md'.
|
|
@@ -2979,56 +2973,6 @@ declare class CrudFieldComponent extends NgxCrudFormField implements OnInit, OnD
|
|
|
2979
2973
|
* @memberOf CrudFieldComponent
|
|
2980
2974
|
*/
|
|
2981
2975
|
translatable: StringOrBoolean;
|
|
2982
|
-
/**
|
|
2983
|
-
* @description Index of the currently active form group in a form array.
|
|
2984
|
-
* @summary When working with multiple form groups (form arrays), this indicates
|
|
2985
|
-
* which form group is currently active or being edited. This is used to manage
|
|
2986
|
-
* focus and data binding in multi-entry scenarios.
|
|
2987
|
-
*
|
|
2988
|
-
* @type {number}
|
|
2989
|
-
* @default 0
|
|
2990
|
-
* @memberOf CrudFieldComponent
|
|
2991
|
-
*/
|
|
2992
|
-
activeFormGroup: number;
|
|
2993
|
-
/**
|
|
2994
|
-
* @description FormArray containing multiple form groups for this field.
|
|
2995
|
-
* @summary When this field is part of a multi-entry structure, this FormArray
|
|
2996
|
-
* contains all the form groups. This enables management of multiple instances
|
|
2997
|
-
* of the same field structure within a single form.
|
|
2998
|
-
*
|
|
2999
|
-
* @type {FormArray}
|
|
3000
|
-
* @memberOf CrudFieldComponent
|
|
3001
|
-
*/
|
|
3002
|
-
formGroupArray: FormArray;
|
|
3003
|
-
/**
|
|
3004
|
-
* @description Primary key field name for uniqueness validation.
|
|
3005
|
-
* @summary Specifies the field name that serves as the primary key for uniqueness
|
|
3006
|
-
* validation within form arrays. This is used to prevent duplicate entries
|
|
3007
|
-
* and ensure data integrity in multi-entry forms.
|
|
3008
|
-
*
|
|
3009
|
-
* @type {string}
|
|
3010
|
-
* @memberOf CrudFieldComponent
|
|
3011
|
-
*/
|
|
3012
|
-
pk: string;
|
|
3013
|
-
/**
|
|
3014
|
-
* @description Gets the currently active form group based on context.
|
|
3015
|
-
* @summary Returns the appropriate FormGroup based on whether this field supports
|
|
3016
|
-
* multiple values. For single-value fields, returns the main form group.
|
|
3017
|
-
* For multi-value fields, returns the form group at the active index from the parent FormArray.
|
|
3018
|
-
*
|
|
3019
|
-
* @returns {FormGroup} The currently active FormGroup for this field
|
|
3020
|
-
* @memberOf CrudFieldComponent
|
|
3021
|
-
*/
|
|
3022
|
-
get getActiveFormGroup(): FormGroup;
|
|
3023
|
-
/**
|
|
3024
|
-
* Returns a list of options for select or radio inputs, with their `text` property
|
|
3025
|
-
* localized if it does not already include the word 'options'. The localization key
|
|
3026
|
-
* is generated from the component's label, replacing 'label' with 'options'.
|
|
3027
|
-
*
|
|
3028
|
-
* @returns {CrudFieldOption[]} The array of parsed and localized options.
|
|
3029
|
-
* @memberOf CrudFieldComponent
|
|
3030
|
-
*/
|
|
3031
|
-
get parsedOptions(): CrudFieldOption[];
|
|
3032
2976
|
/**
|
|
3033
2977
|
* @description Component initialization lifecycle method.
|
|
3034
2978
|
* @summary Initializes the field component based on the operation type and field configuration.
|
|
@@ -3039,7 +2983,16 @@ declare class CrudFieldComponent extends NgxCrudFormField implements OnInit, OnD
|
|
|
3039
2983
|
* @returns {void}
|
|
3040
2984
|
* @memberOf CrudFieldComponent
|
|
3041
2985
|
*/
|
|
3042
|
-
ngOnInit(): void
|
|
2986
|
+
ngOnInit(): Promise<void>;
|
|
2987
|
+
/**
|
|
2988
|
+
* Returns a list of options for select or radio inputs, with their `text` property
|
|
2989
|
+
* localized if it does not already include the word 'options'. The localization key
|
|
2990
|
+
* is generated from the component's label, replacing 'label' with 'options'.
|
|
2991
|
+
*
|
|
2992
|
+
* @returns {CrudFieldOption[]} The array of parsed and localized options.
|
|
2993
|
+
* @memberOf CrudFieldComponent
|
|
2994
|
+
*/
|
|
2995
|
+
getOptions(): Promise<CrudFieldOption[]>;
|
|
3043
2996
|
/**
|
|
3044
2997
|
* @description Component after view initialization lifecycle method.
|
|
3045
2998
|
* @summary Calls the parent afterViewInit method for READ and DELETE operations.
|
|
@@ -3060,6 +3013,8 @@ declare class CrudFieldComponent extends NgxCrudFormField implements OnInit, OnD
|
|
|
3060
3013
|
* @memberOf CrudFieldComponent
|
|
3061
3014
|
*/
|
|
3062
3015
|
ngOnDestroy(): void;
|
|
3016
|
+
toggleOptionSelection(val: string, event: CheckboxCustomEvent): void;
|
|
3017
|
+
isOptionChecked(value: string): boolean;
|
|
3063
3018
|
/**
|
|
3064
3019
|
* @description Handles fieldset group creation events from parent fieldsets.
|
|
3065
3020
|
* @summary Processes events triggered when a new group needs to be added to a fieldset.
|
|
@@ -3095,76 +3050,93 @@ declare class CrudFieldComponent extends NgxCrudFormField implements OnInit, OnD
|
|
|
3095
3050
|
*/
|
|
3096
3051
|
handleFieldsetRemoveGroupEvent(event: CustomEvent): void;
|
|
3097
3052
|
static ɵfac: i0.ɵɵFactoryDeclaration<CrudFieldComponent, never>;
|
|
3098
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CrudFieldComponent, "ngx-decaf-crud-field", never, { "operation": { "alias": "operation"; "required": true; }; "name": { "alias": "name"; "required": true; }; "className": { "alias": "className"; "required": false; }; "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; }; "
|
|
3053
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CrudFieldComponent, "ngx-decaf-crud-field", never, { "operation": { "alias": "operation"; "required": true; }; "name": { "alias": "name"; "required": true; }; "className": { "alias": "className"; "required": false; }; "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; }; "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; }; }, {}, never, never, true, never>;
|
|
3099
3054
|
}
|
|
3100
3055
|
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
icon?: string;
|
|
3110
|
-
iconSlot?: 'start' | 'end';
|
|
3111
|
-
text?: string;
|
|
3112
|
-
};
|
|
3113
|
-
};
|
|
3114
|
-
}
|
|
3056
|
+
/**
|
|
3057
|
+
* @module module:lib/engine/NgxParentComponentDirective
|
|
3058
|
+
* @description Directive base for parent container components used by the rendering system.
|
|
3059
|
+
* @summary Provides NgxParentComponentDirective which offers inputs for children metadata,
|
|
3060
|
+
* column/row configuration and parent component wiring used by layout and container components.
|
|
3061
|
+
*
|
|
3062
|
+
* @link {@link NgxParentComponentDirective}
|
|
3063
|
+
*/
|
|
3115
3064
|
|
|
3116
3065
|
/**
|
|
3117
|
-
* @component
|
|
3118
|
-
* @
|
|
3119
|
-
*
|
|
3120
|
-
*
|
|
3121
|
-
*
|
|
3122
|
-
* rendererId="rendererId"
|
|
3123
|
-
* submitEvent="submitEvent"
|
|
3124
|
-
* target="_self"
|
|
3125
|
-
* method="event">
|
|
3126
|
-
* </ngx-decaf-crud-form>
|
|
3066
|
+
* @description Layout component for creating responsive grid layouts in Angular applications.
|
|
3067
|
+
* @summary This component provides a flexible grid system that can be configured with dynamic
|
|
3068
|
+
* rows and columns. It supports responsive breakpoints and can render child components within
|
|
3069
|
+
* the grid structure. The component extends NgxDecafComponentDirective to inherit common functionality
|
|
3070
|
+
* and integrates with the model and component renderer systems.
|
|
3127
3071
|
*
|
|
3128
|
-
* @
|
|
3129
|
-
* @
|
|
3130
|
-
* @
|
|
3131
|
-
* @
|
|
3132
|
-
* @param {SubmitEvent} submitEvent - The submit event
|
|
3133
|
-
* @param {string} target - The target
|
|
3134
|
-
* @param {string} method - The method
|
|
3072
|
+
* @class NgxParentComponentDirective
|
|
3073
|
+
* @extends {NgxParentComponentDirective}
|
|
3074
|
+
* @implements {OnInit}
|
|
3075
|
+
* @memberOf NgxParentComponentDirective
|
|
3135
3076
|
*/
|
|
3136
|
-
declare class
|
|
3077
|
+
declare class NgxParentComponentDirective extends NgxDecafComponentDirective implements OnInit {
|
|
3137
3078
|
/**
|
|
3138
|
-
* @description
|
|
3139
|
-
* @summary
|
|
3140
|
-
*
|
|
3079
|
+
* @description The display name or title of the fieldset section.
|
|
3080
|
+
* @summary Sets the legend or header text that appears in the accordion header. This text
|
|
3081
|
+
* provides a clear label for the collapsible section, helping users understand what content
|
|
3082
|
+
* is contained within. The name is displayed prominently and serves as the clickable area
|
|
3083
|
+
* for expanding/collapsing the fieldset.
|
|
3141
3084
|
*
|
|
3142
|
-
* @type {
|
|
3143
|
-
* @
|
|
3085
|
+
* @type {string}
|
|
3086
|
+
* @default 'Child'
|
|
3087
|
+
* @memberOf FieldsetComponent
|
|
3144
3088
|
*/
|
|
3145
|
-
|
|
3089
|
+
parentComponent: FormParent;
|
|
3146
3090
|
/**
|
|
3147
|
-
* @description
|
|
3148
|
-
* @summary
|
|
3149
|
-
*
|
|
3150
|
-
*
|
|
3151
|
-
*
|
|
3091
|
+
* @description Array of UI model metadata for all form fields.
|
|
3092
|
+
* @summary Contains the complete collection of UI model metadata that defines
|
|
3093
|
+
* the structure, validation, and presentation of form fields across all pages.
|
|
3094
|
+
* Each metadata object contains information about field type, validation rules,
|
|
3095
|
+
* page assignment, and display properties.
|
|
3152
3096
|
*
|
|
3153
|
-
* @type {
|
|
3154
|
-
* @memberOf
|
|
3097
|
+
* @type {UIModelMetadata[]}
|
|
3098
|
+
* @memberOf NgxParentComponentDirective
|
|
3155
3099
|
*/
|
|
3156
|
-
|
|
3100
|
+
children: UIModelMetadata[] | KeyValue[];
|
|
3157
3101
|
/**
|
|
3158
|
-
* @description
|
|
3159
|
-
* @summary
|
|
3160
|
-
*
|
|
3161
|
-
*
|
|
3102
|
+
* @description Number of columns or array of column definitions for the grid layout.
|
|
3103
|
+
* @summary Defines the column structure of the grid. When a number is provided, it creates
|
|
3104
|
+
* that many equal-width columns. When an array is provided, each element can define specific
|
|
3105
|
+
* column properties or sizing. This allows for flexible grid layouts that can adapt to
|
|
3106
|
+
* different content requirements.
|
|
3162
3107
|
*
|
|
3163
|
-
* @type {
|
|
3164
|
-
* @default
|
|
3108
|
+
* @type {(number | string[])}
|
|
3109
|
+
* @default 1
|
|
3110
|
+
* @memberOf NgxParentComponentDirective
|
|
3111
|
+
*/
|
|
3112
|
+
cols: number | string[];
|
|
3113
|
+
/**
|
|
3114
|
+
* @description Number of rows or array of row definitions for the grid layout.
|
|
3115
|
+
* @summary Defines the row structure of the grid. When a number is provided, it creates
|
|
3116
|
+
* that many equal-height rows. When an array is provided, each element can define specific
|
|
3117
|
+
* row properties or sizing. This provides control over vertical spacing and content organization.
|
|
3118
|
+
*
|
|
3119
|
+
* @type {(number | string[])}
|
|
3120
|
+
* @default 1
|
|
3121
|
+
* @memberOf NgxParentComponentDirective
|
|
3122
|
+
*/
|
|
3123
|
+
rows: number | KeyValue[] | string[];
|
|
3124
|
+
ngOnInit(model?: Model | string): Promise<void>;
|
|
3125
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxParentComponentDirective, never>;
|
|
3126
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxParentComponentDirective, never, never, { "parentComponent": { "alias": "parentComponent"; "required": false; }; "children": { "alias": "children"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; }, {}, never, never, true, never>;
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
declare abstract class NgxFormDirective extends NgxParentComponentDirective implements OnInit, IFormElement, OnDestroy, IRenderedModel {
|
|
3130
|
+
crudFieldComponent: string;
|
|
3131
|
+
/**
|
|
3132
|
+
* @description Reactive form group associated with this fieldset.
|
|
3133
|
+
* @summary The FormGroup instance that contains all form controls within this fieldset.
|
|
3134
|
+
* Used for form validation, value management, and integration with Angular's reactive forms.
|
|
3135
|
+
*
|
|
3136
|
+
* @type {FormGroup}
|
|
3165
3137
|
* @memberOf CrudFormComponent
|
|
3166
3138
|
*/
|
|
3167
|
-
|
|
3139
|
+
parentFormId: string;
|
|
3168
3140
|
/**
|
|
3169
3141
|
* @description Reference to the reactive form DOM element.
|
|
3170
3142
|
* @summary ViewChild reference that provides direct access to the form's DOM element.
|
|
@@ -3175,6 +3147,28 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3175
3147
|
* @memberOf CrudFormComponent
|
|
3176
3148
|
*/
|
|
3177
3149
|
component: ElementRef;
|
|
3150
|
+
/**
|
|
3151
|
+
* @description Angular Location service.
|
|
3152
|
+
* @summary Injected service that provides access to the browser's URL and history.
|
|
3153
|
+
* This service is used for interacting with the browser's history API, allowing
|
|
3154
|
+
* for back navigation and URL manipulation outside of Angular's router.
|
|
3155
|
+
*
|
|
3156
|
+
* @private
|
|
3157
|
+
* @type {Location}
|
|
3158
|
+
* @memberOf CrudFormComponent
|
|
3159
|
+
*/
|
|
3160
|
+
private location;
|
|
3161
|
+
/**
|
|
3162
|
+
* @description Field update trigger mode for form validation.
|
|
3163
|
+
* @summary Determines when form field validation should be triggered. Options include
|
|
3164
|
+
* 'change', 'blur', or 'submit'. This affects the user experience by controlling
|
|
3165
|
+
* when validation feedback is shown to the user during form interaction.
|
|
3166
|
+
*
|
|
3167
|
+
* @type {FieldUpdateMode}
|
|
3168
|
+
* @default 'change'
|
|
3169
|
+
* @memberOf CrudFormComponent
|
|
3170
|
+
*/
|
|
3171
|
+
updateOn: FieldUpdateMode;
|
|
3178
3172
|
/**
|
|
3179
3173
|
* @description Form submission target specification.
|
|
3180
3174
|
* @summary Specifies where to display the response after form submission, similar
|
|
@@ -3203,10 +3197,10 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3203
3197
|
* validation, and behavior. These options are merged with default settings
|
|
3204
3198
|
* during component initialization to customize the form's functionality.
|
|
3205
3199
|
*
|
|
3206
|
-
* @type {
|
|
3200
|
+
* @type {ICrudFormOptions}
|
|
3207
3201
|
* @memberOf CrudFormComponent
|
|
3208
3202
|
*/
|
|
3209
|
-
options:
|
|
3203
|
+
options: ICrudFormOptions;
|
|
3210
3204
|
/**
|
|
3211
3205
|
* @description Optional action identifier for form submission context.
|
|
3212
3206
|
* @summary Specifies a custom action name that will be included in the submit event.
|
|
@@ -3247,19 +3241,11 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3247
3241
|
* @type {FormGroup | undefined}
|
|
3248
3242
|
* @memberOf CrudFormComponent
|
|
3249
3243
|
*/
|
|
3250
|
-
formGroup:
|
|
3251
|
-
/**
|
|
3252
|
-
* @description Path to the parent FormGroup, if nested.
|
|
3253
|
-
* @summary Full dot-delimited path of the parent FormGroup. Set only when is part of a nested structure.
|
|
3254
|
-
*
|
|
3255
|
-
* @type {string}
|
|
3256
|
-
* @memberOf CrudFormComponent
|
|
3257
|
-
*/
|
|
3258
|
-
childOf?: string;
|
|
3244
|
+
formGroup: FormParent | undefined;
|
|
3259
3245
|
/**
|
|
3260
3246
|
* @description Unique identifier for the form renderer.
|
|
3261
3247
|
* @summary A unique string identifier used to register and manage this form
|
|
3262
|
-
* instance within the
|
|
3248
|
+
* instance within the NgxDecafFormService. This ID is also used as the HTML id
|
|
3263
3249
|
* attribute for the form element, enabling DOM queries and form management.
|
|
3264
3250
|
*
|
|
3265
3251
|
* @type {string}
|
|
@@ -3267,14 +3253,15 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3267
3253
|
*/
|
|
3268
3254
|
rendererId: string;
|
|
3269
3255
|
/**
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3256
|
+
* @description Event emitter for form submission events.
|
|
3257
|
+
* @summary Emits ICrudFormEvent objects when the form is submitted, providing
|
|
3258
|
+
* form data, component information, and any associated handlers to parent
|
|
3259
|
+
* components. This enables decoupled handling of form submission logic.
|
|
3260
|
+
*
|
|
3261
|
+
* @type {EventEmitter<ICrudFormEvent>}
|
|
3262
|
+
* @memberOf CrudFormComponent
|
|
3263
|
+
*/
|
|
3264
|
+
submitEvent: EventEmitter<ICrudFormEvent>;
|
|
3278
3265
|
/**
|
|
3279
3266
|
* @description Unique identifier for the current record instance.
|
|
3280
3267
|
* @summary This property holds a unique string value that identifies the specific record being managed by the form.
|
|
@@ -3288,53 +3275,59 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3288
3275
|
*/
|
|
3289
3276
|
allowClear: boolean;
|
|
3290
3277
|
/**
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3278
|
+
* @description Reference to CRUD operation constants for template usage.
|
|
3279
|
+
* @summary Exposes the OperationKeys enum to the component template, enabling
|
|
3280
|
+
* conditional rendering and behavior based on operation types. This protected
|
|
3281
|
+
* readonly property ensures that template logic can access operation constants
|
|
3282
|
+
* while maintaining encapsulation and preventing accidental modification.
|
|
3283
|
+
*
|
|
3284
|
+
* @protected
|
|
3285
|
+
* @readonly
|
|
3286
|
+
* @memberOf CrudFormComponent
|
|
3287
|
+
*/
|
|
3301
3288
|
protected readonly OperationKeys: typeof OperationKeys;
|
|
3289
|
+
protected activeFormGroupIndex: number;
|
|
3290
|
+
get activeFormGroup(): FormParent;
|
|
3291
|
+
/**
|
|
3292
|
+
* @description Component initialization lifecycle method.
|
|
3293
|
+
* @summary Initializes the component by setting up the logger, configuring form state
|
|
3294
|
+
* based on the operation type, and merging configuration options. For READ and DELETE
|
|
3295
|
+
* operations, the formGroup is set to undefined since these operations don't require
|
|
3296
|
+
* form input. Configuration options are merged with default settings.
|
|
3297
|
+
*
|
|
3298
|
+
* @returns {Promise<void>}
|
|
3299
|
+
* @memberOf CrudFormComponent
|
|
3300
|
+
*/
|
|
3301
|
+
ngOnInit(model?: Model | string): Promise<void>;
|
|
3302
3302
|
/**
|
|
3303
|
-
* @description
|
|
3304
|
-
* @summary
|
|
3305
|
-
*
|
|
3306
|
-
*
|
|
3307
|
-
*
|
|
3308
|
-
* @type {EventEmitter<CrudFormEvent>}
|
|
3309
|
-
* @memberOf CrudFormComponent
|
|
3310
|
-
*/
|
|
3311
|
-
submitEvent: EventEmitter<CrudFormEvent>;
|
|
3312
|
-
/**
|
|
3313
|
-
* @description Logger instance for the component.
|
|
3314
|
-
* @summary Provides logging capabilities for the component, allowing for consistent
|
|
3315
|
-
* and structured logging of information, warnings, and errors. This logger is initialized
|
|
3316
|
-
* in the ngOnInit method using the getLogger function from the ForAngularCommonModule.
|
|
3317
|
-
*
|
|
3318
|
-
* The logger is used throughout the component to record important events, debug information,
|
|
3319
|
-
* and potential issues. It helps in monitoring the component's behavior, tracking the flow
|
|
3320
|
-
* of operations, and facilitating easier debugging and maintenance.
|
|
3303
|
+
* @description Component cleanup lifecycle method.
|
|
3304
|
+
* @summary Performs cleanup operations when the component is destroyed.
|
|
3305
|
+
* Unregisters the FormGroup from the NgxDecafFormService to prevent memory leaks
|
|
3306
|
+
* and ensure proper resource cleanup.
|
|
3321
3307
|
*
|
|
3322
|
-
* @
|
|
3323
|
-
* @private
|
|
3308
|
+
* @returns {void}
|
|
3324
3309
|
* @memberOf CrudFormComponent
|
|
3325
3310
|
*/
|
|
3326
|
-
|
|
3311
|
+
ngOnDestroy(): void;
|
|
3312
|
+
getFormArrayIndex(index: number): FormParent | undefined;
|
|
3327
3313
|
/**
|
|
3328
|
-
* @description
|
|
3329
|
-
* @summary
|
|
3330
|
-
*
|
|
3331
|
-
*
|
|
3314
|
+
* @description Handles form reset or navigation back functionality.
|
|
3315
|
+
* @summary Provides different reset behavior based on the current operation.
|
|
3316
|
+
* For CREATE and UPDATE operations, resets the form to its initial state.
|
|
3317
|
+
* For READ and DELETE operations, navigates back in the browser history
|
|
3318
|
+
* since these operations don't have modifiable form data to reset.
|
|
3332
3319
|
*
|
|
3333
|
-
* @
|
|
3334
|
-
* @type {Location}
|
|
3320
|
+
* @returns {void}
|
|
3335
3321
|
* @memberOf CrudFormComponent
|
|
3336
3322
|
*/
|
|
3337
|
-
|
|
3323
|
+
handleReset(): void;
|
|
3324
|
+
handleSubmit(event?: SubmitEvent, eventName?: string, componentName?: string): Promise<boolean | void>;
|
|
3325
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxFormDirective, never>;
|
|
3326
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxFormDirective, never, never, { "parentFormId": { "alias": "parentFormId"; "required": false; }; "updateOn": { "alias": "updateOn"; "required": false; }; "target": { "alias": "target"; "required": false; }; "method": { "alias": "method"; "required": false; }; "options": { "alias": "options"; "required": false; }; "action": { "alias": "action"; "required": false; }; "operation": { "alias": "operation"; "required": true; }; "handlers": { "alias": "handlers"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "rendererId": { "alias": "rendererId"; "required": false; }; "allowClear": { "alias": "allowClear"; "required": false; }; }, { "submitEvent": "submitEvent"; }, never, never, true, never>;
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
declare class CrudFormComponent extends NgxFormDirective {
|
|
3330
|
+
constructor();
|
|
3338
3331
|
/**
|
|
3339
3332
|
* @description Component initialization lifecycle method.
|
|
3340
3333
|
* @summary Initializes the component by setting up the logger, configuring form state
|
|
@@ -3346,20 +3339,10 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3346
3339
|
* @memberOf CrudFormComponent
|
|
3347
3340
|
*/
|
|
3348
3341
|
ngOnInit(): Promise<void>;
|
|
3349
|
-
/**
|
|
3350
|
-
* @description Component cleanup lifecycle method.
|
|
3351
|
-
* @summary Performs cleanup operations when the component is destroyed.
|
|
3352
|
-
* Unregisters the FormGroup from the NgxFormService to prevent memory leaks
|
|
3353
|
-
* and ensure proper resource cleanup.
|
|
3354
|
-
*
|
|
3355
|
-
* @returns {void}
|
|
3356
|
-
* @memberOf CrudFormComponent
|
|
3357
|
-
*/
|
|
3358
|
-
ngOnDestroy(): void;
|
|
3359
3342
|
/**
|
|
3360
3343
|
* @description Handles form submission with validation and event emission.
|
|
3361
3344
|
* @summary Processes form submission by first preventing default browser behavior,
|
|
3362
|
-
* then validating all form fields using
|
|
3345
|
+
* then validating all form fields using NgxDecafFormService. If validation passes,
|
|
3363
3346
|
* extracts form data and emits a submitEvent with the data, component information,
|
|
3364
3347
|
* and any associated handlers. Returns false if validation fails.
|
|
3365
3348
|
*
|
|
@@ -3368,17 +3351,6 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3368
3351
|
* @memberOf CrudFormComponent
|
|
3369
3352
|
*/
|
|
3370
3353
|
submit(event: SubmitEvent): Promise<boolean | void>;
|
|
3371
|
-
/**
|
|
3372
|
-
* @description Handles form reset or navigation back functionality.
|
|
3373
|
-
* @summary Provides different reset behavior based on the current operation.
|
|
3374
|
-
* For CREATE and UPDATE operations, resets the form to its initial state.
|
|
3375
|
-
* For READ and DELETE operations, navigates back in the browser history
|
|
3376
|
-
* since these operations don't have modifiable form data to reset.
|
|
3377
|
-
*
|
|
3378
|
-
* @returns {void}
|
|
3379
|
-
* @memberOf CrudFormComponent
|
|
3380
|
-
*/
|
|
3381
|
-
handleReset(): void;
|
|
3382
3354
|
/**
|
|
3383
3355
|
* @description Handles delete operations by emitting delete events.
|
|
3384
3356
|
* @summary Processes delete requests by emitting a submit event with the
|
|
@@ -3391,9 +3363,19 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3391
3363
|
*/
|
|
3392
3364
|
handleDelete(): void;
|
|
3393
3365
|
static ɵfac: i0.ɵɵFactoryDeclaration<CrudFormComponent, never>;
|
|
3394
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CrudFormComponent, "ngx-decaf-crud-form", never, {
|
|
3366
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CrudFormComponent, "ngx-decaf-crud-form", never, {}, {}, never, ["*", "*"], true, never>;
|
|
3395
3367
|
}
|
|
3396
3368
|
|
|
3369
|
+
/**
|
|
3370
|
+
* @module module:lib/components/empty-state/empty-state.component
|
|
3371
|
+
* @description Empty state component module.
|
|
3372
|
+
* @summary Exposes `EmptyStateComponent` which displays a standardized empty
|
|
3373
|
+
* state UI with optional icon, title, subtitle and action button. Supports
|
|
3374
|
+
* localization and sanitized HTML for dynamic subtitles.
|
|
3375
|
+
*
|
|
3376
|
+
* @link {@link EmptyStateComponent}
|
|
3377
|
+
*/
|
|
3378
|
+
|
|
3397
3379
|
/**
|
|
3398
3380
|
* @description Component for displaying empty state messages with optional actions.
|
|
3399
3381
|
* @summary This component provides a standardized way to display empty state messages
|
|
@@ -3423,13 +3405,13 @@ declare class CrudFormComponent implements OnInit, IFormElement, OnDestroy, Rend
|
|
|
3423
3405
|
* +ngOnInit()
|
|
3424
3406
|
* +handleClick()
|
|
3425
3407
|
* }
|
|
3426
|
-
* EmptyStateComponent --|>
|
|
3408
|
+
* EmptyStateComponent --|> NgxBaseComponentDirective
|
|
3427
3409
|
* EmptyStateComponent --|> OnInit
|
|
3428
3410
|
*
|
|
3429
|
-
* @extends {
|
|
3411
|
+
* @extends {NgxBaseComponentDirective}
|
|
3430
3412
|
* @implements {OnInit}
|
|
3431
3413
|
*/
|
|
3432
|
-
declare class EmptyStateComponent extends
|
|
3414
|
+
declare class EmptyStateComponent extends NgxDecafComponentDirective implements OnInit {
|
|
3433
3415
|
/**
|
|
3434
3416
|
* @description The main title displayed in the empty state.
|
|
3435
3417
|
* @summary Specifies the primary message to show in the empty state component.
|
|
@@ -3572,22 +3554,11 @@ declare class EmptyStateComponent extends NgxBaseComponent implements OnInit {
|
|
|
3572
3554
|
* this property can hold the search term that was used. This can be displayed
|
|
3573
3555
|
* in the empty state message to provide context to the user.
|
|
3574
3556
|
*
|
|
3575
|
-
* @type {string}
|
|
3576
|
-
* @memberOf EmptyStateComponent
|
|
3577
|
-
*/
|
|
3578
|
-
searchValue: string;
|
|
3579
|
-
/**
|
|
3580
|
-
* @description Service for handling navigation operations.
|
|
3581
|
-
* @summary Injected service that provides methods for navigating between routes.
|
|
3582
|
-
* This service is used when the buttonLink is a string URL to navigate to that location.
|
|
3583
|
-
*
|
|
3584
|
-
* @private
|
|
3585
|
-
* @type {Router}
|
|
3557
|
+
* @type {string}
|
|
3586
3558
|
* @memberOf EmptyStateComponent
|
|
3587
3559
|
*/
|
|
3588
|
-
|
|
3560
|
+
searchValue: string;
|
|
3589
3561
|
private sanitizer;
|
|
3590
|
-
private translate;
|
|
3591
3562
|
searchSubtitle: SafeHtml;
|
|
3592
3563
|
/**
|
|
3593
3564
|
* @description Creates an instance of EmptyStateComponent.
|
|
@@ -3689,6 +3660,16 @@ declare class EmptyStateComponent extends NgxBaseComponent implements OnInit {
|
|
|
3689
3660
|
static ɵcmp: i0.ɵɵComponentDeclaration<EmptyStateComponent, "ngx-decaf-empty-state", never, { "title": { "alias": "title"; "required": false; }; "titleColor": { "alias": "titleColor"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "subtitleColor": { "alias": "subtitleColor"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "buttonLink": { "alias": "buttonLink"; "required": false; }; "buttonText": { "alias": "buttonText"; "required": false; }; "buttonFill": { "alias": "buttonFill"; "required": false; }; "buttonColor": { "alias": "buttonColor"; "required": false; }; "buttonSize": { "alias": "buttonSize"; "required": false; }; "searchValue": { "alias": "searchValue"; "required": false; }; }, {}, never, never, true, never>;
|
|
3690
3661
|
}
|
|
3691
3662
|
|
|
3663
|
+
/**
|
|
3664
|
+
* @module module:lib/components/fieldset/fieldset.component
|
|
3665
|
+
* @description Fieldset component module.
|
|
3666
|
+
* @summary Provides `FieldsetComponent` — a dynamic, collapsible fieldset container
|
|
3667
|
+
* for grouping form controls with validation, reorder and add/remove capabilities.
|
|
3668
|
+
* Ideal for complex forms that require nested groupings and dynamic items.
|
|
3669
|
+
*
|
|
3670
|
+
* @link {@link FieldsetComponent}
|
|
3671
|
+
*/
|
|
3672
|
+
|
|
3692
3673
|
/**
|
|
3693
3674
|
* @description Dynamic fieldset component with collapsible accordion functionality.
|
|
3694
3675
|
* @summary This component provides a sophisticated fieldset container that automatically
|
|
@@ -3739,7 +3720,7 @@ declare class EmptyStateComponent extends NgxBaseComponent implements OnInit {
|
|
|
3739
3720
|
*
|
|
3740
3721
|
* @memberOf FieldsetComponent
|
|
3741
3722
|
*/
|
|
3742
|
-
declare class FieldsetComponent extends
|
|
3723
|
+
declare class FieldsetComponent extends NgxFormDirective implements OnInit, AfterViewInit {
|
|
3743
3724
|
/**
|
|
3744
3725
|
* @description Reference to the ion-accordion-group component for programmatic control.
|
|
3745
3726
|
* @summary ViewChild reference that provides direct access to the Ionic accordion group component.
|
|
@@ -3762,18 +3743,7 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
3762
3743
|
* @default 'Child'
|
|
3763
3744
|
* @memberOf FieldsetComponent
|
|
3764
3745
|
*/
|
|
3765
|
-
|
|
3766
|
-
/**
|
|
3767
|
-
* @description The parent component identifier for hierarchical fieldset relationships.
|
|
3768
|
-
* @summary Specifies the parent component name that this fieldset belongs to in a hierarchical
|
|
3769
|
-
* form structure. This property is used for event bubbling and establishing parent-child
|
|
3770
|
-
* relationships between fieldsets in complex forms with nested structures.
|
|
3771
|
-
*
|
|
3772
|
-
* @type {string}
|
|
3773
|
-
* @default 'Child'
|
|
3774
|
-
* @memberOf FieldsetComponent
|
|
3775
|
-
*/
|
|
3776
|
-
childOf: string;
|
|
3746
|
+
formControl: FormControl;
|
|
3777
3747
|
/**
|
|
3778
3748
|
* @description The parent component identifier for hierarchical fieldset relationships.
|
|
3779
3749
|
* @summary Specifies the parent component name that this fieldset belongs to in a hierarchical
|
|
@@ -3794,17 +3764,6 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
3794
3764
|
* @memberOf FieldsetComponent
|
|
3795
3765
|
*/
|
|
3796
3766
|
page: number;
|
|
3797
|
-
/**
|
|
3798
|
-
* @description The parent component identifier for hierarchical fieldset relationships.
|
|
3799
|
-
* @summary Specifies the parent component name that this fieldset belongs to in a hierarchical
|
|
3800
|
-
* form structure. This property is used for event bubbling and establishing parent-child
|
|
3801
|
-
* relationships between fieldsets in complex forms with nested structures.
|
|
3802
|
-
*
|
|
3803
|
-
* @type {string}
|
|
3804
|
-
* @default 'Child'
|
|
3805
|
-
* @memberOf FieldsetComponent
|
|
3806
|
-
*/
|
|
3807
|
-
uid: string;
|
|
3808
3767
|
/**
|
|
3809
3768
|
* @description Custom type definitions for specialized fieldset behavior.
|
|
3810
3769
|
* @summary Defines custom data types or validation rules that should be applied to this fieldset.
|
|
@@ -3815,38 +3774,6 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
3815
3774
|
* @memberOf FieldsetComponent
|
|
3816
3775
|
*/
|
|
3817
3776
|
customTypes: string | string[];
|
|
3818
|
-
/**
|
|
3819
|
-
* @description The current CRUD operation context.
|
|
3820
|
-
* @summary Determines the component's initial behavior and state based on the current operation.
|
|
3821
|
-
* This input is crucial for auto-state management: READ and DELETE operations automatically
|
|
3822
|
-
* open the fieldset to show content, while CREATE and UPDATE operations keep it closed
|
|
3823
|
-
* initially. This provides an intuitive user experience aligned with operation semantics.
|
|
3824
|
-
*
|
|
3825
|
-
* @type {OperationKeys}
|
|
3826
|
-
* @default OperationKeys.READ
|
|
3827
|
-
* @memberOf FieldsetComponent
|
|
3828
|
-
*/
|
|
3829
|
-
/**
|
|
3830
|
-
* @description The CRUD operation type for the current fieldset context.
|
|
3831
|
-
* @summary Determines the component's initial behavior and state based on the current operation.
|
|
3832
|
-
* This input is crucial for auto-state management: READ and DELETE operations automatically
|
|
3833
|
-
* open the fieldset to show content, while CREATE and UPDATE operations keep it closed
|
|
3834
|
-
* initially. This provides an intuitive user experience aligned with operation semantics.
|
|
3835
|
-
*
|
|
3836
|
-
* @type {OperationKeys}
|
|
3837
|
-
* @default OperationKeys.READ
|
|
3838
|
-
* @memberOf FieldsetComponent
|
|
3839
|
-
*/
|
|
3840
|
-
operation: OperationKeys;
|
|
3841
|
-
/**
|
|
3842
|
-
* @description Reactive form group associated with this fieldset.
|
|
3843
|
-
* @summary The FormGroup instance that contains all form controls within this fieldset.
|
|
3844
|
-
* Used for form validation, value management, and integration with Angular's reactive forms.
|
|
3845
|
-
*
|
|
3846
|
-
* @type {FormGroup}
|
|
3847
|
-
* @memberOf FieldsetComponent
|
|
3848
|
-
*/
|
|
3849
|
-
formGroup: FormArray;
|
|
3850
3777
|
/**
|
|
3851
3778
|
* @description Primary title text for the fieldset content.
|
|
3852
3779
|
* @summary Display title used for fieldset identification and content organization.
|
|
@@ -3865,18 +3792,6 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
3865
3792
|
* @memberOf FieldsetComponent
|
|
3866
3793
|
*/
|
|
3867
3794
|
description: string;
|
|
3868
|
-
/**
|
|
3869
|
-
* @description Form target attribute for nested form submissions.
|
|
3870
|
-
* @summary Specifies where to display the response after submitting forms contained within
|
|
3871
|
-
* the fieldset. This attribute mirrors the HTML form target behavior, allowing control over
|
|
3872
|
-
* whether form submissions open in the same window, new window, or specific frame. Useful
|
|
3873
|
-
* for complex form workflows and multi-step processes.
|
|
3874
|
-
*
|
|
3875
|
-
* @type {HTMLFormTarget}
|
|
3876
|
-
* @default '_self'
|
|
3877
|
-
* @memberOf FieldsetComponent
|
|
3878
|
-
*/
|
|
3879
|
-
target: HTMLFormTarget;
|
|
3880
3795
|
/**
|
|
3881
3796
|
* @description Enables multiple item management within the fieldset.
|
|
3882
3797
|
* @summary Boolean flag that determines if the fieldset supports adding multiple values.
|
|
@@ -3898,15 +3813,15 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
3898
3813
|
*/
|
|
3899
3814
|
value: KeyValue[];
|
|
3900
3815
|
/**
|
|
3901
|
-
* @description
|
|
3902
|
-
* @summary
|
|
3903
|
-
*
|
|
3904
|
-
* and can be invoked for various fieldset operations and user interactions.
|
|
3816
|
+
* @description Controls whether borders are displayed around the fieldset.
|
|
3817
|
+
* @summary Boolean flag that determines if the fieldset should be visually outlined with borders.
|
|
3818
|
+
* When true, borders are shown to visually separate the fieldset from surrounding content.
|
|
3905
3819
|
*
|
|
3906
|
-
* @type {
|
|
3820
|
+
* @type {boolean}
|
|
3821
|
+
* @default true
|
|
3907
3822
|
* @memberOf FieldsetComponent
|
|
3908
3823
|
*/
|
|
3909
|
-
|
|
3824
|
+
borders: boolean;
|
|
3910
3825
|
/**
|
|
3911
3826
|
* @description Array of formatted items for UI display.
|
|
3912
3827
|
* @summary Contains the processed items ready for display in the component template.
|
|
@@ -3973,51 +3888,6 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
3973
3888
|
* @memberOf FieldsetComponent
|
|
3974
3889
|
*/
|
|
3975
3890
|
isUniqueError: string | undefined;
|
|
3976
|
-
/**
|
|
3977
|
-
* @description Reference to CRUD operation constants for template usage.
|
|
3978
|
-
* @summary Exposes the OperationKeys enum to the component template, enabling conditional
|
|
3979
|
-
* rendering and behavior based on operation types. This protected readonly property ensures
|
|
3980
|
-
* that template logic can access operation constants while maintaining encapsulation and
|
|
3981
|
-
* preventing accidental modification of the enum values.
|
|
3982
|
-
*
|
|
3983
|
-
* @type {CrudOperations}
|
|
3984
|
-
* @default OperationKeys.CREATE
|
|
3985
|
-
* @memberOf FieldsetComponent
|
|
3986
|
-
*/
|
|
3987
|
-
protected readonly OperationKeys: CrudOperations;
|
|
3988
|
-
/**
|
|
3989
|
-
* @description Angular change detection service.
|
|
3990
|
-
* @summary Injected service that provides manual control over change detection cycles.
|
|
3991
|
-
* This is essential for ensuring that programmatic DOM changes (like setting accordion
|
|
3992
|
-
* attributes) are properly reflected in the component's state and trigger appropriate
|
|
3993
|
-
* view updates when modifications occur outside the normal Angular change detection flow.
|
|
3994
|
-
*
|
|
3995
|
-
* @private
|
|
3996
|
-
* @type {ChangeDetectorRef}
|
|
3997
|
-
* @memberOf FieldsetComponent
|
|
3998
|
-
*/
|
|
3999
|
-
private changeDetectorRef;
|
|
4000
|
-
/**
|
|
4001
|
-
* @description Angular Renderer2 service for safe DOM manipulation.
|
|
4002
|
-
* @summary Injected service that provides a safe, platform-agnostic way to manipulate DOM elements.
|
|
4003
|
-
* This service ensures proper handling of DOM operations across different platforms and environments,
|
|
4004
|
-
* including server-side rendering and web workers.
|
|
4005
|
-
*
|
|
4006
|
-
* @private
|
|
4007
|
-
* @type {Renderer2}
|
|
4008
|
-
* @memberOf FieldsetComponent
|
|
4009
|
-
*/
|
|
4010
|
-
private renderer;
|
|
4011
|
-
/**
|
|
4012
|
-
* @description Translation service for internationalization.
|
|
4013
|
-
* @summary Injected service that provides translation capabilities for UI text.
|
|
4014
|
-
* Used to translate button labels and validation messages based on the current locale.
|
|
4015
|
-
*
|
|
4016
|
-
* @private
|
|
4017
|
-
* @type {TranslateService}
|
|
4018
|
-
* @memberOf FieldsetComponent
|
|
4019
|
-
*/
|
|
4020
|
-
private translateService;
|
|
4021
3891
|
/**
|
|
4022
3892
|
* @description Localized label text for action buttons.
|
|
4023
3893
|
* @summary Dynamic button label that changes based on the current operation mode.
|
|
@@ -4036,9 +3906,19 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
4036
3906
|
* @memberOf FieldsetComponent
|
|
4037
3907
|
*/
|
|
4038
3908
|
buttonCancelLabel: string;
|
|
3909
|
+
/**
|
|
3910
|
+
* @description Maximum allowed items in the fieldset.
|
|
3911
|
+
* @summary Numeric limit that controls how many items can be added when `multiple` is true.
|
|
3912
|
+
* When set to Infinity there is no limit.
|
|
3913
|
+
*
|
|
3914
|
+
* @type {number}
|
|
3915
|
+
* @default Infinity
|
|
3916
|
+
* @memberOf FieldsetComponent
|
|
3917
|
+
*/
|
|
3918
|
+
max: number | undefined;
|
|
4039
3919
|
/**
|
|
4040
3920
|
* @description Component constructor that initializes the fieldset with icons and component name.
|
|
4041
|
-
* @summary Calls the parent
|
|
3921
|
+
* @summary Calls the parent NgxFormDirective constructor with the component name and
|
|
4042
3922
|
* required Ionic icons (alertCircleOutline for validation errors and createOutline for add actions).
|
|
4043
3923
|
* Sets up the foundational component structure and icon registry.
|
|
4044
3924
|
*
|
|
@@ -4054,7 +3934,7 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
4054
3934
|
* @returns {void}
|
|
4055
3935
|
* @memberOf FieldsetComponent
|
|
4056
3936
|
*/
|
|
4057
|
-
ngOnInit(): void
|
|
3937
|
+
ngOnInit(): Promise<void>;
|
|
4058
3938
|
/**
|
|
4059
3939
|
* @description Initializes the component state after view and child components are rendered.
|
|
4060
3940
|
* @summary This lifecycle hook implements intelligent auto-state management based on the current
|
|
@@ -4118,18 +3998,7 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
4118
3998
|
* ```
|
|
4119
3999
|
*/
|
|
4120
4000
|
handleCreateItem(event?: CustomEvent<IFieldSetValidationEvent>): Promise<void>;
|
|
4121
|
-
|
|
4122
|
-
* @description Handles item update operations with form state management.
|
|
4123
|
-
* @summary Locates an item in the form array for editing and prepares the component
|
|
4124
|
-
* for update mode. Updates the button label to reflect the edit state and stores
|
|
4125
|
-
* the item being updated. Triggers a window event to notify parent components.
|
|
4126
|
-
*
|
|
4127
|
-
* @param {string | number} value - The identifier value of the item to update
|
|
4128
|
-
* @param {number} index - The array index position of the item
|
|
4129
|
-
* @returns {void}
|
|
4130
|
-
* @memberOf FieldsetComponent
|
|
4131
|
-
*/
|
|
4132
|
-
handleUpdateItem(value: string | number, index: number): void;
|
|
4001
|
+
handleUpdateItem(index: number, save?: boolean): void;
|
|
4133
4002
|
/**
|
|
4134
4003
|
* @description Cancels the update mode and resets the UI state.
|
|
4135
4004
|
* @summary Exits the update mode by resetting the button label and clearing the updating item,
|
|
@@ -4151,7 +4020,7 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
4151
4020
|
* @returns {void}
|
|
4152
4021
|
* @memberOf FieldsetComponent
|
|
4153
4022
|
*/
|
|
4154
|
-
handleRemoveItem(
|
|
4023
|
+
handleRemoveItem(index: number): void;
|
|
4155
4024
|
/**
|
|
4156
4025
|
* @description Handles reordering of items within the fieldset list.
|
|
4157
4026
|
* @summary Processes drag-and-drop reorder events from the ion-reorder-group component.
|
|
@@ -4245,9 +4114,19 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
4245
4114
|
*/
|
|
4246
4115
|
private getMapper;
|
|
4247
4116
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldsetComponent, never>;
|
|
4248
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldsetComponent, "ngx-decaf-fieldset", never, { "
|
|
4117
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldsetComponent, "ngx-decaf-fieldset", never, { "formControl": { "alias": "formControl"; "required": false; }; "collapsable": { "alias": "collapsable"; "required": false; }; "page": { "alias": "page"; "required": false; }; "customTypes": { "alias": "customTypes"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "value": { "alias": "value"; "required": false; }; "borders": { "alias": "borders"; "required": false; }; }, {}, never, ["[slot=content]"], true, never>;
|
|
4249
4118
|
}
|
|
4250
4119
|
|
|
4120
|
+
/**
|
|
4121
|
+
* @module module:lib/components/filter/filter.component
|
|
4122
|
+
* @description Filter component module.
|
|
4123
|
+
* @summary Provides `FilterComponent` which builds advanced, multi-step filter
|
|
4124
|
+
* queries (index → condition → value) and emits filter events for data querying.
|
|
4125
|
+
* It supports responsive behavior, suggestions and integration with `SearchbarComponent`.
|
|
4126
|
+
*
|
|
4127
|
+
* @link {@link FilterComponent}
|
|
4128
|
+
*/
|
|
4129
|
+
|
|
4251
4130
|
/**
|
|
4252
4131
|
* @description Advanced filter component for creating dynamic search filters with step-by-step construction.
|
|
4253
4132
|
* @summary This component provides a comprehensive filtering interface that allows users to build
|
|
@@ -4289,7 +4168,7 @@ declare class FieldsetComponent extends NgxBaseComponent implements OnInit, Afte
|
|
|
4289
4168
|
*
|
|
4290
4169
|
* @memberOf ForAngularCommonModule
|
|
4291
4170
|
*/
|
|
4292
|
-
declare class FilterComponent extends
|
|
4171
|
+
declare class FilterComponent extends NgxDecafComponentDirective implements OnInit, OnDestroy {
|
|
4293
4172
|
/**
|
|
4294
4173
|
* @description Reference to the dropdown options container element.
|
|
4295
4174
|
* @summary ViewChild reference used to access and manipulate the dropdown options element
|
|
@@ -4757,42 +4636,30 @@ declare class FilterComponent extends NgxBaseComponent implements OnInit, OnDest
|
|
|
4757
4636
|
static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "ngx-decaf-filter", never, { "indexes": { "alias": "indexes"; "required": false; }; "conditions": { "alias": "conditions"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "disableSort": { "alias": "disableSort"; "required": false; }; }, { "filterEvent": "filterEvent"; "searchEvent": "searchEvent"; }, never, never, true, never>;
|
|
4758
4637
|
}
|
|
4759
4638
|
|
|
4639
|
+
/**
|
|
4640
|
+
* @module module:lib/components/layout/layout.component
|
|
4641
|
+
* @description Layout component module.
|
|
4642
|
+
* @summary Provides `LayoutComponent` which offers a responsive grid layout
|
|
4643
|
+
* for arranging child components using configurable rows, columns and breakpoints.
|
|
4644
|
+
* Useful for building responsive UIs that render model and component renderers.
|
|
4645
|
+
*
|
|
4646
|
+
* @link {@link LayoutComponent}
|
|
4647
|
+
*/
|
|
4648
|
+
|
|
4760
4649
|
/**
|
|
4761
4650
|
* @description Layout component for creating responsive grid layouts in Angular applications.
|
|
4762
4651
|
* @summary This component provides a flexible grid system that can be configured with dynamic
|
|
4763
4652
|
* rows and columns. It supports responsive breakpoints and can render child components within
|
|
4764
|
-
* the grid structure. The component extends
|
|
4653
|
+
* the grid structure. The component extends NgxParentComponentDirective to inherit common functionality
|
|
4765
4654
|
* and integrates with the model and component renderer systems.
|
|
4766
4655
|
*
|
|
4767
4656
|
* @class LayoutComponent
|
|
4768
|
-
* @extends {
|
|
4657
|
+
* @extends {NgxParentComponentDirective}
|
|
4769
4658
|
* @implements {OnInit}
|
|
4770
4659
|
* @memberOf LayoutComponent
|
|
4771
4660
|
*/
|
|
4772
|
-
declare class LayoutComponent extends
|
|
4773
|
-
|
|
4774
|
-
* @description Number of columns or array of column definitions for the grid layout.
|
|
4775
|
-
* @summary Defines the column structure of the grid. When a number is provided, it creates
|
|
4776
|
-
* that many equal-width columns. When an array is provided, each element can define specific
|
|
4777
|
-
* column properties or sizing. This allows for flexible grid layouts that can adapt to
|
|
4778
|
-
* different content requirements.
|
|
4779
|
-
*
|
|
4780
|
-
* @type {(number | string[])}
|
|
4781
|
-
* @default 1
|
|
4782
|
-
* @memberOf LayoutComponent
|
|
4783
|
-
*/
|
|
4784
|
-
cols: number | string[];
|
|
4785
|
-
/**
|
|
4786
|
-
* @description Number of rows or array of row definitions for the grid layout.
|
|
4787
|
-
* @summary Defines the row structure of the grid. When a number is provided, it creates
|
|
4788
|
-
* that many equal-height rows. When an array is provided, each element can define specific
|
|
4789
|
-
* row properties or sizing. This provides control over vertical spacing and content organization.
|
|
4790
|
-
*
|
|
4791
|
-
* @type {(number | string[])}
|
|
4792
|
-
* @default 1
|
|
4793
|
-
* @memberOf LayoutComponent
|
|
4794
|
-
*/
|
|
4795
|
-
rows: number | KeyValue[] | string[];
|
|
4661
|
+
declare class LayoutComponent extends NgxParentComponentDirective implements OnInit {
|
|
4662
|
+
initializeProps: boolean;
|
|
4796
4663
|
/**
|
|
4797
4664
|
* @description Media breakpoint for responsive behavior.
|
|
4798
4665
|
* @summary Determines the responsive breakpoint at which the layout should adapt.
|
|
@@ -4800,27 +4667,28 @@ declare class LayoutComponent extends NgxBaseComponent implements OnInit {
|
|
|
4800
4667
|
* mobile-first or desktop-first responsive design patterns. The breakpoint
|
|
4801
4668
|
* is automatically processed to ensure compatibility with the UI framework.
|
|
4802
4669
|
*
|
|
4803
|
-
* @type {
|
|
4670
|
+
* @type {UIMediaBreakPointsType}
|
|
4804
4671
|
* @default 'medium'
|
|
4805
4672
|
* @memberOf LayoutComponent
|
|
4806
4673
|
*/
|
|
4807
|
-
|
|
4674
|
+
gap: 'small' | 'medium' | 'large' | 'collapse';
|
|
4675
|
+
match: boolean;
|
|
4808
4676
|
/**
|
|
4809
|
-
* @description
|
|
4810
|
-
* @summary
|
|
4811
|
-
*
|
|
4812
|
-
*
|
|
4813
|
-
*
|
|
4677
|
+
* @description Media breakpoint for responsive behavior.
|
|
4678
|
+
* @summary Determines the responsive breakpoint at which the layout should adapt.
|
|
4679
|
+
* This affects how the grid behaves on different screen sizes, allowing for
|
|
4680
|
+
* mobile-first or desktop-first responsive design patterns. The breakpoint
|
|
4681
|
+
* is automatically processed to ensure compatibility with the UI framework.
|
|
4814
4682
|
*
|
|
4815
|
-
* @type {
|
|
4816
|
-
* @default
|
|
4683
|
+
* @type {UIMediaBreakPointsType}
|
|
4684
|
+
* @default 'medium'
|
|
4817
4685
|
* @memberOf LayoutComponent
|
|
4818
4686
|
*/
|
|
4819
|
-
|
|
4687
|
+
breakpoint: UIMediaBreakPointsType | string;
|
|
4820
4688
|
/**
|
|
4821
4689
|
* @description Creates an instance of LayoutComponent.
|
|
4822
4690
|
* @summary Initializes a new LayoutComponent with the component name "LayoutComponent".
|
|
4823
|
-
* This constructor calls the parent
|
|
4691
|
+
* This constructor calls the parent NgxParentComponentDirective constructor to set up base
|
|
4824
4692
|
* functionality and component identification.
|
|
4825
4693
|
*
|
|
4826
4694
|
* @memberOf LayoutComponent
|
|
@@ -4860,15 +4728,19 @@ declare class LayoutComponent extends NgxBaseComponent implements OnInit {
|
|
|
4860
4728
|
*/
|
|
4861
4729
|
ngOnInit(): Promise<void>;
|
|
4862
4730
|
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutComponent, never>;
|
|
4863
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutComponent, "ngx-decaf-layout", never, { "
|
|
4731
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutComponent, "ngx-decaf-layout", never, { "initializeProps": { "alias": "initializeProps"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "match": { "alias": "match"; "required": false; }; "breakpoint": { "alias": "breakpoint"; "required": false; }; }, {}, never, never, true, never>;
|
|
4864
4732
|
}
|
|
4865
4733
|
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4734
|
+
/**
|
|
4735
|
+
* @module module:lib/components/list/list.component
|
|
4736
|
+
* @description List component module.
|
|
4737
|
+
* @summary Provides the `ListComponent` which renders collections of data with
|
|
4738
|
+
* support for infinite scroll, pagination, searching, filtering, custom item
|
|
4739
|
+
* rendering and refresh events. Use this module's `ListComponent` to display
|
|
4740
|
+
* lists sourced from models, functions or direct data arrays.
|
|
4741
|
+
*
|
|
4742
|
+
* @link {@link ListComponent}
|
|
4743
|
+
*/
|
|
4872
4744
|
|
|
4873
4745
|
/**
|
|
4874
4746
|
* @description A versatile list component that supports various data display modes.
|
|
@@ -4937,10 +4809,10 @@ type PaginationCustomEvent = BaseCustomEvent & {
|
|
|
4937
4809
|
* (refreshEvent)="handleRefresh($event)">
|
|
4938
4810
|
* </ngx-decaf-list>
|
|
4939
4811
|
*
|
|
4940
|
-
* @extends {
|
|
4812
|
+
* @extends {NgxBaseComponentDirective}
|
|
4941
4813
|
* @implements {OnInit}
|
|
4942
4814
|
*/
|
|
4943
|
-
declare class ListComponent extends
|
|
4815
|
+
declare class ListComponent extends NgxDecafComponentDirective implements OnInit, OnDestroy {
|
|
4944
4816
|
/**
|
|
4945
4817
|
* @description The display mode for the list component.
|
|
4946
4818
|
* @summary Determines how the list data is loaded and displayed. Options include:
|
|
@@ -4952,16 +4824,6 @@ declare class ListComponent extends NgxBaseComponent implements OnInit, OnDestro
|
|
|
4952
4824
|
* @memberOf ListComponent
|
|
4953
4825
|
*/
|
|
4954
4826
|
type: ListComponentsTypes;
|
|
4955
|
-
/**
|
|
4956
|
-
* @description Controls whether the component uses translation services.
|
|
4957
|
-
* @summary When set to true, the component will attempt to use translation services
|
|
4958
|
-
* for any text content. This allows for internationalization of the list component.
|
|
4959
|
-
*
|
|
4960
|
-
* @type {StringOrBoolean}
|
|
4961
|
-
* @default true
|
|
4962
|
-
* @memberOf ListComponent
|
|
4963
|
-
*/
|
|
4964
|
-
translatable: StringOrBoolean;
|
|
4965
4827
|
/**
|
|
4966
4828
|
* @description Controls the visibility of the search bar.
|
|
4967
4829
|
* @summary When set to true, displays a search bar at the top of the list that allows
|
|
@@ -5254,10 +5116,10 @@ declare class ListComponent extends NgxBaseComponent implements OnInit, OnDestro
|
|
|
5254
5116
|
* @summary Emits an event when the list data is refreshed, either through pull-to-refresh
|
|
5255
5117
|
* or programmatic refresh. The event includes the refreshed data and component information.
|
|
5256
5118
|
*
|
|
5257
|
-
* @type {EventEmitter<
|
|
5119
|
+
* @type {EventEmitter<IBaseCustomEvent>}
|
|
5258
5120
|
* @memberOf ListComponent
|
|
5259
5121
|
*/
|
|
5260
|
-
refreshEvent: EventEmitter<
|
|
5122
|
+
refreshEvent: EventEmitter<IBaseCustomEvent>;
|
|
5261
5123
|
/**
|
|
5262
5124
|
* @description Event emitter for item click interactions.
|
|
5263
5125
|
* @summary Emits an event when a list item is clicked. The event includes the data
|
|
@@ -5266,14 +5128,14 @@ declare class ListComponent extends NgxBaseComponent implements OnInit, OnDestro
|
|
|
5266
5128
|
* @type {EventEmitter<KeyValue>}
|
|
5267
5129
|
* @memberOf ListComponent
|
|
5268
5130
|
*/
|
|
5269
|
-
clickEvent: EventEmitter<ListItemCustomEvent |
|
|
5131
|
+
clickEvent: EventEmitter<ListItemCustomEvent | IBaseCustomEvent>;
|
|
5270
5132
|
/**
|
|
5271
5133
|
* @description Subject for debouncing click events.
|
|
5272
5134
|
* @summary Uses RxJS Subject to collect click events and emit them after a debounce
|
|
5273
5135
|
* period. This prevents multiple rapid clicks from triggering multiple events.
|
|
5274
5136
|
*
|
|
5275
5137
|
* @private
|
|
5276
|
-
* @type {Subject<CustomEvent | ListItemCustomEvent |
|
|
5138
|
+
* @type {Subject<CustomEvent | ListItemCustomEvent | IBaseCustomEvent>}
|
|
5277
5139
|
* @memberOf ListComponent
|
|
5278
5140
|
*/
|
|
5279
5141
|
private clickItemSubject;
|
|
@@ -5440,12 +5302,12 @@ declare class ListComponent extends NgxBaseComponent implements OnInit, OnDestro
|
|
|
5440
5302
|
* debounced click subject. This allows the component to respond to clicks on
|
|
5441
5303
|
* list items regardless of where they originate from.
|
|
5442
5304
|
*
|
|
5443
|
-
* @param {ListItemCustomEvent |
|
|
5305
|
+
* @param {ListItemCustomEvent | IBaseCustomEvent} event - The click event
|
|
5444
5306
|
* @returns {void}
|
|
5445
5307
|
*
|
|
5446
5308
|
* @memberOf ListComponent
|
|
5447
5309
|
*/
|
|
5448
|
-
handleClick(event: ListItemCustomEvent |
|
|
5310
|
+
handleClick(event: ListItemCustomEvent | IBaseCustomEvent): void;
|
|
5449
5311
|
/**
|
|
5450
5312
|
* @description Handles search events from the search bar.
|
|
5451
5313
|
* @summary Processes search queries from the search bar component, updating the
|
|
@@ -5508,7 +5370,7 @@ declare class ListComponent extends NgxBaseComponent implements OnInit, OnDestro
|
|
|
5508
5370
|
* This extracts the relevant data from the event and passes it to parent components.
|
|
5509
5371
|
*
|
|
5510
5372
|
* @private
|
|
5511
|
-
* @param {ListItemCustomEvent |
|
|
5373
|
+
* @param {ListItemCustomEvent | IBaseCustomEvent} event - The click event
|
|
5512
5374
|
* @returns {void}
|
|
5513
5375
|
*
|
|
5514
5376
|
* @memberOf ListComponent
|
|
@@ -5572,12 +5434,12 @@ declare class ListComponent extends NgxBaseComponent implements OnInit, OnDestro
|
|
|
5572
5434
|
* refreshing the list data to display the selected page. This method is called
|
|
5573
5435
|
* when a user interacts with the pagination controls to navigate between pages.
|
|
5574
5436
|
*
|
|
5575
|
-
* @param {
|
|
5437
|
+
* @param {IPaginationCustomEvent} event - The pagination event containing page information
|
|
5576
5438
|
* @returns {void}
|
|
5577
5439
|
*
|
|
5578
5440
|
* @memberOf ListComponent
|
|
5579
5441
|
*/
|
|
5580
|
-
handlePaginate(event:
|
|
5442
|
+
handlePaginate(event: IPaginationCustomEvent): void;
|
|
5581
5443
|
/**
|
|
5582
5444
|
* @description Handles pull-to-refresh events from the refresher component.
|
|
5583
5445
|
* @summary Processes refresh events triggered by the user pulling down on the list
|
|
@@ -5706,15 +5568,26 @@ declare class ListComponent extends NgxBaseComponent implements OnInit, OnDestro
|
|
|
5706
5568
|
*/
|
|
5707
5569
|
mapResults(data: KeyValue[]): KeyValue[];
|
|
5708
5570
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent, never>;
|
|
5709
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "ngx-decaf-list", never, { "type": { "alias": "type"; "required": false; }; "
|
|
5571
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "ngx-decaf-list", never, { "type": { "alias": "type"; "required": false; }; "showSearchbar": { "alias": "showSearchbar"; "required": false; }; "data": { "alias": "data"; "required": false; }; "source": { "alias": "source"; "required": false; }; "start": { "alias": "start"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "loadMoreData": { "alias": "loadMoreData"; "required": false; }; "lines": { "alias": "lines"; "required": false; }; "inset": { "alias": "inset"; "required": false; }; "scrollThreshold": { "alias": "scrollThreshold"; "required": false; }; "scrollPosition": { "alias": "scrollPosition"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "showRefresher": { "alias": "showRefresher"; "required": false; }; "loadingSpinner": { "alias": "loadingSpinner"; "required": false; }; "enableFilter": { "alias": "enableFilter"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "disableSort": { "alias": "disableSort"; "required": false; }; "emptyIcon": { "alias": "emptyIcon"; "required": false; }; "empty": { "alias": "empty"; "required": false; }; }, { "refreshEvent": "refreshEvent"; "clickEvent": "clickEvent"; }, never, ["*"], true, never>;
|
|
5710
5572
|
}
|
|
5711
5573
|
|
|
5574
|
+
/**
|
|
5575
|
+
* @module module:lib/components/list-item/list-item.component
|
|
5576
|
+
* @description List item component module.
|
|
5577
|
+
* @summary Exposes `ListItemComponent` which renders a single list item with
|
|
5578
|
+
* configurable icon, title, description, actions and navigation. The component
|
|
5579
|
+
* supports slide actions, popover menus and emits click events for parent
|
|
5580
|
+
* components to handle.
|
|
5581
|
+
*
|
|
5582
|
+
* @link {@link ListItemComponent}
|
|
5583
|
+
*/
|
|
5584
|
+
|
|
5712
5585
|
/**
|
|
5713
5586
|
* @description A component for displaying a list item with various customization options.
|
|
5714
|
-
* @summary The ListItemComponent is an Angular component that extends
|
|
5587
|
+
* @summary The ListItemComponent is an Angular component that extends NgxBaseComponentDirective. It provides a flexible and customizable list item interface with support for icons, buttons, and various text elements. The component also handles actions and navigation based on user interactions.
|
|
5715
5588
|
*
|
|
5716
5589
|
* @class
|
|
5717
|
-
* @extends
|
|
5590
|
+
* @extends NgxBaseComponentDirective
|
|
5718
5591
|
*
|
|
5719
5592
|
* @param {string} [lines='none'] - Determines the line style of the item. Can be 'inset', 'inseet', or 'none'.
|
|
5720
5593
|
* @param {Record<string, any>} item - The data item to be displayed in the list item.
|
|
@@ -5747,7 +5620,7 @@ declare class ListComponent extends NgxBaseComponent implements OnInit, OnDestro
|
|
|
5747
5620
|
* C->>C: Process action
|
|
5748
5621
|
* C->>V: Update view or navigate
|
|
5749
5622
|
*/
|
|
5750
|
-
declare class ListItemComponent extends
|
|
5623
|
+
declare class ListItemComponent extends NgxDecafComponentDirective implements OnInit {
|
|
5751
5624
|
/**
|
|
5752
5625
|
* @description Reference to the action menu popover component.
|
|
5753
5626
|
* @summary ViewChild reference that provides access to the HTMLIonPopoverElement
|
|
@@ -6094,6 +5967,16 @@ declare class ListItemComponent extends NgxBaseComponent implements OnInit {
|
|
|
6094
5967
|
static ɵcmp: i0.ɵɵComponentDeclaration<ListItemComponent, "ngx-decaf-list-item", never, { "lines": { "alias": "lines"; "required": false; }; "item": { "alias": "item"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconSlot": { "alias": "iconSlot"; "required": false; }; "button": { "alias": "button"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "info": { "alias": "info"; "required": false; }; "subinfo": { "alias": "subinfo"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, ["[slot='end']"], true, never>;
|
|
6095
5968
|
}
|
|
6096
5969
|
|
|
5970
|
+
/**
|
|
5971
|
+
* @module module:lib/components/model-renderer/model-renderer.component
|
|
5972
|
+
* @description Model renderer component module.
|
|
5973
|
+
* @summary Exposes `ModelRendererComponent` which dynamically renders UI components
|
|
5974
|
+
* from model definitions using the `NgxRenderingEngine`. It handles model changes,
|
|
5975
|
+
* event subscription and lifecycle for the rendered output.
|
|
5976
|
+
*
|
|
5977
|
+
* @link {@link ModelRendererComponent}
|
|
5978
|
+
*/
|
|
5979
|
+
|
|
6097
5980
|
/**
|
|
6098
5981
|
* @description Component for rendering dynamic models
|
|
6099
5982
|
* @summary This component is responsible for dynamically rendering models,
|
|
@@ -6122,12 +6005,7 @@ declare class ListItemComponent extends NgxBaseComponent implements OnInit {
|
|
|
6122
6005
|
* ModelRenderer->>ModelRenderer: Subscribe to events
|
|
6123
6006
|
* ModelRenderer-->>App: Emit events
|
|
6124
6007
|
*/
|
|
6125
|
-
declare class ModelRendererComponent<M extends Model> implements OnChanges, OnDestroy,
|
|
6126
|
-
/**
|
|
6127
|
-
* @description Input model to be rendered
|
|
6128
|
-
* @summary Can be a Model instance or a JSON string representation of a model
|
|
6129
|
-
*/
|
|
6130
|
-
model: M | string | undefined;
|
|
6008
|
+
declare class ModelRendererComponent<M extends Model> extends NgxDecafComponentDirective implements OnChanges, OnDestroy, IRenderedModel {
|
|
6131
6009
|
/**
|
|
6132
6010
|
* @description Global variables to be passed to the rendered component
|
|
6133
6011
|
*/
|
|
@@ -6153,10 +6031,6 @@ declare class ModelRendererComponent<M extends Model> implements OnChanges, OnDe
|
|
|
6153
6031
|
* @description View container reference for dynamic component rendering
|
|
6154
6032
|
*/
|
|
6155
6033
|
vcr: ViewContainerRef;
|
|
6156
|
-
/**
|
|
6157
|
-
* @description Event emitter for custom events from the rendered component
|
|
6158
|
-
*/
|
|
6159
|
-
listenEvent: EventEmitter<RendererCustomEvent>;
|
|
6160
6034
|
/**
|
|
6161
6035
|
* @description Instance of the rendered component
|
|
6162
6036
|
*/
|
|
@@ -6184,9 +6058,19 @@ declare class ModelRendererComponent<M extends Model> implements OnChanges, OnDe
|
|
|
6184
6058
|
private unsubscribeEvents;
|
|
6185
6059
|
protected readonly JSON: JSON;
|
|
6186
6060
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModelRendererComponent<any>, never>;
|
|
6187
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ModelRendererComponent<any>, "ngx-decaf-model-renderer", never, { "
|
|
6061
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModelRendererComponent<any>, "ngx-decaf-model-renderer", never, { "globals": { "alias": "globals"; "required": false; }; "projectable": { "alias": "projectable"; "required": false; }; "rendererId": { "alias": "rendererId"; "required": false; }; }, {}, never, never, true, never>;
|
|
6188
6062
|
}
|
|
6189
6063
|
|
|
6064
|
+
/**
|
|
6065
|
+
* @module module:lib/components/pagination/pagination.component
|
|
6066
|
+
* @description Pagination component module.
|
|
6067
|
+
* @summary Provides `PaginationComponent` for displaying page navigation controls
|
|
6068
|
+
* and emitting pagination events. Use this component to navigate paginated data
|
|
6069
|
+
* in lists and other collections.
|
|
6070
|
+
*
|
|
6071
|
+
* @link {@link PaginationComponent}
|
|
6072
|
+
*/
|
|
6073
|
+
|
|
6190
6074
|
/**
|
|
6191
6075
|
* @description A pagination component for navigating through multiple pages of content.
|
|
6192
6076
|
* @summary This component provides a user interface for paginated content navigation,
|
|
@@ -6206,17 +6090,17 @@ declare class ModelRendererComponent<M extends Model> implements OnChanges, OnDe
|
|
|
6206
6090
|
* U->>P: Click page number
|
|
6207
6091
|
* P->>P: navigate(page)
|
|
6208
6092
|
* P->>P: handleClick(direction, page)
|
|
6209
|
-
* P->>E: Emit clickEvent with
|
|
6093
|
+
* P->>E: Emit clickEvent with IPaginationCustomEvent
|
|
6210
6094
|
*
|
|
6211
6095
|
* U->>P: Click next button
|
|
6212
6096
|
* P->>P: next()
|
|
6213
6097
|
* P->>P: handleClick('next')
|
|
6214
|
-
* P->>E: Emit clickEvent with
|
|
6098
|
+
* P->>E: Emit clickEvent with IPaginationCustomEvent
|
|
6215
6099
|
*
|
|
6216
6100
|
* U->>P: Click previous button
|
|
6217
6101
|
* P->>P: previous()
|
|
6218
6102
|
* P->>P: handleClick('previous')
|
|
6219
|
-
* P->>E: Emit clickEvent with
|
|
6103
|
+
* P->>E: Emit clickEvent with IPaginationCustomEvent
|
|
6220
6104
|
*
|
|
6221
6105
|
* @example
|
|
6222
6106
|
* <ngx-decaf-pagination
|
|
@@ -6225,20 +6109,10 @@ declare class ModelRendererComponent<M extends Model> implements OnChanges, OnDe
|
|
|
6225
6109
|
* (clickEvent)="handlePageChange($event)">
|
|
6226
6110
|
* </ngx-decaf-pagination>
|
|
6227
6111
|
*
|
|
6228
|
-
* @extends {
|
|
6112
|
+
* @extends {NgxBaseComponentDirective}
|
|
6229
6113
|
* @implements {OnInit}
|
|
6230
6114
|
*/
|
|
6231
|
-
declare class PaginationComponent extends
|
|
6232
|
-
/**
|
|
6233
|
-
* @description Controls whether the component uses translation services.
|
|
6234
|
-
* @summary When set to true, the component will attempt to use translation services
|
|
6235
|
-
* for any text content. This allows for internationalization of the pagination component.
|
|
6236
|
-
*
|
|
6237
|
-
* @type {StringOrBoolean}
|
|
6238
|
-
* @default true
|
|
6239
|
-
* @memberOf PaginationComponent
|
|
6240
|
-
*/
|
|
6241
|
-
translatable: StringOrBoolean;
|
|
6115
|
+
declare class PaginationComponent extends NgxDecafComponentDirective implements OnInit {
|
|
6242
6116
|
/**
|
|
6243
6117
|
* @description The total number of pages to display in the pagination component.
|
|
6244
6118
|
* @summary Specifies the total number of pages available for navigation. This is a required
|
|
@@ -6282,10 +6156,10 @@ declare class PaginationComponent extends NgxBaseComponent implements OnInit {
|
|
|
6282
6156
|
* on page numbers or using the next/previous buttons. The event contains information
|
|
6283
6157
|
* about the navigation direction and the target page number.
|
|
6284
6158
|
*
|
|
6285
|
-
* @type {EventEmitter<
|
|
6159
|
+
* @type {EventEmitter<IPaginationCustomEvent>}
|
|
6286
6160
|
* @memberOf PaginationComponent
|
|
6287
6161
|
*/
|
|
6288
|
-
clickEvent: EventEmitter<
|
|
6162
|
+
clickEvent: EventEmitter<IPaginationCustomEvent>;
|
|
6289
6163
|
/**
|
|
6290
6164
|
* @constructor
|
|
6291
6165
|
* @description Initializes a new instance of the PaginationComponent.
|
|
@@ -6447,20 +6321,30 @@ declare class PaginationComponent extends NgxBaseComponent implements OnInit {
|
|
|
6447
6321
|
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "ngx-decaf-pagination", never, { "totalPages": { "alias": "totalPages"; "required": true; }; "current": { "alias": "current"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, never, true, never>;
|
|
6448
6322
|
}
|
|
6449
6323
|
|
|
6324
|
+
/**
|
|
6325
|
+
* @module module:lib/components/searchbar/searchbar.component
|
|
6326
|
+
* @description Searchbar component module.
|
|
6327
|
+
* @summary Exposes `SearchbarComponent` providing a configurable search input with
|
|
6328
|
+
* debouncing, clear/cancel handling and optional global window events. Use this
|
|
6329
|
+
* component to add search UI across lists and pages.
|
|
6330
|
+
*
|
|
6331
|
+
* @link {@link SearchbarComponent}
|
|
6332
|
+
*/
|
|
6333
|
+
|
|
6450
6334
|
/**
|
|
6451
6335
|
* @description Searchbar component for Angular applications.
|
|
6452
6336
|
* @summary The SearchbarComponent provides a highly customizable search input field with comprehensive
|
|
6453
|
-
* options for appearance, behavior, and interaction patterns. It extends
|
|
6337
|
+
* options for appearance, behavior, and interaction patterns. It extends NgxBaseComponentDirective to inherit
|
|
6454
6338
|
* common functionality and implements OnInit for proper lifecycle management. This component features
|
|
6455
6339
|
* debounced input handling, window event integration, visibility controls, and extensive styling options.
|
|
6456
6340
|
* It's designed to be flexible and adaptable to different search requirements within modern web applications.
|
|
6457
6341
|
*
|
|
6458
6342
|
* @class SearchbarComponent
|
|
6459
|
-
* @extends {
|
|
6343
|
+
* @extends {NgxBaseComponentDirective}
|
|
6460
6344
|
* @implements {OnInit}
|
|
6461
6345
|
* @memberOf SearchbarComponent
|
|
6462
6346
|
*/
|
|
6463
|
-
declare class SearchbarComponent extends
|
|
6347
|
+
declare class SearchbarComponent extends NgxDecafComponentDirective implements OnInit {
|
|
6464
6348
|
/**
|
|
6465
6349
|
* @description The mode of the searchbar.
|
|
6466
6350
|
* @summary Determines the visual style of the searchbar, either iOS or Material Design.
|
|
@@ -6850,24 +6734,32 @@ declare class SearchbarComponent extends NgxBaseComponent implements OnInit {
|
|
|
6850
6734
|
static ɵcmp: i0.ɵɵComponentDeclaration<SearchbarComponent, "ngx-decaf-searchbar", never, { "autocomplete": { "alias": "autocomplete"; "required": false; }; "autocorrect": { "alias": "autocorrect"; "required": false; }; "animated": { "alias": "animated"; "required": false; }; "buttonCancelText": { "alias": "buttonCancelText"; "required": false; }; "clearIcon": { "alias": "clearIcon"; "required": false; }; "color": { "alias": "color"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "enterkeyhint": { "alias": "enterkeyhint"; "required": false; }; "inputmode": { "alias": "inputmode"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "searchIcon": { "alias": "searchIcon"; "required": false; }; "showCancelButton": { "alias": "showCancelButton"; "required": false; }; "showClearButton": { "alias": "showClearButton"; "required": false; }; "spellcheck": { "alias": "spellcheck"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; "queryKeys": { "alias": "queryKeys"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "wrapper": { "alias": "wrapper"; "required": false; }; "wrapperColor": { "alias": "wrapperColor"; "required": false; }; "emitEventToWindow": { "alias": "emitEventToWindow"; "required": false; }; }, { "searchEvent": "searchEvent"; }, never, never, true, never>;
|
|
6851
6735
|
}
|
|
6852
6736
|
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6737
|
+
/**
|
|
6738
|
+
* @module module:lib/components/stepped-form/stepped-form.component
|
|
6739
|
+
* @description Stepped form component module.
|
|
6740
|
+
* @summary Provides `SteppedFormComponent` which implements a multi-page form
|
|
6741
|
+
* UI with navigation, validation and submission support. Useful for forms that
|
|
6742
|
+
* need to be split into logical steps/pages.
|
|
6743
|
+
*
|
|
6744
|
+
* @link {@link SteppedFormComponent}
|
|
6745
|
+
*/
|
|
6857
6746
|
|
|
6858
|
-
declare class SteppedFormComponent implements OnInit, OnDestroy {
|
|
6747
|
+
declare class SteppedFormComponent extends NgxParentComponentDirective$1 implements OnInit, OnDestroy {
|
|
6859
6748
|
/**
|
|
6860
|
-
* @description
|
|
6861
|
-
* @summary
|
|
6862
|
-
*
|
|
6863
|
-
*
|
|
6864
|
-
*
|
|
6865
|
-
* set to use for the component's text content.
|
|
6749
|
+
* @description Array of UI model metadata for all form fields.
|
|
6750
|
+
* @summary Contains the complete collection of UI model metadata that defines
|
|
6751
|
+
* the structure, validation, and presentation of form fields across all pages.
|
|
6752
|
+
* Each metadata object contains information about field type, validation rules,
|
|
6753
|
+
* page assignment, and display properties.
|
|
6866
6754
|
*
|
|
6867
|
-
* @type {
|
|
6755
|
+
* @type {UIModelMetadata[]}
|
|
6868
6756
|
* @memberOf SteppedFormComponent
|
|
6869
6757
|
*/
|
|
6870
|
-
|
|
6758
|
+
children: UIModelMetadata[] | {
|
|
6759
|
+
title: string;
|
|
6760
|
+
description: string;
|
|
6761
|
+
items?: UIModelMetadata[];
|
|
6762
|
+
}[];
|
|
6871
6763
|
/**
|
|
6872
6764
|
* @description The locale to be used for translations.
|
|
6873
6765
|
* @summary Specifies the locale identifier to use when translating component text.
|
|
@@ -6927,21 +6819,6 @@ declare class SteppedFormComponent implements OnInit, OnDestroy {
|
|
|
6927
6819
|
* @memberOf SteppedFormComponent
|
|
6928
6820
|
*/
|
|
6929
6821
|
startPage: number;
|
|
6930
|
-
/**
|
|
6931
|
-
* @description Array of UI model metadata for all form fields.
|
|
6932
|
-
* @summary Contains the complete collection of UI model metadata that defines
|
|
6933
|
-
* the structure, validation, and presentation of form fields across all pages.
|
|
6934
|
-
* Each metadata object contains information about field type, validation rules,
|
|
6935
|
-
* page assignment, and display properties.
|
|
6936
|
-
*
|
|
6937
|
-
* @type {UIModelMetadata[]}
|
|
6938
|
-
* @memberOf SteppedFormComponent
|
|
6939
|
-
*/
|
|
6940
|
-
children: UIModelMetadata[] | {
|
|
6941
|
-
title: string;
|
|
6942
|
-
description: string;
|
|
6943
|
-
items?: UIModelMetadata[];
|
|
6944
|
-
}[];
|
|
6945
6822
|
/**
|
|
6946
6823
|
* @description Angular reactive FormGroup or FormArray for form state management.
|
|
6947
6824
|
* @summary The form instance that manages all form controls, validation, and form state.
|
|
@@ -7003,16 +6880,27 @@ declare class SteppedFormComponent implements OnInit, OnDestroy {
|
|
|
7003
6880
|
* @memberOf SteppedFormComponent
|
|
7004
6881
|
*/
|
|
7005
6882
|
private timerSubscription;
|
|
6883
|
+
/**
|
|
6884
|
+
* @description Angular Location service.
|
|
6885
|
+
* @summary Injected service that provides access to the browser's URL and history.
|
|
6886
|
+
* This service is used for interacting with the browser's history API, allowing
|
|
6887
|
+
* for back navigation and URL manipulation outside of Angular's router.
|
|
6888
|
+
*
|
|
6889
|
+
* @private
|
|
6890
|
+
* @type {Location}
|
|
6891
|
+
* @memberOf CrudFormComponent
|
|
6892
|
+
*/
|
|
6893
|
+
private location;
|
|
7006
6894
|
/**
|
|
7007
6895
|
* @description Event emitter for form submission.
|
|
7008
6896
|
* @summary Emits events when the form is submitted, typically on the last page
|
|
7009
6897
|
* when all validation passes. The emitted event contains the form data and
|
|
7010
6898
|
* event type information for parent components to handle.
|
|
7011
6899
|
*
|
|
7012
|
-
* @type {EventEmitter<
|
|
6900
|
+
* @type {EventEmitter<IBaseCustomEvent>}
|
|
7013
6901
|
* @memberOf SteppedFormComponent
|
|
7014
6902
|
*/
|
|
7015
|
-
submitEvent: EventEmitter<
|
|
6903
|
+
submitEvent: EventEmitter<IBaseCustomEvent>;
|
|
7016
6904
|
/**
|
|
7017
6905
|
* @description Creates an instance of SteppedFormComponent.
|
|
7018
6906
|
* @summary Initializes a new SteppedFormComponent instance and registers the required
|
|
@@ -7043,7 +6931,7 @@ declare class SteppedFormComponent implements OnInit, OnDestroy {
|
|
|
7043
6931
|
*
|
|
7044
6932
|
* @memberOf SteppedFormComponent
|
|
7045
6933
|
*/
|
|
7046
|
-
ngOnInit(): void
|
|
6934
|
+
ngOnInit(): Promise<void>;
|
|
7047
6935
|
/**
|
|
7048
6936
|
* @description Cleanup method called when the component is destroyed.
|
|
7049
6937
|
* @summary Unsubscribes from any active timer subscriptions to prevent memory leaks.
|
|
@@ -7131,9 +7019,18 @@ declare class SteppedFormComponent implements OnInit, OnDestroy {
|
|
|
7131
7019
|
*/
|
|
7132
7020
|
private getCurrentFormGroup;
|
|
7133
7021
|
static ɵfac: i0.ɵɵFactoryDeclaration<SteppedFormComponent, never>;
|
|
7134
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SteppedFormComponent, "ngx-decaf-stepped-form", never, { "
|
|
7022
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SteppedFormComponent, "ngx-decaf-stepped-form", never, { "children": { "alias": "children"; "required": false; }; "paginated": { "alias": "paginated"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "pageTitles": { "alias": "pageTitles"; "required": false; }; "operation": { "alias": "operation"; "required": false; }; "startPage": { "alias": "startPage"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; }, { "submitEvent": "submitEvent"; }, never, never, true, never>;
|
|
7135
7023
|
}
|
|
7136
7024
|
|
|
7025
|
+
/**
|
|
7026
|
+
* @module module:lib/directives/collapsable
|
|
7027
|
+
* @description Directive to auto-open accordions when required fields are present.
|
|
7028
|
+
* @summary CollapsableDirective inspects a DOM subtree for required inputs and, when found,
|
|
7029
|
+
* opens the closest ion-accordion-group to surface validation to the user.
|
|
7030
|
+
*
|
|
7031
|
+
* @link {@link CollapsableDirective}
|
|
7032
|
+
*/
|
|
7033
|
+
|
|
7137
7034
|
declare class CollapsableDirective implements OnInit {
|
|
7138
7035
|
private element;
|
|
7139
7036
|
private injector;
|
|
@@ -7148,6 +7045,18 @@ declare class ForAngularComponentsModule {
|
|
|
7148
7045
|
static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularComponentsModule>;
|
|
7149
7046
|
}
|
|
7150
7047
|
|
|
7048
|
+
/**
|
|
7049
|
+
* @module module:lib/helpers/utils
|
|
7050
|
+
* @description General helper utilities used across the library.
|
|
7051
|
+
* @summary Exposes small, reusable utility functions for window/document access, date handling,
|
|
7052
|
+
* string manipulation, simple mapping helpers and environment helpers used by UI components
|
|
7053
|
+
* and services. This module's functions include `getWindow`, `getWindowDocument`, `formatDate`,
|
|
7054
|
+
* `isValidDate`, `itemMapper`, `dataMapper`, and event helpers like `windowEventEmitter`.
|
|
7055
|
+
*
|
|
7056
|
+
* Do not document individual exports here — functions are documented inline.
|
|
7057
|
+
* @link {@link getWindow}
|
|
7058
|
+
*/
|
|
7059
|
+
|
|
7151
7060
|
/**
|
|
7152
7061
|
* @description Retrieves the singleton instance of the injectables registry
|
|
7153
7062
|
* @summary This function implements the singleton pattern for the InjectablesRegistry.
|
|
@@ -7442,7 +7351,7 @@ declare function getLocaleContext(clazz: FunctionLike | object | string, suffix?
|
|
|
7442
7351
|
*/
|
|
7443
7352
|
declare function getLocaleContextByKey(locale: string, phrase: string | undefined): string;
|
|
7444
7353
|
declare function I18nLoaderFactory(http: HttpClient): TranslateLoader;
|
|
7445
|
-
declare function provideI18nLoader(resources?:
|
|
7354
|
+
declare function provideI18nLoader(resources?: I18nResourceConfigType, versionedSuffix?: boolean): {
|
|
7446
7355
|
provide: i0.InjectionToken<{
|
|
7447
7356
|
resources: I18nResourceConfig[];
|
|
7448
7357
|
versionedSuffix: boolean;
|
|
@@ -7460,16 +7369,43 @@ declare class I18nLoader implements TranslateLoader {
|
|
|
7460
7369
|
private getSuffix;
|
|
7461
7370
|
getTranslation(lang: string): Observable<TranslationObject>;
|
|
7462
7371
|
}
|
|
7372
|
+
declare class I18nParser extends TranslateParser {
|
|
7373
|
+
interpolate(value: string, params?: object | string): string;
|
|
7374
|
+
}
|
|
7375
|
+
declare function provideI18n(config?: RootTranslateServiceConfig, resources?: I18nResourceConfigType, versionedSuffix?: boolean): ({
|
|
7376
|
+
provide: i0.InjectionToken<{
|
|
7377
|
+
resources: I18nResourceConfig[];
|
|
7378
|
+
versionedSuffix: boolean;
|
|
7379
|
+
}>;
|
|
7380
|
+
useValue: {
|
|
7381
|
+
resources: I18nResourceConfig[];
|
|
7382
|
+
versionedSuffix: boolean;
|
|
7383
|
+
};
|
|
7384
|
+
} | i0.EnvironmentProviders | i0.Provider[])[];
|
|
7385
|
+
|
|
7386
|
+
/**
|
|
7387
|
+
* @module module:lib/for-angular-common.module
|
|
7388
|
+
* @description Core Angular module and providers for Decaf's for-angular package.
|
|
7389
|
+
* @summary Provides the shared Angular module, injection tokens and helper functions used
|
|
7390
|
+
* by the for-angular integration. This module wires up common imports (forms, translation)
|
|
7391
|
+
* and exposes helper providers such as DB adapter registration and logger utilities.
|
|
7392
|
+
*
|
|
7393
|
+
* @link {@link ForAngularCommonModule}
|
|
7394
|
+
*/
|
|
7463
7395
|
|
|
7464
7396
|
/** */
|
|
7397
|
+
declare const DB_ADAPTER_PROVIDER = "DB_ADAPTER_PROVIDER";
|
|
7465
7398
|
declare const DB_ADAPTER_PROVIDER_TOKEN: InjectionToken<DecafRepositoryAdapter>;
|
|
7399
|
+
declare const LOCALE_ROOT_TOKEN: InjectionToken<string>;
|
|
7400
|
+
declare const CPTKN: InjectionToken<unknown>;
|
|
7466
7401
|
declare const I18N_CONFIG_TOKEN: InjectionToken<{
|
|
7467
7402
|
resources: I18nResourceConfig[];
|
|
7468
7403
|
versionedSuffix: boolean;
|
|
7469
7404
|
}>;
|
|
7405
|
+
declare function getModelRepository(model: Model | string): DecafRepository<Model>;
|
|
7470
7406
|
declare function provideDbAdapter<DbAdapter extends {
|
|
7471
7407
|
flavour: string;
|
|
7472
|
-
}>(adapterClass: Constructor<DbAdapter>, options?: KeyValue): Provider;
|
|
7408
|
+
}>(adapterClass: Constructor<DbAdapter>, options?: KeyValue, flavour?: string): Provider;
|
|
7473
7409
|
declare function getLogger(instance: string | FunctionLike | unknown): Logger;
|
|
7474
7410
|
/**
|
|
7475
7411
|
* @description Main Angular module for the Decaf framework
|
|
@@ -7508,5 +7444,5 @@ declare class ForAngularCommonModule {
|
|
|
7508
7444
|
static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularCommonModule>;
|
|
7509
7445
|
}
|
|
7510
7446
|
|
|
7511
|
-
export { AngularEngineKeys, BaseComponentProps, CollapsableDirective, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_PROVIDER_TOKEN, DefaultFormReactiveOptions, Dynamic, DynamicModule, EmptyStateComponent, EventConstants, FieldsetComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, FormConstants, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, LayoutComponent, ListComponent, ListComponentsTypes, ListItemComponent, LoggerLevels, ModelRendererComponent,
|
|
7512
|
-
export type { AngularDynamicOutput, AngularFieldDefinition,
|
|
7447
|
+
export { AngularEngineKeys, BaseComponentProps, CPTKN, CollapsableDirective, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_PROVIDER, DB_ADAPTER_PROVIDER_TOKEN, DefaultFormReactiveOptions, Dynamic, DynamicModule, EmptyStateComponent, EventConstants, FieldsetComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, FormConstants, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, LOCALE_ROOT_TOKEN, LayoutComponent, ListComponent, ListComponentsTypes, ListItemComponent, LoggerLevels, ModelRendererComponent, NgxDecafComponentDirective, NgxDecafFormFieldDirective, NgxDecafFormService, NgxEventHandler, NgxPageDirective, NgxRenderingEngine, PaginationComponent, RouteDirections, SearchbarComponent, SteppedFormComponent, cleanSpaces, dataMapper, formatDate, generateRandomValue, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getModelRepository, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, parseToValidDate, provideDbAdapter, provideI18n, provideI18nLoader, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
|
|
7448
|
+
export type { AngularDynamicOutput, AngularFieldDefinition, CheckboxOption, ComponentMetadata, CrudFieldOption, DecafRepository, DecafRepositoryAdapter, ElementPositions, ElementSizes, FieldUpdateMode, FlexPositions, FormParent, FormParentGroup, FormServiceControl, FormServiceControls, FunctionLike, HTMLFormTarget, HandlerLike, I18nResourceConfig, I18nResourceConfigType, IBaseCustomEvent, IComponentConfig, IComponentHolder, IComponentInput, ICrudFormEvent, ICrudFormOptions, IFieldSetItem, IFieldSetValidationEvent, IFilterQuery, IFilterQueryItem, IFormElement, IFormReactiveSubmitEvent, IListComponentRefreshEvent, IListEmptyResult, IMenuItem, IPaginationCustomEvent, IRenderedModel, ISortObject, InputOption, KeyValue, ListItemCustomEvent, PossibleInputTypes, RadioOption, RawQuery, SelectOption, StringOrBoolean };
|