@decaf-ts/for-angular 0.0.52 → 0.0.54

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Type, Injector, ElementRef, EnvironmentInjector, OnChanges, OnDestroy, ChangeDetectorRef, Renderer2, EventEmitter, SimpleChanges, ViewContainerRef, TemplateRef, OnInit, AfterViewInit, ComponentMirror, ComponentRef, InjectionToken, Provider, EnvironmentProviders, ModuleWithProviders } from '@angular/core';
2
+ import { Type, Injector, ElementRef, EnvironmentInjector, EnvironmentProviders, Provider, OnChanges, OnDestroy, ChangeDetectorRef, Renderer2, EventEmitter, SimpleChanges, ViewContainerRef, TemplateRef, OnInit, AfterViewInit, ComponentMirror, ComponentRef, InjectionToken, ModuleWithProviders } from '@angular/core';
3
3
  import { IonInput, IonSelect, IonTextarea, IonCheckbox, SpinnerTypes, InfiniteScrollCustomEvent, RefresherCustomEvent, MenuController } from '@ionic/angular';
4
4
  import { TextFieldTypes, SelectInterface, AutocompleteTypes, CheckboxCustomEvent, Color, PredefinedColors, OverlayEventDetail } from '@ionic/core';
5
5
  import * as i2 from '@angular/forms';
@@ -243,6 +243,7 @@ interface InputOption {
243
243
  text: string;
244
244
  value: string | number;
245
245
  disabled?: StringOrBoolean;
246
+ hidden?: StringOrBoolean;
246
247
  className?: string;
247
248
  icon?: string;
248
249
  }
@@ -304,7 +305,7 @@ interface IBaseCustomEvent {
304
305
  data?: unknown;
305
306
  target?: HTMLElement;
306
307
  }
