@porscheinformatik/material-addons 10.1.6 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/porscheinformatik-material-addons.umd.js +54 -23
- package/bundles/porscheinformatik-material-addons.umd.js.map +1 -1
- package/bundles/porscheinformatik-material-addons.umd.min.js +2 -2
- package/bundles/porscheinformatik-material-addons.umd.min.js.map +1 -1
- package/esm2015/lib/card/card.component.js +19 -5
- package/esm2015/lib/table/table.component.js +3 -3
- package/fesm2015/porscheinformatik-material-addons.js +20 -6
- package/fesm2015/porscheinformatik-material-addons.js.map +1 -1
- package/lib/card/card.component.d.ts +4 -0
- package/package.json +6 -6
- package/porscheinformatik-material-addons.metadata.json +1 -1
- package/themes/common/styles.scss +17 -9
|
@@ -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 (
|
|
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,
|
|
213
|
+
function __exportStar(m, o) {
|
|
212
214
|
for (var p in m)
|
|
213
|
-
if (p !== "default" && !
|
|
214
|
-
__createBinding(
|
|
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,
|
|
333
|
-
if (!
|
|
334
|
-
throw new TypeError("
|
|
335
|
-
|
|
336
|
-
|
|
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,
|
|
339
|
-
if (
|
|
340
|
-
throw new TypeError("
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
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 () {
|
|
@@ -1478,9 +1495,11 @@
|
|
|
1478
1495
|
this.saveDisabled = false;
|
|
1479
1496
|
this.saveText = 'NOT SET';
|
|
1480
1497
|
this.editMode = false;
|
|
1498
|
+
this.additionalActionText = '';
|
|
1481
1499
|
this.edit = new i0.EventEmitter();
|
|
1482
1500
|
this.cancel = new i0.EventEmitter();
|
|
1483
1501
|
this.save = new i0.EventEmitter();
|
|
1502
|
+
this.additionalAction = new i0.EventEmitter();
|
|
1484
1503
|
}
|
|
1485
1504
|
CardComponent.prototype.onCancel = function () {
|
|
1486
1505
|
this.cancel.emit(undefined);
|
|
@@ -1495,16 +1514,25 @@
|
|
|
1495
1514
|
CardComponent.prototype.toggleCollapse = function () {
|
|
1496
1515
|
this.expanded = !this.expanded;
|
|
1497
1516
|
};
|
|
1517
|
+
CardComponent.prototype.additionalActionClicked = function () {
|
|
1518
|
+
this.additionalAction.emit(undefined);
|
|
1519
|
+
};
|
|
1498
1520
|
return CardComponent;
|
|
1499
1521
|
}());
|
|
1500
1522
|
CardComponent.decorators = [
|
|
1501
1523
|
{ type: i0.Component, args: [{
|
|
1502
1524
|
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
|
|
1525
|
+
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
1526
|
animations: [
|
|
1505
1527
|
animations.trigger('collapseExpandAnimation', [
|
|
1506
|
-
animations.transition(':enter', [animations.style({ opacity: 0, height: 0, overflow: 'hidden' }), animations.animate('100ms', animations.style({
|
|
1507
|
-
|
|
1528
|
+
animations.transition(':enter', [animations.style({ opacity: 0, height: 0, overflow: 'hidden' }), animations.animate('100ms', animations.style({
|
|
1529
|
+
opacity: 1,
|
|
1530
|
+
height: '*'
|
|
1531
|
+
}))]),
|
|
1532
|
+
animations.transition(':leave', [animations.style({ opacity: 1, height: '*', overflow: 'hidden' }), animations.animate('100ms', animations.style({
|
|
1533
|
+
opacity: 0,
|
|
1534
|
+
height: 0
|
|
1535
|
+
}))]),
|
|
1508
1536
|
]),
|
|
1509
1537
|
animations.trigger('rotateIcon', [
|
|
1510
1538
|
animations.state('true', animations.style({ transform: 'rotate(0)' })),
|
|
@@ -1527,9 +1555,12 @@
|
|
|
1527
1555
|
saveText: [{ type: i0.Input }],
|
|
1528
1556
|
title: [{ type: i0.Input }],
|
|
1529
1557
|
editMode: [{ type: i0.Input }],
|
|
1558
|
+
additionalActionIcon: [{ type: i0.Input }],
|
|
1559
|
+
additionalActionText: [{ type: i0.Input }],
|
|
1530
1560
|
edit: [{ type: i0.Output }],
|
|
1531
1561
|
cancel: [{ type: i0.Output }],
|
|
1532
|
-
save: [{ type: i0.Output }]
|
|
1562
|
+
save: [{ type: i0.Output }],
|
|
1563
|
+
additionalAction: [{ type: i0.Output }]
|
|
1533
1564
|
};
|
|
1534
1565
|
|
|
1535
1566
|
var ThrottleClickDirective = /** @class */ (function () {
|
|
@@ -1788,8 +1819,8 @@
|
|
|
1788
1819
|
TableComponent.decorators = [
|
|
1789
1820
|
{ type: i0.Component, args: [{
|
|
1790
1821
|
selector: 'mad-table',
|
|
1791
|
-
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 (keyup)=\"onFilter($event?.target?.value)\" placeholder=\"{{ filterPlaceholder }}\" />\n</mat-form-field>\n\n<!-- Table -->\n<div *ngIf=\"dataSource?.data?.length > 0; else noData\">\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 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 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 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",
|
|
1792
|
-
styles: [".text-right{text-align:right!important}.table-action{margin-bottom:.5em;margin-right:.5em}.row-action-button{width:10px}.noDataText{text-align:center;width:100%}"]
|
|
1822
|
+
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 (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 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 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 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",
|
|
1823
|
+
styles: [".text-right{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%}"]
|
|
1793
1824
|
},] }
|
|
1794
1825
|
];
|
|
1795
1826
|
TableComponent.propDecorators = {
|