monkey-front-core 0.0.228 → 0.0.232
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/esm2020/lib/components/alerts/alerts.component.mjs +35 -0
- package/esm2020/lib/components/alerts/alerts.module.mjs +21 -0
- package/esm2020/lib/components/alerts/index.mjs +3 -0
- package/esm2020/lib/components/index.mjs +2 -1
- package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +1 -1
- package/esm2020/lib/core/pipes/index.mjs +2 -1
- package/esm2020/lib/core/pipes/monkeyecx-display-initials.mjs +21 -0
- package/esm2020/lib/core/pipes/monkeyecx-format-type-document.mjs +3 -3
- package/esm2020/lib/core/pipes/monkeyecx-pipes.module.mjs +32 -27
- package/esm2020/lib/core/services/config/monkeyecx-alerts-config.service.mjs +40 -0
- package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +8 -5
- package/esm2020/lib/monkey-front-core.module.mjs +8 -6
- package/fesm2015/monkey-front-core.mjs +386 -279
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +385 -279
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/components/alerts/alerts.component.d.ts +16 -0
- package/lib/components/alerts/alerts.module.d.ts +10 -0
- package/lib/components/alerts/index.d.ts +2 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/core/interfaces/monkeyecx-config.d.ts +7 -0
- package/lib/core/pipes/index.d.ts +1 -0
- package/lib/core/pipes/monkeyecx-display-initials.d.ts +7 -0
- package/lib/core/pipes/monkeyecx-format-type-document.d.ts +1 -1
- package/lib/core/pipes/monkeyecx-pipes.module.d.ts +18 -17
- package/lib/core/services/config/monkeyecx-alerts-config.service.d.ts +11 -0
- package/lib/core/services/config/monkeyecx-config.service.d.ts +3 -1
- package/lib/monkey-front-core.module.d.ts +2 -1
- package/monkey-front-core-0.0.232.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.228.tgz +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Component, Input, NgModule, Pipe, ViewEncapsulation, Injectable, EventEmitter, Directive, Output, HostBinding, HostListener, forwardRef, Self, InjectionToken, Inject, Optional, SkipSelf, NgZone, ErrorHandler } from '@angular/core';
|
|
3
3
|
import * as i1 from 'monkey-style-guide';
|
|
4
|
-
import { MonkeyButtonModule, MonkeyIconModule, MonkeyInputModule,
|
|
4
|
+
import { MonkeyButtonModule, MonkeyModalModule, MonkeyIconModule, MonkeyInputModule, MonkeyUtils, MonkeyStyleGuideModule, MonkeyStyleGuideModalService, MonkeyStyleGuideSettingsService, MonkeyStyleGuideSnackbarService } from 'monkey-style-guide';
|
|
5
5
|
import * as i2 from '@angular/common';
|
|
6
|
-
import { formatNumber, CurrencyPipe
|
|
6
|
+
import { CommonModule, formatNumber, CurrencyPipe } from '@angular/common';
|
|
7
7
|
import * as i1$1 from '@ngx-translate/core';
|
|
8
|
-
import {
|
|
8
|
+
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
9
9
|
import * as moment_ from 'moment';
|
|
10
10
|
import * as i1$2 from 'ngx-cookie-service';
|
|
11
11
|
import * as i1$3 from '@angular/router';
|
|
@@ -24,6 +24,51 @@ import * as i1$6 from '@angular/service-worker';
|
|
|
24
24
|
import { ServiceWorkerModule } from '@angular/service-worker';
|
|
25
25
|
import { initialize } from 'launchdarkly-js-client-sdk';
|
|
26
26
|
|
|
27
|
+
class AlertsComponent {
|
|
28
|
+
constructor(modalService) {
|
|
29
|
+
this.modalService = modalService;
|
|
30
|
+
this.config = null;
|
|
31
|
+
this._img = '';
|
|
32
|
+
this._title = '';
|
|
33
|
+
this._message = '';
|
|
34
|
+
// not to do
|
|
35
|
+
}
|
|
36
|
+
ngOnInit() {
|
|
37
|
+
var _a, _b, _c;
|
|
38
|
+
const { config } = this;
|
|
39
|
+
this._img = (_a = config === null || config === void 0 ? void 0 : config.data) === null || _a === void 0 ? void 0 : _a.img;
|
|
40
|
+
this._title = (_b = config === null || config === void 0 ? void 0 : config.data) === null || _b === void 0 ? void 0 : _b.title;
|
|
41
|
+
this._message = (_c = config === null || config === void 0 ? void 0 : config.data) === null || _c === void 0 ? void 0 : _c.message;
|
|
42
|
+
}
|
|
43
|
+
onClose() {
|
|
44
|
+
this.modalService.close(this.modalRef);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
AlertsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsComponent, deps: [{ token: i1.MonkeyStyleGuideModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
+
AlertsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AlertsComponent, selector: "monkeyecx-alerts", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\n <div class=\"alert-header\">\n <img [src]=\"_img\">\n </div>\n <div class=\"alert-body\">\n <span class=\"title\">\n {{ _title | translate }}\n </span>\n <span class=\"message\">\n {{ _message | translate }}\n </span>\n </div>\n <div class=\"alert-footer\">\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\n {{ 'BUTTONS.CLOSE' | translate }}\n </monkey-button>\n </div>\n</monkey-modal>", styles: [":host ::ng-deep monkey-modal mecx-monkey-modal{padding:0}:host ::ng-deep monkey-modal mecx-monkey-modal .body{margin-bottom:0}:host ::ng-deep monkey-modal .mecx-monkey-modal__size-md{max-width:448px}:host .alert-header{min-height:312px}@media screen and (max-width: 959px){:host .alert-header{min-height:212px}}:host .alert-header img{border-radius:12px 12px 0 0;-o-object-fit:cover;object-fit:cover;height:200px;width:100%}:host .alert-body{display:flex;flex-direction:column;gap:16px;max-width:368px;padding:24px;margin:auto}:host .alert-body .title{font-style:normal;font-weight:700;font-size:32px;line-height:40px;text-align:center;color:#1f2024}:host .alert-body .message{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;letter-spacing:.03em;color:#545a63}:host .alert-footer{display:flex;justify-content:flex-end;padding:24px;position:-webkit-sticky;position:sticky;bottom:0}\n"], components: [{ type: i1.MonkeyModalComponent, selector: "monkey-modal", inputs: ["config", "modalRef", "onHandleConfirm"] }, { type: i1.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe } });
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsComponent, decorators: [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{ selector: 'monkeyecx-alerts', template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\n <div class=\"alert-header\">\n <img [src]=\"_img\">\n </div>\n <div class=\"alert-body\">\n <span class=\"title\">\n {{ _title | translate }}\n </span>\n <span class=\"message\">\n {{ _message | translate }}\n </span>\n </div>\n <div class=\"alert-footer\">\n <monkey-button type=\"tertiary\" color=\"theme\" (click)=\"onClose()\">\n {{ 'BUTTONS.CLOSE' | translate }}\n </monkey-button>\n </div>\n</monkey-modal>", styles: [":host ::ng-deep monkey-modal mecx-monkey-modal{padding:0}:host ::ng-deep monkey-modal mecx-monkey-modal .body{margin-bottom:0}:host ::ng-deep monkey-modal .mecx-monkey-modal__size-md{max-width:448px}:host .alert-header{min-height:312px}@media screen and (max-width: 959px){:host .alert-header{min-height:212px}}:host .alert-header img{border-radius:12px 12px 0 0;-o-object-fit:cover;object-fit:cover;height:200px;width:100%}:host .alert-body{display:flex;flex-direction:column;gap:16px;max-width:368px;padding:24px;margin:auto}:host .alert-body .title{font-style:normal;font-weight:700;font-size:32px;line-height:40px;text-align:center;color:#1f2024}:host .alert-body .message{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;letter-spacing:.03em;color:#545a63}:host .alert-footer{display:flex;justify-content:flex-end;padding:24px;position:-webkit-sticky;position:sticky;bottom:0}\n"] }]
|
|
52
|
+
}], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalService }]; }, propDecorators: { config: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}], modalRef: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}] } });
|
|
57
|
+
|
|
58
|
+
class AlertsModule {
|
|
59
|
+
}
|
|
60
|
+
AlertsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
61
|
+
AlertsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsModule, declarations: [AlertsComponent], imports: [CommonModule, MonkeyButtonModule, MonkeyModalModule, i1$1.TranslateModule], exports: [AlertsComponent] });
|
|
62
|
+
AlertsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsModule, imports: [[CommonModule, MonkeyButtonModule, MonkeyModalModule, TranslateModule.forChild()]] });
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AlertsModule, decorators: [{
|
|
64
|
+
type: NgModule,
|
|
65
|
+
args: [{
|
|
66
|
+
declarations: [AlertsComponent],
|
|
67
|
+
imports: [CommonModule, MonkeyButtonModule, MonkeyModalModule, TranslateModule.forChild()],
|
|
68
|
+
exports: [AlertsComponent]
|
|
69
|
+
}]
|
|
70
|
+
}] });
|
|
71
|
+
|
|
27
72
|
/* eslint-disable comma-dangle */
|
|
28
73
|
/* eslint-disable max-len */
|
|
29
74
|
/* eslint-disable no-useless-escape */
|
|
@@ -246,14 +291,14 @@ class MonkeyEcxUtils {
|
|
|
246
291
|
}
|
|
247
292
|
}
|
|
248
293
|
|
|
249
|
-
const moment$
|
|
294
|
+
const moment$5 = moment_;
|
|
250
295
|
class MonkeyEcxFormatDateTimelapsePipe {
|
|
251
296
|
transform(date, showTime = false, useUtc = true, format = '- HH:mm') {
|
|
252
297
|
if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
|
|
253
298
|
return '';
|
|
254
|
-
let stillUtc = moment$
|
|
299
|
+
let stillUtc = moment$5.default.utc(date).toDate();
|
|
255
300
|
if (!useUtc)
|
|
256
|
-
stillUtc = moment$
|
|
301
|
+
stillUtc = moment$5.default(date).toDate();
|
|
257
302
|
if (date.toString().indexOf(':') <= -1) {
|
|
258
303
|
if (typeof date === 'string') {
|
|
259
304
|
stillUtc = date;
|
|
@@ -262,7 +307,7 @@ class MonkeyEcxFormatDateTimelapsePipe {
|
|
|
262
307
|
}
|
|
263
308
|
const formatFrom = `YYYY/MM/DD${showTime ? ` ${format}` : ''}`;
|
|
264
309
|
const formatTo = `DD/MM/YYYY${showTime ? ` ${format}` : ''}`;
|
|
265
|
-
return `${moment$
|
|
310
|
+
return `${moment$5.default(stillUtc, formatFrom).format(formatTo)}`;
|
|
266
311
|
}
|
|
267
312
|
}
|
|
268
313
|
MonkeyEcxFormatDateTimelapsePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateTimelapsePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
@@ -314,6 +359,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
314
359
|
}]
|
|
315
360
|
}] });
|
|
316
361
|
|
|
362
|
+
class MonkeyEcxDisplayInitialsPipe {
|
|
363
|
+
transform(name) {
|
|
364
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(name))
|
|
365
|
+
return '';
|
|
366
|
+
const first = MonkeyEcxUtils.cutFirstLastName(name, 'first');
|
|
367
|
+
const second = MonkeyEcxUtils.cutFirstLastName(name, 'last');
|
|
368
|
+
return `${first === null || first === void 0 ? void 0 : first.charAt(0)} ${second === null || second === void 0 ? void 0 : second.charAt(0)}`;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
MonkeyEcxDisplayInitialsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxDisplayInitialsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
372
|
+
MonkeyEcxDisplayInitialsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxDisplayInitialsPipe, name: "monkeyecxDisplayInitials" });
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxDisplayInitialsPipe, decorators: [{
|
|
374
|
+
type: Pipe,
|
|
375
|
+
args: [{
|
|
376
|
+
name: 'monkeyecxDisplayInitials'
|
|
377
|
+
}]
|
|
378
|
+
}] });
|
|
379
|
+
|
|
317
380
|
class MonkeyEcxFormatAddressPipe {
|
|
318
381
|
transform({ zipCode, address, neighborhood, city, state, }) {
|
|
319
382
|
return [address, neighborhood, zipCode, city, state]
|
|
@@ -332,6 +395,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
332
395
|
}]
|
|
333
396
|
}] });
|
|
334
397
|
|
|
398
|
+
class MonkeyEcxFormatBeaufityJSONPipe {
|
|
399
|
+
constructor() {
|
|
400
|
+
// not to do
|
|
401
|
+
}
|
|
402
|
+
transform(value) {
|
|
403
|
+
const jsonLine = /^( *)("[\w]+": )?("[^"]*"|[\w.+-]*)?([,[{])?$/gm;
|
|
404
|
+
const replacer = (match, pIndent, pKey, pVal, pEnd) => {
|
|
405
|
+
const key = '<span class="json-key" style="color: brown">';
|
|
406
|
+
const val = '<span class="json-value" style="color: navy">';
|
|
407
|
+
const str = '<span class="json-string" style="color: olive">';
|
|
408
|
+
let r = pIndent || '';
|
|
409
|
+
if (pKey) {
|
|
410
|
+
r = `${r + key + pKey.replace(/[": ]/g, '')}</span>: `;
|
|
411
|
+
}
|
|
412
|
+
if (pVal) {
|
|
413
|
+
r = `${r + (pVal[0] === '"' ? str : val) + pVal}</span>`;
|
|
414
|
+
}
|
|
415
|
+
return r + (pEnd || '');
|
|
416
|
+
};
|
|
417
|
+
return JSON.stringify(value, null, 3)
|
|
418
|
+
.replace(/&/g, '&')
|
|
419
|
+
.replace(/\\"/g, '"')
|
|
420
|
+
.replace(/</g, '<')
|
|
421
|
+
.replace(/>/g, '>')
|
|
422
|
+
.replace(jsonLine, replacer);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
MonkeyEcxFormatBeaufityJSONPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatBeaufityJSONPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
426
|
+
MonkeyEcxFormatBeaufityJSONPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatBeaufityJSONPipe, name: "monkeyecxFormatBeautifyJSON" });
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatBeaufityJSONPipe, decorators: [{
|
|
428
|
+
type: Pipe,
|
|
429
|
+
args: [{
|
|
430
|
+
name: 'monkeyecxFormatBeautifyJSON'
|
|
431
|
+
}]
|
|
432
|
+
}], ctorParameters: function () { return []; } });
|
|
433
|
+
|
|
335
434
|
class MonkeyEcxCookieStorageService {
|
|
336
435
|
constructor(cookieService) {
|
|
337
436
|
this.cookieService = cookieService;
|
|
@@ -384,179 +483,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
384
483
|
}]
|
|
385
484
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i2.CurrencyPipe }]; } });
|
|
386
485
|
|
|
387
|
-
|
|
388
|
-
transform(document, withType) {
|
|
389
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
|
|
390
|
-
return '';
|
|
391
|
-
return MonkeyEcxUtils.formatDocumentWithMask(document, withType);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
MonkeyEcxFormatDocumentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
395
|
-
MonkeyEcxFormatDocumentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentPipe, name: "monkeyecxFormatDocument" });
|
|
396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentPipe, decorators: [{
|
|
397
|
-
type: Pipe,
|
|
398
|
-
args: [{
|
|
399
|
-
name: 'monkeyecxFormatDocument'
|
|
400
|
-
}]
|
|
401
|
-
}] });
|
|
402
|
-
|
|
403
|
-
class MonkeyEcxFormatNumberPipe {
|
|
404
|
-
transform(number) {
|
|
405
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(number))
|
|
406
|
-
return '';
|
|
407
|
-
return formatNumber(Number(number), 'ptbr');
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
MonkeyEcxFormatNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
411
|
-
MonkeyEcxFormatNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatNumberPipe, name: "monkeyecxFormatNumber" });
|
|
412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatNumberPipe, decorators: [{
|
|
413
|
-
type: Pipe,
|
|
414
|
-
args: [{
|
|
415
|
-
name: 'monkeyecxFormatNumber'
|
|
416
|
-
}]
|
|
417
|
-
}] });
|
|
418
|
-
|
|
419
|
-
class MonkeyEcxFormatPhonePipe {
|
|
420
|
-
transform(phone) {
|
|
421
|
-
if (phone) {
|
|
422
|
-
const value = `${phone || ''}`.replace(/\D/g, '');
|
|
423
|
-
let formated = '';
|
|
424
|
-
if (value.length > 12) {
|
|
425
|
-
formated = value.replace(/(\d{2})?(\d{2})?(\d{5})?(\d{4})/, '+$1 ($2) $3-$4');
|
|
426
|
-
}
|
|
427
|
-
else if (value.length > 11) {
|
|
428
|
-
formated = value.replace(/(\d{2})?(\d{2})?(\d{4})?(\d{4})/, '+$1 ($2) $3-$4');
|
|
429
|
-
}
|
|
430
|
-
else if (value.length > 10) {
|
|
431
|
-
formated = value.replace(/(\d{2})?(\d{5})?(\d{4})/, '($1) $2-$3');
|
|
432
|
-
}
|
|
433
|
-
else if (value.length > 9) {
|
|
434
|
-
formated = value.replace(/(\d{2})?(\d{4})?(\d{4})/, '($1) $2-$3');
|
|
435
|
-
}
|
|
436
|
-
else if (value.length > 5) {
|
|
437
|
-
formated = value.replace(/^(\d{2})?(\d{4})?(\d{0,4})/, '($1) $2-$3');
|
|
438
|
-
}
|
|
439
|
-
else if (value.length > 1) {
|
|
440
|
-
formated = value.replace(/^(\d{2})?(\d{0,5})/, '($1) $2');
|
|
441
|
-
}
|
|
442
|
-
else if (phone !== '') {
|
|
443
|
-
formated = value.replace(/^(\d*)/, '($1');
|
|
444
|
-
}
|
|
445
|
-
return formated;
|
|
446
|
-
}
|
|
447
|
-
return '';
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
MonkeyEcxFormatPhonePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatPhonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
451
|
-
MonkeyEcxFormatPhonePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatPhonePipe, name: "monkeyecxFormatPhone" });
|
|
452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatPhonePipe, decorators: [{
|
|
453
|
-
type: Pipe,
|
|
454
|
-
args: [{
|
|
455
|
-
name: 'monkeyecxFormatPhone'
|
|
456
|
-
}]
|
|
457
|
-
}] });
|
|
458
|
-
|
|
459
|
-
class MonkeyEcxFormatSizePipe {
|
|
460
|
-
transform(size) {
|
|
461
|
-
if (!size)
|
|
462
|
-
return '0 B';
|
|
463
|
-
const sizeNum = Number(size);
|
|
464
|
-
return MonkeyEcxUtils.formatFileSize(sizeNum);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
MonkeyEcxFormatSizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
468
|
-
MonkeyEcxFormatSizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatSizePipe, name: "monkeyecxFormatSize" });
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatSizePipe, decorators: [{
|
|
470
|
-
type: Pipe,
|
|
471
|
-
args: [{
|
|
472
|
-
name: 'monkeyecxFormatSize'
|
|
473
|
-
}]
|
|
474
|
-
}] });
|
|
475
|
-
|
|
476
|
-
class MonkeyEcxFormatDocumentTypePipe {
|
|
477
|
-
transform(document) {
|
|
478
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
|
|
479
|
-
return '';
|
|
480
|
-
return MonkeyEcxUtils.getDocumentType(document);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
MonkeyEcxFormatDocumentTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
484
|
-
MonkeyEcxFormatDocumentTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentTypePipe, name: "monkeyecxFormatDocumentType" });
|
|
485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentTypePipe, decorators: [{
|
|
486
|
-
type: Pipe,
|
|
487
|
-
args: [{
|
|
488
|
-
name: 'monkeyecxFormatDocumentType'
|
|
489
|
-
}]
|
|
490
|
-
}] });
|
|
491
|
-
|
|
492
|
-
class MonkeyEcxFormatValue {
|
|
493
|
-
transform(number) {
|
|
494
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(number))
|
|
495
|
-
return '';
|
|
496
|
-
return number;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
MonkeyEcxFormatValue.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatValue, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
500
|
-
MonkeyEcxFormatValue.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatValue, name: "monkeyecxFormatValue" });
|
|
501
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatValue, decorators: [{
|
|
502
|
-
type: Pipe,
|
|
503
|
-
args: [{
|
|
504
|
-
name: 'monkeyecxFormatValue'
|
|
505
|
-
}]
|
|
506
|
-
}] });
|
|
507
|
-
|
|
508
|
-
class MonkeyEcxFormatZipCodePipe {
|
|
509
|
-
transform(zipCode) {
|
|
510
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(zipCode))
|
|
511
|
-
return '';
|
|
512
|
-
return MonkeyEcxUtils.formatZipCode(zipCode);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
MonkeyEcxFormatZipCodePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatZipCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
516
|
-
MonkeyEcxFormatZipCodePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatZipCodePipe, name: "monkeyecxFormatZipCode" });
|
|
517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatZipCodePipe, decorators: [{
|
|
518
|
-
type: Pipe,
|
|
519
|
-
args: [{
|
|
520
|
-
name: 'monkeyecxFormatZipCode'
|
|
521
|
-
}]
|
|
522
|
-
}] });
|
|
523
|
-
|
|
524
|
-
class MonkeyEcxTextTruncatePipe {
|
|
525
|
-
transform(text, maxLength = 25) {
|
|
526
|
-
const midChar = '...';
|
|
527
|
-
if (!text)
|
|
528
|
-
return midChar;
|
|
529
|
-
if (text && text.length <= maxLength)
|
|
530
|
-
return text;
|
|
531
|
-
const left = Math.ceil(maxLength / 2);
|
|
532
|
-
const right = text.length - left + 1;
|
|
533
|
-
return `${text.substr(0, left)} ${midChar} ${text.substring(right)}`;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
MonkeyEcxTextTruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTextTruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
537
|
-
MonkeyEcxTextTruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTextTruncatePipe, name: "monkeyecxTextTruncate" });
|
|
538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTextTruncatePipe, decorators: [{
|
|
539
|
-
type: Pipe,
|
|
540
|
-
args: [{
|
|
541
|
-
name: 'monkeyecxTextTruncate'
|
|
542
|
-
}]
|
|
543
|
-
}] });
|
|
544
|
-
|
|
545
|
-
class MonkeyEcxTruncateQtdPipe {
|
|
546
|
-
transform(number, threshold) {
|
|
547
|
-
return `${number > threshold ? `${threshold}+` : number}`;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
MonkeyEcxTruncateQtdPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTruncateQtdPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
551
|
-
MonkeyEcxTruncateQtdPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTruncateQtdPipe, name: "monkeyecxTruncateQtd" });
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTruncateQtdPipe, decorators: [{
|
|
553
|
-
type: Pipe,
|
|
554
|
-
args: [{
|
|
555
|
-
name: 'monkeyecxTruncateQtd'
|
|
556
|
-
}]
|
|
557
|
-
}] });
|
|
558
|
-
|
|
559
|
-
const moment$3 = moment_;
|
|
486
|
+
const moment$4 = moment_;
|
|
560
487
|
class MonkeyEcxFormatDateGroupPipe {
|
|
561
488
|
constructor(injector) {
|
|
562
489
|
this.injector = injector;
|
|
@@ -568,12 +495,12 @@ class MonkeyEcxFormatDateGroupPipe {
|
|
|
568
495
|
var _a;
|
|
569
496
|
if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
|
|
570
497
|
return '';
|
|
571
|
-
let stillUtc = moment$
|
|
498
|
+
let stillUtc = moment$4.default.utc(date).toDate();
|
|
572
499
|
if (((_a = date.toString()) === null || _a === void 0 ? void 0 : _a.indexOf(':')) <= -1) {
|
|
573
500
|
stillUtc = date;
|
|
574
501
|
}
|
|
575
502
|
const formatFrom = 'YYYY/MM/DD';
|
|
576
|
-
const fmt = moment$
|
|
503
|
+
const fmt = moment$4.default(stillUtc, formatFrom).locale(this.lang);
|
|
577
504
|
const dayFormated = fmt.format('DD/');
|
|
578
505
|
const monthFormated = MonkeyEcxUtils.capitalize(fmt.format('MMMM'));
|
|
579
506
|
const yearFormated = fmt.format('YYYY');
|
|
@@ -598,15 +525,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
598
525
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
599
526
|
|
|
600
527
|
/* eslint-disable max-classes-per-file */
|
|
601
|
-
const moment$
|
|
528
|
+
const moment$3 = moment_;
|
|
602
529
|
class DateValidator {
|
|
603
530
|
static do(control) {
|
|
604
531
|
if (!control.parent || !control)
|
|
605
532
|
return null;
|
|
606
533
|
if (control && control.value) {
|
|
607
534
|
const dateFormat = 'MM-DD-YYYY';
|
|
608
|
-
if (!moment$
|
|
609
|
-
.default(moment$
|
|
535
|
+
if (!moment$3
|
|
536
|
+
.default(moment$3.default(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true)
|
|
610
537
|
.isValid()) {
|
|
611
538
|
return {
|
|
612
539
|
invalidDate: true,
|
|
@@ -912,7 +839,7 @@ var decoratorsUtils = /*#__PURE__*/Object.freeze({
|
|
|
912
839
|
hasMonkeyEcxServiceAndHandlingProperties: hasMonkeyEcxServiceAndHandlingProperties
|
|
913
840
|
});
|
|
914
841
|
|
|
915
|
-
const moment$
|
|
842
|
+
const moment$2 = moment_;
|
|
916
843
|
const EMAIL_REGEXP = /^[\w-.]+@([\w-]+\.)+[\w-]{1,64}$/;
|
|
917
844
|
function isEmptyInputValue(value) {
|
|
918
845
|
return value == null || value.length === 0;
|
|
@@ -1057,8 +984,8 @@ function dateValidator(control) {
|
|
|
1057
984
|
if (!control.parent || !control || isEmptyInputValue(control.value))
|
|
1058
985
|
return null;
|
|
1059
986
|
const dateFormat = 'MM-DD-YYYY';
|
|
1060
|
-
if (!moment$
|
|
1061
|
-
.default(moment$
|
|
987
|
+
if (!moment$2
|
|
988
|
+
.default(moment$2.default(control.value).format(dateFormat), ['DD/MM/YYYY', 'MM-DD-YYYY', 'YYYY-MM-DD'], true)
|
|
1062
989
|
.isValid()) {
|
|
1063
990
|
return {
|
|
1064
991
|
invalidDate: true,
|
|
@@ -1110,18 +1037,155 @@ class Validators {
|
|
|
1110
1037
|
static documentBR(control) {
|
|
1111
1038
|
return documentValidator(control, 'BR');
|
|
1112
1039
|
}
|
|
1113
|
-
static documentCL(control) {
|
|
1114
|
-
return documentValidator(control, 'CL');
|
|
1040
|
+
static documentCL(control) {
|
|
1041
|
+
return documentValidator(control, 'CL');
|
|
1042
|
+
}
|
|
1043
|
+
static date(control) {
|
|
1044
|
+
return dateValidator(control);
|
|
1045
|
+
}
|
|
1046
|
+
static greaterThanZero(control) {
|
|
1047
|
+
return valueGreaterThanZero(control);
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
/* eslint-disable object-curly-newline */
|
|
1052
|
+
|
|
1053
|
+
const moment$1 = moment_;
|
|
1054
|
+
class MonkeyEcxFormatDateUnixTimelapsePipe {
|
|
1055
|
+
transform(date, showTime = false, useUtc = true, format = '- HH:mm') {
|
|
1056
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
|
|
1057
|
+
return '';
|
|
1058
|
+
let stillUtc = moment$1.default.utc(date).toDate();
|
|
1059
|
+
if (!useUtc)
|
|
1060
|
+
stillUtc = moment$1.default(date).toDate();
|
|
1061
|
+
if (moment$1.default
|
|
1062
|
+
.utc(date)
|
|
1063
|
+
.toDate()
|
|
1064
|
+
.toLocaleString()
|
|
1065
|
+
.indexOf(':') <= -1) {
|
|
1066
|
+
if (typeof date === 'string') {
|
|
1067
|
+
stillUtc = date;
|
|
1068
|
+
showTime = false;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
const formatFrom = `YYYY/MM/DD${showTime ? ` ${format}` : ''}`;
|
|
1072
|
+
const formatTo = `DD/MM/YYYY${showTime ? ` ${format}` : ''}`;
|
|
1073
|
+
return `${moment$1.default(stillUtc, formatFrom).format(formatTo)}`;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
MonkeyEcxFormatDateUnixTimelapsePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateUnixTimelapsePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1077
|
+
MonkeyEcxFormatDateUnixTimelapsePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateUnixTimelapsePipe, name: "monkeyecxFormatDateUnixTimelapse" });
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDateUnixTimelapsePipe, decorators: [{
|
|
1079
|
+
type: Pipe,
|
|
1080
|
+
args: [{
|
|
1081
|
+
name: 'monkeyecxFormatDateUnixTimelapse'
|
|
1082
|
+
}]
|
|
1083
|
+
}] });
|
|
1084
|
+
|
|
1085
|
+
class MonkeyEcxFormatDocumentPipe {
|
|
1086
|
+
transform(document, withType) {
|
|
1087
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
|
|
1088
|
+
return '';
|
|
1089
|
+
return MonkeyEcxUtils.formatDocumentWithMask(document, withType);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
MonkeyEcxFormatDocumentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1093
|
+
MonkeyEcxFormatDocumentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentPipe, name: "monkeyecxFormatDocument" });
|
|
1094
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentPipe, decorators: [{
|
|
1095
|
+
type: Pipe,
|
|
1096
|
+
args: [{
|
|
1097
|
+
name: 'monkeyecxFormatDocument'
|
|
1098
|
+
}]
|
|
1099
|
+
}] });
|
|
1100
|
+
|
|
1101
|
+
class MonkeyEcxFormatDocumentTypePipe {
|
|
1102
|
+
transform(document, country) {
|
|
1103
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(document))
|
|
1104
|
+
return '';
|
|
1105
|
+
return MonkeyEcxUtils.getDocumentType(document, country);
|
|
1115
1106
|
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1107
|
+
}
|
|
1108
|
+
MonkeyEcxFormatDocumentTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1109
|
+
MonkeyEcxFormatDocumentTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentTypePipe, name: "monkeyecxFormatDocumentType" });
|
|
1110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatDocumentTypePipe, decorators: [{
|
|
1111
|
+
type: Pipe,
|
|
1112
|
+
args: [{
|
|
1113
|
+
name: 'monkeyecxFormatDocumentType'
|
|
1114
|
+
}]
|
|
1115
|
+
}] });
|
|
1116
|
+
|
|
1117
|
+
class MonkeyEcxFormatNumberPipe {
|
|
1118
|
+
transform(number) {
|
|
1119
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(number))
|
|
1120
|
+
return '';
|
|
1121
|
+
return formatNumber(Number(number), 'ptbr');
|
|
1118
1122
|
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1123
|
+
}
|
|
1124
|
+
MonkeyEcxFormatNumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1125
|
+
MonkeyEcxFormatNumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatNumberPipe, name: "monkeyecxFormatNumber" });
|
|
1126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatNumberPipe, decorators: [{
|
|
1127
|
+
type: Pipe,
|
|
1128
|
+
args: [{
|
|
1129
|
+
name: 'monkeyecxFormatNumber'
|
|
1130
|
+
}]
|
|
1131
|
+
}] });
|
|
1132
|
+
|
|
1133
|
+
class MonkeyEcxFormatPhonePipe {
|
|
1134
|
+
transform(phone) {
|
|
1135
|
+
if (phone) {
|
|
1136
|
+
const value = `${phone || ''}`.replace(/\D/g, '');
|
|
1137
|
+
let formated = '';
|
|
1138
|
+
if (value.length > 12) {
|
|
1139
|
+
formated = value.replace(/(\d{2})?(\d{2})?(\d{5})?(\d{4})/, '+$1 ($2) $3-$4');
|
|
1140
|
+
}
|
|
1141
|
+
else if (value.length > 11) {
|
|
1142
|
+
formated = value.replace(/(\d{2})?(\d{2})?(\d{4})?(\d{4})/, '+$1 ($2) $3-$4');
|
|
1143
|
+
}
|
|
1144
|
+
else if (value.length > 10) {
|
|
1145
|
+
formated = value.replace(/(\d{2})?(\d{5})?(\d{4})/, '($1) $2-$3');
|
|
1146
|
+
}
|
|
1147
|
+
else if (value.length > 9) {
|
|
1148
|
+
formated = value.replace(/(\d{2})?(\d{4})?(\d{4})/, '($1) $2-$3');
|
|
1149
|
+
}
|
|
1150
|
+
else if (value.length > 5) {
|
|
1151
|
+
formated = value.replace(/^(\d{2})?(\d{4})?(\d{0,4})/, '($1) $2-$3');
|
|
1152
|
+
}
|
|
1153
|
+
else if (value.length > 1) {
|
|
1154
|
+
formated = value.replace(/^(\d{2})?(\d{0,5})/, '($1) $2');
|
|
1155
|
+
}
|
|
1156
|
+
else if (phone !== '') {
|
|
1157
|
+
formated = value.replace(/^(\d*)/, '($1');
|
|
1158
|
+
}
|
|
1159
|
+
return formated;
|
|
1160
|
+
}
|
|
1161
|
+
return '';
|
|
1121
1162
|
}
|
|
1122
|
-
}
|
|
1163
|
+
}
|
|
1164
|
+
MonkeyEcxFormatPhonePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatPhonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1165
|
+
MonkeyEcxFormatPhonePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatPhonePipe, name: "monkeyecxFormatPhone" });
|
|
1166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatPhonePipe, decorators: [{
|
|
1167
|
+
type: Pipe,
|
|
1168
|
+
args: [{
|
|
1169
|
+
name: 'monkeyecxFormatPhone'
|
|
1170
|
+
}]
|
|
1171
|
+
}] });
|
|
1123
1172
|
|
|
1124
|
-
|
|
1173
|
+
class MonkeyEcxFormatSizePipe {
|
|
1174
|
+
transform(size) {
|
|
1175
|
+
if (!size)
|
|
1176
|
+
return '0 B';
|
|
1177
|
+
const sizeNum = Number(size);
|
|
1178
|
+
return MonkeyEcxUtils.formatFileSize(sizeNum);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
MonkeyEcxFormatSizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1182
|
+
MonkeyEcxFormatSizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatSizePipe, name: "monkeyecxFormatSize" });
|
|
1183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatSizePipe, decorators: [{
|
|
1184
|
+
type: Pipe,
|
|
1185
|
+
args: [{
|
|
1186
|
+
name: 'monkeyecxFormatSize'
|
|
1187
|
+
}]
|
|
1188
|
+
}] });
|
|
1125
1189
|
|
|
1126
1190
|
class MonkeyEcxFormatTaxPipe {
|
|
1127
1191
|
transform(tax, decimalDigits = 7) {
|
|
@@ -1143,71 +1207,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1143
1207
|
}]
|
|
1144
1208
|
}] });
|
|
1145
1209
|
|
|
1146
|
-
class
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
const jsonLine = /^( *)("[\w]+": )?("[^"]*"|[\w.+-]*)?([,[{])?$/gm;
|
|
1152
|
-
const replacer = (match, pIndent, pKey, pVal, pEnd) => {
|
|
1153
|
-
const key = '<span class="json-key" style="color: brown">';
|
|
1154
|
-
const val = '<span class="json-value" style="color: navy">';
|
|
1155
|
-
const str = '<span class="json-string" style="color: olive">';
|
|
1156
|
-
let r = pIndent || '';
|
|
1157
|
-
if (pKey) {
|
|
1158
|
-
r = `${r + key + pKey.replace(/[": ]/g, '')}</span>: `;
|
|
1159
|
-
}
|
|
1160
|
-
if (pVal) {
|
|
1161
|
-
r = `${r + (pVal[0] === '"' ? str : val) + pVal}</span>`;
|
|
1162
|
-
}
|
|
1163
|
-
return r + (pEnd || '');
|
|
1164
|
-
};
|
|
1165
|
-
return JSON.stringify(value, null, 3)
|
|
1166
|
-
.replace(/&/g, '&')
|
|
1167
|
-
.replace(/\\"/g, '"')
|
|
1168
|
-
.replace(/</g, '<')
|
|
1169
|
-
.replace(/>/g, '>')
|
|
1170
|
-
.replace(jsonLine, replacer);
|
|
1210
|
+
class MonkeyEcxFormatValue {
|
|
1211
|
+
transform(number) {
|
|
1212
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(number))
|
|
1213
|
+
return '';
|
|
1214
|
+
return number;
|
|
1171
1215
|
}
|
|
1172
1216
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
1217
|
+
MonkeyEcxFormatValue.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatValue, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1218
|
+
MonkeyEcxFormatValue.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatValue, name: "monkeyecxFormatValue" });
|
|
1219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatValue, decorators: [{
|
|
1176
1220
|
type: Pipe,
|
|
1177
1221
|
args: [{
|
|
1178
|
-
name: '
|
|
1222
|
+
name: 'monkeyecxFormatValue'
|
|
1179
1223
|
}]
|
|
1180
|
-
}]
|
|
1224
|
+
}] });
|
|
1181
1225
|
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
if (!MonkeyEcxUtils.persistNullEmptyUndefined(date))
|
|
1226
|
+
class MonkeyEcxFormatZipCodePipe {
|
|
1227
|
+
transform(zipCode) {
|
|
1228
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(zipCode))
|
|
1186
1229
|
return '';
|
|
1187
|
-
|
|
1188
|
-
if (!useUtc)
|
|
1189
|
-
stillUtc = moment.default(date).toDate();
|
|
1190
|
-
if (moment.default
|
|
1191
|
-
.utc(date)
|
|
1192
|
-
.toDate()
|
|
1193
|
-
.toLocaleString()
|
|
1194
|
-
.indexOf(':') <= -1) {
|
|
1195
|
-
if (typeof date === 'string') {
|
|
1196
|
-
stillUtc = date;
|
|
1197
|
-
showTime = false;
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
const formatFrom = `YYYY/MM/DD${showTime ? ` ${format}` : ''}`;
|
|
1201
|
-
const formatTo = `DD/MM/YYYY${showTime ? ` ${format}` : ''}`;
|
|
1202
|
-
return `${moment.default(stillUtc, formatFrom).format(formatTo)}`;
|
|
1230
|
+
return MonkeyEcxUtils.formatZipCode(zipCode);
|
|
1203
1231
|
}
|
|
1204
1232
|
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
1233
|
+
MonkeyEcxFormatZipCodePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatZipCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1234
|
+
MonkeyEcxFormatZipCodePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatZipCodePipe, name: "monkeyecxFormatZipCode" });
|
|
1235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxFormatZipCodePipe, decorators: [{
|
|
1208
1236
|
type: Pipe,
|
|
1209
1237
|
args: [{
|
|
1210
|
-
name: '
|
|
1238
|
+
name: 'monkeyecxFormatZipCode'
|
|
1239
|
+
}]
|
|
1240
|
+
}] });
|
|
1241
|
+
|
|
1242
|
+
class MonkeyEcxTextTruncatePipe {
|
|
1243
|
+
transform(text, maxLength = 25) {
|
|
1244
|
+
const midChar = '...';
|
|
1245
|
+
if (!text)
|
|
1246
|
+
return midChar;
|
|
1247
|
+
if (text && text.length <= maxLength)
|
|
1248
|
+
return text;
|
|
1249
|
+
const left = Math.ceil(maxLength / 2);
|
|
1250
|
+
const right = text.length - left + 1;
|
|
1251
|
+
return `${text.substr(0, left)} ${midChar} ${text.substring(right)}`;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
MonkeyEcxTextTruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTextTruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1255
|
+
MonkeyEcxTextTruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTextTruncatePipe, name: "monkeyecxTextTruncate" });
|
|
1256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTextTruncatePipe, decorators: [{
|
|
1257
|
+
type: Pipe,
|
|
1258
|
+
args: [{
|
|
1259
|
+
name: 'monkeyecxTextTruncate'
|
|
1260
|
+
}]
|
|
1261
|
+
}] });
|
|
1262
|
+
|
|
1263
|
+
class MonkeyEcxTruncateQtdPipe {
|
|
1264
|
+
transform(number, threshold) {
|
|
1265
|
+
return `${number > threshold ? `${threshold}+` : number}`;
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
MonkeyEcxTruncateQtdPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTruncateQtdPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1269
|
+
MonkeyEcxTruncateQtdPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTruncateQtdPipe, name: "monkeyecxTruncateQtd" });
|
|
1270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxTruncateQtdPipe, decorators: [{
|
|
1271
|
+
type: Pipe,
|
|
1272
|
+
args: [{
|
|
1273
|
+
name: 'monkeyecxTruncateQtd'
|
|
1211
1274
|
}]
|
|
1212
1275
|
}] });
|
|
1213
1276
|
|
|
@@ -1215,79 +1278,83 @@ class MonkeyEcxPipesModule {
|
|
|
1215
1278
|
}
|
|
1216
1279
|
MonkeyEcxPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1217
1280
|
MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxPipesModule, declarations: [MonkeyEcxDisplayFirstNamePipe,
|
|
1281
|
+
MonkeyEcxDisplayInitialsPipe,
|
|
1218
1282
|
MonkeyEcxFormatAddressPipe,
|
|
1283
|
+
MonkeyEcxFormatBeaufityJSONPipe,
|
|
1219
1284
|
MonkeyEcxFormatCurrencyPipe,
|
|
1220
|
-
MonkeyEcxFormatDateTimelapsePipe,
|
|
1221
1285
|
MonkeyEcxFormatDateGroupPipe,
|
|
1286
|
+
MonkeyEcxFormatDateTimelapsePipe,
|
|
1287
|
+
MonkeyEcxFormatDateUnixTimelapsePipe,
|
|
1222
1288
|
MonkeyEcxFormatDocumentPipe,
|
|
1289
|
+
MonkeyEcxFormatDocumentTypePipe,
|
|
1223
1290
|
MonkeyEcxFormatNumberPipe,
|
|
1224
1291
|
MonkeyEcxFormatPhonePipe,
|
|
1225
1292
|
MonkeyEcxFormatSizePipe,
|
|
1226
1293
|
MonkeyEcxFormatTaxPipe,
|
|
1227
|
-
MonkeyEcxFormatDocumentTypePipe,
|
|
1228
1294
|
MonkeyEcxFormatValue,
|
|
1229
1295
|
MonkeyEcxFormatZipCodePipe,
|
|
1230
1296
|
MonkeyEcxTextTruncatePipe,
|
|
1231
|
-
MonkeyEcxTruncateQtdPipe,
|
|
1232
|
-
|
|
1233
|
-
MonkeyEcxFormatDateUnixTimelapsePipe], exports: [MonkeyEcxDisplayFirstNamePipe,
|
|
1297
|
+
MonkeyEcxTruncateQtdPipe], exports: [MonkeyEcxDisplayFirstNamePipe,
|
|
1298
|
+
MonkeyEcxDisplayInitialsPipe,
|
|
1234
1299
|
MonkeyEcxFormatAddressPipe,
|
|
1300
|
+
MonkeyEcxFormatBeaufityJSONPipe,
|
|
1235
1301
|
MonkeyEcxFormatCurrencyPipe,
|
|
1236
|
-
MonkeyEcxFormatDateTimelapsePipe,
|
|
1237
1302
|
MonkeyEcxFormatDateGroupPipe,
|
|
1303
|
+
MonkeyEcxFormatDateTimelapsePipe,
|
|
1304
|
+
MonkeyEcxFormatDateUnixTimelapsePipe,
|
|
1238
1305
|
MonkeyEcxFormatDocumentPipe,
|
|
1306
|
+
MonkeyEcxFormatDocumentTypePipe,
|
|
1239
1307
|
MonkeyEcxFormatNumberPipe,
|
|
1240
1308
|
MonkeyEcxFormatPhonePipe,
|
|
1241
1309
|
MonkeyEcxFormatSizePipe,
|
|
1242
1310
|
MonkeyEcxFormatTaxPipe,
|
|
1243
|
-
MonkeyEcxFormatDocumentTypePipe,
|
|
1244
1311
|
MonkeyEcxFormatValue,
|
|
1245
1312
|
MonkeyEcxFormatZipCodePipe,
|
|
1246
1313
|
MonkeyEcxTextTruncatePipe,
|
|
1247
|
-
MonkeyEcxTruncateQtdPipe
|
|
1248
|
-
MonkeyEcxFormatBeaufityJSONPipe,
|
|
1249
|
-
MonkeyEcxFormatDateUnixTimelapsePipe] });
|
|
1314
|
+
MonkeyEcxTruncateQtdPipe] });
|
|
1250
1315
|
MonkeyEcxPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxPipesModule, providers: [CurrencyPipe] });
|
|
1251
1316
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxPipesModule, decorators: [{
|
|
1252
1317
|
type: NgModule,
|
|
1253
1318
|
args: [{
|
|
1254
1319
|
declarations: [
|
|
1255
1320
|
MonkeyEcxDisplayFirstNamePipe,
|
|
1321
|
+
MonkeyEcxDisplayInitialsPipe,
|
|
1256
1322
|
MonkeyEcxFormatAddressPipe,
|
|
1323
|
+
MonkeyEcxFormatBeaufityJSONPipe,
|
|
1257
1324
|
MonkeyEcxFormatCurrencyPipe,
|
|
1258
|
-
MonkeyEcxFormatDateTimelapsePipe,
|
|
1259
1325
|
MonkeyEcxFormatDateGroupPipe,
|
|
1326
|
+
MonkeyEcxFormatDateTimelapsePipe,
|
|
1327
|
+
MonkeyEcxFormatDateUnixTimelapsePipe,
|
|
1260
1328
|
MonkeyEcxFormatDocumentPipe,
|
|
1329
|
+
MonkeyEcxFormatDocumentTypePipe,
|
|
1261
1330
|
MonkeyEcxFormatNumberPipe,
|
|
1262
1331
|
MonkeyEcxFormatPhonePipe,
|
|
1263
1332
|
MonkeyEcxFormatSizePipe,
|
|
1264
1333
|
MonkeyEcxFormatTaxPipe,
|
|
1265
|
-
MonkeyEcxFormatDocumentTypePipe,
|
|
1266
1334
|
MonkeyEcxFormatValue,
|
|
1267
1335
|
MonkeyEcxFormatZipCodePipe,
|
|
1268
1336
|
MonkeyEcxTextTruncatePipe,
|
|
1269
|
-
MonkeyEcxTruncateQtdPipe
|
|
1270
|
-
MonkeyEcxFormatBeaufityJSONPipe,
|
|
1271
|
-
MonkeyEcxFormatDateUnixTimelapsePipe
|
|
1337
|
+
MonkeyEcxTruncateQtdPipe
|
|
1272
1338
|
],
|
|
1273
1339
|
exports: [
|
|
1274
1340
|
MonkeyEcxDisplayFirstNamePipe,
|
|
1341
|
+
MonkeyEcxDisplayInitialsPipe,
|
|
1275
1342
|
MonkeyEcxFormatAddressPipe,
|
|
1343
|
+
MonkeyEcxFormatBeaufityJSONPipe,
|
|
1276
1344
|
MonkeyEcxFormatCurrencyPipe,
|
|
1277
|
-
MonkeyEcxFormatDateTimelapsePipe,
|
|
1278
1345
|
MonkeyEcxFormatDateGroupPipe,
|
|
1346
|
+
MonkeyEcxFormatDateTimelapsePipe,
|
|
1347
|
+
MonkeyEcxFormatDateUnixTimelapsePipe,
|
|
1279
1348
|
MonkeyEcxFormatDocumentPipe,
|
|
1349
|
+
MonkeyEcxFormatDocumentTypePipe,
|
|
1280
1350
|
MonkeyEcxFormatNumberPipe,
|
|
1281
1351
|
MonkeyEcxFormatPhonePipe,
|
|
1282
1352
|
MonkeyEcxFormatSizePipe,
|
|
1283
1353
|
MonkeyEcxFormatTaxPipe,
|
|
1284
|
-
MonkeyEcxFormatDocumentTypePipe,
|
|
1285
1354
|
MonkeyEcxFormatValue,
|
|
1286
1355
|
MonkeyEcxFormatZipCodePipe,
|
|
1287
1356
|
MonkeyEcxTextTruncatePipe,
|
|
1288
|
-
MonkeyEcxTruncateQtdPipe
|
|
1289
|
-
MonkeyEcxFormatBeaufityJSONPipe,
|
|
1290
|
-
MonkeyEcxFormatDateUnixTimelapsePipe
|
|
1357
|
+
MonkeyEcxTruncateQtdPipe
|
|
1291
1358
|
],
|
|
1292
1359
|
providers: [CurrencyPipe]
|
|
1293
1360
|
}]
|
|
@@ -3130,8 +3197,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
3130
3197
|
}]
|
|
3131
3198
|
}], ctorParameters: function () { return [{ type: i1$3.Router }]; } });
|
|
3132
3199
|
|
|
3200
|
+
const moment = moment_;
|
|
3201
|
+
class MonkeyEcxAlertsConfigService {
|
|
3202
|
+
constructor(modalService) {
|
|
3203
|
+
this.modalService = modalService;
|
|
3204
|
+
// not to do
|
|
3205
|
+
}
|
|
3206
|
+
handleValidation(config) {
|
|
3207
|
+
if (config.alert) {
|
|
3208
|
+
const { img, title, message, endDate } = config.alert;
|
|
3209
|
+
if (moment().isSameOrBefore(moment(endDate))) {
|
|
3210
|
+
this.modalService.open(AlertsComponent, {
|
|
3211
|
+
color: 'theme',
|
|
3212
|
+
size: 'md',
|
|
3213
|
+
data: {
|
|
3214
|
+
img,
|
|
3215
|
+
title,
|
|
3216
|
+
message
|
|
3217
|
+
}
|
|
3218
|
+
});
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
apply(config) {
|
|
3223
|
+
this.handleValidation(config);
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
MonkeyEcxAlertsConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAlertsConfigService, deps: [{ token: i1.MonkeyStyleGuideModalService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3227
|
+
MonkeyEcxAlertsConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAlertsConfigService, providedIn: 'root' });
|
|
3228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxAlertsConfigService, decorators: [{
|
|
3229
|
+
type: Injectable,
|
|
3230
|
+
args: [{
|
|
3231
|
+
providedIn: 'root'
|
|
3232
|
+
}]
|
|
3233
|
+
}], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalService }]; } });
|
|
3234
|
+
|
|
3133
3235
|
class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
|
|
3134
|
-
constructor(monkeyecxService, monkeyecxi18nConfigService, monkeyecxLogsConfigService, monkeyStyleGuideSettingsService, monkeyecxServiceWorkerConfigService, monkeyecxSecurityConsoleConfigService, monkeyecxMaintenanceConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyGAConfigService) {
|
|
3236
|
+
constructor(monkeyecxService, monkeyecxi18nConfigService, monkeyecxLogsConfigService, monkeyStyleGuideSettingsService, monkeyecxServiceWorkerConfigService, monkeyecxSecurityConsoleConfigService, monkeyecxMaintenanceConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyGAConfigService, monkeyEcxAlertsConfigService) {
|
|
3135
3237
|
super(monkeyecxService);
|
|
3136
3238
|
this.monkeyecxi18nConfigService = monkeyecxi18nConfigService;
|
|
3137
3239
|
this.monkeyecxLogsConfigService = monkeyecxLogsConfigService;
|
|
@@ -3142,6 +3244,7 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
|
|
|
3142
3244
|
this.monkeyecxErrorConfigService = monkeyecxErrorConfigService;
|
|
3143
3245
|
this.monkeyEcxFeatureToggleService = monkeyEcxFeatureToggleService;
|
|
3144
3246
|
this.monkeyGAConfigService = monkeyGAConfigService;
|
|
3247
|
+
this.monkeyEcxAlertsConfigService = monkeyEcxAlertsConfigService;
|
|
3145
3248
|
this.configSubject$ = new BehaviorSubject({});
|
|
3146
3249
|
this.configBoostrapSubject$ = new BehaviorSubject({});
|
|
3147
3250
|
}
|
|
@@ -3156,13 +3259,14 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
|
|
|
3156
3259
|
}
|
|
3157
3260
|
getWhiteLabelSettings(monkeyecxCode, configBoostrap, callback, environment, identifyCode) {
|
|
3158
3261
|
var _a;
|
|
3159
|
-
const { monkeyecxService, monkeyecxi18nConfigService, configSubject$, monkeyStyleGuideSettingsService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyGAConfigService, internalValidations } = this;
|
|
3262
|
+
const { monkeyecxService, monkeyecxi18nConfigService, configSubject$, monkeyStyleGuideSettingsService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyGAConfigService, monkeyEcxAlertsConfigService, internalValidations } = this;
|
|
3160
3263
|
const url = `${environment.urlAssets}/${monkeyecxCode.toLowerCase()}`;
|
|
3161
3264
|
(_a = monkeyecxService === null || monkeyecxService === void 0 ? void 0 : monkeyecxService.get(`${url}/white-label.json`)) === null || _a === void 0 ? void 0 : _a.subscribe((config) => {
|
|
3162
3265
|
monkeyecxi18nConfigService.apply(config, environment);
|
|
3163
3266
|
monkeyecxLogsConfigService.apply(config, configBoostrap, environment, identifyCode);
|
|
3164
3267
|
monkeyEcxFeatureToggleService.apply(configSubject$, environment);
|
|
3165
3268
|
monkeyGAConfigService.apply(config, environment);
|
|
3269
|
+
monkeyEcxAlertsConfigService.apply(config);
|
|
3166
3270
|
monkeyStyleGuideSettingsService.boostrap(`${url}/monkey-style-guide-settings.json`, internalValidations.bind(this, configBoostrap, callback, environment));
|
|
3167
3271
|
configSubject$.next(config);
|
|
3168
3272
|
}, (err) => {
|
|
@@ -3200,7 +3304,7 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
|
|
|
3200
3304
|
return this.configBoostrapSubject$.asObservable();
|
|
3201
3305
|
}
|
|
3202
3306
|
}
|
|
3203
|
-
MonkeyEcxConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxConfigService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxi18nConfigService }, { token: MonkeyEcxLogsConfigService }, { token: i1.MonkeyStyleGuideSettingsService }, { token: MonkeyEcxServiceWorkerConfigService }, { token: MonkeyEcxSecurityConsoleConfigService }, { token: MonkeyEcxMaintenanceConfigService }, { token: MonkeyEcxErrorConfigService }, { token: MonkeyEcxFeatureToggleService }, { token: MonkeyEcxGAConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3307
|
+
MonkeyEcxConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxConfigService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxi18nConfigService }, { token: MonkeyEcxLogsConfigService }, { token: i1.MonkeyStyleGuideSettingsService }, { token: MonkeyEcxServiceWorkerConfigService }, { token: MonkeyEcxSecurityConsoleConfigService }, { token: MonkeyEcxMaintenanceConfigService }, { token: MonkeyEcxErrorConfigService }, { token: MonkeyEcxFeatureToggleService }, { token: MonkeyEcxGAConfigService }, { token: MonkeyEcxAlertsConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3204
3308
|
MonkeyEcxConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxConfigService, providedIn: 'root' });
|
|
3205
3309
|
__decorate([
|
|
3206
3310
|
MonkeyEcxCoreService({
|
|
@@ -3217,7 +3321,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
3217
3321
|
args: [{
|
|
3218
3322
|
providedIn: 'root'
|
|
3219
3323
|
}]
|
|
3220
|
-
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxi18nConfigService }, { type: MonkeyEcxLogsConfigService }, { type: i1.MonkeyStyleGuideSettingsService }, { type: MonkeyEcxServiceWorkerConfigService }, { type: MonkeyEcxSecurityConsoleConfigService }, { type: MonkeyEcxMaintenanceConfigService }, { type: MonkeyEcxErrorConfigService }, { type: MonkeyEcxFeatureToggleService }, { type: MonkeyEcxGAConfigService }]; }, propDecorators: { init: [] } });
|
|
3324
|
+
}], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxi18nConfigService }, { type: MonkeyEcxLogsConfigService }, { type: i1.MonkeyStyleGuideSettingsService }, { type: MonkeyEcxServiceWorkerConfigService }, { type: MonkeyEcxSecurityConsoleConfigService }, { type: MonkeyEcxMaintenanceConfigService }, { type: MonkeyEcxErrorConfigService }, { type: MonkeyEcxFeatureToggleService }, { type: MonkeyEcxGAConfigService }, { type: MonkeyEcxAlertsConfigService }]; }, propDecorators: { init: [] } });
|
|
3221
3325
|
|
|
3222
3326
|
class MonkeyEcxTokenStorageService {
|
|
3223
3327
|
constructor(monkeyecxConfigService) {
|
|
@@ -4964,7 +5068,8 @@ class MonkeyFrontCoreModule {
|
|
|
4964
5068
|
MonkeyFrontCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyFrontCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4965
5069
|
MonkeyFrontCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyFrontCoreModule, imports: [CommonModule,
|
|
4966
5070
|
HttpClientModule, i1$1.TranslateModule, MonkeyEcxConfigModule, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxErrorHandlingModule, MonkeyStyleGuideModule, i1$6.ServiceWorkerModule, ClosedToMaintenanceModule,
|
|
4967
|
-
VersionChangedModule
|
|
5071
|
+
VersionChangedModule,
|
|
5072
|
+
AlertsModule] });
|
|
4968
5073
|
MonkeyFrontCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyFrontCoreModule, providers: [
|
|
4969
5074
|
MonkeyStyleGuideModalService,
|
|
4970
5075
|
MonkeyStyleGuideSettingsService,
|
|
@@ -4979,7 +5084,8 @@ MonkeyFrontCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
4979
5084
|
MonkeyStyleGuideModule,
|
|
4980
5085
|
ServiceWorkerModule.register('ngsw-worker.js'),
|
|
4981
5086
|
ClosedToMaintenanceModule,
|
|
4982
|
-
VersionChangedModule
|
|
5087
|
+
VersionChangedModule,
|
|
5088
|
+
AlertsModule
|
|
4983
5089
|
]] });
|
|
4984
5090
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyFrontCoreModule, decorators: [{
|
|
4985
5091
|
type: NgModule,
|
|
@@ -4994,7 +5100,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
4994
5100
|
MonkeyStyleGuideModule,
|
|
4995
5101
|
ServiceWorkerModule.register('ngsw-worker.js'),
|
|
4996
5102
|
ClosedToMaintenanceModule,
|
|
4997
|
-
VersionChangedModule
|
|
5103
|
+
VersionChangedModule,
|
|
5104
|
+
AlertsModule
|
|
4998
5105
|
],
|
|
4999
5106
|
providers: [
|
|
5000
5107
|
MonkeyStyleGuideModalService,
|
|
@@ -5012,5 +5119,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
5012
5119
|
* Generated bundle index. Do not edit.
|
|
5013
5120
|
*/
|
|
5014
5121
|
|
|
5015
|
-
export { ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
5122
|
+
export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
|
|
5016
5123
|
//# sourceMappingURL=monkey-front-core.mjs.map
|