@decaf-ts/for-angular 0.0.54 → 0.0.56

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
@@ -10,7 +10,7 @@ import * as _decaf_ts_decorator_validation from '@decaf-ts/decorator-validation'
10
10
  import { Model, VALIDATION_PARENT_KEY, ModelConstructor } from '@decaf-ts/decorator-validation';
11
11
  import { RepositoryFlags, Context, CrudOperations, OperationKeys, IRepository } from '@decaf-ts/db-decorators';
12
12
  import * as _ionic_angular_standalone from '@ionic/angular/standalone';
13
- import { ModalOptions, ItemReorderEventDetail, IonModal } from '@ionic/angular/standalone';
13
+ import { ModalOptions, SelectCustomEvent, ItemReorderEventDetail, IonModal } from '@ionic/angular/standalone';
14
14
  import { Constructor } from '@decaf-ts/decoration';
15
15
  import { Router } from '@angular/router';
16
16
  import * as i1 from '@angular/common';
@@ -21,7 +21,7 @@ import { HttpClient } from '@angular/common/http';
21
21
  import { Observable, Subscription } from 'rxjs';
22
22
  import { SafeHtml, DomSanitizer, Title } from '@angular/platform-browser';
23
23
  import { InjectablesRegistry } from '@decaf-ts/injectable-decorators';
24
- import { Logger } from '@decaf-ts/logging';
24
+ import { LoggedClass, Logger } from '@decaf-ts/logging';
25
25
 
26
26
  /**
27
27
  * @module lib/engine/interfaces
@@ -1095,6 +1095,7 @@ declare class NgxMediaService {
1095
1095
  * @return {Document} The global `document` object.
1096
1096
  */
1097
1097
  private get _document();
1098
+ darkModeEnabled(): boolean;
1098
1099
  /**
1099
1100
  * @description Observes window resize events and emits the updated dimensions.
1100
1101
  * @summary
@@ -2421,7 +2422,22 @@ declare abstract class NgxFormFieldDirective extends NgxComponentDirective imple
2421
2422
  * @public
2422
2423
  */
2423
2424
  setValue(value: unknown): void;
2424
- handleModalChildChanges(): void;
2425
+ /**
2426
+ * @description Clears the current form control value as a response to a UI interact
2427
+ * @summary Set field value as undefined and prevents event propagation.
2428
+ * @param {Event} event - The value to set
2429
+ * @return {void}
2430
+ * @public
2431
+ */
2432
+ handleClearValue(event: Event): void;
2433
+ /**
2434
+ * @description Handles IonSelect change events emitted from modal child components.
2435
+ * @summary Forces change detection when rendered inside a modal and synchronizes the select value with the directive state.
2436
+ * @param {SelectCustomEvent<SelectChangeEventDetail>} event - IonSelect change event containing the selected value.
2437
+ * @return {void}
2438
+ * @public
2439
+ */
2440
+ handleModalChildChanges(event?: SelectCustomEvent): void;
2425
2441
  /**
2426
2442
  * @description Retrieves validation error messages for the field.
2427
2443
  * @summary Checks the form control for validation errors and returns formatted error messages.
@@ -3779,7 +3795,7 @@ declare class EmptyStateComponent extends CardComponent implements OnInit {
3779
3795
  * - A Promise resolving to the navigation result if buttonLink is a URL
3780
3796
  * @memberOf EmptyStateComponent
3781
3797
  */
3782
- handleClick(): boolean | void | Promise<boolean> | FunctionLike;
3798
+ handleClick(): Promise<void>;
3783
3799
  /**
3784
3800
  * @description Generates a localized and sanitized subtitle for search results.
3785
3801
  * @summary This method takes a content string, typically the subtitle, and processes it
@@ -4117,7 +4133,7 @@ declare class FieldsetComponent extends NgxFormDirective implements OnInit, Afte
4117
4133
  * @memberOf FieldsetComponent
4118
4134
  */
4119
4135
  ngAfterViewInit(): Promise<void>;
