@datorama/core 22.12.5-beta.2 → 22.12.6

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.
@@ -323,7 +323,7 @@ var oa,ia=function(){function t(t){this.host=t}return t.prototype.ngOnInit=funct
323
323
  *
324
324
  * Use of this source code is governed by an Apache License 2.0 license that can be
325
325
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
326
- */var ha,ga=function(t){return t.value},fa=function(t){return{id:t,label:Lt(t)?"(Empty)":(""+t).trim(),value:t}},ma=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}},ya=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=ua(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=dr(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=Or[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||Sr;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(fa);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 ma(t,!Lt(n.pivotColumn)&&n.colField)}))}}else{var S=C;this.columnValues=S.map(ga),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)&&Ar({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 Dr(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"),i=o.value;e&&"string"==typeof i?o.patchValue({from:i,to:i,id:"CUSTOM"}):!e&&i&&"object"==typeof i&&o.patchValue(i.from)},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(fa),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:ra},{type:o.FormBuilder},{type:jn},{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,ra,o.FormBuilder,jn,e.ChangeDetectorRef])],a)}(),va=function(){function t(t){this.popover=t}return t.prototype.openMoreMenu=function(t,e,n){return void 0===n&&(n=ca),this.openMenu({tpl:n,origin:t,params:e,menuType:"more"})},t.prototype.openFilterMenu=function(t,e,n){return void 0===n&&(n=ya),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:sa}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(sa))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[sa])],t)}(),ba=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=dr(a),this.headerTooltip=this.getHeaderTooltip(a),this.context={api:{grid:e.api,columns:e.columnApi},column:this.column};var s=this.params,l=s.gridQuery,c=s.gridService;this.customTemplates=c.getCustomHeader(this.field),this.filterActive$=l.select((function(t){return t.settings.filter[o.field]})).pipe(r.map((function(t){var e=t&&he(t.pivotKeys,a.pivotKeys);return ye(t)>0&&e}))),this.params.enableSorting&&(n.fromEvent(this.host.nativeElement,"click").pipe(i.untilDestroyed(this)).subscribe((function(){var t,e=o.column.getColDef()?o.column.getColDef().sortingOrder:null,n=o.column.getSort(),i=o.column.getColId();if(e&&e.length>0){var r=e.indexOf(n);t=e[-1===r||r===e.length-1?0:r+1]}else t="asc"!==n?"asc":"desc";c._logEvent("Grids - Column Action",{action:"Sort",column:i}),l.isServerSide&&c.setLoading(!0),l.getGridOptions().sortByStore?c.setSortByColumn(i,t):o.params.setSort(t)})),this.sortingInfo$=l.waitForGrid((function(){return l.gridRef.sortChanged})).pipe(r.startWith({}),r.map((function(){return{active:o.column.isSorting(),icon:!o.column.isSorting()||o.column.isSortAscending()?"sort-ascending":"sort-descending"}}))))},o.prototype.openFilters=function(t){var e=this;this.filtersMenuOpen=!0,this.controller.openFilterMenu(t.host.nativeElement,this.params).pipe(i.untilDestroyed(this)).subscribe((function(){e.filtersMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.openMoreMenu=function(t){var e=this;this.moreMenuOpen=!0,this.controller.openMoreMenu(t.host.nativeElement,this.params,this.customTemplates.moreMenu).pipe(i.untilDestroyed(this)).subscribe((function(){e.moreMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.ngOnDestroy=function(){},o.prototype.getHeaderTooltip=function(t){if(this.params){var e=t;if(e.showRowGroup){var n=this.params.columnApi.getRowGroupColumns(),o=n&&n.find((function(t){return t.getColId()===e.showRowGroup})),i=o&&o.getColDef();e=i||e}return e.customHeaderTooltip||e.headerName}return""},o.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:va},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},o=vt([e.Component({selector:"dato-grid-column-header",template:'<div class="d-flex align-start-center" [attr.data-auto-id]="field + \'-column-header\'" [attr.data-field]="field">\n <ng-container *ngIf="customTemplates && customTemplates.customHeader as customHeader">\n <div class="mr-5" [attr.data-auto-id]="field + \'-dynamic-section\'">\n <ng-container *ngTemplateOutlet="customHeader; context: context"></ng-container>\n </div>\n </ng-container>\n <div class="d-flex d-flex-grow align-start-center min-width-0 items-center">\n <span class="dato-simple-bold primary-400-color ellipsis min-width-0 mr-5" [datoTooltip]="headerTooltip"\n datoTooltipPosition="bottom">{{headerName}}</span>\n <div>\n <dato-icon class="primary-300-color" *ngIf="headerInfo" [datoTooltip]="headerInfo" datoTooltipPosition="bottom" datoIcon="question"></dato-icon>\n </div>\n </div>\n <div class="sort-icon opacity-0" *ngIf="params.enableSorting && (sortingInfo$ | async) as sortingInfo"\n [class.active]="sortingInfo.active">\n <dato-icon width="24px" height="16px" class="primary-300-color"\n [attr.data-auto-id]="field + \'-sort\'"\n [icon]="sortingInfo.icon"></dato-icon>\n </div>\n <ng-container *ngIf="showFilter">\n <div class="filter relative" *datoSubscribe="filterActive$ as filterActive">\n <dato-icon-button (click.stop)="openFilters(filters)" datoTooltip="core.filters" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-filter\'" class="filter-icon opacity-0"\n [class.active]="filtersMenuOpen || filterActive"\n datoSize="md" icon="filter"\n #filters></dato-icon-button>\n <div [class.opacity-100]="filterActive"\n class="opacity-0 filter-active-circle accent-400-background-color absolute"></div>\n </div>\n </ng-container>\n <dato-icon-button *ngIf="showMoreMenu" (click.stop)="openMoreMenu(moreMenu)" datoTooltip="core.more-options" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-more-menu\'" [class.active]="moreMenuOpen"\n datoSize="md" icon="more-vertical" #moreMenu></dato-icon-button>\n</div>\n',styles:[":host .filter-icon,:host .sort-icon{transition:opacity .25s linear,width .25s ease-in-out;width:0}:host .sort-icon{height:16px}:host .filter-icon.active,:host .sort-icon.active{opacity:1;width:24px}:host:hover .filter-icon,:host:hover .sort-icon{opacity:1;width:24px}:host .filter-active-circle{pointer-events:none;transition:opacity .2s ease-in-out;position:absolute;height:8px;width:8px;top:2px;right:2px;border-radius:4px;border:1px solid #fff}:host ::ng-deep .filter dato-icon-button dato-icon{transition:color .2s ease-in-out}"]}),Ct("design:paramtypes",[e.ViewContainerRef,va,e.ElementRef,e.ChangeDetectorRef])],o)}();function Ca(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}var wa=function(t){return t[Ea]},Sa={getDataPath:wa,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&&ka(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 ka(t),'<span class="entity-display-name dato-simple-bold">'+c+"</span>";if(s){var d=Re(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(Ra){if(Ra.id===e.id)return;var i=Pa(Ra.id);i&&i.classList.remove("ag-row-hover"),Ra=null}else Ra=e;if(e){var r=Pa(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[Ea]:[],l=!jt(s,r[Ea]),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[Ea]=s,o.push(r),ye(a)>0&&a.forEach((function(e){t(xt(s,[r[i]]),e,o,i)}));r[Ea].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&&ka(t,o)}}));var h=Pa(Ra.id);h&&h.classList.remove("ag-row-hover"),Ra=null,this.api.clearFocusedCell()}var g,f},onRowSelected:function(t){if(Aa)return;Aa=!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;)_a(e),e=e.parent}(t.node),setTimeout((function(){Aa=!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>'}},xa=function(t,e){return(t||"").toLowerCase().localeCompare((e||"").toLowerCase())},Oa={filter:t.DatoGridFilterTypes.String,comparator:xa},Da=mt({hoverConfig:{enabled:!0,maxDisplayedItems:3},enableV2_1:!1,enableSearch:!1,enableSearchHighlight:!0,columnsIncludedInSearchByDefault:!0,includeHiddenColumnsInSearch:!1,enableAllPagesSelection:!0,idColumnKey:"id",enableBackground:!0,columnTypes:(ha={},ha[t.DatoGridColumnTypes.Date]={filter:t.DatoGridFilterTypes.Date,comparator:function(t,e){return Ca(t)-Ca(e)}},ha[t.DatoGridColumnTypes.Number]={filter:t.DatoGridFilterTypes.Number},ha[t.DatoGridColumnTypes.String]=Oa,ha[t.DatoGridColumnTypes.Status]=mt(mt({},Oa),{cellRenderer:"DatoGridStatusCellComponent"}),ha[t.DatoGridColumnTypes.Items]=mt(mt({},Oa),{cellRenderer:"DatoGridItemsCellComponent"}),ha[t.DatoGridColumnTypes.ItemsCount]=mt(mt({},Oa),{cellRenderer:"DatoGridItemsCountCellComponent"}),ha[t.DatoGridColumnTypes.Initials]=mt(mt({},Oa),{cellRenderer:"DatoGridInitialsCellComponent"}),ha[t.DatoGridColumnTypes.Avatar]=mt(mt({},Oa),{cellRenderer:"DatoGridAvatarCellComponent"}),ha),multiSortKey:"ctrl",suppressPaginationPanel:!0,pagination:!0,deltaColumnMode:!0,loadingOverlayComponentFramework:Wr,noRowsOverlayComponentFramework:Xr,defaultColDef:{minWidth:t.GridMinWidths.Default,sortable:!0,resizable:!0,type:t.DatoGridColumnTypes.String,menuTabs:["filterMenuTab"],headerComponentFramework:ba},suppressCellSelection:!0,suppressPropertyNamesCheck:!0,rowHeight:35,headerHeight:30,rowSelection:t.GridRowSelectionType.MULTIPLE,rowDeselection:!0,unSortIcon:!0,animateRows:!0,rememberGroupStateWhenNewData:!0,groupMultiAutoColumn:!0,groupDefaultExpanded:-1,usePivotGridStyle:!1},Ei()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),Ia={CLIENT:200,SERVER:250},Ta={idKey:"id",parentIDKey:"parentID"},Ea="agGridFilePath";var Ra=null,Aa=!1;function Pa(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function ka(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 _a(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 ja(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={})[Ea]=i(t,!0),e)):mt(mt({},t),((r={})[Ea]=[t[o]],r))}))}function Ma(t,e){return t.map((function(t){var n,o=yt(t,[]),i=o[Ea],r=ye(i)>1?i[i.length-2]:0;return delete o[Ea],mt(mt({},o),((n={})[e.parentIDKey]=r,n))}))}var La=new e.InjectionToken("DATO_CORE_LOGGER"),Na=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:Fa},{type:yr},{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",[Fa,yr,e.ChangeDetectorRef])],t)}(),Fa=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=Ta,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:Zr(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({},Ta),n);var i=ja(t,o.treeConfig);o.api.grid.setRowData(i)}else o.isPivotMode?o.setPivotModeRows(t):o.api.grid.setRowData(t);e?o.fitGrid("container"):Je()}))},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 Ro("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&&Da.enableSearchHighlight),e.gridOptions.columnDefs=this.normalizeColumns(e.gridOptions.columnDefs,e.gridOptions),e.gridOptions.isExternalFilterPresent=function(){return!0},e.gridOptions.doesExternalFilterPass=function(t){return Ar({row:t,api:n.gridQuery.api.grid},n.gridQuery.getFilter())&&n.rowMatchesSearch(t)},this.isServerSidePagination(e.gridOptions)){e.gridOptions.blockLoadDebounceMillis=300,this._originalGetRows=e.gridOptions.datasource.getRows,e.gridOptions.datasource.getRows=this.wrapGetRows(e.gridOptions);var i=e.gridOptions.paginationPageSize;i&&(e.gridOptions.cacheBlockSize=i)}this.initEditableColumnsCellClass(e),e.gridOptions.getContextMenuItems=this.wrapContextMenuBuilder(e);var r=e.gridOptions,a=r.saveSettings,s=r.gridName;if(e.gridOptions.saveSettings=!1!==a&&!Lt(s),this.initOnRowSelectedForServerSidePagination(e),e.gridOptions.pivotMode&&(this.initPivotSecondaryColsProcess(e),e.gridOptions.saveSettings=!1),e.gridOptions.usePivotGridStyle){e.gridOptions.rowHeight=30,e.gridOptions.defaultColDef=mt(mt({},e.gridOptions.defaultColDef),{cellClassRules:this.getCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this),cellStyle:function(e){var n={lineHeight:"30px"};return e.colDef.type===t.DatoGridColumnTypes.Number&&(n.textAlign="end"),n}}),e.gridOptions.autoGroupColumnDef=mt(mt({},e.gridOptions.autoGroupColumnDef),{cellClassRules:this.getCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this)})}return e.gridOptions},o.prototype.getPivotHeaderClass=function(t){var e=t.colDef.headerComponentParams.gridQuery,n="";if(e&&e.api){var o=e.api.columns.getSecondaryColumns();o&&o.length>0&&(n+="top-border")}return n},o.prototype.getPivotCellClass=function(t){var e=t.node,n=e.leafGroup,o=e.childIndex,i=e.rowGroupIndex,r=t.colDef.headerComponentParams.gridQuery,a="";if(r&&r.api){var s=r.api.columns,l=s.getAllColumns().find((function(e){var n=t.colDef,o=n.showRowGroup,i=n.pivotValueColumn,r=n.colId,a=i&&i.getColId(),s=o||a||r;return e.getColId()===s})),c=s.getAllDisplayedColumns(),p=c.find((function(e){return e.getColId()===t.colDef.colId})),d=c.indexOf(p),u=l.getColDef().cellClass;u&&"string"==typeof u&&(a+=u+" "),i<=d&&(n?o%2==0&&(a+="primary-0-background-color"):a+="primary-100-background-color pointer dato-simple-bold")}return a},o.prototype.normalizeColumns=function(e,n){var o=this;void 0===n&&(n=null),n||(n=this.gridQuery.getGridOptions());var i=e.map((function(e){var i=mt(mt({},e),{headerName:o.translate.transform(e.headerName)});return e.info&&(i.minWidth=e.minWidth||t.GridMinWidths.With_Info),e.colId||(i.colId=e.field),i.type!==t.DatoGridColumnTypes.Items||i.filtersConfig||(i.filtersConfig={sections:t.DatoGridFilterSections.Conditional}),o.normalizeColumnSearchConfig(n,e,i),i}));return this.addMultiSelectHeaderColumnIfRequired(i,n)},o.prototype.normalizeColumnSearchConfig=function(e,n,o){var i=this,r=this.isServerSidePagination(e);void 0===n.includeInSearch&&(r&&n.type===t.DatoGridColumnTypes.Date?o.includeInSearch=!1:o.includeInSearch=void 0!==e.columnsIncludedInSearchByDefault?e.columnsIncludedInSearchByDefault:Da.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?Ur(t,i.gridQuery.getSearchTerm()):Kr(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(Da)},o.prototype.addMultiSelectHeaderColumnIfRequired=function(e,n){var o=n&&n.showMultiSelectionCheckboxes,i=n&&n.rowSelection?n.rowSelection:Da.rowSelection;return o&&i===t.GridRowSelectionType.MULTIPLE?xt([{colId:this.CHECKBOX_SELECTION_COL_ID,checkboxSelection:!0,headerComponentFramework:Na,width:30,maxWidth:30,suppressSizeToFit:!0,cellClass:"checkbox-selection-cell",headerClass:"header-checkbox-selection-cell",resizable:!1,pinned:"left",lockPosition:!0,includeInSearch:!1}],e):e},o.prototype.initOnRowSelectedForServerSidePagination=function(t){var e=this,n=t.gridOptions;if(this.isServerSidePagination(n)){var o=n.onRowSelected;n.onRowSelected=function(t){if(e.gridQuery.isServerSelectAllRowsEnabled){var n=t.node,i=n.isSelected(),r=e.gridQuery.serverSideConfig.excludedFromSelectAll,a=r.includes(n.id);i&&a?e.setServerSidePagination({excludedFromSelectAll:r.filter((function(t){return t!==n.id}))}):i||a||e.setServerSidePagination({excludedFromSelectAll:xt(r,[n.id])})}o&&o(t)}}},o.prototype.rowMatchesSearch=function(t){var e,n,o=(this.gridQuery.getSearchTerm()||"").toLowerCase().trim();if(kt(o))return!0;var i=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch?this.gridQuery.getAllColumns():this.gridQuery.getAllDisplayedColumns();try{for(var r=wt(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(this.api.grid.getColumnDef(s.getColId()).includeInSearch)if((this.api.grid.getValue(s.getColId(),t)||"").toString().toLowerCase().includes(o))return!0}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!1},o.prototype.fitToContainer=function(){this.api.grid.sizeColumnsToFit()},o.prototype.getCustomHeader=function(t){if(this.customHeadersTemplates){var e=this.customHeadersTemplates.find((function(e){return e.column===t})),n=this.customHeadersTemplates.find((function(t){return!t.column}));if(e||n){var o={moreMenu:e&&e.moreMenu||n&&n.moreMenu,customHeader:e&&e.customHeader||n&&n.customHeader},i=o.moreMenu,r=o.customHeader;return{moreMenu:i&&i.tpl,customHeader:r&&r.tpl}}}return{}},o.prototype.clearAllFilters=function(){this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:{},searchTerm:null})}})),this.notifyFilterUpdate()},o.prototype.clearColumnFilter=function(t){var e=this.gridQuery.getFilter(),n=t,o=(e[n],yt(e,["symbol"==typeof n?n:n+""]));this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:o})}})),this.notifyFilterUpdate()},o.prototype.setColumnFilter=function(t,e,n){void 0===n&&(n=!0),this._logEvent("Grids - Filter Applied",{column:t.getColId(),numOfConditions:e.conditional&&e.conditional.conditions.length||0,byValue:e.byValue?"Yes":"No"}),this.updateFilter(t,e),n&&this.notifyFilterUpdate()},o.prototype.setGridFilters=function(t){var e,n;if(this.api&&t){var o={};try{for(var i=wt(t),r=i.next();!r.done;r=i.next()){var a=r.value,s=a.filter;o[a.field]=s}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.updateSettings({filter:o}),this.notifyFilterUpdate()}},o.prototype.setSortByColumn=function(t,e){var n=this.gridQuery.getSort({colId:t,sort:e});this.setGridSort(n)},o.prototype.setGridSort=function(t){if(t&&this.api&&this.api.grid.getDisplayedRowCount()>0){var e=t.colId,n=t.sort,o=t.sortIndex,i=this.api.columns.getAllGridColumns();if(i){var r=t,a=i.find((function(t){return(t.getColDef().showRowGroup||t.getColId())===e}));if(a)r={colId:a.getColId(),sort:n};else if(!Lt(o)){var s=this.api.columns.getValueColumns().find((function(t){return t.getColId()===e}));if(e.startsWith("pivot")||s)r={colId:i[o].getColId(),sort:n,sortIndex:o}}this.updateSettings({sort:r}),this.api.grid.setSortModel([r]),this.gridRef.gridOptions.usePivotGridStyle&&this.api.grid.redrawRows()}}},o.prototype.updateFilter=function(t,e){var n=dr(t.getColDef());this.store.update((function(t){var o;return{settings:mt(mt({},t.settings),{filter:mt(mt({},t.settings.filter),(o={},o[n]=e,o))})}}))},o.prototype.setSearchTerm=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),{searchTerm:t})}})),this.notifyFilterUpdate()},o.prototype.setServerSidePagination=function(t){this.store.update((function(e){return{serverSidePagination:mt(mt({},e.serverSidePagination),t)}}))},o.prototype.setLoading=function(t){t?this.api.grid.showLoadingOverlay():0===this.api.grid.getDisplayedRowCount()?this.setOverlay(!0):this.setOverlay(!1)},o.prototype.setNoData=function(t){this.setOverlay(t)},o.prototype.setOverlay=function(t){t?this.api.grid.showNoRowsOverlay():this.api.grid.hideOverlay()},o.prototype.updateSettings=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),t)}}))},o.prototype.fitGrid=function(t){"container"===t?this.api.grid.sizeColumnsToFit():this.api.columns.autoSizeAllColumns();var e="container"===t?0:1;this.updateSettings({gridAlignment:e,columnsSizes:null})},o.prototype.saveSettingsToServer=function(t){this.storageAPI.set(this.gridName,t)},o.prototype._logEvent=function(t,e){this.logger.logEvent(t,mt({table:this.gridName},e))},o.prototype.wrapSuccessCallback=function(t){var e=this,n=t.successCb,o=t.pageNumber,i=t.isPendingReturnToPage;return function(t,r){e.setServerSidePagination({totalRows:r,hasError:!1}),n(t,r),e.gridQuery._serverDataLoaded.next({api:e.api.grid,columnApi:e.api.columns,type:"ServerDataLoaded",paginationPage:o}),i||(e.setLoading(!1),Je()),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;zn(i?i(o):o)},n.isSelected()&&(c=ye(l=e.gridQuery.getSelectedRowNodes())));var p=Pr(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)),Fr({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 Se(this.gridQuery.getCurrentGridSettings(),this.initialSettings)},o.prototype.resetTableSettings=function(){var t=this.initialSettings,e=t.filter,n=yt(t,["filter"]),o=pr(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.resolveRowActionsVisibility=function(){this.gridQuery._rowActionVisibilityChanged.next()},o.prototype.initPivotSecondaryColsProcess=function(t){var e=this,n=t.gridOptions;n.processSecondaryColDef=function(t){var e=t.pivotValueColumn&&t.pivotValueColumn.getUserProvidedColDef();e&&(t.filter=e.filter),t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=ur(t);return e&&e.value||""})))},n.processSecondaryColGroupDef=function(t){if(t.headerName){var n=ur(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=ur(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.prototype.getCellClassRules=function(){return{"primary-0-background-color":this.isLeafGroupEvenCell.bind(this),"primary-100-background-color pointer dato-simple-bold":this.isRowGroupValuedCell.bind(this)}},o.prototype.isLeafGroupEvenCell=function(t){var e=t.node,n=e.leafGroup,o=e.childIndex,i=e.rowGroupIndex,r=this.getCellClassRuleColIndex(t);return!Lt(r)&&i<=r&&n&&o%2==0},o.prototype.isRowGroupValuedCell=function(t){var e=t.node,n=e.leafGroup,o=e.rowGroupIndex,i=this.getCellClassRuleColIndex(t);return!Lt(i)&&o<=i&&!n},o.prototype.getCellClassRuleColIndex=function(t){var e=t.colDef.headerComponentParams.gridQuery;if(e&&e.api){var n=e.api.columns.getAllDisplayedColumns(),o=n.find((function(e){return e.getColId()===t.colDef.colId}));return n.indexOf(o)}return null},o.ctorParameters=function(){return[{type:cr},{type:yr},{type:jn},{type:Me},{type:Le},{type:void 0,decorators:[{type:e.Inject,args:[Hr]}]},{type:void 0,decorators:[{type:e.Inject,args:[La]}]}]},o=vt([e.Injectable(),bt(5,e.Inject(Hr)),bt(6,e.Inject(La)),Ct("design:paramtypes",[cr,yr,jn,Me,Le,Object,Object])],o)}(),Ga=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)}(),Va=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)}(),za=function(){function t(){}return vt([e.Input(),Ct("design:type",String)],t.prototype,"column",void 0),vt([e.ContentChild(Ga),Ct("design:type",Object)],t.prototype,"customHeader",void 0),vt([e.ContentChild(Va),Ct("design:type",Object)],t.prototype,"moreMenu",void 0),t=vt([e.Component({selector:"dato-custom-header-template",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Ba={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"}},Ha=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=Pr(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=Ba.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:Fa},{type:yr},{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,Fa,yr,e.ChangeDetectorRef])],t)}(),Ua=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:ua(o),description:n}),t}),[])},t.ctorParameters=function(){return[{type:Wo}]},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",[Wo])],t)}(),Ka=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===da()&&(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(Ua,{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:Jo}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(ut.EventManager),e.ɵɵinject(s.DOCUMENT),e.ɵɵinject(Jo))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[ut.EventManager,Object,Jo])],o)}(),Wa=function(){function t(t,o,i,r,a,s,l,c,p,d){this.gridService=t,this.gridQuery=o,this.cdr=i,this.iconRegistry=r,this.translate=a,this.host=s,this.injector=l,this.resolver=c,this.hotkeys=p,this.storageAPI=d,this.onGridChange=new e.EventEmitter,this.rowActions=[],this.gridActions=[],this.contentInit=new n.Subject,this.gridReady$=this.gridQuery.gridReady$,this.gridElements={centerViewport:null,centerContainer:null,bodyViewport:null},this.treeGridClass="tree"}return Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this._gridOptions},set:function(t){this._gridOptions=t,this.gridService.treeData=t.treeData,this.gridService.isPivotMode=t.pivotMode,this.agGridEl&&(t.treeData?!this.agGridEl.classList.contains(this.treeGridClass)&&this.agGridEl.classList.add(this.treeGridClass):t.enableV2_1||this.agGridEl.classList.add(this.treeGridClass))},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.contentInit.complete(),this.clearTooltip(),this.rowHoverComponent&&this.rowHoverComponent.destroy(),this.rowHoverComponent=null},t.prototype.ngAfterContentInit=function(){this.contentInit.next(),this.contentInit.complete()},t.prototype._initializeGrid=function(t,e){var o=this;this.agGridEl=e,this.contentInit.asObservable().pipe(r.switchMap((function(){o.gridOptions=o.normalizeOptions(),t.gridOptions=o.gridOptions;var e=!1===o.gridOptions.saveSettings?n.of(null):o.storageAPI.get(o.gridOptions.gridName);return n.combineLatest([t.gridReady,e])})),i.untilDestroyed(this)).subscribe((function(n){var i=St(n,2),r=i[0],a=r.api,s=r.columnApi,l=i[1],c=void 0===l?{}:l;(o.gridOptions.rowData||a.showLoadingOverlay(),o.gridOptions.statusBar)||Ut(e.querySelector(".ag-status-bar"),"ag-hidden");var p={grid:a,columns:s};o.gridService._setApi(p,t),o.gridQuery._setApi(p,t),o.gridService.initSettings(c||{}),o.registerSettingsListeners(p,t),o.registerGridListeners(p,t),o.registerEventsTriggeringClearSelectedRows(t),o.registerPaginationChanged(t),o.gridQuery._gridReady.next(!0),o.gridOptions.treeData&&o.agGridEl.classList.add("tree"),o.gridOptions.rowHeight&&o.agGridEl.classList.add("row-height-"+o.gridOptions.rowHeight)}))},t.prototype.normalizeOptions=function(){this.gridOptions.treeData&&(this.gridOptions=mt(mt({},this.gridOptions),{pagination:!1}));var t={gridOptions:this.gridOptions,customHeadersTemplates:this.customHeadersTemplates,rowActions:this.rowActions},e=this.gridService.normalizeOptions(t);return Zr(mt(mt(mt({},Da),this.gridOptions.treeData?Sa:{}),{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=pr(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=Jr({component:Ha,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?Ma(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:Fa},{type:yr},{type:e.ChangeDetectorRef},{type:Me},{type:jn},{type:e.ElementRef},{type:e.Injector},{type:e.ComponentFactoryResolver},{type:Ka},{type:void 0,decorators:[{type:e.Inject,args:[Hr]}]}]},vt([e.ContentChildren(za),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:[yr,Fa,cr],styles:[":host{display:flex;flex-direction:column;flex-grow:1}"]}),bt(9,e.Inject(Hr)),Ct("design:paramtypes",[Fa,yr,e.ChangeDetectorRef,Me,jn,e.ElementRef,e.Injector,e.ComponentFactoryResolver,Ka,Object])],t)}(),Qa=function(){function t(t,e){this.controller=t,this.host=e}return Object.defineProperty(t.prototype,"grid",{set:function(t){var e=Ft("ag-grid-angular",this.host.nativeElement);this.controller._initializeGrid(t,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this.controller?this.controller.gridOptions:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableBackground",{get:function(){return!!this.gridOptions&&this.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableV2_1",{get:function(){return!!this.gridOptions&&this.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPivotStyle",{get:function(){return this.gridOptions&&this.gridOptions.usePivotGridStyle},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:Wa},{type:e.ElementRef}]},vt([e.ViewChild(st.AgGridNg2,{static:!0}),Ct("design:type",st.AgGridNg2),Ct("design:paramtypes",[st.AgGridNg2])],t.prototype,"grid",null),t=vt([e.Component({selector:"dato-grid-v2",template:'<ag-grid-angular data-auto-id="grid" class="dato-grid ag-theme-material" [class.has-background]="enableBackground" [class.enable-v2_1]="enableV2_1"\n [class.with-multi-selection-col]="gridOptions?.showMultiSelectionCheckboxes" [class.pivot-style]="isPivotStyle">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]="enableBackground"></dato-grid-pagination-v2>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-icon-checkbox-indeterminate:before{text-align:center;content:'-';display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}dato-grid-v2 .ag-overlay-wrapper ng-component{display:flex}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}"]}),Ct("design:paramtypes",[Wa,e.ElementRef])],t)}(),$a=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:ra}]},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",[ra])],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:ra}]},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",[ra])],t)}(),Ya=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:Wa},{type:yr}]},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",[Wa,yr])],t)}();
326
+ */var ha,ga=function(t){return t.value},fa=function(t){return{id:t,label:Lt(t)?"(Empty)":(""+t).trim(),value:t}},ma=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}},ya=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=ua(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=dr(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=Or[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||Sr;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(fa);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 ma(t,!Lt(n.pivotColumn)&&n.colField)}))}}else{var S=C;this.columnValues=S.map(ga),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)&&Ar({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 Dr(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"),i=o.value;e&&"string"==typeof i?o.patchValue({from:i,to:i,id:"CUSTOM"}):!e&&i&&"object"==typeof i&&o.patchValue(i.from)},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(fa),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:ra},{type:o.FormBuilder},{type:jn},{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,ra,o.FormBuilder,jn,e.ChangeDetectorRef])],a)}(),va=function(){function t(t){this.popover=t}return t.prototype.openMoreMenu=function(t,e,n){return void 0===n&&(n=ca),this.openMenu({tpl:n,origin:t,params:e,menuType:"more"})},t.prototype.openFilterMenu=function(t,e,n){return void 0===n&&(n=ya),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:sa}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(sa))},token:t,providedIn:"root"}),t=vt([e.Injectable({providedIn:"root"}),Ct("design:paramtypes",[sa])],t)}(),ba=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=dr(a),this.headerTooltip=this.getHeaderTooltip(a),this.context={api:{grid:e.api,columns:e.columnApi},column:this.column};var s=this.params,l=s.gridQuery,c=s.gridService;this.customTemplates=c.getCustomHeader(this.field),this.filterActive$=l.select((function(t){return t.settings.filter[o.field]})).pipe(r.map((function(t){var e=t&&he(t.pivotKeys,a.pivotKeys);return ye(t)>0&&e}))),this.params.enableSorting&&(n.fromEvent(this.host.nativeElement,"click").pipe(i.untilDestroyed(this)).subscribe((function(){var t,e=o.column.getColDef()?o.column.getColDef().sortingOrder:null,n=o.column.getSort(),i=o.column.getColId();if(e&&e.length>0){var r=e.indexOf(n);t=e[-1===r||r===e.length-1?0:r+1]}else t="asc"!==n?"asc":"desc";c._logEvent("Grids - Column Action",{action:"Sort",column:i}),l.isServerSide&&c.setLoading(!0),l.getGridOptions().sortByStore?c.setSortByColumn(i,t):o.params.setSort(t)})),this.sortingInfo$=l.waitForGrid((function(){return l.gridRef.sortChanged})).pipe(r.startWith({}),r.map((function(){return{active:o.column.isSorting(),icon:!o.column.isSorting()||o.column.isSortAscending()?"sort-ascending":"sort-descending"}}))))},o.prototype.openFilters=function(t){var e=this;this.filtersMenuOpen=!0,this.controller.openFilterMenu(t.host.nativeElement,this.params).pipe(i.untilDestroyed(this)).subscribe((function(){e.filtersMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.openMoreMenu=function(t){var e=this;this.moreMenuOpen=!0,this.controller.openMoreMenu(t.host.nativeElement,this.params,this.customTemplates.moreMenu).pipe(i.untilDestroyed(this)).subscribe((function(){e.moreMenuOpen=!1,e.cdr.detectChanges()}))},o.prototype.ngOnDestroy=function(){},o.prototype.getHeaderTooltip=function(t){if(this.params){var e=t;if(e.showRowGroup){var n=this.params.columnApi.getRowGroupColumns(),o=n&&n.find((function(t){return t.getColId()===e.showRowGroup})),i=o&&o.getColDef();e=i||e}return e.customHeaderTooltip||e.headerName}return""},o.ctorParameters=function(){return[{type:e.ViewContainerRef},{type:va},{type:e.ElementRef},{type:e.ChangeDetectorRef}]},o=vt([e.Component({selector:"dato-grid-column-header",template:'<div class="d-flex align-start-center" [attr.data-auto-id]="field + \'-column-header\'" [attr.data-field]="field">\n <ng-container *ngIf="customTemplates && customTemplates.customHeader as customHeader">\n <div class="mr-5" [attr.data-auto-id]="field + \'-dynamic-section\'">\n <ng-container *ngTemplateOutlet="customHeader; context: context"></ng-container>\n </div>\n </ng-container>\n <div class="d-flex d-flex-grow align-start-center min-width-0 items-center">\n <span class="dato-simple-bold primary-400-color ellipsis min-width-0 mr-5" [datoTooltip]="headerTooltip"\n datoTooltipPosition="bottom">{{headerName}}</span>\n <div>\n <dato-icon class="primary-300-color" *ngIf="headerInfo" [datoTooltip]="headerInfo" datoTooltipPosition="bottom" datoIcon="question"></dato-icon>\n </div>\n </div>\n <div class="sort-icon opacity-0" *ngIf="params.enableSorting && (sortingInfo$ | async) as sortingInfo"\n [class.active]="sortingInfo.active">\n <dato-icon width="24px" height="16px" class="primary-300-color"\n [attr.data-auto-id]="field + \'-sort\'"\n [icon]="sortingInfo.icon"></dato-icon>\n </div>\n <ng-container *ngIf="showFilter">\n <div class="filter relative" *datoSubscribe="filterActive$ as filterActive">\n <dato-icon-button (click.stop)="openFilters(filters)" datoTooltip="core.filters" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-filter\'" class="filter-icon opacity-0"\n [class.active]="filtersMenuOpen || filterActive"\n datoSize="md" icon="filter"\n #filters></dato-icon-button>\n <div [class.opacity-100]="filterActive"\n class="opacity-0 filter-active-circle accent-400-background-color absolute"></div>\n </div>\n </ng-container>\n <dato-icon-button *ngIf="showMoreMenu" (click.stop)="openMoreMenu(moreMenu)" datoTooltip="core.more-options" datoTooltipPosition="bottom"\n datoType="none" [attr.data-auto-id]="field + \'-more-menu\'" [class.active]="moreMenuOpen"\n datoSize="md" icon="more-vertical" #moreMenu></dato-icon-button>\n</div>\n',styles:[":host .filter-icon,:host .sort-icon{transition:opacity .25s linear,width .25s ease-in-out;width:0}:host .sort-icon{height:16px}:host .filter-icon.active,:host .sort-icon.active{opacity:1;width:24px}:host:hover .filter-icon,:host:hover .sort-icon{opacity:1;width:24px}:host .filter-active-circle{pointer-events:none;transition:opacity .2s ease-in-out;position:absolute;height:8px;width:8px;top:2px;right:2px;border-radius:4px;border:1px solid #fff}:host ::ng-deep .filter dato-icon-button dato-icon{transition:color .2s ease-in-out}"]}),Ct("design:paramtypes",[e.ViewContainerRef,va,e.ElementRef,e.ChangeDetectorRef])],o)}();function Ca(t){var e=new Date(t||null).getTime();return isNaN(e)?0:e}var wa=function(t){return t[Ea]},Sa={getDataPath:wa,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&&ka(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 ka(t),'<span class="entity-display-name dato-simple-bold">'+c+"</span>";if(s){var d=Re(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(Ra){if(Ra.id===e.id)return;var i=Pa(Ra.id);i&&i.classList.remove("ag-row-hover"),Ra=null}else Ra=e;if(e){var r=Pa(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[Ea]:[],l=!jt(s,r[Ea]),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[Ea]=s,o.push(r),ye(a)>0&&a.forEach((function(e){t(xt(s,[r[i]]),e,o,i)}));r[Ea].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&&ka(t,o)}}));var h=Pa(Ra.id);h&&h.classList.remove("ag-row-hover"),Ra=null,this.api.clearFocusedCell()}var g,f},onRowSelected:function(t){if(Aa)return;Aa=!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;)_a(e),e=e.parent}(t.node),setTimeout((function(){Aa=!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>'}},xa=function(t,e){return(t||"").toLowerCase().localeCompare((e||"").toLowerCase())},Oa={filter:t.DatoGridFilterTypes.String,comparator:xa},Da=mt({hoverConfig:{enabled:!0,maxDisplayedItems:3},enableV2_1:!1,enableSearch:!1,enableSearchHighlight:!0,columnsIncludedInSearchByDefault:!0,includeHiddenColumnsInSearch:!1,enableAllPagesSelection:!0,idColumnKey:"id",enableBackground:!0,columnTypes:(ha={},ha[t.DatoGridColumnTypes.Date]={filter:t.DatoGridFilterTypes.Date,comparator:function(t,e){return Ca(t)-Ca(e)}},ha[t.DatoGridColumnTypes.Number]={filter:t.DatoGridFilterTypes.Number},ha[t.DatoGridColumnTypes.String]=Oa,ha[t.DatoGridColumnTypes.Status]=mt(mt({},Oa),{cellRenderer:"DatoGridStatusCellComponent"}),ha[t.DatoGridColumnTypes.Items]=mt(mt({},Oa),{cellRenderer:"DatoGridItemsCellComponent"}),ha[t.DatoGridColumnTypes.ItemsCount]=mt(mt({},Oa),{cellRenderer:"DatoGridItemsCountCellComponent"}),ha[t.DatoGridColumnTypes.Initials]=mt(mt({},Oa),{cellRenderer:"DatoGridInitialsCellComponent"}),ha[t.DatoGridColumnTypes.Avatar]=mt(mt({},Oa),{cellRenderer:"DatoGridAvatarCellComponent"}),ha),multiSortKey:"ctrl",suppressPaginationPanel:!0,pagination:!0,deltaColumnMode:!0,loadingOverlayComponentFramework:Wr,noRowsOverlayComponentFramework:Xr,defaultColDef:{minWidth:t.GridMinWidths.Default,sortable:!0,resizable:!0,type:t.DatoGridColumnTypes.String,menuTabs:["filterMenuTab"],headerComponentFramework:ba},suppressCellSelection:!0,suppressPropertyNamesCheck:!0,rowHeight:35,headerHeight:30,rowSelection:t.GridRowSelectionType.MULTIPLE,rowDeselection:!0,unSortIcon:!0,animateRows:!0,rememberGroupStateWhenNewData:!0,groupMultiAutoColumn:!0,groupDefaultExpanded:-1,usePivotGridStyle:!1},Ei()?{suppressColumnVirtualisation:!0,rowBuffer:99999}:{}),Ia={CLIENT:200,SERVER:250},Ta={idKey:"id",parentIDKey:"parentID"},Ea="agGridFilePath";var Ra=null,Aa=!1;function Pa(t){return document.querySelector('[row-id="'+t+'"] > .ag-cell')}function ka(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 _a(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 ja(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={})[Ea]=i(t,!0),e)):mt(mt({},t),((r={})[Ea]=[t[o]],r))}))}function Ma(t,e){return t.map((function(t){var n,o=yt(t,[]),i=o[Ea],r=ye(i)>1?i[i.length-2]:0;return delete o[Ea],mt(mt({},o),((n={})[e.parentIDKey]=r,n))}))}var La=new e.InjectionToken("DATO_CORE_LOGGER"),Na=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:Fa},{type:yr},{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",[Fa,yr,e.ChangeDetectorRef])],t)}(),Fa=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=Ta,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:Zr(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({},Ta),n);var i=ja(t,o.treeConfig);o.api.grid.setRowData(i)}else o.isPivotMode?o.setPivotModeRows(t):o.api.grid.setRowData(t);e?o.fitGrid("container"):Je()}))},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 Ro("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&&Da.enableSearchHighlight),e.gridOptions.columnDefs=this.normalizeColumns(e.gridOptions.columnDefs,e.gridOptions),e.gridOptions.isExternalFilterPresent=function(){return!0},e.gridOptions.doesExternalFilterPass=function(t){return Ar({row:t,api:n.gridQuery.api.grid},n.gridQuery.getFilter())&&n.rowMatchesSearch(t)},this.isServerSidePagination(e.gridOptions)){e.gridOptions.blockLoadDebounceMillis=300,this._originalGetRows=e.gridOptions.datasource.getRows,e.gridOptions.datasource.getRows=this.wrapGetRows(e.gridOptions);var i=e.gridOptions.paginationPageSize;i&&(e.gridOptions.cacheBlockSize=i)}this.initEditableColumnsCellClass(e),e.gridOptions.getContextMenuItems=this.wrapContextMenuBuilder(e);var r=e.gridOptions,a=r.saveSettings,s=r.gridName;if(e.gridOptions.saveSettings=!1!==a&&!Lt(s),this.initOnRowSelectedForServerSidePagination(e),e.gridOptions.pivotMode&&(this.initPivotSecondaryColsProcess(e),e.gridOptions.saveSettings=!1),e.gridOptions.usePivotGridStyle){e.gridOptions.rowHeight=30,e.gridOptions.defaultColDef=mt(mt({},e.gridOptions.defaultColDef),{cellClassRules:this.getPivotModeCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this),cellStyle:function(e){var n={lineHeight:"30px"};return e.colDef.type===t.DatoGridColumnTypes.Number&&(n.textAlign="end"),n}}),e.gridOptions.autoGroupColumnDef=mt(mt({},e.gridOptions.autoGroupColumnDef),{cellClassRules:this.getPivotModeCellClassRules(),headerClass:this.getPivotHeaderClass.bind(this)})}return e.gridOptions},o.prototype.getPivotHeaderClass=function(t){var e=t.colDef.headerComponentParams.gridQuery,n="";if(e&&e.api){var o=e.api.columns.getSecondaryColumns();o&&o.length>0&&(n+="top-border")}return n},o.prototype.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:Da.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?Ur(t,i.gridQuery.getSearchTerm()):Kr(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(Da)},o.prototype.addMultiSelectHeaderColumnIfRequired=function(e,n){var o=n&&n.showMultiSelectionCheckboxes,i=n&&n.rowSelection?n.rowSelection:Da.rowSelection;return o&&i===t.GridRowSelectionType.MULTIPLE?xt([{colId:this.CHECKBOX_SELECTION_COL_ID,checkboxSelection:!0,headerComponentFramework:Na,width:30,maxWidth:30,suppressSizeToFit:!0,cellClass:"checkbox-selection-cell",headerClass:"header-checkbox-selection-cell",resizable:!1,pinned:"left",lockPosition:!0,includeInSearch:!1}],e):e},o.prototype.initOnRowSelectedForServerSidePagination=function(t){var e=this,n=t.gridOptions;if(this.isServerSidePagination(n)){var o=n.onRowSelected;n.onRowSelected=function(t){if(e.gridQuery.isServerSelectAllRowsEnabled){var n=t.node,i=n.isSelected(),r=e.gridQuery.serverSideConfig.excludedFromSelectAll,a=r.includes(n.id);i&&a?e.setServerSidePagination({excludedFromSelectAll:r.filter((function(t){return t!==n.id}))}):i||a||e.setServerSidePagination({excludedFromSelectAll:xt(r,[n.id])})}o&&o(t)}}},o.prototype.rowMatchesSearch=function(t){var e,n,o=(this.gridQuery.getSearchTerm()||"").toLowerCase().trim();if(kt(o))return!0;var i=this.gridQuery.getGridOptions().includeHiddenColumnsInSearch?this.gridQuery.getAllColumns():this.gridQuery.getAllDisplayedColumns();try{for(var r=wt(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(this.api.grid.getColumnDef(s.getColId()).includeInSearch)if((this.api.grid.getValue(s.getColId(),t)||"").toString().toLowerCase().includes(o))return!0}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!1},o.prototype.fitToContainer=function(){this.api.grid.sizeColumnsToFit()},o.prototype.getCustomHeader=function(t){if(this.customHeadersTemplates){var e=this.customHeadersTemplates.find((function(e){return e.column===t})),n=this.customHeadersTemplates.find((function(t){return!t.column}));if(e||n){var o={moreMenu:e&&e.moreMenu||n&&n.moreMenu,customHeader:e&&e.customHeader||n&&n.customHeader},i=o.moreMenu,r=o.customHeader;return{moreMenu:i&&i.tpl,customHeader:r&&r.tpl}}}return{}},o.prototype.clearAllFilters=function(){this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:{},searchTerm:null})}})),this.notifyFilterUpdate()},o.prototype.clearColumnFilter=function(t){var e=this.gridQuery.getFilter(),n=t,o=(e[n],yt(e,["symbol"==typeof n?n:n+""]));this.store.update((function(t){return{settings:mt(mt({},t.settings),{filter:o})}})),this.notifyFilterUpdate()},o.prototype.setColumnFilter=function(t,e,n){void 0===n&&(n=!0),this._logEvent("Grids - Filter Applied",{column:t.getColId(),numOfConditions:e.conditional&&e.conditional.conditions.length||0,byValue:e.byValue?"Yes":"No"}),this.updateFilter(t,e),n&&this.notifyFilterUpdate()},o.prototype.setGridFilters=function(t){var e,n;if(this.api&&t){var o={};try{for(var i=wt(t),r=i.next();!r.done;r=i.next()){var a=r.value,s=a.filter;o[a.field]=s}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.updateSettings({filter:o}),this.notifyFilterUpdate()}},o.prototype.setSortByColumn=function(t,e){var n=this.gridQuery.getSort({colId:t,sort:e});this.setGridSort(n)},o.prototype.setGridSort=function(t){if(t&&this.api&&this.api.grid.getDisplayedRowCount()>0){var e=t.colId,n=t.sort,o=t.sortIndex,i=this.api.columns.getAllGridColumns();if(i){var r=t,a=i.find((function(t){return(t.getColDef().showRowGroup||t.getColId())===e}));if(a)r={colId:a.getColId(),sort:n};else if(!Lt(o)){var s=this.api.columns.getValueColumns().find((function(t){return t.getColId()===e}));if(e.startsWith("pivot")||s)r={colId:i[o].getColId(),sort:n,sortIndex:o}}this.updateSettings({sort:r}),this.api.grid.setSortModel([r]),this.gridRef.gridOptions.usePivotGridStyle&&this.api.grid.redrawRows()}}},o.prototype.updateFilter=function(t,e){var n=dr(t.getColDef());this.store.update((function(t){var o;return{settings:mt(mt({},t.settings),{filter:mt(mt({},t.settings.filter),(o={},o[n]=e,o))})}}))},o.prototype.setSearchTerm=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),{searchTerm:t})}})),this.notifyFilterUpdate()},o.prototype.setServerSidePagination=function(t){this.store.update((function(e){return{serverSidePagination:mt(mt({},e.serverSidePagination),t)}}))},o.prototype.setLoading=function(t){t?this.api.grid.showLoadingOverlay():0===this.api.grid.getDisplayedRowCount()?this.setOverlay(!0):this.setOverlay(!1)},o.prototype.setNoData=function(t){this.setOverlay(t)},o.prototype.setOverlay=function(t){t?this.api.grid.showNoRowsOverlay():this.api.grid.hideOverlay()},o.prototype.updateSettings=function(t){this.store.update((function(e){return{settings:mt(mt({},e.settings),t)}}))},o.prototype.fitGrid=function(t){"container"===t?this.api.grid.sizeColumnsToFit():this.api.columns.autoSizeAllColumns();var e="container"===t?0:1;this.updateSettings({gridAlignment:e,columnsSizes:null})},o.prototype.saveSettingsToServer=function(t){this.storageAPI.set(this.gridName,t)},o.prototype._logEvent=function(t,e){this.logger.logEvent(t,mt({table:this.gridName},e))},o.prototype.wrapSuccessCallback=function(t){var e=this,n=t.successCb,o=t.pageNumber,i=t.isPendingReturnToPage;return function(t,r){e.setServerSidePagination({totalRows:r,hasError:!1}),n(t,r),e.gridQuery._serverDataLoaded.next({api:e.api.grid,columnApi:e.api.columns,type:"ServerDataLoaded",paginationPage:o}),i||(e.setLoading(!1),Je()),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;zn(i?i(o):o)},n.isSelected()&&(c=ye(l=e.gridQuery.getSelectedRowNodes())));var p=Pr(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)),Fr({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 Se(this.gridQuery.getCurrentGridSettings(),this.initialSettings)},o.prototype.resetTableSettings=function(){var t=this.initialSettings,e=t.filter,n=yt(t,["filter"]),o=pr(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.resolveRowActionsVisibility=function(){this.gridQuery._rowActionVisibilityChanged.next()},o.prototype.initPivotSecondaryColsProcess=function(t){var e=this,n=t.gridOptions;n.processSecondaryColDef=function(t){var e=t.pivotValueColumn&&t.pivotValueColumn.getUserProvidedColDef();e&&(t.filter=e.filter),t.pivotKeys&&(t.pivotKeys=t.pivotKeys.map((function(t){var e=ur(t);return e&&e.value||""})))},n.processSecondaryColGroupDef=function(t){if(t.headerName){var n=ur(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=ur(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.prototype.getPivotModeCellClassRules=function(){return{"primary-0-background-color":this.isLeafGroupEvenCell.bind(this),"primary-100-background-color pointer dato-simple-bold":this.isRowGroupValuedCell.bind(this)}},o.prototype.isLeafGroupEvenCell=function(t){var e=t.node,n=e.leafGroup,o=e.childIndex;return e.rowGroupIndex<=this.getCellClassRuleColIndex(t)&&n&&o%2==0},o.prototype.isRowGroupValuedCell=function(t){var e=t.node,n=e.leafGroup;return e.rowGroupIndex<=this.getCellClassRuleColIndex(t)&&!n},o.prototype.getCellClassRuleColIndex=function(t){var e=t.colDef.headerComponentParams.gridQuery;if(e&&e.api){var n=e.api.columns.getAllDisplayedColumns(),o=n.find((function(e){return e.getColId()===t.colDef.colId}));return n.indexOf(o)}return-1},o.ctorParameters=function(){return[{type:cr},{type:yr},{type:jn},{type:Me},{type:Le},{type:void 0,decorators:[{type:e.Inject,args:[Hr]}]},{type:void 0,decorators:[{type:e.Inject,args:[La]}]}]},o=vt([e.Injectable(),bt(5,e.Inject(Hr)),bt(6,e.Inject(La)),Ct("design:paramtypes",[cr,yr,jn,Me,Le,Object,Object])],o)}(),Ga=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)}(),Va=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)}(),za=function(){function t(){}return vt([e.Input(),Ct("design:type",String)],t.prototype,"column",void 0),vt([e.ContentChild(Ga),Ct("design:type",Object)],t.prototype,"customHeader",void 0),vt([e.ContentChild(Va),Ct("design:type",Object)],t.prototype,"moreMenu",void 0),t=vt([e.Component({selector:"dato-custom-header-template",template:"",changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Ba={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"}},Ha=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=Pr(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=Ba.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:Fa},{type:yr},{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,Fa,yr,e.ChangeDetectorRef])],t)}(),Ua=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:ua(o),description:n}),t}),[])},t.ctorParameters=function(){return[{type:Wo}]},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",[Wo])],t)}(),Ka=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===da()&&(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(Ua,{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:Jo}]},o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(ut.EventManager),e.ɵɵinject(s.DOCUMENT),e.ɵɵinject(Jo))},token:o,providedIn:"root"}),o=vt([e.Injectable({providedIn:"root"}),bt(1,e.Inject(s.DOCUMENT)),Ct("design:paramtypes",[ut.EventManager,Object,Jo])],o)}(),Wa=function(){function t(t,o,i,r,a,s,l,c,p,d){this.gridService=t,this.gridQuery=o,this.cdr=i,this.iconRegistry=r,this.translate=a,this.host=s,this.injector=l,this.resolver=c,this.hotkeys=p,this.storageAPI=d,this.onGridChange=new e.EventEmitter,this.rowActions=[],this.gridActions=[],this.contentInit=new n.Subject,this.gridReady$=this.gridQuery.gridReady$,this.gridElements={centerViewport:null,centerContainer:null,bodyViewport:null},this.treeGridClass="tree"}return Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this._gridOptions},set:function(t){this._gridOptions=t,this.gridService.treeData=t.treeData,this.gridService.isPivotMode=t.pivotMode,this.agGridEl&&(t.treeData?!this.agGridEl.classList.contains(this.treeGridClass)&&this.agGridEl.classList.add(this.treeGridClass):t.enableV2_1||this.agGridEl.classList.add(this.treeGridClass))},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.contentInit.complete(),this.clearTooltip(),this.rowHoverComponent&&this.rowHoverComponent.destroy(),this.rowHoverComponent=null},t.prototype.ngAfterContentInit=function(){this.contentInit.next(),this.contentInit.complete()},t.prototype._initializeGrid=function(t,e){var o=this;this.agGridEl=e,this.contentInit.asObservable().pipe(r.switchMap((function(){o.gridOptions=o.normalizeOptions(),t.gridOptions=o.gridOptions;var e=!1===o.gridOptions.saveSettings?n.of(null):o.storageAPI.get(o.gridOptions.gridName);return n.combineLatest([t.gridReady,e])})),i.untilDestroyed(this)).subscribe((function(n){var i=St(n,2),r=i[0],a=r.api,s=r.columnApi,l=i[1],c=void 0===l?{}:l;(o.gridOptions.rowData||a.showLoadingOverlay(),o.gridOptions.statusBar)||Ut(e.querySelector(".ag-status-bar"),"ag-hidden");var p={grid:a,columns:s};o.gridService._setApi(p,t),o.gridQuery._setApi(p,t),o.gridService.initSettings(c||{}),o.registerSettingsListeners(p,t),o.registerGridListeners(p,t),o.registerEventsTriggeringClearSelectedRows(t),o.registerPaginationChanged(t),o.gridQuery._gridReady.next(!0),o.gridOptions.treeData&&o.agGridEl.classList.add("tree"),o.gridOptions.rowHeight&&o.agGridEl.classList.add("row-height-"+o.gridOptions.rowHeight)}))},t.prototype.normalizeOptions=function(){this.gridOptions.treeData&&(this.gridOptions=mt(mt({},this.gridOptions),{pagination:!1}));var t={gridOptions:this.gridOptions,customHeadersTemplates:this.customHeadersTemplates,rowActions:this.rowActions},e=this.gridService.normalizeOptions(t);return Zr(mt(mt(mt({},Da),this.gridOptions.treeData?Sa:{}),{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=pr(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=Jr({component:Ha,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?Ma(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:Fa},{type:yr},{type:e.ChangeDetectorRef},{type:Me},{type:jn},{type:e.ElementRef},{type:e.Injector},{type:e.ComponentFactoryResolver},{type:Ka},{type:void 0,decorators:[{type:e.Inject,args:[Hr]}]}]},vt([e.ContentChildren(za),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:[yr,Fa,cr],styles:[":host{display:flex;flex-direction:column;flex-grow:1}"]}),bt(9,e.Inject(Hr)),Ct("design:paramtypes",[Fa,yr,e.ChangeDetectorRef,Me,jn,e.ElementRef,e.Injector,e.ComponentFactoryResolver,Ka,Object])],t)}(),Qa=function(){function t(t,e){this.controller=t,this.host=e}return Object.defineProperty(t.prototype,"grid",{set:function(t){var e=Ft("ag-grid-angular",this.host.nativeElement);this.controller._initializeGrid(t,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridOptions",{get:function(){return this.controller?this.controller.gridOptions:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableBackground",{get:function(){return!!this.gridOptions&&this.gridOptions.enableBackground},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableV2_1",{get:function(){return!!this.gridOptions&&this.gridOptions.enableV2_1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPivotStyle",{get:function(){return this.gridOptions&&this.gridOptions.usePivotGridStyle},enumerable:!0,configurable:!0}),t.ctorParameters=function(){return[{type:Wa},{type:e.ElementRef}]},vt([e.ViewChild(st.AgGridNg2,{static:!0}),Ct("design:type",st.AgGridNg2),Ct("design:paramtypes",[st.AgGridNg2])],t.prototype,"grid",null),t=vt([e.Component({selector:"dato-grid-v2",template:'<ag-grid-angular data-auto-id="grid" class="dato-grid ag-theme-material" [class.has-background]="enableBackground" [class.enable-v2_1]="enableV2_1"\n [class.with-multi-selection-col]="gridOptions?.showMultiSelectionCheckboxes" [class.pivot-style]="isPivotStyle">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]="enableBackground"></dato-grid-pagination-v2>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-icon-checkbox-indeterminate:before{text-align:center;content:'-';display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}dato-grid-v2 .ag-overlay-wrapper ng-component{display:flex}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}"]}),Ct("design:paramtypes",[Wa,e.ElementRef])],t)}(),$a=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:ra}]},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",[ra])],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:ra}]},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",[ra])],t)}(),Ya=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:Wa},{type:yr}]},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",[Wa,yr])],t)}();
327
327
  /**
328
328
  * @license
329
329
  * Copyright Datorama. All Rights Reserved.
@@ -491,7 +491,7 @@ function bc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function Cc(t,e,n){this.
491
491
  *
492
492
  * Use of this source code is governed by an Apache License 2.0 license that can be
493
493
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
494
- */(Dc=t.PillType||(t.PillType={})).PRIMARY="primary",Dc.SECONDARY="secondary",Dc.RED="red",Dc.ORANGE="orange";var Jc=function(){function t(t){this.size=t,this._options=[],this.labelTooltipPosition="bottom",this.canRemove=!0,this.restCount=0,this._limitTo=10,this.removeOption=new e.EventEmitter,this.size=t||"md"}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"limitTo",{get:function(){return this._limitTo},set:function(t){this._limitTo=t,this.setRestCount()},enumerable:!0,configurable:!0}),t.prototype.remove=function(t){this.options=this._options.filter((function(e){return e.id!==t.id})),this.removeOption.emit(t)},Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options&&this.options.length>this.limitTo},enumerable:!0,configurable:!0}),t.prototype.setRestCount=function(){this.options&&this.options.length&&(this.restCount=Math.abs(this.limitTo-this.options.length))},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelTooltipPosition",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"canRemove",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),t=vt([e.Component({selector:"dato-pills",template:'<div class="dato-pills__active d-flex justify-between" [class.cant-remove]="!canRemove" [attr.dato-type]="option.type || \'primary\'" [class.disabled]="option.disabled"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (\'id\' | trackByProp)">\n <span [datoTooltip]="option.customTooltip || option.label" class="ellipsis"\n datoTooltipPosition="labelTooltipPosition" [datoTooltipOnTextOverflow]="!option.customTooltip">{{option.label | translate}}</span>\n <dato-icon class="d-flex-no-shrink pointer" datoIcon="close" *ngIf="canRemove"\n (click)="remove(option)"></dato-icon>\n</div>\n<div class="dato-pills__active d-flex justify-between dato-pills__rest" *ngIf="showRest">\n +{{restCount}}\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-pills{display:flex;flex-wrap:wrap}dato-pills .dato-pills__active{height:35px;line-height:35px;margin-right:6px;margin-bottom:6px;font-size:14px;font-weight:600}dato-pills .dato-pills__rest{padding:7px}dato-pills[datoSize=sm] .dato-pills__active{height:26px;line-height:26px;margin-right:6px;margin-bottom:6px;font-size:12px}"]}),bt(0,e.Attribute("datoSize")),Ct("design:paramtypes",[Object])],t)}(),tp=[Jc],ep=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Jn,bo,Fe],declarations:[tp],exports:[tp]})],t)}(),np=function(){function t(t){this.cdr=t,this.barColor="primary-100",this.thresholds=[33,66]}return t.prototype.ngOnInit=function(){this.parts?this.parts&&this.parts.every((function(t){return t.weight>=0}))&&!this.parts.every((function(t){return!!t.percent}))&&this.initPartsPercent():(this.percent=this.percent||0,this.isByPercent=!0,this.hasInitialColor=!!this.color,this.initSinglePart())},t.prototype.ngOnChanges=function(t){this.isByPercent&&(t.percent&&!t.percent.firstChange||t.color&&!t.color.firstChange||t.tooltip&&!t.tooltip.firstChange)&&(this.initSinglePart(),this.cdr.detectChanges())},t.prototype.initSinglePart=function(){this.color&&this.hasInitialColor||this.initColor(),this.parts=[{percent:this.percent,color:this.color,tooltip:this.tooltip}]},t.prototype.initColor=function(){kt(this.thresholds)&&(this.color="accent-400"),1===this.thresholds.length?this.color=this.percent<=this.thresholds[0]?"red-400":"green-400":this.color=this.percent<=this.thresholds[0]?"red-400":this.percent<=this.thresholds[1]?"yellow-400":"green-400"},t.prototype.initPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.weight}),0);this.parts.forEach((function(e){e.percent=e.weight>0?Math.max(Math.round(e.weight/t*100),1):0})),this.roundPartsPercent()},t.prototype.roundPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.percent}),0);if(100!==t)for(var e=100-t,n=0,o=0;0!==e&&o<100;){var i=this.parts[n];n=(n+1)%this.parts.length,o++,0===i.weight||i.percent<=1||(i.percent+=e>0?1:-1,e-=e>0?1:-1)}},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"parts",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"percent",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"color",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"barColor",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"thresholds",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"showLegend",void 0),t=vt([e.Component({selector:"dato-progress-bar",template:'<div class="bar d-flex width-100 overflow-hidden"\n [style.width]="width"\n [class]="barColor + \'-background-color\'">\n <div *ngFor="let part of parts; index as i"\n class="part height-100"\n [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"\n [style.width]="i > 0 ? \'calc(\' + part.percent + \'% + 8px)\' : part.percent + \'%\'"\n [style.z-index]="100 - i"\n [datoTooltipV2]="part.tooltip">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf="showLegend" class="d-flex mt-12">\n <div *ngFor="let part of parts; index as i" class="d-flex mr-16">\n <div class="d-flex items-center dato-note primary-400-color">\n <div class="legend-color mr-4" [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class="primary-300-color ml-3" *ngIf="part.legendSecondaryLabel">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:8px;height:8px;min-width:8px;border-radius:50%}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),op=[np],ip=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Jn],declarations:[op],exports:[op]})],t)}(),rp=[Jn,Gc,ps,is,jc,Ac,Hl,vc,$i,rc,se,Bc,Dn,_l,Gl,Co,Fe,So,Do,nc,nr,Il,qs,Ki,gi,Bs,ji,Al,gl,dl,tr,Bi,ql,bo,Rt,ws,Kc,Ws,qc,ml,Is,Xc,gs,il,ep,ip],ap=function(){function t(){}var n;return n=t,t.forRoot=function(t){return{ngModule:n,providers:[{provide:Hn,useValue:t},{provide:ut.EVENT_MANAGER_PLUGINS,useClass:Vc,multi:!0}]}},t=n=vt([e.NgModule({exports:[rp]})],t)}();(t.MockService||(t.MockService={})).TRANSLATE="translate";var sp={translate:{transform:function(t){return t}}};var lp={translate:function(){return{provide:_n,useValue:sp.translate}},datePickerConfig:function(){return{provide:bn,useValue:function(){}}}};
494
+ */(Dc=t.PillType||(t.PillType={})).PRIMARY="primary",Dc.SECONDARY="secondary",Dc.RED="red",Dc.ORANGE="orange";var Jc=function(){function t(t){this.size=t,this._options=[],this.labelTooltipPosition="bottom",this.canRemove=!0,this.restCount=0,this._limitTo=10,this.removeOption=new e.EventEmitter,this.size=t||"md"}return Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t,this.setRestCount()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"limitTo",{get:function(){return this._limitTo},set:function(t){this._limitTo=t,this.setRestCount()},enumerable:!0,configurable:!0}),t.prototype.remove=function(t){this.options=this._options.filter((function(e){return e.id!==t.id})),this.removeOption.emit(t)},Object.defineProperty(t.prototype,"showRest",{get:function(){return this.options&&this.options.length>this.limitTo},enumerable:!0,configurable:!0}),t.prototype.setRestCount=function(){this.options&&this.options.length&&(this.restCount=Math.abs(this.limitTo-this.options.length))},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Attribute,args:["datoSize"]}]}]},vt([e.Input(),Ct("design:type",Array),Ct("design:paramtypes",[Array])],t.prototype,"options",null),vt([e.Input(),Ct("design:type",Object)],t.prototype,"labelTooltipPosition",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"canRemove",void 0),vt([e.Input(),Ct("design:type",Number),Ct("design:paramtypes",[Number])],t.prototype,"limitTo",null),vt([e.Output(),Ct("design:type",Object)],t.prototype,"removeOption",void 0),t=vt([e.Component({selector:"dato-pills",template:'<div class="dato-pills__active d-flex justify-between" [class.cant-remove]="!canRemove" [attr.dato-type]="option.type || \'primary\'" [class.disabled]="option.disabled"\n *ngFor="let option of options | slice: 0: limitTo; trackBy: (\'id\' | trackByProp)">\n <span [datoTooltip]="option.customTooltip || option.label" class="ellipsis"\n datoTooltipPosition="labelTooltipPosition" [datoTooltipOnTextOverflow]="!option.customTooltip">{{option.label | translate}}</span>\n <dato-icon class="d-flex-no-shrink pointer" datoIcon="close" *ngIf="canRemove"\n (click)="remove(option)"></dato-icon>\n</div>\n<div class="dato-pills__active d-flex justify-between dato-pills__rest" *ngIf="showRest">\n +{{restCount}}\n</div>\n',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["dato-pills{display:flex;flex-wrap:wrap}dato-pills .dato-pills__active{height:35px;line-height:35px;margin-right:6px;margin-bottom:6px;font-size:14px;font-weight:600}dato-pills .dato-pills__rest{padding:7px}dato-pills[datoSize=sm] .dato-pills__active{height:26px;line-height:26px;margin-right:6px;margin-bottom:6px;font-size:12px}"]}),bt(0,e.Attribute("datoSize")),Ct("design:paramtypes",[Object])],t)}(),tp=[Jc],ep=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Jn,bo,Fe],declarations:[tp],exports:[tp]})],t)}(),np=function(){function t(t){this.cdr=t,this.barColor="primary-100",this.thresholds=[33,66]}return t.prototype.ngOnInit=function(){this.parts?this.parts&&this.parts.every((function(t){return t.weight>=0}))&&!this.parts.every((function(t){return!!t.percent}))&&this.initPartsPercent():(this.percent=this.percent||0,this.isByPercent=!0,this.hasInitialColor=!!this.color,this.initSinglePart())},t.prototype.ngOnChanges=function(t){this.isByPercent&&(t.percent&&!t.percent.firstChange||t.color&&!t.color.firstChange||t.tooltip&&!t.tooltip.firstChange)&&(this.initSinglePart(),this.cdr.detectChanges())},t.prototype.initSinglePart=function(){this.color&&this.hasInitialColor||this.initColor(),this.parts=[{percent:this.percent,color:this.color,tooltip:this.tooltip}]},t.prototype.initColor=function(){kt(this.thresholds)&&(this.color="accent-400"),1===this.thresholds.length?this.color=this.percent<=this.thresholds[0]?"red-400":"green-400":this.color=this.percent<=this.thresholds[0]?"red-400":this.percent<=this.thresholds[1]?"yellow-400":"green-400"},t.prototype.initPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.weight}),0);this.parts.forEach((function(e){e.percent=e.weight>0?Math.max(Math.round(e.weight/t*100),1):0})),this.roundPartsPercent()},t.prototype.roundPartsPercent=function(){var t=this.parts.reduce((function(t,e){return t+e.percent}),0);if(100!==t)for(var e=100-t,n=0,o=0;0!==e&&o<100;){var i=this.parts[n];n=(n+1)%this.parts.length,o++,0===i.weight||i.percent<=1||(i.percent+=e>0?1:-1,e-=e>0?1:-1)}},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},vt([e.Input(),Ct("design:type",String)],t.prototype,"width",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"parts",void 0),vt([e.Input(),Ct("design:type",Number)],t.prototype,"percent",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"color",void 0),vt([e.Input(),Ct("design:type",Object)],t.prototype,"tooltip",void 0),vt([e.Input(),Ct("design:type",String)],t.prototype,"barColor",void 0),vt([e.Input(),Ct("design:type",Array)],t.prototype,"thresholds",void 0),vt([e.Input(),Ct("design:type",Boolean)],t.prototype,"showLegend",void 0),t=vt([e.Component({selector:"dato-progress-bar",template:'<div class="bar d-flex width-100 overflow-hidden"\n [style.width]="width"\n [class]="barColor + \'-background-color\'">\n <div *ngFor="let part of parts; index as i"\n class="part height-100"\n [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"\n [style.width]="i > 0 ? \'calc(\' + part.percent + \'% + 8px)\' : part.percent + \'%\'"\n [style.z-index]="100 - i"\n [datoTooltipV2]="part.tooltip">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf="showLegend" class="d-flex mt-12">\n <div *ngFor="let part of parts; index as i" class="d-flex mr-16">\n <div *ngIf="part.legendLabel || part.tooltip" class="d-flex items-center dato-note primary-400-color">\n <div class="legend-color mr-4" [ngClass]="part.color ? part.color + \'-background-color\' : \'\'"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class="primary-300-color ml-3" *ngIf="part.legendSecondaryLabel">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:8px;height:8px;min-width:8px;border-radius:50%}"]}),Ct("design:paramtypes",[e.ChangeDetectorRef])],t)}(),op=[np],ip=function(){function t(){}return t=vt([e.NgModule({imports:[s.CommonModule,Jn],declarations:[op],exports:[op]})],t)}(),rp=[Jn,Gc,ps,is,jc,Ac,Hl,vc,$i,rc,se,Bc,Dn,_l,Gl,Co,Fe,So,Do,nc,nr,Il,qs,Ki,gi,Bs,ji,Al,gl,dl,tr,Bi,ql,bo,Rt,ws,Kc,Ws,qc,ml,Is,Xc,gs,il,ep,ip],ap=function(){function t(){}var n;return n=t,t.forRoot=function(t){return{ngModule:n,providers:[{provide:Hn,useValue:t},{provide:ut.EVENT_MANAGER_PLUGINS,useClass:Vc,multi:!0}]}},t=n=vt([e.NgModule({exports:[rp]})],t)}();(t.MockService||(t.MockService={})).TRANSLATE="translate";var sp={translate:{transform:function(t){return t}}};var lp={translate:function(){return{provide:_n,useValue:sp.translate}},datePickerConfig:function(){return{provide:bn,useValue:function(){}}}};
495
495
  /**
496
496
  * @license
497
497
  * Copyright Datorama. All Rights Reserved.
@@ -611,7 +611,7 @@ function bc(t,e){return t.type.lastIndexOf(e+".xml")>-1}function Cc(t,e,n){this.
611
611
  * Use of this source code is governed by an Apache License 2.0 license that can be
612
612
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
613
613
  */
614
- function cp(t){var e=t.collection,n=t.value,o=t.labelKey,i=(n||"").toLocaleLowerCase();return(e||[]).filter((function(t){return(t&&t[o]||"").toLocaleLowerCase().includes(i)}))}function pp(t){var e=t.collection,n=t.value,o=t.childrenKey,i=t.labelKey;return e.map((function(t){var e;return mt(mt({},t),((e={})[o]=cp({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function dp(t){var e=t.control,o=t.debounceTime,i=t.mapFn;return n.defer((function(){return e.valueChanges.pipe(ze(o),r.startWith(e.value||""),r.map(i))}))}window.coreVersion="22.12.4",t.APP_TRANSLATE=_n,t.AceService=Ic,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=ea,t.CustomHeaderControllerService=va,t.DATE_PICKER_CONFIG=bn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=La,t.DATO_FORM_ERRORS=vs,t.DATO_GRID_STORAGE_API=Hr,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=Ia,t.DatePickerConfig=vn,t.DatePickerMonthComponent=As,t.DatoAccordionComponent=ui,t.DatoAccordionContentComponent=si,t.DatoAccordionGroupComponent=ci,t.DatoAccordionHeaderComponent=li,t.DatoAccordionModule=gi,t.DatoAceDirective=Tc,t.DatoAceDraggableDirective=Ec,t.DatoAceModule=Ac,t.DatoAutoCompleteContentDirective=Mc,t.DatoAutoFocusDirective=En,t.DatoAutocompleteComponent=Lc,t.DatoAutocompleteDirective=Nc,t.DatoAutocompleteModule=Gc,t.DatoBreadcrumbsComponent=zc,t.DatoBreadcrumbsModule=Bc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=Yc,t.DatoButtonGroupModule=Xc,t.DatoButtonModule=se,t.DatoCamelCasePipe=io,t.DatoCarouselComponent=Ql,t.DatoCarouselItemDirective=Ul,t.DatoCarouselItemElement=Wl,t.DatoCarouselModule=ql,t.DatoCheckboxComponent=_i,t.DatoCheckboxModule=ji,t.DatoClipboardDirective=Bn,t.DatoColorDirective=Sn,t.DatoConfirmationDialogComponent=Xo,t.DatoControlErrorComponent=fs,t.DatoControlErrorContainerDirective=ms,t.DatoControlErrorsDirective=bs,t.DatoCoreError=Ro,t.DatoCoreModule=ap,t.DatoCustomHeaderTemplateComponent=za,t.DatoCustomHeaderTemplateDirective=Ga,t.DatoCustomMoreMenuTemplateDirective=Va,t.DatoDatePickerContainerComponent=ks,t.DatoDatePickerModule=Ws,t.DatoDatePickerRangeComponent=Fs,t.DatoDatePickerSingleComponent=Hs,t.DatoDialog=Jo,t.DatoDialogCloseDirective=ll,t.DatoDialogComponent=Qo,t.DatoDialogContentComponent=al,t.DatoDialogDismissDirective=ul,t.DatoDialogFooterComponent=sl,t.DatoDialogHeaderComponent=rl,t.DatoDialogModule=gl,t.DatoDialogRef=Wo,t.DatoDirectivesModule=Jn,t.DatoDisableControlDirective=Vn,t.DatoDraggableDirective=Tn,t.DatoDynamicContentComponent=pl,t.DatoDynamicContentModule=dl,t.DatoEditableHeaderComponent=Nl,t.DatoEditableHeaderModule=Gl,t.DatoFileInputComponent=Wc,t.DatoFileInputDefaultComponent=Qc,t.DatoFileInputModule=qc,t.DatoFontDirective=xo,t.DatoFontIconComponent=Ge,t.DatoFontIconModule=Ve,t.DatoFormSubmitDirective=ys,t.DatoFormValidationModule=ws,t.DatoGrid=lr,t.DatoGridAPI=Eo,t.DatoGridAvatarCellComponent=Sl,t.DatoGridColumnDisplayMenuComponent=$a,t.DatoGridColumnHeaderComponent=ba,t.DatoGridColumnHeaderMoreMenuComponent=ca,t.DatoGridComponent=Lo,t.DatoGridControllerComponent=Wa,t.DatoGridDateFilterOptions=wr,t.DatoGridFilterComponent=ya,t.DatoGridFilterOptionsMap=Or,t.DatoGridGroupsMenuComponent=qa,t.DatoGridHeaderComponent=No,t.DatoGridHeaderV2Component=Ya,t.DatoGridInitialsCellComponent=wl,t.DatoGridItemsCellComponent=Cl,t.DatoGridModule=nr,t.DatoGridNumberFilterOptions=xr,t.DatoGridOnHoverComponent=Ha,t.DatoGridPaginationComponent=jo,t.DatoGridPaginationV2Component=Xa,t.DatoGridStatusCellComponent=bl,t.DatoGridStringFilterOptions=Sr,t.DatoGridToolbarComponent=ii,t.DatoGridToolbarItemDirective=Go,t.DatoGridToolbarItemElementDirective=Vo,t.DatoGridV2Component=Qa,t.DatoGridV2LoaderComponent=Wr,t.DatoGridV2Module=Il,t.DatoGridV2NoDataOverlayComponent=Xr,t.DatoGridV2ToolbarButtonComponent=Ja,t.DatoGridV2ToolbarComponent=ts,t.DatoGroupComponent=vi,t.DatoHighlightPipe=eo,t.DatoHotkeys=Ka,t.DatoHotkeysDirective=fl,t.DatoHotkeysHelpComponent=Ua,t.DatoHotkeysModule=ml,t.DatoIconButtonComponent=Io,t.DatoIconButtonModule=To,t.DatoIconComponent=Ne,t.DatoIconModule=Fe,t.DatoInfiniteScrollComponent=Hc,t.DatoInfiniteScrollModule=Kc,t.DatoInputComponent=wn,t.DatoInputModule=Co,t.DatoInputNumberComponent=xs,t.DatoInputNumberDirective=Ss,t.DatoInputNumberModule=Is,t.DatoKebabCasePipe=oo,t.DatoLinkButtonComponent=wo,t.DatoLinkButtonModule=So,t.DatoListComponent=Xi,t.DatoListModule=tr,t.DatoListNoDataComponent=el,t.DatoListNoResultComponent=tl,t.DatoListV2Component=Js,t.DatoListV2Module=il,t.DatoLoaderComponent=Qs,t.DatoLoadersModule=qs,t.DatoMenuComponent=as,t.DatoMenuContentDirective=rs,t.DatoMenuItemDirective=ls,t.DatoMenuModule=ps,t.DatoMenuTriggerForDirective=ss,t.DatoMultiOptionComponent=Li,t.DatoMultiOptionV2Component=Gi,t.DatoOperatorTogglerComponent=us,t.DatoOperatorTogglerModule=gs,t.DatoOptionComponent=bi,t.DatoOptionV2Component=Fi,t.DatoOptionsModule=Bi,t.DatoOriginDirective=In,t.DatoOverlay=Pn,t.DatoPageLoaderComponent=$s,t.DatoPanel=hc,t.DatoPanelComponent=pc,t.DatoPanelContentComponent=fc,t.DatoPanelFooterComponent=mc,t.DatoPanelHeaderComponent=gc,t.DatoPanelInternalConfig=dc,t.DatoPanelModule=vc,t.DatoPanelRef=uc,t.DatoPillsComponent=Jc,t.DatoPillsModule=ep,t.DatoPipesModule=bo,t.DatoPopover=sa,t.DatoPopoverComponent=ia,t.DatoPopoverModule=is,t.DatoProgressBarComponent=np,t.DatoProgressBarModule=ip,t.DatoRadioComponent=El,t.DatoRadioModule=Al,t.DatoRichTextDirective=zl,t.DatoRichTextModule=Hl,t.DatoSearchResultsGroupSortPipe=po,t.DatoSearchResultsSortPipe=ho,t.DatoSearchableContainerComponent=ri,t.DatoSearchableDirective=ai,t.DatoSearchableHighlightDirective=kc,t.DatoSearchableModule=jc,t.DatoSelectActiveDirective=Ci,t.DatoSelectComponent=Pi,t.DatoSelectEmptyComponent=Ni,t.DatoSelectModule=$i,t.DatoShortNumberPipe=yo,t.DatoSliderComponent=Tt,t.DatoSliderModule=Rt,t.DatoSnackbar=Ml,t.DatoSnackbarComponent=kl,t.DatoSnackbarModule=_l,t.DatoSortableComponent=di,t.DatoSortableHandleDirective=Hi,t.DatoSortableModule=Ki,t.DatoStaticImageSrcDirective=Un,t.DatoStaticImagesSrcModule=Kn,t.DatoSubscribeContext=Fn,t.DatoSubscribeDirective=Gn,t.DatoTab=Jl,t.DatoTabContent=Xl,t.DatoTabTitle=Zl,t.DatoTabsModule=nc,t.DatoTabset=tc,t.DatoTemplatePortal=kn,t.DatoTextModule=Do,t.DatoThemesModule=Dn,t.DatoToast=cc,t.DatoToastComponent=ic,t.DatoToastModule=rc,t.DatoTogglerComponent=Vs,t.DatoTogglerModule=Bs,t.DatoTooltipDirective=Nn,t.DatoTooltipV2Directive=Zn,t.DatoTrackByPropPipe=fo,t.DatoTranslateService=jn,t.DatoTreePipe=mo,t.DatoTriggerMulti=Mi,t.DatoTriggerSingle=Ri,t.DialogConfig=$o,t.EventModifiersPlugin=Vc,t.GridToolbarService=oi,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=Me,t.POPPER_BOUNDARY=Ps,t.PaletteDirective=xn,t.PopoverCloseDirective=es,t.PopoverContentDirective=ns,t.PopoverRef=ra,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=jl,t.Store=Ys,t.SvgRegistry=Le,t.ToolbarConfirmation=ei,t.ToolbarDeleteConfirmation=ni,t.ToolbarHandler=ti,t.TranslatePipe=no,t._valueChanges=dp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=Oc,t.allowedFileTypes=function(t){return function(e){var n=e.value;if(n)for(var o=n instanceof FileList?n:[n],i=0,r=o.length;i<r;i++){var a=o[i].name.split(".").pop();if(!1===t.includes(a))return{invalidFileType:{extension:a}}}return null}},t.alphabeticalGroupSort=co,t.alphabeticalSort=lo,t.appendChild=qt,t.appendScript=Xt,t.appendStyle=Jt,t.appendToBody=Zt,t.assertString=function(t,e){if("string"!=typeof t)throw new Ro(e+" expecting string but got "+typeof t)},t.camelCase=Ie,t.capitalize=De,t.cloneDeep=function(t){return N(t)},t.closest=ee,t.coerceArray=me,t.coerceElement=function(t){return t instanceof e.ElementRef?t.nativeElement:t},t.compareWith=ao,t.compose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduce((function(t,e){return e(t)}),e)}},t.convertFromTreeData=Ma,t.convertToTreeData=ja,t.copyToClipboard=zn,t.createComponent=Jr,t.createElement=$t,t.createGUID=Ee,t.createHTMLCompletor=xc,t.curry=ve,t.dateCompare=_e,t.daysOfTheMonth=Rs,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=hl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=Zr,t.defaultActions=la,t.defaultConfig=Pl,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=Da,t.defaultGridTreeLabel=Ta,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=Sa,t.dialogSizePreset=Ho,t.diff=Se,t.difference=le,t.differenceBy=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return h.apply(void 0,xt(t))},t.dimensionsChanges=qn,t.directives=On,t.drop=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.editableCellRendererWithSearchHighlight=Ur,t.escape=Oe,t.escapeRegExp=function(t){return H(t)},t.filter=function(t,e){return O(t,e)},t.filterByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.debounceTime;return dp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return cp({collection:t,value:e,labelKey:r})}})},t.filterByTerm=cp,t.filterDialogDismissed=function(){return oc(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return oc(t.DialogResultStatus.SUCCESS)},t.filterGroupByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.childrenKey,s=void 0===a?"children":a,l=o.debounceTime;return dp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return pp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=pp,t.filterKey=Ti,t.find=function(t,e,n){return v(t,e,n)},t.findIndex=ce,t.findKey=function(t,e){return D(t,e)},t.fixNgLeaks=function(){o.FormControlDirective.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null},o.FormControlName.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null}},t.forEach=function(t,e){return b(t,e)},t.formatKeys=ua,t.generateMonths=Ms,t.get=function(t,e,n){return A(t,e,n)},t.getAttr=Bt,t.getCustomRange=an,t.getDateISOString=ln,t.getDefaultConfirmationOptions=Yo,t.getDefaultOptions=zo,t.getDefaultsToastOptions=sc,t.getElementCoords=te,t.getFunctionName=be,t.getGridConfiguration=ir,t.getGridModel=sr,t.getInitials=Re,t.getLocalizedFormat=cn,t.getMultiTemplate=fi,t.getOptionTemplate=mi,t.getPopperDefaults=function(t){return{placement:t.placement,modifiers:{keepTogether:{enabled:!0},hide:{enabled:!1},preventOverflow:{enabled:!1}}}},t.getUTCDate=sn,t.getVisibleActions=Pr,t.gridTreeFilePathKey=Ea,t.groupBy=function(t,e){return x(t,e)},t.groupSortOrder=ro,t.has=function(t,e){return P(t,e)},t.inView=Qn,t.intersection=
614
+ function cp(t){var e=t.collection,n=t.value,o=t.labelKey,i=(n||"").toLocaleLowerCase();return(e||[]).filter((function(t){return(t&&t[o]||"").toLocaleLowerCase().includes(i)}))}function pp(t){var e=t.collection,n=t.value,o=t.childrenKey,i=t.labelKey;return e.map((function(t){var e;return mt(mt({},t),((e={})[o]=cp({collection:t[o],value:n,labelKey:i}),e))})).filter((function(t){return t[o].length>0}))}function dp(t){var e=t.control,o=t.debounceTime,i=t.mapFn;return n.defer((function(){return e.valueChanges.pipe(ze(o),r.startWith(e.value||""),r.map(i))}))}window.coreVersion="22.12.6",t.APP_TRANSLATE=_n,t.AceService=Ic,t.BaseCustomControl=Dt,t.CUSTOM_RANGE_ID="CUSTOM",t.ContentRef=ea,t.CustomHeaderControllerService=va,t.DATE_PICKER_CONFIG=bn,t.DATE_PICKER_POPOVER_ID="datePicker",t.DATO_CORE_LOGGER=La,t.DATO_FORM_ERRORS=vs,t.DATO_GRID_STORAGE_API=Hr,t.DEFAULT_FORMAT="LLL d, yyyy",t.DEFAULT_GRID_SEARCH_DEBOUNCE_TIME=Ia,t.DatePickerConfig=vn,t.DatePickerMonthComponent=As,t.DatoAccordionComponent=ui,t.DatoAccordionContentComponent=si,t.DatoAccordionGroupComponent=ci,t.DatoAccordionHeaderComponent=li,t.DatoAccordionModule=gi,t.DatoAceDirective=Tc,t.DatoAceDraggableDirective=Ec,t.DatoAceModule=Ac,t.DatoAutoCompleteContentDirective=Mc,t.DatoAutoFocusDirective=En,t.DatoAutocompleteComponent=Lc,t.DatoAutocompleteDirective=Nc,t.DatoAutocompleteModule=Gc,t.DatoBreadcrumbsComponent=zc,t.DatoBreadcrumbsModule=Bc,t.DatoButtonComponent=ae,t.DatoButtonGroupComponent=Yc,t.DatoButtonGroupModule=Xc,t.DatoButtonModule=se,t.DatoCamelCasePipe=io,t.DatoCarouselComponent=Ql,t.DatoCarouselItemDirective=Ul,t.DatoCarouselItemElement=Wl,t.DatoCarouselModule=ql,t.DatoCheckboxComponent=_i,t.DatoCheckboxModule=ji,t.DatoClipboardDirective=Bn,t.DatoColorDirective=Sn,t.DatoConfirmationDialogComponent=Xo,t.DatoControlErrorComponent=fs,t.DatoControlErrorContainerDirective=ms,t.DatoControlErrorsDirective=bs,t.DatoCoreError=Ro,t.DatoCoreModule=ap,t.DatoCustomHeaderTemplateComponent=za,t.DatoCustomHeaderTemplateDirective=Ga,t.DatoCustomMoreMenuTemplateDirective=Va,t.DatoDatePickerContainerComponent=ks,t.DatoDatePickerModule=Ws,t.DatoDatePickerRangeComponent=Fs,t.DatoDatePickerSingleComponent=Hs,t.DatoDialog=Jo,t.DatoDialogCloseDirective=ll,t.DatoDialogComponent=Qo,t.DatoDialogContentComponent=al,t.DatoDialogDismissDirective=ul,t.DatoDialogFooterComponent=sl,t.DatoDialogHeaderComponent=rl,t.DatoDialogModule=gl,t.DatoDialogRef=Wo,t.DatoDirectivesModule=Jn,t.DatoDisableControlDirective=Vn,t.DatoDraggableDirective=Tn,t.DatoDynamicContentComponent=pl,t.DatoDynamicContentModule=dl,t.DatoEditableHeaderComponent=Nl,t.DatoEditableHeaderModule=Gl,t.DatoFileInputComponent=Wc,t.DatoFileInputDefaultComponent=Qc,t.DatoFileInputModule=qc,t.DatoFontDirective=xo,t.DatoFontIconComponent=Ge,t.DatoFontIconModule=Ve,t.DatoFormSubmitDirective=ys,t.DatoFormValidationModule=ws,t.DatoGrid=lr,t.DatoGridAPI=Eo,t.DatoGridAvatarCellComponent=Sl,t.DatoGridColumnDisplayMenuComponent=$a,t.DatoGridColumnHeaderComponent=ba,t.DatoGridColumnHeaderMoreMenuComponent=ca,t.DatoGridComponent=Lo,t.DatoGridControllerComponent=Wa,t.DatoGridDateFilterOptions=wr,t.DatoGridFilterComponent=ya,t.DatoGridFilterOptionsMap=Or,t.DatoGridGroupsMenuComponent=qa,t.DatoGridHeaderComponent=No,t.DatoGridHeaderV2Component=Ya,t.DatoGridInitialsCellComponent=wl,t.DatoGridItemsCellComponent=Cl,t.DatoGridModule=nr,t.DatoGridNumberFilterOptions=xr,t.DatoGridOnHoverComponent=Ha,t.DatoGridPaginationComponent=jo,t.DatoGridPaginationV2Component=Xa,t.DatoGridStatusCellComponent=bl,t.DatoGridStringFilterOptions=Sr,t.DatoGridToolbarComponent=ii,t.DatoGridToolbarItemDirective=Go,t.DatoGridToolbarItemElementDirective=Vo,t.DatoGridV2Component=Qa,t.DatoGridV2LoaderComponent=Wr,t.DatoGridV2Module=Il,t.DatoGridV2NoDataOverlayComponent=Xr,t.DatoGridV2ToolbarButtonComponent=Ja,t.DatoGridV2ToolbarComponent=ts,t.DatoGroupComponent=vi,t.DatoHighlightPipe=eo,t.DatoHotkeys=Ka,t.DatoHotkeysDirective=fl,t.DatoHotkeysHelpComponent=Ua,t.DatoHotkeysModule=ml,t.DatoIconButtonComponent=Io,t.DatoIconButtonModule=To,t.DatoIconComponent=Ne,t.DatoIconModule=Fe,t.DatoInfiniteScrollComponent=Hc,t.DatoInfiniteScrollModule=Kc,t.DatoInputComponent=wn,t.DatoInputModule=Co,t.DatoInputNumberComponent=xs,t.DatoInputNumberDirective=Ss,t.DatoInputNumberModule=Is,t.DatoKebabCasePipe=oo,t.DatoLinkButtonComponent=wo,t.DatoLinkButtonModule=So,t.DatoListComponent=Xi,t.DatoListModule=tr,t.DatoListNoDataComponent=el,t.DatoListNoResultComponent=tl,t.DatoListV2Component=Js,t.DatoListV2Module=il,t.DatoLoaderComponent=Qs,t.DatoLoadersModule=qs,t.DatoMenuComponent=as,t.DatoMenuContentDirective=rs,t.DatoMenuItemDirective=ls,t.DatoMenuModule=ps,t.DatoMenuTriggerForDirective=ss,t.DatoMultiOptionComponent=Li,t.DatoMultiOptionV2Component=Gi,t.DatoOperatorTogglerComponent=us,t.DatoOperatorTogglerModule=gs,t.DatoOptionComponent=bi,t.DatoOptionV2Component=Fi,t.DatoOptionsModule=Bi,t.DatoOriginDirective=In,t.DatoOverlay=Pn,t.DatoPageLoaderComponent=$s,t.DatoPanel=hc,t.DatoPanelComponent=pc,t.DatoPanelContentComponent=fc,t.DatoPanelFooterComponent=mc,t.DatoPanelHeaderComponent=gc,t.DatoPanelInternalConfig=dc,t.DatoPanelModule=vc,t.DatoPanelRef=uc,t.DatoPillsComponent=Jc,t.DatoPillsModule=ep,t.DatoPipesModule=bo,t.DatoPopover=sa,t.DatoPopoverComponent=ia,t.DatoPopoverModule=is,t.DatoProgressBarComponent=np,t.DatoProgressBarModule=ip,t.DatoRadioComponent=El,t.DatoRadioModule=Al,t.DatoRichTextDirective=zl,t.DatoRichTextModule=Hl,t.DatoSearchResultsGroupSortPipe=po,t.DatoSearchResultsSortPipe=ho,t.DatoSearchableContainerComponent=ri,t.DatoSearchableDirective=ai,t.DatoSearchableHighlightDirective=kc,t.DatoSearchableModule=jc,t.DatoSelectActiveDirective=Ci,t.DatoSelectComponent=Pi,t.DatoSelectEmptyComponent=Ni,t.DatoSelectModule=$i,t.DatoShortNumberPipe=yo,t.DatoSliderComponent=Tt,t.DatoSliderModule=Rt,t.DatoSnackbar=Ml,t.DatoSnackbarComponent=kl,t.DatoSnackbarModule=_l,t.DatoSortableComponent=di,t.DatoSortableHandleDirective=Hi,t.DatoSortableModule=Ki,t.DatoStaticImageSrcDirective=Un,t.DatoStaticImagesSrcModule=Kn,t.DatoSubscribeContext=Fn,t.DatoSubscribeDirective=Gn,t.DatoTab=Jl,t.DatoTabContent=Xl,t.DatoTabTitle=Zl,t.DatoTabsModule=nc,t.DatoTabset=tc,t.DatoTemplatePortal=kn,t.DatoTextModule=Do,t.DatoThemesModule=Dn,t.DatoToast=cc,t.DatoToastComponent=ic,t.DatoToastModule=rc,t.DatoTogglerComponent=Vs,t.DatoTogglerModule=Bs,t.DatoTooltipDirective=Nn,t.DatoTooltipV2Directive=Zn,t.DatoTrackByPropPipe=fo,t.DatoTranslateService=jn,t.DatoTreePipe=mo,t.DatoTriggerMulti=Mi,t.DatoTriggerSingle=Ri,t.DialogConfig=$o,t.EventModifiersPlugin=Vc,t.GridToolbarService=oi,t.ISO_FORMAT="yyyy-LL-dd",t.IconRegistry=Me,t.POPPER_BOUNDARY=Ps,t.PaletteDirective=xn,t.PopoverCloseDirective=es,t.PopoverContentDirective=ns,t.PopoverRef=ra,t.ROOT_NODE_ID="ROOT_NODE_ID",t.SELECT_MAX_HEIGHT=120,t.SnackbarRef=jl,t.Store=Ys,t.SvgRegistry=Le,t.ToolbarConfirmation=ei,t.ToolbarDeleteConfirmation=ni,t.ToolbarHandler=ti,t.TranslatePipe=no,t._valueChanges=dp,t.a=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.addClass=Ut,t.addJSObjectCompletor=Oc,t.allowedFileTypes=function(t){return function(e){var n=e.value;if(n)for(var o=n instanceof FileList?n:[n],i=0,r=o.length;i<r;i++){var a=o[i].name.split(".").pop();if(!1===t.includes(a))return{invalidFileType:{extension:a}}}return null}},t.alphabeticalGroupSort=co,t.alphabeticalSort=lo,t.appendChild=qt,t.appendScript=Xt,t.appendStyle=Jt,t.appendToBody=Zt,t.assertString=function(t,e){if("string"!=typeof t)throw new Ro(e+" expecting string but got "+typeof t)},t.camelCase=Ie,t.capitalize=De,t.cloneDeep=function(t){return N(t)},t.closest=ee,t.coerceArray=me,t.coerceElement=function(t){return t instanceof e.ElementRef?t.nativeElement:t},t.compareWith=ao,t.compose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduce((function(t,e){return e(t)}),e)}},t.convertFromTreeData=Ma,t.convertToTreeData=ja,t.copyToClipboard=zn,t.createComponent=Jr,t.createElement=$t,t.createGUID=Ee,t.createHTMLCompletor=xc,t.curry=ve,t.dateCompare=_e,t.daysOfTheMonth=Rs,t.debounce=function(t,e,n){return I(t,e,n)},t.declarations=hl,t.deepEqual=function(t,e,n){return void 0===n&&(n={}),G(t,e,n)},t.deepmerge=Zr,t.defaultActions=la,t.defaultConfig=Pl,t.defaultEditableColumnRenderer=function(t){return t&&t.value?'<div class="value-wrapper ellipsis">'+t.value+"</div>":null},t.defaultGridOptions=Da,t.defaultGridTreeLabel=Ta,t.defaultOptionsDisplayLimit=10,t.defaultTreeOptions=Sa,t.dialogSizePreset=Ho,t.diff=Se,t.difference=le,t.differenceBy=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return h.apply(void 0,xt(t))},t.dimensionsChanges=qn,t.directives=On,t.drop=function(t,e){return void 0===e&&(e=1),t.filter((function(t,n){return n>=e}))},t.editableCellRendererWithSearchHighlight=Ur,t.escape=Oe,t.escapeRegExp=function(t){return H(t)},t.filter=function(t,e){return O(t,e)},t.filterByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.debounceTime;return dp({control:e,debounceTime:void 0===a?300:a,mapFn:function(e){return cp({collection:t,value:e,labelKey:r})}})},t.filterByTerm=cp,t.filterDialogDismissed=function(){return oc(t.DialogResultStatus.DISMISSED)},t.filterDialogSuccess=function(){return oc(t.DialogResultStatus.SUCCESS)},t.filterGroupByControlValue=function(t,e,n){var o=void 0===n?{}:n,i=o.labelKey,r=void 0===i?"label":i,a=o.childrenKey,s=void 0===a?"children":a,l=o.debounceTime;return dp({control:e,debounceTime:void 0===l?300:l,mapFn:function(e){return pp({collection:t,labelKey:r,childrenKey:s,value:e})}})},t.filterGroupByTerm=pp,t.filterKey=Ti,t.find=function(t,e,n){return v(t,e,n)},t.findIndex=ce,t.findKey=function(t,e){return D(t,e)},t.fixNgLeaks=function(){o.FormControlDirective.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null},o.FormControlName.prototype.ngOnDestroy=function(){this.control._onChange=[],this.valueAccessor=null}},t.forEach=function(t,e){return b(t,e)},t.formatKeys=ua,t.generateMonths=Ms,t.get=function(t,e,n){return A(t,e,n)},t.getAttr=Bt,t.getCustomRange=an,t.getDateISOString=ln,t.getDefaultConfirmationOptions=Yo,t.getDefaultOptions=zo,t.getDefaultsToastOptions=sc,t.getElementCoords=te,t.getFunctionName=be,t.getGridConfiguration=ir,t.getGridModel=sr,t.getInitials=Re,t.getLocalizedFormat=cn,t.getMultiTemplate=fi,t.getOptionTemplate=mi,t.getPopperDefaults=function(t){return{placement:t.placement,modifiers:{keepTogether:{enabled:!0},hide:{enabled:!1},preventOverflow:{enabled:!1}}}},t.getUTCDate=sn,t.getVisibleActions=Pr,t.gridTreeFilePathKey=Ea,t.groupBy=function(t,e){return x(t,e)},t.groupSortOrder=ro,t.has=function(t,e){return P(t,e)},t.inView=Qn,t.intersection=
615
615
  /**
616
616
  * @license
617
617
  * Copyright Datorama. All Rights Reserved.