@skyux/ag-grid 7.0.0-beta.13 → 7.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/documentation.json +622 -585
  2. package/esm2020/lib/modules/ag-grid/ag-grid-adapter.service.mjs +3 -1
  3. package/esm2020/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.mjs +129 -110
  4. package/esm2020/lib/modules/ag-grid/ag-grid-row-delete.component.mjs +2 -2
  5. package/esm2020/lib/modules/ag-grid/ag-grid-row-delete.directive.mjs +126 -114
  6. package/esm2020/lib/modules/ag-grid/ag-grid-wrapper.component.mjs +90 -84
  7. package/esm2020/lib/modules/ag-grid/ag-grid.service.mjs +292 -294
  8. package/esm2020/lib/modules/ag-grid/apply-lookup-properties-defaults.mjs +13 -9
  9. package/esm2020/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.mjs +27 -22
  10. package/esm2020/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.mjs +28 -24
  11. package/esm2020/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.mjs +59 -53
  12. package/esm2020/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.mjs +43 -37
  13. package/esm2020/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.mjs +31 -27
  14. package/esm2020/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.mjs +31 -27
  15. package/esm2020/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency-validator.component.mjs +5 -3
  16. package/esm2020/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency.component.mjs +22 -17
  17. package/esm2020/lib/modules/ag-grid/cell-renderers/cell-renderer-lookup/cell-renderer-lookup.component.mjs +1 -1
  18. package/esm2020/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.component.mjs +27 -20
  19. package/esm2020/lib/modules/ag-grid/cell-renderers/cell-renderer-validator-tooltip/cell-renderer-validator-tooltip.component.mjs +2 -1
  20. package/esm2020/lib/modules/ag-grid/cell-validator/ag-grid-cell-validator-tooltip.component.mjs +31 -27
  21. package/esm2020/lib/modules/ag-grid/header/header-group.component.mjs +12 -12
  22. package/esm2020/lib/modules/ag-grid/header/header.component.mjs +20 -20
  23. package/esm2020/lib/modules/ag-grid/types/autocomplete-properties.mjs +1 -1
  24. package/esm2020/lib/modules/ag-grid/types/cell-class.mjs +2 -17
  25. package/esm2020/lib/modules/ag-grid/types/cell-editor-utils.mjs +7 -2
  26. package/esm2020/lib/modules/ag-grid/types/header-group-info.mjs +1 -1
  27. package/esm2020/lib/modules/ag-grid/types/header-info.mjs +1 -1
  28. package/esm2020/lib/modules/ag-grid/types/lookup-properties.mjs +1 -1
  29. package/esm2020/lib/modules/ag-grid/types/validator-properties.mjs +1 -1
  30. package/fesm2015/skyux-ag-grid.mjs +960 -858
  31. package/fesm2015/skyux-ag-grid.mjs.map +1 -1
  32. package/fesm2020/skyux-ag-grid.mjs +981 -908
  33. package/fesm2020/skyux-ag-grid.mjs.map +1 -1
  34. package/lib/modules/ag-grid/ag-grid-adapter.service.d.ts +1 -1
  35. package/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.d.ts +4 -22
  36. package/lib/modules/ag-grid/ag-grid-row-delete.component.d.ts +2 -2
  37. package/lib/modules/ag-grid/ag-grid-row-delete.directive.d.ts +5 -18
  38. package/lib/modules/ag-grid/ag-grid-wrapper.component.d.ts +1 -7
  39. package/lib/modules/ag-grid/ag-grid.service.d.ts +0 -11
  40. package/lib/modules/ag-grid/apply-lookup-properties-defaults.d.ts +1 -23
  41. package/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.d.ts +3 -3
  42. package/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.d.ts +7 -8
  43. package/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.d.ts +5 -8
  44. package/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.d.ts +2 -6
  45. package/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.d.ts +8 -8
  46. package/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.d.ts +8 -8
  47. package/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency-validator.component.d.ts +1 -1
  48. package/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency.component.d.ts +9 -10
  49. package/lib/modules/ag-grid/cell-renderers/cell-renderer-lookup/cell-renderer-lookup.component.d.ts +2 -2
  50. package/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.component.d.ts +6 -8
  51. package/lib/modules/ag-grid/cell-renderers/cell-renderer-validator-tooltip/cell-renderer-validator-tooltip.component.d.ts +3 -3
  52. package/lib/modules/ag-grid/cell-validator/ag-grid-cell-validator-tooltip.component.d.ts +4 -7
  53. package/lib/modules/ag-grid/header/header-group.component.d.ts +4 -4
  54. package/lib/modules/ag-grid/header/header.component.d.ts +4 -4
  55. package/lib/modules/ag-grid/types/autocomplete-properties.d.ts +5 -4
  56. package/lib/modules/ag-grid/types/cell-class.d.ts +1 -1
  57. package/lib/modules/ag-grid/types/cell-editor-utils.d.ts +2 -1
  58. package/lib/modules/ag-grid/types/header-group-info.d.ts +2 -2
  59. package/lib/modules/ag-grid/types/header-info.d.ts +2 -2
  60. package/lib/modules/ag-grid/types/lookup-properties.d.ts +3 -3
  61. package/lib/modules/ag-grid/types/validator-properties.d.ts +2 -2
  62. package/package.json +12 -12
@@ -15,9 +15,9 @@ import { SkyInlineDeleteModule } from '@skyux/layout';
15
15
  import * as i1$2 from '@skyux/theme';
16
16
  import { SkyThemeModule } from '@skyux/theme';
17
17
  import { AgGridAngular, AgGridModule } from 'ag-grid-angular';
18
- import { fromEvent, Subject, BehaviorSubject, Subscription } from 'rxjs';
19
- import { first, takeUntil, filter } from 'rxjs/operators';
20
18
  import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
19
+ import { fromEvent, Subject, BehaviorSubject, Subscription, fromEventPattern } from 'rxjs';
20
+ import { first, takeUntil, filter } from 'rxjs/operators';
21
21
  import * as i1$1 from '@angular/forms';
22
22
  import { UntypedFormGroup, UntypedFormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
23
23
  import { KeyCode, PopupComponent, Events, Column, RowNode } from 'ag-grid-community';
@@ -43,6 +43,7 @@ class SkyAgGridAdapterService {
43
43
  else if (element.parentElement) {
44
44
  return this.getElementOrParentWithClass(element.parentElement, className);
45
45
  }
46
+ return undefined;
46
47
  }
47
48
  setFocusedElementById(parentEl, selector) {
48
49
  const element = parentEl.querySelector(`#${selector}`);
@@ -66,6 +67,7 @@ class SkyAgGridAdapterService {
66
67
  return focusableChildren[nextIndex];
67
68
  }
68
69
  }
70
+ return undefined;
69
71
  }
70
72
  focusOnFocusableChildren(element) {
71
73
  const focusableChildren = this.skyAdapterService.getFocusableChildren(element);
@@ -87,8 +89,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
87
89
  * @internal
88
90
  */
89
91
  function applySkyLookupPropertiesDefaults(skyLookupProperties) {
92
+ /* istanbul ignore if */
93
+ if (!skyLookupProperties) {
94
+ return {};
95
+ }
90
96
  return {
91
- addClick: skyLookupProperties.addClick || undefined,
97
+ addClick: skyLookupProperties.addClick,
92
98
  ariaLabel: skyLookupProperties.ariaLabel || '',
93
99
  autocompleteAttribute: skyLookupProperties.autocompleteAttribute || 'off',
94
100
  data: skyLookupProperties.data || [],
@@ -96,16 +102,16 @@ function applySkyLookupPropertiesDefaults(skyLookupProperties) {
96
102
  descriptorProperty: skyLookupProperties.descriptorProperty || 'name',
97
103
  disabled: skyLookupProperties.disabled || false,
98
104
  enableShowMore: skyLookupProperties.enableShowMore || false,
99
- idProperty: skyLookupProperties.idProperty || undefined,
105
+ idProperty: skyLookupProperties.idProperty,
100
106
  placeholderText: skyLookupProperties.placeholderText || '',
101
- propertiesToSearch: skyLookupProperties.propertiesToSearch || undefined,
102
- search: skyLookupProperties.search || undefined,
103
- searchAsync: skyLookupProperties.searchAsync || undefined,
107
+ propertiesToSearch: skyLookupProperties.propertiesToSearch,
108
+ search: skyLookupProperties.search,
109
+ searchAsync: skyLookupProperties.searchAsync,
104
110
  searchFilters: skyLookupProperties.searchFilters || [],
105
- searchResultsLimit: skyLookupProperties.searchResultsLimit || undefined,
106
- searchResultTemplate: skyLookupProperties.searchResultTemplate || undefined,
111
+ searchResultsLimit: skyLookupProperties.searchResultsLimit,
112
+ searchResultTemplate: skyLookupProperties.searchResultTemplate,
107
113
  searchTextMinimumCharacters: skyLookupProperties.searchTextMinimumCharacters || 1,
108
- selectMode: skyLookupProperties.selectMode || undefined,
114
+ selectMode: skyLookupProperties.selectMode,
109
115
  showAddButton: skyLookupProperties.showAddButton || false,
110
116
  showMoreConfig: skyLookupProperties.showMoreConfig || {},
111
117
  wrapperClass: 'ag-custom-component-popup',
@@ -131,7 +137,7 @@ class SkyAgGridCellEditorUtils {
131
137
  * @param params The editor's initializing parameters.
132
138
  */
133
139
  static getEditorInitialAction(params) {
134
- if (params.cellStartedEdit) {
140
+ if (params?.cellStartedEdit) {
135
141
  if (params.eventKey === KeyCode.BACKSPACE ||
136
142
  params.eventKey === KeyCode.DELETE) {
137
143
  return SkyAgGridCellEditorInitialAction.Delete;
@@ -152,6 +158,11 @@ class SkyAgGridCellEditorUtils {
152
158
  return SkyAgGridCellEditorInitialAction.Untouched;
153
159
  }
154
160
  }
161
+ static subtractOrZero(minuend, subtrahend) {
162
+ // Swapping minuend with subtrahend when minuend is null or undefined results in
163
+ // the subtrahend being subtracted from itself, which will always be 0.
164
+ return (minuend ?? subtrahend) - subtrahend;
165
+ }
155
166
  }
156
167
 
157
168
  var _SkyAgGridCellEditorAutocompleteComponent_triggerType;
@@ -170,36 +181,41 @@ class SkyAgGridCellEditorAutocompleteComponent {
170
181
  this.params = params;
171
182
  __classPrivateFieldSet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
172
183
  const control = this.editorForm.get('selection');
173
- switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f")) {
174
- case SkyAgGridCellEditorInitialAction.Delete:
175
- control.setValue(undefined);
176
- break;
177
- case SkyAgGridCellEditorInitialAction.Replace:
178
- case SkyAgGridCellEditorInitialAction.Highlighted:
179
- case SkyAgGridCellEditorInitialAction.Untouched:
180
- default:
181
- control.setValue(params.value);
182
- break;
184
+ if (control) {
185
+ switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f")) {
186
+ case SkyAgGridCellEditorInitialAction.Delete:
187
+ control.setValue(undefined);
188
+ break;
189
+ case SkyAgGridCellEditorInitialAction.Replace:
190
+ case SkyAgGridCellEditorInitialAction.Highlighted:
191
+ case SkyAgGridCellEditorInitialAction.Untouched:
192
+ default:
193
+ control.setValue(params.value);
194
+ break;
195
+ }
183
196
  }
184
197
  this.columnHeader = this.params.colDef && this.params.colDef.headerName;
185
198
  this.rowNumber = this.params.rowIndex + 1;
186
199
  this.skyComponentProperties = this.params.skyComponentProperties || {};
187
200
  }
188
201
  afterGuiAttached() {
189
- this.input.nativeElement.focus();
190
- if (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Replace) {
191
- this.input.nativeElement.select();
192
- this.input.nativeElement.setRangeText(this.params.charPress);
193
- // Ensure the cursor is at the end of the text.
194
- this.input.nativeElement.setSelectionRange(this.params.charPress.length, this.params.charPress.length);
195
- this.input.nativeElement.dispatchEvent(new Event('input'));
196
- }
197
- if (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
198
- this.input.nativeElement.select();
202
+ if (this.input) {
203
+ this.input.nativeElement.focus();
204
+ if (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Replace) {
205
+ const charPress = this.params?.charPress;
206
+ this.input.nativeElement.select();
207
+ this.input.nativeElement.setRangeText(charPress);
208
+ // Ensure the cursor is at the end of the text.
209
+ this.input.nativeElement.setSelectionRange(charPress.length, charPress.length);
210
+ this.input.nativeElement.dispatchEvent(new Event('input'));
211
+ }
212
+ if (__classPrivateFieldGet(this, _SkyAgGridCellEditorAutocompleteComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
213
+ this.input.nativeElement.select();
214
+ }
199
215
  }
200
216
  }
201
217
  getValue() {
202
- const val = this.editorForm.get('selection').value;
218
+ const val = this.editorForm.get('selection')?.value;
203
219
  return val !== undefined && val !== null ? val : undefined;
204
220
  }
205
221
  }
@@ -214,18 +230,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
214
230
  args: ['skyCellEditorAutocomplete', { read: ElementRef }]
215
231
  }] } });
216
232
 
217
- var _SkyAgGridCellEditorCurrencyComponent_triggerType;
233
+ var _SkyAgGridCellEditorCurrencyComponent_triggerType, _SkyAgGridCellEditorCurrencyComponent_changeDetector;
218
234
  /**
219
235
  * @internal
220
236
  */
221
237
  class SkyAgGridCellEditorCurrencyComponent {
222
238
  constructor(changeDetector) {
223
- this.changeDetector = changeDetector;
224
239
  this.skyComponentProperties = {};
225
240
  this.editorForm = new UntypedFormGroup({
226
241
  currency: new UntypedFormControl(),
227
242
  });
228
243
  _SkyAgGridCellEditorCurrencyComponent_triggerType.set(this, void 0);
244
+ _SkyAgGridCellEditorCurrencyComponent_changeDetector.set(this, void 0);
245
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorCurrencyComponent_changeDetector, changeDetector, "f");
229
246
  }
230
247
  /**
231
248
  * agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
@@ -236,8 +253,7 @@ class SkyAgGridCellEditorCurrencyComponent {
236
253
  this.columnHeader = this.params.colDef.headerName;
237
254
  this.rowNumber = this.params.rowIndex + 1;
238
255
  this.columnWidth = this.params.column.getActualWidth();
239
- this.rowHeightWithoutBorders =
240
- this.params.node && this.params.node.rowHeight - 4;
256
+ this.rowHeightWithoutBorders = SkyAgGridCellEditorUtils.subtractOrZero(this.params.node?.rowHeight, 4);
241
257
  this.skyComponentProperties = this.params.skyComponentProperties || {
242
258
  decimalPlaces: 2,
243
259
  currencySymbol: '$',
@@ -247,29 +263,31 @@ class SkyAgGridCellEditorCurrencyComponent {
247
263
  * afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
248
264
  */
249
265
  afterGuiAttached() {
250
- this.input.nativeElement.focus();
266
+ this.input?.nativeElement.focus();
251
267
  // This setup is in `afterGuiAttached` due to the lifecycle of autonumeric which will highlight the initial value if it is in place when it renders.
252
268
  // Since we don't want that, we set the initial value after autonumeric initializes.
253
269
  __classPrivateFieldSet(this, _SkyAgGridCellEditorCurrencyComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(this.params), "f");
254
270
  const control = this.editorForm.get('currency');
255
- switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorCurrencyComponent_triggerType, "f")) {
256
- case SkyAgGridCellEditorInitialAction.Delete:
257
- control.setValue(undefined);
258
- break;
259
- case SkyAgGridCellEditorInitialAction.Replace:
260
- control.setValue(parseFloat(this.params.charPress) || undefined);
261
- break;
262
- case SkyAgGridCellEditorInitialAction.Highlighted:
263
- case SkyAgGridCellEditorInitialAction.Untouched:
264
- default:
265
- control.setValue(parseFloat(this.params.value));
266
- break;
271
+ if (control) {
272
+ switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorCurrencyComponent_triggerType, "f")) {
273
+ case SkyAgGridCellEditorInitialAction.Delete:
274
+ control.setValue(undefined);
275
+ break;
276
+ case SkyAgGridCellEditorInitialAction.Replace:
277
+ control.setValue(parseFloat(String(this.params?.charPress)) || undefined);
278
+ break;
279
+ case SkyAgGridCellEditorInitialAction.Highlighted:
280
+ case SkyAgGridCellEditorInitialAction.Untouched:
281
+ default:
282
+ control.setValue(parseFloat(String(this.params?.value)));
283
+ break;
284
+ }
267
285
  }
268
- this.changeDetector.markForCheck();
286
+ __classPrivateFieldGet(this, _SkyAgGridCellEditorCurrencyComponent_changeDetector, "f").markForCheck();
269
287
  // Without the `setTimeout` there is inconsistent behavior with the highlighting when no initial value is present.
270
288
  setTimeout(() => {
271
289
  if (__classPrivateFieldGet(this, _SkyAgGridCellEditorCurrencyComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
272
- this.input.nativeElement.select();
290
+ this.input?.nativeElement.select();
273
291
  }
274
292
  }, 100);
275
293
  }
@@ -277,18 +295,20 @@ class SkyAgGridCellEditorCurrencyComponent {
277
295
  * getValue is called by agGrid when editing is stopped to get the new value of the cell.
278
296
  */
279
297
  getValue() {
280
- const val = this.editorForm.get('currency').value;
298
+ const val = this.editorForm.get('currency')?.value;
281
299
  return val !== undefined && val !== null ? val : undefined;
282
300
  }
283
301
  /**
284
302
  * The autoNumeric library's event handler suppresses the escape key event. This additional handler re-enables AG Grid's default functionality.
285
303
  */
286
304
  onPressEscape() {
287
- this.params.api.stopEditing(true);
288
- this.params.api.setFocusedCell(this.params.rowIndex, this.params.column);
305
+ if (this.params) {
306
+ this.params.api.stopEditing(true);
307
+ this.params.api.setFocusedCell(this.params.rowIndex, this.params.column);
308
+ }
289
309
  }
290
310
  }
291
- _SkyAgGridCellEditorCurrencyComponent_triggerType = new WeakMap();
311
+ _SkyAgGridCellEditorCurrencyComponent_triggerType = new WeakMap(), _SkyAgGridCellEditorCurrencyComponent_changeDetector = new WeakMap();
292
312
  SkyAgGridCellEditorCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
293
313
  SkyAgGridCellEditorCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellEditorCurrencyComponent, selector: "sky-ag-grid-cell-editor-currency", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorCurrency"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"currency\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [skyAutonumeric]=\"skyComponentProperties\"\n [skyAutonumericFormChangesUnformatted]=\"!!params?.charPress\"\n (keyup.escape)=\"onPressEscape()\"\n #skyCellEditorCurrency\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric", "skyAutonumericFormChangesUnformatted"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
294
314
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, decorators: [{
@@ -299,61 +319,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
299
319
  args: ['skyCellEditorCurrency', { read: ElementRef }]
300
320
  }] } });
301
321
 
302
- var _SkyAgGridCellEditorDatepickerComponent_triggerType;
322
+ var _SkyAgGridCellEditorDatepickerComponent_params, _SkyAgGridCellEditorDatepickerComponent_triggerType, _SkyAgGridCellEditorDatepickerComponent_changeDetector, _SkyAgGridCellEditorDatepickerComponent_themeSvc;
303
323
  /**
304
324
  * @internal
305
325
  */
306
326
  class SkyAgGridCellEditorDatepickerComponent extends PopupComponent {
307
327
  constructor(changeDetector, themeSvc) {
308
328
  super();
309
- this.changeDetector = changeDetector;
310
- this.themeSvc = themeSvc;
311
329
  this.editorForm = new UntypedFormGroup({
312
330
  date: new UntypedFormControl(),
313
331
  });
314
332
  this.skyComponentProperties = {};
333
+ _SkyAgGridCellEditorDatepickerComponent_params.set(this, void 0);
315
334
  _SkyAgGridCellEditorDatepickerComponent_triggerType.set(this, void 0);
335
+ _SkyAgGridCellEditorDatepickerComponent_changeDetector.set(this, void 0);
336
+ _SkyAgGridCellEditorDatepickerComponent_themeSvc.set(this, void 0);
337
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorDatepickerComponent_changeDetector, changeDetector, "f");
338
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorDatepickerComponent_themeSvc, themeSvc, "f");
316
339
  }
317
340
  /**
318
341
  * agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
319
342
  * @param params The cell editor params that include data about the cell, column, row, and grid.
320
343
  */
321
344
  agInit(params) {
322
- this.params = params;
345
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorDatepickerComponent_params, params, "f");
323
346
  __classPrivateFieldSet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
324
347
  const control = this.editorForm.get('date');
325
- switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f")) {
326
- case SkyAgGridCellEditorInitialAction.Delete:
327
- control.setValue(undefined);
328
- break;
329
- case SkyAgGridCellEditorInitialAction.Replace:
330
- control.setValue(params.charPress);
331
- break;
332
- case SkyAgGridCellEditorInitialAction.Highlighted:
333
- case SkyAgGridCellEditorInitialAction.Untouched:
334
- default:
335
- control.setValue(params.value);
336
- break;
337
- }
338
- if (this.params.skyComponentProperties?.disabled) {
339
- control.disable();
348
+ if (control) {
349
+ switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f")) {
350
+ case SkyAgGridCellEditorInitialAction.Delete:
351
+ control.setValue(undefined);
352
+ break;
353
+ case SkyAgGridCellEditorInitialAction.Replace:
354
+ control.setValue(params.charPress);
355
+ break;
356
+ case SkyAgGridCellEditorInitialAction.Highlighted:
357
+ case SkyAgGridCellEditorInitialAction.Untouched:
358
+ default:
359
+ control.setValue(params.value);
360
+ break;
361
+ }
362
+ if (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_params, "f").skyComponentProperties?.disabled) {
363
+ control.disable();
364
+ }
340
365
  }
