@dev-tcloud/tcloud-ui 0.0.8 → 0.0.9

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 (26) hide show
  1. package/README.md +6 -0
  2. package/esm2020/lib/_modules/tcloud-ui-choice-issues/tcloud-ui-choice-issues.component.mjs +88 -0
  3. package/esm2020/lib/_modules/tcloud-ui-choice-issues/tcloud-ui-choice-issues.module.mjs +31 -0
  4. package/esm2020/lib/_modules/tcloud-ui-input-search/tcloud-ui-input-search.component.mjs +65 -0
  5. package/esm2020/lib/_modules/tcloud-ui-input-search/tcloud-ui-input-search.module.mjs +31 -0
  6. package/esm2020/lib/_modules/tcloud-ui-modal/tcloud-ui-modal.component.mjs +29 -2
  7. package/esm2020/lib/_pipes/tcloud-pipes.module.mjs +7 -3
  8. package/esm2020/lib/_services/loading-transitions.service.mjs +51 -0
  9. package/esm2020/lib/_services/search-in-object.service.mjs +91 -0
  10. package/esm2020/lib/tcloud-ui.module.mjs +26 -3
  11. package/esm2020/public-api.mjs +10 -1
  12. package/fesm2015/dev-tcloud-tcloud-ui.mjs +645 -264
  13. package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
  14. package/fesm2020/dev-tcloud-tcloud-ui.mjs +645 -264
  15. package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
  16. package/lib/_modules/tcloud-ui-choice-issues/tcloud-ui-choice-issues.component.d.ts +27 -0
  17. package/lib/_modules/tcloud-ui-choice-issues/tcloud-ui-choice-issues.module.d.ts +9 -0
  18. package/lib/_modules/tcloud-ui-input-search/tcloud-ui-input-search.component.d.ts +28 -0
  19. package/lib/_modules/tcloud-ui-input-search/tcloud-ui-input-search.module.d.ts +9 -0
  20. package/lib/_modules/tcloud-ui-modal/tcloud-ui-modal.component.d.ts +31 -0
  21. package/lib/_pipes/tcloud-pipes.module.d.ts +1 -1
  22. package/lib/_services/loading-transitions.service.d.ts +16 -0
  23. package/lib/_services/search-in-object.service.d.ts +18 -0
  24. package/lib/tcloud-ui.module.d.ts +5 -3
  25. package/package.json +1 -1
  26. package/public-api.d.ts +6 -0
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, NgModule, Injectable, EventEmitter, Output, ViewChild, forwardRef, Directive, HostListener, Pipe } from '@angular/core';
2
+ import { Component, Input, NgModule, Injectable, EventEmitter, Output, ViewChild, forwardRef, Pipe, Directive, HostListener } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
4
+ import { CommonModule, DatePipe } from '@angular/common';
5
5
  import { Buffer } from 'buffer';
6
6
  import { Subject } from 'rxjs';
7
7
  import * as i1$1 from '@angular/router';
@@ -495,13 +495,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
495
495
  class TCloudUiModalComponent {
496
496
  constructor(tcloudModalService) {
497
497
  this.tcloudModalService = tcloudModalService;
498
+ /**
499
+ * tcloud-ui-modal - Cria e exibe um modal
500
+ *
501
+ * toAction - (toAction) - Resultado do evento - 'confirmed'|'cancel'|'close'
502
+ * toConfirm - (toConfirm) - Indica que a ação foi confirmada - resultado true
503
+ * toCancel - (toCancel() - Indica que a ação foi cancelada - resultado false
504
+ */
498
505
  this.param_confirm = {};
499
506
  /* BEGIN - Parametros para modo confirmacao */
500
507
  this._confirm = false;
501
508
  this._confirmText = 'Confirmo';
509
+ /**
510
+ * autoClose boolean - Indica se deverá ser fechado quando confirmar uma ação - default true
511
+ */
502
512
  this.autoClose = true;
513
+ /**
514
+ * maxWidth - number - Largura máxima do modal - default 500px
515
+ */
503
516
  this.maxWidth = 500;
504
- // psg
505
517
  this._open = false;
506
518
  this._loading = false;
507
519
  this.openChange = new EventEmitter();
@@ -509,16 +521,25 @@ class TCloudUiModalComponent {
509
521
  this.toCancel = new EventEmitter();
510
522
  this.toAction = new EventEmitter();
511
523
  }
524
+ /**
525
+ * confirm boolean - Indica se será um modal do tipo confirmação - default false
526
+ */
512
527
  set confirm(v) {
513
528
  this._confirm = v;
514
529
  this.param_confirm.confirm = this._confirm;
515
530
  this.param_confirm.confirmText = this._confirmText;
516
531
  }
532
+ /**
533
+ * confirmText string - Texto que deverá ser digitado - defualt Confirmo
534
+ */
517
535
  set confirmText(v) {
518
536
  this._confirmText = v;
519
537
  this.param_confirm.confirmText = this._confirmText;
520
538
  this.param_confirm.confirm = this._confirm;
521
539
  }
540
+ /**
541
+ * window - string - nome referente ao tamanho do modal - não utilizar maxWidth se for utilizar window - default 500 (medium)
542
+ */
522
543
  set window(size) {
523
544
  switch (size) {
524
545
  case 'small':
@@ -538,11 +559,17 @@ class TCloudUiModalComponent {
538
559
  break;
539
560
  }
540
561
  }
562
+ /**
563
+ * open - boolean - Variável de controle para exibição do modal - obrigatório
564
+ */
541
565
  set open(open) {
542
566
  this._open = open;
543
567
  this.fixed_body((open) ? 'on' : 'off');
544
568
  }
545
569
  get open() { return this._open; }
570
+ /**
571
+ * loading - boolean - Coloca o modal em modo de carregamento - default false
572
+ */
546
573
  set loading(loading) {
547
574
  this._loading = loading;
548
575
  this.tcloudModalService.setLoading(loading);
@@ -1001,12 +1028,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1001
1028
  type: Injectable
1002
1029
  }] });
1003
1030
 
1004
- const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
1031
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 = {
1005
1032
  provide: NG_VALUE_ACCESSOR,
1006
1033
  useExisting: forwardRef(() => TCloudUiDataListComponent),
1007
1034
  multi: true
1008
1035
  };
