@decaf-ts/for-angular 0.0.47 → 0.0.48
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 +438 -248
- package/fesm2022/decaf-ts-for-angular.mjs.map +1 -1
- package/index.d.ts +74 -77
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ 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, Paginator, Condition } from '@decaf-ts/core';
|
|
8
|
-
import { FieldProperties, IPagedComponentProperties, CrudOperationKeys, UIFunctionLike, HTML5InputTypes, DecafComponent, UIModelMetadata, FieldDefinition, UIMediaBreakPointsType, RenderingEngine } from '@decaf-ts/ui-decorators';
|
|
8
|
+
import { FieldProperties, IPagedComponentProperties, CrudOperationKeys, 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 { Model, VALIDATION_PARENT_KEY, ModelConstructor } from '@decaf-ts/decorator-validation';
|
|
11
11
|
import { RepositoryFlags, Context, CrudOperations, OperationKeys, IRepository } from '@decaf-ts/db-decorators';
|
|
@@ -19,8 +19,8 @@ import { TranslateService, TranslateLoader, TranslationObject, TranslateParser,
|
|
|
19
19
|
import { HttpClient } from '@angular/common/http';
|
|
20
20
|
import { Observable, Subscription } from 'rxjs';
|
|
21
21
|
import { SafeHtml, DomSanitizer, Title } from '@angular/platform-browser';
|
|
22
|
-
import { LoggedClass, Logger } from '@decaf-ts/logging';
|
|
23
22
|
import { InjectablesRegistry } from '@decaf-ts/injectable-decorators';
|
|
23
|
+
import { Logger } from '@decaf-ts/logging';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* @module lib/engine/interfaces
|
|
@@ -778,8 +778,8 @@ interface RawQuery<M extends Model> {
|
|
|
778
778
|
limit?: number;
|
|
779
779
|
skip?: number;
|
|
780
780
|
}
|
|
781
|
-
type DecafRepositoryAdapter<F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = Adapter<any, any, RawQuery<any>,
|
|
782
|
-
type DecafRepository<M extends Model> = Repository<M,
|
|
781
|
+
type DecafRepositoryAdapter<F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = Adapter<any, any, RawQuery<any>, C>;
|
|
782
|
+
type DecafRepository<M extends Model> = Repository<M, DecafRepositoryAdapter<RepositoryFlags, Context>>;
|
|
783
783
|
/**
|
|
784
784
|
* @description Generic key-value pair type
|
|
785
785
|
* @summary Represents a generic object with string keys and any type of values.
|
|
@@ -1310,6 +1310,7 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1310
1310
|
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1311
1311
|
*/
|
|
1312
1312
|
modelId?: EventIds;
|
|
1313
|
+
value: unknown;
|
|
1313
1314
|
/**
|
|
1314
1315
|
* @description Primary key field name for the data model.
|
|
1315
1316
|
* @summary Specifies which field in the model should be used as the primary key.
|
|
@@ -1347,9 +1348,9 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1347
1348
|
* The operation affects form validation, field availability, and the specific repository
|
|
1348
1349
|
* method called during data submission.
|
|
1349
1350
|
*
|
|
1350
|
-
* @type {OperationKeys
|
|
1351
|
+
* @type {OperationKeys}
|
|
1351
1352
|
* @default OperationKeys.READ
|
|
1352
|
-
*
|
|
1353
|
+
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1353
1354
|
*/
|
|
1354
1355
|
operation: OperationKeys | undefined;
|
|
1355
1356
|
/**
|
|
@@ -1437,6 +1438,16 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1437
1438
|
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1438
1439
|
*/
|
|
1439
1440
|
listenEvent: EventEmitter<IBaseCustomEvent>;
|
|
1441
|
+
/**
|
|
1442
|
+
* @description Event emitter for custom component events.
|
|
1443
|
+
* @summary Emits custom events that occur within child components or the component itself.
|
|
1444
|
+
* This allows parent components to listen for and respond to user interactions or
|
|
1445
|
+
* state changes. Events are passed up the component hierarchy to enable coordinated
|
|
1446
|
+
* behavior across the application.
|
|
1447
|
+
* @type {EventEmitter<IBaseCustomEvent>}
|
|
1448
|
+
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1449
|
+
*/
|
|
1450
|
+
refreshEvent: EventEmitter<IBaseCustomEvent | boolean>;
|
|
1440
1451
|
/**
|
|
1441
1452
|
* @description Angular Router instance for programmatic navigation.
|
|
1442
1453
|
* @summary Injected Router service used for programmatic navigation between routes
|
|
@@ -1446,7 +1457,7 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1446
1457
|
* @type {Router}
|
|
1447
1458
|
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1448
1459
|
*/
|
|
1449
|
-
|
|
1460
|
+
router: Router;
|
|
1450
1461
|
/**
|
|
1451
1462
|
* @description Current locale identifier for component internationalization.
|
|
1452
1463
|
* @summary Specifies the locale code (e.g., 'en-US', 'pt-BR') used for translating UI text
|
|
@@ -1528,6 +1539,16 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1528
1539
|
isModalChild: boolean;
|
|
1529
1540
|
protected handlers: Record<string, UIFunctionLike>;
|
|
1530
1541
|
protected events: Record<string, UIFunctionLike>;
|
|
1542
|
+
/**
|
|
1543
|
+
* @description Indicates whether a refresh operation is in progress.
|
|
1544
|
+
* @summary When true, the component is currently fetching new data. This is used
|
|
1545
|
+
* to control loading indicators and prevent duplicate refresh operations from
|
|
1546
|
+
* being triggered simultaneously.
|
|
1547
|
+
*
|
|
1548
|
+
* @type {boolean}
|
|
1549
|
+
* @default false
|
|
1550
|
+
*/
|
|
1551
|
+
refreshing: boolean;
|
|
1531
1552
|
/**
|
|
1532
1553
|
* @description Constructor for NgxComponentDirective.
|
|
1533
1554
|
* @summary Initializes the directive by setting up the component name, locale root,
|
|
@@ -1548,6 +1569,7 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1548
1569
|
* @returns {void}
|
|
1549
1570
|
*/
|
|
1550
1571
|
ngOnDestroy(): Promise<void> | void;
|
|
1572
|
+
refresh(...args: unknown[]): Promise<void>;
|
|
1551
1573
|
/**
|
|
1552
1574
|
* @description Getter for the current locale context identifier.
|
|
1553
1575
|
* @summary Returns the current locale identifier by calling the getLocale method.
|
|
@@ -1566,7 +1588,8 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1566
1588
|
* @throws {InternalError} If repository initialization fails
|
|
1567
1589
|
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1568
1590
|
*/
|
|
1569
|
-
|
|
1591
|
+
get repository(): DecafRepository<Model> | undefined;
|
|
1592
|
+
set repository(repository: DecafRepository<Model> | undefined);
|
|
1570
1593
|
/**
|
|
1571
1594
|
* @description Angular lifecycle hook for handling input property changes.
|
|
1572
1595
|
* @summary Responds to changes in component input properties, specifically monitoring changes
|
|
@@ -1722,7 +1745,7 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1722
1745
|
* end
|
|
1723
1746
|
* @memberOf module:lib/engine/NgxComponentDirective
|
|
1724
1747
|
*/
|
|
1725
|
-
handleEvent(event: IBaseCustomEvent | ICrudFormEvent | CustomEvent): Promise<void>;
|
|
1748
|
+
handleEvent(event: IBaseCustomEvent | ICrudFormEvent | CustomEvent, repository?: DecafRepository<Model>): Promise<void>;
|
|
1726
1749
|
/**
|
|
1727
1750
|
* @description Determines if a specific operation is allowed in the current context.
|
|
1728
1751
|
* @summary This method checks if an operation is included in the list of available
|
|
@@ -1775,7 +1798,7 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
|
|
|
1775
1798
|
*/
|
|
1776
1799
|
changeOperation(operation: string, id?: string): Promise<boolean>;
|
|
1777
1800
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxComponentDirective, never>;
|
|
1778
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxComponentDirective, never, never, { "enableDarkMode": { "alias": "enableDarkMode"; "required": false; }; "isDarkMode": { "alias": "isDarkMode"; "required": false; }; "name": { "alias": "name"; "required": false; }; "childOf": { "alias": "childOf"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "model": { "alias": "model"; "required": false; }; "modelId": { "alias": "modelId"; "required": false; }; "pk": { "alias": "pk"; "required": false; }; "mapper": { "alias": "mapper"; "required": false; }; "operations": { "alias": "operations"; "required": false; }; "operation": { "alias": "operation"; "required": false; }; "row": { "alias": "row"; "required": false; }; "col": { "alias": "col"; "required": false; }; "className": { "alias": "className"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "item": { "alias": "item"; "required": false; }; "props": { "alias": "props"; "required": false; }; "route": { "alias": "route"; "required": false; }; "borders": { "alias": "borders"; "required": false; }; "isModalChild": { "alias": "isModalChild"; "required": false; }; "handlers": { "alias": "handlers"; "required": false; }; "events": { "alias": "events"; "required": false; }; }, { "listenEvent": "listenEvent"; }, never, never, true, never>;
|
|
1801
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxComponentDirective, never, never, { "enableDarkMode": { "alias": "enableDarkMode"; "required": false; }; "isDarkMode": { "alias": "isDarkMode"; "required": false; }; "name": { "alias": "name"; "required": false; }; "childOf": { "alias": "childOf"; "required": false; }; "uid": { "alias": "uid"; "required": false; }; "model": { "alias": "model"; "required": false; }; "modelId": { "alias": "modelId"; "required": false; }; "value": { "alias": "value"; "required": false; }; "pk": { "alias": "pk"; "required": false; }; "mapper": { "alias": "mapper"; "required": false; }; "operations": { "alias": "operations"; "required": false; }; "operation": { "alias": "operation"; "required": false; }; "row": { "alias": "row"; "required": false; }; "col": { "alias": "col"; "required": false; }; "className": { "alias": "className"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "item": { "alias": "item"; "required": false; }; "props": { "alias": "props"; "required": false; }; "route": { "alias": "route"; "required": false; }; "borders": { "alias": "borders"; "required": false; }; "isModalChild": { "alias": "isModalChild"; "required": false; }; "handlers": { "alias": "handlers"; "required": false; }; "events": { "alias": "events"; "required": false; }; }, { "listenEvent": "listenEvent"; "refreshEvent": "refreshEvent"; }, never, never, true, never>;
|
|
1779
1802
|
}
|
|
1780
1803
|
|
|
1781
1804
|
declare class NgxRenderableComponentDirective extends NgxComponentDirective implements OnChanges, OnDestroy, IRenderedModel {
|
|
@@ -3243,7 +3266,7 @@ declare abstract class NgxFormDirective extends NgxParentComponentDirective impl
|
|
|
3243
3266
|
* @returns {void}
|
|
3244
3267
|
*/
|
|
3245
3268
|
handleReset(): void;
|
|
3246
|
-
|
|
3269
|
+
submit(event?: SubmitEvent, eventName?: string, componentName?: string): Promise<boolean | void>;
|
|
3247
3270
|
/**
|
|
3248
3271
|
* @description Updates the active form group and children for the specified page.
|
|
3249
3272
|
* @summary Extracts the FormGroup for the given page from the FormArray and filters
|
|
@@ -3914,7 +3937,7 @@ declare class FieldsetComponent extends NgxFormDirective implements OnInit, Afte
|
|
|
3914
3937
|
* @default []
|
|
3915
3938
|
* @memberOf FieldsetComponent
|
|
3916
3939
|
*/
|
|
3917
|
-
items: IFieldSetItem[];
|
|
3940
|
+
items: IFieldSetItem[] | UIElementMetadata[][];
|
|
3918
3941
|
/**
|
|
3919
3942
|
* @description Currently selected item for update operations.
|
|
3920
3943
|
* @summary Holds the item being edited when in update mode. Used to track
|
|
@@ -4081,6 +4104,7 @@ declare class FieldsetComponent extends NgxFormDirective implements OnInit, Afte
|
|
|
4081
4104
|
* @memberOf FieldsetComponent
|
|
4082
4105
|
*/
|
|
4083
4106
|
ngAfterViewInit(): Promise<void>;
|
|
4107
|
+
refresh(): Promise<void>;
|
|
4084
4108
|
/**
|
|
4085
4109
|
* @description Handles removal of the fieldset with slide animation.
|
|
4086
4110
|
* @summary Initiates the removal process for the fieldset with a smooth slide-up animation.
|
|
@@ -4605,7 +4629,7 @@ declare class FilterComponent extends NgxComponentDirective implements OnInit, O
|
|
|
4605
4629
|
*
|
|
4606
4630
|
* @memberOf FilterComponent
|
|
4607
4631
|
*/
|
|
4608
|
-
addFilter(value: string, event?: CustomEvent): void
|
|
4632
|
+
addFilter(value: string, event?: CustomEvent): Promise<void>;
|
|
4609
4633
|
/**
|
|
4610
4634
|
* @description Selects an option from the dropdown suggestions.
|
|
4611
4635
|
* @summary Handles option selection when a user clicks on a suggestion in the dropdown.
|
|
@@ -4676,10 +4700,10 @@ declare class FilterComponent extends NgxComponentDirective implements OnInit, O
|
|
|
4676
4700
|
* @summary Emits the current filter array to parent components when filters are ready
|
|
4677
4701
|
* to be applied. Only emits if there are active filters. Clears options after submission.
|
|
4678
4702
|
*
|
|
4679
|
-
* @returns {void}
|
|
4703
|
+
* @returns {Promise<void>}
|
|
4680
4704
|
* @memberOf FilterComponent
|
|
4681
4705
|
*/
|
|
4682
|
-
submit(): void
|
|
4706
|
+
submit(): Promise<void>;
|
|
4683
4707
|
/**
|
|
4684
4708
|
* @description Toggles the sort direction between ascending and descending.
|
|
4685
4709
|
* @summary Handles sort direction changes by toggling between ASC and DSC values.
|
|
@@ -5052,7 +5076,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5052
5076
|
* @default "full"
|
|
5053
5077
|
* @memberOf ListComponent
|
|
5054
5078
|
*/
|
|
5055
|
-
lines:
|
|
5079
|
+
lines: 'inset' | 'full' | 'none';
|
|
5056
5080
|
/**
|
|
5057
5081
|
* @description Controls whether the list has inset styling.
|
|
5058
5082
|
* @summary When set to true, the list will have inset styling with rounded corners
|
|
@@ -5083,7 +5107,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5083
5107
|
* @default "bottom"
|
|
5084
5108
|
* @memberOf ListComponent
|
|
5085
5109
|
*/
|
|
5086
|
-
scrollPosition:
|
|
5110
|
+
scrollPosition: 'bottom' | 'top';
|
|
5087
5111
|
/**
|
|
5088
5112
|
* @description Custom text to display during loading operations.
|
|
5089
5113
|
* @summary Specifies the text shown in the loading indicator when the component
|
|
@@ -5198,17 +5222,6 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5198
5222
|
* @memberOf ListComponent
|
|
5199
5223
|
*/
|
|
5200
5224
|
pages: number;
|
|
5201
|
-
/**
|
|
5202
|
-
* @description Indicates whether a refresh operation is in progress.
|
|
5203
|
-
* @summary When true, the component is currently fetching new data. This is used
|
|
5204
|
-
* to control loading indicators and prevent duplicate refresh operations from
|
|
5205
|
-
* being triggered simultaneously.
|
|
5206
|
-
*
|
|
5207
|
-
* @type {boolean}
|
|
5208
|
-
* @default false
|
|
5209
|
-
* @memberOf ListComponent
|
|
5210
|
-
*/
|
|
5211
|
-
refreshing: boolean;
|
|
5212
5225
|
/**
|
|
5213
5226
|
* @description Array used for rendering skeleton loading placeholders.
|
|
5214
5227
|
* @summary Contains placeholder items that are displayed during data loading.
|
|
@@ -5263,15 +5276,6 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5263
5276
|
* @memberOf ListComponent
|
|
5264
5277
|
*/
|
|
5265
5278
|
lastPage: number;
|
|
5266
|
-
/**
|
|
5267
|
-
* @description Event emitter for refresh operations.
|
|
5268
|
-
* @summary Emits an event when the list data is refreshed, either through pull-to-refresh
|
|
5269
|
-
* or programmatic refresh. The event includes the refreshed data and component information.
|
|
5270
|
-
*
|
|
5271
|
-
* @type {EventEmitter<IBaseCustomEvent>}
|
|
5272
|
-
* @memberOf ListComponent
|
|
5273
|
-
*/
|
|
5274
|
-
refreshEvent: EventEmitter<IBaseCustomEvent>;
|
|
5275
5279
|
/**
|
|
5276
5280
|
* @description Event emitter for item click interactions.
|
|
5277
5281
|
* @summary Emits an event when a list item is clicked. The event includes the data
|
|
@@ -5581,16 +5585,16 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5581
5585
|
*/
|
|
5582
5586
|
refresh(event?: InfiniteScrollCustomEvent | RefresherCustomEvent | boolean): Promise<void>;
|
|
5583
5587
|
/**
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5588
|
+
* @description Handles pagination events from the pagination component.
|
|
5589
|
+
* @summary Processes pagination events by updating the current page number and
|
|
5590
|
+
* refreshing the list data to display the selected page. This method is called
|
|
5591
|
+
* when a user interacts with the pagination controls to navigate between pages.
|
|
5592
|
+
*
|
|
5593
|
+
* @param {IPaginationCustomEvent} event - The pagination event containing page information
|
|
5594
|
+
* @returns {void}
|
|
5595
|
+
*
|
|
5596
|
+
* @memberOf ListComponent
|
|
5597
|
+
*/
|
|
5594
5598
|
handlePaginate(event: IPaginationCustomEvent): void;
|
|
5595
5599
|
/**
|
|
5596
5600
|
* @description Handles pull-to-refresh events from the refresher component.
|
|
@@ -5679,7 +5683,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5679
5683
|
*
|
|
5680
5684
|
* @memberOf ListComponent
|
|
5681
5685
|
*/
|
|
5682
|
-
protected parseResult(result: KeyValue[] | Paginator<
|
|
5686
|
+
protected parseResult(result: KeyValue[] | Paginator<any>): Promise<KeyValue[]>;
|
|
5683
5687
|
/**
|
|
5684
5688
|
* @description Updates pagination state based on data length.
|
|
5685
5689
|
* @summary Calculates whether more data is available and how many pages exist
|
|
@@ -5721,7 +5725,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
|
|
|
5721
5725
|
mapResults(data: KeyValue[]): KeyValue[];
|
|
5722
5726
|
parseSearchValue(): string | IFilterQuery;
|
|
5723
5727
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent, never>;
|
|
5724
|
-
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; }; }, { "
|
|
5728
|
+
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>;
|
|
5725
5729
|
}
|
|
5726
5730
|
|
|
5727
5731
|
/**
|
|
@@ -6159,7 +6163,7 @@ declare class ModelRendererComponent<M extends Model> extends NgxRenderableCompo
|
|
|
6159
6163
|
* @description Refreshes the rendered model
|
|
6160
6164
|
* @param {string | M} model - The model to be rendered
|
|
6161
6165
|
*/
|
|
6162
|
-
|
|
6166
|
+
refresh(model: string | M): Promise<void>;
|
|
6163
6167
|
/**
|
|
6164
6168
|
* @description Lifecycle hook that is called when data-bound properties of a directive change
|
|
6165
6169
|
* @param {SimpleChanges} changes - Object containing changes
|
|
@@ -8529,17 +8533,8 @@ declare class NgxFormService {
|
|
|
8529
8533
|
static reset(formGroup: FormGroup | FormControl): void;
|
|
8530
8534
|
}
|
|
8531
8535
|
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
* @description Event handler base class used by Decaf components.
|
|
8535
|
-
* @summary Defines NgxEventHandler which standardizes event handling logic and provides
|
|
8536
|
-
* logging support for handlers that process custom events emitted by components.
|
|
8537
|
-
*
|
|
8538
|
-
* @link {@link NgxEventHandler}
|
|
8539
|
-
*/
|
|
8540
|
-
|
|
8541
|
-
declare abstract class NgxEventHandler<PAYLOAD> extends LoggedClass {
|
|
8542
|
-
abstract handle(evt: IBaseCustomEvent | CustomEvent<PAYLOAD>): Promise<unknown>;
|
|
8536
|
+
declare abstract class NgxEventHandler extends DecafEventHandler {
|
|
8537
|
+
refresh(args?: unknown[]): Promise<void>;
|
|
8543
8538
|
}
|
|
8544
8539
|
|
|
8545
8540
|
/**
|
|
@@ -8732,15 +8727,15 @@ declare abstract class NgxModelPageDirective extends NgxPageDirective {
|
|
|
8732
8727
|
*/
|
|
8733
8728
|
allowedOperations: OperationKeys[];
|
|
8734
8729
|
/**
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8730
|
+
* @description Current model data loaded from the repository.
|
|
8731
|
+
* @summary Stores the raw data object representing the current model instance retrieved
|
|
8732
|
+
* from the repository. This property holds the actual data values for the model being
|
|
8733
|
+
* displayed or edited, and is set to undefined when no data is available or when an
|
|
8734
|
+
* error occurs during data loading.
|
|
8735
|
+
* @type {KeyValue | undefined}
|
|
8736
|
+
* @default undefined
|
|
8737
|
+
* @memberOf NgxModelPageDirective
|
|
8738
|
+
*/
|
|
8744
8739
|
modelData: KeyValue | undefined;
|
|
8745
8740
|
/**
|
|
8746
8741
|
* @description Error message from failed operations.
|
|
@@ -8764,7 +8759,7 @@ declare abstract class NgxModelPageDirective extends NgxPageDirective {
|
|
|
8764
8759
|
*
|
|
8765
8760
|
* @throws {InternalError} When the model is not found in the registry
|
|
8766
8761
|
*/
|
|
8767
|
-
|
|
8762
|
+
get repository(): DecafRepository<Model> | undefined;
|
|
8768
8763
|
/**
|
|
8769
8764
|
* @description Angular lifecycle hook for component initialization.
|
|
8770
8765
|
* @summary Initializes the component by setting up the logger instance using the getLogger
|
|
@@ -8786,12 +8781,12 @@ declare abstract class NgxModelPageDirective extends NgxPageDirective {
|
|
|
8786
8781
|
* @description Generic event handler for component events.
|
|
8787
8782
|
* @summary Processes incoming events from child components and routes them to appropriate
|
|
8788
8783
|
* handlers based on the event name. Currently handles SUBMIT events by delegating to
|
|
8789
|
-
* the
|
|
8784
|
+
* the submit method. This centralized event handling approach allows for easy
|
|
8790
8785
|
* extension and consistent event processing.
|
|
8791
8786
|
*
|
|
8792
8787
|
* @param {IBaseCustomEvent} event - The event object containing event data and metadata
|
|
8793
8788
|
*/
|
|
8794
|
-
handleEvent(event: IBaseCustomEvent): Promise<void>;
|
|
8789
|
+
handleEvent(event: IBaseCustomEvent, repository?: DecafRepository<Model>): Promise<void>;
|
|
8795
8790
|
/**
|
|
8796
8791
|
* @description Handles form submission events for CRUD operations.
|
|
8797
8792
|
* @summary Processes form submission by executing the appropriate repository operation
|
|
@@ -8803,7 +8798,8 @@ declare abstract class NgxModelPageDirective extends NgxPageDirective {
|
|
|
8803
8798
|
* @param {IBaseCustomEvent} event - The submit event containing form data
|
|
8804
8799
|
* @return {Promise<IModelPageCustomEvent|void>} Promise that resolves on success or throws on error
|
|
8805
8800
|
*/
|
|
8806
|
-
|
|
8801
|
+
submit(event: IBaseCustomEvent, repository?: DecafRepository<Model>, redirect?: boolean): Promise<IModelPageCustomEvent | void>;
|
|
8802
|
+
create(data: Partial<Model>, repository: DecafRepository<Model>): Promise<IModelPageCustomEvent | void>;
|
|
8807
8803
|
/**
|
|
8808
8804
|
* @description Retrieves a model instance from the repository by unique identifier.
|
|
8809
8805
|
* @summary Fetches a specific model instance using the repository's read method.
|
|
@@ -8814,7 +8810,7 @@ declare abstract class NgxModelPageDirective extends NgxPageDirective {
|
|
|
8814
8810
|
* @param {string} uid - The unique identifier of the model instance to retrieve
|
|
8815
8811
|
* @return {Promise<Model | undefined>} Promise resolving to the model instance or undefined
|
|
8816
8812
|
*/
|
|
8817
|
-
handleGet(uid?: EventIds, repository?: IRepository<
|
|
8813
|
+
handleGet(uid?: EventIds, repository?: IRepository<any>, modelName?: string): Promise<Model | undefined>;
|
|
8818
8814
|
/**
|
|
8819
8815
|
* @description Parses and transforms form data for repository operations.
|
|
8820
8816
|
* @summary Converts raw form data into the appropriate format for repository operations.
|
|
@@ -9201,7 +9197,7 @@ declare class DecafFakerRepository<T extends Model> {
|
|
|
9201
9197
|
constructor(model: string | Model, limit?: number);
|
|
9202
9198
|
protected get repository(): DecafRepository<Model>;
|
|
9203
9199
|
initialize(): Promise<void>;
|
|
9204
|
-
generateData<T extends Model>(
|
|
9200
|
+
generateData<T extends Model>(values?: KeyValue, key?: string, keyType?: string): Promise<T[]>;
|
|
9205
9201
|
}
|
|
9206
9202
|
declare function getFakerData<T extends Model>(limit: number | undefined, data: Record<string, FunctionLike>, model?: string): T[];
|
|
9207
9203
|
|
|
@@ -9409,6 +9405,7 @@ declare function provideDynamicComponents(...components: Constructor<unknown>[])
|
|
|
9409
9405
|
declare function getModelAndRepository(model: Model | string): {
|
|
9410
9406
|
repository: DecafRepository<Model>;
|
|
9411
9407
|
model: Model;
|
|
9408
|
+
pk: string;
|
|
9412
9409
|
} | undefined;
|
|
9413
9410
|
/**
|
|
9414
9411
|
* @description Provides a database adapter for dependency injection.
|
|
@@ -9434,7 +9431,7 @@ declare function getModelAndRepository(model: Model | string): {
|
|
|
9434
9431
|
*/
|
|
9435
9432
|
declare function provideDbAdapter<DbAdapter extends {
|
|
9436
9433
|
flavour: string;
|
|
9437
|
-
}>(
|
|
9434
|
+
}>(clazz: Constructor<DbAdapter>, options?: KeyValue, flavour?: string): Provider;
|
|
9438
9435
|
/**
|
|
9439
9436
|
* @description Retrieves a logger instance for the given context.
|
|
9440
9437
|
* @summary Creates or retrieves a namespaced logger instance using the Decaf logging system.
|