@decaf-ts/for-angular 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/decaf-ts-for-angular.mjs +1465 -1488
- package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
- package/index.d.ts +7470 -3
- package/package.json +14 -17
- package/components/component-renderer/component-renderer.component.d.ts +0 -278
- package/components/crud-field/crud-field.component.d.ts +0 -611
- package/components/crud-form/constants.d.ts +0 -5
- package/components/crud-form/crud-form.component.d.ts +0 -288
- package/components/crud-form/types.d.ts +0 -17
- package/components/empty-state/empty-state.component.d.ts +0 -300
- package/components/fieldset/fieldset.component.d.ts +0 -555
- package/components/filter/filter.component.d.ts +0 -514
- package/components/for-angular-components.module.d.ts +0 -20
- package/components/index.d.ts +0 -16
- package/components/layout/layout.component.d.ts +0 -110
- package/components/list/list.component.d.ts +0 -848
- package/components/list-item/list-item.component.d.ts +0 -390
- package/components/model-renderer/model-renderer.component.d.ts +0 -97
- package/components/pagination/constants.d.ts +0 -7
- package/components/pagination/pagination.component.d.ts +0 -264
- package/components/searchbar/searchbar.component.d.ts +0 -407
- package/components/stepped-form/stepped-form.component.d.ts +0 -255
- package/directives/collapsable.directive.d.ts +0 -9
- package/directives/index.d.ts +0 -1
- package/engine/DynamicModule.d.ts +0 -17
- package/engine/NgxBaseComponent.d.ts +0 -541
- package/engine/NgxCrudFormField.d.ts +0 -123
- package/engine/NgxFormService.d.ts +0 -601
- package/engine/NgxRenderingEngine.d.ts +0 -282
- package/engine/ValidatorFactory.d.ts +0 -15
- package/engine/constants.d.ts +0 -168
- package/engine/decorators.d.ts +0 -25
- package/engine/index.d.ts +0 -18
- package/engine/interfaces.d.ts +0 -271
- package/engine/types.d.ts +0 -200
- package/esm2022/components/component-renderer/component-renderer.component.mjs +0 -321
- package/esm2022/components/crud-field/crud-field.component.mjs +0 -518
- package/esm2022/components/crud-form/constants.mjs +0 -14
- package/esm2022/components/crud-form/crud-form.component.mjs +0 -259
- package/esm2022/components/crud-form/types.mjs +0 -2
- package/esm2022/components/empty-state/empty-state.component.mjs +0 -345
- package/esm2022/components/fieldset/fieldset.component.mjs +0 -677
- package/esm2022/components/filter/filter.component.mjs +0 -700
- package/esm2022/components/for-angular-components.module.mjs +0 -84
- package/esm2022/components/index.mjs +0 -20
- package/esm2022/components/layout/layout.component.mjs +0 -150
- package/esm2022/components/list/list.component.mjs +0 -1238
- package/esm2022/components/list-item/list-item.component.mjs +0 -405
- package/esm2022/components/model-renderer/model-renderer.component.mjs +0 -144
- package/esm2022/components/pagination/constants.mjs +0 -2
- package/esm2022/components/pagination/pagination.component.mjs +0 -321
- package/esm2022/components/searchbar/searchbar.component.mjs +0 -491
- package/esm2022/components/stepped-form/stepped-form.component.mjs +0 -306
- package/esm2022/decaf-ts-for-angular.mjs +0 -5
- package/esm2022/directives/collapsable.directive.mjs +0 -29
- package/esm2022/directives/index.mjs +0 -2
- package/esm2022/engine/DynamicModule.mjs +0 -18
- package/esm2022/engine/NgxBaseComponent.mjs +0 -541
- package/esm2022/engine/NgxCrudFormField.mjs +0 -137
- package/esm2022/engine/NgxFormService.mjs +0 -917
- package/esm2022/engine/NgxRenderingEngine.mjs +0 -376
- package/esm2022/engine/ValidatorFactory.mjs +0 -106
- package/esm2022/engine/constants.mjs +0 -170
- package/esm2022/engine/decorators.mjs +0 -38
- package/esm2022/engine/index.mjs +0 -19
- package/esm2022/engine/interfaces.mjs +0 -4
- package/esm2022/engine/types.mjs +0 -2
- package/esm2022/for-angular-common.module.mjs +0 -84
- package/esm2022/helpers/index.mjs +0 -13
- package/esm2022/helpers/utils.mjs +0 -436
- package/esm2022/i18n/Loader.mjs +0 -86
- package/esm2022/i18n/data/en.json +0 -85
- package/esm2022/public-apis.mjs +0 -15
- package/for-angular-common.module.d.ts +0 -50
- package/helpers/index.d.ts +0 -12
- package/helpers/utils.d.ts +0 -279
- package/i18n/Loader.d.ts +0 -43
- package/public-apis.d.ts +0 -14
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { FieldDefinition, RenderingEngine } from '@decaf-ts/ui-decorators';
|
|
2
|
-
import { AngularFieldDefinition, KeyValue } from './types';
|
|
3
|
-
import { AngularDynamicOutput } from './interfaces';
|
|
4
|
-
import { Constructor, Model } from '@decaf-ts/decorator-validation';
|
|
5
|
-
import { ComponentMirror, ComponentRef, Injector, TemplateRef, Type, ViewContainerRef } from '@angular/core';
|
|
6
|
-
/**
|
|
7
|
-
* @description Angular implementation of the RenderingEngine with enhanced features
|
|
8
|
-
* @summary This class extends the base RenderingEngine to provide Angular-specific rendering capabilities
|
|
9
|
-
* with additional features compared to NgxRenderingEngine. It handles the conversion of field definitions
|
|
10
|
-
* to Angular components, manages component registration, and provides utilities for component creation
|
|
11
|
-
* and input handling. This implementation uses Angular's newer component APIs.
|
|
12
|
-
*
|
|
13
|
-
* @template AngularFieldDefinition - Type for Angular-specific field definitions
|
|
14
|
-
* @template AngularDynamicOutput - Type for Angular-specific component output
|
|
15
|
-
*
|
|
16
|
-
* @class NgxRenderingEngine
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const engine = NgxRenderingEngine.get();
|
|
20
|
-
* engine.initialize();
|
|
21
|
-
* const output = engine.render(myModel, {}, viewContainerRef, injector, templateRef);
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @mermaid
|
|
25
|
-
* sequenceDiagram
|
|
26
|
-
* participant Client
|
|
27
|
-
* participant Engine as NgxRenderingEngine
|
|
28
|
-
* participant Components as RegisteredComponents
|
|
29
|
-
*
|
|
30
|
-
* Client->>Engine: get()
|
|
31
|
-
* Client->>Engine: initialize()
|
|
32
|
-
* Client->>Engine: render(model, props, vcr, injector, tpl)
|
|
33
|
-
* Engine->>Engine: toFieldDefinition(model, props)
|
|
34
|
-
* Engine->>Engine: fromFieldDefinition(fieldDef, vcr, injector, tpl)
|
|
35
|
-
* Engine->>Components: components(fieldDef.tag)
|
|
36
|
-
* Components-->>Engine: component constructor
|
|
37
|
-
* Engine->>Engine: createComponent(component, inputs, metadata, vcr, injector, template)
|
|
38
|
-
* Engine-->>Client: return AngularDynamicOutput
|
|
39
|
-
*/
|
|
40
|
-
export declare class NgxRenderingEngine extends RenderingEngine<AngularFieldDefinition, AngularDynamicOutput> {
|
|
41
|
-
/**
|
|
42
|
-
* @description Registry of components available for rendering
|
|
43
|
-
* @summary Static registry that stores all registered components indexed by their selector name.
|
|
44
|
-
* Each component entry contains a constructor reference that can be used to instantiate
|
|
45
|
-
* the component during the rendering process. This registry is shared across all instances
|
|
46
|
-
* of the rendering engine and is populated through the registerComponent method.
|
|
47
|
-
*
|
|
48
|
-
* @private
|
|
49
|
-
* @static
|
|
50
|
-
* @type {Record<string, { constructor: Constructor<unknown> }>}
|
|
51
|
-
*/
|
|
52
|
-
private static _components;
|
|
53
|
-
/**
|
|
54
|
-
* @description Currently active model being rendered
|
|
55
|
-
* @summary Stores a reference to the model instance that is currently being processed
|
|
56
|
-
* by the rendering engine. This property is set during the render method execution
|
|
57
|
-
* and is used throughout the rendering lifecycle to access model data and metadata.
|
|
58
|
-
* The definite assignment assertion (!) is used because this property is always
|
|
59
|
-
* initialized before use within the render method.
|
|
60
|
-
*
|
|
61
|
-
* @private
|
|
62
|
-
* @type {Model}
|
|
63
|
-
*/
|
|
64
|
-
private _model;
|
|
65
|
-
/**
|
|
66
|
-
* @description Current operation context for component visibility control
|
|
67
|
-
* @summary Static property that stores the current operation being performed,
|
|
68
|
-
* which is used to determine component visibility through the 'hidden' property.
|
|
69
|
-
* Components can specify operations where they should be hidden, and this property
|
|
70
|
-
* provides the context for those visibility checks. The value is typically extracted
|
|
71
|
-
* from the global properties during the rendering process.
|
|
72
|
-
*
|
|
73
|
-
* @private
|
|
74
|
-
* @static
|
|
75
|
-
* @type {string | undefined}
|
|
76
|
-
*/
|
|
77
|
-
private static _operation;
|
|
78
|
-
/**
|
|
79
|
-
* @description Reference to the currently active component instance
|
|
80
|
-
* @summary Static property that maintains a reference to the most recently created
|
|
81
|
-
* component instance. This is used internally for component lifecycle management
|
|
82
|
-
* and can be cleared through the destroy method. The reference allows access to
|
|
83
|
-
* the active component instance for operations that need to interact with the
|
|
84
|
-
* currently rendered component.
|
|
85
|
-
*
|
|
86
|
-
* @private
|
|
87
|
-
* @static
|
|
88
|
-
* @type {Type<unknown> | undefined}
|
|
89
|
-
*/
|
|
90
|
-
private static _instance;
|
|
91
|
-
private static _projectable;
|
|
92
|
-
private static _parentProps;
|
|
93
|
-
/**
|
|
94
|
-
* @description Constructs a new NgxRenderingEngine instance
|
|
95
|
-
* @summary Initializes a new instance of the Angular rendering engine by calling the parent
|
|
96
|
-
* constructor with the 'angular' engine type identifier. This constructor sets up the base
|
|
97
|
-
* rendering engine functionality with Angular-specific configurations and prepares the
|
|
98
|
-
* instance for component registration and rendering operations.
|
|
99
|
-
*
|
|
100
|
-
* @constructor
|
|
101
|
-
*/
|
|
102
|
-
constructor();
|
|
103
|
-
/**
|
|
104
|
-
* @description Converts a field definition to an Angular component output
|
|
105
|
-
* @summary This private method takes a field definition and creates the corresponding Angular component.
|
|
106
|
-
* It handles component instantiation, input property mapping, and child component rendering.
|
|
107
|
-
* The method validates input properties against the component's metadata and processes
|
|
108
|
-
* child components recursively.
|
|
109
|
-
*
|
|
110
|
-
* @param {FieldDefinition<AngularFieldDefinition>} fieldDef - The field definition to convert
|
|
111
|
-
* @param {ViewContainerRef} vcr - The view container reference for component creation
|
|
112
|
-
* @param {Injector} injector - The Angular injector for dependency injection
|
|
113
|
-
* @param {TemplateRef<any>} tpl - The template reference for content projection
|
|
114
|
-
* @param {string} registryFormId - Form identifier for the component renderer
|
|
115
|
-
* @return {AngularDynamicOutput} The Angular component output with component reference and inputs
|
|
116
|
-
*
|
|
117
|
-
* @mermaid
|
|
118
|
-
* sequenceDiagram
|
|
119
|
-
* participant Method as fromFieldDefinition
|
|
120
|
-
* participant Components as NgxRenderingEngine.components
|
|
121
|
-
* participant Angular as Angular Core
|
|
122
|
-
* participant Process as processChild
|
|
123
|
-
*
|
|
124
|
-
* Method->>Components: components(fieldDef.tag)
|
|
125
|
-
* Components-->>Method: component constructor
|
|
126
|
-
* Method->>Angular: reflectComponentType(component)
|
|
127
|
-
* Angular-->>Method: componentMetadata
|
|
128
|
-
* Method->>Method: Validate input properties
|
|
129
|
-
* Method->>Method: Create result object
|
|
130
|
-
* alt Has children
|
|
131
|
-
* Method->>Process: Process children recursively
|
|
132
|
-
* Process->>Method: Return processed children
|
|
133
|
-
* Method->>Angular: Create embedded view
|
|
134
|
-
* Method->>Method: Create component instance
|
|
135
|
-
* end
|
|
136
|
-
* Method-->>Caller: return AngularDynamicOutput
|
|
137
|
-
*/
|
|
138
|
-
private fromFieldDefinition;
|
|
139
|
-
/**
|
|
140
|
-
* @description Creates an Angular component instance
|
|
141
|
-
* @summary This static utility method creates an Angular component instance with the specified
|
|
142
|
-
* inputs and template. It uses Angular's component creation API to instantiate the component
|
|
143
|
-
* and then sets the input properties using the provided metadata.
|
|
144
|
-
*
|
|
145
|
-
* @param {Type<unknown>} component - The component type to create
|
|
146
|
-
* @param {KeyValue} [inputs={}] - The input properties to set on the component
|
|
147
|
-
* @param {ComponentMirror<unknown>} metadata - The component metadata for input validation
|
|
148
|
-
* @param {ViewContainerRef} vcr - The view container reference for component creation
|
|
149
|
-
* @param {Injector} injector - The Angular injector for dependency injection
|
|
150
|
-
* @param {Node[]} [template=[]] - The template nodes to project into the component
|
|
151
|
-
* @return {ComponentRef<unknown>} The created component reference
|
|
152
|
-
*/
|
|
153
|
-
static createComponent(component: Type<unknown>, inputs: KeyValue | undefined, metadata: ComponentMirror<unknown>, vcr: ViewContainerRef, injector: Injector, template?: Node[]): ComponentRef<unknown>;
|
|
154
|
-
/**
|
|
155
|
-
* @description Extracts decorator metadata from a model
|
|
156
|
-
* @summary This method provides access to the field definition generated from a model's
|
|
157
|
-
* decorators. It's a convenience wrapper around the toFieldDefinition method that
|
|
158
|
-
* converts a model to a field definition based on its decorators and the provided
|
|
159
|
-
* global properties.
|
|
160
|
-
*
|
|
161
|
-
* @param {Model} model - The model to extract decorators from
|
|
162
|
-
* @param {Record<string, unknown>} globalProps - Global properties to include in the field definition
|
|
163
|
-
* @return {FieldDefinition<AngularFieldDefinition>} The field definition generated from the model
|
|
164
|
-
*/
|
|
165
|
-
getDecorators(model: Model, globalProps: Record<string, unknown>): FieldDefinition<AngularFieldDefinition>;
|
|
166
|
-
/**
|
|
167
|
-
* @description Destroys the current engine instance
|
|
168
|
-
* @summary This static method clears the current instance reference, effectively
|
|
169
|
-
* destroying the singleton instance of the rendering engine. This can be used
|
|
170
|
-
* to reset the engine state or to prepare for a new instance creation.
|
|
171
|
-
*
|
|
172
|
-
* @return {Promise<void>} A promise that resolves when the instance is destroyed
|
|
173
|
-
*/
|
|
174
|
-
static destroy(formId?: string): Promise<void>;
|
|
175
|
-
/**
|
|
176
|
-
* @description Renders a model into an Angular component output
|
|
177
|
-
* @summary This method takes a model and converts it to an Angular component output.
|
|
178
|
-
* It first stores a reference to the model, then converts it to a field definition
|
|
179
|
-
* using the base RenderingEngine's toFieldDefinition method, and finally converts
|
|
180
|
-
* that field definition to an Angular component output using fromFieldDefinition.
|
|
181
|
-
*
|
|
182
|
-
* @template M - Type extending Model
|
|
183
|
-
* @param {M} model - The model to render
|
|
184
|
-
* @param {Record<string, unknown>} globalProps - Global properties to pass to the component
|
|
185
|
-
* @param {ViewContainerRef} vcr - The view container reference for component creation
|
|
186
|
-
* @param {Injector} injector - The Angular injector for dependency injection
|
|
187
|
-
* @param {TemplateRef<any>} tpl - The template reference for content projection
|
|
188
|
-
* @return {AngularDynamicOutput} The Angular component output with component reference and inputs
|
|
189
|
-
*
|
|
190
|
-
* @mermaid
|
|
191
|
-
* sequenceDiagram
|
|
192
|
-
* participant Client as Client Code
|
|
193
|
-
* participant Render as render method
|
|
194
|
-
* participant ToField as toFieldDefinition
|
|
195
|
-
* participant FromField as fromFieldDefinition
|
|
196
|
-
*
|
|
197
|
-
* Client->>Render: render(model, globalProps, vcr, injector, tpl)
|
|
198
|
-
* Render->>Render: Store model reference
|
|
199
|
-
* Render->>ToField: toFieldDefinition(model, globalProps)
|
|
200
|
-
* ToField-->>Render: fieldDef
|
|
201
|
-
* Render->>FromField: fromFieldDefinition(fieldDef, vcr, injector, tpl)
|
|
202
|
-
* FromField-->>Render: AngularDynamicOutput
|
|
203
|
-
* Render-->>Client: return AngularDynamicOutput
|
|
204
|
-
*/
|
|
205
|
-
render<M extends Model>(model: M, globalProps: Record<string, unknown>, vcr: ViewContainerRef, injector: Injector, tpl: TemplateRef<unknown>, projectable?: boolean): AngularDynamicOutput;
|
|
206
|
-
/**
|
|
207
|
-
* @description Initializes the rendering engine
|
|
208
|
-
* @summary This method initializes the rendering engine. It checks if the engine is already initialized
|
|
209
|
-
* and sets the initialized flag to true. This method is called before the engine is used
|
|
210
|
-
* to ensure it's properly set up for rendering operations.
|
|
211
|
-
*
|
|
212
|
-
* @return {Promise<void>} A promise that resolves when initialization is complete
|
|
213
|
-
*/
|
|
214
|
-
initialize(): Promise<void>;
|
|
215
|
-
/**
|
|
216
|
-
* @description Registers a component with the rendering engine
|
|
217
|
-
* @summary This static method registers a component constructor with the rendering engine
|
|
218
|
-
* under a specific name. It initializes the components registry if needed and throws
|
|
219
|
-
* an error if a component is already registered under the same name to prevent
|
|
220
|
-
* accidental overrides.
|
|
221
|
-
*
|
|
222
|
-
* @param {string} name - The name to register the component under
|
|
223
|
-
* @param {Constructor<unknown>} constructor - The component constructor
|
|
224
|
-
* @return {void}
|
|
225
|
-
*/
|
|
226
|
-
static registerComponent(name: string, constructor: Constructor<unknown>): void;
|
|
227
|
-
/**
|
|
228
|
-
* @description Retrieves registered components from the rendering engine
|
|
229
|
-
* @summary This static method retrieves either all registered components or a specific component
|
|
230
|
-
* by its selector. When called without a selector, it returns an array of all registered
|
|
231
|
-
* components. When called with a selector, it returns the specific component if found,
|
|
232
|
-
* or throws an error if the component is not registered.
|
|
233
|
-
*
|
|
234
|
-
* @param {string} [selector] - Optional selector to retrieve a specific component
|
|
235
|
-
* @return {Object|Array} Either a specific component or an array of all components
|
|
236
|
-
*/
|
|
237
|
-
static components(selector?: string): object | string[];
|
|
238
|
-
/**
|
|
239
|
-
* @description Generates a key for reflection metadata
|
|
240
|
-
* @summary This static method generates a key for reflection metadata by prefixing the input key
|
|
241
|
-
* with the Angular engine's reflection prefix. This is used for storing and retrieving
|
|
242
|
-
* metadata in a namespaced way to avoid conflicts with other metadata.
|
|
243
|
-
*
|
|
244
|
-
* @param {string} key - The base key to prefix
|
|
245
|
-
* @return {string} The prefixed key for reflection metadata
|
|
246
|
-
*/
|
|
247
|
-
static key(key: string): string;
|
|
248
|
-
/**
|
|
249
|
-
* @description Sets input properties on a component instance
|
|
250
|
-
* @summary This static utility method sets input properties on a component instance
|
|
251
|
-
* based on the provided inputs object and component metadata. It handles both simple
|
|
252
|
-
* values and nested objects, recursively processing object properties. The method
|
|
253
|
-
* validates each input against the component's metadata to ensure only valid inputs
|
|
254
|
-
* are set.
|
|
255
|
-
*
|
|
256
|
-
* @param {ComponentRef<unknown>} component - The component reference to set inputs on
|
|
257
|
-
* @param {KeyValue} inputs - The input properties to set
|
|
258
|
-
* @param {ComponentMirror<unknown>} metadata - The component metadata for input validation
|
|
259
|
-
* @return {void}
|
|
260
|
-
*
|
|
261
|
-
* @mermaid
|
|
262
|
-
* sequenceDiagram
|
|
263
|
-
* participant Caller
|
|
264
|
-
* participant SetInputs as setInputs
|
|
265
|
-
* participant Parse as parseInputValue
|
|
266
|
-
* participant Component as ComponentRef
|
|
267
|
-
*
|
|
268
|
-
* Caller->>SetInputs: setInputs(component, inputs, metadata)
|
|
269
|
-
* SetInputs->>SetInputs: Iterate through inputs
|
|
270
|
-
* loop For each input
|
|
271
|
-
* SetInputs->>SetInputs: Check if input exists in metadata
|
|
272
|
-
* alt Input is 'props'
|
|
273
|
-
* SetInputs->>Parse: parseInputValue(component, value)
|
|
274
|
-
* Parse->>Parse: Recursively process nested objects
|
|
275
|
-
* Parse->>Component: setInput(key, value)
|
|
276
|
-
* else Input is valid
|
|
277
|
-
* SetInputs->>Component: setInput(key, value)
|
|
278
|
-
* end
|
|
279
|
-
* end
|
|
280
|
-
*/
|
|
281
|
-
static setInputs(component: ComponentRef<unknown>, inputs: KeyValue, metadata: ComponentMirror<unknown>): void;
|
|
282
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { PathProxy } from '@decaf-ts/decorator-validation';
|
|
3
|
-
import { FieldProperties } from '@decaf-ts/ui-decorators';
|
|
4
|
-
export declare class ValidatorFactory {
|
|
5
|
-
static spawn(fieldProps: FieldProperties, key: string): ValidatorFn;
|
|
6
|
-
/**
|
|
7
|
-
* @summary Creates a proxy wrapper for an Angular AbstractControl to assist with custom validation logic.
|
|
8
|
-
* @description Returns a structured proxy object that simulates a hierarchical tree of form values.
|
|
9
|
-
* Enables Validators handling method to access parent and child properties using consistent dot-notation in Angular forms.
|
|
10
|
-
*
|
|
11
|
-
* @param {AbstractControl} control - The control to wrap in a proxy.
|
|
12
|
-
* @returns {PathProxy<unknown>} A proxy object exposing form values and enabling recursive parent access.
|
|
13
|
-
*/
|
|
14
|
-
static createProxy(control: AbstractControl): PathProxy<unknown>;
|
|
15
|
-
}
|
package/engine/constants.d.ts
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Angular engine key constants
|
|
3
|
-
* @summary Contains key strings used by the Angular rendering engine for reflection,
|
|
4
|
-
* dynamic component creation, and other engine operations.
|
|
5
|
-
* @typedef {Object} AngularEngineKeys
|
|
6
|
-
* @property {string} REFLECT - Prefix for reflection metadata keys
|
|
7
|
-
* @property {string} DYNAMIC - Key for dynamic component identification
|
|
8
|
-
* @property {string} ANNOTATIONS - Key for component annotations
|
|
9
|
-
* @property {string} ECMP - Key for embedded components
|
|
10
|
-
* @property {string} NG_REFLECT - Prefix for Angular reflection attributes
|
|
11
|
-
* @property {string} RENDERED - Prefix for rendered component markers
|
|
12
|
-
* @property {string} MAPPER - Key for property mappers
|
|
13
|
-
* @property {string} CHILDREN - Key for child components
|
|
14
|
-
* @property {string} LISTABLE - Key for listable components
|
|
15
|
-
* @property {string} RENDER - Key for renderable components
|
|
16
|
-
* @property {string} RENDERED_ID - Template for rendered component IDs
|
|
17
|
-
* @property {string} PARENT - Key for comparison decorators and validators
|
|
18
|
-
* @const AngularEngineKeys
|
|
19
|
-
* @memberOf module:engine
|
|
20
|
-
*/
|
|
21
|
-
export declare const AngularEngineKeys: {
|
|
22
|
-
REFLECT: string;
|
|
23
|
-
DYNAMIC: string;
|
|
24
|
-
ANNOTATIONS: string;
|
|
25
|
-
ECMP: string;
|
|
26
|
-
NG_REFLECT: string;
|
|
27
|
-
RENDERED: string;
|
|
28
|
-
MAPPER: string;
|
|
29
|
-
CHILDREN: string;
|
|
30
|
-
LISTABLE: string;
|
|
31
|
-
RENDER: string;
|
|
32
|
-
RENDERED_ID: string;
|
|
33
|
-
PARENT: string;
|
|
34
|
-
VALIDATION_PARENT_KEY: symbol;
|
|
35
|
-
FORM_GROUP_COMPONENT_PROPS: string;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* @description Form validation state constants
|
|
39
|
-
* @summary Contains constants representing the possible validation states of a form.
|
|
40
|
-
* These are used to check and handle form validation throughout the application.
|
|
41
|
-
* @typedef {Object} FormConstants
|
|
42
|
-
* @property {string} VALID - Constant representing a valid form state
|
|
43
|
-
* @property {string} INVALID - Constant representing an invalid form state
|
|
44
|
-
* @const FormConstants
|
|
45
|
-
* @memberOf module:engine
|
|
46
|
-
*/
|
|
47
|
-
export declare const FormConstants: {
|
|
48
|
-
VALID: string;
|
|
49
|
-
INVALID: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* @description Event name constants
|
|
53
|
-
* @summary Enum containing constants for event names used throughout the application.
|
|
54
|
-
* These are used to standardize event naming and handling.
|
|
55
|
-
* @enum {string}
|
|
56
|
-
* @readonly
|
|
57
|
-
* @property {string} BACK_BUTTON_NAVIGATION - Event fired when back button navigation ends
|
|
58
|
-
* @property {string} REFRESH_EVENT - Event fired when a refresh action occurs
|
|
59
|
-
* @property {string} CLICK_EVENT - Event fired when a click action occurs
|
|
60
|
-
* @property {string} SUBMIT_EVENT - Event fired when a form submission occurs
|
|
61
|
-
* @memberOf module:engine
|
|
62
|
-
*/
|
|
63
|
-
export declare const EventConstants: {
|
|
64
|
-
BACK_BUTTON_NAVIGATION: string;
|
|
65
|
-
REFRESH: string;
|
|
66
|
-
CLICK: string;
|
|
67
|
-
SUBMIT: string;
|
|
68
|
-
VALIDATION_ERROR: string;
|
|
69
|
-
FIELDSET_ADD_GROUP: string;
|
|
70
|
-
FIELDSET_UPDATE_GROUP: string;
|
|
71
|
-
FIELDSET_REMOVE_GROUP: string;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* @description Logger level constants
|
|
75
|
-
* @summary Enum defining the logging levels used in the application's logging system.
|
|
76
|
-
* Lower values represent more verbose logging, while higher values represent more critical logs.
|
|
77
|
-
* @enum {number}
|
|
78
|
-
* @readonly
|
|
79
|
-
* @property {number} ALL - Log everything (most verbose)
|
|
80
|
-
* @property {number} DEBUG - Log debug information
|
|
81
|
-
* @property {number} INFO - Log informational messages
|
|
82
|
-
* @property {number} WARN - Log warnings
|
|
83
|
-
* @property {number} ERROR - Log errors
|
|
84
|
-
* @property {number} CRITICAL - Log critical errors (least verbose)
|
|
85
|
-
* @memberOf module:engine
|
|
86
|
-
*/
|
|
87
|
-
export declare enum LoggerLevels {
|
|
88
|
-
ALL = 0,
|
|
89
|
-
DEBUG = 1,
|
|
90
|
-
INFO = 2,
|
|
91
|
-
WARN = 3,
|
|
92
|
-
ERROR = 4,
|
|
93
|
-
CRITICAL = 5
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* @description Route direction constants
|
|
97
|
-
* @summary Enum defining the possible navigation directions in the application.
|
|
98
|
-
* Used for controlling navigation flow and animation directions.
|
|
99
|
-
* @enum {string}
|
|
100
|
-
* @readonly
|
|
101
|
-
* @property {string} BACK - Navigate back to the previous page
|
|
102
|
-
* @property {string} FORWARD - Navigate forward to the next page
|
|
103
|
-
* @property {string} ROOT - Navigate to the root/home page
|
|
104
|
-
* @memberOf module:engine
|
|
105
|
-
*/
|
|
106
|
-
export declare enum RouteDirections {
|
|
107
|
-
BACK = "back",
|
|
108
|
-
FORWARD = "forward",
|
|
109
|
-
ROOT = "root"
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* @description Component tag name constants
|
|
113
|
-
* @summary Enum defining the tag names for custom components used in the application.
|
|
114
|
-
* These tag names are used for component registration and rendering.
|
|
115
|
-
* @enum {string}
|
|
116
|
-
* @readonly
|
|
117
|
-
* @property {string} LIST_ITEM - Tag name for list item component
|
|
118
|
-
* @property {string} LIST_INFINITE - Tag name for infinite scrolling list component
|
|
119
|
-
* @property {string} LIST_PAGINATED - Tag name for paginated list component
|
|
120
|
-
* @memberOf module:engine
|
|
121
|
-
*/
|
|
122
|
-
export declare enum ComponentsTagNames {
|
|
123
|
-
LIST_ITEM = "ngx-decaf-list-item",
|
|
124
|
-
LIST_INFINITE = "ngx-decaf-list-infinite",
|
|
125
|
-
LIST_PAGINATED = "ngx-decaf-list-paginated"
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* @description Base component property name constants
|
|
129
|
-
* @summary Enum defining the standard property names used by base components in the application.
|
|
130
|
-
* These property names are used for consistent property access across components.
|
|
131
|
-
* @enum {string}
|
|
132
|
-
* @readonly
|
|
133
|
-
* @property {string} MODEL - Property name for the component's data model
|
|
134
|
-
* @property {string} LOCALE - Property name for localization settings
|
|
135
|
-
* @property {string} PK - Property name for primary key
|
|
136
|
-
* @property {string} ITEMS - Property name for collection items
|
|
137
|
-
* @property {string} ROUTE - Property name for routing information
|
|
138
|
-
* @property {string} OPERATIONS - Property name for available operations
|
|
139
|
-
* @property {string} UID - Property name for unique identifier
|
|
140
|
-
* @property {string} TRANSLATABLE - Property name for translation flag
|
|
141
|
-
* @property {string} MAPPER - Property name for property mapper
|
|
142
|
-
* @property {string} INITIALIZED - Property name for initialization state
|
|
143
|
-
* @memberOf module:engine
|
|
144
|
-
*/
|
|
145
|
-
export declare enum BaseComponentProps {
|
|
146
|
-
MODEL = "model",
|
|
147
|
-
LOCALE = "locale",
|
|
148
|
-
PK = "pk",
|
|
149
|
-
ITEMS = "items",
|
|
150
|
-
ROUTE = "route",
|
|
151
|
-
OPERATIONS = "operations",
|
|
152
|
-
UID = "uid",
|
|
153
|
-
TRANSLATABLE = "translatable",
|
|
154
|
-
MAPPER = "mapper",
|
|
155
|
-
INITIALIZED = "initialized"
|
|
156
|
-
}
|
|
157
|
-
export declare enum ListComponentsTypes {
|
|
158
|
-
INFINITE = "infinite",
|
|
159
|
-
PAGINATED = "paginated"
|
|
160
|
-
}
|
|
161
|
-
export interface IListEmptyResult {
|
|
162
|
-
title: string;
|
|
163
|
-
subtitle: string;
|
|
164
|
-
showButton: boolean;
|
|
165
|
-
buttonText: string;
|
|
166
|
-
link: string;
|
|
167
|
-
icon: string;
|
|
168
|
-
}
|
package/engine/decorators.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Marks an Angular component as dynamically loadable
|
|
3
|
-
* @summary Decorator that registers an Angular component with the NgxRenderingEngine for dynamic loading.
|
|
4
|
-
* This decorator must be applied before the @Component decorator to properly extract component metadata.
|
|
5
|
-
* It adds metadata to the component class and registers it with the rendering engine using its selector.
|
|
6
|
-
* @function Dynamic
|
|
7
|
-
* @return {Function} A decorator function that can be applied to Angular component classes
|
|
8
|
-
* @mermaid
|
|
9
|
-
* sequenceDiagram
|
|
10
|
-
* participant C as Component Class
|
|
11
|
-
* participant D as Dynamic Decorator
|
|
12
|
-
* participant R as NgxRenderingEngine
|
|
13
|
-
* participant M as Angular Metadata
|
|
14
|
-
* C->>D: Apply decorator
|
|
15
|
-
* D->>M: reflectComponentType()
|
|
16
|
-
* M-->>D: Return component metadata
|
|
17
|
-
* alt No metadata found
|
|
18
|
-
* D->>D: Throw InternalError
|
|
19
|
-
* else Metadata found
|
|
20
|
-
* D->>R: registerComponent(selector, constructor)
|
|
21
|
-
* D->>C: Apply metadata
|
|
22
|
-
* end
|
|
23
|
-
* @category Decorators
|
|
24
|
-
*/
|
|
25
|
-
export declare function Dynamic(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
|
package/engine/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module engine
|
|
3
|
-
* @description Angular rendering engine for Decaf applications
|
|
4
|
-
* @summary The engine module provides core functionality for rendering Angular components
|
|
5
|
-
* in Decaf applications. It includes constants, decorators, rendering engines, and utility types
|
|
6
|
-
* that enable dynamic component creation, property mapping, and component lifecycle management.
|
|
7
|
-
* Key exports include {@link NgxRenderingEngine}, {@link DynamicModule}, and various decorators
|
|
8
|
-
* for component configuration.
|
|
9
|
-
*/
|
|
10
|
-
export * from './constants';
|
|
11
|
-
export * from './decorators';
|
|
12
|
-
export * from './types';
|
|
13
|
-
export * from './interfaces';
|
|
14
|
-
export * from './DynamicModule';
|
|
15
|
-
export * from './NgxRenderingEngine';
|
|
16
|
-
export * from './NgxBaseComponent';
|
|
17
|
-
export * from './NgxCrudFormField';
|
|
18
|
-
export * from './NgxFormService';
|