1009
- const noop = () => {
1036
+ const noop$1 = () => {
1010
1037
  };
1011
1038
  class TCloudUiDataListComponent {
1012
1039
  constructor(dataListService, formBuilder) {
@@ -1029,8 +1056,8 @@ class TCloudUiDataListComponent {
1029
1056
  this.id = '';
1030
1057
  //Placeholders for the callbacks which are later providesd
1031
1058
  //by the Control Value Accessor
1032
- this.onTouchedCallback = noop;
1033
- this.onChangeCallback = noop;
1059
+ this.onTouchedCallback = noop$1;
1060
+ this.onChangeCallback = noop$1;
1034
1061
  }
1035
1062
  set disabled(v) {
1036
1063
  this._disabled = v;
@@ -1224,13 +1251,13 @@ class TCloudUiDataListComponent {
1224
1251
  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
1252
  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
1253
  DataListService,
1227
- CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR
1254
+ CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1
1228
1255
  ], 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
1256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListComponent, decorators: [{
1230
1257
  type: Component,
1231
1258
  args: [{ selector: 'tcloud-ui-data-list', providers: [
1232
1259
  DataListService,
1233
- CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR
1260
+ CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1
1234
1261
  ], 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
1262
  }], ctorParameters: function () { return [{ type: DataListService }, { type: i2.FormBuilder }]; }, propDecorators: { placeholder: [{
1236
1263
  type: Input
@@ -1335,202 +1362,227 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1335
1362
  }]
1336
1363
  }] });
1337
1364
 
1338
- class TCloudUiTooltipDirective {
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
- this.renderer.addClass(this.el.nativeElement, 'main-tooltip');
1358
- const el = this.getElement();
1359
- el.style.display = 'inline';
1360
- setTimeout(() => {
1361
- var _a;
1362
- this.el_height = this.el.nativeElement.offsetHeight;
1363
- this.el_width = this.el.nativeElement.offsetWidth;
1364
- this.el_center = this.el_width / 2;
1365
- const rect = (_a = this.el.nativeElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
1366
- this.el_position = (rect === null || rect === void 0 ? void 0 : rect.left) || 0;
1367
- // console.log('this.el_width', this.el_width);
1368
- // console.log('this.el_center', this.el_center);
1369
- // console.log('this.el_position', this.el_position);
1370
- this.target_height = el.offsetHeight;
1371
- this.target_width = el.offsetWidth;
1372
- this.target_center = this.target_width / 2;
1373
- // console.log('target_heigth', this.target_height);
1374
- // console.log('target_width', this.target_width);
1375
- // console.log('target_center', this.target_center);
1376
- // this.renderer.setStyle(el, 'bottom', `${this.el_position}px`);
1377
- switch (this._direction) {
1378
- case 'top':
1379
- this.to_top(el);
1380
- break;
1381
- case 'bottom':
1382
- this.to_bottom(el);
1383
- break;
1384
- case 'left':
1385
- this.to_left(el);
1386
- break;
1387
- case 'right':
1388
- this.to_right(el);
1389
- break;
1390
- }
1391
- });
1392
- }
1393
- }
1394
- onMouseOut() {
1395
- if (this.getElement()) {
1396
- const el = this.getElement();
1397
- el.style.display = 'none';
1398
- this.renderer.removeClass(this.el.nativeElement, 'main-tooltip');
1399
- }
1365
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
1366
+ provide: NG_VALUE_ACCESSOR,
1367
+ useExisting: forwardRef(() => TCloudUiChoiceIssuesComponent),
1368
+ multi: true
1369
+ };
1370
+ const noop = () => {
1371
+ };
1372
+ class TCloudUiChoiceIssuesComponent {
1373
+ constructor() {
1374
+ this.view = false;
1375
+ this.titulo = '';
1376
+ this.subTitulo = '';
1377
+ this.disabled = false;
1378
+ this.onChange = new EventEmitter();
1379
+ this.innerValue = false;
1380
+ //Placeholders for the callbacks which are later providesd
1381
+ //by the Control Value Accessor
1382
+ this.onTouchedCallback = noop;
1383
+ this.onChangeCallback = noop;
1384
+ this.ID = 'tc-issue-' + Math.random().toString(36).substr(2, 9);
1400
1385
  }
1401
- set TCtooltip(tooltip) {
1402
- if (tooltip) {
1403
- this.check(tooltip);
1404
- }
1386
+ //get accessor
1387
+ get value() {
1388
+ return this.innerValue;
1405
1389
  }
1406
- set TCdirection(direction) {
1407
- if (direction) {
1408
- this._direction = direction;
1390
+ ;
1391
+ //set accessor including call the onchange callback
1392
+ set value(v) {
1393
+ if (v !== this.innerValue) {
1394
+ this.innerValue = v;
1395
+ this.onChangeCallback(v);
1409
1396
  }
1410
1397
  }
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;
1398
+ //Set touched on blur
1399
+ onBlur() {
1400
+ this.onTouchedCallback();
1418
1401
  }
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);
1402
+ //From ControlValueAccessor interface
1403
+ writeValue(value) {
1404
+ if (value !== this.innerValue) {
1405
+ this.innerValue = value;
1429
1406
  }
1430
1407
  }
1431
- setStyle(el) {
1432
- // this.renderer.setStyle(el, 'position', 'relative');
1433
- // this.renderer.setStyle(el, 'display', 'inline');
1434
- }
1435
- create_tooltip(tip, el) {
1436
- this.setStyle(el);
1437
- const tooltip = document.createElement("div");
1438
- tooltip.setAttribute('id', this.ID);
1439
- tooltip.setAttribute('style', `
1440
- position: absolute;
1441
- display: none;
1442
- padding: 10px;
1443
- border-radius: 10px;
1444
- text-align: center;
1445
- width: max-content;
1446
- max-width: 250px;
1447
- background-color: transparent;
1448
- color: transparent;
1449
- z-index: 1090;
1450
- bottom: ${this.el_position}px;
1451
- left: ${this.target_center}px;
1452
- `);
1453
- tooltip.innerHTML = tip;
1454
- el.insertBefore(tooltip, null);
1455
- }
1456
- to_top(el) {
1457
- const pos = this.el_center - (this.target_center);
1458
- this.renderer.setStyle(el, 'left', `${(pos)}px`);
1459
- this.renderer.setStyle(el, 'bottom', `${(this.el_height + 7)}px`);
1460
- el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-top');
1408
+ //From ControlValueAccessor interface
1409
+ registerOnChange(fn) {
1410
+ this.onChangeCallback = fn;
1461
1411
  }
1462
- to_bottom(el) {
1463
- const pos = this.el_center - (this.target_center);
1464
- this.renderer.setStyle(el, 'left', `${(pos)}px`);
1465
- this.renderer.setStyle(el, 'bottom', `-${(this.target_height + 7)}px`);
1466
- el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-bottom');
1412
+ //From ControlValueAccessor interface
1413
+ registerOnTouched(fn) {
1414
+ this.onTouchedCallback = fn;
1467
1415
  }
1468
- to_right(el) {
1469
- const pos = this.el_width;
1470
- this.renderer.setStyle(el, 'left', `${(pos + 11)}px`);
1471
- this.renderer.setStyle(el, 'bottom', `-${(((this.target_height) / 2) - (this.el_height / 2))}px`);
1472
- el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-right');
1416
+ setV(v) {
1417
+ console.log('setV', v);
1418
+ this.value = v;
1419
+ this.onChange.emit(v);
1473
1420
  }
1474
- to_left(el) {
1475
- const pos = -((this.target_width));
1476
- this.renderer.setStyle(el, 'left', `${(pos - 11)}px`);
1477
- this.renderer.setStyle(el, 'bottom', `-${(((this.target_height) / 2) - (this.el_height / 2))}px`);
1478
- el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-left');
1421
+ createID() {
1422
+ // Math.random should be unique because of its seeding algorithm.
1423
+ // Convert it to base 36 (numbers + letters), and grab the first 9 characters
1424
+ // after the decimal.
1425
+ return '_' + Math.random().toString(36).substr(2, 9);
1479
1426
  }
1480
1427
  }
1481
- 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 });
1482
- TCloudUiTooltipDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTooltipDirective, selector: "[TCtooltip]", inputs: { TCtooltip: "TCtooltip", TCdirection: "TCdirection" }, host: { listeners: { "mouseover": "onMouseOver()", "mouseout": "onMouseOut()" } }, ngImport: i0 });
1483
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTooltipDirective, decorators: [{
1484
- type: Directive,
1485
- args: [{
1486
- selector: '[TCtooltip]'
1487
- }]
1488
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { onMouseOver: [{
1489
- type: HostListener,
1490
- args: ['mouseover']
1491
- }], onMouseOut: [{
1492
- type: HostListener,
1493
- args: ['mouseout']
1494
- }], TCtooltip: [{
1428
+ TCloudUiChoiceIssuesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiChoiceIssuesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1429
+ TCloudUiChoiceIssuesComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiChoiceIssuesComponent, selector: "tcloud-ui-choice-issues", inputs: { view: "view", titulo: "titulo", subTitulo: "subTitulo", disabled: "disabled" }, outputs: { onChange: "onChange" }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["campo"], descendants: true, read: true }], ngImport: i0, template: "\r\n\r\n<input #campo [(ngModel)]=\"value\" type=\"hidden\" [value]=\"false\" >\r\n<div class=\"box p-2 mt-3 mb-2\">\r\n <div class=\"row\">\r\n <div class=\"col-md-8\">\r\n <p class=\"titulo\">{{ titulo }}</p> \r\n </div>\r\n <div class=\"col-md-4 text-right\"> \r\n\r\n <table class=\"mt-2 mr-2\" *ngIf=\"!view\" >\r\n <tr>\r\n <td>\r\n <div class=\"form-fieldset\">\r\n <label [class.v-true]=\"value\" class=\"mr-1\"><input #campo name=\"{{ ID }}\" [value]=\"true\" type=\"radio\" [(ngModel)]=\"value\" (click)=\"setV(true)\" >Sim</label>\r\n </div>\r\n </td>\r\n <td>\r\n <div class=\"form-fieldset\">\r\n <label [class.v-true]=\"!value\" class=\"ml-2\"><input #campo name=\"{{ ID }}\" [value]=\"false\" type=\"radio\" [(ngModel)]=\"value\" (click)=\"setV(false)\" >N\u00E3o</label>\r\n </div>\r\n </td>\r\n </tr>\r\n </table> \r\n\r\n <table class=\"mt-2 mr-2\" *ngIf=\"view\" >\r\n <tr>\r\n <td>\r\n <div class=\"form-fieldset view\" >\r\n <label *ngIf=\"value\" class=\"v-true disabled\" >Sim</label>\r\n <label *ngIf=\"!value\">N\u00E3o</label>\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"col-md-12 mt-1\">\r\n <p class=\"sub-titulo\">{{ subTitulo }}</p>\r\n </div>\r\n <div class=\"col-md-12 mt-2 mb-1\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", styles: [".titulo{font-size:1rem;color:var(--cinza)}.sub-titulo{color:#b0adaa}.box{border:1px solid var(--cinza3);border-radius:10px}.box.box-icon{display:flex;justify-content:center;padding:35px 20px}.form-fieldset input{display:none}.form-fieldset .v-true{background:var(--verde);color:#fff}.form-fieldset label{font-size:11px;background:var(--cinza4);cursor:pointer;position:relative;display:inline-flex;align-items:center;justify-content:space-around;text-transform:uppercase;border-radius:30px;padding:7px;margin:0;width:66px}.form-fieldset label:before{content:\"\";background:#fff;border-radius:50%;height:15px;width:15px}.form-fieldset label:nth-child(2){margin-right:20px}table{width:100%;max-width:200px}.view,.view label{cursor:inherit!important}.disabled{background-color:#8fdfe8!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiChoiceIssuesComponent, decorators: [{
1431
+ type: Component,
1432
+ args: [{ selector: 'tcloud-ui-choice-issues', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], template: "\r\n\r\n<input #campo [(ngModel)]=\"value\" type=\"hidden\" [value]=\"false\" >\r\n<div class=\"box p-2 mt-3 mb-2\">\r\n <div class=\"row\">\r\n <div class=\"col-md-8\">\r\n <p class=\"titulo\">{{ titulo }}</p> \r\n </div>\r\n <div class=\"col-md-4 text-right\"> \r\n\r\n <table class=\"mt-2 mr-2\" *ngIf=\"!view\" >\r\n <tr>\r\n <td>\r\n <div class=\"form-fieldset\">\r\n <label [class.v-true]=\"value\" class=\"mr-1\"><input #campo name=\"{{ ID }}\" [value]=\"true\" type=\"radio\" [(ngModel)]=\"value\" (click)=\"setV(true)\" >Sim</label>\r\n </div>\r\n </td>\r\n <td>\r\n <div class=\"form-fieldset\">\r\n <label [class.v-true]=\"!value\" class=\"ml-2\"><input #campo name=\"{{ ID }}\" [value]=\"false\" type=\"radio\" [(ngModel)]=\"value\" (click)=\"setV(false)\" >N\u00E3o</label>\r\n </div>\r\n </td>\r\n </tr>\r\n </table> \r\n\r\n <table class=\"mt-2 mr-2\" *ngIf=\"view\" >\r\n <tr>\r\n <td>\r\n <div class=\"form-fieldset view\" >\r\n <label *ngIf=\"value\" class=\"v-true disabled\" >Sim</label>\r\n <label *ngIf=\"!value\">N\u00E3o</label>\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div class=\"col-md-12 mt-1\">\r\n <p class=\"sub-titulo\">{{ subTitulo }}</p>\r\n </div>\r\n <div class=\"col-md-12 mt-2 mb-1\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", styles: [".titulo{font-size:1rem;color:var(--cinza)}.sub-titulo{color:#b0adaa}.box{border:1px solid var(--cinza3);border-radius:10px}.box.box-icon{display:flex;justify-content:center;padding:35px 20px}.form-fieldset input{display:none}.form-fieldset .v-true{background:var(--verde);color:#fff}.form-fieldset label{font-size:11px;background:var(--cinza4);cursor:pointer;position:relative;display:inline-flex;align-items:center;justify-content:space-around;text-transform:uppercase;border-radius:30px;padding:7px;margin:0;width:66px}.form-fieldset label:before{content:\"\";background:#fff;border-radius:50%;height:15px;width:15px}.form-fieldset label:nth-child(2){margin-right:20px}table{width:100%;max-width:200px}.view,.view label{cursor:inherit!important}.disabled{background-color:#8fdfe8!important}\n"] }]
1433
+ }], ctorParameters: function () { return []; }, propDecorators: { view: [{
1495
1434
  type: Input
1496
- }], TCdirection: [{
1435
+ }], titulo: [{
1436
+ type: Input
1437
+ }], subTitulo: [{
1438
+ type: Input
1439
+ }], disabled: [{
1497
1440
  type: Input
1441
+ }], onChange: [{
1442
+ type: Output
1443
+ }], inputRef: [{
1444
+ type: ViewChild,
1445
+ args: ['campo', { read: true, static: false }]
1498
1446
  }] } });
1499
1447
 
1500
- class TCloudUiDirectiveModule {
1448
+ class TCloudUiChoiceIssuesModule {
1501
1449
  }
1502
- TCloudUiDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1503
- TCloudUiDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, declarations: [TCloudUiTooltipDirective], exports: [TCloudUiTooltipDirective] });
1504
- TCloudUiDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule });
1505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, decorators: [{
1450
+ TCloudUiChoiceIssuesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiChoiceIssuesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1451
+ TCloudUiChoiceIssuesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiChoiceIssuesModule, declarations: [TCloudUiChoiceIssuesComponent], imports: [CommonModule,
1452
+ FormsModule,
1453
+ ReactiveFormsModule], exports: [TCloudUiChoiceIssuesComponent] });
1454
+ TCloudUiChoiceIssuesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiChoiceIssuesModule, imports: [CommonModule,
1455
+ FormsModule,
1456
+ ReactiveFormsModule] });
1457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiChoiceIssuesModule, decorators: [{
1506
1458
  type: NgModule,
1507
1459
  args: [{
1508
- declarations: [TCloudUiTooltipDirective],
1509
- exports: [TCloudUiTooltipDirective],
1460
+ declarations: [
1461
+ TCloudUiChoiceIssuesComponent,
1462
+ ],
1463
+ exports: [
1464
+ TCloudUiChoiceIssuesComponent,
1465
+ ],
1466
+ imports: [
1467
+ CommonModule,
1468
+ FormsModule,
1469
+ ReactiveFormsModule
1470
+ ]
1510
1471
  }]
1511
1472
  }] });
