@decaf-ts/for-angular 0.0.11 → 0.0.13
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/package.json +19 -91
- package/LICENSE.md +0 -659
- package/dist/lib/README.md +0 -92
- package/dist/lib/assets/i18n/en.json +0 -140
- package/dist/lib/assets/images/angular-logo.svg +0 -45
- package/dist/lib/assets/images/decaf-logo-black.svg +0 -22
- package/dist/lib/assets/images/decaf-logo-lw.svg +0 -50
- package/dist/lib/assets/images/decaf-logo-white.svg +0 -22
- package/dist/lib/assets/images/decaf-logo.svg +0 -54
- package/dist/lib/components/component-renderer/component-renderer.component.d.ts +0 -276
- package/dist/lib/components/crud-field/crud-field.component.d.ts +0 -445
- package/dist/lib/components/crud-form/constants.d.ts +0 -5
- package/dist/lib/components/crud-form/crud-form.component.d.ts +0 -102
- package/dist/lib/components/crud-form/types.d.ts +0 -17
- package/dist/lib/components/empty-state/empty-state.component.d.ts +0 -301
- package/dist/lib/components/fieldset/fieldset.component.d.ts +0 -199
- package/dist/lib/components/filter/filter.component.d.ts +0 -505
- package/dist/lib/components/for-angular-components.module.d.ts +0 -20
- package/dist/lib/components/index.d.ts +0 -16
- package/dist/lib/components/layout/layout.component.d.ts +0 -133
- package/dist/lib/components/list/constants.d.ts +0 -29
- package/dist/lib/components/list/list.component.d.ts +0 -849
- package/dist/lib/components/list-item/list-item.component.d.ts +0 -390
- package/dist/lib/components/model-renderer/model-renderer.component.d.ts +0 -96
- package/dist/lib/components/pagination/constants.d.ts +0 -7
- package/dist/lib/components/pagination/pagination.component.d.ts +0 -264
- package/dist/lib/components/searchbar/searchbar.component.d.ts +0 -407
- package/dist/lib/directives/collapsable.directive.d.ts +0 -8
- package/dist/lib/directives/index.d.ts +0 -1
- package/dist/lib/engine/DynamicModule.d.ts +0 -17
- package/dist/lib/engine/NgxBaseComponent.d.ts +0 -541
- package/dist/lib/engine/NgxCrudFormField.d.ts +0 -118
- package/dist/lib/engine/NgxFormService.d.ts +0 -167
- package/dist/lib/engine/NgxRenderingEngine.d.ts +0 -127
- package/dist/lib/engine/NgxRenderingEngine2.d.ts +0 -250
- package/dist/lib/engine/ValidatorFactory.d.ts +0 -15
- package/dist/lib/engine/constants.d.ts +0 -151
- package/dist/lib/engine/decorators.d.ts +0 -25
- package/dist/lib/engine/index.d.ts +0 -16
- package/dist/lib/engine/types.d.ts +0 -381
- package/dist/lib/esm2022/components/component-renderer/component-renderer.component.mjs +0 -313
- package/dist/lib/esm2022/components/crud-field/crud-field.component.mjs +0 -301
- package/dist/lib/esm2022/components/crud-form/constants.mjs +0 -14
- package/dist/lib/esm2022/components/crud-form/crud-form.component.mjs +0 -139
- package/dist/lib/esm2022/components/crud-form/types.mjs +0 -2
- package/dist/lib/esm2022/components/empty-state/empty-state.component.mjs +0 -348
- package/dist/lib/esm2022/components/fieldset/fieldset.component.mjs +0 -225
- package/dist/lib/esm2022/components/filter/filter.component.mjs +0 -689
- package/dist/lib/esm2022/components/for-angular-components.module.mjs +0 -71
- package/dist/lib/esm2022/components/index.mjs +0 -20
- package/dist/lib/esm2022/components/layout/layout.component.mjs +0 -176
- package/dist/lib/esm2022/components/list/constants.mjs +0 -6
- package/dist/lib/esm2022/components/list/list.component.mjs +0 -1236
- package/dist/lib/esm2022/components/list-item/list-item.component.mjs +0 -408
- package/dist/lib/esm2022/components/model-renderer/model-renderer.component.mjs +0 -138
- package/dist/lib/esm2022/components/pagination/constants.mjs +0 -2
- package/dist/lib/esm2022/components/pagination/pagination.component.mjs +0 -323
- package/dist/lib/esm2022/components/searchbar/searchbar.component.mjs +0 -493
- package/dist/lib/esm2022/decaf-ts-for-angular.mjs +0 -5
- package/dist/lib/esm2022/directives/collapsable.directive.mjs +0 -28
- package/dist/lib/esm2022/directives/index.mjs +0 -2
- package/dist/lib/esm2022/engine/DynamicModule.mjs +0 -18
- package/dist/lib/esm2022/engine/NgxBaseComponent.mjs +0 -539
- package/dist/lib/esm2022/engine/NgxCrudFormField.mjs +0 -125
- package/dist/lib/esm2022/engine/NgxFormService.mjs +0 -315
- package/dist/lib/esm2022/engine/NgxRenderingEngine.mjs +0 -192
- package/dist/lib/esm2022/engine/NgxRenderingEngine2.mjs +0 -332
- package/dist/lib/esm2022/engine/ValidatorFactory.mjs +0 -102
- package/dist/lib/esm2022/engine/constants.mjs +0 -160
- package/dist/lib/esm2022/engine/decorators.mjs +0 -38
- package/dist/lib/esm2022/engine/index.mjs +0 -17
- package/dist/lib/esm2022/engine/types.mjs +0 -4
- package/dist/lib/esm2022/for-angular.module.mjs +0 -118
- package/dist/lib/esm2022/helpers/index.mjs +0 -13
- package/dist/lib/esm2022/helpers/utils.mjs +0 -415
- package/dist/lib/esm2022/interfaces.mjs +0 -2
- package/dist/lib/esm2022/public-apis.mjs +0 -14
- package/dist/lib/fesm2022/decaf-ts-for-angular.mjs +0 -7109
- package/dist/lib/fesm2022/decaf-ts-for-angular.mjs.map +0 -1
- package/dist/lib/for-angular.module.d.ts +0 -45
- package/dist/lib/helpers/index.d.ts +0 -12
- package/dist/lib/helpers/utils.d.ts +0 -253
- package/dist/lib/index.d.ts +0 -5
- package/dist/lib/interfaces.d.ts +0 -28
- package/dist/lib/public-apis.d.ts +0 -13
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { Logger } from '@decaf-ts/logging';
|
|
3
|
-
import { FunctionLike } from './engine';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@ionic/angular/standalone";
|
|
6
|
-
import * as i2 from "@angular/common";
|
|
7
|
-
import * as i3 from "@angular/forms";
|
|
8
|
-
import * as i4 from "@ngx-translate/core";
|
|
9
|
-
export declare function getLogger(instance: string | FunctionLike | unknown): Logger;
|
|
10
|
-
/**
|
|
11
|
-
* @description Main Angular module for the Decaf framework
|
|
12
|
-
* @summary The ForAngularModule provides the core functionality for integrating Decaf with Angular applications.
|
|
13
|
-
* It imports and exports common Angular and Ionic components and modules needed for Decaf applications,
|
|
14
|
-
* including form handling, translation support, and Ionic UI components. This module can be imported
|
|
15
|
-
* directly or via the forRoot() method for proper initialization in the application's root module.
|
|
16
|
-
*
|
|
17
|
-
* @class ForAngularModule
|
|
18
|
-
* @example
|
|
19
|
-
* ```typescript
|
|
20
|
-
* // In your app module:
|
|
21
|
-
* @NgModule({
|
|
22
|
-
* imports: [
|
|
23
|
-
* ForAngularModule.forRoot(),
|
|
24
|
-
* // other imports
|
|
25
|
-
* ],
|
|
26
|
-
* // ...
|
|
27
|
-
* })
|
|
28
|
-
* export class AppModule {}
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export declare class ForAngularModule {
|
|
32
|
-
/**
|
|
33
|
-
* @description Creates a module with providers for root module import
|
|
34
|
-
* @summary This static method provides the proper way to import the ForAngularModule in the application's
|
|
35
|
-
* root module. It returns a ModuleWithProviders object that includes the ForAngularModule itself.
|
|
36
|
-
* Using forRoot() ensures that the module and its providers are properly initialized and only
|
|
37
|
-
* instantiated once in the application.
|
|
38
|
-
*
|
|
39
|
-
* @return {ModuleWithProviders<ForAngularModule>} The module with its providers
|
|
40
|
-
*/
|
|
41
|
-
static forRoot(): ModuleWithProviders<ForAngularModule>;
|
|
42
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ForAngularModule, never>;
|
|
43
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ForAngularModule, never, [typeof i1.IonApp, typeof i1.IonRouterOutlet, typeof i1.IonSplitPane, typeof i1.IonImg, typeof i1.IonText, typeof i1.IonTitle, typeof i1.IonButton, typeof i1.IonRouterLink, typeof i1.IonContent, typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.TranslateModule, typeof i4.TranslatePipe], [typeof i1.IonApp, typeof i1.IonRouterOutlet, typeof i1.IonSplitPane, typeof i1.IonImg, typeof i1.IonText, typeof i1.IonTitle, typeof i1.IonButton, typeof i1.IonRouterLink, typeof i1.IonContent, typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.TranslateModule, typeof i4.TranslatePipe]>;
|
|
44
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularModule>;
|
|
45
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module helpers
|
|
3
|
-
* @description Utility helpers for Angular Decaf applications
|
|
4
|
-
* @summary The helpers module provides a collection of utility functions and types
|
|
5
|
-
* that assist with common tasks in Decaf Angular applications. It includes functions
|
|
6
|
-
* for array manipulation, date formatting, logging, string operations, and various
|
|
7
|
-
* utility functions for working with Angular components and services. These helpers
|
|
8
|
-
* simplify common operations and promote code reuse across the application.
|
|
9
|
-
* Key exports include logging utilities, string manipulation functions, and component
|
|
10
|
-
* utility functions.
|
|
11
|
-
*/
|
|
12
|
-
export * from './utils';
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import { InjectablesRegistry } from '@decaf-ts/injectable-decorators';
|
|
2
|
-
import { KeyValue, StringOrBoolean } from '../engine/types';
|
|
3
|
-
import { FunctionLike } from '../engine/types';
|
|
4
|
-
/**
|
|
5
|
-
* @description Retrieves the singleton instance of the injectables registry
|
|
6
|
-
* @summary This function implements the singleton pattern for the InjectablesRegistry.
|
|
7
|
-
* It returns the existing registry instance if one exists, or creates a new instance
|
|
8
|
-
* if none exists. The registry is used to store and retrieve injectable dependencies
|
|
9
|
-
* throughout the application.
|
|
10
|
-
*
|
|
11
|
-
* @return {InjectablesRegistry} The singleton injectables registry instance
|
|
12
|
-
*
|
|
13
|
-
* @function getInjectablesRegistry
|
|
14
|
-
* @memberOf module:for-angular
|
|
15
|
-
*/
|
|
16
|
-
export declare function getInjectablesRegistry(): InjectablesRegistry;
|
|
17
|
-
/**
|
|
18
|
-
* @description Determines if the application is running in development mode
|
|
19
|
-
* @summary This function checks whether the application is currently running in a development
|
|
20
|
-
* environment. It uses Angular's isDevMode() function and also checks the window context
|
|
21
|
-
* and hostname against the provided context parameter. This is useful for enabling
|
|
22
|
-
* development-specific features or logging.
|
|
23
|
-
*
|
|
24
|
-
* @param {string} [context='localhost'] - The context string to check against the current environment
|
|
25
|
-
* @return {boolean} True if the application is running in development mode, false otherwise
|
|
26
|
-
*
|
|
27
|
-
* @function isDevelopmentMode
|
|
28
|
-
* @memberOf module:for-angular
|
|
29
|
-
*/
|
|
30
|
-
export declare function isDevelopmentMode(context?: string): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* @description Dispatches a custom event to the document window
|
|
33
|
-
* @summary This function creates and dispatches a custom event to the browser window.
|
|
34
|
-
* It's useful for cross-component communication or for triggering application-wide events.
|
|
35
|
-
* The function allows specifying the event name, detail data, and additional event properties.
|
|
36
|
-
*
|
|
37
|
-
* @param {string} name - The name of the custom event to dispatch
|
|
38
|
-
* @param {unknown} detail - The data to include in the event's detail property
|
|
39
|
-
* @param {object} [props] - Optional additional properties for the custom event
|
|
40
|
-
* @return {void}
|
|
41
|
-
*
|
|
42
|
-
* @function windowEventEmitter
|
|
43
|
-
* @memberOf module:for-angular
|
|
44
|
-
*/
|
|
45
|
-
export declare function windowEventEmitter(name: string, detail: unknown, props?: object): void;
|
|
46
|
-
/**
|
|
47
|
-
* @description Retrieves a property from the window's document object
|
|
48
|
-
* @summary This function provides a safe way to access properties on the window's document object.
|
|
49
|
-
* It uses the getWindowDocument function to get a reference to the document, then accesses
|
|
50
|
-
* the specified property. This is useful for browser environment interactions that need
|
|
51
|
-
* to access document properties.
|
|
52
|
-
*
|
|
53
|
-
* @param {string} key - The name of the property to retrieve from the document object
|
|
54
|
-
* @return {any} The value of the specified property, or undefined if the document or property doesn't exist
|
|
55
|
-
*
|
|
56
|
-
* @function getOnWindowDocument
|
|
57
|
-
* @memberOf module:for-angular
|
|
58
|
-
*/
|
|
59
|
-
export declare function getOnWindowDocument(key: string): Document | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* @description Retrieves the document object from the window
|
|
62
|
-
* @summary This function provides a safe way to access the document object from the window.
|
|
63
|
-
* It uses the getOnWindow function to retrieve the 'document' property from the window object.
|
|
64
|
-
* This is useful for browser environment interactions that need access to the document.
|
|
65
|
-
*
|
|
66
|
-
* @return {Document | undefined} The window's document object, or undefined if it doesn't exist
|
|
67
|
-
*
|
|
68
|
-
* @function getWindowDocument
|
|
69
|
-
* @memberOf module:for-angular
|
|
70
|
-
*/
|
|
71
|
-
export declare function getWindowDocument(): Document | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* @description Retrieves a property from the window object
|
|
74
|
-
* @summary This function provides a safe way to access properties on the window object.
|
|
75
|
-
* It uses the getWindow function to get a reference to the window, then accesses
|
|
76
|
-
* the specified property. This is useful for browser environment interactions that need
|
|
77
|
-
* to access window properties or APIs.
|
|
78
|
-
*
|
|
79
|
-
* @param {string} key - The name of the property to retrieve from the window object
|
|
80
|
-
* @return {unknown | undefined} The value of the specified property, or undefined if the window or property doesn't exist
|
|
81
|
-
*
|
|
82
|
-
* @function getOnWindow
|
|
83
|
-
* @memberOf module:for-angular
|
|
84
|
-
*/
|
|
85
|
-
export declare function getOnWindow(key: string): unknown | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* @description Sets a property on the window object
|
|
88
|
-
* @summary This function provides a way to set properties on the window object.
|
|
89
|
-
* It uses the getWindow function to get a reference to the window, then sets
|
|
90
|
-
* the specified property to the provided value. This is useful for storing
|
|
91
|
-
* global data or functions that need to be accessible across the application.
|
|
92
|
-
*
|
|
93
|
-
* @param {string} key - The name of the property to set on the window object
|
|
94
|
-
* @param {any} value - The value to assign to the property
|
|
95
|
-
* @return {void}
|
|
96
|
-
*
|
|
97
|
-
* @function setOnWindow
|
|
98
|
-
* @memberOf module:for-angular
|
|
99
|
-
*/
|
|
100
|
-
export declare function setOnWindow(key: string, value: unknown): void;
|
|
101
|
-
/**
|
|
102
|
-
* @description Retrieves the global window object
|
|
103
|
-
* @summary This function provides a safe way to access the global window object.
|
|
104
|
-
* It uses globalThis to ensure compatibility across different JavaScript environments.
|
|
105
|
-
* This is the core function used by other window-related utility functions to
|
|
106
|
-
* access the window object.
|
|
107
|
-
*
|
|
108
|
-
* @return {Window} The global window object
|
|
109
|
-
*
|
|
110
|
-
* @function getWindow
|
|
111
|
-
* @memberOf module:for-angular
|
|
112
|
-
*/
|
|
113
|
-
export declare function getWindow(): Window & KeyValue;
|
|
114
|
-
/**
|
|
115
|
-
* @description Retrieves the width of the browser window
|
|
116
|
-
* @summary This function provides a convenient way to get the current width of the browser window.
|
|
117
|
-
* It uses the getOnWindow function to access the 'innerWidth' property of the window object.
|
|
118
|
-
* This is useful for responsive design implementations and viewport-based calculations.
|
|
119
|
-
*
|
|
120
|
-
* @return {number | undefined} The current width of the browser window in pixels
|
|
121
|
-
*
|
|
122
|
-
* @function getWindowWidth
|
|
123
|
-
* @memberOf module:for-angular
|
|
124
|
-
*/
|
|
125
|
-
export declare function getWindowWidth(): number;
|
|
126
|
-
/**
|
|
127
|
-
* @description Checks if a value is not undefined
|
|
128
|
-
* @summary This utility function determines whether a given value is not undefined.
|
|
129
|
-
* It's a simple wrapper that makes code more readable when checking for defined values.
|
|
130
|
-
* The function is particularly useful for checking StringOrBoolean properties that might be undefined.
|
|
131
|
-
*
|
|
132
|
-
* @param {StringOrBoolean | undefined} prop - The property to check
|
|
133
|
-
* @return {boolean} True if the property is not undefined, false otherwise
|
|
134
|
-
*
|
|
135
|
-
* @function isNotUndefined
|
|
136
|
-
* @memberOf module:for-angular
|
|
137
|
-
*/
|
|
138
|
-
export declare function isNotUndefined(prop: StringOrBoolean | undefined): boolean;
|
|
139
|
-
/**
|
|
140
|
-
* @description Generates a locale string from a class name or instance
|
|
141
|
-
* @summary This utility function converts a class name or instance into a locale string
|
|
142
|
-
* that can be used for internationalization purposes. It handles different input types
|
|
143
|
-
* (string, function, or object) and applies formatting rules to generate a consistent
|
|
144
|
-
* locale identifier. For short names (less than 3 parts), it reverses the dot-separated
|
|
145
|
-
* string. For longer names, it uses the last part as a prefix and joins the rest with
|
|
146
|
-
* underscores.
|
|
147
|
-
*
|
|
148
|
-
* @param {string|FunctionLike|object} instance - The input to generate the locale from (class name, constructor, or instance)
|
|
149
|
-
* @param {string} [suffix] - Optional string to append to the instance name before processing
|
|
150
|
-
* @return {string} A formatted locale string derived from the input
|
|
151
|
-
*
|
|
152
|
-
* @function getLocaleFromClassName
|
|
153
|
-
* @memberOf module:for-angular
|
|
154
|
-
*/
|
|
155
|
-
export declare function getLocaleFromClassName(instance: string | FunctionLike | object, suffix?: string): string;
|
|
156
|
-
/**
|
|
157
|
-
* @description Generates a localized string by combining locale and phrase
|
|
158
|
-
* @summary This utility function creates a properly formatted locale string by combining
|
|
159
|
-
* a locale identifier with a phrase. It handles edge cases such as empty phrases,
|
|
160
|
-
* missing locales, and phrases that already include the locale prefix. This function
|
|
161
|
-
* is useful for ensuring consistent formatting of localized strings throughout the application.
|
|
162
|
-
*
|
|
163
|
-
* @param {string} locale - The locale identifier (e.g., 'en', 'fr')
|
|
164
|
-
* @param {string | undefined} phrase - The phrase to localize
|
|
165
|
-
* @return {string} The formatted locale string, or empty string if phrase is undefined
|
|
166
|
-
*
|
|
167
|
-
* @function generateLocaleFromString
|
|
168
|
-
* @memberOf module:for-angular
|
|
169
|
-
*/
|
|
170
|
-
export declare function generateLocaleFromString(locale: string, phrase: string | undefined): string;
|
|
171
|
-
/**
|
|
172
|
-
* @description Retrieves the current locale language
|
|
173
|
-
* @summary This utility function gets the current locale language based on the user's browser settings.
|
|
174
|
-
* It provides a consistent way to access the user's language preference throughout the application.
|
|
175
|
-
* The function returns the browser's navigator.language value, defaulting to 'en' if not available.
|
|
176
|
-
*
|
|
177
|
-
* @return {string} The current locale language (e.g., 'en', 'fr')
|
|
178
|
-
*
|
|
179
|
-
* @function getLocaleLanguage
|
|
180
|
-
* @memberOf module:for-angular
|
|
181
|
-
*/
|
|
182
|
-
export declare function getLocaleLanguage(): string;
|
|
183
|
-
/**
|
|
184
|
-
* @description Generates a random string or number of specified length
|
|
185
|
-
* @summary This utility function creates a random string of a specified length.
|
|
186
|
-
* It can generate either alphanumeric strings (including uppercase and lowercase letters)
|
|
187
|
-
* or numeric-only strings. This is useful for creating random IDs, temporary passwords,
|
|
188
|
-
* or other random identifiers throughout the application.
|
|
189
|
-
*
|
|
190
|
-
* @param {number} [length=8] - The length of the random value to generate
|
|
191
|
-
* @param {boolean} [onlyNumbers=false] - Whether to generate only numeric characters
|
|
192
|
-
* @return {string} A randomly generated string of the specified length and character set
|
|
193
|
-
*
|
|
194
|
-
* @function generateRandomValue
|
|
195
|
-
* @memberOf module:for-angular
|
|
196
|
-
*/
|
|
197
|
-
export declare function generateRandomValue(length?: number, onlyNumbers?: boolean): string;
|
|
198
|
-
/**
|
|
199
|
-
* Converts a string representation of a boolean or a boolean value to a boolean type.
|
|
200
|
-
*
|
|
201
|
-
* @export
|
|
202
|
-
* @param {('true' | 'false' | boolean)} prop - The value to convert. Can be the string 'true', 'false', or a boolean.
|
|
203
|
-
* @returns {boolean} The boolean representation of the input value. Returns true if the input is the string 'true' or boolean true, false otherwise.
|
|
204
|
-
*/
|
|
205
|
-
export declare function stringToBoolean(prop: 'true' | 'false' | boolean): boolean;
|
|
206
|
-
/**
|
|
207
|
-
* Checks if a value is a valid Date object
|
|
208
|
-
*
|
|
209
|
-
* @param {(string | Date | number)} date - The value to check. Can be a Date object, a timestamp number, or a date string
|
|
210
|
-
* @return {boolean} Returns true if the value is a valid Date object (not NaN), otherwise false
|
|
211
|
-
*/
|
|
212
|
-
export declare function isValidDate(date: string | Date | number): boolean;
|
|
213
|
-
/**
|
|
214
|
-
* Formats a date into a localized string representation
|
|
215
|
-
*
|
|
216
|
-
* @param {(string | Date | number)} date - The date to format. Can be a Date object, a timestamp number, or a date string
|
|
217
|
-
* @param {string} [locale] - The locale to use for formatting. If not provided, the system's locale will be used
|
|
218
|
-
* @return {(Date | string)} A formatted date string in the format DD/MM/YYYY according to the specified locale,
|
|
219
|
-
* or the original input as a string if the date is invalid
|
|
220
|
-
*/
|
|
221
|
-
export declare function formatDate(date: string | Date | number, locale?: string | undefined): Date | string;
|
|
222
|
-
/**
|
|
223
|
-
* Attempts to parse a date string, Date object, or number into a valid Date object
|
|
224
|
-
*
|
|
225
|
-
* @param {(string | Date | number)} date - The date to parse. Can be a Date object, a timestamp number,
|
|
226
|
-
* or a date string in the format "DD/MM/YYYY HH:MM:SS:MS"
|
|
227
|
-
* @return {(Date | null)} A valid Date object if parsing is successful, or null if the date is invalid
|
|
228
|
-
* or doesn't match the expected format
|
|
229
|
-
*/
|
|
230
|
-
export declare function parseToValidDate(date: string | Date | number): Date | null;
|
|
231
|
-
/**
|
|
232
|
-
* Maps an item object using a provided mapper object and optional additional properties.
|
|
233
|
-
*
|
|
234
|
-
* @param {KeyValue} item - The source object to be mapped.
|
|
235
|
-
* @param {KeyValue} mapper - An object that defines the mapping rules. Keys represent the new property names,
|
|
236
|
-
* and values represent the path to the corresponding values in the source object.
|
|
237
|
-
* @param {KeyValue} [props] - Optional additional properties to be included in the mapped object.
|
|
238
|
-
* @returns {KeyValue} A new object with properties mapped according to the mapper object and including any additional properties.
|
|
239
|
-
*/
|
|
240
|
-
export declare function itemMapper(item: KeyValue, mapper: KeyValue, props?: KeyValue): KeyValue;
|
|
241
|
-
/**
|
|
242
|
-
* Maps an array of data objects using a provided mapper object.
|
|
243
|
-
*
|
|
244
|
-
* @template T - The type of the resulting mapped items.
|
|
245
|
-
* @param {any[]} data - The array of data objects to be mapped.
|
|
246
|
-
* @param {KeyValue} mapper - An object that defines the mapping rules.
|
|
247
|
-
* @param {KeyValue} [props] - Additional properties to be included in the mapped items.
|
|
248
|
-
*
|
|
249
|
-
* @returns {T[]} - The array of mapped items. If an item in the original array does not have any non-null values after mapping,
|
|
250
|
-
* the original item is returned instead.
|
|
251
|
-
*/
|
|
252
|
-
export declare function dataMapper<T>(data: T[], mapper: KeyValue, props?: KeyValue): T[];
|
|
253
|
-
export declare function removeFocusTrap(): void;
|
package/dist/lib/index.d.ts
DELETED
package/dist/lib/interfaces.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { FormGroup } from '@angular/forms';
|
|
2
|
-
import { ElementRef } from '@angular/core';
|
|
3
|
-
/**
|
|
4
|
-
* @description Interface for components that hold an ElementRef
|
|
5
|
-
* @summary Defines a component holder interface that provides access to the underlying DOM element through ElementRef
|
|
6
|
-
* @interface ComponentHolder
|
|
7
|
-
* @memberOf module:for-angular
|
|
8
|
-
*/
|
|
9
|
-
export interface ComponentHolder {
|
|
10
|
-
/**
|
|
11
|
-
* @description Reference to the component's DOM element
|
|
12
|
-
* @property {ElementRef} component - The ElementRef instance providing access to the native DOM element
|
|
13
|
-
*/
|
|
14
|
-
component: ElementRef;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @description Interface for form components that hold both an ElementRef and a FormGroup
|
|
18
|
-
* @summary Extends ComponentHolder to include a FormGroup for form handling capabilities
|
|
19
|
-
* @interface FormElement
|
|
20
|
-
* @memberOf module:for-angular
|
|
21
|
-
*/
|
|
22
|
-
export interface FormElement extends ComponentHolder {
|
|
23
|
-
/**
|
|
24
|
-
* @description The Angular FormGroup associated with this form element
|
|
25
|
-
* @property {FormGroup|undefined} formGroup - The form group instance for managing form controls and validation
|
|
26
|
-
*/
|
|
27
|
-
formGroup: FormGroup | undefined;
|
|
28
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import '@decaf-ts/ui-decorators';
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from './engine';
|
|
4
|
-
export * from './directives';
|
|
5
|
-
export * from './helpers';
|
|
6
|
-
export * from './for-angular.module';
|
|
7
|
-
/**
|
|
8
|
-
* @description Angular integration for the Decaf framework
|
|
9
|
-
* @summary This module provides Angular components and services for integrating with the Decaf framework.
|
|
10
|
-
* It includes components for rendering models, CRUD operations, and form handling, as well as
|
|
11
|
-
* rendering engines and utility functions to facilitate Angular application development with Decaf.
|
|
12
|
-
* @module for-angular
|
|
13
|
-
*/
|