341
- this.changeDetector.markForCheck();
342
- this.skyComponentProperties = this.params.skyComponentProperties || {};
343
- this.columnWidth = this.params.column.getActualWidth();
366
+ __classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_changeDetector, "f").markForCheck();
367
+ this.skyComponentProperties = __classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_params, "f").skyComponentProperties || {};
368
+ this.columnWidth = __classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_params, "f").column.getActualWidth();
344
369
  this.columnWidthWithoutBorders = this.columnWidth - 2;
345
- this.rowHeightWithoutBorders =
346
- this.params.node && this.params.node.rowHeight - 3;
347
- this.themeSvc?.settingsChange.subscribe((themeSettings) => {
370
+ this.rowHeightWithoutBorders = __classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_params, "f").node.rowHeight - 3;
371
+ __classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_themeSvc, "f")?.settingsChange.subscribe((themeSettings) => {
348
372
  if (themeSettings.currentSettings.theme.name === 'modern') {
349
373
  this.columnWidthWithoutBorders = this.columnWidth;
350
- this.rowHeightWithoutBorders =
351
- this.params.node && this.params.node.rowHeight;
374
+ this.rowHeightWithoutBorders = __classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_params, "f")?.node?.rowHeight;
352
375
  }
353
376
  else {
354
- this.columnWidthWithoutBorders = this.columnWidth - 2;
355
- this.rowHeightWithoutBorders =
356
- this.params.node && this.params.node.rowHeight - 3;
377
+ this.columnWidthWithoutBorders =
378
+ this.columnWidth === undefined ? undefined : this.columnWidth - 2;
379
+ this.rowHeightWithoutBorders = SkyAgGridCellEditorUtils.subtractOrZero(__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_params, "f")?.node.rowHeight, 3);
357
380
  }
358
381
  });
359
382
  }
@@ -361,36 +384,39 @@ class SkyAgGridCellEditorDatepickerComponent extends PopupComponent {
361
384
  * afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
362
385
  */
363
386
  afterGuiAttached() {
364
- const datepickerInputEl = this.datepickerInput
365
- .nativeElement;
366
- datepickerInputEl.focus();
367
- // Programatically set the value of in the input; however, do not do this via the form control so that the value is not formatted when editing starts.
368
- // Watch for the first blur and fire a 'change' event as programatic changes won't queue a change event, but we need to do this so that formatting happens if the user tabs to the calendar button.
369
- if (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Replace) {
370
- fromEvent(datepickerInputEl, 'blur')
371
- .pipe(first())
372
- .subscribe(() => {
373
- datepickerInputEl.dispatchEvent(new Event('change'));
374
- });
375
- datepickerInputEl.select();
376
- datepickerInputEl.setRangeText(this.params.charPress);
377
- // Ensure the cursor is at the end of the text.
378
- datepickerInputEl.setSelectionRange(this.params.charPress.length, this.params.charPress.length);
379
- }
380
- // this.changeDetector.markForCheck();
381
- if (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
382
- datepickerInputEl.select();
387
+ const datepickerInputEl = this.datepickerInput?.nativeElement;
388
+ if (datepickerInputEl) {
389
+ datepickerInputEl.focus();
390
+ // Programatically set the value of in the input; however, do not do this via the form control so that the value is not formatted when editing starts.
391
+ // Watch for the first blur and fire a 'change' event as programatic changes won't queue a change event, but we need to do this so that formatting happens if the user tabs to the calendar button.
392
+ if (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Replace) {
393
+ fromEvent(datepickerInputEl, 'blur')
394
+ .pipe(first())
395
+ .subscribe(() => {
396
+ datepickerInputEl.dispatchEvent(new Event('change'));
397
+ });
398
+ datepickerInputEl.select();
399
+ const charPress = __classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_params, "f")?.charPress;
400
+ if (charPress) {
401
+ datepickerInputEl.setRangeText(charPress);
402
+ // Ensure the cursor is at the end of the text.
403
+ datepickerInputEl.setSelectionRange(charPress.length, charPress.length);
404
+ }
405
+ }
406
+ if (__classPrivateFieldGet(this, _SkyAgGridCellEditorDatepickerComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
407
+ datepickerInputEl.select();
408
+ }
383
409
  }
384
410
  }
385
411
  /**
386
412
  * getValue is called by agGrid when editing is stopped to get the new value of the cell.
387
413
  */
388
414
  getValue() {
389
- this.datepickerInput.nativeElement.blur();
390
- return this.editorForm.get('date').value;
415
+ this.datepickerInput?.nativeElement.blur();
416
+ return this.editorForm.get('date')?.value;
391
417
  }
392
418
  }
393
- _SkyAgGridCellEditorDatepickerComponent_triggerType = new WeakMap();
419
+ _SkyAgGridCellEditorDatepickerComponent_params = new WeakMap(), _SkyAgGridCellEditorDatepickerComponent_triggerType = new WeakMap(), _SkyAgGridCellEditorDatepickerComponent_changeDetector = new WeakMap(), _SkyAgGridCellEditorDatepickerComponent_themeSvc = new WeakMap();
394
420
  SkyAgGridCellEditorDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorDatepickerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
395
421
  SkyAgGridCellEditorDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellEditorDatepickerComponent, selector: "sky-ag-grid-cell-editor-datepicker", viewQueries: [{ propertyName: "datepickerInput", first: true, predicate: ["skyCellEditorDatepickerInput"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"sky-ag-grid-cell-editor-datepicker\"\n [formGroup]=\"editorForm\"\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 formControlName=\"date\"\n skyDatepickerInput\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 #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n", 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}\n"], dependencies: [{ kind: "component", type: i2$2.λ2, selector: "sky-datepicker", inputs: ["pickerClass"], outputs: ["calendarDateRangeChange"] }, { kind: "directive", type: i2$2.λ3, selector: "[skyDatepickerInput]", inputs: ["dateFormat", "disabled", "maxDate", "minDate", "skyDatepickerInput", "skyDatepickerNoValidate", "startingDay", "strict"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
396
422
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorDatepickerComponent, decorators: [{
@@ -403,14 +429,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
403
429
  args: ['skyCellEditorDatepickerInput', { read: ElementRef }]
404
430
  }] } });
405
431
 
406
- var _SkyAgGridCellEditorLookupComponent_triggerType;
432
+ var _SkyAgGridCellEditorLookupComponent_instances, _SkyAgGridCellEditorLookupComponent_params, _SkyAgGridCellEditorLookupComponent_triggerType, _SkyAgGridCellEditorLookupComponent_changeDetector, _SkyAgGridCellEditorLookupComponent_elementRef, _SkyAgGridCellEditorLookupComponent_updateComponentProperties;
407
433
  /**
408
434
  * @internal
409
435
  */
410
436
  class SkyAgGridCellEditorLookupComponent {
411
437
  constructor(changeDetector, elementRef) {
412
- this.changeDetector = changeDetector;
413
- this.elementRef = elementRef;
438
+ _SkyAgGridCellEditorLookupComponent_instances.add(this);
414
439
  this.isAlive = false;
415
440
  this.editorForm = new UntypedFormGroup({
416
441
  selection: new UntypedFormControl({
@@ -419,61 +444,69 @@ class SkyAgGridCellEditorLookupComponent {
419
444
  }),
420
445
  });
421
446
  this.useAsyncSearch = false;
447
+ _SkyAgGridCellEditorLookupComponent_params.set(this, void 0);
422
448
  _SkyAgGridCellEditorLookupComponent_triggerType.set(this, void 0);
449
+ _SkyAgGridCellEditorLookupComponent_changeDetector.set(this, void 0);
450
+ _SkyAgGridCellEditorLookupComponent_elementRef.set(this, void 0);
451
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorLookupComponent_changeDetector, changeDetector, "f");
452
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorLookupComponent_elementRef, elementRef, "f");
423
453
  }
424
454
  agInit(params) {
425
- this.params = params;
426
- if (!Array.isArray(this.params.value)) {
455
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorLookupComponent_params, params, "f");
456
+ if (!Array.isArray(__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_params, "f").value)) {
427
457
  throw new Error(`Lookup value must be an array`);
428
458
  }
429
459
  __classPrivateFieldSet(this, _SkyAgGridCellEditorLookupComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
430
460
  const control = this.editorForm.get('selection');
431
- switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_triggerType, "f")) {
432
- case SkyAgGridCellEditorInitialAction.Delete:
433
- control.setValue([]);
434
- break;
435
- case SkyAgGridCellEditorInitialAction.Replace:
436
- case SkyAgGridCellEditorInitialAction.Highlighted:
437
- case SkyAgGridCellEditorInitialAction.Untouched:
438
- default:
439
- control.setValue(params.value);
440
- break;
441
- }
442
- if (this.params.skyComponentProperties.disabled) {
443
- control.disable();
461
+ if (control) {
462
+ switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_triggerType, "f")) {
463
+ case SkyAgGridCellEditorInitialAction.Delete:
464
+ control.setValue([]);
465
+ break;
466
+ case SkyAgGridCellEditorInitialAction.Replace:
467
+ case SkyAgGridCellEditorInitialAction.Highlighted:
468
+ case SkyAgGridCellEditorInitialAction.Untouched:
469
+ default:
470
+ control.setValue(params.value);
471
+ break;
472
+ }
473
+ if (__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_params, "f").skyComponentProperties?.disabled) {
474
+ control.disable();
475
+ }
444
476
  }
445
- this.skyComponentProperties = this.updateComponentProperties(this.params);
477
+ this.skyComponentProperties = __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_instances, "m", _SkyAgGridCellEditorLookupComponent_updateComponentProperties).call(this, __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_params, "f"));
446
478
  this.useAsyncSearch =
447
479
  typeof this.skyComponentProperties.searchAsync === 'function';
448
480
  this.isAlive = true;
449
- this.width = this.params.column.getActualWidth();
450
- this.params.column.addEventListener('uiColumnResized', (event) => {
451
- this.width = event.column.getActualWidth();
452
- this.changeDetector.markForCheck();
481
+ this.width = __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_params, "f").column.getActualWidth();
482
+ __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_params, "f").column.addEventListener('uiColumnResized', (event) => {
483
+ this.width = event.column?.getActualWidth();
484
+ __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_changeDetector, "f").markForCheck();
453
485
  });
454
- this.changeDetector.markForCheck();
486
+ __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_changeDetector, "f").markForCheck();
455
487
  }
456
488
  isCancelAfterEnd() {
457
489
  // Shut down components to commit values before final value syncs to grid.
458
490
  this.isAlive = false;
459
- this.changeDetector.detectChanges();
491
+ __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_changeDetector, "f").detectChanges();
460
492
  return false;
461
493
  }
462
494
  getGui() {
463
- return this.elementRef.nativeElement;
495
+ return __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_elementRef, "f").nativeElement;
464
496
  }
497
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
465
498
  getValue() {
466
- return this.editorForm.get('selection').value;
499
+ return this.editorForm.get('selection')?.value;
467
500
  }
468
501
  isPopup() {
469
502
  return true;
470
503
  }
471
504
  afterGuiAttached() {
472
- const lookupInput = this.elementRef.nativeElement.querySelector('.sky-lookup-input');
505
+ const lookupInput = __classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_elementRef, "f").nativeElement.querySelector('.sky-lookup-input');
473
506
  lookupInput.focus();
474
507
  if (__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Replace) {
475
508
  lookupInput.select();
476
- lookupInput.setRangeText(this.params.charPress);
509
+ lookupInput.setRangeText(__classPrivateFieldGet(this, _SkyAgGridCellEditorLookupComponent_params, "f")?.charPress);
477
510
  // Ensure the cursor is at the end of the text.
478
511
  lookupInput.setSelectionRange(lookupInput.value.length, lookupInput.value.length);
479
512
  lookupInput.dispatchEvent(new Event('input'));
@@ -482,23 +515,22 @@ class SkyAgGridCellEditorLookupComponent {
482
515
  lookupInput.select();
483
516
  }
484
517
  }
485
- updateComponentProperties(params) {
486
- const skyLookupProperties = params.skyComponentProperties;
487
- return applySkyLookupPropertiesDefaults(skyLookupProperties);
488
- }
489
518
  }
490
- _SkyAgGridCellEditorLookupComponent_triggerType = new WeakMap();
519
+ _SkyAgGridCellEditorLookupComponent_params = new WeakMap(), _SkyAgGridCellEditorLookupComponent_triggerType = new WeakMap(), _SkyAgGridCellEditorLookupComponent_changeDetector = new WeakMap(), _SkyAgGridCellEditorLookupComponent_elementRef = new WeakMap(), _SkyAgGridCellEditorLookupComponent_instances = new WeakSet(), _SkyAgGridCellEditorLookupComponent_updateComponentProperties = function _SkyAgGridCellEditorLookupComponent_updateComponentProperties(params) {
520
+ const skyLookupProperties = params.skyComponentProperties;
521
+ return applySkyLookupPropertiesDefaults(skyLookupProperties);
522
+ };
491
523
  SkyAgGridCellEditorLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorLookupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
492
- SkyAgGridCellEditorLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellEditorLookupComponent, selector: "sky-ag-grid-cell-editor-lookup", host: { properties: { "style.width.px": "this.width" } }, ngImport: i0, template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\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=\"selection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n (searchAsync)=\"skyComponentProperties.searchAsync($event)\"\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<sky-input-box\n *ngIf=\"isAlive && !useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\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=\"selection\"\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]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\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", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i2$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$1.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { kind: "component", type: i2.λ4, selector: "sky-lookup", inputs: ["ariaLabel", "ariaLabelledBy", "autocompleteAttribute", "data", "disabled", "enableShowMore", "placeholderText", "idProperty", "showAddButton", "showMoreConfig", "selectMode", "wrapperClass"], outputs: ["addClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
524
+ SkyAgGridCellEditorLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellEditorLookupComponent, selector: "sky-ag-grid-cell-editor-lookup", host: { properties: { "style.width.px": "this.width" } }, ngImport: i0, template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\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=\"selection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n (searchAsync)=\"skyComponentProperties?.searchAsync($event)\"\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<sky-input-box\n *ngIf=\"isAlive && !useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\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=\"selection\"\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]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\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", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i2$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$1.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { kind: "component", type: i2.λ4, selector: "sky-lookup", inputs: ["ariaLabel", "ariaLabelledBy", "autocompleteAttribute", "data", "disabled", "enableShowMore", "placeholderText", "idProperty", "showAddButton", "showMoreConfig", "selectMode", "wrapperClass"], outputs: ["addClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
493
525
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorLookupComponent, decorators: [{
494
526
  type: Component,
495
- args: [{ selector: 'sky-ag-grid-cell-editor-lookup', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\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=\"selection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n (searchAsync)=\"skyComponentProperties.searchAsync($event)\"\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<sky-input-box\n *ngIf=\"isAlive && !useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\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=\"selection\"\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]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\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", styles: [":host{display:block}\n"] }]
527
+ args: [{ selector: 'sky-ag-grid-cell-editor-lookup', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\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=\"selection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n (searchAsync)=\"skyComponentProperties?.searchAsync($event)\"\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<sky-input-box\n *ngIf=\"isAlive && !useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\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=\"selection\"\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]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\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", styles: [":host{display:block}\n"] }]
496
528
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { width: [{
497
529
  type: HostBinding,
498
530
  args: ['style.width.px']
499
531
  }] } });
500
532
 
501
- var _SkyAgGridCellEditorNumberComponent_triggerType;
533
+ var _SkyAgGridCellEditorNumberComponent_params, _SkyAgGridCellEditorNumberComponent_triggerType;
502
534
  /**
503
535
  * @internal
504
536
  */
@@ -507,6 +539,7 @@ class SkyAgGridCellEditorNumberComponent {
507
539
  this.editorForm = new UntypedFormGroup({
508
540
  number: new UntypedFormControl(),
509
541
  });
542
+ _SkyAgGridCellEditorNumberComponent_params.set(this, void 0);
510
543
  _SkyAgGridCellEditorNumberComponent_triggerType.set(this, void 0);
511
544
  }
512
545
  /**
@@ -514,59 +547,62 @@ class SkyAgGridCellEditorNumberComponent {
514
547
  * @param params The cell editor params that include data about the cell, column, row, and grid.
515
548
  */
516
549
  agInit(params) {
517
- this.params = params;
550
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorNumberComponent_params, params, "f");
518
551
  __classPrivateFieldSet(this, _SkyAgGridCellEditorNumberComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
519
552
  const control = this.editorForm.get('number');
520
- switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_triggerType, "f")) {
521
- case SkyAgGridCellEditorInitialAction.Delete:
522
- control.setValue(undefined);
523
- break;
524
- case SkyAgGridCellEditorInitialAction.Replace:
525
- control.setValue(parseFloat(this.params.charPress) || undefined);
526
- break;
527
- case SkyAgGridCellEditorInitialAction.Highlighted:
528
- case SkyAgGridCellEditorInitialAction.Untouched:
529
- default:
530
- control.setValue(params.value);
531
- break;
553
+ if (control) {
554
+ switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_triggerType, "f")) {
555
+ case SkyAgGridCellEditorInitialAction.Delete:
556
+ control.setValue(undefined);
557
+ break;
558
+ case SkyAgGridCellEditorInitialAction.Replace:
559
+ control.setValue(parseFloat(__classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_params, "f")?.charPress) || undefined);
560
+ break;
561
+ case SkyAgGridCellEditorInitialAction.Highlighted:
562
+ case SkyAgGridCellEditorInitialAction.Untouched:
563
+ default:
564
+ control.setValue(params.value);
565
+ break;
566
+ }
532
567
  }
533
568
  this.max = params.skyComponentProperties?.max;
534
569
  this.min = params.skyComponentProperties?.min;
535
- this.columnHeader = this.params.colDef.headerName;
536
- this.rowNumber = this.params.rowIndex + 1;
537
- this.columnWidth = this.params.column.getActualWidth();
538
- this.rowHeightWithoutBorders =
539
- this.params.node && this.params.node.rowHeight - 4;
570
+ this.columnHeader = __classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_params, "f").colDef.headerName;
571
+ this.rowNumber = __classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_params, "f").rowIndex + 1;
572
+ this.columnWidth = __classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_params, "f").column.getActualWidth();
573
+ this.rowHeightWithoutBorders = __classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_params, "f").node.rowHeight - 4;
540
574
  }
541
575
  /**
542
576
  * afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
543
577
  */
544
578
  afterGuiAttached() {
545
- this.input.nativeElement.focus();
546
- if (__classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
547
- this.input.nativeElement.select();
579
+ if (this.input) {
580
+ this.input.nativeElement.focus();
581
+ if (__classPrivateFieldGet(this, _SkyAgGridCellEditorNumberComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
582
+ this.input.nativeElement.select();
583
+ }
548
584
  }
549
585
  }
550
586
  /**
551
587
  * getValue is called by agGrid when editing is stopped to get the new value of the cell.
552
588
  */
553
589
  getValue() {
554
- const val = this.editorForm.get('number').value;
590
+ const val = this.editorForm.get('number')?.value;
555
591
  return val !== undefined && val !== null ? val : undefined;
556
592
  }
557
593
  }
558
- _SkyAgGridCellEditorNumberComponent_triggerType = new WeakMap();
594
+ _SkyAgGridCellEditorNumberComponent_params = new WeakMap(), _SkyAgGridCellEditorNumberComponent_triggerType = new WeakMap();
559
595
  SkyAgGridCellEditorNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
560
- SkyAgGridCellEditorNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"number\"\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [max]=\"max\"\n [min]=\"min\"\n #skyCellEditorNumber\n />\n</ng-container>\n", styles: ["input{border:none;text-align:right}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
596
+ SkyAgGridCellEditorNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"number\"\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [max]=\"max ?? null\"\n [min]=\"min ?? null\"\n #skyCellEditorNumber\n />\n</ng-container>\n", styles: ["input{border:none;text-align:right}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
561
597
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, decorators: [{
562
598
  type: Component,
563
- args: [{ selector: 'sky-ag-grid-cell-editor-number', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"number\"\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [max]=\"max\"\n [min]=\"min\"\n #skyCellEditorNumber\n />\n</ng-container>\n", styles: ["input{border:none;text-align:right}\n"] }]
599
+ args: [{ selector: 'sky-ag-grid-cell-editor-number', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"number\"\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [max]=\"max ?? null\"\n [min]=\"min ?? null\"\n #skyCellEditorNumber\n />\n</ng-container>\n", styles: ["input{border:none;text-align:right}\n"] }]
564
600
  }], propDecorators: { input: [{
565
601
  type: ViewChild,
566
602
  args: ['skyCellEditorNumber', { read: ElementRef }]
567
603
  }] } });
568
604
 
569
- var _SkyAgGridCellEditorTextComponent_triggerType;
605
+ var _SkyAgGridCellEditorTextComponent_params, _SkyAgGridCellEditorTextComponent_triggerType;
570
606
  /**
571
607
  * @internal
572
608
  */
@@ -575,6 +611,7 @@ class SkyAgGridCellEditorTextComponent {
575
611
  this.editorForm = new UntypedFormGroup({
576
612
  text: new UntypedFormControl(),
577
613
  });
614
+ _SkyAgGridCellEditorTextComponent_params.set(this, void 0);
578
615
  _SkyAgGridCellEditorTextComponent_triggerType.set(this, void 0);
579
616
  }
580
617
  /**
@@ -582,126 +619,132 @@ class SkyAgGridCellEditorTextComponent {
582
619
  * @param params The cell editor params that include data about the cell, column, row, and grid.
583
620
  */
584
621
  agInit(params) {
585
- this.params = params;
622
+ __classPrivateFieldSet(this, _SkyAgGridCellEditorTextComponent_params, params, "f");
586
623
  __classPrivateFieldSet(this, _SkyAgGridCellEditorTextComponent_triggerType, SkyAgGridCellEditorUtils.getEditorInitialAction(params), "f");
587
624
  const control = this.editorForm.get('text');
588
- switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_triggerType, "f")) {
589
- case SkyAgGridCellEditorInitialAction.Delete:
590
- control.setValue(undefined);
591
- break;
592
- case SkyAgGridCellEditorInitialAction.Replace:
593
- control.setValue(params.charPress);
594
- break;
595
- case SkyAgGridCellEditorInitialAction.Highlighted:
596
- case SkyAgGridCellEditorInitialAction.Untouched:
597
- default:
598
- control.setValue(params.value);
599
- break;
625
+ if (control) {
626
+ switch (__classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_triggerType, "f")) {
627
+ case SkyAgGridCellEditorInitialAction.Delete:
628
+ control.setValue(undefined);
629
+ break;
630
+ case SkyAgGridCellEditorInitialAction.Replace:
631
+ control.setValue(params.charPress);
632
+ break;
633
+ case SkyAgGridCellEditorInitialAction.Highlighted:
634
+ case SkyAgGridCellEditorInitialAction.Untouched:
635
+ default:
636
+ control.setValue(params.value);
637
+ break;
638
+ }
600
639
  }
