@porscheinformatik/material-addons 10.1.9 → 10.2.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.
Files changed (61) hide show
  1. package/bundles/porscheinformatik-material-addons.umd.js +856 -52
  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/card/card.component.js +19 -5
  6. package/esm2015/lib/content-panel/content-header/content-header.component.js +15 -0
  7. package/esm2015/lib/content-panel/content-panel-container/content-panel-container.component.js +15 -0
  8. package/esm2015/lib/content-panel/content-panel-container-content/content-panel-container-content.component.js +15 -0
  9. package/esm2015/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.js +15 -0
  10. package/esm2015/lib/content-panel/content-panel.module.js +29 -0
  11. package/esm2015/lib/content-panel/main-container/main-container.component.js +15 -0
  12. package/esm2015/lib/data-table/data-table-action.js +1 -0
  13. package/esm2015/lib/data-table/data-table-column-header.js +1 -0
  14. package/esm2015/lib/data-table/data-table.component.js +103 -0
  15. package/esm2015/lib/data-table/data-table.js +1 -0
  16. package/esm2015/lib/data-table/data-table.module.js +33 -0
  17. package/esm2015/lib/flowbar/flowbar.component.js +186 -0
  18. package/esm2015/lib/flowbar/flowbar.module.js +14 -0
  19. package/esm2015/lib/material-addons.module.js +3 -3
  20. package/esm2015/lib/numeric-field/numeric-field.directive.js +4 -2
  21. package/esm2015/lib/quick-list/base-quick-list.component.js +89 -0
  22. package/esm2015/lib/quick-list/quick-list-compact/quick-list-compact.component.js +18 -0
  23. package/esm2015/lib/quick-list/quick-list.component.js +6 -77
  24. package/esm2015/lib/quick-list/quick-list.module.js +6 -4
  25. package/esm2015/lib/stepper/mad-stepper-animation.js +13 -0
  26. package/esm2015/lib/stepper/step-header/step-header.component.js +75 -0
  27. package/esm2015/lib/stepper/stepper.component.js +167 -0
  28. package/esm2015/lib/stepper/stepper.module.js +18 -0
  29. package/esm2015/lib/table/table.component.js +1 -1
  30. package/esm2015/lib/table/table.module.js +3 -3
  31. package/esm2015/porscheinformatik-material-addons.js +5 -2
  32. package/esm2015/public-api.js +15 -1
  33. package/fesm2015/porscheinformatik-material-addons.js +737 -25
  34. package/fesm2015/porscheinformatik-material-addons.js.map +1 -1
  35. package/lib/card/card.component.d.ts +4 -0
  36. package/lib/content-panel/content-header/content-header.component.d.ts +5 -0
  37. package/lib/content-panel/content-panel-container/content-panel-container.component.d.ts +5 -0
  38. package/lib/content-panel/content-panel-container-content/content-panel-container-content.component.d.ts +5 -0
  39. package/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.d.ts +5 -0
  40. package/lib/content-panel/content-panel.module.d.ts +2 -0
  41. package/lib/content-panel/main-container/main-container.component.d.ts +5 -0
  42. package/lib/data-table/data-table-action.d.ts +5 -0
  43. package/lib/data-table/data-table-column-header.d.ts +6 -0
  44. package/lib/data-table/data-table.component.d.ts +39 -0
  45. package/lib/data-table/data-table.d.ts +2 -0
  46. package/lib/data-table/data-table.module.d.ts +2 -0
  47. package/lib/flowbar/flowbar.component.d.ts +42 -0
  48. package/lib/flowbar/flowbar.module.d.ts +2 -0
  49. package/lib/quick-list/base-quick-list.component.d.ts +29 -0
  50. package/lib/quick-list/quick-list-compact/quick-list-compact.component.d.ts +6 -0
  51. package/lib/quick-list/quick-list.component.d.ts +4 -27
  52. package/lib/stepper/mad-stepper-animation.d.ts +7 -0
  53. package/lib/stepper/step-header/step-header.component.d.ts +23 -0
  54. package/lib/stepper/stepper.component.d.ts +47 -0
  55. package/lib/stepper/stepper.module.d.ts +2 -0
  56. package/package.json +6 -6
  57. package/porscheinformatik-material-addons.d.ts +4 -1
  58. package/porscheinformatik-material-addons.metadata.json +1 -1
  59. package/public-api.d.ts +14 -0
  60. package/themes/common/styles.scss +2 -2
  61. 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')) :
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'], 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));
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) { '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() {
@@ -61,11 +61,13 @@
61
61
  extendStatics = Object.setPrototypeOf ||
62
62
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
63
63
  function (d, b) { for (var p in b)
64
- if (b.hasOwnProperty(p))
64
+ if (Object.prototype.hasOwnProperty.call(b, p))
65
65
  d[p] = b[p]; };
66
66
  return extendStatics(d, b);
67
67
  };
68
68
  function __extends(d, b) {
69
+ if (typeof b !== "function" && b !== null)
70
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
69
71
  extendStatics(d, b);
70
72
  function __() { this.constructor = d; }
71
73
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -208,10 +210,10 @@
208
210
  k2 = k;
209
211
  o[k2] = m[k];
210
212
  });
211
- function __exportStar(m, exports) {
213
+ function __exportStar(m, o) {
212
214
  for (var p in m)
213
- if (p !== "default" && !exports.hasOwnProperty(p))
214
- __createBinding(exports, m, p);
215
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
216
+ __createBinding(o, m, p);
215
217
  }
216
218
  function __values(o) {
217
219
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
@@ -251,11 +253,13 @@
251
253
  }
252
254
  return ar;
253
255
  }
