monkey-front-core 0.0.137 → 0.0.140

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.
@@ -585,303 +585,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
585
585
  }]
586
586
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
587
587
 
588
- class MonkeyEcxFormatTaxPipe {
589
- transform(tax, decimalDigits = 7) {
590
- if (!tax)
591
- return '';
592
- const stringTax = tax.toString();
593
- const stringTaxLimited = stringTax.slice(0, stringTax.indexOf('.') + decimalDigits + 1);
594
- return Number(stringTaxLimited).toLocaleString('pt-br', {
595
- maximumFractionDigits: decimalDigits,
596
- });
597
- }
598
- }
599
- MonkeyEcxFormatTaxPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxFormatTaxPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
600
- MonkeyEcxFormatTaxPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxFormatTaxPipe, name: "monkeyecxFormatTax" });
601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxFormatTaxPipe, decorators: [{
602
- type: Pipe,
603
- args: [{
604
- name: 'monkeyecxFormatTax',
605
- }]
606
- }] });
607
-
608
- class MonkeyEcxPipesModule {
609
- }
610
- MonkeyEcxPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
611
- MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxPipesModule, declarations: [MonkeyEcxDisplayFirstNamePipe,
612
- MonkeyEcxFormatAddressPipe,
613
- MonkeyEcxFormatCurrencyPipe,
614
- MonkeyEcxFormatDateTimelapsePipe,
615
- MonkeyEcxFormatDateGroupPipe,
616
- MonkeyEcxFormatDocumentPipe,
617
- MonkeyEcxFormatNumberPipe,
618
- MonkeyEcxFormatPhonePipe,
619
- MonkeyEcxFormatSizePipe,
620
- MonkeyEcxFormatTaxPipe,
621
- MonkeyEcxFormatDocumentTypePipe,
622
- MonkeyEcxFormatValue,
623
- MonkeyEcxFormatZipCodePipe,
624
- MonkeyEcxTextTruncatePipe,
625
- MonkeyEcxTruncateQtdPipe], exports: [MonkeyEcxDisplayFirstNamePipe,
626
- MonkeyEcxFormatAddressPipe,
627
- MonkeyEcxFormatCurrencyPipe,
628
- MonkeyEcxFormatDateTimelapsePipe,
629
- MonkeyEcxFormatDateGroupPipe,
630
- MonkeyEcxFormatDocumentPipe,
631
- MonkeyEcxFormatNumberPipe,
632
- MonkeyEcxFormatPhonePipe,
633
- MonkeyEcxFormatSizePipe,
634
- MonkeyEcxFormatTaxPipe,
635
- MonkeyEcxFormatDocumentTypePipe,
636
- MonkeyEcxFormatValue,
637
- MonkeyEcxFormatZipCodePipe,
638
- MonkeyEcxTextTruncatePipe,
639
- MonkeyEcxTruncateQtdPipe] });
640
- MonkeyEcxPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxPipesModule, providers: [CurrencyPipe] });
641
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxPipesModule, decorators: [{
642
- type: NgModule,
643
- args: [{
644
- declarations: [
645
- MonkeyEcxDisplayFirstNamePipe,
646
- MonkeyEcxFormatAddressPipe,
647
- MonkeyEcxFormatCurrencyPipe,
648
- MonkeyEcxFormatDateTimelapsePipe,
649
- MonkeyEcxFormatDateGroupPipe,
650
- MonkeyEcxFormatDocumentPipe,
651
- MonkeyEcxFormatNumberPipe,
652
- MonkeyEcxFormatPhonePipe,
653
- MonkeyEcxFormatSizePipe,
654
- MonkeyEcxFormatTaxPipe,
655
- MonkeyEcxFormatDocumentTypePipe,
656
- MonkeyEcxFormatValue,
657
- MonkeyEcxFormatZipCodePipe,
658
- MonkeyEcxTextTruncatePipe,
659
- MonkeyEcxTruncateQtdPipe,
660
- ],
661
- exports: [
662
- MonkeyEcxDisplayFirstNamePipe,
663
- MonkeyEcxFormatAddressPipe,
664
- MonkeyEcxFormatCurrencyPipe,
665
- MonkeyEcxFormatDateTimelapsePipe,
666
- MonkeyEcxFormatDateGroupPipe,
667
- MonkeyEcxFormatDocumentPipe,
668
- MonkeyEcxFormatNumberPipe,
669
- MonkeyEcxFormatPhonePipe,
670
- MonkeyEcxFormatSizePipe,
671
- MonkeyEcxFormatTaxPipe,
672
- MonkeyEcxFormatDocumentTypePipe,
673
- MonkeyEcxFormatValue,
674
- MonkeyEcxFormatZipCodePipe,
675
- MonkeyEcxTextTruncatePipe,
676
- MonkeyEcxTruncateQtdPipe,
677
- ],
678
- providers: [CurrencyPipe],
679
- }]
680
- }] });
681
-
682
- class ClosedToMaintenanceModule {
683
- }
684
- ClosedToMaintenanceModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ClosedToMaintenanceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
685
- ClosedToMaintenanceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ClosedToMaintenanceModule, declarations: [ClosedToMaintenanceComponent], imports: [CommonModule,
686
- MonkeyButtonModule,
687
- MonkeyIconModule,
688
- MonkeyInputModule,
689
- MonkeyModalModule,
690
- MonkeyEcxPipesModule, i1$1.TranslateModule], exports: [ClosedToMaintenanceComponent] });
691
- ClosedToMaintenanceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ClosedToMaintenanceModule, imports: [[
692
- CommonModule,
693
- MonkeyButtonModule,
694
- MonkeyIconModule,
695
- MonkeyInputModule,
696
- MonkeyModalModule,
697
- MonkeyEcxPipesModule,
698
- TranslateModule.forChild()
699
- ]] });
700
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ClosedToMaintenanceModule, decorators: [{
701
- type: NgModule,
702
- args: [{
703
- declarations: [ClosedToMaintenanceComponent],
704
- imports: [
705
- CommonModule,
706
- MonkeyButtonModule,
707
- MonkeyIconModule,
708
- MonkeyInputModule,
709
- MonkeyModalModule,
710
- MonkeyEcxPipesModule,
711
- TranslateModule.forChild()
712
- ],
713
- exports: [ClosedToMaintenanceComponent]
714
- }]
715
- }] });
716
-
717
- class MonkeyEcxProgressBarService {
718
- constructor(router) {
719
- this.router = router;
720
- this.visible = null;
721
- this.init();
722
- }
723
- init() {
724
- this.visible = new BehaviorSubject(false);
725
- this.router.events
726
- .pipe(filter((event) => {
727
- return event instanceof NavigationStart;
728
- }))
729
- .subscribe(() => {
730
- this.show();
731
- });
732
- this.router.events
733
- .pipe(filter((event) => {
734
- return (event instanceof NavigationEnd ||
735
- event instanceof NavigationError ||
736
- event instanceof NavigationCancel);
737
- }))
738
- .subscribe(() => {
739
- this.hide();
740
- });
741
- }
742
- show() {
743
- this.visible?.next(true);
744
- }
745
- hide() {
746
- this.visible?.next(false);
747
- }
748
- visibleConfig() {
749
- return this.visible?.asObservable() || null;
750
- }
751
- }
752
- MonkeyEcxProgressBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarService, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
753
- MonkeyEcxProgressBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarService, providedIn: 'root' });
754
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarService, decorators: [{
755
- type: Injectable,
756
- args: [{
757
- providedIn: 'root'
758
- }]
759
- }], ctorParameters: function () { return [{ type: i1$3.Router }]; } });
760
-
761
- class MonkeyEcxProgressBarComponent {
762
- constructor(progressBarService) {
763
- this.progressBarService = progressBarService;
764
- this.visible = false;
765
- //not to do
766
- }
767
- ngOnInit() {
768
- this.progressBarService?.visibleConfig()?.subscribe((visible) => {
769
- this.visible = visible;
770
- });
771
- }
772
- }
773
- MonkeyEcxProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarComponent, deps: [{ token: MonkeyEcxProgressBarService }], target: i0.ɵɵFactoryTarget.Component });
774
- MonkeyEcxProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MonkeyEcxProgressBarComponent, selector: "monkeyecx-progress-bar", ngImport: i0, template: "<ng-container *ngIf=\"visible\">\n <progress class=\"monkey-progress monkey-progress__theme\"></progress>\n</ng-container>\n", styles: ["monkeyecx-progress-bar{position:absolute;width:100%;margin-top:-9.5px;z-index:99998}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
775
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarComponent, decorators: [{
776
- type: Component,
777
- args: [{ selector: 'monkeyecx-progress-bar', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"visible\">\n <progress class=\"monkey-progress monkey-progress__theme\"></progress>\n</ng-container>\n", styles: ["monkeyecx-progress-bar{position:absolute;width:100%;margin-top:-9.5px;z-index:99998}\n"] }]
778
- }], ctorParameters: function () { return [{ type: MonkeyEcxProgressBarService }]; } });
779
-
780
- class MonkeyEcxProgressBarModule {
781
- }
782
- MonkeyEcxProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
783
- MonkeyEcxProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarModule, declarations: [MonkeyEcxProgressBarComponent], imports: [CommonModule], exports: [MonkeyEcxProgressBarComponent] });
784
- MonkeyEcxProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarModule, imports: [[CommonModule]] });
785
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarModule, decorators: [{
786
- type: NgModule,
787
- args: [{
788
- declarations: [MonkeyEcxProgressBarComponent],
789
- imports: [CommonModule],
790
- exports: [MonkeyEcxProgressBarComponent]
791
- }]
792
- }] });
793
-
794
- class VersionChangedComponent {
795
- constructor() {
796
- this.config = null;
797
- }
798
- onClose() {
799
- document.location.reload();
800
- }
801
- }
802
- VersionChangedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
803
- VersionChangedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: VersionChangedComponent, selector: "monkeyecx-version-changed", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\n <span class=\"h2\">\n {{ 'SCREENS.VERSION-CHANGED.TITLE' | translate }}\n </span>\n <span class=\"information-title mt-4\">\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-1' | translate }}\n </span>\n <span class=\"information mt-3\">\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-2' | translate }}\n </span>\n </div>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-5\">\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onClose()\">\n {{ 'SCREENS.VERSION-CHANGED.BUTTONS.UPDATE-VERSION' | translate }}\n </monkey-button>\n </div>\n</monkey-modal>", styles: ["monkeyecx-version-changed .body{padding:24px;width:100%}monkeyecx-version-changed .information-title{font-style:normal;font-weight:600;font-size:25px;line-height:32px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .information{font-style:normal;font-weight:400;font-size:20px;line-height:24px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .browser-name{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;color:#9c9ca6}monkeyecx-version-changed .option{text-decoration:none;padding:4px;background:#eee;border:1px solid #d6d6d6;box-sizing:border-box;border-radius:16px}monkeyecx-version-changed monkey-modal mecx-monkey-modal .body{margin-bottom:0!important}\n"], components: [{ type: i1.MonkeyModalComponent, selector: "monkey-modal", inputs: ["config", "modalRef", "onHandleConfirm"] }, { type: i1.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
804
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedComponent, decorators: [{
805
- type: Component,
806
- args: [{ selector: 'monkeyecx-version-changed', encapsulation: ViewEncapsulation.None, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\n <span class=\"h2\">\n {{ 'SCREENS.VERSION-CHANGED.TITLE' | translate }}\n </span>\n <span class=\"information-title mt-4\">\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-1' | translate }}\n </span>\n <span class=\"information mt-3\">\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-2' | translate }}\n </span>\n </div>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-5\">\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onClose()\">\n {{ 'SCREENS.VERSION-CHANGED.BUTTONS.UPDATE-VERSION' | translate }}\n </monkey-button>\n </div>\n</monkey-modal>", styles: ["monkeyecx-version-changed .body{padding:24px;width:100%}monkeyecx-version-changed .information-title{font-style:normal;font-weight:600;font-size:25px;line-height:32px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .information{font-style:normal;font-weight:400;font-size:20px;line-height:24px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .browser-name{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;color:#9c9ca6}monkeyecx-version-changed .option{text-decoration:none;padding:4px;background:#eee;border:1px solid #d6d6d6;box-sizing:border-box;border-radius:16px}monkeyecx-version-changed monkey-modal mecx-monkey-modal .body{margin-bottom:0!important}\n"] }]
807
- }], propDecorators: { config: [{
808
- type: Input
809
- }], modalRef: [{
810
- type: Input
811
- }] } });
812
-
813
- class VersionChangedModule {
814
- }
815
- VersionChangedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
816
- VersionChangedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedModule, declarations: [VersionChangedComponent], imports: [CommonModule,
817
- MonkeyButtonModule,
818
- MonkeyIconModule,
819
- MonkeyInputModule,
820
- MonkeyModalModule, i1$1.TranslateModule], exports: [VersionChangedComponent] });
821
- VersionChangedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedModule, imports: [[
822
- CommonModule,
823
- MonkeyButtonModule,
824
- MonkeyIconModule,
825
- MonkeyInputModule,
826
- MonkeyModalModule,
827
- TranslateModule.forChild()
828
- ]] });
829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedModule, decorators: [{
830
- type: NgModule,
831
- args: [{
832
- declarations: [VersionChangedComponent],
833
- imports: [
834
- CommonModule,
835
- MonkeyButtonModule,
836
- MonkeyIconModule,
837
- MonkeyInputModule,
838
- MonkeyModalModule,
839
- TranslateModule.forChild()
840
- ],
841
- exports: [VersionChangedComponent]
842
- }]
843
- }] });
844
-
845
- /* eslint-disable space-before-function-paren */
846
- /* eslint-disable func-names */
847
- function MonkeyEcxCoreCharts(render = true) {
848
- return (target, propertyName, propertyDescriptor) => {
849
- const method = propertyDescriptor.value;
850
- propertyDescriptor.value = function (...args) {
851
- const context = this;
852
- if (render) {
853
- const scriptsLoaded = Array.from(document.scripts);
854
- scriptsLoaded.forEach((script) => {
855
- const { src } = script;
856
- if (src.search('www.gstatic.com/charts') > 0) {
857
- document.getElementsByTagName('head')[0].removeChild(script);
858
- }
859
- });
860
- const node = document.createElement('script');
861
- node.src = 'https://www.gstatic.com/charts/loader.js';
862
- node.type = 'text/javascript';
863
- node.async = true;
864
- node.id = 'monkeyecx-charts-settings';
865
- node.onload = () => {
866
- method.apply(context, args);
867
- };
868
- document.getElementsByTagName('head')[0].appendChild(node);
869
- }
870
- else {
871
- const scriptsLoaded = Array.from(document.scripts);
872
- scriptsLoaded.forEach((script) => {
873
- const { src } = script;
874
- if (src.search('www.gstatic.com/charts') > 0) {
875
- document.getElementsByTagName('head')[0].removeChild(script);
876
- }
877
- });
878
- method.apply(context, args);
879
- }
880
- };
881
- return propertyDescriptor;
882
- };
883
- }
884
-
885
588
  /* eslint-disable max-classes-per-file */
