@dev-tcloud/tcloud-ui 6.22.0 → 6.22.1-beta.1
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 +1 -1
- package/docs/tcloud-ui-el-copy.md +0 -10
- package/fesm2022/dev-tcloud-tcloud-ui.mjs +134 -2039
- package/fesm2022/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/js/tcloud-ui-app.js +1 -1
- package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.component.d.ts +6 -4
- package/package.json +1 -1
- package/public-api.d.ts +0 -37
- package/lib/revitalizacao/components/tc-rev-breadcrumb/tc-rev-breadcrumb.component.d.ts +0 -12
- package/lib/revitalizacao/components/tc-rev-breadcrumb/tc-rev-breadcrumb.service.d.ts +0 -16
- package/lib/revitalizacao/components/tc-rev-button/tc-rev-button.directive.d.ts +0 -13
- package/lib/revitalizacao/components/tc-rev-calendar/tc-rev-calendar.component.d.ts +0 -43
- package/lib/revitalizacao/components/tc-rev-card/tc-rev-card.component.d.ts +0 -12
- package/lib/revitalizacao/components/tc-rev-card-accordion/tc-rev-card-accordion.component.d.ts +0 -23
- package/lib/revitalizacao/components/tc-rev-card-title/tc-rev-card-title.component.d.ts +0 -6
- package/lib/revitalizacao/components/tc-rev-checkbox/tc-rev-checkbox.directive.d.ts +0 -6
- package/lib/revitalizacao/components/tc-rev-components.module.d.ts +0 -41
- package/lib/revitalizacao/components/tc-rev-dropdown/tc-rev-dropdown.component.d.ts +0 -46
- package/lib/revitalizacao/components/tc-rev-dropdown-grouped/tc-rev-dropdown-grouped.component.d.ts +0 -54
- package/lib/revitalizacao/components/tc-rev-dropdown-multi/tc-rev-dropdown-multi.component.d.ts +0 -44
- package/lib/revitalizacao/components/tc-rev-dropdown-multi-level/tc-rev-dropdown-multi-level.component.d.ts +0 -42
- package/lib/revitalizacao/components/tc-rev-dropdown-multi-level/tc-rev-dropdown-sub-menu/tc-rev-dropdown-sub-menu.component.d.ts +0 -17
- package/lib/revitalizacao/components/tc-rev-empty-content/tc-rev-empty-content.component.d.ts +0 -5
- package/lib/revitalizacao/components/tc-rev-faq/tc-rev-faq.component.d.ts +0 -12
- package/lib/revitalizacao/components/tc-rev-icon-button/tc-rev-icon-button.directive.d.ts +0 -12
- package/lib/revitalizacao/components/tc-rev-input/tc-rev-input.directive.d.ts +0 -10
- package/lib/revitalizacao/components/tc-rev-input-container/tc-rev-input-container.component.d.ts +0 -10
- package/lib/revitalizacao/components/tc-rev-loading/tc-rev-loading.component.d.ts +0 -6
- package/lib/revitalizacao/components/tc-rev-message/tc-rev-message.component.d.ts +0 -7
- package/lib/revitalizacao/components/tc-rev-multi-input/tc-rev-multi-input.component.d.ts +0 -24
- package/lib/revitalizacao/components/tc-rev-pagination/tc-rev-pagination.component.d.ts +0 -14
- package/lib/revitalizacao/components/tc-rev-progress-status-bar/tc-rev-progress-status-bar.component.d.ts +0 -23
- package/lib/revitalizacao/components/tc-rev-radio/tc-rev-radio.directive.d.ts +0 -6
- package/lib/revitalizacao/components/tc-rev-search-input/tc-rev-search-input.component.d.ts +0 -17
- package/lib/revitalizacao/components/tc-rev-side-drawer/tc-rev-side-drawer.component.d.ts +0 -24
- package/lib/revitalizacao/components/tc-rev-skeleton-loading/tc-rev-skeleton-loading.component.d.ts +0 -17
- package/lib/revitalizacao/components/tc-rev-slide-toggle/tc-rev-slide-toggle.directive.d.ts +0 -5
- package/lib/revitalizacao/components/tc-rev-small-loading/tc-rev-small-loading.component.d.ts +0 -26
- package/lib/revitalizacao/components/tc-rev-tab-group/tc-rev-tab-group.component.d.ts +0 -12
- package/lib/revitalizacao/components/tc-rev-tab-group/tc-rev-tab-item/tc-rev-tab-item.component.d.ts +0 -10
- package/lib/revitalizacao/components/tc-rev-tag/tag-colors.enum.d.ts +0 -29
- package/lib/revitalizacao/components/tc-rev-tag/tc-rev-tag.component.d.ts +0 -10
- package/lib/revitalizacao/components/tc-rev-toast/tc-rev-toast.component.d.ts +0 -8
- package/lib/revitalizacao/components/tc-rev-tooltip/tc-rev-tooltip.directive.d.ts +0 -19
- package/lib/revitalizacao/components/tc-rev-wizard-steps/tc-rev-wizard-steps.component.d.ts +0 -19
- package/lib/revitalizacao/components/tc-sub-navbar/component/tc-sub-navbar-item/tc-sub-navbar-item.component.d.ts +0 -13
- package/lib/revitalizacao/components/tc-sub-navbar/tc-sub-navbar.component.d.ts +0 -12
|
@@ -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, ContentChildren, viewChild, EnvironmentInjector, createComponent, ViewContainerRef, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, DatePipe
|
|
4
|
+
import { CommonModule, DatePipe } 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
|
|
8
|
+
import { NG_VALUE_ACCESSOR, FormsModule, FormControl, ReactiveFormsModule, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
9
9
|
import * as i1$1 from '@angular/router';
|
|
10
10
|
import { Router, RouterModule } from '@angular/router';
|
|
11
11
|
|
|
@@ -711,7 +711,7 @@ class TCloudUiDataListComponent {
|
|
|
711
711
|
this.toChange();
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
|
-
get disabled() { return this._disabled; }
|
|
714
|
+
get disabled() { return this._disabled || this._disabledByForm; }
|
|
715
715
|
set loading(v) {
|
|
716
716
|
if (typeof v === 'boolean' && v !== this._loading) {
|
|
717
717
|
this._loading = v;
|
|
@@ -751,6 +751,7 @@ class TCloudUiDataListComponent {
|
|
|
751
751
|
this.menu_on_top = '';
|
|
752
752
|
this.placeholder = '';
|
|
753
753
|
this._disabled = false;
|
|
754
|
+
this._disabledByForm = false;
|
|
754
755
|
this._loading = false;
|
|
755
756
|
this.showInput = true;
|
|
756
757
|
this.search = true;
|
|
@@ -772,7 +773,7 @@ class TCloudUiDataListComponent {
|
|
|
772
773
|
this.onChangeCallback = noop$8;
|
|
773
774
|
this.subscription_value = this.dataListService.stateValue$.subscribe(v => {
|
|
774
775
|
this.selected_item = v;
|
|
775
|
-
this.selectDescription();
|
|
776
|
+
this.selectDescription(true);
|
|
776
777
|
this.ngModelChange.emit(this.selected_item);
|
|
777
778
|
});
|
|
778
779
|
this.subscription_description = this.dataListService.stateDescription$.subscribe(v => {
|
|
@@ -846,27 +847,27 @@ class TCloudUiDataListComponent {
|
|
|
846
847
|
}
|
|
847
848
|
}
|
|
848
849
|
}
|
|
849
|
-
selectDescription() {
|
|
850
|
+
selectDescription(propagateForm = false) {
|
|
850
851
|
if (this.list_selected_options && (this.list_selected_options).length > 0) {
|
|
851
852
|
for (let i = 0; i < (this.list_selected_options).length; i++) {
|
|
852
853
|
const item = this.list_selected_options[i];
|
|
853
854
|
if (item.value === this.selected_item) {
|
|
854
855
|
this.selected_description = item.description;
|
|
855
|
-
this.toChange();
|
|
856
|
+
this.toChange(propagateForm);
|
|
856
857
|
return;
|
|
857
858
|
}
|
|
858
859
|
}
|
|
859
860
|
}
|
|
860
861
|
if (this.selected_item === undefined || this.selected_item === null || this.selected_item === '') {
|
|
861
862
|
this.selected_description = '';
|
|
862
|
-
this.toChange();
|
|
863
|
+
this.toChange(propagateForm);
|
|
863
864
|
}
|
|
864
865
|
}
|
|
865
866
|
toInput(e) {
|
|
866
867
|
this.onInputChange.emit(this.selected_description);
|
|
867
868
|
this.onChange.emit(e);
|
|
868
869
|
}
|
|
869
|
-
toChange() {
|
|
870
|
+
toChange(propagateForm = false) {
|
|
870
871
|
setTimeout(() => {
|
|
871
872
|
if (this.selected_item === undefined || this.selected_item === null) {
|
|
872
873
|
this.selected_item = '';
|
|
@@ -880,6 +881,9 @@ class TCloudUiDataListComponent {
|
|
|
880
881
|
// const input_hidden = document.getElementById(`${this.id}-hidden`);
|
|
881
882
|
this.toInput(this.formulario.get('selected_item'));
|
|
882
883
|
}
|
|
884
|
+
if (propagateForm) {
|
|
885
|
+
this.onChangeCallback(this.selected_item);
|
|
886
|
+
}
|
|
883
887
|
});
|
|
884
888
|
}
|
|
885
889
|
clearTextSearch() {
|
|
@@ -913,6 +917,7 @@ class TCloudUiDataListComponent {
|
|
|
913
917
|
}
|
|
914
918
|
toClose() {
|
|
915
919
|
this.menu_show = false;
|
|
920
|
+
this.onTouchedCallback();
|
|
916
921
|
this.onClosed.emit();
|
|
917
922
|
}
|
|
918
923
|
toResize() {
|
|
@@ -962,6 +967,9 @@ class TCloudUiDataListComponent {
|
|
|
962
967
|
registerOnTouched(fn) {
|
|
963
968
|
this.onTouchedCallback = fn;
|
|
964
969
|
}
|
|
970
|
+
setDisabledState(isDisabled) {
|
|
971
|
+
this._disabledByForm = isDisabled;
|
|
972
|
+
}
|
|
965
973
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiDataListComponent, deps: [{ token: DataListService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
966
974
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: TCloudUiDataListComponent, isStandalone: true, selector: "tcloud-ui-data-list", inputs: { placeholder: "placeholder", disabled: "disabled", loading: "loading", showInput: "showInput", search: "search", listItems: "listItems", open: "open", border: "border", ngModel: "ngModel" }, outputs: { onInputChange: "onInputChange", onChange: "onChange", onOpened: "onOpened", onClosed: "onClosed", ngModelChange: "ngModelChange" }, providers: [
|
|
967
975
|
DataListService,
|
|
@@ -5656,14 +5664,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
5656
5664
|
type: Input
|
|
5657
5665
|
}] } });
|
|
5658
5666
|
|
|
5659
|
-
var ProgressStatusBarGradientStatus
|
|
5667
|
+
var ProgressStatusBarGradientStatus;
|
|
5660
5668
|
(function (ProgressStatusBarGradientStatus) {
|
|
5661
5669
|
ProgressStatusBarGradientStatus["info"] = "info";
|
|
5662
5670
|
ProgressStatusBarGradientStatus["danger"] = "danger";
|
|
5663
5671
|
ProgressStatusBarGradientStatus["success"] = "success";
|
|
5664
5672
|
ProgressStatusBarGradientStatus["alert"] = "alert";
|
|
5665
|
-
})(ProgressStatusBarGradientStatus
|
|
5666
|
-
var ProgressStatusBarRangeColor
|
|
5673
|
+
})(ProgressStatusBarGradientStatus || (ProgressStatusBarGradientStatus = {}));
|
|
5674
|
+
var ProgressStatusBarRangeColor;
|
|
5667
5675
|
(function (ProgressStatusBarRangeColor) {
|
|
5668
5676
|
ProgressStatusBarRangeColor["dangerStart"] = "#F48E85";
|
|
5669
5677
|
ProgressStatusBarRangeColor["dangerEnd"] = "#DC3545";
|
|
@@ -5673,7 +5681,7 @@ var ProgressStatusBarRangeColor$1;
|
|
|
5673
5681
|
ProgressStatusBarRangeColor["infoEnd"] = "#0897E9";
|
|
5674
5682
|
ProgressStatusBarRangeColor["successStart"] = "#A3E78C";
|
|
5675
5683
|
ProgressStatusBarRangeColor["successEnd"] = "#47B13D";
|
|
5676
|
-
})(ProgressStatusBarRangeColor
|
|
5684
|
+
})(ProgressStatusBarRangeColor || (ProgressStatusBarRangeColor = {}));
|
|
5677
5685
|
class TCloudUiProgressStatusBarComponent {
|
|
5678
5686
|
constructor() {
|
|
5679
5687
|
this.currentValue = input.required();
|
|
@@ -5701,14 +5709,14 @@ class TCloudUiProgressStatusBarComponent {
|
|
|
5701
5709
|
}
|
|
5702
5710
|
getProgressStatusBarRangeColor(_gradientStatus, position) {
|
|
5703
5711
|
switch (_gradientStatus) {
|
|
5704
|
-
case ProgressStatusBarGradientStatus
|
|
5705
|
-
return position === 'start' ? ProgressStatusBarRangeColor
|
|
5706
|
-
case ProgressStatusBarGradientStatus
|
|
5707
|
-
return position === 'start' ? ProgressStatusBarRangeColor
|
|
5708
|
-
case ProgressStatusBarGradientStatus
|
|
5709
|
-
return position === 'start' ? ProgressStatusBarRangeColor
|
|
5712
|
+
case ProgressStatusBarGradientStatus.alert:
|
|
5713
|
+
return position === 'start' ? ProgressStatusBarRangeColor.alertStart : ProgressStatusBarRangeColor.alertEnd;
|
|
5714
|
+
case ProgressStatusBarGradientStatus.danger:
|
|
5715
|
+
return position === 'start' ? ProgressStatusBarRangeColor.dangerStart : ProgressStatusBarRangeColor.dangerEnd;
|
|
5716
|
+
case ProgressStatusBarGradientStatus.success:
|
|
5717
|
+
return position === 'start' ? ProgressStatusBarRangeColor.successStart : ProgressStatusBarRangeColor.successEnd;
|
|
5710
5718
|
default:
|
|
5711
|
-
return position === 'start' ? ProgressStatusBarRangeColor
|
|
5719
|
+
return position === 'start' ? ProgressStatusBarRangeColor.infoStart : ProgressStatusBarRangeColor.infoEnd;
|
|
5712
5720
|
}
|
|
5713
5721
|
}
|
|
5714
5722
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiProgressStatusBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -8275,53 +8283,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
8275
8283
|
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"] }]
|
|
8276
8284
|
}] });
|
|
8277
8285
|
|
|
8278
|
-
class TcRevButtonDirective {
|
|
8279
|
-
constructor(_el) {
|
|
8280
|
-
this._el = _el;
|
|
8281
|
-
this.color = input('primary');
|
|
8282
|
-
this.size = input('sm');
|
|
8283
|
-
this.fullWidth = input(false);
|
|
8284
|
-
this.tcRevButton = input('filled');
|
|
8285
|
-
effect(() => {
|
|
8286
|
-
this.setClasses();
|
|
8287
|
-
});
|
|
8288
|
-
}
|
|
8289
|
-
setClasses() {
|
|
8290
|
-
const tokenList = this._el.nativeElement.classList;
|
|
8291
|
-
tokenList.remove(...Array.from(tokenList).filter((c) => c.startsWith('tc-rev-btn--')));
|
|
8292
|
-
let tcRevButton = this.tcRevButton();
|
|
8293
|
-
if (!tcRevButton) {
|
|
8294
|
-
tcRevButton = 'filled';
|
|
8295
|
-
}
|
|
8296
|
-
this.fullWidth() ? this._el.nativeElement.classList.add('tc-rev-btn--full-width') : null;
|
|
8297
|
-
this._el.nativeElement.classList.add(`tc-rev-btn--${this.size()}`);
|
|
8298
|
-
this._el.nativeElement.classList.add(`tc-rev-btn--${this.color()}-${tcRevButton}`);
|
|
8299
|
-
}
|
|
8300
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevButtonDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
8301
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", 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 }); }
|
|
8302
|
-
}
|
|
8303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevButtonDirective, decorators: [{
|
|
8304
|
-
type: Directive,
|
|
8305
|
-
args: [{
|
|
8306
|
-
selector: 'button[tcRevButton]',
|
|
8307
|
-
host: {
|
|
8308
|
-
class: 'tc-rev-btn'
|
|
8309
|
-
}
|
|
8310
|
-
}]
|
|
8311
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
8312
|
-
|
|
8313
|
-
class TcRevCardTitleComponent {
|
|
8314
|
-
constructor() {
|
|
8315
|
-
this.title = input.required();
|
|
8316
|
-
}
|
|
8317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCardTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8318
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", 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"] }); }
|
|
8319
|
-
}
|
|
8320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCardTitleComponent, decorators: [{
|
|
8321
|
-
type: Component,
|
|
8322
|
-
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"] }]
|
|
8323
|
-
}] });
|
|
8324
|
-
|
|
8325
8286
|
class TCloudUiCardAccordionComponent {
|
|
8326
8287
|
constructor() {
|
|
8327
8288
|
this._viewPort = inject(TCloudUiDeviceUtilsService);
|
|
@@ -8349,11 +8310,11 @@ class TCloudUiCardAccordionComponent {
|
|
|
8349
8310
|
return ['pad-14'];
|
|
8350
8311
|
}
|
|
8351
8312
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiCardAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8352
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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 <
|
|
8313
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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 <tcloud-ui-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 tcloudButton=\"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 tcloudButton=\"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 </tcloud-ui-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: TCloudUiCardTitleComponent, selector: "tcloud-ui-card-title", inputs: ["title"] }, { kind: "directive", type: TCloudUiButtonDirective, selector: "[tcloudButton]", inputs: ["color", "size", "fullWidth", "tcloudButton"] }] }); }
|
|
8353
8314
|
}
|
|
8354
8315
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiCardAccordionComponent, decorators: [{
|
|
8355
8316
|
type: Component,
|
|
8356
|
-
args: [{ selector: 'tcloud-ui-card-accordion', imports: [CommonModule,
|
|
8317
|
+
args: [{ selector: 'tcloud-ui-card-accordion', imports: [CommonModule, TCloudUiCardTitleComponent, TCloudUiButtonDirective], template: "<div class=\"tcloud-ui-card-accordion tcloud-ui-card bg-c-neutral-50 bor-xs bor-rad-16\"\n[ngClass]=\"accordionExtraClasses\"\n>\n <tcloud-ui-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 tcloudButton=\"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 tcloudButton=\"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 </tcloud-ui-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"] }]
|
|
8357
8318
|
}] });
|
|
8358
8319
|
|
|
8359
8320
|
class TCloudUiCalendarComponent {
|
|
@@ -8572,144 +8533,12 @@ function isTextEllipsed(text, containerWidth) {
|
|
|
8572
8533
|
// }
|
|
8573
8534
|
// }
|
|
8574
8535
|
|
|
8575
|
-
|
|
8576
|
-
constructor(_el, _renderer, _vcr) {
|
|
8577
|
-
this._el = _el;
|
|
8578
|
-
this._renderer = _renderer;
|
|
8579
|
-
this._vcr = _vcr;
|
|
8580
|
-
this.tcRevTooltip = input('');
|
|
8581
|
-
this.position = input('top');
|
|
8582
|
-
this.tooltipElement = null;
|
|
8583
|
-
}
|
|
8584
|
-
onMouseEnter() {
|
|
8585
|
-
const tooltipText = this.tcRevTooltip();
|
|
8586
|
-
if (this.isValidTooltipText(tooltipText)) {
|
|
8587
|
-
this.showTooltip(tooltipText);
|
|
8588
|
-
}
|
|
8589
|
-
}
|
|
8590
|
-
onMouseLeave() {
|
|
8591
|
-
this.hideTooltip();
|
|
8592
|
-
}
|
|
8593
|
-
isValidTooltipText(text) {
|
|
8594
|
-
return text && text.trim().length > 0;
|
|
8595
|
-
}
|
|
8596
|
-
showTooltip(text) {
|
|
8597
|
-
if (this.tooltipElement) {
|
|
8598
|
-
this.hideTooltip();
|
|
8599
|
-
}
|
|
8600
|
-
// Create tooltip element
|
|
8601
|
-
this.tooltipElement = this._renderer.createElement('div');
|
|
8602
|
-
// Add text content
|
|
8603
|
-
const textNode = this._renderer.createText(text);
|
|
8604
|
-
this._renderer.appendChild(this.tooltipElement, textNode);
|
|
8605
|
-
// Add CSS classes
|
|
8606
|
-
this._renderer.addClass(this.tooltipElement, 'tc-rev-tooltip');
|
|
8607
|
-
this._renderer.addClass(this.tooltipElement, `tc-rev-tooltip--${this.position()}`);
|
|
8608
|
-
// Set initial styles
|
|
8609
|
-
this._renderer.setStyle(this.tooltipElement, 'position', 'absolute');
|
|
8610
|
-
this._renderer.setStyle(this.tooltipElement, 'z-index', '9999');
|
|
8611
|
-
this._renderer.setStyle(this.tooltipElement, 'visibility', 'hidden');
|
|
8612
|
-
// this._renderer.setStyle(this.tooltipElement, 'opacity', '0');
|
|
8613
|
-
// Append to body
|
|
8614
|
-
this._renderer.appendChild(document.body, this.tooltipElement);
|
|
8615
|
-
// Position tooltip
|
|
8616
|
-
this.positionTooltip();
|
|
8617
|
-
// Show tooltip with animation
|
|
8618
|
-
this._renderer.setStyle(this.tooltipElement, 'visibility', 'visible');
|
|
8619
|
-
this._renderer.addClass(this.tooltipElement, 'tc-rev-tooltip--visible');
|
|
8620
|
-
}
|
|
8621
|
-
hideTooltip() {
|
|
8622
|
-
if (this.tooltipElement) {
|
|
8623
|
-
this._renderer.removeChild(document.body, this.tooltipElement);
|
|
8624
|
-
this.tooltipElement = null;
|
|
8625
|
-
}
|
|
8626
|
-
}
|
|
8627
|
-
positionTooltip() {
|
|
8628
|
-
if (!this.tooltipElement)
|
|
8629
|
-
return;
|
|
8630
|
-
const hostRect = this._el.nativeElement.getBoundingClientRect();
|
|
8631
|
-
const tooltipRect = this.tooltipElement.getBoundingClientRect();
|
|
8632
|
-
const position = this.position();
|
|
8633
|
-
let top = 0;
|
|
8634
|
-
let left = 0;
|
|
8635
|
-
switch (position) {
|
|
8636
|
-
case 'top':
|
|
8637
|
-
top = hostRect.top + window.scrollY - tooltipRect.height - 8;
|
|
8638
|
-
left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
|
|
8639
|
-
break;
|
|
8640
|
-
case 'bottom':
|
|
8641
|
-
top = hostRect.bottom + window.scrollY + 8;
|
|
8642
|
-
left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
|
|
8643
|
-
break;
|
|
8644
|
-
case 'left':
|
|
8645
|
-
top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
|
|
8646
|
-
left = hostRect.left + window.scrollX - tooltipRect.width - 8;
|
|
8647
|
-
break;
|
|
8648
|
-
case 'right':
|
|
8649
|
-
top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
|
|
8650
|
-
left = hostRect.right + window.scrollX + 8;
|
|
8651
|
-
break;
|
|
8652
|
-
}
|
|
8653
|
-
this._renderer.setStyle(this.tooltipElement, 'top', `${top}px`);
|
|
8654
|
-
this._renderer.setStyle(this.tooltipElement, 'left', `${left}px`);
|
|
8655
|
-
}
|
|
8656
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
8657
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", 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 }); }
|
|
8658
|
-
}
|
|
8659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevTooltipDirective, decorators: [{
|
|
8660
|
-
type: Directive,
|
|
8661
|
-
args: [{
|
|
8662
|
-
selector: '[tcRevTooltip]',
|
|
8663
|
-
standalone: true
|
|
8664
|
-
}]
|
|
8665
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }], propDecorators: { onMouseEnter: [{
|
|
8666
|
-
type: HostListener,
|
|
8667
|
-
args: ['mouseenter']
|
|
8668
|
-
}], onMouseLeave: [{
|
|
8669
|
-
type: HostListener,
|
|
8670
|
-
args: ['mouseleave']
|
|
8671
|
-
}] } });
|
|
8672
|
-
|
|
8673
|
-
class TcRevIconButtonDirective {
|
|
8674
|
-
constructor(_el) {
|
|
8675
|
-
this._el = _el;
|
|
8676
|
-
this.color = input('primary');
|
|
8677
|
-
this.size = input('sm');
|
|
8678
|
-
this.tcRevIconButton = input('filled');
|
|
8679
|
-
effect(() => {
|
|
8680
|
-
this.setClasses();
|
|
8681
|
-
});
|
|
8682
|
-
}
|
|
8683
|
-
setClasses() {
|
|
8684
|
-
const tokenList = this._el.nativeElement.classList;
|
|
8685
|
-
tokenList.remove(...Array.from(tokenList).filter((c) => c.startsWith('tc-rev-btn--')));
|
|
8686
|
-
let tcRevIconButton = this.tcRevIconButton();
|
|
8687
|
-
if (!tcRevIconButton) {
|
|
8688
|
-
tcRevIconButton = 'filled';
|
|
8689
|
-
}
|
|
8690
|
-
this._el.nativeElement.classList.add(`tc-rev-btn--${this.size()}`);
|
|
8691
|
-
this._el.nativeElement.classList.add(`tc-rev-btn--${this.size()}-icon`);
|
|
8692
|
-
this._el.nativeElement.classList.add(`tc-rev-btn--${this.color()}-${tcRevIconButton}`);
|
|
8693
|
-
}
|
|
8694
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevIconButtonDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
8695
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", 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 }); }
|
|
8696
|
-
}
|
|
8697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevIconButtonDirective, decorators: [{
|
|
8698
|
-
type: Directive,
|
|
8699
|
-
args: [{
|
|
8700
|
-
selector: 'button[tcRevIconButton]',
|
|
8701
|
-
host: {
|
|
8702
|
-
class: 'tc-rev-btn tc-rev-btn-icon'
|
|
8703
|
-
}
|
|
8704
|
-
}]
|
|
8705
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
8706
|
-
|
|
8707
|
-
var DropdownSize$1;
|
|
8536
|
+
var DropdownSize;
|
|
8708
8537
|
(function (DropdownSize) {
|
|
8709
8538
|
DropdownSize["sm"] = "sm";
|
|
8710
8539
|
DropdownSize["md"] = "md";
|
|
8711
8540
|
DropdownSize["lg"] = "lg";
|
|
8712
|
-
})(DropdownSize
|
|
8541
|
+
})(DropdownSize || (DropdownSize = {}));
|
|
8713
8542
|
const noop = () => { };
|
|
8714
8543
|
const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
|
|
8715
8544
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -8731,14 +8560,14 @@ class TCloudUiDropdownComponent {
|
|
|
8731
8560
|
this.options = input.required(); // Lista de opções no novo formato
|
|
8732
8561
|
this.initialValue = input(null); // Valor pré-selecionado (deprecated - use value instead)
|
|
8733
8562
|
this.value = model(null); // Two-way binding para o valor selecionado
|
|
8734
|
-
this.size = input(DropdownSize
|
|
8563
|
+
this.size = input(DropdownSize.sm);
|
|
8735
8564
|
this.width = input(''); // Largura específica do dropdown (ex: '300px', '50%'). Se não informado, ocupa 100% do pai
|
|
8736
8565
|
this.searchable = input(false); // Habilita campo de busca
|
|
8737
8566
|
this.searchPlaceholder = input('Buscar...'); // Placeholder do campo de busca
|
|
8738
8567
|
this.optionSelected = output(); // Emissor para o valor selecionado
|
|
8739
8568
|
this.selectedOption = signal(null); // Opção selecionada
|
|
8740
8569
|
this.isOpen = false; // Controla se o dropdown está aberto
|
|
8741
|
-
this.dropdownSize = DropdownSize
|
|
8570
|
+
this.dropdownSize = DropdownSize;
|
|
8742
8571
|
this.isDesktop = this._deviceService.isDesktop;
|
|
8743
8572
|
this.isMobile = this._deviceService.isMobile;
|
|
8744
8573
|
this.searchText = signal(''); // Texto de busca
|
|
@@ -8873,7 +8702,7 @@ class TCloudUiDropdownComponent {
|
|
|
8873
8702
|
this._disabledByForm.set(isDisabled);
|
|
8874
8703
|
}
|
|
8875
8704
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiDropdownComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8876
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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);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"] }] }); }
|
|
8705
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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);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 }] }); }
|
|
8877
8706
|
}
|
|
8878
8707
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiDropdownComponent, decorators: [{
|
|
8879
8708
|
type: Component,
|
|
@@ -8881,9 +8710,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
8881
8710
|
CommonModule,
|
|
8882
8711
|
FormsModule,
|
|
8883
8712
|
ReactiveFormsModule,
|
|
8884
|
-
|
|
8885
|
-
TcRevIconButtonDirective
|
|
8886
|
-
], 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);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"] }]
|
|
8713
|
+
TCloudUiButtonDirective,
|
|
8714
|
+
], 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);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"] }]
|
|
8887
8715
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { menuTemplate: [{
|
|
8888
8716
|
type: ViewChild,
|
|
8889
8717
|
args: ['menuTemplate']
|
|
@@ -8892,12 +8720,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
8892
8720
|
args: ['document:click', ['$event']]
|
|
8893
8721
|
}] } });
|
|
8894
8722
|
|
|
8895
|
-
var DropdownMultiSize
|
|
8723
|
+
var DropdownMultiSize;
|
|
8896
8724
|
(function (DropdownMultiSize) {
|
|
8897
8725
|
DropdownMultiSize["sm"] = "sm";
|
|
8898
8726
|
DropdownMultiSize["md"] = "md";
|
|
8899
8727
|
DropdownMultiSize["lg"] = "lg";
|
|
8900
|
-
})(DropdownMultiSize
|
|
8728
|
+
})(DropdownMultiSize || (DropdownMultiSize = {}));
|
|
8901
8729
|
class TCloudUiDropdownMultiComponent {
|
|
8902
8730
|
onDocumentClick(event) {
|
|
8903
8731
|
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
@@ -8911,7 +8739,7 @@ class TCloudUiDropdownMultiComponent {
|
|
|
8911
8739
|
this.options = input.required(); // Lista de opções no novo formato
|
|
8912
8740
|
this.initialValues = input([]); // Valores pré-selecionados (deprecated - use values instead)
|
|
8913
8741
|
this.values = model([]); // Two-way binding para os valores selecionados
|
|
8914
|
-
this.size = input(DropdownMultiSize
|
|
8742
|
+
this.size = input(DropdownMultiSize.sm);
|
|
8915
8743
|
this.width = input(''); // Largura do dropdown
|
|
8916
8744
|
this.placeholder = input('Selecione'); // Placeholder quando nenhum item estiver selecionado
|
|
8917
8745
|
this.maxDisplayItems = input(2); // Máximo de itens a serem exibidos no botão
|
|
@@ -8920,7 +8748,7 @@ class TCloudUiDropdownMultiComponent {
|
|
|
8920
8748
|
this.optionsSelected = output(); // Emissor para os valores selecionados
|
|
8921
8749
|
this.selectedOptions = signal([]); // Opções selecionadas
|
|
8922
8750
|
this.isOpen = false; // Controla se o dropdown está aberto
|
|
8923
|
-
this.dropdownSize = DropdownMultiSize
|
|
8751
|
+
this.dropdownSize = DropdownMultiSize;
|
|
8924
8752
|
this.searchText = signal(''); // Texto de busca
|
|
8925
8753
|
// Opções filtradas baseadas na busca
|
|
8926
8754
|
this.filteredOptions = computed(() => {
|
|
@@ -9147,7 +8975,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
9147
8975
|
class TCloudUiSkeletonLoadingComponentStyle {
|
|
9148
8976
|
}
|
|
9149
8977
|
|
|
9150
|
-
var TagColorsEnum
|
|
8978
|
+
var TagColorsEnum;
|
|
9151
8979
|
(function (TagColorsEnum) {
|
|
9152
8980
|
TagColorsEnum["neutral-50"] = "neutral-50";
|
|
9153
8981
|
TagColorsEnum["neutral-100"] = "neutral-100";
|
|
@@ -9181,12 +9009,12 @@ var TagColorsEnum$1;
|
|
|
9181
9009
|
TagColorsEnum["success-300"] = "success-300";
|
|
9182
9010
|
TagColorsEnum["success-400"] = "success-400";
|
|
9183
9011
|
TagColorsEnum["success-500"] = "success-500";
|
|
9184
|
-
})(TagColorsEnum
|
|
9012
|
+
})(TagColorsEnum || (TagColorsEnum = {}));
|
|
9185
9013
|
|
|
9186
9014
|
class TCloudUiTagComponent {
|
|
9187
9015
|
constructor() {
|
|
9188
9016
|
this.size = input('md');
|
|
9189
|
-
this.color = input(TagColorsEnum
|
|
9017
|
+
this.color = input(TagColorsEnum['primary-500']);
|
|
9190
9018
|
this.variant = input('filled');
|
|
9191
9019
|
this.shape = input('rectangle');
|
|
9192
9020
|
this.fullWidth = input(false);
|
|
@@ -9448,38 +9276,6 @@ var TCloudUiDialogEventsEnum;
|
|
|
9448
9276
|
TCloudUiDialogEventsEnum[TCloudUiDialogEventsEnum["close"] = 1] = "close";
|
|
9449
9277
|
})(TCloudUiDialogEventsEnum || (TCloudUiDialogEventsEnum = {}));
|
|
9450
9278
|
|
|
9451
|
-
class TcRevSmallLoadingComponent {
|
|
9452
|
-
constructor() {
|
|
9453
|
-
/** Width of the loading spinner accepts string with CSS units (px, rem, em) */
|
|
9454
|
-
this.width = input('1.25rem');
|
|
9455
|
-
/** Margin top in pixels */
|
|
9456
|
-
this.marginTop = input(0);
|
|
9457
|
-
/** Margin bottom in pixels */
|
|
9458
|
-
this.marginBottom = input(0);
|
|
9459
|
-
/** Margin right in pixels */
|
|
9460
|
-
this.marginRight = input(0);
|
|
9461
|
-
/** Margin left in pixels */
|
|
9462
|
-
this.marginLeft = input(0);
|
|
9463
|
-
this.style = new TcRevSmallLoadingComponentStyle();
|
|
9464
|
-
}
|
|
9465
|
-
ngOnInit() {
|
|
9466
|
-
this.style.marginTop = `${this.marginTop()}px`;
|
|
9467
|
-
this.style.marginRight = `${this.marginRight()}px`;
|
|
9468
|
-
this.style.marginLeft = `${this.marginLeft()}px`;
|
|
9469
|
-
this.style.marginBottom = `${this.marginBottom()}px`;
|
|
9470
|
-
this.style.width = this.width();
|
|
9471
|
-
this.style.height = this.width();
|
|
9472
|
-
}
|
|
9473
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSmallLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9474
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", 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"] }] }); }
|
|
9475
|
-
}
|
|
9476
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSmallLoadingComponent, decorators: [{
|
|
9477
|
-
type: Component,
|
|
9478
|
-
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"] }]
|
|
9479
|
-
}] });
|
|
9480
|
-
class TcRevSmallLoadingComponentStyle {
|
|
9481
|
-
}
|
|
9482
|
-
|
|
9483
9279
|
class TCloudUiDialogComponent {
|
|
9484
9280
|
constructor() {
|
|
9485
9281
|
this.animation = 'visible';
|
|
@@ -9593,7 +9389,7 @@ class TCloudUiDialogComponent {
|
|
|
9593
9389
|
return this;
|
|
9594
9390
|
}
|
|
9595
9391
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TCloudUiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9596
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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 (data?.inputConfirmationText)\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 <
|
|
9392
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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 (data?.inputConfirmationText)\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 <tcloud-ui-loading [loading]=\"true\" mode=\"inline\"/>\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(--white)}.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(--tc-gray-600);border:1px solid var(--tc-gray-500)}.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: TCloudUiLoadingComponent, selector: "tcloud-ui-loading", inputs: ["gif", "mode", "onlyInline", "onlyIcon", "full", "loading"] }], animations: [
|
|
9597
9393
|
trigger('fade', [
|
|
9598
9394
|
state('visible', style({ opacity: 1 })),
|
|
9599
9395
|
state('hide', style({ opacity: 0, top: '-38%' })),
|
|
@@ -9617,7 +9413,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
9617
9413
|
]),
|
|
9618
9414
|
transition('visible => hide', animate('0.3s ease-out'))
|
|
9619
9415
|
])
|
|
9620
|
-
], standalone: true, imports: [CommonModule, ReactiveFormsModule, I18nTranslatePipe, TCloudUiLoadingComponent,
|
|
9416
|
+
], standalone: true, imports: [CommonModule, ReactiveFormsModule, I18nTranslatePipe, TCloudUiLoadingComponent, 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 (data?.inputConfirmationText)\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 <tcloud-ui-loading [loading]=\"true\" mode=\"inline\"/>\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(--white)}.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(--tc-gray-600);border:1px solid var(--tc-gray-500)}.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"] }]
|
|
9621
9417
|
}], propDecorators: { onKeydownHandler: [{
|
|
9622
9418
|
type: HostListener,
|
|
9623
9419
|
args: ['document:keydown.escape', ['$event']]
|
|
@@ -10225,12 +10021,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
10225
10021
|
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"] }]
|
|
10226
10022
|
}] });
|
|
10227
10023
|
|
|
10228
|
-
var MultiLevelDropdownSize
|
|
10024
|
+
var MultiLevelDropdownSize;
|
|
10229
10025
|
(function (MultiLevelDropdownSize) {
|
|
10230
10026
|
MultiLevelDropdownSize["sm"] = "sm";
|
|
10231
10027
|
MultiLevelDropdownSize["md"] = "md";
|
|
10232
10028
|
MultiLevelDropdownSize["lg"] = "lg";
|
|
10233
|
-
})(MultiLevelDropdownSize
|
|
10029
|
+
})(MultiLevelDropdownSize || (MultiLevelDropdownSize = {}));
|
|
10234
10030
|
class TCloudUiDropdownMultiLevelComponent {
|
|
10235
10031
|
onDocumentClick(event) {
|
|
10236
10032
|
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
@@ -10239,11 +10035,11 @@ class TCloudUiDropdownMultiLevelComponent {
|
|
|
10239
10035
|
}
|
|
10240
10036
|
constructor(elementRef) {
|
|
10241
10037
|
this.elementRef = elementRef;
|
|
10242
|
-
this.dropdownSize = MultiLevelDropdownSize
|
|
10038
|
+
this.dropdownSize = MultiLevelDropdownSize;
|
|
10243
10039
|
this.menu = input.required();
|
|
10244
10040
|
this.subMenuPosition = input('right');
|
|
10245
10041
|
this.disabled = input(false);
|
|
10246
|
-
this.size = input(MultiLevelDropdownSize
|
|
10042
|
+
this.size = input(MultiLevelDropdownSize.sm);
|
|
10247
10043
|
this.initialValue = input(null); // Valor pré-selecionado
|
|
10248
10044
|
this.optionSelected = output();
|
|
10249
10045
|
this.selectedOption = signal(null);
|
|
@@ -10359,1794 +10155,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
10359
10155
|
}]
|
|
10360
10156
|
}], ctorParameters: () => [] });
|
|
10361
10157
|
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
}
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
this.updateCalendarDays();
|
|
10445
|
-
}
|
|
10446
|
-
changeYearOffset(offset) {
|
|
10447
|
-
if (this.viewMode === 'months') {
|
|
10448
|
-
// Adjust the current date by adding or subtracting a year
|
|
10449
|
-
this.currentDate = new Date(this.currentDate.getFullYear() + offset, this.currentDate.getMonth(), 1);
|
|
10450
|
-
this.updateYear();
|
|
10451
|
-
this.updateCalendarMonths();
|
|
10452
|
-
}
|
|
10453
|
-
else if (this.viewMode === 'years') {
|
|
10454
|
-
// Adjust the year offset for the year view
|
|
10455
|
-
this.yearOffset += offset;
|
|
10456
|
-
this.updateCalendarYears();
|
|
10457
|
-
}
|
|
10458
|
-
}
|
|
10459
|
-
selectYear(year) {
|
|
10460
|
-
this.currentDate = new Date(year, this.currentDate.getMonth(), 1);
|
|
10461
|
-
this.viewMode = 'months';
|
|
10462
|
-
this.updateYear();
|
|
10463
|
-
this.updateCalendarMonths();
|
|
10464
|
-
}
|
|
10465
|
-
toggleViewMode(mode) {
|
|
10466
|
-
this.viewMode = mode;
|
|
10467
|
-
if (mode === 'years') {
|
|
10468
|
-
this.yearOffset = 0; // Reset year offset when entering year view
|
|
10469
|
-
this.updateCalendarYears();
|
|
10470
|
-
}
|
|
10471
|
-
}
|
|
10472
|
-
isAppointment(date) {
|
|
10473
|
-
const dateString = date.toISOString().split('T')[0];
|
|
10474
|
-
return this.appointments.find(appointment => appointment.appointmentDate === dateString);
|
|
10475
|
-
}
|
|
10476
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10477
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
10478
|
-
}
|
|
10479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCalendarComponent, decorators: [{
|
|
10480
|
-
type: Component,
|
|
10481
|
-
args: [{ selector: 'tc-rev-calendar', imports: [
|
|
10482
|
-
CommonModule,
|
|
10483
|
-
], 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"] }]
|
|
10484
|
-
}], propDecorators: { appointments: [{
|
|
10485
|
-
type: Input
|
|
10486
|
-
}] } });
|
|
10487
|
-
|
|
10488
|
-
class TcRevCardAccordionComponent {
|
|
10489
|
-
constructor() {
|
|
10490
|
-
this._viewPort = inject(TCloudUiDeviceUtilsService);
|
|
10491
|
-
this.toggle = output();
|
|
10492
|
-
this.title = input('');
|
|
10493
|
-
this.iconClass = input('fa-light fa-hard-drive');
|
|
10494
|
-
this.showMoreText = input('Exibir mais');
|
|
10495
|
-
this.showLessText = input('Exibir menos');
|
|
10496
|
-
this.badge = input(null);
|
|
10497
|
-
this.isOpen = model();
|
|
10498
|
-
this.isDesktop = this._viewPort.isDesktop;
|
|
10499
|
-
}
|
|
10500
|
-
toggleAccordion() {
|
|
10501
|
-
this.isOpen.update((current) => !current);
|
|
10502
|
-
this.toggle.emit(this.isOpen());
|
|
10503
|
-
}
|
|
10504
|
-
/**
|
|
10505
|
-
* APPLY FUNCTIONS RESPONSIVE < 500PX
|
|
10506
|
-
*/
|
|
10507
|
-
get accordionExtraClasses() {
|
|
10508
|
-
if (this.isDesktop()) {
|
|
10509
|
-
return ['pad-16'];
|
|
10510
|
-
}
|
|
10511
|
-
//Responsive Classes
|
|
10512
|
-
return ['pad-14'];
|
|
10513
|
-
}
|
|
10514
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCardAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10515
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
10516
|
-
}
|
|
10517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCardAccordionComponent, decorators: [{
|
|
10518
|
-
type: Component,
|
|
10519
|
-
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"] }]
|
|
10520
|
-
}] });
|
|
10521
|
-
|
|
10522
|
-
class TcRevCardComponent {
|
|
10523
|
-
constructor() {
|
|
10524
|
-
this._viewPort = inject(TCloudUiDeviceUtilsService);
|
|
10525
|
-
this.isDesktop = this._viewPort.isDesktop;
|
|
10526
|
-
}
|
|
10527
|
-
/**
|
|
10528
|
-
* APPLY FUNCTIONS RESPONSIVE < 480PX
|
|
10529
|
-
*/
|
|
10530
|
-
get extraClasses() {
|
|
10531
|
-
if (this.isDesktop()) {
|
|
10532
|
-
return ['shadow-md', 'pad-16'];
|
|
10533
|
-
}
|
|
10534
|
-
//Responsive Classes
|
|
10535
|
-
return ['shadow-sm', 'pad-14'];
|
|
10536
|
-
}
|
|
10537
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10538
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", 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"] }] }); }
|
|
10539
|
-
}
|
|
10540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCardComponent, decorators: [{
|
|
10541
|
-
type: Component,
|
|
10542
|
-
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"] }]
|
|
10543
|
-
}] });
|
|
10544
|
-
|
|
10545
|
-
class TcRevCheckboxDirective {
|
|
10546
|
-
constructor() { }
|
|
10547
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCheckboxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10548
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TcRevCheckboxDirective, isStandalone: true, selector: "input[type=\"checkbox\"][tcRevCheckbox]", host: { classAttribute: "tc-rev-checkbox" }, ngImport: i0 }); }
|
|
10549
|
-
}
|
|
10550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevCheckboxDirective, decorators: [{
|
|
10551
|
-
type: Directive,
|
|
10552
|
-
args: [{
|
|
10553
|
-
selector: 'input[type="checkbox"][tcRevCheckbox]',
|
|
10554
|
-
host: {
|
|
10555
|
-
class: 'tc-rev-checkbox'
|
|
10556
|
-
}
|
|
10557
|
-
}]
|
|
10558
|
-
}], ctorParameters: () => [] });
|
|
10559
|
-
|
|
10560
|
-
var DropdownSize;
|
|
10561
|
-
(function (DropdownSize) {
|
|
10562
|
-
DropdownSize["sm"] = "sm";
|
|
10563
|
-
DropdownSize["md"] = "md";
|
|
10564
|
-
DropdownSize["lg"] = "lg";
|
|
10565
|
-
})(DropdownSize || (DropdownSize = {}));
|
|
10566
|
-
class TcRevDropdownComponent {
|
|
10567
|
-
onDocumentClick(event) {
|
|
10568
|
-
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
10569
|
-
this.isOpen = false;
|
|
10570
|
-
}
|
|
10571
|
-
}
|
|
10572
|
-
constructor(elementRef) {
|
|
10573
|
-
this.elementRef = elementRef;
|
|
10574
|
-
this._deviceService = inject(TCloudUiDeviceUtilsService);
|
|
10575
|
-
this.label = input(''); // Label que será exibida
|
|
10576
|
-
this.disabled = input(false); // Desabilita o dropdown
|
|
10577
|
-
this.options = input.required(); // Lista de opções no novo formato
|
|
10578
|
-
this.initialValue = input(null); // Valor pré-selecionado (deprecated - use value instead)
|
|
10579
|
-
this.value = model(null); // Two-way binding para o valor selecionado
|
|
10580
|
-
this.size = input(DropdownSize.sm);
|
|
10581
|
-
this.width = input(''); // Largura específica do dropdown (ex: '300px', '50%'). Se não informado, ocupa 100% do pai
|
|
10582
|
-
this.optionSelected = output(); // Emissor para o valor selecionado
|
|
10583
|
-
this.selectedOption = signal(null); // Opção selecionada
|
|
10584
|
-
this.isOpen = false; // Controla se o dropdown está aberto
|
|
10585
|
-
this.dropdownSize = DropdownSize;
|
|
10586
|
-
this.isDesktop = this._deviceService.isDesktop;
|
|
10587
|
-
this.isMobile = this._deviceService.isMobile;
|
|
10588
|
-
}
|
|
10589
|
-
ngOnChanges(_simpleChanges) {
|
|
10590
|
-
// Atualiza a opção selecionada quando o valor pré-selecionado muda
|
|
10591
|
-
if (_simpleChanges['initialValue'] ||
|
|
10592
|
-
_simpleChanges['options'] ||
|
|
10593
|
-
_simpleChanges['value']) {
|
|
10594
|
-
const valueToUse = this.value() || this.initialValue();
|
|
10595
|
-
this.selectedOption.set(this.options().find((option) => option.value === valueToUse) || null);
|
|
10596
|
-
}
|
|
10597
|
-
}
|
|
10598
|
-
ngOnInit() {
|
|
10599
|
-
// Prioriza o valor do model, mas mantém compatibilidade com initialValue
|
|
10600
|
-
const valueToUse = this.value() || this.initialValue();
|
|
10601
|
-
const foundOption = this.options().find((option) => option.value === valueToUse) || null;
|
|
10602
|
-
this.selectedOption.set(foundOption);
|
|
10603
|
-
// Se não havia valor no model mas havia initialValue, sincroniza o model
|
|
10604
|
-
if (!this.value() && this.initialValue() && foundOption) {
|
|
10605
|
-
this.value.set(foundOption.value);
|
|
10606
|
-
}
|
|
10607
|
-
// Escuta mudanças no model e atualiza a opção selecionada
|
|
10608
|
-
this.value.subscribe((newValue) => {
|
|
10609
|
-
const option = this.options().find((opt) => opt.value === newValue) || null;
|
|
10610
|
-
if (this.selectedOption() !== option) {
|
|
10611
|
-
this.selectedOption.set(option);
|
|
10612
|
-
}
|
|
10613
|
-
});
|
|
10614
|
-
}
|
|
10615
|
-
toggleDropdown() {
|
|
10616
|
-
// Abertura do dropdown para mobile
|
|
10617
|
-
if (this.isMobile()) {
|
|
10618
|
-
this._deviceService.openDropdownDevice(this.menuTemplate);
|
|
10619
|
-
return;
|
|
10620
|
-
}
|
|
10621
|
-
this.isOpen = !this.isOpen;
|
|
10622
|
-
}
|
|
10623
|
-
selectOption(option) {
|
|
10624
|
-
this.selectedOption.set(option);
|
|
10625
|
-
this.value.set(option.value); // Atualiza o model com two-way binding
|
|
10626
|
-
this.optionSelected.emit(option); // Emite a opção selecionada para compatibilidade
|
|
10627
|
-
// Fechamento dd dropdown para mobile
|
|
10628
|
-
if (this.isMobile()) {
|
|
10629
|
-
this._deviceService.closeDropdownDevice();
|
|
10630
|
-
return;
|
|
10631
|
-
}
|
|
10632
|
-
this.isOpen = false; // Fecha o dropdown
|
|
10633
|
-
}
|
|
10634
|
-
/**
|
|
10635
|
-
* Verifica se o texto de uma opção na lista está elipsado
|
|
10636
|
-
* @param text - Texto a ser verificado
|
|
10637
|
-
* @returns true se o texto estiver elipsado
|
|
10638
|
-
*/
|
|
10639
|
-
isOptionEllipsed(text) {
|
|
10640
|
-
if (!text)
|
|
10641
|
-
return false;
|
|
10642
|
-
// Calcula a largura disponível para o texto nas opções da lista
|
|
10643
|
-
const menuElement = this.elementRef.nativeElement.querySelector('.tc-rev-dropdown-menu');
|
|
10644
|
-
if (!menuElement) {
|
|
10645
|
-
// Se o menu não está aberto, usa a largura do dropdown
|
|
10646
|
-
const dropdownElement = this.elementRef.nativeElement.querySelector('.tc-rev-dropdown');
|
|
10647
|
-
if (!dropdownElement)
|
|
10648
|
-
return false;
|
|
10649
|
-
const dropdownWidth = dropdownElement.clientWidth;
|
|
10650
|
-
const padding = 16; // 8px de cada lado do botão
|
|
10651
|
-
const iconSpace = 24; // Espaço do ícone de check quando selecionado
|
|
10652
|
-
const availableWidth = Math.max(50, dropdownWidth - padding - iconSpace);
|
|
10653
|
-
return isTextEllipsed(text, availableWidth);
|
|
10654
|
-
}
|
|
10655
|
-
// Largura do menu menos padding do item (16px total) e espaço do ícone de check (24px)
|
|
10656
|
-
const menuWidth = menuElement.clientWidth;
|
|
10657
|
-
const padding = 16; // 8px de cada lado do botão do item
|
|
10658
|
-
const iconSpace = 24; // Espaço do ícone de check quando selecionado
|
|
10659
|
-
const availableWidth = Math.max(50, menuWidth - padding - iconSpace);
|
|
10660
|
-
return isTextEllipsed(text, availableWidth);
|
|
10661
|
-
}
|
|
10662
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10663
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
10664
|
-
}
|
|
10665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownComponent, decorators: [{
|
|
10666
|
-
type: Component,
|
|
10667
|
-
args: [{ selector: 'tc-rev-dropdown', imports: [
|
|
10668
|
-
CommonModule,
|
|
10669
|
-
FormsModule,
|
|
10670
|
-
ReactiveFormsModule,
|
|
10671
|
-
TcRevTooltipDirective,
|
|
10672
|
-
TcRevIconButtonDirective
|
|
10673
|
-
], 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"] }]
|
|
10674
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { menuTemplate: [{
|
|
10675
|
-
type: ViewChild,
|
|
10676
|
-
args: ['menuTemplate']
|
|
10677
|
-
}], onDocumentClick: [{
|
|
10678
|
-
type: HostListener,
|
|
10679
|
-
args: ['document:click', ['$event']]
|
|
10680
|
-
}] } });
|
|
10681
|
-
|
|
10682
|
-
class TcRevSearchInputComponent {
|
|
10683
|
-
constructor() {
|
|
10684
|
-
this.searchTextChange = new EventEmitter();
|
|
10685
|
-
this.searchInput = viewChild('searchInput');
|
|
10686
|
-
this.searchTextForm = new FormControl('');
|
|
10687
|
-
this.placeholder = input('');
|
|
10688
|
-
this.onSearch = output();
|
|
10689
|
-
this.autoFocus = input(false);
|
|
10690
|
-
}
|
|
10691
|
-
ngOnChanges(_simpleChanges) {
|
|
10692
|
-
if (_simpleChanges['searchText']) {
|
|
10693
|
-
this.searchTextForm.setValue(this.searchText);
|
|
10694
|
-
}
|
|
10695
|
-
}
|
|
10696
|
-
ngOnInit() {
|
|
10697
|
-
// Inicializa o FormControl com o valor do model
|
|
10698
|
-
this.searchTextForm.setValue(this.searchText);
|
|
10699
|
-
this.searchTextForm.valueChanges
|
|
10700
|
-
.pipe(debounceTime(500), distinctUntilChanged(), map((text) => text?.toLowerCase() || ''))
|
|
10701
|
-
.subscribe((text) => {
|
|
10702
|
-
this.searchTextChange.emit(text);
|
|
10703
|
-
this.onSearch.emit(text);
|
|
10704
|
-
});
|
|
10705
|
-
}
|
|
10706
|
-
ngAfterViewInit() {
|
|
10707
|
-
if (this.autoFocus() && this.searchInput) {
|
|
10708
|
-
this.searchInput().nativeElement.focus();
|
|
10709
|
-
}
|
|
10710
|
-
}
|
|
10711
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10712
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.25", 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"] }] }); }
|
|
10713
|
-
}
|
|
10714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSearchInputComponent, decorators: [{
|
|
10715
|
-
type: Component,
|
|
10716
|
-
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"] }]
|
|
10717
|
-
}], propDecorators: { searchText: [{
|
|
10718
|
-
type: Input
|
|
10719
|
-
}], searchTextChange: [{
|
|
10720
|
-
type: Output
|
|
10721
|
-
}] } });
|
|
10722
|
-
|
|
10723
|
-
var DropdownGroupedSize;
|
|
10724
|
-
(function (DropdownGroupedSize) {
|
|
10725
|
-
DropdownGroupedSize["sm"] = "sm";
|
|
10726
|
-
DropdownGroupedSize["md"] = "md";
|
|
10727
|
-
DropdownGroupedSize["lg"] = "lg";
|
|
10728
|
-
})(DropdownGroupedSize || (DropdownGroupedSize = {}));
|
|
10729
|
-
class TcRevDropdownGroupedComponent {
|
|
10730
|
-
onDocumentClick(event) {
|
|
10731
|
-
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
10732
|
-
this.isOpen = false;
|
|
10733
|
-
}
|
|
10734
|
-
}
|
|
10735
|
-
constructor(elementRef) {
|
|
10736
|
-
this.elementRef = elementRef;
|
|
10737
|
-
this._deviceService = inject(TCloudUiDeviceUtilsService);
|
|
10738
|
-
this.label = input(''); // Label que será exibida
|
|
10739
|
-
this.disabled = input(false); // Desabilita o dropdown
|
|
10740
|
-
this.options = input.required(); // Lista de opções agrupadas
|
|
10741
|
-
this.initialValue = input(null); // Valor pré-selecionado (deprecated - use value instead)
|
|
10742
|
-
this.value = model(null); // Two-way binding para o valor selecionado
|
|
10743
|
-
this.size = input(DropdownGroupedSize.sm);
|
|
10744
|
-
this.placeholder = input('Selecione');
|
|
10745
|
-
this.searchPlaceholder = input('Buscar...');
|
|
10746
|
-
this.showSearch = input(true); // Controla se mostra o input de busca
|
|
10747
|
-
this.width = input(''); // Largura do dropdown
|
|
10748
|
-
this.optionSelected = output(); // Emissor para o valor selecionado
|
|
10749
|
-
this.selectedOption = signal(null); // Opção selecionada
|
|
10750
|
-
this.isOpen = false; // Controla se o dropdown está aberto
|
|
10751
|
-
this.searchTerm = signal(''); // Termo de busca
|
|
10752
|
-
this.dropdownSize = DropdownGroupedSize;
|
|
10753
|
-
this.isDesktop = this._deviceService.isDesktop;
|
|
10754
|
-
this.isMobile = this._deviceService.isMobile;
|
|
10755
|
-
}
|
|
10756
|
-
ngOnChanges(_simpleChanges) {
|
|
10757
|
-
// Atualiza a opção selecionada quando o valor pré-selecionado muda
|
|
10758
|
-
if (_simpleChanges['initialValue'] ||
|
|
10759
|
-
_simpleChanges['options'] ||
|
|
10760
|
-
_simpleChanges['value']) {
|
|
10761
|
-
const valueToUse = this.value() || this.initialValue();
|
|
10762
|
-
this.selectedOption.set(this.options().find((option) => option.value === valueToUse) || null);
|
|
10763
|
-
}
|
|
10764
|
-
}
|
|
10765
|
-
ngOnInit() {
|
|
10766
|
-
// Prioriza o valor do model, mas mantém compatibilidade com initialValue
|
|
10767
|
-
const valueToUse = this.value() || this.initialValue();
|
|
10768
|
-
const foundOption = this.options().find((option) => option.value === valueToUse) || null;
|
|
10769
|
-
this.selectedOption.set(foundOption);
|
|
10770
|
-
// Se não havia valor no model mas havia initialValue, sincroniza o model
|
|
10771
|
-
if (!this.value() && this.initialValue() && foundOption) {
|
|
10772
|
-
this.value.set(foundOption.value);
|
|
10773
|
-
}
|
|
10774
|
-
// Escuta mudanças no model e atualiza a opção selecionada
|
|
10775
|
-
this.value.subscribe((newValue) => {
|
|
10776
|
-
const option = this.options().find((opt) => opt.value === newValue) || null;
|
|
10777
|
-
if (this.selectedOption() !== option) {
|
|
10778
|
-
this.selectedOption.set(option);
|
|
10779
|
-
}
|
|
10780
|
-
});
|
|
10781
|
-
}
|
|
10782
|
-
toggleDropdown() {
|
|
10783
|
-
if (!this.disabled()) {
|
|
10784
|
-
// Abertura do dropdown para mobile
|
|
10785
|
-
if (this.isMobile()) {
|
|
10786
|
-
this._deviceService.openDropdownDevice(this.menuTemplate);
|
|
10787
|
-
return;
|
|
10788
|
-
}
|
|
10789
|
-
this.isOpen = !this.isOpen;
|
|
10790
|
-
if (this.isOpen) {
|
|
10791
|
-
this.searchTerm.set('');
|
|
10792
|
-
// Foca no input de busca quando abre o dropdown
|
|
10793
|
-
setTimeout(() => {
|
|
10794
|
-
const searchInput = this.elementRef.nativeElement.querySelector('.tc-rev-dropdown-search input');
|
|
10795
|
-
if (searchInput) {
|
|
10796
|
-
searchInput.focus();
|
|
10797
|
-
}
|
|
10798
|
-
}, 100);
|
|
10799
|
-
}
|
|
10800
|
-
}
|
|
10801
|
-
}
|
|
10802
|
-
selectOption(option) {
|
|
10803
|
-
if (!option.disabled) {
|
|
10804
|
-
this.selectedOption.set(option);
|
|
10805
|
-
this.value.set(option.value); // Atualiza o model com two-way binding
|
|
10806
|
-
this.optionSelected.emit(option); // Emite a opção selecionada para compatibilidade
|
|
10807
|
-
if (this.isMobile()) {
|
|
10808
|
-
this._deviceService.closeDropdownDevice();
|
|
10809
|
-
return;
|
|
10810
|
-
}
|
|
10811
|
-
this.isOpen = false;
|
|
10812
|
-
this.searchTerm.set('');
|
|
10813
|
-
}
|
|
10814
|
-
}
|
|
10815
|
-
onSearchChange(searchText) {
|
|
10816
|
-
this.searchTerm.set(searchText);
|
|
10817
|
-
}
|
|
10818
|
-
getGroupedOptions() {
|
|
10819
|
-
const filtered = this.getFilteredOptions();
|
|
10820
|
-
const groups = {};
|
|
10821
|
-
// Agrupa as opções filtradas
|
|
10822
|
-
filtered.forEach((option) => {
|
|
10823
|
-
const groupName = option.group || 'Sem grupo';
|
|
10824
|
-
if (!groups[groupName]) {
|
|
10825
|
-
groups[groupName] = [];
|
|
10826
|
-
}
|
|
10827
|
-
groups[groupName].push(option);
|
|
10828
|
-
});
|
|
10829
|
-
// Converte para array de grupos
|
|
10830
|
-
return Object.keys(groups).map((groupName) => ({
|
|
10831
|
-
groupName,
|
|
10832
|
-
options: groups[groupName],
|
|
10833
|
-
}));
|
|
10834
|
-
}
|
|
10835
|
-
getFilteredOptions() {
|
|
10836
|
-
const search = this.searchTerm().toLowerCase().trim();
|
|
10837
|
-
if (!search) {
|
|
10838
|
-
return this.options();
|
|
10839
|
-
}
|
|
10840
|
-
return this.options().filter((option) => option.displayValue.toLowerCase().includes(search) ||
|
|
10841
|
-
(option.group && option.group.toLowerCase().includes(search)));
|
|
10842
|
-
}
|
|
10843
|
-
clearSearch() {
|
|
10844
|
-
this.searchTerm.set('');
|
|
10845
|
-
}
|
|
10846
|
-
hasResults() {
|
|
10847
|
-
return this.getFilteredOptions().length > 0;
|
|
10848
|
-
}
|
|
10849
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownGroupedComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10850
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
10851
|
-
}
|
|
10852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownGroupedComponent, decorators: [{
|
|
10853
|
-
type: Component,
|
|
10854
|
-
args: [{ selector: 'tc-rev-dropdown-grouped', imports: [
|
|
10855
|
-
CommonModule,
|
|
10856
|
-
FormsModule,
|
|
10857
|
-
ReactiveFormsModule,
|
|
10858
|
-
TcRevSearchInputComponent,
|
|
10859
|
-
TcRevIconButtonDirective
|
|
10860
|
-
], 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"] }]
|
|
10861
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { menuTemplate: [{
|
|
10862
|
-
type: ViewChild,
|
|
10863
|
-
args: ['menuTemplate']
|
|
10864
|
-
}], onDocumentClick: [{
|
|
10865
|
-
type: HostListener,
|
|
10866
|
-
args: ['document:click', ['$event']]
|
|
10867
|
-
}] } });
|
|
10868
|
-
|
|
10869
|
-
var DropdownMultiSize;
|
|
10870
|
-
(function (DropdownMultiSize) {
|
|
10871
|
-
DropdownMultiSize["sm"] = "sm";
|
|
10872
|
-
DropdownMultiSize["md"] = "md";
|
|
10873
|
-
DropdownMultiSize["lg"] = "lg";
|
|
10874
|
-
})(DropdownMultiSize || (DropdownMultiSize = {}));
|
|
10875
|
-
class TcRevDropdownMultiComponent {
|
|
10876
|
-
onDocumentClick(event) {
|
|
10877
|
-
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
10878
|
-
this.isOpen = false;
|
|
10879
|
-
}
|
|
10880
|
-
}
|
|
10881
|
-
constructor(elementRef) {
|
|
10882
|
-
this.elementRef = elementRef;
|
|
10883
|
-
this.label = input(''); // Label que será exibida
|
|
10884
|
-
this.disabled = input(false); // Desabilita o dropdown
|
|
10885
|
-
this.options = input.required(); // Lista de opções no novo formato
|
|
10886
|
-
this.initialValues = input([]); // Valores pré-selecionados (deprecated - use values instead)
|
|
10887
|
-
this.values = model([]); // Two-way binding para os valores selecionados
|
|
10888
|
-
this.size = input(DropdownMultiSize.sm);
|
|
10889
|
-
this.width = input(''); // Largura do dropdown
|
|
10890
|
-
this.placeholder = input('Selecione'); // Placeholder quando nenhum item estiver selecionado
|
|
10891
|
-
this.maxDisplayItems = input(2); // Máximo de itens a serem exibidos no botão
|
|
10892
|
-
this.optionsSelected = output(); // Emissor para os valores selecionados
|
|
10893
|
-
this.selectedOptions = signal([]); // Opções selecionadas
|
|
10894
|
-
this.isOpen = false; // Controla se o dropdown está aberto
|
|
10895
|
-
this.dropdownSize = DropdownMultiSize;
|
|
10896
|
-
}
|
|
10897
|
-
ngOnChanges(_simpleChanges) {
|
|
10898
|
-
// Atualiza as opções selecionadas quando os valores pré-selecionados mudam
|
|
10899
|
-
if (_simpleChanges['initialValues'] || _simpleChanges['options'] || _simpleChanges['values']) {
|
|
10900
|
-
const valuesToUse = this.values().length > 0 ? this.values() : this.initialValues();
|
|
10901
|
-
const selected = this.options().filter(option => valuesToUse.includes(option.value));
|
|
10902
|
-
this.selectedOptions.set(selected);
|
|
10903
|
-
}
|
|
10904
|
-
}
|
|
10905
|
-
ngOnInit() {
|
|
10906
|
-
// Prioriza os valores do model, mas mantém compatibilidade com initialValues
|
|
10907
|
-
const valuesToUse = this.values().length > 0 ? this.values() : this.initialValues();
|
|
10908
|
-
const selected = this.options().filter(option => valuesToUse.includes(option.value));
|
|
10909
|
-
this.selectedOptions.set(selected);
|
|
10910
|
-
// Se não havia valores no model mas havia initialValues, sincroniza o model
|
|
10911
|
-
if (this.values().length === 0 && this.initialValues().length > 0) {
|
|
10912
|
-
this.values.set([...this.initialValues()]);
|
|
10913
|
-
}
|
|
10914
|
-
// Escuta mudanças no model e atualiza as opções selecionadas
|
|
10915
|
-
this.values.subscribe((newValues) => {
|
|
10916
|
-
const newSelected = this.options().filter(option => newValues.includes(option.value));
|
|
10917
|
-
// Só atualiza se realmente mudou para evitar loops
|
|
10918
|
-
const currentSelectedValues = this.selectedOptions().map(opt => opt.value);
|
|
10919
|
-
const newSelectedValues = newSelected.map(opt => opt.value);
|
|
10920
|
-
if (JSON.stringify(currentSelectedValues.sort()) !== JSON.stringify(newSelectedValues.sort())) {
|
|
10921
|
-
this.selectedOptions.set(newSelected);
|
|
10922
|
-
}
|
|
10923
|
-
});
|
|
10924
|
-
}
|
|
10925
|
-
toggleDropdown() {
|
|
10926
|
-
if (!this.disabled()) {
|
|
10927
|
-
this.isOpen = !this.isOpen;
|
|
10928
|
-
}
|
|
10929
|
-
}
|
|
10930
|
-
toggleOption(option, event) {
|
|
10931
|
-
event.stopPropagation();
|
|
10932
|
-
if (option.disabled)
|
|
10933
|
-
return;
|
|
10934
|
-
const currentSelected = this.selectedOptions();
|
|
10935
|
-
const isSelected = currentSelected.some(selected => selected.value === option.value);
|
|
10936
|
-
let newSelected;
|
|
10937
|
-
if (isSelected) {
|
|
10938
|
-
// Remove a opção se já estiver selecionada
|
|
10939
|
-
newSelected = currentSelected.filter(selected => selected.value !== option.value);
|
|
10940
|
-
}
|
|
10941
|
-
else {
|
|
10942
|
-
// Adiciona a opção se não estiver selecionada
|
|
10943
|
-
newSelected = [...currentSelected, option];
|
|
10944
|
-
}
|
|
10945
|
-
const newValues = newSelected.map(opt => opt.value);
|
|
10946
|
-
this.selectedOptions.set(newSelected);
|
|
10947
|
-
this.values.set(newValues); // Atualiza o model com two-way binding
|
|
10948
|
-
this.optionsSelected.emit(newValues); // Emite os valores para compatibilidade
|
|
10949
|
-
}
|
|
10950
|
-
isOptionSelected(option) {
|
|
10951
|
-
return this.selectedOptions().some(selected => selected.value === option.value);
|
|
10952
|
-
}
|
|
10953
|
-
getDisplayText() {
|
|
10954
|
-
const selected = this.selectedOptions();
|
|
10955
|
-
if (selected.length === 0) {
|
|
10956
|
-
return this.placeholder();
|
|
10957
|
-
}
|
|
10958
|
-
// Se todos os itens (não desabilitados) estão selecionados, mostra "Todos"
|
|
10959
|
-
if (this.isAllSelected()) {
|
|
10960
|
-
return 'Todos';
|
|
10961
|
-
}
|
|
10962
|
-
const maxDisplay = this.maxDisplayItems();
|
|
10963
|
-
if (selected.length <= maxDisplay) {
|
|
10964
|
-
return selected.map(opt => opt.displayValue).join(', ');
|
|
10965
|
-
}
|
|
10966
|
-
const firstItems = selected.slice(0, maxDisplay).map(opt => opt.displayValue).join(', ');
|
|
10967
|
-
const remaining = selected.length - maxDisplay;
|
|
10968
|
-
return `${firstItems} (+${remaining})`;
|
|
10969
|
-
}
|
|
10970
|
-
clearAll() {
|
|
10971
|
-
this.selectedOptions.set([]);
|
|
10972
|
-
this.values.set([]); // Atualiza o model com two-way binding
|
|
10973
|
-
this.optionsSelected.emit([]);
|
|
10974
|
-
}
|
|
10975
|
-
selectAll() {
|
|
10976
|
-
const enabledOptions = this.options().filter(option => !option.disabled);
|
|
10977
|
-
const allValues = enabledOptions.map(opt => opt.value);
|
|
10978
|
-
this.selectedOptions.set(enabledOptions);
|
|
10979
|
-
this.values.set(allValues); // Atualiza o model com two-way binding
|
|
10980
|
-
this.optionsSelected.emit(allValues);
|
|
10981
|
-
}
|
|
10982
|
-
isAllSelected() {
|
|
10983
|
-
const enabledOptions = this.options().filter(option => !option.disabled);
|
|
10984
|
-
const selectedOptions = this.selectedOptions();
|
|
10985
|
-
if (enabledOptions.length === 0)
|
|
10986
|
-
return false;
|
|
10987
|
-
return enabledOptions.every(option => selectedOptions.some(selected => selected.value === option.value));
|
|
10988
|
-
}
|
|
10989
|
-
isSomeSelected() {
|
|
10990
|
-
const enabledOptions = this.options().filter(option => !option.disabled);
|
|
10991
|
-
const selectedOptions = this.selectedOptions();
|
|
10992
|
-
if (enabledOptions.length === 0 || selectedOptions.length === 0)
|
|
10993
|
-
return false;
|
|
10994
|
-
const selectedCount = enabledOptions.filter(option => selectedOptions.some(selected => selected.value === option.value)).length;
|
|
10995
|
-
return selectedCount > 0 && selectedCount < enabledOptions.length;
|
|
10996
|
-
}
|
|
10997
|
-
toggleSelectAll(event) {
|
|
10998
|
-
event.stopPropagation();
|
|
10999
|
-
if (this.isAllSelected()) {
|
|
11000
|
-
this.clearAll();
|
|
11001
|
-
}
|
|
11002
|
-
else {
|
|
11003
|
-
this.selectAll();
|
|
11004
|
-
}
|
|
11005
|
-
}
|
|
11006
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownMultiComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11007
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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]" }] }); }
|
|
11008
|
-
}
|
|
11009
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownMultiComponent, decorators: [{
|
|
11010
|
-
type: Component,
|
|
11011
|
-
args: [{ selector: 'tc-rev-dropdown-multi', imports: [
|
|
11012
|
-
CommonModule,
|
|
11013
|
-
FormsModule,
|
|
11014
|
-
ReactiveFormsModule,
|
|
11015
|
-
TcRevCheckboxDirective
|
|
11016
|
-
], 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"] }]
|
|
11017
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onDocumentClick: [{
|
|
11018
|
-
type: HostListener,
|
|
11019
|
-
args: ['document:click', ['$event']]
|
|
11020
|
-
}] } });
|
|
11021
|
-
|
|
11022
|
-
class TcRevDropdownSubMenuComponent {
|
|
11023
|
-
constructor() {
|
|
11024
|
-
this.items = input.required();
|
|
11025
|
-
this.position = input('right');
|
|
11026
|
-
this.parentOffsetTop = input.required();
|
|
11027
|
-
this.selectedOption = input();
|
|
11028
|
-
this.onOptionSelected = output();
|
|
11029
|
-
}
|
|
11030
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownSubMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11031
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
11032
|
-
}
|
|
11033
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownSubMenuComponent, decorators: [{
|
|
11034
|
-
type: Component,
|
|
11035
|
-
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"] }]
|
|
11036
|
-
}] });
|
|
11037
|
-
|
|
11038
|
-
var MultiLevelDropdownSize;
|
|
11039
|
-
(function (MultiLevelDropdownSize) {
|
|
11040
|
-
MultiLevelDropdownSize["sm"] = "sm";
|
|
11041
|
-
MultiLevelDropdownSize["md"] = "md";
|
|
11042
|
-
MultiLevelDropdownSize["lg"] = "lg";
|
|
11043
|
-
})(MultiLevelDropdownSize || (MultiLevelDropdownSize = {}));
|
|
11044
|
-
class TcRevDropdownMultiLevelComponent {
|
|
11045
|
-
onDocumentClick(event) {
|
|
11046
|
-
if (this.isOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
11047
|
-
this.isOpen = false;
|
|
11048
|
-
}
|
|
11049
|
-
}
|
|
11050
|
-
constructor(elementRef) {
|
|
11051
|
-
this.elementRef = elementRef;
|
|
11052
|
-
this.dropdownSize = MultiLevelDropdownSize;
|
|
11053
|
-
this.menu = input.required();
|
|
11054
|
-
this.subMenuPosition = input('right');
|
|
11055
|
-
this.disabled = input(false);
|
|
11056
|
-
this.size = input(MultiLevelDropdownSize.sm);
|
|
11057
|
-
this.initialValue = input(null); // Valor pré-selecionado
|
|
11058
|
-
this.optionSelected = output();
|
|
11059
|
-
this.selectedOption = signal(null);
|
|
11060
|
-
this.selectedParentOption = signal(null);
|
|
11061
|
-
this.hoveredIndex = null;
|
|
11062
|
-
this.isOpen = false;
|
|
11063
|
-
}
|
|
11064
|
-
ngOnChanges(_simpleChanges) {
|
|
11065
|
-
// Atualiza a opção selecionada quando o valor pré-selecionado muda
|
|
11066
|
-
if (_simpleChanges['initialValue'] || _simpleChanges['menu']) {
|
|
11067
|
-
this.selectedOption.set(null);
|
|
11068
|
-
this.selectedParentOption.set(null);
|
|
11069
|
-
}
|
|
11070
|
-
}
|
|
11071
|
-
getItemOffsetTop(index) {
|
|
11072
|
-
if (!this.menuRoot)
|
|
11073
|
-
return 0;
|
|
11074
|
-
const items = this.menuRoot.nativeElement.querySelectorAll('.menu-item');
|
|
11075
|
-
if (items && items[index]) {
|
|
11076
|
-
return items[index].offsetTop;
|
|
11077
|
-
}
|
|
11078
|
-
return 0;
|
|
11079
|
-
}
|
|
11080
|
-
toggleDropdown() {
|
|
11081
|
-
this.isOpen = !this.isOpen;
|
|
11082
|
-
}
|
|
11083
|
-
selectOption(option, parentOption) {
|
|
11084
|
-
this.selectedOption.set(option);
|
|
11085
|
-
this.selectedParentOption.set(parentOption);
|
|
11086
|
-
this.optionSelected.emit({ option, parentOption }); // Emite apenas o valor da opção selecionada
|
|
11087
|
-
// this.isOpen = false; // Fecha o dropdown
|
|
11088
|
-
// this.hoveredIndex = null;
|
|
11089
|
-
}
|
|
11090
|
-
selectParentItem($event, option, parentOption) {
|
|
11091
|
-
$event.stopPropagation();
|
|
11092
|
-
if (parentOption?.children?.length)
|
|
11093
|
-
return;
|
|
11094
|
-
this.selectOption(option, parentOption);
|
|
11095
|
-
}
|
|
11096
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownMultiLevelComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11097
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
11098
|
-
}
|
|
11099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevDropdownMultiLevelComponent, decorators: [{
|
|
11100
|
-
type: Component,
|
|
11101
|
-
args: [{ selector: 'tc-rev-dropdown-multi-level', imports: [
|
|
11102
|
-
CommonModule,
|
|
11103
|
-
TcRevDropdownSubMenuComponent
|
|
11104
|
-
], 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"] }]
|
|
11105
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { onDocumentClick: [{
|
|
11106
|
-
type: HostListener,
|
|
11107
|
-
args: ['document:click', ['$event']]
|
|
11108
|
-
}], menuRoot: [{
|
|
11109
|
-
type: ViewChild,
|
|
11110
|
-
args: ['menuRoot', { static: false }]
|
|
11111
|
-
}] } });
|
|
11112
|
-
|
|
11113
|
-
/**
|
|
11114
|
-
*
|
|
11115
|
-
* @param echarts echars instance
|
|
11116
|
-
* @param chartData chart info to build the config
|
|
11117
|
-
* @returns a bar chart config for echarts with the given data
|
|
11118
|
-
*/
|
|
11119
|
-
function echartBarConfig(echarts, chartData) {
|
|
11120
|
-
const { xAxisName, xAxisLabels, seriesData, tooltipFormatter, yAxisLabelFormatter, xAxisLabelFormatter } = chartData;
|
|
11121
|
-
return {
|
|
11122
|
-
grid: {
|
|
11123
|
-
left: '6.5%',
|
|
11124
|
-
top: 48,
|
|
11125
|
-
right: '2%',
|
|
11126
|
-
bottom: 56
|
|
11127
|
-
},
|
|
11128
|
-
tooltip: {
|
|
11129
|
-
trigger: 'axis',
|
|
11130
|
-
backgroundColor: '#131313',
|
|
11131
|
-
formatter: tooltipFormatter,
|
|
11132
|
-
textStyle: {
|
|
11133
|
-
color: '#f3f3f3',
|
|
11134
|
-
fontSize: 12,
|
|
11135
|
-
fontFamily: 'Nunito Sans'
|
|
11136
|
-
}
|
|
11137
|
-
},
|
|
11138
|
-
xAxis: {
|
|
11139
|
-
type: 'category',
|
|
11140
|
-
axisLabel: {
|
|
11141
|
-
color: '#131313',
|
|
11142
|
-
fontSize: 14,
|
|
11143
|
-
fontFamily: 'Nunito Sans',
|
|
11144
|
-
margin: 16,
|
|
11145
|
-
formatter: xAxisLabelFormatter,
|
|
11146
|
-
},
|
|
11147
|
-
axisLine: {
|
|
11148
|
-
show: true,
|
|
11149
|
-
lineStyle: {
|
|
11150
|
-
color: '#BAC0C6'
|
|
11151
|
-
}
|
|
11152
|
-
},
|
|
11153
|
-
axisTick: {
|
|
11154
|
-
show: false
|
|
11155
|
-
},
|
|
11156
|
-
data: xAxisLabels,
|
|
11157
|
-
name: xAxisName,
|
|
11158
|
-
nameLocation: 'start',
|
|
11159
|
-
nameTextStyle: {
|
|
11160
|
-
align: 'left',
|
|
11161
|
-
color: '#131313',
|
|
11162
|
-
fontFamily: 'Nunito Sans',
|
|
11163
|
-
fontSize: 14,
|
|
11164
|
-
fontWeight: 700,
|
|
11165
|
-
padding: [0, 0, -46, -36]
|
|
11166
|
-
}
|
|
11167
|
-
},
|
|
11168
|
-
yAxis: {
|
|
11169
|
-
type: 'value',
|
|
11170
|
-
axisLine: {
|
|
11171
|
-
show: false
|
|
11172
|
-
},
|
|
11173
|
-
axisTick: {
|
|
11174
|
-
show: false
|
|
11175
|
-
},
|
|
11176
|
-
axisLabel: {
|
|
11177
|
-
formatter: yAxisLabelFormatter,
|
|
11178
|
-
align: 'left',
|
|
11179
|
-
color: '#131313',
|
|
11180
|
-
fontSize: 14,
|
|
11181
|
-
fontFamily: 'Nunito Sans',
|
|
11182
|
-
inside: false,
|
|
11183
|
-
padding: [-40, 0, 0, -40]
|
|
11184
|
-
}
|
|
11185
|
-
},
|
|
11186
|
-
series: seriesData.map((serie) => ({
|
|
11187
|
-
name: serie.serieName,
|
|
11188
|
-
type: 'bar',
|
|
11189
|
-
data: serie.values,
|
|
11190
|
-
itemStyle: {
|
|
11191
|
-
barBorderRadius: [8, 8, 8, 8],
|
|
11192
|
-
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
11193
|
-
{ offset: 0, color: '#0897E9' },
|
|
11194
|
-
{ offset: 1, color: '#75D8FF' }
|
|
11195
|
-
])
|
|
11196
|
-
}
|
|
11197
|
-
}))
|
|
11198
|
-
};
|
|
11199
|
-
}
|
|
11200
|
-
|
|
11201
|
-
class TcRevEmptyContentComponent {
|
|
11202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevEmptyContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11203
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", 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: [""] }); }
|
|
11204
|
-
}
|
|
11205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevEmptyContentComponent, decorators: [{
|
|
11206
|
-
type: Component,
|
|
11207
|
-
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" }]
|
|
11208
|
-
}] });
|
|
11209
|
-
|
|
11210
|
-
class TcRevFaqComponent {
|
|
11211
|
-
constructor() {
|
|
11212
|
-
this.title = 'Dúvidas frequentes';
|
|
11213
|
-
this.questions = [];
|
|
11214
|
-
this.openIndex = signal(null);
|
|
11215
|
-
}
|
|
11216
|
-
toggle(index) {
|
|
11217
|
-
if (this.openIndex() === index) {
|
|
11218
|
-
this.openIndex.set(null);
|
|
11219
|
-
}
|
|
11220
|
-
else {
|
|
11221
|
-
this.openIndex.set(index);
|
|
11222
|
-
}
|
|
11223
|
-
}
|
|
11224
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevFaqComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11225
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", 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 }); }
|
|
11226
|
-
}
|
|
11227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevFaqComponent, decorators: [{
|
|
11228
|
-
type: Component,
|
|
11229
|
-
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"] }]
|
|
11230
|
-
}], propDecorators: { title: [{
|
|
11231
|
-
type: Input
|
|
11232
|
-
}], questions: [{
|
|
11233
|
-
type: Input
|
|
11234
|
-
}] } });
|
|
11235
|
-
|
|
11236
|
-
class TcRevInputContainerComponent {
|
|
11237
|
-
constructor() {
|
|
11238
|
-
this.fullWidth = input(false);
|
|
11239
|
-
this.inputId = input('');
|
|
11240
|
-
this.label = input('');
|
|
11241
|
-
this.labelPosition = input('top');
|
|
11242
|
-
this.required = input(false);
|
|
11243
|
-
}
|
|
11244
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevInputContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11245
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
11246
|
-
}
|
|
11247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevInputContainerComponent, decorators: [{
|
|
11248
|
-
type: Component,
|
|
11249
|
-
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"] }]
|
|
11250
|
-
}] });
|
|
11251
|
-
|
|
11252
|
-
class TcRevInputDirective {
|
|
11253
|
-
constructor(_el) {
|
|
11254
|
-
this._el = _el;
|
|
11255
|
-
this.fullWidth = input(false);
|
|
11256
|
-
effect(() => {
|
|
11257
|
-
this.setClasses();
|
|
11258
|
-
});
|
|
11259
|
-
}
|
|
11260
|
-
setClasses() {
|
|
11261
|
-
this.fullWidth() ? this._el.nativeElement.classList.add('tc-rev-input-control--full-width') : null;
|
|
11262
|
-
}
|
|
11263
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevInputDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11264
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", 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 }); }
|
|
11265
|
-
}
|
|
11266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevInputDirective, decorators: [{
|
|
11267
|
-
type: Directive,
|
|
11268
|
-
args: [{
|
|
11269
|
-
selector: 'input[tcRevInput], select[tcRevInput]',
|
|
11270
|
-
host: {
|
|
11271
|
-
class: 'tc-rev-input-control'
|
|
11272
|
-
}
|
|
11273
|
-
}]
|
|
11274
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
11275
|
-
|
|
11276
|
-
class TcRevLoadingComponent {
|
|
11277
|
-
constructor() {
|
|
11278
|
-
this.message = input('Carregando');
|
|
11279
|
-
}
|
|
11280
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11281
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", 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"] }); }
|
|
11282
|
-
}
|
|
11283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevLoadingComponent, decorators: [{
|
|
11284
|
-
type: Component,
|
|
11285
|
-
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"] }]
|
|
11286
|
-
}] });
|
|
11287
|
-
|
|
11288
|
-
class TcRevMessageComponent {
|
|
11289
|
-
constructor() {
|
|
11290
|
-
this.message = '';
|
|
11291
|
-
this.type = 'info';
|
|
11292
|
-
}
|
|
11293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11294
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", 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 }); }
|
|
11295
|
-
}
|
|
11296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevMessageComponent, decorators: [{
|
|
11297
|
-
type: Component,
|
|
11298
|
-
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"] }]
|
|
11299
|
-
}], propDecorators: { message: [{
|
|
11300
|
-
type: Input
|
|
11301
|
-
}], type: [{
|
|
11302
|
-
type: Input
|
|
11303
|
-
}] } });
|
|
11304
|
-
|
|
11305
|
-
class TcRevMultiInputComponent {
|
|
11306
|
-
constructor() {
|
|
11307
|
-
this.autoFocus = false;
|
|
11308
|
-
this.initialValue = input('');
|
|
11309
|
-
this.description = input('');
|
|
11310
|
-
this.initialList = input([]); // Deprecated - use items instead
|
|
11311
|
-
this.items = model([]); // Two-way binding para a lista de itens
|
|
11312
|
-
this.validators = input([]);
|
|
11313
|
-
this.disabled = input(false);
|
|
11314
|
-
this.itemsList = signal([]);
|
|
11315
|
-
this.onChangeList = output();
|
|
11316
|
-
effect(() => {
|
|
11317
|
-
this.disabled() ? this.multiInputForm?.get('multiInput')?.disable() : this.multiInputForm?.get('multiInput')?.enable();
|
|
11318
|
-
});
|
|
11319
|
-
}
|
|
11320
|
-
ngOnInit() {
|
|
11321
|
-
this.multiInputForm = new FormGroup({
|
|
11322
|
-
multiInput: new FormControl('', [Validators.required, ...this.validators()])
|
|
11323
|
-
});
|
|
11324
|
-
// Prioriza os itens do model, mas mantém compatibilidade com initialList
|
|
11325
|
-
const itemsToUse = this.items().length > 0 ? this.items() : this.initialList();
|
|
11326
|
-
if (itemsToUse?.length) {
|
|
11327
|
-
this.itemsList.set([...itemsToUse]);
|
|
11328
|
-
}
|
|
11329
|
-
// Se não havia itens no model mas havia initialList, sincroniza o model
|
|
11330
|
-
if (this.items().length === 0 && this.initialList().length > 0) {
|
|
11331
|
-
this.items.set([...this.initialList()]);
|
|
11332
|
-
}
|
|
11333
|
-
// Escuta mudanças no model e atualiza a lista interna
|
|
11334
|
-
this.items.subscribe((newItems) => {
|
|
11335
|
-
// Só atualiza se realmente mudou para evitar loops
|
|
11336
|
-
const currentItems = this.itemsList();
|
|
11337
|
-
if (JSON.stringify(currentItems) !== JSON.stringify(newItems)) {
|
|
11338
|
-
this.itemsList.set([...newItems]);
|
|
11339
|
-
}
|
|
11340
|
-
});
|
|
11341
|
-
setTimeout(() => {
|
|
11342
|
-
if (this.initialValue() !== '') {
|
|
11343
|
-
this.autoFocus = true;
|
|
11344
|
-
this.multiInputForm?.get('multiInput')?.setValue(this.initialValue());
|
|
11345
|
-
}
|
|
11346
|
-
});
|
|
11347
|
-
}
|
|
11348
|
-
ngAfterViewInit() {
|
|
11349
|
-
setTimeout(() => {
|
|
11350
|
-
if (this.autoFocus) {
|
|
11351
|
-
this.multiInputRef?.nativeElement?.focus();
|
|
11352
|
-
}
|
|
11353
|
-
}, 0);
|
|
11354
|
-
}
|
|
11355
|
-
isEllipsed(text) {
|
|
11356
|
-
return isTextEllipsed(text);
|
|
11357
|
-
}
|
|
11358
|
-
addItem() {
|
|
11359
|
-
const newItem = this.multiInputForm?.get('multiInput').value;
|
|
11360
|
-
this.itemsList.update((currentItems) => {
|
|
11361
|
-
const updatedItems = currentItems.includes(newItem)
|
|
11362
|
-
? currentItems
|
|
11363
|
-
: [...currentItems, newItem];
|
|
11364
|
-
// Atualiza o model com two-way binding
|
|
11365
|
-
this.items.set([...updatedItems]);
|
|
11366
|
-
this.onChangeList.emit(updatedItems);
|
|
11367
|
-
return updatedItems;
|
|
11368
|
-
});
|
|
11369
|
-
this.multiInputForm?.reset();
|
|
11370
|
-
}
|
|
11371
|
-
removeItem(index) {
|
|
11372
|
-
this.itemsList.update((currentItems) => {
|
|
11373
|
-
const newItems = [...currentItems];
|
|
11374
|
-
newItems.splice(index, 1);
|
|
11375
|
-
// Atualiza o model com two-way binding
|
|
11376
|
-
this.items.set([...newItems]);
|
|
11377
|
-
this.onChangeList.emit(newItems);
|
|
11378
|
-
return newItems;
|
|
11379
|
-
});
|
|
11380
|
-
}
|
|
11381
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevMultiInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11382
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
11383
|
-
}
|
|
11384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevMultiInputComponent, decorators: [{
|
|
11385
|
-
type: Component,
|
|
11386
|
-
args: [{ selector: 'tc-rev-multi-input', imports: [
|
|
11387
|
-
CommonModule,
|
|
11388
|
-
ReactiveFormsModule,
|
|
11389
|
-
TcRevTooltipDirective
|
|
11390
|
-
], 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"] }]
|
|
11391
|
-
}], ctorParameters: () => [], propDecorators: { autoFocus: [{
|
|
11392
|
-
type: Input
|
|
11393
|
-
}], multiInputRef: [{
|
|
11394
|
-
type: ViewChild,
|
|
11395
|
-
args: ['multiInputRef ']
|
|
11396
|
-
}] } });
|
|
11397
|
-
|
|
11398
|
-
class TcRevPaginationComponent {
|
|
11399
|
-
constructor() {
|
|
11400
|
-
this.currentPage = 1;
|
|
11401
|
-
this.totalPages = 1;
|
|
11402
|
-
this.pageChange = new EventEmitter();
|
|
11403
|
-
this.pageInputError = false;
|
|
11404
|
-
}
|
|
11405
|
-
previous() {
|
|
11406
|
-
if (this.currentPage > 1) {
|
|
11407
|
-
this.currentPage--;
|
|
11408
|
-
this.pageChange.emit(this.currentPage);
|
|
11409
|
-
}
|
|
11410
|
-
}
|
|
11411
|
-
next() {
|
|
11412
|
-
if (this.currentPage < this.totalPages) {
|
|
11413
|
-
this.currentPage++;
|
|
11414
|
-
this.pageChange.emit(this.currentPage);
|
|
11415
|
-
}
|
|
11416
|
-
}
|
|
11417
|
-
goToPage(event) {
|
|
11418
|
-
const input = event.target;
|
|
11419
|
-
const value = input.value;
|
|
11420
|
-
let pageNumber = parseInt(value.replace(/^0+/, ''), 10);
|
|
11421
|
-
if (isNaN(pageNumber) || pageNumber < 1 || pageNumber > this.totalPages) {
|
|
11422
|
-
this.pageInputError = true;
|
|
11423
|
-
if (isNaN(pageNumber) || pageNumber < 1) {
|
|
11424
|
-
pageNumber = 1;
|
|
11425
|
-
}
|
|
11426
|
-
else if (pageNumber > this.totalPages) {
|
|
11427
|
-
pageNumber = this.totalPages;
|
|
11428
|
-
}
|
|
11429
|
-
}
|
|
11430
|
-
else {
|
|
11431
|
-
this.pageInputError = false;
|
|
11432
|
-
}
|
|
11433
|
-
input.value = this.formatPage(pageNumber);
|
|
11434
|
-
if (pageNumber !== this.currentPage) {
|
|
11435
|
-
this.currentPage = pageNumber;
|
|
11436
|
-
this.pageChange.emit(this.currentPage);
|
|
11437
|
-
}
|
|
11438
|
-
}
|
|
11439
|
-
formatPage(page) {
|
|
11440
|
-
return page < 10 ? `0${page}` : `${page}`;
|
|
11441
|
-
}
|
|
11442
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11443
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", 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 }); }
|
|
11444
|
-
}
|
|
11445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevPaginationComponent, decorators: [{
|
|
11446
|
-
type: Component,
|
|
11447
|
-
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"] }]
|
|
11448
|
-
}], propDecorators: { currentPage: [{
|
|
11449
|
-
type: Input
|
|
11450
|
-
}], totalPages: [{
|
|
11451
|
-
type: Input
|
|
11452
|
-
}], pageChange: [{
|
|
11453
|
-
type: Output
|
|
11454
|
-
}] } });
|
|
11455
|
-
|
|
11456
|
-
var ProgressStatusBarGradientStatus;
|
|
11457
|
-
(function (ProgressStatusBarGradientStatus) {
|
|
11458
|
-
ProgressStatusBarGradientStatus["info"] = "info";
|
|
11459
|
-
ProgressStatusBarGradientStatus["danger"] = "danger";
|
|
11460
|
-
ProgressStatusBarGradientStatus["success"] = "success";
|
|
11461
|
-
ProgressStatusBarGradientStatus["alert"] = "alert";
|
|
11462
|
-
})(ProgressStatusBarGradientStatus || (ProgressStatusBarGradientStatus = {}));
|
|
11463
|
-
var ProgressStatusBarRangeColor;
|
|
11464
|
-
(function (ProgressStatusBarRangeColor) {
|
|
11465
|
-
ProgressStatusBarRangeColor["dangerStart"] = "#F48E85";
|
|
11466
|
-
ProgressStatusBarRangeColor["dangerEnd"] = "#DC3545";
|
|
11467
|
-
ProgressStatusBarRangeColor["alertStart"] = "#FECD6E";
|
|
11468
|
-
ProgressStatusBarRangeColor["alertEnd"] = "#FEAC0E";
|
|
11469
|
-
ProgressStatusBarRangeColor["infoStart"] = "#6BC1F2";
|
|
11470
|
-
ProgressStatusBarRangeColor["infoEnd"] = "#0897E9";
|
|
11471
|
-
ProgressStatusBarRangeColor["successStart"] = "#A3E78C";
|
|
11472
|
-
ProgressStatusBarRangeColor["successEnd"] = "#47B13D";
|
|
11473
|
-
})(ProgressStatusBarRangeColor || (ProgressStatusBarRangeColor = {}));
|
|
11474
|
-
class TcRevProgressStatusBarComponent {
|
|
11475
|
-
constructor() {
|
|
11476
|
-
this.currentValue = input.required();
|
|
11477
|
-
this.progressStatusConfig = input.required();
|
|
11478
|
-
this.backgroundStyle = '';
|
|
11479
|
-
effect(() => {
|
|
11480
|
-
this.backgroundStyle = this.getBackgroundStyle();
|
|
11481
|
-
});
|
|
11482
|
-
}
|
|
11483
|
-
getBackgroundStyle() {
|
|
11484
|
-
if (!this.currentValue())
|
|
11485
|
-
return '';
|
|
11486
|
-
let currentStatusConfig = this.progressStatusConfig().find((x) => (this.currentValue() >= x.start && this.currentValue() <= x.end));
|
|
11487
|
-
const lastStatusConfig = this.progressStatusConfig()[this.progressStatusConfig()?.length - 1];
|
|
11488
|
-
if (!currentStatusConfig && this.currentValue() < lastStatusConfig.end)
|
|
11489
|
-
return '';
|
|
11490
|
-
if (!currentStatusConfig && this.currentValue() > lastStatusConfig.end) {
|
|
11491
|
-
currentStatusConfig = { start: 0, end: 100, gradientStatus: lastStatusConfig.gradientStatus };
|
|
11492
|
-
}
|
|
11493
|
-
const startStatus = this.getProgressStatusBarRangeColor(currentStatusConfig.gradientStatus, 'start');
|
|
11494
|
-
const endStatus = this.getProgressStatusBarRangeColor(currentStatusConfig.gradientStatus, 'end');
|
|
11495
|
-
let style = `width:${this.currentValue()}%;backgroundImage:linear-gradient(90deg`;
|
|
11496
|
-
style += `,${startStatus} 0%,${endStatus} 100%);`;
|
|
11497
|
-
return style;
|
|
11498
|
-
}
|
|
11499
|
-
getProgressStatusBarRangeColor(_gradientStatus, position) {
|
|
11500
|
-
switch (_gradientStatus) {
|
|
11501
|
-
case ProgressStatusBarGradientStatus.alert:
|
|
11502
|
-
return position === 'start' ? ProgressStatusBarRangeColor.alertStart : ProgressStatusBarRangeColor.alertEnd;
|
|
11503
|
-
case ProgressStatusBarGradientStatus.danger:
|
|
11504
|
-
return position === 'start' ? ProgressStatusBarRangeColor.dangerStart : ProgressStatusBarRangeColor.dangerEnd;
|
|
11505
|
-
case ProgressStatusBarGradientStatus.success:
|
|
11506
|
-
return position === 'start' ? ProgressStatusBarRangeColor.successStart : ProgressStatusBarRangeColor.successEnd;
|
|
11507
|
-
default:
|
|
11508
|
-
return position === 'start' ? ProgressStatusBarRangeColor.infoStart : ProgressStatusBarRangeColor.infoEnd;
|
|
11509
|
-
}
|
|
11510
|
-
}
|
|
11511
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevProgressStatusBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11512
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", 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"] }); }
|
|
11513
|
-
}
|
|
11514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevProgressStatusBarComponent, decorators: [{
|
|
11515
|
-
type: Component,
|
|
11516
|
-
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"] }]
|
|
11517
|
-
}], ctorParameters: () => [] });
|
|
11518
|
-
|
|
11519
|
-
class TcRevRadioDirective {
|
|
11520
|
-
constructor() { }
|
|
11521
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevRadioDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11522
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TcRevRadioDirective, isStandalone: true, selector: "input[type=\"radio\"][tcRevRadio]", host: { classAttribute: "tc-rev-radio" }, ngImport: i0 }); }
|
|
11523
|
-
}
|
|
11524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevRadioDirective, decorators: [{
|
|
11525
|
-
type: Directive,
|
|
11526
|
-
args: [{
|
|
11527
|
-
selector: 'input[type="radio"][tcRevRadio]',
|
|
11528
|
-
host: {
|
|
11529
|
-
class: 'tc-rev-radio'
|
|
11530
|
-
}
|
|
11531
|
-
}]
|
|
11532
|
-
}], ctorParameters: () => [] });
|
|
11533
|
-
|
|
11534
|
-
class TcRevSideDrawerComponent {
|
|
11535
|
-
constructor(document, el, renderer) {
|
|
11536
|
-
this.document = document;
|
|
11537
|
-
this.el = el;
|
|
11538
|
-
this.renderer = renderer;
|
|
11539
|
-
this.loading = input(false);
|
|
11540
|
-
this.position = input('right');
|
|
11541
|
-
this.title = input.required();
|
|
11542
|
-
this.xAxis = computed(() => this.position() === 'left' ? `left: 0` : `right: 0`);
|
|
11543
|
-
this.onCloseDrawer = output();
|
|
11544
|
-
this.isOpen = false;
|
|
11545
|
-
this._deviceService = inject(TCloudUiDeviceUtilsService);
|
|
11546
|
-
this.isDesktop = this._deviceService.isDesktop;
|
|
11547
|
-
this.isMobile = this._deviceService.isMobile;
|
|
11548
|
-
}
|
|
11549
|
-
ngOnInit() {
|
|
11550
|
-
this.document.body.style.overflowY = 'hidden';
|
|
11551
|
-
this.isOpen = true;
|
|
11552
|
-
// --- mover o host do componente para o <body> apenas em mobile ---
|
|
11553
|
-
if (this.el &&
|
|
11554
|
-
this.el.nativeElement &&
|
|
11555
|
-
this.el.nativeElement.parentNode !== this.document.body &&
|
|
11556
|
-
this.isMobile()) {
|
|
11557
|
-
this.renderer.appendChild(this.document.body, this.el.nativeElement);
|
|
11558
|
-
}
|
|
11559
|
-
}
|
|
11560
|
-
ngOnDestroy() {
|
|
11561
|
-
this.document.body.style.overflowY = '';
|
|
11562
|
-
// remover o host do body ao destruir apenas em mobile
|
|
11563
|
-
if (this.el &&
|
|
11564
|
-
this.el.nativeElement &&
|
|
11565
|
-
this.el.nativeElement.parentNode === this.document.body &&
|
|
11566
|
-
this.isMobile()) {
|
|
11567
|
-
this.renderer.removeChild(this.document.body, this.el.nativeElement);
|
|
11568
|
-
}
|
|
11569
|
-
}
|
|
11570
|
-
handleClickOverlay() {
|
|
11571
|
-
if (this.loading()) {
|
|
11572
|
-
return;
|
|
11573
|
-
}
|
|
11574
|
-
this.isOpen = false;
|
|
11575
|
-
setTimeout(() => this.onCloseDrawer.emit(), 250);
|
|
11576
|
-
}
|
|
11577
|
-
handleClickContent(_ev) {
|
|
11578
|
-
_ev.stopPropagation();
|
|
11579
|
-
}
|
|
11580
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSideDrawerComponent, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11581
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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: [
|
|
11582
|
-
trigger('drawerAnimation', [
|
|
11583
|
-
transition('void => desktop', [
|
|
11584
|
-
style({ transform: 'translateX(100%)', opacity: 0 }),
|
|
11585
|
-
animate('250ms', style({ transform: 'translateX(0)', opacity: 1 })),
|
|
11586
|
-
]),
|
|
11587
|
-
transition('desktop => void', [
|
|
11588
|
-
style({ transform: 'translateX(0)', opacity: 1 }),
|
|
11589
|
-
animate('250ms', style({ transform: 'translateX(100%)', opacity: 0 })),
|
|
11590
|
-
]),
|
|
11591
|
-
transition('void => mobile', [
|
|
11592
|
-
style({ opacity: 0 }),
|
|
11593
|
-
animate('200ms ease', style({ opacity: 1 })),
|
|
11594
|
-
]),
|
|
11595
|
-
transition('mobile => void', [
|
|
11596
|
-
style({ opacity: 1 }),
|
|
11597
|
-
animate('200ms ease', style({ opacity: 0 })),
|
|
11598
|
-
]),
|
|
11599
|
-
]),
|
|
11600
|
-
trigger('backdropAnimation', [
|
|
11601
|
-
transition(':enter', [
|
|
11602
|
-
style({ opacity: 0 }),
|
|
11603
|
-
animate('100ms', style({ opacity: 1 })),
|
|
11604
|
-
]),
|
|
11605
|
-
transition(':leave', [
|
|
11606
|
-
style({ opacity: 1 }),
|
|
11607
|
-
animate('250ms', style({ opacity: 0 })),
|
|
11608
|
-
]),
|
|
11609
|
-
]),
|
|
11610
|
-
] }); }
|
|
11611
|
-
}
|
|
11612
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSideDrawerComponent, decorators: [{
|
|
11613
|
-
type: Component,
|
|
11614
|
-
args: [{ selector: 'tc-rev-side-drawer', imports: [CommonModule, TcRevIconButtonDirective], animations: [
|
|
11615
|
-
trigger('drawerAnimation', [
|
|
11616
|
-
transition('void => desktop', [
|
|
11617
|
-
style({ transform: 'translateX(100%)', opacity: 0 }),
|
|
11618
|
-
animate('250ms', style({ transform: 'translateX(0)', opacity: 1 })),
|
|
11619
|
-
]),
|
|
11620
|
-
transition('desktop => void', [
|
|
11621
|
-
style({ transform: 'translateX(0)', opacity: 1 }),
|
|
11622
|
-
animate('250ms', style({ transform: 'translateX(100%)', opacity: 0 })),
|
|
11623
|
-
]),
|
|
11624
|
-
transition('void => mobile', [
|
|
11625
|
-
style({ opacity: 0 }),
|
|
11626
|
-
animate('200ms ease', style({ opacity: 1 })),
|
|
11627
|
-
]),
|
|
11628
|
-
transition('mobile => void', [
|
|
11629
|
-
style({ opacity: 1 }),
|
|
11630
|
-
animate('200ms ease', style({ opacity: 0 })),
|
|
11631
|
-
]),
|
|
11632
|
-
]),
|
|
11633
|
-
trigger('backdropAnimation', [
|
|
11634
|
-
transition(':enter', [
|
|
11635
|
-
style({ opacity: 0 }),
|
|
11636
|
-
animate('100ms', style({ opacity: 1 })),
|
|
11637
|
-
]),
|
|
11638
|
-
transition(':leave', [
|
|
11639
|
-
style({ opacity: 1 }),
|
|
11640
|
-
animate('250ms', style({ opacity: 0 })),
|
|
11641
|
-
]),
|
|
11642
|
-
]),
|
|
11643
|
-
], 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"] }]
|
|
11644
|
-
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
11645
|
-
type: Inject,
|
|
11646
|
-
args: [DOCUMENT]
|
|
11647
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
11648
|
-
|
|
11649
|
-
class TcRevSkeletonLoadingComponent {
|
|
11650
|
-
constructor() {
|
|
11651
|
-
/** Params of the loading skeleton accepts string with CSS units (px, rem, em) */
|
|
11652
|
-
this.width = input('10rem');
|
|
11653
|
-
this.height = input('1.25rem');
|
|
11654
|
-
this.borderRadius = input('0.3rem');
|
|
11655
|
-
this.style = new TcRevSkeletonLoadingComponentStyle();
|
|
11656
|
-
}
|
|
11657
|
-
ngOnInit() {
|
|
11658
|
-
this.style.width = this.width();
|
|
11659
|
-
this.style.height = this.height();
|
|
11660
|
-
this.style.borderRadius = this.borderRadius();
|
|
11661
|
-
}
|
|
11662
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSkeletonLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11663
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", 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"] }] }); }
|
|
11664
|
-
}
|
|
11665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSkeletonLoadingComponent, decorators: [{
|
|
11666
|
-
type: Component,
|
|
11667
|
-
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"] }]
|
|
11668
|
-
}] });
|
|
11669
|
-
class TcRevSkeletonLoadingComponentStyle {
|
|
11670
|
-
}
|
|
11671
|
-
|
|
11672
|
-
class TcRevSlideToggleDirective {
|
|
11673
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSlideToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11674
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TcRevSlideToggleDirective, isStandalone: true, selector: "input[type=\"checkbox\"][tcRevSlideToggle]", host: { classAttribute: "tc-rev-slide-toggle" }, ngImport: i0 }); }
|
|
11675
|
-
}
|
|
11676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSlideToggleDirective, decorators: [{
|
|
11677
|
-
type: Directive,
|
|
11678
|
-
args: [{
|
|
11679
|
-
selector: 'input[type="checkbox"][tcRevSlideToggle]',
|
|
11680
|
-
host: {
|
|
11681
|
-
class: 'tc-rev-slide-toggle'
|
|
11682
|
-
}
|
|
11683
|
-
}]
|
|
11684
|
-
}] });
|
|
11685
|
-
|
|
11686
|
-
class TcRevTabGroupComponent {
|
|
11687
|
-
constructor() {
|
|
11688
|
-
this.isCarouselOverflowed = false;
|
|
11689
|
-
}
|
|
11690
|
-
onResize() {
|
|
11691
|
-
this.checkCarouselOverflow();
|
|
11692
|
-
}
|
|
11693
|
-
ngOnInit() {
|
|
11694
|
-
this.checkCarouselOverflow();
|
|
11695
|
-
}
|
|
11696
|
-
checkCarouselOverflow() {
|
|
11697
|
-
setTimeout(() => {
|
|
11698
|
-
const el = this.tabGroupCarousel?.nativeElement;
|
|
11699
|
-
this.isCarouselOverflowed = !!el && el.scrollWidth > el.clientWidth;
|
|
11700
|
-
});
|
|
11701
|
-
}
|
|
11702
|
-
scrollTabsCarousel(direction) {
|
|
11703
|
-
const el = this.tabGroupCarousel?.nativeElement;
|
|
11704
|
-
if (!el)
|
|
11705
|
-
return;
|
|
11706
|
-
const scrollAmount = 200;
|
|
11707
|
-
if (direction === 'left') {
|
|
11708
|
-
el.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
|
|
11709
|
-
}
|
|
11710
|
-
else {
|
|
11711
|
-
el.scrollBy({ left: scrollAmount, behavior: 'smooth' });
|
|
11712
|
-
}
|
|
11713
|
-
}
|
|
11714
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevTabGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11715
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", 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"] }] }); }
|
|
11716
|
-
}
|
|
11717
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevTabGroupComponent, decorators: [{
|
|
11718
|
-
type: Component,
|
|
11719
|
-
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"] }]
|
|
11720
|
-
}], propDecorators: { onResize: [{
|
|
11721
|
-
type: HostListener,
|
|
11722
|
-
args: ['window:resize']
|
|
11723
|
-
}], tabGroupCarousel: [{
|
|
11724
|
-
type: ViewChild,
|
|
11725
|
-
args: ['tabGroupCarousel']
|
|
11726
|
-
}] } });
|
|
11727
|
-
|
|
11728
|
-
class TcRevTabItemComponent {
|
|
11729
|
-
constructor() {
|
|
11730
|
-
this.onClick = output();
|
|
11731
|
-
this.active = input(false);
|
|
11732
|
-
this.url = input('');
|
|
11733
|
-
this.disabled = input(false);
|
|
11734
|
-
this.fullWidth = input(false);
|
|
11735
|
-
}
|
|
11736
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevTabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11737
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", 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"] }] }); }
|
|
11738
|
-
}
|
|
11739
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevTabItemComponent, decorators: [{
|
|
11740
|
-
type: Component,
|
|
11741
|
-
args: [{ selector: 'tc-rev-tab-item', imports: [
|
|
11742
|
-
CommonModule,
|
|
11743
|
-
RouterModule
|
|
11744
|
-
], 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"] }]
|
|
11745
|
-
}] });
|
|
11746
|
-
|
|
11747
|
-
var TagColorsEnum;
|
|
11748
|
-
(function (TagColorsEnum) {
|
|
11749
|
-
TagColorsEnum["neutral-50"] = "neutral-50";
|
|
11750
|
-
TagColorsEnum["neutral-100"] = "neutral-100";
|
|
11751
|
-
TagColorsEnum["neutral-200"] = "neutral-200";
|
|
11752
|
-
TagColorsEnum["neutral-300"] = "neutral-300";
|
|
11753
|
-
TagColorsEnum["neutral-400"] = "neutral-400";
|
|
11754
|
-
TagColorsEnum["neutral-500"] = "neutral-500";
|
|
11755
|
-
TagColorsEnum["neutral-600"] = "neutral-600";
|
|
11756
|
-
TagColorsEnum["neutral-700"] = "neutral-700";
|
|
11757
|
-
TagColorsEnum["neutral-800"] = "neutral-800";
|
|
11758
|
-
TagColorsEnum["neutral-900"] = "neutral-900";
|
|
11759
|
-
// Primary
|
|
11760
|
-
TagColorsEnum["primary-300"] = "primary-300";
|
|
11761
|
-
TagColorsEnum["primary-400"] = "primary-400";
|
|
11762
|
-
TagColorsEnum["primary-500"] = "primary-500";
|
|
11763
|
-
TagColorsEnum["primary-600"] = "primary-600";
|
|
11764
|
-
TagColorsEnum["primary-700"] = "primary-700";
|
|
11765
|
-
// Danger
|
|
11766
|
-
TagColorsEnum["danger-300"] = "danger-300";
|
|
11767
|
-
TagColorsEnum["danger-400"] = "danger-400";
|
|
11768
|
-
TagColorsEnum["danger-500"] = "danger-500";
|
|
11769
|
-
// Alert
|
|
11770
|
-
TagColorsEnum["alert-300"] = "alert-300";
|
|
11771
|
-
TagColorsEnum["alert-400"] = "alert-400";
|
|
11772
|
-
TagColorsEnum["alert-500"] = "alert-500";
|
|
11773
|
-
// Info
|
|
11774
|
-
TagColorsEnum["info-300"] = "info-300";
|
|
11775
|
-
TagColorsEnum["info-400"] = "info-400";
|
|
11776
|
-
TagColorsEnum["info-500"] = "info-500";
|
|
11777
|
-
// Success
|
|
11778
|
-
TagColorsEnum["success-300"] = "success-300";
|
|
11779
|
-
TagColorsEnum["success-400"] = "success-400";
|
|
11780
|
-
TagColorsEnum["success-500"] = "success-500";
|
|
11781
|
-
})(TagColorsEnum || (TagColorsEnum = {}));
|
|
11782
|
-
|
|
11783
|
-
class TcRevTagComponent {
|
|
11784
|
-
constructor() {
|
|
11785
|
-
this.size = input('md');
|
|
11786
|
-
this.color = input(TagColorsEnum['primary-500']);
|
|
11787
|
-
this.variant = input('filled');
|
|
11788
|
-
this.shape = input('rectangle');
|
|
11789
|
-
this.fullWidth = input(false);
|
|
11790
|
-
}
|
|
11791
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11792
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", 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 }] }); }
|
|
11793
|
-
}
|
|
11794
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevTagComponent, decorators: [{
|
|
11795
|
-
type: Component,
|
|
11796
|
-
args: [{ selector: 'tc-rev-tag', imports: [
|
|
11797
|
-
CommonModule
|
|
11798
|
-
], 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"] }]
|
|
11799
|
-
}] });
|
|
11800
|
-
|
|
11801
|
-
class TcRevToastComponent {
|
|
11802
|
-
constructor() {
|
|
11803
|
-
this.type = input('info');
|
|
11804
|
-
this.fullWidth = input(false);
|
|
11805
|
-
this.size = input('md');
|
|
11806
|
-
}
|
|
11807
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11808
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", 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"] }] }); }
|
|
11809
|
-
}
|
|
11810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevToastComponent, decorators: [{
|
|
11811
|
-
type: Component,
|
|
11812
|
-
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"] }]
|
|
11813
|
-
}] });
|
|
11814
|
-
|
|
11815
|
-
class TcRevSubNavbarItemComponent {
|
|
11816
|
-
constructor() {
|
|
11817
|
-
this.label = input.required();
|
|
11818
|
-
this.onClick = output();
|
|
11819
|
-
this.active = input(false);
|
|
11820
|
-
this.routerLink = input(null);
|
|
11821
|
-
this.queryParams = input(null);
|
|
11822
|
-
}
|
|
11823
|
-
handleClick(_ev) {
|
|
11824
|
-
this.onClick.emit(_ev);
|
|
11825
|
-
}
|
|
11826
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSubNavbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11827
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
11828
|
-
}
|
|
11829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSubNavbarItemComponent, decorators: [{
|
|
11830
|
-
type: Component,
|
|
11831
|
-
args: [{ selector: 'tc-rev-sub-navbar-item', imports: [
|
|
11832
|
-
CommonModule,
|
|
11833
|
-
RouterModule,
|
|
11834
|
-
], 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"] }]
|
|
11835
|
-
}], propDecorators: { isMenuExpanded: [{
|
|
11836
|
-
type: Input
|
|
11837
|
-
}] } });
|
|
11838
|
-
|
|
11839
|
-
class TcRevSubNavbarComponent {
|
|
11840
|
-
constructor() {
|
|
11841
|
-
this.isMenuExpanded = signal(true);
|
|
11842
|
-
this.onSubMenuExpandChange = output();
|
|
11843
|
-
}
|
|
11844
|
-
ngAfterContentInit() {
|
|
11845
|
-
setTimeout(() => this.setExpandedMenuValueToChildrend(), 0);
|
|
11846
|
-
}
|
|
11847
|
-
handleExpandMenu() {
|
|
11848
|
-
this.isMenuExpanded.update((value) => !value);
|
|
11849
|
-
this.setExpandedMenuValueToChildrend();
|
|
11850
|
-
}
|
|
11851
|
-
setExpandedMenuValueToChildrend() {
|
|
11852
|
-
if (!this.subNavbarItems?.length)
|
|
11853
|
-
return;
|
|
11854
|
-
this.subNavbarItems.forEach((x) => {
|
|
11855
|
-
x.isMenuExpanded = this.isMenuExpanded();
|
|
11856
|
-
});
|
|
11857
|
-
this.onSubMenuExpandChange.emit(this.isMenuExpanded());
|
|
11858
|
-
}
|
|
11859
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSubNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11860
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", 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"] }] }); }
|
|
11861
|
-
}
|
|
11862
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevSubNavbarComponent, decorators: [{
|
|
11863
|
-
type: Component,
|
|
11864
|
-
args: [{ selector: 'tc-rev-sub-navbar', imports: [
|
|
11865
|
-
CommonModule,
|
|
11866
|
-
TcRevSubNavbarItemComponent,
|
|
11867
|
-
], 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"] }]
|
|
11868
|
-
}], propDecorators: { subNavbarItems: [{
|
|
11869
|
-
type: ContentChildren,
|
|
11870
|
-
args: [TcRevSubNavbarItemComponent]
|
|
11871
|
-
}] } });
|
|
11872
|
-
|
|
11873
|
-
class TcRevWizardStepsComponent {
|
|
11874
|
-
constructor() {
|
|
11875
|
-
this.onStepClick = output();
|
|
11876
|
-
this.direction = input('horizontal');
|
|
11877
|
-
this.currentStep = input(0);
|
|
11878
|
-
this.stepClickable = input(false);
|
|
11879
|
-
this.steps = input.required();
|
|
11880
|
-
}
|
|
11881
|
-
handleStepClick(step, isNext, index) {
|
|
11882
|
-
if (this.stepClickable() && !isNext) {
|
|
11883
|
-
this.onStepClick.emit({ step, index });
|
|
11884
|
-
}
|
|
11885
|
-
}
|
|
11886
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevWizardStepsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11887
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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: [
|
|
11888
|
-
trigger('progressBarEntering', [
|
|
11889
|
-
state('in', style({ width: '*' })),
|
|
11890
|
-
transition('void => *', [
|
|
11891
|
-
style({ width: 0 }),
|
|
11892
|
-
animate('1.5s 0s ease')
|
|
10158
|
+
/**
|
|
10159
|
+
*
|
|
10160
|
+
* @param echarts echars instance
|
|
10161
|
+
* @param chartData chart info to build the config
|
|
10162
|
+
* @returns a bar chart config for echarts with the given data
|
|
10163
|
+
*/
|
|
10164
|
+
function echartBarConfig(echarts, chartData) {
|
|
10165
|
+
const { xAxisName, xAxisLabels, seriesData, tooltipFormatter, yAxisLabelFormatter, xAxisLabelFormatter } = chartData;
|
|
10166
|
+
return {
|
|
10167
|
+
grid: {
|
|
10168
|
+
left: '6.5%',
|
|
10169
|
+
top: 48,
|
|
10170
|
+
right: '2%',
|
|
10171
|
+
bottom: 56
|
|
10172
|
+
},
|
|
10173
|
+
tooltip: {
|
|
10174
|
+
trigger: 'axis',
|
|
10175
|
+
backgroundColor: '#131313',
|
|
10176
|
+
formatter: tooltipFormatter,
|
|
10177
|
+
textStyle: {
|
|
10178
|
+
color: '#f3f3f3',
|
|
10179
|
+
fontSize: 12,
|
|
10180
|
+
fontFamily: 'Nunito Sans'
|
|
10181
|
+
}
|
|
10182
|
+
},
|
|
10183
|
+
xAxis: {
|
|
10184
|
+
type: 'category',
|
|
10185
|
+
axisLabel: {
|
|
10186
|
+
color: '#131313',
|
|
10187
|
+
fontSize: 14,
|
|
10188
|
+
fontFamily: 'Nunito Sans',
|
|
10189
|
+
margin: 16,
|
|
10190
|
+
formatter: xAxisLabelFormatter,
|
|
10191
|
+
},
|
|
10192
|
+
axisLine: {
|
|
10193
|
+
show: true,
|
|
10194
|
+
lineStyle: {
|
|
10195
|
+
color: '#BAC0C6'
|
|
10196
|
+
}
|
|
10197
|
+
},
|
|
10198
|
+
axisTick: {
|
|
10199
|
+
show: false
|
|
10200
|
+
},
|
|
10201
|
+
data: xAxisLabels,
|
|
10202
|
+
name: xAxisName,
|
|
10203
|
+
nameLocation: 'start',
|
|
10204
|
+
nameTextStyle: {
|
|
10205
|
+
align: 'left',
|
|
10206
|
+
color: '#131313',
|
|
10207
|
+
fontFamily: 'Nunito Sans',
|
|
10208
|
+
fontSize: 14,
|
|
10209
|
+
fontWeight: 700,
|
|
10210
|
+
padding: [0, 0, -46, -36]
|
|
10211
|
+
}
|
|
10212
|
+
},
|
|
10213
|
+
yAxis: {
|
|
10214
|
+
type: 'value',
|
|
10215
|
+
axisLine: {
|
|
10216
|
+
show: false
|
|
10217
|
+
},
|
|
10218
|
+
axisTick: {
|
|
10219
|
+
show: false
|
|
10220
|
+
},
|
|
10221
|
+
axisLabel: {
|
|
10222
|
+
formatter: yAxisLabelFormatter,
|
|
10223
|
+
align: 'left',
|
|
10224
|
+
color: '#131313',
|
|
10225
|
+
fontSize: 14,
|
|
10226
|
+
fontFamily: 'Nunito Sans',
|
|
10227
|
+
inside: false,
|
|
10228
|
+
padding: [-40, 0, 0, -40]
|
|
10229
|
+
}
|
|
10230
|
+
},
|
|
10231
|
+
series: seriesData.map((serie) => ({
|
|
10232
|
+
name: serie.serieName,
|
|
10233
|
+
type: 'bar',
|
|
10234
|
+
data: serie.values,
|
|
10235
|
+
itemStyle: {
|
|
10236
|
+
barBorderRadius: [8, 8, 8, 8],
|
|
10237
|
+
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
10238
|
+
{ offset: 0, color: '#0897E9' },
|
|
10239
|
+
{ offset: 1, color: '#75D8FF' }
|
|
11893
10240
|
])
|
|
11894
|
-
])
|
|
11895
|
-
] }); }
|
|
11896
|
-
}
|
|
11897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevWizardStepsComponent, decorators: [{
|
|
11898
|
-
type: Component,
|
|
11899
|
-
args: [{ selector: 'tc-rev-wizard-steps', imports: [CommonModule], animations: [
|
|
11900
|
-
trigger('progressBarEntering', [
|
|
11901
|
-
state('in', style({ width: '*' })),
|
|
11902
|
-
transition('void => *', [
|
|
11903
|
-
style({ width: 0 }),
|
|
11904
|
-
animate('1.5s 0s ease')
|
|
11905
|
-
])
|
|
11906
|
-
])
|
|
11907
|
-
], 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"] }]
|
|
11908
|
-
}] });
|
|
11909
|
-
|
|
11910
|
-
class TcRevBreadcrumbService {
|
|
11911
|
-
constructor() {
|
|
11912
|
-
this.breadcrumbsSubject = new BehaviorSubject([]);
|
|
11913
|
-
this.breadcrumbs$ = this.breadcrumbsSubject.asObservable();
|
|
11914
|
-
}
|
|
11915
|
-
setBreadcrumb(items) {
|
|
11916
|
-
this.breadcrumbsSubject.next(items);
|
|
11917
|
-
}
|
|
11918
|
-
addLevel(item) {
|
|
11919
|
-
const currentItems = this.breadcrumbsSubject.getValue();
|
|
11920
|
-
this.breadcrumbsSubject.next([...currentItems, item]);
|
|
11921
|
-
}
|
|
11922
|
-
removeLastLevel() {
|
|
11923
|
-
const currentItems = this.breadcrumbsSubject.getValue();
|
|
11924
|
-
if (currentItems.length > 0) {
|
|
11925
|
-
const newItems = [...currentItems];
|
|
11926
|
-
newItems.pop();
|
|
11927
|
-
this.breadcrumbsSubject.next(newItems);
|
|
11928
|
-
}
|
|
11929
|
-
}
|
|
11930
|
-
clear() {
|
|
11931
|
-
this.breadcrumbsSubject.next([]);
|
|
11932
|
-
}
|
|
11933
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevBreadcrumbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11934
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevBreadcrumbService, providedIn: 'root' }); }
|
|
11935
|
-
}
|
|
11936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevBreadcrumbService, decorators: [{
|
|
11937
|
-
type: Injectable,
|
|
11938
|
-
args: [{
|
|
11939
|
-
providedIn: 'root',
|
|
11940
|
-
}]
|
|
11941
|
-
}], ctorParameters: () => [] });
|
|
11942
|
-
|
|
11943
|
-
class TcRevBreadcrumbComponent {
|
|
11944
|
-
constructor() {
|
|
11945
|
-
this.breadcrumbs = [];
|
|
11946
|
-
this.router = inject(Router);
|
|
11947
|
-
this.breadcrumbService = inject(TcRevBreadcrumbService);
|
|
11948
|
-
}
|
|
11949
|
-
ngOnInit() {
|
|
11950
|
-
this.breadcrumbService.breadcrumbs$.subscribe(items => this.breadcrumbs = items);
|
|
11951
|
-
}
|
|
11952
|
-
navigate(url, index) {
|
|
11953
|
-
if (url) {
|
|
11954
|
-
this.router.navigateByUrl(url);
|
|
11955
|
-
// Opcional: remover níveis do breadcrumb após o clicado
|
|
11956
|
-
if (index !== undefined && index < this.breadcrumbs.length - 1) {
|
|
11957
|
-
this.breadcrumbService.setBreadcrumb(this.breadcrumbs.slice(0, index + 1));
|
|
11958
10241
|
}
|
|
11959
|
-
}
|
|
11960
|
-
}
|
|
11961
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11962
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", 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"] }] }); }
|
|
10242
|
+
}))
|
|
10243
|
+
};
|
|
11963
10244
|
}
|
|
11964
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevBreadcrumbComponent, decorators: [{
|
|
11965
|
-
type: Component,
|
|
11966
|
-
args: [{ selector: 'tc-rev-breadcrumb', imports: [
|
|
11967
|
-
CommonModule,
|
|
11968
|
-
RouterModule
|
|
11969
|
-
], 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"] }]
|
|
11970
|
-
}], ctorParameters: () => [] });
|
|
11971
|
-
|
|
11972
|
-
class TcRevComponentsLibModule {
|
|
11973
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevComponentsLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
11974
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: TcRevComponentsLibModule, imports: [TcRevBreadcrumbComponent,
|
|
11975
|
-
TcRevButtonDirective,
|
|
11976
|
-
TcRevCalendarComponent,
|
|
11977
|
-
TcRevCardComponent,
|
|
11978
|
-
TcRevCardAccordionComponent,
|
|
11979
|
-
TcRevCardTitleComponent,
|
|
11980
|
-
TcRevCheckboxDirective,
|
|
11981
|
-
TcRevDropdownComponent,
|
|
11982
|
-
TcRevDropdownGroupedComponent,
|
|
11983
|
-
TcRevDropdownMultiComponent,
|
|
11984
|
-
TcRevDropdownMultiLevelComponent,
|
|
11985
|
-
TcRevEmptyContentComponent,
|
|
11986
|
-
TcRevFaqComponent,
|
|
11987
|
-
TcRevIconButtonDirective,
|
|
11988
|
-
TcRevInputContainerComponent,
|
|
11989
|
-
TcRevInputDirective,
|
|
11990
|
-
TcRevLoadingComponent,
|
|
11991
|
-
TcRevMessageComponent,
|
|
11992
|
-
TcRevMultiInputComponent,
|
|
11993
|
-
TcRevPaginationComponent,
|
|
11994
|
-
TcRevProgressStatusBarComponent,
|
|
11995
|
-
TcRevRadioDirective,
|
|
11996
|
-
TcRevSearchInputComponent,
|
|
11997
|
-
TcRevSideDrawerComponent,
|
|
11998
|
-
TcRevSkeletonLoadingComponent,
|
|
11999
|
-
TcRevSlideToggleDirective,
|
|
12000
|
-
TcRevSmallLoadingComponent,
|
|
12001
|
-
TcRevTabGroupComponent,
|
|
12002
|
-
TcRevTabItemComponent,
|
|
12003
|
-
TcRevTagComponent,
|
|
12004
|
-
TcRevToastComponent,
|
|
12005
|
-
TcRevTooltipDirective,
|
|
12006
|
-
TcRevSubNavbarComponent,
|
|
12007
|
-
TcRevSubNavbarItemComponent,
|
|
12008
|
-
TcRevWizardStepsComponent], exports: [
|
|
12009
|
-
// TcRevBreadcrumbComponent,
|
|
12010
|
-
TcRevButtonDirective,
|
|
12011
|
-
TcRevCalendarComponent,
|
|
12012
|
-
TcRevCardComponent,
|
|
12013
|
-
TcRevCardAccordionComponent,
|
|
12014
|
-
TcRevCardTitleComponent,
|
|
12015
|
-
TcRevCheckboxDirective,
|
|
12016
|
-
TcRevDropdownComponent,
|
|
12017
|
-
TcRevDropdownGroupedComponent,
|
|
12018
|
-
TcRevDropdownMultiComponent,
|
|
12019
|
-
TcRevDropdownMultiLevelComponent,
|
|
12020
|
-
TcRevEmptyContentComponent,
|
|
12021
|
-
TcRevFaqComponent,
|
|
12022
|
-
TcRevIconButtonDirective,
|
|
12023
|
-
TcRevInputContainerComponent,
|
|
12024
|
-
TcRevInputDirective,
|
|
12025
|
-
TcRevLoadingComponent,
|
|
12026
|
-
TcRevMessageComponent,
|
|
12027
|
-
TcRevMultiInputComponent,
|
|
12028
|
-
TcRevPaginationComponent,
|
|
12029
|
-
TcRevProgressStatusBarComponent,
|
|
12030
|
-
TcRevSmallLoadingComponent,
|
|
12031
|
-
TcRevRadioDirective,
|
|
12032
|
-
TcRevSearchInputComponent,
|
|
12033
|
-
TcRevSideDrawerComponent,
|
|
12034
|
-
TcRevSkeletonLoadingComponent,
|
|
12035
|
-
TcRevSlideToggleDirective,
|
|
12036
|
-
TcRevTabGroupComponent,
|
|
12037
|
-
TcRevTabItemComponent,
|
|
12038
|
-
TcRevTagComponent,
|
|
12039
|
-
TcRevToastComponent,
|
|
12040
|
-
TcRevTooltipDirective,
|
|
12041
|
-
TcRevSubNavbarComponent,
|
|
12042
|
-
TcRevSubNavbarItemComponent,
|
|
12043
|
-
TcRevWizardStepsComponent] }); }
|
|
12044
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevComponentsLibModule, imports: [TcRevBreadcrumbComponent,
|
|
12045
|
-
TcRevCalendarComponent,
|
|
12046
|
-
TcRevCardComponent,
|
|
12047
|
-
TcRevCardAccordionComponent,
|
|
12048
|
-
TcRevDropdownComponent,
|
|
12049
|
-
TcRevDropdownGroupedComponent,
|
|
12050
|
-
TcRevDropdownMultiComponent,
|
|
12051
|
-
TcRevDropdownMultiLevelComponent,
|
|
12052
|
-
TcRevFaqComponent,
|
|
12053
|
-
TcRevInputContainerComponent,
|
|
12054
|
-
TcRevMessageComponent,
|
|
12055
|
-
TcRevMultiInputComponent,
|
|
12056
|
-
TcRevPaginationComponent,
|
|
12057
|
-
TcRevSearchInputComponent,
|
|
12058
|
-
TcRevSideDrawerComponent,
|
|
12059
|
-
TcRevSkeletonLoadingComponent,
|
|
12060
|
-
TcRevSmallLoadingComponent,
|
|
12061
|
-
TcRevTabGroupComponent,
|
|
12062
|
-
TcRevTabItemComponent,
|
|
12063
|
-
TcRevTagComponent,
|
|
12064
|
-
TcRevToastComponent,
|
|
12065
|
-
TcRevSubNavbarComponent,
|
|
12066
|
-
TcRevSubNavbarItemComponent,
|
|
12067
|
-
TcRevWizardStepsComponent] }); }
|
|
12068
|
-
}
|
|
12069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TcRevComponentsLibModule, decorators: [{
|
|
12070
|
-
type: NgModule,
|
|
12071
|
-
args: [{
|
|
12072
|
-
imports: [
|
|
12073
|
-
TcRevBreadcrumbComponent,
|
|
12074
|
-
TcRevButtonDirective,
|
|
12075
|
-
TcRevCalendarComponent,
|
|
12076
|
-
TcRevCardComponent,
|
|
12077
|
-
TcRevCardAccordionComponent,
|
|
12078
|
-
TcRevCardTitleComponent,
|
|
12079
|
-
TcRevCheckboxDirective,
|
|
12080
|
-
TcRevDropdownComponent,
|
|
12081
|
-
TcRevDropdownGroupedComponent,
|
|
12082
|
-
TcRevDropdownMultiComponent,
|
|
12083
|
-
TcRevDropdownMultiLevelComponent,
|
|
12084
|
-
TcRevEmptyContentComponent,
|
|
12085
|
-
TcRevFaqComponent,
|
|
12086
|
-
TcRevIconButtonDirective,
|
|
12087
|
-
TcRevInputContainerComponent,
|
|
12088
|
-
TcRevInputDirective,
|
|
12089
|
-
TcRevLoadingComponent,
|
|
12090
|
-
TcRevMessageComponent,
|
|
12091
|
-
TcRevMultiInputComponent,
|
|
12092
|
-
TcRevPaginationComponent,
|
|
12093
|
-
TcRevProgressStatusBarComponent,
|
|
12094
|
-
TcRevRadioDirective,
|
|
12095
|
-
TcRevSearchInputComponent,
|
|
12096
|
-
TcRevSideDrawerComponent,
|
|
12097
|
-
TcRevSkeletonLoadingComponent,
|
|
12098
|
-
TcRevSlideToggleDirective,
|
|
12099
|
-
TcRevSmallLoadingComponent,
|
|
12100
|
-
TcRevTabGroupComponent,
|
|
12101
|
-
TcRevTabItemComponent,
|
|
12102
|
-
TcRevTagComponent,
|
|
12103
|
-
TcRevToastComponent,
|
|
12104
|
-
TcRevTooltipDirective,
|
|
12105
|
-
TcRevSubNavbarComponent,
|
|
12106
|
-
TcRevSubNavbarItemComponent,
|
|
12107
|
-
TcRevWizardStepsComponent,
|
|
12108
|
-
],
|
|
12109
|
-
exports: [
|
|
12110
|
-
// TcRevBreadcrumbComponent,
|
|
12111
|
-
TcRevButtonDirective,
|
|
12112
|
-
TcRevCalendarComponent,
|
|
12113
|
-
TcRevCardComponent,
|
|
12114
|
-
TcRevCardAccordionComponent,
|
|
12115
|
-
TcRevCardTitleComponent,
|
|
12116
|
-
TcRevCheckboxDirective,
|
|
12117
|
-
TcRevDropdownComponent,
|
|
12118
|
-
TcRevDropdownGroupedComponent,
|
|
12119
|
-
TcRevDropdownMultiComponent,
|
|
12120
|
-
TcRevDropdownMultiLevelComponent,
|
|
12121
|
-
TcRevEmptyContentComponent,
|
|
12122
|
-
TcRevFaqComponent,
|
|
12123
|
-
TcRevIconButtonDirective,
|
|
12124
|
-
TcRevInputContainerComponent,
|
|
12125
|
-
TcRevInputDirective,
|
|
12126
|
-
TcRevLoadingComponent,
|
|
12127
|
-
TcRevMessageComponent,
|
|
12128
|
-
TcRevMultiInputComponent,
|
|
12129
|
-
TcRevPaginationComponent,
|
|
12130
|
-
TcRevProgressStatusBarComponent,
|
|
12131
|
-
TcRevSmallLoadingComponent,
|
|
12132
|
-
TcRevRadioDirective,
|
|
12133
|
-
TcRevSearchInputComponent,
|
|
12134
|
-
TcRevSideDrawerComponent,
|
|
12135
|
-
TcRevSkeletonLoadingComponent,
|
|
12136
|
-
TcRevSlideToggleDirective,
|
|
12137
|
-
TcRevTabGroupComponent,
|
|
12138
|
-
TcRevTabItemComponent,
|
|
12139
|
-
TcRevTagComponent,
|
|
12140
|
-
TcRevToastComponent,
|
|
12141
|
-
TcRevTooltipDirective,
|
|
12142
|
-
TcRevSubNavbarComponent,
|
|
12143
|
-
TcRevSubNavbarItemComponent,
|
|
12144
|
-
TcRevWizardStepsComponent,
|
|
12145
|
-
],
|
|
12146
|
-
declarations: [],
|
|
12147
|
-
providers: [],
|
|
12148
|
-
}]
|
|
12149
|
-
}] });
|
|
12150
10245
|
|
|
12151
10246
|
/*
|
|
12152
10247
|
* Public API Surface of tcloud-ui
|
|
@@ -12156,5 +10251,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
12156
10251
|
* Generated bundle index. Do not edit.
|
|
12157
10252
|
*/
|
|
12158
10253
|
|
|
12159
|
-
export { AcceptedFileType, BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe,
|
|
10254
|
+
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, 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, 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, provideTCloudUi };
|
|
12160
10255
|
//# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map
|