@theseam/ui-common 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/datatable/models/preferences-accessor.d.ts +3 -15
  2. package/datatable/models/preferences.d.ts +2 -1
  3. package/datatable/services/datatable-preferences.service.d.ts +11 -14
  4. package/datatable/tokens/datatable-preferences-accessor.d.ts +2 -2
  5. package/esm2020/datatable/datatable/datatable.component.mjs +3 -3
  6. package/esm2020/datatable/models/preferences-accessor.mjs +1 -1
  7. package/esm2020/datatable/models/preferences.mjs +1 -1
  8. package/esm2020/datatable/services/datatable-preferences.service.mjs +34 -106
  9. package/esm2020/datatable/tokens/datatable-preferences-accessor.mjs +1 -1
  10. package/esm2020/framework/dashboard/dashboard-widgets/dashboard-widgets.service.mjs +9 -3
  11. package/esm2020/services/preferences/preferences-accessor.mjs +2 -0
  12. package/esm2020/services/preferences/preferences-manager.service.mjs +69 -0
  13. package/esm2020/services/preferences/preferences-record.mjs +74 -0
  14. package/esm2020/services/preferences/preferences.models.mjs +2 -0
  15. package/esm2020/services/public-api.mjs +5 -1
  16. package/esm2020/story-helpers/public-api.mjs +2 -1
  17. package/esm2020/story-helpers/story-preferences-accessor.service.mjs +34 -0
  18. package/esm2020/widget/preferences/widget-preferences.models.mjs +5 -0
  19. package/esm2020/widget/preferences/widget-preferences.service.mjs +78 -0
  20. package/esm2020/widget/preferences/widget-preferences.token.mjs +3 -0
  21. package/esm2020/widget/widget/widget.component.mjs +68 -31
  22. package/esm2020/widget/widget-token.mjs +2 -1
  23. package/fesm2015/theseam-ui-common-datatable.mjs +45 -116
  24. package/fesm2015/theseam-ui-common-datatable.mjs.map +1 -1
  25. package/fesm2015/theseam-ui-common-framework.mjs +9 -3
  26. package/fesm2015/theseam-ui-common-framework.mjs.map +1 -1
  27. package/fesm2015/theseam-ui-common-services.mjs +144 -8
  28. package/fesm2015/theseam-ui-common-services.mjs.map +1 -1
  29. package/fesm2015/theseam-ui-common-story-helpers.mjs +32 -1
  30. package/fesm2015/theseam-ui-common-story-helpers.mjs.map +1 -1
  31. package/fesm2015/theseam-ui-common-widget.mjs +152 -36
  32. package/fesm2015/theseam-ui-common-widget.mjs.map +1 -1
  33. package/fesm2020/theseam-ui-common-datatable.mjs +45 -116
  34. package/fesm2020/theseam-ui-common-datatable.mjs.map +1 -1
  35. package/fesm2020/theseam-ui-common-framework.mjs +8 -3
  36. package/fesm2020/theseam-ui-common-framework.mjs.map +1 -1
  37. package/fesm2020/theseam-ui-common-services.mjs +144 -8
  38. package/fesm2020/theseam-ui-common-services.mjs.map +1 -1
  39. package/fesm2020/theseam-ui-common-story-helpers.mjs +32 -1
  40. package/fesm2020/theseam-ui-common-story-helpers.mjs.map +1 -1
  41. package/fesm2020/theseam-ui-common-widget.mjs +148 -36
  42. package/fesm2020/theseam-ui-common-widget.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/services/preferences/preferences-accessor.d.ts +15 -0
  45. package/services/preferences/preferences-manager.service.d.ts +15 -0
  46. package/services/preferences/preferences-record.d.ts +28 -0
  47. package/services/preferences/preferences.models.d.ts +3 -0
  48. package/services/public-api.d.ts +4 -0
  49. package/story-helpers/public-api.d.ts +1 -0
  50. package/story-helpers/story-preferences-accessor.service.d.ts +19 -0
  51. package/widget/preferences/widget-preferences.models.d.ts +8 -0
  52. package/widget/preferences/widget-preferences.service.d.ts +21 -0
  53. package/widget/preferences/widget-preferences.token.d.ts +3 -0
  54. package/widget/widget/widget.component.d.ts +10 -2
  55. package/widget/widget-token.d.ts +1 -0
