@smallpearl/ngx-helper 0.31.1 → 0.31.6

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.
@@ -1,5 +1,5 @@
1
1
  import { EmbeddedViewRef, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { Subscription } from 'rxjs';
2
+ import { Observable, Subscription } from 'rxjs';
3
3
  import { SPMatEntityCrudComponentBase } from './mat-entity-crud-internal-types';
4
4
  import { SPMatEntityCrudConfig, SPMatEntityCrudCreateEditBridge } from './mat-entity-crud-types';
5
5
  import { TranslocoService } from '@jsverse/transloco';
@@ -7,8 +7,10 @@ import * as i0 from "@angular/core";
7
7
  export declare class FormViewHostComponent<TEntity> implements SPMatEntityCrudCreateEditBridge, OnInit, OnDestroy {
8
8
  entityCrudComponentBase: import("@angular/core").InputSignal<SPMatEntityCrudComponentBase<TEntity>>;
9
9
  clientViewTemplate: import("@angular/core").InputSignal<TemplateRef<any> | null>;
10
- itemLabel: import("@angular/core").InputSignal<string>;
11
- itemLabelPlural: import("@angular/core").InputSignal<string>;
10
+ itemLabel: import("@angular/core").InputSignal<string | Observable<string>>;
11
+ itemLabelPlural: import("@angular/core").InputSignal<string | Observable<string>>;
12
+ _itemLabel: import("@angular/core").Signal<Observable<string>>;
13
+ _itemLabelPlural: import("@angular/core").Signal<Observable<string>>;
12
14
  entity: import("@angular/core").WritableSignal<TEntity | undefined>;
13
15
  title: import("@angular/core").WritableSignal<string>;
14
16
  params: import("@angular/core").WritableSignal<any>;
@@ -23,8 +25,8 @@ export declare class FormViewHostComponent<TEntity> implements SPMatEntityCrudCr
23
25
  show(entity: TEntity | undefined, params?: any): void;
24
26
  close(cancel: boolean): void;
25
27
  registerCanCancelEditCallback(callback: () => boolean): void;
26
- create(entityValue: any): import("rxjs").Observable<any>;
27
- update(id: any, entityValue: any): import("rxjs").Observable<any>;
28
+ create(entityValue: any): Observable<any>;
29
+ update(id: any, entityValue: any): Observable<any>;
28
30
  /**
29
31
  * Creates the client view provided via template
30
32
  */
@@ -71,7 +71,7 @@ export interface SPMatEntityCrudComponentBase<TEntity> {
71
71
  * the context menu for an entity in its preview pane toolbar.
72
72
  * @returns
73
73
  */
74
- getItemActions(): SPContextMenuItem[];
74
+ getItemActions(entity?: TEntity): SPContextMenuItem[];
75
75
  /**
76
76
  * Returns the class to be used for the preview pane content. This interface
77
77
  * is provided to allow the PreviewPaneComponent to access the client
@@ -17,13 +17,13 @@ export declare class SPMatEntityCrudComponent<TEntity extends {
17
17
  [P in IdKey]: PropertyKey;
18
18
  }, IdKey extends string = 'id'> extends SPMatEntityListComponent<TEntity, IdKey> implements SPMatEntityCrudComponentBase<TEntity>, AfterViewInit {
19
19
  private snackBar;
20
- itemLabel: import("@angular/core").InputSignal<string | undefined>;
21
- itemLabelPlural: import("@angular/core").InputSignal<string | undefined>;
20
+ itemLabel: import("@angular/core").InputSignal<string | Observable<string> | undefined>;
21
+ itemLabelPlural: import("@angular/core").InputSignal<string | Observable<string> | undefined>;
22
22
  /**
23
23
  * Title string displayed above the component. If not specified, will use
24
24
  * itemLabelPlural() as the title.
25
25
  */
26
- title: import("@angular/core").InputSignal<string | undefined>;
26
+ title: import("@angular/core").InputSignal<string | Observable<string> | undefined>;
27
27
  /**
28
28
  *
29
29
  */
@@ -172,9 +172,9 @@ export declare class SPMatEntityCrudComponent<TEntity extends {
172
172
  */
173
173
  previewPaneContentClass: import("@angular/core").InputSignal<string>;
174
174
  private getLabel;
175
- _itemLabel: import("@angular/core").Signal<string>;
176
- _itemLabelPlural: import("@angular/core").Signal<string>;
177
- _title: import("@angular/core").Signal<string | undefined>;
175
+ _itemLabel: import("@angular/core").Signal<Observable<string>>;
176
+ _itemLabelPlural: import("@angular/core").Signal<Observable<string>>;
177
+ _title: import("@angular/core").Signal<Observable<string | undefined>>;
178
178
  _endpointSansParams: import("@angular/core").Signal<string>;
179
179
  _endpointParams: import("@angular/core").Signal<void>;
180
180
  componentColumns: import("@angular/core").Signal<readonly MatColumnDef[]>;
@@ -218,7 +218,7 @@ export declare class SPMatEntityCrudComponent<TEntity extends {
218
218
  entitiesPaneHidden: import("@angular/core").Signal<boolean>;
219
219
  defaultItemCrudActions: import("@angular/core").WritableSignal<SPContextMenuItem[]>;
220
220
  columnsWithAction: import("@angular/core").Signal<(string | SPEntityFieldSpec<TEntity, IdKey>)[]>;
221
- _itemActions: import("@angular/core").Signal<SPContextMenuItem[]>;
221
+ _itemActions: (entity: TEntity) => SPContextMenuItem[];
222
222
  visibleColumns: import("@angular/core").Signal<string[]>;
223
223
  transloco: TranslocoService;
224
224
  constructor(http: HttpClient, snackBar: MatSnackBar, sanitizer: DomSanitizer, injector: Injector);
@@ -286,7 +286,7 @@ export declare class SPMatEntityCrudComponent<TEntity extends {
286
286
  * to determine if the action is allowed for the given entity.
287
287
  * @returns
288
288
  */
289
- getItemActions(): SPContextMenuItem[];
289
+ getItemActions(entity: TEntity): SPContextMenuItem[];
290
290
  getPreviewPaneContentClass(): string;
291
291
  /**
292
292
  * Initialize the columns for the mat-entities-list component. This is
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "path": "src/assets/i18n/"
7
7
  }
8
8
  ],
9
- "version": "0.31.1",
9
+ "version": "0.31.6",
10
10
  "peerDependencies": {
11
11
  "@angular/common": "^19.1.0",
12
12
  "@angular/core": "^19.1.0",
@@ -51,14 +51,14 @@
51
51
  "types": "./mat-busy-wheel/index.d.ts",
52
52
  "default": "./fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs"
53
53
  },
54
- "./locale": {
55
- "types": "./locale/index.d.ts",
56
- "default": "./fesm2022/smallpearl-ngx-helper-locale.mjs"
57
- },
58
54
  "./hover-dropdown": {
59
55
  "types": "./hover-dropdown/index.d.ts",
60
56
  "default": "./fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs"
61
57
  },
58
+ "./locale": {
59
+ "types": "./locale/index.d.ts",
60
+ "default": "./fesm2022/smallpearl-ngx-helper-locale.mjs"
61
+ },
62
62
  "./mat-context-menu": {
63
63
  "types": "./mat-context-menu/index.d.ts",
64
64
  "default": "./fesm2022/smallpearl-ngx-helper-mat-context-menu.mjs"