601
640
  this.maxlength = params.skyComponentProperties?.maxlength;
602
- this.columnHeader = this.params.colDef.headerName;
603
- this.rowNumber = this.params.rowIndex + 1;
604
- this.columnWidth = this.params.column.getActualWidth();
605
- this.rowHeightWithoutBorders =
606
- this.params.node && this.params.node.rowHeight - 4;
641
+ this.columnHeader = __classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_params, "f").colDef.headerName;
642
+ this.rowNumber = __classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_params, "f").rowIndex + 1;
643
+ this.columnWidth = __classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_params, "f").column.getActualWidth();
644
+ this.rowHeightWithoutBorders = __classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_params, "f").node.rowHeight - 4;
607
645
  }
608
646
  /**
609
647
  * afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
610
648
  */
611
649
  afterGuiAttached() {
612
- this.input.nativeElement.focus();
613
- if (__classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
614
- this.input.nativeElement.select();
650
+ if (this.input) {
651
+ this.input.nativeElement.focus();
652
+ if (__classPrivateFieldGet(this, _SkyAgGridCellEditorTextComponent_triggerType, "f") === SkyAgGridCellEditorInitialAction.Highlighted) {
653
+ this.input.nativeElement.select();
654
+ }
615
655
  }
616
656
  }
617
657
  /**
618
658
  * getValue is called by agGrid when editing is stopped to get the new value of the cell.
619
659
  */
620
660
  getValue() {
621
- return this.editorForm.get('text').value || undefined;
661
+ return this.editorForm.get('text')?.value || undefined;
622
662
  }
623
663
  }
624
- _SkyAgGridCellEditorTextComponent_triggerType = new WeakMap();
664
+ _SkyAgGridCellEditorTextComponent_params = new WeakMap(), _SkyAgGridCellEditorTextComponent_triggerType = new WeakMap();
625
665
  SkyAgGridCellEditorTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
626
- SkyAgGridCellEditorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"text\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [maxlength]=\"maxlength\"\n #skyCellEditorText\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
666
+ SkyAgGridCellEditorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"text\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [maxlength]=\"maxlength ?? null\"\n #skyCellEditorText\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
627
667
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellEditorTextComponent, decorators: [{
628
668
  type: Component,
629
- args: [{ selector: 'sky-ag-grid-cell-editor-text', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"text\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [maxlength]=\"maxlength\"\n #skyCellEditorText\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"] }]
669
+ args: [{ selector: 'sky-ag-grid-cell-editor-text', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n formControlName=\"text\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [maxlength]=\"maxlength ?? null\"\n #skyCellEditorText\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"] }]
630
670
  }], propDecorators: { input: [{
631
671
  type: ViewChild,
632
672
  args: ['skyCellEditorText', { read: ElementRef }]
633
673
  }] } });
634
674
 
675
+ var _SkyAgGridCellValidatorTooltipComponent_instances, _SkyAgGridCellValidatorTooltipComponent_hoverTimeout, _SkyAgGridCellValidatorTooltipComponent_changeDetector, _SkyAgGridCellValidatorTooltipComponent_scheduleDelayedPopover, _SkyAgGridCellValidatorTooltipComponent_cancelDelayedPopover;
635
676
  /**
636
677
  * @internal
637
678
  */
