@datorama/core 22.12.2 → 22.12.3-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/bundles/datorama-core.umd.js +81 -51
  2. package/bundles/datorama-core.umd.js.map +1 -1
  3. package/bundles/datorama-core.umd.min.js +14 -14
  4. package/bundles/datorama-core.umd.min.js.map +1 -1
  5. package/datorama-core.d.ts +1 -0
  6. package/datorama-core.metadata.json +1 -1
  7. package/esm2015/datorama-core.js +2 -1
  8. package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +4 -2
  9. package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
  10. package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
  11. package/esm2015/lib/grid-v2/grid-settings.js +2 -2
  12. package/esm2015/lib/grid-v2/grid-store/grid.service.js +3 -2
  13. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -1
  14. package/esm2015/lib/progress-bar/progress-bar.component.js +3 -3
  15. package/esm2015/lib/rich-text/rich-text.directive.js +20 -38
  16. package/esm2015/lib/rich-text/rich-text.service.js +50 -0
  17. package/esm2015/lib/select/select.component.js +4 -9
  18. package/esm2015/lib/version.js +2 -2
  19. package/esm5/datorama-core.js +2 -1
  20. package/esm5/lib/breadcrumbs/breadcrumbs.component.js +4 -2
  21. package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
  22. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
  23. package/esm5/lib/grid-v2/grid-settings.js +2 -2
  24. package/esm5/lib/grid-v2/grid-store/grid.service.js +3 -2
  25. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
  26. package/esm5/lib/progress-bar/progress-bar.component.js +3 -3
  27. package/esm5/lib/rich-text/rich-text.directive.js +21 -39
  28. package/esm5/lib/rich-text/rich-text.service.js +51 -0
  29. package/esm5/lib/select/select.component.js +4 -9
  30. package/esm5/lib/version.js +2 -2
  31. package/fesm2015/datorama-core.js +73 -51
  32. package/fesm2015/datorama-core.js.map +1 -1
  33. package/fesm5/datorama-core.js +81 -52
  34. package/fesm5/datorama-core.js.map +1 -1
  35. package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -0
  36. package/lib/grid-v2/grid-settings.d.ts +2 -2
  37. package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +2 -0
  38. package/lib/progress-bar/progress-bar.component.d.ts +1 -0
  39. package/lib/rich-text/rich-text.directive.d.ts +4 -6
  40. package/lib/rich-text/rich-text.service.d.ts +10 -0
  41. package/package.json +2 -2
@@ -236,7 +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.prototype.triggerChangeDetection=function(){this.cdr.detectChanges()},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.prototype.triggerChangeDetectionInDatoSingle=function(){this.datoTriggerSingle.triggerChangeDetection()},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);
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.prototype.triggerChangeDetection=function(){this.cdr.detectChanges()},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){this._model=t?Z.coerceArray(t):[],this.options&&(this.markAsActive(this._model,{deselectAll:!0}),this.limitSelectedTo&&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;this._model=this._model.filter((function(n){return n[e.idKey]!==t[e.idKey]}));var n=this.options.find((function(n){return n.option&&n.option[e.idKey]===t[e.idKey]}));n&&(n.active=!1),this.limitSelectedTo&&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){t.active=!t.active;var n=t.option;t.active?this._model=this._model.concat(n):this._model=this._model.filter((function(t){return t[e.idKey]!==n[e.idKey]})),this.limitSelectedTo&&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.prototype.triggerChangeDetectionInDatoSingle=function(){this.datoTriggerSingle.triggerChangeDetection()},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
240
  /**
241
241
  * @license
242
242
  * Copyright Datorama. All Rights Reserved.
@@ -279,7 +279,7 @@ var Qi=function(t,e,n){var o=Lt(t[n])?"":(""+t[n]).toLocaleLowerCase();return!!o
279
279
  *
280
280
  * Use of this source code is governed by an Apache License 2.0 license that can be
281
281
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
282
- */(ur=t.DatoGridFilterTypes||(t.DatoGridFilterTypes={})).String="String",ur.Number="Number",ur.Date="Date",ur.None="None",(hr=t.DatoGridFilterSections||(t.DatoGridFilterSections={})).By_Value="By_Value",hr.Conditional="Conditional",(gr=t.DatoFilterConditions||(t.DatoFilterConditions={})).EQUALS="EQUALS",gr.NOT_EQUALS="NOT_EQUALS",gr.GREATER_THAN="GREATER_THAN",gr.GREATER_EQUALS="GREATER_EQUALS",gr.LESS_THAN="LESS_THAN",gr.LESS_EQUALS="LESS_EQUALS",gr.IN_RANGE="IN_RANGE",gr.CONTAINS="CONTAINS",gr.NOT_CONTAINS="NOT_CONTAINS",gr.STARTS_WITH="STARTS_WITH",gr.ENDS_WITH="ENDS_WITH",gr.IN_LIST="IN_LIST",gr.NOT_IN_LIST="NOT_IN_LIST",gr.IS_EMPTY="IS_EMPTY",gr.NOT_EMPTY="NOT_EMPTY",gr.IS_NULL="IS_NULL",gr.NOT_NULL="NOT_NULL";var mr,yr,vr,br=[t.DatoFilterConditions.IN_RANGE,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.GREATER_THAN],Cr=[t.DatoFilterConditions.CONTAINS,t.DatoFilterConditions.NOT_CONTAINS,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.STARTS_WITH,t.DatoFilterConditions.ENDS_WITH],wr=[t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.LESS_EQUALS,t.DatoFilterConditions.GREATER_THAN,t.DatoFilterConditions.GREATER_EQUALS,t.DatoFilterConditions.IN_RANGE],Sr=((dr={})[t.DatoGridFilterTypes.String]=Cr,dr[t.DatoGridFilterTypes.Number]=wr,dr[t.DatoGridFilterTypes.Date]=br,dr);function xr(e){return e.condition===t.DatoFilterConditions.IN_RANGE}function Or(e,n){var o=n.condition,i=n.value,r=i?i.toLowerCase():"",a=e?(""+e).toLowerCase():"";switch(o){case t.DatoFilterConditions.EQUALS:return a===r;case t.DatoFilterConditions.NOT_EQUALS:return a!==r;case t.DatoFilterConditions.CONTAINS:return a.indexOf(r)>-1;case t.DatoFilterConditions.NOT_CONTAINS:return-1===a.indexOf(r);case t.DatoFilterConditions.STARTS_WITH:return a.startsWith(r);case t.DatoFilterConditions.ENDS_WITH:return a.endsWith(r);case t.DatoFilterConditions.IS_EMPTY:return kt(a);case t.DatoFilterConditions.NOT_EMPTY:return!kt(a)}}function Dr(e,n,o){var i=n.condition,r=n.value,a=n.rangeEnd;void 0===o&&(o="");var s=e?parseFloat(e[o]||e):null,l=parseFloat(r);switch(i){case t.DatoFilterConditions.EQUALS:return s===l;case t.DatoFilterConditions.NOT_EQUALS:return s!==l;case t.DatoFilterConditions.LESS_THAN:return s<l;case t.DatoFilterConditions.LESS_EQUALS:return s<=l;case t.DatoFilterConditions.GREATER_THAN:return s>l;case t.DatoFilterConditions.GREATER_EQUALS:return s>=l;case t.DatoFilterConditions.IN_RANGE:return s>=l&&s<=parseFloat(a);case t.DatoFilterConditions.IS_EMPTY:case t.DatoFilterConditions.IS_NULL:return Lt(s);case t.DatoFilterConditions.NOT_EMPTY:case t.DatoFilterConditions.NOT_NULL:return!Lt(s)}}function Ir(e,n){var o=n.condition,i=n.value,r=n.rangeEnd,a=e?an(U.startOfDay(new Date(e))):null,s=an(new Date(i));switch(o){case t.DatoFilterConditions.EQUALS:return U.isEqual(a,s);case t.DatoFilterConditions.NOT_EQUALS:return!U.isEqual(a,s);case t.DatoFilterConditions.GREATER_THAN:return U.isAfter(a,s);case t.DatoFilterConditions.LESS_THAN:return U.isBefore(a,s);case t.DatoFilterConditions.IN_RANGE:var l=an(U.endOfDay(new Date(r)));return U.isEqual(a,s)||U.isEqual(a,l)||U.isAfter(a,s)&&U.isBefore(a,l);case t.DatoFilterConditions.IS_EMPTY:return Lt(e);case t.DatoFilterConditions.NOT_EMPTY:return!Lt(e)}}function Tr(e){var n=e.rowValue,o=e.condition,i=e.type,r=e.filterKey;switch(i){case t.DatoGridFilterTypes.Date:return Ir(n,o);case t.DatoGridFilterTypes.Number:return Dr(n,o,r);default:return Or(n,o)}}function Er(e,n){var o,i,r=e.row,a=e.api;if(n){var s=Object.keys(n),l=function(e){var o=!0,i=n[e],s=i.byValue,l=i.conditional,c=i.pivotKeys,p=r.parent&&r.parent.childrenMapped&&function t(e,n){void 0===n&&(n=[]);var o=Object.keys(e)[0],i=pr(o);i&&(n=t(e[o],xt(n,[i.value])));return n}(r.parent.childrenMapped)||[],d=a.getValue(e,r);if(c&&c.length>0&&!he(c,p))return{value:!0};if(l){var u=l.operator,h=l.conditions,g=l.type;o=h[u===t.OperatorTypes.AND?"every":"some"]((function(t){return Tr({rowValue:d,condition:t,type:g,filterKey:e})}))}if(o&&s){var f=s.values.includes(d);o=s.condition===t.DatoFilterConditions.IN_LIST?f:!f}return o?void 0:{value:!1}};try{for(var c=wt(s),p=c.next();!p.done;p=c.next()){var d=l(p.value);if("object"==typeof d)return d.value}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}return!0}function Ar(t,e,n,o){return t.map((function(t){return mt(mt({},t),{visible:Rr(t,e,n,o)})}))}function Rr(t,e,n,o){var i=t.visibleWhen;return[Mr(i,n,o),Pr(i),kr(i,e),_r(i,e),jr(i,e)].some(Boolean)}function Pr(e){return e===t.RowSelectionTypeV2.ALWAYS||void 0===e}function kr(e,n){return e===t.RowSelectionTypeV2.ANY&&n>0}function _r(e,n){return e===t.RowSelectionTypeV2.SINGLE&&1===n}function jr(e,n){return e===t.RowSelectionTypeV2.MULTI&&n>1}function Mr(t,e,n){return Rt(t)&&!!t(e,n)}function Lr(t){var e,n,o=t.toolbarActions,i=t.selectedRows,r=t.iconRegistry,a=t.node,s=t.logger,l=me(o).filter((function(t){return Lt(t.template)})),c=a.isSelected()?de(xt([a],i)):[a],p=[],d=function(e){var n=e.label,o=e.icon,i=e.onClick,a=e.subMenu,l=e.separator;r.getSvg(o);p.push({name:n,action:function(){s&&s.log("Grids - Table Action",{action:e.key,numOfItems:c.length,from:s.eventOrigin||"Context Menu"}),i&&i(c)},icon:'<span class="da-grid-icon pointer context-item-icon '+o+'-icon">'+r.getSvg(o)+"</span>",subMenu:a?Lr(mt(mt({},t),{toolbarActions:a})):null}),l&&p.push("separator")};try{for(var u=wt(l),h=u.next();!h.done;h=u.next()){d(h.value)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return p}(mr=t.OperatorTypes||(t.OperatorTypes={})).AND="AND",mr.OR="OR",(yr=t.GridActionType||(t.GridActionType={})).CUSTOM="CUSTOM",yr.CREATE="CREATE",yr.EXPORT="EXPORT",(vr=t.RowSelectionTypeV2||(t.RowSelectionTypeV2={}))[vr.SINGLE=0]="SINGLE",vr[vr.MULTI=1]="MULTI",vr[vr.ANY=2]="ANY",vr[vr.ALWAYS=3]="ALWAYS";var Nr,Fr,Gr,Vr,zr=new e.InjectionToken("DATO_GRID_STORAGE_API"),Br=function(t,e){return t&&t.value?'<div class="value-wrapper ellipsis">'+Hr(t,e)+"</div>":null},Hr=function(t,e){e=(e||"").trim();var n=(t.valueFormatted||t.value||"").toString();return e?n.replace(new RegExp(e,"gi"),(function(t){return'<span class="search-highlight">'+t+"</span>"})):n};(Nr=t.GridMinWidths||(t.GridMinWidths={}))[Nr.Default=107]="Default",Nr[Nr.With_Info=131]="With_Info",(Fr=t.DatoGridColumnTypes||(t.DatoGridColumnTypes={})).String="String",Fr.Number="Number",Fr.Date="Date",Fr.Status="Status",Fr.Items="Items",Fr.ItemsCount="ItemsCount",Fr.Initials="Initials",Fr.Avatar="Avatar",(Gr=t.GridRowSelectionType||(t.GridRowSelectionType={})).SINGLE="single",Gr.MULTIPLE="multiple",(Vr=t.GridStatusColumnTypes||(t.GridStatusColumnTypes={})).SUCCESS="SUCCESS",Vr.FAILURE="FAILURE",Vr.IN_PROGRESS="IN_PROGRESS",Vr.PENDING="PENDING",Vr.WAITING="WAITING";
282
+ */(ur=t.DatoGridFilterTypes||(t.DatoGridFilterTypes={})).String="String",ur.Number="Number",ur.Date="Date",ur.None="None",(hr=t.DatoGridFilterSections||(t.DatoGridFilterSections={})).By_Value="By_Value",hr.Conditional="Conditional",(gr=t.DatoFilterConditions||(t.DatoFilterConditions={})).EQUALS="EQUALS",gr.NOT_EQUALS="NOT_EQUALS",gr.GREATER_THAN="GREATER_THAN",gr.GREATER_EQUALS="GREATER_EQUALS",gr.LESS_THAN="LESS_THAN",gr.LESS_EQUALS="LESS_EQUALS",gr.IN_RANGE="IN_RANGE",gr.CONTAINS="CONTAINS",gr.NOT_CONTAINS="NOT_CONTAINS",gr.STARTS_WITH="STARTS_WITH",gr.ENDS_WITH="ENDS_WITH",gr.IN_LIST="IN_LIST",gr.NOT_IN_LIST="NOT_IN_LIST",gr.IS_EMPTY="IS_EMPTY",gr.NOT_EMPTY="NOT_EMPTY",gr.IS_NULL="IS_NULL",gr.NOT_NULL="NOT_NULL";var mr,yr,vr,br=[t.DatoFilterConditions.IN_RANGE,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.GREATER_THAN],Cr=[t.DatoFilterConditions.CONTAINS,t.DatoFilterConditions.NOT_CONTAINS,t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.STARTS_WITH,t.DatoFilterConditions.ENDS_WITH],wr=[t.DatoFilterConditions.EQUALS,t.DatoFilterConditions.NOT_EQUALS,t.DatoFilterConditions.LESS_THAN,t.DatoFilterConditions.LESS_EQUALS,t.DatoFilterConditions.GREATER_THAN,t.DatoFilterConditions.GREATER_EQUALS,t.DatoFilterConditions.IN_RANGE],Sr=((dr={})[t.DatoGridFilterTypes.String]=Cr,dr[t.DatoGridFilterTypes.Number]=wr,dr[t.DatoGridFilterTypes.Date]=br,dr);function xr(e){return e.condition===t.DatoFilterConditions.IN_RANGE}function Or(e,n){var o=n.condition,i=n.value,r=i?i.toLowerCase():"",a=e?(""+e).toLowerCase():"";switch(o){case t.DatoFilterConditions.EQUALS:return a===r;case t.DatoFilterConditions.NOT_EQUALS:return a!==r;case t.DatoFilterConditions.CONTAINS:return a.indexOf(r)>-1;case t.DatoFilterConditions.NOT_CONTAINS:return-1===a.indexOf(r);case t.DatoFilterConditions.STARTS_WITH:return a.startsWith(r);case t.DatoFilterConditions.ENDS_WITH:return a.endsWith(r);case t.DatoFilterConditions.IS_EMPTY:return kt(a);case t.DatoFilterConditions.NOT_EMPTY:return!kt(a)}}function Dr(e,n,o){var i=n.condition,r=n.value,a=n.rangeEnd;void 0===o&&(o="");var s=e?parseFloat(e[o]||e):null,l=parseFloat(r);switch(i){case t.DatoFilterConditions.EQUALS:return s===l;case t.DatoFilterConditions.NOT_EQUALS:return s!==l;case t.DatoFilterConditions.LESS_THAN:return s<l;case t.DatoFilterConditions.LESS_EQUALS:return s<=l;case t.DatoFilterConditions.GREATER_THAN:return s>l;case t.DatoFilterConditions.GREATER_EQUALS:return s>=l;case t.DatoFilterConditions.IN_RANGE:return s>=l&&s<=parseFloat(a);case t.DatoFilterConditions.IS_EMPTY:case t.DatoFilterConditions.IS_NULL:return Lt(s);case t.DatoFilterConditions.NOT_EMPTY:case t.DatoFilterConditions.NOT_NULL:return!Lt(s)}}function Ir(e,n){var o=n.condition,i=n.value,r=n.rangeEnd,a=e?an(U.startOfDay(new Date(e))):null,s=an(new Date(i));switch(o){case t.DatoFilterConditions.EQUALS:return U.isEqual(a,s);case t.DatoFilterConditions.NOT_EQUALS:return!U.isEqual(a,s);case t.DatoFilterConditions.GREATER_THAN:return U.isAfter(a,s);case t.DatoFilterConditions.LESS_THAN:return U.isBefore(a,s);case t.DatoFilterConditions.IN_RANGE:var l=an(U.endOfDay(new Date(r)));return U.isEqual(a,s)||U.isEqual(a,l)||U.isAfter(a,s)&&U.isBefore(a,l);case t.DatoFilterConditions.IS_EMPTY:return Lt(e);case t.DatoFilterConditions.NOT_EMPTY:return!Lt(e)}}function Tr(e){var n=e.rowValue,o=e.condition,i=e.type,r=e.filterKey;switch(i){case t.DatoGridFilterTypes.Date:return Ir(n,o);case t.DatoGridFilterTypes.Number:return Dr(n,o,r);default:return Or(n,o)}}function Er(e,n){var o,i,r=e.row,a=e.api;if(n){var s=Object.keys(n),l=function(e){var o=!0,i=n[e],s=i.byValue,l=i.conditional,c=i.pivotKeys,p=r.parent&&r.parent.childrenMapped&&function t(e,n){void 0===n&&(n=[]);var o=Object.keys(e)[0],i=pr(o);i&&(n=t(e[o],xt(n,[i.value])));return n}(r.parent.childrenMapped)||[],d=a.getValue(e,r);if(c&&c.length>0&&!he(c,p))return{value:!0};if(l){var u=l.operator,h=l.conditions,g=l.type;o=h[u===t.OperatorTypes.AND?"every":"some"]((function(t){return Tr({rowValue:d,condition:t,type:g,filterKey:e})}))}if(o&&s){var f=s.values.includes(d);o=s.condition===t.DatoFilterConditions.IN_LIST?f:!f}return o?void 0:{value:!1}};try{for(var c=wt(s),p=c.next();!p.done;p=c.next()){var d=l(p.value);if("object"==typeof d)return d.value}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}return!0}function Ar(t,e,n,o){return t.map((function(t){return mt(mt({},t),{visible:Rr(t,e,n,o)})}))}function Rr(t,e,n,o){var i=t.visibleWhen;return[Mr(i,n,o),Pr(i),kr(i,e),_r(i,e),jr(i,e)].some(Boolean)}function Pr(e){return e===t.RowSelectionTypeV2.ALWAYS||void 0===e}function kr(e,n){return e===t.RowSelectionTypeV2.ANY&&n>0}function _r(e,n){return e===t.RowSelectionTypeV2.SINGLE&&1===n}function jr(e,n){return e===t.RowSelectionTypeV2.MULTI&&n>1}function Mr(t,e,n){return Rt(t)&&!!t(e,n)}function Lr(t){var e,n,o=t.toolbarActions,i=t.selectedRows,r=t.iconRegistry,a=t.node,s=t.logger,l=me(o).filter((function(t){return Lt(t.template)})),c=a.isSelected()?de(xt([a],i)):[a],p=[],d=function(e){var n=e.label,o=e.icon,i=e.onClick,a=e.subMenu,l=e.separator;r.getSvg(o);p.push({name:n,action:function(){s&&s.log("Grids - Table Action",{action:e.key,numOfItems:c.length,from:s.eventOrigin||"Context Menu"}),i&&i(c)},icon:'<span class="da-grid-icon pointer context-item-icon '+o+'-icon">'+r.getSvg(o)+"</span>",subMenu:a?Lr(mt(mt({},t),{toolbarActions:a})):null}),l&&p.push("separator")};try{for(var u=wt(l),h=u.next();!h.done;h=u.next()){d(h.value)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return p}(mr=t.OperatorTypes||(t.OperatorTypes={})).AND="AND",mr.OR="OR",(yr=t.GridActionType||(t.GridActionType={})).CUSTOM="CUSTOM",yr.CREATE="CREATE",yr.EXPORT="EXPORT",(vr=t.RowSelectionTypeV2||(t.RowSelectionTypeV2={}))[vr.SINGLE=0]="SINGLE",vr[vr.MULTI=1]="MULTI",vr[vr.ANY=2]="ANY",vr[vr.ALWAYS=3]="ALWAYS";var Nr,Fr,Gr,Vr,zr=new e.InjectionToken("DATO_GRID_STORAGE_AP"),Br=function(t,e){return t&&t.value?'<div class="value-wrapper ellipsis">'+Hr(t,e)+"</div>":null},Hr=function(t,e){e=(e||"").trim();var n=(t.valueFormatted||t.value||"").toString();return e?n.replace(new RegExp(e,"gi"),(function(t){return'<span class="search-highlight">'+t+"</span>"})):n};(Nr=t.GridMinWidths||(t.GridMinWidths={}))[Nr.Default=107]="Default",Nr[Nr.With_Info=131]="With_Info",(Fr=t.DatoGridColumnTypes||(t.DatoGridColumnTypes={})).String="String",Fr.Number="Number",Fr.Date="Date",Fr.Status="Status",Fr.Items="Items",Fr.ItemsCount="ItemsCount",Fr.Initials="Initials",Fr.Avatar="Avatar",(Gr=t.GridRowSelectionType||(t.GridRowSelectionType={})).SINGLE="single",Gr.MULTIPLE="multiple",(Vr=t.GridStatusColumnTypes||(t.GridStatusColumnTypes={})).SUCCESS="SUCCESS",Vr.FAILURE="FAILURE",Vr.IN_PROGRESS="IN_PROGRESS",Vr.PENDING="PENDING",Vr.WAITING="WAITING";
283
283
  /**
284
284
  * @license
285
285
  * Copyright Datorama. All Rights Reserved.
@@ -323,7 +323,7 @@ var ea,na=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
323
323
  *
324
324
  * Use of this source code is governed by an Apache License 2.0 license that can be
325
325
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
326
- */var da,ua=function(t){return t.value},ha=function(t){return{id:t,label:Lt(t)?"(Empty)":(""+t).trim(),value:t}},ga=function(t,e){var n=t.value,o=t.formattedValue;return{id:e&&n?n[e]:n,label:Lt(o)?"(Empty)":(""+(e?o[e]:o)).trim(),value:e&&n?n[e]:n}},fa=function(){function a(e,n,i,r,a){var s,l=this;this.host=e,this.popover=n,this.fb=i,this.translate=r,this.cdr=a,this.gridFilterTypes=t.DatoGridFilterTypes,this.columnValues=[],this.listOptions=[],this.filterSections=((s={})[t.DatoGridFilterSections.By_Value]=!0,s[t.DatoGridFilterSections.Conditional]=!0,s),this.rangeOperand=t.DatoFilterConditions.IN_RANGE,this.isClientSideGrid=!1,this.listSearchControl=new o.FormControl,this.loadingList=!1,this.serverSearchErrored=!1,this.applyHotKeyConfig={keys:"meta.enter",handler:function(){return l.closePopUp()},description:"core.apply-filters"},this.hotKeyTooltip=pa(this.applyHotKeyConfig.keys),this.activeAccordionId=0,this.showClearFiltersButton=!0,this.excludedValues=new Set}return Object.defineProperty(a.prototype,"operatorToggler",{set:function(t){t&&this.inputConditionsOperator&&(t.forEach((function(t){t.isDisabled||t.setDisabledState(!0)})),this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"byValueControl",{get:function(){return this.filterForm.get("byValue")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditionsControls",{get:function(){return this.conditions.controls},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditionsOperator",{get:function(){return this.filterForm.get("conditional.operator").value},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultOperand",{get:function(){return this.fb.group({type:[this.conditionalFilterOptions[0]],value:[null,o.Validators.required],rangeEnd:[null]})},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isPredefinedListItems",{get:function(){var t=this.colDef.filtersConfig,e=void 0===t?{}:t;return e.predefinedListValues&&"object"==typeof e.predefinedListValues[0]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultConditional",{get:function(){return this.fb.group({operator:[this.inputConditionsOperator||t.OperatorTypes.AND],conditions:this.fb.array([this.defaultOperand])})},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultByValue",{get:function(){return[this.columnValues]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultForm",{get:function(){var t={};return this.filterSections.By_Value&&(t.byValue=this.defaultByValue),this.filterSections.Conditional&&(t.conditional=this.defaultConditional),this.fb.group(t)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditions",{get:function(){return this.filterForm.get("conditional.conditions")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"colFilter",{get:function(){var t=this.gridQuery.getFilter()[this.colField];return t&&he(this.pivotKeys,t.pivotKeys)?t:null},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"colDef",{get:function(){return this.popover.data.column.getColDef()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pivotKeys",{get:function(){return this.colDef.pivotKeys||[]},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){var e,n=this,o=this.popover.data,a=o.gridService,s=o.gridQuery,l=this.colDef,c=l.filter,p=l.pivotValueColumn,d=l.pivotKeys,u=s.api.columns.getAllColumns().map((function(t){return t.getColDef()}));this.colField=cr(this.colDef);var h,g=u.find((function(t){return t.field===n.colField})),f=g.filtersConfig||this.colDef.filtersConfig||{},m=c||g.filter,y=Sr[m];if(this.pivotColumn=s.api.columns.getSecondaryPivotColumn(d,p),this.inputConditionsOperator=f.inputConditionsOperator,Lt(f.showClearFiltersButton)||(this.showClearFiltersButton=f.showClearFiltersButton),f.sections&&(this.filterSections=((e={})[f.sections]=!0,e)),this.keepPredefinedListOriginalOrder=f.keepPredefinedListOriginalOrder&&!kt(f.predefinedListValues),this.filterType=y?m:t.DatoGridFilterTypes.String,this.listLabelType=this.filterType.toLowerCase(),this.listSortByKey=this.filterType===t.DatoGridFilterTypes.Number&&this.colDef.valueFormatter?"id":"label",this.gridQuery=s,this.gridService=a,this.hasFilter$=this.gridQuery.select((function(t){return t.settings.filter[n.colField]})).pipe(r.map((function(t){return!Lt(t)&&he(t.pivotKeys,n.pivotKeys)}))),this.filterSections.Conditional){var v=y||Cr;if(f.showEmptyConditions){var b=[t.DatoFilterConditions.IS_EMPTY,t.DatoFilterConditions.NOT_EMPTY];this.filterType===t.DatoGridFilterTypes.Number&&(b=[t.DatoFilterConditions.IS_NULL,t.DatoFilterConditions.NOT_NULL]),v=xt(v,b)}this.conditionalFilterOptions=v.map((function(e,o){return{id:o,operand:e,label:n.translate.transform("core."+(n.filterType===t.DatoGridFilterTypes.Date?"DATE_":"")+e)}}))}if(this.filterSections.By_Value){var C=f.predefinedListValues;if(this.isClientSideGrid=!Lt(C)||!s.isServerSide,!C||this.isStringArray(C)){if(S=C)this.columnValues=S,this.listOptions=S.map(ha);else{var w=this.getColumnValues().filter((function(t){return!Lt(t.value)}));this.columnValues=w.map((function(t){var e=t.value;return!Lt(n.pivotColumn)&&e?e[n.colField]:e})),this.listOptions=w.map((function(t){return ga(t,!Lt(n.pivotColumn)&&n.colField)}))}}else{var S=C;this.columnValues=S.map(ua),this.listOptions=S}h=this.listOptions,this.isClientSideGrid||this.listSearchControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(t){n.serverSearchErrored=!1,""===t.trim()?(n.loadingList=!1,n.listOptions=h,n.patchAndReRegister(n.columnValues),n.cdr.detectChanges()):n.getValuesFromServer(t)}))}this.initForm()},a.prototype.closePopUp=function(){this.applyFilters(),this.popover.close()},a.prototype.applyFilters=function(){if(this.filterForm.valid&&this.filterForm.updateValueAndValidity(),this.filterForm.dirty&&(this.filterForm.valid||this.filterForm.get("conditional").pristine)){var t=this.popover.data.column,e=this.buildFilter();kt(e)?this.gridService.clearColumnFilter(this.colField):this.gridService.setColumnFilter(t,e),this.gridService.notifyFilterUpdate()}},a.prototype.clearFilters=function(){this.gridService.clearColumnFilter(this.colField),this.resetForm()},a.prototype.removeCondition=function(t){this.conditions.removeAt(t),this.filterForm.markAsDirty()},a.prototype.addCondition=function(){this.filterForm.markAsPristine(),this.conditions.push(this.defaultOperand)},a.prototype.getOperandType=function(t){var e=this.conditions.at(t).value.type;return e?e.operand:null},a.prototype.isConditionalEmpty=function(t){var e=t&&t.value&&t.value.type?t.value.type.operand:null;return this.isEmptyOperand(e)},a.prototype.ngOnDestroy=function(){this.byValueSubscription&&this.byValueSubscription.unsubscribe()},a.prototype.getByValueExcludeValues=function(t,e){var n;if(void 0===e&&(e=!1),this.isPredefinedListItems){var o=this.colDef.filtersConfig.predefinedListValues;n=new Set(t.map((function(t){return o.find((function(e){return e.value===t})).id})))}else n=new Set(t.map((function(t){return Pt(t)?t.value:t})));return e?this.listOptions.filter((function(t){var e=t.value;return!n.has(e)})):this.columnValues.filter((function(t){return!n.has(t)}))},a.prototype.buildFilter=function(){var t=this,e=this.filterForm.value,n=e.byValue,o=e.conditional,i={};return this.filterSections.Conditional&&this.setConditionalFilter(i,o),this.filterSections.By_Value&&this.setByValueFilter(i,n),(i.byValue||i.conditional)&&(i.colId=this.colDef.colId,i.pivotKeys=this.pivotKeys,this.pivotColumn&&(i.pivotFieldsMap=this.getPivotFields(this.pivotColumn.getParent()).reduce((function(e,n,o){return t.pivotKeys[o]&&(e[n]=t.pivotKeys[o]),e}),{}))),i},a.prototype.initForm=function(){var t=this.colFilter;this.filterForm=t?this.buildFormFromFilter(t):this.defaultForm,this.registerOperandListeners(),!this.isClientSideGrid&&this.filterSections.By_Value&&this.registerByValueListener()},a.prototype.buildFormFromFilter=function(t){var e={};return this.filterSections.Conditional&&(e.conditional=this.buildConditionalFilter(t.conditional)),this.filterSections.By_Value&&(e.byValue=this.buildByValueFilter(t.byValue)),this.fb.group(e)},a.prototype.resetForm=function(){this.filterForm.setErrors(null);var e={};if(this.filterSections.By_Value&&(e={byValue:this.columnValues}),this.filterSections.Conditional){e=mt(mt({},e),{conditional:{operator:t.OperatorTypes.AND,conditions:[{type:this.conditionalFilterOptions[0],value:null,rangeEnd:null}]}});var n=this.filterForm.controls.conditional;n.removeControl("conditions"),n.addControl("conditions",this.fb.array([this.defaultOperand]))}this.filterForm.reset(e,{emitEvent:!1}),this.filterForm.updateValueAndValidity()},a.prototype.getColumnValues=function(){var e,n=[],o=this.colFilter,i={},r=o&&o.byValue&&o.byValue.condition,a=this.gridQuery.api.grid,s=ve(this.getValueAndFormattedValue)(this.colField,a,this.colDef.valueFormatter);if(this.isClientSideGrid)a.forEachNodeAfterFilterAndSort((function(t){n.push(s(t)),i[t.id]=!0}));else{var l=a.paginationGetPageSize(),c=l*a.paginationGetCurrentPage(),p=c+l;a.forEachNode((function(t){var e=t.rowIndex;e>=c&&e<p&&n.push(s(t))}))}if(r)if(r===t.DatoFilterConditions.NOT_IN_LIST){var d=this.colDef.valueFormatter,u=o.byValue.values.map((function(t){return{value:t,formattedValue:d?d({value:t}):t}}));n=n.concat(u)}else{var h=this.colFilter.conditional,g=mt(mt({},this.gridQuery.getFilter()),((e={})[this.colField]={conditional:h},e));a.forEachLeafNode((function(t){!i.hasOwnProperty(t.id)&&Er({row:t,api:a},g)&&n.push(s(t))}))}return ue(n,"value")},a.prototype.getValueAndFormattedValue=function(t,e,n,o){var i=e.getValue(t,o);return{value:i,formattedValue:n?n({value:i}):i}},a.prototype.setConditionalFilter=function(e,n){var o=this,i=n.operator,r=n.conditions;r.filter((function(t){var e=t.value,n=t.type;return!Lt(e)||o.isEmptyOperand(n.operand)})).length&&(e.conditional={type:this.colDef.filter||t.DatoGridFilterTypes.String,operator:i,conditions:r.map((function(e){var n=e.value,i=e.type,r=e.rangeEnd,a={condition:i.operand,value:n};if(i.operand===t.DatoFilterConditions.IN_RANGE){var s=mt(mt({},a),{rangeEnd:r});if(o.filterType===t.DatoGridFilterTypes.Date){var l=n,c=l.from,p=l.to;s={condition:i.operand,value:c,rangeEnd:p}}return s}return a}))})},a.prototype.setByValueFilter=function(e,n){if(this.isClientSideGrid){var o=this.columnValues.length;if(n.length!==o){var i=n.length<o/2?t.DatoFilterConditions.IN_LIST:t.DatoFilterConditions.NOT_IN_LIST;e.byValue={condition:i,values:i===t.DatoFilterConditions.IN_LIST?n:this.getByValueExcludeValues(n)}}}else{var r=Array.from(this.excludedValues.values());r.length>0&&(e.byValue={condition:t.DatoFilterConditions.NOT_IN_LIST,values:r})}},a.prototype.buildByValueFilter=function(e){return e?(e.values.length&&this.filterSections.Conditional&&(this.activeAccordionId=1),e.condition===t.DatoFilterConditions.NOT_IN_LIST?(this.isClientSideGrid||(this.excludedValues=new Set(e.values)),[this.getByValueExcludeValues(e.values)]):[e.values]):this.defaultByValue},a.prototype.buildConditionalFilter=function(t){return t?this.fb.group({operator:[this.inputConditionsOperator||t.operator],conditions:this.fb.array(this.buildConditions(t.conditions))}):this.defaultConditional},a.prototype.buildConditions=function(t){var e=this;return t.map((function(t){var n=t.condition,i=t.value,r={type:[{id:e.conditionalFilterOptions.findIndex((function(t){return t.operand===n})),operand:n,label:"core."+n}],value:[i,o.Validators.required],rangeEnd:null};return xr(t)&&(r.rangeEnd=[t.rangeEnd,o.Validators.required],r.value=[{from:t.value,to:t.rangeEnd},o.Validators.required]),e.fb.group(r)}))},a.prototype.registerOperandListeners=function(){var e=this;this.conditions&&this.conditions.valueChanges.pipe(r.startWith(this.conditions.length),r.map((function(){return e.conditions.length})),r.distinctUntilChanged(),r.switchMap((function(){var t=e.conditions.controls.map((function(t,e){return t.get("type").valueChanges.pipe(r.map((function(t){return{value:t,index:e}})))}));return n.merge.apply(void 0,xt(t))})),i.untilDestroyed(this)).subscribe((function(n){var o=n.value.operand,i=n.index,r={index:i,inRange:o===t.DatoFilterConditions.IN_RANGE};e.filterType===t.DatoGridFilterTypes.Date?e.updateDateInput(r):e.filterType===t.DatoGridFilterTypes.Number&&e.updateNumberInput(r),e.updateValueControlValidator(o,i)}))},a.prototype.updateDateInput=function(t){var e=t.inRange,n=t.index,o=this.conditions.at(n).get("value");if(o.dirty){var i=o.value,r=e?{from:i,to:i}:i.from;o.patchValue(r)}},a.prototype.updateNumberInput=function(t){var e=t.inRange,n=t.index,i=e?o.Validators.required:null,r=this.conditions.at(n).get("rangeEnd");r.setValidators(i),r.updateValueAndValidity()},a.prototype.updateValueControlValidator=function(t,e){var n=this.isEmptyOperand(t)?null:o.Validators.required,i=this.conditions.at(e).get("value");i.setValidators(n),i.updateValueAndValidity()},a.prototype.isEmptyOperand=function(e){return e===t.DatoFilterConditions.IS_EMPTY||e===t.DatoFilterConditions.NOT_EMPTY||e===t.DatoFilterConditions.IS_NULL||e===t.DatoFilterConditions.NOT_NULL},a.prototype.isStringArray=function(t){return Mt(t[0])},a.prototype.getValuesFromServer=function(e){var n,o=this;this.loadingList=!0,this.listOptions=[];var i={failCallback:function(){o.loadingList=!1,o.serverSearchErrored=!0,o.listOptions=[],o.cdr.detectChanges()},successCallback:function(t){o.loadingList=!1;var e=t.map((function(t){return t[o.colField]}));o.listOptions=e.map(ha),o.patchAndReRegister(e),o.cdr.detectChanges()},serverConfig:{pageSize:30,pageNumber:1,columnFilters:(n={},n[this.colField]={operator:t.OperatorTypes.AND,filters:[{condition:t.DatoFilterConditions.CONTAINS,value:e}]},n),sort:[],columnsToReturn:[this.colField],distinctResults:!0}};this.gridService._originalGetRows(i),this.cdr.detectChanges()},a.prototype.patchAndReRegister=function(t){this.byValueSubscription.unsubscribe(),this.byValueControl.patchValue(this.getNonExcludedValues(t)),this.registerByValueListener()},a.prototype.registerByValueListener=function(){var t=this,e=this.byValueControl;this.byValueSubscription=e.valueChanges.pipe(r.startWith(e.value),r.pairwise()).subscribe((function(e){var n=St(e,2),o=n[0],i=n[1],r=i.length<o.length;(r?le(o,i):le(i,o)).forEach((function(e){return r?t.excludedValues.add(e):t.excludedValues.delete(e)}))}))},a.prototype.getNonExcludedValues=function(t){var e=this;return t.filter((function(t){return!e.excludedValues.has(t)}))},a.prototype.getPivotFields=function(t,e){void 0===e&&(e=[]);var n=t.getParent(),o=t.getOriginalColumnGroup().getColGroupDef().headerClass;return n&&this.getPivotFields(n,e),o&&e.push(o[0]),e},a.ctorParameters=function(){return[{type:e.ElementRef},{type:oa},{type:o.FormBuilder},{type:_n},{type:e.ChangeDetectorRef}]},vt([e.ViewChildren("operatorToggler"),Ct("design:type",e.QueryList),Ct("design:paramtypes",[e.QueryList])],a.prototype,"operatorToggler",null),a=vt([e.Component({selector:"dato-grid-filter",template:'<form class="container primary-0-background-color" [formGroup]="filterForm" datoForm\n *datoSubscribe="hasFilter$ as hasFilter">\n <ng-container>\n <dato-accordion closeOthers="true" class="filter-options" [activeIds]="activeAccordionId">\n <ng-container *ngIf="filterSections.Conditional">\n\n <dato-accordion-group>\n <dato-accordion-header class="dato-note-bold primary-600-color" data-auto-id="conditional-filters"\n [class.primary-100-background-color]="header_1.isOpen" #header_1>\n <div class="px-10 d-flex align-start-center">\n <div class="filter-title d-flex-grow d-flex align-start-center">{{\'core.filterByCondition\' | translate}}</div>\n <dato-icon class="primary-200-color" height="18px"\n [icon]="header_1.isOpen ? \'collapse\' : \'expand\'"></dato-icon>\n </div>\n </dato-accordion-header>\n <dato-accordion-content #conditionalContent>\n <div class="conditional-content-container d-flex-column" formGroupName="conditional"\n [class.multi-conditions]="conditionsControls.length > 1">\n <div class="operand d-flex-column mb-10"\n [attr.data-auto-id]="\'condition-\' + i"\n *ngFor="let operand of conditionsControls; index as i; last as last">\n <div class="d-flex">\n <div class="d-flex-column d-flex-grow min-width-0">\n <ng-container formArrayName="conditions">\n\n <ng-container [formGroupName]="i">\n <dato-select datoSize="sm" class="mb-10" [attr.data-auto-id]="\'condition-\' + i + \'-operand\'" formControlName="type"\n datoSelectClass="operand-select"\n [dataSet]="conditionalFilterOptions"\n [isCombo]="false" #select>\n <dato-option *ngFor="let option of select.data; index as index"\n [option]="option">\n {{ option.label }}\n </dato-option>\n </dato-select>\n <ng-container [ngSwitch]="filterType">\n <div class="d-flex" *ngSwitchCase="gridFilterTypes.Date">\n <dato-date-picker [attr.data-auto-id]="\'condition-date-\' + i + \'-value\'"\n formControlName="value" class="d-flex-grow range-calendar">\n <ng-template>\n <dato-date-picker-range *ngIf="getOperandType(i) === rangeOperand; else singleDate"></dato-date-picker-range>\n <ng-template #singleDate>\n <dato-date-picker-single></dato-date-picker-single>\n </ng-template>\n </ng-template>\n </dato-date-picker>\n </div>\n <ng-container *ngIf="!isConditionalEmpty(operand)">\n <dato-input *ngSwitchCase="gridFilterTypes.String" datoSize="sm"\n (keydown.enter.stop.prevent)="closePopUp()"\n datoControlErrors [attr.data-auto-id]="\'condition-string-\' + i + \'-value\'"\n [datoControlErrorsOnBlur]="false"\n class="condition-value"\n placeholder="core.filter" formControlName="value"\n [isFocused]="conditionalContent._expanded"\n ></dato-input>\n <div class="d-flex" *ngSwitchCase="gridFilterTypes.Number">\n <dato-input-number (keydown.enter.stop.prevent)="closePopUp()" [showControls]="false"\n class="width-100 condition-value" allowNegative="true">\n <input type="number" formControlName="value" [attr.data-auto-id]="\'condition-number-\' + i + \'-value\'"\n datoInputNumber datoSize="sm" datoControlErrors [datoAutoFocus]="conditionalContent._expanded"\n [datoControlErrorsOnBlur]="false"/>\n </dato-input-number>\n <ng-container *ngIf="getOperandType(i) === rangeOperand">\n <div class="mx-5">-</div>\n <dato-input-number (keydown.enter.stop.prevent)="closePopUp()"\n class="width-100 condition-value" allowNegative="true">\n <input type="number" formControlName="rangeEnd" [attr.data-auto-id]="\'condition-number-\' + i + \'-range-end\'"\n datoInputNumber datoSize="sm" datoControlErrors\n [datoControlErrorsOnBlur]="false"/>\n </dato-input-number>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div>\n\n <dato-icon-button datoSize="md"\n datoType="none" icon="trash"\n class="overflow-hidden delete"\n datoTooltip="core.deleteFilterCondition"\n [attr.data-auto-id]="\'condition-\' + i + \'-remove\'"\n (click)="removeCondition(i)"\n datoTooltipPosition="right-start"></dato-icon-button>\n </div>\n </div>\n <dato-operator-toggler class="mt-10 justify-center width-100 d-flex" data-auto-id="operator-toggler"\n expanded="true" [datoTogglerValue]="conditionsOperator"\n *ngIf="conditionsControls.length > 1 && !last"\n formControlName="operator" #operatorToggler></dato-operator-toggler>\n </div>\n <div class="d-flex align-center">\n <dato-link *ngIf="conditionsControls.length < 3" class="no-select" datoSize="sm" data-auto-id="add-condition"\n datoType="secondary" (click)="addCondition()">\n <dato-icon height="10px" width="10px" icon="plus-simple"></dato-icon>\n {{ \'core.condition\' | translate }}\n </dato-link>\n </div>\n </div>\n </dato-accordion-content>\n </dato-accordion-group>\n <div class="separator"></div>\n </ng-container>\n <ng-container *ngIf="filterSections.By_Value">\n <dato-accordion-group class="list-content">\n <dato-accordion-header class="dato-note-bold primary-600-color" data-auto-id="by-value-filters"\n [class.primary-100-background-color]="header_2.isOpen" #header_2>\n <div class="px-10 d-flex align-start-center">\n <div class="filter-title d-flex d-flex-grow align-start-center">{{\'core.filterByValue\' | translate}}</div>\n <dato-icon class="primary-200-color" height="18px"\n [icon]="header_2.isOpen ? \'collapse\' : \'expand\'"></dato-icon>\n </div>\n </dato-accordion-header>\n <dato-accordion-content #byValueContent>\n <div class="value-content-container d-flex-column">\n <dato-input datoSize="sm" placeholder="core.search-all-values" [debounceTime]="300" #search [formControl]="listSearchControl" [isFocused]="byValueContent._expanded"></dato-input>\n <dato-list-v2 class="primary-0-background-color"\n containerHeight="195px"\n [withSelectAll]="true"\n [clientSearch]="isClientSideGrid"\n [sortByKey]="listSortByKey"\n [labelType]="listLabelType"\n [searchController]="search"\n [options]="listOptions"\n [isSortList]="!keepPredefinedListOriginalOrder"\n [loading]="loadingList"\n [noDataTpl]="isClientSideGrid ? null : noData"\n formControlName="byValue"\n data-auto-id="by-value-filters-list">\n </dato-list-v2>\n <ng-template #noData>\n <div *ngIf="serverSearchErrored; else noResults" class="mb-10 d-flex-1 d-flex-column align-center" data-auto-id="by-value-server-error">\n <img class="mt-20" datoStaticSrc="core/grid/filter-server-error.svg"/>\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ \'core.something-went-wrong\' | translate }}</p>\n <p class="dato-note-italic primary-300-color">{{ \'core.try-again-later\' | translate }}</p>\n </div>\n <ng-template #noResults>\n <dato-list-no-result class="mb-10 block" data-auto-id="by-value-no-results"></dato-list-no-result>\n </ng-template>\n </ng-template>\n </div>\n </dato-accordion-content>\n </dato-accordion-group>\n <div class="separator"></div>\n </ng-container>\n </dato-accordion>\n </ng-container>\n <div class="actions no-select px-10 py-12 d-flex align-end-center">\n <dato-link *ngIf="showClearFiltersButton" class="mr-30" datoType="secondary" datoSize="sm"\n (click)="clearFilters()" data-auto-id="clear-filters" [disabled]="!hasFilter">\n {{ \'core.clearFilters\' | translate }}\n </dato-link>\n <dato-button datoSize="sm" [datoTooltip]="hotKeyTooltip" [datoHotkeys]="applyHotKeyConfig" (click)="closePopUp()" data-auto-id="apply-filters">{{\'core.apply\' | translate}}</dato-button>\n </div>\n</form>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host dato-accordion-header{transition:background-color .2s ease-in-out}:host>.container{width:242px}:host .value-content-container dato-input{padding:10px}:host .conditional-content-container{padding:10px;transition:padding-right .2s ease-in-out}:host .conditional-content-container.multi-conditions{padding-right:0}:host .conditional-content-container.multi-conditions .delete{width:24px}:host .filter-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:40px;transition:color .2s ease-in-out}:host .separator{height:1px;width:100%}:host .delete{transition:width .2s ease-in-out;width:0}"]}),Ct("design:paramtypes",[e.ElementRef,oa,o.FormBuilder,_n,e.ChangeDetectorRef])],a)}(),ma=function(){function t(t){this.popover=t}return t.prototype.openMoreMenu=function(t,e,n){return void 0===n&&(n=sa),this.openMenu({tpl:n,origin:t,params:e,menuType:"more"})},t.prototype.openFilterMenu=function(t,e,n){return void 0===n&&(n=fa),this.openMenu({tpl:n,origin:t,params:e,menuType:"filter"})},t.prototype.popoverConfig=function(t,e){return{popper:{placement:"bottom-end"},className:e,data:{api:{grid:t.api,columns:t.columnApi},column:t.column,gridQuery:t.gridQuery,gridService:t.gridService}}},t.prototype.openMenu=function(t){var e=t.tpl,n=t.origin,o=t.params,i=t.menuType;return o.api.hidePopupMenu(),this.popover.open(e,n,this.popoverConfig(o,"dato-grid-"+i+"-menu"))},t.ctorParameters=function(){return[{type:ra}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(ra))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[ra])],t)}(),ya=function(){function o(t,e,n,o){this.vcr=t,this.controller=e,this.host=n,this.cdr=o,this.moreMenuOpen=!1,this.filtersMenuOpen=!1}return o.prototype.afterGuiAttached=function(t){},o.prototype.agInit=function(e){var o=this;this.params=e,this.column=e.column;var a=e.column.getColDef();this.headerInfo=a.info,this.headerName=a.headerName,this.showFilter=a.filter!==t.DatoGridFilterTypes.None,this.showMoreMenu=Lt(a.moreMenuActions)||a.moreMenuActions.length>0,this.field=cr(a),this.headerTooltip=this.getHeaderTooltip(a),this.context={api:{grid:e.api,columns:e.columnApi},column:this.column};var s=this.params,l=s.gridQuery,c=s.gridService;this.customTemplates=c.getCustomHeader(this.field),this.filterActive$=l.select((function(t){return t.settings.filter[o.field]})).pipe(r.map((function(t){var e=t&&he(t.pivotKeys,a.pivotKeys);return ye(t)>0&&e}))),this.params.enableSorting&&(n.fromEvent(this.host.nativeElement,"click").pipe(i.untilDestroyed(this)).subscribe((function(){var t,e=o.column.getColDef()?o.column.getColDef().sortingOrder:null,n=o.column.getSort(),i=o.column.getColId();if(e&&e.length>0){var r=e.indexOf(n);t=e[-1===r||r===e.length-1?0:r+1]}else t="asc"!==n?"asc":"desc";c._logEvent("Grids - Column Action",{action:"Sort",column:i}),l.isServerSide&&c.setLoading(!0),l.getGridOptions().sortByStore?c.setSortByColumn(i,t):o.params.setSort(t)})),this.sortingInfo$=l.waitForGrid((function(){return l.gridRef.sortChanged})).pipe(r.startWith({}),r.map((function(){return{active:o.column.isSorting(),icon:!o.column.isSorting()||o.column.isSortAscending()?"sort-ascending":"sort-descending"}}))))},o.prototype.openFilters=function(t){var e=this;this.filtersMenuOpen=!0,this.controller.openFilterMenu(t.host.nativeElement,this.params).pipe(i.untilDestroyed(this)).subscribe((function(){e.filtersMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.openMoreMenu=function(t){var e=this;this.moreMenuOpen=!0,this.controller.openMoreMenu(t.host.nativeElement,this.params,this.customTemplates.moreMenu).pipe(i.untilDestroyed(this)).subscribe((function(){e.moreMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.ngOnDestroy=function(){},o.prototype.getHeaderTooltip=function(t){if(this.params){var e=t;if(e.showRowGroup){var n=this.params.columnApi.getRowGroupColumns(),o=n&&n.find((function(t){return t.getColId()===e.showRowGroup})),i=o&&o.getColDef();e=i||e}return e.customHeaderTooltip||e.headerName}return""},o.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:ma},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},o=vt([e.Component({selector:"dato-grid-column-header",template:'<div class="d-flex align-start-center" [attr.data-auto-id]="field + \'-column-header\'" [attr.data-field]="field">\n <ng-container *ngIf="customTemplates && customTemplates.customHeader as customHeader">\n <div class="mr-5" [attr.data-auto-id]="field + \'-dynamic-section\'">\n <ng-container *ngTemplateOutlet="customHeader; context: context"></ng-container>\n </div>\n </ng-container>\n <div class="d-flex d-flex-grow align-start-center min-width-0 items-center">\n <span class="dato-simple-bold primary-400-color ellipsis min-width-0 mr-5" [datoTooltip]="headerTooltip"\n datoTooltipPosition="bottom">{{headerName}}</span>\n <div>\n <dato-icon class="primary-300-color" *ngIf="headerInfo" [datoTooltip]="headerInfo" datoTooltipPosition="bottom" datoIcon="question"></dato-icon>\n </div>\n </div>\n <div class="sort-icon opacity-0" *ngIf="params.enableSorting && (sortingInfo$ | async) as sortingInfo"\n [class.active]="sortingInfo.active">\n <dato-icon width="24px" height="16px" class="primary-300-color"\n [attr.data-auto-id]="field + \'-sort\'"\n [icon]="sortingInfo.icon"></dato-icon>\n </div>\n <ng-container *ngIf="showFilter">\n <div class="filter relative" *datoSubscribe="filterActive$ as filterActive">\n <dato-icon-button (click.stop)="openFilters(filters)" datoTooltip="core.filters" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-filter\'" class="filter-icon opacity-0"\n [class.active]="filtersMenuOpen || filterActive"\n datoSize="md" icon="filter"\n #filters></dato-icon-button>\n <div [class.opacity-100]="filterActive"\n class="opacity-0 filter-active-circle accent-400-background-color absolute"></div>\n </div>\n </ng-container>\n <dato-icon-button *ngIf="showMoreMenu" (click.stop)="openMoreMenu(moreMenu)" datoTooltip="core.more-options" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-more-menu\'" [class.active]="moreMenuOpen"\n datoSize="md" icon="more-vertical" #moreMenu></dato-icon-button>\n</div>\n',styles:[":host .filter-icon,:host .sort-icon{transition:opacity .25s linear,width .25s ease-in-out;width:0}:host .sort-icon{height:16px}:host .filter-icon.active,:host .sort-icon.active{opacity:1;width:24px}:host:hover .filter-icon,:host:hover .sort-icon{opacity:1;width:24px}:host .filter-active-circle{pointer-events:none;transition:opacity .2s ease-in-out;position:absolute;height:8px;width:8px;top:2px;right:2px;border-radius:4px;border:1px solid #fff}:host ::ng-deep .filter dato-icon-button dato-icon{transition:color .2s ease-in-out}"]}),Ct("design:paramtypes",[e.ViewContainerRef,ma,e.ElementRef,e.ChangeDetectorRef])],o)}();function va(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}var ba=function(t){return t[Ia]},Ca={getDataPath:ba,components:{fileCellRenderer:function(t){var e=t.data,n=t.eGridCell,o=t.colDef,i=e.icon,r=e.isFolder,a=e.initials,s=void 0===a||a,l=function(t,e,n){if(null===t)return null;var o=function(t,e){var n=e.expanded,o=e.collapsed;return t.parentElement.classList.contains("ag-row-group-expanded")?n:o};return void 0===t?n?o(e,{expanded:"folder-open",collapsed:"folder-closed"}):null:"string"==typeof t?t:o(e,t)}(i,n,r),c=e[o.field],p=o.gridService.svgRegistry;if(r&&Ra(t.node),l)return'<span class="dato-simple-bold"> <span class="da-grid-icon folder d-flex">'+p.getSvg(l)+'</span><span class="entity-display-name"></span> '+c+"</span>";if(r)return Ra(t),'<span class="entity-display-name dato-simple-bold">'+c+"</span>";if(s){var d=Ee(c);return d?'<span class="entity-display-name dato-simple-bold"><span class="initials">'+d+"</span>"+c+"</span>":'<span class="entity-display-name dato-simple-bold">'+c+"</span>"}return'<span class="entity-display-name dato-simple-bold">'+c+"</span>"}},onRowDragMove:function(t){var e,n=t.overNode,o=t.node;e=n?n.data.isFolder?n:n.parent:o.rowModel.rootNode;if(Ta){if(Ta.id===e.id)return;var i=Aa(Ta.id);i&&i.classList.remove("ag-row-hover"),Ta=null}else Ta=e;if(e){var r=Aa(e.id);r&&r.classList.add("ag-row-hover")}},onRowDragEnd:function(t){var e,n,o=t.overNode,i=t.node;o?(e=i.parent,n=o.data.isFolder?o:o.parent):(e=i.rowModel.rootNode,n=i.rowModel.rootNode);var r=i.data,a=i.gridOptionsWrapper.gridOptions.maxDepth||-1;if(r.isFolder&&-1!==a&&"ROOT_NODE_ID"!==e.id&&o.data.agGridFilePath.length>a)return;var s=n.data?n.data[Ia]:[],l=!jt(s,r[Ia]),c=function t(e,n){for(var o=e.childrenAfterGroup,i=0;i<o.length;i++){if(n&&o[i].key===n.key)return!0;t(o[i],n)}return!1}(i,n);c&&console.log("invalid move");if(l&&!c){var p=[],d=this.autoGroupColumnDef.gridService.treeConfig.idKey;!function t(e,n,o,i){var r=n.data,a=n.childrenAfterGroup,s=e.slice();r[Ia]=s,o.push(r),ye(a)>0&&a.forEach((function(e){t(xt(s,[r[i]]),e,o,i)}));r[Ia].push(r[i])}(s,i,p,d);var u=this.autoGroupColumnDef.gridService.updateRows(p);g=xt(u.update,[o,e]),f=["ag-row-level-1","ag-row-level-2","ag-row-level-3"],g.forEach((function(t){var e,n,o=document.querySelectorAll('[row-id="'+t.id+'"]')[1];if(o){try{for(var i=wt(f),r=i.next();!r.done;r=i.next()){var a=r.value;if(o.classList.contains(a)){o.classList.remove(a);break}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}o.classList.add("ag-row-level-"+t.level),t.data.isFolder&&Ra(t,o)}}));var h=Aa(Ta.id);h&&h.classList.remove("ag-row-hover"),Ta=null,this.api.clearFocusedCell()}var g,f},onRowSelected:function(t){if(Ea)return;Ea=!0,e=t.node,n=t.node.selected,e.allChildrenCount>0&&e.allLeafChildren.forEach((function(t){t.setSelected(n)})),function(t){var e=t.parent;for(;e&&"ROOT_NODE_ID"!==e.id;)Pa(e),e=e.parent}(t.node),setTimeout((function(){Ea=!1}),0);var e,n},onRowGroupOpened:function(t){var e=t.node;this.api.refreshCells({force:!0,rowNodes:[e]})},suppressRowClickSelection:!0,groupSelectsChildren:!0,icons:{rowDrag:'<dato-icon icon="drag" class="dato-icon-font-drag primary-400-color"></dato-icon>'}},wa=function(t,e){return(t||"").toLowerCase().localeCompare((e||"").toLowerCase())},Sa={filter:t.DatoGridFilterTypes.String,comparator:wa},xa=mt({hoverConfig:{enabled:!0,maxDisplayedItems:3},enableV2_1:!1,enableSearch:!1,enableSearchHighlight:!0,columnsIncludedInSearchByDefault:!0,includeHiddenColumnsInSearch:!1,enableAllPagesSelection:!0,idColumnKey:"id",enableBackground:!0,columnTypes:(da={},da[t.DatoGridColumnTypes.Date]={filter:t.DatoGridFilterTypes.Date,comparator:function(t,e){return va(t)-va(e)}},da[t.DatoGridColumnTypes.Number]={filter:t.DatoGridFilterTypes.Number},da[t.DatoGridColumnTypes.String]=Sa,da[t.DatoGridColumnTypes.Status]=mt(mt({},Sa),{cellRenderer:"DatoGridStatusCellComponent"}),da[t.DatoGridColumnTypes.Items]=mt(mt({},Sa),{cellRenderer:"DatoGridItemsCellComponent"}),da[t.DatoGridColumnTypes.ItemsCount]=mt(mt({},Sa),{cellRenderer:"DatoGridItemsCountCellComponent"}),da[t.DatoGridColumnTypes.Initials]=mt(mt({},Sa),{cellRenderer:"DatoGridInitialsCellComponent"}),da[t.DatoGridColumnTypes.Avatar]=mt(mt({},Sa),{cellRenderer:"DatoGridAvatarCellComponent"}),da),multiSortKey:"ctrl",suppressPaginationPanel:!0,pagination:!0,deltaColumnMode:!0,loadingOverlayComponentFramework:Ur,noRowsOverlayComponentFramework:Yr,defaultColDef:{minWidth:t.GridMinWidths.Default,sortable:!0,resizable:!0,type:t.DatoGridColumnTypes.String,menuTabs:["filterMenuTab"],headerComponentFramework:ya},suppressCellSelection:!0,suppressPropertyNamesCheck:!0,rowHeight:35,headerHeight:30,rowSelection:t.GridRowSelectionType.MULTIPLE,rowDeselection:!0,unSortIcon:!0,animateRows:!0,rememberGroupStateWhenNewData:!0,groupMultiAutoColumn:!0,groupDefaultExpanded:-1,usePivotGridStyle:!1},Ii()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),Oa={CLIENT:200,SERVER:250},Da={idKey:"id",parentIDKey:"parentID"},Ia="agGridFilePath";var Ta=null,Ea=!1;function Aa(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function Ra(t,e){var n=e||document.querySelectorAll('[row-id="'+t.id+'"]')[0];n&&(0===ye(t.childrenAfterGroup)?n.classList.add("ag-empty-folder"):n.classList.remove("ag-empty-folder"))}function Pa(t){var e=t.allLeafChildren.map((function(t){return t.selected}));if(!e.every((function(t){return!0===t||void 0===t}))){e.shift();var n=e.reduce((function(t,e){if(t===e)return t}));t.selectThisNode(n)}}function ka(t,e){var n=e.parentIDKey,o=e.idKey,i=function(e,r){void 0===r&&(r=!1);var a=r?[e[o]]:[],s=t.find((function(t){return t[o]===e[n]}));if(a.unshift(s[o]),s[n]){var l=i(s);a.unshift.apply(a,xt(l))}return a};return t.map((function(t){var e,r;return t[n]?mt(mt({},t),((e={})[Ia]=i(t,!0),e)):mt(mt({},t),((r={})[Ia]=[t[o]],r))}))}function _a(t,e){return t.map((function(t){var n,o=yt(t,[]),i=o[Ia],r=ye(i)>1?i[i.length-2]:0;return delete o[Ia],mt(mt({},o),((n={})[e.parentIDKey]=r,n))}))}var ja=new e.InjectionToken("DATO_CORE_LOGGER"),Ma=function(){function t(t,e,n){this.gridService=t,this.gridQuery=e,this.cdr=n,this.checkboxControl=new o.FormControl(!1)}return t.prototype.agInit=function(t){var e=this;this.gridApi=t.api,this.gridOptions=this.gridQuery.getGridOptions(),this.subscribeRowsSelectionData(),this.checkboxControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(t){e.toggleMultiSelection(t)}))},t.prototype.subscribeRowsSelectionData=function(){var t=this;this.gridQuery.gridReady$.pipe(r.take(1),r.switchMap((function(){return t.gridQuery.rowsSelectionData$})),i.untilDestroyed(this)).subscribe((function(e){var n=e.selectedPageRowsCount,o=e.isAllPageRowsSelected;t.indeterminatelyChecked=n>0&&!o,t.checkboxControl.patchValue(o,{emitEvent:!1}),t.cdr.detectChanges()}))},t.prototype.toggleMultiSelection=function(t){if(this.gridService.selectAllCurrentPageRows(t),!t&&this.gridQuery.isServerSelectAllRowsEnabled){var e=this.gridQuery.serverSideConfig,n=e.excludedFromSelectAll,o=e.totalRows,i=de(xt(n,this.gridQuery.getCurrentPageRows().map((function(t){return t.id}))));ye(i)===o?this.gridService.setServerSidePagination({selectAllRowsEnabled:!1}):this.gridService.setServerSidePagination({excludedFromSelectAll:i})}},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:La},{type:fr},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-multi-select-column-header",template:'<dato-checkbox class="mt-5" [formControl]="checkboxControl" [indeterminatelyChecked]="indeterminatelyChecked"></dato-checkbox>',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[La,fr,e.ChangeDetectorRef])],t)}(),La=function(){function o(t,e,n,o,i,r,a){this.store=t,this.gridQuery=e,this.translate=n,this.iconRegistry=o,this.svgRegistry=i,this.storageAPI=r,this.logger=a,this.treeConfig=Da,this.pageNumberToReturnAfterRefresh=-1,this.CHECKBOX_SELECTION_COL_ID="grid-checkbox-selection"}return Object.defineProperty(o.prototype,"treeData",{get:function(){return this.isTreeData},set:function(t){this.isTreeData=t},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){},o.prototype._setApi=function(t,e){this.api=t,this.gridRef=e,this.gridName=e.gridOptions.gridName,this.setServerSidePagination({enabled:this.isServerSidePagination(e.gridOptions)})},o.prototype.isServerSidePagination=function(t){return"infinite"===t.rowModelType},o.prototype.updateGridContext=function(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this.gridQuery.getGridOptions().context=e?t:qr(this.gridRef.gridOptions.context||{},t)},o.prototype.setSelectedRows=function(t){this.selectRows(t)},o.prototype.selectRows=function(t){var e=me(t).filter((function(t){return!t.isSelected()})),n=e.pop();e.forEach((function(t){return t.setSelected(!0,!1,!0)})),n&&n.setSelected(!0)},o.prototype.deselectRows=function(t){var e=me(t).filter((function(t){return t.isSelected()})),n=e.pop();e.forEach((function(t){return t.setSelected(!1,!1,!0)})),n&&n.setSelected(!1)},o.prototype.setRows=function(t,e,n){var o=this;void 0===e&&(e=!1),void 0===n&&(n={}),this.gridQuery.gridReady$.pipe(r.take(1)).subscribe((function(){if(o.isTreeData){o.treeConfig=mt(mt({},Da),n);var i=ka(t,o.treeConfig);o.api.grid.setRowData(i)}else o.isPivotMode?o.setPivotModeRows(t):o.api.grid.setRowData(t);e?o.fitGrid("container"):Xe()}))},o.prototype.setDatasource=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1),e&&this.updatePageToKeepOnRefreshServerData(),n&&this.setLoading(!0),this._originalGetRows=t,this.api.grid.setDatasource({getRows:this.wrapGetRows(this.gridQuery.getGridOptions(),t)})},o.prototype.refreshServerData=function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),t&&this.updatePageToKeepOnRefreshServerData(),e&&this.setLoading(!0),this.api.grid.setDatasource({getRows:this.gridQuery.getGridOptions().datasource.getRows})},o.prototype.updatePageToKeepOnRefreshServerData=function(){1===this.gridQuery.getGridOptions().maxBlocksInCache&&(this.pageNumberToReturnAfterRefresh=this.api.grid.paginationGetCurrentPage())},o.prototype.addRows=function(t,e){var n={add:me(t)};return Lt(e)||(n.addIndex=e),this.api.grid.updateRowData(n)},o.prototype.updateRows=function(t){var e=me(t);return this.api.grid.updateRowData({update:e})},o.prototype.updateRowValue=function(t,e,n){(Mt(t)?this.api.grid.getRowNode(t):t).setDataValue(e,n)},o.prototype.removeRows=function(t){var e=me(t).map((function(t){return t.data}));return this.api.grid.updateRowData({remove:e})},o.prototype.removeSelectedRows=function(){var t=this.gridQuery.getSelectedRowNodes();return this.removeRows(t)},o.prototype.clearTable=function(){this.setRows([])},o.prototype.updateColumns=function(t,e){if(void 0===e&&(e=!1),!t)throw new To("No columnDefs were provided. 🕵🏻‍♀️");var n=this.normalizeColumns(me(t)),o=e&&this.gridQuery.getCurrentGridSettings();this.api.grid.setColumnDefs(n),o&&this.loadSavedSettings(o)},o.prototype.normalizeOptions=function(e){var n=this;this.customHeadersTemplates=e.customHeadersTemplates;var o={gridService:this,gridQuery:this.gridQuery};if(e.gridOptions.autoGroupColumnDef=mt(mt({},o),e.gridOptions.autoGroupColumnDef),e.gridOptions.defaultColDef=mt(mt({},e.gridOptions.defaultColDef),{headerComponentParams:o}),void 0===e.gridOptions.enableSearch&&(e.gridOptions.enableSearch=e.gridOptions.enableV2_1),void 0===e.gridOptions.enableBackground&&(e.gridOptions.enableBackground=e.gridOptions.enableV2_1),void 0===e.gridOptions.showMultiSelectionCheckboxes&&(e.gridOptions.showMultiSelectionCheckboxes=e.gridOptions.enableV2_1&&e.gridOptions.rowSelection!==t.GridRowSelectionType.SINGLE),void 0===e.gridOptions.enableSearchHighlight&&(e.gridOptions.enableSearchHighlight=e.gridOptions.enableSearch&&xa.enableSearchHighlight),e.gridOptions.columnDefs=this.normalizeColumns(e.gridOptions.columnDefs,e.gridOptions),e.gridOptions.isExternalFilterPresent=function(){return!0},e.gridOptions.doesExternalFilterPass=function(t){return Er({row:t,api:n.gridQuery.api.grid},n.gridQuery.getFilter())&&n.rowMatchesSearch(t)},this.isServerSidePagination(e.gridOptions)){e.gridOptions.blockLoadDebounceMillis=300,this._originalGetRows=e.gridOptions.datasource.getRows,e.gridOptions.datasource.getRows=this.wrapGetRows(e.gridOptions);var i=e.gridOptions.paginationPageSize;i&&(e.gridOptions.cacheBlockSize=i)}this.initEditableColumnsCellClass(e),e.gridOptions.getContextMenuItems=this.wrapContextMenuBuilder(e);var r=e.gridOptions,a=r.saveSettings,s=r.gridName;if(e.gridOptions.saveSettings=!1!==a&&!Lt(s),this.initOnRowSelectedForServerSidePagination(e),e.gridOptions.pivotMode&&(this.initPivotSecondaryColsProcess(e),e.gridOptions.saveSettings=!1),e.gridOptions.usePivotGridStyle){e.gridOptions.rowHeight=30,e.gridOptions.defaultColDef=mt(mt({},e.gridOptions.defaultColDef),{cellClass:this.getPivotCellClass.bind(this),headerClass:this.getPivotHeaderClass.bind(this),cellStyle:function(e){var n={lineHeight:"30px"};return e.colDef.type===t.DatoGridColumnTypes.Number&&(n.textAlign="end"),n}}),e.gridOptions.autoGroupColumnDef=mt(mt({},e.gridOptions.autoGroupColumnDef),{cellClass:this.getPivotCellClass.bind(this),headerClass:this.getPivotHeaderClass.bind(this)})}return e.gridOptions},o.prototype.getPivotHeaderClass=function(t){var e=t.colDef.headerComponentParams.gridQuery,n="";if(e&&e.api){var o=e.api.columns.getSecondaryColumns();o&&o.length>0&&(n+="top-border")}return n},o.prototype.getPivotCellClass=function(t){var e=t.node,n=e.leafGroup,o=e.childIndex,i=e.rowGroupIndex,r=t.colDef.headerComponentParams.gridQuery,a="";if(r&&r.api){var s=r.api.columns.getAllDisplayedColumns(),l=s.find((function(e){return e.getColId()===t.colDef.colId}));i<=s.indexOf(l)&&(n?o%2==0&&(a+="primary-0-background-color"):a+="primary-100-background-color pointer dato-simple-bold")}return a},o.prototype.normalizeColumns=function(e,n){var o=this;void 0===n&&(n=null),n||(n=this.gridQuery.getGridOptions());var i=e.map((function(e){var i=mt(mt({},e),{headerName:o.translate.transform(e.headerName)});return e.info&&(i.minWidth=e.minWidth||t.GridMinWidths.With_Info),e.colId||(i.colId=e.field),i.type!==t.DatoGridColumnTypes.Items||i.filtersConfig||(i.filtersConfig={sections:t.DatoGridFilterSections.Conditional}),o.normalizeColumnSearchConfig(n,e,i),i}));return this.addMultiSelectHeaderColumnIfRequired(i,n)},o.prototype.normalizeColumnSearchConfig=function(e,n,o){var i=this,r=this.isServerSidePagination(e);void 0===n.includeInSearch&&(r&&n.type===t.DatoGridColumnTypes.Date?o.includeInSearch=!1:o.includeInSearch=void 0!==e.columnsIncludedInSearchByDefault?e.columnsIncludedInSearchByDefault:xa.columnsIncludedInSearchByDefault),o.includeInSearch&&!this.hasCellRenderer(o,e)&&e.enableSearchHighlight&&(o.cellRenderer=function(t){return Rt(o.editable)&&o.editable(t)||!Rt(o.editable)&&o.editable?Br(t,i.gridQuery.getSearchTerm()):Hr(t,i.gridQuery.getSearchTerm())})},o.prototype.hasCellRenderer=function(t,e){if(t.cellRenderer)return!0;var n=t.type,o=function(t){return t.columnTypes&&!!t.columnTypes[n]&&!!t.columnTypes[n].cellRenderer};return o(e)||o(xa)},o.prototype.addMultiSelectHeaderColumnIfRequired=function(e,n){var o=n&&n.showMultiSelectionCheckboxes,i=n&&n.rowSelection?n.rowSelection:xa.rowSelection;return o&&i===t.GridRowSelectionType.MULTIPLE?xt([{colId:this.CHECKBOX_SELECTION_COL_ID,checkboxSelection:!0,headerComponentFramework:Ma,width:30,maxWidth:30,suppressSizeToFit:!0,cellClass:"checkbox-selection-cell",headerClass:"header-checkbox-selection-cell",resizable:!1,pinned:"left",lockPosition:!0,includeInSearch:!1}],e):e},o.prototype.initOnRowSelectedForServerSidePagination=function(t){var e=this,n=t.gridOptions;if(this.isServerSidePagination(n)){var o=n.onRowSelected;n.onRowSelected=function(t){if(e.gridQuery.isServerSelectAllRowsEnabled){var n=t.node,i=n.isSelected(),r=e.gridQuery.serverSideConfig.excludedFromSelectAll,a=r.includes(n.id);i&&a?e.setServerSidePagination({excludedFromSelectAll:r.filter((function(t){return t!==n.id}))}):i||a||e.setServerSidePagination({excludedFromSelectAll:xt(r,[n.id])})}o&&o(t)}}},o.prototype.rowMatchesSearch=function(t){var e,n,o=(this.gridQuery.getSearchTerm()||"").toLowerCase().trim();if(kt(o))return!0;var i=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch?this.gridQuery.getAllColumns():this.gridQuery.getAllDisplayedColumns();try{for(var r=wt(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(this.api.grid.getColumnDef(s.getColId()).includeInSearch)if((this.api.grid.getValue(s.getColId(),t)||"").toString().toLowerCase().includes(o))return!0}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!1},o.prototype.fitToContainer=function(){this.api.grid.sizeColumnsToFit()},o.prototype.getCustomHeader=function(t){if(this.customHeadersTemplates){var e=this.customHeadersTemplates.find((function(e){return e.column===t})),n=this.customHeadersTemplates.find((function(t){return!t.column}));if(e||n){var o={moreMenu:e&&e.moreMenu||n&&n.moreMenu,customHeader:e&&e.customHeader||n&&n.customHeader},i=o.moreMenu,r=o.customHeader;return{moreMenu:i&&i.tpl,customHeader:r&&r.tpl}}}return{}},o.prototype.clearAllFilters=function(){this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:{},searchTerm:null})}})),this.notifyFilterUpdate()},o.prototype.clearColumnFilter=function(t){var e=this.gridQuery.getFilter(),n=t,o=(e[n],yt(e,["symbol"==typeof n?n:n+""]));this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:o})}})),this.notifyFilterUpdate()},o.prototype.setColumnFilter=function(t,e,n){void 0===n&&(n=!0),this._logEvent("Grids - Filter Applied",{column:t.getColId(),numOfConditions:e.conditional&&e.conditional.conditions.length||0,byValue:e.byValue?"Yes":"No"}),this.updateFilter(t,e),n&&this.notifyFilterUpdate()},o.prototype.setGridFilters=function(t){var e,n;if(this.api&&t){var o={};try{for(var i=wt(t),r=i.next();!r.done;r=i.next()){var a=r.value,s=a.filter;o[a.field]=s}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.updateSettings({filter:o}),this.notifyFilterUpdate()}},o.prototype.setSortByColumn=function(t,e){var n=this.gridQuery.getSort({colId:t,sort:e});this.setGridSort(n)},o.prototype.setGridSort=function(t){if(t&&this.api&&this.api.grid.getDisplayedRowCount()>0){var e=t.colId,n=t.sort,o=t.sortIndex,i=this.api.columns.getAllGridColumns();if(i){var r=t,a=i.find((function(t){return(t.getColDef().showRowGroup||t.getColId())===e}));if(a)r={colId:a.getColId(),sort:n};else if(!Lt(o)){var s=this.api.columns.getValueColumns().find((function(t){return t.getColId()===e}));if(e.startsWith("pivot")||s)r={colId:i[o].getColId(),sort:n,sortIndex:o}}this.updateSettings({sort:r}),this.api.grid.setSortModel([r]),this.gridRef.gridOptions.usePivotGridStyle&&this.api.grid.redrawRows()}}},o.prototype.updateFilter=function(t,e){var n=cr(t.getColDef());this.store.update((function(t){var o;return{settings:mt(mt({},t.settings),{filter:mt(mt({},t.settings.filter),(o={},o[n]=e,o))})}}))},o.prototype.setSearchTerm=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),{searchTerm:t})}})),this.notifyFilterUpdate()},o.prototype.setServerSidePagination=function(t){this.store.update((function(e){return{serverSidePagination:mt(mt({},e.serverSidePagination),t)}}))},o.prototype.setLoading=function(t){t?this.api.grid.showLoadingOverlay():0===this.api.grid.getDisplayedRowCount()?this.setOverlay(!0):this.setOverlay(!1)},o.prototype.setNoData=function(t){this.setOverlay(t)},o.prototype.setOverlay=function(t){t?this.api.grid.showNoRowsOverlay():this.api.grid.hideOverlay()},o.prototype.updateSettings=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),t)}}))},o.prototype.fitGrid=function(t){"container"===t?this.api.grid.sizeColumnsToFit():this.api.columns.autoSizeAllColumns();var e="container"===t?0:1;this.updateSettings({gridAlignment:e,columnsSizes:null})},o.prototype.saveSettingsToServer=function(t){this.storageAPI.set(this.gridName,t)},o.prototype._logEvent=function(t,e){this.logger.logEvent(t,mt({table:this.gridName},e))},o.prototype.wrapSuccessCallback=function(t){var e=this,n=t.successCb,o=t.pageNumber,i=t.isPendingReturnToPage;return function(t,r){e.setServerSidePagination({totalRows:r,hasError:!1}),n(t,r),e.gridQuery._serverDataLoaded.next({api:e.api.grid,columnApi:e.api.columns,type:"ServerDataLoaded",paginationPage:o}),i||(e.setLoading(!1),Xe()),e.lastTotalRows=r}},o.prototype.wrapGetRows=function(t,e){var n=this,o=e||t.datasource.getRows;return function(e){var i=e.startRow,r=e.endRow,a=e.sortModel,s=e.successCallback,l=t.paginationPageSize||100,c=n.pageNumberToReturnAfterRefresh>0,p=c&&0===i,d=c?n.pageNumberToReturnAfterRefresh+1:Math.ceil(r/l);n.pageNumberToReturnAfterRefresh=-1;var u=n.gridQuery.getFilter(),h=mt(mt({},e),{failCallback:function(){n.setServerSidePagination({hasError:!0}),n.setOverlay(!0)},successCallback:n.wrapSuccessCallback({pageNumber:d,successCb:s,isPendingReturnToPage:p}),serverConfig:{pageSize:l,pageNumber:d,columnFilters:kt(u)||t.enableV2_1?null:n.buildServerRequestFilters(u),filter:t.enableV2_1?n.buildServerRequestFilters_v2_1(t.columnDefs):null,sort:n.buildServerRequestSort(a)}});if(p){!function(t){(0,t.successCallback)([],n.lastTotalRows)}(h)}else o(h)}},o.prototype.initEditableColumnsCellClass=function(t){var e=this;t.gridOptions.columnDefs.forEach((function(t){if(t.editable)if(Rt(t.editable)){var n=t.cellClass;t.cellClass=function(o){if(t.editable(o)){var i=e.addEditableCellClass(n);return Rt(i)?i(o):i}return Rt(n)?n(o):n}}else t.cellClass=e.addEditableCellClass(t.cellClass)}))},o.prototype.wrapContextMenuBuilder=function(t){var e=this,n=t.gridOptions.customContextMenu,o=Rt(n)?n(t.rowActions):t.rowActions;this.translateActionLabels(o);var i={label:this.translate.transform("core.copy-cell"),icon:"copy",key:"Copy Cell"};return function(t){var n=t.node,r=t.column,a=t.context,s=a&&a.contextMenu&&a.contextMenu.fromOnHover;if(!n)return[];var l=[n],c=1;s?e.updateGridContext({contextMenu:{fromOnHover:!1}}):(i.onClick=function(t){var n=St(t,1)[0],o=e.api.grid.getValue(r.getColId(),n),i=r.getColDef().valueFormatter;Vn(i?i(o):o)},n.isSelected()&&(c=ye(l=e.gridQuery.getSelectedRowNodes())));var p=Ar(o,c,l,e.gridQuery.isServerSelectAllRowsEnabled).filter((function(t){return t.visible})),d=[i];return s?d=p:p.length>0&&(d=xt([mt(mt({},i),{separator:!0})],p)),Lr({toolbarActions:d,selectedRows:l,iconRegistry:e.svgRegistry,node:n,logger:{log:e._logEvent.bind(e),eventOrigin:s?"On Hover":"Context Menu"}})}},o.prototype.translateActionLabels=function(t){var e=this;t.forEach((function(t){t.label=e.translate.transform(t.label),t.subMenu&&e.translateActionLabels(t.subMenu)}))},o.prototype.loadSavedSettings=function(t){var e=this,n=t.sort,o=t.hiddenColumns,i=t.filter,r=t.groupedColumns,a=t.columnsSizes,s=t.pinnedColumns,l=t.columnsOrder,c=t.gridAlignment,p=this.api,d=p.grid,u=p.columns;u.setColumnsVisible(this.initialSettings.columnsOrder,!0);var h=Lt(o)?this.initialSettings.hiddenColumns:o;u.setColumnsVisible(h,!1),i&&d.onFilterChanged();var g,f=u.getRowGroupColumns();r&&(g=f.filter((function(t){return!r.includes(t.getColId())})),u.addRowGroupColumns(r),u.setColumnsVisible(r,!1)),u.removeRowGroupColumns(g),u.setColumnsVisible(g,!0);var m=n||this.initialSettings.sort;d.setSortModel(m?[m]:null),2===c?a&&Object.keys(a).forEach((function(t){1===a[t]?u.autoSizeColumn(t):u.setColumnWidth(t,a[t])})):1===c?u.autoSizeAllColumns():d.sizeColumnsToFit();var y=s?s.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null,v=l?l.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null;ye(y)>0?u.setColumnsPinned(y,"left"):v&&u.setColumnsPinned(v,null),l&&u.moveColumns(l,0)},o.prototype.getSettingsDiff=function(){return we(this.gridQuery.getCurrentGridSettings(),this.initialSettings)},o.prototype.resetTableSettings=function(){var t=this.initialSettings,e=t.filter,n=yt(t,["filter"]),o=lr(this.api.columns.getAllGridColumns(),!0),i=kt(o)?n.gridAlignment:2,r=mt(mt({},n),{columnsSizes:o,gridAlignment:i});this.updateSettings(r),this.loadSavedSettings(r),this.saveSettingsToServer({filter:e})},o.prototype.initSettings=function(t){this.initialSettings=this.gridQuery.getCurrentGridSettings(),this.updateSettings(t),this.loadSavedSettings(t)},o.prototype.notifyFilterUpdate=function(){var t=this,e=[this.gridRef.filterChanged.asObservable()];this.gridQuery.isServerSide&&(e.push(this.gridQuery.serverDataLoaded$),this.setLoading(!0)),n.combineLatest(e).pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){var e=t.api.grid.getDisplayedRowCount();t.setOverlay(0===e)})),this.api.grid.onFilterChanged()},o.prototype.buildServerRequestFilters=function(e){var n,o,i={};try{for(var r=wt(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=St(a.value,2),l=s[0],c=s[1],p=c.byValue,d=c.conditional;if(p&&(i[l]={operator:t.OperatorTypes.AND,filters:[p]}),d){var u={operator:d.operator,filters:d.conditions.map((function(e){var n=e.condition,o=e.value;return n===t.DatoFilterConditions.IN_RANGE?{condition:n,start:o,end:e.rangeEnd}:e}))};p?i[l].filters.push(u):i[l]=u}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},o.prototype.buildServerRequestFilters_v2_1=function(e){var n=this,o=this.gridQuery.getFilter(),i=this.gridQuery.getSearchTerm(),r=this.buildServerColumnFilters_v2_1(o);if(r.every((function(e){return e.operator===t.OperatorTypes.AND}))){var a=r.map((function(t){return t.filters})).reduce((function(t,e){return e.concat(t)}),[]);r=[{operator:t.OperatorTypes.AND,filters:a}]}var s=ye(r)>1?{operator:t.OperatorTypes.AND,filters:r}:1===ye(r)?r[0]:null;if(!i)return s;var l=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch,c=e.filter((function(t){return t.includeInSearch&&(l||n.api.columns.getColumn(t.colId).isVisible())})).map((function(e){var n=e.field;return{condition:t.DatoFilterConditions.CONTAINS,value:i,column:n}})),p=ye(c)>0?{operator:t.OperatorTypes.OR,filters:c}:null;return s?{operator:t.OperatorTypes.AND,filters:[s,p]}:p},o.prototype.buildServerColumnFilters_v2_1=function(e){var n,o,i=[];try{for(var r=wt(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=St(a.value,2),l=s[0],c=s[1],p=null,d=c.byValue,u=c.conditional;if(d&&(p={operator:t.OperatorTypes.AND,filters:[mt({column:l},d)]}),u){var h=this.getServerConditionalFilter(u,l);p?p.filters.push(h):p=h}i.push(p)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},o.prototype.getFilterForServerActionOnSelectAll=function(){var e=this.gridQuery.serverSideConfig.excludedFromSelectAll,n=this.gridQuery.getGridOptions(),o=n.columnDefs,i=n.idColumnKey,r=this.buildServerRequestFilters_v2_1(o);if(kt(e))return r;var a={condition:t.DatoFilterConditions.NOT_IN_LIST,values:e,column:i},s=r?[r,a]:[a];return{operator:t.OperatorTypes.AND,filters:s}},o.prototype.getServerConditionalFilter=function(e,n){return{operator:e.operator,filters:e.conditions.map((function(e){var o=e.condition,i=e.value;return o===t.DatoFilterConditions.IN_RANGE?{condition:o,start:i,end:e.rangeEnd,column:n}:o===t.DatoFilterConditions.IS_EMPTY||o===t.DatoFilterConditions.NOT_EMPTY?{condition:t.DatoFilterConditions.IS_EMPTY,value:o===t.DatoFilterConditions.IS_EMPTY?"true":"false",column:n}:o===t.DatoFilterConditions.IS_NULL||o===t.DatoFilterConditions.NOT_NULL?{condition:t.DatoFilterConditions.IS_NULL,value:o===t.DatoFilterConditions.IS_NULL?"true":"false",column:n}:mt(mt({},e),{column:n})}))}},o.prototype.buildServerRequestSort=function(t){return t.map((function(t){return{column:t.colId,sortOrder:t.sort.toUpperCase()}}))},o.prototype.addEditableCellClass=function(t){var e=this;return Lt(t)?"dato-editable-cell":Rt(t)?function(n){return e.getEditableClassArray(t(n))}:this.getEditableClassArray(t)},o.prototype.getEditableClassArray=function(t){var e=me(t);return e.push("dato-editable-cell"),e},o.prototype.selectAllCurrentPageRows=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);var n=this.gridQuery.getCurrentPageRows();if(e){var o=this.gridQuery.serverSideConfig.excludedFromSelectAll;kt(o)||(n=n.filter((function(t){var e=t.id;return!o.includes(e)})))}t?this.selectRows(n):this.deselectRows(n)},o.prototype.deselectAllRows=function(){this.api.grid.deselectAll(),this.gridQuery.isServerSelectAllRowsEnabled&&this.setServerSidePagination({selectAllRowsEnabled:!1,excludedFromSelectAll:[]})},o.prototype.resolveRowActionsVisibility=function(){this.gridQuery._rowActionVisibilityChanged.next()},o.prototype.initPivotSecondaryColsProcess=function(t){var e=this,n=t.gridOptions;n.processSecondaryColDef=function(t){var e=t.pivotValueColumn&&t.pivotValueColumn.getUserProvidedColDef();e&&(t.filter=e.filter),t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=pr(t);return e&&e.value||""})))},n.processSecondaryColGroupDef=function(t){if(t.headerName){var n=pr(t.headerName);if(n){var o=n.field,i=n.value;t.headerClass=[o],t.headerName=i,t.children&&t.children.length>0&&t.headerClass.push("group-pivot-cell")}}else if(t.children){var r=St(t.children,1)[0],a=r&&r.pivotTotalColumnIds;a&&a.length>0&&(t.headerClass=["total-pivot-cell"],t.headerName=e.translate.transform("core.total"))}else t.headerClass=["empty-pivot-header"];t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=pr(t);return e&&e.value||""})))}},o.prototype.setPivotModeRows=function(t){var e=this.gridQuery.getAllPivotColumns(),n=t.map((function(t,n){var o,i,r=mt({},t);try{for(var a=wt(e),s=a.next();!s.done;s=a.next()){var l=s.value.getColDef().field,c={field:l,value:t[l]};r[l]=JSON.stringify(c)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r}));this.api.grid.setRowData(n)},o.ctorParameters=function(){return[{type:sr},{type:fr},{type:_n},{type:je},{type:Me},{type:void 0,decorators:[{type:e.Inject,args:[zr]}]},{type:void 0,decorators:[{type:e.Inject,args:[ja]}]}]},o=vt([e.Injectable(),bt(5,e.Inject(zr)),bt(6,e.Inject(ja)),Ct("design:paramtypes",[sr,fr,_n,je,Me,Object,Object])],o)}(),Na=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCustomHeader]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Fa=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCustomMoreMenu]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Ga=function(){function t(){}return vt([e.Input(),Ct("design:type",String)],t.prototype,"column",void 0),vt([e.ContentChild(Na),Ct("design:type",Object)],t.prototype,"customHeader",void 0),vt([e.ContentChild(Fa),Ct("design:type",Object)],t.prototype,"moreMenu",void 0),t=vt([e.Component({selector:"dato-custom-header-template",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Va={light:{"primary-700":"#2E2F30","primary-600":"#37383A","primary-500":"#4F5053","primary-400":"#67696F","primary-300":"#9EA0A5","primary-200":"#CCCED3","primary-100":"#F1F2F5","primary-50":"#F7F8FA","primary-0":"#ffffff","accent-800":"#072A60","accent-700":"#0D47A1","accent-600":"#1C61D7","accent-500":"#317EEB","accent-400":"#09A0FF","accent-350":"#40B2FE","accent-300":"#77C5FD","accent-200":"#BBDEFB","accent-180":"#C7E3FB","accent-100":"#E3F2FD","fg-100":"#37383A","fg-200":"#ffffff"},dark:{"primary-700":"#ffffff","primary-600":"#F7F8FA","primary-500":"#F1F2F5","primary-400":"#CCCED3","primary-300":"#9EA0A5","primary-200":"#67696F","primary-100":"#4F5053","primary-50":"#37383A","primary-0":"#2E2F30","accent-800":"#E3F2FD","accent-700":"#BBDEFB","accent-600":"#77C5FD","accent-500":"#40B2FE","accent-400":"#09A0FF","accent-350":"#317EEB","accent-300":"#1C61D7","accent-200":"#0D47A1","accent-180":"#C7E3FB","accent-100":"#072A60","fg-100":"#ffffff","fg-200":"#37383A"}},za=function(){function t(t,e,n,o){this.host=t,this.gridService=e,this.gridQuery=n,this.cdr=o,this.displayedActions=[],this.setBgColorBound=this.setBackgroundColor.bind(this)}return Object.defineProperty(t.prototype,"hostEl",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.show=function(t){this.removeSelectedListener(),this.params=t,this.row=t.node,this.row.addEventListener("rowSelected",this.setBgColorBound),this.setRowActions(),this.setBackgroundColor({node:this.row}),Ht(this.hostEl,{top:this.row.rowTop+"px",height:this.row.rowHeight+"px",opacity:1,zIndex:1,pointerEvents:"all"})},t.prototype.hide=function(){Ht(this.hostEl,{opacity:0,pointerEvents:"none",zIndex:-1})},t.prototype.openActionMenu=function(t){var e=this.params,n=e.rowIndex,o=e.node,i=e.column,r=e.value,a=this.gridQuery.api.grid.rowRenderer.rowCompsByIndex[n].getRenderedCellForColumn(i);this.gridService.updateGridContext({contextMenu:{fromOnHover:!0}}),a.beans.contextMenuFactory.showMenu(o,i,r,t)},t.prototype.updateScrollPos=function(t){Ht(this.hostEl,{left:t-this.hostEl.scrollWidth-1+"px"})},t.prototype.callAction=function(t){Rt(t.onClick)&&(this.gridService._logEvent("Grids - Table Action",{action:t.key,numOfItems:1,from:"On Hover"}),t.onClick([this.row]))},t.prototype.ngOnDestroy=function(){this.removeSelectedListener()},t.prototype.setRowActions=function(){var t=this.config,e=t.actions,n=t.maxDisplayedItems,o=Ar(e,1,[this.row],!1).filter((function(t){var e=t.template,n=t.icon,o=t.visible;return Lt(e)&&Mt(n)&&o}));this.displayedActions=o.filter((function(t){return _t(t.onHoverIndex)})).slice(0,n).sort((function(t,e){return t.onHoverIndex-e.onHoverIndex})),0===this.displayedActions.length&&(this.displayedActions=o.slice(0,n)),this.showMore=this.displayedActions.length<o.length,this.cdr.detectChanges()},t.prototype.removeSelectedListener=function(){this.row&&this.row.removeEventListener("rowSelected",this.setBgColorBound)},t.prototype.setBackgroundColor=function(t){var e=t.node,n="accent-100";e.isSelected()&&(n=e.rowIndex%2==0?"accent-180":"accent-200");var o=Va.light[n],i="linear-gradient(to right, "+o+"B3 0%, "+o+" 17%, "+o+" 100%)";Ht(this.hostEl,{backgroundImage:i})},t.ctorParameters=function(){return[{type:e.ElementRef},{type:La},{type:fr},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-on-hover",template:'<div class="d-flex">\n <div class="gradient"></div>\n <div class="actions d-flex align-end-center">\n <dato-icon-button (click)="callAction(action)" datoSize="md" datoType="none" *ngFor="let action of displayedActions" [icon]="action.icon" [datoTooltip]="action.tooltip || action.label" datoTooltipOffset="[-80,5]"></dato-icon-button>\n <dato-icon-button *ngIf="showMore" (click)="openActionMenu($event)" datoSize="md" datoType="none" icon="more-vertical"></dato-icon-button>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;justify-content:flex-end;align-content:center;align-items:center;position:absolute;max-width:150px;transition:opacity .3s ease-in-out;opacity:0}:host .gradient{min-width:20px}"]}),Ct("design:paramtypes",[e.ElementRef,La,fr,e.ChangeDetectorRef])],t)}(),Ba=function(){function t(t){var e=this;this.ref=t,this.groups=[],this.groups=Object.keys(t.data).map((function(n){return{scope:n,children:e.resolveKeys(t.data[n])}}))}return t.prototype.resolveKeys=function(t){return t.reduce((function(t,e){var n=e.description,o=e.keys;return t.push({keys:pa(o),description:n}),t}),[])},t.ctorParameters=function(){return[{type:Uo}]},t=vt([e.Component({template:' <dato-dialog-header>{{ \'core.available-shortcuts\' | translate }}</dato-dialog-header>\n <dato-dialog-content>\n <section>\n <ng-container *ngFor="let group of groups">\n <section *ngIf="group.children.length" class="flex-1 hotkeys-group">\n <header>{{ group.scope | translate }}</header>\n <table>\n <tbody>\n <tr *ngFor="let child of group.children">\n <td>{{ child.description | translate }}</td>\n\n <td class="text-right">\n <kbd [innerHTML]="child.keys"></kbd>\n </td>\n </tr>\n </tbody>\n </table>\n </section>\n </ng-container>\n\n </section>\n\n\n </dato-dialog-content>\n <dato-dialog-footer> <dato-button datoType="secondary" datoDialogDismiss>{{ \'core.close\' | translate }}</dato-button> </dato-dialog-footer>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host header{background-color:#f6f8fa;border-top-left-radius:2px;border-top-right-radius:2px;border:1px solid #d1d5da;font-weight:500;font-size:14px;padding:8px 16px;border-bottom:0}:host table{border:1px solid #e1e4e8;border-collapse:collapse;width:100%;margin-bottom:1rem;color:#212529}:host th{font-weight:500;text-align:left;vertical-align:bottom;padding:.75rem;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6}:host td{padding:8px 16px;border-top:1px solid #dee2e6}:host kbd{margin-right:6px;background-color:#fafbfc;border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;font-size:12px;padding:3px 5px}"]}),Ct("design:paramtypes",[Uo])],t)}(),Ha=function(){function o(t,e,n){var o,i=this;this.eventManager=t,this.document=e,this.dialog=n,this.callbacks=[],this.defaults={preventDefault:!0,event:"keydown",element:this.document,scope:"core.general",ignoreInEditable:!1},this.hotkeys=((o={})[this.defaults.scope]=[],o),this.addShortcut({keys:"shift.?",preventDefault:!1,ignoreInEditable:!0}).subscribe((function(t){i.isActiveElementEditable(t)||ye(i.hotkeys)&&i.openHelpModal()}))}return o.prototype.isActiveElementEditable=function(t){return/^(input|textarea)$/i.test(document.activeElement.nodeName)||t.target.isContentEditable},o.prototype.onShortcut=function(t){var e=this;return this.callbacks.push(t),function(){return e.callbacks.filter((function(e){return e!==t}))}},o.prototype.addShortcut=function(t){var e=this,o=mt(mt({},this.defaults),t),i=o.scope,r=o.keys,a=o.description,s=o.element,l=o.event,c=o.preventDefault,p=o.target,d=o.ignoreInEditable,u=r,h=St(r.split(".")),g=h[0],f=h.slice(1);return"meta"===g&&!1===ca()&&(u=xt(["control"],f).join(".")),this.hotkeys[i]||(this.hotkeys[i]=[]),a&&this.hotkeys[i].push({keys:u,description:a}),new n.Observable((function(t){var n=e.eventManager.addEventListener(s,l+"."+u,(function(n){d&&e.isActiveElementEditable(n)||(c&&n.preventDefault(),e.dialog.isOpen&&e.dialog.closeAll(),e.callbacks.forEach((function(t){return t(n,u,p)})),t.next(n))}));return function(){n(),o.target=null,a&&(e.hotkeys[i]=e.hotkeys[i].filter((function(t){return t.keys!==u})))}}))},o.prototype.openHelpModal=function(){this.dialog.open(Ba,{data:this.hotkeys,size:t.Dimensions.MD})},o.ctorParameters=function(){return[{type:ut.EventManager},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]},{type:Zo}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(ut.EventManager),e.ɵɵinject(s.DOCUMENT),e.ɵɵinject(Zo))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[ut.EventManager,Object,Zo])],o)}(),Ua=function(){function t(t,o,i,r,a,s,l,c,p,d){this.gridService=t,this.gridQuery=o,this.cdr=i,this.iconRegistry=r,this.translate=a,this.host=s,this.injector=l,this.resolver=c,this.hotkeys=p,this.storageAPI=d,this.onGridChange=new e.EventEmitter,this.rowActions=[],this.gridActions=[],this.contentInit=new n.Subject,this.gridReady$=this.gridQuery.gridReady$,this.gridElements={centerViewport:null,centerContainer:null,bodyViewport:null},this.treeGridClass="tree"}return Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this._gridOptions},set:function(t){this._gridOptions=t,this.gridService.treeData=t.treeData,this.gridService.isPivotMode=t.pivotMode,this.agGridEl&&(t.treeData?!this.agGridEl.classList.contains(this.treeGridClass)&&this.agGridEl.classList.add(this.treeGridClass):t.enableV2_1||this.agGridEl.classList.add(this.treeGridClass))},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.contentInit.complete(),this.clearTooltip(),this.rowHoverComponent&&this.rowHoverComponent.destroy(),this.rowHoverComponent=null},t.prototype.ngAfterContentInit=function(){this.contentInit.next(),this.contentInit.complete()},t.prototype._initializeGrid=function(t,e){var o=this;this.agGridEl=e,this.contentInit.asObservable().pipe(r.switchMap((function(){o.gridOptions=o.normalizeOptions(),t.gridOptions=o.gridOptions;var e=!1===o.gridOptions.saveSettings?n.of(null):o.storageAPI.get(o.gridOptions.gridName);return n.combineLatest([t.gridReady,e])})),i.untilDestroyed(this)).subscribe((function(n){var i=St(n,2),r=i[0],a=r.api,s=r.columnApi,l=i[1],c=void 0===l?{}:l;(o.gridOptions.rowData||a.showLoadingOverlay(),o.gridOptions.statusBar)||Ut(e.querySelector(".ag-status-bar"),"ag-hidden");var p={grid:a,columns:s};o.gridService._setApi(p,t),o.gridQuery._setApi(p,t),o.gridService.initSettings(c||{}),o.registerSettingsListeners(p,t),o.registerGridListeners(p,t),o.registerEventsTriggeringClearSelectedRows(t),o.registerPaginationChanged(t),o.gridQuery._gridReady.next(!0),o.gridOptions.treeData&&o.agGridEl.classList.add("tree"),o.gridOptions.rowHeight&&o.agGridEl.classList.add("row-height-"+o.gridOptions.rowHeight)}))},t.prototype.normalizeOptions=function(){this.gridOptions.treeData&&(this.gridOptions=mt(mt({},this.gridOptions),{pagination:!1}));var t={gridOptions:this.gridOptions,customHeadersTemplates:this.customHeadersTemplates,rowActions:this.rowActions},e=this.gridService.normalizeOptions(t);return qr(mt(mt(mt({},xa),this.gridOptions.treeData?Ca:{}),{icons:this.getGridIcons()}),e)},t.prototype.setGridRows=function(t){this.gridService.setRows(t)},t.prototype.setGridFilters=function(t){this.gridService.setGridFilters(t)},t.prototype.setGridSort=function(t){this.gridService.setGridSort(t)},t.prototype.getGridIcons=function(){var t='<span class="da-grid-icon pointer d-flex column-move">'+this.iconRegistry.getSvg("move-column")+"</span>";return{groupExpanded:'<span class="da-grid-icon pointer group-expanded-icon">'+this.iconRegistry.getSvg("arrow-right")+"</span>",groupContracted:'<span class="da-grid-icon pointer group-contracted-icon">'+this.iconRegistry.getSvg("arrow-right")+"</span>",columnMovePin:'<span class="da-grid-icon pointer d-flex primary-300-fill column-move-pin">'+this.iconRegistry.getSvg("pin")+"</span>",columnMoveHide:'<span class="da-grid-icon pointer d-flex column-move-hide">'+this.iconRegistry.getSvg("eye-hide")+"</span>",columnMoveMove:t,columnMoveLeft:t,columnMoveRight:t,rowDrag:'<span class="da-grid-icon drag d-flex">'+this.iconRegistry.getSvg("drag-01")+"</span>"}},t.prototype.registerSettingsListeners=function(t,e){this.listenToColumnResize(t,e),this.listenToGridEvents(e),this.listenToStoreSettingsChanges()},t.prototype.listenToColumnResize=function(t,e){var n=this,o=e.columnResized.asObservable();this.onHoverEnabled()&&(o=o.pipe(r.filter((function(t){return"uiColumnDragged"===t.source})),r.tap((function(){return n.updateOnHoverPos()})))),o.pipe(r.auditTime(100),r.filter((function(t){var e=t.finished,n=t.source;return e&&"uiColumnDragged"===n})),i.untilDestroyed(this)).subscribe((function(e){var o=St(e.columns,1)[0],i=mt({},n.gridQuery.getColumnSizes());i?i[o.getColId()]=o.getActualWidth():i=lr(t.columns.getAllGridColumns()),n.gridService.updateSettings({gridAlignment:2,columnsSizes:i})}))},t.prototype.listenToGridEvents=function(t){var e=this,o=t.columnVisible,a=t.sortChanged,s=t.columnRowGroupChanged,l=t.columnPinned,c=t.dragStopped,p=t.filterChanged;n.merge(o,a,s,l,c,p).pipe(r.skip(1),i.untilDestroyed(this)).subscribe((function(t){var n=t.type,o=e.gridService.getSettingsDiff();e.gridService.updateSettings(o);var i=e.getGridData();e.onGridChange.emit({filter:e.gridQuery.getExternalFilter(),sort:e.gridQuery.getSort(),type:n,data:i})}))},t.prototype.listenToStoreSettingsChanges=function(){var t=this;this.gridQuery.select((function(t){return t.settings})).pipe(r.skip(1),r.debounceTime(1e3),i.untilDestroyed(this)).subscribe((function(){var e=t.gridService.getSettingsDiff();t.gridService.saveSettingsToServer(e)}))},t.prototype.registerGridListeners=function(t,e){this.gridElements={centerContainer:Ft(".ag-center-cols-container",this.agGridEl),centerViewport:Ft(".ag-center-cols-viewport",this.agGridEl),bodyViewport:Ft(".ag-body-viewport",this.agGridEl)},this.registerGridClickListener(t.grid),this.registerGridGroupListeners(e),this.registerGridMouseListeners(e),this.registerGridKeyboardListener(t),this.registerWindowResizeListener()},t.prototype.registerGridGroupListeners=function(t){var e=this;t.columnRowGroupChanged.pipe(r.switchMap((function(e){return 0===e.columns.length?n.EMPTY:t.cellClicked.pipe(r.filter((function(t){var e=t.value,n=t.node;return void 0!==e&&!0===n.group})))})),i.untilDestroyed(this)).subscribe((function(t){var e=t.node;e.setExpanded(!e.expanded)})),this.onHoverEnabled()&&t.rowGroupOpened.pipe(r.filter((function(t){return!1===t.node.expanded})),i.untilDestroyed(this)).subscribe((function(){e.lastHoveredRow=null,e.setOnHoverState(!1)}))},t.prototype.registerGridClickListener=function(t){var e=this.gridElements,o=e.bodyViewport,a=e.centerViewport;n.fromEvent(o,"click").pipe(r.filter((function(e){return(e.target===o||e.target===a)&&t.getSelectedRows().length>0})),i.untilDestroyed(this)).subscribe((function(){return t.deselectAll()}))},t.prototype.onHoverEnabled=function(){return this.gridOptions.hoverConfig.enabled&&this.rowActions.length>0},t.prototype.registerGridMouseListeners=function(t){var e,o=this,a=this.gridElements,s=a.bodyViewport,l=a.centerContainer,c=this.onHoverEnabled();c&&(n.fromEvent(l,"mouseleave").pipe(i.untilDestroyed(this)).subscribe((function(){o.toggleRowHoverClass(o.lastHoveredRow),o.lastHoveredRow=null,o.setOnHoverState(!1),e=null})),n.merge(t.bodyScroll.pipe(r.filter((function(t){return"horizontal"===t.direction}))),t.rowDataChanged).pipe(i.untilDestroyed(this)).subscribe((function(){o.updateOnHoverPos()})),this.addOnHoverElement()),t.cellMouseOver.pipe(i.untilDestroyed(this)).subscribe((function(t){var n=t.node,i=t.column;if(e!==n.id+"-"+i.getColId()){e=n.id+"-"+i.getColId(),o.showTooltip(t);var r=t.event.target.parentElement;if(c&&(!1===n.group||Lt(n.group))&&o.lastHoveredRow!==r){var a=o.lastHoveredRow;o.lastHoveredRow=r,o.toggleRowHoverClass([a,o.lastHoveredRow]),o.setOnHoverState(!0,t)}}else clearTimeout(o.cellMouseOutTimer)})),n.merge(n.fromEvent(s,"scroll"),n.fromEvent(this.agGridEl,"mouseleave")).pipe(i.untilDestroyed(this)).subscribe((function(){e=null,o.clearTooltip()})),t.cellMouseOut.pipe(r.filter((function(){return!Lt(o.tooltip)})),i.untilDestroyed(this)).subscribe((function(){o.cellMouseOutTimer=window.setTimeout((function(){return o.clearTooltip()}))}))},t.prototype.clearTooltip=function(){this.tooltip&&this.tooltip.dispose(),this.tooltip=null},t.prototype.showTooltip=function(t){var e=t.event.target;if("SPAN"===e.tagName&&0===e.scrollWidth&&(e=e.parentElement),t.colDef.editable&&(e=e.querySelector(".value-wrapper")||e),e.offsetWidth<e.scrollWidth){clearTimeout(this.cellMouseOutTimer);var n={cell:e,value:e.innerText};Lt(this.tooltip)?this.createAndShowTooltip(n):this.updateTooltip(n)}},t.prototype.createAndShowTooltip=function(t){var e=t.cell,n=t.value;this.tooltip=new X(e,{placement:"top",container:document.body,trigger:"manual",title:ot.sanitize(n),html:!0,popperOptions:{modifiers:{preventOverflow:{enabled:!1}}},template:'<div class="tooltip dato-tooltip common-tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}),this.tooltip.show()},t.prototype.updateTooltip=function(t){var e=t.cell,n=t.value;e!==this.tooltip.reference&&(this.tooltip.reference=e,this.tooltip.popperInstance.reference=e,this.tooltip.updateTitleContent(n)),this.tooltip.show()},t.prototype.addOnHoverElement=function(){this.rowHoverComponent=Zr({component:za,injector:this.injector,resolver:this.resolver});var t=this.rowHoverComponent,e=t.instance,n=t.hostView;e.config=mt(mt({},this.gridOptions.hoverConfig),{actions:this.rowActions.slice()}),n.detectChanges(),qt(this.gridElements.centerContainer,this.rowHoverEl)},Object.defineProperty(t.prototype,"rowHoverEl",{get:function(){return this.rowHoverComponent.location.nativeElement},enumerable:!0,configurable:!0}),t.prototype.setOnHoverState=function(t,e){var n=this.rowHoverComponent.instance;t?(n.show(e),this.updateOnHoverPos()):n.hide()},t.prototype.updateOnHoverPos=function(){var t=this.gridElements,e=t.centerViewport,n=t.centerContainer,o=n.clientWidth>e.clientWidth?e:n,i=o.clientWidth,r=o.scrollLeft;this.rowHoverComponent.instance.updateScrollPos(i+r)},t.prototype.toggleRowHoverClass=function(t){me(t).forEach((function(t){return t&&t.classList.toggle("actions-hovered")}))},t.prototype.registerGridKeyboardListener=function(t){var e=this;t.grid,t.columns;this.hotkeys.addShortcut({element:this.agGridEl,keys:"meta.a",ignoreInEditable:!0}).pipe(i.untilDestroyed(this)).subscribe((function(){e.gridService.selectAllCurrentPageRows()}))},t.prototype.registerWindowResizeListener=function(){var t=this;n.fromEvent(window,"resize").pipe(r.debounceTime(100),r.filter((function(){return 2!==t.gridQuery.gridAlignment})),i.untilDestroyed(this)).subscribe((function(){var e=0===t.gridQuery.gridAlignment?"container":"content";t.gridService.fitGrid(e)}))},t.prototype.getGridData=function(){var t=this.gridService.api.grid.getModel();return this.gridOptions.treeData?_a(t.rowsToDisplay.map((function(t){return t.data})),this.gridService.treeConfig):t.rowsToDisplay},t.prototype.registerEventsTriggeringClearSelectedRows=function(t){var e=this;(this.gridQuery.isServerSide?n.merge(t.sortChanged,t.filterChanged):t.filterChanged).pipe(i.untilDestroyed(this)).subscribe((function(){e.gridService.deselectAllRows()}))},t.prototype.registerPaginationChanged=function(t){var e=this;this.gridQuery.isServerSide&&t.paginationChanged.pipe(i.untilDestroyed(this)).subscribe((function(){e.gridQuery.isServerSelectAllRowsEnabled&&e.gridService.selectAllCurrentPageRows(!0,!0)}))},t.ctorParameters=function(){return[{type:La},{type:fr},{type:e.ChangeDetectorRef},{type:je},{type:_n},{type:e.ElementRef},{type:e.Injector},{type:e.ComponentFactoryResolver},{type:Ha},{type:void 0,decorators:[{type:e.Inject,args:[zr]}]}]},vt([e.ContentChildren(Ga),Ct("design:type",e.QueryList)],t.prototype,"customHeadersTemplates",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"onGridChange",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"rowActions",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"gridActions",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"gridOptions",null),t=vt([e.Component({selector:"dato-grid-controller",template:"\n <ng-content></ng-content>\n ",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[fr,La,sr],styles:[":host{display:flex;flex-direction:column;flex-grow:1}"]}),bt(9,e.Inject(zr)),Ct("design:paramtypes",[La,fr,e.ChangeDetectorRef,je,_n,e.ElementRef,e.Injector,e.ComponentFactoryResolver,Ha,Object])],t)}(),Ka=function(){function t(t,e){this.controller=t,this.host=e}return Object.defineProperty(t.prototype,"grid",{set:function(t){var e=Ft("ag-grid-angular",this.host.nativeElement);this.controller._initializeGrid(t,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this.controller?this.controller.gridOptions:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableBackground",{get:function(){return!!this.gridOptions&&this.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableV2_1",{get:function(){return!!this.gridOptions&&this.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPivotStyle",{get:function(){return this.gridOptions&&this.gridOptions.usePivotGridStyle},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:Ua},{type:e.ElementRef}]},vt([e.ViewChild(st.AgGridNg2,{static:!0}),Ct("design:type",st.AgGridNg2),Ct("design:paramtypes",[st.AgGridNg2])],t.prototype,"grid",null),t=vt([e.Component({selector:"dato-grid-v2",template:'<ag-grid-angular data-auto-id="grid" class="dato-grid ag-theme-material" [class.has-background]="enableBackground" [class.enable-v2_1]="enableV2_1"\n [class.with-multi-selection-col]="gridOptions?.showMultiSelectionCheckboxes" [class.pivot-style]="isPivotStyle">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]="enableBackground"></dato-grid-pagination-v2>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-icon-checkbox-indeterminate:before{text-align:center;content:'-';display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}dato-grid-v2 .ag-overlay-wrapper ng-component{display:flex}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}"]}),Ct("design:paramtypes",[Ua,e.ElementRef])],t)}(),Wa=function(){function t(t){this.popover=t}return t.prototype.ngOnInit=function(){var t=this,e=this.popover.data,n=e.api,r=e.gridQuery,a=e.gridService;this.api=n.columns;var s=this.api.getRowGroupColumns();this.columns=this.popover.data.gridQuery.getAllColumns().filter((function(t){return!s.includes(t)})).map((function(t){return{label:t.getColDef().headerName,column:t,id:t.getColId()}})).sort((function(t,e){var n=r.getCurrentGridSettings().columnsOrder;return n.indexOf(t.id)-n.indexOf(e.id)}));var l=this.columns.filter((function(t){return t.column.isVisible()})).map((function(t){return t.id}));this.columnControl=new o.FormControl(l),this.columnControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.api.setColumnsVisible(r.getAllColumns(),!1),t.api.setColumnsVisible(e,!0),a.fitGrid("container");var n=r.getGridOptions(),o=n.enableSearch,i=n.includeHiddenColumnsInSearch;o&&!i&&r.getSearchTerm()&&a.notifyFilterUpdate()}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:oa}]},t=vt([e.Component({selector:"dato-grid-columns-display-menu",template:'<div class="pl-10 pr-10 pt-10 list-section overflow-hidden">\n <div class="dato-sub-headline mb-15">{{ \'core.columns\' | translate }}</div>\n <dato-input placeholder="core.search-columns" #search></dato-input>\n <dato-list-v2 [searchController]="search" [options]="columns" [formControl]="columnControl" [isSortList]="false"></dato-list-v2>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;flex-direction:column;max-height:inherit}.list-section{max-height:305px}"]}),Ct("design:paramtypes",[oa])],t)}(),Qa=function(){function t(t){this.popover=t,this.addGroup=new o.FormControl,this.activeGroups=[]}return t.prototype.ngOnInit=function(){var t=this;this.api=this.popover.data.api.columns,this.initMenu(),this.addGroup.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=e.column;t.api.addRowGroupColumn(n),t.api.setColumnVisible(n,!1),t.popover.data.gridService._logEvent("Grids - Group Added",{totalNumOfGroups:t.api.getRowGroupColumns().length,column:n.getColId(),groupedFrom:"Table Toolbar"}),t.initMenu()}))},t.prototype.ngOnDestroy=function(){},t.prototype.reorderGroups=function(t){var e=this,n=t.oldIndex,o=t.newIndex;this.api.moveRowGroupColumn(n,o);var i=this.api.getAllDisplayedColumns().find((function(t){return e.activeGroups[o].getColId()===t.getColDef().showRowGroup}));this.api.moveColumn(i,0)},t.prototype.clearGrouping=function(){this.activeGroups.length>0&&(this.api.setRowGroupColumns([]),this.initMenu())},t.prototype.removeColumn=function(t){this.api.removeRowGroupColumn(t),this.initMenu()},t.prototype.initMenu=function(){var t=this;this.addGroup.reset(null,{emitEvent:!1}),this.activeGroups=xt(this.api.getRowGroupColumns()),this.optionalColumns=this.api.getAllDisplayedColumns().filter((function(e){return!t.activeGroups.find((function(t){return t.getColId()===e.getColDef().showRowGroup}))})).map((function(t){return{label:t.getColDef().headerName,id:t.getColId(),column:t}}))},t.ctorParameters=function(){return[{type:oa}]},t=vt([e.Component({selector:"dato-grid-groups-menu",template:'<div class="header dato-simple-bold pl-10 primary-600-color primary-0-background-color d-flex align-start-center">{{ \'core.group-by\' | translate }}</div>\n<div class="body p-10">\n <dato-sortable *ngIf="activeGroups.length > 0" class="width-100" [datoList]="activeGroups"\n (orderUpdated)="reorderGroups($event)">\n <div *ngFor="let column of activeGroups; index as i"\n class="d-flex align-start-center primary-0-background-color group-item mb-5">\n <dato-icon height="18px" [attr.data-auto-id]="\'grid-group-menu-drag-\' + column.getColId()" datoIcon="drag-01" class="handler primary-300-color" datoSortableHandle></dato-icon>\n <div class="d-flex-grow ellipsis dato-note column-name" [datoTooltip]="column.getColDef().headerName"\n datoTooltipOnTextOverflow="true" datoTooltipPosition="bottom"> {{ column.getColDef().headerName }}</div>\n <dato-icon-button [attr.data-auto-id]="\'grid-group-menu-remove-\' + column.getColId()" datoSize="md"\n datoType="none"\n icon="close" class="ml-10 pointer mr-5 remove-group"\n (click)="removeColumn(column)"></dato-icon-button>\n </div>\n </dato-sortable>\n <dato-select *ngIf="activeGroups.length < 3 && optionalColumns.length > 0" [formControl]="addGroup" [dataSet]="optionalColumns"\n placeholder="core.create-new-group" datoSize="md" #select data-auto-id="grid-group-column-selection">\n <dato-option *ngFor="let option of select.data" [option]="option"\n [attr.data-auto-id]="\'grid-group-column-selection-option-\' + option.id"> {{ option.label }} </dato-option>\n </dato-select>\n</div>\n<div class="footer primary-0-background-color d-flex align-end-center">\n <dato-link class="mr-30 no-select" datoType="secondary" datoSize="sm" data-auto-id="grid-group-menu-clear-groups"\n (click)="clearGrouping()">{{ \'core.clear-grouping\' | translate }}</dato-link>\n <dato-button class="mr-10" datoType="primary" datoSize="sm" data-auto-id="grid-group-menu-done"\n datoPopoverClose>{{ \'core.done\' | translate }}</dato-button>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".header{height:40px}.body{height:120px}.footer{height:46px}.group-item{height:30px}.handler{min-width:24px}"]}),Ct("design:paramtypes",[oa])],t)}(),$a=function(){function t(t,e){this.controller=t,this.gridQuery=e,this.displayRowCount=!0}return Object.defineProperty(t.prototype,"enableBackground",{get:function(){return this.controller.gridOptions.enableBackground},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.rowCount$=this.gridQuery.gridReady$.pipe(r.switchMap((function(){return t.rowsCount()})))},t.prototype.rowsCount=function(){var t=this;return this.gridQuery.isServerSide?this.gridQuery.serverDataLoaded$.pipe(r.map((function(){return t.gridQuery.serverSideConfig.totalRows}))):this.gridQuery.rowDataChanged$.pipe(r.map((function(t){return t.api.getDisplayedRowCount()})))},t.ctorParameters=function(){return[{type:Ua},{type:fr}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"displayRowCount",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"headerClass",void 0),t=vt([e.Component({selector:"dato-grid-header-v2",template:'<div class="d-flex justify-start items-center mb-20" [class.mx-30]="enableBackground">\n <span class="dato-mid-headline" [ngClass]="headerClass" data-auto-id="grid-header">\n <ng-content></ng-content>\n <ng-container *ngIf="displayRowCount">\n <span *ngIf="(rowCount$ | async)as rowCount" class="ml-5 mr-10">({{rowCount | number}})</span>\n </ng-container>\n </span>\n <ng-content select=".after-title"></ng-content>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[Ua,fr])],t)}();
326
+ */var da,ua=function(t){return t.value},ha=function(t){return{id:t,label:Lt(t)?"(Empty)":(""+t).trim(),value:t}},ga=function(t,e){var n=t.value,o=t.formattedValue;return{id:e&&n?n[e]:n,label:Lt(o)?"(Empty)":(""+(e?o[e]:o)).trim(),value:e&&n?n[e]:n}},fa=function(){function a(e,n,i,r,a){var s,l=this;this.host=e,this.popover=n,this.fb=i,this.translate=r,this.cdr=a,this.gridFilterTypes=t.DatoGridFilterTypes,this.columnValues=[],this.listOptions=[],this.filterSections=((s={})[t.DatoGridFilterSections.By_Value]=!0,s[t.DatoGridFilterSections.Conditional]=!0,s),this.rangeOperand=t.DatoFilterConditions.IN_RANGE,this.isClientSideGrid=!1,this.listSearchControl=new o.FormControl,this.loadingList=!1,this.serverSearchErrored=!1,this.applyHotKeyConfig={keys:"meta.enter",handler:function(){return l.closePopUp()},description:"core.apply-filters"},this.hotKeyTooltip=pa(this.applyHotKeyConfig.keys),this.activeAccordionId=0,this.showClearFiltersButton=!0,this.excludedValues=new Set}return Object.defineProperty(a.prototype,"operatorToggler",{set:function(t){t&&this.inputConditionsOperator&&(t.forEach((function(t){t.isDisabled||t.setDisabledState(!0)})),this.cdr.detectChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"byValueControl",{get:function(){return this.filterForm.get("byValue")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditionsControls",{get:function(){return this.conditions.controls},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditionsOperator",{get:function(){return this.filterForm.get("conditional.operator").value},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultOperand",{get:function(){return this.fb.group({type:[this.conditionalFilterOptions[0]],value:[null,o.Validators.required],rangeEnd:[null]})},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isPredefinedListItems",{get:function(){var t=this.colDef.filtersConfig,e=void 0===t?{}:t;return e.predefinedListValues&&"object"==typeof e.predefinedListValues[0]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultConditional",{get:function(){return this.fb.group({operator:[this.inputConditionsOperator||t.OperatorTypes.AND],conditions:this.fb.array([this.defaultOperand])})},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultByValue",{get:function(){return[this.columnValues]},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"defaultForm",{get:function(){var t={};return this.filterSections.By_Value&&(t.byValue=this.defaultByValue),this.filterSections.Conditional&&(t.conditional=this.defaultConditional),this.fb.group(t)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"conditions",{get:function(){return this.filterForm.get("conditional.conditions")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"colFilter",{get:function(){var t=this.gridQuery.getFilter()[this.colField];return t&&he(this.pivotKeys,t.pivotKeys)?t:null},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"colDef",{get:function(){return this.popover.data.column.getColDef()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"pivotKeys",{get:function(){return this.colDef.pivotKeys||[]},enumerable:!0,configurable:!0}),a.prototype.ngOnInit=function(){var e,n=this,o=this.popover.data,a=o.gridService,s=o.gridQuery,l=this.colDef,c=l.filter,p=l.pivotValueColumn,d=l.pivotKeys,u=s.api.columns.getAllColumns().map((function(t){return t.getColDef()}));this.colField=cr(this.colDef);var h,g=u.find((function(t){return t.field===n.colField})),f=g.filtersConfig||this.colDef.filtersConfig||{},m=c||g.filter,y=Sr[m];if(this.pivotColumn=s.api.columns.getSecondaryPivotColumn(d,p),this.inputConditionsOperator=f.inputConditionsOperator,Lt(f.showClearFiltersButton)||(this.showClearFiltersButton=f.showClearFiltersButton),f.sections&&(this.filterSections=((e={})[f.sections]=!0,e)),this.keepPredefinedListOriginalOrder=f.keepPredefinedListOriginalOrder&&!kt(f.predefinedListValues),this.filterType=y?m:t.DatoGridFilterTypes.String,this.listLabelType=this.filterType.toLowerCase(),this.listSortByKey=this.filterType===t.DatoGridFilterTypes.Number&&this.colDef.valueFormatter?"id":"label",this.gridQuery=s,this.gridService=a,this.hasFilter$=this.gridQuery.select((function(t){return t.settings.filter[n.colField]})).pipe(r.map((function(t){return!Lt(t)&&he(t.pivotKeys,n.pivotKeys)}))),this.filterSections.Conditional){var v=y||Cr;if(f.showEmptyConditions){var b=[t.DatoFilterConditions.IS_EMPTY,t.DatoFilterConditions.NOT_EMPTY];this.filterType===t.DatoGridFilterTypes.Number&&(b=[t.DatoFilterConditions.IS_NULL,t.DatoFilterConditions.NOT_NULL]),v=xt(v,b)}this.conditionalFilterOptions=v.map((function(e,o){return{id:o,operand:e,label:n.translate.transform("core."+(n.filterType===t.DatoGridFilterTypes.Date?"DATE_":"")+e)}}))}if(this.filterSections.By_Value){var C=f.predefinedListValues;if(this.isClientSideGrid=!Lt(C)||!s.isServerSide,!C||this.isStringArray(C)){if(S=C)this.columnValues=S,this.listOptions=S.map(ha);else{var w=this.getColumnValues().filter((function(t){return!Lt(t.value)}));this.columnValues=w.map((function(t){var e=t.value;return!Lt(n.pivotColumn)&&e?e[n.colField]:e})),this.listOptions=w.map((function(t){return ga(t,!Lt(n.pivotColumn)&&n.colField)}))}}else{var S=C;this.columnValues=S.map(ua),this.listOptions=S}h=this.listOptions,this.isClientSideGrid||this.listSearchControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(t){n.serverSearchErrored=!1,""===t.trim()?(n.loadingList=!1,n.listOptions=h,n.patchAndReRegister(n.columnValues),n.cdr.detectChanges()):n.getValuesFromServer(t)}))}this.initForm()},a.prototype.closePopUp=function(){this.applyFilters(),this.popover.close()},a.prototype.applyFilters=function(){if(this.filterForm.valid&&this.filterForm.updateValueAndValidity(),this.filterForm.dirty&&(this.filterForm.valid||this.filterForm.get("conditional").pristine)){var t=this.popover.data.column,e=this.buildFilter();kt(e)?this.gridService.clearColumnFilter(this.colField):this.gridService.setColumnFilter(t,e),this.gridService.notifyFilterUpdate()}},a.prototype.clearFilters=function(){this.gridService.clearColumnFilter(this.colField),this.resetForm()},a.prototype.removeCondition=function(t){this.conditions.removeAt(t),this.filterForm.markAsDirty()},a.prototype.addCondition=function(){this.filterForm.markAsPristine(),this.conditions.push(this.defaultOperand)},a.prototype.getOperandType=function(t){var e=this.conditions.at(t).value.type;return e?e.operand:null},a.prototype.isConditionalEmpty=function(t){var e=t&&t.value&&t.value.type?t.value.type.operand:null;return this.isEmptyOperand(e)},a.prototype.ngOnDestroy=function(){this.byValueSubscription&&this.byValueSubscription.unsubscribe()},a.prototype.getByValueExcludeValues=function(t,e){var n;if(void 0===e&&(e=!1),this.isPredefinedListItems){var o=this.colDef.filtersConfig.predefinedListValues;n=new Set(t.map((function(t){return o.find((function(e){return e.value===t})).id})))}else n=new Set(t.map((function(t){return Pt(t)?t.value:t})));return e?this.listOptions.filter((function(t){var e=t.value;return!n.has(e)})):this.columnValues.filter((function(t){return!n.has(t)}))},a.prototype.buildFilter=function(){var t=this,e=this.filterForm.value,n=e.byValue,o=e.conditional,i={};return this.filterSections.Conditional&&this.setConditionalFilter(i,o),this.filterSections.By_Value&&this.setByValueFilter(i,n),(i.byValue||i.conditional)&&(i.colId=this.colDef.colId,i.pivotKeys=this.pivotKeys,this.pivotColumn&&(i.pivotFieldsMap=this.getPivotFields(this.pivotColumn.getParent()).reduce((function(e,n,o){return t.pivotKeys[o]&&(e[n]=t.pivotKeys[o]),e}),{}))),i},a.prototype.initForm=function(){var t=this.colFilter;this.filterForm=t?this.buildFormFromFilter(t):this.defaultForm,this.registerOperandListeners(),!this.isClientSideGrid&&this.filterSections.By_Value&&this.registerByValueListener()},a.prototype.buildFormFromFilter=function(t){var e={};return this.filterSections.Conditional&&(e.conditional=this.buildConditionalFilter(t.conditional)),this.filterSections.By_Value&&(e.byValue=this.buildByValueFilter(t.byValue)),this.fb.group(e)},a.prototype.resetForm=function(){this.filterForm.setErrors(null);var e={};if(this.filterSections.By_Value&&(e={byValue:this.columnValues}),this.filterSections.Conditional){e=mt(mt({},e),{conditional:{operator:t.OperatorTypes.AND,conditions:[{type:this.conditionalFilterOptions[0],value:null,rangeEnd:null}]}});var n=this.filterForm.controls.conditional;n.removeControl("conditions"),n.addControl("conditions",this.fb.array([this.defaultOperand]))}this.filterForm.reset(e,{emitEvent:!1}),this.filterForm.updateValueAndValidity()},a.prototype.getColumnValues=function(){var e,n=[],o=this.colFilter,i={},r=o&&o.byValue&&o.byValue.condition,a=this.gridQuery.api.grid,s=ve(this.getValueAndFormattedValue)(this.colField,a,this.colDef.valueFormatter);if(this.isClientSideGrid)a.forEachNodeAfterFilterAndSort((function(t){n.push(s(t)),i[t.id]=!0}));else{var l=a.paginationGetPageSize(),c=l*a.paginationGetCurrentPage(),p=c+l;a.forEachNode((function(t){var e=t.rowIndex;e>=c&&e<p&&n.push(s(t))}))}if(r)if(r===t.DatoFilterConditions.NOT_IN_LIST){var d=this.colDef.valueFormatter,u=o.byValue.values.map((function(t){return{value:t,formattedValue:d?d({value:t}):t}}));n=n.concat(u)}else{var h=this.colFilter.conditional,g=mt(mt({},this.gridQuery.getFilter()),((e={})[this.colField]={conditional:h},e));a.forEachLeafNode((function(t){!i.hasOwnProperty(t.id)&&Er({row:t,api:a},g)&&n.push(s(t))}))}return ue(n,"value")},a.prototype.getValueAndFormattedValue=function(t,e,n,o){var i=e.getValue(t,o);return{value:i,formattedValue:n?n({value:i}):i}},a.prototype.setConditionalFilter=function(e,n){var o=this,i=n.operator,r=n.conditions;r.filter((function(t){var e=t.value,n=t.type;return!Lt(e)||o.isEmptyOperand(n.operand)})).length&&(e.conditional={type:this.colDef.filter||t.DatoGridFilterTypes.String,operator:i,conditions:r.map((function(e){var n=e.value,i=e.type,r=e.rangeEnd,a={condition:i.operand,value:n};if(i.operand===t.DatoFilterConditions.IN_RANGE){var s=mt(mt({},a),{rangeEnd:r});if(o.filterType===t.DatoGridFilterTypes.Date){var l=n,c=l.from,p=l.to;s={condition:i.operand,value:c,rangeEnd:p}}return s}return a}))})},a.prototype.setByValueFilter=function(e,n){if(this.isClientSideGrid){var o=this.columnValues.length;if(n.length!==o){var i=n.length<o/2?t.DatoFilterConditions.IN_LIST:t.DatoFilterConditions.NOT_IN_LIST;e.byValue={condition:i,values:i===t.DatoFilterConditions.IN_LIST?n:this.getByValueExcludeValues(n)}}}else{var r=Array.from(this.excludedValues.values());r.length>0&&(e.byValue={condition:t.DatoFilterConditions.NOT_IN_LIST,values:r})}},a.prototype.buildByValueFilter=function(e){return e?(e.values.length&&this.filterSections.Conditional&&(this.activeAccordionId=1),e.condition===t.DatoFilterConditions.NOT_IN_LIST?(this.isClientSideGrid||(this.excludedValues=new Set(e.values)),[this.getByValueExcludeValues(e.values)]):[e.values]):this.defaultByValue},a.prototype.buildConditionalFilter=function(t){return t?this.fb.group({operator:[this.inputConditionsOperator||t.operator],conditions:this.fb.array(this.buildConditions(t.conditions))}):this.defaultConditional},a.prototype.buildConditions=function(t){var e=this;return t.map((function(t){var n=t.condition,i=t.value,r={type:[{id:e.conditionalFilterOptions.findIndex((function(t){return t.operand===n})),operand:n,label:"core."+n}],value:[i,o.Validators.required],rangeEnd:null};return xr(t)&&(r.rangeEnd=[t.rangeEnd,o.Validators.required],r.value=[{from:t.value,to:t.rangeEnd},o.Validators.required]),e.fb.group(r)}))},a.prototype.registerOperandListeners=function(){var e=this;this.conditions&&this.conditions.valueChanges.pipe(r.startWith(this.conditions.length),r.map((function(){return e.conditions.length})),r.distinctUntilChanged(),r.switchMap((function(){var t=e.conditions.controls.map((function(t,e){return t.get("type").valueChanges.pipe(r.map((function(t){return{value:t,index:e}})))}));return n.merge.apply(void 0,xt(t))})),i.untilDestroyed(this)).subscribe((function(n){var o=n.value.operand,i=n.index,r={index:i,inRange:o===t.DatoFilterConditions.IN_RANGE};e.filterType===t.DatoGridFilterTypes.Date?e.updateDateInput(r):e.filterType===t.DatoGridFilterTypes.Number&&e.updateNumberInput(r),e.updateValueControlValidator(o,i)}))},a.prototype.updateDateInput=function(t){var e=t.inRange,n=t.index,o=this.conditions.at(n).get("value");if(o.dirty){var i=o.value,r=e?{from:i,to:i}:i.from;o.patchValue(r)}},a.prototype.updateNumberInput=function(t){var e=t.inRange,n=t.index,i=e?o.Validators.required:null,r=this.conditions.at(n).get("rangeEnd");r.setValidators(i),r.updateValueAndValidity()},a.prototype.updateValueControlValidator=function(t,e){var n=this.isEmptyOperand(t)?null:o.Validators.required,i=this.conditions.at(e).get("value");i.setValidators(n),i.updateValueAndValidity()},a.prototype.isEmptyOperand=function(e){return e===t.DatoFilterConditions.IS_EMPTY||e===t.DatoFilterConditions.NOT_EMPTY||e===t.DatoFilterConditions.IS_NULL||e===t.DatoFilterConditions.NOT_NULL},a.prototype.isStringArray=function(t){return Mt(t[0])},a.prototype.getValuesFromServer=function(e){var n,o=this;this.loadingList=!0,this.listOptions=[];var i={failCallback:function(){o.loadingList=!1,o.serverSearchErrored=!0,o.listOptions=[],o.cdr.detectChanges()},successCallback:function(t){o.loadingList=!1;var e=t.map((function(t){return t[o.colField]}));o.listOptions=e.map(ha),o.patchAndReRegister(e),o.cdr.detectChanges()},serverConfig:{pageSize:30,pageNumber:1,columnFilters:(n={},n[this.colField]={operator:t.OperatorTypes.AND,filters:[{condition:t.DatoFilterConditions.CONTAINS,value:e}]},n),sort:[],columnsToReturn:[this.colField],distinctResults:!0}};this.gridService._originalGetRows(i),this.cdr.detectChanges()},a.prototype.patchAndReRegister=function(t){this.byValueSubscription.unsubscribe(),this.byValueControl.patchValue(this.getNonExcludedValues(t)),this.registerByValueListener()},a.prototype.registerByValueListener=function(){var t=this,e=this.byValueControl;this.byValueSubscription=e.valueChanges.pipe(r.startWith(e.value),r.pairwise()).subscribe((function(e){var n=St(e,2),o=n[0],i=n[1],r=i.length<o.length;(r?le(o,i):le(i,o)).forEach((function(e){return r?t.excludedValues.add(e):t.excludedValues.delete(e)}))}))},a.prototype.getNonExcludedValues=function(t){var e=this;return t.filter((function(t){return!e.excludedValues.has(t)}))},a.prototype.getPivotFields=function(t,e){void 0===e&&(e=[]);var n=t.getParent(),o=t.getOriginalColumnGroup().getColGroupDef().headerClass;return n&&this.getPivotFields(n,e),o&&e.push(o[0]),e},a.ctorParameters=function(){return[{type:e.ElementRef},{type:oa},{type:o.FormBuilder},{type:_n},{type:e.ChangeDetectorRef}]},vt([e.ViewChildren("operatorToggler"),Ct("design:type",e.QueryList),Ct("design:paramtypes",[e.QueryList])],a.prototype,"operatorToggler",null),a=vt([e.Component({selector:"dato-grid-filter",template:'<form class="container primary-0-background-color" [formGroup]="filterForm" datoForm\n *datoSubscribe="hasFilter$ as hasFilter">\n <ng-container>\n <dato-accordion closeOthers="true" class="filter-options" [activeIds]="activeAccordionId">\n <ng-container *ngIf="filterSections.Conditional">\n\n <dato-accordion-group>\n <dato-accordion-header class="dato-note-bold primary-600-color" data-auto-id="conditional-filters"\n [class.primary-100-background-color]="header_1.isOpen" #header_1>\n <div class="px-10 d-flex align-start-center">\n <div class="filter-title d-flex-grow d-flex align-start-center">{{\'core.filterByCondition\' | translate}}</div>\n <dato-icon class="primary-200-color" height="18px"\n [icon]="header_1.isOpen ? \'collapse\' : \'expand\'"></dato-icon>\n </div>\n </dato-accordion-header>\n <dato-accordion-content #conditionalContent>\n <div class="conditional-content-container d-flex-column" formGroupName="conditional"\n [class.multi-conditions]="conditionsControls.length > 1">\n <div class="operand d-flex-column mb-10"\n [attr.data-auto-id]="\'condition-\' + i"\n *ngFor="let operand of conditionsControls; index as i; last as last">\n <div class="d-flex">\n <div class="d-flex-column d-flex-grow min-width-0">\n <ng-container formArrayName="conditions">\n\n <ng-container [formGroupName]="i">\n <dato-select datoSize="sm" class="mb-10" [attr.data-auto-id]="\'condition-\' + i + \'-operand\'" formControlName="type"\n datoSelectClass="operand-select"\n [dataSet]="conditionalFilterOptions"\n [isCombo]="false" #select>\n <dato-option *ngFor="let option of select.data; index as index"\n [option]="option">\n {{ option.label }}\n </dato-option>\n </dato-select>\n <ng-container [ngSwitch]="filterType">\n <div class="d-flex" *ngSwitchCase="gridFilterTypes.Date">\n <dato-date-picker [attr.data-auto-id]="\'condition-date-\' + i + \'-value\'"\n formControlName="value" class="d-flex-grow range-calendar">\n <ng-template>\n <dato-date-picker-range *ngIf="getOperandType(i) === rangeOperand; else singleDate"></dato-date-picker-range>\n <ng-template #singleDate>\n <dato-date-picker-single></dato-date-picker-single>\n </ng-template>\n </ng-template>\n </dato-date-picker>\n </div>\n <ng-container *ngIf="!isConditionalEmpty(operand)">\n <dato-input *ngSwitchCase="gridFilterTypes.String" datoSize="sm"\n (keydown.enter.stop.prevent)="closePopUp()"\n datoControlErrors [attr.data-auto-id]="\'condition-string-\' + i + \'-value\'"\n [datoControlErrorsOnBlur]="false"\n class="condition-value"\n placeholder="core.filter" formControlName="value"\n [isFocused]="conditionalContent._expanded"\n ></dato-input>\n <div class="d-flex" *ngSwitchCase="gridFilterTypes.Number">\n <dato-input-number (keydown.enter.stop.prevent)="closePopUp()" [showControls]="false"\n class="width-100 condition-value" allowNegative="true">\n <input type="number" formControlName="value" [attr.data-auto-id]="\'condition-number-\' + i + \'-value\'"\n datoInputNumber datoSize="sm" datoControlErrors [datoAutoFocus]="conditionalContent._expanded"\n [datoControlErrorsOnBlur]="false"/>\n </dato-input-number>\n <ng-container *ngIf="getOperandType(i) === rangeOperand">\n <div class="mx-5">-</div>\n <dato-input-number (keydown.enter.stop.prevent)="closePopUp()"\n class="width-100 condition-value" allowNegative="true">\n <input type="number" formControlName="rangeEnd" [attr.data-auto-id]="\'condition-number-\' + i + \'-range-end\'"\n datoInputNumber datoSize="sm" datoControlErrors\n [datoControlErrorsOnBlur]="false"/>\n </dato-input-number>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div>\n\n <dato-icon-button datoSize="md"\n datoType="none" icon="trash"\n class="overflow-hidden delete"\n datoTooltip="core.deleteFilterCondition"\n [attr.data-auto-id]="\'condition-\' + i + \'-remove\'"\n (click)="removeCondition(i)"\n datoTooltipPosition="right-start"></dato-icon-button>\n </div>\n </div>\n <dato-operator-toggler class="mt-10 justify-center width-100 d-flex" data-auto-id="operator-toggler"\n expanded="true" [datoTogglerValue]="conditionsOperator"\n *ngIf="conditionsControls.length > 1 && !last"\n formControlName="operator" #operatorToggler></dato-operator-toggler>\n </div>\n <div class="d-flex align-center">\n <dato-link *ngIf="conditionsControls.length < 3" class="no-select" datoSize="sm" data-auto-id="add-condition"\n datoType="secondary" (click)="addCondition()">\n <dato-icon height="10px" width="10px" icon="plus-simple"></dato-icon>\n {{ \'core.condition\' | translate }}\n </dato-link>\n </div>\n </div>\n </dato-accordion-content>\n </dato-accordion-group>\n <div class="separator"></div>\n </ng-container>\n <ng-container *ngIf="filterSections.By_Value">\n <dato-accordion-group class="list-content">\n <dato-accordion-header class="dato-note-bold primary-600-color" data-auto-id="by-value-filters"\n [class.primary-100-background-color]="header_2.isOpen" #header_2>\n <div class="px-10 d-flex align-start-center">\n <div class="filter-title d-flex d-flex-grow align-start-center">{{\'core.filterByValue\' | translate}}</div>\n <dato-icon class="primary-200-color" height="18px"\n [icon]="header_2.isOpen ? \'collapse\' : \'expand\'"></dato-icon>\n </div>\n </dato-accordion-header>\n <dato-accordion-content #byValueContent>\n <div class="value-content-container d-flex-column">\n <dato-input datoSize="sm" placeholder="core.search-all-values" [debounceTime]="300" #search [formControl]="listSearchControl" [isFocused]="byValueContent._expanded"></dato-input>\n <dato-list-v2 class="primary-0-background-color"\n containerHeight="195px"\n [withSelectAll]="true"\n [clientSearch]="isClientSideGrid"\n [sortByKey]="listSortByKey"\n [labelType]="listLabelType"\n [searchController]="search"\n [options]="listOptions"\n [isSortList]="!keepPredefinedListOriginalOrder"\n [loading]="loadingList"\n [noDataTpl]="isClientSideGrid ? null : noData"\n formControlName="byValue"\n data-auto-id="by-value-filters-list">\n </dato-list-v2>\n <ng-template #noData>\n <div *ngIf="serverSearchErrored; else noResults" class="mb-10 d-flex-1 d-flex-column align-center" data-auto-id="by-value-server-error">\n <img class="mt-20" datoStaticSrc="core/grid/filter-server-error.svg"/>\n <p class="dato-note-bold mt-10 mb-10 primary-300-color">{{ \'core.something-went-wrong\' | translate }}</p>\n <p class="dato-note-italic primary-300-color">{{ \'core.try-again-later\' | translate }}</p>\n </div>\n <ng-template #noResults>\n <dato-list-no-result class="mb-10 block" data-auto-id="by-value-no-results"></dato-list-no-result>\n </ng-template>\n </ng-template>\n </div>\n </dato-accordion-content>\n </dato-accordion-group>\n <div class="separator"></div>\n </ng-container>\n </dato-accordion>\n </ng-container>\n <div class="actions no-select px-10 py-12 d-flex align-end-center">\n <dato-link *ngIf="showClearFiltersButton" class="mr-30" datoType="secondary" datoSize="sm"\n (click)="clearFilters()" data-auto-id="clear-filters" [disabled]="!hasFilter">\n {{ \'core.clearFilters\' | translate }}\n </dato-link>\n <dato-button datoSize="sm" [datoTooltip]="hotKeyTooltip" [datoHotkeys]="applyHotKeyConfig" (click)="closePopUp()" data-auto-id="apply-filters">{{\'core.apply\' | translate}}</dato-button>\n </div>\n</form>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host dato-accordion-header{transition:background-color .2s ease-in-out}:host>.container{width:242px}:host .value-content-container dato-input{padding:10px}:host .conditional-content-container{padding:10px;transition:padding-right .2s ease-in-out}:host .conditional-content-container.multi-conditions{padding-right:0}:host .conditional-content-container.multi-conditions .delete{width:24px}:host .filter-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:40px;transition:color .2s ease-in-out}:host .separator{height:1px;width:100%}:host .delete{transition:width .2s ease-in-out;width:0}"]}),Ct("design:paramtypes",[e.ElementRef,oa,o.FormBuilder,_n,e.ChangeDetectorRef])],a)}(),ma=function(){function t(t){this.popover=t}return t.prototype.openMoreMenu=function(t,e,n){return void 0===n&&(n=sa),this.openMenu({tpl:n,origin:t,params:e,menuType:"more"})},t.prototype.openFilterMenu=function(t,e,n){return void 0===n&&(n=fa),this.openMenu({tpl:n,origin:t,params:e,menuType:"filter"})},t.prototype.popoverConfig=function(t,e){return{popper:{placement:"bottom-end"},className:e,data:{api:{grid:t.api,columns:t.columnApi},column:t.column,gridQuery:t.gridQuery,gridService:t.gridService}}},t.prototype.openMenu=function(t){var e=t.tpl,n=t.origin,o=t.params,i=t.menuType;return o.api.hidePopupMenu(),this.popover.open(e,n,this.popoverConfig(o,"dato-grid-"+i+"-menu"))},t.ctorParameters=function(){return[{type:ra}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(ra))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[ra])],t)}(),ya=function(){function o(t,e,n,o){this.vcr=t,this.controller=e,this.host=n,this.cdr=o,this.moreMenuOpen=!1,this.filtersMenuOpen=!1}return o.prototype.afterGuiAttached=function(t){},o.prototype.agInit=function(e){var o=this;this.params=e,this.column=e.column;var a=e.column.getColDef();this.headerInfo=a.info,this.headerName=a.headerName,this.showFilter=a.filter!==t.DatoGridFilterTypes.None,this.showMoreMenu=Lt(a.moreMenuActions)||a.moreMenuActions.length>0,this.field=cr(a),this.headerTooltip=this.getHeaderTooltip(a),this.context={api:{grid:e.api,columns:e.columnApi},column:this.column};var s=this.params,l=s.gridQuery,c=s.gridService;this.customTemplates=c.getCustomHeader(this.field),this.filterActive$=l.select((function(t){return t.settings.filter[o.field]})).pipe(r.map((function(t){var e=t&&he(t.pivotKeys,a.pivotKeys);return ye(t)>0&&e}))),this.params.enableSorting&&(n.fromEvent(this.host.nativeElement,"click").pipe(i.untilDestroyed(this)).subscribe((function(){var t,e=o.column.getColDef()?o.column.getColDef().sortingOrder:null,n=o.column.getSort(),i=o.column.getColId();if(e&&e.length>0){var r=e.indexOf(n);t=e[-1===r||r===e.length-1?0:r+1]}else t="asc"!==n?"asc":"desc";c._logEvent("Grids - Column Action",{action:"Sort",column:i}),l.isServerSide&&c.setLoading(!0),l.getGridOptions().sortByStore?c.setSortByColumn(i,t):o.params.setSort(t)})),this.sortingInfo$=l.waitForGrid((function(){return l.gridRef.sortChanged})).pipe(r.startWith({}),r.map((function(){return{active:o.column.isSorting(),icon:!o.column.isSorting()||o.column.isSortAscending()?"sort-ascending":"sort-descending"}}))))},o.prototype.openFilters=function(t){var e=this;this.filtersMenuOpen=!0,this.controller.openFilterMenu(t.host.nativeElement,this.params).pipe(i.untilDestroyed(this)).subscribe((function(){e.filtersMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.openMoreMenu=function(t){var e=this;this.moreMenuOpen=!0,this.controller.openMoreMenu(t.host.nativeElement,this.params,this.customTemplates.moreMenu).pipe(i.untilDestroyed(this)).subscribe((function(){e.moreMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.ngOnDestroy=function(){},o.prototype.getHeaderTooltip=function(t){if(this.params){var e=t;if(e.showRowGroup){var n=this.params.columnApi.getRowGroupColumns(),o=n&&n.find((function(t){return t.getColId()===e.showRowGroup})),i=o&&o.getColDef();e=i||e}return e.customHeaderTooltip||e.headerName}return""},o.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:ma},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},o=vt([e.Component({selector:"dato-grid-column-header",template:'<div class="d-flex align-start-center" [attr.data-auto-id]="field + \'-column-header\'" [attr.data-field]="field">\n <ng-container *ngIf="customTemplates && customTemplates.customHeader as customHeader">\n <div class="mr-5" [attr.data-auto-id]="field + \'-dynamic-section\'">\n <ng-container *ngTemplateOutlet="customHeader; context: context"></ng-container>\n </div>\n </ng-container>\n <div class="d-flex d-flex-grow align-start-center min-width-0 items-center">\n <span class="dato-simple-bold primary-400-color ellipsis min-width-0 mr-5" [datoTooltip]="headerTooltip"\n datoTooltipPosition="bottom">{{headerName}}</span>\n <div>\n <dato-icon class="primary-300-color" *ngIf="headerInfo" [datoTooltip]="headerInfo" datoTooltipPosition="bottom" datoIcon="question"></dato-icon>\n </div>\n </div>\n <div class="sort-icon opacity-0" *ngIf="params.enableSorting && (sortingInfo$ | async) as sortingInfo"\n [class.active]="sortingInfo.active">\n <dato-icon width="24px" height="16px" class="primary-300-color"\n [attr.data-auto-id]="field + \'-sort\'"\n [icon]="sortingInfo.icon"></dato-icon>\n </div>\n <ng-container *ngIf="showFilter">\n <div class="filter relative" *datoSubscribe="filterActive$ as filterActive">\n <dato-icon-button (click.stop)="openFilters(filters)" datoTooltip="core.filters" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-filter\'" class="filter-icon opacity-0"\n [class.active]="filtersMenuOpen || filterActive"\n datoSize="md" icon="filter"\n #filters></dato-icon-button>\n <div [class.opacity-100]="filterActive"\n class="opacity-0 filter-active-circle accent-400-background-color absolute"></div>\n </div>\n </ng-container>\n <dato-icon-button *ngIf="showMoreMenu" (click.stop)="openMoreMenu(moreMenu)" datoTooltip="core.more-options" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-more-menu\'" [class.active]="moreMenuOpen"\n datoSize="md" icon="more-vertical" #moreMenu></dato-icon-button>\n</div>\n',styles:[":host .filter-icon,:host .sort-icon{transition:opacity .25s linear,width .25s ease-in-out;width:0}:host .sort-icon{height:16px}:host .filter-icon.active,:host .sort-icon.active{opacity:1;width:24px}:host:hover .filter-icon,:host:hover .sort-icon{opacity:1;width:24px}:host .filter-active-circle{pointer-events:none;transition:opacity .2s ease-in-out;position:absolute;height:8px;width:8px;top:2px;right:2px;border-radius:4px;border:1px solid #fff}:host ::ng-deep .filter dato-icon-button dato-icon{transition:color .2s ease-in-out}"]}),Ct("design:paramtypes",[e.ViewContainerRef,ma,e.ElementRef,e.ChangeDetectorRef])],o)}();function va(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}var ba=function(t){return t[Ia]},Ca={getDataPath:ba,components:{fileCellRenderer:function(t){var e=t.data,n=t.eGridCell,o=t.colDef,i=e.icon,r=e.isFolder,a=e.initials,s=void 0===a||a,l=function(t,e,n){if(null===t)return null;var o=function(t,e){var n=e.expanded,o=e.collapsed;return t.parentElement.classList.contains("ag-row-group-expanded")?n:o};return void 0===t?n?o(e,{expanded:"folder-open",collapsed:"folder-closed"}):null:"string"==typeof t?t:o(e,t)}(i,n,r),c=e[o.field],p=o.gridService.svgRegistry;if(r&&Ra(t.node),l)return'<span class="dato-simple-bold"> <span class="da-grid-icon folder d-flex">'+p.getSvg(l)+'</span><span class="entity-display-name"></span> '+c+"</span>";if(r)return Ra(t),'<span class="entity-display-name dato-simple-bold">'+c+"</span>";if(s){var d=Ee(c);return d?'<span class="entity-display-name dato-simple-bold"><span class="initials">'+d+"</span>"+c+"</span>":'<span class="entity-display-name dato-simple-bold">'+c+"</span>"}return'<span class="entity-display-name dato-simple-bold">'+c+"</span>"}},onRowDragMove:function(t){var e,n=t.overNode,o=t.node;e=n?n.data.isFolder?n:n.parent:o.rowModel.rootNode;if(Ta){if(Ta.id===e.id)return;var i=Aa(Ta.id);i&&i.classList.remove("ag-row-hover"),Ta=null}else Ta=e;if(e){var r=Aa(e.id);r&&r.classList.add("ag-row-hover")}},onRowDragEnd:function(t){var e,n,o=t.overNode,i=t.node;o?(e=i.parent,n=o.data.isFolder?o:o.parent):(e=i.rowModel.rootNode,n=i.rowModel.rootNode);var r=i.data,a=i.gridOptionsWrapper.gridOptions.maxDepth||-1;if(r.isFolder&&-1!==a&&"ROOT_NODE_ID"!==e.id&&o.data.agGridFilePath.length>a)return;var s=n.data?n.data[Ia]:[],l=!jt(s,r[Ia]),c=function t(e,n){for(var o=e.childrenAfterGroup,i=0;i<o.length;i++){if(n&&o[i].key===n.key)return!0;t(o[i],n)}return!1}(i,n);c&&console.log("invalid move");if(l&&!c){var p=[],d=this.autoGroupColumnDef.gridService.treeConfig.idKey;!function t(e,n,o,i){var r=n.data,a=n.childrenAfterGroup,s=e.slice();r[Ia]=s,o.push(r),ye(a)>0&&a.forEach((function(e){t(xt(s,[r[i]]),e,o,i)}));r[Ia].push(r[i])}(s,i,p,d);var u=this.autoGroupColumnDef.gridService.updateRows(p);g=xt(u.update,[o,e]),f=["ag-row-level-1","ag-row-level-2","ag-row-level-3"],g.forEach((function(t){var e,n,o=document.querySelectorAll('[row-id="'+t.id+'"]')[1];if(o){try{for(var i=wt(f),r=i.next();!r.done;r=i.next()){var a=r.value;if(o.classList.contains(a)){o.classList.remove(a);break}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}o.classList.add("ag-row-level-"+t.level),t.data.isFolder&&Ra(t,o)}}));var h=Aa(Ta.id);h&&h.classList.remove("ag-row-hover"),Ta=null,this.api.clearFocusedCell()}var g,f},onRowSelected:function(t){if(Ea)return;Ea=!0,e=t.node,n=t.node.selected,e.allChildrenCount>0&&e.allLeafChildren.forEach((function(t){t.setSelected(n)})),function(t){var e=t.parent;for(;e&&"ROOT_NODE_ID"!==e.id;)Pa(e),e=e.parent}(t.node),setTimeout((function(){Ea=!1}),0);var e,n},onRowGroupOpened:function(t){var e=t.node;this.api.refreshCells({force:!0,rowNodes:[e]})},suppressRowClickSelection:!0,groupSelectsChildren:!0,icons:{rowDrag:'<dato-icon icon="drag" class="dato-icon-font-drag primary-400-color"></dato-icon>'}},wa=function(t,e){return(t||"").toLowerCase().localeCompare((e||"").toLowerCase())},Sa={filter:t.DatoGridFilterTypes.String,comparator:wa},xa=mt({hoverConfig:{enabled:!0,maxDisplayedItems:3},enableV2_1:!1,enableSearch:!1,enableSearchHighlight:!0,columnsIncludedInSearchByDefault:!0,includeHiddenColumnsInSearch:!1,enableAllPagesSelection:!0,idColumnKey:"id",enableBackground:!0,columnTypes:(da={},da[t.DatoGridColumnTypes.Date]={filter:t.DatoGridFilterTypes.Date,comparator:function(t,e){return va(t)-va(e)}},da[t.DatoGridColumnTypes.Number]={filter:t.DatoGridFilterTypes.Number},da[t.DatoGridColumnTypes.String]=Sa,da[t.DatoGridColumnTypes.Status]=mt(mt({},Sa),{cellRenderer:"DatoGridStatusCellComponent"}),da[t.DatoGridColumnTypes.Items]=mt(mt({},Sa),{cellRenderer:"DatoGridItemsCellComponent"}),da[t.DatoGridColumnTypes.ItemsCount]=mt(mt({},Sa),{cellRenderer:"DatoGridItemsCountCellComponent"}),da[t.DatoGridColumnTypes.Initials]=mt(mt({},Sa),{cellRenderer:"DatoGridInitialsCellComponent"}),da[t.DatoGridColumnTypes.Avatar]=mt(mt({},Sa),{cellRenderer:"DatoGridAvatarCellComponent"}),da),multiSortKey:"ctrl",suppressPaginationPanel:!0,pagination:!0,deltaColumnMode:!0,loadingOverlayComponentFramework:Ur,noRowsOverlayComponentFramework:Yr,defaultColDef:{minWidth:t.GridMinWidths.Default,sortable:!0,resizable:!0,type:t.DatoGridColumnTypes.String,menuTabs:["filterMenuTab"],headerComponentFramework:ya},suppressCellSelection:!0,suppressPropertyNamesCheck:!0,rowHeight:35,headerHeight:30,rowSelection:t.GridRowSelectionType.MULTIPLE,rowDeselection:!0,unSortIcon:!0,animateRows:!0,rememberGroupStateWhenNewData:!0,groupMultiAutoColumn:!0,groupDefaultExpanded:-1,usePivotGridStyle:!1},Ii()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),Oa={CLIENT:200,SERVER:250},Da={idKey:"id",parentIDKey:"parentID"},Ia="agGridFilePath";var Ta=null,Ea=!1;function Aa(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function Ra(t,e){var n=e||document.querySelectorAll('[row-id="'+t.id+'"]')[0];n&&(0===ye(t.childrenAfterGroup)?n.classList.add("ag-empty-folder"):n.classList.remove("ag-empty-folder"))}function Pa(t){var e=t.allLeafChildren.map((function(t){return t.selected}));if(!e.every((function(t){return!0===t||void 0===t}))){e.shift();var n=e.reduce((function(t,e){if(t===e)return t}));t.selectThisNode(n)}}function ka(t,e){var n=e.parentIDKey,o=e.idKey,i=function(e,r){void 0===r&&(r=!1);var a=r?[e[o]]:[],s=t.find((function(t){return t[o]===e[n]}));if(a.unshift(s[o]),s[n]){var l=i(s);a.unshift.apply(a,xt(l))}return a};return t.map((function(t){var e,r;return t[n]?mt(mt({},t),((e={})[Ia]=i(t,!0),e)):mt(mt({},t),((r={})[Ia]=[t[o]],r))}))}function _a(t,e){return t.map((function(t){var n,o=yt(t,[]),i=o[Ia],r=ye(i)>1?i[i.length-2]:0;return delete o[Ia],mt(mt({},o),((n={})[e.parentIDKey]=r,n))}))}var ja=new e.InjectionToken("DATO_CORE_LOGGER"),Ma=function(){function t(t,e,n){this.gridService=t,this.gridQuery=e,this.cdr=n,this.checkboxControl=new o.FormControl(!1)}return t.prototype.agInit=function(t){var e=this;this.gridApi=t.api,this.gridOptions=this.gridQuery.getGridOptions(),this.subscribeRowsSelectionData(),this.checkboxControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(t){e.toggleMultiSelection(t)}))},t.prototype.subscribeRowsSelectionData=function(){var t=this;this.gridQuery.gridReady$.pipe(r.take(1),r.switchMap((function(){return t.gridQuery.rowsSelectionData$})),i.untilDestroyed(this)).subscribe((function(e){var n=e.selectedPageRowsCount,o=e.isAllPageRowsSelected;t.indeterminatelyChecked=n>0&&!o,t.checkboxControl.patchValue(o,{emitEvent:!1}),t.cdr.detectChanges()}))},t.prototype.toggleMultiSelection=function(t){if(this.gridService.selectAllCurrentPageRows(t),!t&&this.gridQuery.isServerSelectAllRowsEnabled){var e=this.gridQuery.serverSideConfig,n=e.excludedFromSelectAll,o=e.totalRows,i=de(xt(n,this.gridQuery.getCurrentPageRows().map((function(t){return t.id}))));ye(i)===o?this.gridService.setServerSidePagination({selectAllRowsEnabled:!1}):this.gridService.setServerSidePagination({excludedFromSelectAll:i})}},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:La},{type:fr},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-multi-select-column-header",template:'<dato-checkbox class="mt-5" [formControl]="checkboxControl" [indeterminatelyChecked]="indeterminatelyChecked"></dato-checkbox>',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[La,fr,e.ChangeDetectorRef])],t)}(),La=function(){function o(t,e,n,o,i,r,a){this.store=t,this.gridQuery=e,this.translate=n,this.iconRegistry=o,this.svgRegistry=i,this.storageAPI=r,this.logger=a,this.treeConfig=Da,this.pageNumberToReturnAfterRefresh=-1,this.CHECKBOX_SELECTION_COL_ID="grid-checkbox-selection"}return Object.defineProperty(o.prototype,"treeData",{get:function(){return this.isTreeData},set:function(t){this.isTreeData=t},enumerable:!0,configurable:!0}),o.prototype.ngOnDestroy=function(){},o.prototype._setApi=function(t,e){this.api=t,this.gridRef=e,this.gridName=e.gridOptions.gridName,this.setServerSidePagination({enabled:this.isServerSidePagination(e.gridOptions)})},o.prototype.isServerSidePagination=function(t){return"infinite"===t.rowModelType},o.prototype.updateGridContext=function(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this.gridQuery.getGridOptions().context=e?t:qr(this.gridRef.gridOptions.context||{},t)},o.prototype.setSelectedRows=function(t){this.selectRows(t)},o.prototype.selectRows=function(t){var e=me(t).filter((function(t){return!t.isSelected()})),n=e.pop();e.forEach((function(t){return t.setSelected(!0,!1,!0)})),n&&n.setSelected(!0)},o.prototype.deselectRows=function(t){var e=me(t).filter((function(t){return t.isSelected()})),n=e.pop();e.forEach((function(t){return t.setSelected(!1,!1,!0)})),n&&n.setSelected(!1)},o.prototype.setRows=function(t,e,n){var o=this;void 0===e&&(e=!1),void 0===n&&(n={}),this.gridQuery.gridReady$.pipe(r.take(1)).subscribe((function(){if(o.isTreeData){o.treeConfig=mt(mt({},Da),n);var i=ka(t,o.treeConfig);o.api.grid.setRowData(i)}else o.isPivotMode?o.setPivotModeRows(t):o.api.grid.setRowData(t);e?o.fitGrid("container"):Xe()}))},o.prototype.setDatasource=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1),e&&this.updatePageToKeepOnRefreshServerData(),n&&this.setLoading(!0),this._originalGetRows=t,this.api.grid.setDatasource({getRows:this.wrapGetRows(this.gridQuery.getGridOptions(),t)})},o.prototype.refreshServerData=function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),t&&this.updatePageToKeepOnRefreshServerData(),e&&this.setLoading(!0),this.api.grid.setDatasource({getRows:this.gridQuery.getGridOptions().datasource.getRows})},o.prototype.updatePageToKeepOnRefreshServerData=function(){1===this.gridQuery.getGridOptions().maxBlocksInCache&&(this.pageNumberToReturnAfterRefresh=this.api.grid.paginationGetCurrentPage())},o.prototype.addRows=function(t,e){var n={add:me(t)};return Lt(e)||(n.addIndex=e),this.api.grid.updateRowData(n)},o.prototype.updateRows=function(t){var e=me(t);return this.api.grid.updateRowData({update:e})},o.prototype.updateRowValue=function(t,e,n){(Mt(t)?this.api.grid.getRowNode(t):t).setDataValue(e,n)},o.prototype.removeRows=function(t){var e=me(t).map((function(t){return t.data}));return this.api.grid.updateRowData({remove:e})},o.prototype.removeSelectedRows=function(){var t=this.gridQuery.getSelectedRowNodes();return this.removeRows(t)},o.prototype.clearTable=function(){this.setRows([])},o.prototype.updateColumns=function(t,e){if(void 0===e&&(e=!1),!t)throw new To("No columnDefs were provided. 🕵🏻‍♀️");var n=this.normalizeColumns(me(t)),o=e&&this.gridQuery.getCurrentGridSettings();this.api.grid.setColumnDefs(n),o&&this.loadSavedSettings(o)},o.prototype.normalizeOptions=function(e){var n=this;this.customHeadersTemplates=e.customHeadersTemplates;var o={gridService:this,gridQuery:this.gridQuery};if(e.gridOptions.autoGroupColumnDef=mt(mt({},o),e.gridOptions.autoGroupColumnDef),e.gridOptions.defaultColDef=mt(mt({},e.gridOptions.defaultColDef),{headerComponentParams:o}),void 0===e.gridOptions.enableSearch&&(e.gridOptions.enableSearch=e.gridOptions.enableV2_1),void 0===e.gridOptions.enableBackground&&(e.gridOptions.enableBackground=e.gridOptions.enableV2_1),void 0===e.gridOptions.showMultiSelectionCheckboxes&&(e.gridOptions.showMultiSelectionCheckboxes=e.gridOptions.enableV2_1&&e.gridOptions.rowSelection!==t.GridRowSelectionType.SINGLE),void 0===e.gridOptions.enableSearchHighlight&&(e.gridOptions.enableSearchHighlight=e.gridOptions.enableSearch&&xa.enableSearchHighlight),e.gridOptions.columnDefs=this.normalizeColumns(e.gridOptions.columnDefs,e.gridOptions),e.gridOptions.isExternalFilterPresent=function(){return!0},e.gridOptions.doesExternalFilterPass=function(t){return Er({row:t,api:n.gridQuery.api.grid},n.gridQuery.getFilter())&&n.rowMatchesSearch(t)},this.isServerSidePagination(e.gridOptions)){e.gridOptions.blockLoadDebounceMillis=300,this._originalGetRows=e.gridOptions.datasource.getRows,e.gridOptions.datasource.getRows=this.wrapGetRows(e.gridOptions);var i=e.gridOptions.paginationPageSize;i&&(e.gridOptions.cacheBlockSize=i)}this.initEditableColumnsCellClass(e),e.gridOptions.getContextMenuItems=this.wrapContextMenuBuilder(e);var r=e.gridOptions,a=r.saveSettings,s=r.gridName;if(e.gridOptions.saveSettings=!1!==a&&!Lt(s),this.initOnRowSelectedForServerSidePagination(e),e.gridOptions.pivotMode&&(this.initPivotSecondaryColsProcess(e),e.gridOptions.saveSettings=!1),e.gridOptions.usePivotGridStyle){e.gridOptions.rowHeight=30,e.gridOptions.defaultColDef=mt(mt({},e.gridOptions.defaultColDef),{cellClass:this.getPivotCellClass.bind(this),headerClass:this.getPivotHeaderClass.bind(this),cellStyle:function(e){var n={lineHeight:"30px"};return e.colDef.type===t.DatoGridColumnTypes.Number&&(n.textAlign="end"),n}}),e.gridOptions.autoGroupColumnDef=mt(mt({},e.gridOptions.autoGroupColumnDef),{cellClass:this.getPivotCellClass.bind(this),headerClass:this.getPivotHeaderClass.bind(this)})}return e.gridOptions},o.prototype.getPivotHeaderClass=function(t){var e=t.colDef.headerComponentParams.gridQuery,n="";if(e&&e.api){var o=e.api.columns.getSecondaryColumns();o&&o.length>0&&(n+="top-border")}return n},o.prototype.getPivotCellClass=function(t){var e=t.node,n=e.leafGroup,o=e.childIndex,i=e.rowGroupIndex,r=t.colDef.headerComponentParams.gridQuery,a="";if(r&&r.api){var s=r.api.columns.getAllDisplayedColumns(),l=s.find((function(e){return e.getColId()===t.colDef.colId}));i<=s.indexOf(l)&&(n?o%2==0&&(a+="primary-0-background-color"):a+="primary-100-background-color pointer dato-simple-bold")}return a},o.prototype.normalizeColumns=function(e,n){var o=this;void 0===n&&(n=null),n||(n=this.gridQuery.getGridOptions());var i=e.map((function(e){var i=mt(mt({},e),{headerName:o.translate.transform(e.headerName)});return e.info&&(i.minWidth=e.minWidth||t.GridMinWidths.With_Info),e.colId||(i.colId=e.field),i.type!==t.DatoGridColumnTypes.Items||i.filtersConfig||(i.filtersConfig={sections:t.DatoGridFilterSections.Conditional}),o.normalizeColumnSearchConfig(n,e,i),i}));return this.addMultiSelectHeaderColumnIfRequired(i,n)},o.prototype.normalizeColumnSearchConfig=function(e,n,o){var i=this,r=this.isServerSidePagination(e);void 0===n.includeInSearch&&(r&&n.type===t.DatoGridColumnTypes.Date?o.includeInSearch=!1:o.includeInSearch=void 0!==e.columnsIncludedInSearchByDefault?e.columnsIncludedInSearchByDefault:xa.columnsIncludedInSearchByDefault),o.includeInSearch&&!this.hasCellRenderer(o,e)&&e.enableSearchHighlight&&(o.cellRenderer=function(t){return Rt(o.editable)&&o.editable(t)||!Rt(o.editable)&&o.editable?Br(t,i.gridQuery.getSearchTerm()):Hr(t,i.gridQuery.getSearchTerm())})},o.prototype.hasCellRenderer=function(t,e){if(t.cellRenderer)return!0;var n=t.type,o=function(t){return t.columnTypes&&!!t.columnTypes[n]&&!!t.columnTypes[n].cellRenderer};return o(e)||o(xa)},o.prototype.addMultiSelectHeaderColumnIfRequired=function(e,n){var o=n&&n.showMultiSelectionCheckboxes,i=n&&n.rowSelection?n.rowSelection:xa.rowSelection;return o&&i===t.GridRowSelectionType.MULTIPLE?xt([{colId:this.CHECKBOX_SELECTION_COL_ID,checkboxSelection:!0,headerComponentFramework:Ma,width:30,maxWidth:30,suppressSizeToFit:!0,cellClass:"checkbox-selection-cell",headerClass:"header-checkbox-selection-cell",resizable:!1,pinned:"left",lockPosition:!0,includeInSearch:!1}],e):e},o.prototype.initOnRowSelectedForServerSidePagination=function(t){var e=this,n=t.gridOptions;if(this.isServerSidePagination(n)){var o=n.onRowSelected;n.onRowSelected=function(t){if(e.gridQuery.isServerSelectAllRowsEnabled){var n=t.node,i=n.isSelected(),r=e.gridQuery.serverSideConfig.excludedFromSelectAll,a=r.includes(n.id);i&&a?e.setServerSidePagination({excludedFromSelectAll:r.filter((function(t){return t!==n.id}))}):i||a||e.setServerSidePagination({excludedFromSelectAll:xt(r,[n.id])})}o&&o(t)}}},o.prototype.rowMatchesSearch=function(t){var e,n,o=(this.gridQuery.getSearchTerm()||"").toLowerCase().trim();if(kt(o))return!0;var i=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch?this.gridQuery.getAllColumns():this.gridQuery.getAllDisplayedColumns();try{for(var r=wt(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(this.api.grid.getColumnDef(s.getColId()).includeInSearch)if((this.api.grid.getValue(s.getColId(),t)||"").toString().toLowerCase().includes(o))return!0}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!1},o.prototype.fitToContainer=function(){this.api.grid.sizeColumnsToFit()},o.prototype.getCustomHeader=function(t){if(this.customHeadersTemplates){var e=this.customHeadersTemplates.find((function(e){return e.column===t})),n=this.customHeadersTemplates.find((function(t){return!t.column}));if(e||n){var o={moreMenu:e&&e.moreMenu||n&&n.moreMenu,customHeader:e&&e.customHeader||n&&n.customHeader},i=o.moreMenu,r=o.customHeader;return{moreMenu:i&&i.tpl,customHeader:r&&r.tpl}}}return{}},o.prototype.clearAllFilters=function(){this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:{},searchTerm:null})}})),this.notifyFilterUpdate()},o.prototype.clearColumnFilter=function(t){var e=this.gridQuery.getFilter(),n=t,o=(e[n],yt(e,["symbol"==typeof n?n:n+""]));this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:o})}})),this.notifyFilterUpdate()},o.prototype.setColumnFilter=function(t,e,n){void 0===n&&(n=!0),this._logEvent("Grids - Filter Applied",{column:t.getColId(),numOfConditions:e.conditional&&e.conditional.conditions.length||0,byValue:e.byValue?"Yes":"No"}),this.updateFilter(t,e),n&&this.notifyFilterUpdate()},o.prototype.setGridFilters=function(t){var e,n;if(this.api&&t){var o={};try{for(var i=wt(t),r=i.next();!r.done;r=i.next()){var a=r.value,s=a.filter;o[a.field]=s}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.updateSettings({filter:o}),this.notifyFilterUpdate()}},o.prototype.setSortByColumn=function(t,e){var n=this.gridQuery.getSort({colId:t,sort:e});this.setGridSort(n)},o.prototype.setGridSort=function(t){if(t&&this.api&&this.api.grid.getDisplayedRowCount()>0){var e=t.colId,n=t.sort,o=t.sortIndex,i=this.api.columns.getAllGridColumns();if(i){var r=t,a=i.find((function(t){return(t.getColDef().showRowGroup||t.getColId())===e}));if(a)r={colId:a.getColId(),sort:n};else if(!Lt(o)){var s=this.api.columns.getValueColumns().find((function(t){return t.getColId()===e}));if(e.startsWith("pivot")||s)r={colId:i[o].getColId(),sort:n,sortIndex:o}}this.updateSettings({sort:r}),this.api.grid.setSortModel([r]),this.gridRef.gridOptions.usePivotGridStyle&&this.api.grid.redrawRows()}}},o.prototype.updateFilter=function(t,e){var n=cr(t.getColDef());this.store.update((function(t){var o;return{settings:mt(mt({},t.settings),{filter:mt(mt({},t.settings.filter),(o={},o[n]=e,o))})}}))},o.prototype.setSearchTerm=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),{searchTerm:t})}})),this.notifyFilterUpdate()},o.prototype.setServerSidePagination=function(t){this.store.update((function(e){return{serverSidePagination:mt(mt({},e.serverSidePagination),t)}}))},o.prototype.setLoading=function(t){t?this.api.grid.showLoadingOverlay():0===this.api.grid.getDisplayedRowCount()?this.setOverlay(!0):this.setOverlay(!1)},o.prototype.setNoData=function(t){this.setOverlay(t)},o.prototype.setOverlay=function(t){t?this.api.grid.showNoRowsOverlay():this.api.grid.hideOverlay()},o.prototype.updateSettings=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),t)}}))},o.prototype.fitGrid=function(t){"container"===t?this.api.grid.sizeColumnsToFit():this.api.columns.autoSizeAllColumns();var e="container"===t?0:1;this.updateSettings({gridAlignment:e,columnsSizes:null})},o.prototype.saveSettingsToServer=function(t){var e=this.gridQuery.getGridOptions().isGlobalSettings;this.storageAPI.set(this.gridName,t,e)},o.prototype._logEvent=function(t,e){this.logger.logEvent(t,mt({table:this.gridName},e))},o.prototype.wrapSuccessCallback=function(t){var e=this,n=t.successCb,o=t.pageNumber,i=t.isPendingReturnToPage;return function(t,r){e.setServerSidePagination({totalRows:r,hasError:!1}),n(t,r),e.gridQuery._serverDataLoaded.next({api:e.api.grid,columnApi:e.api.columns,type:"ServerDataLoaded",paginationPage:o}),i||(e.setLoading(!1),Xe()),e.lastTotalRows=r}},o.prototype.wrapGetRows=function(t,e){var n=this,o=e||t.datasource.getRows;return function(e){var i=e.startRow,r=e.endRow,a=e.sortModel,s=e.successCallback,l=t.paginationPageSize||100,c=n.pageNumberToReturnAfterRefresh>0,p=c&&0===i,d=c?n.pageNumberToReturnAfterRefresh+1:Math.ceil(r/l);n.pageNumberToReturnAfterRefresh=-1;var u=n.gridQuery.getFilter(),h=mt(mt({},e),{failCallback:function(){n.setServerSidePagination({hasError:!0}),n.setOverlay(!0)},successCallback:n.wrapSuccessCallback({pageNumber:d,successCb:s,isPendingReturnToPage:p}),serverConfig:{pageSize:l,pageNumber:d,columnFilters:kt(u)||t.enableV2_1?null:n.buildServerRequestFilters(u),filter:t.enableV2_1?n.buildServerRequestFilters_v2_1(t.columnDefs):null,sort:n.buildServerRequestSort(a)}});if(p){!function(t){(0,t.successCallback)([],n.lastTotalRows)}(h)}else o(h)}},o.prototype.initEditableColumnsCellClass=function(t){var e=this;t.gridOptions.columnDefs.forEach((function(t){if(t.editable)if(Rt(t.editable)){var n=t.cellClass;t.cellClass=function(o){if(t.editable(o)){var i=e.addEditableCellClass(n);return Rt(i)?i(o):i}return Rt(n)?n(o):n}}else t.cellClass=e.addEditableCellClass(t.cellClass)}))},o.prototype.wrapContextMenuBuilder=function(t){var e=this,n=t.gridOptions.customContextMenu,o=Rt(n)?n(t.rowActions):t.rowActions;this.translateActionLabels(o);var i={label:this.translate.transform("core.copy-cell"),icon:"copy",key:"Copy Cell"};return function(t){var n=t.node,r=t.column,a=t.context,s=a&&a.contextMenu&&a.contextMenu.fromOnHover;if(!n)return[];var l=[n],c=1;s?e.updateGridContext({contextMenu:{fromOnHover:!1}}):(i.onClick=function(t){var n=St(t,1)[0],o=e.api.grid.getValue(r.getColId(),n),i=r.getColDef().valueFormatter;Vn(i?i(o):o)},n.isSelected()&&(c=ye(l=e.gridQuery.getSelectedRowNodes())));var p=Ar(o,c,l,e.gridQuery.isServerSelectAllRowsEnabled).filter((function(t){return t.visible})),d=[i];return s?d=p:p.length>0&&(d=xt([mt(mt({},i),{separator:!0})],p)),Lr({toolbarActions:d,selectedRows:l,iconRegistry:e.svgRegistry,node:n,logger:{log:e._logEvent.bind(e),eventOrigin:s?"On Hover":"Context Menu"}})}},o.prototype.translateActionLabels=function(t){var e=this;t.forEach((function(t){t.label=e.translate.transform(t.label),t.subMenu&&e.translateActionLabels(t.subMenu)}))},o.prototype.loadSavedSettings=function(t){var e=this,n=t.sort,o=t.hiddenColumns,i=t.filter,r=t.groupedColumns,a=t.columnsSizes,s=t.pinnedColumns,l=t.columnsOrder,c=t.gridAlignment,p=this.api,d=p.grid,u=p.columns;u.setColumnsVisible(this.initialSettings.columnsOrder,!0);var h=Lt(o)?this.initialSettings.hiddenColumns:o;u.setColumnsVisible(h,!1),i&&d.onFilterChanged();var g,f=u.getRowGroupColumns();r&&(g=f.filter((function(t){return!r.includes(t.getColId())})),u.addRowGroupColumns(r),u.setColumnsVisible(r,!1)),u.removeRowGroupColumns(g),u.setColumnsVisible(g,!0);var m=n||this.initialSettings.sort;d.setSortModel(m?[m]:null),2===c?a&&Object.keys(a).forEach((function(t){1===a[t]?u.autoSizeColumn(t):u.setColumnWidth(t,a[t])})):1===c?u.autoSizeAllColumns():d.sizeColumnsToFit();var y=s?s.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null,v=l?l.filter((function(t){return t!==e.CHECKBOX_SELECTION_COL_ID})):null;ye(y)>0?u.setColumnsPinned(y,"left"):v&&u.setColumnsPinned(v,null),l&&u.moveColumns(l,0)},o.prototype.getSettingsDiff=function(){return we(this.gridQuery.getCurrentGridSettings(),this.initialSettings)},o.prototype.resetTableSettings=function(){var t=this.initialSettings,e=t.filter,n=yt(t,["filter"]),o=lr(this.api.columns.getAllGridColumns(),!0),i=kt(o)?n.gridAlignment:2,r=mt(mt({},n),{columnsSizes:o,gridAlignment:i});this.updateSettings(r),this.loadSavedSettings(r),this.saveSettingsToServer({filter:e})},o.prototype.initSettings=function(t){this.initialSettings=this.gridQuery.getCurrentGridSettings(),this.updateSettings(t),this.loadSavedSettings(t)},o.prototype.notifyFilterUpdate=function(){var t=this,e=[this.gridRef.filterChanged.asObservable()];this.gridQuery.isServerSide&&(e.push(this.gridQuery.serverDataLoaded$),this.setLoading(!0)),n.combineLatest(e).pipe(r.take(1),i.untilDestroyed(this)).subscribe((function(){var e=t.api.grid.getDisplayedRowCount();t.setOverlay(0===e)})),this.api.grid.onFilterChanged()},o.prototype.buildServerRequestFilters=function(e){var n,o,i={};try{for(var r=wt(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=St(a.value,2),l=s[0],c=s[1],p=c.byValue,d=c.conditional;if(p&&(i[l]={operator:t.OperatorTypes.AND,filters:[p]}),d){var u={operator:d.operator,filters:d.conditions.map((function(e){var n=e.condition,o=e.value;return n===t.DatoFilterConditions.IN_RANGE?{condition:n,start:o,end:e.rangeEnd}:e}))};p?i[l].filters.push(u):i[l]=u}}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},o.prototype.buildServerRequestFilters_v2_1=function(e){var n=this,o=this.gridQuery.getFilter(),i=this.gridQuery.getSearchTerm(),r=this.buildServerColumnFilters_v2_1(o);if(r.every((function(e){return e.operator===t.OperatorTypes.AND}))){var a=r.map((function(t){return t.filters})).reduce((function(t,e){return e.concat(t)}),[]);r=[{operator:t.OperatorTypes.AND,filters:a}]}var s=ye(r)>1?{operator:t.OperatorTypes.AND,filters:r}:1===ye(r)?r[0]:null;if(!i)return s;var l=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch,c=e.filter((function(t){return t.includeInSearch&&(l||n.api.columns.getColumn(t.colId).isVisible())})).map((function(e){var n=e.field;return{condition:t.DatoFilterConditions.CONTAINS,value:i,column:n}})),p=ye(c)>0?{operator:t.OperatorTypes.OR,filters:c}:null;return s?{operator:t.OperatorTypes.AND,filters:[s,p]}:p},o.prototype.buildServerColumnFilters_v2_1=function(e){var n,o,i=[];try{for(var r=wt(Object.entries(e)),a=r.next();!a.done;a=r.next()){var s=St(a.value,2),l=s[0],c=s[1],p=null,d=c.byValue,u=c.conditional;if(d&&(p={operator:t.OperatorTypes.AND,filters:[mt({column:l},d)]}),u){var h=this.getServerConditionalFilter(u,l);p?p.filters.push(h):p=h}i.push(p)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},o.prototype.getFilterForServerActionOnSelectAll=function(){var e=this.gridQuery.serverSideConfig.excludedFromSelectAll,n=this.gridQuery.getGridOptions(),o=n.columnDefs,i=n.idColumnKey,r=this.buildServerRequestFilters_v2_1(o);if(kt(e))return r;var a={condition:t.DatoFilterConditions.NOT_IN_LIST,values:e,column:i},s=r?[r,a]:[a];return{operator:t.OperatorTypes.AND,filters:s}},o.prototype.getServerConditionalFilter=function(e,n){return{operator:e.operator,filters:e.conditions.map((function(e){var o=e.condition,i=e.value;return o===t.DatoFilterConditions.IN_RANGE?{condition:o,start:i,end:e.rangeEnd,column:n}:o===t.DatoFilterConditions.IS_EMPTY||o===t.DatoFilterConditions.NOT_EMPTY?{condition:t.DatoFilterConditions.IS_EMPTY,value:o===t.DatoFilterConditions.IS_EMPTY?"true":"false",column:n}:o===t.DatoFilterConditions.IS_NULL||o===t.DatoFilterConditions.NOT_NULL?{condition:t.DatoFilterConditions.IS_NULL,value:o===t.DatoFilterConditions.IS_NULL?"true":"false",column:n}:mt(mt({},e),{column:n})}))}},o.prototype.buildServerRequestSort=function(t){return t.map((function(t){return{column:t.colId,sortOrder:t.sort.toUpperCase()}}))},o.prototype.addEditableCellClass=function(t){var e=this;return Lt(t)?"dato-editable-cell":Rt(t)?function(n){return e.getEditableClassArray(t(n))}:this.getEditableClassArray(t)},o.prototype.getEditableClassArray=function(t){var e=me(t);return e.push("dato-editable-cell"),e},o.prototype.selectAllCurrentPageRows=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);var n=this.gridQuery.getCurrentPageRows();if(e){var o=this.gridQuery.serverSideConfig.excludedFromSelectAll;kt(o)||(n=n.filter((function(t){var e=t.id;return!o.includes(e)})))}t?this.selectRows(n):this.deselectRows(n)},o.prototype.deselectAllRows=function(){this.api.grid.deselectAll(),this.gridQuery.isServerSelectAllRowsEnabled&&this.setServerSidePagination({selectAllRowsEnabled:!1,excludedFromSelectAll:[]})},o.prototype.resolveRowActionsVisibility=function(){this.gridQuery._rowActionVisibilityChanged.next()},o.prototype.initPivotSecondaryColsProcess=function(t){var e=this,n=t.gridOptions;n.processSecondaryColDef=function(t){var e=t.pivotValueColumn&&t.pivotValueColumn.getUserProvidedColDef();e&&(t.filter=e.filter),t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=pr(t);return e&&e.value||""})))},n.processSecondaryColGroupDef=function(t){if(t.headerName){var n=pr(t.headerName);if(n){var o=n.field,i=n.value;t.headerClass=[o],t.headerName=i,t.children&&t.children.length>0&&t.headerClass.push("group-pivot-cell")}}else if(t.children){var r=St(t.children,1)[0],a=r&&r.pivotTotalColumnIds;a&&a.length>0&&(t.headerClass=["total-pivot-cell"],t.headerName=e.translate.transform("core.total"))}else t.headerClass=["empty-pivot-header"];t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=pr(t);return e&&e.value||""})))}},o.prototype.setPivotModeRows=function(t){var e=this.gridQuery.getAllPivotColumns(),n=t.map((function(t,n){var o,i,r=mt({},t);try{for(var a=wt(e),s=a.next();!s.done;s=a.next()){var l=s.value.getColDef().field,c={field:l,value:t[l]};r[l]=JSON.stringify(c)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r}));this.api.grid.setRowData(n)},o.ctorParameters=function(){return[{type:sr},{type:fr},{type:_n},{type:je},{type:Me},{type:void 0,decorators:[{type:e.Inject,args:[zr]}]},{type:void 0,decorators:[{type:e.Inject,args:[ja]}]}]},o=vt([e.Injectable(),bt(5,e.Inject(zr)),bt(6,e.Inject(ja)),Ct("design:paramtypes",[sr,fr,_n,je,Me,Object,Object])],o)}(),Na=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCustomHeader]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Fa=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCustomMoreMenu]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Ga=function(){function t(){}return vt([e.Input(),Ct("design:type",String)],t.prototype,"column",void 0),vt([e.ContentChild(Na),Ct("design:type",Object)],t.prototype,"customHeader",void 0),vt([e.ContentChild(Fa),Ct("design:type",Object)],t.prototype,"moreMenu",void 0),t=vt([e.Component({selector:"dato-custom-header-template",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Va={light:{"primary-700":"#2E2F30","primary-600":"#37383A","primary-500":"#4F5053","primary-400":"#67696F","primary-300":"#9EA0A5","primary-200":"#CCCED3","primary-100":"#F1F2F5","primary-50":"#F7F8FA","primary-0":"#ffffff","accent-800":"#072A60","accent-700":"#0D47A1","accent-600":"#1C61D7","accent-500":"#317EEB","accent-400":"#09A0FF","accent-350":"#40B2FE","accent-300":"#77C5FD","accent-200":"#BBDEFB","accent-180":"#C7E3FB","accent-100":"#E3F2FD","fg-100":"#37383A","fg-200":"#ffffff"},dark:{"primary-700":"#ffffff","primary-600":"#F7F8FA","primary-500":"#F1F2F5","primary-400":"#CCCED3","primary-300":"#9EA0A5","primary-200":"#67696F","primary-100":"#4F5053","primary-50":"#37383A","primary-0":"#2E2F30","accent-800":"#E3F2FD","accent-700":"#BBDEFB","accent-600":"#77C5FD","accent-500":"#40B2FE","accent-400":"#09A0FF","accent-350":"#317EEB","accent-300":"#1C61D7","accent-200":"#0D47A1","accent-180":"#C7E3FB","accent-100":"#072A60","fg-100":"#ffffff","fg-200":"#37383A"}},za=function(){function t(t,e,n,o){this.host=t,this.gridService=e,this.gridQuery=n,this.cdr=o,this.displayedActions=[],this.setBgColorBound=this.setBackgroundColor.bind(this)}return Object.defineProperty(t.prototype,"hostEl",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.show=function(t){this.removeSelectedListener(),this.params=t,this.row=t.node,this.row.addEventListener("rowSelected",this.setBgColorBound),this.setRowActions(),this.setBackgroundColor({node:this.row}),Ht(this.hostEl,{top:this.row.rowTop+"px",height:this.row.rowHeight+"px",opacity:1,zIndex:1,pointerEvents:"all"})},t.prototype.hide=function(){Ht(this.hostEl,{opacity:0,pointerEvents:"none",zIndex:-1})},t.prototype.openActionMenu=function(t){var e=this.params,n=e.rowIndex,o=e.node,i=e.column,r=e.value,a=this.gridQuery.api.grid.rowRenderer.rowCompsByIndex[n].getRenderedCellForColumn(i);this.gridService.updateGridContext({contextMenu:{fromOnHover:!0}}),a.beans.contextMenuFactory.showMenu(o,i,r,t)},t.prototype.updateScrollPos=function(t){Ht(this.hostEl,{left:t-this.hostEl.scrollWidth-1+"px"})},t.prototype.callAction=function(t){Rt(t.onClick)&&(this.gridService._logEvent("Grids - Table Action",{action:t.key,numOfItems:1,from:"On Hover"}),t.onClick([this.row]))},t.prototype.ngOnDestroy=function(){this.removeSelectedListener()},t.prototype.setRowActions=function(){var t=this.config,e=t.actions,n=t.maxDisplayedItems,o=Ar(e,1,[this.row],!1).filter((function(t){var e=t.template,n=t.icon,o=t.visible;return Lt(e)&&Mt(n)&&o}));this.displayedActions=o.filter((function(t){return _t(t.onHoverIndex)})).slice(0,n).sort((function(t,e){return t.onHoverIndex-e.onHoverIndex})),0===this.displayedActions.length&&(this.displayedActions=o.slice(0,n)),this.showMore=this.displayedActions.length<o.length,this.cdr.detectChanges()},t.prototype.removeSelectedListener=function(){this.row&&this.row.removeEventListener("rowSelected",this.setBgColorBound)},t.prototype.setBackgroundColor=function(t){var e=t.node,n="accent-100";e.isSelected()&&(n=e.rowIndex%2==0?"accent-180":"accent-200");var o=Va.light[n],i="linear-gradient(to right, "+o+"B3 0%, "+o+" 17%, "+o+" 100%)";Ht(this.hostEl,{backgroundImage:i})},t.ctorParameters=function(){return[{type:e.ElementRef},{type:La},{type:fr},{type:e.ChangeDetectorRef}]},t=vt([e.Component({selector:"dato-grid-on-hover",template:'<div class="d-flex">\n <div class="gradient"></div>\n <div class="actions d-flex align-end-center">\n <dato-icon-button (click)="callAction(action)" datoSize="md" datoType="none" *ngFor="let action of displayedActions" [icon]="action.icon" [datoTooltip]="action.tooltip || action.label" datoTooltipOffset="[-80,5]"></dato-icon-button>\n <dato-icon-button *ngIf="showMore" (click)="openActionMenu($event)" datoSize="md" datoType="none" icon="more-vertical"></dato-icon-button>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;justify-content:flex-end;align-content:center;align-items:center;position:absolute;max-width:150px;transition:opacity .3s ease-in-out;opacity:0}:host .gradient{min-width:20px}"]}),Ct("design:paramtypes",[e.ElementRef,La,fr,e.ChangeDetectorRef])],t)}(),Ba=function(){function t(t){var e=this;this.ref=t,this.groups=[],this.groups=Object.keys(t.data).map((function(n){return{scope:n,children:e.resolveKeys(t.data[n])}}))}return t.prototype.resolveKeys=function(t){return t.reduce((function(t,e){var n=e.description,o=e.keys;return t.push({keys:pa(o),description:n}),t}),[])},t.ctorParameters=function(){return[{type:Uo}]},t=vt([e.Component({template:' <dato-dialog-header>{{ \'core.available-shortcuts\' | translate }}</dato-dialog-header>\n <dato-dialog-content>\n <section>\n <ng-container *ngFor="let group of groups">\n <section *ngIf="group.children.length" class="flex-1 hotkeys-group">\n <header>{{ group.scope | translate }}</header>\n <table>\n <tbody>\n <tr *ngFor="let child of group.children">\n <td>{{ child.description | translate }}</td>\n\n <td class="text-right">\n <kbd [innerHTML]="child.keys"></kbd>\n </td>\n </tr>\n </tbody>\n </table>\n </section>\n </ng-container>\n\n </section>\n\n\n </dato-dialog-content>\n <dato-dialog-footer> <dato-button datoType="secondary" datoDialogDismiss>{{ \'core.close\' | translate }}</dato-button> </dato-dialog-footer>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host header{background-color:#f6f8fa;border-top-left-radius:2px;border-top-right-radius:2px;border:1px solid #d1d5da;font-weight:500;font-size:14px;padding:8px 16px;border-bottom:0}:host table{border:1px solid #e1e4e8;border-collapse:collapse;width:100%;margin-bottom:1rem;color:#212529}:host th{font-weight:500;text-align:left;vertical-align:bottom;padding:.75rem;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6}:host td{padding:8px 16px;border-top:1px solid #dee2e6}:host kbd{margin-right:6px;background-color:#fafbfc;border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;font-size:12px;padding:3px 5px}"]}),Ct("design:paramtypes",[Uo])],t)}(),Ha=function(){function o(t,e,n){var o,i=this;this.eventManager=t,this.document=e,this.dialog=n,this.callbacks=[],this.defaults={preventDefault:!0,event:"keydown",element:this.document,scope:"core.general",ignoreInEditable:!1},this.hotkeys=((o={})[this.defaults.scope]=[],o),this.addShortcut({keys:"shift.?",preventDefault:!1,ignoreInEditable:!0}).subscribe((function(t){i.isActiveElementEditable(t)||ye(i.hotkeys)&&i.openHelpModal()}))}return o.prototype.isActiveElementEditable=function(t){return/^(input|textarea)$/i.test(document.activeElement.nodeName)||t.target.isContentEditable},o.prototype.onShortcut=function(t){var e=this;return this.callbacks.push(t),function(){return e.callbacks.filter((function(e){return e!==t}))}},o.prototype.addShortcut=function(t){var e=this,o=mt(mt({},this.defaults),t),i=o.scope,r=o.keys,a=o.description,s=o.element,l=o.event,c=o.preventDefault,p=o.target,d=o.ignoreInEditable,u=r,h=St(r.split(".")),g=h[0],f=h.slice(1);return"meta"===g&&!1===ca()&&(u=xt(["control"],f).join(".")),this.hotkeys[i]||(this.hotkeys[i]=[]),a&&this.hotkeys[i].push({keys:u,description:a}),new n.Observable((function(t){var n=e.eventManager.addEventListener(s,l+"."+u,(function(n){d&&e.isActiveElementEditable(n)||(c&&n.preventDefault(),e.dialog.isOpen&&e.dialog.closeAll(),e.callbacks.forEach((function(t){return t(n,u,p)})),t.next(n))}));return function(){n(),o.target=null,a&&(e.hotkeys[i]=e.hotkeys[i].filter((function(t){return t.keys!==u})))}}))},o.prototype.openHelpModal=function(){this.dialog.open(Ba,{data:this.hotkeys,size:t.Dimensions.MD})},o.ctorParameters=function(){return[{type:ut.EventManager},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]},{type:Zo}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(ut.EventManager),e.ɵɵinject(s.DOCUMENT),e.ɵɵinject(Zo))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[ut.EventManager,Object,Zo])],o)}(),Ua=function(){function t(t,o,i,r,a,s,l,c,p,d){this.gridService=t,this.gridQuery=o,this.cdr=i,this.iconRegistry=r,this.translate=a,this.host=s,this.injector=l,this.resolver=c,this.hotkeys=p,this.storageAPI=d,this.onGridChange=new e.EventEmitter,this.rowActions=[],this.gridActions=[],this.contentInit=new n.Subject,this.gridReady$=this.gridQuery.gridReady$,this.gridElements={centerViewport:null,centerContainer:null,bodyViewport:null},this.treeGridClass="tree"}return Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this._gridOptions},set:function(t){this._gridOptions=t,this.gridService.treeData=t.treeData,this.gridService.isPivotMode=t.pivotMode,this.agGridEl&&(t.treeData?!this.agGridEl.classList.contains(this.treeGridClass)&&this.agGridEl.classList.add(this.treeGridClass):t.enableV2_1||this.agGridEl.classList.add(this.treeGridClass))},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.contentInit.complete(),this.clearTooltip(),this.rowHoverComponent&&this.rowHoverComponent.destroy(),this.rowHoverComponent=null},t.prototype.ngAfterContentInit=function(){this.contentInit.next(),this.contentInit.complete()},t.prototype._initializeGrid=function(t,e){var o=this;this.agGridEl=e,this.contentInit.asObservable().pipe(r.switchMap((function(){o.gridOptions=o.normalizeOptions(),t.gridOptions=o.gridOptions;var e=o.gridOptions.isGlobalSettings,i=!1===o.gridOptions.saveSettings?n.of(null):o.storageAPI.get(o.gridOptions.gridName,e);return n.combineLatest([t.gridReady,i])})),i.untilDestroyed(this)).subscribe((function(n){var i=St(n,2),r=i[0],a=r.api,s=r.columnApi,l=i[1],c=void 0===l?{}:l;(o.gridOptions.rowData||a.showLoadingOverlay(),o.gridOptions.statusBar)||Ut(e.querySelector(".ag-status-bar"),"ag-hidden");var p={grid:a,columns:s};o.gridService._setApi(p,t),o.gridQuery._setApi(p,t),o.gridService.initSettings(c||{}),o.registerSettingsListeners(p,t),o.registerGridListeners(p,t),o.registerEventsTriggeringClearSelectedRows(t),o.registerPaginationChanged(t),o.gridQuery._gridReady.next(!0),o.gridOptions.treeData&&o.agGridEl.classList.add("tree"),o.gridOptions.rowHeight&&o.agGridEl.classList.add("row-height-"+o.gridOptions.rowHeight)}))},t.prototype.normalizeOptions=function(){this.gridOptions.treeData&&(this.gridOptions=mt(mt({},this.gridOptions),{pagination:!1}));var t={gridOptions:this.gridOptions,customHeadersTemplates:this.customHeadersTemplates,rowActions:this.rowActions},e=this.gridService.normalizeOptions(t);return qr(mt(mt(mt({},xa),this.gridOptions.treeData?Ca:{}),{icons:this.getGridIcons()}),e)},t.prototype.setGridRows=function(t){this.gridService.setRows(t)},t.prototype.setGridFilters=function(t){this.gridService.setGridFilters(t)},t.prototype.setGridSort=function(t){this.gridService.setGridSort(t)},t.prototype.getGridIcons=function(){var t='<span class="da-grid-icon pointer d-flex column-move">'+this.iconRegistry.getSvg("move-column")+"</span>";return{groupExpanded:'<span class="da-grid-icon pointer group-expanded-icon">'+this.iconRegistry.getSvg("arrow-right")+"</span>",groupContracted:'<span class="da-grid-icon pointer group-contracted-icon">'+this.iconRegistry.getSvg("arrow-right")+"</span>",columnMovePin:'<span class="da-grid-icon pointer d-flex primary-300-fill column-move-pin">'+this.iconRegistry.getSvg("pin")+"</span>",columnMoveHide:'<span class="da-grid-icon pointer d-flex column-move-hide">'+this.iconRegistry.getSvg("eye-hide")+"</span>",columnMoveMove:t,columnMoveLeft:t,columnMoveRight:t,rowDrag:'<span class="da-grid-icon drag d-flex">'+this.iconRegistry.getSvg("drag-01")+"</span>"}},t.prototype.registerSettingsListeners=function(t,e){this.listenToColumnResize(t,e),this.listenToGridEvents(e),this.listenToStoreSettingsChanges()},t.prototype.listenToColumnResize=function(t,e){var n=this,o=e.columnResized.asObservable();this.onHoverEnabled()&&(o=o.pipe(r.filter((function(t){return"uiColumnDragged"===t.source})),r.tap((function(){return n.updateOnHoverPos()})))),o.pipe(r.auditTime(100),r.filter((function(t){var e=t.finished,n=t.source;return e&&"uiColumnDragged"===n})),i.untilDestroyed(this)).subscribe((function(e){var o=St(e.columns,1)[0],i=mt({},n.gridQuery.getColumnSizes());i?i[o.getColId()]=o.getActualWidth():i=lr(t.columns.getAllGridColumns()),n.gridService.updateSettings({gridAlignment:2,columnsSizes:i})}))},t.prototype.listenToGridEvents=function(t){var e=this,o=t.columnVisible,a=t.sortChanged,s=t.columnRowGroupChanged,l=t.columnPinned,c=t.dragStopped,p=t.filterChanged;n.merge(o,a,s,l,c,p).pipe(r.skip(1),i.untilDestroyed(this)).subscribe((function(t){var n=t.type,o=e.gridService.getSettingsDiff();e.gridService.updateSettings(o);var i=e.getGridData();e.onGridChange.emit({filter:e.gridQuery.getExternalFilter(),sort:e.gridQuery.getSort(),type:n,data:i})}))},t.prototype.listenToStoreSettingsChanges=function(){var t=this;this.gridQuery.select((function(t){return t.settings})).pipe(r.skip(1),r.debounceTime(1e3),i.untilDestroyed(this)).subscribe((function(){var e=t.gridService.getSettingsDiff();t.gridService.saveSettingsToServer(e)}))},t.prototype.registerGridListeners=function(t,e){this.gridElements={centerContainer:Ft(".ag-center-cols-container",this.agGridEl),centerViewport:Ft(".ag-center-cols-viewport",this.agGridEl),bodyViewport:Ft(".ag-body-viewport",this.agGridEl)},this.registerGridClickListener(t.grid),this.registerGridGroupListeners(e),this.registerGridMouseListeners(e),this.registerGridKeyboardListener(t),this.registerWindowResizeListener()},t.prototype.registerGridGroupListeners=function(t){var e=this;t.columnRowGroupChanged.pipe(r.switchMap((function(e){return 0===e.columns.length?n.EMPTY:t.cellClicked.pipe(r.filter((function(t){var e=t.value,n=t.node;return void 0!==e&&!0===n.group})))})),i.untilDestroyed(this)).subscribe((function(t){var e=t.node;e.setExpanded(!e.expanded)})),this.onHoverEnabled()&&t.rowGroupOpened.pipe(r.filter((function(t){return!1===t.node.expanded})),i.untilDestroyed(this)).subscribe((function(){e.lastHoveredRow=null,e.setOnHoverState(!1)}))},t.prototype.registerGridClickListener=function(t){var e=this.gridElements,o=e.bodyViewport,a=e.centerViewport;n.fromEvent(o,"click").pipe(r.filter((function(e){return(e.target===o||e.target===a)&&t.getSelectedRows().length>0})),i.untilDestroyed(this)).subscribe((function(){return t.deselectAll()}))},t.prototype.onHoverEnabled=function(){return this.gridOptions.hoverConfig.enabled&&this.rowActions.length>0},t.prototype.registerGridMouseListeners=function(t){var e,o=this,a=this.gridElements,s=a.bodyViewport,l=a.centerContainer,c=this.onHoverEnabled();c&&(n.fromEvent(l,"mouseleave").pipe(i.untilDestroyed(this)).subscribe((function(){o.toggleRowHoverClass(o.lastHoveredRow),o.lastHoveredRow=null,o.setOnHoverState(!1),e=null})),n.merge(t.bodyScroll.pipe(r.filter((function(t){return"horizontal"===t.direction}))),t.rowDataChanged).pipe(i.untilDestroyed(this)).subscribe((function(){o.updateOnHoverPos()})),this.addOnHoverElement()),t.cellMouseOver.pipe(i.untilDestroyed(this)).subscribe((function(t){var n=t.node,i=t.column;if(e!==n.id+"-"+i.getColId()){e=n.id+"-"+i.getColId(),o.showTooltip(t);var r=t.event.target.parentElement;if(c&&(!1===n.group||Lt(n.group))&&o.lastHoveredRow!==r){var a=o.lastHoveredRow;o.lastHoveredRow=r,o.toggleRowHoverClass([a,o.lastHoveredRow]),o.setOnHoverState(!0,t)}}else clearTimeout(o.cellMouseOutTimer)})),n.merge(n.fromEvent(s,"scroll"),n.fromEvent(this.agGridEl,"mouseleave")).pipe(i.untilDestroyed(this)).subscribe((function(){e=null,o.clearTooltip()})),t.cellMouseOut.pipe(r.filter((function(){return!Lt(o.tooltip)})),i.untilDestroyed(this)).subscribe((function(){o.cellMouseOutTimer=window.setTimeout((function(){return o.clearTooltip()}))}))},t.prototype.clearTooltip=function(){this.tooltip&&this.tooltip.dispose(),this.tooltip=null},t.prototype.showTooltip=function(t){var e=t.event.target;if("SPAN"===e.tagName&&0===e.scrollWidth&&(e=e.parentElement),t.colDef.editable&&(e=e.querySelector(".value-wrapper")||e),e.offsetWidth<e.scrollWidth){clearTimeout(this.cellMouseOutTimer);var n={cell:e,value:e.innerText};Lt(this.tooltip)?this.createAndShowTooltip(n):this.updateTooltip(n)}},t.prototype.createAndShowTooltip=function(t){var e=t.cell,n=t.value;this.tooltip=new X(e,{placement:"top",container:document.body,trigger:"manual",title:ot.sanitize(n),html:!0,popperOptions:{modifiers:{preventOverflow:{enabled:!1}}},template:'<div class="tooltip dato-tooltip common-tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}),this.tooltip.show()},t.prototype.updateTooltip=function(t){var e=t.cell,n=t.value;e!==this.tooltip.reference&&(this.tooltip.reference=e,this.tooltip.popperInstance.reference=e,this.tooltip.updateTitleContent(n)),this.tooltip.show()},t.prototype.addOnHoverElement=function(){this.rowHoverComponent=Zr({component:za,injector:this.injector,resolver:this.resolver});var t=this.rowHoverComponent,e=t.instance,n=t.hostView;e.config=mt(mt({},this.gridOptions.hoverConfig),{actions:this.rowActions.slice()}),n.detectChanges(),qt(this.gridElements.centerContainer,this.rowHoverEl)},Object.defineProperty(t.prototype,"rowHoverEl",{get:function(){return this.rowHoverComponent.location.nativeElement},enumerable:!0,configurable:!0}),t.prototype.setOnHoverState=function(t,e){var n=this.rowHoverComponent.instance;t?(n.show(e),this.updateOnHoverPos()):n.hide()},t.prototype.updateOnHoverPos=function(){var t=this.gridElements,e=t.centerViewport,n=t.centerContainer,o=n.clientWidth>e.clientWidth?e:n,i=o.clientWidth,r=o.scrollLeft;this.rowHoverComponent.instance.updateScrollPos(i+r)},t.prototype.toggleRowHoverClass=function(t){me(t).forEach((function(t){return t&&t.classList.toggle("actions-hovered")}))},t.prototype.registerGridKeyboardListener=function(t){var e=this;t.grid,t.columns;this.hotkeys.addShortcut({element:this.agGridEl,keys:"meta.a",ignoreInEditable:!0}).pipe(i.untilDestroyed(this)).subscribe((function(){e.gridService.selectAllCurrentPageRows()}))},t.prototype.registerWindowResizeListener=function(){var t=this;n.fromEvent(window,"resize").pipe(r.debounceTime(100),r.filter((function(){return 2!==t.gridQuery.gridAlignment})),i.untilDestroyed(this)).subscribe((function(){var e=0===t.gridQuery.gridAlignment?"container":"content";t.gridService.fitGrid(e)}))},t.prototype.getGridData=function(){var t=this.gridService.api.grid.getModel();return this.gridOptions.treeData?_a(t.rowsToDisplay.map((function(t){return t.data})),this.gridService.treeConfig):t.rowsToDisplay},t.prototype.registerEventsTriggeringClearSelectedRows=function(t){var e=this;(this.gridQuery.isServerSide?n.merge(t.sortChanged,t.filterChanged):t.filterChanged).pipe(i.untilDestroyed(this)).subscribe((function(){e.gridService.deselectAllRows()}))},t.prototype.registerPaginationChanged=function(t){var e=this;this.gridQuery.isServerSide&&t.paginationChanged.pipe(i.untilDestroyed(this)).subscribe((function(){e.gridQuery.isServerSelectAllRowsEnabled&&e.gridService.selectAllCurrentPageRows(!0,!0)}))},t.ctorParameters=function(){return[{type:La},{type:fr},{type:e.ChangeDetectorRef},{type:je},{type:_n},{type:e.ElementRef},{type:e.Injector},{type:e.ComponentFactoryResolver},{type:Ha},{type:void 0,decorators:[{type:e.Inject,args:[zr]}]}]},vt([e.ContentChildren(Ga),Ct("design:type",e.QueryList)],t.prototype,"customHeadersTemplates",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"onGridChange",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"rowActions",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"gridActions",void 0),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"gridOptions",null),t=vt([e.Component({selector:"dato-grid-controller",template:"\n <ng-content></ng-content>\n ",changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[fr,La,sr],styles:[":host{display:flex;flex-direction:column;flex-grow:1}"]}),bt(9,e.Inject(zr)),Ct("design:paramtypes",[La,fr,e.ChangeDetectorRef,je,_n,e.ElementRef,e.Injector,e.ComponentFactoryResolver,Ha,Object])],t)}(),Ka=function(){function t(t,e){this.controller=t,this.host=e}return Object.defineProperty(t.prototype,"grid",{set:function(t){var e=Ft("ag-grid-angular",this.host.nativeElement);this.controller._initializeGrid(t,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this.controller?this.controller.gridOptions:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableBackground",{get:function(){return!!this.gridOptions&&this.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableV2_1",{get:function(){return!!this.gridOptions&&this.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPivotStyle",{get:function(){return this.gridOptions&&this.gridOptions.usePivotGridStyle},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:Ua},{type:e.ElementRef}]},vt([e.ViewChild(st.AgGridNg2,{static:!0}),Ct("design:type",st.AgGridNg2),Ct("design:paramtypes",[st.AgGridNg2])],t.prototype,"grid",null),t=vt([e.Component({selector:"dato-grid-v2",template:'<ag-grid-angular data-auto-id="grid" class="dato-grid ag-theme-material" [class.has-background]="enableBackground" [class.enable-v2_1]="enableV2_1"\n [class.with-multi-selection-col]="gridOptions?.showMultiSelectionCheckboxes" [class.pivot-style]="isPivotStyle">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]="enableBackground"></dato-grid-pagination-v2>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-icon-checkbox-indeterminate:before{text-align:center;content:'-';display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}dato-grid-v2 .ag-overlay-wrapper ng-component{display:flex}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}"]}),Ct("design:paramtypes",[Ua,e.ElementRef])],t)}(),Wa=function(){function t(t){this.popover=t}return t.prototype.ngOnInit=function(){var t=this,e=this.popover.data,n=e.api,r=e.gridQuery,a=e.gridService;this.api=n.columns;var s=this.api.getRowGroupColumns();this.columns=this.popover.data.gridQuery.getAllColumns().filter((function(t){return!s.includes(t)})).map((function(t){return{label:t.getColDef().headerName,column:t,id:t.getColId()}})).sort((function(t,e){var n=r.getCurrentGridSettings().columnsOrder;return n.indexOf(t.id)-n.indexOf(e.id)}));var l=this.columns.filter((function(t){return t.column.isVisible()})).map((function(t){return t.id}));this.columnControl=new o.FormControl(l),this.columnControl.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){t.api.setColumnsVisible(r.getAllColumns(),!1),t.api.setColumnsVisible(e,!0),a.fitGrid("container");var n=r.getGridOptions(),o=n.enableSearch,i=n.includeHiddenColumnsInSearch;o&&!i&&r.getSearchTerm()&&a.notifyFilterUpdate()}))},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:oa}]},t=vt([e.Component({selector:"dato-grid-columns-display-menu",template:'<div class="pl-10 pr-10 pt-10 list-section overflow-hidden">\n <div class="dato-sub-headline mb-15">{{ \'core.columns\' | translate }}</div>\n <dato-input placeholder="core.search-columns" #search></dato-input>\n <dato-list-v2 [searchController]="search" [options]="columns" [formControl]="columnControl" [isSortList]="false"></dato-list-v2>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;flex-direction:column;max-height:inherit}.list-section{max-height:305px}"]}),Ct("design:paramtypes",[oa])],t)}(),Qa=function(){function t(t){this.popover=t,this.addGroup=new o.FormControl,this.activeGroups=[]}return t.prototype.ngOnInit=function(){var t=this;this.api=this.popover.data.api.columns,this.initMenu(),this.addGroup.valueChanges.pipe(i.untilDestroyed(this)).subscribe((function(e){var n=e.column;t.api.addRowGroupColumn(n),t.api.setColumnVisible(n,!1),t.popover.data.gridService._logEvent("Grids - Group Added",{totalNumOfGroups:t.api.getRowGroupColumns().length,column:n.getColId(),groupedFrom:"Table Toolbar"}),t.initMenu()}))},t.prototype.ngOnDestroy=function(){},t.prototype.reorderGroups=function(t){var e=this,n=t.oldIndex,o=t.newIndex;this.api.moveRowGroupColumn(n,o);var i=this.api.getAllDisplayedColumns().find((function(t){return e.activeGroups[o].getColId()===t.getColDef().showRowGroup}));this.api.moveColumn(i,0)},t.prototype.clearGrouping=function(){this.activeGroups.length>0&&(this.api.setRowGroupColumns([]),this.initMenu())},t.prototype.removeColumn=function(t){this.api.removeRowGroupColumn(t),this.initMenu()},t.prototype.initMenu=function(){var t=this;this.addGroup.reset(null,{emitEvent:!1}),this.activeGroups=xt(this.api.getRowGroupColumns()),this.optionalColumns=this.api.getAllDisplayedColumns().filter((function(e){return!t.activeGroups.find((function(t){return t.getColId()===e.getColDef().showRowGroup}))})).map((function(t){return{label:t.getColDef().headerName,id:t.getColId(),column:t}}))},t.ctorParameters=function(){return[{type:oa}]},t=vt([e.Component({selector:"dato-grid-groups-menu",template:'<div class="header dato-simple-bold pl-10 primary-600-color primary-0-background-color d-flex align-start-center">{{ \'core.group-by\' | translate }}</div>\n<div class="body p-10">\n <dato-sortable *ngIf="activeGroups.length > 0" class="width-100" [datoList]="activeGroups"\n (orderUpdated)="reorderGroups($event)">\n <div *ngFor="let column of activeGroups; index as i"\n class="d-flex align-start-center primary-0-background-color group-item mb-5">\n <dato-icon height="18px" [attr.data-auto-id]="\'grid-group-menu-drag-\' + column.getColId()" datoIcon="drag-01" class="handler primary-300-color" datoSortableHandle></dato-icon>\n <div class="d-flex-grow ellipsis dato-note column-name" [datoTooltip]="column.getColDef().headerName"\n datoTooltipOnTextOverflow="true" datoTooltipPosition="bottom"> {{ column.getColDef().headerName }}</div>\n <dato-icon-button [attr.data-auto-id]="\'grid-group-menu-remove-\' + column.getColId()" datoSize="md"\n datoType="none"\n icon="close" class="ml-10 pointer mr-5 remove-group"\n (click)="removeColumn(column)"></dato-icon-button>\n </div>\n </dato-sortable>\n <dato-select *ngIf="activeGroups.length < 3 && optionalColumns.length > 0" [formControl]="addGroup" [dataSet]="optionalColumns"\n placeholder="core.create-new-group" datoSize="md" #select data-auto-id="grid-group-column-selection">\n <dato-option *ngFor="let option of select.data" [option]="option"\n [attr.data-auto-id]="\'grid-group-column-selection-option-\' + option.id"> {{ option.label }} </dato-option>\n </dato-select>\n</div>\n<div class="footer primary-0-background-color d-flex align-end-center">\n <dato-link class="mr-30 no-select" datoType="secondary" datoSize="sm" data-auto-id="grid-group-menu-clear-groups"\n (click)="clearGrouping()">{{ \'core.clear-grouping\' | translate }}</dato-link>\n <dato-button class="mr-10" datoType="primary" datoSize="sm" data-auto-id="grid-group-menu-done"\n datoPopoverClose>{{ \'core.done\' | translate }}</dato-button>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".header{height:40px}.body{height:120px}.footer{height:46px}.group-item{height:30px}.handler{min-width:24px}"]}),Ct("design:paramtypes",[oa])],t)}(),$a=function(){function t(t,e){this.controller=t,this.gridQuery=e,this.displayRowCount=!0}return Object.defineProperty(t.prototype,"enableBackground",{get:function(){return this.controller.gridOptions.enableBackground},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.rowCount$=this.gridQuery.gridReady$.pipe(r.switchMap((function(){return t.rowsCount()})))},t.prototype.rowsCount=function(){var t=this;return this.gridQuery.isServerSide?this.gridQuery.serverDataLoaded$.pipe(r.map((function(){return t.gridQuery.serverSideConfig.totalRows}))):this.gridQuery.rowDataChanged$.pipe(r.map((function(t){return t.api.getDisplayedRowCount()})))},t.ctorParameters=function(){return[{type:Ua},{type:fr}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"displayRowCount",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"headerClass",void 0),t=vt([e.Component({selector:"dato-grid-header-v2",template:'<div class="d-flex justify-start items-center mb-20" [class.mx-30]="enableBackground">\n <span class="dato-mid-headline" [ngClass]="headerClass" data-auto-id="grid-header">\n <ng-content></ng-content>\n <ng-container *ngIf="displayRowCount">\n <span *ngIf="(rowCount$ | async)as rowCount" class="ml-5 mr-10">({{rowCount | number}})</span>\n </ng-container>\n </span>\n <ng-content select=".after-title"></ng-content>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[Ua,fr])],t)}();
327
327
  /**
328
328
  * @license
329
329
  * Copyright Datorama. All Rights Reserved.
@@ -337,7 +337,7 @@ var ea,na=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
337
337
  *
338
338
  * Use of this source code is governed by an Apache License 2.0 license that can be
339
339
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
340
- */var Ya=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.merge(t.gridQuery.gridRef.filterChanged,t.gridQuery.gridRef.rowGroupOpened,t.gridQuery.gridRef.expandOrCollapseAll)})).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),qa((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:La},{type:Ua},{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,La,Ua,s.DecimalPipe])],t)}(),Za=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)}(),Xa=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,t.gridQuery.rowActionVisibilityChanged$).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(Wa,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(Qa,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:Ua},{type:e.ChangeDetectorRef},{type:_n},{type:ra},{type:fr},{type:La}]},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",[Ua,e.ChangeDetectorRef,_n,ra,fr,La])],o)}(),Ja=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:ra}]},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",[ra])],n)}(),ts=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=qr({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:ra},{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",[ra,e.ElementRef])],t)}(),es=[na,Ja,ts],ns=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[es],exports:[es],entryComponents:[na]})],t)}(),os=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)}(),is=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(os),Ct("design:type",os)],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)}(),rs=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:is,decorators:[{type:e.Optional}]}]},vt([e.Input("datoMenuTriggerFor"),Ct("design:type",is),Ct("design:paramtypes",[is])],t.prototype,"childMenu",null),t=vt([e.Directive({selector:"[datoMenuTriggerFor]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,e.NgZone,is])],t)}(),as=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:is},{type:rs,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,is,rs])],t)}(),ss=[is,as,rs,os],ls=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[ss],exports:[ss],entryComponents:[is]})],t)}(),cs={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return ps})),multi:!0},ps=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:[cs],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),ds=[ps],us=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,xo],declarations:[ds],exports:[ds],entryComponents:[ds]})],t)}(),hs=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)}(),gs=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)}(),fs=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)}(),ms=new e.InjectionToken("FORM_ERRORS",{providedIn:"root",factory:function(){return{}}}),ys=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(hs);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:[ms]}]},{type:gs,decorators:[{type:e.Optional}]},{type:fs,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(ms)),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,gs,fs,o.NgControl,o.ControlContainer])],t)}(),vs=[hs,gs,ys,fs],bs=function(){function t(){}return t=vt([e.NgModule({declarations:[vs],imports:[s.CommonModule,yo],exports:[vs],entryComponents:[hs]})],t)}(),Cs=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)}(),ws=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&&(Ss(this.increment.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.incrementValue()})),Ss(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(Cs,{static:!0}),Ct("design:type",Cs)],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)}();
340
+ */var Ya=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.merge(t.gridQuery.gridRef.filterChanged,t.gridQuery.gridRef.rowGroupOpened,t.gridQuery.gridRef.expandOrCollapseAll)})).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),qa((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:La},{type:Ua},{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,La,Ua,s.DecimalPipe])],t)}(),Za=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)}(),Xa=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,t.gridQuery.rowActionVisibilityChanged$).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.getCellValueChangeEvent=function(){var t=this;return this.gridController.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.cellValueChanged.pipe(r.debounceTime(100),i.untilDestroyed(t))}))},o.prototype.getRowDataUpdatedEvent=function(){var t=this;return this.gridController.gridQuery.waitForGrid((function(){return t.gridQuery.gridRef.rowDataUpdated.pipe(r.debounceTime(100),i.untilDestroyed(t))}))},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(Wa,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(Qa,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:Ua},{type:e.ChangeDetectorRef},{type:_n},{type:ra},{type:fr},{type:La}]},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",[Ua,e.ChangeDetectorRef,_n,ra,fr,La])],o)}(),Ja=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:ra}]},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",[ra])],n)}(),ts=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=qr({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:ra},{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",[ra,e.ElementRef])],t)}(),es=[na,Ja,ts],ns=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[es],exports:[es],entryComponents:[na]})],t)}(),os=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)}(),is=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(os),Ct("design:type",os)],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)}(),rs=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:is,decorators:[{type:e.Optional}]}]},vt([e.Input("datoMenuTriggerFor"),Ct("design:type",is),Ct("design:paramtypes",[is])],t.prototype,"childMenu",null),t=vt([e.Directive({selector:"[datoMenuTriggerFor]"}),bt(2,e.Optional()),Ct("design:paramtypes",[e.ElementRef,e.NgZone,is])],t)}(),as=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:is},{type:rs,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,is,rs])],t)}(),ss=[is,as,rs,os],ls=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[ss],exports:[ss],entryComponents:[is]})],t)}(),cs={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return ps})),multi:!0},ps=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:[cs],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),ds=[ps],us=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,xo],declarations:[ds],exports:[ds],entryComponents:[ds]})],t)}(),hs=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)}(),gs=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)}(),fs=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)}(),ms=new e.InjectionToken("FORM_ERRORS",{providedIn:"root",factory:function(){return{}}}),ys=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(hs);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:[ms]}]},{type:gs,decorators:[{type:e.Optional}]},{type:fs,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(ms)),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,gs,fs,o.NgControl,o.ControlContainer])],t)}(),vs=[hs,gs,ys,fs],bs=function(){function t(){}return t=vt([e.NgModule({declarations:[vs],imports:[s.CommonModule,yo],exports:[vs],entryComponents:[hs]})],t)}(),Cs=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)}(),ws=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&&(Ss(this.increment.nativeElement).pipe(i.untilDestroyed(this)).subscribe((function(){t.incrementValue()})),Ss(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(Cs,{static:!0}),Ct("design:type",Cs)],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
341
  /**
342
342
  * @license
343
343
  * Copyright Datorama. All Rights Reserved.
@@ -432,14 +432,14 @@ Ys=t.RenderMethod||(t.RenderMethod={})).Component="Component",Ys.Template="Templ
432
432
  * Use of this source code is governed by an Apache License 2.0 license that can be
433
433
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
434
434
  */
435
- sl=t.SnackbarType||(t.SnackbarType={})).INFO="info",sl.SUCCESS="success",sl.ERROR="error",sl.DRAMATIC_SUCCESS="dramatic-success",sl.DRAMATIC_ERROR="dramatic-error";var Rl=function(){function n(t,n){this.renderer=t,this.host=n,this.showLeftIcon=!1,this.close=new e.EventEmitter,this.closedByAction=!1}return n.prototype.onAnimationEnd=function(t){"core-snackbarOut"===t.animationName&&this.close.emit({closedByAction:this.closedByAction})},Object.defineProperty(n.prototype,"dismissible",{get:function(){return this.options.dismissible},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"duration",{get:function(){return this.options.duration},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;Vt(this.host.nativeElement,"zIndex",Mn()),this.showLeftIcon=!this.isInfo(this.type),this.animate=function(e){return t.renderer.setStyle(t.element,"animation",e)},this.icon=this.options.icon||this.resolveIcon(this.type),this.renderer.addClass(this.element,"dato-snackbar-"+this.type.toLowerCase());var e=this.dismissible?"core-snackbarIn 0.5s":"core-snackbarIn 0.5s, core-snackbarOut 0.5s "+this.duration+"ms";this.animate(e)},n.prototype.onClose=function(){this.animate("core-snackbarOut 0.5s"),this.closedByAction=!0},n.prototype.isInfo=function(e){return e===t.SnackbarType.INFO},n.prototype.isSuccess=function(e){return e===t.SnackbarType.SUCCESS||e===t.SnackbarType.DRAMATIC_SUCCESS},n.prototype.resolveIcon=function(t){if(!this.isInfo(t))return this.isSuccess(t)?"checkmark":"alert"},n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"options",void 0),vt([e.Input(),Ct("design:type",String)],n.prototype,"type",void 0),vt([e.HostListener("animationend",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],n.prototype,"onAnimationEnd",null),n=vt([e.Component({selector:"dato-snackbar",template:'<div class="d-flex items-center">\n <div class="dato-snackbar-circle mr-7 d-flex justify-center align-center" *ngIf="showLeftIcon">\n <dato-icon [datoIcon]="icon"></dato-icon>\n </div>\n <span datoColor="primary-0" class="dato-snack-content">\n <ng-content></ng-content>\n </span>\n</div>\n\n<dato-icon datoIcon="close" *ngIf="dismissible" (click)="onClose()"></dato-icon>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-snackbar{border-radius:2px;font-size:12px;position:fixed;padding:6px 5px 6px 10px;top:100px;left:50%;min-width:250px;transform:translateX(-50%);box-shadow:0 2px 14px 0 rgba(0,0,0,.2);display:flex;align-items:center;justify-content:space-between}dato-snackbar .dato-icon-close{cursor:pointer}dato-snackbar .dato-snackbar-circle{border-radius:50%}dato-snackbar .dato-snackbar-circle dato-icon:not(.dato-icon-alert) svg{width:10.5px;height:7.5px}@-webkit-keyframes core-snackbarIn{from{transform:translate(-50%,-100px);opacity:0}to{ransform:translate(-50%,100px);opacity:1}}@keyframes core-snackbarIn{from{transform:translate(-50%,-100px);opacity:0}to{ransform:translate(-50%,100px);opacity:1}}@-webkit-keyframes core-snackbarOut{to{transform:translate(-50%,-100px);opacity:0}}@keyframes core-snackbarOut{to{transform:translate(-50%,-100px);opacity:0}}"]}),Ct("design:paramtypes",[e.Renderer2,e.ElementRef])],n)}(),Pl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne,On],declarations:[Rl],exports:[Rl],entryComponents:[Rl]})],t)}(),kl=function(){function t(){}return Object.defineProperty(t.prototype,"afterDismissed",{get:function(){return this._afterDismissed},set:function(t){this._afterDismissed=t},enumerable:!0,configurable:!0}),t}(),_l=function(){function n(t,e,n,o,i){this.translate=t,this.appRef=e,this.resolver=n,this.injector=o,this.document=i}return n.prototype.snack=function(e,n,o,i){var a=this;if(void 0===n&&(n=t.SnackbarType.INFO),void 0===o&&(o={}),e){this.destroy();var s=mt(mt({},{duration:4e3,dismissible:!1}),o);this.contentRef=ta({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:Mt(e)?this.translate.transform(e):e,context:i}),this.component=Zr({component:Rl,projectableNodes:this.contentRef.nodes,injector:this.injector,resolver:this.resolver});var l=this.component,c=l.instance,p=l.changeDetectorRef,d=l.location.nativeElement;this.nativeElement=d,o.className&&this.nativeElement.classList.add(o.className);var u=new kl;return u.afterDismissed=c.close,u.close=c.onClose.bind(c),c.options=s,c.type=n,c.close.pipe(r.take(1)).subscribe((function(){a.destroy()})),p.detectChanges(),this.document.body.appendChild(d),u}},n.prototype.info=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.INFO,n,o)},n.prototype.success=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.SUCCESS,n,o)},n.prototype.error=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.ERROR,n,o)},n.prototype.dramaticSuccess=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.DRAMATIC_SUCCESS,n,o)},n.prototype.dramaticError=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.DRAMATIC_ERROR,n,o)},n.prototype.destroy=function(){this.nativeElement&&(this.contentRef.destroy(this.appRef),this.component.destroy(),this.document.body.removeChild(this.nativeElement),this.contentRef=null,this.component=null,this.nativeElement=null)},n.ctorParameters=function(){return[{type:_n},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n(e.ɵɵinject(_n),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:n,providedIn:"root"}),n=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[_n,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],n)}(),jl={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ml})),multi:!0},Ml=function(t){function n(n,o,i,r,a,s){var l=t.call(this)||this;return l.renderer=n,l.host=o,l.small=i,l.fontSize=r,l.standalone=a,l.cdr=s,l.placeholder="",l.maxLength=524288,l.onFocus=new e.EventEmitter,l.onBlur=new e.EventEmitter,l.initialValue="",l.value="",l}return ft(n,t),n.prototype.ngOnInit=function(){ge(this.standalone)&&this.renderer.addClass(this.host.nativeElement,"standalone");var t=Ft(".editable-header-input",this.host.nativeElement);Vt(t,"fontSize",this.fontSize),rt.coerceBooleanProperty(this.small)&&Ut(t,"editable-header-input--small")},Object.defineProperty(n.prototype,"isValueChanged",{get:function(){return this.value!==this.initialValue},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),n.prototype.blur=function(t){this.value||this.revert(),this.onBlur.emit(t)},n.prototype.focus=function(t){this.isValueChanged||t.target.setSelectionRange(0,9999),this.onFocus.emit(t)},n.prototype.revert=function(){this.onChange(this.initialValue),this.setInputValue(this.initialValue),this.value=this.initialValue},n.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},n.prototype.writeValue=function(t){this.initialValue||(this.initialValue=t),this.value=t,this.setInputValue(t),this.cdr.markForCheck()},n.prototype.input=function(t){var e=t.target.value;this.onChange(e),this.value=e},n.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"value",t)},n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoSmall"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["fontSize"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["standalone"]}]},{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"maxLength",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],n.prototype,"onFocus",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],n.prototype,"onBlur",void 0),n=vt([e.Component({selector:"dato-editable-header",template:'<section [class.initial]="!isValueChanged">\n <input type="text"\n class="ellipsis editable-header-input"\n [maxLength]="maxLength"\n [placeholder]="placeholder"\n (input)="input($event)"\n (blur)="blur($event)"\n (focus)="focus($event)"\n (keyup.esc)="revert()">\n</section>\n',providers:[jl],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex}section{flex:1}.editable-header-input{padding:5px;margin:0;border-color:transparent;border-width:1px;width:100%;font-size:18px;height:34px;line-height:34px}.editable-header-input--small{font-size:14px;height:30px;line-height:30px}.editable-header-input:focus{outline:0}.initial .editable-header-input{font-style:italic}:host:not(.standalone) section{height:48px;padding:0 32px}:host:not(.standalone) .editable-header-input{width:480px;font-size:18px}"]}),bt(2,e.Attribute("datoSmall")),bt(3,e.Attribute("fontSize")),bt(4,e.Attribute("standalone")),Ct("design:paramtypes",[e.Renderer2,e.ElementRef,Object,Object,Object,e.ChangeDetectorRef])],n)}(Dt),Ll=[Ml],Nl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule],declarations:[Ll],exports:[Ll],entryComponents:[Ll]})],t)}(),Fl=function(){return window&&window.tinymce?window.tinymce:null},Gl=function(t){function r(e,n,o,i){var r=t.call(this)||this;return r.ngZone=e,r.http=n,r.host=o,r.config=i,r.autocompleteOptions={},r.forcePlainTextPasting=!1,r.format="html",r.isOneLine=!1,r.initialValue="",r.defaultPlugins="link fullscreen textcolor colorpicker image lists table textpattern autocomplete",r.defaultToolbar=["fontselect fontsizeselect forecolor backcolor bold italic underline link","alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen"],r}var a;return ft(r,t),a=r,Object.defineProperty(r.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t,this.editor&&this.editor.initialized&&this.editor.setMode(t?"readonly":"design")},enumerable:!0,configurable:!0}),r.prototype.ngAfterViewInit=function(){var t=this;window.tinyMCEPreInit={suffix:"",base:this.config.paths.richText,query:""},window.tinymce?this.init.call(this):this.loadLib().subscribe((function(e){Xt(e,"rich-text-editor"),t.init.call(t),t.loadAutoCompleteStyle()}))},r.prototype.loadLib=function(){return this.http.get(this.config.paths.richText+"/index.js",{responseType:"text"})},r.prototype.loadAutoCompleteStyle=function(){this.http.get(this.config.paths.richText+"/plugins/autocomplete/plugin.css",{responseType:"text"}).subscribe((function(t){Jt(t,"tinymce-autocomplete")}))},r.prototype.initEditor=function(t,e){var o=this;this.ngZone.run((function(){return e.setContent(o.initialValue)})),n.fromEvent(e,"setcontent").pipe(i.untilDestroyed(this)).subscribe((function(t){var e=t.content;"html"===t.format&&e&&o.ngZone.run((function(){return o.onChange(e)}))})),n.fromEvent(e,"change keyup undo redo").pipe(i.untilDestroyed(this)).subscribe((function(){o.ngZone.run((function(){return o.onChange(e.getContent({format:o.format}))}))}))},r.prototype.defaultOptions=function(){var t=this;return{target:this.host.nativeElement,width:this.width||600,height:this.height||300,force_br_newlines:!0,force_p_newlines:!1,resize:"both",branding:!1,inline:this.inline,elementpath:!1,readonly:this.disabled,plugins:this.plugins||this.defaultPlugins,toolbar:Lt(this.toolbar)?this.defaultToolbar:this.toolbar,fontsize_formats:"8px 10px 12px 14px 18px 24px 36px",min_width:480,menubar:!1,autocomplete:this.autocompleteOptions,setup:function(e){t.editor=e,e.on("init",(function(n){t.initEditor(n,e),t.defaultFont&&e.editorCommands.execCommand("fontName",!1,t.defaultFont)})),e.on("keydown",(function(e){return!t.isOneLine||"Enter"!==e.code})),t.forcePlainTextPasting&&e.on("paste",(function(n){t.clearEditorContentStyling(e,n)}))},content_style:this.isOneLine?"\n html { height: 100%; }\n body {\n height: 100%;\n color: rgb(55, 56, 58);\n margin: 0 25px 0 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n p { padding: 0; margin: 0; }\n ":""}},r.prototype.init=function(){var t=mt(mt({},this.defaultOptions()),this.options);this.ngZone.runOutsideAngular((function(){return Fl().init(t)}))},r.prototype.ngOnDestroy=function(){null!==Fl()&&(this.editor.off("paste"),Fl().remove(this.editor))},r.prototype.writeValue=function(t){this.initialValue=t||this.initialValue,this.editor&&this.editor.initialized&&Mt(t)&&this.editor.setContent(t)},r.prototype.setDisabledState=function(t){this.editor&&this.editor.setMode(t?"readonly":"design")},r.prototype.clearEditorContentStyling=function(t,e){e.preventDefault();var n=(e.originalEvent||e).clipboardData.getData("Text");t.execCommand("mceInsertContent",!1,n)},r.ctorParameters=function(){return[{type:e.NgZone},{type:ht.HttpClient},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[Bn]}]}]},vt([e.Input(),Ct("design:type",String)],r.prototype,"plugins",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"toolbar",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"menubar",void 0),vt([e.Input(),Ct("design:type",Boolean)],r.prototype,"inline",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"options",void 0),vt([e.Input(),Ct("design:type",Number)],r.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Number)],r.prototype,"height",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"autocompleteOptions",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],r.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Object)],r.prototype,"forcePlainTextPasting",void 0),vt([e.Input(),Ct("design:type",String)],r.prototype,"defaultFont",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"format",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"isOneLine",void 0),r=a=vt([e.Directive({selector:"[datoRichText]",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),bt(3,e.Inject(Bn)),Ct("design:paramtypes",[e.NgZone,ht.HttpClient,e.ElementRef,Object])],r)}(Dt),Vl=[Gl],zl=function(){function t(){}return t=vt([e.NgModule({declarations:[Vl],exports:[Vl]})],t)}(),Bl=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCarouselItem]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Hl={autoRun:!1,datoSize:"lg",loop:!1,selectedIndex:0,showControls:!0,showNavigationArrows:!0,showNavigationButtons:!1,animationTiming:"250ms ease-in"},Ul=function(){function t(){}return t=vt([e.Directive({selector:".dato-carousel-item"})],t)}(),Kl=function(){function t(t,n,o){this.animationBuilder=t,this.cdr=n,this.host=o,this.indexChanged=new e.EventEmitter,this.carouselUlStyle={},this.carouselWrapperStyle={},this.currentSlide=0,this.defaultAutoRunInterval=10}return t.prototype.ngOnChanges=function(t){var e=t.config,n=e.previousValue,o=e.currentValue;if(n){var i=function(t){return n[t]!==o[t]};i("datoSize")&&Qt(this.element,{datoSize:o.datoSize}),i("autoRun")&&this.initAutoRun(o.autoRun),(i("loop")||i("itemWidth"))&&(this.calcCarouselStyle(!0),this.cdr.detectChanges())}else{var r=o.datoSize,a=o.autoRun;r&&Qt(this.element,{datoSize:r}),a&&this.initAutoRun(a)}this.config=mt(mt({},Hl),this.config)},t.prototype.ngAfterViewInit=function(){var t=this;if(this.itemElements.changes.pipe(i.untilDestroyed(this)).subscribe((function(){return t.cdr.detectChanges()})),this.calcCarouselStyle(!1),_t(this.config.selectedIndex)){this.currentSlide=this.config.selectedIndex;var e=(this.hasExtraItems?this.currentSlide+1:this.currentSlide)*this.itemWidth;this.carouselUlStyle.transform="translateX(-"+e+"px)"}this.cdr.detectChanges(),this.indexChanged.emit(this.currentSlide)},t.prototype.ngOnDestroy=function(){this.player&&this.player.destroy()},Object.defineProperty(t.prototype,"itemWidth",{get:function(){return this.config.itemWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.itemElements&&this.itemElements.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowNextArrow",{get:function(){var t=this.itemElements.length-(this.autoRunSub?2:0);return this.config.loop||!(t===this.currentSlide+1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowPrevArrow",{get:function(){return this.config.loop||0!==this.currentSlide},enumerable:!0,configurable:!0}),t.prototype.next=function(){var t=this.currentSlide+1;(this.hasExtraItems||t!==this.items.length)&&(this.currentSlide=t%this.items.length,0===this.currentSlide&&this.preformSlideTransition("0ms ease-in",0),this.preformSlideTransition(),this.indexChanged.emit(this.currentSlide))},t.prototype.prev=function(){(this.config.loop||0!==this.currentSlide)&&(this.currentSlide=(this.currentSlide-1+this.items.length)%this.items.length,this.currentSlide===this.items.length-1&&this.preformSlideTransition("0ms ease-in",(this.items.length+1)*this.itemWidth),this.preformSlideTransition(),this.indexChanged.emit(this.currentSlide))},t.prototype.navigateToSlide=function(t){var e=t%this.items.length,n=Math.abs(this.currentSlide-e);if(n){for(var o=(e>this.currentSlide?this.next:this.prev).bind(this),i=1;i<=n;i++)o();this.cdr.detectChanges()}},Object.defineProperty(t.prototype,"hasExtraItems",{get:function(){return this.config.loop||!!this.autoRunSub},enumerable:!0,configurable:!0}),t.prototype.buildAnimation=function(t,e){var n=_t(e)?e:(this.hasExtraItems?this.currentSlide+1:this.currentSlide)*this.itemWidth;return this.animationBuilder.build([ct.animate(t,ct.style({transform:"translateX(-"+n+"px)"}))])},t.prototype.preformSlideTransition=function(t,e){void 0===t&&(t=this.config.animationTiming),this.player=this.buildAnimation(t,e).create(this.carousel.nativeElement),this.player.play()},t.prototype.calcCarouselStyle=function(t){this.carouselWrapperStyle={width:this.itemWidth+"px"};var e=this.itemElements.length+(this.hasExtraItems?2:0);this.carouselUlStyle={width:this.itemWidth*e+"px"},t&&this.preformSlideTransition("0ms ease-in")},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.initAutoRun=function(t){var e=this;if(this.autoRunSub&&this.autoRunSub.unsubscribe(),this.autoRunSub=null,t){Ut(this.element,"auto-play");var o=1e3*(_t(t)?Math.max(t,1):this.defaultAutoRunInterval);this.autoRunSub=n.interval(o).pipe(i.untilDestroyed(this)).subscribe((function(){return e.next()}))}else Wt(this.element,"auto-play");this.items&&!this.config.loop&&this.calcCarouselStyle(!0)},t.ctorParameters=function(){return[{type:ct.AnimationBuilder},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.ContentChildren(Bl),Ct("design:type",e.QueryList)],t.prototype,"items",void 0),vt([e.ViewChild("carousel",{read:e.ElementRef,static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"carousel",void 0),vt([e.ViewChildren(Ul,{read:e.ElementRef}),Ct("design:type",e.QueryList)],t.prototype,"itemElements",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"config",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"indexChanged",void 0),t=vt([e.Component({selector:"dato-carousel",template:'<section data-auto-id="carousel-wrapper" class="relative carousel-wrapper overflow-hidden" [ngStyle]="carouselWrapperStyle">\n <ul class="carousel-inner d-flex" [ngStyle]="carouselUlStyle" #carousel>\n <li *ngIf="hasExtraItems && items.last" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="items.last.tpl"></ng-container>\n </li>\n <li [attr.data-auto-id]="\'carousel-item-\' + i" *ngFor="let item of items;index as i" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="item.tpl"></ng-container>\n </li>\n <li *ngIf="hasExtraItems && items.first" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="items.first.tpl"></ng-container>\n </li>\n </ul>\n <ng-container *ngIf="hasItems && config.showControls">\n <ng-container *ngIf="config.showNavigationButtons">\n <div class="navigation-buttons absolute d-flex width-100 align-center" data-auto-id="buttons-container">\n <div class="pointer mx-5 circle primary-100-background-color primary-400-background-color:h"\n *ngFor="let item of items; trackBy: \'index\' | trackByProp; index as i"\n [attr.data-auto-id]="\'button-\' + i"\n (click)="navigateToSlide(i)"\n [class.active]="i === currentSlide"\n ></div>\n </div>\n </ng-container>\n <ng-container *ngIf="config.showNavigationArrows">\n <button data-auto-id="arrow-left" (click)="prev()" class="absolute d-flex justify-start pl-8 arrow prev" [class.disabled]="!allowPrevArrow">\n <dato-icon datoIcon="arrow-left" datoSize="md"></dato-icon>\n </button>\n <button data-auto-id="arrow-right" (click)="next()" class="absolute d-flex justify-end pr-8 arrow next" [class.disabled]="!allowNextArrow">\n <dato-icon datoIcon="arrow-right" datoSize="md"></dato-icon>\n </button>\n </ng-container>\n </ng-container>\n</section>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host[datoSize=sm] .circle{height:8px;width:8px;margin:0 8px}:host[datoSize=sm] .arrow,:host[datoSize=sm].auto-play:hover .arrow{align-items:center;bottom:calc(50% - 30px);display:flex;height:60px;opacity:1;width:30px}:host[datoSize=sm] .arrow:hover,:host[datoSize=sm].auto-play:hover .arrow:hover{opacity:1}:host[datoSize=sm] .arrow.next,:host[datoSize=sm].auto-play:hover .arrow.next{border-bottom-left-radius:60px;border-top-left-radius:60px}:host[datoSize=sm] .arrow.prev,:host[datoSize=sm].auto-play:hover .arrow.prev{border-bottom-right-radius:60px;border-top-right-radius:60px}:host[datoSize=sm] .arrow dato-icon[datoSize=md],:host[datoSize=sm].auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:6px}:host[datoSize=md] .arrow,:host[datoSize=md].auto-play:hover .arrow{align-items:center;bottom:calc(50% - 40px);display:flex;height:80px;opacity:1;width:40px}:host[datoSize=md] .arrow:hover,:host[datoSize=md].auto-play:hover .arrow:hover{opacity:1}:host[datoSize=md] .arrow.next,:host[datoSize=md].auto-play:hover .arrow.next{border-bottom-left-radius:80px;border-top-left-radius:80px}:host[datoSize=md] .arrow.prev,:host[datoSize=md].auto-play:hover .arrow.prev{border-bottom-right-radius:80px;border-top-right-radius:80px}:host[datoSize=md] .arrow dato-icon[datoSize=md],:host[datoSize=md].auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:12px}:host.auto-play .arrow{opacity:0}:host .navigation-buttons{height:15px;bottom:10px}:host .circle{transition:background-color .25s ease-in-out,height .25s ease-in-out,width .25s ease-in-out;height:15px;width:15px;margin:0 10px;border-radius:50%}:host .arrow:hover,:host.auto-play:hover .arrow:hover{opacity:1;opacity:.6}:host .arrow.next,:host.auto-play:hover .arrow.next{border-bottom-left-radius:108px;border-top-left-radius:108px;right:0}:host .arrow.prev,:host.auto-play:hover .arrow.prev{border-bottom-right-radius:108px;border-top-right-radius:108px;left:0}:host:not(.auto-play) .arrow.disabled{opacity:1}:host .arrow,:host.auto-play:hover .arrow{align-items:center;bottom:calc(50% - 54px);display:flex;height:108px;opacity:1;width:54px;transition:opacity .25s ease-in-out;border:0;opacity:.3}:host .arrow.next:focus,:host.auto-play:hover .arrow.next:focus{outline:0}:host .arrow.disabled,:host.auto-play:hover .arrow.disabled{cursor:default}:host .arrow.prev:focus,:host.auto-play:hover .arrow.prev:focus{outline:0}:host .arrow dato-icon[datoSize=md],:host.auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:12px}:host ul{list-style:none;margin:0;padding:0}"]}),Ct("design:paramtypes",[ct.AnimationBuilder,e.ChangeDetectorRef,e.ElementRef])],t)}(),Wl=[Kl,Bl,Ul],Ql=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne,yo],declarations:[Wl],exports:[Wl],entryComponents:[Kl]})],t)}(),$l=0,ql=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"ng-template[datoTabTitle]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Yl=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"ng-template[datoTabContent]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Zl=function(){function t(t,e){this.width=t,this.autoId=e,this.id="dato-tab-"+$l++,this.disabled=!1,this.className=""}return t.prototype.ngAfterContentChecked=function(){this.titleTpl=this.titleTpls.first,this.contentTpl=this.contentTpls.first},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["data-auto-id"]}]}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"id",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"title",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"className",void 0),vt([e.ContentChildren(ql,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"titleTpls",void 0),vt([e.ContentChildren(Yl,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"contentTpls",void 0),t=vt([e.Directive({selector:"dato-tab"}),bt(0,e.Attribute("width")),bt(1,e.Attribute("data-auto-id")),Ct("design:paramtypes",[Object,Object])],t)}(),Xl=function(){function t(t,n,o,i,r){this.cdr=t,this.host=n,this.datoVertical=o,this.datoNakedActive=i,this.defaultTabWidth=r,this._tabStyle={},this.destroyOnHide=!0,this.tabChange=new e.EventEmitter,this.datoSize="lg"}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.datoVertical&&Ut(this.element,"dato-tabs--vertical"),this.datoNakedActive&&Ut(this.element,"dato-tabs--clean"),this.datoSize=this.datoSize||"md",this.fontSize_="tab-"+this.datoSize},t.prototype.ngAfterContentChecked=function(){var t=this._getTabById(this.activeId);this.activeId=t?t.id:this.tabs.length?this.tabs.first.id:null,this.setInnerTabsStyle(),this.cdr.detectChanges()},t.prototype.select=function(t){var e=this._getTabById(t);if(e&&!e.disabled&&this.activeId!==e.id){var n=!1;this.tabChange.emit({activeId:this.activeId,nextId:e.id,preventDefault:function(){n=!0}}),n||(this.activeId=e.id,this.movePointer())}this.cdr.markForCheck()},t.prototype.setInnerTabsStyle=function(){var t=this;this._tabStyle=this.tabs.reduce((function(e,n){var o=n.width||t.defaultTabWidth;return o&&(o=rt.coerceCssPixelValue(o),e[n.id]={width:o,"max-width":o}),e}),{})},t.prototype.movePointer=function(){if(!this.datoVertical&&!this.datoNakedActive&&this.activeId){var t=this.getActiveTabElement();if(t){var e=this.getPointer();Ht(e,{opacity:1,width:t.clientWidth+"px",transform:"translateX("+t.offsetLeft+"px)"}),n.fromEvent(e,"transitionend").pipe(r.first()).subscribe((function(){Ht(e,{opacity:0})}))}}},t.prototype.getActiveTabElement=function(){var t=this._getTabById(this.activeId),e=this.element.querySelector("#"+t.id);return e&&e.parentNode},t.prototype.getPointer=function(){return this.element.querySelector(".tab-pointer")},t.prototype._getTabById=function(t){var e=this.tabs.filter((function(e){return e.id===t}));return e.length?e[0]:null},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoVertical"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoNakedActive"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoTabWidth"]}]}]},vt([e.ContentChildren(Zl),Ct("design:type",e.QueryList)],t.prototype,"tabs",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"activeId",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"destroyOnHide",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"tabChange",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoSize",void 0),t=vt([e.Component({selector:"dato-tabset",template:'<ul role="tablist" class="dato-tabs">\n <div class="tab-pointer"></div>\n <li class="nav-item {{tab.className}}" [ngStyle]="_tabStyle[tab.id]" *ngFor="let tab of tabs; trackBy \'id\' | trackByProp"\n (click.prevent)="select(tab.id)"\n [class.active]="tab.id === activeId"\n [class.disabled]="tab.disabled"\n [attr.data-tab-id]="tab.id"\n [attr.data-tab-is-active]="tab.id === activeId">\n <a [id]="tab.id" class="nav-link" [ngClass]="fontSize_" href role="tab"\n [attr.tabindex]="(tab.disabled ? \'-1\': undefined)"\n [attr.data-auto-id]="tab.autoId || tab.id"\n [attr.aria-controls]="(!destroyOnHide || tab.id === activeId ? tab.id + \'-panel\' : null)"\n [attr.aria-expanded]="tab.id === activeId"\n [attr.aria-disabled]="tab.disabled">\n {{tab.title | translate}}\n <ng-template [ngTemplateOutlet]="tab.titleTpl?.templateRef"></ng-template>\n </a>\n </li>\n</ul>\n<div class="tab-content" data-auto-id="data-tab-content">\n <ng-template ngFor let-tab [ngForOf]="tabs">\n <div class="tab-pane" *ngIf="!destroyOnHide || tab.id === activeId" role="tabpanel" [class.is-hidden]="!this.destroyOnHide && tab.id !== activeId"\n [attr.aria-labelledby]="tab.id" id="{{tab.id}}-panel" [attr.aria-expanded]="tab.id === activeId">\n <ng-template [ngTemplateOutlet]="tab.contentTpl?.templateRef"></ng-template>\n </div>\n </ng-template>\n</div>\n',exportAs:"datoTabset",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".headline{font-size:34px;font-weight:300;line-height:46px}.large-headline{font-size:48px;font-weight:300;line-height:60px}.sub-headline{font-size:18px;font-weight:600;line-height:24px}.mid-headline{font-size:24px;font-weight:600;line-height:33px}.simple{font-size:14px;line-height:19px}.simple-bold{font-size:14px;font-weight:600;line-height:19px}.simple-italic{font-size:14px;font-style:italic;line-height:19px}.note{font-size:12px;line-height:16px}.note-bold{font-size:12px;font-weight:600;line-height:16px}.note-italic{font-size:12px;font-style:italic;line-height:16px}.dato-headline{font-size:34px;font-weight:300;line-height:46px}.dato-large-headline{font-size:48px;font-weight:300;line-height:60px}.dato-sub-headline{font-size:18px;font-weight:600;line-height:24px}.dato-mid-headline{font-size:24px;font-weight:600;line-height:33px}.dato-simple{font-size:14px;line-height:19px}.dato-simple-bold{font-size:14px;font-weight:600;line-height:19px}.dato-simple-italic{font-size:14px;font-style:italic;line-height:19px}.dato-note{font-size:12px;line-height:16px}.dato-note-bold{font-size:12px;font-weight:600;line-height:16px}.dato-note-italic{font-size:12px;font-style:italic;line-height:16px}:host ul{position:relative;display:flex;flex-shrink:0;padding:0;margin:0;overflow-x:hidden;list-style:none}:host li{flex:1;cursor:pointer;text-align:center;padding:5px 0;border-bottom:2px solid transparent}:host li a{text-decoration:none}:host .is-hidden{display:none!important}:host .active{transition:border-bottom-color .3s}:host .active a{font-weight:600;transition:color .3s,font-weight .3s}:host[datoNativeWidth] li{flex:none;padding:5px 20px}:host .tab-pointer{height:2px;position:absolute;left:0;bottom:0;transition:transform .3s,width .3s}:host .tab-content{display:flex;flex-direction:column;flex:1 1 auto;overflow-y:auto}:host .tab-content .tab-pane{display:flex;flex-direction:column;flex:1 1 auto}:host(.dato-tabs--vertical){display:flex}:host(.dato-tabs--vertical)>ul{flex-direction:column;flex-shrink:0;box-shadow:inset -5px 5px 5px 0 rgba(0,0,0,.04)}:host(.dato-tabs--vertical)>ul li{display:flex;flex:0;min-width:44px;min-height:40px;padding:2px 2px 0 0}:host(.dato-tabs--vertical)>ul li a{display:flex;flex-grow:1;margin:0 6px;justify-content:center;align-items:center}:host(.dato-tabs--vertical)>.tab-pointer{display:none}.tab-md{font-size:12px;line-height:16px}.tab-lg{font-size:14px;line-height:19px}"]}),bt(2,e.Attribute("datoVertical")),bt(3,e.Attribute("datoNakedActive")),bt(4,e.Attribute("datoTabWidth")),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,Object,Object,Object])],t)}(),Jl=[Xl,Zl,Yl,ql],tc=function(){function t(){}return t=vt([e.NgModule({declarations:Jl,exports:Jl,imports:[s.CommonModule,yo]})],t)}();
435
+ sl=t.SnackbarType||(t.SnackbarType={})).INFO="info",sl.SUCCESS="success",sl.ERROR="error",sl.DRAMATIC_SUCCESS="dramatic-success",sl.DRAMATIC_ERROR="dramatic-error";var Rl=function(){function n(t,n){this.renderer=t,this.host=n,this.showLeftIcon=!1,this.close=new e.EventEmitter,this.closedByAction=!1}return n.prototype.onAnimationEnd=function(t){"core-snackbarOut"===t.animationName&&this.close.emit({closedByAction:this.closedByAction})},Object.defineProperty(n.prototype,"dismissible",{get:function(){return this.options.dismissible},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"duration",{get:function(){return this.options.duration},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;Vt(this.host.nativeElement,"zIndex",Mn()),this.showLeftIcon=!this.isInfo(this.type),this.animate=function(e){return t.renderer.setStyle(t.element,"animation",e)},this.icon=this.options.icon||this.resolveIcon(this.type),this.renderer.addClass(this.element,"dato-snackbar-"+this.type.toLowerCase());var e=this.dismissible?"core-snackbarIn 0.5s":"core-snackbarIn 0.5s, core-snackbarOut 0.5s "+this.duration+"ms";this.animate(e)},n.prototype.onClose=function(){this.animate("core-snackbarOut 0.5s"),this.closedByAction=!0},n.prototype.isInfo=function(e){return e===t.SnackbarType.INFO},n.prototype.isSuccess=function(e){return e===t.SnackbarType.SUCCESS||e===t.SnackbarType.DRAMATIC_SUCCESS},n.prototype.resolveIcon=function(t){if(!this.isInfo(t))return this.isSuccess(t)?"checkmark":"alert"},n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"options",void 0),vt([e.Input(),Ct("design:type",String)],n.prototype,"type",void 0),vt([e.HostListener("animationend",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],n.prototype,"onAnimationEnd",null),n=vt([e.Component({selector:"dato-snackbar",template:'<div class="d-flex items-center">\n <div class="dato-snackbar-circle mr-7 d-flex justify-center align-center" *ngIf="showLeftIcon">\n <dato-icon [datoIcon]="icon"></dato-icon>\n </div>\n <span datoColor="primary-0" class="dato-snack-content">\n <ng-content></ng-content>\n </span>\n</div>\n\n<dato-icon datoIcon="close" *ngIf="dismissible" (click)="onClose()"></dato-icon>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-snackbar{border-radius:2px;font-size:12px;position:fixed;padding:6px 5px 6px 10px;top:100px;left:50%;min-width:250px;transform:translateX(-50%);box-shadow:0 2px 14px 0 rgba(0,0,0,.2);display:flex;align-items:center;justify-content:space-between}dato-snackbar .dato-icon-close{cursor:pointer}dato-snackbar .dato-snackbar-circle{border-radius:50%}dato-snackbar .dato-snackbar-circle dato-icon:not(.dato-icon-alert) svg{width:10.5px;height:7.5px}@-webkit-keyframes core-snackbarIn{from{transform:translate(-50%,-100px);opacity:0}to{ransform:translate(-50%,100px);opacity:1}}@keyframes core-snackbarIn{from{transform:translate(-50%,-100px);opacity:0}to{ransform:translate(-50%,100px);opacity:1}}@-webkit-keyframes core-snackbarOut{to{transform:translate(-50%,-100px);opacity:0}}@keyframes core-snackbarOut{to{transform:translate(-50%,-100px);opacity:0}}"]}),Ct("design:paramtypes",[e.Renderer2,e.ElementRef])],n)}(),Pl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne,On],declarations:[Rl],exports:[Rl],entryComponents:[Rl]})],t)}(),kl=function(){function t(){}return Object.defineProperty(t.prototype,"afterDismissed",{get:function(){return this._afterDismissed},set:function(t){this._afterDismissed=t},enumerable:!0,configurable:!0}),t}(),_l=function(){function n(t,e,n,o,i){this.translate=t,this.appRef=e,this.resolver=n,this.injector=o,this.document=i}return n.prototype.snack=function(e,n,o,i){var a=this;if(void 0===n&&(n=t.SnackbarType.INFO),void 0===o&&(o={}),e){this.destroy();var s=mt(mt({},{duration:4e3,dismissible:!1}),o);this.contentRef=ta({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:Mt(e)?this.translate.transform(e):e,context:i}),this.component=Zr({component:Rl,projectableNodes:this.contentRef.nodes,injector:this.injector,resolver:this.resolver});var l=this.component,c=l.instance,p=l.changeDetectorRef,d=l.location.nativeElement;this.nativeElement=d,o.className&&this.nativeElement.classList.add(o.className);var u=new kl;return u.afterDismissed=c.close,u.close=c.onClose.bind(c),c.options=s,c.type=n,c.close.pipe(r.take(1)).subscribe((function(){a.destroy()})),p.detectChanges(),this.document.body.appendChild(d),u}},n.prototype.info=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.INFO,n,o)},n.prototype.success=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.SUCCESS,n,o)},n.prototype.error=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.ERROR,n,o)},n.prototype.dramaticSuccess=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.DRAMATIC_SUCCESS,n,o)},n.prototype.dramaticError=function(e,n,o){return void 0===n&&(n={}),this.snack(e,t.SnackbarType.DRAMATIC_ERROR,n,o)},n.prototype.destroy=function(){this.nativeElement&&(this.contentRef.destroy(this.appRef),this.component.destroy(),this.document.body.removeChild(this.nativeElement),this.contentRef=null,this.component=null,this.nativeElement=null)},n.ctorParameters=function(){return[{type:_n},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n(e.ɵɵinject(_n),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:n,providedIn:"root"}),n=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[_n,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],n)}(),jl={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return Ml})),multi:!0},Ml=function(t){function n(n,o,i,r,a,s){var l=t.call(this)||this;return l.renderer=n,l.host=o,l.small=i,l.fontSize=r,l.standalone=a,l.cdr=s,l.placeholder="",l.maxLength=524288,l.onFocus=new e.EventEmitter,l.onBlur=new e.EventEmitter,l.initialValue="",l.value="",l}return ft(n,t),n.prototype.ngOnInit=function(){ge(this.standalone)&&this.renderer.addClass(this.host.nativeElement,"standalone");var t=Ft(".editable-header-input",this.host.nativeElement);Vt(t,"fontSize",this.fontSize),rt.coerceBooleanProperty(this.small)&&Ut(t,"editable-header-input--small")},Object.defineProperty(n.prototype,"isValueChanged",{get:function(){return this.value!==this.initialValue},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputElement",{get:function(){return this.host.nativeElement.querySelector("input")},enumerable:!0,configurable:!0}),n.prototype.blur=function(t){this.value||this.revert(),this.onBlur.emit(t)},n.prototype.focus=function(t){this.isValueChanged||t.target.setSelectionRange(0,9999),this.onFocus.emit(t)},n.prototype.revert=function(){this.onChange(this.initialValue),this.setInputValue(this.initialValue),this.value=this.initialValue},n.prototype.setDisabledState=function(t){this.renderer.setProperty(this.inputElement,"disabled",t)},n.prototype.writeValue=function(t){this.initialValue||(this.initialValue=t),this.value=t,this.setInputValue(t),this.cdr.markForCheck()},n.prototype.input=function(t){var e=t.target.value;this.onChange(e),this.value=e},n.prototype.setInputValue=function(t){this.renderer.setProperty(this.inputElement,"value",t)},n.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoSmall"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["fontSize"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["standalone"]}]},{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"placeholder",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"maxLength",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],n.prototype,"onFocus",void 0),vt([e.Output(),Ct("design:type",e.EventEmitter)],n.prototype,"onBlur",void 0),n=vt([e.Component({selector:"dato-editable-header",template:'<section [class.initial]="!isValueChanged">\n <input type="text"\n class="ellipsis editable-header-input"\n [maxLength]="maxLength"\n [placeholder]="placeholder"\n (input)="input($event)"\n (blur)="blur($event)"\n (focus)="focus($event)"\n (keyup.esc)="revert()">\n</section>\n',providers:[jl],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex}section{flex:1}.editable-header-input{padding:5px;margin:0;border-color:transparent;border-width:1px;width:100%;font-size:18px;height:34px;line-height:34px}.editable-header-input--small{font-size:14px;height:30px;line-height:30px}.editable-header-input:focus{outline:0}.initial .editable-header-input{font-style:italic}:host:not(.standalone) section{height:48px;padding:0 32px}:host:not(.standalone) .editable-header-input{width:480px;font-size:18px}"]}),bt(2,e.Attribute("datoSmall")),bt(3,e.Attribute("fontSize")),bt(4,e.Attribute("standalone")),Ct("design:paramtypes",[e.Renderer2,e.ElementRef,Object,Object,Object,e.ChangeDetectorRef])],n)}(Dt),Ll=[Ml],Nl=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,o.ReactiveFormsModule],declarations:[Ll],exports:[Ll],entryComponents:[Ll]})],t)}(),Fl=function(){function t(t,e){this.http=t,this.config=e}return t.prototype.getLib=function(t,e){return this.richTextScript$||this.initLib(t,e),this.richTextScript$},t.prototype.initLib=function(t,e){this.richTextScript$=n.combineLatest([this.http.get(this.config.paths.richText+"/index.js",{responseType:"text"}).pipe(r.tap((function(e){return t(e,"rich-text-editor")}))),this.http.get(this.config.paths.richText+"/plugins/autocomplete/plugin.css",{responseType:"text"}).pipe(r.tap((function(t){return e(t,"tinymce-autocomplete")})))]).pipe(r.shareReplay(1))},t.ctorParameters=function(){return[{type:ht.HttpClient},{type:void 0,decorators:[{type:e.Inject,args:[Bn]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(ht.HttpClient),e.ɵɵinject(Bn))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(Bn)),Ct("design:paramtypes",[ht.HttpClient,Object])],t)}(),Gl=function(){return window&&window.tinymce?window.tinymce:null},Vl=function(t){function r(e,n,o,i){var r=t.call(this)||this;return r.ngZone=e,r.richTextService=n,r.config=o,r.host=i,r.autocompleteOptions={},r.forcePlainTextPasting=!1,r.format="html",r.isOneLine=!1,r.initialValue="",r.defaultPlugins="link fullscreen image lists table autocomplete",r.defaultToolbar=["fontfamily fontsize forecolor backcolor bold italic underline link","alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen"],r}var a;return ft(r,t),a=r,Object.defineProperty(r.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=t,this.editor&&this.editor.initialized&&this.editor.setMode(t?"readonly":"design")},enumerable:!0,configurable:!0}),r.prototype.ngAfterViewInit=function(){var t=this;window.tinyMCEPreInit={suffix:"",base:this.config.paths.richText,query:""},this.richTextService.getLib(Xt,Jt).pipe(i.untilDestroyed(this)).subscribe((function(){t.init.call(t)}))},r.prototype.initEditor=function(t,e){var o=this;this.ngZone.run((function(){return e.setContent(o.initialValue)})),n.fromEvent(e,"setcontent").pipe(i.untilDestroyed(this)).subscribe((function(t){var e=t.content;"html"===t.format&&e&&o.ngZone.run((function(){return o.onChange(e)}))})),n.fromEvent(e,"change keyup undo redo").pipe(i.untilDestroyed(this)).subscribe((function(){o.ngZone.run((function(){return o.onChange(e.getContent({format:o.format}))}))}))},r.prototype.defaultOptions=function(){var t=this;return{target:this.host.nativeElement,width:this.width||600,height:this.height||300,resize:"both",branding:!1,inline:this.inline,elementpath:!1,readonly:this.disabled,plugins:this.plugins||this.defaultPlugins,toolbar:Lt(this.toolbar)?this.defaultToolbar:this.toolbar,font_size_formats:"8px 10px 12px 14px 18px 24px 36px",min_width:480,menubar:!1,autocomplete:this.autocompleteOptions,suffix:".min",skin:"tinymce-5",setup:function(e){t.editor=e,e.on("init",(function(n){t.initEditor(n,e),t.defaultFont&&e.editorCommands.execCommand("fontName",!1,t.defaultFont)})),e.on("keydown",(function(e){return!t.isOneLine||"Enter"!==e.code})),t.forcePlainTextPasting&&e.on("paste",(function(n){t.clearEditorContentStyling(e,n)}))},content_style:this.isOneLine?"\n html { height: 100%; }\n body {\n height: 100%;\n color: rgb(55, 56, 58);\n margin: 0 25px 0 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n p { padding: 0; margin: 0; }\n ":""}},r.prototype.init=function(){var t=mt(mt({},this.defaultOptions()),this.options);this.ngZone.runOutsideAngular((function(){return Gl().init(t)}))},r.prototype.ngOnDestroy=function(){null!==Gl()&&(this.editor.off("paste"),Gl().remove(this.editor))},r.prototype.writeValue=function(t){this.initialValue=t||this.initialValue,this.editor&&this.editor.initialized&&Mt(t)&&this.editor.setContent(t)},r.prototype.setDisabledState=function(t){this.editor&&this.editor.setMode(t?"readonly":"design")},r.prototype.clearEditorContentStyling=function(t,e){e.preventDefault();var n=(e.originalEvent||e).clipboardData.getData("Text");t.execCommand("mceInsertContent",!1,n)},r.ctorParameters=function(){return[{type:e.NgZone},{type:Fl},{type:void 0,decorators:[{type:e.Inject,args:[Bn]}]},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String)],r.prototype,"plugins",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"toolbar",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"menubar",void 0),vt([e.Input(),Ct("design:type",Boolean)],r.prototype,"inline",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"options",void 0),vt([e.Input(),Ct("design:type",Number)],r.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Number)],r.prototype,"height",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"autocompleteOptions",void 0),vt([e.Input(),Ct("design:type",Boolean),Ct("design:paramtypes",[Boolean])],r.prototype,"disabled",null),vt([e.Input(),Ct("design:type",Object)],r.prototype,"forcePlainTextPasting",void 0),vt([e.Input(),Ct("design:type",String)],r.prototype,"defaultFont",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"format",void 0),vt([e.Input(),Ct("design:type",Object)],r.prototype,"isOneLine",void 0),r=a=vt([e.Directive({selector:"[datoRichText]",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),bt(2,e.Inject(Bn)),Ct("design:paramtypes",[e.NgZone,Fl,Object,e.ElementRef])],r)}(Dt),zl=[Vl],Bl=function(){function t(){}return t=vt([e.NgModule({declarations:[zl],exports:[zl]})],t)}(),Hl=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoCarouselItem]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Ul={autoRun:!1,datoSize:"lg",loop:!1,selectedIndex:0,showControls:!0,showNavigationArrows:!0,showNavigationButtons:!1,animationTiming:"250ms ease-in"},Kl=function(){function t(){}return t=vt([e.Directive({selector:".dato-carousel-item"})],t)}(),Wl=function(){function t(t,n,o){this.animationBuilder=t,this.cdr=n,this.host=o,this.indexChanged=new e.EventEmitter,this.carouselUlStyle={},this.carouselWrapperStyle={},this.currentSlide=0,this.defaultAutoRunInterval=10}return t.prototype.ngOnChanges=function(t){var e=t.config,n=e.previousValue,o=e.currentValue;if(n){var i=function(t){return n[t]!==o[t]};i("datoSize")&&Qt(this.element,{datoSize:o.datoSize}),i("autoRun")&&this.initAutoRun(o.autoRun),(i("loop")||i("itemWidth"))&&(this.calcCarouselStyle(!0),this.cdr.detectChanges())}else{var r=o.datoSize,a=o.autoRun;r&&Qt(this.element,{datoSize:r}),a&&this.initAutoRun(a)}this.config=mt(mt({},Ul),this.config)},t.prototype.ngAfterViewInit=function(){var t=this;if(this.itemElements.changes.pipe(i.untilDestroyed(this)).subscribe((function(){return t.cdr.detectChanges()})),this.calcCarouselStyle(!1),_t(this.config.selectedIndex)){this.currentSlide=this.config.selectedIndex;var e=(this.hasExtraItems?this.currentSlide+1:this.currentSlide)*this.itemWidth;this.carouselUlStyle.transform="translateX(-"+e+"px)"}this.cdr.detectChanges(),this.indexChanged.emit(this.currentSlide)},t.prototype.ngOnDestroy=function(){this.player&&this.player.destroy()},Object.defineProperty(t.prototype,"itemWidth",{get:function(){return this.config.itemWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.itemElements&&this.itemElements.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowNextArrow",{get:function(){var t=this.itemElements.length-(this.autoRunSub?2:0);return this.config.loop||!(t===this.currentSlide+1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowPrevArrow",{get:function(){return this.config.loop||0!==this.currentSlide},enumerable:!0,configurable:!0}),t.prototype.next=function(){var t=this.currentSlide+1;(this.hasExtraItems||t!==this.items.length)&&(this.currentSlide=t%this.items.length,0===this.currentSlide&&this.preformSlideTransition("0ms ease-in",0),this.preformSlideTransition(),this.indexChanged.emit(this.currentSlide))},t.prototype.prev=function(){(this.config.loop||0!==this.currentSlide)&&(this.currentSlide=(this.currentSlide-1+this.items.length)%this.items.length,this.currentSlide===this.items.length-1&&this.preformSlideTransition("0ms ease-in",(this.items.length+1)*this.itemWidth),this.preformSlideTransition(),this.indexChanged.emit(this.currentSlide))},t.prototype.navigateToSlide=function(t){var e=t%this.items.length,n=Math.abs(this.currentSlide-e);if(n){for(var o=(e>this.currentSlide?this.next:this.prev).bind(this),i=1;i<=n;i++)o();this.cdr.detectChanges()}},Object.defineProperty(t.prototype,"hasExtraItems",{get:function(){return this.config.loop||!!this.autoRunSub},enumerable:!0,configurable:!0}),t.prototype.buildAnimation=function(t,e){var n=_t(e)?e:(this.hasExtraItems?this.currentSlide+1:this.currentSlide)*this.itemWidth;return this.animationBuilder.build([ct.animate(t,ct.style({transform:"translateX(-"+n+"px)"}))])},t.prototype.preformSlideTransition=function(t,e){void 0===t&&(t=this.config.animationTiming),this.player=this.buildAnimation(t,e).create(this.carousel.nativeElement),this.player.play()},t.prototype.calcCarouselStyle=function(t){this.carouselWrapperStyle={width:this.itemWidth+"px"};var e=this.itemElements.length+(this.hasExtraItems?2:0);this.carouselUlStyle={width:this.itemWidth*e+"px"},t&&this.preformSlideTransition("0ms ease-in")},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.initAutoRun=function(t){var e=this;if(this.autoRunSub&&this.autoRunSub.unsubscribe(),this.autoRunSub=null,t){Ut(this.element,"auto-play");var o=1e3*(_t(t)?Math.max(t,1):this.defaultAutoRunInterval);this.autoRunSub=n.interval(o).pipe(i.untilDestroyed(this)).subscribe((function(){return e.next()}))}else Wt(this.element,"auto-play");this.items&&!this.config.loop&&this.calcCarouselStyle(!0)},t.ctorParameters=function(){return[{type:ct.AnimationBuilder},{type:e.ChangeDetectorRef},{type:e.ElementRef}]},vt([e.ContentChildren(Hl),Ct("design:type",e.QueryList)],t.prototype,"items",void 0),vt([e.ViewChild("carousel",{read:e.ElementRef,static:!0}),Ct("design:type",e.ElementRef)],t.prototype,"carousel",void 0),vt([e.ViewChildren(Kl,{read:e.ElementRef}),Ct("design:type",e.QueryList)],t.prototype,"itemElements",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"config",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"indexChanged",void 0),t=vt([e.Component({selector:"dato-carousel",template:'<section data-auto-id="carousel-wrapper" class="relative carousel-wrapper overflow-hidden" [ngStyle]="carouselWrapperStyle">\n <ul class="carousel-inner d-flex" [ngStyle]="carouselUlStyle" #carousel>\n <li *ngIf="hasExtraItems && items.last" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="items.last.tpl"></ng-container>\n </li>\n <li [attr.data-auto-id]="\'carousel-item-\' + i" *ngFor="let item of items;index as i" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="item.tpl"></ng-container>\n </li>\n <li *ngIf="hasExtraItems && items.first" class="dato-carousel-item" [style.width.px]="itemWidth">\n <ng-container [ngTemplateOutlet]="items.first.tpl"></ng-container>\n </li>\n </ul>\n <ng-container *ngIf="hasItems && config.showControls">\n <ng-container *ngIf="config.showNavigationButtons">\n <div class="navigation-buttons absolute d-flex width-100 align-center" data-auto-id="buttons-container">\n <div class="pointer mx-5 circle primary-100-background-color primary-400-background-color:h"\n *ngFor="let item of items; trackBy: \'index\' | trackByProp; index as i"\n [attr.data-auto-id]="\'button-\' + i"\n (click)="navigateToSlide(i)"\n [class.active]="i === currentSlide"\n ></div>\n </div>\n </ng-container>\n <ng-container *ngIf="config.showNavigationArrows">\n <button data-auto-id="arrow-left" (click)="prev()" class="absolute d-flex justify-start pl-8 arrow prev" [class.disabled]="!allowPrevArrow">\n <dato-icon datoIcon="arrow-left" datoSize="md"></dato-icon>\n </button>\n <button data-auto-id="arrow-right" (click)="next()" class="absolute d-flex justify-end pr-8 arrow next" [class.disabled]="!allowNextArrow">\n <dato-icon datoIcon="arrow-right" datoSize="md"></dato-icon>\n </button>\n </ng-container>\n </ng-container>\n</section>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host[datoSize=sm] .circle{height:8px;width:8px;margin:0 8px}:host[datoSize=sm] .arrow,:host[datoSize=sm].auto-play:hover .arrow{align-items:center;bottom:calc(50% - 30px);display:flex;height:60px;opacity:1;width:30px}:host[datoSize=sm] .arrow:hover,:host[datoSize=sm].auto-play:hover .arrow:hover{opacity:1}:host[datoSize=sm] .arrow.next,:host[datoSize=sm].auto-play:hover .arrow.next{border-bottom-left-radius:60px;border-top-left-radius:60px}:host[datoSize=sm] .arrow.prev,:host[datoSize=sm].auto-play:hover .arrow.prev{border-bottom-right-radius:60px;border-top-right-radius:60px}:host[datoSize=sm] .arrow dato-icon[datoSize=md],:host[datoSize=sm].auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:6px}:host[datoSize=md] .arrow,:host[datoSize=md].auto-play:hover .arrow{align-items:center;bottom:calc(50% - 40px);display:flex;height:80px;opacity:1;width:40px}:host[datoSize=md] .arrow:hover,:host[datoSize=md].auto-play:hover .arrow:hover{opacity:1}:host[datoSize=md] .arrow.next,:host[datoSize=md].auto-play:hover .arrow.next{border-bottom-left-radius:80px;border-top-left-radius:80px}:host[datoSize=md] .arrow.prev,:host[datoSize=md].auto-play:hover .arrow.prev{border-bottom-right-radius:80px;border-top-right-radius:80px}:host[datoSize=md] .arrow dato-icon[datoSize=md],:host[datoSize=md].auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:12px}:host.auto-play .arrow{opacity:0}:host .navigation-buttons{height:15px;bottom:10px}:host .circle{transition:background-color .25s ease-in-out,height .25s ease-in-out,width .25s ease-in-out;height:15px;width:15px;margin:0 10px;border-radius:50%}:host .arrow:hover,:host.auto-play:hover .arrow:hover{opacity:1;opacity:.6}:host .arrow.next,:host.auto-play:hover .arrow.next{border-bottom-left-radius:108px;border-top-left-radius:108px;right:0}:host .arrow.prev,:host.auto-play:hover .arrow.prev{border-bottom-right-radius:108px;border-top-right-radius:108px;left:0}:host:not(.auto-play) .arrow.disabled{opacity:1}:host .arrow,:host.auto-play:hover .arrow{align-items:center;bottom:calc(50% - 54px);display:flex;height:108px;opacity:1;width:54px;transition:opacity .25s ease-in-out;border:0;opacity:.3}:host .arrow.next:focus,:host.auto-play:hover .arrow.next:focus{outline:0}:host .arrow.disabled,:host.auto-play:hover .arrow.disabled{cursor:default}:host .arrow.prev:focus,:host.auto-play:hover .arrow.prev:focus{outline:0}:host .arrow dato-icon[datoSize=md],:host.auto-play:hover .arrow dato-icon[datoSize=md]{height:20px;width:12px}:host ul{list-style:none;margin:0;padding:0}"]}),Ct("design:paramtypes",[ct.AnimationBuilder,e.ChangeDetectorRef,e.ElementRef])],t)}(),Ql=[Wl,Hl,Kl],$l=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne,yo],declarations:[Ql],exports:[Ql],entryComponents:[Wl]})],t)}(),ql=0,Yl=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"ng-template[datoTabTitle]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Zl=function(){function t(t){this.templateRef=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"ng-template[datoTabContent]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Xl=function(){function t(t,e){this.width=t,this.autoId=e,this.id="dato-tab-"+ql++,this.disabled=!1,this.className=""}return t.prototype.ngAfterContentChecked=function(){this.titleTpl=this.titleTpls.first,this.contentTpl=this.contentTpls.first},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["width"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["data-auto-id"]}]}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"id",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"title",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"className",void 0),vt([e.ContentChildren(Yl,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"titleTpls",void 0),vt([e.ContentChildren(Zl,{descendants:!1}),Ct("design:type",e.QueryList)],t.prototype,"contentTpls",void 0),t=vt([e.Directive({selector:"dato-tab"}),bt(0,e.Attribute("width")),bt(1,e.Attribute("data-auto-id")),Ct("design:paramtypes",[Object,Object])],t)}(),Jl=function(){function t(t,n,o,i,r){this.cdr=t,this.host=n,this.datoVertical=o,this.datoNakedActive=i,this.defaultTabWidth=r,this._tabStyle={},this.destroyOnHide=!0,this.tabChange=new e.EventEmitter,this.datoSize="lg"}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.datoVertical&&Ut(this.element,"dato-tabs--vertical"),this.datoNakedActive&&Ut(this.element,"dato-tabs--clean"),this.datoSize=this.datoSize||"md",this.fontSize_="tab-"+this.datoSize},t.prototype.ngAfterContentChecked=function(){var t=this._getTabById(this.activeId);this.activeId=t?t.id:this.tabs.length?this.tabs.first.id:null,this.setInnerTabsStyle(),this.cdr.detectChanges()},t.prototype.select=function(t){var e=this._getTabById(t);if(e&&!e.disabled&&this.activeId!==e.id){var n=!1;this.tabChange.emit({activeId:this.activeId,nextId:e.id,preventDefault:function(){n=!0}}),n||(this.activeId=e.id,this.movePointer())}this.cdr.markForCheck()},t.prototype.setInnerTabsStyle=function(){var t=this;this._tabStyle=this.tabs.reduce((function(e,n){var o=n.width||t.defaultTabWidth;return o&&(o=rt.coerceCssPixelValue(o),e[n.id]={width:o,"max-width":o}),e}),{})},t.prototype.movePointer=function(){if(!this.datoVertical&&!this.datoNakedActive&&this.activeId){var t=this.getActiveTabElement();if(t){var e=this.getPointer();Ht(e,{opacity:1,width:t.clientWidth+"px",transform:"translateX("+t.offsetLeft+"px)"}),n.fromEvent(e,"transitionend").pipe(r.first()).subscribe((function(){Ht(e,{opacity:0})}))}}},t.prototype.getActiveTabElement=function(){var t=this._getTabById(this.activeId),e=this.element.querySelector("#"+t.id);return e&&e.parentNode},t.prototype.getPointer=function(){return this.element.querySelector(".tab-pointer")},t.prototype._getTabById=function(t){var e=this.tabs.filter((function(e){return e.id===t}));return e.length?e[0]:null},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Attribute,args:["datoVertical"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoNakedActive"]}]},{type:void 0,decorators:[{type:e.Attribute,args:["datoTabWidth"]}]}]},vt([e.ContentChildren(Xl),Ct("design:type",e.QueryList)],t.prototype,"tabs",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"activeId",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"destroyOnHide",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"tabChange",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"datoSize",void 0),t=vt([e.Component({selector:"dato-tabset",template:'<ul role="tablist" class="dato-tabs">\n <div class="tab-pointer"></div>\n <li class="nav-item {{tab.className}}" [ngStyle]="_tabStyle[tab.id]" *ngFor="let tab of tabs; trackBy \'id\' | trackByProp"\n (click.prevent)="select(tab.id)"\n [class.active]="tab.id === activeId"\n [class.disabled]="tab.disabled"\n [attr.data-tab-id]="tab.id"\n [attr.data-tab-is-active]="tab.id === activeId">\n <a [id]="tab.id" class="nav-link" [ngClass]="fontSize_" href role="tab"\n [attr.tabindex]="(tab.disabled ? \'-1\': undefined)"\n [attr.data-auto-id]="tab.autoId || tab.id"\n [attr.aria-controls]="(!destroyOnHide || tab.id === activeId ? tab.id + \'-panel\' : null)"\n [attr.aria-expanded]="tab.id === activeId"\n [attr.aria-disabled]="tab.disabled">\n {{tab.title | translate}}\n <ng-template [ngTemplateOutlet]="tab.titleTpl?.templateRef"></ng-template>\n </a>\n </li>\n</ul>\n<div class="tab-content" data-auto-id="data-tab-content">\n <ng-template ngFor let-tab [ngForOf]="tabs">\n <div class="tab-pane" *ngIf="!destroyOnHide || tab.id === activeId" role="tabpanel" [class.is-hidden]="!this.destroyOnHide && tab.id !== activeId"\n [attr.aria-labelledby]="tab.id" id="{{tab.id}}-panel" [attr.aria-expanded]="tab.id === activeId">\n <ng-template [ngTemplateOutlet]="tab.contentTpl?.templateRef"></ng-template>\n </div>\n </ng-template>\n</div>\n',exportAs:"datoTabset",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".headline{font-size:34px;font-weight:300;line-height:46px}.large-headline{font-size:48px;font-weight:300;line-height:60px}.sub-headline{font-size:18px;font-weight:600;line-height:24px}.mid-headline{font-size:24px;font-weight:600;line-height:33px}.simple{font-size:14px;line-height:19px}.simple-bold{font-size:14px;font-weight:600;line-height:19px}.simple-italic{font-size:14px;font-style:italic;line-height:19px}.note{font-size:12px;line-height:16px}.note-bold{font-size:12px;font-weight:600;line-height:16px}.note-italic{font-size:12px;font-style:italic;line-height:16px}.dato-headline{font-size:34px;font-weight:300;line-height:46px}.dato-large-headline{font-size:48px;font-weight:300;line-height:60px}.dato-sub-headline{font-size:18px;font-weight:600;line-height:24px}.dato-mid-headline{font-size:24px;font-weight:600;line-height:33px}.dato-simple{font-size:14px;line-height:19px}.dato-simple-bold{font-size:14px;font-weight:600;line-height:19px}.dato-simple-italic{font-size:14px;font-style:italic;line-height:19px}.dato-note{font-size:12px;line-height:16px}.dato-note-bold{font-size:12px;font-weight:600;line-height:16px}.dato-note-italic{font-size:12px;font-style:italic;line-height:16px}:host ul{position:relative;display:flex;flex-shrink:0;padding:0;margin:0;overflow-x:hidden;list-style:none}:host li{flex:1;cursor:pointer;text-align:center;padding:5px 0;border-bottom:2px solid transparent}:host li a{text-decoration:none}:host .is-hidden{display:none!important}:host .active{transition:border-bottom-color .3s}:host .active a{font-weight:600;transition:color .3s,font-weight .3s}:host[datoNativeWidth] li{flex:none;padding:5px 20px}:host .tab-pointer{height:2px;position:absolute;left:0;bottom:0;transition:transform .3s,width .3s}:host .tab-content{display:flex;flex-direction:column;flex:1 1 auto;overflow-y:auto}:host .tab-content .tab-pane{display:flex;flex-direction:column;flex:1 1 auto}:host(.dato-tabs--vertical){display:flex}:host(.dato-tabs--vertical)>ul{flex-direction:column;flex-shrink:0;box-shadow:inset -5px 5px 5px 0 rgba(0,0,0,.04)}:host(.dato-tabs--vertical)>ul li{display:flex;flex:0;min-width:44px;min-height:40px;padding:2px 2px 0 0}:host(.dato-tabs--vertical)>ul li a{display:flex;flex-grow:1;margin:0 6px;justify-content:center;align-items:center}:host(.dato-tabs--vertical)>.tab-pointer{display:none}.tab-md{font-size:12px;line-height:16px}.tab-lg{font-size:14px;line-height:19px}"]}),bt(2,e.Attribute("datoVertical")),bt(3,e.Attribute("datoNakedActive")),bt(4,e.Attribute("datoTabWidth")),Ct("design:paramtypes",[e.ChangeDetectorRef,e.ElementRef,Object,Object,Object])],t)}(),tc=[Jl,Xl,Zl,Yl],ec=function(){function t(){}return t=vt([e.NgModule({declarations:tc,exports:tc,imports:[s.CommonModule,yo]})],t)}();
436
436
  /**
437
437
  * @license
438
438
  * Copyright Datorama. All Rights Reserved.
439
439
  *
440
440
  * Use of this source code is governed by an Apache License 2.0 license that can be
441
441
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
442
- */function ec(t){return function(e){return e.pipe(r.filter((function(e){return e.status===t})))}}
442
+ */function nc(t){return function(e){return e.pipe(r.filter((function(e){return e.status===t})))}}
443
443
  /**
444
444
  * @license
445
445
  * Copyright Datorama. All Rights Reserved.
@@ -447,7 +447,7 @@ sl=t.SnackbarType||(t.SnackbarType={})).INFO="info",sl.SUCCESS="success",sl.ERRO
447
447
  * Use of this source code is governed by an Apache License 2.0 license that can be
448
448
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
449
449
  */
450
- var nc=function(){function t(t){this.host=t,this.close=new e.EventEmitter,this.closedByAction=!1}return t.prototype.onAnimationEnd=function(t){"core-toastOut"===t.animationName&&this.close.emit({id:this.options.id,closedByAction:this.closedByAction})},Object.defineProperty(t.prototype,"duration",{get:function(){return this.options.duration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this.options.icon},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"content",{get:function(){return this.options.content},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){Vt(Ft(".dato-toasts-container"),"zIndex",Mn()),Vt(this.element,"animation","core-toastIn 0.4s, core-toastOut 0.5s "+this.duration+"ms")},t.prototype.onClose=function(){this.closedByAction=!0,this.close.emit({id:this.options.id,closedByAction:this.closedByAction})},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"options",void 0),vt([e.HostListener("animationend",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"onAnimationEnd",null),t=vt([e.Component({selector:"dato-toast",template:'<div class="d-flex justify-between items-center">\n <div class="toast-icon mr-7 d-flex self-start" *ngIf="icon.name">\n <dato-icon [datoIcon]="icon.name" [attr.datoSize]="icon.size" [datoColor]="icon.color" [style.width]="icon.width" [style.height]="icon.height"></dato-icon>\n </div>\n <div class="dato-toast-content">\n <div class="dato-toast-content__title">\n <ng-content></ng-content>\n </div>\n <footer *ngIf="content">\n <dato-dynamic-content [content]="content"></dato-dynamic-content>\n </footer>\n </div>\n <dato-icon datoIcon="close" (click)="onClose()" datoColor="primary-300" class="self-start"></dato-icon>\n</div>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-toast{border-radius:2px;font-size:12px;padding:13px 12px;max-width:420px;box-shadow:0 2px 14px 0 rgba(0,0,0,.2);margin-bottom:30px}dato-toast .dato-icon-close{cursor:pointer}dato-toast .dato-toast-content{font-size:14px;font-weight:600;margin-right:40px;margin-left:5px}dato-toast .toast-icon{margin-right:10px}dato-toast footer{margin-top:8px}@-webkit-keyframes core-toastIn{from{transform:translateX(200px);opacity:0}to{ransform:translateX(-30px);opacity:1}}@keyframes core-toastIn{from{transform:translateX(200px);opacity:0}to{ransform:translateX(-30px);opacity:1}}@-webkit-keyframes core-toastOut{to{transform:translateX(100px);opacity:0}}@keyframes core-toastOut{to{transform:translateX(100px);opacity:0}}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}(),oc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne,On,cl],declarations:[nc],exports:[nc],entryComponents:[nc]})],t)}(),ic=function(){function t(){}return Object.defineProperty(t.prototype,"afterDismissed",{get:function(){return this._afterDismissed},set:function(t){this._afterDismissed=t},enumerable:!0,configurable:!0}),t}();
450
+ var oc=function(){function t(t){this.host=t,this.close=new e.EventEmitter,this.closedByAction=!1}return t.prototype.onAnimationEnd=function(t){"core-toastOut"===t.animationName&&this.close.emit({id:this.options.id,closedByAction:this.closedByAction})},Object.defineProperty(t.prototype,"duration",{get:function(){return this.options.duration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this.options.icon},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"content",{get:function(){return this.options.content},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){Vt(Ft(".dato-toasts-container"),"zIndex",Mn()),Vt(this.element,"animation","core-toastIn 0.4s, core-toastOut 0.5s "+this.duration+"ms")},t.prototype.onClose=function(){this.closedByAction=!0,this.close.emit({id:this.options.id,closedByAction:this.closedByAction})},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object)],t.prototype,"options",void 0),vt([e.HostListener("animationend",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"onAnimationEnd",null),t=vt([e.Component({selector:"dato-toast",template:'<div class="d-flex justify-between items-center">\n <div class="toast-icon mr-7 d-flex self-start" *ngIf="icon.name">\n <dato-icon [datoIcon]="icon.name" [attr.datoSize]="icon.size" [datoColor]="icon.color" [style.width]="icon.width" [style.height]="icon.height"></dato-icon>\n </div>\n <div class="dato-toast-content">\n <div class="dato-toast-content__title">\n <ng-content></ng-content>\n </div>\n <footer *ngIf="content">\n <dato-dynamic-content [content]="content"></dato-dynamic-content>\n </footer>\n </div>\n <dato-icon datoIcon="close" (click)="onClose()" datoColor="primary-300" class="self-start"></dato-icon>\n</div>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-toast{border-radius:2px;font-size:12px;padding:13px 12px;max-width:420px;box-shadow:0 2px 14px 0 rgba(0,0,0,.2);margin-bottom:30px}dato-toast .dato-icon-close{cursor:pointer}dato-toast .dato-toast-content{font-size:14px;font-weight:600;margin-right:40px;margin-left:5px}dato-toast .toast-icon{margin-right:10px}dato-toast footer{margin-top:8px}@-webkit-keyframes core-toastIn{from{transform:translateX(200px);opacity:0}to{ransform:translateX(-30px);opacity:1}}@keyframes core-toastIn{from{transform:translateX(200px);opacity:0}to{ransform:translateX(-30px);opacity:1}}@-webkit-keyframes core-toastOut{to{transform:translateX(100px);opacity:0}}@keyframes core-toastOut{to{transform:translateX(100px);opacity:0}}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}(),ic=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne,On,cl],declarations:[oc],exports:[oc],entryComponents:[oc]})],t)}(),rc=function(){function t(){}return Object.defineProperty(t.prototype,"afterDismissed",{get:function(){return this._afterDismissed},set:function(t){this._afterDismissed=t},enumerable:!0,configurable:!0}),t}();
451
451
  /**
452
452
  * @license
453
453
  * Copyright Datorama. All Rights Reserved.
@@ -462,7 +462,7 @@ var nc=function(){function t(t){this.host=t,this.close=new e.EventEmitter,this.c
462
462
  * Use of this source code is governed by an Apache License 2.0 license that can be
463
463
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
464
464
  */
465
- function rc(){return{duration:4e3,icon:{color:"primary-300"}}}var ac,sc=function(){function t(t,e,n,o,i){this.translate=t,this.appRef=e,this.resolver=n,this.injector=o,this.document=i,this.toasts=new Map}return t.prototype.open=function(t,e){var n=this;this.container||this.createContainer();var o=qr({duration:4e3,icon:{color:"primary-300"}},e||{});o.id=Math.random();var i=Mt(t);this.contentRef=ta({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:i?this.translate.transform(t):t}),!i&&e.data&&(this.contentRef.componentRef.instance.data=e.data),this.component=Zr({component:nc,projectableNodes:this.contentRef.nodes,injector:this.injector,resolver:this.resolver});var a=this.component,s=a.instance,l=a.changeDetectorRef,c=a.location.nativeElement;this.nativeElement=c,s.options=o,this.toasts.set(o.id,{contentRef:this.contentRef,component:this.component,nativeElement:this.nativeElement});var p=new ic;return p.afterDismissed=s.close,s.close.pipe(r.take(1)).subscribe((function(t){var e=t.id;n.destroy(e)})),l.detectChanges(),Yt(this.container,c),p},t.prototype.destroy=function(t){if(this.toasts.has(t)){var e=this.toasts.get(t);e.contentRef.destroy(this.appRef),e.component.destroy(),this.container.removeChild(e.nativeElement),e.nativeElement=null,this.toasts.delete(t)}},t.prototype.createContainer=function(){this.container=$t("div"),Ut(this.container,["d-flex","d-flex-column","dato-toasts-container"]),qt(this.document.body,this.container)},t.ctorParameters=function(){return[{type:_n},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(_n),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[_n,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],t)}(),lc=function(){function t(t){this.host=t,this.ANIMATION_DURATION=300,this.customClass=""}return Object.defineProperty(t.prototype,"options",{set:function(t){var e=t.rect,n=t.offset,o=void 0===n?{}:n,i=this.container;if(Vt(i,"height",rt.coerceCssPixelValue(e.height)),e.boxWidth){var r=rt.coerceCssPixelValue(e.boxWidth);Ht(i,{width:r,minWidth:r})}Ht(this.hostEl,{left:e.left+e.width+(o.left?o.left:0)+"px",top:e.top+(o.top?o.top:0)+"px"})},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;Vt(this.hostEl,"zIndex",Mn()),this.customClass&&Ut(this.hostEl,this.customClass),setTimeout((function(){return Ut(t.hostEl,"overflow-visible")}),this.ANIMATION_DURATION)},Object.defineProperty(t.prototype,"hostEl",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.host.nativeElement.querySelector(".dato-panel-container")},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),t=vt([e.Component({selector:"dato-panel",template:'<section class="dato-panel-container">\n <ng-content></ng-content>\n</section>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-panel{position:absolute;overflow:hidden}dato-panel.close-panel{overflow:hidden}dato-panel.close-panel .dato-panel-container{-webkit-animation:.3s core-panelSlideOut;animation:.3s core-panelSlideOut}.dato-panel-container ng-component{display:flex;flex-direction:column;height:100%}.dato-panel-header{display:flex;justify-content:space-between;font-size:18px;font-weight:600}.dato-panel-header .dato-icon-close{cursor:pointer;transform:translateX(15px)}.dato-panel-content,.dato-panel-header{padding:12px 24px 10px 30px}.dato-panel-container{-webkit-animation:.3s ease-out core-panelSlideIn;animation:.3s ease-out core-panelSlideIn;min-width:400px;transform-origin:left;height:100%;box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}.dato-panel-backdrop{position:absolute;top:0;right:0;bottom:0;left:0}dato-panel-content{flex:1;font-size:14px}.dato-panel-footer{padding:17px 30px 16px;height:70px}.dato-panel-footer dato-button{margin-left:10px}@-webkit-keyframes core-panelSlideIn{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes core-panelSlideIn{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@-webkit-keyframes core-panelSlideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(-100%);opacity:.7}}@keyframes core-panelSlideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(-100%);opacity:.7}}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}();
465
+ function ac(){return{duration:4e3,icon:{color:"primary-300"}}}var sc,lc=function(){function t(t,e,n,o,i){this.translate=t,this.appRef=e,this.resolver=n,this.injector=o,this.document=i,this.toasts=new Map}return t.prototype.open=function(t,e){var n=this;this.container||this.createContainer();var o=qr({duration:4e3,icon:{color:"primary-300"}},e||{});o.id=Math.random();var i=Mt(t);this.contentRef=ta({applicationRef:this.appRef,injector:this.injector,resolver:this.resolver,content:i?this.translate.transform(t):t}),!i&&e.data&&(this.contentRef.componentRef.instance.data=e.data),this.component=Zr({component:oc,projectableNodes:this.contentRef.nodes,injector:this.injector,resolver:this.resolver});var a=this.component,s=a.instance,l=a.changeDetectorRef,c=a.location.nativeElement;this.nativeElement=c,s.options=o,this.toasts.set(o.id,{contentRef:this.contentRef,component:this.component,nativeElement:this.nativeElement});var p=new rc;return p.afterDismissed=s.close,s.close.pipe(r.take(1)).subscribe((function(t){var e=t.id;n.destroy(e)})),l.detectChanges(),Yt(this.container,c),p},t.prototype.destroy=function(t){if(this.toasts.has(t)){var e=this.toasts.get(t);e.contentRef.destroy(this.appRef),e.component.destroy(),this.container.removeChild(e.nativeElement),e.nativeElement=null,this.toasts.delete(t)}},t.prototype.createContainer=function(){this.container=$t("div"),Ut(this.container,["d-flex","d-flex-column","dato-toasts-container"]),qt(this.document.body,this.container)},t.ctorParameters=function(){return[{type:_n},{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(_n),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(s.DOCUMENT))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[_n,e.ApplicationRef,e.ComponentFactoryResolver,e.Injector,Object])],t)}(),cc=function(){function t(t){this.host=t,this.ANIMATION_DURATION=300,this.customClass=""}return Object.defineProperty(t.prototype,"options",{set:function(t){var e=t.rect,n=t.offset,o=void 0===n?{}:n,i=this.container;if(Vt(i,"height",rt.coerceCssPixelValue(e.height)),e.boxWidth){var r=rt.coerceCssPixelValue(e.boxWidth);Ht(i,{width:r,minWidth:r})}Ht(this.hostEl,{left:e.left+e.width+(o.left?o.left:0)+"px",top:e.top+(o.top?o.top:0)+"px"})},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;Vt(this.hostEl,"zIndex",Mn()),this.customClass&&Ut(this.hostEl,this.customClass),setTimeout((function(){return Ut(t.hostEl,"overflow-visible")}),this.ANIMATION_DURATION)},Object.defineProperty(t.prototype,"hostEl",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.host.nativeElement.querySelector(".dato-panel-container")},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),t=vt([e.Component({selector:"dato-panel",template:'<section class="dato-panel-container">\n <ng-content></ng-content>\n</section>',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-panel{position:absolute;overflow:hidden}dato-panel.close-panel{overflow:hidden}dato-panel.close-panel .dato-panel-container{-webkit-animation:.3s core-panelSlideOut;animation:.3s core-panelSlideOut}.dato-panel-container ng-component{display:flex;flex-direction:column;height:100%}.dato-panel-header{display:flex;justify-content:space-between;font-size:18px;font-weight:600}.dato-panel-header .dato-icon-close{cursor:pointer;transform:translateX(15px)}.dato-panel-content,.dato-panel-header{padding:12px 24px 10px 30px}.dato-panel-container{-webkit-animation:.3s ease-out core-panelSlideIn;animation:.3s ease-out core-panelSlideIn;min-width:400px;transform-origin:left;height:100%;box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}.dato-panel-backdrop{position:absolute;top:0;right:0;bottom:0;left:0}dato-panel-content{flex:1;font-size:14px}.dato-panel-footer{padding:17px 30px 16px;height:70px}.dato-panel-footer dato-button{margin-left:10px}@-webkit-keyframes core-panelSlideIn{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes core-panelSlideIn{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@-webkit-keyframes core-panelSlideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(-100%);opacity:.7}}@keyframes core-panelSlideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(-100%);opacity:.7}}"]}),Ct("design:paramtypes",[e.ElementRef])],t)}();
466
466
  /**
467
467
  * @license
468
468
  * Copyright Datorama. All Rights Reserved.
@@ -476,7 +476,7 @@ function rc(){return{duration:4e3,icon:{color:"primary-300"}}}var ac,sc=function
476
476
  *
477
477
  * Use of this source code is governed by an Apache License 2.0 license that can be
478
478
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
479
- */(ac=t.PanelResultCloseTrigger||(t.PanelResultCloseTrigger={})).CLOSE="CLOSE",ac.SWITCH_CONTENT="SWITCH_CONTENT";var cc=function(t){this.panelRef=t};var pc=function(){function e(t){this.panelOptions=t,this._onClose=new n.Subject,this._onDestroy=new n.Subject,this._beforeClose=[],this.beforeCloseFinished=!0,this.panelOptions=mt(mt({},{enableClose:!0,ignoreCloseSelectors:[]}),t)}return Object.defineProperty(e.prototype,"$destroyed",{get:function(){return this._onDestroy.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.panelOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.panelOptions.data},enumerable:!0,configurable:!0}),e.prototype.close=function(e){this._tryClose({trigger:t.PanelResultCloseTrigger.CLOSE,data:e}).subscribe()},e.prototype.beforeClosed=function(t){return this._beforeClose.push(t),this},e.prototype.afterClosed=function(){return this._onClose.asObservable().pipe(r.take(1))},e.prototype._destroy=function(){this._onDestroy.closed||this._onDestroy.complete(),this._beforeClose=[],this._onClose.next(this._result),this._onClose.complete()},e.prototype._tryClose=function(t){var e=this;return this.canClose(t).pipe(r.switchMap((function(o){return o?(e._result=t,e._onDestroy.next(),e._onDestroy.complete(),e.afterClosed()):n.throwError("Unable to close dato-panel")})))},e.prototype.canClose=function(t){var e=this;if(!this._beforeClose.length)return n.of(!0);if(!this.beforeCloseFinished)return n.of(!1);this.beforeCloseFinished=!1;var o=this._beforeClose.map((function(e){var o=e(t);return n.isObservable(o)?o:n.of(o)}));return n.forkJoin(o).pipe(r.map((function(t){return t.every(Boolean)})),r.tap((function(){return e.beforeCloseFinished=!0})))},e}(),dc=function(){function o(t,e,o,i,a,s){this.resolver=t,this.translate=e,this.injector=o,this.appRef=i,this.config=a,this.document=s,this.backdropClassName="dato-panel-backdrop",this.backDropHolder="body",this.panelsStack=[],this._isOpen=new n.BehaviorSubject(!1),this.isOpen$=this._isOpen.asObservable().pipe(r.distinctUntilChanged())}return Object.defineProperty(o.prototype,"panelContainer",{get:function(){return this.document.querySelector(".dato-panel-container")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isOpen",{get:function(){return!!this.panelsStack.length},enumerable:!0,configurable:!0}),o.prototype.open=function(e,n){var o=this;void 0===n&&(n={});var i=this.createPanelConfig(n),r=i.config,a=i.panelRef,s=this.createInjector(n.viewContainerRef,a);return this.panelContainer&&this.isOpen?this.tryClose({trigger:t.PanelResultCloseTrigger.SWITCH_CONTENT}).subscribe((function(){o.createPanel(r,e,n,s)}),(function(){r.panelRef._destroy(),o.panelsStack=o.panelsStack.filter((function(t){return t!==r})),o._isOpen.next(o.isOpen)})):this.createPanel(r,e,n,s),this.panelsStack.push(r),this._isOpen.next(this.isOpen),r.panelRef},o.prototype.createPanelConfig=function(t){var e=new pc(t);return{panelRef:e,config:new cc(e)}},o.prototype.createPanel=function(t,e,n,o){var i=n.backdrop;i&&i.enabled&&this.createBackdrop(i.selector),t.contentRef=ta({applicationRef:this.appRef,injector:o,resolver:this.resolver,content:Mt(e)?this.translate.transform(e):e}),t.component=Zr({component:lc,projectableNodes:t.contentRef.nodes,injector:o,resolver:this.resolver});var r=t.component.location.nativeElement;t.nativeElement=r,t.component.instance.customClass=n.customClass;var a=this.resolveRelativeTo(n.relativeTo||this.config.sidenavSelector);this.calcPosition(t,a),t.component.hostView.detectChanges(),this.document.body.appendChild(r),this.registerToEvents(t,a)},o.prototype.close=function(e){this.tryClose({trigger:t.PanelResultCloseTrigger.CLOSE,data:e}).subscribe()},o.prototype.createInjector=function(t,n){var o=t?t.injector:this.injector;return e.Injector.create({parent:o,providers:[{provide:pc,useValue:n}]})},o.prototype.tryClose=function(t){var e=this;if(this.panelsStack.length){var o=pe(this.panelsStack);return o.panelRef._tryClose(t).pipe(r.tap((function(){e.panelsStack=e.panelsStack.filter((function(t){return t!==o})),e._isOpen.next(e.isOpen)})))}return n.of()},o.prototype.registerToEvents=function(t,e){var o=this;n.fromEvent(window,"scroll",{capture:!0}).pipe(r.throttleTime(10),r.takeUntil(t.panelRef.$destroyed)).subscribe((function(){o.calcPosition(t,e)})),t.panelRef.options.enableClose&&this.registerCloseEvents(t),t.panelRef.$destroyed.pipe(r.take(1)).subscribe((function(){o.slidePanelOut()})),n.fromEvent(this.panelContainer,"animationend").pipe(r.filter((function(t){return"core-panelSlideOut"===t.animationName})),r.takeUntil(t.panelRef.afterClosed())).subscribe((function(){return o.destroy(t)}))},o.prototype.registerCloseEvents=function(e){var o=this;n.fromEvent(document,"keyup").pipe(Di(t.KeyboardEventKeys.Escape),r.takeUntil(e.panelRef.$destroyed)).subscribe((function(){return o.close()})),n.fromEvent(document.body,"click",{capture:!0}).pipe(r.takeUntil(e.panelRef.$destroyed)).subscribe((function(t){var n=t.target,i=o.document.querySelector(o.config.appSelector).contains(n),r=o.document.querySelector(o.config.sidenavSelector),a=r&&r.contains(n),s=n.classList.contains(o.backdropClassName);(!e.panelRef.options.ignoreCloseSelectors.some((function(e){return Array.from(o.document.querySelectorAll(e)).some((function(e){return e.contains(t.target)}))}))&&i&&!a||s)&&o.close()}))},o.prototype.slidePanelOut=function(){var t=this.panelContainer;t&&Ut(t.parentElement,"close-panel")},o.prototype.createBackdrop=function(t){t&&(this.backDropHolder=t),this.backdropElement=this.document.createElement("div"),Ut(this.backdropElement,this.backdropClassName),Vt(this.backdropElement,"zIndex",9998),this.document.querySelector(this.backDropHolder).appendChild(this.backdropElement)},o.prototype.calcPosition=function(t,e){var n=te(e),o=n.left,i=n.top,r=n.height,a=n.width,s=t.panelRef.options;t.component.instance.options={offset:s.offset,rect:{left:o,top:i,width:a,height:s.height||r,boxWidth:s.width}}},o.prototype.resolveRelativeTo=function(t){return Mt(t)?this.document.querySelector(t):t},o.prototype.destroy=function(t){if(this.panelContainer){if(t.contentRef.destroy(this.appRef),t.component.destroy(),this.document.body.removeChild(t.nativeElement),this.backdropElement){var e=this.document.querySelector(this.backDropHolder);e&&e.contains(this.backdropElement)&&e.removeChild(this.backdropElement),this.backdropElement=null}t.nativeElement=null,t.panelRef._destroy()}},o.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:_n},{type:e.Injector},{type:e.ApplicationRef},{type:void 0,decorators:[{type:e.Inject,args:[Bn]}]},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(_n),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(Bn),e.ɵɵinject(s.DOCUMENT))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(Bn)),bt(5,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[e.ComponentFactoryResolver,_n,e.Injector,e.ApplicationRef,Object,Object])],o)}(),uc=function(){function t(t){this.panelService=t}return t.prototype.close=function(){this.panelService.close()},t.ctorParameters=function(){return[{type:dc}]},t=vt([e.Component({selector:"dato-panel-header",template:'\n <header class="d-flex dato-panel-header">\n <div><ng-content></ng-content></div>\n\n <dato-icon datoIcon="close" (click)="close()"></dato-icon>\n </header>\n '}),Ct("design:paramtypes",[dc])],t)}(),hc=function(){function t(){}return t=vt([e.Component({selector:"dato-panel-content",template:'\n <div class="dato-panel-content"><ng-content></ng-content></div>\n '})],t)}(),gc=function(){function t(){}return t=vt([e.Component({selector:"dato-panel-footer",template:'\n <footer class="dato-panel-footer d-flex align-end-center"><ng-content></ng-content></footer>\n '})],t)}(),fc=[lc,uc,hc,gc],mc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne],declarations:[fc],exports:[fc],entryComponents:[fc]})],t)}();
479
+ */(sc=t.PanelResultCloseTrigger||(t.PanelResultCloseTrigger={})).CLOSE="CLOSE",sc.SWITCH_CONTENT="SWITCH_CONTENT";var pc=function(t){this.panelRef=t};var dc=function(){function e(t){this.panelOptions=t,this._onClose=new n.Subject,this._onDestroy=new n.Subject,this._beforeClose=[],this.beforeCloseFinished=!0,this.panelOptions=mt(mt({},{enableClose:!0,ignoreCloseSelectors:[]}),t)}return Object.defineProperty(e.prototype,"$destroyed",{get:function(){return this._onDestroy.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.panelOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.panelOptions.data},enumerable:!0,configurable:!0}),e.prototype.close=function(e){this._tryClose({trigger:t.PanelResultCloseTrigger.CLOSE,data:e}).subscribe()},e.prototype.beforeClosed=function(t){return this._beforeClose.push(t),this},e.prototype.afterClosed=function(){return this._onClose.asObservable().pipe(r.take(1))},e.prototype._destroy=function(){this._onDestroy.closed||this._onDestroy.complete(),this._beforeClose=[],this._onClose.next(this._result),this._onClose.complete()},e.prototype._tryClose=function(t){var e=this;return this.canClose(t).pipe(r.switchMap((function(o){return o?(e._result=t,e._onDestroy.next(),e._onDestroy.complete(),e.afterClosed()):n.throwError("Unable to close dato-panel")})))},e.prototype.canClose=function(t){var e=this;if(!this._beforeClose.length)return n.of(!0);if(!this.beforeCloseFinished)return n.of(!1);this.beforeCloseFinished=!1;var o=this._beforeClose.map((function(e){var o=e(t);return n.isObservable(o)?o:n.of(o)}));return n.forkJoin(o).pipe(r.map((function(t){return t.every(Boolean)})),r.tap((function(){return e.beforeCloseFinished=!0})))},e}(),uc=function(){function o(t,e,o,i,a,s){this.resolver=t,this.translate=e,this.injector=o,this.appRef=i,this.config=a,this.document=s,this.backdropClassName="dato-panel-backdrop",this.backDropHolder="body",this.panelsStack=[],this._isOpen=new n.BehaviorSubject(!1),this.isOpen$=this._isOpen.asObservable().pipe(r.distinctUntilChanged())}return Object.defineProperty(o.prototype,"panelContainer",{get:function(){return this.document.querySelector(".dato-panel-container")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isOpen",{get:function(){return!!this.panelsStack.length},enumerable:!0,configurable:!0}),o.prototype.open=function(e,n){var o=this;void 0===n&&(n={});var i=this.createPanelConfig(n),r=i.config,a=i.panelRef,s=this.createInjector(n.viewContainerRef,a);return this.panelContainer&&this.isOpen?this.tryClose({trigger:t.PanelResultCloseTrigger.SWITCH_CONTENT}).subscribe((function(){o.createPanel(r,e,n,s)}),(function(){r.panelRef._destroy(),o.panelsStack=o.panelsStack.filter((function(t){return t!==r})),o._isOpen.next(o.isOpen)})):this.createPanel(r,e,n,s),this.panelsStack.push(r),this._isOpen.next(this.isOpen),r.panelRef},o.prototype.createPanelConfig=function(t){var e=new dc(t);return{panelRef:e,config:new pc(e)}},o.prototype.createPanel=function(t,e,n,o){var i=n.backdrop;i&&i.enabled&&this.createBackdrop(i.selector),t.contentRef=ta({applicationRef:this.appRef,injector:o,resolver:this.resolver,content:Mt(e)?this.translate.transform(e):e}),t.component=Zr({component:cc,projectableNodes:t.contentRef.nodes,injector:o,resolver:this.resolver});var r=t.component.location.nativeElement;t.nativeElement=r,t.component.instance.customClass=n.customClass;var a=this.resolveRelativeTo(n.relativeTo||this.config.sidenavSelector);this.calcPosition(t,a),t.component.hostView.detectChanges(),this.document.body.appendChild(r),this.registerToEvents(t,a)},o.prototype.close=function(e){this.tryClose({trigger:t.PanelResultCloseTrigger.CLOSE,data:e}).subscribe()},o.prototype.createInjector=function(t,n){var o=t?t.injector:this.injector;return e.Injector.create({parent:o,providers:[{provide:dc,useValue:n}]})},o.prototype.tryClose=function(t){var e=this;if(this.panelsStack.length){var o=pe(this.panelsStack);return o.panelRef._tryClose(t).pipe(r.tap((function(){e.panelsStack=e.panelsStack.filter((function(t){return t!==o})),e._isOpen.next(e.isOpen)})))}return n.of()},o.prototype.registerToEvents=function(t,e){var o=this;n.fromEvent(window,"scroll",{capture:!0}).pipe(r.throttleTime(10),r.takeUntil(t.panelRef.$destroyed)).subscribe((function(){o.calcPosition(t,e)})),t.panelRef.options.enableClose&&this.registerCloseEvents(t),t.panelRef.$destroyed.pipe(r.take(1)).subscribe((function(){o.slidePanelOut()})),n.fromEvent(this.panelContainer,"animationend").pipe(r.filter((function(t){return"core-panelSlideOut"===t.animationName})),r.takeUntil(t.panelRef.afterClosed())).subscribe((function(){return o.destroy(t)}))},o.prototype.registerCloseEvents=function(e){var o=this;n.fromEvent(document,"keyup").pipe(Di(t.KeyboardEventKeys.Escape),r.takeUntil(e.panelRef.$destroyed)).subscribe((function(){return o.close()})),n.fromEvent(document.body,"click",{capture:!0}).pipe(r.takeUntil(e.panelRef.$destroyed)).subscribe((function(t){var n=t.target,i=o.document.querySelector(o.config.appSelector).contains(n),r=o.document.querySelector(o.config.sidenavSelector),a=r&&r.contains(n),s=n.classList.contains(o.backdropClassName);(!e.panelRef.options.ignoreCloseSelectors.some((function(e){return Array.from(o.document.querySelectorAll(e)).some((function(e){return e.contains(t.target)}))}))&&i&&!a||s)&&o.close()}))},o.prototype.slidePanelOut=function(){var t=this.panelContainer;t&&Ut(t.parentElement,"close-panel")},o.prototype.createBackdrop=function(t){t&&(this.backDropHolder=t),this.backdropElement=this.document.createElement("div"),Ut(this.backdropElement,this.backdropClassName),Vt(this.backdropElement,"zIndex",9998),this.document.querySelector(this.backDropHolder).appendChild(this.backdropElement)},o.prototype.calcPosition=function(t,e){var n=te(e),o=n.left,i=n.top,r=n.height,a=n.width,s=t.panelRef.options;t.component.instance.options={offset:s.offset,rect:{left:o,top:i,width:a,height:s.height||r,boxWidth:s.width}}},o.prototype.resolveRelativeTo=function(t){return Mt(t)?this.document.querySelector(t):t},o.prototype.destroy=function(t){if(this.panelContainer){if(t.contentRef.destroy(this.appRef),t.component.destroy(),this.document.body.removeChild(t.nativeElement),this.backdropElement){var e=this.document.querySelector(this.backDropHolder);e&&e.contains(this.backdropElement)&&e.removeChild(this.backdropElement),this.backdropElement=null}t.nativeElement=null,t.panelRef._destroy()}},o.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:_n},{type:e.Injector},{type:e.ApplicationRef},{type:void 0,decorators:[{type:e.Inject,args:[Bn]}]},{type:void 0,decorators:[{type:e.Inject,args:[s.DOCUMENT]}]}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(e.ComponentFactoryResolver),e.ɵɵinject(_n),e.ɵɵinject(e.INJECTOR),e.ɵɵinject(e.ApplicationRef),e.ɵɵinject(Bn),e.ɵɵinject(s.DOCUMENT))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(4,e.Inject(Bn)),bt(5,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[e.ComponentFactoryResolver,_n,e.Injector,e.ApplicationRef,Object,Object])],o)}(),hc=function(){function t(t){this.panelService=t}return t.prototype.close=function(){this.panelService.close()},t.ctorParameters=function(){return[{type:uc}]},t=vt([e.Component({selector:"dato-panel-header",template:'\n <header class="d-flex dato-panel-header">\n <div><ng-content></ng-content></div>\n\n <dato-icon datoIcon="close" (click)="close()"></dato-icon>\n </header>\n '}),Ct("design:paramtypes",[uc])],t)}(),gc=function(){function t(){}return t=vt([e.Component({selector:"dato-panel-content",template:'\n <div class="dato-panel-content"><ng-content></ng-content></div>\n '})],t)}(),fc=function(){function t(){}return t=vt([e.Component({selector:"dato-panel-footer",template:'\n <footer class="dato-panel-footer d-flex align-end-center"><ng-content></ng-content></footer>\n '})],t)}(),mc=[cc,hc,gc,fc],yc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne],declarations:[mc],exports:[mc],entryComponents:[mc]})],t)}();
480
480
  /**
481
481
  * @license
482
482
  * Copyright Datorama. All Rights Reserved.
@@ -484,14 +484,14 @@ function rc(){return{duration:4e3,icon:{color:"primary-300"}}}var ac,sc=function
484
484
  * Use of this source code is governed by an Apache License 2.0 license that can be
485
485
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
486
486
  */
487
- function yc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function vc(t,e,n){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var o=t.getTokenAt(e,n);this.$tokenIndex=o?o.index:-1,this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]}}function bc(t,e,n,o,i){var r=Cc(n,o),a=function(t,e){var n=new vc(t,e.row,e.column),o=n.getCurrentToken();for(;o&&!yc(o,"attribute-name");)o=n.stepBackward();if(o)return o.value}(n,o);if(!r)return[];var s=[];return r in t&&a in t[r]&&"object"==typeof t[r][a]&&(s=Object.keys(t[r][a])),s.map((function(t){return{caption:t,snippet:t,meta:"datorama-value",score:1e7}}))}function Cc(t,e){for(var n=new vc(t,e.row,e.column),o=n.getCurrentToken();o&&!yc(o,"tag-name");)o=n.stepBackward();if(o)return o.value}function wc(t){return{getCompletions:function(e,n,o,i,r){var a=n.getTokenAt(o.row,o.column);return a?((yc(a,"tag-name")||yc(a,"tag-open")||yc(a,"end-tag-open"))&&r(null,function(t,e,n,o,i){return Object.keys(t).map((function(t){return{value:t,caption:t,meta:"datorama-tag",score:1e7}}))}(t)),(yc(a,"tag-whitespace")||yc(a,"attribute-name"))&&r(null,function(t,e,n,o,i){var r=Cc(n,o);if(!r)return[];var a=[];return r in t&&(a=a.concat(Object.keys(t[r]))),a.map((function(t){return{caption:t,snippet:t+'="$0"',meta:"datorama-attribute",score:1e7}}))}(t,0,n,o)),yc(a,"attribute-value")&&r(null,bc(t,0,n,o)),[]):[]}}}function Sc(t,e,n){n.commands.addCommand({name:"DADotCommand",bindKey:{win:".",mac:"."},exec:function(){var o=n.selection.getCursor(),i=n.session.getDocument().getLine(o.row).trim().slice(0,o.column).split(/\s+/);if(i[0]){n.insert(".");var r=i[i.length-1].match(/DA(?:\.\w+)*/);if(r){var a={getCompletions:function(n,o,i,a,s){s(null,(t[r[0]]||[]).map((function(t){return{caption:t,value:t,meta:"datorama",completer:{insertMatch:function(t,n){t.completer.insertMatch({value:n.caption}),t.completers=e}}}})))}};n.completers=[a]}}}}),n.commands.on("afterExec",(function(t){"DADotCommand"===t.command.name&&n.execCommand("startAutocomplete")}))}var xc,Oc=function(){function t(){this.fetchingAce=!1,this.fetchingBeautify=!1}return t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"})],t)}(),Dc=function(){function t(t,e,n,o){var i=this;this.host=t,this.http=e,this.aceService=n,this.config=o,this.disabled=!1,this.defaultOptions={enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,indentedSoftWrap:!1,fontSize:14,useWorker:!0,showPrintMargin:!1,tabSize:2,fontFamily:"Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace'"},this._options=mt({},this.defaultOptions),this.BASE_PATH=this.config.paths.editor,this.waitForAce().subscribe((function(){i.ace.config.set("themePath",i.config.paths.editor+"/themes"),i.editor.setOption("enableEmmet",!0)}))}var a;return a=t,Object.defineProperty(t.prototype,"theme",{set:function(t){this.setTheme(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lang",{set:function(t){this.setLang(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{set:function(t){this._options=mt(mt({},this.defaultOptions),t),this.setOptions()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HTMLCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){e.langTools.setCompleters(xt([wc(t)],e.getBaseCompletors(e.langTools)))}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"JSObjectCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){Sc(t,e.getBaseCompletors(e.langTools),e.getEditor())}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"langTools",{get:function(){return this.ace.require("ace/ext/language_tools")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ace",{get:function(){return window.ace},enumerable:!0,configurable:!0}),t.prototype.waitForAce=function(){var t=this;return window.ace?(this.initializeEditor(),n.timer(0)):this.aceService.fetchingAce?n.timer(50).pipe(r.repeat(),r.filter((function(){return!!window.ace})),r.tap((function(){t.initializeEditor()})),r.take(1)):this.loadAce()},t.prototype.waitForBeauitify=function(){return window.js_beautify?n.timer(0):this.aceService.fetchingBeautify?n.timer(50).pipe(r.repeat(),r.filter((function(){return!!window.js_beautify})),r.take(1)):this.loadBeautifier()},t.prototype.getEditor=function(){return this.editor},t.prototype.prettier=function(){var t=this;this.waitForBeauitify().subscribe((function(){return t.runBeautify()}))},t.prototype.setTheme=function(t){var e=this;this.waitForAce().subscribe((function(){e.ace.config.set("themePath",e.config.paths.editor+"/themes"),e.editor.setTheme("ace/theme/"+t)}))},t.prototype.ngAfterViewInit=function(){var t=this;this.waitForAce().subscribe((function(){t.setOptions(),t.editor.setAutoScrollEditorIntoView(!0),n.fromEvent(t.editor,"change").pipe(i.untilDestroyed(t)).subscribe((function(){return t.onChange(t.editor.getValue())})),n.fromEvent(t.editor.container,"drop").pipe(i.untilDestroyed(t)).subscribe((function(){return t.editor.clearSelection()}))}))},t.prototype.runBeautify=function(){var t="javascript"===this._lang?"js":this._lang,e=(0,window[t+"_beautify"])(this.editor.getValue(),{indent_size:2,preserve_newlines:!1});this.setValue(e)},t.prototype.getBaseCompletors=function(t){return[t.textCompleter,t.snippetCompleter,t.keyWordCompleter]},t.prototype.createRequests=function(t){var e=this;return t.map((function(t){return e.http.get(e.BASE_PATH+"/"+t,{responseType:"text"})}))},t.prototype.loadAceWorkers=function(){return n.forkJoin.apply(void 0,xt(this.createRequests(["worker-css.js","worker-html.js","worker-javascript.js"])))},t.prototype.loadAceScripts=function(){return n.forkJoin.apply(void 0,xt(this.createRequests(["ace.js","ace-langtools.js","emmet-lib.js","emmet.js","mode-css.js","mode-html.js","mode-javascript.js"])))},t.prototype.loadBeautifier=function(){return this.aceService.fetchingBeautify=!0,n.forkJoin.apply(void 0,xt(this.createRequests(["beautify/base.js","beautify/css.js","beautify/html.js"]))).pipe(r.tap((function(t){Xt(t.join(" "),"beautifires")})))},t.prototype.initializeEditor=function(){this.editor||(this.editor=this.ace.edit(this.host.nativeElement))},t.prototype.loadAce=function(){var t=this;return this.aceService.fetchingAce=!0,this.loadAceScripts().pipe(r.tap((function(e){Xt(e.join(" "),"ace-base"),t.ace.config.set("basePath",t.config.paths.editor)})),r.concatMap((function(){return t.loadAceWorkers()})),r.tap((function(e){Xt(e.join(" "),"ace-workers"),t.initializeEditor()})))},t.prototype.setValue=function(t){var e=this;this.waitForAce().subscribe((function(){e.editor.setValue(t),e.editor.clearSelection()}))},t.prototype.setOptions=function(){var t=this;this.waitForAce().subscribe((function(){return t.editor.setOptions(t._options)}))},t.prototype.setLang=function(t){var e=this;this.waitForAce().subscribe((function(){e._lang=t,e.editor.getSession().setMode("ace/mode/"+t)}))},t.prototype.ngOnDestroy=function(){this.editor&&this.editor.destroy(),this.editor=null},t.prototype.writeValue=function(t){this.setValue(t||"")},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){},t.prototype.setDisabledState=function(t){this.disabled=t},t.ctorParameters=function(){return[{type:e.ElementRef},{type:ht.HttpClient},{type:Oc},{type:void 0,decorators:[{type:e.Inject,args:[Bn]}]}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"theme",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"lang",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"HTMLCompletions",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"JSObjectCompletions",null),t=a=vt([e.Directive({selector:"[datoAce]",exportAs:"datoAce",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),bt(3,e.Inject(Bn)),Ct("design:paramtypes",[e.ElementRef,ht.HttpClient,Oc,Object])],t)}(),Ic=function(){function t(t){this.host=t,this.host.nativeElement.setAttribute("draggable","true")}return Object.defineProperty(t.prototype,"aceDraggableText",{set:function(t){this.text=t},enumerable:!0,configurable:!0}),t.prototype.drag=function(t){t.dataTransfer.setData("text",this.text)},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"aceDraggableText",null),vt([e.HostListener("dragstart",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Event]),Ct("design:returntype",void 0)],t.prototype,"drag",null),t=vt([e.Directive({selector:"[aceDraggableText]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),Tc=[Ic,Dc],Ec=function(){function t(){}return t=vt([e.NgModule({declarations:[Tc],exports:[Tc]})],t)}(),Ac=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,Rc=function(){function t(t,e,n,o){this.container=t,this.searchable=e,this.sanitizer=n,this.host=o}return Object.defineProperty(t.prototype,"datoSearchableHighlight",{set:function(t){this._token=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.token)throw new To("Missing search token, please provide one via input or [datoSearchable] directive");this.container.register(this,!0)},t.prototype.ngOnDestroy=function(){this.container.unregister(this,!0)},Object.defineProperty(t.prototype,"token",{get:function(){return this._token||this.searchable&&this.searchable.token},enumerable:!0,configurable:!0}),t.prototype.highlight=function(t,n){this.host.nativeElement.innerHTML=this.sanitizer.sanitize(e.SecurityContext.HTML,this.resolve(t,n))},t.prototype.resolve=function(t,e){if(!t.toLowerCase().includes(e.toLowerCase()))return t;var n=e.replace(Ac,"\\$&");if(n=n.split(" ").filter((function(t){return t.length>0})).join("|")){var o=new RegExp(n,"gi"),i=String.fromCharCode(127);return t.replace(/\s/g,i).replace(o,(function(t){return'<span class="dato-highlight">'+t+"</span>"})).replace(new RegExp(""+i,"g"),"&nbsp;")}return t},t.ctorParameters=function(){return[{type:oi,decorators:[{type:e.Optional}]},{type:ii,decorators:[{type:e.Optional}]},{type:ut.DomSanitizer},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSearchableHighlight",null),t=vt([e.Directive({selector:"[datoSearchableHighlight]"}),bt(0,e.Optional()),bt(1,e.Optional()),Ct("design:paramtypes",[oi,ii,ut.DomSanitizer,e.ElementRef])],t)}(),Pc=[ii,Rc,oi],kc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Pc],exports:[Pc]})],t)}(),_c=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoAutocompleteContent]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),jc=function(){function t(){this.labelKey="label"}return t.prototype.optionsClick=function(){return this.options.changes.pipe(r.startWith(this.options.toArray()),r.switchMap((function(t){return n.merge.apply(void 0,xt(t.map((function(t){return t.click$.pipe(r.mapTo(t))}))))})))},t.prototype.ngAfterViewInit=function(){this.keyManager=new pt.ActiveDescendantKeyManager(this.options).withWrap()},t.prototype.onKeydown=function(t,e){this.keyManager.onKeydown(t);var n=document.querySelector(".dato-select__dropdown");this._scrollToOption(e,n)},t.prototype._scrollToOption=function(t,e){Ci({size:t,panel:e,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})},t.prototype.getActiveItem=function(){return this.keyManager.activeItem},t.prototype.resetIndex=function(){this.keyManager.setActiveItem(-1)},vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelKey",void 0),vt([e.ViewChild(e.TemplateRef,{static:!0}),Ct("design:type",e.TemplateRef)],t.prototype,"root",void 0),vt([e.ContentChild(_c),Ct("design:type",_c)],t.prototype,"content",void 0),vt([e.ContentChildren(yi,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"options",void 0),vt([e.ContentChildren(mi,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"groups",void 0),t=vt([e.Component({selector:"dato-autocomplete",template:'<ng-template>\n <div class="dato-select__dropdown-container">\n <div class="dato-select__dropdown">\n <ng-container [ngTemplateOutlet]="content.tpl"></ng-container>\n </div>\n\n \x3c!-- FOOTER --\x3e\n\n <footer class="dato-select__footer d-flex">\n\n <ng-content select="[datoAutoCompleteFooter]"></ng-content>\n\n </footer>\n </div>\n</ng-template>\n',exportAs:"datoAutocomplete",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Mc=function(){function t(t,n,o,i,r){if(this.host=t,this.ngControl=n,this.zone=o,this.popper=i,this.vcr=r,this.placement="bottom",this.datoSize="md",this.close=new e.EventEmitter,!n)throw new Error("DatoAutocompleteDirective require a formControl on the input")}return t.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.element,"focusin").pipe(i.untilDestroyed(this)).subscribe((function(){t.openDropdown()}))},t.prototype.openDropdown=function(){var t=this;this.popperInstance||(this.createDropdown(),this.popper.create(this.element,this.container,{placement:this.placement}).subscribe((function(e){t.popperInstance=e,t.closeDropdownHandler(),t.optionsClickHandler(),t.keyupHandler()})))},t.prototype.closeDropdown=function(){this.container&&(document.body.removeChild(this.container),this.popperInstance.destroy(),this.container=null,this.popperInstance=null,this.close.next(),this.vcr.clear())},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.ngControl.control},enumerable:!0,configurable:!0}),t.prototype.optionsClickHandler=function(){var t=this;this.datoAutoComplete.optionsClick().pipe(r.takeUntil(this.close),i.untilDestroyed(this)).subscribe((function(e){var n=e.option;t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown()}))},t.prototype.closeDropdownHandler=function(){var t=this;n.fromEvent(document,"click",{capture:!0}).pipe(r.takeUntil(this.close),r.filter((function(e){var n=t.element.contains(e.target),o=t.container.contains(e.target);return!n&&!o})),r.take(1),i.untilDestroyed(this)).subscribe((function(){return t.closeDropdown()}))},t.prototype.keyupHandler=function(){var t=this;n.fromEvent(this.element,"keyup").pipe(r.takeUntil(this.close),i.untilDestroyed(this)).subscribe((function(e){if(xi(e)){var n=t.datoAutoComplete.getActiveItem().option;return t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown(),void t.datoAutoComplete.resetIndex()}Si(e)&&t.datoAutoComplete.onKeydown(e,t.datoSize),Oi(e)&&(t.datoAutoComplete.resetIndex(),t.closeDropdown())}))},t.prototype.createDropdown=function(){var t,e,n=this.vcr.createEmbeddedView(this.datoAutoComplete.root);this.container=$t("div"),Ut(this.container,"dato-autocomplete"),Ut(this.container,"dato-select-"+this.datoSize),Vt(this.container,"width",this.element.offsetWidth+"px"),Vt(this.container,"zIndex",Mn());try{for(var o=wt(n.rootNodes),i=o.next();!i.done;i=o.next()){var r=i.value;this.container.appendChild(r)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}n.detectChanges(),document.body.appendChild(this.container)},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:e.ElementRef},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:e.NgZone},{type:An},{type:e.ViewContainerRef}]},vt([e.Input(),Ct("design:type",jc)],t.prototype,"datoAutoComplete",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoSize",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"close",void 0),t=vt([e.Directive({selector:"[datoAutoComplete]"}),bt(1,e.Optional()),Ct("design:paramtypes",[e.ElementRef,o.NgControl,e.NgZone,An,e.ViewContainerRef])],t)}(),Lc=[jc,Mc,_c],Nc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Vi],declarations:[Lc],exports:[Lc],entryComponents:[jc]})],t)}(),Fc=function(){function t(){}return t.prototype.supports=function(t){return/^[a-z]+((\.[a-z]+)*)+(?:\.(?:stop|prevent|capture|self|once))+$/.test(t)},t.prototype.addEventListener=function(t,e,n){var o=this.parseEventName(e);return this.setupEventBinding(t,o,n)},t.prototype.addGlobalEventListener=function(t,e,n){var o=this.parseElement(t),i=this.parseEventName(e);return this.setupEventBinding(o,i,n)},t.prototype.parseElement=function(t){return{window:window,document:document,body:document.body}[t]},t.prototype.parseEventName=function(t){var e=["stop","prevent","capture","self","once"],n=St(t.split(".")),o=n[0],i=n.slice(1).reduce((function(t,n){return e.includes(n)?t.modifiers[n]=!0:t.chains.push(n),t}),{modifiers:{},chains:[]}),r=i.modifiers,a=i.chains;return mt(mt({},r),{name:o,chains:a})},t.prototype.setupEventBinding=function(t,e,n){var o={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},i={capture:e.capture},r=p;if(e.chains.length&&("keydown"===e.name||"keyup"===e.name)){var a=St(e.chains,2),s=a[0],l=a[1];r=function(t){var e=t.key.toLocaleLowerCase(),n=!l&&e===s;if(l){var i=o[s];n=i&&i(t)&&l===e}n&&p(t)}}return t.addEventListener(e.name,r,i),c;function c(){t.removeEventListener(e.name,r,i)}function p(o){e.self&&o.target!==t||(e.once&&c(),e.stop&&o.stopPropagation(),e.prevent&&o.preventDefault(),n(o))}},t}(),Gc=function(){function t(t){this.cdr=t,this.showArrowInLast=!1,this.lastArrowClass="",this.markLastAsActive=!0,this.dataAutoIdPrefix="dato-breadcrumbs-",this.isHeaderControlDisabled=!1,this.headerControlAutoIdSuffix="header-control",this.breadcrumbClick=new e.EventEmitter,this.updateEditableText=new e.EventEmitter,this.INITIAL_DISPLAYED_BREADCRUMBS=3,this._maxDisplayedBreadcrumbs=this.INITIAL_DISPLAYED_BREADCRUMBS}return Object.defineProperty(t.prototype,"maxDisplayedBreadcrumbs",{set:function(t){Lt(this.originalBreadcrumbs)||(this.setMaxDisplayedBreadcrumbs(t),this.initBreadcrumbs(this.originalBreadcrumbs))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"breadcrumbs",{get:function(){return this._breadcrumbs},set:function(t){this.originalBreadcrumbs=t,this._maxDisplayedBreadcrumbs>0&&(this.setMaxDisplayedBreadcrumbs(this._maxDisplayedBreadcrumbs),this.initBreadcrumbs(t))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.headerControl&&this.initEditableHeader()},t.prototype.ngOnDestroy=function(){},t.prototype.onClick=function(t){var e=t.data,n=t.onClick;e&&this.breadcrumbClick.emit(e),n&&n()},t.prototype.shouldHaveArrow=function(t){return!t||t&&this.showArrowInLast},t.prototype.initBreadcrumbs=function(t){var e=ye(t)<=this._maxDisplayedBreadcrumbs,n=e?[]:[{text:"..."}],o=t.slice(0,1),i=e?t.slice(1):t.slice(t.length-this._maxDisplayedBreadcrumbs+1);this._breadcrumbs=xt(o,n,i)},t.prototype.initEditableHeader=function(){var t=this;this.headerControl.valueChanges.pipe(r.debounceTime(300),i.untilDestroyed(this)).subscribe((function(e){t.updateEditableText.emit(e),t.cdr.detectChanges()}))},t.prototype.setMaxDisplayedBreadcrumbs=function(t){t<this.INITIAL_DISPLAYED_BREADCRUMBS?(this._maxDisplayedBreadcrumbs=this.INITIAL_DISPLAYED_BREADCRUMBS,console.error("Minimum breadcrumbs number is "+this.INITIAL_DISPLAYED_BREADCRUMBS)):this._maxDisplayedBreadcrumbs=t},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"maxDisplayedBreadcrumbs",null),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"breadcrumbs",null),vt([e.Input(),Ct("design:type",o.FormControl)],t.prototype,"headerControl",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showArrowInLast",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"lastArrowClass",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"markLastAsActive",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"dataAutoIdPrefix",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isHeaderControlDisabled",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"headerControlAutoIdSuffix",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"breadcrumbClick",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"updateEditableText",void 0),t=vt([e.Component({selector:"dato-breadcrumbs",template:'<div class="d-flex items-center breadcrumbs-container self-start">\n <ng-container *ngFor="let breadcrumb of breadcrumbs; last as last; index as index">\n <dato-link class="breadcrumb-text"\n [attr.data-auto-id]="dataAutoIdPrefix + (breadcrumb.dataAutoId || index)"\n [class.active]="last && markLastAsActive"\n [class.mr-11]="last && !shouldHaveArrow(last)"\n [class.readonly]="breadcrumb.readonly"\n datoSize="sm"\n datoType="secondary"\n (click)="onClick(breadcrumb)"\n [disabled]="breadcrumb.disabled">{{breadcrumb.text | translate}}</dato-link>\n <dato-icon *ngIf="shouldHaveArrow(last)"\n [class.disabled]="breadcrumb.disabled"\n [ngClass]="last ? lastArrowClass : \'\'"\n class="self-center mx-5 primary-300-color"\n datoSize="sm"\n icon="chevron-right"></dato-icon>\n </ng-container>\n</div>\n<div class="d-flex-column justify-center">\n <dato-input\n *ngIf="headerControl"\n [attr.data-auto-id]="dataAutoIdPrefix + headerControlAutoIdSuffix"\n [formControl]="headerControl"\n [datoDisableControl]="isHeaderControlDisabled"\n class="mt-10 editable-header"\n datoControlErrors></dato-input>\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-breadcrumbs{display:flex;flex-direction:column}dato-breadcrumbs .breadcrumbs-container{height:40px}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text a{line-height:1.5}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.active{pointer-events:none;cursor:default}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.active a{font-weight:400}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.disabled,dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.readonly{pointer-events:none;cursor:default}dato-breadcrumbs dato-input.editable-header{max-width:400px;width:400px}dato-breadcrumbs dato-input.editable-header input.dato-input{font-size:18px;font-weight:600}@media (max-width:1440px){dato-breadcrumbs{flex-direction:row}dato-breadcrumbs dato-input.editable-header{max-width:200px;width:200px;margin-top:0;align-items:center}dato-breadcrumbs dato-input.editable-header>div{height:27px;overflow:auto!important}dato-breadcrumbs dato-input.editable-header>div input.dato-input{height:25px;min-height:25px;font-size:12px;font-weight:400;padding-bottom:0}}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),Vc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne,Co,vo,o.ReactiveFormsModule,bs,yo,Xn],declarations:[Gc],exports:[Gc]})],t)}(),zc=function(){function t(t,n){this.host=t,this.zone=n,this.containerBottom=new e.EventEmitter,this.offset=50,this.onRootElement=!1,this.container=this.element}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.onRootElement?this.documentHandler.bind(this):this.elementHandler.bind(this),o=this.onRootElement?document:this.container;this.zone.runOutsideAngular((function(){n.fromEvent(o,"scroll").pipe(r.auditTime(30),i.untilDestroyed(t)).subscribe((function(){return e()}))}))},t.prototype.ngOnDestroy=function(){},t.prototype.documentHandler=function(){window.innerHeight+window.scrollY+this.offset>=document.body.scrollHeight&&this.emit()},t.prototype.elementHandler=function(){var t=this.container,e=t.clientHeight,n=t.scrollHeight;e+t.scrollTop+this.offset>=n&&this.emit()},t.prototype.emit=function(){var t=this;this.zone.run((function(){return t.containerBottom.emit()}))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},vt([e.Output("datoInfiniteScroll"),Ct("design:type",Object)],t.prototype,"containerBottom",void 0),vt([e.Input("datoInfiniteScrollOffset"),Ct("design:type",Object)],t.prototype,"offset",void 0),vt([e.Input("datoInfiniteScrollRoot"),Ct("design:type",Object)],t.prototype,"onRootElement",void 0),vt([e.Input("datoInfiniteScrollContainer"),Ct("design:type",Object)],t.prototype,"container",void 0),t=vt([e.Component({selector:"dato-infinite-scroll",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ElementRef,e.NgZone])],t)}(),Bc=[zc],Hc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Bc],exports:[Bc],entryComponents:[Bc]})],t)}(),Uc=function(t){function n(e,n,o){var i=t.call(this)||this;return i.controlDir=e,i.translate=n,i.snackbar=o,i.multi=!1,i.disabled=!1,e.valueAccessor=i,i}return ft(n,t),Object.defineProperty(n.prototype,"accept",{set:function(t){this.input.nativeElement.accept=t||""},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;this.controlDir.control.statusChanges.pipe(r.filter((function(t){return"INVALID"===t})),i.untilDestroyed(this)).subscribe((function(){var e=t.controlDir.control.errors;e&&!e.required&&(t.showErrors(e),t.controlDir.control.reset())}))},n.prototype.emitFiles=function(t){t&&this.setFiles(t)},n.prototype.openFileUpload=function(){this.input.nativeElement.click()},n.prototype.setFiles=function(t){this.onChange(this.multi?t:t.item(0))},n.prototype.writeValue=function(t){this.input&&(this.input.nativeElement.value="")},n.prototype.setDisabledState=function(t){this.disabled=t},n.prototype.ngOnDestroy=function(){},n.prototype.showErrors=function(t){var e;t.invalidFileType&&(e=t.invalidFileType.extension.toUpperCase()+" "+this.translate.transform("core.invalid-file-type")),t.invalidSize&&(e=this.translate.transform("core.invalid-file-size",{size:t.invalidSize.expected+"mb"})),this.snackbar.dramaticError(e)},n.ctorParameters=function(){return[{type:o.NgControl},{type:_n},{type:_l}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"multi",void 0),vt([e.ViewChild("fileInput",{static:!0}),Ct("design:type",e.ElementRef)],n.prototype,"input",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],n.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],n.prototype,"accept",null),vt([e.HostListener("change",["$event.target.files"]),Ct("design:type",Function),Ct("design:paramtypes",[FileList]),Ct("design:returntype",void 0)],n.prototype,"emitFiles",null),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"openFileUpload",null),n=vt([e.Component({selector:"dato-file-input",template:'<input type="file" #fileInput [attr.multiple]="multi">\n<ng-content></ng-content>\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block;cursor:pointer}:host.disabled{pointer-events:none}:host input[type=file],:host label{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}"]}),Ct("design:paramtypes",[o.NgControl,_n,_l])],n)}(Dt),Kc=function(){function t(t,e,n,o){this.ngControl=t,this.parent=e,this.host=n,this.cdr=o,this.isDraggingFiles=!1,this.disabled=!1,this.size="lg",Ut(n.nativeElement,["large-size"])}return Object.defineProperty(t.prototype,"datoSize",{set:function(t){this.size=t||"lg",Ut(this.host.nativeElement,{sm:"small-size",md:"medium-size",lg:"large-size"}[this.size])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.ngControl.control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLarge",{get:function(){return"lg"===this.size},enumerable:!0,configurable:!0}),t.prototype.dragenter=function(){this.isDraggingFiles=!0},t.prototype.dragover=function(t){t.preventDefault()},t.prototype.dragleave=function(){this.isDraggingFiles=!1},t.prototype.drop=function(t){t.preventDefault(),this.parent.setFiles(t.dataTransfer.files),this.isDraggingFiles=!1},t.prototype.ngOnInit=function(){var t=this;this.control.statusChanges.pipe(r.distinctUntilChanged(),r.startWith(this.isDisabled),i.untilDestroyed(this)).subscribe((function(){t.disabled!==t.isDisabled&&(t.disabled=t.isDisabled,t.cdr.detectChanges())}))},Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.control.disabled},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:o.NgControl},{type:Uc},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.HostBinding("style.width.px"),e.Input(),Ct("design:type",Object)],t.prototype,"width",void 0),vt([e.HostBinding("style.height.px"),e.Input(),Ct("design:type",Object)],t.prototype,"height",void 0),vt([e.HostBinding("class.dragging-files"),Ct("design:type",Object)],t.prototype,"isDraggingFiles",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSize",null),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"imgTpl",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.HostListener("dragenter"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"dragenter",null),vt([e.HostListener("dragover",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"dragover",null),vt([e.HostListener("dragleave"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"dragleave",null),vt([e.HostListener("drop",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"drop",null),t=vt([e.Component({selector:"dato-file-input-default",template:'<header class="d-flex-column items-center">\n\n <section class="mb-20">\n\n <ng-template *ngTemplateOutlet="imgTpl || defaultImg"></ng-template>\n\n <ng-template #defaultImg>\n <svg width="188" height="133" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 188 133" class="file-input-default-img">\n <g fill="none" fill-rule="evenodd">\n <path d="M205.043 94.525c-11.976 15.33-55.795 33.382-72.69 39.757-14.955 5.643-72.095 23.33-91.387-6.177C18.332 93.485-5.408 38.255 25.314 25.06c38.874-16.694 114.334-.657 146.689 17.387 25.715 14.342 41.562 41.17 33.04 52.078z" id="a" fill="#F1F2F5" opacity=".869" transform="rotate(12 135.642 -3.646)"></path>\n <g transform="translate(30 49)" fill-rule="nonzero">\n <rect stroke="#BBDEFB" stroke-width="2" fill="#FFF" x="1" y="1" width="114" height="68" rx=".7"/>\n <g transform="translate(38 20)" fill="#E3F2FD">\n <path d="M23.892 7.081a.44.44 0 0 1 .725.01l14.555 21.86a.44.44 0 0 1-.366.684h-37.6a.44.44 0 0 1-.369-.68l6.264-9.67a.44.44 0 0 1 .693-.059l3.865 4.183a.44.44 0 0 0 .682-.044L23.891 7.08z"/>\n <circle cx="5" cy="5" r="5"/>\n </g>\n </g>\n </g>\n </svg>\n\n </ng-template>\n\n </section>\n\n <section class="file-input-content primary-300-color text-center">\n <ng-content></ng-content>\n </section>\n\n</header>\n\n<div class="drag-enter primary-200-color">\n {{ \'core.drop-file-here\' | translate }}\n</div>\n\n<footer class="d-flex items-center d-flex-wrap justify-center">\n <p class="primary-300-color">{{\'core.drag-and-drop\' | translate}}</p>\n <div class="flex-break " *ngIf="!isLarge"></div>\n <p class="mr-12 ml-12 primary-300-color">- {{\'core.or\' | translate}} -</p>\n <div class="flex-break" *ngIf="!isLarge"></div>\n <dato-button datoSize="sm" width="70px" [disabled]="disabled">{{\'core.browse\' | translate}}</dato-button>\n</footer>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;border-style:dashed;border-width:3px;flex-direction:column;justify-content:center;align-items:center;transition:border .3s}:host .drag-enter{display:none}:host.disabled{pointer-events:none}:host.dragging-files{justify-content:flex-end}:host.dragging-files *{pointer-events:none}:host.dragging-files .drag-enter{display:block;font-size:64px;line-height:64px;font-weight:800!important;margin-bottom:20px}:host.dragging-files footer,:host.dragging-files header{display:none}:host .file-input-content{font-size:12px}:host footer{margin-top:30px}:host.large-size{min-height:450px;height:100%}:host.medium-size{height:450px;width:300px;padding-right:10px;padding-left:10px}:host.medium-size footer{margin-top:20px}:host.medium-size footer dato-button{margin-top:10px}:host.medium-size .drag-enter{font-size:24px;line-height:24px}:host.small-size{min-height:242px;height:242px;width:300px}:host.small-size footer{margin-top:0}:host.small-size footer dato-button{margin-top:10px}:host.small-size .file-input-default-img{width:116px;height:70px}:host.small-size .drag-enter{font-size:20px;line-height:20px}footer p:first-child{font-size:24px;font-weight:800!important}footer p:last-of-type{font-size:14px}.flex-break{flex-basis:100%;height:0}"]}),Ct("design:paramtypes",[o.NgControl,Uc,e.ElementRef,e.ChangeDetectorRef])],t)}(),Wc=[Uc,Kc],Qc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,yo],declarations:[Wc],exports:[Wc],entryComponents:[Wc]})],t)}(),$c=function(t){function n(e){var n=t.call(this)||this;return n.cdr=e,n.buttons=[],n.disabledIds=[],n.isRoundEdges=!1,n.datoSize="lg",n}var i;return ft(n,t),i=n,n.prototype.writeValue=function(t){this.active=t,this.cdr.markForCheck()},n.prototype.setActive=function(t){this.active=t,this.onChange(t)},n.prototype.isDisabled=function(t){return this.disabledIds.includes(t)},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Array)],n.prototype,"buttons",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"disabledIds",void 0),vt([e.Input(),e.HostBinding("class.is-round-edges"),Ct("design:type",Object)],n.prototype,"isRoundEdges",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"datoSize",void 0),n=i=vt([e.Component({selector:"dato-button-group",template:'<dato-button (click)="setActive(button.id)"\n [disabled]="isDisabled(button.id)"\n [attr.datoSize]="datoSize"\n *ngFor="let button of buttons" [attr.datoType]="button.id === active ? \'\' : \'secondary\'">\n {{ button.label | translate }}\n</dato-button>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return i})),multi:!0}],changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ChangeDetectorRef])],n)}(Dt),qc=[$c],Yc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,yo],declarations:[qc],exports:[qc]})],t)}();
487
+ function vc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function bc(t,e,n){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var o=t.getTokenAt(e,n);this.$tokenIndex=o?o.index:-1,this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]}}function Cc(t,e,n,o,i){var r=wc(n,o),a=function(t,e){var n=new bc(t,e.row,e.column),o=n.getCurrentToken();for(;o&&!vc(o,"attribute-name");)o=n.stepBackward();if(o)return o.value}(n,o);if(!r)return[];var s=[];return r in t&&a in t[r]&&"object"==typeof t[r][a]&&(s=Object.keys(t[r][a])),s.map((function(t){return{caption:t,snippet:t,meta:"datorama-value",score:1e7}}))}function wc(t,e){for(var n=new bc(t,e.row,e.column),o=n.getCurrentToken();o&&!vc(o,"tag-name");)o=n.stepBackward();if(o)return o.value}function Sc(t){return{getCompletions:function(e,n,o,i,r){var a=n.getTokenAt(o.row,o.column);return a?((vc(a,"tag-name")||vc(a,"tag-open")||vc(a,"end-tag-open"))&&r(null,function(t,e,n,o,i){return Object.keys(t).map((function(t){return{value:t,caption:t,meta:"datorama-tag",score:1e7}}))}(t)),(vc(a,"tag-whitespace")||vc(a,"attribute-name"))&&r(null,function(t,e,n,o,i){var r=wc(n,o);if(!r)return[];var a=[];return r in t&&(a=a.concat(Object.keys(t[r]))),a.map((function(t){return{caption:t,snippet:t+'="$0"',meta:"datorama-attribute",score:1e7}}))}(t,0,n,o)),vc(a,"attribute-value")&&r(null,Cc(t,0,n,o)),[]):[]}}}function xc(t,e,n){n.commands.addCommand({name:"DADotCommand",bindKey:{win:".",mac:"."},exec:function(){var o=n.selection.getCursor(),i=n.session.getDocument().getLine(o.row).trim().slice(0,o.column).split(/\s+/);if(i[0]){n.insert(".");var r=i[i.length-1].match(/DA(?:\.\w+)*/);if(r){var a={getCompletions:function(n,o,i,a,s){s(null,(t[r[0]]||[]).map((function(t){return{caption:t,value:t,meta:"datorama",completer:{insertMatch:function(t,n){t.completer.insertMatch({value:n.caption}),t.completers=e}}}})))}};n.completers=[a]}}}}),n.commands.on("afterExec",(function(t){"DADotCommand"===t.command.name&&n.execCommand("startAutocomplete")}))}var Oc,Dc=function(){function t(){this.fetchingAce=!1,this.fetchingBeautify=!1}return t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"})],t)}(),Ic=function(){function t(t,e,n,o){var i=this;this.host=t,this.http=e,this.aceService=n,this.config=o,this.disabled=!1,this.defaultOptions={enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,indentedSoftWrap:!1,fontSize:14,useWorker:!0,showPrintMargin:!1,tabSize:2,fontFamily:"Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace'"},this._options=mt({},this.defaultOptions),this.BASE_PATH=this.config.paths.editor,this.waitForAce().subscribe((function(){i.ace.config.set("themePath",i.config.paths.editor+"/themes"),i.editor.setOption("enableEmmet",!0)}))}var a;return a=t,Object.defineProperty(t.prototype,"theme",{set:function(t){this.setTheme(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lang",{set:function(t){this.setLang(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{set:function(t){this._options=mt(mt({},this.defaultOptions),t),this.setOptions()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HTMLCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){e.langTools.setCompleters(xt([Sc(t)],e.getBaseCompletors(e.langTools)))}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"JSObjectCompletions",{set:function(t){var e=this;this.waitForAce().subscribe((function(){xc(t,e.getBaseCompletors(e.langTools),e.getEditor())}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"langTools",{get:function(){return this.ace.require("ace/ext/language_tools")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ace",{get:function(){return window.ace},enumerable:!0,configurable:!0}),t.prototype.waitForAce=function(){var t=this;return window.ace?(this.initializeEditor(),n.timer(0)):this.aceService.fetchingAce?n.timer(50).pipe(r.repeat(),r.filter((function(){return!!window.ace})),r.tap((function(){t.initializeEditor()})),r.take(1)):this.loadAce()},t.prototype.waitForBeauitify=function(){return window.js_beautify?n.timer(0):this.aceService.fetchingBeautify?n.timer(50).pipe(r.repeat(),r.filter((function(){return!!window.js_beautify})),r.take(1)):this.loadBeautifier()},t.prototype.getEditor=function(){return this.editor},t.prototype.prettier=function(){var t=this;this.waitForBeauitify().subscribe((function(){return t.runBeautify()}))},t.prototype.setTheme=function(t){var e=this;this.waitForAce().subscribe((function(){e.ace.config.set("themePath",e.config.paths.editor+"/themes"),e.editor.setTheme("ace/theme/"+t)}))},t.prototype.ngAfterViewInit=function(){var t=this;this.waitForAce().subscribe((function(){t.setOptions(),t.editor.setAutoScrollEditorIntoView(!0),n.fromEvent(t.editor,"change").pipe(i.untilDestroyed(t)).subscribe((function(){return t.onChange(t.editor.getValue())})),n.fromEvent(t.editor.container,"drop").pipe(i.untilDestroyed(t)).subscribe((function(){return t.editor.clearSelection()}))}))},t.prototype.runBeautify=function(){var t="javascript"===this._lang?"js":this._lang,e=(0,window[t+"_beautify"])(this.editor.getValue(),{indent_size:2,preserve_newlines:!1});this.setValue(e)},t.prototype.getBaseCompletors=function(t){return[t.textCompleter,t.snippetCompleter,t.keyWordCompleter]},t.prototype.createRequests=function(t){var e=this;return t.map((function(t){return e.http.get(e.BASE_PATH+"/"+t,{responseType:"text"})}))},t.prototype.loadAceWorkers=function(){return n.forkJoin.apply(void 0,xt(this.createRequests(["worker-css.js","worker-html.js","worker-javascript.js"])))},t.prototype.loadAceScripts=function(){return n.forkJoin.apply(void 0,xt(this.createRequests(["ace.js","ace-langtools.js","emmet-lib.js","emmet.js","mode-css.js","mode-html.js","mode-javascript.js"])))},t.prototype.loadBeautifier=function(){return this.aceService.fetchingBeautify=!0,n.forkJoin.apply(void 0,xt(this.createRequests(["beautify/base.js","beautify/css.js","beautify/html.js"]))).pipe(r.tap((function(t){Xt(t.join(" "),"beautifires")})))},t.prototype.initializeEditor=function(){this.editor||(this.editor=this.ace.edit(this.host.nativeElement))},t.prototype.loadAce=function(){var t=this;return this.aceService.fetchingAce=!0,this.loadAceScripts().pipe(r.tap((function(e){Xt(e.join(" "),"ace-base"),t.ace.config.set("basePath",t.config.paths.editor)})),r.concatMap((function(){return t.loadAceWorkers()})),r.tap((function(e){Xt(e.join(" "),"ace-workers"),t.initializeEditor()})))},t.prototype.setValue=function(t){var e=this;this.waitForAce().subscribe((function(){e.editor.setValue(t),e.editor.clearSelection()}))},t.prototype.setOptions=function(){var t=this;this.waitForAce().subscribe((function(){return t.editor.setOptions(t._options)}))},t.prototype.setLang=function(t){var e=this;this.waitForAce().subscribe((function(){e._lang=t,e.editor.getSession().setMode("ace/mode/"+t)}))},t.prototype.ngOnDestroy=function(){this.editor&&this.editor.destroy(),this.editor=null},t.prototype.writeValue=function(t){this.setValue(t||"")},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){},t.prototype.setDisabledState=function(t){this.disabled=t},t.ctorParameters=function(){return[{type:e.ElementRef},{type:ht.HttpClient},{type:Dc},{type:void 0,decorators:[{type:e.Inject,args:[Bn]}]}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"theme",null),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"lang",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"HTMLCompletions",null),vt([e.Input(),Ct("design:type",Object),Ct("design:paramtypes",[Object])],t.prototype,"JSObjectCompletions",null),t=a=vt([e.Directive({selector:"[datoAce]",exportAs:"datoAce",providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return a})),multi:!0}]}),bt(3,e.Inject(Bn)),Ct("design:paramtypes",[e.ElementRef,ht.HttpClient,Dc,Object])],t)}(),Tc=function(){function t(t){this.host=t,this.host.nativeElement.setAttribute("draggable","true")}return Object.defineProperty(t.prototype,"aceDraggableText",{set:function(t){this.text=t},enumerable:!0,configurable:!0}),t.prototype.drag=function(t){t.dataTransfer.setData("text",this.text)},t.ctorParameters=function(){return[{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"aceDraggableText",null),vt([e.HostListener("dragstart",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Event]),Ct("design:returntype",void 0)],t.prototype,"drag",null),t=vt([e.Directive({selector:"[aceDraggableText]"}),Ct("design:paramtypes",[e.ElementRef])],t)}(),Ec=[Tc,Ic],Ac=function(){function t(){}return t=vt([e.NgModule({declarations:[Ec],exports:[Ec]})],t)}(),Rc=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,Pc=function(){function t(t,e,n,o){this.container=t,this.searchable=e,this.sanitizer=n,this.host=o}return Object.defineProperty(t.prototype,"datoSearchableHighlight",{set:function(t){this._token=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.token)throw new To("Missing search token, please provide one via input or [datoSearchable] directive");this.container.register(this,!0)},t.prototype.ngOnDestroy=function(){this.container.unregister(this,!0)},Object.defineProperty(t.prototype,"token",{get:function(){return this._token||this.searchable&&this.searchable.token},enumerable:!0,configurable:!0}),t.prototype.highlight=function(t,n){this.host.nativeElement.innerHTML=this.sanitizer.sanitize(e.SecurityContext.HTML,this.resolve(t,n))},t.prototype.resolve=function(t,e){if(!t.toLowerCase().includes(e.toLowerCase()))return t;var n=e.replace(Rc,"\\$&");if(n=n.split(" ").filter((function(t){return t.length>0})).join("|")){var o=new RegExp(n,"gi"),i=String.fromCharCode(127);return t.replace(/\s/g,i).replace(o,(function(t){return'<span class="dato-highlight">'+t+"</span>"})).replace(new RegExp(""+i,"g"),"&nbsp;")}return t},t.ctorParameters=function(){return[{type:oi,decorators:[{type:e.Optional}]},{type:ii,decorators:[{type:e.Optional}]},{type:ut.DomSanitizer},{type:e.ElementRef}]},vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSearchableHighlight",null),t=vt([e.Directive({selector:"[datoSearchableHighlight]"}),bt(0,e.Optional()),bt(1,e.Optional()),Ct("design:paramtypes",[oi,ii,ut.DomSanitizer,e.ElementRef])],t)}(),kc=[ii,Pc,oi],_c=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[kc],exports:[kc]})],t)}(),jc=function(){function t(t){this.tpl=t}return t.ctorParameters=function(){return[{type:e.TemplateRef}]},t=vt([e.Directive({selector:"[datoAutocompleteContent]"}),Ct("design:paramtypes",[e.TemplateRef])],t)}(),Mc=function(){function t(){this.labelKey="label"}return t.prototype.optionsClick=function(){return this.options.changes.pipe(r.startWith(this.options.toArray()),r.switchMap((function(t){return n.merge.apply(void 0,xt(t.map((function(t){return t.click$.pipe(r.mapTo(t))}))))})))},t.prototype.ngAfterViewInit=function(){this.keyManager=new pt.ActiveDescendantKeyManager(this.options).withWrap()},t.prototype.onKeydown=function(t,e){this.keyManager.onKeydown(t);var n=document.querySelector(".dato-select__dropdown");this._scrollToOption(e,n)},t.prototype._scrollToOption=function(t,e){Ci({size:t,panel:e,activeItemIndex:this.keyManager.activeItemIndex,groups:this.groups,options:this.options})},t.prototype.getActiveItem=function(){return this.keyManager.activeItem},t.prototype.resetIndex=function(){this.keyManager.setActiveItem(-1)},vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelKey",void 0),vt([e.ViewChild(e.TemplateRef,{static:!0}),Ct("design:type",e.TemplateRef)],t.prototype,"root",void 0),vt([e.ContentChild(jc),Ct("design:type",jc)],t.prototype,"content",void 0),vt([e.ContentChildren(yi,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"options",void 0),vt([e.ContentChildren(mi,{descendants:!0}),Ct("design:type",e.QueryList)],t.prototype,"groups",void 0),t=vt([e.Component({selector:"dato-autocomplete",template:'<ng-template>\n <div class="dato-select__dropdown-container">\n <div class="dato-select__dropdown">\n <ng-container [ngTemplateOutlet]="content.tpl"></ng-container>\n </div>\n\n \x3c!-- FOOTER --\x3e\n\n <footer class="dato-select__footer d-flex">\n\n <ng-content select="[datoAutoCompleteFooter]"></ng-content>\n\n </footer>\n </div>\n</ng-template>\n',exportAs:"datoAutocomplete",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Lc=function(){function t(t,n,o,i,r){if(this.host=t,this.ngControl=n,this.zone=o,this.popper=i,this.vcr=r,this.placement="bottom",this.datoSize="md",this.close=new e.EventEmitter,!n)throw new Error("DatoAutocompleteDirective require a formControl on the input")}return t.prototype.ngOnInit=function(){var t=this;n.fromEvent(this.element,"focusin").pipe(i.untilDestroyed(this)).subscribe((function(){t.openDropdown()}))},t.prototype.openDropdown=function(){var t=this;this.popperInstance||(this.createDropdown(),this.popper.create(this.element,this.container,{placement:this.placement}).subscribe((function(e){t.popperInstance=e,t.closeDropdownHandler(),t.optionsClickHandler(),t.keyupHandler()})))},t.prototype.closeDropdown=function(){this.container&&(document.body.removeChild(this.container),this.popperInstance.destroy(),this.container=null,this.popperInstance=null,this.close.next(),this.vcr.clear())},Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.ngControl.control},enumerable:!0,configurable:!0}),t.prototype.optionsClickHandler=function(){var t=this;this.datoAutoComplete.optionsClick().pipe(r.takeUntil(this.close),i.untilDestroyed(this)).subscribe((function(e){var n=e.option;t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown()}))},t.prototype.closeDropdownHandler=function(){var t=this;n.fromEvent(document,"click",{capture:!0}).pipe(r.takeUntil(this.close),r.filter((function(e){var n=t.element.contains(e.target),o=t.container.contains(e.target);return!n&&!o})),r.take(1),i.untilDestroyed(this)).subscribe((function(){return t.closeDropdown()}))},t.prototype.keyupHandler=function(){var t=this;n.fromEvent(this.element,"keyup").pipe(r.takeUntil(this.close),i.untilDestroyed(this)).subscribe((function(e){if(xi(e)){var n=t.datoAutoComplete.getActiveItem().option;return t.control.setValue(n[t.datoAutoComplete.labelKey]),t.closeDropdown(),void t.datoAutoComplete.resetIndex()}Si(e)&&t.datoAutoComplete.onKeydown(e,t.datoSize),Oi(e)&&(t.datoAutoComplete.resetIndex(),t.closeDropdown())}))},t.prototype.createDropdown=function(){var t,e,n=this.vcr.createEmbeddedView(this.datoAutoComplete.root);this.container=$t("div"),Ut(this.container,"dato-autocomplete"),Ut(this.container,"dato-select-"+this.datoSize),Vt(this.container,"width",this.element.offsetWidth+"px"),Vt(this.container,"zIndex",Mn());try{for(var o=wt(n.rootNodes),i=o.next();!i.done;i=o.next()){var r=i.value;this.container.appendChild(r)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}n.detectChanges(),document.body.appendChild(this.container)},t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:e.ElementRef},{type:o.NgControl,decorators:[{type:e.Optional}]},{type:e.NgZone},{type:An},{type:e.ViewContainerRef}]},vt([e.Input(),Ct("design:type",Mc)],t.prototype,"datoAutoComplete",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"placement",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"datoSize",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"close",void 0),t=vt([e.Directive({selector:"[datoAutoComplete]"}),bt(1,e.Optional()),Ct("design:paramtypes",[e.ElementRef,o.NgControl,e.NgZone,An,e.ViewContainerRef])],t)}(),Nc=[Mc,Lc,jc],Fc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Vi],declarations:[Nc],exports:[Nc],entryComponents:[Mc]})],t)}(),Gc=function(){function t(){}return t.prototype.supports=function(t){return/^[a-z]+((\.[a-z]+)*)+(?:\.(?:stop|prevent|capture|self|once))+$/.test(t)},t.prototype.addEventListener=function(t,e,n){var o=this.parseEventName(e);return this.setupEventBinding(t,o,n)},t.prototype.addGlobalEventListener=function(t,e,n){var o=this.parseElement(t),i=this.parseEventName(e);return this.setupEventBinding(o,i,n)},t.prototype.parseElement=function(t){return{window:window,document:document,body:document.body}[t]},t.prototype.parseEventName=function(t){var e=["stop","prevent","capture","self","once"],n=St(t.split(".")),o=n[0],i=n.slice(1).reduce((function(t,n){return e.includes(n)?t.modifiers[n]=!0:t.chains.push(n),t}),{modifiers:{},chains:[]}),r=i.modifiers,a=i.chains;return mt(mt({},r),{name:o,chains:a})},t.prototype.setupEventBinding=function(t,e,n){var o={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},i={capture:e.capture},r=p;if(e.chains.length&&("keydown"===e.name||"keyup"===e.name)){var a=St(e.chains,2),s=a[0],l=a[1];r=function(t){var e=t.key.toLocaleLowerCase(),n=!l&&e===s;if(l){var i=o[s];n=i&&i(t)&&l===e}n&&p(t)}}return t.addEventListener(e.name,r,i),c;function c(){t.removeEventListener(e.name,r,i)}function p(o){e.self&&o.target!==t||(e.once&&c(),e.stop&&o.stopPropagation(),e.prevent&&o.preventDefault(),n(o))}},t}(),Vc=function(){function t(t){this.cdr=t,this.showArrowInLast=!1,this.lastArrowClass="",this.markLastAsActive=!0,this.dataAutoIdPrefix="dato-breadcrumbs-",this.isHeaderControlDisabled=!1,this.headerControlAutoIdSuffix="header-control",this.breadcrumbClick=new e.EventEmitter,this.updateEditableText=new e.EventEmitter,this.INITIAL_DISPLAYED_BREADCRUMBS=3,this._maxDisplayedBreadcrumbs=this.INITIAL_DISPLAYED_BREADCRUMBS}return Object.defineProperty(t.prototype,"maxDisplayedBreadcrumbs",{set:function(t){Lt(this.originalBreadcrumbs)||(this.setMaxDisplayedBreadcrumbs(t),this.initBreadcrumbs(this.originalBreadcrumbs))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"breadcrumbs",{get:function(){return this._breadcrumbs},set:function(t){this.originalBreadcrumbs=t,this._maxDisplayedBreadcrumbs>0&&(this.setMaxDisplayedBreadcrumbs(this._maxDisplayedBreadcrumbs),this.initBreadcrumbs(t))},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.headerControl&&this.initEditableHeader()},t.prototype.ngOnDestroy=function(){},t.prototype.onClick=function(t){var e=t.data,n=t.onClick;e&&this.breadcrumbClick.emit(e),n&&n()},t.prototype.shouldHaveArrow=function(t){return!t||t&&this.showArrowInLast},t.prototype.initBreadcrumbs=function(t){var e=ye(t)<=this._maxDisplayedBreadcrumbs,n=e?[]:[{text:"..."}],o=t.slice(0,1),i=e?t.slice(1):t.slice(t.length-this._maxDisplayedBreadcrumbs+1);this._breadcrumbs=xt(o,n,i)},t.prototype.initEditableHeader=function(){var t=this;this.headerControl.valueChanges.pipe(r.debounceTime(300),i.untilDestroyed(this)).subscribe((function(e){t.updateEditableText.emit(e),t.cdr.detectChanges()}))},t.prototype.setMaxDisplayedBreadcrumbs=function(t){t<this.INITIAL_DISPLAYED_BREADCRUMBS?(this._maxDisplayedBreadcrumbs=this.INITIAL_DISPLAYED_BREADCRUMBS,console.error("Minimum breadcrumbs number is "+this.INITIAL_DISPLAYED_BREADCRUMBS)):this._maxDisplayedBreadcrumbs=t},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"maxDisplayedBreadcrumbs",null),vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"breadcrumbs",null),vt([e.Input(),Ct("design:type",o.FormControl)],t.prototype,"headerControl",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"showArrowInLast",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"lastArrowClass",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"markLastAsActive",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"dataAutoIdPrefix",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"isHeaderControlDisabled",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"headerControlAutoIdSuffix",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"breadcrumbClick",void 0),vt([e.Output(),Ct("design:type",Object)],t.prototype,"updateEditableText",void 0),t=vt([e.Component({selector:"dato-breadcrumbs",template:'<div class="d-flex items-center breadcrumbs-container self-start">\n <ng-container *ngFor="let breadcrumb of breadcrumbs; last as last; index as index">\n <dato-link class="breadcrumb-text"\n [attr.data-auto-id]="dataAutoIdPrefix + (breadcrumb.dataAutoId || index)"\n [class.active]="last && markLastAsActive"\n [class.mr-11]="last && !shouldHaveArrow(last)"\n [class.readonly]="breadcrumb.readonly"\n datoSize="sm"\n datoType="secondary"\n (click)="onClick(breadcrumb)"\n [disabled]="breadcrumb.disabled">{{breadcrumb.text | translate}}</dato-link>\n <dato-icon *ngIf="shouldHaveArrow(last)"\n [class.disabled]="breadcrumb.disabled"\n [ngClass]="last ? lastArrowClass : \'\'"\n class="self-center mx-5 primary-300-color"\n datoSize="sm"\n icon="chevron-right"></dato-icon>\n </ng-container>\n</div>\n<div class="d-flex-column justify-center">\n <dato-input\n *ngIf="headerControl"\n [attr.data-auto-id]="dataAutoIdPrefix + headerControlAutoIdSuffix"\n [formControl]="headerControl"\n [datoDisableControl]="isHeaderControlDisabled"\n class="mt-10 editable-header"\n datoControlErrors></dato-input>\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-breadcrumbs{display:flex;flex-direction:column}dato-breadcrumbs .breadcrumbs-container{height:40px}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text a{line-height:1.5}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.active{pointer-events:none;cursor:default}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.active a{font-weight:400}dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.disabled,dato-breadcrumbs .breadcrumbs-container .breadcrumb-text.readonly{pointer-events:none;cursor:default}dato-breadcrumbs dato-input.editable-header{max-width:400px;width:400px}dato-breadcrumbs dato-input.editable-header input.dato-input{font-size:18px;font-weight:600}@media (max-width:1440px){dato-breadcrumbs{flex-direction:row}dato-breadcrumbs dato-input.editable-header{max-width:200px;width:200px;margin-top:0;align-items:center}dato-breadcrumbs dato-input.editable-header>div{height:27px;overflow:auto!important}dato-breadcrumbs dato-input.editable-header>div input.dato-input{height:25px;min-height:25px;font-size:12px;font-weight:400;padding-bottom:0}}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),zc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Ne,Co,vo,o.ReactiveFormsModule,bs,yo,Xn],declarations:[Vc],exports:[Vc]})],t)}(),Bc=function(){function t(t,n){this.host=t,this.zone=n,this.containerBottom=new e.EventEmitter,this.offset=50,this.onRootElement=!1,this.container=this.element}return Object.defineProperty(t.prototype,"element",{get:function(){return this.host.nativeElement},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e=this.onRootElement?this.documentHandler.bind(this):this.elementHandler.bind(this),o=this.onRootElement?document:this.container;this.zone.runOutsideAngular((function(){n.fromEvent(o,"scroll").pipe(r.auditTime(30),i.untilDestroyed(t)).subscribe((function(){return e()}))}))},t.prototype.ngOnDestroy=function(){},t.prototype.documentHandler=function(){window.innerHeight+window.scrollY+this.offset>=document.body.scrollHeight&&this.emit()},t.prototype.elementHandler=function(){var t=this.container,e=t.clientHeight,n=t.scrollHeight;e+t.scrollTop+this.offset>=n&&this.emit()},t.prototype.emit=function(){var t=this;this.zone.run((function(){return t.containerBottom.emit()}))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},vt([e.Output("datoInfiniteScroll"),Ct("design:type",Object)],t.prototype,"containerBottom",void 0),vt([e.Input("datoInfiniteScrollOffset"),Ct("design:type",Object)],t.prototype,"offset",void 0),vt([e.Input("datoInfiniteScrollRoot"),Ct("design:type",Object)],t.prototype,"onRootElement",void 0),vt([e.Input("datoInfiniteScrollContainer"),Ct("design:type",Object)],t.prototype,"container",void 0),t=vt([e.Component({selector:"dato-infinite-scroll",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ElementRef,e.NgZone])],t)}(),Hc=[Bc],Uc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule],declarations:[Hc],exports:[Hc],entryComponents:[Hc]})],t)}(),Kc=function(t){function n(e,n,o){var i=t.call(this)||this;return i.controlDir=e,i.translate=n,i.snackbar=o,i.multi=!1,i.disabled=!1,e.valueAccessor=i,i}return ft(n,t),Object.defineProperty(n.prototype,"accept",{set:function(t){this.input.nativeElement.accept=t||""},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var t=this;this.controlDir.control.statusChanges.pipe(r.filter((function(t){return"INVALID"===t})),i.untilDestroyed(this)).subscribe((function(){var e=t.controlDir.control.errors;e&&!e.required&&(t.showErrors(e),t.controlDir.control.reset())}))},n.prototype.emitFiles=function(t){t&&this.setFiles(t)},n.prototype.openFileUpload=function(){this.input.nativeElement.click()},n.prototype.setFiles=function(t){this.onChange(this.multi?t:t.item(0))},n.prototype.writeValue=function(t){this.input&&(this.input.nativeElement.value="")},n.prototype.setDisabledState=function(t){this.disabled=t},n.prototype.ngOnDestroy=function(){},n.prototype.showErrors=function(t){var e;t.invalidFileType&&(e=t.invalidFileType.extension.toUpperCase()+" "+this.translate.transform("core.invalid-file-type")),t.invalidSize&&(e=this.translate.transform("core.invalid-file-size",{size:t.invalidSize.expected+"mb"})),this.snackbar.dramaticError(e)},n.ctorParameters=function(){return[{type:o.NgControl},{type:_n},{type:_l}]},vt([e.Input(),Ct("design:type",Object)],n.prototype,"multi",void 0),vt([e.ViewChild("fileInput",{static:!0}),Ct("design:type",e.ElementRef)],n.prototype,"input",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],n.prototype,"disabled",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],n.prototype,"accept",null),vt([e.HostListener("change",["$event.target.files"]),Ct("design:type",Function),Ct("design:paramtypes",[FileList]),Ct("design:returntype",void 0)],n.prototype,"emitFiles",null),vt([e.HostListener("click"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],n.prototype,"openFileUpload",null),n=vt([e.Component({selector:"dato-file-input",template:'<input type="file" #fileInput [attr.multiple]="multi">\n<ng-content></ng-content>\n\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block;cursor:pointer}:host.disabled{pointer-events:none}:host input[type=file],:host label{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}"]}),Ct("design:paramtypes",[o.NgControl,_n,_l])],n)}(Dt),Wc=function(){function t(t,e,n,o){this.ngControl=t,this.parent=e,this.host=n,this.cdr=o,this.isDraggingFiles=!1,this.disabled=!1,this.size="lg",Ut(n.nativeElement,["large-size"])}return Object.defineProperty(t.prototype,"datoSize",{set:function(t){this.size=t||"lg",Ut(this.host.nativeElement,{sm:"small-size",md:"medium-size",lg:"large-size"}[this.size])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.ngControl.control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLarge",{get:function(){return"lg"===this.size},enumerable:!0,configurable:!0}),t.prototype.dragenter=function(){this.isDraggingFiles=!0},t.prototype.dragover=function(t){t.preventDefault()},t.prototype.dragleave=function(){this.isDraggingFiles=!1},t.prototype.drop=function(t){t.preventDefault(),this.parent.setFiles(t.dataTransfer.files),this.isDraggingFiles=!1},t.prototype.ngOnInit=function(){var t=this;this.control.statusChanges.pipe(r.distinctUntilChanged(),r.startWith(this.isDisabled),i.untilDestroyed(this)).subscribe((function(){t.disabled!==t.isDisabled&&(t.disabled=t.isDisabled,t.cdr.detectChanges())}))},Object.defineProperty(t.prototype,"isDisabled",{get:function(){return this.control.disabled},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){},t.ctorParameters=function(){return[{type:o.NgControl},{type:Kc},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},vt([e.HostBinding("style.width.px"),e.Input(),Ct("design:type",Object)],t.prototype,"width",void 0),vt([e.HostBinding("style.height.px"),e.Input(),Ct("design:type",Object)],t.prototype,"height",void 0),vt([e.HostBinding("class.dragging-files"),Ct("design:type",Object)],t.prototype,"isDraggingFiles",void 0),vt([e.Input(),Ct("design:type",String),Ct("design:paramtypes",[String])],t.prototype,"datoSize",null),vt([e.Input(),Ct("design:type",e.TemplateRef)],t.prototype,"imgTpl",void 0),vt([e.HostBinding("class.disabled"),Ct("design:type",Object)],t.prototype,"disabled",void 0),vt([e.HostListener("dragenter"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"dragenter",null),vt([e.HostListener("dragover",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"dragover",null),vt([e.HostListener("dragleave"),Ct("design:type",Function),Ct("design:paramtypes",[]),Ct("design:returntype",void 0)],t.prototype,"dragleave",null),vt([e.HostListener("drop",["$event"]),Ct("design:type",Function),Ct("design:paramtypes",[Object]),Ct("design:returntype",void 0)],t.prototype,"drop",null),t=vt([e.Component({selector:"dato-file-input-default",template:'<header class="d-flex-column items-center">\n\n <section class="mb-20">\n\n <ng-template *ngTemplateOutlet="imgTpl || defaultImg"></ng-template>\n\n <ng-template #defaultImg>\n <svg width="188" height="133" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 188 133" class="file-input-default-img">\n <g fill="none" fill-rule="evenodd">\n <path d="M205.043 94.525c-11.976 15.33-55.795 33.382-72.69 39.757-14.955 5.643-72.095 23.33-91.387-6.177C18.332 93.485-5.408 38.255 25.314 25.06c38.874-16.694 114.334-.657 146.689 17.387 25.715 14.342 41.562 41.17 33.04 52.078z" id="a" fill="#F1F2F5" opacity=".869" transform="rotate(12 135.642 -3.646)"></path>\n <g transform="translate(30 49)" fill-rule="nonzero">\n <rect stroke="#BBDEFB" stroke-width="2" fill="#FFF" x="1" y="1" width="114" height="68" rx=".7"/>\n <g transform="translate(38 20)" fill="#E3F2FD">\n <path d="M23.892 7.081a.44.44 0 0 1 .725.01l14.555 21.86a.44.44 0 0 1-.366.684h-37.6a.44.44 0 0 1-.369-.68l6.264-9.67a.44.44 0 0 1 .693-.059l3.865 4.183a.44.44 0 0 0 .682-.044L23.891 7.08z"/>\n <circle cx="5" cy="5" r="5"/>\n </g>\n </g>\n </g>\n </svg>\n\n </ng-template>\n\n </section>\n\n <section class="file-input-content primary-300-color text-center">\n <ng-content></ng-content>\n </section>\n\n</header>\n\n<div class="drag-enter primary-200-color">\n {{ \'core.drop-file-here\' | translate }}\n</div>\n\n<footer class="d-flex items-center d-flex-wrap justify-center">\n <p class="primary-300-color">{{\'core.drag-and-drop\' | translate}}</p>\n <div class="flex-break " *ngIf="!isLarge"></div>\n <p class="mr-12 ml-12 primary-300-color">- {{\'core.or\' | translate}} -</p>\n <div class="flex-break" *ngIf="!isLarge"></div>\n <dato-button datoSize="sm" width="70px" [disabled]="disabled">{{\'core.browse\' | translate}}</dato-button>\n</footer>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;border-style:dashed;border-width:3px;flex-direction:column;justify-content:center;align-items:center;transition:border .3s}:host .drag-enter{display:none}:host.disabled{pointer-events:none}:host.dragging-files{justify-content:flex-end}:host.dragging-files *{pointer-events:none}:host.dragging-files .drag-enter{display:block;font-size:64px;line-height:64px;font-weight:800!important;margin-bottom:20px}:host.dragging-files footer,:host.dragging-files header{display:none}:host .file-input-content{font-size:12px}:host footer{margin-top:30px}:host.large-size{min-height:450px;height:100%}:host.medium-size{height:450px;width:300px;padding-right:10px;padding-left:10px}:host.medium-size footer{margin-top:20px}:host.medium-size footer dato-button{margin-top:10px}:host.medium-size .drag-enter{font-size:24px;line-height:24px}:host.small-size{min-height:242px;height:242px;width:300px}:host.small-size footer{margin-top:0}:host.small-size footer dato-button{margin-top:10px}:host.small-size .file-input-default-img{width:116px;height:70px}:host.small-size .drag-enter{font-size:20px;line-height:20px}footer p:first-child{font-size:24px;font-weight:800!important}footer p:last-of-type{font-size:14px}.flex-break{flex-basis:100%;height:0}"]}),Ct("design:paramtypes",[o.NgControl,Kc,e.ElementRef,e.ChangeDetectorRef])],t)}(),Qc=[Kc,Wc],$c=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,yo],declarations:[Qc],exports:[Qc],entryComponents:[Qc]})],t)}(),qc=function(t){function n(e){var n=t.call(this)||this;return n.cdr=e,n.buttons=[],n.disabledIds=[],n.isRoundEdges=!1,n.datoSize="lg",n}var i;return ft(n,t),i=n,n.prototype.writeValue=function(t){this.active=t,this.cdr.markForCheck()},n.prototype.setActive=function(t){this.active=t,this.onChange(t)},n.prototype.isDisabled=function(t){return this.disabledIds.includes(t)},n.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",Array)],n.prototype,"buttons",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"disabledIds",void 0),vt([e.Input(),e.HostBinding("class.is-round-edges"),Ct("design:type",Object)],n.prototype,"isRoundEdges",void 0),vt([e.Input(),Ct("design:type",Object)],n.prototype,"datoSize",void 0),n=i=vt([e.Component({selector:"dato-button-group",template:'<dato-button (click)="setActive(button.id)"\n [disabled]="isDisabled(button.id)"\n [attr.datoSize]="datoSize"\n *ngFor="let button of buttons" [attr.datoType]="button.id === active ? \'\' : \'secondary\'">\n {{ button.label | translate }}\n</dato-button>\n',providers:[{provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return i})),multi:!0}],changeDetection:e.ChangeDetectionStrategy.OnPush}),Ct("design:paramtypes",[e.ChangeDetectorRef])],n)}(Dt),Yc=[qc],Zc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,se,yo],declarations:[Yc],exports:[Yc]})],t)}();
488
488
  /**
489
489
  * @license
490
490
  * Copyright Datorama. All Rights Reserved.
491
491
  *
492
492
  * Use of this source code is governed by an Apache License 2.0 license that can be
493
493
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
494
- */(xc=t.PillType||(t.PillType={})).PRIMARY="primary",xc.SECONDARY="secondary",xc.RED="red",xc.ORANGE="orange";var Zc=function(){function t(t){this.size=t,this._options=[],this.labelTooltipPosition="bottom",this.canRemove=!0,this.restCount=0,this._limitTo=10,this.removeOption=new e.EventEmitter,this.size=t||"md"}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount()},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}),t.prototype.remove=function(t){this.options=this._options.filter((function(e){return e.id!==t.id})),this.removeOption.emit(t)},Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options&&this.options.length>this.limitTo},enumerable:!0,configurable:!0}),t.prototype.setRestCount=function(){this.options&&this.options.length&&(this.restCount=Math.abs(this.limitTo-this.options.length))},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelTooltipPosition",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"canRemove",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),t=vt([e.Component({selector:"dato-pills",template:'<div class="dato-pills__active d-flex justify-between" [class.cant-remove]="!canRemove" [attr.dato-type]="option.type || \'primary\'" [class.disabled]="option.disabled"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (\'id\' | trackByProp)">\n <span [datoTooltip]="option.customTooltip || option.label" class="ellipsis"\n datoTooltipPosition="labelTooltipPosition" [datoTooltipOnTextOverflow]="!option.customTooltip">{{option.label | translate}}</span>\n <dato-icon class="d-flex-no-shrink pointer" datoIcon="close" *ngIf="canRemove"\n (click)="remove(option)"></dato-icon>\n</div>\n<div class="dato-pills__active d-flex justify-between dato-pills__rest" *ngIf="showRest">\n +{{restCount}}\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-pills{display:flex;flex-wrap:wrap}dato-pills .dato-pills__active{height:35px;line-height:35px;margin-right:6px;margin-bottom:6px;font-size:14px;font-weight:600}dato-pills .dato-pills__rest{padding:7px}dato-pills[datoSize=sm] .dato-pills__active{height:26px;line-height:26px;margin-right:6px;margin-bottom:6px;font-size:12px}"]}),bt(0,e.Attribute("datoSize")),Ct("design:paramtypes",[Object])],t)}(),Xc=[Zc],Jc=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Xn,yo,Ne],declarations:[Xc],exports:[Xc]})],t)}(),tp=function(){function t(t){this.cdr=t,this.barColor="primary-100",this.thresholds=[33,66]}return t.prototype.ngOnInit=function(){this.parts?this.parts&&this.parts.every((function(t){return t.weight>=0}))&&!this.parts.every((function(t){return!!t.percent}))&&this.initPartsPercent():(this.percent=this.percent||0,this.isByPercent=!0,this.hasInitialColor=!!this.color,this.initSinglePart())},t.prototype.ngOnChanges=function(t){this.isByPercent&&(t.percent&&!t.percent.firstChange||t.color&&!t.color.firstChange||t.tooltip&&!t.tooltip.firstChange)&&(this.initSinglePart(),this.cdr.detectChanges())},t.prototype.initSinglePart=function(){this.color&&this.hasInitialColor||this.initColor(),this.parts=[{percent:this.percent,color:this.color,tooltip:this.tooltip}]},t.prototype.initColor=function(){kt(this.thresholds)&&(this.color="accent-400"),1===this.thresholds.length?this.color=this.percent<=this.thresholds[0]?"red-400":"green-400":this.color=this.percent<=this.thresholds[0]?"red-400":this.percent<=this.thresholds[1]?"yellow-400":"green-400"},t.prototype.initPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.weight}),0);this.parts.forEach((function(e){e.percent=e.weight>0?Math.max(Math.round(e.weight/t*100),1):0})),this.roundPartsPercent()},t.prototype.roundPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.percent}),0);if(100!==t)for(var e=100-t,n=0,o=0;0!==e&&o<100;){var i=this.parts[n];n=(n+1)%this.parts.length,o++,0===i.weight||i.percent<=1||(i.percent+=e>0?1:-1,e-=e>0?1:-1)}},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"parts",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"percent",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"color",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"barColor",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"thresholds",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"showLegend",void 0),t=vt([e.Component({selector:"dato-progress-bar",template:'<div class="bar d-flex width-100 overflow-hidden"\n [style.width]="width"\n [class]="barColor + \'-background-color\'">\n <div *ngFor="let part of parts; index as i"\n class="part height-100"\n [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"\n [style.width]="i > 0 ? \'calc(\' + part.percent + \'% + 8px)\' : part.percent + \'%\'"\n [style.z-index]="100 - i"\n [datoTooltipV2]="part.tooltip">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf="showLegend" class="d-flex mt-12">\n <div *ngFor="let part of parts; index as i" class="d-flex mr-16">\n <div class="d-flex dato-note primary-400-color">\n <div class="legend-color mr-6" [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n </div>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:16px;height:16px;min-width:16px;border-radius:50%}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),ep=[tp],np=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Xn],declarations:[ep],exports:[ep]})],t)}(),op=[Xn,Nc,ls,ns,kc,Ec,zl,mc,Wi,oc,se,Vc,On,Pl,Nl,vo,Ne,Co,xo,tc,tr,Ol,Qs,Hi,ui,Vs,ki,El,ul,cl,Xi,Vi,Ql,yo,At,bs,Hc,Us,Qc,gl,Os,Yc,us,nl,Jc,np],ip=function(){function t(){}var n;return n=t,t.forRoot=function(t){return{ngModule:n,providers:[{provide:Bn,useValue:t},{provide:ut.EVENT_MANAGER_PLUGINS,useClass:Fc,multi:!0}]}},t=n=vt([e.NgModule({exports:[op]})],t)}();(t.MockService||(t.MockService={})).TRANSLATE="translate";var rp={translate:{transform:function(t){return t}}};var ap={translate:function(){return{provide:kn,useValue:rp.translate}},datePickerConfig:function(){return{provide:vn,useValue:function(){}}}};
494
+ */(Oc=t.PillType||(t.PillType={})).PRIMARY="primary",Oc.SECONDARY="secondary",Oc.RED="red",Oc.ORANGE="orange";var Xc=function(){function t(t){this.size=t,this._options=[],this.labelTooltipPosition="bottom",this.canRemove=!0,this.restCount=0,this._limitTo=10,this.removeOption=new e.EventEmitter,this.size=t||"md"}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount()},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}),t.prototype.remove=function(t){this.options=this._options.filter((function(e){return e.id!==t.id})),this.removeOption.emit(t)},Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options&&this.options.length>this.limitTo},enumerable:!0,configurable:!0}),t.prototype.setRestCount=function(){this.options&&this.options.length&&(this.restCount=Math.abs(this.limitTo-this.options.length))},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelTooltipPosition",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"canRemove",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),t=vt([e.Component({selector:"dato-pills",template:'<div class="dato-pills__active d-flex justify-between" [class.cant-remove]="!canRemove" [attr.dato-type]="option.type || \'primary\'" [class.disabled]="option.disabled"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (\'id\' | trackByProp)">\n <span [datoTooltip]="option.customTooltip || option.label" class="ellipsis"\n datoTooltipPosition="labelTooltipPosition" [datoTooltipOnTextOverflow]="!option.customTooltip">{{option.label | translate}}</span>\n <dato-icon class="d-flex-no-shrink pointer" datoIcon="close" *ngIf="canRemove"\n (click)="remove(option)"></dato-icon>\n</div>\n<div class="dato-pills__active d-flex justify-between dato-pills__rest" *ngIf="showRest">\n +{{restCount}}\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-pills{display:flex;flex-wrap:wrap}dato-pills .dato-pills__active{height:35px;line-height:35px;margin-right:6px;margin-bottom:6px;font-size:14px;font-weight:600}dato-pills .dato-pills__rest{padding:7px}dato-pills[datoSize=sm] .dato-pills__active{height:26px;line-height:26px;margin-right:6px;margin-bottom:6px;font-size:12px}"]}),bt(0,e.Attribute("datoSize")),Ct("design:paramtypes",[Object])],t)}(),Jc=[Xc],tp=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Xn,yo,Ne],declarations:[Jc],exports:[Jc]})],t)}(),ep=function(){function t(t){this.cdr=t,this.barColor="primary-100",this.thresholds=[33,66]}return t.prototype.ngOnInit=function(){this.parts?this.parts&&this.parts.every((function(t){return t.weight>=0}))&&!this.parts.every((function(t){return!!t.percent}))&&this.initPartsPercent():(this.percent=this.percent||0,this.isByPercent=!0,this.hasInitialColor=!!this.color,this.initSinglePart())},t.prototype.ngOnChanges=function(t){this.isByPercent&&(t.percent&&!t.percent.firstChange||t.color&&!t.color.firstChange||t.tooltip&&!t.tooltip.firstChange)&&(this.initSinglePart(),this.cdr.detectChanges())},t.prototype.initSinglePart=function(){this.color&&this.hasInitialColor||this.initColor(),this.parts=[{percent:this.percent,color:this.color,tooltip:this.tooltip}]},t.prototype.initColor=function(){kt(this.thresholds)&&(this.color="accent-400"),1===this.thresholds.length?this.color=this.percent<=this.thresholds[0]?"red-400":"green-400":this.color=this.percent<=this.thresholds[0]?"red-400":this.percent<=this.thresholds[1]?"yellow-400":"green-400"},t.prototype.initPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.weight}),0);this.parts.forEach((function(e){e.percent=e.weight>0?Math.max(Math.round(e.weight/t*100),1):0})),this.roundPartsPercent()},t.prototype.roundPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.percent}),0);if(100!==t)for(var e=100-t,n=0,o=0;0!==e&&o<100;){var i=this.parts[n];n=(n+1)%this.parts.length,o++,0===i.weight||i.percent<=1||(i.percent+=e>0?1:-1,e-=e>0?1:-1)}},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"parts",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"percent",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"color",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"barColor",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"thresholds",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"showLegend",void 0),t=vt([e.Component({selector:"dato-progress-bar",template:'<div class="bar d-flex width-100 overflow-hidden"\n [style.width]="width"\n [class]="barColor + \'-background-color\'">\n <div *ngFor="let part of parts; index as i"\n class="part height-100"\n [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"\n [style.width]="i > 0 ? \'calc(\' + part.percent + \'% + 8px)\' : part.percent + \'%\'"\n [style.z-index]="100 - i"\n [datoTooltipV2]="part.tooltip">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf="showLegend" class="d-flex mt-12">\n <div *ngFor="let part of parts; index as i" class="d-flex mr-16">\n <div class="d-flex items-center dato-note primary-400-color">\n <div class="legend-color mr-4" [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class="primary-300-color ml-3" *ngIf="part.legendSecondaryLabel">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:8px;height:8px;min-width:8px;border-radius:50%}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),np=[ep],op=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Xn],declarations:[np],exports:[np]})],t)}(),ip=[Xn,Fc,ls,ns,_c,Ac,Bl,yc,Wi,ic,se,zc,On,Pl,Nl,vo,Ne,Co,xo,ec,tr,Ol,Qs,Hi,ui,Vs,ki,El,ul,cl,Xi,Vi,$l,yo,At,bs,Uc,Us,$c,gl,Os,Zc,us,nl,tp,op],rp=function(){function t(){}var n;return n=t,t.forRoot=function(t){return{ngModule:n,providers:[{provide:Bn,useValue:t},{provide:ut.EVENT_MANAGER_PLUGINS,useClass:Gc,multi:!0}]}},t=n=vt([e.NgModule({exports:[ip]})],t)}();(t.MockService||(t.MockService={})).TRANSLATE="translate";var ap={translate:{transform:function(t){return t}}};var sp={translate:function(){return{provide:kn,useValue:ap.translate}},datePickerConfig:function(){return{provide:vn,useValue:function(){}}}};
495
495
  /**
496
496
  * @license
497
497
  * Copyright Datorama. All Rights Reserved.
@@ -611,7 +611,7 @@ function yc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function vc(t,e,n){this.
611
611
  * Use of this source code is governed by an Apache License 2.0 license that can be
612
612
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
613
613
  */
614
- function sp(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 lp(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]=sp({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function cp(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.12.2",t.APP_TRANSLATE=kn,t.AceService=Oc,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=Jr,t.CustomHeaderControllerService=ma,t.DATE_PICKER_CONFIG=vn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=ja,t.DATO_FORM_ERRORS=ms,t.DATO_GRID_STORAGE_API=zr,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=Oa,t.DatePickerConfig=yn,t.DatePickerMonthComponent=Es,t.DatoAccordionComponent=pi,t.DatoAccordionContentComponent=ri,t.DatoAccordionGroupComponent=si,t.DatoAccordionHeaderComponent=ai,t.DatoAccordionModule=ui,t.DatoAceDirective=Dc,t.DatoAceDraggableDirective=Ic,t.DatoAceModule=Ec,t.DatoAutoCompleteContentDirective=_c,t.DatoAutoFocusDirective=Tn,t.DatoAutocompleteComponent=jc,t.DatoAutocompleteDirective=Mc,t.DatoAutocompleteModule=Nc,t.DatoBreadcrumbsComponent=Gc,t.DatoBreadcrumbsModule=Vc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=$c,t.DatoButtonGroupModule=Yc,t.DatoButtonModule=se,t.DatoCamelCasePipe=oo,t.DatoCarouselComponent=Kl,t.DatoCarouselItemDirective=Bl,t.DatoCarouselItemElement=Ul,t.DatoCarouselModule=Ql,t.DatoCheckboxComponent=Pi,t.DatoCheckboxModule=ki,t.DatoClipboardDirective=zn,t.DatoColorDirective=wn,t.DatoConfirmationDialogComponent=Yo,t.DatoControlErrorComponent=hs,t.DatoControlErrorContainerDirective=gs,t.DatoControlErrorsDirective=ys,t.DatoCoreError=To,t.DatoCoreModule=ip,t.DatoCustomHeaderTemplateComponent=Ga,t.DatoCustomHeaderTemplateDirective=Na,t.DatoCustomMoreMenuTemplateDirective=Fa,t.DatoDatePickerContainerComponent=Rs,t.DatoDatePickerModule=Us,t.DatoDatePickerRangeComponent=Ls,t.DatoDatePickerSingleComponent=zs,t.DatoDialog=Zo,t.DatoDialogCloseDirective=al,t.DatoDialogComponent=Ko,t.DatoDialogContentComponent=il,t.DatoDialogDismissDirective=pl,t.DatoDialogFooterComponent=rl,t.DatoDialogHeaderComponent=ol,t.DatoDialogModule=ul,t.DatoDialogRef=Uo,t.DatoDirectivesModule=Xn,t.DatoDisableControlDirective=Gn,t.DatoDraggableDirective=In,t.DatoDynamicContentComponent=ll,t.DatoDynamicContentModule=cl,t.DatoEditableHeaderComponent=Ml,t.DatoEditableHeaderModule=Nl,t.DatoFileInputComponent=Uc,t.DatoFileInputDefaultComponent=Kc,t.DatoFileInputModule=Qc,t.DatoFontDirective=wo,t.DatoFontIconComponent=Fe,t.DatoFontIconModule=Ge,t.DatoFormSubmitDirective=fs,t.DatoFormValidationModule=bs,t.DatoGrid=ar,t.DatoGridAPI=Io,t.DatoGridAvatarCellComponent=Cl,t.DatoGridColumnDisplayMenuComponent=Wa,t.DatoGridColumnHeaderComponent=ya,t.DatoGridColumnHeaderMoreMenuComponent=sa,t.DatoGridComponent=jo,t.DatoGridControllerComponent=Ua,t.DatoGridDateFilterOptions=br,t.DatoGridFilterComponent=fa,t.DatoGridFilterOptionsMap=Sr,t.DatoGridGroupsMenuComponent=Qa,t.DatoGridHeaderComponent=Mo,t.DatoGridHeaderV2Component=$a,t.DatoGridInitialsCellComponent=bl,t.DatoGridItemsCellComponent=vl,t.DatoGridModule=tr,t.DatoGridNumberFilterOptions=wr,t.DatoGridOnHoverComponent=za,t.DatoGridPaginationComponent=ko,t.DatoGridPaginationV2Component=Ya,t.DatoGridStatusCellComponent=yl,t.DatoGridStringFilterOptions=Cr,t.DatoGridToolbarComponent=ni,t.DatoGridToolbarItemDirective=No,t.DatoGridToolbarItemElementDirective=Fo,t.DatoGridV2Component=Ka,t.DatoGridV2LoaderComponent=Ur,t.DatoGridV2Module=Ol,t.DatoGridV2NoDataOverlayComponent=Yr,t.DatoGridV2ToolbarButtonComponent=Za,t.DatoGridV2ToolbarComponent=Xa,t.DatoGroupComponent=mi,t.DatoHighlightPipe=to,t.DatoHotkeys=Ha,t.DatoHotkeysDirective=hl,t.DatoHotkeysHelpComponent=Ba,t.DatoHotkeysModule=gl,t.DatoIconButtonComponent=Oo,t.DatoIconButtonModule=Do,t.DatoIconComponent=Le,t.DatoIconModule=Ne,t.DatoInfiniteScrollComponent=zc,t.DatoInfiniteScrollModule=Hc,t.DatoInputComponent=Cn,t.DatoInputModule=vo,t.DatoInputNumberComponent=ws,t.DatoInputNumberDirective=Cs,t.DatoInputNumberModule=Os,t.DatoKebabCasePipe=no,t.DatoLinkButtonComponent=bo,t.DatoLinkButtonModule=Co,t.DatoListComponent=Yi,t.DatoListModule=Xi,t.DatoListNoDataComponent=Js,t.DatoListNoResultComponent=Xs,t.DatoListV2Component=Zs,t.DatoListV2Module=nl,t.DatoLoaderComponent=Ks,t.DatoLoadersModule=Qs,t.DatoMenuComponent=is,t.DatoMenuContentDirective=os,t.DatoMenuItemDirective=as,t.DatoMenuModule=ls,t.DatoMenuTriggerForDirective=rs,t.DatoMultiOptionComponent=ji,t.DatoMultiOptionV2Component=Ni,t.DatoOperatorTogglerComponent=ps,t.DatoOperatorTogglerModule=us,t.DatoOptionComponent=yi,t.DatoOptionV2Component=Li,t.DatoOptionsModule=Vi,t.DatoOriginDirective=Dn,t.DatoOverlay=Rn,t.DatoPageLoaderComponent=Ws,t.DatoPanel=dc,t.DatoPanelComponent=lc,t.DatoPanelContentComponent=hc,t.DatoPanelFooterComponent=gc,t.DatoPanelHeaderComponent=uc,t.DatoPanelInternalConfig=cc,t.DatoPanelModule=mc,t.DatoPanelRef=pc,t.DatoPillsComponent=Zc,t.DatoPillsModule=Jc,t.DatoPipesModule=yo,t.DatoPopover=ra,t.DatoPopoverComponent=na,t.DatoPopoverModule=ns,t.DatoProgressBarComponent=tp,t.DatoProgressBarModule=np,t.DatoRadioComponent=Il,t.DatoRadioModule=El,t.DatoRichTextDirective=Gl,t.DatoRichTextModule=zl,t.DatoSearchResultsGroupSortPipe=co,t.DatoSearchResultsSortPipe=uo,t.DatoSearchableContainerComponent=oi,t.DatoSearchableDirective=ii,t.DatoSearchableHighlightDirective=Rc,t.DatoSearchableModule=kc,t.DatoSelectActiveDirective=vi,t.DatoSelectComponent=Ai,t.DatoSelectEmptyComponent=Mi,t.DatoSelectModule=Wi,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=_l,t.DatoSnackbarComponent=Rl,t.DatoSnackbarModule=Pl,t.DatoSortableComponent=ci,t.DatoSortableHandleDirective=zi,t.DatoSortableModule=Hi,t.DatoStaticImageSrcDirective=Hn,t.DatoStaticImagesSrcModule=Un,t.DatoSubscribeContext=Nn,t.DatoSubscribeDirective=Fn,t.DatoTab=Zl,t.DatoTabContent=Yl,t.DatoTabTitle=ql,t.DatoTabsModule=tc,t.DatoTabset=Xl,t.DatoTemplatePortal=Pn,t.DatoTextModule=xo,t.DatoThemesModule=On,t.DatoToast=sc,t.DatoToastComponent=nc,t.DatoToastModule=oc,t.DatoTogglerComponent=Fs,t.DatoTogglerModule=Vs,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=Fc,t.GridToolbarService=ei,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=je,t.POPPER_BOUNDARY=As,t.PaletteDirective=Sn,t.PopoverCloseDirective=Ja,t.PopoverContentDirective=ts,t.PopoverRef=oa,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=kl,t.Store=$s,t.SvgRegistry=Me,t.ToolbarConfirmation=Jo,t.ToolbarDeleteConfirmation=ti,t.ToolbarHandler=Xo,t.TranslatePipe=eo,t._valueChanges=cp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=Sc,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=_a,t.convertToTreeData=ka,t.copyToClipboard=Vn,t.createComponent=Zr,t.createElement=$t,t.createGUID=Te,t.createHTMLCompletor=wc,t.curry=ve,t.dateCompare=ke,t.daysOfTheMonth=Ts,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=dl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=qr,t.defaultActions=aa,t.defaultConfig=Al,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=xa,t.defaultGridTreeLabel=Da,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=Ca,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=Br,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 cp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return sp({collection:t,value:e,labelKey:r})}})},t.filterByTerm=sp,t.filterDialogDismissed=function(){return ec(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return ec(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 cp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return lp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=lp,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=pa,t.generateMonths=_s,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=rc,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=Ia,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=
614
+ function lp(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 cp(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]=lp({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function pp(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.13.2-rc.",t.APP_TRANSLATE=kn,t.AceService=Dc,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=Jr,t.CustomHeaderControllerService=ma,t.DATE_PICKER_CONFIG=vn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=ja,t.DATO_FORM_ERRORS=ms,t.DATO_GRID_STORAGE_API=zr,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=Oa,t.DatePickerConfig=yn,t.DatePickerMonthComponent=Es,t.DatoAccordionComponent=pi,t.DatoAccordionContentComponent=ri,t.DatoAccordionGroupComponent=si,t.DatoAccordionHeaderComponent=ai,t.DatoAccordionModule=ui,t.DatoAceDirective=Ic,t.DatoAceDraggableDirective=Tc,t.DatoAceModule=Ac,t.DatoAutoCompleteContentDirective=jc,t.DatoAutoFocusDirective=Tn,t.DatoAutocompleteComponent=Mc,t.DatoAutocompleteDirective=Lc,t.DatoAutocompleteModule=Fc,t.DatoBreadcrumbsComponent=Vc,t.DatoBreadcrumbsModule=zc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=qc,t.DatoButtonGroupModule=Zc,t.DatoButtonModule=se,t.DatoCamelCasePipe=oo,t.DatoCarouselComponent=Wl,t.DatoCarouselItemDirective=Hl,t.DatoCarouselItemElement=Kl,t.DatoCarouselModule=$l,t.DatoCheckboxComponent=Pi,t.DatoCheckboxModule=ki,t.DatoClipboardDirective=zn,t.DatoColorDirective=wn,t.DatoConfirmationDialogComponent=Yo,t.DatoControlErrorComponent=hs,t.DatoControlErrorContainerDirective=gs,t.DatoControlErrorsDirective=ys,t.DatoCoreError=To,t.DatoCoreModule=rp,t.DatoCustomHeaderTemplateComponent=Ga,t.DatoCustomHeaderTemplateDirective=Na,t.DatoCustomMoreMenuTemplateDirective=Fa,t.DatoDatePickerContainerComponent=Rs,t.DatoDatePickerModule=Us,t.DatoDatePickerRangeComponent=Ls,t.DatoDatePickerSingleComponent=zs,t.DatoDialog=Zo,t.DatoDialogCloseDirective=al,t.DatoDialogComponent=Ko,t.DatoDialogContentComponent=il,t.DatoDialogDismissDirective=pl,t.DatoDialogFooterComponent=rl,t.DatoDialogHeaderComponent=ol,t.DatoDialogModule=ul,t.DatoDialogRef=Uo,t.DatoDirectivesModule=Xn,t.DatoDisableControlDirective=Gn,t.DatoDraggableDirective=In,t.DatoDynamicContentComponent=ll,t.DatoDynamicContentModule=cl,t.DatoEditableHeaderComponent=Ml,t.DatoEditableHeaderModule=Nl,t.DatoFileInputComponent=Kc,t.DatoFileInputDefaultComponent=Wc,t.DatoFileInputModule=$c,t.DatoFontDirective=wo,t.DatoFontIconComponent=Fe,t.DatoFontIconModule=Ge,t.DatoFormSubmitDirective=fs,t.DatoFormValidationModule=bs,t.DatoGrid=ar,t.DatoGridAPI=Io,t.DatoGridAvatarCellComponent=Cl,t.DatoGridColumnDisplayMenuComponent=Wa,t.DatoGridColumnHeaderComponent=ya,t.DatoGridColumnHeaderMoreMenuComponent=sa,t.DatoGridComponent=jo,t.DatoGridControllerComponent=Ua,t.DatoGridDateFilterOptions=br,t.DatoGridFilterComponent=fa,t.DatoGridFilterOptionsMap=Sr,t.DatoGridGroupsMenuComponent=Qa,t.DatoGridHeaderComponent=Mo,t.DatoGridHeaderV2Component=$a,t.DatoGridInitialsCellComponent=bl,t.DatoGridItemsCellComponent=vl,t.DatoGridModule=tr,t.DatoGridNumberFilterOptions=wr,t.DatoGridOnHoverComponent=za,t.DatoGridPaginationComponent=ko,t.DatoGridPaginationV2Component=Ya,t.DatoGridStatusCellComponent=yl,t.DatoGridStringFilterOptions=Cr,t.DatoGridToolbarComponent=ni,t.DatoGridToolbarItemDirective=No,t.DatoGridToolbarItemElementDirective=Fo,t.DatoGridV2Component=Ka,t.DatoGridV2LoaderComponent=Ur,t.DatoGridV2Module=Ol,t.DatoGridV2NoDataOverlayComponent=Yr,t.DatoGridV2ToolbarButtonComponent=Za,t.DatoGridV2ToolbarComponent=Xa,t.DatoGroupComponent=mi,t.DatoHighlightPipe=to,t.DatoHotkeys=Ha,t.DatoHotkeysDirective=hl,t.DatoHotkeysHelpComponent=Ba,t.DatoHotkeysModule=gl,t.DatoIconButtonComponent=Oo,t.DatoIconButtonModule=Do,t.DatoIconComponent=Le,t.DatoIconModule=Ne,t.DatoInfiniteScrollComponent=Bc,t.DatoInfiniteScrollModule=Uc,t.DatoInputComponent=Cn,t.DatoInputModule=vo,t.DatoInputNumberComponent=ws,t.DatoInputNumberDirective=Cs,t.DatoInputNumberModule=Os,t.DatoKebabCasePipe=no,t.DatoLinkButtonComponent=bo,t.DatoLinkButtonModule=Co,t.DatoListComponent=Yi,t.DatoListModule=Xi,t.DatoListNoDataComponent=Js,t.DatoListNoResultComponent=Xs,t.DatoListV2Component=Zs,t.DatoListV2Module=nl,t.DatoLoaderComponent=Ks,t.DatoLoadersModule=Qs,t.DatoMenuComponent=is,t.DatoMenuContentDirective=os,t.DatoMenuItemDirective=as,t.DatoMenuModule=ls,t.DatoMenuTriggerForDirective=rs,t.DatoMultiOptionComponent=ji,t.DatoMultiOptionV2Component=Ni,t.DatoOperatorTogglerComponent=ps,t.DatoOperatorTogglerModule=us,t.DatoOptionComponent=yi,t.DatoOptionV2Component=Li,t.DatoOptionsModule=Vi,t.DatoOriginDirective=Dn,t.DatoOverlay=Rn,t.DatoPageLoaderComponent=Ws,t.DatoPanel=uc,t.DatoPanelComponent=cc,t.DatoPanelContentComponent=gc,t.DatoPanelFooterComponent=fc,t.DatoPanelHeaderComponent=hc,t.DatoPanelInternalConfig=pc,t.DatoPanelModule=yc,t.DatoPanelRef=dc,t.DatoPillsComponent=Xc,t.DatoPillsModule=tp,t.DatoPipesModule=yo,t.DatoPopover=ra,t.DatoPopoverComponent=na,t.DatoPopoverModule=ns,t.DatoProgressBarComponent=ep,t.DatoProgressBarModule=op,t.DatoRadioComponent=Il,t.DatoRadioModule=El,t.DatoRichTextDirective=Vl,t.DatoRichTextModule=Bl,t.DatoSearchResultsGroupSortPipe=co,t.DatoSearchResultsSortPipe=uo,t.DatoSearchableContainerComponent=oi,t.DatoSearchableDirective=ii,t.DatoSearchableHighlightDirective=Pc,t.DatoSearchableModule=_c,t.DatoSelectActiveDirective=vi,t.DatoSelectComponent=Ai,t.DatoSelectEmptyComponent=Mi,t.DatoSelectModule=Wi,t.DatoSliderComponent=Tt,t.DatoSliderModule=At,t.DatoSnackbar=_l,t.DatoSnackbarComponent=Rl,t.DatoSnackbarModule=Pl,t.DatoSortableComponent=ci,t.DatoSortableHandleDirective=zi,t.DatoSortableModule=Hi,t.DatoStaticImageSrcDirective=Hn,t.DatoStaticImagesSrcModule=Un,t.DatoSubscribeContext=Nn,t.DatoSubscribeDirective=Fn,t.DatoTab=Xl,t.DatoTabContent=Zl,t.DatoTabTitle=Yl,t.DatoTabsModule=ec,t.DatoTabset=Jl,t.DatoTemplatePortal=Pn,t.DatoTextModule=xo,t.DatoThemesModule=On,t.DatoToast=lc,t.DatoToastComponent=oc,t.DatoToastModule=ic,t.DatoTogglerComponent=Fs,t.DatoTogglerModule=Vs,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=Gc,t.GridToolbarService=ei,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=je,t.POPPER_BOUNDARY=As,t.PaletteDirective=Sn,t.PopoverCloseDirective=Ja,t.PopoverContentDirective=ts,t.PopoverRef=oa,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=kl,t.Store=$s,t.SvgRegistry=Me,t.ToolbarConfirmation=Jo,t.ToolbarDeleteConfirmation=ti,t.ToolbarHandler=Xo,t.TranslatePipe=eo,t._valueChanges=pp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=xc,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=_a,t.convertToTreeData=ka,t.copyToClipboard=Vn,t.createComponent=Zr,t.createElement=$t,t.createGUID=Te,t.createHTMLCompletor=Sc,t.curry=ve,t.dateCompare=ke,t.daysOfTheMonth=Ts,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=dl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=qr,t.defaultActions=aa,t.defaultConfig=Al,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=xa,t.defaultGridTreeLabel=Da,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=Ca,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=Br,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 pp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return lp({collection:t,value:e,labelKey:r})}})},t.filterByTerm=lp,t.filterDialogDismissed=function(){return nc(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return nc(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 pp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return cp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=cp,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=pa,t.generateMonths=_s,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=ac,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=Ia,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
615
  /**
616
616
  * @license
617
617
  * Copyright Datorama. All Rights Reserved.
@@ -619,7 +619,7 @@ function sp(t){var e=t.collection,n=t.value,o=t.labelKey,i=(n||"").toLocaleLower
619
619
  * Use of this source code is governed by an Apache License 2.0 license that can be
620
620
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
621
621
  */
622
- function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p.apply(void 0,xt(t))},t.invert=function(t){return V(t)},t.isArrayValuesEqual=he,t.isArrowUpDown=Si,t.isBoolean=Nt,t.isEmpty=kt,t.isEmptyString=function(t){return 0===t.trim().length},t.isEnter=xi,t.isEqual=jt,t.isEscape=Oi,t.isFraction=function(t){if(!_t(t))throw"isFraction expected a number but got "+(null===t?"null":function(t){return"number"==typeof t&&t!=t}(t)?"NaN":typeof t);return t%1!=0},t.isFunction=Rt,t.isMacintosh=ca,t.isNil=Lt,t.isNumber=_t,t.isObject=Pt,t.isRangeCondition=xr,t.isRangeCustom=on,t.isString=Mt,t.isTestEnv=Ii,t.isValidMediaLink=function(t){return Ae.test(t)||Re.test(t)},t.kebabCase=Ie,t.keyBy=function(t,e){return w(t,e)},t.keysSymbols=la,t.last=pe,t.map=function(t,e){return C(t,e)},t.mapKeys=function(t,e){return _(t,e)},t.mapValues=function(t,e){return k(t,e)},t.maxFileSize=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],s=function(t){return Math.ceil(t/1024/1024)};if(s(a.size)>t)return{invalidSize:{currentSize:s(a.size),expected:t}}}return null}return null}},t.merge=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return M.apply(void 0,xt([t],e))},t.minBy=function(t,e){return f(t,e)},t.mockInDev=function(t,e,n){return window.datoDevMode?rp[t]:n.get(e)},t.mocks=rp,t.ngContentResolver=ta,t.noop=ne,t.normalizeData=wi,t.omit=function(t,e){if(!t)throw"No object given";if(!Pt(t))throw"Expected an object but got "+typeof t+" instead";var n=Array.isArray(e);if(!(e=n?e.filter((function(t){return t})):e)||n&&!e.length)throw"No path was given";if(n?e.some((function(t){return"string"!=typeof t})):"string"!=typeof e)throw"Expected a string / string array but got something else";var o=mt({},t);return n?e.reduce((function(t,e){return Se(t,e)}),o):Se(o,e)},t.omitBy=function(t,e){return F(t,e)},t.optionalDebounce=Ve,t.pallete=Va,t.parseDateString=cn,t.partial=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return A.apply(void 0,xt([t],e))},t.polling=
622
+ function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p.apply(void 0,xt(t))},t.invert=function(t){return V(t)},t.isArrayValuesEqual=he,t.isArrowUpDown=Si,t.isBoolean=Nt,t.isEmpty=kt,t.isEmptyString=function(t){return 0===t.trim().length},t.isEnter=xi,t.isEqual=jt,t.isEscape=Oi,t.isFraction=function(t){if(!_t(t))throw"isFraction expected a number but got "+(null===t?"null":function(t){return"number"==typeof t&&t!=t}(t)?"NaN":typeof t);return t%1!=0},t.isFunction=Rt,t.isMacintosh=ca,t.isNil=Lt,t.isNumber=_t,t.isObject=Pt,t.isRangeCondition=xr,t.isRangeCustom=on,t.isString=Mt,t.isTestEnv=Ii,t.isValidMediaLink=function(t){return Ae.test(t)||Re.test(t)},t.kebabCase=Ie,t.keyBy=function(t,e){return w(t,e)},t.keysSymbols=la,t.last=pe,t.map=function(t,e){return C(t,e)},t.mapKeys=function(t,e){return _(t,e)},t.mapValues=function(t,e){return k(t,e)},t.maxFileSize=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],s=function(t){return Math.ceil(t/1024/1024)};if(s(a.size)>t)return{invalidSize:{currentSize:s(a.size),expected:t}}}return null}return null}},t.merge=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return M.apply(void 0,xt([t],e))},t.minBy=function(t,e){return f(t,e)},t.mockInDev=function(t,e,n){return window.datoDevMode?ap[t]:n.get(e)},t.mocks=ap,t.ngContentResolver=ta,t.noop=ne,t.normalizeData=wi,t.omit=function(t,e){if(!t)throw"No object given";if(!Pt(t))throw"Expected an object but got "+typeof t+" instead";var n=Array.isArray(e);if(!(e=n?e.filter((function(t){return t})):e)||n&&!e.length)throw"No path was given";if(n?e.some((function(t){return"string"!=typeof t})):"string"!=typeof e)throw"Expected a string / string array but got something else";var o=mt({},t);return n?e.reduce((function(t,e){return Se(t,e)}),o):Se(o,e)},t.omitBy=function(t,e){return F(t,e)},t.optionalDebounce=Ve,t.pallete=Va,t.parseDateString=cn,t.partial=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return A.apply(void 0,xt([t],e))},t.polling=
623
623
  /**
624
624
  * @license
625
625
  * Copyright Datorama. All Rights Reserved.
@@ -634,5 +634,5 @@ function(t,e,o){if(void 0===o&&(o=1),!_t(e)||!_t(o))throw"period/initialDelay sh
634
634
  *
635
635
  * Use of this source code is governed by an Apache License 2.0 license that can be
636
636
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
637
- */,t.prependChild=Yt,t.publicApi=So,t.query=Ft,t.queryAll=Gt,t.random=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=1),!_t(t))throw"the lower bound is not a number";if(!_t(e))throw"the upper bound is not a number";if(t>e)throw"the upper bound should be grater than the lower bound";return 0===t&&1===e?Math.random():t+Math.floor(Math.random()*(e-t+1))},t.rawDiff=function(t,e){return JSON.stringify(t)!==JSON.stringify(e)},t.reject=function(t,e){return S(t,e)},t.relativeDateTypes=mn,t.removeClass=Wt,t.resolveRange=js,t.round=function(t,e){if(!_t(t))throw"value to round is not a number";if(e&&!_t(e))throw"precision value is not a number";var n=e?Math.pow(10,e):Math.pow(10,2);return Math.round(t*n)/n},t.searchHighlightCellRenderer=Hr,t.searchResultsGroupSort=ao,t.searchResultsSort=po,t.setAttr=zt,t.setAttribute=Qt,t.setDimensions=oe,t.setEmptyFolderClass=Ra,t.setGridConfiguration=function(t){er=mt(mt({},er),t)},t.setGridModel=ir,t.setMaxDimensions=function(t,e,n){oe(t,e,n,"max-")},t.setMinDimensions=ie,t.setStyle=Vt,t.setStyles=Ht,t.size=ye,t.sortBy=function(t,e){return y(t,e)},t.stubs=ap,t.supportedLocales=en,t.tapLog=function(t){return r.tap((function(e){return console.log("%c["+t+": Next]","color: #4CAF50;",e)}),(function(e){return console.log("%c"+t+": Error]","color: #F44336;",e)}),(function(){return console.log("%c["+t+": Complete]","color: #2196F3;")}))},t.tapOnce=qa,t.throttle=function(t,e,n){return T(t,e,n)},t.toBoolean=ge,t.toFormData=function(t,e){var n,o;void 0===e&&(e={});var i=new FormData;try{for(var r=wt(Object.keys(t)),a=r.next();!a.done;a=r.next()){var s=a.value,l=t[s];if(e.multiFileKey&&l instanceof FileList)for(var c=0,p=l.length;c<p;c++)i.append(s+"[]",l[c]);else i.append(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},t.toNumber=fe,t.toResponseBody=function(){return n.pipe(r.filter((function(t){return t.type===ht.HttpEventType.Response})),r.map((function(t){return t.body})))},t.toString=function(t){return t?t.toString():""},t.toggleClass=Kt,t.toolbarActionToContextAction=Lr,t.tryParsePivotValue=pr,t.unescape=function(t){return B(t)},t.union=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return d.apply(void 0,xt(t))},t.uniq=de,t.uniqBy=ue,t.uploadProgress=function(t){return r.tap((function(e){e.type===ht.HttpEventType.UploadProgress&&t(Math.round(100*e.loaded/e.total))}))},t.validBase64Image=Re,t.validUrl=Ae,t.validateCondition=Tr,t.validateDate=ks,t.validateDateCondition=Ir,t.validateFilter=Er,t.validateNumberCondition=Dr,t.validateRange=Ps,t.validateStringCondition=Or,t.values=Ce,t.workerMap=function(t){return function(e){return new n.Observable((function(n){var o=function(t){var e=new Blob(["self.cb = "+t+";self.onmessage = function (e) { self.postMessage(self.cb(e.data)) }"],{type:"text/javascript"}),n=URL.createObjectURL(e);return new Worker(n)}(t);return o.onmessage=function(t){n.next(t.data),o.terminate()},o.onerror=function(t){n.error(t),o.terminate()},e.subscribe({next:function(t){o.postMessage(t)}})}))}},t.zoneStable=En,t.ɵ0=ba,t.ɵ1=wa,t.ɵ2=fn,t.ɵb=Bn,t.ɵc=Po,t.ɵd=An,t.ɵe=fr,t.ɵf=sr,t.ɵg=La,t.ɵh=Bs,t.ɵi=qs,t.ɵj=tl,t.ɵk=Ma,t.ɵl=wl,t.ɵm=ml,t.ɵn=fl,Object.defineProperty(t,"__esModule",{value:!0})}));
637
+ */,t.prependChild=Yt,t.publicApi=So,t.query=Ft,t.queryAll=Gt,t.random=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=1),!_t(t))throw"the lower bound is not a number";if(!_t(e))throw"the upper bound is not a number";if(t>e)throw"the upper bound should be grater than the lower bound";return 0===t&&1===e?Math.random():t+Math.floor(Math.random()*(e-t+1))},t.rawDiff=function(t,e){return JSON.stringify(t)!==JSON.stringify(e)},t.reject=function(t,e){return S(t,e)},t.relativeDateTypes=mn,t.removeClass=Wt,t.resolveRange=js,t.round=function(t,e){if(!_t(t))throw"value to round is not a number";if(e&&!_t(e))throw"precision value is not a number";var n=e?Math.pow(10,e):Math.pow(10,2);return Math.round(t*n)/n},t.searchHighlightCellRenderer=Hr,t.searchResultsGroupSort=ao,t.searchResultsSort=po,t.setAttr=zt,t.setAttribute=Qt,t.setDimensions=oe,t.setEmptyFolderClass=Ra,t.setGridConfiguration=function(t){er=mt(mt({},er),t)},t.setGridModel=ir,t.setMaxDimensions=function(t,e,n){oe(t,e,n,"max-")},t.setMinDimensions=ie,t.setStyle=Vt,t.setStyles=Ht,t.size=ye,t.sortBy=function(t,e){return y(t,e)},t.stubs=sp,t.supportedLocales=en,t.tapLog=function(t){return r.tap((function(e){return console.log("%c["+t+": Next]","color: #4CAF50;",e)}),(function(e){return console.log("%c"+t+": Error]","color: #F44336;",e)}),(function(){return console.log("%c["+t+": Complete]","color: #2196F3;")}))},t.tapOnce=qa,t.throttle=function(t,e,n){return T(t,e,n)},t.toBoolean=ge,t.toFormData=function(t,e){var n,o;void 0===e&&(e={});var i=new FormData;try{for(var r=wt(Object.keys(t)),a=r.next();!a.done;a=r.next()){var s=a.value,l=t[s];if(e.multiFileKey&&l instanceof FileList)for(var c=0,p=l.length;c<p;c++)i.append(s+"[]",l[c]);else i.append(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return i},t.toNumber=fe,t.toResponseBody=function(){return n.pipe(r.filter((function(t){return t.type===ht.HttpEventType.Response})),r.map((function(t){return t.body})))},t.toString=function(t){return t?t.toString():""},t.toggleClass=Kt,t.toolbarActionToContextAction=Lr,t.tryParsePivotValue=pr,t.unescape=function(t){return B(t)},t.union=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return d.apply(void 0,xt(t))},t.uniq=de,t.uniqBy=ue,t.uploadProgress=function(t){return r.tap((function(e){e.type===ht.HttpEventType.UploadProgress&&t(Math.round(100*e.loaded/e.total))}))},t.validBase64Image=Re,t.validUrl=Ae,t.validateCondition=Tr,t.validateDate=ks,t.validateDateCondition=Ir,t.validateFilter=Er,t.validateNumberCondition=Dr,t.validateRange=Ps,t.validateStringCondition=Or,t.values=Ce,t.workerMap=function(t){return function(e){return new n.Observable((function(n){var o=function(t){var e=new Blob(["self.cb = "+t+";self.onmessage = function (e) { self.postMessage(self.cb(e.data)) }"],{type:"text/javascript"}),n=URL.createObjectURL(e);return new Worker(n)}(t);return o.onmessage=function(t){n.next(t.data),o.terminate()},o.onerror=function(t){n.error(t),o.terminate()},e.subscribe({next:function(t){o.postMessage(t)}})}))}},t.zoneStable=En,t.ɵ0=ba,t.ɵ1=wa,t.ɵ2=fn,t.ɵb=Bn,t.ɵc=Po,t.ɵd=An,t.ɵe=fr,t.ɵf=sr,t.ɵg=La,t.ɵh=Bs,t.ɵi=qs,t.ɵj=tl,t.ɵk=Ma,t.ɵl=wl,t.ɵm=ml,t.ɵn=fl,t.ɵo=Fl,Object.defineProperty(t,"__esModule",{value:!0})}));
638
638
  //# sourceMappingURL=datorama-core.umd.min.js.map