@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(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")):"function"==typeof define&&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"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).porscheinformatik=t.porscheinformatik||{},t.porscheinformatik["material-addons"]={}),t.ng.core,t.ng.common,t.ng.router,t.ng.material.button,t.ng.material.icon,t.ng.material.tooltip,t.ng.material.formField,t.ng.material.input,t.ng.forms,t.ng.platformBrowser,t.i2,t.rxjs,t.ng.cdk.layout,t.rxjs.operators,t.ng.material.menu,t.ng.material.toolbar,t.ng.material.badge,t.ng.material.card,t.ng.animations,t.ng.material.table,t.ng.material.sort,t.ng.material.paginator)}(this,(function(t,e,n,i,o,a,r,l,s,u,c,p,d,m,h,g,f,y,b,v,I,S,
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(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")):"function"==typeof define&&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"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).porscheinformatik=t.porscheinformatik||{},t.porscheinformatik["material-addons"]={}),t.ng.core,t.ng.common,t.ng.router,t.ng.material.button,t.ng.material.icon,t.ng.material.tooltip,t.ng.material.formField,t.ng.material.input,t.ng.forms,t.ng.platformBrowser,t.i2,t.rxjs,t.ng.cdk.layout,t.rxjs.operators,t.ng.material.menu,t.ng.material.toolbar,t.ng.material.badge,t.ng.material.card,t.ng.animations,t.ng.material.table,t.ng.material.sort,t.ng.material.paginator)}(this,(function(t,e,n,i,o,a,r,l,s,u,c,p,d,m,h,g,f,y,b,v,I,S,A){"use strict";var x=function(){this.icon="add",this.liftHigher=!0,this.liftHigher2=!1};x.decorators=[{type:e.Component,args:[{selector:"mad-material-action-button",template:'<div class="material-action-button {{ liftHigher ? \'lift-higher\' : \'\' }} {{ liftHigher2 ? \'lift-higher-2\' : \'\' }}">\n <a [routerLink]="routerLink">\n <button [id]="id" mat-fab [matTooltipPosition]="\'left\'" [matTooltip]="actionName" color="primary" *ngIf="!liftHigher2">\n <mat-icon>{{ icon }}</mat-icon>\n </button>\n <button [id]="id" mat-mini-fab [matTooltipPosition]="\'left\'" [matTooltip]="actionName" color="accent" *ngIf="liftHigher2">\n <mat-icon>{{ icon }}</mat-icon>\n </button>\n </a>\n</div>\n',styles:[".material-action-button{align-items:center;bottom:20px;display:flex;flex-direction:column-reverse;position:fixed;right:20px;z-index:100}.lift-higher{bottom:61px}.lift-higher-2{bottom:121px;right:28px}"]}]}],x.propDecorators={actionName:[{type:e.Input}],id:[{type:e.Input}],icon:[{type:e.Input}],routerLink:[{type:e.Input}],liftHigher:[{type:e.Input}],liftHigher2:[{type:e.Input}]};var E=function(){};E.decorators=[{type:e.NgModule,args:[{declarations:[x],imports:[n.CommonModule,i.RouterModule,o.MatButtonModule,a.MatIconModule,r.MatTooltipModule],exports:[x]}]}];
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var M=function(t,e){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function w(t,e){function n(){this.constructor=t}M(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function T(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,a=n.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}Object.create;var C=function(){function t(){this.disableClick=function(t){return t.stopPropagation()}}return t.prototype.ngOnChanges=function(t){this.disableButton()},t.prototype.disableButton=function(){this.disabled?this.button.nativeElement.addEventListener("click",this.disableClick):this.button.nativeElement.removeEventListener("click",this.disableClick)},Object.defineProperty(t.prototype,"pointerEvent",{get:function(){return this.disabled?"none":"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"opacity",{get:function(){return this.disabled?"0.35":"1"},enumerable:!1,configurable:!0}),t}();C.propDecorators={pointerEvent:[{type:e.HostBinding,args:["style.pointer-events"]}],opacity:[{type:e.HostBinding,args:["style.opacity"]}]};var P=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);P.decorators=[{type:e.Component,args:[{selector:"mad-primary-button",template:'<button mat-raised-button color="primary" [type]="type" [title]="title" #btn>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],P.ctorParameters=function(){return[]},P.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var O=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);O.decorators=[{type:e.Component,args:[{selector:"mad-outline-button",template:'<button mat-stroked-button color="primary" [type]="type" [title]="title" #btn>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],O.ctorParameters=function(){return[]},O.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var D=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);D.decorators=[{type:e.Component,args:[{selector:"mad-link-button",template:'<button [title]="title" [type]="type" color="primary" #btn mat-button>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],D.ctorParameters=function(){return[]},D.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var F=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);F.decorators=[{type:e.Component,args:[{selector:"mad-icon-button",template:'<button mat-icon-button color="primary" [type]="type" [title]="title" #btn>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],F.ctorParameters=function(){return[]},F.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var N=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);N.decorators=[{type:e.Component,args:[{selector:"mad-danger-button",template:'<button mat-raised-button color="warn" [type]="type" [title]="title" #btn>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],N.ctorParameters=function(){return[]},N.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var L=function(){};L.decorators=[{type:e.NgModule,args:[{declarations:[P,O,D,N,F],imports:[n.CommonModule,i.RouterModule,o.MatButtonModule,a.MatIconModule,r.MatTooltipModule],exports:[P,O,D,N,F]}]}];var V=function(){function t(t,e){this.changeDetector=t,this.elementRef=e,this.readonly=!0,this.textAlign="left",this.formatNumber=!1,this.decimalPlaces=2,this.roundValue=!1,this.autofillDecimals=!1,this.unit=null,this.unitPosition="left",this.errorMessage=null,this.multiline=!1,this.rows=3,this.shrinkIfEmpty=!1,this.toolTipForInputEnabled=!1}return t.prototype.ngOnInit=function(){this.doRendering()},t.prototype.ngAfterViewInit=function(){this.setReadonlyFieldStyle(),this.doRendering()},t.prototype.ngAfterViewChecked=function(){this.setReadonlyFieldStyle(),this.setTooltipForOverflownField()},t.prototype.ngOnChanges=function(t){this.doRendering()},t.prototype.getLabel=function(){return this.label||this.extractLabel(),this.label},t.prototype.doRendering=function(){this.originalContent&&(this.readonly?this.changeDetector.detectChanges():this.correctWidth())},t.prototype.extractLabel=function(){if(!this.originalContent||!this.originalContent.nativeElement)return null;var t=this.originalContent.nativeElement.querySelector("mat-label");this.label=t?t.innerHTML:"mat-label is missing!"},t.prototype.correctWidth=function(){var t=this.originalContent.nativeElement.querySelector("mat-form-field");t&&t.setAttribute("style","width:100%")},t.prototype.setReadonlyFieldStyle=function(){var t,e,n=null===(e=null===(t=this.readOnlyContentWrapper)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.querySelector("input");if(n){var i=this.getTextOverFlowStyleValue();i&&n.setAttribute("style","text-overflow: "+i)}},t.prototype.getTextOverFlowStyleValue=function(){var t,e,n=null===(e=null===(t=this.elementRef)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.style.textOverflow;return n||"ellipsis"},t.prototype.setTooltipForOverflownField=function(){var t,e;if(this.isEllipsisForTextOverflowEnabled()){var n=null===(e=null===(t=this.readOnlyContentWrapper)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.querySelector("input");n&&(this.toolTipForInputEnabled=this.isTextOverflown(n),this.toolTipForInputEnabled&&(this.toolTipText=this.calculateToolTipText()),this.changeDetector.detectChanges())}},t.prototype.isEllipsisForTextOverflowEnabled=function(){return"ellipsis"===this.getTextOverFlowStyleValue()},t.prototype.isTextOverflown=function(t){return!!t&&t.offsetWidth<t.scrollWidth},t.prototype.calculateToolTipText=function(){return this.unit?"left"===this.unitPosition?this.unit+" "+this.value:this.value+" "+this.unit:this.value},t}();V.decorators=[{type:e.Component,args:[{selector:"mad-readonly-form-field-wrapper",template:'<div #contentWrapper [hidden]="readonly">\n <ng-content></ng-content>\n</div>\n\n<div #readOnlyContentWrapper>\n <ng-container *ngIf="!!readonly">\n <mad-readonly-form-field\n [label]="getLabel()"\n [value]="value"\n [textAlign]="textAlign"\n [formatNumber]="formatNumber"\n [decimalPlaces]="decimalPlaces"\n [roundDisplayValue]="roundValue"\n [autofillDecimals]="autofillDecimals"\n [unit]="unit"\n [unitPosition]="unitPosition"\n [errorMessage]="errorMessage"\n [multiline]="multiline"\n [rows]="rows"\n [shrinkIfEmpty]="shrinkIfEmpty"\n [id]="id"\n matTooltip="{{toolTipText}}"\n matTooltipPosition="right"\n matTooltipClass="custom-tooltip"\n matTooltipDisabled="{{!toolTipForInputEnabled}}">\n </mad-readonly-form-field>\n </ng-container>\n</div>\n',styles:["div,mat-form-field{width:inherit}::ng-deep .custom-tooltip{font-size:14px!important;white-space:normal!important;word-break:break-all!important}"]}]}],V.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},V.propDecorators={readonly:[{type:e.Input}],value:[{type:e.Input,args:["value"]}],originalContent:[{type:e.ViewChild,args:["contentWrapper",{static:!1}]}],readOnlyContentWrapper:[{type:e.ViewChild,args:["readOnlyContentWrapper",{static:!1}]}],textAlign:[{type:e.Input,args:["textAlign"]}],formatNumber:[{type:e.Input,args:["formatNumber"]}],decimalPlaces:[{type:e.Input,args:["decimalPlaces"]}],roundValue:[{type:e.Input,args:["roundDisplayValue"]}],autofillDecimals:[{type:e.Input,args:["autofillDecimals"]}],unit:[{type:e.Input,args:["unit"]}],unitPosition:[{type:e.Input,args:["unitPosition"]}],errorMessage:[{type:e.Input,args:["errorMessage"]}],id:[{type:e.Input}],multiline:[{type:e.Input}],rows:[{type:e.Input}],shrinkIfEmpty:[{type:e.Input}]};var R=function(){function t(e){this.allowedKeys=[];var n=1.1.toLocaleString(e).charAt(1);this.decimalSeparator=","===n?",":".",this.groupingSeparator=","===n?".":",",this.allowedKeys=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(k(arguments[e]));return t}(t.NUMBERS,[t.NEGATIVE,this.decimalSeparator])}return t.valueIsSet=function(t){return null!=t&&("string"!=typeof t||0!==t.length)},t.prototype.format=function(e,n){return t.valueIsSet(e)?this.formatNumber(e.toString().replace(new RegExp("[.]","g"),this.decimalSeparator),n):""},t.prototype.formatNumber=function(e,n){for(var i=this.valueOrDefault(null==n?void 0:n.autofillDecimals,t.DEFAULT_AUTOFILL_DECIMALS),o=this.valueOrDefault(null==n?void 0:n.decimalPlaces,t.DEFAULT_DECIMAL_PLACES),a=this.valueOrDefault(null==n?void 0:n.finalFormatting,t.DEFAULT_FINAL_FORMATTING),r=this.strip(e,{decimalPlaces:o,removeLeadingZeros:a}),l=r.indexOf(this.decimalSeparator),s=r.startsWith(t.NEGATIVE),u=l>-1?l:r.length;u>(s?4:3);)u-=3,r=r.substring(0,u)+this.groupingSeparator+r.substring(u,r.length);if(a&&o>0&&r){var c=r.indexOf(this.decimalSeparator);if(i){-1===c&&(c=r.length,r+=this.decimalSeparator),c=(r=this.addMissingLeadingZero(r,c)).indexOf(this.decimalSeparator);for(var p=r.length-c-1,d=0;d<o-p;d++)r+="0"}else r=this.addMissingLeadingZero(r,c)}return r},t.prototype.strip=function(e,n){var i,o,a=this.valueOrDefault(null==n?void 0:n.decimalPlaces,t.DEFAULT_DECIMAL_PLACES),r=this.valueOrDefault(null==n?void 0:n.removeLeadingZeros,t.DEFAULT_REMOVE_LEADING_ZEROS),l="",s=-1,u=-1,c=0;try{for(var p=T(e),d=p.next();!d.done;d=p.next()){var m=d.value;if(u++,this.allowedKeys.includes(m)){if(m===this.decimalSeparator){if(0===a)break;if(s>-1)continue;s=u}if("0"===m&&r&&(0===l.length&&u+1!==e.length||l===t.NEGATIVE)){c++;continue}if(m===t.NEGATIVE&&u>0)break;if(s>-1&&l.length+c>s+a)break;l+=m}else{if(m!==this.groupingSeparator)break;-1===s&&c++}}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return l},t.prototype.addMissingLeadingZero=function(e,n){var i=e.startsWith(t.NEGATIVE);return 0===n&&(e="0"+e),1===n&&i&&(e=e[0]+"0"+e.substring(1,e.length)),e},t.prototype.valueOrDefault=function(e,n){return t.valueIsSet(e)?e:n},t}();R.NEGATIVE="-",R.NUMBERS=["0","1","2","3","4","5","6","7","8","9"],R.DEFAULT_FINAL_FORMATTING=!0,R.DEFAULT_DECIMAL_PLACES=2,R.DEFAULT_AUTOFILL_DECIMALS=!1,R.DEFAULT_REMOVE_LEADING_ZEROS=!1,R.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new R(e.ɵɵinject(e.LOCALE_ID))},token:R,providedIn:"any"}),R.decorators=[{type:e.Injectable,args:[{providedIn:"any"}]}],R.ctorParameters=function(){return[{type:String,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]};var _=function(){function t(t,e,n){var i=this;this.changeDetector=t,this.renderer=e,this.numberFormatService=n,this.textAlign="left",this.formatNumber=!1,this.decimalPlaces=2,this.roundValue=!1,this.autofillDecimals=!1,this.unit=null,this.unitPosition="left",this.errorMessage=null,this.multiline=!1,this.rows=3,this.shrinkIfEmpty=!1,this.errorMatcher={isErrorState:function(){return!!i.errorMessage}}}return t.prototype.ngOnChanges=function(t){R.valueIsSet(this.value)?this.formatNumber&&"number"==typeof this.value&&(this.value=this.numberFormatService.format(this.value,{decimalPlaces:this.decimalPlaces,finalFormatting:!0,autofillDecimals:this.autofillDecimals})):(this.value="-",this.shrinkIfEmpty&&(this.rows=1)),this.changeDetector.detectChanges()},t.prototype.ngAfterViewChecked=function(){this.injectUnitSymbol()},t.prototype.injectUnitSymbol=function(){if(this.unit&&!this.unitSpan&&0!==this.inputEl.nativeElement.offsetWidth){var t=this.inputEl.nativeElement.parentNode.parentNode;this.unitSpan=this.renderer.createElement("span"),"left"===this.unitPosition?(this.renderer.setAttribute(this.unitSpan,"matPrefix",""),this.renderer.setStyle(this.unitSpan,"padding-right","5px"),this.renderer.insertBefore(t,this.unitSpan,t.children[0])):(this.renderer.setAttribute(this.unitSpan,"matSuffix",""),this.renderer.setStyle(this.unitSpan,"padding-left","5px"),this.renderer.appendChild(t,this.unitSpan))}if(this.unitSpan&&"left"===this.textAlign&&"right"===this.unitPosition){var e=window.getComputedStyle(this.inputEl.nativeElement.parentElement,null);this.unitSpan.style.position="absolute",this.unitSpan.style.marginTop=e.getPropertyValue("border-top-width"),this.unitSpan.style.paddingTop=e.getPropertyValue("padding-top"),this.unitSpan.style.paddingBottom=e.getPropertyValue("padding-bottom"),this.textSpan||(this.textSpan=document.createElement("span"),document.body.appendChild(this.textSpan),this.textSpan.style.font=e.getPropertyValue("font"),this.textSpan.style.fontSize=e.getPropertyValue("font-size"),this.textSpan.style.height="auto",this.textSpan.style.width="auto",this.textSpan.style.position="absolute",this.textSpan.style.top="0",this.textSpan.style.whiteSpace="no-wrap",this.textSpan.style.visibility="hidden"),this.textSpan.innerHTML=this.value;var n=Math.min(this.inputEl.nativeElement.clientWidth-this.unitSpan.clientWidth,Math.ceil(this.textSpan.clientWidth));this.unitSpan.style.left=n+"px"}this.unitSpan&&(this.unitSpan.textContent=this.unit)},t}();_.decorators=[{type:e.Component,args:[{selector:"mad-readonly-form-field",template:'<mat-form-field class="form-group" appearance="none">\n <mat-label>{{ label }}</mat-label>\n <input\n *ngIf="!multiline"\n [ngModel]="value"\n [ngClass]="\'text-\' + textAlign"\n [errorStateMatcher]="errorMatcher"\n [id]="id"\n readonly\n matInput\n #inputEl\n />\n\n <textarea\n *ngIf="multiline"\n [rows]="rows"\n [ngModel]="value"\n class="multiline"\n [errorStateMatcher]="errorMatcher"\n [id]="id"\n readonly\n matInput\n ></textarea>\n <mat-error>{{ errorMessage }}</mat-error>\n</mat-form-field>\n',styles:["mat-form-field{width:100%;width:-moz-available;width:-webkit-fill-available;width:stretch}mat-label{line-height:1.4}span[matPrefix]{padding-right:5px}span[matSuffix]{padding-left:5px}.text-left{text-align:left}.text-right{text-align:right}.multiline{resize:none}"]}]}],_.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.Renderer2},{type:R}]},_.propDecorators={value:[{type:e.Input,args:["value"]}],label:[{type:e.Input,args:["label"]}],textAlign:[{type:e.Input,args:["textAlign"]}],formatNumber:[{type:e.Input,args:["formatNumber"]}],decimalPlaces:[{type:e.Input,args:["decimalPlaces"]}],roundValue:[{type:e.Input,args:["roundDisplayValue"]}],autofillDecimals:[{type:e.Input,args:["autofillDecimals"]}],unit:[{type:e.Input,args:["unit"]}],unitPosition:[{type:e.Input,args:["unitPosition"]}],errorMessage:[{type:e.Input,args:["errorMessage"]}],multiline:[{type:e.Input}],rows:[{type:e.Input}],id:[{type:e.Input}],shrinkIfEmpty:[{type:e.Input}],inputEl:[{type:e.ViewChild,args:["inputEl"]}]};var B=function(){};B.decorators=[{type:e.NgModule,args:[{declarations:[_,V],imports:[n.CommonModule,i.RouterModule,l.MatFormFieldModule,s.MatInputModule,u.FormsModule,r.MatTooltipModule],exports:[_,V]}]}];var j=function(){function t(t,e){var n=this;this.router=t,this.translate=e,this.mainActions=[],this.toolbarActions=[],this.liftFabButtonHigher=!1,this.routerSubscription=this.router.events.subscribe((function(e){e instanceof i.NavigationEnd&&(n.currentUrl!==e.urlAfterRedirects&&(n.clearToolbarActions(),n.clearMainActions(),delete n.backAction,delete n.dataTitle),n.currentUrl=t.url)}))}return t.prototype.ngOnDestroy=function(){this.routerSubscription&&this.routerSubscription.unsubscribe()},t.prototype.getToolbarActions=function(){return this.toolbarActions},t.prototype.addToolbarAction=function(t){var e=this;this.translate.get(t.i18nActionKey).toPromise().then((function(n){t.actionName=n,e.toolbarActions.push(t)}))},Object.defineProperty(t.prototype,"toolbarTitle",{get:function(){return this.title},set:function(t){this.title=t},enumerable:!1,configurable:!0}),t.prototype.setDataTitle=function(t){this.dataTitle=t},t.prototype.getDataTitle=function(){return this.dataTitle},t.prototype.clearToolbarActions=function(){this.toolbarActions=[]},t.prototype.getMainActions=function(){return this.mainActions},t.prototype.getBackAction=function(){return this.backAction},t.prototype.addMainAction=function(t){var e=this;this.translate.get(t.i18nActionKey).toPromise().then((function(n){t.actionName=n,e.mainActions.push(t)}))},t.prototype.addBackAction=function(t,e){void 0===e&&(e=!1),this.backAction={matIcon:"keyboard_backspace",i18nActionKey:""},e?this.backAction.href=t:this.backAction.routerLink=t},t.prototype.addSimpleBackButton=function(t){void 0===t&&(t=!1),this.getBackAction()&&!t||(this.backAction={matIcon:"keyboard_backspace",i18nActionKey:"",action:function(){window.history.back()}})},t.prototype.clearMainActions=function(){this.mainActions=[]},t}();j.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new j(e.ɵɵinject(i.Router),e.ɵɵinject(p.TranslateService))},token:j,providedIn:"root"}),j.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],j.ctorParameters=function(){return[{type:i.Router},{type:p.TranslateService}]};var q=function(){function t(t,e,n){this.breakpointObserver=t,this.titleService=e,this.toolbarService=n,this.isHandset$=this.breakpointObserver.observe([m.Breakpoints.Handset]).pipe(h.map((function(t){return t.matches})))}return t.prototype.getTitle=function(){var t=this.toolbarService.getDataTitle(),e=this.toolbarService.toolbarTitle,n=!e||e.length<=0?this.titleService.getTitle():e;return!t||t.length<=0?n:n+": "+t},t.prototype.getToolbarActions=function(){return this.toolbarService.getToolbarActions()},t.prototype.getMainActions=function(){return this.toolbarService.getMainActions()},t.prototype.hasPermission=function(t){return t&&t.showIf?t.showIf:d.of(!0)},t.prototype.isRouterLink=function(){return this.toolbarService.getBackAction()&&!!this.toolbarService.getBackAction().routerLink},t.prototype.isAbsoluteLink=function(){return this.toolbarService.getBackAction()&&!!this.toolbarService.getBackAction().href},t.prototype.isAction=function(){return this.toolbarService.getBackAction()&&!!this.toolbarService.getBackAction().action},t.prototype.getBackAction=function(){return this.toolbarService.getBackAction()},t}();q.decorators=[{type:e.Component,args:[{selector:"mad-toolbar",template:'<mat-toolbar class="content-toolbar">\n <a [routerLink]="getBackAction().routerLink" *ngIf="isRouterLink()">\n <button [id]="\'go-back\'" color="primary" mat-icon-button class="go-back-button">\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n <a [href]="getBackAction().href" *ngIf="isAbsoluteLink()">\n <button [id]="\'go-back\'" class="go-back-button" color="primary" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n <a (click)="getBackAction().action()" *ngIf="isAction()">\n <button [id]="\'go-back\'" color="primary" mat-icon-button class="go-back-button">\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n\n <span class="toolbar-title">{{ getTitle() }}</span>\n\n <ng-container *ngFor="let mainAction of getMainActions(); let i = index">\n <ng-container *ngIf="hasPermission(mainAction) | async">\n <div *ngIf="!(isHandset$ | async)">\n <a [routerLink]="mainAction.routerLink">\n <mad-primary-button [id]="mainAction.matIcon" style="margin-left: 56px">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </mad-primary-button>\n </a>\n </div>\n <div *ngIf="isHandset$ | async">\n <mad-material-action-button\n [actionName]="mainAction.actionName"\n [icon]="mainAction.matIcon"\n [liftHigher]="mainAction.liftHigherOnMobile"\n [liftHigher2]="i > 0"\n [routerLink]="mainAction.routerLink"\n [id]="mainAction.matIcon"\n >\n </mad-material-action-button>\n </div>\n </ng-container>\n </ng-container>\n\n <div class="right-aligned no-print">\n <ng-container *ngFor="let action of getToolbarActions(); let i = index">\n <ng-container *ngIf="hasPermission(action) | async">\n <mad-icon-button\n (click)="action.action()"\n *ngIf="!(isHandset$ | async) || i < (getToolbarActions().length > 2 ? 1 : 2)"\n [id]="action.matIcon"\n [matTooltip]="action.actionName"\n type="button"\n >\n <mat-icon\n [matBadgeColor]="action.badge ? action.badge.color : \'primary\'"\n matBadgePosition="below after"\n [matBadge]="action.badge ? action.badge.value : null"\n >{{ action.matIcon }}</mat-icon\n >\n </mad-icon-button>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf="isHandset$ | async">\n <ng-container *ngIf="getToolbarActions().length > 2">\n <button mat-icon-button type="button" [matMenuTriggerFor]="burgerMenu" matTooltip="More">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #burgerMenu="matMenu">\n <ng-container *ngFor="let action of getToolbarActions(); let i = index">\n <ng-container *ngIf="hasPermission(action) | async">\n <button *ngIf="i >= 1" mat-menu-item (click)="action.action()">\n <mat-icon\n [matBadgeColor]="action.badge ? action.badge.color : \'primary\'"\n [matBadge]="action.badge ? action.badge.value : null"\n matBadgePosition="below after"\n >{{ action.matIcon }}</mat-icon>\n {{ action.actionName }}\n </button>\n </ng-container>\n </ng-container>\n </mat-menu>\n </ng-container>\n </ng-container>\n </div>\n</mat-toolbar>\n',styles:["mat-toolbar{background:#fff}.content-toolbar{border-bottom:1px solid #dcdcdc;height:57px}.right-aligned{margin-left:auto;margin-right:0;overflow:hidden}.go-back-button{padding-left:0;padding-right:0}.toolbar-title{margin-right:72px}::ng-deep.mat-badge-content{bottom:-7px!important;right:-7px!important}"]}]}],q.ctorParameters=function(){return[{type:m.BreakpointObserver},{type:c.Title},{type:j}]};var H=function(){};H.decorators=[{type:e.NgModule,args:[{declarations:[q],imports:[n.CommonModule,i.RouterModule,g.MatMenuModule,o.MatButtonModule,f.MatToolbarModule,a.MatIconModule,E,r.MatTooltipModule,L,y.MatBadgeModule],exports:[q]}]}];var U=new Set([224,91,93]),W=function(){function t(t,n,i){this.renderer=t,this.inputEl=n,this.numberFormatService=i,this.textAlign="right",this.decimalPlaces=2,this.roundValue=!1,this.autofillDecimals=!1,this.unit=null,this.unitPosition="right",this.numericValueChanged=new e.EventEmitter,this.displayValue="",this.originalValue=NaN,this.onChange=function(){},this.onTouched=function(){}}return Object.defineProperty(t.prototype,"numericValue",{set:function(t){this._numericValue===t||isNaN(this._numericValue)&&(isNaN(t)||null===t)||(this.originalValue=t,this._numericValue=this.roundOrTruncate(t),this.handleInputChanged())},enumerable:!1,configurable:!0}),t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(){},t.prototype.writeValue=function(t){this.numericValue=t},t.prototype.ngOnInit=function(){var t=this;this.decimalPlaces=parseInt(this.decimalPlaces.toString(),10),this.inputChangeListener=this.renderer.listen(this.inputEl.nativeElement,"blur",(function(e){t.formatInput(e.target,!0)})),this.keyupListener=this.renderer.listen(this.inputEl.nativeElement,"keyup",(function(e){(8===e.keyCode||e.keyCode>=46&&!U.has(e.keyCode))&&t.formatInput(e.target,!1)})),this.keydownListener=this.renderer.listen(this.inputEl.nativeElement,"keydown",(function(e){var n=e.target.value;if(!(t.numberFormatService.allowedKeys.includes(e.key)||e.keyCode<=46&&e.keyCode>0&&32!==e.keyCode||e.metaKey||e.ctrlKey||e.altKey))return!1;var i=n.indexOf(R.NEGATIVE);if(e.key===R.NEGATIVE&&(e.target.selectionStart>0||i>-1)&&(e.target.selectionStart===e.target.selectionEnd||!(i>=e.target.selectionStart&&i<=e.target.selectionEnd)))return!1;var o=n.indexOf(t.numberFormatService.decimalSeparator);if(e.key===t.numberFormatService.decimalSeparator&&(o>-1||0===t.decimalPlaces)&&(e.target.selectionStart===e.target.selectionEnd||!(o>=e.target.selectionStart&&o<=e.target.selectionEnd)))return!1;if(R.NUMBERS.includes(e.key)&&o>-1&&o<e.target.selectionStart&&e.target.selectionStart===e.target.selectionEnd&&n.length>o+t.decimalPlaces)return!1;var a=e.target.selectionStart;if(a===e.target.selectionEnd){if(8===e.keyCode&&n.substr(a-1,1)===t.numberFormatService.groupingSeparator)return e.target.value=n.substring(0,a-2)+n.substring(a-1,n.length),e.target.selectionStart=e.target.selectionEnd=a-1,!1;if(46===e.keyCode&&n.substr(a,1)===t.numberFormatService.groupingSeparator)return e.target.value=n.substring(0,a+1)+n.substring(a+2,n.length),e.target.selectionStart=e.target.selectionEnd=a+1,!1}return t.originalValue=NaN,!0}))},t.prototype.ngOnDestroy=function(){this.detachListener()},t.prototype.ngAfterViewChecked=function(){this.injectUnitSymbol()},t.prototype.handleInputChanged=function(){var t=this;setTimeout((function(){t.updateInput(t.numberFormatService.format(t._numericValue,{decimalPlaces:t.decimalPlaces,finalFormatting:!1,autofillDecimals:t.autofillDecimals}))}),1)},t.prototype.formatInput=function(t,e){var n=t.selectionStart,i=t.value.length,o=this.displayValue!==t.value,a=this.numberFormatService.formatNumber(t.value,{decimalPlaces:this.decimalPlaces,finalFormatting:e,autofillDecimals:this.autofillDecimals});if("left"===this.textAlign&&"right"===this.unitPosition){var r=window.getComputedStyle(this.inputEl.nativeElement.parentElement,null);this.unitSpan.style.position="absolute",this.unitSpan.style.marginTop=r.getPropertyValue("border-top-width"),this.unitSpan.style.paddingTop=r.getPropertyValue("padding-top"),this.unitSpan.style.paddingBottom=r.getPropertyValue("padding-bottom"),this.textSpan||(this.textSpan=document.createElement("span"),document.body.appendChild(this.textSpan),this.textSpan.style.font=r.getPropertyValue("font"),this.textSpan.style.fontSize=r.getPropertyValue("font-size"),this.textSpan.style.height="auto",this.textSpan.style.width="auto",this.textSpan.style.position="absolute",this.textSpan.style.top="0",this.textSpan.style.whiteSpace="no-wrap",this.textSpan.style.visibility="hidden"),this.textSpan.innerHTML=a;var l=Math.min(this.inputEl.nativeElement.clientWidth-this.unitSpan.clientWidth,Math.ceil(this.textSpan.clientWidth));this.unitSpan.style.left=l+"px"}this.updateInput(a),o&&(t.selectionStart=t.selectionEnd=Math.max(n+t.value.length-i,0))},t.prototype.updateInput=function(t){this.displayValue=t,this.inputEl.nativeElement.value=t,this._numericValue=parseFloat(this.numberFormatService.strip(t,{decimalPlaces:this.decimalPlaces}).replace(this.numberFormatService.decimalSeparator,".")),this._numericValue!==this.roundOrTruncate(this.originalValue)&&(this.originalValue=this._numericValue,this.numericValueChanged.emit(this._numericValue))},t.prototype.getValueForFormControl=function(){if(this.formatInput(this.inputEl.nativeElement,!1),!isNaN(this._numericValue))return this._numericValue},t.prototype.injectUnitSymbol=function(){if(this.unit&&!this.unitSpan&&0!==this.inputEl.nativeElement.offsetWidth){var t=this.inputEl.nativeElement.parentNode.parentNode;this.unitSpan=this.renderer.createElement("span"),"left"===this.unitPosition?(this.renderer.setAttribute(this.unitSpan,"matPrefix",""),this.renderer.setStyle(this.unitSpan,"padding-right","5px"),this.renderer.insertBefore(t,this.unitSpan,t.children[0])):(this.renderer.setAttribute(this.unitSpan,"matSuffix",""),this.renderer.setStyle(this.unitSpan,"padding-left","5px"),this.renderer.appendChild(t,this.unitSpan))}this.unitSpan&&"left"===this.textAlign&&"right"===this.unitPosition&&(R.valueIsSet(this.displayValue)?this.unitSpan.style.display="unset":this.unitSpan.style.display="none"),this.unitSpan&&(this.unitSpan.textContent=this.unit)},t.prototype.detachListener=function(){this.inputChangeListener&&(this.inputChangeListener(),delete this.inputChangeListener),this.keydownListener&&(this.keydownListener(),delete this.keydownListener),this.keyupListener&&(this.keyupListener(),delete this.keyupListener)},t.prototype.roundOrTruncate=function(t){var e=this.roundValue?"round":t<0?"ceil":"floor";return Math[e](t*Math.pow(10,this.decimalPlaces))/Math.pow(10,this.decimalPlaces)},t}();W.decorators=[{type:e.Directive,args:[{selector:"[madNumericField]",host:{"[class.text-right]":'textAlign === "right"',"(change)":"onChange(getValueForFormControl())","(input)":"onChange(getValueForFormControl())","(blur)":"onTouched()"},providers:[{provide:u.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return W})),multi:!0}]}]}],W.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:R}]},W.propDecorators={textAlign:[{type:e.Input,args:["textAlign"]}],decimalPlaces:[{type:e.Input,args:["decimalPlaces"]}],roundValue:[{type:e.Input,args:["roundDisplayValue"]}],autofillDecimals:[{type:e.Input,args:["autofillDecimals"]}],unit:[{type:e.Input,args:["unit"]}],unitPosition:[{type:e.Input,args:["unitPosition"]}],numericValueChanged:[{type:e.Output,args:["numericValueChange"]}],numericValue:[{type:e.Input,args:["numericValue"]}]};var z=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[R]}},t}();z.decorators=[{type:e.NgModule,args:[{providers:[R],declarations:[W],exports:[W]}]}];var G=function(){function t(){this.cancelDisabled=!1,this.cancelText="NOT SET",this.readonly=!0,this.editText="NOT SET",this.expandable=!0,this.expanded=!0,this.saveDisabled=!1,this.saveText="NOT SET",this.editMode=!1,this.edit=new e.EventEmitter,this.cancel=new e.EventEmitter,this.save=new e.EventEmitter}return t.prototype.onCancel=function(){this.cancel.emit(void 0)},t.prototype.onEdit=function(){this.edit.emit(void 0),this.expanded=!0},t.prototype.onSave=function(){this.save.emit(void 0)},t.prototype.toggleCollapse=function(){this.expanded=!this.expanded},t}();G.decorators=[{type:e.Component,args:[{selector:"mad-card",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',animations:[v.trigger("collapseExpandAnimation",[v.transition(":enter",[v.style({opacity:0,height:0,overflow:"hidden"}),v.animate("100ms",v.style({opacity:1,height:"*"}))]),v.transition(":leave",[v.style({opacity:1,height:"*",overflow:"hidden"}),v.animate("100ms",v.style({opacity:0,height:0}))])]),v.trigger("rotateIcon",[v.state("true",v.style({transform:"rotate(0)"})),v.state("false",v.style({transform:"rotate(180deg)"})),v.transition("true => false",v.animate("100ms ease-out")),v.transition("false => true",v.animate("100ms ease-in"))])],styles:["mat-card-header{display:flex;flex-direction:row}mat-card-header,mat-card-header mat-card-title{justify-content:space-between}mat-card-header mat-card-title:hover{background:unset!important}mat-card-header h3{float:left;font-weight:700;line-height:40px;margin:0 .25em 0 0}.mat-card-actions{margin-left:0;margin-right:0}.mat-card>.mat-card-actions:last-child{margin-bottom:0}"]}]}],G.propDecorators={cancelDisabled:[{type:e.Input}],cancelText:[{type:e.Input}],readonly:[{type:e.Input}],editText:[{type:e.Input}],expandable:[{type:e.Input}],expanded:[{type:e.Input}],saveDisabled:[{type:e.Input}],saveText:[{type:e.Input}],title:[{type:e.Input}],editMode:[{type:e.Input}],edit:[{type:e.Output}],cancel:[{type:e.Output}],save:[{type:e.Output}]};var K=function(){function t(){this.throttleTime=300,this.throttleClick=new e.EventEmitter,this.clicks=new d.Subject}return t.prototype.ngOnInit=function(){var t=this;this.subscription=this.clicks.pipe(h.throttleTime(this.throttleTime)).subscribe((function(e){return t.throttleClick.emit(e)}))},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.clickEvent=function(t){t.preventDefault(),t.stopPropagation(),this.clicks.next(t)},t}();K.decorators=[{type:e.Directive,args:[{selector:"[madThrottleClick]"}]}],K.ctorParameters=function(){return[]},K.propDecorators={throttleTime:[{type:e.Input}],throttleClick:[{type:e.Output}],clickEvent:[{type:e.HostListener,args:["click",["$event"]]}]};var $=function(){};$.decorators=[{type:e.NgModule,args:[{declarations:[K],imports:[n.CommonModule],exports:[K]}]}];var Z=function(){};Z.decorators=[{type:e.NgModule,args:[{declarations:[G],imports:[n.CommonModule,b.MatCardModule,a.MatIconModule,L,o.MatButtonModule,$],exports:[G]}]}];var Q=function(){function t(t){this.changeDetectorRef=t,this.allItems=[],this.addLabel="NOT SET",this.addPossible=!0,this.blankItem={},this.added=new e.EventEmitter,this.removed=new e.EventEmitter}return t.prototype.ngOnInit=function(){if(this.addEventFunction=this.addItem.bind(this),void 0!==this.minItems)for(var t=this.allItems.length;t<this.minItems;t++)this.interalAddItem()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){return t.setFocusOnAdd()}),1)},t.prototype.addItem=function(){var t=this.interalAddItem();t&&this.added.emit(t)},t.prototype.removeItem=function(t){this.isDeleteAllowed()&&(this.allItems.splice(this.allItems.indexOf(t),1),this.removed.emit(t))},t.prototype.setFocusOnAdd=function(){var t=this;this.rowCountFocus=this.itemRows.length,this.itemRows.changes.subscribe((function(e){if(e.length>t.rowCountFocus&&e.last){var n=e.last.nativeElement.querySelector("button, a, input, select, textarea, [tabindex]:not([tabindex='-1'])");n&&n.focus()}t.rowCountFocus=e.length}))},t.prototype.isAddAllowed=function(){return void 0===this.maxItems||this.allItems.length<this.maxItems},t.prototype.isDeleteAllowed=function(){return void 0===this.minItems||this.allItems.length>this.minItems},t.prototype.interalAddItem=function(){if(this.isAddAllowed()){var t=Object.assign({},this.blankItem);return t.id=Math.random().toString(36).substring(2),this.allItems.push(t),this.changeDetectorRef.detectChanges(),t}return null},t}();Q.decorators=[{type:e.Component,args:[{selector:"mad-quick-list",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'}]}],Q.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},Q.propDecorators={allItems:[{type:e.Input}],addLabel:[{type:e.Input}],addPossible:[{type:e.Input}],blankItem:[{type:e.Input}],readonly:[{type:e.Input}],maxItems:[{type:e.Input}],minItems:[{type:e.Input}],added:[{type:e.Output}],removed:[{type:e.Output}],itemTemplate:[{type:e.ContentChild,args:[e.TemplateRef]}],itemRows:[{type:e.ViewChildren,args:["row"]}]};var X=function(){};X.decorators=[{type:e.NgModule,args:[{declarations:[Q],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,L],exports:[Q]}]}];var J=function(){function t(){var t;this.ACTION_COLUMN_NAME="__action__",this.columns=[],this.filterLabel="NOT SET",this.filterPlaceholder="NOT SET",this.pageSizeOptions=[5,10,15],this.defaultPageSize=(null===(t=this.pageSizeOptions)||void 0===t?void 0:t[0])||10,this.rowActions=[],this.tableActions=[],this.tableAction=new e.EventEmitter,this.rowAction=new e.EventEmitter,this.sortEvent=new e.EventEmitter,this.isFilterEnabled=!1,this.isPaginationEnabled=!1}return Object.defineProperty(t.prototype,"displayedData",{set:function(t){this.dataSource?this.dataSource.data=t:this.dataSource=new I.MatTableDataSource(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paginationEnabled",{set:function(t){this.isPaginationEnabled=t;var e=this.isPaginationEnabled?this.defaultPageSize:Number.MAX_VALUE;this.dataSource.paginator&&this.dataSource.paginator._changePageSize(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"filterEnabled",{set:function(t){this.isFilterEnabled=t,this.setFilterValue(void 0)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.columnNames=this.columns.map((function(t){return t.label})),this.isRowClickable=this.rowActions.length>0,this.isRowClickable&&(this.columnNames.unshift(this.ACTION_COLUMN_NAME),this.defaultAction=this.rowActions[0])},t.prototype.ngAfterViewInit=function(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.filterPredicate=function(t,e){return!e||e.split(/\s+/).every((function(e){return!!Object.keys(t).find((function(n){return t[n].includes(e)}))}))}},t.prototype.onFilter=function(t){this.setFilterValue(t)},t.prototype.onRowEvent=function(t,e,n){void 0===n&&(n=this.defaultAction),n&&!this.isClickOnRowMenuIcon(t)&&this.rowAction.emit(Object.assign(Object.assign({},n),{outputRow:e}))},t.prototype.onSortingEvent=function(t){this.sortEvent.emit(t)},t.prototype.onTableAction=function(t){t&&this.tableAction.emit(t)},t.prototype.setFilterValue=function(t){this.dataSource.filter=null==t?void 0:t.trim().toLowerCase()},t.prototype.isClickOnRowMenuIcon=function(t){var e;return null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.classList.contains("mat-icon")},t}();J.decorators=[{type:e.Component,args:[{selector:"mad-table",template:'\x3c!-- Table actions --\x3e\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\x3c!-- Row action buttons --\x3e\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\x3c!-- Table filter --\x3e\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\x3c!-- Table --\x3e\n<div *ngIf="dataSource?.data?.length > 0; else noData">\n <table mat-table [dataSource]="dataSource" matSort (matSortChange)="onSortingEvent($event)">\n \x3c!-- Row actions column --\x3e\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 \x3c!-- Columns with data --\x3e\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 \x3c!-- Pagination --\x3e\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\x3c!-- No data alert --\x3e\n<ng-template #noData>\n <div class="noDataText">\n {{ noDataText }}\n </div>\n</ng-template>\n',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%}"]}]}],J.propDecorators={columns:[{type:e.Input}],filterLabel:[{type:e.Input}],filterPlaceholder:[{type:e.Input}],noDataText:[{type:e.Input}],pageSizeOptions:[{type:e.Input}],defaultPageSize:[{type:e.Input}],rowActions:[{type:e.Input}],tableActions:[{type:e.Input}],displayedData:[{type:e.Input}],paginationEnabled:[{type:e.Input}],filterEnabled:[{type:e.Input}],tableAction:[{type:e.Output}],rowAction:[{type:e.Output}],sortEvent:[{type:e.Output}],paginator:[{type:e.ViewChild,args:[x.MatPaginator,{static:!1}]}],sort:[{type:e.ViewChild,args:[S.MatSort,{static:!0}]}]};var Y=function(){};Y.decorators=[{type:e.NgModule,args:[{declarations:[J],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,l.MatFormFieldModule,s.MatInputModule,g.MatMenuModule,x.MatPaginatorModule,S.MatSortModule,I.MatTableModule,L],exports:[J]}]}];var tt=function(){};tt.decorators=[{type:e.NgModule,args:[{exports:[B,L,H,E,z,Z,X,$]}]}],t.ButtonModule=L,t.CardModule=Z,t.MaterialActionButtonComponent=A,t.MaterialActionButtonModule=E,t.MaterialAddonsModule=tt,t.NumberFormatService=R,t.NumericFieldModule=z,t.QuickListModule=X,t.ReadOnlyFormFieldComponent=_,t.ReadOnlyFormFieldModule=B,t.ReadOnlyFormFieldWrapperComponent=V,t.TableModule=Y,t.ThrottleClickDirective=K,t.ThrottleClickModule=$,t.ToolbarComponent=q,t.ToolbarModule=H,t.ToolbarService=j,t.ɵa=P,t.ɵb=C,t.ɵc=O,t.ɵd=D,t.ɵe=N,t.ɵf=F,t.ɵg=W,t.ɵh=G,t.ɵi=Q,t.ɵj=J,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
|
+
var M=function(t,e){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function w(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}M(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function T(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,a=n.call(t),r=[];try{for(;(void 0===e||e-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}Object.create;var C=function(){function t(){this.disableClick=function(t){return t.stopPropagation()}}return t.prototype.ngOnChanges=function(t){this.disableButton()},t.prototype.disableButton=function(){this.disabled?this.button.nativeElement.addEventListener("click",this.disableClick):this.button.nativeElement.removeEventListener("click",this.disableClick)},Object.defineProperty(t.prototype,"pointerEvent",{get:function(){return this.disabled?"none":"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"opacity",{get:function(){return this.disabled?"0.35":"1"},enumerable:!1,configurable:!0}),t}();C.propDecorators={pointerEvent:[{type:e.HostBinding,args:["style.pointer-events"]}],opacity:[{type:e.HostBinding,args:["style.opacity"]}]};var P=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);P.decorators=[{type:e.Component,args:[{selector:"mad-primary-button",template:'<button mat-raised-button color="primary" [type]="type" [title]="title" #btn>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],P.ctorParameters=function(){return[]},P.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var O=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);O.decorators=[{type:e.Component,args:[{selector:"mad-outline-button",template:'<button mat-stroked-button color="primary" [type]="type" [title]="title" #btn>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],O.ctorParameters=function(){return[]},O.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var D=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);D.decorators=[{type:e.Component,args:[{selector:"mad-link-button",template:'<button [title]="title" [type]="type" color="primary" #btn mat-button>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],D.ctorParameters=function(){return[]},D.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var F=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);F.decorators=[{type:e.Component,args:[{selector:"mad-icon-button",template:'<button mat-icon-button color="primary" [type]="type" [title]="title" #btn>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],F.ctorParameters=function(){return[]},F.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var N=function(t){function e(){var e=t.call(this)||this;return e.title="",t.prototype.button=e.button,t.prototype.disabled=e.disabled,e}return w(e,t),e}(C);N.decorators=[{type:e.Component,args:[{selector:"mad-danger-button",template:'<button mat-raised-button color="warn" [type]="type" [title]="title" #btn>\n <ng-content></ng-content>\n</button>\n',styles:[""]}]}],N.ctorParameters=function(){return[]},N.propDecorators={type:[{type:e.Input}],disabled:[{type:e.Input}],title:[{type:e.Input}],button:[{type:e.ViewChild,args:["btn",{read:e.ElementRef,static:!0}]}]};var L=function(){};L.decorators=[{type:e.NgModule,args:[{declarations:[P,O,D,N,F],imports:[n.CommonModule,i.RouterModule,o.MatButtonModule,a.MatIconModule,r.MatTooltipModule],exports:[P,O,D,N,F]}]}];var V=function(){function t(t,e){this.changeDetector=t,this.elementRef=e,this.readonly=!0,this.textAlign="left",this.formatNumber=!1,this.decimalPlaces=2,this.roundValue=!1,this.autofillDecimals=!1,this.unit=null,this.unitPosition="left",this.errorMessage=null,this.multiline=!1,this.rows=3,this.shrinkIfEmpty=!1,this.toolTipForInputEnabled=!1}return t.prototype.ngOnInit=function(){this.doRendering()},t.prototype.ngAfterViewInit=function(){this.setReadonlyFieldStyle(),this.doRendering()},t.prototype.ngAfterViewChecked=function(){this.setReadonlyFieldStyle(),this.setTooltipForOverflownField()},t.prototype.ngOnChanges=function(t){this.doRendering()},t.prototype.getLabel=function(){return this.label||this.extractLabel(),this.label},t.prototype.doRendering=function(){this.originalContent&&(this.readonly?this.changeDetector.detectChanges():this.correctWidth())},t.prototype.extractLabel=function(){if(!this.originalContent||!this.originalContent.nativeElement)return null;var t=this.originalContent.nativeElement.querySelector("mat-label");this.label=t?t.innerHTML:"mat-label is missing!"},t.prototype.correctWidth=function(){var t=this.originalContent.nativeElement.querySelector("mat-form-field");t&&t.setAttribute("style","width:100%")},t.prototype.setReadonlyFieldStyle=function(){var t,e,n=null===(e=null===(t=this.readOnlyContentWrapper)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.querySelector("input");if(n){var i=this.getTextOverFlowStyleValue();i&&n.setAttribute("style","text-overflow: "+i)}},t.prototype.getTextOverFlowStyleValue=function(){var t,e,n=null===(e=null===(t=this.elementRef)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.style.textOverflow;return n||"ellipsis"},t.prototype.setTooltipForOverflownField=function(){var t,e;if(this.isEllipsisForTextOverflowEnabled()){var n=null===(e=null===(t=this.readOnlyContentWrapper)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.querySelector("input");n&&(this.toolTipForInputEnabled=this.isTextOverflown(n),this.toolTipForInputEnabled&&(this.toolTipText=this.calculateToolTipText()),this.changeDetector.detectChanges())}},t.prototype.isEllipsisForTextOverflowEnabled=function(){return"ellipsis"===this.getTextOverFlowStyleValue()},t.prototype.isTextOverflown=function(t){return!!t&&t.offsetWidth<t.scrollWidth},t.prototype.calculateToolTipText=function(){return this.unit?"left"===this.unitPosition?this.unit+" "+this.value:this.value+" "+this.unit:this.value},t}();V.decorators=[{type:e.Component,args:[{selector:"mad-readonly-form-field-wrapper",template:'<div #contentWrapper [hidden]="readonly">\n <ng-content></ng-content>\n</div>\n\n<div #readOnlyContentWrapper>\n <ng-container *ngIf="!!readonly">\n <mad-readonly-form-field\n [label]="getLabel()"\n [value]="value"\n [textAlign]="textAlign"\n [formatNumber]="formatNumber"\n [decimalPlaces]="decimalPlaces"\n [roundDisplayValue]="roundValue"\n [autofillDecimals]="autofillDecimals"\n [unit]="unit"\n [unitPosition]="unitPosition"\n [errorMessage]="errorMessage"\n [multiline]="multiline"\n [rows]="rows"\n [shrinkIfEmpty]="shrinkIfEmpty"\n [id]="id"\n matTooltip="{{toolTipText}}"\n matTooltipPosition="right"\n matTooltipClass="custom-tooltip"\n matTooltipDisabled="{{!toolTipForInputEnabled}}">\n </mad-readonly-form-field>\n </ng-container>\n</div>\n',styles:["div,mat-form-field{width:inherit}::ng-deep .custom-tooltip{font-size:14px!important;white-space:normal!important;word-break:break-all!important}"]}]}],V.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},V.propDecorators={readonly:[{type:e.Input}],value:[{type:e.Input,args:["value"]}],originalContent:[{type:e.ViewChild,args:["contentWrapper",{static:!1}]}],readOnlyContentWrapper:[{type:e.ViewChild,args:["readOnlyContentWrapper",{static:!1}]}],textAlign:[{type:e.Input,args:["textAlign"]}],formatNumber:[{type:e.Input,args:["formatNumber"]}],decimalPlaces:[{type:e.Input,args:["decimalPlaces"]}],roundValue:[{type:e.Input,args:["roundDisplayValue"]}],autofillDecimals:[{type:e.Input,args:["autofillDecimals"]}],unit:[{type:e.Input,args:["unit"]}],unitPosition:[{type:e.Input,args:["unitPosition"]}],errorMessage:[{type:e.Input,args:["errorMessage"]}],id:[{type:e.Input}],multiline:[{type:e.Input}],rows:[{type:e.Input}],shrinkIfEmpty:[{type:e.Input}]};var R=function(){function t(e){this.allowedKeys=[];var n=1.1.toLocaleString(e).charAt(1);this.decimalSeparator=","===n?",":".",this.groupingSeparator=","===n?".":",",this.allowedKeys=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(k(arguments[e]));return t}(t.NUMBERS,[t.NEGATIVE,this.decimalSeparator])}return t.valueIsSet=function(t){return null!=t&&("string"!=typeof t||0!==t.length)},t.prototype.format=function(e,n){return t.valueIsSet(e)?this.formatNumber(e.toString().replace(new RegExp("[.]","g"),this.decimalSeparator),n):""},t.prototype.formatNumber=function(e,n){for(var i=this.valueOrDefault(null==n?void 0:n.autofillDecimals,t.DEFAULT_AUTOFILL_DECIMALS),o=this.valueOrDefault(null==n?void 0:n.decimalPlaces,t.DEFAULT_DECIMAL_PLACES),a=this.valueOrDefault(null==n?void 0:n.finalFormatting,t.DEFAULT_FINAL_FORMATTING),r=this.strip(e,{decimalPlaces:o,removeLeadingZeros:a}),l=r.indexOf(this.decimalSeparator),s=r.startsWith(t.NEGATIVE),u=l>-1?l:r.length;u>(s?4:3);)u-=3,r=r.substring(0,u)+this.groupingSeparator+r.substring(u,r.length);if(a&&o>0&&r){var c=r.indexOf(this.decimalSeparator);if(i){-1===c&&(c=r.length,r+=this.decimalSeparator),c=(r=this.addMissingLeadingZero(r,c)).indexOf(this.decimalSeparator);for(var p=r.length-c-1,d=0;d<o-p;d++)r+="0"}else r=this.addMissingLeadingZero(r,c)}return r},t.prototype.strip=function(e,n){var i,o,a=this.valueOrDefault(null==n?void 0:n.decimalPlaces,t.DEFAULT_DECIMAL_PLACES),r=this.valueOrDefault(null==n?void 0:n.removeLeadingZeros,t.DEFAULT_REMOVE_LEADING_ZEROS),l="",s=-1,u=-1,c=0;try{for(var p=T(e),d=p.next();!d.done;d=p.next()){var m=d.value;if(u++,this.allowedKeys.includes(m)){if(m===this.decimalSeparator){if(0===a)break;if(s>-1)continue;s=u}if("0"===m&&r&&(0===l.length&&u+1!==e.length||l===t.NEGATIVE)){c++;continue}if(m===t.NEGATIVE&&u>0)break;if(s>-1&&l.length+c>s+a)break;l+=m}else{if(m!==this.groupingSeparator)break;-1===s&&c++}}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return l},t.prototype.addMissingLeadingZero=function(e,n){var i=e.startsWith(t.NEGATIVE);return 0===n&&(e="0"+e),1===n&&i&&(e=e[0]+"0"+e.substring(1,e.length)),e},t.prototype.valueOrDefault=function(e,n){return t.valueIsSet(e)?e:n},t}();R.NEGATIVE="-",R.NUMBERS=["0","1","2","3","4","5","6","7","8","9"],R.DEFAULT_FINAL_FORMATTING=!0,R.DEFAULT_DECIMAL_PLACES=2,R.DEFAULT_AUTOFILL_DECIMALS=!1,R.DEFAULT_REMOVE_LEADING_ZEROS=!1,R.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new R(e.ɵɵinject(e.LOCALE_ID))},token:R,providedIn:"any"}),R.decorators=[{type:e.Injectable,args:[{providedIn:"any"}]}],R.ctorParameters=function(){return[{type:String,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]};var _=function(){function t(t,e,n){var i=this;this.changeDetector=t,this.renderer=e,this.numberFormatService=n,this.textAlign="left",this.formatNumber=!1,this.decimalPlaces=2,this.roundValue=!1,this.autofillDecimals=!1,this.unit=null,this.unitPosition="left",this.errorMessage=null,this.multiline=!1,this.rows=3,this.shrinkIfEmpty=!1,this.errorMatcher={isErrorState:function(){return!!i.errorMessage}}}return t.prototype.ngOnChanges=function(t){R.valueIsSet(this.value)?this.formatNumber&&"number"==typeof this.value&&(this.value=this.numberFormatService.format(this.value,{decimalPlaces:this.decimalPlaces,finalFormatting:!0,autofillDecimals:this.autofillDecimals})):(this.value="-",this.shrinkIfEmpty&&(this.rows=1)),this.changeDetector.detectChanges()},t.prototype.ngAfterViewChecked=function(){this.injectUnitSymbol()},t.prototype.injectUnitSymbol=function(){if(this.unit&&!this.unitSpan&&0!==this.inputEl.nativeElement.offsetWidth){var t=this.inputEl.nativeElement.parentNode.parentNode;this.unitSpan=this.renderer.createElement("span"),"left"===this.unitPosition?(this.renderer.setAttribute(this.unitSpan,"matPrefix",""),this.renderer.setStyle(this.unitSpan,"padding-right","5px"),this.renderer.insertBefore(t,this.unitSpan,t.children[0])):(this.renderer.setAttribute(this.unitSpan,"matSuffix",""),this.renderer.setStyle(this.unitSpan,"padding-left","5px"),this.renderer.appendChild(t,this.unitSpan))}if(this.unitSpan&&"left"===this.textAlign&&"right"===this.unitPosition){var e=window.getComputedStyle(this.inputEl.nativeElement.parentElement,null);this.unitSpan.style.position="absolute",this.unitSpan.style.marginTop=e.getPropertyValue("border-top-width"),this.unitSpan.style.paddingTop=e.getPropertyValue("padding-top"),this.unitSpan.style.paddingBottom=e.getPropertyValue("padding-bottom"),this.textSpan||(this.textSpan=document.createElement("span"),document.body.appendChild(this.textSpan),this.textSpan.style.font=e.getPropertyValue("font"),this.textSpan.style.fontSize=e.getPropertyValue("font-size"),this.textSpan.style.height="auto",this.textSpan.style.width="auto",this.textSpan.style.position="absolute",this.textSpan.style.top="0",this.textSpan.style.whiteSpace="no-wrap",this.textSpan.style.visibility="hidden"),this.textSpan.innerHTML=this.value;var n=Math.min(this.inputEl.nativeElement.clientWidth-this.unitSpan.clientWidth,Math.ceil(this.textSpan.clientWidth));this.unitSpan.style.left=n+"px"}this.unitSpan&&(this.unitSpan.textContent=this.unit)},t}();_.decorators=[{type:e.Component,args:[{selector:"mad-readonly-form-field",template:'<mat-form-field class="form-group" appearance="none">\n <mat-label>{{ label }}</mat-label>\n <input\n *ngIf="!multiline"\n [ngModel]="value"\n [ngClass]="\'text-\' + textAlign"\n [errorStateMatcher]="errorMatcher"\n [id]="id"\n readonly\n matInput\n #inputEl\n />\n\n <textarea\n *ngIf="multiline"\n [rows]="rows"\n [ngModel]="value"\n class="multiline"\n [errorStateMatcher]="errorMatcher"\n [id]="id"\n readonly\n matInput\n ></textarea>\n <mat-error>{{ errorMessage }}</mat-error>\n</mat-form-field>\n',styles:["mat-form-field{width:100%;width:-moz-available;width:-webkit-fill-available;width:stretch}mat-label{line-height:1.4}span[matPrefix]{padding-right:5px}span[matSuffix]{padding-left:5px}.text-left{text-align:left}.text-right{text-align:right}.multiline{resize:none}"]}]}],_.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.Renderer2},{type:R}]},_.propDecorators={value:[{type:e.Input,args:["value"]}],label:[{type:e.Input,args:["label"]}],textAlign:[{type:e.Input,args:["textAlign"]}],formatNumber:[{type:e.Input,args:["formatNumber"]}],decimalPlaces:[{type:e.Input,args:["decimalPlaces"]}],roundValue:[{type:e.Input,args:["roundDisplayValue"]}],autofillDecimals:[{type:e.Input,args:["autofillDecimals"]}],unit:[{type:e.Input,args:["unit"]}],unitPosition:[{type:e.Input,args:["unitPosition"]}],errorMessage:[{type:e.Input,args:["errorMessage"]}],multiline:[{type:e.Input}],rows:[{type:e.Input}],id:[{type:e.Input}],shrinkIfEmpty:[{type:e.Input}],inputEl:[{type:e.ViewChild,args:["inputEl"]}]};var B=function(){};B.decorators=[{type:e.NgModule,args:[{declarations:[_,V],imports:[n.CommonModule,i.RouterModule,l.MatFormFieldModule,s.MatInputModule,u.FormsModule,r.MatTooltipModule],exports:[_,V]}]}];var j=function(){function t(t,e){var n=this;this.router=t,this.translate=e,this.mainActions=[],this.toolbarActions=[],this.liftFabButtonHigher=!1,this.routerSubscription=this.router.events.subscribe((function(e){e instanceof i.NavigationEnd&&(n.currentUrl!==e.urlAfterRedirects&&(n.clearToolbarActions(),n.clearMainActions(),delete n.backAction,delete n.dataTitle),n.currentUrl=t.url)}))}return t.prototype.ngOnDestroy=function(){this.routerSubscription&&this.routerSubscription.unsubscribe()},t.prototype.getToolbarActions=function(){return this.toolbarActions},t.prototype.addToolbarAction=function(t){var e=this;this.translate.get(t.i18nActionKey).toPromise().then((function(n){t.actionName=n,e.toolbarActions.push(t)}))},Object.defineProperty(t.prototype,"toolbarTitle",{get:function(){return this.title},set:function(t){this.title=t},enumerable:!1,configurable:!0}),t.prototype.setDataTitle=function(t){this.dataTitle=t},t.prototype.getDataTitle=function(){return this.dataTitle},t.prototype.clearToolbarActions=function(){this.toolbarActions=[]},t.prototype.getMainActions=function(){return this.mainActions},t.prototype.getBackAction=function(){return this.backAction},t.prototype.addMainAction=function(t){var e=this;this.translate.get(t.i18nActionKey).toPromise().then((function(n){t.actionName=n,e.mainActions.push(t)}))},t.prototype.addBackAction=function(t,e){void 0===e&&(e=!1),this.backAction={matIcon:"keyboard_backspace",i18nActionKey:""},e?this.backAction.href=t:this.backAction.routerLink=t},t.prototype.addSimpleBackButton=function(t){void 0===t&&(t=!1),this.getBackAction()&&!t||(this.backAction={matIcon:"keyboard_backspace",i18nActionKey:"",action:function(){window.history.back()}})},t.prototype.clearMainActions=function(){this.mainActions=[]},t}();j.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new j(e.ɵɵinject(i.Router),e.ɵɵinject(p.TranslateService))},token:j,providedIn:"root"}),j.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],j.ctorParameters=function(){return[{type:i.Router},{type:p.TranslateService}]};var q=function(){function t(t,e,n){this.breakpointObserver=t,this.titleService=e,this.toolbarService=n,this.isHandset$=this.breakpointObserver.observe([m.Breakpoints.Handset]).pipe(h.map((function(t){return t.matches})))}return t.prototype.getTitle=function(){var t=this.toolbarService.getDataTitle(),e=this.toolbarService.toolbarTitle,n=!e||e.length<=0?this.titleService.getTitle():e;return!t||t.length<=0?n:n+": "+t},t.prototype.getToolbarActions=function(){return this.toolbarService.getToolbarActions()},t.prototype.getMainActions=function(){return this.toolbarService.getMainActions()},t.prototype.hasPermission=function(t){return t&&t.showIf?t.showIf:d.of(!0)},t.prototype.isRouterLink=function(){return this.toolbarService.getBackAction()&&!!this.toolbarService.getBackAction().routerLink},t.prototype.isAbsoluteLink=function(){return this.toolbarService.getBackAction()&&!!this.toolbarService.getBackAction().href},t.prototype.isAction=function(){return this.toolbarService.getBackAction()&&!!this.toolbarService.getBackAction().action},t.prototype.getBackAction=function(){return this.toolbarService.getBackAction()},t}();q.decorators=[{type:e.Component,args:[{selector:"mad-toolbar",template:'<mat-toolbar class="content-toolbar">\n <a [routerLink]="getBackAction().routerLink" *ngIf="isRouterLink()">\n <button [id]="\'go-back\'" color="primary" mat-icon-button class="go-back-button">\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n <a [href]="getBackAction().href" *ngIf="isAbsoluteLink()">\n <button [id]="\'go-back\'" class="go-back-button" color="primary" mat-icon-button>\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n <a (click)="getBackAction().action()" *ngIf="isAction()">\n <button [id]="\'go-back\'" color="primary" mat-icon-button class="go-back-button">\n <mat-icon>{{ getBackAction().matIcon }}</mat-icon>\n </button>\n </a>\n\n <span class="toolbar-title">{{ getTitle() }}</span>\n\n <ng-container *ngFor="let mainAction of getMainActions(); let i = index">\n <ng-container *ngIf="hasPermission(mainAction) | async">\n <div *ngIf="!(isHandset$ | async)">\n <a [routerLink]="mainAction.routerLink">\n <mad-primary-button [id]="mainAction.matIcon" style="margin-left: 56px">\n <mat-icon>{{ mainAction.matIcon }}</mat-icon>\n {{ mainAction.actionName }}\n </mad-primary-button>\n </a>\n </div>\n <div *ngIf="isHandset$ | async">\n <mad-material-action-button\n [actionName]="mainAction.actionName"\n [icon]="mainAction.matIcon"\n [liftHigher]="mainAction.liftHigherOnMobile"\n [liftHigher2]="i > 0"\n [routerLink]="mainAction.routerLink"\n [id]="mainAction.matIcon"\n >\n </mad-material-action-button>\n </div>\n </ng-container>\n </ng-container>\n\n <div class="right-aligned no-print">\n <ng-container *ngFor="let action of getToolbarActions(); let i = index">\n <ng-container *ngIf="hasPermission(action) | async">\n <mad-icon-button\n (click)="action.action()"\n *ngIf="!(isHandset$ | async) || i < (getToolbarActions().length > 2 ? 1 : 2)"\n [id]="action.matIcon"\n [matTooltip]="action.actionName"\n type="button"\n >\n <mat-icon\n [matBadgeColor]="action.badge ? action.badge.color : \'primary\'"\n matBadgePosition="below after"\n [matBadge]="action.badge ? action.badge.value : null"\n >{{ action.matIcon }}</mat-icon\n >\n </mad-icon-button>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf="isHandset$ | async">\n <ng-container *ngIf="getToolbarActions().length > 2">\n <button mat-icon-button type="button" [matMenuTriggerFor]="burgerMenu" matTooltip="More">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #burgerMenu="matMenu">\n <ng-container *ngFor="let action of getToolbarActions(); let i = index">\n <ng-container *ngIf="hasPermission(action) | async">\n <button *ngIf="i >= 1" mat-menu-item (click)="action.action()">\n <mat-icon\n [matBadgeColor]="action.badge ? action.badge.color : \'primary\'"\n [matBadge]="action.badge ? action.badge.value : null"\n matBadgePosition="below after"\n >{{ action.matIcon }}</mat-icon>\n {{ action.actionName }}\n </button>\n </ng-container>\n </ng-container>\n </mat-menu>\n </ng-container>\n </ng-container>\n </div>\n</mat-toolbar>\n',styles:["mat-toolbar{background:#fff}.content-toolbar{border-bottom:1px solid #dcdcdc;height:57px}.right-aligned{margin-left:auto;margin-right:0;overflow:hidden}.go-back-button{padding-left:0;padding-right:0}.toolbar-title{margin-right:72px}::ng-deep.mat-badge-content{bottom:-7px!important;right:-7px!important}"]}]}],q.ctorParameters=function(){return[{type:m.BreakpointObserver},{type:c.Title},{type:j}]};var H=function(){};H.decorators=[{type:e.NgModule,args:[{declarations:[q],imports:[n.CommonModule,i.RouterModule,g.MatMenuModule,o.MatButtonModule,f.MatToolbarModule,a.MatIconModule,E,r.MatTooltipModule,L,y.MatBadgeModule],exports:[q]}]}];var U=new Set([224,91,93]),W=function(){function t(t,n,i){this.renderer=t,this.inputEl=n,this.numberFormatService=i,this.textAlign="right",this.decimalPlaces=2,this.roundValue=!1,this.autofillDecimals=!1,this.unit=null,this.unitPosition="right",this.numericValueChanged=new e.EventEmitter,this.displayValue="",this.originalValue=NaN,this.onChange=function(){},this.onTouched=function(){}}return Object.defineProperty(t.prototype,"numericValue",{set:function(t){this._numericValue===t||isNaN(this._numericValue)&&(isNaN(t)||null===t)||(this.originalValue=t,this._numericValue=this.roundOrTruncate(t),this.handleInputChanged())},enumerable:!1,configurable:!0}),t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(){},t.prototype.writeValue=function(t){this.numericValue=t},t.prototype.ngOnInit=function(){var t=this;this.decimalPlaces=parseInt(this.decimalPlaces.toString(),10),this.inputChangeListener=this.renderer.listen(this.inputEl.nativeElement,"blur",(function(e){t.formatInput(e.target,!0)})),this.keyupListener=this.renderer.listen(this.inputEl.nativeElement,"keyup",(function(e){(8===e.keyCode||e.keyCode>=46&&!U.has(e.keyCode))&&t.formatInput(e.target,!1)})),this.keydownListener=this.renderer.listen(this.inputEl.nativeElement,"keydown",(function(e){var n=e.target.value;if(!(t.numberFormatService.allowedKeys.includes(e.key)||e.keyCode<=46&&e.keyCode>0&&32!==e.keyCode||e.metaKey||e.ctrlKey||e.altKey))return!1;var i=n.indexOf(R.NEGATIVE);if(e.key===R.NEGATIVE&&(e.target.selectionStart>0||i>-1)&&(e.target.selectionStart===e.target.selectionEnd||!(i>=e.target.selectionStart&&i<=e.target.selectionEnd)))return!1;var o=n.indexOf(t.numberFormatService.decimalSeparator);if(e.key===t.numberFormatService.decimalSeparator&&(o>-1||0===t.decimalPlaces)&&(e.target.selectionStart===e.target.selectionEnd||!(o>=e.target.selectionStart&&o<=e.target.selectionEnd)))return!1;if(R.NUMBERS.includes(e.key)&&o>-1&&o<e.target.selectionStart&&e.target.selectionStart===e.target.selectionEnd&&n.length>o+t.decimalPlaces)return!1;var a=e.target.selectionStart;if(a===e.target.selectionEnd){if(8===e.keyCode&&n.substr(a-1,1)===t.numberFormatService.groupingSeparator)return e.target.value=n.substring(0,a-2)+n.substring(a-1,n.length),e.target.selectionStart=e.target.selectionEnd=a-1,!1;if(46===e.keyCode&&n.substr(a,1)===t.numberFormatService.groupingSeparator)return e.target.value=n.substring(0,a+1)+n.substring(a+2,n.length),e.target.selectionStart=e.target.selectionEnd=a+1,!1}return t.originalValue=NaN,!0}))},t.prototype.ngOnDestroy=function(){this.detachListener()},t.prototype.ngAfterViewChecked=function(){this.injectUnitSymbol()},t.prototype.handleInputChanged=function(){var t=this;setTimeout((function(){t.updateInput(t.numberFormatService.format(t._numericValue,{decimalPlaces:t.decimalPlaces,finalFormatting:!1,autofillDecimals:t.autofillDecimals}))}),1)},t.prototype.formatInput=function(t,e){var n=t.selectionStart,i=t.value.length,o=this.displayValue!==t.value,a=this.numberFormatService.formatNumber(t.value,{decimalPlaces:this.decimalPlaces,finalFormatting:e,autofillDecimals:this.autofillDecimals});if("left"===this.textAlign&&"right"===this.unitPosition){var r=window.getComputedStyle(this.inputEl.nativeElement.parentElement,null);this.unitSpan.style.position="absolute",this.unitSpan.style.marginTop=r.getPropertyValue("border-top-width"),this.unitSpan.style.paddingTop=r.getPropertyValue("padding-top"),this.unitSpan.style.paddingBottom=r.getPropertyValue("padding-bottom"),this.textSpan||(this.textSpan=document.createElement("span"),document.body.appendChild(this.textSpan),this.textSpan.style.font=r.getPropertyValue("font"),this.textSpan.style.fontSize=r.getPropertyValue("font-size"),this.textSpan.style.height="auto",this.textSpan.style.width="auto",this.textSpan.style.position="absolute",this.textSpan.style.top="0",this.textSpan.style.whiteSpace="no-wrap",this.textSpan.style.visibility="hidden"),this.textSpan.innerHTML=a;var l=Math.min(this.inputEl.nativeElement.clientWidth-this.unitSpan.clientWidth,Math.ceil(this.textSpan.clientWidth));this.unitSpan.style.left=l+"px"}this.updateInput(a),o&&(t.selectionStart=t.selectionEnd=Math.max(n+t.value.length-i,0))},t.prototype.updateInput=function(t){this.displayValue=t,this.inputEl.nativeElement.value=t,this._numericValue=parseFloat(this.numberFormatService.strip(t,{decimalPlaces:this.decimalPlaces}).replace(this.numberFormatService.decimalSeparator,".")),this._numericValue!==this.roundOrTruncate(this.originalValue)&&(this.originalValue=this._numericValue,this.numericValueChanged.emit(this._numericValue))},t.prototype.getValueForFormControl=function(){if(this.formatInput(this.inputEl.nativeElement,!1),!isNaN(this._numericValue))return this._numericValue},t.prototype.injectUnitSymbol=function(){if(this.unit&&!this.unitSpan&&0!==this.inputEl.nativeElement.offsetWidth){var t=this.inputEl.nativeElement.parentNode.parentNode;this.unitSpan=this.renderer.createElement("span"),"left"===this.unitPosition?(this.renderer.setAttribute(this.unitSpan,"matPrefix",""),this.renderer.setStyle(this.unitSpan,"padding-right","5px"),this.renderer.insertBefore(t,this.unitSpan,t.children[0])):(this.renderer.setAttribute(this.unitSpan,"matSuffix",""),this.renderer.setStyle(this.unitSpan,"padding-left","5px"),this.renderer.appendChild(t,this.unitSpan))}this.unitSpan&&"left"===this.textAlign&&"right"===this.unitPosition&&(R.valueIsSet(this.displayValue)?this.unitSpan.style.display="unset":this.unitSpan.style.display="none"),this.unitSpan&&(this.unitSpan.textContent=this.unit)},t.prototype.detachListener=function(){this.inputChangeListener&&(this.inputChangeListener(),delete this.inputChangeListener),this.keydownListener&&(this.keydownListener(),delete this.keydownListener),this.keyupListener&&(this.keyupListener(),delete this.keyupListener)},t.prototype.roundOrTruncate=function(t){var e=this.roundValue?"round":t<0?"ceil":"floor";return Math[e](t*Math.pow(10,this.decimalPlaces))/Math.pow(10,this.decimalPlaces)},t}();W.decorators=[{type:e.Directive,args:[{selector:"[madNumericField]",host:{"[class.text-right]":'textAlign === "right"',"(change)":"onChange(getValueForFormControl())","(input)":"onChange(getValueForFormControl())","(blur)":"onTouched()"},providers:[{provide:u.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return W})),multi:!0}]}]}],W.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:R}]},W.propDecorators={textAlign:[{type:e.Input,args:["textAlign"]}],decimalPlaces:[{type:e.Input,args:["decimalPlaces"]}],roundValue:[{type:e.Input,args:["roundDisplayValue"]}],autofillDecimals:[{type:e.Input,args:["autofillDecimals"]}],unit:[{type:e.Input,args:["unit"]}],unitPosition:[{type:e.Input,args:["unitPosition"]}],numericValueChanged:[{type:e.Output,args:["numericValueChange"]}],numericValue:[{type:e.Input,args:["numericValue"]}]};var z=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[R]}},t}();z.decorators=[{type:e.NgModule,args:[{providers:[R],declarations:[W],exports:[W]}]}];var G=function(){function t(){this.cancelDisabled=!1,this.cancelText="NOT SET",this.readonly=!0,this.editText="NOT SET",this.expandable=!0,this.expanded=!0,this.saveDisabled=!1,this.saveText="NOT SET",this.editMode=!1,this.additionalActionText="",this.edit=new e.EventEmitter,this.cancel=new e.EventEmitter,this.save=new e.EventEmitter,this.additionalAction=new e.EventEmitter}return t.prototype.onCancel=function(){this.cancel.emit(void 0)},t.prototype.onEdit=function(){this.edit.emit(void 0),this.expanded=!0},t.prototype.onSave=function(){this.save.emit(void 0)},t.prototype.toggleCollapse=function(){this.expanded=!this.expanded},t.prototype.additionalActionClicked=function(){this.additionalAction.emit(void 0)},t}();G.decorators=[{type:e.Component,args:[{selector:"mad-card",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',animations:[v.trigger("collapseExpandAnimation",[v.transition(":enter",[v.style({opacity:0,height:0,overflow:"hidden"}),v.animate("100ms",v.style({opacity:1,height:"*"}))]),v.transition(":leave",[v.style({opacity:1,height:"*",overflow:"hidden"}),v.animate("100ms",v.style({opacity:0,height:0}))])]),v.trigger("rotateIcon",[v.state("true",v.style({transform:"rotate(0)"})),v.state("false",v.style({transform:"rotate(180deg)"})),v.transition("true => false",v.animate("100ms ease-out")),v.transition("false => true",v.animate("100ms ease-in"))])],styles:["mat-card-header{display:flex;flex-direction:row}mat-card-header,mat-card-header mat-card-title{justify-content:space-between}mat-card-header mat-card-title:hover{background:unset!important}mat-card-header h3{float:left;font-weight:700;line-height:40px;margin:0 .25em 0 0}.mat-card-actions{margin-left:0;margin-right:0}.mat-card>.mat-card-actions:last-child{margin-bottom:0}"]}]}],G.propDecorators={cancelDisabled:[{type:e.Input}],cancelText:[{type:e.Input}],readonly:[{type:e.Input}],editText:[{type:e.Input}],expandable:[{type:e.Input}],expanded:[{type:e.Input}],saveDisabled:[{type:e.Input}],saveText:[{type:e.Input}],title:[{type:e.Input}],editMode:[{type:e.Input}],additionalActionIcon:[{type:e.Input}],additionalActionText:[{type:e.Input}],edit:[{type:e.Output}],cancel:[{type:e.Output}],save:[{type:e.Output}],additionalAction:[{type:e.Output}]};var K=function(){function t(){this.throttleTime=300,this.throttleClick=new e.EventEmitter,this.clicks=new d.Subject}return t.prototype.ngOnInit=function(){var t=this;this.subscription=this.clicks.pipe(h.throttleTime(this.throttleTime)).subscribe((function(e){return t.throttleClick.emit(e)}))},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.clickEvent=function(t){t.preventDefault(),t.stopPropagation(),this.clicks.next(t)},t}();K.decorators=[{type:e.Directive,args:[{selector:"[madThrottleClick]"}]}],K.ctorParameters=function(){return[]},K.propDecorators={throttleTime:[{type:e.Input}],throttleClick:[{type:e.Output}],clickEvent:[{type:e.HostListener,args:["click",["$event"]]}]};var $=function(){};$.decorators=[{type:e.NgModule,args:[{declarations:[K],imports:[n.CommonModule],exports:[K]}]}];var Z=function(){};Z.decorators=[{type:e.NgModule,args:[{declarations:[G],imports:[n.CommonModule,b.MatCardModule,a.MatIconModule,L,o.MatButtonModule,$],exports:[G]}]}];var Q=function(){function t(t){this.changeDetectorRef=t,this.allItems=[],this.addLabel="NOT SET",this.addPossible=!0,this.blankItem={},this.added=new e.EventEmitter,this.removed=new e.EventEmitter}return t.prototype.ngOnInit=function(){if(this.addEventFunction=this.addItem.bind(this),void 0!==this.minItems)for(var t=this.allItems.length;t<this.minItems;t++)this.interalAddItem()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){return t.setFocusOnAdd()}),1)},t.prototype.addItem=function(){var t=this.interalAddItem();t&&this.added.emit(t)},t.prototype.removeItem=function(t){this.isDeleteAllowed()&&(this.allItems.splice(this.allItems.indexOf(t),1),this.removed.emit(t))},t.prototype.setFocusOnAdd=function(){var t=this;this.rowCountFocus=this.itemRows.length,this.itemRows.changes.subscribe((function(e){if(e.length>t.rowCountFocus&&e.last){var n=e.last.nativeElement.querySelector("button, a, input, select, textarea, [tabindex]:not([tabindex='-1'])");n&&n.focus()}t.rowCountFocus=e.length}))},t.prototype.isAddAllowed=function(){return void 0===this.maxItems||this.allItems.length<this.maxItems},t.prototype.isDeleteAllowed=function(){return void 0===this.minItems||this.allItems.length>this.minItems},t.prototype.interalAddItem=function(){if(this.isAddAllowed()){var t=Object.assign({},this.blankItem);return t.id=Math.random().toString(36).substring(2),this.allItems.push(t),this.changeDetectorRef.detectChanges(),t}return null},t}();Q.decorators=[{type:e.Component,args:[{selector:"mad-quick-list",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'}]}],Q.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},Q.propDecorators={allItems:[{type:e.Input}],addLabel:[{type:e.Input}],addPossible:[{type:e.Input}],blankItem:[{type:e.Input}],readonly:[{type:e.Input}],maxItems:[{type:e.Input}],minItems:[{type:e.Input}],added:[{type:e.Output}],removed:[{type:e.Output}],itemTemplate:[{type:e.ContentChild,args:[e.TemplateRef]}],itemRows:[{type:e.ViewChildren,args:["row"]}]};var X=function(){};X.decorators=[{type:e.NgModule,args:[{declarations:[Q],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,L],exports:[Q]}]}];var J=function(){function t(){var t;this.ACTION_COLUMN_NAME="__action__",this.columns=[],this.filterLabel="NOT SET",this.filterPlaceholder="NOT SET",this.pageSizeOptions=[5,10,15],this.defaultPageSize=(null===(t=this.pageSizeOptions)||void 0===t?void 0:t[0])||10,this.rowActions=[],this.tableActions=[],this.tableAction=new e.EventEmitter,this.rowAction=new e.EventEmitter,this.sortEvent=new e.EventEmitter,this.isFilterEnabled=!1,this.isPaginationEnabled=!1}return Object.defineProperty(t.prototype,"displayedData",{set:function(t){this.dataSource?this.dataSource.data=t:this.dataSource=new I.MatTableDataSource(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paginationEnabled",{set:function(t){this.isPaginationEnabled=t;var e=this.isPaginationEnabled?this.defaultPageSize:Number.MAX_VALUE;this.dataSource.paginator&&this.dataSource.paginator._changePageSize(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"filterEnabled",{set:function(t){this.isFilterEnabled=t,this.setFilterValue(void 0)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.columnNames=this.columns.map((function(t){return t.label})),this.isRowClickable=this.rowActions.length>0,this.isRowClickable&&(this.columnNames.unshift(this.ACTION_COLUMN_NAME),this.defaultAction=this.rowActions[0])},t.prototype.ngAfterViewInit=function(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.filterPredicate=function(t,e){return!e||e.split(/\s+/).every((function(e){return!!Object.keys(t).find((function(n){return t[n].includes(e)}))}))}},t.prototype.onFilter=function(t){this.setFilterValue(t)},t.prototype.onRowEvent=function(t,e,n){void 0===n&&(n=this.defaultAction),n&&!this.isClickOnRowMenuIcon(t)&&this.rowAction.emit(Object.assign(Object.assign({},n),{outputRow:e}))},t.prototype.onSortingEvent=function(t){this.sortEvent.emit(t)},t.prototype.onTableAction=function(t){t&&this.tableAction.emit(t)},t.prototype.setFilterValue=function(t){this.dataSource.filter=null==t?void 0:t.trim().toLowerCase()},t.prototype.isClickOnRowMenuIcon=function(t){var e;return null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.classList.contains("mat-icon")},t}();J.decorators=[{type:e.Component,args:[{selector:"mad-table",template:'\x3c!-- Table actions --\x3e\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\x3c!-- Row action buttons --\x3e\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\x3c!-- Table filter --\x3e\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\x3c!-- Table --\x3e\n<div *ngIf="dataSource?.data?.length > 0; else noData" class="mad-table">\n <table mat-table [dataSource]="dataSource" matSort (matSortChange)="onSortingEvent($event)">\n \x3c!-- Row actions column --\x3e\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 \x3c!-- Columns with data --\x3e\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 \x3c!-- Pagination --\x3e\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\x3c!-- No data alert --\x3e\n<ng-template #noData>\n <div class="noDataText">\n {{ noDataText }}\n </div>\n</ng-template>\n',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%}"]}]}],J.propDecorators={columns:[{type:e.Input}],filterLabel:[{type:e.Input}],filterPlaceholder:[{type:e.Input}],noDataText:[{type:e.Input}],pageSizeOptions:[{type:e.Input}],defaultPageSize:[{type:e.Input}],rowActions:[{type:e.Input}],tableActions:[{type:e.Input}],displayedData:[{type:e.Input}],paginationEnabled:[{type:e.Input}],filterEnabled:[{type:e.Input}],tableAction:[{type:e.Output}],rowAction:[{type:e.Output}],sortEvent:[{type:e.Output}],paginator:[{type:e.ViewChild,args:[A.MatPaginator,{static:!1}]}],sort:[{type:e.ViewChild,args:[S.MatSort,{static:!0}]}]};var Y=function(){};Y.decorators=[{type:e.NgModule,args:[{declarations:[J],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,l.MatFormFieldModule,s.MatInputModule,g.MatMenuModule,A.MatPaginatorModule,S.MatSortModule,I.MatTableModule,L],exports:[J]}]}];var tt=function(){};tt.decorators=[{type:e.NgModule,args:[{exports:[B,L,H,E,z,Z,X,$]}]}],t.ButtonModule=L,t.CardModule=Z,t.MaterialActionButtonComponent=x,t.MaterialActionButtonModule=E,t.MaterialAddonsModule=tt,t.NumberFormatService=R,t.NumericFieldModule=z,t.QuickListModule=X,t.ReadOnlyFormFieldComponent=_,t.ReadOnlyFormFieldModule=B,t.ReadOnlyFormFieldWrapperComponent=V,t.TableModule=Y,t.ThrottleClickDirective=K,t.ThrottleClickModule=$,t.ToolbarComponent=q,t.ToolbarModule=H,t.ToolbarService=j,t.ɵa=P,t.ɵb=C,t.ɵc=O,t.ɵd=D,t.ɵe=N,t.ɵf=F,t.ɵg=W,t.ɵh=G,t.ɵi=Q,t.ɵj=J,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
17
17
|
//# sourceMappingURL=porscheinformatik-material-addons.umd.min.js.map
|