@porscheinformatik/material-addons 0.0.35 → 0.0.99
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/README.md +29 -29
- package/esm2022/lib/button/button.mjs +7 -0
- package/esm2022/lib/button/button.module.mjs +26 -0
- package/esm2022/lib/button/danger-button/danger-button.component.mjs +28 -0
- package/esm2022/lib/button/flat-button/link-button.component.mjs +28 -0
- package/esm2022/lib/button/icon-button/icon-button.component.mjs +28 -0
- package/esm2022/lib/button/mad-basic-button.mjs +39 -0
- package/esm2022/lib/button/outline-button/outline-button.component.mjs +28 -0
- package/esm2022/lib/button/primary-button/primary-button.component.mjs +28 -0
- package/esm2022/lib/card/card.component.mjs +129 -0
- package/esm2022/lib/card/card.mjs +2 -0
- package/esm2022/lib/card/card.module.mjs +23 -0
- package/esm2022/lib/content-panel/content-header/content-header.component.mjs +11 -0
- package/esm2022/lib/content-panel/content-panel-container/content-panel-container.component.mjs +11 -0
- package/esm2022/lib/content-panel/content-panel-container-content/content-panel-container-content.component.mjs +11 -0
- package/esm2022/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.mjs +11 -0
- package/esm2022/lib/content-panel/content-panel.module.mjs +42 -0
- package/esm2022/lib/content-panel/main-container/main-container.component.mjs +11 -0
- package/esm2022/lib/data-table/data-table-action-type.mjs +6 -0
- package/esm2022/lib/data-table/data-table-action.mjs +2 -0
- package/esm2022/lib/data-table/data-table-column-definition.mjs +2 -0
- package/esm2022/lib/data-table/data-table-column.mjs +2 -0
- package/esm2022/lib/data-table/data-table-columns-modal/data-table-columns-modal.component.mjs +103 -0
- package/esm2022/lib/data-table/data-table-row.mjs +2 -0
- package/esm2022/lib/data-table/data-table.component.mjs +529 -0
- package/esm2022/lib/data-table/data-table.mjs +3 -0
- package/esm2022/lib/data-table/data-table.module.mjs +81 -0
- package/esm2022/lib/file-upload/drag-and-drop-directive.directive.mjs +61 -0
- package/esm2022/lib/file-upload/file-upload.component.mjs +78 -0
- package/esm2022/lib/flowbar/flowbar.component.mjs +190 -0
- package/esm2022/lib/flowbar/flowbar.module.mjs +19 -0
- package/esm2022/lib/material-action-button/material-action-button.component.mjs +34 -0
- package/esm2022/lib/material-action-button/material-action-button.module.mjs +22 -0
- package/esm2022/lib/material-addons.module.mjs +45 -0
- package/esm2022/lib/numeric-field/number-format.service.mjs +139 -0
- package/esm2022/lib/numeric-field/numeric-field.directive.mjs +295 -0
- package/esm2022/lib/numeric-field/numeric-field.mjs +2 -0
- package/esm2022/lib/numeric-field/numeric-field.module.mjs +24 -0
- package/esm2022/lib/quick-list/base-quick-list.component.mjs +124 -0
- package/esm2022/lib/quick-list/quick-list-compact/quick-list-compact.component.mjs +22 -0
- package/esm2022/lib/quick-list/quick-list.component.mjs +23 -0
- package/esm2022/lib/quick-list/quick-list.mjs +6 -0
- package/esm2022/lib/quick-list/quick-list.module.mjs +46 -0
- package/esm2022/lib/quick-list/reactive-form-quick-list/reactive-form-quick-list.component.mjs +22 -0
- package/esm2022/lib/quick-list/reactive-form-quick-list-compact/reactive-form-quick-list-compact.component.mjs +22 -0
- package/esm2022/lib/readonly/readonly-form-field/readonly-form-field.component.mjs +181 -0
- package/esm2022/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.mjs +206 -0
- package/esm2022/lib/readonly/readonly-form-field.module.mjs +25 -0
- package/esm2022/lib/stepper/mad-stepper-animation.mjs +13 -0
- package/esm2022/lib/stepper/step-header/step-header.component.mjs +77 -0
- package/esm2022/lib/stepper/stepper.component.mjs +159 -0
- package/esm2022/lib/stepper/stepper.module.mjs +23 -0
- package/esm2022/lib/table/column-header.mjs +2 -0
- package/esm2022/lib/table/table-action.mjs +2 -0
- package/esm2022/lib/table/table.component.mjs +130 -0
- package/esm2022/lib/table/table.mjs +2 -0
- package/esm2022/lib/table/table.module.mjs +56 -0
- package/esm2022/lib/throttle-click/throttle-click.directive.mjs +38 -0
- package/esm2022/lib/throttle-click/throttle-click.module.mjs +18 -0
- package/esm2022/lib/toolbar/toolbar-action.interface.mjs +2 -0
- package/esm2022/lib/toolbar/toolbar.component.mjs +78 -0
- package/esm2022/lib/toolbar/toolbar.module.mjs +56 -0
- package/esm2022/lib/toolbar/toolbar.service.mjs +124 -0
- package/esm2022/porscheinformatik-material-addons.mjs +5 -0
- package/esm2022/public_api.mjs +42 -0
- package/fesm2022/porscheinformatik-material-addons.mjs +3229 -0
- package/fesm2022/porscheinformatik-material-addons.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/button/button.d.ts +7 -0
- package/lib/button/button.d.ts.map +1 -0
- package/lib/button/button.module.d.ts +17 -0
- package/lib/button/button.module.d.ts.map +1 -0
- package/lib/button/danger-button/danger-button.component.d.ts +13 -0
- package/lib/button/danger-button/danger-button.component.d.ts.map +1 -0
- package/lib/button/flat-button/link-button.component.d.ts +13 -0
- package/lib/button/flat-button/link-button.component.d.ts.map +1 -0
- package/lib/button/icon-button/icon-button.component.d.ts +13 -0
- package/lib/button/icon-button/icon-button.component.d.ts.map +1 -0
- package/lib/button/mad-basic-button.d.ts +14 -0
- package/lib/button/mad-basic-button.d.ts.map +1 -0
- package/lib/button/outline-button/outline-button.component.d.ts +13 -0
- package/lib/button/outline-button/outline-button.component.d.ts.map +1 -0
- package/lib/button/primary-button/primary-button.component.d.ts +13 -0
- package/lib/button/primary-button/primary-button.component.d.ts.map +1 -0
- package/lib/card/card.component.d.ts +28 -0
- package/lib/card/card.component.d.ts.map +1 -0
- package/lib/card/card.d.ts +2 -0
- package/lib/card/card.d.ts.map +1 -0
- package/lib/card/card.module.d.ts +14 -0
- package/lib/card/card.module.d.ts.map +1 -0
- package/lib/content-panel/content-header/content-header.component.d.ts +6 -0
- package/lib/content-panel/content-header/content-header.component.d.ts.map +1 -0
- package/lib/content-panel/content-panel-container/content-panel-container.component.d.ts +6 -0
- package/lib/content-panel/content-panel-container/content-panel-container.component.d.ts.map +1 -0
- package/lib/content-panel/content-panel-container-content/content-panel-container-content.component.d.ts +6 -0
- package/lib/content-panel/content-panel-container-content/content-panel-container-content.component.d.ts.map +1 -0
- package/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.d.ts +6 -0
- package/lib/content-panel/content-panel-container-footer/content-panel-container-footer.component.d.ts.map +1 -0
- package/lib/content-panel/content-panel.module.d.ts +13 -0
- package/lib/content-panel/content-panel.module.d.ts.map +1 -0
- package/lib/content-panel/main-container/main-container.component.d.ts +6 -0
- package/lib/content-panel/main-container/main-container.component.d.ts.map +1 -0
- package/lib/data-table/data-table-action-type.d.ts +6 -0
- package/lib/data-table/data-table-action-type.d.ts.map +1 -0
- package/lib/data-table/data-table-action.d.ts +8 -0
- package/lib/data-table/data-table-action.d.ts.map +1 -0
- package/lib/data-table/data-table-column-definition.d.ts +28 -0
- package/lib/data-table/data-table-column-definition.d.ts.map +1 -0
- package/lib/data-table/data-table-column.d.ts +11 -0
- package/lib/data-table/data-table-column.d.ts.map +1 -0
- package/lib/data-table/data-table-columns-modal/data-table-columns-modal.component.d.ts +27 -0
- package/lib/data-table/data-table-columns-modal/data-table-columns-modal.component.d.ts.map +1 -0
- package/lib/data-table/data-table-row.d.ts +7 -0
- package/lib/data-table/data-table-row.d.ts.map +1 -0
- package/lib/data-table/data-table.component.d.ts +123 -0
- package/lib/data-table/data-table.component.d.ts.map +1 -0
- package/lib/data-table/data-table.d.ts +6 -0
- package/lib/data-table/data-table.d.ts.map +1 -0
- package/lib/data-table/data-table.module.d.ts +25 -0
- package/lib/data-table/data-table.module.d.ts.map +1 -0
- package/lib/file-upload/drag-and-drop-directive.directive.d.ts +13 -0
- package/lib/file-upload/drag-and-drop-directive.directive.d.ts.map +1 -0
- package/lib/file-upload/file-upload.component.d.ts +22 -0
- package/lib/file-upload/file-upload.component.d.ts.map +1 -0
- package/lib/flowbar/flowbar.component.d.ts +47 -0
- package/lib/flowbar/flowbar.component.d.ts.map +1 -0
- package/lib/flowbar/flowbar.module.d.ts +10 -0
- package/lib/flowbar/flowbar.module.d.ts.map +1 -0
- package/lib/material-action-button/material-action-button.component.d.ts +12 -8
- package/lib/material-action-button/material-action-button.component.d.ts.map +1 -0
- package/lib/material-action-button/material-action-button.module.d.ts +13 -2
- package/lib/material-action-button/material-action-button.module.d.ts.map +1 -0
- package/lib/material-addons.module.d.ts +15 -2
- package/lib/material-addons.module.d.ts.map +1 -0
- package/lib/numeric-field/number-format.service.d.ts +31 -0
- package/lib/numeric-field/number-format.service.d.ts.map +1 -0
- package/lib/numeric-field/numeric-field.d.ts +2 -0
- package/lib/numeric-field/numeric-field.d.ts.map +1 -0
- package/lib/numeric-field/numeric-field.directive.d.ts +45 -0
- package/lib/numeric-field/numeric-field.directive.d.ts.map +1 -0
- package/lib/numeric-field/numeric-field.module.d.ts +10 -0
- package/lib/numeric-field/numeric-field.module.d.ts.map +1 -0
- package/lib/quick-list/base-quick-list.component.d.ts +41 -0
- package/lib/quick-list/base-quick-list.component.d.ts.map +1 -0
- package/lib/quick-list/quick-list-compact/quick-list-compact.component.d.ts +12 -0
- package/lib/quick-list/quick-list-compact/quick-list-compact.component.d.ts.map +1 -0
- package/lib/quick-list/quick-list.component.d.ts +12 -0
- package/lib/quick-list/quick-list.component.d.ts.map +1 -0
- package/lib/quick-list/quick-list.d.ts +6 -0
- package/lib/quick-list/quick-list.d.ts.map +1 -0
- package/lib/quick-list/quick-list.module.d.ts +17 -0
- package/lib/quick-list/quick-list.module.d.ts.map +1 -0
- package/lib/quick-list/reactive-form-quick-list/reactive-form-quick-list.component.d.ts +12 -0
- package/lib/quick-list/reactive-form-quick-list/reactive-form-quick-list.component.d.ts.map +1 -0
- package/lib/quick-list/reactive-form-quick-list-compact/reactive-form-quick-list-compact.component.d.ts +12 -0
- package/lib/quick-list/reactive-form-quick-list-compact/reactive-form-quick-list-compact.component.d.ts.map +1 -0
- package/lib/readonly/readonly-form-field/readonly-form-field.component.d.ts +56 -14
- package/lib/readonly/readonly-form-field/readonly-form-field.component.d.ts.map +1 -0
- package/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.d.ts +89 -31
- package/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.d.ts.map +1 -0
- package/lib/readonly/readonly-form-field.module.d.ts +16 -2
- package/lib/readonly/readonly-form-field.module.d.ts.map +1 -0
- package/lib/stepper/mad-stepper-animation.d.ts +8 -0
- package/lib/stepper/mad-stepper-animation.d.ts.map +1 -0
- package/lib/stepper/step-header/step-header.component.d.ts +27 -0
- package/lib/stepper/step-header/step-header.component.d.ts.map +1 -0
- package/lib/stepper/stepper.component.d.ts +53 -0
- package/lib/stepper/stepper.component.d.ts.map +1 -0
- package/lib/stepper/stepper.module.d.ts +14 -0
- package/lib/stepper/stepper.module.d.ts.map +1 -0
- package/lib/table/column-header.d.ts +8 -0
- package/lib/table/column-header.d.ts.map +1 -0
- package/lib/table/table-action.d.ts +6 -0
- package/lib/table/table-action.d.ts.map +1 -0
- package/lib/table/table.component.d.ts +43 -0
- package/lib/table/table.component.d.ts.map +1 -0
- package/lib/table/table.d.ts +4 -0
- package/lib/table/table.d.ts.map +1 -0
- package/lib/table/table.module.d.ts +18 -0
- package/lib/table/table.module.d.ts.map +1 -0
- package/lib/throttle-click/throttle-click.directive.d.ts +14 -0
- package/lib/throttle-click/throttle-click.directive.d.ts.map +1 -0
- package/lib/throttle-click/throttle-click.module.d.ts +9 -0
- package/lib/throttle-click/throttle-click.module.d.ts.map +1 -0
- package/lib/toolbar/toolbar-action.interface.d.ts +28 -18
- package/lib/toolbar/toolbar-action.interface.d.ts.map +1 -0
- package/lib/toolbar/toolbar.component.d.ts +28 -19
- package/lib/toolbar/toolbar.component.d.ts.map +1 -0
- package/lib/toolbar/toolbar.module.d.ts +18 -2
- package/lib/toolbar/toolbar.module.d.ts.map +1 -0
- package/lib/toolbar/toolbar.service.d.ts +44 -33
- package/lib/toolbar/toolbar.service.d.ts.map +1 -0
- package/package.json +29 -24
- package/porscheinformatik-material-addons.d.ts.map +1 -0
- package/public_api.d.ts +39 -0
- package/public_api.d.ts.map +1 -0
- package/themes/common/styles.scss +359 -303
- package/themes/pbv.scss +64 -56
- package/themes/poa.scss +64 -40
- package/bundles/porscheinformatik-material-addons.umd.js +0 -755
- package/esm2015/lib/material-action-button/material-action-button.component.js +0 -43
- package/esm2015/lib/material-action-button/material-action-button.module.js +0 -19
- package/esm2015/lib/material-addons.module.js +0 -16
- package/esm2015/lib/readonly/readonly-form-field/readonly-form-field.component.js +0 -61
- package/esm2015/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.js +0 -124
- package/esm2015/lib/readonly/readonly-form-field.module.js +0 -20
- package/esm2015/lib/toolbar/toolbar-action.interface.js +0 -47
- package/esm2015/lib/toolbar/toolbar.component.js +0 -112
- package/esm2015/lib/toolbar/toolbar.module.js +0 -29
- package/esm2015/lib/toolbar/toolbar.service.js +0 -197
- package/esm2015/porscheinformatik-material-addons.js +0 -9
- package/esm2015/public-api.js +0 -18
- package/esm5/lib/material-action-button/material-action-button.component.js +0 -45
- package/esm5/lib/material-action-button/material-action-button.module.js +0 -23
- package/esm5/lib/material-addons.module.js +0 -20
- package/esm5/lib/readonly/readonly-form-field/readonly-form-field.component.js +0 -67
- package/esm5/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.js +0 -145
- package/esm5/lib/readonly/readonly-form-field.module.js +0 -24
- package/esm5/lib/toolbar/toolbar-action.interface.js +0 -47
- package/esm5/lib/toolbar/toolbar.component.js +0 -131
- package/esm5/lib/toolbar/toolbar.module.js +0 -33
- package/esm5/lib/toolbar/toolbar.service.js +0 -245
- package/esm5/porscheinformatik-material-addons.js +0 -9
- package/esm5/public-api.js +0 -18
- package/porscheinformatik-material-addons.d.ts +0 -4
- package/porscheinformatik-material-addons.metadata.json +0 -1
- package/public-api.d.ts +0 -10
|
@@ -1,755 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material'), require('@angular/common'), require('@angular/router'), require('@angular/platform-browser'), require('@ngx-translate/core'), require('rxjs'), require('@angular/cdk/layout'), require('rxjs/operators')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@porscheinformatik/material-addons', ['exports', '@angular/core', '@angular/material', '@angular/common', '@angular/router', '@angular/platform-browser', '@ngx-translate/core', 'rxjs', '@angular/cdk/layout', 'rxjs/operators'], factory) :
|
|
4
|
-
(global = global || self, factory((global.porscheinformatik = global.porscheinformatik || {}, global.porscheinformatik['material-addons'] = {}), global.ng.core, global.ng.material, global.ng.common, global.ng.router, global.ng.platformBrowser, global.core$1, global.rxjs, global.ng.cdk.layout, global.rxjs.operators));
|
|
5
|
-
}(this, function (exports, core, material, common, router, platformBrowser, core$1, rxjs, layout, operators) { 'use strict';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @fileoverview added by tsickle
|
|
9
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10
|
-
*/
|
|
11
|
-
var MaterialActionButtonComponent = /** @class */ (function () {
|
|
12
|
-
function MaterialActionButtonComponent() {
|
|
13
|
-
this.icon = 'add';
|
|
14
|
-
// Sets the lower padding higher providing some bottom space for a fixed paginator
|
|
15
|
-
this.liftHigher = true;
|
|
16
|
-
this.liftHigher2 = false;
|
|
17
|
-
}
|
|
18
|
-
MaterialActionButtonComponent.decorators = [
|
|
19
|
-
{ type: core.Component, args: [{
|
|
20
|
-
selector: 'mad-material-action-button',
|
|
21
|
-
template: "<div class=\"material-action-button {{ liftHigher ? 'lift-higher' : '' }} {{ liftHigher2 ? 'lift-higher-2' : '' }}\">\r\n <a [routerLink]=\"routerLink\">\r\n <button [id]=\"id\" mat-fab [matTooltipPosition]=\"'left'\" [matTooltip]=\"actionName\" color=\"primary\" *ngIf=\"!liftHigher2\">\r\n <mat-icon>{{ icon }}</mat-icon>\r\n </button>\r\n <button [id]=\"id\" mat-mini-fab [matTooltipPosition]=\"'left'\" [matTooltip]=\"actionName\" color=\"accent\" *ngIf=\"liftHigher2\">\r\n <mat-icon>{{ icon }}</mat-icon>\r\n </button>\r\n </a>\r\n</div>\r\n",
|
|
22
|
-
styles: [".material-action-button{position:fixed;bottom:20px;right:20px;z-index:100;display:flex;flex-direction:column-reverse;align-items:center}.lift-higher{bottom:calc(25px + 36px)}.lift-higher-2{right:28px;bottom:calc(25px + 96px)}"]
|
|
23
|
-
}] }
|
|
24
|
-
];
|
|
25
|
-
MaterialActionButtonComponent.propDecorators = {
|
|
26
|
-
actionName: [{ type: core.Input }],
|
|
27
|
-
id: [{ type: core.Input }],
|
|
28
|
-
icon: [{ type: core.Input }],
|
|
29
|
-
routerLink: [{ type: core.Input }],
|
|
30
|
-
liftHigher: [{ type: core.Input }],
|
|
31
|
-
liftHigher2: [{ type: core.Input }]
|
|
32
|
-
};
|
|
33
|
-
return MaterialActionButtonComponent;
|
|
34
|
-
}());
|
|
35
|
-
if (false) {
|
|
36
|
-
/** @type {?} */
|
|
37
|
-
MaterialActionButtonComponent.prototype.actionName;
|
|
38
|
-
/** @type {?} */
|
|
39
|
-
MaterialActionButtonComponent.prototype.id;
|
|
40
|
-
/** @type {?} */
|
|
41
|
-
MaterialActionButtonComponent.prototype.icon;
|
|
42
|
-
/** @type {?} */
|
|
43
|
-
MaterialActionButtonComponent.prototype.routerLink;
|
|
44
|
-
/** @type {?} */
|
|
45
|
-
MaterialActionButtonComponent.prototype.liftHigher;
|
|
46
|
-
/** @type {?} */
|
|
47
|
-
MaterialActionButtonComponent.prototype.liftHigher2;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @fileoverview added by tsickle
|
|
52
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
53
|
-
*/
|
|
54
|
-
var MaterialActionButtonModule = /** @class */ (function () {
|
|
55
|
-
function MaterialActionButtonModule() {
|
|
56
|
-
}
|
|
57
|
-
MaterialActionButtonModule.decorators = [
|
|
58
|
-
{ type: core.NgModule, args: [{
|
|
59
|
-
declarations: [MaterialActionButtonComponent],
|
|
60
|
-
imports: [common.CommonModule, router.RouterModule, material.MatButtonModule, material.MatIconModule, material.MatTooltipModule],
|
|
61
|
-
exports: [MaterialActionButtonComponent],
|
|
62
|
-
},] }
|
|
63
|
-
];
|
|
64
|
-
return MaterialActionButtonModule;
|
|
65
|
-
}());
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @fileoverview added by tsickle
|
|
69
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
70
|
-
*/
|
|
71
|
-
/**
|
|
72
|
-
* Wraps a mat-form-field to replace it by a readOnly representation if necessary
|
|
73
|
-
*
|
|
74
|
-
* @author Stefan Laesser
|
|
75
|
-
*/
|
|
76
|
-
var ReadOnlyFormFieldWrapperComponent = /** @class */ (function () {
|
|
77
|
-
function ReadOnlyFormFieldWrapperComponent(changeDetector) {
|
|
78
|
-
this.changeDetector = changeDetector;
|
|
79
|
-
/**
|
|
80
|
-
* If set to "false", the contained mat-form-field is rendered in all it's glory.
|
|
81
|
-
* If set to "true", a readonly representation of the value is shown using the mat-form-fields label.
|
|
82
|
-
*/
|
|
83
|
-
this.readonly = true;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* @return {?}
|
|
87
|
-
*/
|
|
88
|
-
ReadOnlyFormFieldWrapperComponent.prototype.ngOnInit = /**
|
|
89
|
-
* @return {?}
|
|
90
|
-
*/
|
|
91
|
-
function () {
|
|
92
|
-
this.doRendering();
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* @return {?}
|
|
96
|
-
*/
|
|
97
|
-
ReadOnlyFormFieldWrapperComponent.prototype.ngAfterViewInit = /**
|
|
98
|
-
* @return {?}
|
|
99
|
-
*/
|
|
100
|
-
function () {
|
|
101
|
-
this.doRendering();
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* @param {?} _
|
|
105
|
-
* @return {?}
|
|
106
|
-
*/
|
|
107
|
-
ReadOnlyFormFieldWrapperComponent.prototype.ngOnChanges = /**
|
|
108
|
-
* @param {?} _
|
|
109
|
-
* @return {?}
|
|
110
|
-
*/
|
|
111
|
-
function (_) {
|
|
112
|
-
this.doRendering();
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* @private
|
|
116
|
-
* @return {?}
|
|
117
|
-
*/
|
|
118
|
-
ReadOnlyFormFieldWrapperComponent.prototype.doRendering = /**
|
|
119
|
-
* @private
|
|
120
|
-
* @return {?}
|
|
121
|
-
*/
|
|
122
|
-
function () {
|
|
123
|
-
if (!this.originalContent) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
if (!this.readonly) {
|
|
127
|
-
this.correctWidth();
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
this.setLabel();
|
|
131
|
-
// TODO remove. Does not work 100% with data binding when values are changed/deleted after rendering
|
|
132
|
-
// if (!this.value) {
|
|
133
|
-
// this.tryToExtractValue();
|
|
134
|
-
// }
|
|
135
|
-
this.changeDetector.detectChanges();
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* @private
|
|
139
|
-
* @return {?}
|
|
140
|
-
*/
|
|
141
|
-
ReadOnlyFormFieldWrapperComponent.prototype.setLabel = /**
|
|
142
|
-
* @private
|
|
143
|
-
* @return {?}
|
|
144
|
-
*/
|
|
145
|
-
function () {
|
|
146
|
-
/** @type {?} */
|
|
147
|
-
var labelElement = this.originalContent.nativeElement.querySelector('mat-label');
|
|
148
|
-
this.label = labelElement ? labelElement.innerHTML : 'mat-label is missing!';
|
|
149
|
-
};
|
|
150
|
-
/**
|
|
151
|
-
* @private
|
|
152
|
-
* @return {?}
|
|
153
|
-
*/
|
|
154
|
-
ReadOnlyFormFieldWrapperComponent.prototype.correctWidth = /**
|
|
155
|
-
* @private
|
|
156
|
-
* @return {?}
|
|
157
|
-
*/
|
|
158
|
-
function () {
|
|
159
|
-
/** @type {?} */
|
|
160
|
-
var formField = this.originalContent.nativeElement.querySelector('mat-form-field');
|
|
161
|
-
if (formField) {
|
|
162
|
-
formField.setAttribute('style', 'width:100%');
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
ReadOnlyFormFieldWrapperComponent.decorators = [
|
|
166
|
-
{ type: core.Component, args: [{
|
|
167
|
-
selector: 'mad-readonly-form-field-wrapper',
|
|
168
|
-
template: "<div #contentWrapper [hidden]=\"readonly\">\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-container *ngIf=\"!!readonly\">\r\n <mad-readonly-form-field [label]=\"label\" [value]=\"value\"></mad-readonly-form-field>\r\n</ng-container>\r\n",
|
|
169
|
-
styles: ["div,mat-form-field{width:inherit}"]
|
|
170
|
-
}] }
|
|
171
|
-
];
|
|
172
|
-
/** @nocollapse */
|
|
173
|
-
ReadOnlyFormFieldWrapperComponent.ctorParameters = function () { return [
|
|
174
|
-
{ type: core.ChangeDetectorRef }
|
|
175
|
-
]; };
|
|
176
|
-
ReadOnlyFormFieldWrapperComponent.propDecorators = {
|
|
177
|
-
readonly: [{ type: core.Input }],
|
|
178
|
-
value: [{ type: core.Input }],
|
|
179
|
-
originalContent: [{ type: core.ViewChild, args: ['contentWrapper', { static: false },] }]
|
|
180
|
-
};
|
|
181
|
-
return ReadOnlyFormFieldWrapperComponent;
|
|
182
|
-
}());
|
|
183
|
-
if (false) {
|
|
184
|
-
/**
|
|
185
|
-
* If set to "false", the contained mat-form-field is rendered in all it's glory.
|
|
186
|
-
* If set to "true", a readonly representation of the value is shown using the mat-form-fields label.
|
|
187
|
-
* @type {?}
|
|
188
|
-
*/
|
|
189
|
-
ReadOnlyFormFieldWrapperComponent.prototype.readonly;
|
|
190
|
-
/**
|
|
191
|
-
* This input *MUST MATCH* the mat-form-field value to ensure correct data
|
|
192
|
-
* binding and formatting of readOnly representation!
|
|
193
|
-
* @type {?}
|
|
194
|
-
*/
|
|
195
|
-
ReadOnlyFormFieldWrapperComponent.prototype.value;
|
|
196
|
-
/**
|
|
197
|
-
* Automatically taken from the contained <mat-label>
|
|
198
|
-
* @type {?}
|
|
199
|
-
*/
|
|
200
|
-
ReadOnlyFormFieldWrapperComponent.prototype.label;
|
|
201
|
-
/** @type {?} */
|
|
202
|
-
ReadOnlyFormFieldWrapperComponent.prototype.originalContent;
|
|
203
|
-
/**
|
|
204
|
-
* @type {?}
|
|
205
|
-
* @private
|
|
206
|
-
*/
|
|
207
|
-
ReadOnlyFormFieldWrapperComponent.prototype.changeDetector;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* @fileoverview added by tsickle
|
|
212
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
213
|
-
*/
|
|
214
|
-
/**
|
|
215
|
-
* Read-only mat-form-field representation of provided value
|
|
216
|
-
*
|
|
217
|
-
* @author Stefan Laesser
|
|
218
|
-
*/
|
|
219
|
-
var ReadOnlyFormFieldComponent = /** @class */ (function () {
|
|
220
|
-
function ReadOnlyFormFieldComponent(changeDetector) {
|
|
221
|
-
this.changeDetector = changeDetector;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* @param {?} _
|
|
225
|
-
* @return {?}
|
|
226
|
-
*/
|
|
227
|
-
ReadOnlyFormFieldComponent.prototype.ngOnChanges = /**
|
|
228
|
-
* @param {?} _
|
|
229
|
-
* @return {?}
|
|
230
|
-
*/
|
|
231
|
-
function (_) {
|
|
232
|
-
if (this.checkForValue()) {
|
|
233
|
-
this.value = '-';
|
|
234
|
-
this.changeDetector.detectChanges();
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
/**
|
|
238
|
-
* @return {?}
|
|
239
|
-
*/
|
|
240
|
-
ReadOnlyFormFieldComponent.prototype.checkForValue = /**
|
|
241
|
-
* @return {?}
|
|
242
|
-
*/
|
|
243
|
-
function () {
|
|
244
|
-
return typeof this.value === 'undefined' || this.value === null || this.value.length === 0;
|
|
245
|
-
};
|
|
246
|
-
ReadOnlyFormFieldComponent.decorators = [
|
|
247
|
-
{ type: core.Component, args: [{
|
|
248
|
-
selector: 'mad-readonly-form-field',
|
|
249
|
-
template: "<mat-form-field class=\"form-group\" appearance=\"none\">\r\n <mat-label>{{ label }}</mat-label>\r\n <input [value]=\"value\" readonly matInput />\r\n</mat-form-field>\r\n",
|
|
250
|
-
styles: ["mat-form-field{width:100%;width:-moz-available;width:-webkit-fill-available;width:stretch}mat-label{line-height:1.4}"]
|
|
251
|
-
}] }
|
|
252
|
-
];
|
|
253
|
-
/** @nocollapse */
|
|
254
|
-
ReadOnlyFormFieldComponent.ctorParameters = function () { return [
|
|
255
|
-
{ type: core.ChangeDetectorRef }
|
|
256
|
-
]; };
|
|
257
|
-
ReadOnlyFormFieldComponent.propDecorators = {
|
|
258
|
-
value: [{ type: core.Input }],
|
|
259
|
-
label: [{ type: core.Input }]
|
|
260
|
-
};
|
|
261
|
-
return ReadOnlyFormFieldComponent;
|
|
262
|
-
}());
|
|
263
|
-
if (false) {
|
|
264
|
-
/** @type {?} */
|
|
265
|
-
ReadOnlyFormFieldComponent.prototype.value;
|
|
266
|
-
/** @type {?} */
|
|
267
|
-
ReadOnlyFormFieldComponent.prototype.label;
|
|
268
|
-
/**
|
|
269
|
-
* @type {?}
|
|
270
|
-
* @private
|
|
271
|
-
*/
|
|
272
|
-
ReadOnlyFormFieldComponent.prototype.changeDetector;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* @fileoverview added by tsickle
|
|
277
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
278
|
-
*/
|
|
279
|
-
var ReadOnlyFormFieldModule = /** @class */ (function () {
|
|
280
|
-
function ReadOnlyFormFieldModule() {
|
|
281
|
-
}
|
|
282
|
-
ReadOnlyFormFieldModule.decorators = [
|
|
283
|
-
{ type: core.NgModule, args: [{
|
|
284
|
-
declarations: [ReadOnlyFormFieldComponent, ReadOnlyFormFieldWrapperComponent],
|
|
285
|
-
imports: [common.CommonModule, router.RouterModule, material.MatFormFieldModule, material.MatInputModule],
|
|
286
|
-
exports: [ReadOnlyFormFieldComponent, ReadOnlyFormFieldWrapperComponent],
|
|
287
|
-
},] }
|
|
288
|
-
];
|
|
289
|
-
return ReadOnlyFormFieldModule;
|
|
290
|
-
}());
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* @fileoverview added by tsickle
|
|
294
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
295
|
-
*/
|
|
296
|
-
var ToolbarService = /** @class */ (function () {
|
|
297
|
-
function ToolbarService(router$1, translate) {
|
|
298
|
-
var _this = this;
|
|
299
|
-
this.router = router$1;
|
|
300
|
-
this.translate = translate;
|
|
301
|
-
this.mainActions = []; // shown on the left, next to title, as big buttons
|
|
302
|
-
// shown on the left, next to title, as big buttons
|
|
303
|
-
this.toolbarActions = []; // shown on the right as icons
|
|
304
|
-
this.liftFabButtonHigher = false;
|
|
305
|
-
this.routerSubscription = this.router.events.subscribe((/**
|
|
306
|
-
* @param {?} routingEvent
|
|
307
|
-
* @return {?}
|
|
308
|
-
*/
|
|
309
|
-
function (routingEvent) {
|
|
310
|
-
if (routingEvent instanceof router.NavigationStart) {
|
|
311
|
-
if (_this.router.url !== routingEvent.url) {
|
|
312
|
-
_this.clearToolbarActions();
|
|
313
|
-
_this.clearMainActions();
|
|
314
|
-
delete _this.backAction;
|
|
315
|
-
delete _this.dataTitle;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}));
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* @return {?}
|
|
322
|
-
*/
|
|
323
|
-
ToolbarService.prototype.ngOnDestroy = /**
|
|
324
|
-
* @return {?}
|
|
325
|
-
*/
|
|
326
|
-
function () {
|
|
327
|
-
if (this.routerSubscription) {
|
|
328
|
-
this.routerSubscription.unsubscribe();
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
/**
|
|
332
|
-
* @return {?}
|
|
333
|
-
*/
|
|
334
|
-
ToolbarService.prototype.getToolbarActions = /**
|
|
335
|
-
* @return {?}
|
|
336
|
-
*/
|
|
337
|
-
function () {
|
|
338
|
-
return this.toolbarActions;
|
|
339
|
-
};
|
|
340
|
-
/**
|
|
341
|
-
* @param {?} action
|
|
342
|
-
* @return {?}
|
|
343
|
-
*/
|
|
344
|
-
ToolbarService.prototype.addToolbarAction = /**
|
|
345
|
-
* @param {?} action
|
|
346
|
-
* @return {?}
|
|
347
|
-
*/
|
|
348
|
-
function (action) {
|
|
349
|
-
var _this = this;
|
|
350
|
-
this.translate
|
|
351
|
-
.get(action.i18nActionKey)
|
|
352
|
-
.toPromise()
|
|
353
|
-
.then((/**
|
|
354
|
-
* @param {?} translated
|
|
355
|
-
* @return {?}
|
|
356
|
-
*/
|
|
357
|
-
function (translated) {
|
|
358
|
-
action.actionName = translated;
|
|
359
|
-
_this.toolbarActions.push(action);
|
|
360
|
-
}));
|
|
361
|
-
};
|
|
362
|
-
Object.defineProperty(ToolbarService.prototype, "toolbarTitle", {
|
|
363
|
-
get: /**
|
|
364
|
-
* @return {?}
|
|
365
|
-
*/
|
|
366
|
-
function () {
|
|
367
|
-
return this.title;
|
|
368
|
-
},
|
|
369
|
-
set: /**
|
|
370
|
-
* @param {?} toolbarTitle
|
|
371
|
-
* @return {?}
|
|
372
|
-
*/
|
|
373
|
-
function (toolbarTitle) {
|
|
374
|
-
this.title = toolbarTitle;
|
|
375
|
-
},
|
|
376
|
-
enumerable: true,
|
|
377
|
-
configurable: true
|
|
378
|
-
});
|
|
379
|
-
/**
|
|
380
|
-
* @param {?} dataTitle
|
|
381
|
-
* @return {?}
|
|
382
|
-
*/
|
|
383
|
-
ToolbarService.prototype.setDataTitle = /**
|
|
384
|
-
* @param {?} dataTitle
|
|
385
|
-
* @return {?}
|
|
386
|
-
*/
|
|
387
|
-
function (dataTitle) {
|
|
388
|
-
this.dataTitle = dataTitle;
|
|
389
|
-
};
|
|
390
|
-
/**
|
|
391
|
-
* @return {?}
|
|
392
|
-
*/
|
|
393
|
-
ToolbarService.prototype.getDataTitle = /**
|
|
394
|
-
* @return {?}
|
|
395
|
-
*/
|
|
396
|
-
function () {
|
|
397
|
-
return this.dataTitle;
|
|
398
|
-
};
|
|
399
|
-
/**
|
|
400
|
-
* @return {?}
|
|
401
|
-
*/
|
|
402
|
-
ToolbarService.prototype.clearToolbarActions = /**
|
|
403
|
-
* @return {?}
|
|
404
|
-
*/
|
|
405
|
-
function () {
|
|
406
|
-
this.toolbarActions = [];
|
|
407
|
-
};
|
|
408
|
-
/**
|
|
409
|
-
* @return {?}
|
|
410
|
-
*/
|
|
411
|
-
ToolbarService.prototype.getMainActions = /**
|
|
412
|
-
* @return {?}
|
|
413
|
-
*/
|
|
414
|
-
function () {
|
|
415
|
-
return this.mainActions;
|
|
416
|
-
};
|
|
417
|
-
/**
|
|
418
|
-
* @return {?}
|
|
419
|
-
*/
|
|
420
|
-
ToolbarService.prototype.getBackAction = /**
|
|
421
|
-
* @return {?}
|
|
422
|
-
*/
|
|
423
|
-
function () {
|
|
424
|
-
return this.backAction;
|
|
425
|
-
};
|
|
426
|
-
/**
|
|
427
|
-
* @param {?} mainAction
|
|
428
|
-
* @return {?}
|
|
429
|
-
*/
|
|
430
|
-
ToolbarService.prototype.addMainAction = /**
|
|
431
|
-
* @param {?} mainAction
|
|
432
|
-
* @return {?}
|
|
433
|
-
*/
|
|
434
|
-
function (mainAction) {
|
|
435
|
-
var _this = this;
|
|
436
|
-
this.translate
|
|
437
|
-
.get(mainAction.i18nActionKey)
|
|
438
|
-
.toPromise()
|
|
439
|
-
.then((/**
|
|
440
|
-
* @param {?} translated
|
|
441
|
-
* @return {?}
|
|
442
|
-
*/
|
|
443
|
-
function (translated) {
|
|
444
|
-
mainAction.actionName = translated;
|
|
445
|
-
_this.mainActions.push(mainAction);
|
|
446
|
-
}));
|
|
447
|
-
};
|
|
448
|
-
/**
|
|
449
|
-
* Per default the goBackRoute is a routerLink. But if a href should be used (for absolute browser routing) then isAbsoluteUrl can be set to true.
|
|
450
|
-
*/
|
|
451
|
-
/**
|
|
452
|
-
* Per default the goBackRoute is a routerLink. But if a href should be used (for absolute browser routing) then isAbsoluteUrl can be set to true.
|
|
453
|
-
* @param {?} goBackRoute
|
|
454
|
-
* @param {?=} isAbsoluteUrl
|
|
455
|
-
* @return {?}
|
|
456
|
-
*/
|
|
457
|
-
ToolbarService.prototype.addBackAction = /**
|
|
458
|
-
* Per default the goBackRoute is a routerLink. But if a href should be used (for absolute browser routing) then isAbsoluteUrl can be set to true.
|
|
459
|
-
* @param {?} goBackRoute
|
|
460
|
-
* @param {?=} isAbsoluteUrl
|
|
461
|
-
* @return {?}
|
|
462
|
-
*/
|
|
463
|
-
function (goBackRoute, isAbsoluteUrl) {
|
|
464
|
-
if (isAbsoluteUrl === void 0) { isAbsoluteUrl = false; }
|
|
465
|
-
this.backAction = {
|
|
466
|
-
matIcon: 'keyboard_backspace',
|
|
467
|
-
i18nActionKey: '',
|
|
468
|
-
};
|
|
469
|
-
if (!isAbsoluteUrl) {
|
|
470
|
-
this.backAction.routerLink = goBackRoute;
|
|
471
|
-
}
|
|
472
|
-
else {
|
|
473
|
-
this.backAction.href = goBackRoute;
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
/**
|
|
477
|
-
* @return {?}
|
|
478
|
-
*/
|
|
479
|
-
ToolbarService.prototype.clearMainActions = /**
|
|
480
|
-
* @return {?}
|
|
481
|
-
*/
|
|
482
|
-
function () {
|
|
483
|
-
this.mainActions = [];
|
|
484
|
-
};
|
|
485
|
-
ToolbarService.decorators = [
|
|
486
|
-
{ type: core.Injectable, args: [{
|
|
487
|
-
providedIn: 'root',
|
|
488
|
-
},] }
|
|
489
|
-
];
|
|
490
|
-
/** @nocollapse */
|
|
491
|
-
ToolbarService.ctorParameters = function () { return [
|
|
492
|
-
{ type: router.Router },
|
|
493
|
-
{ type: core$1.TranslateService }
|
|
494
|
-
]; };
|
|
495
|
-
/** @nocollapse */ ToolbarService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function ToolbarService_Factory() { return new ToolbarService(core.ɵɵinject(router.Router), core.ɵɵinject(core$1.TranslateService)); }, token: ToolbarService, providedIn: "root" });
|
|
496
|
-
return ToolbarService;
|
|
497
|
-
}());
|
|
498
|
-
if (false) {
|
|
499
|
-
/** @type {?} */
|
|
500
|
-
ToolbarService.prototype.backAction;
|
|
501
|
-
/** @type {?} */
|
|
502
|
-
ToolbarService.prototype.mainActions;
|
|
503
|
-
/** @type {?} */
|
|
504
|
-
ToolbarService.prototype.toolbarActions;
|
|
505
|
-
/** @type {?} */
|
|
506
|
-
ToolbarService.prototype.addNewButtonRoute;
|
|
507
|
-
/** @type {?} */
|
|
508
|
-
ToolbarService.prototype.liftFabButtonHigher;
|
|
509
|
-
/** @type {?} */
|
|
510
|
-
ToolbarService.prototype.dataTitle;
|
|
511
|
-
/** @type {?} */
|
|
512
|
-
ToolbarService.prototype.routerSubscription;
|
|
513
|
-
/**
|
|
514
|
-
* @type {?}
|
|
515
|
-
* @private
|
|
516
|
-
*/
|
|
517
|
-
ToolbarService.prototype.title;
|
|
518
|
-
/**
|
|
519
|
-
* @type {?}
|
|
520
|
-
* @private
|
|
521
|
-
*/
|
|
522
|
-
ToolbarService.prototype.router;
|
|
523
|
-
/**
|
|
524
|
-
* @type {?}
|
|
525
|
-
* @private
|
|
526
|
-
*/
|
|
527
|
-
ToolbarService.prototype.translate;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* @fileoverview added by tsickle
|
|
532
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
533
|
-
*/
|
|
534
|
-
var ToolbarComponent = /** @class */ (function () {
|
|
535
|
-
function ToolbarComponent(breakpointObserver, titleService, toolbarService) {
|
|
536
|
-
this.breakpointObserver = breakpointObserver;
|
|
537
|
-
this.titleService = titleService;
|
|
538
|
-
this.toolbarService = toolbarService;
|
|
539
|
-
this.isHandset$ = this.breakpointObserver.observe([layout.Breakpoints.Handset]).pipe(operators.map((/**
|
|
540
|
-
* @param {?} result
|
|
541
|
-
* @return {?}
|
|
542
|
-
*/
|
|
543
|
-
function (result) { return result.matches; })));
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* @return {?}
|
|
547
|
-
*/
|
|
548
|
-
ToolbarComponent.prototype.getTitle = /**
|
|
549
|
-
* @return {?}
|
|
550
|
-
*/
|
|
551
|
-
function () {
|
|
552
|
-
/** @type {?} */
|
|
553
|
-
var dataTitle = this.toolbarService.getDataTitle();
|
|
554
|
-
/** @type {?} */
|
|
555
|
-
var toolbarTitle = this.toolbarService.toolbarTitle;
|
|
556
|
-
/** @type {?} */
|
|
557
|
-
var title = !toolbarTitle || toolbarTitle.length <= 0 ? this.titleService.getTitle() : toolbarTitle;
|
|
558
|
-
return !dataTitle || dataTitle.length <= 0 ? title : title + ': ' + dataTitle;
|
|
559
|
-
};
|
|
560
|
-
/**
|
|
561
|
-
* @return {?}
|
|
562
|
-
*/
|
|
563
|
-
ToolbarComponent.prototype.getToolbarActions = /**
|
|
564
|
-
* @return {?}
|
|
565
|
-
*/
|
|
566
|
-
function () {
|
|
567
|
-
return this.toolbarService.getToolbarActions();
|
|
568
|
-
};
|
|
569
|
-
/**
|
|
570
|
-
* @return {?}
|
|
571
|
-
*/
|
|
572
|
-
ToolbarComponent.prototype.getMainActions = /**
|
|
573
|
-
* @return {?}
|
|
574
|
-
*/
|
|
575
|
-
function () {
|
|
576
|
-
return this.toolbarService.getMainActions();
|
|
577
|
-
};
|
|
578
|
-
/**
|
|
579
|
-
* @param {?} action
|
|
580
|
-
* @return {?}
|
|
581
|
-
*/
|
|
582
|
-
ToolbarComponent.prototype.hasPermission = /**
|
|
583
|
-
* @param {?} action
|
|
584
|
-
* @return {?}
|
|
585
|
-
*/
|
|
586
|
-
function (action) {
|
|
587
|
-
if (!action || !action.showIf) {
|
|
588
|
-
return rxjs.of(true);
|
|
589
|
-
}
|
|
590
|
-
return action.showIf;
|
|
591
|
-
};
|
|
592
|
-
/**
|
|
593
|
-
* @return {?}
|
|
594
|
-
*/
|
|
595
|
-
ToolbarComponent.prototype.isRouterLink = /**
|
|
596
|
-
* @return {?}
|
|
597
|
-
*/
|
|
598
|
-
function () {
|
|
599
|
-
return this.toolbarService.getBackAction() && !!this.toolbarService.getBackAction().routerLink;
|
|
600
|
-
};
|
|
601
|
-
/**
|
|
602
|
-
* @return {?}
|
|
603
|
-
*/
|
|
604
|
-
ToolbarComponent.prototype.isAbsoluteLink = /**
|
|
605
|
-
* @return {?}
|
|
606
|
-
*/
|
|
607
|
-
function () {
|
|
608
|
-
return this.toolbarService.getBackAction() && !!this.toolbarService.getBackAction().href;
|
|
609
|
-
};
|
|
610
|
-
/**
|
|
611
|
-
* @return {?}
|
|
612
|
-
*/
|
|
613
|
-
ToolbarComponent.prototype.getBackAction = /**
|
|
614
|
-
* @return {?}
|
|
615
|
-
*/
|
|
616
|
-
function () {
|
|
617
|
-
return this.toolbarService.getBackAction();
|
|
618
|
-
};
|
|
619
|
-
ToolbarComponent.decorators = [
|
|
620
|
-
{ type: core.Component, args: [{
|
|
621
|
-
selector: 'mad-toolbar',
|
|
622
|
-
template: "<mat-toolbar class=\"content-toolbar\">\r\n <a [routerLink]=\"getBackAction().routerLink\" *ngIf=\"isRouterLink()\">\r\n <button [id]=\"'go-back'\" color=\"primary\" mat-icon-button class=\"go-back-button\">\r\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\r\n </button>\r\n </a>\r\n <a [href]=\"getBackAction().href\" *ngIf=\"isAbsoluteLink()\">\r\n <button [id]=\"'go-back'\" color=\"primary\" mat-icon-button class=\"go-back-button\">\r\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\r\n </button>\r\n </a>\r\n\r\n <span class=\"toolbar-title\">{{ getTitle() }}</span>\r\n\r\n <ng-container *ngFor=\"let mainAction of getMainActions(); let i = index\">\r\n <ng-container *ngIf=\"hasPermission(mainAction) | async\">\r\n <div *ngIf=\"!(isHandset$ | async)\">\r\n <a [routerLink]=\"mainAction.routerLink\">\r\n <button [id]=\"mainAction.matIcon\" color=\"primary\" mat-flat-button style=\"margin-left: 56px\">\r\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\r\n {{ mainAction.actionName }}\r\n </button>\r\n </a>\r\n </div>\r\n <div *ngIf=\"isHandset$ | async\">\r\n <mad-material-action-button\r\n [actionName]=\"mainAction.actionName\"\r\n [icon]=\"mainAction.matIcon\"\r\n [liftHigher]=\"mainAction.liftHigherOnMobile\"\r\n [liftHigher2]=\"i > 0\"\r\n [routerLink]=\"mainAction.routerLink\"\r\n [id]=\"mainAction.matIcon\"\r\n >\r\n </mad-material-action-button>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <div class=\"right-aligned no-print\">\r\n <ng-container *ngFor=\"let action of getToolbarActions(); let i = index\">\r\n <ng-container *ngIf=\"hasPermission(action) | async\">\r\n <button\r\n *ngIf=\"!(isHandset$ | async) || i < (getToolbarActions().length > 2 ? 1 : 2)\"\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"action.action()\"\r\n [matTooltip]=\"action.actionName\"\r\n [id]=\"action.matIcon\"\r\n >\r\n <mat-icon>{{ action.matIcon }}</mat-icon>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"isHandset$ | async\">\r\n <ng-container *ngIf=\"getToolbarActions().length > 2\">\r\n <button mat-icon-button type=\"button\" [matMenuTriggerFor]=\"burgerMenu\" matTooltip=\"More\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #burgerMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let action of getToolbarActions(); let i = index\">\r\n <ng-container *ngIf=\"hasPermission(action) | async\">\r\n <button *ngIf=\"i >= 1\" mat-menu-item (click)=\"action.action()\">\r\n <mat-icon>{{ action.matIcon }}</mat-icon>\r\n {{ action.actionName }}\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </mat-menu>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</mat-toolbar>\r\n",
|
|
623
|
-
styles: ["mat-toolbar{background:#fff}.content-toolbar{height:57px;border-bottom:1px solid #dcdcdc}.right-aligned{overflow:hidden;margin-left:auto;margin-right:0}.go-back-button{padding-left:0;padding-right:0}.toolbar-title{margin-right:72px}"]
|
|
624
|
-
}] }
|
|
625
|
-
];
|
|
626
|
-
/** @nocollapse */
|
|
627
|
-
ToolbarComponent.ctorParameters = function () { return [
|
|
628
|
-
{ type: layout.BreakpointObserver },
|
|
629
|
-
{ type: platformBrowser.Title },
|
|
630
|
-
{ type: ToolbarService }
|
|
631
|
-
]; };
|
|
632
|
-
return ToolbarComponent;
|
|
633
|
-
}());
|
|
634
|
-
if (false) {
|
|
635
|
-
/** @type {?} */
|
|
636
|
-
ToolbarComponent.prototype.isHandset$;
|
|
637
|
-
/**
|
|
638
|
-
* @type {?}
|
|
639
|
-
* @private
|
|
640
|
-
*/
|
|
641
|
-
ToolbarComponent.prototype.breakpointObserver;
|
|
642
|
-
/**
|
|
643
|
-
* @type {?}
|
|
644
|
-
* @private
|
|
645
|
-
*/
|
|
646
|
-
ToolbarComponent.prototype.titleService;
|
|
647
|
-
/**
|
|
648
|
-
* @type {?}
|
|
649
|
-
* @private
|
|
650
|
-
*/
|
|
651
|
-
ToolbarComponent.prototype.toolbarService;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* @fileoverview added by tsickle
|
|
656
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
657
|
-
*/
|
|
658
|
-
var ToolbarModule = /** @class */ (function () {
|
|
659
|
-
function ToolbarModule() {
|
|
660
|
-
}
|
|
661
|
-
ToolbarModule.decorators = [
|
|
662
|
-
{ type: core.NgModule, args: [{
|
|
663
|
-
declarations: [ToolbarComponent],
|
|
664
|
-
imports: [
|
|
665
|
-
common.CommonModule,
|
|
666
|
-
router.RouterModule,
|
|
667
|
-
material.MatMenuModule,
|
|
668
|
-
material.MatButtonModule,
|
|
669
|
-
material.MatToolbarModule,
|
|
670
|
-
material.MatIconModule,
|
|
671
|
-
MaterialActionButtonModule,
|
|
672
|
-
material.MatTooltipModule,
|
|
673
|
-
],
|
|
674
|
-
exports: [ToolbarComponent],
|
|
675
|
-
},] }
|
|
676
|
-
];
|
|
677
|
-
return ToolbarModule;
|
|
678
|
-
}());
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* @fileoverview added by tsickle
|
|
682
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
683
|
-
*/
|
|
684
|
-
/**
|
|
685
|
-
* @record
|
|
686
|
-
*/
|
|
687
|
-
function Action() { }
|
|
688
|
-
if (false) {
|
|
689
|
-
/** @type {?} */
|
|
690
|
-
Action.prototype.matIcon;
|
|
691
|
-
/** @type {?} */
|
|
692
|
-
Action.prototype.i18nActionKey;
|
|
693
|
-
/** @type {?|undefined} */
|
|
694
|
-
Action.prototype.actionName;
|
|
695
|
-
/** @type {?|undefined} */
|
|
696
|
-
Action.prototype.showIf;
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* @record
|
|
700
|
-
*/
|
|
701
|
-
function MainAction() { }
|
|
702
|
-
if (false) {
|
|
703
|
-
/** @type {?} */
|
|
704
|
-
MainAction.prototype.routerLink;
|
|
705
|
-
/** @type {?|undefined} */
|
|
706
|
-
MainAction.prototype.liftHigherOnMobile;
|
|
707
|
-
}
|
|
708
|
-
/**
|
|
709
|
-
* @record
|
|
710
|
-
*/
|
|
711
|
-
function BackAction() { }
|
|
712
|
-
if (false) {
|
|
713
|
-
/** @type {?|undefined} */
|
|
714
|
-
BackAction.prototype.routerLink;
|
|
715
|
-
/** @type {?|undefined} */
|
|
716
|
-
BackAction.prototype.href;
|
|
717
|
-
}
|
|
718
|
-
/**
|
|
719
|
-
* @record
|
|
720
|
-
*/
|
|
721
|
-
function ToolbarAction() { }
|
|
722
|
-
if (false) {
|
|
723
|
-
/** @type {?} */
|
|
724
|
-
ToolbarAction.prototype.action;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* @fileoverview added by tsickle
|
|
729
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
730
|
-
*/
|
|
731
|
-
var MaterialAddonsModule = /** @class */ (function () {
|
|
732
|
-
function MaterialAddonsModule() {
|
|
733
|
-
}
|
|
734
|
-
MaterialAddonsModule.decorators = [
|
|
735
|
-
{ type: core.NgModule, args: [{
|
|
736
|
-
exports: [ReadOnlyFormFieldModule, ToolbarModule, MaterialActionButtonModule],
|
|
737
|
-
},] }
|
|
738
|
-
];
|
|
739
|
-
return MaterialAddonsModule;
|
|
740
|
-
}());
|
|
741
|
-
|
|
742
|
-
exports.MaterialActionButtonComponent = MaterialActionButtonComponent;
|
|
743
|
-
exports.MaterialActionButtonModule = MaterialActionButtonModule;
|
|
744
|
-
exports.MaterialAddonsModule = MaterialAddonsModule;
|
|
745
|
-
exports.ReadOnlyFormFieldComponent = ReadOnlyFormFieldComponent;
|
|
746
|
-
exports.ReadOnlyFormFieldModule = ReadOnlyFormFieldModule;
|
|
747
|
-
exports.ReadOnlyFormFieldWrapperComponent = ReadOnlyFormFieldWrapperComponent;
|
|
748
|
-
exports.ToolbarComponent = ToolbarComponent;
|
|
749
|
-
exports.ToolbarModule = ToolbarModule;
|
|
750
|
-
exports.ToolbarService = ToolbarService;
|
|
751
|
-
|
|
752
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
753
|
-
|
|
754
|
-
}));
|
|
755
|
-
//# sourceMappingURL=porscheinformatik-material-addons.umd.js.map
|