@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.
Files changed (164) hide show
  1. package/bundles/stemy-ngx-utils.umd.js +26 -29
  2. package/bundles/stemy-ngx-utils.umd.js.map +1 -1
  3. package/esm2015/ngx-utils/services/config.service.js +4 -4
  4. package/esm2015/ngx-utils/services/static-language.service.js +17 -17
  5. package/esm2015/ngx-utils/services/storage.service.js +4 -4
  6. package/esm2020/ngx-utils/common-types.mjs +116 -0
  7. package/esm2020/ngx-utils/components/dynamic-table/dynamic-table.component.mjs +178 -0
  8. package/esm2020/ngx-utils/components/pagination-menu/pagination-menu.component.mjs +101 -0
  9. package/esm2020/ngx-utils/components/unordered-list/unordered-list.component.mjs +65 -0
  10. package/esm2020/ngx-utils/directives/async-method.base.mjs +68 -0
  11. package/esm2020/ngx-utils/directives/async-method.directive.mjs +28 -0
  12. package/esm2020/ngx-utils/directives/background.directive.mjs +51 -0
  13. package/esm2020/ngx-utils/directives/dynamic-table-template.directive.mjs +20 -0
  14. package/esm2020/ngx-utils/directives/global-template.directive.mjs +30 -0
  15. package/esm2020/ngx-utils/directives/icon.directive.mjs +67 -0
  16. package/esm2020/ngx-utils/directives/ngx-template-outlet.directive.mjs +90 -0
  17. package/esm2020/ngx-utils/directives/pagination-item.directive.mjs +33 -0
  18. package/esm2020/ngx-utils/directives/pagination.directive.mjs +83 -0
  19. package/esm2020/ngx-utils/directives/resource-if.directive.mjs +50 -0
  20. package/esm2020/ngx-utils/directives/sticky-class.directive.mjs +34 -0
  21. package/esm2020/ngx-utils/directives/sticky.directive.mjs +55 -0
  22. package/esm2020/ngx-utils/directives/unordered-list-item.directive.mjs +77 -0
  23. package/esm2020/ngx-utils/directives/unordered-list-template.directive.mjs +26 -0
  24. package/esm2020/ngx-utils/ngx-utils.module.mjs +321 -0
  25. package/esm2020/ngx-utils/pipes/chunk.pipe.mjs +25 -0
  26. package/esm2020/ngx-utils/pipes/entries.pipe.mjs +28 -0
  27. package/esm2020/ngx-utils/pipes/extra-item-properties.pipe.mjs +31 -0
  28. package/esm2020/ngx-utils/pipes/filter.pipe.mjs +42 -0
  29. package/esm2020/ngx-utils/pipes/find.pipe.mjs +29 -0
  30. package/esm2020/ngx-utils/pipes/format-number.pipe.mjs +21 -0
  31. package/esm2020/ngx-utils/pipes/get-offset.pipe.mjs +17 -0
  32. package/esm2020/ngx-utils/pipes/get-type.pipe.mjs +16 -0
  33. package/esm2020/ngx-utils/pipes/global-template.pipe.mjs +41 -0
  34. package/esm2020/ngx-utils/pipes/group-by.pipe.mjs +27 -0
  35. package/esm2020/ngx-utils/pipes/is-type.pipe.mjs +16 -0
  36. package/esm2020/ngx-utils/pipes/join.pipe.mjs +19 -0
  37. package/esm2020/ngx-utils/pipes/keys.pipe.mjs +22 -0
  38. package/esm2020/ngx-utils/pipes/map.pipe.mjs +29 -0
  39. package/esm2020/ngx-utils/pipes/max.pipe.mjs +26 -0
  40. package/esm2020/ngx-utils/pipes/min.pipe.mjs +26 -0
  41. package/esm2020/ngx-utils/pipes/reduce.pipe.mjs +30 -0
  42. package/esm2020/ngx-utils/pipes/remap.pipe.mjs +32 -0
  43. package/esm2020/ngx-utils/pipes/replace.pipe.mjs +16 -0
  44. package/esm2020/ngx-utils/pipes/reverse.pipe.mjs +24 -0
  45. package/esm2020/ngx-utils/pipes/round.pipe.mjs +21 -0
  46. package/esm2020/ngx-utils/pipes/safe-html.pipe.mjs +34 -0
  47. package/esm2020/ngx-utils/pipes/translate.pipe.mjs +86 -0
  48. package/esm2020/ngx-utils/pipes/values.pipe.mjs +22 -0
  49. package/esm2020/ngx-utils/plugins/resize-event.plugin.mjs +59 -0
  50. package/esm2020/ngx-utils/plugins/scroll-event.plugin.mjs +39 -0
  51. package/esm2020/ngx-utils/services/acl.service.mjs +81 -0
  52. package/esm2020/ngx-utils/services/api.service.mjs +38 -0
  53. package/esm2020/ngx-utils/services/auth.service.mjs +14 -0
  54. package/esm2020/ngx-utils/services/base-http.client.mjs +47 -0
  55. package/esm2020/ngx-utils/services/base-http.service.mjs +298 -0
  56. package/esm2020/ngx-utils/services/config.service.mjs +129 -0
  57. package/esm2020/ngx-utils/services/error-handler.service.mjs +49 -0
  58. package/esm2020/ngx-utils/services/events.service.mjs +26 -0
  59. package/esm2020/ngx-utils/services/formatter.service.mjs +47 -0
  60. package/esm2020/ngx-utils/services/global-template.service.mjs +37 -0
  61. package/esm2020/ngx-utils/services/icon.service.mjs +26 -0
  62. package/esm2020/ngx-utils/services/language.service.mjs +113 -0
  63. package/esm2020/ngx-utils/services/open-api.service.mjs +40 -0
  64. package/esm2020/ngx-utils/services/promise.service.mjs +55 -0
  65. package/esm2020/ngx-utils/services/state.service.mjs +173 -0
  66. package/esm2020/ngx-utils/services/static-language.service.mjs +166 -0
  67. package/esm2020/ngx-utils/services/storage.service.mjs +49 -0
  68. package/esm2020/ngx-utils/services/toaster.service.mjs +32 -0
  69. package/esm2020/ngx-utils/services/translated-url.serializer.mjs +73 -0
  70. package/esm2020/ngx-utils/services/universal.service.mjs +78 -0
  71. package/esm2020/ngx-utils/utils/ajax-request-handler.mjs +40 -0
  72. package/esm2020/ngx-utils/utils/array.utils.mjs +100 -0
  73. package/esm2020/ngx-utils/utils/auth.guard.mjs +181 -0
  74. package/esm2020/ngx-utils/utils/canvas.utils.mjs +388 -0
  75. package/esm2020/ngx-utils/utils/date.utils.mjs +28 -0
  76. package/esm2020/ngx-utils/utils/file.utils.mjs +90 -0
  77. package/esm2020/ngx-utils/utils/generic-value.mjs +20 -0
  78. package/esm2020/ngx-utils/utils/geometry.mjs +132 -0
  79. package/esm2020/ngx-utils/utils/initializer.mjs +20 -0
  80. package/esm2020/ngx-utils/utils/loader.utils.mjs +55 -0
  81. package/esm2020/ngx-utils/utils/math.utils.mjs +15 -0
  82. package/esm2020/ngx-utils/utils/object.utils.mjs +261 -0
  83. package/esm2020/ngx-utils/utils/observable.utils.mjs +63 -0
  84. package/esm2020/ngx-utils/utils/reflect.utils.mjs +33 -0
  85. package/esm2020/ngx-utils/utils/set.utils.mjs +20 -0
  86. package/esm2020/ngx-utils/utils/string.utils.mjs +28 -0
  87. package/esm2020/ngx-utils/utils/timer.utils.mjs +52 -0
  88. package/esm2020/ngx-utils/utils/unique.utils.mjs +24 -0
  89. package/esm2020/ngx-utils/utils/vector.mjs +77 -0
  90. package/esm2020/public_api.mjs +85 -0
  91. package/esm2020/stemy-ngx-utils.mjs +5 -0
  92. package/fesm2015/stemy-ngx-utils.js +22 -22
  93. package/fesm2015/stemy-ngx-utils.js.map +1 -1
  94. package/fesm2015/stemy-ngx-utils.mjs +5195 -0
  95. package/fesm2015/stemy-ngx-utils.mjs.map +1 -0
  96. package/fesm2020/stemy-ngx-utils.mjs +5126 -0
  97. package/fesm2020/stemy-ngx-utils.mjs.map +1 -0
  98. package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +3 -0
  99. package/ngx-utils/components/pagination-menu/pagination-menu.component.d.ts +3 -0
  100. package/ngx-utils/components/unordered-list/unordered-list.component.d.ts +3 -0
  101. package/ngx-utils/directives/async-method.base.d.ts +3 -0
  102. package/ngx-utils/directives/async-method.directive.d.ts +3 -0
  103. package/ngx-utils/directives/background.directive.d.ts +3 -0
  104. package/ngx-utils/directives/dynamic-table-template.directive.d.ts +3 -0
  105. package/ngx-utils/directives/global-template.directive.d.ts +3 -0
  106. package/ngx-utils/directives/icon.directive.d.ts +3 -0
  107. package/ngx-utils/directives/ngx-template-outlet.directive.d.ts +3 -0
  108. package/ngx-utils/directives/pagination-item.directive.d.ts +3 -0
  109. package/ngx-utils/directives/pagination.directive.d.ts +3 -0
  110. package/ngx-utils/directives/resource-if.directive.d.ts +3 -0
  111. package/ngx-utils/directives/sticky-class.directive.d.ts +3 -0
  112. package/ngx-utils/directives/sticky.directive.d.ts +3 -0
  113. package/ngx-utils/directives/unordered-list-item.directive.d.ts +3 -0
  114. package/ngx-utils/directives/unordered-list-template.directive.d.ts +3 -0
  115. package/ngx-utils/pipes/chunk.pipe.d.ts +3 -0
  116. package/ngx-utils/pipes/entries.pipe.d.ts +3 -0
  117. package/ngx-utils/pipes/extra-item-properties.pipe.d.ts +3 -0
  118. package/ngx-utils/pipes/filter.pipe.d.ts +3 -0
  119. package/ngx-utils/pipes/find.pipe.d.ts +3 -0
  120. package/ngx-utils/pipes/format-number.pipe.d.ts +3 -0
  121. package/ngx-utils/pipes/get-offset.pipe.d.ts +3 -0
  122. package/ngx-utils/pipes/get-type.pipe.d.ts +3 -0
  123. package/ngx-utils/pipes/global-template.pipe.d.ts +3 -0
  124. package/ngx-utils/pipes/group-by.pipe.d.ts +3 -0
  125. package/ngx-utils/pipes/is-type.pipe.d.ts +3 -0
  126. package/ngx-utils/pipes/join.pipe.d.ts +3 -0
  127. package/ngx-utils/pipes/keys.pipe.d.ts +3 -0
  128. package/ngx-utils/pipes/map.pipe.d.ts +3 -0
  129. package/ngx-utils/pipes/max.pipe.d.ts +3 -0
  130. package/ngx-utils/pipes/min.pipe.d.ts +3 -0
  131. package/ngx-utils/pipes/reduce.pipe.d.ts +3 -0
  132. package/ngx-utils/pipes/remap.pipe.d.ts +3 -0
  133. package/ngx-utils/pipes/replace.pipe.d.ts +3 -0
  134. package/ngx-utils/pipes/reverse.pipe.d.ts +3 -0
  135. package/ngx-utils/pipes/round.pipe.d.ts +3 -0
  136. package/ngx-utils/pipes/safe-html.pipe.d.ts +3 -0
  137. package/ngx-utils/pipes/translate.pipe.d.ts +4 -0
  138. package/ngx-utils/pipes/values.pipe.d.ts +3 -0
  139. package/ngx-utils/plugins/resize-event.plugin.d.ts +4 -1
  140. package/ngx-utils/plugins/scroll-event.plugin.d.ts +4 -1
  141. package/ngx-utils/services/acl.service.d.ts +3 -0
  142. package/ngx-utils/services/api.service.d.ts +3 -0
  143. package/ngx-utils/services/base-http.client.d.ts +3 -0
  144. package/ngx-utils/services/base-http.service.d.ts +3 -0
  145. package/ngx-utils/services/config.service.d.ts +3 -0
  146. package/ngx-utils/services/error-handler.service.d.ts +3 -0
  147. package/ngx-utils/services/events.service.d.ts +3 -0
  148. package/ngx-utils/services/formatter.service.d.ts +3 -0
  149. package/ngx-utils/services/global-template.service.d.ts +3 -0
  150. package/ngx-utils/services/icon.service.d.ts +3 -0
  151. package/ngx-utils/services/language.service.d.ts +3 -0
  152. package/ngx-utils/services/open-api.service.d.ts +3 -0
  153. package/ngx-utils/services/promise.service.d.ts +3 -0
  154. package/ngx-utils/services/state.service.d.ts +3 -0
  155. package/ngx-utils/services/static-language.service.d.ts +4 -1
  156. package/ngx-utils/services/storage.service.d.ts +3 -0
  157. package/ngx-utils/services/toaster.service.d.ts +3 -0
  158. package/ngx-utils/services/translated-url.serializer.d.ts +3 -0
  159. package/ngx-utils/services/universal.service.d.ts +3 -0
  160. package/ngx-utils/utils/auth.guard.d.ts +3 -0
  161. package/package.json +34 -19
  162. package/public_api.d.ts +1 -0
  163. package/stemy-ngx-utils.d.ts +1 -2
  164. 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('json5'), 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', 'json5', '@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.json5, global.ng.platformBrowser, global["resize-detector"], global.ng.forms));
5
- })(this, (function (exports, core, reflectMetadata, moment, operators, rxjs, invokable, router, common, ngxDeviceDetector, http, json5, platformBrowser, resizeDetector, forms) { 'use strict';
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.isServer)
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.isServer)
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.isServer)
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*/, json5.parse(config5)];
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.isServer ? "" : window.location.href);
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.browserLang);
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 = [