@dev-tcloud/tcloud-ui 6.28.3-beta.0 → 6.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/tcloud-ui-dialog.md +20 -1
- package/docs/tcloud-ui-el-copy.md +10 -0
- package/fesm2022/dev-tcloud-tcloud-ui.mjs +2090 -127
- package/fesm2022/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/js/tcloud-ui-app.js +1 -1
- package/lib/_modules/tcloud-ui-dialog/models/tcloud-ui-dialog.model.d.ts +3 -1
- package/lib/_modules/tcloud-ui-dialog/tcloud-ui-dialog.component.d.ts +2 -0
- package/lib/revitalizacao/components/tc-rev-breadcrumb/tc-rev-breadcrumb.component.d.ts +12 -0
- package/lib/revitalizacao/components/tc-rev-breadcrumb/tc-rev-breadcrumb.service.d.ts +16 -0
- package/lib/revitalizacao/components/tc-rev-button/tc-rev-button.directive.d.ts +13 -0
- package/lib/revitalizacao/components/tc-rev-calendar/tc-rev-calendar.component.d.ts +43 -0
- package/lib/revitalizacao/components/tc-rev-card/tc-rev-card.component.d.ts +12 -0
- package/lib/revitalizacao/components/tc-rev-card-accordion/tc-rev-card-accordion.component.d.ts +23 -0
- package/lib/revitalizacao/components/tc-rev-card-title/tc-rev-card-title.component.d.ts +6 -0
- package/lib/revitalizacao/components/tc-rev-checkbox/tc-rev-checkbox.directive.d.ts +6 -0
- package/lib/revitalizacao/components/tc-rev-components.module.d.ts +41 -0
- package/lib/revitalizacao/components/tc-rev-dropdown/tc-rev-dropdown.component.d.ts +46 -0
- package/lib/revitalizacao/components/tc-rev-dropdown-grouped/tc-rev-dropdown-grouped.component.d.ts +54 -0
- package/lib/revitalizacao/components/tc-rev-dropdown-multi/tc-rev-dropdown-multi.component.d.ts +44 -0
- package/lib/revitalizacao/components/tc-rev-dropdown-multi-level/tc-rev-dropdown-multi-level.component.d.ts +42 -0
- package/lib/revitalizacao/components/tc-rev-dropdown-multi-level/tc-rev-dropdown-sub-menu/tc-rev-dropdown-sub-menu.component.d.ts +17 -0
- package/lib/revitalizacao/components/tc-rev-empty-content/tc-rev-empty-content.component.d.ts +5 -0
- package/lib/revitalizacao/components/tc-rev-faq/tc-rev-faq.component.d.ts +12 -0
- package/lib/revitalizacao/components/tc-rev-icon-button/tc-rev-icon-button.directive.d.ts +12 -0
- package/lib/revitalizacao/components/tc-rev-input/tc-rev-input.directive.d.ts +10 -0
- package/lib/revitalizacao/components/tc-rev-input-container/tc-rev-input-container.component.d.ts +10 -0
- package/lib/revitalizacao/components/tc-rev-loading/tc-rev-loading.component.d.ts +6 -0
- package/lib/revitalizacao/components/tc-rev-message/tc-rev-message.component.d.ts +7 -0
- package/lib/revitalizacao/components/tc-rev-multi-input/tc-rev-multi-input.component.d.ts +24 -0
- package/lib/revitalizacao/components/tc-rev-pagination/tc-rev-pagination.component.d.ts +14 -0
- package/lib/revitalizacao/components/tc-rev-progress-status-bar/tc-rev-progress-status-bar.component.d.ts +23 -0
- package/lib/revitalizacao/components/tc-rev-radio/tc-rev-radio.directive.d.ts +6 -0
- package/lib/revitalizacao/components/tc-rev-search-input/tc-rev-search-input.component.d.ts +17 -0
- package/lib/revitalizacao/components/tc-rev-side-drawer/tc-rev-side-drawer.component.d.ts +24 -0
- package/lib/revitalizacao/components/tc-rev-skeleton-loading/tc-rev-skeleton-loading.component.d.ts +17 -0
- package/lib/revitalizacao/components/tc-rev-slide-toggle/tc-rev-slide-toggle.directive.d.ts +5 -0
- package/lib/revitalizacao/components/tc-rev-small-loading/tc-rev-small-loading.component.d.ts +26 -0
- package/lib/revitalizacao/components/tc-rev-tab-group/tc-rev-tab-group.component.d.ts +12 -0
- package/lib/revitalizacao/components/tc-rev-tab-group/tc-rev-tab-item/tc-rev-tab-item.component.d.ts +10 -0
- package/lib/revitalizacao/components/tc-rev-tag/tag-colors.enum.d.ts +29 -0
- package/lib/revitalizacao/components/tc-rev-tag/tc-rev-tag.component.d.ts +10 -0
- package/lib/revitalizacao/components/tc-rev-toast/tc-rev-toast.component.d.ts +8 -0
- package/lib/revitalizacao/components/tc-rev-tooltip/tc-rev-tooltip.directive.d.ts +19 -0
- package/lib/revitalizacao/components/tc-rev-wizard-steps/tc-rev-wizard-steps.component.d.ts +19 -0
- package/lib/revitalizacao/components/tc-sub-navbar/component/tc-sub-navbar-item/tc-sub-navbar-item.component.d.ts +13 -0
- package/lib/revitalizacao/components/tc-sub-navbar/tc-sub-navbar.component.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +38 -2
- /package/lib/{util → revitalizacao/charts}/echarts.d.ts +0 -0
- /package/lib/{util → revitalizacao/util}/ellipsed-text.d.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Component, EventEmitter, Input, Output, InjectionToken, Optional, Inject, inject, signal, Pipe, forwardRef, ViewChild, input, effect, Directive, ViewEncapsulation, SkipSelf, ChangeDetectionStrategy, HostListener, ChangeDetectorRef, computed, ApplicationRef, output, model, numberAttribute, booleanAttribute, HostBinding, ContentChildren, viewChild, EnvironmentInjector, createComponent, ViewContainerRef, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, DatePipe } from '@angular/common';
|
|
4
|
+
import { CommonModule, DatePipe, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { Subject, Subscription, BehaviorSubject, debounceTime, distinctUntilChanged, map } from 'rxjs';
|
|
6
6
|
import { trigger, state, style, transition, animate, AnimationBuilder } from '@angular/animations';
|
|
7
7
|
import * as i2 from '@angular/forms';
|
|
8
|
-
import { NG_VALUE_ACCESSOR, FormsModule, FormControl, ReactiveFormsModule, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
8
|
+
import { NG_VALUE_ACCESSOR, FormsModule, FormControl, ReactiveFormsModule, NG_VALIDATORS, Validators, FormGroup } from '@angular/forms';
|
|
9
9
|
import * as i1$1 from '@angular/router';
|
|
10
10
|
import { Router, RouterModule } from '@angular/router';
|
|
11
11
|
import hljs from 'highlight.js';
|
|
@@ -5671,14 +5671,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
5671
5671
|
type: Input
|
|
5672
5672
|
}] } });
|
|
5673
5673
|
|
|
5674
|
-
var ProgressStatusBarGradientStatus;
|
|
5674
|
+
var ProgressStatusBarGradientStatus$1;
|
|
5675
5675
|
(function (ProgressStatusBarGradientStatus) {
|
|
5676
5676
|
ProgressStatusBarGradientStatus["info"] = "info";
|
|
5677
5677
|
ProgressStatusBarGradientStatus["danger"] = "danger";
|
|
5678
5678
|
ProgressStatusBarGradientStatus["success"] = "success";
|
|
5679
5679
|
ProgressStatusBarGradientStatus["alert"] = "alert";
|
|
5680
|
-
})(ProgressStatusBarGradientStatus || (ProgressStatusBarGradientStatus = {}));
|
|
5681
|
-
var ProgressStatusBarRangeColor;
|
|
5680
|
+
})(ProgressStatusBarGradientStatus$1 || (ProgressStatusBarGradientStatus$1 = {}));
|
|
5681
|
+
var ProgressStatusBarRangeColor$1;
|
|
5682
5682
|
(function (ProgressStatusBarRangeColor) {
|
|
5683
5683
|
ProgressStatusBarRangeColor["dangerStart"] = "#F48E85";
|
|
5684
5684
|
ProgressStatusBarRangeColor["dangerEnd"] = "#DC3545";
|
|
@@ -5688,7 +5688,7 @@ var ProgressStatusBarRangeColor;
|
|
|
5688
5688
|
ProgressStatusBarRangeColor["infoEnd"] = "#0897E9";
|
|
5689
5689
|
ProgressStatusBarRangeColor["successStart"] = "#A3E78C";
|
|
5690
5690
|
ProgressStatusBarRangeColor["successEnd"] = "#47B13D";
|
|
5691
|
-
})(ProgressStatusBarRangeColor || (ProgressStatusBarRangeColor = {}));
|
|
5691
|
+
})(ProgressStatusBarRangeColor$1 || (ProgressStatusBarRangeColor$1 = {}));
|
|
5692
5692
|
class TCloudUiProgressStatusBarComponent {
|
|
5693
5693
|
constructor() {
|
|
5694
5694
|
this.currentValue = input.required();
|
|
@@ -5716,14 +5716,14 @@ class TCloudUiProgressStatusBarComponent {
|
|
|
5716
5716
|
}
|
|
5717
5717
|
getProgressStatusBarRangeColor(_gradientStatus, position) {
|
|
5718
5718
|
switch (_gradientStatus) {
|
|
5719
|
-
case ProgressStatusBarGradientStatus.alert:
|
|
5720
|
-
return position === 'start' ? ProgressStatusBarRangeColor.alertStart : ProgressStatusBarRangeColor.alertEnd;
|
|
5721
|
-
case ProgressStatusBarGradientStatus.danger:
|
|
5722
|
-
return position === 'start' ? ProgressStatusBarRangeColor.dangerStart : ProgressStatusBarRangeColor.dangerEnd;
|
|
5723
|
-
case ProgressStatusBarGradientStatus.success:
|
|
5724
|
-
return position === 'start' ? ProgressStatusBarRangeColor.successStart : ProgressStatusBarRangeColor.successEnd;
|
|
5719
|
+
case ProgressStatusBarGradientStatus$1.alert:
|
|
5720
|
+
return position === 'start' ? ProgressStatusBarRangeColor$1.alertStart : ProgressStatusBarRangeColor$1.alertEnd;
|
|
5721
|
+
case ProgressStatusBarGradientStatus$1.danger:
|
|
5722
|
+
return position === 'start' ? ProgressStatusBarRangeColor$1.dangerStart : ProgressStatusBarRangeColor$1.dangerEnd;
|
|
5723
|
+
case ProgressStatusBarGradientStatus$1.success:
|
|
5724
|
+
return position === 'start' ? ProgressStatusBarRangeColor$1.successStart : ProgressStatusBarRangeColor$1.successEnd;
|
|
5725
5725
|
default:
|
|
5726
|
-
return position === 'start' ? ProgressStatusBarRangeColor.infoStart : ProgressStatusBarRangeColor.infoEnd;
|
|
5726
|
+
return position === 'start' ? ProgressStatusBarRangeColor$1.infoStart : ProgressStatusBarRangeColor$1.infoEnd;
|
|
5727
5727
|
}
|
|
5728
5728
|
}
|
|
5729
5729
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TCloudUiProgressStatusBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -8291,6 +8291,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
8291
8291
|
args: [{ selector: 'tcloud-ui-card-title', imports: [], template: "<div class=\"tcloud-ui-card-title c-neutral-700\">\n <span class=\"tcloud-ui-card-title__icon w-40 h-40 f-size-18 bg-c-neutral-200 bor-rad-rounded\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n\n <h2 class=\"tcloud-ui-card-title__text f-h2 f-weight-700 mar-none\">{{title()}}</h2>\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block}.tcloud-ui-card-title{align-items:center;display:flex;gap:var(--size-8);height:var(--size-40);max-height:var(--size-40);min-height:var(--size-40)}.tcloud-ui-card-title__icon{align-content:center;text-align:center;max-width:var(--size-40);min-width:var(--size-40);max-height:var(--size-40);min-height:var(--size-40)}.tcloud-ui-card-title__text{cursor:default}@media (max-width: 480px){.tcloud-ui-card-title{max-height:var(--size-32);min-height:var(--size-32)}.tcloud-ui-card-title__icon{max-width:var(--size-32);min-width:var(--size-32);max-height:var(--size-32);min-height:var(--size-32);font-size:var(--f-size-16)}.tcloud-ui-card-title__text{font-size:var(--f-size-16);line-height:var(--l-height-16);font-weight:var(--f-weight-600);text-transform:inherit;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;line-clamp:2;-webkit-line-clamp:2}}\n"] }]
|
|
8292
8292
|
}] });
|
|
8293
8293
|
|
|
8294
|
+
class TcRevButtonDirective {
|
|
8295
|
+
constructor(_el) {
|
|
8296
|
+
this._el = _el;
|
|
8297
|
+
this.color = input('primary');
|
|
8298
|
+
this.size = input('sm');
|
|
8299
|
+
this.fullWidth = input(false);
|
|
8300
|
+
this.tcRevButton = input('filled');
|
|
8301
|
+
effect(() => {
|
|
8302
|
+
this.setClasses();
|
|
8303
|
+
});
|
|
8304
|
+
}
|
|
8305
|
+
setClasses() {
|
|
8306
|
+
const tokenList = this._el.nativeElement.classList;
|
|
8307
|
+
tokenList.remove(...Array.from(tokenList).filter((c) => c.startsWith('tc-rev-btn--')));
|
|
8308
|
+
let tcRevButton = this.tcRevButton();
|
|
8309
|
+
if (!tcRevButton) {
|
|
8310
|
+
tcRevButton = 'filled';
|
|
8311
|
+
}
|
|
8312
|
+
this.fullWidth() ? this._el.nativeElement.classList.add('tc-rev-btn--full-width') : null;
|
|
8313
|
+
this._el.nativeElement.classList.add(`tc-rev-btn--${this.size()}`);
|
|
8314
|
+
this._el.nativeElement.classList.add(`tc-rev-btn--${this.color()}-${tcRevButton}`);
|
|
8315
|
+
}
|
|
8316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevButtonDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
8317
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.20", type: TcRevButtonDirective, isStandalone: true, selector: "button[tcRevButton]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, tcRevButton: { classPropertyName: "tcRevButton", publicName: "tcRevButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tc-rev-btn" }, ngImport: i0 }); }
|
|
8318
|
+
}
|
|
8319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevButtonDirective, decorators: [{
|
|
8320
|
+
type: Directive,
|
|
8321
|
+
args: [{
|
|
8322
|
+
selector: 'button[tcRevButton]',
|
|
8323
|
+
host: {
|
|
8324
|
+
class: 'tc-rev-btn'
|
|
8325
|
+
}
|
|
8326
|
+
}]
|
|
8327
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
8328
|
+
|
|
8329
|
+
class TcRevCardTitleComponent {
|
|
8330
|
+
constructor() {
|
|
8331
|
+
this.title = input.required();
|
|
8332
|
+
}
|
|
8333
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCardTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8334
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: TcRevCardTitleComponent, isStandalone: true, selector: "tc-rev-card-title", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"tc-rev-card-title c-neutral-700\">\n <span class=\"tc-rev-card-title__icon w-40 h-40 f-size-18 bg-c-neutral-200 bor-rad-rounded\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n\n <h2 class=\"tc-rev-card-title__text f-h2 f-weight-700 mar-none\">{{title()}}</h2>\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block}.tc-rev-card-title{align-items:center;display:flex;gap:var(--size-8);height:var(--size-40);max-height:var(--size-40);min-height:var(--size-40)}.tc-rev-card-title__icon{align-content:center;text-align:center;max-width:var(--size-40);min-width:var(--size-40);max-height:var(--size-40);min-height:var(--size-40)}.tc-rev-card-title__text{cursor:default}@media (max-width: 480px){.tc-rev-card-title{max-height:var(--size-32);min-height:var(--size-32)}.tc-rev-card-title__icon{max-width:var(--size-32);min-width:var(--size-32);max-height:var(--size-32);min-height:var(--size-32);font-size:var(--f-size-16)}.tc-rev-card-title__text{font-size:var(--f-size-16);line-height:var(--l-height-16);font-weight:var(--f-weight-600);text-transform:inherit;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2}}\n"] }); }
|
|
8335
|
+
}
|
|
8336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCardTitleComponent, decorators: [{
|
|
8337
|
+
type: Component,
|
|
8338
|
+
args: [{ selector: 'tc-rev-card-title', imports: [], template: "<div class=\"tc-rev-card-title c-neutral-700\">\n <span class=\"tc-rev-card-title__icon w-40 h-40 f-size-18 bg-c-neutral-200 bor-rad-rounded\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n\n <h2 class=\"tc-rev-card-title__text f-h2 f-weight-700 mar-none\">{{title()}}</h2>\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block}.tc-rev-card-title{align-items:center;display:flex;gap:var(--size-8);height:var(--size-40);max-height:var(--size-40);min-height:var(--size-40)}.tc-rev-card-title__icon{align-content:center;text-align:center;max-width:var(--size-40);min-width:var(--size-40);max-height:var(--size-40);min-height:var(--size-40)}.tc-rev-card-title__text{cursor:default}@media (max-width: 480px){.tc-rev-card-title{max-height:var(--size-32);min-height:var(--size-32)}.tc-rev-card-title__icon{max-width:var(--size-32);min-width:var(--size-32);max-height:var(--size-32);min-height:var(--size-32);font-size:var(--f-size-16)}.tc-rev-card-title__text{font-size:var(--f-size-16);line-height:var(--l-height-16);font-weight:var(--f-weight-600);text-transform:inherit;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;-webkit-line-clamp:2}}\n"] }]
|
|
8339
|
+
}] });
|
|
8340
|
+
|
|
8294
8341
|
class TCloudUiCardAccordionComponent {
|
|
8295
8342
|
constructor() {
|
|
8296
8343
|
this._viewPort = inject(TCloudUiDeviceUtilsService);
|
|
@@ -8318,11 +8365,11 @@ class TCloudUiCardAccordionComponent {
|
|
|
8318
8365
|
return ['pad-14'];
|
|
8319
8366
|
}
|
|
8320
8367
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TCloudUiCardAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8321
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TCloudUiCardAccordionComponent, isStandalone: true, selector: "tcloud-ui-card-accordion", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, iconClass: { classPropertyName: "iconClass", publicName: "iconClass", isSignal: true, isRequired: false, transformFunction: null }, showMoreText: { classPropertyName: "showMoreText", publicName: "showMoreText", isSignal: true, isRequired: false, transformFunction: null }, showLessText: { classPropertyName: "showLessText", publicName: "showLessText", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle", isOpen: "isOpenChange" }, ngImport: i0, template: "<div class=\"tcloud-ui-card-accordion tcloud-ui-card bg-c-neutral-50 bor-xs bor-rad-16\"\n[ngClass]=\"accordionExtraClasses\"\n>\n <
|
|
8368
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TCloudUiCardAccordionComponent, isStandalone: true, selector: "tcloud-ui-card-accordion", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, iconClass: { classPropertyName: "iconClass", publicName: "iconClass", isSignal: true, isRequired: false, transformFunction: null }, showMoreText: { classPropertyName: "showMoreText", publicName: "showMoreText", isSignal: true, isRequired: false, transformFunction: null }, showLessText: { classPropertyName: "showLessText", publicName: "showLessText", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle", isOpen: "isOpenChange" }, ngImport: i0, template: "<div class=\"tcloud-ui-card-accordion tcloud-ui-card bg-c-neutral-50 bor-xs bor-rad-16\"\n[ngClass]=\"accordionExtraClasses\"\n>\n <tc-rev-card-title [title]=\"title()\" [class]=\"isOpen() ? 'pad-b-16' : '' \">\n <i [class]=\"iconClass()\" icon></i>\n\n <div\n *ngIf=\"badge()\"\n class=\"f-size-12 f-weight-600 pad-x-4 pad-y-2 bor-xs bor-rad-xs\"\n [ngClass]=\"badge()?.class\"\n [class.mar-l-8]=\"isDesktop()\"\n >\n {{ badge()?.text }}\n </div>\n\n @if(isDesktop()){\n <button tcRevButton=\"outline\" color=\"dark\" size=\"sm\" class=\"mar-l-a\" (click)=\"toggleAccordion()\">\n {{ isOpen() ? showLessText() : showMoreText() }}\n <i class=\"fa-light\" [ngClass]=\"isOpen() ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n }\n\n @if(!isDesktop()){\n <button tcRevButton=\"link\" color=\"dark\" size=\"md\" (click)=\"toggleAccordion()\" class=\"tcloud-ui-card-accordion__arrow-mobile mar-l-a\">\n <i class=\"fa-light\" [ngClass]=\"isOpen() ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n }\n\n </tc-rev-card-title>\n <ng-content *ngIf=\"isOpen()\"></ng-content>\n</div>\n", styles: [":host{display:block}.tcloud-ui-card-accordion{border-color:var(--c-neutral-400)}@media (max-width: 480px){.tcloud-ui-card-accordion__arrow-mobile{font-size:var(--f-size-16);padding:0 var(--size-6)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TcRevCardTitleComponent, selector: "tc-rev-card-title", inputs: ["title"] }, { kind: "directive", type: TcRevButtonDirective, selector: "button[tcRevButton]", inputs: ["color", "size", "fullWidth", "tcRevButton"] }] }); }
|
|
8322
8369
|
}
|
|
8323
8370
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TCloudUiCardAccordionComponent, decorators: [{
|
|
8324
8371
|
type: Component,
|
|
8325
|
-
args: [{ selector: 'tcloud-ui-card-accordion', imports: [CommonModule,
|
|
8372
|
+
args: [{ selector: 'tcloud-ui-card-accordion', imports: [CommonModule, TcRevCardTitleComponent, TcRevButtonDirective], template: "<div class=\"tcloud-ui-card-accordion tcloud-ui-card bg-c-neutral-50 bor-xs bor-rad-16\"\n[ngClass]=\"accordionExtraClasses\"\n>\n <tc-rev-card-title [title]=\"title()\" [class]=\"isOpen() ? 'pad-b-16' : '' \">\n <i [class]=\"iconClass()\" icon></i>\n\n <div\n *ngIf=\"badge()\"\n class=\"f-size-12 f-weight-600 pad-x-4 pad-y-2 bor-xs bor-rad-xs\"\n [ngClass]=\"badge()?.class\"\n [class.mar-l-8]=\"isDesktop()\"\n >\n {{ badge()?.text }}\n </div>\n\n @if(isDesktop()){\n <button tcRevButton=\"outline\" color=\"dark\" size=\"sm\" class=\"mar-l-a\" (click)=\"toggleAccordion()\">\n {{ isOpen() ? showLessText() : showMoreText() }}\n <i class=\"fa-light\" [ngClass]=\"isOpen() ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n }\n\n @if(!isDesktop()){\n <button tcRevButton=\"link\" color=\"dark\" size=\"md\" (click)=\"toggleAccordion()\" class=\"tcloud-ui-card-accordion__arrow-mobile mar-l-a\">\n <i class=\"fa-light\" [ngClass]=\"isOpen() ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n }\n\n </tc-rev-card-title>\n <ng-content *ngIf=\"isOpen()\"></ng-content>\n</div>\n", styles: [":host{display:block}.tcloud-ui-card-accordion{border-color:var(--c-neutral-400)}@media (max-width: 480px){.tcloud-ui-card-accordion__arrow-mobile{font-size:var(--f-size-16);padding:0 var(--size-6)}}\n"] }]
|
|
8326
8373
|
}] });
|
|
8327
8374
|
|
|
8328
8375
|
class TCloudUiCalendarComponent {
|
|
@@ -8878,13 +8925,190 @@ function isTextEllipsed(text, containerWidth) {
|
|
|
8878
8925
|
document.body.removeChild(tempElement);
|
|
8879
8926
|
return textWidth > maxWidth;
|
|
8880
8927
|
}
|
|
8928
|
+
// export class EllipsedTextHelper
|
|
8929
|
+
// {
|
|
8930
|
+
// public static isEllipsed(id: string): boolean
|
|
8931
|
+
// {
|
|
8932
|
+
// const element = document.querySelector<any>(`#${id}`);
|
|
8933
|
+
// return element ? (element.offsetWidth < element.scrollWidth) : false;
|
|
8934
|
+
// }
|
|
8935
|
+
// /**
|
|
8936
|
+
// *
|
|
8937
|
+
// * @param _textField - Stands for the text you want to compare
|
|
8938
|
+
// * @param _fontProperties - Text CSS properties (font-size & font-family)
|
|
8939
|
+
// * @param _divId - divId you want to compare
|
|
8940
|
+
// * @param _isEllipsed - is it Ellipsed? (optional)
|
|
8941
|
+
// */
|
|
8942
|
+
// public static calculate( _textField: string, _fontProperties: string, _divId: string, _isEllipsed: boolean = false, _whiteSpaceNoWrap = true): boolean
|
|
8943
|
+
// {
|
|
8944
|
+
// if (_isEllipsed)
|
|
8945
|
+
// {
|
|
8946
|
+
// return true;
|
|
8947
|
+
// }
|
|
8948
|
+
// const textDiv = document.getElementById(_divId);
|
|
8949
|
+
// if (textDiv)
|
|
8950
|
+
// {
|
|
8951
|
+
// const widthText = this.textWidthCalc(_textField, _fontProperties, _whiteSpaceNoWrap);
|
|
8952
|
+
// return widthText > textDiv.clientWidth;
|
|
8953
|
+
// }
|
|
8954
|
+
// return false
|
|
8955
|
+
// }
|
|
8956
|
+
// public static textWidthCalc(_text: string, _fontProperties: string, _whiteSpaceNoWrap: boolean): number
|
|
8957
|
+
// {
|
|
8958
|
+
// let tag = document.createElement('div');
|
|
8959
|
+
// tag.style.position = 'absolute';
|
|
8960
|
+
// tag.style.left = '-99in';
|
|
8961
|
+
// tag.style.font = _fontProperties;
|
|
8962
|
+
// tag.innerHTML = _text;
|
|
8963
|
+
// if (_whiteSpaceNoWrap)
|
|
8964
|
+
// {
|
|
8965
|
+
// tag.style.whiteSpace = 'nowrap';
|
|
8966
|
+
// }
|
|
8967
|
+
// document.body.appendChild(tag);
|
|
8968
|
+
// const result = tag.clientWidth;
|
|
8969
|
+
// document.body.removeChild(tag);
|
|
8970
|
+
// return result;
|
|
8971
|
+
// }
|
|
8972
|
+
// }
|
|
8973
|
+
|
|
8974
|
+
class TcRevTooltipDirective {
|
|
8975
|
+
constructor(_el, _renderer, _vcr) {
|
|
8976
|
+
this._el = _el;
|
|
8977
|
+
this._renderer = _renderer;
|
|
8978
|
+
this._vcr = _vcr;
|
|
8979
|
+
this.tcRevTooltip = input('');
|
|
8980
|
+
this.position = input('top');
|
|
8981
|
+
this.tooltipElement = null;
|
|
8982
|
+
}
|
|
8983
|
+
onMouseEnter() {
|
|
8984
|
+
const tooltipText = this.tcRevTooltip();
|
|
8985
|
+
if (this.isValidTooltipText(tooltipText)) {
|
|
8986
|
+
this.showTooltip(tooltipText);
|
|
8987
|
+
}
|
|
8988
|
+
}
|
|
8989
|
+
onMouseLeave() {
|
|
8990
|
+
this.hideTooltip();
|
|
8991
|
+
}
|
|
8992
|
+
isValidTooltipText(text) {
|
|
8993
|
+
return text && text.trim().length > 0;
|
|
8994
|
+
}
|
|
8995
|
+
showTooltip(text) {
|
|
8996
|
+
if (this.tooltipElement) {
|
|
8997
|
+
this.hideTooltip();
|
|
8998
|
+
}
|
|
8999
|
+
// Create tooltip element
|
|
9000
|
+
this.tooltipElement = this._renderer.createElement('div');
|
|
9001
|
+
// Add text content
|
|
9002
|
+
const textNode = this._renderer.createText(text);
|
|
9003
|
+
this._renderer.appendChild(this.tooltipElement, textNode);
|
|
9004
|
+
// Add CSS classes
|
|
9005
|
+
this._renderer.addClass(this.tooltipElement, 'tc-rev-tooltip');
|
|
9006
|
+
this._renderer.addClass(this.tooltipElement, `tc-rev-tooltip--${this.position()}`);
|
|
9007
|
+
// Set initial styles
|
|
9008
|
+
this._renderer.setStyle(this.tooltipElement, 'position', 'absolute');
|
|
9009
|
+
this._renderer.setStyle(this.tooltipElement, 'z-index', '9999');
|
|
9010
|
+
this._renderer.setStyle(this.tooltipElement, 'visibility', 'hidden');
|
|
9011
|
+
// this._renderer.setStyle(this.tooltipElement, 'opacity', '0');
|
|
9012
|
+
// Append to body
|
|
9013
|
+
this._renderer.appendChild(document.body, this.tooltipElement);
|
|
9014
|
+
// Position tooltip
|
|
9015
|
+
this.positionTooltip();
|
|
9016
|
+
// Show tooltip with animation
|
|
9017
|
+
this._renderer.setStyle(this.tooltipElement, 'visibility', 'visible');
|
|
9018
|
+
this._renderer.addClass(this.tooltipElement, 'tc-rev-tooltip--visible');
|
|
9019
|
+
}
|
|
9020
|
+
hideTooltip() {
|
|
9021
|
+
if (this.tooltipElement) {
|
|
9022
|
+
this._renderer.removeChild(document.body, this.tooltipElement);
|
|
9023
|
+
this.tooltipElement = null;
|
|
9024
|
+
}
|
|
9025
|
+
}
|
|
9026
|
+
positionTooltip() {
|
|
9027
|
+
if (!this.tooltipElement)
|
|
9028
|
+
return;
|
|
9029
|
+
const hostRect = this._el.nativeElement.getBoundingClientRect();
|
|
9030
|
+
const tooltipRect = this.tooltipElement.getBoundingClientRect();
|
|
9031
|
+
const position = this.position();
|
|
9032
|
+
let top = 0;
|
|
9033
|
+
let left = 0;
|
|
9034
|
+
switch (position) {
|
|
9035
|
+
case 'top':
|
|
9036
|
+
top = hostRect.top + window.scrollY - tooltipRect.height - 8;
|
|
9037
|
+
left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
|
|
9038
|
+
break;
|
|
9039
|
+
case 'bottom':
|
|
9040
|
+
top = hostRect.bottom + window.scrollY + 8;
|
|
9041
|
+
left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
|
|
9042
|
+
break;
|
|
9043
|
+
case 'left':
|
|
9044
|
+
top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
|
|
9045
|
+
left = hostRect.left + window.scrollX - tooltipRect.width - 8;
|
|
9046
|
+
break;
|
|
9047
|
+
case 'right':
|
|
9048
|
+
top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
|
|
9049
|
+
left = hostRect.right + window.scrollX + 8;
|
|
9050
|
+
break;
|
|
9051
|
+
}
|
|
9052
|
+
this._renderer.setStyle(this.tooltipElement, 'top', `${top}px`);
|
|
9053
|
+
this._renderer.setStyle(this.tooltipElement, 'left', `${left}px`);
|
|
9054
|
+
}
|
|
9055
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
9056
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.20", type: TcRevTooltipDirective, isStandalone: true, selector: "[tcRevTooltip]", inputs: { tcRevTooltip: { classPropertyName: "tcRevTooltip", publicName: "tcRevTooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0 }); }
|
|
9057
|
+
}
|
|
9058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevTooltipDirective, decorators: [{
|
|
9059
|
+
type: Directive,
|
|
9060
|
+
args: [{
|
|
9061
|
+
selector: '[tcRevTooltip]',
|
|
9062
|
+
standalone: true
|
|
9063
|
+
}]
|
|
9064
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }], propDecorators: { onMouseEnter: [{
|
|
9065
|
+
type: HostListener,
|
|
9066
|
+
args: ['mouseenter']
|
|
9067
|
+
}], onMouseLeave: [{
|
|
9068
|
+
type: HostListener,
|
|
9069
|
+
args: ['mouseleave']
|
|
9070
|
+
}] } });
|
|
8881
9071
|
|
|
8882
|
-
|
|
9072
|
+
class TcRevIconButtonDirective {
|
|
9073
|
+
constructor(_el) {
|
|
9074
|
+
this._el = _el;
|
|
9075
|
+
this.color = input('primary');
|
|
9076
|
+
this.size = input('sm');
|
|
9077
|
+
this.tcRevIconButton = input('filled');
|
|
9078
|
+
effect(() => {
|
|
9079
|
+
this.setClasses();
|
|
9080
|
+
});
|
|
9081
|
+
}
|
|
9082
|
+
setClasses() {
|
|
9083
|
+
const tokenList = this._el.nativeElement.classList;
|
|
9084
|
+
tokenList.remove(...Array.from(tokenList).filter((c) => c.startsWith('tc-rev-btn--')));
|
|
9085
|
+
let tcRevIconButton = this.tcRevIconButton();
|
|
9086
|
+
if (!tcRevIconButton) {
|
|
9087
|
+
tcRevIconButton = 'filled';
|
|
9088
|
+
}
|
|
9089
|
+
this._el.nativeElement.classList.add(`tc-rev-btn--${this.size()}`);
|
|
9090
|
+
this._el.nativeElement.classList.add(`tc-rev-btn--${this.size()}-icon`);
|
|
9091
|
+
this._el.nativeElement.classList.add(`tc-rev-btn--${this.color()}-${tcRevIconButton}`);
|
|
9092
|
+
}
|
|
9093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevIconButtonDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
9094
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.20", type: TcRevIconButtonDirective, isStandalone: true, selector: "button[tcRevIconButton]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tcRevIconButton: { classPropertyName: "tcRevIconButton", publicName: "tcRevIconButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tc-rev-btn tc-rev-btn-icon" }, ngImport: i0 }); }
|
|
9095
|
+
}
|
|
9096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevIconButtonDirective, decorators: [{
|
|
9097
|
+
type: Directive,
|
|
9098
|
+
args: [{
|
|
9099
|
+
selector: 'button[tcRevIconButton]',
|
|
9100
|
+
host: {
|
|
9101
|
+
class: 'tc-rev-btn tc-rev-btn-icon'
|
|
9102
|
+
}
|
|
9103
|
+
}]
|
|
9104
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
9105
|
+
|
|
9106
|
+
var DropdownSize$1;
|
|
8883
9107
|
(function (DropdownSize) {
|
|
8884
9108
|
DropdownSize["sm"] = "sm";
|
|
8885
9109
|
DropdownSize["md"] = "md";
|
|
8886
9110
|
DropdownSize["lg"] = "lg";
|
|
8887
|
-
})(DropdownSize || (DropdownSize = {}));
|
|
9111
|
+
})(DropdownSize$1 || (DropdownSize$1 = {}));
|
|
8888
9112
|
const noop = () => { };
|
|
8889
9113
|
const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
|
|
8890
9114
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -8906,14 +9130,14 @@ class TCloudUiDropdownComponent {
|
|
|
8906
9130
|
this.options = input.required(); // Lista de opções no novo formato
|
|
8907
9131
|
this.initialValue = input(null); // Valor pré-selecionado (deprecated - use value instead)
|
|
8908
9132
|
this.value = model(null); // Two-way binding para o valor selecionado
|
|
8909
|
-
this.size = input(DropdownSize.sm);
|
|
9133
|
+
this.size = input(DropdownSize$1.sm);
|
|
8910
9134
|
this.width = input(''); // Largura específica do dropdown (ex: '300px', '50%'). Se não informado, ocupa 100% do pai
|
|
8911
9135
|
this.searchable = input(false); // Habilita campo de busca
|
|
8912
9136
|
this.searchPlaceholder = input('Buscar...'); // Placeholder do campo de busca
|
|
8913
9137
|
this.optionSelected = output(); // Emissor para o valor selecionado
|
|
8914
9138
|
this.selectedOption = signal(null); // Opção selecionada
|
|
8915
9139
|
this.isOpen = false; // Controla se o dropdown está aberto
|
|
8916
|
-
this.dropdownSize = DropdownSize;
|
|
9140
|
+
this.dropdownSize = DropdownSize$1;
|
|
8917
9141
|
this.isDesktop = this._deviceService.isDesktop;
|
|
8918
9142
|
this.isMobile = this._deviceService.isMobile;
|
|
8919
9143
|
this.searchText = signal(''); // Texto de busca
|
|
@@ -9048,7 +9272,7 @@ class TCloudUiDropdownComponent {
|
|
|
9048
9272
|
this._disabledByForm.set(isDisabled);
|
|
9049
9273
|
}
|
|
9050
9274
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TCloudUiDropdownComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9051
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TCloudUiDropdownComponent, isStandalone: true, selector: "tcloud-ui-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", optionSelected: "optionSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "menuTemplate", first: true, predicate: ["menuTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"tcloud-ui-dropdown\"\n [class.disabled]=\"isDisabled()\"\n [style.width]=\"this.width()\"\n>\n <button\n class=\"tcloud-ui-dropdown-toggle\"\n [class.tcloud-ui-dropdown-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tcloud-ui-dropdown-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tcloud-ui-dropdown-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"isDisabled()\"\n [disabled]=\"isDisabled()\"\n >\n @if (label()) {\n <b [innerHTML]=\"label()\"></b>\n }\n <span class=\"tcloud-ui-dropdown-selected-text\">\n {{ selectedOption() ? selectedOption()?.displayValue : \"Selecione\" }}\n </span>\n <i class=\"fa-light fa-chevron-down mar-l-a\"></i>\n </button>\n <ul *ngIf=\"isOpen && isDesktop()\" class=\"tcloud-ui-dropdown-menu\">\n <!-- Campo de busca -->\n @if (searchable()) {\n <li class=\"tcloud-ui-dropdown-search\">\n <div class=\"tcloud-ui-dropdown-search-container\">\n <input\n type=\"text\"\n class=\"tcloud-ui-dropdown-search-input\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <i class=\"fa-light fa-magnifying-glass tcloud-ui-dropdown-search-icon\"></i>\n @if (searchText()) {\n <button\n type=\"button\"\n class=\"tcloud-ui-dropdown-search-clear\"\n (click)=\"clearSearch(); $event.stopPropagation()\"\n >\n <i class=\"fa-light fa-times\"></i>\n </button>\n }\n </div>\n </li>\n }\n @for (option of filteredOptions(); track option?.value) {\n <li class=\"tcloud-ui-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tcloud-ui-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n <span\n class=\"tcloud-ui-dropdown-option-text\"\n position=\"top\"\n >\n {{ option?.displayValue }}\n </span>\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n </button>\n </li>\n }\n <!-- Mensagem quando nenhum item for encontrado na busca -->\n @if (searchable() && searchText() && filteredOptions().length === 0) {\n <li class=\"tcloud-ui-dropdown-no-results\">\n <span>Nenhuma op\u00E7\u00E3o encontrada</span>\n </li>\n }\n </ul>\n\n <!-- Dropdown full screen -->\n <ng-template #menuTemplate>\n <div class=\"tcloud-ui-dropdown-menu tcloud-ui-dropdown-menu--device\">\n <div class=\"tcloud-ui-dropdown-menu-section\">\n <div class=\"tcloud-ui-dropdown-menu-header pad-b-24\">\n <h3 class=\"mar-none f-h2 f-weight-600 c-neutral-600\">\n {{ label() }}\n </h3>\n <button\n tcloudUiIconButton=\"outline\"\n color=\"dark\"\n size=\"sm\"\n (click)=\"_deviceService.closeDropdownDevice()\"\n >\n <i class=\"fa-light fa-times f-size-16\"></i>\n </button>\n </div>\n <ul class=\"tcloud-ui-dropdown-menu-container mar-t-8\">\n <!-- Campo de busca mobile -->\n @if (searchable()) {\n <li class=\"tcloud-ui-dropdown-search tcloud-ui-dropdown-search--mobile\">\n <div class=\"tcloud-ui-dropdown-search-container\">\n <input\n type=\"text\"\n class=\"tcloud-ui-dropdown-search-input\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <i class=\"fa-light fa-magnifying-glass tcloud-ui-dropdown-search-icon\"></i>\n @if (searchText()) {\n <button\n type=\"button\"\n class=\"tcloud-ui-dropdown-search-clear\"\n (click)=\"clearSearch(); $event.stopPropagation()\"\n >\n <i class=\"fa-light fa-times\"></i>\n </button>\n }\n </div>\n </li>\n }\n @for (option of filteredOptions(); track option?.value) {\n <li class=\"tcloud-ui-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tcloud-ui-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check f-size-16\"></i>\n }\n </button>\n </li>\n }\n <!-- Mensagem quando nenhum item for encontrado na busca mobile -->\n @if (searchable() && searchText() && filteredOptions().length === 0) {\n <li class=\"tcloud-ui-dropdown-no-results tcloud-ui-dropdown-no-results--mobile\">\n <span>Nenhuma op\u00E7\u00E3o encontrada</span>\n </li>\n }\n </ul>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [".tcloud-ui-dropdown{position:relative;display:block;width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle{align-items:center;background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-4);line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle .tcloud-ui-dropdown-selected-text{flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--sm{height:var(--size-40)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--md{height:var(--size-44)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--lg{height:var(--size-48)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:hover,.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:focus{border-color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu{box-shadow:var(--shadow-md);border:1px solid var(--c-neutral-300);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);list-style:none;margin:0;max-height:15.625rem;overflow-y:auto;padding:0;width:100%;z-index:1000}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn .tcloud-ui-dropdown-option-text{flex:1;overflow:hidden;text-align:left;white-space:nowrap}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn .tcloud-ui-dropdown-option-text.ellipsed{text-overflow:ellipsis}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search{position:sticky;top:0;background-color:var(--c-neutral-50);padding:var(--size-8);border-bottom:1px solid var(--c-neutral-200);z-index:1}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container{position:relative;display:flex;align-items:center}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input{width:100%;height:var(--size-32);padding:var(--size-8) var(--size-32) var(--size-8) var(--size-12);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-4);font-size:var(--f-size-12);line-height:var(--l-height-16);color:var(--c-neutral-700);background-color:var(--c-neutral-50);outline:none;transition:border-color .2s ease}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input:focus{border-color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input::placeholder{color:var(--c-neutral-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-icon{position:absolute;left:var(--size-8);color:var(--c-neutral-500);font-size:var(--f-size-12);pointer-events:none}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear{position:absolute;right:var(--size-8);background:none;border:none;color:var(--c-neutral-500);cursor:pointer;padding:var(--size-2);display:flex;align-items:center;justify-content:center;transition:color .2s ease}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear:hover{color:var(--c-neutral-700)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-no-results{padding:var(--size-12) var(--size-8);text-align:center;color:var(--c-neutral-500);font-size:var(--f-size-12);font-style:italic}.tcloud-ui-dropdown-menu--device{height:100%;overflow-y:auto;background-color:var(--c-neutral-50);padding:var(--size-16)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-section{display:contents}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-header{align-items:center;display:flex;gap:var(--size-16);justify-content:space-between}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-container{list-style:none;margin:0;padding:0;gap:.5rem;display:flex;flex-direction:column}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-14);line-height:var(--l-height-16);height:var(--size-40);padding:var(--size-12);text-align:left;text-wrap:nowrap;transition:all .2s ease;width:100%}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:active:not(:disabled):not(.selected){background-color:var(--c-primary-200);border-color:var(--c-primary-200);color:var(--c-primary-500);transform:scale(.98)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile{position:sticky;top:0;background-color:var(--c-neutral-50);padding:var(--size-12) 0;margin-bottom:var(--size-8);border-bottom:1px solid var(--c-neutral-200);z-index:1}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input{height:var(--size-40);font-size:var(--f-size-14);padding:var(--size-12) var(--size-40) var(--size-12) var(--size-16)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-icon{left:var(--size-12);font-size:var(--f-size-14)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear{right:var(--size-12);padding:var(--size-4)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-no-results--mobile{padding:var(--size-16) var(--size-12);font-size:var(--f-size-14);color:var(--c-neutral-600)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TCloudUiIconButtonDirective, selector: "button[tcloudUiIconButton]", inputs: ["color", "size", "tcloudUiIconButton"] }] }); }
|
|
9275
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TCloudUiDropdownComponent, isStandalone: true, selector: "tcloud-ui-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", optionSelected: "optionSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "menuTemplate", first: true, predicate: ["menuTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"tcloud-ui-dropdown\"\n [class.disabled]=\"isDisabled()\"\n [style.width]=\"this.width()\"\n>\n <button\n class=\"tcloud-ui-dropdown-toggle\"\n [class.tcloud-ui-dropdown-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tcloud-ui-dropdown-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tcloud-ui-dropdown-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"isDisabled()\"\n [disabled]=\"isDisabled()\"\n >\n @if (label()) {\n <b [innerHTML]=\"label()\"></b>\n }\n <span class=\"tcloud-ui-dropdown-selected-text\">\n {{ selectedOption() ? selectedOption()?.displayValue : \"Selecione\" }}\n </span>\n <i class=\"fa-light fa-chevron-down mar-l-a\"></i>\n </button>\n <ul *ngIf=\"isOpen && isDesktop()\" class=\"tcloud-ui-dropdown-menu\">\n <!-- Campo de busca -->\n @if (searchable()) {\n <li class=\"tcloud-ui-dropdown-search\">\n <div class=\"tcloud-ui-dropdown-search-container\">\n <input\n type=\"text\"\n class=\"tcloud-ui-dropdown-search-input\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <i class=\"fa-light fa-magnifying-glass tcloud-ui-dropdown-search-icon\"></i>\n @if (searchText()) {\n <button\n type=\"button\"\n class=\"tcloud-ui-dropdown-search-clear\"\n (click)=\"clearSearch(); $event.stopPropagation()\"\n >\n <i class=\"fa-light fa-times\"></i>\n </button>\n }\n </div>\n </li>\n }\n @for (option of filteredOptions(); track option?.value) {\n <li class=\"tcloud-ui-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tcloud-ui-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n <span\n class=\"tcloud-ui-dropdown-option-text\"\n position=\"top\"\n >\n {{ option?.displayValue }}\n </span>\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n </button>\n </li>\n }\n <!-- Mensagem quando nenhum item for encontrado na busca -->\n @if (searchable() && searchText() && filteredOptions().length === 0) {\n <li class=\"tcloud-ui-dropdown-no-results\">\n <span>Nenhuma op\u00E7\u00E3o encontrada</span>\n </li>\n }\n </ul>\n\n <!-- Dropdown full screen -->\n <ng-template #menuTemplate>\n <div class=\"tcloud-ui-dropdown-menu tcloud-ui-dropdown-menu--device\">\n <div class=\"tcloud-ui-dropdown-menu-section\">\n <div class=\"tcloud-ui-dropdown-menu-header pad-b-24\">\n <h3 class=\"mar-none f-h2 f-weight-600 c-neutral-600\">\n {{ label() }}\n </h3>\n <button\n tcRevIconButton=\"outline\"\n color=\"dark\"\n size=\"sm\"\n (click)=\"_deviceService.closeDropdownDevice()\"\n >\n <i class=\"fa-light fa-times f-size-16\"></i>\n </button>\n </div>\n <ul class=\"tcloud-ui-dropdown-menu-container mar-t-8\">\n <!-- Campo de busca mobile -->\n @if (searchable()) {\n <li class=\"tcloud-ui-dropdown-search tcloud-ui-dropdown-search--mobile\">\n <div class=\"tcloud-ui-dropdown-search-container\">\n <input\n type=\"text\"\n class=\"tcloud-ui-dropdown-search-input\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <i class=\"fa-light fa-magnifying-glass tcloud-ui-dropdown-search-icon\"></i>\n @if (searchText()) {\n <button\n type=\"button\"\n class=\"tcloud-ui-dropdown-search-clear\"\n (click)=\"clearSearch(); $event.stopPropagation()\"\n >\n <i class=\"fa-light fa-times\"></i>\n </button>\n }\n </div>\n </li>\n }\n @for (option of filteredOptions(); track option?.value) {\n <li class=\"tcloud-ui-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tcloud-ui-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check f-size-16\"></i>\n }\n </button>\n </li>\n }\n <!-- Mensagem quando nenhum item for encontrado na busca mobile -->\n @if (searchable() && searchText() && filteredOptions().length === 0) {\n <li class=\"tcloud-ui-dropdown-no-results tcloud-ui-dropdown-no-results--mobile\">\n <span>Nenhuma op\u00E7\u00E3o encontrada</span>\n </li>\n }\n </ul>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [".tcloud-ui-dropdown{position:relative;display:block;width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle{align-items:center;background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-4);line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle .tcloud-ui-dropdown-selected-text{flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--sm{height:var(--size-40)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--md{height:var(--size-44)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--lg{height:var(--size-48)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:hover,.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:focus{border-color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu{box-shadow:var(--shadow-md);border:1px solid var(--c-neutral-300);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);list-style:none;margin:0;max-height:15.625rem;overflow-y:auto;padding:0;width:100%;z-index:1000}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn .tcloud-ui-dropdown-option-text{flex:1;overflow:hidden;text-align:left;white-space:nowrap}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn .tcloud-ui-dropdown-option-text.ellipsed{text-overflow:ellipsis}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search{position:sticky;top:0;background-color:var(--c-neutral-50);padding:var(--size-8);border-bottom:1px solid var(--c-neutral-200);z-index:1}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container{position:relative;display:flex;align-items:center}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input{width:100%;height:var(--size-32);padding:var(--size-8) var(--size-32) var(--size-8) var(--size-12);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-4);font-size:var(--f-size-12);line-height:var(--l-height-16);color:var(--c-neutral-700);background-color:var(--c-neutral-50);outline:none;transition:border-color .2s ease}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input:focus{border-color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input::placeholder{color:var(--c-neutral-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-icon{position:absolute;left:var(--size-8);color:var(--c-neutral-500);font-size:var(--f-size-12);pointer-events:none}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear{position:absolute;right:var(--size-8);background:none;border:none;color:var(--c-neutral-500);cursor:pointer;padding:var(--size-2);display:flex;align-items:center;justify-content:center;transition:color .2s ease}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear:hover{color:var(--c-neutral-700)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-no-results{padding:var(--size-12) var(--size-8);text-align:center;color:var(--c-neutral-500);font-size:var(--f-size-12);font-style:italic}.tcloud-ui-dropdown-menu--device{height:100%;overflow-y:auto;background-color:var(--c-neutral-50);padding:var(--size-16)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-section{display:contents}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-header{align-items:center;display:flex;gap:var(--size-16);justify-content:space-between}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-container{list-style:none;margin:0;padding:0;gap:.5rem;display:flex;flex-direction:column}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-14);line-height:var(--l-height-16);height:var(--size-40);padding:var(--size-12);text-align:left;text-wrap:nowrap;transition:all .2s ease;width:100%}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:active:not(:disabled):not(.selected){background-color:var(--c-primary-200);border-color:var(--c-primary-200);color:var(--c-primary-500);transform:scale(.98)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile{position:sticky;top:0;background-color:var(--c-neutral-50);padding:var(--size-12) 0;margin-bottom:var(--size-8);border-bottom:1px solid var(--c-neutral-200);z-index:1}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input{height:var(--size-40);font-size:var(--f-size-14);padding:var(--size-12) var(--size-40) var(--size-12) var(--size-16)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-icon{left:var(--size-12);font-size:var(--f-size-14)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear{right:var(--size-12);padding:var(--size-4)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-no-results--mobile{padding:var(--size-16) var(--size-12);font-size:var(--f-size-14);color:var(--c-neutral-600)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TcRevIconButtonDirective, selector: "button[tcRevIconButton]", inputs: ["color", "size", "tcRevIconButton"] }] }); }
|
|
9052
9276
|
}
|
|
9053
9277
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TCloudUiDropdownComponent, decorators: [{
|
|
9054
9278
|
type: Component,
|
|
@@ -9056,8 +9280,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
9056
9280
|
CommonModule,
|
|
9057
9281
|
FormsModule,
|
|
9058
9282
|
ReactiveFormsModule,
|
|
9059
|
-
|
|
9060
|
-
], providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], template: "<div\n class=\"tcloud-ui-dropdown\"\n [class.disabled]=\"isDisabled()\"\n [style.width]=\"this.width()\"\n>\n <button\n class=\"tcloud-ui-dropdown-toggle\"\n [class.tcloud-ui-dropdown-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tcloud-ui-dropdown-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tcloud-ui-dropdown-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"isDisabled()\"\n [disabled]=\"isDisabled()\"\n >\n @if (label()) {\n <b [innerHTML]=\"label()\"></b>\n }\n <span class=\"tcloud-ui-dropdown-selected-text\">\n {{ selectedOption() ? selectedOption()?.displayValue : \"Selecione\" }}\n </span>\n <i class=\"fa-light fa-chevron-down mar-l-a\"></i>\n </button>\n <ul *ngIf=\"isOpen && isDesktop()\" class=\"tcloud-ui-dropdown-menu\">\n <!-- Campo de busca -->\n @if (searchable()) {\n <li class=\"tcloud-ui-dropdown-search\">\n <div class=\"tcloud-ui-dropdown-search-container\">\n <input\n type=\"text\"\n class=\"tcloud-ui-dropdown-search-input\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <i class=\"fa-light fa-magnifying-glass tcloud-ui-dropdown-search-icon\"></i>\n @if (searchText()) {\n <button\n type=\"button\"\n class=\"tcloud-ui-dropdown-search-clear\"\n (click)=\"clearSearch(); $event.stopPropagation()\"\n >\n <i class=\"fa-light fa-times\"></i>\n </button>\n }\n </div>\n </li>\n }\n @for (option of filteredOptions(); track option?.value) {\n <li class=\"tcloud-ui-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tcloud-ui-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n <span\n class=\"tcloud-ui-dropdown-option-text\"\n position=\"top\"\n >\n {{ option?.displayValue }}\n </span>\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n </button>\n </li>\n }\n <!-- Mensagem quando nenhum item for encontrado na busca -->\n @if (searchable() && searchText() && filteredOptions().length === 0) {\n <li class=\"tcloud-ui-dropdown-no-results\">\n <span>Nenhuma op\u00E7\u00E3o encontrada</span>\n </li>\n }\n </ul>\n\n <!-- Dropdown full screen -->\n <ng-template #menuTemplate>\n <div class=\"tcloud-ui-dropdown-menu tcloud-ui-dropdown-menu--device\">\n <div class=\"tcloud-ui-dropdown-menu-section\">\n <div class=\"tcloud-ui-dropdown-menu-header pad-b-24\">\n <h3 class=\"mar-none f-h2 f-weight-600 c-neutral-600\">\n {{ label() }}\n </h3>\n <button\n tcloudUiIconButton=\"outline\"\n color=\"dark\"\n size=\"sm\"\n (click)=\"_deviceService.closeDropdownDevice()\"\n >\n <i class=\"fa-light fa-times f-size-16\"></i>\n </button>\n </div>\n <ul class=\"tcloud-ui-dropdown-menu-container mar-t-8\">\n <!-- Campo de busca mobile -->\n @if (searchable()) {\n <li class=\"tcloud-ui-dropdown-search tcloud-ui-dropdown-search--mobile\">\n <div class=\"tcloud-ui-dropdown-search-container\">\n <input\n type=\"text\"\n class=\"tcloud-ui-dropdown-search-input\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <i class=\"fa-light fa-magnifying-glass tcloud-ui-dropdown-search-icon\"></i>\n @if (searchText()) {\n <button\n type=\"button\"\n class=\"tcloud-ui-dropdown-search-clear\"\n (click)=\"clearSearch(); $event.stopPropagation()\"\n >\n <i class=\"fa-light fa-times\"></i>\n </button>\n }\n </div>\n </li>\n }\n @for (option of filteredOptions(); track option?.value) {\n <li class=\"tcloud-ui-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tcloud-ui-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check f-size-16\"></i>\n }\n </button>\n </li>\n }\n <!-- Mensagem quando nenhum item for encontrado na busca mobile -->\n @if (searchable() && searchText() && filteredOptions().length === 0) {\n <li class=\"tcloud-ui-dropdown-no-results tcloud-ui-dropdown-no-results--mobile\">\n <span>Nenhuma op\u00E7\u00E3o encontrada</span>\n </li>\n }\n </ul>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [".tcloud-ui-dropdown{position:relative;display:block;width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle{align-items:center;background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-4);line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle .tcloud-ui-dropdown-selected-text{flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--sm{height:var(--size-40)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--md{height:var(--size-44)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--lg{height:var(--size-48)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:hover,.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:focus{border-color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu{box-shadow:var(--shadow-md);border:1px solid var(--c-neutral-300);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);list-style:none;margin:0;max-height:15.625rem;overflow-y:auto;padding:0;width:100%;z-index:1000}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn .tcloud-ui-dropdown-option-text{flex:1;overflow:hidden;text-align:left;white-space:nowrap}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn .tcloud-ui-dropdown-option-text.ellipsed{text-overflow:ellipsis}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search{position:sticky;top:0;background-color:var(--c-neutral-50);padding:var(--size-8);border-bottom:1px solid var(--c-neutral-200);z-index:1}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container{position:relative;display:flex;align-items:center}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input{width:100%;height:var(--size-32);padding:var(--size-8) var(--size-32) var(--size-8) var(--size-12);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-4);font-size:var(--f-size-12);line-height:var(--l-height-16);color:var(--c-neutral-700);background-color:var(--c-neutral-50);outline:none;transition:border-color .2s ease}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input:focus{border-color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input::placeholder{color:var(--c-neutral-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-icon{position:absolute;left:var(--size-8);color:var(--c-neutral-500);font-size:var(--f-size-12);pointer-events:none}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear{position:absolute;right:var(--size-8);background:none;border:none;color:var(--c-neutral-500);cursor:pointer;padding:var(--size-2);display:flex;align-items:center;justify-content:center;transition:color .2s ease}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear:hover{color:var(--c-neutral-700)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-no-results{padding:var(--size-12) var(--size-8);text-align:center;color:var(--c-neutral-500);font-size:var(--f-size-12);font-style:italic}.tcloud-ui-dropdown-menu--device{height:100%;overflow-y:auto;background-color:var(--c-neutral-50);padding:var(--size-16)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-section{display:contents}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-header{align-items:center;display:flex;gap:var(--size-16);justify-content:space-between}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-container{list-style:none;margin:0;padding:0;gap:.5rem;display:flex;flex-direction:column}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-14);line-height:var(--l-height-16);height:var(--size-40);padding:var(--size-12);text-align:left;text-wrap:nowrap;transition:all .2s ease;width:100%}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:active:not(:disabled):not(.selected){background-color:var(--c-primary-200);border-color:var(--c-primary-200);color:var(--c-primary-500);transform:scale(.98)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile{position:sticky;top:0;background-color:var(--c-neutral-50);padding:var(--size-12) 0;margin-bottom:var(--size-8);border-bottom:1px solid var(--c-neutral-200);z-index:1}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input{height:var(--size-40);font-size:var(--f-size-14);padding:var(--size-12) var(--size-40) var(--size-12) var(--size-16)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-icon{left:var(--size-12);font-size:var(--f-size-14)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear{right:var(--size-12);padding:var(--size-4)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-no-results--mobile{padding:var(--size-16) var(--size-12);font-size:var(--f-size-14);color:var(--c-neutral-600)}\n"] }]
|
|
9283
|
+
TcRevTooltipDirective,
|
|
9284
|
+
TcRevIconButtonDirective
|
|
9285
|
+
], providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], template: "<div\n class=\"tcloud-ui-dropdown\"\n [class.disabled]=\"isDisabled()\"\n [style.width]=\"this.width()\"\n>\n <button\n class=\"tcloud-ui-dropdown-toggle\"\n [class.tcloud-ui-dropdown-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tcloud-ui-dropdown-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tcloud-ui-dropdown-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"isDisabled()\"\n [disabled]=\"isDisabled()\"\n >\n @if (label()) {\n <b [innerHTML]=\"label()\"></b>\n }\n <span class=\"tcloud-ui-dropdown-selected-text\">\n {{ selectedOption() ? selectedOption()?.displayValue : \"Selecione\" }}\n </span>\n <i class=\"fa-light fa-chevron-down mar-l-a\"></i>\n </button>\n <ul *ngIf=\"isOpen && isDesktop()\" class=\"tcloud-ui-dropdown-menu\">\n <!-- Campo de busca -->\n @if (searchable()) {\n <li class=\"tcloud-ui-dropdown-search\">\n <div class=\"tcloud-ui-dropdown-search-container\">\n <input\n type=\"text\"\n class=\"tcloud-ui-dropdown-search-input\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <i class=\"fa-light fa-magnifying-glass tcloud-ui-dropdown-search-icon\"></i>\n @if (searchText()) {\n <button\n type=\"button\"\n class=\"tcloud-ui-dropdown-search-clear\"\n (click)=\"clearSearch(); $event.stopPropagation()\"\n >\n <i class=\"fa-light fa-times\"></i>\n </button>\n }\n </div>\n </li>\n }\n @for (option of filteredOptions(); track option?.value) {\n <li class=\"tcloud-ui-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tcloud-ui-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n <span\n class=\"tcloud-ui-dropdown-option-text\"\n position=\"top\"\n >\n {{ option?.displayValue }}\n </span>\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n </button>\n </li>\n }\n <!-- Mensagem quando nenhum item for encontrado na busca -->\n @if (searchable() && searchText() && filteredOptions().length === 0) {\n <li class=\"tcloud-ui-dropdown-no-results\">\n <span>Nenhuma op\u00E7\u00E3o encontrada</span>\n </li>\n }\n </ul>\n\n <!-- Dropdown full screen -->\n <ng-template #menuTemplate>\n <div class=\"tcloud-ui-dropdown-menu tcloud-ui-dropdown-menu--device\">\n <div class=\"tcloud-ui-dropdown-menu-section\">\n <div class=\"tcloud-ui-dropdown-menu-header pad-b-24\">\n <h3 class=\"mar-none f-h2 f-weight-600 c-neutral-600\">\n {{ label() }}\n </h3>\n <button\n tcRevIconButton=\"outline\"\n color=\"dark\"\n size=\"sm\"\n (click)=\"_deviceService.closeDropdownDevice()\"\n >\n <i class=\"fa-light fa-times f-size-16\"></i>\n </button>\n </div>\n <ul class=\"tcloud-ui-dropdown-menu-container mar-t-8\">\n <!-- Campo de busca mobile -->\n @if (searchable()) {\n <li class=\"tcloud-ui-dropdown-search tcloud-ui-dropdown-search--mobile\">\n <div class=\"tcloud-ui-dropdown-search-container\">\n <input\n type=\"text\"\n class=\"tcloud-ui-dropdown-search-input\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchText()\"\n (input)=\"onSearchChange($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <i class=\"fa-light fa-magnifying-glass tcloud-ui-dropdown-search-icon\"></i>\n @if (searchText()) {\n <button\n type=\"button\"\n class=\"tcloud-ui-dropdown-search-clear\"\n (click)=\"clearSearch(); $event.stopPropagation()\"\n >\n <i class=\"fa-light fa-times\"></i>\n </button>\n }\n </div>\n </li>\n }\n @for (option of filteredOptions(); track option?.value) {\n <li class=\"tcloud-ui-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tcloud-ui-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check f-size-16\"></i>\n }\n </button>\n </li>\n }\n <!-- Mensagem quando nenhum item for encontrado na busca mobile -->\n @if (searchable() && searchText() && filteredOptions().length === 0) {\n <li class=\"tcloud-ui-dropdown-no-results tcloud-ui-dropdown-no-results--mobile\">\n <span>Nenhuma op\u00E7\u00E3o encontrada</span>\n </li>\n }\n </ul>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [".tcloud-ui-dropdown{position:relative;display:block;width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle{align-items:center;background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-4);line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle .tcloud-ui-dropdown-selected-text{flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--sm{height:var(--size-40)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--md{height:var(--size-44)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle--lg{height:var(--size-48)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:hover,.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:focus{border-color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-toggle:disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu{box-shadow:var(--shadow-md);border:1px solid var(--c-neutral-300);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);list-style:none;margin:0;max-height:15.625rem;overflow-y:auto;padding:0;width:100%;z-index:1000}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn .tcloud-ui-dropdown-option-text{flex:1;overflow:hidden;text-align:left;white-space:nowrap}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn .tcloud-ui-dropdown-option-text.ellipsed{text-overflow:ellipsis}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search{position:sticky;top:0;background-color:var(--c-neutral-50);padding:var(--size-8);border-bottom:1px solid var(--c-neutral-200);z-index:1}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container{position:relative;display:flex;align-items:center}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input{width:100%;height:var(--size-32);padding:var(--size-8) var(--size-32) var(--size-8) var(--size-12);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-4);font-size:var(--f-size-12);line-height:var(--l-height-16);color:var(--c-neutral-700);background-color:var(--c-neutral-50);outline:none;transition:border-color .2s ease}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input:focus{border-color:var(--c-primary-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input::placeholder{color:var(--c-neutral-500)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-icon{position:absolute;left:var(--size-8);color:var(--c-neutral-500);font-size:var(--f-size-12);pointer-events:none}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear{position:absolute;right:var(--size-8);background:none;border:none;color:var(--c-neutral-500);cursor:pointer;padding:var(--size-2);display:flex;align-items:center;justify-content:center;transition:color .2s ease}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-search .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear:hover{color:var(--c-neutral-700)}.tcloud-ui-dropdown .tcloud-ui-dropdown-menu .tcloud-ui-dropdown-no-results{padding:var(--size-12) var(--size-8);text-align:center;color:var(--c-neutral-500);font-size:var(--f-size-12);font-style:italic}.tcloud-ui-dropdown-menu--device{height:100%;overflow-y:auto;background-color:var(--c-neutral-50);padding:var(--size-16)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-section{display:contents}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-header{align-items:center;display:flex;gap:var(--size-16);justify-content:space-between}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-container{list-style:none;margin:0;padding:0;gap:.5rem;display:flex;flex-direction:column}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-14);line-height:var(--l-height-16);height:var(--size-40);padding:var(--size-12);text-align:left;text-wrap:nowrap;transition:all .2s ease;width:100%}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:active:not(:disabled):not(.selected){background-color:var(--c-primary-200);border-color:var(--c-primary-200);color:var(--c-primary-500);transform:scale(.98)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-menu-item .tcloud-ui-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile{position:sticky;top:0;background-color:var(--c-neutral-50);padding:var(--size-12) 0;margin-bottom:var(--size-8);border-bottom:1px solid var(--c-neutral-200);z-index:1}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-input{height:var(--size-40);font-size:var(--f-size-14);padding:var(--size-12) var(--size-40) var(--size-12) var(--size-16)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-icon{left:var(--size-12);font-size:var(--f-size-14)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-search--mobile .tcloud-ui-dropdown-search-container .tcloud-ui-dropdown-search-clear{right:var(--size-12);padding:var(--size-4)}.tcloud-ui-dropdown-menu--device .tcloud-ui-dropdown-no-results--mobile{padding:var(--size-16) var(--size-12);font-size:var(--f-size-14);color:var(--c-neutral-600)}\n"] }]
|
|
9061
9286
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { menuTemplate: [{
|
|
9062
9287
|
type: ViewChild,
|
|
9063
9288
|
args: ['menuTemplate']
|
|
@@ -9066,12 +9291,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
9066
9291
|
args: ['document:click', ['$event']]
|
|
9067
9292
|
}] } });
|
|
9068
9293
|
|
|
9069
|
-
var DropdownMultiSize;
|
|
9294
|
+
var DropdownMultiSize$1;
|
|
9070
9295
|
(function (DropdownMultiSize) {
|
|
9071
9296
|
DropdownMultiSize["sm"] = "sm";
|
|
9072
9297
|
DropdownMultiSize["md"] = "md";
|
|
9073
9298
|
DropdownMultiSize["lg"] = "lg";
|
|
9074
|
-
})(DropdownMultiSize || (DropdownMultiSize = {}));
|
|
9299
|
+
})(DropdownMultiSize$1 || (DropdownMultiSize$1 = {}));
|
|
9075
9300
|
class TCloudUiDropdownMultiComponent {
|
|
9076
9301
|
onDocumentClick(event) {
|
|
9077
9302
|
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
@@ -9085,7 +9310,7 @@ class TCloudUiDropdownMultiComponent {
|
|
|
9085
9310
|
this.options = input.required(); // Lista de opções no novo formato
|
|
9086
9311
|
this.initialValues = input([]); // Valores pré-selecionados (deprecated - use values instead)
|
|
9087
9312
|
this.values = model([]); // Two-way binding para os valores selecionados
|
|
9088
|
-
this.size = input(DropdownMultiSize.sm);
|
|
9313
|
+
this.size = input(DropdownMultiSize$1.sm);
|
|
9089
9314
|
this.width = input(''); // Largura do dropdown
|
|
9090
9315
|
this.placeholder = input('Selecione'); // Placeholder quando nenhum item estiver selecionado
|
|
9091
9316
|
this.maxDisplayItems = input(2); // Máximo de itens a serem exibidos no botão
|
|
@@ -9094,7 +9319,7 @@ class TCloudUiDropdownMultiComponent {
|
|
|
9094
9319
|
this.optionsSelected = output(); // Emissor para os valores selecionados
|
|
9095
9320
|
this.selectedOptions = signal([]); // Opções selecionadas
|
|
9096
9321
|
this.isOpen = false; // Controla se o dropdown está aberto
|
|
9097
|
-
this.dropdownSize = DropdownMultiSize;
|
|
9322
|
+
this.dropdownSize = DropdownMultiSize$1;
|
|
9098
9323
|
this.searchText = signal(''); // Texto de busca
|
|
9099
9324
|
// Opções filtradas baseadas na busca
|
|
9100
9325
|
this.filteredOptions = computed(() => {
|
|
@@ -9321,7 +9546,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
9321
9546
|
class TCloudUiSkeletonLoadingComponentStyle {
|
|
9322
9547
|
}
|
|
9323
9548
|
|
|
9324
|
-
var TagColorsEnum;
|
|
9549
|
+
var TagColorsEnum$1;
|
|
9325
9550
|
(function (TagColorsEnum) {
|
|
9326
9551
|
TagColorsEnum["neutral-50"] = "neutral-50";
|
|
9327
9552
|
TagColorsEnum["neutral-100"] = "neutral-100";
|
|
@@ -9355,12 +9580,12 @@ var TagColorsEnum;
|
|
|
9355
9580
|
TagColorsEnum["success-300"] = "success-300";
|
|
9356
9581
|
TagColorsEnum["success-400"] = "success-400";
|
|
9357
9582
|
TagColorsEnum["success-500"] = "success-500";
|
|
9358
|
-
})(TagColorsEnum || (TagColorsEnum = {}));
|
|
9583
|
+
})(TagColorsEnum$1 || (TagColorsEnum$1 = {}));
|
|
9359
9584
|
|
|
9360
9585
|
class TCloudUiTagComponent {
|
|
9361
9586
|
constructor() {
|
|
9362
9587
|
this.size = input('md');
|
|
9363
|
-
this.color = input(TagColorsEnum['primary-500']);
|
|
9588
|
+
this.color = input(TagColorsEnum$1['primary-500']);
|
|
9364
9589
|
this.variant = input('filled');
|
|
9365
9590
|
this.shape = input('rectangle');
|
|
9366
9591
|
this.fullWidth = input(false);
|
|
@@ -9622,6 +9847,38 @@ var TCloudUiDialogEventsEnum;
|
|
|
9622
9847
|
TCloudUiDialogEventsEnum[TCloudUiDialogEventsEnum["close"] = 1] = "close";
|
|
9623
9848
|
})(TCloudUiDialogEventsEnum || (TCloudUiDialogEventsEnum = {}));
|
|
9624
9849
|
|
|
9850
|
+
class TcRevSmallLoadingComponent {
|
|
9851
|
+
constructor() {
|
|
9852
|
+
/** Width of the loading spinner accepts string with CSS units (px, rem, em) */
|
|
9853
|
+
this.width = input('1.25rem');
|
|
9854
|
+
/** Margin top in pixels */
|
|
9855
|
+
this.marginTop = input(0);
|
|
9856
|
+
/** Margin bottom in pixels */
|
|
9857
|
+
this.marginBottom = input(0);
|
|
9858
|
+
/** Margin right in pixels */
|
|
9859
|
+
this.marginRight = input(0);
|
|
9860
|
+
/** Margin left in pixels */
|
|
9861
|
+
this.marginLeft = input(0);
|
|
9862
|
+
this.style = new TcRevSmallLoadingComponentStyle();
|
|
9863
|
+
}
|
|
9864
|
+
ngOnInit() {
|
|
9865
|
+
this.style.marginTop = `${this.marginTop()}px`;
|
|
9866
|
+
this.style.marginRight = `${this.marginRight()}px`;
|
|
9867
|
+
this.style.marginLeft = `${this.marginLeft()}px`;
|
|
9868
|
+
this.style.marginBottom = `${this.marginBottom()}px`;
|
|
9869
|
+
this.style.width = this.width();
|
|
9870
|
+
this.style.height = this.width();
|
|
9871
|
+
}
|
|
9872
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSmallLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9873
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: TcRevSmallLoadingComponent, isStandalone: true, selector: "tc-rev-small-loading", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"tc-rev-small-loading\">\n <span\n class=\"tc-rev-small-loading__spinner\"\n [ngStyle]=\"this.style\">\n </span>\n</div>\n", styles: ["@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tc-rev-small-loading{display:flex;align-items:center;justify-content:center}.tc-rev-small-loading__spinner{animation:rotation 1s linear infinite;border:3px solid var(--c-neutral-200);border-bottom-color:var(--c-neutral-500);border-radius:50%;box-sizing:border-box;display:inline-block;height:var(--size-20);width:var(--size-20)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
9874
|
+
}
|
|
9875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSmallLoadingComponent, decorators: [{
|
|
9876
|
+
type: Component,
|
|
9877
|
+
args: [{ selector: 'tc-rev-small-loading', imports: [CommonModule], template: "<div class=\"tc-rev-small-loading\">\n <span\n class=\"tc-rev-small-loading__spinner\"\n [ngStyle]=\"this.style\">\n </span>\n</div>\n", styles: ["@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tc-rev-small-loading{display:flex;align-items:center;justify-content:center}.tc-rev-small-loading__spinner{animation:rotation 1s linear infinite;border:3px solid var(--c-neutral-200);border-bottom-color:var(--c-neutral-500);border-radius:50%;box-sizing:border-box;display:inline-block;height:var(--size-20);width:var(--size-20)}\n"] }]
|
|
9878
|
+
}] });
|
|
9879
|
+
class TcRevSmallLoadingComponentStyle {
|
|
9880
|
+
}
|
|
9881
|
+
|
|
9625
9882
|
class TCloudUiDialogComponent {
|
|
9626
9883
|
constructor() {
|
|
9627
9884
|
this.animation = 'visible';
|
|
@@ -9631,6 +9888,10 @@ class TCloudUiDialogComponent {
|
|
|
9631
9888
|
// * [Injects]
|
|
9632
9889
|
this.i18n = inject(I18nService);
|
|
9633
9890
|
}
|
|
9891
|
+
/** `true` quando o input de confirmação deve ser exibido/validado (flag + texto definidos). */
|
|
9892
|
+
get hasInputConfirmation() {
|
|
9893
|
+
return this.data?.showInputConfirmation !== false && !!this.data?.inputConfirmationText;
|
|
9894
|
+
}
|
|
9634
9895
|
onKeydownHandler(event) {
|
|
9635
9896
|
if (this.data?.disable || this.data?.loading)
|
|
9636
9897
|
return;
|
|
@@ -9645,7 +9906,7 @@ class TCloudUiDialogComponent {
|
|
|
9645
9906
|
* podem mudar por mutação no modelo após abrir o dialog.
|
|
9646
9907
|
*/
|
|
9647
9908
|
syncInputConfirmationDisabledState() {
|
|
9648
|
-
if (!this.
|
|
9909
|
+
if (!this.hasInputConfirmation)
|
|
9649
9910
|
return;
|
|
9650
9911
|
const shouldDisable = !!(this.data.disable || this.data.loading);
|
|
9651
9912
|
if (shouldDisable && this.inputConfirmationControl.enabled) {
|
|
@@ -9704,7 +9965,7 @@ class TCloudUiDialogComponent {
|
|
|
9704
9965
|
*/
|
|
9705
9966
|
confirm() {
|
|
9706
9967
|
if (!this.data.loading) {
|
|
9707
|
-
if (this.
|
|
9968
|
+
if (this.hasInputConfirmation) {
|
|
9708
9969
|
if (this.checkInputConfirmation()) {
|
|
9709
9970
|
this.confirmFunction(this);
|
|
9710
9971
|
}
|
|
@@ -9735,7 +9996,7 @@ class TCloudUiDialogComponent {
|
|
|
9735
9996
|
return this;
|
|
9736
9997
|
}
|
|
9737
9998
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TCloudUiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9738
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TCloudUiDialogComponent, isStandalone: true, selector: "tcloud-ui-dialog", host: { listeners: { "document:keydown.escape": "onKeydownHandler($event)" } }, ngImport: i0, template: "<div class=\"background-modal\" (click)=\"onBackdropClick()\"></div>\n\n@let disabled = data.disable || data.loading;\n<div class=\"container-dialog\" [@fade]=\"animation\">\n\n <!-- Header -->\n <div class=\"container-header\">\n\n <!-- Title -->\n <h4 class=\"tc-title tcloud-ui-modal-header tc-modal-header\">{{ data.title }}</h4>\n\n <!-- Close button -->\n <div class=\"container-close-button\" (click)=\" disabled ? null : close()\">\n <i class=\"fas fa-times\"></i>\n </div>\n </div>\n\n <!-- Message -->\n <div [innerHTML]=\"data.message\"></div>\n\n <!-- Input confirmation -->\n @if (
|
|
9999
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TCloudUiDialogComponent, isStandalone: true, selector: "tcloud-ui-dialog", host: { listeners: { "document:keydown.escape": "onKeydownHandler($event)" } }, ngImport: i0, template: "<div class=\"background-modal\" (click)=\"onBackdropClick()\"></div>\n\n@let disabled = data.disable || data.loading;\n<div class=\"container-dialog\" [@fade]=\"animation\">\n\n <!-- Header -->\n <div class=\"container-header\">\n\n <!-- Title -->\n <h4 class=\"tc-title tcloud-ui-modal-header tc-modal-header\">{{ data.title }}</h4>\n\n <!-- Close button -->\n <div class=\"container-close-button\" (click)=\" disabled ? null : close()\">\n <i class=\"fas fa-times\"></i>\n </div>\n </div>\n\n <!-- Message -->\n <div [innerHTML]=\"data.message\"></div>\n\n <!-- Input confirmation -->\n @if (hasInputConfirmation)\n {\n <div class=\"container-input-confirmation\">\n <input\n tcloudForm\n class=\"tc-form-confirm tc-form-control\"\n [formControl]=\"inputConfirmationControl\"\n [placeholder]=\"inputConfirmationErrorMessage()\"\n (keyup.enter)=\"confirm()\"\n />\n\n @if (inputConfirmationControl.touched && inputConfirmationControl.invalid)\n {\n <p class=\"text-danger\">{{ inputConfirmationErrorMessage() }}</p>\n }\n </div>\n }\n\n <!-- Loading -->\n @if (data.loading)\n {\n <tc-rev-small-loading />\n }\n\n <!-- Footer -->\n <div class=\"container-footer\">\n\n <!-- Cancelar -->\n <button\n class=\"tc-btn tc-btn-outline-primary\"\n [disabled]=\"disabled\"\n (click)=\"close()\">{{ data.buttonCancelText || ('dialogConfirmation.cancel' | i18nTranslate: 'Cancelar') }}\n </button>\n\n <!-- Confirmar -->\n <button\n class=\"tc-btn tc-btn-primary\"\n [disabled]=\"disabled\"\n (click)=\"confirm()\">{{ textConfirmation | titlecase }}\n </button>\n </div>\n</div>\n", styles: [".background-modal{position:fixed;z-index:3000;width:100%;height:100%;background-color:#00000080;top:0;left:0}.container-dialog{position:fixed;top:15%;left:calc(50% - 300px);width:500px;z-index:30001;border-radius:8px;padding:24px;box-sizing:border-box;display:grid;gap:24px;background-color:var(--c-neutral-50);color:var(--c-neutral-700)}.container-dialog .container-header{display:flex;justify-content:space-between;align-items:center}.container-dialog .container-header .tc-title{font-size:18px;font-weight:700}.container-dialog .container-header .container-close-button{width:40px;height:40px;border-radius:100%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;color:var(--c-neutral-600);border:1px solid var(--c-neutral-300)}.container-dialog .container-input-confirmation{display:grid;gap:8px}.container-dialog .container-footer{display:flex;justify-content:space-between;align-items:center;gap:16px}.container-dialog .container-footer button{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: I18nTranslatePipe, name: "i18nTranslate" }, { kind: "component", type: TcRevSmallLoadingComponent, selector: "tc-rev-small-loading", inputs: ["width", "marginTop", "marginBottom", "marginRight", "marginLeft"] }], animations: [
|
|
9739
10000
|
trigger('fade', [
|
|
9740
10001
|
state('visible', style({ opacity: 1 })),
|
|
9741
10002
|
state('hide', style({ opacity: 0, top: '-38%' })),
|
|
@@ -9759,7 +10020,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
9759
10020
|
]),
|
|
9760
10021
|
transition('visible => hide', animate('0.3s ease-out'))
|
|
9761
10022
|
])
|
|
9762
|
-
], standalone: true, imports: [CommonModule, ReactiveFormsModule, I18nTranslatePipe, TCloudUiLoadingComponent], template: "<div class=\"background-modal\" (click)=\"onBackdropClick()\"></div>\n\n@let disabled = data.disable || data.loading;\n<div class=\"container-dialog\" [@fade]=\"animation\">\n\n <!-- Header -->\n <div class=\"container-header\">\n\n <!-- Title -->\n <h4 class=\"tc-title tcloud-ui-modal-header tc-modal-header\">{{ data.title }}</h4>\n\n <!-- Close button -->\n <div class=\"container-close-button\" (click)=\" disabled ? null : close()\">\n <i class=\"fas fa-times\"></i>\n </div>\n </div>\n\n <!-- Message -->\n <div [innerHTML]=\"data.message\"></div>\n\n <!-- Input confirmation -->\n @if (
|
|
10023
|
+
], standalone: true, imports: [CommonModule, ReactiveFormsModule, I18nTranslatePipe, TCloudUiLoadingComponent, TcRevSmallLoadingComponent], template: "<div class=\"background-modal\" (click)=\"onBackdropClick()\"></div>\n\n@let disabled = data.disable || data.loading;\n<div class=\"container-dialog\" [@fade]=\"animation\">\n\n <!-- Header -->\n <div class=\"container-header\">\n\n <!-- Title -->\n <h4 class=\"tc-title tcloud-ui-modal-header tc-modal-header\">{{ data.title }}</h4>\n\n <!-- Close button -->\n <div class=\"container-close-button\" (click)=\" disabled ? null : close()\">\n <i class=\"fas fa-times\"></i>\n </div>\n </div>\n\n <!-- Message -->\n <div [innerHTML]=\"data.message\"></div>\n\n <!-- Input confirmation -->\n @if (hasInputConfirmation)\n {\n <div class=\"container-input-confirmation\">\n <input\n tcloudForm\n class=\"tc-form-confirm tc-form-control\"\n [formControl]=\"inputConfirmationControl\"\n [placeholder]=\"inputConfirmationErrorMessage()\"\n (keyup.enter)=\"confirm()\"\n />\n\n @if (inputConfirmationControl.touched && inputConfirmationControl.invalid)\n {\n <p class=\"text-danger\">{{ inputConfirmationErrorMessage() }}</p>\n }\n </div>\n }\n\n <!-- Loading -->\n @if (data.loading)\n {\n <tc-rev-small-loading />\n }\n\n <!-- Footer -->\n <div class=\"container-footer\">\n\n <!-- Cancelar -->\n <button\n class=\"tc-btn tc-btn-outline-primary\"\n [disabled]=\"disabled\"\n (click)=\"close()\">{{ data.buttonCancelText || ('dialogConfirmation.cancel' | i18nTranslate: 'Cancelar') }}\n </button>\n\n <!-- Confirmar -->\n <button\n class=\"tc-btn tc-btn-primary\"\n [disabled]=\"disabled\"\n (click)=\"confirm()\">{{ textConfirmation | titlecase }}\n </button>\n </div>\n</div>\n", styles: [".background-modal{position:fixed;z-index:3000;width:100%;height:100%;background-color:#00000080;top:0;left:0}.container-dialog{position:fixed;top:15%;left:calc(50% - 300px);width:500px;z-index:30001;border-radius:8px;padding:24px;box-sizing:border-box;display:grid;gap:24px;background-color:var(--c-neutral-50);color:var(--c-neutral-700)}.container-dialog .container-header{display:flex;justify-content:space-between;align-items:center}.container-dialog .container-header .tc-title{font-size:18px;font-weight:700}.container-dialog .container-header .container-close-button{width:40px;height:40px;border-radius:100%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;color:var(--c-neutral-600);border:1px solid var(--c-neutral-300)}.container-dialog .container-input-confirmation{display:grid;gap:8px}.container-dialog .container-footer{display:flex;justify-content:space-between;align-items:center;gap:16px}.container-dialog .container-footer button{width:100%}\n"] }]
|
|
9763
10024
|
}], propDecorators: { onKeydownHandler: [{
|
|
9764
10025
|
type: HostListener,
|
|
9765
10026
|
args: ['document:keydown.escape', ['$event']]
|
|
@@ -9773,7 +10034,7 @@ var TCloudUiDialogTextConfirmationEnum;
|
|
|
9773
10034
|
})(TCloudUiDialogTextConfirmationEnum || (TCloudUiDialogTextConfirmationEnum = {}));
|
|
9774
10035
|
|
|
9775
10036
|
class TCloudUiDialogModel {
|
|
9776
|
-
constructor(_title, _description, _loading = false, _disable = false, _disableClickOutside = false, _inputConfirmationText, _buttonConfirmText, _buttonCancelText) {
|
|
10037
|
+
constructor(_title, _description, _loading = false, _disable = false, _disableClickOutside = false, _inputConfirmationText, _buttonConfirmText, _buttonCancelText, _showInputConfirmation = true) {
|
|
9777
10038
|
this.title = _title;
|
|
9778
10039
|
this.message = _description;
|
|
9779
10040
|
this.loading = _loading;
|
|
@@ -9782,6 +10043,7 @@ class TCloudUiDialogModel {
|
|
|
9782
10043
|
this.inputConfirmationText = _inputConfirmationText;
|
|
9783
10044
|
this.buttonConfirmText = _buttonConfirmText;
|
|
9784
10045
|
this.buttonCancelText = _buttonCancelText;
|
|
10046
|
+
this.showInputConfirmation = _showInputConfirmation;
|
|
9785
10047
|
}
|
|
9786
10048
|
}
|
|
9787
10049
|
|
|
@@ -9800,7 +10062,7 @@ class TCloudUiDialogService {
|
|
|
9800
10062
|
}
|
|
9801
10063
|
open(_data = {}) {
|
|
9802
10064
|
const componentRef = this.createDialogComponent();
|
|
9803
|
-
componentRef.instance.data = new TCloudUiDialogModel(_data.title || this.i18n.i18nTranslate('dialogConfirmation.default_title', 'Atenção'), _data.message || this.i18n.i18nTranslate('dialogConfirmation.default_message', 'Deseja realmente executar esta ação?'), _data.loading, _data.disable, _data.disableClickOutside, _data.inputConfirmationText || TCloudUiDialogTextConfirmationEnum.confirm, _data.buttonConfirmText, _data.buttonCancelText);
|
|
10065
|
+
componentRef.instance.data = new TCloudUiDialogModel(_data.title || this.i18n.i18nTranslate('dialogConfirmation.default_title', 'Atenção'), _data.message || this.i18n.i18nTranslate('dialogConfirmation.default_message', 'Deseja realmente executar esta ação?'), _data.loading, _data.disable, _data.disableClickOutside, _data.inputConfirmationText || TCloudUiDialogTextConfirmationEnum.confirm, _data.buttonConfirmText, _data.buttonCancelText, _data.showInputConfirmation ?? true);
|
|
9804
10066
|
if (componentRef.instance.data.inputConfirmationText)
|
|
9805
10067
|
this.setTextConfirmation(componentRef.instance);
|
|
9806
10068
|
componentRef.instance.events.subscribe(event => {
|
|
@@ -10485,12 +10747,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
10485
10747
|
args: [{ selector: 'tcloud-ui-dropdown-sub-menu', imports: [CommonModule], template: "<ul\n class=\"sub-menu\"\n [ngClass]=\"this.position()\"\n [style.top.px]=\"this.parentOffsetTop()\">\n @for (item of this.items(); track item.value)\n {\n <li\n class=\"sub-menu-item\"\n [class.selected]=\"this.selectedOption()?.value === item.value\"\n (click)=\"this.onOptionSelected.emit(item)\">\n {{ item.displayValue }}\n @if (this.selectedOption()?.value === item?.value)\n {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n @if (item.children?.length)\n {\n <tcloud-ui-dropdown-sub-menu\n [items]=\"item.children\"\n [position]=\"position()\"\n [parentOffsetTop]=\"0\"\n [selectedOption]=\"this.selectedOption()\">\n </tcloud-ui-dropdown-sub-menu>\n }\n </li>\n }\n</ul>\n", styles: [".sub-menu{position:absolute;min-width:160px;background:#fff;box-shadow:var(--shadow-md);z-index:1001;padding:0;margin:0;list-style:none}.sub-menu.right{left:100%}.sub-menu.left{right:100%}.sub-menu-item{padding:8px 16px;white-space:nowrap;position:relative;align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.sub-menu-item:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.sub-menu-item.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.sub-menu-item:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"] }]
|
|
10486
10748
|
}] });
|
|
10487
10749
|
|
|
10488
|
-
var MultiLevelDropdownSize;
|
|
10750
|
+
var MultiLevelDropdownSize$1;
|
|
10489
10751
|
(function (MultiLevelDropdownSize) {
|
|
10490
10752
|
MultiLevelDropdownSize["sm"] = "sm";
|
|
10491
10753
|
MultiLevelDropdownSize["md"] = "md";
|
|
10492
10754
|
MultiLevelDropdownSize["lg"] = "lg";
|
|
10493
|
-
})(MultiLevelDropdownSize || (MultiLevelDropdownSize = {}));
|
|
10755
|
+
})(MultiLevelDropdownSize$1 || (MultiLevelDropdownSize$1 = {}));
|
|
10494
10756
|
class TCloudUiDropdownMultiLevelComponent {
|
|
10495
10757
|
onDocumentClick(event) {
|
|
10496
10758
|
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
@@ -10499,11 +10761,11 @@ class TCloudUiDropdownMultiLevelComponent {
|
|
|
10499
10761
|
}
|
|
10500
10762
|
constructor(elementRef) {
|
|
10501
10763
|
this.elementRef = elementRef;
|
|
10502
|
-
this.dropdownSize = MultiLevelDropdownSize;
|
|
10764
|
+
this.dropdownSize = MultiLevelDropdownSize$1;
|
|
10503
10765
|
this.menu = input.required();
|
|
10504
10766
|
this.subMenuPosition = input('right');
|
|
10505
10767
|
this.disabled = input(false);
|
|
10506
|
-
this.size = input(MultiLevelDropdownSize.sm);
|
|
10768
|
+
this.size = input(MultiLevelDropdownSize$1.sm);
|
|
10507
10769
|
this.initialValue = input(null); // Valor pré-selecionado
|
|
10508
10770
|
this.optionSelected = output();
|
|
10509
10771
|
this.selectedOption = signal(null);
|
|
@@ -10619,93 +10881,1794 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
10619
10881
|
}]
|
|
10620
10882
|
}], ctorParameters: () => [] });
|
|
10621
10883
|
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
}
|
|
10676
|
-
}
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
}
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10884
|
+
class TcRevCalendarComponent {
|
|
10885
|
+
constructor() {
|
|
10886
|
+
this.appointments = []; // Updated to use the new type
|
|
10887
|
+
/** Active date format
|
|
10888
|
+
* @format YYYY-MM-DD
|
|
10889
|
+
* @example 2023-10-01
|
|
10890
|
+
*/
|
|
10891
|
+
this.activeDate = input();
|
|
10892
|
+
this.innerActiveDate = computed(() => {
|
|
10893
|
+
if (!this.activeDate())
|
|
10894
|
+
return '';
|
|
10895
|
+
const date = new Date(`${this.activeDate()} 00:00:00`);
|
|
10896
|
+
return date;
|
|
10897
|
+
});
|
|
10898
|
+
this.onSelectDate = output();
|
|
10899
|
+
this.currentDate = new Date();
|
|
10900
|
+
this.viewMode = 'days';
|
|
10901
|
+
this.yearOffset = 0; // Offset for year navigation
|
|
10902
|
+
}
|
|
10903
|
+
ngOnInit() {
|
|
10904
|
+
this.updateMonth();
|
|
10905
|
+
this.updateYear();
|
|
10906
|
+
this.updateDaysOfWeek();
|
|
10907
|
+
this.updateCalendarDays();
|
|
10908
|
+
this.updateCalendarMonths();
|
|
10909
|
+
this.updateCalendarYears();
|
|
10910
|
+
}
|
|
10911
|
+
// Methods to update fixed properties
|
|
10912
|
+
updateMonth() {
|
|
10913
|
+
this.month = this.currentDate.toLocaleString('default', { month: 'long' });
|
|
10914
|
+
}
|
|
10915
|
+
updateYear() {
|
|
10916
|
+
this.year = this.currentDate.getFullYear();
|
|
10917
|
+
}
|
|
10918
|
+
updateDaysOfWeek() {
|
|
10919
|
+
this.daysOfWeek = ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'];
|
|
10920
|
+
}
|
|
10921
|
+
updateCalendarDays() {
|
|
10922
|
+
const year = this.currentDate.getFullYear();
|
|
10923
|
+
const month = this.currentDate.getMonth();
|
|
10924
|
+
const firstDayOfMonth = new Date(year, month, 1);
|
|
10925
|
+
const lastDayOfMonth = new Date(year, month + 1, 0);
|
|
10926
|
+
const daysInLastMonth = firstDayOfMonth.getDay();
|
|
10927
|
+
const daysInCurrentMonth = lastDayOfMonth.getDate();
|
|
10928
|
+
const calendarDays = [];
|
|
10929
|
+
// Add last days of the previous month
|
|
10930
|
+
for (let i = daysInLastMonth - 1; i >= 0; i--) {
|
|
10931
|
+
const date = new Date(year, month, -i);
|
|
10932
|
+
calendarDays.push({ date, isCurrentMonth: false });
|
|
10933
|
+
}
|
|
10934
|
+
// Add all days of the current month
|
|
10935
|
+
for (let i = 1; i <= daysInCurrentMonth; i++) {
|
|
10936
|
+
const date = new Date(year, month, i);
|
|
10937
|
+
calendarDays.push({ date, isCurrentMonth: true });
|
|
10938
|
+
}
|
|
10939
|
+
// Add first days of the next month
|
|
10940
|
+
const remainingDays = 35 - calendarDays.length;
|
|
10941
|
+
for (let i = 1; i <= remainingDays; i++) {
|
|
10942
|
+
const date = new Date(year, month + 1, i);
|
|
10943
|
+
calendarDays.push({ date, isCurrentMonth: false });
|
|
10944
|
+
}
|
|
10945
|
+
this.calendarDays = calendarDays;
|
|
10946
|
+
console.log('calendarDays', this.calendarDays[16].date);
|
|
10947
|
+
}
|
|
10948
|
+
updateCalendarMonths() {
|
|
10949
|
+
this.calendarMonths = Array.from({ length: 12 }, (_, i) => new Date(this.year, i).toLocaleString('default', { month: 'long' }));
|
|
10950
|
+
}
|
|
10951
|
+
updateCalendarYears() {
|
|
10952
|
+
const startYear = this.year - 5 + this.yearOffset * 12;
|
|
10953
|
+
this.calendarYears = Array.from({ length: 12 }, (_, i) => startYear + i);
|
|
10954
|
+
}
|
|
10955
|
+
// Existing methods updated to call the update methods
|
|
10956
|
+
changeMonth(offset) {
|
|
10957
|
+
this.currentDate = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth() + offset, 1);
|
|
10958
|
+
this.updateMonth();
|
|
10959
|
+
this.updateYear();
|
|
10960
|
+
this.updateCalendarDays();
|
|
10961
|
+
}
|
|
10962
|
+
selectMonth(monthIndex) {
|
|
10963
|
+
this.currentDate = new Date(this.year, monthIndex, 1);
|
|
10964
|
+
this.viewMode = 'days';
|
|
10965
|
+
this.updateMonth();
|
|
10966
|
+
this.updateCalendarDays();
|
|
10967
|
+
}
|
|
10968
|
+
changeYearOffset(offset) {
|
|
10969
|
+
if (this.viewMode === 'months') {
|
|
10970
|
+
// Adjust the current date by adding or subtracting a year
|
|
10971
|
+
this.currentDate = new Date(this.currentDate.getFullYear() + offset, this.currentDate.getMonth(), 1);
|
|
10972
|
+
this.updateYear();
|
|
10973
|
+
this.updateCalendarMonths();
|
|
10974
|
+
}
|
|
10975
|
+
else if (this.viewMode === 'years') {
|
|
10976
|
+
// Adjust the year offset for the year view
|
|
10977
|
+
this.yearOffset += offset;
|
|
10978
|
+
this.updateCalendarYears();
|
|
10979
|
+
}
|
|
10980
|
+
}
|
|
10981
|
+
selectYear(year) {
|
|
10982
|
+
this.currentDate = new Date(year, this.currentDate.getMonth(), 1);
|
|
10983
|
+
this.viewMode = 'months';
|
|
10984
|
+
this.updateYear();
|
|
10985
|
+
this.updateCalendarMonths();
|
|
10986
|
+
}
|
|
10987
|
+
toggleViewMode(mode) {
|
|
10988
|
+
this.viewMode = mode;
|
|
10989
|
+
if (mode === 'years') {
|
|
10990
|
+
this.yearOffset = 0; // Reset year offset when entering year view
|
|
10991
|
+
this.updateCalendarYears();
|
|
10992
|
+
}
|
|
10993
|
+
}
|
|
10994
|
+
isAppointment(date) {
|
|
10995
|
+
const dateString = date.toISOString().split('T')[0];
|
|
10996
|
+
return this.appointments.find(appointment => appointment.appointmentDate === dateString);
|
|
10997
|
+
}
|
|
10998
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10999
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevCalendarComponent, isStandalone: true, selector: "tc-rev-calendar", inputs: { appointments: { classPropertyName: "appointments", publicName: "appointments", isSignal: false, isRequired: false, transformFunction: null }, activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectDate: "onSelectDate" }, ngImport: i0, template: "<div class=\"tc-rev-calendar\">\n <div class=\"calendar-header\">\n <button class=\"prev-btn mar-r-a\" (click)=\"changeMonth(-1)\" *ngIf=\"viewMode === 'days'\"><i class=\"fa-light fa-chevron-left\"></i></button>\n <button class=\"prev-btn mar-r-a\" (click)=\"changeYearOffset(-1)\" *ngIf=\"viewMode === 'months' || viewMode === 'years'\"><i class=\"fa-light fa-chevron-left\"></i></button>\n @if (viewMode === 'days')\n {\n <span class=\"calendar-title date\" (click)=\"toggleViewMode('months')\">{{ month }} - </span>\n <span class=\"calendar-title date\" (click)=\"toggleViewMode('years')\">{{ year }}</span>\n }\n @else if (viewMode === 'months')\n {\n <span class=\"calendar-title\">Selecione o m\u00EAs</span>\n }\n @else if (viewMode === 'years')\n {\n <span class=\"calendar-title\">Selecione o ano</span>\n } \n <button class=\"next-btn mar-l-a\" (click)=\"changeYearOffset(1)\" *ngIf=\"viewMode === 'months' || viewMode === 'years'\"><i class=\"fa-light fa-chevron-right\"></i></button>\n <button class=\"next-btn mar-l-a\" (click)=\"changeMonth(1)\" *ngIf=\"viewMode === 'days'\"><i class=\"fa-light fa-chevron-right\"></i></button>\n </div>\n\n <div class=\"calendar-grid\" *ngIf=\"viewMode === 'days'\">\n <div class=\"day-header\" *ngFor=\"let day of daysOfWeek\">{{ day }}</div>\n <button\n *ngFor=\"let day of calendarDays\"\n class=\"day\"\n [class.selected]=\"day.date.valueOf() === innerActiveDate().valueOf()\"\n [class.current-month]=\"day.isCurrentMonth\"\n [title]=\"isAppointment(day.date)?.description ? isAppointment(day.date)?.description : ''\"\n (click)=\"onSelectDate.emit(day.date)\"\n >\n <span\n *ngIf=\"isAppointment(day.date)\"\n class=\"appointment-dot\"\n [ngClass]=\"'appointment-'+ isAppointment(day.date)?.type\"\n ></span>\n {{ day.date.getDate() }}\n </button>\n </div>\n\n <div class=\"calendar-grid months\" *ngIf=\"viewMode === 'months'\">\n <div\n class=\"month\"\n *ngFor=\"let month of calendarMonths; let i = index\"\n (click)=\"selectMonth(i)\"\n >\n {{ month }}\n </div>\n </div>\n\n <div class=\"calendar-grid years\" *ngIf=\"viewMode === 'years'\">\n <div\n class=\"year\"\n *ngFor=\"let year of calendarYears\"\n (click)=\"selectYear(year)\"\n >\n {{ year }}\n </div>\n </div>\n</div>", styles: [":host{display:block}.tc-rev-calendar{background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-16);color:var(--c-neutral-700);font-family:var(--f-family);min-height:274px;min-width:16.125rem;padding:var(--size-16)}.tc-rev-calendar .calendar-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:var(--size-16)}.tc-rev-calendar .calendar-header .prev-btn,.tc-rev-calendar .calendar-header .next-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-500);border-radius:var(--bor-radius-rounded);cursor:pointer;display:flex;justify-content:center;font-size:var(--f-size-14);height:var(--size-32);width:var(--size-32)}.tc-rev-calendar .calendar-header .calendar-title{cursor:default;font-size:var(--f-size-14);line-height:var(--l-height-20)}.tc-rev-calendar .calendar-header .calendar-title.date{cursor:pointer;text-transform:capitalize}.tc-rev-calendar .calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);justify-items:center}.tc-rev-calendar .calendar-grid.months{grid-template-columns:repeat(3,1fr);row-gap:10px}.tc-rev-calendar .calendar-grid.years{grid-template-columns:repeat(4,1fr);row-gap:10px}.tc-rev-calendar .day-header{cursor:default;font-size:var(--f-size-12);font-weight:var(--f-weight-700);line-height:var(--l-height-16);text-align:center;align-content:center;height:var(--size-32);width:var(--size-32)}.tc-rev-calendar .day{align-content:center;border-radius:var(--bor-radius-rounded);background:transparent;border:none;padding:0;cursor:default;font-size:var(--f-size-12);line-height:var(--l-height-16);position:relative;height:var(--size-32);text-align:center;transition:.1s ease;width:var(--size-32)}.tc-rev-calendar .day:hover,.tc-rev-calendar .day:focus{background-color:var(--c-neutral-100);color:var(--c-primary-500)}.tc-rev-calendar .day:active,.tc-rev-calendar .day.selected{background-color:var(--c-primary-300);color:var(--c-primary-500)}.tc-rev-calendar .day .appointment-dot{width:6px;height:6px;border-radius:50%;position:absolute;top:5px;right:5px}.tc-rev-calendar .day .appointment-dot.appointment-info{background-color:var(--c-info-500)}.tc-rev-calendar .day .appointment-dot.appointment-alert{background-color:var(--c-alert-500)}.tc-rev-calendar .day .appointment-dot.appointment-danger{background-color:var(--c-danger-500)}.tc-rev-calendar .day .appointment-dot.appointment-success{background-color:var(--c-success-500)}.tc-rev-calendar .month,.tc-rev-calendar .year{align-content:center;border:none;border-radius:var(--bor-radius-4);cursor:pointer;height:var(--size-32);text-align:center;text-transform:capitalize;transition:.1s ease;width:100%}.tc-rev-calendar .month:hover,.tc-rev-calendar .month:focus,.tc-rev-calendar .year:hover,.tc-rev-calendar .year:focus{background-color:var(--c-neutral-100);color:var(--c-primary-500)}.tc-rev-calendar .month:active,.tc-rev-calendar .year:active{background-color:var(--c-primary-300);color:var(--c-primary-500)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
11000
|
+
}
|
|
11001
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCalendarComponent, decorators: [{
|
|
11002
|
+
type: Component,
|
|
11003
|
+
args: [{ selector: 'tc-rev-calendar', imports: [
|
|
11004
|
+
CommonModule,
|
|
11005
|
+
], template: "<div class=\"tc-rev-calendar\">\n <div class=\"calendar-header\">\n <button class=\"prev-btn mar-r-a\" (click)=\"changeMonth(-1)\" *ngIf=\"viewMode === 'days'\"><i class=\"fa-light fa-chevron-left\"></i></button>\n <button class=\"prev-btn mar-r-a\" (click)=\"changeYearOffset(-1)\" *ngIf=\"viewMode === 'months' || viewMode === 'years'\"><i class=\"fa-light fa-chevron-left\"></i></button>\n @if (viewMode === 'days')\n {\n <span class=\"calendar-title date\" (click)=\"toggleViewMode('months')\">{{ month }} - </span>\n <span class=\"calendar-title date\" (click)=\"toggleViewMode('years')\">{{ year }}</span>\n }\n @else if (viewMode === 'months')\n {\n <span class=\"calendar-title\">Selecione o m\u00EAs</span>\n }\n @else if (viewMode === 'years')\n {\n <span class=\"calendar-title\">Selecione o ano</span>\n } \n <button class=\"next-btn mar-l-a\" (click)=\"changeYearOffset(1)\" *ngIf=\"viewMode === 'months' || viewMode === 'years'\"><i class=\"fa-light fa-chevron-right\"></i></button>\n <button class=\"next-btn mar-l-a\" (click)=\"changeMonth(1)\" *ngIf=\"viewMode === 'days'\"><i class=\"fa-light fa-chevron-right\"></i></button>\n </div>\n\n <div class=\"calendar-grid\" *ngIf=\"viewMode === 'days'\">\n <div class=\"day-header\" *ngFor=\"let day of daysOfWeek\">{{ day }}</div>\n <button\n *ngFor=\"let day of calendarDays\"\n class=\"day\"\n [class.selected]=\"day.date.valueOf() === innerActiveDate().valueOf()\"\n [class.current-month]=\"day.isCurrentMonth\"\n [title]=\"isAppointment(day.date)?.description ? isAppointment(day.date)?.description : ''\"\n (click)=\"onSelectDate.emit(day.date)\"\n >\n <span\n *ngIf=\"isAppointment(day.date)\"\n class=\"appointment-dot\"\n [ngClass]=\"'appointment-'+ isAppointment(day.date)?.type\"\n ></span>\n {{ day.date.getDate() }}\n </button>\n </div>\n\n <div class=\"calendar-grid months\" *ngIf=\"viewMode === 'months'\">\n <div\n class=\"month\"\n *ngFor=\"let month of calendarMonths; let i = index\"\n (click)=\"selectMonth(i)\"\n >\n {{ month }}\n </div>\n </div>\n\n <div class=\"calendar-grid years\" *ngIf=\"viewMode === 'years'\">\n <div\n class=\"year\"\n *ngFor=\"let year of calendarYears\"\n (click)=\"selectYear(year)\"\n >\n {{ year }}\n </div>\n </div>\n</div>", styles: [":host{display:block}.tc-rev-calendar{background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-16);color:var(--c-neutral-700);font-family:var(--f-family);min-height:274px;min-width:16.125rem;padding:var(--size-16)}.tc-rev-calendar .calendar-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:var(--size-16)}.tc-rev-calendar .calendar-header .prev-btn,.tc-rev-calendar .calendar-header .next-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-500);border-radius:var(--bor-radius-rounded);cursor:pointer;display:flex;justify-content:center;font-size:var(--f-size-14);height:var(--size-32);width:var(--size-32)}.tc-rev-calendar .calendar-header .calendar-title{cursor:default;font-size:var(--f-size-14);line-height:var(--l-height-20)}.tc-rev-calendar .calendar-header .calendar-title.date{cursor:pointer;text-transform:capitalize}.tc-rev-calendar .calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);justify-items:center}.tc-rev-calendar .calendar-grid.months{grid-template-columns:repeat(3,1fr);row-gap:10px}.tc-rev-calendar .calendar-grid.years{grid-template-columns:repeat(4,1fr);row-gap:10px}.tc-rev-calendar .day-header{cursor:default;font-size:var(--f-size-12);font-weight:var(--f-weight-700);line-height:var(--l-height-16);text-align:center;align-content:center;height:var(--size-32);width:var(--size-32)}.tc-rev-calendar .day{align-content:center;border-radius:var(--bor-radius-rounded);background:transparent;border:none;padding:0;cursor:default;font-size:var(--f-size-12);line-height:var(--l-height-16);position:relative;height:var(--size-32);text-align:center;transition:.1s ease;width:var(--size-32)}.tc-rev-calendar .day:hover,.tc-rev-calendar .day:focus{background-color:var(--c-neutral-100);color:var(--c-primary-500)}.tc-rev-calendar .day:active,.tc-rev-calendar .day.selected{background-color:var(--c-primary-300);color:var(--c-primary-500)}.tc-rev-calendar .day .appointment-dot{width:6px;height:6px;border-radius:50%;position:absolute;top:5px;right:5px}.tc-rev-calendar .day .appointment-dot.appointment-info{background-color:var(--c-info-500)}.tc-rev-calendar .day .appointment-dot.appointment-alert{background-color:var(--c-alert-500)}.tc-rev-calendar .day .appointment-dot.appointment-danger{background-color:var(--c-danger-500)}.tc-rev-calendar .day .appointment-dot.appointment-success{background-color:var(--c-success-500)}.tc-rev-calendar .month,.tc-rev-calendar .year{align-content:center;border:none;border-radius:var(--bor-radius-4);cursor:pointer;height:var(--size-32);text-align:center;text-transform:capitalize;transition:.1s ease;width:100%}.tc-rev-calendar .month:hover,.tc-rev-calendar .month:focus,.tc-rev-calendar .year:hover,.tc-rev-calendar .year:focus{background-color:var(--c-neutral-100);color:var(--c-primary-500)}.tc-rev-calendar .month:active,.tc-rev-calendar .year:active{background-color:var(--c-primary-300);color:var(--c-primary-500)}\n"] }]
|
|
11006
|
+
}], propDecorators: { appointments: [{
|
|
11007
|
+
type: Input
|
|
11008
|
+
}] } });
|
|
11009
|
+
|
|
11010
|
+
class TcRevCardAccordionComponent {
|
|
11011
|
+
constructor() {
|
|
11012
|
+
this._viewPort = inject(TCloudUiDeviceUtilsService);
|
|
11013
|
+
this.toggle = output();
|
|
11014
|
+
this.title = input('');
|
|
11015
|
+
this.iconClass = input('fa-light fa-hard-drive');
|
|
11016
|
+
this.showMoreText = input('Exibir mais');
|
|
11017
|
+
this.showLessText = input('Exibir menos');
|
|
11018
|
+
this.badge = input(null);
|
|
11019
|
+
this.isOpen = model();
|
|
11020
|
+
this.isDesktop = this._viewPort.isDesktop;
|
|
11021
|
+
}
|
|
11022
|
+
toggleAccordion() {
|
|
11023
|
+
this.isOpen.update((current) => !current);
|
|
11024
|
+
this.toggle.emit(this.isOpen());
|
|
11025
|
+
}
|
|
11026
|
+
/**
|
|
11027
|
+
* APPLY FUNCTIONS RESPONSIVE < 500PX
|
|
11028
|
+
*/
|
|
11029
|
+
get accordionExtraClasses() {
|
|
11030
|
+
if (this.isDesktop()) {
|
|
11031
|
+
return ['pad-16'];
|
|
11032
|
+
}
|
|
11033
|
+
//Responsive Classes
|
|
11034
|
+
return ['pad-14'];
|
|
11035
|
+
}
|
|
11036
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCardAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11037
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevCardAccordionComponent, isStandalone: true, selector: "tc-rev-card-accordion", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, iconClass: { classPropertyName: "iconClass", publicName: "iconClass", isSignal: true, isRequired: false, transformFunction: null }, showMoreText: { classPropertyName: "showMoreText", publicName: "showMoreText", isSignal: true, isRequired: false, transformFunction: null }, showLessText: { classPropertyName: "showLessText", publicName: "showLessText", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle", isOpen: "isOpenChange" }, ngImport: i0, template: "<div class=\"tc-rev-card-accordion tc-rev-card bg-c-neutral-50 bor-xs bor-rad-16\"\n[ngClass]=\"accordionExtraClasses\"\n>\n <tc-rev-card-title [title]=\"title()\" [class]=\"isOpen() ? 'pad-b-16' : '' \">\n <i [class]=\"iconClass()\" icon></i>\n\n <div\n *ngIf=\"badge()\"\n class=\"f-size-12 f-weight-600 pad-x-4 pad-y-2 bor-xs bor-rad-xs\"\n [ngClass]=\"badge()?.class\"\n [class.mar-l-8]=\"isDesktop()\"\n >\n {{ badge()?.text }}\n </div>\n\n @if(isDesktop()){\n <button tcRevButton=\"outline\" color=\"dark\" size=\"sm\" class=\"mar-l-a\" (click)=\"toggleAccordion()\">\n {{ isOpen() ? showLessText() : showMoreText() }}\n <i class=\"fa-light\" [ngClass]=\"isOpen() ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n }\n\n @if(!isDesktop()){\n <button tcRevButton=\"link\" color=\"dark\" size=\"md\" (click)=\"toggleAccordion()\" class=\"tc-rev-card-accordion__arrow-mobile mar-l-a\">\n <i class=\"fa-light\" [ngClass]=\"isOpen() ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n }\n\n </tc-rev-card-title>\n <ng-content *ngIf=\"isOpen()\"></ng-content>\n</div>\n", styles: [":host{display:block}.tc-rev-card-accordion{border-color:var(--c-neutral-400)}@media (max-width: 480px){.tc-rev-card-accordion__arrow-mobile{font-size:var(--f-size-16);padding:0 var(--size-6)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TcRevCardTitleComponent, selector: "tc-rev-card-title", inputs: ["title"] }, { kind: "directive", type: TcRevButtonDirective, selector: "button[tcRevButton]", inputs: ["color", "size", "fullWidth", "tcRevButton"] }] }); }
|
|
11038
|
+
}
|
|
11039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCardAccordionComponent, decorators: [{
|
|
11040
|
+
type: Component,
|
|
11041
|
+
args: [{ selector: 'tc-rev-card-accordion', imports: [CommonModule, TcRevCardTitleComponent, TcRevButtonDirective], template: "<div class=\"tc-rev-card-accordion tc-rev-card bg-c-neutral-50 bor-xs bor-rad-16\"\n[ngClass]=\"accordionExtraClasses\"\n>\n <tc-rev-card-title [title]=\"title()\" [class]=\"isOpen() ? 'pad-b-16' : '' \">\n <i [class]=\"iconClass()\" icon></i>\n\n <div\n *ngIf=\"badge()\"\n class=\"f-size-12 f-weight-600 pad-x-4 pad-y-2 bor-xs bor-rad-xs\"\n [ngClass]=\"badge()?.class\"\n [class.mar-l-8]=\"isDesktop()\"\n >\n {{ badge()?.text }}\n </div>\n\n @if(isDesktop()){\n <button tcRevButton=\"outline\" color=\"dark\" size=\"sm\" class=\"mar-l-a\" (click)=\"toggleAccordion()\">\n {{ isOpen() ? showLessText() : showMoreText() }}\n <i class=\"fa-light\" [ngClass]=\"isOpen() ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n }\n\n @if(!isDesktop()){\n <button tcRevButton=\"link\" color=\"dark\" size=\"md\" (click)=\"toggleAccordion()\" class=\"tc-rev-card-accordion__arrow-mobile mar-l-a\">\n <i class=\"fa-light\" [ngClass]=\"isOpen() ? 'fa-chevron-up' : 'fa-chevron-down'\"></i>\n </button>\n }\n\n </tc-rev-card-title>\n <ng-content *ngIf=\"isOpen()\"></ng-content>\n</div>\n", styles: [":host{display:block}.tc-rev-card-accordion{border-color:var(--c-neutral-400)}@media (max-width: 480px){.tc-rev-card-accordion__arrow-mobile{font-size:var(--f-size-16);padding:0 var(--size-6)}}\n"] }]
|
|
11042
|
+
}] });
|
|
11043
|
+
|
|
11044
|
+
class TcRevCardComponent {
|
|
11045
|
+
constructor() {
|
|
11046
|
+
this._viewPort = inject(TCloudUiDeviceUtilsService);
|
|
11047
|
+
this.isDesktop = this._viewPort.isDesktop;
|
|
11048
|
+
}
|
|
11049
|
+
/**
|
|
11050
|
+
* APPLY FUNCTIONS RESPONSIVE < 480PX
|
|
11051
|
+
*/
|
|
11052
|
+
get extraClasses() {
|
|
11053
|
+
if (this.isDesktop()) {
|
|
11054
|
+
return ['shadow-md', 'pad-16'];
|
|
11055
|
+
}
|
|
11056
|
+
//Responsive Classes
|
|
11057
|
+
return ['shadow-sm', 'pad-14'];
|
|
11058
|
+
}
|
|
11059
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11060
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TcRevCardComponent, isStandalone: true, selector: "tc-rev-card", ngImport: i0, template: "<div class=\"tc-rev-card bg-c-neutral-50 bor-rad-16\"\n[ngClass]=\"extraClasses\"\n>\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
11061
|
+
}
|
|
11062
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCardComponent, decorators: [{
|
|
11063
|
+
type: Component,
|
|
11064
|
+
args: [{ selector: 'tc-rev-card', imports: [CommonModule], template: "<div class=\"tc-rev-card bg-c-neutral-50 bor-rad-16\"\n[ngClass]=\"extraClasses\"\n>\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}\n"] }]
|
|
11065
|
+
}] });
|
|
11066
|
+
|
|
11067
|
+
class TcRevCheckboxDirective {
|
|
11068
|
+
constructor() { }
|
|
11069
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCheckboxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11070
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: TcRevCheckboxDirective, isStandalone: true, selector: "input[type=\"checkbox\"][tcRevCheckbox]", host: { classAttribute: "tc-rev-checkbox" }, ngImport: i0 }); }
|
|
11071
|
+
}
|
|
11072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevCheckboxDirective, decorators: [{
|
|
11073
|
+
type: Directive,
|
|
11074
|
+
args: [{
|
|
11075
|
+
selector: 'input[type="checkbox"][tcRevCheckbox]',
|
|
11076
|
+
host: {
|
|
11077
|
+
class: 'tc-rev-checkbox'
|
|
11078
|
+
}
|
|
11079
|
+
}]
|
|
11080
|
+
}], ctorParameters: () => [] });
|
|
11081
|
+
|
|
11082
|
+
var DropdownSize;
|
|
11083
|
+
(function (DropdownSize) {
|
|
11084
|
+
DropdownSize["sm"] = "sm";
|
|
11085
|
+
DropdownSize["md"] = "md";
|
|
11086
|
+
DropdownSize["lg"] = "lg";
|
|
11087
|
+
})(DropdownSize || (DropdownSize = {}));
|
|
11088
|
+
class TcRevDropdownComponent {
|
|
11089
|
+
onDocumentClick(event) {
|
|
11090
|
+
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
11091
|
+
this.isOpen = false;
|
|
11092
|
+
}
|
|
11093
|
+
}
|
|
11094
|
+
constructor(elementRef) {
|
|
11095
|
+
this.elementRef = elementRef;
|
|
11096
|
+
this._deviceService = inject(TCloudUiDeviceUtilsService);
|
|
11097
|
+
this.label = input(''); // Label que será exibida
|
|
11098
|
+
this.disabled = input(false); // Desabilita o dropdown
|
|
11099
|
+
this.options = input.required(); // Lista de opções no novo formato
|
|
11100
|
+
this.initialValue = input(null); // Valor pré-selecionado (deprecated - use value instead)
|
|
11101
|
+
this.value = model(null); // Two-way binding para o valor selecionado
|
|
11102
|
+
this.size = input(DropdownSize.sm);
|
|
11103
|
+
this.width = input(''); // Largura específica do dropdown (ex: '300px', '50%'). Se não informado, ocupa 100% do pai
|
|
11104
|
+
this.optionSelected = output(); // Emissor para o valor selecionado
|
|
11105
|
+
this.selectedOption = signal(null); // Opção selecionada
|
|
11106
|
+
this.isOpen = false; // Controla se o dropdown está aberto
|
|
11107
|
+
this.dropdownSize = DropdownSize;
|
|
11108
|
+
this.isDesktop = this._deviceService.isDesktop;
|
|
11109
|
+
this.isMobile = this._deviceService.isMobile;
|
|
11110
|
+
}
|
|
11111
|
+
ngOnChanges(_simpleChanges) {
|
|
11112
|
+
// Atualiza a opção selecionada quando o valor pré-selecionado muda
|
|
11113
|
+
if (_simpleChanges['initialValue'] ||
|
|
11114
|
+
_simpleChanges['options'] ||
|
|
11115
|
+
_simpleChanges['value']) {
|
|
11116
|
+
const valueToUse = this.value() || this.initialValue();
|
|
11117
|
+
this.selectedOption.set(this.options().find((option) => option.value === valueToUse) || null);
|
|
11118
|
+
}
|
|
11119
|
+
}
|
|
11120
|
+
ngOnInit() {
|
|
11121
|
+
// Prioriza o valor do model, mas mantém compatibilidade com initialValue
|
|
11122
|
+
const valueToUse = this.value() || this.initialValue();
|
|
11123
|
+
const foundOption = this.options().find((option) => option.value === valueToUse) || null;
|
|
11124
|
+
this.selectedOption.set(foundOption);
|
|
11125
|
+
// Se não havia valor no model mas havia initialValue, sincroniza o model
|
|
11126
|
+
if (!this.value() && this.initialValue() && foundOption) {
|
|
11127
|
+
this.value.set(foundOption.value);
|
|
11128
|
+
}
|
|
11129
|
+
// Escuta mudanças no model e atualiza a opção selecionada
|
|
11130
|
+
this.value.subscribe((newValue) => {
|
|
11131
|
+
const option = this.options().find((opt) => opt.value === newValue) || null;
|
|
11132
|
+
if (this.selectedOption() !== option) {
|
|
11133
|
+
this.selectedOption.set(option);
|
|
11134
|
+
}
|
|
11135
|
+
});
|
|
11136
|
+
}
|
|
11137
|
+
toggleDropdown() {
|
|
11138
|
+
// Abertura do dropdown para mobile
|
|
11139
|
+
if (this.isMobile()) {
|
|
11140
|
+
this._deviceService.openDropdownDevice(this.menuTemplate);
|
|
11141
|
+
return;
|
|
11142
|
+
}
|
|
11143
|
+
this.isOpen = !this.isOpen;
|
|
11144
|
+
}
|
|
11145
|
+
selectOption(option) {
|
|
11146
|
+
this.selectedOption.set(option);
|
|
11147
|
+
this.value.set(option.value); // Atualiza o model com two-way binding
|
|
11148
|
+
this.optionSelected.emit(option); // Emite a opção selecionada para compatibilidade
|
|
11149
|
+
// Fechamento dd dropdown para mobile
|
|
11150
|
+
if (this.isMobile()) {
|
|
11151
|
+
this._deviceService.closeDropdownDevice();
|
|
11152
|
+
return;
|
|
11153
|
+
}
|
|
11154
|
+
this.isOpen = false; // Fecha o dropdown
|
|
11155
|
+
}
|
|
11156
|
+
/**
|
|
11157
|
+
* Verifica se o texto de uma opção na lista está elipsado
|
|
11158
|
+
* @param text - Texto a ser verificado
|
|
11159
|
+
* @returns true se o texto estiver elipsado
|
|
11160
|
+
*/
|
|
11161
|
+
isOptionEllipsed(text) {
|
|
11162
|
+
if (!text)
|
|
11163
|
+
return false;
|
|
11164
|
+
// Calcula a largura disponível para o texto nas opções da lista
|
|
11165
|
+
const menuElement = this.elementRef.nativeElement.querySelector('.tc-rev-dropdown-menu');
|
|
11166
|
+
if (!menuElement) {
|
|
11167
|
+
// Se o menu não está aberto, usa a largura do dropdown
|
|
11168
|
+
const dropdownElement = this.elementRef.nativeElement.querySelector('.tc-rev-dropdown');
|
|
11169
|
+
if (!dropdownElement)
|
|
11170
|
+
return false;
|
|
11171
|
+
const dropdownWidth = dropdownElement.clientWidth;
|
|
11172
|
+
const padding = 16; // 8px de cada lado do botão
|
|
11173
|
+
const iconSpace = 24; // Espaço do ícone de check quando selecionado
|
|
11174
|
+
const availableWidth = Math.max(50, dropdownWidth - padding - iconSpace);
|
|
11175
|
+
return isTextEllipsed(text, availableWidth);
|
|
11176
|
+
}
|
|
11177
|
+
// Largura do menu menos padding do item (16px total) e espaço do ícone de check (24px)
|
|
11178
|
+
const menuWidth = menuElement.clientWidth;
|
|
11179
|
+
const padding = 16; // 8px de cada lado do botão do item
|
|
11180
|
+
const iconSpace = 24; // Espaço do ícone de check quando selecionado
|
|
11181
|
+
const availableWidth = Math.max(50, menuWidth - padding - iconSpace);
|
|
11182
|
+
return isTextEllipsed(text, availableWidth);
|
|
11183
|
+
}
|
|
11184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11185
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevDropdownComponent, isStandalone: true, selector: "tc-rev-dropdown", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", optionSelected: "optionSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "menuTemplate", first: true, predicate: ["menuTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"tc-rev-dropdown\"\n [class.disabled]=\"disabled()\"\n [style.width]=\"this.width()\"\n>\n <button\n class=\"tc-rev-dropdown-toggle\"\n [class.tc-rev-dropdown-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tc-rev-dropdown-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tc-rev-dropdown-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n >\n @if (label()) {\n <b>{{ label() }}</b>\n }\n <span class=\"tc-rev-dropdown-selected-text\">\n {{ selectedOption() ? selectedOption()?.displayValue : \"Selecione\" }}\n </span>\n <i class=\"fa-light fa-chevron-down mar-l-a\"></i>\n </button>\n <ul *ngIf=\"isOpen && isDesktop()\" class=\"tc-rev-dropdown-menu\">\n @for (option of options(); track option?.value) {\n <li class=\"tc-rev-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tc-rev-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n <span\n class=\"tc-rev-dropdown-option-text\"\n [class.ellipsed]=\"isOptionEllipsed(option.displayValue)\"\n [tcRevTooltip]=\"\n isOptionEllipsed(option.displayValue) ? option.displayValue : ''\n \"\n position=\"top\"\n >\n {{ option?.displayValue }}\n </span>\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n </button>\n </li>\n }\n </ul>\n\n <!-- Dropdown full screen -->\n <ng-template #menuTemplate>\n <div class=\"tc-rev-dropdown-menu tc-rev-dropdown-menu--device\">\n <div class=\"tc-rev-dropdown-menu-section\">\n <div class=\"tc-rev-dropdown-menu-header pad-b-24\">\n <h3 class=\"mar-none f-h2 f-weight-600 c-neutral-600\">\n {{ label() }}\n </h3>\n <button\n tcRevIconButton=\"outline\"\n color=\"dark\"\n size=\"sm\"\n (click)=\"_deviceService.closeDropdownDevice()\"\n >\n <i class=\"fa-light fa-times f-size-16\"></i>\n </button>\n </div>\n <ul class=\"tc-rev-dropdown-menu-container mar-t-8\">\n @for (option of options(); track option?.value) {\n <li class=\"tc-rev-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tc-rev-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check f-size-16\"></i>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [".tc-rev-dropdown{position:relative;display:block;width:100%}.tc-rev-dropdown .tc-rev-dropdown-toggle{align-items:center;background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-4);line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);width:100%}.tc-rev-dropdown .tc-rev-dropdown-toggle .tc-rev-dropdown-selected-text{flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.tc-rev-dropdown .tc-rev-dropdown-toggle--sm{height:var(--size-40)}.tc-rev-dropdown .tc-rev-dropdown-toggle--md{height:var(--size-44)}.tc-rev-dropdown .tc-rev-dropdown-toggle--lg{height:var(--size-48)}.tc-rev-dropdown .tc-rev-dropdown-toggle:hover,.tc-rev-dropdown .tc-rev-dropdown-toggle:focus{border-color:var(--c-primary-500)}.tc-rev-dropdown .tc-rev-dropdown-toggle:disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tc-rev-dropdown .tc-rev-dropdown-menu{box-shadow:var(--shadow-md);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);list-style:none;margin:0;max-height:15.625rem;overflow-y:auto;padding:0;width:100%;z-index:1000}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn .tc-rev-dropdown-option-text{flex:1;overflow:hidden;text-align:left;white-space:nowrap}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn .tc-rev-dropdown-option-text.ellipsed{text-overflow:ellipsis}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tc-rev-dropdown-menu--device{height:100%;overflow-y:auto;background-color:var(--c-neutral-50);padding:var(--size-16)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-section{display:contents}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-header{align-items:center;display:flex;gap:var(--size-16);justify-content:space-between}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container{list-style:none;margin:0;padding:0;gap:.5rem;display:flex;flex-direction:column}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-14);line-height:var(--l-height-16);height:var(--size-40);padding:var(--size-12);text-align:left;text-wrap:nowrap;transition:all .2s ease;width:100%}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:active:not(:disabled):not(.selected){background-color:var(--c-primary-200);border-color:var(--c-primary-200);color:var(--c-primary-500);transform:scale(.98)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TcRevTooltipDirective, selector: "[tcRevTooltip]", inputs: ["tcRevTooltip", "position"] }, { kind: "directive", type: TcRevIconButtonDirective, selector: "button[tcRevIconButton]", inputs: ["color", "size", "tcRevIconButton"] }] }); }
|
|
11186
|
+
}
|
|
11187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownComponent, decorators: [{
|
|
11188
|
+
type: Component,
|
|
11189
|
+
args: [{ selector: 'tc-rev-dropdown', imports: [
|
|
11190
|
+
CommonModule,
|
|
11191
|
+
FormsModule,
|
|
11192
|
+
ReactiveFormsModule,
|
|
11193
|
+
TcRevTooltipDirective,
|
|
11194
|
+
TcRevIconButtonDirective
|
|
11195
|
+
], template: "<div\n class=\"tc-rev-dropdown\"\n [class.disabled]=\"disabled()\"\n [style.width]=\"this.width()\"\n>\n <button\n class=\"tc-rev-dropdown-toggle\"\n [class.tc-rev-dropdown-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tc-rev-dropdown-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tc-rev-dropdown-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n >\n @if (label()) {\n <b>{{ label() }}</b>\n }\n <span class=\"tc-rev-dropdown-selected-text\">\n {{ selectedOption() ? selectedOption()?.displayValue : \"Selecione\" }}\n </span>\n <i class=\"fa-light fa-chevron-down mar-l-a\"></i>\n </button>\n <ul *ngIf=\"isOpen && isDesktop()\" class=\"tc-rev-dropdown-menu\">\n @for (option of options(); track option?.value) {\n <li class=\"tc-rev-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tc-rev-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n <span\n class=\"tc-rev-dropdown-option-text\"\n [class.ellipsed]=\"isOptionEllipsed(option.displayValue)\"\n [tcRevTooltip]=\"\n isOptionEllipsed(option.displayValue) ? option.displayValue : ''\n \"\n position=\"top\"\n >\n {{ option?.displayValue }}\n </span>\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n </button>\n </li>\n }\n </ul>\n\n <!-- Dropdown full screen -->\n <ng-template #menuTemplate>\n <div class=\"tc-rev-dropdown-menu tc-rev-dropdown-menu--device\">\n <div class=\"tc-rev-dropdown-menu-section\">\n <div class=\"tc-rev-dropdown-menu-header pad-b-24\">\n <h3 class=\"mar-none f-h2 f-weight-600 c-neutral-600\">\n {{ label() }}\n </h3>\n <button\n tcRevIconButton=\"outline\"\n color=\"dark\"\n size=\"sm\"\n (click)=\"_deviceService.closeDropdownDevice()\"\n >\n <i class=\"fa-light fa-times f-size-16\"></i>\n </button>\n </div>\n <ul class=\"tc-rev-dropdown-menu-container mar-t-8\">\n @for (option of options(); track option?.value) {\n <li class=\"tc-rev-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tc-rev-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check f-size-16\"></i>\n }\n </button>\n </li>\n }\n </ul>\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [".tc-rev-dropdown{position:relative;display:block;width:100%}.tc-rev-dropdown .tc-rev-dropdown-toggle{align-items:center;background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-4);line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);width:100%}.tc-rev-dropdown .tc-rev-dropdown-toggle .tc-rev-dropdown-selected-text{flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.tc-rev-dropdown .tc-rev-dropdown-toggle--sm{height:var(--size-40)}.tc-rev-dropdown .tc-rev-dropdown-toggle--md{height:var(--size-44)}.tc-rev-dropdown .tc-rev-dropdown-toggle--lg{height:var(--size-48)}.tc-rev-dropdown .tc-rev-dropdown-toggle:hover,.tc-rev-dropdown .tc-rev-dropdown-toggle:focus{border-color:var(--c-primary-500)}.tc-rev-dropdown .tc-rev-dropdown-toggle:disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tc-rev-dropdown .tc-rev-dropdown-menu{box-shadow:var(--shadow-md);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);list-style:none;margin:0;max-height:15.625rem;overflow-y:auto;padding:0;width:100%;z-index:1000}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn .tc-rev-dropdown-option-text{flex:1;overflow:hidden;text-align:left;white-space:nowrap}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn .tc-rev-dropdown-option-text.ellipsed{text-overflow:ellipsis}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown .tc-rev-dropdown-menu .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}.tc-rev-dropdown-menu--device{height:100%;overflow-y:auto;background-color:var(--c-neutral-50);padding:var(--size-16)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-section{display:contents}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-header{align-items:center;display:flex;gap:var(--size-16);justify-content:space-between}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container{list-style:none;margin:0;padding:0;gap:.5rem;display:flex;flex-direction:column}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-14);line-height:var(--l-height-16);height:var(--size-40);padding:var(--size-12);text-align:left;text-wrap:nowrap;transition:all .2s ease;width:100%}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:active:not(:disabled):not(.selected){background-color:var(--c-primary-200);border-color:var(--c-primary-200);color:var(--c-primary-500);transform:scale(.98)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"] }]
|
|
11196
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { menuTemplate: [{
|
|
11197
|
+
type: ViewChild,
|
|
11198
|
+
args: ['menuTemplate']
|
|
11199
|
+
}], onDocumentClick: [{
|
|
11200
|
+
type: HostListener,
|
|
11201
|
+
args: ['document:click', ['$event']]
|
|
11202
|
+
}] } });
|
|
11203
|
+
|
|
11204
|
+
class TcRevSearchInputComponent {
|
|
11205
|
+
constructor() {
|
|
11206
|
+
this.searchTextChange = new EventEmitter();
|
|
11207
|
+
this.searchInput = viewChild('searchInput');
|
|
11208
|
+
this.searchTextForm = new FormControl('');
|
|
11209
|
+
this.placeholder = input('');
|
|
11210
|
+
this.onSearch = output();
|
|
11211
|
+
this.autoFocus = input(false);
|
|
11212
|
+
}
|
|
11213
|
+
ngOnChanges(_simpleChanges) {
|
|
11214
|
+
if (_simpleChanges['searchText']) {
|
|
11215
|
+
this.searchTextForm.setValue(this.searchText);
|
|
11216
|
+
}
|
|
11217
|
+
}
|
|
11218
|
+
ngOnInit() {
|
|
11219
|
+
// Inicializa o FormControl com o valor do model
|
|
11220
|
+
this.searchTextForm.setValue(this.searchText);
|
|
11221
|
+
this.searchTextForm.valueChanges
|
|
11222
|
+
.pipe(debounceTime(500), distinctUntilChanged(), map((text) => text?.toLowerCase() || ''))
|
|
11223
|
+
.subscribe((text) => {
|
|
11224
|
+
this.searchTextChange.emit(text);
|
|
11225
|
+
this.onSearch.emit(text);
|
|
11226
|
+
});
|
|
11227
|
+
}
|
|
11228
|
+
ngAfterViewInit() {
|
|
11229
|
+
if (this.autoFocus() && this.searchInput) {
|
|
11230
|
+
this.searchInput().nativeElement.focus();
|
|
11231
|
+
}
|
|
11232
|
+
}
|
|
11233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11234
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.20", type: TcRevSearchInputComponent, isStandalone: true, selector: "tc-rev-search-input", inputs: { searchText: { classPropertyName: "searchText", publicName: "searchText", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchTextChange: "searchTextChange", onSearch: "onSearch" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<form class=\"tc-rev-search-input-container\">\n <input\n type=\"text\"\n class=\"tc-rev-search-input-control\"\n [formControl]=\"this.searchTextForm\"\n [placeholder]=\"this.placeholder()\"\n #searchInput\n />\n\n <button class=\"tc-rev-search-input-btn\">\n <i class=\"fa-light fa-magnifying-glass\"></i>\n </button>\n</form>\n\n\n", styles: [":host{display:block}.tc-rev-search-input-container{position:relative;max-height:var(--size-40);min-height:var(--size-40);height:var(--size-40);min-width:7.5rem}.tc-rev-search-input-container .tc-rev-search-input-control{border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);display:inline-block;font-family:var(--f-family);font-size:var(--f-size-14);line-height:var(--l-height-20);outline:none;height:var(--size-40);transition:.2s ease;padding:0 var(--size-16);position:absolute;top:0;left:0;padding-right:var(--size-44);width:100%;z-index:1}.tc-rev-search-input-container .tc-rev-search-input-control:hover,.tc-rev-search-input-container .tc-rev-search-input-control:focus{border-color:var(--c-primary-500)}.tc-rev-search-input-container .tc-rev-search-input-btn{cursor:pointer;display:block;position:absolute;right:4px;top:4px;z-index:2;background-color:var(--c-primary-500);border-radius:var(--bor-radius-rounded);border:none;width:var(--size-32);height:var(--size-32);color:var(--c-neutral-50);font-size:var(--f-size-16)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
11235
|
+
}
|
|
11236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSearchInputComponent, decorators: [{
|
|
11237
|
+
type: Component,
|
|
11238
|
+
args: [{ selector: 'tc-rev-search-input', imports: [CommonModule, FormsModule, ReactiveFormsModule], template: "<form class=\"tc-rev-search-input-container\">\n <input\n type=\"text\"\n class=\"tc-rev-search-input-control\"\n [formControl]=\"this.searchTextForm\"\n [placeholder]=\"this.placeholder()\"\n #searchInput\n />\n\n <button class=\"tc-rev-search-input-btn\">\n <i class=\"fa-light fa-magnifying-glass\"></i>\n </button>\n</form>\n\n\n", styles: [":host{display:block}.tc-rev-search-input-container{position:relative;max-height:var(--size-40);min-height:var(--size-40);height:var(--size-40);min-width:7.5rem}.tc-rev-search-input-container .tc-rev-search-input-control{border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);display:inline-block;font-family:var(--f-family);font-size:var(--f-size-14);line-height:var(--l-height-20);outline:none;height:var(--size-40);transition:.2s ease;padding:0 var(--size-16);position:absolute;top:0;left:0;padding-right:var(--size-44);width:100%;z-index:1}.tc-rev-search-input-container .tc-rev-search-input-control:hover,.tc-rev-search-input-container .tc-rev-search-input-control:focus{border-color:var(--c-primary-500)}.tc-rev-search-input-container .tc-rev-search-input-btn{cursor:pointer;display:block;position:absolute;right:4px;top:4px;z-index:2;background-color:var(--c-primary-500);border-radius:var(--bor-radius-rounded);border:none;width:var(--size-32);height:var(--size-32);color:var(--c-neutral-50);font-size:var(--f-size-16)}\n"] }]
|
|
11239
|
+
}], propDecorators: { searchText: [{
|
|
11240
|
+
type: Input
|
|
11241
|
+
}], searchTextChange: [{
|
|
11242
|
+
type: Output
|
|
11243
|
+
}] } });
|
|
11244
|
+
|
|
11245
|
+
var DropdownGroupedSize;
|
|
11246
|
+
(function (DropdownGroupedSize) {
|
|
11247
|
+
DropdownGroupedSize["sm"] = "sm";
|
|
11248
|
+
DropdownGroupedSize["md"] = "md";
|
|
11249
|
+
DropdownGroupedSize["lg"] = "lg";
|
|
11250
|
+
})(DropdownGroupedSize || (DropdownGroupedSize = {}));
|
|
11251
|
+
class TcRevDropdownGroupedComponent {
|
|
11252
|
+
onDocumentClick(event) {
|
|
11253
|
+
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
11254
|
+
this.isOpen = false;
|
|
11255
|
+
}
|
|
11256
|
+
}
|
|
11257
|
+
constructor(elementRef) {
|
|
11258
|
+
this.elementRef = elementRef;
|
|
11259
|
+
this._deviceService = inject(TCloudUiDeviceUtilsService);
|
|
11260
|
+
this.label = input(''); // Label que será exibida
|
|
11261
|
+
this.disabled = input(false); // Desabilita o dropdown
|
|
11262
|
+
this.options = input.required(); // Lista de opções agrupadas
|
|
11263
|
+
this.initialValue = input(null); // Valor pré-selecionado (deprecated - use value instead)
|
|
11264
|
+
this.value = model(null); // Two-way binding para o valor selecionado
|
|
11265
|
+
this.size = input(DropdownGroupedSize.sm);
|
|
11266
|
+
this.placeholder = input('Selecione');
|
|
11267
|
+
this.searchPlaceholder = input('Buscar...');
|
|
11268
|
+
this.showSearch = input(true); // Controla se mostra o input de busca
|
|
11269
|
+
this.width = input(''); // Largura do dropdown
|
|
11270
|
+
this.optionSelected = output(); // Emissor para o valor selecionado
|
|
11271
|
+
this.selectedOption = signal(null); // Opção selecionada
|
|
11272
|
+
this.isOpen = false; // Controla se o dropdown está aberto
|
|
11273
|
+
this.searchTerm = signal(''); // Termo de busca
|
|
11274
|
+
this.dropdownSize = DropdownGroupedSize;
|
|
11275
|
+
this.isDesktop = this._deviceService.isDesktop;
|
|
11276
|
+
this.isMobile = this._deviceService.isMobile;
|
|
11277
|
+
}
|
|
11278
|
+
ngOnChanges(_simpleChanges) {
|
|
11279
|
+
// Atualiza a opção selecionada quando o valor pré-selecionado muda
|
|
11280
|
+
if (_simpleChanges['initialValue'] ||
|
|
11281
|
+
_simpleChanges['options'] ||
|
|
11282
|
+
_simpleChanges['value']) {
|
|
11283
|
+
const valueToUse = this.value() || this.initialValue();
|
|
11284
|
+
this.selectedOption.set(this.options().find((option) => option.value === valueToUse) || null);
|
|
11285
|
+
}
|
|
11286
|
+
}
|
|
11287
|
+
ngOnInit() {
|
|
11288
|
+
// Prioriza o valor do model, mas mantém compatibilidade com initialValue
|
|
11289
|
+
const valueToUse = this.value() || this.initialValue();
|
|
11290
|
+
const foundOption = this.options().find((option) => option.value === valueToUse) || null;
|
|
11291
|
+
this.selectedOption.set(foundOption);
|
|
11292
|
+
// Se não havia valor no model mas havia initialValue, sincroniza o model
|
|
11293
|
+
if (!this.value() && this.initialValue() && foundOption) {
|
|
11294
|
+
this.value.set(foundOption.value);
|
|
11295
|
+
}
|
|
11296
|
+
// Escuta mudanças no model e atualiza a opção selecionada
|
|
11297
|
+
this.value.subscribe((newValue) => {
|
|
11298
|
+
const option = this.options().find((opt) => opt.value === newValue) || null;
|
|
11299
|
+
if (this.selectedOption() !== option) {
|
|
11300
|
+
this.selectedOption.set(option);
|
|
11301
|
+
}
|
|
11302
|
+
});
|
|
11303
|
+
}
|
|
11304
|
+
toggleDropdown() {
|
|
11305
|
+
if (!this.disabled()) {
|
|
11306
|
+
// Abertura do dropdown para mobile
|
|
11307
|
+
if (this.isMobile()) {
|
|
11308
|
+
this._deviceService.openDropdownDevice(this.menuTemplate);
|
|
11309
|
+
return;
|
|
11310
|
+
}
|
|
11311
|
+
this.isOpen = !this.isOpen;
|
|
11312
|
+
if (this.isOpen) {
|
|
11313
|
+
this.searchTerm.set('');
|
|
11314
|
+
// Foca no input de busca quando abre o dropdown
|
|
11315
|
+
setTimeout(() => {
|
|
11316
|
+
const searchInput = this.elementRef.nativeElement.querySelector('.tc-rev-dropdown-search input');
|
|
11317
|
+
if (searchInput) {
|
|
11318
|
+
searchInput.focus();
|
|
11319
|
+
}
|
|
11320
|
+
}, 100);
|
|
11321
|
+
}
|
|
11322
|
+
}
|
|
11323
|
+
}
|
|
11324
|
+
selectOption(option) {
|
|
11325
|
+
if (!option.disabled) {
|
|
11326
|
+
this.selectedOption.set(option);
|
|
11327
|
+
this.value.set(option.value); // Atualiza o model com two-way binding
|
|
11328
|
+
this.optionSelected.emit(option); // Emite a opção selecionada para compatibilidade
|
|
11329
|
+
if (this.isMobile()) {
|
|
11330
|
+
this._deviceService.closeDropdownDevice();
|
|
11331
|
+
return;
|
|
11332
|
+
}
|
|
11333
|
+
this.isOpen = false;
|
|
11334
|
+
this.searchTerm.set('');
|
|
11335
|
+
}
|
|
11336
|
+
}
|
|
11337
|
+
onSearchChange(searchText) {
|
|
11338
|
+
this.searchTerm.set(searchText);
|
|
11339
|
+
}
|
|
11340
|
+
getGroupedOptions() {
|
|
11341
|
+
const filtered = this.getFilteredOptions();
|
|
11342
|
+
const groups = {};
|
|
11343
|
+
// Agrupa as opções filtradas
|
|
11344
|
+
filtered.forEach((option) => {
|
|
11345
|
+
const groupName = option.group || 'Sem grupo';
|
|
11346
|
+
if (!groups[groupName]) {
|
|
11347
|
+
groups[groupName] = [];
|
|
11348
|
+
}
|
|
11349
|
+
groups[groupName].push(option);
|
|
11350
|
+
});
|
|
11351
|
+
// Converte para array de grupos
|
|
11352
|
+
return Object.keys(groups).map((groupName) => ({
|
|
11353
|
+
groupName,
|
|
11354
|
+
options: groups[groupName],
|
|
11355
|
+
}));
|
|
11356
|
+
}
|
|
11357
|
+
getFilteredOptions() {
|
|
11358
|
+
const search = this.searchTerm().toLowerCase().trim();
|
|
11359
|
+
if (!search) {
|
|
11360
|
+
return this.options();
|
|
11361
|
+
}
|
|
11362
|
+
return this.options().filter((option) => option.displayValue.toLowerCase().includes(search) ||
|
|
11363
|
+
(option.group && option.group.toLowerCase().includes(search)));
|
|
11364
|
+
}
|
|
11365
|
+
clearSearch() {
|
|
11366
|
+
this.searchTerm.set('');
|
|
11367
|
+
}
|
|
11368
|
+
hasResults() {
|
|
11369
|
+
return this.getFilteredOptions().length > 0;
|
|
11370
|
+
}
|
|
11371
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownGroupedComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11372
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevDropdownGroupedComponent, isStandalone: true, selector: "tc-rev-dropdown-grouped", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", optionSelected: "optionSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "menuTemplate", first: true, predicate: ["menuTemplate"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"tc-rev-dropdown-grouped\" [class.disabled]=\"disabled()\">\n <button\n class=\"tc-rev-dropdown-toggle\"\n [class.tc-rev-dropdown-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tc-rev-dropdown-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tc-rev-dropdown-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [style.width]=\"this.width()\"\n >\n @if (label()) {\n <b>{{ label() }}</b>\n }\n {{ selectedOption() ? selectedOption()?.displayValue : placeholder() }}\n <i class=\"fa-light fa-chevron-down mar-l-a\" [class.rotate]=\"isOpen\"></i>\n </button>\n\n <div\n *ngIf=\"isOpen && isDesktop()\"\n class=\"tc-rev-dropdown-menu\"\n [style.width]=\"this.width()\"\n >\n <!-- Input de busca -->\n @if (showSearch()) {\n <div class=\"tc-rev-dropdown-search\">\n <tc-rev-search-input\n (onSearch)=\"onSearchChange($event)\"\n [placeholder]=\"this.searchPlaceholder()\"\n />\n </div>\n <!-- <div class=\"tc-rev-dropdown-search\">\n <i class=\"fa-light fa-magnifying-glass search-icon\"></i>\n <input\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchTerm()\"\n (input)=\"onSearchChange($event)\"\n class=\"search-input\">\n @if (searchTerm()) {\n <button\n type=\"button\"\n class=\"clear-search\"\n (click)=\"clearSearch()\"\n title=\"Limpar busca\">\n <i class=\"fa-light fa-xmark\"></i>\n </button>\n }\n </div> -->\n }\n\n <!-- Lista de op\u00E7\u00F5es agrupadas -->\n @if (hasResults()) {\n <ul class=\"tc-rev-dropdown-options\">\n @for (group of getGroupedOptions(); track group.groupName) {\n <li class=\"tc-rev-dropdown-group\">\n <div class=\"tc-rev-dropdown-group-header\">\n {{ group.groupName }}\n </div>\n <ul class=\"tc-rev-dropdown-group-options\">\n @for (option of group.options; track option?.value) {\n <li class=\"tc-rev-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tc-rev-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n </button>\n </li>\n }\n </ul>\n </li>\n }\n </ul>\n } @else {\n <div class=\"tc-rev-dropdown-no-results f-family\">\n <i class=\"fa-light fa-magnifying-glass\"></i>\n <span>Nenhum resultado encontrado</span>\n </div>\n }\n </div>\n\n <!-- Dropdown full screen -->\n <ng-template #menuTemplate>\n <div class=\"tc-rev-dropdown-menu tc-rev-dropdown-menu--device\">\n <div class=\"tc-rev-dropdown-menu-section\">\n <div class=\"tc-rev-dropdown-menu-header pad-b-24\">\n <h3 class=\"mar-none f-h2 f-weight-600 c-neutral-600\">\n {{ label() }}\n </h3>\n <button\n tcRevIconButton=\"outline\"\n color=\"dark\"\n size=\"sm\"\n (click)=\"_deviceService.closeDropdownDevice()\"\n >\n <i class=\"fa-light fa-times f-size-16\"></i>\n </button>\n </div>\n\n @if (showSearch()) {\n <div class=\"tc-rev-dropdown-search mar-b-12\">\n <tc-rev-search-input\n (onSearch)=\"onSearchChange($event)\"\n [placeholder]=\"searchPlaceholder()\"\n />\n </div>\n } @if (hasResults()) {\n <ul class=\"tc-rev-dropdown-menu-container mar-t-8\">\n @for (group of getGroupedOptions(); track group.groupName) {\n <li class=\"tc-rev-dropdown-group\">\n <div class=\"tc-rev-dropdown-group-header\">\n {{ group.groupName }}\n </div>\n <ul class=\"tc-rev-dropdown-group-options\">\n @for (option of group.options; track option?.value) {\n <li\n class=\"tc-rev-dropdown-menu-item\"\n (click)=\"selectOption(option)\"\n >\n <button\n class=\"tc-rev-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check f-size-16\"></i>\n }\n </button>\n </li>\n }\n </ul>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{display:inline-block}.tc-rev-dropdown-grouped{position:relative;display:inline-block}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle{background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;align-items:center;justify-content:flex-start;gap:var(--size-4);font-family:var(--f-family);font-size:var(--f-size-12);line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);min-width:5rem}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle--sm{height:var(--size-40)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle--md{height:var(--size-44)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle--lg{height:var(--size-48)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle:hover,.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle:focus{border-color:var(--c-primary-500)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle:disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle i.rotate{transform:rotate(-180deg)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle i{transition:transform .2s ease}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu{box-shadow:var(--shadow-md);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);max-height:20rem;overflow:hidden;width:100%;min-width:10rem;z-index:1000;display:flex;flex-direction:column}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search{position:relative;padding:var(--size-8);border-bottom:1px solid var(--c-neutral-200);background-color:var(--c-neutral-50)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .search-icon{position:absolute;left:var(--size-20);top:50%;transform:translateY(-50%);color:var(--c-neutral-500);font-size:var(--f-size-14)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .search-input{width:100%;height:var(--size-40);padding:var(--size-8) var(--size-12) var(--size-8) var(--size-36);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-4);font-size:var(--f-size-12);line-height:var(--l-height-16);outline:none;transition:border-color .2s ease;font-family:var(--f-family)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .search-input:focus{border-color:var(--c-primary-500)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .search-input::placeholder{color:var(--c-neutral-500)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .clear-search{position:absolute;right:var(--size-20);top:50%;transform:translateY(-50%);background:none;border:none;color:var(--c-neutral-500);cursor:pointer;padding:var(--size-4);border-radius:var(--bor-radius-4);transition:color .2s ease;font-family:var(--f-family)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .clear-search:hover{color:var(--c-neutral-700)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1;font-family:var(--f-family)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-header{background-color:var(--c-neutral-100);color:var(--c-neutral-600);font-size:var(--f-size-14);font-weight:var(--f-weight-500);line-height:var(--l-height-16);padding:var(--size-10);text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid var(--c-neutral-200);position:sticky;top:0;z-index:1}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options{list-style:none;margin:0;padding:0}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:hover{background-color:var(--c-neutral-50);border-color:var(--c-primary-500);color:var(--c-primary-500)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-400);cursor:not-allowed}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled:hover{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-400)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-no-results{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--size-24);color:var(--c-neutral-500);text-align:center}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-no-results i{font-size:var(--f-size-24);margin-bottom:var(--size-8);opacity:.5}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-no-results span{font-size:var(--f-size-12);line-height:var(--l-height-16)}.tc-rev-dropdown-grouped.disabled .tc-rev-dropdown-toggle{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tc-rev-dropdown-grouped.disabled .tc-rev-dropdown-toggle:hover{border-color:var(--c-neutral-300)}.tc-rev-dropdown-menu--device{height:100%;overflow-y:auto;background-color:var(--c-neutral-50);padding:var(--size-16)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-section{display:contents}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-header{align-items:center;display:flex;gap:var(--size-16);justify-content:space-between}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-header{background-color:var(--c-neutral-100);color:var(--c-neutral-600);font-size:var(--f-size-14);font-weight:var(--f-weight-500);line-height:var(--l-height-16);padding:var(--size-10);text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid var(--c-neutral-200);position:sticky;top:0;z-index:1}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options{list-style:none;margin:0;padding:0}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-14);line-height:var(--l-height-16);height:var(--size-40);padding:var(--size-12);text-align:left;text-wrap:nowrap;transition:all .2s ease;width:100%}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:active:not(:disabled):not(.selected){background-color:var(--c-primary-200);border-color:var(--c-primary-200);color:var(--c-primary-500);transform:scale(.98)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: TcRevSearchInputComponent, selector: "tc-rev-search-input", inputs: ["searchText", "placeholder", "autoFocus"], outputs: ["searchTextChange", "onSearch"] }, { kind: "directive", type: TcRevIconButtonDirective, selector: "button[tcRevIconButton]", inputs: ["color", "size", "tcRevIconButton"] }] }); }
|
|
11373
|
+
}
|
|
11374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownGroupedComponent, decorators: [{
|
|
11375
|
+
type: Component,
|
|
11376
|
+
args: [{ selector: 'tc-rev-dropdown-grouped', imports: [
|
|
11377
|
+
CommonModule,
|
|
11378
|
+
FormsModule,
|
|
11379
|
+
ReactiveFormsModule,
|
|
11380
|
+
TcRevSearchInputComponent,
|
|
11381
|
+
TcRevIconButtonDirective
|
|
11382
|
+
], template: "<div class=\"tc-rev-dropdown-grouped\" [class.disabled]=\"disabled()\">\n <button\n class=\"tc-rev-dropdown-toggle\"\n [class.tc-rev-dropdown-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tc-rev-dropdown-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tc-rev-dropdown-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [style.width]=\"this.width()\"\n >\n @if (label()) {\n <b>{{ label() }}</b>\n }\n {{ selectedOption() ? selectedOption()?.displayValue : placeholder() }}\n <i class=\"fa-light fa-chevron-down mar-l-a\" [class.rotate]=\"isOpen\"></i>\n </button>\n\n <div\n *ngIf=\"isOpen && isDesktop()\"\n class=\"tc-rev-dropdown-menu\"\n [style.width]=\"this.width()\"\n >\n <!-- Input de busca -->\n @if (showSearch()) {\n <div class=\"tc-rev-dropdown-search\">\n <tc-rev-search-input\n (onSearch)=\"onSearchChange($event)\"\n [placeholder]=\"this.searchPlaceholder()\"\n />\n </div>\n <!-- <div class=\"tc-rev-dropdown-search\">\n <i class=\"fa-light fa-magnifying-glass search-icon\"></i>\n <input\n type=\"text\"\n [placeholder]=\"searchPlaceholder()\"\n [value]=\"searchTerm()\"\n (input)=\"onSearchChange($event)\"\n class=\"search-input\">\n @if (searchTerm()) {\n <button\n type=\"button\"\n class=\"clear-search\"\n (click)=\"clearSearch()\"\n title=\"Limpar busca\">\n <i class=\"fa-light fa-xmark\"></i>\n </button>\n }\n </div> -->\n }\n\n <!-- Lista de op\u00E7\u00F5es agrupadas -->\n @if (hasResults()) {\n <ul class=\"tc-rev-dropdown-options\">\n @for (group of getGroupedOptions(); track group.groupName) {\n <li class=\"tc-rev-dropdown-group\">\n <div class=\"tc-rev-dropdown-group-header\">\n {{ group.groupName }}\n </div>\n <ul class=\"tc-rev-dropdown-group-options\">\n @for (option of group.options; track option?.value) {\n <li class=\"tc-rev-dropdown-menu-item\" (click)=\"selectOption(option)\">\n <button\n class=\"tc-rev-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n </button>\n </li>\n }\n </ul>\n </li>\n }\n </ul>\n } @else {\n <div class=\"tc-rev-dropdown-no-results f-family\">\n <i class=\"fa-light fa-magnifying-glass\"></i>\n <span>Nenhum resultado encontrado</span>\n </div>\n }\n </div>\n\n <!-- Dropdown full screen -->\n <ng-template #menuTemplate>\n <div class=\"tc-rev-dropdown-menu tc-rev-dropdown-menu--device\">\n <div class=\"tc-rev-dropdown-menu-section\">\n <div class=\"tc-rev-dropdown-menu-header pad-b-24\">\n <h3 class=\"mar-none f-h2 f-weight-600 c-neutral-600\">\n {{ label() }}\n </h3>\n <button\n tcRevIconButton=\"outline\"\n color=\"dark\"\n size=\"sm\"\n (click)=\"_deviceService.closeDropdownDevice()\"\n >\n <i class=\"fa-light fa-times f-size-16\"></i>\n </button>\n </div>\n\n @if (showSearch()) {\n <div class=\"tc-rev-dropdown-search mar-b-12\">\n <tc-rev-search-input\n (onSearch)=\"onSearchChange($event)\"\n [placeholder]=\"searchPlaceholder()\"\n />\n </div>\n } @if (hasResults()) {\n <ul class=\"tc-rev-dropdown-menu-container mar-t-8\">\n @for (group of getGroupedOptions(); track group.groupName) {\n <li class=\"tc-rev-dropdown-group\">\n <div class=\"tc-rev-dropdown-group-header\">\n {{ group.groupName }}\n </div>\n <ul class=\"tc-rev-dropdown-group-options\">\n @for (option of group.options; track option?.value) {\n <li\n class=\"tc-rev-dropdown-menu-item\"\n (click)=\"selectOption(option)\"\n >\n <button\n class=\"tc-rev-dropdown-menu-item-btn\"\n [class.selected]=\"selectedOption()?.value === option.value\"\n [disabled]=\"option?.disabled\"\n >\n {{ option?.displayValue }}\n\n @if (selectedOption()?.value === option?.value) {\n <i class=\"fa-light fa-circle-check f-size-16\"></i>\n }\n </button>\n </li>\n }\n </ul>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n </ng-template>\n</div>\n", styles: [":host{display:inline-block}.tc-rev-dropdown-grouped{position:relative;display:inline-block}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle{background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;align-items:center;justify-content:flex-start;gap:var(--size-4);font-family:var(--f-family);font-size:var(--f-size-12);line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);min-width:5rem}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle--sm{height:var(--size-40)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle--md{height:var(--size-44)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle--lg{height:var(--size-48)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle:hover,.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle:focus{border-color:var(--c-primary-500)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle:disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle i.rotate{transform:rotate(-180deg)}.tc-rev-dropdown-grouped .tc-rev-dropdown-toggle i{transition:transform .2s ease}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu{box-shadow:var(--shadow-md);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);max-height:20rem;overflow:hidden;width:100%;min-width:10rem;z-index:1000;display:flex;flex-direction:column}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search{position:relative;padding:var(--size-8);border-bottom:1px solid var(--c-neutral-200);background-color:var(--c-neutral-50)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .search-icon{position:absolute;left:var(--size-20);top:50%;transform:translateY(-50%);color:var(--c-neutral-500);font-size:var(--f-size-14)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .search-input{width:100%;height:var(--size-40);padding:var(--size-8) var(--size-12) var(--size-8) var(--size-36);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-4);font-size:var(--f-size-12);line-height:var(--l-height-16);outline:none;transition:border-color .2s ease;font-family:var(--f-family)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .search-input:focus{border-color:var(--c-primary-500)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .search-input::placeholder{color:var(--c-neutral-500)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .clear-search{position:absolute;right:var(--size-20);top:50%;transform:translateY(-50%);background:none;border:none;color:var(--c-neutral-500);cursor:pointer;padding:var(--size-4);border-radius:var(--bor-radius-4);transition:color .2s ease;font-family:var(--f-family)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-search .clear-search:hover{color:var(--c-neutral-700)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1;font-family:var(--f-family)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-header{background-color:var(--c-neutral-100);color:var(--c-neutral-600);font-size:var(--f-size-14);font-weight:var(--f-weight-500);line-height:var(--l-height-16);padding:var(--size-10);text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid var(--c-neutral-200);position:sticky;top:0;z-index:1}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options{list-style:none;margin:0;padding:0}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:hover{background-color:var(--c-neutral-50);border-color:var(--c-primary-500);color:var(--c-primary-500)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-400);cursor:not-allowed}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-options .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled:hover{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-400)}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-no-results{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--size-24);color:var(--c-neutral-500);text-align:center}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-no-results i{font-size:var(--f-size-24);margin-bottom:var(--size-8);opacity:.5}.tc-rev-dropdown-grouped .tc-rev-dropdown-menu .tc-rev-dropdown-no-results span{font-size:var(--f-size-12);line-height:var(--l-height-16)}.tc-rev-dropdown-grouped.disabled .tc-rev-dropdown-toggle{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tc-rev-dropdown-grouped.disabled .tc-rev-dropdown-toggle:hover{border-color:var(--c-neutral-300)}.tc-rev-dropdown-menu--device{height:100%;overflow-y:auto;background-color:var(--c-neutral-50);padding:var(--size-16)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-section{display:contents}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-header{align-items:center;display:flex;gap:var(--size-16);justify-content:space-between}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-header{background-color:var(--c-neutral-100);color:var(--c-neutral-600);font-size:var(--f-size-14);font-weight:var(--f-weight-500);line-height:var(--l-height-16);padding:var(--size-10);text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid var(--c-neutral-200);position:sticky;top:0;z-index:1}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options{list-style:none;margin:0;padding:0}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-14);line-height:var(--l-height-16);height:var(--size-40);padding:var(--size-12);text-align:left;text-wrap:nowrap;transition:all .2s ease;width:100%}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:active:not(:disabled):not(.selected){background-color:var(--c-primary-200);border-color:var(--c-primary-200);color:var(--c-primary-500);transform:scale(.98)}.tc-rev-dropdown-menu--device .tc-rev-dropdown-menu-container .tc-rev-dropdown-group .tc-rev-dropdown-group-options .tc-rev-dropdown-menu-item .tc-rev-dropdown-menu-item-btn:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"] }]
|
|
11383
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { menuTemplate: [{
|
|
11384
|
+
type: ViewChild,
|
|
11385
|
+
args: ['menuTemplate']
|
|
11386
|
+
}], onDocumentClick: [{
|
|
11387
|
+
type: HostListener,
|
|
11388
|
+
args: ['document:click', ['$event']]
|
|
11389
|
+
}] } });
|
|
11390
|
+
|
|
11391
|
+
var DropdownMultiSize;
|
|
11392
|
+
(function (DropdownMultiSize) {
|
|
11393
|
+
DropdownMultiSize["sm"] = "sm";
|
|
11394
|
+
DropdownMultiSize["md"] = "md";
|
|
11395
|
+
DropdownMultiSize["lg"] = "lg";
|
|
11396
|
+
})(DropdownMultiSize || (DropdownMultiSize = {}));
|
|
11397
|
+
class TcRevDropdownMultiComponent {
|
|
11398
|
+
onDocumentClick(event) {
|
|
11399
|
+
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
11400
|
+
this.isOpen = false;
|
|
11401
|
+
}
|
|
11402
|
+
}
|
|
11403
|
+
constructor(elementRef) {
|
|
11404
|
+
this.elementRef = elementRef;
|
|
11405
|
+
this.label = input(''); // Label que será exibida
|
|
11406
|
+
this.disabled = input(false); // Desabilita o dropdown
|
|
11407
|
+
this.options = input.required(); // Lista de opções no novo formato
|
|
11408
|
+
this.initialValues = input([]); // Valores pré-selecionados (deprecated - use values instead)
|
|
11409
|
+
this.values = model([]); // Two-way binding para os valores selecionados
|
|
11410
|
+
this.size = input(DropdownMultiSize.sm);
|
|
11411
|
+
this.width = input(''); // Largura do dropdown
|
|
11412
|
+
this.placeholder = input('Selecione'); // Placeholder quando nenhum item estiver selecionado
|
|
11413
|
+
this.maxDisplayItems = input(2); // Máximo de itens a serem exibidos no botão
|
|
11414
|
+
this.optionsSelected = output(); // Emissor para os valores selecionados
|
|
11415
|
+
this.selectedOptions = signal([]); // Opções selecionadas
|
|
11416
|
+
this.isOpen = false; // Controla se o dropdown está aberto
|
|
11417
|
+
this.dropdownSize = DropdownMultiSize;
|
|
11418
|
+
}
|
|
11419
|
+
ngOnChanges(_simpleChanges) {
|
|
11420
|
+
// Atualiza as opções selecionadas quando os valores pré-selecionados mudam
|
|
11421
|
+
if (_simpleChanges['initialValues'] || _simpleChanges['options'] || _simpleChanges['values']) {
|
|
11422
|
+
const valuesToUse = this.values().length > 0 ? this.values() : this.initialValues();
|
|
11423
|
+
const selected = this.options().filter(option => valuesToUse.includes(option.value));
|
|
11424
|
+
this.selectedOptions.set(selected);
|
|
11425
|
+
}
|
|
11426
|
+
}
|
|
11427
|
+
ngOnInit() {
|
|
11428
|
+
// Prioriza os valores do model, mas mantém compatibilidade com initialValues
|
|
11429
|
+
const valuesToUse = this.values().length > 0 ? this.values() : this.initialValues();
|
|
11430
|
+
const selected = this.options().filter(option => valuesToUse.includes(option.value));
|
|
11431
|
+
this.selectedOptions.set(selected);
|
|
11432
|
+
// Se não havia valores no model mas havia initialValues, sincroniza o model
|
|
11433
|
+
if (this.values().length === 0 && this.initialValues().length > 0) {
|
|
11434
|
+
this.values.set([...this.initialValues()]);
|
|
11435
|
+
}
|
|
11436
|
+
// Escuta mudanças no model e atualiza as opções selecionadas
|
|
11437
|
+
this.values.subscribe((newValues) => {
|
|
11438
|
+
const newSelected = this.options().filter(option => newValues.includes(option.value));
|
|
11439
|
+
// Só atualiza se realmente mudou para evitar loops
|
|
11440
|
+
const currentSelectedValues = this.selectedOptions().map(opt => opt.value);
|
|
11441
|
+
const newSelectedValues = newSelected.map(opt => opt.value);
|
|
11442
|
+
if (JSON.stringify(currentSelectedValues.sort()) !== JSON.stringify(newSelectedValues.sort())) {
|
|
11443
|
+
this.selectedOptions.set(newSelected);
|
|
11444
|
+
}
|
|
11445
|
+
});
|
|
11446
|
+
}
|
|
11447
|
+
toggleDropdown() {
|
|
11448
|
+
if (!this.disabled()) {
|
|
11449
|
+
this.isOpen = !this.isOpen;
|
|
11450
|
+
}
|
|
11451
|
+
}
|
|
11452
|
+
toggleOption(option, event) {
|
|
11453
|
+
event.stopPropagation();
|
|
11454
|
+
if (option.disabled)
|
|
11455
|
+
return;
|
|
11456
|
+
const currentSelected = this.selectedOptions();
|
|
11457
|
+
const isSelected = currentSelected.some(selected => selected.value === option.value);
|
|
11458
|
+
let newSelected;
|
|
11459
|
+
if (isSelected) {
|
|
11460
|
+
// Remove a opção se já estiver selecionada
|
|
11461
|
+
newSelected = currentSelected.filter(selected => selected.value !== option.value);
|
|
11462
|
+
}
|
|
11463
|
+
else {
|
|
11464
|
+
// Adiciona a opção se não estiver selecionada
|
|
11465
|
+
newSelected = [...currentSelected, option];
|
|
11466
|
+
}
|
|
11467
|
+
const newValues = newSelected.map(opt => opt.value);
|
|
11468
|
+
this.selectedOptions.set(newSelected);
|
|
11469
|
+
this.values.set(newValues); // Atualiza o model com two-way binding
|
|
11470
|
+
this.optionsSelected.emit(newValues); // Emite os valores para compatibilidade
|
|
11471
|
+
}
|
|
11472
|
+
isOptionSelected(option) {
|
|
11473
|
+
return this.selectedOptions().some(selected => selected.value === option.value);
|
|
11474
|
+
}
|
|
11475
|
+
getDisplayText() {
|
|
11476
|
+
const selected = this.selectedOptions();
|
|
11477
|
+
if (selected.length === 0) {
|
|
11478
|
+
return this.placeholder();
|
|
11479
|
+
}
|
|
11480
|
+
// Se todos os itens (não desabilitados) estão selecionados, mostra "Todos"
|
|
11481
|
+
if (this.isAllSelected()) {
|
|
11482
|
+
return 'Todos';
|
|
11483
|
+
}
|
|
11484
|
+
const maxDisplay = this.maxDisplayItems();
|
|
11485
|
+
if (selected.length <= maxDisplay) {
|
|
11486
|
+
return selected.map(opt => opt.displayValue).join(', ');
|
|
11487
|
+
}
|
|
11488
|
+
const firstItems = selected.slice(0, maxDisplay).map(opt => opt.displayValue).join(', ');
|
|
11489
|
+
const remaining = selected.length - maxDisplay;
|
|
11490
|
+
return `${firstItems} (+${remaining})`;
|
|
11491
|
+
}
|
|
11492
|
+
clearAll() {
|
|
11493
|
+
this.selectedOptions.set([]);
|
|
11494
|
+
this.values.set([]); // Atualiza o model com two-way binding
|
|
11495
|
+
this.optionsSelected.emit([]);
|
|
11496
|
+
}
|
|
11497
|
+
selectAll() {
|
|
11498
|
+
const enabledOptions = this.options().filter(option => !option.disabled);
|
|
11499
|
+
const allValues = enabledOptions.map(opt => opt.value);
|
|
11500
|
+
this.selectedOptions.set(enabledOptions);
|
|
11501
|
+
this.values.set(allValues); // Atualiza o model com two-way binding
|
|
11502
|
+
this.optionsSelected.emit(allValues);
|
|
11503
|
+
}
|
|
11504
|
+
isAllSelected() {
|
|
11505
|
+
const enabledOptions = this.options().filter(option => !option.disabled);
|
|
11506
|
+
const selectedOptions = this.selectedOptions();
|
|
11507
|
+
if (enabledOptions.length === 0)
|
|
11508
|
+
return false;
|
|
11509
|
+
return enabledOptions.every(option => selectedOptions.some(selected => selected.value === option.value));
|
|
11510
|
+
}
|
|
11511
|
+
isSomeSelected() {
|
|
11512
|
+
const enabledOptions = this.options().filter(option => !option.disabled);
|
|
11513
|
+
const selectedOptions = this.selectedOptions();
|
|
11514
|
+
if (enabledOptions.length === 0 || selectedOptions.length === 0)
|
|
11515
|
+
return false;
|
|
11516
|
+
const selectedCount = enabledOptions.filter(option => selectedOptions.some(selected => selected.value === option.value)).length;
|
|
11517
|
+
return selectedCount > 0 && selectedCount < enabledOptions.length;
|
|
11518
|
+
}
|
|
11519
|
+
toggleSelectAll(event) {
|
|
11520
|
+
event.stopPropagation();
|
|
11521
|
+
if (this.isAllSelected()) {
|
|
11522
|
+
this.clearAll();
|
|
11523
|
+
}
|
|
11524
|
+
else {
|
|
11525
|
+
this.selectAll();
|
|
11526
|
+
}
|
|
11527
|
+
}
|
|
11528
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownMultiComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11529
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevDropdownMultiComponent, isStandalone: true, selector: "tc-rev-dropdown-multi", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, initialValues: { classPropertyName: "initialValues", publicName: "initialValues", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, maxDisplayItems: { classPropertyName: "maxDisplayItems", publicName: "maxDisplayItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { values: "valuesChange", optionsSelected: "optionsSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"tc-rev-dropdown-multi\"\n [class.disabled]=\"disabled()\">\n <button\n class=\"tc-rev-dropdown-multi-toggle\"\n [class.tc-rev-dropdown-multi-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tc-rev-dropdown-multi-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tc-rev-dropdown-multi-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen\"\n [style.width]=\"this.width()\">\n @if (label())\n {\n <b>{{label()}}</b>\n }\n <span class=\"selected-text\">{{ getDisplayText() }}</span>\n <i class=\"fa-light fa-chevron-down\"></i>\n </button>\n\n <div\n *ngIf=\"isOpen\"\n class=\"tc-rev-dropdown-multi-menu\"\n [style.width]=\"this.width()\">\n\n <!-- Checkbox Selecionar/Limpar Todos -->\n <div class=\"tc-rev-dropdown-multi-actions\">\n <label\n class=\"tc-rev-dropdown-multi-select-all-label\"\n [class.selected]=\"isAllSelected()\">\n <input\n type=\"checkbox\"\n tcRevCheckbox\n [disabled]=\"disabled()\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isSomeSelected()\"\n (change)=\"toggleSelectAll($event)\">\n <span class=\"tc-rev-dropdown-multi-select-all-text\">Todos</span>\n </label>\n </div>\n\n <ul class=\"tc-rev-dropdown-multi-options\">\n @for (option of options(); track option?.value)\n {\n <li class=\"tc-rev-dropdown-multi-menu-item\">\n <label\n class=\"tc-rev-dropdown-multi-menu-item-label\"\n [class.disabled]=\"option?.disabled\"\n [class.selected]=\"isOptionSelected(option)\">\n <input\n type=\"checkbox\"\n tcRevCheckbox\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"option?.disabled\"\n (change)=\"toggleOption(option, $event)\">\n\n <span class=\"tc-rev-dropdown-multi-text\">\n {{ option?.displayValue }}\n </span>\n </label>\n </li>\n }\n </ul>\n </div>\n</div>\n", styles: ["input[type=checkbox].tc-rev-input-checkbox,input[type=checkbox].tc-rev-checkbox{position:initial;margin:initial}input[type=checkbox].tc-rev-input-checkbox:after,input[type=checkbox].tc-rev-input-checkbox:before,input[type=checkbox].tc-rev-checkbox:after,input[type=checkbox].tc-rev-checkbox:before{content:\"\";position:initial;border-radius:initial;background:initial;z-index:initial}input[type=checkbox].tc-rev-input-checkbox:after,input[type=checkbox].tc-rev-checkbox:after{height:initial;width:initial;left:initial;top:initial;margin:initial;border:initial}input[type=checkbox].tc-rev-input-checkbox:checked:before,input[type=checkbox].tc-rev-checkbox:checked:before{background:initial;height:initial;width:initial;margin:initial;z-index:initial;left:initial;top:initial;border:initial;border-width:initial;transform:initial}input[type=checkbox].tc-rev-input-checkbox:checked:after,input[type=checkbox].tc-rev-checkbox:checked:after{border-color:initial}input[type=checkbox].tc-rev-input-checkbox,input[type=checkbox].tc-rev-checkbox{appearance:none;-webkit-appearance:none;width:20px;height:20px;border:1.5px solid var(--c-neutral-700);border-radius:2px;background:#fff;cursor:pointer;position:relative;outline:none;transition:border-color .2s,background .2s;display:inline-block;vertical-align:middle}input[type=checkbox].tc-rev-input-checkbox:before,input[type=checkbox].tc-rev-checkbox:before{content:\"\";display:block;width:100%;height:100%;border-radius:2px;background:var(--c-neutral-50);transition:background .2s,border-color .2s;position:absolute;top:0;left:0;z-index:1}input[type=checkbox].tc-rev-input-checkbox:after,input[type=checkbox].tc-rev-checkbox:after{content:\"\";display:block;position:absolute;top:4px;left:2px;width:14px;height:10px;background:none;mask:none;-webkit-mask:none;pointer-events:none;z-index:2;transition:background .2s}input[type=checkbox].tc-rev-input-checkbox:checked,input[type=checkbox].tc-rev-checkbox:checked{border-color:var(--c-primary-500);background:var(--c-primary-500)}input[type=checkbox].tc-rev-input-checkbox:checked:before,input[type=checkbox].tc-rev-checkbox:checked:before{background:var(--c-primary-500)}input[type=checkbox].tc-rev-input-checkbox:checked:after,input[type=checkbox].tc-rev-checkbox:checked:after{background:#fff;mask:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"10\" viewBox=\"0 0 14 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1 5.5L5 9L13 1\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>') no-repeat center/contain;-webkit-mask:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"10\" viewBox=\"0 0 14 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1 5.5L5 9L13 1\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>') no-repeat center/contain}input[type=checkbox].tc-rev-input-checkbox:disabled,input[type=checkbox].tc-rev-checkbox:disabled{border-color:var(--c-neutral-300);cursor:not-allowed}input[type=checkbox].tc-rev-input-checkbox:disabled:checked,input[type=checkbox].tc-rev-checkbox:disabled:checked{background:var(--c-neutral-300)}input[type=checkbox].tc-rev-input-checkbox:disabled:checked:before,input[type=checkbox].tc-rev-checkbox:disabled:checked:before{background:var(--c-neutral-300)}:host{display:inline-block}.tc-rev-dropdown-multi{position:relative;display:inline-block}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle{background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:flex;align-items:center;justify-content:space-between;font-family:var(--f-family);font-size:var(--f-size-12);min-width:6.25rem;line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);text-align:left;gap:var(--size-4)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle--sm{height:var(--size-40)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle--md{height:var(--size-44)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle--lg{height:var(--size-48)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle:hover,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle:focus{border-color:var(--c-primary-500)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle:disabled,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle.disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle .selected-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle i{flex-shrink:0;transition:transform .2s ease}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle[aria-expanded=true] i{transform:rotate(-180deg)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu{box-shadow:var(--shadow-md);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);max-height:18.75rem;min-width:6.25rem;overflow:hidden;width:100%;z-index:1000;border:1px solid var(--c-neutral-200)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-8);line-height:var(--l-height-16);height:var(--size-32);margin:0;padding:var(--size-8);text-align:left;transition:.2s ease;width:100%}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label:hover{background-color:var(--c-primary-50);border-color:var(--c-primary-500)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label.selected:hover{border-color:transparent}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label.disabled,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label:disabled{color:var(--c-neutral-400);cursor:not-allowed}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label.disabled:hover,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label:disabled:hover{background-color:transparent;border-color:var(--c-neutral-50)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label .tc-rev-dropdown-multi-select-all-text{flex:1;-webkit-user-select:none;user-select:none}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options{list-style:none;margin:0;padding:0;max-height:15rem;overflow-y:auto}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-8);justify-content:space-between;line-height:var(--l-height-16);height:var(--size-32);margin:0;padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label:hover{background-color:var(--c-primary-50);border-color:var(--c-primary-500)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label.selected:hover{border-color:transparent}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label.disabled,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label:disabled{color:var(--c-neutral-400);cursor:not-allowed}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label.disabled:hover,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label:disabled:hover{background-color:transparent;border-color:var(--c-neutral-50)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label .tc-rev-dropdown-multi-text{flex:1;text-wrap:nowrap;overflow:hidden;text-overflow:ellipsis}.tc-rev-dropdown-multi-menu{animation:dropdownSlideIn .2s ease-out}@keyframes dropdownSlideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TcRevCheckboxDirective, selector: "input[type=\"checkbox\"][tcRevCheckbox]" }] }); }
|
|
11530
|
+
}
|
|
11531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownMultiComponent, decorators: [{
|
|
11532
|
+
type: Component,
|
|
11533
|
+
args: [{ selector: 'tc-rev-dropdown-multi', imports: [
|
|
11534
|
+
CommonModule,
|
|
11535
|
+
FormsModule,
|
|
11536
|
+
ReactiveFormsModule,
|
|
11537
|
+
TcRevCheckboxDirective
|
|
11538
|
+
], template: "<div\n class=\"tc-rev-dropdown-multi\"\n [class.disabled]=\"disabled()\">\n <button\n class=\"tc-rev-dropdown-multi-toggle\"\n [class.tc-rev-dropdown-multi-toggle--sm]=\"this.size() === dropdownSize.sm\"\n [class.tc-rev-dropdown-multi-toggle--md]=\"this.size() === dropdownSize.md\"\n [class.tc-rev-dropdown-multi-toggle--lg]=\"this.size() === dropdownSize.lg\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"disabled()\"\n [disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen\"\n [style.width]=\"this.width()\">\n @if (label())\n {\n <b>{{label()}}</b>\n }\n <span class=\"selected-text\">{{ getDisplayText() }}</span>\n <i class=\"fa-light fa-chevron-down\"></i>\n </button>\n\n <div\n *ngIf=\"isOpen\"\n class=\"tc-rev-dropdown-multi-menu\"\n [style.width]=\"this.width()\">\n\n <!-- Checkbox Selecionar/Limpar Todos -->\n <div class=\"tc-rev-dropdown-multi-actions\">\n <label\n class=\"tc-rev-dropdown-multi-select-all-label\"\n [class.selected]=\"isAllSelected()\">\n <input\n type=\"checkbox\"\n tcRevCheckbox\n [disabled]=\"disabled()\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isSomeSelected()\"\n (change)=\"toggleSelectAll($event)\">\n <span class=\"tc-rev-dropdown-multi-select-all-text\">Todos</span>\n </label>\n </div>\n\n <ul class=\"tc-rev-dropdown-multi-options\">\n @for (option of options(); track option?.value)\n {\n <li class=\"tc-rev-dropdown-multi-menu-item\">\n <label\n class=\"tc-rev-dropdown-multi-menu-item-label\"\n [class.disabled]=\"option?.disabled\"\n [class.selected]=\"isOptionSelected(option)\">\n <input\n type=\"checkbox\"\n tcRevCheckbox\n [checked]=\"isOptionSelected(option)\"\n [disabled]=\"option?.disabled\"\n (change)=\"toggleOption(option, $event)\">\n\n <span class=\"tc-rev-dropdown-multi-text\">\n {{ option?.displayValue }}\n </span>\n </label>\n </li>\n }\n </ul>\n </div>\n</div>\n", styles: ["input[type=checkbox].tc-rev-input-checkbox,input[type=checkbox].tc-rev-checkbox{position:initial;margin:initial}input[type=checkbox].tc-rev-input-checkbox:after,input[type=checkbox].tc-rev-input-checkbox:before,input[type=checkbox].tc-rev-checkbox:after,input[type=checkbox].tc-rev-checkbox:before{content:\"\";position:initial;border-radius:initial;background:initial;z-index:initial}input[type=checkbox].tc-rev-input-checkbox:after,input[type=checkbox].tc-rev-checkbox:after{height:initial;width:initial;left:initial;top:initial;margin:initial;border:initial}input[type=checkbox].tc-rev-input-checkbox:checked:before,input[type=checkbox].tc-rev-checkbox:checked:before{background:initial;height:initial;width:initial;margin:initial;z-index:initial;left:initial;top:initial;border:initial;border-width:initial;transform:initial}input[type=checkbox].tc-rev-input-checkbox:checked:after,input[type=checkbox].tc-rev-checkbox:checked:after{border-color:initial}input[type=checkbox].tc-rev-input-checkbox,input[type=checkbox].tc-rev-checkbox{appearance:none;-webkit-appearance:none;width:20px;height:20px;border:1.5px solid var(--c-neutral-700);border-radius:2px;background:#fff;cursor:pointer;position:relative;outline:none;transition:border-color .2s,background .2s;display:inline-block;vertical-align:middle}input[type=checkbox].tc-rev-input-checkbox:before,input[type=checkbox].tc-rev-checkbox:before{content:\"\";display:block;width:100%;height:100%;border-radius:2px;background:var(--c-neutral-50);transition:background .2s,border-color .2s;position:absolute;top:0;left:0;z-index:1}input[type=checkbox].tc-rev-input-checkbox:after,input[type=checkbox].tc-rev-checkbox:after{content:\"\";display:block;position:absolute;top:4px;left:2px;width:14px;height:10px;background:none;mask:none;-webkit-mask:none;pointer-events:none;z-index:2;transition:background .2s}input[type=checkbox].tc-rev-input-checkbox:checked,input[type=checkbox].tc-rev-checkbox:checked{border-color:var(--c-primary-500);background:var(--c-primary-500)}input[type=checkbox].tc-rev-input-checkbox:checked:before,input[type=checkbox].tc-rev-checkbox:checked:before{background:var(--c-primary-500)}input[type=checkbox].tc-rev-input-checkbox:checked:after,input[type=checkbox].tc-rev-checkbox:checked:after{background:#fff;mask:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"10\" viewBox=\"0 0 14 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1 5.5L5 9L13 1\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>') no-repeat center/contain;-webkit-mask:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"10\" viewBox=\"0 0 14 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1 5.5L5 9L13 1\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>') no-repeat center/contain}input[type=checkbox].tc-rev-input-checkbox:disabled,input[type=checkbox].tc-rev-checkbox:disabled{border-color:var(--c-neutral-300);cursor:not-allowed}input[type=checkbox].tc-rev-input-checkbox:disabled:checked,input[type=checkbox].tc-rev-checkbox:disabled:checked{background:var(--c-neutral-300)}input[type=checkbox].tc-rev-input-checkbox:disabled:checked:before,input[type=checkbox].tc-rev-checkbox:disabled:checked:before{background:var(--c-neutral-300)}:host{display:inline-block}.tc-rev-dropdown-multi{position:relative;display:inline-block}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle{background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-400);border-radius:var(--bor-radius-pill);color:var(--c-neutral-700);cursor:pointer;display:flex;align-items:center;justify-content:space-between;font-family:var(--f-family);font-size:var(--f-size-12);min-width:6.25rem;line-height:var(--l-height-16);outline:none;transition:.2s ease;padding:0 var(--size-16);text-align:left;gap:var(--size-4)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle--sm{height:var(--size-40)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle--md{height:var(--size-44)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle--lg{height:var(--size-48)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle:hover,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle:focus{border-color:var(--c-primary-500)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle:disabled,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle.disabled{border-color:var(--c-neutral-300);color:var(--c-neutral-300);cursor:not-allowed}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle .selected-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle i{flex-shrink:0;transition:transform .2s ease}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-toggle[aria-expanded=true] i{transform:rotate(-180deg)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu{box-shadow:var(--shadow-md);position:absolute;top:110%;left:0;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);max-height:18.75rem;min-width:6.25rem;overflow:hidden;width:100%;z-index:1000;border:1px solid var(--c-neutral-200)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-8);line-height:var(--l-height-16);height:var(--size-32);margin:0;padding:var(--size-8);text-align:left;transition:.2s ease;width:100%}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label:hover{background-color:var(--c-primary-50);border-color:var(--c-primary-500)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label.selected:hover{border-color:transparent}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label.disabled,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label:disabled{color:var(--c-neutral-400);cursor:not-allowed}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label.disabled:hover,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label:disabled:hover{background-color:transparent;border-color:var(--c-neutral-50)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-actions .tc-rev-dropdown-multi-select-all-label .tc-rev-dropdown-multi-select-all-text{flex:1;-webkit-user-select:none;user-select:none}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options{list-style:none;margin:0;padding:0;max-height:15rem;overflow-y:auto}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-900);cursor:pointer;display:flex;font-family:var(--f-family);font-size:var(--f-size-12);gap:var(--size-8);justify-content:space-between;line-height:var(--l-height-16);height:var(--size-32);margin:0;padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label:hover{background-color:var(--c-primary-50);border-color:var(--c-primary-500)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label.selected:hover{border-color:transparent}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label.disabled,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label:disabled{color:var(--c-neutral-400);cursor:not-allowed}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label.disabled:hover,.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label:disabled:hover{background-color:transparent;border-color:var(--c-neutral-50)}.tc-rev-dropdown-multi .tc-rev-dropdown-multi-menu .tc-rev-dropdown-multi-options .tc-rev-dropdown-multi-menu-item .tc-rev-dropdown-multi-menu-item-label .tc-rev-dropdown-multi-text{flex:1;text-wrap:nowrap;overflow:hidden;text-overflow:ellipsis}.tc-rev-dropdown-multi-menu{animation:dropdownSlideIn .2s ease-out}@keyframes dropdownSlideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
11539
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onDocumentClick: [{
|
|
11540
|
+
type: HostListener,
|
|
11541
|
+
args: ['document:click', ['$event']]
|
|
11542
|
+
}] } });
|
|
11543
|
+
|
|
11544
|
+
class TcRevDropdownSubMenuComponent {
|
|
11545
|
+
constructor() {
|
|
11546
|
+
this.items = input.required();
|
|
11547
|
+
this.position = input('right');
|
|
11548
|
+
this.parentOffsetTop = input.required();
|
|
11549
|
+
this.selectedOption = input();
|
|
11550
|
+
this.onOptionSelected = output();
|
|
11551
|
+
}
|
|
11552
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownSubMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11553
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevDropdownSubMenuComponent, isStandalone: true, selector: "tc-rev-dropdown-sub-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, parentOffsetTop: { classPropertyName: "parentOffsetTop", publicName: "parentOffsetTop", isSignal: true, isRequired: true, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "selectedOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onOptionSelected: "onOptionSelected" }, ngImport: i0, template: "<ul\n class=\"sub-menu\"\n [ngClass]=\"this.position()\"\n [style.top.px]=\"this.parentOffsetTop()\">\n @for (item of this.items(); track item.value)\n {\n <li\n class=\"sub-menu-item\"\n [class.selected]=\"this.selectedOption()?.value === item.value\"\n (click)=\"this.onOptionSelected.emit(item)\">\n {{ item.displayValue }}\n @if (this.selectedOption()?.value === item?.value)\n {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n @if (item.children?.length)\n {\n <tc-rev-dropdown-sub-menu\n [items]=\"item.children\"\n [position]=\"this.position()\"\n [parentOffsetTop]=\"0\"\n [selectedOption]=\"this.selectedOption()\">\n </tc-rev-dropdown-sub-menu>\n }\n </li>\n }\n</ul>\n", styles: [".sub-menu{background-color:var(--c-neutral-50);box-shadow:var(--shadow-md);list-style:none;max-height:15.625rem;min-width:160px;overflow-y:auto;padding:0;position:absolute;margin:0;z-index:1001}.sub-menu.right{left:100%}.sub-menu.left{right:100%}.sub-menu-item{padding:8px 16px;white-space:nowrap;position:relative;align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.sub-menu-item:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.sub-menu-item.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.sub-menu-item:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"], dependencies: [{ kind: "component", type: TcRevDropdownSubMenuComponent, selector: "tc-rev-dropdown-sub-menu", inputs: ["items", "position", "parentOffsetTop", "selectedOption"], outputs: ["onOptionSelected"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
11554
|
+
}
|
|
11555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownSubMenuComponent, decorators: [{
|
|
11556
|
+
type: Component,
|
|
11557
|
+
args: [{ selector: 'tc-rev-dropdown-sub-menu', imports: [CommonModule], template: "<ul\n class=\"sub-menu\"\n [ngClass]=\"this.position()\"\n [style.top.px]=\"this.parentOffsetTop()\">\n @for (item of this.items(); track item.value)\n {\n <li\n class=\"sub-menu-item\"\n [class.selected]=\"this.selectedOption()?.value === item.value\"\n (click)=\"this.onOptionSelected.emit(item)\">\n {{ item.displayValue }}\n @if (this.selectedOption()?.value === item?.value)\n {\n <i class=\"fa-light fa-circle-check\"></i>\n }\n @if (item.children?.length)\n {\n <tc-rev-dropdown-sub-menu\n [items]=\"item.children\"\n [position]=\"this.position()\"\n [parentOffsetTop]=\"0\"\n [selectedOption]=\"this.selectedOption()\">\n </tc-rev-dropdown-sub-menu>\n }\n </li>\n }\n</ul>\n", styles: [".sub-menu{background-color:var(--c-neutral-50);box-shadow:var(--shadow-md);list-style:none;max-height:15.625rem;min-width:160px;overflow-y:auto;padding:0;position:absolute;margin:0;z-index:1001}.sub-menu.right{left:100%}.sub-menu.left{right:100%}.sub-menu-item{padding:8px 16px;white-space:nowrap;position:relative;align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.sub-menu-item:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.sub-menu-item.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.sub-menu-item:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"] }]
|
|
11558
|
+
}] });
|
|
11559
|
+
|
|
11560
|
+
var MultiLevelDropdownSize;
|
|
11561
|
+
(function (MultiLevelDropdownSize) {
|
|
11562
|
+
MultiLevelDropdownSize["sm"] = "sm";
|
|
11563
|
+
MultiLevelDropdownSize["md"] = "md";
|
|
11564
|
+
MultiLevelDropdownSize["lg"] = "lg";
|
|
11565
|
+
})(MultiLevelDropdownSize || (MultiLevelDropdownSize = {}));
|
|
11566
|
+
class TcRevDropdownMultiLevelComponent {
|
|
11567
|
+
onDocumentClick(event) {
|
|
11568
|
+
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
11569
|
+
this.isOpen = false;
|
|
11570
|
+
}
|
|
11571
|
+
}
|
|
11572
|
+
constructor(elementRef) {
|
|
11573
|
+
this.elementRef = elementRef;
|
|
11574
|
+
this.dropdownSize = MultiLevelDropdownSize;
|
|
11575
|
+
this.menu = input.required();
|
|
11576
|
+
this.subMenuPosition = input('right');
|
|
11577
|
+
this.disabled = input(false);
|
|
11578
|
+
this.size = input(MultiLevelDropdownSize.sm);
|
|
11579
|
+
this.initialValue = input(null); // Valor pré-selecionado
|
|
11580
|
+
this.optionSelected = output();
|
|
11581
|
+
this.selectedOption = signal(null);
|
|
11582
|
+
this.selectedParentOption = signal(null);
|
|
11583
|
+
this.hoveredIndex = null;
|
|
11584
|
+
this.isOpen = false;
|
|
11585
|
+
}
|
|
11586
|
+
ngOnChanges(_simpleChanges) {
|
|
11587
|
+
// Atualiza a opção selecionada quando o valor pré-selecionado muda
|
|
11588
|
+
if (_simpleChanges['initialValue'] || _simpleChanges['menu']) {
|
|
11589
|
+
this.selectedOption.set(null);
|
|
11590
|
+
this.selectedParentOption.set(null);
|
|
11591
|
+
}
|
|
11592
|
+
}
|
|
11593
|
+
getItemOffsetTop(index) {
|
|
11594
|
+
if (!this.menuRoot)
|
|
11595
|
+
return 0;
|
|
11596
|
+
const items = this.menuRoot.nativeElement.querySelectorAll('.menu-item');
|
|
11597
|
+
if (items && items[index]) {
|
|
11598
|
+
return items[index].offsetTop;
|
|
11599
|
+
}
|
|
11600
|
+
return 0;
|
|
11601
|
+
}
|
|
11602
|
+
toggleDropdown() {
|
|
11603
|
+
this.isOpen = !this.isOpen;
|
|
11604
|
+
}
|
|
11605
|
+
selectOption(option, parentOption) {
|
|
11606
|
+
this.selectedOption.set(option);
|
|
11607
|
+
this.selectedParentOption.set(parentOption);
|
|
11608
|
+
this.optionSelected.emit({ option, parentOption }); // Emite apenas o valor da opção selecionada
|
|
11609
|
+
// this.isOpen = false; // Fecha o dropdown
|
|
11610
|
+
// this.hoveredIndex = null;
|
|
11611
|
+
}
|
|
11612
|
+
selectParentItem($event, option, parentOption) {
|
|
11613
|
+
$event.stopPropagation();
|
|
11614
|
+
if (parentOption?.children?.length)
|
|
11615
|
+
return;
|
|
11616
|
+
this.selectOption(option, parentOption);
|
|
11617
|
+
}
|
|
11618
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownMultiLevelComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11619
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevDropdownMultiLevelComponent, isStandalone: true, selector: "tc-rev-dropdown-multi-level", inputs: { menu: { classPropertyName: "menu", publicName: "menu", isSignal: true, isRequired: true, transformFunction: null }, subMenuPosition: { classPropertyName: "subMenuPosition", publicName: "subMenuPosition", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { optionSelected: "optionSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "menuRoot", first: true, predicate: ["menuRoot"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"tc-rev-dropdown-multi-level\">\n <button\n class=\"tc-rev-btn tc-rev-btn--sm tc-rev-btn--dark-outline tc-rev-dropdown-toggle\"\n [class.tc-rev-btn--sm]=\"this.size() === dropdownSize.sm\"\n [class.tc-rev-btn--md]=\"this.size() === dropdownSize.md\"\n [class.tc-rev-btn--lg]=\"this.size() === dropdownSize.lg\"\n [class.active]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"disabled()\">\n <ng-content></ng-content>\n </button>\n\n\t<ul class=\"tc-rev-dropdown-multi-level__menu-list\" #menuRoot>\n\t\t@if (isOpen)\n {\n @for (item of menu(); track $index; let i = $index)\n {\n <li \n class=\"menu-item\"\n [class.c-primary-500]=\"this.selectedParentOption()?.value === item?.value\"\n (mouseenter)=\"hoveredIndex = i\"\n (mouseleave)=\"hoveredIndex = null\"\n (click)=\"this.selectParentItem($event, item, item)\">\n {{ item.displayValue }}\n @if (this.selectedParentOption()?.value === item?.value)\n {\n <i class=\"fa-light fa-circle-check c-primary-500 mar-l-a\"></i>\n }\n @if (item?.children?.length && hoveredIndex === i)\n {\n <tc-rev-dropdown-sub-menu\n [items]=\"item.children\"\n [position]=\"subMenuPosition()\"\n [parentOffsetTop]=\"getItemOffsetTop(i)\"\n [selectedOption]=\"this.selectedOption()\"\n (onOptionSelected)=\"this.selectOption($event, item)\">\n </tc-rev-dropdown-sub-menu>\n }\n </li>\n }\n }\n\t</ul>\n</div>\n", styles: [":host{display:inline-block}.tc-rev-dropdown-multi-level{position:relative;display:inline-block}.tc-rev-dropdown-multi-level .tc-rev-dropdown-toggle{align-items:center;background-color:var(--c-neutral-50);display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-14);font-weight:var(--f-weight-600);gap:var(--size-8);line-height:var(--l-height-20);outline:none;transition:.2s ease;padding:0 var(--size-16)}.tc-rev-dropdown-multi-level .tc-rev-dropdown-toggle.active{background-color:var(--c-neutral-500);color:var(--c-neutral-50);border-color:var(--c-neutral-700)}.tc-rev-dropdown-multi-level__menu-list{background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);box-shadow:var(--shadow-md);color:var(--c-neutral-700);left:0;list-style:none;margin:0;max-height:15.625rem;overflow-y:auto;padding:0;position:absolute;top:110%;width:100%;z-index:1000}.tc-rev-dropdown-multi-level__menu-list .menu-item{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tc-rev-dropdown-multi-level__menu-list .menu-item:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.tc-rev-dropdown-multi-level__menu-list .menu-item.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-multi-level__menu-list .menu-item:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TcRevDropdownSubMenuComponent, selector: "tc-rev-dropdown-sub-menu", inputs: ["items", "position", "parentOffsetTop", "selectedOption"], outputs: ["onOptionSelected"] }] }); }
|
|
11620
|
+
}
|
|
11621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevDropdownMultiLevelComponent, decorators: [{
|
|
11622
|
+
type: Component,
|
|
11623
|
+
args: [{ selector: 'tc-rev-dropdown-multi-level', imports: [
|
|
11624
|
+
CommonModule,
|
|
11625
|
+
TcRevDropdownSubMenuComponent
|
|
11626
|
+
], template: "<div class=\"tc-rev-dropdown-multi-level\">\n <button\n class=\"tc-rev-btn tc-rev-btn--sm tc-rev-btn--dark-outline tc-rev-dropdown-toggle\"\n [class.tc-rev-btn--sm]=\"this.size() === dropdownSize.sm\"\n [class.tc-rev-btn--md]=\"this.size() === dropdownSize.md\"\n [class.tc-rev-btn--lg]=\"this.size() === dropdownSize.lg\"\n [class.active]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n [class.disabled]=\"disabled()\">\n <ng-content></ng-content>\n </button>\n\n\t<ul class=\"tc-rev-dropdown-multi-level__menu-list\" #menuRoot>\n\t\t@if (isOpen)\n {\n @for (item of menu(); track $index; let i = $index)\n {\n <li \n class=\"menu-item\"\n [class.c-primary-500]=\"this.selectedParentOption()?.value === item?.value\"\n (mouseenter)=\"hoveredIndex = i\"\n (mouseleave)=\"hoveredIndex = null\"\n (click)=\"this.selectParentItem($event, item, item)\">\n {{ item.displayValue }}\n @if (this.selectedParentOption()?.value === item?.value)\n {\n <i class=\"fa-light fa-circle-check c-primary-500 mar-l-a\"></i>\n }\n @if (item?.children?.length && hoveredIndex === i)\n {\n <tc-rev-dropdown-sub-menu\n [items]=\"item.children\"\n [position]=\"subMenuPosition()\"\n [parentOffsetTop]=\"getItemOffsetTop(i)\"\n [selectedOption]=\"this.selectedOption()\"\n (onOptionSelected)=\"this.selectOption($event, item)\">\n </tc-rev-dropdown-sub-menu>\n }\n </li>\n }\n }\n\t</ul>\n</div>\n", styles: [":host{display:inline-block}.tc-rev-dropdown-multi-level{position:relative;display:inline-block}.tc-rev-dropdown-multi-level .tc-rev-dropdown-toggle{align-items:center;background-color:var(--c-neutral-50);display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-14);font-weight:var(--f-weight-600);gap:var(--size-8);line-height:var(--l-height-20);outline:none;transition:.2s ease;padding:0 var(--size-16)}.tc-rev-dropdown-multi-level .tc-rev-dropdown-toggle.active{background-color:var(--c-neutral-500);color:var(--c-neutral-50);border-color:var(--c-neutral-700)}.tc-rev-dropdown-multi-level__menu-list{background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);box-shadow:var(--shadow-md);color:var(--c-neutral-700);left:0;list-style:none;margin:0;max-height:15.625rem;overflow-y:auto;padding:0;position:absolute;top:110%;width:100%;z-index:1000}.tc-rev-dropdown-multi-level__menu-list .menu-item{align-items:center;background-color:transparent;border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);cursor:pointer;display:flex;justify-content:space-between;font-size:var(--f-size-12);line-height:var(--l-height-16);height:var(--size-32);padding:var(--size-8);text-align:left;text-wrap:nowrap;transition:.2s ease;width:100%}.tc-rev-dropdown-multi-level__menu-list .menu-item:hover{border-color:var(--c-primary-500);color:var(--c-primary-500)}.tc-rev-dropdown-multi-level__menu-list .menu-item.selected{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-primary-500);font-weight:var(--f-weight-700)}.tc-rev-dropdown-multi-level__menu-list .menu-item:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-500);cursor:not-allowed}\n"] }]
|
|
11627
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onDocumentClick: [{
|
|
11628
|
+
type: HostListener,
|
|
11629
|
+
args: ['document:click', ['$event']]
|
|
11630
|
+
}], menuRoot: [{
|
|
11631
|
+
type: ViewChild,
|
|
11632
|
+
args: ['menuRoot', { static: false }]
|
|
11633
|
+
}] } });
|
|
11634
|
+
|
|
11635
|
+
/**
|
|
11636
|
+
*
|
|
11637
|
+
* @param echarts echars instance
|
|
11638
|
+
* @param chartData chart info to build the config
|
|
11639
|
+
* @returns a bar chart config for echarts with the given data
|
|
11640
|
+
*/
|
|
11641
|
+
function echartBarConfig(echarts, chartData) {
|
|
11642
|
+
const { xAxisName, xAxisLabels, seriesData, tooltipFormatter, yAxisLabelFormatter, xAxisLabelFormatter } = chartData;
|
|
11643
|
+
return {
|
|
11644
|
+
grid: {
|
|
11645
|
+
left: '6.5%',
|
|
11646
|
+
top: 48,
|
|
11647
|
+
right: '2%',
|
|
11648
|
+
bottom: 56
|
|
11649
|
+
},
|
|
11650
|
+
tooltip: {
|
|
11651
|
+
trigger: 'axis',
|
|
11652
|
+
backgroundColor: '#131313',
|
|
11653
|
+
formatter: tooltipFormatter,
|
|
11654
|
+
textStyle: {
|
|
11655
|
+
color: '#f3f3f3',
|
|
11656
|
+
fontSize: 12,
|
|
11657
|
+
fontFamily: 'Nunito Sans'
|
|
11658
|
+
}
|
|
11659
|
+
},
|
|
11660
|
+
xAxis: {
|
|
11661
|
+
type: 'category',
|
|
11662
|
+
axisLabel: {
|
|
11663
|
+
color: '#131313',
|
|
11664
|
+
fontSize: 14,
|
|
11665
|
+
fontFamily: 'Nunito Sans',
|
|
11666
|
+
margin: 16,
|
|
11667
|
+
formatter: xAxisLabelFormatter,
|
|
11668
|
+
},
|
|
11669
|
+
axisLine: {
|
|
11670
|
+
show: true,
|
|
11671
|
+
lineStyle: {
|
|
11672
|
+
color: '#BAC0C6'
|
|
11673
|
+
}
|
|
11674
|
+
},
|
|
11675
|
+
axisTick: {
|
|
11676
|
+
show: false
|
|
11677
|
+
},
|
|
11678
|
+
data: xAxisLabels,
|
|
11679
|
+
name: xAxisName,
|
|
11680
|
+
nameLocation: 'start',
|
|
11681
|
+
nameTextStyle: {
|
|
11682
|
+
align: 'left',
|
|
11683
|
+
color: '#131313',
|
|
11684
|
+
fontFamily: 'Nunito Sans',
|
|
11685
|
+
fontSize: 14,
|
|
11686
|
+
fontWeight: 700,
|
|
11687
|
+
padding: [0, 0, -46, -36]
|
|
11688
|
+
}
|
|
11689
|
+
},
|
|
11690
|
+
yAxis: {
|
|
11691
|
+
type: 'value',
|
|
11692
|
+
axisLine: {
|
|
11693
|
+
show: false
|
|
11694
|
+
},
|
|
11695
|
+
axisTick: {
|
|
11696
|
+
show: false
|
|
11697
|
+
},
|
|
11698
|
+
axisLabel: {
|
|
11699
|
+
formatter: yAxisLabelFormatter,
|
|
11700
|
+
align: 'left',
|
|
11701
|
+
color: '#131313',
|
|
11702
|
+
fontSize: 14,
|
|
11703
|
+
fontFamily: 'Nunito Sans',
|
|
11704
|
+
inside: false,
|
|
11705
|
+
padding: [-40, 0, 0, -40]
|
|
11706
|
+
}
|
|
11707
|
+
},
|
|
11708
|
+
series: seriesData.map((serie) => ({
|
|
11709
|
+
name: serie.serieName,
|
|
11710
|
+
type: 'bar',
|
|
11711
|
+
data: serie.values,
|
|
11712
|
+
itemStyle: {
|
|
11713
|
+
barBorderRadius: [8, 8, 8, 8],
|
|
11714
|
+
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
11715
|
+
{ offset: 0, color: '#0897E9' },
|
|
11716
|
+
{ offset: 1, color: '#75D8FF' }
|
|
11717
|
+
])
|
|
11718
|
+
}
|
|
11719
|
+
}))
|
|
11720
|
+
};
|
|
11721
|
+
}
|
|
11722
|
+
|
|
11723
|
+
class TcRevEmptyContentComponent {
|
|
11724
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevEmptyContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11725
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TcRevEmptyContentComponent, isStandalone: true, selector: "tc-rev-empty-content", ngImport: i0, template: "<div class=\"tc-rev-empty-content f-family f-sm c-neutral-700 pad-x-16 pad-y-16 bg-c-neutral-200 bor-rad-8\">\n <ng-content></ng-content>\n</div>\n", styles: [""] }); }
|
|
11726
|
+
}
|
|
11727
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevEmptyContentComponent, decorators: [{
|
|
11728
|
+
type: Component,
|
|
11729
|
+
args: [{ selector: 'tc-rev-empty-content', imports: [], template: "<div class=\"tc-rev-empty-content f-family f-sm c-neutral-700 pad-x-16 pad-y-16 bg-c-neutral-200 bor-rad-8\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
11730
|
+
}] });
|
|
11731
|
+
|
|
11732
|
+
class TcRevFaqComponent {
|
|
11733
|
+
constructor() {
|
|
11734
|
+
this.title = 'Dúvidas frequentes';
|
|
11735
|
+
this.questions = [];
|
|
11736
|
+
this.openIndex = signal(null);
|
|
11737
|
+
}
|
|
11738
|
+
toggle(index) {
|
|
11739
|
+
if (this.openIndex() === index) {
|
|
11740
|
+
this.openIndex.set(null);
|
|
11741
|
+
}
|
|
11742
|
+
else {
|
|
11743
|
+
this.openIndex.set(index);
|
|
11744
|
+
}
|
|
11745
|
+
}
|
|
11746
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevFaqComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11747
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TcRevFaqComponent, isStandalone: true, selector: "tc-rev-faq", inputs: { title: "title", questions: "questions" }, ngImport: i0, template: "<div class=\"tc-rev-faq\">\n <div class=\"tc-rev-faq-list\">\n <div\n class=\"tc-rev-faq-item f-family c-neutral-700 f-size-16\"\n [class.open]=\"openIndex() === i\"\n *ngFor=\"let q of questions; let i = index\"\n (click)=\"toggle(i)\"\n >\n <div class=\"tc-rev-faq-question\">\n <p>{{ q.question }}</p>\n <i class=\"fa-light fa-angle-down arrow\" [class.open]=\"openIndex() === i\"></i>\n </div>\n\n <div\n class=\"tc-rev-faq-answer\"\n >\n <p>{{ q.answer }}</p>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}.tc-rev-faq{background-color:var(--c-neutral-50)}.tc-rev-faq .faq-header{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem}.tc-rev-faq .faq-header .icon{width:48px;height:48px;background:var(--c-neutral-200);border-radius:var(--bor-radius-rounded);display:flex;align-items:center;justify-content:center;color:var(--c-neutral-700)}.tc-rev-faq .faq-header .icon i{font-size:1.5rem;color:var(--c-neutral-700)}.tc-rev-faq .faq-header h2{font-size:var(--f-size-20);font-weight:var(--f-weight-700);font-family:var(--f-family)}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item{border-top:1px solid var(--c-neutral-300);cursor:pointer;height:var(--size-56);overflow:hidden;padding:var(--size-16);transition:all .2s ease}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item.open{height:auto;overflow:visible}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item:first-child{border-top:none}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-question{display:flex;justify-content:space-between;align-items:center}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-question p{margin:0}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-question .arrow{transition:all .3s ease}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-question .arrow.open{transform:rotate(180deg)}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-answer{border:0;margin-top:1rem;padding:0}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-answer p{margin:0;line-height:1.6}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11748
|
+
}
|
|
11749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevFaqComponent, decorators: [{
|
|
11750
|
+
type: Component,
|
|
11751
|
+
args: [{ selector: 'tc-rev-faq', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"tc-rev-faq\">\n <div class=\"tc-rev-faq-list\">\n <div\n class=\"tc-rev-faq-item f-family c-neutral-700 f-size-16\"\n [class.open]=\"openIndex() === i\"\n *ngFor=\"let q of questions; let i = index\"\n (click)=\"toggle(i)\"\n >\n <div class=\"tc-rev-faq-question\">\n <p>{{ q.question }}</p>\n <i class=\"fa-light fa-angle-down arrow\" [class.open]=\"openIndex() === i\"></i>\n </div>\n\n <div\n class=\"tc-rev-faq-answer\"\n >\n <p>{{ q.answer }}</p>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}.tc-rev-faq{background-color:var(--c-neutral-50)}.tc-rev-faq .faq-header{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem}.tc-rev-faq .faq-header .icon{width:48px;height:48px;background:var(--c-neutral-200);border-radius:var(--bor-radius-rounded);display:flex;align-items:center;justify-content:center;color:var(--c-neutral-700)}.tc-rev-faq .faq-header .icon i{font-size:1.5rem;color:var(--c-neutral-700)}.tc-rev-faq .faq-header h2{font-size:var(--f-size-20);font-weight:var(--f-weight-700);font-family:var(--f-family)}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item{border-top:1px solid var(--c-neutral-300);cursor:pointer;height:var(--size-56);overflow:hidden;padding:var(--size-16);transition:all .2s ease}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item.open{height:auto;overflow:visible}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item:first-child{border-top:none}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-question{display:flex;justify-content:space-between;align-items:center}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-question p{margin:0}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-question .arrow{transition:all .3s ease}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-question .arrow.open{transform:rotate(180deg)}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-answer{border:0;margin-top:1rem;padding:0}.tc-rev-faq .tc-rev-faq-list .tc-rev-faq-item .tc-rev-faq-answer p{margin:0;line-height:1.6}\n"] }]
|
|
11752
|
+
}], propDecorators: { title: [{
|
|
11753
|
+
type: Input
|
|
11754
|
+
}], questions: [{
|
|
11755
|
+
type: Input
|
|
11756
|
+
}] } });
|
|
11757
|
+
|
|
11758
|
+
class TcRevInputContainerComponent {
|
|
11759
|
+
constructor() {
|
|
11760
|
+
this.fullWidth = input(false);
|
|
11761
|
+
this.inputId = input('');
|
|
11762
|
+
this.label = input('');
|
|
11763
|
+
this.labelPosition = input('top');
|
|
11764
|
+
this.required = input(false);
|
|
11765
|
+
}
|
|
11766
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevInputContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11767
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevInputContainerComponent, isStandalone: true, selector: "tc-rev-input-container", inputs: { fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"{{ 'tc-rev-input-container ' + 'label-' + this.labelPosition() }}\"\n [class.full-width]=\"this.fullWidth()\">\n @if (this.label()) {\n @if (this.inputId()) {\n <label\n class=\"tc-rev-input-label cursor-pointer\" [for]=\"this.inputId()\">\n {{this.label()}}\n @if (this.required()) {\n <ng-container *ngTemplateOutlet=\"required\" />\n }\n </label>\n }\n @else {\n <label\n class=\"tc-rev-input-label\">\n {{this.label()}}\n @if (this.required()) {\n <ng-container *ngTemplateOutlet=\"required\" />\n }\n </label>\n }\n }\n <ng-content />\n</div>\n\n\n<ng-template #required>\n <span class=\"c-danger-500\">*</span>\n</ng-template>\n", styles: [":host{display:block}.tc-rev-input-container{display:inline-flex;gap:var(--size-4)}.tc-rev-input-container.full-width{width:100%}.tc-rev-input-container .tc-rev-input-label{font-family:var(--f-family);font-size:var(--f-size-14);font-weight:var(--f-weight-600);color:var(--c-neutral-700);line-height:var(--l-height-20);margin:0}.tc-rev-input-container.label-top{flex-direction:column}.tc-rev-input-container.label-right{align-items:center;flex-direction:row-reverse}.tc-rev-input-container.label-bottom{flex-direction:column-reverse}.tc-rev-input-container.label-left{align-items:center;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
11768
|
+
}
|
|
11769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevInputContainerComponent, decorators: [{
|
|
11770
|
+
type: Component,
|
|
11771
|
+
args: [{ selector: 'tc-rev-input-container', imports: [CommonModule], template: "<div\n class=\"{{ 'tc-rev-input-container ' + 'label-' + this.labelPosition() }}\"\n [class.full-width]=\"this.fullWidth()\">\n @if (this.label()) {\n @if (this.inputId()) {\n <label\n class=\"tc-rev-input-label cursor-pointer\" [for]=\"this.inputId()\">\n {{this.label()}}\n @if (this.required()) {\n <ng-container *ngTemplateOutlet=\"required\" />\n }\n </label>\n }\n @else {\n <label\n class=\"tc-rev-input-label\">\n {{this.label()}}\n @if (this.required()) {\n <ng-container *ngTemplateOutlet=\"required\" />\n }\n </label>\n }\n }\n <ng-content />\n</div>\n\n\n<ng-template #required>\n <span class=\"c-danger-500\">*</span>\n</ng-template>\n", styles: [":host{display:block}.tc-rev-input-container{display:inline-flex;gap:var(--size-4)}.tc-rev-input-container.full-width{width:100%}.tc-rev-input-container .tc-rev-input-label{font-family:var(--f-family);font-size:var(--f-size-14);font-weight:var(--f-weight-600);color:var(--c-neutral-700);line-height:var(--l-height-20);margin:0}.tc-rev-input-container.label-top{flex-direction:column}.tc-rev-input-container.label-right{align-items:center;flex-direction:row-reverse}.tc-rev-input-container.label-bottom{flex-direction:column-reverse}.tc-rev-input-container.label-left{align-items:center;flex-direction:row}\n"] }]
|
|
11772
|
+
}] });
|
|
11773
|
+
|
|
11774
|
+
class TcRevInputDirective {
|
|
11775
|
+
constructor(_el) {
|
|
11776
|
+
this._el = _el;
|
|
11777
|
+
this.fullWidth = input(false);
|
|
11778
|
+
effect(() => {
|
|
11779
|
+
this.setClasses();
|
|
11780
|
+
});
|
|
11781
|
+
}
|
|
11782
|
+
setClasses() {
|
|
11783
|
+
this.fullWidth() ? this._el.nativeElement.classList.add('tc-rev-input-control--full-width') : null;
|
|
11784
|
+
}
|
|
11785
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevInputDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11786
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.20", type: TcRevInputDirective, isStandalone: true, selector: "input[tcRevInput], select[tcRevInput]", inputs: { fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tc-rev-input-control" }, ngImport: i0 }); }
|
|
11787
|
+
}
|
|
11788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevInputDirective, decorators: [{
|
|
11789
|
+
type: Directive,
|
|
11790
|
+
args: [{
|
|
11791
|
+
selector: 'input[tcRevInput], select[tcRevInput]',
|
|
11792
|
+
host: {
|
|
11793
|
+
class: 'tc-rev-input-control'
|
|
11794
|
+
}
|
|
11795
|
+
}]
|
|
11796
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
11797
|
+
|
|
11798
|
+
class TcRevLoadingComponent {
|
|
11799
|
+
constructor() {
|
|
11800
|
+
this.message = input('Carregando');
|
|
11801
|
+
}
|
|
11802
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11803
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: TcRevLoadingComponent, isStandalone: true, selector: "tc-rev-loading", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"tc-rev-loading-overlay\">\n <div class=\"tc-rev-loading-container\">\n <span\n class=\"tc-rev-loading-spinner\">\n </span>\n <p class=\"tc-rev-loading-message\">{{message()}}...</p>\n </div>\n</div>\n", styles: ["@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tc-rev-loading-overlay{background:#00000080;display:grid;inset:0;place-items:center;position:fixed;z-index:1000}.tc-rev-loading-overlay .tc-rev-loading-container{align-items:center;display:flex;flex-direction:column;gap:.5rem}.tc-rev-loading-overlay .tc-rev-loading-container .tc-rev-loading-spinner{animation:rotation 1s linear infinite;border:8px solid var(--c-neutral-200);border-bottom-color:var(--c-neutral-500);border-radius:50%;box-sizing:border-box;display:block;height:8rem;width:8rem}.tc-rev-loading-overlay .tc-rev-loading-container .tc-rev-loading-message{background-color:var(--c-neutral-600);border-radius:var(--bor-radius-8);color:var(--c-neutral-50);font-family:var(--f-family);font-size:var(--f-size-16);margin:var(--size-12) 0 0 0;padding:var(--size-4) var(--size-12)}\n"] }); }
|
|
11804
|
+
}
|
|
11805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevLoadingComponent, decorators: [{
|
|
11806
|
+
type: Component,
|
|
11807
|
+
args: [{ selector: 'tc-rev-loading', imports: [], template: "<div class=\"tc-rev-loading-overlay\">\n <div class=\"tc-rev-loading-container\">\n <span\n class=\"tc-rev-loading-spinner\">\n </span>\n <p class=\"tc-rev-loading-message\">{{message()}}...</p>\n </div>\n</div>\n", styles: ["@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tc-rev-loading-overlay{background:#00000080;display:grid;inset:0;place-items:center;position:fixed;z-index:1000}.tc-rev-loading-overlay .tc-rev-loading-container{align-items:center;display:flex;flex-direction:column;gap:.5rem}.tc-rev-loading-overlay .tc-rev-loading-container .tc-rev-loading-spinner{animation:rotation 1s linear infinite;border:8px solid var(--c-neutral-200);border-bottom-color:var(--c-neutral-500);border-radius:50%;box-sizing:border-box;display:block;height:8rem;width:8rem}.tc-rev-loading-overlay .tc-rev-loading-container .tc-rev-loading-message{background-color:var(--c-neutral-600);border-radius:var(--bor-radius-8);color:var(--c-neutral-50);font-family:var(--f-family);font-size:var(--f-size-16);margin:var(--size-12) 0 0 0;padding:var(--size-4) var(--size-12)}\n"] }]
|
|
11808
|
+
}] });
|
|
11809
|
+
|
|
11810
|
+
class TcRevMessageComponent {
|
|
11811
|
+
constructor() {
|
|
11812
|
+
this.message = '';
|
|
11813
|
+
this.type = 'info';
|
|
11814
|
+
}
|
|
11815
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11816
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TcRevMessageComponent, isStandalone: true, selector: "tc-rev-message", inputs: { message: "message", type: "type" }, ngImport: i0, template: "<div class=\"message\" [ngClass]=\"type\" *ngIf=\"message\">\n <i class=\"icon fas\" [ngClass]=\"{\n 'fa-check': type === 'success',\n 'fa-times': type === 'error',\n 'fa-info-circle': type === 'info',\n 'fa-exclamation-triangle': type === 'warning'\n }\"></i>\n <i class=\"text\">{{ message }}</i>\n</div>\n", styles: [":host{display:block}.message{padding:.75rem 1rem;border-radius:6px;font-size:14px;display:flex;align-items:center;gap:.5rem;margin:8px 0}.message.success{background-color:var(--c-success-300);color:var(--c-success-500);border:1px solid var(--c-success-300)}.message.error{background-color:var(--c-danger-300);color:var(--c-danger-500);border:1px solid var(--c-danger-300)}.message.info{background-color:var(--c-info-300);color:var(--c-info-500);border:1px solid var(--c-info-300)}.message.warning{background-color:var(--c-alert-300);color:var(--c-alert-500);border:1px solid var(--c-alert-300)}.message .icon{font-size:16px}.message .text{flex:1;font-style:normal}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11817
|
+
}
|
|
11818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevMessageComponent, decorators: [{
|
|
11819
|
+
type: Component,
|
|
11820
|
+
args: [{ selector: 'tc-rev-message', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"message\" [ngClass]=\"type\" *ngIf=\"message\">\n <i class=\"icon fas\" [ngClass]=\"{\n 'fa-check': type === 'success',\n 'fa-times': type === 'error',\n 'fa-info-circle': type === 'info',\n 'fa-exclamation-triangle': type === 'warning'\n }\"></i>\n <i class=\"text\">{{ message }}</i>\n</div>\n", styles: [":host{display:block}.message{padding:.75rem 1rem;border-radius:6px;font-size:14px;display:flex;align-items:center;gap:.5rem;margin:8px 0}.message.success{background-color:var(--c-success-300);color:var(--c-success-500);border:1px solid var(--c-success-300)}.message.error{background-color:var(--c-danger-300);color:var(--c-danger-500);border:1px solid var(--c-danger-300)}.message.info{background-color:var(--c-info-300);color:var(--c-info-500);border:1px solid var(--c-info-300)}.message.warning{background-color:var(--c-alert-300);color:var(--c-alert-500);border:1px solid var(--c-alert-300)}.message .icon{font-size:16px}.message .text{flex:1;font-style:normal}\n"] }]
|
|
11821
|
+
}], propDecorators: { message: [{
|
|
11822
|
+
type: Input
|
|
11823
|
+
}], type: [{
|
|
11824
|
+
type: Input
|
|
11825
|
+
}] } });
|
|
11826
|
+
|
|
11827
|
+
class TcRevMultiInputComponent {
|
|
11828
|
+
constructor() {
|
|
11829
|
+
this.autoFocus = false;
|
|
11830
|
+
this.initialValue = input('');
|
|
11831
|
+
this.description = input('');
|
|
11832
|
+
this.initialList = input([]); // Deprecated - use items instead
|
|
11833
|
+
this.items = model([]); // Two-way binding para a lista de itens
|
|
11834
|
+
this.validators = input([]);
|
|
11835
|
+
this.disabled = input(false);
|
|
11836
|
+
this.itemsList = signal([]);
|
|
11837
|
+
this.onChangeList = output();
|
|
11838
|
+
effect(() => {
|
|
11839
|
+
this.disabled() ? this.multiInputForm?.get('multiInput')?.disable() : this.multiInputForm?.get('multiInput')?.enable();
|
|
11840
|
+
});
|
|
11841
|
+
}
|
|
11842
|
+
ngOnInit() {
|
|
11843
|
+
this.multiInputForm = new FormGroup({
|
|
11844
|
+
multiInput: new FormControl('', [Validators.required, ...this.validators()])
|
|
11845
|
+
});
|
|
11846
|
+
// Prioriza os itens do model, mas mantém compatibilidade com initialList
|
|
11847
|
+
const itemsToUse = this.items().length > 0 ? this.items() : this.initialList();
|
|
11848
|
+
if (itemsToUse?.length) {
|
|
11849
|
+
this.itemsList.set([...itemsToUse]);
|
|
11850
|
+
}
|
|
11851
|
+
// Se não havia itens no model mas havia initialList, sincroniza o model
|
|
11852
|
+
if (this.items().length === 0 && this.initialList().length > 0) {
|
|
11853
|
+
this.items.set([...this.initialList()]);
|
|
11854
|
+
}
|
|
11855
|
+
// Escuta mudanças no model e atualiza a lista interna
|
|
11856
|
+
this.items.subscribe((newItems) => {
|
|
11857
|
+
// Só atualiza se realmente mudou para evitar loops
|
|
11858
|
+
const currentItems = this.itemsList();
|
|
11859
|
+
if (JSON.stringify(currentItems) !== JSON.stringify(newItems)) {
|
|
11860
|
+
this.itemsList.set([...newItems]);
|
|
11861
|
+
}
|
|
11862
|
+
});
|
|
11863
|
+
setTimeout(() => {
|
|
11864
|
+
if (this.initialValue() !== '') {
|
|
11865
|
+
this.autoFocus = true;
|
|
11866
|
+
this.multiInputForm?.get('multiInput')?.setValue(this.initialValue());
|
|
11867
|
+
}
|
|
11868
|
+
});
|
|
11869
|
+
}
|
|
11870
|
+
ngAfterViewInit() {
|
|
11871
|
+
setTimeout(() => {
|
|
11872
|
+
if (this.autoFocus) {
|
|
11873
|
+
this.multiInputRef?.nativeElement?.focus();
|
|
11874
|
+
}
|
|
11875
|
+
}, 0);
|
|
11876
|
+
}
|
|
11877
|
+
isEllipsed(text) {
|
|
11878
|
+
return isTextEllipsed(text);
|
|
11879
|
+
}
|
|
11880
|
+
addItem() {
|
|
11881
|
+
const newItem = this.multiInputForm?.get('multiInput').value;
|
|
11882
|
+
this.itemsList.update((currentItems) => {
|
|
11883
|
+
const updatedItems = currentItems.includes(newItem)
|
|
11884
|
+
? currentItems
|
|
11885
|
+
: [...currentItems, newItem];
|
|
11886
|
+
// Atualiza o model com two-way binding
|
|
11887
|
+
this.items.set([...updatedItems]);
|
|
11888
|
+
this.onChangeList.emit(updatedItems);
|
|
11889
|
+
return updatedItems;
|
|
11890
|
+
});
|
|
11891
|
+
this.multiInputForm?.reset();
|
|
11892
|
+
}
|
|
11893
|
+
removeItem(index) {
|
|
11894
|
+
this.itemsList.update((currentItems) => {
|
|
11895
|
+
const newItems = [...currentItems];
|
|
11896
|
+
newItems.splice(index, 1);
|
|
11897
|
+
// Atualiza o model com two-way binding
|
|
11898
|
+
this.items.set([...newItems]);
|
|
11899
|
+
this.onChangeList.emit(newItems);
|
|
11900
|
+
return newItems;
|
|
11901
|
+
});
|
|
11902
|
+
}
|
|
11903
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevMultiInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11904
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevMultiInputComponent, isStandalone: true, selector: "tc-rev-multi-input", inputs: { autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: false, isRequired: false, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, initialList: { classPropertyName: "initialList", publicName: "initialList", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, validators: { classPropertyName: "validators", publicName: "validators", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", onChangeList: "onChangeList" }, viewQueries: [{ propertyName: "multiInputRef", first: true, predicate: ["multiInputRef "], descendants: true }], ngImport: i0, template: "<div class=\"tc-rev-multi-input\">\n\t<div class=\"tc-rev-multi-input__input-container\">\n\t\t<form\n [formGroup]=\"multiInputForm\"\n (ngSubmit)=\"addItem()\">\n\n <input\n #multiInputRef\n type=\"text\"\n class=\"tc-rev-input-control\"\n formControlName=\"multiInput\"\n />\n\n <button\n class=\"tc-rev-btn tc-rev-btn--sm tc-rev-btn--primary-filled add-button\"\n type=\"submit\"\n [disabled]=\"multiInputForm.invalid || disabled()\">\n\t\t\t\tAdicionar\n\t\t\t</button>\n\t\t</form>\n\t</div>\n\n\t@if (description()) {\n <span class=\"description f-sm c-neutral-700 mar-t-4 mar-b-16 d-block\">\n {{ description() }}\n </span>\n\t}\n\n @if (itemsList().length > 0) {\n <div class=\"tc-rev-multi-input__added-list\">\n @for (item of itemsList(); track item; let i = $index) {\n <div class=\"list-item h-28 pad-x-8 f-md f-weight-500 bor-rad-4 bg-c-neutral-100\">\n <span\n class=\"c-primary-500 mar-r-4 list-item__text\"\n [tcRevTooltip]=\"isEllipsed(item) ? item : ''\"\n position=\"top\">{{ item }}</span>\n\n <button class=\"h-24 w-24 d-inline-block cursor-pointer bg-c-transparent c-neutral-700 bor-none\" (click)=\"removeItem(i)\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{display:block}.tc-rev-multi-input__input-container{height:var(--size-40);position:relative}.tc-rev-multi-input__input-container .tc-rev-input-control{height:var(--size-40);position:absolute;top:0;left:0;width:100%;z-index:1}.tc-rev-multi-input__input-container .add-button{display:block;height:var(--size-34);min-height:var(--size-34);max-height:var(--size-34);position:absolute;right:3px;top:3px;width:6.125rem;z-index:2}.tc-rev-multi-input__added-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.tc-rev-multi-input__added-list .list-item{align-content:center;max-width:12.5rem;display:flex;align-items:center}.tc-rev-multi-input__added-list .list-item__text{flex:1;max-width:calc(100% - 1.75rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TcRevTooltipDirective, selector: "[tcRevTooltip]", inputs: ["tcRevTooltip", "position"] }] }); }
|
|
11905
|
+
}
|
|
11906
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevMultiInputComponent, decorators: [{
|
|
11907
|
+
type: Component,
|
|
11908
|
+
args: [{ selector: 'tc-rev-multi-input', imports: [
|
|
11909
|
+
CommonModule,
|
|
11910
|
+
ReactiveFormsModule,
|
|
11911
|
+
TcRevTooltipDirective
|
|
11912
|
+
], template: "<div class=\"tc-rev-multi-input\">\n\t<div class=\"tc-rev-multi-input__input-container\">\n\t\t<form\n [formGroup]=\"multiInputForm\"\n (ngSubmit)=\"addItem()\">\n\n <input\n #multiInputRef\n type=\"text\"\n class=\"tc-rev-input-control\"\n formControlName=\"multiInput\"\n />\n\n <button\n class=\"tc-rev-btn tc-rev-btn--sm tc-rev-btn--primary-filled add-button\"\n type=\"submit\"\n [disabled]=\"multiInputForm.invalid || disabled()\">\n\t\t\t\tAdicionar\n\t\t\t</button>\n\t\t</form>\n\t</div>\n\n\t@if (description()) {\n <span class=\"description f-sm c-neutral-700 mar-t-4 mar-b-16 d-block\">\n {{ description() }}\n </span>\n\t}\n\n @if (itemsList().length > 0) {\n <div class=\"tc-rev-multi-input__added-list\">\n @for (item of itemsList(); track item; let i = $index) {\n <div class=\"list-item h-28 pad-x-8 f-md f-weight-500 bor-rad-4 bg-c-neutral-100\">\n <span\n class=\"c-primary-500 mar-r-4 list-item__text\"\n [tcRevTooltip]=\"isEllipsed(item) ? item : ''\"\n position=\"top\">{{ item }}</span>\n\n <button class=\"h-24 w-24 d-inline-block cursor-pointer bg-c-transparent c-neutral-700 bor-none\" (click)=\"removeItem(i)\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{display:block}.tc-rev-multi-input__input-container{height:var(--size-40);position:relative}.tc-rev-multi-input__input-container .tc-rev-input-control{height:var(--size-40);position:absolute;top:0;left:0;width:100%;z-index:1}.tc-rev-multi-input__input-container .add-button{display:block;height:var(--size-34);min-height:var(--size-34);max-height:var(--size-34);position:absolute;right:3px;top:3px;width:6.125rem;z-index:2}.tc-rev-multi-input__added-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.tc-rev-multi-input__added-list .list-item{align-content:center;max-width:12.5rem;display:flex;align-items:center}.tc-rev-multi-input__added-list .list-item__text{flex:1;max-width:calc(100% - 1.75rem);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
11913
|
+
}], ctorParameters: () => [], propDecorators: { autoFocus: [{
|
|
11914
|
+
type: Input
|
|
11915
|
+
}], multiInputRef: [{
|
|
11916
|
+
type: ViewChild,
|
|
11917
|
+
args: ['multiInputRef ']
|
|
11918
|
+
}] } });
|
|
11919
|
+
|
|
11920
|
+
class TcRevPaginationComponent {
|
|
11921
|
+
constructor() {
|
|
11922
|
+
this.currentPage = 1;
|
|
11923
|
+
this.totalPages = 1;
|
|
11924
|
+
this.pageChange = new EventEmitter();
|
|
11925
|
+
this.pageInputError = false;
|
|
11926
|
+
}
|
|
11927
|
+
previous() {
|
|
11928
|
+
if (this.currentPage > 1) {
|
|
11929
|
+
this.currentPage--;
|
|
11930
|
+
this.pageChange.emit(this.currentPage);
|
|
11931
|
+
}
|
|
11932
|
+
}
|
|
11933
|
+
next() {
|
|
11934
|
+
if (this.currentPage < this.totalPages) {
|
|
11935
|
+
this.currentPage++;
|
|
11936
|
+
this.pageChange.emit(this.currentPage);
|
|
11937
|
+
}
|
|
11938
|
+
}
|
|
11939
|
+
goToPage(event) {
|
|
11940
|
+
const input = event.target;
|
|
11941
|
+
const value = input.value;
|
|
11942
|
+
let pageNumber = parseInt(value.replace(/^0+/, ''), 10);
|
|
11943
|
+
if (isNaN(pageNumber) || pageNumber < 1 || pageNumber > this.totalPages) {
|
|
11944
|
+
this.pageInputError = true;
|
|
11945
|
+
if (isNaN(pageNumber) || pageNumber < 1) {
|
|
11946
|
+
pageNumber = 1;
|
|
11947
|
+
}
|
|
11948
|
+
else if (pageNumber > this.totalPages) {
|
|
11949
|
+
pageNumber = this.totalPages;
|
|
11950
|
+
}
|
|
11951
|
+
}
|
|
11952
|
+
else {
|
|
11953
|
+
this.pageInputError = false;
|
|
11954
|
+
}
|
|
11955
|
+
input.value = this.formatPage(pageNumber);
|
|
11956
|
+
if (pageNumber !== this.currentPage) {
|
|
11957
|
+
this.currentPage = pageNumber;
|
|
11958
|
+
this.pageChange.emit(this.currentPage);
|
|
11959
|
+
}
|
|
11960
|
+
}
|
|
11961
|
+
formatPage(page) {
|
|
11962
|
+
return page < 10 ? `0${page}` : `${page}`;
|
|
11963
|
+
}
|
|
11964
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11965
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TcRevPaginationComponent, isStandalone: true, selector: "tc-rev-pagination", inputs: { currentPage: "currentPage", totalPages: "totalPages" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pagination-container\">\n\t<button class=\"arrow\" [disabled]=\"currentPage === 1\" (click)=\"previous()\"><i class=\"fas fa-angle-left\"></i></button>\n\n\t<span class=\"label f-family f-weight-600 f-size-14 c-neutral-700\">P\u00E1gina</span>\n\n\t<div class=\"page-input-container\">\n\t\t<input\n\t\t\ttype=\"text\"\n\t\t\tclass=\"page-input\"\n\t\t\t[ngClass]=\"{'error': pageInputError}\"\n\t\t\t[value]=\"formatPage(currentPage)\"\n\t\t\t(keyup.enter)=\"goToPage($event)\"\n\t\t\t(blur)=\"goToPage($event)\"\n\t\t/>\n\t</div>\n\n\t<span class=\"label f-family f-weight-600 f-size-14 c-neutral-700\">de {{ totalPages }}</span>\n\n\t<button class=\"arrow\" [disabled]=\"currentPage === totalPages\" (click)=\"next()\"><i class=\"fas fa-angle-right\"></i></button>\n</div>\n", styles: [":host{display:block}.pagination-container{display:flex;align-items:center;gap:8px;font-family:var(--f-family);justify-content:center}.pagination-container .label{color:var(--c-neutral-700)}.pagination-container .page-input-container{position:relative;width:48px;height:32px}.pagination-container .page-input{width:100%;height:100%;padding:var(--size-4) var(--size-8);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-8);font-size:var(--f-size-14);font-family:var(--f-family);font-weight:var(--f-weight-600);color:var(--c-neutral-700);text-align:center;background-color:var(--c-neutral-50);outline:none;transition:border-color .2s ease}.pagination-container .page-input:focus:not(.error){border-color:var(--c-primary-500)}.pagination-container .page-input.error{border-color:var(--c-danger-500)}.pagination-container .page-input.error:focus{border-color:var(--c-danger-500)}.pagination-container .arrow{background-color:var(--c-neutral-100);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-8);width:32px;height:32px;font-size:var(--f-size-16);color:var(--c-neutral-300);cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center}.pagination-container .arrow:disabled{cursor:not-allowed;opacity:.5}.pagination-container .arrow:hover:not(:disabled){background-color:var(--c-primary-100);border-color:var(--c-primary-300);color:var(--c-primary-500)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11966
|
+
}
|
|
11967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevPaginationComponent, decorators: [{
|
|
11968
|
+
type: Component,
|
|
11969
|
+
args: [{ selector: 'tc-rev-pagination', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class=\"pagination-container\">\n\t<button class=\"arrow\" [disabled]=\"currentPage === 1\" (click)=\"previous()\"><i class=\"fas fa-angle-left\"></i></button>\n\n\t<span class=\"label f-family f-weight-600 f-size-14 c-neutral-700\">P\u00E1gina</span>\n\n\t<div class=\"page-input-container\">\n\t\t<input\n\t\t\ttype=\"text\"\n\t\t\tclass=\"page-input\"\n\t\t\t[ngClass]=\"{'error': pageInputError}\"\n\t\t\t[value]=\"formatPage(currentPage)\"\n\t\t\t(keyup.enter)=\"goToPage($event)\"\n\t\t\t(blur)=\"goToPage($event)\"\n\t\t/>\n\t</div>\n\n\t<span class=\"label f-family f-weight-600 f-size-14 c-neutral-700\">de {{ totalPages }}</span>\n\n\t<button class=\"arrow\" [disabled]=\"currentPage === totalPages\" (click)=\"next()\"><i class=\"fas fa-angle-right\"></i></button>\n</div>\n", styles: [":host{display:block}.pagination-container{display:flex;align-items:center;gap:8px;font-family:var(--f-family);justify-content:center}.pagination-container .label{color:var(--c-neutral-700)}.pagination-container .page-input-container{position:relative;width:48px;height:32px}.pagination-container .page-input{width:100%;height:100%;padding:var(--size-4) var(--size-8);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-8);font-size:var(--f-size-14);font-family:var(--f-family);font-weight:var(--f-weight-600);color:var(--c-neutral-700);text-align:center;background-color:var(--c-neutral-50);outline:none;transition:border-color .2s ease}.pagination-container .page-input:focus:not(.error){border-color:var(--c-primary-500)}.pagination-container .page-input.error{border-color:var(--c-danger-500)}.pagination-container .page-input.error:focus{border-color:var(--c-danger-500)}.pagination-container .arrow{background-color:var(--c-neutral-100);border:1px solid var(--c-neutral-300);border-radius:var(--bor-radius-8);width:32px;height:32px;font-size:var(--f-size-16);color:var(--c-neutral-300);cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center}.pagination-container .arrow:disabled{cursor:not-allowed;opacity:.5}.pagination-container .arrow:hover:not(:disabled){background-color:var(--c-primary-100);border-color:var(--c-primary-300);color:var(--c-primary-500)}\n"] }]
|
|
11970
|
+
}], propDecorators: { currentPage: [{
|
|
11971
|
+
type: Input
|
|
11972
|
+
}], totalPages: [{
|
|
11973
|
+
type: Input
|
|
11974
|
+
}], pageChange: [{
|
|
11975
|
+
type: Output
|
|
11976
|
+
}] } });
|
|
11977
|
+
|
|
11978
|
+
var ProgressStatusBarGradientStatus;
|
|
11979
|
+
(function (ProgressStatusBarGradientStatus) {
|
|
11980
|
+
ProgressStatusBarGradientStatus["info"] = "info";
|
|
11981
|
+
ProgressStatusBarGradientStatus["danger"] = "danger";
|
|
11982
|
+
ProgressStatusBarGradientStatus["success"] = "success";
|
|
11983
|
+
ProgressStatusBarGradientStatus["alert"] = "alert";
|
|
11984
|
+
})(ProgressStatusBarGradientStatus || (ProgressStatusBarGradientStatus = {}));
|
|
11985
|
+
var ProgressStatusBarRangeColor;
|
|
11986
|
+
(function (ProgressStatusBarRangeColor) {
|
|
11987
|
+
ProgressStatusBarRangeColor["dangerStart"] = "#F48E85";
|
|
11988
|
+
ProgressStatusBarRangeColor["dangerEnd"] = "#DC3545";
|
|
11989
|
+
ProgressStatusBarRangeColor["alertStart"] = "#FECD6E";
|
|
11990
|
+
ProgressStatusBarRangeColor["alertEnd"] = "#FEAC0E";
|
|
11991
|
+
ProgressStatusBarRangeColor["infoStart"] = "#6BC1F2";
|
|
11992
|
+
ProgressStatusBarRangeColor["infoEnd"] = "#0897E9";
|
|
11993
|
+
ProgressStatusBarRangeColor["successStart"] = "#A3E78C";
|
|
11994
|
+
ProgressStatusBarRangeColor["successEnd"] = "#47B13D";
|
|
11995
|
+
})(ProgressStatusBarRangeColor || (ProgressStatusBarRangeColor = {}));
|
|
11996
|
+
class TcRevProgressStatusBarComponent {
|
|
11997
|
+
constructor() {
|
|
11998
|
+
this.currentValue = input.required();
|
|
11999
|
+
this.progressStatusConfig = input.required();
|
|
12000
|
+
this.backgroundStyle = '';
|
|
12001
|
+
effect(() => {
|
|
12002
|
+
this.backgroundStyle = this.getBackgroundStyle();
|
|
12003
|
+
});
|
|
12004
|
+
}
|
|
12005
|
+
getBackgroundStyle() {
|
|
12006
|
+
if (!this.currentValue())
|
|
12007
|
+
return '';
|
|
12008
|
+
let currentStatusConfig = this.progressStatusConfig().find((x) => (this.currentValue() >= x.start && this.currentValue() <= x.end));
|
|
12009
|
+
const lastStatusConfig = this.progressStatusConfig()[this.progressStatusConfig()?.length - 1];
|
|
12010
|
+
if (!currentStatusConfig && this.currentValue() < lastStatusConfig.end)
|
|
12011
|
+
return '';
|
|
12012
|
+
if (!currentStatusConfig && this.currentValue() > lastStatusConfig.end) {
|
|
12013
|
+
currentStatusConfig = { start: 0, end: 100, gradientStatus: lastStatusConfig.gradientStatus };
|
|
12014
|
+
}
|
|
12015
|
+
const startStatus = this.getProgressStatusBarRangeColor(currentStatusConfig.gradientStatus, 'start');
|
|
12016
|
+
const endStatus = this.getProgressStatusBarRangeColor(currentStatusConfig.gradientStatus, 'end');
|
|
12017
|
+
let style = `width:${this.currentValue()}%;backgroundImage:linear-gradient(90deg`;
|
|
12018
|
+
style += `,${startStatus} 0%,${endStatus} 100%);`;
|
|
12019
|
+
return style;
|
|
12020
|
+
}
|
|
12021
|
+
getProgressStatusBarRangeColor(_gradientStatus, position) {
|
|
12022
|
+
switch (_gradientStatus) {
|
|
12023
|
+
case ProgressStatusBarGradientStatus.alert:
|
|
12024
|
+
return position === 'start' ? ProgressStatusBarRangeColor.alertStart : ProgressStatusBarRangeColor.alertEnd;
|
|
12025
|
+
case ProgressStatusBarGradientStatus.danger:
|
|
12026
|
+
return position === 'start' ? ProgressStatusBarRangeColor.dangerStart : ProgressStatusBarRangeColor.dangerEnd;
|
|
12027
|
+
case ProgressStatusBarGradientStatus.success:
|
|
12028
|
+
return position === 'start' ? ProgressStatusBarRangeColor.successStart : ProgressStatusBarRangeColor.successEnd;
|
|
12029
|
+
default:
|
|
12030
|
+
return position === 'start' ? ProgressStatusBarRangeColor.infoStart : ProgressStatusBarRangeColor.infoEnd;
|
|
12031
|
+
}
|
|
12032
|
+
}
|
|
12033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevProgressStatusBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12034
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: TcRevProgressStatusBarComponent, isStandalone: true, selector: "tc-rev-progress-status-bar", inputs: { currentValue: { classPropertyName: "currentValue", publicName: "currentValue", isSignal: true, isRequired: true, transformFunction: null }, progressStatusConfig: { classPropertyName: "progressStatusConfig", publicName: "progressStatusConfig", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"progress-status-bar-container\">\n <div\n class=\"progress-status-bar\"\n [style]=\"this.backgroundStyle\">\n </div>\n</div>\n", styles: [":host{display:block}.progress-status-bar-container{background-color:var(--c-neutral-200);border-radius:var(--bor-radius-pill);display:block;height:var(--size-12);position:relative}.progress-status-bar-container .progress-status-bar{border-radius:var(--bor-radius-pill);display:block;height:var(--size-12);left:0;max-width:100%;position:absolute;top:0;transition:width .2s linear;width:0}\n"] }); }
|
|
12035
|
+
}
|
|
12036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevProgressStatusBarComponent, decorators: [{
|
|
12037
|
+
type: Component,
|
|
12038
|
+
args: [{ selector: 'tc-rev-progress-status-bar', imports: [], template: "<div class=\"progress-status-bar-container\">\n <div\n class=\"progress-status-bar\"\n [style]=\"this.backgroundStyle\">\n </div>\n</div>\n", styles: [":host{display:block}.progress-status-bar-container{background-color:var(--c-neutral-200);border-radius:var(--bor-radius-pill);display:block;height:var(--size-12);position:relative}.progress-status-bar-container .progress-status-bar{border-radius:var(--bor-radius-pill);display:block;height:var(--size-12);left:0;max-width:100%;position:absolute;top:0;transition:width .2s linear;width:0}\n"] }]
|
|
12039
|
+
}], ctorParameters: () => [] });
|
|
12040
|
+
|
|
12041
|
+
class TcRevRadioDirective {
|
|
12042
|
+
constructor() { }
|
|
12043
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevRadioDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
12044
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: TcRevRadioDirective, isStandalone: true, selector: "input[type=\"radio\"][tcRevRadio]", host: { classAttribute: "tc-rev-radio" }, ngImport: i0 }); }
|
|
12045
|
+
}
|
|
12046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevRadioDirective, decorators: [{
|
|
12047
|
+
type: Directive,
|
|
12048
|
+
args: [{
|
|
12049
|
+
selector: 'input[type="radio"][tcRevRadio]',
|
|
12050
|
+
host: {
|
|
12051
|
+
class: 'tc-rev-radio'
|
|
12052
|
+
}
|
|
12053
|
+
}]
|
|
12054
|
+
}], ctorParameters: () => [] });
|
|
12055
|
+
|
|
12056
|
+
class TcRevSideDrawerComponent {
|
|
12057
|
+
constructor(document, el, renderer) {
|
|
12058
|
+
this.document = document;
|
|
12059
|
+
this.el = el;
|
|
12060
|
+
this.renderer = renderer;
|
|
12061
|
+
this.loading = input(false);
|
|
12062
|
+
this.position = input('right');
|
|
12063
|
+
this.title = input.required();
|
|
12064
|
+
this.xAxis = computed(() => this.position() === 'left' ? `left: 0` : `right: 0`);
|
|
12065
|
+
this.onCloseDrawer = output();
|
|
12066
|
+
this.isOpen = false;
|
|
12067
|
+
this._deviceService = inject(TCloudUiDeviceUtilsService);
|
|
12068
|
+
this.isDesktop = this._deviceService.isDesktop;
|
|
12069
|
+
this.isMobile = this._deviceService.isMobile;
|
|
12070
|
+
}
|
|
12071
|
+
ngOnInit() {
|
|
12072
|
+
this.document.body.style.overflowY = 'hidden';
|
|
12073
|
+
this.isOpen = true;
|
|
12074
|
+
// --- mover o host do componente para o <body> apenas em mobile ---
|
|
12075
|
+
if (this.el &&
|
|
12076
|
+
this.el.nativeElement &&
|
|
12077
|
+
this.el.nativeElement.parentNode !== this.document.body &&
|
|
12078
|
+
this.isMobile()) {
|
|
12079
|
+
this.renderer.appendChild(this.document.body, this.el.nativeElement);
|
|
12080
|
+
}
|
|
12081
|
+
}
|
|
12082
|
+
ngOnDestroy() {
|
|
12083
|
+
this.document.body.style.overflowY = '';
|
|
12084
|
+
// remover o host do body ao destruir apenas em mobile
|
|
12085
|
+
if (this.el &&
|
|
12086
|
+
this.el.nativeElement &&
|
|
12087
|
+
this.el.nativeElement.parentNode === this.document.body &&
|
|
12088
|
+
this.isMobile()) {
|
|
12089
|
+
this.renderer.removeChild(this.document.body, this.el.nativeElement);
|
|
12090
|
+
}
|
|
12091
|
+
}
|
|
12092
|
+
handleClickOverlay() {
|
|
12093
|
+
if (this.loading()) {
|
|
12094
|
+
return;
|
|
12095
|
+
}
|
|
12096
|
+
this.isOpen = false;
|
|
12097
|
+
setTimeout(() => this.onCloseDrawer.emit(), 250);
|
|
12098
|
+
}
|
|
12099
|
+
handleClickContent(_ev) {
|
|
12100
|
+
_ev.stopPropagation();
|
|
12101
|
+
}
|
|
12102
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSideDrawerComponent, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevSideDrawerComponent, isStandalone: true, selector: "tc-rev-side-drawer", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onCloseDrawer: "onCloseDrawer" }, ngImport: i0, template: "@if(isDesktop()){\n<div\n [@backdropAnimation]\n class=\"tc-rev-side-drawer-overlay\"\n (click)=\"handleClickOverlay()\">\n</div>\n}\n\n<div\n *ngIf=\"isOpen\"\n [@drawerAnimation]=\"isDesktop() ? 'desktop' : 'mobile'\"\n class=\"tc-rev-side-drawer-content\"\n [style.width]=\"isMobile() ? '100%' : null\"\n (click)=\"handleClickContent($event)\"\n [style]=\"xAxis()\">\n\n <div class=\"tc-rev-side-drawer-content__header\">\n <h2 class=\"mar-none f-h2 f-weight-600\">{{title()}}</h2>\n\n <button\n tcRevIconButton=\"outline\" color=\"dark\"\n [disabled]=\"loading()\"\n (click)=\"handleClickOverlay()\">\n <i class=\"fa-light fa-times\"></i>\n </button>\n </div>\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.tc-rev-side-drawer-overlay{background-color:#00000080;inset:0;position:fixed;height:100vh;z-index:3000}.tc-rev-side-drawer-content{background-color:var(--c-neutral-50);height:100vh;position:fixed;z-index:3001;top:0}.tc-rev-side-drawer-content__header{align-items:center;color:var(--c-neutral-700);display:flex;font-family:var(--f-family);gap:var(--size-16);justify-content:space-between;padding:var(--size-16);padding-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TcRevIconButtonDirective, selector: "button[tcRevIconButton]", inputs: ["color", "size", "tcRevIconButton"] }], animations: [
|
|
12104
|
+
trigger('drawerAnimation', [
|
|
12105
|
+
transition('void => desktop', [
|
|
12106
|
+
style({ transform: 'translateX(100%)', opacity: 0 }),
|
|
12107
|
+
animate('250ms', style({ transform: 'translateX(0)', opacity: 1 })),
|
|
12108
|
+
]),
|
|
12109
|
+
transition('desktop => void', [
|
|
12110
|
+
style({ transform: 'translateX(0)', opacity: 1 }),
|
|
12111
|
+
animate('250ms', style({ transform: 'translateX(100%)', opacity: 0 })),
|
|
12112
|
+
]),
|
|
12113
|
+
transition('void => mobile', [
|
|
12114
|
+
style({ opacity: 0 }),
|
|
12115
|
+
animate('200ms ease', style({ opacity: 1 })),
|
|
12116
|
+
]),
|
|
12117
|
+
transition('mobile => void', [
|
|
12118
|
+
style({ opacity: 1 }),
|
|
12119
|
+
animate('200ms ease', style({ opacity: 0 })),
|
|
12120
|
+
]),
|
|
12121
|
+
]),
|
|
12122
|
+
trigger('backdropAnimation', [
|
|
12123
|
+
transition(':enter', [
|
|
12124
|
+
style({ opacity: 0 }),
|
|
12125
|
+
animate('100ms', style({ opacity: 1 })),
|
|
12126
|
+
]),
|
|
12127
|
+
transition(':leave', [
|
|
12128
|
+
style({ opacity: 1 }),
|
|
12129
|
+
animate('250ms', style({ opacity: 0 })),
|
|
12130
|
+
]),
|
|
12131
|
+
]),
|
|
12132
|
+
] }); }
|
|
12133
|
+
}
|
|
12134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSideDrawerComponent, decorators: [{
|
|
12135
|
+
type: Component,
|
|
12136
|
+
args: [{ selector: 'tc-rev-side-drawer', imports: [CommonModule, TcRevIconButtonDirective], animations: [
|
|
12137
|
+
trigger('drawerAnimation', [
|
|
12138
|
+
transition('void => desktop', [
|
|
12139
|
+
style({ transform: 'translateX(100%)', opacity: 0 }),
|
|
12140
|
+
animate('250ms', style({ transform: 'translateX(0)', opacity: 1 })),
|
|
12141
|
+
]),
|
|
12142
|
+
transition('desktop => void', [
|
|
12143
|
+
style({ transform: 'translateX(0)', opacity: 1 }),
|
|
12144
|
+
animate('250ms', style({ transform: 'translateX(100%)', opacity: 0 })),
|
|
12145
|
+
]),
|
|
12146
|
+
transition('void => mobile', [
|
|
12147
|
+
style({ opacity: 0 }),
|
|
12148
|
+
animate('200ms ease', style({ opacity: 1 })),
|
|
12149
|
+
]),
|
|
12150
|
+
transition('mobile => void', [
|
|
12151
|
+
style({ opacity: 1 }),
|
|
12152
|
+
animate('200ms ease', style({ opacity: 0 })),
|
|
12153
|
+
]),
|
|
12154
|
+
]),
|
|
12155
|
+
trigger('backdropAnimation', [
|
|
12156
|
+
transition(':enter', [
|
|
12157
|
+
style({ opacity: 0 }),
|
|
12158
|
+
animate('100ms', style({ opacity: 1 })),
|
|
12159
|
+
]),
|
|
12160
|
+
transition(':leave', [
|
|
12161
|
+
style({ opacity: 1 }),
|
|
12162
|
+
animate('250ms', style({ opacity: 0 })),
|
|
12163
|
+
]),
|
|
12164
|
+
]),
|
|
12165
|
+
], template: "@if(isDesktop()){\n<div\n [@backdropAnimation]\n class=\"tc-rev-side-drawer-overlay\"\n (click)=\"handleClickOverlay()\">\n</div>\n}\n\n<div\n *ngIf=\"isOpen\"\n [@drawerAnimation]=\"isDesktop() ? 'desktop' : 'mobile'\"\n class=\"tc-rev-side-drawer-content\"\n [style.width]=\"isMobile() ? '100%' : null\"\n (click)=\"handleClickContent($event)\"\n [style]=\"xAxis()\">\n\n <div class=\"tc-rev-side-drawer-content__header\">\n <h2 class=\"mar-none f-h2 f-weight-600\">{{title()}}</h2>\n\n <button\n tcRevIconButton=\"outline\" color=\"dark\"\n [disabled]=\"loading()\"\n (click)=\"handleClickOverlay()\">\n <i class=\"fa-light fa-times\"></i>\n </button>\n </div>\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.tc-rev-side-drawer-overlay{background-color:#00000080;inset:0;position:fixed;height:100vh;z-index:3000}.tc-rev-side-drawer-content{background-color:var(--c-neutral-50);height:100vh;position:fixed;z-index:3001;top:0}.tc-rev-side-drawer-content__header{align-items:center;color:var(--c-neutral-700);display:flex;font-family:var(--f-family);gap:var(--size-16);justify-content:space-between;padding:var(--size-16);padding-bottom:0}\n"] }]
|
|
12166
|
+
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
12167
|
+
type: Inject,
|
|
12168
|
+
args: [DOCUMENT]
|
|
12169
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
12170
|
+
|
|
12171
|
+
class TcRevSkeletonLoadingComponent {
|
|
12172
|
+
constructor() {
|
|
12173
|
+
/** Params of the loading skeleton accepts string with CSS units (px, rem, em) */
|
|
12174
|
+
this.width = input('10rem');
|
|
12175
|
+
this.height = input('1.25rem');
|
|
12176
|
+
this.borderRadius = input('0.3rem');
|
|
12177
|
+
this.style = new TcRevSkeletonLoadingComponentStyle();
|
|
12178
|
+
}
|
|
12179
|
+
ngOnInit() {
|
|
12180
|
+
this.style.width = this.width();
|
|
12181
|
+
this.style.height = this.height();
|
|
12182
|
+
this.style.borderRadius = this.borderRadius();
|
|
12183
|
+
}
|
|
12184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSkeletonLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12185
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: TcRevSkeletonLoadingComponent, isStandalone: true, selector: "tc-rev-skeleton-loading", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"tc-rev-skeleton-loading\" [ngStyle]=\"this.style\"></div>\n", styles: [":host{display:block}.tc-rev-skeleton-loading{background:linear-gradient(90deg,#eee 25%,#fff,#eee 75%);background-size:400% 100%;animation:shimmer 2s infinite linear}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
12186
|
+
}
|
|
12187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSkeletonLoadingComponent, decorators: [{
|
|
12188
|
+
type: Component,
|
|
12189
|
+
args: [{ selector: 'tc-rev-skeleton-loading', imports: [CommonModule], template: "<div class=\"tc-rev-skeleton-loading\" [ngStyle]=\"this.style\"></div>\n", styles: [":host{display:block}.tc-rev-skeleton-loading{background:linear-gradient(90deg,#eee 25%,#fff,#eee 75%);background-size:400% 100%;animation:shimmer 2s infinite linear}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"] }]
|
|
12190
|
+
}] });
|
|
12191
|
+
class TcRevSkeletonLoadingComponentStyle {
|
|
12192
|
+
}
|
|
12193
|
+
|
|
12194
|
+
class TcRevSlideToggleDirective {
|
|
12195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSlideToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
12196
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: TcRevSlideToggleDirective, isStandalone: true, selector: "input[type=\"checkbox\"][tcRevSlideToggle]", host: { classAttribute: "tc-rev-slide-toggle" }, ngImport: i0 }); }
|
|
12197
|
+
}
|
|
12198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSlideToggleDirective, decorators: [{
|
|
12199
|
+
type: Directive,
|
|
12200
|
+
args: [{
|
|
12201
|
+
selector: 'input[type="checkbox"][tcRevSlideToggle]',
|
|
12202
|
+
host: {
|
|
12203
|
+
class: 'tc-rev-slide-toggle'
|
|
12204
|
+
}
|
|
12205
|
+
}]
|
|
12206
|
+
}] });
|
|
12207
|
+
|
|
12208
|
+
class TcRevTabGroupComponent {
|
|
12209
|
+
constructor() {
|
|
12210
|
+
this.isCarouselOverflowed = false;
|
|
12211
|
+
}
|
|
12212
|
+
onResize() {
|
|
12213
|
+
this.checkCarouselOverflow();
|
|
12214
|
+
}
|
|
12215
|
+
ngOnInit() {
|
|
12216
|
+
this.checkCarouselOverflow();
|
|
12217
|
+
}
|
|
12218
|
+
checkCarouselOverflow() {
|
|
12219
|
+
setTimeout(() => {
|
|
12220
|
+
const el = this.tabGroupCarousel?.nativeElement;
|
|
12221
|
+
this.isCarouselOverflowed = !!el && el.scrollWidth > el.clientWidth;
|
|
12222
|
+
});
|
|
12223
|
+
}
|
|
12224
|
+
scrollTabsCarousel(direction) {
|
|
12225
|
+
const el = this.tabGroupCarousel?.nativeElement;
|
|
12226
|
+
if (!el)
|
|
12227
|
+
return;
|
|
12228
|
+
const scrollAmount = 200;
|
|
12229
|
+
if (direction === 'left') {
|
|
12230
|
+
el.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
|
|
12231
|
+
}
|
|
12232
|
+
else {
|
|
12233
|
+
el.scrollBy({ left: scrollAmount, behavior: 'smooth' });
|
|
12234
|
+
}
|
|
12235
|
+
}
|
|
12236
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevTabGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12237
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TcRevTabGroupComponent, isStandalone: true, selector: "tc-rev-tab-group", host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "tabGroupCarousel", first: true, predicate: ["tabGroupCarousel"], descendants: true }], ngImport: i0, template: "<div class=\"tc-rev-tab-group\">\n <button\n *ngIf=\"isCarouselOverflowed\"\n class=\"tc-rev-tab-item carousel-arrow left\"\n (click)=\"this.scrollTabsCarousel('left')\"\n aria-label=\"Scroll left\">\n <i class=\"fa-light fa-chevron-left\"></i>\n </button>\n\n <div\n class=\"tc-rev-tab-group-carousel\"\n [class.overflowed]=\"isCarouselOverflowed\"\n #tabGroupCarousel>\n <ng-content></ng-content>\n </div>\n\n <button\n *ngIf=\"isCarouselOverflowed\"\n class=\"tc-rev-tab-item carousel-arrow right\"\n (click)=\"this.scrollTabsCarousel('right')\"\n aria-label=\"Scroll right\">\n <i class=\"fa-light fa-chevron-right\"></i>\n </button>\n</div>\n\n<!-- <div class=\"products-carousel-container f-family\">\n <button\n *ngIf=\"isCarouselOverflowed\"\n class=\"tc-rev-tab-item carousel-arrow left\"\n (click)=\"scrollProductsCarousel('left')\"\n aria-label=\"Scroll left\">\n <i class=\"fa-light fa-chevron-left\"></i>\n </button>\n\n <div\n #productsCarousel\n class=\"products-carousel\"\n [class.overflowed]=\"isCarouselOverflowed\">\n @for (productName of topologiesData.availableProductsNames(); track productName)\n {\n <button\n class=\"tc-rev-tab-item\"\n [class.active]=\"filter().product === productName\"\n (click)=\"handleChangeTopologiesByProduct(productName)\">\n {{ productName | topologyProduct }}\n </button>\n }\n </div>\n\n <button\n *ngIf=\"isCarouselOverflowed\"\n class=\"tc-rev-tab-item carousel-arrow right\"\n (click)=\"scrollProductsCarousel('right')\"\n aria-label=\"Scroll right\">\n <i class=\"fa-light fa-chevron-right\"></i>\n </button>\n</div> -->", styles: [":host{display:block}.tc-rev-tab-group{position:relative;height:var(--size-40);width:100%}.tc-rev-tab-group .tc-rev-tab-group-carousel{display:flex;gap:var(--size-8);height:var(--size-40);left:0;margin:0;overflow:hidden;position:absolute;scroll-behavior:smooth;top:0;width:calc(100% - 6.25rem);z-index:1}.tc-rev-tab-group .tc-rev-tab-group-carousel.overflowed{left:var(--size-20);margin:0 var(--size-32)}.tc-rev-tab-group .tc-rev-tab-group-carousel.full-width{width:100%}.tc-rev-tab-group .carousel-arrow{background-color:var(--c-neutral-50);border:var(--bor-size-1) solid var(--c-neutral-400);border-radius:var(--bor-radius-8);color:var(--c-neutral-700);cursor:pointer;font-size:var(--f-size-14);font-weight:600;height:var(--size-40);line-height:var(--l-height-20);padding:0;text-wrap:nowrap;transition:all .2s ease;width:var(--size-40)}.tc-rev-tab-group .carousel-arrow:hover,.tc-rev-tab-group .carousel-arrow:focus{background-color:var(--c-neutral-200);border-color:var(--c-neutral-200);color:var(--c-primary-500);font-weight:600}.tc-rev-tab-group .carousel-arrow:active,.tc-rev-tab-group .carousel-arrow.selected,.tc-rev-tab-group .carousel-arrow.active{background-color:var(--c-primary-300);border-color:var(--c-primary-500);color:var(--c-primary-500);font-weight:700}.tc-rev-tab-group .carousel-arrow:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-50);color:var(--c-neutral-400);cursor:not-allowed;font-weight:var(--f-weight-400)}.tc-rev-tab-group .carousel-arrow.left{left:0;position:absolute;z-index:1}.tc-rev-tab-group .carousel-arrow.right{position:absolute;right:0;z-index:1}@media (max-width: 480px){:host{display:block;position:relative;height:var(--size-40)}:host .carousel-arrow{display:none}:host .tc-rev-tab-group-carousel{width:100%!important;overflow-x:auto!important;scrollbar-width:none;-ms-overflow-style:none;white-space:nowrap;padding-left:var(--size-40);padding-right:var(--size-40)}:host .tc-rev-tab-group-carousel.overflowed{left:auto!important;margin:0!important}:host .tc-rev-tab-group-carousel::-webkit-scrollbar{display:none}:host .tc-rev-tab-group{left:calc(-1 * var(--size-40));width:calc(100% + var(--size-80))}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
12238
|
+
}
|
|
12239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevTabGroupComponent, decorators: [{
|
|
12240
|
+
type: Component,
|
|
12241
|
+
args: [{ selector: 'tc-rev-tab-group', imports: [CommonModule], template: "<div class=\"tc-rev-tab-group\">\n <button\n *ngIf=\"isCarouselOverflowed\"\n class=\"tc-rev-tab-item carousel-arrow left\"\n (click)=\"this.scrollTabsCarousel('left')\"\n aria-label=\"Scroll left\">\n <i class=\"fa-light fa-chevron-left\"></i>\n </button>\n\n <div\n class=\"tc-rev-tab-group-carousel\"\n [class.overflowed]=\"isCarouselOverflowed\"\n #tabGroupCarousel>\n <ng-content></ng-content>\n </div>\n\n <button\n *ngIf=\"isCarouselOverflowed\"\n class=\"tc-rev-tab-item carousel-arrow right\"\n (click)=\"this.scrollTabsCarousel('right')\"\n aria-label=\"Scroll right\">\n <i class=\"fa-light fa-chevron-right\"></i>\n </button>\n</div>\n\n<!-- <div class=\"products-carousel-container f-family\">\n <button\n *ngIf=\"isCarouselOverflowed\"\n class=\"tc-rev-tab-item carousel-arrow left\"\n (click)=\"scrollProductsCarousel('left')\"\n aria-label=\"Scroll left\">\n <i class=\"fa-light fa-chevron-left\"></i>\n </button>\n\n <div\n #productsCarousel\n class=\"products-carousel\"\n [class.overflowed]=\"isCarouselOverflowed\">\n @for (productName of topologiesData.availableProductsNames(); track productName)\n {\n <button\n class=\"tc-rev-tab-item\"\n [class.active]=\"filter().product === productName\"\n (click)=\"handleChangeTopologiesByProduct(productName)\">\n {{ productName | topologyProduct }}\n </button>\n }\n </div>\n\n <button\n *ngIf=\"isCarouselOverflowed\"\n class=\"tc-rev-tab-item carousel-arrow right\"\n (click)=\"scrollProductsCarousel('right')\"\n aria-label=\"Scroll right\">\n <i class=\"fa-light fa-chevron-right\"></i>\n </button>\n</div> -->", styles: [":host{display:block}.tc-rev-tab-group{position:relative;height:var(--size-40);width:100%}.tc-rev-tab-group .tc-rev-tab-group-carousel{display:flex;gap:var(--size-8);height:var(--size-40);left:0;margin:0;overflow:hidden;position:absolute;scroll-behavior:smooth;top:0;width:calc(100% - 6.25rem);z-index:1}.tc-rev-tab-group .tc-rev-tab-group-carousel.overflowed{left:var(--size-20);margin:0 var(--size-32)}.tc-rev-tab-group .tc-rev-tab-group-carousel.full-width{width:100%}.tc-rev-tab-group .carousel-arrow{background-color:var(--c-neutral-50);border:var(--bor-size-1) solid var(--c-neutral-400);border-radius:var(--bor-radius-8);color:var(--c-neutral-700);cursor:pointer;font-size:var(--f-size-14);font-weight:600;height:var(--size-40);line-height:var(--l-height-20);padding:0;text-wrap:nowrap;transition:all .2s ease;width:var(--size-40)}.tc-rev-tab-group .carousel-arrow:hover,.tc-rev-tab-group .carousel-arrow:focus{background-color:var(--c-neutral-200);border-color:var(--c-neutral-200);color:var(--c-primary-500);font-weight:600}.tc-rev-tab-group .carousel-arrow:active,.tc-rev-tab-group .carousel-arrow.selected,.tc-rev-tab-group .carousel-arrow.active{background-color:var(--c-primary-300);border-color:var(--c-primary-500);color:var(--c-primary-500);font-weight:700}.tc-rev-tab-group .carousel-arrow:disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-50);color:var(--c-neutral-400);cursor:not-allowed;font-weight:var(--f-weight-400)}.tc-rev-tab-group .carousel-arrow.left{left:0;position:absolute;z-index:1}.tc-rev-tab-group .carousel-arrow.right{position:absolute;right:0;z-index:1}@media (max-width: 480px){:host{display:block;position:relative;height:var(--size-40)}:host .carousel-arrow{display:none}:host .tc-rev-tab-group-carousel{width:100%!important;overflow-x:auto!important;scrollbar-width:none;-ms-overflow-style:none;white-space:nowrap;padding-left:var(--size-40);padding-right:var(--size-40)}:host .tc-rev-tab-group-carousel.overflowed{left:auto!important;margin:0!important}:host .tc-rev-tab-group-carousel::-webkit-scrollbar{display:none}:host .tc-rev-tab-group{left:calc(-1 * var(--size-40));width:calc(100% + var(--size-80))}}\n"] }]
|
|
12242
|
+
}], propDecorators: { onResize: [{
|
|
12243
|
+
type: HostListener,
|
|
12244
|
+
args: ['window:resize']
|
|
12245
|
+
}], tabGroupCarousel: [{
|
|
12246
|
+
type: ViewChild,
|
|
12247
|
+
args: ['tabGroupCarousel']
|
|
12248
|
+
}] } });
|
|
12249
|
+
|
|
12250
|
+
class TcRevTabItemComponent {
|
|
12251
|
+
constructor() {
|
|
12252
|
+
this.onClick = output();
|
|
12253
|
+
this.active = input(false);
|
|
12254
|
+
this.url = input('');
|
|
12255
|
+
this.disabled = input(false);
|
|
12256
|
+
this.fullWidth = input(false);
|
|
12257
|
+
}
|
|
12258
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevTabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12259
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: TcRevTabItemComponent, isStandalone: true, selector: "tc-rev-tab-item", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<a\n *ngIf=\"this.url()\"\n class=\"tc-rev-tab-item\"\n [class.disabled]=\"this.disabled()\"\n [class.full-width]=\"this.fullWidth()\"\n [routerLinkActive]=\"'active'\"\n [routerLink]=\"[this.url()]\"\n (click)=\"this.onClick.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\" />\n</a>\n\n\n<button\n *ngIf=\"!this.url()\"\n class=\"tc-rev-tab-item\"\n [class.active]=\"this.active()\"\n [class.full-width]=\"this.fullWidth()\"\n [disabled]=\"this.disabled()\"\n (click)=\"this.onClick.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\" />\n</button>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}.tc-rev-tab-item,.tc-rev-tab-item:link{align-items:center;background-color:var(--c-neutral-50);border:var(--bor-size-1) solid var(--c-neutral-400);border-radius:var(--bor-radius-8);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-14);font-weight:600;gap:var(--size-8);height:var(--size-40);line-height:var(--l-height-20);justify-content:center;padding:0 var(--size-16);text-decoration:none;text-wrap:nowrap;transition:all .2s ease}.tc-rev-tab-item.full-width,.tc-rev-tab-item:link.full-width{width:100%}.tc-rev-tab-item:hover,.tc-rev-tab-item:focus,.tc-rev-tab-item:link:hover,.tc-rev-tab-item:link:focus{background-color:var(--c-neutral-200);border-color:var(--c-neutral-200);color:var(--c-primary-500);font-weight:600}.tc-rev-tab-item:active,.tc-rev-tab-item.selected,.tc-rev-tab-item.active,.tc-rev-tab-item:link:active,.tc-rev-tab-item:link.selected,.tc-rev-tab-item:link.active{background-color:var(--c-primary-300);border-color:var(--c-primary-500);color:var(--c-primary-500);font-weight:600}.tc-rev-tab-item:disabled,.tc-rev-tab-item.disabled,.tc-rev-tab-item:link:disabled,.tc-rev-tab-item:link.disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-50);color:var(--c-neutral-400);cursor:not-allowed;font-weight:var(--f-weight-400);pointer-events:none}@media (max-width: 480px){:host{display:contents}:host .tc-rev-tab-item{width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] }); }
|
|
12260
|
+
}
|
|
12261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevTabItemComponent, decorators: [{
|
|
12262
|
+
type: Component,
|
|
12263
|
+
args: [{ selector: 'tc-rev-tab-item', imports: [
|
|
12264
|
+
CommonModule,
|
|
12265
|
+
RouterModule
|
|
12266
|
+
], template: "<a\n *ngIf=\"this.url()\"\n class=\"tc-rev-tab-item\"\n [class.disabled]=\"this.disabled()\"\n [class.full-width]=\"this.fullWidth()\"\n [routerLinkActive]=\"'active'\"\n [routerLink]=\"[this.url()]\"\n (click)=\"this.onClick.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\" />\n</a>\n\n\n<button\n *ngIf=\"!this.url()\"\n class=\"tc-rev-tab-item\"\n [class.active]=\"this.active()\"\n [class.full-width]=\"this.fullWidth()\"\n [disabled]=\"this.disabled()\"\n (click)=\"this.onClick.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\" />\n</button>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}.tc-rev-tab-item,.tc-rev-tab-item:link{align-items:center;background-color:var(--c-neutral-50);border:var(--bor-size-1) solid var(--c-neutral-400);border-radius:var(--bor-radius-8);color:var(--c-neutral-700);cursor:pointer;display:inline-flex;font-family:var(--f-family);font-size:var(--f-size-14);font-weight:600;gap:var(--size-8);height:var(--size-40);line-height:var(--l-height-20);justify-content:center;padding:0 var(--size-16);text-decoration:none;text-wrap:nowrap;transition:all .2s ease}.tc-rev-tab-item.full-width,.tc-rev-tab-item:link.full-width{width:100%}.tc-rev-tab-item:hover,.tc-rev-tab-item:focus,.tc-rev-tab-item:link:hover,.tc-rev-tab-item:link:focus{background-color:var(--c-neutral-200);border-color:var(--c-neutral-200);color:var(--c-primary-500);font-weight:600}.tc-rev-tab-item:active,.tc-rev-tab-item.selected,.tc-rev-tab-item.active,.tc-rev-tab-item:link:active,.tc-rev-tab-item:link.selected,.tc-rev-tab-item:link.active{background-color:var(--c-primary-300);border-color:var(--c-primary-500);color:var(--c-primary-500);font-weight:600}.tc-rev-tab-item:disabled,.tc-rev-tab-item.disabled,.tc-rev-tab-item:link:disabled,.tc-rev-tab-item:link.disabled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-50);color:var(--c-neutral-400);cursor:not-allowed;font-weight:var(--f-weight-400);pointer-events:none}@media (max-width: 480px){:host{display:contents}:host .tc-rev-tab-item{width:100%}}\n"] }]
|
|
12267
|
+
}] });
|
|
12268
|
+
|
|
12269
|
+
var TagColorsEnum;
|
|
12270
|
+
(function (TagColorsEnum) {
|
|
12271
|
+
TagColorsEnum["neutral-50"] = "neutral-50";
|
|
12272
|
+
TagColorsEnum["neutral-100"] = "neutral-100";
|
|
12273
|
+
TagColorsEnum["neutral-200"] = "neutral-200";
|
|
12274
|
+
TagColorsEnum["neutral-300"] = "neutral-300";
|
|
12275
|
+
TagColorsEnum["neutral-400"] = "neutral-400";
|
|
12276
|
+
TagColorsEnum["neutral-500"] = "neutral-500";
|
|
12277
|
+
TagColorsEnum["neutral-600"] = "neutral-600";
|
|
12278
|
+
TagColorsEnum["neutral-700"] = "neutral-700";
|
|
12279
|
+
TagColorsEnum["neutral-800"] = "neutral-800";
|
|
12280
|
+
TagColorsEnum["neutral-900"] = "neutral-900";
|
|
12281
|
+
// Primary
|
|
12282
|
+
TagColorsEnum["primary-300"] = "primary-300";
|
|
12283
|
+
TagColorsEnum["primary-400"] = "primary-400";
|
|
12284
|
+
TagColorsEnum["primary-500"] = "primary-500";
|
|
12285
|
+
TagColorsEnum["primary-600"] = "primary-600";
|
|
12286
|
+
TagColorsEnum["primary-700"] = "primary-700";
|
|
12287
|
+
// Danger
|
|
12288
|
+
TagColorsEnum["danger-300"] = "danger-300";
|
|
12289
|
+
TagColorsEnum["danger-400"] = "danger-400";
|
|
12290
|
+
TagColorsEnum["danger-500"] = "danger-500";
|
|
12291
|
+
// Alert
|
|
12292
|
+
TagColorsEnum["alert-300"] = "alert-300";
|
|
12293
|
+
TagColorsEnum["alert-400"] = "alert-400";
|
|
12294
|
+
TagColorsEnum["alert-500"] = "alert-500";
|
|
12295
|
+
// Info
|
|
12296
|
+
TagColorsEnum["info-300"] = "info-300";
|
|
12297
|
+
TagColorsEnum["info-400"] = "info-400";
|
|
12298
|
+
TagColorsEnum["info-500"] = "info-500";
|
|
12299
|
+
// Success
|
|
12300
|
+
TagColorsEnum["success-300"] = "success-300";
|
|
12301
|
+
TagColorsEnum["success-400"] = "success-400";
|
|
12302
|
+
TagColorsEnum["success-500"] = "success-500";
|
|
12303
|
+
})(TagColorsEnum || (TagColorsEnum = {}));
|
|
12304
|
+
|
|
12305
|
+
class TcRevTagComponent {
|
|
12306
|
+
constructor() {
|
|
12307
|
+
this.size = input('md');
|
|
12308
|
+
this.color = input(TagColorsEnum['primary-500']);
|
|
12309
|
+
this.variant = input('filled');
|
|
12310
|
+
this.shape = input('rectangle');
|
|
12311
|
+
this.fullWidth = input(false);
|
|
12312
|
+
}
|
|
12313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12314
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: TcRevTagComponent, isStandalone: true, selector: "tc-rev-tag", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span\n [class.tc-rev-tag--sm]=\"size() === 'sm'\"\n [class.tc-rev-tag--md]=\"size() === 'md' || size() === 'regular'\"\n [class.tc-rev-tag--lg]=\"size() === 'lg'\"\n [class.tc-rev-tag--pill]=\"shape() === 'pill'\"\n [class.tc-rev-tag--full-width]=\"fullWidth()\"\n class=\"{{!color() && !variant() ? '' : 'tc-rev-tag tc-rev-tag--c-' + color() + '-' + variant()}}\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{display:block}.tc-rev-tag,.tc-rev-tag--lg,.tc-rev-tag--md,.tc-rev-tag--sm{background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:default;display:inline-flex;align-items:center;justify-content:center;gap:var(--size-8);font-family:var(--f-family);font-size:var(--f-size-12);font-weight:var(--f-weight-500);padding:var(--size-2) var(--size-4);height:var(--size-22);max-height:var(--size-22);min-height:var(--size-22)}.tc-rev-tag--full-width{width:100%}.tc-rev-tag--sm{padding:var(--size-2) var(--size-4);height:var(--size-22);max-height:var(--size-22);min-height:var(--size-22)}.tc-rev-tag--md{padding:var(--size-4);height:var(--size-26);max-height:var(--size-26);min-height:var(--size-26)}.tc-rev-tag--lg{padding:var(--size-8);height:var(--size-34);max-height:var(--size-34);min-height:var(--size-34)}.tc-rev-tag--pill{border-radius:var(--bor-radius-pill)}.tc-rev-tag--c-neutral-50-filled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-50);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-100-filled{background-color:var(--c-neutral-100);border-color:var(--c-neutral-100);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-200-filled{background-color:var(--c-neutral-200);border-color:var(--c-neutral-200);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-300-filled{background-color:var(--c-neutral-300);border-color:var(--c-neutral-300);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-400-filled{background-color:var(--c-neutral-400);border-color:var(--c-neutral-400);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-500-filled{background-color:var(--c-neutral-500);border-color:var(--c-neutral-500);color:var(--c-neutral-50)}.tc-rev-tag--c-neutral-600-filled{background-color:var(--c-neutral-600);border-color:var(--c-neutral-600);color:var(--c-neutral-50)}.tc-rev-tag--c-neutral-700-filled,.tc-rev-tag--c-neutral-800-filled{background-color:var(--c-neutral-700);border-color:var(--c-neutral-700);color:var(--c-neutral-50)}.tc-rev-tag--c-primary-300-filled{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-neutral-700)}.tc-rev-tag--c-primary-400-filled{background-color:var(--c-primary-400);border-color:var(--c-primary-400);color:var(--c-neutral-700)}.tc-rev-tag--c-primary-500-filled{background-color:var(--c-primary-500);border-color:var(--c-primary-500);color:var(--c-neutral-50)}.tc-rev-tag--c-primary-600-filled{background-color:var(--c-primary-600);border-color:var(--c-primary-600);color:var(--c-neutral-50)}.tc-rev-tag--c-primary-700-filled{background-color:var(--c-primary-700);border-color:var(--c-primary-700);color:var(--c-neutral-50)}.tc-rev-tag--c-danger-300-filled{background-color:var(--c-danger-300);border-color:var(--c-danger-300);color:var(--c-neutral-700)}.tc-rev-tag--c-danger-400-filled{background-color:var(--c-danger-400);border-color:var(--c-danger-400);color:var(--c-neutral-700)}.tc-rev-tag--c-danger-500-filled{background-color:var(--c-danger-500);border-color:var(--c-danger-500);color:var(--c-neutral-50)}.tc-rev-tag--c-alert-300-filled{background-color:var(--c-alert-300);border-color:var(--c-alert-300);color:var(--c-neutral-700)}.tc-rev-tag--c-alert-400-filled{background-color:var(--c-alert-400);border-color:var(--c-alert-400);color:var(--c-neutral-700)}.tc-rev-tag--c-alert-500-filled{background-color:var(--c-alert-500);border-color:var(--c-alert-500);color:var(--c-neutral-700)}.tc-rev-tag--c-info-300-filled{background-color:var(--c-info-300);border-color:var(--c-info-300);color:var(--c-neutral-700)}.tc-rev-tag--c-info-400-filled{background-color:var(--c-info-400);border-color:var(--c-info-400);color:var(--c-neutral-700)}.tc-rev-tag--c-info-500-filled{background-color:var(--c-info-500);border-color:var(--c-info-500);color:var(--c-neutral-50)}.tc-rev-tag--c-success-300-filled{background-color:var(--c-success-300);border-color:var(--c-success-300);color:var(--c-neutral-700)}.tc-rev-tag--c-success-400-filled{background-color:var(--c-success-400);border-color:var(--c-success-400);color:var(--c-neutral-700)}.tc-rev-tag--c-success-500-filled{background-color:var(--c-success-500);border-color:var(--c-success-500);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-50-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-50);color:var(--c-neutral-50)}.tc-rev-tag--c-neutral-100-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-100);color:var(--c-neutral-100)}.tc-rev-tag--c-neutral-200-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-200);color:var(--c-neutral-200)}.tc-rev-tag--c-neutral-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-300)}.tc-rev-tag--c-neutral-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-400);color:var(--c-neutral-400)}.tc-rev-tag--c-neutral-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-500);color:var(--c-neutral-500)}.tc-rev-tag--c-neutral-600-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-600);color:var(--c-neutral-600)}.tc-rev-tag--c-neutral-700-outline,.tc-rev-tag--c-neutral-800-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-700);color:var(--c-neutral-700)}.tc-rev-tag--c-primary-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-300);color:var(--c-primary-300)}.tc-rev-tag--c-primary-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-400);color:var(--c-primary-400)}.tc-rev-tag--c-primary-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-500);color:var(--c-primary-500)}.tc-rev-tag--c-primary-600-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-600);color:var(--c-primary-600)}.tc-rev-tag--c-primary-700-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-700);color:var(--c-primary-700)}.tc-rev-tag--c-danger-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-danger-300);color:var(--c-danger-300)}.tc-rev-tag--c-danger-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-danger-400);color:var(--c-danger-400)}.tc-rev-tag--c-danger-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-danger-500);color:var(--c-danger-500)}.tc-rev-tag--c-alert-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-alert-300);color:var(--c-alert-300)}.tc-rev-tag--c-alert-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-alert-400);color:var(--c-alert-400)}.tc-rev-tag--c-alert-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-alert-500);color:var(--c-alert-500)}.tc-rev-tag--c-info-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-info-300);color:var(--c-info-300)}.tc-rev-tag--c-info-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-info-400);color:var(--c-info-400)}.tc-rev-tag--c-info-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-info-500);color:var(--c-info-500)}.tc-rev-tag--c-success-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-success-300);color:var(--c-success-300)}.tc-rev-tag--c-success-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-success-400);color:var(--c-success-400)}.tc-rev-tag--c-success-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-success-500);color:var(--c-success-500)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
12315
|
+
}
|
|
12316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevTagComponent, decorators: [{
|
|
12317
|
+
type: Component,
|
|
12318
|
+
args: [{ selector: 'tc-rev-tag', imports: [
|
|
12319
|
+
CommonModule
|
|
12320
|
+
], template: "<span\n [class.tc-rev-tag--sm]=\"size() === 'sm'\"\n [class.tc-rev-tag--md]=\"size() === 'md' || size() === 'regular'\"\n [class.tc-rev-tag--lg]=\"size() === 'lg'\"\n [class.tc-rev-tag--pill]=\"shape() === 'pill'\"\n [class.tc-rev-tag--full-width]=\"fullWidth()\"\n class=\"{{!color() && !variant() ? '' : 'tc-rev-tag tc-rev-tag--c-' + color() + '-' + variant()}}\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{display:block}.tc-rev-tag,.tc-rev-tag--lg,.tc-rev-tag--md,.tc-rev-tag--sm{background-color:var(--c-neutral-50);border:1px solid var(--c-neutral-50);border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:default;display:inline-flex;align-items:center;justify-content:center;gap:var(--size-8);font-family:var(--f-family);font-size:var(--f-size-12);font-weight:var(--f-weight-500);padding:var(--size-2) var(--size-4);height:var(--size-22);max-height:var(--size-22);min-height:var(--size-22)}.tc-rev-tag--full-width{width:100%}.tc-rev-tag--sm{padding:var(--size-2) var(--size-4);height:var(--size-22);max-height:var(--size-22);min-height:var(--size-22)}.tc-rev-tag--md{padding:var(--size-4);height:var(--size-26);max-height:var(--size-26);min-height:var(--size-26)}.tc-rev-tag--lg{padding:var(--size-8);height:var(--size-34);max-height:var(--size-34);min-height:var(--size-34)}.tc-rev-tag--pill{border-radius:var(--bor-radius-pill)}.tc-rev-tag--c-neutral-50-filled{background-color:var(--c-neutral-50);border-color:var(--c-neutral-50);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-100-filled{background-color:var(--c-neutral-100);border-color:var(--c-neutral-100);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-200-filled{background-color:var(--c-neutral-200);border-color:var(--c-neutral-200);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-300-filled{background-color:var(--c-neutral-300);border-color:var(--c-neutral-300);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-400-filled{background-color:var(--c-neutral-400);border-color:var(--c-neutral-400);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-500-filled{background-color:var(--c-neutral-500);border-color:var(--c-neutral-500);color:var(--c-neutral-50)}.tc-rev-tag--c-neutral-600-filled{background-color:var(--c-neutral-600);border-color:var(--c-neutral-600);color:var(--c-neutral-50)}.tc-rev-tag--c-neutral-700-filled,.tc-rev-tag--c-neutral-800-filled{background-color:var(--c-neutral-700);border-color:var(--c-neutral-700);color:var(--c-neutral-50)}.tc-rev-tag--c-primary-300-filled{background-color:var(--c-primary-300);border-color:var(--c-primary-300);color:var(--c-neutral-700)}.tc-rev-tag--c-primary-400-filled{background-color:var(--c-primary-400);border-color:var(--c-primary-400);color:var(--c-neutral-700)}.tc-rev-tag--c-primary-500-filled{background-color:var(--c-primary-500);border-color:var(--c-primary-500);color:var(--c-neutral-50)}.tc-rev-tag--c-primary-600-filled{background-color:var(--c-primary-600);border-color:var(--c-primary-600);color:var(--c-neutral-50)}.tc-rev-tag--c-primary-700-filled{background-color:var(--c-primary-700);border-color:var(--c-primary-700);color:var(--c-neutral-50)}.tc-rev-tag--c-danger-300-filled{background-color:var(--c-danger-300);border-color:var(--c-danger-300);color:var(--c-neutral-700)}.tc-rev-tag--c-danger-400-filled{background-color:var(--c-danger-400);border-color:var(--c-danger-400);color:var(--c-neutral-700)}.tc-rev-tag--c-danger-500-filled{background-color:var(--c-danger-500);border-color:var(--c-danger-500);color:var(--c-neutral-50)}.tc-rev-tag--c-alert-300-filled{background-color:var(--c-alert-300);border-color:var(--c-alert-300);color:var(--c-neutral-700)}.tc-rev-tag--c-alert-400-filled{background-color:var(--c-alert-400);border-color:var(--c-alert-400);color:var(--c-neutral-700)}.tc-rev-tag--c-alert-500-filled{background-color:var(--c-alert-500);border-color:var(--c-alert-500);color:var(--c-neutral-700)}.tc-rev-tag--c-info-300-filled{background-color:var(--c-info-300);border-color:var(--c-info-300);color:var(--c-neutral-700)}.tc-rev-tag--c-info-400-filled{background-color:var(--c-info-400);border-color:var(--c-info-400);color:var(--c-neutral-700)}.tc-rev-tag--c-info-500-filled{background-color:var(--c-info-500);border-color:var(--c-info-500);color:var(--c-neutral-50)}.tc-rev-tag--c-success-300-filled{background-color:var(--c-success-300);border-color:var(--c-success-300);color:var(--c-neutral-700)}.tc-rev-tag--c-success-400-filled{background-color:var(--c-success-400);border-color:var(--c-success-400);color:var(--c-neutral-700)}.tc-rev-tag--c-success-500-filled{background-color:var(--c-success-500);border-color:var(--c-success-500);color:var(--c-neutral-700)}.tc-rev-tag--c-neutral-50-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-50);color:var(--c-neutral-50)}.tc-rev-tag--c-neutral-100-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-100);color:var(--c-neutral-100)}.tc-rev-tag--c-neutral-200-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-200);color:var(--c-neutral-200)}.tc-rev-tag--c-neutral-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-300);color:var(--c-neutral-300)}.tc-rev-tag--c-neutral-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-400);color:var(--c-neutral-400)}.tc-rev-tag--c-neutral-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-500);color:var(--c-neutral-500)}.tc-rev-tag--c-neutral-600-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-600);color:var(--c-neutral-600)}.tc-rev-tag--c-neutral-700-outline,.tc-rev-tag--c-neutral-800-outline{background-color:var(--c-neutral-50);border-color:var(--c-neutral-700);color:var(--c-neutral-700)}.tc-rev-tag--c-primary-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-300);color:var(--c-primary-300)}.tc-rev-tag--c-primary-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-400);color:var(--c-primary-400)}.tc-rev-tag--c-primary-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-500);color:var(--c-primary-500)}.tc-rev-tag--c-primary-600-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-600);color:var(--c-primary-600)}.tc-rev-tag--c-primary-700-outline{background-color:var(--c-neutral-50);border-color:var(--c-primary-700);color:var(--c-primary-700)}.tc-rev-tag--c-danger-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-danger-300);color:var(--c-danger-300)}.tc-rev-tag--c-danger-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-danger-400);color:var(--c-danger-400)}.tc-rev-tag--c-danger-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-danger-500);color:var(--c-danger-500)}.tc-rev-tag--c-alert-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-alert-300);color:var(--c-alert-300)}.tc-rev-tag--c-alert-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-alert-400);color:var(--c-alert-400)}.tc-rev-tag--c-alert-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-alert-500);color:var(--c-alert-500)}.tc-rev-tag--c-info-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-info-300);color:var(--c-info-300)}.tc-rev-tag--c-info-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-info-400);color:var(--c-info-400)}.tc-rev-tag--c-info-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-info-500);color:var(--c-info-500)}.tc-rev-tag--c-success-300-outline{background-color:var(--c-neutral-50);border-color:var(--c-success-300);color:var(--c-success-300)}.tc-rev-tag--c-success-400-outline{background-color:var(--c-neutral-50);border-color:var(--c-success-400);color:var(--c-success-400)}.tc-rev-tag--c-success-500-outline{background-color:var(--c-neutral-50);border-color:var(--c-success-500);color:var(--c-success-500)}\n"] }]
|
|
12321
|
+
}] });
|
|
12322
|
+
|
|
12323
|
+
class TcRevToastComponent {
|
|
12324
|
+
constructor() {
|
|
12325
|
+
this.type = input('info');
|
|
12326
|
+
this.fullWidth = input(false);
|
|
12327
|
+
this.size = input('md');
|
|
12328
|
+
}
|
|
12329
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12330
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: TcRevToastComponent, isStandalone: true, selector: "tc-rev-toast", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"tc-rev-toast c-neutral-700\">\n <div\n class=\"tc-rev-toast__icon\"\n [ngClass]=\"[\n 'tc-rev-toast__icon--' + type(),\n 'tc-rev-toast__icon--' + size()\n ]\"\n >\n <ng-content select=\"[icon]\" />\n </div>\n\n <div\n class=\"tc-rev-toast__content\"\n [ngClass]=\"[\n 'tc-rev-toast__content--' + type(),\n 'tc-rev-toast__content--' + size()\n ]\"\n [class.full-width]=\"fullWidth()\"\n >\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:block}.tc-rev-toast{display:flex}.tc-rev-toast__icon{align-items:center;border-radius:var(--bor-radius-8) 0 0 var(--bor-radius-8);display:flex;justify-content:center}.tc-rev-toast__icon--info{background-color:var(--c-primary-500)}.tc-rev-toast__icon--success{background-color:var(--c-success-500)}.tc-rev-toast__icon--alert{background-color:var(--c-alert-500)}.tc-rev-toast__icon--danger{background-color:var(--c-danger-500)}.tc-rev-toast__icon--sm{font-size:var(--f-size-20);padding:var(--size-14)}.tc-rev-toast__icon--md{font-size:var(--f-size-24);padding:var(--size-16)}.tc-rev-toast__icon--lg{font-size:var(--f-size-24);padding:var(--size-18)}.tc-rev-toast__content{align-items:center;border-radius:0 var(--bor-radius-8) var(--bor-radius-8) 0;display:flex;font-family:var(--f-family)}.tc-rev-toast__content--info{background-color:var(--c-primary-300)}.tc-rev-toast__content--success{background-color:var(--c-success-300)}.tc-rev-toast__content--alert{background-color:var(--c-alert-300)}.tc-rev-toast__content--danger{background-color:var(--c-danger-300)}.tc-rev-toast__content--sm{padding:var(--size-12);font-size:var(--f-size-12);line-height:var(--l-height-16)}.tc-rev-toast__content--md{padding:var(--size-16);font-size:var(--f-size-14);line-height:var(--l-height-20)}.tc-rev-toast__content--lg{padding:var(--size-18);font-size:var(--f-size-16);line-height:var(--l-height-24)}.tc-rev-toast__content.full-width{flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
12331
|
+
}
|
|
12332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevToastComponent, decorators: [{
|
|
12333
|
+
type: Component,
|
|
12334
|
+
args: [{ selector: 'tc-rev-toast', imports: [CommonModule], template: "<div class=\"tc-rev-toast c-neutral-700\">\n <div\n class=\"tc-rev-toast__icon\"\n [ngClass]=\"[\n 'tc-rev-toast__icon--' + type(),\n 'tc-rev-toast__icon--' + size()\n ]\"\n >\n <ng-content select=\"[icon]\" />\n </div>\n\n <div\n class=\"tc-rev-toast__content\"\n [ngClass]=\"[\n 'tc-rev-toast__content--' + type(),\n 'tc-rev-toast__content--' + size()\n ]\"\n [class.full-width]=\"fullWidth()\"\n >\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:block}.tc-rev-toast{display:flex}.tc-rev-toast__icon{align-items:center;border-radius:var(--bor-radius-8) 0 0 var(--bor-radius-8);display:flex;justify-content:center}.tc-rev-toast__icon--info{background-color:var(--c-primary-500)}.tc-rev-toast__icon--success{background-color:var(--c-success-500)}.tc-rev-toast__icon--alert{background-color:var(--c-alert-500)}.tc-rev-toast__icon--danger{background-color:var(--c-danger-500)}.tc-rev-toast__icon--sm{font-size:var(--f-size-20);padding:var(--size-14)}.tc-rev-toast__icon--md{font-size:var(--f-size-24);padding:var(--size-16)}.tc-rev-toast__icon--lg{font-size:var(--f-size-24);padding:var(--size-18)}.tc-rev-toast__content{align-items:center;border-radius:0 var(--bor-radius-8) var(--bor-radius-8) 0;display:flex;font-family:var(--f-family)}.tc-rev-toast__content--info{background-color:var(--c-primary-300)}.tc-rev-toast__content--success{background-color:var(--c-success-300)}.tc-rev-toast__content--alert{background-color:var(--c-alert-300)}.tc-rev-toast__content--danger{background-color:var(--c-danger-300)}.tc-rev-toast__content--sm{padding:var(--size-12);font-size:var(--f-size-12);line-height:var(--l-height-16)}.tc-rev-toast__content--md{padding:var(--size-16);font-size:var(--f-size-14);line-height:var(--l-height-20)}.tc-rev-toast__content--lg{padding:var(--size-18);font-size:var(--f-size-16);line-height:var(--l-height-24)}.tc-rev-toast__content.full-width{flex-grow:1}\n"] }]
|
|
12335
|
+
}] });
|
|
12336
|
+
|
|
12337
|
+
class TcRevSubNavbarItemComponent {
|
|
12338
|
+
constructor() {
|
|
12339
|
+
this.label = input.required();
|
|
12340
|
+
this.onClick = output();
|
|
12341
|
+
this.active = input(false);
|
|
12342
|
+
this.routerLink = input(null);
|
|
12343
|
+
this.queryParams = input(null);
|
|
12344
|
+
}
|
|
12345
|
+
handleClick(_ev) {
|
|
12346
|
+
this.onClick.emit(_ev);
|
|
12347
|
+
}
|
|
12348
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSubNavbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12349
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevSubNavbarItemComponent, isStandalone: true, selector: "tc-rev-sub-navbar-item", inputs: { isMenuExpanded: { classPropertyName: "isMenuExpanded", publicName: "isMenuExpanded", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<li\n class=\"tc-sub-navbar-item\"\n [class.tc-rev-submenu-expanded]=\"isMenuExpanded\">\n <a\n class=\"tc-sub-navbar-item-link\"\n [class.selected]=\"active()\"\n [routerLink]=\"routerLink()\"\n routerLinkActive=\"active\"\n [queryParams]=\"queryParams()\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n [title]=\"label()\"\n (click)=\"handleClick($event)\">\n\n <div class=\"navbar-item-icon-container\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n\n @if (isMenuExpanded)\n {\n <div class=\"navbar-item-label\">\n {{label()}}\n </div>\n }\n </a>\n</li>\n", styles: [":host{display:block}.tc-sub-navbar-item{list-style:none;margin:0;padding:0}.tc-sub-navbar-item .tc-sub-navbar-item-link{align-items:center;border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;font-family:var(--f-family);display:flex;transition:all .2s ease;text-decoration:none}.tc-sub-navbar-item .tc-sub-navbar-item-link .navbar-item-icon-container{text-align:center;align-content:center;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);font-size:var(--f-size-20);height:var(--size-36);width:var(--size-36);transition:all .2s ease;min-height:var(--size-36);min-width:var(--size-36);max-height:var(--size-36);max-width:var(--size-36)}.tc-sub-navbar-item .tc-sub-navbar-item-link .navbar-item-icon-container:hover,.tc-sub-navbar-item .tc-sub-navbar-item-link .navbar-item-icon-container:focus{background-color:var(--c-neutral-200);color:var(--c-primary-500)}.tc-sub-navbar-item .tc-sub-navbar-item-link .navbar-item-label{align-content:center;color:var(--c-neutral-700);font-size:var(--f-size-14);height:var(--size-36);padding-left:var(--size-8);transition:all .2s ease;min-height:var(--size-36);max-height:var(--size-36)}.tc-sub-navbar-item .tc-sub-navbar-item-link:hover,.tc-sub-navbar-item .tc-sub-navbar-item-link:focus{color:var(--c-primary-500)}.tc-sub-navbar-item .tc-sub-navbar-item-link.active .navbar-item-icon-container,.tc-sub-navbar-item .tc-sub-navbar-item-link.selected .navbar-item-icon-container,.tc-sub-navbar-item .tc-sub-navbar-item-link:active .navbar-item-icon-container{background-color:var(--c-primary-300);color:var(--c-primary-500)}.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link .navbar-item-icon-container{background-color:var(--c-neutral-200)}.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link:hover .navbar-item-label,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link:focus .navbar-item-label{color:var(--c-primary-500)}.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.active,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.selected,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.active .navbar-item-icon-container,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.selected .navbar-item-icon-container{background-color:var(--c-primary-300)}.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.active .navbar-item-label,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.selected .navbar-item-label{color:var(--c-primary-500);font-weight:var(--f-weight-700)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] }); }
|
|
12350
|
+
}
|
|
12351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSubNavbarItemComponent, decorators: [{
|
|
12352
|
+
type: Component,
|
|
12353
|
+
args: [{ selector: 'tc-rev-sub-navbar-item', imports: [
|
|
12354
|
+
CommonModule,
|
|
12355
|
+
RouterModule,
|
|
12356
|
+
], template: "<li\n class=\"tc-sub-navbar-item\"\n [class.tc-rev-submenu-expanded]=\"isMenuExpanded\">\n <a\n class=\"tc-sub-navbar-item-link\"\n [class.selected]=\"active()\"\n [routerLink]=\"routerLink()\"\n routerLinkActive=\"active\"\n [queryParams]=\"queryParams()\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n [title]=\"label()\"\n (click)=\"handleClick($event)\">\n\n <div class=\"navbar-item-icon-container\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n\n @if (isMenuExpanded)\n {\n <div class=\"navbar-item-label\">\n {{label()}}\n </div>\n }\n </a>\n</li>\n", styles: [":host{display:block}.tc-sub-navbar-item{list-style:none;margin:0;padding:0}.tc-sub-navbar-item .tc-sub-navbar-item-link{align-items:center;border-radius:var(--bor-radius-4);color:var(--c-neutral-700);cursor:pointer;font-family:var(--f-family);display:flex;transition:all .2s ease;text-decoration:none}.tc-sub-navbar-item .tc-sub-navbar-item-link .navbar-item-icon-container{text-align:center;align-content:center;background-color:var(--c-neutral-50);border-radius:var(--bor-radius-4);font-size:var(--f-size-20);height:var(--size-36);width:var(--size-36);transition:all .2s ease;min-height:var(--size-36);min-width:var(--size-36);max-height:var(--size-36);max-width:var(--size-36)}.tc-sub-navbar-item .tc-sub-navbar-item-link .navbar-item-icon-container:hover,.tc-sub-navbar-item .tc-sub-navbar-item-link .navbar-item-icon-container:focus{background-color:var(--c-neutral-200);color:var(--c-primary-500)}.tc-sub-navbar-item .tc-sub-navbar-item-link .navbar-item-label{align-content:center;color:var(--c-neutral-700);font-size:var(--f-size-14);height:var(--size-36);padding-left:var(--size-8);transition:all .2s ease;min-height:var(--size-36);max-height:var(--size-36)}.tc-sub-navbar-item .tc-sub-navbar-item-link:hover,.tc-sub-navbar-item .tc-sub-navbar-item-link:focus{color:var(--c-primary-500)}.tc-sub-navbar-item .tc-sub-navbar-item-link.active .navbar-item-icon-container,.tc-sub-navbar-item .tc-sub-navbar-item-link.selected .navbar-item-icon-container,.tc-sub-navbar-item .tc-sub-navbar-item-link:active .navbar-item-icon-container{background-color:var(--c-primary-300);color:var(--c-primary-500)}.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link .navbar-item-icon-container{background-color:var(--c-neutral-200)}.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link:hover .navbar-item-label,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link:focus .navbar-item-label{color:var(--c-primary-500)}.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.active,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.selected,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.active .navbar-item-icon-container,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.selected .navbar-item-icon-container{background-color:var(--c-primary-300)}.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.active .navbar-item-label,.tc-sub-navbar-item.tc-rev-submenu-expanded .tc-sub-navbar-item-link.selected .navbar-item-label{color:var(--c-primary-500);font-weight:var(--f-weight-700)}\n"] }]
|
|
12357
|
+
}], propDecorators: { isMenuExpanded: [{
|
|
12358
|
+
type: Input
|
|
12359
|
+
}] } });
|
|
12360
|
+
|
|
12361
|
+
class TcRevSubNavbarComponent {
|
|
12362
|
+
constructor() {
|
|
12363
|
+
this.isMenuExpanded = signal(true);
|
|
12364
|
+
this.onSubMenuExpandChange = output();
|
|
12365
|
+
}
|
|
12366
|
+
ngAfterContentInit() {
|
|
12367
|
+
setTimeout(() => this.setExpandedMenuValueToChildrend(), 0);
|
|
12368
|
+
}
|
|
12369
|
+
handleExpandMenu() {
|
|
12370
|
+
this.isMenuExpanded.update((value) => !value);
|
|
12371
|
+
this.setExpandedMenuValueToChildrend();
|
|
12372
|
+
}
|
|
12373
|
+
setExpandedMenuValueToChildrend() {
|
|
12374
|
+
if (!this.subNavbarItems?.length)
|
|
12375
|
+
return;
|
|
12376
|
+
this.subNavbarItems.forEach((x) => {
|
|
12377
|
+
x.isMenuExpanded = this.isMenuExpanded();
|
|
12378
|
+
});
|
|
12379
|
+
this.onSubMenuExpandChange.emit(this.isMenuExpanded());
|
|
12380
|
+
}
|
|
12381
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSubNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12382
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: TcRevSubNavbarComponent, isStandalone: true, selector: "tc-rev-sub-navbar", outputs: { onSubMenuExpandChange: "onSubMenuExpandChange" }, queries: [{ propertyName: "subNavbarItems", predicate: TcRevSubNavbarItemComponent }], ngImport: i0, template: "<nav class=\"tc-sub-navbar\">\n <ul\n class=\"tc-sub-navbar-list\"\n [class.tc-rev-submenu-expanded]=\"isMenuExpanded()\"\n >\n <tc-rev-sub-navbar-item\n [isMenuExpanded]=\"isMenuExpanded()\"\n (click)=\"handleExpandMenu()\"\n label=\"Minimizar\"\n >\n <i\n class=\"fa-light\"\n [class.fa-arrow-left-to-line]=\"isMenuExpanded()\"\n [class.fa-arrow-right-to-line]=\"!isMenuExpanded()\"\n icon\n ></i>\n </tc-rev-sub-navbar-item>\n <ng-content></ng-content>\n </ul>\n</nav>\n", styles: [":host{display:block;height:100%}.tc-sub-navbar{height:100%;margin:var(--size-0);padding:var(--size-0)}.tc-sub-navbar .tc-sub-navbar-list{background-color:var(--c-neutral-50);color:var(--c-neutral-700);box-shadow:var(--shadow-xs);border-radius:var(--bor-radius-8);display:flex;flex-direction:column;gap:var(--size-8);height:100%;list-style:none;margin:var(--size-0);overflow:hidden auto;padding:var(--size-8);width:var(--size-52)}.tc-sub-navbar .tc-sub-navbar-list::-webkit-scrollbar{display:none}.tc-sub-navbar .tc-sub-navbar-list.tc-rev-submenu-expanded{width:14.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TcRevSubNavbarItemComponent, selector: "tc-rev-sub-navbar-item", inputs: ["isMenuExpanded", "label", "active", "routerLink", "queryParams"], outputs: ["onClick"] }] }); }
|
|
12383
|
+
}
|
|
12384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevSubNavbarComponent, decorators: [{
|
|
12385
|
+
type: Component,
|
|
12386
|
+
args: [{ selector: 'tc-rev-sub-navbar', imports: [
|
|
12387
|
+
CommonModule,
|
|
12388
|
+
TcRevSubNavbarItemComponent,
|
|
12389
|
+
], template: "<nav class=\"tc-sub-navbar\">\n <ul\n class=\"tc-sub-navbar-list\"\n [class.tc-rev-submenu-expanded]=\"isMenuExpanded()\"\n >\n <tc-rev-sub-navbar-item\n [isMenuExpanded]=\"isMenuExpanded()\"\n (click)=\"handleExpandMenu()\"\n label=\"Minimizar\"\n >\n <i\n class=\"fa-light\"\n [class.fa-arrow-left-to-line]=\"isMenuExpanded()\"\n [class.fa-arrow-right-to-line]=\"!isMenuExpanded()\"\n icon\n ></i>\n </tc-rev-sub-navbar-item>\n <ng-content></ng-content>\n </ul>\n</nav>\n", styles: [":host{display:block;height:100%}.tc-sub-navbar{height:100%;margin:var(--size-0);padding:var(--size-0)}.tc-sub-navbar .tc-sub-navbar-list{background-color:var(--c-neutral-50);color:var(--c-neutral-700);box-shadow:var(--shadow-xs);border-radius:var(--bor-radius-8);display:flex;flex-direction:column;gap:var(--size-8);height:100%;list-style:none;margin:var(--size-0);overflow:hidden auto;padding:var(--size-8);width:var(--size-52)}.tc-sub-navbar .tc-sub-navbar-list::-webkit-scrollbar{display:none}.tc-sub-navbar .tc-sub-navbar-list.tc-rev-submenu-expanded{width:14.5rem}\n"] }]
|
|
12390
|
+
}], propDecorators: { subNavbarItems: [{
|
|
12391
|
+
type: ContentChildren,
|
|
12392
|
+
args: [TcRevSubNavbarItemComponent]
|
|
12393
|
+
}] } });
|
|
12394
|
+
|
|
12395
|
+
class TcRevWizardStepsComponent {
|
|
12396
|
+
constructor() {
|
|
12397
|
+
this.onStepClick = output();
|
|
12398
|
+
this.direction = input('horizontal');
|
|
12399
|
+
this.currentStep = input(0);
|
|
12400
|
+
this.stepClickable = input(false);
|
|
12401
|
+
this.steps = input.required();
|
|
12402
|
+
}
|
|
12403
|
+
handleStepClick(step, isNext, index) {
|
|
12404
|
+
if (this.stepClickable() && !isNext) {
|
|
12405
|
+
this.onStepClick.emit({ step, index });
|
|
12406
|
+
}
|
|
12407
|
+
}
|
|
12408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevWizardStepsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12409
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevWizardStepsComponent, isStandalone: true, selector: "tc-rev-wizard-steps", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: false, transformFunction: null }, stepClickable: { classPropertyName: "stepClickable", publicName: "stepClickable", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onStepClick: "onStepClick" }, ngImport: i0, template: "<div [class]=\"'tc-rev-wizard-steps' + ` tc-rev-wizard-steps--${this.direction()}`\">\n @for (step of this.steps(); let i = $index; track step.title + i) {\n @let isCompleted = step.completed || i + 1 < this.currentStep();\n @let isNext = i + 1 > this.currentStep();\n <div\n class=\"tc-rev-wizard-step\"\n [class.tc-rev-wizard-step--current]=\"i + 1 === this.currentStep()\"\n [class.tc-rev-wizard-step--completed]=\"isCompleted\"\n [class.tc-rev-wizard-step--next]=\"isNext\">\n\n <span\n class=\"tc-rev-wizard-step__counter f-h3\"\n [class.cursor-default]=\"!this.stepClickable()\"\n [class.cursor-pointer]=\"this.stepClickable() && !isNext\"\n (click)=\"this.handleStepClick(step, isNext, i)\">\n @if (isCompleted) {\n <i class=\"fas fa-check\"></i>\n }\n @else {\n {{ i + 1 }}\n }\n </span>\n\n <div class=\"tc-rev-wizard-step__info\">\n <p class=\"tc-rev-wizard-step__title f-lg mar-none cursor-default\">\n {{ step.title }}\n </p>\n\n @if (step.description) {\n <p class=\"tc-rev-wizard-step__description f-sm mar-none cursor-default\">\n {{ step.description }}\n </p>\n }\n </div>\n </div>\n }\n</div>\n\n<!-- VERS\u00C3O COM DIVISOR -->\n<!-- <div [class]=\"'tc-rev-wizard-steps' + ` tc-rev-wizard-steps--${this.direction()}`\">\n @for (step of this.steps(); let i = $index; let last = $last; track step.title + i) {\n @let isCompleted = step.completed || i + 1 < this.currentStep();\n\n <div\n class=\"tc-rev-wizard-step\"\n [class.tc-rev-wizard-step--current]=\"i + 1 === this.currentStep()\"\n [class.tc-rev-wizard-step--completed]=\"isCompleted\"\n [class.tc-rev-wizard-step--next]=\"i + 1 > this.currentStep()\"\n [ngClass]=\"this.direction()\">\n\n <span class=\"tc-rev-wizard-step__counter f-h3 cursor-default\">\n {{ i + 1 }}\n </span>\n\n <div class=\"tc-rev-wizard-step__info\">\n <p class=\"tc-rev-wizard-step__title f-lg mar-none cursor-default\">\n {{ step.title }}\n </p>\n\n @if (step.description) {\n <p class=\"tc-rev-wizard-step__description f-sm mar-none cursor-default\">\n {{ step.description }}\n </p>\n }\n </div>\n </div>\n\n @if (this.steps().length > i && !last) {\n <div\n class=\"tc-rev-wizard-step-divider\"\n [class.completed]=\"isCompleted\"\n [ngClass]=\"this.direction()\">\n </div>\n }\n }\n</div> -->\n", styles: [":host{display:block}.tc-rev-wizard-steps{display:inline-flex;font-family:var(--f-family);gap:var(--size-32)}.tc-rev-wizard-steps--horizontal{flex-direction:row}.tc-rev-wizard-steps--vertical{flex-direction:column}.tc-rev-wizard-steps .tc-rev-wizard-step{display:flex;gap:var(--size-8)}.tc-rev-wizard-steps .tc-rev-wizard-step__info{max-width:13.25rem}.tc-rev-wizard-steps .tc-rev-wizard-step__counter{align-items:center;border:1px solid;border-radius:var(--bor-radius-rounded);display:flex;height:var(--size-40);justify-content:center;width:var(--size-40);transition:all .3s ease;min-height:var(--size-40);min-width:var(--size-40)}.tc-rev-wizard-steps .tc-rev-wizard-step--completed .tc-rev-wizard-step__counter{border-color:1px solid var(--c-primary-600);color:var(--c-neutral-600)}.tc-rev-wizard-steps .tc-rev-wizard-step--completed .tc-rev-wizard-step__title{color:var(--c-neutral-600);font-weight:var(--f-weight-400)}.tc-rev-wizard-steps .tc-rev-wizard-step--completed .tc-rev-wizard-step__description{color:var(--c-neutral-600)}.tc-rev-wizard-steps .tc-rev-wizard-step--current .tc-rev-wizard-step__counter{background-color:var(--c-primary-500);border-color:var(--c-primary-500);color:var(--c-neutral-50)}.tc-rev-wizard-steps .tc-rev-wizard-step--current .tc-rev-wizard-step__title{color:var(--c-neutral-700);font-weight:var(--f-weight-600)}.tc-rev-wizard-steps .tc-rev-wizard-step--current .tc-rev-wizard-step__description{color:var(--c-neutral-700);font-weight:var(--f-weight-400)}.tc-rev-wizard-steps .tc-rev-wizard-step--next .tc-rev-wizard-step__counter{border-color:var(--c-neutral-400);color:var(--c-neutral-400)}.tc-rev-wizard-steps .tc-rev-wizard-step--next .tc-rev-wizard-step__title{color:var(--c-neutral-400);font-weight:var(--f-weight-400)}.tc-rev-wizard-steps .tc-rev-wizard-step--next .tc-rev-wizard-step__description{color:var(--c-neutral-400)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], animations: [
|
|
12410
|
+
trigger('progressBarEntering', [
|
|
12411
|
+
state('in', style({ width: '*' })),
|
|
12412
|
+
transition('void => *', [
|
|
12413
|
+
style({ width: 0 }),
|
|
12414
|
+
animate('1.5s 0s ease')
|
|
12415
|
+
])
|
|
12416
|
+
])
|
|
12417
|
+
] }); }
|
|
12418
|
+
}
|
|
12419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevWizardStepsComponent, decorators: [{
|
|
12420
|
+
type: Component,
|
|
12421
|
+
args: [{ selector: 'tc-rev-wizard-steps', imports: [CommonModule], animations: [
|
|
12422
|
+
trigger('progressBarEntering', [
|
|
12423
|
+
state('in', style({ width: '*' })),
|
|
12424
|
+
transition('void => *', [
|
|
12425
|
+
style({ width: 0 }),
|
|
12426
|
+
animate('1.5s 0s ease')
|
|
12427
|
+
])
|
|
12428
|
+
])
|
|
12429
|
+
], template: "<div [class]=\"'tc-rev-wizard-steps' + ` tc-rev-wizard-steps--${this.direction()}`\">\n @for (step of this.steps(); let i = $index; track step.title + i) {\n @let isCompleted = step.completed || i + 1 < this.currentStep();\n @let isNext = i + 1 > this.currentStep();\n <div\n class=\"tc-rev-wizard-step\"\n [class.tc-rev-wizard-step--current]=\"i + 1 === this.currentStep()\"\n [class.tc-rev-wizard-step--completed]=\"isCompleted\"\n [class.tc-rev-wizard-step--next]=\"isNext\">\n\n <span\n class=\"tc-rev-wizard-step__counter f-h3\"\n [class.cursor-default]=\"!this.stepClickable()\"\n [class.cursor-pointer]=\"this.stepClickable() && !isNext\"\n (click)=\"this.handleStepClick(step, isNext, i)\">\n @if (isCompleted) {\n <i class=\"fas fa-check\"></i>\n }\n @else {\n {{ i + 1 }}\n }\n </span>\n\n <div class=\"tc-rev-wizard-step__info\">\n <p class=\"tc-rev-wizard-step__title f-lg mar-none cursor-default\">\n {{ step.title }}\n </p>\n\n @if (step.description) {\n <p class=\"tc-rev-wizard-step__description f-sm mar-none cursor-default\">\n {{ step.description }}\n </p>\n }\n </div>\n </div>\n }\n</div>\n\n<!-- VERS\u00C3O COM DIVISOR -->\n<!-- <div [class]=\"'tc-rev-wizard-steps' + ` tc-rev-wizard-steps--${this.direction()}`\">\n @for (step of this.steps(); let i = $index; let last = $last; track step.title + i) {\n @let isCompleted = step.completed || i + 1 < this.currentStep();\n\n <div\n class=\"tc-rev-wizard-step\"\n [class.tc-rev-wizard-step--current]=\"i + 1 === this.currentStep()\"\n [class.tc-rev-wizard-step--completed]=\"isCompleted\"\n [class.tc-rev-wizard-step--next]=\"i + 1 > this.currentStep()\"\n [ngClass]=\"this.direction()\">\n\n <span class=\"tc-rev-wizard-step__counter f-h3 cursor-default\">\n {{ i + 1 }}\n </span>\n\n <div class=\"tc-rev-wizard-step__info\">\n <p class=\"tc-rev-wizard-step__title f-lg mar-none cursor-default\">\n {{ step.title }}\n </p>\n\n @if (step.description) {\n <p class=\"tc-rev-wizard-step__description f-sm mar-none cursor-default\">\n {{ step.description }}\n </p>\n }\n </div>\n </div>\n\n @if (this.steps().length > i && !last) {\n <div\n class=\"tc-rev-wizard-step-divider\"\n [class.completed]=\"isCompleted\"\n [ngClass]=\"this.direction()\">\n </div>\n }\n }\n</div> -->\n", styles: [":host{display:block}.tc-rev-wizard-steps{display:inline-flex;font-family:var(--f-family);gap:var(--size-32)}.tc-rev-wizard-steps--horizontal{flex-direction:row}.tc-rev-wizard-steps--vertical{flex-direction:column}.tc-rev-wizard-steps .tc-rev-wizard-step{display:flex;gap:var(--size-8)}.tc-rev-wizard-steps .tc-rev-wizard-step__info{max-width:13.25rem}.tc-rev-wizard-steps .tc-rev-wizard-step__counter{align-items:center;border:1px solid;border-radius:var(--bor-radius-rounded);display:flex;height:var(--size-40);justify-content:center;width:var(--size-40);transition:all .3s ease;min-height:var(--size-40);min-width:var(--size-40)}.tc-rev-wizard-steps .tc-rev-wizard-step--completed .tc-rev-wizard-step__counter{border-color:1px solid var(--c-primary-600);color:var(--c-neutral-600)}.tc-rev-wizard-steps .tc-rev-wizard-step--completed .tc-rev-wizard-step__title{color:var(--c-neutral-600);font-weight:var(--f-weight-400)}.tc-rev-wizard-steps .tc-rev-wizard-step--completed .tc-rev-wizard-step__description{color:var(--c-neutral-600)}.tc-rev-wizard-steps .tc-rev-wizard-step--current .tc-rev-wizard-step__counter{background-color:var(--c-primary-500);border-color:var(--c-primary-500);color:var(--c-neutral-50)}.tc-rev-wizard-steps .tc-rev-wizard-step--current .tc-rev-wizard-step__title{color:var(--c-neutral-700);font-weight:var(--f-weight-600)}.tc-rev-wizard-steps .tc-rev-wizard-step--current .tc-rev-wizard-step__description{color:var(--c-neutral-700);font-weight:var(--f-weight-400)}.tc-rev-wizard-steps .tc-rev-wizard-step--next .tc-rev-wizard-step__counter{border-color:var(--c-neutral-400);color:var(--c-neutral-400)}.tc-rev-wizard-steps .tc-rev-wizard-step--next .tc-rev-wizard-step__title{color:var(--c-neutral-400);font-weight:var(--f-weight-400)}.tc-rev-wizard-steps .tc-rev-wizard-step--next .tc-rev-wizard-step__description{color:var(--c-neutral-400)}\n"] }]
|
|
12430
|
+
}] });
|
|
12431
|
+
|
|
12432
|
+
class TcRevBreadcrumbService {
|
|
12433
|
+
constructor() {
|
|
12434
|
+
this.breadcrumbsSubject = new BehaviorSubject([]);
|
|
12435
|
+
this.breadcrumbs$ = this.breadcrumbsSubject.asObservable();
|
|
12436
|
+
}
|
|
12437
|
+
setBreadcrumb(items) {
|
|
12438
|
+
this.breadcrumbsSubject.next(items);
|
|
12439
|
+
}
|
|
12440
|
+
addLevel(item) {
|
|
12441
|
+
const currentItems = this.breadcrumbsSubject.getValue();
|
|
12442
|
+
this.breadcrumbsSubject.next([...currentItems, item]);
|
|
12443
|
+
}
|
|
12444
|
+
removeLastLevel() {
|
|
12445
|
+
const currentItems = this.breadcrumbsSubject.getValue();
|
|
12446
|
+
if (currentItems.length > 0) {
|
|
12447
|
+
const newItems = [...currentItems];
|
|
12448
|
+
newItems.pop();
|
|
12449
|
+
this.breadcrumbsSubject.next(newItems);
|
|
12450
|
+
}
|
|
12451
|
+
}
|
|
12452
|
+
clear() {
|
|
12453
|
+
this.breadcrumbsSubject.next([]);
|
|
12454
|
+
}
|
|
12455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevBreadcrumbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12456
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevBreadcrumbService, providedIn: 'root' }); }
|
|
12457
|
+
}
|
|
12458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevBreadcrumbService, decorators: [{
|
|
12459
|
+
type: Injectable,
|
|
12460
|
+
args: [{
|
|
12461
|
+
providedIn: 'root',
|
|
12462
|
+
}]
|
|
12463
|
+
}], ctorParameters: () => [] });
|
|
12464
|
+
|
|
12465
|
+
class TcRevBreadcrumbComponent {
|
|
12466
|
+
constructor() {
|
|
12467
|
+
this.breadcrumbs = [];
|
|
12468
|
+
this.router = inject(Router);
|
|
12469
|
+
this.breadcrumbService = inject(TcRevBreadcrumbService);
|
|
12470
|
+
}
|
|
12471
|
+
ngOnInit() {
|
|
12472
|
+
this.breadcrumbService.breadcrumbs$.subscribe(items => this.breadcrumbs = items);
|
|
12473
|
+
}
|
|
12474
|
+
navigate(url, index) {
|
|
12475
|
+
if (url) {
|
|
12476
|
+
this.router.navigateByUrl(url);
|
|
12477
|
+
// Opcional: remover níveis do breadcrumb após o clicado
|
|
12478
|
+
if (index !== undefined && index < this.breadcrumbs.length - 1) {
|
|
12479
|
+
this.breadcrumbService.setBreadcrumb(this.breadcrumbs.slice(0, index + 1));
|
|
12480
|
+
}
|
|
12481
|
+
}
|
|
12482
|
+
}
|
|
12483
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12484
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TcRevBreadcrumbComponent, isStandalone: true, selector: "tc-rev-breadcrumb", ngImport: i0, template: "<nav aria-label=\"breadcrumb\" class=\"tc-rev-breadcrumb\">\n <ol class=\"tc-rev-breadcrumb-list\">\n <!-- Link para o Dashboard -->\n <li class=\"tc-rev-breadcrumb-item\">\n <a [routerLink]=\"['/dashboard']\"><i class=\"fa-light fa-house-blank\"></i>\n @if (breadcrumbs.length > 0)\n {\n <i class=\"fa-light fa-chevron-right\"></i>\n }\n @else\n {\n P\u00E1gina inicial\n }\n </a>\n </li>\n\n <!-- Itera\u00E7\u00E3o sobre os itens do breadcrumb -->\n <li\n *ngFor=\"let breadcrumb of breadcrumbs; let i = index; let last = last\"\n class=\"tc-rev-breadcrumb-item\"\n [ngClass]=\"{ 'active': last }\"\n [attr.aria-current]=\"last ? 'page' : null\">\n <ng-container *ngIf=\"!last\">\n <a (click)=\"navigate(breadcrumb.url, i)\">{{ breadcrumb.label }}</a>\n <i class=\"fa-light fa-chevron-right\"></i>\n </ng-container>\n <ng-container *ngIf=\"last\">\n {{ breadcrumb.label }}\n </ng-container>\n </li>\n </ol>\n</nav>", styles: [":host{display:block}.tc-rev-breadcrumb-list{display:flex;list-style:none;padding:0;margin:0;margin-bottom:var(--size-24)}.tc-rev-breadcrumb-item{display:flex;align-items:center;color:var(--c-neutral-700);font-size:var(--f-size-14);font-family:var(--f-family)}.tc-rev-breadcrumb-item a{text-decoration:none;color:inherit;cursor:pointer}.tc-rev-breadcrumb-item a:hover{text-decoration:underline}.tc-rev-breadcrumb-item i{margin:0}.tc-rev-breadcrumb-item i.fa-chevron-right{margin:0 var(--size-12)}.tc-rev-breadcrumb-item.active{pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
12485
|
+
}
|
|
12486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevBreadcrumbComponent, decorators: [{
|
|
12487
|
+
type: Component,
|
|
12488
|
+
args: [{ selector: 'tc-rev-breadcrumb', imports: [
|
|
12489
|
+
CommonModule,
|
|
12490
|
+
RouterModule
|
|
12491
|
+
], template: "<nav aria-label=\"breadcrumb\" class=\"tc-rev-breadcrumb\">\n <ol class=\"tc-rev-breadcrumb-list\">\n <!-- Link para o Dashboard -->\n <li class=\"tc-rev-breadcrumb-item\">\n <a [routerLink]=\"['/dashboard']\"><i class=\"fa-light fa-house-blank\"></i>\n @if (breadcrumbs.length > 0)\n {\n <i class=\"fa-light fa-chevron-right\"></i>\n }\n @else\n {\n P\u00E1gina inicial\n }\n </a>\n </li>\n\n <!-- Itera\u00E7\u00E3o sobre os itens do breadcrumb -->\n <li\n *ngFor=\"let breadcrumb of breadcrumbs; let i = index; let last = last\"\n class=\"tc-rev-breadcrumb-item\"\n [ngClass]=\"{ 'active': last }\"\n [attr.aria-current]=\"last ? 'page' : null\">\n <ng-container *ngIf=\"!last\">\n <a (click)=\"navigate(breadcrumb.url, i)\">{{ breadcrumb.label }}</a>\n <i class=\"fa-light fa-chevron-right\"></i>\n </ng-container>\n <ng-container *ngIf=\"last\">\n {{ breadcrumb.label }}\n </ng-container>\n </li>\n </ol>\n</nav>", styles: [":host{display:block}.tc-rev-breadcrumb-list{display:flex;list-style:none;padding:0;margin:0;margin-bottom:var(--size-24)}.tc-rev-breadcrumb-item{display:flex;align-items:center;color:var(--c-neutral-700);font-size:var(--f-size-14);font-family:var(--f-family)}.tc-rev-breadcrumb-item a{text-decoration:none;color:inherit;cursor:pointer}.tc-rev-breadcrumb-item a:hover{text-decoration:underline}.tc-rev-breadcrumb-item i{margin:0}.tc-rev-breadcrumb-item i.fa-chevron-right{margin:0 var(--size-12)}.tc-rev-breadcrumb-item.active{pointer-events:none}\n"] }]
|
|
12492
|
+
}], ctorParameters: () => [] });
|
|
12493
|
+
|
|
12494
|
+
class TcRevComponentsLibModule {
|
|
12495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevComponentsLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
12496
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: TcRevComponentsLibModule, imports: [TcRevBreadcrumbComponent,
|
|
12497
|
+
TcRevButtonDirective,
|
|
12498
|
+
TcRevCalendarComponent,
|
|
12499
|
+
TcRevCardComponent,
|
|
12500
|
+
TcRevCardAccordionComponent,
|
|
12501
|
+
TcRevCardTitleComponent,
|
|
12502
|
+
TcRevCheckboxDirective,
|
|
12503
|
+
TcRevDropdownComponent,
|
|
12504
|
+
TcRevDropdownGroupedComponent,
|
|
12505
|
+
TcRevDropdownMultiComponent,
|
|
12506
|
+
TcRevDropdownMultiLevelComponent,
|
|
12507
|
+
TcRevEmptyContentComponent,
|
|
12508
|
+
TcRevFaqComponent,
|
|
12509
|
+
TcRevIconButtonDirective,
|
|
12510
|
+
TcRevInputContainerComponent,
|
|
12511
|
+
TcRevInputDirective,
|
|
12512
|
+
TcRevLoadingComponent,
|
|
12513
|
+
TcRevMessageComponent,
|
|
12514
|
+
TcRevMultiInputComponent,
|
|
12515
|
+
TcRevPaginationComponent,
|
|
12516
|
+
TcRevProgressStatusBarComponent,
|
|
12517
|
+
TcRevRadioDirective,
|
|
12518
|
+
TcRevSearchInputComponent,
|
|
12519
|
+
TcRevSideDrawerComponent,
|
|
12520
|
+
TcRevSkeletonLoadingComponent,
|
|
12521
|
+
TcRevSlideToggleDirective,
|
|
12522
|
+
TcRevSmallLoadingComponent,
|
|
12523
|
+
TcRevTabGroupComponent,
|
|
12524
|
+
TcRevTabItemComponent,
|
|
12525
|
+
TcRevTagComponent,
|
|
12526
|
+
TcRevToastComponent,
|
|
12527
|
+
TcRevTooltipDirective,
|
|
12528
|
+
TcRevSubNavbarComponent,
|
|
12529
|
+
TcRevSubNavbarItemComponent,
|
|
12530
|
+
TcRevWizardStepsComponent], exports: [
|
|
12531
|
+
// TcRevBreadcrumbComponent,
|
|
12532
|
+
TcRevButtonDirective,
|
|
12533
|
+
TcRevCalendarComponent,
|
|
12534
|
+
TcRevCardComponent,
|
|
12535
|
+
TcRevCardAccordionComponent,
|
|
12536
|
+
TcRevCardTitleComponent,
|
|
12537
|
+
TcRevCheckboxDirective,
|
|
12538
|
+
TcRevDropdownComponent,
|
|
12539
|
+
TcRevDropdownGroupedComponent,
|
|
12540
|
+
TcRevDropdownMultiComponent,
|
|
12541
|
+
TcRevDropdownMultiLevelComponent,
|
|
12542
|
+
TcRevEmptyContentComponent,
|
|
12543
|
+
TcRevFaqComponent,
|
|
12544
|
+
TcRevIconButtonDirective,
|
|
12545
|
+
TcRevInputContainerComponent,
|
|
12546
|
+
TcRevInputDirective,
|
|
12547
|
+
TcRevLoadingComponent,
|
|
12548
|
+
TcRevMessageComponent,
|
|
12549
|
+
TcRevMultiInputComponent,
|
|
12550
|
+
TcRevPaginationComponent,
|
|
12551
|
+
TcRevProgressStatusBarComponent,
|
|
12552
|
+
TcRevSmallLoadingComponent,
|
|
12553
|
+
TcRevRadioDirective,
|
|
12554
|
+
TcRevSearchInputComponent,
|
|
12555
|
+
TcRevSideDrawerComponent,
|
|
12556
|
+
TcRevSkeletonLoadingComponent,
|
|
12557
|
+
TcRevSlideToggleDirective,
|
|
12558
|
+
TcRevTabGroupComponent,
|
|
12559
|
+
TcRevTabItemComponent,
|
|
12560
|
+
TcRevTagComponent,
|
|
12561
|
+
TcRevToastComponent,
|
|
12562
|
+
TcRevTooltipDirective,
|
|
12563
|
+
TcRevSubNavbarComponent,
|
|
12564
|
+
TcRevSubNavbarItemComponent,
|
|
12565
|
+
TcRevWizardStepsComponent] }); }
|
|
12566
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevComponentsLibModule, imports: [TcRevBreadcrumbComponent,
|
|
12567
|
+
TcRevCalendarComponent,
|
|
12568
|
+
TcRevCardComponent,
|
|
12569
|
+
TcRevCardAccordionComponent,
|
|
12570
|
+
TcRevDropdownComponent,
|
|
12571
|
+
TcRevDropdownGroupedComponent,
|
|
12572
|
+
TcRevDropdownMultiComponent,
|
|
12573
|
+
TcRevDropdownMultiLevelComponent,
|
|
12574
|
+
TcRevFaqComponent,
|
|
12575
|
+
TcRevInputContainerComponent,
|
|
12576
|
+
TcRevMessageComponent,
|
|
12577
|
+
TcRevMultiInputComponent,
|
|
12578
|
+
TcRevPaginationComponent,
|
|
12579
|
+
TcRevSearchInputComponent,
|
|
12580
|
+
TcRevSideDrawerComponent,
|
|
12581
|
+
TcRevSkeletonLoadingComponent,
|
|
12582
|
+
TcRevSmallLoadingComponent,
|
|
12583
|
+
TcRevTabGroupComponent,
|
|
12584
|
+
TcRevTabItemComponent,
|
|
12585
|
+
TcRevTagComponent,
|
|
12586
|
+
TcRevToastComponent,
|
|
12587
|
+
TcRevSubNavbarComponent,
|
|
12588
|
+
TcRevSubNavbarItemComponent,
|
|
12589
|
+
TcRevWizardStepsComponent] }); }
|
|
12590
|
+
}
|
|
12591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TcRevComponentsLibModule, decorators: [{
|
|
12592
|
+
type: NgModule,
|
|
12593
|
+
args: [{
|
|
12594
|
+
imports: [
|
|
12595
|
+
TcRevBreadcrumbComponent,
|
|
12596
|
+
TcRevButtonDirective,
|
|
12597
|
+
TcRevCalendarComponent,
|
|
12598
|
+
TcRevCardComponent,
|
|
12599
|
+
TcRevCardAccordionComponent,
|
|
12600
|
+
TcRevCardTitleComponent,
|
|
12601
|
+
TcRevCheckboxDirective,
|
|
12602
|
+
TcRevDropdownComponent,
|
|
12603
|
+
TcRevDropdownGroupedComponent,
|
|
12604
|
+
TcRevDropdownMultiComponent,
|
|
12605
|
+
TcRevDropdownMultiLevelComponent,
|
|
12606
|
+
TcRevEmptyContentComponent,
|
|
12607
|
+
TcRevFaqComponent,
|
|
12608
|
+
TcRevIconButtonDirective,
|
|
12609
|
+
TcRevInputContainerComponent,
|
|
12610
|
+
TcRevInputDirective,
|
|
12611
|
+
TcRevLoadingComponent,
|
|
12612
|
+
TcRevMessageComponent,
|
|
12613
|
+
TcRevMultiInputComponent,
|
|
12614
|
+
TcRevPaginationComponent,
|
|
12615
|
+
TcRevProgressStatusBarComponent,
|
|
12616
|
+
TcRevRadioDirective,
|
|
12617
|
+
TcRevSearchInputComponent,
|
|
12618
|
+
TcRevSideDrawerComponent,
|
|
12619
|
+
TcRevSkeletonLoadingComponent,
|
|
12620
|
+
TcRevSlideToggleDirective,
|
|
12621
|
+
TcRevSmallLoadingComponent,
|
|
12622
|
+
TcRevTabGroupComponent,
|
|
12623
|
+
TcRevTabItemComponent,
|
|
12624
|
+
TcRevTagComponent,
|
|
12625
|
+
TcRevToastComponent,
|
|
12626
|
+
TcRevTooltipDirective,
|
|
12627
|
+
TcRevSubNavbarComponent,
|
|
12628
|
+
TcRevSubNavbarItemComponent,
|
|
12629
|
+
TcRevWizardStepsComponent,
|
|
12630
|
+
],
|
|
12631
|
+
exports: [
|
|
12632
|
+
// TcRevBreadcrumbComponent,
|
|
12633
|
+
TcRevButtonDirective,
|
|
12634
|
+
TcRevCalendarComponent,
|
|
12635
|
+
TcRevCardComponent,
|
|
12636
|
+
TcRevCardAccordionComponent,
|
|
12637
|
+
TcRevCardTitleComponent,
|
|
12638
|
+
TcRevCheckboxDirective,
|
|
12639
|
+
TcRevDropdownComponent,
|
|
12640
|
+
TcRevDropdownGroupedComponent,
|
|
12641
|
+
TcRevDropdownMultiComponent,
|
|
12642
|
+
TcRevDropdownMultiLevelComponent,
|
|
12643
|
+
TcRevEmptyContentComponent,
|
|
12644
|
+
TcRevFaqComponent,
|
|
12645
|
+
TcRevIconButtonDirective,
|
|
12646
|
+
TcRevInputContainerComponent,
|
|
12647
|
+
TcRevInputDirective,
|
|
12648
|
+
TcRevLoadingComponent,
|
|
12649
|
+
TcRevMessageComponent,
|
|
12650
|
+
TcRevMultiInputComponent,
|
|
12651
|
+
TcRevPaginationComponent,
|
|
12652
|
+
TcRevProgressStatusBarComponent,
|
|
12653
|
+
TcRevSmallLoadingComponent,
|
|
12654
|
+
TcRevRadioDirective,
|
|
12655
|
+
TcRevSearchInputComponent,
|
|
12656
|
+
TcRevSideDrawerComponent,
|
|
12657
|
+
TcRevSkeletonLoadingComponent,
|
|
12658
|
+
TcRevSlideToggleDirective,
|
|
12659
|
+
TcRevTabGroupComponent,
|
|
12660
|
+
TcRevTabItemComponent,
|
|
12661
|
+
TcRevTagComponent,
|
|
12662
|
+
TcRevToastComponent,
|
|
12663
|
+
TcRevTooltipDirective,
|
|
12664
|
+
TcRevSubNavbarComponent,
|
|
12665
|
+
TcRevSubNavbarItemComponent,
|
|
12666
|
+
TcRevWizardStepsComponent,
|
|
12667
|
+
],
|
|
12668
|
+
declarations: [],
|
|
12669
|
+
providers: [],
|
|
12670
|
+
}]
|
|
12671
|
+
}] });
|
|
10709
12672
|
|
|
10710
12673
|
/*
|
|
10711
12674
|
* Public API Surface of tcloud-ui
|
|
@@ -10715,5 +12678,5 @@ function echartBarConfig(echarts, chartData) {
|
|
|
10715
12678
|
* Generated bundle index. Do not edit.
|
|
10716
12679
|
*/
|
|
10717
12680
|
|
|
10718
|
-
export { AcceptedFileType, BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, DropdownMultiSize, DropdownSize, MonthNamePipe, MultiLevelDropdownSize, ProductActionPipe, ProgressStatusBarGradientStatus, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCLOUD_UI_CONFIG, TCLOUD_UI_LAYOUT_SERVICE, TCLOUD_UI_LOCALE_SERVICE, TCLOUD_UI_USER_SERVICE, TCLOUD_UI_VIEWPORT_SERVICE, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionTitleComponent, TCloudUiAlertBannerComponent, TCloudUiAlignDirective, TCloudUiBreadcrumbComponent, TCloudUiBreadcrumbService, TCloudUiButtonDirective, TCloudUiCalendarComponent, TCloudUiCardAccordionComponent, TCloudUiCardComponent, TCloudUiCardTitleComponent, TCloudUiCarouselComponent, TCloudUiCheckAccessDirective, TCloudUiCheckAccessService, TCloudUiCheckboxDirective, TCloudUiChoiceIssuesComponent, TCloudUiContainerColComponent, TCloudUiContainerComponent, TCloudUiContainerContentComponent, TCloudUiCubesComponent, TCloudUiCurrencyDirective, TCloudUiDataListComponent, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerTimeComponent, TCloudUiDialogComponent, TCloudUiDialogEventsEnum, TCloudUiDialogHostComponent, TCloudUiDialogModel, TCloudUiDialogService, TCloudUiDialogStatusEnum, TCloudUiDialogTextConfirmationEnum, TCloudUiDigitOnlyDirective, TCloudUiDropdownComponent, TCloudUiDropdownMultiComponent, TCloudUiDropdownMultiLevelComponent, TCloudUiEditorComponent, TCloudUiEditorDiffComponent, TCloudUiElCopyDirective, TCloudUiEmptyContentComponent, TCloudUiFaqComponent, TCloudUiFilterBarComponent, TCloudUiFiltersComponent, TCloudUiFormDirective, TCloudUiHighLightDirective, TCloudUiHoverParentDirective, TCloudUiIconButtonDirective, TCloudUiInputContainerComponent, TCloudUiInputDirective, TCloudUiInputPasswordComponent, TCloudUiInputSearchComponent, TCloudUiIpMaskDirective, TCloudUiLabelTokenComponent, TCloudUiLegendComponent, TCloudUiLineStepCircleComponent, TCloudUiLineStepTitleComponent, TCloudUiLinhaLogoComponent, TCloudUiLoadingComponent, TCloudUiLoadingTransitionsService, TCloudUiMarkReadmeComponent, TCloudUiMessageComponent, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiSelectComponent, TCloudUiMultiplesValuesComponent, TCloudUiNgCheckAccessDirective, TCloudUiNgFeatureFlagsDirective, TCloudUiNotFoundComponent, TCloudUiNumberStepComponent, TCloudUiPaginationComponent, TCloudUiPaginationPipe, TCloudUiProgressBarComponent, TCloudUiProgressStatusBarComponent, TCloudUiRadioDirective, TCloudUiRangeDateComponent, TCloudUiReorderItemsComponent, TCloudUiScrollBoxComponent, TCloudUiSearchBarComponent, TCloudUiSearchInObjectService, TCloudUiSearchInputComponent, TCloudUiSkeletonLoadingComponent, TCloudUiSkeletonLoadingComponentStyle, TCloudUiSlideToggleDirective, TCloudUiSubNavbarComponent, TCloudUiSubNavbarGroupComponent, TCloudUiSubNavbarItemComponent, TCloudUiTabContentComponent, TCloudUiTabGroupComponent, TCloudUiTabHeadComponent, TCloudUiTabItemComponent, TCloudUiTabMenuComponent, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTagComponent, TCloudUiToastComponent, TCloudUiTooltipDirective, TCloudUiUploadAreaComponent, TCloudUiWelcomeComponent, TCloudUiWizardStepsComponent, ToTextPipe, TopologyEnvironmentPipe, TopologyProductPipe, TopologyRegionPipe, TopologyStatusPipe, echartBarConfig, isTextEllipsed, provideTCloudUi };
|
|
12681
|
+
export { AcceptedFileType, BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, DropdownGroupedSize, DropdownMultiSize$1 as DropdownMultiSize, DropdownSize$1 as DropdownSize, MonthNamePipe, MultiLevelDropdownSize$1 as MultiLevelDropdownSize, ProductActionPipe, ProgressStatusBarGradientStatus$1 as ProgressStatusBarGradientStatus, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCLOUD_UI_CONFIG, TCLOUD_UI_LAYOUT_SERVICE, TCLOUD_UI_LOCALE_SERVICE, TCLOUD_UI_USER_SERVICE, TCLOUD_UI_VIEWPORT_SERVICE, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionTitleComponent, TCloudUiAlertBannerComponent, TCloudUiAlignDirective, TCloudUiBreadcrumbComponent, TCloudUiBreadcrumbService, TCloudUiButtonDirective, TCloudUiCalendarComponent, TCloudUiCardAccordionComponent, TCloudUiCardComponent, TCloudUiCardTitleComponent, TCloudUiCarouselComponent, TCloudUiCheckAccessDirective, TCloudUiCheckAccessService, TCloudUiCheckboxDirective, TCloudUiChoiceIssuesComponent, TCloudUiContainerColComponent, TCloudUiContainerComponent, TCloudUiContainerContentComponent, TCloudUiCubesComponent, TCloudUiCurrencyDirective, TCloudUiDataListComponent, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerTimeComponent, TCloudUiDialogComponent, TCloudUiDialogEventsEnum, TCloudUiDialogHostComponent, TCloudUiDialogModel, TCloudUiDialogService, TCloudUiDialogStatusEnum, TCloudUiDialogTextConfirmationEnum, TCloudUiDigitOnlyDirective, TCloudUiDropdownComponent, TCloudUiDropdownMultiComponent, TCloudUiDropdownMultiLevelComponent, TCloudUiEditorComponent, TCloudUiEditorDiffComponent, TCloudUiElCopyDirective, TCloudUiEmptyContentComponent, TCloudUiFaqComponent, TCloudUiFilterBarComponent, TCloudUiFiltersComponent, TCloudUiFormDirective, TCloudUiHighLightDirective, TCloudUiHoverParentDirective, TCloudUiIconButtonDirective, TCloudUiInputContainerComponent, TCloudUiInputDirective, TCloudUiInputPasswordComponent, TCloudUiInputSearchComponent, TCloudUiIpMaskDirective, TCloudUiLabelTokenComponent, TCloudUiLegendComponent, TCloudUiLineStepCircleComponent, TCloudUiLineStepTitleComponent, TCloudUiLinhaLogoComponent, TCloudUiLoadingComponent, TCloudUiLoadingTransitionsService, TCloudUiMarkReadmeComponent, TCloudUiMessageComponent, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiSelectComponent, TCloudUiMultiplesValuesComponent, TCloudUiNgCheckAccessDirective, TCloudUiNgFeatureFlagsDirective, TCloudUiNotFoundComponent, TCloudUiNumberStepComponent, TCloudUiPaginationComponent, TCloudUiPaginationPipe, TCloudUiProgressBarComponent, TCloudUiProgressStatusBarComponent, TCloudUiRadioDirective, TCloudUiRangeDateComponent, TCloudUiReorderItemsComponent, TCloudUiScrollBoxComponent, TCloudUiSearchBarComponent, TCloudUiSearchInObjectService, TCloudUiSearchInputComponent, TCloudUiSkeletonLoadingComponent, TCloudUiSkeletonLoadingComponentStyle, TCloudUiSlideToggleDirective, TCloudUiSubNavbarComponent, TCloudUiSubNavbarGroupComponent, TCloudUiSubNavbarItemComponent, TCloudUiTabContentComponent, TCloudUiTabGroupComponent, TCloudUiTabHeadComponent, TCloudUiTabItemComponent, TCloudUiTabMenuComponent, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTagComponent, TCloudUiToastComponent, TCloudUiTooltipDirective, TCloudUiUploadAreaComponent, TCloudUiWelcomeComponent, TCloudUiWizardStepsComponent, TagColorsEnum, TcRevButtonDirective, TcRevCalendarComponent, TcRevCardAccordionComponent, TcRevCardComponent, TcRevCardTitleComponent, TcRevCheckboxDirective, TcRevComponentsLibModule, TcRevDropdownComponent, TcRevDropdownGroupedComponent, TcRevDropdownMultiComponent, TcRevDropdownMultiLevelComponent, TcRevEmptyContentComponent, TcRevFaqComponent, TcRevIconButtonDirective, TcRevInputContainerComponent, TcRevInputDirective, TcRevLoadingComponent, TcRevMessageComponent, TcRevMultiInputComponent, TcRevPaginationComponent, TcRevProgressStatusBarComponent, TcRevRadioDirective, TcRevSearchInputComponent, TcRevSideDrawerComponent, TcRevSkeletonLoadingComponent, TcRevSkeletonLoadingComponentStyle, TcRevSlideToggleDirective, TcRevSmallLoadingComponent, TcRevSmallLoadingComponentStyle, TcRevSubNavbarComponent, TcRevSubNavbarItemComponent, TcRevTabGroupComponent, TcRevTabItemComponent, TcRevTagComponent, TcRevToastComponent, TcRevTooltipDirective, TcRevWizardStepsComponent, ToTextPipe, TopologyEnvironmentPipe, TopologyProductPipe, TopologyRegionPipe, TopologyStatusPipe, echartBarConfig, isTextEllipsed, provideTCloudUi };
|
|
10719
12682
|
//# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map
|