angular-slickgrid 9.13.0 → 10.0.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.
@@ -1,11 +1,9 @@
1
- import { unsubscribeAll, createDomElement, SlickHybridSelectionModel, SlickRowSelectionModel, SlickEventData, castObservableToPromise, addToArrayWhenNotExists, DelimiterType, EventNamingStyle, Filters, SlickEventHandler, SlickgridConfig as SlickgridConfig$1, BackendUtilityService, GridEventService, SharedService, CollectionService, ExtensionUtility, FilterFactory, FilterService, ResizerService, SortService, TreeDataService, PaginationService, ExtensionService, GridStateService, GridService, HeaderGroupingService, emptyElement, SlickGroupItemMetadataProvider, SlickDataView, autoAddEditorFormatterToColumnsWithEditor, SlickGrid, ExtensionName, isColumnDateType } from '@slickgrid-universal/common';
1
+ import { GlobalGridOptions as GlobalGridOptions$1, SlickEventHandler, SlickgridConfig as SlickgridConfig$1, BackendUtilityService, GridEventService, SharedService, CollectionService, ExtensionUtility, FilterFactory, FilterService, ResizerService, SortService, TreeDataService, PaginationService, ExtensionService, GridStateService, GridService, HeaderGroupingService, unsubscribeAll, emptyElement, SlickGroupItemMetadataProvider, SlickDataView, autoAddEditorFormatterToColumnsWithEditor, SlickGrid, PluginFlagMappings, isColumnDateType } from '@slickgrid-universal/common';
2
2
  export * from '@slickgrid-universal/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, Optional, EventEmitter, output, ContentChild, Input, Output, Inject, Component, NgModule } from '@angular/core';
4
+ import { ViewContainerRef, Injectable, Inject, Optional, EventEmitter, output, Component, ContentChild, Input, Output } from '@angular/core';
5
5
  import * as i1 from '@ngx-translate/core';
6
- import { TranslateModule } from '@ngx-translate/core';
7
- import { SlickRowDetailView as SlickRowDetailView$1 } from '@slickgrid-universal/row-detail-view-plugin';
8
- import { Observable } from 'rxjs';
6
+ import { NgTemplateOutlet } from '@angular/common';
9
7
  import { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';
10
8
  import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
11
9
  import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
@@ -13,8 +11,7 @@ import { SlickPaginationComponent } from '@slickgrid-universal/pagination-compon
13
11
  import { RxJsResource } from '@slickgrid-universal/rxjs-observable';
14
12
  import { extend } from '@slickgrid-universal/utils';
15
13
  import { dequal } from 'dequal/lite';
16
- import * as i5 from '@angular/common';
17
- import { CommonModule } from '@angular/common';
14
+ import { Observable } from 'rxjs';
18
15
 
19
16
  class AngularUtilService {
20
17
  vcr;
@@ -54,15 +51,11 @@ class AngularUtilService {
54
51
  // user could provide data to assign to the component instance
55
52
  if (componentRef?.instance && data) {
56
53
  Object.assign(componentRef.instance, data);
57
- // NOTE: detectChanges() MUST be done BEFORE returning the DOM element in the next step,
58
- // because if we do it only after returning the rootNodes (domElement) then it won't have the instance data yet
59
- // and we would have to wait an extra cycle to see the result, this basically helps with Example22
60
- componentRef.changeDetectorRef.detectChanges();
61
54
  }
62
55
  // Get DOM element from component
63
56
  let domElem = null;
64
57
  const viewRef = componentRef.hostView;
65
- // get DOM element from the new dynamic Component, make sure this is read after any data and detectChanges()
58
+ // get DOM element from the new dynamic Component, make sure this is read after any data
66
59
  if (viewRef && Array.isArray(viewRef.rootNodes) && viewRef.rootNodes[0]) {
67
60
  domElem = viewRef.rootNodes[0];
68
61
  // when user provides the DOM element target, we will read the new Component html and use it to replace the target html
@@ -93,12 +86,15 @@ class AngularUtilService {
93
86
  }
94
87
  return componentOutput;
95
88
  }
96
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularUtilService, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Injectable });
97
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularUtilService });
89
+ static ɵfac = function AngularUtilService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AngularUtilService)(i0.ɵɵinject(ViewContainerRef)); };
90
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AngularUtilService, factory: AngularUtilService.ɵfac });
98
91
  }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularUtilService, decorators: [{
100
- type: Injectable
101
- }], ctorParameters: () => [{ type: i0.ViewContainerRef }] });
92
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AngularUtilService, [{
93
+ type: Injectable
94
+ }], () => [{ type: i0.ViewContainerRef, decorators: [{
95
+ type: Inject,
96
+ args: [ViewContainerRef]
97
+ }] }], null); })();
102
98
 
103
99
  class ContainerService {
104
100
  dependencies = [];
@@ -118,12 +114,15 @@ class ContainerService {
118
114
  this.dependencies.push({ key, instance });
119
115
  }
120
116
  }
121
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ContainerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
122
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ContainerService });
117
+ static ɵfac = function ContainerService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ContainerService)(); };
118
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ContainerService, factory: ContainerService.ɵfac, providedIn: 'root' });
123
119
  }
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ContainerService, decorators: [{
125
- type: Injectable
126
- }] });
120
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContainerService, [{
121
+ type: Injectable,
122
+ args: [{
123
+ providedIn: 'root', // This ensures it can be injected anywhere
124
+ }]
125
+ }], null, null); })();
127
126
 
128
127
  /**
129
128
  * This is a Translate Service Wrapper for Slickgrid-Universal monorepo lib to work properly,
@@ -139,7 +138,7 @@ class TranslaterService {
139
138
  * @return {string} current language
140
139
  */
141
140
  getCurrentLanguage() {
142
- return this.translateService?.currentLang ?? '';
141
+ return this.translateService?.getCurrentLang?.() ?? '';
143
142
  }