4120
- refresh(): Promise<void>;
4136
+ refresh(operation: CrudOperationKeys): Promise<void>;
4121
4137
  /**
4122
4138
  * @description Handles removal of the fieldset with slide animation.
4123
4139
  * @summary Initiates the removal process for the fieldset with a smooth slide-up animation.
@@ -5175,7 +5191,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
5175
5191
  * @type {string | KeyValue | undefined}
5176
5192
  * @memberOf ListComponent
5177
5193
  */
5178
- sortDirection: OrderDirection;
5194
+ sortBy: string;
5179
5195
  /**
5180
5196
  * @description Sorting parameters for data fetching.
5181
5197
  * @summary Specifies how the fetched data should be sorted. This can be provided
@@ -5184,7 +5200,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
5184
5200
  * @type {string | KeyValue | undefined}
5185
5201
  * @memberOf ListComponent
5186
5202
  */
5187
- sortBy: string;
5203
+ sortDirection: OrderDirection;
5188
5204
  /**
5189
5205
  * @description Controls whether sorting functionality is disabled.
5190
5206
  * @summary When set to true, disables the sort controls and prevents users from
@@ -5735,7 +5751,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
5735
5751
  mapResults(data: KeyValue[]): KeyValue[];
5736
5752
  parseSearchValue(): string | IFilterQuery;
5737
5753
  static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent, never>;
5738
- static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "ngx-decaf-list", never, { "type": { "alias": "type"; "required": false; }; "showSearchbar": { "alias": "showSearchbar"; "required": false; }; "data": { "alias": "data"; "required": false; }; "source": { "alias": "source"; "required": false; }; "start": { "alias": "start"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "loadMoreData": { "alias": "loadMoreData"; "required": false; }; "lines": { "alias": "lines"; "required": false; }; "inset": { "alias": "inset"; "required": false; }; "scrollThreshold": { "alias": "scrollThreshold"; "required": false; }; "scrollPosition": { "alias": "scrollPosition"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "showRefresher": { "alias": "showRefresher"; "required": false; }; "createButton": { "alias": "createButton"; "required": false; }; "loadingSpinner": { "alias": "loadingSpinner"; "required": false; }; "enableFilter": { "alias": "enableFilter"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "disableSort": { "alias": "disableSort"; "required": false; }; "empty": { "alias": "empty"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, ["*"], true, never>;
5754
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "ngx-decaf-list", never, { "type": { "alias": "type"; "required": false; }; "showSearchbar": { "alias": "showSearchbar"; "required": false; }; "data": { "alias": "data"; "required": false; }; "source": { "alias": "source"; "required": false; }; "start": { "alias": "start"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "loadMoreData": { "alias": "loadMoreData"; "required": false; }; "lines": { "alias": "lines"; "required": false; }; "inset": { "alias": "inset"; "required": false; }; "scrollThreshold": { "alias": "scrollThreshold"; "required": false; }; "scrollPosition": { "alias": "scrollPosition"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "showRefresher": { "alias": "showRefresher"; "required": false; }; "createButton": { "alias": "createButton"; "required": false; }; "loadingSpinner": { "alias": "loadingSpinner"; "required": false; }; "enableFilter": { "alias": "enableFilter"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "disableSort": { "alias": "disableSort"; "required": false; }; "empty": { "alias": "empty"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, ["*"], true, never>;
5739
5755
  }
5740
5756
 
5741
5757
  /**
@@ -7242,6 +7258,16 @@ declare class ModalComponent extends NgxParentComponentDirective implements OnIn
7242
7258
  * @returns {Promise<IonModal>} - A promise that resolves with the modal instance.
7243
7259
  */
7244
7260
  declare function getNgxModalComponent(props?: Partial<ModalComponent>, modalProps?: Partial<ModalOptions>, injector?: EnvironmentInjector): Promise<IonModal>;