1512
1473
 
1513
- class MonthNamePipe {
1474
+ class TCloudUiMultiInputComponent {
1514
1475
  constructor() {
1515
- this.meses = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezenbro'];
1476
+ this.placeholder = '';
1477
+ this.disabled = false;
1478
+ this.loading = false;
1479
+ this.count_actives = 0;
1480
+ this.tcChange = new EventEmitter();
1516
1481
  }
1517
- transform(yyyy_mm) {
1518
- if (yyyy_mm !== '') {
1519
- let part = (yyyy_mm).split('-');
1520
- if ((part).length === 2) {
1521
- let yyyy = +part[0];
1522
- let mm = +part[1];
1523
- return this.meses[(mm - 1)];
1482
+ ngOnInit() {
1483
+ setTimeout(() => {
1484
+ this.toChange();
1485
+ });
1486
+ }
1487
+ addItem(item) {
1488
+ if (this.disabled) {
1489
+ return;
1490
+ }
1491
+ if (!this.tcList) {
1492
+ this.tcList = [];
1493
+ }
1494
+ (this.tcList).push({ value: item });
1495
+ this.toChange();
1496
+ this.input_value = '';
1497
+ }
1498
+ removeItem(item, index) {
1499
+ if (this.disabled) {
1500
+ return;
1501
+ }
1502
+ if (this.tcList) {
1503
+ for (let i = 0; i < (this.tcList).length; i++) {
1504
+ const row = this.tcList[i];
1505
+ if (item === row.value && i === index) {
1506
+ (this.tcList).splice(index, 1);
1507
+ break;
1508
+ }
1524
1509
  }
1510
+ this.toChange();
1525
1511
  }
1526
- return '';
1527
1512
  }
1528
- }
1529
- MonthNamePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1530
- MonthNamePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, name: "monthname" });
1531
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, decorators: [{
1532
- type: Pipe,
1533
- args: [{ name: 'monthname' }]
1513
+ toChange() {
1514
+ let count_actives = 0;
1515
+ let itens = [];
1516
+ if (this.tcList) {
1517
+ for (let i = 0; i < (this.tcList).length; i++) {
1518
+ const row = this.tcList[i];
1519
+ (itens).push(row);
1520
+ }
1521
+ }
1522
+ this.count_actives = count_actives;
1523
+ this.tcChange.emit(itens);
1524
+ }
1525
+ }
1526
+ TCloudUiMultiInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1527
+ 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"] }] });
1528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputComponent, decorators: [{
1529
+ type: Component,
1530
+ 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"] }]
1531
+ }], ctorParameters: function () { return []; }, propDecorators: { tcList: [{
1532
+ type: Input
1533
+ }], placeholder: [{
1534
+ type: Input
1535
+ }], disabled: [{
1536
+ type: Input
1537
+ }], loading: [{
1538
+ type: Input
1539
+ }], tcChange: [{
1540
+ type: Output
1541
+ }] } });
1542
+
1543
+ class TCloudUiMultiInputModule {
1544
+ }
1545
+ TCloudUiMultiInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1546
+ TCloudUiMultiInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, declarations: [TCloudUiMultiInputComponent], imports: [FormsModule,
1547
+ ReactiveFormsModule,
1548
+ CommonModule], exports: [TCloudUiMultiInputComponent] });
1549
+ TCloudUiMultiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, imports: [FormsModule,
1550
+ ReactiveFormsModule,
1551
+ CommonModule] });
1552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, decorators: [{
1553
+ type: NgModule,
1554
+ args: [{
1555
+ declarations: [TCloudUiMultiInputComponent],
1556
+ exports: [TCloudUiMultiInputComponent],
1557
+ imports: [
1558
+ FormsModule,
1559
+ ReactiveFormsModule,
1560
+ CommonModule
1561
+ ]
1562
+ }]
1563
+ }] });
1564
+
1565
+ class MonthNamePipe {
1566
+ constructor() {
1567
+ this.meses = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezenbro'];
1568
+ }
1569
+ transform(yyyy_mm) {
1570
+ if (yyyy_mm !== '') {
1571
+ let part = (yyyy_mm).split('-');
1572
+ if ((part).length === 2) {
1573
+ let yyyy = +part[0];
1574
+ let mm = +part[1];
1575
+ return this.meses[(mm - 1)];
1576
+ }
1577
+ }
1578
+ return '';
1579
+ }
1580
+ }
1581
+ MonthNamePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1582
+ MonthNamePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, name: "monthname" });
1583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MonthNamePipe, decorators: [{
1584
+ type: Pipe,
1585
+ args: [{ name: 'monthname' }]
1534
1586
  }] });
