@dev-tcloud/tcloud-ui 0.0.0

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 (44) hide show
  1. package/README.md +27 -0
  2. package/esm2020/dev-tcloud-tcloud-ui.mjs +5 -0
  3. package/esm2020/public_api.mjs +14 -0
  4. package/esm2020/src/app/_modules/tcloud-ui-linha-logo/tcloud-ui-linha-logo.component.mjs +62 -0
  5. package/esm2020/src/app/_modules/tcloud-ui-linha-logo/tcloud-ui-linha-logo.module.mjs +24 -0
  6. package/esm2020/src/app/_modules/tcloud-ui-modal/components/tcloud-ui-modal-body/tcloud-ui-modal-body.component.mjs +14 -0
  7. package/esm2020/src/app/_modules/tcloud-ui-modal/components/tcloud-ui-modal-footer/tcloud-ui-modal-footer.component.mjs +60 -0
  8. package/esm2020/src/app/_modules/tcloud-ui-modal/components/tcloud-ui-modal-header/tcloud-ui-modal-header.component.mjs +21 -0
  9. package/esm2020/src/app/_modules/tcloud-ui-modal/services/tcloud-modal.service.mjs +42 -0
  10. package/esm2020/src/app/_modules/tcloud-ui-modal/tcloud-ui-modal.component.mjs +175 -0
  11. package/esm2020/src/app/_modules/tcloud-ui-modal/tcloud-ui-modal.mjs +2 -0
  12. package/esm2020/src/app/_modules/tcloud-ui-modal/tcloud-ui-modal.module.mjs +46 -0
  13. package/esm2020/src/app/_modules/tcloud-ui-tab-menu/components/tcloud-ui-tab-content/tcloud-ui-tab-content.component.mjs +33 -0
  14. package/esm2020/src/app/_modules/tcloud-ui-tab-menu/components/tcloud-ui-tab-head/tcloud-ui-tab-head.component.mjs +55 -0
  15. package/esm2020/src/app/_modules/tcloud-ui-tab-menu/components/tcloud-ui-tab-subtitle/tcloud-ui-tab-subtitle.component.mjs +62 -0
  16. package/esm2020/src/app/_modules/tcloud-ui-tab-menu/components/tcloud-ui-tab-title/tcloud-ui-tab-title.component.mjs +64 -0
  17. package/esm2020/src/app/_modules/tcloud-ui-tab-menu/services/tab-menu.service.mjs +77 -0
  18. package/esm2020/src/app/_modules/tcloud-ui-tab-menu/tcloud-ui-tab-menu.component.mjs +56 -0
  19. package/esm2020/src/app/_modules/tcloud-ui-tab-menu/tcloud-ui-tab-menu.mjs +2 -0
  20. package/esm2020/src/app/_modules/tcloud-ui-tab-menu/tcloud-ui-tab-menu.module.mjs +48 -0
  21. package/fesm2015/dev-tcloud-tcloud-ui.mjs +792 -0
  22. package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -0
  23. package/fesm2020/dev-tcloud-tcloud-ui.mjs +792 -0
  24. package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -0
  25. package/index.d.ts +5 -0
  26. package/package.json +617 -0
  27. package/public_api.d.ts +13 -0
  28. package/src/app/_modules/tcloud-ui-linha-logo/tcloud-ui-linha-logo.component.d.ts +16 -0
  29. package/src/app/_modules/tcloud-ui-linha-logo/tcloud-ui-linha-logo.module.d.ts +8 -0
  30. package/src/app/_modules/tcloud-ui-modal/components/tcloud-ui-modal-body/tcloud-ui-modal-body.component.d.ts +8 -0
  31. package/src/app/_modules/tcloud-ui-modal/components/tcloud-ui-modal-footer/tcloud-ui-modal-footer.component.d.ts +26 -0
  32. package/src/app/_modules/tcloud-ui-modal/components/tcloud-ui-modal-header/tcloud-ui-modal-header.component.d.ts +10 -0
  33. package/src/app/_modules/tcloud-ui-modal/services/tcloud-modal.service.d.ts +23 -0
  34. package/src/app/_modules/tcloud-ui-modal/tcloud-ui-modal.component.d.ts +37 -0
  35. package/src/app/_modules/tcloud-ui-modal/tcloud-ui-modal.d.ts +4 -0
  36. package/src/app/_modules/tcloud-ui-modal/tcloud-ui-modal.module.d.ts +12 -0
  37. package/src/app/_modules/tcloud-ui-tab-menu/components/tcloud-ui-tab-content/tcloud-ui-tab-content.component.d.ts +14 -0
  38. package/src/app/_modules/tcloud-ui-tab-menu/components/tcloud-ui-tab-head/tcloud-ui-tab-head.component.d.ts +16 -0
  39. package/src/app/_modules/tcloud-ui-tab-menu/components/tcloud-ui-tab-subtitle/tcloud-ui-tab-subtitle.component.d.ts +21 -0
  40. package/src/app/_modules/tcloud-ui-tab-menu/components/tcloud-ui-tab-title/tcloud-ui-tab-title.component.d.ts +22 -0
  41. package/src/app/_modules/tcloud-ui-tab-menu/services/tab-menu.service.d.ts +23 -0
  42. package/src/app/_modules/tcloud-ui-tab-menu/tcloud-ui-tab-menu.component.d.ts +20 -0
  43. package/src/app/_modules/tcloud-ui-tab-menu/tcloud-ui-tab-menu.d.ts +4 -0
  44. package/src/app/_modules/tcloud-ui-tab-menu/tcloud-ui-tab-menu.module.d.ts +13 -0