638
679
  class SkyAgGridCellValidatorTooltipComponent {
639
680
  constructor(changeDetector) {
640
- this.changeDetector = changeDetector;
681
+ _SkyAgGridCellValidatorTooltipComponent_instances.add(this);
641
682
  this.popoverMessageStream = new Subject();
683
+ _SkyAgGridCellValidatorTooltipComponent_hoverTimeout.set(this, void 0);
684
+ _SkyAgGridCellValidatorTooltipComponent_changeDetector.set(this, void 0);
685
+ __classPrivateFieldSet(this, _SkyAgGridCellValidatorTooltipComponent_changeDetector, changeDetector, "f");
642
686
  }
643
687
  set params(value) {
644
688
  this.cellRendererParams = value;
645
689
  /*istanbul ignore next*/
646
- this.cellRendererParams.api?.addEventListener(Events.EVENT_CELL_FOCUSED, (eventParams) => {
690
+ this.cellRendererParams?.api?.addEventListener(Events.EVENT_CELL_FOCUSED, (eventParams) => {
647
691
  // We want to close any popovers that are opened when other cells are focused, but open a popover if the current cell is focused.
648
692
  if (!(eventParams.column instanceof Column) ||
649
693
  eventParams.column.getColId() !==
650
- this.cellRendererParams.column.getColId() ||
694
+ this.cellRendererParams?.column?.getColId() ||
651
695
  eventParams.rowIndex !== this.cellRendererParams.rowIndex) {
652
696
  this.hidePopover();
653
697
  }
654
698
  });
655
699
  /*istanbul ignore next*/
656
- this.cellRendererParams.eGridCell?.addEventListener('keyup', (event) => {
700
+ this.cellRendererParams?.eGridCell?.addEventListener('keyup', (event) => {
657
701
  if (['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(event.key)) {
658
702
  this.showPopover();
659
703
  }
660
704
  });
661
- this.cellRendererParams.eGridCell?.addEventListener('mouseenter', () => {
662
- this.scheduleDelayedPopover();
705
+ this.cellRendererParams?.eGridCell?.addEventListener('mouseenter', () => {
706
+ __classPrivateFieldGet(this, _SkyAgGridCellValidatorTooltipComponent_instances, "m", _SkyAgGridCellValidatorTooltipComponent_scheduleDelayedPopover).call(this);
663
707
  });
664
- this.cellRendererParams.eGridCell?.addEventListener('mouseleave', () => {
708
+ this.cellRendererParams?.eGridCell?.addEventListener('mouseleave', () => {
665
709
  this.hidePopover();
666
710
  });
667
711
  /*istanbul ignore next*/
668
- this.cellRendererParams.api?.addEventListener(Events.EVENT_CELL_EDITING_STARTED, () => {
712
+ this.cellRendererParams?.api?.addEventListener(Events.EVENT_CELL_EDITING_STARTED, () => {
669
713
  this.hidePopover();
670
714
  });
671
- if (typeof this.cellRendererParams.skyComponentProperties
715
+ if (typeof this.cellRendererParams?.skyComponentProperties
672
716
  ?.validatorMessage === 'function') {
673
717
  this.validatorMessage =
674
718
  this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams.rowIndex);
675
719
  }
676
720
  else {
677
721
  this.validatorMessage =
678
- this.cellRendererParams.skyComponentProperties?.validatorMessage;
722
+ this.cellRendererParams?.skyComponentProperties?.validatorMessage;
679
723
  }
680
- this.changeDetector.markForCheck();
724
+ __classPrivateFieldGet(this, _SkyAgGridCellValidatorTooltipComponent_changeDetector, "f").markForCheck();
681
725
  }
682
726
  hidePopover() {
683
- this.cancelDelayedPopover();
727
+ __classPrivateFieldGet(this, _SkyAgGridCellValidatorTooltipComponent_instances, "m", _SkyAgGridCellValidatorTooltipComponent_cancelDelayedPopover).call(this);
684
728
  this.popoverMessageStream.next({ type: SkyPopoverMessageType.Close });
685
729
  }
686
730
  showPopover() {
687
- this.cancelDelayedPopover();
731
+ __classPrivateFieldGet(this, _SkyAgGridCellValidatorTooltipComponent_instances, "m", _SkyAgGridCellValidatorTooltipComponent_cancelDelayedPopover).call(this);
688
732
  this.popoverMessageStream.next({ type: SkyPopoverMessageType.Open });
689
733
  }
690
- scheduleDelayedPopover() {
691
- /* istanbul ignore else */
692
- if (!this._hoverTimeout) {
693
- this._hoverTimeout = window.setTimeout(() => {
694
- this.showPopover();
695
- }, 300);
696
- }
697
- }
698
- cancelDelayedPopover() {
699
- if (this._hoverTimeout) {
700
- window.clearTimeout(this._hoverTimeout);
701
- this._hoverTimeout = undefined;
702
- }
703
- }
704
734
  }
735
+ _SkyAgGridCellValidatorTooltipComponent_hoverTimeout = new WeakMap(), _SkyAgGridCellValidatorTooltipComponent_changeDetector = new WeakMap(), _SkyAgGridCellValidatorTooltipComponent_instances = new WeakSet(), _SkyAgGridCellValidatorTooltipComponent_scheduleDelayedPopover = function _SkyAgGridCellValidatorTooltipComponent_scheduleDelayedPopover() {
736
+ /* istanbul ignore else */
737
+ if (!__classPrivateFieldGet(this, _SkyAgGridCellValidatorTooltipComponent_hoverTimeout, "f")) {
738
+ __classPrivateFieldSet(this, _SkyAgGridCellValidatorTooltipComponent_hoverTimeout, window.setTimeout(() => {
739
+ this.showPopover();
740
+ }, 300), "f");
741
+ }
742
+ }, _SkyAgGridCellValidatorTooltipComponent_cancelDelayedPopover = function _SkyAgGridCellValidatorTooltipComponent_cancelDelayedPopover() {
743
+ if (__classPrivateFieldGet(this, _SkyAgGridCellValidatorTooltipComponent_hoverTimeout, "f")) {
744
+ window.clearTimeout(__classPrivateFieldGet(this, _SkyAgGridCellValidatorTooltipComponent_hoverTimeout, "f"));
745
+ __classPrivateFieldSet(this, _SkyAgGridCellValidatorTooltipComponent_hoverTimeout, undefined, "f");
746
+ }
747
+ };
705
748
  SkyAgGridCellValidatorTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
706
749
  SkyAgGridCellValidatorTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: { params: "params" }, ngImport: i0, template: "<div\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n class=\"sky-validator-cell\"\n>\n <ng-content></ng-content>\n <sky-status-indicator\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n ></sky-status-indicator>\n</div>\n<sky-popover #validatorPopover popoverType=\"danger\">\n {{ validatorMessage }}\n</sky-popover>\n", styles: [":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:none}\n"], dependencies: [{ kind: "component", type: i1$3.λ6, selector: "sky-popover", inputs: ["alignment", "dismissOnBlur", "placement", "popoverTitle", "popoverType"], outputs: ["popoverClosed", "popoverOpened"] }, { kind: "directive", type: i1$3.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { kind: "component", type: i3$2.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
707
750
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, decorators: [{
@@ -711,11 +754,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
711
754
  type: Input
712
755
  }] } });
713
756
 
757
+ var _SkyAgGridCellRendererCurrencyComponent_instances, _SkyAgGridCellRendererCurrencyComponent_updateProperties;
714
758
  /**
715
759
  * @internal
716
760
  */
717
761
  class SkyAgGridCellRendererCurrencyComponent {
718
762
  constructor() {
763
+ _SkyAgGridCellRendererCurrencyComponent_instances.add(this);
719
764
  this.skyComponentProperties = {};
720
765
  this.numericOptions = {};
721
766
  }
@@ -727,30 +772,32 @@ class SkyAgGridCellRendererCurrencyComponent {
727
772
  * @param params The cell renderer params that include data about the cell, column, row, and grid.
728
773
  */
729
774
  agInit(params) {
730
- this.updateProperties(params);
775
+ __classPrivateFieldGet(this, _SkyAgGridCellRendererCurrencyComponent_instances, "m", _SkyAgGridCellRendererCurrencyComponent_updateProperties).call(this, params);
731
776
  }
777
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
732
778
  refresh(params) {
733
779
  return false;
734
780
  }
735
- updateProperties(params) {
736
- this._params = params;
737
- this.value = this._params.value;
738
- this.columnHeader = this._params.colDef && this._params.colDef.headerName;
739
- this.rowNumber = this._params.rowIndex + 1;
740
- this.columnWidth = this._params.column?.getActualWidth();
741
- this.rowHeightWithoutBorders =
742
- this._params.node && this._params.node.rowHeight - 4;
743
- this.skyComponentProperties = this._params.skyComponentProperties || {};
744
- this.skyComponentProperties.format = 'currency';
745
- this.skyComponentProperties.minDigits = 2;
746
- this.skyComponentProperties.truncate = false;
747
- }
748
781
  }
782
+ _SkyAgGridCellRendererCurrencyComponent_instances = new WeakSet(), _SkyAgGridCellRendererCurrencyComponent_updateProperties = function _SkyAgGridCellRendererCurrencyComponent_updateProperties(params) {
783
+ this.value = params.value;
784
+ this.columnHeader = params.colDef?.headerName;
785
+ this.rowNumber = params.rowIndex + 1;
786
+ this.columnWidth = params.column?.getActualWidth();
787
+ this.rowHeightWithoutBorders =
788
+ typeof params.node?.rowHeight === 'number'
789
+ ? params.node?.rowHeight - 4
790
+ : undefined;
791
+ this.skyComponentProperties = params.skyComponentProperties || {};
792
+ this.skyComponentProperties.format = 'currency';
793
+ this.skyComponentProperties.minDigits = 2;
794
+ this.skyComponentProperties.truncate = false;
795
+ };
749
796
  SkyAgGridCellRendererCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
750
- SkyAgGridCellRendererCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0, template: "<span\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "pipe", type: i1.SkyNumericPipe, name: "skyNumeric" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
797
+ SkyAgGridCellRendererCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0, template: "<span\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{\n value === undefined\n ? undefined\n : (value | skyNumeric: skyComponentProperties)\n }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "pipe", type: i1.SkyNumericPipe, name: "skyNumeric" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
751
798
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, decorators: [{
752
799
  type: Component,
753
- args: [{ selector: 'sky-ag-grid-cell-renderer-currency', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"] }]
800
+ args: [{ selector: 'sky-ag-grid-cell-renderer-currency', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{\n value === undefined\n ? undefined\n : (value | skyNumeric: skyComponentProperties)\n }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"] }]
754
801
  }], propDecorators: { params: [{
755
802
  type: Input
756
803
  }] } });
@@ -773,18 +820,20 @@ class SkyAgGridCellRendererCurrencyValidatorComponent {
773
820
  this.cellRendererParams = params;
774
821
  this.changeDetector.markForCheck();
775
822
  }
823
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
776
824
  isNumeric(value) {
777
825
  return !isNaN(parseFloat(value));
778
826
  }
827
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
779
828
  refresh(params) {
780
829
  return false;
781
830
  }
782
831
  }
783
832
  SkyAgGridCellRendererCurrencyValidatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellRendererCurrencyValidatorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
784
- SkyAgGridCellRendererCurrencyValidatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellRendererCurrencyValidatorComponent, selector: "sky-ag-grid-cell-renderer-currency-validator", inputs: { parameters: "parameters" }, ngImport: i0, template: "<sky-ag-grid-cell-validator-tooltip [params]=\"cellRendererParams\">\n <sky-ag-grid-cell-renderer-currency\n *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", dependencies: [{ kind: "directive", type: i2$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: ["params"] }, { kind: "component", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: ["params"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
833
+ SkyAgGridCellRendererCurrencyValidatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellRendererCurrencyValidatorComponent, selector: "sky-ag-grid-cell-renderer-currency-validator", inputs: { parameters: "parameters" }, ngImport: i0, template: "<sky-ag-grid-cell-validator-tooltip\n *ngIf=\"cellRendererParams\"\n [params]=\"cellRendererParams\"\n>\n <sky-ag-grid-cell-renderer-currency\n *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", dependencies: [{ kind: "directive", type: i2$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: ["params"] }, { kind: "component", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: ["params"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
785
834
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellRendererCurrencyValidatorComponent, decorators: [{
786
835
  type: Component,
787
- args: [{ selector: 'sky-ag-grid-cell-renderer-currency-validator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-ag-grid-cell-validator-tooltip [params]=\"cellRendererParams\">\n <sky-ag-grid-cell-renderer-currency\n *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" }]
836
+ args: [{ selector: 'sky-ag-grid-cell-renderer-currency-validator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<sky-ag-grid-cell-validator-tooltip\n *ngIf=\"cellRendererParams\"\n [params]=\"cellRendererParams\"\n>\n <sky-ag-grid-cell-renderer-currency\n *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" }]
788
837
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { parameters: [{
789
838
  type: Input
790
839
  }] } });
@@ -815,31 +864,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
815
864
  args: [{ selector: 'sky-cell-renderer-lookup', changeDetection: ChangeDetectionStrategy.OnPush, 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", styles: [":host{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
816
865
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
817
866
 
867
+ var _SkyAgGridCellRendererRowSelectorComponent_instances, _SkyAgGridCellRendererRowSelectorComponent_params, _SkyAgGridCellRendererRowSelectorComponent_changeDetector, _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener;
818
868
  /**
819
869
  * @internal
820
870
  */
821
871
  class SkyAgGridCellRendererRowSelectorComponent {
822
- constructor(changeDetection) {
823
- this.changeDetection = changeDetection;
872
+ constructor(changeDetector) {
873
+ _SkyAgGridCellRendererRowSelectorComponent_instances.add(this);
874
+ _SkyAgGridCellRendererRowSelectorComponent_params.set(this, void 0);
875
+ _SkyAgGridCellRendererRowSelectorComponent_changeDetector.set(this, void 0);
876
+ __classPrivateFieldSet(this, _SkyAgGridCellRendererRowSelectorComponent_changeDetector, changeDetector, "f");
824
877
  }
825
878
  /**
826
879
  * agInit is called by agGrid once after the cell is created and provides the renderer with the information it needs.
827
880
  * @param params The cell renderer params that include data about the cell, column, row, and grid.
828
881
  */
829
882
  agInit(params) {
830
- this.params = params;
831
- this.dataField = this.params.colDef && this.params.colDef.field;
832
- this.rowNode = this.params.node;
833
- this.rowNumber = this.params.rowIndex + 1;
883
+ __classPrivateFieldSet(this, _SkyAgGridCellRendererRowSelectorComponent_params, params, "f");
884
+ this.dataField = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").colDef?.field;
885
+ this.rowNode = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").node;
886
+ this.rowNumber = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").rowIndex + 1;
834
887
  if (this.dataField) {
835
- this.checked = this.params.value;
836
- this.rowNode.setSelected(this.checked);
888
+ this.checked = __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_params, "f").value;
889
+ this.rowNode.setSelected(!!this.checked);
837
890
  }
838
891
  else {
839
892
  this.checked = this.rowNode.isSelected();
840
893
  }
841
894
  this.rowNode.addEventListener(RowNode.EVENT_ROW_SELECTED, (event) => {
842
- this.rowSelectedListener(event);
895
+ __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_instances, "m", _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener).call(this, event);
843
896
  });
844
897
  }
845
898
  /**
@@ -851,19 +904,21 @@ class SkyAgGridCellRendererRowSelectorComponent {
851
904
  return false;
852
905
  }
853
906
  updateRow() {
854
- this.rowNode.setSelected(this.checked);
855
- if (this.dataField) {
856
- this.rowNode.data[this.dataField] = this.checked;
857
- }
858
- }
859
- rowSelectedListener(event) {
860
- this.checked = event.node.isSelected();
861
- if (this.dataField) {
862
- this.rowNode.data[this.dataField] = this.checked;
907
+ if (this.rowNode) {
908
+ this.rowNode.setSelected(!!this.checked);
909
+ if (this.dataField) {
910
+ this.rowNode.data[this.dataField] = this.checked;
911
+ }
863
912
  }
864
- this.changeDetection.markForCheck();
865
913
  }
866
914
  }
915
+ _SkyAgGridCellRendererRowSelectorComponent_params = new WeakMap(), _SkyAgGridCellRendererRowSelectorComponent_changeDetector = new WeakMap(), _SkyAgGridCellRendererRowSelectorComponent_instances = new WeakSet(), _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener = function _SkyAgGridCellRendererRowSelectorComponent_rowSelectedListener(event) {
916
+ this.checked = event.node.isSelected();
917
+ if (this.rowNode && this.dataField) {
918
+ this.rowNode.data[this.dataField] = this.checked;
919
+ }
920
+ __classPrivateFieldGet(this, _SkyAgGridCellRendererRowSelectorComponent_changeDetector, "f").markForCheck();
921
+ };
867
922
  SkyAgGridCellRendererRowSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellRendererRowSelectorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
868
923
  SkyAgGridCellRendererRowSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridCellRendererRowSelectorComponent, selector: "sky-ag-grid-cell-renderer-row-selector", ngImport: i0, template: "<sky-checkbox\n data-sky-id=\"row-checkbox\"\n [tabindex]=\"-1\"\n [label]=\"'sky_ag_grid_row_selector_aria_label' | skyLibResources: rowNumber\"\n [attr.aria-label]=\"\n 'sky_ag_grid_row_selector_aria_label' | skyLibResources: rowNumber\n \"\n [(ngModel)]=\"checked\"\n (change)=\"updateRow()\"\n>\n</sky-checkbox>\n", styles: [".sky-ag-grid-cell-row-selector .sky-switch-control{top:-6px}\n"], dependencies: [{ kind: "component", type: i3$1.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
869
924
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridCellRendererRowSelectorComponent, decorators: [{
@@ -891,6 +946,7 @@ class SkyAgGridCellRendererValidatorTooltipComponent {
891
946
  }
892
947
  this.changeDetector.markForCheck();
893
948
  }
949
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
894
950
  refresh(params) {
895
951
  return false;
896
952
  }
@@ -949,13 +1005,13 @@ class SkyAgGridHeaderGroupComponent {
949
1005
  __classPrivateFieldSet(this, _SkyAgGridHeaderGroupComponent_agIntialized, true, "f");
950
1006
  this.params = params;
951
1007
  __classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_subscriptions, "f").unsubscribe();
952
- if (!this.params) {
1008
+ if (!params) {
953
1009
  return;
954
1010
  }
955
1011
  __classPrivateFieldSet(this, _SkyAgGridHeaderGroupComponent_subscriptions, new Subscription(), "f");
956
- __classPrivateFieldSet(this, _SkyAgGridHeaderGroupComponent_columnGroup, this.params.columnGroup.getProvidedColumnGroup(), "f");
1012
+ __classPrivateFieldSet(this, _SkyAgGridHeaderGroupComponent_columnGroup, params.columnGroup.getProvidedColumnGroup(), "f");
957
1013
  if (__classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_columnGroup, "f").isExpandable()) {
958
- __classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_subscriptions, "f").add(fromEvent(this.params.api, Events.EVENT_COLUMN_GROUP_OPENED).subscribe((event) => {
1014
+ __classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_subscriptions, "f").add(fromEventPattern((handler) => params.api.addEventListener(Events.EVENT_COLUMN_GROUP_OPENED, handler), (handler) => params.api.removeEventListener(Events.EVENT_COLUMN_GROUP_OPENED, handler)).subscribe((event) => {
959
1015
  if (event.columnGroup === __classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_columnGroup, "f")) {
960
1016
  __classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_isExpandedSubject, "f").next(__classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_columnGroup, "f").isExpanded());
961
1017
  }
@@ -965,7 +1021,7 @@ class SkyAgGridHeaderGroupComponent {
965
1021
  __classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_changeDetector, "f").markForCheck();
966
1022
  }
967
1023
  setExpanded($event) {
968
- this.params.setExpanded($event);
1024
+ this.params?.setExpanded($event);
969
1025
  }
970
1026
  }
971
1027
  _SkyAgGridHeaderGroupComponent_columnGroup = new WeakMap(), _SkyAgGridHeaderGroupComponent_isExpandedSubject = new WeakMap(), _SkyAgGridHeaderGroupComponent_subscriptions = new WeakMap(), _SkyAgGridHeaderGroupComponent_changeDetector = new WeakMap(), _SkyAgGridHeaderGroupComponent_dynamicComponentService = new WeakMap(), _SkyAgGridHeaderGroupComponent_viewInitialized = new WeakMap(), _SkyAgGridHeaderGroupComponent_agIntialized = new WeakMap(), _SkyAgGridHeaderGroupComponent_instances = new WeakSet(), _SkyAgGridHeaderGroupComponent_updateInlineHelp = function _SkyAgGridHeaderGroupComponent_updateInlineHelp() {
@@ -975,18 +1031,18 @@ _SkyAgGridHeaderGroupComponent_columnGroup = new WeakMap(), _SkyAgGridHeaderGrou
975
1031
  const colGroupDef = this.params?.columnGroup?.getColGroupDef();
976
1032
  const inlineHelpComponent = colGroupDef?.headerGroupComponentParams?.inlineHelpComponent;
977
1033
  if (inlineHelpComponent) {
1034
+ const headerGroupInfo = new SkyAgGridHeaderGroupInfo();
1035
+ headerGroupInfo.columnGroup = this.params?.columnGroup;
1036
+ headerGroupInfo.context = this.params?.context;
1037
+ headerGroupInfo.displayName = this.params?.displayName;
978
1038
  __classPrivateFieldGet(this, _SkyAgGridHeaderGroupComponent_dynamicComponentService, "f").createComponent(inlineHelpComponent, {
979
1039
  providers: [
980
1040
  {
981
1041
  provide: SkyAgGridHeaderGroupInfo,
982
- useValue: {
983
- columnGroup: this.params.columnGroup,
984
- context: this.params.context,
985
- displayName: this.params.displayName,
986
- },
1042
+ useValue: headerGroupInfo,
987
1043
  },
988
1044
  ],
989
- referenceEl: this.inlineHelpContainer.nativeElement,
1045
+ referenceEl: this.inlineHelpContainer?.nativeElement,
990
1046
  location: SkyDynamicComponentLocation.ElementBottom,
991
1047
  });
992
1048
  }
@@ -1047,12 +1103,12 @@ class SkyAgGridHeaderComponent {
1047
1103
  __classPrivateFieldSet(this, _SkyAgGridHeaderComponent_agIntialized, true, "f");
1048
1104
  this.params = params;
1049
1105
  __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_subscriptions, "f").unsubscribe();
1050
- if (!this.params) {
1106
+ if (!params) {
1051
1107
  return;
1052
1108
  }
1053
1109
  __classPrivateFieldSet(this, _SkyAgGridHeaderComponent_subscriptions, new Subscription(), "f");
1054
1110
  if (params.column.isFilterAllowed()) {
1055
- __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_subscriptions, "f").add(fromEvent(params.column, 'filterChanged').subscribe(() => {
1111
+ __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_subscriptions, "f").add(fromEventPattern((handler) => params.column.addEventListener(Events.EVENT_FILTER_CHANGED, handler), (handler) => params.column.removeEventListener(Events.EVENT_FILTER_CHANGED, handler)).subscribe(() => {
1056
1112
  const isFilterActive = params.column.isFilterActive();
1057
1113
  if (isFilterActive !== this.filterEnabled$.getValue()) {
1058
1114
  this.filterEnabled$.next(isFilterActive);
@@ -1061,11 +1117,11 @@ class SkyAgGridHeaderComponent {
1061
1117
  }
1062
1118
  if (params.enableSorting) {
1063
1119
  // Column sort state changes
1064
- __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_subscriptions, "f").add(fromEvent(params.column, Events.EVENT_SORT_CHANGED).subscribe(() => {
1120
+ __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_subscriptions, "f").add(fromEventPattern((handler) => params.column.addEventListener(Events.EVENT_SORT_CHANGED, handler), (handler) => params.column.removeEventListener(Events.EVENT_SORT_CHANGED, handler)).subscribe(() => {
1065
1121
  __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_instances, "m", _SkyAgGridHeaderComponent_updateSort).call(this);
1066
1122
  }));
1067
1123
  // Other column sort state changes, for multi-column sorting
1068
- __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_subscriptions, "f").add(fromEvent(params.api, Events.EVENT_SORT_CHANGED).subscribe(() => {
1124
+ __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_subscriptions, "f").add(fromEventPattern((handler) => params.api.addEventListener(Events.EVENT_SORT_CHANGED, handler), (handler) => params.api.removeEventListener(Events.EVENT_SORT_CHANGED, handler)).subscribe(() => {
1069
1125
  __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_instances, "m", _SkyAgGridHeaderComponent_updateSortIndex).call(this);
1070
1126
  }));
1071
1127
  __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_instances, "m", _SkyAgGridHeaderComponent_updateSort).call(this);
@@ -1075,10 +1131,10 @@ class SkyAgGridHeaderComponent {
1075
1131
  __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_changeDetector, "f").markForCheck();
1076
1132
  }
1077
1133
  onMenuClick($event) {
1078
- this.params.showColumnMenu($event.target);
1134
+ this.params?.showColumnMenu($event.target);
1079
1135
  }
1080
1136
  onSortRequested(event) {
1081
- this.params.progressSort(!!event.shiftKey);
1137
+ this.params?.progressSort(!!event.shiftKey);
1082
1138
  }
1083
1139
  refresh(params) {
1084
1140
  this.agInit(params);
@@ -1089,23 +1145,23 @@ _SkyAgGridHeaderComponent_subscriptions = new WeakMap(), _SkyAgGridHeaderCompone
1089
1145
  if (!__classPrivateFieldGet(this, _SkyAgGridHeaderComponent_viewInitialized, "f") || !__classPrivateFieldGet(this, _SkyAgGridHeaderComponent_agIntialized, "f")) {
1090
1146
  return;
1091
1147
  }
1092
- const inlineHelpComponent = this.params.inlineHelpComponent;
1148
+ const inlineHelpComponent = this.params?.inlineHelpComponent;
1093
1149
  if (inlineHelpComponent &&
1094
1150
  (!__classPrivateFieldGet(this, _SkyAgGridHeaderComponent_inlineHelpComponentRef, "f") ||
1095
1151
  __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_inlineHelpComponentRef, "f").componentType !== inlineHelpComponent)) {
1096
1152
  __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_dynamicComponentService, "f").removeComponent(__classPrivateFieldGet(this, _SkyAgGridHeaderComponent_inlineHelpComponentRef, "f"));
1153
+ const headerInfo = new SkyAgGridHeaderInfo();
1154
+ headerInfo.column = this.params?.column;
1155
+ headerInfo.context = this.params?.context;
1156
+ headerInfo.displayName = this.params?.displayName;
1097
1157
  __classPrivateFieldSet(this, _SkyAgGridHeaderComponent_inlineHelpComponentRef, __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_dynamicComponentService, "f").createComponent(inlineHelpComponent, {
1098
1158
  providers: [
1099
1159
  {
1100
1160
  provide: SkyAgGridHeaderInfo,
1101
- useValue: {
1102
- column: this.params.column,
1103
- context: this.params.context,
1104
- displayName: this.params.displayName,
1105
- },
1161
+ useValue: headerInfo,
1106
1162
  },
1107
1163
  ],
1108
- referenceEl: this.inlineHelpContainer.nativeElement,
1164
+ referenceEl: this.inlineHelpContainer?.nativeElement,
1109
1165
  location: SkyDynamicComponentLocation.ElementBottom,
1110
1166
  }), "f");
1111
1167
  }
@@ -1113,12 +1169,12 @@ _SkyAgGridHeaderComponent_subscriptions = new WeakMap(), _SkyAgGridHeaderCompone
1113
1169
  __classPrivateFieldGet(this, _SkyAgGridHeaderComponent_dynamicComponentService, "f").removeComponent(__classPrivateFieldGet(this, _SkyAgGridHeaderComponent_inlineHelpComponentRef, "f"));
1114
1170
  }
1115
1171
  }, _SkyAgGridHeaderComponent_updateSort = function _SkyAgGridHeaderComponent_updateSort() {
1116
- this.sortOrder$.next(this.params.column.getSort() || undefined);
1172
+ this.sortOrder$.next(this.params?.column.getSort() || undefined);
1117
1173
  }, _SkyAgGridHeaderComponent_updateSortIndex = function _SkyAgGridHeaderComponent_updateSortIndex() {
1118
- const sortIndex = this.params.column.getSortIndex();
1119
- const otherSortColumns = this.params.columnApi
1120
- .getColumns()
1121
- .some((column) => column.getColId() !== this.params.column.getColId() &&
1174
+ const sortIndex = this.params?.column.getSortIndex();
1175
+ const otherSortColumns = this.params?.columnApi
1176
+ ?.getColumns()
1177
+ ?.some((column) => column.getColId() !== this.params?.column.getColId() &&
1122
1178
  !!column.getSort());
1123
1179
  if (sortIndex !== undefined && sortIndex !== null && otherSortColumns) {
1124
1180
  this.sortIndexDisplay$.next(`${sortIndex + 1}`);
@@ -1137,23 +1193,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
1137
1193
  args: ['inlineHelpContainer', { read: ElementRef, static: true }]
1138
1194
  }] } });
1139
1195
 
1140
- /**
1141
- * @internal
1142
- */
1143
- var SkyCellClass;
1144
- (function (SkyCellClass) {
1145
- SkyCellClass["Autocomplete"] = "sky-ag-grid-cell-autocomplete";
1146
- SkyCellClass["Currency"] = "sky-ag-grid-cell-currency";
1147
- SkyCellClass["Date"] = "sky-ag-grid-cell-date";
1148
- SkyCellClass["Editable"] = "sky-ag-grid-cell-editable";
1149
- SkyCellClass["Invalid"] = "sky-ag-grid-cell-invalid";
1150
- SkyCellClass["Lookup"] = "sky-ag-grid-cell-lookup";
1151
- SkyCellClass["Number"] = "sky-ag-grid-cell-number";
1152
- SkyCellClass["RowSelector"] = "sky-ag-grid-cell-row-selector";
1153
- SkyCellClass["Text"] = "sky-ag-grid-cell-text";
1154
- SkyCellClass["Uneditable"] = "sky-ag-grid-cell-uneditable";
1155
- })(SkyCellClass || (SkyCellClass = {}));
1156
-
1157
1196
  /**
1158
1197
  * These column types can be used by setting the AG Grid [column definition `type`](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing) to one of the following values.
1159
1198
  * <br/>
@@ -1255,7 +1294,7 @@ var SkyHeaderClass;
1255
1294
  SkyHeaderClass["RightAligned"] = "sky-ag-grid-header-right-aligned";
1256
1295
  })(SkyHeaderClass || (SkyHeaderClass = {}));
1257
1296
 
1258
- var _SkyAgGridService_instances, _SkyAgGridService_currentTheme, _SkyAgGridService_getRowHeight;
1297
+ var _SkyAgGridService_instances, _SkyAgGridService_keyMap, _SkyAgGridService_ngUnsubscribe, _SkyAgGridService_currentTheme, _SkyAgGridService_agGridAdapterService, _SkyAgGridService_resources, _SkyAgGridService_mergeGridOptions, _SkyAgGridService_getDefaultGridOptions, _SkyAgGridService_onCellFocused, _SkyAgGridService_getDefaultEditableGridOptions, _SkyAgGridService_dateFormatter, _SkyAgGridService_getIconTemplate, _SkyAgGridService_suppressTab, _SkyAgGridService_getRowHeight;
1259
1298
  function autocompleteComparator(value1, value2) {
1260
1299
  if (value1 && value2) {
1261
1300
  if (value1.name > value2.name) {
@@ -1291,7 +1330,9 @@ function dateComparator(date1, date2) {
1291
1330
  }
1292
1331
  return date1value ? 1 : -1;
1293
1332
  }
1333
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1294
1334
  function getValidatorCellRendererSelector(component, fallback) {
1335
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1295
1336
  return (params) => {
1296
1337
  if (params.colDef &&
1297
1338
  typeof params.colDef.cellRendererParams?.skyComponentProperties
@@ -1314,24 +1355,27 @@ let rowNodeId = -1;
1314
1355
  */
1315
1356
  class SkyAgGridService {
1316
1357
  constructor(agGridAdapterService, themeSvc, resources) {
1317
- this.agGridAdapterService = agGridAdapterService;
1318
- this.resources = resources;
1319
1358
  _SkyAgGridService_instances.add(this);
1320
- this.ngUnsubscribe = new Subject();
1321
- this.keyMap = new WeakMap();
1359
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1360
+ _SkyAgGridService_keyMap.set(this, new WeakMap());
1361
+ _SkyAgGridService_ngUnsubscribe.set(this, new Subject());
1322
1362
  _SkyAgGridService_currentTheme.set(this, undefined);
1363
+ _SkyAgGridService_agGridAdapterService.set(this, void 0);
1364
+ _SkyAgGridService_resources.set(this, void 0);
1365
+ __classPrivateFieldSet(this, _SkyAgGridService_agGridAdapterService, agGridAdapterService, "f");
1366
+ __classPrivateFieldSet(this, _SkyAgGridService_resources, resources, "f");
1323
1367
  /*istanbul ignore else*/
1324
1368
  if (themeSvc) {
1325
1369
  themeSvc.settingsChange
1326
- .pipe(takeUntil(this.ngUnsubscribe))
1370
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridService_ngUnsubscribe, "f")))
1327
1371
  .subscribe((settingsChange) => {
1328
1372
  __classPrivateFieldSet(this, _SkyAgGridService_currentTheme, settingsChange.currentSettings, "f");
1329
1373
  });
1330
1374
  }
1331
1375
  }
1332
1376
  ngOnDestroy() {
1333
- this.ngUnsubscribe.next();
1334
- this.ngUnsubscribe.complete();
1377
+ __classPrivateFieldGet(this, _SkyAgGridService_ngUnsubscribe, "f").next();
1378
+ __classPrivateFieldGet(this, _SkyAgGridService_ngUnsubscribe, "f").complete();
1335
1379
  }
1336
1380
  /**
1337
1381
  * Returns [AG Grid `gridOptions`](https://www.ag-grid.com/javascript-grid-properties/) with default SKY UX options, styling, and cell renderers registered for read-only grids.
@@ -1339,8 +1383,8 @@ class SkyAgGridService {
1339
1383
  * @returns
1340
1384
  */
1341
1385
  getGridOptions(args) {
1342
- const defaultGridOptions = this.getDefaultGridOptions(args);
1343
- const mergedGridOptions = this.mergeGridOptions(defaultGridOptions, args.gridOptions);
1386
+ const defaultGridOptions = __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getDefaultGridOptions).call(this, args);
1387
+ const mergedGridOptions = __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_mergeGridOptions).call(this, defaultGridOptions, args.gridOptions);
1344
1388
  return mergedGridOptions;
1345
1389
  }
1346
1390
  /**
@@ -1349,315 +1393,309 @@ class SkyAgGridService {
1349
1393
  * @returns
1350
1394
  */
1351
1395
  getEditableGridOptions(args) {
1352
- const defaultGridOptions = this.getDefaultEditableGridOptions(args);
1353
- const mergedGridOptions = this.mergeGridOptions(defaultGridOptions, args.gridOptions);
1396
+ const defaultGridOptions = __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getDefaultEditableGridOptions).call(this, args);
1397
+ const mergedGridOptions = __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_mergeGridOptions).call(this, defaultGridOptions, args.gridOptions);
1354
1398
  return mergedGridOptions;
1355
1399
  }
1356
1400
  getHeaderHeight() {
1357
1401
  return __classPrivateFieldGet(this, _SkyAgGridService_currentTheme, "f")?.theme?.name === 'modern' ? 60 : 37;
1358
1402
  }
1359
- mergeGridOptions(defaultGridOptions, providedGridOptions) {
1360
- const mergedGridOptions = {
1361
- ...defaultGridOptions,
1362
- ...providedGridOptions,
1363
- components: {
1364
- ...providedGridOptions.components,
1365
- // Apply default components last to prevent consumers from overwriting our component types.
1366
- ...defaultGridOptions.components,
1367
- },
1368
- columnTypes: {
1369
- ...providedGridOptions.columnTypes,
1370
- // apply default second to prevent consumers from overwriting our default column types
1371
- ...defaultGridOptions.columnTypes,
1372
- },
1373
- defaultColDef: {
1374
- ...defaultGridOptions.defaultColDef,
1375
- ...providedGridOptions.defaultColDef,
1376
- // allow consumers to override all defaultColDef properties except cellClassRules, which we reserve for styling
1377
- cellClassRules: defaultGridOptions.defaultColDef.cellClassRules,
1378
- },
1379
- defaultColGroupDef: {
1380
- ...defaultGridOptions.defaultColGroupDef,
1381
- ...providedGridOptions.defaultColGroupDef,
1382
- },
1383
- icons: {
1384
- ...defaultGridOptions.icons,
1385
- ...providedGridOptions.icons,
1386
- },
1403
+ }
1404
+ _SkyAgGridService_keyMap = new WeakMap(), _SkyAgGridService_ngUnsubscribe = new WeakMap(), _SkyAgGridService_currentTheme = new WeakMap(), _SkyAgGridService_agGridAdapterService = new WeakMap(), _SkyAgGridService_resources = new WeakMap(), _SkyAgGridService_instances = new WeakSet(), _SkyAgGridService_mergeGridOptions = function _SkyAgGridService_mergeGridOptions(defaultGridOptions, providedGridOptions) {
1405
+ const mergedGridOptions = {
1406
+ ...defaultGridOptions,
1407
+ ...providedGridOptions,
1408
+ components: {
1409
+ ...providedGridOptions.components,
1410
+ // Apply default components last to prevent consumers from overwriting our component types.
1411
+ ...defaultGridOptions.components,
1412
+ },
1413
+ columnTypes: {
1414
+ ...providedGridOptions.columnTypes,
1415
+ // apply default second to prevent consumers from overwriting our default column types
1416
+ ...defaultGridOptions.columnTypes,
1417
+ },
1418
+ defaultColDef: {
1419
+ ...defaultGridOptions.defaultColDef,
1420
+ ...providedGridOptions.defaultColDef,
1421
+ // allow consumers to override all defaultColDef properties except cellClassRules, which we reserve for styling
1422
+ cellClassRules: defaultGridOptions.defaultColDef?.cellClassRules,
1423
+ },
1424
+ defaultColGroupDef: {
1425
+ ...defaultGridOptions.defaultColGroupDef,
1426
+ ...providedGridOptions.defaultColGroupDef,
1427
+ },
1428
+ icons: {
1429
+ ...defaultGridOptions.icons,
1430
+ ...providedGridOptions.icons,
1431
+ },
1432
+ };
1433
+ // Prefer `getRowNodeId` over `getNodeId` if set by the consumer, for backward compatibility.
1434
+ if (mergedGridOptions.getRowNodeId) {
1435
+ delete mergedGridOptions.getRowId;
1436
+ }
1437
+ return mergedGridOptions;
1438
+ }, _SkyAgGridService_getDefaultGridOptions = function _SkyAgGridService_getDefaultGridOptions(args) {
1439
+ // cellClassRules can be functions or string expressions
1440
+ const cellClassRuleTrueExpression = () => true;
1441
+ function getEditableFn(isUneditable) {
1442
+ return function (params) {
1443
+ let isEditable = params.colDef.editable;
1444
+ if (typeof isEditable === 'function') {
1445
+ const column = params.columnApi.getColumn(params.colDef.field);
1446
+ isEditable = isEditable({
1447
+ ...params,
1448
+ column,
1449
+ });
1450
+ }
1451
+ return isUneditable ? !isEditable : !!isEditable;
1387
1452
  };
1388
- // Prefer `getRowNodeId` over `getNodeId` if set by the consumer, for backward compatibility.
1389
- if (mergedGridOptions.getRowNodeId) {
1390
- delete mergedGridOptions.getRowId;
1391
- }
1392
- return mergedGridOptions;
1393
1453
  }
1394
- getDefaultGridOptions(args) {
1395
- // cellClassRules can be functions or string expressions
1396
- const cellClassRuleTrueExpression = () => true;
1397
- function getEditableFn(isUneditable) {
1398
- return function (params) {
1399
- let isEditable = params.colDef.editable;
1400
- if (typeof isEditable === 'function') {
1401
- const column = params.columnApi.getColumn(params.colDef.field);
1402
- isEditable = isEditable({
1403
- ...params,
1404
- column,
1405
- });
1406
- }
1407
- return isUneditable ? !isEditable : isEditable;
1408
- };
1409
- }
1410
- const editableCellClassRules = {
1411
- [SkyCellClass.Editable]: getEditableFn(),
1412
- [SkyCellClass.Uneditable]: getEditableFn(true),
1413
- };
1414
- function getValidatorFn() {
1415
- return function (param) {
1416
- if (param.colDef &&
1417
- typeof param.colDef.cellRendererParams?.skyComponentProperties
1418
- ?.validator === 'function') {
1419
- return !param.colDef.cellRendererParams.skyComponentProperties.validator(param.value, param.data, param.rowIndex);
1420
- }
1421
- return false;
1422
- };
1423
- }
1424
- const validatorCellClassRules = {
1425
- [SkyCellClass.Invalid]: getValidatorFn(),
1454
+ const editableCellClassRules = {
1455
+ ["sky-ag-grid-cell-editable" /* SkyCellClass.Editable */]: getEditableFn(),
1456
+ ["sky-ag-grid-cell-uneditable" /* SkyCellClass.Uneditable */]: getEditableFn(true),
1457
+ };
1458
+ function getValidatorFn() {
1459
+ return function (param) {
1460
+ if (param.colDef &&
1461
+ typeof param.colDef.cellRendererParams?.skyComponentProperties
1462
+ ?.validator === 'function') {
1463
+ return !param.colDef.cellRendererParams.skyComponentProperties.validator(param.value, param.data, param.rowIndex);
1464
+ }
1465
+ return false;
1426
1466
  };
1427
- const defaultSkyGridOptions = {
1428
- columnTypes: {
1429
- [SkyCellType.Autocomplete]: {
1430
- cellClassRules: {
1431
- [SkyCellClass.Autocomplete]: cellClassRuleTrueExpression,
1432
- ...editableCellClassRules,
1433
- },
1434
- cellEditor: SkyAgGridCellEditorAutocompleteComponent,
1435
- valueFormatter: autocompleteFormatter,
1436
- comparator: autocompleteComparator,
1437
- minWidth: 185,
1438
- },
1439
- [SkyCellType.Currency]: {
1440
- cellClassRules: {
1441
- [SkyCellClass.Currency]: cellClassRuleTrueExpression,
1442
- ...validatorCellClassRules,
1443
- ...editableCellClassRules,
1444
- },
1445
- cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-currency-validator', { component: 'sky-ag-grid-cell-renderer-currency' }),
1446
- cellEditor: SkyAgGridCellEditorCurrencyComponent,
1447
- headerClass: SkyHeaderClass.RightAligned,
1448
- minWidth: 185,
1449
- },
1450
- [SkyCellType.Date]: {
1451
- cellClassRules: {
1452
- [SkyCellClass.Date]: cellClassRuleTrueExpression,
1453
- ...editableCellClassRules,
1454
- },
1455
- cellEditor: SkyAgGridCellEditorDatepickerComponent,
1456
- comparator: dateComparator,
1457
- minWidth: __classPrivateFieldGet(this, _SkyAgGridService_currentTheme, "f")?.theme?.name === 'modern' ? 180 : 160,
1458
- valueFormatter: (params) => this.dateFormatter(params, args.locale),
1459
- },
1460
- [SkyCellType.Lookup]: {
1461
- cellClassRules: {
1462
- [SkyCellClass.Lookup]: cellClassRuleTrueExpression,
1463
- ...editableCellClassRules,
1464
- },
1465
- cellEditor: SkyAgGridCellEditorLookupComponent,
1466
- cellRenderer: SkyAgGridCellRendererLookupComponent,
1467
- valueFormatter: (params) => {
1468
- const lookupProperties = applySkyLookupPropertiesDefaults(params);
1469
- return (params.value || [])
1470
- .map((value) => {
1471
- return value[lookupProperties.descriptorProperty];
1472
- })
1473
- .filter((value) => value !== '' && value !== undefined)
1474
- .join('; ');
1475
- },
1476
- minWidth: 185,
1467
+ }
1468
+ const validatorCellClassRules = {
1469
+ ["sky-ag-grid-cell-invalid" /* SkyCellClass.Invalid */]: getValidatorFn(),
1470
+ };
1471
+ const defaultSkyGridOptions = {
1472
+ columnTypes: {
1473
+ [SkyCellType.Autocomplete]: {
1474
+ cellClassRules: {
1475
+ ["sky-ag-grid-cell-autocomplete" /* SkyCellClass.Autocomplete */]: cellClassRuleTrueExpression,
1476
+ ...editableCellClassRules,
1477
1477
  },
1478
- [SkyCellType.Number]: {
1479
- cellClassRules: {
1480
- [SkyCellClass.Number]: cellClassRuleTrueExpression,
1481
- ...validatorCellClassRules,
1482
- ...editableCellClassRules,
1483
- },
1484
- cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-validator-tooltip'),
1485
- cellEditor: SkyAgGridCellEditorNumberComponent,
1486
- headerClass: SkyHeaderClass.RightAligned,
1478
+ cellEditor: SkyAgGridCellEditorAutocompleteComponent,
1479
+ valueFormatter: autocompleteFormatter,
1480
+ comparator: autocompleteComparator,
1481
+ minWidth: 185,
1482
+ },
1483
+ [SkyCellType.Currency]: {
1484
+ cellClassRules: {
1485
+ ["sky-ag-grid-cell-currency" /* SkyCellClass.Currency */]: cellClassRuleTrueExpression,
1486
+ ...validatorCellClassRules,
1487
+ ...editableCellClassRules,
1487
1488
  },
1488
- [SkyCellType.RowSelector]: {
1489
- cellClassRules: {
1490
- [SkyCellClass.RowSelector]: cellClassRuleTrueExpression,
1491
- [SkyCellClass.Uneditable]: cellClassRuleTrueExpression,
1492
- },
1493
- cellRenderer: SkyAgGridCellRendererRowSelectorComponent,
1494
- headerName: '',
1495
- minWidth: 55,
1496
- maxWidth: 55,
1497
- sortable: false,
1498
- width: 55,
1489
+ cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-currency-validator', { component: 'sky-ag-grid-cell-renderer-currency' }),
1490
+ cellEditor: SkyAgGridCellEditorCurrencyComponent,
1491
+ headerClass: SkyHeaderClass.RightAligned,
1492
+ minWidth: 185,
1493
+ },
1494
+ [SkyCellType.Date]: {
1495
+ cellClassRules: {
1496
+ ["sky-ag-grid-cell-date" /* SkyCellClass.Date */]: cellClassRuleTrueExpression,
1497
+ ...editableCellClassRules,
1499
1498
  },
1500
- [SkyCellType.Text]: {
1501
- cellClassRules: {
1502
- [SkyCellClass.Text]: cellClassRuleTrueExpression,
1503
- ...validatorCellClassRules,
1504
- ...editableCellClassRules,
1505
- },
1506
- cellEditor: SkyAgGridCellEditorTextComponent,
1507
- cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-validator-tooltip'),
1499
+ cellEditor: SkyAgGridCellEditorDatepickerComponent,
1500
+ comparator: dateComparator,
1501
+ minWidth: __classPrivateFieldGet(this, _SkyAgGridService_currentTheme, "f")?.theme?.name === 'modern' ? 180 : 160,
1502
+ valueFormatter: (params) => __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_dateFormatter).call(this, params, args.locale),
1503
+ },
1504
+ [SkyCellType.Lookup]: {
1505
+ cellClassRules: {
1506
+ ["sky-ag-grid-cell-lookup" /* SkyCellClass.Lookup */]: cellClassRuleTrueExpression,
1507
+ ...editableCellClassRules,
1508
1508
  },
1509
- [SkyCellType.Validator]: {
1510
- cellClassRules: {
1511
- ...validatorCellClassRules,
1512
- ...editableCellClassRules,
1513
- },
1514
- cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-validator-tooltip'),
1509
+ cellEditor: SkyAgGridCellEditorLookupComponent,
1510
+ cellRenderer: SkyAgGridCellRendererLookupComponent,
1511
+ valueFormatter: (params) => {
1512
+ const lookupProperties = applySkyLookupPropertiesDefaults(params);
1513
+ return (params.value || [])
1514
+ .map((value) => {
1515
+ return value[lookupProperties.descriptorProperty];
1516
+ })
1517
+ .filter((value) => value !== '' && value !== undefined)
1518
+ .join('; ');
1515
1519
  },
1520
+ minWidth: 185,
1516
1521
  },
1517
- defaultColDef: {
1518
- cellClassRules: editableCellClassRules,
1519
- headerComponent: SkyAgGridHeaderComponent,
1520
- minWidth: 100,
1521
- resizable: true,
1522
- sortable: true,
1523
- suppressKeyboardEvent: (keypress) => this.suppressTab(keypress),
1524
- },
1525
- defaultColGroupDef: {
1526
- headerGroupComponent: SkyAgGridHeaderGroupComponent,
1527
- },
1528
- domLayout: 'autoHeight',
1529
- enterMovesDownAfterEdit: true,
1530
- components: {
1531
- 'sky-ag-grid-cell-renderer-currency': SkyAgGridCellRendererCurrencyComponent,
1532
- 'sky-ag-grid-cell-renderer-currency-validator': SkyAgGridCellRendererCurrencyValidatorComponent,
1533
- 'sky-ag-grid-cell-renderer-validator-tooltip': SkyAgGridCellRendererValidatorTooltipComponent,
1534
- },
1535
- getRowId: (params) => {
1536
- const dataId = params.data.id;
1537
- if (dataId !== undefined) {
1538
- return `${params.data.id}`;
1539
- }
1540
- if (!this.keyMap.has(params.data)) {
1541
- this.keyMap.set(params.data, `${rowNodeId--}`);
1542
- }
1543
- return this.keyMap.get(params.data);
1522
+ [SkyCellType.Number]: {
1523
+ cellClassRules: {
1524
+ ["sky-ag-grid-cell-number" /* SkyCellClass.Number */]: cellClassRuleTrueExpression,
1525
+ ...validatorCellClassRules,
1526
+ ...editableCellClassRules,
1527
+ },
1528
+ cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-validator-tooltip'),
1529
+ cellEditor: SkyAgGridCellEditorNumberComponent,
1530
+ headerClass: SkyHeaderClass.RightAligned,
1544
1531
  },
1545
- getRowClass: (params) => {
1546
- if (params.node.id) {
1547
- return `sky-ag-grid-row-${params.node.id}`;
1548
- }
1549
- else {
1550
- return undefined;
1551
- }
1532
+ [SkyCellType.RowSelector]: {
1533
+ cellClassRules: {
1534
+ ["sky-ag-grid-cell-row-selector" /* SkyCellClass.RowSelector */]: cellClassRuleTrueExpression,
1535
+ ["sky-ag-grid-cell-uneditable" /* SkyCellClass.Uneditable */]: cellClassRuleTrueExpression,
1536
+ },
1537
+ cellRenderer: SkyAgGridCellRendererRowSelectorComponent,
1538
+ headerName: '',
1539
+ minWidth: 55,
1540
+ maxWidth: 55,
1541
+ sortable: false,
1542
+ width: 55,
1552
1543
  },
1553
- headerHeight: this.getHeaderHeight(),
1554
- icons: {
1555
- sortDescending: this.getIconTemplate('caret-down'),
1556
- sortAscending: this.getIconTemplate('caret-up'),
1557
- columnMoveMove: this.getIconTemplate('arrows'),
1558
- columnMoveHide: this.getIconTemplate('arrows'),
1559
- columnMoveLeft: this.getIconTemplate('arrows'),
1560
- columnMoveRight: this.getIconTemplate('arrows'),
1561
- columnMovePin: this.getIconTemplate('arrows'),
1544
+ [SkyCellType.Text]: {
1545
+ cellClassRules: {
1546
+ ["sky-ag-grid-cell-text" /* SkyCellClass.Text */]: cellClassRuleTrueExpression,
1547
+ ...validatorCellClassRules,
1548
+ ...editableCellClassRules,
1549
+ },
1550
+ cellEditor: SkyAgGridCellEditorTextComponent,
1551
+ cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-validator-tooltip'),
1562
1552
  },
1563
- onCellFocused: () => this.onCellFocused(),
1564
- rowHeight: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getRowHeight).call(this),
1565
- getRowHeight: () => __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getRowHeight).call(this),
1566
- rowMultiSelectWithClick: true,
1567
- rowSelection: 'multiple',
1568
- singleClickEdit: true,
1569
- sortingOrder: ['desc', 'asc', null],
1570
- suppressRowClickSelection: true,
1571
- suppressDragLeaveHidesColumns: true,
1572
- };
1573
- defaultSkyGridOptions.columnTypes[SkyCellType.CurrencyValidator] = {
1574
- ...defaultSkyGridOptions.columnTypes[SkyCellType.Currency],
1575
- cellRendererParams: {
1576
- skyComponentProperties: {
1577
- validator: (value, data, rowIndex) => {
1578
- return !!`${value || ''}`.match(/^[^0-9]*(\d+[,.]?)+\d*[^0-9]*$/);
1579
- },
1580
- validatorMessage: 'Please enter a valid currency',
1553
+ [SkyCellType.Validator]: {
1554
+ cellClassRules: {
1555
+ ...validatorCellClassRules,
1556
+ ...editableCellClassRules,
1581
1557
  },
1558
+ cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-validator-tooltip'),
1582
1559
  },
1583
- };
1584
- /*istanbul ignore else*/
1585
- if (this.resources) {
1586
- this.resources
1587
- .getString('sky_ag_grid_cell_renderer_currency_validator_message')
1588
- .subscribe((value) => {
1589
- defaultSkyGridOptions.columnTypes[SkyCellType.CurrencyValidator].cellRendererParams.skyComponentProperties.validatorMessage = value;
1590
- });
1591
- }
1592
- defaultSkyGridOptions.columnTypes[SkyCellType.NumberValidator] = {
1593
- ...defaultSkyGridOptions.columnTypes[SkyCellType.Validator],
1594
- ...defaultSkyGridOptions.columnTypes[SkyCellType.Number],
1595
- cellClassRules: {
1596
- ...defaultSkyGridOptions.columnTypes[SkyCellType.Validator]
1597
- .cellClassRules,
1598
- ...defaultSkyGridOptions.columnTypes[SkyCellType.Number].cellClassRules,
1560
+ },
1561
+ defaultColDef: {
1562
+ cellClassRules: editableCellClassRules,
1563
+ headerComponent: SkyAgGridHeaderComponent,
1564
+ minWidth: 100,
1565
+ resizable: true,
1566
+ sortable: true,
1567
+ suppressKeyboardEvent: (keypress) => __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_suppressTab).call(this, keypress),
1568
+ },
1569
+ defaultColGroupDef: {
1570
+ headerGroupComponent: SkyAgGridHeaderGroupComponent,
1571
+ },
1572
+ domLayout: 'autoHeight',
1573
+ enterMovesDownAfterEdit: true,
1574
+ components: {
1575
+ 'sky-ag-grid-cell-renderer-currency': SkyAgGridCellRendererCurrencyComponent,
1576
+ 'sky-ag-grid-cell-renderer-currency-validator': SkyAgGridCellRendererCurrencyValidatorComponent,
1577
+ 'sky-ag-grid-cell-renderer-validator-tooltip': SkyAgGridCellRendererValidatorTooltipComponent,
1578
+ },
1579
+ getRowId: (params) => {
1580
+ const dataId = params.data.id;
1581
+ if (dataId !== undefined) {
1582
+ return `${params.data.id}`;
1583
+ }
1584
+ if (!__classPrivateFieldGet(this, _SkyAgGridService_keyMap, "f").has(params.data)) {
1585
+ __classPrivateFieldGet(this, _SkyAgGridService_keyMap, "f").set(params.data, `${rowNodeId--}`);
1586
+ }
1587
+ return __classPrivateFieldGet(this, _SkyAgGridService_keyMap, "f").get(params.data);
1588
+ },
1589
+ getRowClass: (params) => {
1590
+ if (params.node.id) {
1591
+ return `sky-ag-grid-row-${params.node.id}`;
1592
+ }
1593
+ else {
1594
+ return undefined;
1595
+ }
1596
+ },
1597
+ headerHeight: this.getHeaderHeight(),
1598
+ icons: {
1599
+ sortDescending: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getIconTemplate).call(this, 'caret-down'),
1600
+ sortAscending: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getIconTemplate).call(this, 'caret-up'),
1601
+ columnMoveMove: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getIconTemplate).call(this, 'arrows'),
1602
+ columnMoveHide: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getIconTemplate).call(this, 'arrows'),
1603
+ columnMoveLeft: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getIconTemplate).call(this, 'arrows'),
1604
+ columnMoveRight: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getIconTemplate).call(this, 'arrows'),
1605
+ columnMovePin: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getIconTemplate).call(this, 'arrows'),
1606
+ },
1607
+ onCellFocused: () => __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_onCellFocused).call(this),
1608
+ rowHeight: __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getRowHeight).call(this),
1609
+ getRowHeight: () => __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getRowHeight).call(this),
1610
+ rowMultiSelectWithClick: true,
1611
+ rowSelection: 'multiple',
1612
+ singleClickEdit: true,
1613
+ sortingOrder: ['desc', 'asc', null],
1614
+ suppressRowClickSelection: true,
1615
+ suppressDragLeaveHidesColumns: true,
1616
+ };
1617
+ const columnTypes = defaultSkyGridOptions.columnTypes;
1618
+ columnTypes[SkyCellType.CurrencyValidator] = {
1619
+ ...columnTypes[SkyCellType.Currency],
1620
+ cellRendererParams: {
1621
+ skyComponentProperties: {
1622
+ validator: (value) => {
1623
+ return !!`${value || ''}`.match(/^[^0-9]*(\d+[,.]?)+\d*[^0-9]*$/);
1624
+ },
1625
+ validatorMessage: 'Please enter a valid currency',
1599
1626
  },
1600
- cellRendererParams: {
1601
- skyComponentProperties: {
1602
- validator: (value, data, rowIndex) => {
1603
- return !!value && !isNaN(parseFloat(value));
1604
- },
1605
- validatorMessage: 'Please enter a valid number',
1627
+ },
1628
+ };
1629
+ /*istanbul ignore else*/
1630
+ if (__classPrivateFieldGet(this, _SkyAgGridService_resources, "f")) {
1631
+ __classPrivateFieldGet(this, _SkyAgGridService_resources, "f")
1632
+ .getString('sky_ag_grid_cell_renderer_currency_validator_message')
1633
+ .subscribe((value) => {
1634
+ columnTypes[SkyCellType.CurrencyValidator].cellRendererParams.skyComponentProperties.validatorMessage = value;
1635
+ });
1636
+ }
1637
+ columnTypes[SkyCellType.NumberValidator] = {
1638
+ ...columnTypes[SkyCellType.Validator],
1639
+ ...columnTypes[SkyCellType.Number],
1640
+ cellClassRules: {
1641
+ ...columnTypes[SkyCellType.Validator].cellClassRules,
1642
+ ...columnTypes[SkyCellType.Number].cellClassRules,
1643
+ },
1644
+ cellRendererParams: {
1645
+ skyComponentProperties: {
1646
+ validator: (value) => {
1647
+ return !!value && !isNaN(parseFloat(value));
1606
1648
  },
1649
+ validatorMessage: 'Please enter a valid number',
1607
1650
  },
1608
- };
1609
- /*istanbul ignore else*/
1610
- if (this.resources) {
1611
- this.resources
1612
- .getString('sky_ag_grid_cell_renderer_number_validator_message')
1613
- .subscribe((value) => {
1614
- defaultSkyGridOptions.columnTypes[SkyCellType.NumberValidator].cellRendererParams.skyComponentProperties.validatorMessage = value;
1615
- });
1616
- }
1617
- return defaultSkyGridOptions;
1618
- }
1619
- onCellFocused() {
1620
- const currentElement = this.agGridAdapterService.getFocusedElement();
1621
- this.agGridAdapterService.focusOnFocusableChildren(currentElement);
1622
- }
1623
- getDefaultEditableGridOptions(args) {
1624
- const defaultGridOptions = this.getDefaultGridOptions(args);
1625
- defaultGridOptions.rowSelection = undefined;
1626
- return defaultGridOptions;
1627
- }
1628
- dateFormatter(params, locale = 'en-us') {
1629
- const dateConfig = { year: 'numeric', month: '2-digit', day: '2-digit' };
1630
- let date = params.value;
1631
- if (date && typeof date === 'string') {
1632
- date = new Date(params.value);
1633
- }
1634
- const formattedDate = date &&
1635
- date.toLocaleDateString &&
1636
- date.toLocaleDateString(locale, dateConfig);
1637
- if (date && date.getTime && !isNaN(date.getTime())) {
1638
- return formattedDate;
1639
- }
1640
- }
1641
- getIconTemplate(iconName) {
1642
- return `<i class="fa fa-${iconName}"></i>`;
1643
- }
1644
- suppressTab(params) {
1645
- if (params.event.code === 'Tab') {
1646
- if (params.editing) {
1647
- const currentlyFocusedEl = this.agGridAdapterService.getFocusedElement();
1648
- // inline cell editors have the 'ag-cell' class, while popup editors have the 'ag-popup-editor' class
1649
- const cellEl = this.agGridAdapterService.getElementOrParentWithClass(currentlyFocusedEl, 'ag-cell');
1650
- const popupEl = this.agGridAdapterService.getElementOrParentWithClass(currentlyFocusedEl, 'ag-popup-editor');
1651
- const parentEl = cellEl || popupEl;
1652
- const nextFocusableElementInCell = this.agGridAdapterService.getNextFocusableElement(currentlyFocusedEl, parentEl, params.event.shiftKey);
1653
- return !!nextFocusableElementInCell;
1654
- }
1655
- return true;
1651
+ },
1652
+ };
1653
+ /*istanbul ignore else*/
1654
+ if (__classPrivateFieldGet(this, _SkyAgGridService_resources, "f")) {
1655
+ __classPrivateFieldGet(this, _SkyAgGridService_resources, "f")
1656
+ .getString('sky_ag_grid_cell_renderer_number_validator_message')
1657
+ .subscribe((value) => {
1658
+ columnTypes[SkyCellType.NumberValidator].cellRendererParams.skyComponentProperties.validatorMessage = value;
1659
+ });
1660
+ }
1661
+ return defaultSkyGridOptions;
1662
+ }, _SkyAgGridService_onCellFocused = function _SkyAgGridService_onCellFocused() {
1663
+ const currentElement = __classPrivateFieldGet(this, _SkyAgGridService_agGridAdapterService, "f").getFocusedElement();
1664
+ __classPrivateFieldGet(this, _SkyAgGridService_agGridAdapterService, "f").focusOnFocusableChildren(currentElement);
1665
+ }, _SkyAgGridService_getDefaultEditableGridOptions = function _SkyAgGridService_getDefaultEditableGridOptions(args) {
1666
+ const defaultGridOptions = __classPrivateFieldGet(this, _SkyAgGridService_instances, "m", _SkyAgGridService_getDefaultGridOptions).call(this, args);
1667
+ defaultGridOptions.rowSelection = undefined;
1668
+ return defaultGridOptions;
1669
+ }, _SkyAgGridService_dateFormatter = function _SkyAgGridService_dateFormatter(params, locale = 'en-us') {
1670
+ const dateConfig = { year: 'numeric', month: '2-digit', day: '2-digit' };
1671
+ let date = params.value;
1672
+ if (date && typeof date === 'string') {
1673
+ date = new Date(params.value);
1674
+ }
1675
+ const formattedDate = date &&
1676
+ date.toLocaleDateString &&
1677
+ date.toLocaleDateString(locale, dateConfig);
1678
+ if (date && date.getTime && !isNaN(date.getTime())) {
1679
+ return formattedDate;
1680
+ }
1681
+ return '';
1682
+ }, _SkyAgGridService_getIconTemplate = function _SkyAgGridService_getIconTemplate(iconName) {
1683
+ return `<i class="fa fa-${iconName}"></i>`;
1684
+ }, _SkyAgGridService_suppressTab = function _SkyAgGridService_suppressTab(params) {
1685
+ if (params.event.code === 'Tab') {
1686
+ if (params.editing) {
1687
+ const currentlyFocusedEl = __classPrivateFieldGet(this, _SkyAgGridService_agGridAdapterService, "f").getFocusedElement();
1688
+ // inline cell editors have the 'ag-cell' class, while popup editors have the 'ag-popup-editor' class
1689
+ const cellEl = __classPrivateFieldGet(this, _SkyAgGridService_agGridAdapterService, "f").getElementOrParentWithClass(currentlyFocusedEl, 'ag-cell');
1690
+ const popupEl = __classPrivateFieldGet(this, _SkyAgGridService_agGridAdapterService, "f").getElementOrParentWithClass(currentlyFocusedEl, 'ag-popup-editor');
1691
+ const parentEl = cellEl || popupEl;
1692
+ const nextFocusableElementInCell = __classPrivateFieldGet(this, _SkyAgGridService_agGridAdapterService, "f").getNextFocusableElement(currentlyFocusedEl, parentEl, params.event.shiftKey);
1693
+ return !!nextFocusableElementInCell;
1656
1694
  }
1657
- return false;
1695
+ return true;
1658
1696
  }
1659
- }
1660
- _SkyAgGridService_currentTheme = new WeakMap(), _SkyAgGridService_instances = new WeakSet(), _SkyAgGridService_getRowHeight = function _SkyAgGridService_getRowHeight() {
1697
+ return false;
1698
+ }, _SkyAgGridService_getRowHeight = function _SkyAgGridService_getRowHeight() {
1661
1699
  return __classPrivateFieldGet(this, _SkyAgGridService_currentTheme, "f")?.theme?.name === 'modern' ? 60 : 38;
1662
1700
  };
1663
1701
  SkyAgGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridService, deps: [{ token: SkyAgGridAdapterService }, { token: i1$2.SkyThemeService, optional: true }, { token: i3.SkyLibResourcesService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -1673,21 +1711,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
1673
1711
  type: Optional
1674
1712
  }] }]; } });
1675
1713
 
1676
- var _SkyAgGridWrapperComponent_instances, _SkyAgGridWrapperComponent_agGridService, _SkyAgGridWrapperComponent_ngUnsubscribe, _SkyAgGridWrapperComponent_themeSvc, _SkyAgGridWrapperComponent_wrapperClasses, _SkyAgGridWrapperComponent_currentTheme, _SkyAgGridWrapperComponent_moveHorizontalScroll;
1714
+ var _SkyAgGridWrapperComponent_instances, _SkyAgGridWrapperComponent_isInEditMode_get, _SkyAgGridWrapperComponent__viewkeeperClasses, _SkyAgGridWrapperComponent_agGridService, _SkyAgGridWrapperComponent_ngUnsubscribe, _SkyAgGridWrapperComponent_themeSvc, _SkyAgGridWrapperComponent_wrapperClasses, _SkyAgGridWrapperComponent_currentTheme, _SkyAgGridWrapperComponent_adapterService, _SkyAgGridWrapperComponent_changeDetector, _SkyAgGridWrapperComponent_elementRef, _SkyAgGridWrapperComponent_document, _SkyAgGridWrapperComponent_moveHorizontalScroll;
1677
1715
  let idIndex = 0;
1678
1716
  class SkyAgGridWrapperComponent {
1679
1717
  constructor(adapterService, changeDetector, elementRef, document, agGridService, themeSvc) {
1680
- this.adapterService = adapterService;
1681
- this.changeDetector = changeDetector;
1682
- this.elementRef = elementRef;
1683
- this.document = document;
1684
1718
  _SkyAgGridWrapperComponent_instances.add(this);
1685
- this._viewkeeperClasses = [];
1719
+ _SkyAgGridWrapperComponent__viewkeeperClasses.set(this, []);
1686
1720
  _SkyAgGridWrapperComponent_agGridService.set(this, void 0);
1687
1721
  _SkyAgGridWrapperComponent_ngUnsubscribe.set(this, new Subject());
1688
1722
  _SkyAgGridWrapperComponent_themeSvc.set(this, void 0);
1689
1723
  _SkyAgGridWrapperComponent_wrapperClasses.set(this, new BehaviorSubject([`ag-theme-sky-default`]));
1690
1724
  _SkyAgGridWrapperComponent_currentTheme.set(this, undefined);
1725
+ _SkyAgGridWrapperComponent_adapterService.set(this, void 0);
1726
+ _SkyAgGridWrapperComponent_changeDetector.set(this, void 0);
1727
+ _SkyAgGridWrapperComponent_elementRef.set(this, void 0);
1728
+ _SkyAgGridWrapperComponent_document.set(this, void 0);
1729
+ __classPrivateFieldSet(this, _SkyAgGridWrapperComponent_adapterService, adapterService, "f");
1730
+ __classPrivateFieldSet(this, _SkyAgGridWrapperComponent_changeDetector, changeDetector, "f");
1731
+ __classPrivateFieldSet(this, _SkyAgGridWrapperComponent_elementRef, elementRef, "f");
1732
+ __classPrivateFieldSet(this, _SkyAgGridWrapperComponent_document, document, "f");
1691
1733
  idIndex++;
1692
1734
  this.afterAnchorId = 'sky-ag-grid-nav-anchor-after-' + idIndex;
1693
1735
  this.beforeAnchorId = 'sky-ag-grid-nav-anchor-before-' + idIndex;
@@ -1697,56 +1739,60 @@ class SkyAgGridWrapperComponent {
1697
1739
  this.wrapperClasses$ = __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f").asObservable();
1698
1740
  }
1699
1741
  get viewkeeperClasses() {
1700
- return this._viewkeeperClasses;
1742
+ return __classPrivateFieldGet(this, _SkyAgGridWrapperComponent__viewkeeperClasses, "f");
1701
1743
  }
1702
1744
  set viewkeeperClasses(value) {
1703
- this._viewkeeperClasses = value;
1704
- this.changeDetector.markForCheck();
1745
+ __classPrivateFieldSet(this, _SkyAgGridWrapperComponent__viewkeeperClasses, value, "f");
1746
+ __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_changeDetector, "f").markForCheck();
1705
1747
  }
1706
1748
  ngAfterContentInit() {
1707
- if (this.agGrid.gridOptions &&
1708
- this.agGrid.gridOptions.domLayout === 'autoHeight') {
1709
- if (this.agGrid.gridOptions.context?.enableTopScroll) {
1710
- this.viewkeeperClasses.push('.ag-header', '.ag-body-horizontal-scroll');
1711
- }
1712
- else {
1713
- this.viewkeeperClasses.push('.ag-header');
1749
+ if (this.agGrid) {
1750
+ if (this.agGrid.gridOptions &&
1751
+ this.agGrid.gridOptions.domLayout === 'autoHeight') {
1752
+ if (this.agGrid.gridOptions.context?.enableTopScroll) {
1753
+ this.viewkeeperClasses.push('.ag-header', '.ag-body-horizontal-scroll');
1754
+ }
1755
+ else {
1756
+ this.viewkeeperClasses.push('.ag-header');
1757
+ }
1714
1758
  }
1759
+ this.agGrid.gridReady
1760
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1761
+ .subscribe(() => {
1762
+ __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_instances, "m", _SkyAgGridWrapperComponent_moveHorizontalScroll).call(this);
1763
+ });
1764
+ this.agGrid.firstDataRendered
1765
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1766
+ .subscribe(() => {
1767
+ __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_instances, "m", _SkyAgGridWrapperComponent_moveHorizontalScroll).call(this);
1768
+ });
1769
+ this.agGrid.rowDataUpdated
1770
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1771
+ .subscribe(() => {
1772
+ __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_instances, "m", _SkyAgGridWrapperComponent_moveHorizontalScroll).call(this);
1773
+ });
1774
+ this.agGrid.cellEditingStarted
1775
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1776
+ .subscribe((params) => {
1777
+ if (params.colDef.type) {
1778
+ const types = Array.isArray(params.colDef.type)
1779
+ ? params.colDef.type
1780
+ : [params.colDef.type];
1781
+ const addClasses = types.map((t) => `sky-ag-grid-cell-editing-${t}`);
1782
+ __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f").next([
1783
+ ...__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f").getValue(),
1784
+ ...addClasses,
1785
+ ]);
1786
+ }
1787
+ });
1788
+ this.agGrid.cellEditingStopped
1789
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1790
+ .subscribe(() => {
1791
+ __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f").next(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f")
1792
+ .getValue()
1793
+ .filter((c) => c.startsWith('ag-theme-')));
1794
+ });
1715
1795
  }
1716
- this.agGrid.gridReady.pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f"))).subscribe(() => {
1717
- __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_instances, "m", _SkyAgGridWrapperComponent_moveHorizontalScroll).call(this);
1718
- });
1719
- this.agGrid.firstDataRendered
1720
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1721
- .subscribe(() => {
1722
- __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_instances, "m", _SkyAgGridWrapperComponent_moveHorizontalScroll).call(this);
1723
- });
1724
- this.agGrid.rowDataUpdated
1725
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1726
- .subscribe(() => {
1727
- __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_instances, "m", _SkyAgGridWrapperComponent_moveHorizontalScroll).call(this);
1728
- });
1729
- this.agGrid.cellEditingStarted
1730
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1731
- .subscribe((params) => {
1732
- if (params.colDef.type) {
1733
- const types = Array.isArray(params.colDef.type)
1734
- ? params.colDef.type
1735
- : [params.colDef.type];
1736
- const addClasses = types.map((t) => `sky-ag-grid-cell-editing-${t}`);
1737
- __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f").next([
1738
- ...__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f").getValue(),
1739
- ...addClasses,
1740
- ]);
1741
- }
1742
- });
1743
- this.agGrid.cellEditingStopped
1744
- .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f")))
1745
- .subscribe(() => {
1746
- __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f").next(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_wrapperClasses, "f")
1747
- .getValue()
1748
- .filter((c) => c.startsWith('ag-theme-')));
1749
- });
1750
1796
  }
1751
1797
  ngOnDestroy() {
1752
1798
  __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_ngUnsubscribe, "f").next();
@@ -1773,7 +1819,7 @@ class SkyAgGridWrapperComponent {
1773
1819
  // Initial theme settings.
1774
1820
  __classPrivateFieldSet(this, _SkyAgGridWrapperComponent_currentTheme, settings.currentSettings, "f");
1775
1821
  }
1776
- else if (this.agGrid.api) {
1822
+ else if (this.agGrid?.api) {
1777
1823
  // On subsequent theme changes, we need to call the api to re-render the grid.
1778
1824
  __classPrivateFieldSet(this, _SkyAgGridWrapperComponent_currentTheme, settings.currentSettings, "f");
1779
1825
  this.agGrid.api.setHeaderHeight(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_agGridService, "f").getHeaderHeight());
@@ -1787,14 +1833,14 @@ class SkyAgGridWrapperComponent {
1787
1833
  */
1788
1834
  onKeyUpEscape($event) {
1789
1835
  $event.stopPropagation();
1790
- this.agGrid.api.stopEditing(true);
1836
+ this.agGrid?.api.stopEditing(true);
1791
1837
  }
1792
1838
  onGridKeydown(event) {
1793
- if (this.agGrid && !this.isInEditMode && event.key === 'Tab') {
1839
+ if (this.agGrid && !__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_instances, "a", _SkyAgGridWrapperComponent_isInEditMode_get) && event.key === 'Tab') {
1794
1840
  const idToFocus = event.shiftKey
1795
1841
  ? this.beforeAnchorId
1796
1842
  : this.afterAnchorId;
1797
- this.adapterService.setFocusedElementById(this.elementRef.nativeElement, idToFocus);
1843
+ __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_adapterService, "f").setFocusedElementById(__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_elementRef, "f").nativeElement, idToFocus);
1798
1844
  }
1799
1845
  }
1800
1846
  onAnchorFocus(event) {
@@ -1802,43 +1848,41 @@ class SkyAgGridWrapperComponent {
1802
1848
  const relatedTarget = event.relatedTarget;
1803
1849
  const previousFocusedId = relatedTarget && relatedTarget.id;
1804
1850
  const previousWasCell = relatedTarget &&
1805
- !!this.adapterService.getElementOrParentWithClass(relatedTarget, 'ag-cell');
1851
+ !!__classPrivateFieldGet(this, _SkyAgGridWrapperComponent_adapterService, "f").getElementOrParentWithClass(relatedTarget, 'ag-cell');
1806
1852
  if (previousFocusedId !== gridId && !previousWasCell) {
1807
- const columns = this.agGrid.columnApi.getAllDisplayedColumns();
1808
- const firstColumn = columns && columns[0];
1809
- const rowIndex = this.agGrid.api.getFirstDisplayedRow();
1810
- if (firstColumn && rowIndex >= 0) {
1811
- this.agGrid.api.setFocusedCell(rowIndex, firstColumn);
1853
+ const columns = this.agGrid?.columnApi.getAllDisplayedColumns();
1854
+ const firstColumn = columns?.[0];
1855
+ const rowIndex = this.agGrid?.api.getFirstDisplayedRow();
1856
+ if (firstColumn && rowIndex !== undefined && rowIndex >= 0) {
1857
+ this.agGrid?.api.setFocusedCell(rowIndex, firstColumn);
1812
1858
  }
1813
1859
  }
1814
1860
  }
1815
- get isInEditMode() {
1816
- /* Sanity check */
1817
- /* istanbul ignore else */
1818
- if (this.agGrid && this.agGrid.api) {
1819
- const primaryGridEditing = this.agGrid.api.getEditingCells().length > 0;
1820
- if (primaryGridEditing) {
1821
- return true;
1822
- }
1823
- else {
1824
- let innerEditing = false;
1825
- this.agGrid.api.forEachDetailGridInfo((detailGrid) => {
1826
- if (detailGrid.api.getEditingCells().length > 0) {
1827
- innerEditing = true;
1828
- }
1829
- });
1830
- return innerEditing;
1831
- }
1861
+ }
1862
+ _SkyAgGridWrapperComponent__viewkeeperClasses = new WeakMap(), _SkyAgGridWrapperComponent_agGridService = new WeakMap(), _SkyAgGridWrapperComponent_ngUnsubscribe = new WeakMap(), _SkyAgGridWrapperComponent_themeSvc = new WeakMap(), _SkyAgGridWrapperComponent_wrapperClasses = new WeakMap(), _SkyAgGridWrapperComponent_currentTheme = new WeakMap(), _SkyAgGridWrapperComponent_adapterService = new WeakMap(), _SkyAgGridWrapperComponent_changeDetector = new WeakMap(), _SkyAgGridWrapperComponent_elementRef = new WeakMap(), _SkyAgGridWrapperComponent_document = new WeakMap(), _SkyAgGridWrapperComponent_instances = new WeakSet(), _SkyAgGridWrapperComponent_isInEditMode_get = function _SkyAgGridWrapperComponent_isInEditMode_get() {
1863
+ /* istanbul ignore else */
1864
+ if (this.agGrid && this.agGrid.api) {
1865
+ const primaryGridEditing = this.agGrid.api.getEditingCells().length > 0;
1866
+ if (primaryGridEditing) {
1867
+ return true;
1832
1868
  }
1833
1869
  else {
1834
- return false;
1870
+ let innerEditing = false;
1871
+ this.agGrid.api.forEachDetailGridInfo((detailGrid) => {
1872
+ if (detailGrid?.api && detailGrid.api.getEditingCells().length > 0) {
1873
+ innerEditing = true;
1874
+ }
1875
+ });
1876
+ return innerEditing;
1835
1877
  }
1836
1878
  }
1837
- }
1838
- _SkyAgGridWrapperComponent_agGridService = new WeakMap(), _SkyAgGridWrapperComponent_ngUnsubscribe = new WeakMap(), _SkyAgGridWrapperComponent_themeSvc = new WeakMap(), _SkyAgGridWrapperComponent_wrapperClasses = new WeakMap(), _SkyAgGridWrapperComponent_currentTheme = new WeakMap(), _SkyAgGridWrapperComponent_instances = new WeakSet(), _SkyAgGridWrapperComponent_moveHorizontalScroll = function _SkyAgGridWrapperComponent_moveHorizontalScroll() {
1879
+ else {
1880
+ return false;
1881
+ }
1882
+ }, _SkyAgGridWrapperComponent_moveHorizontalScroll = function _SkyAgGridWrapperComponent_moveHorizontalScroll() {
1839
1883
  if (this.agGrid && this.agGrid.api) {
1840
1884
  const toTop = !!this.agGrid.gridOptions.context?.enableTopScroll;
1841
- const root = this.elementRef.nativeElement.querySelector('.ag-root');
1885
+ const root = __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_elementRef, "f").nativeElement.querySelector('.ag-root');
1842
1886
  const header = root.querySelector('.ag-header');
1843
1887
  const floatingBottom = root.querySelector('.ag-floating-bottom');
1844
1888
  const scrollbar = root.querySelector('.ag-body-horizontal-scroll');
@@ -1849,12 +1893,12 @@ _SkyAgGridWrapperComponent_agGridService = new WeakMap(), _SkyAgGridWrapperCompo
1849
1893
  }
1850
1894
  const isTop = !!root.children[1].matches('.ag-body-horizontal-scroll');
1851
1895
  if (toTop && !isTop) {
1852
- const fragment = this.document.createDocumentFragment();
1896
+ const fragment = __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_document, "f").createDocumentFragment();
1853
1897
  fragment.appendChild(scrollbar);
1854
1898
  header.after(fragment);
1855
1899
  }
1856
1900
  else if (!toTop && isTop) {
1857
- const fragment = this.document.createDocumentFragment();
1901
+ const fragment = __classPrivateFieldGet(this, _SkyAgGridWrapperComponent_document, "f").createDocumentFragment();
1858
1902
  fragment.appendChild(scrollbar);
1859
1903
  floatingBottom.after(fragment);
1860
1904
  }
@@ -1878,137 +1922,153 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
1878
1922
  }]
1879
1923
  }] } });
1880
1924
 
1925
+ var _SkyAgGridDataManagerAdapterDirective_instances, _SkyAgGridDataManagerAdapterDirective_currentAgGrid, _SkyAgGridDataManagerAdapterDirective_currentDataState, _SkyAgGridDataManagerAdapterDirective_currentSkyAgGridWrapper, _SkyAgGridDataManagerAdapterDirective_dataStateSub, _SkyAgGridDataManagerAdapterDirective_viewConfig, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, _SkyAgGridDataManagerAdapterDirective_changeDetector, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, _SkyAgGridDataManagerAdapterDirective_checkForAgGrid, _SkyAgGridDataManagerAdapterDirective_checkForSkyAgGridWrapper, _SkyAgGridDataManagerAdapterDirective_unregisterAgGrid, _SkyAgGridDataManagerAdapterDirective_unregisterSkyAgGridWrapper, _SkyAgGridDataManagerAdapterDirective_registerSkyAgGridWrapper, _SkyAgGridDataManagerAdapterDirective_registerAgGrid, _SkyAgGridDataManagerAdapterDirective_updateColumnsInCurrentDataState, _SkyAgGridDataManagerAdapterDirective_getColumnOrder, _SkyAgGridDataManagerAdapterDirective_displayColumns, _SkyAgGridDataManagerAdapterDirective_selectAll, _SkyAgGridDataManagerAdapterDirective_clearAll;
1881
1926
  /**
1882
1927
  * @internal
1883
1928
  */
1884
1929
  class SkyAgGridDataManagerAdapterDirective {
1885
1930
  constructor(changeDetector, dataManagerSvc) {
1886
- this.changeDetector = changeDetector;
1887
- this.dataManagerSvc = dataManagerSvc;
1888
- this.ngUnsubscribe = new Subject();
1931
+ _SkyAgGridDataManagerAdapterDirective_instances.add(this);
1932
+ _SkyAgGridDataManagerAdapterDirective_currentAgGrid.set(this, void 0);
1933
+ _SkyAgGridDataManagerAdapterDirective_currentDataState.set(this, void 0);
1934
+ _SkyAgGridDataManagerAdapterDirective_currentSkyAgGridWrapper.set(this, void 0);
1935
+ _SkyAgGridDataManagerAdapterDirective_dataStateSub.set(this, void 0);
1936
+ _SkyAgGridDataManagerAdapterDirective_viewConfig.set(this, void 0);
1937
+ _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe.set(this, new Subject());
1938
+ _SkyAgGridDataManagerAdapterDirective_changeDetector.set(this, void 0);
1939
+ _SkyAgGridDataManagerAdapterDirective_dataManagerSvc.set(this, void 0);
1940
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_changeDetector, changeDetector, "f");
1941
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, dataManagerSvc, "f");
1889
1942
  }
1890
1943
  ngAfterContentInit() {
1891
- this.dataManagerSvc.setViewkeeperClasses(this.viewId, ['.ag-header']);
1892
- this.viewConfig = this.dataManagerSvc.getViewById(this.viewId);
1893
- this.checkForAgGrid();
1894
- this.checkForSkyAgGridWrapper();
1895
- this.agGridList.changes
1896
- .pipe(takeUntil(this.ngUnsubscribe))
1897
- .subscribe(() => this.checkForAgGrid());
1898
- this.skyAgGridWrapperList.changes
1899
- .pipe(takeUntil(this.ngUnsubscribe))
1900
- .subscribe(() => this.checkForSkyAgGridWrapper());
1944
+ if (this.viewId) {
1945
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f").setViewkeeperClasses(this.viewId, ['.ag-header']);
1946
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f").getViewById(this.viewId), "f");
1947
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_checkForAgGrid).call(this);
1948
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_checkForSkyAgGridWrapper).call(this);
1949
+ this.agGridList?.changes
1950
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f")))
1951
+ .subscribe(() => __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_checkForAgGrid).call(this));
1952
+ this.skyAgGridWrapperList?.changes
1953
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f")))
1954
+ .subscribe(() => __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_checkForSkyAgGridWrapper).call(this));
1955
+ }
1901
1956
  }