1535
1587
 
1536
1588
  class StatusInfoPipe {
@@ -1745,17 +1797,367 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1745
1797
  args: [{ name: 'cpf' }]
1746
1798
  }] });
1747
1799
 
1800
+ class TCloudUiSearchInObjectService {
1801
+ constructor(datepipe, statusinfo) {
1802
+ this.datepipe = datepipe;
1803
+ this.statusinfo = statusinfo;
1804
+ }
1805
+ isADate(d) {
1806
+ if (Object.prototype.toString.call(d) === "[object Date]") {
1807
+ ;
1808
+ if (isNaN(d.getTime())) {
1809
+ return false;
1810
+ }
1811
+ else {
1812
+ return true;
1813
+ }
1814
+ }
1815
+ return false;
1816
+ }
1817
+ /**
1818
+ * meet - Procura em object - filtro utilizado para busca em tabelas
1819
+ * @param valor texto a ser procurado
1820
+ * @param emObject object alvo de onde procurar
1821
+ * @param camposDebusca (Opcional) informa em quais são as keys que deverá procurar
1822
+ */
1823
+ meet(valor, emObject, camposDebusca) {
1824
+ if (valor != "") {
1825
+ if (emObject.length < 1) {
1826
+ return emObject;
1827
+ }
1828
+ if (camposDebusca === undefined || camposDebusca === null) {
1829
+ camposDebusca = [];
1830
+ for (const key in emObject[0]) {
1831
+ camposDebusca.push(key);
1832
+ }
1833
+ }
1834
+ if (camposDebusca.length < 1) {
1835
+ return emObject;
1836
+ }
1837
+ valor = valor.toLowerCase();
1838
+ var result = [];
1839
+ for (const key in emObject) {
1840
+ var oObject = emObject[key];
1841
+ if (oObject) {
1842
+ for (const objectvalue of camposDebusca) {
1843
+ const dt = new Date(oObject[objectvalue]);
1844
+ if (this.isADate(dt) && typeof ((dt).getMonth) === 'function') {
1845
+ const data1 = this.datepipe.transform(dt, 'dd/MM/yyyy hh:mm');
1846
+ const data2 = this.datepipe.transform(dt, 'medium');
1847
+ const strToTest = (data1 + " " + data2 + " " + oObject[objectvalue]).toLowerCase();
1848
+ if ((strToTest.indexOf(valor) >= 0) && (result).indexOf(oObject) == -1) {
1849
+ result.push(oObject);
1850
+ break;
1851
+ }
1852
+ }
1853
+ else {
1854
+ const strToTest = (this.statusinfo.transform(oObject[objectvalue], 'ALL') + "").toLowerCase();
1855
+ if ((strToTest.indexOf(valor) >= 0) && (result).indexOf(oObject) == -1) {
1856
+ result.push(oObject);
1857
+ break;
1858
+ }
1859
+ }
1860
+ }
1861
+ }
1862
+ }
1863
+ if (emObject && typeof emObject === 'object' && Array.isArray(emObject)) {
1864
+ // is array
1865
+ const v = (`${valor}`).toUpperCase();
1866
+ for (let i = 0; i < (emObject).length; i++) {
1867
+ const item = (`${emObject[i]}`).toUpperCase();
1868
+ if (item.includes(v) || item === v) {
1869
+ result.push(emObject[i]);
1870
+ }
1871
+ }
1872
+ }
1873
+ return result;
1874
+ }
1875
+ return emObject;
1876
+ }
1877
+ }
1878
+ TCloudUiSearchInObjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiSearchInObjectService, deps: [{ token: i1.DatePipe }, { token: StatusInfoPipe }], target: i0.ɵɵFactoryTarget.Injectable });
1879
+ TCloudUiSearchInObjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiSearchInObjectService, providedIn: 'root' });
1880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiSearchInObjectService, decorators: [{
1881
+ type: Injectable,
1882
+ args: [{
1883
+ providedIn: 'root',
1884
+ }]
1885
+ }], ctorParameters: function () { return [{ type: i1.DatePipe }, { type: StatusInfoPipe }]; } });
1886
+
1887
+ class TCloudUiInputSearchComponent {
1888
+ constructor(searchInObjectService) {
1889
+ this.searchInObjectService = searchInObjectService;
1890
+ /**
1891
+ * tcloud-ui-input-search - Procura pelo valor informado no objeto indicado
1892
+ * @param placeholder string - placeholder no input
1893
+ * @param mirror boolean - Exibir os valores espelhados ou somente os valores encontrados
1894
+ * @param base_object object - Objeto onde ser procurado
1895
+ * @param found - Evite o valor encontrado
1896
+ */
1897
+ this.placeholder = 'Procurar...';
1898
+ this.mirror = true;
1899
+ this.search_text = '';
1900
+ this.found = new EventEmitter();
1901
+ }
1902
+ set base_object(base_object) {
1903
+ if (base_object) {
1904
+ this._base_object = base_object;
1905
+ if (this.mirror) {
1906
+ this.result_object = base_object;
1907
+ this.toFound();
1908
+ }
1909
+ }
1910
+ }
1911
+ get base_object() { return this._base_object; }
1912
+ ngOnInit() {
1913
+ }
1914
+ buscar(value) {
1915
+ this.result_object = this.searchInObjectService.meet(`${value}`, this.base_object);
1916
+ this.toFound();
1917
+ }
1918
+ clean() {
1919
+ if (this.mirror) {
1920
+ this.buscar('');
1921
+ }
1922
+ else {
1923
+ this.result_object = [];
1924
+ this.toFound();
1925
+ }
1926
+ this.search_text = '';
1927
+ }
1928
+ toFound() {
1929
+ this.found.emit(this.result_object);
1930
+ }
1931
+ }
1932
+ TCloudUiInputSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiInputSearchComponent, deps: [{ token: TCloudUiSearchInObjectService }], target: i0.ɵɵFactoryTarget.Component });
1933
+ TCloudUiInputSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiInputSearchComponent, selector: "tcloud-ui-input-search", inputs: { placeholder: "placeholder", mirror: "mirror", base_object: "base_object" }, outputs: { found: "found" }, ngImport: i0, template: "<table class=\"tc-group-input-table\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td><input [(ngModel)]=\"search_text\" type=\"text\" (keyup)=\"buscar(search_text)\" placeholder=\"{{ placeholder }}\" ></td>\n <td> \n <ng-container *ngIf=\"search_text === ''\"> \n <button type=\"button\" (click)=\"buscar(search_text)\"><i class=\"fas fa-search\"></i></button>\n </ng-container> \n\n <ng-container *ngIf=\"search_text !== ''\"> \n <button type=\"button\" (click)=\"clean()\"><i class=\"fas fa-times\"></i></button>\n </ng-container>\n </td>\n </tr>\n</table>", styles: [".tc-group-input-table{width:100%;border-collapse:collapse;border-spacing:0}.tc-group-input-table td{border:none;border-style:hidden;border-spacing:0}.tc-group-input-table td:first-child input{width:100%;height:35px;border:none;border:1px solid #ccc}.tc-group-input-table td:last-child{width:40px}.tc-group-input-table td:last-child button{width:100%;height:35px;border:none;border-radius:0 10px 10px 0;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1934
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiInputSearchComponent, decorators: [{
1935
+ type: Component,
1936
+ args: [{ selector: 'tcloud-ui-input-search', template: "<table class=\"tc-group-input-table\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td><input [(ngModel)]=\"search_text\" type=\"text\" (keyup)=\"buscar(search_text)\" placeholder=\"{{ placeholder }}\" ></td>\n <td> \n <ng-container *ngIf=\"search_text === ''\"> \n <button type=\"button\" (click)=\"buscar(search_text)\"><i class=\"fas fa-search\"></i></button>\n </ng-container> \n\n <ng-container *ngIf=\"search_text !== ''\"> \n <button type=\"button\" (click)=\"clean()\"><i class=\"fas fa-times\"></i></button>\n </ng-container>\n </td>\n </tr>\n</table>", styles: [".tc-group-input-table{width:100%;border-collapse:collapse;border-spacing:0}.tc-group-input-table td{border:none;border-style:hidden;border-spacing:0}.tc-group-input-table td:first-child input{width:100%;height:35px;border:none;border:1px solid #ccc}.tc-group-input-table td:last-child{width:40px}.tc-group-input-table td:last-child button{width:100%;height:35px;border:none;border-radius:0 10px 10px 0;cursor:pointer}\n"] }]
1937
+ }], ctorParameters: function () { return [{ type: TCloudUiSearchInObjectService }]; }, propDecorators: { placeholder: [{
1938
+ type: Input
1939
+ }], mirror: [{
1940
+ type: Input
1941
+ }], base_object: [{
1942
+ type: Input
1943
+ }], found: [{
1944
+ type: Output
1945
+ }] } });
1946
+
1947
+ class TCloudUiInputSearchModule {
1948
+ }
1949
+ TCloudUiInputSearchModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiInputSearchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1950
+ TCloudUiInputSearchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiInputSearchModule, declarations: [TCloudUiInputSearchComponent], imports: [CommonModule,
1951
+ FormsModule,
1952
+ ReactiveFormsModule], exports: [TCloudUiInputSearchComponent] });
1953
+ TCloudUiInputSearchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiInputSearchModule, imports: [CommonModule,
1954
+ FormsModule,
1955
+ ReactiveFormsModule] });
1956
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiInputSearchModule, decorators: [{
1957
+ type: NgModule,
1958
+ args: [{
1959
+ declarations: [
1960
+ TCloudUiInputSearchComponent
1961
+ ],
1962
+ exports: [
1963
+ TCloudUiInputSearchComponent
1964
+ ],
1965
+ imports: [
1966
+ CommonModule,
1967
+ FormsModule,
1968
+ ReactiveFormsModule
1969
+ ]
1970
+ }]
1971
+ }] });
1972
+
1973
+ class TCloudUiTooltipDirective {
1974
+ constructor(el, renderer) {
1975
+ this.el = el;
1976
+ this.renderer = renderer;
1977
+ this._direction = 'top';
1978
+ // main
1979
+ this.el_height = 0;
1980
+ this.el_width = 0;
1981
+ this.el_center = 0;
1982
+ this.el_position = 0;
1983
+ // tooltip
1984
+ this.target_height = 0;
1985
+ this.target_width = 0;
1986
+ this.target_center = 0;
1987
+ this.ID = '';
1988
+ this.info_text = '';
1989
+ }
1990
+ onMouseOver() {
1991
+ if (this.getElement()) {
1992
+ this.renderer.addClass(this.el.nativeElement, 'main-tooltip');
1993
+ const el = this.getElement();
1994
+ el.style.display = 'inline';
1995
+ setTimeout(() => {
1996
+ var _a;
1997
+ this.el_height = this.el.nativeElement.offsetHeight;
1998
+ this.el_width = this.el.nativeElement.offsetWidth;
1999
+ this.el_center = this.el_width / 2;
2000
+ const rect = (_a = this.el.nativeElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
2001
+ this.el_position = (rect === null || rect === void 0 ? void 0 : rect.left) || 0;
2002
+ // console.log('this.el_width', this.el_width);
2003
+ // console.log('this.el_center', this.el_center);
2004
+ // console.log('this.el_position', this.el_position);
2005
+ this.target_height = el.offsetHeight;
2006
+ this.target_width = el.offsetWidth;
2007
+ this.target_center = this.target_width / 2;
2008
+ // console.log('target_heigth', this.target_height);
2009
+ // console.log('target_width', this.target_width);
2010
+ // console.log('target_center', this.target_center);
2011
+ // this.renderer.setStyle(el, 'bottom', `${this.el_position}px`);
2012
+ switch (this._direction) {
2013
+ case 'top':
2014
+ this.to_top(el);
2015
+ break;
2016
+ case 'bottom':
2017
+ this.to_bottom(el);
2018
+ break;
2019
+ case 'left':
2020
+ this.to_left(el);
2021
+ break;
2022
+ case 'right':
2023
+ this.to_right(el);
2024
+ break;
2025
+ }
2026
+ });
2027
+ }
2028
+ }
2029
+ onMouseOut() {
2030
+ if (this.getElement()) {
2031
+ const el = this.getElement();
2032
+ el.style.display = 'none';
2033
+ this.renderer.removeClass(this.el.nativeElement, 'main-tooltip');
2034
+ }
2035
+ }
2036
+ set TCtooltip(tooltip) {
2037
+ if (tooltip) {
2038
+ this.check(tooltip);
2039
+ }
2040
+ }
2041
+ set TCdirection(direction) {
2042
+ if (direction) {
2043
+ this._direction = direction;
2044
+ }
2045
+ }
2046
+ ngOnInit() {
2047
+ }
2048
+ generateID() {
2049
+ return `tc-tooltip-${Math.floor(Math.random() * Math.floor(Math.random() * Date.now()))}`;
2050
+ }
2051
+ getElement() {
2052
+ return document.getElementById(this.ID) || undefined;
2053
+ }
2054
+ check(tooltip) {
2055
+ this.ID = this.generateID();
2056
+ this.info_text = tooltip;
2057
+ let el = this.el.nativeElement;
2058
+ this.main_el = el;
2059
+ if (el) {
2060
+ this.create_tooltip(tooltip, el);
2061
+ }
2062
+ else {
2063
+ console.log("TCL: tooltip -> el", this.el.nativeElement);
2064
+ }
2065
+ }
2066
+ setStyle(el) {
2067
+ // this.renderer.setStyle(el, 'position', 'relative');
2068
+ // this.renderer.setStyle(el, 'display', 'inline');
2069
+ }
2070
+ create_tooltip(tip, el) {
2071
+ this.setStyle(el);
2072
+ const tooltip = document.createElement("div");
2073
+ tooltip.setAttribute('id', this.ID);
2074
+ tooltip.setAttribute('style', `
2075
+ position: absolute;
2076
+ display: none;
2077
+ padding: 10px;
2078
+ border-radius: 10px;
2079
+ text-align: center;
2080
+ width: max-content;
2081
+ max-width: 250px;
2082
+ background-color: transparent;
2083
+ color: transparent;
2084
+ z-index: 1090;
2085
+ bottom: ${this.el_position}px;
2086
+ left: ${this.target_center}px;
2087
+ `);
2088
+ tooltip.innerHTML = tip;
2089
+ el.insertBefore(tooltip, null);
2090
+ }
2091
+ to_top(el) {
2092
+ const pos = this.el_center - (this.target_center);
2093
+ this.renderer.setStyle(el, 'left', `${(pos)}px`);
2094
+ this.renderer.setStyle(el, 'bottom', `${(this.el_height + 7)}px`);
2095
+ el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-top');
2096
+ }
2097
+ to_bottom(el) {
2098
+ const pos = this.el_center - (this.target_center);
2099
+ this.renderer.setStyle(el, 'left', `${(pos)}px`);
2100
+ this.renderer.setStyle(el, 'bottom', `-${(this.target_height + 7)}px`);
2101
+ el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-bottom');
2102
+ }
2103
+ to_right(el) {
2104
+ const pos = this.el_width;
2105
+ this.renderer.setStyle(el, 'left', `${(pos + 11)}px`);
2106
+ this.renderer.setStyle(el, 'bottom', `-${(((this.target_height) / 2) - (this.el_height / 2))}px`);
2107
+ el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-right');
2108
+ }
2109
+ to_left(el) {
2110
+ const pos = -((this.target_width));
2111
+ this.renderer.setStyle(el, 'left', `${(pos - 11)}px`);
2112
+ this.renderer.setStyle(el, 'bottom', `-${(((this.target_height) / 2) - (this.el_height / 2))}px`);
2113
+ el.setAttribute('class', 'tc-directive-tooltip tc-directive-tooltip-left');
2114
+ }
2115
+ }
2116
+ 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 });
2117
+ TCloudUiTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTooltipDirective, selector: "[TCtooltip]", inputs: { TCtooltip: "TCtooltip", TCdirection: "TCdirection" }, host: { listeners: { "mouseover": "onMouseOver()", "mouseout": "onMouseOut()" } }, ngImport: i0 });
2118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTooltipDirective, decorators: [{
2119
+ type: Directive,
2120
+ args: [{
2121
+ selector: '[TCtooltip]'
2122
+ }]
2123
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { onMouseOver: [{
2124
+ type: HostListener,
2125
+ args: ['mouseover']
2126
+ }], onMouseOut: [{
2127
+ type: HostListener,
2128
+ args: ['mouseout']
2129
+ }], TCtooltip: [{
2130
+ type: Input
2131
+ }], TCdirection: [{
2132
+ type: Input
2133
+ }] } });
2134
+
2135
+ class TCloudUiDirectiveModule {
2136
+ }
2137
+ TCloudUiDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2138
+ TCloudUiDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, declarations: [TCloudUiTooltipDirective], exports: [TCloudUiTooltipDirective] });
2139
+ TCloudUiDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule });
2140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDirectiveModule, decorators: [{
2141
+ type: NgModule,
2142
+ args: [{
2143
+ declarations: [TCloudUiTooltipDirective],
2144
+ exports: [TCloudUiTooltipDirective],
2145
+ }]
2146
+ }] });
2147
+
1748
2148
  class TCloudUiPipesModule {
1749
2149
  }