@@ -0,0 +1,792 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i3 from '@angular/forms';
6
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
7
+ import { Subject } from 'rxjs';
8
+ import { trigger, state, style, transition, animate } from '@angular/animations';
9
+ import * as i1 from '@angular/router';
10
+ import { RouterModule } from '@angular/router';
11
+
12
+ class TcloudModalService {
13
+ constructor() {
14
+ this.param_confirm = {};
15
+ this._stateClose = new Subject();
16
+ this.stateClose$ = this._stateClose.asObservable();
17
+ this._stateConfirm = new Subject();
18
+ this.stateConfirm$ = this._stateConfirm.asObservable();
19
+ this._stateRespConfirm = new Subject();
20
+ this.stateRespConfirm$ = this._stateRespConfirm.asObservable();
21
+ this._stateLoading = new Subject();
22
+ this.stateLoading$ = this._stateLoading.asObservable();
23
+ }
24
+ toModal(action) {
25
+ this._stateClose.next((action === 'open'));
26
+ }
27
+ toRespConfirm(resp) {
28
+ this._stateRespConfirm.next(resp);
29
+ }
30
+ getParamConfirm() {
31
+ return this.param_confirm;
32
+ }
33
+ toConfirm(confirm) {
34
+ this.param_confirm = confirm;
35
+ this._stateConfirm.next(confirm);
36
+ }
37
+ getLoading() {
38
+ return this.loading;
39
+ }
40
+ setLoading(loading) {
41
+ this.loading = loading;
42
+ this._stateLoading.next(loading);
43
+ }
44
+ }
45
+ TcloudModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
46
+ TcloudModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudModalService });
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudModalService, decorators: [{
48
+ type: Injectable
49
+ }] });
50
+
51
+ class TcloudUiModalComponent {
52
+ constructor(tcloudModalService) {
53
+ this.tcloudModalService = tcloudModalService;
54
+ this.param_confirm = {};
55
+ /* BEGIN - Parametros para modo confirmacao */
56
+ this._confirm = false;
57
+ this._confirmText = 'Confirmo';
58
+ this.autoClose = true;
59
+ this.maxWidth = 500;
60
+ // psg
61
+ this._open = false;
62
+ this._loading = false;
63
+ this.openChange = new EventEmitter();
64
+ this.toConfirm = new EventEmitter();
65
+ this.toCancel = new EventEmitter();
66
+ this.toAction = new EventEmitter();
67
+ }
68
+ set confirm(v) {
69
+ this._confirm = v;
70
+ this.param_confirm.confirm = this._confirm;
71
+ this.param_confirm.confirmText = this._confirmText;
72
+ }
73
+ set confirmText(v) {
74
+ this._confirmText = v;
75
+ this.param_confirm.confirmText = this._confirmText;
76
+ this.param_confirm.confirm = this._confirm;
77
+ }
78
+ set window(size) {
79
+ switch (size) {
80
+ case 'small':
81
+ this.maxWidth = 300;
82
+ break;
83
+ case 'medium':
84
+ this.maxWidth = 500;
85
+ break;
86
+ case 'large':
87
+ this.maxWidth = 900;
88
+ break;
89
+ case 'big':
90
+ this.maxWidth = 1100;
91
+ break;
92
+ case 'full':
93
+ this.maxWidth = 1400;
94
+ break;
95
+ }
96
+ }
97
+ set open(open) {
98
+ this._open = open;
99
+ this.fixed_body((open) ? 'on' : 'off');
100
+ }
101
+ get open() { return this._open; }
102
+ set loading(loading) {
103
+ this._loading = loading;
104
+ this.tcloudModalService.setLoading(loading);
105
+ }
106
+ get loading() { return this._loading; }
107
+ ngOnInit() {
108
+ this.subscription = this.tcloudModalService.stateClose$.subscribe((open) => {
109
+ if (open) {
110
+ /* OPEN */
111
+ }
112
+ if (!open) {
113
+ /* CLOSE */
114
+ this.toClose();
115
+ }
116
+ });
117
+ this.subscriptionI = this.tcloudModalService.stateRespConfirm$.subscribe((resp) => {
118
+ if (resp) {
119
+ /* CONFIRMADO */
120
+ this.toConfirm.emit(resp);
121
+ this.toClose('confirmed');
122
+ }
123
+ if (!resp) {
124
+ /* CANCELADO */
125
+ this.toCancel.emit(resp);
126
+ this.toClose('cancel');
127
+ }
128
+ });
129
+ this.tcloudModalService.toConfirm(this.param_confirm);
130
+ }
131
+ toClose(action) {
132
+ if (this.autoClose) {
133
+ this.open = false;
134
+ this.openChange.emit(false);
135
+ }
136
+ action = (action) ? action : 'close';
137
+ this.toAction.emit(action);
138
+ this.fixed_body('off');
139
+ }
140
+ checkIsOpen() {
141
+ if (this.open) {
142
+ this.fixed_body('on');
143
+ }
144
+ else {
145
+ this.fixed_body('off');
146
+ }
147
+ }
148
+ fixed_body(fixed) {
149
+ let body = document.getElementsByTagName("BODY")[0];
150
+ if (body && body.style) {
151
+ if (fixed === 'on') {
152
+ body.style.overflowY = "hidden";
153
+ }
154
+ if (fixed === 'off') {
155
+ body.style.removeProperty('overflow-y');
156
+ }
157
+ }
158
+ }
159
+ ngOnDestroy() {
160
+ if (this.subscription) {
161
+ this.subscription.unsubscribe();
162
+ }
163
+ }
164
+ }
165
+ TcloudUiModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalComponent, deps: [{ token: TcloudModalService }], target: i0.ɵɵFactoryTarget.Component });
166
+ TcloudUiModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TcloudUiModalComponent, selector: "tcloud-ui-modal", inputs: { confirm: "confirm", confirmText: "confirmText", autoClose: "autoClose", title: "title", maxWidth: "maxWidth", window: "window", open: "open", loading: "loading" }, outputs: { openChange: "openChange", toConfirm: "toConfirm", toCancel: "toCancel", toAction: "toAction" }, providers: [
167
+ TcloudModalService
168
+ ], ngImport: i0, template: "<div class=\"tc-background-modal\" *ngIf=\"open\" >{{ checkIsOpen() }}</div>\r\n\r\n<div class=\"base-modal\" *ngIf=\"open\">\r\n <div class=\"sub-modal\" [@fade]=\"'visible'\">\r\n <div class=\"tc-modal tc-modal-shadow\" [attr.style]=\"'max-width: ' + maxWidth + 'px;'\">\r\n <div class=\"area-top-actions\">\r\n <button type=\"button\" [class.no-use-header]=\"title\" (click)=\"toClose()\" [disabled]=\"loading\">\r\n <i *ngIf=\"!loading\" class=\"fas fa-times\"></i>\r\n <i *ngIf=\"loading\" class=\"fas fa-spinner fa-spin\"></i>\r\n </button>\r\n </div>\r\n\r\n <h4 *ngIf=\"title\" [innerHTML]=\"title\"></h4>\r\n\r\n <ng-content></ng-content>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Ex: Modal -->\r\n<!-- \r\n <tcloud-ui-modal [(open)]=\"open\">\r\n\r\n <tcloud-ui-modal-header title=\"T\u00EDtulo do Modal\" ></tcloud-ui-modal-header>\r\n\r\n <tcloud-ui-modal-body>\r\n Conte\u00FAdo do modal aqui\r\n </tcloud-ui-modal-body>\r\n\r\n <tcloud-ui-modal-footer></tcloud-ui-modal-footer>\r\n\r\n </tcloud-ui-modal>\r\n\r\n <button type=\"button\" (click)=\"open = !open\">open modal {{ open }}</button>\r\n-->\r\n\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n\r\n<!-- Ex: Confirm Modal -->\r\n<!-- \r\n <tcloud-ui-modal [(open)]=\"open_confirm\" [title]=\"'Aten\u00E7\u00E3o'\" [confirmText]=\"'Aceito'\" [confirm]=\"true\" (toAction)=\"$event\" >\r\n\r\n <tcloud-ui-modal-body>Deseja realmente executar esta a\u00E7\u00E3o?</tcloud-ui-modal-body>\r\n\r\n <tcloud-ui-modal-footer></tcloud-ui-modal-footer>\r\n\r\n </tcloud-ui-modal>\r\n\r\n <button type=\"button\" (click)=\"open_confirm = !open_confirm\">open_confirm modal {{ open_confirm }}</button>\r\n-->", styles: [".tc-background-modal{border:1px solid #ccc;position:fixed;width:100%;left:0;top:0;background-color:#000;z-index:4005;height:100%;opacity:.3}.base-modal{height:100%;overflow:scroll;position:fixed;width:100%;z-index:4005;left:0;top:0}.sub-modal{padding:30px;position:absolute;width:100%}.tc-modal{position:relative;background-color:#fff;padding:12px;border-radius:8px;margin:auto;width:100%}.tc-modal-shadow{box-shadow:2px 2px 10px #0000005e}.area-top-actions{position:absolute;top:2px;right:5px;z-index:1}.area-top-actions button{cursor:pointer;background-color:transparent;border:none;font-size:15px;padding:5px 7px}.area-top-actions button i{font-size:17px;color:#fff;transition:all .25s;opacity:.7}.area-top-actions button i:hover{opacity:1!important}h4{font-size:16px;margin:5px 30px 10px 0;font-weight:700}.no-use-header i{color:#999!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
169
+ trigger('fade', [
170
+ state('visible', style({ opacity: 1 })),
171
+ state('hide', style({ opacity: 0, top: '-38%' })),
172
+ transition('void => visible', [
173
+ style({ opacity: 0, top: '-38%' }),
174
+ animate('0.3s ease-out')
175
+ ]),
176
+ transition('visible => hide', animate('0.3s ease-out'))
177
+ ])
178
+ ] });
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalComponent, decorators: [{
180
+ type: Component,
181
+ args: [{ selector: 'tcloud-ui-modal', providers: [
182
+ TcloudModalService
183
+ ], animations: [
184
+ trigger('fade', [
185
+ state('visible', style({ opacity: 1 })),
186
+ state('hide', style({ opacity: 0, top: '-38%' })),
187
+ transition('void => visible', [
188
+ style({ opacity: 0, top: '-38%' }),
189
+ animate('0.3s ease-out')
190
+ ]),
191
+ transition('visible => hide', animate('0.3s ease-out'))
192
+ ])
193
+ ], template: "<div class=\"tc-background-modal\" *ngIf=\"open\" >{{ checkIsOpen() }}</div>\r\n\r\n<div class=\"base-modal\" *ngIf=\"open\">\r\n <div class=\"sub-modal\" [@fade]=\"'visible'\">\r\n <div class=\"tc-modal tc-modal-shadow\" [attr.style]=\"'max-width: ' + maxWidth + 'px;'\">\r\n <div class=\"area-top-actions\">\r\n <button type=\"button\" [class.no-use-header]=\"title\" (click)=\"toClose()\" [disabled]=\"loading\">\r\n <i *ngIf=\"!loading\" class=\"fas fa-times\"></i>\r\n <i *ngIf=\"loading\" class=\"fas fa-spinner fa-spin\"></i>\r\n </button>\r\n </div>\r\n\r\n <h4 *ngIf=\"title\" [innerHTML]=\"title\"></h4>\r\n\r\n <ng-content></ng-content>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Ex: Modal -->\r\n<!-- \r\n <tcloud-ui-modal [(open)]=\"open\">\r\n\r\n <tcloud-ui-modal-header title=\"T\u00EDtulo do Modal\" ></tcloud-ui-modal-header>\r\n\r\n <tcloud-ui-modal-body>\r\n Conte\u00FAdo do modal aqui\r\n </tcloud-ui-modal-body>\r\n\r\n <tcloud-ui-modal-footer></tcloud-ui-modal-footer>\r\n\r\n </tcloud-ui-modal>\r\n\r\n <button type=\"button\" (click)=\"open = !open\">open modal {{ open }}</button>\r\n-->\r\n\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n\r\n<!-- Ex: Confirm Modal -->\r\n<!-- \r\n <tcloud-ui-modal [(open)]=\"open_confirm\" [title]=\"'Aten\u00E7\u00E3o'\" [confirmText]=\"'Aceito'\" [confirm]=\"true\" (toAction)=\"$event\" >\r\n\r\n <tcloud-ui-modal-body>Deseja realmente executar esta a\u00E7\u00E3o?</tcloud-ui-modal-body>\r\n\r\n <tcloud-ui-modal-footer></tcloud-ui-modal-footer>\r\n\r\n </tcloud-ui-modal>\r\n\r\n <button type=\"button\" (click)=\"open_confirm = !open_confirm\">open_confirm modal {{ open_confirm }}</button>\r\n-->", styles: [".tc-background-modal{border:1px solid #ccc;position:fixed;width:100%;left:0;top:0;background-color:#000;z-index:4005;height:100%;opacity:.3}.base-modal{height:100%;overflow:scroll;position:fixed;width:100%;z-index:4005;left:0;top:0}.sub-modal{padding:30px;position:absolute;width:100%}.tc-modal{position:relative;background-color:#fff;padding:12px;border-radius:8px;margin:auto;width:100%}.tc-modal-shadow{box-shadow:2px 2px 10px #0000005e}.area-top-actions{position:absolute;top:2px;right:5px;z-index:1}.area-top-actions button{cursor:pointer;background-color:transparent;border:none;font-size:15px;padding:5px 7px}.area-top-actions button i{font-size:17px;color:#fff;transition:all .25s;opacity:.7}.area-top-actions button i:hover{opacity:1!important}h4{font-size:16px;margin:5px 30px 10px 0;font-weight:700}.no-use-header i{color:#999!important}\n"] }]
194
+ }], ctorParameters: function () { return [{ type: TcloudModalService }]; }, propDecorators: { confirm: [{
195
+ type: Input
196
+ }], confirmText: [{
197
+ type: Input
198
+ }], autoClose: [{
199
+ type: Input
200
+ }], title: [{
201
+ type: Input
202
+ }], maxWidth: [{
203
+ type: Input
204
+ }], window: [{
205
+ type: Input
206
+ }], open: [{
207
+ type: Input
208
+ }], loading: [{
209
+ type: Input
210
+ }], openChange: [{
211
+ type: Output
212
+ }], toConfirm: [{
213
+ type: Output
214
+ }], toCancel: [{
215
+ type: Output
216
+ }], toAction: [{
217
+ type: Output
218
+ }] } });
219
+
220
+ class TcloudUiModalHeaderComponent {
221
+ constructor() {
222
+ this.mode = 'info';
223
+ }
224
+ ngOnInit() {
225
+ }
226
+ }
227
+ TcloudUiModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
228
+ TcloudUiModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TcloudUiModalHeaderComponent, selector: "tcloud-ui-modal-header", inputs: { mode: "mode", title: "title" }, ngImport: i0, template: "<div class=\"tc-modal-header tc-mode-{{ mode }}\" >\r\n <h4 *ngIf=\"title\" [innerHTML]=\"title\"></h4>\r\n <ng-content></ng-content>\r\n\r\n <hr>\r\n</div>\r\n", styles: ["h4{font-size:16px;margin:5px 30px 10px 0;font-weight:700}.tc-modal-header{padding:12px;color:#fff;margin:-12px -12px 15px;border-radius:7px 7px 0 0}hr{display:none}.tc-mode-success{background:#62c46d}.tc-mode-info{background:var(--verde)}.tc-mode-danger{background:#f06868}.tc-mode-warning{background:#e8b02e}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalHeaderComponent, decorators: [{
230
+ type: Component,
231
+ args: [{ selector: 'tcloud-ui-modal-header', template: "<div class=\"tc-modal-header tc-mode-{{ mode }}\" >\r\n <h4 *ngIf=\"title\" [innerHTML]=\"title\"></h4>\r\n <ng-content></ng-content>\r\n\r\n <hr>\r\n</div>\r\n", styles: ["h4{font-size:16px;margin:5px 30px 10px 0;font-weight:700}.tc-modal-header{padding:12px;color:#fff;margin:-12px -12px 15px;border-radius:7px 7px 0 0}hr{display:none}.tc-mode-success{background:#62c46d}.tc-mode-info{background:var(--verde)}.tc-mode-danger{background:#f06868}.tc-mode-warning{background:#e8b02e}\n"] }]
232
+ }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
233
+ type: Input
234
+ }], title: [{
235
+ type: Input
236
+ }] } });
237
+
238
+ class TcloudUiModalBodyComponent {
239
+ constructor() { }
240
+ ngOnInit() {
241
+ }
242
+ }
243
+ TcloudUiModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
244
+ TcloudUiModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TcloudUiModalBodyComponent, selector: "tcloud-ui-modal-body", ngImport: i0, template: "<div class=\"tc-modal-body\">\r\n <ng-content></ng-content>\r\n</div>", styles: [".tc-modal-body{padding:13px}\n"] });
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalBodyComponent, decorators: [{
246
+ type: Component,
247
+ args: [{ selector: 'tcloud-ui-modal-body', template: "<div class=\"tc-modal-body\">\r\n <ng-content></ng-content>\r\n</div>", styles: [".tc-modal-body{padding:13px}\n"] }]
248
+ }], ctorParameters: function () { return []; } });
249
+
250
+ class TcloudUiModalFooterComponent {
251
+ constructor(tcloudModalService) {
252
+ this.tcloudModalService = tcloudModalService;
253
+ this.btnCloseText = 'Fechar';
254
+ this.btnCancelText = 'Cancelar';
255
+ this.btnConfirmText = 'Confirmar';
256
+ this.txt_value = '';
257
+ this.param_confirm = {};
258
+ this.loading = false;
259
+ }
260
+ ngOnInit() {
261
+ this.txt_value = '';
262
+ this.param_confirm = this.tcloudModalService.getParamConfirm();
263
+ this.toStateLoading();
264
+ }
265
+ toClose() {
266
+ this.tcloudModalService.toModal('close');
267
+ }
268
+ toConfirm(valid) {
269
+ if (typeof valid === 'boolean') {
270
+ if (valid && (this.txt_value).toLowerCase() === (this.param_confirm.confirmText).toLowerCase()) {
271
+ this.tcloudModalService.toRespConfirm(true);
272
+ this.txt_value = '';
273
+ }
274
+ }
275
+ }
276
+ toCancel() {
277
+ this.tcloudModalService.toRespConfirm(false);
278
+ }
279
+ toStateLoading() {
280
+ this.loading = this.tcloudModalService.getLoading();
281
+ this.subscription = this.tcloudModalService.stateLoading$.subscribe((loading) => { this.loading = loading; });
282
+ }
283
+ ngOnDestroy() {
284
+ if (this.subscription) {
285
+ this.subscription.unsubscribe();
286
+ }
287
+ }
288
+ }
289
+ TcloudUiModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalFooterComponent, deps: [{ token: TcloudModalService }], target: i0.ɵɵFactoryTarget.Component });
290
+ TcloudUiModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TcloudUiModalFooterComponent, selector: "tcloud-ui-modal-footer", inputs: { btnCloseText: "btnCloseText", btnCancelText: "btnCancelText", btnConfirmText: "btnConfirmText" }, viewQueries: [{ propertyName: "_formulario", first: true, predicate: ["_formulario"], descendants: true }], ngImport: i0, template: "<div class=\"tc-modal-footer\">\r\n\r\n <div class=\"input-confirm\" *ngIf=\"param_confirm && param_confirm.confirmText\">\r\n <p>Digite a palavra <strong>&quot;{{ param_confirm.confirmText }}&quot;</strong> para confirmar.</p>\r\n \r\n <form #_formulario=\"ngForm\" (ngSubmit)=\"toConfirm(_formulario.valid)\">\r\n <input \r\n [disabled]=\"loading\"\r\n placeholder=\"{{ param_confirm.confirmText }}\"\r\n name=\"txt_value\" \r\n [(ngModel)]=\"txt_value\" \r\n type=\"text\" \r\n class=\"form-control form-confirm\" \r\n required \r\n [class.different-text]=\"(txt_value).length >= (param_confirm.confirmText).length && (txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase()\" >\r\n </form>\r\n\r\n </div>\r\n\r\n <hr>\r\n\r\n <div class=\"actions-footer {{ (loading) ? 'state-loading' : '' }}\">\r\n <!-- {{ param_confirm | json }} -->\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && !param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toClose()\">{{ btnCloseText }}</button>\r\n\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toCancel()\">{{ btnCancelText }}</button>\r\n <button [disabled]=\"(txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase() || loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"ml-3 btn-new-green\" (click)=\"toConfirm(_formulario?.valid)\">{{ btnConfirmText }}</button>\r\n\r\n </div>\r\n</div>\r\n", styles: [".actions-footer{text-align:right}.ng-valid.ng-touched.different-text{border-color:#fb9c23}.form-confirm{max-width:200px}button:disabled{opacity:.7!important;cursor:not-allowed}.input-confirm{padding:5px 14px}.state-loading button{cursor:progress!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalFooterComponent, decorators: [{
292
+ type: Component,
293
+ args: [{ selector: 'tcloud-ui-modal-footer', template: "<div class=\"tc-modal-footer\">\r\n\r\n <div class=\"input-confirm\" *ngIf=\"param_confirm && param_confirm.confirmText\">\r\n <p>Digite a palavra <strong>&quot;{{ param_confirm.confirmText }}&quot;</strong> para confirmar.</p>\r\n \r\n <form #_formulario=\"ngForm\" (ngSubmit)=\"toConfirm(_formulario.valid)\">\r\n <input \r\n [disabled]=\"loading\"\r\n placeholder=\"{{ param_confirm.confirmText }}\"\r\n name=\"txt_value\" \r\n [(ngModel)]=\"txt_value\" \r\n type=\"text\" \r\n class=\"form-control form-confirm\" \r\n required \r\n [class.different-text]=\"(txt_value).length >= (param_confirm.confirmText).length && (txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase()\" >\r\n </form>\r\n\r\n </div>\r\n\r\n <hr>\r\n\r\n <div class=\"actions-footer {{ (loading) ? 'state-loading' : '' }}\">\r\n <!-- {{ param_confirm | json }} -->\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && !param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toClose()\">{{ btnCloseText }}</button>\r\n\r\n <button [disabled]=\"loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"btn-new-grey\" (click)=\"toCancel()\">{{ btnCancelText }}</button>\r\n <button [disabled]=\"(txt_value).toLowerCase() !== (param_confirm.confirmText).toLowerCase() || loading\" *ngIf=\"param_confirm && param_confirm.confirm\" type=\"button\" class=\"ml-3 btn-new-green\" (click)=\"toConfirm(_formulario?.valid)\">{{ btnConfirmText }}</button>\r\n\r\n </div>\r\n</div>\r\n", styles: [".actions-footer{text-align:right}.ng-valid.ng-touched.different-text{border-color:#fb9c23}.form-confirm{max-width:200px}button:disabled{opacity:.7!important;cursor:not-allowed}.input-confirm{padding:5px 14px}.state-loading button{cursor:progress!important}\n"] }]
294
+ }], ctorParameters: function () { return [{ type: TcloudModalService }]; }, propDecorators: { btnCloseText: [{
295
+ type: Input
296
+ }], btnCancelText: [{
297
+ type: Input
298
+ }], btnConfirmText: [{
299
+ type: Input
300
+ }], _formulario: [{
301
+ type: ViewChild,
302
+ args: ['_formulario']
303
+ }] } });
304
+
305
+ class TcloudUiModalModule {
306
+ }
307
+ TcloudUiModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
308
+ TcloudUiModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalModule, declarations: [TcloudUiModalComponent,
309
+ TcloudUiModalHeaderComponent,
310
+ TcloudUiModalBodyComponent,
311
+ TcloudUiModalFooterComponent], imports: [CommonModule,
312
+ FormsModule,
313
+ ReactiveFormsModule], exports: [TcloudUiModalComponent,
314
+ TcloudUiModalHeaderComponent,
315
+ TcloudUiModalBodyComponent,
316
+ TcloudUiModalFooterComponent] });
317
+ TcloudUiModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalModule, imports: [CommonModule,
318
+ FormsModule,
319
+ ReactiveFormsModule] });
320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TcloudUiModalModule, decorators: [{
321
+ type: NgModule,
322
+ args: [{
323
+ declarations: [
324
+ TcloudUiModalComponent,
325
+ TcloudUiModalHeaderComponent,
326
+ TcloudUiModalBodyComponent,
327
+ TcloudUiModalFooterComponent
328
+ ],
329
+ imports: [
330
+ CommonModule,
331
+ FormsModule,
332
+ ReactiveFormsModule
333
+ ],
334
+ exports: [
335
+ TcloudUiModalComponent,
336
+ TcloudUiModalHeaderComponent,
337
+ TcloudUiModalBodyComponent,
338
+ TcloudUiModalFooterComponent
339
+ ]
340
+ }]
341
+ }] });
342
+
343
+ class TabMenuService {
344
+ constructor(_route, _router) {
345
+ this._route = _route;
346
+ this._router = _router;
347
+ this.info_tab = [];
348
+ this.tabSubject = new Subject();
349
+ this.tabState$ = this.tabSubject.asObservable();
350
+ this.loadingSubject = new Subject();
351
+ this.loadingState$ = this.loadingSubject.asObservable();
352
+ }
353
+ setTabLoading(loading) {
354
+ this._loading = loading;
355
+ this.loadingSubject.next(loading);
356
+ }
357
+ getTabLoading() {
358
+ return this._loading;
359
+ }
360
+ setTabState(tab, registerInUrl) {
361
+ this._tab = tab;
362
+ if (registerInUrl) {
363
+ this.set_to_param_url(tab);
364
+ }
365
+ this.tabSubject.next(tab);
366
+ }
367
+ getTabState() {
368
+ return this._tab;
369
+ }
370
+ setTabDisabled(id, disabled) {
371
+ let create = true;
372
+ if (this.info_tab && (this.info_tab).length > 0) {
373
+ for (let i = 0; i < (this.info_tab).length; i++) {
374
+ if (this.info_tab[i].id === id) {
375
+ this.info_tab[i].disabled = disabled;
376
+ create = false;
377
+ break;
378
+ }
379
+ }
380
+ }
381
+ if (create) {
382
+ (this.info_tab).push({ id: id, disabled: disabled });
383
+ }
384
+ }
385
+ getIsDisabled(id) {
386
+ if (this.info_tab && (this.info_tab).length > 0) {
387
+ for (let i = 0; i < (this.info_tab).length; i++) {
388
+ if (this.info_tab[i].id === id) {
389
+ return this.info_tab[i].disabled;
390
+ }
391
+ }
392
+ }
393
+ return false;
394
+ }
395
+ set_to_param_url(tab) {
396
+ // changes the route without moving from the current view or
397
+ // triggering a navigation event,
398
+ this._router.navigate([], {
399
+ relativeTo: this._route,
400
+ queryParams: {
401
+ tab: `${tab}`
402
+ },
403
+ queryParamsHandling: 'merge',
404
+ // preserve the existing query params in the route
405
+ skipLocationChange: false
406
+ // do not trigger navigation
407
+ });
408
+ }
409
+ }
410
+ TabMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TabMenuService, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
411
+ TabMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TabMenuService });
412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TabMenuService, decorators: [{
413
+ type: Injectable
414
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }]; } });
415
+
416
+ class TCloudUiTabMenuComponent {
417
+ constructor(tabMenuService) {
418
+ this.tabMenuService = tabMenuService;
419
+ this.registerInUrl = false;
420
+ this._loading = false;
421
+ this._active = '';
422
+ this.onChange = new EventEmitter();
423
+ }
424
+ set loading(loading) {
425
+ this._loading = loading;
426
+ this.tabMenuService.setTabLoading(this.loading);
427
+ }
428
+ get loading() { return this._loading; }
429
+ set active(active) {
430
+ this._active = active;
431
+ if (this.active !== '') {
432
+ setTimeout(() => {
433
+ this.tabMenuService.setTabState(this.active, this.registerInUrl);
434
+ });
435
+ }
436
+ }
437
+ get active() { return this._active; }
438
+ ngOnInit() {
439
+ const tab = this.tabMenuService.getTabState();
440
+ if (tab === this._active) {
441
+ this.onChange.emit(tab);
442
+ }
443
+ this.subscription = this.tabMenuService.tabState$.subscribe((tab) => {
444
+ this.onChange.emit(tab);
445
+ });
446
+ }
447
+ ngOnDestroy() {
448
+ if (this.subscription) {
449
+ this.subscription.unsubscribe();
450
+ }
451
+ }
452
+ }
453
+ TCloudUiTabMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabMenuComponent, deps: [{ token: TabMenuService }], target: i0.ɵɵFactoryTarget.Component });
454
+ TCloudUiTabMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTabMenuComponent, selector: "tcloud-ui-tab-menu", inputs: { registerInUrl: "registerInUrl", loading: "loading", active: "active" }, outputs: { onChange: "onChange" }, providers: [TabMenuService], ngImport: i0, template: "<div class=\"tc-tab-menu\" [class.loading]=\"loading\" >\r\n <ng-content></ng-content>\r\n</div>", styles: [".tc-tab-menu{width:100%;overflow-x:hidden}.loading{opacity:.7;cursor:progress!important}\n"] });
455
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabMenuComponent, decorators: [{
456
+ type: Component,
457
+ args: [{ selector: 'tcloud-ui-tab-menu', providers: [TabMenuService], template: "<div class=\"tc-tab-menu\" [class.loading]=\"loading\" >\r\n <ng-content></ng-content>\r\n</div>", styles: [".tc-tab-menu{width:100%;overflow-x:hidden}.loading{opacity:.7;cursor:progress!important}\n"] }]
458
+ }], ctorParameters: function () { return [{ type: TabMenuService }]; }, propDecorators: { registerInUrl: [{
459
+ type: Input
460
+ }], loading: [{
461
+ type: Input
462
+ }], active: [{
463
+ type: Input
464
+ }], onChange: [{
465
+ type: Output
466
+ }] } });
467
+
468
+ class TCloudUiTabContentComponent {
469
+ constructor(tabMenuService) {
470
+ this.tabMenuService = tabMenuService;
471
+ this.tab = '';
472
+ this.active = false;
473
+ }
474
+ ngOnInit() {
475
+ const disabled = this.tabMenuService.getIsDisabled(this.tab);
476
+ const tab = this.tabMenuService.getTabState();
477
+ this.active = (tab === this.tab && !disabled);
478
+ this.subscription = this.tabMenuService.tabState$.subscribe((tab) => {
479
+ this.active = (tab === this.tab);
480
+ });
481
+ }
482
+ ngOnDestroy() {
483
+ if (this.subscription) {
484
+ this.subscription.unsubscribe();
485
+ }
486
+ }
487
+ }
488
+ TCloudUiTabContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabContentComponent, deps: [{ token: TabMenuService }], target: i0.ɵɵFactoryTarget.Component });
489
+ TCloudUiTabContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTabContentComponent, selector: "tcloud-ui-tab-content", inputs: { tab: "tab" }, ngImport: i0, template: "<div class=\"tc-tabmenu-content\" *ngIf=\"active\">\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n", styles: [".tc-tabmenu-content{margin:20px 0}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabContentComponent, decorators: [{
491
+ type: Component,
492
+ args: [{ selector: 'tcloud-ui-tab-content', template: "<div class=\"tc-tabmenu-content\" *ngIf=\"active\">\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n", styles: [".tc-tabmenu-content{margin:20px 0}\n"] }]
493
+ }], ctorParameters: function () { return [{ type: TabMenuService }]; }, propDecorators: { tab: [{
494
+ type: Input
495
+ }] } });
496
+
497
+ class TCloudUiTabTitleComponent {
498
+ constructor(tabMenuService) {
499
+ this.tabMenuService = tabMenuService;
500
+ this.tab = '';
501
+ this.active = false;
502
+ this.loading = false;
503
+ this._disabled = false;
504
+ }
505
+ set disabled(disabled) {
506
+ this._disabled = disabled;
507
+ this.tabMenuService.setTabDisabled(this.tab, this._disabled);
508
+ }
509
+ get disabled() { return this._disabled; }
510
+ ngOnInit() {
511
+ if (!this.disabled) {
512
+ const tab = this.tabMenuService.getTabState();
513
+ if (this.tab !== '') {
514
+ this.active = (tab === this.tab);
515
+ }
516
+ }
517
+ this.subscription = this.tabMenuService.tabState$.subscribe((tab) => {
518
+ if (this.tab !== '') {
519
+ this.active = (tab === this.tab);
520
+ }
521
+ });
522
+ this.loading = this.tabMenuService.getTabLoading();
523
+ this.subscription2 = this.tabMenuService.loadingState$.subscribe((loading) => {
524
+ this.loading = loading;
525
+ });
526
+ }
527
+ toTab() {
528
+ if (!this.disabled) {
529
+ if (this.tab && this.tab !== '') {
530
+ this.tabMenuService.setTabState(this.tab);
531
+ }
532
+ }
533
+ }
534
+ ngOnDestroy() {
535
+ if (this.subscription) {
536
+ this.subscription.unsubscribe();
537
+ }
538
+ if (this.subscription2) {
539
+ this.subscription2.unsubscribe();
540
+ }
541
+ }
542
+ }
543
+ TCloudUiTabTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabTitleComponent, deps: [{ token: TabMenuService }], target: i0.ɵɵFactoryTarget.Component });
544
+ TCloudUiTabTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTabTitleComponent, selector: "tcloud-ui-tab-title", inputs: { tab: "tab", title: "title", active: "active", disabled: "disabled" }, ngImport: i0, template: "<button [class.loading]=\"loading\" [attr.data-id]=\"tab\" [class.tab-title-active]=\"active\" [disabled]=\"disabled || loading\" type=\"button\" (click)=\"toTab()\" class=\"tab-title\" >\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: [".tab-title{color:var(--cinza);border:none;background:none;text-transform:uppercase;font-size:11px;padding:20px;cursor:pointer;min-width:60px;max-width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:all .25s}.tab-title:hover,.tab-title-active{background:var(--verde);color:#fff}@media (max-width: 1580px){.tab-title{font-size:11px;padding:20px 14px}}@media (max-width: 1440px){.tab-title{font-size:10px;padding:20px 13px}}.loading{cursor:progress!important}\n"] });
545
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabTitleComponent, decorators: [{
546
+ type: Component,
547
+ args: [{ selector: 'tcloud-ui-tab-title', template: "<button [class.loading]=\"loading\" [attr.data-id]=\"tab\" [class.tab-title-active]=\"active\" [disabled]=\"disabled || loading\" type=\"button\" (click)=\"toTab()\" class=\"tab-title\" >\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: [".tab-title{color:var(--cinza);border:none;background:none;text-transform:uppercase;font-size:11px;padding:20px;cursor:pointer;min-width:60px;max-width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:all .25s}.tab-title:hover,.tab-title-active{background:var(--verde);color:#fff}@media (max-width: 1580px){.tab-title{font-size:11px;padding:20px 14px}}@media (max-width: 1440px){.tab-title{font-size:10px;padding:20px 13px}}.loading{cursor:progress!important}\n"] }]
548
+ }], ctorParameters: function () { return [{ type: TabMenuService }]; }, propDecorators: { tab: [{
549
+ type: Input
550
+ }], title: [{
551
+ type: Input
552
+ }], active: [{
553
+ type: Input
554
+ }], disabled: [{
555
+ type: Input
556
+ }] } });
557
+
558
+ class TCloudUiTabSubtitleComponent {
559
+ constructor(tabMenuService) {
560
+ this.tabMenuService = tabMenuService;
561
+ this.tab = '';
562
+ this.active = false;
563
+ this._disabled = false;
564
+ this.loading = false;
565
+ }
566
+ set disabled(disabled) {
567
+ this._disabled = disabled;
568
+ this.tabMenuService.setTabDisabled(this.tab, this._disabled);
569
+ }
570
+ get disabled() { return this._disabled; }
571
+ ngOnInit() {
572
+ if (!this.disabled) {
573
+ const tab = this.tabMenuService.getTabState();
574
+ if (this.tab !== '') {
575
+ this.active = (tab === this.tab);
576
+ }
577
+ }
578
+ this.subscription = this.tabMenuService.tabState$.subscribe((tab) => {
579
+ if (this.tab !== '') {
580
+ this.active = (tab === this.tab);
581
+ }
582
+ });
583
+ this.loading = this.tabMenuService.getTabLoading();
584
+ this.subscription2 = this.tabMenuService.loadingState$.subscribe((loading) => {
585
+ this.loading = loading;
586
+ });
587
+ }
588
+ toTab() {
589
+ if (!this.disabled) {
590
+ if (this.tab && this.tab !== '') {
591
+ this.tabMenuService.setTabState(this.tab);
592
+ }
593
+ }
594
+ }
595
+ ngOnDestroy() {
596
+ if (this.subscription) {
597
+ this.subscription.unsubscribe();
598
+ }
599
+ if (this.subscription2) {
600
+ this.subscription2.unsubscribe();
601
+ }
602
+ }
603
+ }
604
+ TCloudUiTabSubtitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabSubtitleComponent, deps: [{ token: TabMenuService }], target: i0.ɵɵFactoryTarget.Component });
605
+ TCloudUiTabSubtitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTabSubtitleComponent, selector: "tcloud-ui-tab-subtitle", inputs: { tab: "tab", active: "active", disabled: "disabled" }, ngImport: i0, template: "<button [class.loading]=\"loading\" [attr.data-id]=\"tab\" [class.tab-subtitle-active]=\"active\" [disabled]=\"disabled || loading\" type=\"button\" (click)=\"toTab()\" class=\"tab-subtitle\" >\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: [".tab-subtitle{cursor:pointer;color:var(--cinza);border:none;background:none;text-transform:uppercase;font-size:11px;padding:0;margin:20px 10px}.tab-subtitle-active{color:var(--verde)}.loading{cursor:progress!important}\n"] });
606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabSubtitleComponent, decorators: [{
607
+ type: Component,
608
+ args: [{ selector: 'tcloud-ui-tab-subtitle', template: "<button [class.loading]=\"loading\" [attr.data-id]=\"tab\" [class.tab-subtitle-active]=\"active\" [disabled]=\"disabled || loading\" type=\"button\" (click)=\"toTab()\" class=\"tab-subtitle\" >\r\n <ng-content></ng-content>\r\n</button>\r\n", styles: [".tab-subtitle{cursor:pointer;color:var(--cinza);border:none;background:none;text-transform:uppercase;font-size:11px;padding:0;margin:20px 10px}.tab-subtitle-active{color:var(--verde)}.loading{cursor:progress!important}\n"] }]
609
+ }], ctorParameters: function () { return [{ type: TabMenuService }]; }, propDecorators: { tab: [{
610
+ type: Input
611
+ }], active: [{
612
+ type: Input
613
+ }], disabled: [{
614
+ type: Input
615
+ }] } });
616
+
617
+ class TCloudUiTabHeadComponent {
618
+ constructor() {
619
+ this.ID = '';
620
+ this.background = true;
621
+ this.background_color = 'transparent'; // var(--cinza4)
622
+ }
623
+ ngOnInit() {
624
+ if (this.background) {
625
+ this.background_color = 'var(--cinza4)';
626
+ }
627
+ this.ID = this.generateID();
628
+ }
629
+ generateID() {
630
+ return `tc-head-scroll-box-${Math.floor(Math.random() * Math.floor(Math.random() * Date.now()))}`;
631
+ }
632
+ to_scroll(action) {
633
+ this.moveScroll(action, this.width_scroll());
634
+ }
635
+ width_scroll() {
636
+ var ele = document.querySelectorAll(`.${this.ID}`);
637
+ return ele[0].querySelector("button").offsetWidth;
638
+ }
639
+ scrollSuave(old, des, atu, ele) {
640
+ const _this = this;
641
+ var easeOutCubic = (t) => { return (--t) * t * t + 1; };
642
+ atu += 5; // move de 5 em 5 pixel. Aumentando o valor da velocidade
643
+ var ease = easeOutCubic(atu / 100);
644
+ var del = des - old;
645
+ del *= ease;
646
+ del += old;
647
+ ele.scrollTo(del, 0);
648
+ if (atu < 100) {
649
+ window.requestAnimationFrame(() => {
650
+ _this.scrollSuave(old, des, atu, ele);
651
+ });
652
+ }
653
+ }
654
+ moveScroll(action, wid) {
655
+ var ele = document.querySelectorAll(`.${this.ID}`);
656
+ var ccs = ele[0];
657
+ var ccs_s = ccs.scrollLeft;
658
+ this.scrollSuave(ccs_s, action == 'next' ? wid + ccs_s : ccs_s - wid, 0, ccs);
659
+ }
660
+ }
661
+ TCloudUiTabHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabHeadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
662
+ TCloudUiTabHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTabHeadComponent, selector: "tcloud-ui-tab-head", inputs: { background: "background" }, ngImport: i0, template: "\r\n\r\n<table class=\"area-navigation\">\r\n <tr>\r\n <td>\r\n <button (click)=\"to_scroll('prev')\"> <i class=\"fas fa-chevron-left\"></i> </button>\r\n </td>\r\n\r\n <td>\r\n \r\n </td>\r\n\r\n <td>\r\n <button (click)=\"to_scroll('next')\"> <i class=\"fas fa-chevron-right\"></i> </button>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<div class=\"tc-menu {{ ID }}\" [attr.style]=\"'background: ' + background_color + ';'\" >\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n\r\n\r\n", styles: [".area-navigation{display:none;width:100%;line-height:0}.area-navigation td{width:100%;height:0;line-height:0}.area-navigation td:first-child{width:10px!important;text-align:left}.area-navigation td:first-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;right:6px;border:none;background-color:transparent;font-size:15px;height:30px}.area-navigation td:last-child{width:10px!important;text-align:right}.area-navigation td:last-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;left:6px;border:none;background-color:transparent;font-size:15px;height:30px}.tc-menu{display:flex;align-items:center;border-radius:10px;overflow:hidden;margin-bottom:5px;z-index:1;position:relative}@media (max-width: 1440px){.area-navigation{display:block!important;position:relative;top:0;height:2px}.tc-menu{margin-left:15px;margin-right:15px}}\n"] });
663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabHeadComponent, decorators: [{
664
+ type: Component,
665
+ args: [{ selector: 'tcloud-ui-tab-head', template: "\r\n\r\n<table class=\"area-navigation\">\r\n <tr>\r\n <td>\r\n <button (click)=\"to_scroll('prev')\"> <i class=\"fas fa-chevron-left\"></i> </button>\r\n </td>\r\n\r\n <td>\r\n \r\n </td>\r\n\r\n <td>\r\n <button (click)=\"to_scroll('next')\"> <i class=\"fas fa-chevron-right\"></i> </button>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<div class=\"tc-menu {{ ID }}\" [attr.style]=\"'background: ' + background_color + ';'\" >\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n\r\n\r\n", styles: [".area-navigation{display:none;width:100%;line-height:0}.area-navigation td{width:100%;height:0;line-height:0}.area-navigation td:first-child{width:10px!important;text-align:left}.area-navigation td:first-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;right:6px;border:none;background-color:transparent;font-size:15px;height:30px}.area-navigation td:last-child{width:10px!important;text-align:right}.area-navigation td:last-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;left:6px;border:none;background-color:transparent;font-size:15px;height:30px}.tc-menu{display:flex;align-items:center;border-radius:10px;overflow:hidden;margin-bottom:5px;z-index:1;position:relative}@media (max-width: 1440px){.area-navigation{display:block!important;position:relative;top:0;height:2px}.tc-menu{margin-left:15px;margin-right:15px}}\n"] }]
666
+ }], ctorParameters: function () { return []; }, propDecorators: { background: [{
667
+ type: Input
668
+ }] } });
669
+
670
+ class TCloudUiTabMenuModule {
671
+ }
672
+ TCloudUiTabMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
673
+ TCloudUiTabMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabMenuModule, declarations: [TCloudUiTabMenuComponent,
674
+ TCloudUiTabContentComponent,
675
+ TCloudUiTabTitleComponent,
676
+ TCloudUiTabSubtitleComponent,
677
+ TCloudUiTabHeadComponent], imports: [CommonModule, i1.RouterModule], exports: [TCloudUiTabMenuComponent,
678
+ TCloudUiTabContentComponent,
679
+ TCloudUiTabTitleComponent,
680
+ TCloudUiTabSubtitleComponent,
681
+ TCloudUiTabHeadComponent] });
682
+ TCloudUiTabMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabMenuModule, imports: [CommonModule,
683
+ RouterModule.forRoot([])] });
684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabMenuModule, decorators: [{
685
+ type: NgModule,
686
+ args: [{
687
+ declarations: [
688
+ TCloudUiTabMenuComponent,
689
+ TCloudUiTabContentComponent,
690
+ TCloudUiTabTitleComponent,
691
+ TCloudUiTabSubtitleComponent,
692
+ TCloudUiTabHeadComponent
693
+ ],
694
+ imports: [
695
+ CommonModule,
696
+ RouterModule.forRoot([]),
697
+ ],
698
+ exports: [
699
+ TCloudUiTabMenuComponent,
700
+ TCloudUiTabContentComponent,
701
+ TCloudUiTabTitleComponent,
702
+ TCloudUiTabSubtitleComponent,
703
+ TCloudUiTabHeadComponent
704
+ ],
705
+ }]
706
+ }] });
707
+
708
+ class TCloudUiLinhaLogoComponent {
709
+ constructor() {
710
+ this.product = '';
711
+ this.logo_name = '';
712
+ this.product_name = '';
713
+ this.alt_product_name = '';
714
+ this.font_size = '';
715
+ }
716
+ ngOnInit() {
717
+ this.logo_name = this.getLogoName();
718
+ this.product_name = this.getProductName();
719
+ this.alt_product_name = (this.product_name).toUpperCase();
720
+ this.font_size = this.getWidthFontSize();
721
+ }
722
+ getProductName() {
723
+ if (this.product !== '') {
724
+ let name = this.product;
725
+ name = (name).replace('_', ' ');
726
+ name = (name).toLowerCase();
727
+ return name;
728
+ }
729
+ return '';
730
+ }
731
+ getLogoName() {
732
+ if (this.product !== '') {
733
+ let name = this.product;
734
+ name = (name).replace('_', '-');
735
+ name = (name).toLowerCase();
736
+ return 'logo-linha-' + name;
737
+ }
738
+ return '';
739
+ }
740
+ getWidthFontSize() {
741
+ let size = 28;
742
+ let new_size = size;
743
+ const count = (this.product_name).length;
744
+ if (count > 8) {
745
+ new_size = 28;
746
+ }
747
+ if (count > 12) {
748
+ const p = (size * (5 + (count * 2))) / 100;
749
+ new_size = (size - p);
750
+ }
751
+ if (count > 15) {
752
+ const p = (size * (10 + (count * 2))) / 100;
753
+ new_size = (size - p);
754
+ }
755
+ return `${new_size}px`;
756
+ }
757
+ }
758
+ TCloudUiLinhaLogoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLinhaLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
759
+ TCloudUiLinhaLogoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiLinhaLogoComponent, selector: "tcloud-ui-linha-logo", inputs: { product: "product" }, ngImport: i0, template: "<!-- <div class=\"logo-product\" *ngIf=\"product !== ''\">\r\n <img class=\"img-logo\" src=\"/assets/img/logo-totvs.svg\" alt=\"{{ alt_product_name }}\">\r\n <p class=\"text-small\">Linha</p>\r\n <p class=\"text-product\" [style]=\"'font-size:'+font_size+';'\" >{{ product_name }}</p>\r\n</div> -->\r\n\r\n<div class=\"logo-product\" *ngIf=\"product !== ''\">\r\n <img class=\"img-logo\" [attr.data-name-image]=\"logo_name\" [attr.src]=\"'/assets/img/'+logo_name+'.svg'\" alt=\"{{ alt_product_name }}\">\r\n</div>", styles: [".logo-product{display:flex;color:var(--cinza);flex-flow:column;width:150px}.logo-product .img-logo{width:100%;margin-bottom:13px}.logo-product .text-small{font-size:13px;margin:0;padding:0;text-align:left}.logo-product .text-product{text-align:left;font-size:22px;font-weight:700;line-height:1;margin:0;padding:0;text-transform:uppercase;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
760
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLinhaLogoComponent, decorators: [{
761
+ type: Component,
762
+ args: [{ selector: 'tcloud-ui-linha-logo', template: "<!-- <div class=\"logo-product\" *ngIf=\"product !== ''\">\r\n <img class=\"img-logo\" src=\"/assets/img/logo-totvs.svg\" alt=\"{{ alt_product_name }}\">\r\n <p class=\"text-small\">Linha</p>\r\n <p class=\"text-product\" [style]=\"'font-size:'+font_size+';'\" >{{ product_name }}</p>\r\n</div> -->\r\n\r\n<div class=\"logo-product\" *ngIf=\"product !== ''\">\r\n <img class=\"img-logo\" [attr.data-name-image]=\"logo_name\" [attr.src]=\"'/assets/img/'+logo_name+'.svg'\" alt=\"{{ alt_product_name }}\">\r\n</div>", styles: [".logo-product{display:flex;color:var(--cinza);flex-flow:column;width:150px}.logo-product .img-logo{width:100%;margin-bottom:13px}.logo-product .text-small{font-size:13px;margin:0;padding:0;text-align:left}.logo-product .text-product{text-align:left;font-size:22px;font-weight:700;line-height:1;margin:0;padding:0;text-transform:uppercase;white-space:nowrap}\n"] }]
763
+ }], ctorParameters: function () { return []; }, propDecorators: { product: [{
764
+ type: Input
765
+ }] } });
766
+
767
+ class TCloudUiLinhaLogoModule {
768
+ }
769
+ TCloudUiLinhaLogoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLinhaLogoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
770
+ TCloudUiLinhaLogoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLinhaLogoModule, declarations: [TCloudUiLinhaLogoComponent], imports: [CommonModule], exports: [TCloudUiLinhaLogoComponent] });
771
+ TCloudUiLinhaLogoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLinhaLogoModule, imports: [CommonModule] });
772
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiLinhaLogoModule, decorators: [{
773
+ type: NgModule,
774
+ args: [{
775
+ declarations: [
776
+ TCloudUiLinhaLogoComponent
777
+ ],
778
+ imports: [
779
+ CommonModule
780
+ ],
781
+ exports: [
782
+ TCloudUiLinhaLogoComponent
783
+ ]
784
+ }]
785
+ }] });
786
+
787
+ /**
788
+ * Generated bundle index. Do not edit.
789
+ */
790
+
791
+ export { TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TcloudUiModalBodyComponent, TcloudUiModalComponent, TcloudUiModalFooterComponent, TcloudUiModalHeaderComponent, TcloudUiModalModule };
792
+ //# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map