UNPKG

@inaccess-fang/ui-components

Version:

The Inaccess UI Components Library for the Front-end projects

2 lines 27.6 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/common/http"),require("rxjs/operators"),require("@angular/cdk/overlay"),require("@angular/cdk/scrolling"),require("@angular/forms"),require("tippy.js"),require("rxjs"),require("popper.js")):"function"==typeof define&&define.amd?define("@inaccess-fang/ui-components",["exports","@angular/core","@angular/common","@angular/common/http","rxjs/operators","@angular/cdk/overlay","@angular/cdk/scrolling","@angular/forms","tippy.js","rxjs","popper.js"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self)["inaccess-fang"]=t["inaccess-fang"]||{},t["inaccess-fang"]["ui-components"]={}),t.ng.core,t.ng.common,t.ng.common.http,t.rxjs.operators,t.ng.cdk.overlay,t.ng.cdk.scrolling,t.ng.forms,t.tippy,t.rxjs,t.Popper)}(this,(function(t,e,n,o,i,r,s,a,c,p,l){"use strict";function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=u(c),f=u(l),h=function(){function t(){this.active=!1}return t.prototype.ngOnInit=function(){console.log("FangTabComponent [ngOnInit]")},t}();h.decorators=[{type:e.Component,args:[{selector:"fang-tab",template:'<div [hidden]="!active">\n\t<ng-content></ng-content>\n</div>\n',encapsulation:e.ViewEncapsulation.ShadowDom,changeDetection:e.ChangeDetectionStrategy.Default,styles:[":host{display:block;height:inherit}"]}]}],h.ctorParameters=function(){return[]},h.propDecorators={title:[{type:e.Input,args:["tabTitle"]}]};var g=function(){function t(t){this._changeDetectorRef=t,this.selectedTabChanged=new e.EventEmitter}return t.prototype.ngOnInit=function(){console.log("FangMultiTabsComponent [ngOnInit]")},t.prototype.ngAfterViewInit=function(){var t=this;this.tabs.length&&!this.tabs.first.active&&this.selectTab(this.tabs.first),this._changesSubscription$=this.tabs.changes.pipe(i.filter((function(t){return t.first}))).subscribe((function(){return t.selectTab(t.tabs.first)}))},t.prototype.ngOnDestroy=function(){this._changesSubscription$.unsubscribe()},t.prototype.selectTab=function(t){console.log("FangMultiTabsComponent [selectTab]"),this.tabs.toArray().map((function(t){return t.active=!1})),t.active=!0,this.selectedTabChanged.emit(),this._changeDetectorRef.detectChanges()},t}();g.decorators=[{type:e.Component,args:[{selector:"fang-multi-tabs",template:'<ul class="fang-multi-tabs">\n\t<li *ngFor="let tab of tabs.toArray()"\n\t\t[class.fang-tab-active]="tab.active"\n\t\t(click)="selectTab(tab)"\n\t\tclass="fang-tab">\n\t\t<a class="fang-tab-header">{{tab.title}}</a>\n\t</li>\n</ul>\n<ng-content></ng-content>\n',changeDetection:e.ChangeDetectionStrategy.Default,styles:[".fang-multi-tabs{display:flex;margin:0 8px;padding:0}.fang-tab{border-bottom:2px solid #ceeaf2;display:inline-flex;flex-grow:1;justify-content:space-around;padding:6px}.fang-tab-active,.fang-tab:focus{outline-color:transparent}.fang-tab-active{border-bottom:2px solid #519eae}.fang-tab-header{color:#6a6a6a;cursor:pointer;font-size:.85em;font-weight:600;text-transform:uppercase}"]}]}],g.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},g.propDecorators={tabs:[{type:e.ContentChildren,args:[h]}],selectedTabChanged:[{type:e.Output}]};var m=function(){};m.decorators=[{type:e.NgModule,args:[{declarations:[g,h],imports:[n.CommonModule,o.HttpClientModule],exports:[g,h],providers:[]}]}];var y=function(){function t(t){var e=this;this.cdkVirtualScrollViewport=t;var n=window.ResizeObserver;n&&(this.resizeObserver=new n((function(){return e.cdkVirtualScrollViewport.checkViewportSize()})),this.resizeObserver.observe(this.cdkVirtualScrollViewport.elementRef.nativeElement))}return t.prototype.ngOnDestroy=function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=null},t}();y.decorators=[{type:e.Directive,args:[{selector:"cdk-virtual-scroll-viewport[viewport-auto-resize], fang-table-virtual-scroll-viewport[viewport-auto-resize]"}]}],y.ctorParameters=function(){return[{type:s.CdkVirtualScrollViewport}]};var v=[y],w=function(){};w.decorators=[{type:e.NgModule,args:[{declarations:v,imports:[],exports:v,providers:[r.ScrollDispatcher]}]}];var b="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},D=Array.prototype,C=Object.prototype,x=("undefined"!=typeof Symbol&&Symbol.prototype,D.push,D.slice,C.toString),I=C.hasOwnProperty,S="undefined"!=typeof ArrayBuffer,O=Array.isArray,E=Object.keys,A=(Object.create,S&&ArrayBuffer.isView,isNaN,isFinite,!{toString:null}.propertyIsEnumerable("toString")),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],P=Math.pow(2,53)-1;function k(t){return t instanceof k?t:this instanceof k?void(this._wrapped=t):new k(t)}function G(t){return t}function T(t){return function(e){return x.call(e)==="[object "+t+"]"}}k.VERSION="1.11.0",k.prototype.value=function(){return this._wrapped},k.prototype.valueOf=k.prototype.toJSON=k.prototype.value,k.prototype.toString=function(){return String(this._wrapped)};var V=T("Function"),R=b.document&&b.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof R&&(V=function(t){return"function"==typeof t||!1});var F=V;function j(t){var e=typeof t;return"function"===e||"object"===e&&!!t}var L=O||T("Array");function N(t,e){return null!=t&&I.call(t,e)}function z(t){if(!j(t))return[];if(E)return E(t);var e=[];for(var n in t)N(t,n)&&e.push(n);return A&&function(t,e){e=function(t){for(var e={},n=t.length,o=0;o<n;++o)e[t[o]]=!0;return{contains:function(t){return e[t]},push:function(n){return e[n]=!0,t.push(n)}}}(e);var n=M.length,o=t.constructor,i=F(o)&&o.prototype||C,r="constructor";for(N(t,r)&&!e.contains(r)&&e.push(r);n--;)(r=M[n])in t&&t[r]!==i[r]&&!e.contains(r)&&e.push(r)}(t,e),e}var $,_,q=($=z,function(t){var e=arguments.length;if(_&&(t=Object(t)),e<2||null==t)return t;for(var n=1;n<e;n++)for(var o=arguments[n],i=$(o),r=i.length,s=0;s<r;s++){var a=i[s];_&&void 0!==t[a]||(t[a]=o[a])}return t});function B(t){return t=q({},t),function(e){return function(t,e){var n=z(e),o=n.length;if(null==t)return!o;for(var i=Object(t),r=0;r<o;r++){var s=n[r];if(e[s]!==i[s]||!(s in i))return!1}return!0}(e,t)}}function K(t){return t=function(t){return k.toPath(t)}(t),function(e){return function(t,e){for(var n=e.length,o=0;o<n;o++){if(null==t)return;t=t[e[o]]}return n?t:void 0}(e,t)}}function W(t,e,n){return null==t?G:F(t)?function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,o,i){return t.call(e,n,o,i)};case 4:return function(n,o,i,r){return t.call(e,n,o,i,r)}}return function(){return t.apply(e,arguments)}}(t,e,n):j(t)&&!L(t)?B(t):K(t)}function H(t,e){return W(t,e,1/0)}function J(t,e,n){return k.iteratee!==H?k.iteratee(t,e):W(t,e,n)}k.toPath=function(t){return L(t)?t:[t]},k.iteratee=H;var U,Q,X=(U="length",function(t){return null==t?void 0:t[U]}),Y=(Q=X,function(t){var e=Q(t);return"number"==typeof e&&e>=0&&e<=P});function Z(t,e,n){e=J(e,n);for(var o=!Y(t)&&z(t),i=(o||t).length,r=Array(i),s=0;s<i;s++){var a=o?o[s]:s;r[s]=e(t[a],a,t)}return r}function tt(t,e,n){var o=0;return e=J(e,n),function(t,e){return Z(t,K(e))}(Z(t,(function(t,n,i){return{value:t,index:o++,criteria:e(t,n,i)}})).sort((function(t,e){var n=t.criteria,o=e.criteria;if(n!==o){if(n>o||void 0===n)return 1;if(n<o||void 0===o)return-1}return t.index-e.index})),"value")}var et=function(){function t(){this.dataChange=new e.EventEmitter,this.chipGroupDataChange=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){var e=this;t.data&&(this.cursor="select"===this.config.interaction?"pointer":"default",this.chipGroupData=this.data.reduce((function(t,n,o){var i;return i="select"!==e.config.interaction||e.chipGroupData&&e.chipGroupData[o]&&e.chipGroupData[o].selected,t.push({displayValue:e.config.propertyAccessKey?n[e.config.propertyAccessKey]:n,selected:i}),t}),[]),this.chipGroupData=this.sortData(this.chipGroupData),this.chipGroupDataChange.emit(this.chipGroupData))},t.prototype.removeChip=function(t,e){var n=this;t.stopPropagation(),this.chipGroupData=this.chipGroupData.filter((function(t){return t.displayValue!==e.displayValue})),this.chipGroupData=this.sortData(this.chipGroupData);var o=this.data.filter((function(t){return n.config.propertyAccessKey?t[n.config.propertyAccessKey]===e.displayValue:t===e.displayValue}))[0];this.dataChange.emit(o),this.chipGroupDataChange.emit(this.chipGroupData)},t.prototype.toggleChipSelection=function(t){this.chipGroupData[t].selected=!this.chipGroupData[t].selected},t.prototype.sortData=function(t){return tt(t,["displayValue"])},t}();et.decorators=[{type:e.Component,args:[{selector:"fang-chip-group",template:'<div *ngIf="chipGroupData && chipGroupData.length"\n\t [ngClass]="{\'no-wrap\': config.hasWrap !== undefined && !config.hasWrap}"\n\t class="{{config.alignment ? config.alignment: \'group-inline\'}}\n\t {{config.chipGroupBackground}}"\n>\n\t<div *ngFor="let chip of chipGroupData; let chipIndex = index"\n\t\t [ngClass]="{\'selected\': chip.selected}"\n\t\t class="{{config.chipBackground ? config.chipBackground : \'chip-light\'}}"\n\t\t (click)="config.interaction === \'select\' && toggleChipSelection(chipIndex)">\n\n\t\t<p [ngClass]="{\'text-truncate-100\': config.hasTextTruncate}"\n\t\t title="{{chip.displayValue}}" style="pointer-events: auto;">\n\t\t\t{{chip.displayValue}}\n\t\t</p>\n\n\t\t<i *ngIf="config.interaction && config.interaction === \'close\'"\n\t\t class="ic-close"\n\t\t style="pointer-events: auto !important"\n\t\t (click)="removeChip($event,chip)">\n\t\t</i>\n\t</div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{max-height:650px}::-webkit-scrollbar{background-color:#fff;border:none;border-left:1px solid hsla(0,0%,88.6%,.4);width:12px}"]}]}],et.propDecorators={cursor:[{type:e.HostBinding,args:["style.cursor"]}],data:[{type:e.Input}],config:[{type:e.Input}],dataChange:[{type:e.Output}],chipGroupDataChange:[{type:e.Output}]};var nt=function(){};nt.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule],exports:[et],declarations:[et],providers:[],entryComponents:[et]}]}];var ot=function(){function t(){this.config={},this.filteredDataChange=new e.EventEmitter,this.inputTextChange=new e.EventEmitter,this.inputText=""}return t.prototype.filterInputElements=function(){var t=this;this.data&&(this.filteredData=this.data.filter((function(e){return t.inputText.toLowerCase().split(" ").every((function(n){return(t.config.searchBy?e[t.config.searchBy]:e).toString().toLowerCase().includes(n)}))})),this.filteredDataChange.emit(this.filteredData)),this.inputTextChange.emit(this.inputText)},t.prototype.clearInputText=function(t){t&&t.stopPropagation(),this.inputText="",this.filterInputElements()},t}();ot.decorators=[{type:e.Component,args:[{selector:"fang-search",template:'<div class="input">\n\t<input type="text"\n\t\t [(ngModel)]="inputText"\n\t\t (ngModelChange)="filterInputElements()"\n\t\t placeholder="{{config?.placeholder ? config.placeholder : \'Search...\'}}"/>\n\t<i class="ic-close " *ngIf="inputText.length"\n\t (click)="clearInputText($event)"\n\t></i>\n</div>\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[""]}]}],ot.propDecorators={data:[{type:e.Input}],config:[{type:e.Input}],filteredDataChange:[{type:e.Output}],inputTextChange:[{type:e.Output}]};var it=function(){};it.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,a.FormsModule],exports:[ot],declarations:[ot],providers:[],entryComponents:[ot]}]}];Object.create;function rt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function st(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(rt(arguments[e]));return t}Object.create;var at={default:"dropdown-wrapper",compact:"dropdown-wrapper-sm",large:"dropdown-wrapper-lg"},ct=function(){function t(){this.config={},this.selectedItemsChanged=new e.EventEmitter,this.isDropdownOpen=!1,this.selectedItems=[],this.searchInputText=""}return t.prototype.ngOnChanges=function(t){var e=this;t.data&&(this.config.hasChipGroup&&this.config.chipGroupConfig&&(this.config.chipGroupConfig.propertyAccessKey=this.config.propertyAccessKey,this.config.chipGroupConfig.interaction="close"),this.dropdownData=st(this.data).map((function(t){return e.getPropertyValue(t)})),this.filteredDropdownData=st(this.dropdownData),this.filteredDropdownData=this.sortData(this.filteredDropdownData)),t.config.isFirstChange()&&(this.config.type||(this.config.type="default"),void 0===this.config.isGrowable&&(this.config.isGrowable=!0),this.config.isPortfolio&&(this.config.hasContainer=!1,this.config.chipGroupConfig.alignment="group-inline",this.config.chipGroupConfig.chipBackground=void 0))},t.prototype.selectItem=function(t){var e=this;if(this.config.hasMultiSelect){var n=this.selectedItems.find((function(n){return e.getPropertyValue(n)===t}));this.selectedItems=n?this.selectedItems.filter((function(n){return e.getPropertyValue(n)!==t})):st(this.selectedItems,[this.data.find((function(n){return e.getPropertyValue(n)===t}))]),this.config.hasChipGroup&&this.config.chipGroupConfig&&(this.dropdownData=this.dropdownData.filter((function(e){return e!==t})),this.filteredDropdownData=this.filteredDropdownData.filter((function(e){return e!==t})),this.filteredDropdownData=this.sortData(this.filteredDropdownData)),this.selectedItemsChanged.emit(this.selectedItems)}else this.selectedItems=[this.data.find((function(n){return e.getPropertyValue(n)===t}))],this.isDropdownOpen=!1,this.selectedItemsChanged.emit(this.selectedItems)},t.prototype.toggleDropdown=function(t,e){void 0===t&&(t=!1),void 0===e&&(e=void 0),e&&e.stopPropagation(),(t||!this.config.hasChipGroup||this.config.hasChipGroup&&!this.selectedItems.length&&!t)&&(this.isDropdownOpen=!this.isDropdownOpen)},t.prototype.getPropertyValue=function(t){return this.config.propertyAccessKey?t[this.config.propertyAccessKey]:t},t.prototype.isItemSelected=function(t){var e=this;return this.selectedItems.find((function(n){return e.getPropertyValue(n)===t}))},t.prototype.removeChip=function(t){this.selectedItems=this.selectedItems.filter((function(e){return e!==t})),this.config.hasChipGroup&&this.config.chipGroupConfig&&(this.dropdownData=st(this.dropdownData,[this.getPropertyValue(t)]),this.filteredDropdownData=st(this.filteredDropdownData,[this.getPropertyValue(t)]),this.filteredDropdownData=this.sortData(this.filteredDropdownData))},t.prototype.getConcatSelectedItems=function(t){var e=this;return t.map((function(t){return e.getPropertyValue(t)})).join(", ")},t.prototype.selectAll=function(){var t=this;this.selectedItems=st(this.data),this.config.hasChipGroup?(this.dropdownData=[],this.filteredDropdownData=[]):this.dropdownData=this.selectedItems.map((function(e){return t.getPropertyValue(e)}))},t.prototype.clearAll=function(){var t=this;this.selectedItems=[],this.config.hasChipGroup&&(this.dropdownData=st(this.data).map((function(e){return t.getPropertyValue(e)})),this.filteredDropdownData=st(this.dropdownData),this.filteredDropdownData=this.sortData(this.filteredDropdownData))},t.prototype.proceedToSelection=function(t,e){var n=this;void 0===e&&(e=void 0),e&&e.stopPropagation(),(this.selectedItems.find((function(e){return n.getPropertyValue(e)===t}))||this.config.multiActions&&this.config.multiActions.selectLimit&&this.config.multiActions.selectLimit>this.selectedItems.length||this.config.multiActions&&!this.config.multiActions.selectLimit||!this.config.multiActions)&&this.selectItem(t)},t.prototype.sortData=function(t){return tt(t)},t.prototype.getDropdownSize=function(){return at[this.config.type]},t.prototype.totalSelectedItems=function(){return this.config.titleConfig&&this.config.titleConfig.isTitleConcatenated?this.config.multiActions&&this.config.multiActions.selectLimit?this.getConcatSelectedItems(this.selectedItems)+" ("+this.selectedItems.length+"/"+this.config.multiActions.selectLimit+")":this.getConcatSelectedItems(this.selectedItems)+" ("+this.selectedItems.length+")":this.config.multiActions&&this.config.multiActions.selectLimit?"Total Selected ("+this.selectedItems.length+"/"+this.config.multiActions.selectLimit+")":"Total Selected ("+this.selectedItems.length+")"},t}();ct.decorators=[{type:e.Component,args:[{selector:"fang-dropdown",template:'<div uds-ui class="light-theme" (clickOutsideElement)="isDropdownOpen=false">\n\t<div class=" {{getDropdownSize()}}"\n\t\t [ngClass]="{\'no-container \': config.hasContainer !== undefined && !config.hasContainer,\n\t\t\t\t\t \'reverse\': config.isPortfolio,\n\t\t\t\t\t \'grow\': config.isGrowable && !config.isPortfolio}"\n\t\t style="margin: 0 12px">\n\t\t<div class="input" (click)="toggleDropdown(false)">\n\n\t\t\t\x3c!-- Single Item Select --\x3e\n\t\t\t<ng-container *ngIf="!config.hasMultiSelect">\n\t\t\t\t<p *ngIf="!selectedItems.length" class="text-placeholder">\n\t\t\t\t\t{{config.titleConfig && config.titleConfig.placeholder ? config.titleConfig.placeholder : \'Select item...\'}}\n\t\t\t\t</p>\n\t\t\t\t<p *ngIf="selectedItems.length">{{getPropertyValue(selectedItems[0])}}</p>\n\t\t\t</ng-container>\n\n\t\t\t\x3c!-- Multi Item Select --\x3e\n\t\t\t<ng-container *ngIf="config.hasMultiSelect">\n\t\t\t\t\x3c!-- CheckList --\x3e\n\t\t\t\t<p *ngIf="!selectedItems.length && !config.isPortfolio" class="text-placeholder">\n\t\t\t\t\t{{config.titleConfig && config.titleConfig.placeholder ? config.titleConfig.placeholder : \'Select items...\'}}\n\t\t\t\t</p>\n\n\t\t\t\t\x3c!-- Multi Select title --\x3e\n\t\t\t\t<ng-container *ngIf="selectedItems.length && !config.hasChipGroup">\n\t\t\t\t\t<p>{{totalSelectedItems()}}</p>\n\t\t\t\t</ng-container>\n\n\t\t\t\t\x3c!-- Portfolio title --\x3e\n\t\t\t\t<ng-container *ngIf="!selectedItems.length && config.isPortfolio">\n\t\t\t\t\t<p>PORTFOLIOS</p>\n\t\t\t\t</ng-container>\n\n\t\t\t\t\x3c!-- Chip Group & Portfolio --\x3e\n\t\t\t\t<fang-chip-group *ngIf="config.hasChipGroup && this.selectedItems.length"\n\t\t\t\t\t\t\t\t [data]="this.selectedItems"\n\t\t\t\t\t\t\t\t [config]="config.chipGroupConfig"\n\t\t\t\t\t\t\t\t (dataChange)="removeChip($event)">\n\t\t\t\t</fang-chip-group>\n\t\t\t</ng-container>\n\n\t\t\t\x3c!-- Arrow\t--\x3e\n\t\t\t<button class="btn-icon grow" (click)="toggleDropdown(true,$event)">\n\t\t\t\t<i [ngClass]="{\'ic-caret-down-sm\': !isDropdownOpen, \'ic-caret-up-sm\': isDropdownOpen}"></i>\n\t\t\t</button>\n\t\t</div>\n\n\t\t<div class="dropdown-container">\n\t\t\t\x3c!-- Multi Actions --\x3e\n\t\t\t<div class="dropdown-header">\n\t\t\t\t<div class="dropdown-header-select" *ngIf="isDropdownOpen && config.hasMultiActions && config.multiActions">\n\t\t\t\t\t<button *ngIf="config.multiActions.hasClearAll"\n\t\t\t\t\t\t\t[disabled]="!selectedItems.length"\n\t\t\t\t\t\t\tclass="btn-secondary-sm"\n\t\t\t\t\t\t\t(click)="clearAll()">\n\t\t\t\t\t\tclearAll\n\t\t\t\t\t</button>\n\t\t\t\t\t<button [disabled]="!(dropdownData && dropdownData.length && ((dropdownData.length <= config.multiActions.selectLimit) || config.multiActions.selectLimit === undefined))\n\t\t\t\t\t\t\t\t\t\t|| (selectedItems.length === dropdownData.length)"\n\t\t\t\t\t\t\tclass="btn-primary-sm"\n\t\t\t\t\t\t\t(click)="(selectedItems.length !== dropdownData.length) && selectAll()">\n\t\t\t\t\t\tselectAll\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\n\t\t\t\t\x3c!-- Search field --\x3e\n\t\t\t\t<div *ngIf="config.hasSearchField"\n\t\t\t\t\t [hidden]="!isDropdownOpen || !dropdownData.length"\n\t\t\t\t\t class="dropdown-header-search">\n\t\t\t\t\t<fang-search [data]="dropdownData"\n\t\t\t\t\t\t\t\t [config]="config.searchFieldConfig"\n\t\t\t\t\t\t\t\t (filteredDataChange)="filteredDropdownData = $event"\n\t\t\t\t\t\t\t\t (inputTextChange)="searchInputText = $event">\n\t\t\t\t\t</fang-search>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t\x3c!-- Dropdown List\t--\x3e\n\t\t\t<div class="dropdown-body" *ngIf="isDropdownOpen">\n\t\t\t\t<div *ngFor="let item of filteredDropdownData"\n\t\t\t\t\t class="dropdown-option"\n\t\t\t\t\t [ngClass]="{\'select\': config.hasMultiSelect && isItemSelected(item)}"\n\t\t\t\t\t (click)="proceedToSelection(item,$event)">\n\t\t\t\t\t<p>{{item}}</p>\n\t\t\t\t\t<i *ngIf="config.hasMultiSelect && isItemSelected(item)" class="ic-check"> </i>\n\t\t\t\t</div>\n\t\t\t\t<p *ngIf="!filteredDropdownData.length && searchInputText.length" class="no-options">No results found</p>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[""]}]}],ct.propDecorators={data:[{type:e.Input}],config:[{type:e.Input}],selectedItemsChanged:[{type:e.Output}]},d.default.setDefaultProps({ignoreAttributes:!0,arrow:!1,maxWidth:"300px",trigger:"mouseenter",zIndex:99999});var pt=function(){function t(t){this.el=t}return t.prototype.ngOnChanges=function(t){t.options&&(this.options&&!this.instance?this.instance=d.default(this.el.nativeElement,this.options):this.options&&this.instance?this.instance.setProps(this.options):this.options&&this.options.content||!this.instance||(this.instance.destroy(),this.instance=void 0)),t.content&&this.instance&&this.instance.setContent(this.content)},t.prototype.ngOnDestroy=function(){this.instance&&this.instance.destroy()},t}();pt.decorators=[{type:e.Directive,args:[{selector:"[fang-popover]"}]}],pt.ctorParameters=function(){return[{type:e.ElementRef}]},pt.propDecorators={options:[{type:e.Input,args:["fang-popover"]}],content:[{type:e.Input,args:["content"]}]};var lt=function(){};lt.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule],exports:[pt],declarations:[pt],providers:[],entryComponents:[]}]}];var ut=function(){function t(t){this._elementRef=t,this.clickOutsideElement=new e.EventEmitter}return t.prototype.onClick=function(t,e){e&&(this._elementRef.nativeElement.contains(e)||this.clickOutsideElement.emit(t))},t}();ut.decorators=[{type:e.Directive,args:[{selector:"[clickOutsideElement]"}]}],ut.ctorParameters=function(){return[{type:e.ElementRef}]},ut.propDecorators={clickOutsideElement:[{type:e.Output}],onClick:[{type:e.HostListener,args:["document:click",["$event","$event.target"]]}]};var dt=function(){};dt.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule],exports:[ut],declarations:[ut],providers:[],entryComponents:[]}]}];var ft=function(){};ft.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,lt,dt],exports:[lt,dt],declarations:[],providers:[],entryComponents:[]}]}];var ht=function(){};ht.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,nt,it,ft],exports:[ct],declarations:[ct],providers:[],entryComponents:[ct]}]}];var gt=function(){function t(){this.onSelect=new e.EventEmitter}return t.prototype.selectElement=function(t){this.onSelect.emit(t)},t}();gt.decorators=[{type:e.Component,args:[{selector:"autocomplete-dropdown",template:'<div class="dropdown-list">\n\t<div *ngFor="let el of dropdownElements; let i=index"\n\t\t class="dropdown-item"\n\t\t (click)="selectElement(el)">\n\t\t{{el}}\n\t</div>\n</div>\n',styles:[":host{background-clip:padding-box;border:1px solid #bdbdc3;border-radius:4px;border-top:0;box-shadow:4px 4px 4px rgba(0,0,0,.12),0 1px 4px rgba(0,0,0,.24);display:block;flex-direction:column;margin:2px 0 2px 1px;overflow:hidden;z-index:9999999999}.dropdown-list,:host{background-color:#fff}.dropdown-list{flex-grow:1;height:100%;max-height:20vh;overflow-x:hidden;overflow-y:auto;position:relative;width:100%;will-change:transform,scroll-position}.dropdown-item{align-items:center;color:#333;cursor:pointer;display:flex;flex-direction:row;justify-content:space-between;padding:8px}.dropdown-item:hover{background-color:#f5f5f5}"]}]}],gt.propDecorators={dropdownElements:[{type:e.Input}],onSelect:[{type:e.Output}]};var mt=function(){function t(t,e,n,o,i){this.element=t,this.factoryResolver=e,this.viewContainerRef=n,this._changeDetectorRef=o,this.ngModel=i,this.dropdownElements$=new p.ReplaySubject(1),this.popperConfig={placement:"bottom",positionFixed:!0,modifiers:{preventOverflow:{enabled:!0,boundariesElement:"window"},setWidth:{enabled:!0,order:840,fn:function(t){return t.offsets.popper.left=t.offsets.reference.left,t.offsets.popper.right=t.offsets.reference.right,t.offsets.popper.width=t.styles.width=Math.round(t.offsets.reference.width),t}}}}}return Object.defineProperty(t.prototype,"dropdownElements",{set:function(t){this.dropdownElements$.next(t||[])},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;p.fromEvent(document,"click",{passive:!0}).pipe(i.filter((function(){return!!t.componentRef&&"none"!==t.componentRef.location.nativeElement.style.display}))).subscribe((function(e){t.element.nativeElement.contains(e.target)||(t.componentRef.location.nativeElement.style.display="none")})),this._changeDetectorRef.detectChanges()},t.prototype.ngAfterContentInit=function(){var t=this;this.ngModel&&(this.input=this.ngModel.control,this.autocompleteSubscription=p.combineLatest(this.dropdownElements$.asObservable(),p.fromEvent(this.element.nativeElement,"focus",{passive:!0}),p.fromEvent(this.element.nativeElement,"keyup",{passive:!0})).subscribe((function(e){var n=rt(e,3),o=n[0],i=n[1],r=n[2];if(console.log(o,i,r),!t.componentRef){var s=t.factoryResolver.resolveComponentFactory(gt);t.componentRef=t.viewContainerRef.createComponent(s),t.componentRef.location.nativeElement.style.display="none",t.dropdownPopper=new f.default(t.element.nativeElement,t.componentRef.location.nativeElement,t.popperConfig),t.inputChangesSubscription=t.componentRef.instance.onSelect.subscribe((function(e){t.input.setValue(e)}))}var a=i.target.value,c=a&&a.toLocaleLowerCase(),p=o.slice().filter((function(t){return t.toLowerCase().startsWith(c)})),l=o.slice().map((function(t){return t.toLowerCase()})).filter((function(t){return t.startsWith(c)}));a&&a.length>0&&(l.length>1||!l.includes(c))?(t.componentRef.location.nativeElement.style.display="block",t.componentRef.instance.dropdownElements=p,t.componentRef.changeDetectorRef.detectChanges(),t.dropdownPopper.scheduleUpdate()):t.componentRef.location.nativeElement.style.display="none"}))),this._changeDetectorRef.detectChanges()},t.prototype.ngOnDestroy=function(){this.dropdownPopper&&this.dropdownPopper.destroy(),this.autocompleteSubscription&&this.autocompleteSubscription.unsubscribe(),this.inputChangesSubscription&&this.inputChangesSubscription.unsubscribe()},t}();mt.decorators=[{type:e.Directive,args:[{selector:"[autoComplete][ngModel]"}]}],mt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ComponentFactoryResolver},{type:e.ViewContainerRef},{type:e.ChangeDetectorRef},{type:a.NgModel}]},mt.propDecorators={dropdownElements:[{type:e.Input,args:["autoComplete"]}]};var yt=function(){};yt.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,a.FormsModule],exports:[mt],declarations:[gt,mt],providers:[],entryComponents:[gt]}]}],t.FangAutocompleteModule=yt,t.FangChipGroupComponent=et,t.FangChipGroupModule=nt,t.FangDropdownComponent=ct,t.FangDropdownModule=ht,t.FangMultiTabsComponent=g,t.FangMultiTabsModule=m,t.FangSearchComponent=ot,t.FangSearchModule=it,t.FangTabComponent=h,t.FangViewportAutoResizeDirective=y,t.FangVirtualScrollingModule=w,t.ɵa=ft,t.ɵb=lt,t.ɵc=pt,t.ɵd=dt,t.ɵe=ut,t.ɵf=mt,t.ɵg=gt,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=inaccess-fang-ui-components.umd.min.js.map