7261
+ /**
7262
+ * @description Retrieves a modal component instance.
7263
+ * @summary Creates and initializes a modal component with the provided properties and options.
7264
+ *
7265
+ * @param {Partial<ModalComponent>} [props={}] - Properties to initialize the modal component.
7266
+ * @param {Partial<ModalOptions>} [modalProps={}] - Additional modal options.
7267
+ * @param {EnvironmentInjector} [injector] - Optional environment injector for dependency injection.
7268
+ * @returns {Promise<IonModal>} - A promise that resolves with the modal instance.
7269
+ */
7270
+ declare function getNgxModalCrudComponent(model: Partial<Model>, props?: Partial<ModalComponent>, modalProps?: Partial<ModalOptions>, injector?: EnvironmentInjector): Promise<IonModal>;
7245
7271
  /**
7246
7272
  * @description Presents a lightbox modal with inline content.
7247
7273
  * @summary Displays a modal in lightbox mode with the specified content and properties.
@@ -7300,7 +7326,7 @@ declare class IconComponent implements OnInit {
7300
7326
  buttonShape: 'round' | 'default';
7301
7327
  width: string;
7302
7328
  size?: 'large' | 'small' | 'default';
7303
- type: 'image' | 'ionic';
7329
+ type: 'image' | 'ionic' | 'icon';
7304
7330
  isSvg: boolean;
7305
7331
  initialized: boolean;
7306
7332
  inline: boolean;
@@ -8591,9 +8617,10 @@ declare class NgxFormService {
8591
8617
  */
8592
8618
 
8593
8619
  declare abstract class NgxEventHandler extends DecafEventHandler {
8620
+ changeDetectorRef: ChangeDetectorRef;
8594
8621
  constructor();
8595
- refresh(args?: unknown[]): Promise<void>;
8596
- preview(args?: unknown[]): Promise<void>;
8622
+ refresh(...args: unknown[]): Promise<void>;
8623
+ preview(...args: unknown[]): Promise<void>;
8597
8624
  }
8598
8625
 
8599
8626
  /**
@@ -9253,12 +9280,23 @@ declare function isDarkMode(): Promise<boolean>;
9253
9280
  * @memberOf module:lib/helpers/utils
9254
9281
  */
9255
9282
  declare function filterString(original: string | string[], value: string, contain?: boolean): string;
9283
+ /**
9284
+ * @summary Retrieves the icon associated with a menu item based on its label.
9285
+ *
9286
+ * @param {string} label - The label of the menu item to search for. The search is case-insensitive.
9287
+ * @param {IMenuItem[]} menu - An array of menu items to search within.
9288
+ * @returns {string} The icon associated with the menu item if found, otherwise an empty string.
9289
+ */
9290
+ declare function getMenuIcon(label: string, menu: IMenuItem[]): string;
9256
9291
 
9257
- declare class DecafFakerRepository<T extends Model> {
9292
+ declare class DecafFakerRepository<T extends Model> extends LoggedClass {
9258
9293
  protected model: string | Model;
9259
9294
  protected limit: number;
9295
+ protected propFnMapper?: KeyValue;
9260
9296
  protected data: T[];
9261
9297
  protected _repository: DecafRepository<Model> | undefined;
9298
+ protected pk: string | undefined;
9299
+ protected pkType?: string;
9262
9300
  constructor(model: string | Model, limit?: number);
9263
9301
  protected get repository(): DecafRepository<Model>;
9264
9302
  initialize(): Promise<void>;
@@ -9395,6 +9433,7 @@ declare function provideDecafDbAdapter<DbAdapter extends {
9395
9433
  */
9396
9434
  declare const decafPageTransition: (baseEl: HTMLElement, opts?: KeyValue) => _ionic_angular_standalone.Animation;
9397
9435
  declare function provideDecafPageTransition(): EnvironmentProviders;
9436
+ declare function provideDecafDarkMode(): EnvironmentProviders;
9398
9437
  /**
9399
9438
  * @description Retrieves a logger instance for the given context.
9400
9439
  * @summary Creates or retrieves a namespaced logger instance using the Decaf logging system.
@@ -9560,5 +9599,5 @@ declare class I18nParser extends TranslateParser {
9560
9599
  */
9561
9600
  declare function provideDecafI18nConfig(config?: RootTranslateServiceConfig, resources?: I18nResourceConfigType, versionedSuffix?: boolean): AngularProvider[];
9562
9601
 
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 };
9602
+ 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, getMenuIcon, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxModalCrudComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, parseToValidDate, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDarkMode, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
9564
9603
  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.54",
3
+ "version": "0.0.56",
4
4
  "author": "Tiago Venceslau and Contributors",
5
5
  "license": "MPL-2.0 OR AGPL-3.0",
6
6
  "repository": {