256
+ /** @deprecated */
254
257
  function __spread() {
255
258
  for (var ar = [], i = 0; i < arguments.length; i++)
256
259
  ar = ar.concat(__read(arguments[i]));
257
260
  return ar;
258
261
  }
262
+ /** @deprecated */
259
263
  function __spreadArrays() {
260
264
  for (var s = 0, i = 0, il = arguments.length; i < il; i++)
261
265
  s += arguments[i].length;
@@ -264,7 +268,17 @@
264
268
  r[k] = a[j];
265
269
  return r;
266
270
  }
267
- ;
271
+ function __spreadArray(to, from, pack) {
272
+ if (pack || arguments.length === 2)
273
+ for (var i = 0, l = from.length, ar; i < l; i++) {
274
+ if (ar || !(i in from)) {
275
+ if (!ar)
276
+ ar = Array.prototype.slice.call(from, 0, i);
277
+ ar[i] = from[i];
278
+ }
279
+ }
280
+ return to.concat(ar || Array.prototype.slice.call(from));
281
+ }
268
282
  function __await(v) {
269
283
  return this instanceof __await ? (this.v = v, this) : new __await(v);
270
284
  }
@@ -321,7 +335,7 @@
321
335
  var result = {};
322
336
  if (mod != null)
323
337
  for (var k in mod)
324
- if (Object.hasOwnProperty.call(mod, k))
338
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
325
339
  __createBinding(result, mod, k);
326
340
  __setModuleDefault(result, mod);
327
341
  return result;
@@ -329,18 +343,21 @@
329
343
  function __importDefault(mod) {
330
344
  return (mod && mod.__esModule) ? mod : { default: mod };
331
345
  }