1902
1957
  ngOnDestroy() {
1903
- this.ngUnsubscribe.next();
1904
- this.ngUnsubscribe.complete();
1958
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f").next();
1959
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f").complete();
1905
1960
  }
1906
- checkForAgGrid() {
1961
+ }
1962
+ _SkyAgGridDataManagerAdapterDirective_currentAgGrid = new WeakMap(), _SkyAgGridDataManagerAdapterDirective_currentDataState = new WeakMap(), _SkyAgGridDataManagerAdapterDirective_currentSkyAgGridWrapper = new WeakMap(), _SkyAgGridDataManagerAdapterDirective_dataStateSub = new WeakMap(), _SkyAgGridDataManagerAdapterDirective_viewConfig = new WeakMap(), _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe = new WeakMap(), _SkyAgGridDataManagerAdapterDirective_changeDetector = new WeakMap(), _SkyAgGridDataManagerAdapterDirective_dataManagerSvc = new WeakMap(), _SkyAgGridDataManagerAdapterDirective_instances = new WeakSet(), _SkyAgGridDataManagerAdapterDirective_checkForAgGrid = function _SkyAgGridDataManagerAdapterDirective_checkForAgGrid() {
1963
+ if (this.agGridList) {
1907
1964
  const agGridCount = this.agGridList.length;
1908
1965
  /* istanbul ignore else */
1909
1966
  if (agGridCount === 0) {
1910
- this.unregisterAgGrid();
1967
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_unregisterAgGrid).call(this);
1911
1968
  }
1912
- else if (this.agGridList.first !== this.currentAgGrid) {
1913
- this.registerAgGrid();
1969
+ else if (this.agGridList.first !== __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentAgGrid, "f")) {
1970
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_registerAgGrid).call(this);
1914
1971
  }
