@porscheinformatik/material-addons 10.2.1 → 10.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/bundles/porscheinformatik-material-addons.umd.js +479 -12
  2. package/bundles/porscheinformatik-material-addons.umd.js.map +1 -1
  3. package/bundles/porscheinformatik-material-addons.umd.min.js +2 -2
  4. package/bundles/porscheinformatik-material-addons.umd.min.js.map +1 -1
  5. package/esm2015/lib/content-panel/content-header/content-header.component.js +15 -0
  6. package/esm2015/lib/content-panel/content-panel-container/content-panel-container.component.js +15 -0
  7. package/esm2015/lib/content-panel/content-panel-container-content/content-panel-container-content.component.js +15 -0
  8. package/esm2015/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.js +15 -0
  9. package/esm2015/lib/content-panel/content-panel.module.js +29 -0
  10. package/esm2015/lib/content-panel/main-container/main-container.component.js +15 -0
  11. package/esm2015/lib/data-table/data-table-action.js +1 -0
  12. package/esm2015/lib/data-table/data-table-column-header.js +1 -0
  13. package/esm2015/lib/data-table/data-table.component.js +103 -0
  14. package/esm2015/lib/data-table/data-table.js +1 -0
  15. package/esm2015/lib/data-table/data-table.module.js +33 -0
  16. package/esm2015/lib/flowbar/flowbar.component.js +190 -0
  17. package/esm2015/lib/flowbar/flowbar.module.js +14 -0
  18. package/esm2015/lib/stepper/step-header/step-header.component.js +3 -3
  19. package/esm2015/lib/stepper/stepper.component.js +8 -6
  20. package/esm2015/lib/table/table.component.js +1 -1
  21. package/esm2015/lib/table/table.module.js +3 -3
  22. package/esm2015/porscheinformatik-material-addons.js +2 -1
  23. package/esm2015/public-api.js +11 -1
  24. package/fesm2015/porscheinformatik-material-addons.js +422 -9
  25. package/fesm2015/porscheinformatik-material-addons.js.map +1 -1
  26. package/lib/content-panel/content-header/content-header.component.d.ts +5 -0
  27. package/lib/content-panel/content-panel-container/content-panel-container.component.d.ts +5 -0
  28. package/lib/content-panel/content-panel-container-content/content-panel-container-content.component.d.ts +5 -0
  29. package/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.d.ts +5 -0
  30. package/lib/content-panel/content-panel.module.d.ts +2 -0
  31. package/lib/content-panel/main-container/main-container.component.d.ts +5 -0
  32. package/lib/data-table/data-table-action.d.ts +5 -0
  33. package/lib/data-table/data-table-column-header.d.ts +6 -0
  34. package/lib/data-table/data-table.component.d.ts +39 -0
  35. package/lib/data-table/data-table.d.ts +2 -0
  36. package/lib/data-table/data-table.module.d.ts +2 -0
  37. package/lib/flowbar/flowbar.component.d.ts +43 -0
  38. package/lib/flowbar/flowbar.module.d.ts +2 -0
  39. package/lib/stepper/stepper.component.d.ts +1 -1
  40. package/package.json +1 -1
  41. package/porscheinformatik-material-addons.d.ts +1 -0
  42. package/porscheinformatik-material-addons.metadata.json +1 -1
  43. package/public-api.d.ts +10 -0
  44. package/themes/common/styles.scss +2 -2
  45. package/themes/pbv.scss +2 -1
