@porscheinformatik/material-addons 10.3.3 → 10.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/porscheinformatik-material-addons.umd.js +4 -1
- package/bundles/porscheinformatik-material-addons.umd.js.map +1 -1
- package/bundles/porscheinformatik-material-addons.umd.min.js +1 -1
- package/bundles/porscheinformatik-material-addons.umd.min.js.map +1 -1
- package/esm2015/lib/toolbar/toolbar-action.interface.js +1 -1
- package/esm2015/lib/toolbar/toolbar.component.js +5 -2
- package/fesm2015/porscheinformatik-material-addons.js +4 -1
- package/fesm2015/porscheinformatik-material-addons.js.map +1 -1
- package/lib/toolbar/toolbar-action.interface.d.ts +1 -0
- package/lib/toolbar/toolbar.component.d.ts +1 -0
- package/package.json +1 -1
- package/porscheinformatik-material-addons.metadata.json +1 -1
|
@@ -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 N=function(t,e){return(N=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 L(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}N(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function F(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 V(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}function R(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(V(arguments[e]));return t}Object.create;var B=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}();B.propDecorators={pointerEvent:[{type:e.HostBinding,args:["style.pointer-events"]}],opacity:[{type:e.HostBinding,args:["style.opacity"]}]};var H=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 L(e,t),e}(B);H.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:[""]}]}],H.ctorParameters=function(){return[]},H.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 j=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 L(e,t),e}(B);j.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:[""]}]}],j.ctorParameters=function(){return[]},j.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 z=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 L(e,t),e}(B);z.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:[""]}]}],z.ctorParameters=function(){return[]},z.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 q=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 L(e,t),e}(B);q.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:[""]}]}],q.ctorParameters=function(){return[]},q.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 G=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 L(e,t),e}(B);G.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:[""]}]}],G.ctorParameters=function(){return[]},G.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 U=function(){};U.decorators=[{type:e.NgModule,args:[{declarations:[H,j,z,G,q],imports:[n.CommonModule,i.RouterModule,o.MatButtonModule,a.MatIconModule,r.MatTooltipModule],exports:[H,j,z,G,q]}]}];var W=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}();W.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}"]}]}],W.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},W.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 $=function(){function t(e){this.allowedKeys=[];var n=1.1.toLocaleString(e).charAt(1);this.decimalSeparator=","===n?",":".",this.groupingSeparator=","===n?".":",",this.allowedKeys=R(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}),s=r.indexOf(this.decimalSeparator),l=r.startsWith(t.NEGATIVE),c=s>-1?s:r.length;c>(l?4:3);)c-=3,r=r.substring(0,c)+this.groupingSeparator+r.substring(c,r.length);if(a&&o>0&&r){var p=r.indexOf(this.decimalSeparator);if(i){-1===p&&(p=r.length,r+=this.decimalSeparator),p=(r=this.addMissingLeadingZero(r,p)).indexOf(this.decimalSeparator);for(var u=r.length-p-1,d=0;d<o-u;d++)r+="0"}else r=this.addMissingLeadingZero(r,p)}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),s="",l=-1,c=-1,p=0;try{for(var u=F(e),d=u.next();!d.done;d=u.next()){var h=d.value;if(c++,this.allowedKeys.includes(h)){if(h===this.decimalSeparator){if(0===a)break;if(l>-1)continue;l=c}if("0"===h&&r&&(0===s.length&&c+1!==e.length||s===t.NEGATIVE)){p++;continue}if(h===t.NEGATIVE&&c>0)break;if(l>-1&&s.length+p>l+a)break;s+=h}else{if(h!==this.groupingSeparator)break;-1===l&&p++}}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return s},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}();$.NEGATIVE="-",$.NUMBERS=["0","1","2","3","4","5","6","7","8","9"],$.DEFAULT_FINAL_FORMATTING=!0,$.DEFAULT_DECIMAL_PLACES=2,$.DEFAULT_AUTOFILL_DECIMALS=!1,$.DEFAULT_REMOVE_LEADING_ZEROS=!1,$.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new $(e.ɵɵinject(e.LOCALE_ID))},token:$,providedIn:"any"}),$.decorators=[{type:e.Injectable,args:[{providedIn:"any"}]}],$.ctorParameters=function(){return[{type:String,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]};var K=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){$.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}();K.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}"]}]}],K.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.Renderer2},{type:$}]},K.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 Z=function(){};Z.decorators=[{type:e.NgModule,args:[{declarations:[K,W],imports:[n.CommonModule,i.RouterModule,s.MatFormFieldModule,l.MatInputModule,c.FormsModule,r.MatTooltipModule],exports:[K,W]}]}];var Q=function(){function t(t,e){var n=this;this.router=t,this.translate=e,this.mainActions=[],this.toolbarActions=[],this.toolbarActionsAlwaysAsMenu=!1,this.toolbarActionsMenuTitle="More",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.setToolbarActionsAlwaysAsMenu=function(t){this.toolbarActionsAlwaysAsMenu=t},t.prototype.getToolbarActionsAlwaysAsMenu=function(){return this.toolbarActionsAlwaysAsMenu},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.setToolbarActionsMenuTitle=function(t){this.toolbarActionsMenuTitle=t},t.prototype.getToolbarActionsMenuTitle=function(){return this.toolbarActionsMenuTitle},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}();Q.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new Q(e.ɵɵinject(i.Router),e.ɵɵinject(u.TranslateService))},token:Q,providedIn:"root"}),Q.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],Q.ctorParameters=function(){return[{type:i.Router},{type:u.TranslateService}]};var X=function(){function t(t,e,n){this.breakpointObserver=t,this.titleService=e,this.toolbarService=n,this.isHandset$=this.breakpointObserver.observe([h.Breakpoints.Handset]).pipe(m.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.prototype.getToolbarActionsAlwaysAsMenu=function(){return this.toolbarService.getToolbarActionsAlwaysAsMenu()},t.prototype.getToolbarActionsMenuTitle=function(){return this.toolbarService.getToolbarActionsMenuTitle()},t.prototype.showBadgeForMenu=function(){return this.getToolbarActions().slice(1).filter((function(t){return t.badge&&t.badge.value})).length>0},t}();X.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) && !getToolbarActionsAlwaysAsMenu()) || i < (getToolbarActions().length > 2 ? 1 : 2)"\n [id]="action.matIcon"\n [matTooltip]="action.actionName"\n type="button">\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 </mad-icon-button>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf="(isHandset$ | async) || getToolbarActionsAlwaysAsMenu()">\n <ng-container *ngIf="getToolbarActions().length > 2">\n <mad-icon-button type="button" [matMenuTriggerFor]="burgerMenu" [matTooltip]="getToolbarActionsMenuTitle()">\n <mat-icon\n matBadgeColor="warn"\n [matBadge]="showBadgeForMenu() ? \'⁠\' : null"\n matBadgeSize="small"\n matBadgePosition="above after"\n >more_vert\n </mat-icon>\n </mad-icon-button>\n <mat-menu #burgerMenu="matMenu" class="no-print">\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 color="primary"\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 >\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}"]}]}],X.ctorParameters=function(){return[{type:h.BreakpointObserver},{type:p.Title},{type:Q}]};var Y=function(){};Y.decorators=[{type:e.NgModule,args:[{declarations:[X],imports:[n.CommonModule,i.RouterModule,g.MatMenuModule,o.MatButtonModule,f.MatToolbarModule,a.MatIconModule,P,r.MatTooltipModule,U,b.MatBadgeModule],exports:[X]}]}];var J=new Set([224,91,93]),tt=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=null==t?t: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&&!J.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($.NEGATIVE);if(e.key===$.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($.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 s=Math.min(this.inputEl.nativeElement.clientWidth-this.unitSpan.clientWidth,Math.ceil(this.textSpan.clientWidth));this.unitSpan.style.left=s+"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&&($.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}();tt.decorators=[{type:e.Directive,args:[{selector:"[madNumericField]",host:{"[class.text-right]":'textAlign === "right"',"(change)":"onChange(getValueForFormControl())","(input)":"onChange(getValueForFormControl())","(blur)":"onTouched()"},providers:[{provide:c.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return tt})),multi:!0}]}]}],tt.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:$}]},tt.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 et=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[$]}},t}();et.decorators=[{type:e.NgModule,args:[{providers:[$],declarations:[tt],exports:[tt]}]}];var nt=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}();nt.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}"]}]}],nt.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 it=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(m.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}();it.decorators=[{type:e.Directive,args:[{selector:"[madThrottleClick]"}]}],it.ctorParameters=function(){return[]},it.propDecorators={throttleTime:[{type:e.Input}],throttleClick:[{type:e.Output}],clickEvent:[{type:e.HostListener,args:["click",["$event"]]}]};var ot=function(){};ot.decorators=[{type:e.NgModule,args:[{declarations:[it],imports:[n.CommonModule],exports:[it]}]}];var at=function(){};at.decorators=[{type:e.NgModule,args:[{declarations:[nt],imports:[n.CommonModule,y.MatCardModule,a.MatIconModule,U,o.MatButtonModule,ot],exports:[nt]}]}];var rt=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),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 this.addPossible&&(!this.maxItems||this.allItems.length<this.maxItems)},t.prototype.isDeleteAllowed=function(){return!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}();rt.decorators=[{type:e.Component,args:[{selector:"mad-base-quick-list",template:""}]}],rt.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},rt.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 st=function(t){function e(e){var n=t.call(this,e)||this;return n.changeDetectorRef=e,n}return L(e,t),e}(rt);st.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 && isDeleteAllowed()" (click)="removeItem(item)">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n </div>\n</ng-container>\n<mad-link-button *ngIf="!readonly" (click)="addItem()"\n [disabled]="!addPossible || !isAddAllowed()">\n {{ addLabel }}\n</mad-link-button>\n'}]}],st.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]};var lt=function(t){function e(e){var n=t.call(this,e)||this;return n.changeDetectorRef=e,n}return L(e,t),e}(rt);lt.decorators=[{type:e.Component,args:[{selector:"mad-quick-list-compact",template:'<h3>\n <ng-content select="label"></ng-content>\n</h3>\n<ng-container *ngFor="let item of allItems; let isLast = last;">\n <div class="flex-container" *ngIf="itemTemplate" #row>\n <ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-container>\n <mad-icon-button *ngIf="!readonly && isDeleteAllowed()" (click)="removeItem(item)">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n <mad-icon-button *ngIf="!readonly && isLast" [disabled]="!isAddAllowed()" (click)="addItem()">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n </div>\n</ng-container>\n<mad-link-button *ngIf="!readonly && !this.allItems.length"\n (click)="addItem()"\n [disabled]="!isAddAllowed()">\n {{ addLabel }}\n</mad-link-button>\n'}]}],lt.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]};var ct=function(){};ct.decorators=[{type:e.NgModule,args:[{declarations:[st,rt,lt],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,U],exports:[st,lt,rt]}]}];var pt=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 S.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}();pt.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" sticky>\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" [sticky]="column.isSticky">\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</div>\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\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%}"]}]}],pt.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:[I.MatPaginator,{static:!1}]}],sort:[{type:e.ViewChild,args:[x.MatSort,{static:!0}]}]};var ut=function(){};ut.decorators=[{type:e.NgModule,args:[{declarations:[pt],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,s.MatFormFieldModule,l.MatInputModule,g.MatMenuModule,I.MatPaginatorModule,x.MatSortModule,S.MatTableModule,U],exports:[pt]}]}];var dt=function(){};dt.SINGLE="SINGLE",dt.BATCH="BATCH",dt.NONE="NONE";var ht=function(){function t(){var t;this.ACTION_COLUMN_NAME="__action__",this.SINGLE=dt.SINGLE,this.BATCH=dt.BATCH,this.NONE=dt.NONE,this.columns=[],this.filterLabel="Filter",this.filterPlaceholder="",this.noDataText="No matching data found",this.pageSizeOptions=[5,10,15],this.defaultPageSize=(null===(t=this.pageSizeOptions)||void 0===t?void 0:t[0])||10,this.actions=[],this.sortEvent=new e.EventEmitter,this.actionEvent=new e.EventEmitter,this.pagingEvent=new e.EventEmitter,this.tableActions=[],this.rowActions=[],this.allSelected=!1,this.displayedDataMap=new Map,this.actualDataMap=new Map,this.selectionModel=new A.SelectionModel(!0),this.isFilterEnabled=!1,this.isPaginationEnabled=!1,this.mode=this.NONE,this.isRowClickable=!1,this.isLoading=!1}return Object.defineProperty(t.prototype,"tableData",{set:function(t){this.dataSource||(this.dataSource=new S.MatTableDataSource(t)),this.createDataMapsAndSetDisplayedDataSourceData(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loading",{set:function(t){this.isLoading=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}),Object.defineProperty(t.prototype,"forceMode",{set:function(t){t!==this.SINGLE&&t!==this.BATCH&&t!==this.NONE||(this._forceMode=t,this.mode=t,this.setActions())},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.columnNames=this.columns.map((function(t){return t.label})),this.mode=this.getTableMode(),this.setActions(),this.mode!==this.NONE&&(this.isRowClickable=!0,this.defaultAction=this.rowActions[0]),this.columnNames.unshift(this.ACTION_COLUMN_NAME)},t.prototype.ngAfterViewInit=function(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},Object.defineProperty(t.prototype,"selectedCount",{get:function(){var t;return(null===(t=this.selectionModel)||void 0===t?void 0:t.selected)?this.selectionModel.selected.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowCount",{get:function(){var t;return(null===(t=this.dataSource)||void 0===t?void 0:t._pageData(this.dataSource.data))?this.dataSource._pageData(this.dataSource.data).length:0},enumerable:!1,configurable:!0}),t.prototype.getSelectedCount=function(t){var e=this.selectedCount;return t!=this.BATCH||e<2?"":" ("+e+")"},t.prototype.isDisabled=function(t){switch(t){case this.SINGLE:return 1!=this.selectedCount;case this.BATCH:return this.selectedCount<1;default:return!1}},t.prototype.onToggleSelectAll=function(){var t=this;this.selectionModel.clear(),this.allSelected=!this.allSelected,this.allSelected&&this.dataSource._pageData(this.dataSource.data).forEach((function(e){var n=""+e.rowId;t.selectionModel.select(n)}))},t.prototype.isSelected=function(t){return this.selectionModel.isSelected(t)},t.prototype.setFilterValue=function(t){this.dataSource.filter=null==t?void 0:t.trim().toLowerCase()},t.prototype.onRowCheckbox=function(t,e){t.stopPropagation(),this.selectionModel.toggle(e.rowId)},t.prototype.onRowEvent=function(e,n,i){switch(void 0===i&&(i=this.defaultAction),this.mode){case this.BATCH:this.onRowCheckbox(e,n);break;case this.SINGLE:if(i&&!t.isClickOnRowMenuIcon(e)){var o=[];o.push(this.idGenerator?n.rowId:this.actualDataMap.get(n.rowId)),this.emitTableAction(i,o)}break;default:return}},t.prototype.onSortingEvent=function(t){this.sortEvent.emit(t)},t.prototype.onPaginationEvent=function(t){this.pagingEvent.emit(t)},t.prototype.onTableAction=function(t){var e,n;if(t){var i=[];try{for(var o=F(this.selectionModel.selected),a=o.next();!a.done;a=o.next()){var r=a.value;i.push(this.idGenerator?r:this.actualDataMap.get(r))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}t.selected=i,this.actionEvent.emit(t)}},t.transformData=function(t,e,n){return e&&e instanceof Function?e(t,n):t},t.generateRowId=function(){return w.v4()},t.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.prototype.emitTableAction=function(t,e){var n=Object.assign({},t);t.type!==this.NONE&&(n.selected=R(e)),this.actionEvent.emit(n)},t.prototype.generateDisplayedDataElement=function(e,n){var i,o,a={};a.rowId=e;try{for(var r=F(this.columns),s=r.next();!s.done;s=r.next()){var l=s.value,c=n[l.dataPropertyName];a[l.dataPropertyName]=t.transformData(c,l.transformer,l.transformerParams)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return a},t.prototype.setActions=function(){var t,e;this.rowActions=[],this.tableActions=[];try{for(var n=F(this.actions),i=n.next();!i.done;i=n.next()){var o=i.value;if(this.mode!==o.hiddenInMode)switch(o.type){case this.SINGLE:this.mode===this.SINGLE?this.rowActions.push(o):this.tableActions.push(o);break;case this.BATCH:this.mode!==this.SINGLE&&this.tableActions.push(o);break;default:this.tableActions.push(o)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.createDataMapsAndSetDisplayedDataSourceData=function(e){var n,i,o=[];this.actualDataMap.clear(),this.displayedDataMap.clear();try{for(var a=F(e),r=a.next();!r.done;r=a.next()){var s=r.value,l=this.idGenerator?this.idGenerator(s):t.generateRowId();this.actualDataMap.set(l,s);var c=this.generateDisplayedDataElement(l,s);this.displayedDataMap.set(l,c),o.push(c)}}catch(t){n={error:t}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this.dataSource.data=o},t.prototype.getTableMode=function(){var t,e;if(this._forceMode)return this._forceMode;if(!this.actions)return this.NONE;var n=new Set;try{for(var i=F(this.actions),o=i.next();!o.done;o=i.next()){var a=o.value;n.add(a.type)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return n.has(this.BATCH)?this.BATCH:n.has(this.SINGLE)?this.SINGLE:this.NONE},t}();ht.decorators=[{type:e.Component,args:[{selector:"mad-data-table",template:'<div class="mad-datatable-action-bar">\n \x3c!-- Table actions: displayed before the table --\x3e\n <div *ngIf="tableActions?.length">\n <mad-outline-button\n [disabled]="isDisabled(tableAction.type)"\n class="table-action"\n *ngFor="let tableAction of tableActions"\n (click)="onTableAction(tableAction)">\n {{ tableAction.label | translate }} {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n </div>\n \x3c!-- Table filter --\x3e\n <mat-form-field *ngIf="isFilterEnabled">\n <mat-label>{{ filterLabel | translate }}</mat-label>\n <input matInput autocomplete="off" (keyup)="setFilterValue($event?.target?.value)"\n placeholder="{{ filterPlaceholder }}" />\n </mat-form-field>\n</div>\n\n\n\x3c!-- Row action menu --\x3e\n<mat-menu #rowActionMenu="matMenu">\n <ng-template matMenuContent let-element="element">\n <button *ngFor="let rowAction of rowActions" mat-menu-item class="row-action"\n (click)="onRowEvent($event, element, rowAction)">\n {{ rowAction.label | translate }}\n </button>\n </ng-template>\n</mat-menu>\n\n\x3c!-- Table --\x3e\n<div *ngIf="rowCount > 0; else noData" class="mad-table">\n <div class="datatable-spinner-wrapper" *ngIf="isLoading">\n <mat-spinner [diameter]="50" [strokeWidth]="3"></mat-spinner>\n </div>\n\n <table mat-table [dataSource]="dataSource" matSort (matSortChange)="onSortingEvent($event)">\n \x3c!-- Row actions column--\x3e\n <ng-container [matColumnDef]="ACTION_COLUMN_NAME">\n <th scope="col" mat-header-cell *matHeaderCellDef class="row-action-button">\n \x3c!-- BATCH: master checkbox --\x3e\n <div *ngIf="mode === BATCH" class="mad-datatable-checkbox-container">\n <mat-checkbox\n (change)="onToggleSelectAll()"\n [checked]="allSelected"\n >\n </mat-checkbox>\n </div>\n \x3c!-- SINGLE / NONE: nothing in header row --\x3e\n </th>\n <td mat-cell *matCellDef="let element" class="row-action-button">\n \x3c!-- BATCH: row checkbox --\x3e\n <div *ngIf="mode === BATCH" class="mad-datatable-checkbox-container">\n <mat-checkbox\n (click)="onRowCheckbox($event, element.rowId)"\n [checked]="isSelected(element.rowId)"\n >\n </mat-checkbox>\n </div>\n \x3c!-- SINGLE: row action menu icon --\x3e\n <mad-icon-button\n *ngIf="mode === SINGLE"\n [matMenuTriggerData]="{ element: element }" [matMenuTriggerFor]="rowActionMenu"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n \x3c!-- NONE: nothing --\x3e\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 scope="col"\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header="{{ column.label | translate}}"\n [arrowPosition]="column.isRightAligned ? \'before\' : \'after\'"\n [class.text-right]="column.isRightAligned"\n >\n {{ column.label }}\n </th>\n </ng-container>\n <ng-template #noSort>\n <th scope="col" mat-header-cell *matHeaderCellDef [class.text-right]="column.isRightAligned">\n {{ column.label }}\n </th>\n </ng-template>\n <td mat-cell *matCellDef="let element" [class.text-right]="column.isRightAligned" [ngSwitch]="column.transformer">\n <span>\n {{ element[column.dataPropertyName] }}\n </span>\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 (page)="onPaginationEvent($event)"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n\x3c!-- No data alert --\x3e\n<ng-template #noData>\n <div class="noDataText">\n <div class="datatable-spinner-wrapper" *ngIf="isLoading">\n <mat-spinner [diameter]="50" [strokeWidth]="3"></mat-spinner>\n </div>\n {{ noDataText }}\n </div>\n</ng-template>\n',styles:[".text-right{padding-right:24px!important;text-align:right!important}.table-action{margin-bottom:.5em;margin-right:.5em}.row-action-button{width:10px}.noDataText{text-align:center}.mad-table,.noDataText{position:relative;width:100%}.mad-table{overflow-x:auto}.mad-datatable-action-bar{align-items:baseline;display:flex;justify-content:space-between}.mad-datatable-checkbox-container{margin-right:16px}.datatable-spinner-wrapper{align-items:center;background-color:#fff;display:flex;height:100%;justify-content:center;left:0;opacity:.8;pointer-events:unset;position:absolute;top:0;width:100%;z-index:99999}"]}]}],ht.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}],actions:[{type:e.Input}],idGenerator:[{type:e.Input}],tableData:[{type:e.Input}],loading:[{type:e.Input}],paginationEnabled:[{type:e.Input}],filterEnabled:[{type:e.Input}],forceMode:[{type:e.Input}],sortEvent:[{type:e.Output}],actionEvent:[{type:e.Output}],pagingEvent:[{type:e.Output}],paginator:[{type:e.ViewChild,args:[I.MatPaginator,{static:!1}]}],sort:[{type:e.ViewChild,args:[x.MatSort,{static:!0}]}]};var mt=function(){};mt.decorators=[{type:e.NgModule,args:[{declarations:[ht],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,s.MatFormFieldModule,l.MatInputModule,g.MatMenuModule,I.MatPaginatorModule,x.MatSortModule,S.MatTableModule,C.MatProgressSpinnerModule,U,u.TranslateModule,E.MatCheckboxModule,b.MatBadgeModule],exports:[ht]}]}];var gt=function(t){function e(e,n){var i=t.call(this,n)||this;return i._focusMonitor=e,i}return L(e,t),e.prototype.ngAfterViewInit=function(){this._focusMonitor.monitor(this._elementRef,!0)},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef)},e.prototype.focus=function(t,e){t?this._focusMonitor.focusVia(this._elementRef,t,e):this._elementRef.nativeElement.focus(e)},e.prototype.getCssForState=function(){return this.state!==T.STEP_STATE.NUMBER||this.completed||this.hasError?this.completed?"step-state-complete":this.hasError?"step-state-error":void 0:"step-state-neutral"},e.prototype.getIcon=function(){return this.completed?"check_circle_outline":this.hasError?"error_outline":""},e}(T.CdkStepHeader);gt.decorators=[{type:e.Component,args:[{selector:"mad-step-header",template:'<div\n class="header"\n fxLayout="row"\n fxLayoutGap="1em"\n [style.background]="this.selected && !this.closed ? \'#d8e2e9\' : \'#ffffff\'"\n [ngClass]="this.hasError ? \'error-border\' : \'check-border\'"\n>\n <div [ngClass]="this.getCssForState()"></div>\n <div class="header-label">\n <mat-icon class="material-icons-outlined">\n {{ this.selected && !this.closed ? \'keyboard_arrow_down\' : \'keyboard_arrow_right\' }}\n </mat-icon>\n </div>\n <div *ngIf="this.completed || this.hasError" class="header-label">\n <mat-icon [ngClass]="this.completed ? \'green-check\' : \'red-error\'">\n {{ getIcon() }}\n </mat-icon>\n </div>\n <span *ngIf="!this.hasError && !this.completed" class="header-label">{{ this.index + 1 + \'.\' }}</span>\n <div class="header-label">{{ this.label }}</div>\n</div>\n',inputs:["color"],host:{class:"mad-step-header",role:"tab"},encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".header{-webkit-tap-highlight-color:transparent;border:1px solid #d3d3d3;box-sizing:content-box;cursor:pointer;height:62px;outline:var(--warn-color);overflow:hidden;width:100%}.header-label{align-items:center;display:flex}.step-state-complete{background:green;width:5px}.step-state-error{background:var(--warn-color);width:5px}.step-state-neutral{background:#d3d3d3;width:5px}.green-check{color:green}.red-error{color:var(--warn-color)}.check-border{border-color:#d3d3d3}.error-border{border-color:var(--warn-color)}"]}]}],gt.ctorParameters=function(){return[{type:k.FocusMonitor},{type:e.ElementRef}]},gt.propDecorators={index:[{type:e.Input}],label:[{type:e.Input}],state:[{type:e.Input}],errorMessage:[{type:e.Input}],selected:[{type:e.Input}],active:[{type:e.Input}],optional:[{type:e.Input}],hasError:[{type:e.Input}],completed:[{type:e.Input}],closed:[{type:e.Input}]};var ft={verticalStepTransition:v.trigger("stepTransition",[v.state("previous",v.style({height:"0px",visibility:"hidden"})),v.state("next",v.style({height:"0px",visibility:"hidden"})),v.state("current",v.style({height:"*",visibility:"visible"})),v.transition("* <=> current",v.animate("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])},bt=function(t){function n(n,i){var o=t.call(this,n)||this;return o.stepper=n,o._viewContainerRef=i,o.onNext=new e.EventEmitter,o.onDone=new e.EventEmitter,o.onHeaderClick=new e.EventEmitter,o.stepClosed=!1,o._isSelected=d.Subscription.EMPTY,o}return L(n,t),n.prototype.ngAfterContentInit=function(){var t=this;this._isSelected=this._stepper.steps.changes.pipe(m.switchMap((function(){return t._stepper.selectionChange.pipe(m.map((function(e){return e.selectedStep===t})),m.tap((function(){return t.stepClosed=!1})),m.startWith(t._stepper.selected===t))}))).subscribe()},n.prototype.ngOnDestroy=function(){this._isSelected.unsubscribe()},n.prototype.next=function(t){void 0===t&&(t=!0),this.stepValidation(t),this.onNext.observers.length<=0&&this.stepper.next(),this.onNext.emit()},n.prototype.selectAndMarkAsTouched=function(t){var e,n;null===(n=null===(e=this._stepper.selected)||void 0===e?void 0:e.stepControl)||void 0===n||n.markAllAsTouched(),this.stepClosed=!1,this.onHeaderClick.observers.length<=0&&this.select(),this.onHeaderClick.emit(t)},n.prototype.completeLast=function(){this.stepValidation(!0),this.stepClosed=!0,this.onDone.observers.length<=0&&this.stepper.next(),this.onDone.emit()},n.prototype.resetValidations=function(){this.hasError=!1,this.completed=!0,this.state=T.STEP_STATE.DONE},n.prototype.stepValidation=function(t){var e,n;t&&(null===(e=this.stepControl)||void 0===e||e.markAllAsTouched()),(null===(n=this.stepControl)||void 0===n?void 0:n.valid)?(this.hasError=!1,this.completed=!0,this.state=T.STEP_STATE.DONE):(this.completed=!1,this.hasError=!0,this.state=T.STEP_STATE.ERROR)},n}(T.CdkStep);bt.decorators=[{type:e.Component,args:[{selector:"mad-step",template:'<ng-template let-last="last" let-nextBtnLbl="nextBtnLbl" let-doneBtnLbl="doneBtnLbl">\n <div class="step-container" fxLayout="column">\n <div class="step-content">\n <ng-content></ng-content>\n </div>\n <div class="step-buttons">\n <div *ngIf="!last">\n <button mat-stroked-button color="primary" (click)="next()">{{nextBtnLbl}}</button>\n </div>\n <div *ngIf="last">\n <button mat-stroked-button color="primary" (click)="completeLast()">{{doneBtnLbl}}</button>\n </div>\n </div>\n </div>\n</ng-template>\n',providers:[{provide:T.CdkStep,useExisting:bt}],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".stepper-vertical{display:block}.mat-vertical-stepper-header{align-items:center;border:none!important;display:flex;height:10px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}.vertical-content-container{border:none}[dir=rtl] .vertical-content-container{margin-left:0;margin-right:36px}.vertical-stepper-content{outline:0;overflow:hidden}.vertical-content{padding:0 24px}.step-container{border-bottom:1px solid #d3d3d3;border-left:1px solid #d3d3d3;border-right:1px solid #d3d3d3}.step-buttons,.step-content{padding:2em}"]}]}],bt.ctorParameters=function(){return[{type:yt,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return yt}))]}]},{type:e.ViewContainerRef}]},bt.propDecorators={onNext:[{type:e.Output}],onDone:[{type:e.Output}],onHeaderClick:[{type:e.Output}]};var yt=function(t){function n(n,i,o,a){var r=t.call(this,n,i,o,a)||this;return r.animationDone=new e.EventEmitter,r.steps=new e.QueryList,r._animationDone=new d.Subject,r._orientation="vertical",r}return L(n,t),n.prototype.ngOnInit=function(){t.prototype.linear=!0},n.prototype.ngAfterContentInit=function(){var e=this;t.prototype.ngAfterContentInit.call(this),this.steps.changes.pipe(m.takeUntil(this._destroyed)).subscribe((function(){e._stateChanged()})),this._animationDone.pipe(m.distinctUntilChanged((function(t,e){return t.fromState===e.fromState&&t.toState===e.toState})),m.takeUntil(this._destroyed)).subscribe((function(t){"current"===t.toState&&e.animationDone.emit()}))},n.prototype._getAnimationDirection=function(e){var n,i;return this.selectedIndex===this.steps.length-1&&(null===(n=this._steps.last)||void 0===n?void 0:n.completed)&&(null===(i=this._steps.last)||void 0===i?void 0:i.stepClosed)?"next":t.prototype._getAnimationDirection.call(this,e)},n.prototype._stepIsNavigable=function(t,e){return e.completed||this.selectedIndex===t||!this.linear},n}(T.CdkStepper);yt.decorators=[{type:e.Component,args:[{selector:"mad-stepper",template:'\x3c!-- Vertical stepper --\x3e\n<ng-container>\n <div *ngFor="let step of steps; let i = index; let isLast = last; let isFirst = first">\n <ng-container\n [ngTemplateOutlet]="stepTemplate"\n [ngTemplateOutletContext]="{step: step, i: i}"></ng-container>\n <div class="vertical-content-container" [class.mat-stepper-vertical-line]="!isLast">\n <div class="vertical-stepper-content" role="tabpanel"\n [@stepTransition]="_getAnimationDirection(i)"\n (@stepTransition.done)="_animationDone.next($event)"\n [id]="_getStepContentId(i)"\n [attr.aria-labelledby]="_getStepLabelId(i)"\n [attr.aria-expanded]="selectedIndex === i">\n <div class="vertical-content">\n <ng-container [ngTemplateOutlet]="step.content"\n [ngTemplateOutletContext]="{step: step, i: i, last: isLast, first: isFirst, nextBtnLbl: this.nextButtonLabel, doneBtnLbl: this.doneButtonLabel}"></ng-container>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template let-step="step" let-i="i" #stepTemplate>\n <mad-step-header\n class="mat-vertical-stepper-header"\n (click)="step.selectAndMarkAsTouched(i)"\n (keydown)="_onKeydown($event)"\n [tabIndex]="_getFocusIndex() === i ? 0 : -1"\n [id]="_getStepLabelId(i)"\n [attr.aria-posinset]="i + 1"\n [attr.aria-setsize]="steps.length"\n [attr.aria-controls]="_getStepContentId(i)"\n [attr.aria-selected]="selectedIndex == i"\n [attr.aria-label]="step.ariaLabel || null"\n [attr.aria-labelledby]="(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null"\n [attr.aria-disabled]="_stepIsNavigable(i, step) ? null : true"\n [index]="i"\n [completed]="step.completed"\n [hasError]="step.hasError"\n [state]="_getIndicatorType(i, step.state)"\n [label]="step.stepLabel || step.label"\n [selected]="selectedIndex === i"\n [active]="_stepIsNavigable(i, step)"\n [optional]="step.optional"\n [closed]="step.stepClosed"\n [errorMessage]="step.errorMessage"></mad-step-header>\n</ng-template>\n',host:{"[class.stepper-vertical]":"true","[attr.aria-orientation]":'"vertical"',role:"tablist"},animations:[ft.verticalStepTransition],providers:[{provide:T.CdkStepper,useExisting:yt}],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".stepper-vertical{display:block}.mat-vertical-stepper-header{align-items:center;border:none!important;display:flex;height:10px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}.vertical-content-container{border:none}[dir=rtl] .vertical-content-container{margin-left:0;margin-right:36px}.vertical-stepper-content{outline:0;overflow:hidden}.vertical-content{padding:0 24px}.step-container{border-bottom:1px solid #d3d3d3;border-left:1px solid #d3d3d3;border-right:1px solid #d3d3d3}.step-buttons,.step-content{padding:2em}"]}]}],yt.ctorParameters=function(){return[{type:M.Directionality,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},yt.propDecorators={animationDone:[{type:e.Output}],nextButtonLabel:[{type:e.Input}],doneButtonLabel:[{type:e.Input}],_stepHeader:[{type:e.ViewChildren,args:[gt]}],_steps:[{type:e.ContentChildren,args:[bt,{descendants:!0}]}]};var vt=function(){};vt.decorators=[{type:e.NgModule,args:[{declarations:[yt,gt,bt],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,T.CdkStepperModule,_.FlexModule],exports:[yt,gt,bt]}]}];var St=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();St.decorators=[{type:e.Component,args:[{selector:"mad-content-header",template:'<div class="content-header">\n <ng-content></ng-content>\n</div>\n',styles:[".content-header{padding-right:.5rem}"]}]}],St.ctorParameters=function(){return[]};var xt=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();xt.decorators=[{type:e.Component,args:[{selector:"mad-content-panel-container",template:'<div class="content-panel-outer-wrapper">\n <ng-content select="mad-content-panel-container-content"></ng-content>\n <ng-content select="mad-content-panel-container-footer"></ng-content>\n</div>\n',styles:[":host{display:flex;flex:1 1 auto;min-height:.05rem;overflow:hidden;position:relative}.content-panel-outer-wrapper{display:flex;flex:1 1 auto;flex-direction:column}"]}]}],xt.ctorParameters=function(){return[]};var It=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();It.decorators=[{type:e.Component,args:[{selector:"mad-content-panel-container-content",template:"<ng-content></ng-content>",styles:[":host{border-top:.05rem solid #ccc;flex:1 1 auto;height:1rem;overflow-y:auto;padding:1rem}"]}]}],It.ctorParameters=function(){return[]};var At=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();At.decorators=[{type:e.Component,args:[{selector:"mad-content-panel-container-footer",template:"<ng-content></ng-content>",styles:[":host{align-items:center;border-top:.05rem solid #ccc;display:flex;flex:0 0 auto;min-height:2rem;padding:.25rem 1rem}"]}]}],At.ctorParameters=function(){return[]};var wt=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();wt.decorators=[{type:e.Component,args:[{selector:"mad-main-container",template:'<div class="main-container">\n <ng-content select="mad-content-header"></ng-content>\n <ng-content select="mad-flowbar"></ng-content>\n <ng-content select="mad-content-panel-container"></ng-content>\n</div>\n',styles:[".main-container{display:flex;flex-direction:column;height:100%}"]}]}],wt.ctorParameters=function(){return[]};var Et=function(){};Et.decorators=[{type:e.NgModule,args:[{declarations:[St,xt,It,At,wt],imports:[n.CommonModule],exports:[St,xt,It,At,wt]}]}];var Ct=function(){function t(){this._steps=[],this._activeStepChange=new e.EventEmitter(!0),this._headerClick=new e.EventEmitter(!0)}return t.prototype.ngOnInit=function(){this._activeStep&&this._activeStep.enabled||(this._activeStep=this._steps.find((function(t){return t.enabled})),this._activeStep&&(this.activeTabHasSubSteps()&&(this._activeStep.activeSubStep=this._activeStep.subSteps.find((function(t){return t.enabled}))),this._activeStepChange.emit(this._activeStep)))},t.prototype.ngAfterViewInit=function(){this.stepper._getIndicatorType=function(){return"number"}},t.prototype.getIndexForActiveStep=function(){var t=this._steps.indexOf(this._activeStep);return-1===t?0:t},t.prototype.changeActiveStep=function(t){var e=this._steps.indexOf(this._activeStep);this._activeStep=t,this.activeTabHasSubSteps()&&(e<this._steps.indexOf(this._activeStep)?this._activeStep.activeSubStep=this._activeStep.subSteps[0]:this._activeStep.activeSubStep=this._activeStep.subSteps[this._activeStep.subSteps.length-1]),this._activeStepChange.emit(this._activeStep)},t.prototype.changeActiveStepOnHeader=function(t){var e=this._steps.indexOf(t);this._activeStep=t,this.stepper.selected=this.stepper._steps.find((function(t,n){return n===e}))},t.prototype.changeActiveSubStep=function(t){this._activeStep.activeSubStep=t},t.prototype.previous=function(){if(this.isPreviousAvailable())if(!this.activeTabHasSubSteps()||this.isFirstSubStep()){var t=this.findPreviousEnabledStep();this.changeActiveStep(t),this.stepper.selectedIndex=this._steps.indexOf(t)}else{var e=this._activeStep.subSteps.indexOf(this._activeStep.activeSubStep);this._activeStep.activeSubStep=this._activeStep.subSteps[e-1]}},t.prototype.next=function(){if(this.isNextAvailable())if(!this.activeTabHasSubSteps()||this.isLastSubStep()){var t=this.findNextEnabledStep();this.changeActiveStep(t),this.stepper.selectedIndex=this._steps.indexOf(t)}else{var e=this._activeStep.subSteps.indexOf(this._activeStep.activeSubStep);this._activeStep.activeSubStep=this._activeStep.subSteps[e+1]}},t.prototype.isPreviousAvailable=function(){if(this._activeStep){if(!this.activeTabHasSubSteps()||this.isFirstSubStep()){var t=this.getCurrentIndex();return t>0&&this.isAnyPreviousStepEnabled(t)}return!0}return!1},t.prototype.isNextAvailable=function(){if(this._activeStep){if(!this.activeTabHasSubSteps()||this.isLastSubStep()){var t=this.getCurrentIndex();return t<this._steps.length-1&&this.isAnyFollowingStepEnabled(t)}return!0}return!1},t.prototype.isLastStep=function(){return this.getCurrentIndex()===this._steps.length-1&&(!this.activeTabHasSubSteps()||this.isLastSubStep())},t.prototype.getCurrentIndex=function(){var t=this;return this._steps.findIndex((function(e){return e===t._activeStep}))},t.prototype.getCurrentSubStepIndex=function(){var t=this;return this._activeStep.subSteps.findIndex((function(e){return e===t._activeStep.activeSubStep}))},t.prototype.triggerClick=function(){var t=this._steps[this.stepper.selectedIndex];this.changeActiveStep(t)},t.prototype.headerClick=function(t,e){t.stopPropagation(),this._headerClick.emit(e)},Object.defineProperty(t.prototype,"currentStepLabel",{get:function(){return this._activeStep.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentSubStepLabel",{get:function(){var t;return null===(t=this._activeStep.activeSubStep)||void 0===t?void 0:t.label},enumerable:!1,configurable:!0}),t.prototype.activeTabHasSubSteps=function(){return this._activeStep.subSteps&&this._activeStep.subSteps.length>0},t.prototype.isFirstSubStep=function(){return this._activeStep.activeSubStep===this._activeStep.subSteps[0]},t.prototype.isLastSubStep=function(){return this._activeStep.activeSubStep===this._activeStep.subSteps[this._activeStep.subSteps.length-1]},t.prototype.isAnyPreviousStepEnabled=function(t){return void 0!==this._steps.slice(0,t).find((function(t){return t.enabled}))},t.prototype.isAnyFollowingStepEnabled=function(t){return void 0!==this._steps.slice(t+1,this._steps.length).find((function(t){return t.enabled}))},t.prototype.findPreviousEnabledStep=function(){var t=this.getCurrentIndex();return this._steps.slice(0,t).reverse().find((function(t){return t.enabled}))},t.prototype.findNextEnabledStep=function(){var t=this.getCurrentIndex();return this._steps.slice(t+1,this._steps.length).find((function(t){return t.enabled}))},t}();Ct.decorators=[{type:e.Component,args:[{selector:"mad-flowbar",template:'<div class="stepper-container">\n <mat-horizontal-stepper #stepper [selectedIndex]="this.getIndexForActiveStep()" (click)="triggerClick()">\n <mat-step *ngFor="let step of _steps" [aria-labelledby]="!step.enabled ? \'disabled\' : null">\n <ng-template matStepLabel>\n <div class="step-header-overlay" *ngIf="this._headerClick.observers.length > 0" (click)="headerClick($event, step)"></div>\n <span>{{step.label}}</span>\n </ng-template>\n </mat-step>\n </mat-horizontal-stepper>\n</div>\n',styles:[".stepper-container{display:flex;padding:0 1rem}::ng-deep .mat-stepper-horizontal .mat-horizontal-stepper-header{height:auto;padding:0}::ng-deep .mat-step-header[aria-labelledby=disabled]{cursor:not-allowed;pointer-events:none!important}::ng-deep .mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 10px}::ng-deep .mat-stepper-horizontal .mat-stepper-horizontal-line{border-top-width:4px;margin:0 5px}.step-header-overlay{height:100%;position:absolute;right:0;top:0;width:100%}"]}]}],Ct.propDecorators={stepper:[{type:e.ViewChild,args:["stepper"]}],_steps:[{type:e.Input,args:["steps"]}],_activeStep:[{type:e.Input,args:["activeStep"]}],_activeStepChange:[{type:e.Output,args:["activeStepChange"]}],_headerClick:[{type:e.Output,args:["headerClick"]}]};var Mt=function(){};Mt.decorators=[{type:e.NgModule,args:[{declarations:[Ct],imports:[n.CommonModule,D.MatStepperModule],exports:[Ct]}]}];var Tt=function(){};Tt.decorators=[{type:e.NgModule,args:[{exports:[Z,U,Y,P,et,at,ct,ot]}]}],t.ButtonModule=U,t.CardModule=at,t.ContentHeaderComponent=St,t.ContentPanelContainerComponent=xt,t.ContentPanelContainerContentComponent=It,t.ContentPanelContainerFooterComponent=At,t.ContentPanelModule=Et,t.DataTableModule=mt,t.FlowbarComponent=Ct,t.FlowbarModule=Mt,t.MainContainerComponent=wt,t.MaterialActionButtonComponent=O,t.MaterialActionButtonModule=P,t.MaterialAddonsModule=Tt,t.NumberFormatService=$,t.NumericFieldModule=et,t.QuickListModule=ct,t.ReadOnlyFormFieldComponent=K,t.ReadOnlyFormFieldModule=Z,t.ReadOnlyFormFieldWrapperComponent=W,t.StepComponent=bt,t.StepHeaderComponent=gt,t.StepperComponent=yt,t.StepperModule=vt,t.TableModule=ut,t.ThrottleClickDirective=it,t.ThrottleClickModule=ot,t.ToolbarComponent=X,t.ToolbarModule=Y,t.ToolbarService=Q,t.madStepperAnimations=ft,t.ɵa=H,t.ɵb=B,t.ɵc=j,t.ɵd=z,t.ɵe=G,t.ɵf=q,t.ɵg=tt,t.ɵh=nt,t.ɵi=st,t.ɵj=rt,t.ɵk=lt,t.ɵl=pt,t.ɵm=ht,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
|
+
var N=function(t,e){return(N=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 L(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}N(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function F(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 V(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}function R(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(V(arguments[e]));return t}Object.create;var B=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}();B.propDecorators={pointerEvent:[{type:e.HostBinding,args:["style.pointer-events"]}],opacity:[{type:e.HostBinding,args:["style.opacity"]}]};var H=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 L(e,t),e}(B);H.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:[""]}]}],H.ctorParameters=function(){return[]},H.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 j=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 L(e,t),e}(B);j.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:[""]}]}],j.ctorParameters=function(){return[]},j.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 z=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 L(e,t),e}(B);z.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:[""]}]}],z.ctorParameters=function(){return[]},z.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 q=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 L(e,t),e}(B);q.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:[""]}]}],q.ctorParameters=function(){return[]},q.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 G=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 L(e,t),e}(B);G.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:[""]}]}],G.ctorParameters=function(){return[]},G.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 U=function(){};U.decorators=[{type:e.NgModule,args:[{declarations:[H,j,z,G,q],imports:[n.CommonModule,i.RouterModule,o.MatButtonModule,a.MatIconModule,r.MatTooltipModule],exports:[H,j,z,G,q]}]}];var W=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}();W.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}"]}]}],W.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},W.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 $=function(){function t(e){this.allowedKeys=[];var n=1.1.toLocaleString(e).charAt(1);this.decimalSeparator=","===n?",":".",this.groupingSeparator=","===n?".":",",this.allowedKeys=R(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}),s=r.indexOf(this.decimalSeparator),l=r.startsWith(t.NEGATIVE),c=s>-1?s:r.length;c>(l?4:3);)c-=3,r=r.substring(0,c)+this.groupingSeparator+r.substring(c,r.length);if(a&&o>0&&r){var p=r.indexOf(this.decimalSeparator);if(i){-1===p&&(p=r.length,r+=this.decimalSeparator),p=(r=this.addMissingLeadingZero(r,p)).indexOf(this.decimalSeparator);for(var u=r.length-p-1,d=0;d<o-u;d++)r+="0"}else r=this.addMissingLeadingZero(r,p)}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),s="",l=-1,c=-1,p=0;try{for(var u=F(e),d=u.next();!d.done;d=u.next()){var h=d.value;if(c++,this.allowedKeys.includes(h)){if(h===this.decimalSeparator){if(0===a)break;if(l>-1)continue;l=c}if("0"===h&&r&&(0===s.length&&c+1!==e.length||s===t.NEGATIVE)){p++;continue}if(h===t.NEGATIVE&&c>0)break;if(l>-1&&s.length+p>l+a)break;s+=h}else{if(h!==this.groupingSeparator)break;-1===l&&p++}}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return s},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}();$.NEGATIVE="-",$.NUMBERS=["0","1","2","3","4","5","6","7","8","9"],$.DEFAULT_FINAL_FORMATTING=!0,$.DEFAULT_DECIMAL_PLACES=2,$.DEFAULT_AUTOFILL_DECIMALS=!1,$.DEFAULT_REMOVE_LEADING_ZEROS=!1,$.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new $(e.ɵɵinject(e.LOCALE_ID))},token:$,providedIn:"any"}),$.decorators=[{type:e.Injectable,args:[{providedIn:"any"}]}],$.ctorParameters=function(){return[{type:String,decorators:[{type:e.Inject,args:[e.LOCALE_ID]}]}]};var K=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){$.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}();K.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}"]}]}],K.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.Renderer2},{type:$}]},K.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 Z=function(){};Z.decorators=[{type:e.NgModule,args:[{declarations:[K,W],imports:[n.CommonModule,i.RouterModule,s.MatFormFieldModule,l.MatInputModule,c.FormsModule,r.MatTooltipModule],exports:[K,W]}]}];var Q=function(){function t(t,e){var n=this;this.router=t,this.translate=e,this.mainActions=[],this.toolbarActions=[],this.toolbarActionsAlwaysAsMenu=!1,this.toolbarActionsMenuTitle="More",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.setToolbarActionsAlwaysAsMenu=function(t){this.toolbarActionsAlwaysAsMenu=t},t.prototype.getToolbarActionsAlwaysAsMenu=function(){return this.toolbarActionsAlwaysAsMenu},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.setToolbarActionsMenuTitle=function(t){this.toolbarActionsMenuTitle=t},t.prototype.getToolbarActionsMenuTitle=function(){return this.toolbarActionsMenuTitle},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}();Q.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new Q(e.ɵɵinject(i.Router),e.ɵɵinject(u.TranslateService))},token:Q,providedIn:"root"}),Q.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],Q.ctorParameters=function(){return[{type:i.Router},{type:u.TranslateService}]};var X=function(){function t(t,e,n){this.breakpointObserver=t,this.titleService=e,this.toolbarService=n,this.isHandset$=this.breakpointObserver.observe([h.Breakpoints.Handset]).pipe(m.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.prototype.getToolbarActionsAlwaysAsMenu=function(){return this.toolbarService.getToolbarActionsAlwaysAsMenu()},t.prototype.getToolbarActionsMenuTitle=function(){return this.toolbarService.getToolbarActionsMenuTitle()},t.prototype.showBadgeForMenu=function(){return this.getToolbarActions().slice(1).filter((function(t){return t.badge&&t.badge.value})).length>0},t.prototype.hasImportantToolbarActions=function(){return this.getToolbarActions().filter((function(t){return!!t.importantAction})).length>0},t}();X.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) && !getToolbarActionsAlwaysAsMenu()) || i < (getToolbarActions().length > 2 ? (hasImportantToolbarActions() ? 0:1) : 2) || !!action.importantAction"\n [id]="action.matIcon"\n [matTooltip]="action.actionName"\n type="button">\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 </mad-icon-button>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf="(isHandset$ | async) || getToolbarActionsAlwaysAsMenu()">\n <ng-container *ngIf="getToolbarActions().length > 2">\n <mad-icon-button type="button" [matMenuTriggerFor]="burgerMenu" [matTooltip]="getToolbarActionsMenuTitle()">\n <mat-icon\n matBadgeColor="warn"\n [matBadge]="showBadgeForMenu() ? \'⁠\' : null"\n matBadgeSize="small"\n matBadgePosition="above after"\n >more_vert\n </mat-icon>\n </mad-icon-button>\n <mat-menu #burgerMenu="matMenu" class="no-print">\n <ng-container *ngFor="let action of getToolbarActions(); let i = index">\n <ng-container *ngIf="!action.importantAction">\n <ng-container *ngIf="hasPermission(action) | async">\n <button *ngIf="i >= (hasImportantToolbarActions() ? 0:1)" mat-menu-item (click)="action.action()">\n <mat-icon\n color="primary"\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 >\n {{ action.actionName }}\n </button>\n </ng-container>\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}"]}]}],X.ctorParameters=function(){return[{type:h.BreakpointObserver},{type:p.Title},{type:Q}]};var Y=function(){};Y.decorators=[{type:e.NgModule,args:[{declarations:[X],imports:[n.CommonModule,i.RouterModule,g.MatMenuModule,o.MatButtonModule,f.MatToolbarModule,a.MatIconModule,P,r.MatTooltipModule,U,b.MatBadgeModule],exports:[X]}]}];var J=new Set([224,91,93]),tt=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=null==t?t: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&&!J.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($.NEGATIVE);if(e.key===$.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($.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 s=Math.min(this.inputEl.nativeElement.clientWidth-this.unitSpan.clientWidth,Math.ceil(this.textSpan.clientWidth));this.unitSpan.style.left=s+"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&&($.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}();tt.decorators=[{type:e.Directive,args:[{selector:"[madNumericField]",host:{"[class.text-right]":'textAlign === "right"',"(change)":"onChange(getValueForFormControl())","(input)":"onChange(getValueForFormControl())","(blur)":"onTouched()"},providers:[{provide:c.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return tt})),multi:!0}]}]}],tt.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:$}]},tt.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 et=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[$]}},t}();et.decorators=[{type:e.NgModule,args:[{providers:[$],declarations:[tt],exports:[tt]}]}];var nt=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}();nt.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}"]}]}],nt.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 it=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(m.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}();it.decorators=[{type:e.Directive,args:[{selector:"[madThrottleClick]"}]}],it.ctorParameters=function(){return[]},it.propDecorators={throttleTime:[{type:e.Input}],throttleClick:[{type:e.Output}],clickEvent:[{type:e.HostListener,args:["click",["$event"]]}]};var ot=function(){};ot.decorators=[{type:e.NgModule,args:[{declarations:[it],imports:[n.CommonModule],exports:[it]}]}];var at=function(){};at.decorators=[{type:e.NgModule,args:[{declarations:[nt],imports:[n.CommonModule,y.MatCardModule,a.MatIconModule,U,o.MatButtonModule,ot],exports:[nt]}]}];var rt=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),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 this.addPossible&&(!this.maxItems||this.allItems.length<this.maxItems)},t.prototype.isDeleteAllowed=function(){return!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}();rt.decorators=[{type:e.Component,args:[{selector:"mad-base-quick-list",template:""}]}],rt.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},rt.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 st=function(t){function e(e){var n=t.call(this,e)||this;return n.changeDetectorRef=e,n}return L(e,t),e}(rt);st.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 && isDeleteAllowed()" (click)="removeItem(item)">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n </div>\n</ng-container>\n<mad-link-button *ngIf="!readonly" (click)="addItem()"\n [disabled]="!addPossible || !isAddAllowed()">\n {{ addLabel }}\n</mad-link-button>\n'}]}],st.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]};var lt=function(t){function e(e){var n=t.call(this,e)||this;return n.changeDetectorRef=e,n}return L(e,t),e}(rt);lt.decorators=[{type:e.Component,args:[{selector:"mad-quick-list-compact",template:'<h3>\n <ng-content select="label"></ng-content>\n</h3>\n<ng-container *ngFor="let item of allItems; let isLast = last;">\n <div class="flex-container" *ngIf="itemTemplate" #row>\n <ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-container>\n <mad-icon-button *ngIf="!readonly && isDeleteAllowed()" (click)="removeItem(item)">\n <mat-icon>delete</mat-icon>\n </mad-icon-button>\n <mad-icon-button *ngIf="!readonly && isLast" [disabled]="!isAddAllowed()" (click)="addItem()">\n <mat-icon>add_circle_outline</mat-icon>\n </mad-icon-button>\n </div>\n</ng-container>\n<mad-link-button *ngIf="!readonly && !this.allItems.length"\n (click)="addItem()"\n [disabled]="!isAddAllowed()">\n {{ addLabel }}\n</mad-link-button>\n'}]}],lt.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]};var ct=function(){};ct.decorators=[{type:e.NgModule,args:[{declarations:[st,rt,lt],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,U],exports:[st,lt,rt]}]}];var pt=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 S.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}();pt.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" sticky>\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" [sticky]="column.isSticky">\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</div>\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\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%}"]}]}],pt.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:[I.MatPaginator,{static:!1}]}],sort:[{type:e.ViewChild,args:[x.MatSort,{static:!0}]}]};var ut=function(){};ut.decorators=[{type:e.NgModule,args:[{declarations:[pt],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,s.MatFormFieldModule,l.MatInputModule,g.MatMenuModule,I.MatPaginatorModule,x.MatSortModule,S.MatTableModule,U],exports:[pt]}]}];var dt=function(){};dt.SINGLE="SINGLE",dt.BATCH="BATCH",dt.NONE="NONE";var ht=function(){function t(){var t;this.ACTION_COLUMN_NAME="__action__",this.SINGLE=dt.SINGLE,this.BATCH=dt.BATCH,this.NONE=dt.NONE,this.columns=[],this.filterLabel="Filter",this.filterPlaceholder="",this.noDataText="No matching data found",this.pageSizeOptions=[5,10,15],this.defaultPageSize=(null===(t=this.pageSizeOptions)||void 0===t?void 0:t[0])||10,this.actions=[],this.sortEvent=new e.EventEmitter,this.actionEvent=new e.EventEmitter,this.pagingEvent=new e.EventEmitter,this.tableActions=[],this.rowActions=[],this.allSelected=!1,this.displayedDataMap=new Map,this.actualDataMap=new Map,this.selectionModel=new A.SelectionModel(!0),this.isFilterEnabled=!1,this.isPaginationEnabled=!1,this.mode=this.NONE,this.isRowClickable=!1,this.isLoading=!1}return Object.defineProperty(t.prototype,"tableData",{set:function(t){this.dataSource||(this.dataSource=new S.MatTableDataSource(t)),this.createDataMapsAndSetDisplayedDataSourceData(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loading",{set:function(t){this.isLoading=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}),Object.defineProperty(t.prototype,"forceMode",{set:function(t){t!==this.SINGLE&&t!==this.BATCH&&t!==this.NONE||(this._forceMode=t,this.mode=t,this.setActions())},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.columnNames=this.columns.map((function(t){return t.label})),this.mode=this.getTableMode(),this.setActions(),this.mode!==this.NONE&&(this.isRowClickable=!0,this.defaultAction=this.rowActions[0]),this.columnNames.unshift(this.ACTION_COLUMN_NAME)},t.prototype.ngAfterViewInit=function(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},Object.defineProperty(t.prototype,"selectedCount",{get:function(){var t;return(null===(t=this.selectionModel)||void 0===t?void 0:t.selected)?this.selectionModel.selected.length:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowCount",{get:function(){var t;return(null===(t=this.dataSource)||void 0===t?void 0:t._pageData(this.dataSource.data))?this.dataSource._pageData(this.dataSource.data).length:0},enumerable:!1,configurable:!0}),t.prototype.getSelectedCount=function(t){var e=this.selectedCount;return t!=this.BATCH||e<2?"":" ("+e+")"},t.prototype.isDisabled=function(t){switch(t){case this.SINGLE:return 1!=this.selectedCount;case this.BATCH:return this.selectedCount<1;default:return!1}},t.prototype.onToggleSelectAll=function(){var t=this;this.selectionModel.clear(),this.allSelected=!this.allSelected,this.allSelected&&this.dataSource._pageData(this.dataSource.data).forEach((function(e){var n=""+e.rowId;t.selectionModel.select(n)}))},t.prototype.isSelected=function(t){return this.selectionModel.isSelected(t)},t.prototype.setFilterValue=function(t){this.dataSource.filter=null==t?void 0:t.trim().toLowerCase()},t.prototype.onRowCheckbox=function(t,e){t.stopPropagation(),this.selectionModel.toggle(e.rowId)},t.prototype.onRowEvent=function(e,n,i){switch(void 0===i&&(i=this.defaultAction),this.mode){case this.BATCH:this.onRowCheckbox(e,n);break;case this.SINGLE:if(i&&!t.isClickOnRowMenuIcon(e)){var o=[];o.push(this.idGenerator?n.rowId:this.actualDataMap.get(n.rowId)),this.emitTableAction(i,o)}break;default:return}},t.prototype.onSortingEvent=function(t){this.sortEvent.emit(t)},t.prototype.onPaginationEvent=function(t){this.pagingEvent.emit(t)},t.prototype.onTableAction=function(t){var e,n;if(t){var i=[];try{for(var o=F(this.selectionModel.selected),a=o.next();!a.done;a=o.next()){var r=a.value;i.push(this.idGenerator?r:this.actualDataMap.get(r))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}t.selected=i,this.actionEvent.emit(t)}},t.transformData=function(t,e,n){return e&&e instanceof Function?e(t,n):t},t.generateRowId=function(){return w.v4()},t.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.prototype.emitTableAction=function(t,e){var n=Object.assign({},t);t.type!==this.NONE&&(n.selected=R(e)),this.actionEvent.emit(n)},t.prototype.generateDisplayedDataElement=function(e,n){var i,o,a={};a.rowId=e;try{for(var r=F(this.columns),s=r.next();!s.done;s=r.next()){var l=s.value,c=n[l.dataPropertyName];a[l.dataPropertyName]=t.transformData(c,l.transformer,l.transformerParams)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return a},t.prototype.setActions=function(){var t,e;this.rowActions=[],this.tableActions=[];try{for(var n=F(this.actions),i=n.next();!i.done;i=n.next()){var o=i.value;if(this.mode!==o.hiddenInMode)switch(o.type){case this.SINGLE:this.mode===this.SINGLE?this.rowActions.push(o):this.tableActions.push(o);break;case this.BATCH:this.mode!==this.SINGLE&&this.tableActions.push(o);break;default:this.tableActions.push(o)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.createDataMapsAndSetDisplayedDataSourceData=function(e){var n,i,o=[];this.actualDataMap.clear(),this.displayedDataMap.clear();try{for(var a=F(e),r=a.next();!r.done;r=a.next()){var s=r.value,l=this.idGenerator?this.idGenerator(s):t.generateRowId();this.actualDataMap.set(l,s);var c=this.generateDisplayedDataElement(l,s);this.displayedDataMap.set(l,c),o.push(c)}}catch(t){n={error:t}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this.dataSource.data=o},t.prototype.getTableMode=function(){var t,e;if(this._forceMode)return this._forceMode;if(!this.actions)return this.NONE;var n=new Set;try{for(var i=F(this.actions),o=i.next();!o.done;o=i.next()){var a=o.value;n.add(a.type)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return n.has(this.BATCH)?this.BATCH:n.has(this.SINGLE)?this.SINGLE:this.NONE},t}();ht.decorators=[{type:e.Component,args:[{selector:"mad-data-table",template:'<div class="mad-datatable-action-bar">\n \x3c!-- Table actions: displayed before the table --\x3e\n <div *ngIf="tableActions?.length">\n <mad-outline-button\n [disabled]="isDisabled(tableAction.type)"\n class="table-action"\n *ngFor="let tableAction of tableActions"\n (click)="onTableAction(tableAction)">\n {{ tableAction.label | translate }} {{ getSelectedCount(tableAction.type) }}\n </mad-outline-button>\n </div>\n \x3c!-- Table filter --\x3e\n <mat-form-field *ngIf="isFilterEnabled">\n <mat-label>{{ filterLabel | translate }}</mat-label>\n <input matInput autocomplete="off" (keyup)="setFilterValue($event?.target?.value)"\n placeholder="{{ filterPlaceholder }}" />\n </mat-form-field>\n</div>\n\n\n\x3c!-- Row action menu --\x3e\n<mat-menu #rowActionMenu="matMenu">\n <ng-template matMenuContent let-element="element">\n <button *ngFor="let rowAction of rowActions" mat-menu-item class="row-action"\n (click)="onRowEvent($event, element, rowAction)">\n {{ rowAction.label | translate }}\n </button>\n </ng-template>\n</mat-menu>\n\n\x3c!-- Table --\x3e\n<div *ngIf="rowCount > 0; else noData" class="mad-table">\n <div class="datatable-spinner-wrapper" *ngIf="isLoading">\n <mat-spinner [diameter]="50" [strokeWidth]="3"></mat-spinner>\n </div>\n\n <table mat-table [dataSource]="dataSource" matSort (matSortChange)="onSortingEvent($event)">\n \x3c!-- Row actions column--\x3e\n <ng-container [matColumnDef]="ACTION_COLUMN_NAME">\n <th scope="col" mat-header-cell *matHeaderCellDef class="row-action-button">\n \x3c!-- BATCH: master checkbox --\x3e\n <div *ngIf="mode === BATCH" class="mad-datatable-checkbox-container">\n <mat-checkbox\n (change)="onToggleSelectAll()"\n [checked]="allSelected"\n >\n </mat-checkbox>\n </div>\n \x3c!-- SINGLE / NONE: nothing in header row --\x3e\n </th>\n <td mat-cell *matCellDef="let element" class="row-action-button">\n \x3c!-- BATCH: row checkbox --\x3e\n <div *ngIf="mode === BATCH" class="mad-datatable-checkbox-container">\n <mat-checkbox\n (click)="onRowCheckbox($event, element.rowId)"\n [checked]="isSelected(element.rowId)"\n >\n </mat-checkbox>\n </div>\n \x3c!-- SINGLE: row action menu icon --\x3e\n <mad-icon-button\n *ngIf="mode === SINGLE"\n [matMenuTriggerData]="{ element: element }" [matMenuTriggerFor]="rowActionMenu"\n >\n <mat-icon>more_vert</mat-icon>\n </mad-icon-button>\n \x3c!-- NONE: nothing --\x3e\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 scope="col"\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header="{{ column.label | translate}}"\n [arrowPosition]="column.isRightAligned ? \'before\' : \'after\'"\n [class.text-right]="column.isRightAligned"\n >\n {{ column.label }}\n </th>\n </ng-container>\n <ng-template #noSort>\n <th scope="col" mat-header-cell *matHeaderCellDef [class.text-right]="column.isRightAligned">\n {{ column.label }}\n </th>\n </ng-template>\n <td mat-cell *matCellDef="let element" [class.text-right]="column.isRightAligned" [ngSwitch]="column.transformer">\n <span>\n {{ element[column.dataPropertyName] }}\n </span>\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 (page)="onPaginationEvent($event)"\n showFirstLastButtons\n >\n </mat-paginator>\n</div>\n\n\x3c!-- No data alert --\x3e\n<ng-template #noData>\n <div class="noDataText">\n <div class="datatable-spinner-wrapper" *ngIf="isLoading">\n <mat-spinner [diameter]="50" [strokeWidth]="3"></mat-spinner>\n </div>\n {{ noDataText }}\n </div>\n</ng-template>\n',styles:[".text-right{padding-right:24px!important;text-align:right!important}.table-action{margin-bottom:.5em;margin-right:.5em}.row-action-button{width:10px}.noDataText{text-align:center}.mad-table,.noDataText{position:relative;width:100%}.mad-table{overflow-x:auto}.mad-datatable-action-bar{align-items:baseline;display:flex;justify-content:space-between}.mad-datatable-checkbox-container{margin-right:16px}.datatable-spinner-wrapper{align-items:center;background-color:#fff;display:flex;height:100%;justify-content:center;left:0;opacity:.8;pointer-events:unset;position:absolute;top:0;width:100%;z-index:99999}"]}]}],ht.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}],actions:[{type:e.Input}],idGenerator:[{type:e.Input}],tableData:[{type:e.Input}],loading:[{type:e.Input}],paginationEnabled:[{type:e.Input}],filterEnabled:[{type:e.Input}],forceMode:[{type:e.Input}],sortEvent:[{type:e.Output}],actionEvent:[{type:e.Output}],pagingEvent:[{type:e.Output}],paginator:[{type:e.ViewChild,args:[I.MatPaginator,{static:!1}]}],sort:[{type:e.ViewChild,args:[x.MatSort,{static:!0}]}]};var mt=function(){};mt.decorators=[{type:e.NgModule,args:[{declarations:[ht],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,s.MatFormFieldModule,l.MatInputModule,g.MatMenuModule,I.MatPaginatorModule,x.MatSortModule,S.MatTableModule,C.MatProgressSpinnerModule,U,u.TranslateModule,E.MatCheckboxModule,b.MatBadgeModule],exports:[ht]}]}];var gt=function(t){function e(e,n){var i=t.call(this,n)||this;return i._focusMonitor=e,i}return L(e,t),e.prototype.ngAfterViewInit=function(){this._focusMonitor.monitor(this._elementRef,!0)},e.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef)},e.prototype.focus=function(t,e){t?this._focusMonitor.focusVia(this._elementRef,t,e):this._elementRef.nativeElement.focus(e)},e.prototype.getCssForState=function(){return this.state!==T.STEP_STATE.NUMBER||this.completed||this.hasError?this.completed?"step-state-complete":this.hasError?"step-state-error":void 0:"step-state-neutral"},e.prototype.getIcon=function(){return this.completed?"check_circle_outline":this.hasError?"error_outline":""},e}(T.CdkStepHeader);gt.decorators=[{type:e.Component,args:[{selector:"mad-step-header",template:'<div\n class="header"\n fxLayout="row"\n fxLayoutGap="1em"\n [style.background]="this.selected && !this.closed ? \'#d8e2e9\' : \'#ffffff\'"\n [ngClass]="this.hasError ? \'error-border\' : \'check-border\'"\n>\n <div [ngClass]="this.getCssForState()"></div>\n <div class="header-label">\n <mat-icon class="material-icons-outlined">\n {{ this.selected && !this.closed ? \'keyboard_arrow_down\' : \'keyboard_arrow_right\' }}\n </mat-icon>\n </div>\n <div *ngIf="this.completed || this.hasError" class="header-label">\n <mat-icon [ngClass]="this.completed ? \'green-check\' : \'red-error\'">\n {{ getIcon() }}\n </mat-icon>\n </div>\n <span *ngIf="!this.hasError && !this.completed" class="header-label">{{ this.index + 1 + \'.\' }}</span>\n <div class="header-label">{{ this.label }}</div>\n</div>\n',inputs:["color"],host:{class:"mad-step-header",role:"tab"},encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".header{-webkit-tap-highlight-color:transparent;border:1px solid #d3d3d3;box-sizing:content-box;cursor:pointer;height:62px;outline:var(--warn-color);overflow:hidden;width:100%}.header-label{align-items:center;display:flex}.step-state-complete{background:green;width:5px}.step-state-error{background:var(--warn-color);width:5px}.step-state-neutral{background:#d3d3d3;width:5px}.green-check{color:green}.red-error{color:var(--warn-color)}.check-border{border-color:#d3d3d3}.error-border{border-color:var(--warn-color)}"]}]}],gt.ctorParameters=function(){return[{type:k.FocusMonitor},{type:e.ElementRef}]},gt.propDecorators={index:[{type:e.Input}],label:[{type:e.Input}],state:[{type:e.Input}],errorMessage:[{type:e.Input}],selected:[{type:e.Input}],active:[{type:e.Input}],optional:[{type:e.Input}],hasError:[{type:e.Input}],completed:[{type:e.Input}],closed:[{type:e.Input}]};var ft={verticalStepTransition:v.trigger("stepTransition",[v.state("previous",v.style({height:"0px",visibility:"hidden"})),v.state("next",v.style({height:"0px",visibility:"hidden"})),v.state("current",v.style({height:"*",visibility:"visible"})),v.transition("* <=> current",v.animate("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])},bt=function(t){function n(n,i){var o=t.call(this,n)||this;return o.stepper=n,o._viewContainerRef=i,o.onNext=new e.EventEmitter,o.onDone=new e.EventEmitter,o.onHeaderClick=new e.EventEmitter,o.stepClosed=!1,o._isSelected=d.Subscription.EMPTY,o}return L(n,t),n.prototype.ngAfterContentInit=function(){var t=this;this._isSelected=this._stepper.steps.changes.pipe(m.switchMap((function(){return t._stepper.selectionChange.pipe(m.map((function(e){return e.selectedStep===t})),m.tap((function(){return t.stepClosed=!1})),m.startWith(t._stepper.selected===t))}))).subscribe()},n.prototype.ngOnDestroy=function(){this._isSelected.unsubscribe()},n.prototype.next=function(t){void 0===t&&(t=!0),this.stepValidation(t),this.onNext.observers.length<=0&&this.stepper.next(),this.onNext.emit()},n.prototype.selectAndMarkAsTouched=function(t){var e,n;null===(n=null===(e=this._stepper.selected)||void 0===e?void 0:e.stepControl)||void 0===n||n.markAllAsTouched(),this.stepClosed=!1,this.onHeaderClick.observers.length<=0&&this.select(),this.onHeaderClick.emit(t)},n.prototype.completeLast=function(){this.stepValidation(!0),this.stepClosed=!0,this.onDone.observers.length<=0&&this.stepper.next(),this.onDone.emit()},n.prototype.resetValidations=function(){this.hasError=!1,this.completed=!0,this.state=T.STEP_STATE.DONE},n.prototype.stepValidation=function(t){var e,n;t&&(null===(e=this.stepControl)||void 0===e||e.markAllAsTouched()),(null===(n=this.stepControl)||void 0===n?void 0:n.valid)?(this.hasError=!1,this.completed=!0,this.state=T.STEP_STATE.DONE):(this.completed=!1,this.hasError=!0,this.state=T.STEP_STATE.ERROR)},n}(T.CdkStep);bt.decorators=[{type:e.Component,args:[{selector:"mad-step",template:'<ng-template let-last="last" let-nextBtnLbl="nextBtnLbl" let-doneBtnLbl="doneBtnLbl">\n <div class="step-container" fxLayout="column">\n <div class="step-content">\n <ng-content></ng-content>\n </div>\n <div class="step-buttons">\n <div *ngIf="!last">\n <button mat-stroked-button color="primary" (click)="next()">{{nextBtnLbl}}</button>\n </div>\n <div *ngIf="last">\n <button mat-stroked-button color="primary" (click)="completeLast()">{{doneBtnLbl}}</button>\n </div>\n </div>\n </div>\n</ng-template>\n',providers:[{provide:T.CdkStep,useExisting:bt}],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".stepper-vertical{display:block}.mat-vertical-stepper-header{align-items:center;border:none!important;display:flex;height:10px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}.vertical-content-container{border:none}[dir=rtl] .vertical-content-container{margin-left:0;margin-right:36px}.vertical-stepper-content{outline:0;overflow:hidden}.vertical-content{padding:0 24px}.step-container{border-bottom:1px solid #d3d3d3;border-left:1px solid #d3d3d3;border-right:1px solid #d3d3d3}.step-buttons,.step-content{padding:2em}"]}]}],bt.ctorParameters=function(){return[{type:yt,decorators:[{type:e.Inject,args:[e.forwardRef((function(){return yt}))]}]},{type:e.ViewContainerRef}]},bt.propDecorators={onNext:[{type:e.Output}],onDone:[{type:e.Output}],onHeaderClick:[{type:e.Output}]};var yt=function(t){function n(n,i,o,a){var r=t.call(this,n,i,o,a)||this;return r.animationDone=new e.EventEmitter,r.steps=new e.QueryList,r._animationDone=new d.Subject,r._orientation="vertical",r}return L(n,t),n.prototype.ngOnInit=function(){t.prototype.linear=!0},n.prototype.ngAfterContentInit=function(){var e=this;t.prototype.ngAfterContentInit.call(this),this.steps.changes.pipe(m.takeUntil(this._destroyed)).subscribe((function(){e._stateChanged()})),this._animationDone.pipe(m.distinctUntilChanged((function(t,e){return t.fromState===e.fromState&&t.toState===e.toState})),m.takeUntil(this._destroyed)).subscribe((function(t){"current"===t.toState&&e.animationDone.emit()}))},n.prototype._getAnimationDirection=function(e){var n,i;return this.selectedIndex===this.steps.length-1&&(null===(n=this._steps.last)||void 0===n?void 0:n.completed)&&(null===(i=this._steps.last)||void 0===i?void 0:i.stepClosed)?"next":t.prototype._getAnimationDirection.call(this,e)},n.prototype._stepIsNavigable=function(t,e){return e.completed||this.selectedIndex===t||!this.linear},n}(T.CdkStepper);yt.decorators=[{type:e.Component,args:[{selector:"mad-stepper",template:'\x3c!-- Vertical stepper --\x3e\n<ng-container>\n <div *ngFor="let step of steps; let i = index; let isLast = last; let isFirst = first">\n <ng-container\n [ngTemplateOutlet]="stepTemplate"\n [ngTemplateOutletContext]="{step: step, i: i}"></ng-container>\n <div class="vertical-content-container" [class.mat-stepper-vertical-line]="!isLast">\n <div class="vertical-stepper-content" role="tabpanel"\n [@stepTransition]="_getAnimationDirection(i)"\n (@stepTransition.done)="_animationDone.next($event)"\n [id]="_getStepContentId(i)"\n [attr.aria-labelledby]="_getStepLabelId(i)"\n [attr.aria-expanded]="selectedIndex === i">\n <div class="vertical-content">\n <ng-container [ngTemplateOutlet]="step.content"\n [ngTemplateOutletContext]="{step: step, i: i, last: isLast, first: isFirst, nextBtnLbl: this.nextButtonLabel, doneBtnLbl: this.doneButtonLabel}"></ng-container>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n\n<ng-template let-step="step" let-i="i" #stepTemplate>\n <mad-step-header\n class="mat-vertical-stepper-header"\n (click)="step.selectAndMarkAsTouched(i)"\n (keydown)="_onKeydown($event)"\n [tabIndex]="_getFocusIndex() === i ? 0 : -1"\n [id]="_getStepLabelId(i)"\n [attr.aria-posinset]="i + 1"\n [attr.aria-setsize]="steps.length"\n [attr.aria-controls]="_getStepContentId(i)"\n [attr.aria-selected]="selectedIndex == i"\n [attr.aria-label]="step.ariaLabel || null"\n [attr.aria-labelledby]="(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null"\n [attr.aria-disabled]="_stepIsNavigable(i, step) ? null : true"\n [index]="i"\n [completed]="step.completed"\n [hasError]="step.hasError"\n [state]="_getIndicatorType(i, step.state)"\n [label]="step.stepLabel || step.label"\n [selected]="selectedIndex === i"\n [active]="_stepIsNavigable(i, step)"\n [optional]="step.optional"\n [closed]="step.stepClosed"\n [errorMessage]="step.errorMessage"></mad-step-header>\n</ng-template>\n',host:{"[class.stepper-vertical]":"true","[attr.aria-orientation]":'"vertical"',role:"tablist"},animations:[ft.verticalStepTransition],providers:[{provide:T.CdkStepper,useExisting:yt}],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".stepper-vertical{display:block}.mat-vertical-stepper-header{align-items:center;border:none!important;display:flex;height:10px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}.vertical-content-container{border:none}[dir=rtl] .vertical-content-container{margin-left:0;margin-right:36px}.vertical-stepper-content{outline:0;overflow:hidden}.vertical-content{padding:0 24px}.step-container{border-bottom:1px solid #d3d3d3;border-left:1px solid #d3d3d3;border-right:1px solid #d3d3d3}.step-buttons,.step-content{padding:2em}"]}]}],yt.ctorParameters=function(){return[{type:M.Directionality,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},yt.propDecorators={animationDone:[{type:e.Output}],nextButtonLabel:[{type:e.Input}],doneButtonLabel:[{type:e.Input}],_stepHeader:[{type:e.ViewChildren,args:[gt]}],_steps:[{type:e.ContentChildren,args:[bt,{descendants:!0}]}]};var vt=function(){};vt.decorators=[{type:e.NgModule,args:[{declarations:[yt,gt,bt],imports:[n.CommonModule,o.MatButtonModule,a.MatIconModule,T.CdkStepperModule,_.FlexModule],exports:[yt,gt,bt]}]}];var St=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();St.decorators=[{type:e.Component,args:[{selector:"mad-content-header",template:'<div class="content-header">\n <ng-content></ng-content>\n</div>\n',styles:[".content-header{padding-right:.5rem}"]}]}],St.ctorParameters=function(){return[]};var xt=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();xt.decorators=[{type:e.Component,args:[{selector:"mad-content-panel-container",template:'<div class="content-panel-outer-wrapper">\n <ng-content select="mad-content-panel-container-content"></ng-content>\n <ng-content select="mad-content-panel-container-footer"></ng-content>\n</div>\n',styles:[":host{display:flex;flex:1 1 auto;min-height:.05rem;overflow:hidden;position:relative}.content-panel-outer-wrapper{display:flex;flex:1 1 auto;flex-direction:column}"]}]}],xt.ctorParameters=function(){return[]};var It=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();It.decorators=[{type:e.Component,args:[{selector:"mad-content-panel-container-content",template:"<ng-content></ng-content>",styles:[":host{border-top:.05rem solid #ccc;flex:1 1 auto;height:1rem;overflow-y:auto;padding:1rem}"]}]}],It.ctorParameters=function(){return[]};var At=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();At.decorators=[{type:e.Component,args:[{selector:"mad-content-panel-container-footer",template:"<ng-content></ng-content>",styles:[":host{align-items:center;border-top:.05rem solid #ccc;display:flex;flex:0 0 auto;min-height:2rem;padding:.25rem 1rem}"]}]}],At.ctorParameters=function(){return[]};var wt=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();wt.decorators=[{type:e.Component,args:[{selector:"mad-main-container",template:'<div class="main-container">\n <ng-content select="mad-content-header"></ng-content>\n <ng-content select="mad-flowbar"></ng-content>\n <ng-content select="mad-content-panel-container"></ng-content>\n</div>\n',styles:[".main-container{display:flex;flex-direction:column;height:100%}"]}]}],wt.ctorParameters=function(){return[]};var Et=function(){};Et.decorators=[{type:e.NgModule,args:[{declarations:[St,xt,It,At,wt],imports:[n.CommonModule],exports:[St,xt,It,At,wt]}]}];var Ct=function(){function t(){this._steps=[],this._activeStepChange=new e.EventEmitter(!0),this._headerClick=new e.EventEmitter(!0)}return t.prototype.ngOnInit=function(){this._activeStep&&this._activeStep.enabled||(this._activeStep=this._steps.find((function(t){return t.enabled})),this._activeStep&&(this.activeTabHasSubSteps()&&(this._activeStep.activeSubStep=this._activeStep.subSteps.find((function(t){return t.enabled}))),this._activeStepChange.emit(this._activeStep)))},t.prototype.ngAfterViewInit=function(){this.stepper._getIndicatorType=function(){return"number"}},t.prototype.getIndexForActiveStep=function(){var t=this._steps.indexOf(this._activeStep);return-1===t?0:t},t.prototype.changeActiveStep=function(t){var e=this._steps.indexOf(this._activeStep);this._activeStep=t,this.activeTabHasSubSteps()&&(e<this._steps.indexOf(this._activeStep)?this._activeStep.activeSubStep=this._activeStep.subSteps[0]:this._activeStep.activeSubStep=this._activeStep.subSteps[this._activeStep.subSteps.length-1]),this._activeStepChange.emit(this._activeStep)},t.prototype.changeActiveStepOnHeader=function(t){var e=this._steps.indexOf(t);this._activeStep=t,this.stepper.selected=this.stepper._steps.find((function(t,n){return n===e}))},t.prototype.changeActiveSubStep=function(t){this._activeStep.activeSubStep=t},t.prototype.previous=function(){if(this.isPreviousAvailable())if(!this.activeTabHasSubSteps()||this.isFirstSubStep()){var t=this.findPreviousEnabledStep();this.changeActiveStep(t),this.stepper.selectedIndex=this._steps.indexOf(t)}else{var e=this._activeStep.subSteps.indexOf(this._activeStep.activeSubStep);this._activeStep.activeSubStep=this._activeStep.subSteps[e-1]}},t.prototype.next=function(){if(this.isNextAvailable())if(!this.activeTabHasSubSteps()||this.isLastSubStep()){var t=this.findNextEnabledStep();this.changeActiveStep(t),this.stepper.selectedIndex=this._steps.indexOf(t)}else{var e=this._activeStep.subSteps.indexOf(this._activeStep.activeSubStep);this._activeStep.activeSubStep=this._activeStep.subSteps[e+1]}},t.prototype.isPreviousAvailable=function(){if(this._activeStep){if(!this.activeTabHasSubSteps()||this.isFirstSubStep()){var t=this.getCurrentIndex();return t>0&&this.isAnyPreviousStepEnabled(t)}return!0}return!1},t.prototype.isNextAvailable=function(){if(this._activeStep){if(!this.activeTabHasSubSteps()||this.isLastSubStep()){var t=this.getCurrentIndex();return t<this._steps.length-1&&this.isAnyFollowingStepEnabled(t)}return!0}return!1},t.prototype.isLastStep=function(){return this.getCurrentIndex()===this._steps.length-1&&(!this.activeTabHasSubSteps()||this.isLastSubStep())},t.prototype.getCurrentIndex=function(){var t=this;return this._steps.findIndex((function(e){return e===t._activeStep}))},t.prototype.getCurrentSubStepIndex=function(){var t=this;return this._activeStep.subSteps.findIndex((function(e){return e===t._activeStep.activeSubStep}))},t.prototype.triggerClick=function(){var t=this._steps[this.stepper.selectedIndex];this.changeActiveStep(t)},t.prototype.headerClick=function(t,e){t.stopPropagation(),this._headerClick.emit(e)},Object.defineProperty(t.prototype,"currentStepLabel",{get:function(){return this._activeStep.label},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentSubStepLabel",{get:function(){var t;return null===(t=this._activeStep.activeSubStep)||void 0===t?void 0:t.label},enumerable:!1,configurable:!0}),t.prototype.activeTabHasSubSteps=function(){return this._activeStep.subSteps&&this._activeStep.subSteps.length>0},t.prototype.isFirstSubStep=function(){return this._activeStep.activeSubStep===this._activeStep.subSteps[0]},t.prototype.isLastSubStep=function(){return this._activeStep.activeSubStep===this._activeStep.subSteps[this._activeStep.subSteps.length-1]},t.prototype.isAnyPreviousStepEnabled=function(t){return void 0!==this._steps.slice(0,t).find((function(t){return t.enabled}))},t.prototype.isAnyFollowingStepEnabled=function(t){return void 0!==this._steps.slice(t+1,this._steps.length).find((function(t){return t.enabled}))},t.prototype.findPreviousEnabledStep=function(){var t=this.getCurrentIndex();return this._steps.slice(0,t).reverse().find((function(t){return t.enabled}))},t.prototype.findNextEnabledStep=function(){var t=this.getCurrentIndex();return this._steps.slice(t+1,this._steps.length).find((function(t){return t.enabled}))},t}();Ct.decorators=[{type:e.Component,args:[{selector:"mad-flowbar",template:'<div class="stepper-container">\n <mat-horizontal-stepper #stepper [selectedIndex]="this.getIndexForActiveStep()" (click)="triggerClick()">\n <mat-step *ngFor="let step of _steps" [aria-labelledby]="!step.enabled ? \'disabled\' : null">\n <ng-template matStepLabel>\n <div class="step-header-overlay" *ngIf="this._headerClick.observers.length > 0" (click)="headerClick($event, step)"></div>\n <span>{{step.label}}</span>\n </ng-template>\n </mat-step>\n </mat-horizontal-stepper>\n</div>\n',styles:[".stepper-container{display:flex;padding:0 1rem}::ng-deep .mat-stepper-horizontal .mat-horizontal-stepper-header{height:auto;padding:0}::ng-deep .mat-step-header[aria-labelledby=disabled]{cursor:not-allowed;pointer-events:none!important}::ng-deep .mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 10px}::ng-deep .mat-stepper-horizontal .mat-stepper-horizontal-line{border-top-width:4px;margin:0 5px}.step-header-overlay{height:100%;position:absolute;right:0;top:0;width:100%}"]}]}],Ct.propDecorators={stepper:[{type:e.ViewChild,args:["stepper"]}],_steps:[{type:e.Input,args:["steps"]}],_activeStep:[{type:e.Input,args:["activeStep"]}],_activeStepChange:[{type:e.Output,args:["activeStepChange"]}],_headerClick:[{type:e.Output,args:["headerClick"]}]};var Mt=function(){};Mt.decorators=[{type:e.NgModule,args:[{declarations:[Ct],imports:[n.CommonModule,D.MatStepperModule],exports:[Ct]}]}];var Tt=function(){};Tt.decorators=[{type:e.NgModule,args:[{exports:[Z,U,Y,P,et,at,ct,ot]}]}],t.ButtonModule=U,t.CardModule=at,t.ContentHeaderComponent=St,t.ContentPanelContainerComponent=xt,t.ContentPanelContainerContentComponent=It,t.ContentPanelContainerFooterComponent=At,t.ContentPanelModule=Et,t.DataTableModule=mt,t.FlowbarComponent=Ct,t.FlowbarModule=Mt,t.MainContainerComponent=wt,t.MaterialActionButtonComponent=O,t.MaterialActionButtonModule=P,t.MaterialAddonsModule=Tt,t.NumberFormatService=$,t.NumericFieldModule=et,t.QuickListModule=ct,t.ReadOnlyFormFieldComponent=K,t.ReadOnlyFormFieldModule=Z,t.ReadOnlyFormFieldWrapperComponent=W,t.StepComponent=bt,t.StepHeaderComponent=gt,t.StepperComponent=yt,t.StepperModule=vt,t.TableModule=ut,t.ThrottleClickDirective=it,t.ThrottleClickModule=ot,t.ToolbarComponent=X,t.ToolbarModule=Y,t.ToolbarService=Q,t.madStepperAnimations=ft,t.ɵa=H,t.ɵb=B,t.ɵc=j,t.ɵd=z,t.ɵe=G,t.ɵf=q,t.ɵg=tt,t.ɵh=nt,t.ɵi=st,t.ɵj=rt,t.ɵk=lt,t.ɵl=pt,t.ɵm=ht,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
17
17
|
//# sourceMappingURL=porscheinformatik-material-addons.umd.min.js.map
|