@skyux/ag-grid 4.12.2 → 4.12.3

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.
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var v=function(e,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var C=function(){return(C=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function w(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function b(e,t){return function(r,o){t(r,o,e)}}function S(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var D=function(){function e(){this.skyComponentProperties={}}return e.prototype.agInit=function(e){this.params=e,this.currentSelection=this.params.value,this.columnHeader=this.params.colDef&&this.params.colDef.headerName,this.rowNumber=this.params.rowIndex+1,this.skyComponentProperties=this.params.skyComponentProperties||{}},e.prototype.afterGuiAttached=function(){this.input.nativeElement.focus()},e.prototype.getValue=function(){return this.currentSelection},w([r.ViewChild("skyCellEditorAutocomplete",{read:r.ElementRef})],e.prototype,"input",void 0),e=w([r.Component({selector:"sky-ag-grid-cell-editor-autocomplete",template:'<div\n class="sky-ag-grid-cell-editor-autocomplete"\n>\n <sky-autocomplete\n [data]="skyComponentProperties.data"\n [debounceTime]="skyComponentProperties.debounceTime"\n [descriptorProperty]="skyComponentProperties.descriptorProperty"\n [propertiesToSearch]="skyComponentProperties.propertiesToSearch"\n [search]="skyComponentProperties.search"\n [searchFilters]="skyComponentProperties.searchFilters"\n [searchResultsLimit]="skyComponentProperties.searchResultsLimit"\n [searchResultTemplate]="skyComponentProperties.searchResultTemplate"\n [searchTextMinimumCharacters]="skyComponentProperties.searchTextMinimumCharacters"\n (selectionChange)="skyComponentProperties.selectionChange && skyComponentProperties.selectionChange($event)"\n >\n <input\n skyAutocomplete\n #skyCellEditorAutocomplete\n type="text"\n [(ngModel)]="currentSelection"\n [attr.aria-label]="\'sky_ag_grid_cell_editor_autocomplete_aria_label\' | skyLibResources:columnHeader:rowNumber"\n />\n </sky-autocomplete>\n</div>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["sky-autocomplete input{border:none;box-shadow:none}"]})],e)}(),P=function(e){function t(t){var r=e.call(this)||this;return r.themeSvc=t,r.skyComponentProperties={},r}return function(e,t){function r(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.agInit=function(e){var t,r=this;this.params=e,this.currentDate=this.params.value,this.skyComponentProperties=this.params.skyComponentProperties||{},this.columnWidth=this.params.column.getActualWidth(),this.columnWidthWithoutBorders=this.columnWidth-2,this.rowHeightWithoutBorders=this.params.node&&this.params.node.rowHeight-3,null===(t=this.themeSvc)||void 0===t||t.settingsChange.subscribe((function(e){"modern"===e.currentSettings.theme.name?(r.columnWidthWithoutBorders=r.columnWidth,r.rowHeightWithoutBorders=r.params.node&&r.params.node.rowHeight):(r.columnWidthWithoutBorders=r.columnWidth-2,r.rowHeightWithoutBorders=r.params.node&&r.params.node.rowHeight-3)}))},t.prototype.afterGuiAttached=function(){this.focusOnDatepickerInput()},t.prototype.getValue=function(){return this.datepickerInput.nativeElement.blur(),this.currentDate},t.prototype.focusOnDatepickerInput=function(){this.datepickerInput.nativeElement.focus()},t.ctorParameters=function(){return[{type:u.SkyThemeService,decorators:[{type:r.Optional}]}]},w([r.ViewChild("skyCellEditorDatepickerInput",{read:r.ElementRef})],t.prototype,"datepickerInput",void 0),t=w([r.Component({selector:"sky-ag-grid-cell-editor-datepicker",template:'<div\n class="sky-ag-grid-cell-editor-datepicker"\n [style.width.px]="columnWidthWithoutBorders"\n>\n <sky-datepicker\n data-sky-id="cell-datepicker"\n pickerClass="ag-custom-component-popup"\n >\n <input\n skyDatepickerInput\n [disabled]="skyComponentProperties.disabled"\n [minDate]="skyComponentProperties.minDate"\n [maxDate]="skyComponentProperties.maxDate"\n [dateFormat]="skyComponentProperties.dateFormat"\n [startingDay]="skyComponentProperties.startingDay"\n [skyDatepickerNoValidate]="skyComponentProperties.skyDatepickerNoValidate"\n [style.height.px]="rowHeightWithoutBorders"\n [(ngModel)]="currentDate"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,styles:[".sky-ag-grid-cell-editor-datepicker{position:relative;top:1px;left:1px}.sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{box-shadow:none;border-width:1px;border-style:solid;border-color:transparent #cdcfd2 transparent transparent}.sky-ag-grid-cell-editor-datepicker sky-datepicker .sky-input-group-datepicker-btn{border-radius:0}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870b8}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870b8}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}"]}),b(0,r.Optional())],t)}(d.PopupComponent);function x(e){return{ariaLabel:e.ariaLabel||"",autocompleteAttribute:e.autocompleteAttribute||"off",data:e.data||[],debounceTime:e.debounceTime||0,descriptorProperty:e.descriptorProperty||"name",disabled:e.disabled||!1,enableShowMore:e.enableShowMore||!1,idProperty:e.idProperty||void 0,placeholderText:e.placeholderText||"",propertiesToSearch:e.propertiesToSearch||void 0,search:e.search||void 0,searchFilters:e.searchFilters||[],searchResultsLimit:e.searchResultsLimit||void 0,searchResultTemplate:e.searchResultTemplate||void 0,searchTextMinimumCharacters:e.searchTextMinimumCharacters||1,selectMode:e.selectMode||void 0,showAddButton:e.showAddButton||!1,showMoreConfig:e.showMoreConfig||{},wrapperClass:"ag-custom-component-popup"}}var R,_,A=function(){function e(e,t){this.changeDetector=e,this.elementRef=t,this.isAlive=!0,this.lookupForm=new p.FormGroup({currentSelection:new p.FormControl({value:[],disabled:!1})})}return e.prototype.agInit=function(e){if(this.params=e,!Array.isArray(this.params.value))throw new Error("Lookup value must be an array");var t=this.lookupForm.get("currentSelection");t.setValue(this.params.value),this.params.skyComponentProperties.disabled&&t.disable(),this.skyComponentProperties=this.updateComponentProperties(this.params),this.changeDetector.markForCheck()},e.prototype.isCancelAfterEnd=function(){return this.isAlive=!1,this.changeDetector.detectChanges(),!1},e.prototype.getGui=function(){return this.elementRef.nativeElement},e.prototype.getValue=function(){return this.lookupForm.get("currentSelection").value},e.prototype.isPopup=function(){return!0},e.prototype.afterGuiAttached=function(){var e;null===(e=this.elementRef.nativeElement.querySelector(".sky-lookup-input"))||void 0===e||e.focus()},e.prototype.updateComponentProperties=function(e){return x(e.skyComponentProperties)},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.ElementRef}]},e=w([r.Component({selector:"sky-ag-grid-cell-editor-lookup",template:'<sky-input-box *ngIf="isAlive"\n [disabled]="skyComponentProperties?.disabled"\n [formGroup]="lookupForm"\n>\n <sky-lookup\n [ariaLabel]="skyComponentProperties?.ariaLabel"\n [autocompleteAttribute]="skyComponentProperties?.autocompleteAttribute"\n [data]="skyComponentProperties?.data"\n [debounceTime]="skyComponentProperties?.debounceTime"\n [descriptorProperty]="skyComponentProperties?.descriptorProperty"\n [enableShowMore]="skyComponentProperties?.enableShowMore"\n formControlName="currentSelection"\n [idProperty]="skyComponentProperties?.idProperty"\n [placeholderText]="skyComponentProperties?.placeholderText"\n [propertiesToSearch]="skyComponentProperties?.propertiesToSearch"\n [search]="skyComponentProperties?.search"\n [searchFilters]="skyComponentProperties?.searchFilters"\n [searchResultsLimit]="skyComponentProperties?.searchResultsLimit"\n [searchResultTemplate]="skyComponentProperties?.searchResultTemplate"\n [searchTextMinimumCharacters]="skyComponentProperties?.searchTextMinimumCharacters"\n [selectMode]="skyComponentProperties?.selectMode"\n [showAddButton]="skyComponentProperties?.showAddButton"\n [showMoreConfig]="skyComponentProperties?.showMoreConfig"\n [wrapperClass]="skyComponentProperties?.wrapperClass"\n >\n </sky-lookup>\n</sky-input-box>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}"]})],e)}(),I=function(){function e(){}return e.prototype.agInit=function(e){this.params=e,this.value=this.params.value,this.columnHeader=this.params.colDef.headerName,this.rowNumber=this.params.rowIndex+1,this.columnWidth=this.params.column.getActualWidth(),this.rowHeightWithoutBorders=this.params.node&&this.params.node.rowHeight-4},e.prototype.afterGuiAttached=function(){this.input.nativeElement.focus()},e.prototype.getValue=function(){return this.value},w([r.ViewChild("skyCellEditorNumber",{read:r.ElementRef})],e.prototype,"input",void 0),e=w([r.Component({selector:"sky-ag-grid-cell-editor-number",template:'<input\n type="number"\n [attr.aria-label]="\'skyux_ag_grid_cell_editor_number_aria_label\' | skyLibResources:columnHeader:rowNumber"\n [style.width.px]="columnWidth"\n [style.height.px]="rowHeightWithoutBorders"\n [(ngModel)]="value"\n #skyCellEditorNumber\n/>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["input{border:none;text-align:right}"]})],e)}(),T=function(){function e(){}return e.prototype.agInit=function(e){this.params=e,this.value=this.params.charPress||this.params.value,this.columnHeader=this.params.colDef.headerName,this.rowNumber=this.params.rowIndex+1,this.columnWidth=this.params.column.getActualWidth(),this.rowHeightWithoutBorders=this.params.node&&this.params.node.rowHeight-4},e.prototype.afterGuiAttached=function(){this.input.nativeElement.focus()},e.prototype.getValue=function(){return this.value},w([r.ViewChild("skyCellEditorText",{read:r.ElementRef})],e.prototype,"input",void 0),e=w([r.Component({selector:"sky-ag-grid-cell-editor-text",template:'<input\n type="text"\n [attr.aria-label]="\'skyux_ag_grid_cell_editor_text_aria_label\' | skyLibResources:columnHeader:rowNumber"\n [style.width.px]="columnWidth"\n [style.height.px]="rowHeightWithoutBorders"\n [(ngModel)]="value"\n #skyCellEditorText\n/>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["input{border:none;padding-left:11px}"]})],e)}(),M=function(){function e(e){this.changeDetector=e}return Object.defineProperty(e.prototype,"parameters",{set:function(e){this.agInit(e)},enumerable:!0,configurable:!0}),e.prototype.agInit=function(e){this.cellRendererParams=e,this.changeDetector.markForCheck()},e.prototype.isNumeric=function(e){return!isNaN(parseFloat(e))},e.prototype.refresh=function(e){return!1},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},w([r.Input()],e.prototype,"parameters",null),e=w([r.Component({selector:"sky-ag-grid-cell-renderer-currency-validator",template:'<sky-ag-grid-cell-validator-tooltip\n [params]="cellRendererParams"\n>\n <sky-ag-grid-cell-renderer-currency *ngIf="isNumeric(cellRendererParams.value); else rawValue"\n [params]="cellRendererParams"\n ></sky-ag-grid-cell-renderer-currency>\n <ng-template #rawValue>{{ cellRendererParams.value }}</ng-template>\n</sky-ag-grid-cell-validator-tooltip>\n',changeDetection:r.ChangeDetectionStrategy.OnPush})],e)}(),E=function(){function e(e){this.changeDetector=e,this.value="",this.summaryCount=0}return e.prototype.agInit=function(e){var t;this.summaryCount=(null===(t=e.value)||void 0===t?void 0:t.length)||0,this.value=""+e.valueFormatted,this.changeDetector.markForCheck()},e.prototype.refresh=function(e){return this.agInit(e),!0},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},e=w([r.Component({selector:"sky-cell-renderer-lookup",template:"<ng-container *ngIf=\"summaryCount > 5; else showValue\">\n {{ 'skyux_lookup_tokens_summary' | skyLibResources:summaryCount }}\n</ng-container>\n<ng-template #showValue>{{ value }}</ng-template>\n",changeDetection:r.ChangeDetectionStrategy.OnPush,styles:[":host{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"]})],e)}(),G=function(){function e(e){this.changeDetection=e}return e.prototype.agInit=function(e){var t=this;this.params=e,this.dataField=this.params.colDef&&this.params.colDef.field,this.rowNode=this.params.node,this.rowNumber=this.params.rowIndex+1,this.dataField?(this.checked=this.params.value,this.rowNode.setSelected(this.checked)):this.checked=this.rowNode.isSelected(),this.rowNode.addEventListener(d.RowNode.EVENT_ROW_SELECTED,(function(e){t.rowSelectedListener(e)}))},e.prototype.refresh=function(){return!1},e.prototype.updateRow=function(){this.rowNode.setSelected(this.checked),this.dataField&&(this.rowNode.data[this.dataField]=this.checked)},e.prototype.rowSelectedListener=function(e){this.checked=e.node.isSelected(),this.dataField&&(this.rowNode.data[this.dataField]=this.checked),this.changeDetection.markForCheck()},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},e=w([r.Component({selector:"sky-ag-grid-cell-renderer-row-selector",template:'<sky-checkbox\n data-sky-id="row-checkbox"\n tabindex="-1"\n [label]="\'skyux_ag_grid_row_selector_aria_label\' | skyLibResources:rowNumber"\n [attr.aria-label]="\'skyux_ag_grid_row_selector_aria_label\' | skyLibResources:rowNumber"\n [(ngModel)]="checked"\n (change)="updateRow()"\n>\n</sky-checkbox>\n\n',changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,styles:[".sky-ag-grid-cell-row-selector .sky-switch-control{top:-6px}"]})],e)}(),F=function(){function e(e){this.changeDetector=e}return Object.defineProperty(e.prototype,"params",{set:function(e){this.agInit(e)},enumerable:!0,configurable:!0}),e.prototype.agInit=function(e){var t;this.cellRendererParams=e,"function"==typeof(null===(t=e.colDef)||void 0===t?void 0:t.valueFormatter)?this.value=e.colDef.valueFormatter(e):this.value=e.value,this.changeDetector.markForCheck()},e.prototype.refresh=function(e){return!1},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},w([r.Input()],e.prototype,"params",null),e=w([r.Component({selector:"sky-ag-grid-cell-renderer-validator-tooltip",template:'<sky-ag-grid-cell-validator-tooltip [params]="cellRendererParams">\n {{ value }}\n</sky-ag-grid-cell-validator-tooltip>\n',changeDetection:r.ChangeDetectionStrategy.OnPush})],e)}();(R=e.SkyCellClass||(e.SkyCellClass={})).Autocomplete="sky-ag-grid-cell-autocomplete",R.Currency="sky-ag-grid-cell-currency",R.Date="sky-ag-grid-cell-date",R.Editable="sky-ag-grid-cell-editable",R.Invalid="sky-ag-grid-cell-invalid",R.Lookup="sky-ag-grid-cell-lookup",R.Number="sky-ag-grid-cell-number",R.RowSelector="sky-ag-grid-cell-row-selector",R.Text="sky-ag-grid-cell-text",R.Uneditable="sky-ag-grid-cell-uneditable",(_=e.SkyCellType||(e.SkyCellType={})).Autocomplete="skyCellAutocomplete",_.Currency="skyCellCurrency",_.CurrencyValidator="skyCellCurrencyValidator",_.Date="skyCellDate",_.Lookup="skyCellLookup",_.Number="skyCellNumber",_.NumberValidator="skyCellNumberValidator",_.RowSelector="skyCellRowSelector",_.Text="skyCellText",_.Validator="skyCellValidator",(e.SkyHeaderClass||(e.SkyHeaderClass={})).RightAligned="sky-ag-grid-header-right-aligned";var O=function(){function e(e){this.skyAdapterService=e}return e.prototype.getElementOrParentWithClass=function(e,t){return e&&e.classList.contains(t)?e:e.parentElement?this.getElementOrParentWithClass(e.parentElement,t):void 0},e.prototype.setFocusedElementById=function(e,t){var r=e.querySelector("#"+t);r&&r.focus()},e.prototype.getFocusedElement=function(){return document.activeElement},e.prototype.getNextFocusableElement=function(e,t,r){if(t){var o=this.skyAdapterService.getFocusableChildren(t),n=o.indexOf(e),i=r?n-1:n+1;if(!r&&o.length>=i||r&&i>=0)return o[i]}},e.prototype.focusOnFocusableChildren=function(e){var t=this.skyAdapterService.getFocusableChildren(e);t.length&&t[0].focus()},e.ctorParameters=function(){return[{type:o.SkyCoreAdapterService}]},e=w([r.Injectable()],e)}(),N=function(){function e(){this.skyComponentProperties={},this.numericOptions={}}return Object.defineProperty(e.prototype,"params",{set:function(e){this.agInit(e)},enumerable:!0,configurable:!0}),e.prototype.agInit=function(e){this.updateProperties(e)},e.prototype.refresh=function(e){return!1},e.prototype.updateProperties=function(e){var t;this._params=e,this.value=this._params.value,this.columnHeader=this._params.colDef&&this._params.colDef.headerName,this.rowNumber=this._params.rowIndex+1,this.columnWidth=null===(t=this._params.column)||void 0===t?void 0:t.getActualWidth(),this.rowHeightWithoutBorders=this._params.node&&this._params.node.rowHeight-4,this.skyComponentProperties=this._params.skyComponentProperties||{},this.skyComponentProperties.format="currency",this.skyComponentProperties.minDigits=2,this.skyComponentProperties.truncate=!1},w([r.Input()],e.prototype,"params",null),e=w([r.Component({selector:"sky-ag-grid-cell-renderer-currency",template:'<span\n [attr.aria-label]="\n \'sky_ag_grid_cell_renderer_currency_aria_label\'\n | skyLibResources: columnHeader:rowNumber\n "\n [style.width.px]="columnWidth"\n [style.height.px]="rowHeightWithoutBorders"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["input{border:none;padding-left:11px}"]})],e)}(),W=function(){function e(){this.skyComponentProperties={}}return e.prototype.agInit=function(e){this.params=e,this.value=this.params.value,this.columnHeader=this.params.colDef.headerName,this.rowNumber=this.params.rowIndex+1,this.columnWidth=this.params.column.getActualWidth(),this.rowHeightWithoutBorders=this.params.node&&this.params.node.rowHeight-4,this.skyComponentProperties=this.params.skyComponentProperties||{decimalPlaces:2,currencySymbol:"$"}},e.prototype.afterGuiAttached=function(){this.input.nativeElement.focus()},e.prototype.getValue=function(){return this.value},w([r.ViewChild("skyCellEditorCurrency",{read:r.ElementRef})],e.prototype,"input",void 0),e=w([r.Component({selector:"sky-ag-grid-cell-editor-currency",template:'<input\n type="text"\n [attr.aria-label]="\'skyux_ag_grid_cell_editor_currency_aria_label\' | skyLibResources:columnHeader:rowNumber"\n [style.width.px]="columnWidth"\n [style.height.px]="rowHeightWithoutBorders"\n [(ngModel)]="value"\n [skyAutonumeric]="skyComponentProperties"\n #skyCellEditorCurrency\n/>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["input{border:none;padding-left:11px}"]})],e)}();function L(e,t){return e&&t?e.name>t.name?1:e.name<t.name?-1:0:e?1:-1}function V(e){return e.value&&e.value.name}function U(e,t){var r=e,o=t;return"string"==typeof r&&(r=new Date(e)),"string"==typeof o&&(o=new Date(t)),r&&o?r>o?1:r<o?-1:0:r?1:-1}function H(e,t){return function(r){var o,n;return r.colDef&&"function"==typeof(null===(n=null===(o=r.colDef.cellRendererParams)||void 0===o?void 0:o.skyComponentProperties)||void 0===n?void 0:n.validator)&&!r.colDef.cellRendererParams.skyComponentProperties.validator(r.value,r.data,r.rowIndex)?{component:e,params:C({},r.colDef.cellRendererParams)}:t}}var j=1,B=function(){function t(e,t,r){var o=this;this.agGridAdapterService=e,this.themeSvc=t,this.resources=r,this.ngUnsubscribe=new l.Subject,this.themeSvc&&this.themeSvc.settingsChange.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return o.currentTheme=e.currentSettings}))}return t.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},t.prototype.getGridOptions=function(e){var t=this.getDefaultGridOptions(e);return this.mergeGridOptions(t,e.gridOptions)},t.prototype.getEditableGridOptions=function(e){var t=this.getDefaultEditableGridOptions(e);return this.mergeGridOptions(t,e.gridOptions)},t.prototype.mergeGridOptions=function(e,t){return C(C(C({},e),t),{columnTypes:C(C({},t.columnTypes),e.columnTypes),defaultColDef:C(C(C({},e.defaultColDef),t.defaultColDef),{cellClassRules:e.defaultColDef.cellClassRules}),icons:C(C({},e.icons),t.icons)})},t.prototype.getDefaultGridOptions=function(t){var r,o,n,i,a,s,l,c,u,d,p,h,m,g,y,f,k=this;function v(e){return function(t){var r=t.colDef.editable;if("function"==typeof r){var o=t.columnApi.getColumn(t.colDef.field);r=r(C(C({},t),{column:o}))}return e?!r:r}}var w=((r={})[e.SkyCellClass.Editable]=v(),r[e.SkyCellClass.Uneditable]=v(!0),r);var b=((o={})[e.SkyCellClass.Invalid]=function(e){var t,r;return!(!e.colDef||"function"!=typeof(null===(r=null===(t=e.colDef.cellRendererParams)||void 0===t?void 0:t.skyComponentProperties)||void 0===r?void 0:r.validator)||e.colDef.cellRendererParams.skyComponentProperties.validator(e.value,e.data,e.rowIndex))},o),S={columnTypes:(n={},n[e.SkyCellType.Autocomplete]={cellClassRules:C((i={},i[e.SkyCellClass.Autocomplete]="true",i),w),cellEditorFramework:D,valueFormatter:V,comparator:L,minWidth:185},n[e.SkyCellType.Currency]={cellClassRules:C(C((a={},a[e.SkyCellClass.Currency]="true",a),b),w),cellRendererSelector:H("sky-ag-grid-cell-renderer-currency-validator",{component:"sky-ag-grid-cell-renderer-currency"}),cellEditorFramework:W,headerClass:e.SkyHeaderClass.RightAligned,minWidth:185},n[e.SkyCellType.Date]={cellClassRules:C((s={},s[e.SkyCellClass.Date]="true",s),w),cellEditorFramework:P,comparator:U,minWidth:"modern"===(null===(h=null===(p=this.currentTheme)||void 0===p?void 0:p.theme)||void 0===h?void 0:h.name)?180:160,valueFormatter:function(e){return k.dateFormatter(e,t.locale)}},n[e.SkyCellType.Lookup]={cellClassRules:C((l={},l[e.SkyCellClass.Lookup]="true",l),w),cellEditorFramework:A,cellRendererFramework:E,valueFormatter:function(e){var t=x(e);return(e.value||[]).map((function(e){return e[t.descriptorProperty]})).filter((function(e){return""!==e&&void 0!==e})).join("; ")},minWidth:185},n[e.SkyCellType.Number]={cellClassRules:C((c={},c[e.SkyCellClass.Number]="true",c),w),cellEditorFramework:I,headerClass:e.SkyHeaderClass.RightAligned},n[e.SkyCellType.RowSelector]={cellClassRules:(u={},u[e.SkyCellClass.RowSelector]="true",u[e.SkyCellClass.Uneditable]="true",u),cellRendererFramework:G,headerName:"",minWidth:55,maxWidth:55,sortable:!1,width:55},n[e.SkyCellType.Text]={cellClassRules:C((d={},d[e.SkyCellClass.Text]="true",d),w),cellEditorFramework:T},n[e.SkyCellType.Validator]={cellClassRules:C(C({},b),w),cellRendererSelector:H("sky-ag-grid-cell-renderer-validator-tooltip")},n),defaultColDef:{cellClassRules:w,minWidth:100,resizable:!0,sortable:!0,suppressKeyboardEvent:function(e){return k.suppressTab(e)}},domLayout:"autoHeight",enterMovesDownAfterEdit:!0,frameworkComponents:{"sky-ag-grid-cell-renderer-currency":N,"sky-ag-grid-cell-renderer-currency-validator":M,"sky-ag-grid-cell-renderer-validator-tooltip":F},getRowNodeId:function(e){return"id"in e&&e.id?""+e.id:""+j++},getRowClass:function(e){return e.node.id?"sky-ag-grid-row-"+e.node.id:void 0},headerHeight:"modern"===(null===(g=null===(m=this.currentTheme)||void 0===m?void 0:m.theme)||void 0===g?void 0:g.name)?60:37,icons:{sortDescending:this.getIconTemplate("caret-down"),sortAscending:this.getIconTemplate("caret-up"),columnMoveMove:this.getIconTemplate("arrows"),columnMoveHide:this.getIconTemplate("arrows"),columnMoveLeft:this.getIconTemplate("arrows"),columnMoveRight:this.getIconTemplate("arrows"),columnMovePin:this.getIconTemplate("arrows")},onCellFocused:function(){return k.onCellFocused()},rowHeight:"modern"===(null===(f=null===(y=this.currentTheme)||void 0===y?void 0:y.theme)||void 0===f?void 0:f.name)?60:38,rowMultiSelectWithClick:!0,rowSelection:"multiple",singleClickEdit:!0,sortingOrder:["desc","asc",null],stopEditingWhenGridLosesFocus:!1,suppressRowClickSelection:!0,suppressDragLeaveHidesColumns:!0};return S.columnTypes[e.SkyCellType.CurrencyValidator]=C(C({},S.columnTypes[e.SkyCellType.Currency]),{cellRendererParams:{skyComponentProperties:{validator:function(e,t,r){return!!(""+(e||"")).match(/^[^0-9]*(\d+[,.]?)+\d*[^0-9]*$/)},validatorMessage:"Please enter a valid currency"}}}),this.resources&&this.resources.getString("sky_ag_grid_cell_renderer_currency_validator_message").subscribe((function(t){S.columnTypes[e.SkyCellType.CurrencyValidator].cellRendererParams.skyComponentProperties.validatorMessage=t})),S.columnTypes[e.SkyCellType.NumberValidator]=C(C(C({},S.columnTypes[e.SkyCellType.Validator]),S.columnTypes[e.SkyCellType.Number]),{cellClassRules:C(C({},S.columnTypes[e.SkyCellType.Validator].cellClassRules),S.columnTypes[e.SkyCellType.Number].cellClassRules),cellRendererParams:{skyComponentProperties:{validator:function(e,t,r){return!!e&&!isNaN(parseFloat(e))},validatorMessage:"Please enter a valid number"}}}),this.resources&&this.resources.getString("sky_ag_grid_cell_renderer_number_validator_message").subscribe((function(t){S.columnTypes[e.SkyCellType.NumberValidator].cellRendererParams.skyComponentProperties.validatorMessage=t})),S},t.prototype.onCellFocused=function(){var e=this.agGridAdapterService.getFocusedElement();this.agGridAdapterService.focusOnFocusableChildren(e)},t.prototype.getDefaultEditableGridOptions=function(e){var t=this.getDefaultGridOptions(e);return t.rowSelection="none",t},t.prototype.dateFormatter=function(e,t){void 0===t&&(t="en-us");var r=e.value;r&&"string"==typeof r&&(r=new Date(e.value));var o=r&&r.toLocaleDateString&&r.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"});if(r&&r.getTime&&!isNaN(r.getTime()))return o},t.prototype.getIconTemplate=function(e){return'<i class="fa fa-'+e+'"></i>'},t.prototype.suppressTab=function(e){if("Tab"===e.event.code){if(e.editing){var t=this.agGridAdapterService.getFocusedElement(),r=this.agGridAdapterService.getElementOrParentWithClass(t,"ag-cell"),o=this.agGridAdapterService.getElementOrParentWithClass(t,"ag-popup-editor"),n=r||o;return!!this.agGridAdapterService.getNextFocusableElement(t,n,e.event.shiftKey)}return!0}return!1},t.ctorParameters=function(){return[{type:O},{type:u.SkyThemeService,decorators:[{type:r.Optional}]},{type:s.SkyLibResourcesService,decorators:[{type:r.Optional}]}]},t=w([r.Injectable(),b(1,r.Optional()),b(2,r.Optional())],t)}(),q=0,z=function(){function e(e,t,r){this.adapterService=e,this.changeDetector=t,this.elementRef=r,this._viewkeeperClasses=[],q++,this.afterAnchorId="sky-ag-grid-nav-anchor-after-"+q,this.beforeAnchorId="sky-ag-grid-nav-anchor-before-"+q,this.gridId="sky-ag-grid-"+q}return Object.defineProperty(e.prototype,"viewkeeperClasses",{get:function(){return this._viewkeeperClasses},set:function(e){this._viewkeeperClasses=e,this.changeDetector.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.agGrid.gridOptions&&"autoHeight"===this.agGrid.gridOptions.domLayout&&this.viewkeeperClasses.push(".ag-header")},e.prototype.onGridKeydown=function(e){if(this.agGrid&&!this.isInEditMode&&"Tab"===e.key){var t=e.shiftKey?this.beforeAnchorId:this.afterAnchorId;this.adapterService.setFocusedElementById(this.elementRef.nativeElement,t)}},e.prototype.onAnchorFocus=function(e){var t=this.gridId,r=e.relatedTarget,o=r&&r.id,n=r&&!!this.adapterService.getElementOrParentWithClass(r,"ag-cell");if(o!==t&&!n){var i=this.agGrid.columnApi.getAllDisplayedColumns(),a=i&&i[0],s=this.agGrid.api.getFirstDisplayedRow();a&&s>=0&&this.agGrid.api.setFocusedCell(s,a)}},Object.defineProperty(e.prototype,"isInEditMode",{get:function(){if(this.agGrid&&this.agGrid.api){if(this.agGrid.api.getEditingCells().length>0)return!0;var e=!1;return this.agGrid.api.forEachDetailGridInfo((function(t){t.api.getEditingCells().length>0&&(e=!0)})),e}return!1},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:O},{type:r.ChangeDetectorRef},{type:r.ElementRef}]},w([r.ContentChild(n.AgGridAngular,{static:!0})],e.prototype,"agGrid",void 0),e=w([r.Component({selector:"sky-ag-grid-wrapper",template:'<span\n class="nav-anchor"\n tabindex="0"\n [id]="beforeAnchorId"\n (focusin)="onAnchorFocus($event)"\n>\n</span>\n<div\n class="sky-ag-grid"\n tabindex="0"\n [id]="gridId"\n [skyViewkeeper]="viewkeeperClasses"\n (keydown)="onGridKeydown($event)"\n>\n <ng-content></ng-content>\n</div>\n<span\n tabindex="0"\n class="nav-anchor"\n [id]="afterAnchorId"\n (focusin)="onAnchorFocus($event)"\n>\n</span>\n',changeDetection:r.ChangeDetectionStrategy.OnPush})],e)}(),$=function(){function e(){this.resources={"EN-US":{sky_ag_grid_row_selector_aria_label:"Row selector for row {0}",sky_ag_grid_cell_editor_number_aria_label:"Editable number {0} for row {1}",sky_ag_grid_cell_editor_text_aria_label:"Editable text {0} for row {1}",sky_ag_grid_cell_editor_autocomplete_aria_label:"Editable autocomplete {0} for row {1}",sky_ag_grid_cell_renderer_currency_aria_label:"Editable currency {0} for row {1}",sky_ag_grid_cell_renderer_number_validator_message:"Please enter a valid number",sky_ag_grid_cell_renderer_currency_validator_message:"Please enter a valid currency",skyux_lookup_tokens_summary:"{0} items selected"}}}return e.prototype.getString=function(e,t){return s.getStringForLocale(this.resources,e.locale,t)},e=w([r.Injectable()],e)}(),K=function(){function e(){}return e=w([r.NgModule({providers:[{provide:s.SKY_LIB_RESOURCES_PROVIDERS,useClass:$,multi:!0}],exports:[s.SkyI18nModule]})],e)}(),Y=function(){function e(){}return e=w([r.NgModule({imports:[p.FormsModule,K,h.SkyAutocompleteModule],declarations:[D],exports:[D]})],e)}(),Z=function(){function e(){}return e=w([r.NgModule({imports:[m.SkyDatepickerModule,p.FormsModule],declarations:[P],exports:[P]})],e)}(),J=function(){function e(){}return e=w([r.NgModule({declarations:[A],exports:[A],imports:[t.CommonModule,p.ReactiveFormsModule,K,g.SkyInputBoxModule,h.SkyLookupModule]})],e)}(),Q=function(){function e(){}return e=w([r.NgModule({imports:[K,p.FormsModule],declarations:[I],exports:[I]})],e)}(),X=function(){function e(){}return e=w([r.NgModule({imports:[K,p.FormsModule],declarations:[T],exports:[T]})],e)}(),ee=function(){function e(){}return e=w([r.NgModule({declarations:[E],exports:[E],imports:[t.CommonModule,K]})],e)}(),te=function(){function e(){}return e=w([r.NgModule({imports:[K,g.SkyCheckboxModule,p.FormsModule],declarations:[G],exports:[G]})],e)}(),re=function(){function e(e,t){this.changeDetector=e,this.dataManagerSvc=t,this.ngUnsubscribe=new l.Subject}return e.prototype.ngAfterContentInit=function(){var e=this;this.dataManagerSvc.setViewkeeperClasses(this.viewId,[".ag-header"]),this.viewConfig=this.dataManagerSvc.getViewById(this.viewId),this.checkForAgGrid(),this.checkForSkyAgGridWrapper(),this.agGridList.changes.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){return e.checkForAgGrid()})),this.skyAgGridWrapperList.changes.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){return e.checkForSkyAgGridWrapper()}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.checkForAgGrid=function(){var e=this.agGridList.length;0===e?this.unregisterAgGrid():this.agGridList.first!==this.currentAgGrid&&this.registerAgGrid(),e>1&&console.warn("More than one ag-grid child component was found. Using the first ag-Grid.")},e.prototype.checkForSkyAgGridWrapper=function(){var e=this.skyAgGridWrapperList.length;0===e?this.unregisterSkyAgGridWrapper():this.skyAgGridWrapperList.first!==this.currentSkyAgGridWrapper&&this.registerSkyAgGridWrapper(),e>1&&console.warn("More than one ag-grid child component was found. Using the first ag-Grid.")},e.prototype.unregisterAgGrid=function(){this.currentAgGrid=void 0,this.dataStateSub&&this.dataStateSub.unsubscribe()},e.prototype.unregisterSkyAgGridWrapper=function(){this.currentSkyAgGridWrapper=void 0},e.prototype.registerSkyAgGridWrapper=function(){var e=this;this.unregisterSkyAgGridWrapper(),this.currentSkyAgGridWrapper=this.skyAgGridWrapperList.first,setTimeout((function(){e.currentSkyAgGridWrapper&&(e.currentSkyAgGridWrapper.viewkeeperClasses=[])}))},e.prototype.registerAgGrid=function(){var e=this;this.unregisterAgGrid();var t,r=this.agGridList.first;this.currentAgGrid=r,r.gridReady.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.viewConfig.onSelectAllClick=e.selectAll.bind(e),e.viewConfig.onClearAllClick=e.clearAll.bind(e),e.dataManagerSvc.updateViewConfig(e.viewConfig),e.dataStateSub=e.dataManagerSvc.getDataStateUpdates(e.viewConfig.id).pipe(c.takeUntil(e.ngUnsubscribe)).subscribe((function(t){e.currentDataState=t,e.displayColumns(t)})),r.api.sizeColumnsToFit()})),r.columnMoved.pipe(c.takeUntil(this.ngUnsubscribe),c.filter((function(e){return!["gridInitializing","uiColumnResized","uiColumnDragged","api"].includes(e.source)}))).subscribe((function(t){e.updateColumnsInCurrentDataState(t.columnApi)})),r.dragStarted.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(r){t=e.getColumnOrder(r.columnApi)})),r.dragStopped.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(r){var o=e.getColumnOrder(r.columnApi);t.findIndex((function(e,t){return e!==o[t]}))>-1&&e.updateColumnsInCurrentDataState(r.columnApi)})),r.rowSelected.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(t){var r=t.node,o=e.currentDataState.selectedIds||[],n=o.indexOf(r.data.id);r.isSelected()&&-1===n?o.push(r.data.id):r.isSelected()||-1===n||o.splice(n,1),e.currentDataState.selectedIds=o,e.dataManagerSvc.updateDataState(e.currentDataState,e.viewConfig.id),e.changeDetector.markForCheck()})),r.sortChanged.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){var t,o=r.api.getSortModel();if(o.length){var n=o[0],i=r.columnApi.getColumn(n.colId),a=e.dataManagerSvc.getCurrentDataManagerConfig();t=a.sortOptions?a.sortOptions.find((function(e){return e.propertyName===i.getColDef().field&&e.descending===("desc"===n.sort)})):void 0}e.currentDataState.activeSortOption=t,e.dataManagerSvc.updateDataState(e.currentDataState,e.viewConfig.id)}))},e.prototype.updateColumnsInCurrentDataState=function(e){var t=this.getColumnOrder(e),r=this.currentDataState.getViewStateById(this.viewConfig.id);r.displayedColumnIds=t,this.dataManagerSvc.updateDataState(this.currentDataState.addOrUpdateView(this.viewConfig.id,r),this.viewConfig.id)},e.prototype.getColumnOrder=function(e){return e.getAllDisplayedVirtualColumns().map((function(e){return e.getColDef().colId}))},e.prototype.displayColumns=function(e){var t,r,o=this.currentAgGrid,n=e.getViewStateById(this.viewConfig.id),i=[];n.displayedColumnIds&&(i=n.displayedColumnIds);var a=o.columnApi.getAllColumns();try{for(var s=S(a),l=s.next();!l.done;l=s.next()){var c=l.value.getColId(),u=i.indexOf(c);o.columnApi.setColumnVisible(c,-1!==u),o.columnApi.moveColumn(c,u)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}},e.prototype.selectAll=function(){this.agGridList.first.api.selectAll()},e.prototype.clearAll=function(){this.agGridList.first.api.deselectAll()},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:i.SkyDataManagerService}]},w([r.Input()],e.prototype,"viewId",void 0),w([r.ContentChildren(n.AgGridAngular,{descendants:!0})],e.prototype,"agGridList",void 0),w([r.ContentChildren(z,{descendants:!0})],e.prototype,"skyAgGridWrapperList",void 0),e=w([r.Directive({selector:"[skyAgGridDataManagerAdapter]"})],e)}(),oe=function(){function e(e,t){this.changeDetector=e,this.zone=t,this.indicatorShouldShow=!0,this.popoverMessageStream=new l.Subject}return Object.defineProperty(e.prototype,"params",{set:function(e){var t,r,o,n,i,a=this;this.cellRendererParams=e,null===(t=this.cellRendererParams.api)||void 0===t||t.addEventListener(d.Events.EVENT_CELL_FOCUSED,(function(e){e.column.getColId()===a.cellRendererParams.column.getColId()&&e.rowIndex===a.cellRendererParams.rowIndex||a.hidePopover()})),null===(r=this.cellRendererParams.eGridCell)||void 0===r||r.addEventListener("keyup",(function(e){["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"].includes(e.key)&&a.showPopover()})),null===(o=this.cellRendererParams.api)||void 0===o||o.addEventListener(d.Events.EVENT_CELL_EDITING_STARTED,(function(){a.hidePopover()})),"function"==typeof(null===(n=this.cellRendererParams.skyComponentProperties)||void 0===n?void 0:n.validatorMessage)?this.validatorMessage=this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value,this.cellRendererParams.data,this.cellRendererParams.rowIndex):this.validatorMessage=null===(i=this.cellRendererParams.skyComponentProperties)||void 0===i?void 0:i.validatorMessage,this.changeDetector.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.hideIndicator=function(){var e=this;this.zone.run((function(){e.indicatorShouldShow=!1,e.changeDetector.markForCheck()}))},e.prototype.hidePopover=function(){this.popoverMessageStream.next({type:f.SkyPopoverMessageType.Close})},e.prototype.showIndicator=function(){var e=this;this.zone.run((function(){e.indicatorShouldShow=!0,e.changeDetector.markForCheck()}))},e.prototype.showPopover=function(){this.popoverMessageStream.next({type:f.SkyPopoverMessageType.Open})},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.NgZone}]},w([r.Input()],e.prototype,"params",null),e=w([r.Component({selector:"sky-ag-grid-cell-validator-tooltip",template:'<div\n [skyPopover]="validatorPopover"\n [skyPopoverMessageStream]="popoverMessageStream"\n class="sky-validator-cell"\n>\n <ng-content></ng-content>\n <sky-status-indicator *ngIf="indicatorShouldShow"\n descriptionType="none"\n indicatorType="danger"\n class="sky-pull-right"\n ></sky-status-indicator>\n</div>\n<sky-popover\n #validatorPopover\n (popoverClosed)="showIndicator()"\n (popoverOpened)="hideIndicator()"\n popoverType="danger"\n>\n {{ validatorMessage }}\n</sky-popover>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:[":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:0}"]})],e)}(),ne=function(){function e(){}return e=w([r.NgModule({declarations:[oe],exports:[oe],imports:[t.CommonModule,f.SkyPopoverModule,y.SkyStatusIndicatorModule]})],e)}(),ie=function(){function e(){}return e=w([r.NgModule({imports:[t.CommonModule,K,ne,p.FormsModule,o.SkyNumericModule],declarations:[N,M],exports:[N,M]})],e)}(),ae=function(){function e(){}return w([r.ViewChildren("inlineDeleteRef")],e.prototype,"inlineDeleteRefs",void 0),w([r.ViewChild("inlineDeleteTemplateRef",{read:r.TemplateRef})],e.prototype,"inlineDeleteTemplateRef",void 0),e=w([r.Component({template:'\n <ng-template\n let-row\n let-tableWidth="tableWidth()"\n let-getRowDeleteItem="getRowDeleteItem"\n let-cancelRowDelete="cancelRowDelete"\n let-confirmRowDelete="confirmRowDelete"\n #inlineDeleteTemplateRef\n >\n <div\n class="sky-ag-grid-row-delete"\n [id]="\'row-delete-ref-\' + row.id"\n [ngStyle]=\'{\n "height": row.rowHeight + "px",\n "position": "fixed",\n "width": tableWidth + "px"\n }\'\n #inlineDeleteRef\n >\n <sky-inline-delete\n [pending]="getRowDeleteItem(row).pending"\n (cancelTriggered)="cancelRowDelete(row)"\n (deleteTriggered)="confirmRowDelete(row)"\n ></sky-inline-delete>\n </div>\n </ng-template>\n '})],e)}(),se=function(){function e(e,t,o,n,i,a){this.affixService=e,this.changeDetector=t,this.elementRef=o,this.resolver=n,this.overlayService=i,this.viewContainerRef=a,this.rowDeleteCancel=new r.EventEmitter,this.rowDeleteConfirm=new r.EventEmitter,this.rowDeleteIdsChange=new r.EventEmitter,this.rowDeleteConfigs=[],this.ngUnsubscribe=new l.Subject,this.rowDeleteContents={}}return Object.defineProperty(e.prototype,"rowDeleteIds",{get:function(){return this._rowDeleteIds},set:function(e){var t,r,o,n,i,a,s=this;if(this._rowDeleteIds=e,e){var l=function(e){var t=c.rowDeleteConfigs.find((function(t){return t.id===e}));if(t)t.pending=!1;else{c.rowDeleteConfigs.push({id:e,pending:!1});var r=c.overlayService.create({enableScroll:!0,showBackdrop:!1,closeOnNavigation:!0,enableClose:!1,enablePointerEvents:!0});r.attachTemplate(c.rowDeleteComponent.inlineDeleteTemplateRef,{$implicit:c.agGrid.api.getRowNode(e),tableWidth:function(){return s.tableWidth},getRowDeleteItem:function(e){return s.getRowDeleteItem(e)},cancelRowDelete:function(e){return s.cancelRowDelete(e)},confirmRowDelete:function(e){return s.confirmRowDelete(e)}}),r.componentRef.instance.zIndex="998",setTimeout((function(){var t=s.rowDeleteComponent.inlineDeleteRefs.toArray().find((function(t){return t.nativeElement.id==="row-delete-ref-"+e})),o=s.affixService.createAffixer(t);s.affixToRow(o,e),s.rowDeleteContents[e]={affixer:o,overlay:r}}))}},c=this;try{for(var u=S(e),d=u.next();!d.done;d=u.next()){l(d.value)}}catch(e){o={error:e}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}try{for(var p=S(this.rowDeleteConfigs),h=p.next();!h.done;h=p.next()){y=h.value;e.indexOf(y.id)<0&&this.destroyRowDelete(y.id)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}this.changeDetector.markForCheck()}else{try{for(var m=S(this.rowDeleteConfigs),g=m.next();!g.done;g=m.next()){var y=g.value;this.destroyRowDelete(y.id)}}catch(e){t={error:e}}finally{try{g&&!g.done&&(r=m.return)&&r.call(m)}finally{if(t)throw t.error}}this.changeDetector.markForCheck()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tableWidth",{get:function(){return this.elementRef.nativeElement.querySelectorAll(".sky-ag-grid")[0].offsetWidth},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){var e=this,t=this.resolver.resolveComponentFactory(ae);this.rowDeleteComponent=this.viewContainerRef.createComponent(t).instance,this.agGrid.rowDataChanged.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.updateRowDeleteStates()})),this.agGrid.rowDataUpdated.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.updateRowDeleteStates()})),this.agGrid.sortChanged.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.updateRowDeleteStates()})),this.agGrid.filterChanged.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.updateRowDeleteStates()})),this.agGrid.getRowNodeId=function(e){return e.id.toString()}},e.prototype.ngOnDestroy=function(){var e=this;this.ngUnsubscribe.next(),this.ngUnsubscribe.complete(),Object.keys(this.rowDeleteContents).forEach((function(t){e.destroyRowDelete(t)}))},e.prototype.cancelRowDelete=function(e){this.rowDeleteConfigs=this.rowDeleteConfigs.filter((function(t){return t.id!==e.id})),this.rowDeleteCancel.emit({id:e.id}),this.destroyRowDelete(e.id)},e.prototype.confirmRowDelete=function(e){this.rowDeleteConfigs.find((function(t){return t.id===e.id})).pending=!0,this.rowDeleteConfirm.emit({id:e.id})},e.prototype.getRowDeleteItem=function(e){return this.rowDeleteConfigs.find((function(t){return t.id===e.id}))},e.prototype.affixToRow=function(e,t){var r=this.elementRef.nativeElement.querySelector('\n [row-id="'+t+'"] div[aria-colindex="1"],\n .ag-row.sky-ag-grid-row-'+t+' div[aria-colindex="1"]\n ');if(!r)for(var n=this.elementRef.nativeElement.querySelectorAll('[row-id="'+t+'"] > div'),i=0;i<n.length;i++)if(n[i].querySelector('[aria-colindex="1"]')){r=n[i];break}e.affixTo(r,{autoFitContext:o.SkyAffixAutoFitContext.Viewport,isSticky:!0,placement:"above",verticalAlignment:"top",horizontalAlignment:"left",enableAutoFit:!1})},e.prototype.destroyRowDelete=function(e){var t,r=this.rowDeleteContents[e];r&&(r.affixer.destroy(),this.overlayService.close(r.overlay),delete this.rowDeleteContents[e],this.rowDeleteConfigs=this.rowDeleteConfigs.filter((function(t){return t.id!==e})),this._rowDeleteIds=null===(t=this.rowDeleteIds)||void 0===t?void 0:t.filter((function(t){return t!==e})),this.rowDeleteIdsChange.emit(this._rowDeleteIds))},e.prototype.updateRowDeleteStates=function(){var e=this;this.rowDeleteConfigs.forEach((function(t){e.agGrid.api.getRowNode(t.id)?e.affixToRow(e.rowDeleteContents[t.id].affixer,t.id):e.destroyRowDelete(t.id)})),this.changeDetector.markForCheck()},e.ctorParameters=function(){return[{type:o.SkyAffixService},{type:r.ChangeDetectorRef},{type:r.ElementRef},{type:r.ComponentFactoryResolver},{type:o.SkyOverlayService},{type:r.ViewContainerRef}]},w([r.Input()],e.prototype,"rowDeleteIds",null),w([r.Output()],e.prototype,"rowDeleteCancel",void 0),w([r.Output()],e.prototype,"rowDeleteConfirm",void 0),w([r.Output()],e.prototype,"rowDeleteIdsChange",void 0),w([r.ContentChild(n.AgGridAngular)],e.prototype,"agGrid",void 0),e=w([r.Directive({selector:"[skyAgGridRowDelete]"})],e)}(),le=function(){function e(){}return e=w([r.NgModule({imports:[K,p.FormsModule,k.SkyAutonumericModule],declarations:[W],exports:[W]})],e)}(),ce=function(){function e(){}return e=w([r.NgModule({declarations:[F],exports:[F],imports:[ne]})],e)}(),ue=function(){function e(){}return e=w([r.NgModule({declarations:[re,ae,se,z],imports:[n.AgGridModule,t.CommonModule,Y,Z,J,Q,le,ie,ee,te,ce,ne,X,o.SkyCoreAdapterModule,i.SkyDataManagerModule,a.SkyInlineDeleteModule,o.SkyViewkeeperModule],exports:[re,ae,se,z],providers:[B,O],entryComponents:[D,P,A,I,W,N,M,E,G,F,T,ae]})],e)}();e.SkyAgGridModule=ue,e.SkyAgGridService=B,e.ɵa=re,e.ɵb=z,e.ɵba=ce,e.ɵbb=F,e.ɵbc=X,e.ɵbd=T,e.ɵc=O,e.ɵd=ae,e.ɵe=se,e.ɵf=Y,e.ɵg=K,e.ɵh=$,e.ɵi=D,e.ɵj=Z,e.ɵk=P,e.ɵl=J,e.ɵm=A,e.ɵn=Q,e.ɵo=I,e.ɵp=le,e.ɵq=W,e.ɵr=ie,e.ɵs=ne,e.ɵt=oe,e.ɵu=N,e.ɵv=M,e.ɵw=ee,e.ɵx=E,e.ɵy=te,e.ɵz=G,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var v=function(e,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var C=function(){return(C=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function w(e,t,r,o){var n,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(i<3?n(a):i>3?n(t,r,a):n(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function b(e,t){return function(r,o){t(r,o,e)}}function S(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var D=function(){function e(){this.skyComponentProperties={}}return e.prototype.agInit=function(e){this.params=e,this.currentSelection=this.params.value,this.columnHeader=this.params.colDef&&this.params.colDef.headerName,this.rowNumber=this.params.rowIndex+1,this.skyComponentProperties=this.params.skyComponentProperties||{}},e.prototype.afterGuiAttached=function(){this.input.nativeElement.focus()},e.prototype.getValue=function(){return this.currentSelection},w([r.ViewChild("skyCellEditorAutocomplete",{read:r.ElementRef})],e.prototype,"input",void 0),e=w([r.Component({selector:"sky-ag-grid-cell-editor-autocomplete",template:'<div\n class="sky-ag-grid-cell-editor-autocomplete"\n>\n <sky-autocomplete\n [data]="skyComponentProperties.data"\n [debounceTime]="skyComponentProperties.debounceTime"\n [descriptorProperty]="skyComponentProperties.descriptorProperty"\n [propertiesToSearch]="skyComponentProperties.propertiesToSearch"\n [search]="skyComponentProperties.search"\n [searchFilters]="skyComponentProperties.searchFilters"\n [searchResultsLimit]="skyComponentProperties.searchResultsLimit"\n [searchResultTemplate]="skyComponentProperties.searchResultTemplate"\n [searchTextMinimumCharacters]="skyComponentProperties.searchTextMinimumCharacters"\n (selectionChange)="skyComponentProperties.selectionChange && skyComponentProperties.selectionChange($event)"\n >\n <input\n skyAutocomplete\n #skyCellEditorAutocomplete\n type="text"\n [(ngModel)]="currentSelection"\n [attr.aria-label]="\'sky_ag_grid_cell_editor_autocomplete_aria_label\' | skyLibResources:columnHeader:rowNumber"\n />\n </sky-autocomplete>\n</div>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["sky-autocomplete input{border:none;box-shadow:none}"]})],e)}(),P=function(e){function t(t){var r=e.call(this)||this;return r.themeSvc=t,r.skyComponentProperties={},r}return function(e,t){function r(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.agInit=function(e){var t,r=this;this.params=e,this.currentDate=this.params.value,this.skyComponentProperties=this.params.skyComponentProperties||{},this.columnWidth=this.params.column.getActualWidth(),this.columnWidthWithoutBorders=this.columnWidth-2,this.rowHeightWithoutBorders=this.params.node&&this.params.node.rowHeight-3,null===(t=this.themeSvc)||void 0===t||t.settingsChange.subscribe((function(e){"modern"===e.currentSettings.theme.name?(r.columnWidthWithoutBorders=r.columnWidth,r.rowHeightWithoutBorders=r.params.node&&r.params.node.rowHeight):(r.columnWidthWithoutBorders=r.columnWidth-2,r.rowHeightWithoutBorders=r.params.node&&r.params.node.rowHeight-3)}))},t.prototype.afterGuiAttached=function(){this.focusOnDatepickerInput()},t.prototype.getValue=function(){return this.datepickerInput.nativeElement.blur(),this.currentDate},t.prototype.focusOnDatepickerInput=function(){this.datepickerInput.nativeElement.focus()},t.ctorParameters=function(){return[{type:u.SkyThemeService,decorators:[{type:r.Optional}]}]},w([r.ViewChild("skyCellEditorDatepickerInput",{read:r.ElementRef})],t.prototype,"datepickerInput",void 0),t=w([r.Component({selector:"sky-ag-grid-cell-editor-datepicker",template:'<div\n class="sky-ag-grid-cell-editor-datepicker"\n [style.width.px]="columnWidthWithoutBorders"\n>\n <sky-datepicker\n data-sky-id="cell-datepicker"\n pickerClass="ag-custom-component-popup"\n >\n <input\n skyDatepickerInput\n [disabled]="skyComponentProperties.disabled"\n [minDate]="skyComponentProperties.minDate"\n [maxDate]="skyComponentProperties.maxDate"\n [dateFormat]="skyComponentProperties.dateFormat"\n [startingDay]="skyComponentProperties.startingDay"\n [skyDatepickerNoValidate]="skyComponentProperties.skyDatepickerNoValidate"\n [style.height.px]="rowHeightWithoutBorders"\n [(ngModel)]="currentDate"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,styles:[".sky-ag-grid-cell-editor-datepicker{position:relative;top:1px;left:1px}.sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{box-shadow:none;border-width:1px;border-style:solid;border-color:transparent #cdcfd2 transparent transparent}.sky-ag-grid-cell-editor-datepicker sky-datepicker .sky-input-group-datepicker-btn{border-radius:0}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870b8}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870b8}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}"]}),b(0,r.Optional())],t)}(d.PopupComponent);function x(e){return{ariaLabel:e.ariaLabel||"",autocompleteAttribute:e.autocompleteAttribute||"off",data:e.data||[],debounceTime:e.debounceTime||0,descriptorProperty:e.descriptorProperty||"name",disabled:e.disabled||!1,enableShowMore:e.enableShowMore||!1,idProperty:e.idProperty||void 0,placeholderText:e.placeholderText||"",propertiesToSearch:e.propertiesToSearch||void 0,search:e.search||void 0,searchFilters:e.searchFilters||[],searchResultsLimit:e.searchResultsLimit||void 0,searchResultTemplate:e.searchResultTemplate||void 0,searchTextMinimumCharacters:e.searchTextMinimumCharacters||1,selectMode:e.selectMode||void 0,showAddButton:e.showAddButton||!1,showMoreConfig:e.showMoreConfig||{},wrapperClass:"ag-custom-component-popup"}}var R,_,A=function(){function e(e,t){this.changeDetector=e,this.elementRef=t,this.isAlive=!0,this.lookupForm=new p.FormGroup({currentSelection:new p.FormControl({value:[],disabled:!1})})}return e.prototype.agInit=function(e){if(this.params=e,!Array.isArray(this.params.value))throw new Error("Lookup value must be an array");var t=this.lookupForm.get("currentSelection");t.setValue(this.params.value),this.params.skyComponentProperties.disabled&&t.disable(),this.skyComponentProperties=this.updateComponentProperties(this.params),this.changeDetector.markForCheck()},e.prototype.isCancelAfterEnd=function(){return this.isAlive=!1,this.changeDetector.detectChanges(),!1},e.prototype.getGui=function(){return this.elementRef.nativeElement},e.prototype.getValue=function(){return this.lookupForm.get("currentSelection").value},e.prototype.isPopup=function(){return!0},e.prototype.afterGuiAttached=function(){var e;null===(e=this.elementRef.nativeElement.querySelector(".sky-lookup-input"))||void 0===e||e.focus()},e.prototype.updateComponentProperties=function(e){return x(e.skyComponentProperties)},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.ElementRef}]},e=w([r.Component({selector:"sky-ag-grid-cell-editor-lookup",template:'<sky-input-box *ngIf="isAlive"\n [disabled]="skyComponentProperties?.disabled"\n [formGroup]="lookupForm"\n>\n <sky-lookup\n [ariaLabel]="skyComponentProperties?.ariaLabel"\n [autocompleteAttribute]="skyComponentProperties?.autocompleteAttribute"\n [data]="skyComponentProperties?.data"\n [debounceTime]="skyComponentProperties?.debounceTime"\n [descriptorProperty]="skyComponentProperties?.descriptorProperty"\n [enableShowMore]="skyComponentProperties?.enableShowMore"\n formControlName="currentSelection"\n [idProperty]="skyComponentProperties?.idProperty"\n [placeholderText]="skyComponentProperties?.placeholderText"\n [propertiesToSearch]="skyComponentProperties?.propertiesToSearch"\n [search]="skyComponentProperties?.search"\n [searchFilters]="skyComponentProperties?.searchFilters"\n [searchResultsLimit]="skyComponentProperties?.searchResultsLimit"\n [searchResultTemplate]="skyComponentProperties?.searchResultTemplate"\n [searchTextMinimumCharacters]="skyComponentProperties?.searchTextMinimumCharacters"\n [selectMode]="skyComponentProperties?.selectMode"\n [showAddButton]="skyComponentProperties?.showAddButton"\n [showMoreConfig]="skyComponentProperties?.showMoreConfig"\n [wrapperClass]="skyComponentProperties?.wrapperClass"\n >\n </sky-lookup>\n</sky-input-box>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}"]})],e)}(),I=function(){function e(){}return e.prototype.agInit=function(e){this.params=e,this.value=this.params.value,this.columnHeader=this.params.colDef.headerName,this.rowNumber=this.params.rowIndex+1,this.columnWidth=this.params.column.getActualWidth(),this.rowHeightWithoutBorders=this.params.node&&this.params.node.rowHeight-4},e.prototype.afterGuiAttached=function(){this.input.nativeElement.focus()},e.prototype.getValue=function(){return this.value},w([r.ViewChild("skyCellEditorNumber",{read:r.ElementRef})],e.prototype,"input",void 0),e=w([r.Component({selector:"sky-ag-grid-cell-editor-number",template:'<input\n type="number"\n [attr.aria-label]="\'skyux_ag_grid_cell_editor_number_aria_label\' | skyLibResources:columnHeader:rowNumber"\n [style.width.px]="columnWidth"\n [style.height.px]="rowHeightWithoutBorders"\n [(ngModel)]="value"\n #skyCellEditorNumber\n/>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["input{border:none;text-align:right}"]})],e)}(),T=function(){function e(){}return e.prototype.agInit=function(e){this.params=e,this.value=this.params.charPress||this.params.value,this.columnHeader=this.params.colDef.headerName,this.rowNumber=this.params.rowIndex+1,this.columnWidth=this.params.column.getActualWidth(),this.rowHeightWithoutBorders=this.params.node&&this.params.node.rowHeight-4},e.prototype.afterGuiAttached=function(){this.input.nativeElement.focus()},e.prototype.getValue=function(){return this.value},w([r.ViewChild("skyCellEditorText",{read:r.ElementRef})],e.prototype,"input",void 0),e=w([r.Component({selector:"sky-ag-grid-cell-editor-text",template:'<input\n type="text"\n [attr.aria-label]="\'skyux_ag_grid_cell_editor_text_aria_label\' | skyLibResources:columnHeader:rowNumber"\n [style.width.px]="columnWidth"\n [style.height.px]="rowHeightWithoutBorders"\n [(ngModel)]="value"\n #skyCellEditorText\n/>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["input{border:none;padding-left:11px}"]})],e)}(),M=function(){function e(e){this.changeDetector=e}return Object.defineProperty(e.prototype,"parameters",{set:function(e){this.agInit(e)},enumerable:!0,configurable:!0}),e.prototype.agInit=function(e){this.cellRendererParams=e,this.changeDetector.markForCheck()},e.prototype.isNumeric=function(e){return!isNaN(parseFloat(e))},e.prototype.refresh=function(e){return!1},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},w([r.Input()],e.prototype,"parameters",null),e=w([r.Component({selector:"sky-ag-grid-cell-renderer-currency-validator",template:'<sky-ag-grid-cell-validator-tooltip\n [params]="cellRendererParams"\n>\n <sky-ag-grid-cell-renderer-currency *ngIf="isNumeric(cellRendererParams.value); else rawValue"\n [params]="cellRendererParams"\n ></sky-ag-grid-cell-renderer-currency>\n <ng-template #rawValue>{{ cellRendererParams.value }}</ng-template>\n</sky-ag-grid-cell-validator-tooltip>\n',changeDetection:r.ChangeDetectionStrategy.OnPush})],e)}(),E=function(){function e(e){this.changeDetector=e,this.value="",this.summaryCount=0}return e.prototype.agInit=function(e){var t;this.summaryCount=(null===(t=e.value)||void 0===t?void 0:t.length)||0,this.value=""+e.valueFormatted,this.changeDetector.markForCheck()},e.prototype.refresh=function(e){return this.agInit(e),!0},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},e=w([r.Component({selector:"sky-cell-renderer-lookup",template:"<ng-container *ngIf=\"summaryCount > 5; else showValue\">\n {{ 'skyux_lookup_tokens_summary' | skyLibResources:summaryCount }}\n</ng-container>\n<ng-template #showValue>{{ value }}</ng-template>\n",changeDetection:r.ChangeDetectionStrategy.OnPush,styles:[":host{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"]})],e)}(),G=function(){function e(e){this.changeDetection=e}return e.prototype.agInit=function(e){var t=this;this.params=e,this.dataField=this.params.colDef&&this.params.colDef.field,this.rowNode=this.params.node,this.rowNumber=this.params.rowIndex+1,this.dataField?(this.checked=this.params.value,this.rowNode.setSelected(this.checked)):this.checked=this.rowNode.isSelected(),this.rowNode.addEventListener(d.RowNode.EVENT_ROW_SELECTED,(function(e){t.rowSelectedListener(e)}))},e.prototype.refresh=function(){return!1},e.prototype.updateRow=function(){this.rowNode.setSelected(this.checked),this.dataField&&(this.rowNode.data[this.dataField]=this.checked)},e.prototype.rowSelectedListener=function(e){this.checked=e.node.isSelected(),this.dataField&&(this.rowNode.data[this.dataField]=this.checked),this.changeDetection.markForCheck()},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},e=w([r.Component({selector:"sky-ag-grid-cell-renderer-row-selector",template:'<sky-checkbox\n data-sky-id="row-checkbox"\n tabindex="-1"\n [label]="\'skyux_ag_grid_row_selector_aria_label\' | skyLibResources:rowNumber"\n [attr.aria-label]="\'skyux_ag_grid_row_selector_aria_label\' | skyLibResources:rowNumber"\n [(ngModel)]="checked"\n (change)="updateRow()"\n>\n</sky-checkbox>\n\n',changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None,styles:[".sky-ag-grid-cell-row-selector .sky-switch-control{top:-6px}"]})],e)}(),F=function(){function e(e){this.changeDetector=e}return Object.defineProperty(e.prototype,"params",{set:function(e){this.agInit(e)},enumerable:!0,configurable:!0}),e.prototype.agInit=function(e){var t;this.cellRendererParams=e,"function"==typeof(null===(t=e.colDef)||void 0===t?void 0:t.valueFormatter)?this.value=e.colDef.valueFormatter(e):this.value=e.value,this.changeDetector.markForCheck()},e.prototype.refresh=function(e){return!1},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef}]},w([r.Input()],e.prototype,"params",null),e=w([r.Component({selector:"sky-ag-grid-cell-renderer-validator-tooltip",template:'<sky-ag-grid-cell-validator-tooltip [params]="cellRendererParams">\n {{ value }}\n</sky-ag-grid-cell-validator-tooltip>\n',changeDetection:r.ChangeDetectionStrategy.OnPush})],e)}();(R=e.SkyCellClass||(e.SkyCellClass={})).Autocomplete="sky-ag-grid-cell-autocomplete",R.Currency="sky-ag-grid-cell-currency",R.Date="sky-ag-grid-cell-date",R.Editable="sky-ag-grid-cell-editable",R.Invalid="sky-ag-grid-cell-invalid",R.Lookup="sky-ag-grid-cell-lookup",R.Number="sky-ag-grid-cell-number",R.RowSelector="sky-ag-grid-cell-row-selector",R.Text="sky-ag-grid-cell-text",R.Uneditable="sky-ag-grid-cell-uneditable",(_=e.SkyCellType||(e.SkyCellType={})).Autocomplete="skyCellAutocomplete",_.Currency="skyCellCurrency",_.CurrencyValidator="skyCellCurrencyValidator",_.Date="skyCellDate",_.Lookup="skyCellLookup",_.Number="skyCellNumber",_.NumberValidator="skyCellNumberValidator",_.RowSelector="skyCellRowSelector",_.Text="skyCellText",_.Validator="skyCellValidator",(e.SkyHeaderClass||(e.SkyHeaderClass={})).RightAligned="sky-ag-grid-header-right-aligned";var O=function(){function e(e){this.skyAdapterService=e}return e.prototype.getElementOrParentWithClass=function(e,t){return e&&e.classList.contains(t)?e:e.parentElement?this.getElementOrParentWithClass(e.parentElement,t):void 0},e.prototype.setFocusedElementById=function(e,t){var r=e.querySelector("#"+t);r&&r.focus()},e.prototype.getFocusedElement=function(){return document.activeElement},e.prototype.getNextFocusableElement=function(e,t,r){if(t){var o=this.skyAdapterService.getFocusableChildren(t),n=o.indexOf(e),i=r?n-1:n+1;if(!r&&o.length>=i||r&&i>=0)return o[i]}},e.prototype.focusOnFocusableChildren=function(e){var t=this.skyAdapterService.getFocusableChildren(e);t.length&&t[0].focus()},e.ctorParameters=function(){return[{type:o.SkyCoreAdapterService}]},e=w([r.Injectable()],e)}(),N=function(){function e(){this.skyComponentProperties={},this.numericOptions={}}return Object.defineProperty(e.prototype,"params",{set:function(e){this.agInit(e)},enumerable:!0,configurable:!0}),e.prototype.agInit=function(e){this.updateProperties(e)},e.prototype.refresh=function(e){return!1},e.prototype.updateProperties=function(e){var t;this._params=e,this.value=this._params.value,this.columnHeader=this._params.colDef&&this._params.colDef.headerName,this.rowNumber=this._params.rowIndex+1,this.columnWidth=null===(t=this._params.column)||void 0===t?void 0:t.getActualWidth(),this.rowHeightWithoutBorders=this._params.node&&this._params.node.rowHeight-4,this.skyComponentProperties=this._params.skyComponentProperties||{},this.skyComponentProperties.format="currency",this.skyComponentProperties.minDigits=2,this.skyComponentProperties.truncate=!1},w([r.Input()],e.prototype,"params",null),e=w([r.Component({selector:"sky-ag-grid-cell-renderer-currency",template:'<span\n [attr.aria-label]="\n \'sky_ag_grid_cell_renderer_currency_aria_label\'\n | skyLibResources: columnHeader:rowNumber\n "\n [style.width.px]="columnWidth"\n [style.height.px]="rowHeightWithoutBorders"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["input{border:none;padding-left:11px}"]})],e)}(),W=function(){function e(){this.skyComponentProperties={}}return e.prototype.agInit=function(e){this.params=e,this.value=this.params.value,this.columnHeader=this.params.colDef.headerName,this.rowNumber=this.params.rowIndex+1,this.columnWidth=this.params.column.getActualWidth(),this.rowHeightWithoutBorders=this.params.node&&this.params.node.rowHeight-4,this.skyComponentProperties=this.params.skyComponentProperties||{decimalPlaces:2,currencySymbol:"$"}},e.prototype.afterGuiAttached=function(){this.input.nativeElement.focus()},e.prototype.getValue=function(){return this.value},w([r.ViewChild("skyCellEditorCurrency",{read:r.ElementRef})],e.prototype,"input",void 0),e=w([r.Component({selector:"sky-ag-grid-cell-editor-currency",template:'<input\n type="text"\n [attr.aria-label]="\'skyux_ag_grid_cell_editor_currency_aria_label\' | skyLibResources:columnHeader:rowNumber"\n [style.width.px]="columnWidth"\n [style.height.px]="rowHeightWithoutBorders"\n [(ngModel)]="value"\n [skyAutonumeric]="skyComponentProperties"\n #skyCellEditorCurrency\n/>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:["input{border:none;padding-left:11px}"]})],e)}();function L(e,t){return e&&t?e.name>t.name?1:e.name<t.name?-1:0:e?1:-1}function V(e){return e.value&&e.value.name}function U(e,t){var r=e,o=t;return"string"==typeof r&&(r=new Date(e)),"string"==typeof o&&(o=new Date(t)),r&&o?r>o?1:r<o?-1:0:r?1:-1}function H(e,t){return function(r){var o,n;return r.colDef&&"function"==typeof(null===(n=null===(o=r.colDef.cellRendererParams)||void 0===o?void 0:o.skyComponentProperties)||void 0===n?void 0:n.validator)&&!r.colDef.cellRendererParams.skyComponentProperties.validator(r.value,r.data,r.rowIndex)?{component:e,params:C({},r.colDef.cellRendererParams)}:t}}var j=1,B=function(){function t(e,t,r){var o=this;this.agGridAdapterService=e,this.themeSvc=t,this.resources=r,this.ngUnsubscribe=new l.Subject,this.themeSvc&&this.themeSvc.settingsChange.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return o.currentTheme=e.currentSettings}))}return t.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},t.prototype.getGridOptions=function(e){var t=this.getDefaultGridOptions(e);return this.mergeGridOptions(t,e.gridOptions)},t.prototype.getEditableGridOptions=function(e){var t=this.getDefaultEditableGridOptions(e);return this.mergeGridOptions(t,e.gridOptions)},t.prototype.mergeGridOptions=function(e,t){return C(C(C({},e),t),{columnTypes:C(C({},t.columnTypes),e.columnTypes),defaultColDef:C(C(C({},e.defaultColDef),t.defaultColDef),{cellClassRules:e.defaultColDef.cellClassRules}),icons:C(C({},e.icons),t.icons)})},t.prototype.getDefaultGridOptions=function(t){var r,o,n,i,a,s,l,c,u,d,p,h,m,g,y,f,k=this;function v(e){return function(t){var r=t.colDef.editable;if("function"==typeof r){var o=t.columnApi.getColumn(t.colDef.field);r=r(C(C({},t),{column:o}))}return e?!r:r}}var w=((r={})[e.SkyCellClass.Editable]=v(),r[e.SkyCellClass.Uneditable]=v(!0),r);var b=((o={})[e.SkyCellClass.Invalid]=function(e){var t,r;return!(!e.colDef||"function"!=typeof(null===(r=null===(t=e.colDef.cellRendererParams)||void 0===t?void 0:t.skyComponentProperties)||void 0===r?void 0:r.validator)||e.colDef.cellRendererParams.skyComponentProperties.validator(e.value,e.data,e.rowIndex))},o),S={columnTypes:(n={},n[e.SkyCellType.Autocomplete]={cellClassRules:C((i={},i[e.SkyCellClass.Autocomplete]="true",i),w),cellEditorFramework:D,valueFormatter:V,comparator:L,minWidth:185},n[e.SkyCellType.Currency]={cellClassRules:C(C((a={},a[e.SkyCellClass.Currency]="true",a),b),w),cellRendererSelector:H("sky-ag-grid-cell-renderer-currency-validator",{component:"sky-ag-grid-cell-renderer-currency"}),cellEditorFramework:W,headerClass:e.SkyHeaderClass.RightAligned,minWidth:185},n[e.SkyCellType.Date]={cellClassRules:C((s={},s[e.SkyCellClass.Date]="true",s),w),cellEditorFramework:P,comparator:U,minWidth:"modern"===(null===(h=null===(p=this.currentTheme)||void 0===p?void 0:p.theme)||void 0===h?void 0:h.name)?180:160,valueFormatter:function(e){return k.dateFormatter(e,t.locale)}},n[e.SkyCellType.Lookup]={cellClassRules:C((l={},l[e.SkyCellClass.Lookup]="true",l),w),cellEditorFramework:A,cellRendererFramework:E,valueFormatter:function(e){var t=x(e);return(e.value||[]).map((function(e){return e[t.descriptorProperty]})).filter((function(e){return""!==e&&void 0!==e})).join("; ")},minWidth:185},n[e.SkyCellType.Number]={cellClassRules:C((c={},c[e.SkyCellClass.Number]="true",c),w),cellEditorFramework:I,headerClass:e.SkyHeaderClass.RightAligned},n[e.SkyCellType.RowSelector]={cellClassRules:(u={},u[e.SkyCellClass.RowSelector]="true",u[e.SkyCellClass.Uneditable]="true",u),cellRendererFramework:G,headerName:"",minWidth:55,maxWidth:55,sortable:!1,width:55},n[e.SkyCellType.Text]={cellClassRules:C((d={},d[e.SkyCellClass.Text]="true",d),w),cellEditorFramework:T},n[e.SkyCellType.Validator]={cellClassRules:C(C({},b),w),cellRendererSelector:H("sky-ag-grid-cell-renderer-validator-tooltip")},n),defaultColDef:{cellClassRules:w,minWidth:100,resizable:!0,sortable:!0,suppressKeyboardEvent:function(e){return k.suppressTab(e)}},domLayout:"autoHeight",enterMovesDownAfterEdit:!0,frameworkComponents:{"sky-ag-grid-cell-renderer-currency":N,"sky-ag-grid-cell-renderer-currency-validator":M,"sky-ag-grid-cell-renderer-validator-tooltip":F},getRowNodeId:function(e){return"id"in e&&e.id?""+e.id:""+j++},getRowClass:function(e){return e.node.id?"sky-ag-grid-row-"+e.node.id:void 0},headerHeight:"modern"===(null===(g=null===(m=this.currentTheme)||void 0===m?void 0:m.theme)||void 0===g?void 0:g.name)?60:37,icons:{sortDescending:this.getIconTemplate("caret-down"),sortAscending:this.getIconTemplate("caret-up"),columnMoveMove:this.getIconTemplate("arrows"),columnMoveHide:this.getIconTemplate("arrows"),columnMoveLeft:this.getIconTemplate("arrows"),columnMoveRight:this.getIconTemplate("arrows"),columnMovePin:this.getIconTemplate("arrows")},onCellFocused:function(){return k.onCellFocused()},rowHeight:"modern"===(null===(f=null===(y=this.currentTheme)||void 0===y?void 0:y.theme)||void 0===f?void 0:f.name)?60:38,rowMultiSelectWithClick:!0,rowSelection:"multiple",singleClickEdit:!0,sortingOrder:["desc","asc",null],stopEditingWhenGridLosesFocus:!1,suppressRowClickSelection:!0,suppressDragLeaveHidesColumns:!0};return S.columnTypes[e.SkyCellType.CurrencyValidator]=C(C({},S.columnTypes[e.SkyCellType.Currency]),{cellRendererParams:{skyComponentProperties:{validator:function(e,t,r){return!!(""+(e||"")).match(/^[^0-9]*(\d+[,.]?)+\d*[^0-9]*$/)},validatorMessage:"Please enter a valid currency"}}}),this.resources&&this.resources.getString("sky_ag_grid_cell_renderer_currency_validator_message").subscribe((function(t){S.columnTypes[e.SkyCellType.CurrencyValidator].cellRendererParams.skyComponentProperties.validatorMessage=t})),S.columnTypes[e.SkyCellType.NumberValidator]=C(C(C({},S.columnTypes[e.SkyCellType.Validator]),S.columnTypes[e.SkyCellType.Number]),{cellClassRules:C(C({},S.columnTypes[e.SkyCellType.Validator].cellClassRules),S.columnTypes[e.SkyCellType.Number].cellClassRules),cellRendererParams:{skyComponentProperties:{validator:function(e,t,r){return!!e&&!isNaN(parseFloat(e))},validatorMessage:"Please enter a valid number"}}}),this.resources&&this.resources.getString("sky_ag_grid_cell_renderer_number_validator_message").subscribe((function(t){S.columnTypes[e.SkyCellType.NumberValidator].cellRendererParams.skyComponentProperties.validatorMessage=t})),S},t.prototype.onCellFocused=function(){var e=this.agGridAdapterService.getFocusedElement();this.agGridAdapterService.focusOnFocusableChildren(e)},t.prototype.getDefaultEditableGridOptions=function(e){var t=this.getDefaultGridOptions(e);return t.rowSelection="none",t},t.prototype.dateFormatter=function(e,t){void 0===t&&(t="en-us");var r=e.value;r&&"string"==typeof r&&(r=new Date(e.value));var o=r&&r.toLocaleDateString&&r.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"});if(r&&r.getTime&&!isNaN(r.getTime()))return o},t.prototype.getIconTemplate=function(e){return'<i class="fa fa-'+e+'"></i>'},t.prototype.suppressTab=function(e){if("Tab"===e.event.code){if(e.editing){var t=this.agGridAdapterService.getFocusedElement(),r=this.agGridAdapterService.getElementOrParentWithClass(t,"ag-cell"),o=this.agGridAdapterService.getElementOrParentWithClass(t,"ag-popup-editor"),n=r||o;return!!this.agGridAdapterService.getNextFocusableElement(t,n,e.event.shiftKey)}return!0}return!1},t.ctorParameters=function(){return[{type:O},{type:u.SkyThemeService,decorators:[{type:r.Optional}]},{type:s.SkyLibResourcesService,decorators:[{type:r.Optional}]}]},t=w([r.Injectable(),b(1,r.Optional()),b(2,r.Optional())],t)}(),q=0,z=function(){function e(e,t,r){this.adapterService=e,this.changeDetector=t,this.elementRef=r,this._viewkeeperClasses=[],q++,this.afterAnchorId="sky-ag-grid-nav-anchor-after-"+q,this.beforeAnchorId="sky-ag-grid-nav-anchor-before-"+q,this.gridId="sky-ag-grid-"+q}return Object.defineProperty(e.prototype,"viewkeeperClasses",{get:function(){return this._viewkeeperClasses},set:function(e){this._viewkeeperClasses=e,this.changeDetector.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){this.agGrid.gridOptions&&"autoHeight"===this.agGrid.gridOptions.domLayout&&this.viewkeeperClasses.push(".ag-header")},e.prototype.onGridKeydown=function(e){if(this.agGrid&&!this.isInEditMode&&"Tab"===e.key){var t=e.shiftKey?this.beforeAnchorId:this.afterAnchorId;this.adapterService.setFocusedElementById(this.elementRef.nativeElement,t)}},e.prototype.onAnchorFocus=function(e){var t=this.gridId,r=e.relatedTarget,o=r&&r.id,n=r&&!!this.adapterService.getElementOrParentWithClass(r,"ag-cell");if(o!==t&&!n){var i=this.agGrid.columnApi.getAllDisplayedColumns(),a=i&&i[0],s=this.agGrid.api.getFirstDisplayedRow();a&&s>=0&&this.agGrid.api.setFocusedCell(s,a)}},Object.defineProperty(e.prototype,"isInEditMode",{get:function(){if(this.agGrid&&this.agGrid.api){if(this.agGrid.api.getEditingCells().length>0)return!0;var e=!1;return this.agGrid.api.forEachDetailGridInfo((function(t){t.api.getEditingCells().length>0&&(e=!0)})),e}return!1},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:O},{type:r.ChangeDetectorRef},{type:r.ElementRef}]},w([r.ContentChild(n.AgGridAngular,{static:!0})],e.prototype,"agGrid",void 0),e=w([r.Component({selector:"sky-ag-grid-wrapper",template:'<span\n class="nav-anchor"\n tabindex="0"\n [id]="beforeAnchorId"\n (focusin)="onAnchorFocus($event)"\n>\n</span>\n<div\n class="sky-ag-grid"\n tabindex="0"\n [id]="gridId"\n [skyViewkeeper]="viewkeeperClasses"\n (keydown)="onGridKeydown($event)"\n>\n <ng-content></ng-content>\n</div>\n<span\n tabindex="0"\n class="nav-anchor"\n [id]="afterAnchorId"\n (focusin)="onAnchorFocus($event)"\n>\n</span>\n',changeDetection:r.ChangeDetectionStrategy.OnPush})],e)}(),$=function(){function e(){this.resources={"EN-US":{sky_ag_grid_row_selector_aria_label:"Row selector for row {0}",sky_ag_grid_cell_editor_number_aria_label:"Editable number {0} for row {1}",sky_ag_grid_cell_editor_text_aria_label:"Editable text {0} for row {1}",sky_ag_grid_cell_editor_autocomplete_aria_label:"Editable autocomplete {0} for row {1}",sky_ag_grid_cell_renderer_currency_aria_label:"Editable currency {0} for row {1}",sky_ag_grid_cell_renderer_number_validator_message:"Please enter a valid number",sky_ag_grid_cell_renderer_currency_validator_message:"Please enter a valid currency",skyux_lookup_tokens_summary:"{0} items selected"}}}return e.prototype.getString=function(e,t){return s.getStringForLocale(this.resources,e.locale,t)},e=w([r.Injectable()],e)}(),K=function(){function e(){}return e=w([r.NgModule({providers:[{provide:s.SKY_LIB_RESOURCES_PROVIDERS,useClass:$,multi:!0}],exports:[s.SkyI18nModule]})],e)}(),Y=function(){function e(){}return e=w([r.NgModule({imports:[p.FormsModule,K,h.SkyAutocompleteModule],declarations:[D],exports:[D]})],e)}(),Z=function(){function e(){}return e=w([r.NgModule({imports:[m.SkyDatepickerModule,p.FormsModule],declarations:[P],exports:[P]})],e)}(),J=function(){function e(){}return e=w([r.NgModule({declarations:[A],exports:[A],imports:[t.CommonModule,p.ReactiveFormsModule,K,g.SkyInputBoxModule,h.SkyLookupModule]})],e)}(),Q=function(){function e(){}return e=w([r.NgModule({imports:[K,p.FormsModule],declarations:[I],exports:[I]})],e)}(),X=function(){function e(){}return e=w([r.NgModule({imports:[K,p.FormsModule],declarations:[T],exports:[T]})],e)}(),ee=function(){function e(){}return e=w([r.NgModule({declarations:[E],exports:[E],imports:[t.CommonModule,K]})],e)}(),te=function(){function e(){}return e=w([r.NgModule({imports:[K,g.SkyCheckboxModule,p.FormsModule],declarations:[G],exports:[G]})],e)}(),re=function(){function e(e,t){this.changeDetector=e,this.dataManagerSvc=t,this.ngUnsubscribe=new l.Subject}return e.prototype.ngAfterContentInit=function(){var e=this;this.dataManagerSvc.setViewkeeperClasses(this.viewId,[".ag-header"]),this.viewConfig=this.dataManagerSvc.getViewById(this.viewId),this.checkForAgGrid(),this.checkForSkyAgGridWrapper(),this.agGridList.changes.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){return e.checkForAgGrid()})),this.skyAgGridWrapperList.changes.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){return e.checkForSkyAgGridWrapper()}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.checkForAgGrid=function(){var e=this.agGridList.length;0===e?this.unregisterAgGrid():this.agGridList.first!==this.currentAgGrid&&this.registerAgGrid(),e>1&&console.warn("More than one ag-grid child component was found. Using the first ag-Grid.")},e.prototype.checkForSkyAgGridWrapper=function(){var e=this.skyAgGridWrapperList.length;0===e?this.unregisterSkyAgGridWrapper():this.skyAgGridWrapperList.first!==this.currentSkyAgGridWrapper&&this.registerSkyAgGridWrapper(),e>1&&console.warn("More than one ag-grid child component was found. Using the first ag-Grid.")},e.prototype.unregisterAgGrid=function(){this.currentAgGrid=void 0,this.dataStateSub&&this.dataStateSub.unsubscribe()},e.prototype.unregisterSkyAgGridWrapper=function(){this.currentSkyAgGridWrapper=void 0},e.prototype.registerSkyAgGridWrapper=function(){var e=this;this.unregisterSkyAgGridWrapper(),this.currentSkyAgGridWrapper=this.skyAgGridWrapperList.first,setTimeout((function(){e.currentSkyAgGridWrapper&&(e.currentSkyAgGridWrapper.viewkeeperClasses=[])}))},e.prototype.registerAgGrid=function(){var e=this;this.unregisterAgGrid();var t,r=this.agGridList.first;this.currentAgGrid=r,r.gridReady.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.viewConfig.onSelectAllClick=e.selectAll.bind(e),e.viewConfig.onClearAllClick=e.clearAll.bind(e),e.dataManagerSvc.updateViewConfig(e.viewConfig),e.dataStateSub=e.dataManagerSvc.getDataStateUpdates(e.viewConfig.id).pipe(c.takeUntil(e.ngUnsubscribe)).subscribe((function(t){e.currentDataState=t,e.displayColumns(t)})),r.api.sizeColumnsToFit()})),r.columnMoved.pipe(c.takeUntil(this.ngUnsubscribe),c.filter((function(e){return!["gridInitializing","uiColumnResized","uiColumnDragged","api"].includes(e.source)}))).subscribe((function(t){e.updateColumnsInCurrentDataState(t.columnApi)})),r.dragStarted.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(r){t=e.getColumnOrder(r.columnApi)})),r.dragStopped.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(r){var o=e.getColumnOrder(r.columnApi);t.findIndex((function(e,t){return e!==o[t]}))>-1&&e.updateColumnsInCurrentDataState(r.columnApi)})),r.rowSelected.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(t){var r=t.node,o=e.currentDataState.selectedIds||[],n=o.indexOf(r.data.id);r.isSelected()&&-1===n?o.push(r.data.id):r.isSelected()||-1===n||o.splice(n,1),e.currentDataState.selectedIds=o,e.dataManagerSvc.updateDataState(e.currentDataState,e.viewConfig.id),e.changeDetector.markForCheck()})),r.sortChanged.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){var t,o=r.api.getSortModel();if(o.length){var n=o[0],i=r.columnApi.getColumn(n.colId),a=e.dataManagerSvc.getCurrentDataManagerConfig();t=a.sortOptions?a.sortOptions.find((function(e){return e.propertyName===i.getColDef().field&&e.descending===("desc"===n.sort)})):void 0}e.currentDataState.activeSortOption=t,e.dataManagerSvc.updateDataState(e.currentDataState,e.viewConfig.id)}))},e.prototype.updateColumnsInCurrentDataState=function(e){var t=this.getColumnOrder(e),r=this.currentDataState.getViewStateById(this.viewConfig.id);r.displayedColumnIds=t,this.dataManagerSvc.updateDataState(this.currentDataState.addOrUpdateView(this.viewConfig.id,r),this.viewConfig.id)},e.prototype.getColumnOrder=function(e){return e.getAllDisplayedVirtualColumns().map((function(e){return e.getColDef().colId}))},e.prototype.displayColumns=function(e){var t,r,o=this.currentAgGrid,n=e.getViewStateById(this.viewConfig.id),i=[];n.displayedColumnIds&&(i=n.displayedColumnIds);var a=o.columnApi.getAllColumns();try{for(var s=S(a),l=s.next();!l.done;l=s.next()){var c=l.value.getColId(),u=i.indexOf(c);o.columnApi.setColumnVisible(c,-1!==u),o.columnApi.moveColumn(c,u)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}},e.prototype.selectAll=function(){this.agGridList.first.api.selectAll()},e.prototype.clearAll=function(){this.agGridList.first.api.deselectAll()},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:i.SkyDataManagerService}]},w([r.Input()],e.prototype,"viewId",void 0),w([r.ContentChildren(n.AgGridAngular,{descendants:!0})],e.prototype,"agGridList",void 0),w([r.ContentChildren(z,{descendants:!0})],e.prototype,"skyAgGridWrapperList",void 0),e=w([r.Directive({selector:"[skyAgGridDataManagerAdapter]"})],e)}(),oe=function(){function e(e,t){this.changeDetector=e,this.zone=t,this.indicatorShouldShow=!0,this.popoverMessageStream=new l.Subject}return Object.defineProperty(e.prototype,"params",{set:function(e){var t,r,o,n,i,a=this;this.cellRendererParams=e,null===(t=this.cellRendererParams.api)||void 0===t||t.addEventListener(d.Events.EVENT_CELL_FOCUSED,(function(e){e.column.getColId()===a.cellRendererParams.column.getColId()&&e.rowIndex===a.cellRendererParams.rowIndex||a.hidePopover()})),null===(r=this.cellRendererParams.eGridCell)||void 0===r||r.addEventListener("keyup",(function(e){["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"].includes(e.key)&&a.showPopover()})),null===(o=this.cellRendererParams.api)||void 0===o||o.addEventListener(d.Events.EVENT_CELL_EDITING_STARTED,(function(){a.hidePopover()})),"function"==typeof(null===(n=this.cellRendererParams.skyComponentProperties)||void 0===n?void 0:n.validatorMessage)?this.validatorMessage=this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value,this.cellRendererParams.data,this.cellRendererParams.rowIndex):this.validatorMessage=null===(i=this.cellRendererParams.skyComponentProperties)||void 0===i?void 0:i.validatorMessage,this.changeDetector.markForCheck()},enumerable:!0,configurable:!0}),e.prototype.hideIndicator=function(){var e=this;this.zone.run((function(){e.indicatorShouldShow=!1,e.changeDetector.detectChanges()}))},e.prototype.hidePopover=function(){this.popoverMessageStream.next({type:f.SkyPopoverMessageType.Close})},e.prototype.showIndicator=function(){var e=this;this.zone.run((function(){e.indicatorShouldShow=!0,e.changeDetector.detectChanges()}))},e.prototype.showPopover=function(){this.popoverMessageStream.next({type:f.SkyPopoverMessageType.Open})},e.ctorParameters=function(){return[{type:r.ChangeDetectorRef},{type:r.NgZone}]},w([r.Input()],e.prototype,"params",null),e=w([r.Component({selector:"sky-ag-grid-cell-validator-tooltip",template:'<div\n [skyPopover]="validatorPopover"\n [skyPopoverMessageStream]="popoverMessageStream"\n class="sky-validator-cell"\n>\n <ng-content></ng-content>\n <sky-status-indicator *ngIf="indicatorShouldShow"\n descriptionType="none"\n indicatorType="danger"\n class="sky-pull-right"\n ></sky-status-indicator>\n</div>\n<sky-popover\n #validatorPopover\n (popoverClosed)="showIndicator()"\n (popoverOpened)="hideIndicator()"\n popoverType="danger"\n>\n {{ validatorMessage }}\n</sky-popover>\n',changeDetection:r.ChangeDetectionStrategy.OnPush,styles:[":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:0}"]})],e)}(),ne=function(){function e(){}return e=w([r.NgModule({declarations:[oe],exports:[oe],imports:[t.CommonModule,f.SkyPopoverModule,y.SkyStatusIndicatorModule]})],e)}(),ie=function(){function e(){}return e=w([r.NgModule({imports:[t.CommonModule,K,ne,p.FormsModule,o.SkyNumericModule],declarations:[N,M],exports:[N,M]})],e)}(),ae=function(){function e(){}return w([r.ViewChildren("inlineDeleteRef")],e.prototype,"inlineDeleteRefs",void 0),w([r.ViewChild("inlineDeleteTemplateRef",{read:r.TemplateRef})],e.prototype,"inlineDeleteTemplateRef",void 0),e=w([r.Component({template:'\n <ng-template\n let-row\n let-tableWidth="tableWidth()"\n let-getRowDeleteItem="getRowDeleteItem"\n let-cancelRowDelete="cancelRowDelete"\n let-confirmRowDelete="confirmRowDelete"\n #inlineDeleteTemplateRef\n >\n <div\n class="sky-ag-grid-row-delete"\n [id]="\'row-delete-ref-\' + row.id"\n [ngStyle]=\'{\n "height": row.rowHeight + "px",\n "position": "fixed",\n "width": tableWidth + "px"\n }\'\n #inlineDeleteRef\n >\n <sky-inline-delete\n [pending]="getRowDeleteItem(row).pending"\n (cancelTriggered)="cancelRowDelete(row)"\n (deleteTriggered)="confirmRowDelete(row)"\n ></sky-inline-delete>\n </div>\n </ng-template>\n '})],e)}(),se=function(){function e(e,t,o,n,i,a){this.affixService=e,this.changeDetector=t,this.elementRef=o,this.resolver=n,this.overlayService=i,this.viewContainerRef=a,this.rowDeleteCancel=new r.EventEmitter,this.rowDeleteConfirm=new r.EventEmitter,this.rowDeleteIdsChange=new r.EventEmitter,this.rowDeleteConfigs=[],this.ngUnsubscribe=new l.Subject,this.rowDeleteContents={}}return Object.defineProperty(e.prototype,"rowDeleteIds",{get:function(){return this._rowDeleteIds},set:function(e){var t,r,o,n,i,a,s=this;if(this._rowDeleteIds=e,e){var l=function(e){var t=c.rowDeleteConfigs.find((function(t){return t.id===e}));if(t)t.pending=!1;else{c.rowDeleteConfigs.push({id:e,pending:!1});var r=c.overlayService.create({enableScroll:!0,showBackdrop:!1,closeOnNavigation:!0,enableClose:!1,enablePointerEvents:!0});r.attachTemplate(c.rowDeleteComponent.inlineDeleteTemplateRef,{$implicit:c.agGrid.api.getRowNode(e),tableWidth:function(){return s.tableWidth},getRowDeleteItem:function(e){return s.getRowDeleteItem(e)},cancelRowDelete:function(e){return s.cancelRowDelete(e)},confirmRowDelete:function(e){return s.confirmRowDelete(e)}}),r.componentRef.instance.zIndex="998",setTimeout((function(){var t=s.rowDeleteComponent.inlineDeleteRefs.toArray().find((function(t){return t.nativeElement.id==="row-delete-ref-"+e})),o=s.affixService.createAffixer(t);s.affixToRow(o,e),s.rowDeleteContents[e]={affixer:o,overlay:r}}))}},c=this;try{for(var u=S(e),d=u.next();!d.done;d=u.next()){l(d.value)}}catch(e){o={error:e}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}try{for(var p=S(this.rowDeleteConfigs),h=p.next();!h.done;h=p.next()){y=h.value;e.indexOf(y.id)<0&&this.destroyRowDelete(y.id)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}this.changeDetector.markForCheck()}else{try{for(var m=S(this.rowDeleteConfigs),g=m.next();!g.done;g=m.next()){var y=g.value;this.destroyRowDelete(y.id)}}catch(e){t={error:e}}finally{try{g&&!g.done&&(r=m.return)&&r.call(m)}finally{if(t)throw t.error}}this.changeDetector.markForCheck()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tableWidth",{get:function(){return this.elementRef.nativeElement.querySelectorAll(".sky-ag-grid")[0].offsetWidth},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){var e=this,t=this.resolver.resolveComponentFactory(ae);this.rowDeleteComponent=this.viewContainerRef.createComponent(t).instance,this.agGrid.rowDataChanged.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.updateRowDeleteStates()})),this.agGrid.rowDataUpdated.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.updateRowDeleteStates()})),this.agGrid.sortChanged.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.updateRowDeleteStates()})),this.agGrid.filterChanged.pipe(c.takeUntil(this.ngUnsubscribe)).subscribe((function(){e.updateRowDeleteStates()})),this.agGrid.getRowNodeId=function(e){return e.id.toString()}},e.prototype.ngOnDestroy=function(){var e=this;this.ngUnsubscribe.next(),this.ngUnsubscribe.complete(),Object.keys(this.rowDeleteContents).forEach((function(t){e.destroyRowDelete(t)}))},e.prototype.cancelRowDelete=function(e){this.rowDeleteConfigs=this.rowDeleteConfigs.filter((function(t){return t.id!==e.id})),this.rowDeleteCancel.emit({id:e.id}),this.destroyRowDelete(e.id)},e.prototype.confirmRowDelete=function(e){this.rowDeleteConfigs.find((function(t){return t.id===e.id})).pending=!0,this.rowDeleteConfirm.emit({id:e.id})},e.prototype.getRowDeleteItem=function(e){return this.rowDeleteConfigs.find((function(t){return t.id===e.id}))},e.prototype.affixToRow=function(e,t){var r=this.elementRef.nativeElement.querySelector('\n [row-id="'+t+'"] div[aria-colindex="1"],\n .ag-row.sky-ag-grid-row-'+t+' div[aria-colindex="1"]\n ');if(!r)for(var n=this.elementRef.nativeElement.querySelectorAll('[row-id="'+t+'"] > div'),i=0;i<n.length;i++)if(n[i].querySelector('[aria-colindex="1"]')){r=n[i];break}e.affixTo(r,{autoFitContext:o.SkyAffixAutoFitContext.Viewport,isSticky:!0,placement:"above",verticalAlignment:"top",horizontalAlignment:"left",enableAutoFit:!1})},e.prototype.destroyRowDelete=function(e){var t,r=this.rowDeleteContents[e];r&&(r.affixer.destroy(),this.overlayService.close(r.overlay),delete this.rowDeleteContents[e],this.rowDeleteConfigs=this.rowDeleteConfigs.filter((function(t){return t.id!==e})),this._rowDeleteIds=null===(t=this.rowDeleteIds)||void 0===t?void 0:t.filter((function(t){return t!==e})),this.rowDeleteIdsChange.emit(this._rowDeleteIds))},e.prototype.updateRowDeleteStates=function(){var e=this;this.rowDeleteConfigs.forEach((function(t){e.agGrid.api.getRowNode(t.id)?e.affixToRow(e.rowDeleteContents[t.id].affixer,t.id):e.destroyRowDelete(t.id)})),this.changeDetector.markForCheck()},e.ctorParameters=function(){return[{type:o.SkyAffixService},{type:r.ChangeDetectorRef},{type:r.ElementRef},{type:r.ComponentFactoryResolver},{type:o.SkyOverlayService},{type:r.ViewContainerRef}]},w([r.Input()],e.prototype,"rowDeleteIds",null),w([r.Output()],e.prototype,"rowDeleteCancel",void 0),w([r.Output()],e.prototype,"rowDeleteConfirm",void 0),w([r.Output()],e.prototype,"rowDeleteIdsChange",void 0),w([r.ContentChild(n.AgGridAngular)],e.prototype,"agGrid",void 0),e=w([r.Directive({selector:"[skyAgGridRowDelete]"})],e)}(),le=function(){function e(){}return e=w([r.NgModule({imports:[K,p.FormsModule,k.SkyAutonumericModule],declarations:[W],exports:[W]})],e)}(),ce=function(){function e(){}return e=w([r.NgModule({declarations:[F],exports:[F],imports:[ne]})],e)}(),ue=function(){function e(){}return e=w([r.NgModule({declarations:[re,ae,se,z],imports:[n.AgGridModule,t.CommonModule,Y,Z,J,Q,le,ie,ee,te,ce,ne,X,o.SkyCoreAdapterModule,i.SkyDataManagerModule,a.SkyInlineDeleteModule,o.SkyViewkeeperModule],exports:[re,ae,se,z],providers:[B,O],entryComponents:[D,P,A,I,W,N,M,E,G,F,T,ae]})],e)}();e.SkyAgGridModule=ue,e.SkyAgGridService=B,e.ɵa=re,e.ɵb=z,e.ɵba=ce,e.ɵbb=F,e.ɵbc=X,e.ɵbd=T,e.ɵc=O,e.ɵd=ae,e.ɵe=se,e.ɵf=Y,e.ɵg=K,e.ɵh=$,e.ɵi=D,e.ɵj=Z,e.ɵk=P,e.ɵl=J,e.ɵm=A,e.ɵn=Q,e.ɵo=I,e.ɵp=le,e.ɵq=W,e.ɵr=ie,e.ɵs=ne,e.ɵt=oe,e.ɵu=N,e.ɵv=M,e.ɵw=ee,e.ɵx=E,e.ɵy=te,e.ɵz=G,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=skyux-ag-grid.umd.min.js.map