332
- function __classPrivateFieldGet(receiver, privateMap) {
333
- if (!privateMap.has(receiver)) {
334
- throw new TypeError("attempted to get private field on non-instance");
335
- }
336
- return privateMap.get(receiver);
346
+ function __classPrivateFieldGet(receiver, state, kind, f) {
347
+ if (kind === "a" && !f)
348
+ throw new TypeError("Private accessor was defined without a getter");
349
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
350
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
351
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
337
352
  }
338
- function __classPrivateFieldSet(receiver, privateMap, value) {
339
- if (!privateMap.has(receiver)) {
340
- throw new TypeError("attempted to set private field on non-instance");
341
- }
342
- privateMap.set(receiver, value);
343
- return value;
353
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
354
+ if (kind === "m")
355
+ throw new TypeError("Private method is not writable");
356
+ if (kind === "a" && !f)
357
+ throw new TypeError("Private accessor was defined without a setter");
358
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
359
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
360
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
344
361
  }
345
362
 
346
363
  var MadBasicButton = /** @class */ (function () {
@@ -1205,7 +1222,9 @@
1205
1222
  set: function (value) {
1206
1223
  if (this._numericValue !== value && !(isNaN(this._numericValue) && (isNaN(value) || value === null))) {
1207
1224
  this.originalValue = value;
1208
- this._numericValue = this.roundOrTruncate(value);
1225
+ // Don't roundOrTruncate if value was set to empty otherwise input value will be set to 0 instead of empty
1226
+ // which happens when an input is being reset
1227
+ this._numericValue = value === null || value === undefined ? value : this.roundOrTruncate(value); // eslint-disable-line
1209
1228
  this.handleInputChanged();
1210
1229
  }
1211
1230
  },
@@ -1478,9 +1497,11 @@
1478
1497
  this.saveDisabled = false;
1479
1498
  this.saveText = 'NOT SET';
1480
1499
  this.editMode = false;
1500
+ this.additionalActionText = '';
1481
1501
  this.edit = new i0.EventEmitter();
1482
1502
  this.cancel = new i0.EventEmitter();
1483
1503
  this.save = new i0.EventEmitter();
1504
+ this.additionalAction = new i0.EventEmitter();
1484
1505
  }
1485
1506
  CardComponent.prototype.onCancel = function () {
1486
1507
  this.cancel.emit(undefined);
@@ -1495,16 +1516,25 @@
1495
1516
  CardComponent.prototype.toggleCollapse = function () {
1496
1517
  this.expanded = !this.expanded;
1497
1518
  };
1519
+ CardComponent.prototype.additionalActionClicked = function () {
1520
+ this.additionalAction.emit(undefined);
1521
+ };
1498
1522
  return CardComponent;
1499
1523
  }());
1500
1524
  CardComponent.decorators = [
1501
1525
  { type: i0.Component, args: [{
1502
1526
  selector: 'mad-card',
1503
- template: "<mat-card>\n <mat-card-header>\n <mat-card-title>\n {{ title }}\n <mad-icon-button (click)=\"toggleCollapse()\" *ngIf=\"expandable && !editMode\">\n <mat-icon [@rotateIcon]=\"!expanded\">keyboard_arrow_down</mat-icon>\n </mad-icon-button>\n </mat-card-title>\n <mad-icon-button [title]=\"editText\" (click)=\"onEdit()\" *ngIf=\"!readonly && !editMode\">\n <mat-icon>create</mat-icon>\n </mad-icon-button>\n </mat-card-header>\n <mat-card-content [@collapseExpandAnimation] *ngIf=\"expanded\">\n <ng-content></ng-content>\n </mat-card-content>\n <mat-card-actions *ngIf=\"!readonly && editMode\">\n <mad-primary-button [title]=\"saveText\" [disabled]=\"saveDisabled\" (throttleClick)=\"onSave()\" madThrottleClick>\n {{ saveText }}\n </mad-primary-button>\n <mad-outline-button [title]=\"cancelText\" [disabled]=\"cancelDisabled\" (click)=\"onCancel()\">\n {{ cancelText }}\n </mad-outline-button>\n </mat-card-actions>\n</mat-card>\n",
1527
+ template: "<mat-card>\n <mat-card-header>\n <mat-card-title>\n {{ title }}\n <mad-icon-button (click)=\"toggleCollapse()\" *ngIf=\"expandable && !editMode\">\n <mat-icon [@rotateIcon]=\"!expanded\">keyboard_arrow_down</mat-icon>\n </mad-icon-button>\n </mat-card-title>\n <span>\n <mad-icon-button (click)=\"additionalActionClicked()\" *ngIf=\"additionalActionIcon\" [title]=\"additionalActionText\" type=\"button\">\n <mat-icon>{{additionalActionIcon}}</mat-icon>\n </mad-icon-button>\n <mad-icon-button [title]=\"editText\" (click)=\"onEdit()\" *ngIf=\"!readonly && !editMode\">\n <mat-icon>create</mat-icon>\n </mad-icon-button>\n </span>\n </mat-card-header>\n <mat-card-content [@collapseExpandAnimation] *ngIf=\"expanded\">\n <ng-content></ng-content>\n </mat-card-content>\n <mat-card-actions *ngIf=\"!readonly && editMode\">\n <mad-primary-button [title]=\"saveText\" [disabled]=\"saveDisabled\" (throttleClick)=\"onSave()\" madThrottleClick>\n {{ saveText }}\n </mad-primary-button>\n <mad-outline-button [title]=\"cancelText\" [disabled]=\"cancelDisabled\" (click)=\"onCancel()\">\n {{ cancelText }}\n </mad-outline-button>\n </mat-card-actions>\n</mat-card>\n",
1504
1528
  animations: [
1505
1529
  animations.trigger('collapseExpandAnimation', [
1506
- animations.transition(':enter', [animations.style({ opacity: 0, height: 0, overflow: 'hidden' }), animations.animate('100ms', animations.style({ opacity: 1, height: '*' }))]),
1507
- animations.transition(':leave', [animations.style({ opacity: 1, height: '*', overflow: 'hidden' }), animations.animate('100ms', animations.style({ opacity: 0, height: 0 }))]),
1530
+ animations.transition(':enter', [animations.style({ opacity: 0, height: 0, overflow: 'hidden' }), animations.animate('100ms', animations.style({
1531
+ opacity: 1,
1532
+ height: '*'
1533
+ }))]),
1534
+ animations.transition(':leave', [animations.style({ opacity: 1, height: '*', overflow: 'hidden' }), animations.animate('100ms', animations.style({
1535
+ opacity: 0,
1536
+ height: 0
1537
+ }))]),
1508
1538
  ]),
1509
1539
  animations.trigger('rotateIcon', [
1510
1540
  animations.state('true', animations.style({ transform: 'rotate(0)' })),
@@ -1527,9 +1557,12 @@
1527
1557
  saveText: [{ type: i0.Input }],
1528
1558
  title: [{ type: i0.Input }],
1529
1559
  editMode: [{ type: i0.Input }],
1560
+ additionalActionIcon: [{ type: i0.Input }],
1561
+ additionalActionText: [{ type: i0.Input }],
1530
1562
  edit: [{ type: i0.Output }],
1531
1563
  cancel: [{ type: i0.Output }],
1532
- save: [{ type: i0.Output }]
1564
+ save: [{ type: i0.Output }],
1565
+ additionalAction: [{ type: i0.Output }]
1533
1566
  };
1534
1567
 
1535
1568
  var ThrottleClickDirective = /** @class */ (function () {
@@ -1590,9 +1623,8 @@
1590
1623
  },] }
1591
1624
  ];
1592
1625
 
1593
- // Based on https://github.com/porscheinformatik/clarity-addons/blob/master/src/clr-addons/generic-quick-list/generic-quick-list.ts
1594
- var QuickListComponent = /** @class */ (function () {
1595
- function QuickListComponent(changeDetectorRef) {
1626
+ var BaseQuickListComponent = /** @class */ (function () {
1627
+ function BaseQuickListComponent(changeDetectorRef) {
1596
1628
  this.changeDetectorRef = changeDetectorRef;
1597
1629
  this.allItems = [];
1598
1630
  this.addLabel = 'NOT SET';
@@ -1601,31 +1633,31 @@
1601
1633
  this.added = new i0.EventEmitter();
1602
1634
  this.removed = new i0.EventEmitter();
1603
1635
  }
1604
- QuickListComponent.prototype.ngOnInit = function () {
1636
+ BaseQuickListComponent.prototype.ngOnInit = function () {
1605
1637
  this.addEventFunction = this.addItem.bind(this);
1606
- if (typeof this.minItems !== 'undefined') {
1638
+ if (this.minItems) {
1607
1639
  for (var n = this.allItems.length; n < this.minItems; n++) {
1608
1640
  this.interalAddItem();
1609
1641
  }
1610
1642
  }
1611
1643
  };
1612
- QuickListComponent.prototype.ngAfterViewInit = function () {
1644
+ BaseQuickListComponent.prototype.ngAfterViewInit = function () {
1613
1645
  var _this = this;
1614
1646
  setTimeout(function () { return _this.setFocusOnAdd(); }, 1);
1615
1647
  };
1616
- QuickListComponent.prototype.addItem = function () {
1648
+ BaseQuickListComponent.prototype.addItem = function () {
1617
1649
  var newItem = this.interalAddItem();
1618
1650
  if (!!newItem) {
1619
1651
  this.added.emit(newItem);
1620
1652
  }
1621
1653
  };
1622
- QuickListComponent.prototype.removeItem = function (item) {
1654
+ BaseQuickListComponent.prototype.removeItem = function (item) {
1623
1655
  if (this.isDeleteAllowed()) {
1624
1656
  this.allItems.splice(this.allItems.indexOf(item), 1);
1625
1657
  this.removed.emit(item);
1626
1658
  }
1627
1659
  };
1628
- QuickListComponent.prototype.setFocusOnAdd = function () {
1660
+ BaseQuickListComponent.prototype.setFocusOnAdd = function () {
1629
1661
  var _this = this;
1630
1662
  this.rowCountFocus = this.itemRows.length;
1631
1663
  this.itemRows.changes.subscribe(function (els) {
@@ -1638,13 +1670,13 @@
1638
1670
  _this.rowCountFocus = els.length;
1639
1671
  });
1640
1672
  };
1641
- QuickListComponent.prototype.isAddAllowed = function () {
1642
- return typeof this.maxItems === 'undefined' || this.allItems.length < this.maxItems;
1673
+ BaseQuickListComponent.prototype.isAddAllowed = function () {
1674
+ return this.addPossible && (!this.maxItems || this.allItems.length < this.maxItems);
1643
1675
  };
1644
- QuickListComponent.prototype.isDeleteAllowed = function () {
1645
- return typeof this.minItems === 'undefined' || this.allItems.length > this.minItems;
1676
+ BaseQuickListComponent.prototype.isDeleteAllowed = function () {
1677
+ return !this.minItems || this.allItems.length > this.minItems;
1646
1678
  };
1647
- QuickListComponent.prototype.interalAddItem = function () {
1679
+ BaseQuickListComponent.prototype.interalAddItem = function () {
1648
1680
  if (this.isAddAllowed()) {
1649
1681
  var newItem = Object.assign({}, this.blankItem);
1650
1682
  // creates ids in the form of "n5kdz1pljl8"
@@ -1657,18 +1689,18 @@
1657
1689
  }
1658
1690
  return null;
1659
1691
  };
1660
- return QuickListComponent;
1692
+ return BaseQuickListComponent;
1661
1693
  }());
1662
- QuickListComponent.decorators = [
1694
+ BaseQuickListComponent.decorators = [
1663
1695
  { type: i0.Component, args: [{
1664
- selector: 'mad-quick-list',
1665
- template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n<ng-container *ngFor=\"let item of allItems\">\n <div *ngIf=\"itemTemplate\" #row>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n <mad-icon-button *ngIf=\"!(readonly || readonly === '')\" [disabled]=\"!isDeleteAllowed()\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n </div>\n</ng-container>\n<mad-link-button *ngIf=\"!(readonly || readonly === '')\" (click)=\"addItem()\"\n [disabled]=\"!addPossible || !isAddAllowed()\">\n {{ addLabel }}\n</mad-link-button>\n"
1696
+ selector: 'mad-base-quick-list',
1697
+ template: ''
1666
1698
  },] }
1667
1699
  ];
1668
- QuickListComponent.ctorParameters = function () { return [
1700
+ BaseQuickListComponent.ctorParameters = function () { return [
1669
1701
  { type: i0.ChangeDetectorRef }
1670
1702
  ]; };
1671
- QuickListComponent.propDecorators = {
1703
+ BaseQuickListComponent.propDecorators = {
1672
1704
  allItems: [{ type: i0.Input }],
1673
1705
  addLabel: [{ type: i0.Input }],
1674
1706
  addPossible: [{ type: i0.Input }],
@@ -1682,6 +1714,44 @@
1682
1714
  itemRows: [{ type: i0.ViewChildren, args: ['row',] }]
1683
1715
  };
1684
1716
 
1717
+ var QuickListComponent = /** @class */ (function (_super) {
1718
+ __extends(QuickListComponent, _super);
1719
+ function QuickListComponent(changeDetectorRef) {
1720
+ var _this = _super.call(this, changeDetectorRef) || this;
1721
+ _this.changeDetectorRef = changeDetectorRef;
1722
+ return _this;
1723
+ }
1724
+ return QuickListComponent;
1725
+ }(BaseQuickListComponent));
1726
+ QuickListComponent.decorators = [
1727
+ { type: i0.Component, args: [{
1728
+ selector: 'mad-quick-list',
1729
+ template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n<ng-container *ngFor=\"let item of allItems\">\n <div *ngIf=\"itemTemplate\" #row>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n <mad-icon-button *ngIf=\"!readonly && isDeleteAllowed()\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n </div>\n</ng-container>\n<mad-link-button *ngIf=\"!readonly\" (click)=\"addItem()\"\n [disabled]=\"!addPossible || !isAddAllowed()\">\n {{ addLabel }}\n</mad-link-button>\n"
1730
+ },] }
1731
+ ];
1732
+ QuickListComponent.ctorParameters = function () { return [
1733
+ { type: i0.ChangeDetectorRef }
1734
+ ]; };
1735
+
1736
+ var QuickListCompactComponent = /** @class */ (function (_super) {
1737
+ __extends(QuickListCompactComponent, _super);
1738
+ function QuickListCompactComponent(changeDetectorRef) {
1739
+ var _this = _super.call(this, changeDetectorRef) || this;
1740
+ _this.changeDetectorRef = changeDetectorRef;
1741
+ return _this;
1742
+ }
1743
+ return QuickListCompactComponent;
1744
+ }(BaseQuickListComponent));
1745
+ QuickListCompactComponent.decorators = [
1746
+ { type: i0.Component, args: [{
1747
+ selector: 'mad-quick-list-compact',
1748
+ template: "<h3>\n <ng-content select=\"label\"></ng-content>\n</h3>\n<ng-container *ngFor=\"let item of allItems; let isLast = last;\">\n <div class=\"flex-container\" *ngIf=\"itemTemplate\" #row>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: { $implicit: item }\"></ng-container>\n <mad-icon-button *ngIf=\"!readonly && isDeleteAllowed()\" (click)=\"removeItem(item)\">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n <mad-icon-button *ngIf=\"!readonly && isLast\" [disabled]=\"!isAddAllowed()\" (click)=\"addItem()\">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n </div>\n</ng-container>\n<mad-link-button *ngIf=\"!readonly && !this.allItems.length\"\n (click)=\"addItem()\"\n [disabled]=\"!isAddAllowed()\">\n {{ addLabel }}\n</mad-link-button>\n"
1749
+ },] }
1750
+ ];
1751
+ QuickListCompactComponent.ctorParameters = function () { return [
1752
+ { type: i0.ChangeDetectorRef }
1753
+ ]; };
1754
+
1685
1755
  var QuickListModule = /** @class */ (function () {
1686
1756
  function QuickListModule() {
1687
1757
  }
@@ -1689,9 +1759,9 @@
1689
1759
  }());
1690
1760
  QuickListModule.decorators = [
1691
1761
  { type: i0.NgModule, args: [{
1692
- declarations: [QuickListComponent],
1762
+ declarations: [QuickListComponent, BaseQuickListComponent, QuickListCompactComponent],
1693
1763
  imports: [common.CommonModule, button.MatButtonModule, icon.MatIconModule, ButtonModule],
1694
- exports: [QuickListComponent],
1764
+ exports: [QuickListComponent, QuickListCompactComponent, BaseQuickListComponent],
1695
1765
  },] }
1696
1766
  ];
1697
1767
 
@@ -1829,12 +1899,729 @@
1829
1899
  paginator.MatPaginatorModule,
1830
1900
  sort.MatSortModule,
1831
1901
  table.MatTableModule,
1832
- ButtonModule
1902
+ ButtonModule,
1833
1903
  ],
1834
1904
  exports: [TableComponent],
1835
1905
  },] }
1836
1906
  ];
1837
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
+
2045
+ var StepHeaderComponent = /** @class */ (function (_super) {
2046
+ __extends(StepHeaderComponent, _super);
2047
+ function StepHeaderComponent(_focusMonitor, _elementRef) {
2048
+ var _this = _super.call(this, _elementRef) || this;
2049
+ _this._focusMonitor = _focusMonitor;
2050
+ return _this;
2051
+ }
2052
+ StepHeaderComponent.prototype.ngAfterViewInit = function () {
2053
+ this._focusMonitor.monitor(this._elementRef, true);
2054
+ };
2055
+ StepHeaderComponent.prototype.ngOnDestroy = function () {
2056
+ this._focusMonitor.stopMonitoring(this._elementRef);
2057
+ };
2058
+ /** Focuses the step header. */
2059
+ StepHeaderComponent.prototype.focus = function (origin, options) {
2060
+ if (origin) {
2061
+ this._focusMonitor.focusVia(this._elementRef, origin, options);
2062
+ }
2063
+ else {
2064
+ this._elementRef.nativeElement.focus(options);
2065
+ }
2066
+ };
2067
+ StepHeaderComponent.prototype.getCssForState = function () {
2068
+ if (this.state === stepper.STEP_STATE.NUMBER && !this.completed && !this.hasError) {
2069
+ return 'step-state-neutral'; //initiale state is 'number'
2070
+ }
2071
+ else if (this.completed) {
2072
+ return 'step-state-complete';
2073
+ }
2074
+ else if (this.hasError) {
2075
+ return 'step-state-error';
2076
+ }
2077
+ };
2078
+ StepHeaderComponent.prototype.getIcon = function () {
2079
+ if (this.completed) {
2080
+ return 'check_circle_outline';
2081
+ }
2082
+ else if (this.hasError) {
2083
+ return 'error_outline';
2084
+ }
2085
+ return '';
2086
+ };
2087
+ return StepHeaderComponent;
2088
+ }(stepper.CdkStepHeader));
2089
+ StepHeaderComponent.decorators = [
2090
+ { type: i0.Component, args: [{
2091
+ selector: 'mad-step-header',
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",
2093
+ inputs: ['color'],
2094
+ host: {
2095
+ 'class': 'mad-step-header',
2096
+ 'role': 'tab',
2097
+ },
2098
+ encapsulation: i0.ViewEncapsulation.None,
2099
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
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)}"]
2101
+ },] }
2102
+ ];
2103
+ StepHeaderComponent.ctorParameters = function () { return [
2104
+ { type: a11y.FocusMonitor },
2105
+ { type: i0.ElementRef }
2106
+ ]; };
2107
+ StepHeaderComponent.propDecorators = {
2108
+ index: [{ type: i0.Input }],
2109
+ label: [{ type: i0.Input }],
2110
+ state: [{ type: i0.Input }],
2111
+ errorMessage: [{ type: i0.Input }],
2112
+ selected: [{ type: i0.Input }],
2113
+ active: [{ type: i0.Input }],
2114
+ optional: [{ type: i0.Input }],
2115
+ hasError: [{ type: i0.Input }],
2116
+ completed: [{ type: i0.Input }],
2117
+ closed: [{ type: i0.Input }]
2118
+ };
2119
+
2120
+ /**
2121
+ * Animations used by the MAD stepper.
2122
+ */
2123
+ var madStepperAnimations = {
2124
+ verticalStepTransition: animations.trigger('stepTransition', [
2125
+ animations.state('previous', animations.style({ height: '0px', visibility: 'hidden' })),
2126
+ animations.state('next', animations.style({ height: '0px', visibility: 'hidden' })),
2127
+ animations.state('current', animations.style({ height: '*', visibility: 'visible' })),
2128
+ animations.transition('* <=> current', animations.animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
2129
+ ]),
2130
+ };
2131
+
2132
+ var StepComponent = /** @class */ (function (_super) {
2133
+ __extends(StepComponent, _super);
2134
+ function StepComponent(stepper, _viewContainerRef) {
2135
+ var _this = _super.call(this, stepper) || this;
2136
+ _this.stepper = stepper;
2137
+ _this._viewContainerRef = _viewContainerRef;
2138
+ /** Action event for the next button. If not set the StepComponent will handle the step navigation */
2139
+ _this.onNext = new i0.EventEmitter();
2140
+ /** Action event for the done button. If not set the StepComponent will handle the step navigation */
2141
+ _this.onDone = new i0.EventEmitter();
2142
+ /*** Action event when the header is clicked. If not set the StepComponent will handle the step navigation*/
2143
+ _this.onHeaderClick = new i0.EventEmitter();
2144
+ _this.stepClosed = false;
2145
+ _this._isSelected = rxjs.Subscription.EMPTY;
2146
+ return _this;
2147
+ }
2148
+ StepComponent.prototype.ngAfterContentInit = function () {
2149
+ var _this = this;
2150
+ this._isSelected = this._stepper.steps.changes
2151
+ .pipe(operators.switchMap(function () { return _this._stepper.selectionChange.pipe(operators.map(function (event) { return event.selectedStep === _this; }), operators.tap(function () { return (_this.stepClosed = false); }), operators.startWith(_this._stepper.selected === _this)); }))
2152
+ .subscribe();
2153
+ };
2154
+ StepComponent.prototype.ngOnDestroy = function () {
2155
+ this._isSelected.unsubscribe();
2156
+ };
2157
+ StepComponent.prototype.next = function () {
2158
+ this.stepValidation();
2159
+ if (this.onNext.observers.length <= 0) {
2160
+ this.stepper.next();
2161
+ }
2162
+ this.onNext.emit();
2163
+ };
2164
+ StepComponent.prototype.selectAndMarkAsTouched = function (index) {
2165
+ var _a, _b;
2166
+ //Mark current selected step as touched before selecting to display errors in the from
2167
+ (_b = (_a = this._stepper.selected) === null || _a === void 0 ? void 0 : _a.stepControl) === null || _b === void 0 ? void 0 : _b.markAllAsTouched();
2168
+ this.stepClosed = false;
2169
+ if (this.onHeaderClick.observers.length <= 0) {
2170
+ this.select();
2171
+ }
2172
+ this.onHeaderClick.emit(index);
2173
+ };
2174
+ StepComponent.prototype.completeLast = function () {
2175
+ this.stepValidation();
2176
+ this.stepClosed = true;
2177
+ if (this.onDone.observers.length <= 0) {
2178
+ this.stepper.next();
2179
+ }
2180
+ this.onDone.emit();
2181
+ };
2182
+ StepComponent.prototype.resetValidations = function () {
2183
+ this.hasError = false;
2184
+ this.completed = true;
2185
+ this.state = stepper.STEP_STATE.DONE;
2186
+ };
2187
+ StepComponent.prototype.stepValidation = function () {
2188
+ var _a, _b;
2189
+ (_a = this.stepControl) === null || _a === void 0 ? void 0 : _a.markAllAsTouched();
2190
+ if ((_b = this.stepControl) === null || _b === void 0 ? void 0 : _b.valid) {
2191
+ this.hasError = false;
2192
+ this.completed = true;
2193
+ this.state = stepper.STEP_STATE.DONE;
2194
+ }
2195
+ else {
2196
+ this.completed = false;
2197
+ this.hasError = true;
2198
+ this.state = stepper.STEP_STATE.ERROR;
2199
+ }
2200
+ };
2201
+ return StepComponent;
2202
+ }(stepper.CdkStep));
2203
+ StepComponent.decorators = [
2204
+ { type: i0.Component, args: [{
2205
+ selector: 'mad-step',
2206
+ template: "<ng-template let-last=\"last\" let-nextBtnLbl=\"nextBtnLbl\" let-doneBtnLbl=\"doneBtnLbl\">\n <div class=\"step-container\" fxLayout=\"column\">\n <div class=\"step-content\">\n <ng-content></ng-content>\n </div>\n <div class=\"step-buttons\">\n <div *ngIf=\"!last\">\n <button mat-stroked-button color=\"primary\" (click)=\"next()\">{{nextBtnLbl}}</button>\n </div>\n <div *ngIf=\"last\">\n <button mat-stroked-button color=\"primary\" (click)=\"completeLast()\">{{doneBtnLbl}}</button>\n </div>\n </div>\n </div>\n</ng-template>\n",
2207
+ providers: [{ provide: stepper.CdkStep, useExisting: StepComponent }],
2208
+ encapsulation: i0.ViewEncapsulation.None,
2209
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2210
+ styles: [".stepper-vertical{display:block}.mat-vertical-stepper-header{align-items:center;border:none!important;display:flex;height:10px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}.vertical-content-container{border:none}[dir=rtl] .vertical-content-container{margin-left:0;margin-right:36px}.vertical-stepper-content{outline:0;overflow:hidden}.vertical-content{padding:0 24px}.step-container{border-bottom:1px solid #d3d3d3;border-left:1px solid #d3d3d3;border-right:1px solid #d3d3d3}.step-buttons,.step-content{padding:2em}"]
2211
+ },] }
2212
+ ];
2213
+ StepComponent.ctorParameters = function () { return [
2214
+ { type: StepperComponent, decorators: [{ type: i0.Inject, args: [i0.forwardRef(function () { return StepperComponent; }),] }] },
2215
+ { type: i0.ViewContainerRef }
2216
+ ]; };
2217
+ StepComponent.propDecorators = {
2218
+ onNext: [{ type: i0.Output }],
2219
+ onDone: [{ type: i0.Output }],
2220
+ onHeaderClick: [{ type: i0.Output }]
2221
+ };
2222
+ var StepperComponent = /** @class */ (function (_super) {
2223
+ __extends(StepperComponent, _super);
2224
+ function StepperComponent(dir, changeDetectorRef, elementRef, _document) {
2225
+ var _this = _super.call(this, dir, changeDetectorRef, elementRef, _document) || this;
2226
+ /** Event emitted when the current step is done transitioning in. */
2227
+ _this.animationDone = new i0.EventEmitter();
2228
+ /** Steps that belong to the current stepper, excluding ones from nested steppers. */
2229
+ _this.steps = new i0.QueryList();
2230
+ _this._animationDone = new rxjs.Subject();
2231
+ _this._orientation = 'vertical';
2232
+ return _this;
2233
+ }
2234
+ StepperComponent.prototype.ngOnInit = function () {
2235
+ // Only linear stepper implementation is supported
2236
+ _super.prototype.linear = true;
2237
+ };
2238
+ StepperComponent.prototype.ngAfterContentInit = function () {
2239
+ var _this = this;
2240
+ _super.prototype.ngAfterContentInit.call(this);
2241
+ this.steps.changes.pipe(operators.takeUntil(this._destroyed)).subscribe(function () {
2242
+ _this._stateChanged();
2243
+ });
2244
+ this._animationDone
2245
+ .pipe(operators.distinctUntilChanged(function (x, y) { return x.fromState === y.fromState && x.toState === y.toState; }), operators.takeUntil(this._destroyed))
2246
+ .subscribe(function (event) {
2247
+ if (event.toState === 'current') {
2248
+ _this.animationDone.emit();
2249
+ }
2250
+ });
2251
+ };
2252
+ /**
2253
+ * Method patched to enable the closing of the last step.
2254
+ */
2255
+ StepperComponent.prototype._getAnimationDirection = function (index) {
2256
+ var _a, _b;
2257
+ var closeLastStep = this.selectedIndex === this.steps.length - 1 && ((_a = this._steps.last) === null || _a === void 0 ? void 0 : _a.completed) && ((_b = this._steps.last) === null || _b === void 0 ? void 0 : _b.stepClosed);
2258
+ if (closeLastStep) {
2259
+ return 'next';
2260
+ }
2261
+ return _super.prototype._getAnimationDirection.call(this, index);
2262
+ };
2263
+ StepperComponent.prototype._stepIsNavigable = function (index, step) {
2264
+ return step.completed || this.selectedIndex === index || !this.linear;
2265
+ };
2266
+ return StepperComponent;
2267
+ }(stepper.CdkStepper));
2268
+ StepperComponent.decorators = [
2269
+ { type: i0.Component, args: [{
2270
+ selector: 'mad-stepper',
2271
+ template: "<!-- Vertical stepper -->\n<ng-container>\n <div *ngFor=\"let step of steps; let i = index; let isLast = last; let isFirst = first\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate\"\n [ngTemplateOutletContext]=\"{step: step, i: i}\"></ng-container>\n <div class=\"vertical-content-container\" [class.mat-stepper-vertical-line]=\"!isLast\">\n <div class=\"vertical-stepper-content\" role=\"tabpanel\"\n [@stepTransition]=\"_getAnimationDirection(i)\"\n (@stepTransition.done)=\"_animationDone.next($event)\"\n [id]=\"_getStepContentId(i)\"\n [attr.aria-labelledby]=\"_getStepLabelId(i)\"\n [attr.aria-expanded]=\"selectedIndex === i\">\n <div class=\"vertical-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"\n [ngTemplateOutletContext]=\"{step: step, i: i, last: isLast, first: isFirst, nextBtnLbl: this.nextButtonLabel, doneBtnLbl: this.doneButtonLabel}\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template let-step=\"step\" let-i=\"i\" #stepTemplate>\n <mad-step-header\n class=\"mat-vertical-stepper-header\"\n (click)=\"step.selectAndMarkAsTouched(i)\"\n (keydown)=\"_onKeydown($event)\"\n [tabIndex]=\"_getFocusIndex() === i ? 0 : -1\"\n [id]=\"_getStepLabelId(i)\"\n [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"steps.length\"\n [attr.aria-controls]=\"_getStepContentId(i)\"\n [attr.aria-selected]=\"selectedIndex == i\"\n [attr.aria-label]=\"step.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null\"\n [attr.aria-disabled]=\"_stepIsNavigable(i, step) ? null : true\"\n [index]=\"i\"\n [completed]=\"step.completed\"\n [hasError]=\"step.hasError\"\n [state]=\"_getIndicatorType(i, step.state)\"\n [label]=\"step.stepLabel || step.label\"\n [selected]=\"selectedIndex === i\"\n [active]=\"_stepIsNavigable(i, step)\"\n [optional]=\"step.optional\"\n [closed]=\"step.stepClosed\"\n [errorMessage]=\"step.errorMessage\"></mad-step-header>\n</ng-template>\n",
2272
+ host: {
2273
+ '[class.stepper-vertical]': 'true',
2274
+ '[attr.aria-orientation]': '"vertical"',
2275
+ 'role': 'tablist',
2276
+ },
2277
+ animations: [madStepperAnimations.verticalStepTransition],
2278
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
2279
+ providers: [{ provide: stepper.CdkStepper, useExisting: StepperComponent }],
2280
+ encapsulation: i0.ViewEncapsulation.None,
2281
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2282
+ styles: [".stepper-vertical{display:block}.mat-vertical-stepper-header{align-items:center;border:none!important;display:flex;height:10px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}.vertical-content-container{border:none}[dir=rtl] .vertical-content-container{margin-left:0;margin-right:36px}.vertical-stepper-content{outline:0;overflow:hidden}.vertical-content{padding:0 24px}.step-container{border-bottom:1px solid #d3d3d3;border-left:1px solid #d3d3d3;border-right:1px solid #d3d3d3}.step-buttons,.step-content{padding:2em}"]
2283
+ },] }
2284
+ ];
2285
+ StepperComponent.ctorParameters = function () { return [
2286
+ { type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
2287
+ { type: i0.ChangeDetectorRef },
2288
+ { type: i0.ElementRef },
2289
+ { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
2290
+ ]; };
2291
+ StepperComponent.propDecorators = {
2292
+ animationDone: [{ type: i0.Output }],
2293
+ nextButtonLabel: [{ type: i0.Input }],
2294
+ doneButtonLabel: [{ type: i0.Input }],
2295
+ _stepHeader: [{ type: i0.ViewChildren, args: [StepHeaderComponent,] }],
2296
+ _steps: [{ type: i0.ContentChildren, args: [StepComponent, { descendants: true },] }]
2297
+ };
2298
+
2299
+ var StepperModule = /** @class */ (function () {
2300
+ function StepperModule() {
2301
+ }
2302
+ return StepperModule;
2303
+ }());
2304
+ StepperModule.decorators = [
2305
+ { type: i0.NgModule, args: [{
2306
+ declarations: [StepperComponent, StepHeaderComponent, StepComponent],
2307
+ imports: [common.CommonModule, button.MatButtonModule, icon.MatIconModule, stepper.CdkStepperModule, flexLayout.FlexModule],
2308
+ exports: [StepperComponent, StepHeaderComponent, StepComponent],
2309
+ },] }
2310
+ ];
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
+
1838
2625
  var MaterialAddonsModule = /** @class */ (function () {
1839
2626
  function MaterialAddonsModule() {
1840
2627
  }
@@ -1850,8 +2637,8 @@
1850
2637
  NumericFieldModule,
1851
2638
  CardModule,
1852
2639
  QuickListModule,
1853
- ThrottleClickModule
1854
- ]
2640
+ ThrottleClickModule,
2641
+ ],
1855
2642
  },] }
1856
2643
  ];
1857
2644
 
@@ -1865,6 +2652,15 @@
1865
2652
 
1866
2653
  exports.ButtonModule = ButtonModule;
1867
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;
1868
2664
  exports.MaterialActionButtonComponent = MaterialActionButtonComponent;
1869
2665
  exports.MaterialActionButtonModule = MaterialActionButtonModule;
1870
2666
  exports.MaterialAddonsModule = MaterialAddonsModule;
@@ -1874,12 +2670,17 @@
1874
2670
  exports.ReadOnlyFormFieldComponent = ReadOnlyFormFieldComponent;
1875
2671
  exports.ReadOnlyFormFieldModule = ReadOnlyFormFieldModule;
1876
2672
  exports.ReadOnlyFormFieldWrapperComponent = ReadOnlyFormFieldWrapperComponent;
2673
+ exports.StepComponent = StepComponent;
2674
+ exports.StepHeaderComponent = StepHeaderComponent;
2675
+ exports.StepperComponent = StepperComponent;
2676
+ exports.StepperModule = StepperModule;
1877
2677
  exports.TableModule = TableModule;
1878
2678
  exports.ThrottleClickDirective = ThrottleClickDirective;
1879
2679
  exports.ThrottleClickModule = ThrottleClickModule;
1880
2680
  exports.ToolbarComponent = ToolbarComponent;
1881
2681
  exports.ToolbarModule = ToolbarModule;
1882
2682
  exports.ToolbarService = ToolbarService;
2683
+ exports.madStepperAnimations = madStepperAnimations;
1883
2684
  exports.ɵa = PrimaryButtonComponent;
1884
2685
  exports.ɵb = MadBasicButton;
1885
2686
  exports.ɵc = OutlineButtonComponent;
@@ -1889,7 +2690,10 @@
1889
2690
  exports.ɵg = NumericFieldDirective;
1890
2691
  exports.ɵh = CardComponent;
1891
2692
  exports.ɵi = QuickListComponent;
1892
- exports.ɵj = TableComponent;
2693
+ exports.ɵj = BaseQuickListComponent;
2694
+ exports.ɵk = QuickListCompactComponent;
2695
+ exports.ɵl = TableComponent;
2696
+ exports.ɵm = DataTableComponent;
1893
2697
 
1894
2698
  Object.defineProperty(exports, '__esModule', { value: true });
1895
2699