@dev-tcloud/tcloud-ui 0.0.5 → 0.0.6

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.
Files changed (42) hide show
  1. package/README.md +2 -0
  2. package/esm2020/lib/_directives/directives.module.mjs +16 -0
  3. package/esm2020/lib/_directives/tooltip/tooltip.directive.mjs +164 -0
  4. package/esm2020/lib/_modules/tcloud-ui-data-list/services/data-list.service.mjs +39 -0
  5. package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list-option/tcloud-ui-data-list-option.component.mjs +56 -0
  6. package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.component.mjs +250 -0
  7. package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.mjs +3 -0
  8. package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.module.mjs +36 -0
  9. package/esm2020/lib/_modules/tcloud-ui-multi-select/tcloud-ui-multi-select.component.mjs +79 -0
  10. package/esm2020/lib/_modules/tcloud-ui-multi-select/tcloud-ui-multi-select.module.mjs +20 -0
  11. package/esm2020/lib/_pipes/cnpj.mjs +37 -0
  12. package/esm2020/lib/_pipes/cpf.mjs +37 -0
  13. package/esm2020/lib/_pipes/index.mjs +6 -0
  14. package/esm2020/lib/_pipes/monthname.mjs +25 -0
  15. package/esm2020/lib/_pipes/respective.mjs +68 -0
  16. package/esm2020/lib/_pipes/statusinfo.mjs +78 -0
  17. package/esm2020/lib/_pipes/tcloud-pipes.module.mjs +47 -0
  18. package/esm2020/lib/tcloud-ui.module.mjs +47 -7
  19. package/esm2020/public-api.mjs +18 -1
  20. package/fesm2015/dev-tcloud-tcloud-ui.mjs +963 -11
  21. package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
  22. package/fesm2020/dev-tcloud-tcloud-ui.mjs +956 -11
  23. package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
  24. package/lib/_directives/directives.module.d.ts +7 -0
  25. package/lib/_directives/tooltip/tooltip.directive.d.ts +34 -0
  26. package/lib/_modules/tcloud-ui-data-list/services/data-list.service.d.ts +20 -0
  27. package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list-option/tcloud-ui-data-list-option.component.d.ts +22 -0
  28. package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.component.d.ts +61 -0
  29. package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.d.ts +4 -0
  30. package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.module.d.ts +10 -0
  31. package/lib/_modules/tcloud-ui-multi-select/tcloud-ui-multi-select.component.d.ts +18 -0
  32. package/lib/_modules/tcloud-ui-multi-select/tcloud-ui-multi-select.module.d.ts +8 -0
  33. package/lib/_pipes/cnpj.d.ts +9 -0
  34. package/lib/_pipes/cpf.d.ts +9 -0
  35. package/lib/_pipes/index.d.ts +5 -0
  36. package/lib/_pipes/monthname.d.ts +8 -0
  37. package/lib/_pipes/respective.d.ts +11 -0
  38. package/lib/_pipes/statusinfo.d.ts +15 -0
  39. package/lib/_pipes/tcloud-pipes.module.d.ts +11 -0
  40. package/lib/tcloud-ui.module.d.ts +5 -1
  41. package/package.json +1 -1
  42. package/public-api.d.ts +9 -0
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, Injectable, EventEmitter, Output, ViewChild } from '@angular/core';
2
+ import { Component, Input, NgModule, Injectable, EventEmitter, Output, ViewChild, forwardRef, Directive, HostListener, Pipe } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { Buffer } from 'buffer';
6
6
  import { Subject } from 'rxjs';
7
7
  import * as i1$1 from '@angular/router';
8
- import * as i3 from '@angular/forms';
9
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
8
+ import * as i2 from '@angular/forms';
9
+ import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormControl } from '@angular/forms';
10
10
  import { trigger, state, style, transition, animate } from '@angular/animations';
11
11
 
12
12
  class TCloudUiLinhaLogoComponent {
@@ -731,7 +731,7 @@ class TCloudUiModalFooterComponent {
731
731
  }
732
732
  }
733
733
  TCloudUiModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModalFooterComponent, deps: [{ token: TcloudModalService }], target: i0.ɵɵFactoryTarget.Component });
734
- TCloudUiModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiModalFooterComponent, selector: "tcloud-ui-modal-footer", inputs: { btnCloseText: "btnCloseText", btnCancelText: "btnCancelText", btnConfirmText: "btnConfirmText" }, viewQueries: [{ propertyName: "_formulario", first: true, predicate: ["_formulario"], descendants: true }], ngImport: i0, template: "<div class=\"tc-modal-footer\">\r\n\r\n <div class=\"input-confirm\" *ngIf=\"param_confirm && param_confirm.confirmText\">\r\n <p>Digite a palavra <strong>&quot;{{ param_confirm.confirmText }}&quot;</strong> para confirmar.</p>\r\n \r\n <form #_formulario=\"ngForm\" (ngSubmit)=\"toConfirm(_formulario.valid)\">\r\n <input \r\n [disabled]=\"loading\"\r\n placeholder=\"{{ param_confirm.confirmText }}\"\r\n name=\"txt_value\" \r\n [(ngModel)]=\"txt_value\" \r\n type=\"text\" \r\n class=\"form-control form-confirm\" \r\n required \r\n [class.different-text]=\"(txt_value).length >= (param_confirm.confirmText).length && (txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase()\" >\r\n </form>\r\n\r\n </div>\r\n\r\n <hr>\r\n\r\n <div class=\"actions-footer {{ (loading) ? 'state-loading' : '' }}\">\r\n <!-- {{ param_confirm | json }} -->\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && !param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toClose()\">{{ btnCloseText }}</button>\r\n\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toCancel()\">{{ btnCancelText }}</button>\r\n <button [disabled]=\"(txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase() || loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"ml-3 btn-new-green\" (click)=\"toConfirm(_formulario?.valid)\">{{ btnConfirmText }}</button>\r\n\r\n </div>\r\n</div>\r\n", styles: [".actions-footer{text-align:right}.ng-valid.ng-touched.different-text{border-color:#fb9c23}.form-confirm{max-width:200px}button:disabled{opacity:.7!important;cursor:not-allowed}.input-confirm{padding:5px 14px}.state-loading button{cursor:progress!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
734
+ TCloudUiModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiModalFooterComponent, selector: "tcloud-ui-modal-footer", inputs: { btnCloseText: "btnCloseText", btnCancelText: "btnCancelText", btnConfirmText: "btnConfirmText" }, viewQueries: [{ propertyName: "_formulario", first: true, predicate: ["_formulario"], descendants: true }], ngImport: i0, template: "<div class=\"tc-modal-footer\">\r\n\r\n <div class=\"input-confirm\" *ngIf=\"param_confirm && param_confirm.confirmText\">\r\n <p>Digite a palavra <strong>&quot;{{ param_confirm.confirmText }}&quot;</strong> para confirmar.</p>\r\n \r\n <form #_formulario=\"ngForm\" (ngSubmit)=\"toConfirm(_formulario.valid)\">\r\n <input \r\n [disabled]=\"loading\"\r\n placeholder=\"{{ param_confirm.confirmText }}\"\r\n name=\"txt_value\" \r\n [(ngModel)]=\"txt_value\" \r\n type=\"text\" \r\n class=\"form-control form-confirm\" \r\n required \r\n [class.different-text]=\"(txt_value).length >= (param_confirm.confirmText).length && (txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase()\" >\r\n </form>\r\n\r\n </div>\r\n\r\n <hr>\r\n\r\n <div class=\"actions-footer {{ (loading) ? 'state-loading' : '' }}\">\r\n <!-- {{ param_confirm | json }} -->\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && !param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toClose()\">{{ btnCloseText }}</button>\r\n\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toCancel()\">{{ btnCancelText }}</button>\r\n <button [disabled]=\"(txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase() || loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"ml-3 btn-new-green\" (click)=\"toConfirm(_formulario?.valid)\">{{ btnConfirmText }}</button>\r\n\r\n </div>\r\n</div>\r\n", styles: [".actions-footer{text-align:right}.ng-valid.ng-touched.different-text{border-color:#fb9c23}.form-confirm{max-width:200px}button:disabled{opacity:.7!important;cursor:not-allowed}.input-confirm{padding:5px 14px}.state-loading button{cursor:progress!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
735
735
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModalFooterComponent, decorators: [{
736
736
  type: Component,
737
737
  args: [{ selector: 'tcloud-ui-modal-footer', template: "<div class=\"tc-modal-footer\">\r\n\r\n <div class=\"input-confirm\" *ngIf=\"param_confirm && param_confirm.confirmText\">\r\n <p>Digite a palavra <strong>&quot;{{ param_confirm.confirmText }}&quot;</strong> para confirmar.</p>\r\n \r\n <form #_formulario=\"ngForm\" (ngSubmit)=\"toConfirm(_formulario.valid)\">\r\n <input \r\n [disabled]=\"loading\"\r\n placeholder=\"{{ param_confirm.confirmText }}\"\r\n name=\"txt_value\" \r\n [(ngModel)]=\"txt_value\" \r\n type=\"text\" \r\n class=\"form-control form-confirm\" \r\n required \r\n [class.different-text]=\"(txt_value).length >= (param_confirm.confirmText).length && (txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase()\" >\r\n </form>\r\n\r\n </div>\r\n\r\n <hr>\r\n\r\n <div class=\"actions-footer {{ (loading) ? 'state-loading' : '' }}\">\r\n <!-- {{ param_confirm | json }} -->\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && !param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toClose()\">{{ btnCloseText }}</button>\r\n\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toCancel()\">{{ btnCancelText }}</button>\r\n <button [disabled]=\"(txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase() || loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"ml-3 btn-new-green\" (click)=\"toConfirm(_formulario?.valid)\">{{ btnConfirmText }}</button>\r\n\r\n </div>\r\n</div>\r\n", styles: [".actions-footer{text-align:right}.ng-valid.ng-touched.different-text{border-color:#fb9c23}.form-confirm{max-width:200px}button:disabled{opacity:.7!important;cursor:not-allowed}.input-confirm{padding:5px 14px}.state-loading button{cursor:progress!important}\n"] }]
@@ -873,23 +873,963 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
873
873
  }]
874
874
  }] });
