@datorama/core 22.9.8-rc.1 → 22.9.8
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/bundles/datorama-core.umd.js +90 -88
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +3 -10
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +8 -3
- package/esm2015/lib/select/select.component.js +2 -7
- package/esm2015/lib/select/trigger-single/trigger-single.component.js +1 -1
- package/esm2015/lib/version.js +1 -1
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +10 -3
- package/esm5/lib/select/select.component.js +2 -7
- package/esm5/lib/select/trigger-single/trigger-single.component.js +1 -1
- package/esm5/lib/version.js +1 -1
- package/fesm2015/datorama-core.js +71 -71
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +90 -88
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/select/select.component.d.ts +0 -2
- package/lib/select/trigger-single/trigger-single.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -236,14 +236,7 @@ function hi(){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 Ti=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",vi)],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)}(),Ei={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ai})),multi:!0},Ai=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=wi(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=wi(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._initialOpen=!1),this.limitSelectedTo&&this._model.length===this.limitSelectedTo&&this.updateDisabledState()),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"),Ii())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){Si(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){Oi(t)&&this.open&&(this._clickOutside=!0,this.close())},s.prototype.keyup=function(t){if(xi(t)){var e=this.keyManager.activeItemIndex,n=this.options.toArray()[e];this.isSingle?this.handleSingleClick(n):this.handleMultiClick(n)}if(Si(t)){this.keyManager.onKeydown(t);var o=document.querySelector(".dato-select__dropdown");Ci({size:this.size,panel:o,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})}Oi(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("datoTriggerSingle"),Ct("design:type",Ti)],s.prototype,"datoTriggerSingle",void 0),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(yi,{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"options",void 0),vt([e.ContentChildren(e.forwardRef((function(){return pi})),{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"accordion",void 0),vt([e.ContentChildren(mi),Ct("design:type",e.QueryList)],s.prototype,"groups",void 0),vt([e.ContentChild(vi),Ct("design:type",vi)],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 #datoTriggerSingle [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:[Ei,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),Ri={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Pi})),multi:!0},Pi=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:[Ri]}),bt(3,e.Attribute("trueValue")),bt(4,e.Attribute("falseValue")),Ct("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef,Object,Object])],o)}(Dt),ki=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,xo],declarations:[Pi],exports:[Pi]})],t)}(),_i=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)}(),ji=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:mi,decorators:[{type:e.Optional}]}]},n=o=vt([e.Component({selector:"dato-option[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:yi,useExisting:o}],template:gi(!0)}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,mi])],n)}(yi),Mi=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)}(),Li=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:Fi()}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),Ni=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:Li,useExisting:o}],template:Fi(!0)})],n)}(Li);
|
|
240
|
-
/**
|
|
241
|
-
* @license
|
|
242
|
-
* Copyright Datorama. All Rights Reserved.
|
|
243
|
-
*
|
|
244
|
-
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
245
|
-
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
246
|
-
*/function Fi(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 Gi=[yi,mi,ji,Mi,Li,Ni],Vi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,vo,Ne,o.ReactiveFormsModule,ki,se,Co,xo],declarations:[Gi],exports:[Gi],entryComponents:[Gi]})],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=[ci,zi],Hi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,dt.SortablejsModule],declarations:[Bi],exports:[Bi]})],t)}(),Ui=[Ai,Ti,_i],Ki=[vi],Wi=function(){function t(){}return t=vt([e.NgModule({imports:[yo,s.CommonModule,vo,Ne,o.ReactiveFormsModule,ki,se,Co,xo,Vi,Xn,Hi],declarations:[Ui,Ki],exports:[Ui,Ki,Vi],entryComponents:[Ui]})],t)}();
|
|
239
|
+
*/var Ti={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ei})),multi:!0},Ei=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=wi(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=wi(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._initialOpen=!1),this.limitSelectedTo&&this._model.length===this.limitSelectedTo&&this.updateDisabledState()),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"),Ii())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){Si(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){Oi(t)&&this.open&&(this._clickOutside=!0,this.close())},s.prototype.keyup=function(t){if(xi(t)){var e=this.keyManager.activeItemIndex,n=this.options.toArray()[e];this.isSingle?this.handleSingleClick(n):this.handleMultiClick(n)}if(Si(t)){this.keyManager.onKeydown(t);var o=document.querySelector(".dato-select__dropdown");Ci({size:this.size,panel:o,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})}Oi(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(yi,{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"options",void 0),vt([e.ContentChildren(e.forwardRef((function(){return pi})),{descendants:!0}),Ct("design:type",e.QueryList)],s.prototype,"accordion",void 0),vt([e.ContentChildren(mi),Ct("design:type",e.QueryList)],s.prototype,"groups",void 0),vt([e.ContentChild(vi),Ct("design:type",vi)],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:[Ti,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),Ai=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",vi)],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)}(),Ri={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Pi})),multi:!0},Pi=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:[Ri]}),bt(3,e.Attribute("trueValue")),bt(4,e.Attribute("falseValue")),Ct("design:paramtypes",[e.Renderer2,e.ChangeDetectorRef,e.ElementRef,Object,Object])],o)}(Dt),ki=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,xo],declarations:[Pi],exports:[Pi]})],t)}(),_i=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)}(),ji=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:mi,decorators:[{type:e.Optional}]}]},n=o=vt([e.Component({selector:"dato-option[multi]",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:yi,useExisting:o}],template:gi(!0)}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,mi])],n)}(yi),Mi=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)}(),Li=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:Fi()}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),Ni=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:Li,useExisting:o}],template:Fi(!0)})],n)}(Li);function Fi(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 Gi=[yi,mi,ji,Mi,Li,Ni],Vi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,vo,Ne,o.ReactiveFormsModule,ki,se,Co,xo],declarations:[Gi],exports:[Gi],entryComponents:[Gi]})],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=[ci,zi],Hi=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,dt.SortablejsModule],declarations:[Bi],exports:[Bi]})],t)}(),Ui=[Ei,Ai,_i],Ki=[vi],Wi=function(){function t(){}return t=vt([e.NgModule({imports:[yo,s.CommonModule,vo,Ne,o.ReactiveFormsModule,ki,se,Co,xo,Vi,Xn,Hi],declarations:[Ui,Ki],exports:[Ui,Ki,Vi],entryComponents:[Ui]})],t)}();
|
|
247
240
|
/**
|
|
248
241
|
* @license
|
|
249
242
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -337,7 +330,7 @@ var ta,ea=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
|
|
|
337
330
|
*
|
|
338
331
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
339
332
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
340
|
-
*/var qa=function(){function t(t,e,n,o,i,r){this.cdr=t,this.translate=e,this.gridQuery=n,this.gridService=o,this.controller=i,this.decimalPipe=r,this.disableButtons=null,this.smallVersion=null,this.pageNumbersDisplay={currentPage:1,pages:[],showFirstEllipsis:!1,showLastPage:!1},this.showBottomControls=!1,this.isExpanded=!0,this.hasRowGroupColumns=!1,this.isServerSidePagination=!1,this.MINI_DISPLAY_LENGTH=2,this.DISPLAY_LENGTH=5,this.XS_DISPLAY_SIZE=160,this.SMALL_DISPLAY_SIZE=390}return Object.defineProperty(t.prototype,"content",{set:function(t){this.navigationElement=t,t&&null===this.smallVersion&&this.calculateNavigationSize()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prevPageDisabled",{get:function(){return 1===this.pageNumbersDisplay.currentPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextPageDisabled",{get:function(){return this.pageNumbersDisplay.currentPage===this.totalPages},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.filterChanged})).pipe(i.untilDestroyed(this)).subscribe((function(){t.gridApi.paginationGoToPage(0),t.initPagination()})),this.gridQuery.gridReady$.pipe(r.tap((function(){var e=t.gridQuery.api.columns.getRowGroupColumns();t.gridApi=t.gridQuery.api.grid,t.showBottomControls=t.gridQuery.getGridOptions().showBottomControls,t.hasRowGroupColumns=e&&e.length>0})),r.switchMap((function(){return t.isServerSidePagination=t.gridQuery.isServerSide,t.isServerSidePagination?t.gridQuery.serverDataLoaded$:t.gridQuery.rowDataChanged$})),r.throttleTime(100),$a((function(){return t.initPagination()})),i.untilDestroyed(this)).subscribe((function(e){var n=e.paginationPage,o=void 0===n?1:n;t.initPagination(o-1)}))},t.prototype.calculateRowsCount=function(t){this.totalPages=t?Math.ceil(t/this.rowsPerPage):this.gridApi.paginationGetTotalPages(),this.rowCount=this.gridApi.paginationGetRowCount(),this.setRowsDisplayRange(this.pageNumbersDisplay.currentPage),this.cdr.detectChanges()},t.prototype.initPagination=function(t){void 0===t&&(t=0);var e=this.gridQuery.serverSideConfig,n=e.totalRows;e.enabled&&Lt(n)||(this.rowsPerPage=this.gridApi.paginationGetPageSize(),this.calculateRowsCount(n),this.pagesInView=this.DISPLAY_LENGTH,this.navigatePage(t))},Object.defineProperty(t.prototype,"pagesInView",{set:function(t){this._pagesInView=t,this.pagesOnSides=Math.floor(this._pagesInView/2),this.pagesFitView=this._pagesInView+1>=this.totalPages,this.pageNumbersDisplay.pages=[]},enumerable:!0,configurable:!0}),t.prototype.calculateNavigationSize=function(){if(this.navigationElement){var t=this.navigationElement.nativeElement.parentElement.clientWidth;this.disableButtons=t<this.XS_DISPLAY_SIZE,t<this.SMALL_DISPLAY_SIZE?this._pagesInView!==this.MINI_DISPLAY_LENGTH&&(this.smallVersion=!0,this.pagesInView=this.MINI_DISPLAY_LENGTH):this._pagesInView!==this.DISPLAY_LENGTH&&(this.smallVersion=!1,this.pagesInView=this.DISPLAY_LENGTH),this.cdr.detectChanges()}},t.prototype.navigatePage=function(t){if(t>=0&&t<=this.totalPages-1){this.shouldShowLoader(t)&&this.gridService.setLoading(!0),this.gridApi.paginationGoToPage(t);var e=t+1;this.pageNumbersDisplay.currentPage=e,0!==this.pageNumbersDisplay.pages.length&&this.pagesFitView||(this.pageNumbersDisplay.pages=this.getPages(e)),this.setRowsDisplayRange(e),this.cdr.detectChanges()}},t.prototype.navigateFirstPage=function(){this.navigatePage(0)},t.prototype.navigateNextPage=function(){this.navigatePage(this.pageNumbersDisplay.currentPage)},t.prototype.navigatePrevPage=function(){var t=this.pageNumbersDisplay.currentPage-2;this.navigatePage(t)},t.prototype.showNextBatch=function(){var t=this.pageNumbersDisplay.pages[0]+this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.showPreviousBatch=function(){var t=this.pageNumbersDisplay.pages[0]-this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.trackByPage=function(t,e){return e},t.prototype.toggleGroupsState=function(){this.isExpanded?this.gridApi.collapseAll():this.gridApi.expandAll(),this.isExpanded=!this.isExpanded},t.prototype.autoFitGrid=function(t){this.gridService.fitGrid(t)},t.prototype.ngOnDestroy=function(){},t.prototype.setRowsDisplayRange=function(t){var e=t-1,n=1+e*this.rowsPerPage,o=(e+1)*this.rowsPerPage,i=this.rowCount>o?o:this.rowCount;this.rowsRange=this.rowCount>0?this.translate.transform("core.itemsRange",{range:this.decimalPipe.transform(n)+" - "+this.decimalPipe.transform(i),number:this.decimalPipe.transform(this.rowCount)}):this.translate.transform("core.numberOfItems",{number:0})},t.prototype.getPages=function(t){var e=[];this.pageNumbersDisplay.showLastPage=!this.pagesFitView&&t+this.pagesOnSides<this.totalPages,this.pageNumbersDisplay.showFirstEllipsis=!this.pagesFitView&&t-this.pagesOnSides>1;for(var n=this.getFirstPageNumber(t),o=this.pagesFitView?this.totalPages:this._pagesInView,i=0;i<o;i++)e.push(n+i);return this.smallVersion||e[o-1]+1!==this.totalPages||(e.push(this.totalPages),this.pageNumbersDisplay.showLastPage=!1),e},t.prototype.getFirstPageNumber=function(t){var e=t-this.pagesOnSides;return this.smallVersion&&t>1?t!==this.totalPages&&(e=t):this.pageNumbersDisplay.showFirstEllipsis?this.pageNumbersDisplay.showLastPage||(e=this.totalPages-(this._pagesInView-1)):e=1,e},t.prototype.shouldShowLoader=function(t){return this.isServerSidePagination&&Lt(this.gridApi.getCacheBlockState()[t])},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:_n},{type:fr},{type:Ma},{type:Ha},{type:s.DecimalPipe}]},vt([e.ViewChild("navigation",{static:!0}),Ct("design:type",e.ElementRef),Ct("design:paramtypes",[e.ElementRef])],t.prototype,"content",null),t=vt([e.Component({selector:"dato-grid-pagination-v2",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="d-flex-row d-flex-auto d-flex-wrap container" [class.small]="smallVersion"\n [attr.data-pages-count]="totalPages"\n [attr.data-current-page]="pageNumbersDisplay.currentPage"\n [attr.data-page-size]="rowsPerPage"\n [attr.data-rows-count]="rowCount">\n <div *ngIf="totalPages > 1" #navigation\n class="navigation d-flex-row d-flex-0-0-auto align-center">\n\n \x3c!-- First Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="mr-4" data-auto-id="pagiantion-first-page"\n icon="chevron-left-double"\n datoType="secondary"\n datoSize="md"\n [disabled]="prevPageDisabled"\n (click)="navigateFirstPage()">\n </dato-icon-button>\n\n \x3c!-- Previous Page --\x3e\n <dato-icon-button icon="arrow-left" datoType="secondary" datoSize="md"\n [disabled]="prevPageDisabled" data-auto-id="pagiantion-previous-page"\n (click)="navigatePrevPage()">\n </dato-icon-button>\n\n\n <div class="d-flex mx-5 align-center number-container">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm" data-auto-id="pagiantion-previous-batch"\n *ngIf="pageNumbersDisplay.showFirstEllipsis && !smallVersion"\n (click)="showPreviousBatch()">...\n </dato-link>\n <dato-link class="page-number mx-5" [datoType]="page === pageNumbersDisplay.currentPage ? \'primary\' : \'secondary\'" datoSize="sm"\n *ngFor="let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;" [attr.data-auto-id]="\'pagiantion-page-\' + i"\n (click)="navigatePage(page - 1)">\n {{page}}\n </dato-link>\n\n <div class="d-flex" *ngIf="pageNumbersDisplay.showLastPage && !smallVersion">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm" data-auto-id="pagiantion-next-batch"\n (click)="showNextBatch()">...</dato-link>\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n [attr.data-auto-id]="\'pagiantion-page-\' + totalPages"\n (click)="navigatePage(totalPages - 1)">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n \x3c!-- Next Page --\x3e\n <dato-icon-button icon="arrow-right" datoType="secondary" datoSize="md"\n (click)="navigateNextPage()" data-auto-id="pagiantion-next-page"\n [disabled]="nextPageDisabled">\n </dato-icon-button>\n\n \x3c!-- Last Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="ml-4" icon="chevron-right-double"\n datoType="secondary" datoSize="md" data-auto-id="pagiantion-last-page"\n [disabled]="nextPageDisabled"\n (click)="navigatePage(totalPages - 1)">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf="totalPages > 1 && !smallVersion"\n class="separator mx-10 my-auto primary-100-background-color">\n </div>\n\n <div class="total d-flex-0-0-auto d-flex-row align-center">\n <span class="dato-note primary-300-color">{{rowsRange}}</span>\n </div>\n\n <div *ngIf="showBottomControls" class="grid-controls d-flex d-flex-1 justify-end">\n <dato-icon-button *ngIf="hasRowGroupColumns" [icon]="isExpanded ? \'collapse\' : \'expand\'" datoType="secondary"\n datoSize="md" (click)="toggleGroupsState()" data-auto-id="pagination-expand-collapse"\n [datoTooltipV2]="isExpanded ? \'core.collapse-rows\' : \'core.expand-rows\'">\n </dato-icon-button>\n\n <dato-icon-button class="mx-4" icon="maximize-horizontal" datoType="secondary" datoSize="md"\n (click)="autoFitGrid(\'content\')" [datoTooltipV2]="\'core.fit-to-text\'"\n data-auto-id="pagination-fit-to-content">\n </dato-icon-button>\n\n <dato-icon-button icon="minimize-horizontal" datoType="secondary" datoSize="md"\n (click)="autoFitGrid(\'container\')" [datoTooltipV2]="\'core.revert-to-default-size\'"\n data-auto-id="pagination-fit-to-container">\n </dato-icon-button>\n </div>\n</div>\n',providers:[s.DecimalPipe],styles:[":host{padding:12px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}:host .container{height:25px}:host .navigation .page-number{transition:color .3s ease-in-out}:host .navigation .page-number:first-of-type{margin-left:7px}:host .navigation .page-number:last-of-type{margin-right:7px}:host .separator{width:1px;height:25px}:host .container.small .navigation,:host .container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,_n,fr,Ma,Ha,s.DecimalPipe])],t)}(),Ya=function(){function t(){this.widthToHideLabel=1439,this.widthForShortLabel=1539}return Object.defineProperty(t.prototype,"menu",{get:function(){return this.getMenu?this.getMenu():null},enumerable:!0,configurable:!0}),vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"label",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"shortLabel",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"enableV2_1",void 0),vt([e.Input(),Ct("design:type",Function)],t.prototype,"getMenu",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"isLast",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"widthToHideLabel",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"widthForShortLabel",void 0),t=vt([e.Component({selector:"dato-grid-toolbar-button",template:'<div *ngIf="menu else button" [datoMenuTriggerFor]="menu">\n <ng-container [ngTemplateOutlet]="button"></ng-container>\n</div>\n\n<ng-template #button>\n <dato-link datoType="secondary" [class.mr-16]="!isLast" [datoTooltip]="tooltip" datoTooltipPosition="bottom" [disabled]="disabled"\n [datoTooltipDisabled]="!tooltip" [class.full-button]="enableV2_1" [ngClass]="enableV2_1 ? \'full-button-\' + widthToHideLabel + \'px\' : \'\'">\n <dato-icon [icon]="icon" height="18px" width="18px"></dato-icon>\n <ng-container *ngIf="!shortLabel else labelAndShortLabel">\n {{ label | translate }}\n </ng-container>\n <ng-template #labelAndShortLabel>\n <span [class]="\'full-label-\' + widthForShortLabel + \'px\'">{{ label | translate }}</span>\n <span [class]="\'short-label short-label-\' + widthForShortLabel + \'px\'">{{ shortLabel | translate }}</span>\n </ng-template>\n </dato-link>\n\n <dato-icon *ngIf="enableV2_1" [icon]="icon" datoSize="sm" class="mr-16 pointer icon-button" [ngClass]="\'icon-button-\' + widthToHideLabel + \'px\'"\n [datoTooltip]="tooltip || label" datoTooltipPosition="bottom" [datoTooltipDisabled]="!tooltip && !label">\n </dato-icon>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Za=function(){function o(t,e,n,o,i,r){this.gridController=t,this.cdr=e,this.translate=n,this.popover=o,this.gridQuery=i,this.gridService=r,this.MAX_VISIBLE_ROW_ACTIONS=5,this.MAX_VISIBLE_GRID_ACTIONS=2,this._maxRowActions=this.MAX_VISIBLE_ROW_ACTIONS,this.displayExport=!0,this.rowActions={mainList:[],moreMenu:[]},this.gridActions={mainList:[],moreMenu:[]},this.searchPlaceholder=this.translate.transform("core.search"),this.rowActionsShortLabelThreshold=1539,this.displayCustomGridActionsSeparator=!0,this.openMenus={group:!1,settings:!1},this.rowGroupsCollapsed=!1,this.groupsAllowed=!this.hideGrouping,this.isSelectedRow=!1,this.isTreeMode=this.gridService.treeData,this.totalRowsCount=0,this.selectedRowsCount=0,this.allPageRowsSelected=!1,this.widthToHideActionsLabels=1439}return Object.defineProperty(o.prototype,"maxRowActions",{set:function(t){this.enableV2_1?(this._maxRowActions=Math.min(t,this.MAX_VISIBLE_ROW_ACTIONS),t>this.MAX_VISIBLE_ROW_ACTIONS&&e.isDevMode()&&console.warn("DatoGrid V2.1 - maxRowActions cannot be over "+this.MAX_VISIBLE_ROW_ACTIONS)):this._maxRowActions=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableV2_1",{get:function(){return this.gridController.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableSearch",{get:function(){return this.gridController.gridOptions.enableSearch},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableBackground",{get:function(){return this.gridController.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isRowActionsVisible",{get:function(){return!this.enableV2_1||this.enableV2_1&&this.isSelectedRow},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasRowActions",{get:function(){return ye(this.rowActions.mainList)>0||ye(this.rowActions.moreMenu)>0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hiddenColumns",{get:function(){return"("+this.gridQuery.getAllDisplayedColumns().length+"/"+this.gridQuery.getAllColumns().length+")"},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasActiveMoreActions",{get:function(){return this.rowActions.moreMenu.some((function(t){return t.visible}))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"api",{get:function(){return this.gridController.gridQuery.api},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this,e=this.gridController.gridQuery.waitForGrid((function(){return n.merge(t.gridQuery.gridRef.cellValueChanged,t.gridQuery.gridRef.rowDataUpdated).pipe(r.debounceTime(100),i.untilDestroyed(t))})),o=this.gridQuery.gridReady$.pipe(r.take(1));o.pipe(i.untilDestroyed(this)).subscribe((function(){t.groupsAllowed=!t.hideGrouping&&!t.gridQuery.getValue().serverSidePagination.enabled})),this.initGridActions();var a=this.gridQuery.selectedRowsChange$,s=this.gridQuery.selectIsSelectAllRowsEnabled();n.merge(e,o,a,s).pipe(r.filter((function(){return!!t.api})),i.untilDestroyed(this)).subscribe((function(){t.resolveVisibleActions(),t.cdr.detectChanges()})),this.registerGroupListeners(),this.subscribeRowsSelectionData()},o.prototype.onActionClick=function(e){if(Rt(e.onClick)){var n=this.gridController.gridQuery.getSelectedRowsCount();if(this.gridService._logEvent("Grids - Table Action",{action:e.key,numOfItems:n,from:"Toolbar"}),this.gridQuery.isServerSelectAllRowsEnabled){var o=this.gridService.getFilterForServerActionOnSelectAll();e.onClick(null,!0,o)}else{var i=this.gridController.gridQuery.getSelectedRowNodes();e.onClick(i)}}else e.actionType===t.GridActionType.EXPORT&&this.executeTableAction("Export")},o.prototype.resolveVisibleActions=function(){var t=this,e=this.gridQuery.getSelectedRowNodes();this.isSelectedRow=e.length>0||this.gridQuery.isServerSelectAllRowsEnabled;var n=Ar(this.gridController.rowActions,this.gridQuery.getSelectedRowsCount(),e,this.gridQuery.isServerSelectAllRowsEnabled).filter((function(e){return!t.isRowActionHidden(e)}));this.rowActions={mainList:n.slice(0,this._maxRowActions),moreMenu:n.slice(this._maxRowActions,n.length)},this.initWidthToHideActionsLabels()},o.prototype.initWidthToHideActionsLabels=function(){var t=this.rowActions.mainList.length+(this.rowActions.moreMenu.length>0?1:0)+(this.gridActions.moreMenu.length>0?1:0)+(this.createAction?1:0),e=[1239,1339,1439,1539];this.widthToHideActionsLabels=e[Math.min(Math.max(t-5,0),e.length-1)]},o.prototype.initGridActions=function(){var t=this.gridController.gridActions;this.initCreateAction(t),this.initExportAction(t);var e=this.MAX_VISIBLE_GRID_ACTIONS-(this.displayExport?1:0);ye(t)===e+1&&e++,this.gridActions={mainList:t.slice(0,e),moreMenu:t.slice(e,t.length)}},o.prototype.initCreateAction=function(e){var n=e.findIndex((function(e){return e.actionType===t.GridActionType.CREATE}));this.createAction=n>=0?e.splice(n,1)[0]:null,this.createAction&&(this.createAction.label=this.createAction.label||"core.create-new",this.createAction.key=this.createAction.key||"create-new")},o.prototype.initExportAction=function(e){var n=this,o=e.find((function(e){return e.actionType===t.GridActionType.EXPORT}));if(o){var i=o.onClick,r=o.icon,a=o.label,s=o.tooltip,l=o.key;o.onClick=i||function(){return n.executeTableAction("Export")},o.icon=r||"export",o.label=a||"core.export-table",o.tooltip=s||"core.export-table",o.key=l||"export"}},o.prototype.executeTableAction=function(t){switch(this.gridService._logEvent("Grids - General Table Action",{action:t}),t){case"Autofit to Content":this.gridService.fitGrid("content");break;case"Autofit to Page":this.gridService.fitGrid("container");break;case"Collapse Expand":this.toggleExpanded();break;case"Export":this.exportTable();break;case"Group from Settings":case"Group from Toolbar":this.openGroupMenu();break;case"Reset Filters":this.resetFilters();break;case"Reset Settings":this.resetSettings();break;case"Show Hide Column":this.openColumnMenu()}},o.prototype.toggleExpanded=function(){this.rowGroupsCollapsed?this.api.grid.expandAll():this.api.grid.collapseAll(),this.rowGroupsCollapsed=!this.rowGroupsCollapsed},Object.defineProperty(o.prototype,"hasGroups",{get:function(){return this.api.columns.getRowGroupColumns().length>0},enumerable:!0,configurable:!0}),o.prototype.exportTable=function(){var t=this.gridController.gridOptions,e=t.gridName,n=t.exportGrid;if(Rt(n))n(mt(mt({},this.api),this.gridQuery.getValue().settings));else{var o=U.format(new Date,"LLL d, yyyy");this.api.grid.exportDataAsExcel({fileName:e+" - "+o,processCellCallback:function(t){var e=t.column,n=t.value,o=e.getColDef().valueFormatter;return o?o({value:n}):n}})}},o.prototype.resetSettings=function(){this.gridController.gridService.resetTableSettings()},o.prototype.openColumnMenu=function(){this.popover.open(Ka,this.settingsTrigger.nativeElement,{width:220,className:"dato-grid-columns-display-menu",popper:{placement:"bottom-end"},data:{api:this.api,gridService:this.gridService,gridQuery:this.gridQuery}})},o.prototype.resetFilters=function(){this.gridController.gridService.clearAllFilters()},o.prototype.openGroupMenu=function(){var t=this;this.openMenus.group=!0;var e=this.hasGroups?0:200,n=this.gridQuery.gridRef.columnRowGroupChanged.pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){t.rowGroupsCollapsed=!1,t.cdr.detectChanges()}));setTimeout((function(){t.popover.open(Wa,t.groupTrigger.nativeElement,{height:206,width:250,className:"dato-grid-groups-menu",popper:{placement:"bottom-end"},data:{api:t.api,gridService:t.gridService}}).pipe(i.untilDestroyed(t)).subscribe((function(){n.unsubscribe(),t.openMenus.group=!1,t.cdr.detectChanges()}))}),e)},o.prototype.isActionDisabled=function(t){return!t.visible},o.prototype.isRowActionHidden=function(t){return!t.visible&&this.enableV2_1},o.prototype.clearSelectedRows=function(){this.gridService.deselectAllRows()},o.prototype.ngOnDestroy=function(){},o.prototype.getCollapseState=function(t){var e=t.node,n=t.api,o=!0;return 0===e.rowGroupIndex&&n.forEachNodeAfterFilterAndSort((function(t){var e=t.expanded;0===t.rowGroupIndex&&e&&(o=!1)})),o},o.prototype.registerGroupListeners=function(){var t=this;this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.columnRowGroupChanged})).pipe(r.filter((function(){return!t.openMenus.group})),i.untilDestroyed(this)).subscribe((function(){t.rowGroupsCollapsed=!1,t.cdr.detectChanges()})),this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.rowGroupOpened})).pipe(i.untilDestroyed(this)).subscribe((function(e){var n=t.getCollapseState(e);n!==t.rowGroupsCollapsed&&(t.rowGroupsCollapsed=n,t.cdr.detectChanges())}))},o.prototype.subscribeRowsSelectionData=function(){var t=this;this.gridQuery.rowsSelectionData$.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=e.totalRowsCount,o=e.selectedRowsCount,i=e.selectedPageRowsCount,r=e.isAllPageRowsSelected;t.totalRowsCount=n,t.selectedRowsCount=o;var a=t.gridQuery.getGridOptions().enableAllPagesSelection;t.allPageRowsSelected=a&&r&&o===i&&o<n,t.cdr.detectChanges()}))},o.prototype.selectAllPages=function(){this.gridQuery.isServerSide?this.gridService.setServerSidePagination({selectAllRowsEnabled:!0,excludedFromSelectAll:[]}):this.gridService.api.grid.selectAllFiltered()},o.ctorParameters=function(){return[{type:Ha},{type:e.ChangeDetectorRef},{type:_n},{type:ia},{type:fr},{type:Ma}]},vt([e.ViewChild("groupTrigger",{read:e.ElementRef,static:!1}),Ct("design:type",e.ElementRef)],o.prototype,"groupTrigger",void 0),vt([e.ViewChild("settingsTrigger",{read:e.ElementRef,static:!1}),Ct("design:type",e.ElementRef)],o.prototype,"settingsTrigger",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"displayExport",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],o.prototype,"maxRowActions",null),vt([e.Input(),Ct("design:type",Boolean)],o.prototype,"hideGrouping",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"searchPlaceholder",void 0),vt([e.Input(),Ct("design:type",Number)],o.prototype,"rowActionsShortLabelThreshold",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"displayCustomGridActionsSeparator",void 0),o=vt([e.Component({selector:"dato-grid-toolbar-v2",template:'<section *ngIf="gridController.gridQuery.gridReady$ | async" class="d-flex mb-20 justify-between items-center main-container" [class.mx-30]="enableBackground">\n\n <section [ngClass]="{ \'d-flex items-center right-section\': enableV2_1 }">\n \x3c!-- Dynamic content for the left area --\x3e\n <div data-auto-id="grid-toolbar-dynamic-left">\n <ng-content select="[toolbarLeftArea]"></ng-content>\n </div>\n\n <div class="d-flex items-center">\n <dato-grid-search-bar *ngIf="enableSearch" [searchPlaceholder]="searchPlaceholder"></dato-grid-search-bar>\n <ng-container *ngIf="enableV2_1 && selectedRowsCount > 0">\n <div class="d-flex items-center">\n <div class="chip align-center d-flex dato-note px-9 nowrap ml-16">\n <span data-auto-id="grid-selected-items-text">{{ (allPageRowsSelected ? \'core.all-items-in-page-selected\' : \'core.selected-items\') | translate:{ itemsCount: selectedRowsCount } }}</span>\n <dato-icon datoType="primary" datoIcon="close" datoSize="md" class="ml-6 pointer" (click)="clearSelectedRows()"\n data-auto-id="grid-clear-selected-rows"></dato-icon>\n </div>\n <dato-link *ngIf="allPageRowsSelected" (click)="selectAllPages()" datoSize="sm" class="ml-10"\n data-auto-id="grid-select-all-pages">\n <span>{{\'core.select-all-items\' | translate:{ itemsCount: totalRowsCount } }}</span>\n </dato-link>\n </div>\n <div *ngIf="hasRowActions" class="separator"></div>\n </ng-container>\n </div>\n\n \x3c!-- Row Actions--\x3e\n <div class="d-flex items-center" *ngIf="isRowActionsVisible">\n\n <ng-container *ngFor="let rowAction of rowActions.mainList; index as i; last as isLast">\n\n <div *ngIf="!isRowActionHidden(rowAction)"\n [attr.data-auto-id]="\'grid-toolbar-action-\' + rowAction.key"\n [attr.data-action-index]="\'grid-toolbar-action-\' + i"\n [class.disabled-action]="isActionDisabled(rowAction)">\n <ng-container [ngTemplateOutlet]="rowAction.template || defaultButton"\n [ngTemplateOutletContext]="{disabled: isActionDisabled(rowAction)}"></ng-container>\n </div>\n\n <ng-template #defaultButton>\n <div (click)="onActionClick(rowAction)">\n <dato-grid-toolbar-button [icon]="rowAction.icon"\n [disabled]="isActionDisabled(rowAction)"\n [label]="rowAction.label"\n [shortLabel]="rowAction.shortLabel"\n [tooltip]="rowAction.tooltip"\n [getMenu]="rowAction.getMenu"\n [enableV2_1]="enableV2_1"\n [isLast]="isLast"\n [widthToHideLabel]="widthToHideActionsLabels">\n </dato-grid-toolbar-button>\n </div>\n </ng-template>\n </ng-container>\n\n <div *ngIf="rowActions.moreMenu.length > 0" class="separator"></div>\n <dato-grid-toolbar-more-menu [actions]="rowActions.moreMenu" (actionClick)="onActionClick($event)" [isRowActions]="true">\n </dato-grid-toolbar-more-menu>\n </div>\n\n </section>\n\n\n \x3c!-- General Actions --\x3e\n <div class="d-flex items-center">\n \x3c!-- Create action --\x3e\n <ng-container *ngIf="createAction">\n <dato-button datoSize="sm" class="pointer primary-300-color" (click)="onActionClick(createAction)"\n [datoTooltip]="createAction.tooltip" [attr.data-auto-id]="\'grid-toolbar-action-\' + createAction.key">\n <dato-icon *ngIf="createAction.icon" [icon]="createAction.icon" class="mr-5"></dato-icon>\n {{ createAction.label | translate }}\n </dato-button>\n <div class="separator"></div>\n </ng-container>\n\n \x3c!-- Dynamic content for the right area --\x3e\n <div #customActions data-auto-id="grid-toolbar-dynamic-right">\n <ng-content select="[toolbarRightArea]"></ng-content>\n </div>\n <div *ngIf="customActions.childNodes.length && displayCustomGridActionsSeparator" class="separator"></div>\n\n \x3c!-- Group buttons --\x3e\n <div *ngIf="groupsAllowed" class="d-flex grouping-section opacity-0 invisible" [class.open]="openMenus.group || hasGroups">\n <dato-icon-button [class.active]="openMenus.group" (click)="executeTableAction(\'Group from Toolbar\')"\n data-auto-id="grid-toolbar-open-groups"\n removeIconPadding datoSize="md" datoType="none" icon="group" iconWidth="17px"\n datoTooltip="core.row-grouping" #groupTrigger\n class="mr-10 pointer"></dato-icon-button>\n <dato-icon-button data-auto-id="grid-toolbar-toggle-expand" datoSize="md" datoType="none"\n (click)="executeTableAction(\'Collapse Expand\')"\n [icon]="rowGroupsCollapsed ? \'expand\' : \'collapse\'"\n [disabled]="!hasGroups"\n [datoTooltip]="\'core.\' + (rowGroupsCollapsed ? \'expand\' : \'collapse\') + \'-rows\'"\n class="pointer"></dato-icon-button>\n <div class="separator"></div>\n </div>\n\n \x3c!-- Grid Actions --\x3e\n <ng-container *ngFor="let gridAction of gridActions.mainList; index as i">\n <div *ngIf="gridAction.getMenu else button" [datoMenuTriggerFor]="gridAction.getMenu()">\n <ng-container [ngTemplateOutlet]="button"></ng-container>\n </div>\n <ng-template #button>\n <dato-icon datoSize="sm" (click)="onActionClick(gridAction)"\n [attr.data-auto-id]="\'grid-toolbar-action-\' + gridAction.key"\n [attr.data-action-index]="\'grid-toolbar-general-action-\' + i"\n [icon]="gridAction.icon" class="pointer primary-300-color"\n [class.mr-16]="!gridAction.separator"\n [datoTooltip]="gridAction.tooltip || gridAction.label">\n </dato-icon>\n </ng-template>\n <div *ngIf="gridAction.separator" class="separator"></div>\n </ng-container>\n\n \x3c!-- Export --\x3e\n <dato-icon data-auto-id="grid-toolbar-export" datoSize="sm"\n (click)="executeTableAction(\'Export\')" *ngIf="displayExport && !isTreeMode"\n icon="export" class="pointer mr-16 primary-300-color" datoTooltip="core.export-table"></dato-icon>\n\n \x3c!-- Settings --\x3e\n <dato-icon [class.active]="openMenus.settings" (click)="openMenus.settings = true"\n data-auto-id="grid-toolbar-settings" datoSize="sm"\n icon="account" class="pointer primary-300-color" datoTooltip="core.table-settings"\n #settingsTrigger\n [datoMenuTriggerFor]="settingsMenu"></dato-icon>\n\n \x3c!-- More actions menu --\x3e\n <ng-container *ngIf="gridActions.moreMenu.length > 0">\n <div class="separator"></div>\n <dato-grid-toolbar-more-menu [actions]="gridActions.moreMenu" (actionClick)="onActionClick($event)" [isRowActions]="false">\n </dato-grid-toolbar-more-menu>\n </ng-container>\n\n <dato-menu #settingsMenu="datoMenu" menuClass="grid-settings-menu" placement="bottom-end"\n (menuClosed)="openMenus.settings = false">\n <ng-template datoMenuContent>\n <button data-auto-id="grid-toolbar-settings-autofit-page" datoMenuItem\n (click)="executeTableAction(\'Autofit to Page\')">\n <dato-icon datoSize="sm" icon="maximize-horizontal" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.autofitPage\' | translate }}</button>\n <button data-auto-id="grid-toolbar-settings-autofit-content" datoMenuItem\n (click)="executeTableAction(\'Autofit to Content\')">\n <dato-icon datoSize="sm" icon="minimize-horizontal" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.autofitContent\' | translate }}</button>\n <ng-container *ngIf="groupsAllowed">\n <button data-auto-id="grid-toolbar-settings-group" datoMenuItem (click)="executeTableAction(\'Group from Settings\')">\n <dato-icon datoSize="sm" icon="group" class="mr-4 primary-300-color"></dato-icon>\n {{ \'core.group\' | translate }}\n </button>\n </ng-container>\n <button data-auto-id="grid-toolbar-settings-toggle-columns" datoMenuItem (click)="executeTableAction(\'Show Hide Column\')">\n <dato-icon datoSize="sm" icon="hide" class="mr-8 primary-300-color"></dato-icon>\n <span>{{ \'core.hideShowColumns\' | translate }}<span\n class="dato-simple-italic ml-5 primary-200-color">{{hiddenColumns}}</span></span>\n </button>\n <button data-auto-id="grid-toolbar-settings-reset-settings" datoMenuItem\n (click)="executeTableAction(\'Reset Settings\')">\n <dato-icon datoSize="sm" icon="reset-table" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.resetTableSettings\' | translate }}\n </button>\n <button data-auto-id="grid-toolbar-settings-reset-filters" datoMenuItem\n (click)="executeTableAction(\'Reset Filters\')">\n <dato-icon datoSize="sm" icon="reset-filters" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.resetAllFilters\' | translate }}\n </button>\n <button data-auto-id="grid-toolbar-export" datoMenuItem\n (click)="executeTableAction(\'Export\')" *ngIf="this.displayExport && isTreeMode">\n <dato-icon datoSize="sm"\n icon="export" class="pointer mr-5 primary-300-color" datoTooltip="core.export-table"></dato-icon>\n {{ \'core.export-table\' | translate }}\n </button>\n </ng-template>\n </dato-menu>\n </div>\n</section>\n\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".grouping-section{transition:visibility .2s ease-in-out,width .2s ease-in-out,opacity .2s ease-in-out;width:0}.grouping-section.open{width:75px;visibility:visible;opacity:1}:host .main-container{min-height:24px}:host .right-section{margin-right:50px}:host .separator{width:1px;height:24px;margin:0 16px}.disabled-action{pointer-events:none}"]}),Ct("design:paramtypes",[Ha,e.ChangeDetectorRef,_n,ia,fr,Ma])],o)}(),Xa=function(){function n(t){this.popover=t}return n.prototype.close=function(){this.popover.close({type:t.PopoverTrigger.Close,data:this.result})},n.ctorParameters=function(){return[{type:ia}]},vt([e.Input("datoPopoverClose"),Ct("design:type",Object)],n.prototype,"result",void 0),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"close",null),n=vt([e.Directive({selector:"[datoPopoverClose]"}),Ct("design:paramtypes",[ia])],n)}(),Ja=function(){function t(t,n){this.popover=t,this.host=n,this.popoverClose=new e.EventEmitter,this.config={},this.trigger="click"}return Object.defineProperty(t.prototype,"datoPopoverContent",{set:function(t){this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverConfig",{set:function(t){this.config=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverClassName",{set:function(t){this.className=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverPlacement",{set:function(t){this.placement=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverTrigger",{set:function(t){this.trigger=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverWidth",{set:function(t){this.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverHeight",{set:function(t){this.height=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.host.nativeElement,this.trigger).pipe(i.untilDestroyed(this)).subscribe((function(){var e=$r({className:t.className,width:t.width,height:t.height,popper:{placement:t.placement||"bottom"}},t.config);t.popover.open(t.content,t.host.nativeElement,e).subscribe((function(){t.popoverClose.emit(!0)}))}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:ia},{type:e.ElementRef}]},vt([e.Output(),Ct("design:type",Object)],t.prototype,"popoverClose",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverContent",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverConfig",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoPopoverClassName",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverPlacement",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoPopoverTrigger",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverWidth",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverHeight",null),t=vt([e.Directive({selector:"[datoPopoverContent]"}),Ct("design:paramtypes",[ia,e.ElementRef])],t)}(),ts=[ea,Xa,Ja],es=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[ts],exports:[ts],entryComponents:[ea]})],t)}(),ns=function(){function t(t,e){this.template=t,this.appRef=e}return t.prototype.getMenuView=function(){var t,e;this.viewRef=this.template.createEmbeddedView({}),this.container=$t("div"),Ut(this.container,"dato-menu");try{for(var n=wt(this.viewRef.rootNodes),o=n.next();!o.done;o=n.next()){var i=o.value;this.container.appendChild(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return this.appRef.attachView(this.viewRef),document.body.appendChild(this.container),Vt(pe(Gt(".dato-menu")),"zIndex",Mn()),this.container},t.prototype.destroyView=function(){this.container&&(this.appRef.detachView(this.viewRef),document.body.removeChild(this.container),this.container=null)},t.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.ApplicationRef}]},t=vt([e.Directive({selector:"[datoMenuContent]"}),Ct("design:paramtypes",[e.TemplateRef,e.ApplicationRef])],t)}(),os=function(){function o(o){this.popper=o,this.placement="bottom-start",this.theme=t.ColorPalette.Light,this.menuClosed=new e.EventEmitter,this.isOpen=!1,this.items=[],this.itemChanges=new n.Subject}return Object.defineProperty(o.prototype,"isChildMenuOpen",{get:function(){return this.child&&this.child.isOpen},enumerable:!0,configurable:!0}),o.prototype.open=function(e){var n=this;if(!this.isOpen){var o=this.content.getMenuView();this.menuClass&&Ut(o,this.menuClass),this.theme===t.ColorPalette.Dark&&Ut(o,t.ColorPalette.Dark),this.popper.create(e,o,{placement:this.placement}).subscribe((function(t){n.popperInstance=t,n.isOpen=!0}))}},o.prototype.close=function(){this.child&&this.child.close(),this.content.destroyView(),this.popperInstance.destroy(),this.isOpen=!1,this.child=null,this.menuClosed.emit()},o.prototype._itemsHovered=function(){return this.itemChanges.pipe(r.startWith(this.items),r.switchMap((function(t){return n.merge.apply(void 0,xt(t.map((function(t){return t._hover$}))))})))},o.prototype.addItem=function(t){-1===this.items.indexOf(t)&&(this.items.push(t),this.itemChanges.next(this.items))},o.prototype.removeItem=function(t){this.items=this.items.filter((function(e){return e!==t})),this.itemChanges.next(this.items)},o.prototype.setChild=function(t){this.child=t},o.prototype.ngOnDestroy=function(){},o.ctorParameters=function(){return[{type:An}]},vt([e.ContentChild(ns),Ct("design:type",ns)],o.prototype,"content",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"menuClass",void 0),vt([e.Input(),Ct("design:type",String)],o.prototype,"theme",void 0),vt([e.Output(),Ct("design:type",Object)],o.prototype,"menuClosed",void 0),o=vt([e.Component({selector:"dato-menu",template:"\n <ng-content></ng-content>\n ",exportAs:"datoMenu",changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[An])],o)}(),is=function(){function t(t,e,o){this.host=t,this.zone=e,this.parentMenu=o,this.originClosed=new n.Subject,this.isRoot=null===o}return Object.defineProperty(t.prototype,"childMenu",{get:function(){return this._childMenu},set:function(t){this._childMenu=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.isRoot?n.fromEvent(this.element,"click").pipe(i.untilDestroyed(this)).subscribe((function(){t.childMenu&&(t.childMenu.isOpen?t.closeMenu():t.openMenu())})):this.childMenu&&this.element.setAttribute("data-menu-trigger","true")},t.prototype.openMenu=function(){var t=this;this.childMenu.open(this.element),n.fromEvent(document,"click",{capture:!0}).pipe(r.takeUntil(this.originClosed),r.filter((function(e){var n=t.element.contains(e.target),o=e.target.getAttribute("data-menu-trigger");return!n&&!o})),r.take(1)).subscribe((function(){setTimeout((function(){return t.closeMenu()}))}))},t.prototype.closeMenu=function(){this.childMenu.close(),this.originClosed.next()},t.prototype.ngAfterViewInit=function(){this.childMenu&&this.subscribeChildMenuItemsHovered()},t.prototype.subscribeChildMenuItemsHovered=function(){var t=this;this.childMenu._itemsHovered().pipe(i.untilDestroyed(this)).subscribe((function(e){e.childMenu?(t.childMenu.child&&e.childMenu!==t.childMenu.child&&t.childMenu.child.close(),e.childMenu.isOpen||(t.childMenu.setChild(e.childMenu),e.openChildMenu())):t.childMenu.isChildMenuOpen&&t.childMenu.child.close()}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:os,decorators:[{type:e.Optional}]}]},vt([e.Input("datoMenuTriggerFor"),Ct("design:type",os),Ct("design:paramtypes",[os])],t.prototype,"childMenu",null),t=vt([e.Directive({selector:"[datoMenuTriggerFor]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,e.NgZone,os])],t)}(),rs=function(){function t(t,e,o){this.host=t,this.menu=e,this.menuTrigger=o,this._hover$=n.fromEvent(this.element,"mouseenter").pipe(r.mapTo(this)),this.disabled=!1,this.menu.addItem(this)}return Object.defineProperty(t.prototype,"childMenu",{get:function(){return this.menuTrigger&&this.menuTrigger.childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.openChildMenu=function(){return this.menuTrigger&&this.menuTrigger.childMenu.open(this.menuTrigger.element)},t.prototype.ngOnDestroy=function(){this.menu.removeItem(this)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:os},{type:is,decorators:[{type:e.Optional}]}]},vt([e.Input(),e.HostBinding("class.dato-menu-item--disabled"),Ct("design:type",Object)],t.prototype,"disabled",void 0),t=vt([e.Directive({selector:"[datoMenuItem]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,os,is])],t)}(),as=[os,rs,is,ns],ss=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[as],exports:[as],entryComponents:[os]})],t)}(),ls={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return cs})),multi:!0},cs=function(n){function o(t){var e=n.call(this)||this;return e.cdr=t,e.expanded=!1,e.disabled=!1,e}return ft(o,n),Object.defineProperty(o.prototype,"datoTogglerValue",{set:function(t){this.setOperators(t)},enumerable:!0,configurable:!0}),o.prototype.setDisabledState=function(t){this.disabled=t,this.cdr.markForCheck()},o.prototype.writeValue=function(t){this.setOperators(t)},o.prototype.toggle=function(){this.setOperators(),this.onChange(this.active)},o.prototype.setOperators=function(e){this.active=e||this.getOppositeOperator(this.active);var n=this.getOppositeOperator(this.active);this.op1=t.OperatorTypes[this.active],this.op2=t.OperatorTypes[n],this.cdr.markForCheck()},o.prototype.getOppositeOperator=function(e){return e===t.OperatorTypes.AND?t.OperatorTypes.OR:t.OperatorTypes.AND},o.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),e.HostBinding("class.show-open"),Ct("design:type",Object)],o.prototype,"expanded",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],o.prototype,"datoTogglerValue",null),o=vt([e.Component({selector:"dato-operator-toggler",template:'<div class="container relative pointer" (click.stop)="toggle()" [ngClass]="op1" *ngIf="!disabled; else disabledTpl">\n <span class="main-option dato-note-bold absolute">{{op1}}</span>\n <span class="other-option dato-note-bold absolute">{{op2}}</span>\n</div>\n\n<ng-template #disabledTpl>\n <div class="disabled dato-note-bold primary-300-color" [ngClass]="active">{{active}}</div>\n</ng-template>\n',encapsulation:e.ViewEncapsulation.None,providers:[ls],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-operator-toggler{height:16px;width:67px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:10px}dato-operator-toggler .container{height:16px;width:67px}dato-operator-toggler .container span{border-radius:10px;transform:translateX(0);transition:transform .2s ease-in-out,color .2s ease-in-out,background-color .2s ease-in-out,opacity .2s ease-in-out,width .2s ease-in-out;background:0 0}dato-operator-toggler .container .other-option{padding:0 7px;opacity:0}dato-operator-toggler .container .main-option{transform:translateX(10px);z-index:1}dato-operator-toggler .container.AND .other-option{width:31px}dato-operator-toggler .container.AND .main-option{padding:0 7px}dato-operator-toggler .container.OR .other-option{width:40px}dato-operator-toggler .container.OR .main-option{padding:0 10px}dato-operator-toggler.show-open .container .main-option,dato-operator-toggler.show-open .container .other-option,dato-operator-toggler:hover .container .main-option,dato-operator-toggler:hover .container .other-option{transform:translateX(0)}dato-operator-toggler.show-open .container.AND .other-option,dato-operator-toggler:hover .container.AND .other-option{text-align:right}dato-operator-toggler.show-open .container.OR .main-option,dato-operator-toggler:hover .container.OR .main-option{transform:translateX(36px)}dato-operator-toggler.show-open .container.OR .other-option,dato-operator-toggler:hover .container.OR .other-option{text-align:left}dato-operator-toggler.show-open .container .other-option,dato-operator-toggler:hover .container .other-option{opacity:1;width:67px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],o)}(Dt),ps=[cs],ds=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,xo],declarations:[ps],exports:[ps],entryComponents:[ps]})],t)}(),us=function(){function t(t,e){this.cdr=t,this.host=e,this._text=null,this.hide=!0}return Object.defineProperty(t.prototype,"tpl",{set:function(t){t&&(this._tpl=t,this.cdr.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controlError",{set:function(t){this.context={$implicit:t},this.cdr.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"customClass",{set:function(t){!1===this.element.classList.contains(t)&&this.host.nativeElement.classList.add(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{set:function(t){t!==this._text&&(this._text=t,this.hide=!t,this.cdr.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},t=vt([e.Component({selector:"dato-control-error",template:'<label class="dato-control-error" [class.force-hide]="hide" *ngIf="!_tpl">{{_text | translate}}</label>\n<ng-template *ngTemplateOutlet="_tpl; context: context"></ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n }\n "]}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),hs=function(){function t(t){this.vcr=t}return t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t=vt([e.Directive({selector:"[datoControlErrorContainer]"}),Ct("design:paramtypes",[e.ViewContainerRef])],t)}(),gs=function(){function t(t){var e=this;this.host=t,this.submit$=n.fromEvent(this.element,"submit").pipe(r.tap((function(){!1===e.element.classList.contains("dato-form-submitted")&&e.element.classList.add("dato-form-submitted")})),r.shareReplay({refCount:!0,bufferSize:1}))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoForm]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),fs=new e.InjectionToken("FORM_ERRORS",{providedIn:"root",factory:function(){return{}}}),ms=function(){function t(t,e,o,i,r,a,s,l){this.vcr=t,this.resolver=e,this.host=o,this.errors=i,this.form=a,this.ngControl=s,this.parentControl=l,this.customErrors={},this.datoControlErrorsOnBlur=!0,this.container=r?r.vcr:this.vcr,this.submit$=this.form?this.form.submit$:n.EMPTY}return t.prototype.ngOnInit=function(){var t=this;this.resolveControl();var e="DATO-INPUT"===this.host.nativeElement.tagName,o=this.control.valueChanges,a=o;this.datoControlErrorsOnBlur&&e&&(a=n.fromEvent(this.host.nativeElement,"focusout").pipe(r.switchMap((function(){return n.merge(n.of(!0),o)}))));var s=this.submit$.pipe(r.switchMap((function(){return n.merge(n.of(!0),o)})));n.merge(s,a).pipe(i.untilDestroyed(this)).subscribe((function(){return t.valueChanges()}))},t.prototype.setError=function(t,e){if(!this.ref){var n=this.resolver.resolveComponentFactory(us);this.ref=this.container.createComponent(n)}var o=this.ref.instance;o.text=t,this.datoControlErrorsClass&&(o.customClass=this.datoControlErrorsClass),this.datoControlErrorsTpl&&(o.tpl=this.datoControlErrorsTpl,o.controlError=e)},t.prototype.ngOnDestroy=function(){},t.prototype.valueChanges=function(){var t=this.control.errors;if(t){var e=Object.keys(t)[0],n=this.errors[e];if(!1===Rt(n))return;var o=this.customErrors[e]||n(t[e]);this.setError(o,t)}else this.ref&&this.setError(null)},t.prototype.resolveControl=function(){if(this.ngControl||!this.parentControl){if(!this.ngControl)throw new To("Expect abstract control but gone none");this.control=this.ngControl.control}else this.control=this.parentControl},t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.ComponentFactoryResolver},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[fs]}]},{type:hs,decorators:[{type:e.Optional}]},{type:gs,decorators:[{type:e.Optional}]},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Optional}]}]},vt([e.Input("datoControlErrors"),Ct("design:type",Object)],t.prototype,"customErrors",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoControlErrorsClass",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"datoControlErrorsTpl",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoControlErrorsOnBlur",void 0),t=vt([e.Directive({selector:"[datoControlErrors]"}),bt(3,e.Inject(fs)),bt(4,e.Optional()),bt(5,e.Optional()),bt(6,e.Optional()),bt(7,e.Optional()),Ct("design:paramtypes",[e.ViewContainerRef,e.ComponentFactoryResolver,e.ElementRef,Object,hs,gs,o.NgControl,o.ControlContainer])],t)}(),ys=[us,hs,ms,gs],vs=function(){function t(){}return t=vt([e.NgModule({declarations:[ys],imports:[s.CommonModule,yo],exports:[ys],entryComponents:[us]})],t)}(),bs=function(){function t(t,e){this.controlDirective=t,this.host=e}return Object.defineProperty(t.prototype,"control",{get:function(){return this.controlDirective.control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.control.value?parseFloat(this.control.value):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.host.nativeElement.getAttribute("datosize")||"md"},enumerable:!0,configurable:!0}),t.prototype.patchValue=function(t){this.control.patchValue(t),this.control.markAsDirty()},t.prototype.focus=function(){this.host.nativeElement.focus()},t.ctorParameters=function(){return[{type:o.NgControl},{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoInputNumber]"}),Ct("design:paramtypes",[o.NgControl,e.ElementRef])],t)}(),Cs=function(){function t(t){this.host=t,this.max=1/0,this.min=-1/0,this.step=1,this.allowNegative=!1,this.showControls=!0}return t.prototype.ngOnInit=function(){var t=this;this.showControls&&(ws(this.increment.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.incrementValue()})),ws(this.decrement.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.decrementValue()})))},t.prototype.ngAfterContentInit=function(){Qt(this.host.nativeElement,"datosize",this.input.size)},t.prototype.ngOnDestroy=function(){},t.prototype.incrementValue=function(){this.input.focus();var t=this.input.value+this.step;t<=this.max&&this.input.patchValue(t)},t.prototype.decrementValue=function(){this.input.focus();var t=this.input.value>this.min,e=this.input.value-this.step>=(this.allowNegative?-1/0:0);if(t&&e){var n=this.input.value-this.step;this.input.patchValue(n)}},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.ViewChild("increment",{static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"increment",void 0),vt([e.ViewChild("decrement",{static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"decrement",void 0),vt([e.ContentChild(bs,{static:!0}),Ct("design:type",bs)],t.prototype,"input",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"max",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"min",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"step",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"allowNegative",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showControls",void 0),t=vt([e.Component({selector:"dato-input-number",template:'<ng-content></ng-content>\n <div [class.invisible]="!showControls" class="controls d-flex-column align-center">\n <button #increment (click.prevent)="incrementValue()" class="flex-1 align-center d-flex"><dato-icon datoIcon="arrow-down" class="primary-300-color" datoSize="sm" width="10px" #inc></dato-icon></button>\n <button #decrement (click.prevent)="decrementValue()" class="flex-1 align-center d-flex"><dato-icon datoIcon="arrow-down" class="primary-300-color" datoSize="sm" width="10px" #dec></dato-icon></button>\n </div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-input-number{position:relative;display:block;overflow:hidden}dato-input-number input,dato-input-number input[type=number]{width:100%}dato-input-number .controls{height:28px;position:absolute;top:1px;right:1px}dato-input-number .controls button{padding:0;cursor:pointer;transform:scaleY(0);transform-origin:top;transition:transform .2s;line-height:13px;width:30px;font-size:12px}dato-input-number .controls button:focus{outline:0}dato-input-number .controls button:first-child .dato-icon-arrow-down{transform:rotate(180deg)}dato-input-number .controls button:last-child{transform-origin:bottom}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}();
|
|
333
|
+
*/var qa=function(){function t(t,e,n,o,i,r){this.cdr=t,this.translate=e,this.gridQuery=n,this.gridService=o,this.controller=i,this.decimalPipe=r,this.disableButtons=null,this.smallVersion=null,this.pageNumbersDisplay={currentPage:1,pages:[],showFirstEllipsis:!1,showLastPage:!1},this.showBottomControls=!1,this.isExpanded=!0,this.hasRowGroupColumns=!1,this.isServerSidePagination=!1,this.MINI_DISPLAY_LENGTH=2,this.DISPLAY_LENGTH=5,this.XS_DISPLAY_SIZE=160,this.SMALL_DISPLAY_SIZE=390}return Object.defineProperty(t.prototype,"content",{set:function(t){this.navigationElement=t,t&&null===this.smallVersion&&this.calculateNavigationSize()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prevPageDisabled",{get:function(){return 1===this.pageNumbersDisplay.currentPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextPageDisabled",{get:function(){return this.pageNumbersDisplay.currentPage===this.totalPages},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.gridQuery.waitForGrid((function(){return n.combineLatest([t.gridQuery.gridRef.filterChanged,t.gridQuery.gridRef.rowGroupOpened.pipe(r.startWith(!0)),t.gridQuery.gridRef.expandOrCollapseAll.pipe(r.startWith(!0))])})).pipe(i.untilDestroyed(this)).subscribe((function(){t.gridApi.paginationGoToPage(0),t.initPagination()})),this.gridQuery.gridReady$.pipe(r.tap((function(){var e=t.gridQuery.api.columns.getRowGroupColumns();t.gridApi=t.gridQuery.api.grid,t.showBottomControls=t.gridQuery.getGridOptions().showBottomControls,t.hasRowGroupColumns=e&&e.length>0})),r.switchMap((function(){return t.isServerSidePagination=t.gridQuery.isServerSide,t.isServerSidePagination?t.gridQuery.serverDataLoaded$:t.gridQuery.rowDataChanged$})),r.throttleTime(100),$a((function(){return t.initPagination()})),i.untilDestroyed(this)).subscribe((function(e){var n=e.paginationPage,o=void 0===n?1:n;t.initPagination(o-1)}))},t.prototype.calculateRowsCount=function(t){this.totalPages=t?Math.ceil(t/this.rowsPerPage):this.gridApi.paginationGetTotalPages(),this.rowCount=this.gridApi.paginationGetRowCount(),this.setRowsDisplayRange(this.pageNumbersDisplay.currentPage),this.cdr.detectChanges()},t.prototype.initPagination=function(t){void 0===t&&(t=0);var e=this.gridQuery.serverSideConfig,n=e.totalRows;e.enabled&&Lt(n)||(this.rowsPerPage=this.gridApi.paginationGetPageSize(),this.calculateRowsCount(n),this.pagesInView=this.DISPLAY_LENGTH,this.navigatePage(t))},Object.defineProperty(t.prototype,"pagesInView",{set:function(t){this._pagesInView=t,this.pagesOnSides=Math.floor(this._pagesInView/2),this.pagesFitView=this._pagesInView+1>=this.totalPages,this.pageNumbersDisplay.pages=[]},enumerable:!0,configurable:!0}),t.prototype.calculateNavigationSize=function(){if(this.navigationElement){var t=this.navigationElement.nativeElement.parentElement.clientWidth;this.disableButtons=t<this.XS_DISPLAY_SIZE,t<this.SMALL_DISPLAY_SIZE?this._pagesInView!==this.MINI_DISPLAY_LENGTH&&(this.smallVersion=!0,this.pagesInView=this.MINI_DISPLAY_LENGTH):this._pagesInView!==this.DISPLAY_LENGTH&&(this.smallVersion=!1,this.pagesInView=this.DISPLAY_LENGTH),this.cdr.detectChanges()}},t.prototype.navigatePage=function(t){if(t>=0&&t<=this.totalPages-1){this.shouldShowLoader(t)&&this.gridService.setLoading(!0),this.gridApi.paginationGoToPage(t);var e=t+1;this.pageNumbersDisplay.currentPage=e,0!==this.pageNumbersDisplay.pages.length&&this.pagesFitView||(this.pageNumbersDisplay.pages=this.getPages(e)),this.setRowsDisplayRange(e),this.cdr.detectChanges()}},t.prototype.navigateFirstPage=function(){this.navigatePage(0)},t.prototype.navigateNextPage=function(){this.navigatePage(this.pageNumbersDisplay.currentPage)},t.prototype.navigatePrevPage=function(){var t=this.pageNumbersDisplay.currentPage-2;this.navigatePage(t)},t.prototype.showNextBatch=function(){var t=this.pageNumbersDisplay.pages[0]+this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.showPreviousBatch=function(){var t=this.pageNumbersDisplay.pages[0]-this._pagesInView+this.pagesOnSides;this.pageNumbersDisplay.pages=this.getPages(t)},t.prototype.trackByPage=function(t,e){return e},t.prototype.toggleGroupsState=function(){this.isExpanded?this.gridApi.collapseAll():this.gridApi.expandAll(),this.isExpanded=!this.isExpanded},t.prototype.autoFitGrid=function(t){this.gridService.fitGrid(t)},t.prototype.ngOnDestroy=function(){},t.prototype.setRowsDisplayRange=function(t){var e=t-1,n=1+e*this.rowsPerPage,o=(e+1)*this.rowsPerPage,i=this.rowCount>o?o:this.rowCount;this.rowsRange=this.rowCount>0?this.translate.transform("core.itemsRange",{range:this.decimalPipe.transform(n)+" - "+this.decimalPipe.transform(i),number:this.decimalPipe.transform(this.rowCount)}):this.translate.transform("core.numberOfItems",{number:0})},t.prototype.getPages=function(t){var e=[];this.pageNumbersDisplay.showLastPage=!this.pagesFitView&&t+this.pagesOnSides<this.totalPages,this.pageNumbersDisplay.showFirstEllipsis=!this.pagesFitView&&t-this.pagesOnSides>1;for(var n=this.getFirstPageNumber(t),o=this.pagesFitView?this.totalPages:this._pagesInView,i=0;i<o;i++)e.push(n+i);return this.smallVersion||e[o-1]+1!==this.totalPages||(e.push(this.totalPages),this.pageNumbersDisplay.showLastPage=!1),e},t.prototype.getFirstPageNumber=function(t){var e=t-this.pagesOnSides;return this.smallVersion&&t>1?t!==this.totalPages&&(e=t):this.pageNumbersDisplay.showFirstEllipsis?this.pageNumbersDisplay.showLastPage||(e=this.totalPages-(this._pagesInView-1)):e=1,e},t.prototype.shouldShowLoader=function(t){return this.isServerSidePagination&&Lt(this.gridApi.getCacheBlockState()[t])},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:_n},{type:fr},{type:Ma},{type:Ha},{type:s.DecimalPipe}]},vt([e.ViewChild("navigation",{static:!0}),Ct("design:type",e.ElementRef),Ct("design:paramtypes",[e.ElementRef])],t.prototype,"content",null),t=vt([e.Component({selector:"dato-grid-pagination-v2",changeDetection:e.ChangeDetectionStrategy.OnPush,template:'<div class="d-flex-row d-flex-auto d-flex-wrap container" [class.small]="smallVersion"\n [attr.data-pages-count]="totalPages"\n [attr.data-current-page]="pageNumbersDisplay.currentPage"\n [attr.data-page-size]="rowsPerPage"\n [attr.data-rows-count]="rowCount">\n <div *ngIf="totalPages > 1" #navigation\n class="navigation d-flex-row d-flex-0-0-auto align-center">\n\n \x3c!-- First Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="mr-4" data-auto-id="pagiantion-first-page"\n icon="chevron-left-double"\n datoType="secondary"\n datoSize="md"\n [disabled]="prevPageDisabled"\n (click)="navigateFirstPage()">\n </dato-icon-button>\n\n \x3c!-- Previous Page --\x3e\n <dato-icon-button icon="arrow-left" datoType="secondary" datoSize="md"\n [disabled]="prevPageDisabled" data-auto-id="pagiantion-previous-page"\n (click)="navigatePrevPage()">\n </dato-icon-button>\n\n\n <div class="d-flex mx-5 align-center number-container">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm" data-auto-id="pagiantion-previous-batch"\n *ngIf="pageNumbersDisplay.showFirstEllipsis && !smallVersion"\n (click)="showPreviousBatch()">...\n </dato-link>\n <dato-link class="page-number mx-5" [datoType]="page === pageNumbersDisplay.currentPage ? \'primary\' : \'secondary\'" datoSize="sm"\n *ngFor="let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;" [attr.data-auto-id]="\'pagiantion-page-\' + i"\n (click)="navigatePage(page - 1)">\n {{page}}\n </dato-link>\n\n <div class="d-flex" *ngIf="pageNumbersDisplay.showLastPage && !smallVersion">\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm" data-auto-id="pagiantion-next-batch"\n (click)="showNextBatch()">...</dato-link>\n <dato-link class="page-number mx-5" datoType="secondary" datoSize="sm"\n [attr.data-auto-id]="\'pagiantion-page-\' + totalPages"\n (click)="navigatePage(totalPages - 1)">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n \x3c!-- Next Page --\x3e\n <dato-icon-button icon="arrow-right" datoType="secondary" datoSize="md"\n (click)="navigateNextPage()" data-auto-id="pagiantion-next-page"\n [disabled]="nextPageDisabled">\n </dato-icon-button>\n\n \x3c!-- Last Page --\x3e\n <dato-icon-button *ngIf="!disableButtons"\n class="ml-4" icon="chevron-right-double"\n datoType="secondary" datoSize="md" data-auto-id="pagiantion-last-page"\n [disabled]="nextPageDisabled"\n (click)="navigatePage(totalPages - 1)">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf="totalPages > 1 && !smallVersion"\n class="separator mx-10 my-auto primary-100-background-color">\n </div>\n\n <div class="total d-flex-0-0-auto d-flex-row align-center">\n <span class="dato-note primary-300-color">{{rowsRange}}</span>\n </div>\n\n <div *ngIf="showBottomControls" class="grid-controls d-flex d-flex-1 justify-end">\n <dato-icon-button *ngIf="hasRowGroupColumns" [icon]="isExpanded ? \'collapse\' : \'expand\'" datoType="secondary"\n datoSize="md" (click)="toggleGroupsState()" data-auto-id="pagination-expand-collapse"\n [datoTooltipV2]="isExpanded ? \'core.collapse-rows\' : \'core.expand-rows\'">\n </dato-icon-button>\n\n <dato-icon-button class="mx-4" icon="maximize-horizontal" datoType="secondary" datoSize="md"\n (click)="autoFitGrid(\'content\')" [datoTooltipV2]="\'core.fit-to-text\'"\n data-auto-id="pagination-fit-to-content">\n </dato-icon-button>\n\n <dato-icon-button icon="minimize-horizontal" datoType="secondary" datoSize="md"\n (click)="autoFitGrid(\'container\')" [datoTooltipV2]="\'core.revert-to-default-size\'"\n data-auto-id="pagination-fit-to-container">\n </dato-icon-button>\n </div>\n</div>\n',providers:[s.DecimalPipe],styles:[":host{padding:12px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}:host .container{height:25px}:host .navigation .page-number{transition:color .3s ease-in-out}:host .navigation .page-number:first-of-type{margin-left:7px}:host .navigation .page-number:last-of-type{margin-right:7px}:host .separator{width:1px;height:25px}:host .container.small .navigation,:host .container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef,_n,fr,Ma,Ha,s.DecimalPipe])],t)}(),Ya=function(){function t(){this.widthToHideLabel=1439,this.widthForShortLabel=1539}return Object.defineProperty(t.prototype,"menu",{get:function(){return this.getMenu?this.getMenu():null},enumerable:!0,configurable:!0}),vt([e.Input(),Ct("design:type",String)],t.prototype,"icon",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"label",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"shortLabel",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"enableV2_1",void 0),vt([e.Input(),Ct("design:type",Function)],t.prototype,"getMenu",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"isLast",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"widthToHideLabel",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"widthForShortLabel",void 0),t=vt([e.Component({selector:"dato-grid-toolbar-button",template:'<div *ngIf="menu else button" [datoMenuTriggerFor]="menu">\n <ng-container [ngTemplateOutlet]="button"></ng-container>\n</div>\n\n<ng-template #button>\n <dato-link datoType="secondary" [class.mr-16]="!isLast" [datoTooltip]="tooltip" datoTooltipPosition="bottom" [disabled]="disabled"\n [datoTooltipDisabled]="!tooltip" [class.full-button]="enableV2_1" [ngClass]="enableV2_1 ? \'full-button-\' + widthToHideLabel + \'px\' : \'\'">\n <dato-icon [icon]="icon" height="18px" width="18px"></dato-icon>\n <ng-container *ngIf="!shortLabel else labelAndShortLabel">\n {{ label | translate }}\n </ng-container>\n <ng-template #labelAndShortLabel>\n <span [class]="\'full-label-\' + widthForShortLabel + \'px\'">{{ label | translate }}</span>\n <span [class]="\'short-label short-label-\' + widthForShortLabel + \'px\'">{{ shortLabel | translate }}</span>\n </ng-template>\n </dato-link>\n\n <dato-icon *ngIf="enableV2_1" [icon]="icon" datoSize="sm" class="mr-16 pointer icon-button" [ngClass]="\'icon-button-\' + widthToHideLabel + \'px\'"\n [datoTooltip]="tooltip || label" datoTooltipPosition="bottom" [datoTooltipDisabled]="!tooltip && !label">\n </dato-icon>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Za=function(){function o(t,e,n,o,i,r){this.gridController=t,this.cdr=e,this.translate=n,this.popover=o,this.gridQuery=i,this.gridService=r,this.MAX_VISIBLE_ROW_ACTIONS=5,this.MAX_VISIBLE_GRID_ACTIONS=2,this._maxRowActions=this.MAX_VISIBLE_ROW_ACTIONS,this.displayExport=!0,this.rowActions={mainList:[],moreMenu:[]},this.gridActions={mainList:[],moreMenu:[]},this.searchPlaceholder=this.translate.transform("core.search"),this.rowActionsShortLabelThreshold=1539,this.displayCustomGridActionsSeparator=!0,this.openMenus={group:!1,settings:!1},this.rowGroupsCollapsed=!1,this.groupsAllowed=!this.hideGrouping,this.isSelectedRow=!1,this.isTreeMode=this.gridService.treeData,this.totalRowsCount=0,this.selectedRowsCount=0,this.allPageRowsSelected=!1,this.widthToHideActionsLabels=1439}return Object.defineProperty(o.prototype,"maxRowActions",{set:function(t){this.enableV2_1?(this._maxRowActions=Math.min(t,this.MAX_VISIBLE_ROW_ACTIONS),t>this.MAX_VISIBLE_ROW_ACTIONS&&e.isDevMode()&&console.warn("DatoGrid V2.1 - maxRowActions cannot be over "+this.MAX_VISIBLE_ROW_ACTIONS)):this._maxRowActions=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableV2_1",{get:function(){return this.gridController.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableSearch",{get:function(){return this.gridController.gridOptions.enableSearch},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"enableBackground",{get:function(){return this.gridController.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isRowActionsVisible",{get:function(){return!this.enableV2_1||this.enableV2_1&&this.isSelectedRow},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasRowActions",{get:function(){return ye(this.rowActions.mainList)>0||ye(this.rowActions.moreMenu)>0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hiddenColumns",{get:function(){return"("+this.gridQuery.getAllDisplayedColumns().length+"/"+this.gridQuery.getAllColumns().length+")"},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasActiveMoreActions",{get:function(){return this.rowActions.moreMenu.some((function(t){return t.visible}))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"api",{get:function(){return this.gridController.gridQuery.api},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var t=this,e=this.gridController.gridQuery.waitForGrid((function(){return n.merge(t.gridQuery.gridRef.cellValueChanged,t.gridQuery.gridRef.rowDataUpdated).pipe(r.debounceTime(100),i.untilDestroyed(t))})),o=this.gridQuery.gridReady$.pipe(r.take(1));o.pipe(i.untilDestroyed(this)).subscribe((function(){t.groupsAllowed=!t.hideGrouping&&!t.gridQuery.getValue().serverSidePagination.enabled})),this.initGridActions();var a=this.gridQuery.selectedRowsChange$,s=this.gridQuery.selectIsSelectAllRowsEnabled();n.merge(e,o,a,s).pipe(r.filter((function(){return!!t.api})),i.untilDestroyed(this)).subscribe((function(){t.resolveVisibleActions(),t.cdr.detectChanges()})),this.registerGroupListeners(),this.subscribeRowsSelectionData()},o.prototype.onActionClick=function(e){if(Rt(e.onClick)){var n=this.gridController.gridQuery.getSelectedRowsCount();if(this.gridService._logEvent("Grids - Table Action",{action:e.key,numOfItems:n,from:"Toolbar"}),this.gridQuery.isServerSelectAllRowsEnabled){var o=this.gridService.getFilterForServerActionOnSelectAll();e.onClick(null,!0,o)}else{var i=this.gridController.gridQuery.getSelectedRowNodes();e.onClick(i)}}else e.actionType===t.GridActionType.EXPORT&&this.executeTableAction("Export")},o.prototype.resolveVisibleActions=function(){var t=this,e=this.gridQuery.getSelectedRowNodes();this.isSelectedRow=e.length>0||this.gridQuery.isServerSelectAllRowsEnabled;var n=Ar(this.gridController.rowActions,this.gridQuery.getSelectedRowsCount(),e,this.gridQuery.isServerSelectAllRowsEnabled).filter((function(e){return!t.isRowActionHidden(e)}));this.rowActions={mainList:n.slice(0,this._maxRowActions),moreMenu:n.slice(this._maxRowActions,n.length)},this.initWidthToHideActionsLabels()},o.prototype.initWidthToHideActionsLabels=function(){var t=this.rowActions.mainList.length+(this.rowActions.moreMenu.length>0?1:0)+(this.gridActions.moreMenu.length>0?1:0)+(this.createAction?1:0),e=[1239,1339,1439,1539];this.widthToHideActionsLabels=e[Math.min(Math.max(t-5,0),e.length-1)]},o.prototype.initGridActions=function(){var t=this.gridController.gridActions;this.initCreateAction(t),this.initExportAction(t);var e=this.MAX_VISIBLE_GRID_ACTIONS-(this.displayExport?1:0);ye(t)===e+1&&e++,this.gridActions={mainList:t.slice(0,e),moreMenu:t.slice(e,t.length)}},o.prototype.initCreateAction=function(e){var n=e.findIndex((function(e){return e.actionType===t.GridActionType.CREATE}));this.createAction=n>=0?e.splice(n,1)[0]:null,this.createAction&&(this.createAction.label=this.createAction.label||"core.create-new",this.createAction.key=this.createAction.key||"create-new")},o.prototype.initExportAction=function(e){var n=this,o=e.find((function(e){return e.actionType===t.GridActionType.EXPORT}));if(o){var i=o.onClick,r=o.icon,a=o.label,s=o.tooltip,l=o.key;o.onClick=i||function(){return n.executeTableAction("Export")},o.icon=r||"export",o.label=a||"core.export-table",o.tooltip=s||"core.export-table",o.key=l||"export"}},o.prototype.executeTableAction=function(t){switch(this.gridService._logEvent("Grids - General Table Action",{action:t}),t){case"Autofit to Content":this.gridService.fitGrid("content");break;case"Autofit to Page":this.gridService.fitGrid("container");break;case"Collapse Expand":this.toggleExpanded();break;case"Export":this.exportTable();break;case"Group from Settings":case"Group from Toolbar":this.openGroupMenu();break;case"Reset Filters":this.resetFilters();break;case"Reset Settings":this.resetSettings();break;case"Show Hide Column":this.openColumnMenu()}},o.prototype.toggleExpanded=function(){this.rowGroupsCollapsed?this.api.grid.expandAll():this.api.grid.collapseAll(),this.rowGroupsCollapsed=!this.rowGroupsCollapsed},Object.defineProperty(o.prototype,"hasGroups",{get:function(){return this.api.columns.getRowGroupColumns().length>0},enumerable:!0,configurable:!0}),o.prototype.exportTable=function(){var t=this.gridController.gridOptions,e=t.gridName,n=t.exportGrid;if(Rt(n))n(mt(mt({},this.api),this.gridQuery.getValue().settings));else{var o=U.format(new Date,"LLL d, yyyy");this.api.grid.exportDataAsExcel({fileName:e+" - "+o,processCellCallback:function(t){var e=t.column,n=t.value,o=e.getColDef().valueFormatter;return o?o({value:n}):n}})}},o.prototype.resetSettings=function(){this.gridController.gridService.resetTableSettings()},o.prototype.openColumnMenu=function(){this.popover.open(Ka,this.settingsTrigger.nativeElement,{width:220,className:"dato-grid-columns-display-menu",popper:{placement:"bottom-end"},data:{api:this.api,gridService:this.gridService,gridQuery:this.gridQuery}})},o.prototype.resetFilters=function(){this.gridController.gridService.clearAllFilters()},o.prototype.openGroupMenu=function(){var t=this;this.openMenus.group=!0;var e=this.hasGroups?0:200,n=this.gridQuery.gridRef.columnRowGroupChanged.pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){t.rowGroupsCollapsed=!1,t.cdr.detectChanges()}));setTimeout((function(){t.popover.open(Wa,t.groupTrigger.nativeElement,{height:206,width:250,className:"dato-grid-groups-menu",popper:{placement:"bottom-end"},data:{api:t.api,gridService:t.gridService}}).pipe(i.untilDestroyed(t)).subscribe((function(){n.unsubscribe(),t.openMenus.group=!1,t.cdr.detectChanges()}))}),e)},o.prototype.isActionDisabled=function(t){return!t.visible},o.prototype.isRowActionHidden=function(t){return!t.visible&&this.enableV2_1},o.prototype.clearSelectedRows=function(){this.gridService.deselectAllRows()},o.prototype.ngOnDestroy=function(){},o.prototype.getCollapseState=function(t){var e=t.node,n=t.api,o=!0;return 0===e.rowGroupIndex&&n.forEachNodeAfterFilterAndSort((function(t){var e=t.expanded;0===t.rowGroupIndex&&e&&(o=!1)})),o},o.prototype.registerGroupListeners=function(){var t=this;this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.columnRowGroupChanged})).pipe(r.filter((function(){return!t.openMenus.group})),i.untilDestroyed(this)).subscribe((function(){t.rowGroupsCollapsed=!1,t.cdr.detectChanges()})),this.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.rowGroupOpened})).pipe(i.untilDestroyed(this)).subscribe((function(e){var n=t.getCollapseState(e);n!==t.rowGroupsCollapsed&&(t.rowGroupsCollapsed=n,t.cdr.detectChanges())}))},o.prototype.subscribeRowsSelectionData=function(){var t=this;this.gridQuery.rowsSelectionData$.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=e.totalRowsCount,o=e.selectedRowsCount,i=e.selectedPageRowsCount,r=e.isAllPageRowsSelected;t.totalRowsCount=n,t.selectedRowsCount=o;var a=t.gridQuery.getGridOptions().enableAllPagesSelection;t.allPageRowsSelected=a&&r&&o===i&&o<n,t.cdr.detectChanges()}))},o.prototype.selectAllPages=function(){this.gridQuery.isServerSide?this.gridService.setServerSidePagination({selectAllRowsEnabled:!0,excludedFromSelectAll:[]}):this.gridService.api.grid.selectAllFiltered()},o.ctorParameters=function(){return[{type:Ha},{type:e.ChangeDetectorRef},{type:_n},{type:ia},{type:fr},{type:Ma}]},vt([e.ViewChild("groupTrigger",{read:e.ElementRef,static:!1}),Ct("design:type",e.ElementRef)],o.prototype,"groupTrigger",void 0),vt([e.ViewChild("settingsTrigger",{read:e.ElementRef,static:!1}),Ct("design:type",e.ElementRef)],o.prototype,"settingsTrigger",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"displayExport",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],o.prototype,"maxRowActions",null),vt([e.Input(),Ct("design:type",Boolean)],o.prototype,"hideGrouping",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"searchPlaceholder",void 0),vt([e.Input(),Ct("design:type",Number)],o.prototype,"rowActionsShortLabelThreshold",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"displayCustomGridActionsSeparator",void 0),o=vt([e.Component({selector:"dato-grid-toolbar-v2",template:'<section *ngIf="gridController.gridQuery.gridReady$ | async" class="d-flex mb-20 justify-between items-center main-container" [class.mx-30]="enableBackground">\n\n <section [ngClass]="{ \'d-flex items-center right-section\': enableV2_1 }">\n \x3c!-- Dynamic content for the left area --\x3e\n <div data-auto-id="grid-toolbar-dynamic-left">\n <ng-content select="[toolbarLeftArea]"></ng-content>\n </div>\n\n <div class="d-flex items-center">\n <dato-grid-search-bar *ngIf="enableSearch" [searchPlaceholder]="searchPlaceholder"></dato-grid-search-bar>\n <ng-container *ngIf="enableV2_1 && selectedRowsCount > 0">\n <div class="d-flex items-center">\n <div class="chip align-center d-flex dato-note px-9 nowrap ml-16">\n <span data-auto-id="grid-selected-items-text">{{ (allPageRowsSelected ? \'core.all-items-in-page-selected\' : \'core.selected-items\') | translate:{ itemsCount: selectedRowsCount } }}</span>\n <dato-icon datoType="primary" datoIcon="close" datoSize="md" class="ml-6 pointer" (click)="clearSelectedRows()"\n data-auto-id="grid-clear-selected-rows"></dato-icon>\n </div>\n <dato-link *ngIf="allPageRowsSelected" (click)="selectAllPages()" datoSize="sm" class="ml-10"\n data-auto-id="grid-select-all-pages">\n <span>{{\'core.select-all-items\' | translate:{ itemsCount: totalRowsCount } }}</span>\n </dato-link>\n </div>\n <div *ngIf="hasRowActions" class="separator"></div>\n </ng-container>\n </div>\n\n \x3c!-- Row Actions--\x3e\n <div class="d-flex items-center" *ngIf="isRowActionsVisible">\n\n <ng-container *ngFor="let rowAction of rowActions.mainList; index as i; last as isLast">\n\n <div *ngIf="!isRowActionHidden(rowAction)"\n [attr.data-auto-id]="\'grid-toolbar-action-\' + rowAction.key"\n [attr.data-action-index]="\'grid-toolbar-action-\' + i"\n [class.disabled-action]="isActionDisabled(rowAction)">\n <ng-container [ngTemplateOutlet]="rowAction.template || defaultButton"\n [ngTemplateOutletContext]="{disabled: isActionDisabled(rowAction)}"></ng-container>\n </div>\n\n <ng-template #defaultButton>\n <div (click)="onActionClick(rowAction)">\n <dato-grid-toolbar-button [icon]="rowAction.icon"\n [disabled]="isActionDisabled(rowAction)"\n [label]="rowAction.label"\n [shortLabel]="rowAction.shortLabel"\n [tooltip]="rowAction.tooltip"\n [getMenu]="rowAction.getMenu"\n [enableV2_1]="enableV2_1"\n [isLast]="isLast"\n [widthToHideLabel]="widthToHideActionsLabels">\n </dato-grid-toolbar-button>\n </div>\n </ng-template>\n </ng-container>\n\n <div *ngIf="rowActions.moreMenu.length > 0" class="separator"></div>\n <dato-grid-toolbar-more-menu [actions]="rowActions.moreMenu" (actionClick)="onActionClick($event)" [isRowActions]="true">\n </dato-grid-toolbar-more-menu>\n </div>\n\n </section>\n\n\n \x3c!-- General Actions --\x3e\n <div class="d-flex items-center">\n \x3c!-- Create action --\x3e\n <ng-container *ngIf="createAction">\n <dato-button datoSize="sm" class="pointer primary-300-color" (click)="onActionClick(createAction)"\n [datoTooltip]="createAction.tooltip" [attr.data-auto-id]="\'grid-toolbar-action-\' + createAction.key">\n <dato-icon *ngIf="createAction.icon" [icon]="createAction.icon" class="mr-5"></dato-icon>\n {{ createAction.label | translate }}\n </dato-button>\n <div class="separator"></div>\n </ng-container>\n\n \x3c!-- Dynamic content for the right area --\x3e\n <div #customActions data-auto-id="grid-toolbar-dynamic-right">\n <ng-content select="[toolbarRightArea]"></ng-content>\n </div>\n <div *ngIf="customActions.childNodes.length && displayCustomGridActionsSeparator" class="separator"></div>\n\n \x3c!-- Group buttons --\x3e\n <div *ngIf="groupsAllowed" class="d-flex grouping-section opacity-0 invisible" [class.open]="openMenus.group || hasGroups">\n <dato-icon-button [class.active]="openMenus.group" (click)="executeTableAction(\'Group from Toolbar\')"\n data-auto-id="grid-toolbar-open-groups"\n removeIconPadding datoSize="md" datoType="none" icon="group" iconWidth="17px"\n datoTooltip="core.row-grouping" #groupTrigger\n class="mr-10 pointer"></dato-icon-button>\n <dato-icon-button data-auto-id="grid-toolbar-toggle-expand" datoSize="md" datoType="none"\n (click)="executeTableAction(\'Collapse Expand\')"\n [icon]="rowGroupsCollapsed ? \'expand\' : \'collapse\'"\n [disabled]="!hasGroups"\n [datoTooltip]="\'core.\' + (rowGroupsCollapsed ? \'expand\' : \'collapse\') + \'-rows\'"\n class="pointer"></dato-icon-button>\n <div class="separator"></div>\n </div>\n\n \x3c!-- Grid Actions --\x3e\n <ng-container *ngFor="let gridAction of gridActions.mainList; index as i">\n <div *ngIf="gridAction.getMenu else button" [datoMenuTriggerFor]="gridAction.getMenu()">\n <ng-container [ngTemplateOutlet]="button"></ng-container>\n </div>\n <ng-template #button>\n <dato-icon datoSize="sm" (click)="onActionClick(gridAction)"\n [attr.data-auto-id]="\'grid-toolbar-action-\' + gridAction.key"\n [attr.data-action-index]="\'grid-toolbar-general-action-\' + i"\n [icon]="gridAction.icon" class="pointer primary-300-color"\n [class.mr-16]="!gridAction.separator"\n [datoTooltip]="gridAction.tooltip || gridAction.label">\n </dato-icon>\n </ng-template>\n <div *ngIf="gridAction.separator" class="separator"></div>\n </ng-container>\n\n \x3c!-- Export --\x3e\n <dato-icon data-auto-id="grid-toolbar-export" datoSize="sm"\n (click)="executeTableAction(\'Export\')" *ngIf="displayExport && !isTreeMode"\n icon="export" class="pointer mr-16 primary-300-color" datoTooltip="core.export-table"></dato-icon>\n\n \x3c!-- Settings --\x3e\n <dato-icon [class.active]="openMenus.settings" (click)="openMenus.settings = true"\n data-auto-id="grid-toolbar-settings" datoSize="sm"\n icon="account" class="pointer primary-300-color" datoTooltip="core.table-settings"\n #settingsTrigger\n [datoMenuTriggerFor]="settingsMenu"></dato-icon>\n\n \x3c!-- More actions menu --\x3e\n <ng-container *ngIf="gridActions.moreMenu.length > 0">\n <div class="separator"></div>\n <dato-grid-toolbar-more-menu [actions]="gridActions.moreMenu" (actionClick)="onActionClick($event)" [isRowActions]="false">\n </dato-grid-toolbar-more-menu>\n </ng-container>\n\n <dato-menu #settingsMenu="datoMenu" menuClass="grid-settings-menu" placement="bottom-end"\n (menuClosed)="openMenus.settings = false">\n <ng-template datoMenuContent>\n <button data-auto-id="grid-toolbar-settings-autofit-page" datoMenuItem\n (click)="executeTableAction(\'Autofit to Page\')">\n <dato-icon datoSize="sm" icon="maximize-horizontal" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.autofitPage\' | translate }}</button>\n <button data-auto-id="grid-toolbar-settings-autofit-content" datoMenuItem\n (click)="executeTableAction(\'Autofit to Content\')">\n <dato-icon datoSize="sm" icon="minimize-horizontal" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.autofitContent\' | translate }}</button>\n <ng-container *ngIf="groupsAllowed">\n <button data-auto-id="grid-toolbar-settings-group" datoMenuItem (click)="executeTableAction(\'Group from Settings\')">\n <dato-icon datoSize="sm" icon="group" class="mr-4 primary-300-color"></dato-icon>\n {{ \'core.group\' | translate }}\n </button>\n </ng-container>\n <button data-auto-id="grid-toolbar-settings-toggle-columns" datoMenuItem (click)="executeTableAction(\'Show Hide Column\')">\n <dato-icon datoSize="sm" icon="hide" class="mr-8 primary-300-color"></dato-icon>\n <span>{{ \'core.hideShowColumns\' | translate }}<span\n class="dato-simple-italic ml-5 primary-200-color">{{hiddenColumns}}</span></span>\n </button>\n <button data-auto-id="grid-toolbar-settings-reset-settings" datoMenuItem\n (click)="executeTableAction(\'Reset Settings\')">\n <dato-icon datoSize="sm" icon="reset-table" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.resetTableSettings\' | translate }}\n </button>\n <button data-auto-id="grid-toolbar-settings-reset-filters" datoMenuItem\n (click)="executeTableAction(\'Reset Filters\')">\n <dato-icon datoSize="sm" icon="reset-filters" class="mr-8 primary-300-color"></dato-icon>\n {{ \'core.resetAllFilters\' | translate }}\n </button>\n <button data-auto-id="grid-toolbar-export" datoMenuItem\n (click)="executeTableAction(\'Export\')" *ngIf="this.displayExport && isTreeMode">\n <dato-icon datoSize="sm"\n icon="export" class="pointer mr-5 primary-300-color" datoTooltip="core.export-table"></dato-icon>\n {{ \'core.export-table\' | translate }}\n </button>\n </ng-template>\n </dato-menu>\n </div>\n</section>\n\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".grouping-section{transition:visibility .2s ease-in-out,width .2s ease-in-out,opacity .2s ease-in-out;width:0}.grouping-section.open{width:75px;visibility:visible;opacity:1}:host .main-container{min-height:24px}:host .right-section{margin-right:50px}:host .separator{width:1px;height:24px;margin:0 16px}.disabled-action{pointer-events:none}"]}),Ct("design:paramtypes",[Ha,e.ChangeDetectorRef,_n,ia,fr,Ma])],o)}(),Xa=function(){function n(t){this.popover=t}return n.prototype.close=function(){this.popover.close({type:t.PopoverTrigger.Close,data:this.result})},n.ctorParameters=function(){return[{type:ia}]},vt([e.Input("datoPopoverClose"),Ct("design:type",Object)],n.prototype,"result",void 0),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"close",null),n=vt([e.Directive({selector:"[datoPopoverClose]"}),Ct("design:paramtypes",[ia])],n)}(),Ja=function(){function t(t,n){this.popover=t,this.host=n,this.popoverClose=new e.EventEmitter,this.config={},this.trigger="click"}return Object.defineProperty(t.prototype,"datoPopoverContent",{set:function(t){this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverConfig",{set:function(t){this.config=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverClassName",{set:function(t){this.className=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverPlacement",{set:function(t){this.placement=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverTrigger",{set:function(t){this.trigger=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverWidth",{set:function(t){this.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"datoPopoverHeight",{set:function(t){this.height=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.host.nativeElement,this.trigger).pipe(i.untilDestroyed(this)).subscribe((function(){var e=$r({className:t.className,width:t.width,height:t.height,popper:{placement:t.placement||"bottom"}},t.config);t.popover.open(t.content,t.host.nativeElement,e).subscribe((function(){t.popoverClose.emit(!0)}))}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:ia},{type:e.ElementRef}]},vt([e.Output(),Ct("design:type",Object)],t.prototype,"popoverClose",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverContent",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverConfig",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoPopoverClassName",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverPlacement",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoPopoverTrigger",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverWidth",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"datoPopoverHeight",null),t=vt([e.Directive({selector:"[datoPopoverContent]"}),Ct("design:paramtypes",[ia,e.ElementRef])],t)}(),ts=[ea,Xa,Ja],es=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[ts],exports:[ts],entryComponents:[ea]})],t)}(),ns=function(){function t(t,e){this.template=t,this.appRef=e}return t.prototype.getMenuView=function(){var t,e;this.viewRef=this.template.createEmbeddedView({}),this.container=$t("div"),Ut(this.container,"dato-menu");try{for(var n=wt(this.viewRef.rootNodes),o=n.next();!o.done;o=n.next()){var i=o.value;this.container.appendChild(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return this.appRef.attachView(this.viewRef),document.body.appendChild(this.container),Vt(pe(Gt(".dato-menu")),"zIndex",Mn()),this.container},t.prototype.destroyView=function(){this.container&&(this.appRef.detachView(this.viewRef),document.body.removeChild(this.container),this.container=null)},t.ctorParameters=function(){return[{type:e.TemplateRef},{type:e.ApplicationRef}]},t=vt([e.Directive({selector:"[datoMenuContent]"}),Ct("design:paramtypes",[e.TemplateRef,e.ApplicationRef])],t)}(),os=function(){function o(o){this.popper=o,this.placement="bottom-start",this.theme=t.ColorPalette.Light,this.menuClosed=new e.EventEmitter,this.isOpen=!1,this.items=[],this.itemChanges=new n.Subject}return Object.defineProperty(o.prototype,"isChildMenuOpen",{get:function(){return this.child&&this.child.isOpen},enumerable:!0,configurable:!0}),o.prototype.open=function(e){var n=this;if(!this.isOpen){var o=this.content.getMenuView();this.menuClass&&Ut(o,this.menuClass),this.theme===t.ColorPalette.Dark&&Ut(o,t.ColorPalette.Dark),this.popper.create(e,o,{placement:this.placement}).subscribe((function(t){n.popperInstance=t,n.isOpen=!0}))}},o.prototype.close=function(){this.child&&this.child.close(),this.content.destroyView(),this.popperInstance.destroy(),this.isOpen=!1,this.child=null,this.menuClosed.emit()},o.prototype._itemsHovered=function(){return this.itemChanges.pipe(r.startWith(this.items),r.switchMap((function(t){return n.merge.apply(void 0,xt(t.map((function(t){return t._hover$}))))})))},o.prototype.addItem=function(t){-1===this.items.indexOf(t)&&(this.items.push(t),this.itemChanges.next(this.items))},o.prototype.removeItem=function(t){this.items=this.items.filter((function(e){return e!==t})),this.itemChanges.next(this.items)},o.prototype.setChild=function(t){this.child=t},o.prototype.ngOnDestroy=function(){},o.ctorParameters=function(){return[{type:An}]},vt([e.ContentChild(ns),Ct("design:type",ns)],o.prototype,"content",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",Object)],o.prototype,"menuClass",void 0),vt([e.Input(),Ct("design:type",String)],o.prototype,"theme",void 0),vt([e.Output(),Ct("design:type",Object)],o.prototype,"menuClosed",void 0),o=vt([e.Component({selector:"dato-menu",template:"\n <ng-content></ng-content>\n ",exportAs:"datoMenu",changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[An])],o)}(),is=function(){function t(t,e,o){this.host=t,this.zone=e,this.parentMenu=o,this.originClosed=new n.Subject,this.isRoot=null===o}return Object.defineProperty(t.prototype,"childMenu",{get:function(){return this._childMenu},set:function(t){this._childMenu=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.isRoot?n.fromEvent(this.element,"click").pipe(i.untilDestroyed(this)).subscribe((function(){t.childMenu&&(t.childMenu.isOpen?t.closeMenu():t.openMenu())})):this.childMenu&&this.element.setAttribute("data-menu-trigger","true")},t.prototype.openMenu=function(){var t=this;this.childMenu.open(this.element),n.fromEvent(document,"click",{capture:!0}).pipe(r.takeUntil(this.originClosed),r.filter((function(e){var n=t.element.contains(e.target),o=e.target.getAttribute("data-menu-trigger");return!n&&!o})),r.take(1)).subscribe((function(){setTimeout((function(){return t.closeMenu()}))}))},t.prototype.closeMenu=function(){this.childMenu.close(),this.originClosed.next()},t.prototype.ngAfterViewInit=function(){this.childMenu&&this.subscribeChildMenuItemsHovered()},t.prototype.subscribeChildMenuItemsHovered=function(){var t=this;this.childMenu._itemsHovered().pipe(i.untilDestroyed(this)).subscribe((function(e){e.childMenu?(t.childMenu.child&&e.childMenu!==t.childMenu.child&&t.childMenu.child.close(),e.childMenu.isOpen||(t.childMenu.setChild(e.childMenu),e.openChildMenu())):t.childMenu.isChildMenuOpen&&t.childMenu.child.close()}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:os,decorators:[{type:e.Optional}]}]},vt([e.Input("datoMenuTriggerFor"),Ct("design:type",os),Ct("design:paramtypes",[os])],t.prototype,"childMenu",null),t=vt([e.Directive({selector:"[datoMenuTriggerFor]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,e.NgZone,os])],t)}(),rs=function(){function t(t,e,o){this.host=t,this.menu=e,this.menuTrigger=o,this._hover$=n.fromEvent(this.element,"mouseenter").pipe(r.mapTo(this)),this.disabled=!1,this.menu.addItem(this)}return Object.defineProperty(t.prototype,"childMenu",{get:function(){return this.menuTrigger&&this.menuTrigger.childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.openChildMenu=function(){return this.menuTrigger&&this.menuTrigger.childMenu.open(this.menuTrigger.element)},t.prototype.ngOnDestroy=function(){this.menu.removeItem(this)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:os},{type:is,decorators:[{type:e.Optional}]}]},vt([e.Input(),e.HostBinding("class.dato-menu-item--disabled"),Ct("design:type",Object)],t.prototype,"disabled",void 0),t=vt([e.Directive({selector:"[datoMenuItem]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,os,is])],t)}(),as=[os,rs,is,ns],ss=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[as],exports:[as],entryComponents:[os]})],t)}(),ls={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return cs})),multi:!0},cs=function(n){function o(t){var e=n.call(this)||this;return e.cdr=t,e.expanded=!1,e.disabled=!1,e}return ft(o,n),Object.defineProperty(o.prototype,"datoTogglerValue",{set:function(t){this.setOperators(t)},enumerable:!0,configurable:!0}),o.prototype.setDisabledState=function(t){this.disabled=t,this.cdr.markForCheck()},o.prototype.writeValue=function(t){this.setOperators(t)},o.prototype.toggle=function(){this.setOperators(),this.onChange(this.active)},o.prototype.setOperators=function(e){this.active=e||this.getOppositeOperator(this.active);var n=this.getOppositeOperator(this.active);this.op1=t.OperatorTypes[this.active],this.op2=t.OperatorTypes[n],this.cdr.markForCheck()},o.prototype.getOppositeOperator=function(e){return e===t.OperatorTypes.AND?t.OperatorTypes.OR:t.OperatorTypes.AND},o.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),e.HostBinding("class.show-open"),Ct("design:type",Object)],o.prototype,"expanded",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],o.prototype,"datoTogglerValue",null),o=vt([e.Component({selector:"dato-operator-toggler",template:'<div class="container relative pointer" (click.stop)="toggle()" [ngClass]="op1" *ngIf="!disabled; else disabledTpl">\n <span class="main-option dato-note-bold absolute">{{op1}}</span>\n <span class="other-option dato-note-bold absolute">{{op2}}</span>\n</div>\n\n<ng-template #disabledTpl>\n <div class="disabled dato-note-bold primary-300-color" [ngClass]="active">{{active}}</div>\n</ng-template>\n',encapsulation:e.ViewEncapsulation.None,providers:[ls],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-operator-toggler{height:16px;width:67px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:10px}dato-operator-toggler .container{height:16px;width:67px}dato-operator-toggler .container span{border-radius:10px;transform:translateX(0);transition:transform .2s ease-in-out,color .2s ease-in-out,background-color .2s ease-in-out,opacity .2s ease-in-out,width .2s ease-in-out;background:0 0}dato-operator-toggler .container .other-option{padding:0 7px;opacity:0}dato-operator-toggler .container .main-option{transform:translateX(10px);z-index:1}dato-operator-toggler .container.AND .other-option{width:31px}dato-operator-toggler .container.AND .main-option{padding:0 7px}dato-operator-toggler .container.OR .other-option{width:40px}dato-operator-toggler .container.OR .main-option{padding:0 10px}dato-operator-toggler.show-open .container .main-option,dato-operator-toggler.show-open .container .other-option,dato-operator-toggler:hover .container .main-option,dato-operator-toggler:hover .container .other-option{transform:translateX(0)}dato-operator-toggler.show-open .container.AND .other-option,dato-operator-toggler:hover .container.AND .other-option{text-align:right}dato-operator-toggler.show-open .container.OR .main-option,dato-operator-toggler:hover .container.OR .main-option{transform:translateX(36px)}dato-operator-toggler.show-open .container.OR .other-option,dato-operator-toggler:hover .container.OR .other-option{text-align:left}dato-operator-toggler.show-open .container .other-option,dato-operator-toggler:hover .container .other-option{opacity:1;width:67px}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],o)}(Dt),ps=[cs],ds=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,xo],declarations:[ps],exports:[ps],entryComponents:[ps]})],t)}(),us=function(){function t(t,e){this.cdr=t,this.host=e,this._text=null,this.hide=!0}return Object.defineProperty(t.prototype,"tpl",{set:function(t){t&&(this._tpl=t,this.cdr.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controlError",{set:function(t){this.context={$implicit:t},this.cdr.markForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"customClass",{set:function(t){!1===this.element.classList.contains(t)&&this.host.nativeElement.classList.add(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{set:function(t){t!==this._text&&(this._text=t,this.hide=!t,this.cdr.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},t=vt([e.Component({selector:"dato-control-error",template:'<label class="dato-control-error" [class.force-hide]="hide" *ngIf="!_tpl">{{_text | translate}}</label>\n<ng-template *ngTemplateOutlet="_tpl; context: context"></ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["\n :host {\n display: block;\n }\n "]}),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef])],t)}(),hs=function(){function t(t){this.vcr=t}return t.ctorParameters=function(){return[{type:e.ViewContainerRef}]},t=vt([e.Directive({selector:"[datoControlErrorContainer]"}),Ct("design:paramtypes",[e.ViewContainerRef])],t)}(),gs=function(){function t(t){var e=this;this.host=t,this.submit$=n.fromEvent(this.element,"submit").pipe(r.tap((function(){!1===e.element.classList.contains("dato-form-submitted")&&e.element.classList.add("dato-form-submitted")})),r.shareReplay({refCount:!0,bufferSize:1}))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoForm]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),fs=new e.InjectionToken("FORM_ERRORS",{providedIn:"root",factory:function(){return{}}}),ms=function(){function t(t,e,o,i,r,a,s,l){this.vcr=t,this.resolver=e,this.host=o,this.errors=i,this.form=a,this.ngControl=s,this.parentControl=l,this.customErrors={},this.datoControlErrorsOnBlur=!0,this.container=r?r.vcr:this.vcr,this.submit$=this.form?this.form.submit$:n.EMPTY}return t.prototype.ngOnInit=function(){var t=this;this.resolveControl();var e="DATO-INPUT"===this.host.nativeElement.tagName,o=this.control.valueChanges,a=o;this.datoControlErrorsOnBlur&&e&&(a=n.fromEvent(this.host.nativeElement,"focusout").pipe(r.switchMap((function(){return n.merge(n.of(!0),o)}))));var s=this.submit$.pipe(r.switchMap((function(){return n.merge(n.of(!0),o)})));n.merge(s,a).pipe(i.untilDestroyed(this)).subscribe((function(){return t.valueChanges()}))},t.prototype.setError=function(t,e){if(!this.ref){var n=this.resolver.resolveComponentFactory(us);this.ref=this.container.createComponent(n)}var o=this.ref.instance;o.text=t,this.datoControlErrorsClass&&(o.customClass=this.datoControlErrorsClass),this.datoControlErrorsTpl&&(o.tpl=this.datoControlErrorsTpl,o.controlError=e)},t.prototype.ngOnDestroy=function(){},t.prototype.valueChanges=function(){var t=this.control.errors;if(t){var e=Object.keys(t)[0],n=this.errors[e];if(!1===Rt(n))return;var o=this.customErrors[e]||n(t[e]);this.setError(o,t)}else this.ref&&this.setError(null)},t.prototype.resolveControl=function(){if(this.ngControl||!this.parentControl){if(!this.ngControl)throw new To("Expect abstract control but gone none");this.control=this.ngControl.control}else this.control=this.parentControl},t.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:e.ComponentFactoryResolver},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[fs]}]},{type:hs,decorators:[{type:e.Optional}]},{type:gs,decorators:[{type:e.Optional}]},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:o.ControlContainer,decorators:[{type:e.Optional}]}]},vt([e.Input("datoControlErrors"),Ct("design:type",Object)],t.prototype,"customErrors",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoControlErrorsClass",void 0),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"datoControlErrorsTpl",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoControlErrorsOnBlur",void 0),t=vt([e.Directive({selector:"[datoControlErrors]"}),bt(3,e.Inject(fs)),bt(4,e.Optional()),bt(5,e.Optional()),bt(6,e.Optional()),bt(7,e.Optional()),Ct("design:paramtypes",[e.ViewContainerRef,e.ComponentFactoryResolver,e.ElementRef,Object,hs,gs,o.NgControl,o.ControlContainer])],t)}(),ys=[us,hs,ms,gs],vs=function(){function t(){}return t=vt([e.NgModule({declarations:[ys],imports:[s.CommonModule,yo],exports:[ys],entryComponents:[us]})],t)}(),bs=function(){function t(t,e){this.controlDirective=t,this.host=e}return Object.defineProperty(t.prototype,"control",{get:function(){return this.controlDirective.control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.control.value?parseFloat(this.control.value):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.host.nativeElement.getAttribute("datosize")||"md"},enumerable:!0,configurable:!0}),t.prototype.patchValue=function(t){this.control.patchValue(t),this.control.markAsDirty()},t.prototype.focus=function(){this.host.nativeElement.focus()},t.ctorParameters=function(){return[{type:o.NgControl},{type:e.ElementRef}]},t=vt([e.Directive({selector:"[datoInputNumber]"}),Ct("design:paramtypes",[o.NgControl,e.ElementRef])],t)}(),Cs=function(){function t(t){this.host=t,this.max=1/0,this.min=-1/0,this.step=1,this.allowNegative=!1,this.showControls=!0}return t.prototype.ngOnInit=function(){var t=this;this.showControls&&(ws(this.increment.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.incrementValue()})),ws(this.decrement.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.decrementValue()})))},t.prototype.ngAfterContentInit=function(){Qt(this.host.nativeElement,"datosize",this.input.size)},t.prototype.ngOnDestroy=function(){},t.prototype.incrementValue=function(){this.input.focus();var t=this.input.value+this.step;t<=this.max&&this.input.patchValue(t)},t.prototype.decrementValue=function(){this.input.focus();var t=this.input.value>this.min,e=this.input.value-this.step>=(this.allowNegative?-1/0:0);if(t&&e){var n=this.input.value-this.step;this.input.patchValue(n)}},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.ViewChild("increment",{static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"increment",void 0),vt([e.ViewChild("decrement",{static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"decrement",void 0),vt([e.ContentChild(bs,{static:!0}),Ct("design:type",bs)],t.prototype,"input",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"max",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"min",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"step",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"allowNegative",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showControls",void 0),t=vt([e.Component({selector:"dato-input-number",template:'<ng-content></ng-content>\n <div [class.invisible]="!showControls" class="controls d-flex-column align-center">\n <button #increment (click.prevent)="incrementValue()" class="flex-1 align-center d-flex"><dato-icon datoIcon="arrow-down" class="primary-300-color" datoSize="sm" width="10px" #inc></dato-icon></button>\n <button #decrement (click.prevent)="decrementValue()" class="flex-1 align-center d-flex"><dato-icon datoIcon="arrow-down" class="primary-300-color" datoSize="sm" width="10px" #dec></dato-icon></button>\n </div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-input-number{position:relative;display:block;overflow:hidden}dato-input-number input,dato-input-number input[type=number]{width:100%}dato-input-number .controls{height:28px;position:absolute;top:1px;right:1px}dato-input-number .controls button{padding:0;cursor:pointer;transform:scaleY(0);transform-origin:top;transition:transform .2s;line-height:13px;width:30px;font-size:12px}dato-input-number .controls button:focus{outline:0}dato-input-number .controls button:first-child .dato-icon-arrow-down{transform:rotate(180deg)}dato-input-number .controls button:last-child{transform-origin:bottom}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}();
|
|
341
334
|
/**
|
|
342
335
|
* @license
|
|
343
336
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -611,7 +604,7 @@ function mc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function yc(t,e,n){this.
|
|
|
611
604
|
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
612
605
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
613
606
|
*/
|
|
614
|
-
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.9.8",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=pi,t.DatoAccordionContentComponent=ri,t.DatoAccordionGroupComponent=si,t.DatoAccordionHeaderComponent=ai,t.DatoAccordionModule=ui,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=Pi,t.DatoCheckboxModule=ki,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=mi,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=ji,t.DatoMultiOptionV2Component=Ni,t.DatoOperatorTogglerComponent=cs,t.DatoOperatorTogglerModule=ds,t.DatoOptionComponent=yi,t.DatoOptionV2Component=Li,t.DatoOptionsModule=Vi,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=vi,t.DatoSelectComponent=Ai,t.DatoSelectEmptyComponent=Mi,t.DatoSelectModule=Wi,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=kl,t.DatoSnackbarComponent=Al,t.DatoSnackbarModule=Rl,t.DatoSortableComponent=ci,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=_i,t.DatoTriggerSingle=Ti,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=Di,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=hi,t.getOptionTemplate=gi,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.9.8",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=pi,t.DatoAccordionContentComponent=ri,t.DatoAccordionGroupComponent=si,t.DatoAccordionHeaderComponent=ai,t.DatoAccordionModule=ui,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=Pi,t.DatoCheckboxModule=ki,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=mi,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=ji,t.DatoMultiOptionV2Component=Ni,t.DatoOperatorTogglerComponent=cs,t.DatoOperatorTogglerModule=ds,t.DatoOptionComponent=yi,t.DatoOptionV2Component=Li,t.DatoOptionsModule=Vi,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=vi,t.DatoSelectComponent=Ei,t.DatoSelectEmptyComponent=Mi,t.DatoSelectModule=Wi,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=kl,t.DatoSnackbarComponent=Al,t.DatoSnackbarModule=Rl,t.DatoSortableComponent=ci,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=_i,t.DatoTriggerSingle=Ai,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=Di,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=hi,t.getOptionTemplate=gi,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=
|
|
615
608
|
/**
|
|
616
609
|
* @license
|
|
617
610
|
* Copyright Datorama. All Rights Reserved.
|