@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';
|
|
@@ -16,7 +16,7 @@ import { HttpClient, HttpHeaders, HttpParams, HttpUrlEncodingCodec, HttpEventTyp
|
|
|
16
16
|
import * as JSON5 from 'json5';
|
|
17
17
|
import * as i1$2 from '@angular/platform-browser';
|
|
18
18
|
import { ɵDomEventsPlugin, EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
19
|
-
import
|
|
19
|
+
import * as detector from 'resize-detector';
|
|
20
20
|
import * as i4 from '@angular/forms';
|
|
21
21
|
import { FormsModule } from '@angular/forms';
|
|
22
22
|
|
|
@@ -53,7 +53,10 @@ class ObjectUtils {
|
|
|
53
53
|
Object.getOwnPropertyNames(obj).forEach(p => props.add(p));
|
|
54
54
|
return Array.from(props);
|
|
55
55
|
}
|
|
56
|
-
static equals(a, b) {
|
|
56
|
+
static equals(a, b, visited = null) {
|
|
57
|
+
visited = visited || new Set();
|
|
58
|
+
if (visited.has(a) && visited.has(b))
|
|
59
|
+
return true;
|
|
57
60
|
if (a === b)
|
|
58
61
|
return true;
|
|
59
62
|
if (a === null || b === null)
|
|
@@ -63,12 +66,14 @@ class ObjectUtils {
|
|
|
63
66
|
const at = typeof a, bt = typeof b;
|
|
64
67
|
let length, key, keySet;
|
|
65
68
|
if (at == bt && at == "object") {
|
|
69
|
+
visited.add(a);
|
|
70
|
+
visited.add(b);
|
|
66
71
|
if (Array.isArray(a)) {
|
|
67
72
|
if (!Array.isArray(b))
|
|
68
73
|
return false;
|
|
69
74
|
if ((length = a.length) == b.length) {
|
|
70
75
|
for (key = 0; key < length; key++) {
|
|
71
|
-
if (!ObjectUtils.equals(a[key], b[key]))
|
|
76
|
+
if (!ObjectUtils.equals(a[key], b[key], visited))
|
|
72
77
|
return false;
|
|
73
78
|
}
|
|
74
79
|
return true;
|
|
@@ -81,7 +86,7 @@ class ObjectUtils {
|
|
|
81
86
|
keySet = Object.create(null);
|
|
82
87
|
for (key in a) {
|
|
83
88
|
if (a.hasOwnProperty(key)) {
|
|
84
|
-
if (!ObjectUtils.equals(a[key], b[key])) {
|
|
89
|
+
if (!ObjectUtils.equals(a[key], b[key], visited)) {
|
|
85
90
|
return false;
|
|
86
91
|
}
|
|
87
92
|
keySet[key] = true;
|
|
@@ -175,13 +180,13 @@ class ObjectUtils {
|
|
|
175
180
|
return isNaN(key) || isArray ? target : Object.values(target);
|
|
176
181
|
}
|
|
177
182
|
static filter(obj, predicate) {
|
|
178
|
-
return ObjectUtils.copyRecursive(null, obj, predicate);
|
|
183
|
+
return ObjectUtils.copyRecursive(null, obj, predicate, new Map());
|
|
179
184
|
}
|
|
180
185
|
static copy(obj) {
|
|
181
|
-
return ObjectUtils.copyRecursive(null, obj);
|
|
186
|
+
return ObjectUtils.copyRecursive(null, obj, null, new Map());
|
|
182
187
|
}
|
|
183
188
|
static assign(target, source, predicate) {
|
|
184
|
-
return ObjectUtils.copyRecursive(target, source, predicate);
|
|
189
|
+
return ObjectUtils.copyRecursive(target, source, predicate, new Map());
|
|
185
190
|
}
|
|
186
191
|
static getType(obj) {
|
|
187
192
|
const regex = new RegExp("\\s([a-zA-Z]+)");
|
|
@@ -256,28 +261,34 @@ class ObjectUtils {
|
|
|
256
261
|
const str = ObjectUtils.isDefined(obj) ? obj.toString() : "";
|
|
257
262
|
return str.length >= width ? str : new Array(width - str.length + 1).join(chr) + str;
|
|
258
263
|
}
|
|
259
|
-
static copyRecursive(target, source, predicate) {
|
|
264
|
+
static copyRecursive(target, source, predicate, copies) {
|
|
260
265
|
predicate = predicate || defaultPredicate;
|
|
261
266
|
if (ObjectUtils.isPrimitive(source) || ObjectUtils.isDate(source) || ObjectUtils.isBlob(source) || ObjectUtils.isFunction(source))
|
|
262
267
|
return source;
|
|
263
|
-
if (
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
268
|
+
if (!copies.has(source)) {
|
|
269
|
+
if (ObjectUtils.isArray(source)) {
|
|
270
|
+
target = ObjectUtils.isArray(target) ? Array.from(target) : [];
|
|
271
|
+
copies.set(source, target);
|
|
272
|
+
source.forEach((item, index) => {
|
|
273
|
+
if (!predicate(item, index, target, source))
|
|
274
|
+
return;
|
|
275
|
+
if (target.length > index)
|
|
276
|
+
target[index] = ObjectUtils.copyRecursive(target[index], item, predicate, copies);
|
|
277
|
+
else
|
|
278
|
+
target.push(ObjectUtils.copyRecursive(null, item, predicate, copies));
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
target = Object.assign({}, target);
|
|
283
|
+
copies.set(source, target);
|
|
284
|
+
Object.keys(source).forEach((key) => {
|
|
285
|
+
if (!predicate(source[key], key, target, source))
|
|
286
|
+
return;
|
|
287
|
+
target[key] = ObjectUtils.copyRecursive(target[key], source[key], predicate, copies);
|
|
288
|
+
});
|
|
289
|
+
}
|
|
274
290
|
}
|
|
275
|
-
return
|
|
276
|
-
if (!predicate(source[key], key, result, source))
|
|
277
|
-
return result;
|
|
278
|
-
result[key] = ObjectUtils.copyRecursive(result[key], source[key], predicate);
|
|
279
|
-
return result;
|
|
280
|
-
}, Object.assign({}, target));
|
|
291
|
+
return copies.get(source);
|
|
281
292
|
}
|
|
282
293
|
}
|
|
283
294
|
|
|
@@ -468,13 +479,13 @@ AjaxRequestHandler.isOverridden = false;
|
|
|
468
479
|
|
|
469
480
|
class DateUtils {
|
|
470
481
|
static isHoliday(date) {
|
|
471
|
-
return
|
|
482
|
+
return moment(date).isoWeekday() > 5;
|
|
472
483
|
}
|
|
473
484
|
static isBusinessDay(date) {
|
|
474
|
-
return
|
|
485
|
+
return moment(date).isoWeekday() < 6;
|
|
475
486
|
}
|
|
476
487
|
static add(date, amount, unit) {
|
|
477
|
-
return
|
|
488
|
+
return moment(date).add(amount, unit).toDate();
|
|
478
489
|
}
|
|
479
490
|
static businessAdd(date, amount, unit) {
|
|
480
491
|
const signal = amount < 0 ? -1 : 1;
|
|
@@ -1002,6 +1013,11 @@ class FileSystemEntry {
|
|
|
1002
1013
|
}
|
|
1003
1014
|
open() {
|
|
1004
1015
|
this.result = this.result || this.openCb(this.data, this);
|
|
1016
|
+
this.result.then(res => {
|
|
1017
|
+
if (Array.isArray(res))
|
|
1018
|
+
return;
|
|
1019
|
+
this.result = null;
|
|
1020
|
+
});
|
|
1005
1021
|
return this.result;
|
|
1006
1022
|
}
|
|
1007
1023
|
}
|
|
@@ -1214,7 +1230,7 @@ LoaderUtils.stylePromises = {};
|
|
|
1214
1230
|
|
|
1215
1231
|
class MathUtils {
|
|
1216
1232
|
static equal(a, b, epsilon = null) {
|
|
1217
|
-
epsilon = ObjectUtils.isNumber(epsilon) ? epsilon :
|
|
1233
|
+
epsilon = ObjectUtils.isNumber(epsilon) ? epsilon : MathUtils.EPSILON;
|
|
1218
1234
|
return Math.abs(a - b) < epsilon;
|
|
1219
1235
|
}
|
|
1220
1236
|
static clamp(value, min, max) {
|
|
@@ -1224,7 +1240,36 @@ class MathUtils {
|
|
|
1224
1240
|
precision = Math.pow(10, precision);
|
|
1225
1241
|
return Math.round(value * precision / divider) / precision;
|
|
1226
1242
|
}
|
|
1227
|
-
|
|
1243
|
+
static approxIndex(x, values, epsilon = null) {
|
|
1244
|
+
if (!Array.isArray(values) || values.length == 0) {
|
|
1245
|
+
return -1;
|
|
1246
|
+
}
|
|
1247
|
+
let s = 0;
|
|
1248
|
+
let e = values.length - 1;
|
|
1249
|
+
while (s <= e) {
|
|
1250
|
+
const i = Math.floor((s + e) / 2);
|
|
1251
|
+
const v = values[i];
|
|
1252
|
+
if (MathUtils.equal(v, x, epsilon)) {
|
|
1253
|
+
return i;
|
|
1254
|
+
}
|
|
1255
|
+
if (v < x) {
|
|
1256
|
+
s = i + 1;
|
|
1257
|
+
}
|
|
1258
|
+
else {
|
|
1259
|
+
e = i - 1;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
const m = Math.max(e, 0);
|
|
1263
|
+
const a = values[s];
|
|
1264
|
+
const b = values[m];
|
|
1265
|
+
return Math.abs(a - x) < Math.abs(b - x) ? s : m;
|
|
1266
|
+
}
|
|
1267
|
+
static approximate(x, values, epsilon = null) {
|
|
1268
|
+
const index = MathUtils.approxIndex(x, values, epsilon);
|
|
1269
|
+
return values[index] ?? null;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
MathUtils.EPSILON = 1e-9;
|
|
1228
1273
|
|
|
1229
1274
|
/**
|
|
1230
1275
|
* Use this service to determine which is the current environment
|
|
@@ -1886,6 +1931,13 @@ class ArrayUtils {
|
|
|
1886
1931
|
}
|
|
1887
1932
|
return result;
|
|
1888
1933
|
}
|
|
1934
|
+
static unique(arr) {
|
|
1935
|
+
if (!ObjectUtils.isArray(arr))
|
|
1936
|
+
return [];
|
|
1937
|
+
return arr.filter((value, index, self) => {
|
|
1938
|
+
return self.indexOf(value) === index;
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1889
1941
|
}
|
|
1890
1942
|
|
|
1891
1943
|
class SetUtils {
|
|
@@ -2505,9 +2557,10 @@ class StaticAuthService {
|
|
|
2505
2557
|
}
|
|
2506
2558
|
|
|
2507
2559
|
class ConfigService {
|
|
2508
|
-
constructor(http, universal, rootElement, baseUrl, baseConfig = null, scriptParams = null) {
|
|
2560
|
+
constructor(http, universal, injector, rootElement, baseUrl, baseConfig = null, scriptParams = null) {
|
|
2509
2561
|
this.http = http;
|
|
2510
2562
|
this.universal = universal;
|
|
2563
|
+
this.injector = injector;
|
|
2511
2564
|
this.rootElement = rootElement;
|
|
2512
2565
|
this.baseUrl = baseUrl;
|
|
2513
2566
|
for (const key in []) {
|
|
@@ -2588,11 +2641,11 @@ class ConfigService {
|
|
|
2588
2641
|
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
|
2589
2642
|
}
|
|
2590
2643
|
}
|
|
2591
|
-
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 });
|
|
2644
|
+
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 });
|
|
2592
2645
|
ConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService });
|
|
2593
2646
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ConfigService, decorators: [{
|
|
2594
2647
|
type: Injectable
|
|
2595
|
-
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: UniversalService }, { type: undefined, decorators: [{
|
|
2648
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: UniversalService }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
2596
2649
|
type: Inject,
|
|
2597
2650
|
args: [ROOT_ELEMENT]
|
|
2598
2651
|
}] }, { type: undefined, decorators: [{
|
|
@@ -2701,7 +2754,8 @@ class FormatterService {
|
|
|
2701
2754
|
const num = ObjectUtils.isNumber(value) ? value : parseFloat(value) || 0;
|
|
2702
2755
|
const str = (num / divider).toLocaleString(this.language.currentLanguage, {
|
|
2703
2756
|
minimumFractionDigits: precision,
|
|
2704
|
-
maximumFractionDigits: precision
|
|
2757
|
+
maximumFractionDigits: precision,
|
|
2758
|
+
useGrouping: false
|
|
2705
2759
|
});
|
|
2706
2760
|
return ObjectUtils.evaluate(format || this.defaultNumberFormat, { num: str });
|
|
2707
2761
|
}
|
|
@@ -3256,7 +3310,7 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3256
3310
|
element.addEventListener(eventName, cb);
|
|
3257
3311
|
}
|
|
3258
3312
|
else {
|
|
3259
|
-
addListener(element, cb);
|
|
3313
|
+
detector.addListener(element, cb);
|
|
3260
3314
|
}
|
|
3261
3315
|
return () => {
|
|
3262
3316
|
try {
|
|
@@ -3264,7 +3318,7 @@ class ResizeEventPlugin extends ɵDomEventsPlugin {
|
|
|
3264
3318
|
element.removeEventListener(eventName, cb);
|
|
3265
3319
|
}
|
|
3266
3320
|
else {
|
|
3267
|
-
removeListener(element, cb);
|
|
3321
|
+
detector.removeListener(element, cb);
|
|
3268
3322
|
}
|
|
3269
3323
|
}
|
|
3270
3324
|
catch (e) {
|
|
@@ -3683,6 +3737,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
3683
3737
|
}]
|
|
3684
3738
|
}] });
|
|
3685
3739
|
|
|
3740
|
+
class PopPipe {
|
|
3741
|
+
transform(value) {
|
|
3742
|
+
return !Array.isArray(value) ? null : Array.from(value).pop();
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
PopPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: PopPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3746
|
+
PopPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: PopPipe, name: "pop" });
|
|
3747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: PopPipe, decorators: [{
|
|
3748
|
+
type: Pipe,
|
|
3749
|
+
args: [{
|
|
3750
|
+
name: "pop"
|
|
3751
|
+
}]
|
|
3752
|
+
}] });
|
|
3753
|
+
|
|
3686
3754
|
function defaultReducer(result) {
|
|
3687
3755
|
return result;
|
|
3688
3756
|
}
|
|
@@ -3821,6 +3889,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
3821
3889
|
}]
|
|
3822
3890
|
}], ctorParameters: function () { return [{ type: i1$2.DomSanitizer }]; } });
|
|
3823
3891
|
|
|
3892
|
+
class ShiftPipe {
|
|
3893
|
+
transform(value) {
|
|
3894
|
+
return !Array.isArray(value) ? null : Array.from(value).shift();
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
ShiftPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ShiftPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3898
|
+
ShiftPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ShiftPipe, name: "shift" });
|
|
3899
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: ShiftPipe, decorators: [{
|
|
3900
|
+
type: Pipe,
|
|
3901
|
+
args: [{
|
|
3902
|
+
name: "shift"
|
|
3903
|
+
}]
|
|
3904
|
+
}] });
|
|
3905
|
+
|
|
3906
|
+
class SplitPipe {
|
|
3907
|
+
transform(value, separator = ".") {
|
|
3908
|
+
return `${value}`.split(separator);
|
|
3909
|
+
}
|
|
3910
|
+
}
|
|
3911
|
+
SplitPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SplitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3912
|
+
SplitPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SplitPipe, name: "split" });
|
|
3913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: SplitPipe, decorators: [{
|
|
3914
|
+
type: Pipe,
|
|
3915
|
+
args: [{
|
|
3916
|
+
name: "split"
|
|
3917
|
+
}]
|
|
3918
|
+
}] });
|
|
3919
|
+
|
|
3824
3920
|
class TranslatePipe {
|
|
3825
3921
|
constructor(cdr, language) {
|
|
3826
3922
|
this.cdr = cdr;
|
|
@@ -4609,10 +4705,10 @@ class UnorderedListComponent {
|
|
|
4609
4705
|
}
|
|
4610
4706
|
}
|
|
4611
4707
|
UnorderedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: UnorderedListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4612
|
-
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
|
|
4708
|
+
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 } });
|
|
4613
4709
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: UnorderedListComponent, decorators: [{
|
|
4614
4710
|
type: Component,
|
|
4615
|
-
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
|
|
4711
|
+
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" }]
|
|
4616
4712
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
|
|
4617
4713
|
type: Input
|
|
4618
4714
|
}], keyPrefix: [{
|
|
@@ -4911,12 +5007,15 @@ const pipes = [
|
|
|
4911
5007
|
MapPipe,
|
|
4912
5008
|
MaxPipe,
|
|
4913
5009
|
MinPipe,
|
|
5010
|
+
PopPipe,
|
|
4914
5011
|
ReducePipe,
|
|
4915
5012
|
RemapPipe,
|
|
4916
5013
|
ReplacePipe,
|
|
4917
5014
|
ReversePipe,
|
|
4918
5015
|
RoundPipe,
|
|
4919
5016
|
SafeHtmlPipe,
|
|
5017
|
+
ShiftPipe,
|
|
5018
|
+
SplitPipe,
|
|
4920
5019
|
TranslatePipe,
|
|
4921
5020
|
ValuesPipe
|
|
4922
5021
|
];
|
|
@@ -5085,8 +5184,8 @@ class NgxUtilsModule {
|
|
|
5085
5184
|
}
|
|
5086
5185
|
}
|
|
5087
5186
|
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, 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,
|
|
5089
|
-
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] });
|
|
5187
|
+
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,
|
|
5188
|
+
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] });
|
|
5090
5189
|
NgxUtilsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxUtilsModule, providers: pipes, imports: [[
|
|
5091
5190
|
CommonModule,
|
|
5092
5191
|
FormsModule
|
|
@@ -5117,5 +5216,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
5117
5216
|
* Generated bundle index. Do not edit.
|
|
5118
5217
|
*/
|
|
5119
5218
|
|
|
5120
|
-
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 };
|
|
5219
|
+
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 };
|
|
5121
5220
|
//# sourceMappingURL=stemy-ngx-utils.mjs.map
|