875
875
 
876
+ class TCloudUiMultiSelectComponent {
877
+ constructor() {
878
+ this.placeholder = 'Selecione um item';
879
+ this.disabled = false;
880
+ this.loading = false;
881
+ this.count_actives = 0;
882
+ this.tcChange = new EventEmitter();
883
+ }
884
+ ngOnInit() {
885
+ setTimeout(() => {
886
+ this.toChange();
887
+ });
888
+ }
889
+ addItem(item) {
890
+ if (this.disabled) {
891
+ return;
892
+ }
893
+ if (this.tcList) {
894
+ for (let i = 0; i < (this.tcList).length; i++) {
895
+ const row = this.tcList[i];
896
+ if (item === row.value) {
897
+ this.tcList[i].active = true;
898
+ break;
899
+ }
900
+ }
901
+ this.toChange();
902
+ }
903
+ }
904
+ removeItem(item) {
905
+ if (this.disabled) {
906
+ return;
907
+ }
908
+ if (this.tcList) {
909
+ for (let i = 0; i < (this.tcList).length; i++) {
910
+ const row = this.tcList[i];
911
+ if (item === row.value) {
912
+ this.tcList[i].active = false;
913
+ break;
914
+ }
915
+ }
916
+ this.toChange();
917
+ }
918
+ }
919
+ toChange() {
920
+ let count_actives = 0;
921
+ let itens = [];
922
+ if (this.tcList) {
923
+ for (let i = 0; i < (this.tcList).length; i++) {
924
+ const row = this.tcList[i];
925
+ if (row.active) {
926
+ count_actives++;
927
+ (itens).push(row);
928
+ }
929
+ }
930
+ }
931
+ this.count_actives = count_actives;
932
+ this.tcChange.emit(itens);
933
+ }
934
+ }
935
+ TCloudUiMultiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
936
+ TCloudUiMultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiMultiSelectComponent, selector: "tcloud-ui-multi-select", inputs: { tcList: "tcList", placeholder: "placeholder", disabled: "disabled", loading: "loading" }, outputs: { tcChange: "tcChange" }, ngImport: i0, template: "<div>\r\n <table>\r\n <tr *ngIf=\"tcList\">\r\n <td>\r\n <select\r\n #_select\r\n [disabled]=\"tcList === undefined || (tcList && tcList.length === 0) || disabled || loading\"\r\n [title]=\"tcList.length === 0 ? 'Nenhum item dispon\u00EDvel' : placeholder\">\r\n <option></option>\r\n <ng-container *ngFor=\"let item of tcList; let i = index\">\r\n <option [title]=\"item.description\" *ngIf=\"!item.active\" [value]=\"item.value\">{{ item.description }}</option>\r\n </ng-container>\r\n </select>\r\n </td>\r\n <td>\r\n <button\r\n [disabled]=\"tcList === undefined || (tcList && tcList.length === 0) || disabled || loading\"\r\n title=\"Adicionar\"\r\n class=\"btn-plus-select\"\r\n (click)=\"addItem(_select.value)\"\r\n type=\"button\">\r\n <i class=\"fas fa-plus\"></i>\r\n </button>\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n <div class=\"box-itens-selected\" *ngIf=\"count_actives > 0\">\r\n <ng-container *ngFor=\"let item of tcList\">\r\n <div class=\"itens-selected\" *ngIf=\"item.active\" [title]=\"item.description\">\r\n {{ item.description }}\r\n <button\r\n [disabled]=\"tcList === undefined || (tcList && tcList.length === 0) || disabled || loading\"\r\n title=\"Remover\"\r\n type=\"button\"\r\n (click)=\"removeItem(item.value)\">\r\n <i class=\"fas fa-times\"></i>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: ["table{width:100%;border-collapse:collapse;border:none}table td:first-child{width:100%}select{font-size:.8rem;height:40px;border:1px solid #999;border-radius:4px 0 0 4px;padding:6px 10px;white-space:nowrap;text-overflow:ellipsis;width:100%;background-color:#fff;color:#888}.btn-plus-select{width:30px;height:40px;border:none;color:#fff;background-color:var(--verde);border-radius:0 4px 4px 0}.box-itens-selected{display:flex;padding:9px;background-color:#ededed;border-radius:4px}.itens-selected{display:inline;width:100%;max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:1px solid #ccc;height:35px;min-width:100px;background-color:var(--verde);color:#fff;padding:8px 15px 10px;border:none;border-radius:5px;margin:2px}.itens-selected button{position:relative;right:0;z-index:1;float:right;line-height:1;top:2px;left:10px;color:#d72020;background-color:var(--verde);border:none;font-weight:700;cursor:pointer}select:disabled{opacity:.8!important;cursor:not-allowed!important;background-color:#ededed}button:disabled{opacity:.5!important;cursor:not-allowed!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
937
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiSelectComponent, decorators: [{
938
+ type: Component,
939
+ args: [{ selector: 'tcloud-ui-multi-select', template: "<div>\r\n <table>\r\n <tr *ngIf=\"tcList\">\r\n <td>\r\n <select\r\n #_select\r\n [disabled]=\"tcList === undefined || (tcList && tcList.length === 0) || disabled || loading\"\r\n [title]=\"tcList.length === 0 ? 'Nenhum item dispon\u00EDvel' : placeholder\">\r\n <option></option>\r\n <ng-container *ngFor=\"let item of tcList; let i = index\">\r\n <option [title]=\"item.description\" *ngIf=\"!item.active\" [value]=\"item.value\">{{ item.description }}</option>\r\n </ng-container>\r\n </select>\r\n </td>\r\n <td>\r\n <button\r\n [disabled]=\"tcList === undefined || (tcList && tcList.length === 0) || disabled || loading\"\r\n title=\"Adicionar\"\r\n class=\"btn-plus-select\"\r\n (click)=\"addItem(_select.value)\"\r\n type=\"button\">\r\n <i class=\"fas fa-plus\"></i>\r\n </button>\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n <div class=\"box-itens-selected\" *ngIf=\"count_actives > 0\">\r\n <ng-container *ngFor=\"let item of tcList\">\r\n <div class=\"itens-selected\" *ngIf=\"item.active\" [title]=\"item.description\">\r\n {{ item.description }}\r\n <button\r\n [disabled]=\"tcList === undefined || (tcList && tcList.length === 0) || disabled || loading\"\r\n title=\"Remover\"\r\n type=\"button\"\r\n (click)=\"removeItem(item.value)\">\r\n <i class=\"fas fa-times\"></i>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: ["table{width:100%;border-collapse:collapse;border:none}table td:first-child{width:100%}select{font-size:.8rem;height:40px;border:1px solid #999;border-radius:4px 0 0 4px;padding:6px 10px;white-space:nowrap;text-overflow:ellipsis;width:100%;background-color:#fff;color:#888}.btn-plus-select{width:30px;height:40px;border:none;color:#fff;background-color:var(--verde);border-radius:0 4px 4px 0}.box-itens-selected{display:flex;padding:9px;background-color:#ededed;border-radius:4px}.itens-selected{display:inline;width:100%;max-width:200px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border:1px solid #ccc;height:35px;min-width:100px;background-color:var(--verde);color:#fff;padding:8px 15px 10px;border:none;border-radius:5px;margin:2px}.itens-selected button{position:relative;right:0;z-index:1;float:right;line-height:1;top:2px;left:10px;color:#d72020;background-color:var(--verde);border:none;font-weight:700;cursor:pointer}select:disabled{opacity:.8!important;cursor:not-allowed!important;background-color:#ededed}button:disabled{opacity:.5!important;cursor:not-allowed!important}\n"] }]
940
+ }], ctorParameters: function () { return []; }, propDecorators: { tcList: [{
941
+ type: Input
942
+ }], placeholder: [{
943
+ type: Input
944
+ }], disabled: [{
945
+ type: Input
946
+ }], loading: [{
947
+ type: Input
948
+ }], tcChange: [{
949
+ type: Output
950
+ }] } });
951
+
952
+ class TCloudUiMultiSelectModule {
953
+ }
954
+ TCloudUiMultiSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
955
+ TCloudUiMultiSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiSelectModule, declarations: [TCloudUiMultiSelectComponent], imports: [CommonModule], exports: [TCloudUiMultiSelectComponent] });
956
+ TCloudUiMultiSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiSelectModule, imports: [CommonModule] });
957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiSelectModule, decorators: [{
958
+ type: NgModule,
959
+ args: [{
960
+ declarations: [TCloudUiMultiSelectComponent],
961
+ exports: [TCloudUiMultiSelectComponent],
962
+ imports: [
963
+ CommonModule
964
+ ]
965
+ }]
966
+ }] });
967
+
968
+ class DataListService {
969
+ constructor() {
970
+ this._stateSourceValue = new Subject();
971
+ this.stateValue$ = this._stateSourceValue.asObservable();
972
+ this._stateSourceDescription = new Subject();
973
+ this.stateDescription$ = this._stateSourceDescription.asObservable();
974
+ this._stateSourceOptions = new Subject();
975
+ this.stateOptions$ = this._stateSourceOptions.asObservable();
976
+ this._stateSourceActive = new Subject();
977
+ this.stateActive$ = this._stateSourceActive.asObservable();
978
+ }
979
+ setItemValue(v) {
980
+ this.actived_value = v;
981
+ this._stateSourceValue.next(v);
982
+ }
983
+ setItemDescription(v) {
984
+ this._stateSourceDescription.next(v);
985
+ }
986
+ registerSelectionOptionsDescription(v) {
987
+ this._stateSourceOptions.next(v);
988
+ }
989
+ setActiveItem(v) {
990
+ // console.log('setActiveItem', v);
991
+ this._stateSourceActive.next(v);
992
+ }
993
+ getActiveItem() {
994
+ // console.log('getActiveItem', this.actived_value);
995
+ return this.actived_value;
996
+ }
997
+ }
998
+ DataListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DataListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
999
+ DataListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DataListService });
1000
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DataListService, decorators: [{
1001
+ type: Injectable
1002
+ }] });
1003
+
1004
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
1005
+ provide: NG_VALUE_ACCESSOR,
1006
+ useExisting: forwardRef(() => TCloudUiDataListComponent),
1007
+ multi: true
1008
+ };
1009
+ const noop = () => {
1010
+ };
1011
+ class TCloudUiDataListComponent {
1012
+ constructor(dataListService, formBuilder) {
1013
+ this.dataListService = dataListService;
1014
+ this.formBuilder = formBuilder;
1015
+ this.viewport_width = 0;
1016
+ this.viewport_height = 0;
1017
+ this.box_height = 0;
1018
+ this.box_style = '';
1019
+ this.menu_on_top = '';
1020
+ this.placeholder = '';
1021
+ this._disabled = false;
1022
+ this._loading = false;
1023
+ this.search = true;
1024
+ this.onInputChange = new EventEmitter();
1025
+ this.onChange = new EventEmitter();
1026
+ this.list_selected_options = new Array();
1027
+ this.menu_show = false;
1028
+ this.search_text = '';
1029
+ this.id = '';
1030
+ //Placeholders for the callbacks which are later providesd
1031
+ //by the Control Value Accessor
1032
+ this.onTouchedCallback = noop;
1033
+ this.onChangeCallback = noop;
1034
+ }
1035
+ set disabled(v) {
1036
+ this._disabled = v;
1037
+ if (this._disabled) {
1038
+ this.selected_description = '';
1039
+ this.selected_item = '';
1040
+ this.toChange();
1041
+ }
1042
+ }
1043
+ get disabled() { return this._disabled; }
1044
+ set loading(v) {
1045
+ this._loading = v;
1046
+ if (this._loading) {
1047
+ this.selected_description = '';
1048
+ this.selected_item = '';
1049
+ this.toChange();
1050
+ }
1051
+ }
1052
+ get loading() { return this._loading; }
1053
+ set ngModel(v) {
1054
+ this.selected_item = v;
1055
+ this.selectDescription();
1056
+ }
1057
+ ngOnInit() {
1058
+ this.id = this.generateID();
1059
+ this.formulario = this.formBuilder.group({
1060
+ "selected_item": new FormControl('', []),
1061
+ });
1062
+ this.subscription_value = this.dataListService.stateValue$.subscribe(v => {
1063
+ this.selected_item = v;
1064
+ this.selectDescription();
1065
+ });
1066
+ this.subscription_description = this.dataListService.stateDescription$.subscribe(v => {
1067
+ this.selected_description = v;
1068
+ });
1069
+ this.subscription_options = this.dataListService.stateOptions$.subscribe((v) => {
1070
+ if (v && v.value) {
1071
+ (this.list_selected_options).push(v);
1072
+ }
1073
+ });
1074
+ this.toResize();
1075
+ this.toClick();
1076
+ }
1077
+ generateID() {
1078
+ return `data-list-${Math.floor(Math.random() * Math.floor(Math.random() * Date.now()))}`;
1079
+ }
1080
+ ngOnDestroy() {
1081
+ if (this.subscription_value) {
1082
+ this.subscription_value.unsubscribe();
1083
+ }
1084
+ if (this.subscription_description) {
1085
+ this.subscription_description.unsubscribe();
1086
+ }
1087
+ if (this.subscription_options) {
1088
+ this.subscription_options.unsubscribe();
1089
+ }
1090
+ }
1091
+ toSearch(e) {
1092
+ let input = (e && e.target && e.target.value) ? e.target.value : '';
1093
+ let filter = (((input).normalize('NFD').replace(/[\u0300-\u036f]/g, "")).trim()).toLowerCase();
1094
+ let ul = document.getElementById(`${this.id}-options`);
1095
+ let li = ul.getElementsByTagName("button");
1096
+ for (let i = 0; i < li.length; i++) {
1097
+ const a = li[i];
1098
+ const txtValue = (((a.textContent || a.innerText).normalize('NFD').replace(/[\u0300-\u036f]/g, "")).trim()).toLowerCase();
1099
+ if (txtValue.indexOf(filter) > -1) {
1100
+ li[i].style.display = "";
1101
+ }
1102
+ else {
1103
+ li[i].style.display = "none";
1104
+ }
1105
+ }
1106
+ }
1107
+ selectDescription() {
1108
+ if (this.list_selected_options && (this.list_selected_options).length > 0) {
1109
+ for (let i = 0; i < (this.list_selected_options).length; i++) {
1110
+ const item = this.list_selected_options[i];
1111
+ if (item.value === this.selected_item) {
1112
+ this.selected_description = item.description;
1113
+ this.toChange();
1114
+ return;
1115
+ }
1116
+ }
1117
+ }
1118
+ if (this.selected_item === undefined || this.selected_item === null || this.selected_item === '') {
1119
+ this.toChange();
1120
+ }
1121
+ }
1122
+ toInput(e) {
1123
+ this.onChange.emit(e);
1124
+ }
1125
+ toChange() {
1126
+ setTimeout(() => {
1127
+ var _a, _b;
1128
+ if (this.selected_item === undefined || this.selected_item === null) {
1129
+ this.selected_item = '';
1130
+ }
1131
+ this.toSearch('');
1132
+ this.search_text = '';
1133
+ this.dataListService.setActiveItem(this.selected_item);
1134
+ this.onInputChange.emit(this.selected_description);
1135
+ if (this.formulario) {
1136
+ (_b = (_a = this.formulario) === null || _a === void 0 ? void 0 : _a.get('selected_item')) === null || _b === void 0 ? void 0 : _b.setValue(this.selected_item);
1137
+ // const input_hidden = document.getElementById(`${this.id}-hidden`);
1138
+ this.toInput(this.formulario.get('selected_item'));
1139
+ }
1140
+ });
1141
+ }
1142
+ clearTextSearch() {
1143
+ this.search_text = '';
1144
+ this.toSearch('');
1145
+ }
1146
+ toOpen() {
1147
+ this.menu_show = !this.menu_show;
1148
+ this.resolve_position_dropdown(this.menu_show);
1149
+ }
1150
+ resolve_position_dropdown(open) {
1151
+ var _a;
1152
+ if (open) {
1153
+ this.box_style = '';
1154
+ this.menu_on_top = '';
1155
+ const id = `${this.id}`;
1156
+ const box = `box-${this.id}`;
1157
+ if (this.viewport_height === 0) {
1158
+ this.viewport_height = window.innerWidth;
1159
+ }
1160
+ const rect = (_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
1161
+ const box_position = (rect === null || rect === void 0 ? void 0 : rect.bottom) || 0;
1162
+ setTimeout(() => {
1163
+ var _a;
1164
+ this.box_height = ((_a = document.getElementById(box)) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0;
1165
+ if ((this.viewport_height - box_position) < this.box_height) {
1166
+ this.menu_on_top = 'menu-on-top';
1167
+ this.box_style = `top: -${(this.box_height)}px; height: ${this.box_height}px;`;
1168
+ }
1169
+ });
1170
+ }
1171
+ }
1172
+ toClose() {
1173
+ this.menu_show = false;
1174
+ }
1175
+ toResize() {
1176
+ window.addEventListener('resize', () => {
1177
+ this.viewport_width = window.innerWidth;
1178
+ this.viewport_height = window.innerHeight;
1179
+ this.resolve_position_dropdown(this.menu_show);
1180
+ });
1181
+ }
1182
+ toClick() {
1183
+ const box = `area-${this.id}`;
1184
+ window.addEventListener('click', (e) => {
1185
+ var _a;
1186
+ if (this.menu_show) {
1187
+ if (!((_a = document.getElementById(box)) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
1188
+ this.menu_show = false;
1189
+ }
1190
+ }
1191
+ });
1192
+ }
1193
+ //get accessor
1194
+ get value() {
1195
+ return this.selected_item;
1196
+ }
1197
+ ;
1198
+ //set accessor including call the onchange callback
1199
+ set value(v) {
1200
+ if (v !== this.selected_item) {
1201
+ this.selected_item = v;
1202
+ this.onChangeCallback(v);
1203
+ }
1204
+ }
1205
+ //Set touched on blur
1206
+ onBlur() {
1207
+ this.onTouchedCallback();
1208
+ }
1209
+ //From ControlValueAccessor interface
1210
+ writeValue(value) {
1211
+ if (value !== this.selected_item) {
1212
+ this.selected_item = value;
1213
+ }
1214
+ }
1215
+ //From ControlValueAccessor interface
1216
+ registerOnChange(fn) {
1217
+ this.onChangeCallback = fn;
1218
+ }
1219
+ //From ControlValueAccessor interface
1220
+ registerOnTouched(fn) {
1221
+ this.onTouchedCallback = fn;
1222
+ }
1223
+ }
1224
+ TCloudUiDataListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListComponent, deps: [{ token: DataListService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
1225
+ TCloudUiDataListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiDataListComponent, selector: "tcloud-ui-data-list", inputs: { placeholder: "placeholder", disabled: "disabled", loading: "loading", search: "search", ngModel: "ngModel" }, outputs: { onInputChange: "onInputChange", onChange: "onChange" }, providers: [
1226
+ DataListService,
1227
+ CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR
1228
+ ], ngImport: i0, template: "<div *ngIf=\"formulario\" id=\"area-{{ id }}\" class=\"tc-dropdown\" [class.disabled]=\"disabled || loading\">\r\n <div *ngIf=\"loading\" class=\"loading-area\">\r\n <i class=\"fas fa-spinner fa-spin\"></i>\r\n </div>\r\n <!-- [attr.data-bs-toggle]=\"'dropdown'\" -->\r\n <button \r\n [class.loading-box]=\"loading\"\r\n [disabled]=\"disabled || loading\"\r\n class=\"dropdown-toggle button-select\" \r\n type=\"button\" \r\n id=\"{{ id }}\" \r\n \r\n [attr.aria-haspopup]=\"'true'\" \r\n [attr.aria-expanded]=\"'false'\" \r\n (click)=\"toOpen()\" >\r\n\r\n <i *ngIf=\"(selected_description === undefined || selected_description === null || selected_description === '' ) && !loading \">{{ placeholder }}</i>\r\n {{ selected_description }}\r\n <span><i class=\"fas fa-angle-down\"></i></span>\r\n </button>\r\n <div class=\"tc-dropdown-menu {{ menu_on_top }}\" id=\"box-{{ id }}\" [attr.aria-labelledby]=\"id\" [class.to-hide]=\"!menu_show\" [style]=\"box_style\">\r\n\r\n <div class=\"line-search\" *ngIf=\"search\">\r\n <table class=\"box-search\">\r\n <tr>\r\n\r\n <td class=\"area-input\">\r\n <input type=\"text\" [(ngModel)]=\"search_text\" (input)=\"toSearch($event)\" placeholder=\"Buscar...\" > \r\n </td>\r\n\r\n <td class=\"area-icon\">\r\n <i *ngIf=\"search_text === ''\" class=\"fas fa-search icon-search\"></i>\r\n <button type=\"button\" *ngIf=\"search_text !== ''\" (click)=\"clearTextSearch()\"><i class=\"fas fa-times\"></i></button>\r\n </td>\r\n \r\n </tr>\r\n </table>\r\n </div>\r\n \r\n <div class=\"area-options\" id=\"{{ id }}-options\" (click)=\"toClose()\">\r\n <ng-content></ng-content> \r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"formulario\">\r\n <form [formGroup]=\"formulario\" style=\"display: none;\" >\r\n <input id=\"{{ id }}-hidden\" formControlName=\"selected_item\" type=\"hidden\">\r\n </form>\r\n</div>", styles: [".dropdown-toggle:after{display:none!important}.tc-dropdown{position:relative}.tc-dropdown .button-select{width:100%;background-color:#fff;border:1px solid #ccc;height:35px;text-align:left;padding-left:15px;font-size:14px;color:#666}.tc-dropdown .button-select span{position:absolute;right:6px;top:7px}.tc-dropdown .tc-dropdown-menu{width:100%;border:1px solid #ccc;background-color:#fff}.tc-dropdown .area-options{max-height:200px;overflow-y:scroll;overflow-x:hidden}.tc-dropdown .menu-on-top{position:absolute}.line-search{padding:3px}.line-search .box-search{width:100%;border-collapse:collapse}.line-search .box-search td.area-icon{padding:4px 0 2px 8px;width:35px}.line-search .box-search td.area-icon .icon-search{color:#666}.line-search .box-search td.area-icon button{border:none;background-color:transparent;color:#999;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.line-search .box-search td.area-input{border:none}.line-search .box-search td.area-input input{width:100%}.line-search .box-search input{width:100%;font-size:13px;height:33px;border:1px solid #ccc;padding:10px}.loading-area{line-height:0;position:relative;height:0;bottom:-10px;left:10px}button:disabled{background-color:#eee!important;border:1px solid #ececec!important;cursor:not-allowed}.loading-box{cursor:progress!important}.disabled i{color:#999!important}.to-hide{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
1229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListComponent, decorators: [{
1230
+ type: Component,
1231
+ args: [{ selector: 'tcloud-ui-data-list', providers: [
1232
+ DataListService,
1233
+ CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR
1234
+ ], template: "<div *ngIf=\"formulario\" id=\"area-{{ id }}\" class=\"tc-dropdown\" [class.disabled]=\"disabled || loading\">\r\n <div *ngIf=\"loading\" class=\"loading-area\">\r\n <i class=\"fas fa-spinner fa-spin\"></i>\r\n </div>\r\n <!-- [attr.data-bs-toggle]=\"'dropdown'\" -->\r\n <button \r\n [class.loading-box]=\"loading\"\r\n [disabled]=\"disabled || loading\"\r\n class=\"dropdown-toggle button-select\" \r\n type=\"button\" \r\n id=\"{{ id }}\" \r\n \r\n [attr.aria-haspopup]=\"'true'\" \r\n [attr.aria-expanded]=\"'false'\" \r\n (click)=\"toOpen()\" >\r\n\r\n <i *ngIf=\"(selected_description === undefined || selected_description === null || selected_description === '' ) && !loading \">{{ placeholder }}</i>\r\n {{ selected_description }}\r\n <span><i class=\"fas fa-angle-down\"></i></span>\r\n </button>\r\n <div class=\"tc-dropdown-menu {{ menu_on_top }}\" id=\"box-{{ id }}\" [attr.aria-labelledby]=\"id\" [class.to-hide]=\"!menu_show\" [style]=\"box_style\">\r\n\r\n <div class=\"line-search\" *ngIf=\"search\">\r\n <table class=\"box-search\">\r\n <tr>\r\n\r\n <td class=\"area-input\">\r\n <input type=\"text\" [(ngModel)]=\"search_text\" (input)=\"toSearch($event)\" placeholder=\"Buscar...\" > \r\n </td>\r\n\r\n <td class=\"area-icon\">\r\n <i *ngIf=\"search_text === ''\" class=\"fas fa-search icon-search\"></i>\r\n <button type=\"button\" *ngIf=\"search_text !== ''\" (click)=\"clearTextSearch()\"><i class=\"fas fa-times\"></i></button>\r\n </td>\r\n \r\n </tr>\r\n </table>\r\n </div>\r\n \r\n <div class=\"area-options\" id=\"{{ id }}-options\" (click)=\"toClose()\">\r\n <ng-content></ng-content> \r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"formulario\">\r\n <form [formGroup]=\"formulario\" style=\"display: none;\" >\r\n <input id=\"{{ id }}-hidden\" formControlName=\"selected_item\" type=\"hidden\">\r\n </form>\r\n</div>", styles: [".dropdown-toggle:after{display:none!important}.tc-dropdown{position:relative}.tc-dropdown .button-select{width:100%;background-color:#fff;border:1px solid #ccc;height:35px;text-align:left;padding-left:15px;font-size:14px;color:#666}.tc-dropdown .button-select span{position:absolute;right:6px;top:7px}.tc-dropdown .tc-dropdown-menu{width:100%;border:1px solid #ccc;background-color:#fff}.tc-dropdown .area-options{max-height:200px;overflow-y:scroll;overflow-x:hidden}.tc-dropdown .menu-on-top{position:absolute}.line-search{padding:3px}.line-search .box-search{width:100%;border-collapse:collapse}.line-search .box-search td.area-icon{padding:4px 0 2px 8px;width:35px}.line-search .box-search td.area-icon .icon-search{color:#666}.line-search .box-search td.area-icon button{border:none;background-color:transparent;color:#999;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.line-search .box-search td.area-input{border:none}.line-search .box-search td.area-input input{width:100%}.line-search .box-search input{width:100%;font-size:13px;height:33px;border:1px solid #ccc;padding:10px}.loading-area{line-height:0;position:relative;height:0;bottom:-10px;left:10px}button:disabled{background-color:#eee!important;border:1px solid #ececec!important;cursor:not-allowed}.loading-box{cursor:progress!important}.disabled i{color:#999!important}.to-hide{display:none}\n"] }]
1235
+ }], ctorParameters: function () { return [{ type: DataListService }, { type: i2.FormBuilder }]; }, propDecorators: { placeholder: [{
1236
+ type: Input
1237
+ }], disabled: [{
1238
+ type: Input
1239
+ }], loading: [{
1240
+ type: Input
1241
+ }], search: [{
1242
+ type: Input
1243
+ }], onInputChange: [{
1244
+ type: Output
1245
+ }], onChange: [{
1246
+ type: Output
1247
+ }], ngModel: [{
1248
+ type: Input
1249
+ }] } });
1250
+
1251
+ class ISelectOptions {
1252
+ }
1253
+
1254
+ class TCloudUiDataListOptionComponent {
1255
+ constructor(dataListService) {
1256
+ this.dataListService = dataListService;
1257
+ this.id = '';
1258
+ this.select_options = new ISelectOptions();
1259
+ this.selected = new EventEmitter();
1260
+ this.subscription_active = dataListService.stateValue$.subscribe(v => { this.actived_value = v; });
1261
+ }
1262
+ ngOnInit() {
1263
+ this.id = this.generateID();
1264
+ this.setSelectOptions();
1265
+ }
1266
+ generateID() {
1267
+ return `data-list-option-${Math.floor(Math.random() * Math.floor(Math.random() * Date.now()))}`;
1268
+ }
1269
+ setSelectedItem(value) {
1270
+ var _a;
1271
+ if (value === '') {
1272
+ this.value = '';
1273
+ }
1274
+ this.dataListService.setItemValue(this.value);
1275
+ const description = ((_a = document.getElementById(this.id)) === null || _a === void 0 ? void 0 : _a.innerText) || '';
1276
+ this.dataListService.setItemDescription(description);
1277
+ this.setSelectOptions();
1278
+ }
1279
+ setSelectOptions() {
1280
+ setTimeout(() => {
1281
+ var _a;
1282
+ try {
1283
+ const description = (_a = document.getElementById(this.id)) === null || _a === void 0 ? void 0 : _a.innerText;
1284
+ this.select_options.value = this.value;
1285
+ this.select_options.description = description;
1286
+ this.dataListService.registerSelectionOptionsDescription(this.select_options);
1287
+ }
1288
+ catch (error) { }
1289
+ });
1290
+ }
1291
+ ngOnDestroy() {
1292
+ if (this.subscription_active) {
1293
+ this.subscription_active.unsubscribe();
1294
+ }
1295
+ }
1296
+ }
1297
+ TCloudUiDataListOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListOptionComponent, deps: [{ token: DataListService }], target: i0.ɵɵFactoryTarget.Component });
1298
+ TCloudUiDataListOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiDataListOptionComponent, selector: "tcloud-ui-data-list-option", inputs: { value: "value" }, outputs: { selected: "selected" }, ngImport: i0, template: "<button \r\n [title]=\"select_options.description\"\r\n id=\"{{id}}\"\r\n [attr.data-description]=\"select_options.description\"\r\n class=\"dropdown-item\" \r\n [class.null-value]=\"value === undefined || value === null || value === ''\"\r\n [class.active]=\"value === actived_value\" \r\n type=\"button\" \r\n [value]=\"value\"\r\n (click)=\"setSelectedItem(value)\" >\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: ["button{color:#666;width:100%;padding:10px;font-size:14px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}button:hover{background-color:#e5f5f9;color:#333}button.active{background-color:#ceedf5;color:#333}.null-value{height:35px}\n"] });
1299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListOptionComponent, decorators: [{
1300
+ type: Component,
1301
+ args: [{ selector: 'tcloud-ui-data-list-option', template: "<button \r\n [title]=\"select_options.description\"\r\n id=\"{{id}}\"\r\n [attr.data-description]=\"select_options.description\"\r\n class=\"dropdown-item\" \r\n [class.null-value]=\"value === undefined || value === null || value === ''\"\r\n [class.active]=\"value === actived_value\" \r\n type=\"button\" \r\n [value]=\"value\"\r\n (click)=\"setSelectedItem(value)\" >\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: ["button{color:#666;width:100%;padding:10px;font-size:14px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}button:hover{background-color:#e5f5f9;color:#333}button.active{background-color:#ceedf5;color:#333}.null-value{height:35px}\n"] }]
1302
+ }], ctorParameters: function () { return [{ type: DataListService }]; }, propDecorators: { value: [{
1303
+ type: Input
1304
+ }], selected: [{
1305
+ type: Output
1306
+ }] } });
1307
+
1308
+ class TCloudUiDataListModule {
1309
+ }
1310
+ TCloudUiDataListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1311
+ TCloudUiDataListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListModule, declarations: [TCloudUiDataListComponent,
1312
+ TCloudUiDataListOptionComponent], imports: [CommonModule,
1313
+ FormsModule,
1314
+ ReactiveFormsModule], exports: [TCloudUiDataListComponent,
1315
+ TCloudUiDataListOptionComponent] });
1316
+ TCloudUiDataListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListModule, imports: [CommonModule,
1317
+ FormsModule,
1318
+ ReactiveFormsModule] });
1319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListModule, decorators: [{
1320
+ type: NgModule,
1321
+ args: [{
1322
+ declarations: [
1323
+ TCloudUiDataListComponent,
1324
+ TCloudUiDataListOptionComponent,
1325
+ ],
1326
+ exports: [
1327
+ TCloudUiDataListComponent,
1328
+ TCloudUiDataListOptionComponent
1329
+ ],
1330
+ imports: [
1331
+ CommonModule,
1332
+ FormsModule,
1333
+ ReactiveFormsModule
1334
+ ]
1335
+ }]
1336
+ }] });
1337
+
1338
+ class TooltipDirective {
1339
+ constructor(el, renderer) {
1340
+ this.el = el;
1341
+ this.renderer = renderer;
1342
+ this._direction = 'top';
1343
+ // main
1344
+ this.el_height = 0;
1345
+ this.el_width = 0;
1346
+ this.el_center = 0;
1347
+ this.el_position = 0;
1348
+ // tooltip
1349
+ this.target_height = 0;
1350
+ this.target_width = 0;
1351
+ this.target_center = 0;
1352
+ this.ID = '';
1353
+ this.info_text = '';
1354
+ }
1355
+ onMouseOver() {
1356
+ if (this.getElement()) {
1357
+ const el = this.getElement();
1358
+ el.style.display = 'inline';
1359
+ setTimeout(() => {
1360
+ var _a;
1361
+ this.el_height = this.el.nativeElement.offsetHeight;
1362
+ this.el_width = this.el.nativeElement.offsetWidth;
1363
+ this.el_center = this.el_width / 2;
1364
+ const rect = (_a = this.el.nativeElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
1365
+ this.el_position = (rect === null || rect === void 0 ? void 0 : rect.left) || 0;
1366
+ // console.log('this.el_width', this.el_width);
1367
+ // console.log('this.el_center', this.el_center);
1368
+ // console.log('this.el_position', this.el_position);
1369
+ this.target_height = el.offsetHeight;
1370
+ this.target_width = el.offsetWidth;
1371
+ this.target_center = this.target_width / 2;
1372
+ // console.log('target_heigth', this.target_height);
1373
+ // console.log('target_width', this.target_width);
1374
+ // console.log('target_center', this.target_center);
1375
+ // this.renderer.setStyle(el, 'bottom', `${this.el_position}px`);
1376
+ switch (this._direction) {
1377
+ case 'top':
1378
+ this.to_top(el);
1379
+ break;
1380
+ case 'bottom':
1381
+ this.to_bottom(el);
1382
+ break;
1383
+ case 'left':
1384
+ this.to_left(el);
1385
+ break;
1386
+ case 'right':
1387
+ this.to_right(el);
1388
+ break;
1389
+ }
1390
+ });
1391
+ }
1392
+ }
1393
+ onMouseOut() {
1394
+ if (this.getElement()) {
1395
+ const el = this.getElement();
1396
+ el.style.display = 'none';
1397
+ }
1398
+ }
1399
+ set tooltip(tooltip) {
1400
+ if (tooltip) {
1401
+ this.check(tooltip);
1402
+ }
1403
+ }
1404
+ ;
1405
+ set direction(direction) {
1406
+ if (direction) {
1407
+ this._direction = direction;
1408
+ }
1409
+ }
1410
+ ;
1411
+ ngOnInit() {
1412
+ }
1413
+ generateID() {
1414
+ return `tc-tooltip-${Math.floor(Math.random() * Math.floor(Math.random() * Date.now()))}`;
1415
+ }
1416
+ getElement() {
1417
+ return document.getElementById(this.ID) || undefined;
1418
+ }
1419
+ check(tooltip) {
1420
+ this.ID = this.generateID();
1421
+ this.info_text = tooltip;
1422
+ let el = this.el.nativeElement;
1423
+ this.main_el = el;
1424
+ if (el) {
1425
+ this.create_tooltip(tooltip, el);
1426
+ }
1427
+ else {
1428
+ console.log("TCL: tooltip -> el", this.el.nativeElement);
1429
+ }
1430
+ }
1431
+ setStyle(el) {
1432
+ this.renderer.setStyle(el, 'position', 'relative');
1433
+ this.renderer.setStyle(el, 'border', '1px');
1434
+ this.renderer.setStyle(el, 'display', 'inline');
1435
+ }
1436
+ create_tooltip(tip, el) {
1437
+ this.setStyle(el);
1438
+ const tooltip = document.createElement("div");
1439
+ tooltip.setAttribute('id', this.ID);
1440
+ tooltip.setAttribute('style', `
1441
+ position: absolute;
1442
+ display: none;
1443
+ padding: .5rem;
1444
+ border-radius: 10px;
1445
+ text-align: center;
1446
+ width: max-content;
1447
+ max-width: 250px;
1448
+ background-color: transparent;
1449
+ color: transparent;
1450
+ z-index: 1090;
1451
+ bottom: ${this.el_position}px;
1452
+ left: ${this.target_center}px;
1453
+ `);
1454
+ tooltip.innerHTML = tip;
1455
+ el.insertBefore(tooltip, null);
1456
+ }
1457
+ to_top(el) {
1458
+ const pos = this.el_center - (this.target_center);
1459
+ this.renderer.setStyle(el, 'left', `${(pos)}px`);
1460
+ this.renderer.setStyle(el, 'bottom', `24px`);
1461
+ el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-top');
1462
+ }
1463
+ to_bottom(el) {
1464
+ const pos = this.el_center - (this.target_center);
1465
+ this.renderer.setStyle(el, 'left', `${(pos)}px`);
1466
+ this.renderer.setStyle(el, 'bottom', `-${(this.target_height + 7)}px`);
1467
+ el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-bottom');
1468
+ }
1469
+ to_right(el) {
1470
+ const pos = this.el_width;
1471
+ this.renderer.setStyle(el, 'left', `${(pos + 11)}px`);
1472
+ this.renderer.setStyle(el, 'bottom', `-${(((this.target_height) / 2) - (this.el_height / 2))}px`);
1473
+ el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-right');
1474
+ }
1475
+ to_left(el) {
1476
+ const pos = -((this.target_width));
1477
+ this.renderer.setStyle(el, 'left', `${(pos - 11)}px`);
1478
+ this.renderer.setStyle(el, 'bottom', `-${(((this.target_height) / 2) - (this.el_height / 2))}px`);
1479
+ el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-left');
1480
+ }
1481
+ }
1482
+ TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1483
+ TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TooltipDirective, selector: "[tooltip]", inputs: { tooltip: "tooltip", direction: "direction" }, host: { listeners: { "mouseover": "onMouseOver()", "mouseout": "onMouseOut()" } }, ngImport: i0 });
1484
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TooltipDirective, decorators: [{
1485
+ type: Directive,
1486
+ args: [{
1487
+ selector: '[tooltip]'
1488
+ }]
1489
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { onMouseOver: [{
1490
+ type: HostListener,
1491
+ args: ['mouseover']
1492
+ }], onMouseOut: [{
1493
+ type: HostListener,
1494
+ args: ['mouseout']
1495
+ }], tooltip: [{
1496
+ type: Input
1497
+ }], direction: [{
1498
+ type: Input
1499
+ }] } });
1500
+
1501
+ class TCloudAccessModule {
1502
+ }
1503
+ TCloudAccessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudAccessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1504
+ TCloudAccessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudAccessModule, declarations: [TooltipDirective], exports: [TooltipDirective] });
1505
+ TCloudAccessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudAccessModule });
1506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudAccessModule, decorators: [{
1507
+ type: NgModule,
1508
+ args: [{
1509
+ declarations: [TooltipDirective],
1510
+ exports: [TooltipDirective],
1511
+ }]
1512
+ }] });
1513
+
1514
+ class MonthNamePipe {
1515
+ constructor() {
1516
+ this.meses = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezenbro'];
1517
+ }
1518
+ transform(yyyy_mm) {
1519
+ if (yyyy_mm !== '') {
1520
+ let part = (yyyy_mm).split('-');
1521
+ if ((part).length === 2) {
1522
+ let yyyy = +part[0];
1523
+ let mm = +part[1];
1524
+ return this.meses[(mm - 1)];
1525
+ }
1526
+ }
1527
+ return '';
1528
+ }
1529
+ }
1530
+ MonthNamePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1531
+ MonthNamePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, name: "monthname" });
1532
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, decorators: [{
1533
+ type: Pipe,
1534
+ args: [{ name: 'monthname' }]
1535
+ }] });
1536
+
1537
+ class StatusInfoPipe {
1538
+ constructor() {
1539
+ this.status_default = [
1540
+ { key: 'SUCCEEDED', value: 'Finalizado' },
1541
+ { key: 'PENDING', value: 'Pendente' },
1542
+ { key: 'FAILED', value: 'Erro' },
1543
+ { key: 'RUNNING', value: 'Em andamento' },
1544
+ { key: 'REGISTRATION', value: 'Cadastro Pendente' },
1545
+ { key: 'SUCCEED', value: 'Finalizado' },
1546
+ { key: 'WAITING', value: 'Aguardando' },
1547
+ { key: 'REJECTED', value: 'Rejeitado' },
1548
+ ];
1549
+ this.status_proposal = [
1550
+ { key: 'SUCCEEDED', value: 'Finalizado' },
1551
+ { key: 'PENDING', value: 'Aguardando Aprovação' },
1552
+ { key: 'FAILED', value: 'Erro' },
1553
+ { key: 'RUNNING', value: 'Provisionando Ambientes' },
1554
+ { key: 'REGISTRATION', value: 'Cadastro Pendente' },
1555
+ { key: 'SUCCEED', value: 'Finalizado' },
1556
+ { key: 'WAITING', value: 'Provisionando Ambientes' },
1557
+ { key: 'REJECTED', value: 'Rejeitada' },
1558
+ ];
1559
+ }
1560
+ transform(status_name, tema) {
1561
+ let map_tema = this.status_default;
1562
+ if (tema && tema !== undefined) {
1563
+ switch (tema) {
1564
+ case 'proposal':
1565
+ map_tema = this.status_proposal;
1566
+ break;
1567
+ }
1568
+ }
1569
+ let status_name_in_search = '';
1570
+ if (tema && tema === 'ALL') {
1571
+ map_tema = this.status_default;
1572
+ if (status_name !== undefined && status_name !== null && `${status_name}` !== '') {
1573
+ for (let i = 0; i < (map_tema).length; i++) {
1574
+ if ((`${status_name}`).toLowerCase() === (`${map_tema[i].key}`).toLowerCase()) {
1575
+ status_name_in_search += ' ' + map_tema[i].value;
1576
+ break;
1577
+ }
1578
+ }
1579
+ }
1580
+ map_tema = this.status_proposal;
1581
+ if (status_name !== undefined && status_name !== null && `${status_name}` !== '') {
1582
+ for (let i = 0; i < (map_tema).length; i++) {
1583
+ if ((`${status_name}`).toLowerCase() === (`${map_tema[i].key}`).toLowerCase()) {
1584
+ status_name_in_search += ' ' + map_tema[i].value;
1585
+ break;
1586
+ }
1587
+ }
1588
+ }
1589
+ }
1590
+ else {
1591
+ if (status_name !== undefined && status_name !== null && `${status_name}` !== '') {
1592
+ for (let i = 0; i < (map_tema).length; i++) {
1593
+ if ((`${status_name}`).toLowerCase() === (`${map_tema[i].key}`).toLowerCase()) {
1594
+ status_name_in_search += ' ' + map_tema[i].value;
1595
+ break;
1596
+ }
1597
+ }
1598
+ }
1599
+ }
1600
+ if (status_name_in_search !== '') {
1601
+ return status_name_in_search;
1602
+ }
1603
+ return status_name;
1604
+ }
1605
+ }
1606
+ StatusInfoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: StatusInfoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1607
+ StatusInfoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: StatusInfoPipe, name: "statusinfo" });
1608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: StatusInfoPipe, decorators: [{
1609
+ type: Pipe,
1610
+ args: [{ name: 'statusinfo' }]
1611
+ }] });
1612
+
1613
+ class RespectivePipe {
1614
+ constructor() {
1615
+ this.map = [
1616
+ // Tipos de Ambientes
1617
+ { key: 'production', value: 'Produção' },
1618
+ { key: 'development', value: 'Desenvolvimento' },
1619
+ { key: 'qa', value: 'Qualidade' },
1620
+ // Implantação / Migração
1621
+ { key: 'golive', value: 'Pré GoLive' },
1622
+ { key: 'kickoff', value: 'Kickoff' },
1623
+ // Tipos de Clientes
1624
+ { key: 'prime', value: 'Prime' },
1625
+ { key: 'p', value: 'Pequeno' },
1626
+ { key: 'm', value: 'Médio' },
1627
+ { key: 'g', value: 'Grande' },
1628
+ // Produtos
1629
+ { key: '2c', value: 'Carol' },
1630
+ { key: 'carol', value: 'carol' },
1631
+ { key: 'consinco', value: 'Consinco' },
1632
+ { key: 'datasul', value: 'Datasul' },
1633
+ { key: 'fluig', value: 'Fluig' },
1634
+ { key: 'license-server', value: 'License Server' },
1635
+ { key: 'pep', value: 'PEP' },
1636
+ { key: 'protheus', value: 'Protheus' },
1637
+ { key: 'pvi', value: 'PVI' },
1638
+ { key: 'rm', value: 'RM' },
1639
+ { key: 'sfa', value: 'SFA' },
1640
+ { key: 'smartrm', value: 'Smart RM' },
1641
+ { key: 'smartrmcluster', value: 'Smart RM Cluster' },
1642
+ { key: 'smartrmcontrol', value: 'Smart RM Control' },
1643
+ { key: 'taf', value: 'TAF' },
1644
+ { key: 'treports', value: 'Treports' },
1645
+ { key: 'tss', value: 'TSS' },
1646
+ { key: 'winthor', value: 'Winthor' },
1647
+ // Tipos de SO
1648
+ { key: 'windows', value: 'Windows' },
1649
+ { key: 'linux', value: 'Linux' },
1650
+ // Tipos responsaveis
1651
+ { key: 'prime_customer_success', value: 'Customer Success' },
1652
+ { key: 'project_manager', value: 'Gerente de Projetos' },
1653
+ { key: 'prime_engineer', value: 'Engenheiro Prime' }
1654
+ ];
1655
+ }
1656
+ transform(v) {
1657
+ if (v !== '') {
1658
+ for (let i = 0; i < (this.map).length; i++) {
1659
+ let custom_v = v;
1660
+ custom_v = (custom_v).toLowerCase();
1661
+ custom_v = (custom_v).trim();
1662
+ custom_v = (custom_v).replace(/\_/g, "-");
1663
+ const current_key = (this.map[i].key).replace(/\_/g, "-");
1664
+ if ((custom_v).toLowerCase() === current_key) {
1665
+ return this.map[i].value;
1666
+ }
1667
+ }
1668
+ }
1669
+ return v;
1670
+ }
1671
+ }
1672
+ RespectivePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RespectivePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1673
+ RespectivePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RespectivePipe, name: "respective" });
1674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RespectivePipe, decorators: [{
1675
+ type: Pipe,
1676
+ args: [{ name: 'respective' }]
1677
+ }] });
1678
+
1679
+ class CNPJPipe {
1680
+ constructor() {
1681
+ this.mascara = "##.###.###/####-##";
1682
+ }
1683
+ createMask(v) {
1684
+ const mask = this.mascara;
1685
+ let str = v.replace(/\s/g, '');
1686
+ let strMask = '';
1687
+ if (str.length == 14) {
1688
+ let j = 0;
1689
+ for (let i = 0; i < mask.length; i++) {
1690
+ if (mask[i] == '#') {
1691
+ strMask += str[j++];
1692
+ }
1693
+ else {
1694
+ strMask += mask[i];
1695
+ }
1696
+ }
1697
+ }
1698
+ else {
1699
+ return v;
1700
+ }
1701
+ return strMask;
1702
+ }
1703
+ transform(cnpj) {
1704
+ return this.createMask(cnpj);
1705
+ }
1706
+ }
1707
+ CNPJPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CNPJPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1708
+ CNPJPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: CNPJPipe, name: "cnpj" });
1709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CNPJPipe, decorators: [{
1710
+ type: Pipe,
1711
+ args: [{ name: 'cnpj' }]
1712
+ }] });
1713
+
1714
+ class CPFPipe {
1715
+ constructor() {
1716
+ this.mascara = "###.###.###-##";
1717
+ }
1718
+ createMask(v) {
1719
+ const mask = this.mascara;
1720
+ let str = v.replace(/\s/g, '');
1721
+ let strMask = '';
1722
+ if (str.length == 14) {
1723
+ let j = 0;
1724
+ for (let i = 0; i < mask.length; i++) {
1725
+ if (mask[i] == '#') {
1726
+ strMask += str[j++];
1727
+ }
1728
+ else {
1729
+ strMask += mask[i];
1730
+ }
1731
+ }
1732
+ }
1733
+ else {
1734
+ return v;
1735
+ }
1736
+ return strMask;
1737
+ }
1738
+ transform(cpf) {
1739
+ return this.createMask(cpf);
1740
+ }
1741
+ }
1742
+ CPFPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CPFPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1743
+ CPFPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: CPFPipe, name: "cpf" });
1744
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CPFPipe, decorators: [{
1745
+ type: Pipe,
1746
+ args: [{ name: 'cpf' }]
1747
+ }] });
1748
+
1749
+ class TCloudPipesModule {
1750
+ }
1751
+ TCloudPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1752
+ TCloudPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudPipesModule, declarations: [MonthNamePipe,
1753
+ StatusInfoPipe,
1754
+ RespectivePipe,
1755
+ CNPJPipe], imports: [CommonModule], exports: [MonthNamePipe,
1756
+ StatusInfoPipe,
1757
+ RespectivePipe,
1758
+ CNPJPipe] });
1759
+ TCloudPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudPipesModule, providers: [
1760
+ MonthNamePipe,
1761
+ StatusInfoPipe,
1762
+ RespectivePipe,
1763
+ CNPJPipe
1764
+ ], imports: [CommonModule] });
1765
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudPipesModule, decorators: [{
1766
+ type: NgModule,
1767
+ args: [{
1768
+ imports: [
1769
+ CommonModule,
1770
+ ],
1771
+ declarations: [
1772
+ MonthNamePipe,
1773
+ StatusInfoPipe,
1774
+ RespectivePipe,
1775
+ CNPJPipe
1776
+ ],
1777
+ exports: [
1778
+ MonthNamePipe,
1779
+ StatusInfoPipe,
1780
+ RespectivePipe,
1781
+ CNPJPipe
1782
+ ],
1783
+ providers: [
1784
+ MonthNamePipe,
1785
+ StatusInfoPipe,
1786
+ RespectivePipe,
1787
+ CNPJPipe
1788
+ ]
1789
+ }]
1790
+ }] });
1791
+
876
1792
  class TCloudUiModule {
877
1793
  }
