@porscheinformatik/material-addons 10.2.1 → 10.2.2
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/porscheinformatik-material-addons.umd.js +465 -5
- package/bundles/porscheinformatik-material-addons.umd.js.map +1 -1
- package/bundles/porscheinformatik-material-addons.umd.min.js +2 -2
- package/bundles/porscheinformatik-material-addons.umd.min.js.map +1 -1
- package/esm2015/lib/content-panel/content-header/content-header.component.js +15 -0
- package/esm2015/lib/content-panel/content-panel-container/content-panel-container.component.js +15 -0
- package/esm2015/lib/content-panel/content-panel-container-content/content-panel-container-content.component.js +15 -0
- package/esm2015/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.js +15 -0
- package/esm2015/lib/content-panel/content-panel.module.js +29 -0
- package/esm2015/lib/content-panel/main-container/main-container.component.js +15 -0
- package/esm2015/lib/data-table/data-table-action.js +1 -0
- package/esm2015/lib/data-table/data-table-column-header.js +1 -0
- package/esm2015/lib/data-table/data-table.component.js +103 -0
- package/esm2015/lib/data-table/data-table.js +1 -0
- package/esm2015/lib/data-table/data-table.module.js +33 -0
- package/esm2015/lib/flowbar/flowbar.component.js +186 -0
- package/esm2015/lib/flowbar/flowbar.module.js +14 -0
- package/esm2015/lib/table/table.component.js +1 -1
- package/esm2015/lib/table/table.module.js +3 -3
- package/esm2015/porscheinformatik-material-addons.js +2 -1
- package/esm2015/public-api.js +11 -1
- package/fesm2015/porscheinformatik-material-addons.js +409 -2
- package/fesm2015/porscheinformatik-material-addons.js.map +1 -1
- package/lib/content-panel/content-header/content-header.component.d.ts +5 -0
- package/lib/content-panel/content-panel-container/content-panel-container.component.d.ts +5 -0
- package/lib/content-panel/content-panel-container-content/content-panel-container-content.component.d.ts +5 -0
- package/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.d.ts +5 -0
- package/lib/content-panel/content-panel.module.d.ts +2 -0
- package/lib/content-panel/main-container/main-container.component.d.ts +5 -0
- package/lib/data-table/data-table-action.d.ts +5 -0
- package/lib/data-table/data-table-column-header.d.ts +6 -0
- package/lib/data-table/data-table.component.d.ts +39 -0
- package/lib/data-table/data-table.d.ts +2 -0
- package/lib/data-table/data-table.module.d.ts +2 -0
- package/lib/flowbar/flowbar.component.d.ts +42 -0
- package/lib/flowbar/flowbar.module.d.ts +2 -0
- package/package.json +1 -1
- package/porscheinformatik-material-addons.d.ts +1 -0
- package/porscheinformatik-material-addons.metadata.json +1 -1
- package/public-api.d.ts +10 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/material/button'), require('@angular/material/icon'), require('@angular/material/tooltip'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/forms'), require('@angular/platform-browser'), require('@ngx-translate/core'), require('rxjs'), require('@angular/cdk/layout'), require('rxjs/operators'), require('@angular/material/menu'), require('@angular/material/toolbar'), require('@angular/material/badge'), require('@angular/material/card'), require('@angular/animations'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/cdk/bidi'), require('@angular/cdk/stepper'), require('@angular/cdk/a11y'), require('@angular/flex-layout')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@porscheinformatik/material-addons', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/material/button', '@angular/material/icon', '@angular/material/tooltip', '@angular/material/form-field', '@angular/material/input', '@angular/forms', '@angular/platform-browser', '@ngx-translate/core', 'rxjs', '@angular/cdk/layout', 'rxjs/operators', '@angular/material/menu', '@angular/material/toolbar', '@angular/material/badge', '@angular/material/card', '@angular/animations', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/cdk/bidi', '@angular/cdk/stepper', '@angular/cdk/a11y', '@angular/flex-layout'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.porscheinformatik = global.porscheinformatik || {}, global.porscheinformatik['material-addons'] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.material.button, global.ng.material.icon, global.ng.material.tooltip, global.ng.material.formField, global.ng.material.input, global.ng.forms, global.ng.platformBrowser, global.i2, global.rxjs, global.ng.cdk.layout, global.rxjs.operators, global.ng.material.menu, global.ng.material.toolbar, global.ng.material.badge, global.ng.material.card, global.ng.animations, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.cdk.bidi, global.ng.cdk.stepper, global.ng.cdk.a11y, global.ng.flexLayout));
|
|
5
|
-
}(this, (function (exports, i0, common, i1, button, icon, tooltip, formField, input, forms, platformBrowser, i2, rxjs, layout, operators, menu, toolbar, badge, card, animations, table, sort, paginator, bidi, stepper, a11y, flexLayout) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/material/button'), require('@angular/material/icon'), require('@angular/material/tooltip'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/forms'), require('@angular/platform-browser'), require('@ngx-translate/core'), require('rxjs'), require('@angular/cdk/layout'), require('rxjs/operators'), require('@angular/material/menu'), require('@angular/material/toolbar'), require('@angular/material/badge'), require('@angular/material/card'), require('@angular/animations'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/cdk/bidi'), require('@angular/cdk/stepper'), require('@angular/cdk/a11y'), require('@angular/flex-layout'), require('@angular/material/stepper')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@porscheinformatik/material-addons', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/material/button', '@angular/material/icon', '@angular/material/tooltip', '@angular/material/form-field', '@angular/material/input', '@angular/forms', '@angular/platform-browser', '@ngx-translate/core', 'rxjs', '@angular/cdk/layout', 'rxjs/operators', '@angular/material/menu', '@angular/material/toolbar', '@angular/material/badge', '@angular/material/card', '@angular/animations', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/cdk/bidi', '@angular/cdk/stepper', '@angular/cdk/a11y', '@angular/flex-layout', '@angular/material/stepper'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.porscheinformatik = global.porscheinformatik || {}, global.porscheinformatik['material-addons'] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.material.button, global.ng.material.icon, global.ng.material.tooltip, global.ng.material.formField, global.ng.material.input, global.ng.forms, global.ng.platformBrowser, global.i2, global.rxjs, global.ng.cdk.layout, global.rxjs.operators, global.ng.material.menu, global.ng.material.toolbar, global.ng.material.badge, global.ng.material.card, global.ng.animations, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.cdk.bidi, global.ng.cdk.stepper, global.ng.cdk.a11y, global.ng.flexLayout, global.ng.material.stepper));
|
|
5
|
+
}(this, (function (exports, i0, common, i1, button, icon, tooltip, formField, input, forms, platformBrowser, i2, rxjs, layout, operators, menu, toolbar, badge, card, animations, table, sort, paginator, bidi, stepper, a11y, flexLayout, stepper$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var MaterialActionButtonComponent = /** @class */ (function () {
|
|
8
8
|
function MaterialActionButtonComponent() {
|
|
@@ -1899,12 +1899,149 @@
|
|
|
1899
1899
|
paginator.MatPaginatorModule,
|
|
1900
1900
|
sort.MatSortModule,
|
|
1901
1901
|
table.MatTableModule,
|
|
1902
|
-
ButtonModule
|
|
1902
|
+
ButtonModule,
|
|
1903
1903
|
],
|
|
1904
1904
|
exports: [TableComponent],
|
|
1905
1905
|
},] }
|
|
1906
1906
|
];
|
|
1907
1907
|
|
|
1908
|
+
var DataTableComponent = /** @class */ (function () {
|
|
1909
|
+
function DataTableComponent() {
|
|
1910
|
+
var _a;
|
|
1911
|
+
this.ACTION_COLUMN_NAME = '__action__';
|
|
1912
|
+
this.columns = [];
|
|
1913
|
+
this.filterLabel = 'NOT SET';
|
|
1914
|
+
this.filterPlaceholder = 'NOT SET';
|
|
1915
|
+
this.pageSizeOptions = [5, 10, 15];
|
|
1916
|
+
this.defaultPageSize = ((_a = this.pageSizeOptions) === null || _a === void 0 ? void 0 : _a[0]) || 10;
|
|
1917
|
+
this.rowActions = [];
|
|
1918
|
+
this.tableActions = [];
|
|
1919
|
+
this.tableAction = new i0.EventEmitter();
|
|
1920
|
+
this.rowAction = new i0.EventEmitter();
|
|
1921
|
+
this.sortEvent = new i0.EventEmitter();
|
|
1922
|
+
this.isFilterEnabled = false;
|
|
1923
|
+
this.isPaginationEnabled = false;
|
|
1924
|
+
}
|
|
1925
|
+
Object.defineProperty(DataTableComponent.prototype, "displayedData", {
|
|
1926
|
+
set: function (data) {
|
|
1927
|
+
if (!this.dataSource) {
|
|
1928
|
+
this.dataSource = new table.MatTableDataSource(data);
|
|
1929
|
+
}
|
|
1930
|
+
else {
|
|
1931
|
+
this.dataSource.data = data;
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
enumerable: false,
|
|
1935
|
+
configurable: true
|
|
1936
|
+
});
|
|
1937
|
+
Object.defineProperty(DataTableComponent.prototype, "paginationEnabled", {
|
|
1938
|
+
set: function (isPaginationEnabled) {
|
|
1939
|
+
this.isPaginationEnabled = isPaginationEnabled;
|
|
1940
|
+
// eslint-disable-next-line
|
|
1941
|
+
var pageSize = this.isPaginationEnabled ? this.defaultPageSize : Number.MAX_VALUE;
|
|
1942
|
+
if (this.dataSource.paginator) {
|
|
1943
|
+
this.dataSource.paginator._changePageSize(pageSize);
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
enumerable: false,
|
|
1947
|
+
configurable: true
|
|
1948
|
+
});
|
|
1949
|
+
Object.defineProperty(DataTableComponent.prototype, "filterEnabled", {
|
|
1950
|
+
set: function (isFilterEnabled) {
|
|
1951
|
+
this.isFilterEnabled = isFilterEnabled;
|
|
1952
|
+
this.setFilterValue(undefined);
|
|
1953
|
+
},
|
|
1954
|
+
enumerable: false,
|
|
1955
|
+
configurable: true
|
|
1956
|
+
});
|
|
1957
|
+
DataTableComponent.prototype.ngOnInit = function () {
|
|
1958
|
+
this.columnNames = this.columns.map(function (column) { return column.label; });
|
|
1959
|
+
this.isRowClickable = this.rowActions.length > 0;
|
|
1960
|
+
if (this.isRowClickable) {
|
|
1961
|
+
this.columnNames.unshift(this.ACTION_COLUMN_NAME);
|
|
1962
|
+
this.defaultAction = this.rowActions[0];
|
|
1963
|
+
}
|
|
1964
|
+
};
|
|
1965
|
+
DataTableComponent.prototype.ngAfterViewInit = function () {
|
|
1966
|
+
this.dataSource.paginator = this.paginator;
|
|
1967
|
+
this.dataSource.sort = this.sort;
|
|
1968
|
+
};
|
|
1969
|
+
DataTableComponent.prototype.onFilter = function (value) {
|
|
1970
|
+
this.setFilterValue(value);
|
|
1971
|
+
};
|
|
1972
|
+
DataTableComponent.prototype.onRowEvent = function (event, row, action) {
|
|
1973
|
+
if (action === void 0) { action = this.defaultAction; }
|
|
1974
|
+
if (!!action && !this.isClickOnRowMenuIcon(event)) {
|
|
1975
|
+
this.rowAction.emit(Object.assign(Object.assign({}, action), { outputRow: row }));
|
|
1976
|
+
}
|
|
1977
|
+
};
|
|
1978
|
+
DataTableComponent.prototype.onSortingEvent = function (sortingParams) {
|
|
1979
|
+
this.sortEvent.emit(sortingParams);
|
|
1980
|
+
};
|
|
1981
|
+
DataTableComponent.prototype.onTableAction = function (tableAction) {
|
|
1982
|
+
if (!!tableAction) {
|
|
1983
|
+
this.tableAction.emit(tableAction);
|
|
1984
|
+
}
|
|
1985
|
+
};
|
|
1986
|
+
DataTableComponent.prototype.setFilterValue = function (value) {
|
|
1987
|
+
this.dataSource.filter = value === null || value === void 0 ? void 0 : value.trim().toLowerCase();
|
|
1988
|
+
};
|
|
1989
|
+
DataTableComponent.prototype.isClickOnRowMenuIcon = function (event) {
|
|
1990
|
+
var _a;
|
|
1991
|
+
return (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.classList.contains('mat-icon');
|
|
1992
|
+
};
|
|
1993
|
+
return DataTableComponent;
|
|
1994
|
+
}());
|
|
1995
|
+
DataTableComponent.decorators = [
|
|
1996
|
+
{ type: i0.Component, args: [{
|
|
1997
|
+
selector: 'mad-data-table',
|
|
1998
|
+
template: "<!-- Table actions -->\n<div *ngIf=\"tableActions?.length\">\n <mad-primary-button class=\"table-action\" *ngFor=\"let tableAction of tableActions\" (click)=\"onTableAction(tableAction)\">\n {{ tableAction.label }}\n </mad-primary-button>\n</div>\n\n<!-- Row action buttons -->\n<mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent let-element=\"element\">\n <button *ngFor=\"let rowAction of rowActions\" mat-menu-item class=\"row-action\" (click)=\"onRowEvent($event, element, rowAction)\">\n {{ rowAction.label }}\n </button>\n </ng-template>\n</mat-menu>\n\n<!-- Table filter -->\n<mat-form-field *ngIf=\"isFilterEnabled\">\n <mat-label>{{ filterLabel }}</mat-label>\n <input matInput autocomplete=\"off\" (keyup)=\"onFilter($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n</mat-form-field>\n\n<!-- Table -->\n<div *ngIf=\"dataSource?.data?.length > 0; else noData\" class=\"mad-table\">\n <table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSortingEvent($event)\">\n <!-- Row actions column -->\n <ng-container [matColumnDef]=\"ACTION_COLUMN_NAME\" *ngIf=\"rowActions?.length\">\n <th scope=\"col\" mat-header-cell *matHeaderCellDef class=\"row-action-button\"></th>\n <td mat-cell *matCellDef=\"let element\" class=\"row-action-button\">\n <mad-icon-button [matMenuTriggerData]=\"{ element: element }\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n </td>\n </ng-container>\n <!-- Columns with data -->\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.label\">\n <ng-container *ngIf=\"column.isSortable; else noSort\">\n <th\n scope=\"col\"\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header=\"{{ column.label }}\"\n [arrowPosition]=\"column.isRightAligned ? 'before' : 'after'\"\n [class.text-right]=\"column.isRightAligned\"\n >\n {{ column.label }}\n </th>\n </ng-container>\n <ng-template #noSort>\n <th scope=\"col\" mat-header-cell *matHeaderCellDef [class.text-right]=\"column.isRightAligned\">\n {{ column.label }}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"column.isRightAligned\">\n {{ element[column.dataPropertyName] }}\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"columnNames\"></tr>\n <tr\n mat-row\n [class.clickable-table-row]=\"isRowClickable\"\n (click)=\"onRowEvent($event, row)\"\n *matRowDef=\"let row; columns: columnNames\"\n ></tr>\n </table>\n\n <!-- Pagination -->\n <mat-paginator\n [style.display]=\"isPaginationEnabled ? 'block' : 'none'\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n<!-- No data alert -->\n<ng-template #noData>\n <div class=\"noDataText\">\n {{ noDataText }}\n </div>\n</ng-template>\n",
|
|
1999
|
+
styles: [".text-right{padding-right:24px!important;text-align:right!important}.table-action{margin-bottom:.5em;margin-right:.5em}.row-action-button{width:10px}.noDataText{text-align:center;width:100%}.mad-table{overflow-x:auto;width:100%}"]
|
|
2000
|
+
},] }
|
|
2001
|
+
];
|
|
2002
|
+
DataTableComponent.propDecorators = {
|
|
2003
|
+
columns: [{ type: i0.Input }],
|
|
2004
|
+
filterLabel: [{ type: i0.Input }],
|
|
2005
|
+
filterPlaceholder: [{ type: i0.Input }],
|
|
2006
|
+
noDataText: [{ type: i0.Input }],
|
|
2007
|
+
pageSizeOptions: [{ type: i0.Input }],
|
|
2008
|
+
defaultPageSize: [{ type: i0.Input }],
|
|
2009
|
+
rowActions: [{ type: i0.Input }],
|
|
2010
|
+
tableActions: [{ type: i0.Input }],
|
|
2011
|
+
displayedData: [{ type: i0.Input }],
|
|
2012
|
+
paginationEnabled: [{ type: i0.Input }],
|
|
2013
|
+
filterEnabled: [{ type: i0.Input }],
|
|
2014
|
+
tableAction: [{ type: i0.Output }],
|
|
2015
|
+
rowAction: [{ type: i0.Output }],
|
|
2016
|
+
sortEvent: [{ type: i0.Output }],
|
|
2017
|
+
paginator: [{ type: i0.ViewChild, args: [paginator.MatPaginator, { static: false },] }],
|
|
2018
|
+
sort: [{ type: i0.ViewChild, args: [sort.MatSort, { static: true },] }]
|
|
2019
|
+
};
|
|
2020
|
+
|
|
2021
|
+
var DataTableModule = /** @class */ (function () {
|
|
2022
|
+
function DataTableModule() {
|
|
2023
|
+
}
|
|
2024
|
+
return DataTableModule;
|
|
2025
|
+
}());
|
|
2026
|
+
DataTableModule.decorators = [
|
|
2027
|
+
{ type: i0.NgModule, args: [{
|
|
2028
|
+
declarations: [DataTableComponent],
|
|
2029
|
+
imports: [
|
|
2030
|
+
common.CommonModule,
|
|
2031
|
+
button.MatButtonModule,
|
|
2032
|
+
icon.MatIconModule,
|
|
2033
|
+
formField.MatFormFieldModule,
|
|
2034
|
+
input.MatInputModule,
|
|
2035
|
+
menu.MatMenuModule,
|
|
2036
|
+
paginator.MatPaginatorModule,
|
|
2037
|
+
sort.MatSortModule,
|
|
2038
|
+
table.MatTableModule,
|
|
2039
|
+
ButtonModule,
|
|
2040
|
+
],
|
|
2041
|
+
exports: [DataTableComponent],
|
|
2042
|
+
},] }
|
|
2043
|
+
];
|
|
2044
|
+
|
|
1908
2045
|
var StepHeaderComponent = /** @class */ (function (_super) {
|
|
1909
2046
|
__extends(StepHeaderComponent, _super);
|
|
1910
2047
|
function StepHeaderComponent(_focusMonitor, _elementRef) {
|
|
@@ -2172,6 +2309,319 @@
|
|
|
2172
2309
|
},] }
|
|
2173
2310
|
];
|
|
2174
2311
|
|
|
2312
|
+
var ContentHeaderComponent = /** @class */ (function () {
|
|
2313
|
+
function ContentHeaderComponent() {
|
|
2314
|
+
}
|
|
2315
|
+
ContentHeaderComponent.prototype.ngOnInit = function () {
|
|
2316
|
+
};
|
|
2317
|
+
return ContentHeaderComponent;
|
|
2318
|
+
}());
|
|
2319
|
+
ContentHeaderComponent.decorators = [
|
|
2320
|
+
{ type: i0.Component, args: [{
|
|
2321
|
+
selector: 'mad-content-header',
|
|
2322
|
+
template: "<div class=\"content-header\">\n <ng-content></ng-content>\n</div>\n",
|
|
2323
|
+
styles: [".content-header{padding-right:.5rem}"]
|
|
2324
|
+
},] }
|
|
2325
|
+
];
|
|
2326
|
+
ContentHeaderComponent.ctorParameters = function () { return []; };
|
|
2327
|
+
|
|
2328
|
+
var ContentPanelContainerComponent = /** @class */ (function () {
|
|
2329
|
+
function ContentPanelContainerComponent() {
|
|
2330
|
+
}
|
|
2331
|
+
ContentPanelContainerComponent.prototype.ngOnInit = function () {
|
|
2332
|
+
};
|
|
2333
|
+
return ContentPanelContainerComponent;
|
|
2334
|
+
}());
|
|
2335
|
+
ContentPanelContainerComponent.decorators = [
|
|
2336
|
+
{ type: i0.Component, args: [{
|
|
2337
|
+
selector: 'mad-content-panel-container',
|
|
2338
|
+
template: "<div class=\"content-panel-outer-wrapper\">\n <ng-content select=\"mad-content-panel-container-content\"></ng-content>\n <ng-content select=\"mad-content-panel-container-footer\"></ng-content>\n</div>\n",
|
|
2339
|
+
styles: [":host{display:flex;flex:1 1 auto;min-height:.05rem;overflow:hidden;position:relative}.content-panel-outer-wrapper{display:flex;flex:1 1 auto;flex-direction:column}"]
|
|
2340
|
+
},] }
|
|
2341
|
+
];
|
|
2342
|
+
ContentPanelContainerComponent.ctorParameters = function () { return []; };
|
|
2343
|
+
|
|
2344
|
+
var ContentPanelContainerContentComponent = /** @class */ (function () {
|
|
2345
|
+
function ContentPanelContainerContentComponent() {
|
|
2346
|
+
}
|
|
2347
|
+
ContentPanelContainerContentComponent.prototype.ngOnInit = function () {
|
|
2348
|
+
};
|
|
2349
|
+
return ContentPanelContainerContentComponent;
|
|
2350
|
+
}());
|
|
2351
|
+
ContentPanelContainerContentComponent.decorators = [
|
|
2352
|
+
{ type: i0.Component, args: [{
|
|
2353
|
+
selector: 'mad-content-panel-container-content',
|
|
2354
|
+
template: "<ng-content></ng-content>",
|
|
2355
|
+
styles: [":host{border-top:.05rem solid #ccc;flex:1 1 auto;height:1rem;overflow-y:auto;padding:1rem}"]
|
|
2356
|
+
},] }
|
|
2357
|
+
];
|
|
2358
|
+
ContentPanelContainerContentComponent.ctorParameters = function () { return []; };
|
|
2359
|
+
|
|
2360
|
+
var ContentPanelContainerFooterComponent = /** @class */ (function () {
|
|
2361
|
+
function ContentPanelContainerFooterComponent() {
|
|
2362
|
+
}
|
|
2363
|
+
ContentPanelContainerFooterComponent.prototype.ngOnInit = function () {
|
|
2364
|
+
};
|
|
2365
|
+
return ContentPanelContainerFooterComponent;
|
|
2366
|
+
}());
|
|
2367
|
+
ContentPanelContainerFooterComponent.decorators = [
|
|
2368
|
+
{ type: i0.Component, args: [{
|
|
2369
|
+
selector: 'mad-content-panel-container-footer',
|
|
2370
|
+
template: "<ng-content></ng-content>",
|
|
2371
|
+
styles: [":host{align-items:center;border-top:.05rem solid #ccc;display:flex;flex:0 0 auto;min-height:2rem;padding:.25rem 1rem}"]
|
|
2372
|
+
},] }
|
|
2373
|
+
];
|
|
2374
|
+
ContentPanelContainerFooterComponent.ctorParameters = function () { return []; };
|
|
2375
|
+
|
|
2376
|
+
var MainContainerComponent = /** @class */ (function () {
|
|
2377
|
+
function MainContainerComponent() {
|
|
2378
|
+
}
|
|
2379
|
+
MainContainerComponent.prototype.ngOnInit = function () {
|
|
2380
|
+
};
|
|
2381
|
+
return MainContainerComponent;
|
|
2382
|
+
}());
|
|
2383
|
+
MainContainerComponent.decorators = [
|
|
2384
|
+
{ type: i0.Component, args: [{
|
|
2385
|
+
selector: 'mad-main-container',
|
|
2386
|
+
template: "<div class=\"main-container\">\n <ng-content select=\"mad-content-header\"></ng-content>\n <ng-content select=\"mad-flowbar\"></ng-content>\n <ng-content select=\"mad-content-panel-container\"></ng-content>\n</div>\n",
|
|
2387
|
+
styles: [".main-container{display:flex;flex-direction:column;height:100%}"]
|
|
2388
|
+
},] }
|
|
2389
|
+
];
|
|
2390
|
+
MainContainerComponent.ctorParameters = function () { return []; };
|
|
2391
|
+
|
|
2392
|
+
var ContentPanelModule = /** @class */ (function () {
|
|
2393
|
+
function ContentPanelModule() {
|
|
2394
|
+
}
|
|
2395
|
+
return ContentPanelModule;
|
|
2396
|
+
}());
|
|
2397
|
+
ContentPanelModule.decorators = [
|
|
2398
|
+
{ type: i0.NgModule, args: [{
|
|
2399
|
+
declarations: [
|
|
2400
|
+
ContentHeaderComponent,
|
|
2401
|
+
ContentPanelContainerComponent,
|
|
2402
|
+
ContentPanelContainerContentComponent,
|
|
2403
|
+
ContentPanelContainerFooterComponent,
|
|
2404
|
+
MainContainerComponent,
|
|
2405
|
+
],
|
|
2406
|
+
imports: [common.CommonModule],
|
|
2407
|
+
exports: [
|
|
2408
|
+
ContentHeaderComponent,
|
|
2409
|
+
ContentPanelContainerComponent,
|
|
2410
|
+
ContentPanelContainerContentComponent,
|
|
2411
|
+
ContentPanelContainerFooterComponent,
|
|
2412
|
+
MainContainerComponent,
|
|
2413
|
+
],
|
|
2414
|
+
},] }
|
|
2415
|
+
];
|
|
2416
|
+
|
|
2417
|
+
var FlowbarComponent = /** @class */ (function () {
|
|
2418
|
+
function FlowbarComponent() {
|
|
2419
|
+
this._steps = [];
|
|
2420
|
+
this._activeStepChange = new i0.EventEmitter(true);
|
|
2421
|
+
/**
|
|
2422
|
+
* Event emitted when a step header is clicked.
|
|
2423
|
+
* When defined header navigation has to be implemented programmatically.
|
|
2424
|
+
* e.g. {@see changeActiveStepOnHeader}
|
|
2425
|
+
*/
|
|
2426
|
+
this._headerClick = new i0.EventEmitter(true);
|
|
2427
|
+
}
|
|
2428
|
+
FlowbarComponent.prototype.ngOnInit = function () {
|
|
2429
|
+
// If no active step is set as input or the active step is not enabled, select the first enabled step
|
|
2430
|
+
if (!this._activeStep || !this._activeStep.enabled) {
|
|
2431
|
+
this._activeStep = this._steps.find(function (step) {
|
|
2432
|
+
return step.enabled;
|
|
2433
|
+
});
|
|
2434
|
+
if (this._activeStep) {
|
|
2435
|
+
// If sub steps exist then set the first non disabled sub step per default
|
|
2436
|
+
if (this.activeTabHasSubSteps()) {
|
|
2437
|
+
this._activeStep.activeSubStep = this._activeStep.subSteps.find(function (step) {
|
|
2438
|
+
return step.enabled;
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
this._activeStepChange.emit(this._activeStep);
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
};
|
|
2445
|
+
FlowbarComponent.prototype.ngAfterViewInit = function () {
|
|
2446
|
+
this.stepper._getIndicatorType = function () { return 'number'; };
|
|
2447
|
+
};
|
|
2448
|
+
FlowbarComponent.prototype.changeActiveStep = function (step) {
|
|
2449
|
+
var previousIndex = this._steps.indexOf(this._activeStep);
|
|
2450
|
+
this._activeStep = step;
|
|
2451
|
+
if (this.activeTabHasSubSteps()) {
|
|
2452
|
+
if (previousIndex < this._steps.indexOf(this._activeStep)) {
|
|
2453
|
+
this._activeStep.activeSubStep = this._activeStep.subSteps[0];
|
|
2454
|
+
}
|
|
2455
|
+
else {
|
|
2456
|
+
this._activeStep.activeSubStep = this._activeStep.subSteps[this._activeStep.subSteps.length - 1];
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
this._activeStepChange.emit(this._activeStep);
|
|
2460
|
+
};
|
|
2461
|
+
FlowbarComponent.prototype.changeActiveStepOnHeader = function (step) {
|
|
2462
|
+
var stepIndex = this._steps.indexOf(step);
|
|
2463
|
+
this._activeStep = step;
|
|
2464
|
+
this.stepper.selected = this.stepper._steps.find(function (_, i) { return i === stepIndex; });
|
|
2465
|
+
};
|
|
2466
|
+
FlowbarComponent.prototype.changeActiveSubStep = function (subStep) {
|
|
2467
|
+
this._activeStep.activeSubStep = subStep;
|
|
2468
|
+
};
|
|
2469
|
+
FlowbarComponent.prototype.previous = function () {
|
|
2470
|
+
if (this.isPreviousAvailable()) {
|
|
2471
|
+
// If active step has no sub steps or first sub step is selected -> go to previous main step
|
|
2472
|
+
if (!this.activeTabHasSubSteps() || this.isFirstSubStep()) {
|
|
2473
|
+
var previousEnabledStep = this.findPreviousEnabledStep();
|
|
2474
|
+
this.changeActiveStep(previousEnabledStep);
|
|
2475
|
+
this.stepper.selectedIndex = this._steps.indexOf(previousEnabledStep);
|
|
2476
|
+
}
|
|
2477
|
+
else {
|
|
2478
|
+
var subStepIndex = this._activeStep.subSteps.indexOf(this._activeStep.activeSubStep);
|
|
2479
|
+
this._activeStep.activeSubStep = this._activeStep.subSteps[subStepIndex - 1];
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
};
|
|
2483
|
+
FlowbarComponent.prototype.next = function () {
|
|
2484
|
+
if (this.isNextAvailable()) {
|
|
2485
|
+
// If active step has no sub steps or last sub step is selected -> go to next main step
|
|
2486
|
+
if (!this.activeTabHasSubSteps() || this.isLastSubStep()) {
|
|
2487
|
+
var nextEnabledStep = this.findNextEnabledStep();
|
|
2488
|
+
this.changeActiveStep(nextEnabledStep);
|
|
2489
|
+
this.stepper.selectedIndex = this._steps.indexOf(nextEnabledStep);
|
|
2490
|
+
}
|
|
2491
|
+
else {
|
|
2492
|
+
var subStepIndex = this._activeStep.subSteps.indexOf(this._activeStep.activeSubStep);
|
|
2493
|
+
this._activeStep.activeSubStep = this._activeStep.subSteps[subStepIndex + 1];
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
};
|
|
2497
|
+
FlowbarComponent.prototype.isPreviousAvailable = function () {
|
|
2498
|
+
if (this._activeStep) {
|
|
2499
|
+
if (!this.activeTabHasSubSteps() || this.isFirstSubStep()) {
|
|
2500
|
+
var index = this.getCurrentIndex();
|
|
2501
|
+
return index > 0 && this.isAnyPreviousStepEnabled(index);
|
|
2502
|
+
}
|
|
2503
|
+
else {
|
|
2504
|
+
return true;
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
return false;
|
|
2508
|
+
};
|
|
2509
|
+
FlowbarComponent.prototype.isNextAvailable = function () {
|
|
2510
|
+
if (this._activeStep) {
|
|
2511
|
+
if (!this.activeTabHasSubSteps() || this.isLastSubStep()) {
|
|
2512
|
+
var index = this.getCurrentIndex();
|
|
2513
|
+
return index < this._steps.length - 1 && this.isAnyFollowingStepEnabled(index);
|
|
2514
|
+
}
|
|
2515
|
+
else {
|
|
2516
|
+
return true;
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
return false;
|
|
2520
|
+
};
|
|
2521
|
+
FlowbarComponent.prototype.isLastStep = function () {
|
|
2522
|
+
if (this.getCurrentIndex() === this._steps.length - 1) {
|
|
2523
|
+
if (this.activeTabHasSubSteps()) {
|
|
2524
|
+
return this.isLastSubStep();
|
|
2525
|
+
}
|
|
2526
|
+
else {
|
|
2527
|
+
return true;
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
return false;
|
|
2531
|
+
};
|
|
2532
|
+
FlowbarComponent.prototype.getCurrentIndex = function () {
|
|
2533
|
+
var _this = this;
|
|
2534
|
+
return this._steps.findIndex(function (value) {
|
|
2535
|
+
return value === _this._activeStep;
|
|
2536
|
+
});
|
|
2537
|
+
};
|
|
2538
|
+
FlowbarComponent.prototype.getCurrentSubStepIndex = function () {
|
|
2539
|
+
var _this = this;
|
|
2540
|
+
return this._activeStep.subSteps.findIndex(function (value) {
|
|
2541
|
+
return value === _this._activeStep.activeSubStep;
|
|
2542
|
+
});
|
|
2543
|
+
};
|
|
2544
|
+
FlowbarComponent.prototype.triggerClick = function () {
|
|
2545
|
+
var selectedStep = this._steps[this.stepper.selectedIndex];
|
|
2546
|
+
this.changeActiveStep(selectedStep);
|
|
2547
|
+
};
|
|
2548
|
+
FlowbarComponent.prototype.headerClick = function (event, step) {
|
|
2549
|
+
event.stopPropagation(); //stop processing current header click event
|
|
2550
|
+
this._headerClick.emit(step);
|
|
2551
|
+
};
|
|
2552
|
+
Object.defineProperty(FlowbarComponent.prototype, "currentStepLabel", {
|
|
2553
|
+
get: function () {
|
|
2554
|
+
return this._activeStep.label;
|
|
2555
|
+
},
|
|
2556
|
+
enumerable: false,
|
|
2557
|
+
configurable: true
|
|
2558
|
+
});
|
|
2559
|
+
Object.defineProperty(FlowbarComponent.prototype, "currentSubStepLabel", {
|
|
2560
|
+
get: function () {
|
|
2561
|
+
var _a;
|
|
2562
|
+
return (_a = this._activeStep.activeSubStep) === null || _a === void 0 ? void 0 : _a.label;
|
|
2563
|
+
},
|
|
2564
|
+
enumerable: false,
|
|
2565
|
+
configurable: true
|
|
2566
|
+
});
|
|
2567
|
+
FlowbarComponent.prototype.activeTabHasSubSteps = function () {
|
|
2568
|
+
return this._activeStep.subSteps && this._activeStep.subSteps.length > 0;
|
|
2569
|
+
};
|
|
2570
|
+
FlowbarComponent.prototype.isFirstSubStep = function () {
|
|
2571
|
+
return this._activeStep.activeSubStep === this._activeStep.subSteps[0];
|
|
2572
|
+
};
|
|
2573
|
+
FlowbarComponent.prototype.isLastSubStep = function () {
|
|
2574
|
+
return this._activeStep.activeSubStep === this._activeStep.subSteps[this._activeStep.subSteps.length - 1];
|
|
2575
|
+
};
|
|
2576
|
+
FlowbarComponent.prototype.isAnyPreviousStepEnabled = function (index) {
|
|
2577
|
+
// eslint-disable-next-line id-blacklist
|
|
2578
|
+
return this._steps.slice(0, index).find(function (step) { return step.enabled; }) !== undefined;
|
|
2579
|
+
};
|
|
2580
|
+
FlowbarComponent.prototype.isAnyFollowingStepEnabled = function (index) {
|
|
2581
|
+
// eslint-disable-next-line id-blacklist
|
|
2582
|
+
return this._steps.slice(index + 1, this._steps.length).find(function (step) { return step.enabled; }) !== undefined;
|
|
2583
|
+
};
|
|
2584
|
+
FlowbarComponent.prototype.findPreviousEnabledStep = function () {
|
|
2585
|
+
var index = this.getCurrentIndex();
|
|
2586
|
+
return this._steps
|
|
2587
|
+
.slice(0, index)
|
|
2588
|
+
.reverse()
|
|
2589
|
+
.find(function (step) { return step.enabled; });
|
|
2590
|
+
};
|
|
2591
|
+
FlowbarComponent.prototype.findNextEnabledStep = function () {
|
|
2592
|
+
var index = this.getCurrentIndex();
|
|
2593
|
+
return this._steps.slice(index + 1, this._steps.length).find(function (step) { return step.enabled; });
|
|
2594
|
+
};
|
|
2595
|
+
return FlowbarComponent;
|
|
2596
|
+
}());
|
|
2597
|
+
FlowbarComponent.decorators = [
|
|
2598
|
+
{ type: i0.Component, args: [{
|
|
2599
|
+
selector: 'mad-flowbar',
|
|
2600
|
+
template: "<div class=\"stepper-container\">\n <mat-horizontal-stepper #stepper (click)=\"triggerClick()\">\n <mat-step *ngFor=\"let step of _steps\" [aria-labelledby]=\"!step.enabled ? 'disabled' : null\">\n <ng-template matStepLabel>\n <div class=\"step-header-overlay\" *ngIf=\"this._headerClick.observers.length > 0\" (click)=\"headerClick($event, step)\"></div>\n <span>{{step.label}}</span>\n </ng-template>\n </mat-step>\n </mat-horizontal-stepper>\n</div>\n",
|
|
2601
|
+
styles: [".stepper-container{display:flex;padding:0 1rem}::ng-deep .mat-stepper-horizontal .mat-horizontal-stepper-header{height:auto;padding:0}::ng-deep .mat-step-header[aria-labelledby=disabled]{cursor:not-allowed;pointer-events:none!important}::ng-deep .mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 10px}::ng-deep .mat-stepper-horizontal .mat-stepper-horizontal-line{border-top-width:4px;margin:0 5px}.step-header-overlay{height:100%;position:absolute;width:100%}"]
|
|
2602
|
+
},] }
|
|
2603
|
+
];
|
|
2604
|
+
FlowbarComponent.propDecorators = {
|
|
2605
|
+
stepper: [{ type: i0.ViewChild, args: ['stepper',] }],
|
|
2606
|
+
_steps: [{ type: i0.Input, args: ['steps',] }],
|
|
2607
|
+
_activeStep: [{ type: i0.Input, args: ['activeStep',] }],
|
|
2608
|
+
_activeStepChange: [{ type: i0.Output, args: ['activeStepChange',] }],
|
|
2609
|
+
_headerClick: [{ type: i0.Output, args: ['headerClick',] }]
|
|
2610
|
+
};
|
|
2611
|
+
|
|
2612
|
+
var FlowbarModule = /** @class */ (function () {
|
|
2613
|
+
function FlowbarModule() {
|
|
2614
|
+
}
|
|
2615
|
+
return FlowbarModule;
|
|
2616
|
+
}());
|
|
2617
|
+
FlowbarModule.decorators = [
|
|
2618
|
+
{ type: i0.NgModule, args: [{
|
|
2619
|
+
declarations: [FlowbarComponent],
|
|
2620
|
+
imports: [common.CommonModule, stepper$1.MatStepperModule],
|
|
2621
|
+
exports: [FlowbarComponent],
|
|
2622
|
+
},] }
|
|
2623
|
+
];
|
|
2624
|
+
|
|
2175
2625
|
var MaterialAddonsModule = /** @class */ (function () {
|
|
2176
2626
|
function MaterialAddonsModule() {
|
|
2177
2627
|
}
|
|
@@ -2202,6 +2652,15 @@
|
|
|
2202
2652
|
|
|
2203
2653
|
exports.ButtonModule = ButtonModule;
|
|
2204
2654
|
exports.CardModule = CardModule;
|
|
2655
|
+
exports.ContentHeaderComponent = ContentHeaderComponent;
|
|
2656
|
+
exports.ContentPanelContainerComponent = ContentPanelContainerComponent;
|
|
2657
|
+
exports.ContentPanelContainerContentComponent = ContentPanelContainerContentComponent;
|
|
2658
|
+
exports.ContentPanelContainerFooterComponent = ContentPanelContainerFooterComponent;
|
|
2659
|
+
exports.ContentPanelModule = ContentPanelModule;
|
|
2660
|
+
exports.DataTableModule = DataTableModule;
|
|
2661
|
+
exports.FlowbarComponent = FlowbarComponent;
|
|
2662
|
+
exports.FlowbarModule = FlowbarModule;
|
|
2663
|
+
exports.MainContainerComponent = MainContainerComponent;
|
|
2205
2664
|
exports.MaterialActionButtonComponent = MaterialActionButtonComponent;
|
|
2206
2665
|
exports.MaterialActionButtonModule = MaterialActionButtonModule;
|
|
2207
2666
|
exports.MaterialAddonsModule = MaterialAddonsModule;
|
|
@@ -2234,6 +2693,7 @@
|
|
|
2234
2693
|
exports.ɵj = BaseQuickListComponent;
|
|
2235
2694
|
exports.ɵk = QuickListCompactComponent;
|
|
2236
2695
|
exports.ɵl = TableComponent;
|
|
2696
|
+
exports.ɵm = DataTableComponent;
|
|
2237
2697
|
|
|
2238
2698
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2239
2699
|
|