144
143
  /**
145
144
  * Method to set the language to use in the App and Translate Service
@@ -157,14 +156,14 @@ class TranslaterService {
157
156
  translate(translationKey) {
158
157
  return this.translateService?.instant?.(translationKey || ' ');
159
158
  }
160
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TranslaterService, deps: [{ token: i1.TranslateService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
161
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TranslaterService });
159
+ static ɵfac = function TranslaterService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TranslaterService)(i0.ɵɵinject(i1.TranslateService, 8)); };
160
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: TranslaterService, factory: TranslaterService.ɵfac });
162
161
  }
163
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TranslaterService, decorators: [{
164
- type: Injectable
165
- }], ctorParameters: () => [{ type: i1.TranslateService, decorators: [{
166
- type: Optional
167
- }] }] });
162
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslaterService, [{
163
+ type: Injectable
164
+ }], () => [{ type: i1.TranslateService, decorators: [{
165
+ type: Optional
166
+ }] }], null); })();
168
167
 
169
168
  /**
170
169
  * Unsubscribe all Observables Subscriptions
@@ -181,547 +180,12 @@ function unsubscribeAllObservables(subscriptions) {
181
180
  subscription = subscriptions.pop();
182
181
  }
183
182
  }
184
- // TODO: deprecated, remove the return type in next major version
185
- return subscriptions;
186
- }
187
-
188
- const ROW_DETAIL_CONTAINER_PREFIX = 'container_';
189
- const PRELOAD_CONTAINER_PREFIX = 'container_loading';
190
- class SlickRowDetailView extends SlickRowDetailView$1 {
191
- angularUtilService;
192
- appRef;
193
- eventPubSubService;
194
- gridContainerElement;
195
- rxjs;
196
- rowDetailContainer;
197
- _preloadComponent;
198
- _preloadCompRef;
199
- _views = [];
200
- _viewComponent;
201
- _subscriptions = [];
202
- _userProcessFn;
203
- constructor(angularUtilService, appRef, eventPubSubService, gridContainerElement, rxjs) {
204
- super(eventPubSubService);
205
- this.angularUtilService = angularUtilService;
206
- this.appRef = appRef;
207
- this.eventPubSubService = eventPubSubService;
208
- this.gridContainerElement = gridContainerElement;
209
- this.rxjs = rxjs;
210
- }
211
- get addonOptions() {
212
- return this.getOptions();
213
- }
214
- get datasetIdPropName() {
215
- return this.gridOptions.datasetIdPropertyName || 'id';
216
- }
217
- /** Getter for the Grid Options pulled through the Grid Object */
218
- get gridOptions() {
219
- return (this._grid?.getOptions() || {});
220
- }
221
- get rowDetailViewOptions() {
222
- return this.gridOptions.rowDetailView;
223
- }
224
- addRxJsResource(rxjs) {
225
- this.rxjs = rxjs;
226
- }
227
- /** Dispose of the RowDetailView Extension */
228
- dispose() {
229
- this.disposeAllViewComponents();
230
- this._subscriptions = unsubscribeAll(this._subscriptions); // also unsubscribe all RxJS subscriptions
231
- super.dispose();
232
- }
233
- /** Dispose of all the opened Row Detail Panels Angular View Components */
234
- disposeAllViewComponents() {
235
- do {
236
- const view = this._views.pop();
237
- if (view) {
238
- this.disposeView(view);
239
- }
240
- } while (this._views.length > 0);
241
- }
242
- /** Get the instance of the SlickGrid addon (control or plugin). */
243
- getAddonInstance() {
244
- return this;
245
- }
246
- init(grid) {
247
- this._grid = grid;
248
- super.init(grid);
249
- this.register(grid.getSelectionModel());
250
- }
251
- /**
252
- * Create the plugin before the Grid creation, else it will behave oddly.
253
- * Mostly because the column definitions might change after the grid creation
254
- */
255
- register(rowSelectionPlugin) {
256
- if (typeof this.gridOptions.rowDetailView?.process === 'function') {
257
- // we need to keep the user "process" method and replace it with our own execution method
258
- // we do this because when we get the item detail, we need to call "onAsyncResponse.notify" for the plugin to work
259
- this._userProcessFn = this.gridOptions.rowDetailView.process; // keep user's process method
260
- this.addonOptions.process = (item) => this.onProcessing(item); // replace process method & run our internal one
261
- }
262
- else {
263
- throw new Error('[Angular-Slickgrid] You need to provide a "process" function for the Row Detail Extension to work properly');
264
- }
265
- if (this._grid && this.gridOptions?.rowDetailView) {
266
- // load the Preload & RowDetail Templates (could be straight HTML or Angular View/ViewModel)
267
- // when those are Angular View/ViewModel, we need to create View Component & provide the html containers to the Plugin (preTemplate/postTemplate methods)
268
- if (!this.gridOptions.rowDetailView.preTemplate) {
269
- this._preloadComponent = this.gridOptions.rowDetailView.preloadComponent;
270
- this.addonOptions.preTemplate = () => createDomElement('div', { className: `${PRELOAD_CONTAINER_PREFIX}` });
271
- }
272
- if (!this.gridOptions.rowDetailView.postTemplate) {
273
- this._viewComponent = this.gridOptions.rowDetailView.viewComponent;
274
- this.addonOptions.postTemplate = (itemDetail) => createDomElement('div', { className: `${ROW_DETAIL_CONTAINER_PREFIX}${itemDetail[this.datasetIdPropName]}` });
275
- }
276
- // this also requires the Row Selection Model to be registered as well
277
- if (!rowSelectionPlugin || !this._grid.getSelectionModel()) {
278
- const SelectionModelClass = this.gridOptions.enableHybridSelection ? SlickHybridSelectionModel : SlickRowSelectionModel;
279
- rowSelectionPlugin = new SelectionModelClass(this.gridOptions.selectionOptions ?? this.gridOptions.rowSelectionOptions ?? { selectActiveRow: true });
280
- this._grid.setSelectionModel(rowSelectionPlugin);
281
- }
282
- // hook all events
283
- if (this._grid && this.rowDetailViewOptions) {
284
- if (this.rowDetailViewOptions.onExtensionRegistered) {
285
- this.rowDetailViewOptions.onExtensionRegistered(this);
286
- }
287
- this.eventHandler.subscribe(this.onAsyncResponse, (event, args) => {
288
- if (this.rowDetailViewOptions && typeof this.rowDetailViewOptions.onAsyncResponse === 'function') {
289
- this.rowDetailViewOptions.onAsyncResponse(event, args);
290
- }
291
- });
292
- this.eventHandler.subscribe(this.onAsyncEndUpdate, (e, args) => {
293
- // destroy preload if exists
294
- this._preloadCompRef?.destroy();
295
- // triggers after backend called "onAsyncResponse.notify()"
296
- // because of the preload destroy above, we need a small delay to make sure the DOM element is ready to render the Row Detail
297
- queueMicrotask(() => {
298
- this.renderViewModel(args?.item);
299
- if (this.rowDetailViewOptions && typeof this.rowDetailViewOptions.onAsyncEndUpdate === 'function') {
300
- this.rowDetailViewOptions.onAsyncEndUpdate(e, args);
301
- }
302
- });
303
- });
304
- this.eventHandler.subscribe(this.onAfterRowDetailToggle, (e, args) => {
305
- // display preload template & re-render all the other Detail Views after toggling
306
- // the preload View will eventually go away once the data gets loaded after the "onAsyncEndUpdate" event
307
- this.renderPreloadView();
308
- if (this.rowDetailViewOptions && typeof this.rowDetailViewOptions.onAfterRowDetailToggle === 'function') {
309
- this.rowDetailViewOptions.onAfterRowDetailToggle(e, args);
310
- }
311
- });
312
- this.eventHandler.subscribe(this.onBeforeRowDetailToggle, (e, args) => {
313
- // before toggling row detail, we need to create View Component if it doesn't exist
314
- this.handleOnBeforeRowDetailToggle(e, args);
315
- if (this.rowDetailViewOptions && typeof this.rowDetailViewOptions.onBeforeRowDetailToggle === 'function') {
316
- return this.rowDetailViewOptions.onBeforeRowDetailToggle(e, args);
317
- }
318
- return true;
319
- });
320
- this.eventHandler.subscribe(this.onRowBackToViewportRange, (e, args) => {
321
- // when row is back to viewport range, we will re-render the View Component(s)
322
- this.handleOnRowBackToViewportRange(e, args);
323
- if (this.rowDetailViewOptions && typeof this.rowDetailViewOptions.onRowBackToViewportRange === 'function') {
324
- this.rowDetailViewOptions.onRowBackToViewportRange(e, args);
325
- }
326
- });
327
- this._eventHandler.subscribe(this.onBeforeRowOutOfViewportRange, (event, args) => {
328
- if (typeof this.rowDetailViewOptions?.onBeforeRowOutOfViewportRange === 'function') {
329
- this.rowDetailViewOptions.onBeforeRowOutOfViewportRange(event, args);
330
- }
331
- this.disposeViewByItem(args.item);
332
- });
333
- this.eventHandler.subscribe(this.onRowOutOfViewportRange, (e, args) => {
334
- if (this.rowDetailViewOptions && typeof this.rowDetailViewOptions.onRowOutOfViewportRange === 'function') {
335
- this.rowDetailViewOptions.onRowOutOfViewportRange(e, args);
336
- }
337
- });
338
- // --
339
- // hook some events needed by the Plugin itself
340
- // we need to redraw the open detail views if we change column position (column reorder)
341
- this.eventHandler.subscribe(this._grid.onColumnsReordered, this.redrawAllViewComponents.bind(this, false));
342
- // on row selection changed, we also need to redraw
343
- if (this.gridOptions.enableRowSelection || this.gridOptions.enableHybridSelection || this.gridOptions.enableCheckboxSelector) {
344
- this.eventHandler.subscribe(this._grid.onSelectedRowsChanged, this.redrawAllViewComponents.bind(this, false));
345
- }
346
- // on sort, all row detail are collapsed so we can dispose of all the Views as well
347
- this.eventHandler.subscribe(this._grid.onSort, this.disposeAllViewComponents.bind(this));
348
- // redraw all Views whenever certain events are triggered
349
- this._subscriptions.push(this.eventPubSubService?.subscribe(['onFilterChanged', 'onGridMenuColumnsChanged', 'onColumnPickerColumnsChanged'], this.redrawAllViewComponents.bind(this, false)), this.eventPubSubService?.subscribe(['onGridMenuClearAllFilters', 'onGridMenuClearAllSorting'], () => setTimeout(() => this.redrawAllViewComponents())));
350
- }
351
- }
352
- return this;
353
- }
354
- /** Redraw (re-render) all the expanded row detail View Components */
355
- redrawAllViewComponents(forceRedraw = false) {
356
- this.resetRenderedRows();
357
- this._views.forEach((view) => {
358
- if (!view.rendered || forceRedraw) {
359
- forceRedraw && view.componentRef?.destroy();
360
- this.redrawViewComponent(view);
361
- }
362
- });
363
- }
364
- /** Redraw the necessary View Component */
365
- redrawViewComponent(createdView) {
366
- const containerElement = this.gridContainerElement.querySelector(`.${ROW_DETAIL_CONTAINER_PREFIX}${createdView.id}`);
367
- if (containerElement) {
368
- this.renderViewModel(createdView.dataContext);
369
- }
370
- }
371
- /** Render (or re-render) the View Component (Row Detail) */
372
- renderPreloadView() {
373
- const containerElement = this.gridContainerElement.querySelector(`.${PRELOAD_CONTAINER_PREFIX}`);
374
- if (this._preloadComponent && containerElement) {
375
- const preloadComp = this.angularUtilService.createAngularComponentAppendToDom(this._preloadComponent, containerElement, {}, { sanitizer: this._grid.sanitizeHtmlString });
376
- this._preloadCompRef = preloadComp.componentRef;
377
- }
378
- }
379
- /** Render (or re-render) the View Component (Row Detail) */
380
- renderViewModel(item) {
381
- const containerElement = this.gridContainerElement.querySelector(`.${ROW_DETAIL_CONTAINER_PREFIX}${item[this.datasetIdPropName]}`);
382
- if (this._viewComponent && containerElement) {
383
- // render row detail
384
- const componentOutput = this.angularUtilService.createAngularComponentAppendToDom(this._viewComponent, containerElement, {
385
- model: item,
386
- addon: this,
387
- grid: this._grid,
388
- dataView: this.dataView,
389
- parentRef: this.rowDetailViewOptions?.parentRef,
390
- }, {
391
- sanitizer: this._grid.sanitizeHtmlString,
392
- });
393
- if (componentOutput?.componentRef) {
394
- const viewObj = this._views.find((obj) => obj.id === item[this.datasetIdPropName]);
395
- if (viewObj) {
396
- viewObj.componentRef = componentOutput.componentRef;
397
- viewObj.rendered = true;
398
- }
399
- return viewObj;
400
- }
401
- }
402
- return undefined;
403
- }
404
- // --
405
- // protected functions
406
- // ------------------
407
- disposeViewByItem(item, removeFromArray = false) {
408
- const foundViewIndex = this._views.findIndex((view) => view.id === item[this.datasetIdPropName]);
409
- if (foundViewIndex >= 0) {
410
- this.disposeView(this._views[foundViewIndex]);
411
- if (removeFromArray) {
412
- this._views.splice(foundViewIndex, 1);
413
- }
414
- }
415
- }
416
- disposeView(expandedView) {
417
- expandedView.rendered = false;
418
- const compRef = expandedView?.componentRef;
419
- if (compRef) {
420
- this.appRef.detachView(compRef.hostView);
421
- if (typeof compRef?.destroy === 'function') {
422
- compRef.destroy();
423
- }
424
- return expandedView;
425
- }
426
- }
427
- /**
428
- * notify the onAsyncResponse with the "args.item" (required property)
429
- * the plugin will then use item to populate the row detail panel with the "postTemplate"
430
- * @param item
431
- */
432
- notifyTemplate(item) {
433
- this.onAsyncResponse.notify({ item }, new SlickEventData(), this);
434
- }
435
- /**
436
- * On Processing, we will notify the plugin with the new item detail once backend server call completes
437
- * @param item
438
- */
439
- async onProcessing(item) {
440
- if (item && typeof this._userProcessFn === 'function') {
441
- let awaitedItemDetail;
442
- const userProcessFn = this._userProcessFn(item);
443
- // wait for the "userProcessFn", once resolved we will save it into the "collection"
444
- const response = await userProcessFn;
445
- if (this.datasetIdPropName in response) {
446
- awaitedItemDetail = response; // from Promise
447
- }
448
- else if ((response && response instanceof Observable) || response instanceof Promise) {
449
- awaitedItemDetail = await castObservableToPromise(this.rxjs, response); // from Angular-http-client
450
- }
451
- if (!awaitedItemDetail || !(this.datasetIdPropName in awaitedItemDetail)) {
452
- throw new Error('[Angular-Slickgrid] could not process the Row Detail, you must make sure that your "process" callback ' +
453
- `returns an item object that has an "${this.datasetIdPropName}" property`);
454
- }
455
- // notify the plugin with the new item details
456
- this.notifyTemplate(awaitedItemDetail || {});
457
- }
458
- }
459
- /**
460
- * Just before the row get expanded or collapsed we will do the following
461
- * First determine if the row is expanding or collapsing,
462
- * if it's expanding we will add it to our View Components reference array if we don't already have it
463
- * or if it's collapsing we will remove it from our View Components reference array
464
- */
465
- handleOnBeforeRowDetailToggle(_e, args) {
466
- // expanding
467
- if (args?.item?.__collapsed) {
468
- // expanding row detail
469
- const viewInfo = {
470
- id: args.item[this.datasetIdPropName],
471
- dataContext: args.item,
472
- rendered: false,
473
- };
474
- addToArrayWhenNotExists(this._views, viewInfo, this.datasetIdPropName);
475
- }
476
- else {
477
- // collapsing, so dispose of the View/Component
478
- this.disposeViewByItem(args.item, true);
479
- }
480
- }
481
- /** When Row comes back to Viewport Range, we need to redraw the View */
482
- handleOnRowBackToViewportRange(_e, args) {
483
- const viewModel = this._views.find((x) => x.id === args.rowId);
484
- if (viewModel && !viewModel.rendered) {
485
- this.redrawViewComponent(viewModel);
486
- }
487
- }
488
183
  }
