@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';
|
|
@@ -13,6 +13,7 @@ import * as i1 from 'ngx-device-detector';
|
|
|
13
13
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
14
14
|
import * as i1$1 from '@angular/common/http';
|
|
15
15
|
import { HttpClient, HttpHeaders, HttpParams, HttpUrlEncodingCodec, HttpEventType } from '@angular/common/http';
|
|
16
|
+
import * as JSON5 from 'json5';
|
|
16
17
|
import * as i1$2 from '@angular/platform-browser';
|
|
17
18
|
import { ɵDomEventsPlugin, EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
18
19
|
import { addListener, removeListener } from 'resize-detector';
|
|
@@ -2524,7 +2525,7 @@ class ConfigService {
|
|
|
2524
2525
|
const configUrl = this.configUrl;
|
|
2525
2526
|
try {
|
|
2526
2527
|
const config5 = await this.http.get(isDevMode() ? `${configUrl}5` : configUrl, { responseType: "text" }).toPromise();
|
|
2527
|
-
return
|
|
2528
|
+
return JSON5.parse(config5);
|
|
2528
2529
|
}
|
|
2529
2530
|
catch (e) {
|
|
2530
2531
|
try {
|
|
@@ -3907,6 +3908,9 @@ class AsyncMethodBase {
|
|
|
3907
3908
|
get isLoading() {
|
|
3908
3909
|
return this.loading;
|
|
3909
3910
|
}
|
|
3911
|
+
getMethod() {
|
|
3912
|
+
return async () => null;
|
|
3913
|
+
}
|
|
3910
3914
|
click() {
|
|
3911
3915
|
if (this.disabled)
|
|
3912
3916
|
return;
|
|
@@ -3938,11 +3942,17 @@ class AsyncMethodBase {
|
|
|
3938
3942
|
return true;
|
|
3939
3943
|
}
|
|
3940
3944
|
}
|
|
3941
|
-
AsyncMethodBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodBase, deps:
|
|
3942
|
-
AsyncMethodBase.ɵ
|
|
3945
|
+
AsyncMethodBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodBase, deps: [{ token: TOASTER_SERVICE }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3946
|
+
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 });
|
|
3943
3947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodBase, decorators: [{
|
|
3944
|
-
type:
|
|
3945
|
-
|
|
3948
|
+
type: Directive,
|
|
3949
|
+
args: [{
|
|
3950
|
+
selector: "[__asmb__]"
|
|
3951
|
+
}]
|
|
3952
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
3953
|
+
type: Inject,
|
|
3954
|
+
args: [TOASTER_SERVICE]
|
|
3955
|
+
}] }]; }, propDecorators: { disabled: [{
|
|
3946
3956
|
type: Input
|
|
3947
3957
|
}], context: [{
|
|
3948
3958
|
type: Input
|
|
@@ -3962,14 +3972,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
3962
3972
|
}] } });
|
|
3963
3973
|
|
|
3964
3974
|
class AsyncMethodDirective extends AsyncMethodBase {
|
|
3965
|
-
constructor(toaster) {
|
|
3966
|
-
super(toaster);
|
|
3967
|
-
}
|
|
3968
3975
|
getMethod() {
|
|
3969
3976
|
return this.method;
|
|
3970
3977
|
}
|
|
3971
3978
|
}
|
|
3972
|
-
AsyncMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodDirective, deps:
|
|
3979
|
+
AsyncMethodDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3973
3980
|
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 });
|
|
3974
3981
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: AsyncMethodDirective, decorators: [{
|
|
3975
3982
|
type: Directive,
|
|
@@ -3977,10 +3984,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
3977
3984
|
selector: "[async-method]",
|
|
3978
3985
|
exportAs: "async-method"
|
|
3979
3986
|
}]
|
|
3980
|
-
}],
|
|
3981
|
-
type: Inject,
|
|
3982
|
-
args: [TOASTER_SERVICE]
|
|
3983
|
-
}] }]; }, propDecorators: { method: [{
|
|
3987
|
+
}], propDecorators: { method: [{
|
|
3984
3988
|
type: Input,
|
|
3985
3989
|
args: ["async-method"]
|
|
3986
3990
|
}] } });
|
|
@@ -4892,6 +4896,7 @@ const pipes = [
|
|
|
4892
4896
|
];
|
|
4893
4897
|
// --- Directives ---
|
|
4894
4898
|
const directives = [
|
|
4899
|
+
AsyncMethodBase,
|
|
4895
4900
|
AsyncMethodDirective,
|
|
4896
4901
|
BackgroundDirective,
|
|
4897
4902
|
DynamicTableTemplateDirective,
|
|
@@ -5039,8 +5044,8 @@ class NgxUtilsModule {
|
|
|
5039
5044
|
}
|
|
5040
5045
|
}
|
|
5041
5046
|
NgxUtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5042
|
-
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,
|
|
5043
|
-
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] });
|
|
5047
|
+
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,
|
|
5048
|
+
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] });
|
|
5044
5049
|
NgxUtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, providers: pipes, imports: [[
|
|
5045
5050
|
CommonModule,
|
|
5046
5051
|
FormsModule
|