878
1794
  TCloudUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
879
1795
  TCloudUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, imports: [TCloudUiModalModule,
880
1796
  TCloudUiTabMenuModule,
881
1797
  TCloudUiLinhaLogoModule,
882
- TCloudUiLineStepCircleModule], exports: [TCloudUiModalModule,
1798
+ TCloudUiLineStepCircleModule,
1799
+ TCloudUiMultiSelectModule,
1800
+ TCloudUiDataListModule,
1801
+ // Directives
1802
+ TCloudAccessModule,
1803
+ // Pipes
1804
+ TCloudPipesModule], exports: [TCloudUiModalModule,
883
1805
  TCloudUiTabMenuModule,
884
1806
  TCloudUiLinhaLogoModule,
885
- TCloudUiLineStepCircleModule] });
1807
+ TCloudUiLineStepCircleModule,
1808
+ TCloudUiMultiSelectModule,
1809
+ TCloudUiDataListModule,
1810
+ // Directives
1811
+ TCloudAccessModule,
1812
+ // Pipes
1813
+ TCloudPipesModule] });
886
1814
  TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, imports: [TCloudUiModalModule,
887
1815
  TCloudUiTabMenuModule,
888
1816
  TCloudUiLinhaLogoModule,
889
- TCloudUiLineStepCircleModule, TCloudUiModalModule,
1817
+ TCloudUiLineStepCircleModule,
1818
+ TCloudUiMultiSelectModule,
1819
+ TCloudUiDataListModule,
1820
+ // Directives
1821
+ TCloudAccessModule,
1822
+ // Pipes
1823
+ TCloudPipesModule, TCloudUiModalModule,
890
1824
  TCloudUiTabMenuModule,
891
1825
  TCloudUiLinhaLogoModule,
892
- TCloudUiLineStepCircleModule] });
1826
+ TCloudUiLineStepCircleModule,
1827
+ TCloudUiMultiSelectModule,
1828
+ TCloudUiDataListModule,
1829
+ // Directives
1830
+ TCloudAccessModule,
1831
+ // Pipes
1832
+ TCloudPipesModule] });
893
1833
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, decorators: [{
894
1834
  type: NgModule,
895
1835
  args: [{
@@ -897,13 +1837,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
897
1837
  TCloudUiModalModule,
898
1838
  TCloudUiTabMenuModule,
899
1839
  TCloudUiLinhaLogoModule,
900
- TCloudUiLineStepCircleModule
1840
+ TCloudUiLineStepCircleModule,
1841
+ TCloudUiMultiSelectModule,
1842
+ TCloudUiDataListModule,
1843
+ // Directives
1844
+ TCloudAccessModule,
1845
+ // Pipes
1846
+ TCloudPipesModule
901
1847
  ],
902
1848
  exports: [
903
1849
  TCloudUiModalModule,
904
1850
  TCloudUiTabMenuModule,
905
1851
  TCloudUiLinhaLogoModule,
906
- TCloudUiLineStepCircleModule
1852
+ TCloudUiLineStepCircleModule,
1853
+ TCloudUiMultiSelectModule,
1854
+ TCloudUiDataListModule,
1855
+ // Directives
1856
+ TCloudAccessModule,
1857
+ // Pipes
1858
+ TCloudPipesModule
907
1859
  ]
908
1860
  }]
909
1861
  }] });
@@ -916,5 +1868,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
916
1868
  * Generated bundle index. Do not edit.
917
1869
  */
918
1870
 
919
- export { TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent };
1871
+ export { CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, MonthNamePipe, RespectivePipe, StatusInfoPipe, TCloudAccessModule, TCloudPipesModule, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TooltipDirective };
920
1872
  //# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map