489
184
 
490
185
  /** Global Grid Options Defaults */
491
186
  const GlobalGridOptions = {
492
- alwaysShowVerticalScroll: true,
493
- autoEdit: false,
494
- asyncEditorLoading: false,
495
- autoFitColumnsOnFirstLoad: true,
496
- autoResize: {
497
- applyResizeToContainer: true,
498
- autoHeight: true,
499
- autoHeightRecalcRow: 100,
500
- calculateAvailableSizeBy: 'window',
501
- bottomPadding: 20,
502
- minHeight: 250,
503
- minWidth: 300,
504
- rightPadding: 0,
505
- },
506
- cellHighlightCssClass: 'slick-cell-modified',
507
- checkboxSelector: {
508
- cssClass: 'slick-cell-checkboxsel',
509
- },
510
- columnPicker: {
511
- hideForceFitButton: false,
512
- hideSyncResizeButton: true,
513
- headerColumnValueExtractor: pickerHeaderColumnValueExtractor,
514
- },
515
- cellMenu: {
516
- autoAdjustDrop: true,
517
- autoAlignSide: true,
518
- hideCloseButton: true,
519
- hideCommandSection: false,
520
- hideOptionSection: false,
521
- },
522
- contextMenu: {
523
- autoAdjustDrop: true,
524
- autoAlignSide: true,
525
- hideCloseButton: true,
526
- hideClearAllGrouping: false,
527
- hideCollapseAllGroups: false,
528
- hideCommandSection: false,
529
- hideCopyCellValueCommand: false,
530
- hideExpandAllGroups: false,
531
- hideExportCsvCommand: false,
532
- hideExportExcelCommand: false,
533
- hideExportPdfCommand: false,
534
- hideExportTextDelimitedCommand: true,
535
- hideMenuOnScroll: true,
536
- hideOptionSection: false,
537
- iconCollapseAllGroupsCommand: 'mdi mdi-arrow-collapse',
538
- iconExpandAllGroupsCommand: 'mdi mdi-arrow-expand',
539
- iconClearGroupingCommand: 'mdi mdi-close',
540
- iconCopyCellValueCommand: 'mdi mdi-content-copy',
541
- iconExportCsvCommand: 'mdi mdi-download',
542
- iconExportExcelCommand: 'mdi mdi-file-excel-outline',
543
- iconExportTextDelimitedCommand: 'mdi mdi-download',
544
- showBulletWhenIconMissing: true,
545
- subItemChevronClass: 'mdi mdi-chevron-down mdi-rotate-270',
546
- },
547
- customFooterOptions: {
548
- dateFormat: 'YYYY-MM-DD, hh:mm a',
549
- hideRowSelectionCount: false,
550
- hideTotalItemCount: false,
551
- hideLastUpdateTimestamp: true,
552
- footerHeight: 25,
553
- leftContainerClass: 'col-xs-12 col-sm-5',
554
- rightContainerClass: 'col-xs-6 col-sm-7',
555
- metricSeparator: '|',
556
- metricTexts: {
557
- items: 'items',
558
- itemsKey: 'ITEMS',
559
- itemsSelected: 'items selected',
560
- itemsSelectedKey: 'ITEMS_SELECTED',
561
- of: 'of',
562
- ofKey: 'OF',
563
- },
564
- },
565
- dataView: {
566
- // when enabled, this will preserve the row selection even after filtering/sorting/grouping
567
- syncGridSelection: {
568
- preserveHidden: false,
569
- preserveHiddenOnSelectionChange: true,
570
- },
571
- syncGridSelectionWithBackendService: false, // but disable it when using backend services
572
- },
573
- datasetIdPropertyName: 'id',
574
- defaultFilter: Filters.input,
575
- defaultBackendServiceFilterTypingDebounce: 500,
576
- defaultColumnSortFieldId: 'id',
577
- defaultFilterPlaceholder: '🔎︎',
578
- defaultFilterRangeOperator: 'RangeInclusive',
579
- editable: false,
580
- enableAutoResize: true,
581
- enableAutoSizeColumns: true,
582
- enableCellNavigation: false,
583
- enableColumnPicker: true,
584
- enableColumnReorder: true,
585
- enableColumnResizeOnDoubleClick: true,
586
- enableContextMenu: true,
587
- enableExcelExport: false,
588
- enableTextExport: false, // CSV/Text with Tab Delimited
589
- enableFilterTrimWhiteSpace: false, // do we want to trim white spaces on all Filters?
590
- enableGridMenu: true,
591
- enableHeaderMenu: true,
592
- enableEmptyDataWarningMessage: true,
593
- emptyDataWarning: {
594
- className: 'slick-empty-data-warning',
595
- message: 'No data to display.',
596
- messageKey: 'EMPTY_DATA_WARNING_MESSAGE',
597
- hideFrozenLeftWarning: false,
598
- hideFrozenRightWarning: false,
599
- leftViewportMarginLeft: '40%',
600
- rightViewportMarginLeft: '40%',
601
- frozenLeftViewportMarginLeft: '0px',
602
- frozenRightViewportMarginLeft: '40%',
603
- },
604
- enableMouseHoverHighlightRow: true,
605
- enableSorting: true,
606
- enableTextSelectionOnCells: true,
607
- eventNamingStyle: EventNamingStyle.camelCase,
608
- explicitInitialization: true,
609
- excelExportOptions: {
610
- addGroupIndentation: true,
611
- exportWithFormatter: false,
612
- filename: 'export',
613
- format: 'xlsx',
614
- groupingColumnHeaderTitle: 'Group By',
615
- groupCollapsedSymbol: '⮞',
616
- groupExpandedSymbol: '⮟',
617
- groupingAggregatorRowText: '',
618
- sanitizeDataExport: false,
619
- },
620
- pdfExportOptions: {
621
- addGroupIndentation: true,
622
- exportWithFormatter: false,
623
- filename: 'export',
624
- pageOrientation: 'portrait',
625
- pageSize: 'a4',
626
- fontSize: 10,
627
- headerFontSize: 11,
628
- includeColumnHeaders: true,
629
- htmlDecode: true,
630
- sanitizeDataExport: true,
631
- groupingColumnHeaderTitle: 'Group By',
632
- groupCollapsedSymbol: '+',
633
- groupExpandedSymbol: '-',
634
- groupingAggregatorRowText: '',
635
- repeatHeadersOnEachPage: true,
636
- },
637
- textExportOptions: {
638
- delimiter: DelimiterType.comma,
639
- exportWithFormatter: false,
640
- filename: 'export',
641
- format: 'csv',
642
- groupingColumnHeaderTitle: 'Group By',
643
- groupingAggregatorRowText: '',
644
- sanitizeDataExport: false,
645
- useUtf8WithBom: true,
646
- },
647
- filterTypingDebounce: 0,
648
- forceFitColumns: false,
649
- frozenHeaderWidthCalcDifferential: 0,
650
- gridMenu: {
651
- dropSide: 'left',
652
- commandLabels: {
653
- clearAllFiltersCommandKey: 'CLEAR_ALL_FILTERS',
654
- clearAllSortingCommandKey: 'CLEAR_ALL_SORTING',
655
- clearFrozenColumnsCommandKey: 'CLEAR_PINNING',
656
- exportCsvCommandKey: 'EXPORT_TO_CSV',
657
- exportExcelCommandKey: 'EXPORT_TO_EXCEL',
658
- exportPdfCommandKey: 'EXPORT_TO_PDF',
659
- exportTextDelimitedCommandKey: 'EXPORT_TO_TAB_DELIMITED',
660
- refreshDatasetCommandKey: 'REFRESH_DATASET',
661
- toggleDarkModeCommandKey: 'TOGGLE_DARK_MODE',
662
- toggleFilterCommandKey: 'TOGGLE_FILTER_ROW',
663
- togglePreHeaderCommandKey: 'TOGGLE_PRE_HEADER_ROW',
664
- },
665
- hideClearAllFiltersCommand: false,
666
- hideClearAllSortingCommand: false,
667
- hideClearFrozenColumnsCommand: true, // opt-in command
668
- hideExportCsvCommand: false,
669
- hideExportExcelCommand: false,
670
- hideExportPdfCommand: false,
671
- hideExportTextDelimitedCommand: true,
672
- hideForceFitButton: false,
673
- hideRefreshDatasetCommand: false,
674
- hideSyncResizeButton: true,
675
- hideToggleDarkModeCommand: true,
676
- hideToggleFilterCommand: false,
677
- hideTogglePreHeaderCommand: false,
678
- iconCssClass: 'mdi mdi-menu',
679
- iconClearAllFiltersCommand: 'mdi mdi-filter-remove-outline',
680
- iconClearAllSortingCommand: 'mdi mdi-sort-variant-off',
681
- iconClearFrozenColumnsCommand: 'mdi mdi-pin-off-outline',
682
- iconExportCsvCommand: 'mdi mdi-download',
683
- iconExportExcelCommand: 'mdi mdi-file-excel-outline',
684
- iconExportTextDelimitedCommand: 'mdi mdi-download',
685
- iconRefreshDatasetCommand: 'mdi mdi-sync',
686
- iconToggleDarkModeCommand: 'mdi mdi-brightness-4',
687
- iconToggleFilterCommand: 'mdi mdi-flip-vertical',
688
- iconTogglePreHeaderCommand: 'mdi mdi-flip-vertical',
689
- menuWidth: 16,
690
- resizeOnShowHeaderRow: true,
691
- subItemChevronClass: 'mdi mdi-chevron-down mdi-rotate-270',
692
- headerColumnValueExtractor: pickerHeaderColumnValueExtractor,
693
- },
694
- headerMenu: {
695
- autoAlign: true,
696
- autoAlignOffset: 12,
697
- minWidth: 140,
698
- iconClearFilterCommand: 'mdi mdi-filter-remove-outline',
699
- iconClearSortCommand: 'mdi mdi-sort-variant-off',
700
- iconFreezeColumns: 'mdi mdi-pin-outline',
701
- iconUnfreezeColumns: 'mdi mdi-pin-off-outline',
702
- iconSortAscCommand: 'mdi mdi-sort-ascending',
703
- iconSortDescCommand: 'mdi mdi-sort-descending',
704
- iconColumnHideCommand: 'mdi mdi-close',
705
- iconColumnResizeByContentCommand: 'mdi mdi-arrow-expand-horizontal',
706
- hideColumnResizeByContentCommand: false,
707
- hideColumnHideCommand: false,
708
- hideClearFilterCommand: false,
709
- hideClearSortCommand: false,
710
- hideFreezeColumnsCommand: true, // opt-in command
711
- hideSortCommands: false,
712
- subItemChevronClass: 'mdi mdi-chevron-down mdi-rotate-270',
713
- },
714
- headerRowHeight: 35,
715
- multiColumnSort: true,
716
- numberedMultiColumnSort: true,
717
- tristateMultiColumnSort: false,
718
- sortColNumberInSeparateSpan: true,
719
- suppressActiveCellChangeOnEdit: false,
720
- pagination: {
721
- pageSizes: [10, 15, 20, 25, 30, 40, 50, 75, 100],
722
- pageSize: 25,
723
- totalItems: 0,
724
- },
187
+ ...GlobalGridOptions$1,
188
+ eventNamingStyle: 'camelCase',
725
189
  // technically speaking the Row Detail requires the process & viewComponent but we'll ignore it just to set certain options
726
190
  rowDetailView: {
727
191
  collapseAllOnSort: true,
@@ -731,44 +195,7 @@ const GlobalGridOptions = {
731
195
  useRowClick: false,
732
196
  saveDetailViewOnScroll: false,
733
197
  },
734
- rowHeight: 35,
735
- topPanelHeight: 35,
736
- preHeaderPanelWidth: '100%', // mostly useful for Draggable Grouping dropzone to take full width
737
- translationNamespaceSeparator: ':',
738
- resetFilterSearchValueAfterOnBeforeCancellation: true,
739
- resizeByContentOnlyOnFirstLoad: true,
740
- resizeByContentOptions: {
741
- alwaysRecalculateColumnWidth: false,
742
- cellPaddingWidthInPx: 14,
743
- defaultRatioForStringType: 0.88,
744
- formatterPaddingWidthInPx: 0,
745
- maxItemToInspectCellContentWidth: 1000,
746
- maxItemToInspectSingleColumnWidthByContent: 5000,
747
- widthToRemoveFromExceededWidthReadjustment: 50,
748
- },
749
- rowTopOffsetRenderType: 'transform',
750
- treeDataOptions: {
751
- exportIndentMarginLeft: 5,
752
- exportIndentationLeadingChar: '͏͏͏͏͏͏͏͏͏·',
753
- },
754
198
  };
755
- /**
756
- * Value Extractor for both ColumnPicker & GridMenu Picker
757
- * when using Column Header Grouping, we'll prefix the column group title
758
- * else we'll simply return the column name title
759
- */
760
- function pickerHeaderColumnValueExtractor(column, gridOptions) {
761
- let colName = column?.columnPickerLabel ?? column?.name ?? '';
762
- if (colName instanceof HTMLElement || colName instanceof DocumentFragment) {
763
- colName = colName.textContent || '';
764
- }
765
- const headerGroup = column?.columnGroup || '';
766
- const columnGroupSeparator = gridOptions?.columnGroupSeparator ?? ' - ';
767
- if (headerGroup) {
768
- return headerGroup + columnGroupSeparator + colName;
769
- }
770
- return colName;
771
- }
772
199
 
773
200
  class SlickgridConfig {
774
201
  options;
@@ -878,11 +305,18 @@ class Constants {
878
305
  static VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE = 'Please make sure your text is at least {{minLength}} character(s)';
879
306
  }
880
307
 
308
+ const _c0 = ["slickgridHeader"];
309
+ const _c1 = ["slickgridFooter"];
310
+ function AngularSlickgridComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
311
+ i0.ɵɵelementContainer(0);
312
+ } }
313
+ function AngularSlickgridComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
314
+ i0.ɵɵelementContainer(0);
315
+ } }
881
316
  const WARN_NO_PREPARSE_DATE_SIZE = 10000; // data size to warn user when pre-parse isn't enabled