1915
1972
  if (agGridCount > 1) {
1916
1973
  console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
1917
1974
  }
1918
1975
  }
1919
- checkForSkyAgGridWrapper() {
1976
+ }, _SkyAgGridDataManagerAdapterDirective_checkForSkyAgGridWrapper = function _SkyAgGridDataManagerAdapterDirective_checkForSkyAgGridWrapper() {
1977
+ if (this.skyAgGridWrapperList) {
1920
1978
  const skyAgGridWrapperCount = this.skyAgGridWrapperList.length;
1921
1979
  /* istanbul ignore else */
1922
1980
  if (skyAgGridWrapperCount === 0) {
1923
- this.unregisterSkyAgGridWrapper();
1981
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_unregisterSkyAgGridWrapper).call(this);
1924
1982
  }
1925
- else if (this.skyAgGridWrapperList.first !== this.currentSkyAgGridWrapper) {
1926
- this.registerSkyAgGridWrapper();
1983
+ else if (this.skyAgGridWrapperList.first !== __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentSkyAgGridWrapper, "f")) {
1984
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_registerSkyAgGridWrapper).call(this);
1927
1985
  }
1928
1986
  if (skyAgGridWrapperCount > 1) {
1929
1987
  console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
1930
1988
  }
1931
1989
  }
