@datorama/core 22.2.6 → 22.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.scss +22 -0
- package/bundles/datorama-core.umd.js +17 -11
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +3 -3
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/date-picker/date-picker-container/date-picker-container.component.js +5 -5
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +1 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +1 -1
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -1
- package/esm2015/lib/select/select.component.js +12 -7
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/date-picker/date-picker-container/date-picker-container.component.js +5 -5
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +1 -1
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +1 -1
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
- package/esm5/lib/grid-v2/grid-store/grid.service.js +1 -1
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -1
- package/esm5/lib/select/select.component.js +13 -7
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +16 -11
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +17 -11
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/date-picker/date-picker-container/date-picker-container.component.d.ts +1 -1
- package/lib/select/select.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -236,7 +236,7 @@ function ui(){return'\n <div class="dato-checkbox"><label><p class="dato-si
|
|
|
236
236
|
*
|
|
237
237
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
238
238
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
239
|
-
*/var Ii={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ti})),multi:!0},Ti=function(a){function s(n,i,r,s,l,c,p){var d=a.call(this)||this;return d.cdr=n,d.translate=i,d.host=r,d.datoOverlay=s,d._naked=l,d.size=c,d.width=p,d.idKey="id",d.labelKey="label",d.placeholder="core.select",d.searchPlaceholder="core.search",d.isCombo=!0,d.isGroup=!1,d.internalSearch=!0,d.debounceTime=300,d.isLoading=!1,d.allowSelectAll=!1,d.selectAllChipTxt="",d.type=t.SelectType.SINGLE,d.searchStrategy=li,d.placement="bottom-start",d.infiniteScrollLoading=!1,d.limitTo=10,d.isSortable=!1,d.searchGroupLabels=!0,d.showEmptyResultsText=!0,d.keepFocus=!1,d.search=new e.EventEmitter,d.save=new e.EventEmitter,d.fetch=new e.EventEmitter,d.blur=new e.EventEmitter,d.searchControl=new o.FormControl,d.searchTerm="",d._noItemsLabel=d.translate.transform("core.no-items"),d._data=[],d._dataIsDirty=!1,d._focus=!1,d._model=[],d._open=!1,d._hasResults=!0,d._initialOpen=!0,d._withActions=!1,d._withInfiniteScroll=!1,d._clickOutside=!1,d.initialRun=!0,d.size=c||"md",d._dropdownClass=["dato-select-"+d.size],d}return ft(s,a),Object.defineProperty(s.prototype,"noItemsLabel",{set:function(t){this._noItemsLabel=this.translate.transform(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"limitSelected",{set:function(t){this.limitSelectedTo=t,this.options&&this.updateDisabledState()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"dataSet",{set:function(t){var e=this;this.initialRun?this._data=t:this._data=Ci(t,this.labelKey,this.groupBy),this._dataIsDirty&&Promise.resolve().then((function(){e.subscribeToOptionClick(e.options),e.markAsActive(e._model)})),this._dataIsDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"containsGroups",{get:function(){return this.groups&&this.groups.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"open",{get:function(){return this._open},set:function(t){this._open=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasResults",{get:function(){return this._hasResults},set:function(t){this._hasResults=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasValue",{get:function(){return this._model.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isSingle",{get:function(){return this.type===t.SelectType.SINGLE},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isMulti",{get:function(){return this.type===t.SelectType.MULTI},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_showEmptyResults",{get:function(){return this.showEmptyResultsText&&this._data&&(!this.hasResults||!this._data.length)&&!this.isGroup},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_count",{get:function(){var t=this.getVisibleOptions(!1).length;return"("+this._model.length+"/"+t+")"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isAllChecked",{get:function(){var t=this;return this.getVisibleOptions().every((function(e){return t._model.indexOf(e)>-1}))},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"showSelectAllChip",{get:function(){return this.options.length&&this._model.length===this.options.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isIndeterminatelyChecked",{get:function(){var t,e,n,o=!1;try{for(var i=wt(this.getVisibleOptions()),r=i.next();!r.done;r=i.next()){var a=r.value;if(this._model.indexOf(a)>-1?n=!0:o=!0,n&&o)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return!1},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){this.datoSelectClass&&this._dropdownClass.push(this.datoSelectClass),this._withActions=1===this.save.observers.length,this._withInfiniteScroll=1===this.fetch.observers.length,this.listenToSearch(),this._data=Ci(this._data,this.labelKey,this.groupBy),this.initialRun=!1,oe(this.width,null,this.host.nativeElement)},s.prototype.markTouched=function(){var t=this;Promise.resolve().then((function(){return t.onTouched()}))},s.prototype.close=function(){this.keyManager.setActiveItem(-1),this.searchControl.patchValue(""),this.datoOverlay.detach(),this.toggle(),this._focus=!1,this._clickOutside=!0,this.infiniteSubscription&&this.infiniteSubscription.unsubscribe(),this.scrollEventSubscription&&this.scrollEventSubscription.unsubscribe(),this.blur.emit()},s.prototype.toggle=function(){this.open=!this.open,this.open&&(this.isMulti||this.isCombo)&&(this._focus=!0,this._clickOutside=!1),this.cdr.markForCheck()},s.prototype.setDisabledState=function(t){this._disabled=t,this.cdr.markForCheck()},s.prototype.writeValue=function(t){if(this._model=t?Z.coerceArray(t):[],this.options){var e=this.limitSelectedTo&&this.isMulti&&this._model.length>=this.limitSelectedTo;this.markAsActive(this._model,{deselectAll:!0}),e&&this.updateDisabledState()}this.cdr.markForCheck()},s.prototype.openDropdown=function(t){var e=this;if(this.open&&!this.isCombo&&this.isSingle)this.close();else if(this.open&&(this.isMulti||this.isCombo))t&&"INPUT"!==t.target.nodeName&&this.close();else{this.datoOverlay.created||this.createOverlay(),this.datoOverlay.backDropClick$.pipe(r.take(1)).subscribe((function(){e._clickOutside=!0,e.open&&e.close()})),this.datoOverlay.attach({placement:this.placement},this._dropdownClass),this.toggle(),this.hasValue&&this._initialOpen&&(this.markAsActive(this._model),this.limitSelectedTo&&this._model.length===this.limitSelectedTo&&this.updateDisabledState(),this._initialOpen=!1),this._withInfiniteScroll&&this.activateInfiniteScroll(),Vt(Ft(".dato-overlay"),"zIndex",Mn());var o=Ft(".dato-select__dropdown-container");if(Vt(o,"width",this.host.nativeElement.getBoundingClientRect().width+"px"),Di())this.scrollEventSubscription=new n.Subscription;else{var a=Ye()?"touchmove":"scroll",s=n.fromEvent(window,a);Ye()&&(s=s.pipe(r.filter((function(t){return!o.contains(t.target)})))),this.scrollEventSubscription=s.pipe(i.untilDestroyed(this)).subscribe((function(t){return e.close()}))}this.handlePerfectScrollBar()}},s.prototype.ngAfterContentInit=function(){this.subscribeToOptionClick(this.options),this.keyManager=new pt.ActiveDescendantKeyManager(this.options).withWrap()},s.prototype.checkAll=function(t){var e,n,o,i,r=t;this._isIndeterminatelyChecked&&(r=!1);try{for(var a=wt(this.options.toArray()),s=a.next();!s.done;s=a.next()){var l=s.value;l.disabled||(l.active=r)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}var c=this.getVisibleOptions();if(c.length===this.options.length)this._model=r?c:[];else if(r){var p=[];try{for(var d=wt(c),u=d.next();!u.done;u=d.next()){var h=u.value;-1===this._model.indexOf(h)&&p.push(h)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}this._model=xt(this._model,p)}else this._model=this._model.filter((function(t){return-1===c.indexOf(t)}));this.onChange(this._model),this.datoOverlay.scheduleUpdate(),this.cdr.markForCheck()},s.prototype.reorderOptions=function(t){this._model=t,this.onChange(this._model)},s.prototype.removeOption=function(t){var e=this,n=this.limitSelectedTo&&this._model.length===this.limitSelectedTo;this._model=this._model.filter((function(n){return n[e.idKey]!==t[e.idKey]}));var o=this.options.find((function(n){return n.option&&n.option[e.idKey]===t[e.idKey]}));o&&(o.active=!1),n&&this.updateDisabledState(),this.onChange(this._model),this.cdr.markForCheck(),this.datoOverlay.attached&&this.datoOverlay.scheduleUpdate()},s.prototype.preventBodyScroll=function(t){wi(t)&&(t.stopPropagation(),t.preventDefault())},s.prototype.createOverlay=function(){var t,e=new Pn(this.dropdown);t=Mt(this.appendTo)?ee(this.host.nativeElement,this.appendTo):this.appendTo,this.datoOverlay.create(this.host.nativeElement,e,t)},s.prototype.handlePerfectScrollBar=function(){var t=this,e=ee(this.host.nativeElement,".ps");e&&n.fromEvent(e,"scroll").pipe(r.throttleTime(10),i.untilDestroyed(this)).subscribe((function(){t.datoOverlay.scheduleUpdate()}))},s.prototype.getVisibleOptions=function(t){void 0===t&&(t=!0);var e=this.options.filter((function(t){return!t.disabled}));return t?e.map((function(t){return t.option})):e},s.prototype.markAsActive=function(t,e){var n,o,i=this;void 0===e&&(e={deselectAll:!1});var r=this.options.toArray();e.deselectAll&&this.resetAll();var a=function(t){if(!t)return"continue";var e=r.find((function(e){return e.option&&e.option[i.idKey]===t[i.idKey]}));e&&(e.active=!0)};try{for(var s=wt(t),l=s.next();!l.done;l=s.next()){a(l.value)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},s.prototype.showAll=function(){var t,e,n,o,i=this.isAccordionGroup(),r=this.getGroupComponentsArray();try{for(var a=wt(r),s=a.next();!s.done;s=a.next()){var l=s.value;if(l._hidden=!1,i){var c=l;if(c.__expended){c.__expended=!1;var p=c;p.content.disableAnimation=!1,p.expand(!1)}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var d=wt(this.options.toArray()),u=d.next();!u.done;u=d.next()){u.value.hideAndDisabled(!1)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}},s.prototype.searchOptions=function(t){var e=this.getGroupComponentsArray();return e.length?this.searchInGroups(e,t):this.searchInOptions(t)},s.prototype.searchInGroups=function(t,e){for(var n=this,o=this.isAccordionGroup(),i=this._data.length,r=!1,a=function(i){var a=s._data[i],l=s.getGroupKey(a),c=s.searchGroupLabels&&s.searchStrategy(a,e,s.labelKey),p=a.children.map((function(t){return t[n.idKey]})),d=s.searchInOptions(e,p,c);d&&!r&&(r=!0);var u=t.find((function(t){return t.__key===l}))||t[i];if(u&&(u._hidden=!d,u.__key=l,o&&d)){var h=u;h.expanded||(h.content.disableAnimation=!0,h.expand(!0),u.__expended=!0)}},s=this,l=0;l<i;l++)a(l);return r},s.prototype.searchInOptions=function(t,e,n){var o,i;void 0===e&&(e=[]),void 0===n&&(n=!1);var r=!1;try{for(var a=wt(this.options.toArray()),s=a.next();!s.done;s=a.next()){var l=s.value,c=-1!==e.indexOf(l.option&&l.option[this.idKey]);if(n&&c)l.hideAndDisabled(!1),r=!0;else if(!ye(e)||c){this.searchStrategy(l,t,this.labelKey)?(l.hideAndDisabled(!1),r=!0):l.hideAndDisabled(!0)}}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r},s.prototype.getGroupKey=function(t){return t&&(t[this.idKey]||t[this.labelKey])},s.prototype.isEmpty=function(t){return""===t},s.prototype.listenToSearch=function(){var t=this;this.searchSubscription=this.isCombo&&this.searchControl.valueChanges.pipe(r.debounceTime(this.debounceTime)).subscribe((function(e){t.internalSearch?t.isEmpty(e)?(t.showAll(),t.hasResults=!0):t.hasResults=t.searchOptions(e):t.search.emit(e),t.searchTerm=e,t.keyManager.setActiveItem(-1),t.cdr.markForCheck(),t.datoOverlay&&t.datoOverlay.scheduleUpdate()}))},s.prototype.subscribeToOptionClick=function(t){var e=this;this.clicksSubscription&&this.clicksSubscription.unsubscribe();var o=t.map((function(t){return t.click$.pipe(r.map((function(e){return{event:e,option:t}})))}));this.clicksSubscription=n.merge.apply(void 0,xt(o)).subscribe((function(t){var n=t.option,o=t.event;n.disabled||(o.preventDefault(),e.isSingle?e.handleSingleClick(n):e.handleMultiClick(n))}))},s.prototype.onDocumentKeydown=function(t){xi(t)&&this.open&&(this._clickOutside=!0,this.close())},s.prototype.keyup=function(t){if(Si(t)){var e=this.keyManager.activeItemIndex,n=this.options.toArray()[e];this.isSingle?this.handleSingleClick(n):this.handleMultiClick(n)}if(wi(t)){this.keyManager.onKeydown(t);var o=document.querySelector(".dato-select__dropdown");bi({size:this.size,panel:o,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})}xi(t)&&this.close()},s.prototype.resetAll=function(){var t,e;try{for(var n=wt(this.options.toArray()),o=n.next();!o.done;o=n.next()){o.value.active=!1}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},s.prototype.handleSingleClick=function(t){if(t)if(t.active)this.close();else{this.resetAll(),t.active=!0;var e=t.option;this._model=[e],this.onChange(e),this.close()}},s.prototype.handleMultiClick=function(t){var e=this;if(t){var n=this._model.length,o=this.limitSelectedTo&&(n===this.limitSelectedTo||n===this.limitSelectedTo-1&&!t.active);t.active=!t.active;var i=t.option;t.active?this._model=this._model.concat(i):this._model=this._model.filter((function(t){return t[e.idKey]!==i[e.idKey]})),o&&this.updateDisabledState(),this.onChange(this._model),this.cdr.markForCheck(),this.datoOverlay.scheduleUpdate()}},s.prototype.activateInfiniteScroll=function(){var t=this;this.infiniteSubscription=n.fromEvent(document.querySelector(".dato-select__dropdown"),"scroll").pipe(r.debounceTime(50)).subscribe((function(e){var n=document.querySelector(".dato-select__dropdown"),o=n.scrollHeight-n.scrollTop,i=n.offsetHeight-o;0!==i&&1!==i||t.fetch.emit(!0)}))},s.prototype.ngOnDestroy=function(){this.searchSubscription&&this.searchSubscription.unsubscribe(),this.clicksSubscription&&this.clicksSubscription.unsubscribe(),this.infiniteSubscription&&this.infiniteSubscription.unsubscribe(),this.datoOverlay.attached&&this.datoOverlay.destroy()},s.prototype.isAccordionGroup=function(){return this.accordion&&this.accordion.length},s.prototype.getGroupComponentsArray=function(){return this.isAccordionGroup()?this.accordion.first.groups.toArray():this.groups&&this.groups.toArray()},s.prototype.updateDisabledState=function(){var t,e,n=this._model.length===this.limitSelectedTo;try{for(var o=wt(this.options.toArray()),i=o.next();!i.done;i=o.next()){var r=i.value;r.active||(r.disabled=n)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},s.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:_n},{type:e.ElementRef},{type:Rn},{type:void 0,decorators:[{type:e.Attribute,args:["naked"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:String,decorators:[{type:e.Attribute,args:["width"]}]}]},vt([e.ViewChild("dropdown"),Ct("design:type",e.TemplateRef)],s.prototype,"dropdown",void 0),vt([e.ViewChild("overlayOrigin"),Ct("design:type",e.ElementRef)],s.prototype,"origin",void 0),vt([e.ContentChildren(mi,{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"options",void 0),vt([e.ContentChildren(e.forwardRef((function(){return ci})),{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"accordion",void 0),vt([e.ContentChildren(fi),Ct("design:type",e.QueryList)],s.prototype,"groups",void 0),vt([e.ContentChild(yi),Ct("design:type",yi)],s.prototype,"active",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"idKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchPlaceholder",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],s.prototype,"noItemsLabel",null),vt([e.Input(),Ct("design:type",String)],s.prototype,"groupBy",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isCombo",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isGroup",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"internalSearch",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"debounceTime",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"allowSelectAll",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"selectAllChipTxt",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"type",void 0),vt([e.Input(),Ct("design:type",Function)],s.prototype,"searchStrategy",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"infiniteScrollLoading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"limitTo",void 0),vt([e.Input("limitSelectedTo"),Ct("design:type",Number),Ct("design:paramtypes",[Number])],s.prototype,"limitSelected",null),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isSortable",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"appendTo",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],s.prototype,"dataSet",null),vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchGroupLabels",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"datoSelectClass",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"showEmptyResultsText",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"keepFocus",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"search",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"save",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"fetch",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"blur",void 0),vt([e.HostListener("focusout"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],s.prototype,"markTouched",null),vt([e.HostListener("document:keydown",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[KeyboardEvent]),Ct("design:returntype",void 0)],s.prototype,"onDocumentKeydown",null),s=vt([e.Component({selector:"dato-select",template:'<section class="dato-select__trigger" [class.dato-select--naked]="_naked" [class.dato-select--disabled]="_disabled">\n\n <div class="dato-select__single" *ngIf="isSingle" [ngClass]="_dropdownClass">\n <dato-input [class.force-hide]="(!open && isCombo) || !isCombo" [placeholder]="searchPlaceholder | translate"\n (keyup)="keyup($event)" [isFocused]="_focus" [isLoading]="isLoading" [formControl]="searchControl" type="search">\n </dato-input>\n\n <dato-trigger-single [loadingTemplate]="loadingTemplate" [active]="active" datoErrorValidationBorderAnchor tabindex="0" [labelKey]="labelKey"\n [context]="_model[0]" [class.force-hide]="open && isCombo" [placeholder]="placeholder | translate"\n class="ontop-overlay" (keydown)="preventBodyScroll($event)" (keyup)="keyup($event)" (click)="openDropdown()">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]="loadingTemplate" [options]="_model" datoErrorValidationBorderAnchor [control]="searchControl"\n [placeholder]="placeholder | translate" [labelKey]="labelKey" [idKey]="idKey" (keyup)="keyup($event)"\n [isLoading]="isLoading" [keepFocus]="keepFocus" [limitTo]="limitTo" [clickOutside]="_clickOutside" [isSortable]="isSortable"\n [selectAllChipTxt]="selectAllChipTxt"\n [showSelectAllChip]="selectAllChipTxt && showSelectAllChip"\n (unselectAll)="checkAll(false)"\n (removeOption)="removeOption($event)" (reorderOptions)="reorderOptions($event)" *ngIf="isMulti"\n (click)="openDropdown($event)"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class="dato-select__dropdown-container" tabindex="0" (keyup)="keyup($event)">\n\n \x3c!-- HEADER --\x3e\n\n <header class="dato-select__header dato-select__option dato-select__option--simple" data-is-floating\n *ngIf="isMulti && allowSelectAll" [class.force-hide]="_showEmptyResults" [class.ml-10]="containsGroups">\n <dato-checkbox [checked]="_isAllChecked" (check)="checkAll($event)"\n [indeterminatelyChecked]="_isIndeterminatelyChecked">\n {{\'core.select-all\' | translate}}<span class="primary-300-color note-italic ml-5">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n \x3c!-- END HEADER --\x3e\n\n \x3c!-- DROPDOWN --\x3e\n\n <div class="dato-select__dropdown">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]="_showEmptyResults">{{_noItemsLabel}}</dato-select-empty>\n <div class="dato-select__option dato-select-infinite-spinner" data-is-floating *ngIf="infiniteScrollLoading">\n <span class="dato-input__spinner"></span>\n </div>\n\n </div>\n\n \x3c!-- END DROPDOWN --\x3e\n\n\n \x3c!-- FOOTER --\x3e\n\n <footer class="dato-select__footer d-flex" [class.with-actions]="_withActions">\n\n <ng-content select="[datoSelectFooter]"></ng-content>\n\n <ng-container *ngIf="_withActions">\n <dato-link class="mr-20" datoType="secondary" (click)="close()">Cancel</dato-link>\n <dato-button datoSize="sm" (click)="save.emit(); close();">Save</dato-button>\n </ng-container>\n\n </footer>\n\n \x3c!-- END FOOTER --\x3e\n\n </section>\n\n</ng-template>\n',preserveWhitespaces:!1,providers:[Ii,Rn],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoSelect"}),bt(4,e.Attribute("naked")),bt(5,e.Attribute("datoSize")),bt(6,e.Attribute("width")),Ct("design:paramtypes",[e.ChangeDetectorRef,_n,e.ElementRef,Rn,Object,Object,String])],s)}(Dt),Ei=function(){function t(t){this.cdr=t,this._placeholder=""}return Object.defineProperty(t.prototype,"placeholder",{set:function(t){this._placeholder=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{set:function(t){this._model={$implicit:t},this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidePlaceholder",{get:function(){return!this._model||!this._model.$implicit},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},Object.defineProperty(t.prototype,"getLabel",{get:function(){return this._model&&this._model.$implicit&&this._model.$implicit[this.labelKey]},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",yi)],t.prototype,"active",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"placeholder",null),vt([e.Input(),Ct("design:type",String)],t.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"context",null),t=vt([e.Component({selector:"dato-trigger-single",template:'<ng-template *ngIf="loadingTemplate" [ngTemplateOutlet]="loadingTemplate"></ng-template>\n<ng-container\n *ngIf="active && !hidePlaceholder"\n [ngTemplateOutlet]="active.tpl"\n [ngTemplateOutletContext]="_model">\n</ng-container>\n<ng-container *ngIf="!active">{{getLabel | translate}}</ng-container>\n<span class="dato-select__placeholder" *ngIf="hidePlaceholder">{{_placeholder}}</span>\n<dato-icon datoIcon="arrow-down" datoSize="sm" class="dato-select__single__arrow"></dato-icon>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Ai={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ri})),multi:!0},Ri=function(t){function o(n,o,i,r,a){var s=t.call(this)||this;return s.renderer=n,s.cdr=o,s.host=i,s.trueValue=r,s.falseValue=a,s._checked=!1,s._indeterminatelyChecked=!1,s.check=new e.EventEmitter,s.trueValue=!!Lt(s.trueValue)||s.trueValue,s.falseValue=!Lt(s.falseValue)&&s.falseValue,s}return ft(o,t),Object.defineProperty(o.prototype,"indeterminatelyChecked",{get:function(){return this._indeterminatelyChecked},set:function(t){this._indeterminatelyChecked=t,this.inputElement.indeterminate=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"checked",{get:function(){return this._checked},set:function(t){this._checked=t,this.setInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"disabled",{set:function(t){this.setDisabledState(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.inputElement,"change").pipe(r.pluck("target","checked"),i.untilDestroyed(this)).subscribe((function(e){e&&t.indeterminatelyChecked?(t.indeterminatelyChecked=!1,t.checked=!1):t._checked=!t._checked;var n=t._checked?t.trueValue:t.falseValue;t.cdr.markForCheck(),t.onChange(n),t.check.emit(n)}))},o.prototype.toggle=function(){this.writeValue(!this.checked)},o.prototype.writeValue=function(t){if(null==t||t!==this.trueValue&&t!==this.falseValue)throw new To("Invalid checkbox value: "+t);var e=t===this.trueValue;this.checked=e,this.setInputValue(e)},o.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},o.prototype.ngOnDestroy=function(){},o.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"checked",t)},o.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["trueValue"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["falseValue"]}]}]},vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"indeterminatelyChecked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"checked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"disabled",null),vt([e.Output(),Ct("design:type",Object)],o.prototype,"check",void 0),o=vt([e.Component({selector:"dato-checkbox",template:'<label>\n <span><ng-content></ng-content></span>\n <input type="checkbox">\n <span class="checkmark" [class.checked]="checked" [class.indeterminately-checked]="indeterminatelyChecked"></span>\n</label>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoCheckbox",providers:[Ai]}),bt(3,e.Attribute("trueValue")),bt(4,e.Attribute("falseValue")),Ct("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef,Object,Object])],o)}(Dt),Pi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,xo],declarations:[Ri],exports:[Ri]})],t)}(),ki=function(){function t(t,n){this.host=t,this.cdr=n,this._restCount=0,this._isFocused=!1,this.isLoading=!1,this.isSortable=!1,this.showSelectAllChip=!1,this.selectAllChipTxt="",this.keepFocus=!1,this._options=[],this._limitTo=10,this._disabled=!1,this.removeOption=new e.EventEmitter,this.unselectAll=new e.EventEmitter,this.reorderOptions=new e.EventEmitter,this.showClear=!1}return Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},set:function(t){this._isFocused=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount(),this.keepFocus&&this.input&&this.input.nativeElement.focus()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options.length>this.limitTo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"limitTo",{get:function(){return this._limitTo},set:function(t){this._limitTo=t,this.setRestCount()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clickOutside",{set:function(t){t&&(this.isFocused=!1,this.showClear=!1,this.input.nativeElement.blur())},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t=this;this.isFocused=!0,Promise.resolve().then((function(){return t.input.nativeElement.focus()}))},t.prototype.ngOnInit=function(){var t=this;this.searchSubscription=this.control.valueChanges.subscribe((function(e){t.showClear=!!e}))},t.prototype.updateOrder=function(){this.reorderOptions.emit(this.options)},t.prototype.remove=function(t){this.removeOption.emit(t)},t.prototype.removeFocus=function(t){t.stopPropagation(),this.isFocused=!1},t.prototype.ngOnDestroy=function(){this.searchSubscription.unsubscribe()},t.prototype.clearSearch=function(){this.control.setValue(""),this.input.nativeElement.focus()},t.prototype.onKeyDown=function(t){var e=8===t.keyCode,n=46===t.keyCode,o=this.options.length>=1,i=!this.input.nativeElement.value;if((e||n)&&o&&i){var r=pe(this.options);this.removeOption.emit(r)}},t.prototype.ngAfterViewInit=function(){var t=this;requestAnimationFrame((function(){t.maxActiveElementWidth=t.host.nativeElement.getBoundingClientRect().width-100+"px",t.cdr.detectChanges()}))},t.prototype.setRestCount=function(){this._restCount=Math.abs(this.limitTo-this.options.length)},t.prototype.calcInputWidth=function(t){return Math.min(13*this.placeholder.length,t.clientWidth)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.ViewChild("input"),Ct("design:type",e.ElementRef)],t.prototype,"input",void 0),vt([e.HostBinding("class.dato-trigger-multi--focused"),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"isFocused",null),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",o.FormControl)],t.prototype,"control",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isSortable",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showSelectAllChip",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"selectAllChipTxt",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"keepFocus",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"idKey",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"clickOutside",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"unselectAll",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"reorderOptions",void 0),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),t=vt([e.Component({selector:"dato-trigger-multi",template:'<section class="d-flex d-flex-wrap flex-1 width-100" #container>\n <dato-sortable *ngIf="isSortable; else selectedValues" containerClass="d-flex d-flex-wrap"\n [datoOptions]="{filter: \'input\', hasStaticItems: true}" [datoList]="options" (orderUpdated)="updateOrder()">\n <ng-container [ngTemplateOutlet]="selectedValues"></ng-container>\n <ng-container [ngTemplateOutlet]="search"></ng-container>\n </dato-sortable>\n\n <ng-template #selectedValues>\n <ng-template [ngTemplateOutlet]="showSelectAllChip ? allSelectedChip : null"></ng-template>\n\n <ng-template [ngIf]="!showSelectAllChip">\n <div class="dato-trigger-multi__active d-flex justify-between"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (idKey | trackByProp)"\n (click)="removeFocus($event)" datoSortableHandle>\n <span [ngStyle]="{maxWidth: maxActiveElementWidth}" [datoTooltip]="option[labelKey]"\n datoTooltipPosition="bottom" [datoTooltipOnTextOverflow]="true">{{option[labelKey] | translate}}</span>\n <dato-icon class="d-flex-no-shrink" datoIcon="close"\n (click)="remove(option); removeFocus($event)"></dato-icon>\n </div>\n </ng-template>\n\n </ng-template>\n\n <ng-container *ngIf="!isSortable">\n <ng-container [ngTemplateOutlet]="search"></ng-container>\n </ng-container>\n\n <ng-template #allSelectedChip>\n <div class="dato-trigger-multi__active d-flex justify-between">\n <span [ngStyle]="{maxWidth: maxActiveElementWidth}">{{ selectAllChipTxt | translate}}</span>\n <dato-icon class="d-flex-no-shrink" datoIcon="close"\n (click)="unselectAll.emit(); removeFocus($event)"></dato-icon>\n </div>\n </ng-template>\n\n <ng-template #search>\n <div class="dato-sortable-static-item dato-trigger-multi__active d-flex justify-between dato-trigger-multi__rest" *ngIf="showRest && !showSelectAllChip">\n +{{_restCount}}\n </div>\n <input type="search" class="dato-sortable-static-item dato-multi-search flex-1 ellipsis"\n [placeholder]="placeholder"\n (keydown)="onKeyDown($event)"\n [style.minWidth.px]="calcInputWidth(container)"\n [formControl]="control"\n #input>\n </ng-template>\n</section>\n\n<dato-icon datoIcon="close" *ngIf="showClear && !isLoading" (click)="clearSearch()"\n data-auto-id=\'clear-input\'\n class="dato-trigger-multi__clear"></dato-icon>\n\n<dato-icon datoIcon="arrow-down" datoSize="sm" *ngIf="!showClear"></dato-icon>\n<ng-template [ngTemplateOutlet]="loadingTemplate ? loadingTemplate : defaultLoading"></ng-template>\n\n<ng-template #defaultLoading> \n <span class="dato-input__spinner" *ngIf="isLoading"></span>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ElementRef,e.ChangeDetectorRef])],t)}(),_i=function(t){function n(e,n,o){var i=t.call(this,e,n,o)||this;return i.cdr=e,i.host=n,i.group=o,i}var o;return ft(n,t),o=n,n.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:fi,decorators:[{type:e.Optional}]}]},n=o=vt([e.Component({selector:"dato-option[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:mi,useExisting:o}],template:hi(!0)}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,fi])],n)}(mi),ji=function(){function t(t){this.cdr=t,this._show=!1}return Object.defineProperty(t.prototype,"show",{set:function(t){this._show=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"show",null),t=vt([e.Component({selector:"dato-select-empty, dato-option-empty",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div class="dato-select__option dato-select__not-found primary-300-color" *ngIf="_show">\n <ng-content></ng-content>\n </div>\n '}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Mi=function(){function t(t,e){this.cdr=t,this.host=e,this._disabled=!1,this._checked=!1,this._hidden=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){t!==this._disabled&&(this._disabled=t,Kt(this.host.nativeElement,"dato-option--disabled",this._disabled),this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(t){t!==this.checked&&(this._checked=t,this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidden",{get:function(){return this._hidden},set:function(t){t!==this._hidden&&(this._hidden=t,Kt(this.host.nativeElement,"force-hide",this._hidden))},enumerable:!0,configurable:!0}),t.prototype.setActiveStyles=function(){this.host.nativeElement.classList.add("dato-option--keyboard-active")},t.prototype.setInactiveStyles=function(){this.host.nativeElement.classList.remove("dato-option--keyboard-active")},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"option",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"checked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"hidden",null),t=vt([e.Component({selector:"dato-option-v2:not([multi])",changeDetection:e.ChangeDetectionStrategy.OnPush,template:Ni()}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),Li=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.indeterminatelyChecked=!1,n.check=new e.EventEmitter,n}var o;return ft(n,t),o=n,n.prototype.onCheck=function(t){this.allowAction(t.target)&&this.check.emit(this.checked)},n.prototype.toggleChecked=function(t){this.checked=t},n.prototype.allowAction=function(t){for(var e=t;"DATO-OPTION-V2"!==e.tagName;){if(null!==e.getAttribute("data-list-item-ignore"))return!1;e=e.parentElement}return!0},vt([e.Input(),Ct("design:type",Object)],n.prototype,"indeterminatelyChecked",void 0),vt([e.HostListener("mouseup",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],n.prototype,"onCheck",null),vt([e.Output(),Ct("design:type",Object)],n.prototype,"check",void 0),n=o=vt([e.Component({selector:"dato-option-v2[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:Mi,useExisting:o}],template:Ni(!0)})],n)}(Mi);function Ni(t){return void 0===t&&(t=!1),'\n <div data-is-floating class="dato-select__option \n dato-select__option--simple\n ellipsis \n dato-select__option--hover"\n >\n '+(t?'\n <dato-checkbox [checked]="checked" [disabled]="disabled" (check)="toggleChecked($event)" [indeterminatelyChecked]="indeterminatelyChecked">\n <ng-content></ng-content>\n </dato-checkbox>\n ':"<ng-content></ng-content>")+" \n </div>\n "}var Fi=[mi,fi,_i,ji,Mi,Li],Gi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,vo,Ne,o.ReactiveFormsModule,Pi,se,Co,xo],declarations:[Fi],exports:[Fi],entryComponents:[Fi]})],t)}(),Vi=function(){function t(){this.list=[],this.noop=ne,this.datoOptions={},this.orderUpdated=new e.EventEmitter,this.defaultOptions={handle:".dato-sortable-handler",ghostClass:"dato-sortable-ghost",chosenClass:"dato-sortable-chosen",dragClass:"dato-sortable-drag"}}return Object.defineProperty(t.prototype,"datoList",{set:function(t){var e=Array.isArray(t);if(!(e||t instanceof o.FormControl&&Array.isArray(t.value)))throw new Error("DatoSortable - datoList expected array or form control but got "+typeof t);e?this.list=t:(this.formControl=t,this.list=xt(this.formControl.value))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.datoOptions,n=e.dynamicGhostHeight,o=e.hasStaticItems,i=yt(e,["dynamicGhostHeight","hasStaticItems"]),r=mt(mt(mt({},this.defaultOptions),i),{onUpdate:function(e){return i.onUpdate?i.onUpdate(e):t.emitUpdate(e)}});n&&(r.onStart=function(e){return t.setGhostHeight(e)}),o&&(r.onMove=function(t){return!t.related.classList.contains("dato-sortable-static-item")&&(!i.onMove||i.onMove(t))}),this.mergedOptions=r},t.prototype.emitUpdate=function(t){this.formControl&&this.formControl.setValue(this.list),this.orderUpdated.emit(t)},t.prototype.setGhostHeight=function(t){var e=t.from.children[t.oldIndex];Vt(e,"display","block");var n=e.getBoundingClientRect().height;Vt(e,"display","none"),Vt(Ft(".dato-sortable-ghost"),"height",n+"px")},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoList",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoOptions",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"containerClass",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"orderUpdated",void 0),t=vt([e.Component({selector:"dato-sortable",template:'<section [sortablejs]="list" [sortablejsOptions]="mergedOptions" [ngClass]="containerClass"\n (update.stop)="noop()" (add.stop)="noop()" (sort.stop)="noop()" (remove.stop)="noop()"\n (filter.stop)="noop()" (change.stop)="noop()" (drag.stop)="noop()">\n <ng-content></ng-content>\n</section>',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-sortable{display:inline-block}dato-sortable .dato-sortable-handler{cursor:move;cursor:-webkit-grabbing}.dato-sortable-ghost>*{display:none!important}.dato-sortable-drag{box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}"]})],t)}(),zi=function(){function t(t,e){this.renderer=t,this.host=e,t.addClass(e.nativeElement,"dato-sortable-handler")}return t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoSortableHandle]"}),Ct("design:paramtypes",[e.Renderer2,e.ElementRef])],t)}(),Bi=[Vi,zi],Hi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,dt.SortablejsModule],declarations:[Bi],exports:[Bi]})],t)}(),Ui=[Ti,Ei,ki],Ki=[yi],Wi=function(){function t(){}return t=vt([e.NgModule({imports:[yo,s.CommonModule,vo,Ne,o.ReactiveFormsModule,Pi,se,Co,xo,Gi,Xn,Hi],declarations:[Ui,Ki],exports:[Ui,Ki,Gi],entryComponents:[Ui]})],t)}();
|
|
239
|
+
*/var Ii={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ti})),multi:!0},Ti=function(a){function s(n,i,r,s,l,c,p){var d=a.call(this)||this;return d.cdr=n,d.translate=i,d.host=r,d.datoOverlay=s,d._naked=l,d.size=c,d.width=p,d.idKey="id",d.labelKey="label",d.placeholder="core.select",d.searchPlaceholder="core.search",d.isCombo=!0,d.isGroup=!1,d.internalSearch=!0,d.debounceTime=300,d.isLoading=!1,d.allowSelectAll=!1,d.selectAllChipTxt="",d.type=t.SelectType.SINGLE,d.searchStrategy=li,d.placement="bottom-start",d.infiniteScrollLoading=!1,d.limitTo=10,d.isSortable=!1,d.searchGroupLabels=!0,d.showEmptyResultsText=!0,d.keepFocus=!1,d.search=new e.EventEmitter,d.save=new e.EventEmitter,d.fetch=new e.EventEmitter,d.blur=new e.EventEmitter,d.searchControl=new o.FormControl,d.searchTerm="",d._noItemsLabel=d.translate.transform("core.no-items"),d._data=[],d._dataIsDirty=!1,d._focus=!1,d._model=[],d._open=!1,d._hasResults=!0,d._initialOpen=!0,d._withActions=!1,d._withInfiniteScroll=!1,d._clickOutside=!1,d.initialRun=!0,d.size=c||"md",d._dropdownClass=["dato-select-"+d.size],d}return ft(s,a),Object.defineProperty(s.prototype,"noItemsLabel",{set:function(t){this._noItemsLabel=this.translate.transform(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"limitSelected",{set:function(t){this.limitSelectedTo=t,this.options&&this.updateDisabledState()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"dataSet",{set:function(t){var e=this;this.initialRun?this._data=t:this._data=Ci(t,this.labelKey,this.groupBy),this._dataIsDirty&&Promise.resolve().then((function(){e.subscribeToOptionClick(e.options),e.markAsActive(e._model)})),this._dataIsDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"containsGroups",{get:function(){return this.groups&&this.groups.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"open",{get:function(){return this._open},set:function(t){this._open=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasResults",{get:function(){return this._hasResults},set:function(t){this._hasResults=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasValue",{get:function(){return this._model.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isSingle",{get:function(){return this.type===t.SelectType.SINGLE},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isMulti",{get:function(){return this.type===t.SelectType.MULTI},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_showEmptyResults",{get:function(){return this.showEmptyResultsText&&this._data&&(!this.hasResults||!this._data.length)&&!this.isGroup},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_count",{get:function(){var t=this.getVisibleOptions(!1).length;return"("+this._model.length+"/"+t+")"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isAllChecked",{get:function(){var t=this;return this.getVisibleOptions().every((function(e){return t._model.indexOf(e)>-1}))},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"showSelectAllChip",{get:function(){return this.options.length&&this._model.length===this.options.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_isIndeterminatelyChecked",{get:function(){var t,e,n,o=!1;try{for(var i=wt(this.getVisibleOptions()),r=i.next();!r.done;r=i.next()){var a=r.value;if(this._model.indexOf(a)>-1?n=!0:o=!0,n&&o)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return!1},enumerable:!0,configurable:!0}),s.prototype.ngOnInit=function(){this.datoSelectClass&&this._dropdownClass.push(this.datoSelectClass),this._withActions=1===this.save.observers.length,this._withInfiniteScroll=1===this.fetch.observers.length,this.listenToSearch(),this._data=Ci(this._data,this.labelKey,this.groupBy),this.initialRun=!1,oe(this.width,null,this.host.nativeElement)},s.prototype.markTouched=function(){var t=this;Promise.resolve().then((function(){return t.onTouched()}))},s.prototype.close=function(){this.keyManager.setActiveItem(-1),this.searchControl.patchValue(""),this.datoOverlay.detach(),this.toggle(),this._focus=!1,this._clickOutside=!0,this.infiniteSubscription&&this.infiniteSubscription.unsubscribe(),this.scrollEventSubscription&&this.scrollEventSubscription.unsubscribe(),this.blur.emit()},s.prototype.toggle=function(){this.open=!this.open,this.open&&(this.isMulti||this.isCombo)&&(this._focus=!0,this._clickOutside=!1),this.cdr.markForCheck()},s.prototype.setDisabledState=function(t){this._disabled=t,this.cdr.markForCheck()},s.prototype.writeValue=function(t){if(this._model=t?Z.coerceArray(t):[],this.options){var e=this.limitSelectedTo&&this.isMulti&&this._model.length>=this.limitSelectedTo;this.markAsActive(this._model,{deselectAll:!0}),e&&this.updateDisabledState()}this.cdr.markForCheck()},s.prototype.openDropdown=function(t){var e=this;if(this.open&&!this.isCombo&&this.isSingle)this.close();else if(this.open&&(this.isMulti||this.isCombo))t&&"INPUT"!==t.target.nodeName&&this.close();else{this.datoOverlay.created||this.createOverlay(),this.datoOverlay.backDropClick$.pipe(r.take(1)).subscribe((function(){e._clickOutside=!0,e.open&&e.close()})),this.datoOverlay.attach({placement:this.placement},this._dropdownClass),this.toggle(),this.hasValue&&this._initialOpen&&(this.markAsActive(this._model),this.limitSelectedTo&&this._model.length===this.limitSelectedTo&&this.updateDisabledState(),this._initialOpen=!1),this._withInfiniteScroll&&this.activateInfiniteScroll(),Vt(Ft(".dato-overlay"),"zIndex",Mn());var o=Ft(".dato-select__dropdown-container");if(Vt(o,"width",this.host.nativeElement.getBoundingClientRect().width+"px"),Di())this.scrollEventSubscription=new n.Subscription;else{var a=Ye()?"touchmove":"scroll",s=n.fromEvent(window,a);Ye()&&(s=s.pipe(r.filter((function(t){return!o.contains(t.target)})))),this.scrollEventSubscription=s.pipe(i.untilDestroyed(this)).subscribe((function(t){return e.close()}))}this.handlePerfectScrollBar()}},s.prototype.ngAfterContentInit=function(){this.subscribeToOptionClick(this.options),this.keyManager=new pt.ActiveDescendantKeyManager(this.options).withWrap()},s.prototype.checkAll=function(t){var e,n,o,i,r=t;this._isIndeterminatelyChecked&&(r=!1);try{for(var a=wt(this.options.toArray()),s=a.next();!s.done;s=a.next()){var l=s.value;l.disabled||(l.active=r)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}var c=this.getVisibleOptions();if(c.length===this.options.length)this._model=r?c:[];else if(r){var p=[];try{for(var d=wt(c),u=d.next();!u.done;u=d.next()){var h=u.value;-1===this._model.indexOf(h)&&p.push(h)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}this._model=xt(this._model,p)}else this._model=this._model.filter((function(t){return-1===c.indexOf(t)}));this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()},s.prototype.reorderOptions=function(t){this._model=t,this.onChange(this._model)},s.prototype.removeOption=function(t){var e=this,n=this.limitSelectedTo&&this._model.length===this.limitSelectedTo;this._model=this._model.filter((function(n){return n[e.idKey]!==t[e.idKey]}));var o=this.options.find((function(n){return n.option&&n.option[e.idKey]===t[e.idKey]}));o&&(o.active=!1),n&&this.updateDisabledState(),this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()},s.prototype.preventBodyScroll=function(t){wi(t)&&(t.stopPropagation(),t.preventDefault())},s.prototype.createOverlay=function(){var t,e=new Pn(this.dropdown);t=Mt(this.appendTo)?ee(this.host.nativeElement,this.appendTo):this.appendTo,this.datoOverlay.create(this.host.nativeElement,e,t)},s.prototype.handlePerfectScrollBar=function(){var t=this,e=ee(this.host.nativeElement,".ps");e&&n.fromEvent(e,"scroll").pipe(r.throttleTime(10),i.untilDestroyed(this)).subscribe((function(){t.datoOverlay.scheduleUpdate()}))},s.prototype.getVisibleOptions=function(t){void 0===t&&(t=!0);var e=this.options.filter((function(t){return!t.disabled}));return t?e.map((function(t){return t.option})):e},s.prototype.markAsActive=function(t,e){var n,o,i=this;void 0===e&&(e={deselectAll:!1});var r=this.options.toArray();e.deselectAll&&this.resetAll();var a=function(t){if(!t)return"continue";var e=r.find((function(e){return e.option&&e.option[i.idKey]===t[i.idKey]}));e&&(e.active=!0)};try{for(var s=wt(t),l=s.next();!l.done;l=s.next()){a(l.value)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},s.prototype.showAll=function(){var t,e,n,o,i=this.isAccordionGroup(),r=this.getGroupComponentsArray();try{for(var a=wt(r),s=a.next();!s.done;s=a.next()){var l=s.value;if(l._hidden=!1,i){var c=l;if(c.__expended){c.__expended=!1;var p=c;p.content.disableAnimation=!1,p.expand(!1)}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var d=wt(this.options.toArray()),u=d.next();!u.done;u=d.next()){u.value.hideAndDisabled(!1)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}},s.prototype.searchOptions=function(t){var e=this.getGroupComponentsArray();return e.length?this.searchInGroups(e,t):this.searchInOptions(t)},s.prototype.searchInGroups=function(t,e){for(var n=this,o=this.isAccordionGroup(),i=this._data.length,r=!1,a=function(i){var a=s._data[i],l=s.getGroupKey(a),c=s.searchGroupLabels&&s.searchStrategy(a,e,s.labelKey),p=a.children.map((function(t){return t[n.idKey]})),d=s.searchInOptions(e,p,c);d&&!r&&(r=!0);var u=t.find((function(t){return t.__key===l}))||t[i];if(u&&(u._hidden=!d,u.__key=l,o&&d)){var h=u;h.expanded||(h.content.disableAnimation=!0,h.expand(!0),u.__expended=!0)}},s=this,l=0;l<i;l++)a(l);return r},s.prototype.searchInOptions=function(t,e,n){var o,i;void 0===e&&(e=[]),void 0===n&&(n=!1);var r=!1;try{for(var a=wt(this.options.toArray()),s=a.next();!s.done;s=a.next()){var l=s.value,c=-1!==e.indexOf(l.option&&l.option[this.idKey]);if(n&&c)l.hideAndDisabled(!1),r=!0;else if(!ye(e)||c){this.searchStrategy(l,t,this.labelKey)?(l.hideAndDisabled(!1),r=!0):l.hideAndDisabled(!0)}}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r},s.prototype.getGroupKey=function(t){return t&&(t[this.idKey]||t[this.labelKey])},s.prototype.isEmpty=function(t){return""===t},s.prototype.listenToSearch=function(){var t=this;this.searchSubscription=this.isCombo&&this.searchControl.valueChanges.pipe(r.debounceTime(this.debounceTime)).subscribe((function(e){t.internalSearch?t.isEmpty(e)?(t.showAll(),t.hasResults=!0):t.hasResults=t.searchOptions(e):t.search.emit(e),t.searchTerm=e,t.keyManager.setActiveItem(-1),t.cdr.markForCheck(),t.asyncUpdateDropdownPosition()}))},s.prototype.subscribeToOptionClick=function(t){var e=this;this.clicksSubscription&&this.clicksSubscription.unsubscribe();var o=t.map((function(t){return t.click$.pipe(r.map((function(e){return{event:e,option:t}})))}));this.clicksSubscription=n.merge.apply(void 0,xt(o)).subscribe((function(t){var n=t.option,o=t.event;n.disabled||(o.preventDefault(),e.isSingle?e.handleSingleClick(n):e.handleMultiClick(n))}))},s.prototype.onDocumentKeydown=function(t){xi(t)&&this.open&&(this._clickOutside=!0,this.close())},s.prototype.keyup=function(t){if(Si(t)){var e=this.keyManager.activeItemIndex,n=this.options.toArray()[e];this.isSingle?this.handleSingleClick(n):this.handleMultiClick(n)}if(wi(t)){this.keyManager.onKeydown(t);var o=document.querySelector(".dato-select__dropdown");bi({size:this.size,panel:o,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})}xi(t)&&this.close()},s.prototype.resetAll=function(){var t,e;try{for(var n=wt(this.options.toArray()),o=n.next();!o.done;o=n.next()){o.value.active=!1}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},s.prototype.handleSingleClick=function(t){if(t)if(t.active)this.close();else{this.resetAll(),t.active=!0;var e=t.option;this._model=[e],this.onChange(e),this.close()}},s.prototype.handleMultiClick=function(t){var e=this;if(t){var n=this._model.length,o=this.limitSelectedTo&&(n===this.limitSelectedTo||n===this.limitSelectedTo-1&&!t.active);t.active=!t.active;var i=t.option;t.active?this._model=this._model.concat(i):this._model=this._model.filter((function(t){return t[e.idKey]!==i[e.idKey]})),o&&this.updateDisabledState(),this.onChange(this._model),this.cdr.markForCheck(),this.asyncUpdateDropdownPosition()}},s.prototype.activateInfiniteScroll=function(){var t=this;this.infiniteSubscription=n.fromEvent(document.querySelector(".dato-select__dropdown"),"scroll").pipe(r.debounceTime(50)).subscribe((function(e){var n=document.querySelector(".dato-select__dropdown"),o=n.scrollHeight-n.scrollTop,i=n.offsetHeight-o;0!==i&&1!==i||t.fetch.emit(!0)}))},s.prototype.ngOnDestroy=function(){this.searchSubscription&&this.searchSubscription.unsubscribe(),this.clicksSubscription&&this.clicksSubscription.unsubscribe(),this.infiniteSubscription&&this.infiniteSubscription.unsubscribe(),this.datoOverlay.attached&&this.datoOverlay.destroy()},s.prototype.isAccordionGroup=function(){return this.accordion&&this.accordion.length},s.prototype.getGroupComponentsArray=function(){return this.isAccordionGroup()?this.accordion.first.groups.toArray():this.groups&&this.groups.toArray()},s.prototype.updateDisabledState=function(){var t,e,n=this._model.length===this.limitSelectedTo;try{for(var o=wt(this.options.toArray()),i=o.next();!i.done;i=o.next()){var r=i.value;r.active||(r.disabled=n)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},s.prototype.asyncUpdateDropdownPosition=function(){var t=this;this.datoOverlay&&this.datoOverlay.attached&&setTimeout((function(){return t.datoOverlay.scheduleUpdate()}),0)},s.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:_n},{type:e.ElementRef},{type:Rn},{type:void 0,decorators:[{type:e.Attribute,args:["naked"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]},{type:String,decorators:[{type:e.Attribute,args:["width"]}]}]},vt([e.ViewChild("dropdown"),Ct("design:type",e.TemplateRef)],s.prototype,"dropdown",void 0),vt([e.ViewChild("overlayOrigin"),Ct("design:type",e.ElementRef)],s.prototype,"origin",void 0),vt([e.ContentChildren(mi,{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"options",void 0),vt([e.ContentChildren(e.forwardRef((function(){return ci})),{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"accordion",void 0),vt([e.ContentChildren(fi),Ct("design:type",e.QueryList)],s.prototype,"groups",void 0),vt([e.ContentChild(yi),Ct("design:type",yi)],s.prototype,"active",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"idKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchPlaceholder",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],s.prototype,"noItemsLabel",null),vt([e.Input(),Ct("design:type",String)],s.prototype,"groupBy",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isCombo",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isGroup",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"internalSearch",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"debounceTime",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"allowSelectAll",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"selectAllChipTxt",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"type",void 0),vt([e.Input(),Ct("design:type",Function)],s.prototype,"searchStrategy",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"infiniteScrollLoading",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"limitTo",void 0),vt([e.Input("limitSelectedTo"),Ct("design:type",Number),Ct("design:paramtypes",[Number])],s.prototype,"limitSelected",null),vt([e.Input(),Ct("design:type",Object)],s.prototype,"isSortable",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"appendTo",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],s.prototype,"dataSet",null),vt([e.Input(),Ct("design:type",Object)],s.prototype,"searchGroupLabels",void 0),vt([e.Input(),Ct("design:type",String)],s.prototype,"datoSelectClass",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],s.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"showEmptyResultsText",void 0),vt([e.Input(),Ct("design:type",Object)],s.prototype,"keepFocus",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"search",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"save",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"fetch",void 0),vt([e.Output(),Ct("design:type",Object)],s.prototype,"blur",void 0),vt([e.HostListener("focusout"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],s.prototype,"markTouched",null),vt([e.HostListener("document:keydown",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[KeyboardEvent]),Ct("design:returntype",void 0)],s.prototype,"onDocumentKeydown",null),s=vt([e.Component({selector:"dato-select",template:'<section class="dato-select__trigger" [class.dato-select--naked]="_naked" [class.dato-select--disabled]="_disabled">\n\n <div class="dato-select__single" *ngIf="isSingle" [ngClass]="_dropdownClass">\n <dato-input [class.force-hide]="(!open && isCombo) || !isCombo" [placeholder]="searchPlaceholder | translate"\n (keyup)="keyup($event)" [isFocused]="_focus" [isLoading]="isLoading" [formControl]="searchControl" type="search">\n </dato-input>\n\n <dato-trigger-single [loadingTemplate]="loadingTemplate" [active]="active" datoErrorValidationBorderAnchor tabindex="0" [labelKey]="labelKey"\n [context]="_model[0]" [class.force-hide]="open && isCombo" [placeholder]="placeholder | translate"\n class="ontop-overlay" (keydown)="preventBodyScroll($event)" (keyup)="keyup($event)" (click)="openDropdown()">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]="loadingTemplate" [options]="_model" datoErrorValidationBorderAnchor [control]="searchControl"\n [placeholder]="placeholder | translate" [labelKey]="labelKey" [idKey]="idKey" (keyup)="keyup($event)"\n [isLoading]="isLoading" [keepFocus]="keepFocus" [limitTo]="limitTo" [clickOutside]="_clickOutside" [isSortable]="isSortable"\n [selectAllChipTxt]="selectAllChipTxt"\n [showSelectAllChip]="selectAllChipTxt && showSelectAllChip"\n (unselectAll)="checkAll(false)"\n (removeOption)="removeOption($event)" (reorderOptions)="reorderOptions($event)" *ngIf="isMulti"\n (click)="openDropdown($event)"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class="dato-select__dropdown-container" tabindex="0" (keyup)="keyup($event)">\n\n \x3c!-- HEADER --\x3e\n\n <header class="dato-select__header dato-select__option dato-select__option--simple" data-is-floating\n *ngIf="isMulti && allowSelectAll" [class.force-hide]="_showEmptyResults" [class.ml-10]="containsGroups">\n <dato-checkbox [checked]="_isAllChecked" (check)="checkAll($event)"\n [indeterminatelyChecked]="_isIndeterminatelyChecked">\n {{\'core.select-all\' | translate}}<span class="primary-300-color note-italic ml-5">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n \x3c!-- END HEADER --\x3e\n\n \x3c!-- DROPDOWN --\x3e\n\n <div class="dato-select__dropdown">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]="_showEmptyResults">{{_noItemsLabel}}</dato-select-empty>\n <div class="dato-select__option dato-select-infinite-spinner" data-is-floating *ngIf="infiniteScrollLoading">\n <span class="dato-input__spinner"></span>\n </div>\n\n </div>\n\n \x3c!-- END DROPDOWN --\x3e\n\n\n \x3c!-- FOOTER --\x3e\n\n <footer class="dato-select__footer d-flex" [class.with-actions]="_withActions">\n\n <ng-content select="[datoSelectFooter]"></ng-content>\n\n <ng-container *ngIf="_withActions">\n <dato-link class="mr-20" datoType="secondary" (click)="close()">Cancel</dato-link>\n <dato-button datoSize="sm" (click)="save.emit(); close();">Save</dato-button>\n </ng-container>\n\n </footer>\n\n \x3c!-- END FOOTER --\x3e\n\n </section>\n\n</ng-template>\n',preserveWhitespaces:!1,providers:[Ii,Rn],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoSelect"}),bt(4,e.Attribute("naked")),bt(5,e.Attribute("datoSize")),bt(6,e.Attribute("width")),Ct("design:paramtypes",[e.ChangeDetectorRef,_n,e.ElementRef,Rn,Object,Object,String])],s)}(Dt),Ei=function(){function t(t){this.cdr=t,this._placeholder=""}return Object.defineProperty(t.prototype,"placeholder",{set:function(t){this._placeholder=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{set:function(t){this._model={$implicit:t},this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidePlaceholder",{get:function(){return!this._model||!this._model.$implicit},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},Object.defineProperty(t.prototype,"getLabel",{get:function(){return this._model&&this._model.$implicit&&this._model.$implicit[this.labelKey]},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",yi)],t.prototype,"active",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"placeholder",null),vt([e.Input(),Ct("design:type",String)],t.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"context",null),t=vt([e.Component({selector:"dato-trigger-single",template:'<ng-template *ngIf="loadingTemplate" [ngTemplateOutlet]="loadingTemplate"></ng-template>\n<ng-container\n *ngIf="active && !hidePlaceholder"\n [ngTemplateOutlet]="active.tpl"\n [ngTemplateOutletContext]="_model">\n</ng-container>\n<ng-container *ngIf="!active">{{getLabel | translate}}</ng-container>\n<span class="dato-select__placeholder" *ngIf="hidePlaceholder">{{_placeholder}}</span>\n<dato-icon datoIcon="arrow-down" datoSize="sm" class="dato-select__single__arrow"></dato-icon>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Ai={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ri})),multi:!0},Ri=function(t){function o(n,o,i,r,a){var s=t.call(this)||this;return s.renderer=n,s.cdr=o,s.host=i,s.trueValue=r,s.falseValue=a,s._checked=!1,s._indeterminatelyChecked=!1,s.check=new e.EventEmitter,s.trueValue=!!Lt(s.trueValue)||s.trueValue,s.falseValue=!Lt(s.falseValue)&&s.falseValue,s}return ft(o,t),Object.defineProperty(o.prototype,"indeterminatelyChecked",{get:function(){return this._indeterminatelyChecked},set:function(t){this._indeterminatelyChecked=t,this.inputElement.indeterminate=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"checked",{get:function(){return this._checked},set:function(t){this._checked=t,this.setInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"disabled",{set:function(t){this.setDisabledState(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.inputElement,"change").pipe(r.pluck("target","checked"),i.untilDestroyed(this)).subscribe((function(e){e&&t.indeterminatelyChecked?(t.indeterminatelyChecked=!1,t.checked=!1):t._checked=!t._checked;var n=t._checked?t.trueValue:t.falseValue;t.cdr.markForCheck(),t.onChange(n),t.check.emit(n)}))},o.prototype.toggle=function(){this.writeValue(!this.checked)},o.prototype.writeValue=function(t){if(null==t||t!==this.trueValue&&t!==this.falseValue)throw new To("Invalid checkbox value: "+t);var e=t===this.trueValue;this.checked=e,this.setInputValue(e)},o.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},o.prototype.ngOnDestroy=function(){},o.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"checked",t)},o.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["trueValue"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["falseValue"]}]}]},vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"indeterminatelyChecked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"checked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],o.prototype,"disabled",null),vt([e.Output(),Ct("design:type",Object)],o.prototype,"check",void 0),o=vt([e.Component({selector:"dato-checkbox",template:'<label>\n <span><ng-content></ng-content></span>\n <input type="checkbox">\n <span class="checkmark" [class.checked]="checked" [class.indeterminately-checked]="indeterminatelyChecked"></span>\n</label>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"datoCheckbox",providers:[Ai]}),bt(3,e.Attribute("trueValue")),bt(4,e.Attribute("falseValue")),Ct("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef,Object,Object])],o)}(Dt),Pi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,xo],declarations:[Ri],exports:[Ri]})],t)}(),ki=function(){function t(t,n){this.host=t,this.cdr=n,this._restCount=0,this._isFocused=!1,this.isLoading=!1,this.isSortable=!1,this.showSelectAllChip=!1,this.selectAllChipTxt="",this.keepFocus=!1,this._options=[],this._limitTo=10,this._disabled=!1,this.removeOption=new e.EventEmitter,this.unselectAll=new e.EventEmitter,this.reorderOptions=new e.EventEmitter,this.showClear=!1}return Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},set:function(t){this._isFocused=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount(),this.keepFocus&&this.input&&this.input.nativeElement.focus()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options.length>this.limitTo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"limitTo",{get:function(){return this._limitTo},set:function(t){this._limitTo=t,this.setRestCount()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clickOutside",{set:function(t){t&&(this.isFocused=!1,this.showClear=!1,this.input.nativeElement.blur())},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t=this;this.isFocused=!0,Promise.resolve().then((function(){return t.input.nativeElement.focus()}))},t.prototype.ngOnInit=function(){var t=this;this.searchSubscription=this.control.valueChanges.subscribe((function(e){t.showClear=!!e}))},t.prototype.updateOrder=function(){this.reorderOptions.emit(this.options)},t.prototype.remove=function(t){this.removeOption.emit(t)},t.prototype.removeFocus=function(t){t.stopPropagation(),this.isFocused=!1},t.prototype.ngOnDestroy=function(){this.searchSubscription.unsubscribe()},t.prototype.clearSearch=function(){this.control.setValue(""),this.input.nativeElement.focus()},t.prototype.onKeyDown=function(t){var e=8===t.keyCode,n=46===t.keyCode,o=this.options.length>=1,i=!this.input.nativeElement.value;if((e||n)&&o&&i){var r=pe(this.options);this.removeOption.emit(r)}},t.prototype.ngAfterViewInit=function(){var t=this;requestAnimationFrame((function(){t.maxActiveElementWidth=t.host.nativeElement.getBoundingClientRect().width-100+"px",t.cdr.detectChanges()}))},t.prototype.setRestCount=function(){this._restCount=Math.abs(this.limitTo-this.options.length)},t.prototype.calcInputWidth=function(t){return Math.min(13*this.placeholder.length,t.clientWidth)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.ViewChild("input"),Ct("design:type",e.ElementRef)],t.prototype,"input",void 0),vt([e.HostBinding("class.dato-trigger-multi--focused"),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"isFocused",null),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"loadingTemplate",void 0),vt([e.Input(),Ct("design:type",o.FormControl)],t.prototype,"control",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isLoading",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isSortable",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showSelectAllChip",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"selectAllChipTxt",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"keepFocus",void 0),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelKey",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"idKey",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"clickOutside",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"unselectAll",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"reorderOptions",void 0),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"onClick",null),t=vt([e.Component({selector:"dato-trigger-multi",template:'<section class="d-flex d-flex-wrap flex-1 width-100" #container>\n <dato-sortable *ngIf="isSortable; else selectedValues" containerClass="d-flex d-flex-wrap"\n [datoOptions]="{filter: \'input\', hasStaticItems: true}" [datoList]="options" (orderUpdated)="updateOrder()">\n <ng-container [ngTemplateOutlet]="selectedValues"></ng-container>\n <ng-container [ngTemplateOutlet]="search"></ng-container>\n </dato-sortable>\n\n <ng-template #selectedValues>\n <ng-template [ngTemplateOutlet]="showSelectAllChip ? allSelectedChip : null"></ng-template>\n\n <ng-template [ngIf]="!showSelectAllChip">\n <div class="dato-trigger-multi__active d-flex justify-between"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (idKey | trackByProp)"\n (click)="removeFocus($event)" datoSortableHandle>\n <span [ngStyle]="{maxWidth: maxActiveElementWidth}" [datoTooltip]="option[labelKey]"\n datoTooltipPosition="bottom" [datoTooltipOnTextOverflow]="true">{{option[labelKey] | translate}}</span>\n <dato-icon class="d-flex-no-shrink" datoIcon="close"\n (click)="remove(option); removeFocus($event)"></dato-icon>\n </div>\n </ng-template>\n\n </ng-template>\n\n <ng-container *ngIf="!isSortable">\n <ng-container [ngTemplateOutlet]="search"></ng-container>\n </ng-container>\n\n <ng-template #allSelectedChip>\n <div class="dato-trigger-multi__active d-flex justify-between">\n <span [ngStyle]="{maxWidth: maxActiveElementWidth}">{{ selectAllChipTxt | translate}}</span>\n <dato-icon class="d-flex-no-shrink" datoIcon="close"\n (click)="unselectAll.emit(); removeFocus($event)"></dato-icon>\n </div>\n </ng-template>\n\n <ng-template #search>\n <div class="dato-sortable-static-item dato-trigger-multi__active d-flex justify-between dato-trigger-multi__rest" *ngIf="showRest && !showSelectAllChip">\n +{{_restCount}}\n </div>\n <input type="search" class="dato-sortable-static-item dato-multi-search flex-1 ellipsis"\n [placeholder]="placeholder"\n (keydown)="onKeyDown($event)"\n [style.minWidth.px]="calcInputWidth(container)"\n [formControl]="control"\n #input>\n </ng-template>\n</section>\n\n<dato-icon datoIcon="close" *ngIf="showClear && !isLoading" (click)="clearSearch()"\n data-auto-id=\'clear-input\'\n class="dato-trigger-multi__clear"></dato-icon>\n\n<dato-icon datoIcon="arrow-down" datoSize="sm" *ngIf="!showClear"></dato-icon>\n<ng-template [ngTemplateOutlet]="loadingTemplate ? loadingTemplate : defaultLoading"></ng-template>\n\n<ng-template #defaultLoading> \n <span class="dato-input__spinner" *ngIf="isLoading"></span>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ElementRef,e.ChangeDetectorRef])],t)}(),_i=function(t){function n(e,n,o){var i=t.call(this,e,n,o)||this;return i.cdr=e,i.host=n,i.group=o,i}var o;return ft(n,t),o=n,n.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:fi,decorators:[{type:e.Optional}]}]},n=o=vt([e.Component({selector:"dato-option[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:mi,useExisting:o}],template:hi(!0)}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,fi])],n)}(mi),ji=function(){function t(t){this.cdr=t,this._show=!1}return Object.defineProperty(t.prototype,"show",{set:function(t){this._show=t,this.cdr.detectChanges()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.cdr.detach()},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"show",null),t=vt([e.Component({selector:"dato-select-empty, dato-option-empty",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'\n <div class="dato-select__option dato-select__not-found primary-300-color" *ngIf="_show">\n <ng-content></ng-content>\n </div>\n '}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Mi=function(){function t(t,e){this.cdr=t,this.host=e,this._disabled=!1,this._checked=!1,this._hidden=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){t!==this._disabled&&(this._disabled=t,Kt(this.host.nativeElement,"dato-option--disabled",this._disabled),this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(t){t!==this.checked&&(this._checked=t,this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hidden",{get:function(){return this._hidden},set:function(t){t!==this._hidden&&(this._hidden=t,Kt(this.host.nativeElement,"force-hide",this._hidden))},enumerable:!0,configurable:!0}),t.prototype.setActiveStyles=function(){this.host.nativeElement.classList.add("dato-option--keyboard-active")},t.prototype.setInactiveStyles=function(){this.host.nativeElement.classList.remove("dato-option--keyboard-active")},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"option",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"checked",null),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],t.prototype,"hidden",null),t=vt([e.Component({selector:"dato-option-v2:not([multi])",changeDetection:e.ChangeDetectionStrategy.OnPush,template:Ni()}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),Li=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.indeterminatelyChecked=!1,n.check=new e.EventEmitter,n}var o;return ft(n,t),o=n,n.prototype.onCheck=function(t){this.allowAction(t.target)&&this.check.emit(this.checked)},n.prototype.toggleChecked=function(t){this.checked=t},n.prototype.allowAction=function(t){for(var e=t;"DATO-OPTION-V2"!==e.tagName;){if(null!==e.getAttribute("data-list-item-ignore"))return!1;e=e.parentElement}return!0},vt([e.Input(),Ct("design:type",Object)],n.prototype,"indeterminatelyChecked",void 0),vt([e.HostListener("mouseup",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],n.prototype,"onCheck",null),vt([e.Output(),Ct("design:type",Object)],n.prototype,"check",void 0),n=o=vt([e.Component({selector:"dato-option-v2[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:Mi,useExisting:o}],template:Ni(!0)})],n)}(Mi);function Ni(t){return void 0===t&&(t=!1),'\n <div data-is-floating class="dato-select__option \n dato-select__option--simple\n ellipsis \n dato-select__option--hover"\n >\n '+(t?'\n <dato-checkbox [checked]="checked" [disabled]="disabled" (check)="toggleChecked($event)" [indeterminatelyChecked]="indeterminatelyChecked">\n <ng-content></ng-content>\n </dato-checkbox>\n ':"<ng-content></ng-content>")+" \n </div>\n "}var Fi=[mi,fi,_i,ji,Mi,Li],Gi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,vo,Ne,o.ReactiveFormsModule,Pi,se,Co,xo],declarations:[Fi],exports:[Fi],entryComponents:[Fi]})],t)}(),Vi=function(){function t(){this.list=[],this.noop=ne,this.datoOptions={},this.orderUpdated=new e.EventEmitter,this.defaultOptions={handle:".dato-sortable-handler",ghostClass:"dato-sortable-ghost",chosenClass:"dato-sortable-chosen",dragClass:"dato-sortable-drag"}}return Object.defineProperty(t.prototype,"datoList",{set:function(t){var e=Array.isArray(t);if(!(e||t instanceof o.FormControl&&Array.isArray(t.value)))throw new Error("DatoSortable - datoList expected array or form control but got "+typeof t);e?this.list=t:(this.formControl=t,this.list=xt(this.formControl.value))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.datoOptions,n=e.dynamicGhostHeight,o=e.hasStaticItems,i=yt(e,["dynamicGhostHeight","hasStaticItems"]),r=mt(mt(mt({},this.defaultOptions),i),{onUpdate:function(e){return i.onUpdate?i.onUpdate(e):t.emitUpdate(e)}});n&&(r.onStart=function(e){return t.setGhostHeight(e)}),o&&(r.onMove=function(t){return!t.related.classList.contains("dato-sortable-static-item")&&(!i.onMove||i.onMove(t))}),this.mergedOptions=r},t.prototype.emitUpdate=function(t){this.formControl&&this.formControl.setValue(this.list),this.orderUpdated.emit(t)},t.prototype.setGhostHeight=function(t){var e=t.from.children[t.oldIndex];Vt(e,"display","block");var n=e.getBoundingClientRect().height;Vt(e,"display","none"),Vt(Ft(".dato-sortable-ghost"),"height",n+"px")},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoList",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoOptions",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"containerClass",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"orderUpdated",void 0),t=vt([e.Component({selector:"dato-sortable",template:'<section [sortablejs]="list" [sortablejsOptions]="mergedOptions" [ngClass]="containerClass"\n (update.stop)="noop()" (add.stop)="noop()" (sort.stop)="noop()" (remove.stop)="noop()"\n (filter.stop)="noop()" (change.stop)="noop()" (drag.stop)="noop()">\n <ng-content></ng-content>\n</section>',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-sortable{display:inline-block}dato-sortable .dato-sortable-handler{cursor:move;cursor:-webkit-grabbing}.dato-sortable-ghost>*{display:none!important}.dato-sortable-drag{box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}"]})],t)}(),zi=function(){function t(t,e){this.renderer=t,this.host=e,t.addClass(e.nativeElement,"dato-sortable-handler")}return t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoSortableHandle]"}),Ct("design:paramtypes",[e.Renderer2,e.ElementRef])],t)}(),Bi=[Vi,zi],Hi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,dt.SortablejsModule],declarations:[Bi],exports:[Bi]})],t)}(),Ui=[Ti,Ei,ki],Ki=[yi],Wi=function(){function t(){}return t=vt([e.NgModule({imports:[yo,s.CommonModule,vo,Ne,o.ReactiveFormsModule,Pi,se,Co,xo,Gi,Xn,Hi],declarations:[Ui,Ki],exports:[Ui,Ki,Gi],entryComponents:[Ui]})],t)}();
|
|
240
240
|
/**
|
|
241
241
|
* @license
|
|
242
242
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -366,7 +366,7 @@ function(t,e,n){var o=an(U.lastDayOfMonth(t),n),i=an(U.startOfMonth(t),n);return
|
|
|
366
366
|
*
|
|
367
367
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
368
368
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
369
|
-
*/var Ts=function(){function n(t,n){this.config=t,this.cdr=n,this.daysOfTheWeek=[],this.range={},this.isSingle=!1,this.dayChange=new e.EventEmitter,this.monthChange=new e.EventEmitter,this.cdr.detach()}return Object.defineProperty(n.prototype,"data",{set:function(e){var n=e.month,o=e.disableRanges,i=e.classRanges,r=this.config.locale.code===en[t.SUPPORTED_LOCALES.ja_JP].code?"yoMMM":"MMM y";this.currentMonth=n,this.monthLabel=U.format(n,r,{locale:this.config.locale}),this.days=Is(n,o,this.config,i),this.daysOfTheWeek=this.getDaysOfTheWeek(this.days,this.config.locale),this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fromDate",{get:function(){return an(this.range.from,this.config.locale)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"toDate",{get:function(){return an(this.range.to,this.config.locale)},enumerable:!0,configurable:!0}),n.prototype.inSelectedRange=function(t){return!(this.isSingle||!this.fromDate||!this.toDate)&&U.isWithinInterval(t,{start:this.fromDate,end:this.toDate})},n.prototype.isFromDate=function(t){return!this.isSingle&&!this.isRangeEqual()&&(!!this.toDate&&U.isSameDay(t,this.fromDate))},n.prototype.isToDate=function(t){return!this.isSingle&&!this.isRangeEqual()&&(!!this.toDate&&U.isSameDay(t,this.toDate))},n.prototype.isDayActive=function(t){return U.isSameDay(this.fromDate,t)},n.prototype.setMonth=function(){var t=sn(U.startOfMonth(this.currentMonth),this.config.locale),e=sn(U.endOfMonth(this.currentMonth),this.config.locale);this.monthChange.emit({from:t,to:e})},n.prototype.setRange=function(t){this.range=t,this.cdr.detectChanges()},n.prototype.selectDate=function(t){this.dayChange.emit(t)},n.prototype.getClasses=function(t){var e,n=t.rawDate;return(e={"day-active-from":this.isFromDate(n),"day-active-to":this.isToDate(n),"day-active":this.isDayActive(n),"day-disabled":t.isDisable,"in-range":this.inSelectedRange(n),"is-today":t.isToday})[t.cssClass]=!!t.cssClass,e},n.prototype.isRangeEqual=function(){return U.isSameDay(this.fromDate,this.toDate)},n.prototype.getDaysOfTheWeek=function(t,e){return t.slice(0,7).map((function(t){var n=t.rawDate;return U.format(n,"EEEEEE",{locale:e}).toUpperCase()}))},n.ctorParameters=function(){return[{type:yn,decorators:[{type:e.Inject,args:[vn]}]},{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"isSingle",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],n.prototype,"data",null),vt([e.Output(),Ct("design:type",Object)],n.prototype,"dayChange",void 0),vt([e.Output(),Ct("design:type",Object)],n.prototype,"monthChange",void 0),n=vt([e.Component({selector:"dato-date-picker-month",template:'<section>\n <p class="date-picker-month-name primary-500-color dato-simple text-center pointer no-select m-0" (click)="setMonth()">\n {{ monthLabel }}\n </p>\n\n <div class="d-flex">\n <div *ngFor="let dayName of daysOfTheWeek" class="date-picker-cell no-select primary-300-color">\n {{ dayName | translate }}\n </div>\n </div>\n\n <div class="d-flex d-flex-wrap">\n <ng-template ngFor [ngForOf]="days" let-day>\n <div class="date-picker-cell primary-color-600 date-picker-day pointer"\n [class.invisible]="!day.isThisMonth"\n [ngClass]="getClasses(day)"\n (click)="selectDate(day.rawDate)">\n {{day.date}}\n </div>\n </ng-template>\n </div>\n</section>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}section{width:200px;max-width:200px;padding-top:20px}.date-picker-cell{width:26px;height:26px;display:flex;align-items:center;justify-content:center;font-size:12px}"]}),bt(0,e.Inject(vn)),Ct("design:paramtypes",[yn,e.ChangeDetectorRef])],n)}(),Es=new e.InjectionToken("POPPER_BOUNDARY"),As=function(n){function i(t,o,i,r,a,s){var l=n.call(this)||this;return l.ngControl=t,l.config=o,l.popover=i,l.cdr=r,l.translate=a,l.boundary=s,l.placeholder="core.selectDate",l.position="bottom-start",l.offset=[0,5],l.viewMode=!1,l.triggerStyle="icon-text",l.inputBoundary=null,l.labelTooltipPosition="right",l.toggle=new e.EventEmitter,l.DATE_FORMAT_LOCALE={locale:l.config.locale},l.open=!1,t.valueAccessor=l,l}return ft(i,n),i.prototype.writeValue=function(t){this.range=t,this.createLabel(t),this.cdr.detectChanges()},i.prototype.ngAfterContentInit=function(){this.input&&(this.updateInput(),this.input.disableClear(),this.input.setPopperOrigin(),this.input.writeValue(this.dateRange),this.initialInputValue=this.dateRange)},i.prototype.openDatepicker=function(e){var n=this;this.open||!1!==this.viewMode||(this.toggle.emit({type:t.PopoverTrigger.Open}),this.popover.open(this.datePickerPopper,this.defaultPopperOrigin||e,{id:"datePicker",className:"dato-date-picker",popper:{boundary:this.inputBoundary||this.boundary,offset:this.offset,placement:this.position}}).subscribe((function(t){n.toggle.emit(t),n.open=!1,n.input&&n.setInputValue()})),this.open=!0,this.input&&this.handleEnter())},i.prototype.updateInput=function(){this.input.writeValue(this.dateRange)},i.prototype.createLabel=function(t){if(t)if(Mt(t)||t instanceof Date)this.dateRange=U.format(an(t,this.config.locale),ln(this.config.locale),this.DATE_FORMAT_LOCALE),this.input&&this.updateInput();else{var e=an(t.from,this.config.locale),n=an(t.to,this.config.locale),o=U.format(e,ln(this.config.locale),this.DATE_FORMAT_LOCALE),i=U.format(n,ln(this.config.locale),this.DATE_FORMAT_LOCALE),r=t.id===this.config.customRangeID?"":t.label||"",a=U.isSameDay(e,n)?o:o+" - "+i;r?(this.dateLabel=r,this.dateRange="("+a+")"):(this.dateRange=a,this.dateLabel="")}else this.dateRange=this.translate.transform(this.placeholder)},i.prototype.setInputValue=function(){var t=U.isDate(this.initialInputValue)?this.initialInputValue:cn(this.initialInputValue,this.config.locale);U.isValid(t)||(t=U.parseISO(this.initialInputValue));var e=sn(t,this.config.locale),n=cn(this.input.value,this.config.locale),o=U.isValid(n)?sn(n,this.config.locale):e;e!==o&&(this.ngControl.control.patchValue(o),this.initialInputValue=o)},i.prototype.handleEnter=function(){var t=this;this.input.keydown$.pipe(r.filter(Si),r.takeUntil(this.toggle)).subscribe((function(){t.setInputValue(),t.popover.closeById("datePicker"),t.input.blur()}))},i.ctorParameters=function(){return[{type:o.NgControl,decorators:[{type:e.Self},{type:e.Optional}]},{type:yn,decorators:[{type:e.Inject,args:[vn]}]},{type:ia},{type:e.ChangeDetectorRef},{type:_n},{type:String,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[Es]}]}]},vt([e.Input(),Ct("design:type",Object)],i.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],i.prototype,"position",void 0),vt([e.Input(),Ct("design:type",Array)],i.prototype,"offset",void 0),vt([e.Input(),Ct("design:type",Object)],i.prototype,"viewMode",void 0),vt([e.Input(),Ct("design:type",String)],i.prototype,"triggerStyle",void 0),vt([e.Input(),Ct("design:type",String)],i.prototype,"inputBoundary",void 0),vt([e.Input(),Ct("design:type",Object)],i.prototype,"labelTooltipPosition",void 0),vt([e.Input(),Ct("design:type",HTMLDivElement)],i.prototype,"defaultPopperOrigin",void 0),vt([e.ContentChild("triggerTpl",{static:!0}),Ct("design:type",e.TemplateRef)],i.prototype,"triggerTpl",void 0),vt([e.ContentChild(e.TemplateRef,{static:!0}),Ct("design:type",e.TemplateRef)],i.prototype,"datePickerPopper",void 0),vt([e.ContentChild(Cn),Ct("design:type",Cn)],i.prototype,"input",void 0),vt([e.Output(),Ct("design:type",Object)],i.prototype,"toggle",void 0),i=vt([e.Component({selector:"dato-date-picker",template:'<div class="d-flex {{ triggerStyle }} items-center dato-date-picker-trigger" (click)="openDatepicker(origin)" #origin\n [class.pointer]="!viewMode">\n <ng-template #defaultView>\n <dato-icon datoIcon="calendarcore" width="16px" class="primary-400-color"></dato-icon>\n <div class="ellipsis"\n [datoTooltip]="dateLabel + \' \' + dateRange"\n [datoTooltipPosition]="labelTooltipPosition"\n [datoTooltipOnTextOverflow]="true">\n <span class="dato-note date-label" *ngIf="dateLabel">{{dateLabel | translate}} </span>\n <span class="dato-note date-range">{{dateRange}}</span>\n </div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]="triggerTpl ? triggerTpl : defaultView"\n [ngTemplateOutletContext]="{label: dateLabel, range: dateRange, icon: \'calendar\'}"></ng-template>\n </div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),bt(0,e.Self()),bt(0,e.Optional()),bt(1,e.Inject(vn)),bt(5,e.Optional()),bt(5,e.Self()),bt(5,e.Inject(Es)),Ct("design:paramtypes",[o.NgControl,yn,ia,e.ChangeDetectorRef,_n,String])],i)}(Dt);
|
|
369
|
+
*/var Ts=function(){function n(t,n){this.config=t,this.cdr=n,this.daysOfTheWeek=[],this.range={},this.isSingle=!1,this.dayChange=new e.EventEmitter,this.monthChange=new e.EventEmitter,this.cdr.detach()}return Object.defineProperty(n.prototype,"data",{set:function(e){var n=e.month,o=e.disableRanges,i=e.classRanges,r=this.config.locale.code===en[t.SUPPORTED_LOCALES.ja_JP].code?"yoMMM":"MMM y";this.currentMonth=n,this.monthLabel=U.format(n,r,{locale:this.config.locale}),this.days=Is(n,o,this.config,i),this.daysOfTheWeek=this.getDaysOfTheWeek(this.days,this.config.locale),this.cdr.detectChanges()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fromDate",{get:function(){return an(this.range.from,this.config.locale)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"toDate",{get:function(){return an(this.range.to,this.config.locale)},enumerable:!0,configurable:!0}),n.prototype.inSelectedRange=function(t){return!(this.isSingle||!this.fromDate||!this.toDate)&&U.isWithinInterval(t,{start:this.fromDate,end:this.toDate})},n.prototype.isFromDate=function(t){return!this.isSingle&&!this.isRangeEqual()&&(!!this.toDate&&U.isSameDay(t,this.fromDate))},n.prototype.isToDate=function(t){return!this.isSingle&&!this.isRangeEqual()&&(!!this.toDate&&U.isSameDay(t,this.toDate))},n.prototype.isDayActive=function(t){return U.isSameDay(this.fromDate,t)},n.prototype.setMonth=function(){var t=sn(U.startOfMonth(this.currentMonth),this.config.locale),e=sn(U.endOfMonth(this.currentMonth),this.config.locale);this.monthChange.emit({from:t,to:e})},n.prototype.setRange=function(t){this.range=t,this.cdr.detectChanges()},n.prototype.selectDate=function(t){this.dayChange.emit(t)},n.prototype.getClasses=function(t){var e,n=t.rawDate;return(e={"day-active-from":this.isFromDate(n),"day-active-to":this.isToDate(n),"day-active":this.isDayActive(n),"day-disabled":t.isDisable,"in-range":this.inSelectedRange(n),"is-today":t.isToday})[t.cssClass]=!!t.cssClass,e},n.prototype.isRangeEqual=function(){return U.isSameDay(this.fromDate,this.toDate)},n.prototype.getDaysOfTheWeek=function(t,e){return t.slice(0,7).map((function(t){var n=t.rawDate;return U.format(n,"EEEEEE",{locale:e}).toUpperCase()}))},n.ctorParameters=function(){return[{type:yn,decorators:[{type:e.Inject,args:[vn]}]},{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"isSingle",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],n.prototype,"data",null),vt([e.Output(),Ct("design:type",Object)],n.prototype,"dayChange",void 0),vt([e.Output(),Ct("design:type",Object)],n.prototype,"monthChange",void 0),n=vt([e.Component({selector:"dato-date-picker-month",template:'<section>\n <p class="date-picker-month-name primary-500-color dato-simple text-center pointer no-select m-0" (click)="setMonth()">\n {{ monthLabel }}\n </p>\n\n <div class="d-flex">\n <div *ngFor="let dayName of daysOfTheWeek" class="date-picker-cell no-select primary-300-color">\n {{ dayName | translate }}\n </div>\n </div>\n\n <div class="d-flex d-flex-wrap">\n <ng-template ngFor [ngForOf]="days" let-day>\n <div class="date-picker-cell primary-color-600 date-picker-day pointer"\n [class.invisible]="!day.isThisMonth"\n [ngClass]="getClasses(day)"\n (click)="selectDate(day.rawDate)">\n {{day.date}}\n </div>\n </ng-template>\n </div>\n</section>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}section{width:200px;max-width:200px;padding-top:20px}.date-picker-cell{width:26px;height:26px;display:flex;align-items:center;justify-content:center;font-size:12px}"]}),bt(0,e.Inject(vn)),Ct("design:paramtypes",[yn,e.ChangeDetectorRef])],n)}(),Es=new e.InjectionToken("POPPER_BOUNDARY"),As=function(n){function i(t,o,i,r,a,s){var l=n.call(this)||this;return l.ngControl=t,l.config=o,l.popover=i,l.cdr=r,l.translate=a,l.boundary=s,l.placeholder="core.selectDate",l.position="bottom-start",l.offset=[0,5],l.viewMode=!1,l.triggerStyle="icon-text",l.inputBoundary=null,l.labelTooltipPosition="right",l.toggle=new e.EventEmitter,l.DATE_FORMAT_LOCALE={locale:l.config.locale},l.open=!1,t.valueAccessor=l,l}return ft(i,n),i.prototype.writeValue=function(t){this.range=t,this.createLabel(t),this.cdr.detectChanges()},i.prototype.ngAfterContentInit=function(){this.input&&(this.updateInput(),this.input.disableClear(),this.input.setPopperOrigin(),this.input.writeValue(this.dateRange),this.initialInputValue=this.dateRange)},i.prototype.openDatepicker=function(e){var n=this;this.open||!1!==this.viewMode||(this.toggle.emit({type:t.PopoverTrigger.Open}),this.popover.open(this.datePickerPopper,this.defaultPopperOrigin||e,{id:"datePicker",className:"dato-date-picker",popper:{boundary:this.inputBoundary||this.boundary,offset:this.offset,placement:this.position}}).subscribe((function(t){n.toggle.emit(t),n.open=!1,n.cdr.detectChanges(),n.input&&n.setInputValue()})),this.open=!0,this.cdr.detectChanges(),this.input&&this.handleEnter())},i.prototype.updateInput=function(){this.input.writeValue(this.dateRange)},i.prototype.createLabel=function(t){if(t)if(Mt(t)||t instanceof Date)this.dateRange=U.format(an(t,this.config.locale),ln(this.config.locale),this.DATE_FORMAT_LOCALE),this.input&&this.updateInput();else{var e=an(t.from,this.config.locale),n=an(t.to,this.config.locale),o=U.format(e,ln(this.config.locale),this.DATE_FORMAT_LOCALE),i=U.format(n,ln(this.config.locale),this.DATE_FORMAT_LOCALE),r=t.id===this.config.customRangeID?"":t.label||"",a=U.isSameDay(e,n)?o:o+" - "+i;r?(this.dateLabel=r,this.dateRange="("+a+")"):(this.dateRange=a,this.dateLabel="")}else this.dateRange=this.translate.transform(this.placeholder)},i.prototype.setInputValue=function(){var t=U.isDate(this.initialInputValue)?this.initialInputValue:cn(this.initialInputValue,this.config.locale);U.isValid(t)||(t=U.parseISO(this.initialInputValue));var e=sn(t,this.config.locale),n=cn(this.input.value,this.config.locale),o=U.isValid(n)?sn(n,this.config.locale):e;e!==o&&(this.ngControl.control.patchValue(o),this.initialInputValue=o)},i.prototype.handleEnter=function(){var t=this;this.input.keydown$.pipe(r.filter(Si),r.takeUntil(this.toggle)).subscribe((function(){t.setInputValue(),t.popover.closeById("datePicker"),t.input.blur()}))},i.ctorParameters=function(){return[{type:o.NgControl,decorators:[{type:e.Self},{type:e.Optional}]},{type:yn,decorators:[{type:e.Inject,args:[vn]}]},{type:ia},{type:e.ChangeDetectorRef},{type:_n},{type:String,decorators:[{type:e.Optional},{type:e.Self},{type:e.Inject,args:[Es]}]}]},vt([e.Input(),Ct("design:type",Object)],i.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],i.prototype,"position",void 0),vt([e.Input(),Ct("design:type",Array)],i.prototype,"offset",void 0),vt([e.Input(),Ct("design:type",Object)],i.prototype,"viewMode",void 0),vt([e.Input(),Ct("design:type",String)],i.prototype,"triggerStyle",void 0),vt([e.Input(),Ct("design:type",String)],i.prototype,"inputBoundary",void 0),vt([e.Input(),Ct("design:type",Object)],i.prototype,"labelTooltipPosition",void 0),vt([e.Input(),Ct("design:type",HTMLDivElement)],i.prototype,"defaultPopperOrigin",void 0),vt([e.ContentChild("triggerTpl",{static:!0}),Ct("design:type",e.TemplateRef)],i.prototype,"triggerTpl",void 0),vt([e.ContentChild(e.TemplateRef,{static:!0}),Ct("design:type",e.TemplateRef)],i.prototype,"datePickerPopper",void 0),vt([e.ContentChild(Cn),Ct("design:type",Cn)],i.prototype,"input",void 0),vt([e.Output(),Ct("design:type",Object)],i.prototype,"toggle",void 0),i=vt([e.Component({selector:"dato-date-picker",template:'<div class="d-flex {{ triggerStyle }} items-center dato-date-picker-trigger" [class.open]="open" (click)="openDatepicker(origin)" #origin\n [class.pointer]="!viewMode">\n <ng-template #defaultView>\n <dato-icon datoIcon="calendarcore" width="16px" class="primary-400-color"></dato-icon>\n <div class="ellipsis"\n [datoTooltip]="dateLabel + \' \' + dateRange"\n [datoTooltipPosition]="labelTooltipPosition"\n [datoTooltipOnTextOverflow]="true">\n <span class="dato-note date-label" *ngIf="dateLabel">{{dateLabel | translate}} </span>\n <span class="dato-note date-range">{{dateRange}}</span>\n </div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]="triggerTpl ? triggerTpl : defaultView"\n [ngTemplateOutletContext]="{label: dateLabel, range: dateRange, icon: \'calendar\'}"></ng-template>\n </div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),bt(0,e.Self()),bt(0,e.Optional()),bt(1,e.Inject(vn)),bt(5,e.Optional()),bt(5,e.Self()),bt(5,e.Inject(Es)),Ct("design:paramtypes",[o.NgControl,yn,ia,e.ChangeDetectorRef,_n,String])],i)}(Dt);
|
|
370
370
|
/**
|
|
371
371
|
* @license
|
|
372
372
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -604,7 +604,7 @@ function mc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function yc(t,e,n){this.
|
|
|
604
604
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
605
605
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
606
606
|
*/
|
|
607
|
-
function ap(t){var e=t.collection,n=t.value,o=t.labelKey,i=(n||"").toLocaleLowerCase();return(e||[]).filter((function(t){return(t&&t[o]||"").toLocaleLowerCase().includes(i)}))}function sp(t){var e=t.collection,n=t.value,o=t.childrenKey,i=t.labelKey;return e.map((function(t){var e;return mt(mt({},t),((e={})[o]=ap({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function lp(t){var e=t.control,o=t.debounceTime,i=t.mapFn;return n.defer((function(){return e.valueChanges.pipe(Ve(o),r.startWith(e.value||""),r.map(i))}))}window.coreVersion="22.2.6",t.APP_TRANSLATE=kn,t.AceService=xc,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=Xr,t.CustomHeaderControllerService=fa,t.DATE_PICKER_CONFIG=vn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=_a,t.DATO_FORM_ERRORS=fs,t.DATO_GRID_STORAGE_API=Vr,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=xa,t.DatePickerConfig=yn,t.DatePickerMonthComponent=Ts,t.DatoAccordionComponent=ci,t.DatoAccordionContentComponent=ri,t.DatoAccordionGroupComponent=si,t.DatoAccordionHeaderComponent=ai,t.DatoAccordionModule=di,t.DatoAceDirective=Oc,t.DatoAceDraggableDirective=Dc,t.DatoAceModule=Tc,t.DatoAutoCompleteContentDirective=kc,t.DatoAutoFocusDirective=Tn,t.DatoAutocompleteComponent=_c,t.DatoAutocompleteDirective=jc,t.DatoAutocompleteModule=Lc,t.DatoBreadcrumbsComponent=Fc,t.DatoBreadcrumbsModule=Gc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=Qc,t.DatoButtonGroupModule=qc,t.DatoButtonModule=se,t.DatoCamelCasePipe=oo,t.DatoCarouselComponent=Ul,t.DatoCarouselItemDirective=zl,t.DatoCarouselItemElement=Hl,t.DatoCarouselModule=Wl,t.DatoCheckboxComponent=Ri,t.DatoCheckboxModule=Pi,t.DatoClipboardDirective=zn,t.DatoColorDirective=wn,t.DatoConfirmationDialogComponent=Yo,t.DatoControlErrorComponent=us,t.DatoControlErrorContainerDirective=hs,t.DatoControlErrorsDirective=ms,t.DatoCoreError=To,t.DatoCoreModule=op,t.DatoCustomHeaderTemplateComponent=Fa,t.DatoCustomHeaderTemplateDirective=La,t.DatoCustomMoreMenuTemplateDirective=Na,t.DatoDatePickerContainerComponent=As,t.DatoDatePickerModule=Hs,t.DatoDatePickerRangeComponent=Ms,t.DatoDatePickerSingleComponent=Vs,t.DatoDialog=Zo,t.DatoDialogCloseDirective=rl,t.DatoDialogComponent=Ko,t.DatoDialogContentComponent=ol,t.DatoDialogDismissDirective=cl,t.DatoDialogFooterComponent=il,t.DatoDialogHeaderComponent=nl,t.DatoDialogModule=dl,t.DatoDialogRef=Uo,t.DatoDirectivesModule=Xn,t.DatoDisableControlDirective=Gn,t.DatoDraggableDirective=In,t.DatoDynamicContentComponent=sl,t.DatoDynamicContentModule=ll,t.DatoEditableHeaderComponent=jl,t.DatoEditableHeaderModule=Ll,t.DatoFileInputComponent=Hc,t.DatoFileInputDefaultComponent=Uc,t.DatoFileInputModule=Wc,t.DatoFontDirective=wo,t.DatoFontIconComponent=Fe,t.DatoFontIconModule=Ge,t.DatoFormSubmitDirective=gs,t.DatoFormValidationModule=vs,t.DatoGrid=ar,t.DatoGridAPI=Io,t.DatoGridAvatarCellComponent=bl,t.DatoGridColumnDisplayMenuComponent=Ka,t.DatoGridColumnHeaderComponent=ma,t.DatoGridColumnHeaderMoreMenuComponent=aa,t.DatoGridComponent=jo,t.DatoGridControllerComponent=Ha,t.DatoGridDateFilterOptions=br,t.DatoGridFilterComponent=ga,t.DatoGridFilterOptionsMap=Sr,t.DatoGridGroupsMenuComponent=Wa,t.DatoGridHeaderComponent=Mo,t.DatoGridHeaderV2Component=Qa,t.DatoGridInitialsCellComponent=vl,t.DatoGridItemsCellComponent=yl,t.DatoGridModule=tr,t.DatoGridNumberFilterOptions=wr,t.DatoGridOnHoverComponent=Va,t.DatoGridPaginationComponent=ko,t.DatoGridPaginationV2Component=qa,t.DatoGridStatusCellComponent=ml,t.DatoGridStringFilterOptions=Cr,t.DatoGridToolbarComponent=ni,t.DatoGridToolbarItemDirective=No,t.DatoGridToolbarItemElementDirective=Fo,t.DatoGridV2Component=Ua,t.DatoGridV2LoaderComponent=Hr,t.DatoGridV2Module=xl,t.DatoGridV2NoDataOverlayComponent=qr,t.DatoGridV2ToolbarButtonComponent=Ya,t.DatoGridV2ToolbarComponent=Za,t.DatoGroupComponent=fi,t.DatoHighlightPipe=to,t.DatoHotkeys=Ba,t.DatoHotkeysDirective=ul,t.DatoHotkeysHelpComponent=za,t.DatoHotkeysModule=hl,t.DatoIconButtonComponent=Oo,t.DatoIconButtonModule=Do,t.DatoIconComponent=Le,t.DatoIconModule=Ne,t.DatoInfiniteScrollComponent=Vc,t.DatoInfiniteScrollModule=Bc,t.DatoInputComponent=Cn,t.DatoInputModule=vo,t.DatoInputNumberComponent=Cs,t.DatoInputNumberDirective=bs,t.DatoInputNumberModule=xs,t.DatoKebabCasePipe=no,t.DatoLinkButtonComponent=bo,t.DatoLinkButtonModule=Co,t.DatoListComponent=Yi,t.DatoListModule=Xi,t.DatoListNoDataComponent=Xs,t.DatoListNoResultComponent=Zs,t.DatoListV2Component=Ys,t.DatoListV2Module=el,t.DatoLoaderComponent=Us,t.DatoLoadersModule=Ws,t.DatoMenuComponent=os,t.DatoMenuContentDirective=ns,t.DatoMenuItemDirective=rs,t.DatoMenuModule=ss,t.DatoMenuTriggerForDirective=is,t.DatoMultiOptionComponent=_i,t.DatoMultiOptionV2Component=Li,t.DatoOperatorTogglerComponent=cs,t.DatoOperatorTogglerModule=ds,t.DatoOptionComponent=mi,t.DatoOptionV2Component=Mi,t.DatoOptionsModule=Gi,t.DatoOriginDirective=Dn,t.DatoOverlay=Rn,t.DatoPageLoaderComponent=Ks,t.DatoPanel=pc,t.DatoPanelComponent=sc,t.DatoPanelContentComponent=uc,t.DatoPanelFooterComponent=hc,t.DatoPanelHeaderComponent=dc,t.DatoPanelInternalConfig=lc,t.DatoPanelModule=fc,t.DatoPanelRef=cc,t.DatoPillsComponent=Yc,t.DatoPillsModule=Xc,t.DatoPipesModule=yo,t.DatoPopover=ia,t.DatoPopoverComponent=ea,t.DatoPopoverModule=es,t.DatoProgressBarComponent=Jc,t.DatoProgressBarModule=ep,t.DatoRadioComponent=Dl,t.DatoRadioModule=Tl,t.DatoRichTextDirective=Fl,t.DatoRichTextModule=Vl,t.DatoSearchResultsGroupSortPipe=co,t.DatoSearchResultsSortPipe=uo,t.DatoSearchableContainerComponent=oi,t.DatoSearchableDirective=ii,t.DatoSearchableHighlightDirective=Ac,t.DatoSearchableModule=Pc,t.DatoSelectActiveDirective=yi,t.DatoSelectComponent=Ti,t.DatoSelectEmptyComponent=ji,t.DatoSelectModule=Wi,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=kl,t.DatoSnackbarComponent=Al,t.DatoSnackbarModule=Rl,t.DatoSortableComponent=Vi,t.DatoSortableHandleDirective=zi,t.DatoSortableModule=Hi,t.DatoStaticImageSrcDirective=Hn,t.DatoStaticImagesSrcModule=Un,t.DatoSubscribeContext=Nn,t.DatoSubscribeDirective=Fn,t.DatoTab=Yl,t.DatoTabContent=ql,t.DatoTabTitle=$l,t.DatoTabsModule=Jl,t.DatoTabset=Zl,t.DatoTemplatePortal=Pn,t.DatoTextModule=xo,t.DatoThemesModule=On,t.DatoToast=ac,t.DatoToastComponent=ec,t.DatoToastModule=nc,t.DatoTogglerComponent=Ns,t.DatoTogglerModule=Gs,t.DatoTooltipDirective=Ln,t.DatoTooltipV2Directive=Yn,t.DatoTrackByPropPipe=go,t.DatoTranslateService=_n,t.DatoTreePipe=fo,t.DatoTriggerMulti=ki,t.DatoTriggerSingle=Ei,t.DialogConfig=Wo,t.EventModifiersPlugin=Nc,t.GridToolbarService=ei,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=je,t.POPPER_BOUNDARY=Es,t.PaletteDirective=Sn,t.PopoverCloseDirective=Xa,t.PopoverContentDirective=Ja,t.PopoverRef=na,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=Pl,t.Store=Qs,t.SvgRegistry=Me,t.ToolbarConfirmation=Jo,t.ToolbarDeleteConfirmation=ti,t.ToolbarHandler=Xo,t.TranslatePipe=eo,t._valueChanges=lp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=wc,t.allowedFileTypes=function(t){return function(e){var n=e.value;if(n)for(var o=n instanceof FileList?n:[n],i=0,r=o.length;i<r;i++){var a=o[i].name.split(".").pop();if(!1===t.includes(a))return{invalidFileType:{extension:a}}}return null}},t.alphabeticalGroupSort=lo,t.alphabeticalSort=so,t.appendChild=qt,t.appendScript=Xt,t.appendStyle=Jt,t.appendToBody=Zt,t.assertString=function(t,e){if("string"!=typeof t)throw new To(e+" expecting string but got "+typeof t)},t.camelCase=De,t.capitalize=Oe,t.cloneDeep=function(t){return N(t)},t.closest=ee,t.coerceArray=me,t.coerceElement=function(t){return t instanceof e.ElementRef?t.nativeElement:t},t.compareWith=ro,t.compose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduce((function(t,e){return e(t)}),e)}},t.convertFromTreeData=ka,t.convertToTreeData=Pa,t.copyToClipboard=Vn,t.createComponent=Yr,t.createElement=$t,t.createGUID=Te,t.createHTMLCompletor=Cc,t.curry=ve,t.dateCompare=ke,t.daysOfTheMonth=Is,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=pl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=$r,t.defaultActions=ra,t.defaultConfig=El,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=Sa,t.defaultGridTreeLabel=Oa,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=ba,t.dialogSizePreset=zo,t.diff=we,t.difference=le,t.differenceBy=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return h.apply(void 0,xt(t))},t.dimensionsChanges=$n,t.directives=xn,t.drop=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.editableCellRendererWithSearchHighlight=zr,t.escape=xe,t.escapeRegExp=function(t){return H(t)},t.filter=function(t,e){return O(t,e)},t.filterByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.debounceTime;return lp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return ap({collection:t,value:e,labelKey:r})}})},t.filterByTerm=ap,t.filterDialogDismissed=function(){return tc(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return tc(t.DialogResultStatus.SUCCESS)},t.filterGroupByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.childrenKey,s=void 0===a?"children":a,l=o.debounceTime;return lp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return sp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=sp,t.filterKey=Oi,t.find=function(t,e,n){return v(t,e,n)},t.findIndex=ce,t.findKey=function(t,e){return D(t,e)},t.fixNgLeaks=function(){o.FormControlDirective.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null},o.FormControlName.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null}},t.forEach=function(t,e){return b(t,e)},t.formatKeys=ca,t.generateMonths=ks,t.get=function(t,e,n){return R(t,e,n)},t.getAttr=Bt,t.getCustomRange=rn,t.getDateISOString=sn,t.getDefaultConfirmationOptions=$o,t.getDefaultOptions=Go,t.getDefaultsToastOptions=ic,t.getElementCoords=te,t.getFunctionName=be,t.getGridConfiguration=nr,t.getGridModel=rr,t.getInitials=Ee,t.getLocalizedFormat=ln,t.getMultiTemplate=ui,t.getOptionTemplate=hi,t.getPopperDefaults=function(t){return{placement:t.placement,modifiers:{keepTogether:{enabled:!0},hide:{enabled:!1},preventOverflow:{enabled:!1}}}},t.getUTCDate=an,t.getVisibleActions=Ar,t.gridTreeFilePathKey=Da,t.groupBy=function(t,e){return x(t,e)},t.groupSortOrder=io,t.has=function(t,e){return P(t,e)},t.inView=Wn,t.intersection=
|
|
607
|
+
function ap(t){var e=t.collection,n=t.value,o=t.labelKey,i=(n||"").toLocaleLowerCase();return(e||[]).filter((function(t){return(t&&t[o]||"").toLocaleLowerCase().includes(i)}))}function sp(t){var e=t.collection,n=t.value,o=t.childrenKey,i=t.labelKey;return e.map((function(t){var e;return mt(mt({},t),((e={})[o]=ap({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function lp(t){var e=t.control,o=t.debounceTime,i=t.mapFn;return n.defer((function(){return e.valueChanges.pipe(Ve(o),r.startWith(e.value||""),r.map(i))}))}window.coreVersion="22.5.1",t.APP_TRANSLATE=kn,t.AceService=xc,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=Xr,t.CustomHeaderControllerService=fa,t.DATE_PICKER_CONFIG=vn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=_a,t.DATO_FORM_ERRORS=fs,t.DATO_GRID_STORAGE_API=Vr,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=xa,t.DatePickerConfig=yn,t.DatePickerMonthComponent=Ts,t.DatoAccordionComponent=ci,t.DatoAccordionContentComponent=ri,t.DatoAccordionGroupComponent=si,t.DatoAccordionHeaderComponent=ai,t.DatoAccordionModule=di,t.DatoAceDirective=Oc,t.DatoAceDraggableDirective=Dc,t.DatoAceModule=Tc,t.DatoAutoCompleteContentDirective=kc,t.DatoAutoFocusDirective=Tn,t.DatoAutocompleteComponent=_c,t.DatoAutocompleteDirective=jc,t.DatoAutocompleteModule=Lc,t.DatoBreadcrumbsComponent=Fc,t.DatoBreadcrumbsModule=Gc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=Qc,t.DatoButtonGroupModule=qc,t.DatoButtonModule=se,t.DatoCamelCasePipe=oo,t.DatoCarouselComponent=Ul,t.DatoCarouselItemDirective=zl,t.DatoCarouselItemElement=Hl,t.DatoCarouselModule=Wl,t.DatoCheckboxComponent=Ri,t.DatoCheckboxModule=Pi,t.DatoClipboardDirective=zn,t.DatoColorDirective=wn,t.DatoConfirmationDialogComponent=Yo,t.DatoControlErrorComponent=us,t.DatoControlErrorContainerDirective=hs,t.DatoControlErrorsDirective=ms,t.DatoCoreError=To,t.DatoCoreModule=op,t.DatoCustomHeaderTemplateComponent=Fa,t.DatoCustomHeaderTemplateDirective=La,t.DatoCustomMoreMenuTemplateDirective=Na,t.DatoDatePickerContainerComponent=As,t.DatoDatePickerModule=Hs,t.DatoDatePickerRangeComponent=Ms,t.DatoDatePickerSingleComponent=Vs,t.DatoDialog=Zo,t.DatoDialogCloseDirective=rl,t.DatoDialogComponent=Ko,t.DatoDialogContentComponent=ol,t.DatoDialogDismissDirective=cl,t.DatoDialogFooterComponent=il,t.DatoDialogHeaderComponent=nl,t.DatoDialogModule=dl,t.DatoDialogRef=Uo,t.DatoDirectivesModule=Xn,t.DatoDisableControlDirective=Gn,t.DatoDraggableDirective=In,t.DatoDynamicContentComponent=sl,t.DatoDynamicContentModule=ll,t.DatoEditableHeaderComponent=jl,t.DatoEditableHeaderModule=Ll,t.DatoFileInputComponent=Hc,t.DatoFileInputDefaultComponent=Uc,t.DatoFileInputModule=Wc,t.DatoFontDirective=wo,t.DatoFontIconComponent=Fe,t.DatoFontIconModule=Ge,t.DatoFormSubmitDirective=gs,t.DatoFormValidationModule=vs,t.DatoGrid=ar,t.DatoGridAPI=Io,t.DatoGridAvatarCellComponent=bl,t.DatoGridColumnDisplayMenuComponent=Ka,t.DatoGridColumnHeaderComponent=ma,t.DatoGridColumnHeaderMoreMenuComponent=aa,t.DatoGridComponent=jo,t.DatoGridControllerComponent=Ha,t.DatoGridDateFilterOptions=br,t.DatoGridFilterComponent=ga,t.DatoGridFilterOptionsMap=Sr,t.DatoGridGroupsMenuComponent=Wa,t.DatoGridHeaderComponent=Mo,t.DatoGridHeaderV2Component=Qa,t.DatoGridInitialsCellComponent=vl,t.DatoGridItemsCellComponent=yl,t.DatoGridModule=tr,t.DatoGridNumberFilterOptions=wr,t.DatoGridOnHoverComponent=Va,t.DatoGridPaginationComponent=ko,t.DatoGridPaginationV2Component=qa,t.DatoGridStatusCellComponent=ml,t.DatoGridStringFilterOptions=Cr,t.DatoGridToolbarComponent=ni,t.DatoGridToolbarItemDirective=No,t.DatoGridToolbarItemElementDirective=Fo,t.DatoGridV2Component=Ua,t.DatoGridV2LoaderComponent=Hr,t.DatoGridV2Module=xl,t.DatoGridV2NoDataOverlayComponent=qr,t.DatoGridV2ToolbarButtonComponent=Ya,t.DatoGridV2ToolbarComponent=Za,t.DatoGroupComponent=fi,t.DatoHighlightPipe=to,t.DatoHotkeys=Ba,t.DatoHotkeysDirective=ul,t.DatoHotkeysHelpComponent=za,t.DatoHotkeysModule=hl,t.DatoIconButtonComponent=Oo,t.DatoIconButtonModule=Do,t.DatoIconComponent=Le,t.DatoIconModule=Ne,t.DatoInfiniteScrollComponent=Vc,t.DatoInfiniteScrollModule=Bc,t.DatoInputComponent=Cn,t.DatoInputModule=vo,t.DatoInputNumberComponent=Cs,t.DatoInputNumberDirective=bs,t.DatoInputNumberModule=xs,t.DatoKebabCasePipe=no,t.DatoLinkButtonComponent=bo,t.DatoLinkButtonModule=Co,t.DatoListComponent=Yi,t.DatoListModule=Xi,t.DatoListNoDataComponent=Xs,t.DatoListNoResultComponent=Zs,t.DatoListV2Component=Ys,t.DatoListV2Module=el,t.DatoLoaderComponent=Us,t.DatoLoadersModule=Ws,t.DatoMenuComponent=os,t.DatoMenuContentDirective=ns,t.DatoMenuItemDirective=rs,t.DatoMenuModule=ss,t.DatoMenuTriggerForDirective=is,t.DatoMultiOptionComponent=_i,t.DatoMultiOptionV2Component=Li,t.DatoOperatorTogglerComponent=cs,t.DatoOperatorTogglerModule=ds,t.DatoOptionComponent=mi,t.DatoOptionV2Component=Mi,t.DatoOptionsModule=Gi,t.DatoOriginDirective=Dn,t.DatoOverlay=Rn,t.DatoPageLoaderComponent=Ks,t.DatoPanel=pc,t.DatoPanelComponent=sc,t.DatoPanelContentComponent=uc,t.DatoPanelFooterComponent=hc,t.DatoPanelHeaderComponent=dc,t.DatoPanelInternalConfig=lc,t.DatoPanelModule=fc,t.DatoPanelRef=cc,t.DatoPillsComponent=Yc,t.DatoPillsModule=Xc,t.DatoPipesModule=yo,t.DatoPopover=ia,t.DatoPopoverComponent=ea,t.DatoPopoverModule=es,t.DatoProgressBarComponent=Jc,t.DatoProgressBarModule=ep,t.DatoRadioComponent=Dl,t.DatoRadioModule=Tl,t.DatoRichTextDirective=Fl,t.DatoRichTextModule=Vl,t.DatoSearchResultsGroupSortPipe=co,t.DatoSearchResultsSortPipe=uo,t.DatoSearchableContainerComponent=oi,t.DatoSearchableDirective=ii,t.DatoSearchableHighlightDirective=Ac,t.DatoSearchableModule=Pc,t.DatoSelectActiveDirective=yi,t.DatoSelectComponent=Ti,t.DatoSelectEmptyComponent=ji,t.DatoSelectModule=Wi,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=kl,t.DatoSnackbarComponent=Al,t.DatoSnackbarModule=Rl,t.DatoSortableComponent=Vi,t.DatoSortableHandleDirective=zi,t.DatoSortableModule=Hi,t.DatoStaticImageSrcDirective=Hn,t.DatoStaticImagesSrcModule=Un,t.DatoSubscribeContext=Nn,t.DatoSubscribeDirective=Fn,t.DatoTab=Yl,t.DatoTabContent=ql,t.DatoTabTitle=$l,t.DatoTabsModule=Jl,t.DatoTabset=Zl,t.DatoTemplatePortal=Pn,t.DatoTextModule=xo,t.DatoThemesModule=On,t.DatoToast=ac,t.DatoToastComponent=ec,t.DatoToastModule=nc,t.DatoTogglerComponent=Ns,t.DatoTogglerModule=Gs,t.DatoTooltipDirective=Ln,t.DatoTooltipV2Directive=Yn,t.DatoTrackByPropPipe=go,t.DatoTranslateService=_n,t.DatoTreePipe=fo,t.DatoTriggerMulti=ki,t.DatoTriggerSingle=Ei,t.DialogConfig=Wo,t.EventModifiersPlugin=Nc,t.GridToolbarService=ei,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=je,t.POPPER_BOUNDARY=Es,t.PaletteDirective=Sn,t.PopoverCloseDirective=Xa,t.PopoverContentDirective=Ja,t.PopoverRef=na,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=Pl,t.Store=Qs,t.SvgRegistry=Me,t.ToolbarConfirmation=Jo,t.ToolbarDeleteConfirmation=ti,t.ToolbarHandler=Xo,t.TranslatePipe=eo,t._valueChanges=lp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=wc,t.allowedFileTypes=function(t){return function(e){var n=e.value;if(n)for(var o=n instanceof FileList?n:[n],i=0,r=o.length;i<r;i++){var a=o[i].name.split(".").pop();if(!1===t.includes(a))return{invalidFileType:{extension:a}}}return null}},t.alphabeticalGroupSort=lo,t.alphabeticalSort=so,t.appendChild=qt,t.appendScript=Xt,t.appendStyle=Jt,t.appendToBody=Zt,t.assertString=function(t,e){if("string"!=typeof t)throw new To(e+" expecting string but got "+typeof t)},t.camelCase=De,t.capitalize=Oe,t.cloneDeep=function(t){return N(t)},t.closest=ee,t.coerceArray=me,t.coerceElement=function(t){return t instanceof e.ElementRef?t.nativeElement:t},t.compareWith=ro,t.compose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduce((function(t,e){return e(t)}),e)}},t.convertFromTreeData=ka,t.convertToTreeData=Pa,t.copyToClipboard=Vn,t.createComponent=Yr,t.createElement=$t,t.createGUID=Te,t.createHTMLCompletor=Cc,t.curry=ve,t.dateCompare=ke,t.daysOfTheMonth=Is,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=pl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=$r,t.defaultActions=ra,t.defaultConfig=El,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=Sa,t.defaultGridTreeLabel=Oa,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=ba,t.dialogSizePreset=zo,t.diff=we,t.difference=le,t.differenceBy=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return h.apply(void 0,xt(t))},t.dimensionsChanges=$n,t.directives=xn,t.drop=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.editableCellRendererWithSearchHighlight=zr,t.escape=xe,t.escapeRegExp=function(t){return H(t)},t.filter=function(t,e){return O(t,e)},t.filterByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.debounceTime;return lp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return ap({collection:t,value:e,labelKey:r})}})},t.filterByTerm=ap,t.filterDialogDismissed=function(){return tc(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return tc(t.DialogResultStatus.SUCCESS)},t.filterGroupByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.childrenKey,s=void 0===a?"children":a,l=o.debounceTime;return lp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return sp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=sp,t.filterKey=Oi,t.find=function(t,e,n){return v(t,e,n)},t.findIndex=ce,t.findKey=function(t,e){return D(t,e)},t.fixNgLeaks=function(){o.FormControlDirective.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null},o.FormControlName.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null}},t.forEach=function(t,e){return b(t,e)},t.formatKeys=ca,t.generateMonths=ks,t.get=function(t,e,n){return R(t,e,n)},t.getAttr=Bt,t.getCustomRange=rn,t.getDateISOString=sn,t.getDefaultConfirmationOptions=$o,t.getDefaultOptions=Go,t.getDefaultsToastOptions=ic,t.getElementCoords=te,t.getFunctionName=be,t.getGridConfiguration=nr,t.getGridModel=rr,t.getInitials=Ee,t.getLocalizedFormat=ln,t.getMultiTemplate=ui,t.getOptionTemplate=hi,t.getPopperDefaults=function(t){return{placement:t.placement,modifiers:{keepTogether:{enabled:!0},hide:{enabled:!1},preventOverflow:{enabled:!1}}}},t.getUTCDate=an,t.getVisibleActions=Ar,t.gridTreeFilePathKey=Da,t.groupBy=function(t,e){return x(t,e)},t.groupSortOrder=io,t.has=function(t,e){return P(t,e)},t.inView=Wn,t.intersection=
|
|
608
608
|
/**
|
|
609
609
|
* @license
|
|
610
610
|
* Copyright Datorama. All Rights Reserved.
|