@dev-tcloud/tcloud-ui 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/esm2020/lib/_directives/directives.module.mjs +16 -0
- package/esm2020/lib/_directives/tooltip/tooltip.directive.mjs +165 -0
- package/esm2020/lib/_modules/tcloud-ui-data-list/services/data-list.service.mjs +39 -0
- package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list-option/tcloud-ui-data-list-option.component.mjs +56 -0
- package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.component.mjs +250 -0
- package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.mjs +3 -0
- package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.module.mjs +36 -0
- package/esm2020/lib/_modules/tcloud-ui-multi-input/tcloud-ui-multi-input.component.mjs +73 -0
- package/esm2020/lib/_modules/tcloud-ui-multi-input/tcloud-ui-multi-input.module.mjs +27 -0
- package/esm2020/lib/_modules/tcloud-ui-multi-select/tcloud-ui-multi-select.component.mjs +79 -0
- package/esm2020/lib/_modules/tcloud-ui-multi-select/tcloud-ui-multi-select.module.mjs +20 -0
- package/esm2020/lib/_pipes/cnpj.mjs +37 -0
- package/esm2020/lib/_pipes/cpf.mjs +37 -0
- package/esm2020/lib/_pipes/index.mjs +6 -0
- package/esm2020/lib/_pipes/monthname.mjs +25 -0
- package/esm2020/lib/_pipes/respective.mjs +68 -0
- package/esm2020/lib/_pipes/statusinfo.mjs +78 -0
- package/esm2020/lib/_pipes/tcloud-pipes.module.mjs +47 -0
- package/esm2020/lib/tcloud-ui.module.mjs +54 -7
- package/esm2020/public-api.mjs +21 -1
- package/fesm2015/dev-tcloud-tcloud-ui.mjs +1061 -11
- package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/fesm2020/dev-tcloud-tcloud-ui.mjs +1054 -11
- package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/lib/_directives/directives.module.d.ts +7 -0
- package/lib/_directives/tooltip/tooltip.directive.d.ts +34 -0
- package/lib/_modules/tcloud-ui-data-list/services/data-list.service.d.ts +20 -0
- package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list-option/tcloud-ui-data-list-option.component.d.ts +22 -0
- package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.component.d.ts +61 -0
- package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.d.ts +4 -0
- package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.module.d.ts +10 -0
- package/lib/_modules/tcloud-ui-multi-input/tcloud-ui-multi-input.component.d.ts +19 -0
- package/lib/_modules/tcloud-ui-multi-input/tcloud-ui-multi-input.module.d.ts +9 -0
- package/lib/_modules/tcloud-ui-multi-select/tcloud-ui-multi-select.component.d.ts +18 -0
- package/lib/_modules/tcloud-ui-multi-select/tcloud-ui-multi-select.module.d.ts +8 -0
- package/lib/_pipes/cnpj.d.ts +9 -0
- package/lib/_pipes/cpf.d.ts +9 -0
- package/lib/_pipes/index.d.ts +5 -0
- package/lib/_pipes/monthname.d.ts +8 -0
- package/lib/_pipes/respective.d.ts +11 -0
- package/lib/_pipes/statusinfo.d.ts +15 -0
- package/lib/_pipes/tcloud-pipes.module.d.ts +11 -0
- package/lib/tcloud-ui.module.d.ts +6 -1
- package/package.json +1 -1
- package/public-api.d.ts +11 -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
|
|
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>"{{ param_confirm.confirmText }}"</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:
|
|
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>"{{ param_confirm.confirmText }}"</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>"{{ param_confirm.confirmText }}"</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,1052 @@ 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\r\n <ng-container *ngIf=\"item.active\">\r\n <div class=\"box-label\">\r\n <div class=\"box-value\" [title]=\"item.value\">\r\n {{ item.value }} \r\n </div>\r\n <div class=\"box-action\">\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 </div>\r\n </ng-container>\r\n\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}select:disabled{opacity:.8!important;cursor:not-allowed!important;background-color:#ededed}button:disabled{opacity:.5!important;cursor:not-allowed!important}.box-label{display:flex;max-width:220px;height:35px;min-width:100px;background-color:var(--verde);color:#fff;padding:8px 15px 10px;border:none;border-radius:5px;margin:2px}.box-label .box-value{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.box-label .box-action{width:8px}.box-label .box-action button{color:#d72020;background-color:var(--verde);border:none;font-weight:700;cursor:pointer}\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\r\n <ng-container *ngIf=\"item.active\">\r\n <div class=\"box-label\">\r\n <div class=\"box-value\" [title]=\"item.value\">\r\n {{ item.value }} \r\n </div>\r\n <div class=\"box-action\">\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 </div>\r\n </ng-container>\r\n\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}select:disabled{opacity:.8!important;cursor:not-allowed!important;background-color:#ededed}button:disabled{opacity:.5!important;cursor:not-allowed!important}.box-label{display:flex;max-width:220px;height:35px;min-width:100px;background-color:var(--verde);color:#fff;padding:8px 15px 10px;border:none;border-radius:5px;margin:2px}.box-label .box-value{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.box-label .box-action{width:8px}.box-label .box-action button{color:#d72020;background-color:var(--verde);border:none;font-weight:700;cursor:pointer}\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
|
+
if (this.selected_item === undefined || this.selected_item === null) {
|
|
1128
|
+
this.selected_item = '';
|
|
1129
|
+
}
|
|
1130
|
+
this.toSearch('');
|
|
1131
|
+
this.search_text = '';
|
|
1132
|
+
this.dataListService.setActiveItem(this.selected_item);
|
|
1133
|
+
this.onInputChange.emit(this.selected_description);
|
|
1134
|
+
if (this.formulario) {
|
|
1135
|
+
this.formulario?.get('selected_item')?.setValue(this.selected_item);
|
|
1136
|
+
// const input_hidden = document.getElementById(`${this.id}-hidden`);
|
|
1137
|
+
this.toInput(this.formulario.get('selected_item'));
|
|
1138
|
+
}
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
clearTextSearch() {
|
|
1142
|
+
this.search_text = '';
|
|
1143
|
+
this.toSearch('');
|
|
1144
|
+
}
|
|
1145
|
+
toOpen() {
|
|
1146
|
+
this.menu_show = !this.menu_show;
|
|
1147
|
+
this.resolve_position_dropdown(this.menu_show);
|
|
1148
|
+
}
|
|
1149
|
+
resolve_position_dropdown(open) {
|
|
1150
|
+
if (open) {
|
|
1151
|
+
this.box_style = '';
|
|
1152
|
+
this.menu_on_top = '';
|
|
1153
|
+
const id = `${this.id}`;
|
|
1154
|
+
const box = `box-${this.id}`;
|
|
1155
|
+
if (this.viewport_height === 0) {
|
|
1156
|
+
this.viewport_height = window.innerWidth;
|
|
1157
|
+
}
|
|
1158
|
+
const rect = document.getElementById(id)?.getBoundingClientRect();
|
|
1159
|
+
const box_position = rect?.bottom || 0;
|
|
1160
|
+
setTimeout(() => {
|
|
1161
|
+
this.box_height = document.getElementById(box)?.clientHeight || 0;
|
|
1162
|
+
if ((this.viewport_height - box_position) < this.box_height) {
|
|
1163
|
+
this.menu_on_top = 'menu-on-top';
|
|
1164
|
+
this.box_style = `top: -${(this.box_height)}px; height: ${this.box_height}px;`;
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
toClose() {
|
|
1170
|
+
this.menu_show = false;
|
|
1171
|
+
}
|
|
1172
|
+
toResize() {
|
|
1173
|
+
window.addEventListener('resize', () => {
|
|
1174
|
+
this.viewport_width = window.innerWidth;
|
|
1175
|
+
this.viewport_height = window.innerHeight;
|
|
1176
|
+
this.resolve_position_dropdown(this.menu_show);
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
toClick() {
|
|
1180
|
+
const box = `area-${this.id}`;
|
|
1181
|
+
window.addEventListener('click', (e) => {
|
|
1182
|
+
if (this.menu_show) {
|
|
1183
|
+
if (!(document.getElementById(box)?.contains(e.target))) {
|
|
1184
|
+
this.menu_show = false;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
//get accessor
|
|
1190
|
+
get value() {
|
|
1191
|
+
return this.selected_item;
|
|
1192
|
+
}
|
|
1193
|
+
;
|
|
1194
|
+
//set accessor including call the onchange callback
|
|
1195
|
+
set value(v) {
|
|
1196
|
+
if (v !== this.selected_item) {
|
|
1197
|
+
this.selected_item = v;
|
|
1198
|
+
this.onChangeCallback(v);
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
//Set touched on blur
|
|
1202
|
+
onBlur() {
|
|
1203
|
+
this.onTouchedCallback();
|
|
1204
|
+
}
|
|
1205
|
+
//From ControlValueAccessor interface
|
|
1206
|
+
writeValue(value) {
|
|
1207
|
+
if (value !== this.selected_item) {
|
|
1208
|
+
this.selected_item = value;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
//From ControlValueAccessor interface
|
|
1212
|
+
registerOnChange(fn) {
|
|
1213
|
+
this.onChangeCallback = fn;
|
|
1214
|
+
}
|
|
1215
|
+
//From ControlValueAccessor interface
|
|
1216
|
+
registerOnTouched(fn) {
|
|
1217
|
+
this.onTouchedCallback = fn;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
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 });
|
|
1221
|
+
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: [
|
|
1222
|
+
DataListService,
|
|
1223
|
+
CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR
|
|
1224
|
+
], 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"] }] });
|
|
1225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListComponent, decorators: [{
|
|
1226
|
+
type: Component,
|
|
1227
|
+
args: [{ selector: 'tcloud-ui-data-list', providers: [
|
|
1228
|
+
DataListService,
|
|
1229
|
+
CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR
|
|
1230
|
+
], 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"] }]
|
|
1231
|
+
}], ctorParameters: function () { return [{ type: DataListService }, { type: i2.FormBuilder }]; }, propDecorators: { placeholder: [{
|
|
1232
|
+
type: Input
|
|
1233
|
+
}], disabled: [{
|
|
1234
|
+
type: Input
|
|
1235
|
+
}], loading: [{
|
|
1236
|
+
type: Input
|
|
1237
|
+
}], search: [{
|
|
1238
|
+
type: Input
|
|
1239
|
+
}], onInputChange: [{
|
|
1240
|
+
type: Output
|
|
1241
|
+
}], onChange: [{
|
|
1242
|
+
type: Output
|
|
1243
|
+
}], ngModel: [{
|
|
1244
|
+
type: Input
|
|
1245
|
+
}] } });
|
|
1246
|
+
|
|
1247
|
+
class ISelectOptions {
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
class TCloudUiDataListOptionComponent {
|
|
1251
|
+
constructor(dataListService) {
|
|
1252
|
+
this.dataListService = dataListService;
|
|
1253
|
+
this.id = '';
|
|
1254
|
+
this.select_options = new ISelectOptions();
|
|
1255
|
+
this.selected = new EventEmitter();
|
|
1256
|
+
this.subscription_active = dataListService.stateValue$.subscribe(v => { this.actived_value = v; });
|
|
1257
|
+
}
|
|
1258
|
+
ngOnInit() {
|
|
1259
|
+
this.id = this.generateID();
|
|
1260
|
+
this.setSelectOptions();
|
|
1261
|
+
}
|
|
1262
|
+
generateID() {
|
|
1263
|
+
return `data-list-option-${Math.floor(Math.random() * Math.floor(Math.random() * Date.now()))}`;
|
|
1264
|
+
}
|
|
1265
|
+
setSelectedItem(value) {
|
|
1266
|
+
if (value === '') {
|
|
1267
|
+
this.value = '';
|
|
1268
|
+
}
|
|
1269
|
+
this.dataListService.setItemValue(this.value);
|
|
1270
|
+
const description = document.getElementById(this.id)?.innerText || '';
|
|
1271
|
+
this.dataListService.setItemDescription(description);
|
|
1272
|
+
this.setSelectOptions();
|
|
1273
|
+
}
|
|
1274
|
+
setSelectOptions() {
|
|
1275
|
+
setTimeout(() => {
|
|
1276
|
+
try {
|
|
1277
|
+
const description = document.getElementById(this.id)?.innerText;
|
|
1278
|
+
this.select_options.value = this.value;
|
|
1279
|
+
this.select_options.description = description;
|
|
1280
|
+
this.dataListService.registerSelectionOptionsDescription(this.select_options);
|
|
1281
|
+
}
|
|
1282
|
+
catch (error) { }
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
ngOnDestroy() {
|
|
1286
|
+
if (this.subscription_active) {
|
|
1287
|
+
this.subscription_active.unsubscribe();
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
TCloudUiDataListOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListOptionComponent, deps: [{ token: DataListService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1292
|
+
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"] });
|
|
1293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListOptionComponent, decorators: [{
|
|
1294
|
+
type: Component,
|
|
1295
|
+
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"] }]
|
|
1296
|
+
}], ctorParameters: function () { return [{ type: DataListService }]; }, propDecorators: { value: [{
|
|
1297
|
+
type: Input
|
|
1298
|
+
}], selected: [{
|
|
1299
|
+
type: Output
|
|
1300
|
+
}] } });
|
|
1301
|
+
|
|
1302
|
+
class TCloudUiDataListModule {
|
|
1303
|
+
}
|
|
1304
|
+
TCloudUiDataListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1305
|
+
TCloudUiDataListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListModule, declarations: [TCloudUiDataListComponent,
|
|
1306
|
+
TCloudUiDataListOptionComponent], imports: [CommonModule,
|
|
1307
|
+
FormsModule,
|
|
1308
|
+
ReactiveFormsModule], exports: [TCloudUiDataListComponent,
|
|
1309
|
+
TCloudUiDataListOptionComponent] });
|
|
1310
|
+
TCloudUiDataListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListModule, imports: [CommonModule,
|
|
1311
|
+
FormsModule,
|
|
1312
|
+
ReactiveFormsModule] });
|
|
1313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListModule, decorators: [{
|
|
1314
|
+
type: NgModule,
|
|
1315
|
+
args: [{
|
|
1316
|
+
declarations: [
|
|
1317
|
+
TCloudUiDataListComponent,
|
|
1318
|
+
TCloudUiDataListOptionComponent,
|
|
1319
|
+
],
|
|
1320
|
+
exports: [
|
|
1321
|
+
TCloudUiDataListComponent,
|
|
1322
|
+
TCloudUiDataListOptionComponent
|
|
1323
|
+
],
|
|
1324
|
+
imports: [
|
|
1325
|
+
CommonModule,
|
|
1326
|
+
FormsModule,
|
|
1327
|
+
ReactiveFormsModule
|
|
1328
|
+
]
|
|
1329
|
+
}]
|
|
1330
|
+
}] });
|
|
1331
|
+
|
|
1332
|
+
class TCloudUiTooltipDirective {
|
|
1333
|
+
constructor(el, renderer) {
|
|
1334
|
+
this.el = el;
|
|
1335
|
+
this.renderer = renderer;
|
|
1336
|
+
this._direction = 'top';
|
|
1337
|
+
// main
|
|
1338
|
+
this.el_height = 0;
|
|
1339
|
+
this.el_width = 0;
|
|
1340
|
+
this.el_center = 0;
|
|
1341
|
+
this.el_position = 0;
|
|
1342
|
+
// tooltip
|
|
1343
|
+
this.target_height = 0;
|
|
1344
|
+
this.target_width = 0;
|
|
1345
|
+
this.target_center = 0;
|
|
1346
|
+
this.ID = '';
|
|
1347
|
+
this.info_text = '';
|
|
1348
|
+
}
|
|
1349
|
+
onMouseOver() {
|
|
1350
|
+
if (this.getElement()) {
|
|
1351
|
+
this.renderer.addClass(this.el.nativeElement, 'main-tooltip');
|
|
1352
|
+
const el = this.getElement();
|
|
1353
|
+
el.style.display = 'inline';
|
|
1354
|
+
setTimeout(() => {
|
|
1355
|
+
this.el_height = this.el.nativeElement.offsetHeight;
|
|
1356
|
+
this.el_width = this.el.nativeElement.offsetWidth;
|
|
1357
|
+
this.el_center = this.el_width / 2;
|
|
1358
|
+
const rect = this.el.nativeElement?.getBoundingClientRect();
|
|
1359
|
+
this.el_position = rect?.left || 0;
|
|
1360
|
+
// console.log('this.el_width', this.el_width);
|
|
1361
|
+
// console.log('this.el_center', this.el_center);
|
|
1362
|
+
// console.log('this.el_position', this.el_position);
|
|
1363
|
+
this.target_height = el.offsetHeight;
|
|
1364
|
+
this.target_width = el.offsetWidth;
|
|
1365
|
+
this.target_center = this.target_width / 2;
|
|
1366
|
+
// console.log('target_heigth', this.target_height);
|
|
1367
|
+
// console.log('target_width', this.target_width);
|
|
1368
|
+
// console.log('target_center', this.target_center);
|
|
1369
|
+
// this.renderer.setStyle(el, 'bottom', `${this.el_position}px`);
|
|
1370
|
+
switch (this._direction) {
|
|
1371
|
+
case 'top':
|
|
1372
|
+
this.to_top(el);
|
|
1373
|
+
break;
|
|
1374
|
+
case 'bottom':
|
|
1375
|
+
this.to_bottom(el);
|
|
1376
|
+
break;
|
|
1377
|
+
case 'left':
|
|
1378
|
+
this.to_left(el);
|
|
1379
|
+
break;
|
|
1380
|
+
case 'right':
|
|
1381
|
+
this.to_right(el);
|
|
1382
|
+
break;
|
|
1383
|
+
}
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
onMouseOut() {
|
|
1388
|
+
if (this.getElement()) {
|
|
1389
|
+
const el = this.getElement();
|
|
1390
|
+
el.style.display = 'none';
|
|
1391
|
+
this.renderer.removeClass(this.el.nativeElement, 'main-tooltip');
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
set tooltip(tooltip) {
|
|
1395
|
+
if (tooltip) {
|
|
1396
|
+
this.check(tooltip);
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
;
|
|
1400
|
+
set direction(direction) {
|
|
1401
|
+
if (direction) {
|
|
1402
|
+
this._direction = direction;
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
;
|
|
1406
|
+
ngOnInit() {
|
|
1407
|
+
}
|
|
1408
|
+
generateID() {
|
|
1409
|
+
return `tc-tooltip-${Math.floor(Math.random() * Math.floor(Math.random() * Date.now()))}`;
|
|
1410
|
+
}
|
|
1411
|
+
getElement() {
|
|
1412
|
+
return document.getElementById(this.ID) || undefined;
|
|
1413
|
+
}
|
|
1414
|
+
check(tooltip) {
|
|
1415
|
+
this.ID = this.generateID();
|
|
1416
|
+
this.info_text = tooltip;
|
|
1417
|
+
let el = this.el.nativeElement;
|
|
1418
|
+
this.main_el = el;
|
|
1419
|
+
if (el) {
|
|
1420
|
+
this.create_tooltip(tooltip, el);
|
|
1421
|
+
}
|
|
1422
|
+
else {
|
|
1423
|
+
console.log("TCL: tooltip -> el", this.el.nativeElement);
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
setStyle(el) {
|
|
1427
|
+
// this.renderer.setStyle(el, 'position', 'relative');
|
|
1428
|
+
// this.renderer.setStyle(el, 'display', 'inline');
|
|
1429
|
+
}
|
|
1430
|
+
create_tooltip(tip, el) {
|
|
1431
|
+
this.setStyle(el);
|
|
1432
|
+
const tooltip = document.createElement("div");
|
|
1433
|
+
tooltip.setAttribute('id', this.ID);
|
|
1434
|
+
tooltip.setAttribute('style', `
|
|
1435
|
+
position: absolute;
|
|
1436
|
+
display: none;
|
|
1437
|
+
padding: 10px;
|
|
1438
|
+
border-radius: 10px;
|
|
1439
|
+
text-align: center;
|
|
1440
|
+
width: max-content;
|
|
1441
|
+
max-width: 250px;
|
|
1442
|
+
background-color: transparent;
|
|
1443
|
+
color: transparent;
|
|
1444
|
+
z-index: 1090;
|
|
1445
|
+
bottom: ${this.el_position}px;
|
|
1446
|
+
left: ${this.target_center}px;
|
|
1447
|
+
`);
|
|
1448
|
+
tooltip.innerHTML = tip;
|
|
1449
|
+
el.insertBefore(tooltip, null);
|
|
1450
|
+
}
|
|
1451
|
+
to_top(el) {
|
|
1452
|
+
const pos = this.el_center - (this.target_center);
|
|
1453
|
+
this.renderer.setStyle(el, 'left', `${(pos)}px`);
|
|
1454
|
+
this.renderer.setStyle(el, 'bottom', `${(this.el_height + 7)}px`);
|
|
1455
|
+
el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-top');
|
|
1456
|
+
}
|
|
1457
|
+
to_bottom(el) {
|
|
1458
|
+
const pos = this.el_center - (this.target_center);
|
|
1459
|
+
this.renderer.setStyle(el, 'left', `${(pos)}px`);
|
|
1460
|
+
this.renderer.setStyle(el, 'bottom', `-${(this.target_height + 7)}px`);
|
|
1461
|
+
el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-bottom');
|
|
1462
|
+
}
|
|
1463
|
+
to_right(el) {
|
|
1464
|
+
const pos = this.el_width;
|
|
1465
|
+
this.renderer.setStyle(el, 'left', `${(pos + 11)}px`);
|
|
1466
|
+
this.renderer.setStyle(el, 'bottom', `-${(((this.target_height) / 2) - (this.el_height / 2))}px`);
|
|
1467
|
+
el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-right');
|
|
1468
|
+
}
|
|
1469
|
+
to_left(el) {
|
|
1470
|
+
const pos = -((this.target_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-left');
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
TCloudUiTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1477
|
+
TCloudUiTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTooltipDirective, selector: "[tooltip]", inputs: { tooltip: "tooltip", direction: "direction" }, host: { listeners: { "mouseover": "onMouseOver()", "mouseout": "onMouseOut()" } }, ngImport: i0 });
|
|
1478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTooltipDirective, decorators: [{
|
|
1479
|
+
type: Directive,
|
|
1480
|
+
args: [{
|
|
1481
|
+
selector: '[tooltip]'
|
|
1482
|
+
}]
|
|
1483
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { onMouseOver: [{
|
|
1484
|
+
type: HostListener,
|
|
1485
|
+
args: ['mouseover']
|
|
1486
|
+
}], onMouseOut: [{
|
|
1487
|
+
type: HostListener,
|
|
1488
|
+
args: ['mouseout']
|
|
1489
|
+
}], tooltip: [{
|
|
1490
|
+
type: Input
|
|
1491
|
+
}], direction: [{
|
|
1492
|
+
type: Input
|
|
1493
|
+
}] } });
|
|
1494
|
+
|
|
1495
|
+
class TCloudUiDirectiveModule {
|
|
1496
|
+
}
|
|
1497
|
+
TCloudUiDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1498
|
+
TCloudUiDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, declarations: [TCloudUiTooltipDirective], exports: [TCloudUiTooltipDirective] });
|
|
1499
|
+
TCloudUiDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule });
|
|
1500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, decorators: [{
|
|
1501
|
+
type: NgModule,
|
|
1502
|
+
args: [{
|
|
1503
|
+
declarations: [TCloudUiTooltipDirective],
|
|
1504
|
+
exports: [TCloudUiTooltipDirective],
|
|
1505
|
+
}]
|
|
1506
|
+
}] });
|
|
1507
|
+
|
|
1508
|
+
class MonthNamePipe {
|
|
1509
|
+
constructor() {
|
|
1510
|
+
this.meses = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezenbro'];
|
|
1511
|
+
}
|
|
1512
|
+
transform(yyyy_mm) {
|
|
1513
|
+
if (yyyy_mm !== '') {
|
|
1514
|
+
let part = (yyyy_mm).split('-');
|
|
1515
|
+
if ((part).length === 2) {
|
|
1516
|
+
let yyyy = +part[0];
|
|
1517
|
+
let mm = +part[1];
|
|
1518
|
+
return this.meses[(mm - 1)];
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
return '';
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
MonthNamePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1525
|
+
MonthNamePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, name: "monthname" });
|
|
1526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, decorators: [{
|
|
1527
|
+
type: Pipe,
|
|
1528
|
+
args: [{ name: 'monthname' }]
|
|
1529
|
+
}] });
|
|
1530
|
+
|
|
1531
|
+
class StatusInfoPipe {
|
|
1532
|
+
constructor() {
|
|
1533
|
+
this.status_default = [
|
|
1534
|
+
{ key: 'SUCCEEDED', value: 'Finalizado' },
|
|
1535
|
+
{ key: 'PENDING', value: 'Pendente' },
|
|
1536
|
+
{ key: 'FAILED', value: 'Erro' },
|
|
1537
|
+
{ key: 'RUNNING', value: 'Em andamento' },
|
|
1538
|
+
{ key: 'REGISTRATION', value: 'Cadastro Pendente' },
|
|
1539
|
+
{ key: 'SUCCEED', value: 'Finalizado' },
|
|
1540
|
+
{ key: 'WAITING', value: 'Aguardando' },
|
|
1541
|
+
{ key: 'REJECTED', value: 'Rejeitado' },
|
|
1542
|
+
];
|
|
1543
|
+
this.status_proposal = [
|
|
1544
|
+
{ key: 'SUCCEEDED', value: 'Finalizado' },
|
|
1545
|
+
{ key: 'PENDING', value: 'Aguardando Aprovação' },
|
|
1546
|
+
{ key: 'FAILED', value: 'Erro' },
|
|
1547
|
+
{ key: 'RUNNING', value: 'Provisionando Ambientes' },
|
|
1548
|
+
{ key: 'REGISTRATION', value: 'Cadastro Pendente' },
|
|
1549
|
+
{ key: 'SUCCEED', value: 'Finalizado' },
|
|
1550
|
+
{ key: 'WAITING', value: 'Provisionando Ambientes' },
|
|
1551
|
+
{ key: 'REJECTED', value: 'Rejeitada' },
|
|
1552
|
+
];
|
|
1553
|
+
}
|
|
1554
|
+
transform(status_name, tema) {
|
|
1555
|
+
let map_tema = this.status_default;
|
|
1556
|
+
if (tema && tema !== undefined) {
|
|
1557
|
+
switch (tema) {
|
|
1558
|
+
case 'proposal':
|
|
1559
|
+
map_tema = this.status_proposal;
|
|
1560
|
+
break;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
let status_name_in_search = '';
|
|
1564
|
+
if (tema && tema === 'ALL') {
|
|
1565
|
+
map_tema = this.status_default;
|
|
1566
|
+
if (status_name !== undefined && status_name !== null && `${status_name}` !== '') {
|
|
1567
|
+
for (let i = 0; i < (map_tema).length; i++) {
|
|
1568
|
+
if ((`${status_name}`).toLowerCase() === (`${map_tema[i].key}`).toLowerCase()) {
|
|
1569
|
+
status_name_in_search += ' ' + map_tema[i].value;
|
|
1570
|
+
break;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
map_tema = this.status_proposal;
|
|
1575
|
+
if (status_name !== undefined && status_name !== null && `${status_name}` !== '') {
|
|
1576
|
+
for (let i = 0; i < (map_tema).length; i++) {
|
|
1577
|
+
if ((`${status_name}`).toLowerCase() === (`${map_tema[i].key}`).toLowerCase()) {
|
|
1578
|
+
status_name_in_search += ' ' + map_tema[i].value;
|
|
1579
|
+
break;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
else {
|
|
1585
|
+
if (status_name !== undefined && status_name !== null && `${status_name}` !== '') {
|
|
1586
|
+
for (let i = 0; i < (map_tema).length; i++) {
|
|
1587
|
+
if ((`${status_name}`).toLowerCase() === (`${map_tema[i].key}`).toLowerCase()) {
|
|
1588
|
+
status_name_in_search += ' ' + map_tema[i].value;
|
|
1589
|
+
break;
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
if (status_name_in_search !== '') {
|
|
1595
|
+
return status_name_in_search;
|
|
1596
|
+
}
|
|
1597
|
+
return status_name;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
StatusInfoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: StatusInfoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1601
|
+
StatusInfoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: StatusInfoPipe, name: "statusinfo" });
|
|
1602
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: StatusInfoPipe, decorators: [{
|
|
1603
|
+
type: Pipe,
|
|
1604
|
+
args: [{ name: 'statusinfo' }]
|
|
1605
|
+
}] });
|
|
1606
|
+
|
|
1607
|
+
class RespectivePipe {
|
|
1608
|
+
constructor() {
|
|
1609
|
+
this.map = [
|
|
1610
|
+
// Tipos de Ambientes
|
|
1611
|
+
{ key: 'production', value: 'Produção' },
|
|
1612
|
+
{ key: 'development', value: 'Desenvolvimento' },
|
|
1613
|
+
{ key: 'qa', value: 'Qualidade' },
|
|
1614
|
+
// Implantação / Migração
|
|
1615
|
+
{ key: 'golive', value: 'Pré GoLive' },
|
|
1616
|
+
{ key: 'kickoff', value: 'Kickoff' },
|
|
1617
|
+
// Tipos de Clientes
|
|
1618
|
+
{ key: 'prime', value: 'Prime' },
|
|
1619
|
+
{ key: 'p', value: 'Pequeno' },
|
|
1620
|
+
{ key: 'm', value: 'Médio' },
|
|
1621
|
+
{ key: 'g', value: 'Grande' },
|
|
1622
|
+
// Produtos
|
|
1623
|
+
{ key: '2c', value: 'Carol' },
|
|
1624
|
+
{ key: 'carol', value: 'carol' },
|
|
1625
|
+
{ key: 'consinco', value: 'Consinco' },
|
|
1626
|
+
{ key: 'datasul', value: 'Datasul' },
|
|
1627
|
+
{ key: 'fluig', value: 'Fluig' },
|
|
1628
|
+
{ key: 'license-server', value: 'License Server' },
|
|
1629
|
+
{ key: 'pep', value: 'PEP' },
|
|
1630
|
+
{ key: 'protheus', value: 'Protheus' },
|
|
1631
|
+
{ key: 'pvi', value: 'PVI' },
|
|
1632
|
+
{ key: 'rm', value: 'RM' },
|
|
1633
|
+
{ key: 'sfa', value: 'SFA' },
|
|
1634
|
+
{ key: 'smartrm', value: 'Smart RM' },
|
|
1635
|
+
{ key: 'smartrmcluster', value: 'Smart RM Cluster' },
|
|
1636
|
+
{ key: 'smartrmcontrol', value: 'Smart RM Control' },
|
|
1637
|
+
{ key: 'taf', value: 'TAF' },
|
|
1638
|
+
{ key: 'treports', value: 'Treports' },
|
|
1639
|
+
{ key: 'tss', value: 'TSS' },
|
|
1640
|
+
{ key: 'winthor', value: 'Winthor' },
|
|
1641
|
+
// Tipos de SO
|
|
1642
|
+
{ key: 'windows', value: 'Windows' },
|
|
1643
|
+
{ key: 'linux', value: 'Linux' },
|
|
1644
|
+
// Tipos responsaveis
|
|
1645
|
+
{ key: 'prime_customer_success', value: 'Customer Success' },
|
|
1646
|
+
{ key: 'project_manager', value: 'Gerente de Projetos' },
|
|
1647
|
+
{ key: 'prime_engineer', value: 'Engenheiro Prime' }
|
|
1648
|
+
];
|
|
1649
|
+
}
|
|
1650
|
+
transform(v) {
|
|
1651
|
+
if (v !== '') {
|
|
1652
|
+
for (let i = 0; i < (this.map).length; i++) {
|
|
1653
|
+
let custom_v = v;
|
|
1654
|
+
custom_v = (custom_v).toLowerCase();
|
|
1655
|
+
custom_v = (custom_v).trim();
|
|
1656
|
+
custom_v = (custom_v).replace(/\_/g, "-");
|
|
1657
|
+
const current_key = (this.map[i].key).replace(/\_/g, "-");
|
|
1658
|
+
if ((custom_v).toLowerCase() === current_key) {
|
|
1659
|
+
return this.map[i].value;
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
return v;
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
RespectivePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RespectivePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1667
|
+
RespectivePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RespectivePipe, name: "respective" });
|
|
1668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RespectivePipe, decorators: [{
|
|
1669
|
+
type: Pipe,
|
|
1670
|
+
args: [{ name: 'respective' }]
|
|
1671
|
+
}] });
|
|
1672
|
+
|
|
1673
|
+
class CNPJPipe {
|
|
1674
|
+
constructor() {
|
|
1675
|
+
this.mascara = "##.###.###/####-##";
|
|
1676
|
+
}
|
|
1677
|
+
createMask(v) {
|
|
1678
|
+
const mask = this.mascara;
|
|
1679
|
+
let str = v.replace(/\s/g, '');
|
|
1680
|
+
let strMask = '';
|
|
1681
|
+
if (str.length == 14) {
|
|
1682
|
+
let j = 0;
|
|
1683
|
+
for (let i = 0; i < mask.length; i++) {
|
|
1684
|
+
if (mask[i] == '#') {
|
|
1685
|
+
strMask += str[j++];
|
|
1686
|
+
}
|
|
1687
|
+
else {
|
|
1688
|
+
strMask += mask[i];
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
else {
|
|
1693
|
+
return v;
|
|
1694
|
+
}
|
|
1695
|
+
return strMask;
|
|
1696
|
+
}
|
|
1697
|
+
transform(cnpj) {
|
|
1698
|
+
return this.createMask(cnpj);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
CNPJPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CNPJPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1702
|
+
CNPJPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: CNPJPipe, name: "cnpj" });
|
|
1703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CNPJPipe, decorators: [{
|
|
1704
|
+
type: Pipe,
|
|
1705
|
+
args: [{ name: 'cnpj' }]
|
|
1706
|
+
}] });
|
|
1707
|
+
|
|
1708
|
+
class CPFPipe {
|
|
1709
|
+
constructor() {
|
|
1710
|
+
this.mascara = "###.###.###-##";
|
|
1711
|
+
}
|
|
1712
|
+
createMask(v) {
|
|
1713
|
+
const mask = this.mascara;
|
|
1714
|
+
let str = v.replace(/\s/g, '');
|
|
1715
|
+
let strMask = '';
|
|
1716
|
+
if (str.length == 14) {
|
|
1717
|
+
let j = 0;
|
|
1718
|
+
for (let i = 0; i < mask.length; i++) {
|
|
1719
|
+
if (mask[i] == '#') {
|
|
1720
|
+
strMask += str[j++];
|
|
1721
|
+
}
|
|
1722
|
+
else {
|
|
1723
|
+
strMask += mask[i];
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
else {
|
|
1728
|
+
return v;
|
|
1729
|
+
}
|
|
1730
|
+
return strMask;
|
|
1731
|
+
}
|
|
1732
|
+
transform(cpf) {
|
|
1733
|
+
return this.createMask(cpf);
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
CPFPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CPFPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1737
|
+
CPFPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: CPFPipe, name: "cpf" });
|
|
1738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: CPFPipe, decorators: [{
|
|
1739
|
+
type: Pipe,
|
|
1740
|
+
args: [{ name: 'cpf' }]
|
|
1741
|
+
}] });
|
|
1742
|
+
|
|
1743
|
+
class TCloudUiPipesModule {
|
|
1744
|
+
}
|
|
1745
|
+
TCloudUiPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1746
|
+
TCloudUiPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiPipesModule, declarations: [MonthNamePipe,
|
|
1747
|
+
StatusInfoPipe,
|
|
1748
|
+
RespectivePipe,
|
|
1749
|
+
CNPJPipe], imports: [CommonModule], exports: [MonthNamePipe,
|
|
1750
|
+
StatusInfoPipe,
|
|
1751
|
+
RespectivePipe,
|
|
1752
|
+
CNPJPipe] });
|
|
1753
|
+
TCloudUiPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiPipesModule, providers: [
|
|
1754
|
+
MonthNamePipe,
|
|
1755
|
+
StatusInfoPipe,
|
|
1756
|
+
RespectivePipe,
|
|
1757
|
+
CNPJPipe
|
|
1758
|
+
], imports: [CommonModule] });
|
|
1759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiPipesModule, decorators: [{
|
|
1760
|
+
type: NgModule,
|
|
1761
|
+
args: [{
|
|
1762
|
+
imports: [
|
|
1763
|
+
CommonModule,
|
|
1764
|
+
],
|
|
1765
|
+
declarations: [
|
|
1766
|
+
MonthNamePipe,
|
|
1767
|
+
StatusInfoPipe,
|
|
1768
|
+
RespectivePipe,
|
|
1769
|
+
CNPJPipe
|
|
1770
|
+
],
|
|
1771
|
+
exports: [
|
|
1772
|
+
MonthNamePipe,
|
|
1773
|
+
StatusInfoPipe,
|
|
1774
|
+
RespectivePipe,
|
|
1775
|
+
CNPJPipe
|
|
1776
|
+
],
|
|
1777
|
+
providers: [
|
|
1778
|
+
MonthNamePipe,
|
|
1779
|
+
StatusInfoPipe,
|
|
1780
|
+
RespectivePipe,
|
|
1781
|
+
CNPJPipe
|
|
1782
|
+
]
|
|
1783
|
+
}]
|
|
1784
|
+
}] });
|
|
1785
|
+
|
|
1786
|
+
class TCloudUiMultiInputComponent {
|
|
1787
|
+
constructor() {
|
|
1788
|
+
this.placeholder = '';
|
|
1789
|
+
this.disabled = false;
|
|
1790
|
+
this.loading = false;
|
|
1791
|
+
this.count_actives = 0;
|
|
1792
|
+
this.tcChange = new EventEmitter();
|
|
1793
|
+
}
|
|
1794
|
+
ngOnInit() {
|
|
1795
|
+
setTimeout(() => {
|
|
1796
|
+
this.toChange();
|
|
1797
|
+
});
|
|
1798
|
+
}
|
|
1799
|
+
addItem(item) {
|
|
1800
|
+
if (this.disabled) {
|
|
1801
|
+
return;
|
|
1802
|
+
}
|
|
1803
|
+
if (!this.tcList) {
|
|
1804
|
+
this.tcList = [];
|
|
1805
|
+
}
|
|
1806
|
+
(this.tcList).push({ value: item });
|
|
1807
|
+
this.toChange();
|
|
1808
|
+
this.input_value = '';
|
|
1809
|
+
}
|
|
1810
|
+
removeItem(item, index) {
|
|
1811
|
+
if (this.disabled) {
|
|
1812
|
+
return;
|
|
1813
|
+
}
|
|
1814
|
+
if (this.tcList) {
|
|
1815
|
+
for (let i = 0; i < (this.tcList).length; i++) {
|
|
1816
|
+
const row = this.tcList[i];
|
|
1817
|
+
if (item === row.value && i === index) {
|
|
1818
|
+
(this.tcList).splice(index, 1);
|
|
1819
|
+
break;
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
this.toChange();
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
toChange() {
|
|
1826
|
+
let count_actives = 0;
|
|
1827
|
+
let itens = [];
|
|
1828
|
+
if (this.tcList) {
|
|
1829
|
+
for (let i = 0; i < (this.tcList).length; i++) {
|
|
1830
|
+
const row = this.tcList[i];
|
|
1831
|
+
(itens).push(row);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
this.count_actives = count_actives;
|
|
1835
|
+
this.tcChange.emit(itens);
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
TCloudUiMultiInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1839
|
+
TCloudUiMultiInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiMultiInputComponent, selector: "tcloud-ui-multi-input", inputs: { tcList: "tcList", placeholder: "placeholder", disabled: "disabled", loading: "loading" }, outputs: { tcChange: "tcChange" }, ngImport: i0, template: "<div>\n <form #_formulario=\"ngForm\">\n <table>\n <tr *ngIf=\"tcList\">\n <td>\n <input type=\"text\" [(ngModel)]=\"input_value\" [disabled]=\"disabled || loading\" name=\"input_value\" required>\n </td>\n <td>\n <button\n [disabled]=\"disabled || loading || !_formulario.valid\"\n title=\"Adicionar\"\n class=\"btn-plus-select\"\n (click)=\"addItem(input_value)\"\n type=\"button\">\n <i class=\"fas fa-plus\"></i>\n </button>\n </td>\n </tr>\n </table>\n \n <div class=\"box-itens-selected\">\n <ng-container *ngFor=\"let item of tcList; let i = index\">\n \n <div class=\"box-label\">\n <div class=\"box-value\" [title]=\"item.value\">\n {{ item.value }} \n </div>\n <div class=\"box-action\">\n <button\n [disabled]=\"tcList === undefined || (tcList && tcList.length === 0) || disabled || loading\"\n title=\"Remover\"\n type=\"button\"\n (click)=\"removeItem(item.value, i)\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n </div>\n\n </ng-container>\n </div>\n </form>\n</div>\n ", styles: ["table{width:100%;border-collapse:collapse;border:none}table td:first-child{width:100%}input{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}select:disabled{opacity:.8!important;cursor:not-allowed!important;background-color:#ededed}button:disabled{opacity:.5!important;cursor:not-allowed!important}.box-label{display:flex;max-width:220px;height:35px;min-width:100px;background-color:var(--verde);color:#fff;padding:8px 15px 10px;border:none;border-radius:5px;margin:2px}.box-label .box-value{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.box-label .box-action{width:8px}.box-label .box-action button{color:#d72020;background-color:var(--verde);border:none;font-weight:700;cursor:pointer}\n"], dependencies: [{ 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"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1840
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputComponent, decorators: [{
|
|
1841
|
+
type: Component,
|
|
1842
|
+
args: [{ selector: 'tcloud-ui-multi-input', template: "<div>\n <form #_formulario=\"ngForm\">\n <table>\n <tr *ngIf=\"tcList\">\n <td>\n <input type=\"text\" [(ngModel)]=\"input_value\" [disabled]=\"disabled || loading\" name=\"input_value\" required>\n </td>\n <td>\n <button\n [disabled]=\"disabled || loading || !_formulario.valid\"\n title=\"Adicionar\"\n class=\"btn-plus-select\"\n (click)=\"addItem(input_value)\"\n type=\"button\">\n <i class=\"fas fa-plus\"></i>\n </button>\n </td>\n </tr>\n </table>\n \n <div class=\"box-itens-selected\">\n <ng-container *ngFor=\"let item of tcList; let i = index\">\n \n <div class=\"box-label\">\n <div class=\"box-value\" [title]=\"item.value\">\n {{ item.value }} \n </div>\n <div class=\"box-action\">\n <button\n [disabled]=\"tcList === undefined || (tcList && tcList.length === 0) || disabled || loading\"\n title=\"Remover\"\n type=\"button\"\n (click)=\"removeItem(item.value, i)\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n </div>\n\n </ng-container>\n </div>\n </form>\n</div>\n ", styles: ["table{width:100%;border-collapse:collapse;border:none}table td:first-child{width:100%}input{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}select:disabled{opacity:.8!important;cursor:not-allowed!important;background-color:#ededed}button:disabled{opacity:.5!important;cursor:not-allowed!important}.box-label{display:flex;max-width:220px;height:35px;min-width:100px;background-color:var(--verde);color:#fff;padding:8px 15px 10px;border:none;border-radius:5px;margin:2px}.box-label .box-value{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.box-label .box-action{width:8px}.box-label .box-action button{color:#d72020;background-color:var(--verde);border:none;font-weight:700;cursor:pointer}\n"] }]
|
|
1843
|
+
}], ctorParameters: function () { return []; }, propDecorators: { tcList: [{
|
|
1844
|
+
type: Input
|
|
1845
|
+
}], placeholder: [{
|
|
1846
|
+
type: Input
|
|
1847
|
+
}], disabled: [{
|
|
1848
|
+
type: Input
|
|
1849
|
+
}], loading: [{
|
|
1850
|
+
type: Input
|
|
1851
|
+
}], tcChange: [{
|
|
1852
|
+
type: Output
|
|
1853
|
+
}] } });
|
|
1854
|
+
|
|
1855
|
+
class TCloudUiMultiInputModule {
|
|
1856
|
+
}
|
|
1857
|
+
TCloudUiMultiInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1858
|
+
TCloudUiMultiInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, declarations: [TCloudUiMultiInputComponent], imports: [FormsModule,
|
|
1859
|
+
ReactiveFormsModule,
|
|
1860
|
+
CommonModule], exports: [TCloudUiMultiInputComponent] });
|
|
1861
|
+
TCloudUiMultiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, imports: [FormsModule,
|
|
1862
|
+
ReactiveFormsModule,
|
|
1863
|
+
CommonModule] });
|
|
1864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, decorators: [{
|
|
1865
|
+
type: NgModule,
|
|
1866
|
+
args: [{
|
|
1867
|
+
declarations: [TCloudUiMultiInputComponent],
|
|
1868
|
+
exports: [TCloudUiMultiInputComponent],
|
|
1869
|
+
imports: [
|
|
1870
|
+
FormsModule,
|
|
1871
|
+
ReactiveFormsModule,
|
|
1872
|
+
CommonModule
|
|
1873
|
+
]
|
|
1874
|
+
}]
|
|
1875
|
+
}] });
|
|
1876
|
+
|
|
876
1877
|
class TCloudUiModule {
|
|
877
1878
|
}
|
|
878
1879
|
TCloudUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
879
1880
|
TCloudUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, imports: [TCloudUiModalModule,
|
|
880
1881
|
TCloudUiTabMenuModule,
|
|
881
1882
|
TCloudUiLinhaLogoModule,
|
|
882
|
-
TCloudUiLineStepCircleModule
|
|
1883
|
+
TCloudUiLineStepCircleModule,
|
|
1884
|
+
TCloudUiMultiSelectModule,
|
|
1885
|
+
TCloudUiDataListModule,
|
|
1886
|
+
TCloudUiMultiInputModule,
|
|
1887
|
+
// Directives
|
|
1888
|
+
TCloudUiDirectiveModule,
|
|
1889
|
+
// Pipes
|
|
1890
|
+
TCloudUiPipesModule], exports: [TCloudUiModalModule,
|
|
883
1891
|
TCloudUiTabMenuModule,
|
|
884
1892
|
TCloudUiLinhaLogoModule,
|
|
885
|
-
TCloudUiLineStepCircleModule
|
|
1893
|
+
TCloudUiLineStepCircleModule,
|
|
1894
|
+
TCloudUiMultiSelectModule,
|
|
1895
|
+
TCloudUiDataListModule,
|
|
1896
|
+
TCloudUiMultiInputModule,
|
|
1897
|
+
// Directives
|
|
1898
|
+
TCloudUiDirectiveModule,
|
|
1899
|
+
// Pipes
|
|
1900
|
+
TCloudUiPipesModule] });
|
|
886
1901
|
TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, imports: [TCloudUiModalModule,
|
|
887
1902
|
TCloudUiTabMenuModule,
|
|
888
1903
|
TCloudUiLinhaLogoModule,
|
|
889
|
-
TCloudUiLineStepCircleModule,
|
|
1904
|
+
TCloudUiLineStepCircleModule,
|
|
1905
|
+
TCloudUiMultiSelectModule,
|
|
1906
|
+
TCloudUiDataListModule,
|
|
1907
|
+
TCloudUiMultiInputModule,
|
|
1908
|
+
// Directives
|
|
1909
|
+
TCloudUiDirectiveModule,
|
|
1910
|
+
// Pipes
|
|
1911
|
+
TCloudUiPipesModule, TCloudUiModalModule,
|
|
890
1912
|
TCloudUiTabMenuModule,
|
|
891
1913
|
TCloudUiLinhaLogoModule,
|
|
892
|
-
TCloudUiLineStepCircleModule
|
|
1914
|
+
TCloudUiLineStepCircleModule,
|
|
1915
|
+
TCloudUiMultiSelectModule,
|
|
1916
|
+
TCloudUiDataListModule,
|
|
1917
|
+
TCloudUiMultiInputModule,
|
|
1918
|
+
// Directives
|
|
1919
|
+
TCloudUiDirectiveModule,
|
|
1920
|
+
// Pipes
|
|
1921
|
+
TCloudUiPipesModule] });
|
|
893
1922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, decorators: [{
|
|
894
1923
|
type: NgModule,
|
|
895
1924
|
args: [{
|
|
@@ -897,13 +1926,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
897
1926
|
TCloudUiModalModule,
|
|
898
1927
|
TCloudUiTabMenuModule,
|
|
899
1928
|
TCloudUiLinhaLogoModule,
|
|
900
|
-
TCloudUiLineStepCircleModule
|
|
1929
|
+
TCloudUiLineStepCircleModule,
|
|
1930
|
+
TCloudUiMultiSelectModule,
|
|
1931
|
+
TCloudUiDataListModule,
|
|
1932
|
+
TCloudUiMultiInputModule,
|
|
1933
|
+
// Directives
|
|
1934
|
+
TCloudUiDirectiveModule,
|
|
1935
|
+
// Pipes
|
|
1936
|
+
TCloudUiPipesModule
|
|
901
1937
|
],
|
|
902
1938
|
exports: [
|
|
903
1939
|
TCloudUiModalModule,
|
|
904
1940
|
TCloudUiTabMenuModule,
|
|
905
1941
|
TCloudUiLinhaLogoModule,
|
|
906
|
-
TCloudUiLineStepCircleModule
|
|
1942
|
+
TCloudUiLineStepCircleModule,
|
|
1943
|
+
TCloudUiMultiSelectModule,
|
|
1944
|
+
TCloudUiDataListModule,
|
|
1945
|
+
TCloudUiMultiInputModule,
|
|
1946
|
+
// Directives
|
|
1947
|
+
TCloudUiDirectiveModule,
|
|
1948
|
+
// Pipes
|
|
1949
|
+
TCloudUiPipesModule
|
|
907
1950
|
]
|
|
908
1951
|
}]
|
|
909
1952
|
}] });
|
|
@@ -916,5 +1959,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
916
1959
|
* Generated bundle index. Do not edit.
|
|
917
1960
|
*/
|
|
918
1961
|
|
|
919
|
-
export { TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent };
|
|
1962
|
+
export { CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, MonthNamePipe, RespectivePipe, StatusInfoPipe, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiDirectiveModule, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiInputModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiPipesModule, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTooltipDirective };
|
|
920
1963
|
//# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map
|