@mediusinc/mng-commons 3.0.0 → 3.1.0

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.
@@ -37,8 +37,8 @@ export declare class ActionDescriptor<T> {
37
37
  protected _hasRunNotificationError: boolean;
38
38
  protected _runNotificationErrorTitle?: string;
39
39
  protected _runNotificationErrorMessage?: string;
40
- protected _afterRunAction?: ActionDescriptor<unknown>;
41
- protected _onRunErrorAction?: ActionDescriptor<T>;
40
+ protected _afterRunAction?: ActionDescriptor<unknown> | ((ctx: ActionContext<T, any>) => ActionDescriptor<unknown>);
41
+ protected _onRunErrorAction?: ActionDescriptor<T> | ((ctx: ActionContext<T, any>) => ActionDescriptor<T>);
42
42
  protected _permissions?: APermissions;
43
43
  protected _button: ActionButtonDescriptor;
44
44
  protected _hasItemsSelection: boolean;
@@ -71,8 +71,8 @@ export declare class ActionDescriptor<T> {
71
71
  get hasRunNotificationError(): boolean;
72
72
  get runNotificationErrorTitle(): string | undefined;
73
73
  get runNotificationErrorMessage(): string | undefined;
74
- get afterRunAction(): ActionDescriptor<unknown> | undefined;
75
- get onRunErrorAction(): ActionDescriptor<T> | undefined;
74
+ get afterRunAction(): ActionDescriptor<unknown> | ((ctx: ActionContext<T, any>) => ActionDescriptor<unknown>) | undefined;
75
+ get onRunErrorAction(): ActionDescriptor<T> | ((ctx: ActionContext<T, any>) => ActionDescriptor<T>) | undefined;
76
76
  get permissions(): APermissions | undefined;
77
77
  get tableviewCategory(): string | undefined;
78
78
  get hasItemsSelection(): boolean;
@@ -100,8 +100,8 @@ export declare class ActionDescriptor<T> {
100
100
  withRunConfirmationDescriptor(runConfirmationDialogDescriptor: ActionConfirmationDialogDescriptor<T>): this;
101
101
  withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): this;
102
102
  withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
103
- withAfterRunAction<RT>(action: ActionDescriptor<RT>): this;
104
- withOnRunErrorAction(action: ActionDescriptor<T>): this;
103
+ withAfterRunAction<RT, S = any>(action: ActionDescriptor<RT> | ((ctx: ActionContext<T, S>) => ActionDescriptor<RT>)): this;
104
+ withOnRunErrorAction<S = any>(action: ActionDescriptor<T> | ((ctx: ActionContext<T, S>) => ActionDescriptor<T>)): this;
105
105
  withPermissions(permissions: APermissions): this;
106
106
  withTableviewCategory(permissionsRouteType: string): this;
107
107
  withButtonDescriptor(button: ActionButtonDescriptor): this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.0.0",
6
6
  "@angular/common": "^16.0.0",