@@ -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) {
@@ -1952,7 +2089,7 @@
1952
2089
  StepHeaderComponent.decorators = [
1953
2090
  { type: i0.Component, args: [{
1954
2091
  selector: 'mad-step-header',
1955
- template: "<div class=\"header\" fxLayout=\"row\" fxLayoutGap=\"1em\"\n [style.background]=\"this.selected && !this.closed ? '#d8e2e9' : '#ffffff'\"\n [style.border-color]=\"this.hasError ? '#f44336' : '#d3d3d3'\">\n <div [ngClass]=\"this.getCssForState()\"></div>\n <div class=\"header-label\">\n <mat-icon class=\"material-icons-outlined\">\n {{this.selected && !this.closed ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}\n </mat-icon>\n </div>\n <div *ngIf=\"this.completed || this.hasError\" class=\"header-label\">\n <mat-icon [ngClass]=\"this.completed ? 'green-check' : 'red-error'\">\n {{getIcon()}}\n </mat-icon>\n </div>\n <span *ngIf=\"!this.hasError && !this.completed\" class=\"header-label\">{{(this.index + 1) + '.'}}</span>\n <div class=\"header-label\"> {{this.label}}</div>\n</div>\n",
2092
+ template: "<div\n class=\"header\"\n fxLayout=\"row\"\n fxLayoutGap=\"1em\"\n [style.background]=\"this.selected && !this.closed ? '#d8e2e9' : '#ffffff'\"\n [ngClass]=\"this.hasError ? 'error-border' : 'check-border'\"\n>\n <div [ngClass]=\"this.getCssForState()\"></div>\n <div class=\"header-label\">\n <mat-icon class=\"material-icons-outlined\">\n {{ this.selected && !this.closed ? 'keyboard_arrow_down' : 'keyboard_arrow_right' }}\n </mat-icon>\n </div>\n <div *ngIf=\"this.completed || this.hasError\" class=\"header-label\">\n <mat-icon [ngClass]=\"this.completed ? 'green-check' : 'red-error'\">\n {{ getIcon() }}\n </mat-icon>\n </div>\n <span *ngIf=\"!this.hasError && !this.completed\" class=\"header-label\">{{ this.index + 1 + '.' }}</span>\n <div class=\"header-label\">{{ this.label }}</div>\n</div>\n",
1956
2093
  inputs: ['color'],
1957
2094
  host: {
1958
2095
  'class': 'mad-step-header',
@@ -1960,7 +2097,7 @@
1960
2097
  },
1961
2098
  encapsulation: i0.ViewEncapsulation.None,
1962
2099
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1963
- styles: [".header{-webkit-tap-highlight-color:transparent;border:1px solid #d3d3d3;box-sizing:content-box;cursor:pointer;height:62px;outline:#f44336;overflow:hidden;width:100%}.header-label{align-items:center;display:flex}.step-state-complete{background:green;width:5px}.step-state-error{background:#f44336;width:5px}.step-state-neutral{background:#d3d3d3;width:5px}.green-check{color:green}.red-error{color:#f44336}"]
2100
+ styles: [".header{-webkit-tap-highlight-color:transparent;border:1px solid #d3d3d3;box-sizing:content-box;cursor:pointer;height:62px;outline:var(--warn-color);overflow:hidden;width:100%}.header-label{align-items:center;display:flex}.step-state-complete{background:green;width:5px}.step-state-error{background:var(--warn-color);width:5px}.step-state-neutral{background:#d3d3d3;width:5px}.green-check{color:green}.red-error{color:var(--warn-color)}.check-border{border-color:#d3d3d3}.error-border{border-color:var(--warn-color)}"]
1964
2101
  },] }
1965
2102
  ];
1966
2103
  StepHeaderComponent.ctorParameters = function () { return [
@@ -2017,8 +2154,9 @@
2017
2154
  StepComponent.prototype.ngOnDestroy = function () {
2018
2155
  this._isSelected.unsubscribe();
2019
2156
  };
2020
- StepComponent.prototype.next = function () {
2021
- this.stepValidation();
2157
+ StepComponent.prototype.next = function (markFormAsTouched) {
2158
+ if (markFormAsTouched === void 0) { markFormAsTouched = true; }
2159
+ this.stepValidation(markFormAsTouched);
2022
2160
  if (this.onNext.observers.length <= 0) {
2023
2161
  this.stepper.next();
2024
2162
  }
@@ -2035,7 +2173,7 @@
2035
2173
  this.onHeaderClick.emit(index);
2036
2174
  };
2037
2175
  StepComponent.prototype.completeLast = function () {
2038
- this.stepValidation();
2176
+ this.stepValidation(true);
2039
2177
  this.stepClosed = true;
2040
2178
  if (this.onDone.observers.length <= 0) {
2041
2179
  this.stepper.next();
@@ -2047,9 +2185,11 @@
2047
2185
  this.completed = true;
2048
2186
  this.state = stepper.STEP_STATE.DONE;
2049
2187
  };
2050
- StepComponent.prototype.stepValidation = function () {
2188
+ StepComponent.prototype.stepValidation = function (markFormAsTouched) {
2051
2189
  var _a, _b;
2052
- (_a = this.stepControl) === null || _a === void 0 ? void 0 : _a.markAllAsTouched();
2190
+ if (markFormAsTouched) {
2191
+ (_a = this.stepControl) === null || _a === void 0 ? void 0 : _a.markAllAsTouched();
2192
+ }
2053
2193
  if ((_b = this.stepControl) === null || _b === void 0 ? void 0 : _b.valid) {
2054
2194
  this.hasError = false;
2055
2195
  this.completed = true;
@@ -2172,6 +2312,323 @@
2172
2312
  },] }
2173
2313
  ];
2174
2314
 
2315
+ var ContentHeaderComponent = /** @class */ (function () {
2316
+ function ContentHeaderComponent() {
2317
+ }
2318
+ ContentHeaderComponent.prototype.ngOnInit = function () {
2319
+ };
2320
+ return ContentHeaderComponent;
2321
+ }());
2322
+ ContentHeaderComponent.decorators = [
2323
+ { type: i0.Component, args: [{
2324
+ selector: 'mad-content-header',
2325
+ template: "<div class=\"content-header\">\n <ng-content></ng-content>\n</div>\n",
2326
+ styles: [".content-header{padding-right:.5rem}"]
2327
+ },] }
2328
+ ];
2329
+ ContentHeaderComponent.ctorParameters = function () { return []; };
2330
+
2331
+ var ContentPanelContainerComponent = /** @class */ (function () {
2332
+ function ContentPanelContainerComponent() {
2333
+ }
2334
+ ContentPanelContainerComponent.prototype.ngOnInit = function () {
2335
+ };
2336
+ return ContentPanelContainerComponent;
2337
+ }());
2338
+ ContentPanelContainerComponent.decorators = [
2339
+ { type: i0.Component, args: [{
2340
+ selector: 'mad-content-panel-container',
2341
+ 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",
2342
+ 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}"]
2343
+ },] }
2344
+ ];
2345
+ ContentPanelContainerComponent.ctorParameters = function () { return []; };
2346
+
2347
+ var ContentPanelContainerContentComponent = /** @class */ (function () {
2348
+ function ContentPanelContainerContentComponent() {
2349
+ }
2350
+ ContentPanelContainerContentComponent.prototype.ngOnInit = function () {
2351
+ };
2352
+ return ContentPanelContainerContentComponent;
2353
+ }());
2354
+ ContentPanelContainerContentComponent.decorators = [
2355
+ { type: i0.Component, args: [{
2356
+ selector: 'mad-content-panel-container-content',
2357
+ template: "<ng-content></ng-content>",
2358
+ styles: [":host{border-top:.05rem solid #ccc;flex:1 1 auto;height:1rem;overflow-y:auto;padding:1rem}"]
2359
+ },] }
2360
+ ];
2361
+ ContentPanelContainerContentComponent.ctorParameters = function () { return []; };
2362
+
2363
+ var ContentPanelContainerFooterComponent = /** @class */ (function () {
2364
+ function ContentPanelContainerFooterComponent() {
2365
+ }
2366
+ ContentPanelContainerFooterComponent.prototype.ngOnInit = function () {
2367
+ };
2368
+ return ContentPanelContainerFooterComponent;
2369
+ }());
2370
+ ContentPanelContainerFooterComponent.decorators = [
2371
+ { type: i0.Component, args: [{
2372
+ selector: 'mad-content-panel-container-footer',
2373
+ template: "<ng-content></ng-content>",
2374
+ styles: [":host{align-items:center;border-top:.05rem solid #ccc;display:flex;flex:0 0 auto;min-height:2rem;padding:.25rem 1rem}"]
2375
+ },] }
2376
+ ];
2377
+ ContentPanelContainerFooterComponent.ctorParameters = function () { return []; };
2378
+
2379
+ var MainContainerComponent = /** @class */ (function () {
2380
+ function MainContainerComponent() {
2381
+ }
2382
+ MainContainerComponent.prototype.ngOnInit = function () {
2383
+ };
2384
+ return MainContainerComponent;
2385
+ }());
2386
+ MainContainerComponent.decorators = [
2387
+ { type: i0.Component, args: [{
2388
+ selector: 'mad-main-container',
2389
+ 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",
2390
+ styles: [".main-container{display:flex;flex-direction:column;height:100%}"]
2391
+ },] }
2392
+ ];
2393
+ MainContainerComponent.ctorParameters = function () { return []; };
2394
+
2395
+ var ContentPanelModule = /** @class */ (function () {
2396
+ function ContentPanelModule() {
2397
+ }
2398
+ return ContentPanelModule;
2399
+ }());
2400
+ ContentPanelModule.decorators = [
2401
+ { type: i0.NgModule, args: [{
2402
+ declarations: [
2403
+ ContentHeaderComponent,
2404
+ ContentPanelContainerComponent,
2405
+ ContentPanelContainerContentComponent,
2406
+ ContentPanelContainerFooterComponent,
2407
+ MainContainerComponent,
2408
+ ],
2409
+ imports: [common.CommonModule],
2410
+ exports: [
2411
+ ContentHeaderComponent,
2412
+ ContentPanelContainerComponent,
2413
+ ContentPanelContainerContentComponent,
2414
+ ContentPanelContainerFooterComponent,
2415
+ MainContainerComponent,
2416
+ ],
2417
+ },] }
2418
+ ];
2419
+
2420
+ var FlowbarComponent = /** @class */ (function () {
2421
+ function FlowbarComponent() {
2422
+ this._steps = [];
2423
+ this._activeStepChange = new i0.EventEmitter(true);
2424
+ /**
2425
+ * Event emitted when a step header is clicked.
2426
+ * When defined header navigation has to be implemented programmatically.
2427
+ * e.g. {@see changeActiveStepOnHeader}
2428
+ */
2429
+ this._headerClick = new i0.EventEmitter(true);
2430
+ }
2431
+ FlowbarComponent.prototype.ngOnInit = function () {
2432
+ // If no active step is set as input or the active step is not enabled, select the first enabled step
2433
+ if (!this._activeStep || !this._activeStep.enabled) {
2434
+ this._activeStep = this._steps.find(function (step) {
2435
+ return step.enabled;
2436
+ });
2437
+ if (this._activeStep) {
2438
+ // If sub steps exist then set the first non disabled sub step per default
2439
+ if (this.activeTabHasSubSteps()) {
2440
+ this._activeStep.activeSubStep = this._activeStep.subSteps.find(function (step) {
2441
+ return step.enabled;
2442
+ });
2443
+ }
2444
+ this._activeStepChange.emit(this._activeStep);
2445
+ }
2446
+ }
2447
+ };
2448
+ FlowbarComponent.prototype.ngAfterViewInit = function () {
2449
+ this.stepper._getIndicatorType = function () { return 'number'; };
2450
+ };
2451
+ FlowbarComponent.prototype.getIndexForActiveStep = function () {
2452
+ var selectedIndex = this._steps.indexOf(this._activeStep);
2453
+ return selectedIndex === -1 ? 0 : selectedIndex;
2454
+ };
2455
+ FlowbarComponent.prototype.changeActiveStep = function (step) {
2456
+ var previousIndex = this._steps.indexOf(this._activeStep);
2457
+ this._activeStep = step;
2458
+ if (this.activeTabHasSubSteps()) {
2459
+ if (previousIndex < this._steps.indexOf(this._activeStep)) {
2460
+ this._activeStep.activeSubStep = this._activeStep.subSteps[0];
2461
+ }
2462
+ else {
2463
+ this._activeStep.activeSubStep = this._activeStep.subSteps[this._activeStep.subSteps.length - 1];
2464
+ }
2465
+ }
2466
+ this._activeStepChange.emit(this._activeStep);
2467
+ };
2468
+ FlowbarComponent.prototype.changeActiveStepOnHeader = function (step) {
2469
+ var stepIndex = this._steps.indexOf(step);
2470
+ this._activeStep = step;
2471
+ this.stepper.selected = this.stepper._steps.find(function (_, i) { return i === stepIndex; });
2472
+ };
2473
+ FlowbarComponent.prototype.changeActiveSubStep = function (subStep) {
2474
+ this._activeStep.activeSubStep = subStep;
2475
+ };
2476
+ FlowbarComponent.prototype.previous = function () {
2477
+ if (this.isPreviousAvailable()) {
2478
+ // If active step has no sub steps or first sub step is selected -> go to previous main step
2479
+ if (!this.activeTabHasSubSteps() || this.isFirstSubStep()) {
2480
+ var previousEnabledStep = this.findPreviousEnabledStep();
2481
+ this.changeActiveStep(previousEnabledStep);
2482
+ this.stepper.selectedIndex = this._steps.indexOf(previousEnabledStep);
2483
+ }
2484
+ else {
2485
+ var subStepIndex = this._activeStep.subSteps.indexOf(this._activeStep.activeSubStep);
2486
+ this._activeStep.activeSubStep = this._activeStep.subSteps[subStepIndex - 1];
2487
+ }
2488
+ }
2489
+ };
2490
+ FlowbarComponent.prototype.next = function () {
2491
+ if (this.isNextAvailable()) {
2492
+ // If active step has no sub steps or last sub step is selected -> go to next main step
2493
+ if (!this.activeTabHasSubSteps() || this.isLastSubStep()) {
2494
+ var nextEnabledStep = this.findNextEnabledStep();
2495
+ this.changeActiveStep(nextEnabledStep);
2496
+ this.stepper.selectedIndex = this._steps.indexOf(nextEnabledStep);
2497
+ }
2498
+ else {
2499
+ var subStepIndex = this._activeStep.subSteps.indexOf(this._activeStep.activeSubStep);
2500
+ this._activeStep.activeSubStep = this._activeStep.subSteps[subStepIndex + 1];
2501
+ }
2502
+ }
2503
+ };
2504
+ FlowbarComponent.prototype.isPreviousAvailable = function () {
2505
+ if (this._activeStep) {
2506
+ if (!this.activeTabHasSubSteps() || this.isFirstSubStep()) {
2507
+ var index = this.getCurrentIndex();
2508
+ return index > 0 && this.isAnyPreviousStepEnabled(index);
2509
+ }
2510
+ else {
2511
+ return true;
2512
+ }
2513
+ }
2514
+ return false;
2515
+ };
2516
+ FlowbarComponent.prototype.isNextAvailable = function () {
2517
+ if (this._activeStep) {
2518
+ if (!this.activeTabHasSubSteps() || this.isLastSubStep()) {
2519
+ var index = this.getCurrentIndex();
2520
+ return index < this._steps.length - 1 && this.isAnyFollowingStepEnabled(index);
2521
+ }
2522
+ else {
2523
+ return true;
2524
+ }
2525
+ }
2526
+ return false;
2527
+ };
2528
+ FlowbarComponent.prototype.isLastStep = function () {
2529
+ if (this.getCurrentIndex() === this._steps.length - 1) {
2530
+ if (this.activeTabHasSubSteps()) {
2531
+ return this.isLastSubStep();
2532
+ }
2533
+ else {
2534
+ return true;
2535
+ }
2536
+ }
2537
+ return false;
2538
+ };
2539
+ FlowbarComponent.prototype.getCurrentIndex = function () {
2540
+ var _this = this;
2541
+ return this._steps.findIndex(function (value) {
2542
+ return value === _this._activeStep;
2543
+ });
2544
+ };
2545
+ FlowbarComponent.prototype.getCurrentSubStepIndex = function () {
2546
+ var _this = this;
2547
+ return this._activeStep.subSteps.findIndex(function (value) {
2548
+ return value === _this._activeStep.activeSubStep;
2549
+ });
2550
+ };
2551
+ FlowbarComponent.prototype.triggerClick = function () {
2552
+ var selectedStep = this._steps[this.stepper.selectedIndex];
2553
+ this.changeActiveStep(selectedStep);
2554
+ };
2555
+ FlowbarComponent.prototype.headerClick = function (event, step) {
2556
+ event.stopPropagation(); //stop processing current header click event
2557
+ this._headerClick.emit(step);
2558
+ };
2559
+ Object.defineProperty(FlowbarComponent.prototype, "currentStepLabel", {
2560
+ get: function () {
2561
+ return this._activeStep.label;
2562
+ },
2563
+ enumerable: false,
2564
+ configurable: true
2565
+ });
2566
+ Object.defineProperty(FlowbarComponent.prototype, "currentSubStepLabel", {
2567
+ get: function () {
2568
+ var _a;
2569
+ return (_a = this._activeStep.activeSubStep) === null || _a === void 0 ? void 0 : _a.label;
2570
+ },
2571
+ enumerable: false,
2572
+ configurable: true
2573
+ });
2574
+ FlowbarComponent.prototype.activeTabHasSubSteps = function () {
2575
+ return this._activeStep.subSteps && this._activeStep.subSteps.length > 0;
2576
+ };
2577
+ FlowbarComponent.prototype.isFirstSubStep = function () {
2578
+ return this._activeStep.activeSubStep === this._activeStep.subSteps[0];
2579
+ };
2580
+ FlowbarComponent.prototype.isLastSubStep = function () {
2581
+ return this._activeStep.activeSubStep === this._activeStep.subSteps[this._activeStep.subSteps.length - 1];
2582
+ };
2583
+ FlowbarComponent.prototype.isAnyPreviousStepEnabled = function (index) {
2584
+ // eslint-disable-next-line id-blacklist
2585
+ return this._steps.slice(0, index).find(function (step) { return step.enabled; }) !== undefined;
2586
+ };
2587
+ FlowbarComponent.prototype.isAnyFollowingStepEnabled = function (index) {
2588
+ // eslint-disable-next-line id-blacklist
2589
+ return this._steps.slice(index + 1, this._steps.length).find(function (step) { return step.enabled; }) !== undefined;
2590
+ };
2591
+ FlowbarComponent.prototype.findPreviousEnabledStep = function () {
2592
+ var index = this.getCurrentIndex();
2593
+ return this._steps
2594
+ .slice(0, index)
2595
+ .reverse()
2596
+ .find(function (step) { return step.enabled; });
2597
+ };
2598
+ FlowbarComponent.prototype.findNextEnabledStep = function () {
2599
+ var index = this.getCurrentIndex();
2600
+ return this._steps.slice(index + 1, this._steps.length).find(function (step) { return step.enabled; });
2601
+ };
2602
+ return FlowbarComponent;
2603
+ }());
2604
+ FlowbarComponent.decorators = [
2605
+ { type: i0.Component, args: [{
2606
+ selector: 'mad-flowbar',
2607
+ template: "<div class=\"stepper-container\">\n <mat-horizontal-stepper #stepper [selectedIndex]=\"this.getIndexForActiveStep()\" (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",
2608
+ 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;right:0;top:0;width:100%}"]
2609
+ },] }
2610
+ ];
2611
+ FlowbarComponent.propDecorators = {
2612
+ stepper: [{ type: i0.ViewChild, args: ['stepper',] }],
2613
+ _steps: [{ type: i0.Input, args: ['steps',] }],
2614
+ _activeStep: [{ type: i0.Input, args: ['activeStep',] }],
2615
+ _activeStepChange: [{ type: i0.Output, args: ['activeStepChange',] }],
2616
+ _headerClick: [{ type: i0.Output, args: ['headerClick',] }]
2617
+ };
2618
+
2619
+ var FlowbarModule = /** @class */ (function () {
2620
+ function FlowbarModule() {
2621
+ }
2622
+ return FlowbarModule;
2623
+ }());
2624
+ FlowbarModule.decorators = [
2625
+ { type: i0.NgModule, args: [{
2626
+ declarations: [FlowbarComponent],
2627
+ imports: [common.CommonModule, stepper$1.MatStepperModule],
2628
+ exports: [FlowbarComponent],
2629
+ },] }
2630
+ ];
2631
+
2175
2632
  var MaterialAddonsModule = /** @class */ (function () {
2176
2633
  function MaterialAddonsModule() {
2177
2634
  }
@@ -2202,6 +2659,15 @@
2202
2659
 
2203
2660
  exports.ButtonModule = ButtonModule;
2204
2661
  exports.CardModule = CardModule;
2662
+ exports.ContentHeaderComponent = ContentHeaderComponent;
2663
+ exports.ContentPanelContainerComponent = ContentPanelContainerComponent;
2664
+ exports.ContentPanelContainerContentComponent = ContentPanelContainerContentComponent;
2665
+ exports.ContentPanelContainerFooterComponent = ContentPanelContainerFooterComponent;
2666
+ exports.ContentPanelModule = ContentPanelModule;
2667
+ exports.DataTableModule = DataTableModule;
2668
+ exports.FlowbarComponent = FlowbarComponent;
2669
+ exports.FlowbarModule = FlowbarModule;
2670
+ exports.MainContainerComponent = MainContainerComponent;
2205
2671
  exports.MaterialActionButtonComponent = MaterialActionButtonComponent;
2206
2672
  exports.MaterialActionButtonModule = MaterialActionButtonModule;
2207
2673
  exports.MaterialAddonsModule = MaterialAddonsModule;
@@ -2234,6 +2700,7 @@
2234
2700
  exports.ɵj = BaseQuickListComponent;
2235
2701
  exports.ɵk = QuickListCompactComponent;
2236
2702
  exports.ɵl = TableComponent;
2703
+ exports.ɵm = DataTableComponent;
2237
2704
 
2238
2705
  Object.defineProperty(exports, '__esModule', { value: true });
2239
2706