1750
2150
  TCloudUiPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1751
2151
  TCloudUiPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiPipesModule, declarations: [MonthNamePipe,
1752
2152
  StatusInfoPipe,
1753
2153
  RespectivePipe,
1754
- CNPJPipe], imports: [CommonModule], exports: [MonthNamePipe,
2154
+ CNPJPipe], imports: [CommonModule], exports: [DatePipe,
2155
+ MonthNamePipe,
1755
2156
  StatusInfoPipe,
1756
2157
  RespectivePipe,
1757
2158
  CNPJPipe] });
1758
2159
  TCloudUiPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiPipesModule, providers: [
2160
+ DatePipe,
1759
2161
  MonthNamePipe,
1760
2162
  StatusInfoPipe,
1761
2163
  RespectivePipe,
@@ -1774,12 +2176,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1774
2176
  CNPJPipe
1775
2177
  ],
1776
2178
  exports: [
2179
+ DatePipe,
1777
2180
  MonthNamePipe,
1778
2181
  StatusInfoPipe,
1779
2182
  RespectivePipe,
1780
2183
  CNPJPipe
1781
2184
  ],
1782
2185
  providers: [
2186
+ DatePipe,
1783
2187
  MonthNamePipe,
1784
2188
  StatusInfoPipe,
1785
2189
  RespectivePipe,
@@ -1788,96 +2192,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1788
2192
  }]