1932
- unregisterAgGrid() {
1933
- this.currentAgGrid = undefined;
1934
- /* istanbul ignore if */
1935
- if (this.dataStateSub) {
1936
- this.dataStateSub.unsubscribe();
1937
- }
1938
- }
1939
- unregisterSkyAgGridWrapper() {
1940
- this.currentSkyAgGridWrapper = undefined;
1941
- }
1942
- registerSkyAgGridWrapper() {
1943
- this.unregisterSkyAgGridWrapper();
1944
- this.currentSkyAgGridWrapper = this.skyAgGridWrapperList.first;
1945
- setTimeout(() => {
1946
- if (this.currentSkyAgGridWrapper) {
1947
- this.currentSkyAgGridWrapper.viewkeeperClasses = [];
1948
- }
1949
- });
1950
- }
1951
- registerAgGrid() {
1952
- this.unregisterAgGrid();
1953
- const agGrid = this.agGridList.first;
1954
- this.currentAgGrid = agGrid;
1955
- agGrid.gridReady.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
1956
- this.viewConfig.onSelectAllClick = this.selectAll.bind(this);
1957
- this.viewConfig.onClearAllClick = this.clearAll.bind(this);
1958
- this.dataManagerSvc.updateViewConfig(this.viewConfig);
1959
- this.dataStateSub = this.dataManagerSvc
1960
- .getDataStateUpdates(this.viewConfig.id)
1961
- .pipe(takeUntil(this.ngUnsubscribe))
1962
- .subscribe((dataState) => {
1963
- this.currentDataState = dataState;
1964
- this.displayColumns(dataState);
1965
- });
1966
- if (agGrid.gridOptions.context?.enableTopScroll) {
1967
- this.dataManagerSvc.setViewkeeperClasses(this.viewId, [
1968
- '.ag-header',
1969
- '.ag-body-horizontal-scroll',
1970
- ]);
1990
+ }, _SkyAgGridDataManagerAdapterDirective_unregisterAgGrid = function _SkyAgGridDataManagerAdapterDirective_unregisterAgGrid() {
1991
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_currentAgGrid, undefined, "f");
1992
+ /* istanbul ignore if */
1993
+ if (__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataStateSub, "f")) {
1994
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataStateSub, "f").unsubscribe();
1995
+ }
1996
+ }, _SkyAgGridDataManagerAdapterDirective_unregisterSkyAgGridWrapper = function _SkyAgGridDataManagerAdapterDirective_unregisterSkyAgGridWrapper() {
1997
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_currentSkyAgGridWrapper, undefined, "f");
1998
+ }, _SkyAgGridDataManagerAdapterDirective_registerSkyAgGridWrapper = function _SkyAgGridDataManagerAdapterDirective_registerSkyAgGridWrapper() {
1999
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_unregisterSkyAgGridWrapper).call(this);
2000
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_currentSkyAgGridWrapper, this.skyAgGridWrapperList?.first, "f");
2001
+ setTimeout(() => {
2002
+ if (__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentSkyAgGridWrapper, "f")) {
2003
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentSkyAgGridWrapper, "f").viewkeeperClasses = [];
2004
+ }
2005
+ });
2006
+ }, _SkyAgGridDataManagerAdapterDirective_registerAgGrid = function _SkyAgGridDataManagerAdapterDirective_registerAgGrid() {
2007
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_unregisterAgGrid).call(this);
2008
+ const agGrid = this.agGridList?.first;
2009
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_currentAgGrid, agGrid, "f");
2010
+ if (agGrid) {
2011
+ agGrid.gridReady.pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f"))).subscribe(() => {
2012
+ if (__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f") && this.viewId) {
2013
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").onSelectAllClick = __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_selectAll).bind(this);
2014
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").onClearAllClick = __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_clearAll).bind(this);
2015
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f").updateViewConfig(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f"));
2016
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_dataStateSub, __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f")
2017
+ .getDataStateUpdates(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").id)
2018
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f")))
2019
+ .subscribe((dataState) => {
2020
+ __classPrivateFieldSet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, dataState, "f");
2021
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_displayColumns).call(this, dataState);
2022
+ }), "f");
2023
+ if (agGrid.gridOptions.context?.enableTopScroll) {
2024
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f").setViewkeeperClasses(this.viewId, [
2025
+ '.ag-header',
2026
+ '.ag-body-horizontal-scroll',
2027
+ ]);
2028
+ }
2029
+ agGrid.api.sizeColumnsToFit();
1971
2030
  }
1972
- agGrid.api.sizeColumnsToFit();
1973
2031
  });
1974
2032
  agGrid.columnMoved
1975
- .pipe(takeUntil(this.ngUnsubscribe), filter((event) => ![
2033
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f")), filter((event) => ![
1976
2034
  'gridInitializing',
1977
2035
  'uiColumnResized',
1978
2036
  'uiColumnDragged',
1979
2037
  'api',
1980
2038
  ].includes(event.source)))
1981
2039
  .subscribe((value) => {
1982
- this.updateColumnsInCurrentDataState(value.columnApi);
2040
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_updateColumnsInCurrentDataState).call(this, value.columnApi);
1983
2041
  });
1984
2042
  agGrid.dragStopped
1985
- .pipe(takeUntil(this.ngUnsubscribe))
2043
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f")))
1986
2044
  .subscribe((value) => {
1987
- this.updateColumnsInCurrentDataState(value.columnApi);
2045
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_updateColumnsInCurrentDataState).call(this, value.columnApi);
1988
2046
  });
1989
2047
  agGrid.rowSelected
1990
- .pipe(takeUntil(this.ngUnsubscribe))
2048
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f")))
1991
2049
  .subscribe((event) => {
1992
- const row = event.node;
1993
- const selectedIds = this.currentDataState.selectedIds || [];
1994
- const rowIndex = selectedIds.indexOf(row.data.id);
1995
- if (row.isSelected() && rowIndex === -1) {
1996
- selectedIds.push(row.data.id);
1997
- }
1998
- else if (!row.isSelected() && rowIndex !== -1) {
1999
- selectedIds.splice(rowIndex, 1);
2050
+ if (__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f") && __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f")) {
2051
+ const row = event.node;
2052
+ const selectedIds = __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f").selectedIds || [];
2053
+ const rowIndex = selectedIds.indexOf(row.data.id);
2054
+ if (row.isSelected() && rowIndex === -1) {
2055
+ selectedIds.push(row.data.id);
2056
+ }
2057
+ else if (!row.isSelected() && rowIndex !== -1) {
2058
+ selectedIds.splice(rowIndex, 1);
2059
+ }
2060
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f").selectedIds = selectedIds;
2061
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f").updateDataState(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f"), __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").id);
2062
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_changeDetector, "f").markForCheck();
2000
2063
  }
2001
- this.currentDataState.selectedIds = selectedIds;
2002
- this.dataManagerSvc.updateDataState(this.currentDataState, this.viewConfig.id);
2003
- this.changeDetector.markForCheck();
2004
2064
  });
2005
- agGrid.sortChanged.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
2065
+ agGrid.sortChanged.pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_ngUnsubscribe, "f"))).subscribe(() => {
2006
2066
  const gridColumnStates = agGrid.columnApi.getColumnState();
2007
2067
  let sortOption;
2008
2068
  /* istanbul ignore else */
2009
2069
  if (gridColumnStates.length) {
2010
2070
  const activeSortColumnState = gridColumnStates.find((aGridColumnState) => aGridColumnState.sortIndex === 0);
2011
- const dataManagerConfig = this.dataManagerSvc.getCurrentDataManagerConfig();
2071
+ const dataManagerConfig = __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f").getCurrentDataManagerConfig();
2012
2072
  /* istanbul ignore else */
2013
2073
  if (dataManagerConfig.sortOptions && activeSortColumnState) {
2014
2074
  sortOption = dataManagerConfig.sortOptions.find((option) => {
@@ -2020,34 +2080,38 @@ class SkyAgGridDataManagerAdapterDirective {
2020
2080
  sortOption = undefined;
2021
2081
  }
2022
2082
  }
2023
- this.currentDataState.activeSortOption = sortOption;
2024
- this.dataManagerSvc.updateDataState(this.currentDataState, this.viewConfig.id);
2083
+ if (__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f") && __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f")) {
2084
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f").activeSortOption = sortOption;
2085
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f").updateDataState(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f"), __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").id);
2086
+ }
2025
2087
  });
2026
2088
  }
2027
- updateColumnsInCurrentDataState(columnApi) {
2028
- const columnOrder = this.getColumnOrder(columnApi);
2029
- const viewState = this.currentDataState.getViewStateById(this.viewConfig.id);
2030
- if (viewState.displayedColumnIds.length !== columnOrder.length ||
2031
- viewState.displayedColumnIds.some((col, i) => col !== columnOrder[i])) {
2089
+ }, _SkyAgGridDataManagerAdapterDirective_updateColumnsInCurrentDataState = function _SkyAgGridDataManagerAdapterDirective_updateColumnsInCurrentDataState(columnApi) {
2090
+ if (__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f") && __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f")) {
2091
+ const columnOrder = __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_getColumnOrder).call(this, columnApi);
2092
+ const viewState = __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f").getViewStateById(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").id);
2093
+ if (viewState &&
2094
+ (viewState.displayedColumnIds.length !== columnOrder.length ||
2095
+ viewState.displayedColumnIds.some((col, i) => col !== columnOrder[i]))) {
2032
2096
  viewState.displayedColumnIds = columnOrder;
2033
- this.dataManagerSvc.updateDataState(this.currentDataState.addOrUpdateView(this.viewConfig.id, viewState), this.viewConfig.id);
2034
- }
2035
- }
2036
- getColumnOrder(columnApi) {
2037
- return columnApi
2038
- .getColumnState()
2039
- .filter((state) => !state.hide)
2040
- .map((state) => state.colId);
2041
- }
2042
- displayColumns(dataState) {
2043
- const agGrid = this.currentAgGrid;
2044
- const viewState = dataState.getViewStateById(this.viewConfig.id);
2097
+ __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_dataManagerSvc, "f").updateDataState(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentDataState, "f").addOrUpdateView(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").id, viewState), __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").id);
2098
+ }
2099
+ }
2100
+ }, _SkyAgGridDataManagerAdapterDirective_getColumnOrder = function _SkyAgGridDataManagerAdapterDirective_getColumnOrder(columnApi) {
2101
+ return columnApi
2102
+ .getColumnState()
2103
+ .filter((state) => !state.hide)
2104
+ .map((state) => state.colId);
2105
+ }, _SkyAgGridDataManagerAdapterDirective_displayColumns = function _SkyAgGridDataManagerAdapterDirective_displayColumns(dataState) {
2106
+ const agGrid = __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_currentAgGrid, "f");
2107
+ if (agGrid && __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f")) {
2108
+ const viewState = dataState.getViewStateById(__classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_viewConfig, "f").id);
2045
2109
  let displayedColumnIds = [];
2046
2110
  /*istanbul ignore else*/
2047
- if (viewState.displayedColumnIds) {
2111
+ if (viewState?.displayedColumnIds) {
2048
2112
  displayedColumnIds = viewState.displayedColumnIds;
2049
2113
  }
2050
- const columnOrder = this.getColumnOrder(agGrid.columnApi);
2114
+ const columnOrder = __classPrivateFieldGet(this, _SkyAgGridDataManagerAdapterDirective_instances, "m", _SkyAgGridDataManagerAdapterDirective_getColumnOrder).call(this, agGrid.columnApi);
2051
2115
  if (displayedColumnIds.length !== columnOrder.length ||
2052
2116
  displayedColumnIds.some((col, i) => col !== columnOrder[i])) {
2053
2117
  const hideColumns = agGrid.columnApi
@@ -2059,15 +2123,13 @@ class SkyAgGridDataManagerAdapterDirective {
2059
2123
  agGrid.columnApi.moveColumns(displayedColumnIds, 0);
2060
2124
  }
2061
2125
  }
2062
- selectAll() {
2063
- const agGrid = this.agGridList.first;
2064
- agGrid.api.selectAll();
2065
- }
2066
- clearAll() {
2067
- const agGrid = this.agGridList.first;
2068
- agGrid.api.deselectAll();
2069
- }
2070
- }
2126
+ }, _SkyAgGridDataManagerAdapterDirective_selectAll = function _SkyAgGridDataManagerAdapterDirective_selectAll() {
2127
+ const agGrid = this.agGridList?.first;
2128
+ agGrid?.api.selectAll();
2129
+ }, _SkyAgGridDataManagerAdapterDirective_clearAll = function _SkyAgGridDataManagerAdapterDirective_clearAll() {
2130
+ const agGrid = this.agGridList?.first;
2131
+ agGrid?.api.deselectAll();
2132
+ };
2071
2133
  SkyAgGridDataManagerAdapterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridDataManagerAdapterDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$4.SkyDataManagerService }], target: i0.ɵɵFactoryTarget.Directive });
2072
2134
  SkyAgGridDataManagerAdapterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridDataManagerAdapterDirective, selector: "[skyAgGridDataManagerAdapter]", inputs: { viewId: "viewId" }, queries: [{ propertyName: "agGridList", predicate: AgGridAngular, descendants: true }, { propertyName: "skyAgGridWrapperList", predicate: SkyAgGridWrapperComponent, descendants: true }], ngImport: i0 });
