@stemy/ngx-utils 12.1.1 → 12.1.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/bundles/stemy-ngx-utils.umd.js +51 -30
- package/bundles/stemy-ngx-utils.umd.js.map +1 -1
- package/esm2015/ngx-utils/services/acl.service.js +3 -1
- package/esm2015/ngx-utils/services/config.service.js +4 -4
- package/esm2015/ngx-utils/services/error-handler.service.js +2 -2
- package/esm2015/ngx-utils/services/static-language.service.js +17 -17
- package/esm2015/ngx-utils/services/storage.service.js +4 -4
- package/esm2015/ngx-utils/utils/file-system.js +20 -0
- package/esm2015/public_api.js +2 -1
- package/esm2020/ngx-utils/common-types.mjs +117 -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 +78 -0
- package/esm2020/ngx-utils/directives/async-method.directive.mjs +21 -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.imports.mjs +165 -0
- package/esm2020/ngx-utils/ngx-utils.module.mjs +178 -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 +116 -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 +41 -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/esm2020/tools/config.mjs +71 -0
- package/esm2020/tools/public_api.mjs +2 -0
- package/esm2020/tools/stemy-ngx-utils-tools.mjs +5 -0
- package/fesm2015/stemy-ngx-utils-tools.mjs +77 -0
- package/fesm2015/stemy-ngx-utils-tools.mjs.map +1 -0
- package/fesm2015/stemy-ngx-utils.js +46 -24
- package/fesm2015/stemy-ngx-utils.js.map +1 -1
- package/fesm2015/stemy-ngx-utils.mjs +5168 -0
- package/fesm2015/stemy-ngx-utils.mjs.map +1 -0
- package/fesm2020/stemy-ngx-utils-tools.mjs +77 -0
- package/fesm2020/stemy-ngx-utils-tools.mjs.map +1 -0
- package/fesm2020/stemy-ngx-utils.mjs +5099 -0
- package/fesm2020/stemy-ngx-utils.mjs.map +1 -0
- package/ngx-utils/services/static-language.service.d.ts +1 -1
- package/ngx-utils/utils/file-system.d.ts +16 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/stemy-ngx-utils.metadata.json +1 -1
- package/tools/config.d.ts +7 -0
- package/tools/package.json +10 -0
- package/tools/public_api.d.ts +1 -0
- package/tools/stemy-ngx-utils-tools.d.ts +5 -0
- package/bundles/stemy-ngx-utils.umd.min.js +0 -16
- package/bundles/stemy-ngx-utils.umd.min.js.map +0 -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.
|
|
@@ -1392,6 +1392,27 @@
|
|
|
1392
1392
|
return GenericValue;
|
|
1393
1393
|
}(rxjs.Subject));
|
|
1394
1394
|
|
|
1395
|
+
var FileSystemEntry = /** @class */ (function () {
|
|
1396
|
+
function FileSystemEntry(label, meta, image, data, parent, openCb) {
|
|
1397
|
+
this.label = label;
|
|
1398
|
+
this.meta = meta;
|
|
1399
|
+
this.image = image;
|
|
1400
|
+
this.data = data;
|
|
1401
|
+
this.parent = parent;
|
|
1402
|
+
this.openCb = openCb;
|
|
1403
|
+
this.path = !parent ? [this] : parent.path.concat([this]);
|
|
1404
|
+
this.level = this.path.length - 1;
|
|
1405
|
+
this.classes = this.path
|
|
1406
|
+
.filter(function (t) { return typeof t.data === "string" && t.data.length > 0; }).map(function (t) { return t.data; })
|
|
1407
|
+
.concat(["level-" + this.level]);
|
|
1408
|
+
}
|
|
1409
|
+
FileSystemEntry.prototype.open = function () {
|
|
1410
|
+
this.result = this.result || this.openCb(this.data, this);
|
|
1411
|
+
return this.result;
|
|
1412
|
+
};
|
|
1413
|
+
return FileSystemEntry;
|
|
1414
|
+
}());
|
|
1415
|
+
|
|
1395
1416
|
var Rect = /** @class */ (function () {
|
|
1396
1417
|
function Rect(x, y, width, height, rotation) {
|
|
1397
1418
|
if (rotation === void 0) { rotation = 0; }
|
|
@@ -2690,6 +2711,8 @@
|
|
|
2690
2711
|
return;
|
|
2691
2712
|
info.dirty = false;
|
|
2692
2713
|
var component = info.component;
|
|
2714
|
+
if (!info.component)
|
|
2715
|
+
return;
|
|
2693
2716
|
if (info.first) {
|
|
2694
2717
|
if (ObjectUtils.isFunction(component.onUserInitialized)) {
|
|
2695
2718
|
component.onUserInitialized();
|
|
@@ -2805,7 +2828,7 @@
|
|
|
2805
2828
|
}
|
|
2806
2829
|
StorageService.prototype.get = function (key, defaultValue, mode) {
|
|
2807
2830
|
if (mode === void 0) { mode = exports.StorageMode.Local; }
|
|
2808
|
-
if (this.universal.
|
|
2831
|
+
if (!this.universal.isBrowser)
|
|
2809
2832
|
return defaultValue;
|
|
2810
2833
|
var storage = mode == exports.StorageMode.Local ? localStorage : sessionStorage;
|
|
2811
2834
|
var item = storage.getItem(key);
|
|
@@ -2820,7 +2843,7 @@
|
|
|
2820
2843
|
};
|
|
2821
2844
|
StorageService.prototype.set = function (key, value, mode) {
|
|
2822
2845
|
if (mode === void 0) { mode = exports.StorageMode.Local; }
|
|
2823
|
-
if (this.universal.
|
|
2846
|
+
if (!this.universal.isBrowser)
|
|
2824
2847
|
return;
|
|
2825
2848
|
var storage = mode == exports.StorageMode.Local ? localStorage : sessionStorage;
|
|
2826
2849
|
if (typeof value == "string") {
|
|
@@ -2831,7 +2854,7 @@
|
|
|
2831
2854
|
};
|
|
2832
2855
|
StorageService.prototype.remove = function (key, mode) {
|
|
2833
2856
|
if (mode === void 0) { mode = exports.StorageMode.Local; }
|
|
2834
|
-
if (this.universal.
|
|
2857
|
+
if (!this.universal.isBrowser)
|
|
2835
2858
|
return;
|
|
2836
2859
|
var storage = mode == exports.StorageMode.Local ? localStorage : sessionStorage;
|
|
2837
2860
|
storage.removeItem(key);
|
|
@@ -3199,6 +3222,7 @@
|
|
|
3199
3222
|
return StaticAuthService;
|
|
3200
3223
|
}());
|
|
3201
3224
|
|
|
3225
|
+
var JSON5 = require("json5");
|
|
3202
3226
|
var ConfigService = /** @class */ (function () {
|
|
3203
3227
|
function ConfigService(http, universal, rootElement, baseConfig, scriptParams) {
|
|
3204
3228
|
var _this = this;
|
|
@@ -3288,7 +3312,7 @@
|
|
|
3288
3312
|
return [4 /*yield*/, this.http.get(core.isDevMode() ? configUrl + "5" : configUrl, { responseType: "text" }).toPromise()];
|
|
3289
3313
|
case 2:
|
|
3290
3314
|
config5 = _b.sent();
|
|
3291
|
-
return [2 /*return*/,
|
|
3315
|
+
return [2 /*return*/, JSON5.parse(config5)];
|
|
3292
3316
|
case 3:
|
|
3293
3317
|
e_1 = _b.sent();
|
|
3294
3318
|
_b.label = 4;
|
|
@@ -3323,7 +3347,7 @@
|
|
|
3323
3347
|
return this.loadedConfig[key];
|
|
3324
3348
|
};
|
|
3325
3349
|
ConfigService.prototype.getQueryParameter = function (name, url) {
|
|
3326
|
-
url = url || (this.universal.
|
|
3350
|
+
url = url || (this.universal.isBrowser ? window.location.href : "");
|
|
3327
3351
|
name = name.replace(/[\[\]]/g, "\\$&");
|
|
3328
3352
|
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url);
|
|
3329
3353
|
if (!results)
|
|
@@ -3373,7 +3397,7 @@
|
|
|
3373
3397
|
}
|
|
3374
3398
|
if (this.universal.isServer)
|
|
3375
3399
|
return;
|
|
3376
|
-
var key = btoa(unescape(encodeURIComponent(error.message + " " + error.stack)));
|
|
3400
|
+
var key = typeof btoa !== "undefined" ? btoa(unescape(encodeURIComponent(error.message + " " + error.stack))) : error.message;
|
|
3377
3401
|
if (this.errorMap[key] && this.errorMap[key].getTime() > date.getTime() - 5000)
|
|
3378
3402
|
return;
|
|
3379
3403
|
this.errorMap[key] = date;
|
|
@@ -3555,7 +3579,7 @@
|
|
|
3555
3579
|
}
|
|
3556
3580
|
Object.defineProperty(StaticLanguageService.prototype, "defaultLanguage", {
|
|
3557
3581
|
get: function () {
|
|
3558
|
-
return this.configs.getQueryParameter("lang") || this.storage.get("language", this.
|
|
3582
|
+
return this.configs.getQueryParameter("lang") || this.storage.get("language", this.getDefaultLanguage());
|
|
3559
3583
|
},
|
|
3560
3584
|
enumerable: false,
|
|
3561
3585
|
configurable: true
|
|
@@ -3623,25 +3647,6 @@
|
|
|
3623
3647
|
enumerable: false,
|
|
3624
3648
|
configurable: true
|
|
3625
3649
|
});
|
|
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
3650
|
Object.defineProperty(StaticLanguageService.prototype, "universal", {
|
|
3646
3651
|
get: function () {
|
|
3647
3652
|
return this.storage.universal;
|
|
@@ -3718,6 +3723,21 @@
|
|
|
3718
3723
|
return ObjectUtils.isDefined(r) ? r : substring;
|
|
3719
3724
|
});
|
|
3720
3725
|
};
|
|
3726
|
+
StaticLanguageService.prototype.getDefaultLanguage = function () {
|
|
3727
|
+
if (!this.universal.isBrowser || typeof window.navigator === "undefined") {
|
|
3728
|
+
return "de";
|
|
3729
|
+
}
|
|
3730
|
+
var browserLang = (window.navigator.languages ? window.navigator.languages[0] : null)
|
|
3731
|
+
|| window.navigator.language || window.navigator["browserLanguage"] || window.navigator["userLanguage"] || null;
|
|
3732
|
+
if (!browserLang)
|
|
3733
|
+
return browserLang;
|
|
3734
|
+
["-", "_"].forEach(function (splitter) {
|
|
3735
|
+
if (browserLang.indexOf(splitter) >= 0) {
|
|
3736
|
+
browserLang = browserLang.split(splitter)[0];
|
|
3737
|
+
}
|
|
3738
|
+
});
|
|
3739
|
+
return browserLang;
|
|
3740
|
+
};
|
|
3721
3741
|
return StaticLanguageService;
|
|
3722
3742
|
}());
|
|
3723
3743
|
StaticLanguageService.decorators = [
|
|
@@ -6036,6 +6056,7 @@
|
|
|
6036
6056
|
exports.EventsService = EventsService;
|
|
6037
6057
|
exports.ExtraItemPropertiesPipe = ExtraItemPropertiesPipe;
|
|
6038
6058
|
exports.FactoryDependencies = FactoryDependencies;
|
|
6059
|
+
exports.FileSystemEntry = FileSystemEntry;
|
|
6039
6060
|
exports.FileUtils = FileUtils;
|
|
6040
6061
|
exports.FilterPipe = FilterPipe;
|
|
6041
6062
|
exports.FindPipe = FindPipe;
|