@theseam/ui-common 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/datatable/models/preferences-accessor.d.ts +3 -15
- package/datatable/models/preferences.d.ts +2 -1
- package/datatable/services/datatable-preferences.service.d.ts +11 -14
- package/datatable/tokens/datatable-preferences-accessor.d.ts +2 -2
- package/esm2020/datatable/datatable/datatable.component.mjs +3 -3
- package/esm2020/datatable/models/preferences-accessor.mjs +1 -1
- package/esm2020/datatable/models/preferences.mjs +1 -1
- package/esm2020/datatable/services/datatable-preferences.service.mjs +34 -106
- package/esm2020/datatable/tokens/datatable-preferences-accessor.mjs +1 -1
- package/esm2020/framework/dashboard/dashboard-widgets/dashboard-widgets.service.mjs +9 -3
- package/esm2020/services/preferences/preferences-accessor.mjs +2 -0
- package/esm2020/services/preferences/preferences-manager.service.mjs +69 -0
- package/esm2020/services/preferences/preferences-record.mjs +74 -0
- package/esm2020/services/preferences/preferences.models.mjs +2 -0
- package/esm2020/services/public-api.mjs +5 -1
- package/esm2020/story-helpers/public-api.mjs +2 -1
- package/esm2020/story-helpers/story-preferences-accessor.service.mjs +34 -0
- package/esm2020/widget/preferences/widget-preferences.models.mjs +5 -0
- package/esm2020/widget/preferences/widget-preferences.service.mjs +78 -0
- package/esm2020/widget/preferences/widget-preferences.token.mjs +3 -0
- package/esm2020/widget/public-api.mjs +2 -1
- package/esm2020/widget/widget/widget.component.mjs +81 -30
- package/esm2020/widget/widget-token.mjs +3 -1
- package/esm2020/widget/widget.models.mjs +2 -0
- package/fesm2015/theseam-ui-common-datatable.mjs +45 -116
- package/fesm2015/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-framework.mjs +9 -3
- package/fesm2015/theseam-ui-common-framework.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-services.mjs +144 -8
- package/fesm2015/theseam-ui-common-services.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-story-helpers.mjs +32 -1
- package/fesm2015/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-widget.mjs +166 -35
- package/fesm2015/theseam-ui-common-widget.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-datatable.mjs +45 -116
- package/fesm2020/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-framework.mjs +8 -3
- package/fesm2020/theseam-ui-common-framework.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-services.mjs +144 -8
- package/fesm2020/theseam-ui-common-services.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-story-helpers.mjs +32 -1
- package/fesm2020/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-widget.mjs +162 -35
- package/fesm2020/theseam-ui-common-widget.mjs.map +1 -1
- package/package.json +1 -1
- package/services/preferences/preferences-accessor.d.ts +15 -0
- package/services/preferences/preferences-manager.service.d.ts +15 -0
- package/services/preferences/preferences-record.d.ts +28 -0
- package/services/preferences/preferences.models.d.ts +3 -0
- package/services/public-api.d.ts +4 -0
- package/story-helpers/public-api.d.ts +1 -0
- package/story-helpers/story-preferences-accessor.service.d.ts +19 -0
- package/widget/preferences/widget-preferences.models.d.ts +8 -0
- package/widget/preferences/widget-preferences.service.d.ts +21 -0
- package/widget/preferences/widget-preferences.token.d.ts +3 -0
- package/widget/public-api.d.ts +1 -0
- package/widget/widget/widget.component.d.ts +12 -2
- package/widget/widget-token.d.ts +3 -0
- package/widget/widget.models.d.ts +7 -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,
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
|
|
@@ -1293,103 +1294,41 @@ const EMPTY_DATATABLE_PREFERENCES = {
|
|
|
1293
1294
|
|
|
1294
1295
|
const THESEAM_DATATABLE_PREFERENCES_ACCESSOR = new InjectionToken('TheSeamDatatablePreferencesAccessor');
|
|
1295
1296
|
|
|
1296
|
-
// TODO: Add per key status
|
|
1297
1297
|
class DatatablePreferencesService {
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
constructor(_prefsAccessor) {
|
|
1298
|
+
constructor(_preferencesManager, _prefsAccessor) {
|
|
1299
|
+
this._preferencesManager = _preferencesManager;
|
|
1301
1300
|
this._prefsAccessor = _prefsAccessor;
|
|
1302
|
-
this.
|
|
1301
|
+
// TODO: Remove the need for this internal pending flag. I only kept it for
|
|
1302
|
+
// backwards compatibility, until better tests are added to make sure if isn't
|
|
1303
|
+
// neccessary anymore.
|
|
1304
|
+
/**
|
|
1305
|
+
* Used to prevent multiple updates from happening at the same time, but it is not per key.
|
|
1306
|
+
*/
|
|
1303
1307
|
this._pending = false;
|
|
1304
|
-
this._loaded = false;
|
|
1305
1308
|
}
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
refresh: refreshSubject
|
|
1313
|
-
};
|
|
1314
|
-
this._tablePrefsMap.set(preferenceKey, prefs);
|
|
1309
|
+
isPending(preferenceKey) {
|
|
1310
|
+
return this._pending || this._preferencesManager.isPending(preferenceKey);
|
|
1311
|
+
}
|
|
1312
|
+
isLoaded(preferenceKey) {
|
|
1313
|
+
if (this._pending) {
|
|
1314
|
+
return false;
|
|
1315
1315
|
}
|
|
1316
|
-
return
|
|
1316
|
+
return this._preferencesManager.isLoaded(preferenceKey);
|
|
1317
1317
|
}
|
|
1318
|
-
|
|
1318
|
+
preferences(preferenceKey) {
|
|
1319
1319
|
if (!this._prefsAccessor) {
|
|
1320
|
-
return of(EMPTY_DATATABLE_PREFERENCES);
|
|
1320
|
+
return of(JSON.parse(JSON.stringify(EMPTY_DATATABLE_PREFERENCES)));
|
|
1321
1321
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
return null;
|
|
1326
|
-
}
|
|
1327
|
-
// TODO: Add a schema validator and migration tool to avoid parsing issues.
|
|
1328
|
-
try {
|
|
1329
|
-
// return JSON.parse(v) as TheSeamDatatablePreferences
|
|
1330
|
-
return this._descerializePreferences(v);
|
|
1331
|
-
}
|
|
1332
|
-
catch (error) {
|
|
1333
|
-
if (isDevMode()) {
|
|
1334
|
-
// eslint-disable-next-line no-console
|
|
1335
|
-
console.error(error);
|
|
1336
|
-
}
|
|
1337
|
-
return null;
|
|
1322
|
+
return this._preferencesManager.preferences(preferenceKey, this._prefsAccessor, EMPTY_DATATABLE_PREFERENCES).pipe(map(prefs => {
|
|
1323
|
+
if (this._isValidDatatablePreferences(prefs)) {
|
|
1324
|
+
return prefs;
|
|
1338
1325
|
}
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
tap(() => {
|
|
1342
|
-
this._pending = false;
|
|
1343
|
-
this._loaded = true;
|
|
1344
|
-
}))), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1326
|
+
throw Error(`Preferences for key '${preferenceKey}' is not a valid datatable preferences.`);
|
|
1327
|
+
}));
|
|
1345
1328
|
}
|
|
1346
1329
|
refresh(preferenceKey) {
|
|
1347
|
-
|
|
1348
|
-
if (prefs) {
|
|
1349
|
-
this._pending = true;
|
|
1350
|
-
prefs.refresh.next();
|
|
1351
|
-
}
|
|
1330
|
+
this._preferencesManager.refresh(preferenceKey);
|
|
1352
1331
|
}
|
|
1353
|
-
// TODO: Improve this updating to be more generic, so we can quickly add
|
|
1354
|
-
// edits for different preference schema's.
|
|
1355
|
-
//
|
|
1356
|
-
// TODO: Decide if a send queue/merging of pending queue is needed to avoid
|
|
1357
|
-
// out of order updates. This shouldn't be an issue, with how fast preferences
|
|
1358
|
-
// will most likely be changing, but it could happen in situations, such as
|
|
1359
|
-
// network issues.
|
|
1360
|
-
// public setColumnPreference(preferenceKey: string, column: TheSeamDatatablePreferencesColumn): void {
|
|
1361
|
-
// if (!this._prefsAccessor) {
|
|
1362
|
-
// return
|
|
1363
|
-
// }
|
|
1364
|
-
// this._pending = true
|
|
1365
|
-
// this.preferences(preferenceKey).pipe(
|
|
1366
|
-
// map(prefs => {
|
|
1367
|
-
// // Making the preferences immutable may not be necessary, but for now
|
|
1368
|
-
// // this obj->str->obj will work as a naive clone.
|
|
1369
|
-
// const columns = JSON.parse(JSON.stringify(prefs.columns || []))
|
|
1370
|
-
// const _colPref = columns.find((c: any) => c.prop === column.prop)
|
|
1371
|
-
// // console.log('has', _colPref)
|
|
1372
|
-
// if (_colPref) {
|
|
1373
|
-
// // console.log('hasProperty(column, "width"))', hasProperty(column, 'width'))
|
|
1374
|
-
// if (hasProperty(column, 'width')) { _colPref.width = column.width }
|
|
1375
|
-
// if (hasProperty(column, 'canAutoResize')) { _colPref.canAutoResize = column.canAutoResize }
|
|
1376
|
-
// if (hasProperty(column, 'hidden')) { _colPref.hidden = column.hidden }
|
|
1377
|
-
// } else {
|
|
1378
|
-
// columns.push({ ...column })
|
|
1379
|
-
// }
|
|
1380
|
-
// const newPrefs: TheSeamDatatablePreferences = { ...prefs, columns }
|
|
1381
|
-
// return newPrefs
|
|
1382
|
-
// }),
|
|
1383
|
-
// // tap(v => console.log('newPrefs', v)),
|
|
1384
|
-
// take(1),
|
|
1385
|
-
// switchMap(newPrefs => this._prefsAccessor
|
|
1386
|
-
// ? this._prefsAccessor.update(preferenceKey, JSON.stringify(newPrefs))
|
|
1387
|
-
// : of(newPrefs)
|
|
1388
|
-
// ),
|
|
1389
|
-
// tap(() => this.refresh(preferenceKey))
|
|
1390
|
-
// )
|
|
1391
|
-
// .subscribe()
|
|
1392
|
-
// }
|
|
1393
1332
|
setAlterations(preferenceKey, alterations) {
|
|
1394
1333
|
if (!this._prefsAccessor) {
|
|
1395
1334
|
return;
|
|
@@ -1415,6 +1354,7 @@ class DatatablePreferencesService {
|
|
|
1415
1354
|
...EMPTY_DATATABLE_PREFERENCES,
|
|
1416
1355
|
alterations
|
|
1417
1356
|
};
|
|
1357
|
+
this._pending = false;
|
|
1418
1358
|
return newPrefs;
|
|
1419
1359
|
}),
|
|
1420
1360
|
// tap(v => console.log('newPrefs', v)),
|
|
@@ -1423,29 +1363,18 @@ class DatatablePreferencesService {
|
|
|
1423
1363
|
: of(newPrefs)), tap(() => this.refresh(preferenceKey)))
|
|
1424
1364
|
.subscribe();
|
|
1425
1365
|
}
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
// startWith(EMPTY_DATATABLE_PREFERENCES),
|
|
1429
|
-
// map(preferences => preferences && preferences.columns
|
|
1430
|
-
// ? withStoredColumnInfo(columns, preferences.columns) as T[]
|
|
1431
|
-
// : columns
|
|
1432
|
-
// )
|
|
1433
|
-
// )
|
|
1434
|
-
// }
|
|
1435
|
-
_descerializePreferences(serialized) {
|
|
1436
|
-
const prefs = JSON.parse(serialized);
|
|
1437
|
-
// TODO: Implement migration
|
|
1438
|
-
return prefs;
|
|
1366
|
+
_isValidDatatablePreferences(prefs) {
|
|
1367
|
+
return prefs.version === CURRENT_DATATABLE_PREFERENCES_VERSION;
|
|
1439
1368
|
}
|
|
1440
1369
|
}
|
|
1441
|
-
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 });
|
|
1370
|
+
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 });
|
|
1442
1371
|
DatatablePreferencesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatablePreferencesService, providedIn: 'root' });
|
|
1443
1372
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatablePreferencesService, decorators: [{
|
|
1444
1373
|
type: Injectable,
|
|
1445
1374
|
args: [{
|
|
1446
1375
|
providedIn: 'root'
|
|
1447
1376
|
}]
|
|
1448
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1377
|
+
}], ctorParameters: function () { return [{ type: i1$1.TheSeamPreferencesManagerService }, { type: undefined, decorators: [{
|
|
1449
1378
|
type: Optional
|
|
1450
1379
|
}, {
|
|
1451
1380
|
type: Inject,
|
|
@@ -1646,7 +1575,7 @@ class DatatableComponent {
|
|
|
1646
1575
|
if (!notNullOrUndefined(key) || key.length === 0) {
|
|
1647
1576
|
return of(undefined);
|
|
1648
1577
|
}
|
|
1649
|
-
return from(waitOnConditionAsync(() => this._preferences.
|
|
1578
|
+
return from(waitOnConditionAsync(() => this._preferences.isLoaded(key))).pipe(switchMap(() => this._columnsAlterationsManager.changes.pipe(startWith(undefined), tap(() => {
|
|
1650
1579
|
this._preferences.setAlterations(key, this._columnsAlterationsManager.get());
|
|
1651
1580
|
}))));
|
|
1652
1581
|
}), takeUntil(this._ngUnsubscribe)).subscribe();
|
|
@@ -1659,7 +1588,7 @@ class DatatableComponent {
|
|
|
1659
1588
|
return of(undefined);
|
|
1660
1589
|
}
|
|
1661
1590
|
return this._preferences.preferences(prefsKey).pipe(switchMap(async (preferences) => {
|
|
1662
|
-
await waitOnConditionAsync(() => this._preferences.
|
|
1591
|
+
await waitOnConditionAsync(() => this._preferences.isLoaded(prefsKey));
|
|
1663
1592
|
return preferences;
|
|
1664
1593
|
}), take(1), map(preferences => {
|
|
1665
1594
|
let alterations = [];
|
|
@@ -2123,7 +2052,7 @@ class DatatableColumnPreferencesComponent {
|
|
|
2123
2052
|
}
|
|
2124
2053
|
}
|
|
2125
2054
|
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 });
|
|
2126
|
-
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$
|
|
2055
|
+
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 });
|
|
2127
2056
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableColumnPreferencesComponent, decorators: [{
|
|
2128
2057
|
type: Component,
|
|
2129
2058
|
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$
|
|
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,
|
|
@@ -2255,7 +2184,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2255
2184
|
}], ctorParameters: function () { return [{ type: DatatableComponent, decorators: [{
|
|
2256
2185
|
type: Inject,
|
|
2257
2186
|
args: [THESEAM_DATATABLE]
|
|
2258
|
-
}] }, { type: i1$
|
|
2187
|
+
}] }, { type: i1$3.ToastrService }, { type: i2$1.TheSeamLoadingOverlayService }, { type: i3.DynamicValueHelperService }, { type: undefined, decorators: [{
|
|
2259
2188
|
type: Optional
|
|
2260
2189
|
}, {
|
|
2261
2190
|
type: Inject,
|
|
@@ -2338,14 +2267,14 @@ class DatatableActionMenuItemDirective {
|
|
|
2338
2267
|
this.click = new EventEmitter();
|
|
2339
2268
|
}
|
|
2340
2269
|
}
|
|
2341
|
-
DatatableActionMenuItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuItemDirective, deps: [{ token: i1$
|
|
2270
|
+
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 });
|
|
2342
2271
|
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 });
|
|
2343
2272
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuItemDirective, decorators: [{
|
|
2344
2273
|
type: Directive,
|
|
2345
2274
|
args: [{
|
|
2346
2275
|
selector: '[seamDatatableActionMenuItem]'
|
|
2347
2276
|
}]
|
|
2348
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
2277
|
+
}], ctorParameters: function () { return [{ type: i1$4.Modal }, { type: i2$2.TheSeamDynamicComponentLoader }, { type: i3$1.HttpClient, decorators: [{
|
|
2349
2278
|
type: Optional
|
|
2350
2279
|
}] }]; }, propDecorators: { _listGroupItem: [{
|
|
2351
2280
|
type: HostBinding,
|
|
@@ -2486,7 +2415,7 @@ class DatatableActionMenuToggleDirective {
|
|
|
2486
2415
|
this._actionDown = false;
|
|
2487
2416
|
}
|
|
2488
2417
|
}
|
|
2489
|
-
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$
|
|
2418
|
+
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 });
|
|
2490
2419
|
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 });
|
|
2491
2420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DatatableActionMenuToggleDirective, decorators: [{
|
|
2492
2421
|
type: Directive,
|
|
@@ -2494,7 +2423,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2494
2423
|
selector: '[seamDatatableActionMenuToggle]',
|
|
2495
2424
|
exportAs: 'seamDatatableActionMenuToggle'
|
|
2496
2425
|
}]
|
|
2497
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1$
|
|
2426
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1$5.Overlay }]; }, propDecorators: { seamDatatableActionMenuToggle: [{
|
|
2498
2427
|
type: Input
|
|
2499
2428
|
}], _onKeydown: [{
|
|
2500
2429
|
type: HostListener,
|
|
@@ -2571,11 +2500,11 @@ class TheSeamDatatableScrollbarHelperService {
|
|
|
2571
2500
|
});
|
|
2572
2501
|
}
|
|
2573
2502
|
}
|
|
2574
|
-
TheSeamDatatableScrollbarHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamDatatableScrollbarHelperService, deps: [{ token: i0.NgZone }, { token: i1$
|
|
2503
|
+
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 });
|
|
2575
2504
|
TheSeamDatatableScrollbarHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamDatatableScrollbarHelperService });
|
|
2576
2505
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamDatatableScrollbarHelperService, decorators: [{
|
|
2577
2506
|
type: Injectable
|
|
2578
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$
|
|
2507
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$2.OverlayScrollbarsService }]; } });
|
|
2579
2508
|
|
|
2580
2509
|
function withStoredColumnInfo(columns, preferenceColumns) {
|
|
2581
2510
|
const _columns = [];
|