2073
2135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridDataManagerAdapterDirective, decorators: [{
@@ -2158,13 +2220,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2158
2220
  args: ['inlineDeleteTemplateRef', { read: TemplateRef }]
2159
2221
  }] } });
2160
2222
 
2223
+ var _SkyAgGridRowDeleteDirective_instances, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, _SkyAgGridRowDeleteDirective_ngUnsubscribe, _SkyAgGridRowDeleteDirective_rowDeleteComponent, _SkyAgGridRowDeleteDirective_rowDeleteContents, _SkyAgGridRowDeleteDirective_rowDeleteIdsInternal, _SkyAgGridRowDeleteDirective_affixService, _SkyAgGridRowDeleteDirective_changeDetector, _SkyAgGridRowDeleteDirective_elementRef, _SkyAgGridRowDeleteDirective_overlayService, _SkyAgGridRowDeleteDirective_viewContainerRef, _SkyAgGridRowDeleteDirective_affixToRow, _SkyAgGridRowDeleteDirective_destroyRowDelete, _SkyAgGridRowDeleteDirective_updateRowDeleteStates;
2161
2224
  class SkyAgGridRowDeleteDirective {
2162
2225
  constructor(affixService, changeDetector, elementRef, overlayService, viewContainerRef) {
2163
- this.affixService = affixService;
2164
- this.changeDetector = changeDetector;
2165
- this.elementRef = elementRef;
2166
- this.overlayService = overlayService;
2167
- this.viewContainerRef = viewContainerRef;
2226
+ _SkyAgGridRowDeleteDirective_instances.add(this);
2168
2227
  /**
2169
2228
  * Emits a `SkyAgGridRowDeleteCancelArgs` object when a row's inline delete is cancelled.
2170
2229
  */
@@ -2177,48 +2236,61 @@ class SkyAgGridRowDeleteDirective {
2177
2236
  * Emits when the list of ids of the data in the rows where inline deletes are shown changes.
2178
2237
  */
2179
2238
  this.rowDeleteIdsChange = new EventEmitter();
2180
- this.rowDeleteConfigs = [];
2181
- this.ngUnsubscribe = new Subject();
2182
- this.rowDeleteContents = {};
2239
+ _SkyAgGridRowDeleteDirective_rowDeleteConfigs.set(this, []);
2240
+ _SkyAgGridRowDeleteDirective_ngUnsubscribe.set(this, new Subject());
2241
+ _SkyAgGridRowDeleteDirective_rowDeleteComponent.set(this, void 0);
2242
+ _SkyAgGridRowDeleteDirective_rowDeleteContents.set(this, {});
2243
+ _SkyAgGridRowDeleteDirective_rowDeleteIdsInternal.set(this, void 0);
2244
+ _SkyAgGridRowDeleteDirective_affixService.set(this, void 0);
2245
+ _SkyAgGridRowDeleteDirective_changeDetector.set(this, void 0);
2246
+ _SkyAgGridRowDeleteDirective_elementRef.set(this, void 0);
2247
+ _SkyAgGridRowDeleteDirective_overlayService.set(this, void 0);
2248
+ _SkyAgGridRowDeleteDirective_viewContainerRef.set(this, void 0);
2249
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_affixService, affixService, "f");
2250
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_changeDetector, changeDetector, "f");
2251
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_elementRef, elementRef, "f");
2252
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_overlayService, overlayService, "f");
2253
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_viewContainerRef, viewContainerRef, "f");
2183
2254
  }
2184
2255
  /**
2185
2256
  * Specifies the ids of the data in the rows on which inline delete's should be shown.
2186
2257
  */
2187
2258
  set rowDeleteIds(value) {
2188
- this._rowDeleteIds = value;
2259
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_rowDeleteIdsInternal, value, "f");
2189
2260
  if (!value) {
2190
- for (const config of this.rowDeleteConfigs) {
2191
- this.destroyRowDelete(config.id);
2261
+ for (const config of __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f")) {
2262
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_destroyRowDelete).call(this, config.id);
2192
2263
  }
2193
- this.changeDetector.markForCheck();
2264
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_changeDetector, "f").markForCheck();
2194
2265
  return;
2195
2266
  }
2196
2267
  for (const id of value) {
2197
- const existingConfig = this.rowDeleteConfigs.find((config) => config.id === id);
2268
+ const existingConfig = __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f").find((config) => config.id === id);
2198
2269
  if (existingConfig) {
2199
2270
  existingConfig.pending = false;
2200
2271
  }
2201
- else {
2202
- this.rowDeleteConfigs.push({
2272
+ else if (__classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteComponent, "f") && this.agGrid) {
2273
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f").push({
2203
2274
  id: id,
2204
2275
  pending: false,
2205
2276
  });
2206
- const overlay = this.overlayService.create({
2277
+ const overlay = __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_overlayService, "f").create({
2207
2278
  enableScroll: true,
2208
2279
  showBackdrop: false,
2209
2280
  closeOnNavigation: true,
2210
2281
  enableClose: false,
2211
2282
  enablePointerEvents: true,
2212
2283
  });
2213
- overlay.attachTemplate(this.rowDeleteComponent.inlineDeleteTemplateRef, {
2214
- $implicit: this.agGrid.api.getRowNode(id),
2215
- tableWidth: () => {
2216
- return this.tableWidth;
2217
- },
2218
- getRowDeleteItem: (row) => this.getRowDeleteItem(row),
2219
- cancelRowDelete: (row) => this.cancelRowDelete(row),
2220
- confirmRowDelete: (row) => this.confirmRowDelete(row),
2221
- });
2284
+ if (__classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteComponent, "f").inlineDeleteTemplateRef) {
2285
+ overlay.attachTemplate(__classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteComponent, "f").inlineDeleteTemplateRef, {
2286
+ $implicit: this.agGrid.api.getRowNode(id),
2287
+ tableWidth: () => __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_elementRef, "f").nativeElement.querySelector('.sky-ag-grid')
2288
+ .offsetWidth,
2289
+ getRowDeleteItem: (row) => this.getRowDeleteItem(row),
2290
+ cancelRowDelete: (row) => this.cancelRowDelete(row),
2291
+ confirmRowDelete: (row) => this.confirmRowDelete(row),
2292
+ });
2293
+ }
2222
2294
  /**
2223
2295
  * We are manually setting the z-index here because overlays will always be on top of
2224
2296
  * the omnibar. This manual setting is 2 less than the omnibar's z-index of 1000 and one less than
@@ -2227,124 +2299,125 @@ class SkyAgGridRowDeleteDirective {
2227
2299
  */
2228
2300
  overlay.componentRef.instance.zIndex = '998';
2229
2301
  setTimeout(() => {
2230
- const inlineDeleteRef = this.rowDeleteComponent.inlineDeleteRefs
2231
- .toArray()
2232
- .find((elRef) => {
2233
- return elRef.nativeElement.id === 'row-delete-ref-' + id;
2234
- });
2235
- const affixer = this.affixService.createAffixer(inlineDeleteRef);
2236
- this.affixToRow(affixer, id);
2237
- this.rowDeleteContents[id] = {
2302
+ const inlineDeleteRef = __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteComponent, "f")?.inlineDeleteRefs
2303
+ ?.toArray()
2304
+ .find((elRef) => elRef.nativeElement.id === 'row-delete-ref-' + id);
2305
+ const affixer = __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_affixService, "f").createAffixer(inlineDeleteRef);
2306
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_affixToRow).call(this, affixer, id);
2307
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteContents, "f")[id] = {
2238
2308
  affixer: affixer,
2239
2309
  overlay: overlay,
2240
2310
  };
2241
2311
  });
2242
2312
  }
2243
2313
  }
2244
- for (const config of this.rowDeleteConfigs) {
2314
+ for (const config of __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f")) {
2245
2315
  if (value.indexOf(config.id) < 0) {
2246
- this.destroyRowDelete(config.id);
2316
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_destroyRowDelete).call(this, config.id);
2247
2317
  }
2248
2318
  }
2249
- this.changeDetector.markForCheck();
2319
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_changeDetector, "f").markForCheck();
2250
2320
  }
2251
2321
  get rowDeleteIds() {
2252
- return this._rowDeleteIds;
2253
- }
2254
- get tableWidth() {
2255
- return this.elementRef.nativeElement.querySelectorAll('.sky-ag-grid')[0]
2256
- .offsetWidth;
2322
+ return __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteIdsInternal, "f");
2257
2323
  }
2258
2324
  ngAfterContentInit() {
2259
- this.rowDeleteComponent = this.viewContainerRef.createComponent(SkyAgGridRowDeleteComponent).instance;
2260
- this.agGrid.rowDataUpdated
2261
- .pipe(takeUntil(this.ngUnsubscribe))
2262
- .subscribe(() => {
2263
- this.updateRowDeleteStates();
2264
- });
2265
- this.agGrid.sortChanged
2266
- .pipe(takeUntil(this.ngUnsubscribe))
2267
- .subscribe(() => {
2268
- this.updateRowDeleteStates();
2269
- });
2270
- this.agGrid.filterChanged
2271
- .pipe(takeUntil(this.ngUnsubscribe))
2272
- .subscribe(() => {
2273
- this.updateRowDeleteStates();
2274
- });
2325
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_rowDeleteComponent, __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_viewContainerRef, "f").createComponent(SkyAgGridRowDeleteComponent).instance, "f");
2326
+ if (this.agGrid) {
2327
+ this.agGrid.rowDataUpdated
2328
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_ngUnsubscribe, "f")))
2329
+ .subscribe(() => {
2330
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_updateRowDeleteStates).call(this);
2331
+ });
2332
+ this.agGrid.sortChanged
2333
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_ngUnsubscribe, "f")))
2334
+ .subscribe(() => {
2335
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_updateRowDeleteStates).call(this);
2336
+ });
2337
+ this.agGrid.filterChanged
2338
+ .pipe(takeUntil(__classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_ngUnsubscribe, "f")))
2339
+ .subscribe(() => {
2340
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_updateRowDeleteStates).call(this);
2341
+ });
2342
+ }
2275
2343
  }
2276
2344
  ngOnDestroy() {
2277
- this.ngUnsubscribe.next();
2278
- this.ngUnsubscribe.complete();
2279
- Object.keys(this.rowDeleteContents).forEach((id) => {
2280
- this.destroyRowDelete(id);
2345
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_ngUnsubscribe, "f").next();
2346
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_ngUnsubscribe, "f").complete();
2347
+ Object.keys(__classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteContents, "f")).forEach((id) => {
2348
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_destroyRowDelete).call(this, id);
2281
2349
  });
2282
2350
  }
2283
2351
  cancelRowDelete(row) {
2284
- this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== row.id);
2285
- this.rowDeleteCancel.emit({ id: row.id });
2286
- this.destroyRowDelete(row.id);
2352
+ if (row.id) {
2353
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f").filter((config) => config.id !== row.id), "f");
2354
+ this.rowDeleteCancel.emit({ id: row.id });
2355
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_destroyRowDelete).call(this, row.id);
2356
+ }
2287
2357
  }
2288
2358
  confirmRowDelete(row) {
2289
- this.rowDeleteConfigs.find((config) => config.id === row.id).pending = true;
2290
- this.rowDeleteConfirm.emit({ id: row.id });
2359
+ if (row.id) {
2360
+ const rowConfig = __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f").find((config) => config.id === row.id);
2361
+ if (rowConfig) {
2362
+ rowConfig.pending = true;
2363
+ this.rowDeleteConfirm.emit({ id: row.id });
2364
+ }
2365
+ }
2291
2366
  }
2292
2367
  getRowDeleteItem(row) {
2293
- return this.rowDeleteConfigs.find((rowDelete) => rowDelete.id === row.id);
2368
+ return __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f").find((rowDelete) => rowDelete.id === row.id);
2294
2369
  }
2295
- affixToRow(affixer, id) {
2296
- let rowElement = this.elementRef.nativeElement.querySelector(`
2370
+ }
2371
+ _SkyAgGridRowDeleteDirective_rowDeleteConfigs = new WeakMap(), _SkyAgGridRowDeleteDirective_ngUnsubscribe = new WeakMap(), _SkyAgGridRowDeleteDirective_rowDeleteComponent = new WeakMap(), _SkyAgGridRowDeleteDirective_rowDeleteContents = new WeakMap(), _SkyAgGridRowDeleteDirective_rowDeleteIdsInternal = new WeakMap(), _SkyAgGridRowDeleteDirective_affixService = new WeakMap(), _SkyAgGridRowDeleteDirective_changeDetector = new WeakMap(), _SkyAgGridRowDeleteDirective_elementRef = new WeakMap(), _SkyAgGridRowDeleteDirective_overlayService = new WeakMap(), _SkyAgGridRowDeleteDirective_viewContainerRef = new WeakMap(), _SkyAgGridRowDeleteDirective_instances = new WeakSet(), _SkyAgGridRowDeleteDirective_affixToRow = function _SkyAgGridRowDeleteDirective_affixToRow(affixer, id) {
2372
+ let rowElement = __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_elementRef, "f").nativeElement.querySelector(`
2297
2373
  [row-id="${id}"] div[aria-colindex="1"],
2298
2374
  .ag-row.sky-ag-grid-row-${id} div[aria-colindex="1"]
2299
2375
  `);
2300
- // This covers cases where AG Grid places the column index on an inner element (such as with the `enableCellTextSelection` option)
2301
- // This appears to have been fixed by AG Grid in version 24 and so it is not testable after that version.
2302
- /* istanbul ignore if */
2303
- if (!rowElement) {
2304
- const columns = this.elementRef.nativeElement.querySelectorAll('[row-id="' + id + '"] > div');
2305
- for (let i = 0; i < columns.length; i++) {
2306
- if (columns[i].querySelector('[aria-colindex="1"]')) {
2307
- rowElement = columns[i];
2308
- break;
2309
- }
2376
+ // This covers cases where AG Grid places the column index on an inner element (such as with the `enableCellTextSelection` option)
2377
+ // This appears to have been fixed by AG Grid in version 24 and so it is not testable after that version.
2378
+ /* istanbul ignore if */
2379
+ if (!rowElement) {
2380
+ const columns = __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_elementRef, "f").nativeElement.querySelectorAll('[row-id="' + id + '"] > div');
2381
+ for (let i = 0; i < columns.length; i++) {
2382
+ if (columns[i].querySelector('[aria-colindex="1"]')) {
2383
+ rowElement = columns[i];
2384
+ break;
2310
2385
  }
2311
2386
  }
2312
- affixer.affixTo(rowElement, {
2313
- autoFitContext: SkyAffixAutoFitContext.Viewport,
2314
- isSticky: true,
2315
- placement: 'above',
2316
- verticalAlignment: 'top',
2317
- horizontalAlignment: 'left',
2318
- enableAutoFit: false,
2319
- });
2320
2387
  }
2321
- destroyRowDelete(id) {
2322
- const rowDeleteContents = this.rowDeleteContents[id];
2323
- /* sanity check */
2324
- /* istanbul ignore else */
2325
- if (rowDeleteContents) {
2326
- rowDeleteContents.affixer.destroy();
2327
- this.overlayService.close(rowDeleteContents.overlay);
2328
- delete this.rowDeleteContents[id];
2329
- this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== id);
2330
- this._rowDeleteIds = this.rowDeleteIds?.filter((arrayId) => arrayId !== id);
2331
- this.rowDeleteIdsChange.emit(this._rowDeleteIds);
2332
- }
2333
- }
2334
- updateRowDeleteStates() {
2335
- this.rowDeleteConfigs.forEach((config) => {
2336
- if (!this.agGrid.api.getRowNode(config.id)) {
2337
- this.destroyRowDelete(config.id);
2338
- }
2339
- else {
2340
- // We must reaffix things when the data changes because the rows rerender and the previous element that the delete was affixed
2341
- // to is destroyed.
2342
- this.affixToRow(this.rowDeleteContents[config.id].affixer, config.id);
2343
- }
2344
- });
2345
- this.changeDetector.markForCheck();
2346
- }
2347
- }
2388
+ affixer.affixTo(rowElement, {
2389
+ autoFitContext: SkyAffixAutoFitContext.Viewport,
2390
+ isSticky: true,
2391
+ placement: 'above',
2392
+ verticalAlignment: 'top',
2393
+ horizontalAlignment: 'left',
2394
+ enableAutoFit: false,
2395
+ });
2396
+ }, _SkyAgGridRowDeleteDirective_destroyRowDelete = function _SkyAgGridRowDeleteDirective_destroyRowDelete(id) {
2397
+ const rowDeleteContents = __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteContents, "f")[id];
2398
+ /* sanity check */
2399
+ /* istanbul ignore else */
2400
+ if (rowDeleteContents) {
2401
+ rowDeleteContents.affixer.destroy();
2402
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_overlayService, "f").close(rowDeleteContents.overlay);
2403
+ delete __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteContents, "f")[id];
2404
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f").filter((config) => config.id !== id), "f");
2405
+ __classPrivateFieldSet(this, _SkyAgGridRowDeleteDirective_rowDeleteIdsInternal, this.rowDeleteIds?.filter((arrayId) => arrayId !== id), "f");
2406
+ this.rowDeleteIdsChange.emit(__classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteIdsInternal, "f"));
2407
+ }
2408
+ }, _SkyAgGridRowDeleteDirective_updateRowDeleteStates = function _SkyAgGridRowDeleteDirective_updateRowDeleteStates() {
2409
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteConfigs, "f").forEach((config) => {
2410
+ if (!this.agGrid?.api.getRowNode(config.id)) {
2411
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_destroyRowDelete).call(this, config.id);
2412
+ }
2413
+ else {
2414
+ // We must reaffix things when the data changes because the rows rerender and the previous element that the delete was affixed
2415
+ // to is destroyed.
2416
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_instances, "m", _SkyAgGridRowDeleteDirective_affixToRow).call(this, __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_rowDeleteContents, "f")[config.id].affixer, config.id);
2417
+ }
2418
+ });
2419
+ __classPrivateFieldGet(this, _SkyAgGridRowDeleteDirective_changeDetector, "f").markForCheck();
2420
+ };
2348
2421
  SkyAgGridRowDeleteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridRowDeleteDirective, deps: [{ token: i1.SkyAffixService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.SkyOverlayService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2349
2422
  SkyAgGridRowDeleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: SkyAgGridRowDeleteDirective, selector: "[skyAgGridRowDelete]", inputs: { rowDeleteIds: "rowDeleteIds" }, outputs: { rowDeleteCancel: "rowDeleteCancel", rowDeleteConfirm: "rowDeleteConfirm", rowDeleteIdsChange: "rowDeleteIdsChange" }, queries: [{ propertyName: "agGrid", first: true, predicate: AgGridAngular, descendants: true }], ngImport: i0 });
2350
2423
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: SkyAgGridRowDeleteDirective, decorators: [{
@@ -2742,5 +2815,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2742
2815
  * Generated bundle index. Do not edit.
2743
2816
  */
2744
2817
 
2745
- export { SkyAgGridCellEditorInitialAction, SkyAgGridCellEditorUtils, SkyAgGridHeaderGroupInfo, SkyAgGridHeaderInfo, SkyAgGridModule, SkyAgGridService, SkyCellClass, SkyCellType, SkyHeaderClass, SkyAgGridCellEditorAutocompleteComponent as λ1, SkyAgGridCellRendererValidatorTooltipComponent as λ10, SkyAgGridCellValidatorTooltipComponent as λ11, SkyAgGridWrapperComponent as λ12, SkyAgGridRowDeleteDirective as λ13, SkyAgGridDataManagerAdapterDirective as λ14, SkyAgGridCellEditorLookupComponent as λ15, SkyAgGridCellRendererLookupComponent as λ16, SkyAgGridHeaderComponent as λ17, SkyAgGridHeaderGroupComponent as λ18, SkyAgGridCellEditorTextComponent as λ2, SkyAgGridCellEditorCurrencyComponent as λ3, SkyAgGridCellEditorNumberComponent as λ4, SkyAgGridCellEditorDatepickerComponent as λ5, SkyAgGridRowDeleteComponent as λ6, SkyAgGridCellRendererRowSelectorComponent as λ7, SkyAgGridCellRendererCurrencyValidatorComponent as λ8, SkyAgGridCellRendererCurrencyComponent as λ9 };
2818
+ export { SkyAgGridCellEditorInitialAction, SkyAgGridCellEditorUtils, SkyAgGridHeaderGroupInfo, SkyAgGridHeaderInfo, SkyAgGridModule, SkyAgGridService, SkyCellType, SkyHeaderClass, SkyAgGridCellEditorAutocompleteComponent as λ1, SkyAgGridCellRendererValidatorTooltipComponent as λ10, SkyAgGridCellValidatorTooltipComponent as λ11, SkyAgGridWrapperComponent as λ12, SkyAgGridRowDeleteDirective as λ13, SkyAgGridDataManagerAdapterDirective as λ14, SkyAgGridCellEditorLookupComponent as λ15, SkyAgGridCellRendererLookupComponent as λ16, SkyAgGridHeaderComponent as λ17, SkyAgGridHeaderGroupComponent as λ18, SkyAgGridCellEditorTextComponent as λ2, SkyAgGridCellEditorCurrencyComponent as λ3, SkyAgGridCellEditorNumberComponent as λ4, SkyAgGridCellEditorDatepickerComponent as λ5, SkyAgGridRowDeleteComponent as λ6, SkyAgGridCellRendererRowSelectorComponent as λ7, SkyAgGridCellRendererCurrencyValidatorComponent as λ8, SkyAgGridCellRendererCurrencyComponent as λ9 };
2746
2819
  //# sourceMappingURL=skyux-ag-grid.mjs.map