@skyux/ag-grid 5.5.0-alpha.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 +1667 -1661
- 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 +6 -2
- 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/ag-grid/types/lookup-properties.js +2 -0
- package/esm2015/lib/modules/ag-grid/types/lookup-properties.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 +1148 -1142
- 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/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.d.ts +1 -0
- package/lib/modules/ag-grid/types/lookup-properties.d.ts +5 -1
- package/package.json +24 -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,1332 +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
|
-
ariaLabel: skyLookupProperties.ariaLabel || '',
|
|
376
|
-
autocompleteAttribute: skyLookupProperties.autocompleteAttribute || 'off',
|
|
377
|
-
data: skyLookupProperties.data || [],
|
|
378
|
-
debounceTime: skyLookupProperties.debounceTime || 0,
|
|
379
|
-
descriptorProperty: skyLookupProperties.descriptorProperty || 'name',
|
|
380
|
-
disabled: skyLookupProperties.disabled || false,
|
|
381
|
-
enableShowMore: skyLookupProperties.enableShowMore || false,
|
|
382
|
-
idProperty: skyLookupProperties.idProperty || undefined,
|
|
383
|
-
placeholderText: skyLookupProperties.placeholderText || '',
|
|
384
|
-
propertiesToSearch: skyLookupProperties.propertiesToSearch || undefined,
|
|
385
|
-
search: skyLookupProperties.search || undefined,
|
|
386
|
-
searchFilters: skyLookupProperties.searchFilters || [],
|
|
387
|
-
searchResultsLimit: skyLookupProperties.searchResultsLimit || undefined,
|
|
388
|
-
searchResultTemplate: skyLookupProperties.searchResultTemplate || undefined,
|
|
389
|
-
searchTextMinimumCharacters: skyLookupProperties.searchTextMinimumCharacters || 1,
|
|
390
|
-
selectMode: skyLookupProperties.selectMode || undefined,
|
|
391
|
-
showAddButton: skyLookupProperties.showAddButton || false,
|
|
392
|
-
showMoreConfig: skyLookupProperties.showMoreConfig || {},
|
|
393
|
-
wrapperClass: 'ag-custom-component-popup',
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
class SkyAgGridCellEditorLookupComponent {
|
|
398
|
-
constructor(changeDetector, elementRef) {
|
|
399
|
-
this.changeDetector = changeDetector;
|
|
400
|
-
this.elementRef = elementRef;
|
|
401
|
-
this.isAlive = true;
|
|
402
|
-
this.lookupForm = new FormGroup({
|
|
403
|
-
currentSelection: new FormControl({
|
|
404
|
-
value: [],
|
|
405
|
-
disabled: false,
|
|
406
|
-
}),
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
agInit(params) {
|
|
410
|
-
this.params = params;
|
|
411
|
-
if (!Array.isArray(this.params.value)) {
|
|
412
|
-
throw new Error(`Lookup value must be an array`);
|
|
413
536
|
}
|
|
414
|
-
const
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
537
|
+
for (const config of this.rowDeleteConfigs) {
|
|
538
|
+
if (value.indexOf(config.id) < 0) {
|
|
539
|
+
this.destroyRowDelete(config.id);
|
|
540
|
+
}
|
|
418
541
|
}
|
|
419
|
-
this.skyComponentProperties = this.updateComponentProperties(this.params);
|
|
420
542
|
this.changeDetector.markForCheck();
|
|
421
543
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
this.isAlive = false;
|
|
425
|
-
this.changeDetector.detectChanges();
|
|
426
|
-
return false;
|
|
427
|
-
}
|
|
428
|
-
getGui() {
|
|
429
|
-
return this.elementRef.nativeElement;
|
|
430
|
-
}
|
|
431
|
-
getValue() {
|
|
432
|
-
return this.lookupForm.get('currentSelection').value;
|
|
433
|
-
}
|
|
434
|
-
isPopup() {
|
|
435
|
-
return true;
|
|
544
|
+
get rowDeleteIds() {
|
|
545
|
+
return this._rowDeleteIds;
|
|
436
546
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
(_a = this.elementRef.nativeElement.querySelector('.sky-lookup-input')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
547
|
+
get tableWidth() {
|
|
548
|
+
return this.elementRef.nativeElement.querySelectorAll('.sky-ag-grid')[0]
|
|
549
|
+
.offsetWidth;
|
|
441
550
|
}
|
|
442
|
-
|
|
443
|
-
const
|
|
444
|
-
|
|
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
|
+
};
|
|
445
578
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
selector: 'sky-ag-grid-cell-editor-lookup',
|
|
453
|
-
templateUrl: './cell-editor-lookup.component.html',
|
|
454
|
-
styleUrls: ['./cell-editor-lookup.component.scss'],
|
|
455
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
456
|
-
}]
|
|
457
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
|
|
458
|
-
|
|
459
|
-
class SkyAgGridCellEditorLookupModule {
|
|
460
|
-
}
|
|
461
|
-
SkyAgGridCellEditorLookupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
462
|
-
SkyAgGridCellEditorLookupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, declarations: [SkyAgGridCellEditorLookupComponent], imports: [CommonModule,
|
|
463
|
-
ReactiveFormsModule,
|
|
464
|
-
SkyI18nModule,
|
|
465
|
-
SkyInputBoxModule,
|
|
466
|
-
SkyLookupModule], exports: [SkyAgGridCellEditorLookupComponent] });
|
|
467
|
-
SkyAgGridCellEditorLookupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, imports: [[
|
|
468
|
-
CommonModule,
|
|
469
|
-
ReactiveFormsModule,
|
|
470
|
-
SkyI18nModule,
|
|
471
|
-
SkyInputBoxModule,
|
|
472
|
-
SkyLookupModule,
|
|
473
|
-
]] });
|
|
474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorLookupModule, decorators: [{
|
|
475
|
-
type: NgModule,
|
|
476
|
-
args: [{
|
|
477
|
-
declarations: [SkyAgGridCellEditorLookupComponent],
|
|
478
|
-
exports: [SkyAgGridCellEditorLookupComponent],
|
|
479
|
-
imports: [
|
|
480
|
-
CommonModule,
|
|
481
|
-
ReactiveFormsModule,
|
|
482
|
-
SkyI18nModule,
|
|
483
|
-
SkyInputBoxModule,
|
|
484
|
-
SkyLookupModule,
|
|
485
|
-
],
|
|
486
|
-
}]
|
|
487
|
-
}] });
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* @internal
|
|
491
|
-
*/
|
|
492
|
-
class SkyAgGridCellEditorNumberComponent {
|
|
493
|
-
/**
|
|
494
|
-
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
495
|
-
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
496
|
-
*/
|
|
497
|
-
agInit(params) {
|
|
498
|
-
this.params = params;
|
|
499
|
-
this.value = this.params.value;
|
|
500
|
-
this.columnHeader = this.params.colDef.headerName;
|
|
501
|
-
this.rowNumber = this.params.rowIndex + 1;
|
|
502
|
-
this.columnWidth = this.params.column.getActualWidth();
|
|
503
|
-
this.rowHeightWithoutBorders =
|
|
504
|
-
this.params.node && this.params.node.rowHeight - 4;
|
|
579
|
+
ngOnDestroy() {
|
|
580
|
+
this.ngUnsubscribe.next();
|
|
581
|
+
this.ngUnsubscribe.complete();
|
|
582
|
+
Object.keys(this.rowDeleteContents).forEach((id) => {
|
|
583
|
+
this.destroyRowDelete(id);
|
|
584
|
+
});
|
|
505
585
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
this.input.nativeElement.focus();
|
|
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
|
-
|
|
516
|
-
|
|
591
|
+
confirmRowDelete(row) {
|
|
592
|
+
this.rowDeleteConfigs.find((config) => config.id === row.id).pending = true;
|
|
593
|
+
this.rowDeleteConfirm.emit({ id: row.id });
|
|
594
|
+
}
|
|
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();
|
|
517
650
|
}
|
|
518
651
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
522
|
-
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,
|
|
523
656
|
args: [{
|
|
524
|
-
selector: '
|
|
525
|
-
templateUrl: './cell-editor-number.component.html',
|
|
526
|
-
styleUrls: ['./cell-editor-number.component.scss'],
|
|
527
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
657
|
+
selector: '[skyAgGridRowDelete]',
|
|
528
658
|
}]
|
|
529
|
-
}], propDecorators: {
|
|
530
|
-
type:
|
|
531
|
-
|
|
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]
|
|
532
670
|
}] } });
|
|
533
671
|
|
|
534
|
-
class SkyAgGridCellEditorNumberModule {
|
|
535
|
-
}
|
|
536
|
-
SkyAgGridCellEditorNumberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
537
|
-
SkyAgGridCellEditorNumberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, declarations: [SkyAgGridCellEditorNumberComponent], imports: [AgGridResourcesModule, FormsModule], exports: [SkyAgGridCellEditorNumberComponent] });
|
|
538
|
-
SkyAgGridCellEditorNumberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, imports: [[AgGridResourcesModule, FormsModule]] });
|
|
539
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberModule, decorators: [{
|
|
540
|
-
type: NgModule,
|
|
541
|
-
args: [{
|
|
542
|
-
imports: [AgGridResourcesModule, FormsModule],
|
|
543
|
-
declarations: [SkyAgGridCellEditorNumberComponent],
|
|
544
|
-
exports: [SkyAgGridCellEditorNumberComponent],
|
|
545
|
-
}]
|
|
546
|
-
}] });
|
|
547
|
-
|
|
548
672
|
/**
|
|
549
673
|
* @internal
|
|
550
674
|
*/
|
|
551
|
-
class
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
*/
|
|
675
|
+
class SkyAgGridCellEditorAutocompleteComponent {
|
|
676
|
+
constructor() {
|
|
677
|
+
this.skyComponentProperties = {};
|
|
678
|
+
}
|
|
556
679
|
agInit(params) {
|
|
557
680
|
this.params = params;
|
|
558
|
-
this.
|
|
559
|
-
this.columnHeader = this.params.colDef.headerName;
|
|
681
|
+
this.currentSelection = this.params.value;
|
|
682
|
+
this.columnHeader = this.params.colDef && this.params.colDef.headerName;
|
|
560
683
|
this.rowNumber = this.params.rowIndex + 1;
|
|
561
|
-
this.
|
|
562
|
-
this.rowHeightWithoutBorders =
|
|
563
|
-
this.params.node && this.params.node.rowHeight - 4;
|
|
684
|
+
this.skyComponentProperties = this.params.skyComponentProperties || {};
|
|
564
685
|
}
|
|
565
|
-
/**
|
|
566
|
-
* 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.
|
|
567
|
-
*/
|
|
568
686
|
afterGuiAttached() {
|
|
569
687
|
this.input.nativeElement.focus();
|
|
570
688
|
}
|
|
571
|
-
/**
|
|
572
|
-
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
573
|
-
*/
|
|
574
689
|
getValue() {
|
|
575
|
-
return this.
|
|
690
|
+
return this.currentSelection;
|
|
576
691
|
}
|
|
577
692
|
}
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
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: [{
|
|
581
696
|
type: Component,
|
|
582
697
|
args: [{
|
|
583
|
-
selector: 'sky-ag-grid-cell-editor-
|
|
584
|
-
templateUrl: './cell-editor-
|
|
585
|
-
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'],
|
|
586
701
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
587
702
|
}]
|
|
588
703
|
}], propDecorators: { input: [{
|
|
589
704
|
type: ViewChild,
|
|
590
|
-
args: ['
|
|
705
|
+
args: ['skyCellEditorAutocomplete', { read: ElementRef }]
|
|
591
706
|
}] } });
|
|
592
707
|
|
|
593
|
-
class SkyAgGridCellEditorTextModule {
|
|
594
|
-
}
|
|
595
|
-
SkyAgGridCellEditorTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
596
|
-
SkyAgGridCellEditorTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, declarations: [SkyAgGridCellEditorTextComponent], imports: [AgGridResourcesModule, FormsModule], exports: [SkyAgGridCellEditorTextComponent] });
|
|
597
|
-
SkyAgGridCellEditorTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, imports: [[AgGridResourcesModule, FormsModule]] });
|
|
598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, decorators: [{
|
|
599
|
-
type: NgModule,
|
|
600
|
-
args: [{
|
|
601
|
-
imports: [AgGridResourcesModule, FormsModule],
|
|
602
|
-
declarations: [SkyAgGridCellEditorTextComponent],
|
|
603
|
-
exports: [SkyAgGridCellEditorTextComponent],
|
|
604
|
-
}]
|
|
605
|
-
}] });
|
|
606
|
-
|
|
607
708
|
/**
|
|
608
|
-
*
|
|
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.
|
|
609
713
|
*/
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
if (typeof ((_d = this.cellRendererParams.skyComponentProperties) === null || _d === void 0 ? void 0 : _d.validatorMessage) === 'function') {
|
|
640
|
-
this.validatorMessage =
|
|
641
|
-
this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams.rowIndex);
|
|
642
|
-
}
|
|
643
|
-
else {
|
|
644
|
-
this.validatorMessage =
|
|
645
|
-
(_e = this.cellRendererParams.skyComponentProperties) === null || _e === void 0 ? void 0 : _e.validatorMessage;
|
|
646
|
-
}
|
|
647
|
-
this.changeDetector.markForCheck();
|
|
648
|
-
}
|
|
649
|
-
hideIndicator() {
|
|
650
|
-
this.zone.run(() => {
|
|
651
|
-
this.indicatorShouldShow = false;
|
|
652
|
-
this.changeDetector.detectChanges();
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
hidePopover() {
|
|
656
|
-
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Close });
|
|
657
|
-
}
|
|
658
|
-
showIndicator() {
|
|
659
|
-
this.zone.run(() => {
|
|
660
|
-
this.indicatorShouldShow = true;
|
|
661
|
-
this.changeDetector.detectChanges();
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
showPopover() {
|
|
665
|
-
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);
|
|
666
743
|
}
|
|
667
744
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
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,
|
|
672
761
|
args: [{
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
762
|
+
exports: [SkyI18nModule],
|
|
763
|
+
providers: [
|
|
764
|
+
{
|
|
765
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
766
|
+
useClass: AgGridResourcesProvider,
|
|
767
|
+
multi: true,
|
|
768
|
+
},
|
|
769
|
+
],
|
|
677
770
|
}]
|
|
678
|
-
}]
|
|
679
|
-
|
|
680
|
-
|
|
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
|
+
}] });
|
|
681
786
|
|
|
682
787
|
/**
|
|
683
788
|
* @internal
|
|
684
789
|
*/
|
|
685
|
-
class
|
|
790
|
+
class SkyAgGridCellEditorCurrencyComponent {
|
|
686
791
|
constructor() {
|
|
687
792
|
this.skyComponentProperties = {};
|
|
688
|
-
this.numericOptions = {};
|
|
689
|
-
}
|
|
690
|
-
set params(value) {
|
|
691
|
-
this.agInit(value);
|
|
692
793
|
}
|
|
693
794
|
/**
|
|
694
|
-
* agInit is called by agGrid once after the
|
|
695
|
-
* @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.
|
|
696
797
|
*/
|
|
697
798
|
agInit(params) {
|
|
698
|
-
this.
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
updateProperties(params) {
|
|
704
|
-
var _a;
|
|
705
|
-
this._params = params;
|
|
706
|
-
this.value = this._params.value;
|
|
707
|
-
this.columnHeader = this._params.colDef && this._params.colDef.headerName;
|
|
708
|
-
this.rowNumber = this._params.rowIndex + 1;
|
|
709
|
-
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();
|
|
710
804
|
this.rowHeightWithoutBorders =
|
|
711
|
-
this.
|
|
712
|
-
this.skyComponentProperties = this.
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
SkyAgGridCellRendererCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
719
|
-
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 });
|
|
720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererCurrencyComponent, decorators: [{
|
|
721
|
-
type: Component,
|
|
722
|
-
args: [{
|
|
723
|
-
selector: 'sky-ag-grid-cell-renderer-currency',
|
|
724
|
-
templateUrl: './cell-renderer-currency.component.html',
|
|
725
|
-
styleUrls: ['./cell-renderer-currency.component.scss'],
|
|
726
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
727
|
-
}]
|
|
728
|
-
}], propDecorators: { params: [{
|
|
729
|
-
type: Input
|
|
730
|
-
}] } });
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* @internal
|
|
734
|
-
*/
|
|
735
|
-
class SkyAgGridCellRendererCurrencyValidatorComponent {
|
|
736
|
-
constructor(changeDetector) {
|
|
737
|
-
this.changeDetector = changeDetector;
|
|
738
|
-
}
|
|
739
|
-
set parameters(value) {
|
|
740
|
-
this.agInit(value);
|
|
805
|
+
this.params.node && this.params.node.rowHeight - 4;
|
|
806
|
+
this.skyComponentProperties = this.params.skyComponentProperties || {
|
|
807
|
+
decimalPlaces: 2,
|
|
808
|
+
currencySymbol: '$',
|
|
809
|
+
};
|
|
741
810
|
}
|
|
742
811
|
/**
|
|
743
|
-
*
|
|
744
|
-
* @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.
|
|
745
813
|
*/
|
|
746
|
-
|
|
747
|
-
this.
|
|
748
|
-
this.changeDetector.markForCheck();
|
|
749
|
-
}
|
|
750
|
-
isNumeric(value) {
|
|
751
|
-
return !isNaN(parseFloat(value));
|
|
814
|
+
afterGuiAttached() {
|
|
815
|
+
this.input.nativeElement.focus();
|
|
752
816
|
}
|
|
753
|
-
|
|
754
|
-
|
|
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;
|
|
755
822
|
}
|
|
756
823
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
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: [{
|
|
760
827
|
type: Component,
|
|
761
828
|
args: [{
|
|
762
|
-
selector: 'sky-ag-grid-cell-
|
|
763
|
-
templateUrl: 'cell-
|
|
829
|
+
selector: 'sky-ag-grid-cell-editor-currency',
|
|
830
|
+
templateUrl: './cell-editor-currency.component.html',
|
|
831
|
+
styleUrls: ['./cell-editor-currency.component.scss'],
|
|
764
832
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
765
833
|
}]
|
|
766
|
-
}],
|
|
767
|
-
type:
|
|
834
|
+
}], propDecorators: { input: [{
|
|
835
|
+
type: ViewChild,
|
|
836
|
+
args: ['skyCellEditorCurrency', { read: ElementRef }]
|
|
768
837
|
}] } });
|
|
769
838
|
|
|
770
|
-
class
|
|
771
|
-
constructor(changeDetector) {
|
|
772
|
-
this.changeDetector = changeDetector;
|
|
773
|
-
this.value = '';
|
|
774
|
-
this.summaryCount = 0;
|
|
775
|
-
}
|
|
776
|
-
agInit(params) {
|
|
777
|
-
var _a;
|
|
778
|
-
this.lookupProperties = applySkyLookupPropertiesDefaults(params);
|
|
779
|
-
this.summaryCount = ((_a = params.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
780
|
-
this.value = `${params.valueFormatted}`;
|
|
781
|
-
this.changeDetector.markForCheck();
|
|
782
|
-
}
|
|
783
|
-
refresh(params) {
|
|
784
|
-
this.agInit(params);
|
|
785
|
-
return true;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
SkyAgGridCellRendererLookupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
789
|
-
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 });
|
|
790
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellRendererLookupComponent, decorators: [{
|
|
791
|
-
type: Component,
|
|
792
|
-
args: [{
|
|
793
|
-
selector: 'sky-cell-renderer-lookup',
|
|
794
|
-
templateUrl: './cell-renderer-lookup.component.html',
|
|
795
|
-
styleUrls: ['./cell-renderer-lookup.component.scss'],
|
|
796
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
797
|
-
}]
|
|
798
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
799
|
-
|
|
800
|
-
class SkyAgGridCellRendererLookupModule {
|
|
839
|
+
class SkyAgGridCellEditorCurrencyModule {
|
|
801
840
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
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: [{
|
|
806
845
|
type: NgModule,
|
|
807
846
|
args: [{
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
847
|
+
imports: [AgGridResourcesModule, FormsModule, SkyAutonumericModule],
|
|
848
|
+
declarations: [SkyAgGridCellEditorCurrencyComponent],
|
|
849
|
+
exports: [SkyAgGridCellEditorCurrencyComponent],
|
|
811
850
|
}]
|
|
812
851
|
}] });
|
|
813
852
|
|
|
814
853
|
/**
|
|
815
854
|
* @internal
|
|
816
855
|
*/
|
|
817
|
-
class
|
|
818
|
-
constructor(
|
|
819
|
-
|
|
856
|
+
class SkyAgGridCellEditorDatepickerComponent extends PopupComponent {
|
|
857
|
+
constructor(themeSvc) {
|
|
858
|
+
super();
|
|
859
|
+
this.themeSvc = themeSvc;
|
|
860
|
+
this.skyComponentProperties = {};
|
|
820
861
|
}
|
|
821
862
|
/**
|
|
822
|
-
* agInit is called by agGrid once after the
|
|
823
|
-
* @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.
|
|
824
865
|
*/
|
|
825
866
|
agInit(params) {
|
|
867
|
+
var _a;
|
|
826
868
|
this.params = params;
|
|
827
|
-
this.
|
|
828
|
-
this.
|
|
829
|
-
this.
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
this.
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
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
|
+
}
|
|
839
886
|
});
|
|
840
887
|
}
|
|
841
888
|
/**
|
|
842
|
-
*
|
|
843
|
-
* successful, or false if the cell should be destroyed and rerendered. If consumers have external logic that changes the value of a
|
|
844
|
-
* 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.
|
|
845
890
|
*/
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
}
|
|
849
|
-
updateRow() {
|
|
850
|
-
this.rowNode.setSelected(this.checked);
|
|
851
|
-
if (this.dataField) {
|
|
852
|
-
this.rowNode.data[this.dataField] = this.checked;
|
|
853
|
-
}
|
|
891
|
+
afterGuiAttached() {
|
|
892
|
+
this.focusOnDatepickerInput();
|
|
854
893
|
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
this.
|
|
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;
|
|
900
|
+
}
|
|
901
|
+
focusOnDatepickerInput() {
|
|
902
|
+
this.datepickerInput.nativeElement.focus();
|
|
861
903
|
}
|
|
862
904
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
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: [{
|
|
866
908
|
type: Component,
|
|
867
909
|
args: [{
|
|
868
|
-
selector: 'sky-ag-grid-cell-
|
|
869
|
-
templateUrl: './cell-
|
|
870
|
-
styleUrls: ['./cell-
|
|
910
|
+
selector: 'sky-ag-grid-cell-editor-datepicker',
|
|
911
|
+
templateUrl: './cell-editor-datepicker.component.html',
|
|
912
|
+
styleUrls: ['./cell-editor-datepicker.component.scss'],
|
|
871
913
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
872
914
|
encapsulation: ViewEncapsulation.None,
|
|
873
915
|
}]
|
|
874
|
-
}], 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
|
+
}] } });
|
|
875
922
|
|
|
876
|
-
class
|
|
923
|
+
class SkyAgGridCellEditorDatepickerModule {
|
|
877
924
|
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
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: [{
|
|
882
929
|
type: NgModule,
|
|
883
930
|
args: [{
|
|
884
|
-
imports: [
|
|
885
|
-
declarations: [
|
|
886
|
-
exports: [
|
|
931
|
+
imports: [SkyDatepickerModule, FormsModule],
|
|
932
|
+
declarations: [SkyAgGridCellEditorDatepickerComponent],
|
|
933
|
+
exports: [SkyAgGridCellEditorDatepickerComponent],
|
|
887
934
|
}]
|
|
888
935
|
}] });
|
|
889
936
|
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
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) {
|
|
895
965
|
this.changeDetector = changeDetector;
|
|
896
|
-
this.
|
|
897
|
-
this.
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
this.
|
|
905
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
906
|
-
.subscribe(() => this.checkForAgGrid());
|
|
907
|
-
this.skyAgGridWrapperList.changes
|
|
908
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
909
|
-
.subscribe(() => this.checkForSkyAgGridWrapper());
|
|
910
|
-
}
|
|
911
|
-
ngOnDestroy() {
|
|
912
|
-
this.ngUnsubscribe.next();
|
|
913
|
-
this.ngUnsubscribe.complete();
|
|
914
|
-
}
|
|
915
|
-
checkForAgGrid() {
|
|
916
|
-
const agGridCount = this.agGridList.length;
|
|
917
|
-
/* istanbul ignore else */
|
|
918
|
-
if (agGridCount === 0) {
|
|
919
|
-
this.unregisterAgGrid();
|
|
920
|
-
}
|
|
921
|
-
else if (this.agGridList.first !== this.currentAgGrid) {
|
|
922
|
-
this.registerAgGrid();
|
|
923
|
-
}
|
|
924
|
-
if (agGridCount > 1) {
|
|
925
|
-
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
926
|
-
}
|
|
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;
|
|
927
975
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
this.unregisterSkyAgGridWrapper();
|
|
933
|
-
}
|
|
934
|
-
else if (this.skyAgGridWrapperList.first !== this.currentSkyAgGridWrapper) {
|
|
935
|
-
this.registerSkyAgGridWrapper();
|
|
936
|
-
}
|
|
937
|
-
if (skyAgGridWrapperCount > 1) {
|
|
938
|
-
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`);
|
|
939
980
|
}
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
this.
|
|
943
|
-
|
|
944
|
-
if (this.dataStateSub) {
|
|
945
|
-
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();
|
|
946
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();
|
|
947
991
|
}
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
this.currentSkyAgGridWrapper = this.skyAgGridWrapperList.first;
|
|
954
|
-
setTimeout(() => {
|
|
955
|
-
if (this.currentSkyAgGridWrapper) {
|
|
956
|
-
this.currentSkyAgGridWrapper.viewkeeperClasses = [];
|
|
957
|
-
}
|
|
958
|
-
});
|
|
959
|
-
}
|
|
960
|
-
registerAgGrid() {
|
|
961
|
-
this.unregisterAgGrid();
|
|
962
|
-
const agGrid = this.agGridList.first;
|
|
963
|
-
this.currentAgGrid = agGrid;
|
|
964
|
-
agGrid.gridReady.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
|
|
965
|
-
this.viewConfig.onSelectAllClick = this.selectAll.bind(this);
|
|
966
|
-
this.viewConfig.onClearAllClick = this.clearAll.bind(this);
|
|
967
|
-
this.dataManagerSvc.updateViewConfig(this.viewConfig);
|
|
968
|
-
this.dataStateSub = this.dataManagerSvc
|
|
969
|
-
.getDataStateUpdates(this.viewConfig.id)
|
|
970
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
971
|
-
.subscribe((dataState) => {
|
|
972
|
-
this.currentDataState = dataState;
|
|
973
|
-
this.displayColumns(dataState);
|
|
974
|
-
});
|
|
975
|
-
agGrid.api.sizeColumnsToFit();
|
|
976
|
-
});
|
|
977
|
-
agGrid.columnMoved
|
|
978
|
-
.pipe(takeUntil(this.ngUnsubscribe), filter((event) => ![
|
|
979
|
-
'gridInitializing',
|
|
980
|
-
'uiColumnResized',
|
|
981
|
-
'uiColumnDragged',
|
|
982
|
-
'api',
|
|
983
|
-
].includes(event.source)))
|
|
984
|
-
.subscribe((value) => {
|
|
985
|
-
this.updateColumnsInCurrentDataState(value.columnApi);
|
|
986
|
-
});
|
|
987
|
-
let currentColumns;
|
|
988
|
-
agGrid.dragStarted
|
|
989
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
990
|
-
.subscribe((value) => {
|
|
991
|
-
currentColumns = this.getColumnOrder(value.columnApi);
|
|
992
|
-
});
|
|
993
|
-
agGrid.dragStopped
|
|
994
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
995
|
-
.subscribe((value) => {
|
|
996
|
-
const newColumns = this.getColumnOrder(value.columnApi);
|
|
997
|
-
const hasChanged = currentColumns.findIndex((colId, i) => colId !== newColumns[i]);
|
|
998
|
-
if (hasChanged > -1) {
|
|
999
|
-
this.updateColumnsInCurrentDataState(value.columnApi);
|
|
1000
|
-
}
|
|
1001
|
-
});
|
|
1002
|
-
agGrid.rowSelected
|
|
1003
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1004
|
-
.subscribe((event) => {
|
|
1005
|
-
const row = event.node;
|
|
1006
|
-
let selectedIds = this.currentDataState.selectedIds || [];
|
|
1007
|
-
const rowIndex = selectedIds.indexOf(row.data.id);
|
|
1008
|
-
if (row.isSelected() && rowIndex === -1) {
|
|
1009
|
-
selectedIds.push(row.data.id);
|
|
1010
|
-
}
|
|
1011
|
-
else if (!row.isSelected() && rowIndex !== -1) {
|
|
1012
|
-
selectedIds.splice(rowIndex, 1);
|
|
1013
|
-
}
|
|
1014
|
-
this.currentDataState.selectedIds = selectedIds;
|
|
1015
|
-
this.dataManagerSvc.updateDataState(this.currentDataState, this.viewConfig.id);
|
|
1016
|
-
this.changeDetector.markForCheck();
|
|
1017
|
-
});
|
|
1018
|
-
agGrid.sortChanged.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
|
|
1019
|
-
const gridColumnStates = agGrid.columnApi.getColumnState();
|
|
1020
|
-
let sortOption;
|
|
1021
|
-
/* istanbul ignore else */
|
|
1022
|
-
if (gridColumnStates.length) {
|
|
1023
|
-
const activeSortColumnState = gridColumnStates.find((aGridColumnState) => aGridColumnState.sortIndex === 0);
|
|
1024
|
-
const dataManagerConfig = this.dataManagerSvc.getCurrentDataManagerConfig();
|
|
1025
|
-
/* istanbul ignore else */
|
|
1026
|
-
if (dataManagerConfig.sortOptions && activeSortColumnState) {
|
|
1027
|
-
sortOption = dataManagerConfig.sortOptions.find((option) => {
|
|
1028
|
-
return (option.propertyName === activeSortColumnState.colId &&
|
|
1029
|
-
option.descending === (activeSortColumnState.sort === 'desc'));
|
|
1030
|
-
});
|
|
1031
|
-
}
|
|
1032
|
-
else {
|
|
1033
|
-
sortOption = undefined;
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
this.currentDataState.activeSortOption = sortOption;
|
|
1037
|
-
this.dataManagerSvc.updateDataState(this.currentDataState, this.viewConfig.id);
|
|
1038
|
-
});
|
|
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;
|
|
1039
997
|
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
const viewState = this.currentDataState.getViewStateById(this.viewConfig.id);
|
|
1043
|
-
viewState.displayedColumnIds = columnOrder;
|
|
1044
|
-
this.dataManagerSvc.updateDataState(this.currentDataState.addOrUpdateView(this.viewConfig.id, viewState), this.viewConfig.id);
|
|
998
|
+
getGui() {
|
|
999
|
+
return this.elementRef.nativeElement;
|
|
1045
1000
|
}
|
|
1046
|
-
|
|
1047
|
-
return
|
|
1048
|
-
.getAllDisplayedVirtualColumns()
|
|
1049
|
-
.map((col) => col.getColDef().colId);
|
|
1001
|
+
getValue() {
|
|
1002
|
+
return this.lookupForm.get('currentSelection').value;
|
|
1050
1003
|
}
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
const viewState = dataState.getViewStateById(this.viewConfig.id);
|
|
1054
|
-
let displayedColumnIds = [];
|
|
1055
|
-
/*istanbul ignore else*/
|
|
1056
|
-
if (viewState.displayedColumnIds) {
|
|
1057
|
-
displayedColumnIds = viewState.displayedColumnIds;
|
|
1058
|
-
}
|
|
1059
|
-
const columns = agGrid.columnApi.getAllColumns();
|
|
1060
|
-
for (const column of columns) {
|
|
1061
|
-
const colId = column.getColId();
|
|
1062
|
-
const colIndex = displayedColumnIds.indexOf(colId);
|
|
1063
|
-
agGrid.columnApi.setColumnVisible(colId, colIndex !== -1);
|
|
1064
|
-
agGrid.columnApi.moveColumn(colId, colIndex);
|
|
1065
|
-
}
|
|
1004
|
+
isPopup() {
|
|
1005
|
+
return true;
|
|
1066
1006
|
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
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();
|
|
1070
1011
|
}
|
|
1071
|
-
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1012
|
+
updateComponentProperties(params) {
|
|
1013
|
+
const skyLookupProperties = params.skyComponentProperties;
|
|
1014
|
+
return applySkyLookupPropertiesDefaults(skyLookupProperties);
|
|
1074
1015
|
}
|
|
1075
1016
|
}
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
1079
|
-
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,
|
|
1080
1021
|
args: [{
|
|
1081
|
-
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,
|
|
1082
1026
|
}]
|
|
1083
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type:
|
|
1084
|
-
type: Input
|
|
1085
|
-
}], agGridList: [{
|
|
1086
|
-
type: ContentChildren,
|
|
1087
|
-
args: [AgGridAngular, { descendants: true }]
|
|
1088
|
-
}], skyAgGridWrapperList: [{
|
|
1089
|
-
type: ContentChildren,
|
|
1090
|
-
args: [SkyAgGridWrapperComponent, { descendants: true }]
|
|
1091
|
-
}] } });
|
|
1027
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
|
|
1092
1028
|
|
|
1093
|
-
class
|
|
1029
|
+
class SkyAgGridCellEditorLookupModule {
|
|
1094
1030
|
}
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
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: [{
|
|
1099
1045
|
type: NgModule,
|
|
1100
1046
|
args: [{
|
|
1101
|
-
declarations: [
|
|
1102
|
-
exports: [
|
|
1103
|
-
imports: [
|
|
1047
|
+
declarations: [SkyAgGridCellEditorLookupComponent],
|
|
1048
|
+
exports: [SkyAgGridCellEditorLookupComponent],
|
|
1049
|
+
imports: [
|
|
1050
|
+
CommonModule,
|
|
1051
|
+
ReactiveFormsModule,
|
|
1052
|
+
SkyI18nModule,
|
|
1053
|
+
SkyInputBoxModule,
|
|
1054
|
+
SkyLookupModule,
|
|
1055
|
+
],
|
|
1104
1056
|
}]
|
|
1105
1057
|
}] });
|
|
1106
1058
|
|
|
1107
|
-
|
|
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
|
+
}
|
|
1108
1088
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
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: [{
|
|
1125
1110
|
type: NgModule,
|
|
1126
1111
|
args: [{
|
|
1127
|
-
imports: [
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
SkyAgGridCellValidatorModule,
|
|
1131
|
-
FormsModule,
|
|
1132
|
-
SkyNumericModule,
|
|
1133
|
-
],
|
|
1134
|
-
declarations: [
|
|
1135
|
-
SkyAgGridCellRendererCurrencyComponent,
|
|
1136
|
-
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1137
|
-
],
|
|
1138
|
-
exports: [
|
|
1139
|
-
SkyAgGridCellRendererCurrencyComponent,
|
|
1140
|
-
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1141
|
-
],
|
|
1112
|
+
imports: [AgGridResourcesModule, FormsModule],
|
|
1113
|
+
declarations: [SkyAgGridCellEditorNumberComponent],
|
|
1114
|
+
exports: [SkyAgGridCellEditorNumberComponent],
|
|
1142
1115
|
}]
|
|
1143
1116
|
}] });
|
|
1144
1117
|
|
|
1145
1118
|
/**
|
|
1146
|
-
* Component for rendering the inline delete template in the overlay.
|
|
1147
1119
|
* @internal
|
|
1148
1120
|
*/
|
|
1149
|
-
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
|
+
}
|
|
1150
1147
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
let-row
|
|
1155
|
-
let-tableWidth="tableWidth()"
|
|
1156
|
-
let-getRowDeleteItem="getRowDeleteItem"
|
|
1157
|
-
let-cancelRowDelete="cancelRowDelete"
|
|
1158
|
-
let-confirmRowDelete="confirmRowDelete"
|
|
1159
|
-
#inlineDeleteTemplateRef
|
|
1160
|
-
>
|
|
1161
|
-
<div
|
|
1162
|
-
class="sky-ag-grid-row-delete"
|
|
1163
|
-
[id]="'row-delete-ref-' + row.id"
|
|
1164
|
-
[ngStyle]="{
|
|
1165
|
-
height: row.rowHeight + 'px',
|
|
1166
|
-
position: 'fixed',
|
|
1167
|
-
width: tableWidth + 'px'
|
|
1168
|
-
}"
|
|
1169
|
-
#inlineDeleteRef
|
|
1170
|
-
>
|
|
1171
|
-
<sky-inline-delete
|
|
1172
|
-
[pending]="getRowDeleteItem(row).pending"
|
|
1173
|
-
(cancelTriggered)="cancelRowDelete(row)"
|
|
1174
|
-
(deleteTriggered)="confirmRowDelete(row)"
|
|
1175
|
-
></sky-inline-delete>
|
|
1176
|
-
</div>
|
|
1177
|
-
</ng-template>
|
|
1178
|
-
`, 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"] }] });
|
|
1179
|
-
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: [{
|
|
1180
1151
|
type: Component,
|
|
1181
1152
|
args: [{
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
(cancelTriggered)="cancelRowDelete(row)"
|
|
1204
|
-
(deleteTriggered)="confirmRowDelete(row)"
|
|
1205
|
-
></sky-inline-delete>
|
|
1206
|
-
</div>
|
|
1207
|
-
</ng-template>
|
|
1208
|
-
`,
|
|
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],
|
|
1209
1174
|
}]
|
|
1210
|
-
}]
|
|
1211
|
-
type: ViewChildren,
|
|
1212
|
-
args: ['inlineDeleteRef']
|
|
1213
|
-
}], inlineDeleteTemplateRef: [{
|
|
1214
|
-
type: ViewChild,
|
|
1215
|
-
args: ['inlineDeleteTemplateRef', { read: TemplateRef }]
|
|
1216
|
-
}] } });
|
|
1175
|
+
}] });
|
|
1217
1176
|
|
|
1218
1177
|
/**
|
|
1219
1178
|
* @internal
|
|
1220
1179
|
*/
|
|
1221
|
-
class
|
|
1222
|
-
constructor(
|
|
1223
|
-
this.affixService = affixService;
|
|
1180
|
+
class SkyAgGridCellValidatorTooltipComponent {
|
|
1181
|
+
constructor(changeDetector, zone) {
|
|
1224
1182
|
this.changeDetector = changeDetector;
|
|
1225
|
-
this.
|
|
1226
|
-
this.
|
|
1227
|
-
this.
|
|
1228
|
-
this.viewContainerRef = viewContainerRef;
|
|
1229
|
-
/**
|
|
1230
|
-
* Emits a `SkyAgGridRowDeleteCancelArgs` object when a row's inline delete is cancelled.
|
|
1231
|
-
*/
|
|
1232
|
-
this.rowDeleteCancel = new EventEmitter();
|
|
1233
|
-
/**
|
|
1234
|
-
* Emits a `SkyAgGridRowDeleteConfirmArgs` object when a row's inline delete is confirmed.
|
|
1235
|
-
*/
|
|
1236
|
-
this.rowDeleteConfirm = new EventEmitter();
|
|
1237
|
-
/**
|
|
1238
|
-
* Emits when the list of ids of the data in the rows where inline deletes are shown changes.
|
|
1239
|
-
*/
|
|
1240
|
-
this.rowDeleteIdsChange = new EventEmitter();
|
|
1241
|
-
this.rowDeleteConfigs = [];
|
|
1242
|
-
this.ngUnsubscribe = new Subject();
|
|
1243
|
-
this.rowDeleteContents = {};
|
|
1183
|
+
this.zone = zone;
|
|
1184
|
+
this.indicatorShouldShow = true;
|
|
1185
|
+
this.popoverMessageStream = new Subject();
|
|
1244
1186
|
}
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
this.
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
this.
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
return;
|
|
1256
|
-
}
|
|
1257
|
-
for (let id of value) {
|
|
1258
|
-
const existingConfig = this.rowDeleteConfigs.find((config) => config.id === id);
|
|
1259
|
-
if (existingConfig) {
|
|
1260
|
-
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();
|
|
1261
1197
|
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
let overlay = this.overlayService.create({
|
|
1268
|
-
enableScroll: true,
|
|
1269
|
-
showBackdrop: false,
|
|
1270
|
-
closeOnNavigation: true,
|
|
1271
|
-
enableClose: false,
|
|
1272
|
-
enablePointerEvents: true,
|
|
1273
|
-
});
|
|
1274
|
-
overlay.attachTemplate(this.rowDeleteComponent.inlineDeleteTemplateRef, {
|
|
1275
|
-
$implicit: this.agGrid.api.getRowNode(id),
|
|
1276
|
-
tableWidth: () => {
|
|
1277
|
-
return this.tableWidth;
|
|
1278
|
-
},
|
|
1279
|
-
getRowDeleteItem: (row) => this.getRowDeleteItem(row),
|
|
1280
|
-
cancelRowDelete: (row) => this.cancelRowDelete(row),
|
|
1281
|
-
confirmRowDelete: (row) => this.confirmRowDelete(row),
|
|
1282
|
-
});
|
|
1283
|
-
/**
|
|
1284
|
-
* We are manually setting the z-index here because overlays will always be on top of
|
|
1285
|
-
* the omnibar. This manual setting is 2 less than the omnibar's z-index of 1000 and one less than
|
|
1286
|
-
* the header row's viewkeeper which is 999. We discussed changing the overlay service to allow for this
|
|
1287
|
-
* but decided against that change at this time due to its niche nature.
|
|
1288
|
-
*/
|
|
1289
|
-
overlay.componentRef.instance.zIndex = '998';
|
|
1290
|
-
setTimeout(() => {
|
|
1291
|
-
const inlineDeleteRef = this.rowDeleteComponent.inlineDeleteRefs
|
|
1292
|
-
.toArray()
|
|
1293
|
-
.find((elRef) => {
|
|
1294
|
-
return elRef.nativeElement.id === 'row-delete-ref-' + id;
|
|
1295
|
-
});
|
|
1296
|
-
let affixer = this.affixService.createAffixer(inlineDeleteRef);
|
|
1297
|
-
this.affixToRow(affixer, id);
|
|
1298
|
-
this.rowDeleteContents[id] = {
|
|
1299
|
-
affixer: affixer,
|
|
1300
|
-
overlay: overlay,
|
|
1301
|
-
};
|
|
1302
|
-
});
|
|
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();
|
|
1303
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);
|
|
1304
1212
|
}
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
this.
|
|
1308
|
-
}
|
|
1213
|
+
else {
|
|
1214
|
+
this.validatorMessage =
|
|
1215
|
+
(_e = this.cellRendererParams.skyComponentProperties) === null || _e === void 0 ? void 0 : _e.validatorMessage;
|
|
1309
1216
|
}
|
|
1310
1217
|
this.changeDetector.markForCheck();
|
|
1311
1218
|
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1219
|
+
hideIndicator() {
|
|
1220
|
+
this.zone.run(() => {
|
|
1221
|
+
this.indicatorShouldShow = false;
|
|
1222
|
+
this.changeDetector.detectChanges();
|
|
1223
|
+
});
|
|
1314
1224
|
}
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
.offsetWidth;
|
|
1225
|
+
hidePopover() {
|
|
1226
|
+
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Close });
|
|
1318
1227
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
this.
|
|
1323
|
-
this.agGrid.rowDataChanged
|
|
1324
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1325
|
-
.subscribe(() => {
|
|
1326
|
-
this.updateRowDeleteStates();
|
|
1327
|
-
});
|
|
1328
|
-
this.agGrid.rowDataUpdated
|
|
1329
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1330
|
-
.subscribe(() => {
|
|
1331
|
-
this.updateRowDeleteStates();
|
|
1332
|
-
});
|
|
1333
|
-
this.agGrid.sortChanged
|
|
1334
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1335
|
-
.subscribe(() => {
|
|
1336
|
-
this.updateRowDeleteStates();
|
|
1337
|
-
});
|
|
1338
|
-
this.agGrid.filterChanged
|
|
1339
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1340
|
-
.subscribe(() => {
|
|
1341
|
-
this.updateRowDeleteStates();
|
|
1228
|
+
showIndicator() {
|
|
1229
|
+
this.zone.run(() => {
|
|
1230
|
+
this.indicatorShouldShow = true;
|
|
1231
|
+
this.changeDetector.detectChanges();
|
|
1342
1232
|
});
|
|
1343
|
-
this.agGrid.getRowNodeId = (data) => {
|
|
1344
|
-
return data.id.toString();
|
|
1345
|
-
};
|
|
1346
1233
|
}
|
|
1347
|
-
|
|
1348
|
-
this.
|
|
1349
|
-
this.ngUnsubscribe.complete();
|
|
1350
|
-
Object.keys(this.rowDeleteContents).forEach((id) => {
|
|
1351
|
-
this.destroyRowDelete(id);
|
|
1352
|
-
});
|
|
1234
|
+
showPopover() {
|
|
1235
|
+
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Open });
|
|
1353
1236
|
}
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
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 = {};
|
|
1358
1259
|
}
|
|
1359
|
-
|
|
1360
|
-
this.
|
|
1361
|
-
this.rowDeleteConfirm.emit({ id: row.id });
|
|
1260
|
+
set params(value) {
|
|
1261
|
+
this.agInit(value);
|
|
1362
1262
|
}
|
|
1363
|
-
|
|
1364
|
-
|
|
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);
|
|
1365
1269
|
}
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
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;
|
|
1391
1308
|
}
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
const rowDeleteContents = this.rowDeleteContents[id];
|
|
1395
|
-
/* sanity check */
|
|
1396
|
-
/* istanbul ignore else */
|
|
1397
|
-
if (rowDeleteContents) {
|
|
1398
|
-
rowDeleteContents.affixer.destroy();
|
|
1399
|
-
this.overlayService.close(rowDeleteContents.overlay);
|
|
1400
|
-
delete this.rowDeleteContents[id];
|
|
1401
|
-
this.rowDeleteConfigs = this.rowDeleteConfigs.filter((config) => config.id !== id);
|
|
1402
|
-
this._rowDeleteIds = (_a = this.rowDeleteIds) === null || _a === void 0 ? void 0 : _a.filter((arrayId) => arrayId !== id);
|
|
1403
|
-
this.rowDeleteIdsChange.emit(this._rowDeleteIds);
|
|
1404
|
-
}
|
|
1309
|
+
set parameters(value) {
|
|
1310
|
+
this.agInit(value);
|
|
1405
1311
|
}
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
// We must reaffix things when the data changes because the rows rerender and the previous element that the delete was affixed
|
|
1413
|
-
// to is destroyed.
|
|
1414
|
-
this.affixToRow(this.rowDeleteContents[config.id].affixer, config.id);
|
|
1415
|
-
}
|
|
1416
|
-
});
|
|
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;
|
|
1417
1318
|
this.changeDetector.markForCheck();
|
|
1418
1319
|
}
|
|
1320
|
+
isNumeric(value) {
|
|
1321
|
+
return !isNaN(parseFloat(value));
|
|
1322
|
+
}
|
|
1323
|
+
refresh(params) {
|
|
1324
|
+
return false;
|
|
1325
|
+
}
|
|
1419
1326
|
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
1423
|
-
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,
|
|
1424
1331
|
args: [{
|
|
1425
|
-
selector: '
|
|
1332
|
+
selector: 'sky-ag-grid-cell-renderer-currency-validator',
|
|
1333
|
+
templateUrl: 'cell-renderer-currency-validator.component.html',
|
|
1334
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1426
1335
|
}]
|
|
1427
|
-
}], ctorParameters: function () { return [{ type:
|
|
1336
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { parameters: [{
|
|
1428
1337
|
type: Input
|
|
1429
|
-
}], rowDeleteCancel: [{
|
|
1430
|
-
type: Output
|
|
1431
|
-
}], rowDeleteConfirm: [{
|
|
1432
|
-
type: Output
|
|
1433
|
-
}], rowDeleteIdsChange: [{
|
|
1434
|
-
type: Output
|
|
1435
|
-
}], agGrid: [{
|
|
1436
|
-
type: ContentChild,
|
|
1437
|
-
args: [AgGridAngular]
|
|
1438
1338
|
}] } });
|
|
1439
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
|
+
|
|
1440
1436
|
/**
|
|
1441
1437
|
* @internal
|
|
1442
1438
|
*/
|
|
1443
|
-
class
|
|
1444
|
-
constructor() {
|
|
1445
|
-
this.
|
|
1439
|
+
class SkyAgGridCellRendererRowSelectorComponent {
|
|
1440
|
+
constructor(changeDetection) {
|
|
1441
|
+
this.changeDetection = changeDetection;
|
|
1446
1442
|
}
|
|
1447
1443
|
/**
|
|
1448
|
-
* agInit is called by agGrid once after the
|
|
1449
|
-
* @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.
|
|
1450
1446
|
*/
|
|
1451
1447
|
agInit(params) {
|
|
1452
1448
|
this.params = params;
|
|
1453
|
-
this.
|
|
1454
|
-
this.
|
|
1449
|
+
this.dataField = this.params.colDef && this.params.colDef.field;
|
|
1450
|
+
this.rowNode = this.params.node;
|
|
1455
1451
|
this.rowNumber = this.params.rowIndex + 1;
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
this.
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
}
|
|
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
|
+
});
|
|
1463
1462
|
}
|
|
1464
1463
|
/**
|
|
1465
|
-
*
|
|
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.
|
|
1466
1467
|
*/
|
|
1467
|
-
|
|
1468
|
-
|
|
1468
|
+
refresh() {
|
|
1469
|
+
return false;
|
|
1469
1470
|
}
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
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();
|
|
1475
1483
|
}
|
|
1476
1484
|
}
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
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: [{
|
|
1480
1488
|
type: Component,
|
|
1481
1489
|
args: [{
|
|
1482
|
-
selector: 'sky-ag-grid-cell-
|
|
1483
|
-
templateUrl: './cell-
|
|
1484
|
-
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'],
|
|
1485
1493
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1494
|
+
encapsulation: ViewEncapsulation.None,
|
|
1486
1495
|
}]
|
|
1487
|
-
}],
|
|
1488
|
-
type: ViewChild,
|
|
1489
|
-
args: ['skyCellEditorCurrency', { read: ElementRef }]
|
|
1490
|
-
}] } });
|
|
1496
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
1491
1497
|
|
|
1492
|
-
class
|
|
1498
|
+
class SkyAgGridCellRendererRowSelectorModule {
|
|
1493
1499
|
}
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
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: [{
|
|
1498
1504
|
type: NgModule,
|
|
1499
1505
|
args: [{
|
|
1500
|
-
imports: [AgGridResourcesModule,
|
|
1501
|
-
declarations: [
|
|
1502
|
-
exports: [
|
|
1506
|
+
imports: [AgGridResourcesModule, SkyCheckboxModule, FormsModule],
|
|
1507
|
+
declarations: [SkyAgGridCellRendererRowSelectorComponent],
|
|
1508
|
+
exports: [SkyAgGridCellRendererRowSelectorComponent],
|
|
1503
1509
|
}]
|
|
1504
1510
|
}] });
|
|
1505
1511
|
|
|
@@ -1847,7 +1853,7 @@ class SkyAgGridService {
|
|
|
1847
1853
|
return mergedGridOptions;
|
|
1848
1854
|
}
|
|
1849
1855
|
mergeGridOptions(defaultGridOptions, providedGridOptions) {
|
|
1850
|
-
|
|
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), {
|
|
1851
1857
|
// allow consumers to override all defaultColDef properties except cellClassRules, which we reserve for styling
|
|
1852
1858
|
cellClassRules: defaultGridOptions.defaultColDef.cellClassRules }), icons: Object.assign(Object.assign({}, defaultGridOptions.icons), providedGridOptions.icons) });
|
|
1853
1859
|
return mergedGridOptions;
|
|
@@ -2036,7 +2042,7 @@ class SkyAgGridService {
|
|
|
2036
2042
|
this.agGridAdapterService.focusOnFocusableChildren(currentElement);
|
|
2037
2043
|
}
|
|
2038
2044
|
getDefaultEditableGridOptions(args) {
|
|
2039
|
-
|
|
2045
|
+
const defaultGridOptions = this.getDefaultGridOptions(args);
|
|
2040
2046
|
defaultGridOptions.rowSelection = 'none';
|
|
2041
2047
|
return defaultGridOptions;
|
|
2042
2048
|
}
|
|
@@ -2046,7 +2052,7 @@ class SkyAgGridService {
|
|
|
2046
2052
|
if (date && typeof date === 'string') {
|
|
2047
2053
|
date = new Date(params.value);
|
|
2048
2054
|
}
|
|
2049
|
-
|
|
2055
|
+
const formattedDate = date &&
|
|
2050
2056
|
date.toLocaleDateString &&
|
|
2051
2057
|
date.toLocaleDateString(locale, dateConfig);
|
|
2052
2058
|
if (date && date.getTime && !isNaN(date.getTime())) {
|
|
@@ -2072,16 +2078,16 @@ class SkyAgGridService {
|
|
|
2072
2078
|
return false;
|
|
2073
2079
|
}
|
|
2074
2080
|
}
|
|
2075
|
-
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 });
|
|
2076
2082
|
SkyAgGridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridService, providedIn: 'any' });
|
|
2077
2083
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridService, decorators: [{
|
|
2078
2084
|
type: Injectable,
|
|
2079
2085
|
args: [{
|
|
2080
2086
|
providedIn: 'any',
|
|
2081
2087
|
}]
|
|
2082
|
-
}], ctorParameters: function () { return [{ type: SkyAgGridAdapterService }, { type: i1$
|
|
2088
|
+
}], ctorParameters: function () { return [{ type: SkyAgGridAdapterService }, { type: i1$5.SkyThemeService, decorators: [{
|
|
2083
2089
|
type: Optional
|
|
2084
|
-
}] }, { type: i3.SkyLibResourcesService, decorators: [{
|
|
2090
|
+
}] }, { type: i3$1.SkyLibResourcesService, decorators: [{
|
|
2085
2091
|
type: Optional
|
|
2086
2092
|
}] }]; } });
|
|
2087
2093
|
|