@@ -5,7 +5,7 @@ import { DataSource, isDataSource } from '@angular/cdk/collections';
5
5
  import * as i0 from '@angular/core';
6
6
  import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ContentChildren, Directive, Injectable, TemplateRef, ContentChild, Self, Inject, forwardRef, InjectionToken, isDevMode, Optional, ElementRef, ViewChild, HostListener, HostBinding, NgModule } from '@angular/core';
7
7
  import { Subject, BehaviorSubject, of, defer, combineLatest, EMPTY, Subscription, from, isObservable } from 'rxjs';
8
- import { switchMap, map, startWith, auditTime, shareReplay, tap, take, distinctUntilChanged, takeUntil, concatMap, catchError } from 'rxjs/operators';
8
+ import { switchMap, map, startWith, auditTime, shareReplay, take, tap, distinctUntilChanged, takeUntil, concatMap, catchError } from 'rxjs/operators';
9
9
  import { faEllipsisH, faChevronDown, faChevronRight, faSpinner, faColumns, faFileDownload } from '@fortawesome/free-solid-svg-icons';
10
10
  import * as i5$1 from '@marklb/ngx-datatable';
11
11
  import { camelCase, setColumnDefaults as setColumnDefaults$1, translateTemplates, SelectionType, SortType, ColumnMode, DatatableComponent as DatatableComponent$1, DatatableRowDetailDirective, NgxDatatableModule, ScrollbarHelper } from '@marklb/ngx-datatable';
@@ -22,6 +22,7 @@ import * as i4$1 from '@theseam/ui-common/menu';
22
22
  import { TheSeamMenuModule } from '@theseam/ui-common/menu';
23
23
  import * as i5 from '@theseam/ui-common/icon';
24
24
  import { TheSeamIconModule } from '@theseam/ui-common/icon';
25
+ import * as i1$1 from '@theseam/ui-common/services';
25
26
  import * as i6 from '@fortawesome/angular-fontawesome';
26
27
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
27
28
  import * as i7 from '@theseam/ui-common/shared';
@@ -30,7 +31,7 @@ import * as i8 from '@theseam/ui-common/table-cell-type';
30
31
  import { TheSeamTableCellTypeModule } from '@theseam/ui-common/table-cell-type';
31
32
  import * as i7$1 from '@angular/forms';
32
33
  import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
33
- import * as i1$1 from '@theseam/ui-common/scrollbar';
34
+ import * as i1$2 from '@theseam/ui-common/scrollbar';
34
35
  import * as i5$2 from '@theseam/ui-common/checkbox';
35
36
  import { TheSeamCheckboxModule } from '@theseam/ui-common/checkbox';
36
37
  import * as i6$1 from '@theseam/ui-common/form-field';
@@ -39,18 +40,18 @@ import * as i4$2 from '@theseam/ui-common/popover';
39
40
  import { TheSeamPopoverModule } from '@theseam/ui-common/popover';
40
41
  import * as i3 from '@theseam/ui-common/dynamic';
41
42
  import { THESEAM_DYNAMIC_DATA } from '@theseam/ui-common/dynamic';
42
- import * as i1$2 from 'ngx-toastr';
43
+ import * as i1$3 from 'ngx-toastr';
43
44
  import { ToastrModule } from 'ngx-toastr';
44
45
  import * as i2$1 from '@theseam/ui-common/loading';
45
46
  import { TheSeamLoadingModule } from '@theseam/ui-common/loading';
46
47
  import * as i7$2 from '@theseam/ui-common/buttons';
47
48
  import { TheSeamButtonsModule } from '@theseam/ui-common/buttons';
48
- import * as i1$3 from '@theseam/ui-common/modal';
49
+ import * as i1$4 from '@theseam/ui-common/modal';
49
50
  import * as i2$2 from '@theseam/ui-common/dynamic-component-loader';
50
51
  import * as i3$1 from '@angular/common/http';
51
52
  import { ESCAPE } from '@angular/cdk/keycodes';
52
53
  import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
53
- import * as i1$4 from '@angular/cdk/overlay';
54
+ import * as i1$5 from '@angular/cdk/overlay';
54
55
  import { OverlayModule } from '@angular/cdk/overlay';
