@datorama/core 23.0.4-rc.2 → 23.0.4-rc.4

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.
@@ -316,7 +316,7 @@ var ea,na=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
316
316
  *
317
317
  * Use of this source code is governed by an Apache License 2.0 license that can be
318
318
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
319
- */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.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.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]="headerName"\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&&Aa(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 Aa(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=Ra(Ta.id);i&&i.classList.remove("ag-row-hover"),Ta=null}else Ta=e;if(e){var r=Ra(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&&Aa(t,o)}}));var h=Ra(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},Ii()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),Oa={CLIENT:200,SERVER:250},Da={idKey:"id",parentIDKey:"parentID"},Ia="agGridFilePath";var Ta=null,Ea=!1;function Ra(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function Aa(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;return e.gridOptions.saveSettings=!1!==a&&!Lt(s),this.initOnRowSelectedForServerSidePagination(e),e.gridOptions.pivotMode&&(this.initPivotSecondaryColsProcess(e),e.gridOptions.enableV2_1=!0,e.gridOptions.saveSettings=!1),e.gridOptions},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 At(o.editable)&&o.editable(t)||!At(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])}}},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(At(t.editable)){var n=t.cellClass;t.cellClass=function(o){if(t.editable(o)){var i=e.addEditableCellClass(n);return At(i)?i(o):i}return At(n)?n(o):n}}else t.cellClass=e.addEditableCellClass(t.cellClass)}))},o.prototype.wrapContextMenuBuilder=function(t){var e=this,n=t.gridOptions.customContextMenu,o=At(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=Rr(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":At(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.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){At(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=Rr(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.tooltip&&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(r.filter((function(t){var n=t.node,o=t.column;return e!==n.id+"-"+o.getColId()})),i.untilDestroyed(this)).subscribe((function(t){e=t.node.id+"-"+t.column.getColId(),o.showTooltip(t);var n=t.event.target.parentElement;if(c&&(!1===t.node.group||Lt(t.node.group))&&o.lastHoveredRow!==n){var i=o.lastHoveredRow;o.lastHoveredRow=n,o.toggleRowHoverClass([i,o.lastHoveredRow]),o.setOnHoverState(!0,t)}})),n.merge(n.fromEvent(s,"scroll"),n.fromEvent(this.agGridEl,"mouseleave"),t.cellMouseOut).pipe(r.filter((function(){return!Lt(o.tooltip)})),i.untilDestroyed(this)).subscribe((function(){o.clearTooltip()}))},t.prototype.clearTooltip=function(){this.tooltip.dispose(),this.tooltip=null},t.prototype.showTooltip=function(t){var e=t.event.target;if(e.offsetWidth<e.scrollWidth){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,"isPivotMode",{get:function(){return!!this.gridOptions&&this.gridOptions.pivotMode},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-mode]="isPivotMode">\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)}();
319
+ */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.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.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]="headerName"\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&&Aa(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 Aa(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=Ra(Ta.id);i&&i.classList.remove("ag-row-hover"),Ta=null}else Ta=e;if(e){var r=Ra(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&&Aa(t,o)}}));var h=Ra(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},Ii()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),Oa={CLIENT:200,SERVER:250},Da={idKey:"id",parentIDKey:"parentID"},Ia="agGridFilePath";var Ta=null,Ea=!1;function Ra(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function Aa(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;return e.gridOptions.saveSettings=!1!==a&&!Lt(s),this.initOnRowSelectedForServerSidePagination(e),e.gridOptions.pivotMode&&(this.initPivotSecondaryColsProcess(e),e.gridOptions.enableV2_1=!0,e.gridOptions.saveSettings=!1),e.gridOptions},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 At(o.editable)&&o.editable(t)||!At(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])}}},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(At(t.editable)){var n=t.cellClass;t.cellClass=function(o){if(t.editable(o)){var i=e.addEditableCellClass(n);return At(i)?i(o):i}return At(n)?n(o):n}}else t.cellClass=e.addEditableCellClass(t.cellClass)}))},o.prototype.wrapContextMenuBuilder=function(t){var e=this,n=t.gridOptions.customContextMenu,o=At(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=Rr(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":At(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.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){At(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=Rr(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,"isPivotMode",{get:function(){return!!this.gridOptions&&this.gridOptions.pivotMode},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-mode]="isPivotMode">\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)}();
320
320
  /**
321
321
  * @license
322
322
  * Copyright Datorama. All Rights Reserved.