@stemy/ngx-utils 12.1.2 → 13.0.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 +26 -29
- package/bundles/stemy-ngx-utils.umd.js.map +1 -1
- package/esm2015/ngx-utils/services/config.service.js +4 -4
- package/esm2015/ngx-utils/services/static-language.service.js +17 -17
- package/esm2015/ngx-utils/services/storage.service.js +4 -4
- package/esm2020/ngx-utils/common-types.mjs +116 -0
- package/esm2020/ngx-utils/components/dynamic-table/dynamic-table.component.mjs +178 -0
- package/esm2020/ngx-utils/components/pagination-menu/pagination-menu.component.mjs +101 -0
- package/esm2020/ngx-utils/components/unordered-list/unordered-list.component.mjs +65 -0
- package/esm2020/ngx-utils/directives/async-method.base.mjs +68 -0
- package/esm2020/ngx-utils/directives/async-method.directive.mjs +28 -0
- package/esm2020/ngx-utils/directives/background.directive.mjs +51 -0
- package/esm2020/ngx-utils/directives/dynamic-table-template.directive.mjs +20 -0
- package/esm2020/ngx-utils/directives/global-template.directive.mjs +30 -0
- package/esm2020/ngx-utils/directives/icon.directive.mjs +67 -0
- package/esm2020/ngx-utils/directives/ngx-template-outlet.directive.mjs +90 -0
- package/esm2020/ngx-utils/directives/pagination-item.directive.mjs +33 -0
- package/esm2020/ngx-utils/directives/pagination.directive.mjs +83 -0
- package/esm2020/ngx-utils/directives/resource-if.directive.mjs +50 -0
- package/esm2020/ngx-utils/directives/sticky-class.directive.mjs +34 -0
- package/esm2020/ngx-utils/directives/sticky.directive.mjs +55 -0
- package/esm2020/ngx-utils/directives/unordered-list-item.directive.mjs +77 -0
- package/esm2020/ngx-utils/directives/unordered-list-template.directive.mjs +26 -0
- package/esm2020/ngx-utils/ngx-utils.module.mjs +321 -0
- package/esm2020/ngx-utils/pipes/chunk.pipe.mjs +25 -0
- package/esm2020/ngx-utils/pipes/entries.pipe.mjs +28 -0
- package/esm2020/ngx-utils/pipes/extra-item-properties.pipe.mjs +31 -0
- package/esm2020/ngx-utils/pipes/filter.pipe.mjs +42 -0
- package/esm2020/ngx-utils/pipes/find.pipe.mjs +29 -0
- package/esm2020/ngx-utils/pipes/format-number.pipe.mjs +21 -0
- package/esm2020/ngx-utils/pipes/get-offset.pipe.mjs +17 -0
- package/esm2020/ngx-utils/pipes/get-type.pipe.mjs +16 -0
- package/esm2020/ngx-utils/pipes/global-template.pipe.mjs +41 -0
- package/esm2020/ngx-utils/pipes/group-by.pipe.mjs +27 -0
- package/esm2020/ngx-utils/pipes/is-type.pipe.mjs +16 -0
- package/esm2020/ngx-utils/pipes/join.pipe.mjs +19 -0
- package/esm2020/ngx-utils/pipes/keys.pipe.mjs +22 -0
- package/esm2020/ngx-utils/pipes/map.pipe.mjs +29 -0
- package/esm2020/ngx-utils/pipes/max.pipe.mjs +26 -0
- package/esm2020/ngx-utils/pipes/min.pipe.mjs +26 -0
- package/esm2020/ngx-utils/pipes/reduce.pipe.mjs +30 -0
- package/esm2020/ngx-utils/pipes/remap.pipe.mjs +32 -0
- package/esm2020/ngx-utils/pipes/replace.pipe.mjs +16 -0
- package/esm2020/ngx-utils/pipes/reverse.pipe.mjs +24 -0
- package/esm2020/ngx-utils/pipes/round.pipe.mjs +21 -0
- package/esm2020/ngx-utils/pipes/safe-html.pipe.mjs +34 -0
- package/esm2020/ngx-utils/pipes/translate.pipe.mjs +86 -0
- package/esm2020/ngx-utils/pipes/values.pipe.mjs +22 -0
- package/esm2020/ngx-utils/plugins/resize-event.plugin.mjs +59 -0
- package/esm2020/ngx-utils/plugins/scroll-event.plugin.mjs +39 -0
- package/esm2020/ngx-utils/services/acl.service.mjs +81 -0
- package/esm2020/ngx-utils/services/api.service.mjs +38 -0
- package/esm2020/ngx-utils/services/auth.service.mjs +14 -0
- package/esm2020/ngx-utils/services/base-http.client.mjs +47 -0
- package/esm2020/ngx-utils/services/base-http.service.mjs +298 -0
- package/esm2020/ngx-utils/services/config.service.mjs +129 -0
- package/esm2020/ngx-utils/services/error-handler.service.mjs +49 -0
- package/esm2020/ngx-utils/services/events.service.mjs +26 -0
- package/esm2020/ngx-utils/services/formatter.service.mjs +47 -0
- package/esm2020/ngx-utils/services/global-template.service.mjs +37 -0
- package/esm2020/ngx-utils/services/icon.service.mjs +26 -0
- package/esm2020/ngx-utils/services/language.service.mjs +113 -0
- package/esm2020/ngx-utils/services/open-api.service.mjs +40 -0
- package/esm2020/ngx-utils/services/promise.service.mjs +55 -0
- package/esm2020/ngx-utils/services/state.service.mjs +173 -0
- package/esm2020/ngx-utils/services/static-language.service.mjs +166 -0
- package/esm2020/ngx-utils/services/storage.service.mjs +49 -0
- package/esm2020/ngx-utils/services/toaster.service.mjs +32 -0
- package/esm2020/ngx-utils/services/translated-url.serializer.mjs +73 -0
- package/esm2020/ngx-utils/services/universal.service.mjs +78 -0
- package/esm2020/ngx-utils/utils/ajax-request-handler.mjs +40 -0
- package/esm2020/ngx-utils/utils/array.utils.mjs +100 -0
- package/esm2020/ngx-utils/utils/auth.guard.mjs +181 -0
- package/esm2020/ngx-utils/utils/canvas.utils.mjs +388 -0
- package/esm2020/ngx-utils/utils/date.utils.mjs +28 -0
- package/esm2020/ngx-utils/utils/file.utils.mjs +90 -0
- package/esm2020/ngx-utils/utils/generic-value.mjs +20 -0
- package/esm2020/ngx-utils/utils/geometry.mjs +132 -0
- package/esm2020/ngx-utils/utils/initializer.mjs +20 -0
- package/esm2020/ngx-utils/utils/loader.utils.mjs +55 -0
- package/esm2020/ngx-utils/utils/math.utils.mjs +15 -0
- package/esm2020/ngx-utils/utils/object.utils.mjs +261 -0
- package/esm2020/ngx-utils/utils/observable.utils.mjs +63 -0
- package/esm2020/ngx-utils/utils/reflect.utils.mjs +33 -0
- package/esm2020/ngx-utils/utils/set.utils.mjs +20 -0
- package/esm2020/ngx-utils/utils/string.utils.mjs +28 -0
- package/esm2020/ngx-utils/utils/timer.utils.mjs +52 -0
- package/esm2020/ngx-utils/utils/unique.utils.mjs +24 -0
- package/esm2020/ngx-utils/utils/vector.mjs +77 -0
- package/esm2020/public_api.mjs +85 -0
- package/esm2020/stemy-ngx-utils.mjs +5 -0
- package/fesm2015/stemy-ngx-utils.js +22 -22
- package/fesm2015/stemy-ngx-utils.js.map +1 -1
- package/fesm2015/stemy-ngx-utils.mjs +5195 -0
- package/fesm2015/stemy-ngx-utils.mjs.map +1 -0
- package/fesm2020/stemy-ngx-utils.mjs +5126 -0
- package/fesm2020/stemy-ngx-utils.mjs.map +1 -0
- package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +3 -0
- package/ngx-utils/components/pagination-menu/pagination-menu.component.d.ts +3 -0
- package/ngx-utils/components/unordered-list/unordered-list.component.d.ts +3 -0
- package/ngx-utils/directives/async-method.base.d.ts +3 -0
- package/ngx-utils/directives/async-method.directive.d.ts +3 -0
- package/ngx-utils/directives/background.directive.d.ts +3 -0
- package/ngx-utils/directives/dynamic-table-template.directive.d.ts +3 -0
- package/ngx-utils/directives/global-template.directive.d.ts +3 -0
- package/ngx-utils/directives/icon.directive.d.ts +3 -0
- package/ngx-utils/directives/ngx-template-outlet.directive.d.ts +3 -0
- package/ngx-utils/directives/pagination-item.directive.d.ts +3 -0
- package/ngx-utils/directives/pagination.directive.d.ts +3 -0
- package/ngx-utils/directives/resource-if.directive.d.ts +3 -0
- package/ngx-utils/directives/sticky-class.directive.d.ts +3 -0
- package/ngx-utils/directives/sticky.directive.d.ts +3 -0
- package/ngx-utils/directives/unordered-list-item.directive.d.ts +3 -0
- package/ngx-utils/directives/unordered-list-template.directive.d.ts +3 -0
- package/ngx-utils/pipes/chunk.pipe.d.ts +3 -0
- package/ngx-utils/pipes/entries.pipe.d.ts +3 -0
- package/ngx-utils/pipes/extra-item-properties.pipe.d.ts +3 -0
- package/ngx-utils/pipes/filter.pipe.d.ts +3 -0
- package/ngx-utils/pipes/find.pipe.d.ts +3 -0
- package/ngx-utils/pipes/format-number.pipe.d.ts +3 -0
- package/ngx-utils/pipes/get-offset.pipe.d.ts +3 -0
- package/ngx-utils/pipes/get-type.pipe.d.ts +3 -0
- package/ngx-utils/pipes/global-template.pipe.d.ts +3 -0
- package/ngx-utils/pipes/group-by.pipe.d.ts +3 -0
- package/ngx-utils/pipes/is-type.pipe.d.ts +3 -0
- package/ngx-utils/pipes/join.pipe.d.ts +3 -0
- package/ngx-utils/pipes/keys.pipe.d.ts +3 -0
- package/ngx-utils/pipes/map.pipe.d.ts +3 -0
- package/ngx-utils/pipes/max.pipe.d.ts +3 -0
- package/ngx-utils/pipes/min.pipe.d.ts +3 -0
- package/ngx-utils/pipes/reduce.pipe.d.ts +3 -0
- package/ngx-utils/pipes/remap.pipe.d.ts +3 -0
- package/ngx-utils/pipes/replace.pipe.d.ts +3 -0
- package/ngx-utils/pipes/reverse.pipe.d.ts +3 -0
- package/ngx-utils/pipes/round.pipe.d.ts +3 -0
- package/ngx-utils/pipes/safe-html.pipe.d.ts +3 -0
- package/ngx-utils/pipes/translate.pipe.d.ts +4 -0
- package/ngx-utils/pipes/values.pipe.d.ts +3 -0
- package/ngx-utils/plugins/resize-event.plugin.d.ts +4 -1
- package/ngx-utils/plugins/scroll-event.plugin.d.ts +4 -1
- package/ngx-utils/services/acl.service.d.ts +3 -0
- package/ngx-utils/services/api.service.d.ts +3 -0
- package/ngx-utils/services/base-http.client.d.ts +3 -0
- package/ngx-utils/services/base-http.service.d.ts +3 -0
- package/ngx-utils/services/config.service.d.ts +3 -0
- package/ngx-utils/services/error-handler.service.d.ts +3 -0
- package/ngx-utils/services/events.service.d.ts +3 -0
- package/ngx-utils/services/formatter.service.d.ts +3 -0
- package/ngx-utils/services/global-template.service.d.ts +3 -0
- package/ngx-utils/services/icon.service.d.ts +3 -0
- package/ngx-utils/services/language.service.d.ts +3 -0
- package/ngx-utils/services/open-api.service.d.ts +3 -0
- package/ngx-utils/services/promise.service.d.ts +3 -0
- package/ngx-utils/services/state.service.d.ts +3 -0
- package/ngx-utils/services/static-language.service.d.ts +4 -1
- package/ngx-utils/services/storage.service.d.ts +3 -0
- package/ngx-utils/services/toaster.service.d.ts +3 -0
- package/ngx-utils/services/translated-url.serializer.d.ts +3 -0
- package/ngx-utils/services/universal.service.d.ts +3 -0
- package/ngx-utils/utils/auth.guard.d.ts +3 -0
- package/package.json +34 -19
- package/public_api.d.ts +1 -0
- package/stemy-ngx-utils.d.ts +1 -2
- package/stemy-ngx-utils.metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('reflect-metadata'), require('moment'), require('rxjs/operators'), require('rxjs'), require('invokable'), require('@angular/router'), require('@angular/common'), require('ngx-device-detector'), require('@angular/common/http'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@stemy/ngx-utils', ['exports', '@angular/core', 'reflect-metadata', 'moment', 'rxjs/operators', 'rxjs', 'invokable', '@angular/router', '@angular/common', 'ngx-device-detector', '@angular/common/http', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.stemy = global.stemy || {}, global.stemy["ngx-utils"] = {}), global.ng.core, null, global.moment, global.rxjs.operators, global.rxjs, global.invokable, global.ng.router, global.ng.common, global["ngx-device-detector"], global.ng.common.http, global.
|
|
5
|
-
})(this, (function (exports, core, reflectMetadata, moment, operators, rxjs, invokable, router, common, ngxDeviceDetector, http,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('reflect-metadata'), require('moment'), require('rxjs/operators'), require('rxjs'), require('invokable'), require('@angular/router'), require('@angular/common'), require('ngx-device-detector'), require('@angular/common/http'), require('@angular/platform-browser'), require('resize-detector'), require('@angular/forms')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@stemy/ngx-utils', ['exports', '@angular/core', 'reflect-metadata', 'moment', 'rxjs/operators', 'rxjs', 'invokable', '@angular/router', '@angular/common', 'ngx-device-detector', '@angular/common/http', '@angular/platform-browser', 'resize-detector', '@angular/forms'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.stemy = global.stemy || {}, global.stemy["ngx-utils"] = {}), global.ng.core, null, global.moment, global.rxjs.operators, global.rxjs, global.invokable, global.ng.router, global.ng.common, global["ngx-device-detector"], global.ng.common.http, global.ng.platformBrowser, global["resize-detector"], global.ng.forms));
|
|
5
|
+
})(this, (function (exports, core, reflectMetadata, moment, operators, rxjs, invokable, router, common, ngxDeviceDetector, http, platformBrowser, resizeDetector, forms) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -2805,7 +2805,7 @@
|
|
|
2805
2805
|
}
|
|
2806
2806
|
StorageService.prototype.get = function (key, defaultValue, mode) {
|
|
2807
2807
|
if (mode === void 0) { mode = exports.StorageMode.Local; }
|
|
2808
|
-
if (this.universal.
|
|
2808
|
+
if (!this.universal.isBrowser)
|
|
2809
2809
|
return defaultValue;
|
|
2810
2810
|
var storage = mode == exports.StorageMode.Local ? localStorage : sessionStorage;
|
|
2811
2811
|
var item = storage.getItem(key);
|
|
@@ -2820,7 +2820,7 @@
|
|
|
2820
2820
|
};
|
|
2821
2821
|
StorageService.prototype.set = function (key, value, mode) {
|
|
2822
2822
|
if (mode === void 0) { mode = exports.StorageMode.Local; }
|
|
2823
|
-
if (this.universal.
|
|
2823
|
+
if (!this.universal.isBrowser)
|
|
2824
2824
|
return;
|
|
2825
2825
|
var storage = mode == exports.StorageMode.Local ? localStorage : sessionStorage;
|
|
2826
2826
|
if (typeof value == "string") {
|
|
@@ -2831,7 +2831,7 @@
|
|
|
2831
2831
|
};
|
|
2832
2832
|
StorageService.prototype.remove = function (key, mode) {
|
|
2833
2833
|
if (mode === void 0) { mode = exports.StorageMode.Local; }
|
|
2834
|
-
if (this.universal.
|
|
2834
|
+
if (!this.universal.isBrowser)
|
|
2835
2835
|
return;
|
|
2836
2836
|
var storage = mode == exports.StorageMode.Local ? localStorage : sessionStorage;
|
|
2837
2837
|
storage.removeItem(key);
|
|
@@ -3199,6 +3199,7 @@
|
|
|
3199
3199
|
return StaticAuthService;
|
|
3200
3200
|
}());
|
|
3201
3201
|
|
|
3202
|
+
var JSON5 = require("json5");
|
|
3202
3203
|
var ConfigService = /** @class */ (function () {
|
|
3203
3204
|
function ConfigService(http, universal, rootElement, baseConfig, scriptParams) {
|
|
3204
3205
|
var _this = this;
|
|
@@ -3288,7 +3289,7 @@
|
|
|
3288
3289
|
return [4 /*yield*/, this.http.get(core.isDevMode() ? configUrl + "5" : configUrl, { responseType: "text" }).toPromise()];
|
|
3289
3290
|
case 2:
|
|
3290
3291
|
config5 = _b.sent();
|
|
3291
|
-
return [2 /*return*/,
|
|
3292
|
+
return [2 /*return*/, JSON5.parse(config5)];
|
|
3292
3293
|
case 3:
|
|
3293
3294
|
e_1 = _b.sent();
|
|
3294
3295
|
_b.label = 4;
|
|
@@ -3323,7 +3324,7 @@
|
|
|
3323
3324
|
return this.loadedConfig[key];
|
|
3324
3325
|
};
|
|
3325
3326
|
ConfigService.prototype.getQueryParameter = function (name, url) {
|
|
3326
|
-
url = url || (this.universal.
|
|
3327
|
+
url = url || (this.universal.isBrowser ? window.location.href : "");
|
|
3327
3328
|
name = name.replace(/[\[\]]/g, "\\$&");
|
|
3328
3329
|
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url);
|
|
3329
3330
|
if (!results)
|
|
@@ -3555,7 +3556,7 @@
|
|
|
3555
3556
|
}
|
|
3556
3557
|
Object.defineProperty(StaticLanguageService.prototype, "defaultLanguage", {
|
|
3557
3558
|
get: function () {
|
|
3558
|
-
return this.configs.getQueryParameter("lang") || this.storage.get("language", this.
|
|
3559
|
+
return this.configs.getQueryParameter("lang") || this.storage.get("language", this.getDefaultLanguage());
|
|
3559
3560
|
},
|
|
3560
3561
|
enumerable: false,
|
|
3561
3562
|
configurable: true
|
|
@@ -3623,25 +3624,6 @@
|
|
|
3623
3624
|
enumerable: false,
|
|
3624
3625
|
configurable: true
|
|
3625
3626
|
});
|
|
3626
|
-
Object.defineProperty(StaticLanguageService.prototype, "browserLang", {
|
|
3627
|
-
get: function () {
|
|
3628
|
-
if (this.universal.isServer || typeof window.navigator === "undefined") {
|
|
3629
|
-
return "de";
|
|
3630
|
-
}
|
|
3631
|
-
var browserLang = (window.navigator.languages ? window.navigator.languages[0] : null)
|
|
3632
|
-
|| window.navigator.language || window.navigator["browserLanguage"] || window.navigator["userLanguage"] || null;
|
|
3633
|
-
if (!browserLang)
|
|
3634
|
-
return browserLang;
|
|
3635
|
-
["-", "_"].forEach(function (splitter) {
|
|
3636
|
-
if (browserLang.indexOf(splitter) >= 0) {
|
|
3637
|
-
browserLang = browserLang.split(splitter)[0];
|
|
3638
|
-
}
|
|
3639
|
-
});
|
|
3640
|
-
return browserLang;
|
|
3641
|
-
},
|
|
3642
|
-
enumerable: false,
|
|
3643
|
-
configurable: true
|
|
3644
|
-
});
|
|
3645
3627
|
Object.defineProperty(StaticLanguageService.prototype, "universal", {
|
|
3646
3628
|
get: function () {
|
|
3647
3629
|
return this.storage.universal;
|
|
@@ -3718,6 +3700,21 @@
|
|
|
3718
3700
|
return ObjectUtils.isDefined(r) ? r : substring;
|
|
3719
3701
|
});
|
|
3720
3702
|
};
|
|
3703
|
+
StaticLanguageService.prototype.getDefaultLanguage = function () {
|
|
3704
|
+
if (!this.universal.isBrowser || typeof window.navigator === "undefined") {
|
|
3705
|
+
return "de";
|
|
3706
|
+
}
|
|
3707
|
+
var browserLang = (window.navigator.languages ? window.navigator.languages[0] : null)
|
|
3708
|
+
|| window.navigator.language || window.navigator["browserLanguage"] || window.navigator["userLanguage"] || null;
|
|
3709
|
+
if (!browserLang)
|
|
3710
|
+
return browserLang;
|
|
3711
|
+
["-", "_"].forEach(function (splitter) {
|
|
3712
|
+
if (browserLang.indexOf(splitter) >= 0) {
|
|
3713
|
+
browserLang = browserLang.split(splitter)[0];
|
|
3714
|
+
}
|
|
3715
|
+
});
|
|
3716
|
+
return browserLang;
|
|
3717
|
+
};
|
|
3721
3718
|
return StaticLanguageService;
|
|
3722
3719
|
}());
|
|
3723
3720
|
StaticLanguageService.decorators = [
|