monkey-front-components 0.0.274 → 0.0.277
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/base/base-scroll-component.mjs +70 -0
- package/esm2020/lib/components/base/index.mjs +3 -2
- package/fesm2015/monkey-front-components.mjs +176 -112
- package/fesm2015/monkey-front-components.mjs.map +1 -1
- package/fesm2020/monkey-front-components.mjs +175 -111
- package/fesm2020/monkey-front-components.mjs.map +1 -1
- package/lib/components/base/base-scroll-component.d.ts +18 -0
- package/lib/components/base/index.d.ts +2 -1
- package/monkey-front-components-0.0.277.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-components-0.0.274.tgz +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
2
|
+
import { Directive } from '@angular/core';
|
|
3
|
+
import { NavigationEnd, NavigationStart } from '@angular/router';
|
|
4
|
+
import { BaseComponent } from './base-component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@angular/router";
|
|
7
|
+
export class BaseScrollComponent extends BaseComponent {
|
|
8
|
+
constructor(_pId, _rt) {
|
|
9
|
+
super();
|
|
10
|
+
this._pId = _pId;
|
|
11
|
+
this._rt = _rt;
|
|
12
|
+
this.routeScrollPositions = {};
|
|
13
|
+
this.deferredRestore = false;
|
|
14
|
+
}
|
|
15
|
+
saveScroll(url) {
|
|
16
|
+
const element = document.getElementById('container-3');
|
|
17
|
+
this.routeScrollPositions[url] = element.scrollTop;
|
|
18
|
+
}
|
|
19
|
+
restoreScroll(url) {
|
|
20
|
+
const savedScroll = this.routeScrollPositions[url];
|
|
21
|
+
const element = document.getElementById('container-3');
|
|
22
|
+
if (!savedScroll) {
|
|
23
|
+
this.deferredRestore = false;
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
element.scrollTop = savedScroll;
|
|
27
|
+
this.deferredRestore = false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
addScrollTopListeners() {
|
|
31
|
+
if ('scrollRestoration' in history) {
|
|
32
|
+
history.scrollRestoration = 'manual';
|
|
33
|
+
}
|
|
34
|
+
this._rt.events.subscribe(event => {
|
|
35
|
+
if (event instanceof NavigationStart) {
|
|
36
|
+
this.saveScroll(this._rt.url);
|
|
37
|
+
}
|
|
38
|
+
else if (event instanceof NavigationEnd) {
|
|
39
|
+
if (!this.restoreScroll(event.url)) {
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
if (this.deferredRestore) {
|
|
42
|
+
this.restoreScroll(event.url);
|
|
43
|
+
this.deferredRestore = false;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
this.deferredRestore = true;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
ngOnInit() {
|
|
52
|
+
if (isPlatformBrowser(this._pId)) {
|
|
53
|
+
this.addScrollTopListeners();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
ngAfterContentChecked() {
|
|
57
|
+
if (this.deferredRestore) {
|
|
58
|
+
this.restoreScroll(this._rt.url);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
BaseScrollComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseScrollComponent, deps: [{ token: Object }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Directive });
|
|
63
|
+
BaseScrollComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: BaseScrollComponent, selector: "[baseScrollComponent]", usesInheritance: true, ngImport: i0 });
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseScrollComponent, decorators: [{
|
|
65
|
+
type: Directive,
|
|
66
|
+
args: [{
|
|
67
|
+
selector: '[baseScrollComponent]'
|
|
68
|
+
}]
|
|
69
|
+
}], ctorParameters: function () { return [{ type: Object }, { type: i1.Router }]; } });
|
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1zY3JvbGwtY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbW9ua2V5LWZyb250LWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2Jhc2UvYmFzZS1zY3JvbGwtY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3BELE9BQU8sRUFBdUIsU0FBUyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBQ3ZFLE9BQU8sRUFBRSxhQUFhLEVBQUUsZUFBZSxFQUFVLE1BQU0saUJBQWlCLENBQUM7QUFDekUsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGtCQUFrQixDQUFDOzs7QUFLakQsTUFBTSxPQUFnQixtQkFBb0IsU0FBUSxhQUFhO0lBTTdELFlBQW9CLElBQVksRUFBVSxHQUFXO1FBQ25ELEtBQUssRUFBRSxDQUFDO1FBRFUsU0FBSSxHQUFKLElBQUksQ0FBUTtRQUFVLFFBQUcsR0FBSCxHQUFHLENBQVE7UUFKN0MseUJBQW9CLEdBQThCLEVBQUUsQ0FBQztRQUVyRCxvQkFBZSxHQUFHLEtBQUssQ0FBQztJQUloQyxDQUFDO0lBRU8sVUFBVSxDQUFDLEdBQVc7UUFDNUIsTUFBTSxPQUFPLEdBQVEsUUFBUSxDQUFDLGNBQWMsQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUM1RCxJQUFJLENBQUMsb0JBQW9CLENBQUMsR0FBRyxDQUFDLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQztJQUNyRCxDQUFDO0lB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AgdGhpcy5yZXN0b3JlU2Nyb2xsKHRoaXMuX3J0LnVybCk7XG4gICAgfVxuICB9XG59XG4iXX0=
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './base-component';
|
|
2
|
-
export * from './base-dynamic';
|
|
3
2
|
export * from './base-dynamic-array';
|
|
3
|
+
export * from './base-dynamic';
|
|
4
|
+
export * from './base-scroll-component';
|
|
4
5
|
export * from './base-validators';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9tb25rZXktZnJvbnQtY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMvYmFzZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsbUJBQW1CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2Jhc2UtY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vYmFzZS1keW5hbWljLWFycmF5JztcbmV4cG9ydCAqIGZyb20gJy4vYmFzZS1keW5hbWljJztcbmV4cG9ydCAqIGZyb20gJy4vYmFzZS1zY3JvbGwtY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vYmFzZS12YWxpZGF0b3JzJztcbiJdfQ==
|
|
@@ -2,18 +2,18 @@ import { Subject, BehaviorSubject } from 'rxjs';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Directive, EventEmitter, Input, Output, Component, ViewEncapsulation, HostBinding, ViewChild, NgModule, Injectable } from '@angular/core';
|
|
4
4
|
import { takeUntil, filter } from 'rxjs/operators';
|
|
5
|
-
import * as i1$
|
|
5
|
+
import * as i1$2 from 'monkey-style-guide';
|
|
6
6
|
import { MonkeyUtils, MonkeyInputModule, MonkeySelectModule, MonkeyRadioButtonModule, MonkeyOptionModule, MonkeyFileUploadModule, MonkeyButtonModule, MonkeyInputPhoneModule, MonkeyIconModule } from 'monkey-style-guide';
|
|
7
|
-
import * as i1$
|
|
7
|
+
import * as i1$3 from 'monkey-front-core';
|
|
8
8
|
import { MonkeyEcxCommonsService, ValidateUtils, Validators as Validators$1, MonkeyEcxUtils, MonkeyEcxPipesModule, MonkeyEcxDirectivesModule } from 'monkey-front-core';
|
|
9
9
|
import * as i1 from '@angular/forms';
|
|
10
10
|
import { Validators, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
11
11
|
import * as i3 from '@angular/common';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
12
|
+
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
13
|
+
import * as i1$1 from '@angular/router';
|
|
14
|
+
import { NavigationStart, NavigationEnd, NavigationError, NavigationCancel } from '@angular/router';
|
|
13
15
|
import * as i4 from '@ngx-translate/core';
|
|
14
16
|
import { TranslateModule } from '@ngx-translate/core';
|
|
15
|
-
import * as i1$3 from '@angular/router';
|
|
16
|
-
import { NavigationStart, NavigationEnd, NavigationError, NavigationCancel } from '@angular/router';
|
|
17
17
|
|
|
18
18
|
class BaseComponent {
|
|
19
19
|
constructor() {
|
|
@@ -341,99 +341,6 @@ const validators = {
|
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
343
|
|
|
344
|
-
class BaseDynamic extends BaseComponent {
|
|
345
|
-
constructor(fb) {
|
|
346
|
-
super();
|
|
347
|
-
this.fb = fb;
|
|
348
|
-
this.onHandleSubmit = new EventEmitter();
|
|
349
|
-
this.onHandleUpdateForm = new EventEmitter();
|
|
350
|
-
this.onHandleSubmitFormReady = new EventEmitter();
|
|
351
|
-
this.fields = [];
|
|
352
|
-
this.disabled = false;
|
|
353
|
-
this._form = null;
|
|
354
|
-
}
|
|
355
|
-
createControl() {
|
|
356
|
-
const { fields } = this;
|
|
357
|
-
if (!fields)
|
|
358
|
-
return null;
|
|
359
|
-
// eslint-disable-next-line object-curly-newline
|
|
360
|
-
const group = this.fb.group({});
|
|
361
|
-
fields.forEach((field) => {
|
|
362
|
-
const { fieldType, validations, name, disabled } = field;
|
|
363
|
-
let { value } = field;
|
|
364
|
-
if (fieldType === 'button')
|
|
365
|
-
return;
|
|
366
|
-
if (fieldType === 'radiobutton' || fieldType === 'checkbox' || fieldType === 'select') {
|
|
367
|
-
value = '';
|
|
368
|
-
}
|
|
369
|
-
const control = this.fb.control(value, this.bindValidations(validations || []));
|
|
370
|
-
if (disabled || this.disabled)
|
|
371
|
-
control.disable();
|
|
372
|
-
group.addControl(name, control);
|
|
373
|
-
});
|
|
374
|
-
return group;
|
|
375
|
-
}
|
|
376
|
-
bindValidations(validations) {
|
|
377
|
-
if (validations.length > 0) {
|
|
378
|
-
const validList = [];
|
|
379
|
-
validations.forEach((valid) => {
|
|
380
|
-
const validated = valid.param
|
|
381
|
-
? validators[valid.name](valid.param)
|
|
382
|
-
: validators[valid.name];
|
|
383
|
-
validList.push(validated);
|
|
384
|
-
});
|
|
385
|
-
return Validators.compose(validList);
|
|
386
|
-
}
|
|
387
|
-
return null;
|
|
388
|
-
}
|
|
389
|
-
fillValues() {
|
|
390
|
-
const { data } = this;
|
|
391
|
-
if (!data || !this._form)
|
|
392
|
-
return;
|
|
393
|
-
Object.entries(data).forEach(([key, value]) => {
|
|
394
|
-
var _a, _b, _c;
|
|
395
|
-
if (MonkeyUtils.persistNullEmptyUndefined(value) && ((_a = this._form) === null || _a === void 0 ? void 0 : _a.controls[key])) {
|
|
396
|
-
(_c = (_b = this._form) === null || _b === void 0 ? void 0 : _b.controls[key]) === null || _c === void 0 ? void 0 : _c.setValue(value);
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
ngOnInit() {
|
|
401
|
-
this._form = this.createControl();
|
|
402
|
-
this.fillValues();
|
|
403
|
-
this.onHandleUpdateForm.subscribe(() => {
|
|
404
|
-
this.fillValues();
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
ngOnChanges() {
|
|
408
|
-
if (!this._form) {
|
|
409
|
-
this._form = this.createControl();
|
|
410
|
-
}
|
|
411
|
-
this.fillValues();
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
BaseDynamic.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseDynamic, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Directive });
|
|
415
|
-
BaseDynamic.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: BaseDynamic, selector: "[baseDynamic]", inputs: { onHandleSubmit: "onHandleSubmit", onHandleUpdateForm: "onHandleUpdateForm", self: "self", fields: "fields", data: "data", disabled: "disabled" }, outputs: { onHandleSubmitFormReady: "onHandleSubmitFormReady" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseDynamic, decorators: [{
|
|
417
|
-
type: Directive,
|
|
418
|
-
args: [{
|
|
419
|
-
selector: '[baseDynamic]'
|
|
420
|
-
}]
|
|
421
|
-
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { onHandleSubmit: [{
|
|
422
|
-
type: Input
|
|
423
|
-
}], onHandleUpdateForm: [{
|
|
424
|
-
type: Input
|
|
425
|
-
}], onHandleSubmitFormReady: [{
|
|
426
|
-
type: Output
|
|
427
|
-
}], self: [{
|
|
428
|
-
type: Input
|
|
429
|
-
}], fields: [{
|
|
430
|
-
type: Input
|
|
431
|
-
}], data: [{
|
|
432
|
-
type: Input
|
|
433
|
-
}], disabled: [{
|
|
434
|
-
type: Input
|
|
435
|
-
}] } });
|
|
436
|
-
|
|
437
344
|
class BaseDynamicArray extends BaseComponent {
|
|
438
345
|
constructor(fb) {
|
|
439
346
|
super();
|
|
@@ -644,6 +551,163 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
644
551
|
type: Input
|
|
645
552
|
}] } });
|
|
646
553
|
|
|
554
|
+
class BaseDynamic extends BaseComponent {
|
|
555
|
+
constructor(fb) {
|
|
556
|
+
super();
|
|
557
|
+
this.fb = fb;
|
|
558
|
+
this.onHandleSubmit = new EventEmitter();
|
|
559
|
+
this.onHandleUpdateForm = new EventEmitter();
|
|
560
|
+
this.onHandleSubmitFormReady = new EventEmitter();
|
|
561
|
+
this.fields = [];
|
|
562
|
+
this.disabled = false;
|
|
563
|
+
this._form = null;
|
|
564
|
+
}
|
|
565
|
+
createControl() {
|
|
566
|
+
const { fields } = this;
|
|
567
|
+
if (!fields)
|
|
568
|
+
return null;
|
|
569
|
+
// eslint-disable-next-line object-curly-newline
|
|
570
|
+
const group = this.fb.group({});
|
|
571
|
+
fields.forEach((field) => {
|
|
572
|
+
const { fieldType, validations, name, disabled } = field;
|
|
573
|
+
let { value } = field;
|
|
574
|
+
if (fieldType === 'button')
|
|
575
|
+
return;
|
|
576
|
+
if (fieldType === 'radiobutton' || fieldType === 'checkbox' || fieldType === 'select') {
|
|
577
|
+
value = '';
|
|
578
|
+
}
|
|
579
|
+
const control = this.fb.control(value, this.bindValidations(validations || []));
|
|
580
|
+
if (disabled || this.disabled)
|
|
581
|
+
control.disable();
|
|
582
|
+
group.addControl(name, control);
|
|
583
|
+
});
|
|
584
|
+
return group;
|
|
585
|
+
}
|
|
586
|
+
bindValidations(validations) {
|
|
587
|
+
if (validations.length > 0) {
|
|
588
|
+
const validList = [];
|
|
589
|
+
validations.forEach((valid) => {
|
|
590
|
+
const validated = valid.param
|
|
591
|
+
? validators[valid.name](valid.param)
|
|
592
|
+
: validators[valid.name];
|
|
593
|
+
validList.push(validated);
|
|
594
|
+
});
|
|
595
|
+
return Validators.compose(validList);
|
|
596
|
+
}
|
|
597
|
+
return null;
|
|
598
|
+
}
|
|
599
|
+
fillValues() {
|
|
600
|
+
const { data } = this;
|
|
601
|
+
if (!data || !this._form)
|
|
602
|
+
return;
|
|
603
|
+
Object.entries(data).forEach(([key, value]) => {
|
|
604
|
+
var _a, _b, _c;
|
|
605
|
+
if (MonkeyUtils.persistNullEmptyUndefined(value) && ((_a = this._form) === null || _a === void 0 ? void 0 : _a.controls[key])) {
|
|
606
|
+
(_c = (_b = this._form) === null || _b === void 0 ? void 0 : _b.controls[key]) === null || _c === void 0 ? void 0 : _c.setValue(value);
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
ngOnInit() {
|
|
611
|
+
this._form = this.createControl();
|
|
612
|
+
this.fillValues();
|
|
613
|
+
this.onHandleUpdateForm.subscribe(() => {
|
|
614
|
+
this.fillValues();
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
ngOnChanges() {
|
|
618
|
+
if (!this._form) {
|
|
619
|
+
this._form = this.createControl();
|
|
620
|
+
}
|
|
621
|
+
this.fillValues();
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
BaseDynamic.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseDynamic, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Directive });
|
|
625
|
+
BaseDynamic.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: BaseDynamic, selector: "[baseDynamic]", inputs: { onHandleSubmit: "onHandleSubmit", onHandleUpdateForm: "onHandleUpdateForm", self: "self", fields: "fields", data: "data", disabled: "disabled" }, outputs: { onHandleSubmitFormReady: "onHandleSubmitFormReady" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseDynamic, decorators: [{
|
|
627
|
+
type: Directive,
|
|
628
|
+
args: [{
|
|
629
|
+
selector: '[baseDynamic]'
|
|
630
|
+
}]
|
|
631
|
+
}], ctorParameters: function () { return [{ type: i1.FormBuilder }]; }, propDecorators: { onHandleSubmit: [{
|
|
632
|
+
type: Input
|
|
633
|
+
}], onHandleUpdateForm: [{
|
|
634
|
+
type: Input
|
|
635
|
+
}], onHandleSubmitFormReady: [{
|
|
636
|
+
type: Output
|
|
637
|
+
}], self: [{
|
|
638
|
+
type: Input
|
|
639
|
+
}], fields: [{
|
|
640
|
+
type: Input
|
|
641
|
+
}], data: [{
|
|
642
|
+
type: Input
|
|
643
|
+
}], disabled: [{
|
|
644
|
+
type: Input
|
|
645
|
+
}] } });
|
|
646
|
+
|
|
647
|
+
class BaseScrollComponent extends BaseComponent {
|
|
648
|
+
constructor(_pId, _rt) {
|
|
649
|
+
super();
|
|
650
|
+
this._pId = _pId;
|
|
651
|
+
this._rt = _rt;
|
|
652
|
+
this.routeScrollPositions = {};
|
|
653
|
+
this.deferredRestore = false;
|
|
654
|
+
}
|
|
655
|
+
saveScroll(url) {
|
|
656
|
+
const element = document.getElementById('container-3');
|
|
657
|
+
this.routeScrollPositions[url] = element.scrollTop;
|
|
658
|
+
}
|
|
659
|
+
restoreScroll(url) {
|
|
660
|
+
const savedScroll = this.routeScrollPositions[url];
|
|
661
|
+
const element = document.getElementById('container-3');
|
|
662
|
+
if (!savedScroll) {
|
|
663
|
+
this.deferredRestore = false;
|
|
664
|
+
return false;
|
|
665
|
+
}
|
|
666
|
+
element.scrollTop = savedScroll;
|
|
667
|
+
this.deferredRestore = false;
|
|
668
|
+
return true;
|
|
669
|
+
}
|
|
670
|
+
addScrollTopListeners() {
|
|
671
|
+
if ('scrollRestoration' in history) {
|
|
672
|
+
history.scrollRestoration = 'manual';
|
|
673
|
+
}
|
|
674
|
+
this._rt.events.subscribe(event => {
|
|
675
|
+
if (event instanceof NavigationStart) {
|
|
676
|
+
this.saveScroll(this._rt.url);
|
|
677
|
+
}
|
|
678
|
+
else if (event instanceof NavigationEnd) {
|
|
679
|
+
if (!this.restoreScroll(event.url)) {
|
|
680
|
+
setTimeout(() => {
|
|
681
|
+
if (this.deferredRestore) {
|
|
682
|
+
this.restoreScroll(event.url);
|
|
683
|
+
this.deferredRestore = false;
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
this.deferredRestore = true;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
ngOnInit() {
|
|
692
|
+
if (isPlatformBrowser(this._pId)) {
|
|
693
|
+
this.addScrollTopListeners();
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
ngAfterContentChecked() {
|
|
697
|
+
if (this.deferredRestore) {
|
|
698
|
+
this.restoreScroll(this._rt.url);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
BaseScrollComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseScrollComponent, deps: [{ token: Object }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Directive });
|
|
703
|
+
BaseScrollComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: BaseScrollComponent, selector: "[baseScrollComponent]", usesInheritance: true, ngImport: i0 });
|
|
704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: BaseScrollComponent, decorators: [{
|
|
705
|
+
type: Directive,
|
|
706
|
+
args: [{
|
|
707
|
+
selector: '[baseScrollComponent]'
|
|
708
|
+
}]
|
|
709
|
+
}], ctorParameters: function () { return [{ type: Object }, { type: i1$1.Router }]; } });
|
|
710
|
+
|
|
647
711
|
class MECXDynamicFileUploadComponent {
|
|
648
712
|
constructor(cdr) {
|
|
649
713
|
this.cdr = cdr;
|
|
@@ -675,7 +739,7 @@ class MECXDynamicFileUploadComponent {
|
|
|
675
739
|
}
|
|
676
740
|
}
|
|
677
741
|
MECXDynamicFileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicFileUploadComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
678
|
-
MECXDynamicFileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicFileUploadComponent, selector: "mecx-dynamic-file-upload", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, usesOnChanges: true, ngImport: i0, template: "<monkey-file-upload\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [icon]=\"_field?.icon\" [formControl]=\"_form.controls[_field?.name]\"\n [placeholder]=\"_field?.placeholder | translate\"\n [helperMessage]=\"_field?.helperMessage | translate\" [label]=\"_field?.label | translate\"\n [maxSize]=\"_field?.maxSize || 5242880\" [fileUpload]=\"_function\"\n [maxSizeErrorMessage]=\"'FIELD.FILE.MAX-FILE' | translate\"\n [allowedExtensionErrorMessage]=\"'FIELD.FILE.ALLOWED-EXTENSION' | translate\"\n [allowedExtensions]=\"_field?.allowedExtensions || []\" *ngIf=\"_field\">\n</monkey-file-upload>", components: [{ type: i1$
|
|
742
|
+
MECXDynamicFileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicFileUploadComponent, selector: "mecx-dynamic-file-upload", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, usesOnChanges: true, ngImport: i0, template: "<monkey-file-upload\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [icon]=\"_field?.icon\" [formControl]=\"_form.controls[_field?.name]\"\n [placeholder]=\"_field?.placeholder | translate\"\n [helperMessage]=\"_field?.helperMessage | translate\" [label]=\"_field?.label | translate\"\n [maxSize]=\"_field?.maxSize || 5242880\" [fileUpload]=\"_function\"\n [maxSizeErrorMessage]=\"'FIELD.FILE.MAX-FILE' | translate\"\n [allowedExtensionErrorMessage]=\"'FIELD.FILE.ALLOWED-EXTENSION' | translate\"\n [allowedExtensions]=\"_field?.allowedExtensions || []\" *ngIf=\"_field\">\n</monkey-file-upload>", components: [{ type: i1$2.MonkeyFileUploadComponent, selector: "monkey-file-upload", inputs: ["name", "label", "helperMessage", "placeholder", "icon", "infoMessage", "uploadOngoingMessage", "errorMessage", "listenFiles", "maxSize", "allowedExtensions", "maxSizeErrorMessage", "allowedExtensionErrorMessage", "fileUpload", "value"], outputs: ["onChange", "onHandleFilesReady"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
679
743
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicFileUploadComponent, decorators: [{
|
|
680
744
|
type: Component,
|
|
681
745
|
args: [{ selector: 'mecx-dynamic-file-upload', encapsulation: ViewEncapsulation.None, template: "<monkey-file-upload\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [icon]=\"_field?.icon\" [formControl]=\"_form.controls[_field?.name]\"\n [placeholder]=\"_field?.placeholder | translate\"\n [helperMessage]=\"_field?.helperMessage | translate\" [label]=\"_field?.label | translate\"\n [maxSize]=\"_field?.maxSize || 5242880\" [fileUpload]=\"_function\"\n [maxSizeErrorMessage]=\"'FIELD.FILE.MAX-FILE' | translate\"\n [allowedExtensionErrorMessage]=\"'FIELD.FILE.ALLOWED-EXTENSION' | translate\"\n [allowedExtensions]=\"_field?.allowedExtensions || []\" *ngIf=\"_field\">\n</monkey-file-upload>" }]
|
|
@@ -725,7 +789,7 @@ class MECXDynamicButtonComponent {
|
|
|
725
789
|
}
|
|
726
790
|
}
|
|
727
791
|
MECXDynamicButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicButtonComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
728
|
-
MECXDynamicButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicButtonComponent, selector: "mecx-dynamic-button", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, usesOnChanges: true, ngImport: i0, template: "<monkey-button [icon]=\"_field?.icon\" [type]=\"_field?.type\" [color]=\"_field?.color\"\n (click)=\"onClick()\">\n {{ _field?.label | translate }}\n</monkey-button>", styles: ["mecx-dynamic-button monkey-button button{height:40px}\n"], components: [{ type: i1$
|
|
792
|
+
MECXDynamicButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicButtonComponent, selector: "mecx-dynamic-button", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, usesOnChanges: true, ngImport: i0, template: "<monkey-button [icon]=\"_field?.icon\" [type]=\"_field?.type\" [color]=\"_field?.color\"\n (click)=\"onClick()\">\n {{ _field?.label | translate }}\n</monkey-button>", styles: ["mecx-dynamic-button monkey-button button{height:40px}\n"], components: [{ type: i1$2.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
729
793
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicButtonComponent, decorators: [{
|
|
730
794
|
type: Component,
|
|
731
795
|
args: [{ selector: 'mecx-dynamic-button', encapsulation: ViewEncapsulation.None, template: "<monkey-button [icon]=\"_field?.icon\" [type]=\"_field?.type\" [color]=\"_field?.color\"\n (click)=\"onClick()\">\n {{ _field?.label | translate }}\n</monkey-button>", styles: ["mecx-dynamic-button monkey-button button{height:40px}\n"] }]
|
|
@@ -782,7 +846,7 @@ class MECXDynamicInputComponent {
|
|
|
782
846
|
}
|
|
783
847
|
}
|
|
784
848
|
MECXDynamicInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
785
|
-
MECXDynamicInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicInputComponent, selector: "mecx-dynamic-input", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<monkey-input\r\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\r\n [mask]=\"_field?.mask\" [prefix]=\"_field?.prefix\" [name]=\"_field?.name\"\r\n [formControl]=\"_form.controls[_field?.name]\" [placeholder]=\"_field?.placeholder | translate\"\r\n [helperMessage]=\"_field?.helperMessage | translate\" [label]=\"_field?.label | translate\"\r\n [type]=\"_field?.type\" #inputElement (onChange)=\"onChange($event)\"\r\n [onlyNumber]=\"_field?.onlyNumber\" [currency]=\"_field?.currency\" [maxLength]=\"_field?.maxLength\"\r\n [maxDateToday]=\"_field?.maxDateToday\">\r\n</monkey-input>", components: [{ type: i1$
|
|
849
|
+
MECXDynamicInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicInputComponent, selector: "mecx-dynamic-input", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<monkey-input\r\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\r\n [mask]=\"_field?.mask\" [prefix]=\"_field?.prefix\" [name]=\"_field?.name\"\r\n [formControl]=\"_form.controls[_field?.name]\" [placeholder]=\"_field?.placeholder | translate\"\r\n [helperMessage]=\"_field?.helperMessage | translate\" [label]=\"_field?.label | translate\"\r\n [type]=\"_field?.type\" #inputElement (onChange)=\"onChange($event)\"\r\n [onlyNumber]=\"_field?.onlyNumber\" [currency]=\"_field?.currency\" [maxLength]=\"_field?.maxLength\"\r\n [maxDateToday]=\"_field?.maxDateToday\">\r\n</monkey-input>", components: [{ type: i1$2.MonkeyInputComponent, selector: "monkey-input", inputs: ["name", "label", "helperMessage", "placeholder", "icon", "type", "infoMessage", "errorMessage", "mask", "prefix", "maxLength", "onlyNumber", "onlyAlphaNumeric", "upperCase", "lowerCase", "capitalize", "currency", "percent", "maxDateToday", "value"], outputs: ["onChange"] }], directives: [{ type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
786
850
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicInputComponent, decorators: [{
|
|
787
851
|
type: Component,
|
|
788
852
|
args: [{ selector: 'mecx-dynamic-input', encapsulation: ViewEncapsulation.None, template: "<monkey-input\r\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\r\n [mask]=\"_field?.mask\" [prefix]=\"_field?.prefix\" [name]=\"_field?.name\"\r\n [formControl]=\"_form.controls[_field?.name]\" [placeholder]=\"_field?.placeholder | translate\"\r\n [helperMessage]=\"_field?.helperMessage | translate\" [label]=\"_field?.label | translate\"\r\n [type]=\"_field?.type\" #inputElement (onChange)=\"onChange($event)\"\r\n [onlyNumber]=\"_field?.onlyNumber\" [currency]=\"_field?.currency\" [maxLength]=\"_field?.maxLength\"\r\n [maxDateToday]=\"_field?.maxDateToday\">\r\n</monkey-input>" }]
|
|
@@ -844,7 +908,7 @@ class MECXDynamicInputPhoneComponent {
|
|
|
844
908
|
}
|
|
845
909
|
}
|
|
846
910
|
MECXDynamicInputPhoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicInputPhoneComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
847
|
-
MECXDynamicInputPhoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicInputPhoneComponent, selector: "mecx-dynamic-input-phone", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<monkey-input-phone [name]=\"_field?.name\" [label]=\"_field?.label | translate\"\r\n [helperMessage]=\"_field?.helperMessage | translate\"\r\n [placeholder]=\"_field?.placeholder | translate\" [icon]=\"_field?.icon\"\r\n (onChange)=\"onChange($event)\" [internationalNumber]=\"_field?.internationalNumber\"\r\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\r\n [maxLength]=\"_field?.maxLength\" [formControl]=\"_form.controls[_field?.name]\" #inputElement>\r\n</monkey-input-phone>", components: [{ type: i1$
|
|
911
|
+
MECXDynamicInputPhoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicInputPhoneComponent, selector: "mecx-dynamic-input-phone", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<monkey-input-phone [name]=\"_field?.name\" [label]=\"_field?.label | translate\"\r\n [helperMessage]=\"_field?.helperMessage | translate\"\r\n [placeholder]=\"_field?.placeholder | translate\" [icon]=\"_field?.icon\"\r\n (onChange)=\"onChange($event)\" [internationalNumber]=\"_field?.internationalNumber\"\r\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\r\n [maxLength]=\"_field?.maxLength\" [formControl]=\"_form.controls[_field?.name]\" #inputElement>\r\n</monkey-input-phone>", components: [{ type: i1$2.MonkeyInputPhoneComponent, selector: "monkey-input-phone", inputs: ["name", "label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "maxLength", "internationalNumber", "value"], outputs: ["onChange"] }], directives: [{ type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
848
912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicInputPhoneComponent, decorators: [{
|
|
849
913
|
type: Component,
|
|
850
914
|
args: [{ selector: 'mecx-dynamic-input-phone', encapsulation: ViewEncapsulation.None, template: "<monkey-input-phone [name]=\"_field?.name\" [label]=\"_field?.label | translate\"\r\n [helperMessage]=\"_field?.helperMessage | translate\"\r\n [placeholder]=\"_field?.placeholder | translate\" [icon]=\"_field?.icon\"\r\n (onChange)=\"onChange($event)\" [internationalNumber]=\"_field?.internationalNumber\"\r\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\r\n [maxLength]=\"_field?.maxLength\" [formControl]=\"_form.controls[_field?.name]\" #inputElement>\r\n</monkey-input-phone>" }]
|
|
@@ -879,7 +943,7 @@ class MECXDynamicRadioComponent {
|
|
|
879
943
|
}
|
|
880
944
|
}
|
|
881
945
|
MECXDynamicRadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
882
|
-
MECXDynamicRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicRadioComponent, selector: "mecx-dynamic-radio", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<monkey-radiobutton\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\">\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-radiobutton>", components: [{ type: i1$
|
|
946
|
+
MECXDynamicRadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicRadioComponent, selector: "mecx-dynamic-radio", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<monkey-radiobutton\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\">\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-radiobutton>", components: [{ type: i1$2.MonkeyRadioButtonComponent, selector: "monkey-radiobutton", inputs: ["label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "value"], outputs: ["onChange"] }, { type: i1$2.MonkeyOptionComponent, selector: "monkey-option", inputs: ["type", "label", "value", "selectAll", "selected", "enableClick"], outputs: ["onSelectOption"] }], directives: [{ type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
883
947
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicRadioComponent, decorators: [{
|
|
884
948
|
type: Component,
|
|
885
949
|
args: [{ selector: 'mecx-dynamic-radio', encapsulation: ViewEncapsulation.None, template: "<monkey-radiobutton\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\">\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-radiobutton>" }]
|
|
@@ -955,7 +1019,7 @@ class MECXDynamicSelectComponent {
|
|
|
955
1019
|
}
|
|
956
1020
|
}
|
|
957
1021
|
MECXDynamicSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
958
|
-
MECXDynamicSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicSelectComponent, selector: "mecx-dynamic-select", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<monkey-select\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\" (click)=\"onHandleGenericLoad()\"\n [onHandleOptions]=\"_onHandleOptions\" (onChange)=\"onChange($event)\"\n [labelSelect]=\"_form.get(_field?.name).value || ('FIELD.SELECT' | translate)\"\n [placeholder]=\"_field?.placeholder | translate\">\n <monkey-option [label]=\"'FIELD.LOADING' | translate\" *ngIf=\"!_field?.value?.length\"\n enableClick=\"false\">\n </monkey-option>\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-select>", components: [{ type: i1$
|
|
1022
|
+
MECXDynamicSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicSelectComponent, selector: "mecx-dynamic-select", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<monkey-select\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\" (click)=\"onHandleGenericLoad()\"\n [onHandleOptions]=\"_onHandleOptions\" (onChange)=\"onChange($event)\"\n [labelSelect]=\"_form.get(_field?.name).value || ('FIELD.SELECT' | translate)\"\n [placeholder]=\"_field?.placeholder | translate\">\n <monkey-option [label]=\"'FIELD.LOADING' | translate\" *ngIf=\"!_field?.value?.length\"\n enableClick=\"false\">\n </monkey-option>\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-select>", components: [{ type: i1$2.MonkeySelectComponent, selector: "monkey-select", inputs: ["label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "labelSelect", "onHandleOptions", "value"], outputs: ["onChange"] }, { type: i1$2.MonkeyOptionComponent, selector: "monkey-option", inputs: ["type", "label", "value", "selectAll", "selected", "enableClick"], outputs: ["onSelectOption"] }], directives: [{ type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
959
1023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicSelectComponent, decorators: [{
|
|
960
1024
|
type: Component,
|
|
961
1025
|
args: [{ selector: 'mecx-dynamic-select', encapsulation: ViewEncapsulation.None, template: "<monkey-select\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\" (click)=\"onHandleGenericLoad()\"\n [onHandleOptions]=\"_onHandleOptions\" (onChange)=\"onChange($event)\"\n [labelSelect]=\"_form.get(_field?.name).value || ('FIELD.SELECT' | translate)\"\n [placeholder]=\"_field?.placeholder | translate\">\n <monkey-option [label]=\"'FIELD.LOADING' | translate\" *ngIf=\"!_field?.value?.length\"\n enableClick=\"false\">\n </monkey-option>\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-select>" }]
|
|
@@ -1033,7 +1097,7 @@ class MECXDynamicSelectSearchComponent {
|
|
|
1033
1097
|
}
|
|
1034
1098
|
}
|
|
1035
1099
|
MECXDynamicSelectSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicSelectSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1036
|
-
MECXDynamicSelectSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicSelectSearchComponent, selector: "mecx-dynamic-select-search", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<monkey-select-search\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\" (click)=\"onHandleGenericLoad()\"\n [onHandleOptions]=\"_onHandleOptions\" (onChange)=\"onChange($event)\"\n [fieldToCompare]=\"_field?.fieldToCompare\"\n [labelSelect]=\"_form.get(_field?.name).value || ('FIELD.SELECT' | translate)\"\n [placeholder]=\"_field?.placeholder | translate\">\n <monkey-option [label]=\"'FIELD.LOADING' | translate\" *ngIf=\"!_field?.value?.length\"\n enableClick=\"false\">\n </monkey-option>\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-select-search>", components: [{ type: i1$
|
|
1100
|
+
MECXDynamicSelectSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicSelectSearchComponent, selector: "mecx-dynamic-select-search", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "<monkey-select-search\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\" (click)=\"onHandleGenericLoad()\"\n [onHandleOptions]=\"_onHandleOptions\" (onChange)=\"onChange($event)\"\n [fieldToCompare]=\"_field?.fieldToCompare\"\n [labelSelect]=\"_form.get(_field?.name).value || ('FIELD.SELECT' | translate)\"\n [placeholder]=\"_field?.placeholder | translate\">\n <monkey-option [label]=\"'FIELD.LOADING' | translate\" *ngIf=\"!_field?.value?.length\"\n enableClick=\"false\">\n </monkey-option>\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-select-search>", components: [{ type: i1$2.MonkeySelectSearchComponent, selector: "monkey-select-search", inputs: ["label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "labelSelect", "fieldToCompare", "onHandleOptions", "value"], outputs: ["onChange", "onSearch"] }, { type: i1$2.MonkeyOptionComponent, selector: "monkey-option", inputs: ["type", "label", "value", "selectAll", "selected", "enableClick"], outputs: ["onSelectOption"] }], directives: [{ type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
1037
1101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicSelectSearchComponent, decorators: [{
|
|
1038
1102
|
type: Component,
|
|
1039
1103
|
args: [{ selector: 'mecx-dynamic-select-search', encapsulation: ViewEncapsulation.None, template: "<monkey-select-search\n errorMessage=\"{{ _formErrors[_field?.name]?.firstMessage | translate }} {{ _formErrors[_field?.name]?.lastMessage }}\"\n [formControl]=\"_form.controls[_field?.name]\" [helperMessage]=\"_field?.helperMessage | translate\"\n [label]=\"_field?.label | translate\" (click)=\"onHandleGenericLoad()\"\n [onHandleOptions]=\"_onHandleOptions\" (onChange)=\"onChange($event)\"\n [fieldToCompare]=\"_field?.fieldToCompare\"\n [labelSelect]=\"_form.get(_field?.name).value || ('FIELD.SELECT' | translate)\"\n [placeholder]=\"_field?.placeholder | translate\">\n <monkey-option [label]=\"'FIELD.LOADING' | translate\" *ngIf=\"!_field?.value?.length\"\n enableClick=\"false\">\n </monkey-option>\n <monkey-option *ngFor=\"let value of _field?.value\" [label]=\"value.description | translate\"\n [value]=\"value.value\">\n </monkey-option>\n</monkey-select-search>" }]
|
|
@@ -1235,7 +1299,7 @@ class MECXDynamicFormArrayComponent extends BaseDynamicArray {
|
|
|
1235
1299
|
}
|
|
1236
1300
|
}
|
|
1237
1301
|
MECXDynamicFormArrayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicFormArrayComponent, deps: [{ token: i1.FormBuilder }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1238
|
-
MECXDynamicFormArrayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicFormArrayComponent, selector: "mecx-dynamic-form-array", usesInheritance: true, ngImport: i0, template: "<form name=\"form\" [formGroup]=\"_form\" *ngIf=\"_form\">\n <div formArrayName=\"fields\">\n <div *ngFor=\"let item of formValues.controls; let indForm=index\" [formGroupName]=\"indForm\">\n <monkey-button type=\"secondary\" color=\"error\" icon=\"close-20\" iconPosition=\"right\"\n [label]=\"'BUTTONS.REMOVE' | translate\" (click)=\"onHandleRemove(indForm)\"\n *ngIf=\"formValues.controls.length > 1 && !disabled\">\n </monkey-button>\n <div class=\"row mt-3\">\n <div *ngFor=\"let field of fields;\" MECXDynamic [field]=\"field\" [form]=\"item\" [self]=\"self\"\n [formErrors]=\"__monkeyecxFormErrors[indForm]\"\n [plusValidations]=\"_plusValidations[indForm]\" [style.display]=\"'none'\">\n </div>\n </div>\n </div>\n </div>\n</form>\n<monkey-button type=\"secondary\" color=\"theme\" icon=\"more-20\" iconPosition=\"right\"\n [label]=\"'BUTTONS.ADD' | translate\" (click)=\"onHandleAdd()\" *ngIf=\"!disabled\">\n</monkey-button>", styles: ["mecx-dynamic-form-array monkey-button{width:100%}mecx-dynamic-form-array monkey-button button{width:100%;height:40px}\n"], components: [{ type: i1$
|
|
1302
|
+
MECXDynamicFormArrayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXDynamicFormArrayComponent, selector: "mecx-dynamic-form-array", usesInheritance: true, ngImport: i0, template: "<form name=\"form\" [formGroup]=\"_form\" *ngIf=\"_form\">\n <div formArrayName=\"fields\">\n <div *ngFor=\"let item of formValues.controls; let indForm=index\" [formGroupName]=\"indForm\">\n <monkey-button type=\"secondary\" color=\"error\" icon=\"close-20\" iconPosition=\"right\"\n [label]=\"'BUTTONS.REMOVE' | translate\" (click)=\"onHandleRemove(indForm)\"\n *ngIf=\"formValues.controls.length > 1 && !disabled\">\n </monkey-button>\n <div class=\"row mt-3\">\n <div *ngFor=\"let field of fields;\" MECXDynamic [field]=\"field\" [form]=\"item\" [self]=\"self\"\n [formErrors]=\"__monkeyecxFormErrors[indForm]\"\n [plusValidations]=\"_plusValidations[indForm]\" [style.display]=\"'none'\">\n </div>\n </div>\n </div>\n </div>\n</form>\n<monkey-button type=\"secondary\" color=\"theme\" icon=\"more-20\" iconPosition=\"right\"\n [label]=\"'BUTTONS.ADD' | translate\" (click)=\"onHandleAdd()\" *ngIf=\"!disabled\">\n</monkey-button>", styles: ["mecx-dynamic-form-array monkey-button{width:100%}mecx-dynamic-form-array monkey-button button{width:100%;height:40px}\n"], components: [{ type: i1$2.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: MECXDynamicDirective, selector: "[MECXDynamic]", inputs: ["field", "form", "formErrors", "self", "plusValidations"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
1239
1303
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXDynamicFormArrayComponent, decorators: [{
|
|
1240
1304
|
type: Component,
|
|
1241
1305
|
args: [{ selector: 'mecx-dynamic-form-array', encapsulation: ViewEncapsulation.None, template: "<form name=\"form\" [formGroup]=\"_form\" *ngIf=\"_form\">\n <div formArrayName=\"fields\">\n <div *ngFor=\"let item of formValues.controls; let indForm=index\" [formGroupName]=\"indForm\">\n <monkey-button type=\"secondary\" color=\"error\" icon=\"close-20\" iconPosition=\"right\"\n [label]=\"'BUTTONS.REMOVE' | translate\" (click)=\"onHandleRemove(indForm)\"\n *ngIf=\"formValues.controls.length > 1 && !disabled\">\n </monkey-button>\n <div class=\"row mt-3\">\n <div *ngFor=\"let field of fields;\" MECXDynamic [field]=\"field\" [form]=\"item\" [self]=\"self\"\n [formErrors]=\"__monkeyecxFormErrors[indForm]\"\n [plusValidations]=\"_plusValidations[indForm]\" [style.display]=\"'none'\">\n </div>\n </div>\n </div>\n </div>\n</form>\n<monkey-button type=\"secondary\" color=\"theme\" icon=\"more-20\" iconPosition=\"right\"\n [label]=\"'BUTTONS.ADD' | translate\" (click)=\"onHandleAdd()\" *ngIf=\"!disabled\">\n</monkey-button>", styles: ["mecx-dynamic-form-array monkey-button{width:100%}mecx-dynamic-form-array monkey-button button{width:100%;height:40px}\n"] }]
|
|
@@ -1376,12 +1440,12 @@ class MECXPasswordStrengthComponent {
|
|
|
1376
1440
|
this.onHandleChages();
|
|
1377
1441
|
}
|
|
1378
1442
|
}
|
|
1379
|
-
MECXPasswordStrengthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXPasswordStrengthComponent, deps: [{ token: i1$
|
|
1380
|
-
MECXPasswordStrengthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXPasswordStrengthComponent, selector: "mecx-password-strength", inputs: { passwordToCheck: "passwordToCheck" }, outputs: { onHandleSubmitReady: "onHandleSubmitReady" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"_validatorsPasswordPass?.length\">\n <div id=\"strength\" class=\"d-flex full-width flex-column justify-content-center align-items-center\"\n #strength>\n <div id=\"strengthBar\" class=\"strength-bar d-flex full-width flex-row\">\n <div class=\"d-flex full-width align-items-center\">\n <div class=\"bar-label\">\n <small>{{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.TITLE' | translate }}</small>\n </div>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.error]=\"_stepPassword === 0\" [class.warning]=\"_stepPassword === 1\"\n [class.success]=\"_stepPassword === 2\">\n </div>\n <ng-container *ngIf=\"_stepPassword === 0\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.warning]=\"_stepPassword === 1\"\n [class.success]=\"_stepPassword === 2\"></div>\n <ng-container *ngIf=\"_stepPassword === 1\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.success]=\"_stepPassword === 2\"></div>\n <ng-container *ngIf=\"_stepPassword === 2\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"callbacks mt-2 row\">\n <div class=\"col-sm-6 mt-2 d-flex justify-content-start\"\n *ngFor=\"let validators of _validatorsPasswordPass\">\n <monkey-icon *ngIf=\"validators.validate\" icon=\"check-circle-20\"></monkey-icon>\n <monkey-icon *ngIf=\"!validators.validate\" icon=\"error-20\"></monkey-icon>\n <span class=\"ml-2\">\n {{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.TYPES.' + validators.regex | translate }}\n </span>\n </div>\n </div>\n</ng-container>\n<ng-template #stepPasswordLabel>\n <div class=\"name-point mt-1\" [class.error]=\"_stepPassword === 0\"\n [class.warning]=\"_stepPassword === 1\" [class.success]=\"_stepPassword === 2\">\n {{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.LABELS.' + _stepPassword | translate }}\n </div>\n</ng-template>", styles: ["mecx-password-strength{margin-bottom:8px}mecx-password-strength .strength-bar{display:inline;list-style:none;padding:0;vertical-align:2px;gap:.5rem}mecx-password-strength .strength-bar .bar-label{font-style:normal;font-weight:400;font-size:14px;line-height:16px;color:#4b4a53}mecx-password-strength .strength-bar .point:last-child{margin:0}mecx-password-strength .callbacks{font-style:normal;font-weight:400;font-size:14px;line-height:16px;color:#72717e}mecx-password-strength .point{background:#ebebeb;border-radius:8px;display:inline-block;height:8px;margin-right:4px;width:100%}mecx-password-strength .point.success{background:var(--mecx-color-success-main)}mecx-password-strength .point.warning{background:var(--mecx-color-warning-main)}mecx-password-strength .point.error{background:var(--mecx-color-error-main)}mecx-password-strength .name-point.success{color:var(--mecx-color-success-main)}mecx-password-strength .name-point.warning{color:var(--mecx-color-warning-main)}mecx-password-strength .name-point.error{color:var(--mecx-color-error-main)}\n"], components: [{ type: i1$
|
|
1443
|
+
MECXPasswordStrengthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXPasswordStrengthComponent, deps: [{ token: i1$3.MonkeyEcxConfigService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1444
|
+
MECXPasswordStrengthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MECXPasswordStrengthComponent, selector: "mecx-password-strength", inputs: { passwordToCheck: "passwordToCheck" }, outputs: { onHandleSubmitReady: "onHandleSubmitReady" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"_validatorsPasswordPass?.length\">\n <div id=\"strength\" class=\"d-flex full-width flex-column justify-content-center align-items-center\"\n #strength>\n <div id=\"strengthBar\" class=\"strength-bar d-flex full-width flex-row\">\n <div class=\"d-flex full-width align-items-center\">\n <div class=\"bar-label\">\n <small>{{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.TITLE' | translate }}</small>\n </div>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.error]=\"_stepPassword === 0\" [class.warning]=\"_stepPassword === 1\"\n [class.success]=\"_stepPassword === 2\">\n </div>\n <ng-container *ngIf=\"_stepPassword === 0\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.warning]=\"_stepPassword === 1\"\n [class.success]=\"_stepPassword === 2\"></div>\n <ng-container *ngIf=\"_stepPassword === 1\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.success]=\"_stepPassword === 2\"></div>\n <ng-container *ngIf=\"_stepPassword === 2\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"callbacks mt-2 row\">\n <div class=\"col-sm-6 mt-2 d-flex justify-content-start\"\n *ngFor=\"let validators of _validatorsPasswordPass\">\n <monkey-icon *ngIf=\"validators.validate\" icon=\"check-circle-20\"></monkey-icon>\n <monkey-icon *ngIf=\"!validators.validate\" icon=\"error-20\"></monkey-icon>\n <span class=\"ml-2\">\n {{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.TYPES.' + validators.regex | translate }}\n </span>\n </div>\n </div>\n</ng-container>\n<ng-template #stepPasswordLabel>\n <div class=\"name-point mt-1\" [class.error]=\"_stepPassword === 0\"\n [class.warning]=\"_stepPassword === 1\" [class.success]=\"_stepPassword === 2\">\n {{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.LABELS.' + _stepPassword | translate }}\n </div>\n</ng-template>", styles: ["mecx-password-strength{margin-bottom:8px}mecx-password-strength .strength-bar{display:inline;list-style:none;padding:0;vertical-align:2px;gap:.5rem}mecx-password-strength .strength-bar .bar-label{font-style:normal;font-weight:400;font-size:14px;line-height:16px;color:#4b4a53}mecx-password-strength .strength-bar .point:last-child{margin:0}mecx-password-strength .callbacks{font-style:normal;font-weight:400;font-size:14px;line-height:16px;color:#72717e}mecx-password-strength .point{background:#ebebeb;border-radius:8px;display:inline-block;height:8px;margin-right:4px;width:100%}mecx-password-strength .point.success{background:var(--mecx-color-success-main)}mecx-password-strength .point.warning{background:var(--mecx-color-warning-main)}mecx-password-strength .point.error{background:var(--mecx-color-error-main)}mecx-password-strength .name-point.success{color:var(--mecx-color-success-main)}mecx-password-strength .name-point.warning{color:var(--mecx-color-warning-main)}mecx-password-strength .name-point.error{color:var(--mecx-color-error-main)}\n"], components: [{ type: i1$2.MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "color", "contrast", "disabled"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
1381
1445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXPasswordStrengthComponent, decorators: [{
|
|
1382
1446
|
type: Component,
|
|
1383
1447
|
args: [{ selector: 'mecx-password-strength', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"_validatorsPasswordPass?.length\">\n <div id=\"strength\" class=\"d-flex full-width flex-column justify-content-center align-items-center\"\n #strength>\n <div id=\"strengthBar\" class=\"strength-bar d-flex full-width flex-row\">\n <div class=\"d-flex full-width align-items-center\">\n <div class=\"bar-label\">\n <small>{{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.TITLE' | translate }}</small>\n </div>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.error]=\"_stepPassword === 0\" [class.warning]=\"_stepPassword === 1\"\n [class.success]=\"_stepPassword === 2\">\n </div>\n <ng-container *ngIf=\"_stepPassword === 0\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.warning]=\"_stepPassword === 1\"\n [class.success]=\"_stepPassword === 2\"></div>\n <ng-container *ngIf=\"_stepPassword === 1\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n <div class=\"d-flex full-width align-items-center flex-column\">\n <div class=\"point\" [class.success]=\"_stepPassword === 2\"></div>\n <ng-container *ngIf=\"_stepPassword === 2\">\n <ng-container *ngTemplateOutlet=\"stepPasswordLabel\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"callbacks mt-2 row\">\n <div class=\"col-sm-6 mt-2 d-flex justify-content-start\"\n *ngFor=\"let validators of _validatorsPasswordPass\">\n <monkey-icon *ngIf=\"validators.validate\" icon=\"check-circle-20\"></monkey-icon>\n <monkey-icon *ngIf=\"!validators.validate\" icon=\"error-20\"></monkey-icon>\n <span class=\"ml-2\">\n {{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.TYPES.' + validators.regex | translate }}\n </span>\n </div>\n </div>\n</ng-container>\n<ng-template #stepPasswordLabel>\n <div class=\"name-point mt-1\" [class.error]=\"_stepPassword === 0\"\n [class.warning]=\"_stepPassword === 1\" [class.success]=\"_stepPassword === 2\">\n {{ 'SCREENS.LOGIN.REGISTER.PASSWORD-STRENGTH.LABELS.' + _stepPassword | translate }}\n </div>\n</ng-template>", styles: ["mecx-password-strength{margin-bottom:8px}mecx-password-strength .strength-bar{display:inline;list-style:none;padding:0;vertical-align:2px;gap:.5rem}mecx-password-strength .strength-bar .bar-label{font-style:normal;font-weight:400;font-size:14px;line-height:16px;color:#4b4a53}mecx-password-strength .strength-bar .point:last-child{margin:0}mecx-password-strength .callbacks{font-style:normal;font-weight:400;font-size:14px;line-height:16px;color:#72717e}mecx-password-strength .point{background:#ebebeb;border-radius:8px;display:inline-block;height:8px;margin-right:4px;width:100%}mecx-password-strength .point.success{background:var(--mecx-color-success-main)}mecx-password-strength .point.warning{background:var(--mecx-color-warning-main)}mecx-password-strength .point.error{background:var(--mecx-color-error-main)}mecx-password-strength .name-point.success{color:var(--mecx-color-success-main)}mecx-password-strength .name-point.warning{color:var(--mecx-color-warning-main)}mecx-password-strength .name-point.error{color:var(--mecx-color-error-main)}\n"] }]
|
|
1384
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1448
|
+
}], ctorParameters: function () { return [{ type: i1$3.MonkeyEcxConfigService }]; }, propDecorators: { passwordToCheck: [{
|
|
1385
1449
|
type: Input
|
|
1386
1450
|
}], onHandleSubmitReady: [{
|
|
1387
1451
|
type: Output
|
|
@@ -1462,14 +1526,14 @@ class MECXProgressBarService {
|
|
|
1462
1526
|
return this.visible.asObservable();
|
|
1463
1527
|
}
|
|
1464
1528
|
}
|
|
1465
|
-
MECXProgressBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXProgressBarService, deps: [{ token: i1$
|
|
1529
|
+
MECXProgressBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXProgressBarService, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1466
1530
|
MECXProgressBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXProgressBarService, providedIn: 'root' });
|
|
1467
1531
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MECXProgressBarService, decorators: [{
|
|
1468
1532
|
type: Injectable,
|
|
1469
1533
|
args: [{
|
|
1470
1534
|
providedIn: 'root'
|
|
1471
1535
|
}]
|
|
1472
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1536
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; } });
|
|
1473
1537
|
|
|
1474
1538
|
class MECXProgressBarComponent extends BaseComponent {
|
|
1475
1539
|
constructor(progressBarService) {
|
|
@@ -1515,5 +1579,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
1515
1579
|
* Generated bundle index. Do not edit.
|
|
1516
1580
|
*/
|
|
1517
1581
|
|
|
1518
|
-
export { BaseComponent, BaseDynamic, BaseDynamicArray, MECXDynamicDirective, MECXDynamicFileUploadComponent, MECXDynamicFormArrayComponent, MECXDynamicFormComponent, MECXDynamicInputComponent, MECXDynamicInputPhoneComponent, MECXDynamicModule, MECXDynamicRadioComponent, MECXDynamicSelectComponent, MECXPasswordStrengthComponent, MECXPasswordStrengthModule, MECXProgressBarComponent, MECXProgressBarModule, MECXProgressBarService, validators };
|
|
1582
|
+
export { BaseComponent, BaseDynamic, BaseDynamicArray, BaseScrollComponent, MECXDynamicDirective, MECXDynamicFileUploadComponent, MECXDynamicFormArrayComponent, MECXDynamicFormComponent, MECXDynamicInputComponent, MECXDynamicInputPhoneComponent, MECXDynamicModule, MECXDynamicRadioComponent, MECXDynamicSelectComponent, MECXPasswordStrengthComponent, MECXPasswordStrengthModule, MECXProgressBarComponent, MECXProgressBarModule, MECXProgressBarService, validators };
|
|
1519
1583
|
//# sourceMappingURL=monkey-front-components.mjs.map
|