1789
2193
  }] });
1790
2194
 
1791
- class TCloudUiMultiInputComponent {
2195
+ class TCloudUiLoadingTransitionsService {
1792
2196
  constructor() {
1793
- this.placeholder = '';
1794
- this.disabled = false;
1795
- this.loading = false;
1796
- this.count_actives = 0;
1797
- this.tcChange = new EventEmitter();
1798
- }
1799
- ngOnInit() {
1800
- setTimeout(() => {
1801
- this.toChange();
1802
- });
1803
- }
1804
- addItem(item) {
1805
- if (this.disabled) {
1806
- return;
1807
- }
1808
- if (!this.tcList) {
1809
- this.tcList = [];
1810
- }
1811
- (this.tcList).push({ value: item });
1812
- this.toChange();
1813
- this.input_value = '';
1814
- }
1815
- removeItem(item, index) {
1816
- if (this.disabled) {
1817
- return;
2197
+ this.ID = 'tcloud-ui-loading-transitions';
2198
+ }
2199
+ /**
2200
+ * Inicia a tela de bloqueio para carregamento de tarefa
2201
+ */
2202
+ start() {
2203
+ this.create_loading_transition();
2204
+ if (document.getElementById(this.ID)) {
2205
+ const box = document.getElementById(this.ID);
2206
+ box === null || box === void 0 ? void 0 : box.classList.add('tcloud-ui-start-loading');
2207
+ }
2208
+ }
2209
+ /**
2210
+ * Encerra a tela de bloqueio
2211
+ */
2212
+ stop() {
2213
+ if (document.getElementById(this.ID)) {
2214
+ const box = document.getElementById(this.ID);
2215
+ box === null || box === void 0 ? void 0 : box.classList.remove('tcloud-ui-start-loading');
2216
+ const body = document.getElementsByTagName('body')[0];
2217
+ body.classList.remove('tcloud-ui-body-loading-transitions');
2218
+ }
2219
+ }
2220
+ create_loading_transition() {
2221
+ let box = null;
2222
+ if (document.getElementById(this.ID)) {
2223
+ box = document.getElementById(this.ID);
1818
2224
  }
1819
- if (this.tcList) {
1820
- for (let i = 0; i < (this.tcList).length; i++) {
1821
- const row = this.tcList[i];
1822
- if (item === row.value && i === index) {
1823
- (this.tcList).splice(index, 1);
1824
- break;
1825
- }
1826
- }
1827
- this.toChange();
1828
- }
1829
- }
1830
- toChange() {
1831
- let count_actives = 0;
1832
- let itens = [];
1833
- if (this.tcList) {
1834
- for (let i = 0; i < (this.tcList).length; i++) {
1835
- const row = this.tcList[i];
1836
- (itens).push(row);
1837
- }
2225
+ else {
2226
+ box = document.createElement("div");
2227
+ box.setAttribute('id', this.ID);
1838
2228
  }
1839
- this.count_actives = count_actives;
1840
- this.tcChange.emit(itens);
2229
+ const body = document.getElementsByTagName('body')[0];
2230
+ body.appendChild(box);
2231
+ body.classList.add('tcloud-ui-body-loading-transitions');
2232
+ // element.classList.remove('bar', 'baz');
1841
2233
  }
1842
2234
  }
1843
- TCloudUiMultiInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1844
- TCloudUiMultiInputComponentcmp = 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"] }] });
1845
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputComponent, decorators: [{
1846
- type: Component,
1847
- 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"] }]
1848
- }], ctorParameters: function () { return []; }, propDecorators: { tcList: [{
1849
- type: Input
1850
- }], placeholder: [{
1851
- type: Input
1852
- }], disabled: [{
1853
- type: Input
1854
- }], loading: [{
1855
- type: Input
1856
- }], tcChange: [{
1857
- type: Output
1858
- }] } });
1859
-
1860
- class TCloudUiMultiInputModule {
1861
- }
1862
- TCloudUiMultiInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1863
- TCloudUiMultiInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, declarations: [TCloudUiMultiInputComponent], imports: [FormsModule,
1864
- ReactiveFormsModule,
1865
- CommonModule], exports: [TCloudUiMultiInputComponent] });
1866
- TCloudUiMultiInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, imports: [FormsModule,
1867
- ReactiveFormsModule,
1868
- CommonModule] });
1869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiMultiInputModule, decorators: [{
1870
- type: NgModule,
2235
+ TCloudUiLoadingTransitionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLoadingTransitionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2236
+ TCloudUiLoadingTransitionsServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLoadingTransitionsService, providedIn: 'root' });
2237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLoadingTransitionsService, decorators: [{
2238
+ type: Injectable,
1871
2239
  args: [{
1872
- declarations: [TCloudUiMultiInputComponent],
1873
- exports: [TCloudUiMultiInputComponent],
1874
- imports: [
1875
- FormsModule,
1876
- ReactiveFormsModule,
1877
- CommonModule
1878
- ]
2240
+ providedIn: 'root',
1879
2241
  }]
1880
- }] });
2242
+ }], ctorParameters: function () { return []; } });
1881
2243
 
