monkey-front-components 0.0.176 → 0.0.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/monkey-front-components.umd.js +253 -76
- package/bundles/monkey-front-components.umd.js.map +1 -1
- package/esm2015/lib/components/base/base-component.js +49 -9
- package/esm2015/lib/components/base/base-dynamic-array.js +3 -3
- package/esm2015/lib/components/base/base-dynamic.js +3 -3
- package/esm2015/lib/components/dynamic/button/button.component.js +3 -3
- package/esm2015/lib/components/dynamic/dynamic-directive.js +3 -3
- package/esm2015/lib/components/dynamic/dynamic.module.js +4 -4
- package/esm2015/lib/components/dynamic/file-upload/file-upload.component.js +3 -3
- package/esm2015/lib/components/dynamic/form/dynamic-form-array.component.js +3 -3
- package/esm2015/lib/components/dynamic/form/dynamic-form.component.js +3 -3
- package/esm2015/lib/components/dynamic/input/input.component.js +3 -3
- package/esm2015/lib/components/dynamic/input-phone/input-phone.component.js +3 -3
- package/esm2015/lib/components/dynamic/radio/radio.component.js +3 -3
- package/esm2015/lib/components/dynamic/select/select.component.js +3 -3
- package/esm2015/lib/components/dynamic/select-search/select-search.component.js +3 -3
- package/esm2015/lib/components/index.js +2 -1
- package/esm2015/lib/components/shared/index.js +2 -0
- package/esm2015/lib/components/shared/password-strength/index.js +3 -0
- package/esm2015/lib/components/shared/password-strength/password-strength.component.js +89 -0
- package/esm2015/lib/components/shared/password-strength/password-strength.js +2 -0
- package/esm2015/lib/components/shared/password-strength/password-strength.module.js +50 -0
- package/fesm2015/monkey-front-components.js +217 -53
- package/fesm2015/monkey-front-components.js.map +1 -1
- package/lib/components/base/base-component.d.ts +16 -3
- package/lib/components/index.d.ts +1 -0
- package/lib/components/shared/index.d.ts +1 -0
- package/lib/components/shared/password-strength/index.d.ts +2 -0
- package/lib/components/shared/password-strength/password-strength.component.d.ts +22 -0
- package/lib/components/shared/password-strength/password-strength.d.ts +5 -0
- package/lib/components/shared/password-strength/password-strength.module.d.ts +12 -0
- package/monkey-front-components-0.0.180.tgz +0 -0
- package/package.json +2 -2
- package/monkey-front-components-0.0.176.tgz +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('@angular/core'), require('rxjs/operators'), require('monkey-style-guide'), require('monkey-front-core'), require('@angular/forms'), require('@ngx-translate/core'), require('@angular/common')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('monkey-front-components', ['exports', 'rxjs', '@angular/core', 'rxjs/operators', 'monkey-style-guide', 'monkey-front-core', '@angular/forms', '@ngx-translate/core', '@angular/common'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["monkey-front-components"] = {}, global.rxjs, global.ng.core, global.rxjs.operators, global["monkey-style-guide"], global["monkey-front-core"], global.ng.forms, global["@ngx-translate/core"], global.ng.common));
|
|
5
|
-
})(this, (function (exports, rxjs, i0, operators, i1,
|
|
5
|
+
})(this, (function (exports, rxjs, i0, operators, i1, i1$1, i1$2, i4, i3) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
26
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
|
|
27
|
+
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
28
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1$2);
|
|
29
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
28
30
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
30
31
|
|
|
31
32
|
/*! *****************************************************************************
|
|
32
33
|
Copyright (c) Microsoft Corporation.
|
|
@@ -348,8 +349,16 @@
|
|
|
348
349
|
|
|
349
350
|
var BaseComponent = /** @class */ (function () {
|
|
350
351
|
function BaseComponent() {
|
|
352
|
+
this.__isMobile = this.isMobile();
|
|
353
|
+
this.__locales = ['pt-BR', 'es-CL'];
|
|
351
354
|
this.__unsubscribeAll = new rxjs.Subject();
|
|
352
355
|
}
|
|
356
|
+
BaseComponent.prototype.isMobile = function () {
|
|
357
|
+
var isMobileWidth = (window.screen.width <= 640) ||
|
|
358
|
+
(window.matchMedia &&
|
|
359
|
+
window.matchMedia('only screen and (max-width: 640px)').matches);
|
|
360
|
+
return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile/i.test(navigator.userAgent)) || isMobileWidth;
|
|
361
|
+
};
|
|
353
362
|
BaseComponent.prototype.handlePagination = function (create) {
|
|
354
363
|
var _this = this;
|
|
355
364
|
if (create === void 0) { create = true; }
|
|
@@ -378,8 +387,8 @@
|
|
|
378
387
|
}, 200);
|
|
379
388
|
}
|
|
380
389
|
};
|
|
381
|
-
BaseComponent.prototype.
|
|
382
|
-
var service =
|
|
390
|
+
BaseComponent.prototype.handleSupport = function (supportControls) {
|
|
391
|
+
var service = supportControls.service, show = supportControls.show;
|
|
383
392
|
var method = show ? 'show' : 'hide';
|
|
384
393
|
service[method.toLowerCase()]();
|
|
385
394
|
};
|
|
@@ -533,7 +542,7 @@
|
|
|
533
542
|
BaseComponent.prototype.clearAllServiceData = function (clearData) {
|
|
534
543
|
var context = this;
|
|
535
544
|
Object.values(context).forEach(function (ctx) {
|
|
536
|
-
if (ctx instanceof
|
|
545
|
+
if (ctx instanceof i1$1.MonkeyEcxCommonsService) {
|
|
537
546
|
ctx.clear(clearData);
|
|
538
547
|
}
|
|
539
548
|
});
|
|
@@ -543,8 +552,8 @@
|
|
|
543
552
|
this.__paginationOptions = args === null || args === void 0 ? void 0 : args.paginationOptions;
|
|
544
553
|
this.handlePagination();
|
|
545
554
|
}
|
|
546
|
-
if (args === null || args === void 0 ? void 0 : args.
|
|
547
|
-
this.
|
|
555
|
+
if (args === null || args === void 0 ? void 0 : args.supportControls) {
|
|
556
|
+
this.handleSupport(args === null || args === void 0 ? void 0 : args.supportControls);
|
|
548
557
|
}
|
|
549
558
|
if (args === null || args === void 0 ? void 0 : args.translateOptions) {
|
|
550
559
|
this.handleTranslate(args === null || args === void 0 ? void 0 : args.translateOptions);
|
|
@@ -590,11 +599,43 @@
|
|
|
590
599
|
if (element)
|
|
591
600
|
element.scrollIntoView();
|
|
592
601
|
};
|
|
602
|
+
BaseComponent.prototype.getEmbeddedData = function (data, field) {
|
|
603
|
+
var _embedded = data._embedded;
|
|
604
|
+
return _embedded ? _embedded[field] : null;
|
|
605
|
+
};
|
|
606
|
+
BaseComponent.prototype.openWindow = function (url) {
|
|
607
|
+
window.open("" + url, '_blank');
|
|
608
|
+
};
|
|
609
|
+
BaseComponent.prototype.fillI18n = function (data) {
|
|
610
|
+
this.__i18n = data;
|
|
611
|
+
};
|
|
612
|
+
BaseComponent.prototype.getCountryPrefix = function (country) {
|
|
613
|
+
return {
|
|
614
|
+
br: 55,
|
|
615
|
+
cl: 56
|
|
616
|
+
}[country];
|
|
617
|
+
};
|
|
618
|
+
BaseComponent.prototype.getCountryCurrencyChartFormat = function (country) {
|
|
619
|
+
return {
|
|
620
|
+
br: 'R$ #,###,##0.00',
|
|
621
|
+
cl: 'CLP #,###,##0'
|
|
622
|
+
}[country];
|
|
623
|
+
};
|
|
624
|
+
BaseComponent.prototype.getCountryValidators = function (country) {
|
|
625
|
+
return {
|
|
626
|
+
br: {
|
|
627
|
+
governmentId: i1$1.ValidateUtils.DocumentValidator
|
|
628
|
+
},
|
|
629
|
+
cl: {
|
|
630
|
+
governmentId: i1$1.ValidateUtils.DocumentRutValidator
|
|
631
|
+
}
|
|
632
|
+
}[country];
|
|
633
|
+
};
|
|
593
634
|
return BaseComponent;
|
|
594
635
|
}());
|
|
595
|
-
BaseComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
596
|
-
BaseComponent.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
597
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
636
|
+
BaseComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: BaseComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
637
|
+
BaseComponent.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: BaseComponent, selector: "[baseComponent]", ngImport: i0__namespace });
|
|
638
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: BaseComponent, decorators: [{
|
|
598
639
|
type: i0.Directive,
|
|
599
640
|
args: [{
|
|
600
641
|
selector: '[baseComponent]'
|
|
@@ -602,19 +643,19 @@
|
|
|
602
643
|
}], ctorParameters: function () { return []; } });
|
|
603
644
|
|
|
604
645
|
var validators = {
|
|
605
|
-
required: i1$
|
|
606
|
-
email:
|
|
607
|
-
governmentId:
|
|
608
|
-
governmentIdRut:
|
|
609
|
-
documentBR:
|
|
610
|
-
documentCL:
|
|
611
|
-
date:
|
|
612
|
-
zipCode:
|
|
646
|
+
required: i1$2.Validators.required,
|
|
647
|
+
email: i1$1.Validators.email,
|
|
648
|
+
governmentId: i1$1.Validators.documentBR,
|
|
649
|
+
governmentIdRut: i1$1.Validators.documentCL,
|
|
650
|
+
documentBR: i1$1.Validators.documentBR,
|
|
651
|
+
documentCL: i1$1.Validators.documentCL,
|
|
652
|
+
date: i1$1.Validators.date,
|
|
653
|
+
zipCode: i1$1.Validators.zipCode,
|
|
613
654
|
minLength: function (param) {
|
|
614
|
-
return i1$
|
|
655
|
+
return i1$2.Validators.minLength(param);
|
|
615
656
|
},
|
|
616
657
|
maxLength: function (param) {
|
|
617
|
-
return i1$
|
|
658
|
+
return i1$2.Validators.maxLength(param);
|
|
618
659
|
}
|
|
619
660
|
};
|
|
620
661
|
|
|
@@ -661,7 +702,7 @@
|
|
|
661
702
|
: validators[valid.name];
|
|
662
703
|
validList_1.push(validated);
|
|
663
704
|
});
|
|
664
|
-
return i1$
|
|
705
|
+
return i1$2.Validators.compose(validList_1);
|
|
665
706
|
}
|
|
666
707
|
return null;
|
|
667
708
|
};
|
|
@@ -693,9 +734,9 @@
|
|
|
693
734
|
};
|
|
694
735
|
return BaseDynamic;
|
|
695
736
|
}(BaseComponent));
|
|
696
|
-
BaseDynamic.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
697
|
-
BaseDynamic.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
698
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
737
|
+
BaseDynamic.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: BaseDynamic, deps: [{ token: i1__namespace.FormBuilder }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
738
|
+
BaseDynamic.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", 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__namespace });
|
|
739
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: BaseDynamic, decorators: [{
|
|
699
740
|
type: i0.Directive,
|
|
700
741
|
args: [{
|
|
701
742
|
selector: '[baseDynamic]'
|
|
@@ -831,7 +872,7 @@
|
|
|
831
872
|
: validators[valid.name];
|
|
832
873
|
validList_1.push(validated);
|
|
833
874
|
});
|
|
834
|
-
return i1$
|
|
875
|
+
return i1$2.Validators.compose(validList_1);
|
|
835
876
|
}
|
|
836
877
|
return null;
|
|
837
878
|
};
|
|
@@ -914,9 +955,9 @@
|
|
|
914
955
|
};
|
|
915
956
|
return BaseDynamicArray;
|
|
916
957
|
}(BaseComponent));
|
|
917
|
-
BaseDynamicArray.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
918
|
-
BaseDynamicArray.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
919
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
958
|
+
BaseDynamicArray.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: BaseDynamicArray, deps: [{ token: i1__namespace.FormBuilder }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
959
|
+
BaseDynamicArray.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: BaseDynamicArray, selector: "[baseDynamicArray]", inputs: { onHandleSubmit: "onHandleSubmit", onHandleUpdateForm: "onHandleUpdateForm", self: "self", fields: "fields", data: "data", qtd: "qtd", disabled: "disabled" }, outputs: { onHandleSubmitFormReady: "onHandleSubmitFormReady" }, usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace });
|
|
960
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: BaseDynamicArray, decorators: [{
|
|
920
961
|
type: i0.Directive,
|
|
921
962
|
args: [{
|
|
922
963
|
selector: '[baseDynamicArray]'
|
|
@@ -975,9 +1016,9 @@
|
|
|
975
1016
|
};
|
|
976
1017
|
return MECXDynamicFileUploadComponent;
|
|
977
1018
|
}());
|
|
978
|
-
MECXDynamicFileUploadComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
979
|
-
MECXDynamicFileUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
980
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1019
|
+
MECXDynamicFileUploadComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicFileUploadComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1020
|
+
MECXDynamicFileUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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__namespace, 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 || []\">\n</monkey-file-upload>", components: [{ type: i1__namespace$1.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: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1021
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicFileUploadComponent, decorators: [{
|
|
981
1022
|
type: i0.Component,
|
|
982
1023
|
args: [{
|
|
983
1024
|
selector: 'mecx-dynamic-file-upload',
|
|
@@ -1032,9 +1073,9 @@
|
|
|
1032
1073
|
};
|
|
1033
1074
|
return MECXDynamicButtonComponent;
|
|
1034
1075
|
}());
|
|
1035
|
-
MECXDynamicButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1036
|
-
MECXDynamicButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1037
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1076
|
+
MECXDynamicButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicButtonComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1077
|
+
MECXDynamicButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: MECXDynamicButtonComponent, selector: "mecx-dynamic-button", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, usesOnChanges: true, ngImport: i0__namespace, 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__namespace$1.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1078
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicButtonComponent, decorators: [{
|
|
1038
1079
|
type: i0.Component,
|
|
1039
1080
|
args: [{
|
|
1040
1081
|
selector: 'mecx-dynamic-button',
|
|
@@ -1094,9 +1135,9 @@
|
|
|
1094
1135
|
};
|
|
1095
1136
|
return MECXDynamicInputComponent;
|
|
1096
1137
|
}());
|
|
1097
|
-
MECXDynamicInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1098
|
-
MECXDynamicInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1099
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1138
|
+
MECXDynamicInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicInputComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1139
|
+
MECXDynamicInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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__namespace, 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__namespace$1.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__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1140
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicInputComponent, decorators: [{
|
|
1100
1141
|
type: i0.Component,
|
|
1101
1142
|
args: [{
|
|
1102
1143
|
selector: 'mecx-dynamic-input',
|
|
@@ -1160,9 +1201,9 @@
|
|
|
1160
1201
|
};
|
|
1161
1202
|
return MECXDynamicInputPhoneComponent;
|
|
1162
1203
|
}());
|
|
1163
|
-
MECXDynamicInputPhoneComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1164
|
-
MECXDynamicInputPhoneComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1165
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1204
|
+
MECXDynamicInputPhoneComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicInputPhoneComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1205
|
+
MECXDynamicInputPhoneComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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__namespace, 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__namespace$1.MonkeyInputPhoneComponent, selector: "monkey-input-phone", inputs: ["name", "label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "maxLength", "internationalNumber", "value"], outputs: ["onChange"] }], directives: [{ type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1206
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicInputPhoneComponent, decorators: [{
|
|
1166
1207
|
type: i0.Component,
|
|
1167
1208
|
args: [{
|
|
1168
1209
|
selector: 'mecx-dynamic-input-phone',
|
|
@@ -1202,9 +1243,9 @@
|
|
|
1202
1243
|
});
|
|
1203
1244
|
return MECXDynamicRadioComponent;
|
|
1204
1245
|
}());
|
|
1205
|
-
MECXDynamicRadioComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1206
|
-
MECXDynamicRadioComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1207
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1246
|
+
MECXDynamicRadioComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicRadioComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1247
|
+
MECXDynamicRadioComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: MECXDynamicRadioComponent, selector: "mecx-dynamic-radio", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors" }, host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, 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__namespace$1.MonkeyRadioButtonComponent, selector: "monkey-radiobutton", inputs: ["label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "value"], outputs: ["onChange"] }, { type: i1__namespace$1.MonkeyOptionComponent, selector: "monkey-option", inputs: ["type", "label", "value", "selectAll", "selected", "enableClick"], outputs: ["onSelectOption"] }], directives: [{ type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1248
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicRadioComponent, decorators: [{
|
|
1208
1249
|
type: i0.Component,
|
|
1209
1250
|
args: [{
|
|
1210
1251
|
selector: 'mecx-dynamic-radio',
|
|
@@ -1281,9 +1322,9 @@
|
|
|
1281
1322
|
};
|
|
1282
1323
|
return MECXDynamicSelectComponent;
|
|
1283
1324
|
}());
|
|
1284
|
-
MECXDynamicSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1285
|
-
MECXDynamicSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1286
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1325
|
+
MECXDynamicSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicSelectComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1326
|
+
MECXDynamicSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: MECXDynamicSelectComponent, selector: "mecx-dynamic-select", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, 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__namespace$1.MonkeySelectComponent, selector: "monkey-select", inputs: ["label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "labelSelect", "onHandleOptions", "value"], outputs: ["onChange"] }, { type: i1__namespace$1.MonkeyOptionComponent, selector: "monkey-option", inputs: ["type", "label", "value", "selectAll", "selected", "enableClick"], outputs: ["onSelectOption"] }], directives: [{ type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1327
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicSelectComponent, decorators: [{
|
|
1287
1328
|
type: i0.Component,
|
|
1288
1329
|
args: [{
|
|
1289
1330
|
selector: 'mecx-dynamic-select',
|
|
@@ -1362,9 +1403,9 @@
|
|
|
1362
1403
|
};
|
|
1363
1404
|
return MECXDynamicSelectSearchComponent;
|
|
1364
1405
|
}());
|
|
1365
|
-
MECXDynamicSelectSearchComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1366
|
-
MECXDynamicSelectSearchComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1367
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1406
|
+
MECXDynamicSelectSearchComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicSelectSearchComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1407
|
+
MECXDynamicSelectSearchComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: MECXDynamicSelectSearchComponent, selector: "mecx-dynamic-select-search", inputs: { _field: "_field", _form: "_form", _formErrors: "_formErrors", self: "self" }, host: { properties: { "class": "this.className" } }, ngImport: i0__namespace, 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__namespace$1.MonkeySelectSearchComponent, selector: "monkey-select-search", inputs: ["label", "helperMessage", "placeholder", "icon", "infoMessage", "errorMessage", "labelSelect", "fieldToCompare", "onHandleOptions", "value"], outputs: ["onChange", "onSearch"] }, { type: i1__namespace$1.MonkeyOptionComponent, selector: "monkey-option", inputs: ["type", "label", "value", "selectAll", "selected", "enableClick"], outputs: ["onSelectOption"] }], directives: [{ type: i1__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1408
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicSelectSearchComponent, decorators: [{
|
|
1368
1409
|
type: i0.Component,
|
|
1369
1410
|
args: [{
|
|
1370
1411
|
selector: 'mecx-dynamic-select-search',
|
|
@@ -1453,9 +1494,9 @@
|
|
|
1453
1494
|
};
|
|
1454
1495
|
return MECXDynamicDirective;
|
|
1455
1496
|
}());
|
|
1456
|
-
MECXDynamicDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1457
|
-
MECXDynamicDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
1458
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1497
|
+
MECXDynamicDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicDirective, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1498
|
+
MECXDynamicDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MECXDynamicDirective, selector: "[MECXDynamic]", inputs: { field: "field", form: "form", formErrors: "formErrors", self: "self", plusValidations: "plusValidations" }, usesOnChanges: true, ngImport: i0__namespace });
|
|
1499
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicDirective, decorators: [{
|
|
1459
1500
|
type: i0.Directive,
|
|
1460
1501
|
args: [{
|
|
1461
1502
|
selector: '[MECXDynamic]'
|
|
@@ -1507,9 +1548,9 @@
|
|
|
1507
1548
|
};
|
|
1508
1549
|
return MECXDynamicFormComponent;
|
|
1509
1550
|
}(BaseDynamic));
|
|
1510
|
-
MECXDynamicFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1511
|
-
MECXDynamicFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1512
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1551
|
+
MECXDynamicFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicFormComponent, deps: [{ token: i1__namespace.FormBuilder }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1552
|
+
MECXDynamicFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: MECXDynamicFormComponent, selector: "mecx-dynamic-form", usesInheritance: true, ngImport: i0__namespace, template: "<form name=\"form\" [formGroup]=\"_form\" *ngIf=\"_form\">\n <div class=\"row\">\n <div *ngFor=\"let field of fields;\" MECXDynamic [field]=\"field\" [form]=\"_form\" [self]=\"self\"\n [formErrors]=\"__monkeyecxFormErrors\" [style.display]=\"'none'\">\n </div>\n </div>\n</form>", directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: MECXDynamicDirective, selector: "[MECXDynamic]", inputs: ["field", "form", "formErrors", "self", "plusValidations"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1553
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicFormComponent, decorators: [{
|
|
1513
1554
|
type: i0.Component,
|
|
1514
1555
|
args: [{
|
|
1515
1556
|
selector: 'mecx-dynamic-form',
|
|
@@ -1551,7 +1592,7 @@
|
|
|
1551
1592
|
if (this.formValues) {
|
|
1552
1593
|
this.__monkeyecxFormErrors = [this.formValues.length];
|
|
1553
1594
|
this.formValues.controls.forEach(function (item, index) {
|
|
1554
|
-
if (item instanceof i1$
|
|
1595
|
+
if (item instanceof i1$2.FormGroup) {
|
|
1555
1596
|
if (!_this.validateForm(item, index)) {
|
|
1556
1597
|
hasErrors = true;
|
|
1557
1598
|
}
|
|
@@ -1578,9 +1619,9 @@
|
|
|
1578
1619
|
};
|
|
1579
1620
|
return MECXDynamicFormArrayComponent;
|
|
1580
1621
|
}(BaseDynamicArray));
|
|
1581
|
-
MECXDynamicFormArrayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1582
|
-
MECXDynamicFormArrayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1583
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1622
|
+
MECXDynamicFormArrayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicFormArrayComponent, deps: [{ token: i1__namespace.FormBuilder }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1623
|
+
MECXDynamicFormArrayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: MECXDynamicFormArrayComponent, selector: "mecx-dynamic-form-array", usesInheritance: true, ngImport: i0__namespace, 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__namespace$1.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: MECXDynamicDirective, selector: "[MECXDynamic]", inputs: ["field", "form", "formErrors", "self", "plusValidations"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1624
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicFormArrayComponent, decorators: [{
|
|
1584
1625
|
type: i0.Component,
|
|
1585
1626
|
args: [{
|
|
1586
1627
|
selector: 'mecx-dynamic-form-array',
|
|
@@ -1595,8 +1636,8 @@
|
|
|
1595
1636
|
}
|
|
1596
1637
|
return MECXDynamicModule;
|
|
1597
1638
|
}());
|
|
1598
|
-
MECXDynamicModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1599
|
-
MECXDynamicModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1639
|
+
MECXDynamicModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1640
|
+
MECXDynamicModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicModule, declarations: [MECXDynamicButtonComponent,
|
|
1600
1641
|
MECXDynamicFileUploadComponent,
|
|
1601
1642
|
MECXDynamicFormComponent,
|
|
1602
1643
|
MECXDynamicFormArrayComponent,
|
|
@@ -1605,20 +1646,20 @@
|
|
|
1605
1646
|
MECXDynamicRadioComponent,
|
|
1606
1647
|
MECXDynamicSelectComponent,
|
|
1607
1648
|
MECXDynamicSelectSearchComponent,
|
|
1608
|
-
MECXDynamicDirective], imports: [i3
|
|
1609
|
-
i1$
|
|
1610
|
-
i1$
|
|
1649
|
+
MECXDynamicDirective], imports: [i3.CommonModule,
|
|
1650
|
+
i1$2.FormsModule,
|
|
1651
|
+
i1$2.ReactiveFormsModule,
|
|
1611
1652
|
i1.MonkeyInputModule,
|
|
1612
1653
|
i1.MonkeySelectModule,
|
|
1613
1654
|
i1.MonkeyRadioButtonModule,
|
|
1614
1655
|
i1.MonkeyOptionModule,
|
|
1615
1656
|
i1.MonkeyFileUploadModule,
|
|
1616
1657
|
i1.MonkeyButtonModule,
|
|
1617
|
-
i1.MonkeyInputPhoneModule,
|
|
1618
|
-
MECXDynamicModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1619
|
-
i3
|
|
1620
|
-
i1$
|
|
1621
|
-
i1$
|
|
1658
|
+
i1.MonkeyInputPhoneModule, i4__namespace.TranslateModule], exports: [MECXDynamicDirective, MECXDynamicFormComponent, MECXDynamicFormArrayComponent] });
|
|
1659
|
+
MECXDynamicModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicModule, imports: [[
|
|
1660
|
+
i3.CommonModule,
|
|
1661
|
+
i1$2.FormsModule,
|
|
1662
|
+
i1$2.ReactiveFormsModule,
|
|
1622
1663
|
i1.MonkeyInputModule,
|
|
1623
1664
|
i1.MonkeySelectModule,
|
|
1624
1665
|
i1.MonkeyRadioButtonModule,
|
|
@@ -1626,9 +1667,9 @@
|
|
|
1626
1667
|
i1.MonkeyFileUploadModule,
|
|
1627
1668
|
i1.MonkeyButtonModule,
|
|
1628
1669
|
i1.MonkeyInputPhoneModule,
|
|
1629
|
-
|
|
1670
|
+
i4.TranslateModule.forChild()
|
|
1630
1671
|
]] });
|
|
1631
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1672
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXDynamicModule, decorators: [{
|
|
1632
1673
|
type: i0.NgModule,
|
|
1633
1674
|
args: [{
|
|
1634
1675
|
declarations: [
|
|
@@ -1644,9 +1685,9 @@
|
|
|
1644
1685
|
MECXDynamicDirective
|
|
1645
1686
|
],
|
|
1646
1687
|
imports: [
|
|
1647
|
-
i3
|
|
1648
|
-
i1$
|
|
1649
|
-
i1$
|
|
1688
|
+
i3.CommonModule,
|
|
1689
|
+
i1$2.FormsModule,
|
|
1690
|
+
i1$2.ReactiveFormsModule,
|
|
1650
1691
|
i1.MonkeyInputModule,
|
|
1651
1692
|
i1.MonkeySelectModule,
|
|
1652
1693
|
i1.MonkeyRadioButtonModule,
|
|
@@ -1654,13 +1695,147 @@
|
|
|
1654
1695
|
i1.MonkeyFileUploadModule,
|
|
1655
1696
|
i1.MonkeyButtonModule,
|
|
1656
1697
|
i1.MonkeyInputPhoneModule,
|
|
1657
|
-
|
|
1698
|
+
i4.TranslateModule.forChild()
|
|
1658
1699
|
],
|
|
1659
1700
|
exports: [MECXDynamicDirective, MECXDynamicFormComponent, MECXDynamicFormArrayComponent],
|
|
1660
1701
|
entryComponents: [MECXDynamicInputComponent]
|
|
1661
1702
|
}]
|
|
1662
1703
|
}] });
|
|
1663
1704
|
|
|
1705
|
+
var MECXPasswordStrengthComponent = /** @class */ (function () {
|
|
1706
|
+
function MECXPasswordStrengthComponent(configService) {
|
|
1707
|
+
this.configService = configService;
|
|
1708
|
+
this.onHandleSubmitReady = new i0.EventEmitter();
|
|
1709
|
+
this._validatorsPasswordPass = [];
|
|
1710
|
+
this._stepPassword = null;
|
|
1711
|
+
this.validatorsPassword = new Map();
|
|
1712
|
+
// not do
|
|
1713
|
+
}
|
|
1714
|
+
MECXPasswordStrengthComponent.prototype.handleColor = function (score) {
|
|
1715
|
+
var idx = 0;
|
|
1716
|
+
if (score > 50)
|
|
1717
|
+
idx = 1;
|
|
1718
|
+
if (score === 100)
|
|
1719
|
+
idx = 2;
|
|
1720
|
+
this._stepPassword = idx;
|
|
1721
|
+
};
|
|
1722
|
+
MECXPasswordStrengthComponent.prototype.passwordStrengthValidator = function (pass) {
|
|
1723
|
+
var _this = this;
|
|
1724
|
+
this._validatorsPasswordPass = [];
|
|
1725
|
+
var score = 0;
|
|
1726
|
+
this.validatorsPassword.forEach(function (key, value) {
|
|
1727
|
+
_this._validatorsPasswordPass.push({
|
|
1728
|
+
regex: "" + value,
|
|
1729
|
+
validate: "" + key.VALIDATE === String(RegExp("" + key.REGEX).test(pass)),
|
|
1730
|
+
percent: 100 / _this.validatorsPassword.size
|
|
1731
|
+
});
|
|
1732
|
+
});
|
|
1733
|
+
this._validatorsPasswordPass.forEach(function (check) {
|
|
1734
|
+
if (check.validate) {
|
|
1735
|
+
score += check.percent;
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
return Math.trunc(score);
|
|
1739
|
+
};
|
|
1740
|
+
MECXPasswordStrengthComponent.prototype.onHandleReady = function () {
|
|
1741
|
+
var _a;
|
|
1742
|
+
var validate = (_a = this._validatorsPasswordPass) === null || _a === void 0 ? void 0 : _a.find(function (_d) {
|
|
1743
|
+
var validate = _d.validate;
|
|
1744
|
+
return !validate;
|
|
1745
|
+
});
|
|
1746
|
+
this.onHandleSubmitReady.next(!validate);
|
|
1747
|
+
};
|
|
1748
|
+
MECXPasswordStrengthComponent.prototype.onHandleChages = function () {
|
|
1749
|
+
var password = this.passwordToCheck;
|
|
1750
|
+
this.handleColor(this.passwordStrengthValidator(password));
|
|
1751
|
+
this.onHandleReady();
|
|
1752
|
+
};
|
|
1753
|
+
MECXPasswordStrengthComponent.prototype.onHandlePasswordStrengthKeys = function (params) {
|
|
1754
|
+
var _this = this;
|
|
1755
|
+
var _a, _b, _c;
|
|
1756
|
+
var ps = (_c = (_b = (_a = params === null || params === void 0 ? void 0 : params.program) === null || _a === void 0 ? void 0 : _a.screens) === null || _b === void 0 ? void 0 : _b.login) === null || _c === void 0 ? void 0 : _c.passwordStrength;
|
|
1757
|
+
if (ps) {
|
|
1758
|
+
Object.entries(ps)
|
|
1759
|
+
.forEach(function (_d) {
|
|
1760
|
+
var _e = __read(_d, 2), key = _e[0], value = _e[1];
|
|
1761
|
+
if (i1$1.MonkeyEcxUtils.persistNullEmptyUndefined(value)) {
|
|
1762
|
+
_this.validatorsPassword.set(key, value);
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
this.onHandleChages();
|
|
1766
|
+
}
|
|
1767
|
+
};
|
|
1768
|
+
MECXPasswordStrengthComponent.prototype.ngOnInit = function () {
|
|
1769
|
+
var _this = this;
|
|
1770
|
+
this.configService.config().subscribe(function (_) {
|
|
1771
|
+
_this.onHandlePasswordStrengthKeys(_);
|
|
1772
|
+
});
|
|
1773
|
+
};
|
|
1774
|
+
MECXPasswordStrengthComponent.prototype.ngOnChanges = function () {
|
|
1775
|
+
this.onHandleChages();
|
|
1776
|
+
};
|
|
1777
|
+
return MECXPasswordStrengthComponent;
|
|
1778
|
+
}());
|
|
1779
|
+
MECXPasswordStrengthComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXPasswordStrengthComponent, deps: [{ token: i1__namespace$2.MonkeyEcxConfigService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1780
|
+
MECXPasswordStrengthComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: MECXPasswordStrengthComponent, selector: "mecx-password-strength", inputs: { passwordToCheck: "passwordToCheck" }, outputs: { onHandleSubmitReady: "onHandleSubmitReady" }, usesOnChanges: true, ngImport: i0__namespace, 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;grid-gap:.5rem;gap:.5rem}mecx-password-strength .strength-bar .bar-label{font-style:normal;font-weight:normal;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:normal;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__namespace$1.MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "color", "contrast", "disabled"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4__namespace.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1781
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXPasswordStrengthComponent, decorators: [{
|
|
1782
|
+
type: i0.Component,
|
|
1783
|
+
args: [{
|
|
1784
|
+
selector: 'mecx-password-strength',
|
|
1785
|
+
templateUrl: './password-strength.component.html',
|
|
1786
|
+
styleUrls: ['./password-strength.component.scss'],
|
|
1787
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1788
|
+
}]
|
|
1789
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$2.MonkeyEcxConfigService }]; }, propDecorators: { passwordToCheck: [{
|
|
1790
|
+
type: i0.Input
|
|
1791
|
+
}], onHandleSubmitReady: [{
|
|
1792
|
+
type: i0.Output
|
|
1793
|
+
}] } });
|
|
1794
|
+
|
|
1795
|
+
var MECXPasswordStrengthModule = /** @class */ (function () {
|
|
1796
|
+
function MECXPasswordStrengthModule() {
|
|
1797
|
+
}
|
|
1798
|
+
return MECXPasswordStrengthModule;
|
|
1799
|
+
}());
|
|
1800
|
+
MECXPasswordStrengthModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXPasswordStrengthModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1801
|
+
MECXPasswordStrengthModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXPasswordStrengthModule, declarations: [MECXPasswordStrengthComponent], imports: [i3.CommonModule,
|
|
1802
|
+
i1$2.FormsModule,
|
|
1803
|
+
i1$2.ReactiveFormsModule,
|
|
1804
|
+
i1$1.MonkeyEcxPipesModule,
|
|
1805
|
+
i1$1.MonkeyEcxDirectivesModule,
|
|
1806
|
+
i1.MonkeyButtonModule,
|
|
1807
|
+
i1.MonkeyInputModule,
|
|
1808
|
+
i1.MonkeyIconModule, i4__namespace.TranslateModule], exports: [MECXPasswordStrengthComponent] });
|
|
1809
|
+
MECXPasswordStrengthModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXPasswordStrengthModule, imports: [[
|
|
1810
|
+
i3.CommonModule,
|
|
1811
|
+
i1$2.FormsModule,
|
|
1812
|
+
i1$2.ReactiveFormsModule,
|
|
1813
|
+
i1$1.MonkeyEcxPipesModule,
|
|
1814
|
+
i1$1.MonkeyEcxDirectivesModule,
|
|
1815
|
+
i1.MonkeyButtonModule,
|
|
1816
|
+
i1.MonkeyInputModule,
|
|
1817
|
+
i1.MonkeyIconModule,
|
|
1818
|
+
i4.TranslateModule.forChild()
|
|
1819
|
+
]] });
|
|
1820
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MECXPasswordStrengthModule, decorators: [{
|
|
1821
|
+
type: i0.NgModule,
|
|
1822
|
+
args: [{
|
|
1823
|
+
declarations: [MECXPasswordStrengthComponent],
|
|
1824
|
+
imports: [
|
|
1825
|
+
i3.CommonModule,
|
|
1826
|
+
i1$2.FormsModule,
|
|
1827
|
+
i1$2.ReactiveFormsModule,
|
|
1828
|
+
i1$1.MonkeyEcxPipesModule,
|
|
1829
|
+
i1$1.MonkeyEcxDirectivesModule,
|
|
1830
|
+
i1.MonkeyButtonModule,
|
|
1831
|
+
i1.MonkeyInputModule,
|
|
1832
|
+
i1.MonkeyIconModule,
|
|
1833
|
+
i4.TranslateModule.forChild()
|
|
1834
|
+
],
|
|
1835
|
+
exports: [MECXPasswordStrengthComponent]
|
|
1836
|
+
}]
|
|
1837
|
+
}] });
|
|
1838
|
+
|
|
1664
1839
|
/*
|
|
1665
1840
|
* Public API Surface of monkey-front-components
|
|
1666
1841
|
*/
|
|
@@ -1681,6 +1856,8 @@
|
|
|
1681
1856
|
exports.MECXDynamicModule = MECXDynamicModule;
|
|
1682
1857
|
exports.MECXDynamicRadioComponent = MECXDynamicRadioComponent;
|
|
1683
1858
|
exports.MECXDynamicSelectComponent = MECXDynamicSelectComponent;
|
|
1859
|
+
exports.MECXPasswordStrengthComponent = MECXPasswordStrengthComponent;
|
|
1860
|
+
exports.MECXPasswordStrengthModule = MECXPasswordStrengthModule;
|
|
1684
1861
|
exports.validators = validators;
|
|
1685
1862
|
|
|
1686
1863
|
Object.defineProperty(exports, '__esModule', { value: true });
|