@decaf-ts/for-angular 0.0.74 → 0.0.77

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
@@ -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, CrudOperationKeys, UIFunctionLike, HTML5InputTypes, DecafComponent, UIModelMetadata, FieldDefinition, UIMediaBreakPointsType, UIElementMetadata, RenderingEngine, DecafEventHandler } from '@decaf-ts/ui-decorators';
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, OperationKeys, IRepository } from '@decaf-ts/db-decorators';
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
@@ -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 {string} table - The table/model name that changed
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(table: string, event: OperationKeys, uid: string | number): Promise<void>;
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.
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/for-angular",
3
- "version": "0.0.74",
3
+ "version": "0.0.77",
4
4
  "author": "Tiago Venceslau and Contributors",
5
5
  "license": "MPL-2.0 OR AGPL-3.0",
6
6
  "repository": {