@stemy/ngx-utils 12.2.6 → 12.2.8
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 +61 -46
- package/bundles/stemy-ngx-utils.umd.js.map +1 -1
- package/esm2015/ngx-utils/directives/async-method.base.js +14 -2
- package/esm2015/ngx-utils/directives/async-method.directive.js +2 -9
- package/esm2015/ngx-utils/ngx-utils.module.js +3 -1
- package/esm2015/ngx-utils/utils/date.utils.js +8 -7
- package/esm2015/public_api.js +2 -1
- package/esm2015/stemy-ngx-utils.js +1 -2
- package/esm2020/ngx-utils/components/unordered-list/unordered-list.component.mjs +3 -3
- package/esm2020/ngx-utils/ngx-utils.imports.mjs +7 -1
- package/esm2020/ngx-utils/ngx-utils.module.mjs +31 -28
- package/esm2020/ngx-utils/pipes/pop.pipe.mjs +16 -0
- package/esm2020/ngx-utils/pipes/shift.pipe.mjs +16 -0
- package/esm2020/ngx-utils/pipes/split.pipe.mjs +16 -0
- package/esm2020/ngx-utils/plugins/resize-event.plugin.mjs +4 -4
- package/esm2020/ngx-utils/services/config.service.mjs +6 -5
- package/esm2020/ngx-utils/services/formatter.service.mjs +3 -2
- package/esm2020/ngx-utils/utils/array.utils.mjs +8 -1
- package/esm2020/ngx-utils/utils/date.utils.mjs +5 -5
- package/esm2020/ngx-utils/utils/file-system.mjs +6 -1
- package/esm2020/ngx-utils/utils/math.utils.mjs +31 -2
- package/esm2020/ngx-utils/utils/object.utils.mjs +36 -25
- package/esm2020/public_api.mjs +4 -1
- package/fesm2015/stemy-ngx-utils.js +54 -47
- package/fesm2015/stemy-ngx-utils.js.map +1 -1
- package/fesm2015/stemy-ngx-utils.mjs +142 -42
- package/fesm2015/stemy-ngx-utils.mjs.map +1 -1
- package/fesm2020/stemy-ngx-utils.mjs +141 -42
- package/fesm2020/stemy-ngx-utils.mjs.map +1 -1
- 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 +2 -2
- package/ngx-utils/utils/date.utils.d.ts +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/stemy-ngx-utils.d.ts +0 -1
- package/stemy-ngx-utils.metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
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
|
-
import
|
|
4
|
+
import * as moment from 'moment';
|
|
5
5
|
import { first, skipWhile, mergeMap, timeout, map } from 'rxjs/operators';
|
|
6
6
|
import { Subject, BehaviorSubject, Observable, Subscription, from, TimeoutError, combineLatest } from 'rxjs';
|
|
7
7
|
import { Invokable } from 'invokable';
|
|
@@ -17,7 +17,7 @@ import { HttpClient, HttpHeaders, HttpParams, HttpUrlEncodingCodec, HttpEventTyp
|
|
|
17
17
|
import * as JSON5 from 'json5';
|
|
18
18
|
import * as i1$2 from '@angular/platform-browser';
|
|
19
19
|
import { ɵDomEventsPlugin, EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
20
|
-
import
|
|
20
|
+
import * as detector from 'resize-detector';
|
|
21
21
|
import * as i4 from '@angular/forms';
|
|
22
22
|
import { FormsModule } from '@angular/forms';
|
|
23
23
|
|
|
@@ -54,7 +54,10 @@ class ObjectUtils {
|
|
|
54
54
|
Object.getOwnPropertyNames(obj).forEach(p => props.add(p));
|
|
55
55
|
return Array.from(props);
|
|
56
56
|
}
|
|
57
|
-
static equals(a, b) {
|
|
57
|
+
static equals(a, b, visited = null) {
|
|
58
|
+
visited = visited || new Set();
|
|
59
|
+
if (visited.has(a) && visited.has(b))
|
|
60
|
+
return true;
|
|
58
61
|
if (a === b)
|
|
59
62
|
return true;
|
|
60
63
|
if (a === null || b === null)
|
|
@@ -64,12 +67,14 @@ class ObjectUtils {
|
|
|
64
67
|
const at = typeof a, bt = typeof b;
|
|
65
68
|
let length, key, keySet;
|
|
66
69
|
if (at == bt && at == "object") {
|
|
70
|
+
visited.add(a);
|
|
71
|
+
visited.add(b);
|
|
67
72
|
if (Array.isArray(a)) {
|
|
68
73
|
if (!Array.isArray(b))
|
|
69
74
|
return false;
|
|
70
75
|
if ((length = a.length) == b.length) {
|
|
71
76
|
for (key = 0; key < length; key++) {
|
|
72
|
-
if (!ObjectUtils.equals(a[key], b[key]))
|
|
77
|
+
if (!ObjectUtils.equals(a[key], b[key], visited))
|
|
73
78
|
return false;
|
|
74
79
|
}
|
|
75
80
|
return true;
|
|
@@ -82,7 +87,7 @@ class ObjectUtils {
|
|
|
82
87
|
keySet = Object.create(null);
|
|
83
88
|
for (key in a) {
|
|
84
89
|
if (a.hasOwnProperty(key)) {
|
|
85
|
-
if (!ObjectUtils.equals(a[key], b[key])) {
|
|
90
|
+
if (!ObjectUtils.equals(a[key], b[key], visited)) {
|
|
86
91
|
return false;
|
|
87
92
|
}
|
|
88
93
|
keySet[key] = true;
|
|
@@ -176,13 +181,13 @@ class ObjectUtils {
|
|
|
176
181
|
return isNaN(key) || isArray ? target : Object.values(target);
|
|
177
182
|
}
|
|
178
183
|
static filter(obj, predicate) {
|
|
179
|
-
return ObjectUtils.copyRecursive(null, obj, predicate);
|
|
184
|
+
return ObjectUtils.copyRecursive(null, obj, predicate, new Map());
|
|
180
185
|
}
|
|
181
186
|
static copy(obj) {
|
|
182
|
-
return ObjectUtils.copyRecursive(null, obj);
|
|
187
|
+
return ObjectUtils.copyRecursive(null, obj, null, new Map());
|
|
183
188
|
}
|
|
184
189
|
static assign(target, source, predicate) {
|
|
185
|
-
return ObjectUtils.copyRecursive(target, source, predicate);
|
|
190
|
+
return ObjectUtils.copyRecursive(target, source, predicate, new Map());
|
|
186
191
|
}
|
|
187
192
|
static getType(obj) {
|
|
188
193
|
const regex = new RegExp("\\s([a-zA-Z]+)");
|
|
@@ -257,28 +262,34 @@ class ObjectUtils {
|
|
|
257
262
|
const str = ObjectUtils.isDefined(obj) ? obj.toString() : "";
|
|
258
263
|
return str.length >= width ? str : new Array(width - str.length + 1).join(chr) + str;
|
|
259
264
|
}
|
|
260
|
-
static copyRecursive(target, source, predicate) {
|
|
265
|
+
static copyRecursive(target, source, predicate, copies) {
|
|
261
266
|
predicate = predicate || defaultPredicate;
|
|
262
267
|
if (ObjectUtils.isPrimitive(source) || ObjectUtils.isDate(source) || ObjectUtils.isBlob(source) || ObjectUtils.isFunction(source))
|
|
263
268
|
return source;
|
|
264
|
-
if (
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
269
|
+
if (!copies.has(source)) {
|
|
270
|
+
if (ObjectUtils.isArray(source)) {
|
|
271
|
+
target = ObjectUtils.isArray(target) ? Array.from(target) : [];
|
|
272
|
+
copies.set(source, target);
|
|
273
|
+
source.forEach((item, index) => {
|
|
274
|
+
if (!predicate(item, index, target, source))
|
|
275
|
+
return;
|
|
276
|
+
if (target.length > index)
|
|
277
|
+
target[index] = ObjectUtils.copyRecursive(target[index], item, predicate, copies);
|
|
278
|
+
else
|
|
279
|
+
target.push(ObjectUtils.copyRecursive(null, item, predicate, copies));
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
target = Object.assign({}, target);
|
|
284
|
+
copies.set(source, target);
|
|
285
|
+
Object.keys(source).forEach((key) => {
|
|
286
|
+
if (!predicate(source[key], key, target, source))
|
|
287
|
+
return;
|
|
288
|
+
target[key] = ObjectUtils.copyRecursive(target[key], source[key], predicate, copies);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
275
291
|
}
|
|
276
|
-
return
|
|
277
|
-
if (!predicate(source[key], key, result, source))
|
|
278
|
-
return result;
|
|
279
|
-
result[key] = ObjectUtils.copyRecursive(result[key], source[key], predicate);
|
|
280
|
-
return result;
|
|
281
|
-
}, Object.assign({}, target));
|
|
292
|
+
return copies.get(source);
|
|
282
293
|
}
|
|
283
294
|
}
|
|
284
295
|
|
|
@@ -469,13 +480,13 @@ AjaxRequestHandler.isOverridden = false;
|
|
|
469
480
|
|
|
470
481
|
class DateUtils {
|
|
471
482
|
static isHoliday(date) {
|
|
472
|
-
return
|
|
483
|
+
return moment(date).isoWeekday() > 5;
|
|
473
484
|
}
|
|
474
485
|
static isBusinessDay(date) {
|
|
475
|
-
return
|
|
486
|
+
return moment(date).isoWeekday() < 6;
|
|
476
487
|
}
|
|
477
488
|
static add(date, amount, unit) {
|
|
478
|
-
return
|
|
489
|
+
return moment(date).add(amount, unit).toDate();
|
|
479
490
|
}
|
|
480
491
|
static businessAdd(date, amount, unit) {
|
|
481
492
|
const signal = amount < 0 ? -1 : 1;
|
|
@@ -1003,6 +1014,11 @@ class FileSystemEntry {
|
|
|
1003
1014
|
}
|
|
1004
1015
|
open() {
|
|
1005
1016
|
this.result = this.result || this.openCb(this.data, this);
|
|
1017
|
+
this.result.then(res => {
|
|
1018
|
+
if (Array.isArray(res))
|
|
1019
|
+
return;
|
|
1020
|
+
this.result = null;
|
|
1021
|
+
});
|
|
1006
1022
|
return this.result;
|
|
1007
1023
|
}
|
|
1008
1024
|
}
|
|
@@ -1215,7 +1231,7 @@ LoaderUtils.stylePromises = {};
|
|
|
1215
1231
|
|
|
1216
1232
|
class MathUtils {
|
|
1217
1233
|
static equal(a, b, epsilon = null) {
|
|
1218
|
-
epsilon = ObjectUtils.isNumber(epsilon) ? epsilon :
|
|
1234
|
+
epsilon = ObjectUtils.isNumber(epsilon) ? epsilon : MathUtils.EPSILON;
|
|
1219
1235
|
return Math.abs(a - b) < epsilon;
|
|
1220
1236
|
}
|
|
1221
1237
|
static clamp(value, min, max) {
|
|
@@ -1225,7 +1241,37 @@ class MathUtils {
|
|
|
1225
1241
|
precision = Math.pow(10, precision);
|
|
1226
1242
|
return Math.round(value * precision / divider) / precision;
|
|
1227
1243
|
}
|
|
1228
|
-
|
|
1244
|
+
static approxIndex(x, values, epsilon = null) {
|
|
1245
|
+
if (!Array.isArray(values) || values.length == 0) {
|
|
1246
|
+
return -1;
|
|
1247
|
+
}
|
|
1248
|
+
let s = 0;
|
|
1249
|
+
let e = values.length - 1;
|
|
1250
|
+
while (s <= e) {
|
|
1251
|
+
const i = Math.floor((s + e) / 2);
|
|
1252
|
+
const v = values[i];
|
|
1253
|
+
if (MathUtils.equal(v, x, epsilon)) {
|
|
1254
|
+
return i;
|
|
1255
|
+
}
|
|
1256
|
+
if (v < x) {
|
|
1257
|
+
s = i + 1;
|
|
1258
|
+
}
|
|
1259
|
+
else {
|
|
1260
|
+
e = i - 1;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
const m = Math.max(e, 0);
|
|
1264
|
+
const a = values[s];
|
|
1265
|
+
const b = values[m];
|
|
1266
|
+
return Math.abs(a - x) < Math.abs(b - x) ? s : m;
|
|
1267
|
+
}
|
|
1268
|
+
static approximate(x, values, epsilon = null) {
|
|
1269
|
+
var _a;
|
|
1270
|
+
const index = MathUtils.approxIndex(x, values, epsilon);
|
|
1271
|
+
return (_a = values[index]) !== null && _a !== void 0 ? _a : null;
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
MathUtils.EPSILON = 1e-9;
|
|
1229
1275
|
|
|
1230
1276
|
/**
|
|
1231
1277
|
* Use this service to determine which is the current environment
|
|
@@ -1906,6 +1952,13 @@ class ArrayUtils {
|
|
|
1906
1952
|
}
|
|
1907
1953
|
return result;
|
|
1908
1954
|
}
|
|
1955
|
+
static unique(arr) {
|
|
1956
|
+
if (!ObjectUtils.isArray(arr))
|
|
1957
|
+
return [];
|
|
1958
|
+
return arr.filter((value, index, self) => {
|
|
1959
|
+
return self.indexOf(value) === index;
|
|
1960
|
+
});
|
|
1961
|
+
}
|
|
1909
1962
|
}
|
|
1910
1963
|
|
|
1911
1964
|
class SetUtils {
|
|
@@ -2532,9 +2585,10 @@ class StaticAuthService {
|
|
|
2532
2585
|
}
|
|
2533
2586
|
|
|
2534
2587
|
class ConfigService {
|
|
2535
|
-
constructor(http, universal, rootElement, baseUrl, baseConfig = null, scriptParams = null) {
|
|
2588
|
+
constructor(http, universal, injector, rootElement, baseUrl, baseConfig = null, scriptParams = null) {
|
|
2536
2589
|
this.http = http;
|
|
2537
2590
|
this.universal = universal;
|
|
2591
|
+
this.injector = injector;
|
|
2538
2592
|
this.rootElement = rootElement;
|
|
2539
2593
|
this.baseUrl = baseUrl;
|
|
2540
2594
|
for (const key in []) {
|
|
@@ -2618,12 +2672,12 @@ class ConfigService {
|
|
|
2618
2672
|
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
|
2619
2673
|
}
|
|
2620
2674
|
}
|
|
2621
|
-
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_URL }, { token: BASE_CONFIG, optional: true }, { token: SCRIPT_PARAMS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2675
|
+
ConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService, deps: [{ token: i1$1.HttpClient }, { token: UniversalService }, { token: i0.Injector }, { token: ROOT_ELEMENT }, { token: APP_BASE_URL }, { token: BASE_CONFIG, optional: true }, { token: SCRIPT_PARAMS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2622
2676
|
ConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService });
|
|
2623
2677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService, decorators: [{
|
|
2624
2678
|
type: Injectable
|
|
2625
2679
|
}], ctorParameters: function () {
|
|
2626
|
-
return [{ type: i1$1.HttpClient }, { type: UniversalService }, { type: undefined, decorators: [{
|
|
2680
|
+
return [{ type: i1$1.HttpClient }, { type: UniversalService }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
2627
2681
|
type: Inject,
|
|
2628
2682
|
args: [ROOT_ELEMENT]
|
|
2629
2683
|
}] }, { type: undefined, decorators: [{
|
|
@@ -2733,7 +2787,8 @@ class FormatterService {
|
|
|
2733
2787
|
const num = ObjectUtils.isNumber(value) ? value : parseFloat(value) || 0;
|
|
2734
2788
|
const str = (num / divider).toLocaleString(this.language.currentLanguage, {
|
|
2735
2789
|
minimumFractionDigits: precision,
|
|
2736
|
-
maximumFractionDigits: precision
|
|
2790
|
+
maximumFractionDigits: precision,
|
|
2791
|
+
useGrouping: false
|
|
2737
2792
|
});
|
|
2738
2793
|
return ObjectUtils.evaluate(format || this.defaultNumberFormat, { num: str });
|
|
2739
2794
|
}
|
|
@@ -3309,7 +3364,7 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3309
3364
|
element.addEventListener(eventName, cb);
|
|
3310
3365
|
}
|
|
3311
3366
|
else {
|
|
3312
|
-
addListener(element, cb);
|
|
3367
|
+
detector.addListener(element, cb);
|
|
3313
3368
|
}
|
|
3314
3369
|
return () => {
|
|
3315
3370
|
try {
|
|
@@ -3317,7 +3372,7 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3317
3372
|
element.removeEventListener(eventName, cb);
|
|
3318
3373
|
}
|
|
3319
3374
|
else {
|
|
3320
|
-
removeListener(element, cb);
|
|
3375
|
+
detector.removeListener(element, cb);
|
|
3321
3376
|
}
|
|
3322
3377
|
}
|
|
3323
3378
|
catch (e) {
|
|
@@ -3742,6 +3797,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
3742
3797
|
}]
|
|
3743
3798
|
}] });
|
|
3744
3799
|
|
|
3800
|
+
class PopPipe {
|
|
3801
|
+
transform(value) {
|
|
3802
|
+
return !Array.isArray(value) ? null : Array.from(value).pop();
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
PopPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: PopPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3806
|
+
PopPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: PopPipe, name: "pop" });
|
|
3807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: PopPipe, decorators: [{
|
|
3808
|
+
type: Pipe,
|
|
3809
|
+
args: [{
|
|
3810
|
+
name: "pop"
|
|
3811
|
+
}]
|
|
3812
|
+
}] });
|
|
3813
|
+
|
|
3745
3814
|
function defaultReducer(result) {
|
|
3746
3815
|
return result;
|
|
3747
3816
|
}
|
|
@@ -3880,6 +3949,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
3880
3949
|
}]
|
|
3881
3950
|
}], ctorParameters: function () { return [{ type: i1$2.DomSanitizer }]; } });
|
|
3882
3951
|
|
|
3952
|
+
class ShiftPipe {
|
|
3953
|
+
transform(value) {
|
|
3954
|
+
return !Array.isArray(value) ? null : Array.from(value).shift();
|
|
3955
|
+
}
|
|
3956
|
+
}
|
|
3957
|
+
ShiftPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ShiftPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3958
|
+
ShiftPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ShiftPipe, name: "shift" });
|
|
3959
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ShiftPipe, decorators: [{
|
|
3960
|
+
type: Pipe,
|
|
3961
|
+
args: [{
|
|
3962
|
+
name: "shift"
|
|
3963
|
+
}]
|
|
3964
|
+
}] });
|
|
3965
|
+
|
|
3966
|
+
class SplitPipe {
|
|
3967
|
+
transform(value, separator = ".") {
|
|
3968
|
+
return `${value}`.split(separator);
|
|
3969
|
+
}
|
|
3970
|
+
}
|
|
3971
|
+
SplitPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SplitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3972
|
+
SplitPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SplitPipe, name: "split" });
|
|
3973
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SplitPipe, decorators: [{
|
|
3974
|
+
type: Pipe,
|
|
3975
|
+
args: [{
|
|
3976
|
+
name: "split"
|
|
3977
|
+
}]
|
|
3978
|
+
}] });
|
|
3979
|
+
|
|
3883
3980
|
class TranslatePipe {
|
|
3884
3981
|
constructor(cdr, language) {
|
|
3885
3982
|
this.cdr = cdr;
|
|
@@ -4676,10 +4773,10 @@ class UnorderedListComponent {
|
|
|
4676
4773
|
}
|
|
4677
4774
|
}
|
|
4678
4775
|
UnorderedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: UnorderedListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4679
|
-
UnorderedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: UnorderedListComponent, selector: "unordered-list", inputs: { data: "data", keyPrefix: "keyPrefix", listStyle: "listStyle", path: "path", level: "level", templates: "templates" }, queries: [{ propertyName: "templateDirectives", predicate: UnorderedListTemplateDirective }], viewQueries: [{ propertyName: "defaultKeyTemplate", first: true, predicate: ["defaultKeyTemplate"], descendants: true }, { propertyName: "defaultValueTemplate", first: true, predicate: ["defaultValueTemplate"], descendants: true }, { propertyName: "defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" let-isArray=\"isArray\" #defaultKeyTemplate>\r\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-val=\"item.value\" let-path=\"path\"\r\n let-templates=\"templates\" let-isObject=\"valueIsObject\" let-isArray=\"valueIsArray\" #defaultValueTemplate>\r\n <ng-template #value
|
|
4776
|
+
UnorderedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: UnorderedListComponent, selector: "unordered-list", inputs: { data: "data", keyPrefix: "keyPrefix", listStyle: "listStyle", path: "path", level: "level", templates: "templates" }, queries: [{ propertyName: "templateDirectives", predicate: UnorderedListTemplateDirective }], viewQueries: [{ propertyName: "defaultKeyTemplate", first: true, predicate: ["defaultKeyTemplate"], descendants: true }, { propertyName: "defaultValueTemplate", first: true, predicate: ["defaultValueTemplate"], descendants: true }, { propertyName: "defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" let-isArray=\"isArray\" #defaultKeyTemplate>\r\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-val=\"item.value\" let-path=\"path\"\r\n let-templates=\"templates\" let-isObject=\"valueIsObject\" let-isArray=\"valueIsArray\" #defaultValueTemplate>\r\n <ng-template #value>\r\n <span [innerHTML]=\"val\"></span>\r\n </ng-template>\r\n <unordered-list [data]=\"val\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level + 1\"\r\n [templates]=\"templates\"\r\n *ngIf=\"(isObject || isArray); else value\"></unordered-list>\r\n</ng-template>\r\n<ng-template let-item=\"item\" let-data=\"data\" let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-path=\"path\" let-level=\"level\" let-templates=\"templates\" #defaultItemTemplate>\r\n <ng-template #itemKey>\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"key\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </ng-template>\r\n <ng-template #itemValue>\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"value\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf=\"!isArray\">\r\n <th *ngIf=\"listStyle == 'table'; else itemKey\">\r\n <ng-container [ngTemplateOutlet]=\"itemKey\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <td *ngIf=\"listStyle == 'table'; else itemValue\">\r\n <ng-container [ngTemplateOutlet]=\"itemValue\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #value>\r\n <span [innerHTML]=\"data\"></span>\r\n</ng-template>\r\n<ng-container *ngIf=\"(isObject || isArray); else value\" [ngSwitch]=\"listStyle\">\r\n <ul [ngClass]=\"'level-' + level\" *ngSwitchCase=\"'list'\">\r\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path ? path + '.' + item.key : item.key\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </li>\r\n </ul>\r\n <table [ngClass]=\"'level-' + level\" *ngSwitchDefault>\r\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path ? path + '.' + item.key : item.key\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </tr>\r\n </table>\r\n</ng-container>\r\n", components: [{ type: UnorderedListComponent, selector: "unordered-list", inputs: ["data", "keyPrefix", "listStyle", "path", "level", "templates"] }], directives: [{ type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: UnorderedListItemDirective, selector: "[unorderedListItem]", inputs: ["unorderedListItem", "type", "data", "keyPrefix", "listStyle", "path", "level", "templates", "defaultTemplates"] }, { type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1$3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1$3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$3.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "translate": TranslatePipe, "entries": EntriesPipe } });
|
|
4680
4777
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: UnorderedListComponent, decorators: [{
|
|
4681
4778
|
type: Component,
|
|
4682
|
-
args: [{ selector: "unordered-list", template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" let-isArray=\"isArray\" #defaultKeyTemplate>\r\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-val=\"item.value\" let-path=\"path\"\r\n let-templates=\"templates\" let-isObject=\"valueIsObject\" let-isArray=\"valueIsArray\" #defaultValueTemplate>\r\n <ng-template #value
|
|
4779
|
+
args: [{ selector: "unordered-list", template: "<ng-template let-keyPrefix=\"keyPrefix\" let-key=\"item.key\" let-isArray=\"isArray\" #defaultKeyTemplate>\r\n {{ (keyPrefix ? keyPrefix + key : key) | translate }}:\r\n</ng-template>\r\n<ng-template let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-val=\"item.value\" let-path=\"path\"\r\n let-templates=\"templates\" let-isObject=\"valueIsObject\" let-isArray=\"valueIsArray\" #defaultValueTemplate>\r\n <ng-template #value>\r\n <span [innerHTML]=\"val\"></span>\r\n </ng-template>\r\n <unordered-list [data]=\"val\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level + 1\"\r\n [templates]=\"templates\"\r\n *ngIf=\"(isObject || isArray); else value\"></unordered-list>\r\n</ng-template>\r\n<ng-template let-item=\"item\" let-data=\"data\" let-keyPrefix=\"keyPrefix\" let-listStyle=\"listStyle\" let-path=\"path\" let-level=\"level\" let-templates=\"templates\" #defaultItemTemplate>\r\n <ng-template #itemKey>\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"key\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </ng-template>\r\n <ng-template #itemValue>\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"value\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf=\"!isArray\">\r\n <th *ngIf=\"listStyle == 'table'; else itemKey\">\r\n <ng-container [ngTemplateOutlet]=\"itemKey\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <td *ngIf=\"listStyle == 'table'; else itemValue\">\r\n <ng-container [ngTemplateOutlet]=\"itemValue\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #value>\r\n <span [innerHTML]=\"data\"></span>\r\n</ng-template>\r\n<ng-container *ngIf=\"(isObject || isArray); else value\" [ngSwitch]=\"listStyle\">\r\n <ul [ngClass]=\"'level-' + level\" *ngSwitchCase=\"'list'\">\r\n <li *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path ? path + '.' + item.key : item.key\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </li>\r\n </ul>\r\n <table [ngClass]=\"'level-' + level\" *ngSwitchDefault>\r\n <tr *ngFor=\"let item of data | entries\" [ngClass]=\"item.classList\">\r\n <ng-container [unorderedListItem]=\"item\"\r\n type=\"item\"\r\n [data]=\"data\"\r\n [keyPrefix]=\"keyPrefix\"\r\n [listStyle]=\"listStyle\"\r\n [path]=\"path ? path + '.' + item.key : item.key\"\r\n [level]=\"level\"\r\n [templates]=\"templates\"\r\n [defaultTemplates]=\"defaultTemplates\"></ng-container>\r\n </tr>\r\n </table>\r\n</ng-container>\r\n" }]
|
|
4683
4780
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
|
|
4684
4781
|
type: Input
|
|
4685
4782
|
}], keyPrefix: [{
|
|
@@ -4980,12 +5077,15 @@ const pipes = [
|
|
|
4980
5077
|
MapPipe,
|
|
4981
5078
|
MaxPipe,
|
|
4982
5079
|
MinPipe,
|
|
5080
|
+
PopPipe,
|
|
4983
5081
|
ReducePipe,
|
|
4984
5082
|
RemapPipe,
|
|
4985
5083
|
ReplacePipe,
|
|
4986
5084
|
ReversePipe,
|
|
4987
5085
|
RoundPipe,
|
|
4988
5086
|
SafeHtmlPipe,
|
|
5087
|
+
ShiftPipe,
|
|
5088
|
+
SplitPipe,
|
|
4989
5089
|
TranslatePipe,
|
|
4990
5090
|
ValuesPipe
|
|
4991
5091
|
];
|
|
@@ -5154,8 +5254,8 @@ class NgxUtilsModule {
|
|
|
5154
5254
|
}
|
|
5155
5255
|
}
|
|
5156
5256
|
NgxUtilsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5157
|
-
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,
|
|
5158
|
-
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] });
|
|
5257
|
+
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, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent], imports: [CommonModule,
|
|
5258
|
+
FormsModule], exports: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent, FormsModule] });
|
|
5159
5259
|
NgxUtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, providers: pipes, imports: [[
|
|
5160
5260
|
CommonModule,
|
|
5161
5261
|
FormsModule
|
|
@@ -5186,5 +5286,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
5186
5286
|
* Generated bundle index. Do not edit.
|
|
5187
5287
|
*/
|
|
5188
5288
|
|
|
5189
|
-
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseHttpClient, BaseHttpService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, ConsoleToasterService, DateUtils, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GLOBAL_TEMPLATES, GenericValue, GetOffsetPipe, GetTypePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PromiseService, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, UnorederedListTemplate, ValuedPromise, ValuesPipe, Vector };
|
|
5289
|
+
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseHttpClient, BaseHttpService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, ConsoleToasterService, DateUtils, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GLOBAL_TEMPLATES, GenericValue, GetOffsetPipe, GetTypePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, UnorederedListTemplate, ValuedPromise, ValuesPipe, Vector };
|
|
5190
5290
|
//# sourceMappingURL=stemy-ngx-utils.mjs.map
|