1882
2244
  class TCloudUiModule {
1883
2245
  }
@@ -1889,6 +2251,8 @@ TCloudUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
1889
2251
  TCloudUiMultiSelectModule,
1890
2252
  TCloudUiDataListModule,
1891
2253
  TCloudUiMultiInputModule,
2254
+ TCloudUiChoiceIssuesModule,
2255
+ TCloudUiInputSearchModule,
1892
2256
  // Directives
1893
2257
  TCloudUiDirectiveModule,
1894
2258
  // Pipes
@@ -1899,17 +2263,24 @@ TCloudUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
1899
2263
  TCloudUiMultiSelectModule,
1900
2264
  TCloudUiDataListModule,
1901
2265
  TCloudUiMultiInputModule,
2266
+ TCloudUiChoiceIssuesModule,
2267
+ TCloudUiInputSearchModule,
1902
2268
  // Directives
1903
2269
  TCloudUiDirectiveModule,
1904
2270
  // Pipes
1905
2271
  TCloudUiPipesModule] });
1906
- TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, imports: [TCloudUiModalModule,
2272
+ TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModule, providers: [
2273
+ TCloudUiLoadingTransitionsService,
2274
+ TCloudUiSearchInObjectService,
2275
+ ], imports: [TCloudUiModalModule,
1907
2276
  TCloudUiTabMenuModule,
1908
2277
  TCloudUiLinhaLogoModule,
1909
2278
  TCloudUiLineStepCircleModule,
1910
2279
  TCloudUiMultiSelectModule,
1911
2280
  TCloudUiDataListModule,
1912
2281
  TCloudUiMultiInputModule,
2282
+ TCloudUiChoiceIssuesModule,
2283
+ TCloudUiInputSearchModule,
1913
2284
  // Directives
1914
2285
  TCloudUiDirectiveModule,
1915
2286
  // Pipes
@@ -1920,6 +2291,8 @@ TCloudUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
1920
2291
  TCloudUiMultiSelectModule,
1921
2292
  TCloudUiDataListModule,
1922
2293
  TCloudUiMultiInputModule,
2294
+ TCloudUiChoiceIssuesModule,
2295
+ TCloudUiInputSearchModule,
1923
2296
  // Directives
1924
2297
  TCloudUiDirectiveModule,
1925
2298
  // Pipes
@@ -1935,6 +2308,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1935
2308
  TCloudUiMultiSelectModule,
1936
2309
  TCloudUiDataListModule,
1937
2310
  TCloudUiMultiInputModule,
2311
+ TCloudUiChoiceIssuesModule,
2312
+ TCloudUiInputSearchModule,
1938
2313
  // Directives
1939
2314
  TCloudUiDirectiveModule,
1940
2315
  // Pipes
@@ -1948,10 +2323,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1948
2323
  TCloudUiMultiSelectModule,
1949
2324
  TCloudUiDataListModule,
1950
2325
  TCloudUiMultiInputModule,
2326
+ TCloudUiChoiceIssuesModule,
2327
+ TCloudUiInputSearchModule,
1951
2328
  // Directives
1952
2329
  TCloudUiDirectiveModule,
1953
2330
  // Pipes
1954
2331
  TCloudUiPipesModule
2332
+ ],
2333
+ providers: [
2334
+ TCloudUiLoadingTransitionsService,
2335
+ TCloudUiSearchInObjectService,
1955
2336
  ]
1956
2337
  }]
1957
2338
  }] });
@@ -1964,5 +2345,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1964
2345
  * Generated bundle index. Do not edit.
1965
2346
  */
1966
2347
 
1967
- 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 };
2348
+ export { CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, MonthNamePipe, RespectivePipe, StatusInfoPipe, TCloudUiChoiceIssuesComponent, TCloudUiChoiceIssuesModule, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiDirectiveModule, TCloudUiInputSearchComponent, TCloudUiInputSearchModule, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiLoadingTransitionsService, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiInputModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiPipesModule, TCloudUiSearchInObjectService, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTooltipDirective };
1968
2349
  //# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map