882
317
  class AngularSlickgridComponent {
883
318
  angularUtilService;
884
319
  appRef;
885
- cd;
886
320
  containerService;
887
321
  elm;
888
322
  translate;
@@ -943,6 +377,7 @@ class AngularSlickgridComponent {
943
377
  customDataView;
944
378
  gridId = '';
945
379
  options = {};
380
+ containerClasses = undefined;
946
381
  get paginationOptions() {
947
382
  return this._paginationOptions;
948
383
  }
@@ -1178,10 +613,9 @@ class AngularSlickgridComponent {
1178
613
  }
1179
614
  slickgridHeader = null;
1180
615
  slickgridFooter = null;
1181
- constructor(angularUtilService, appRef, cd, containerService, elm, translate, translaterService, forRootConfig, externalServices) {
616
+ constructor(angularUtilService, appRef, containerService, elm, translate, translaterService, forRootConfig, externalServices) {
1182
617
  this.angularUtilService = angularUtilService;
1183
618
  this.appRef = appRef;
1184
- this.cd = cd;
1185
619
  this.containerService = containerService;
1186
620
  this.elm = elm;
1187
621
  this.translate = translate;
@@ -1190,7 +624,7 @@ class AngularSlickgridComponent {
1190
624
  const slickgridConfig = new SlickgridConfig$1();
1191
625
  // initialize and assign all Service Dependencies
1192
626
  this._eventPubSubService = externalServices?.eventPubSubService ?? new EventPubSubService(this.elm.nativeElement);
1193
- this._eventPubSubService.eventNamingStyle = EventNamingStyle.camelCase;
627
+ this._eventPubSubService.eventNamingStyle = 'camelCase';
1194
628
  this.backendUtilityService = externalServices?.backendUtilityService ?? new BackendUtilityService();
1195
629
  this.gridEventService = externalServices?.gridEventService ?? new GridEventService();
1196
630
  this.sharedService = externalServices?.sharedService ?? new SharedService();
@@ -1327,7 +761,7 @@ class AngularSlickgridComponent {
1327
761
  if (Array.isArray(this._registeredResources)) {
1328
762
  while (this._registeredResources.length > 0) {
1329
763
  const res = this._registeredResources.pop();
1330
- if (res?.dispose) {
764
+ if (typeof res?.dispose === 'function') {
1331
765
  res.dispose();
1332
766
  }
1333
767
  }
@@ -1377,7 +811,7 @@ class AngularSlickgridComponent {
1377
811
  this.options.enableMouseWheelScrollHandler === undefined) {
1378
812
  this.options.enableMouseWheelScrollHandler = true;
1379
813
  }
1380
- this._eventPubSubService.eventNamingStyle = this.options?.eventNamingStyle ?? EventNamingStyle.camelCase;
814
+ this._eventPubSubService.eventNamingStyle = this.options?.eventNamingStyle ?? 'camelCase';
1381
815
  this._eventPubSubService.publish('onBeforeGridCreate', true);
1382
816
  // make sure the dataset is initialized (if not it will throw an error that it cannot getLength of null)
1383
817
  this._dataset ||= [];
@@ -1412,7 +846,6 @@ class AngularSlickgridComponent {
1412
846
  }
1413
847
  // save reference for all columns before they optionally become hidden/visible
1414
848
  this.sharedService.allColumns = this._columnDefinitions;
1415
- this.sharedService.visibleColumns = this._columnDefinitions;
1416
849
  // before certain extentions/plugins potentially adds extra columns not created by the user itself (RowMove, RowDetail, RowSelections)
1417
850
  // we'll subscribe to the event and push back the change to the user so they always use full column defs array including extra cols
1418
851
  this.subscriptions.push(this._eventPubSubService.subscribe('onPluginColumnsChanged', (data) => {
@@ -1434,12 +867,12 @@ class AngularSlickgridComponent {
1434
867
  if (this.groupItemMetadataProvider) {
1435
868
  this.slickGrid.registerPlugin(this.groupItemMetadataProvider); // register GroupItemMetadataProvider when Grouping is enabled
1436
869
  }
870
+ // get any possible Services that user want to register
871
+ this.registerResources();
1437
872
  this.extensionService.bindDifferentExtensions();
1438
873
  this.bindDifferentHooks(this.slickGrid, this.options, this.dataView);
1439
874
  // when it's a frozen grid, we need to keep the frozen column id for reference if we ever show/hide column from ColumnPicker/GridMenu afterward
1440
875
  this.sharedService.frozenVisibleColumnId = this.slickGrid.getFrozenColumnId();
1441
- // get any possible Services that user want to register
1442
- this.registerResources();
1443
876
  // initialize the SlickGrid grid
1444
877
  this.slickGrid.init();
1445
878
  // initialized the resizer service only after SlickGrid is initialized
@@ -1482,8 +915,7 @@ class AngularSlickgridComponent {
1482
915
  }
1483
916
  const datasetLn = this.dataView.getLength() || this._dataset?.length || 0;
1484
917
  if (datasetLn > 0) {
1485
- if (!this._isDatasetInitialized &&
1486
- (this.options.enableCheckboxSelector || this.options.enableRowSelection || this.options.enableHybridSelection)) {
918
+ if (!this._isDatasetInitialized && (this.options.enableCheckboxSelector || this.options.enableSelection)) {
1487
919
  this.loadRowSelectionPresetWhenExists();
1488
920
  }
1489
921
  this.loadFilterPresetsWhenDatasetInitialized();
@@ -1550,7 +982,7 @@ class AngularSlickgridComponent {
1550
982
  if (this.slickGrid &&
1551
983
  !isSyncGridSelectionEnabled &&
1552
984
  this.options?.backendServiceApi &&
1553
- (this.options.enableRowSelection || this.options.enableHybridSelection || this.options.enableCheckboxSelector)) {
985
+ (this.options.enableSelection || this.options.enableCheckboxSelector)) {
1554
986
  this.slickGrid.setSelectedRows([]);
1555
987
  }
1556
988
  const { pageNumber, pageSize } = pagination;
@@ -1563,7 +995,6 @@ class AngularSlickgridComponent {
1563
995
  change: { newValues: { pageNumber, pageSize }, type: 'pagination' },
1564
996
  gridState: this.gridStateService.getCurrentGridState(),
1565
997
  });
1566
- this.cd.markForCheck();
1567
998
  }
1568
999
  /**
1569
1000
  * When dataset changes, we need to refresh the entire grid UI & possibly resize it as well
@@ -1655,9 +1086,7 @@ class AngularSlickgridComponent {
1655
1086
  if (this.options.enableTranslate) {
1656
1087
  this.extensionService.translateColumnHeaders(undefined, newColumns);
1657
1088
  }
1658
- else {
1659
- this.extensionService.renderColumnHeaders(newColumns, true);
1660
- }
1089
+ this.extensionService.renderColumnHeaders(newColumns, true);
1661
1090
  if (this.options?.enableAutoSizeColumns) {
1662
1091
  this.slickGrid.autosizeColumns();
1663
1092
  }
@@ -1744,10 +1173,9 @@ class AngularSlickgridComponent {
1744
1173
  this.filterService.bindLocalOnFilter(grid);
1745
1174
  }
1746
1175
  }
1747
- // when column are reordered, we need to update the visibleColumn array
1748
- this._eventHandler.subscribe(grid.onColumnsReordered, (_e, args) => {
1176
+ // when column are reordered, we need to update SharedService flag
1177
+ this._eventHandler.subscribe(grid.onColumnsReordered, () => {
1749
1178
  this.sharedService.hasColumnsReordered = true;
1750
- this.sharedService.visibleColumns = args.impactedColumns;
1751
1179
  });
1752
1180
  this._eventHandler.subscribe(grid.onSetOptions, (_e, args) => {
1753
1181
  // add/remove dark mode CSS class when enabled
@@ -1974,7 +1402,6 @@ class AngularSlickgridComponent {
1974
1402
  this.renderPagination();
1975
1403
  this._isPaginationInitialized = true;
1976
1404
  }
1977
- this.cd.detectChanges();
1978
1405
  }
1979
1406
  /** Load the Editor Collection asynchronously and replace the "collection" property when Observable resolves */
1980
1407
  loadEditorCollectionAsync(column) {
@@ -1995,43 +1422,13 @@ class AngularSlickgridComponent {
1995
1422
  }
1996
1423
  }
1997
1424
  }
1998
- insertDynamicPresetColumns(columnId, gridPresetColumns) {
1999
- if (this._columnDefinitions) {
2000
- const columnPosition = this._columnDefinitions.findIndex((c) => c.id === columnId);
2001
- if (columnPosition >= 0) {
2002
- const dynColumn = this._columnDefinitions[columnPosition];
2003
- if (dynColumn?.id === columnId && !gridPresetColumns.some((c) => c.id === columnId)) {
2004
- columnPosition > 0 ? gridPresetColumns.splice(columnPosition, 0, dynColumn) : gridPresetColumns.unshift(dynColumn);
2005
- }
2006
- }
2007
- }
2008
- }
2009
1425
  /** Load any possible Columns Grid Presets */
2010
1426
  loadColumnPresetsWhenDatasetInitialized() {
2011
1427
  // if user entered some Columns "presets", we need to reflect them all in the grid
2012
1428
  if (Array.isArray(this.options.presets?.columns) && this.options.presets.columns.length > 0) {
2013
- const gridPresetColumns = this.gridStateService.getAssociatedGridColumns(this.slickGrid, this.options.presets.columns);
2014
- if (Array.isArray(gridPresetColumns) && gridPresetColumns.length > 0 && Array.isArray(this._columnDefinitions)) {
2015
- // make sure that the dynamic columns are included in presets (1.Row Move, 2. Row Selection, 3. Row Detail)
2016
- if (this.options.enableRowMoveManager) {
2017
- const rmmColId = this.options?.rowMoveManager?.columnId ?? '_move';
2018
- this.insertDynamicPresetColumns(rmmColId, gridPresetColumns);
2019
- }
2020
- if (this.options.enableCheckboxSelector) {
2021
- const chkColId = this.options?.checkboxSelector?.columnId ?? '_checkbox_selector';
2022
- this.insertDynamicPresetColumns(chkColId, gridPresetColumns);
2023
- }
2024
- if (this.options.enableRowDetailView) {
2025
- const rdvColId = this.options?.rowDetailView?.columnId ?? '_detail_selector';
2026
- this.insertDynamicPresetColumns(rdvColId, gridPresetColumns);
2027
- }
2028
- // keep copy the original optional `width` properties optionally provided by the user.
2029
- // We will use this when doing a resize by cell content, if user provided a `width` it won't override it.
2030
- gridPresetColumns.forEach((col) => (col.originalWidth = col.width));
2031
- // finally set the new presets columns (including checkbox selector if need be)
2032
- this.slickGrid.setColumns(gridPresetColumns);
2033
- this.sharedService.visibleColumns = gridPresetColumns;
2034
- }
1429
+ // delegate to GridStateService for centralized column arrangement logic
1430
+ // we pass `false` for triggerAutoSizeColumns to maintain original behavior on preset load
1431
+ this.gridStateService.changeColumnsArrangement(this.options.presets.columns, false);
2035
1432
  }
2036
1433
  }
2037
1434
  /** Load any possible Filters Grid Presets */
@@ -2068,7 +1465,7 @@ class AngularSlickgridComponent {
2068
1465
  loadRowSelectionPresetWhenExists() {
2069
1466
  // if user entered some Row Selections "presets"
2070
1467
  const presets = this.options?.presets;
2071
- const enableRowSelection = this.options && (this.options.enableCheckboxSelector || this.options.enableRowSelection || this.options.enableHybridSelection);
1468
+ const enableRowSelection = this.options && (this.options.enableCheckboxSelector || this.options.enableSelection);
2072
1469
  if (enableRowSelection &&
2073
1470
  this.slickGrid?.getSelectionModel() &&
2074
1471
  presets?.rowSelection &&
@@ -2112,11 +1509,11 @@ class AngularSlickgridComponent {
2112
1509
  // On a deep extend, Object and Array are extended, but object wrappers on primitive types such as String, Boolean, and Number are not.
2113
1510
  if (options?.pagination &&
2114
1511
  (gridOptions.enablePagination || gridOptions.backendServiceApi) &&
2115
- (this.forRootConfig.pagination || gridOptions.pagination)) {
1512
+ (this.forRootConfig?.pagination || gridOptions.pagination)) {
2116
1513
  options.pagination.pageSize =
2117
- gridOptions.pagination?.pageSize ?? this.forRootConfig.pagination?.pageSize ?? GlobalGridOptions.pagination.pageSize;
1514
+ gridOptions.pagination?.pageSize ?? this.forRootConfig?.pagination?.pageSize ?? GlobalGridOptions.pagination.pageSize;
2118
1515
  options.pagination.pageSizes =
2119
- gridOptions.pagination?.pageSizes ?? this.forRootConfig.pagination?.pageSizes ?? GlobalGridOptions.pagination.pageSizes;
1516
+ gridOptions.pagination?.pageSizes ?? this.forRootConfig?.pagination?.pageSizes ?? GlobalGridOptions.pagination.pageSizes;
2120
1517
  }
2121
1518
  // also make sure to show the header row if user have enabled filtering
2122
1519
  this._hideHeaderRowAfterPageLoad = options.showHeaderRow === false;
@@ -2152,20 +1549,40 @@ class AngularSlickgridComponent {
2152
1549
  // Angular-Slickgrid requires RxJS, so we'll register it as the first resource
2153
1550
  this.registerRxJsResource(new RxJsResource());
2154
1551
  if (this.options.enableRowDetailView) {
2155
- this.slickRowDetailView = new SlickRowDetailView(this.angularUtilService, this.appRef, this._eventPubSubService, this.elm.nativeElement, this.rxjs);
2156
- this.slickRowDetailView.create(this.columns, this.options);
2157
- this.extensionService.addExtensionToList(ExtensionName.rowDetailView, {
2158
- name: ExtensionName.rowDetailView,
2159
- instance: this.slickRowDetailView,
2160
- });
1552
+ const RowDetailClass = this._registeredResources.find((res) => res.pluginName === 'AngularRowDetailView');
1553
+ if (!RowDetailClass) {
1554
+ throw new Error('[Angular-Slickgrid] You enabled the Row Detail View feature but you did not provide the "AngularRowDetailView" class as an external resource.');
1555
+ }
1556
+ if (RowDetailClass) {
1557
+ const rowDetailInstance = new RowDetailClass(this.angularUtilService, this.appRef, this._eventPubSubService, this.elm.nativeElement, this.rxjs);
1558
+ this.slickRowDetailView = rowDetailInstance;
1559
+ rowDetailInstance.create(this.columns, this.options);
1560
+ this.extensionService.addExtensionToList('rowDetailView', {
1561
+ name: 'rowDetailView',
1562
+ instance: this.slickRowDetailView,
1563
+ });
1564
+ }
1565
+ }
1566
+ }
1567
+ /** initialized & auto-enable external registered resources, e.g. if user registers `ExcelExportService` then let's auto-enable `enableExcelExport:true` */
1568
+ autoEnableInitializedResources(resource) {
1569
+ if (this.slickGrid && typeof resource.init === 'function') {
1570
+ resource.init(this.slickGrid, this.containerService);
1571
+ }
1572
+ // auto-enable unless the flag was specifically disabled by the end user
1573
+ if ('pluginName' in resource) {
1574
+ const pluginFlagName = PluginFlagMappings.get(resource.pluginName);
1575
+ if (pluginFlagName && this.options[pluginFlagName] !== false) {
1576
+ this.options[pluginFlagName] = true;
1577
+ this.slickGrid?.setOptions({ [pluginFlagName]: true });
1578
+ }
2161
1579
  }
2162
1580
  }
2163
1581
  initializeExternalResources(resources) {
1582
+ PluginFlagMappings.set('AngularRowDetailView', 'enableRowDetailView'); // map the external Row Detail View resource to its flag
2164
1583
  if (Array.isArray(resources)) {
2165
1584
  for (const resource of resources) {
2166
- if (this.slickGrid && typeof resource.init === 'function') {
2167
- resource.init(this.slickGrid, this.containerService);
2168
- }
1585
+ this.autoEnableInitializedResources(resource);
2169
1586
  }
2170
1587
  }
2171
1588
  }
@@ -2304,74 +1721,95 @@ class AngularSlickgridComponent {
2304
1721
  }
2305
1722
  }
2306
1723
  }
2307
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularSlickgridComponent, deps: [{ token: AngularUtilService }, { token: i0.ApplicationRef }, { token: i0.ChangeDetectorRef }, { token: ContainerService }, { token: i0.ElementRef }, { token: i1.TranslateService, optional: true }, { token: TranslaterService, optional: true }, { token: 'config' }, { token: 'externalService' }], target: i0.ɵɵFactoryTarget.Component });
2308
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: AngularSlickgridComponent, isStandalone: false, selector: "angular-slickgrid", inputs: { customDataView: "customDataView", gridId: "gridId", options: "options", paginationOptions: "paginationOptions", columns: "columns", dataset: "dataset", datasetHierarchical: "datasetHierarchical" }, outputs: { columnsChange: "columnsChange", onActiveCellChanged: "onActiveCellChanged", onActiveCellPositionChanged: "onActiveCellPositionChanged", onAddNewRow: "onAddNewRow", onAutosizeColumns: "onAutosizeColumns", onBeforeAppendCell: "onBeforeAppendCell", onBeforeCellEditorDestroy: "onBeforeCellEditorDestroy", onBeforeColumnsResize: "onBeforeColumnsResize", onBeforeDestroy: "onBeforeDestroy", onBeforeEditCell: "onBeforeEditCell", onBeforeHeaderCellDestroy: "onBeforeHeaderCellDestroy", onBeforeHeaderRowCellDestroy: "onBeforeHeaderRowCellDestroy", onBeforeFooterRowCellDestroy: "onBeforeFooterRowCellDestroy", onBeforeSetColumns: "onBeforeSetColumns", onBeforeSort: "onBeforeSort", onCellChange: "onCellChange", onCellCssStylesChanged: "onCellCssStylesChanged", onClick: "onClick", onColumnsDrag: "onColumnsDrag", onColumnsReordered: "onColumnsReordered", onColumnsResized: "onColumnsResized", onColumnsResizeDblClick: "onColumnsResizeDblClick", onCompositeEditorChange: "onCompositeEditorChange", onContextMenu: "onContextMenu", onDrag: "onDrag", onDragEnd: "onDragEnd", onDragInit: "onDragInit", onDragStart: "onDragStart", onDragReplaceCells: "onDragReplaceCells", onDblClick: "onDblClick", onFooterContextMenu: "onFooterContextMenu", onFooterRowCellRendered: "onFooterRowCellRendered", onHeaderCellRendered: "onHeaderCellRendered", onFooterClick: "onFooterClick", onHeaderClick: "onHeaderClick", onHeaderContextMenu: "onHeaderContextMenu", onHeaderMouseEnter: "onHeaderMouseEnter", onHeaderMouseLeave: "onHeaderMouseLeave", onHeaderRowCellRendered: "onHeaderRowCellRendered", onHeaderRowMouseEnter: "onHeaderRowMouseEnter", onHeaderRowMouseLeave: "onHeaderRowMouseLeave", onKeyDown: "onKeyDown", onMouseEnter: "onMouseEnter", onMouseLeave: "onMouseLeave", onValidationError: "onValidationError", onViewportChanged: "onViewportChanged", onRendered: "onRendered", onSelectedRowsChanged: "onSelectedRowsChanged", onSetOptions: "onSetOptions", onScroll: "onScroll", onSort: "onSort", onBeforePagingInfoChanged: "onBeforePagingInfoChanged", onGroupExpanded: "onGroupExpanded", onGroupCollapsed: "onGroupCollapsed", onPagingInfoChanged: "onPagingInfoChanged", onRowCountChanged: "onRowCountChanged", onRowsChanged: "onRowsChanged", onRowsOrCountChanged: "onRowsOrCountChanged", onSelectedRowIdsChanged: "onSelectedRowIdsChanged", onSetItemsCalled: "onSetItemsCalled", onAfterMenuShow: "onAfterMenuShow", onBeforeMenuClose: "onBeforeMenuClose", onBeforeMenuShow: "onBeforeMenuShow", onColumnsChanged: "onColumnsChanged", onCommand: "onCommand", onGridMenuColumnsChanged: "onGridMenuColumnsChanged", onMenuClose: "onMenuClose", onCopyCells: "onCopyCells", onCopyCancelled: "onCopyCancelled", onPasteCells: "onPasteCells", onBeforePasteCell: "onBeforePasteCell", onAfterExportToExcel: "onAfterExportToExcel", onBeforeExportToExcel: "onBeforeExportToExcel", onBeforeFilterChange: "onBeforeFilterChange", onBeforeFilterClear: "onBeforeFilterClear", onBeforeSearchChange: "onBeforeSearchChange", onBeforeSortChange: "onBeforeSortChange", onContextMenuClearGrouping: "onContextMenuClearGrouping", onContextMenuCollapseAllGroups: "onContextMenuCollapseAllGroups", onContextMenuExpandAllGroups: "onContextMenuExpandAllGroups", onOptionSelected: "onOptionSelected", onColumnPickerColumnsChanged: "onColumnPickerColumnsChanged", onGridMenuMenuClose: "onGridMenuMenuClose", onGridMenuBeforeMenuShow: "onGridMenuBeforeMenuShow", onGridMenuAfterMenuShow: "onGridMenuAfterMenuShow", onGridMenuClearAllPinning: "onGridMenuClearAllPinning", onGridMenuClearAllFilters: "onGridMenuClearAllFilters", onGridMenuClearAllSorting: "onGridMenuClearAllSorting", onGridMenuCommand: "onGridMenuCommand", onHeaderButtonCommand: "onHeaderButtonCommand", onHeaderMenuCommand: "onHeaderMenuCommand", onHeaderMenuColumnResizeByContent: "onHeaderMenuColumnResizeByContent", onHeaderMenuBeforeMenuShow: "onHeaderMenuBeforeMenuShow", onHeaderMenuAfterMenuShow: "onHeaderMenuAfterMenuShow", onHideColumns: "onHideColumns", onItemsAdded: "onItemsAdded", onItemsDeleted: "onItemsDeleted", onItemsUpdated: "onItemsUpdated", onItemsUpserted: "onItemsUpserted", onFullResizeByContentRequested: "onFullResizeByContentRequested", onGridStateChanged: "onGridStateChanged", onBeforePaginationChange: "onBeforePaginationChange", onPaginationChanged: "onPaginationChanged", onPaginationRefreshed: "onPaginationRefreshed", onPaginationVisibilityChanged: "onPaginationVisibilityChanged", onPaginationSetCursorBased: "onPaginationSetCursorBased", onGridBeforeResize: "onGridBeforeResize", onGridAfterResize: "onGridAfterResize", onBeforeResizeByContent: "onBeforeResizeByContent", onAfterResizeByContent: "onAfterResizeByContent", onSortCleared: "onSortCleared", onFilterChanged: "onFilterChanged", onFilterCleared: "onFilterCleared", onSortChanged: "onSortChanged", onTreeItemToggled: "onTreeItemToggled", onTreeFullToggleEnd: "onTreeFullToggleEnd", onTreeFullToggleStart: "onTreeFullToggleStart", onBeforeGridCreate: "onBeforeGridCreate", onGridCreated: "onGridCreated", onDataviewCreated: "onDataviewCreated", onAngularGridCreated: "onAngularGridCreated", onBeforeGridDestroy: "onBeforeGridDestroy", onAfterGridDestroyed: "onAfterGridDestroyed", onLanguageChange: "onLanguageChange" }, providers: [AngularUtilService, TranslaterService], queries: [{ propertyName: "slickgridHeader", first: true, predicate: ["slickgridHeader"], descendants: true, static: true }, { propertyName: "slickgridFooter", first: true, predicate: ["slickgridFooter"], descendants: true, static: true }], ngImport: i0, template: "<div id=\"slickGridContainer-{{ gridId }}\" class=\"gridPane\">\n <ng-container *ngTemplateOutlet=\"slickgridHeader\"></ng-container>\n <div attr.id=\"{{ gridId }}\" class=\"slickgrid-container\"></div>\n <ng-container *ngTemplateOutlet=\"slickgridFooter\"></ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], preserveWhitespaces: true });
2309
- }
2310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularSlickgridComponent, decorators: [{
2311
- type: Component,
2312
- args: [{ selector: 'angular-slickgrid', providers: [AngularUtilService, TranslaterService], standalone: false, template: "<div id=\"slickGridContainer-{{ gridId }}\" class=\"gridPane\">\n <ng-container *ngTemplateOutlet=\"slickgridHeader\"></ng-container>\n <div attr.id=\"{{ gridId }}\" class=\"slickgrid-container\"></div>\n <ng-container *ngTemplateOutlet=\"slickgridFooter\"></ng-container>\n</div>\n" }]
2313
- }], ctorParameters: () => [{ type: AngularUtilService }, { type: i0.ApplicationRef }, { type: i0.ChangeDetectorRef }, { type: ContainerService }, { type: i0.ElementRef }, { type: i1.TranslateService, decorators: [{
2314
- type: Optional
2315
- }] }, { type: TranslaterService, decorators: [{
2316
- type: Optional
2317
- }] }, { type: undefined, decorators: [{
2318
- type: Inject,
2319
- args: ['config']
2320
- }] }, { type: undefined, decorators: [{
2321
- type: Inject,
2322
- args: ['externalService']
2323
- }] }], propDecorators: { customDataView: [{
2324
- type: Input
2325
- }], gridId: [{
2326
- type: Input
2327
- }], options: [{
2328
- type: Input
2329
- }], paginationOptions: [{
2330
- type: Input
2331
- }], columns: [{
2332
- type: Input
2333
- }], columnsChange: [{
2334
- type: Output
2335
- }], dataset: [{
2336
- type: Input
2337
- }], datasetHierarchical: [{
2338
- type: Input
2339
- }], slickgridHeader: [{
2340
- type: ContentChild,
2341
- args: ['slickgridHeader', { static: true }]
2342
- }], slickgridFooter: [{
2343
- type: ContentChild,
2344
- args: ['slickgridFooter', { static: true }]
2345
- }] } });
2346
-
2347
- class AngularSlickgridModule {
2348
- static forRoot(config = {}) {
2349
- return {
2350
- ngModule: AngularSlickgridModule,
2351
- providers: [
2352
- { provide: 'config', useValue: config },
2353
- { provide: 'externalService', useValue: null },
2354
- AngularUtilService,
2355
- ContainerService,
2356
- ],
2357
- };
2358
- }
2359
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularSlickgridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2360
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: AngularSlickgridModule, declarations: [AngularSlickgridComponent], imports: [CommonModule, TranslateModule], exports: [AngularSlickgridComponent] });
2361
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularSlickgridModule, imports: [CommonModule, TranslateModule] });
1724
+ static ɵfac = function AngularSlickgridComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AngularSlickgridComponent)(i0.ɵɵdirectiveInject(AngularUtilService), i0.ɵɵdirectiveInject(i0.ApplicationRef), i0.ɵɵdirectiveInject(ContainerService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.TranslateService, 8), i0.ɵɵdirectiveInject(TranslaterService, 8), i0.ɵɵdirectiveInject('defaultGridOption', 8), i0.ɵɵdirectiveInject('externalService', 8)); };
1725
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AngularSlickgridComponent, selectors: [["angular-slickgrid"]], contentQueries: function AngularSlickgridComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
1726
+ i0.ɵɵcontentQuery(dirIndex, _c0, 7)(dirIndex, _c1, 7);
1727
+ } if (rf & 2) {
1728
+ let _t;
1729
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.slickgridHeader = _t.first);
1730
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.slickgridFooter = _t.first);
1731
+ } }, inputs: { customDataView: "customDataView", gridId: "gridId", options: "options", containerClasses: "containerClasses", paginationOptions: "paginationOptions", columns: "columns", dataset: "dataset", datasetHierarchical: "datasetHierarchical" }, outputs: { columnsChange: "columnsChange", onActiveCellChanged: "onActiveCellChanged", onActiveCellPositionChanged: "onActiveCellPositionChanged", onAddNewRow: "onAddNewRow", onAutosizeColumns: "onAutosizeColumns", onBeforeAppendCell: "onBeforeAppendCell", onBeforeCellEditorDestroy: "onBeforeCellEditorDestroy", onBeforeColumnsResize: "onBeforeColumnsResize", onBeforeDestroy: "onBeforeDestroy", onBeforeEditCell: "onBeforeEditCell", onBeforeHeaderCellDestroy: "onBeforeHeaderCellDestroy", onBeforeHeaderRowCellDestroy: "onBeforeHeaderRowCellDestroy", onBeforeFooterRowCellDestroy: "onBeforeFooterRowCellDestroy", onBeforeSetColumns: "onBeforeSetColumns", onBeforeSort: "onBeforeSort", onCellChange: "onCellChange", onCellCssStylesChanged: "onCellCssStylesChanged", onClick: "onClick", onColumnsDrag: "onColumnsDrag", onColumnsReordered: "onColumnsReordered", onColumnsResized: "onColumnsResized", onColumnsResizeDblClick: "onColumnsResizeDblClick", onCompositeEditorChange: "onCompositeEditorChange", onContextMenu: "onContextMenu", onDrag: "onDrag", onDragEnd: "onDragEnd", onDragInit: "onDragInit", onDragStart: "onDragStart", onDragReplaceCells: "onDragReplaceCells", onDblClick: "onDblClick", onFooterContextMenu: "onFooterContextMenu", onFooterRowCellRendered: "onFooterRowCellRendered", onHeaderCellRendered: "onHeaderCellRendered", onFooterClick: "onFooterClick", onHeaderClick: "onHeaderClick", onHeaderContextMenu: "onHeaderContextMenu", onHeaderMouseEnter: "onHeaderMouseEnter", onHeaderMouseLeave: "onHeaderMouseLeave", onHeaderRowCellRendered: "onHeaderRowCellRendered", onHeaderRowMouseEnter: "onHeaderRowMouseEnter", onHeaderRowMouseLeave: "onHeaderRowMouseLeave", onKeyDown: "onKeyDown", onMouseEnter: "onMouseEnter", onMouseLeave: "onMouseLeave", onValidationError: "onValidationError", onViewportChanged: "onViewportChanged", onRendered: "onRendered", onSelectedRowsChanged: "onSelectedRowsChanged", onSetOptions: "onSetOptions", onScroll: "onScroll", onSort: "onSort", onBeforePagingInfoChanged: "onBeforePagingInfoChanged", onGroupExpanded: "onGroupExpanded", onGroupCollapsed: "onGroupCollapsed", onPagingInfoChanged: "onPagingInfoChanged", onRowCountChanged: "onRowCountChanged", onRowsChanged: "onRowsChanged", onRowsOrCountChanged: "onRowsOrCountChanged", onSelectedRowIdsChanged: "onSelectedRowIdsChanged", onSetItemsCalled: "onSetItemsCalled", onAfterMenuShow: "onAfterMenuShow", onBeforeMenuClose: "onBeforeMenuClose", onBeforeMenuShow: "onBeforeMenuShow", onColumnsChanged: "onColumnsChanged", onCommand: "onCommand", onGridMenuColumnsChanged: "onGridMenuColumnsChanged", onMenuClose: "onMenuClose", onCopyCells: "onCopyCells", onCopyCancelled: "onCopyCancelled", onPasteCells: "onPasteCells", onBeforePasteCell: "onBeforePasteCell", onAfterExportToExcel: "onAfterExportToExcel", onBeforeExportToExcel: "onBeforeExportToExcel", onBeforeFilterChange: "onBeforeFilterChange", onBeforeFilterClear: "onBeforeFilterClear", onBeforeSearchChange: "onBeforeSearchChange", onBeforeSortChange: "onBeforeSortChange", onContextMenuClearGrouping: "onContextMenuClearGrouping", onContextMenuCollapseAllGroups: "onContextMenuCollapseAllGroups", onContextMenuExpandAllGroups: "onContextMenuExpandAllGroups", onOptionSelected: "onOptionSelected", onColumnPickerColumnsChanged: "onColumnPickerColumnsChanged", onGridMenuMenuClose: "onGridMenuMenuClose", onGridMenuBeforeMenuShow: "onGridMenuBeforeMenuShow", onGridMenuAfterMenuShow: "onGridMenuAfterMenuShow", onGridMenuClearAllPinning: "onGridMenuClearAllPinning", onGridMenuClearAllFilters: "onGridMenuClearAllFilters", onGridMenuClearAllSorting: "onGridMenuClearAllSorting", onGridMenuCommand: "onGridMenuCommand", onHeaderButtonCommand: "onHeaderButtonCommand", onHeaderMenuCommand: "onHeaderMenuCommand", onHeaderMenuColumnResizeByContent: "onHeaderMenuColumnResizeByContent", onHeaderMenuBeforeMenuShow: "onHeaderMenuBeforeMenuShow", onHeaderMenuAfterMenuShow: "onHeaderMenuAfterMenuShow", onHideColumns: "onHideColumns", onItemsAdded: "onItemsAdded", onItemsDeleted: "onItemsDeleted", onItemsUpdated: "onItemsUpdated", onItemsUpserted: "onItemsUpserted", onFullResizeByContentRequested: "onFullResizeByContentRequested", onGridStateChanged: "onGridStateChanged", onBeforePaginationChange: "onBeforePaginationChange", onPaginationChanged: "onPaginationChanged", onPaginationRefreshed: "onPaginationRefreshed", onPaginationVisibilityChanged: "onPaginationVisibilityChanged", onPaginationSetCursorBased: "onPaginationSetCursorBased", onGridBeforeResize: "onGridBeforeResize", onGridAfterResize: "onGridAfterResize", onBeforeResizeByContent: "onBeforeResizeByContent", onAfterResizeByContent: "onAfterResizeByContent", onSortCleared: "onSortCleared", onFilterChanged: "onFilterChanged", onFilterCleared: "onFilterCleared", onSortChanged: "onSortChanged", onTreeItemToggled: "onTreeItemToggled", onTreeFullToggleEnd: "onTreeFullToggleEnd", onTreeFullToggleStart: "onTreeFullToggleStart", onBeforeGridCreate: "onBeforeGridCreate", onGridCreated: "onGridCreated", onDataviewCreated: "onDataviewCreated", onAngularGridCreated: "onAngularGridCreated", onBeforeGridDestroy: "onBeforeGridDestroy", onAfterGridDestroyed: "onAfterGridDestroyed", onLanguageChange: "onLanguageChange" }, features: [i0.ɵɵProvidersFeature([AngularUtilService, TranslaterService])], decls: 10, vars: 7, consts: [[1, "gridPane", 3, "id"], [4, "ngTemplateOutlet"], [1, "slickgrid-container"]], template: function AngularSlickgridComponent_Template(rf, ctx) { if (rf & 1) {
1732
+ i0.ɵɵtext(0, "\n ");
1733
+ i0.ɵɵelementStart(1, "div", 0);
1734
+ i0.ɵɵtext(2, "\n ");
1735
+ i0.ɵɵtemplate(3, AngularSlickgridComponent_ng_container_3_Template, 1, 0, "ng-container", 1);
1736
+ i0.ɵɵtext(4, "\n ");
1737
+ i0.ɵɵelement(5, "div", 2);
1738
+ i0.ɵɵtext(6, "\n ");
1739
+ i0.ɵɵtemplate(7, AngularSlickgridComponent_ng_container_7_Template, 1, 0, "ng-container", 1);
1740
+ i0.ɵɵtext(8, "\n ");
1741
+ i0.ɵɵelementEnd();
1742
+ i0.ɵɵtext(9, "\n ");
1743
+ } if (rf & 2) {
1744
+ i0.ɵɵadvance();
1745
+ i0.ɵɵclassMap(ctx.containerClasses);
1746
+ i0.ɵɵproperty("id", i0.ɵɵinterpolate1("slickGridContainer-", ctx.gridId));
1747
+ i0.ɵɵadvance(2);
1748
+ i0.ɵɵproperty("ngTemplateOutlet", ctx.slickgridHeader);
1749
+ i0.ɵɵadvance(2);
1750
+ i0.ɵɵattribute("id", ctx.gridId);
1751
+ i0.ɵɵadvance(2);
1752
+ i0.ɵɵproperty("ngTemplateOutlet", ctx.slickgridFooter);
1753
+ } }, dependencies: [NgTemplateOutlet], encapsulation: 2 });
2362
1754
  }