886
589
  const moment$1 = moment_;
887
590
  class DateValidator {
@@ -1357,52 +1060,349 @@ function valueGreaterThanZero(control) {
1357
1060
  }
1358
1061
  return null;
1359
1062
  }
1360
- class Validators {
1361
- static email(control) {
1362
- return emailValidator(control);
1363
- }
1364
- static dateRange(control) {
1365
- return dateRangeValidator(control);
1366
- }
1367
- static unlockSponsorRegister(control) {
1368
- return registerValidator(control, 'sponsor');
1369
- }
1370
- static unlockBuyerRegister(control) {
1371
- return registerValidator(control, 'buyer');
1372
- }
1373
- static dateStartEnd(control) {
1374
- return dateStartEndValidator(control);
1375
- }
1376
- static url(control) {
1377
- return urlValidator(control);
1063
+ class Validators {
1064
+ static email(control) {
1065
+ return emailValidator(control);
1066
+ }
1067
+ static dateRange(control) {
1068
+ return dateRangeValidator(control);
1069
+ }
1070
+ static unlockSponsorRegister(control) {
1071
+ return registerValidator(control, 'sponsor');
1072
+ }
1073
+ static unlockBuyerRegister(control) {
1074
+ return registerValidator(control, 'buyer');
1075
+ }
1076
+ static dateStartEnd(control) {
1077
+ return dateStartEndValidator(control);
1078
+ }
1079
+ static url(control) {
1080
+ return urlValidator(control);
1081
+ }
1082
+ static passwordConfirm(control) {
1083
+ return passwordConfirmValidator(control);
1084
+ }
1085
+ static true(control) {
1086
+ return trueValidator(control);
1087
+ }
1088
+ static combo(control) {
1089
+ return comboValidator(control);
1090
+ }
1091
+ static zipCode(control) {
1092
+ return zipCodeValidator(control);
1093
+ }
1094
+ static documentBR(control) {
1095
+ return documentValidator(control, 'BR');
1096
+ }
1097
+ static documentCL(control) {
1098
+ return documentValidator(control, 'CL');
1099
+ }
1100
+ static date(control) {
1101
+ return dateValidator(control);
1102
+ }
1103
+ static greaterThanZero(control) {
1104
+ return valueGreaterThanZero(control);
1105
+ }
1106
+ }
1107
+
1108
+ /* eslint-disable object-curly-newline */
1109
+
1110
+ class MonkeyEcxFormatTaxPipe {
1111
+ transform(tax, decimalDigits = 7) {
1112
+ if (!MonkeyEcxUtils.persistNullEmptyUndefined(tax))
1113
+ return '0 %';
1114
+ const stringTax = tax.toString();
1115
+ const stringTaxLimited = stringTax.slice(0, stringTax.indexOf('.') + decimalDigits + 1);
1116
+ return `${Number(stringTaxLimited).toLocaleString('pt-br', {
1117
+ maximumFractionDigits: decimalDigits,
1118
+ })} %`;
1119
+ }
1120
+ }
1121
+ MonkeyEcxFormatTaxPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxFormatTaxPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1122
+ MonkeyEcxFormatTaxPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxFormatTaxPipe, name: "monkeyecxFormatTax" });
1123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxFormatTaxPipe, decorators: [{
1124
+ type: Pipe,
1125
+ args: [{
1126
+ name: 'monkeyecxFormatTax',
1127
+ }]
1128
+ }] });
1129
+
1130
+ class MonkeyEcxPipesModule {
1131
+ }
1132
+ MonkeyEcxPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1133
+ MonkeyEcxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxPipesModule, declarations: [MonkeyEcxDisplayFirstNamePipe,
1134
+ MonkeyEcxFormatAddressPipe,
1135
+ MonkeyEcxFormatCurrencyPipe,
1136
+ MonkeyEcxFormatDateTimelapsePipe,
1137
+ MonkeyEcxFormatDateGroupPipe,
1138
+ MonkeyEcxFormatDocumentPipe,
1139
+ MonkeyEcxFormatNumberPipe,
1140
+ MonkeyEcxFormatPhonePipe,
1141
+ MonkeyEcxFormatSizePipe,
1142
+ MonkeyEcxFormatTaxPipe,
1143
+ MonkeyEcxFormatDocumentTypePipe,
1144
+ MonkeyEcxFormatValue,
1145
+ MonkeyEcxFormatZipCodePipe,
1146
+ MonkeyEcxTextTruncatePipe,
1147
+ MonkeyEcxTruncateQtdPipe], exports: [MonkeyEcxDisplayFirstNamePipe,
1148
+ MonkeyEcxFormatAddressPipe,
1149
+ MonkeyEcxFormatCurrencyPipe,
1150
+ MonkeyEcxFormatDateTimelapsePipe,
1151
+ MonkeyEcxFormatDateGroupPipe,
1152
+ MonkeyEcxFormatDocumentPipe,
1153
+ MonkeyEcxFormatNumberPipe,
1154
+ MonkeyEcxFormatPhonePipe,
1155
+ MonkeyEcxFormatSizePipe,
1156
+ MonkeyEcxFormatTaxPipe,
1157
+ MonkeyEcxFormatDocumentTypePipe,
1158
+ MonkeyEcxFormatValue,
1159
+ MonkeyEcxFormatZipCodePipe,
1160
+ MonkeyEcxTextTruncatePipe,
1161
+ MonkeyEcxTruncateQtdPipe] });
1162
+ MonkeyEcxPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxPipesModule, providers: [CurrencyPipe] });
1163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxPipesModule, decorators: [{
1164
+ type: NgModule,
1165
+ args: [{
1166
+ declarations: [
1167
+ MonkeyEcxDisplayFirstNamePipe,
1168
+ MonkeyEcxFormatAddressPipe,
1169
+ MonkeyEcxFormatCurrencyPipe,
1170
+ MonkeyEcxFormatDateTimelapsePipe,
1171
+ MonkeyEcxFormatDateGroupPipe,
1172
+ MonkeyEcxFormatDocumentPipe,
1173
+ MonkeyEcxFormatNumberPipe,
1174
+ MonkeyEcxFormatPhonePipe,
1175
+ MonkeyEcxFormatSizePipe,
1176
+ MonkeyEcxFormatTaxPipe,
1177
+ MonkeyEcxFormatDocumentTypePipe,
1178
+ MonkeyEcxFormatValue,
1179
+ MonkeyEcxFormatZipCodePipe,
1180
+ MonkeyEcxTextTruncatePipe,
1181
+ MonkeyEcxTruncateQtdPipe,
1182
+ ],
1183
+ exports: [
1184
+ MonkeyEcxDisplayFirstNamePipe,
1185
+ MonkeyEcxFormatAddressPipe,
1186
+ MonkeyEcxFormatCurrencyPipe,
1187
+ MonkeyEcxFormatDateTimelapsePipe,
1188
+ MonkeyEcxFormatDateGroupPipe,
1189
+ MonkeyEcxFormatDocumentPipe,
1190
+ MonkeyEcxFormatNumberPipe,
1191
+ MonkeyEcxFormatPhonePipe,
1192
+ MonkeyEcxFormatSizePipe,
1193
+ MonkeyEcxFormatTaxPipe,
1194
+ MonkeyEcxFormatDocumentTypePipe,
1195
+ MonkeyEcxFormatValue,
1196
+ MonkeyEcxFormatZipCodePipe,
1197
+ MonkeyEcxTextTruncatePipe,
1198
+ MonkeyEcxTruncateQtdPipe,
1199
+ ],
1200
+ providers: [CurrencyPipe],
1201
+ }]
1202
+ }] });
1203
+
1204
+ class ClosedToMaintenanceModule {
1205
+ }
1206
+ ClosedToMaintenanceModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ClosedToMaintenanceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1207
+ ClosedToMaintenanceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ClosedToMaintenanceModule, declarations: [ClosedToMaintenanceComponent], imports: [CommonModule,
1208
+ MonkeyButtonModule,
1209
+ MonkeyIconModule,
1210
+ MonkeyInputModule,
1211
+ MonkeyModalModule,
1212
+ MonkeyEcxPipesModule, i1$1.TranslateModule], exports: [ClosedToMaintenanceComponent] });
1213
+ ClosedToMaintenanceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ClosedToMaintenanceModule, imports: [[
1214
+ CommonModule,
1215
+ MonkeyButtonModule,
1216
+ MonkeyIconModule,
1217
+ MonkeyInputModule,
1218
+ MonkeyModalModule,
1219
+ MonkeyEcxPipesModule,
1220
+ TranslateModule.forChild()
1221
+ ]] });
1222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ClosedToMaintenanceModule, decorators: [{
1223
+ type: NgModule,
1224
+ args: [{
1225
+ declarations: [ClosedToMaintenanceComponent],
1226
+ imports: [
1227
+ CommonModule,
1228
+ MonkeyButtonModule,
1229
+ MonkeyIconModule,
1230
+ MonkeyInputModule,
1231
+ MonkeyModalModule,
1232
+ MonkeyEcxPipesModule,
1233
+ TranslateModule.forChild()
1234
+ ],
1235
+ exports: [ClosedToMaintenanceComponent]
1236
+ }]
1237
+ }] });
1238
+
1239
+ class MonkeyEcxProgressBarService {
1240
+ constructor(router) {
1241
+ this.router = router;
1242
+ this.visible = null;
1243
+ this.init();
1378
1244
  }
1379
- static passwordConfirm(control) {
1380
- return passwordConfirmValidator(control);
1245
+ init() {
1246
+ this.visible = new BehaviorSubject(false);
1247
+ this.router.events
1248
+ .pipe(filter((event) => {
1249
+ return event instanceof NavigationStart;
1250
+ }))
1251
+ .subscribe(() => {
1252
+ this.show();
1253
+ });
1254
+ this.router.events
1255
+ .pipe(filter((event) => {
1256
+ return (event instanceof NavigationEnd ||
1257
+ event instanceof NavigationError ||
1258
+ event instanceof NavigationCancel);
1259
+ }))
1260
+ .subscribe(() => {
1261
+ this.hide();
1262
+ });
1381
1263
  }
1382
- static true(control) {
1383
- return trueValidator(control);
1264
+ show() {
1265
+ this.visible?.next(true);
1384
1266
  }
1385
- static combo(control) {
1386
- return comboValidator(control);
1267
+ hide() {
1268
+ this.visible?.next(false);
1387
1269
  }
1388
- static zipCode(control) {
1389
- return zipCodeValidator(control);
1270
+ visibleConfig() {
1271
+ return this.visible?.asObservable() || null;
1390
1272
  }
1391
- static documentBR(control) {
1392
- return documentValidator(control, 'BR');
1273
+ }
1274
+ MonkeyEcxProgressBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarService, deps: [{ token: i1$3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1275
+ MonkeyEcxProgressBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarService, providedIn: 'root' });
1276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarService, decorators: [{
1277
+ type: Injectable,
1278
+ args: [{
1279
+ providedIn: 'root'
1280
+ }]
1281
+ }], ctorParameters: function () { return [{ type: i1$3.Router }]; } });
1282
+
1283
+ class MonkeyEcxProgressBarComponent {
1284
+ constructor(progressBarService) {
1285
+ this.progressBarService = progressBarService;
1286
+ this.visible = false;
1287
+ //not to do
1393
1288
  }
1394
- static documentCL(control) {
1395
- return documentValidator(control, 'CL');
1289
+ ngOnInit() {
1290
+ this.progressBarService?.visibleConfig()?.subscribe((visible) => {
1291
+ this.visible = visible;
1292
+ });
1396
1293
  }
1397
- static date(control) {
1398
- return dateValidator(control);
1294
+ }
1295
+ MonkeyEcxProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarComponent, deps: [{ token: MonkeyEcxProgressBarService }], target: i0.ɵɵFactoryTarget.Component });
1296
+ MonkeyEcxProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MonkeyEcxProgressBarComponent, selector: "monkeyecx-progress-bar", ngImport: i0, template: "<ng-container *ngIf=\"visible\">\n <progress class=\"monkey-progress monkey-progress__theme\"></progress>\n</ng-container>\n", styles: ["monkeyecx-progress-bar{position:absolute;width:100%;margin-top:-9.5px;z-index:99998}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
1297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarComponent, decorators: [{
1298
+ type: Component,
1299
+ args: [{ selector: 'monkeyecx-progress-bar', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"visible\">\n <progress class=\"monkey-progress monkey-progress__theme\"></progress>\n</ng-container>\n", styles: ["monkeyecx-progress-bar{position:absolute;width:100%;margin-top:-9.5px;z-index:99998}\n"] }]
1300
+ }], ctorParameters: function () { return [{ type: MonkeyEcxProgressBarService }]; } });
1301
+
1302
+ class MonkeyEcxProgressBarModule {
1303
+ }
1304
+ MonkeyEcxProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1305
+ MonkeyEcxProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarModule, declarations: [MonkeyEcxProgressBarComponent], imports: [CommonModule], exports: [MonkeyEcxProgressBarComponent] });
1306
+ MonkeyEcxProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarModule, imports: [[CommonModule]] });
1307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MonkeyEcxProgressBarModule, decorators: [{
1308
+ type: NgModule,
1309
+ args: [{
1310
+ declarations: [MonkeyEcxProgressBarComponent],
1311
+ imports: [CommonModule],
1312
+ exports: [MonkeyEcxProgressBarComponent]
1313
+ }]
1314
+ }] });
1315
+
1316
+ class VersionChangedComponent {
1317
+ constructor() {
1318
+ this.config = null;
1399
1319
  }
1400
- static greaterThanZero(control) {
1401
- return valueGreaterThanZero(control);
1320
+ onClose() {
1321
+ document.location.reload();
1402
1322
  }
1403
- }
1323
+ }
1324
+ VersionChangedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1325
+ VersionChangedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: VersionChangedComponent, selector: "monkeyecx-version-changed", inputs: { config: "config", modalRef: "modalRef" }, ngImport: i0, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\n <span class=\"h2\">\n {{ 'SCREENS.VERSION-CHANGED.TITLE' | translate }}\n </span>\n <span class=\"information-title mt-4\">\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-1' | translate }}\n </span>\n <span class=\"information mt-3\">\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-2' | translate }}\n </span>\n </div>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-5\">\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onClose()\">\n {{ 'SCREENS.VERSION-CHANGED.BUTTONS.UPDATE-VERSION' | translate }}\n </monkey-button>\n </div>\n</monkey-modal>", styles: ["monkeyecx-version-changed .body{padding:24px;width:100%}monkeyecx-version-changed .information-title{font-style:normal;font-weight:600;font-size:25px;line-height:32px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .information{font-style:normal;font-weight:400;font-size:20px;line-height:24px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .browser-name{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;color:#9c9ca6}monkeyecx-version-changed .option{text-decoration:none;padding:4px;background:#eee;border:1px solid #d6d6d6;box-sizing:border-box;border-radius:16px}monkeyecx-version-changed monkey-modal mecx-monkey-modal .body{margin-bottom:0!important}\n"], components: [{ type: i1.MonkeyModalComponent, selector: "monkey-modal", inputs: ["config", "modalRef", "onHandleConfirm"] }, { type: i1.MonkeyButtonComponent, selector: "monkey-button", inputs: ["label", "icon", "iconPosition", "type", "color", "disabled", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
1326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedComponent, decorators: [{
1327
+ type: Component,
1328
+ args: [{ selector: 'monkeyecx-version-changed', encapsulation: ViewEncapsulation.None, template: "<monkey-modal [config]=\"config\" [modalRef]=\"modalRef\" *ngIf=\"config\">\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\n <span class=\"h2\">\n {{ 'SCREENS.VERSION-CHANGED.TITLE' | translate }}\n </span>\n <span class=\"information-title mt-4\">\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-1' | translate }}\n </span>\n <span class=\"information mt-3\">\n {{ 'SCREENS.VERSION-CHANGED.INFORMATION-2' | translate }}\n </span>\n </div>\n <div class=\"d-flex flex-column justify-content-center align-items-center mt-5\">\n <monkey-button type=\"primary\" color=\"theme\" (click)=\"onClose()\">\n {{ 'SCREENS.VERSION-CHANGED.BUTTONS.UPDATE-VERSION' | translate }}\n </monkey-button>\n </div>\n</monkey-modal>", styles: ["monkeyecx-version-changed .body{padding:24px;width:100%}monkeyecx-version-changed .information-title{font-style:normal;font-weight:600;font-size:25px;line-height:32px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .information{font-style:normal;font-weight:400;font-size:20px;line-height:24px;display:flex;align-items:center;text-align:center;color:#4b4a53;max-width:600px}monkeyecx-version-changed .browser-name{font-style:normal;font-weight:400;font-size:16px;line-height:24px;text-align:center;color:#9c9ca6}monkeyecx-version-changed .option{text-decoration:none;padding:4px;background:#eee;border:1px solid #d6d6d6;box-sizing:border-box;border-radius:16px}monkeyecx-version-changed monkey-modal mecx-monkey-modal .body{margin-bottom:0!important}\n"] }]
1329
+ }], propDecorators: { config: [{
1330
+ type: Input
1331
+ }], modalRef: [{
1332
+ type: Input
1333
+ }] } });
1404
1334
 
1405
- /* eslint-disable object-curly-newline */
1335
+ class VersionChangedModule {
1336
+ }
1337
+ VersionChangedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1338
+ VersionChangedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedModule, declarations: [VersionChangedComponent], imports: [CommonModule,
1339
+ MonkeyButtonModule,
1340
+ MonkeyIconModule,
1341
+ MonkeyInputModule,
1342
+ MonkeyModalModule, i1$1.TranslateModule], exports: [VersionChangedComponent] });
1343
+ VersionChangedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedModule, imports: [[
1344
+ CommonModule,
1345
+ MonkeyButtonModule,
1346
+ MonkeyIconModule,
1347
+ MonkeyInputModule,
1348
+ MonkeyModalModule,
1349
+ TranslateModule.forChild()
1350
+ ]] });
1351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: VersionChangedModule, decorators: [{
1352
+ type: NgModule,
1353
+ args: [{
1354
+ declarations: [VersionChangedComponent],
1355
+ imports: [
1356
+ CommonModule,
1357
+ MonkeyButtonModule,
1358
+ MonkeyIconModule,
1359
+ MonkeyInputModule,
1360
+ MonkeyModalModule,
1361
+ TranslateModule.forChild()
1362
+ ],
1363
+ exports: [VersionChangedComponent]
1364
+ }]
1365
+ }] });
1366
+
1367
+ /* eslint-disable space-before-function-paren */
1368
+ /* eslint-disable func-names */
1369
+ function MonkeyEcxCoreCharts(render = true) {
1370
+ return (target, propertyName, propertyDescriptor) => {
1371
+ const method = propertyDescriptor.value;
1372
+ propertyDescriptor.value = function (...args) {
1373
+ const context = this;
1374
+ if (render) {
1375
+ const scriptsLoaded = Array.from(document.scripts);
1376
+ scriptsLoaded.forEach((script) => {
1377
+ const { src } = script;
1378
+ if (src.search('www.gstatic.com/charts') > 0) {
1379
+ document.getElementsByTagName('head')[0].removeChild(script);
1380
+ }
1381
+ });
1382
+ const node = document.createElement('script');
1383
+ node.src = 'https://www.gstatic.com/charts/loader.js';
1384
+ node.type = 'text/javascript';
1385
+ node.async = true;
1386
+ node.id = 'monkeyecx-charts-settings';
1387
+ node.onload = () => {
1388
+ method.apply(context, args);
1389
+ };
1390
+ document.getElementsByTagName('head')[0].appendChild(node);
1391
+ }
1392
+ else {
1393
+ const scriptsLoaded = Array.from(document.scripts);
1394
+ scriptsLoaded.forEach((script) => {
1395
+ const { src } = script;
1396
+ if (src.search('www.gstatic.com/charts') > 0) {
1397
+ document.getElementsByTagName('head')[0].removeChild(script);
1398
+ }
1399
+ });
1400
+ method.apply(context, args);
1401
+ }
1402
+ };
1403
+ return propertyDescriptor;
1404
+ };
1405
+ }
1406
1406
 
1407
1407
  function MonkeyEcxCoreServiceConstructor() {
1408
1408
  return (target) => {