@decaf-ts/for-angular 0.1.17 → 0.1.20
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 +473 -141
- package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
- package/index.d.ts +511 -189
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Type, Injector, ElementRef, EnvironmentInjector, InjectionToken, OnChanges, OnDestroy, WritableSignal, ChangeDetectorRef, Renderer2, EventEmitter, SimpleChanges, EnvironmentProviders, Provider, AfterViewInit, ViewContainerRef, TemplateRef, OnInit, ComponentMirror, ComponentRef,
|
|
2
|
+
import { Type, Injector, ElementRef, EnvironmentInjector, InjectionToken, OnChanges, OnDestroy, WritableSignal, ChangeDetectorRef, Renderer2, EventEmitter, SimpleChanges, EnvironmentProviders, Provider, AfterViewInit, ViewContainerRef, TemplateRef, OnInit, PipeTransform, ComponentMirror, ComponentRef, ModuleWithProviders } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { FormGroup, FormControl, FormArray, ControlValueAccessor, AbstractControl } from '@angular/forms';
|
|
5
5
|
import { OrderDirection, AttributeOption, Observer, Condition, Paginator, Repository, Adapter } from '@decaf-ts/core';
|
|
@@ -18,7 +18,7 @@ import { OverlayBaseController } from '@ionic/angular/common';
|
|
|
18
18
|
import { HttpClient } from '@angular/common/http';
|
|
19
19
|
import { Observable, Subject, Subscription } from 'rxjs';
|
|
20
20
|
import * as i3 from '@ngx-translate/core';
|
|
21
|
-
import { InterpolationParameters, Translation, InterpolatableTranslationObject, Language,
|
|
21
|
+
import { InterpolationParameters, Translation, InterpolatableTranslationObject, Language, TranslateLoader, TranslationObject, TranslateParser, RootTranslateServiceConfig, TranslateService } from '@ngx-translate/core';
|
|
22
22
|
import { Title, SafeHtml, DomSanitizer } from '@angular/platform-browser';
|
|
23
23
|
import { sf, Logger, LoggedClass } from '@decaf-ts/logging';
|
|
24
24
|
import { NavigationOptions } from '@ionic/angular/common/providers/nav-controller';
|
|
@@ -485,6 +485,28 @@ interface ILayoutModelContext {
|
|
|
485
485
|
};
|
|
486
486
|
models: IRepositoryModelProps<Model>[];
|
|
487
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* @description Configuration object for the {@link DecafTooltipDirective} directive.
|
|
490
|
+
* @summary Defines the shape of the options accepted by the `[ngx-decaf-tooltip]` attribute
|
|
491
|
+
* selector. Controls the tooltip text content, whether visible text should be truncated,
|
|
492
|
+
* the character limit for truncation, and the trailing string appended after a cut.
|
|
493
|
+
* @property {string} text - The full text to display inside the tooltip and, when truncated,
|
|
494
|
+
* the source for the truncated visible content.
|
|
495
|
+
* @property {boolean} [truncate] - When `true`, the host element's inner text is replaced with
|
|
496
|
+
* a truncated version. Defaults to `false`.
|
|
497
|
+
* @property {number} [limit] - Maximum number of characters before truncation occurs.
|
|
498
|
+
* Defaults to `30`.
|
|
499
|
+
* @property {string} [trail] - String appended at the end of the truncated text.
|
|
500
|
+
* Defaults to `'...'`.
|
|
501
|
+
* @interface TooltipConfig
|
|
502
|
+
* @memberOf module:DecafTooltipDirective
|
|
503
|
+
*/
|
|
504
|
+
interface ITooltipConfig {
|
|
505
|
+
text: string;
|
|
506
|
+
truncate?: boolean;
|
|
507
|
+
limit?: number;
|
|
508
|
+
trail?: string;
|
|
509
|
+
}
|
|
488
510
|
|
|
489
511
|
declare const DB_ADAPTER_FLAVOUR_TOKEN = "DbAdapterFlavour";
|
|
490
512
|
/**
|
|
@@ -1009,7 +1031,7 @@ declare class NgxMediaService {
|
|
|
1009
1031
|
declare class NgxTranslateService extends DecafTranslateService implements DecafTranslateService {
|
|
1010
1032
|
private translateService;
|
|
1011
1033
|
instant(key: string, interpolateParams?: InterpolationParameters): Translation;
|
|
1012
|
-
translate(key: string, params?: InterpolationParameters):
|
|
1034
|
+
translate(key: string, params?: InterpolationParameters | string): Promise<string>;
|
|
1013
1035
|
get(key: string | string[], params?: InterpolationParameters | string): Promise<string>;
|
|
1014
1036
|
use(lang: string): void;
|
|
1015
1037
|
setFallbackLang(lang: string): Observable<InterpolatableTranslationObject>;
|
|
@@ -8592,29 +8614,165 @@ declare class NgxRouterService {
|
|
|
8592
8614
|
}
|
|
8593
8615
|
|
|
8594
8616
|
declare class TableComponent extends ListComponent implements OnInit {
|
|
8595
|
-
|
|
8617
|
+
/**
|
|
8618
|
+
* @description Maximum character count before cell content is truncated. `-1` disables truncation.
|
|
8619
|
+
* @type {number}
|
|
8620
|
+
* @default -1
|
|
8621
|
+
*/
|
|
8622
|
+
maxContentLength: number;
|
|
8623
|
+
/**
|
|
8624
|
+
* @description Column keys whose values are never truncated regardless of `maxContentLength`.
|
|
8625
|
+
* @type {string[]}
|
|
8626
|
+
* @default ['userId']
|
|
8627
|
+
*/
|
|
8628
|
+
preserve: string[];
|
|
8629
|
+
/**
|
|
8630
|
+
* @description Source used to populate filter select options: a model class, async function, or string key.
|
|
8631
|
+
* @type {Model | FunctionLike | string}
|
|
8632
|
+
*/
|
|
8633
|
+
filterModel: Model | FunctionLike | string;
|
|
8634
|
+
/**
|
|
8635
|
+
* @description Array of {@link SelectOption} objects displayed in the filter select control.
|
|
8636
|
+
* @type {SelectOption[]}
|
|
8637
|
+
*/
|
|
8596
8638
|
filterOptions: SelectOption[];
|
|
8639
|
+
/**
|
|
8640
|
+
* @description Translatable label rendered on the filter select input.
|
|
8641
|
+
* @type {string}
|
|
8642
|
+
*/
|
|
8597
8643
|
filterLabel: string;
|
|
8644
|
+
/**
|
|
8645
|
+
* @description Custom function that maps a repository item to a {@link SelectOption} shape.
|
|
8646
|
+
* @type {FunctionLike}
|
|
8647
|
+
*/
|
|
8598
8648
|
filterOptionsMapper: FunctionLike;
|
|
8649
|
+
/**
|
|
8650
|
+
* @description Currently selected filter value; `undefined` when no filter is active.
|
|
8651
|
+
* @type {string | undefined}
|
|
8652
|
+
*/
|
|
8599
8653
|
filterValue?: string;
|
|
8654
|
+
/**
|
|
8655
|
+
* @description Ordered array of column keys rendered as table columns. Includes `'actions'` when operations are permitted.
|
|
8656
|
+
* @type {string[]}
|
|
8657
|
+
*/
|
|
8600
8658
|
cols: string[];
|
|
8659
|
+
/**
|
|
8660
|
+
* @description Column header label array, mirrors `cols` after `getOperations()` resolves.
|
|
8661
|
+
* @type {string[]}
|
|
8662
|
+
*/
|
|
8601
8663
|
headers: string[];
|
|
8664
|
+
/**
|
|
8665
|
+
* @description When `true`, row-level action buttons are rendered if the user has the required permissions.
|
|
8666
|
+
* @type {boolean}
|
|
8667
|
+
* @default true
|
|
8668
|
+
*/
|
|
8602
8669
|
allowOperations: boolean;
|
|
8670
|
+
/**
|
|
8671
|
+
* @description Injected {@link NgxRouterService} used to read URL query parameters for pre-populating the search state.
|
|
8672
|
+
* @type {NgxRouterService}
|
|
8673
|
+
*/
|
|
8603
8674
|
routerService: NgxRouterService;
|
|
8675
|
+
/**
|
|
8676
|
+
* @description Resolves and sorts the visible column keys from the current mapper metadata.
|
|
8677
|
+
* @summary Reads `this._mapper` to obtain all columns that carry a `sequence` property,
|
|
8678
|
+
* then sorts them so that columns anchored to `UIKeys.FIRST` appear first, numerically
|
|
8679
|
+
* sequenced columns are ordered by their value, and `UIKeys.LAST` anchored columns appear
|
|
8680
|
+
* last. Returns the final sorted array of column key strings.
|
|
8681
|
+
* @return {string[]} Sorted array of column keys derived from the mapper.
|
|
8682
|
+
* @mermaid
|
|
8683
|
+
* sequenceDiagram
|
|
8684
|
+
* participant TC as TableComponent
|
|
8685
|
+
* participant M as _mapper
|
|
8686
|
+
* TC->>M: Object.entries(_mapper)
|
|
8687
|
+
* M-->>TC: [key, value][] entries
|
|
8688
|
+
* TC->>TC: sort by sequence weight (FIRST=0, number=1, LAST=100)
|
|
8689
|
+
* TC-->>TC: return sorted keys[]
|
|
8690
|
+
*/
|
|
8604
8691
|
private get _cols();
|
|
8692
|
+
/**
|
|
8693
|
+
* @description Returns the column header labels derived directly from the resolved `cols` array.
|
|
8694
|
+
* @return {string[]} Shallow copy of `cols` used as table header labels.
|
|
8695
|
+
*/
|
|
8605
8696
|
private get _headers();
|
|
8697
|
+
/**
|
|
8698
|
+
* @description Filters the raw mapper to only the entries that declare a `sequence` property.
|
|
8699
|
+
* @summary Iterates over `this.mapper`, retains only keys whose value is a plain object
|
|
8700
|
+
* containing a `sequence` field, and returns the resulting subset as a {@link KeyValue} map
|
|
8701
|
+
* used by `_cols` for ordered column resolution.
|
|
8702
|
+
* @return {KeyValue} Filtered mapper containing only sequenced column definitions.
|
|
8703
|
+
*/
|
|
8606
8704
|
get _mapper(): KeyValue;
|
|
8705
|
+
/**
|
|
8706
|
+
* @description Angular lifecycle hook that initializes the table and loads its first page of data.
|
|
8707
|
+
* @summary Sets up the table by resolving columns, headers, and filter options. It also reads URL query parameters
|
|
8708
|
+
* to pre-populate the search state and triggers the initial data refresh.
|
|
8709
|
+
* @return {Promise<void>}
|
|
8710
|
+
*/
|
|
8607
8711
|
ngOnInit(): Promise<void>;
|
|
8712
|
+
/**
|
|
8713
|
+
* @description Determines which row-level CRUD operations are permitted and finalizes the column list.
|
|
8714
|
+
* @summary Checks user permissions for `UPDATE` and `DELETE` operations. Updates the `cols` and `headers` arrays accordingly.
|
|
8715
|
+
* @return {void}
|
|
8716
|
+
*/
|
|
8608
8717
|
getOperations(): void;
|
|
8718
|
+
/**
|
|
8719
|
+
* @description Populates `filterOptions` from a function call or a decorator-bound repository.
|
|
8720
|
+
* @summary Resolves filter options dynamically based on the provided `filterModel`. Supports both
|
|
8721
|
+
* async functions and repository-based data sources.
|
|
8722
|
+
* @return {Promise<void>}
|
|
8723
|
+
*/
|
|
8609
8724
|
protected getFilterOptions(): Promise<void>;
|
|
8725
|
+
/**
|
|
8726
|
+
* @description Maps a single raw data row to the cell-structured format expected by the table template.
|
|
8727
|
+
* @summary Applies transformations and event bindings to each row of data, preparing it for rendering.
|
|
8728
|
+
* @param {KeyValue} item - Raw data object representing a single table row.
|
|
8729
|
+
* @param {KeyValue} mapper - Column mapper definitions.
|
|
8730
|
+
* @param {KeyValue} [props={}] - Additional rendering props.
|
|
8731
|
+
* @return {Promise<KeyValue>} Mapped row object.
|
|
8732
|
+
*/
|
|
8610
8733
|
protected itemMapper(item: KeyValue, mapper: KeyValue, props?: KeyValue): Promise<KeyValue>;
|
|
8734
|
+
/**
|
|
8735
|
+
* @description Maps an array of raw data objects to the cell-structured rows used by the template.
|
|
8736
|
+
* @summary Resolves all rows concurrently via `Promise.all`, delegating each item to `itemMapper`.
|
|
8737
|
+
* @param {KeyValue[]} data - Raw row objects returned by the data source.
|
|
8738
|
+
* @return {Promise<KeyValue[]>} Array of structured row objects.
|
|
8739
|
+
*/
|
|
8611
8740
|
mapResults(data: KeyValue[]): Promise<KeyValue[]>;
|
|
8741
|
+
/**
|
|
8742
|
+
* @description Handles a CRUD action triggered by a row action button.
|
|
8743
|
+
* @summary Invokes a custom handler or navigates to the appropriate route for the given action.
|
|
8744
|
+
* @param {IBaseCustomEvent} event - The originating event.
|
|
8745
|
+
* @param {UIFunctionLike | undefined} handler - Optional custom handler.
|
|
8746
|
+
* @param {string} uid - Primary key value of the target row.
|
|
8747
|
+
* @param {CrudOperations} action - The CRUD operation type.
|
|
8748
|
+
* @return {Promise<void>}
|
|
8749
|
+
*/
|
|
8612
8750
|
handleAction(event: IBaseCustomEvent, handler: UIFunctionLike | undefined, uid: string, action: CrudOperations): Promise<void>;
|
|
8751
|
+
/**
|
|
8752
|
+
* @description Navigates to the CRUD action route for the specified row.
|
|
8753
|
+
* @summary Verifies the requested `action` and navigates to the appropriate route.
|
|
8754
|
+
* @param {Event | IBaseCustomEvent} event - The originating event.
|
|
8755
|
+
* @param {string} uid - Primary key value of the target row.
|
|
8756
|
+
* @param {CrudOperations} action - The CRUD operation to navigate to.
|
|
8757
|
+
* @return {Promise<void>}
|
|
8758
|
+
*/
|
|
8613
8759
|
handleRedirect(event: Event | IBaseCustomEvent, uid: string, action: CrudOperations): Promise<void>;
|
|
8760
|
+
/**
|
|
8761
|
+
* @description Opens the filter select UI, allowing the user to narrow table results by a field value.
|
|
8762
|
+
* @summary Determines the presentation mode and handles user selection.
|
|
8763
|
+
* @param {Event} event - The click event that triggered the filter open action.
|
|
8764
|
+
* @return {Promise<void>}
|
|
8765
|
+
*/
|
|
8614
8766
|
openFilterSelectOptions(event: Event): Promise<void>;
|
|
8767
|
+
/**
|
|
8768
|
+
* @description Clears the active filter selection and resets the table to an unfiltered state.
|
|
8769
|
+
* @summary Resets `filterValue` and reloads the full data set.
|
|
8770
|
+
* @param {CustomEvent} event - The clear event emitted by the filter select control.
|
|
8771
|
+
* @return {Promise<void>}
|
|
8772
|
+
*/
|
|
8615
8773
|
handleFilterSelectClear(event: CustomEvent): Promise<void>;
|
|
8616
8774
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
8617
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "ngx-decaf-table", never, { "filterModel": { "alias": "filterModel"; "required": false; }; "filterOptions": { "alias": "filterOptions"; "required": false; }; "filterLabel": { "alias": "filterLabel"; "required": false; }; "filterOptionsMapper": { "alias": "filterOptionsMapper"; "required": false; }; "allowOperations": { "alias": "allowOperations"; "required": false; }; }, {}, never, never, true, never>;
|
|
8775
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "ngx-decaf-table", never, { "maxContentLength": { "alias": "maxContentLength"; "required": false; }; "preserve": { "alias": "preserve"; "required": false; }; "filterModel": { "alias": "filterModel"; "required": false; }; "filterOptions": { "alias": "filterOptions"; "required": false; }; "filterLabel": { "alias": "filterLabel"; "required": false; }; "filterOptionsMapper": { "alias": "filterOptionsMapper"; "required": false; }; "allowOperations": { "alias": "allowOperations"; "required": false; }; }, {}, never, never, true, never>;
|
|
8618
8776
|
}
|
|
8619
8777
|
|
|
8620
8778
|
declare class ForAngularComponentsModule {
|
|
@@ -8623,6 +8781,151 @@ declare class ForAngularComponentsModule {
|
|
|
8623
8781
|
static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularComponentsModule>;
|
|
8624
8782
|
}
|
|
8625
8783
|
|
|
8784
|
+
/**
|
|
8785
|
+
* @module lib/directives/NgxSvgDirective
|
|
8786
|
+
* @description Standalone directive that inlines SVG assets into the host element.
|
|
8787
|
+
* @summary Provides {@link NgxSvgDirective}, a lightweight Angular directive that resolves
|
|
8788
|
+
* an SVG file path from either its input binding or the host element's `src` attribute and
|
|
8789
|
+
* delegates the HTTP fetch and DOM injection to {@link NgxMediaService}.
|
|
8790
|
+
* @link {@link NgxSvgDirective}
|
|
8791
|
+
*/
|
|
8792
|
+
|
|
8793
|
+
/**
|
|
8794
|
+
* @description Angular directive that fetches an SVG file and inlines it into the host element.
|
|
8795
|
+
* @summary Standalone directive bound to the `[ngx-decaf-svg]` attribute selector. On
|
|
8796
|
+
* initialisation it resolves the SVG asset path from the `[ngx-decaf-svg]` input binding or,
|
|
8797
|
+
* as a fallback, the host element's native `src` attribute. Once a non-empty path is determined
|
|
8798
|
+
* it calls {@link NgxMediaService.loadSvgObserver}, which performs the HTTP request via
|
|
8799
|
+
* {@link HttpClient} and injects the SVG markup directly into the host element's DOM, enabling
|
|
8800
|
+
* full CSS styling of the inlined SVG.
|
|
8801
|
+
* @class NgxSvgDirective
|
|
8802
|
+
* @implements {OnInit}
|
|
8803
|
+
* @example
|
|
8804
|
+
* ```html
|
|
8805
|
+
* <!-- Via directive binding -->
|
|
8806
|
+
* <div [ngx-decaf-svg]="'/assets/icons/logo.svg'"></div>
|
|
8807
|
+
*
|
|
8808
|
+
* <!-- Fallback to src attribute -->
|
|
8809
|
+
* <img ngx-decaf-svg src="/assets/icons/arrow.svg" />
|
|
8810
|
+
* ```
|
|
8811
|
+
*/
|
|
8812
|
+
declare class NgxSvgDirective implements OnInit {
|
|
8813
|
+
/**
|
|
8814
|
+
* @description URL or asset path to the SVG file to inline.
|
|
8815
|
+
* @summary Bound via the `[ngx-decaf-svg]` attribute. When empty or not provided, the
|
|
8816
|
+
* directive falls back to reading the host element's native `src` attribute during
|
|
8817
|
+
* `ngOnInit`.
|
|
8818
|
+
* @type {string}
|
|
8819
|
+
* @memberOf module:lib/directives/NgxSvgDirective
|
|
8820
|
+
*/
|
|
8821
|
+
path: string;
|
|
8822
|
+
/**
|
|
8823
|
+
* @description Service responsible for fetching and inlining the SVG markup.
|
|
8824
|
+
* @summary Injected {@link NgxMediaService} instance used by `ngOnInit` to perform the
|
|
8825
|
+
* HTTP request and inject the resulting SVG markup into the host element's DOM.
|
|
8826
|
+
* @type {NgxMediaService}
|
|
8827
|
+
* @memberOf module:lib/directives/NgxSvgDirective
|
|
8828
|
+
*/
|
|
8829
|
+
mediaService: NgxMediaService;
|
|
8830
|
+
/**
|
|
8831
|
+
* @description Reference to the host DOM element into which the SVG will be injected.
|
|
8832
|
+
* @summary Obtained via Angular's `inject(ElementRef)`. Provides access to the native
|
|
8833
|
+
* element forwarded to {@link NgxMediaService.loadSvgObserver} as the injection target,
|
|
8834
|
+
* and used as a fallback source for the `src` attribute when `path` is not set.
|
|
8835
|
+
* @type {ElementRef}
|
|
8836
|
+
* @memberOf module:lib/directives/NgxSvgDirective
|
|
8837
|
+
*/
|
|
8838
|
+
element: ElementRef;
|
|
8839
|
+
/**
|
|
8840
|
+
* @description HTTP client instance forwarded to the media service for the SVG fetch.
|
|
8841
|
+
* @summary Injected {@link HttpClient} passed directly to
|
|
8842
|
+
* {@link NgxMediaService.loadSvgObserver} so the service can issue the GET request for
|
|
8843
|
+
* the SVG file without managing its own HTTP dependency.
|
|
8844
|
+
* @type {HttpClient}
|
|
8845
|
+
* @memberOf module:lib/directives/NgxSvgDirective
|
|
8846
|
+
*/
|
|
8847
|
+
http: HttpClient;
|
|
8848
|
+
/**
|
|
8849
|
+
* @description Resolves the SVG path and triggers the inline load.
|
|
8850
|
+
* @summary Trims `path` and, when empty, falls back to the host element's `src` attribute.
|
|
8851
|
+
* When a valid path is found, delegates to {@link NgxMediaService.loadSvgObserver} to
|
|
8852
|
+
* fetch the file and inject the SVG markup into the host element.
|
|
8853
|
+
* @returns {void}
|
|
8854
|
+
* @memberOf module:lib/directives/NgxSvgDirective
|
|
8855
|
+
*/
|
|
8856
|
+
ngOnInit(): void;
|
|
8857
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSvgDirective, never>;
|
|
8858
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxSvgDirective, "[ngx-decaf-svg]", never, { "path": { "alias": "ngx-decaf-svg"; "required": false; }; }, {}, never, never, true, never>;
|
|
8859
|
+
}
|
|
8860
|
+
|
|
8861
|
+
declare class DecafTruncatePipe implements PipeTransform {
|
|
8862
|
+
transform(value: string, limit?: number, trail?: string): string;
|
|
8863
|
+
sanitize(value: string): string;
|
|
8864
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecafTruncatePipe, never>;
|
|
8865
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DecafTruncatePipe, "truncate", true>;
|
|
8866
|
+
}
|
|
8867
|
+
|
|
8868
|
+
/**
|
|
8869
|
+
* @module DecafTooltipDirective
|
|
8870
|
+
* @description Provides a tooltip directive for the decaf-ts for-angular library.
|
|
8871
|
+
* @summary This module defines the {@link DecafTooltipDirective}, a standalone Angular directive
|
|
8872
|
+
* that dynamically appends a tooltip element to any host element it decorates. It also supports
|
|
8873
|
+
* optional text truncation using the {@link DecafTruncatePipe}.
|
|
8874
|
+
*/
|
|
8875
|
+
|
|
8876
|
+
/**
|
|
8877
|
+
* @description Angular directive that appends a tooltip `<span>` to the host element and
|
|
8878
|
+
* optionally truncates its visible text content.
|
|
8879
|
+
* @summary The `DecafTooltipDirective` is a standalone Angular directive bound to the
|
|
8880
|
+
* `[ngx-decaf-tooltip]` attribute selector. It processes the {@link TooltipConfig} provided
|
|
8881
|
+
* via the `options` input, sanitizes the text, and appends a `.dcf-tooltip` `<span>` containing
|
|
8882
|
+
* the sanitized full text to the host element. The directive also applies the `dcf-tooltip-parent`
|
|
8883
|
+
* CSS class to the host for tooltip positioning. When truncation is enabled, the host element's
|
|
8884
|
+
* inner content is replaced with the truncated text before the tooltip span is added.
|
|
8885
|
+
* @example
|
|
8886
|
+
* ```html
|
|
8887
|
+
* <!-- Basic tooltip -->
|
|
8888
|
+
* <span [ngx-decaf-tooltip]="{ text: 'Full description here' }">Hover me</span>
|
|
8889
|
+
*
|
|
8890
|
+
* <!-- Truncated visible text with tooltip showing the full content -->
|
|
8891
|
+
* <span [ngx-decaf-tooltip]="{ text: veryLongLabel, truncate: true, limit: 20, trail: '…' }">
|
|
8892
|
+
* {{ veryLongLabel }}
|
|
8893
|
+
* </span>
|
|
8894
|
+
* ```
|
|
8895
|
+
* @class DecafTooltipDirective
|
|
8896
|
+
*/
|
|
8897
|
+
/**
|
|
8898
|
+
* @description Angular lifecycle hook invoked whenever one or more input properties change.
|
|
8899
|
+
* @summary Processes the {@link ITooltipConfig} options, sanitizes the text, and updates the
|
|
8900
|
+
* host element's content and tooltip span accordingly. Applies the `dcf-tooltip-parent` CSS class
|
|
8901
|
+
* to the host for styling.
|
|
8902
|
+
* @return {void}
|
|
8903
|
+
*/
|
|
8904
|
+
declare class DecafTooltipDirective implements OnChanges {
|
|
8905
|
+
options: ITooltipConfig;
|
|
8906
|
+
/**
|
|
8907
|
+
* @description Reference to the host DOM element into which the SVG will be injected.
|
|
8908
|
+
* @summary Obtained via Angular's `inject(ElementRef)`. Provides access to the native
|
|
8909
|
+
* element forwarded to {@link NgxMediaService.loadSvgObserver} as the injection target,
|
|
8910
|
+
* and used as a fallback source for the `src` attribute when `path` is not set.
|
|
8911
|
+
* @type {ElementRef}
|
|
8912
|
+
* @memberOf module:lib/directives/NgxSvgDirective
|
|
8913
|
+
*/
|
|
8914
|
+
element: ElementRef;
|
|
8915
|
+
renderer: Renderer2;
|
|
8916
|
+
truncatePipe: DecafTruncatePipe;
|
|
8917
|
+
/**
|
|
8918
|
+
* @description Angular lifecycle hook invoked whenever one or more input properties change.
|
|
8919
|
+
* @summary Processes the {@link TooltipConfig} options, sanitizes the text, and updates the
|
|
8920
|
+
* host element's content and tooltip span accordingly. Applies the `dcf-tooltip-parent` CSS class
|
|
8921
|
+
* to the host for styling.
|
|
8922
|
+
* @return {void}
|
|
8923
|
+
*/
|
|
8924
|
+
ngOnChanges(): void;
|
|
8925
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecafTooltipDirective, never>;
|
|
8926
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DecafTooltipDirective, "[ngx-decaf-tooltip]", never, { "options": { "alias": "ngx-decaf-tooltip"; "required": false; }; }, {}, never, never, true, never>;
|
|
8927
|
+
}
|
|
8928
|
+
|
|
8626
8929
|
declare function getDbAdapterFlavour(): string;
|
|
8627
8930
|
/**
|
|
8628
8931
|
* @description Provides an array of component types for dynamic rendering.
|
|
@@ -9468,6 +9771,8 @@ declare class NgxFormService {
|
|
|
9468
9771
|
* @static
|
|
9469
9772
|
*/
|
|
9470
9773
|
static getFormData(formGroup: FormGroup): Record<string, unknown>;
|
|
9774
|
+
static getFormArrayControlsValue(formArray: FormArray): unknown;
|
|
9775
|
+
static controlHasValue(control: AbstractControl): boolean;
|
|
9471
9776
|
/**
|
|
9472
9777
|
* @description Validates fields in a form control or form group.
|
|
9473
9778
|
* @summary Recursively validates all fields in a form control or form group, marking them as touched and dirty.
|
|
@@ -9652,14 +9957,204 @@ declare abstract class NgxEventHandler extends DecafEventHandler {
|
|
|
9652
9957
|
afterUpdate(...args: unknown[]): Promise<any>;
|
|
9653
9958
|
}
|
|
9654
9959
|
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9960
|
+
/**
|
|
9961
|
+
* @module lib/for-angular-common.module
|
|
9962
|
+
* @description Core Angular module and providers for Decaf's for-angular package.
|
|
9963
|
+
* @summary Provides the shared Angular module, injection tokens and helper functions used
|
|
9964
|
+
* by the for-angular integration. This module wires up common imports (forms, translation)
|
|
9965
|
+
* and exposes helper providers such as DB adapter registration and logger utilities.
|
|
9966
|
+
* @link {@link ForAngularCommonModule}
|
|
9967
|
+
*/
|
|
9968
|
+
|
|
9969
|
+
/**
|
|
9970
|
+
* @description Main Angular module for the Decaf framework.
|
|
9971
|
+
* @summary The ForAngularCommonModule provides the core functionality for integrating Decaf with Angular applications.
|
|
9972
|
+
* It imports and exports common Angular and Ionic components and modules needed for Decaf applications,
|
|
9973
|
+
* including form handling, translation support, and Ionic UI components. This module can be imported
|
|
9974
|
+
* directly or via the forRoot() method for proper initialization in the application's root module.
|
|
9975
|
+
* @class ForAngularCommonModule
|
|
9976
|
+
* @memberOf module:lib/for-angular-common.module
|
|
9977
|
+
* @example
|
|
9978
|
+
* // In your app module:
|
|
9979
|
+
* @NgModule({
|
|
9980
|
+
* imports: [
|
|
9981
|
+
* ForAngularCommonModule.forRoot(),
|
|
9982
|
+
* // other imports
|
|
9983
|
+
* ],
|
|
9984
|
+
* // ...
|
|
9985
|
+
* })
|
|
9986
|
+
* export class AppModule {}
|
|
9987
|
+
*/
|
|
9988
|
+
declare class ForAngularCommonModule {
|
|
9989
|
+
/**
|
|
9990
|
+
* @description Creates a module with providers for root module import.
|
|
9991
|
+
* @summary This static method provides the proper way to import the ForAngularCommonModule in the application's
|
|
9992
|
+
* root module. It returns a ModuleWithProviders object that includes the ForAngularCommonModule itself.
|
|
9993
|
+
* Using forRoot() ensures that the module and its providers are properly initialized and only
|
|
9994
|
+
* instantiated once in the application.
|
|
9995
|
+
* @return {ModuleWithProviders<ForAngularCommonModule>} The module with its providers
|
|
9996
|
+
* @memberOf ForAngularCommonModule
|
|
9997
|
+
* @static
|
|
9998
|
+
* @example
|
|
9999
|
+
* // Import in root module
|
|
10000
|
+
* @NgModule({
|
|
10001
|
+
* imports: [ForAngularCommonModule.forRoot()],
|
|
10002
|
+
* // ...
|
|
10003
|
+
* })
|
|
10004
|
+
* export class AppModule {}
|
|
10005
|
+
*/
|
|
10006
|
+
static forRoot(): ModuleWithProviders<ForAngularCommonModule>;
|
|
10007
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ForAngularCommonModule, never>;
|
|
10008
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ForAngularCommonModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.TranslateModule, typeof i3.TranslatePipe], [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.TranslateModule, typeof i3.TranslatePipe]>;
|
|
10009
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularCommonModule>;
|
|
10010
|
+
}
|
|
10011
|
+
|
|
10012
|
+
/**
|
|
10013
|
+
* @module module:lib/i18n/Loader
|
|
10014
|
+
* @description Internationalization loader and helpers for the for-angular package.
|
|
10015
|
+
* @summary Provides an implementation of TranslateLoader (I18nLoader) and helper factories
|
|
10016
|
+
* to load translation resources. Also exposes locale utilities used by components to resolve
|
|
10017
|
+
* localized keys.
|
|
10018
|
+
*
|
|
10019
|
+
* @link {@link I18nLoader}
|
|
10020
|
+
*/
|
|
10021
|
+
|
|
10022
|
+
/**
|
|
10023
|
+
* @description Retrieves the locale context for a given class, object, or string.
|
|
10024
|
+
* @summary Resolves the locale context by extracting the class name or using the provided suffix.
|
|
10025
|
+
*
|
|
10026
|
+
* @param {FunctionLike | object | string} clazz - The class, object, or string to derive the locale context from.
|
|
10027
|
+
* @param {string} [suffix] - An optional suffix to append to the locale context.
|
|
10028
|
+
* @returns {string} - The resolved locale context string.
|
|
10029
|
+
*/
|
|
10030
|
+
declare function getLocaleContext(clazz: FunctionLike | object | string, suffix?: string): string;
|
|
10031
|
+
/**
|
|
10032
|
+
* @description Generates a localized string by combining locale and phrase
|
|
10033
|
+
* @summary This utility function creates a properly formatted locale string by combining
|
|
10034
|
+
* a locale identifier with a phrase. It handles edge cases such as empty phrases,
|
|
10035
|
+
* missing locales, and phrases that already include the locale prefix. This function
|
|
10036
|
+
* is useful for ensuring consistent formatting of localized strings throughout the application.
|
|
10037
|
+
*
|
|
10038
|
+
* @param {string} locale - The locale identifier (e.g., 'en', 'fr')
|
|
10039
|
+
* @param {string | undefined} phrase - The phrase to localize
|
|
10040
|
+
* @return {string} The formatted locale string, or empty string if phrase is undefined
|
|
10041
|
+
*
|
|
10042
|
+
* @function generateLocaleFromString
|
|
10043
|
+
* @memberOf module:for-angular
|
|
10044
|
+
*/
|
|
10045
|
+
declare function getLocaleContextByKey(locale: string, phrase: string | undefined): string;
|
|
10046
|
+
/**
|
|
10047
|
+
* @description Factory function for creating an instance of I18nLoader.
|
|
10048
|
+
* @summary Configures and returns an I18nLoader instance with the specified HTTP client and translation resources.
|
|
10049
|
+
*
|
|
10050
|
+
* @param {HttpClient} http - The HTTP client used to fetch translation resources.
|
|
10051
|
+
* @returns {TranslateLoader} - An instance of I18nLoader configured with the provided HTTP client and resources.
|
|
10052
|
+
*/
|
|
10053
|
+
declare function I18nLoaderFactory(http: HttpClient): TranslateLoader;
|
|
10054
|
+
/**
|
|
10055
|
+
* @description Provides the I18nLoader configuration.
|
|
10056
|
+
* @summary Configures the translation resources and versioned suffix for the I18nLoader.
|
|
10057
|
+
*
|
|
10058
|
+
* @param {I18nResourceConfigType} [resources=[]] - The translation resources to be used by the loader.
|
|
10059
|
+
* @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
|
|
10060
|
+
* @returns {object} - The configuration object for the I18nLoader.
|
|
10061
|
+
*/
|
|
10062
|
+
declare function provideDecafI18nLoader(resources?: I18nResourceConfigType, versionedSuffix?: boolean): {
|
|
10063
|
+
provide: typeof I18N_CONFIG_TOKEN;
|
|
10064
|
+
useValue: {
|
|
10065
|
+
resources: I18nResourceConfig[];
|
|
10066
|
+
versionedSuffix: boolean;
|
|
10067
|
+
};
|
|
10068
|
+
};
|
|
10069
|
+
/**
|
|
10070
|
+
* @description Custom implementation of TranslateLoader for loading translations.
|
|
10071
|
+
* @summary Fetches and merges translation resources, supporting versioned suffixes and recursive merging.
|
|
10072
|
+
*/
|
|
10073
|
+
declare class I18nLoader implements TranslateLoader {
|
|
10074
|
+
private http;
|
|
10075
|
+
private resources;
|
|
10076
|
+
private versionedSuffix;
|
|
10077
|
+
static enabled: boolean;
|
|
10078
|
+
static cache: Record<string, TranslationObject>;
|
|
10079
|
+
/**
|
|
10080
|
+
* @param {HttpClient} http - The HTTP client used to fetch translation resources.
|
|
10081
|
+
* @param {I18nResourceConfig[]} [resources=[]] - The translation resources to be loaded.
|
|
10082
|
+
* @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
|
|
10083
|
+
*/
|
|
10084
|
+
constructor(http: HttpClient, resources?: I18nResourceConfig[], versionedSuffix?: boolean);
|
|
10085
|
+
/**
|
|
10086
|
+
* @description Appends a versioned suffix to the resource URL if enabled.
|
|
10087
|
+
* @summary Generates a versioned suffix based on the current date.
|
|
10088
|
+
*
|
|
10089
|
+
* @param {string} suffix - The original suffix of the resource URL.
|
|
10090
|
+
* @returns {string} - The modified suffix with a version string appended.
|
|
10091
|
+
*/
|
|
10092
|
+
private getSuffix;
|
|
10093
|
+
/**
|
|
10094
|
+
* @description Fetches and merges translations for the specified language.
|
|
10095
|
+
* @summary Loads translation resources, merges them recursively, and includes library keys.
|
|
10096
|
+
*
|
|
10097
|
+
* @param {string} lang - The language code for the translations to load.
|
|
10098
|
+
* @returns {Observable<TranslationObject>} - An observable that emits the merged translation object.
|
|
10099
|
+
*/
|
|
10100
|
+
getTranslation(lang: string): Observable<TranslationObject>;
|
|
10101
|
+
}
|
|
10102
|
+
/**
|
|
10103
|
+
* @description Custom implementation of TranslateParser for interpolation.
|
|
10104
|
+
* @summary Extends TranslateParser to support string formatting with parameters.
|
|
10105
|
+
*/
|
|
10106
|
+
declare class I18nParser extends TranslateParser {
|
|
10107
|
+
/**
|
|
10108
|
+
* @description Interpolates a translation string with parameters.
|
|
10109
|
+
* @summary Replaces placeholders in the translation string with parameter values.
|
|
10110
|
+
*
|
|
10111
|
+
* @param {string} value - The translation string to interpolate.
|
|
10112
|
+
* @param {object | string} [params={}] - The parameters to replace placeholders with.
|
|
10113
|
+
* @returns {string} - The interpolated translation string.
|
|
10114
|
+
*/
|
|
10115
|
+
interpolate(value: string, params?: object | string): string;
|
|
10116
|
+
}
|
|
10117
|
+
/**
|
|
10118
|
+
* @description Provides the internationalization (i18n) configuration for the application.
|
|
10119
|
+
* @summary Configures the translation service with a fallback language, default language, custom parser, and loader.
|
|
10120
|
+
*
|
|
10121
|
+
* @param {RootTranslateServiceConfig} [config={fallbackLang: 'en', lang: 'en'}] - The configuration for the translation service, including fallback and default languages.
|
|
10122
|
+
* @param {I18nResourceConfigType} [resources=[]] - The translation resources to be used by the loader.
|
|
10123
|
+
* @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
|
|
10124
|
+
* @returns {AngularProvider[]} - An array of providers for the translation service and loader.
|
|
10125
|
+
*/
|
|
10126
|
+
declare function provideDecafI18nConfig(config?: RootTranslateServiceConfig, resources?: I18nResourceConfigType, versionedSuffix?: boolean, enabled?: boolean): AngularProvider[];
|
|
10127
|
+
|
|
10128
|
+
/**
|
|
10129
|
+
* @module DecafTranslatePipe
|
|
10130
|
+
* @description Angular pipe for translating text using the `@ngx-translate/core` library.
|
|
10131
|
+
* @summary The `DecafTranslatePipe` provides a mechanism to translate text keys into localized
|
|
10132
|
+
* strings based on the current language settings. It integrates with the `TranslateService`
|
|
10133
|
+
* to fetch translations dynamically and supports fallback rendering for untranslated keys.
|
|
10134
|
+
* @class DecafTranslatePipe
|
|
10135
|
+
* @implements {PipeTransform}
|
|
10136
|
+
*/
|
|
10137
|
+
declare class DecafTranslatePipe implements PipeTransform {
|
|
10138
|
+
/**
|
|
10139
|
+
* @description Injected instance of the `TranslateService` for handling translations.
|
|
10140
|
+
* @type {TranslateService}
|
|
10141
|
+
*/
|
|
10142
|
+
translate: TranslateService;
|
|
10143
|
+
/**
|
|
10144
|
+
* @description Transforms a text key into its localized string representation.
|
|
10145
|
+
* @summary Uses the `TranslateService` to fetch the translated string for the provided key.
|
|
10146
|
+
* If translations are disabled or the key is not found, it returns a fallback HTML-wrapped key.
|
|
10147
|
+
* @param {string} value - The translation key to be transformed.
|
|
10148
|
+
* @param {...any[]} args - Optional arguments to interpolate within the translation string.
|
|
10149
|
+
* @return {string} The translated string or a fallback HTML-wrapped key.
|
|
10150
|
+
* @example
|
|
10151
|
+
* ```html
|
|
10152
|
+
* {{ 'HELLO_WORLD' | translate }}
|
|
10153
|
+
* ```
|
|
10154
|
+
*/
|
|
10155
|
+
transform(value: string, ...args: []): string;
|
|
10156
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecafTranslatePipe, never>;
|
|
10157
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DecafTranslatePipe, "translate", true>;
|
|
9663
10158
|
}
|
|
9664
10159
|
|
|
9665
10160
|
/**
|
|
@@ -10004,6 +10499,7 @@ declare function filterString(original: string | string[], value: string, contai
|
|
|
10004
10499
|
* @returns {string} The icon associated with the menu item if found, otherwise an empty string.
|
|
10005
10500
|
*/
|
|
10006
10501
|
declare function getMenuIcon(label: string, menu: IMenuItem[]): string;
|
|
10502
|
+
declare function dateFromString(value: string): Date;
|
|
10007
10503
|
|
|
10008
10504
|
declare class DecafFakerRepository<T extends Model> extends LoggedClass {
|
|
10009
10505
|
protected model: string | Model;
|
|
@@ -10023,179 +10519,5 @@ declare class DecafFakerRepository<T extends Model> extends LoggedClass {
|
|
|
10023
10519
|
}
|
|
10024
10520
|
declare function getFakerData<T extends Model>(limit: number | undefined, data: Record<string, FunctionLike>, model?: string): T[];
|
|
10025
10521
|
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
* @description Internationalization loader and helpers for the for-angular package.
|
|
10029
|
-
* @summary Provides an implementation of TranslateLoader (I18nLoader) and helper factories
|
|
10030
|
-
* to load translation resources. Also exposes locale utilities used by components to resolve
|
|
10031
|
-
* localized keys.
|
|
10032
|
-
*
|
|
10033
|
-
* @link {@link I18nLoader}
|
|
10034
|
-
*/
|
|
10035
|
-
|
|
10036
|
-
/**
|
|
10037
|
-
* @description Retrieves the locale context for a given class, object, or string.
|
|
10038
|
-
* @summary Resolves the locale context by extracting the class name or using the provided suffix.
|
|
10039
|
-
*
|
|
10040
|
-
* @param {FunctionLike | object | string} clazz - The class, object, or string to derive the locale context from.
|
|
10041
|
-
* @param {string} [suffix] - An optional suffix to append to the locale context.
|
|
10042
|
-
* @returns {string} - The resolved locale context string.
|
|
10043
|
-
*/
|
|
10044
|
-
declare function getLocaleContext(clazz: FunctionLike | object | string, suffix?: string): string;
|
|
10045
|
-
/**
|
|
10046
|
-
* @description Generates a localized string by combining locale and phrase
|
|
10047
|
-
* @summary This utility function creates a properly formatted locale string by combining
|
|
10048
|
-
* a locale identifier with a phrase. It handles edge cases such as empty phrases,
|
|
10049
|
-
* missing locales, and phrases that already include the locale prefix. This function
|
|
10050
|
-
* is useful for ensuring consistent formatting of localized strings throughout the application.
|
|
10051
|
-
*
|
|
10052
|
-
* @param {string} locale - The locale identifier (e.g., 'en', 'fr')
|
|
10053
|
-
* @param {string | undefined} phrase - The phrase to localize
|
|
10054
|
-
* @return {string} The formatted locale string, or empty string if phrase is undefined
|
|
10055
|
-
*
|
|
10056
|
-
* @function generateLocaleFromString
|
|
10057
|
-
* @memberOf module:for-angular
|
|
10058
|
-
*/
|
|
10059
|
-
declare function getLocaleContextByKey(locale: string, phrase: string | undefined): string;
|
|
10060
|
-
/**
|
|
10061
|
-
* @description Factory function for creating an instance of I18nLoader.
|
|
10062
|
-
* @summary Configures and returns an I18nLoader instance with the specified HTTP client and translation resources.
|
|
10063
|
-
*
|
|
10064
|
-
* @param {HttpClient} http - The HTTP client used to fetch translation resources.
|
|
10065
|
-
* @returns {TranslateLoader} - An instance of I18nLoader configured with the provided HTTP client and resources.
|
|
10066
|
-
*/
|
|
10067
|
-
declare function I18nLoaderFactory(http: HttpClient): TranslateLoader;
|
|
10068
|
-
/**
|
|
10069
|
-
* @description Provides the I18nLoader configuration.
|
|
10070
|
-
* @summary Configures the translation resources and versioned suffix for the I18nLoader.
|
|
10071
|
-
*
|
|
10072
|
-
* @param {I18nResourceConfigType} [resources=[]] - The translation resources to be used by the loader.
|
|
10073
|
-
* @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
|
|
10074
|
-
* @returns {object} - The configuration object for the I18nLoader.
|
|
10075
|
-
*/
|
|
10076
|
-
declare function provideDecafI18nLoader(resources?: I18nResourceConfigType, versionedSuffix?: boolean): {
|
|
10077
|
-
provide: typeof I18N_CONFIG_TOKEN;
|
|
10078
|
-
useValue: {
|
|
10079
|
-
resources: I18nResourceConfig[];
|
|
10080
|
-
versionedSuffix: boolean;
|
|
10081
|
-
};
|
|
10082
|
-
};
|
|
10083
|
-
/**
|
|
10084
|
-
* @description Custom implementation of TranslateLoader for loading translations.
|
|
10085
|
-
* @summary Fetches and merges translation resources, supporting versioned suffixes and recursive merging.
|
|
10086
|
-
*/
|
|
10087
|
-
declare class I18nLoader implements TranslateLoader {
|
|
10088
|
-
private http;
|
|
10089
|
-
private resources;
|
|
10090
|
-
private versionedSuffix;
|
|
10091
|
-
static enabled: boolean;
|
|
10092
|
-
static cache: Record<string, TranslationObject>;
|
|
10093
|
-
/**
|
|
10094
|
-
* @param {HttpClient} http - The HTTP client used to fetch translation resources.
|
|
10095
|
-
* @param {I18nResourceConfig[]} [resources=[]] - The translation resources to be loaded.
|
|
10096
|
-
* @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
|
|
10097
|
-
*/
|
|
10098
|
-
constructor(http: HttpClient, resources?: I18nResourceConfig[], versionedSuffix?: boolean);
|
|
10099
|
-
/**
|
|
10100
|
-
* @description Appends a versioned suffix to the resource URL if enabled.
|
|
10101
|
-
* @summary Generates a versioned suffix based on the current date.
|
|
10102
|
-
*
|
|
10103
|
-
* @param {string} suffix - The original suffix of the resource URL.
|
|
10104
|
-
* @returns {string} - The modified suffix with a version string appended.
|
|
10105
|
-
*/
|
|
10106
|
-
private getSuffix;
|
|
10107
|
-
/**
|
|
10108
|
-
* @description Fetches and merges translations for the specified language.
|
|
10109
|
-
* @summary Loads translation resources, merges them recursively, and includes library keys.
|
|
10110
|
-
*
|
|
10111
|
-
* @param {string} lang - The language code for the translations to load.
|
|
10112
|
-
* @returns {Observable<TranslationObject>} - An observable that emits the merged translation object.
|
|
10113
|
-
*/
|
|
10114
|
-
getTranslation(lang: string): Observable<TranslationObject>;
|
|
10115
|
-
}
|
|
10116
|
-
/**
|
|
10117
|
-
* @description Custom implementation of TranslateParser for interpolation.
|
|
10118
|
-
* @summary Extends TranslateParser to support string formatting with parameters.
|
|
10119
|
-
*/
|
|
10120
|
-
declare class I18nParser extends TranslateParser {
|
|
10121
|
-
/**
|
|
10122
|
-
* @description Interpolates a translation string with parameters.
|
|
10123
|
-
* @summary Replaces placeholders in the translation string with parameter values.
|
|
10124
|
-
*
|
|
10125
|
-
* @param {string} value - The translation string to interpolate.
|
|
10126
|
-
* @param {object | string} [params={}] - The parameters to replace placeholders with.
|
|
10127
|
-
* @returns {string} - The interpolated translation string.
|
|
10128
|
-
*/
|
|
10129
|
-
interpolate(value: string, params?: object | string): string;
|
|
10130
|
-
}
|
|
10131
|
-
/**
|
|
10132
|
-
* @description Provides the internationalization (i18n) configuration for the application.
|
|
10133
|
-
* @summary Configures the translation service with a fallback language, default language, custom parser, and loader.
|
|
10134
|
-
*
|
|
10135
|
-
* @param {RootTranslateServiceConfig} [config={fallbackLang: 'en', lang: 'en'}] - The configuration for the translation service, including fallback and default languages.
|
|
10136
|
-
* @param {I18nResourceConfigType} [resources=[]] - The translation resources to be used by the loader.
|
|
10137
|
-
* @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
|
|
10138
|
-
* @returns {AngularProvider[]} - An array of providers for the translation service and loader.
|
|
10139
|
-
*/
|
|
10140
|
-
declare function provideDecafI18nConfig(config?: RootTranslateServiceConfig, resources?: I18nResourceConfigType, versionedSuffix?: boolean, enabled?: boolean): AngularProvider[];
|
|
10141
|
-
declare class DecafTranslatePipe implements PipeTransform {
|
|
10142
|
-
translate: TranslateService;
|
|
10143
|
-
transform(value: string, ...args: []): unknown;
|
|
10144
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DecafTranslatePipe, never>;
|
|
10145
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<DecafTranslatePipe, "translate", true>;
|
|
10146
|
-
}
|
|
10147
|
-
|
|
10148
|
-
/**
|
|
10149
|
-
* @module lib/for-angular-common.module
|
|
10150
|
-
* @description Core Angular module and providers for Decaf's for-angular package.
|
|
10151
|
-
* @summary Provides the shared Angular module, injection tokens and helper functions used
|
|
10152
|
-
* by the for-angular integration. This module wires up common imports (forms, translation)
|
|
10153
|
-
* and exposes helper providers such as DB adapter registration and logger utilities.
|
|
10154
|
-
* @link {@link ForAngularCommonModule}
|
|
10155
|
-
*/
|
|
10156
|
-
|
|
10157
|
-
/**
|
|
10158
|
-
* @description Main Angular module for the Decaf framework.
|
|
10159
|
-
* @summary The ForAngularCommonModule provides the core functionality for integrating Decaf with Angular applications.
|
|
10160
|
-
* It imports and exports common Angular and Ionic components and modules needed for Decaf applications,
|
|
10161
|
-
* including form handling, translation support, and Ionic UI components. This module can be imported
|
|
10162
|
-
* directly or via the forRoot() method for proper initialization in the application's root module.
|
|
10163
|
-
* @class ForAngularCommonModule
|
|
10164
|
-
* @memberOf module:lib/for-angular-common.module
|
|
10165
|
-
* @example
|
|
10166
|
-
* // In your app module:
|
|
10167
|
-
* @NgModule({
|
|
10168
|
-
* imports: [
|
|
10169
|
-
* ForAngularCommonModule.forRoot(),
|
|
10170
|
-
* // other imports
|
|
10171
|
-
* ],
|
|
10172
|
-
* // ...
|
|
10173
|
-
* })
|
|
10174
|
-
* export class AppModule {}
|
|
10175
|
-
*/
|
|
10176
|
-
declare class ForAngularCommonModule {
|
|
10177
|
-
/**
|
|
10178
|
-
* @description Creates a module with providers for root module import.
|
|
10179
|
-
* @summary This static method provides the proper way to import the ForAngularCommonModule in the application's
|
|
10180
|
-
* root module. It returns a ModuleWithProviders object that includes the ForAngularCommonModule itself.
|
|
10181
|
-
* Using forRoot() ensures that the module and its providers are properly initialized and only
|
|
10182
|
-
* instantiated once in the application.
|
|
10183
|
-
* @return {ModuleWithProviders<ForAngularCommonModule>} The module with its providers
|
|
10184
|
-
* @memberOf ForAngularCommonModule
|
|
10185
|
-
* @static
|
|
10186
|
-
* @example
|
|
10187
|
-
* // Import in root module
|
|
10188
|
-
* @NgModule({
|
|
10189
|
-
* imports: [ForAngularCommonModule.forRoot()],
|
|
10190
|
-
* // ...
|
|
10191
|
-
* })
|
|
10192
|
-
* export class AppModule {}
|
|
10193
|
-
*/
|
|
10194
|
-
static forRoot(): ModuleWithProviders<ForAngularCommonModule>;
|
|
10195
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ForAngularCommonModule, never>;
|
|
10196
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ForAngularCommonModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.TranslateModule, typeof i3.TranslatePipe], [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.TranslateModule, typeof i3.TranslatePipe]>;
|
|
10197
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularCommonModule>;
|
|
10198
|
-
}
|
|
10199
|
-
|
|
10200
|
-
export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_FLAVOUR_TOKEN, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DecafTranslatePipe, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, ModalComponent, ModalConfirmComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxRouterService, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SelectFieldInterfaces, SteppedFormComponent, TableComponent, WindowColorSchemes, cleanSpaces, dataMapper, decafPageTransition, filterString, formatDate, generateRandomValue, getDbAdapterFlavour, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getMenuIcon, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxModalCrudComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, patternValidators, presentModalConfirm, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDarkMode, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
|
|
10201
|
-
export type { ActionRole, AngularDynamicOutput, AngularFieldDefinition, AngularProvider, CheckboxOption, ComparisonValidationKey, ComponentMetadata, CrudEvent, CrudFieldOption, DecafComponentConstructor, DecafRepository, DecafRepositoryAdapter, ElementPosition, ElementSize, FieldUpdateMode, FilterCondition, FlexPosition, FormParent, FormParentGroup, FormServiceControl, FormServiceControls, FunctionLike, HTML5InputType, HTMLFormTarget, I18nResourceConfig, I18nResourceConfigType, I18nToken, IBaseCustomEvent, IComponentConfig, IComponentHolder, IComponentProperties, ICrudFormEvent, ICrudFormOptions, IFieldSetItem, IFieldSetValidationEvent, IFileUploadError, IFilterQuery, IFilterQueryItem, IFormComponentProperties, IFormElement, ILayoutModelContext, IListComponentRefreshEvent, IListEmptyOptions, IListItemCustomEvent, IMenuItem, IModelComponentSubmitEvent, IPaginationCustomEvent, IRenderedModel, IRepositoryModelProps, ISortObject, ITabItem, IWindowResizeEvent, InputOption, KeyValue, LayoutGridGap, ListItemPosition, PossibleInputTypes, PropsMapperFn, RadioOption, RawQuery, SelectOption, StringOrBoolean, WindowColorScheme };
|
|
10522
|
+
export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_FLAVOUR_TOKEN, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DecafTooltipDirective, DecafTranslatePipe, DecafTruncatePipe, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, ModalComponent, ModalConfirmComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxRouterService, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SelectFieldInterfaces, SteppedFormComponent, TableComponent, WindowColorSchemes, cleanSpaces, dataMapper, dateFromString, decafPageTransition, filterString, formatDate, generateRandomValue, getDbAdapterFlavour, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getMenuIcon, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxModalCrudComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, patternValidators, presentModalConfirm, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDarkMode, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
|
|
10523
|
+
export type { ActionRole, AngularDynamicOutput, AngularFieldDefinition, AngularProvider, CheckboxOption, ComparisonValidationKey, ComponentMetadata, CrudEvent, CrudFieldOption, DecafComponentConstructor, DecafRepository, DecafRepositoryAdapter, ElementPosition, ElementSize, FieldUpdateMode, FilterCondition, FlexPosition, FormParent, FormParentGroup, FormServiceControl, FormServiceControls, FunctionLike, HTML5InputType, HTMLFormTarget, I18nResourceConfig, I18nResourceConfigType, I18nToken, IBaseCustomEvent, IComponentConfig, IComponentHolder, IComponentProperties, ICrudFormEvent, ICrudFormOptions, IFieldSetItem, IFieldSetValidationEvent, IFileUploadError, IFilterQuery, IFilterQueryItem, IFormComponentProperties, IFormElement, ILayoutModelContext, IListComponentRefreshEvent, IListEmptyOptions, IListItemCustomEvent, IMenuItem, IModelComponentSubmitEvent, IPaginationCustomEvent, IRenderedModel, IRepositoryModelProps, ISortObject, ITabItem, ITooltipConfig, IWindowResizeEvent, InputOption, KeyValue, LayoutGridGap, ListItemPosition, PossibleInputTypes, PropsMapperFn, RadioOption, RawQuery, SelectOption, StringOrBoolean, WindowColorScheme };
|