2363
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AngularSlickgridModule, decorators: [{
2364
- type: NgModule,
2365
- args: [{
2366
- imports: [CommonModule, TranslateModule],
2367
- declarations: [AngularSlickgridComponent],
2368
- exports: [AngularSlickgridComponent],
2369
- }]
2370
- }] });
1755
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AngularSlickgridComponent, [{
1756
+ type: Component,
1757
+ args: [{
1758
+ selector: 'angular-slickgrid',
1759
+ template: `
1760
+ <div id="slickGridContainer-{{ gridId }}" class="gridPane" [class]="containerClasses">
1761
+ <ng-container *ngTemplateOutlet="slickgridHeader"></ng-container>
1762
+ <div [attr.id]="gridId" class="slickgrid-container"></div>
1763
+ <ng-container *ngTemplateOutlet="slickgridFooter"></ng-container>
1764
+ </div>
1765
+ `,
1766
+ providers: [AngularUtilService, TranslaterService], // make everything transient (non-singleton)
1767
+ imports: [NgTemplateOutlet],
1768
+ }]
1769
+ }], () => [{ type: AngularUtilService }, { type: i0.ApplicationRef }, { type: ContainerService }, { type: i0.ElementRef }, { type: i1.TranslateService, decorators: [{
1770
+ type: Optional
1771
+ }] }, { type: TranslaterService, decorators: [{
1772
+ type: Optional
1773
+ }] }, { type: undefined, decorators: [{
1774
+ type: Optional
1775
+ }, {
1776
+ type: Inject,
1777
+ args: ['defaultGridOption']
1778
+ }] }, { type: undefined, decorators: [{
1779
+ type: Optional
1780
+ }, {
1781
+ type: Inject,
1782
+ args: ['externalService']
1783
+ }] }], { customDataView: [{
1784
+ type: Input
1785
+ }], gridId: [{
1786
+ type: Input
1787
+ }], options: [{
1788
+ type: Input
1789
+ }], containerClasses: [{
1790
+ type: Input
1791
+ }], paginationOptions: [{
1792
+ type: Input
1793
+ }], columns: [{
1794
+ type: Input
1795
+ }], columnsChange: [{
1796
+ type: Output
1797
+ }], onActiveCellChanged: [{ type: i0.Output, args: ["onActiveCellChanged"] }], onActiveCellPositionChanged: [{ type: i0.Output, args: ["onActiveCellPositionChanged"] }], onAddNewRow: [{ type: i0.Output, args: ["onAddNewRow"] }], onAutosizeColumns: [{ type: i0.Output, args: ["onAutosizeColumns"] }], onBeforeAppendCell: [{ type: i0.Output, args: ["onBeforeAppendCell"] }], onBeforeCellEditorDestroy: [{ type: i0.Output, args: ["onBeforeCellEditorDestroy"] }], onBeforeColumnsResize: [{ type: i0.Output, args: ["onBeforeColumnsResize"] }], onBeforeDestroy: [{ type: i0.Output, args: ["onBeforeDestroy"] }], onBeforeEditCell: [{ type: i0.Output, args: ["onBeforeEditCell"] }], onBeforeHeaderCellDestroy: [{ type: i0.Output, args: ["onBeforeHeaderCellDestroy"] }], onBeforeHeaderRowCellDestroy: [{ type: i0.Output, args: ["onBeforeHeaderRowCellDestroy"] }], onBeforeFooterRowCellDestroy: [{ type: i0.Output, args: ["onBeforeFooterRowCellDestroy"] }], onBeforeSetColumns: [{ type: i0.Output, args: ["onBeforeSetColumns"] }], onBeforeSort: [{ type: i0.Output, args: ["onBeforeSort"] }], onCellChange: [{ type: i0.Output, args: ["onCellChange"] }], onCellCssStylesChanged: [{ type: i0.Output, args: ["onCellCssStylesChanged"] }], onClick: [{ type: i0.Output, args: ["onClick"] }], onColumnsDrag: [{ type: i0.Output, args: ["onColumnsDrag"] }], onColumnsReordered: [{ type: i0.Output, args: ["onColumnsReordered"] }], onColumnsResized: [{ type: i0.Output, args: ["onColumnsResized"] }], onColumnsResizeDblClick: [{ type: i0.Output, args: ["onColumnsResizeDblClick"] }], onCompositeEditorChange: [{ type: i0.Output, args: ["onCompositeEditorChange"] }], onContextMenu: [{ type: i0.Output, args: ["onContextMenu"] }], onDrag: [{ type: i0.Output, args: ["onDrag"] }], onDragEnd: [{ type: i0.Output, args: ["onDragEnd"] }], onDragInit: [{ type: i0.Output, args: ["onDragInit"] }], onDragStart: [{ type: i0.Output, args: ["onDragStart"] }], onDragReplaceCells: [{ type: i0.Output, args: ["onDragReplaceCells"] }], onDblClick: [{ type: i0.Output, args: ["onDblClick"] }], onFooterContextMenu: [{ type: i0.Output, args: ["onFooterContextMenu"] }], onFooterRowCellRendered: [{ type: i0.Output, args: ["onFooterRowCellRendered"] }], onHeaderCellRendered: [{ type: i0.Output, args: ["onHeaderCellRendered"] }], onFooterClick: [{ type: i0.Output, args: ["onFooterClick"] }], onHeaderClick: [{ type: i0.Output, args: ["onHeaderClick"] }], onHeaderContextMenu: [{ type: i0.Output, args: ["onHeaderContextMenu"] }], onHeaderMouseEnter: [{ type: i0.Output, args: ["onHeaderMouseEnter"] }], onHeaderMouseLeave: [{ type: i0.Output, args: ["onHeaderMouseLeave"] }], onHeaderRowCellRendered: [{ type: i0.Output, args: ["onHeaderRowCellRendered"] }], onHeaderRowMouseEnter: [{ type: i0.Output, args: ["onHeaderRowMouseEnter"] }], onHeaderRowMouseLeave: [{ type: i0.Output, args: ["onHeaderRowMouseLeave"] }], onKeyDown: [{ type: i0.Output, args: ["onKeyDown"] }], onMouseEnter: [{ type: i0.Output, args: ["onMouseEnter"] }], onMouseLeave: [{ type: i0.Output, args: ["onMouseLeave"] }], onValidationError: [{ type: i0.Output, args: ["onValidationError"] }], onViewportChanged: [{ type: i0.Output, args: ["onViewportChanged"] }], onRendered: [{ type: i0.Output, args: ["onRendered"] }], onSelectedRowsChanged: [{ type: i0.Output, args: ["onSelectedRowsChanged"] }], onSetOptions: [{ type: i0.Output, args: ["onSetOptions"] }], onScroll: [{ type: i0.Output, args: ["onScroll"] }], onSort: [{ type: i0.Output, args: ["onSort"] }], onBeforePagingInfoChanged: [{ type: i0.Output, args: ["onBeforePagingInfoChanged"] }], onGroupExpanded: [{ type: i0.Output, args: ["onGroupExpanded"] }], onGroupCollapsed: [{ type: i0.Output, args: ["onGroupCollapsed"] }], onPagingInfoChanged: [{ type: i0.Output, args: ["onPagingInfoChanged"] }], onRowCountChanged: [{ type: i0.Output, args: ["onRowCountChanged"] }], onRowsChanged: [{ type: i0.Output, args: ["onRowsChanged"] }], onRowsOrCountChanged: [{ type: i0.Output, args: ["onRowsOrCountChanged"] }], onSelectedRowIdsChanged: [{ type: i0.Output, args: ["onSelectedRowIdsChanged"] }], onSetItemsCalled: [{ type: i0.Output, args: ["onSetItemsCalled"] }], onAfterMenuShow: [{ type: i0.Output, args: ["onAfterMenuShow"] }], onBeforeMenuClose: [{ type: i0.Output, args: ["onBeforeMenuClose"] }], onBeforeMenuShow: [{ type: i0.Output, args: ["onBeforeMenuShow"] }], onColumnsChanged: [{ type: i0.Output, args: ["onColumnsChanged"] }], onCommand: [{ type: i0.Output, args: ["onCommand"] }], onGridMenuColumnsChanged: [{ type: i0.Output, args: ["onGridMenuColumnsChanged"] }], onMenuClose: [{ type: i0.Output, args: ["onMenuClose"] }], onCopyCells: [{ type: i0.Output, args: ["onCopyCells"] }], onCopyCancelled: [{ type: i0.Output, args: ["onCopyCancelled"] }], onPasteCells: [{ type: i0.Output, args: ["onPasteCells"] }], onBeforePasteCell: [{ type: i0.Output, args: ["onBeforePasteCell"] }], onAfterExportToExcel: [{ type: i0.Output, args: ["onAfterExportToExcel"] }], onBeforeExportToExcel: [{ type: i0.Output, args: ["onBeforeExportToExcel"] }], onBeforeFilterChange: [{ type: i0.Output, args: ["onBeforeFilterChange"] }], onBeforeFilterClear: [{ type: i0.Output, args: ["onBeforeFilterClear"] }], onBeforeSearchChange: [{ type: i0.Output, args: ["onBeforeSearchChange"] }], onBeforeSortChange: [{ type: i0.Output, args: ["onBeforeSortChange"] }], onContextMenuClearGrouping: [{ type: i0.Output, args: ["onContextMenuClearGrouping"] }], onContextMenuCollapseAllGroups: [{ type: i0.Output, args: ["onContextMenuCollapseAllGroups"] }], onContextMenuExpandAllGroups: [{ type: i0.Output, args: ["onContextMenuExpandAllGroups"] }], onOptionSelected: [{ type: i0.Output, args: ["onOptionSelected"] }], onColumnPickerColumnsChanged: [{ type: i0.Output, args: ["onColumnPickerColumnsChanged"] }], onGridMenuMenuClose: [{ type: i0.Output, args: ["onGridMenuMenuClose"] }], onGridMenuBeforeMenuShow: [{ type: i0.Output, args: ["onGridMenuBeforeMenuShow"] }], onGridMenuAfterMenuShow: [{ type: i0.Output, args: ["onGridMenuAfterMenuShow"] }], onGridMenuClearAllPinning: [{ type: i0.Output, args: ["onGridMenuClearAllPinning"] }], onGridMenuClearAllFilters: [{ type: i0.Output, args: ["onGridMenuClearAllFilters"] }], onGridMenuClearAllSorting: [{ type: i0.Output, args: ["onGridMenuClearAllSorting"] }], onGridMenuCommand: [{ type: i0.Output, args: ["onGridMenuCommand"] }], onHeaderButtonCommand: [{ type: i0.Output, args: ["onHeaderButtonCommand"] }], onHeaderMenuCommand: [{ type: i0.Output, args: ["onHeaderMenuCommand"] }], onHeaderMenuColumnResizeByContent: [{ type: i0.Output, args: ["onHeaderMenuColumnResizeByContent"] }], onHeaderMenuBeforeMenuShow: [{ type: i0.Output, args: ["onHeaderMenuBeforeMenuShow"] }], onHeaderMenuAfterMenuShow: [{ type: i0.Output, args: ["onHeaderMenuAfterMenuShow"] }], onHideColumns: [{ type: i0.Output, args: ["onHideColumns"] }], onItemsAdded: [{ type: i0.Output, args: ["onItemsAdded"] }], onItemsDeleted: [{ type: i0.Output, args: ["onItemsDeleted"] }], onItemsUpdated: [{ type: i0.Output, args: ["onItemsUpdated"] }], onItemsUpserted: [{ type: i0.Output, args: ["onItemsUpserted"] }], onFullResizeByContentRequested: [{ type: i0.Output, args: ["onFullResizeByContentRequested"] }], onGridStateChanged: [{ type: i0.Output, args: ["onGridStateChanged"] }], onBeforePaginationChange: [{ type: i0.Output, args: ["onBeforePaginationChange"] }], onPaginationChanged: [{ type: i0.Output, args: ["onPaginationChanged"] }], onPaginationRefreshed: [{ type: i0.Output, args: ["onPaginationRefreshed"] }], onPaginationVisibilityChanged: [{ type: i0.Output, args: ["onPaginationVisibilityChanged"] }], onPaginationSetCursorBased: [{ type: i0.Output, args: ["onPaginationSetCursorBased"] }], onGridBeforeResize: [{ type: i0.Output, args: ["onGridBeforeResize"] }], onGridAfterResize: [{ type: i0.Output, args: ["onGridAfterResize"] }], onBeforeResizeByContent: [{ type: i0.Output, args: ["onBeforeResizeByContent"] }], onAfterResizeByContent: [{ type: i0.Output, args: ["onAfterResizeByContent"] }], onSortCleared: [{ type: i0.Output, args: ["onSortCleared"] }], onFilterChanged: [{ type: i0.Output, args: ["onFilterChanged"] }], onFilterCleared: [{ type: i0.Output, args: ["onFilterCleared"] }], onSortChanged: [{ type: i0.Output, args: ["onSortChanged"] }], onTreeItemToggled: [{ type: i0.Output, args: ["onTreeItemToggled"] }], onTreeFullToggleEnd: [{ type: i0.Output, args: ["onTreeFullToggleEnd"] }], onTreeFullToggleStart: [{ type: i0.Output, args: ["onTreeFullToggleStart"] }], onBeforeGridCreate: [{ type: i0.Output, args: ["onBeforeGridCreate"] }], onGridCreated: [{ type: i0.Output, args: ["onGridCreated"] }], onDataviewCreated: [{ type: i0.Output, args: ["onDataviewCreated"] }], onAngularGridCreated: [{ type: i0.Output, args: ["onAngularGridCreated"] }], onBeforeGridDestroy: [{ type: i0.Output, args: ["onBeforeGridDestroy"] }], onAfterGridDestroyed: [{ type: i0.Output, args: ["onAfterGridDestroyed"] }], onLanguageChange: [{ type: i0.Output, args: ["onLanguageChange"] }], dataset: [{
1798
+ type: Input
1799
+ }], datasetHierarchical: [{
1800
+ type: Input
1801
+ }], slickgridHeader: [{
1802
+ type: ContentChild,
1803
+ args: ['slickgridHeader', { static: true }]
1804
+ }], slickgridFooter: [{
1805
+ type: ContentChild,
1806
+ args: ['slickgridFooter', { static: true }]
1807
+ }] }); })();
1808
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AngularSlickgridComponent, { className: "AngularSlickgridComponent", filePath: "library/components/angular-slickgrid.component.ts", lineNumber: 97 }); })();
2371
1809
 
2372
1810
  /**
2373
1811
  * Generated bundle index. Do not edit.
2374
1812
  */
2375
1813
 
2376
- export { AngularSlickgridComponent, AngularSlickgridModule, AngularUtilService, SlickRowDetailView, SlickgridConfig, unsubscribeAllObservables };
1814
+ export { AngularSlickgridComponent, AngularUtilService, SlickgridConfig, unsubscribeAllObservables };
2377
1815
  //# sourceMappingURL=angular-slickgrid.mjs.map