@stemy/ngx-utils 13.0.4 → 13.0.7
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/esm2020/ngx-utils/common-types.mjs +1 -1
- package/esm2020/ngx-utils/directives/async-method.base.mjs +16 -6
- package/esm2020/ngx-utils/directives/async-method.directive.mjs +4 -11
- package/esm2020/ngx-utils/ngx-utils.imports.mjs +3 -1
- package/esm2020/ngx-utils/ngx-utils.module.mjs +20 -19
- package/esm2020/ngx-utils/services/config.service.mjs +3 -2
- package/fesm2015/stemy-ngx-utils.mjs +23 -18
- package/fesm2015/stemy-ngx-utils.mjs.map +1 -1
- package/fesm2020/stemy-ngx-utils.mjs +21 -16
- package/fesm2020/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +3 -0
- package/ngx-utils/directives/async-method.base.d.ts +4 -4
- package/ngx-utils/directives/async-method.directive.d.ts +1 -2
- package/ngx-utils/ngx-utils.module.d.ts +20 -19
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, TemplateRef, PLATFORM_ID, Injectable, Inject, Optional, Injector, EventEmitter, isDevMode, ErrorHandler, NgZone, Pipe, Input, Output, HostBinding, HostListener,
|
|
2
|
+
import { InjectionToken, TemplateRef, PLATFORM_ID, Injectable, Inject, Optional, Injector, EventEmitter, isDevMode, ErrorHandler, NgZone, Pipe, Directive, Input, Output, HostBinding, HostListener, Component, ContentChildren, ViewChild, ContentChild, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
4
|
import { utc } from 'moment';
|
|
5
5
|
import { first, skipWhile, mergeMap, timeout, map } from 'rxjs/operators';
|
|
@@ -14,6 +14,7 @@ import * as i1 from 'ngx-device-detector';
|
|
|
14
14
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
15
15
|
import * as i1$1 from '@angular/common/http';
|
|
16
16
|
import { HttpClient, HttpHeaders, HttpParams, HttpUrlEncodingCodec, HttpEventType } from '@angular/common/http';
|
|
17
|
+
import * as JSON5 from 'json5';
|
|
17
18
|
import * as i1$2 from '@angular/platform-browser';
|
|
18
19
|
import { ɵDomEventsPlugin, EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
19
20
|
import { addListener, removeListener } from 'resize-detector';
|
|
@@ -2552,7 +2553,7 @@ class ConfigService {
|
|
|
2552
2553
|
const configUrl = this.configUrl;
|
|
2553
2554
|
try {
|
|
2554
2555
|
const config5 = yield this.http.get(isDevMode() ? `${configUrl}5` : configUrl, { responseType: "text" }).toPromise();
|
|
2555
|
-
return
|
|
2556
|
+
return JSON5.parse(config5);
|
|
2556
2557
|
}
|
|
2557
2558
|
catch (e) {
|
|
2558
2559
|
try {
|
|
@@ -3968,6 +3969,9 @@ class AsyncMethodBase {
|
|
|
3968
3969
|
get isLoading() {
|
|
3969
3970
|
return this.loading;
|
|
3970
3971
|
}
|
|
3972
|
+
getMethod() {
|
|
3973
|
+
return () => __awaiter(this, void 0, void 0, function* () { return null; });
|
|
3974
|
+
}
|
|
3971
3975
|
click() {
|
|
3972
3976
|
if (this.disabled)
|
|
3973
3977
|
return;
|
|
@@ -3999,11 +4003,19 @@ class AsyncMethodBase {
|
|
|
3999
4003
|
return true;
|
|
4000
4004
|
}
|
|
4001
4005
|
}
|
|
4002
|
-
AsyncMethodBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodBase, deps:
|
|
4003
|
-
AsyncMethodBase.ɵ
|
|
4006
|
+
AsyncMethodBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodBase, deps: [{ token: TOASTER_SERVICE }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4007
|
+
AsyncMethodBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: AsyncMethodBase, selector: "[__asmb__]", inputs: { disabled: "disabled", context: "context" }, outputs: { onSuccess: "onSuccess", onError: "onError" }, host: { listeners: { "click": "click()" }, properties: { "class.disabled": "this.isDisabled", "class.loading": "this.isLoading" } }, ngImport: i0 });
|
|
4004
4008
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodBase, decorators: [{
|
|
4005
|
-
type:
|
|
4006
|
-
|
|
4009
|
+
type: Directive,
|
|
4010
|
+
args: [{
|
|
4011
|
+
selector: "[__asmb__]"
|
|
4012
|
+
}]
|
|
4013
|
+
}], ctorParameters: function () {
|
|
4014
|
+
return [{ type: undefined, decorators: [{
|
|
4015
|
+
type: Inject,
|
|
4016
|
+
args: [TOASTER_SERVICE]
|
|
4017
|
+
}] }];
|
|
4018
|
+
}, propDecorators: { disabled: [{
|
|
4007
4019
|
type: Input
|
|
4008
4020
|
}], context: [{
|
|
4009
4021
|
type: Input
|
|
@@ -4023,14 +4035,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
4023
4035
|
}] } });
|
|
4024
4036
|
|
|
4025
4037
|
class AsyncMethodDirective extends AsyncMethodBase {
|
|
4026
|
-
constructor(toaster) {
|
|
4027
|
-
super(toaster);
|
|
4028
|
-
}
|
|
4029
4038
|
getMethod() {
|
|
4030
4039
|
return this.method;
|
|
4031
4040
|
}
|
|
4032
4041
|
}
|
|
4033
|
-
AsyncMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodDirective, deps:
|
|
4042
|
+
AsyncMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
4034
4043
|
AsyncMethodDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: AsyncMethodDirective, selector: "[async-method]", inputs: { method: ["async-method", "method"] }, exportAs: ["async-method"], usesInheritance: true, ngImport: i0 });
|
|
4035
4044
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodDirective, decorators: [{
|
|
4036
4045
|
type: Directive,
|
|
@@ -4038,12 +4047,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
4038
4047
|
selector: "[async-method]",
|
|
4039
4048
|
exportAs: "async-method"
|
|
4040
4049
|
}]
|
|
4041
|
-
}],
|
|
4042
|
-
return [{ type: undefined, decorators: [{
|
|
4043
|
-
type: Inject,
|
|
4044
|
-
args: [TOASTER_SERVICE]
|
|
4045
|
-
}] }];
|
|
4046
|
-
}, propDecorators: { method: [{
|
|
4050
|
+
}], propDecorators: { method: [{
|
|
4047
4051
|
type: Input,
|
|
4048
4052
|
args: ["async-method"]
|
|
4049
4053
|
}] } });
|
|
@@ -4961,6 +4965,7 @@ const pipes = [
|
|
|
4961
4965
|
];
|
|
4962
4966
|
// --- Directives ---
|
|
4963
4967
|
const directives = [
|
|
4968
|
+
AsyncMethodBase,
|
|
4964
4969
|
AsyncMethodDirective,
|
|
4965
4970
|
BackgroundDirective,
|
|
4966
4971
|
DynamicTableTemplateDirective,
|
|
@@ -5108,8 +5113,8 @@ class NgxUtilsModule {
|
|
|
5108
5113
|
}
|
|
5109
5114
|
}
|
|
5110
5115
|
NgxUtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5111
|
-
NgxUtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, declarations: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, TranslatePipe, ValuesPipe, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent], imports: [CommonModule,
|
|
5112
|
-
FormsModule], exports: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, TranslatePipe, ValuesPipe, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent, FormsModule] });
|
|
5116
|
+
NgxUtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, declarations: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent], imports: [CommonModule,
|
|
5117
|
+
FormsModule], exports: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent, FormsModule] });
|
|
5113
5118
|
NgxUtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, providers: pipes, imports: [[
|
|
5114
5119
|
CommonModule,
|
|
5115
5120
|
FormsModule
|