@decaf-ts/for-angular 0.0.73 → 0.0.76
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 +76 -72
- package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
- package/index.d.ts +35 -21
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ import { TextFieldTypes, SelectInterface, AutocompleteTypes, CheckboxCustomEvent
|
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
6
6
|
import { FormGroup, FormControl, FormArray, ControlValueAccessor, AbstractControl } from '@angular/forms';
|
|
7
7
|
import { OrderDirection, Repository, Adapter, EventIds, AttributeOption, Observer, Paginator, Condition } from '@decaf-ts/core';
|
|
8
|
-
import { FieldProperties, IPagedComponentProperties,
|
|
8
|
+
import { CrudOperationKeys, FieldProperties, IPagedComponentProperties, UIFunctionLike, HTML5InputTypes, DecafComponent, UIModelMetadata, FieldDefinition, UIMediaBreakPointsType, UIElementMetadata, RenderingEngine, DecafEventHandler } from '@decaf-ts/ui-decorators';
|
|
9
9
|
import * as _decaf_ts_decorator_validation from '@decaf-ts/decorator-validation';
|
|
10
10
|
import { VALIDATION_PARENT_KEY, Model, ModelConstructor } from '@decaf-ts/decorator-validation';
|
|
11
11
|
import * as _ionic_angular_standalone from '@ionic/angular/standalone';
|
|
12
|
-
import { ModalOptions, SelectCustomEvent, ItemReorderEventDetail, IonModal } from '@ionic/angular/standalone';
|
|
13
|
-
import { RepositoryFlags, Context, CrudOperations,
|
|
12
|
+
import { ModalOptions, LoadingOptions, SelectCustomEvent, ItemReorderEventDetail, IonModal } from '@ionic/angular/standalone';
|
|
13
|
+
import { OperationKeys, RepositoryFlags, Context, CrudOperations, IRepository } from '@decaf-ts/db-decorators';
|
|
14
14
|
import { Constructor } from '@decaf-ts/decoration';
|
|
15
15
|
import { Router } from '@angular/router';
|
|
16
16
|
import * as i1 from '@angular/common';
|
|
@@ -19,6 +19,7 @@ import * as i3 from '@ngx-translate/core';
|
|
|
19
19
|
import { TranslateService, TranslateLoader, TranslationObject, TranslateParser, RootTranslateServiceConfig } from '@ngx-translate/core';
|
|
20
20
|
import { Observable, Subject, Subscription } from 'rxjs';
|
|
21
21
|
import { HttpClient } from '@angular/common/http';
|
|
22
|
+
import { OverlayBaseController } from '@ionic/angular/common';
|
|
22
23
|
import { SafeHtml, DomSanitizer, Title } from '@angular/platform-browser';
|
|
23
24
|
import { NavigationOptions } from '@ionic/angular/common/providers/nav-controller';
|
|
24
25
|
import { FunctionLike as FunctionLike$1 } from 'src/lib/engine';
|
|
@@ -49,6 +50,10 @@ declare const ActionRoles: {
|
|
|
49
50
|
readonly submit: "submit";
|
|
50
51
|
readonly clear: "clear";
|
|
51
52
|
readonly back: "back";
|
|
53
|
+
readonly create: OperationKeys.CREATE;
|
|
54
|
+
readonly read: OperationKeys.READ;
|
|
55
|
+
readonly update: OperationKeys.UPDATE;
|
|
56
|
+
readonly delete: OperationKeys.DELETE;
|
|
52
57
|
};
|
|
53
58
|
declare const WindowColorSchemes: {
|
|
54
59
|
readonly light: "light";
|
|
@@ -667,6 +672,7 @@ interface I18nToken {
|
|
|
667
672
|
*/
|
|
668
673
|
interface ICrudFormEvent extends IBaseCustomEvent {
|
|
669
674
|
handlers?: Record<string, unknown>;
|
|
675
|
+
role: (typeof ActionRoles)[keyof typeof ActionRoles] & CrudOperationKeys;
|
|
670
676
|
}
|
|
671
677
|
/**
|
|
672
678
|
* @description Pagination custom event
|
|
@@ -1598,6 +1604,17 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1598
1604
|
* @type {Location}
|
|
1599
1605
|
*/
|
|
1600
1606
|
location: Location;
|
|
1607
|
+
/**
|
|
1608
|
+
* @description Ionic loading overlay manager available to derived components.
|
|
1609
|
+
* @summary Provides convenient access to Ionic's LoadingController, enabling directive
|
|
1610
|
+
* subclasses to create, present, and dismiss loading overlays without wiring the
|
|
1611
|
+
* service themselves. Use this helper to surface async progress indicators tied to
|
|
1612
|
+
* CRUD operations, navigation, or any long-running UI task.
|
|
1613
|
+
* @type {LoadingController}
|
|
1614
|
+
* @returns {OverlayBaseController<LoadingOptions, HTMLIonLoadingElement>}
|
|
1615
|
+
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1616
|
+
*/
|
|
1617
|
+
protected loadingController: OverlayBaseController<LoadingOptions, HTMLIonLoadingElement>;
|
|
1601
1618
|
/**
|
|
1602
1619
|
* @description Flag indicating if the component is rendered as a child of a modal dialog.
|
|
1603
1620
|
* @summary Determines whether this component instance is being displayed within a modal
|
|
@@ -1613,6 +1630,15 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1613
1630
|
isModalChild: boolean;
|
|
1614
1631
|
protected handlers: Record<string, UIFunctionLike>;
|
|
1615
1632
|
protected events: Record<string, UIFunctionLike>;
|
|
1633
|
+
/**
|
|
1634
|
+
* @description Custom parser invoked whenever the directive receives raw values.
|
|
1635
|
+
* @summary Allows callers to inject a reusable parsing function that normalizes or
|
|
1636
|
+
* coerces inbound component data (form inputs, handler payloads, etc.) before the
|
|
1637
|
+
* directive consumes it. Use this hook to apply business rules or format conversions
|
|
1638
|
+
* without modifying internal directive logic.
|
|
1639
|
+
* @type {UIFunctionLike}
|
|
1640
|
+
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1641
|
+
*/
|
|
1616
1642
|
valueParserFn: UIFunctionLike;
|
|
1617
1643
|
/**
|
|
1618
1644
|
* @description Indicates whether a refresh operation is in progress.
|
|
@@ -3046,7 +3072,6 @@ declare class CrudFieldComponent extends NgxFormFieldDirective implements OnInit
|
|
|
3046
3072
|
* @memberOf CrudFieldComponent
|
|
3047
3073
|
*/
|
|
3048
3074
|
translatable: boolean;
|
|
3049
|
-
private loadingController;
|
|
3050
3075
|
constructor();
|
|
3051
3076
|
/**
|
|
3052
3077
|
* @description Component initialization lifecycle method.
|
|
@@ -3417,6 +3442,7 @@ declare abstract class NgxFormDirective extends NgxParentComponentDirective impl
|
|
|
3417
3442
|
*/
|
|
3418
3443
|
handleReset(): void;
|
|
3419
3444
|
submit(event?: SubmitEvent, eventName?: string, componentName?: string): Promise<boolean | void>;
|
|
3445
|
+
protected submitEventEmit(data: unknown, componentName?: string, eventName?: string, handlers?: Record<string, UIFunctionLike>): void;
|
|
3420
3446
|
/**
|
|
3421
3447
|
* @description Updates the active form group and children for the specified page.
|
|
3422
3448
|
* @summary Extracts the FormGroup for the given page from the FormArray and filters
|
|
@@ -5521,7 +5547,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5521
5547
|
* @returns {KeyValue} A mapper object that contains string values mapped to the
|
|
5522
5548
|
* component's public keys.
|
|
5523
5549
|
*/
|
|
5524
|
-
protected
|
|
5550
|
+
protected getMapper(): Promise<KeyValue>;
|
|
5525
5551
|
/**
|
|
5526
5552
|
* @description Refreshes the list data from the configured source.
|
|
5527
5553
|
* @summary This method handles both initial data loading and subsequent refresh operations,
|
|
@@ -5580,13 +5606,13 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5580
5606
|
* the appropriate list operations. This includes adding new items, updating existing
|
|
5581
5607
|
* ones, or removing deleted items from the list display.
|
|
5582
5608
|
*
|
|
5583
|
-
* @param {
|
|
5609
|
+
* @param {UIFunctionLike} clazz - The model instance that changed
|
|
5584
5610
|
* @param {OperationKeys} event - The type of operation (CREATE, UPDATE, DELETE)
|
|
5585
5611
|
* @param {string | number} uid - The unique identifier of the affected item
|
|
5586
5612
|
* @returns {Promise<void>}
|
|
5587
5613
|
* @memberOf ListComponent
|
|
5588
5614
|
*/
|
|
5589
|
-
handleObserveEvent(
|
|
5615
|
+
handleObserveEvent(clazz: UIFunctionLike, event: OperationKeys, uid: string | number): Promise<void>;
|
|
5590
5616
|
/**
|
|
5591
5617
|
* @description Function for tracking items in the list.
|
|
5592
5618
|
* @summary Provides a tracking function for the `*ngFor` directive in the component template.
|
|
@@ -5851,7 +5877,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5851
5877
|
*
|
|
5852
5878
|
* @memberOf ListComponent
|
|
5853
5879
|
*/
|
|
5854
|
-
mapResults(data: KeyValue[]): KeyValue[]
|
|
5880
|
+
mapResults(data: KeyValue[]): Promise<KeyValue[]>;
|
|
5855
5881
|
parseSearchValue(): string | IFilterQuery;
|
|
5856
5882
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent, never>;
|
|
5857
5883
|
static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "ngx-decaf-list", never, { "type": { "alias": "type"; "required": false; }; "showSearchbar": { "alias": "showSearchbar"; "required": false; }; "searchbarPlaceholder": { "alias": "searchbarPlaceholder"; "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>;
|
|
@@ -8157,7 +8183,7 @@ declare class TableComponent extends ListComponent implements OnInit {
|
|
|
8157
8183
|
ngOnInit(): Promise<void>;
|
|
8158
8184
|
protected getFilterOptions(): Promise<void>;
|
|
8159
8185
|
protected itemMapper(item: KeyValue, mapper: KeyValue, props?: KeyValue): KeyValue;
|
|
8160
|
-
mapResults(data: KeyValue[]): KeyValue[]
|
|
8186
|
+
mapResults(data: KeyValue[]): Promise<KeyValue[]>;
|
|
8161
8187
|
handleAction(event: Event, action: CrudOperations, uid: string): Promise<void>;
|
|
8162
8188
|
openFilterSelectOptions(event: Event): Promise<void>;
|
|
8163
8189
|
handleFilterSelectClear(event: CustomEvent): Promise<void>;
|
|
@@ -9279,18 +9305,6 @@ declare abstract class NgxModelPageDirective extends NgxPageDirective {
|
|
|
9279
9305
|
* @memberOf ModelPage
|
|
9280
9306
|
*/
|
|
9281
9307
|
modelName: string;
|
|
9282
|
-
/**
|
|
9283
|
-
* @description Array of operations allowed for the current model instance.
|
|
9284
|
-
* @summary Dynamically determined list of operations that are permitted based on
|
|
9285
|
-
* the current context and model state. Initially contains CREATE and READ operations,
|
|
9286
|
-
* with UPDATE and DELETE added when a modelId is present. This controls which
|
|
9287
|
-
* action buttons are displayed and which operations are accessible to the user.
|
|
9288
|
-
*
|
|
9289
|
-
* @type {OperationKeys[]}
|
|
9290
|
-
* @default [OperationKeys.CREATE, OperationKeys.READ]
|
|
9291
|
-
* @memberOf ModelPage
|
|
9292
|
-
*/
|
|
9293
|
-
allowedOperations: OperationKeys[];
|
|
9294
9308
|
/**
|
|
9295
9309
|
* @description Current model data loaded from the repository.
|
|
9296
9310
|
* @summary Stores the raw data object representing the current model instance retrieved
|