307
- interface IModelPageCustomEvent extends IBaseCustomEvent {
308
+ interface IModelComponentSubmitEvent extends IBaseCustomEvent {
308
309
  success: boolean;
309
310
  message?: string;
310
311
  }
@@ -761,6 +762,25 @@ declare const CssClasses: {
761
762
  * @memberOf module:lib/engine/constants
762
763
  */
763
764
  declare const DefaultFormReactiveOptions: ICrudFormOptions;
765
+ /**
766
+ * @description Mapping of select field interface types used in Ionic components.
767
+ * @summary Provides a set of supported select interface types for Ionic select fields,
768
+ * mapping human-readable keys to their corresponding `SelectInterface` string values.
769
+ * This allows for consistent usage and reference of select interface types throughout the application.
770
+ * @type {Record<string, SelectInterface>}
771
+ * @property {string} PopOver - Represents the 'popover' select interface.
772
+ * @property {string} Alert - Represents the 'alert' select interface.
773
+ * @property {string} ActionSheet - Represents the 'action-sheet' select interface.
774
+ * @property {string} modal - Represents the 'modal' select interface.
775
+ * @const SelectFieldInterfaces
776
+ * @memberOf module:lib/engine/constants
777
+ */
778
+ declare const SelectFieldInterfaces: {
779
+ readonly POPOVER: "popover";
780
+ readonly ALERT: "alert";
781
+ readonly ACTION_SHEET: "action-sheet";
782
+ readonly MODAL: "modal";
783
+ };
764
784
 
765
785
  /**
766
786
  * @module module:lib/engine/types
@@ -968,6 +988,13 @@ type LayoutGridGap = (typeof LayoutGridGaps)[keyof typeof LayoutGridGaps];
968
988
  * @memberOf module:lib/engine/types
969
989
  */
970
990
  type ListItemPosition = (typeof ListItemPositions)[keyof typeof ListItemPositions];
991
+ /**
992
+ * @description Represents an Angular dependency injection provider.
993
+ * @summary This type is a union of Angular's `EnvironmentProviders` and `Provider` types, allowing for flexible DI configuration.
994
+ * @typedef {EnvironmentProviders | Provider} AngularProvider
995
+ * @memberOf module:lib/engine/types
996
+ */
997
+ type AngularProvider = EnvironmentProviders | Provider;
971
998
 
972
999
  /**
973
1000
  * @module NgxMediaService
@@ -2891,11 +2918,11 @@ declare class CrudFieldComponent extends NgxFormFieldDirective implements OnInit
2891
2918
  * @summary Indicates whether the field labels should be translated based on the current language settings.
2892
2919
  * This is useful for applications supporting multiple languages.
2893
2920
  *
2894
- * @type {StringOrBoolean}
2921
+ * @type {boolean}
2895
2922
  * @default true
2896
2923
  * @memberOf CrudFieldComponent
2897
2924
  */
2898
- translatable: StringOrBoolean;
2925
+ translatable: boolean;
2899
2926
  constructor();
2900
2927
  /**
2901
2928
  * @description Component initialization lifecycle method.
@@ -2952,17 +2979,6 @@ declare class CrudFieldComponent extends NgxFormFieldDirective implements OnInit
2952
2979
  ngOnDestroy(): void;
2953
2980
  toggleOptionSelection(val: string, event: CheckboxCustomEvent): void;
2954
2981
  isOptionChecked(value: string): boolean;
2955
- /**
2956
- * @description Handles fieldset group update events from parent fieldsets.
2957
- * @summary Processes events triggered when an existing group needs to be updated.
2958
- * Updates the active form group index and refreshes the form group and form control
2959
- * references to point to the group being edited.
2960
- *
2961
- * @param {CustomEvent} event - The fieldset update group event containing update details
2962
- * @returns {void}
2963
- * @memberOf CrudFieldComponent
2964
- */
2965
- handleFieldsetUpdateGroupEvent(event: CustomEvent): void;
2966
2982
  static ɵfac: i0.ɵɵFactoryDeclaration<CrudFieldComponent, never>;
2967
2983
  static ɵcmp: i0.ɵɵComponentDeclaration<CrudFieldComponent, "ngx-decaf-crud-field", never, { "operation": { "alias": "operation"; "required": true; }; "name": { "alias": "name"; "required": true; }; "className": { "alias": "className"; "required": false; }; "path": { "alias": "path"; "required": true; }; "childOf": { "alias": "childOf"; "required": false; }; "type": { "alias": "type"; "required": true; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "format": { "alias": "format"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "max": { "alias": "max"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "min": { "alias": "min"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "step": { "alias": "step"; "required": false; }; "equals": { "alias": "equals"; "required": false; }; "different": { "alias": "different"; "required": false; }; "lessThan": { "alias": "lessThan"; "required": false; }; "lessThanOrEqual": { "alias": "lessThanOrEqual"; "required": false; }; "greaterThan": { "alias": "greaterThan"; "required": false; }; "greaterThanOrEqual": { "alias": "greaterThanOrEqual"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "cancelText": { "alias": "cancelText"; "required": false; }; "interface": { "alias": "interface"; "required": false; }; "options": { "alias": "options"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "spellcheck": { "alias": "spellcheck"; "required": false; }; "startEmpty": { "alias": "startEmpty"; "required": false; }; "inputmode": { "alias": "inputmode"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; }; "updateOn": { "alias": "updateOn"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "page": { "alias": "page"; "required": false; }; "translatable": { "alias": "translatable"; "required": false; }; }, {}, never, never, true, never>;
2968
2984
  }
@@ -6599,7 +6615,7 @@ declare class SearchbarComponent extends NgxComponentDirective implements OnInit
6599
6615
  * @default "search"
6600
6616
  * @memberOf SearchbarComponent
6601
6617
  */
6602
- type: "number" | "text" | "search" | "email" | "password" | "tel" | "url" | undefined;
6618
+ type: 'number' | "text" | "search" | "email" | "password" | "tel" | "url" | undefined;
6603
6619
  /**
6604
6620
  * @description The value of the searchbar input.
6605
6621
  * @summary Specifies the current value of the searchbar input.
@@ -7264,7 +7280,7 @@ declare function getNgxInlineModal(inlineContent: string | SafeHtml, props?: Par
7264
7280
  * @param {EnvironmentInjector} [injector] - Optional environment injector for dependency injection.
7265
7281
  * @returns {Promise<IonModal>} - A promise that resolves with the modal instance.
7266
7282
  */
7267
- declare function getNgxSelectOptionsModal(options: SelectOption[], injector?: EnvironmentInjector): Promise<IonModal>;
7283
+ declare function getNgxSelectOptionsModal(title: string, options: SelectOption[], injector?: EnvironmentInjector): Promise<IonModal>;
7268
7284
 
7269
7285
  declare class IconComponent implements OnInit {
7270
7286
  /** @description Reference to the component's native DOM element.
@@ -8846,9 +8862,9 @@ declare abstract class NgxModelPageDirective extends NgxPageDirective {
8846
8862
  * operation with detailed logging.
8847
8863
  *
8848
8864
  * @param {IBaseCustomEvent} event - The submit event containing form data
8849
- * @return {Promise<IModelPageCustomEvent|void>} Promise that resolves on success or throws on error
8865
+ * @return {Promise<IModelComponentSubmitEvent|void>} Promise that resolves on success or throws on error
8850
8866
  */
8851
- submit(event: IBaseCustomEvent, repository?: DecafRepository<Model>, redirect?: boolean): Promise<IModelPageCustomEvent | void>;
8867
+ submit(event: IBaseCustomEvent, redirect?: boolean, repository?: DecafRepository<Model>): Promise<IModelComponentSubmitEvent>;
8852
8868
  /**
8853
8869
  * @description Retrieves a model instance from the repository by unique identifier.
8854
8870
  * @summary Fetches a specific model instance using the repository's read method.
@@ -9250,116 +9266,6 @@ declare class DecafFakerRepository<T extends Model> {
9250
9266
  }
9251
9267
  declare function getFakerData<T extends Model>(limit: number | undefined, data: Record<string, FunctionLike>, model?: string): T[];
9252
9268
 
9253
- /**
9254
- * @description Retrieves the locale context for a given class, object, or string.
9255
- * @summary Resolves the locale context by extracting the class name or using the provided suffix.
9256
- *
9257
- * @param {FunctionLike | object | string} clazz - The class, object, or string to derive the locale context from.
9258
- * @param {string} [suffix] - An optional suffix to append to the locale context.
9259
- * @returns {string} - The resolved locale context string.
9260
- */
9261
- declare function getLocaleContext(clazz: FunctionLike | object | string, suffix?: string): string;
9262
- /**
9263
- * @description Generates a localized string by combining locale and phrase
9264
- * @summary This utility function creates a properly formatted locale string by combining
9265
- * a locale identifier with a phrase. It handles edge cases such as empty phrases,
9266
- * missing locales, and phrases that already include the locale prefix. This function
9267
- * is useful for ensuring consistent formatting of localized strings throughout the application.
9268
- *
9269
- * @param {string} locale - The locale identifier (e.g., 'en', 'fr')
9270
- * @param {string | undefined} phrase - The phrase to localize
9271
- * @return {string} The formatted locale string, or empty string if phrase is undefined
9272
- *
9273
- * @function generateLocaleFromString
9274
- * @memberOf module:for-angular
9275
- */
9276
- declare function getLocaleContextByKey(locale: string, phrase: string | undefined): string;
9277
- /**
9278
- * @description Factory function for creating an instance of I18nLoader.
9279
- * @summary Configures and returns an I18nLoader instance with the specified HTTP client and translation resources.
9280
- *
9281
- * @param {HttpClient} http - The HTTP client used to fetch translation resources.
9282
- * @returns {TranslateLoader} - An instance of I18nLoader configured with the provided HTTP client and resources.
9283
- */
9284
- declare function I18nLoaderFactory(http: HttpClient): TranslateLoader;
9285
- /**
9286
- * @description Provides the I18nLoader configuration.
9287
- * @summary Configures the translation resources and versioned suffix for the I18nLoader.
9288
- *
9289
- * @param {I18nResourceConfigType} [resources=[]] - The translation resources to be used by the loader.
9290
- * @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
9291
- * @returns {object} - The configuration object for the I18nLoader.
9292
- */
9293
- declare function provideI18nLoader(resources?: I18nResourceConfigType, versionedSuffix?: boolean): {
9294
- provide: i0.InjectionToken<I18nToken>;
9295
- useValue: {
9296
- resources: I18nResourceConfig[];
9297
- versionedSuffix: boolean;
9298
- };
9299
- };
9300
- /**
9301
- * @description Custom implementation of TranslateLoader for loading translations.
9302
- * @summary Fetches and merges translation resources, supporting versioned suffixes and recursive merging.
9303
- */
9304
- declare class I18nLoader implements TranslateLoader {
9305
- private http;
9306
- private resources;
9307
- private versionedSuffix;
9308
- /**
9309
- * @param {HttpClient} http - The HTTP client used to fetch translation resources.
9310
- * @param {I18nResourceConfig[]} [resources=[]] - The translation resources to be loaded.
9311
- * @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
9312
- */
9313
- constructor(http: HttpClient, resources?: I18nResourceConfig[], versionedSuffix?: boolean);
9314
- /**
9315
- * @description Appends a versioned suffix to the resource URL if enabled.
9316
- * @summary Generates a versioned suffix based on the current date.
9317
- *
9318
- * @param {string} suffix - The original suffix of the resource URL.
9319
- * @returns {string} - The modified suffix with a version string appended.
9320
- */
9321
- private getSuffix;
9322
- /**
9323
- * @description Fetches and merges translations for the specified language.
9324
- * @summary Loads translation resources, merges them recursively, and includes library keys.
9325
- *
9326
- * @param {string} lang - The language code for the translations to load.
9327
- * @returns {Observable<TranslationObject>} - An observable that emits the merged translation object.
9328
- */
9329
- getTranslation(lang: string): Observable<TranslationObject>;
9330
- }
9331
- /**
9332
- * @description Custom implementation of TranslateParser for interpolation.
9333
- * @summary Extends TranslateParser to support string formatting with parameters.
9334
- */
9335
- declare class I18nParser extends TranslateParser {
9336
- /**
9337
- * @description Interpolates a translation string with parameters.
9338
- * @summary Replaces placeholders in the translation string with parameter values.
9339
- *
9340
- * @param {string} value - The translation string to interpolate.
9341
- * @param {object | string} [params={}] - The parameters to replace placeholders with.
9342
- * @returns {string} - The interpolated translation string.
9343
- */
9344
- interpolate(value: string, params?: object | string): string;
9345
- }
9346
- /**
9347
- * @description Provides the internationalization (i18n) configuration for the application.
9348
- * @summary Configures the translation service with a fallback language, default language, custom parser, and loader.
9349
- *
9350
- * @param {RootTranslateServiceConfig} [config={fallbackLang: 'en', lang: 'en'}] - The configuration for the translation service, including fallback and default languages.
9351
- * @param {I18nResourceConfigType} [resources=[]] - The translation resources to be used by the loader.
9352
- * @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
9353
- * @returns {Array} - An array of providers for the translation service and loader.
9354
- */
9355
- declare function provideI18n(config?: RootTranslateServiceConfig, resources?: I18nResourceConfigType, versionedSuffix?: boolean): (i0.EnvironmentProviders | {
9356
- provide: i0.InjectionToken<I18nToken>;
9357
- useValue: {
9358
- resources: I18nResourceConfig[];
9359
- versionedSuffix: boolean;
9360
- };
9361
- } | i0.Provider[])[];
9362
-
9363
9269
  declare const DB_ADAPTER_PROVIDER = "DB_ADAPTER_PROVIDER";
9364
9270
  /**
9365
9271
  * @description Injection token for registering the database adapter provider.
@@ -9422,7 +9328,7 @@ declare const I18N_CONFIG_TOKEN: InjectionToken<I18nToken>;
9422
9328
  * { provide: CPTKN, useValue: provideDynamicComponents(MyComponent, AnotherComponent) }
9423
9329
  * ]
9424
9330
  */
9425
- declare function provideDynamicComponents(...components: unknown[]): Constructor<unknown>[];
9331
+ declare function provideDecafDynamicComponents(...components: unknown[]): Constructor<unknown>[];
9426
9332
  /**
9427
9333
  * @description Retrieves the repository instance for a given model.
9428
9334
  * @summary Creates or retrieves a DecafRepository instance for the specified model. This function
@@ -9442,7 +9348,7 @@ declare function provideDynamicComponents(...components: unknown[]): Constructor
9442
9348
  * // Use repository for queries
9443
9349
  * const users = await userRepo.findAll();
9444
9350
  */
9445
- declare function getModelAndRepository(model: Model | string): {
9351
+ declare function getModelAndRepository(model: Model | string, clazz?: NgxComponentDirective): {
9446
9352
  repository: DecafRepository<Model>;
9447
9353
  model: Model;
9448
9354
  pk: string;
@@ -9469,7 +9375,7 @@ declare function getModelAndRepository(model: Model | string): {
9469
9375
  * provideDbAdapter(PostgresAdapter, { host: 'localhost', port: 5432 })
9470
9376
  * ]
9471
9377
  */
9472
- declare function provideDbAdapter<DbAdapter extends {
9378
+ declare function provideDecafDbAdapter<DbAdapter extends {
9473
9379
  flavour: string;
9474
9380
  }>(clazz: Constructor<DbAdapter>, options?: KeyValue, flavour?: string): Provider;
9475
9381
  /**
@@ -9550,5 +9456,109 @@ declare class ForAngularCommonModule {
9550
9456
  static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularCommonModule>;
9551
9457
  }
9552
9458
 
9553
- export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentEventNames, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_PROVIDER, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, ElementPositions, ElementSizes, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, FormConstants, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, LayoutGridGaps, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, LoggerLevels, ModalComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SteppedFormComponent, WindowColorSchemes, cleanSpaces, dataMapper, decafPageTransition, filterString, formatDate, generateRandomValue, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, parseToValidDate, presentNgxInlineModal, presentNgxLightBoxModal, provideDbAdapter, provideDecafPageTransition, provideDynamicComponents, provideI18n, provideI18nLoader, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
9554
- export type { ActionRole, AngularDynamicOutput, AngularFieldDefinition, CheckboxOption, ComponentMetadata, CrudFieldOption, DecafRepository, DecafRepositoryAdapter, ElementPosition, ElementSize, FieldUpdateMode, FlexPosition, FormParent, FormParentGroup, FormServiceControl, FormServiceControls, FunctionLike, HTML5InputType, HTMLFormTarget, I18nResourceConfig, I18nResourceConfigType, I18nToken, IBaseCustomEvent, IComponentConfig, IComponentHolder, IComponentProperties, ICrudFormEvent, ICrudFormOptions, IFieldSetItem, IFieldSetValidationEvent, IFileUploadError, IFilterQuery, IFilterQueryItem, IFormComponentProperties, IFormElement, IFormReactiveSubmitEvent, IListComponentRefreshEvent, IListEmptyOptions, IMenuItem, IModelPageCustomEvent, IPaginationCustomEvent, IRenderedModel, ISortObject, IWindowResizeEvent, InputOption, KeyValue, LayoutGridGap, ListItemCustomEvent, ListItemPosition, PossibleInputTypes, RadioOption, RawQuery, SelectOption, StringOrBoolean, WindowColorScheme };
9459
+ /**
9460
+ * @description Retrieves the locale context for a given class, object, or string.
9461
+ * @summary Resolves the locale context by extracting the class name or using the provided suffix.
9462
+ *
9463
+ * @param {FunctionLike | object | string} clazz - The class, object, or string to derive the locale context from.
9464
+ * @param {string} [suffix] - An optional suffix to append to the locale context.
9465
+ * @returns {string} - The resolved locale context string.
9466
+ */
9467
+ declare function getLocaleContext(clazz: FunctionLike | object | string, suffix?: string): string;
9468
+ /**
9469
+ * @description Generates a localized string by combining locale and phrase
9470
+ * @summary This utility function creates a properly formatted locale string by combining
9471
+ * a locale identifier with a phrase. It handles edge cases such as empty phrases,
9472
+ * missing locales, and phrases that already include the locale prefix. This function
9473
+ * is useful for ensuring consistent formatting of localized strings throughout the application.
9474
+ *
9475
+ * @param {string} locale - The locale identifier (e.g., 'en', 'fr')
9476
+ * @param {string | undefined} phrase - The phrase to localize
9477
+ * @return {string} The formatted locale string, or empty string if phrase is undefined
9478
+ *
9479
+ * @function generateLocaleFromString
9480
+ * @memberOf module:for-angular
9481
+ */
9482
+ declare function getLocaleContextByKey(locale: string, phrase: string | undefined): string;
9483
+ /**
9484
+ * @description Factory function for creating an instance of I18nLoader.
9485
+ * @summary Configures and returns an I18nLoader instance with the specified HTTP client and translation resources.
9486
+ *
9487
+ * @param {HttpClient} http - The HTTP client used to fetch translation resources.
9488
+ * @returns {TranslateLoader} - An instance of I18nLoader configured with the provided HTTP client and resources.
9489
+ */
9490
+ declare function I18nLoaderFactory(http: HttpClient): TranslateLoader;
9491
+ /**
9492
+ * @description Provides the I18nLoader configuration.
9493
+ * @summary Configures the translation resources and versioned suffix for the I18nLoader.
9494
+ *
9495
+ * @param {I18nResourceConfigType} [resources=[]] - The translation resources to be used by the loader.
9496
+ * @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
9497
+ * @returns {object} - The configuration object for the I18nLoader.
9498
+ */
9499
+ declare function provideDecafI18nLoader(resources?: I18nResourceConfigType, versionedSuffix?: boolean): {
9500
+ provide: typeof I18N_CONFIG_TOKEN;
9501
+ useValue: {
9502
+ resources: I18nResourceConfig[];
9503
+ versionedSuffix: boolean;
9504
+ };
9505
+ };
9506
+ /**
9507
+ * @description Custom implementation of TranslateLoader for loading translations.
9508
+ * @summary Fetches and merges translation resources, supporting versioned suffixes and recursive merging.
9509
+ */
9510
+ declare class I18nLoader implements TranslateLoader {
9511
+ private http;
9512
+ private resources;
9513
+ private versionedSuffix;
9514
+ /**
9515
+ * @param {HttpClient} http - The HTTP client used to fetch translation resources.
9516
+ * @param {I18nResourceConfig[]} [resources=[]] - The translation resources to be loaded.
9517
+ * @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
9518
+ */
9519
+ constructor(http: HttpClient, resources?: I18nResourceConfig[], versionedSuffix?: boolean);
9520
+ /**
9521
+ * @description Appends a versioned suffix to the resource URL if enabled.
9522
+ * @summary Generates a versioned suffix based on the current date.
9523
+ *
9524
+ * @param {string} suffix - The original suffix of the resource URL.
9525
+ * @returns {string} - The modified suffix with a version string appended.
9526
+ */
9527
+ private getSuffix;
9528
+ /**
9529
+ * @description Fetches and merges translations for the specified language.
9530
+ * @summary Loads translation resources, merges them recursively, and includes library keys.
9531
+ *
9532
+ * @param {string} lang - The language code for the translations to load.
9533
+ * @returns {Observable<TranslationObject>} - An observable that emits the merged translation object.
9534
+ */
9535
+ getTranslation(lang: string): Observable<TranslationObject>;
9536
+ }
9537
+ /**
9538
+ * @description Custom implementation of TranslateParser for interpolation.
9539
+ * @summary Extends TranslateParser to support string formatting with parameters.
9540
+ */
9541
+ declare class I18nParser extends TranslateParser {
9542
+ /**
9543
+ * @description Interpolates a translation string with parameters.
9544
+ * @summary Replaces placeholders in the translation string with parameter values.
9545
+ *
9546
+ * @param {string} value - The translation string to interpolate.
9547
+ * @param {object | string} [params={}] - The parameters to replace placeholders with.
9548
+ * @returns {string} - The interpolated translation string.
9549
+ */
9550
+ interpolate(value: string, params?: object | string): string;
9551
+ }
9552
+ /**
9553
+ * @description Provides the internationalization (i18n) configuration for the application.
9554
+ * @summary Configures the translation service with a fallback language, default language, custom parser, and loader.
9555
+ *
9556
+ * @param {RootTranslateServiceConfig} [config={fallbackLang: 'en', lang: 'en'}] - The configuration for the translation service, including fallback and default languages.
9557
+ * @param {I18nResourceConfigType} [resources=[]] - The translation resources to be used by the loader.
9558
+ * @param {boolean} [versionedSuffix=false] - Whether to append a versioned suffix to resource URLs.
9559
+ * @returns {AngularProvider[]} - An array of providers for the translation service and loader.
9560
+ */
9561
+ declare function provideDecafI18nConfig(config?: RootTranslateServiceConfig, resources?: I18nResourceConfigType, versionedSuffix?: boolean): AngularProvider[];
9562
+
9563
+ export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentEventNames, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_PROVIDER, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, ElementPositions, ElementSizes, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, FormConstants, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, LayoutGridGaps, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, LoggerLevels, ModalComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SelectFieldInterfaces, SteppedFormComponent, WindowColorSchemes, cleanSpaces, dataMapper, decafPageTransition, filterString, formatDate, generateRandomValue, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, parseToValidDate, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
9564
+ export type { ActionRole, AngularDynamicOutput, AngularFieldDefinition, AngularProvider, CheckboxOption, ComponentMetadata, CrudFieldOption, DecafRepository, DecafRepositoryAdapter, ElementPosition, ElementSize, FieldUpdateMode, FlexPosition, FormParent, FormParentGroup, FormServiceControl, FormServiceControls, FunctionLike, HTML5InputType, HTMLFormTarget, I18nResourceConfig, I18nResourceConfigType, I18nToken, IBaseCustomEvent, IComponentConfig, IComponentHolder, IComponentProperties, ICrudFormEvent, ICrudFormOptions, IFieldSetItem, IFieldSetValidationEvent, IFileUploadError, IFilterQuery, IFilterQueryItem, IFormComponentProperties, IFormElement, IFormReactiveSubmitEvent, IListComponentRefreshEvent, IListEmptyOptions, IMenuItem, IModelComponentSubmitEvent, IPaginationCustomEvent, IRenderedModel, ISortObject, IWindowResizeEvent, InputOption, KeyValue, LayoutGridGap, ListItemCustomEvent, ListItemPosition, PossibleInputTypes, RadioOption, RawQuery, SelectOption, StringOrBoolean, WindowColorScheme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/for-angular",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "author": "Tiago Venceslau and Contributors",
5
5
  "license": "MPL-2.0 OR AGPL-3.0",
6
6
  "repository": {