cax-design-system 2.7.2 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/accordion/accordion.d.ts +5 -1
- package/calendar/calendar.d.ts +8 -1
- package/esm2022/accordion/accordion.mjs +11 -4
- package/esm2022/calendar/calendar.mjs +35 -3
- package/esm2022/dropdown/dropdown.mjs +3 -3
- package/esm2022/inputtextarea/inputtextarea.component.mjs +16 -4
- package/esm2022/navigation/navigation.mjs +64 -29
- package/esm2022/table/components/column-filter/column-filter.mjs +2 -2
- package/esm2022/table/components/column-filter-form-element/column-filter-form-element.mjs +2 -2
- package/fesm2022/cax-design-system-accordion.mjs +10 -3
- package/fesm2022/cax-design-system-accordion.mjs.map +1 -1
- package/fesm2022/cax-design-system-calendar.mjs +34 -2
- package/fesm2022/cax-design-system-calendar.mjs.map +1 -1
- package/fesm2022/cax-design-system-dropdown.mjs +2 -2
- package/fesm2022/cax-design-system-dropdown.mjs.map +1 -1
- package/fesm2022/cax-design-system-inputtextarea.mjs +15 -3
- package/fesm2022/cax-design-system-inputtextarea.mjs.map +1 -1
- package/fesm2022/cax-design-system-navigation.mjs +63 -28
- package/fesm2022/cax-design-system-navigation.mjs.map +1 -1
- package/fesm2022/cax-design-system-table.mjs +2 -2
- package/fesm2022/cax-design-system-table.mjs.map +1 -1
- package/inputtextarea/inputtextarea.component.d.ts +7 -1
- package/navigation/navigation.d.ts +3 -1
- package/package.json +180 -180
- package/resources/cax.min.scss +1 -1
- package/resources/cax.scss +21 -8
- package/resources/components/calendar/calendar.scss +220 -190
- package/resources/components/dropdown/dropdown.scss +8 -0
- package/resources/components/navigation/navigation.scss +27 -2
|
@@ -1455,7 +1455,7 @@ class Dropdown {
|
|
|
1455
1455
|
this.resetFilter();
|
|
1456
1456
|
}
|
|
1457
1457
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: Dropdown, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1.FilterService }, { token: i1.caxConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
1458
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.9", type: Dropdown, isStandalone: true, selector: "cax-dropdown", inputs: { id: "id", scrollHeight: "scrollHeight", filter: ["filter", "filter", booleanAttribute], name: "name", style: "style", panelStyle: "panelStyle", styleClass: "styleClass", panelStyleClass: "panelStyleClass", readonly: ["readonly", "readonly", booleanAttribute], required: ["required", "required", booleanAttribute], editable: ["editable", "editable", booleanAttribute], appendTo: "appendTo", tabindex: ["tabindex", "tabindex", numberAttribute], placeholder: "placeholder", loadingIcon: "loadingIcon", filterPlaceholder: "filterPlaceholder", filterLocale: "filterLocale", variant: "variant", inputId: "inputId", dataKey: "dataKey", filterBy: "filterBy", filterFields: "filterFields", autofocus: ["autofocus", "autofocus", booleanAttribute], resetFilterOnHide: ["resetFilterOnHide", "resetFilterOnHide", booleanAttribute], checkmark: ["checkmark", "checkmark", booleanAttribute], dropdownIcon: "dropdownIcon", loading: ["loading", "loading", booleanAttribute], optionLabel: "optionLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", optionGroupLabel: "optionGroupLabel", optionGroupChildren: "optionGroupChildren", autoDisplayFirst: ["autoDisplayFirst", "autoDisplayFirst", booleanAttribute], group: ["group", "group", booleanAttribute], showClear: ["showClear", "showClear", booleanAttribute], emptyFilterMessage: "emptyFilterMessage", emptyMessage: "emptyMessage", lazy: ["lazy", "lazy", booleanAttribute], virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", overlayOptions: "overlayOptions", ariaFilterLabel: "ariaFilterLabel", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", filterMatchMode: "filterMatchMode", maxlength: ["maxlength", "maxlength", numberAttribute], tooltip: "tooltip", tooltipPosition: "tooltipPosition", tooltipPositionStyle: "tooltipPositionStyle", tooltipStyleClass: "tooltipStyleClass", focusOnHover: ["focusOnHover", "focusOnHover", booleanAttribute], selectOnFocus: ["selectOnFocus", "selectOnFocus", booleanAttribute], autoOptionFocus: ["autoOptionFocus", "autoOptionFocus", booleanAttribute], autofocusFilter: ["autofocusFilter", "autofocusFilter", booleanAttribute], autoShowPanelOnPrintableCharacterKeyDown: ["autoShowPanelOnPrintableCharacterKeyDown", "autoShowPanelOnPrintableCharacterKeyDown", booleanAttribute], labelText: "labelText", disabled: "disabled", itemSize: "itemSize", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", filterValue: "filterValue", options: "options" }, outputs: { onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onClick: "onClick", onShow: "onShow", onHide: "onHide", onClear: "onClear", onLazyLoad: "onLazyLoad" }, host: { properties: { "class.cax-inputwrapper-filled": "filled()", "class.cax-inputwrapper-focus": "focused || overlayVisible" }, classAttribute: "cax-element cax-inputwrapper" }, providers: [DROPDOWN_VALUE_ACCESSOR], queries: [{ propertyName: "templates", predicate: CaxTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "filterViewChild", first: true, predicate: ["filter"], descendants: true }, { propertyName: "focusInputViewChild", first: true, predicate: ["focusInput"], descendants: true }, { propertyName: "editableInputViewChild", first: true, predicate: ["editableInput"], descendants: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "firstHiddenFocusableElementOnOverlay", first: true, predicate: ["firstHiddenFocusableEl"], descendants: true }, { propertyName: "lastHiddenFocusableElementOnOverlay", first: true, predicate: ["lastHiddenFocusableEl"], descendants: true }], ngImport: i0, template: "<div [ngClass]=\"{'cax-dropdown-main-label': labelText}\">\r\n <label *ngIf=\"labelText\" [ngClass]=\"labelTextClass\">{{ labelText }}</label>\r\n</div>\r\n<div #container [attr.id]=\"id\" [ngClass]=\"containerClass\" (click)=\"onContainerClick($event)\" [ngStyle]=\"style\" [class]=\"styleClass\">\r\n <span\r\n #focusInput\r\n [ngClass]=\"inputClass\"\r\n *ngIf=\"!editable\"\r\n [caxTooltip]=\"tooltip\"\r\n [tooltipPosition]=\"tooltipPosition\"\r\n [positionStyle]=\"tooltipPositionStyle\"\r\n [tooltipStyleClass]=\"tooltipStyleClass\"\r\n [attr.aria-disabled]=\"disabled\"\r\n [attr.id]=\"inputId\"\r\n role=\"combobox\"\r\n [attr.aria-label]=\"ariaLabel || (label() === 'cax-emptylabel' ? undefined : label())\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-expanded]=\"overlayVisible ?? false\"\r\n [attr.aria-controls]=\"overlayVisible ? id + '_list' : null\"\r\n [attr.tabindex]=\"!disabled ? tabindex : -1\"\r\n caxAutoFocus\r\n [autofocus]=\"autofocus\"\r\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\r\n (focus)=\"onInputFocus($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-required]=\"required\"\r\n [attr.required]=\"required\"\r\n >\r\n <ng-container *ngIf=\"!selectedItemTemplate; else defaultPlaceholder\">{{ label() === 'cax-emptylabel' ? ' ' : label() }}</ng-container>\r\n <ng-container *ngIf=\"selectedItemTemplate && !isSelectedOptionEmpty()\" [ngTemplateOutlet]=\"selectedItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: selectedOption }\"></ng-container>\r\n <ng-template #defaultPlaceholder>\r\n <span *ngIf=\"isSelectedOptionEmpty()\">{{ label() === 'cax-emptylabel' ? ' ' : label() }}</span>\r\n </ng-template>\r\n </span>\r\n <input\r\n *ngIf=\"editable\"\r\n #editableInput\r\n type=\"text\"\r\n [attr.id]=\"inputId\"\r\n [attr.maxlength]=\"maxlength\"\r\n [ngClass]=\"inputClass\"\r\n [disabled]=\"disabled\"\r\n aria-haspopup=\"listbox\"\r\n [attr.placeholder]=\"modelValue() === undefined || modelValue() === null ? placeholder() : undefined\"\r\n [attr.aria-label]=\"ariaLabel || (label() === 'cax-emptylabel' ? undefined : label())\"\r\n (input)=\"onEditableInput($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n caxAutoFocus\r\n [autofocus]=\"autofocus\"\r\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\r\n (focus)=\"onInputFocus($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n />\r\n <ng-container *ngIf=\"isVisibleClearIcon\">\r\n <TimesIcon [styleClass]=\"'cax-dropdown-clear-icon'\" (click)=\"clear($event)\" *ngIf=\"!clearIconTemplate\" [attr.data-pc-section]=\"'clearicon'\" />\r\n <span class=\"cax-dropdown-clear-icon\" (click)=\"clear($event)\" *ngIf=\"clearIconTemplate\" [attr.data-pc-section]=\"'clearicon'\">\r\n <ng-template *ngTemplateOutlet=\"clearIconTemplate\"></ng-template>\r\n </span>\r\n </ng-container>\r\n\r\n <div class=\"cax-dropdown-trigger\" role=\"button\" aria-label=\"dropdown trigger\" (mousedown)=\"onMouseDown($event)\" aria-haspopup=\"listbox\" [attr.aria-expanded]=\"overlayVisible ?? false\" [attr.data-pc-section]=\"'trigger'\">\r\n <ng-container *ngIf=\"loading; else elseBlock\">\r\n <ng-container *ngIf=\"loadingIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"loadingIconTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!loadingIconTemplate\">\r\n <span *ngIf=\"loadingIcon\" [ngClass]=\"'cax-dropdown-trigger-icon pi-spin ' + loadingIcon\" aria-hidden=\"true\"></span>\r\n <span *ngIf=\"!loadingIcon\" [class]=\"'cax-dropdown-trigger-icon pi pi-spinner pi-spin'\" aria-hidden=\"true\"></span>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #elseBlock>\r\n <ng-container *ngIf=\"!dropdownIconTemplate\">\r\n <span class=\"cax-dropdown-trigger-icon\" *ngIf=\"dropdownIcon\" [ngClass]=\"dropdownIcon\"></span>\r\n <ChevronDownIcon *ngIf=\"!dropdownIcon\" [styleClass]=\"'cax-dropdown-trigger-icon'\" />\r\n </ng-container>\r\n <span *ngIf=\"dropdownIconTemplate\" class=\"cax-dropdown-trigger-icon\">\r\n <ng-template *ngTemplateOutlet=\"dropdownIconTemplate\"></ng-template>\r\n </span>\r\n </ng-template>\r\n </div>\r\n\r\n <cax-overlay\r\n #overlay\r\n [(visible)]=\"overlayVisible\"\r\n [options]=\"overlayOptions\"\r\n [target]=\"'@parent'\"\r\n [appendTo]=\"appendTo\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [showTransitionOptions]=\"showTransitionOptions\"\r\n [hideTransitionOptions]=\"hideTransitionOptions\"\r\n (onAnimationStart)=\"onOverlayAnimationStart($event)\"\r\n (onHide)=\"hide()\"\r\n >\r\n <ng-template caxTemplate=\"content\">\r\n <div [ngClass]=\"'cax-dropdown-panel cax-component'\" [ngStyle]=\"panelStyle\" [class]=\"panelStyleClass\">\r\n <span\r\n #firstHiddenFocusableEl\r\n role=\"presentation\"\r\n class=\"cax-hidden-accessible cax-hidden-focusable\"\r\n [attr.tabindex]=\"0\"\r\n (focus)=\"onFirstHiddenFocus($event)\"\r\n [attr.data-cax-hidden-accessible]=\"true\"\r\n [attr.data-cax-hidden-focusable]=\"true\"\r\n >\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n <div class=\"cax-dropdown-header\" *ngIf=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <ng-container *ngIf=\"filterTemplate; else builtInFilterElement\">\r\n <ng-container *ngTemplateOutlet=\"filterTemplate; context: { options: filterOptions }\"></ng-container>\r\n </ng-container>\r\n <ng-template #builtInFilterElement>\r\n <div class=\"cax-dropdown-filter-container\">\r\n <input\r\n #filter\r\n type=\"text\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n [attr.placeholder]=\"filterPlaceholder || 'Search...'\"\r\n [value]=\"_filterValue() || ''\"\r\n class=\"cax-dropdown-filter cax-inputtext cax-component\"\r\n [ngClass]=\"{ 'cax-variant-filled': variant === 'filled' || config.inputStyle() === 'filled' }\"\r\n [attr.placeholder]=\"filterPlaceholder\"\r\n [attr.aria-owns]=\"id + '_list'\"\r\n (input)=\"onFilterInputChange($event)\"\r\n [attr.aria-label]=\"ariaFilterLabel\"\r\n [attr.aria-activedescendant]=\"focusedOptionId\"\r\n (keydown)=\"onFilterKeyDown($event)\"\r\n (blur)=\"onFilterBlur($event)\"\r\n />\r\n <SearchIcon *ngIf=\"!filterIconTemplate\" [styleClass]=\"'cax-dropdown-filter-icon'\" />\r\n <span *ngIf=\"filterIconTemplate\" class=\"cax-dropdown-filter-icon\">\r\n <ng-template *ngTemplateOutlet=\"filterIconTemplate\"></ng-template>\r\n </span>\r\n <i *ngIf=\"_filterValue()\" class=\"cax cax-close-circle cax-dropdown-filter-clear-icon\" (click)=\"resetFilter()\"></i>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div\r\n class=\"cax-dropdown-items-wrapper\"\r\n [ngStyle]=\"{\r\n 'max-height': virtualScroll ? 'auto' : scrollHeight || 'auto'\r\n }\"\r\n tabindex=\"0\"\r\n >\r\n <cax-scroller\r\n *ngIf=\"virtualScroll\"\r\n #scroller\r\n [items]=\"visibleOptions()\"\r\n [style]=\"{ height: scrollHeight }\"\r\n [itemSize]=\"virtualScrollItemSize || _itemSize\"\r\n [autoSize]=\"true\"\r\n [lazy]=\"lazy\"\r\n (onLazyLoad)=\"onLazyLoad.emit($event)\"\r\n [options]=\"virtualScrollOptions\"\r\n >\r\n <ng-template caxTemplate=\"content\" let-items let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"buildInItems; context: { $implicit: items, options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf=\"loaderTemplate\">\r\n <ng-template caxTemplate=\"loader\" let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"loaderTemplate; context: { options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </cax-scroller>\r\n <ng-container *ngIf=\"!virtualScroll\">\r\n <ng-container *ngTemplateOutlet=\"buildInItems; context: { $implicit: visibleOptions(), options: {} }\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #buildInItems let-items let-scrollerOptions=\"options\">\r\n <ul #items [attr.id]=\"id + '_list'\" [attr.aria-label]=\"listLabel\" class=\"cax-dropdown-items\" [ngClass]=\"scrollerOptions.contentStyleClass\" [ngStyle]=\"scrollerOptions.contentStyle\" role=\"listbox\">\r\n <ng-template ngFor let-option [ngForOf]=\"items\" let-i=\"index\">\r\n <ng-container *ngIf=\"isOptionGroup(option)\">\r\n <li class=\"cax-dropdown-item-group\" [attr.id]=\"id + '_' + getOptionIndex(i, scrollerOptions)\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <span *ngIf=\"!groupTemplate\">{{ getOptionGroupLabel(option.optionGroup) }}</span>\r\n <ng-container *ngTemplateOutlet=\"groupTemplate; context: { $implicit: option.optionGroup }\"></ng-container>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!isOptionGroup(option)\">\r\n <cax-dropdownItem\r\n [id]=\"id + '_' + getOptionIndex(i, scrollerOptions)\"\r\n [option]=\"option\"\r\n [checkmark]=\"checkmark\"\r\n [selected]=\"isSelected(option)\"\r\n [label]=\"getOptionLabel(option)\"\r\n [disabled]=\"isOptionDisabled(option)\"\r\n [template]=\"itemTemplate\"\r\n [focused]=\"focusedOptionIndex() === getOptionIndex(i, scrollerOptions)\"\r\n [ariaPosInset]=\"getAriaPosInset(getOptionIndex(i, scrollerOptions))\"\r\n [ariaSetSize]=\"ariaSetSize\"\r\n (onClick)=\"onOptionSelect($event, option)\"\r\n (onMouseEnter)=\"onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))\"\r\n ></cax-dropdownItem>\r\n </ng-container>\r\n </ng-template>\r\n <li *ngIf=\"filterValue && isEmpty()\" class=\"cax-dropdown-empty-message\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <ng-container *ngIf=\"!emptyFilterTemplate && !emptyTemplate; else emptyFilter\"> {{ emptyFilterMessageLabel }} </ng-container>\r\n <ng-container #emptyFilter *ngTemplateOutlet=\"emptyFilterTemplate || emptyTemplate\"></ng-container>\r\n </li>\r\n <li *ngIf=\"!filterValue && isEmpty()\" class=\"cax-dropdown-empty-message\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <ng-container *ngIf=\"!emptyTemplate; else empty\"> {{ emptyMessageLabel }} </ng-container>\r\n <ng-container #empty *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\r\n </li>\r\n </ul>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n <span\r\n #lastHiddenFocusableEl\r\n role=\"presentation\"\r\n class=\"cax-hidden-accessible cax-hidden-focusable\"\r\n [attr.tabindex]=\"0\"\r\n (focus)=\"onLastHiddenFocus($event)\"\r\n [attr.data-cax-hidden-accessible]=\"true\"\r\n [attr.data-cax-hidden-focusable]=\"true\"\r\n ></span>\r\n </div>\r\n </ng-template>\r\n </cax-overlay>\r\n</div>\r\n", styles: ["@layer cax{.cax-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none;min-width:216px;height:40px}.cax-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.cax-dropdown-main-label{font-weight:500;font-size:14px;line-height:20px;margin-bottom:8px}.cax-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.cax-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.cax-dropdown-label-empty{overflow:hidden;opacity:0}input.cax-dropdown-label{cursor:default}.cax-dropdown-items-wrapper{overflow:auto}.cax-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden;font-weight:500}.cax-dropdown-item-group{cursor:auto}.cax-dropdown-items{margin:0;padding:0;list-style-type:none}.cax-fluid .cax-dropdown{display:flex}.cax-fluid .cax-dropdown .cax-dropdown-label{width:1%}.cax-float-label .cax-dropdown .cax-placeholder{opacity:0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "component", type: i3.Overlay, selector: "cax-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "directive", type: i1.CaxTemplate, selector: "[caxTemplate]", inputs: ["type", "caxTemplate"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[caxTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "caxTooltip", "tooltipDisabled", "tooltipOptions", "linkUrl", "linkText"] }, { kind: "ngmodule", type: RippleModule }, { kind: "ngmodule", type: ScrollerModule }, { kind: "component", type: i5.Scroller, selector: "cax-scroller", inputs: ["id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: AutoFocusModule }, { kind: "directive", type: i6.AutoFocus, selector: "[caxAutoFocus]", inputs: ["autofocus"] }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "component", type: ChevronDownIcon, selector: "ChevronDownIcon" }, { kind: "component", type: SearchIcon, selector: "SearchIcon" }, { kind: "component", type: DropdownItem, selector: "cax-dropdownItem", inputs: ["id", "option", "selected", "focused", "label", "disabled", "visible", "itemSize", "ariaPosInset", "ariaSetSize", "template", "checkmark"], outputs: ["onClick", "onMouseEnter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1458
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.9", type: Dropdown, isStandalone: true, selector: "cax-dropdown", inputs: { id: "id", scrollHeight: "scrollHeight", filter: ["filter", "filter", booleanAttribute], name: "name", style: "style", panelStyle: "panelStyle", styleClass: "styleClass", panelStyleClass: "panelStyleClass", readonly: ["readonly", "readonly", booleanAttribute], required: ["required", "required", booleanAttribute], editable: ["editable", "editable", booleanAttribute], appendTo: "appendTo", tabindex: ["tabindex", "tabindex", numberAttribute], placeholder: "placeholder", loadingIcon: "loadingIcon", filterPlaceholder: "filterPlaceholder", filterLocale: "filterLocale", variant: "variant", inputId: "inputId", dataKey: "dataKey", filterBy: "filterBy", filterFields: "filterFields", autofocus: ["autofocus", "autofocus", booleanAttribute], resetFilterOnHide: ["resetFilterOnHide", "resetFilterOnHide", booleanAttribute], checkmark: ["checkmark", "checkmark", booleanAttribute], dropdownIcon: "dropdownIcon", loading: ["loading", "loading", booleanAttribute], optionLabel: "optionLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", optionGroupLabel: "optionGroupLabel", optionGroupChildren: "optionGroupChildren", autoDisplayFirst: ["autoDisplayFirst", "autoDisplayFirst", booleanAttribute], group: ["group", "group", booleanAttribute], showClear: ["showClear", "showClear", booleanAttribute], emptyFilterMessage: "emptyFilterMessage", emptyMessage: "emptyMessage", lazy: ["lazy", "lazy", booleanAttribute], virtualScroll: ["virtualScroll", "virtualScroll", booleanAttribute], virtualScrollItemSize: ["virtualScrollItemSize", "virtualScrollItemSize", numberAttribute], virtualScrollOptions: "virtualScrollOptions", overlayOptions: "overlayOptions", ariaFilterLabel: "ariaFilterLabel", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", filterMatchMode: "filterMatchMode", maxlength: ["maxlength", "maxlength", numberAttribute], tooltip: "tooltip", tooltipPosition: "tooltipPosition", tooltipPositionStyle: "tooltipPositionStyle", tooltipStyleClass: "tooltipStyleClass", focusOnHover: ["focusOnHover", "focusOnHover", booleanAttribute], selectOnFocus: ["selectOnFocus", "selectOnFocus", booleanAttribute], autoOptionFocus: ["autoOptionFocus", "autoOptionFocus", booleanAttribute], autofocusFilter: ["autofocusFilter", "autofocusFilter", booleanAttribute], autoShowPanelOnPrintableCharacterKeyDown: ["autoShowPanelOnPrintableCharacterKeyDown", "autoShowPanelOnPrintableCharacterKeyDown", booleanAttribute], labelText: "labelText", disabled: "disabled", itemSize: "itemSize", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", filterValue: "filterValue", options: "options" }, outputs: { onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onClick: "onClick", onShow: "onShow", onHide: "onHide", onClear: "onClear", onLazyLoad: "onLazyLoad" }, host: { properties: { "class.cax-inputwrapper-filled": "filled()", "class.cax-inputwrapper-focus": "focused || overlayVisible" }, classAttribute: "cax-element cax-inputwrapper" }, providers: [DROPDOWN_VALUE_ACCESSOR], queries: [{ propertyName: "templates", predicate: CaxTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "filterViewChild", first: true, predicate: ["filter"], descendants: true }, { propertyName: "focusInputViewChild", first: true, predicate: ["focusInput"], descendants: true }, { propertyName: "editableInputViewChild", first: true, predicate: ["editableInput"], descendants: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "firstHiddenFocusableElementOnOverlay", first: true, predicate: ["firstHiddenFocusableEl"], descendants: true }, { propertyName: "lastHiddenFocusableElementOnOverlay", first: true, predicate: ["lastHiddenFocusableEl"], descendants: true }], ngImport: i0, template: "<div [ngClass]=\"{'cax-dropdown-main-label': labelText}\">\r\n <label *ngIf=\"labelText\" [ngClass]=\"labelTextClass\">{{ labelText }}</label>\r\n</div>\r\n<div #container [attr.id]=\"id\" [ngClass]=\"containerClass\" (click)=\"onContainerClick($event)\" [ngStyle]=\"style\" [class]=\"styleClass\">\r\n <span\r\n #focusInput\r\n [ngClass]=\"inputClass\"\r\n *ngIf=\"!editable\"\r\n [caxTooltip]=\"tooltip\"\r\n [tooltipPosition]=\"tooltipPosition\"\r\n [positionStyle]=\"tooltipPositionStyle\"\r\n [tooltipStyleClass]=\"tooltipStyleClass\"\r\n [attr.aria-disabled]=\"disabled\"\r\n [attr.id]=\"inputId\"\r\n role=\"combobox\"\r\n [attr.aria-label]=\"ariaLabel || (label() === 'cax-emptylabel' ? undefined : label())\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-expanded]=\"overlayVisible ?? false\"\r\n [attr.aria-controls]=\"overlayVisible ? id + '_list' : null\"\r\n [attr.tabindex]=\"!disabled ? tabindex : -1\"\r\n caxAutoFocus\r\n [autofocus]=\"autofocus\"\r\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\r\n (focus)=\"onInputFocus($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-required]=\"required\"\r\n [attr.required]=\"required\"\r\n >\r\n <ng-container *ngIf=\"!selectedItemTemplate; else defaultPlaceholder\">{{ label() === 'cax-emptylabel' ? ' ' : label() }}</ng-container>\r\n <ng-container *ngIf=\"selectedItemTemplate && !isSelectedOptionEmpty()\" [ngTemplateOutlet]=\"selectedItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: selectedOption }\"></ng-container>\r\n <ng-template #defaultPlaceholder>\r\n <span *ngIf=\"isSelectedOptionEmpty()\">{{ label() === 'cax-emptylabel' ? ' ' : label() }}</span>\r\n </ng-template>\r\n </span>\r\n <input\r\n *ngIf=\"editable\"\r\n #editableInput\r\n type=\"text\"\r\n [attr.id]=\"inputId\"\r\n [attr.maxlength]=\"maxlength\"\r\n [ngClass]=\"inputClass\"\r\n [disabled]=\"disabled\"\r\n aria-haspopup=\"listbox\"\r\n [attr.placeholder]=\"modelValue() === undefined || modelValue() === null ? placeholder() : undefined\"\r\n [attr.aria-label]=\"ariaLabel || (label() === 'cax-emptylabel' ? undefined : label())\"\r\n (input)=\"onEditableInput($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n caxAutoFocus\r\n [autofocus]=\"autofocus\"\r\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\r\n (focus)=\"onInputFocus($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n />\r\n <ng-container *ngIf=\"isVisibleClearIcon\">\r\n <TimesIcon [styleClass]=\"'cax-dropdown-clear-icon'\" (click)=\"clear($event)\" *ngIf=\"!clearIconTemplate\" [attr.data-pc-section]=\"'clearicon'\" />\r\n <span class=\"cax-dropdown-clear-icon\" (click)=\"clear($event)\" *ngIf=\"clearIconTemplate\" [attr.data-pc-section]=\"'clearicon'\">\r\n <ng-template *ngTemplateOutlet=\"clearIconTemplate\"></ng-template>\r\n </span>\r\n </ng-container>\r\n\r\n <div class=\"cax-dropdown-trigger\" role=\"button\" aria-label=\"dropdown trigger\" (mousedown)=\"onMouseDown($event)\" aria-haspopup=\"listbox\" [attr.aria-expanded]=\"overlayVisible ?? false\" [attr.data-pc-section]=\"'trigger'\">\r\n <ng-container *ngIf=\"loading; else elseBlock\">\r\n <ng-container *ngIf=\"loadingIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"loadingIconTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!loadingIconTemplate\">\r\n <span *ngIf=\"loadingIcon\" [ngClass]=\"'cax-dropdown-trigger-icon pi-spin ' + loadingIcon\" aria-hidden=\"true\"></span>\r\n <span *ngIf=\"!loadingIcon\" [class]=\"'cax-dropdown-trigger-icon pi pi-spinner pi-spin'\" aria-hidden=\"true\"></span>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #elseBlock>\r\n <ng-container *ngIf=\"!dropdownIconTemplate\">\r\n <span class=\"cax-dropdown-trigger-icon\" *ngIf=\"dropdownIcon\" [ngClass]=\"dropdownIcon\"></span>\r\n <ChevronDownIcon *ngIf=\"!dropdownIcon\" [styleClass]=\"'cax-dropdown-trigger-icon'\" />\r\n </ng-container>\r\n <span *ngIf=\"dropdownIconTemplate\" class=\"cax-dropdown-trigger-icon\">\r\n <ng-template *ngTemplateOutlet=\"dropdownIconTemplate\"></ng-template>\r\n </span>\r\n </ng-template>\r\n </div>\r\n\r\n <cax-overlay\r\n #overlay\r\n [(visible)]=\"overlayVisible\"\r\n [options]=\"overlayOptions\"\r\n [target]=\"'@parent'\"\r\n [appendTo]=\"appendTo\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [showTransitionOptions]=\"showTransitionOptions\"\r\n [hideTransitionOptions]=\"hideTransitionOptions\"\r\n (onAnimationStart)=\"onOverlayAnimationStart($event)\"\r\n (onHide)=\"hide()\"\r\n >\r\n <ng-template caxTemplate=\"content\">\r\n <div [ngClass]=\"'cax-dropdown-panel cax-component'\" [ngStyle]=\"panelStyle\" [class]=\"panelStyleClass\">\r\n <span\r\n #firstHiddenFocusableEl\r\n role=\"presentation\"\r\n class=\"cax-hidden-accessible cax-hidden-focusable\"\r\n [attr.tabindex]=\"0\"\r\n (focus)=\"onFirstHiddenFocus($event)\"\r\n [attr.data-cax-hidden-accessible]=\"true\"\r\n [attr.data-cax-hidden-focusable]=\"true\"\r\n >\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n <div class=\"cax-dropdown-header\" *ngIf=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <ng-container *ngIf=\"filterTemplate; else builtInFilterElement\">\r\n <ng-container *ngTemplateOutlet=\"filterTemplate; context: { options: filterOptions }\"></ng-container>\r\n </ng-container>\r\n <ng-template #builtInFilterElement>\r\n <div class=\"cax-dropdown-filter-container\">\r\n <input\r\n #filter\r\n type=\"text\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n [attr.placeholder]=\"filterPlaceholder || 'Search...'\"\r\n [value]=\"_filterValue() || ''\"\r\n class=\"cax-dropdown-filter cax-inputtext cax-component\"\r\n [ngClass]=\"{ 'cax-variant-filled': variant === 'filled' || config.inputStyle() === 'filled' }\"\r\n [attr.placeholder]=\"filterPlaceholder\"\r\n [attr.aria-owns]=\"id + '_list'\"\r\n (input)=\"onFilterInputChange($event)\"\r\n [attr.aria-label]=\"ariaFilterLabel\"\r\n [attr.aria-activedescendant]=\"focusedOptionId\"\r\n (keydown)=\"onFilterKeyDown($event)\"\r\n (blur)=\"onFilterBlur($event)\"\r\n />\r\n <SearchIcon *ngIf=\"!filterIconTemplate\" [styleClass]=\"'cax-dropdown-filter-icon'\" />\r\n <span *ngIf=\"filterIconTemplate\" class=\"cax-dropdown-filter-icon\">\r\n <ng-template *ngTemplateOutlet=\"filterIconTemplate\"></ng-template>\r\n </span>\r\n <i *ngIf=\"_filterValue()\" class=\"cax cax-close-circle cax-dropdown-filter-clear-icon\" (click)=\"resetFilter()\"></i>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div\r\n class=\"cax-dropdown-items-wrapper\"\r\n [ngStyle]=\"{\r\n 'max-height': virtualScroll ? 'auto' : scrollHeight || 'auto'\r\n }\"\r\n tabindex=\"0\"\r\n >\r\n <cax-scroller\r\n *ngIf=\"virtualScroll\"\r\n #scroller\r\n [items]=\"visibleOptions()\"\r\n [style]=\"{ height: scrollHeight }\"\r\n [itemSize]=\"virtualScrollItemSize || _itemSize\"\r\n [autoSize]=\"true\"\r\n [lazy]=\"lazy\"\r\n (onLazyLoad)=\"onLazyLoad.emit($event)\"\r\n [options]=\"virtualScrollOptions\"\r\n >\r\n <ng-template caxTemplate=\"content\" let-items let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"buildInItems; context: { $implicit: items, options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf=\"loaderTemplate\">\r\n <ng-template caxTemplate=\"loader\" let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"loaderTemplate; context: { options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </cax-scroller>\r\n <ng-container *ngIf=\"!virtualScroll\">\r\n <ng-container *ngTemplateOutlet=\"buildInItems; context: { $implicit: visibleOptions(), options: {} }\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #buildInItems let-items let-scrollerOptions=\"options\">\r\n <ul #items [attr.id]=\"id + '_list'\" [attr.aria-label]=\"listLabel\" class=\"cax-dropdown-items\" [ngClass]=\"scrollerOptions.contentStyleClass\" [ngStyle]=\"scrollerOptions.contentStyle\" role=\"listbox\">\r\n <ng-template ngFor let-option [ngForOf]=\"items\" let-i=\"index\">\r\n <ng-container *ngIf=\"isOptionGroup(option)\">\r\n <li class=\"cax-dropdown-item-group\" [attr.id]=\"id + '_' + getOptionIndex(i, scrollerOptions)\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <span *ngIf=\"!groupTemplate\">{{ getOptionGroupLabel(option.optionGroup) }}</span>\r\n <ng-container *ngTemplateOutlet=\"groupTemplate; context: { $implicit: option.optionGroup }\"></ng-container>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!isOptionGroup(option)\">\r\n <cax-dropdownItem\r\n [id]=\"id + '_' + getOptionIndex(i, scrollerOptions)\"\r\n [option]=\"option\"\r\n [checkmark]=\"checkmark\"\r\n [selected]=\"isSelected(option)\"\r\n [label]=\"getOptionLabel(option)\"\r\n [disabled]=\"isOptionDisabled(option)\"\r\n [template]=\"itemTemplate\"\r\n [focused]=\"focusedOptionIndex() === getOptionIndex(i, scrollerOptions)\"\r\n [ariaPosInset]=\"getAriaPosInset(getOptionIndex(i, scrollerOptions))\"\r\n [ariaSetSize]=\"ariaSetSize\"\r\n (onClick)=\"onOptionSelect($event, option)\"\r\n (onMouseEnter)=\"onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))\"\r\n ></cax-dropdownItem>\r\n </ng-container>\r\n </ng-template>\r\n <li *ngIf=\"filterValue && isEmpty()\" class=\"cax-dropdown-empty-message\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <ng-container *ngIf=\"!emptyFilterTemplate && !emptyTemplate; else emptyFilter\"> {{ emptyFilterMessageLabel }} </ng-container>\r\n <ng-container #emptyFilter *ngTemplateOutlet=\"emptyFilterTemplate || emptyTemplate\"></ng-container>\r\n </li>\r\n <li *ngIf=\"!filterValue && isEmpty()\" class=\"cax-dropdown-empty-message\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <ng-container *ngIf=\"!emptyTemplate; else empty\"> {{ emptyMessageLabel }} </ng-container>\r\n <ng-container #empty *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\r\n </li>\r\n </ul>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n <span\r\n #lastHiddenFocusableEl\r\n role=\"presentation\"\r\n class=\"cax-hidden-accessible cax-hidden-focusable\"\r\n [attr.tabindex]=\"0\"\r\n (focus)=\"onLastHiddenFocus($event)\"\r\n [attr.data-cax-hidden-accessible]=\"true\"\r\n [attr.data-cax-hidden-focusable]=\"true\"\r\n ></span>\r\n </div>\r\n </ng-template>\r\n </cax-overlay>\r\n</div>\r\n", styles: ["@layer cax{.cax-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none;min-width:216px;height:40px}.cax-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.cax-dropdown-main-label{font-weight:500;font-size:14px;line-height:20px;margin-bottom:8px}.cax-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.cax-dropdown-trigger-icon{transition:transform .3s ease}.cax-dropdown-open .cax-dropdown-trigger-icon{transform:rotate(180deg)}.cax-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.cax-dropdown-label-empty{overflow:hidden;opacity:0}input.cax-dropdown-label{cursor:default}.cax-dropdown-items-wrapper{overflow:auto}.cax-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden;font-weight:500}.cax-dropdown-item-group{cursor:auto}.cax-dropdown-items{margin:0;padding:0;list-style-type:none}.cax-fluid .cax-dropdown{display:flex}.cax-fluid .cax-dropdown .cax-dropdown-label{width:1%}.cax-float-label .cax-dropdown .cax-placeholder{opacity:0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "component", type: i3.Overlay, selector: "cax-overlay", inputs: ["visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "listener", "responsive", "options"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone"] }, { kind: "directive", type: i1.CaxTemplate, selector: "[caxTemplate]", inputs: ["type", "caxTemplate"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[caxTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "caxTooltip", "tooltipDisabled", "tooltipOptions", "linkUrl", "linkText"] }, { kind: "ngmodule", type: RippleModule }, { kind: "ngmodule", type: ScrollerModule }, { kind: "component", type: i5.Scroller, selector: "cax-scroller", inputs: ["id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: AutoFocusModule }, { kind: "directive", type: i6.AutoFocus, selector: "[caxAutoFocus]", inputs: ["autofocus"] }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "component", type: ChevronDownIcon, selector: "ChevronDownIcon" }, { kind: "component", type: SearchIcon, selector: "SearchIcon" }, { kind: "component", type: DropdownItem, selector: "cax-dropdownItem", inputs: ["id", "option", "selected", "focused", "label", "disabled", "visible", "itemSize", "ariaPosInset", "ariaSetSize", "template", "checkmark"], outputs: ["onClick", "onMouseEnter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1459
1459
|
}
|
|
1460
1460
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: Dropdown, decorators: [{
|
|
1461
1461
|
type: Component,
|
|
@@ -1463,7 +1463,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
1463
1463
|
class: 'cax-element cax-inputwrapper',
|
|
1464
1464
|
'[class.cax-inputwrapper-filled]': 'filled()',
|
|
1465
1465
|
'[class.cax-inputwrapper-focus]': 'focused || overlayVisible'
|
|
1466
|
-
}, providers: [DROPDOWN_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div [ngClass]=\"{'cax-dropdown-main-label': labelText}\">\r\n <label *ngIf=\"labelText\" [ngClass]=\"labelTextClass\">{{ labelText }}</label>\r\n</div>\r\n<div #container [attr.id]=\"id\" [ngClass]=\"containerClass\" (click)=\"onContainerClick($event)\" [ngStyle]=\"style\" [class]=\"styleClass\">\r\n <span\r\n #focusInput\r\n [ngClass]=\"inputClass\"\r\n *ngIf=\"!editable\"\r\n [caxTooltip]=\"tooltip\"\r\n [tooltipPosition]=\"tooltipPosition\"\r\n [positionStyle]=\"tooltipPositionStyle\"\r\n [tooltipStyleClass]=\"tooltipStyleClass\"\r\n [attr.aria-disabled]=\"disabled\"\r\n [attr.id]=\"inputId\"\r\n role=\"combobox\"\r\n [attr.aria-label]=\"ariaLabel || (label() === 'cax-emptylabel' ? undefined : label())\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-expanded]=\"overlayVisible ?? false\"\r\n [attr.aria-controls]=\"overlayVisible ? id + '_list' : null\"\r\n [attr.tabindex]=\"!disabled ? tabindex : -1\"\r\n caxAutoFocus\r\n [autofocus]=\"autofocus\"\r\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\r\n (focus)=\"onInputFocus($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-required]=\"required\"\r\n [attr.required]=\"required\"\r\n >\r\n <ng-container *ngIf=\"!selectedItemTemplate; else defaultPlaceholder\">{{ label() === 'cax-emptylabel' ? ' ' : label() }}</ng-container>\r\n <ng-container *ngIf=\"selectedItemTemplate && !isSelectedOptionEmpty()\" [ngTemplateOutlet]=\"selectedItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: selectedOption }\"></ng-container>\r\n <ng-template #defaultPlaceholder>\r\n <span *ngIf=\"isSelectedOptionEmpty()\">{{ label() === 'cax-emptylabel' ? ' ' : label() }}</span>\r\n </ng-template>\r\n </span>\r\n <input\r\n *ngIf=\"editable\"\r\n #editableInput\r\n type=\"text\"\r\n [attr.id]=\"inputId\"\r\n [attr.maxlength]=\"maxlength\"\r\n [ngClass]=\"inputClass\"\r\n [disabled]=\"disabled\"\r\n aria-haspopup=\"listbox\"\r\n [attr.placeholder]=\"modelValue() === undefined || modelValue() === null ? placeholder() : undefined\"\r\n [attr.aria-label]=\"ariaLabel || (label() === 'cax-emptylabel' ? undefined : label())\"\r\n (input)=\"onEditableInput($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n caxAutoFocus\r\n [autofocus]=\"autofocus\"\r\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\r\n (focus)=\"onInputFocus($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n />\r\n <ng-container *ngIf=\"isVisibleClearIcon\">\r\n <TimesIcon [styleClass]=\"'cax-dropdown-clear-icon'\" (click)=\"clear($event)\" *ngIf=\"!clearIconTemplate\" [attr.data-pc-section]=\"'clearicon'\" />\r\n <span class=\"cax-dropdown-clear-icon\" (click)=\"clear($event)\" *ngIf=\"clearIconTemplate\" [attr.data-pc-section]=\"'clearicon'\">\r\n <ng-template *ngTemplateOutlet=\"clearIconTemplate\"></ng-template>\r\n </span>\r\n </ng-container>\r\n\r\n <div class=\"cax-dropdown-trigger\" role=\"button\" aria-label=\"dropdown trigger\" (mousedown)=\"onMouseDown($event)\" aria-haspopup=\"listbox\" [attr.aria-expanded]=\"overlayVisible ?? false\" [attr.data-pc-section]=\"'trigger'\">\r\n <ng-container *ngIf=\"loading; else elseBlock\">\r\n <ng-container *ngIf=\"loadingIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"loadingIconTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!loadingIconTemplate\">\r\n <span *ngIf=\"loadingIcon\" [ngClass]=\"'cax-dropdown-trigger-icon pi-spin ' + loadingIcon\" aria-hidden=\"true\"></span>\r\n <span *ngIf=\"!loadingIcon\" [class]=\"'cax-dropdown-trigger-icon pi pi-spinner pi-spin'\" aria-hidden=\"true\"></span>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #elseBlock>\r\n <ng-container *ngIf=\"!dropdownIconTemplate\">\r\n <span class=\"cax-dropdown-trigger-icon\" *ngIf=\"dropdownIcon\" [ngClass]=\"dropdownIcon\"></span>\r\n <ChevronDownIcon *ngIf=\"!dropdownIcon\" [styleClass]=\"'cax-dropdown-trigger-icon'\" />\r\n </ng-container>\r\n <span *ngIf=\"dropdownIconTemplate\" class=\"cax-dropdown-trigger-icon\">\r\n <ng-template *ngTemplateOutlet=\"dropdownIconTemplate\"></ng-template>\r\n </span>\r\n </ng-template>\r\n </div>\r\n\r\n <cax-overlay\r\n #overlay\r\n [(visible)]=\"overlayVisible\"\r\n [options]=\"overlayOptions\"\r\n [target]=\"'@parent'\"\r\n [appendTo]=\"appendTo\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [showTransitionOptions]=\"showTransitionOptions\"\r\n [hideTransitionOptions]=\"hideTransitionOptions\"\r\n (onAnimationStart)=\"onOverlayAnimationStart($event)\"\r\n (onHide)=\"hide()\"\r\n >\r\n <ng-template caxTemplate=\"content\">\r\n <div [ngClass]=\"'cax-dropdown-panel cax-component'\" [ngStyle]=\"panelStyle\" [class]=\"panelStyleClass\">\r\n <span\r\n #firstHiddenFocusableEl\r\n role=\"presentation\"\r\n class=\"cax-hidden-accessible cax-hidden-focusable\"\r\n [attr.tabindex]=\"0\"\r\n (focus)=\"onFirstHiddenFocus($event)\"\r\n [attr.data-cax-hidden-accessible]=\"true\"\r\n [attr.data-cax-hidden-focusable]=\"true\"\r\n >\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n <div class=\"cax-dropdown-header\" *ngIf=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <ng-container *ngIf=\"filterTemplate; else builtInFilterElement\">\r\n <ng-container *ngTemplateOutlet=\"filterTemplate; context: { options: filterOptions }\"></ng-container>\r\n </ng-container>\r\n <ng-template #builtInFilterElement>\r\n <div class=\"cax-dropdown-filter-container\">\r\n <input\r\n #filter\r\n type=\"text\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n [attr.placeholder]=\"filterPlaceholder || 'Search...'\"\r\n [value]=\"_filterValue() || ''\"\r\n class=\"cax-dropdown-filter cax-inputtext cax-component\"\r\n [ngClass]=\"{ 'cax-variant-filled': variant === 'filled' || config.inputStyle() === 'filled' }\"\r\n [attr.placeholder]=\"filterPlaceholder\"\r\n [attr.aria-owns]=\"id + '_list'\"\r\n (input)=\"onFilterInputChange($event)\"\r\n [attr.aria-label]=\"ariaFilterLabel\"\r\n [attr.aria-activedescendant]=\"focusedOptionId\"\r\n (keydown)=\"onFilterKeyDown($event)\"\r\n (blur)=\"onFilterBlur($event)\"\r\n />\r\n <SearchIcon *ngIf=\"!filterIconTemplate\" [styleClass]=\"'cax-dropdown-filter-icon'\" />\r\n <span *ngIf=\"filterIconTemplate\" class=\"cax-dropdown-filter-icon\">\r\n <ng-template *ngTemplateOutlet=\"filterIconTemplate\"></ng-template>\r\n </span>\r\n <i *ngIf=\"_filterValue()\" class=\"cax cax-close-circle cax-dropdown-filter-clear-icon\" (click)=\"resetFilter()\"></i>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div\r\n class=\"cax-dropdown-items-wrapper\"\r\n [ngStyle]=\"{\r\n 'max-height': virtualScroll ? 'auto' : scrollHeight || 'auto'\r\n }\"\r\n tabindex=\"0\"\r\n >\r\n <cax-scroller\r\n *ngIf=\"virtualScroll\"\r\n #scroller\r\n [items]=\"visibleOptions()\"\r\n [style]=\"{ height: scrollHeight }\"\r\n [itemSize]=\"virtualScrollItemSize || _itemSize\"\r\n [autoSize]=\"true\"\r\n [lazy]=\"lazy\"\r\n (onLazyLoad)=\"onLazyLoad.emit($event)\"\r\n [options]=\"virtualScrollOptions\"\r\n >\r\n <ng-template caxTemplate=\"content\" let-items let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"buildInItems; context: { $implicit: items, options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf=\"loaderTemplate\">\r\n <ng-template caxTemplate=\"loader\" let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"loaderTemplate; context: { options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </cax-scroller>\r\n <ng-container *ngIf=\"!virtualScroll\">\r\n <ng-container *ngTemplateOutlet=\"buildInItems; context: { $implicit: visibleOptions(), options: {} }\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #buildInItems let-items let-scrollerOptions=\"options\">\r\n <ul #items [attr.id]=\"id + '_list'\" [attr.aria-label]=\"listLabel\" class=\"cax-dropdown-items\" [ngClass]=\"scrollerOptions.contentStyleClass\" [ngStyle]=\"scrollerOptions.contentStyle\" role=\"listbox\">\r\n <ng-template ngFor let-option [ngForOf]=\"items\" let-i=\"index\">\r\n <ng-container *ngIf=\"isOptionGroup(option)\">\r\n <li class=\"cax-dropdown-item-group\" [attr.id]=\"id + '_' + getOptionIndex(i, scrollerOptions)\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <span *ngIf=\"!groupTemplate\">{{ getOptionGroupLabel(option.optionGroup) }}</span>\r\n <ng-container *ngTemplateOutlet=\"groupTemplate; context: { $implicit: option.optionGroup }\"></ng-container>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!isOptionGroup(option)\">\r\n <cax-dropdownItem\r\n [id]=\"id + '_' + getOptionIndex(i, scrollerOptions)\"\r\n [option]=\"option\"\r\n [checkmark]=\"checkmark\"\r\n [selected]=\"isSelected(option)\"\r\n [label]=\"getOptionLabel(option)\"\r\n [disabled]=\"isOptionDisabled(option)\"\r\n [template]=\"itemTemplate\"\r\n [focused]=\"focusedOptionIndex() === getOptionIndex(i, scrollerOptions)\"\r\n [ariaPosInset]=\"getAriaPosInset(getOptionIndex(i, scrollerOptions))\"\r\n [ariaSetSize]=\"ariaSetSize\"\r\n (onClick)=\"onOptionSelect($event, option)\"\r\n (onMouseEnter)=\"onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))\"\r\n ></cax-dropdownItem>\r\n </ng-container>\r\n </ng-template>\r\n <li *ngIf=\"filterValue && isEmpty()\" class=\"cax-dropdown-empty-message\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <ng-container *ngIf=\"!emptyFilterTemplate && !emptyTemplate; else emptyFilter\"> {{ emptyFilterMessageLabel }} </ng-container>\r\n <ng-container #emptyFilter *ngTemplateOutlet=\"emptyFilterTemplate || emptyTemplate\"></ng-container>\r\n </li>\r\n <li *ngIf=\"!filterValue && isEmpty()\" class=\"cax-dropdown-empty-message\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <ng-container *ngIf=\"!emptyTemplate; else empty\"> {{ emptyMessageLabel }} </ng-container>\r\n <ng-container #empty *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\r\n </li>\r\n </ul>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n <span\r\n #lastHiddenFocusableEl\r\n role=\"presentation\"\r\n class=\"cax-hidden-accessible cax-hidden-focusable\"\r\n [attr.tabindex]=\"0\"\r\n (focus)=\"onLastHiddenFocus($event)\"\r\n [attr.data-cax-hidden-accessible]=\"true\"\r\n [attr.data-cax-hidden-focusable]=\"true\"\r\n ></span>\r\n </div>\r\n </ng-template>\r\n </cax-overlay>\r\n</div>\r\n", styles: ["@layer cax{.cax-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none;min-width:216px;height:40px}.cax-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.cax-dropdown-main-label{font-weight:500;font-size:14px;line-height:20px;margin-bottom:8px}.cax-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.cax-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.cax-dropdown-label-empty{overflow:hidden;opacity:0}input.cax-dropdown-label{cursor:default}.cax-dropdown-items-wrapper{overflow:auto}.cax-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden;font-weight:500}.cax-dropdown-item-group{cursor:auto}.cax-dropdown-items{margin:0;padding:0;list-style-type:none}.cax-fluid .cax-dropdown{display:flex}.cax-fluid .cax-dropdown .cax-dropdown-label{width:1%}.cax-float-label .cax-dropdown .cax-placeholder{opacity:0}}\n"] }]
|
|
1466
|
+
}, providers: [DROPDOWN_VALUE_ACCESSOR], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div [ngClass]=\"{'cax-dropdown-main-label': labelText}\">\r\n <label *ngIf=\"labelText\" [ngClass]=\"labelTextClass\">{{ labelText }}</label>\r\n</div>\r\n<div #container [attr.id]=\"id\" [ngClass]=\"containerClass\" (click)=\"onContainerClick($event)\" [ngStyle]=\"style\" [class]=\"styleClass\">\r\n <span\r\n #focusInput\r\n [ngClass]=\"inputClass\"\r\n *ngIf=\"!editable\"\r\n [caxTooltip]=\"tooltip\"\r\n [tooltipPosition]=\"tooltipPosition\"\r\n [positionStyle]=\"tooltipPositionStyle\"\r\n [tooltipStyleClass]=\"tooltipStyleClass\"\r\n [attr.aria-disabled]=\"disabled\"\r\n [attr.id]=\"inputId\"\r\n role=\"combobox\"\r\n [attr.aria-label]=\"ariaLabel || (label() === 'cax-emptylabel' ? undefined : label())\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy\"\r\n [attr.aria-haspopup]=\"'listbox'\"\r\n [attr.aria-expanded]=\"overlayVisible ?? false\"\r\n [attr.aria-controls]=\"overlayVisible ? id + '_list' : null\"\r\n [attr.tabindex]=\"!disabled ? tabindex : -1\"\r\n caxAutoFocus\r\n [autofocus]=\"autofocus\"\r\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\r\n (focus)=\"onInputFocus($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n [attr.aria-required]=\"required\"\r\n [attr.required]=\"required\"\r\n >\r\n <ng-container *ngIf=\"!selectedItemTemplate; else defaultPlaceholder\">{{ label() === 'cax-emptylabel' ? ' ' : label() }}</ng-container>\r\n <ng-container *ngIf=\"selectedItemTemplate && !isSelectedOptionEmpty()\" [ngTemplateOutlet]=\"selectedItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: selectedOption }\"></ng-container>\r\n <ng-template #defaultPlaceholder>\r\n <span *ngIf=\"isSelectedOptionEmpty()\">{{ label() === 'cax-emptylabel' ? ' ' : label() }}</span>\r\n </ng-template>\r\n </span>\r\n <input\r\n *ngIf=\"editable\"\r\n #editableInput\r\n type=\"text\"\r\n [attr.id]=\"inputId\"\r\n [attr.maxlength]=\"maxlength\"\r\n [ngClass]=\"inputClass\"\r\n [disabled]=\"disabled\"\r\n aria-haspopup=\"listbox\"\r\n [attr.placeholder]=\"modelValue() === undefined || modelValue() === null ? placeholder() : undefined\"\r\n [attr.aria-label]=\"ariaLabel || (label() === 'cax-emptylabel' ? undefined : label())\"\r\n (input)=\"onEditableInput($event)\"\r\n (keydown)=\"onKeyDown($event)\"\r\n caxAutoFocus\r\n [autofocus]=\"autofocus\"\r\n [attr.aria-activedescendant]=\"focused ? focusedOptionId : undefined\"\r\n (focus)=\"onInputFocus($event)\"\r\n (blur)=\"onInputBlur($event)\"\r\n />\r\n <ng-container *ngIf=\"isVisibleClearIcon\">\r\n <TimesIcon [styleClass]=\"'cax-dropdown-clear-icon'\" (click)=\"clear($event)\" *ngIf=\"!clearIconTemplate\" [attr.data-pc-section]=\"'clearicon'\" />\r\n <span class=\"cax-dropdown-clear-icon\" (click)=\"clear($event)\" *ngIf=\"clearIconTemplate\" [attr.data-pc-section]=\"'clearicon'\">\r\n <ng-template *ngTemplateOutlet=\"clearIconTemplate\"></ng-template>\r\n </span>\r\n </ng-container>\r\n\r\n <div class=\"cax-dropdown-trigger\" role=\"button\" aria-label=\"dropdown trigger\" (mousedown)=\"onMouseDown($event)\" aria-haspopup=\"listbox\" [attr.aria-expanded]=\"overlayVisible ?? false\" [attr.data-pc-section]=\"'trigger'\">\r\n <ng-container *ngIf=\"loading; else elseBlock\">\r\n <ng-container *ngIf=\"loadingIconTemplate\">\r\n <ng-container *ngTemplateOutlet=\"loadingIconTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!loadingIconTemplate\">\r\n <span *ngIf=\"loadingIcon\" [ngClass]=\"'cax-dropdown-trigger-icon pi-spin ' + loadingIcon\" aria-hidden=\"true\"></span>\r\n <span *ngIf=\"!loadingIcon\" [class]=\"'cax-dropdown-trigger-icon pi pi-spinner pi-spin'\" aria-hidden=\"true\"></span>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #elseBlock>\r\n <ng-container *ngIf=\"!dropdownIconTemplate\">\r\n <span class=\"cax-dropdown-trigger-icon\" *ngIf=\"dropdownIcon\" [ngClass]=\"dropdownIcon\"></span>\r\n <ChevronDownIcon *ngIf=\"!dropdownIcon\" [styleClass]=\"'cax-dropdown-trigger-icon'\" />\r\n </ng-container>\r\n <span *ngIf=\"dropdownIconTemplate\" class=\"cax-dropdown-trigger-icon\">\r\n <ng-template *ngTemplateOutlet=\"dropdownIconTemplate\"></ng-template>\r\n </span>\r\n </ng-template>\r\n </div>\r\n\r\n <cax-overlay\r\n #overlay\r\n [(visible)]=\"overlayVisible\"\r\n [options]=\"overlayOptions\"\r\n [target]=\"'@parent'\"\r\n [appendTo]=\"appendTo\"\r\n [autoZIndex]=\"autoZIndex\"\r\n [baseZIndex]=\"baseZIndex\"\r\n [showTransitionOptions]=\"showTransitionOptions\"\r\n [hideTransitionOptions]=\"hideTransitionOptions\"\r\n (onAnimationStart)=\"onOverlayAnimationStart($event)\"\r\n (onHide)=\"hide()\"\r\n >\r\n <ng-template caxTemplate=\"content\">\r\n <div [ngClass]=\"'cax-dropdown-panel cax-component'\" [ngStyle]=\"panelStyle\" [class]=\"panelStyleClass\">\r\n <span\r\n #firstHiddenFocusableEl\r\n role=\"presentation\"\r\n class=\"cax-hidden-accessible cax-hidden-focusable\"\r\n [attr.tabindex]=\"0\"\r\n (focus)=\"onFirstHiddenFocus($event)\"\r\n [attr.data-cax-hidden-accessible]=\"true\"\r\n [attr.data-cax-hidden-focusable]=\"true\"\r\n >\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n <div class=\"cax-dropdown-header\" *ngIf=\"filter\" (click)=\"$event.stopPropagation()\">\r\n <ng-container *ngIf=\"filterTemplate; else builtInFilterElement\">\r\n <ng-container *ngTemplateOutlet=\"filterTemplate; context: { options: filterOptions }\"></ng-container>\r\n </ng-container>\r\n <ng-template #builtInFilterElement>\r\n <div class=\"cax-dropdown-filter-container\">\r\n <input\r\n #filter\r\n type=\"text\"\r\n role=\"searchbox\"\r\n autocomplete=\"off\"\r\n [attr.placeholder]=\"filterPlaceholder || 'Search...'\"\r\n [value]=\"_filterValue() || ''\"\r\n class=\"cax-dropdown-filter cax-inputtext cax-component\"\r\n [ngClass]=\"{ 'cax-variant-filled': variant === 'filled' || config.inputStyle() === 'filled' }\"\r\n [attr.placeholder]=\"filterPlaceholder\"\r\n [attr.aria-owns]=\"id + '_list'\"\r\n (input)=\"onFilterInputChange($event)\"\r\n [attr.aria-label]=\"ariaFilterLabel\"\r\n [attr.aria-activedescendant]=\"focusedOptionId\"\r\n (keydown)=\"onFilterKeyDown($event)\"\r\n (blur)=\"onFilterBlur($event)\"\r\n />\r\n <SearchIcon *ngIf=\"!filterIconTemplate\" [styleClass]=\"'cax-dropdown-filter-icon'\" />\r\n <span *ngIf=\"filterIconTemplate\" class=\"cax-dropdown-filter-icon\">\r\n <ng-template *ngTemplateOutlet=\"filterIconTemplate\"></ng-template>\r\n </span>\r\n <i *ngIf=\"_filterValue()\" class=\"cax cax-close-circle cax-dropdown-filter-clear-icon\" (click)=\"resetFilter()\"></i>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div\r\n class=\"cax-dropdown-items-wrapper\"\r\n [ngStyle]=\"{\r\n 'max-height': virtualScroll ? 'auto' : scrollHeight || 'auto'\r\n }\"\r\n tabindex=\"0\"\r\n >\r\n <cax-scroller\r\n *ngIf=\"virtualScroll\"\r\n #scroller\r\n [items]=\"visibleOptions()\"\r\n [style]=\"{ height: scrollHeight }\"\r\n [itemSize]=\"virtualScrollItemSize || _itemSize\"\r\n [autoSize]=\"true\"\r\n [lazy]=\"lazy\"\r\n (onLazyLoad)=\"onLazyLoad.emit($event)\"\r\n [options]=\"virtualScrollOptions\"\r\n >\r\n <ng-template caxTemplate=\"content\" let-items let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"buildInItems; context: { $implicit: items, options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n <ng-container *ngIf=\"loaderTemplate\">\r\n <ng-template caxTemplate=\"loader\" let-scrollerOptions=\"options\">\r\n <ng-container *ngTemplateOutlet=\"loaderTemplate; context: { options: scrollerOptions }\"></ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </cax-scroller>\r\n <ng-container *ngIf=\"!virtualScroll\">\r\n <ng-container *ngTemplateOutlet=\"buildInItems; context: { $implicit: visibleOptions(), options: {} }\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-template #buildInItems let-items let-scrollerOptions=\"options\">\r\n <ul #items [attr.id]=\"id + '_list'\" [attr.aria-label]=\"listLabel\" class=\"cax-dropdown-items\" [ngClass]=\"scrollerOptions.contentStyleClass\" [ngStyle]=\"scrollerOptions.contentStyle\" role=\"listbox\">\r\n <ng-template ngFor let-option [ngForOf]=\"items\" let-i=\"index\">\r\n <ng-container *ngIf=\"isOptionGroup(option)\">\r\n <li class=\"cax-dropdown-item-group\" [attr.id]=\"id + '_' + getOptionIndex(i, scrollerOptions)\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <span *ngIf=\"!groupTemplate\">{{ getOptionGroupLabel(option.optionGroup) }}</span>\r\n <ng-container *ngTemplateOutlet=\"groupTemplate; context: { $implicit: option.optionGroup }\"></ng-container>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!isOptionGroup(option)\">\r\n <cax-dropdownItem\r\n [id]=\"id + '_' + getOptionIndex(i, scrollerOptions)\"\r\n [option]=\"option\"\r\n [checkmark]=\"checkmark\"\r\n [selected]=\"isSelected(option)\"\r\n [label]=\"getOptionLabel(option)\"\r\n [disabled]=\"isOptionDisabled(option)\"\r\n [template]=\"itemTemplate\"\r\n [focused]=\"focusedOptionIndex() === getOptionIndex(i, scrollerOptions)\"\r\n [ariaPosInset]=\"getAriaPosInset(getOptionIndex(i, scrollerOptions))\"\r\n [ariaSetSize]=\"ariaSetSize\"\r\n (onClick)=\"onOptionSelect($event, option)\"\r\n (onMouseEnter)=\"onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))\"\r\n ></cax-dropdownItem>\r\n </ng-container>\r\n </ng-template>\r\n <li *ngIf=\"filterValue && isEmpty()\" class=\"cax-dropdown-empty-message\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <ng-container *ngIf=\"!emptyFilterTemplate && !emptyTemplate; else emptyFilter\"> {{ emptyFilterMessageLabel }} </ng-container>\r\n <ng-container #emptyFilter *ngTemplateOutlet=\"emptyFilterTemplate || emptyTemplate\"></ng-container>\r\n </li>\r\n <li *ngIf=\"!filterValue && isEmpty()\" class=\"cax-dropdown-empty-message\" [ngStyle]=\"{ height: scrollerOptions.itemSize + 'px' }\" role=\"option\">\r\n <ng-container *ngIf=\"!emptyTemplate; else empty\"> {{ emptyMessageLabel }} </ng-container>\r\n <ng-container #empty *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\r\n </li>\r\n </ul>\r\n </ng-template>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n <span\r\n #lastHiddenFocusableEl\r\n role=\"presentation\"\r\n class=\"cax-hidden-accessible cax-hidden-focusable\"\r\n [attr.tabindex]=\"0\"\r\n (focus)=\"onLastHiddenFocus($event)\"\r\n [attr.data-cax-hidden-accessible]=\"true\"\r\n [attr.data-cax-hidden-focusable]=\"true\"\r\n ></span>\r\n </div>\r\n </ng-template>\r\n </cax-overlay>\r\n</div>\r\n", styles: ["@layer cax{.cax-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none;min-width:216px;height:40px}.cax-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.cax-dropdown-main-label{font-weight:500;font-size:14px;line-height:20px;margin-bottom:8px}.cax-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.cax-dropdown-trigger-icon{transition:transform .3s ease}.cax-dropdown-open .cax-dropdown-trigger-icon{transform:rotate(180deg)}.cax-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.cax-dropdown-label-empty{overflow:hidden;opacity:0}input.cax-dropdown-label{cursor:default}.cax-dropdown-items-wrapper{overflow:auto}.cax-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden;font-weight:500}.cax-dropdown-item-group{cursor:auto}.cax-dropdown-items{margin:0;padding:0;list-style-type:none}.cax-fluid .cax-dropdown{display:flex}.cax-fluid .cax-dropdown .cax-dropdown-label{width:1%}.cax-float-label .cax-dropdown .cax-placeholder{opacity:0}}\n"] }]
|
|
1467
1467
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1.FilterService }, { type: i1.caxConfig }], propDecorators: { id: [{
|
|
1468
1468
|
type: Input
|
|
1469
1469
|
}], scrollHeight: [{
|