@stemy/ngx-utils 12.0.5 → 12.1.1
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/bundles/stemy-ngx-utils.umd.js +73 -35
- package/bundles/stemy-ngx-utils.umd.js.map +1 -1
- package/esm2015/ngx-utils/common-types.js +1 -1
- package/esm2015/ngx-utils/directives/async-method.base.js +54 -0
- package/esm2015/ngx-utils/directives/async-method.directive.js +8 -46
- package/esm2015/ngx-utils/services/base-http.service.js +4 -5
- package/esm2015/ngx-utils/services/config.service.js +23 -12
- package/esm2015/public_api.js +2 -1
- package/fesm2015/stemy-ngx-utils.js +51 -28
- package/fesm2015/stemy-ngx-utils.js.map +1 -1
- package/ngx-utils/common-types.d.ts +1 -1
- package/ngx-utils/directives/async-method.base.d.ts +16 -0
- package/ngx-utils/directives/async-method.directive.d.ts +4 -13
- package/package.json +3 -2
- package/public_api.d.ts +1 -0
- package/stemy-ngx-utils.metadata.json +1 -1
|
@@ -180,7 +180,7 @@ export interface IRequestOptions {
|
|
|
180
180
|
headers?: IHttpHeaders | HttpHeaders;
|
|
181
181
|
originalHeaders?: IHttpHeaders;
|
|
182
182
|
params?: IHttpParams;
|
|
183
|
-
observe?: "body";
|
|
183
|
+
observe?: "body" | "response";
|
|
184
184
|
reportProgress?: boolean;
|
|
185
185
|
responseType?: "arraybuffer" | "blob" | "json" | "text";
|
|
186
186
|
withCredentials?: boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import { AsyncMethod, IAsyncMessage, IToasterService } from "../common-types";
|
|
3
|
+
export declare abstract class AsyncMethodBase {
|
|
4
|
+
protected toaster: IToasterService;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
context: any;
|
|
7
|
+
onSuccess: EventEmitter<IAsyncMessage>;
|
|
8
|
+
onError: EventEmitter<IAsyncMessage>;
|
|
9
|
+
protected loading: boolean;
|
|
10
|
+
get isDisabled(): boolean;
|
|
11
|
+
get isLoading(): boolean;
|
|
12
|
+
protected constructor(toaster: IToasterService);
|
|
13
|
+
protected abstract getMethod(): AsyncMethod;
|
|
14
|
+
click(): void;
|
|
15
|
+
callMethod(): boolean;
|
|
16
|
+
}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare class AsyncMethodDirective {
|
|
4
|
-
private toaster;
|
|
1
|
+
import { AsyncMethod, IToasterService } from "../common-types";
|
|
2
|
+
import { AsyncMethodBase } from "./async-method.base";
|
|
3
|
+
export declare class AsyncMethodDirective extends AsyncMethodBase {
|
|
5
4
|
method: AsyncMethod;
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
context: any;
|
|
8
|
-
onSuccess: EventEmitter<IAsyncMessage>;
|
|
9
|
-
onError: EventEmitter<IAsyncMessage>;
|
|
10
|
-
private loading;
|
|
11
|
-
get isDisabled(): boolean;
|
|
12
|
-
get isLoading(): boolean;
|
|
13
5
|
constructor(toaster: IToasterService);
|
|
14
|
-
|
|
15
|
-
callMethod(): boolean;
|
|
6
|
+
protected getMethod(): AsyncMethod;
|
|
16
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stemy/ngx-utils",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"public": true,
|
|
6
6
|
"repository": "https://github.com/stemyke/ngx-utils.git",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"zone.js": "^0.10.3 || ^0.11.4",
|
|
22
22
|
"moment": "^2.27.0",
|
|
23
23
|
"invokable": "^1.0.3",
|
|
24
|
-
"ngx-device-detector": "~2.1.1 || ~3.0.0"
|
|
24
|
+
"ngx-device-detector": "~2.1.1 || ~3.0.0",
|
|
25
|
+
"json5": "^2.2.1"
|
|
25
26
|
},
|
|
26
27
|
"main": "bundles/stemy-ngx-utils.umd.js",
|
|
27
28
|
"module": "fesm2015/stemy-ngx-utils.js",
|
package/public_api.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export { RoundPipe } from "./ngx-utils/pipes/round.pipe";
|
|
|
64
64
|
export { SafeHtmlPipe } from "./ngx-utils/pipes/safe-html.pipe";
|
|
65
65
|
export { TranslatePipe } from "./ngx-utils/pipes/translate.pipe";
|
|
66
66
|
export { ValuesPipe } from "./ngx-utils/pipes/values.pipe";
|
|
67
|
+
export { AsyncMethodBase } from "./ngx-utils/directives/async-method.base";
|
|
67
68
|
export { AsyncMethodDirective } from "./ngx-utils/directives/async-method.directive";
|
|
68
69
|
export { BackgroundDirective } from "./ngx-utils/directives/background.directive";
|
|
69
70
|
export { DynamicTableTemplateDirective } from "./ngx-utils/directives/dynamic-table-template.directive";
|