@elderbyte/ngx-starter 12.11.0 → 12.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/elderbyte-ngx-starter.umd.js +75 -60
- package/bundles/elderbyte-ngx-starter.umd.js.map +1 -1
- package/elderbyte-ngx-starter.metadata.json +1 -1
- package/esm2015/lib/components/auditing/audited-entity/elder-audited-entity.component.js +2 -2
- package/esm2015/lib/components/data-view/base/elder-data-view-base.js +46 -3
- package/esm2015/lib/components/data-view/grid/elder-grid/elder-grid.component.js +24 -6
- package/esm2015/lib/components/data-view/grid/elder-grid.module.js +3 -2
- package/esm2015/lib/components/data-view/table/elder-table/elder-table.component.js +5 -48
- package/fesm2015/elderbyte-ngx-starter.js +68 -53
- package/fesm2015/elderbyte-ngx-starter.js.map +1 -1
- package/lib/components/data-view/base/elder-data-view-base.d.ts +11 -1
- package/lib/components/data-view/grid/elder-grid/elder-grid.component.d.ts +9 -6
- package/lib/components/data-view/table/elder-table/elder-table.component.d.ts +5 -10
- package/package.json +1 -1
|
@@ -11657,6 +11657,7 @@
|
|
|
11657
11657
|
* Underlying data context.
|
|
11658
11658
|
*/
|
|
11659
11659
|
this.dataContext$ = new rxjs.BehaviorSubject(null);
|
|
11660
|
+
this.interactionMode = 'open';
|
|
11660
11661
|
/**
|
|
11661
11662
|
* If true, this table is in dense mode.
|
|
11662
11663
|
* Heights are generally reduced.
|
|
@@ -11672,6 +11673,7 @@
|
|
|
11672
11673
|
* No borders / floating visible so that the table can be embedded into another container
|
|
11673
11674
|
*/
|
|
11674
11675
|
this._embedded = false;
|
|
11676
|
+
this._itemClickSubject = new rxjs.Subject();
|
|
11675
11677
|
if (!selectionModel) {
|
|
11676
11678
|
this.selectionModel = new SelectionModel(false, [], function (entity) { return entity ? _this.getId(entity) : 0; });
|
|
11677
11679
|
}
|
|
@@ -11778,6 +11780,18 @@
|
|
|
11778
11780
|
enumerable: false,
|
|
11779
11781
|
configurable: true
|
|
11780
11782
|
});
|
|
11783
|
+
Object.defineProperty(ElderDataViewBaseComponent.prototype, "itemClick", {
|
|
11784
|
+
/***************************************************************************
|
|
11785
|
+
* *
|
|
11786
|
+
* On click properties *
|
|
11787
|
+
* *
|
|
11788
|
+
**************************************************************************/
|
|
11789
|
+
get: function () {
|
|
11790
|
+
return this._itemClickSubject;
|
|
11791
|
+
},
|
|
11792
|
+
enumerable: false,
|
|
11793
|
+
configurable: true
|
|
11794
|
+
});
|
|
11781
11795
|
Object.defineProperty(ElderDataViewBaseComponent.prototype, "dense", {
|
|
11782
11796
|
get: function () {
|
|
11783
11797
|
return this._dense;
|
|
@@ -11824,7 +11838,38 @@
|
|
|
11824
11838
|
* @param data
|
|
11825
11839
|
* @protected
|
|
11826
11840
|
*/
|
|
11827
|
-
ElderDataViewBaseComponent.prototype.onDataContextSet = function (data) {
|
|
11841
|
+
ElderDataViewBaseComponent.prototype.onDataContextSet = function (data) {
|
|
11842
|
+
};
|
|
11843
|
+
ElderDataViewBaseComponent.prototype.onItemClick = function (entity) {
|
|
11844
|
+
if (entity) {
|
|
11845
|
+
switch (this.interactionMode) {
|
|
11846
|
+
case 'open':
|
|
11847
|
+
if (this.selectionModel.hasValue) {
|
|
11848
|
+
this.selectionModel.toggle(entity);
|
|
11849
|
+
}
|
|
11850
|
+
else {
|
|
11851
|
+
this._itemClickSubject.next(entity);
|
|
11852
|
+
}
|
|
11853
|
+
break;
|
|
11854
|
+
case 'selection':
|
|
11855
|
+
this.selectionModel.toggle(entity);
|
|
11856
|
+
break;
|
|
11857
|
+
}
|
|
11858
|
+
}
|
|
11859
|
+
};
|
|
11860
|
+
ElderDataViewBaseComponent.prototype.onItemDoubleClick = function (entity) {
|
|
11861
|
+
if (entity) {
|
|
11862
|
+
switch (this.interactionMode) {
|
|
11863
|
+
// double click in open mode not supported
|
|
11864
|
+
case 'open':
|
|
11865
|
+
break;
|
|
11866
|
+
// double click in selection mode triggers normal item click
|
|
11867
|
+
case 'selection':
|
|
11868
|
+
this._itemClickSubject.next(entity);
|
|
11869
|
+
break;
|
|
11870
|
+
}
|
|
11871
|
+
}
|
|
11872
|
+
};
|
|
11828
11873
|
/***************************************************************************
|
|
11829
11874
|
* *
|
|
11830
11875
|
* Private Methods *
|
|
@@ -11844,11 +11889,13 @@
|
|
|
11844
11889
|
{ type: ElderDataViewSelectionMode }
|
|
11845
11890
|
]; };
|
|
11846
11891
|
ElderDataViewBaseComponent.propDecorators = {
|
|
11892
|
+
interactionMode: [{ type: i0.Input }],
|
|
11847
11893
|
selectableEvaluatorFn: [{ type: i0.Input }],
|
|
11848
11894
|
selection: [{ type: i0.Input }],
|
|
11849
11895
|
selectionChange: [{ type: i0.Output }],
|
|
11850
11896
|
selectionSingleChange: [{ type: i0.Output }],
|
|
11851
11897
|
selectionMultiEnabled: [{ type: i0.Input }],
|
|
11898
|
+
itemClick: [{ type: i0.Output }],
|
|
11852
11899
|
dense: [{ type: i0.Input }],
|
|
11853
11900
|
float: [{ type: i0.Input }],
|
|
11854
11901
|
embedded: [{ type: i0.Input }]
|
|
@@ -12316,7 +12363,6 @@
|
|
|
12316
12363
|
**************************************************************************/
|
|
12317
12364
|
_this.logger = tsLogger.LoggerFactory.getLogger(_this.constructor.name);
|
|
12318
12365
|
_this.destroy$ = new rxjs.Subject();
|
|
12319
|
-
_this._itemClickSubject = new rxjs.Subject();
|
|
12320
12366
|
/**
|
|
12321
12367
|
* Load next chunk after current is done
|
|
12322
12368
|
*/
|
|
@@ -12347,7 +12393,6 @@
|
|
|
12347
12393
|
_this.cleanUp = true;
|
|
12348
12394
|
_this.keepSelection = true;
|
|
12349
12395
|
_this.showFooter = false;
|
|
12350
|
-
_this.interactionMode = 'open';
|
|
12351
12396
|
_this.toolbarRowTemplates$ = new rxjs.BehaviorSubject([]);
|
|
12352
12397
|
/**
|
|
12353
12398
|
* Gets the current rows of this table.
|
|
@@ -12434,7 +12479,7 @@
|
|
|
12434
12479
|
if (data instanceof Array) {
|
|
12435
12480
|
dc = DataContextBuilder.start()
|
|
12436
12481
|
.localSort()
|
|
12437
|
-
.buildLocal(data); // Potential Memory leak (See autoCleanUp)
|
|
12482
|
+
.buildLocal(data, this.idField); // Potential Memory leak (See autoCleanUp)
|
|
12438
12483
|
dc.start();
|
|
12439
12484
|
}
|
|
12440
12485
|
else if (isDataSource(data)) {
|
|
@@ -12493,13 +12538,6 @@
|
|
|
12493
12538
|
enumerable: false,
|
|
12494
12539
|
configurable: true
|
|
12495
12540
|
});
|
|
12496
|
-
Object.defineProperty(ElderTableComponent.prototype, "itemClick", {
|
|
12497
|
-
get: function () {
|
|
12498
|
-
return this._itemClickSubject;
|
|
12499
|
-
},
|
|
12500
|
-
enumerable: false,
|
|
12501
|
-
configurable: true
|
|
12502
|
-
});
|
|
12503
12541
|
/*
|
|
12504
12542
|
@Output()
|
|
12505
12543
|
public get activeItem(): Observable<any> {
|
|
@@ -12540,42 +12578,6 @@
|
|
|
12540
12578
|
enumerable: false,
|
|
12541
12579
|
configurable: true
|
|
12542
12580
|
});
|
|
12543
|
-
/**
|
|
12544
|
-
* Occurs when the user clicks on a row
|
|
12545
|
-
*/
|
|
12546
|
-
ElderTableComponent.prototype.onItemClick = function (entity) {
|
|
12547
|
-
switch (this.interactionMode) {
|
|
12548
|
-
case 'open':
|
|
12549
|
-
if (this.selectionModel.hasValue) {
|
|
12550
|
-
this.selectionModel.toggle(entity);
|
|
12551
|
-
}
|
|
12552
|
-
else {
|
|
12553
|
-
this._itemClickSubject.next(entity);
|
|
12554
|
-
}
|
|
12555
|
-
break;
|
|
12556
|
-
case 'selection':
|
|
12557
|
-
this.selectionModel.toggle(entity);
|
|
12558
|
-
break;
|
|
12559
|
-
// TODO improve onItemDoubleClick behavior with Observable
|
|
12560
|
-
/*
|
|
12561
|
-
clickStream
|
|
12562
|
-
.bufferTime(250)
|
|
12563
|
-
.map(arr => arr.length)
|
|
12564
|
-
.filter(len => len === 2);
|
|
12565
|
-
*/
|
|
12566
|
-
}
|
|
12567
|
-
};
|
|
12568
|
-
ElderTableComponent.prototype.onItemDoubleClick = function (entity) {
|
|
12569
|
-
switch (this.interactionMode) {
|
|
12570
|
-
// double click in open mode not supported
|
|
12571
|
-
case 'open':
|
|
12572
|
-
break;
|
|
12573
|
-
// double click in selection mode triggers normal item click
|
|
12574
|
-
case 'selection':
|
|
12575
|
-
this._itemClickSubject.next(entity);
|
|
12576
|
-
break;
|
|
12577
|
-
}
|
|
12578
|
-
};
|
|
12579
12581
|
/***************************************************************************
|
|
12580
12582
|
* *
|
|
12581
12583
|
* Private Methods *
|
|
@@ -12618,7 +12620,7 @@
|
|
|
12618
12620
|
ElderTableComponent.decorators = [
|
|
12619
12621
|
{ type: i0.Component, args: [{
|
|
12620
12622
|
selector: 'elder-table, ebs-table',
|
|
12621
|
-
template: "\n<div fxLayout=\"column\" fxFlex\n class=\"elder-table\"\n [class.elder-mat-table-container]=\"!embedded\"\n [class.mat-elevation-z5]=\"float\"\n [class.elder-mat-table-flat]=\"!embedded && !float\"\n>\n\n <!-- Toolbar Rows -->\n <ng-container *ngFor=\"let toolbarRowTemplate of toolbarRowTemplates$ | async\">\n <ng-template *ngTemplateOutlet=\"toolbarRowTemplate; context: {$implicit: this}\">\n </ng-template>\n </ng-container>\n\n <!-- Scrollable Table -->\n <div fxLayout=\"column\" class=\"scrollable elder-table-scroll\"\n infiniteScroll\n [eventThrottle]=\"150\"\n [offsetFactor]=\"2\"\n [ignoreScrollEvent]=\"!isContinuable || !(canLoadMore$ | async)\"\n (closeToEnd)=\"requestMoreDataZoned($event)\"\n >\n <table\n mat-table\n class=\"elder-mat-inner-table\"\n [trackBy]=\"trackByFn\"\n [dataSource]=\"dataContext$ | async\"\n [elderDataContextSelection]=\"dataContext$ | async\" #dataSelection=\"elderDataContextSelection\"\n [elderDataContextSelectionModel]=\"selectionModel\"\n >\n\n <!-- selection Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef>\n <elder-selection-master-checkbox></elder-selection-master-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let entity\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selectionModel.toggle(entity) : null\"\n [checked]=\"selectionModel.observeSelection(entity) | async\"\n [disabled]=\"!selectionModel.isSelectable(entity)\"\n class=\"elder-table-checkbox\"\n [class.elder-table-checkbox-visible]=\"(dataSelection.selectionState$ | async).anySelected\"\n >\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container *ngIf=\"(tableModel.displayedColumnsInner$ | async) as displayedColumnsInner\">\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsInner; sticky: true\"></tr>\n <tr mat-row class=\"elder-table-row\"\n *matRowDef=\"let entity; columns: displayedColumnsInner;\"\n [elderTableRow]=\"entity\"\n [class.dense]=\"dense\"\n [class.elder-row-hidden]=\"hiddenField && entity[hiddenField]\"\n [class.elder-row-removing]=\"removingField && entity[removingField]\"\n [class.elder-table-row-selected]=\"interactionMode == 'selection' && selectionModel.observeSelection(entity) | async\"\n (click)=\"
|
|
12623
|
+
template: "\n<div fxLayout=\"column\" fxFlex\n class=\"elder-table\"\n [class.elder-mat-table-container]=\"!embedded\"\n [class.mat-elevation-z5]=\"float\"\n [class.elder-mat-table-flat]=\"!embedded && !float\"\n>\n\n <!-- Toolbar Rows -->\n <ng-container *ngFor=\"let toolbarRowTemplate of toolbarRowTemplates$ | async\">\n <ng-template *ngTemplateOutlet=\"toolbarRowTemplate; context: {$implicit: this}\">\n </ng-template>\n </ng-container>\n\n <!-- Scrollable Table -->\n <div fxLayout=\"column\" class=\"scrollable elder-table-scroll\"\n infiniteScroll\n [eventThrottle]=\"150\"\n [offsetFactor]=\"2\"\n [ignoreScrollEvent]=\"!isContinuable || !(canLoadMore$ | async)\"\n (closeToEnd)=\"requestMoreDataZoned($event)\"\n >\n <table\n mat-table\n class=\"elder-mat-inner-table\"\n [trackBy]=\"trackByFn\"\n [dataSource]=\"dataContext$ | async\"\n [elderDataContextSelection]=\"dataContext$ | async\" #dataSelection=\"elderDataContextSelection\"\n [elderDataContextSelectionModel]=\"selectionModel\"\n >\n\n <!-- selection Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef>\n <elder-selection-master-checkbox></elder-selection-master-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let entity\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selectionModel.toggle(entity) : null\"\n [checked]=\"selectionModel.observeSelection(entity) | async\"\n [disabled]=\"!selectionModel.isSelectable(entity)\"\n class=\"elder-table-checkbox\"\n [class.elder-table-checkbox-visible]=\"(dataSelection.selectionState$ | async).anySelected\"\n >\n </mat-checkbox>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container *ngIf=\"(tableModel.displayedColumnsInner$ | async) as displayedColumnsInner\">\n <tr mat-header-row *matHeaderRowDef=\"displayedColumnsInner; sticky: true\"></tr>\n <tr mat-row class=\"elder-table-row\"\n *matRowDef=\"let entity; columns: displayedColumnsInner;\"\n [elderTableRow]=\"entity\"\n [class.dense]=\"dense\"\n [class.elder-row-hidden]=\"hiddenField && entity[hiddenField]\"\n [class.elder-row-removing]=\"removingField && entity[removingField]\"\n [class.elder-table-row-selected]=\"interactionMode == 'selection' && selectionModel.observeSelection(entity) | async\"\n (click)=\"onItemClick(entity)\"\n (dblclick)=\"onItemDoubleClick(entity)\"\n >\n </tr>\n <ng-container *ngIf=\"showFooter\">\n <tr mat-footer-row *matFooterRowDef=\"displayedColumnsInner; sticky: true\"></tr>\n </ng-container>\n </ng-container>\n </table>\n </div>\n\n <div fxLayout=\"column\" fxFlex fxLayoutAlign=\"center center\">\n\n <span class=\"elder-table-hint mat-body-1\" *ngIf=\"(dataContext?.data | async)?.length === 0 && !(dataContext?.status | async)?.hasError\">\n {{'No data available' | translate}}\n </span>\n\n <div *ngIf=\"(dataContext?.status | async)?.hasError\"\n fxLayout=\"row\" fxLayoutAlign=\"center center\" fxLayoutGap=\"20px\">\n <mat-icon color=\"warn\">warning</mat-icon>\n <span class=\"hint mat-body-1\">{{'Error while loading data' | translate}}</span>\n </div>\n\n </div>\n\n <mat-progress-bar fxFlex=\"none\"\n [mode]=\"(dataContext?.loading | async) ? 'indeterminate' : 'determinate'\"\n [color]=\"((dataContext?.status | async)?.hasError) ? 'warn' : 'primary'\">\n </mat-progress-bar>\n\n <!-- Optional Paginator Toolbar -->\n <mat-paginator #matPaginator *ngIf=\"isActivePaged && (dataActivePaged.page | async) as page\"\n fxFlex=\"none\"\n [length]=\"dataContext?.total | async\"\n [pageIndex]=\"page?.index\"\n [pageSize]=\"page?.size\"\n [pageSizeOptions]=\"pageSizeOptions\">\n </mat-paginator>\n\n <!-- Optional Continuation Footer -->\n <div *ngIf=\"isContinuable\" class=\"elder-table-footer\"\n fxLayout=\"row\" fxFlex=\"none\" fxLayoutAlign=\"end center\" fxLayoutGap=\"10px\"\n style=\"padding-right: 10px\" >\n\n <span class=\"mat-caption noselect\" style=\"color: gray\">\n {{(dataContext?.data | async)?.length}} / {{total$ | async}}\n </span>\n\n <button mat-icon-button type=\"button\" color=\"primary\"\n [disabled]=\"!(canLoadMore$ | async)\"\n (click)=\"dataContinuable.loadMore()\">\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n </div>\n\n</div>\n",
|
|
12622
12624
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
12623
12625
|
providers: [
|
|
12624
12626
|
ElderTableProviders.ExistingOrNewTableModel,
|
|
@@ -12652,14 +12654,12 @@
|
|
|
12652
12654
|
cleanUp: [{ type: i0.Input }],
|
|
12653
12655
|
keepSelection: [{ type: i0.Input }],
|
|
12654
12656
|
showFooter: [{ type: i0.Input }],
|
|
12655
|
-
interactionMode: [{ type: i0.Input }],
|
|
12656
12657
|
toolbarRowTemplateQuery: [{ type: i0.ContentChildren, args: [ElderTableToolbarDirective, { read: i0.TemplateRef },] }],
|
|
12657
12658
|
rowsQuery: [{ type: i0.ViewChildren, args: [ElderTableRowDirective,] }],
|
|
12658
12659
|
toolbarTemplate: [{ type: i0.Input }],
|
|
12659
12660
|
data: [{ type: i0.Input }],
|
|
12660
12661
|
displayedColumns: [{ type: i0.Input }],
|
|
12661
|
-
selectionVisible: [{ type: i0.Input }]
|
|
12662
|
-
itemClick: [{ type: i0.Output }]
|
|
12662
|
+
selectionVisible: [{ type: i0.Input }]
|
|
12663
12663
|
};
|
|
12664
12664
|
|
|
12665
12665
|
var ElderInfiniteScrollDirective = /** @class */ (function () {
|
|
@@ -14634,7 +14634,8 @@
|
|
|
14634
14634
|
*/
|
|
14635
14635
|
_this.idField = 'id';
|
|
14636
14636
|
_this.selectionVisible = true;
|
|
14637
|
-
_this.
|
|
14637
|
+
_this.pageSizeOptions = [30, 50, 100, 150, 200];
|
|
14638
|
+
_this.destroy$ = new rxjs.Subject();
|
|
14638
14639
|
return _this;
|
|
14639
14640
|
}
|
|
14640
14641
|
/***************************************************************************
|
|
@@ -14665,7 +14666,15 @@
|
|
|
14665
14666
|
}
|
|
14666
14667
|
}
|
|
14667
14668
|
};
|
|
14669
|
+
ElderGridComponent.prototype.ngAfterViewInit = function () {
|
|
14670
|
+
MatTableDataContextBindingBuilder
|
|
14671
|
+
.start(this.dataContext$)
|
|
14672
|
+
.withPaginator(rxjs.of(this.matPaginator))
|
|
14673
|
+
.bindUntil(this.destroy$);
|
|
14674
|
+
};
|
|
14668
14675
|
ElderGridComponent.prototype.ngOnDestroy = function () {
|
|
14676
|
+
this.destroy$.next();
|
|
14677
|
+
this.destroy$.complete();
|
|
14669
14678
|
};
|
|
14670
14679
|
Object.defineProperty(ElderGridComponent.prototype, "tileTemplate", {
|
|
14671
14680
|
get: function () {
|
|
@@ -14696,10 +14705,15 @@
|
|
|
14696
14705
|
set: function (data) {
|
|
14697
14706
|
this.dataContext$.next(data);
|
|
14698
14707
|
this.total$ = data.total.pipe(operators.map(function (total) { return total ? total + '' : '∞'; }));
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14708
|
+
if (isContinuableDataContext(data)) {
|
|
14709
|
+
this.canLoadMore$ = rxjs.combineLatest([data.loading, data.hasMoreData]).pipe(operators.map(function (_a) {
|
|
14710
|
+
var _b = __read(_a, 2), loading = _b[0], hasMoreData = _b[1];
|
|
14711
|
+
return !loading && hasMoreData;
|
|
14712
|
+
}));
|
|
14713
|
+
}
|
|
14714
|
+
else {
|
|
14715
|
+
this.canLoadMore$ = rxjs.of(false);
|
|
14716
|
+
}
|
|
14703
14717
|
},
|
|
14704
14718
|
enumerable: false,
|
|
14705
14719
|
configurable: true
|
|
@@ -14809,7 +14823,7 @@
|
|
|
14809
14823
|
ElderGridComponent.decorators = [
|
|
14810
14824
|
{ type: i0.Component, args: [{
|
|
14811
14825
|
selector: 'elder-grid',
|
|
14812
|
-
template: "<div fxLayout=\"column\" class=\"scroll-fix\" fxFill>\n\n <!-- Grid Browser -->\n <div fxLayout=\"column\" fxFlex\n class=\"scroll-fix elder-grid-container\"\n *ngIf=\"dataContext$ | async as data\"\n [class.elder-mat-table-container]=\"!embedded\"\n [class.mat-elevation-z5]=\"float\"\n [class.elder-mat-table-flat]=\"!embedded && !float\"\n\n [elderDataContextSelection]=\"data\" #dataSelection=\"elderDataContextSelection\"\n [elderDataContextSelectionModel]=\"selectionModel\"\n >\n\n <!-- Toolbar Row -->\n <div *ngIf=\"toolbarVisible\"\n fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFlex=\"none\" class=\"elder-grid-toolbar\">\n\n <div fxLayout=\"column\" fxFlex=\"none\" style=\"padding-left: 8px; padding-right: 8px\" *ngIf=\"selectionVisible\">\n <elder-selection-master-checkbox fxFlex=\"none\" style=\"padding-left: 12px\"></elder-selection-master-checkbox>\n </div>\n\n <!-- Toolbar -->\n <ng-container *ngIf=\"toolbarTemplate\">\n <ng-template *ngTemplateOutlet=\"toolbarTemplate; context: {$implicit: this}\"></ng-template>\n </ng-container>\n\n <elder-single-sort *ngIf=\"availableSorts && availableSorts.length > 0 && data.sort.sorts | async as sorts\"\n fxFlex=\"none\"\n [availableSorts]=\"availableSorts\"\n [translationPrefix]=\"sortTranslationPrefix\"\n [sort]=\"sorts[0]\"\n (sortChange)=\"updateSort($event)\">\n </elder-single-sort>\n\n </div>\n\n <mat-divider *ngIf=\"toolbarVisible\"></mat-divider>\n\n <!-- [cdkDropListSortingDisabled]=\"true\" -->\n <!-- cdkDropList -->\n <cdk-virtual-scroll-viewport\n class=\"elder-grid-browser\" fxLayout=\"column\" fxFlex\n id=\"documents-container\"\n [itemSize]=\"itemHeight\"\n [minBufferPx]=\"itemHeight * 2\"\n [maxBufferPx]=\"itemHeight * 3\"\n #virtualScrollViewPort\n infiniteScroll\n [eventThrottle]=\"200\"\n [offsetFactor]=\"2\"\n [ignoreScrollEvent]=\"data.loading | async\"\n [containerId]=\"'documents-container'\" [listenToHost]=\"false\"\n (closeToEnd)=\"requestMoreDataZoned($event)\"
|
|
14826
|
+
template: "<div fxLayout=\"column\" class=\"scroll-fix\" fxFill>\n\n <!-- Grid Browser -->\n <div fxLayout=\"column\" fxFlex\n class=\"scroll-fix elder-grid-container\"\n *ngIf=\"dataContext$ | async as data\"\n [class.elder-mat-table-container]=\"!embedded\"\n [class.mat-elevation-z5]=\"float\"\n [class.elder-mat-table-flat]=\"!embedded && !float\"\n\n [elderDataContextSelection]=\"data\" #dataSelection=\"elderDataContextSelection\"\n [elderDataContextSelectionModel]=\"selectionModel\"\n >\n\n <!-- Toolbar Row -->\n <div *ngIf=\"toolbarVisible\"\n fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFlex=\"none\" class=\"elder-grid-toolbar\">\n\n <div fxLayout=\"column\" fxFlex=\"none\" style=\"padding-left: 8px; padding-right: 8px\" *ngIf=\"selectionVisible\">\n <elder-selection-master-checkbox fxFlex=\"none\" style=\"padding-left: 12px\"></elder-selection-master-checkbox>\n </div>\n\n <!-- Toolbar -->\n <ng-container *ngIf=\"toolbarTemplate\">\n <ng-template *ngTemplateOutlet=\"toolbarTemplate; context: {$implicit: this}\"></ng-template>\n </ng-container>\n\n <elder-single-sort *ngIf=\"availableSorts && availableSorts.length > 0 && data.sort.sorts | async as sorts\"\n fxFlex=\"none\"\n [availableSorts]=\"availableSorts\"\n [translationPrefix]=\"sortTranslationPrefix\"\n [sort]=\"sorts[0]\"\n (sortChange)=\"updateSort($event)\">\n </elder-single-sort>\n\n </div>\n\n <mat-divider *ngIf=\"toolbarVisible\"></mat-divider>\n\n <span class=\"elder-table-hint mat-body-1\" fxFlex fxLayoutAlign=\"center center\"\n *ngIf=\"!dataContext?.isStarted\">\n {{'Datacontext not started' | translate}}\n </span>\n\n <div *ngIf=\"(dataContext?.data | async)?.isStarted\" fxFlex fxLayoutAlign=\"center center\">\n\n <span class=\"elder-table-hint mat-body-1\"\n *ngIf=\"(dataContext?.data | async)?.length === 0 && !(dataContext?.status | async)?.hasError\">\n {{'No data available' | translate}}\n </span>\n\n <div *ngIf=\"(dataContext?.status | async)?.hasError\"\n fxLayout=\"row\" fxLayoutAlign=\"center center\" fxLayoutGap=\"20px\">\n <mat-icon color=\"warn\">warning</mat-icon>\n <span class=\"hint mat-body-1\">{{'Error while loading data' | translate}}</span>\n </div>\n\n </div>\n\n <!-- [cdkDropListSortingDisabled]=\"true\" -->\n <!-- cdkDropList -->\n <cdk-virtual-scroll-viewport\n class=\"elder-grid-browser\" fxLayout=\"column\" fxFlex\n id=\"documents-container\"\n [itemSize]=\"itemHeight\"\n [minBufferPx]=\"itemHeight * 2\"\n [maxBufferPx]=\"itemHeight * 3\"\n #virtualScrollViewPort\n infiniteScroll\n [eventThrottle]=\"200\"\n [offsetFactor]=\"2\"\n [ignoreScrollEvent]=\"data.loading | async\"\n [containerId]=\"'documents-container'\" [listenToHost]=\"false\"\n (closeToEnd)=\"requestMoreDataZoned($event)\">\n\n <!-- (scrolling)=\"onScrolling($event)\" -->\n\n <div\n *cdkVirtualFor=\"let row of dataRows$; trackBy: trackByIndex; templateCacheSize: 50\"\n class=\"elder-grid-tile-row\"\n [style.height]=\"itemHeight + 'px'\">\n\n <ng-container *ngFor=\"let tile of row; trackBy: trackByFn\">\n\n <!-- Tile Cell -->\n <div *ngIf=\"showTile(tile)\" class=\"elder-grid-tile\">\n <!-- cdkDrag [cdkDragDisabled]=\"true\" [cdkDragData]=\"tile\" -->\n <!-- <div class=\"tile-placeholder\" *cdkDragPlaceholder></div> -->\n <div class=\"elder-grid-tile-content\"\n (click)=\"onItemClick(tile)\"\n (dblclick)=\"onItemDoubleClick(tile)\">\n <ng-container\n *ngTemplateOutlet=\"tileTemplate || simpleTileTemplate; context: {$implicit: tile}\">\n </ng-container>\n\n <!-- Overlay (Selection) -->\n <ng-container *ngIf=\"selectionVisible\">\n <div *ngIf=\"selectionModel.selection | async as selection\"\n class=\"elder-grid-tile-overlay\"\n [class.elder-grid-tile-overlay-hidden]=\"!inSelectionMode(selection)\"\n [class.elder-grid-tile-overlay-visible]=\"inSelectionMode(selection)\"\n [class.elder-click-through]=\"true\"\n >\n <button mat-icon-button type=\"button\"\n (click)=\"selectionModel.toggle(tile)\" elderStopEventPropagation\n class=\"elder-grid-tile-check\">\n <mat-icon\n [class.elder-selected]=\"(selectionModel.observeSelection(tile) | async)\"\n >\n {{(selectionModel.observeSelection(tile) | async) ? 'check_circle' : 'radio_button_unchecked'}}\n </mat-icon>\n </button>\n </div>\n </ng-container>\n\n </div>\n </div>\n\n <div *ngIf=\"!showTile(tile)\" class=\"elder-grid-tile-hidden\"></div>\n </ng-container>\n\n </div>\n\n </cdk-virtual-scroll-viewport>\n\n\n <mat-progress-bar fxFlex=\"none\"\n [mode]=\"(data?.loading | async) ? 'indeterminate' : 'determinate'\"\n [color]=\"(data && (data.status | async)?.hasError) ? 'warn' : 'primary'\">\n </mat-progress-bar>\n\n <!-- Footer -->\n <div class=\"elder-grid-footer\" *ngIf=\"footerVisible\"\n fxLayout=\"row\" fxFlex=\"none\" fxLayoutAlign=\"end center\" fxLayoutGap=\"10px\"\n style=\"padding-right: 10px\">\n\n <!-- Continuable -->\n <ng-container *ngIf=\"isContinuable\">\n <span class=\"mat-caption noselect\" style=\"color: gray\">\n {{(dataSnapshot?.data | async)?.length}} / {{total$ | async}}\n </span>\n\n <button mat-icon-button type=\"button\"\n color=\"primary\"\n [disabled]=\"!(canLoadMore$ | async)\"\n (click)=\"dataSnapshot.loadMore()\">\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n </ng-container>\n\n <!-- Paged -->\n <mat-paginator #matPaginator *ngIf=\"isActivePaged && (dataActivePaged.page | async) as page\"\n fxFlex=\"none\"\n [length]=\"dataContext?.total | async\"\n [pageIndex]=\"page?.index\"\n [pageSize]=\"page?.size\"\n [pageSizeOptions]=\"pageSizeOptions\">\n </mat-paginator>\n\n <!-- Local Source -->\n <ng-container *ngIf=\"!isActivePaged && !isContinuable\">\n <span class=\"mat-caption noselect\" style=\"color: gray\">\n {{(dataSnapshot?.data | async)?.length}}\n </span>\n </ng-container>\n\n </div>\n\n\n </div>\n</div>\n\n<ng-template #simpleTileTemplate let-tile>\n <div *ngIf=\"tile\" fxLayout=\"column\" fxFlex fxLayoutAlign=\"center center\" style=\"background-color: lightblue\">\n <p class=\"noselect\">Tile: {{tile}}</p>\n </div>\n</ng-template>\n",
|
|
14813
14827
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
14814
14828
|
providers: [
|
|
14815
14829
|
{
|
|
@@ -14837,7 +14851,8 @@
|
|
|
14837
14851
|
hiddenField: [{ type: i0.Input }],
|
|
14838
14852
|
idField: [{ type: i0.Input }],
|
|
14839
14853
|
selectionVisible: [{ type: i0.Input }],
|
|
14840
|
-
|
|
14854
|
+
pageSizeOptions: [{ type: i0.Input }],
|
|
14855
|
+
matPaginator: [{ type: i0.ViewChild, args: [paginator.MatPaginator,] }],
|
|
14841
14856
|
toolbarTemplateQuery: [{ type: i0.ContentChild, args: [ElderGridToolbarDirective, { read: i0.TemplateRef, static: true },] }],
|
|
14842
14857
|
tileTemplate: [{ type: i0.Input }],
|
|
14843
14858
|
toolbarTemplate: [{ type: i0.Input }],
|
|
@@ -14865,7 +14880,7 @@
|
|
|
14865
14880
|
i1$1.TranslateModule,
|
|
14866
14881
|
ElderDataCommonModule,
|
|
14867
14882
|
ElderInfiniteScrollModule,
|
|
14868
|
-
ElderFormsDirectivesModule
|
|
14883
|
+
ElderFormsDirectivesModule, paginator.MatPaginatorModule
|
|
14869
14884
|
],
|
|
14870
14885
|
declarations: [
|
|
14871
14886
|
ElderGridComponent,
|
|
@@ -24594,7 +24609,7 @@
|
|
|
24594
24609
|
ElderAuditedEntityComponent.decorators = [
|
|
24595
24610
|
{ type: i0.Component, args: [{
|
|
24596
24611
|
selector: 'elder-audited-entity',
|
|
24597
|
-
template: "<section [fxLayout]=\"layout\" fxLayoutGap=\"8px\" *ngIf=\"auditedCtx$ | async as ctx\">\n\n <mat-form-field class=\"elder-std-form-field\" [appearance]=\"appearance\">\n <mat-icon class=\"decent noselect\"
|
|
24612
|
+
template: "<section [fxLayout]=\"layout\" fxLayoutGap=\"8px\" *ngIf=\"auditedCtx$ | async as ctx\">\n\n <mat-form-field class=\"elder-std-form-field\" [appearance]=\"appearance\">\n <mat-label fxLayoutAlign=\"start center\" fxLayoutGap=\"4px\">\n <mat-icon class=\"decent noselect\" inline>add_circle_outline</mat-icon>\n <span>{{'context.createdAt' | translate}} {{ctx.audited?.createdAt | timeAgo}}</span>\n </mat-label>\n <input matInput name=\"created\"\n [value]=\"ctx.audited?.createdAt | date:'dd.MM.yyyy hh:mm'\"\n readonly>\n <mat-hint>{{ctx.audited?.createdBy}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field class=\"elder-std-form-field\" [appearance]=\"appearance\">\n <mat-label fxLayoutAlign=\"start center\" fxLayoutGap=\"4px\">\n <mat-icon class=\"decent noselect\">mode_edit_outline</mat-icon>\n <span>{{'context.modifiedAt' | translate}} {{ctx.audited?.modifiedAt | timeAgo}}</span>\n </mat-label>\n <input matInput name=\"modified\"\n [value]=\"ctx.audited?.modifiedAt | date:'dd.MM.yyyy hh:mm'\"\n readonly>\n <mat-hint>{{ctx.audited?.modifiedBy}}</mat-hint>\n </mat-form-field>\n\n</section>\n",
|
|
24598
24613
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
24599
24614
|
styles: [".decent{opacity:.5}\n"]
|
|
24600
24615
|
},] }
|