55
56
  import { A11yModule } from '@angular/cdk/a11y';
56
57
 
@@ -1290,103 +1291,41 @@ const EMPTY_DATATABLE_PREFERENCES = {
1290
1291
 
1291
1292
  const THESEAM_DATATABLE_PREFERENCES_ACCESSOR = new InjectionToken('TheSeamDatatablePreferencesAccessor');
1292
1293
 
1293
- // TODO: Add per key status
1294
1294
  class DatatablePreferencesService {
1295
- get pending() { return this._pending; }
1296
- get loaded() { return this._loaded; }
1297
- constructor(_prefsAccessor) {
1295
+ constructor(_preferencesManager, _prefsAccessor) {
1296
+ this._preferencesManager = _preferencesManager;
1298
1297
  this._prefsAccessor = _prefsAccessor;
1299
- this._tablePrefsMap = new Map();
1298
+ // TODO: Remove the need for this internal pending flag. I only kept it for
1299
+ // backwards compatibility, until better tests are added to make sure if isn't
1300
+ // neccessary anymore.
1301
+ /**
1302
+ * Used to prevent multiple updates from happening at the same time, but it is not per key.
1303
+ */
1300
1304
  this._pending = false;
1301
- this._loaded = false;
1302
1305
  }
1303
- preferences(preferenceKey) {
1304
- let prefs = this._tablePrefsMap.get(preferenceKey);
1305
- if (!prefs) {
1306
- const refreshSubject = new Subject();
1307
- prefs = {
1308
- observable: this._createObservable(refreshSubject, preferenceKey),
1309
- refresh: refreshSubject
1310
- };
1311
- this._tablePrefsMap.set(preferenceKey, prefs);
1306
+ isPending(preferenceKey) {
1307
+ return this._pending || this._preferencesManager.isPending(preferenceKey);
1308
+ }
1309
+ isLoaded(preferenceKey) {
1310
+ if (this._pending) {
1311
+ return false;
1312
1312
  }
1313
- return prefs.observable;
1313
+ return this._preferencesManager.isLoaded(preferenceKey);
1314
1314
  }
1315
- _createObservable(refreshSubject, prefKey) {
1315
+ preferences(preferenceKey) {
1316
1316
  if (!this._prefsAccessor) {
1317
- return of(EMPTY_DATATABLE_PREFERENCES);
1317
+ return of(JSON.parse(JSON.stringify(EMPTY_DATATABLE_PREFERENCES)));
1318
1318
  }
1319
- const accessor = (key) => this._prefsAccessor ? this._prefsAccessor.get(key) : of(JSON.stringify(EMPTY_DATATABLE_PREFERENCES));
1320
- return refreshSubject.pipe(startWith(undefined), switchMap(() => accessor(prefKey).pipe(map(v => {
1321
- if (!v) {
1322
- return null;
1323
- }
1324
- // TODO: Add a schema validator and migration tool to avoid parsing issues.
1325
- try {
1326
- // return JSON.parse(v) as TheSeamDatatablePreferences
1327
- return this._descerializePreferences(v);
1328
- }
1329
- catch (error) {
1330
- if (isDevMode()) {
1331
- // eslint-disable-next-line no-console
1332
- console.error(error);
1333
- }
1334
- return null;
1319
+ return this._preferencesManager.preferences(preferenceKey, this._prefsAccessor, EMPTY_DATATABLE_PREFERENCES).pipe(map(prefs => {
1320
+ if (this._isValidDatatablePreferences(prefs)) {
1321
+ return prefs;
1335
1322
  }
1336
- }), map(v => notNullOrUndefined(v) ? v : EMPTY_DATATABLE_PREFERENCES),
1337
- // tap(v => console.log('preferences$', v)),
1338
- tap(() => {
1339
- this._pending = false;
1340
- this._loaded = true;
1341
- }))), shareReplay({ bufferSize: 1, refCount: true }));
1323
+ throw Error(`Preferences for key '${preferenceKey}' is not a valid datatable preferences.`);
1324
+ }));
1342
1325
  }
1343
1326
  refresh(preferenceKey) {
1344
- const prefs = this._tablePrefsMap.get(preferenceKey);
1345
- if (prefs) {
1346
- this._pending = true;
1347
- prefs.refresh.next();
1348
- }
1327
+ this._preferencesManager.refresh(preferenceKey);
1349
1328
  }
1350
- // TODO: Improve this updating to be more generic, so we can quickly add
1351
- // edits for different preference schema's.
1352
- //
1353
- // TODO: Decide if a send queue/merging of pending queue is needed to avoid
1354
- // out of order updates. This shouldn't be an issue, with how fast preferences
1355
- // will most likely be changing, but it could happen in situations, such as
1356
- // network issues.
1357
- // public setColumnPreference(preferenceKey: string, column: TheSeamDatatablePreferencesColumn): void {
1358
- // if (!this._prefsAccessor) {
1359
- // return
1360
- // }
1361
- // this._pending = true
1362
- // this.preferences(preferenceKey).pipe(
1363
- // map(prefs => {
1364
- // // Making the preferences immutable may not be necessary, but for now
1365
- // // this obj->str->obj will work as a naive clone.
1366
- // const columns = JSON.parse(JSON.stringify(prefs.columns || []))
1367
- // const _colPref = columns.find((c: any) => c.prop === column.prop)
1368
- // // console.log('has', _colPref)
1369
- // if (_colPref) {
1370
- // // console.log('hasProperty(column, "width"))', hasProperty(column, 'width'))
1371
- // if (hasProperty(column, 'width')) { _colPref.width = column.width }
1372
- // if (hasProperty(column, 'canAutoResize')) { _colPref.canAutoResize = column.canAutoResize }
1373
- // if (hasProperty(column, 'hidden')) { _colPref.hidden = column.hidden }
1374
- // } else {
1375
- // columns.push({ ...column })
1376
- // }
1377
- // const newPrefs: TheSeamDatatablePreferences = { ...prefs, columns }
1378
- // return newPrefs
1379
- // }),
1380
- // // tap(v => console.log('newPrefs', v)),
1381
- // take(1),
1382
- // switchMap(newPrefs => this._prefsAccessor
1383
- // ? this._prefsAccessor.update(preferenceKey, JSON.stringify(newPrefs))
1384
- // : of(newPrefs)
1385
- // ),
1386
- // tap(() => this.refresh(preferenceKey))
1387
- // )
1388
- // .subscribe()
1389
- // }
1390
1329
  setAlterations(preferenceKey, alterations) {
1391
1330
  if (!this._prefsAccessor) {
1392
1331
  return;
@@ -1409,6 +1348,7 @@ class DatatablePreferencesService {
1409
1348
  // const newPrefs: TheSeamDatatablePreferences = { ...prefs, columns }
1410
1349
  // return newPrefs
1411
1350
  const newPrefs = Object.assign(Object.assign({}, EMPTY_DATATABLE_PREFERENCES), { alterations });
1351
+ this._pending = false;
1412
1352
  return newPrefs;
1413
1353
  }),
1414
1354
  // tap(v => console.log('newPrefs', v)),
@@ -1417,22 +1357,11 @@ class DatatablePreferencesService {
1417
1357
  : of(newPrefs)), tap(() => this.refresh(preferenceKey)))
1418
1358
  .subscribe();
1419
1359
  }
1420
- // public withColumnPreferences<T>(preferenceKey: string, columns: T[]): Observable<T[]> {
1421
- // return this.preferences(preferenceKey).pipe(
1422
- // startWith(EMPTY_DATATABLE_PREFERENCES),
1423
- // map(preferences => preferences && preferences.columns
1424
- // ? withStoredColumnInfo(columns, preferences.columns) as T[]
1425
- // : columns
1426
- // )
1427
- // )
1428
- // }
1429
- _descerializePreferences(serialized) {
1430
- const prefs = JSON.parse(serialized);
1431
- // TODO: Implement migration
1432
- return prefs;
1360
+ _isValidDatatablePreferences(prefs) {
1361
+ return prefs.version === CURRENT_DATATABLE_PREFERENCES_VERSION;
1433
1362
  }
1434
1363
  }
1435
- DatatablePreferencesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatablePreferencesService, deps: [{ token: THESEAM_DATATABLE_PREFERENCES_ACCESSOR, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1364
+ DatatablePreferencesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatablePreferencesService, deps: [{ token: i1$1.TheSeamPreferencesManagerService }, { token: THESEAM_DATATABLE_PREFERENCES_ACCESSOR, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1436
1365
  DatatablePreferencesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatablePreferencesService, providedIn: 'root' });
1437
1366
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatablePreferencesService, decorators: [{
1438
1367
  type: Injectable,
@@ -1440,7 +1369,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1440
1369
  providedIn: 'root'
1441
1370
  }]
1442
1371
  }], ctorParameters: function () {
1443
- return [{ type: undefined, decorators: [{
1372
+ return [{ type: i1$1.TheSeamPreferencesManagerService }, { type: undefined, decorators: [{
1444
1373
  type: Optional
1445
1374
  }, {
1446
1375
  type: Inject,
@@ -1642,7 +1571,7 @@ class DatatableComponent {
1642
1571
  if (!notNullOrUndefined(key) || key.length === 0) {
1643
1572
  return of(undefined);
1644
1573
  }
1645
- return from(waitOnConditionAsync(() => this._preferences.loaded)).pipe(switchMap(() => this._columnsAlterationsManager.changes.pipe(startWith(undefined), tap(() => {
1574
+ return from(waitOnConditionAsync(() => this._preferences.isLoaded(key))).pipe(switchMap(() => this._columnsAlterationsManager.changes.pipe(startWith(undefined), tap(() => {
1646
1575
  this._preferences.setAlterations(key, this._columnsAlterationsManager.get());
1647
1576
  }))));
1648
1577
  }), takeUntil(this._ngUnsubscribe)).subscribe();
@@ -1655,7 +1584,7 @@ class DatatableComponent {
1655
1584
  return of(undefined);
1656
1585
  }
1657
1586
  return this._preferences.preferences(prefsKey).pipe(switchMap((preferences) => __awaiter(this, void 0, void 0, function* () {
1658
- yield waitOnConditionAsync(() => this._preferences.loaded);
1587
+ yield waitOnConditionAsync(() => this._preferences.isLoaded(prefsKey));
1659
1588
  return preferences;
1660
1589
  })), take(1), map(preferences => {
1661
1590
  let alterations = [];
@@ -2121,7 +2050,7 @@ class DatatableColumnPreferencesComponent {
2121
2050
  }
2122
2051
  }
2123
2052
  DatatableColumnPreferencesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableColumnPreferencesComponent, deps: [{ token: THESEAM_DATATABLE }, { token: ColumnsAlterationsManagerService }], target: i0.ɵɵFactoryTarget.Component });
2124
- DatatableColumnPreferencesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DatatableColumnPreferencesComponent, selector: "seam-datatable-column-preferences", ngImport: i0, template: "<h3>Columns</h3>\n\n<seam-form-field [numPaddingErrors]=\"0\" >\n <input seamInput [formControl]=\"_filterControl\" seamInputSize=\"sm\" placeholder=\"Search\" seamAutoFocus>\n</seam-form-field>\n\n<div seamOverlayScrollbar style=\"min-height: 200px; max-height: 600px; min-width: 250px;\" class=\"flex-grow-1 mb-2\">\n <div class=\"p-2\">\n <ng-container *ngFor=\"let col of _columns$ | async\">\n <seam-checkbox [checked]=\"!col.hidden\" (change)=\"_onChange($event, col)\">{{ col.name || col.prop }}</seam-checkbox>\n </ng-container>\n </div>\n\n</div>\n<div class=\"d-flex flex-row justify-content-end\">\n <!-- <button seamButton size=\"sm\" theme=\"lightgray\" (click)=\"_onCloseClick()\">Close</button> -->\n <!-- <button seamButton size=\"sm\" theme=\"lightgray\" class=\"mr-1\">Cancel</button>\n <button seamButton size=\"sm\" theme=\"success\">Done</button> -->\n</div>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.AutoFocusDirective, selector: "[seamAutoFocus]", inputs: ["seamAutoFocus"], exportAs: ["seamAutoFocus"] }, { kind: "directive", type: i1$1.OverlayScrollbarDirective, selector: "[seamOverlayScrollbar]", inputs: ["seamOverlayScrollbar", "overlayScrollbarEnabled"], exportAs: ["seamOverlayScrollbar"] }, { kind: "component", type: i5$2.TheSeamCheckboxComponent, selector: "seam-checkbox", inputs: ["tabIndex", "id", "aria-label", "aria-labelledby", "required", "checked", "disabled", "indeterminate", "name", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["seamCheckbox"] }, { kind: "component", type: i6$1.TheSeamFormFieldComponent, selector: "seam-form-field", inputs: ["inline", "label", "labelPosition", "labelClass", "maxErrors", "numPaddingErrors", "labelId", "helpText", "helpTextId"] }, { kind: "directive", type: i6$1.InputDirective, selector: "input[seamInput], textarea[seamInput], ng-select[seamInput], seam-checkbox[seamInput] [ngbRadioGroup], seam-tel-input[seamInput], quill-editor[seamInput], seam-google-maps[seamInput]", inputs: ["seamInputSize", "id", "type", "placeholder", "required", "disabled", "readonly"], exportAs: ["seamInput"] }, { kind: "directive", type: i7$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2053
+ DatatableColumnPreferencesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DatatableColumnPreferencesComponent, selector: "seam-datatable-column-preferences", ngImport: i0, template: "<h3>Columns</h3>\n\n<seam-form-field [numPaddingErrors]=\"0\" >\n <input seamInput [formControl]=\"_filterControl\" seamInputSize=\"sm\" placeholder=\"Search\" seamAutoFocus>\n</seam-form-field>\n\n<div seamOverlayScrollbar style=\"min-height: 200px; max-height: 600px; min-width: 250px;\" class=\"flex-grow-1 mb-2\">\n <div class=\"p-2\">\n <ng-container *ngFor=\"let col of _columns$ | async\">\n <seam-checkbox [checked]=\"!col.hidden\" (change)=\"_onChange($event, col)\">{{ col.name || col.prop }}</seam-checkbox>\n </ng-container>\n </div>\n\n</div>\n<div class=\"d-flex flex-row justify-content-end\">\n <!-- <button seamButton size=\"sm\" theme=\"lightgray\" (click)=\"_onCloseClick()\">Close</button> -->\n <!-- <button seamButton size=\"sm\" theme=\"lightgray\" class=\"mr-1\">Cancel</button>\n <button seamButton size=\"sm\" theme=\"success\">Done</button> -->\n</div>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.AutoFocusDirective, selector: "[seamAutoFocus]", inputs: ["seamAutoFocus"], exportAs: ["seamAutoFocus"] }, { kind: "directive", type: i1$2.OverlayScrollbarDirective, selector: "[seamOverlayScrollbar]", inputs: ["seamOverlayScrollbar", "overlayScrollbarEnabled"], exportAs: ["seamOverlayScrollbar"] }, { kind: "component", type: i5$2.TheSeamCheckboxComponent, selector: "seam-checkbox", inputs: ["tabIndex", "id", "aria-label", "aria-labelledby", "required", "checked", "disabled", "indeterminate", "name", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["seamCheckbox"] }, { kind: "component", type: i6$1.TheSeamFormFieldComponent, selector: "seam-form-field", inputs: ["inline", "label", "labelPosition", "labelClass", "maxErrors", "numPaddingErrors", "labelId", "helpText", "helpTextId"] }, { kind: "directive", type: i6$1.InputDirective, selector: "input[seamInput], textarea[seamInput], ng-select[seamInput], seam-checkbox[seamInput] [ngbRadioGroup], seam-tel-input[seamInput], quill-editor[seamInput], seam-google-maps[seamInput]", inputs: ["seamInputSize", "id", "type", "placeholder", "required", "disabled", "readonly"], exportAs: ["seamInput"] }, { kind: "directive", type: i7$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2125
2054
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableColumnPreferencesComponent, decorators: [{
2126
2055
  type: Component,
2127
2056
  args: [{ selector: 'seam-datatable-column-preferences', changeDetection: ChangeDetectionStrategy.OnPush, template: "<h3>Columns</h3>\n\n<seam-form-field [numPaddingErrors]=\"0\" >\n <input seamInput [formControl]=\"_filterControl\" seamInputSize=\"sm\" placeholder=\"Search\" seamAutoFocus>\n</seam-form-field>\n\n<div seamOverlayScrollbar style=\"min-height: 200px; max-height: 600px; min-width: 250px;\" class=\"flex-grow-1 mb-2\">\n <div class=\"p-2\">\n <ng-container *ngFor=\"let col of _columns$ | async\">\n <seam-checkbox [checked]=\"!col.hidden\" (change)=\"_onChange($event, col)\">{{ col.name || col.prop }}</seam-checkbox>\n </ng-container>\n </div>\n\n</div>\n<div class=\"d-flex flex-row justify-content-end\">\n <!-- <button seamButton size=\"sm\" theme=\"lightgray\" (click)=\"_onCloseClick()\">Close</button> -->\n <!-- <button seamButton size=\"sm\" theme=\"lightgray\" class=\"mr-1\">Cancel</button>\n <button seamButton size=\"sm\" theme=\"success\">Done</button> -->\n</div>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
@@ -2247,7 +2176,7 @@ class DatatableExportButtonComponent {
2247
2176
  return undefined;
2248
2177
  }
2249
2178
  }
2250
- DatatableExportButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableExportButtonComponent, deps: [{ token: THESEAM_DATATABLE }, { token: i1$2.ToastrService }, { token: i2$1.TheSeamLoadingOverlayService }, { token: i3.DynamicValueHelperService }, { token: THESEAM_DYNAMIC_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2179
+ DatatableExportButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableExportButtonComponent, deps: [{ token: THESEAM_DATATABLE }, { token: i1$3.ToastrService }, { token: i2$1.TheSeamLoadingOverlayService }, { token: i3.DynamicValueHelperService }, { token: THESEAM_DYNAMIC_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2251
2180
  DatatableExportButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DatatableExportButtonComponent, selector: "seam-datatable-export-button", inputs: { exporters: "exporters" }, ngImport: i0, template: "<seam-menu #menu>\n <button *ngFor=\"let exp of exporters\"\n seamMenuItem\n [icon]=\"exp?.icon\"\n (click)=\"_onExporterClicked(exp)\">\n {{ exp.label }}\n </button>\n</seam-menu>\n<button\n [seamMenuToggle]=\"menu\"\n seamButton\n theme=\"lightgray\"\n size=\"sm\"\n class=\"dropdown-toggle\"\n style=\"padding-left: 10px; padding-right: 10px;\"\n title=\"Export\"\n [disabled]=\"disabled\"\n >\n <seam-icon [icon]=\"icon\" class=\"mr-2\"></seam-icon>\n</button>\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4$1.MenuComponent, selector: "seam-menu", inputs: ["menuClass", "baseWidth", "animationType"], outputs: ["closed"], exportAs: ["seamMenu"] }, { kind: "directive", type: i4$1.MenuToggleDirective, selector: "[seamMenuToggle]", inputs: ["seamMenuToggle", "positions"], outputs: ["menuOpened", "menuClosed"], exportAs: ["seamMenuToggle"] }, { kind: "component", type: i4$1.MenuItemComponent, selector: "[seamMenuItem]", inputs: ["disabled", "role", "icon", "iconClass", "sublevelIcon", "subLevelIconClass", "badgeText", "badgeTheme"], exportAs: ["seamMenuItem"] }, { kind: "component", type: i5.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }, { kind: "component", type: i7$2.ButtonComponent, selector: "button[seamButton]", inputs: ["disabled", "theme", "size", "type"], exportAs: ["seamButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2252
2181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableExportButtonComponent, decorators: [{
2253
2182
  type: Component,
@@ -2256,7 +2185,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
2256
2185
  return [{ type: DatatableComponent, decorators: [{
2257
2186
  type: Inject,
2258
2187
  args: [THESEAM_DATATABLE]
2259
- }] }, { type: i1$2.ToastrService }, { type: i2$1.TheSeamLoadingOverlayService }, { type: i3.DynamicValueHelperService }, { type: undefined, decorators: [{
2188
+ }] }, { type: i1$3.ToastrService }, { type: i2$1.TheSeamLoadingOverlayService }, { type: i3.DynamicValueHelperService }, { type: undefined, decorators: [{
2260
2189
  type: Optional
2261
2190
  }, {
2262
2191
  type: Inject,
@@ -2342,7 +2271,7 @@ class DatatableActionMenuItemDirective {
2342
2271
  this.click = new EventEmitter();
2343
2272
  }
2344
2273
  }
2345
- DatatableActionMenuItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuItemDirective, deps: [{ token: i1$3.Modal }, { token: i2$2.TheSeamDynamicComponentLoader }, { token: i3$1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2274
+ DatatableActionMenuItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuItemDirective, deps: [{ token: i1$4.Modal }, { token: i2$2.TheSeamDynamicComponentLoader }, { token: i3$1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2346
2275
  DatatableActionMenuItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: DatatableActionMenuItemDirective, selector: "[seamDatatableActionMenuItem]", inputs: { label: "label", href: ["attr.href", "href"], target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", routerLink: "routerLink", confirmDialog: "confirmDialog", row: "row" }, outputs: { click: "click" }, host: { properties: { "class.list-group-item": "this._listGroupItem", "class.list-group-item-action": "this._listGroupItemAction" } }, ngImport: i0 });
2347
2276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuItemDirective, decorators: [{
2348
2277
  type: Directive,
@@ -2350,7 +2279,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
2350
2279
  selector: '[seamDatatableActionMenuItem]'
2351
2280
  }]
2352
2281
  }], ctorParameters: function () {
2353
- return [{ type: i1$3.Modal }, { type: i2$2.TheSeamDynamicComponentLoader }, { type: i3$1.HttpClient, decorators: [{
2282
+ return [{ type: i1$4.Modal }, { type: i2$2.TheSeamDynamicComponentLoader }, { type: i3$1.HttpClient, decorators: [{
2354
2283
  type: Optional
2355
2284
  }] }];
2356
2285
  }, propDecorators: { _listGroupItem: [{
@@ -2493,7 +2422,7 @@ class DatatableActionMenuToggleDirective {
2493
2422
  this._actionDown = false;
2494
2423
  }
2495
2424
  }
2496
- DatatableActionMenuToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuToggleDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$4.Overlay }], target: i0.ɵɵFactoryTarget.Directive });
2425
+ DatatableActionMenuToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuToggleDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$5.Overlay }], target: i0.ɵɵFactoryTarget.Directive });
2497
2426
  DatatableActionMenuToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: DatatableActionMenuToggleDirective, selector: "[seamDatatableActionMenuToggle]", inputs: { seamDatatableActionMenuToggle: "seamDatatableActionMenuToggle" }, host: { listeners: { "document:keydown": "_onKeydown($event)", "click": "_onClick($event)", "mousedown": "_mouseDown($event)", "pointerdown": "_pointerDown($event)", "mouseup": "_mouseUp($event)", "pointerup": "_pointerUp($event)" } }, exportAs: ["seamDatatableActionMenuToggle"], ngImport: i0 });
2498
2427
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuToggleDirective, decorators: [{
2499
2428
  type: Directive,
@@ -2501,7 +2430,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
2501
2430
  selector: '[seamDatatableActionMenuToggle]',
2502
2431
  exportAs: 'seamDatatableActionMenuToggle'
2503
2432
  }]
2504
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1$4.Overlay }]; }, propDecorators: { seamDatatableActionMenuToggle: [{
2433
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1$5.Overlay }]; }, propDecorators: { seamDatatableActionMenuToggle: [{
2505
2434
  type: Input
2506
2435
  }], _onKeydown: [{
2507
2436
  type: HostListener,
@@ -2578,11 +2507,11 @@ class TheSeamDatatableScrollbarHelperService {
2578
2507
  });
2579
2508
  }
2580
2509
  }
2581
- TheSeamDatatableScrollbarHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamDatatableScrollbarHelperService, deps: [{ token: i0.NgZone }, { token: i1$1.OverlayScrollbarsService }], target: i0.ɵɵFactoryTarget.Injectable });
2510
+ TheSeamDatatableScrollbarHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamDatatableScrollbarHelperService, deps: [{ token: i0.NgZone }, { token: i1$2.OverlayScrollbarsService }], target: i0.ɵɵFactoryTarget.Injectable });
2582
2511
  TheSeamDatatableScrollbarHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamDatatableScrollbarHelperService });
2583
2512
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamDatatableScrollbarHelperService, decorators: [{
2584
2513
  type: Injectable
2585
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.OverlayScrollbarsService }]; } });
2514
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$2.OverlayScrollbarsService }]; } });
2586
2515
 
2587
2516
  function withStoredColumnInfo(columns, preferenceColumns) {
2588
2517
  const _columns = [];