@wizco/fenixds-ngx
Version:
Componentes fenix design system para Angular.
422 lines • 85.7 kB
JavaScript
import { Component, ContentChildren, EventEmitter, Input, Output, ViewEncapsulation, forwardRef, } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormControl, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, ReactiveFormsModule, } from '@angular/forms';
import { SmartSelectOptionComponent } from './smart-select-options.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export class SmartSelectComponent {
el;
options;
onChange = new EventEmitter();
/* Id do elemento */
inputId = 'select_' + Math.random().toString(36).substring(2);
/* Attr name do elemento */
inputName;
IconMaterial = 'arrow_drop_down';
/* Placeholder do select */
placeholder = 'Selecione uma opção';
/* Label do select */
label = ' ';
/* Força visualização do erro */
showError = false;
/* Mostrar campos de busca */
showSearch = false;
placeholderSearch = 'Buscar';
/* Texto exibido quando não há resultados */
textEmpty = 'Não há resultados para a busca';
/* habilitar opção de multiplas seleções */
multiSelect = false;
/* Limitar visualização de itens selecionados */
showMaxSelectedLabel = 0;
/* Tipos pré definidos de checkbox, radio ou null */
typePrefix = null;
/* Confirmação de o campo é obrigatório */
required = false;
limitView;
formControlName;
isMobile = window.innerWidth <= 768;
formValue;
isFocused = false;
preventEscapeFocus = false;
autocompleteControl = new FormControl();
filteredOptions = [];
showList = false;
constructor(el) {
this.el = el;
}
onTouched = () => {
this.isFocused = true;
};
/// estados do control
ngOnInit() { }
// Carrega os valores do formControl para o componente e renderiza as opções
writeValue(obj) {
if (this.autocompleteControl.value === this.formValue) {
return;
}
this.formValue = obj;
this.autocompleteControl.setValue(obj);
this.renderBoxOptions();
}
validate(_control) {
this.autocompleteControl = _control || new FormControl();
return _control.validator;
}
registerOnChange(fn) {
this.onChange.subscribe((event) => {
if (event.type === 'updateValue') {
fn(event.value);
}
});
}
registerOnTouched(fn) {
this.onTouched = fn;
}
get hasError() {
return this.showError
? this.showError
: this.autocompleteControl.invalid &&
this.autocompleteControl.touched &&
!this.showList;
}
setDisabledState(isDisabled) {
if (isDisabled) {
this.autocompleteControl.disable();
}
else {
this.autocompleteControl.enable();
}
}
/// Abertura e fechamento da lista
onFocusIn(focus = false) {
this.renderBoxOptions();
this.autocompleteControl.markAsTouched();
this.onTouched();
this.isFocused = focus;
this.showList = focus;
this.positionBox();
this.focusSearchElementor();
}
focusSearchElementor() {
if (this.showSearch) {
// Caso ele tenha a busca habilitada
setTimeout(() => {
const searchElement = this.el.nativeElement.querySelector('.wco-smartSelect--search');
if (searchElement) {
searchElement.focus();
}
}, 400);
}
}
/// here function to position box element top or bottom
positionBox() {
if (this.isMobile) {
return;
}
const componentBox = this.el.nativeElement;
if (!componentBox) {
return;
}
const componentBoxPosition = componentBox.getBoundingClientRect();
const inputId = componentBox.querySelector('.form-field');
const box = componentBox.querySelector('.wco-smartSelect--box');
const inputIdPosition = inputId.getBoundingClientRect().height;
const pageHeight = window.innerHeight;
if (box && componentBoxPosition.y + 320 >= pageHeight) {
box.style.bottom = inputIdPosition + 'px';
box.style.height = `var(--wco-smart-select-box-max-height)`;
box.style.top = 'initial';
}
else {
box.style.top = inputIdPosition + 'px';
box.style.bottom = 'initial';
box.style.height = `auto`;
}
}
onSelect(option) {
if (option.disabled || option.viewOnly) {
return;
}
const oldValue = Array.isArray(this.formValue)
? [...this.formValue]
: this.formValue;
if (this.multiSelect) {
if (typeof option.value === 'object') {
const list = this.compareMultiValuesArray(option);
const hasValueOption = list.some((item) => item.selected);
if (hasValueOption) {
this.formValue = list
.filter((item) => !item.selected)
.map((item) => item.item);
}
else {
this.formValue = [...(this.formValue || []), option.value];
}
}
else {
const index = this.formValue?.indexOf(option.value);
if (index !== undefined && index > -1) {
this.formValue?.splice(index, 1);
}
else {
this.formValue = [...(this.formValue || []), option.value];
}
}
this.autocompleteControl.setValue(this.formValue);
}
else {
this.formValue = option.value;
this.autocompleteControl.setValue(option.value);
this.showList = false;
}
if (oldValue !== this.formValue) {
this.onChange.emit({ type: 'updateValue', value: this.formValue });
}
this.renderBoxOptions();
}
// Show label span
get selectedLabel() {
const selectedOption = this.options?.find((option) => this.normalizeText(String(option.value)) ===
this.normalizeText(String(this.formValue)));
return selectedOption?.label || '';
}
// show label multi select
get selectedLabelMulti() {
const selectedOptions = this.options?.filter((option) => {
if (typeof option.value === 'object') {
return this.compareValueArray(option);
}
else {
return this.formValue?.includes(option.value);
}
});
if (!selectedOptions?.length) {
return [];
}
if (!this.showMaxSelectedLabel) {
return selectedOptions;
}
if (this.showMaxSelectedLabel &&
selectedOptions.length > this.showMaxSelectedLabel) {
return selectedOptions.slice(0, this.showMaxSelectedLabel);
}
return selectedOptions;
}
valueToArray(options) {
const keys = Object.keys(options);
const value = [];
keys.forEach((key) => {
if (options[key] &&
options[key] !== '' &&
typeof options[key] !== 'object' &&
typeof options[key] !== 'function' &&
typeof options[key] !== 'boolean') {
value.push(options[key]);
}
});
return value;
}
compareValueArray(option, value = this.formValue) {
if (option && option.value) {
const valuesItems = this.valueToArray(option.value);
return value.some((item) => {
const itemArray = this.valueToArray(item);
return itemArray.every((itemValue) => valuesItems.includes(itemValue));
});
}
return [];
}
compareMultiValuesArray(option, value = this.formValue) {
if (option && option.value) {
const valuesItems = this.valueToArray(option.value);
const formValueArray = value.map((item, index) => {
const itemArray = this.valueToArray(item);
return {
index,
item,
selected: itemArray.some((itemValue) => valuesItems.includes(itemValue)),
};
});
// Remove duplicate items
const uniqueFormValueArray = Array.from(new Set(formValueArray.map((item) => JSON.stringify(item)))).map((item) => JSON.parse(item));
return uniqueFormValueArray;
}
return [];
}
get selectedLabelMultiCount() {
const show = this.showMaxSelectedLabel || 0;
const selectedOptions = this.options?.filter((option) => this.formValue?.includes(option.value));
if (!selectedOptions?.length) {
return 0;
}
if (show > 0 && selectedOptions.length > show) {
return selectedOptions.length - show;
}
return 0;
}
removeItem(option) {
this.onSelect(option);
setTimeout(() => {
this.showList = false;
}, 100);
}
onKeyPress(event) {
event.preventDefault();
this.renderBoxOptions();
}
onFilter(event) {
const value = event.target.value;
if (!value) {
this.renderBoxOptions();
return;
}
if (this.filteredOptions.length) {
this.renderBoxOptions(value);
}
}
onResize() {
this.renderBoxOptions();
this.positionBox();
}
onFocusOut() {
if (!this.preventEscapeFocus && !this.isMobile) {
this.isFocused = false;
this.showList = false;
}
}
closeList() {
this.preventEscapeFocus = true;
this.isFocused = false;
this.showList = false;
}
selectedValue(option) {
if (this.multiSelect) {
if (typeof option.value === 'object') {
if (option && option.value) {
const valuesItems = this.valueToArray(option.value);
return this.formValue.some((item) => {
const itemArray = this.valueToArray(item);
return itemArray.every((itemValue) => valuesItems.includes(itemValue));
});
}
}
else {
return this.formValue?.includes(option.value);
}
}
return option.value === this.formValue;
}
loadMore() {
this.limitView = this.options?.length;
this.renderBoxOptions();
}
renderBoxOptions(filterValue = null) {
if (!this.options || !this.options.length) {
return;
}
let valueLimit = this.options.length;
if (filterValue && filterValue.length > 3) {
valueLimit = this.options.length;
}
else if (this.limitView) {
valueLimit = this.limitView;
}
if (!filterValue) {
this.filteredOptions = this.options
?.map((option) => ({
value: option.value,
iconPrefix: option.iconPrefix,
htmlLabel: option.safeHtmlContent || option.label,
disabled: option.disabled,
viewOnly: option.viewOnly,
}))
.slice(0, valueLimit || 100);
}
else {
this.limitView = this.options?.length;
this.filteredOptions = this.options
?.map((option) => ({
value: option.value,
iconPrefix: option.iconPrefix,
htmlLabel: option.safeHtmlContent || option.label,
disabled: option.disabled,
viewOnly: option.viewOnly,
}))
.filter((option) => {
const normalizedFilter = this.normalizeText(filterValue);
const normalizedLabel = this.normalizeText(option.htmlLabel?.toString() || '');
return normalizedLabel.includes(normalizedFilter);
})
.slice(0, valueLimit || 100);
}
}
normalizeText(text) {
return text
.replace(/[\W_]+/g, '') // Remove caracteres especiais e sublinhados
.toLowerCase();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SmartSelectComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SmartSelectComponent, isStandalone: true, selector: "wco-smart-select", inputs: { inputId: "inputId", inputName: "inputName", IconMaterial: "IconMaterial", placeholder: "placeholder", label: "label", showError: "showError", showSearch: "showSearch", placeholderSearch: "placeholderSearch", textEmpty: "textEmpty", multiSelect: "multiSelect", showMaxSelectedLabel: "showMaxSelectedLabel", typePrefix: "typePrefix", required: "required", limitView: "limitView", formControlName: "formControlName" }, outputs: { onChange: "onChange" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => SmartSelectComponent),
multi: true,
},
{
provide: NG_VALIDATORS,
useExisting: SmartSelectComponent,
multi: true,
},
], queries: [{ propertyName: "options", predicate: SmartSelectOptionComponent }], ngImport: i0, template: "<div\n class=\"wco-smartSelect\"\n [ngClass]=\"{\n 'wco-smartSelect--open': showList,\n 'wco-smartSelect--isMobile': isMobile,\n}\"\n (resize)=\"onResize()\"\n (mouseleave)=\"onFocusOut()\"\n>\n <div class=\"form-field\" [ngClass]=\"{'form--error': hasError}\">\n <input\n *ngIf=\"!multiSelect\"\n class=\"form-field__input\"\n [disabled]=\"autocompleteControl.disabled\"\n id=\"{{ inputId ? inputId : '' }}\"\n name=\"{{ inputName ? inputName : '' }}\"\n (click)=\"onFocusIn(true)\"\n (focusin)=\"onFocusIn()\"\n (keyup.escape)=\"onFocusOut()\"\n (keypress)=\"onKeyPress($event)\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n type=\"text\"\n [value]=\"selectedLabel\"\n aria-label=\"Selecione uma op\u00E7\u00E3o\"\n />\n <div\n *ngIf=\"multiSelect\"\n class=\"form-field__input readonly multiSelect\"\n [ngClass]=\"{'form-field--error': hasError, 'form-field--disabled': autocompleteControl.disabled }\"\n [class.required]=\"required\"\n (click)=\"onFocusIn(true)\"\n (focusin)=\"onFocusIn()\"\n (keyup.escape)=\"onFocusOut()\"\n >\n <ng-container *ngIf=\"!selectedLabelMulti.length\">\n <span class=\"wco-smart-select-placeholder\">{{ placeholder || 'Selecione uma op\u00E7\u00E3o' }}</span>\n </ng-container>\n <ng-container *ngIf=\"selectedLabelMulti.length\">\n <span *ngFor=\"let optionSelected of selectedLabelMulti\" class=\"wco-smart-select-item\">\n {{optionSelected.label}}\n <span class=\"wco-smart-select-remove\" (click)=\"removeItem(optionSelected)\">\n <span class=\"material-icons\">close</span>\n </span>\n </span>\n <span class=\"wco-smart-select-item\" *ngIf=\"selectedLabelMultiCount >= 1\">\n +{{selectedLabelMultiCount}}\n </span>\n </ng-container>\n </div>\n <label>{{ label }}</label>\n <span class=\"material-icons wco-smart-select--arrow\">{{ IconMaterial }}</span>\n </div>\n <div\n class=\"wco-smartSelect--box\"\n [ngClass]=\"{\n 'wco-smartSelect--box--open': showList && !autocompleteControl.disabled\n }\"\n >\n <div class=\"wco-smartSelect--isMobile-close\">\n <button\n (click)=\"closeList()\"\n class=\"btn btn-sm btn-primary btn-outline mb-nano\"\n >\n fechar\n </button>\n </div>\n <ul>\n <li\n tabindex=\"0\"\n class=\"wco-smart-selected-filter\"\n *ngIf=\"showList && showSearch\"\n >\n <input\n [placeholder]=\"placeholderSearch\"\n (keyup)=\"onFilter($event)\"\n aria-label=\"Pesquisar\"\n [attr.autofocus]=\"true\"\n [attr.tabindex]=\"0\"\n class=\"wco-smartSelect--search\"\n type=\"text\"\n />\n </li>\n <li\n *ngFor=\"let option of filteredOptions; let i = index\"\n [tabindex]=\"i + 1\"\n [ngClass]=\"{\n 'wco-smart-selected': selectedValue(option),\n 'wc-smart-select-disabled-option': option.disabled,\n 'wc-smart-select-view-only-option': option.viewOnly,\n }\"\n (click)=\"onSelect(option)\"\n >\n <span class=\"wco-smart-select-label-prefix\">\n <ng-container *ngIf=\"typePrefix === 'checkbox'\">\n <span class=\"material-icons-outlined\">\n {{\n selectedValue(option) ? \"check_box\" : \"check_box_outline_blank\"\n }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"typePrefix === 'radio'\">\n <span class=\"material-icons-outlined\">\n {{\n selectedValue(option)\n ? \"radio_button_checked\"\n : \"radio_button_unchecked\"\n }}\n </span>\n </ng-container>\n <ng-container\n *ngIf=\"\n !!option.iconPrefix &&\n typePrefix !== 'radio' &&\n typePrefix !== 'checkbox'\n \"\n >\n <span class=\"material-icons-outlined\">\n {{ option.iconPrefix }}\n </span>\n </ng-container>\n </span>\n <span\n class=\"wco-smart-select-label\"\n [innerHTML]=\"option.htmlLabel\"\n ></span>\n </li>\n <li *ngIf=\"!filteredOptions.length\">\n <p class=\"display-body\">{{ textEmpty }}</p>\n </li>\n <li (click)=\"loadMore()\" class=\"wco-smart-select-load-more\" *ngIf=\"limitView && options && limitView > 0 && limitView !== options?.length\">\n <p class=\"display-body\">Carregar mais</p>\n </li>\n </ul>\n </div>\n </div>\n", styles: [":host{width:100%}.wco-smartSelect{width:100%;position:relative;display:inline-block;--wco-smart-select-box-height: 0px;--wco-smart-select-box-max-height: 300px;--wco-smart-select-box-radius: 8px;--wco-smart-select-box-shadow: var(--wco-shadow-level-1, 0 2px 4px rgba(0, 0, 0, .2));--wco-smart-select-box-default-color-label: var(--wco-color-neutral-900, #000);--wco-smart-select-box-default-color-bg: var(--wco-color-neutral-100, #e0e0e0);--wco-smart-select-box-default-padding: var(--wco-spacing-nano) var(--wco-spacing-xxxs);--wco-smart-select-box-hover-color-label: var(--wco-color-neutral-900, #000);--wco-smart-select-box-hover-color-bg: var(--wco-color-neutral-300, #bdbdbd);--wco-smart-select-box-selected-color-label: var(--wco-color-neutral-900, #000);--wco-smart-select-box-selected-color-bg: var(--wco-color-primary-100, #819ed3);--wco-smart-select-option-disabled-bg: var(--wco-color-neutral-100, #e0e0e0);--wco-smart-select-option-disabled-color: var(--wco-color-neutral-500, #9e9e9e);--wco-smart-select-box-option-height: 48px}.wco-smartSelect--open{--wco-smart-select-box-height: auto }.wco-smartSelect:has(.wco-smartSelect--search:focus) .form-field input::placeholder{opacity:1}.wco-smartSelect:has(.wco-smartSelect--search:focus) .form-field input+label{color:var(--wco-input-color-label);top:0;transform:translateY(-50%) translate(-10px) scale(.9)!important}.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--isMobile-close{display:flex;padding:var(--wco-spacing-nano);align-items:center;justify-content:flex-end}.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--box{position:fixed;bottom:0;left:0;width:100%}.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--box.wco-smartSelect--box--open{padding:0}.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--box.wco-smartSelect--box--open ul,.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--box.wco-smartSelect--box--open input{border-radius:0}.wco-smartSelect .wco-smartSelect--isMobile-close{display:none}.wco-smartSelect input{cursor:pointer}.wco-smartSelect .form-field__input.multiSelect{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:var(--wco-spacing-nano);padding-right:var(--wco-spacing-sm)}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-placeholder{opacity:.5}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item{display:inline-flex;align-items:center;justify-content:center;padding:var(--wco-spacing-quark) var(--wco-spacing-xxs);border-radius:var(--wco-smart-select-box-radius);background-color:var(--wco-smart-select-box-default-color-bg);position:relative}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item:hover>span{width:calc(var(--wco-spacing-xxs) - 2px)}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item>span{position:absolute;right:0;top:50%;transform:translateY(-50%);border-radius:0 var(--wco-smart-select-box-radius) var(--wco-smart-select-box-radius) 0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;height:100%;width:0px;transition:width .1s linear,margin .1s linear;overflow:hidden;z-index:1}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item>span>span{font-size:var(--wco-font-size-xxxs);font-weight:400;line-height:var(--wco-font-lineheight-500);letter-spacing:.4px;color:var(--wco-smart-select-box-default-color-label)}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item>span:hover{color:var(--wco-smart-select-box-hover-color-label);background-color:var(--wco-smart-select-box-hover-color-bg)}.wco-smartSelect .wco-smart-select--arrow{pointer-events:none;color:var(--wco-color-primary-600)}.wco-smartSelect .wco-smartSelect--box{position:absolute;left:-12px;width:calc(100% + 24px);z-index:999;display:grid;grid-template-columns:1fr;grid-template-rows:var(--wco-smart-select-box-height, 0px);max-height:var(--wco-smart-select-box-max-height);transition:all .4s ease-in-out,padding 0ms linear;padding:0;opacity:0;visibility:hidden;pointer-events:none}.wco-smartSelect .wco-smartSelect--box.wco-smartSelect--box--open{pointer-events:all;padding:var(--wco-spacing-nano) var(--wco-spacing-xxxs) var(--wco-spacing-xxxs) var(--wco-spacing-xxxs);animation:introSmartSelectBox .4s ease-in-out .1s forwards}@keyframes introSmartSelectBox{0%{opacity:0;visibility:hidden;transform:translateY(-10px)}to{opacity:1;visibility:visible;transform:translateY(0)}}.wco-smartSelect .wco-smartSelect--box ul{border-top:none;border-radius:var(--wco-smart-select-box-radius);box-shadow:var(--wco-smart-select-box-shadow);background-color:var(--wco-smart-select-box-default-color-bg);overflow-y:auto;overflow-x:hidden;max-height:var(--wco-smart-select-box-max-height)}.wco-smartSelect .wco-smartSelect--box ul:has(input) li:first-child{position:sticky;top:0;background-color:var(--wco-smart-select-box-default-color-bg);z-index:1}.wco-smartSelect .wco-smartSelect--box ul::-webkit-scrollbar{width:4px}.wco-smartSelect .wco-smartSelect--box ul::-webkit-scrollbar-track{background-color:#ffffff75}.wco-smartSelect .wco-smartSelect--box ul::-webkit-scrollbar-thumb{border-radius:99px;background-color:var(--wco-color-neutral-500, #9e9e9e)}.wco-smartSelect .wco-smartSelect--box ul li{color:var(--wco-smart-select-box-default-color-label);padding:var(--wco-smart-select-box-default-padding);display:grid;width:100%;align-items:center;justify-content:flex-start;grid-template-columns:auto 1fr auto;gap:var(--wco-spacing-xxxs);font-family:var(--wco-font-family);font-size:var(--wco-font-size-xs);font-weight:400;line-height:var(--wco-font-lineheight-500);letter-spacing:.4px;min-height:var(--wco-smart-select-box-option-height)}.wco-smartSelect .wco-smartSelect--box ul li .wco-smart-select-label-prefix{display:inline-flex;align-items:center}.wco-smartSelect .wco-smartSelect--box ul li.wco-smart-selected-filter{padding:0;align-items:stretch;display:flex;border-radius:var(--wco-smart-select-box-radius) 0 0 0;border-bottom:1px solid #ccc;box-shadow:4px 0 1px var(--wco-smart-select-box-default-color-bg);overflow:hidden}.wco-smartSelect .wco-smartSelect--box ul li.wco-smart-selected-filter input{width:100%;height:auto;padding:var(--wco-smart-select-box-default-padding);border:none}.wco-smartSelect .wco-smartSelect--box ul li.wco-smart-selected-filter input:focus{outline:none}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter){cursor:pointer}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter):hover{background-color:var(--wco-smart-select-box-hover-color-bg);color:var(--wco-smart-select-box-hover-color-label);cursor:pointer}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter):focus,.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter):active{background-color:var(--wco-smart-select-box-selected-color-bg);color:var(--wco-smart-select-box-selected-color-label)}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter).wco-smart-selected{background-color:var(--wco-smart-select-box-selected-color-bg);color:var(--wco-smart-select-box-selected-color-label);font-weight:600}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter).wco-smart-select-load-more{cursor:pointer;justify-content:center;grid-template-columns:1fr;background-color:var(--wco-smart-select-box-hover-color-bg);color:var(--wco-smart-select-box-hover-color-label);font-weight:600}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter).wco-smart-select-load-more:hover{background-color:var(--wco-smart-select-box-hover-color-bg);color:var(--wco-smart-select-box-hover-color-label)}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter).wco-smart-select-load-more p{text-align:center;color:var(--wco-smart-select-box-hover-color-label)}.wco-smartSelect .wco-smartSelect--box ul li.wc-smart-select-disabled-option{background-color:var(--wco-smart-select-option-disabled-bg);color:var(--wco-smart-select-option-disabled-color);cursor:not-allowed}.wco-smartSelect .wco-smartSelect--box ul li.wc-smart-select-disabled-option .wco-smart-select-remove{display: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: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SmartSelectComponent, decorators: [{
type: Component,
args: [{ selector: 'wco-smart-select', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule], encapsulation: ViewEncapsulation.None, providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => SmartSelectComponent),
multi: true,
},
{
provide: NG_VALIDATORS,
useExisting: SmartSelectComponent,
multi: true,
},
], template: "<div\n class=\"wco-smartSelect\"\n [ngClass]=\"{\n 'wco-smartSelect--open': showList,\n 'wco-smartSelect--isMobile': isMobile,\n}\"\n (resize)=\"onResize()\"\n (mouseleave)=\"onFocusOut()\"\n>\n <div class=\"form-field\" [ngClass]=\"{'form--error': hasError}\">\n <input\n *ngIf=\"!multiSelect\"\n class=\"form-field__input\"\n [disabled]=\"autocompleteControl.disabled\"\n id=\"{{ inputId ? inputId : '' }}\"\n name=\"{{ inputName ? inputName : '' }}\"\n (click)=\"onFocusIn(true)\"\n (focusin)=\"onFocusIn()\"\n (keyup.escape)=\"onFocusOut()\"\n (keypress)=\"onKeyPress($event)\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n type=\"text\"\n [value]=\"selectedLabel\"\n aria-label=\"Selecione uma op\u00E7\u00E3o\"\n />\n <div\n *ngIf=\"multiSelect\"\n class=\"form-field__input readonly multiSelect\"\n [ngClass]=\"{'form-field--error': hasError, 'form-field--disabled': autocompleteControl.disabled }\"\n [class.required]=\"required\"\n (click)=\"onFocusIn(true)\"\n (focusin)=\"onFocusIn()\"\n (keyup.escape)=\"onFocusOut()\"\n >\n <ng-container *ngIf=\"!selectedLabelMulti.length\">\n <span class=\"wco-smart-select-placeholder\">{{ placeholder || 'Selecione uma op\u00E7\u00E3o' }}</span>\n </ng-container>\n <ng-container *ngIf=\"selectedLabelMulti.length\">\n <span *ngFor=\"let optionSelected of selectedLabelMulti\" class=\"wco-smart-select-item\">\n {{optionSelected.label}}\n <span class=\"wco-smart-select-remove\" (click)=\"removeItem(optionSelected)\">\n <span class=\"material-icons\">close</span>\n </span>\n </span>\n <span class=\"wco-smart-select-item\" *ngIf=\"selectedLabelMultiCount >= 1\">\n +{{selectedLabelMultiCount}}\n </span>\n </ng-container>\n </div>\n <label>{{ label }}</label>\n <span class=\"material-icons wco-smart-select--arrow\">{{ IconMaterial }}</span>\n </div>\n <div\n class=\"wco-smartSelect--box\"\n [ngClass]=\"{\n 'wco-smartSelect--box--open': showList && !autocompleteControl.disabled\n }\"\n >\n <div class=\"wco-smartSelect--isMobile-close\">\n <button\n (click)=\"closeList()\"\n class=\"btn btn-sm btn-primary btn-outline mb-nano\"\n >\n fechar\n </button>\n </div>\n <ul>\n <li\n tabindex=\"0\"\n class=\"wco-smart-selected-filter\"\n *ngIf=\"showList && showSearch\"\n >\n <input\n [placeholder]=\"placeholderSearch\"\n (keyup)=\"onFilter($event)\"\n aria-label=\"Pesquisar\"\n [attr.autofocus]=\"true\"\n [attr.tabindex]=\"0\"\n class=\"wco-smartSelect--search\"\n type=\"text\"\n />\n </li>\n <li\n *ngFor=\"let option of filteredOptions; let i = index\"\n [tabindex]=\"i + 1\"\n [ngClass]=\"{\n 'wco-smart-selected': selectedValue(option),\n 'wc-smart-select-disabled-option': option.disabled,\n 'wc-smart-select-view-only-option': option.viewOnly,\n }\"\n (click)=\"onSelect(option)\"\n >\n <span class=\"wco-smart-select-label-prefix\">\n <ng-container *ngIf=\"typePrefix === 'checkbox'\">\n <span class=\"material-icons-outlined\">\n {{\n selectedValue(option) ? \"check_box\" : \"check_box_outline_blank\"\n }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"typePrefix === 'radio'\">\n <span class=\"material-icons-outlined\">\n {{\n selectedValue(option)\n ? \"radio_button_checked\"\n : \"radio_button_unchecked\"\n }}\n </span>\n </ng-container>\n <ng-container\n *ngIf=\"\n !!option.iconPrefix &&\n typePrefix !== 'radio' &&\n typePrefix !== 'checkbox'\n \"\n >\n <span class=\"material-icons-outlined\">\n {{ option.iconPrefix }}\n </span>\n </ng-container>\n </span>\n <span\n class=\"wco-smart-select-label\"\n [innerHTML]=\"option.htmlLabel\"\n ></span>\n </li>\n <li *ngIf=\"!filteredOptions.length\">\n <p class=\"display-body\">{{ textEmpty }}</p>\n </li>\n <li (click)=\"loadMore()\" class=\"wco-smart-select-load-more\" *ngIf=\"limitView && options && limitView > 0 && limitView !== options?.length\">\n <p class=\"display-body\">Carregar mais</p>\n </li>\n </ul>\n </div>\n </div>\n", styles: [":host{width:100%}.wco-smartSelect{width:100%;position:relative;display:inline-block;--wco-smart-select-box-height: 0px;--wco-smart-select-box-max-height: 300px;--wco-smart-select-box-radius: 8px;--wco-smart-select-box-shadow: var(--wco-shadow-level-1, 0 2px 4px rgba(0, 0, 0, .2));--wco-smart-select-box-default-color-label: var(--wco-color-neutral-900, #000);--wco-smart-select-box-default-color-bg: var(--wco-color-neutral-100, #e0e0e0);--wco-smart-select-box-default-padding: var(--wco-spacing-nano) var(--wco-spacing-xxxs);--wco-smart-select-box-hover-color-label: var(--wco-color-neutral-900, #000);--wco-smart-select-box-hover-color-bg: var(--wco-color-neutral-300, #bdbdbd);--wco-smart-select-box-selected-color-label: var(--wco-color-neutral-900, #000);--wco-smart-select-box-selected-color-bg: var(--wco-color-primary-100, #819ed3);--wco-smart-select-option-disabled-bg: var(--wco-color-neutral-100, #e0e0e0);--wco-smart-select-option-disabled-color: var(--wco-color-neutral-500, #9e9e9e);--wco-smart-select-box-option-height: 48px}.wco-smartSelect--open{--wco-smart-select-box-height: auto }.wco-smartSelect:has(.wco-smartSelect--search:focus) .form-field input::placeholder{opacity:1}.wco-smartSelect:has(.wco-smartSelect--search:focus) .form-field input+label{color:var(--wco-input-color-label);top:0;transform:translateY(-50%) translate(-10px) scale(.9)!important}.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--isMobile-close{display:flex;padding:var(--wco-spacing-nano);align-items:center;justify-content:flex-end}.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--box{position:fixed;bottom:0;left:0;width:100%}.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--box.wco-smartSelect--box--open{padding:0}.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--box.wco-smartSelect--box--open ul,.wco-smartSelect.wco-smartSelect--isMobile .wco-smartSelect--box.wco-smartSelect--box--open input{border-radius:0}.wco-smartSelect .wco-smartSelect--isMobile-close{display:none}.wco-smartSelect input{cursor:pointer}.wco-smartSelect .form-field__input.multiSelect{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:var(--wco-spacing-nano);padding-right:var(--wco-spacing-sm)}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-placeholder{opacity:.5}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item{display:inline-flex;align-items:center;justify-content:center;padding:var(--wco-spacing-quark) var(--wco-spacing-xxs);border-radius:var(--wco-smart-select-box-radius);background-color:var(--wco-smart-select-box-default-color-bg);position:relative}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item:hover>span{width:calc(var(--wco-spacing-xxs) - 2px)}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item>span{position:absolute;right:0;top:50%;transform:translateY(-50%);border-radius:0 var(--wco-smart-select-box-radius) var(--wco-smart-select-box-radius) 0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;height:100%;width:0px;transition:width .1s linear,margin .1s linear;overflow:hidden;z-index:1}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item>span>span{font-size:var(--wco-font-size-xxxs);font-weight:400;line-height:var(--wco-font-lineheight-500);letter-spacing:.4px;color:var(--wco-smart-select-box-default-color-label)}.wco-smartSelect .form-field__input.multiSelect .wco-smart-select-item>span:hover{color:var(--wco-smart-select-box-hover-color-label);background-color:var(--wco-smart-select-box-hover-color-bg)}.wco-smartSelect .wco-smart-select--arrow{pointer-events:none;color:var(--wco-color-primary-600)}.wco-smartSelect .wco-smartSelect--box{position:absolute;left:-12px;width:calc(100% + 24px);z-index:999;display:grid;grid-template-columns:1fr;grid-template-rows:var(--wco-smart-select-box-height, 0px);max-height:var(--wco-smart-select-box-max-height);transition:all .4s ease-in-out,padding 0ms linear;padding:0;opacity:0;visibility:hidden;pointer-events:none}.wco-smartSelect .wco-smartSelect--box.wco-smartSelect--box--open{pointer-events:all;padding:var(--wco-spacing-nano) var(--wco-spacing-xxxs) var(--wco-spacing-xxxs) var(--wco-spacing-xxxs);animation:introSmartSelectBox .4s ease-in-out .1s forwards}@keyframes introSmartSelectBox{0%{opacity:0;visibility:hidden;transform:translateY(-10px)}to{opacity:1;visibility:visible;transform:translateY(0)}}.wco-smartSelect .wco-smartSelect--box ul{border-top:none;border-radius:var(--wco-smart-select-box-radius);box-shadow:var(--wco-smart-select-box-shadow);background-color:var(--wco-smart-select-box-default-color-bg);overflow-y:auto;overflow-x:hidden;max-height:var(--wco-smart-select-box-max-height)}.wco-smartSelect .wco-smartSelect--box ul:has(input) li:first-child{position:sticky;top:0;background-color:var(--wco-smart-select-box-default-color-bg);z-index:1}.wco-smartSelect .wco-smartSelect--box ul::-webkit-scrollbar{width:4px}.wco-smartSelect .wco-smartSelect--box ul::-webkit-scrollbar-track{background-color:#ffffff75}.wco-smartSelect .wco-smartSelect--box ul::-webkit-scrollbar-thumb{border-radius:99px;background-color:var(--wco-color-neutral-500, #9e9e9e)}.wco-smartSelect .wco-smartSelect--box ul li{color:var(--wco-smart-select-box-default-color-label);padding:var(--wco-smart-select-box-default-padding);display:grid;width:100%;align-items:center;justify-content:flex-start;grid-template-columns:auto 1fr auto;gap:var(--wco-spacing-xxxs);font-family:var(--wco-font-family);font-size:var(--wco-font-size-xs);font-weight:400;line-height:var(--wco-font-lineheight-500);letter-spacing:.4px;min-height:var(--wco-smart-select-box-option-height)}.wco-smartSelect .wco-smartSelect--box ul li .wco-smart-select-label-prefix{display:inline-flex;align-items:center}.wco-smartSelect .wco-smartSelect--box ul li.wco-smart-selected-filter{padding:0;align-items:stretch;display:flex;border-radius:var(--wco-smart-select-box-radius) 0 0 0;border-bottom:1px solid #ccc;box-shadow:4px 0 1px var(--wco-smart-select-box-default-color-bg);overflow:hidden}.wco-smartSelect .wco-smartSelect--box ul li.wco-smart-selected-filter input{width:100%;height:auto;padding:var(--wco-smart-select-box-default-padding);border:none}.wco-smartSelect .wco-smartSelect--box ul li.wco-smart-selected-filter input:focus{outline:none}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter){cursor:pointer}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter):hover{background-color:var(--wco-smart-select-box-hover-color-bg);color:var(--wco-smart-select-box-hover-color-label);cursor:pointer}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter):focus,.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter):active{background-color:var(--wco-smart-select-box-selected-color-bg);color:var(--wco-smart-select-box-selected-color-label)}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter).wco-smart-selected{background-color:var(--wco-smart-select-box-selected-color-bg);color:var(--wco-smart-select-box-selected-color-label);font-weight:600}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter).wco-smart-select-load-more{cursor:pointer;justify-content:center;grid-template-columns:1fr;background-color:var(--wco-smart-select-box-hover-color-bg);color:var(--wco-smart-select-box-hover-color-label);font-weight:600}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter).wco-smart-select-load-more:hover{background-color:var(--wco-smart-select-box-hover-color-bg);color:var(--wco-smart-select-box-hover-color-label)}.wco-smartSelect .wco-smartSelect--box ul li:not(.wc-smart-select-view-only-option):not(.wc-smart-select-disabled-option):not(.wco-smart-selected-filter).wco-smart-select-load-more p{text-align:center;color:var(--wco-smart-select-box-hover-color-label)}.wco-smartSelect .wco-smartSelect--box ul li.wc-smart-select-disabled-option{background-color:var(--wco-smart-select-option-disabled-bg);color:var(--wco-smart-select-option-disabled-color);cursor:not-allowed}.wco-smartSelect .wco-smartSelect--box ul li.wc-smart-select-disabled-option .wco-smart-select-remove{display:none}\n"] }]
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { options: [{
type: ContentChildren,
args: [SmartSelectOptionComponent]
}], onChange: [{
type: Output
}], inputId: [{
type: Input
}], inputName: [{
type: Input
}], IconMaterial: [{
type: Input
}], placeholder: [{
type: Input
}], label: [{
type: Input
}], showError: [{
type: Input
}], showSearch: [{
type: Input
}], placeholderSearch: [{
type: Input
}], textEmpty: [{
type: Input
}], multiSelect: [{
type: Input
}], showMaxSelectedLabel: [{
type: Input
}], typePrefix: [{
type: Input
}], required: [{
type: Input
}], limitView: [{
type: Input
}], formControlName: [{
type: Input
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnQtc2VsZWN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1jb21wb25lbnRzL3NyYy9saWIvc21hcnQtc2VsZWN0L3NtYXJ0LXNlbGVjdC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtY29tcG9uZW50cy9zcmMvbGliL3NtYXJ0LXNlbGVjdC9zbWFydC1zZWxlY3QuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxlQUFlLEVBRWYsWUFBWSxFQUNaLEtBQUssRUFDTCxNQUFNLEVBRU4saUJBQWlCLEVBQ2pCLFVBQVUsR0FDWCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUVMLFdBQVcsRUFDWCxXQUFXLEVBQ1gsYUFBYSxFQUNiLGlCQUFpQixFQUNqQixtQkFBbUIsR0FHcEIsTUFBTSxnQkFBZ0IsQ0FBQztBQUN4QixPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxrQ0FBa0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