@stemy/ngx-utils 13.0.1 → 13.0.4
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/ngx-utils.imports.mjs +163 -0
- package/esm2020/ngx-utils/ngx-utils.module.mjs +75 -234
- package/esm2020/ngx-utils/services/config.service.mjs +10 -14
- package/fesm2015/stemy-ngx-utils.mjs +39 -90
- package/fesm2015/stemy-ngx-utils.mjs.map +1 -1
- package/fesm2020/stemy-ngx-utils.mjs +39 -90
- package/fesm2020/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +1 -0
- package/ngx-utils/ngx-utils.module.d.ts +50 -73
- package/ngx-utils/services/config.service.d.ts +3 -2
- package/package.json +1 -1
- package/bundles/stemy-ngx-utils.umd.js +0 -6121
- package/bundles/stemy-ngx-utils.umd.js.map +0 -1
- package/bundles/stemy-ngx-utils.umd.min.js +0 -16
- package/bundles/stemy-ngx-utils.umd.min.js.map +0 -1
- package/esm2015/ngx-utils/common-types.js +0 -116
- package/esm2015/ngx-utils/components/dynamic-table/dynamic-table.component.js +0 -139
- package/esm2015/ngx-utils/components/pagination-menu/pagination-menu.component.js +0 -96
- package/esm2015/ngx-utils/components/unordered-list/unordered-list.component.js +0 -51
- package/esm2015/ngx-utils/directives/async-method.base.js +0 -54
- package/esm2015/ngx-utils/directives/async-method.directive.js +0 -24
- package/esm2015/ngx-utils/directives/background.directive.js +0 -51
- package/esm2015/ngx-utils/directives/dynamic-table-template.directive.js +0 -19
- package/esm2015/ngx-utils/directives/global-template.directive.js +0 -27
- package/esm2015/ngx-utils/directives/icon.directive.js +0 -59
- package/esm2015/ngx-utils/directives/ngx-template-outlet.directive.js +0 -88
- package/esm2015/ngx-utils/directives/pagination-item.directive.js +0 -33
- package/esm2015/ngx-utils/directives/pagination.directive.js +0 -76
- package/esm2015/ngx-utils/directives/resource-if.directive.js +0 -51
- package/esm2015/ngx-utils/directives/sticky-class.directive.js +0 -35
- package/esm2015/ngx-utils/directives/sticky.directive.js +0 -48
- package/esm2015/ngx-utils/directives/unordered-list-item.directive.js +0 -70
- package/esm2015/ngx-utils/directives/unordered-list-template.directive.js +0 -26
- package/esm2015/ngx-utils/ngx-utils.module.js +0 -238
- package/esm2015/ngx-utils/pipes/chunk.pipe.js +0 -21
- package/esm2015/ngx-utils/pipes/entries.pipe.js +0 -24
- package/esm2015/ngx-utils/pipes/extra-item-properties.pipe.js +0 -27
- package/esm2015/ngx-utils/pipes/filter.pipe.js +0 -38
- package/esm2015/ngx-utils/pipes/find.pipe.js +0 -25
- package/esm2015/ngx-utils/pipes/format-number.pipe.js +0 -19
- package/esm2015/ngx-utils/pipes/get-offset.pipe.js +0 -13
- package/esm2015/ngx-utils/pipes/get-type.pipe.js +0 -12
- package/esm2015/ngx-utils/pipes/global-template.pipe.js +0 -37
- package/esm2015/ngx-utils/pipes/group-by.pipe.js +0 -23
- package/esm2015/ngx-utils/pipes/is-type.pipe.js +0 -12
- package/esm2015/ngx-utils/pipes/join.pipe.js +0 -15
- package/esm2015/ngx-utils/pipes/keys.pipe.js +0 -18
- package/esm2015/ngx-utils/pipes/map.pipe.js +0 -25
- package/esm2015/ngx-utils/pipes/max.pipe.js +0 -22
- package/esm2015/ngx-utils/pipes/min.pipe.js +0 -22
- package/esm2015/ngx-utils/pipes/reduce.pipe.js +0 -26
- package/esm2015/ngx-utils/pipes/remap.pipe.js +0 -28
- package/esm2015/ngx-utils/pipes/replace.pipe.js +0 -12
- package/esm2015/ngx-utils/pipes/reverse.pipe.js +0 -20
- package/esm2015/ngx-utils/pipes/round.pipe.js +0 -19
- package/esm2015/ngx-utils/pipes/safe-html.pipe.js +0 -32
- package/esm2015/ngx-utils/pipes/translate.pipe.js +0 -81
- package/esm2015/ngx-utils/pipes/values.pipe.js +0 -18
- package/esm2015/ngx-utils/plugins/resize-event.plugin.js +0 -56
- package/esm2015/ngx-utils/plugins/scroll-event.plugin.js +0 -36
- package/esm2015/ngx-utils/services/acl.service.js +0 -79
- package/esm2015/ngx-utils/services/api.service.js +0 -35
- package/esm2015/ngx-utils/services/auth.service.js +0 -14
- package/esm2015/ngx-utils/services/base-http.client.js +0 -46
- package/esm2015/ngx-utils/services/base-http.service.js +0 -285
- package/esm2015/ngx-utils/services/config.service.js +0 -122
- package/esm2015/ngx-utils/services/error-handler.service.js +0 -49
- package/esm2015/ngx-utils/services/events.service.js +0 -24
- package/esm2015/ngx-utils/services/formatter.service.js +0 -44
- package/esm2015/ngx-utils/services/global-template.service.js +0 -35
- package/esm2015/ngx-utils/services/icon.service.js +0 -24
- package/esm2015/ngx-utils/services/language.service.js +0 -117
- package/esm2015/ngx-utils/services/open-api.service.js +0 -41
- package/esm2015/ngx-utils/services/promise.service.js +0 -52
- package/esm2015/ngx-utils/services/state.service.js +0 -181
- package/esm2015/ngx-utils/services/static-language.service.js +0 -152
- package/esm2015/ngx-utils/services/storage.service.js +0 -48
- package/esm2015/ngx-utils/services/toaster.service.js +0 -29
- package/esm2015/ngx-utils/services/translated-url.serializer.js +0 -70
- package/esm2015/ngx-utils/services/universal.service.js +0 -75
- package/esm2015/ngx-utils/utils/ajax-request-handler.js +0 -40
- package/esm2015/ngx-utils/utils/array.utils.js +0 -100
- package/esm2015/ngx-utils/utils/auth.guard.js +0 -156
- package/esm2015/ngx-utils/utils/canvas.utils.js +0 -388
- package/esm2015/ngx-utils/utils/date.utils.js +0 -28
- package/esm2015/ngx-utils/utils/file.utils.js +0 -90
- package/esm2015/ngx-utils/utils/generic-value.js +0 -20
- package/esm2015/ngx-utils/utils/geometry.js +0 -132
- package/esm2015/ngx-utils/utils/initializer.js +0 -20
- package/esm2015/ngx-utils/utils/loader.utils.js +0 -55
- package/esm2015/ngx-utils/utils/math.utils.js +0 -15
- package/esm2015/ngx-utils/utils/object.utils.js +0 -263
- package/esm2015/ngx-utils/utils/observable.utils.js +0 -63
- package/esm2015/ngx-utils/utils/reflect.utils.js +0 -33
- package/esm2015/ngx-utils/utils/set.utils.js +0 -20
- package/esm2015/ngx-utils/utils/string.utils.js +0 -28
- package/esm2015/ngx-utils/utils/timer.utils.js +0 -52
- package/esm2015/ngx-utils/utils/unique.utils.js +0 -24
- package/esm2015/ngx-utils/utils/vector.js +0 -77
- package/esm2015/public_api.js +0 -84
- package/esm2015/stemy-ngx-utils.js +0 -7
- package/fesm2015/stemy-ngx-utils.js +0 -4860
- package/fesm2015/stemy-ngx-utils.js.map +0 -1
- package/stemy-ngx-utils.metadata.json +0 -1
|
@@ -9,7 +9,7 @@ import { __awaiter } from 'tslib';
|
|
|
9
9
|
import * as i2 from '@angular/router';
|
|
10
10
|
import { ActivatedRouteSnapshot, NavigationEnd, DefaultUrlSerializer, UrlTree, UrlSegmentGroup, UrlSegment, UrlSerializer } from '@angular/router';
|
|
11
11
|
import * as i1$3 from '@angular/common';
|
|
12
|
-
import { isPlatformBrowser, isPlatformServer, DOCUMENT, CommonModule } from '@angular/common';
|
|
12
|
+
import { isPlatformBrowser, isPlatformServer, APP_BASE_HREF, DOCUMENT, CommonModule } from '@angular/common';
|
|
13
13
|
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';
|
|
@@ -2495,26 +2495,18 @@ class StaticAuthService {
|
|
|
2495
2495
|
}
|
|
2496
2496
|
|
|
2497
2497
|
class ConfigService {
|
|
2498
|
-
constructor(http, universal, rootElement, baseConfig = null, scriptParams = null) {
|
|
2498
|
+
constructor(http, universal, rootElement, baseHref, baseConfig = null, scriptParams = null) {
|
|
2499
2499
|
this.http = http;
|
|
2500
2500
|
this.universal = universal;
|
|
2501
2501
|
this.rootElement = rootElement;
|
|
2502
|
+
this.baseHref = baseHref;
|
|
2502
2503
|
for (const key in []) {
|
|
2503
2504
|
Object.defineProperty(Array.prototype, key, {
|
|
2504
2505
|
enumerable: false
|
|
2505
2506
|
});
|
|
2506
2507
|
}
|
|
2507
|
-
let baseUrl = "";
|
|
2508
|
-
if (this.universal.isBrowser) {
|
|
2509
|
-
const currentScript = document.currentScript;
|
|
2510
|
-
if (!!currentScript) {
|
|
2511
|
-
const scriptSrc = currentScript.src;
|
|
2512
|
-
const srcParts = scriptSrc.split(".js");
|
|
2513
|
-
baseUrl = scriptSrc.substr(0, srcParts[0].lastIndexOf("/") + 1);
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
2508
|
this.baseConfig = baseConfig || {};
|
|
2517
|
-
this.loadedConfig = Object.assign(!
|
|
2509
|
+
this.loadedConfig = Object.assign(!this.baseHref ? {} : { baseUrl: this.baseHref, baseDomain: this.parseDomain(this.baseHref) }, this.baseConfig);
|
|
2518
2510
|
this.scriptParameters = scriptParams || {};
|
|
2519
2511
|
this.loaderFunc = () => {
|
|
2520
2512
|
this.loader = this.loader || new Promise((resolve, reject) => {
|
|
@@ -2599,7 +2591,7 @@ class ConfigService {
|
|
|
2599
2591
|
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
|
2600
2592
|
}
|
|
2601
2593
|
}
|
|
2602
|
-
ConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService, deps: [{ token: i1$1.HttpClient }, { token: UniversalService }, { token: ROOT_ELEMENT }, { token: BASE_CONFIG, optional: true }, { token: SCRIPT_PARAMS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2594
|
+
ConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService, deps: [{ token: i1$1.HttpClient }, { token: UniversalService }, { token: ROOT_ELEMENT }, { token: APP_BASE_HREF }, { token: BASE_CONFIG, optional: true }, { token: SCRIPT_PARAMS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2603
2595
|
ConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService });
|
|
2604
2596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService, decorators: [{
|
|
2605
2597
|
type: Injectable
|
|
@@ -2607,6 +2599,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
2607
2599
|
return [{ type: i1$1.HttpClient }, { type: UniversalService }, { type: undefined, decorators: [{
|
|
2608
2600
|
type: Inject,
|
|
2609
2601
|
args: [ROOT_ELEMENT]
|
|
2602
|
+
}] }, { type: undefined, decorators: [{
|
|
2603
|
+
type: Inject,
|
|
2604
|
+
args: [APP_BASE_HREF]
|
|
2610
2605
|
}] }, { type: IConfiguration, decorators: [{
|
|
2611
2606
|
type: Optional
|
|
2612
2607
|
}, {
|
|
@@ -5031,8 +5026,31 @@ const providers = [
|
|
|
5031
5026
|
];
|
|
5032
5027
|
function loadConfig(config) {
|
|
5033
5028
|
return config.load;
|
|
5029
|
+
}
|
|
5030
|
+
|
|
5031
|
+
function loadBaseHref() {
|
|
5032
|
+
if (typeof (document) === "undefined" || typeof (location) === "undefined")
|
|
5033
|
+
return "/";
|
|
5034
|
+
const currentScript = document.currentScript;
|
|
5035
|
+
if (!currentScript) {
|
|
5036
|
+
try {
|
|
5037
|
+
// noinspection ExceptionCaughtLocallyJS
|
|
5038
|
+
throw new Error();
|
|
5039
|
+
}
|
|
5040
|
+
catch (e) {
|
|
5041
|
+
const qualifiedUrl = location.protocol + "//" + location.host;
|
|
5042
|
+
const srcUrl = (e.stack || "").match(new RegExp(qualifiedUrl + ".*?\\.js", "g")) || e.stack.match(/http([A-Z:\/\-\.]+)\.js/gi).shift();
|
|
5043
|
+
const lastIndex = srcUrl.lastIndexOf("/");
|
|
5044
|
+
return lastIndex < 0 ? "/" : srcUrl.substring(0, lastIndex + 1);
|
|
5045
|
+
}
|
|
5046
|
+
}
|
|
5047
|
+
const scriptSrc = currentScript.src;
|
|
5048
|
+
const lastIndex = scriptSrc.lastIndexOf("/");
|
|
5049
|
+
return lastIndex < 0 ? "/" : scriptSrc.substring(0, lastIndex + 1);
|
|
5034
5050
|
}
|
|
5035
5051
|
class NgxUtilsModule {
|
|
5052
|
+
constructor() {
|
|
5053
|
+
}
|
|
5036
5054
|
static forRoot(config) {
|
|
5037
5055
|
return {
|
|
5038
5056
|
ngModule: NgxUtilsModule,
|
|
@@ -5079,88 +5097,19 @@ class NgxUtilsModule {
|
|
|
5079
5097
|
useFactory: (!config ? null : config.initializeApp) || loadConfig,
|
|
5080
5098
|
multi: true,
|
|
5081
5099
|
deps: [(!config ? null : config.initializeApp) ? Injector : CONFIG_SERVICE]
|
|
5100
|
+
},
|
|
5101
|
+
{
|
|
5102
|
+
provide: APP_BASE_HREF,
|
|
5103
|
+
useFactory: (!config ? null : config.baseHref) || loadBaseHref,
|
|
5104
|
+
deps: [Injector]
|
|
5082
5105
|
}
|
|
5083
5106
|
]
|
|
5084
5107
|
};
|
|
5085
5108
|
}
|
|
5086
5109
|
}
|
|
5087
5110
|
NgxUtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5088
|
-
NgxUtilsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, declarations: [ChunkPipe,
|
|
5089
|
-
EntriesPipe,
|
|
5090
|
-
ExtraItemPropertiesPipe,
|
|
5091
|
-
FilterPipe,
|
|
5092
|
-
FindPipe,
|
|
5093
|
-
FormatNumberPipe,
|
|
5094
|
-
GetOffsetPipe,
|
|
5095
|
-
GetTypePipe,
|
|
5096
|
-
GlobalTemplatePipe,
|
|
5097
|
-
GroupByPipe,
|
|
5098
|
-
IsTypePipe,
|
|
5099
|
-
JoinPipe,
|
|
5100
|
-
KeysPipe,
|
|
5101
|
-
MapPipe,
|
|
5102
|
-
MaxPipe,
|
|
5103
|
-
MinPipe,
|
|
5104
|
-
ReducePipe,
|
|
5105
|
-
RemapPipe,
|
|
5106
|
-
ReplacePipe,
|
|
5107
|
-
ReversePipe,
|
|
5108
|
-
RoundPipe,
|
|
5109
|
-
SafeHtmlPipe,
|
|
5110
|
-
TranslatePipe,
|
|
5111
|
-
ValuesPipe, AsyncMethodDirective,
|
|
5112
|
-
BackgroundDirective,
|
|
5113
|
-
DynamicTableTemplateDirective,
|
|
5114
|
-
GlobalTemplateDirective,
|
|
5115
|
-
IconDirective,
|
|
5116
|
-
NgxTemplateOutletDirective,
|
|
5117
|
-
PaginationDirective,
|
|
5118
|
-
PaginationItemDirective,
|
|
5119
|
-
ResourceIfDirective,
|
|
5120
|
-
StickyDirective,
|
|
5121
|
-
StickyClassDirective,
|
|
5122
|
-
UnorderedListItemDirective,
|
|
5123
|
-
UnorderedListTemplateDirective, DynamicTableComponent,
|
|
5124
|
-
PaginationMenuComponent,
|
|
5125
|
-
UnorderedListComponent], imports: [CommonModule,
|
|
5126
|
-
FormsModule], exports: [ChunkPipe,
|
|
5127
|
-
EntriesPipe,
|
|
5128
|
-
ExtraItemPropertiesPipe,
|
|
5129
|
-
FilterPipe,
|
|
5130
|
-
FindPipe,
|
|
5131
|
-
FormatNumberPipe,
|
|
5132
|
-
GetOffsetPipe,
|
|
5133
|
-
GetTypePipe,
|
|
5134
|
-
GlobalTemplatePipe,
|
|
5135
|
-
GroupByPipe,
|
|
5136
|
-
IsTypePipe,
|
|
5137
|
-
JoinPipe,
|
|
5138
|
-
KeysPipe,
|
|
5139
|
-
MapPipe,
|
|
5140
|
-
MaxPipe,
|
|
5141
|
-
MinPipe,
|
|
5142
|
-
ReducePipe,
|
|
5143
|
-
RemapPipe,
|
|
5144
|
-
ReplacePipe,
|
|
5145
|
-
ReversePipe,
|
|
5146
|
-
RoundPipe,
|
|
5147
|
-
SafeHtmlPipe,
|
|
5148
|
-
TranslatePipe,
|
|
5149
|
-
ValuesPipe, AsyncMethodDirective,
|
|
5150
|
-
BackgroundDirective,
|
|
5151
|
-
DynamicTableTemplateDirective,
|
|
5152
|
-
GlobalTemplateDirective,
|
|
5153
|
-
IconDirective,
|
|
5154
|
-
NgxTemplateOutletDirective,
|
|
5155
|
-
PaginationDirective,
|
|
5156
|
-
PaginationItemDirective,
|
|
5157
|
-
ResourceIfDirective,
|
|
5158
|
-
StickyDirective,
|
|
5159
|
-
StickyClassDirective,
|
|
5160
|
-
UnorderedListItemDirective,
|
|
5161
|
-
UnorderedListTemplateDirective, DynamicTableComponent,
|
|
5162
|
-
PaginationMenuComponent,
|
|
5163
|
-
UnorderedListComponent, FormsModule] });
|
|
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] });
|
|
5164
5113
|
NgxUtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, providers: pipes, imports: [[
|
|
5165
5114
|
CommonModule,
|
|
5166
5115
|
FormsModule
|
|
@@ -5185,7 +5134,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
5185
5134
|
],
|
|
5186
5135
|
providers: pipes
|
|
5187
5136
|
}]
|
|
5188
|
-
}] });
|
|
5137
|
+
}], ctorParameters: function () { return []; } });
|
|
5189
5138
|
|
|
5190
5139
|
/**
|
|
5191
5140
|
* Generated bundle index. Do not edit.
|