@skyux/ag-grid 5.5.0 → 5.6.0
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.
- package/bundles/skyux-ag-grid.umd.js +1671 -1671
- package/documentation.json +14 -14
- package/esm2015/lib/modules/ag-grid/ag-grid-adapter.service.js +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-adapter.service.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.js +4 -4
- package/esm2015/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-row-delete.directive.js +5 -5
- package/esm2015/lib/modules/ag-grid/ag-grid-row-delete.directive.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-wrapper.component.js +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-wrapper.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.module.js +8 -8
- package/esm2015/lib/modules/ag-grid/ag-grid.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js +7 -7
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.module.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency.module.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-lookup/cell-renderer-lookup.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-lookup/cell-renderer-lookup.module.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-lookup/cell-renderer-lookup.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.component.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-validator-tooltip/cell-renderer-validator-tooltip.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-validator-tooltip/cell-renderer-validator-tooltip.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-validator/ag-grid-cell-validator-tooltip.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-validator/ag-grid-cell-validator.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-editor-lookup-params.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-renderer-lookup-params.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-renderer-validator-params.js.map +1 -1
- package/esm2015/lib/modules/shared/ag-grid-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/ag-grid-resources.module.js.map +1 -1
- package/fesm2015/skyux-ag-grid.js +1147 -1147
- package/fesm2015/skyux-ag-grid.js.map +1 -1
- package/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.d.ts +1 -1
- package/lib/modules/ag-grid/ag-grid.service.d.ts +2 -2
- package/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.d.ts +1 -1
- package/package.json +10 -10
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import * as i3
|
|
1
|
+
import * as i3 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Component, ChangeDetectionStrategy, ContentChild,
|
|
4
|
+
import { Injectable, Component, ChangeDetectionStrategy, ContentChild, Directive, Input, ContentChildren, TemplateRef, ViewChildren, ViewChild, EventEmitter, Output, ElementRef, NgModule, ViewEncapsulation, Optional } from '@angular/core';
|
|
5
5
|
import * as i1 from '@skyux/core';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import * as i1$6 from '@skyux/data-manager';
|
|
6
|
+
import { SkyAffixAutoFitContext, SkyNumericModule, SkyViewkeeperModule } from '@skyux/core';
|
|
7
|
+
import * as i1$1 from '@skyux/data-manager';
|
|
9
8
|
import { SkyDataManagerModule } from '@skyux/data-manager';
|
|
10
|
-
import * as i1$
|
|
9
|
+
import * as i1$2 from '@skyux/layout';
|
|
11
10
|
import { SkyInlineDeleteModule } from '@skyux/layout';
|
|
12
|
-
import
|
|
11
|
+
import { AgGridAngular, AgGridModule } from 'ag-grid-angular';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import { takeUntil, filter } from 'rxjs/operators';
|
|
14
|
+
import * as i1$3 from '@skyux/lookup';
|
|
13
15
|
import { SkyAutocompleteModule, SkyLookupModule } from '@skyux/lookup';
|
|
14
|
-
import * as i1$
|
|
16
|
+
import * as i1$4 from '@angular/forms';
|
|
15
17
|
import { FormsModule, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
16
|
-
import * as i3 from '@skyux/i18n';
|
|
18
|
+
import * as i3$1 from '@skyux/i18n';
|
|
17
19
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
18
|
-
import * as
|
|
20
|
+
import * as i2 from '@skyux/autonumeric';
|
|
21
|
+
import { SkyAutonumericModule } from '@skyux/autonumeric';
|
|
22
|
+
import * as i1$5 from '@skyux/theme';
|
|
19
23
|
import { PopupComponent, Events, RowNode } from 'ag-grid-community';
|
|
20
|
-
import * as i2 from '@skyux/datetime';
|
|
24
|
+
import * as i2$1 from '@skyux/datetime';
|
|
21
25
|
import { SkyDatepickerModule } from '@skyux/datetime';
|
|
22
|
-
import * as i1$
|
|
26
|
+
import * as i1$6 from '@skyux/forms';
|
|
23
27
|
import { SkyInputBoxModule, SkyCheckboxModule } from '@skyux/forms';
|
|
24
|
-
import * as i2$
|
|
28
|
+
import * as i2$2 from '@skyux/popovers';
|
|
25
29
|
import { SkyPopoverMessageType, SkyPopoverModule } from '@skyux/popovers';
|
|
26
|
-
import
|
|
27
|
-
import * as i1$5 from '@skyux/indicators';
|
|
30
|
+
import * as i1$7 from '@skyux/indicators';
|
|
28
31
|
import { SkyStatusIndicatorModule } from '@skyux/indicators';
|
|
29
|
-
import { takeUntil, filter } from 'rxjs/operators';
|
|
30
|
-
import * as i2$2 from '@skyux/autonumeric';
|
|
31
|
-
import { SkyAutonumericModule } from '@skyux/autonumeric';
|
|
32
32
|
|
|
33
33
|
class SkyAgGridAdapterService {
|
|
34
34
|
constructor(skyAdapterService) {
|
|
@@ -66,7 +66,7 @@ class SkyAgGridAdapterService {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
focusOnFocusableChildren(element) {
|
|
69
|
-
|
|
69
|
+
const focusableChildren = this.skyAdapterService.getFocusableChildren(element);
|
|
70
70
|
if (focusableChildren.length) {
|
|
71
71
|
focusableChildren[0].focus();
|
|
72
72
|
}
|
|
@@ -174,1338 +174,1338 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
174
174
|
/**
|
|
175
175
|
* @internal
|
|
176
176
|
*/
|
|
177
|
-
class
|
|
178
|
-
constructor() {
|
|
179
|
-
this.
|
|
177
|
+
class SkyAgGridDataManagerAdapterDirective {
|
|
178
|
+
constructor(changeDetector, dataManagerSvc) {
|
|
179
|
+
this.changeDetector = changeDetector;
|
|
180
|
+
this.dataManagerSvc = dataManagerSvc;
|
|
181
|
+
this.ngUnsubscribe = new Subject();
|
|
180
182
|
}
|
|
181
|
-
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
184
|
-
this.
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
183
|
+
ngAfterContentInit() {
|
|
184
|
+
this.dataManagerSvc.setViewkeeperClasses(this.viewId, ['.ag-header']);
|
|
185
|
+
this.viewConfig = this.dataManagerSvc.getViewById(this.viewId);
|
|
186
|
+
this.checkForAgGrid();
|
|
187
|
+
this.checkForSkyAgGridWrapper();
|
|
188
|
+
this.agGridList.changes
|
|
189
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
190
|
+
.subscribe(() => this.checkForAgGrid());
|
|
191
|
+
this.skyAgGridWrapperList.changes
|
|
192
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
193
|
+
.subscribe(() => this.checkForSkyAgGridWrapper());
|
|
187
194
|
}
|
|
188
|
-
|
|
189
|
-
this.
|
|
195
|
+
ngOnDestroy() {
|
|
196
|
+
this.ngUnsubscribe.next();
|
|
197
|
+
this.ngUnsubscribe.complete();
|
|
190
198
|
}
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
checkForAgGrid() {
|
|
200
|
+
const agGridCount = this.agGridList.length;
|
|
201
|
+
/* istanbul ignore else */
|
|
202
|
+
if (agGridCount === 0) {
|
|
203
|
+
this.unregisterAgGrid();
|
|
204
|
+
}
|
|
205
|
+
else if (this.agGridList.first !== this.currentAgGrid) {
|
|
206
|
+
this.registerAgGrid();
|
|
207
|
+
}
|
|
208
|
+
if (agGridCount > 1) {
|
|
209
|
+
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
checkForSkyAgGridWrapper() {
|
|
213
|
+
const skyAgGridWrapperCount = this.skyAgGridWrapperList.length;
|
|
214
|
+
/* istanbul ignore else */
|
|
215
|
+
if (skyAgGridWrapperCount === 0) {
|
|
216
|
+
this.unregisterSkyAgGridWrapper();
|
|
217
|
+
}
|
|
218
|
+
else if (this.skyAgGridWrapperList.first !== this.currentSkyAgGridWrapper) {
|
|
219
|
+
this.registerSkyAgGridWrapper();
|
|
220
|
+
}
|
|
221
|
+
if (skyAgGridWrapperCount > 1) {
|
|
222
|
+
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
unregisterAgGrid() {
|
|
226
|
+
this.currentAgGrid = undefined;
|
|
227
|
+
/* istanbul ignore if */
|
|
228
|
+
if (this.dataStateSub) {
|
|
229
|
+
this.dataStateSub.unsubscribe();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
unregisterSkyAgGridWrapper() {
|
|
233
|
+
this.currentSkyAgGridWrapper = undefined;
|
|
234
|
+
}
|
|
235
|
+
registerSkyAgGridWrapper() {
|
|
236
|
+
this.unregisterSkyAgGridWrapper();
|
|
237
|
+
this.currentSkyAgGridWrapper = this.skyAgGridWrapperList.first;
|
|
238
|
+
setTimeout(() => {
|
|
239
|
+
if (this.currentSkyAgGridWrapper) {
|
|
240
|
+
this.currentSkyAgGridWrapper.viewkeeperClasses = [];
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
registerAgGrid() {
|
|
245
|
+
this.unregisterAgGrid();
|
|
246
|
+
const agGrid = this.agGridList.first;
|
|
247
|
+
this.currentAgGrid = agGrid;
|
|
248
|
+
agGrid.gridReady.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
|
|
249
|
+
this.viewConfig.onSelectAllClick = this.selectAll.bind(this);
|
|
250
|
+
this.viewConfig.onClearAllClick = this.clearAll.bind(this);
|
|
251
|
+
this.dataManagerSvc.updateViewConfig(this.viewConfig);
|
|
252
|
+
this.dataStateSub = this.dataManagerSvc
|
|
253
|
+
.getDataStateUpdates(this.viewConfig.id)
|
|
254
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
255
|
+
.subscribe((dataState) => {
|
|
256
|
+
this.currentDataState = dataState;
|
|
257
|
+
this.displayColumns(dataState);
|
|
258
|
+
});
|
|
259
|
+
agGrid.api.sizeColumnsToFit();
|
|
260
|
+
});
|
|
261
|
+
agGrid.columnMoved
|
|
262
|
+
.pipe(takeUntil(this.ngUnsubscribe), filter((event) => ![
|
|
263
|
+
'gridInitializing',
|
|
264
|
+
'uiColumnResized',
|
|
265
|
+
'uiColumnDragged',
|
|
266
|
+
'api',
|
|
267
|
+
].includes(event.source)))
|
|
268
|
+
.subscribe((value) => {
|
|
269
|
+
this.updateColumnsInCurrentDataState(value.columnApi);
|
|
270
|
+
});
|
|
271
|
+
let currentColumns;
|
|
272
|
+
agGrid.dragStarted
|
|
273
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
274
|
+
.subscribe((value) => {
|
|
275
|
+
currentColumns = this.getColumnOrder(value.columnApi);
|
|
276
|
+
});
|
|
277
|
+
agGrid.dragStopped
|
|
278
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
279
|
+
.subscribe((value) => {
|
|
280
|
+
const newColumns = this.getColumnOrder(value.columnApi);
|
|
281
|
+
const hasChanged = currentColumns.findIndex((colId, i) => colId !== newColumns[i]);
|
|
282
|
+
if (hasChanged > -1) {
|
|
283
|
+
this.updateColumnsInCurrentDataState(value.columnApi);
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
agGrid.rowSelected
|
|
287
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
288
|
+
.subscribe((event) => {
|
|
289
|
+
const row = event.node;
|
|
290
|
+
const selectedIds = this.currentDataState.selectedIds || [];
|
|
291
|
+
const rowIndex = selectedIds.indexOf(row.data.id);
|
|
292
|
+
if (row.isSelected() && rowIndex === -1) {
|
|
293
|
+
selectedIds.push(row.data.id);
|
|
294
|
+
}
|
|
295
|
+
else if (!row.isSelected() && rowIndex !== -1) {
|
|
296
|
+
selectedIds.splice(rowIndex, 1);
|
|
297
|
+
}
|
|
298
|
+
this.currentDataState.selectedIds = selectedIds;
|
|
299
|
+
this.dataManagerSvc.updateDataState(this.currentDataState, this.viewConfig.id);
|
|
300
|
+
this.changeDetector.markForCheck();
|
|
301
|
+
});
|
|
302
|
+
agGrid.sortChanged.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
|
|
303
|
+
const gridColumnStates = agGrid.columnApi.getColumnState();
|
|
304
|
+
let sortOption;
|
|
305
|
+
/* istanbul ignore else */
|
|
306
|
+
if (gridColumnStates.length) {
|
|
307
|
+
const activeSortColumnState = gridColumnStates.find((aGridColumnState) => aGridColumnState.sortIndex === 0);
|
|
308
|
+
const dataManagerConfig = this.dataManagerSvc.getCurrentDataManagerConfig();
|
|
309
|
+
/* istanbul ignore else */
|
|
310
|
+
if (dataManagerConfig.sortOptions && activeSortColumnState) {
|
|
311
|
+
sortOption = dataManagerConfig.sortOptions.find((option) => {
|
|
312
|
+
return (option.propertyName === activeSortColumnState.colId &&
|
|
313
|
+
option.descending === (activeSortColumnState.sort === 'desc'));
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
sortOption = undefined;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
this.currentDataState.activeSortOption = sortOption;
|
|
321
|
+
this.dataManagerSvc.updateDataState(this.currentDataState, this.viewConfig.id);
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
updateColumnsInCurrentDataState(columnApi) {
|
|
325
|
+
const columnOrder = this.getColumnOrder(columnApi);
|
|
326
|
+
const viewState = this.currentDataState.getViewStateById(this.viewConfig.id);
|
|
327
|
+
viewState.displayedColumnIds = columnOrder;
|
|
328
|
+
this.dataManagerSvc.updateDataState(this.currentDataState.addOrUpdateView(this.viewConfig.id, viewState), this.viewConfig.id);
|
|
329
|
+
}
|
|
330
|
+
getColumnOrder(columnApi) {
|
|
331
|
+
return columnApi
|
|
332
|
+
.getAllDisplayedVirtualColumns()
|
|
333
|
+
.map((col) => col.getColDef().colId);
|
|
334
|
+
}
|
|
335
|
+
displayColumns(dataState) {
|
|
336
|
+
const agGrid = this.currentAgGrid;
|
|
337
|
+
const viewState = dataState.getViewStateById(this.viewConfig.id);
|
|
338
|
+
let displayedColumnIds = [];
|
|
339
|
+
/*istanbul ignore else*/
|
|
340
|
+
if (viewState.displayedColumnIds) {
|
|
341
|
+
displayedColumnIds = viewState.displayedColumnIds;
|
|
342
|
+
}
|
|
343
|
+
const columns = agGrid.columnApi.getAllColumns();
|
|
344
|
+
for (const column of columns) {
|
|
345
|
+
const colId = column.getColId();
|
|
346
|
+
const colIndex = displayedColumnIds.indexOf(colId);
|
|
347
|
+
agGrid.columnApi.setColumnVisible(colId, colIndex !== -1);
|
|
348
|
+
agGrid.columnApi.moveColumn(colId, colIndex);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
selectAll() {
|
|
352
|
+
const agGrid = this.agGridList.first;
|
|
353
|
+
agGrid.api.selectAll();
|
|
354
|
+
}
|
|
355
|
+
clearAll() {
|
|
356
|
+
const agGrid = this.agGridList.first;
|
|
357
|
+
agGrid.api.deselectAll();
|
|
193
358
|
}
|
|
194
359
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
198
|
-
type:
|
|
360
|
+
SkyAgGridDataManagerAdapterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridDataManagerAdapterDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.SkyDataManagerService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
361
|
+
SkyAgGridDataManagerAdapterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridDataManagerAdapterDirective, selector: "[skyAgGridDataManagerAdapter]", inputs: { viewId: "viewId" }, queries: [{ propertyName: "agGridList", predicate: AgGridAngular, descendants: true }, { propertyName: "skyAgGridWrapperList", predicate: SkyAgGridWrapperComponent, descendants: true }], ngImport: i0 });
|
|
362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridDataManagerAdapterDirective, decorators: [{
|
|
363
|
+
type: Directive,
|
|
199
364
|
args: [{
|
|
200
|
-
selector: '
|
|
201
|
-
templateUrl: './cell-editor-autocomplete.component.html',
|
|
202
|
-
styleUrls: ['./cell-editor-autocomplete.component.scss'],
|
|
203
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
365
|
+
selector: '[skyAgGridDataManagerAdapter]',
|
|
204
366
|
}]
|
|
205
|
-
}], propDecorators: {
|
|
206
|
-
type:
|
|
207
|
-
|
|
367
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.SkyDataManagerService }]; }, propDecorators: { viewId: [{
|
|
368
|
+
type: Input
|
|
369
|
+
}], agGridList: [{
|
|
370
|
+
type: ContentChildren,
|
|
371
|
+
args: [AgGridAngular, { descendants: true }]
|
|
372
|
+
}], skyAgGridWrapperList: [{
|
|
373
|
+
type: ContentChildren,
|
|
374
|
+
args: [SkyAgGridWrapperComponent, { descendants: true }]
|
|
208
375
|
}] } });
|
|
209
376
|
|
|
210
377
|
/**
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/ag-grid' schematic.
|
|
214
|
-
* To update this file, simply rerun the command.
|
|
378
|
+
* Component for rendering the inline delete template in the overlay.
|
|
379
|
+
* @internal
|
|
215
380
|
*/
|
|
216
|
-
|
|
217
|
-
'EN-US': {
|
|
218
|
-
sky_ag_grid_row_selector_aria_label: {
|
|
219
|
-
message: 'Row selector for row {0}',
|
|
220
|
-
},
|
|
221
|
-
sky_ag_grid_cell_editor_number_aria_label: {
|
|
222
|
-
message: 'Editable number {0} for row {1}',
|
|
223
|
-
},
|
|
224
|
-
sky_ag_grid_cell_editor_text_aria_label: {
|
|
225
|
-
message: 'Editable text {0} for row {1}',
|
|
226
|
-
},
|
|
227
|
-
sky_ag_grid_cell_editor_autocomplete_aria_label: {
|
|
228
|
-
message: 'Editable autocomplete {0} for row {1}',
|
|
229
|
-
},
|
|
230
|
-
sky_ag_grid_cell_renderer_currency_aria_label: {
|
|
231
|
-
message: 'Editable currency {0} for row {1}',
|
|
232
|
-
},
|
|
233
|
-
sky_ag_grid_cell_renderer_number_validator_message: {
|
|
234
|
-
message: 'Please enter a valid number',
|
|
235
|
-
},
|
|
236
|
-
sky_ag_grid_cell_renderer_currency_validator_message: {
|
|
237
|
-
message: 'Please enter a valid currency',
|
|
238
|
-
},
|
|
239
|
-
skyux_lookup_tokens_summary: { message: '{0} items selected' },
|
|
240
|
-
},
|
|
241
|
-
};
|
|
242
|
-
class AgGridResourcesProvider {
|
|
243
|
-
getString(localeInfo, name) {
|
|
244
|
-
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
245
|
-
}
|
|
381
|
+
class SkyAgGridRowDeleteComponent {
|
|
246
382
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
SkyAgGridCellEditorAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
278
|
-
SkyAgGridCellEditorAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, declarations: [SkyAgGridCellEditorAutocompleteComponent], imports: [FormsModule, AgGridResourcesModule, SkyAutocompleteModule], exports: [SkyAgGridCellEditorAutocompleteComponent] });
|
|
279
|
-
SkyAgGridCellEditorAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, imports: [[FormsModule, AgGridResourcesModule, SkyAutocompleteModule]] });
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, decorators: [{
|
|
281
|
-
type: NgModule,
|
|
383
|
+
SkyAgGridRowDeleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridRowDeleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
384
|
+
SkyAgGridRowDeleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridRowDeleteComponent, selector: "ng-component", viewQueries: [{ propertyName: "inlineDeleteTemplateRef", first: true, predicate: ["inlineDeleteTemplateRef"], descendants: true, read: TemplateRef }, { propertyName: "inlineDeleteRefs", predicate: ["inlineDeleteRef"], descendants: true }], ngImport: i0, template: `
|
|
385
|
+
<ng-template
|
|
386
|
+
let-row
|
|
387
|
+
let-tableWidth="tableWidth()"
|
|
388
|
+
let-getRowDeleteItem="getRowDeleteItem"
|
|
389
|
+
let-cancelRowDelete="cancelRowDelete"
|
|
390
|
+
let-confirmRowDelete="confirmRowDelete"
|
|
391
|
+
#inlineDeleteTemplateRef
|
|
392
|
+
>
|
|
393
|
+
<div
|
|
394
|
+
class="sky-ag-grid-row-delete"
|
|
395
|
+
[id]="'row-delete-ref-' + row.id"
|
|
396
|
+
[ngStyle]="{
|
|
397
|
+
height: row.rowHeight + 'px',
|
|
398
|
+
position: 'fixed',
|
|
399
|
+
width: tableWidth + 'px'
|
|
400
|
+
}"
|
|
401
|
+
#inlineDeleteRef
|
|
402
|
+
>
|
|
403
|
+
<sky-inline-delete
|
|
404
|
+
[pending]="getRowDeleteItem(row).pending"
|
|
405
|
+
(cancelTriggered)="cancelRowDelete(row)"
|
|
406
|
+
(deleteTriggered)="confirmRowDelete(row)"
|
|
407
|
+
></sky-inline-delete>
|
|
408
|
+
</div>
|
|
409
|
+
</ng-template>
|
|
410
|
+
`, isInline: true, components: [{ type: i1$2.λ8, selector: "sky-inline-delete", inputs: ["pending"], outputs: ["cancelTriggered", "deleteTriggered"] }], directives: [{ type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridRowDeleteComponent, decorators: [{
|
|
412
|
+
type: Component,
|
|
282
413
|
args: [{
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
414
|
+
template: `
|
|
415
|
+
<ng-template
|
|
416
|
+
let-row
|
|
417
|
+
let-tableWidth="tableWidth()"
|
|
418
|
+
let-getRowDeleteItem="getRowDeleteItem"
|
|
419
|
+
let-cancelRowDelete="cancelRowDelete"
|
|
420
|
+
let-confirmRowDelete="confirmRowDelete"
|
|
421
|
+
#inlineDeleteTemplateRef
|
|
422
|
+
>
|
|
423
|
+
<div
|
|
424
|
+
class="sky-ag-grid-row-delete"
|
|
425
|
+
[id]="'row-delete-ref-' + row.id"
|
|
426
|
+
[ngStyle]="{
|
|
427
|
+
height: row.rowHeight + 'px',
|
|
428
|
+
position: 'fixed',
|
|
429
|
+
width: tableWidth + 'px'
|
|
430
|
+
}"
|
|
431
|
+
#inlineDeleteRef
|
|
432
|
+
>
|
|
433
|
+
<sky-inline-delete
|
|
434
|
+
[pending]="getRowDeleteItem(row).pending"
|
|
435
|
+
(cancelTriggered)="cancelRowDelete(row)"
|
|
436
|
+
(deleteTriggered)="confirmRowDelete(row)"
|
|
437
|
+
></sky-inline-delete>
|
|
438
|
+
</div>
|
|
439
|
+
</ng-template>
|
|
440
|
+
`,
|
|
286
441
|
}]
|
|
287
|
-
}]
|
|
442
|
+
}], propDecorators: { inlineDeleteRefs: [{
|
|
443
|
+
type: ViewChildren,
|
|
444
|
+
args: ['inlineDeleteRef']
|
|
445
|
+
}], inlineDeleteTemplateRef: [{
|
|
446
|
+
type: ViewChild,
|
|
447
|
+
args: ['inlineDeleteTemplateRef', { read: TemplateRef }]
|
|
448
|
+
}] } });
|
|
288
449
|
|
|
289
450
|
/**
|
|
290
451
|
* @internal
|
|
291
452
|
*/
|
|
292
|
-
class
|
|
293
|
-
constructor(
|
|
294
|
-
|
|
295
|
-
this.
|
|
296
|
-
this.
|
|
453
|
+
class SkyAgGridRowDeleteDirective {
|
|
454
|
+
constructor(affixService, changeDetector, elementRef, resolver, overlayService, viewContainerRef) {
|
|
455
|
+
this.affixService = affixService;
|
|
456
|
+
this.changeDetector = changeDetector;
|
|
457
|
+
this.elementRef = elementRef;
|
|
458
|
+
this.resolver = resolver;
|
|
459
|
+
this.overlayService = overlayService;
|
|
460
|
+
this.viewContainerRef = viewContainerRef;
|
|
461
|
+
/**
|
|
462
|
+
* Emits a `SkyAgGridRowDeleteCancelArgs` object when a row's inline delete is cancelled.
|
|
463
|
+
*/
|
|
464
|
+
this.rowDeleteCancel = new EventEmitter();
|
|
465
|
+
/**
|
|
466
|
+
* Emits a `SkyAgGridRowDeleteConfirmArgs` object when a row's inline delete is confirmed.
|
|
467
|
+
*/
|
|
468
|
+
this.rowDeleteConfirm = new EventEmitter();
|
|
469
|
+
/**
|
|
470
|
+
* Emits when the list of ids of the data in the rows where inline deletes are shown changes.
|
|
471
|
+
*/
|
|
472
|
+
this.rowDeleteIdsChange = new EventEmitter();
|
|
473
|
+
this.rowDeleteConfigs = [];
|
|
474
|
+
this.ngUnsubscribe = new Subject();
|
|
475
|
+
this.rowDeleteContents = {};
|
|
297
476
|
}
|
|
298
477
|
/**
|
|
299
|
-
*
|
|
300
|
-
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
478
|
+
* Specifies the ids of the data in the rows on which inline delete's should be shown.
|
|
301
479
|
*/
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
this.params.node && this.params.node.rowHeight;
|
|
480
|
+
set rowDeleteIds(value) {
|
|
481
|
+
this._rowDeleteIds = value;
|
|
482
|
+
if (!value) {
|
|
483
|
+
for (const config of this.rowDeleteConfigs) {
|
|
484
|
+
this.destroyRowDelete(config.id);
|
|
485
|
+
}
|
|
486
|
+
this.changeDetector.markForCheck();
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
for (const id of value) {
|
|
490
|
+
const existingConfig = this.rowDeleteConfigs.find((config) => config.id === id);
|
|
491
|
+
if (existingConfig) {
|
|
492
|
+
existingConfig.pending = false;
|
|
316
493
|
}
|
|
317
494
|
else {
|
|
318
|
-
this.
|
|
319
|
-
|
|
320
|
-
|
|
495
|
+
this.rowDeleteConfigs.push({
|
|
496
|
+
id: id,
|
|
497
|
+
pending: false,
|
|
498
|
+
});
|
|
499
|
+
const overlay = this.overlayService.create({
|
|
500
|
+
enableScroll: true,
|
|
501
|
+
showBackdrop: false,
|
|
502
|
+
closeOnNavigation: true,
|
|
503
|
+
enableClose: false,
|
|
504
|
+
enablePointerEvents: true,
|
|
505
|
+
});
|
|
506
|
+
overlay.attachTemplate(this.rowDeleteComponent.inlineDeleteTemplateRef, {
|
|
507
|
+
$implicit: this.agGrid.api.getRowNode(id),
|
|
508
|
+
tableWidth: () => {
|
|
509
|
+
return this.tableWidth;
|
|
510
|
+
},
|
|
511
|
+
getRowDeleteItem: (row) => this.getRowDeleteItem(row),
|
|
512
|
+
cancelRowDelete: (row) => this.cancelRowDelete(row),
|
|
513
|
+
confirmRowDelete: (row) => this.confirmRowDelete(row),
|
|
514
|
+
});
|
|
515
|
+
/**
|
|
516
|
+
* We are manually setting the z-index here because overlays will always be on top of
|
|
517
|
+
* the omnibar. This manual setting is 2 less than the omnibar's z-index of 1000 and one less than
|
|
518
|
+
* the header row's viewkeeper which is 999. We discussed changing the overlay service to allow for this
|
|
519
|
+
* but decided against that change at this time due to its niche nature.
|
|
520
|
+
*/
|
|
521
|
+
overlay.componentRef.instance.zIndex = '998';
|
|
522
|
+
setTimeout(() => {
|
|
523
|
+
const inlineDeleteRef = this.rowDeleteComponent.inlineDeleteRefs
|
|
524
|
+
.toArray()
|
|
525
|
+
.find((elRef) => {
|
|
526
|
+
return elRef.nativeElement.id === 'row-delete-ref-' + id;
|
|
527
|
+
});
|
|
528
|
+
const affixer = this.affixService.createAffixer(inlineDeleteRef);
|
|
529
|
+
this.affixToRow(affixer, id);
|
|
530
|
+
this.rowDeleteContents[id] = {
|
|
531
|
+
affixer: affixer,
|
|
532
|
+
overlay: overlay,
|
|
533
|
+
};
|
|
534
|
+
});
|
|
321
535
|
}
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* 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.
|
|
326
|
-
*/
|
|
327
|
-
afterGuiAttached() {
|
|
328
|
-
this.focusOnDatepickerInput();
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
332
|
-
*/
|
|
333
|
-
getValue() {
|
|
334
|
-
this.datepickerInput.nativeElement.blur();
|
|
335
|
-
return this.currentDate;
|
|
336
|
-
}
|
|
337
|
-
focusOnDatepickerInput() {
|
|
338
|
-
this.datepickerInput.nativeElement.focus();
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
SkyAgGridCellEditorDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerComponent, deps: [{ token: i1$3.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
342
|
-
SkyAgGridCellEditorDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 [style.width.px]=\"columnWidthWithoutBorders\"\n>\n <sky-datepicker\n data-sky-id=\"cell-datepicker\"\n pickerClass=\"ag-custom-component-popup\"\n >\n <input\n skyDatepickerInput\n [disabled]=\"skyComponentProperties.disabled\"\n [minDate]=\"skyComponentProperties.minDate\"\n [maxDate]=\"skyComponentProperties.maxDate\"\n [dateFormat]=\"skyComponentProperties.dateFormat\"\n [startingDay]=\"skyComponentProperties.startingDay\"\n [skyDatepickerNoValidate]=\"skyComponentProperties.skyDatepickerNoValidate\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"currentDate\"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n", 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"], components: [{ type: i2.λ2, selector: "sky-datepicker", inputs: ["pickerClass"], outputs: ["calendarDateRangeChange"] }], directives: [{ type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.λ3, selector: "[skyDatepickerInput]", inputs: ["dateFormat", "disabled", "maxDate", "minDate", "skyDatepickerInput", "skyDatepickerNoValidate", "startingDay", "strict"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerComponent, decorators: [{
|
|
344
|
-
type: Component,
|
|
345
|
-
args: [{
|
|
346
|
-
selector: 'sky-ag-grid-cell-editor-datepicker',
|
|
347
|
-
templateUrl: './cell-editor-datepicker.component.html',
|
|
348
|
-
styleUrls: ['./cell-editor-datepicker.component.scss'],
|
|
349
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
350
|
-
encapsulation: ViewEncapsulation.None,
|
|
351
|
-
}]
|
|
352
|
-
}], ctorParameters: function () { return [{ type: i1$3.SkyThemeService, decorators: [{
|
|
353
|
-
type: Optional
|
|
354
|
-
}] }]; }, propDecorators: { datepickerInput: [{
|
|
355
|
-
type: ViewChild,
|
|
356
|
-
args: ['skyCellEditorDatepickerInput', { read: ElementRef }]
|
|
357
|
-
}] } });
|
|
358
|
-
|
|
359
|
-
class SkyAgGridCellEditorDatepickerModule {
|
|
360
|
-
}
|
|
361
|
-
SkyAgGridCellEditorDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
362
|
-
SkyAgGridCellEditorDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, declarations: [SkyAgGridCellEditorDatepickerComponent], imports: [SkyDatepickerModule, FormsModule], exports: [SkyAgGridCellEditorDatepickerComponent] });
|
|
363
|
-
SkyAgGridCellEditorDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, imports: [[SkyDatepickerModule, FormsModule]] });
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, decorators: [{
|
|
365
|
-
type: NgModule,
|
|
366
|
-
args: [{
|
|
367
|
-
imports: [SkyDatepickerModule, FormsModule],
|
|
368
|
-
declarations: [SkyAgGridCellEditorDatepickerComponent],
|
|
369
|
-
exports: [SkyAgGridCellEditorDatepickerComponent],
|
|
370
|
-
}]
|
|
371
|
-
}] });
|
|
372
|
-
|
|
373
|
-
function applySkyLookupPropertiesDefaults(skyLookupProperties) {
|
|
374
|
-
return {
|
|
375
|
-
addClick: skyLookupProperties.addClick || undefined,
|
|
376
|
-
ariaLabel: skyLookupProperties.ariaLabel || '',
|
|
377
|
-
autocompleteAttribute: skyLookupProperties.autocompleteAttribute || 'off',
|
|
378
|
-
data: skyLookupProperties.data || [],
|
|
379
|
-
debounceTime: skyLookupProperties.debounceTime || 0,
|
|
380
|
-
descriptorProperty: skyLookupProperties.descriptorProperty || 'name',
|
|
381
|
-
disabled: skyLookupProperties.disabled || false,
|
|
382
|
-
enableShowMore: skyLookupProperties.enableShowMore || false,
|
|
383
|
-
idProperty: skyLookupProperties.idProperty || undefined,
|
|
384
|
-
placeholderText: skyLookupProperties.placeholderText || '',
|
|
385
|
-
propertiesToSearch: skyLookupProperties.propertiesToSearch || undefined,
|
|
386
|
-
search: skyLookupProperties.search || undefined,
|
|
387
|
-
searchAsync: skyLookupProperties.searchAsync || undefined,
|
|
388
|
-
searchFilters: skyLookupProperties.searchFilters || [],
|
|
389
|
-
searchResultsLimit: skyLookupProperties.searchResultsLimit || undefined,
|
|
390
|
-
searchResultTemplate: skyLookupProperties.searchResultTemplate || undefined,
|
|
391
|
-
searchTextMinimumCharacters: skyLookupProperties.searchTextMinimumCharacters || 1,
|
|
392
|
-
selectMode: skyLookupProperties.selectMode || undefined,
|
|
393
|
-
showAddButton: skyLookupProperties.showAddButton || false,
|
|
394
|
-
showMoreConfig: skyLookupProperties.showMoreConfig || {},
|
|
395
|
-
wrapperClass: 'ag-custom-component-popup',
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
class SkyAgGridCellEditorLookupComponent {
|
|
400
|
-
constructor(changeDetector, elementRef) {
|
|
401
|
-
this.changeDetector = changeDetector;
|
|
402
|
-
this.elementRef = elementRef;
|
|
403
|
-
this.isAlive = false;
|
|
404
|
-
this.lookupForm = new FormGroup({
|
|
405
|
-
currentSelection: new FormControl({
|
|
406
|
-
value: [],
|
|
407
|
-
disabled: false,
|
|
408
|
-
}),
|
|
409
|
-
});
|
|
410
|
-
this.useAsyncSearch = false;
|
|
411
|
-
}
|
|
412
|
-
agInit(params) {
|
|
413
|
-
this.params = params;
|
|
414
|
-
if (!Array.isArray(this.params.value)) {
|
|
415
|
-
throw new Error(`Lookup value must be an array`);
|
|
416
536
|
}
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
537
|
+
for (const config of this.rowDeleteConfigs) {
|
|
538
|
+
if (value.indexOf(config.id) < 0) {
|
|
539
|
+
this.destroyRowDelete(config.id);
|
|
540
|
+
}
|
|
421
541
|
}
|
|
422
|
-
this.skyComponentProperties = this.updateComponentProperties(this.params);
|
|
423
|
-
this.useAsyncSearch =
|
|
424
|
-
typeof this.skyComponentProperties.searchAsync === 'function';
|
|
425
|
-
this.isAlive = true;
|
|
426
542
|
this.changeDetector.markForCheck();
|
|
427
543
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
this.isAlive = false;
|
|
431
|
-
this.changeDetector.detectChanges();
|
|
432
|
-
return false;
|
|
433
|
-
}
|
|
434
|
-
getGui() {
|
|
435
|
-
return this.elementRef.nativeElement;
|
|
436
|
-
}
|
|
437
|
-
getValue() {
|
|
438
|
-
return this.lookupForm.get('currentSelection').value;
|
|
544
|
+
get rowDeleteIds() {
|
|
545
|
+
return this._rowDeleteIds;
|
|
439
546
|
}
|
|
440
|
-
|
|
441
|
-
return
|
|
547
|
+
get tableWidth() {
|
|
548
|
+
return this.elementRef.nativeElement.querySelectorAll('.sky-ag-grid')[0]
|
|
549
|
+
.offsetWidth;
|
|
442
550
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
551
|
+
ngAfterContentInit() {
|
|
552
|
+
const factory = this.resolver.resolveComponentFactory(SkyAgGridRowDeleteComponent);
|
|
553
|
+
this.rowDeleteComponent =
|
|
554
|
+
this.viewContainerRef.createComponent(factory).instance;
|
|
555
|
+
this.agGrid.rowDataChanged
|
|
556
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
557
|
+
.subscribe(() => {
|
|
558
|
+
this.updateRowDeleteStates();
|
|
559
|
+
});
|
|
560
|
+
this.agGrid.rowDataUpdated
|
|
561
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
562
|
+
.subscribe(() => {
|
|
563
|
+
this.updateRowDeleteStates();
|
|
564
|
+
});
|
|
565
|
+
this.agGrid.sortChanged
|
|
566
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
567
|
+
.subscribe(() => {
|
|
568
|
+
this.updateRowDeleteStates();
|
|
569
|
+
});
|
|
570
|
+
this.agGrid.filterChanged
|
|
571
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
572
|
+
.subscribe(() => {
|
|
573
|
+
this.updateRowDeleteStates();
|
|
574
|
+
});
|
|
575
|
+
this.agGrid.getRowNodeId = (data) => {
|
|
576
|
+
return data.id.toString();
|
|
577
|
+
};
|
|
447
578
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
579
|
+
ngOnDestroy() {
|
|
580
|
+
this.ngUnsubscribe.next();
|
|
581
|
+
this.ngUnsubscribe.complete();
|
|
582
|
+
Object.keys(this.rowDeleteContents).forEach((id) => {
|
|
583
|
+
this.destroyRowDelete(id);
|
|
584
|
+
});
|
|
451
585
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
type: Component,
|
|
457
|
-
args: [{
|
|
458
|
-
selector: 'sky-ag-grid-cell-editor-lookup',
|
|
459
|
-
templateUrl: './cell-editor-lookup.component.html',
|
|
460
|
-
styleUrls: ['./cell-editor-lookup.component.scss'],
|
|
461
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
462
|
-
}]
|
|
463
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
|
|
464
|
-
|
|
465
|
-
class SkyAgGridCellEditorLookupModule {
|
|
466
|
-
}
|
|
467
|
-
SkyAgGridCellEditorLookupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
468
|
-
SkyAgGridCellEditorLookupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, declarations: [SkyAgGridCellEditorLookupComponent], imports: [CommonModule,
|
|
469
|
-
ReactiveFormsModule,
|
|
470
|
-
SkyI18nModule,
|
|
471
|
-
SkyInputBoxModule,
|
|
472
|
-
SkyLookupModule], exports: [SkyAgGridCellEditorLookupComponent] });
|
|
473
|
-
SkyAgGridCellEditorLookupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, imports: [[
|
|
474
|
-
CommonModule,
|
|
475
|
-
ReactiveFormsModule,
|
|
476
|
-
SkyI18nModule,
|
|
477
|
-
SkyInputBoxModule,
|
|
478
|
-
SkyLookupModule,
|
|
479
|
-
]] });
|
|
480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, decorators: [{
|
|
481
|
-
type: NgModule,
|
|
482
|
-
args: [{
|
|
483
|
-
declarations: [SkyAgGridCellEditorLookupComponent],
|
|
484
|
-
exports: [SkyAgGridCellEditorLookupComponent],
|
|
485
|
-
imports: [
|
|
486
|
-
CommonModule,
|
|
487
|
-
ReactiveFormsModule,
|
|
488
|
-
SkyI18nModule,
|
|
489
|
-
SkyInputBoxModule,
|
|
490
|
-
SkyLookupModule,
|
|
491
|
-
],
|
|
492
|
-
}]
|
|
493
|
-
}] });
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* @internal
|
|
497
|
-
*/
|
|
498
|
-
class SkyAgGridCellEditorNumberComponent {
|
|
499
|
-
/**
|
|
500
|
-
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
501
|
-
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
502
|
-
*/
|
|
503
|
-
agInit(params) {
|
|
504
|
-
this.params = params;
|
|
505
|
-
this.value = this.params.value;
|
|
506
|
-
this.columnHeader = this.params.colDef.headerName;
|
|
507
|
-
this.rowNumber = this.params.rowIndex + 1;
|
|
508
|
-
this.columnWidth = this.params.column.getActualWidth();
|
|
509
|
-
this.rowHeightWithoutBorders =
|
|
510
|
-
this.params.node && this.params.node.rowHeight - 4;
|
|
586
|
+
cancelRowDelete(row) {
|
|
587
|
+
this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== row.id);
|
|
588
|
+
this.rowDeleteCancel.emit({ id: row.id });
|
|
589
|
+
this.destroyRowDelete(row.id);
|
|
511
590
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
afterGuiAttached() {
|
|
516
|
-
this.input.nativeElement.focus();
|
|
591
|
+
confirmRowDelete(row) {
|
|
592
|
+
this.rowDeleteConfigs.find((config) => config.id === row.id).pending = true;
|
|
593
|
+
this.rowDeleteConfirm.emit({ id: row.id });
|
|
517
594
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
595
|
+
getRowDeleteItem(row) {
|
|
596
|
+
return this.rowDeleteConfigs.find((rowDelete) => rowDelete.id === row.id);
|
|
597
|
+
}
|
|
598
|
+
affixToRow(affixer, id) {
|
|
599
|
+
let rowElement = this.elementRef.nativeElement.querySelector(`
|
|
600
|
+
[row-id="${id}"] div[aria-colindex="1"],
|
|
601
|
+
.ag-row.sky-ag-grid-row-${id} div[aria-colindex="1"]
|
|
602
|
+
`);
|
|
603
|
+
// This covers cases where AG Grid places the column index on an inner element (such as with the `enableCellTextSelection` option)
|
|
604
|
+
// This appears to have been fixed by AG Grid in version 24 and so it is not testable after that version.
|
|
605
|
+
/* istanbul ignore if */
|
|
606
|
+
if (!rowElement) {
|
|
607
|
+
const columns = this.elementRef.nativeElement.querySelectorAll('[row-id="' + id + '"] > div');
|
|
608
|
+
for (let i = 0; i < columns.length; i++) {
|
|
609
|
+
if (columns[i].querySelector('[aria-colindex="1"]')) {
|
|
610
|
+
rowElement = columns[i];
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
affixer.affixTo(rowElement, {
|
|
616
|
+
autoFitContext: SkyAffixAutoFitContext.Viewport,
|
|
617
|
+
isSticky: true,
|
|
618
|
+
placement: 'above',
|
|
619
|
+
verticalAlignment: 'top',
|
|
620
|
+
horizontalAlignment: 'left',
|
|
621
|
+
enableAutoFit: false,
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
destroyRowDelete(id) {
|
|
625
|
+
var _a;
|
|
626
|
+
const rowDeleteContents = this.rowDeleteContents[id];
|
|
627
|
+
/* sanity check */
|
|
628
|
+
/* istanbul ignore else */
|
|
629
|
+
if (rowDeleteContents) {
|
|
630
|
+
rowDeleteContents.affixer.destroy();
|
|
631
|
+
this.overlayService.close(rowDeleteContents.overlay);
|
|
632
|
+
delete this.rowDeleteContents[id];
|
|
633
|
+
this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== id);
|
|
634
|
+
this._rowDeleteIds = (_a = this.rowDeleteIds) === null || _a === void 0 ? void 0 : _a.filter((arrayId) => arrayId !== id);
|
|
635
|
+
this.rowDeleteIdsChange.emit(this._rowDeleteIds);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
updateRowDeleteStates() {
|
|
639
|
+
this.rowDeleteConfigs.forEach((config) => {
|
|
640
|
+
if (!this.agGrid.api.getRowNode(config.id)) {
|
|
641
|
+
this.destroyRowDelete(config.id);
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
// We must reaffix things when the data changes because the rows rerender and the previous element that the delete was affixed
|
|
645
|
+
// to is destroyed.
|
|
646
|
+
this.affixToRow(this.rowDeleteContents[config.id].affixer, config.id);
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
this.changeDetector.markForCheck();
|
|
523
650
|
}
|
|
524
651
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
528
|
-
type:
|
|
652
|
+
SkyAgGridRowDeleteDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridRowDeleteDirective, deps: [{ token: i1.SkyAffixService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.ComponentFactoryResolver }, { token: i1.SkyOverlayService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
653
|
+
SkyAgGridRowDeleteDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", 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 });
|
|
654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridRowDeleteDirective, decorators: [{
|
|
655
|
+
type: Directive,
|
|
529
656
|
args: [{
|
|
530
|
-
selector: '
|
|
531
|
-
templateUrl: './cell-editor-number.component.html',
|
|
532
|
-
styleUrls: ['./cell-editor-number.component.scss'],
|
|
533
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
657
|
+
selector: '[skyAgGridRowDelete]',
|
|
534
658
|
}]
|
|
535
|
-
}], propDecorators: {
|
|
536
|
-
type:
|
|
537
|
-
|
|
659
|
+
}], ctorParameters: function () { return [{ type: i1.SkyAffixService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.ComponentFactoryResolver }, { type: i1.SkyOverlayService }, { type: i0.ViewContainerRef }]; }, propDecorators: { rowDeleteIds: [{
|
|
660
|
+
type: Input
|
|
661
|
+
}], rowDeleteCancel: [{
|
|
662
|
+
type: Output
|
|
663
|
+
}], rowDeleteConfirm: [{
|
|
664
|
+
type: Output
|
|
665
|
+
}], rowDeleteIdsChange: [{
|
|
666
|
+
type: Output
|
|
667
|
+
}], agGrid: [{
|
|
668
|
+
type: ContentChild,
|
|
669
|
+
args: [AgGridAngular]
|
|
538
670
|
}] } });
|
|
539
671
|
|
|
540
|
-
class SkyAgGridCellEditorNumberModule {
|
|
541
|
-
}
|
|
542
|
-
SkyAgGridCellEditorNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
543
|
-
SkyAgGridCellEditorNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, declarations: [SkyAgGridCellEditorNumberComponent], imports: [AgGridResourcesModule, FormsModule], exports: [SkyAgGridCellEditorNumberComponent] });
|
|
544
|
-
SkyAgGridCellEditorNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, imports: [[AgGridResourcesModule, FormsModule]] });
|
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, decorators: [{
|
|
546
|
-
type: NgModule,
|
|
547
|
-
args: [{
|
|
548
|
-
imports: [AgGridResourcesModule, FormsModule],
|
|
549
|
-
declarations: [SkyAgGridCellEditorNumberComponent],
|
|
550
|
-
exports: [SkyAgGridCellEditorNumberComponent],
|
|
551
|
-
}]
|
|
552
|
-
}] });
|
|
553
|
-
|
|
554
672
|
/**
|
|
555
673
|
* @internal
|
|
556
674
|
*/
|
|
557
|
-
class
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
*/
|
|
675
|
+
class SkyAgGridCellEditorAutocompleteComponent {
|
|
676
|
+
constructor() {
|
|
677
|
+
this.skyComponentProperties = {};
|
|
678
|
+
}
|
|
562
679
|
agInit(params) {
|
|
563
680
|
this.params = params;
|
|
564
|
-
this.
|
|
565
|
-
this.columnHeader = this.params.colDef.headerName;
|
|
681
|
+
this.currentSelection = this.params.value;
|
|
682
|
+
this.columnHeader = this.params.colDef && this.params.colDef.headerName;
|
|
566
683
|
this.rowNumber = this.params.rowIndex + 1;
|
|
567
|
-
this.
|
|
568
|
-
this.rowHeightWithoutBorders =
|
|
569
|
-
this.params.node && this.params.node.rowHeight - 4;
|
|
684
|
+
this.skyComponentProperties = this.params.skyComponentProperties || {};
|
|
570
685
|
}
|
|
571
|
-
/**
|
|
572
|
-
* 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.
|
|
573
|
-
*/
|
|
574
686
|
afterGuiAttached() {
|
|
575
687
|
this.input.nativeElement.focus();
|
|
576
688
|
}
|
|
577
|
-
/**
|
|
578
|
-
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
579
|
-
*/
|
|
580
689
|
getValue() {
|
|
581
|
-
return this.
|
|
690
|
+
return this.currentSelection;
|
|
582
691
|
}
|
|
583
692
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
693
|
+
SkyAgGridCellEditorAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
694
|
+
SkyAgGridCellEditorAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorAutocompleteComponent, selector: "sky-ag-grid-cell-editor-autocomplete", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorAutocomplete"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"sky-ag-grid-cell-editor-autocomplete\">\n <sky-autocomplete\n [data]=\"skyComponentProperties.data\"\n [debounceTime]=\"skyComponentProperties.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties.descriptorProperty\"\n [propertiesToSearch]=\"skyComponentProperties.propertiesToSearch\"\n [search]=\"skyComponentProperties.search\"\n [searchFilters]=\"skyComponentProperties.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties.searchTextMinimumCharacters\n \"\n (selectionChange)=\"\n skyComponentProperties.selectionChange &&\n skyComponentProperties.selectionChange($event)\n \"\n >\n <input\n skyAutocomplete\n #skyCellEditorAutocomplete\n type=\"text\"\n [(ngModel)]=\"currentSelection\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_autocomplete_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n />\n </sky-autocomplete>\n</div>\n", styles: ["sky-autocomplete input{border:none;box-shadow:none}\n"], components: [{ type: i1$3.λ2, selector: "sky-autocomplete", inputs: ["ariaLabelledBy", "data", "debounceTime", "descriptorProperty", "enableShowMore", "messageStream", "wrapperClass", "propertiesToSearch", "search", "searchResultTemplate", "searchTextMinimumCharacters", "searchFilters", "searchResultsLimit", "showAddButton", "noResultsFoundText", "searchAsyncDisabled"], outputs: ["addClick", "showMoreClick", "selectionChange", "searchAsync"] }], directives: [{ type: i1$3.λ1, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteComponent, decorators: [{
|
|
587
696
|
type: Component,
|
|
588
697
|
args: [{
|
|
589
|
-
selector: 'sky-ag-grid-cell-editor-
|
|
590
|
-
templateUrl: './cell-editor-
|
|
591
|
-
styleUrls: ['./cell-editor-
|
|
698
|
+
selector: 'sky-ag-grid-cell-editor-autocomplete',
|
|
699
|
+
templateUrl: './cell-editor-autocomplete.component.html',
|
|
700
|
+
styleUrls: ['./cell-editor-autocomplete.component.scss'],
|
|
592
701
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
593
702
|
}]
|
|
594
703
|
}], propDecorators: { input: [{
|
|
595
704
|
type: ViewChild,
|
|
596
|
-
args: ['
|
|
705
|
+
args: ['skyCellEditorAutocomplete', { read: ElementRef }]
|
|
597
706
|
}] } });
|
|
598
707
|
|
|
599
|
-
class SkyAgGridCellEditorTextModule {
|
|
600
|
-
}
|
|
601
|
-
SkyAgGridCellEditorTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
602
|
-
SkyAgGridCellEditorTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, declarations: [SkyAgGridCellEditorTextComponent], imports: [AgGridResourcesModule, FormsModule], exports: [SkyAgGridCellEditorTextComponent] });
|
|
603
|
-
SkyAgGridCellEditorTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, imports: [[AgGridResourcesModule, FormsModule]] });
|
|
604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, decorators: [{
|
|
605
|
-
type: NgModule,
|
|
606
|
-
args: [{
|
|
607
|
-
imports: [AgGridResourcesModule, FormsModule],
|
|
608
|
-
declarations: [SkyAgGridCellEditorTextComponent],
|
|
609
|
-
exports: [SkyAgGridCellEditorTextComponent],
|
|
610
|
-
}]
|
|
611
|
-
}] });
|
|
612
|
-
|
|
613
708
|
/**
|
|
614
|
-
*
|
|
709
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
710
|
+
* The contents of this file were automatically generated by
|
|
711
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/ag-grid' schematic.
|
|
712
|
+
* To update this file, simply rerun the command.
|
|
615
713
|
*/
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
if (typeof ((_d = this.cellRendererParams.skyComponentProperties) === null || _d === void 0 ? void 0 : _d.validatorMessage) === 'function') {
|
|
646
|
-
this.validatorMessage =
|
|
647
|
-
this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams.rowIndex);
|
|
648
|
-
}
|
|
649
|
-
else {
|
|
650
|
-
this.validatorMessage =
|
|
651
|
-
(_e = this.cellRendererParams.skyComponentProperties) === null || _e === void 0 ? void 0 : _e.validatorMessage;
|
|
652
|
-
}
|
|
653
|
-
this.changeDetector.markForCheck();
|
|
654
|
-
}
|
|
655
|
-
hideIndicator() {
|
|
656
|
-
this.zone.run(() => {
|
|
657
|
-
this.indicatorShouldShow = false;
|
|
658
|
-
this.changeDetector.detectChanges();
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
hidePopover() {
|
|
662
|
-
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Close });
|
|
663
|
-
}
|
|
664
|
-
showIndicator() {
|
|
665
|
-
this.zone.run(() => {
|
|
666
|
-
this.indicatorShouldShow = true;
|
|
667
|
-
this.changeDetector.detectChanges();
|
|
668
|
-
});
|
|
669
|
-
}
|
|
670
|
-
showPopover() {
|
|
671
|
-
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Open });
|
|
714
|
+
const RESOURCES = {
|
|
715
|
+
'EN-US': {
|
|
716
|
+
sky_ag_grid_row_selector_aria_label: {
|
|
717
|
+
message: 'Row selector for row {0}',
|
|
718
|
+
},
|
|
719
|
+
sky_ag_grid_cell_editor_number_aria_label: {
|
|
720
|
+
message: 'Editable number {0} for row {1}',
|
|
721
|
+
},
|
|
722
|
+
sky_ag_grid_cell_editor_text_aria_label: {
|
|
723
|
+
message: 'Editable text {0} for row {1}',
|
|
724
|
+
},
|
|
725
|
+
sky_ag_grid_cell_editor_autocomplete_aria_label: {
|
|
726
|
+
message: 'Editable autocomplete {0} for row {1}',
|
|
727
|
+
},
|
|
728
|
+
sky_ag_grid_cell_renderer_currency_aria_label: {
|
|
729
|
+
message: 'Editable currency {0} for row {1}',
|
|
730
|
+
},
|
|
731
|
+
sky_ag_grid_cell_renderer_number_validator_message: {
|
|
732
|
+
message: 'Please enter a valid number',
|
|
733
|
+
},
|
|
734
|
+
sky_ag_grid_cell_renderer_currency_validator_message: {
|
|
735
|
+
message: 'Please enter a valid currency',
|
|
736
|
+
},
|
|
737
|
+
skyux_lookup_tokens_summary: { message: '{0} items selected' },
|
|
738
|
+
},
|
|
739
|
+
};
|
|
740
|
+
class AgGridResourcesProvider {
|
|
741
|
+
getString(localeInfo, name) {
|
|
742
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
672
743
|
}
|
|
673
744
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
745
|
+
/**
|
|
746
|
+
* Import into any component library module that needs to use resource strings.
|
|
747
|
+
*/
|
|
748
|
+
class AgGridResourcesModule {
|
|
749
|
+
}
|
|
750
|
+
AgGridResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AgGridResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
751
|
+
AgGridResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AgGridResourcesModule, exports: [SkyI18nModule] });
|
|
752
|
+
AgGridResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AgGridResourcesModule, providers: [
|
|
753
|
+
{
|
|
754
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
755
|
+
useClass: AgGridResourcesProvider,
|
|
756
|
+
multi: true,
|
|
757
|
+
},
|
|
758
|
+
], imports: [SkyI18nModule] });
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AgGridResourcesModule, decorators: [{
|
|
760
|
+
type: NgModule,
|
|
678
761
|
args: [{
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
762
|
+
exports: [SkyI18nModule],
|
|
763
|
+
providers: [
|
|
764
|
+
{
|
|
765
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
766
|
+
useClass: AgGridResourcesProvider,
|
|
767
|
+
multi: true,
|
|
768
|
+
},
|
|
769
|
+
],
|
|
683
770
|
}]
|
|
684
|
-
}]
|
|
685
|
-
|
|
686
|
-
|
|
771
|
+
}] });
|
|
772
|
+
|
|
773
|
+
class SkyAgGridCellEditorAutocompleteModule {
|
|
774
|
+
}
|
|
775
|
+
SkyAgGridCellEditorAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
776
|
+
SkyAgGridCellEditorAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, declarations: [SkyAgGridCellEditorAutocompleteComponent], imports: [FormsModule, AgGridResourcesModule, SkyAutocompleteModule], exports: [SkyAgGridCellEditorAutocompleteComponent] });
|
|
777
|
+
SkyAgGridCellEditorAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, imports: [[FormsModule, AgGridResourcesModule, SkyAutocompleteModule]] });
|
|
778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorAutocompleteModule, decorators: [{
|
|
779
|
+
type: NgModule,
|
|
780
|
+
args: [{
|
|
781
|
+
imports: [FormsModule, AgGridResourcesModule, SkyAutocompleteModule],
|
|
782
|
+
declarations: [SkyAgGridCellEditorAutocompleteComponent],
|
|
783
|
+
exports: [SkyAgGridCellEditorAutocompleteComponent],
|
|
784
|
+
}]
|
|
785
|
+
}] });
|
|
687
786
|
|
|
688
787
|
/**
|
|
689
788
|
* @internal
|
|
690
789
|
*/
|
|
691
|
-
class
|
|
790
|
+
class SkyAgGridCellEditorCurrencyComponent {
|
|
692
791
|
constructor() {
|
|
693
792
|
this.skyComponentProperties = {};
|
|
694
|
-
this.numericOptions = {};
|
|
695
|
-
}
|
|
696
|
-
set params(value) {
|
|
697
|
-
this.agInit(value);
|
|
698
793
|
}
|
|
699
794
|
/**
|
|
700
|
-
* agInit is called by agGrid once after the
|
|
701
|
-
* @param params The cell
|
|
795
|
+
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
796
|
+
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
702
797
|
*/
|
|
703
798
|
agInit(params) {
|
|
704
|
-
this.
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
updateProperties(params) {
|
|
710
|
-
var _a;
|
|
711
|
-
this._params = params;
|
|
712
|
-
this.value = this._params.value;
|
|
713
|
-
this.columnHeader = this._params.colDef && this._params.colDef.headerName;
|
|
714
|
-
this.rowNumber = this._params.rowIndex + 1;
|
|
715
|
-
this.columnWidth = (_a = this._params.column) === null || _a === void 0 ? void 0 : _a.getActualWidth();
|
|
799
|
+
this.params = params;
|
|
800
|
+
this.value = this.params.value;
|
|
801
|
+
this.columnHeader = this.params.colDef.headerName;
|
|
802
|
+
this.rowNumber = this.params.rowIndex + 1;
|
|
803
|
+
this.columnWidth = this.params.column.getActualWidth();
|
|
716
804
|
this.rowHeightWithoutBorders =
|
|
717
|
-
this.
|
|
718
|
-
this.skyComponentProperties = this.
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
SkyAgGridCellRendererCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
725
|
-
SkyAgGridCellRendererCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0, template: "<span\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_renderer_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"], pipes: { "skyLibResources": i3.SkyLibResourcesPipe, "skyNumeric": i1.SkyNumericPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, decorators: [{
|
|
727
|
-
type: Component,
|
|
728
|
-
args: [{
|
|
729
|
-
selector: 'sky-ag-grid-cell-renderer-currency',
|
|
730
|
-
templateUrl: './cell-renderer-currency.component.html',
|
|
731
|
-
styleUrls: ['./cell-renderer-currency.component.scss'],
|
|
732
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
733
|
-
}]
|
|
734
|
-
}], propDecorators: { params: [{
|
|
735
|
-
type: Input
|
|
736
|
-
}] } });
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* @internal
|
|
740
|
-
*/
|
|
741
|
-
class SkyAgGridCellRendererCurrencyValidatorComponent {
|
|
742
|
-
constructor(changeDetector) {
|
|
743
|
-
this.changeDetector = changeDetector;
|
|
744
|
-
}
|
|
745
|
-
set parameters(value) {
|
|
746
|
-
this.agInit(value);
|
|
805
|
+
this.params.node && this.params.node.rowHeight - 4;
|
|
806
|
+
this.skyComponentProperties = this.params.skyComponentProperties || {
|
|
807
|
+
decimalPlaces: 2,
|
|
808
|
+
currencySymbol: '$',
|
|
809
|
+
};
|
|
747
810
|
}
|
|
748
811
|
/**
|
|
749
|
-
*
|
|
750
|
-
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
812
|
+
* 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.
|
|
751
813
|
*/
|
|
752
|
-
|
|
753
|
-
this.
|
|
754
|
-
this.changeDetector.markForCheck();
|
|
755
|
-
}
|
|
756
|
-
isNumeric(value) {
|
|
757
|
-
return !isNaN(parseFloat(value));
|
|
814
|
+
afterGuiAttached() {
|
|
815
|
+
this.input.nativeElement.focus();
|
|
758
816
|
}
|
|
759
|
-
|
|
760
|
-
|
|
817
|
+
/**
|
|
818
|
+
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
819
|
+
*/
|
|
820
|
+
getValue() {
|
|
821
|
+
return this.value;
|
|
761
822
|
}
|
|
762
823
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
824
|
+
SkyAgGridCellEditorCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
825
|
+
SkyAgGridCellEditorCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorCurrencyComponent, selector: "sky-ag-grid-cell-editor-currency", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorCurrency"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\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 [(ngModel)]=\"value\"\n [skyAutonumeric]=\"skyComponentProperties\"\n #skyCellEditorCurrency\n/>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, decorators: [{
|
|
766
827
|
type: Component,
|
|
767
828
|
args: [{
|
|
768
|
-
selector: 'sky-ag-grid-cell-
|
|
769
|
-
templateUrl: 'cell-
|
|
829
|
+
selector: 'sky-ag-grid-cell-editor-currency',
|
|
830
|
+
templateUrl: './cell-editor-currency.component.html',
|
|
831
|
+
styleUrls: ['./cell-editor-currency.component.scss'],
|
|
770
832
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
771
833
|
}]
|
|
772
|
-
}],
|
|
773
|
-
type:
|
|
834
|
+
}], propDecorators: { input: [{
|
|
835
|
+
type: ViewChild,
|
|
836
|
+
args: ['skyCellEditorCurrency', { read: ElementRef }]
|
|
774
837
|
}] } });
|
|
775
838
|
|
|
776
|
-
class
|
|
777
|
-
constructor(changeDetector) {
|
|
778
|
-
this.changeDetector = changeDetector;
|
|
779
|
-
this.value = '';
|
|
780
|
-
this.summaryCount = 0;
|
|
781
|
-
}
|
|
782
|
-
agInit(params) {
|
|
783
|
-
var _a;
|
|
784
|
-
this.lookupProperties = applySkyLookupPropertiesDefaults(params);
|
|
785
|
-
this.summaryCount = ((_a = params.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
786
|
-
this.value = `${params.valueFormatted}`;
|
|
787
|
-
this.changeDetector.markForCheck();
|
|
788
|
-
}
|
|
789
|
-
refresh(params) {
|
|
790
|
-
this.agInit(params);
|
|
791
|
-
return true;
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
SkyAgGridCellRendererLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
795
|
-
SkyAgGridCellRendererLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererLookupComponent, selector: "sky-cell-renderer-lookup", ngImport: i0, 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"], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i3.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupComponent, decorators: [{
|
|
797
|
-
type: Component,
|
|
798
|
-
args: [{
|
|
799
|
-
selector: 'sky-cell-renderer-lookup',
|
|
800
|
-
templateUrl: './cell-renderer-lookup.component.html',
|
|
801
|
-
styleUrls: ['./cell-renderer-lookup.component.scss'],
|
|
802
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
803
|
-
}]
|
|
804
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
805
|
-
|
|
806
|
-
class SkyAgGridCellRendererLookupModule {
|
|
839
|
+
class SkyAgGridCellEditorCurrencyModule {
|
|
807
840
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
841
|
+
SkyAgGridCellEditorCurrencyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
842
|
+
SkyAgGridCellEditorCurrencyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, declarations: [SkyAgGridCellEditorCurrencyComponent], imports: [AgGridResourcesModule, FormsModule, SkyAutonumericModule], exports: [SkyAgGridCellEditorCurrencyComponent] });
|
|
843
|
+
SkyAgGridCellEditorCurrencyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, imports: [[AgGridResourcesModule, FormsModule, SkyAutonumericModule]] });
|
|
844
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyModule, decorators: [{
|
|
812
845
|
type: NgModule,
|
|
813
846
|
args: [{
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
847
|
+
imports: [AgGridResourcesModule, FormsModule, SkyAutonumericModule],
|
|
848
|
+
declarations: [SkyAgGridCellEditorCurrencyComponent],
|
|
849
|
+
exports: [SkyAgGridCellEditorCurrencyComponent],
|
|
817
850
|
}]
|
|
818
851
|
}] });
|
|
819
852
|
|
|
820
853
|
/**
|
|
821
854
|
* @internal
|
|
822
855
|
*/
|
|
823
|
-
class
|
|
824
|
-
constructor(
|
|
825
|
-
|
|
856
|
+
class SkyAgGridCellEditorDatepickerComponent extends PopupComponent {
|
|
857
|
+
constructor(themeSvc) {
|
|
858
|
+
super();
|
|
859
|
+
this.themeSvc = themeSvc;
|
|
860
|
+
this.skyComponentProperties = {};
|
|
826
861
|
}
|
|
827
862
|
/**
|
|
828
|
-
* agInit is called by agGrid once after the
|
|
829
|
-
* @param params The cell
|
|
863
|
+
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
864
|
+
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
830
865
|
*/
|
|
831
866
|
agInit(params) {
|
|
867
|
+
var _a;
|
|
832
868
|
this.params = params;
|
|
833
|
-
this.
|
|
834
|
-
this.
|
|
835
|
-
this.
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
this.
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
869
|
+
this.currentDate = this.params.value;
|
|
870
|
+
this.skyComponentProperties = this.params.skyComponentProperties || {};
|
|
871
|
+
this.columnWidth = this.params.column.getActualWidth();
|
|
872
|
+
this.columnWidthWithoutBorders = this.columnWidth - 2;
|
|
873
|
+
this.rowHeightWithoutBorders =
|
|
874
|
+
this.params.node && this.params.node.rowHeight - 3;
|
|
875
|
+
(_a = this.themeSvc) === null || _a === void 0 ? void 0 : _a.settingsChange.subscribe((themeSettings) => {
|
|
876
|
+
if (themeSettings.currentSettings.theme.name === 'modern') {
|
|
877
|
+
this.columnWidthWithoutBorders = this.columnWidth;
|
|
878
|
+
this.rowHeightWithoutBorders =
|
|
879
|
+
this.params.node && this.params.node.rowHeight;
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
this.columnWidthWithoutBorders = this.columnWidth - 2;
|
|
883
|
+
this.rowHeightWithoutBorders =
|
|
884
|
+
this.params.node && this.params.node.rowHeight - 3;
|
|
885
|
+
}
|
|
845
886
|
});
|
|
846
887
|
}
|
|
847
888
|
/**
|
|
848
|
-
*
|
|
849
|
-
* successful, or false if the cell should be destroyed and rerendered. If consumers have external logic that changes the value of a
|
|
850
|
-
* checkbox cell, rerendering it will gurantee the change applies without knowing the consumer's implementation.
|
|
889
|
+
* 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.
|
|
851
890
|
*/
|
|
852
|
-
|
|
853
|
-
|
|
891
|
+
afterGuiAttached() {
|
|
892
|
+
this.focusOnDatepickerInput();
|
|
854
893
|
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
894
|
+
/**
|
|
895
|
+
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
896
|
+
*/
|
|
897
|
+
getValue() {
|
|
898
|
+
this.datepickerInput.nativeElement.blur();
|
|
899
|
+
return this.currentDate;
|
|
860
900
|
}
|
|
861
|
-
|
|
862
|
-
this.
|
|
863
|
-
if (this.dataField) {
|
|
864
|
-
this.rowNode.data[this.dataField] = this.checked;
|
|
865
|
-
}
|
|
866
|
-
this.changeDetection.markForCheck();
|
|
901
|
+
focusOnDatepickerInput() {
|
|
902
|
+
this.datepickerInput.nativeElement.focus();
|
|
867
903
|
}
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
904
|
+
}
|
|
905
|
+
SkyAgGridCellEditorDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerComponent, deps: [{ token: i1$5.SkyThemeService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
906
|
+
SkyAgGridCellEditorDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 [style.width.px]=\"columnWidthWithoutBorders\"\n>\n <sky-datepicker\n data-sky-id=\"cell-datepicker\"\n pickerClass=\"ag-custom-component-popup\"\n >\n <input\n skyDatepickerInput\n [disabled]=\"skyComponentProperties.disabled\"\n [minDate]=\"skyComponentProperties.minDate\"\n [maxDate]=\"skyComponentProperties.maxDate\"\n [dateFormat]=\"skyComponentProperties.dateFormat\"\n [startingDay]=\"skyComponentProperties.startingDay\"\n [skyDatepickerNoValidate]=\"skyComponentProperties.skyDatepickerNoValidate\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"currentDate\"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n", 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"], components: [{ type: i2$1.λ2, selector: "sky-datepicker", inputs: ["pickerClass"], outputs: ["calendarDateRangeChange"] }], directives: [{ type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2$1.λ3, selector: "[skyDatepickerInput]", inputs: ["dateFormat", "disabled", "maxDate", "minDate", "skyDatepickerInput", "skyDatepickerNoValidate", "startingDay", "strict"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerComponent, decorators: [{
|
|
872
908
|
type: Component,
|
|
873
909
|
args: [{
|
|
874
|
-
selector: 'sky-ag-grid-cell-
|
|
875
|
-
templateUrl: './cell-
|
|
876
|
-
styleUrls: ['./cell-
|
|
910
|
+
selector: 'sky-ag-grid-cell-editor-datepicker',
|
|
911
|
+
templateUrl: './cell-editor-datepicker.component.html',
|
|
912
|
+
styleUrls: ['./cell-editor-datepicker.component.scss'],
|
|
877
913
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
878
914
|
encapsulation: ViewEncapsulation.None,
|
|
879
915
|
}]
|
|
880
|
-
}], ctorParameters: function () { return [{ type:
|
|
916
|
+
}], ctorParameters: function () { return [{ type: i1$5.SkyThemeService, decorators: [{
|
|
917
|
+
type: Optional
|
|
918
|
+
}] }]; }, propDecorators: { datepickerInput: [{
|
|
919
|
+
type: ViewChild,
|
|
920
|
+
args: ['skyCellEditorDatepickerInput', { read: ElementRef }]
|
|
921
|
+
}] } });
|
|
881
922
|
|
|
882
|
-
class
|
|
923
|
+
class SkyAgGridCellEditorDatepickerModule {
|
|
883
924
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
925
|
+
SkyAgGridCellEditorDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
926
|
+
SkyAgGridCellEditorDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, declarations: [SkyAgGridCellEditorDatepickerComponent], imports: [SkyDatepickerModule, FormsModule], exports: [SkyAgGridCellEditorDatepickerComponent] });
|
|
927
|
+
SkyAgGridCellEditorDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, imports: [[SkyDatepickerModule, FormsModule]] });
|
|
928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorDatepickerModule, decorators: [{
|
|
888
929
|
type: NgModule,
|
|
889
930
|
args: [{
|
|
890
|
-
imports: [
|
|
891
|
-
declarations: [
|
|
892
|
-
exports: [
|
|
931
|
+
imports: [SkyDatepickerModule, FormsModule],
|
|
932
|
+
declarations: [SkyAgGridCellEditorDatepickerComponent],
|
|
933
|
+
exports: [SkyAgGridCellEditorDatepickerComponent],
|
|
893
934
|
}]
|
|
894
935
|
}] });
|
|
895
936
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
937
|
+
function applySkyLookupPropertiesDefaults(skyLookupProperties) {
|
|
938
|
+
return {
|
|
939
|
+
addClick: skyLookupProperties.addClick || undefined,
|
|
940
|
+
ariaLabel: skyLookupProperties.ariaLabel || '',
|
|
941
|
+
autocompleteAttribute: skyLookupProperties.autocompleteAttribute || 'off',
|
|
942
|
+
data: skyLookupProperties.data || [],
|
|
943
|
+
debounceTime: skyLookupProperties.debounceTime || 0,
|
|
944
|
+
descriptorProperty: skyLookupProperties.descriptorProperty || 'name',
|
|
945
|
+
disabled: skyLookupProperties.disabled || false,
|
|
946
|
+
enableShowMore: skyLookupProperties.enableShowMore || false,
|
|
947
|
+
idProperty: skyLookupProperties.idProperty || undefined,
|
|
948
|
+
placeholderText: skyLookupProperties.placeholderText || '',
|
|
949
|
+
propertiesToSearch: skyLookupProperties.propertiesToSearch || undefined,
|
|
950
|
+
search: skyLookupProperties.search || undefined,
|
|
951
|
+
searchAsync: skyLookupProperties.searchAsync || undefined,
|
|
952
|
+
searchFilters: skyLookupProperties.searchFilters || [],
|
|
953
|
+
searchResultsLimit: skyLookupProperties.searchResultsLimit || undefined,
|
|
954
|
+
searchResultTemplate: skyLookupProperties.searchResultTemplate || undefined,
|
|
955
|
+
searchTextMinimumCharacters: skyLookupProperties.searchTextMinimumCharacters || 1,
|
|
956
|
+
selectMode: skyLookupProperties.selectMode || undefined,
|
|
957
|
+
showAddButton: skyLookupProperties.showAddButton || false,
|
|
958
|
+
showMoreConfig: skyLookupProperties.showMoreConfig || {},
|
|
959
|
+
wrapperClass: 'ag-custom-component-popup',
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
class SkyAgGridCellEditorLookupComponent {
|
|
964
|
+
constructor(changeDetector, elementRef) {
|
|
901
965
|
this.changeDetector = changeDetector;
|
|
902
|
-
this.
|
|
903
|
-
this.
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
this.
|
|
911
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
912
|
-
.subscribe(() => this.checkForAgGrid());
|
|
913
|
-
this.skyAgGridWrapperList.changes
|
|
914
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
915
|
-
.subscribe(() => this.checkForSkyAgGridWrapper());
|
|
916
|
-
}
|
|
917
|
-
ngOnDestroy() {
|
|
918
|
-
this.ngUnsubscribe.next();
|
|
919
|
-
this.ngUnsubscribe.complete();
|
|
920
|
-
}
|
|
921
|
-
checkForAgGrid() {
|
|
922
|
-
const agGridCount = this.agGridList.length;
|
|
923
|
-
/* istanbul ignore else */
|
|
924
|
-
if (agGridCount === 0) {
|
|
925
|
-
this.unregisterAgGrid();
|
|
926
|
-
}
|
|
927
|
-
else if (this.agGridList.first !== this.currentAgGrid) {
|
|
928
|
-
this.registerAgGrid();
|
|
929
|
-
}
|
|
930
|
-
if (agGridCount > 1) {
|
|
931
|
-
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
932
|
-
}
|
|
966
|
+
this.elementRef = elementRef;
|
|
967
|
+
this.isAlive = false;
|
|
968
|
+
this.lookupForm = new FormGroup({
|
|
969
|
+
currentSelection: new FormControl({
|
|
970
|
+
value: [],
|
|
971
|
+
disabled: false,
|
|
972
|
+
}),
|
|
973
|
+
});
|
|
974
|
+
this.useAsyncSearch = false;
|
|
933
975
|
}
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
this.unregisterSkyAgGridWrapper();
|
|
939
|
-
}
|
|
940
|
-
else if (this.skyAgGridWrapperList.first !== this.currentSkyAgGridWrapper) {
|
|
941
|
-
this.registerSkyAgGridWrapper();
|
|
942
|
-
}
|
|
943
|
-
if (skyAgGridWrapperCount > 1) {
|
|
944
|
-
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
976
|
+
agInit(params) {
|
|
977
|
+
this.params = params;
|
|
978
|
+
if (!Array.isArray(this.params.value)) {
|
|
979
|
+
throw new Error(`Lookup value must be an array`);
|
|
945
980
|
}
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
this.
|
|
949
|
-
|
|
950
|
-
if (this.dataStateSub) {
|
|
951
|
-
this.dataStateSub.unsubscribe();
|
|
981
|
+
const control = this.lookupForm.get('currentSelection');
|
|
982
|
+
control.setValue(this.params.value);
|
|
983
|
+
if (this.params.skyComponentProperties.disabled) {
|
|
984
|
+
control.disable();
|
|
952
985
|
}
|
|
986
|
+
this.skyComponentProperties = this.updateComponentProperties(this.params);
|
|
987
|
+
this.useAsyncSearch =
|
|
988
|
+
typeof this.skyComponentProperties.searchAsync === 'function';
|
|
989
|
+
this.isAlive = true;
|
|
990
|
+
this.changeDetector.markForCheck();
|
|
953
991
|
}
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
this.currentSkyAgGridWrapper = this.skyAgGridWrapperList.first;
|
|
960
|
-
setTimeout(() => {
|
|
961
|
-
if (this.currentSkyAgGridWrapper) {
|
|
962
|
-
this.currentSkyAgGridWrapper.viewkeeperClasses = [];
|
|
963
|
-
}
|
|
964
|
-
});
|
|
965
|
-
}
|
|
966
|
-
registerAgGrid() {
|
|
967
|
-
this.unregisterAgGrid();
|
|
968
|
-
const agGrid = this.agGridList.first;
|
|
969
|
-
this.currentAgGrid = agGrid;
|
|
970
|
-
agGrid.gridReady.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
|
|
971
|
-
this.viewConfig.onSelectAllClick = this.selectAll.bind(this);
|
|
972
|
-
this.viewConfig.onClearAllClick = this.clearAll.bind(this);
|
|
973
|
-
this.dataManagerSvc.updateViewConfig(this.viewConfig);
|
|
974
|
-
this.dataStateSub = this.dataManagerSvc
|
|
975
|
-
.getDataStateUpdates(this.viewConfig.id)
|
|
976
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
977
|
-
.subscribe((dataState) => {
|
|
978
|
-
this.currentDataState = dataState;
|
|
979
|
-
this.displayColumns(dataState);
|
|
980
|
-
});
|
|
981
|
-
agGrid.api.sizeColumnsToFit();
|
|
982
|
-
});
|
|
983
|
-
agGrid.columnMoved
|
|
984
|
-
.pipe(takeUntil(this.ngUnsubscribe), filter((event) => ![
|
|
985
|
-
'gridInitializing',
|
|
986
|
-
'uiColumnResized',
|
|
987
|
-
'uiColumnDragged',
|
|
988
|
-
'api',
|
|
989
|
-
].includes(event.source)))
|
|
990
|
-
.subscribe((value) => {
|
|
991
|
-
this.updateColumnsInCurrentDataState(value.columnApi);
|
|
992
|
-
});
|
|
993
|
-
let currentColumns;
|
|
994
|
-
agGrid.dragStarted
|
|
995
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
996
|
-
.subscribe((value) => {
|
|
997
|
-
currentColumns = this.getColumnOrder(value.columnApi);
|
|
998
|
-
});
|
|
999
|
-
agGrid.dragStopped
|
|
1000
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1001
|
-
.subscribe((value) => {
|
|
1002
|
-
const newColumns = this.getColumnOrder(value.columnApi);
|
|
1003
|
-
const hasChanged = currentColumns.findIndex((colId, i) => colId !== newColumns[i]);
|
|
1004
|
-
if (hasChanged > -1) {
|
|
1005
|
-
this.updateColumnsInCurrentDataState(value.columnApi);
|
|
1006
|
-
}
|
|
1007
|
-
});
|
|
1008
|
-
agGrid.rowSelected
|
|
1009
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1010
|
-
.subscribe((event) => {
|
|
1011
|
-
const row = event.node;
|
|
1012
|
-
let selectedIds = this.currentDataState.selectedIds || [];
|
|
1013
|
-
const rowIndex = selectedIds.indexOf(row.data.id);
|
|
1014
|
-
if (row.isSelected() && rowIndex === -1) {
|
|
1015
|
-
selectedIds.push(row.data.id);
|
|
1016
|
-
}
|
|
1017
|
-
else if (!row.isSelected() && rowIndex !== -1) {
|
|
1018
|
-
selectedIds.splice(rowIndex, 1);
|
|
1019
|
-
}
|
|
1020
|
-
this.currentDataState.selectedIds = selectedIds;
|
|
1021
|
-
this.dataManagerSvc.updateDataState(this.currentDataState, this.viewConfig.id);
|
|
1022
|
-
this.changeDetector.markForCheck();
|
|
1023
|
-
});
|
|
1024
|
-
agGrid.sortChanged.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
|
|
1025
|
-
const gridColumnStates = agGrid.columnApi.getColumnState();
|
|
1026
|
-
let sortOption;
|
|
1027
|
-
/* istanbul ignore else */
|
|
1028
|
-
if (gridColumnStates.length) {
|
|
1029
|
-
const activeSortColumnState = gridColumnStates.find((aGridColumnState) => aGridColumnState.sortIndex === 0);
|
|
1030
|
-
const dataManagerConfig = this.dataManagerSvc.getCurrentDataManagerConfig();
|
|
1031
|
-
/* istanbul ignore else */
|
|
1032
|
-
if (dataManagerConfig.sortOptions && activeSortColumnState) {
|
|
1033
|
-
sortOption = dataManagerConfig.sortOptions.find((option) => {
|
|
1034
|
-
return (option.propertyName === activeSortColumnState.colId &&
|
|
1035
|
-
option.descending === (activeSortColumnState.sort === 'desc'));
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
else {
|
|
1039
|
-
sortOption = undefined;
|
|
1040
|
-
}
|
|
1041
|
-
}
|
|
1042
|
-
this.currentDataState.activeSortOption = sortOption;
|
|
1043
|
-
this.dataManagerSvc.updateDataState(this.currentDataState, this.viewConfig.id);
|
|
1044
|
-
});
|
|
992
|
+
isCancelAfterEnd() {
|
|
993
|
+
// Shut down components to commit values before final value syncs to grid.
|
|
994
|
+
this.isAlive = false;
|
|
995
|
+
this.changeDetector.detectChanges();
|
|
996
|
+
return false;
|
|
1045
997
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
const viewState = this.currentDataState.getViewStateById(this.viewConfig.id);
|
|
1049
|
-
viewState.displayedColumnIds = columnOrder;
|
|
1050
|
-
this.dataManagerSvc.updateDataState(this.currentDataState.addOrUpdateView(this.viewConfig.id, viewState), this.viewConfig.id);
|
|
998
|
+
getGui() {
|
|
999
|
+
return this.elementRef.nativeElement;
|
|
1051
1000
|
}
|
|
1052
|
-
|
|
1053
|
-
return
|
|
1054
|
-
.getAllDisplayedVirtualColumns()
|
|
1055
|
-
.map((col) => col.getColDef().colId);
|
|
1001
|
+
getValue() {
|
|
1002
|
+
return this.lookupForm.get('currentSelection').value;
|
|
1056
1003
|
}
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
const viewState = dataState.getViewStateById(this.viewConfig.id);
|
|
1060
|
-
let displayedColumnIds = [];
|
|
1061
|
-
/*istanbul ignore else*/
|
|
1062
|
-
if (viewState.displayedColumnIds) {
|
|
1063
|
-
displayedColumnIds = viewState.displayedColumnIds;
|
|
1064
|
-
}
|
|
1065
|
-
const columns = agGrid.columnApi.getAllColumns();
|
|
1066
|
-
for (const column of columns) {
|
|
1067
|
-
const colId = column.getColId();
|
|
1068
|
-
const colIndex = displayedColumnIds.indexOf(colId);
|
|
1069
|
-
agGrid.columnApi.setColumnVisible(colId, colIndex !== -1);
|
|
1070
|
-
agGrid.columnApi.moveColumn(colId, colIndex);
|
|
1071
|
-
}
|
|
1004
|
+
isPopup() {
|
|
1005
|
+
return true;
|
|
1072
1006
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1007
|
+
/*istanbul ignore next*/
|
|
1008
|
+
afterGuiAttached() {
|
|
1009
|
+
var _a;
|
|
1010
|
+
(_a = this.elementRef.nativeElement.querySelector('.sky-lookup-input')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1076
1011
|
}
|
|
1077
|
-
|
|
1078
|
-
const
|
|
1079
|
-
|
|
1012
|
+
updateComponentProperties(params) {
|
|
1013
|
+
const skyLookupProperties = params.skyComponentProperties;
|
|
1014
|
+
return applySkyLookupPropertiesDefaults(skyLookupProperties);
|
|
1080
1015
|
}
|
|
1081
1016
|
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
1085
|
-
type:
|
|
1017
|
+
SkyAgGridCellEditorLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1018
|
+
SkyAgGridCellEditorLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorLookupComponent, selector: "sky-ag-grid-cell-editor-lookup", ngImport: i0, template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"lookupForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"currentSelection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [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]=\"lookupForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"currentSelection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [search]=\"skyComponentProperties?.search\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\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"], components: [{ type: i1$6.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { type: i1$3.λ4, selector: "sky-lookup", inputs: ["ariaLabel", "ariaLabelledBy", "autocompleteAttribute", "data", "disabled", "enableShowMore", "placeholderText", "idProperty", "showAddButton", "showMoreConfig", "selectMode", "wrapperClass"], outputs: ["addClick"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupComponent, decorators: [{
|
|
1020
|
+
type: Component,
|
|
1086
1021
|
args: [{
|
|
1087
|
-
selector: '
|
|
1022
|
+
selector: 'sky-ag-grid-cell-editor-lookup',
|
|
1023
|
+
templateUrl: './cell-editor-lookup.component.html',
|
|
1024
|
+
styleUrls: ['./cell-editor-lookup.component.scss'],
|
|
1025
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1088
1026
|
}]
|
|
1089
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type:
|
|
1090
|
-
type: Input
|
|
1091
|
-
}], agGridList: [{
|
|
1092
|
-
type: ContentChildren,
|
|
1093
|
-
args: [AgGridAngular, { descendants: true }]
|
|
1094
|
-
}], skyAgGridWrapperList: [{
|
|
1095
|
-
type: ContentChildren,
|
|
1096
|
-
args: [SkyAgGridWrapperComponent, { descendants: true }]
|
|
1097
|
-
}] } });
|
|
1027
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
|
|
1098
1028
|
|
|
1099
|
-
class
|
|
1029
|
+
class SkyAgGridCellEditorLookupModule {
|
|
1100
1030
|
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1031
|
+
SkyAgGridCellEditorLookupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1032
|
+
SkyAgGridCellEditorLookupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, declarations: [SkyAgGridCellEditorLookupComponent], imports: [CommonModule,
|
|
1033
|
+
ReactiveFormsModule,
|
|
1034
|
+
SkyI18nModule,
|
|
1035
|
+
SkyInputBoxModule,
|
|
1036
|
+
SkyLookupModule], exports: [SkyAgGridCellEditorLookupComponent] });
|
|
1037
|
+
SkyAgGridCellEditorLookupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, imports: [[
|
|
1038
|
+
CommonModule,
|
|
1039
|
+
ReactiveFormsModule,
|
|
1040
|
+
SkyI18nModule,
|
|
1041
|
+
SkyInputBoxModule,
|
|
1042
|
+
SkyLookupModule,
|
|
1043
|
+
]] });
|
|
1044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, decorators: [{
|
|
1105
1045
|
type: NgModule,
|
|
1106
1046
|
args: [{
|
|
1107
|
-
declarations: [
|
|
1108
|
-
exports: [
|
|
1109
|
-
imports: [
|
|
1047
|
+
declarations: [SkyAgGridCellEditorLookupComponent],
|
|
1048
|
+
exports: [SkyAgGridCellEditorLookupComponent],
|
|
1049
|
+
imports: [
|
|
1050
|
+
CommonModule,
|
|
1051
|
+
ReactiveFormsModule,
|
|
1052
|
+
SkyI18nModule,
|
|
1053
|
+
SkyInputBoxModule,
|
|
1054
|
+
SkyLookupModule,
|
|
1055
|
+
],
|
|
1110
1056
|
}]
|
|
1111
1057
|
}] });
|
|
1112
1058
|
|
|
1113
|
-
|
|
1059
|
+
/**
|
|
1060
|
+
* @internal
|
|
1061
|
+
*/
|
|
1062
|
+
class SkyAgGridCellEditorNumberComponent {
|
|
1063
|
+
/**
|
|
1064
|
+
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
1065
|
+
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
1066
|
+
*/
|
|
1067
|
+
agInit(params) {
|
|
1068
|
+
this.params = params;
|
|
1069
|
+
this.value = this.params.value;
|
|
1070
|
+
this.columnHeader = this.params.colDef.headerName;
|
|
1071
|
+
this.rowNumber = this.params.rowIndex + 1;
|
|
1072
|
+
this.columnWidth = this.params.column.getActualWidth();
|
|
1073
|
+
this.rowHeightWithoutBorders =
|
|
1074
|
+
this.params.node && this.params.node.rowHeight - 4;
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* 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.
|
|
1078
|
+
*/
|
|
1079
|
+
afterGuiAttached() {
|
|
1080
|
+
this.input.nativeElement.focus();
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
1084
|
+
*/
|
|
1085
|
+
getValue() {
|
|
1086
|
+
return this.value;
|
|
1087
|
+
}
|
|
1114
1088
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1089
|
+
SkyAgGridCellEditorNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1090
|
+
SkyAgGridCellEditorNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\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 [(ngModel)]=\"value\"\n #skyCellEditorNumber\n/>\n", styles: ["input{border:none;text-align:right}\n"], directives: [{ type: i1$4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, decorators: [{
|
|
1092
|
+
type: Component,
|
|
1093
|
+
args: [{
|
|
1094
|
+
selector: 'sky-ag-grid-cell-editor-number',
|
|
1095
|
+
templateUrl: './cell-editor-number.component.html',
|
|
1096
|
+
styleUrls: ['./cell-editor-number.component.scss'],
|
|
1097
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1098
|
+
}]
|
|
1099
|
+
}], propDecorators: { input: [{
|
|
1100
|
+
type: ViewChild,
|
|
1101
|
+
args: ['skyCellEditorNumber', { read: ElementRef }]
|
|
1102
|
+
}] } });
|
|
1103
|
+
|
|
1104
|
+
class SkyAgGridCellEditorNumberModule {
|
|
1105
|
+
}
|
|
1106
|
+
SkyAgGridCellEditorNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1107
|
+
SkyAgGridCellEditorNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, declarations: [SkyAgGridCellEditorNumberComponent], imports: [AgGridResourcesModule, FormsModule], exports: [SkyAgGridCellEditorNumberComponent] });
|
|
1108
|
+
SkyAgGridCellEditorNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, imports: [[AgGridResourcesModule, FormsModule]] });
|
|
1109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, decorators: [{
|
|
1131
1110
|
type: NgModule,
|
|
1132
1111
|
args: [{
|
|
1133
|
-
imports: [
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
SkyAgGridCellValidatorModule,
|
|
1137
|
-
FormsModule,
|
|
1138
|
-
SkyNumericModule,
|
|
1139
|
-
],
|
|
1140
|
-
declarations: [
|
|
1141
|
-
SkyAgGridCellRendererCurrencyComponent,
|
|
1142
|
-
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1143
|
-
],
|
|
1144
|
-
exports: [
|
|
1145
|
-
SkyAgGridCellRendererCurrencyComponent,
|
|
1146
|
-
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1147
|
-
],
|
|
1112
|
+
imports: [AgGridResourcesModule, FormsModule],
|
|
1113
|
+
declarations: [SkyAgGridCellEditorNumberComponent],
|
|
1114
|
+
exports: [SkyAgGridCellEditorNumberComponent],
|
|
1148
1115
|
}]
|
|
1149
1116
|
}] });
|
|
1150
1117
|
|
|
1151
1118
|
/**
|
|
1152
|
-
* Component for rendering the inline delete template in the overlay.
|
|
1153
1119
|
* @internal
|
|
1154
1120
|
*/
|
|
1155
|
-
class
|
|
1121
|
+
class SkyAgGridCellEditorTextComponent {
|
|
1122
|
+
/**
|
|
1123
|
+
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
1124
|
+
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
1125
|
+
*/
|
|
1126
|
+
agInit(params) {
|
|
1127
|
+
this.params = params;
|
|
1128
|
+
this.value = this.params.charPress || this.params.value;
|
|
1129
|
+
this.columnHeader = this.params.colDef.headerName;
|
|
1130
|
+
this.rowNumber = this.params.rowIndex + 1;
|
|
1131
|
+
this.columnWidth = this.params.column.getActualWidth();
|
|
1132
|
+
this.rowHeightWithoutBorders =
|
|
1133
|
+
this.params.node && this.params.node.rowHeight - 4;
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* 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.
|
|
1137
|
+
*/
|
|
1138
|
+
afterGuiAttached() {
|
|
1139
|
+
this.input.nativeElement.focus();
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
1143
|
+
*/
|
|
1144
|
+
getValue() {
|
|
1145
|
+
return this.value;
|
|
1146
|
+
}
|
|
1156
1147
|
}
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
let-row
|
|
1161
|
-
let-tableWidth="tableWidth()"
|
|
1162
|
-
let-getRowDeleteItem="getRowDeleteItem"
|
|
1163
|
-
let-cancelRowDelete="cancelRowDelete"
|
|
1164
|
-
let-confirmRowDelete="confirmRowDelete"
|
|
1165
|
-
#inlineDeleteTemplateRef
|
|
1166
|
-
>
|
|
1167
|
-
<div
|
|
1168
|
-
class="sky-ag-grid-row-delete"
|
|
1169
|
-
[id]="'row-delete-ref-' + row.id"
|
|
1170
|
-
[ngStyle]="{
|
|
1171
|
-
height: row.rowHeight + 'px',
|
|
1172
|
-
position: 'fixed',
|
|
1173
|
-
width: tableWidth + 'px'
|
|
1174
|
-
}"
|
|
1175
|
-
#inlineDeleteRef
|
|
1176
|
-
>
|
|
1177
|
-
<sky-inline-delete
|
|
1178
|
-
[pending]="getRowDeleteItem(row).pending"
|
|
1179
|
-
(cancelTriggered)="cancelRowDelete(row)"
|
|
1180
|
-
(deleteTriggered)="confirmRowDelete(row)"
|
|
1181
|
-
></sky-inline-delete>
|
|
1182
|
-
</div>
|
|
1183
|
-
</ng-template>
|
|
1184
|
-
`, isInline: true, components: [{ type: i1$7.λ8, selector: "sky-inline-delete", inputs: ["pending"], outputs: ["cancelTriggered", "deleteTriggered"] }], directives: [{ type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridRowDeleteComponent, decorators: [{
|
|
1148
|
+
SkyAgGridCellEditorTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1149
|
+
SkyAgGridCellEditorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\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 [(ngModel)]=\"value\"\n #skyCellEditorText\n/>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextComponent, decorators: [{
|
|
1186
1151
|
type: Component,
|
|
1187
1152
|
args: [{
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
(cancelTriggered)="cancelRowDelete(row)"
|
|
1210
|
-
(deleteTriggered)="confirmRowDelete(row)"
|
|
1211
|
-
></sky-inline-delete>
|
|
1212
|
-
</div>
|
|
1213
|
-
</ng-template>
|
|
1214
|
-
`,
|
|
1153
|
+
selector: 'sky-ag-grid-cell-editor-text',
|
|
1154
|
+
templateUrl: './cell-editor-text.component.html',
|
|
1155
|
+
styleUrls: ['./cell-editor-text.component.scss'],
|
|
1156
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1157
|
+
}]
|
|
1158
|
+
}], propDecorators: { input: [{
|
|
1159
|
+
type: ViewChild,
|
|
1160
|
+
args: ['skyCellEditorText', { read: ElementRef }]
|
|
1161
|
+
}] } });
|
|
1162
|
+
|
|
1163
|
+
class SkyAgGridCellEditorTextModule {
|
|
1164
|
+
}
|
|
1165
|
+
SkyAgGridCellEditorTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1166
|
+
SkyAgGridCellEditorTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, declarations: [SkyAgGridCellEditorTextComponent], imports: [AgGridResourcesModule, FormsModule], exports: [SkyAgGridCellEditorTextComponent] });
|
|
1167
|
+
SkyAgGridCellEditorTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, imports: [[AgGridResourcesModule, FormsModule]] });
|
|
1168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, decorators: [{
|
|
1169
|
+
type: NgModule,
|
|
1170
|
+
args: [{
|
|
1171
|
+
imports: [AgGridResourcesModule, FormsModule],
|
|
1172
|
+
declarations: [SkyAgGridCellEditorTextComponent],
|
|
1173
|
+
exports: [SkyAgGridCellEditorTextComponent],
|
|
1215
1174
|
}]
|
|
1216
|
-
}]
|
|
1217
|
-
type: ViewChildren,
|
|
1218
|
-
args: ['inlineDeleteRef']
|
|
1219
|
-
}], inlineDeleteTemplateRef: [{
|
|
1220
|
-
type: ViewChild,
|
|
1221
|
-
args: ['inlineDeleteTemplateRef', { read: TemplateRef }]
|
|
1222
|
-
}] } });
|
|
1175
|
+
}] });
|
|
1223
1176
|
|
|
1224
1177
|
/**
|
|
1225
1178
|
* @internal
|
|
1226
1179
|
*/
|
|
1227
|
-
class
|
|
1228
|
-
constructor(
|
|
1229
|
-
this.affixService = affixService;
|
|
1180
|
+
class SkyAgGridCellValidatorTooltipComponent {
|
|
1181
|
+
constructor(changeDetector, zone) {
|
|
1230
1182
|
this.changeDetector = changeDetector;
|
|
1231
|
-
this.
|
|
1232
|
-
this.
|
|
1233
|
-
this.
|
|
1234
|
-
this.viewContainerRef = viewContainerRef;
|
|
1235
|
-
/**
|
|
1236
|
-
* Emits a `SkyAgGridRowDeleteCancelArgs` object when a row's inline delete is cancelled.
|
|
1237
|
-
*/
|
|
1238
|
-
this.rowDeleteCancel = new EventEmitter();
|
|
1239
|
-
/**
|
|
1240
|
-
* Emits a `SkyAgGridRowDeleteConfirmArgs` object when a row's inline delete is confirmed.
|
|
1241
|
-
*/
|
|
1242
|
-
this.rowDeleteConfirm = new EventEmitter();
|
|
1243
|
-
/**
|
|
1244
|
-
* Emits when the list of ids of the data in the rows where inline deletes are shown changes.
|
|
1245
|
-
*/
|
|
1246
|
-
this.rowDeleteIdsChange = new EventEmitter();
|
|
1247
|
-
this.rowDeleteConfigs = [];
|
|
1248
|
-
this.ngUnsubscribe = new Subject();
|
|
1249
|
-
this.rowDeleteContents = {};
|
|
1183
|
+
this.zone = zone;
|
|
1184
|
+
this.indicatorShouldShow = true;
|
|
1185
|
+
this.popoverMessageStream = new Subject();
|
|
1250
1186
|
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
this.
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
this.
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
return;
|
|
1262
|
-
}
|
|
1263
|
-
for (let id of value) {
|
|
1264
|
-
const existingConfig = this.rowDeleteConfigs.find((config) => config.id === id);
|
|
1265
|
-
if (existingConfig) {
|
|
1266
|
-
existingConfig.pending = false;
|
|
1187
|
+
set params(value) {
|
|
1188
|
+
var _a, _b, _c, _d, _e;
|
|
1189
|
+
this.cellRendererParams = value;
|
|
1190
|
+
/*istanbul ignore next*/
|
|
1191
|
+
(_a = this.cellRendererParams.api) === null || _a === void 0 ? void 0 : _a.addEventListener(Events.EVENT_CELL_FOCUSED, (eventParams) => {
|
|
1192
|
+
// We want to close any popovers that are opened when other cells are focused, but open a popover if the current cell is focused.
|
|
1193
|
+
if (eventParams.column.getColId() !==
|
|
1194
|
+
this.cellRendererParams.column.getColId() ||
|
|
1195
|
+
eventParams.rowIndex !== this.cellRendererParams.rowIndex) {
|
|
1196
|
+
this.hidePopover();
|
|
1267
1197
|
}
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
let overlay = this.overlayService.create({
|
|
1274
|
-
enableScroll: true,
|
|
1275
|
-
showBackdrop: false,
|
|
1276
|
-
closeOnNavigation: true,
|
|
1277
|
-
enableClose: false,
|
|
1278
|
-
enablePointerEvents: true,
|
|
1279
|
-
});
|
|
1280
|
-
overlay.attachTemplate(this.rowDeleteComponent.inlineDeleteTemplateRef, {
|
|
1281
|
-
$implicit: this.agGrid.api.getRowNode(id),
|
|
1282
|
-
tableWidth: () => {
|
|
1283
|
-
return this.tableWidth;
|
|
1284
|
-
},
|
|
1285
|
-
getRowDeleteItem: (row) => this.getRowDeleteItem(row),
|
|
1286
|
-
cancelRowDelete: (row) => this.cancelRowDelete(row),
|
|
1287
|
-
confirmRowDelete: (row) => this.confirmRowDelete(row),
|
|
1288
|
-
});
|
|
1289
|
-
/**
|
|
1290
|
-
* We are manually setting the z-index here because overlays will always be on top of
|
|
1291
|
-
* the omnibar. This manual setting is 2 less than the omnibar's z-index of 1000 and one less than
|
|
1292
|
-
* the header row's viewkeeper which is 999. We discussed changing the overlay service to allow for this
|
|
1293
|
-
* but decided against that change at this time due to its niche nature.
|
|
1294
|
-
*/
|
|
1295
|
-
overlay.componentRef.instance.zIndex = '998';
|
|
1296
|
-
setTimeout(() => {
|
|
1297
|
-
const inlineDeleteRef = this.rowDeleteComponent.inlineDeleteRefs
|
|
1298
|
-
.toArray()
|
|
1299
|
-
.find((elRef) => {
|
|
1300
|
-
return elRef.nativeElement.id === 'row-delete-ref-' + id;
|
|
1301
|
-
});
|
|
1302
|
-
let affixer = this.affixService.createAffixer(inlineDeleteRef);
|
|
1303
|
-
this.affixToRow(affixer, id);
|
|
1304
|
-
this.rowDeleteContents[id] = {
|
|
1305
|
-
affixer: affixer,
|
|
1306
|
-
overlay: overlay,
|
|
1307
|
-
};
|
|
1308
|
-
});
|
|
1198
|
+
});
|
|
1199
|
+
/*istanbul ignore next*/
|
|
1200
|
+
(_b = this.cellRendererParams.eGridCell) === null || _b === void 0 ? void 0 : _b.addEventListener('keyup', (event) => {
|
|
1201
|
+
if (['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(event.key)) {
|
|
1202
|
+
this.showPopover();
|
|
1309
1203
|
}
|
|
1204
|
+
});
|
|
1205
|
+
/*istanbul ignore next*/
|
|
1206
|
+
(_c = this.cellRendererParams.api) === null || _c === void 0 ? void 0 : _c.addEventListener(Events.EVENT_CELL_EDITING_STARTED, () => {
|
|
1207
|
+
this.hidePopover();
|
|
1208
|
+
});
|
|
1209
|
+
if (typeof ((_d = this.cellRendererParams.skyComponentProperties) === null || _d === void 0 ? void 0 : _d.validatorMessage) === 'function') {
|
|
1210
|
+
this.validatorMessage =
|
|
1211
|
+
this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams.rowIndex);
|
|
1310
1212
|
}
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
this.
|
|
1314
|
-
}
|
|
1213
|
+
else {
|
|
1214
|
+
this.validatorMessage =
|
|
1215
|
+
(_e = this.cellRendererParams.skyComponentProperties) === null || _e === void 0 ? void 0 : _e.validatorMessage;
|
|
1315
1216
|
}
|
|
1316
1217
|
this.changeDetector.markForCheck();
|
|
1317
1218
|
}
|
|
1318
|
-
|
|
1319
|
-
|
|
1219
|
+
hideIndicator() {
|
|
1220
|
+
this.zone.run(() => {
|
|
1221
|
+
this.indicatorShouldShow = false;
|
|
1222
|
+
this.changeDetector.detectChanges();
|
|
1223
|
+
});
|
|
1320
1224
|
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
.offsetWidth;
|
|
1225
|
+
hidePopover() {
|
|
1226
|
+
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Close });
|
|
1324
1227
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
this.
|
|
1329
|
-
this.agGrid.rowDataChanged
|
|
1330
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1331
|
-
.subscribe(() => {
|
|
1332
|
-
this.updateRowDeleteStates();
|
|
1333
|
-
});
|
|
1334
|
-
this.agGrid.rowDataUpdated
|
|
1335
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1336
|
-
.subscribe(() => {
|
|
1337
|
-
this.updateRowDeleteStates();
|
|
1338
|
-
});
|
|
1339
|
-
this.agGrid.sortChanged
|
|
1340
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1341
|
-
.subscribe(() => {
|
|
1342
|
-
this.updateRowDeleteStates();
|
|
1343
|
-
});
|
|
1344
|
-
this.agGrid.filterChanged
|
|
1345
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1346
|
-
.subscribe(() => {
|
|
1347
|
-
this.updateRowDeleteStates();
|
|
1228
|
+
showIndicator() {
|
|
1229
|
+
this.zone.run(() => {
|
|
1230
|
+
this.indicatorShouldShow = true;
|
|
1231
|
+
this.changeDetector.detectChanges();
|
|
1348
1232
|
});
|
|
1349
|
-
this.agGrid.getRowNodeId = (data) => {
|
|
1350
|
-
return data.id.toString();
|
|
1351
|
-
};
|
|
1352
1233
|
}
|
|
1353
|
-
|
|
1354
|
-
this.
|
|
1355
|
-
this.ngUnsubscribe.complete();
|
|
1356
|
-
Object.keys(this.rowDeleteContents).forEach((id) => {
|
|
1357
|
-
this.destroyRowDelete(id);
|
|
1358
|
-
});
|
|
1234
|
+
showPopover() {
|
|
1235
|
+
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Open });
|
|
1359
1236
|
}
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1237
|
+
}
|
|
1238
|
+
SkyAgGridCellValidatorTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1239
|
+
SkyAgGridCellValidatorTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 *ngIf=\"indicatorShouldShow\"\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n ></sky-status-indicator>\n</div>\n<sky-popover\n #validatorPopover\n (popoverClosed)=\"showIndicator()\"\n (popoverOpened)=\"hideIndicator()\"\n popoverType=\"danger\"\n>\n {{ validatorMessage }}\n</sky-popover>\n", styles: [":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:none}\n"], components: [{ type: i1$7.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription"] }, { type: i2$2.λ6, selector: "sky-popover", inputs: ["alignment", "dismissOnBlur", "placement", "popoverTitle", "popoverType"], outputs: ["popoverClosed", "popoverOpened"] }], directives: [{ type: i2$2.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, decorators: [{
|
|
1241
|
+
type: Component,
|
|
1242
|
+
args: [{
|
|
1243
|
+
selector: 'sky-ag-grid-cell-validator-tooltip',
|
|
1244
|
+
styleUrls: ['ag-grid-cell-validator-tooltip.component.scss'],
|
|
1245
|
+
templateUrl: 'ag-grid-cell-validator-tooltip.component.html',
|
|
1246
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1247
|
+
}]
|
|
1248
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { params: [{
|
|
1249
|
+
type: Input
|
|
1250
|
+
}] } });
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* @internal
|
|
1254
|
+
*/
|
|
1255
|
+
class SkyAgGridCellRendererCurrencyComponent {
|
|
1256
|
+
constructor() {
|
|
1257
|
+
this.skyComponentProperties = {};
|
|
1258
|
+
this.numericOptions = {};
|
|
1364
1259
|
}
|
|
1365
|
-
|
|
1366
|
-
this.
|
|
1367
|
-
this.rowDeleteConfirm.emit({ id: row.id });
|
|
1260
|
+
set params(value) {
|
|
1261
|
+
this.agInit(value);
|
|
1368
1262
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1263
|
+
/**
|
|
1264
|
+
* agInit is called by agGrid once after the renderer is created and provides the renderer with the information it needs.
|
|
1265
|
+
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
1266
|
+
*/
|
|
1267
|
+
agInit(params) {
|
|
1268
|
+
this.updateProperties(params);
|
|
1371
1269
|
}
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1270
|
+
refresh(params) {
|
|
1271
|
+
return false;
|
|
1272
|
+
}
|
|
1273
|
+
updateProperties(params) {
|
|
1274
|
+
var _a;
|
|
1275
|
+
this._params = params;
|
|
1276
|
+
this.value = this._params.value;
|
|
1277
|
+
this.columnHeader = this._params.colDef && this._params.colDef.headerName;
|
|
1278
|
+
this.rowNumber = this._params.rowIndex + 1;
|
|
1279
|
+
this.columnWidth = (_a = this._params.column) === null || _a === void 0 ? void 0 : _a.getActualWidth();
|
|
1280
|
+
this.rowHeightWithoutBorders =
|
|
1281
|
+
this._params.node && this._params.node.rowHeight - 4;
|
|
1282
|
+
this.skyComponentProperties = this._params.skyComponentProperties || {};
|
|
1283
|
+
this.skyComponentProperties.format = 'currency';
|
|
1284
|
+
this.skyComponentProperties.minDigits = 2;
|
|
1285
|
+
this.skyComponentProperties.truncate = false;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
SkyAgGridCellRendererCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1289
|
+
SkyAgGridCellRendererCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0, template: "<span\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_renderer_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe, "skyNumeric": i1.SkyNumericPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, decorators: [{
|
|
1291
|
+
type: Component,
|
|
1292
|
+
args: [{
|
|
1293
|
+
selector: 'sky-ag-grid-cell-renderer-currency',
|
|
1294
|
+
templateUrl: './cell-renderer-currency.component.html',
|
|
1295
|
+
styleUrls: ['./cell-renderer-currency.component.scss'],
|
|
1296
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1297
|
+
}]
|
|
1298
|
+
}], propDecorators: { params: [{
|
|
1299
|
+
type: Input
|
|
1300
|
+
}] } });
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* @internal
|
|
1304
|
+
*/
|
|
1305
|
+
class SkyAgGridCellRendererCurrencyValidatorComponent {
|
|
1306
|
+
constructor(changeDetector) {
|
|
1307
|
+
this.changeDetector = changeDetector;
|
|
1397
1308
|
}
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
const rowDeleteContents = this.rowDeleteContents[id];
|
|
1401
|
-
/* sanity check */
|
|
1402
|
-
/* istanbul ignore else */
|
|
1403
|
-
if (rowDeleteContents) {
|
|
1404
|
-
rowDeleteContents.affixer.destroy();
|
|
1405
|
-
this.overlayService.close(rowDeleteContents.overlay);
|
|
1406
|
-
delete this.rowDeleteContents[id];
|
|
1407
|
-
this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== id);
|
|
1408
|
-
this._rowDeleteIds = (_a = this.rowDeleteIds) === null || _a === void 0 ? void 0 : _a.filter((arrayId) => arrayId !== id);
|
|
1409
|
-
this.rowDeleteIdsChange.emit(this._rowDeleteIds);
|
|
1410
|
-
}
|
|
1309
|
+
set parameters(value) {
|
|
1310
|
+
this.agInit(value);
|
|
1411
1311
|
}
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
// We must reaffix things when the data changes because the rows rerender and the previous element that the delete was affixed
|
|
1419
|
-
// to is destroyed.
|
|
1420
|
-
this.affixToRow(this.rowDeleteContents[config.id].affixer, config.id);
|
|
1421
|
-
}
|
|
1422
|
-
});
|
|
1312
|
+
/**
|
|
1313
|
+
* agInit is called by agGrid once after the renderer is created and provides the renderer with the information it needs.
|
|
1314
|
+
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
1315
|
+
*/
|
|
1316
|
+
agInit(params) {
|
|
1317
|
+
this.cellRendererParams = params;
|
|
1423
1318
|
this.changeDetector.markForCheck();
|
|
1424
1319
|
}
|
|
1320
|
+
isNumeric(value) {
|
|
1321
|
+
return !isNaN(parseFloat(value));
|
|
1322
|
+
}
|
|
1323
|
+
refresh(params) {
|
|
1324
|
+
return false;
|
|
1325
|
+
}
|
|
1425
1326
|
}
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
1429
|
-
type:
|
|
1327
|
+
SkyAgGridCellRendererCurrencyValidatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyValidatorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1328
|
+
SkyAgGridCellRendererCurrencyValidatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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", components: [{ type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: ["params"] }, { type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: ["params"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyValidatorComponent, decorators: [{
|
|
1330
|
+
type: Component,
|
|
1430
1331
|
args: [{
|
|
1431
|
-
selector: '
|
|
1332
|
+
selector: 'sky-ag-grid-cell-renderer-currency-validator',
|
|
1333
|
+
templateUrl: 'cell-renderer-currency-validator.component.html',
|
|
1334
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1432
1335
|
}]
|
|
1433
|
-
}], ctorParameters: function () { return [{ type:
|
|
1336
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { parameters: [{
|
|
1434
1337
|
type: Input
|
|
1435
|
-
}], rowDeleteCancel: [{
|
|
1436
|
-
type: Output
|
|
1437
|
-
}], rowDeleteConfirm: [{
|
|
1438
|
-
type: Output
|
|
1439
|
-
}], rowDeleteIdsChange: [{
|
|
1440
|
-
type: Output
|
|
1441
|
-
}], agGrid: [{
|
|
1442
|
-
type: ContentChild,
|
|
1443
|
-
args: [AgGridAngular]
|
|
1444
1338
|
}] } });
|
|
1445
1339
|
|
|
1340
|
+
class SkyAgGridCellValidatorModule {
|
|
1341
|
+
}
|
|
1342
|
+
SkyAgGridCellValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1343
|
+
SkyAgGridCellValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorModule, declarations: [SkyAgGridCellValidatorTooltipComponent], imports: [CommonModule, SkyPopoverModule, SkyStatusIndicatorModule], exports: [SkyAgGridCellValidatorTooltipComponent] });
|
|
1344
|
+
SkyAgGridCellValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorModule, imports: [[CommonModule, SkyPopoverModule, SkyStatusIndicatorModule]] });
|
|
1345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorModule, decorators: [{
|
|
1346
|
+
type: NgModule,
|
|
1347
|
+
args: [{
|
|
1348
|
+
declarations: [SkyAgGridCellValidatorTooltipComponent],
|
|
1349
|
+
exports: [SkyAgGridCellValidatorTooltipComponent],
|
|
1350
|
+
imports: [CommonModule, SkyPopoverModule, SkyStatusIndicatorModule],
|
|
1351
|
+
}]
|
|
1352
|
+
}] });
|
|
1353
|
+
|
|
1354
|
+
class SkyAgGridCellRendererCurrencyModule {
|
|
1355
|
+
}
|
|
1356
|
+
SkyAgGridCellRendererCurrencyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1357
|
+
SkyAgGridCellRendererCurrencyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyModule, declarations: [SkyAgGridCellRendererCurrencyComponent,
|
|
1358
|
+
SkyAgGridCellRendererCurrencyValidatorComponent], imports: [CommonModule,
|
|
1359
|
+
AgGridResourcesModule,
|
|
1360
|
+
SkyAgGridCellValidatorModule,
|
|
1361
|
+
FormsModule,
|
|
1362
|
+
SkyNumericModule], exports: [SkyAgGridCellRendererCurrencyComponent,
|
|
1363
|
+
SkyAgGridCellRendererCurrencyValidatorComponent] });
|
|
1364
|
+
SkyAgGridCellRendererCurrencyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyModule, imports: [[
|
|
1365
|
+
CommonModule,
|
|
1366
|
+
AgGridResourcesModule,
|
|
1367
|
+
SkyAgGridCellValidatorModule,
|
|
1368
|
+
FormsModule,
|
|
1369
|
+
SkyNumericModule,
|
|
1370
|
+
]] });
|
|
1371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyModule, decorators: [{
|
|
1372
|
+
type: NgModule,
|
|
1373
|
+
args: [{
|
|
1374
|
+
imports: [
|
|
1375
|
+
CommonModule,
|
|
1376
|
+
AgGridResourcesModule,
|
|
1377
|
+
SkyAgGridCellValidatorModule,
|
|
1378
|
+
FormsModule,
|
|
1379
|
+
SkyNumericModule,
|
|
1380
|
+
],
|
|
1381
|
+
declarations: [
|
|
1382
|
+
SkyAgGridCellRendererCurrencyComponent,
|
|
1383
|
+
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1384
|
+
],
|
|
1385
|
+
exports: [
|
|
1386
|
+
SkyAgGridCellRendererCurrencyComponent,
|
|
1387
|
+
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1388
|
+
],
|
|
1389
|
+
}]
|
|
1390
|
+
}] });
|
|
1391
|
+
|
|
1392
|
+
class SkyAgGridCellRendererLookupComponent {
|
|
1393
|
+
constructor(changeDetector) {
|
|
1394
|
+
this.changeDetector = changeDetector;
|
|
1395
|
+
this.value = '';
|
|
1396
|
+
this.summaryCount = 0;
|
|
1397
|
+
}
|
|
1398
|
+
agInit(params) {
|
|
1399
|
+
var _a;
|
|
1400
|
+
this.lookupProperties = applySkyLookupPropertiesDefaults(params);
|
|
1401
|
+
this.summaryCount = ((_a = params.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
1402
|
+
this.value = `${params.valueFormatted}`;
|
|
1403
|
+
this.changeDetector.markForCheck();
|
|
1404
|
+
}
|
|
1405
|
+
refresh(params) {
|
|
1406
|
+
this.agInit(params);
|
|
1407
|
+
return true;
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
SkyAgGridCellRendererLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1411
|
+
SkyAgGridCellRendererLookupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererLookupComponent, selector: "sky-cell-renderer-lookup", ngImport: i0, 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"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupComponent, decorators: [{
|
|
1413
|
+
type: Component,
|
|
1414
|
+
args: [{
|
|
1415
|
+
selector: 'sky-cell-renderer-lookup',
|
|
1416
|
+
templateUrl: './cell-renderer-lookup.component.html',
|
|
1417
|
+
styleUrls: ['./cell-renderer-lookup.component.scss'],
|
|
1418
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1419
|
+
}]
|
|
1420
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
1421
|
+
|
|
1422
|
+
class SkyAgGridCellRendererLookupModule {
|
|
1423
|
+
}
|
|
1424
|
+
SkyAgGridCellRendererLookupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1425
|
+
SkyAgGridCellRendererLookupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupModule, declarations: [SkyAgGridCellRendererLookupComponent], imports: [CommonModule, AgGridResourcesModule], exports: [SkyAgGridCellRendererLookupComponent] });
|
|
1426
|
+
SkyAgGridCellRendererLookupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupModule, imports: [[CommonModule, AgGridResourcesModule]] });
|
|
1427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupModule, decorators: [{
|
|
1428
|
+
type: NgModule,
|
|
1429
|
+
args: [{
|
|
1430
|
+
declarations: [SkyAgGridCellRendererLookupComponent],
|
|
1431
|
+
exports: [SkyAgGridCellRendererLookupComponent],
|
|
1432
|
+
imports: [CommonModule, AgGridResourcesModule],
|
|
1433
|
+
}]
|
|
1434
|
+
}] });
|
|
1435
|
+
|
|
1446
1436
|
/**
|
|
1447
1437
|
* @internal
|
|
1448
1438
|
*/
|
|
1449
|
-
class
|
|
1450
|
-
constructor() {
|
|
1451
|
-
this.
|
|
1439
|
+
class SkyAgGridCellRendererRowSelectorComponent {
|
|
1440
|
+
constructor(changeDetection) {
|
|
1441
|
+
this.changeDetection = changeDetection;
|
|
1452
1442
|
}
|
|
1453
1443
|
/**
|
|
1454
|
-
* agInit is called by agGrid once after the
|
|
1455
|
-
* @param params The cell
|
|
1444
|
+
* agInit is called by agGrid once after the cell is created and provides the renderer with the information it needs.
|
|
1445
|
+
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
1456
1446
|
*/
|
|
1457
1447
|
agInit(params) {
|
|
1458
1448
|
this.params = params;
|
|
1459
|
-
this.
|
|
1460
|
-
this.
|
|
1449
|
+
this.dataField = this.params.colDef && this.params.colDef.field;
|
|
1450
|
+
this.rowNode = this.params.node;
|
|
1461
1451
|
this.rowNumber = this.params.rowIndex + 1;
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
this.
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
}
|
|
1452
|
+
if (this.dataField) {
|
|
1453
|
+
this.checked = this.params.value;
|
|
1454
|
+
this.rowNode.setSelected(this.checked);
|
|
1455
|
+
}
|
|
1456
|
+
else {
|
|
1457
|
+
this.checked = this.rowNode.isSelected();
|
|
1458
|
+
}
|
|
1459
|
+
this.rowNode.addEventListener(RowNode.EVENT_ROW_SELECTED, (event) => {
|
|
1460
|
+
this.rowSelectedListener(event);
|
|
1461
|
+
});
|
|
1469
1462
|
}
|
|
1470
1463
|
/**
|
|
1471
|
-
*
|
|
1464
|
+
* Used by agGrid to update cell value after a user triggers a refresh. It updates the cell DOM and returns true when the refresh is
|
|
1465
|
+
* successful, or false if the cell should be destroyed and rerendered. If consumers have external logic that changes the value of a
|
|
1466
|
+
* checkbox cell, rerendering it will gurantee the change applies without knowing the consumer's implementation.
|
|
1472
1467
|
*/
|
|
1473
|
-
|
|
1474
|
-
|
|
1468
|
+
refresh() {
|
|
1469
|
+
return false;
|
|
1475
1470
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1471
|
+
updateRow() {
|
|
1472
|
+
this.rowNode.setSelected(this.checked);
|
|
1473
|
+
if (this.dataField) {
|
|
1474
|
+
this.rowNode.data[this.dataField] = this.checked;
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
rowSelectedListener(event) {
|
|
1478
|
+
this.checked = event.node.isSelected();
|
|
1479
|
+
if (this.dataField) {
|
|
1480
|
+
this.rowNode.data[this.dataField] = this.checked;
|
|
1481
|
+
}
|
|
1482
|
+
this.changeDetection.markForCheck();
|
|
1481
1483
|
}
|
|
1482
1484
|
}
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
1485
|
+
SkyAgGridCellRendererRowSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererRowSelectorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1486
|
+
SkyAgGridCellRendererRowSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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"], components: [{ type: i1$6.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }], directives: [{ type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1487
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererRowSelectorComponent, decorators: [{
|
|
1486
1488
|
type: Component,
|
|
1487
1489
|
args: [{
|
|
1488
|
-
selector: 'sky-ag-grid-cell-
|
|
1489
|
-
templateUrl: './cell-
|
|
1490
|
-
styleUrls: ['./cell-
|
|
1490
|
+
selector: 'sky-ag-grid-cell-renderer-row-selector',
|
|
1491
|
+
templateUrl: './cell-renderer-row-selector.component.html',
|
|
1492
|
+
styleUrls: ['./cell-renderer-row-selector.component.scss'],
|
|
1491
1493
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1494
|
+
encapsulation: ViewEncapsulation.None,
|
|
1492
1495
|
}]
|
|
1493
|
-
}],
|
|
1494
|
-
type: ViewChild,
|
|
1495
|
-
args: ['skyCellEditorCurrency', { read: ElementRef }]
|
|
1496
|
-
}] } });
|
|
1496
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
1497
1497
|
|
|
1498
|
-
class
|
|
1498
|
+
class SkyAgGridCellRendererRowSelectorModule {
|
|
1499
1499
|
}
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
1500
|
+
SkyAgGridCellRendererRowSelectorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererRowSelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1501
|
+
SkyAgGridCellRendererRowSelectorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererRowSelectorModule, declarations: [SkyAgGridCellRendererRowSelectorComponent], imports: [AgGridResourcesModule, SkyCheckboxModule, FormsModule], exports: [SkyAgGridCellRendererRowSelectorComponent] });
|
|
1502
|
+
SkyAgGridCellRendererRowSelectorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererRowSelectorModule, imports: [[AgGridResourcesModule, SkyCheckboxModule, FormsModule]] });
|
|
1503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererRowSelectorModule, decorators: [{
|
|
1504
1504
|
type: NgModule,
|
|
1505
1505
|
args: [{
|
|
1506
|
-
imports: [AgGridResourcesModule,
|
|
1507
|
-
declarations: [
|
|
1508
|
-
exports: [
|
|
1506
|
+
imports: [AgGridResourcesModule, SkyCheckboxModule, FormsModule],
|
|
1507
|
+
declarations: [SkyAgGridCellRendererRowSelectorComponent],
|
|
1508
|
+
exports: [SkyAgGridCellRendererRowSelectorComponent],
|
|
1509
1509
|
}]
|
|
1510
1510
|
}] });
|
|
1511
1511
|
|
|
@@ -1853,7 +1853,7 @@ class SkyAgGridService {
|
|
|
1853
1853
|
return mergedGridOptions;
|
|
1854
1854
|
}
|
|
1855
1855
|
mergeGridOptions(defaultGridOptions, providedGridOptions) {
|
|
1856
|
-
|
|
1856
|
+
const mergedGridOptions = Object.assign(Object.assign(Object.assign({}, defaultGridOptions), providedGridOptions), { columnTypes: Object.assign(Object.assign({}, providedGridOptions.columnTypes), defaultGridOptions.columnTypes), defaultColDef: Object.assign(Object.assign(Object.assign({}, defaultGridOptions.defaultColDef), providedGridOptions.defaultColDef), {
|
|
1857
1857
|
// allow consumers to override all defaultColDef properties except cellClassRules, which we reserve for styling
|
|
1858
1858
|
cellClassRules: defaultGridOptions.defaultColDef.cellClassRules }), icons: Object.assign(Object.assign({}, defaultGridOptions.icons), providedGridOptions.icons) });
|
|
1859
1859
|
return mergedGridOptions;
|
|
@@ -2042,7 +2042,7 @@ class SkyAgGridService {
|
|
|
2042
2042
|
this.agGridAdapterService.focusOnFocusableChildren(currentElement);
|
|
2043
2043
|
}
|
|
2044
2044
|
getDefaultEditableGridOptions(args) {
|
|
2045
|
-
|
|
2045
|
+
const defaultGridOptions = this.getDefaultGridOptions(args);
|
|
2046
2046
|
defaultGridOptions.rowSelection = 'none';
|
|
2047
2047
|
return defaultGridOptions;
|
|
2048
2048
|
}
|
|
@@ -2052,7 +2052,7 @@ class SkyAgGridService {
|
|
|
2052
2052
|
if (date && typeof date === 'string') {
|
|
2053
2053
|
date = new Date(params.value);
|
|
2054
2054
|
}
|
|
2055
|
-
|
|
2055
|
+
const formattedDate = date &&
|
|
2056
2056
|
date.toLocaleDateString &&
|
|
2057
2057
|
date.toLocaleDateString(locale, dateConfig);
|
|
2058
2058
|
if (date && date.getTime && !isNaN(date.getTime())) {
|
|
@@ -2078,16 +2078,16 @@ class SkyAgGridService {
|
|
|
2078
2078
|
return false;
|
|
2079
2079
|
}
|
|
2080
2080
|
}
|
|
2081
|
-
SkyAgGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridService, deps: [{ token: SkyAgGridAdapterService }, { token: i1$
|
|
2081
|
+
SkyAgGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridService, deps: [{ token: SkyAgGridAdapterService }, { token: i1$5.SkyThemeService, optional: true }, { token: i3$1.SkyLibResourcesService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2082
2082
|
SkyAgGridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridService, providedIn: 'any' });
|
|
2083
2083
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridService, decorators: [{
|
|
2084
2084
|
type: Injectable,
|
|
2085
2085
|
args: [{
|
|
2086
2086
|
providedIn: 'any',
|
|
2087
2087
|
}]
|
|
2088
|
-
}], ctorParameters: function () { return [{ type: SkyAgGridAdapterService }, { type: i1$
|
|
2088
|
+
}], ctorParameters: function () { return [{ type: SkyAgGridAdapterService }, { type: i1$5.SkyThemeService, decorators: [{
|
|
2089
2089
|
type: Optional
|
|
2090
|
-
}] }, { type: i3.SkyLibResourcesService, decorators: [{
|
|
2090
|
+
}] }, { type: i3$1.SkyLibResourcesService, decorators: [{
|
|
2091
2091
|
type: Optional
|
|
2092
2092
|
}] }]; } });
|
|
2093
2093
|
|