@coolon/angular-ui-powerups 0.0.11 → 0.0.13
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/coolon-angular-ui-powerups.umd.js +3 -3
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/esm2015/lib/directives/command.directive.js +2 -2
- package/esm2015/lib/directives/focus-binding.directive.js +2 -2
- package/esm2015/lib/place/route/route-parameter-bindings.js +2 -2
- package/esm5/lib/directives/command.directive.js +2 -2
- package/esm5/lib/directives/focus-binding.directive.js +2 -2
- package/esm5/lib/place/route/route-parameter-bindings.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +3 -3
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +3 -3
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/package.json +2 -2
- package/schematics/place-routes/index.js +2 -3
- package/schematics/place-routes/index.js.map +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/platform-browser"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@coolon/pectin/lib/promise/deferred.class"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/list"),require("@angular/material/tabs"),require("@angular/material/tooltip"),require("@angular/router"),require("@angular/animations"),require("resize-observer-polyfill"),require("@typescript-plus/fast-memoize-decorator"),require("lodash"),require("reflect-metadata"),require("@typescript-plus/fast-memoize-decorator/dist/src")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/platform-browser","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@coolon/pectin/lib/promise/deferred.class","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/list","@angular/material/tabs","@angular/material/tooltip","@angular/router","@angular/animations","resize-observer-polyfill","@typescript-plus/fast-memoize-decorator","lodash","reflect-metadata","@typescript-plus/fast-memoize-decorator/dist/src"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.platformBrowser,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.deferred_class,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.list,t.ng.material.tabs,t.ng.material.tooltip,t.ng.router,t.ng.animations,t.ResizeObserver,t.fastMemoizeDecorator,t.lodash,null,t.src)}(this,function(t,e,n,r,o,i,a,s,u,c,l,p,f,d,m,y,g,h,v,b,I,w){"use strict";h=h&&h.hasOwnProperty("default")?h.default:h;var C=function(t,e){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function M(t,e){function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var P=function(){return(P=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function R(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function D(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function E(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function O(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function A(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}var T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),_=function(t){function e(){var e=t.call(this)||this;e.valueModel=new s.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var r=e;return e.errorStateMatcher={isErrorState:function(t,e){return r.hasErrors()}},e}return M(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},R([s.UseDelegate(),D("design:type",s.ValueModel),D("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(T);var j=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),F=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandParameterProvided=!1,n}return M(e,t),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){s.assert.notNil(this.pectinCommand),this.pectinCommand instanceof s.UnaryCommand?this._commandParameterProvided||s.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&s.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;s.Dsl.disposeWith(this).chain.value(this.pectinCommand.enabled).subscribe(function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))})},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof s.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(s.GarbageCollector);var S=function(t){function r(e,n,r){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=r,o}return M(r,t),r.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},r.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},r.prototype.ngOnInit=function(){},r.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?s.Dsl.disposeWith(this).chain.value(this.pectinFocusBinding.focusContext.focused).subscribe(function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()}):s.Logger.get(this).warn("pectinFocusBinding was nil")},r.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},r.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},r.prototype.isFocused=function(t){return this.document.activeElement===t},r.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(s.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame(function(){e.tryAndFocus(t-1)}):s.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(r.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),r.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},r.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},r.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],r.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},r.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},r}(T);var L=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),x=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),k=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},R([s.UseDelegate(),D("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),R([s.StoreInListModel("optionsModel"),D("design:type",Array)],e.prototype,"options",void 0),e}(_);var B=new n.InjectionToken("InteractionContext"),V=function(){};var K=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._doneListeners=new s.EventListenerList,e._cancelListeners=new s.EventListenerList,e._finishListeners=new s.EventListenerList,e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.onDone=function(t){this._doneListeners.add(t)},e.prototype.onCancel=function(t){this._cancelListeners.add(t)},e.prototype.done=function(t){var e=this;return this._doneListeners.fireAndWait(function(e){return e(t)}).finally(function(){return e.finalizeAndDispose()})},e.prototype.cancel=function(t){var e=this;return this._cancelListeners.fireAndWait(function(e){return e(t)}).finally(function(){return e.finalizeAndDispose()})},e.prototype.finalizeAndDispose=function(){this._finishListeners.fire(function(t){return t()}),[this._finishListeners,this._doneListeners,this._cancelListeners].forEach(function(t){return t.dispose()})},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(T);var N=new n.InjectionToken("InteractionActivityData");var U=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color="primary" (click)="done()">{{alert.ok()}}</button>\n</p>\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[N]}]}]},e}(K);var q,z,H=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.assert.notNil(e),console.log(e),n}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'" (click)="done(true)">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[N]}]}]},e}(K);t.ɵp=function(t){function e(){var e=t.call(this)||this;return e.activityTabs=new s.MutableListModel,e.obsoleteTabs=[],e}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this;s.Dsl.disposeWith(this).observe.valuesFrom(this.tabs.animationDone).subscribe(function(){return t.cleanUpTabs()})},e.prototype.initialise=function(t){this.initialActivity=P({},t,{interactionContext:this})},e.prototype.startActivity=function(t,e){var n=this,r=c.Deferred.defer(),o={interactionContext:this,activityClass:t,activityData:e,onDone:r.resolve,onCancel:r.reject};return this.activityTabs.push(o),this.tabs.selectedIndex=this.activityTabs.length,r.promise.finally(function(){n.obsoleteTabs.push(o),n.tabs.selectedIndex=n.activityTabs.length-1})},e.prototype.alert=function(t){return this.startActivity(U,t)},e.prototype.confirm=function(t){return this.startActivity(H,t)},e.prototype.cleanUpTabs=function(){var t=this;this.activityTabs.value=this.activityTabs.value.filter(function(e){return!t.obsoleteTabs.includes(e)})},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="true">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]="this" [activityContext]="initialActivity"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor="let tab of activityTabs.value">\n <angular-ui-powerups-activity-outlet [interactionContext]="this" [activityContext]="tab"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:block}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={parentInteractionContext:[{type:n.Input}],initialActivity:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}]},e}(T),function(e){function n(){}(t.ɵp||(t.ɵp={})).ActivityContext=n}(),t.ɵw=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{set:function(t){this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:V,useValue:this},{provide:N,useValue:t.activityData}],parent:this.injector}),r=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponent=this.viewContainerRef.createComponent(r,0,e),this.activityComponent.instance.onDone(t.onDone),this.activityComponent.instance.onCancel(t.onCancel)},t.prototype.alert=function(t){return this.interactionContext.alert(t)},t.prototype.confirm=function(t){return this.interactionContext.confirm(t)},t.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}(),q=t.ɵw||(t.ɵw={}),z=function(){function t(t){this.context=t}return t.prototype.alert=function(t){return s.lang.notImplemented()},t.prototype.confirm=function(t){return s.lang.notImplemented()},t.prototype.startActivity=function(t,e){return s.lang.notImplemented()},t}(),q.OutletInteractionContext=z;var Y=function(e){function r(t){var n=e.call(this)||this;return n.dialogService=t,l.assert.notNil(t),n}return M(r,e),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(e,n,r){var o=this;void 0===r&&(r=!0);var i={data:n,disableClose:r,panelClass:"dialog-interaction-service",autoFocus:!1},a=this.dialogService.open(t.ɵp,i);return new Promise(function(t,r){var i=a.componentInstance;i.parentInteractionContext=o,i.initialise({activityClass:e,activityData:n,onDone:function(e){t(e),a.close(e)},onCancel:function(t){r(t),a.close(t)}}),a.updateSize()})},r.prototype.alert=function(t){return this._startActivity(U,t,!1)},r.prototype.confirm=function(t){return this._startActivity(H,t,!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(p.MatDialog))},token:r,providedIn:"root"}),r}(V);var G=function(){function r(){}return r.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,u.PortalModule],declarations:[t.ɵp,H,U,t.ɵw],entryComponents:[t.ɵp,H,U],providers:[Y]}]}],r}(),W=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},R([s.UseDelegate(),D("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),R([s.StoreInValueModel("busyModel"),D("design:type",Boolean)],t.prototype,"busy",void 0),t}();var Z=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--angular-ui-powerups-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),$=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-nav",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let place of places" [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [active]="rla.isActive"\n [matTooltip]="place.title">{{place.title}}</a>\n</nav>\n\n',styles:[""]}]}],t.ctorParameters=function(){return[]},t.propDecorators={places:[{type:n.Input}]},t}();var J=function(){function t(){this._activePlaces=new s.MutableListModel}return Object.defineProperty(t.prototype,"activePlaces",{get:function(){return this._activePlaces.readonly},enumerable:!0,configurable:!0}),t.prototype.onActivate=function(t){this._activePlaces.push(t)},t.prototype.onDeactivate=function(t){this._activePlaces.remove(t)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[Object]),D("design:returntype",void 0)],t.prototype,"onActivate",null),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[Object]),D("design:returntype",void 0)],t.prototype,"onDeactivate",null),t}();var Q=function(){function t(t){this.placeService=t}return t.prototype.ngOnInit=function(){},t.prototype.onActivate=function(t){this.placeService.onActivate(t)},t.prototype.onDeactivate=function(t){this.placeService.onDeactivate(t)},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-place-outlet",template:'<router-outlet (activate)="onActivate($event)" (deactivate)="onDeactivate($event)"></router-outlet>\n',styles:[":host{grid-area:main;display:-ms-grid;display:grid;-ms-grid-rows:0 1fr;grid-template-rows:0 1fr;min-height:0}"]}]}],t.ctorParameters=function(){return[{type:J}]},t}();var X=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,y.RouterModule,d.MatTabsModule,f.MatListModule,m.MatTooltipModule],declarations:[Z,W,Q,$],entryComponents:[W],exports:[W,Q,Z,$],providers:[J]}]}],t}(),tt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[F,S,j,L,x,k],imports:[e.CommonModule,i.BrowserModule,a.BrowserAnimationsModule,r.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,X,G],exports:[F,S,j,L,x,k,G,X]}]}],t}(),et=g.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var nt=function(t,e){this.width=t,this.height=e};var rt,ot=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,r,o){var i=t.call(this,r,o)||this;return i.top=e,i.left=n,i.width=r,i.height=o,i}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new ot(t.clientX-this.left,t.clientY-this.top):new ot(t.x-this.left,t.y-this.top)},e}(nt),(rt=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new rt(e.top,e.left,e.width,e.height)};var it=function(e){function n(n,r){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=r,o._boundsModel=new s.ValueHolder(new t.Bounds(0,0,0,0)),o}return M(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new h(function(e,n){t.ngZone.run(function(){return t.updateBounds()})});n.observe(e),this.onDispose(function(){return n.disconnect()})},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(T);function at(){}function st(t){return function(e){Reflect.defineMetadata("place.options",t,e)}}(function(t){function e(){}t.Callback=e})(at||(at={})),function(t){function e(){}t.Options=e;var n=function(t,e){s.assert.notNil(e),this.path=e.path,this.title=e.title,this.authenticate=b.isNil(e.authenticate)||e.authenticate};t.Descriptor=n,t.getDescriptor=function(t){var e=Reflect.getMetadata("place.options",t);return new n(t,e)}}(st||(st={}));var ut=function(){function t(t){this.parameters=t}return t.prototype.get=function(t){var e=this.parameters.find(function(e){return e.parameterDef===t});return e?e.resolvedValue:null},t.prototype.replace=function(e,n){return new t(this.parameters.filter(function(t){return t.parameterDef!==e}).concat({parameterDef:e,resolvedValue:n}))},t.prototype.getFormattedRouteId=function(){var t=this.getRouteIdParam();return t?t.parameterDef.type.format(t.resolvedValue):null},t.prototype.getRouteIdParam=function(){return this.parameters.find(function(t){return t.parameterDef.isRouteId})},t.prototype.getFormattedParameters=function(){var t={};this.parameters.filter(function(t){return!t.parameterDef.isRouteId}).forEach(function(e){t[e.parameterDef.name]=e.parameterDef.type.format(e.resolvedValue)});return t},t.prototype.hasRouteId=function(){return!!this.getRouteIdParam()},t.prototype.redirect=function(t,e,n){var r=this.getFormattedRouteId(),o=t.hasRouteId()?"..":".",i=r?[o,r,this.getFormattedParameters()]:[o,this.getFormattedParameters()];e.navigate(i,{relativeTo:n})},R([s.Trace(),D("design:type",Function),D("design:paramtypes",[]),D("design:returntype",void 0)],t.prototype,"getFormattedRouteId",null),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[]),D("design:returntype",void 0)],t.prototype,"getFormattedParameters",null),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[t,y.Router,y.ActivatedRoute]),D("design:returntype",void 0)],t.prototype,"redirect",null),t}();t.RouteParameterBindings=function(t){function e(n,r,o){var i=t.call(this)||this;i.component=n,i.router=r,i.activatedRoute=o,i._incomingRouteChange=new s.MutableValueModel(!1),i.resolvedParameters=new s.MutableValueModel;var a=s.Dsl.disposeWith(i),u=(a.chain,a.valueOf,a.before,a.when),c=(a.after,a.observe);i.txo=new s.TransactionObserver;var p=l.Klass.get(n).getMetadataList(e.ROUTE_PARAMETER_LIST_KEY);p.forEach(function(t){return i.installBinding(t)});var f=c.valuesFrom(o.paramMap).last().map(function(t){var e=[];return p.forEach(function(n){var r;r=n.isArray?t.getAll(n.name).map(function(t){return n.type.parse(t)}):n.type.parse(t.get(n.name)),e.push({parameterDef:n,resolvedValue:r})}),new ut(e)});return f.subscribe(function(t){i._incomingRouteChange.value=!0,i.resolvedParameters.value=t,i._incomingRouteChange.value=!1}),u.valueOf(i.resolvedParameters).changes(function(t,e){t.redirect(e,r,o)},{unless:i.incomingRouteChange}),i.txo.observe("incomingResolvedRouteParameters",f),i.txo.observe("this.routeIsChanging",i.incomingRouteChange),i}return M(e,t),Object.defineProperty(e.prototype,"incomingRouteChange",{get:function(){return this._incomingRouteChange.readonly},enumerable:!0,configurable:!0}),e.prototype.installBinding=function(t){var e=this.getModelFor(t);this.txo.observe(t.propertyName,e),this.registerDisposable(new s.Binding(this.resolvedParameters,e,{toRight:function(e){return e.get(t)},toLeft:function(e,n){return n.replace(t,e)}}))},e.prototype.getModelFor=function(t){return this.component[t.propertyName]},e}(s.GarbageCollector),(t.RouteParameterBindings||(t.RouteParameterBindings={})).ROUTE_PARAMETER_LIST_KEY=Symbol("place:route:parameters");var ct=function(e){function n(n,r){var o=e.call(this)||this;return o.activatedRoute=n,o.routeBindingMediator=o.registerDisposable(new t.RouteParameterBindings(o,r,n)),o.titleModel.setDefault(o.placeConfig.title),o}return M(n,e),Object.defineProperty(n.prototype,"placeConfig",{get:function(){return st.getDescriptor(this.constructor)},enumerable:!0,configurable:!0}),n.prototype.canDeactivate=function(){return!0},R([s.UseDelegate(),D("design:type",s.MutableValueModel)],n.prototype,"titleModel",void 0),R([v.Memoize(),D("design:type",st.Descriptor),D("design:paramtypes",[])],n.prototype,"placeConfig",null),n}(T);var lt=function(){function t(t,e){this.router=t,this.injector=e}return t.prototype.canDeactivate=function(t,e,n,r){return t.canDeactivate()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router},{type:n.Injector}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router),n.ɵɵinject(n.INJECTOR))},token:t,providedIn:"root"}),t}();t.Sanitiser=function(){function t(t,e,n){this.parameterDef=t,this.snapshot=e,this.sanitiser=n}return t.prototype.isRouteId=function(){return this.parameterDef.isRouteId},Object.defineProperty(t.prototype,"valueChanged",{get:function(){return!b.isNil(this.initialValue)&&this.hasChanged(this.initialValue,this.sanitisedValue)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sanitisedValue",{get:function(){return this._sanitisedValue},enumerable:!0,configurable:!0}),t.prototype.sanitize=function(){return E(this,void 0,void 0,function(){var t;return O(this,function(e){switch(e.label){case 0:return this.sanitiser?(this.initialValue=this.readFrom(this.snapshot),t=this,[4,this.sanitiser.sanitise(this.initialValue)]):[3,2];case 1:if(t._sanitisedValue=e.sent(),this.initialValue!==this._sanitisedValue)return[2,!1];e.label=2;case 2:return[2,!0]}})})},t}();var pt=function(){function e(e,n,r){var o=this;this.parameterDefs=e,this.snapshot=n,this.injector=r,this.parameterSanitisers=[];var i=e.map(function(e){return e.isArray?new t.Sanitiser.Array(e,n,o.getSanitiser(e)):new t.Sanitiser.Value(e,n,o.getSanitiser(e))});this.routeIdSanitiser=i.find(function(t){return t.isRouteId()}),this.parameterSanitisers=i.filter(function(t){return!t.isRouteId()})}return e.prototype.sanitise=function(){return E(this,void 0,void 0,function(){var t,e,n,r,o;return O(this,function(i){switch(i.label){case 0:return this.routeIdSanitiser?[4,this.routeIdSanitiser.sanitize()]:[3,2];case 1:if(i.sent(),this.routeIdSanitiser.valueChanged)return[2,!1];i.label=2;case 2:i.trys.push([2,7,8,9]),n=A(this.parameterSanitisers),r=n.next(),i.label=3;case 3:return r.done?[3,6]:[4,r.value.sanitize()];case 4:i.sent(),i.label=5;case 5:return r=n.next(),[3,3];case 6:return[3,9];case 7:return o=i.sent(),t={error:o},[3,9];case 8:try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}return[7];case 9:return[2,!this.parameterSanitisers.find(function(t){return t.valueChanged})]}})})},e.prototype.redirect=function(t){if(s.assert.isTruthy(0!==this.parameterSanitisers.length),this.routeIdSanitiser.valueChanged)return t.navigate(["..",this.routeIdSanitiser.sanitisedValue]);var e={};return this.parameterSanitisers.forEach(function(t){return t.injectRouteParam(e)}),t.navigate([".",e])},e.prototype.getSanitiser=function(t){return t.sanitiser?this.injector.get(t.sanitiser,new t.sanitiser):null},R([w.Memoize(),D("design:type",Function),D("design:paramtypes",[Object]),D("design:returntype",Object)],e.prototype,"getSanitiser",null),e}();(function(t){var e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.readFrom=function(t){var e=this.parameterDef.isRouteId?t.paramMap.get(this.parameterDef.name):t.queryParamMap.get(this.parameterDef.name);return this.parameterDef.type.parse(e)},e.prototype.hasChanged=function(t,e){return t!==e},e.prototype.injectRouteParam=function(t){t[this.parameterDef.name]=this.parameterDef.type.format(this.sanitisedValue)},e}(t);t.Value=e;var n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.readFrom=function(t){var e=this;return t.queryParamMap.getAll(this.parameterDef.name).map(function(t){return e.parameterDef.type.parse(t)})},e.prototype.hasChanged=function(t,e){return t!==e},e.prototype.injectRouteParam=function(t){var e=this;t[this.parameterDef.name]=this.sanitisedValue.map(function(t){return e.parameterDef.type.format(t)})},e}(t);t.Array=n})(t.Sanitiser||(t.Sanitiser={}));var ft,dt,mt,yt=function(){function e(t,e){this.router=t,this.injector=e}return e.prototype.canActivate=function(e,n){var r=this,o=l.Klass.get(e.component).getMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY),i=new pt(o,e,this.injector);return i.sanitise().then(function(t){return t||i.redirect(r.router),t})},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:y.Router},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(y.Router),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[y.ActivatedRouteSnapshot,y.RouterStateSnapshot]),D("design:returntype",Object)],e.prototype,"canActivate",null),e}();function gt(t,e,n,r){var o=l.Opts.get(n),i=s.assert.notNil(t).toString();return{name:o.getOptional("as",i),propertyName:i,type:s.assert.notNil(e),sanitiser:o.getOptional("sanitiser",null),isRouteId:r,isArray:!1}}function ht(t,e,n){var r=l.Opts.get(n),o=s.assert.notNil(t).toString();return{name:r.getOptional("as",o),propertyName:o,type:s.assert.notNil(e),sanitiser:r.getOptional("listSanitiser",null),isRouteId:!1,isArray:!0}}ft=t.ParameterType||(t.ParameterType={}),dt=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),mt=function(){function t(){}return t.prototype.format=function(t){return""+t},t.prototype.parse=function(t){return+t},t}(),ft.STRING=new dt,ft.NUMBER=new mt,t.ACTIVITY_DATA=N,t.AbstractActivity=K,t.AbstractInputComponent=_,t.AbstractPlaceComponent=ct,t.ActivityContainerComponent=t.ɵp,t.ActivityOutletComponent=t.ɵw,t.AlertDialogComponent=U,t.AngularUiPowerupsModule=tt,t.BusyOverlayComponent=W,t.CommandDirective=F,t.ConfirmationDialogComponent=H,t.DialogInteractionService=Y,t.Dimension=nt,t.DisposableComponent=T,t.EmptyStateComponent=Z,t.FocusBindingDirective=S,t.INTERACTION_CONTEXT=B,t.InteractionContext=V,t.InteractionModule=G,t.LeavePlaceGuard=lt,t.NavComponent=$,t.NumberInputComponent=j,t.PasswordInputComponent=x,t.Place=st,t.PlaceModule=X,t.PlaceOutletComponent=Q,t.PlaceRouteGuard=yt,t.PlaceService=J,t.Point=ot,t.QueryParameter=function(e,n){return function(r,o){var i=gt(o,e,n,!1);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.QueryParameterList=function(e,n){return function(r,o){var i=ht(o,e,n);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.ResizeAwareComponent=it,t.RouteId=function(e,n){return function(r,o){var i=gt(o,e,n,!0);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.RouteParameter=function(e,n){return function(r,o){var i=gt(o,e,n,!1);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.RouteParameterList=function(e,n){return function(r,o){var i=ht(o,e,n);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.RouteParameterSanitiser=pt,t.SelectInputComponent=k,t.StringInputComponent=L,t.slideDownAndUpAnimation=function(t,e){s.OptionsHelper.get(e).getOptional("duration","100ms");var n=s.OptionsHelper.get(e).getOptional("hiddenStyleDef",et);return g.trigger(t,[g.transition(":enter",[n,g.animate("100ms")]),g.transition(":leave",[g.animate("100ms",n)])])},t.ɵa=F,t.ɵb=S,t.ɵc=T,t.ɵd=j,t.ɵe=_,t.ɵf=L,t.ɵg=x,t.ɵh=k,t.ɵi=X,t.ɵj=Z,t.ɵk=W,t.ɵl=Q,t.ɵm=J,t.ɵn=$,t.ɵo=G,t.ɵq=H,t.ɵr=K,t.ɵs=N,t.ɵu=U,t.ɵx=Y,t.ɵy=V,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/platform-browser"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@coolon/pectin/lib/promise/deferred.class"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/list"),require("@angular/material/tabs"),require("@angular/material/tooltip"),require("@angular/router"),require("@angular/animations"),require("resize-observer-polyfill"),require("@typescript-plus/fast-memoize-decorator"),require("lodash"),require("reflect-metadata"),require("@typescript-plus/fast-memoize-decorator/dist/src")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/platform-browser","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@coolon/pectin/lib/promise/deferred.class","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/list","@angular/material/tabs","@angular/material/tooltip","@angular/router","@angular/animations","resize-observer-polyfill","@typescript-plus/fast-memoize-decorator","lodash","reflect-metadata","@typescript-plus/fast-memoize-decorator/dist/src"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.platformBrowser,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.deferred_class,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.list,t.ng.material.tabs,t.ng.material.tooltip,t.ng.router,t.ng.animations,t.ResizeObserver,t.fastMemoizeDecorator,t.lodash,null,t.src)}(this,function(t,e,n,r,o,i,a,s,u,c,l,p,f,d,m,y,g,h,v,b,I,w){"use strict";h=h&&h.hasOwnProperty("default")?h.default:h;var C=function(t,e){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function M(t,e){function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var P=function(){return(P=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function R(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function D(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function E(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}function O(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function A(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}var T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),_=function(t){function e(){var e=t.call(this)||this;e.valueModel=new s.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var r=e;return e.errorStateMatcher={isErrorState:function(t,e){return r.hasErrors()}},e}return M(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},R([s.UseDelegate(),D("design:type",s.ValueModel),D("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(T);var j=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),F=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandParameterProvided=!1,n}return M(e,t),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){s.assert.notNil(this.pectinCommand),this.pectinCommand instanceof s.UnaryCommand?this._commandParameterProvided||s.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&s.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,s.Dsl.disposeWith(this).chain)(this.pectinCommand.enabled).subscribe(function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))})},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof s.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(s.GarbageCollector);var S=function(t){function r(e,n,r){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=r,o}return M(r,t),r.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},r.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},r.prototype.ngOnInit=function(){},r.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,s.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe(function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()}):s.Logger.get(this).warn("pectinFocusBinding was nil")},r.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},r.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},r.prototype.isFocused=function(t){return this.document.activeElement===t},r.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(s.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame(function(){e.tryAndFocus(t-1)}):s.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(r.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),r.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},r.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},r.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],r.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},r.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},r}(T);var L=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),x=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(_),k=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},R([s.UseDelegate(),D("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),R([s.StoreInListModel("optionsModel"),D("design:type",Array)],e.prototype,"options",void 0),e}(_);var B=new n.InjectionToken("InteractionContext"),V=function(){};var K=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._doneListeners=new s.EventListenerList,e._cancelListeners=new s.EventListenerList,e._finishListeners=new s.EventListenerList,e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.onDone=function(t){this._doneListeners.add(t)},e.prototype.onCancel=function(t){this._cancelListeners.add(t)},e.prototype.done=function(t){var e=this;return this._doneListeners.fireAndWait(function(e){return e(t)}).finally(function(){return e.finalizeAndDispose()})},e.prototype.cancel=function(t){var e=this;return this._cancelListeners.fireAndWait(function(e){return e(t)}).finally(function(){return e.finalizeAndDispose()})},e.prototype.finalizeAndDispose=function(){this._finishListeners.fire(function(t){return t()}),[this._finishListeners,this._doneListeners,this._cancelListeners].forEach(function(t){return t.dispose()})},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(T);var N=new n.InjectionToken("InteractionActivityData");var U=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color="primary" (click)="done()">{{alert.ok()}}</button>\n</p>\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[N]}]}]},e}(K);var q,z,H=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.assert.notNil(e),console.log(e),n}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'" (click)="done(true)">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[N]}]}]},e}(K);t.ɵp=function(t){function e(){var e=t.call(this)||this;return e.activityTabs=new s.MutableListModel,e.obsoleteTabs=[],e}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this;s.Dsl.disposeWith(this).observe.valuesFrom(this.tabs.animationDone).subscribe(function(){return t.cleanUpTabs()})},e.prototype.initialise=function(t){this.initialActivity=P({},t,{interactionContext:this})},e.prototype.startActivity=function(t,e){var n=this,r=c.Deferred.defer(),o={interactionContext:this,activityClass:t,activityData:e,onDone:r.resolve,onCancel:r.reject};return this.activityTabs.push(o),this.tabs.selectedIndex=this.activityTabs.length,r.promise.finally(function(){n.obsoleteTabs.push(o),n.tabs.selectedIndex=n.activityTabs.length-1})},e.prototype.alert=function(t){return this.startActivity(U,t)},e.prototype.confirm=function(t){return this.startActivity(H,t)},e.prototype.cleanUpTabs=function(){var t=this;this.activityTabs.value=this.activityTabs.value.filter(function(e){return!t.obsoleteTabs.includes(e)})},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="true">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]="this" [activityContext]="initialActivity"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor="let tab of activityTabs.value">\n <angular-ui-powerups-activity-outlet [interactionContext]="this" [activityContext]="tab"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:block}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={parentInteractionContext:[{type:n.Input}],initialActivity:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}]},e}(T),function(e){function n(){}(t.ɵp||(t.ɵp={})).ActivityContext=n}(),t.ɵw=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{set:function(t){this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:V,useValue:this},{provide:N,useValue:t.activityData}],parent:this.injector}),r=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponent=this.viewContainerRef.createComponent(r,0,e),this.activityComponent.instance.onDone(t.onDone),this.activityComponent.instance.onCancel(t.onCancel)},t.prototype.alert=function(t){return this.interactionContext.alert(t)},t.prototype.confirm=function(t){return this.interactionContext.confirm(t)},t.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}(),q=t.ɵw||(t.ɵw={}),z=function(){function t(t){this.context=t}return t.prototype.alert=function(t){return s.lang.notImplemented()},t.prototype.confirm=function(t){return s.lang.notImplemented()},t.prototype.startActivity=function(t,e){return s.lang.notImplemented()},t}(),q.OutletInteractionContext=z;var Y=function(e){function r(t){var n=e.call(this)||this;return n.dialogService=t,l.assert.notNil(t),n}return M(r,e),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(e,n,r){var o=this;void 0===r&&(r=!0);var i={data:n,disableClose:r,panelClass:"dialog-interaction-service",autoFocus:!1},a=this.dialogService.open(t.ɵp,i);return new Promise(function(t,r){var i=a.componentInstance;i.parentInteractionContext=o,i.initialise({activityClass:e,activityData:n,onDone:function(e){t(e),a.close(e)},onCancel:function(t){r(t),a.close(t)}}),a.updateSize()})},r.prototype.alert=function(t){return this._startActivity(U,t,!1)},r.prototype.confirm=function(t){return this._startActivity(H,t,!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(p.MatDialog))},token:r,providedIn:"root"}),r}(V);var G=function(){function r(){}return r.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,u.PortalModule],declarations:[t.ɵp,H,U,t.ɵw],entryComponents:[t.ɵp,H,U],providers:[Y]}]}],r}(),W=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},R([s.UseDelegate(),D("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),R([s.StoreInValueModel("busyModel"),D("design:type",Boolean)],t.prototype,"busy",void 0),t}();var Z=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--angular-ui-powerups-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),$=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-nav",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let place of places" [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [active]="rla.isActive"\n [matTooltip]="place.title">{{place.title}}</a>\n</nav>\n\n',styles:[""]}]}],t.ctorParameters=function(){return[]},t.propDecorators={places:[{type:n.Input}]},t}();var J=function(){function t(){this._activePlaces=new s.MutableListModel}return Object.defineProperty(t.prototype,"activePlaces",{get:function(){return this._activePlaces.readonly},enumerable:!0,configurable:!0}),t.prototype.onActivate=function(t){this._activePlaces.push(t)},t.prototype.onDeactivate=function(t){this._activePlaces.remove(t)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[Object]),D("design:returntype",void 0)],t.prototype,"onActivate",null),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[Object]),D("design:returntype",void 0)],t.prototype,"onDeactivate",null),t}();var Q=function(){function t(t){this.placeService=t}return t.prototype.ngOnInit=function(){},t.prototype.onActivate=function(t){this.placeService.onActivate(t)},t.prototype.onDeactivate=function(t){this.placeService.onDeactivate(t)},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-place-outlet",template:'<router-outlet (activate)="onActivate($event)" (deactivate)="onDeactivate($event)"></router-outlet>\n',styles:[":host{grid-area:main;display:-ms-grid;display:grid;-ms-grid-rows:0 1fr;grid-template-rows:0 1fr;min-height:0}"]}]}],t.ctorParameters=function(){return[{type:J}]},t}();var X=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,y.RouterModule,d.MatTabsModule,f.MatListModule,m.MatTooltipModule],declarations:[Z,W,Q,$],entryComponents:[W],exports:[W,Q,Z,$],providers:[J]}]}],t}(),tt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[F,S,j,L,x,k],imports:[e.CommonModule,i.BrowserModule,a.BrowserAnimationsModule,r.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,X,G],exports:[F,S,j,L,x,k,G,X]}]}],t}(),et=g.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var nt=function(t,e){this.width=t,this.height=e};var rt,ot=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,r,o){var i=t.call(this,r,o)||this;return i.top=e,i.left=n,i.width=r,i.height=o,i}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new ot(t.clientX-this.left,t.clientY-this.top):new ot(t.x-this.left,t.y-this.top)},e}(nt),(rt=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new rt(e.top,e.left,e.width,e.height)};var it=function(e){function n(n,r){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=r,o._boundsModel=new s.ValueHolder(new t.Bounds(0,0,0,0)),o}return M(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new h(function(e,n){t.ngZone.run(function(){return t.updateBounds()})});n.observe(e),this.onDispose(function(){return n.disconnect()})},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(T);function at(){}function st(t){return function(e){Reflect.defineMetadata("place.options",t,e)}}(function(t){function e(){}t.Callback=e})(at||(at={})),function(t){function e(){}t.Options=e;var n=function(t,e){s.assert.notNil(e),this.path=e.path,this.title=e.title,this.authenticate=b.isNil(e.authenticate)||e.authenticate};t.Descriptor=n,t.getDescriptor=function(t){var e=Reflect.getMetadata("place.options",t);return new n(t,e)}}(st||(st={}));var ut=function(){function t(t){this.parameters=t}return t.prototype.get=function(t){var e=this.parameters.find(function(e){return e.parameterDef===t});return e?e.resolvedValue:null},t.prototype.replace=function(e,n){return new t(this.parameters.filter(function(t){return t.parameterDef!==e}).concat({parameterDef:e,resolvedValue:n}))},t.prototype.getFormattedRouteId=function(){var t=this.getRouteIdParam();return t?t.parameterDef.type.format(t.resolvedValue):null},t.prototype.getRouteIdParam=function(){return this.parameters.find(function(t){return t.parameterDef.isRouteId})},t.prototype.getFormattedParameters=function(){var t={};this.parameters.filter(function(t){return!t.parameterDef.isRouteId}).forEach(function(e){t[e.parameterDef.name]=e.parameterDef.type.format(e.resolvedValue)});return t},t.prototype.hasRouteId=function(){return!!this.getRouteIdParam()},t.prototype.redirect=function(t,e,n){var r=this.getFormattedRouteId(),o=t.hasRouteId()?"..":".",i=r?[o,r,this.getFormattedParameters()]:[o,this.getFormattedParameters()];e.navigate(i,{relativeTo:n})},R([s.Trace(),D("design:type",Function),D("design:paramtypes",[]),D("design:returntype",void 0)],t.prototype,"getFormattedRouteId",null),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[]),D("design:returntype",void 0)],t.prototype,"getFormattedParameters",null),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[t,y.Router,y.ActivatedRoute]),D("design:returntype",void 0)],t.prototype,"redirect",null),t}();t.RouteParameterBindings=function(t){function e(n,r,o){var i=t.call(this)||this;i.component=n,i.router=r,i.activatedRoute=o,i._incomingRouteChange=new s.MutableValueModel(!1),i.resolvedParameters=new s.MutableValueModel;var a=s.Dsl.disposeWith(i),u=(a.chain,a.valueOf,a.before,a.when),c=(a.after,a.observe);i.txo=new s.TransactionObserver;var p=l.Klass.get(n).getMetadataList(e.ROUTE_PARAMETER_LIST_KEY);p.forEach(function(t){return i.installBinding(t)});var f=c.valuesFrom(o.paramMap).last().map(function(t){var e=[];return p.forEach(function(n){var r;r=n.isArray?t.getAll(n.name).map(function(t){return n.type.parse(t)}):n.type.parse(t.get(n.name)),e.push({parameterDef:n,resolvedValue:r})}),new ut(e)});return f.subscribe(function(t){i._incomingRouteChange.value=!0,i.resolvedParameters.value=t,i._incomingRouteChange.value=!1}),u.valueOf(i.resolvedParameters).changes(function(t,e){t.redirect(e,r,o)},{unless:i.incomingRouteChange}),i.txo.observe("incomingResolvedRouteParameters",f),i.txo.observe("this.routeIsChanging",i.incomingRouteChange),i}return M(e,t),Object.defineProperty(e.prototype,"incomingRouteChange",{get:function(){return this._incomingRouteChange.readonly},enumerable:!0,configurable:!0}),e.prototype.installBinding=function(t){var e=this.getModelFor(t);this.registerDisposable(new s.Binding(this.resolvedParameters,e,{toRight:function(e){return e.get(t)},toLeft:function(e,n){return n.replace(t,e)}}))},e.prototype.getModelFor=function(t){return this.component[t.propertyName]},e}(s.GarbageCollector),(t.RouteParameterBindings||(t.RouteParameterBindings={})).ROUTE_PARAMETER_LIST_KEY=Symbol("place:route:parameters");var ct=function(e){function n(n,r){var o=e.call(this)||this;return o.activatedRoute=n,o.routeBindingMediator=o.registerDisposable(new t.RouteParameterBindings(o,r,n)),o.titleModel.setDefault(o.placeConfig.title),o}return M(n,e),Object.defineProperty(n.prototype,"placeConfig",{get:function(){return st.getDescriptor(this.constructor)},enumerable:!0,configurable:!0}),n.prototype.canDeactivate=function(){return!0},R([s.UseDelegate(),D("design:type",s.MutableValueModel)],n.prototype,"titleModel",void 0),R([v.Memoize(),D("design:type",st.Descriptor),D("design:paramtypes",[])],n.prototype,"placeConfig",null),n}(T);var lt=function(){function t(t,e){this.router=t,this.injector=e}return t.prototype.canDeactivate=function(t,e,n,r){return t.canDeactivate()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router},{type:n.Injector}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router),n.ɵɵinject(n.INJECTOR))},token:t,providedIn:"root"}),t}();t.Sanitiser=function(){function t(t,e,n){this.parameterDef=t,this.snapshot=e,this.sanitiser=n}return t.prototype.isRouteId=function(){return this.parameterDef.isRouteId},Object.defineProperty(t.prototype,"valueChanged",{get:function(){return!b.isNil(this.initialValue)&&this.hasChanged(this.initialValue,this.sanitisedValue)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sanitisedValue",{get:function(){return this._sanitisedValue},enumerable:!0,configurable:!0}),t.prototype.sanitize=function(){return E(this,void 0,void 0,function(){var t;return O(this,function(e){switch(e.label){case 0:return this.sanitiser?(this.initialValue=this.readFrom(this.snapshot),t=this,[4,this.sanitiser.sanitise(this.initialValue)]):[3,2];case 1:if(t._sanitisedValue=e.sent(),this.initialValue!==this._sanitisedValue)return[2,!1];e.label=2;case 2:return[2,!0]}})})},t}();var pt=function(){function e(e,n,r){var o=this;this.parameterDefs=e,this.snapshot=n,this.injector=r,this.parameterSanitisers=[];var i=e.map(function(e){return e.isArray?new t.Sanitiser.Array(e,n,o.getSanitiser(e)):new t.Sanitiser.Value(e,n,o.getSanitiser(e))});this.routeIdSanitiser=i.find(function(t){return t.isRouteId()}),this.parameterSanitisers=i.filter(function(t){return!t.isRouteId()})}return e.prototype.sanitise=function(){return E(this,void 0,void 0,function(){var t,e,n,r,o;return O(this,function(i){switch(i.label){case 0:return this.routeIdSanitiser?[4,this.routeIdSanitiser.sanitize()]:[3,2];case 1:if(i.sent(),this.routeIdSanitiser.valueChanged)return[2,!1];i.label=2;case 2:i.trys.push([2,7,8,9]),n=A(this.parameterSanitisers),r=n.next(),i.label=3;case 3:return r.done?[3,6]:[4,r.value.sanitize()];case 4:i.sent(),i.label=5;case 5:return r=n.next(),[3,3];case 6:return[3,9];case 7:return o=i.sent(),t={error:o},[3,9];case 8:try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}return[7];case 9:return[2,!this.parameterSanitisers.find(function(t){return t.valueChanged})]}})})},e.prototype.redirect=function(t){if(s.assert.isTruthy(0!==this.parameterSanitisers.length),this.routeIdSanitiser.valueChanged)return t.navigate(["..",this.routeIdSanitiser.sanitisedValue]);var e={};return this.parameterSanitisers.forEach(function(t){return t.injectRouteParam(e)}),t.navigate([".",e])},e.prototype.getSanitiser=function(t){return t.sanitiser?this.injector.get(t.sanitiser,new t.sanitiser):null},R([w.Memoize(),D("design:type",Function),D("design:paramtypes",[Object]),D("design:returntype",Object)],e.prototype,"getSanitiser",null),e}();(function(t){var e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.readFrom=function(t){var e=this.parameterDef.isRouteId?t.paramMap.get(this.parameterDef.name):t.queryParamMap.get(this.parameterDef.name);return this.parameterDef.type.parse(e)},e.prototype.hasChanged=function(t,e){return t!==e},e.prototype.injectRouteParam=function(t){t[this.parameterDef.name]=this.parameterDef.type.format(this.sanitisedValue)},e}(t);t.Value=e;var n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.readFrom=function(t){var e=this;return t.queryParamMap.getAll(this.parameterDef.name).map(function(t){return e.parameterDef.type.parse(t)})},e.prototype.hasChanged=function(t,e){return t!==e},e.prototype.injectRouteParam=function(t){var e=this;t[this.parameterDef.name]=this.sanitisedValue.map(function(t){return e.parameterDef.type.format(t)})},e}(t);t.Array=n})(t.Sanitiser||(t.Sanitiser={}));var ft,dt,mt,yt=function(){function e(t,e){this.router=t,this.injector=e}return e.prototype.canActivate=function(e,n){var r=this,o=l.Klass.get(e.component).getMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY),i=new pt(o,e,this.injector);return i.sanitise().then(function(t){return t||i.redirect(r.router),t})},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:y.Router},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(y.Router),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),R([s.Trace(),D("design:type",Function),D("design:paramtypes",[y.ActivatedRouteSnapshot,y.RouterStateSnapshot]),D("design:returntype",Object)],e.prototype,"canActivate",null),e}();function gt(t,e,n,r){var o=l.Opts.get(n),i=s.assert.notNil(t).toString();return{name:o.getOptional("as",i),propertyName:i,type:s.assert.notNil(e),sanitiser:o.getOptional("sanitiser",null),isRouteId:r,isArray:!1}}function ht(t,e,n){var r=l.Opts.get(n),o=s.assert.notNil(t).toString();return{name:r.getOptional("as",o),propertyName:o,type:s.assert.notNil(e),sanitiser:r.getOptional("listSanitiser",null),isRouteId:!1,isArray:!0}}ft=t.ParameterType||(t.ParameterType={}),dt=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),mt=function(){function t(){}return t.prototype.format=function(t){return""+t},t.prototype.parse=function(t){return+t},t}(),ft.STRING=new dt,ft.NUMBER=new mt,t.ACTIVITY_DATA=N,t.AbstractActivity=K,t.AbstractInputComponent=_,t.AbstractPlaceComponent=ct,t.ActivityContainerComponent=t.ɵp,t.ActivityOutletComponent=t.ɵw,t.AlertDialogComponent=U,t.AngularUiPowerupsModule=tt,t.BusyOverlayComponent=W,t.CommandDirective=F,t.ConfirmationDialogComponent=H,t.DialogInteractionService=Y,t.Dimension=nt,t.DisposableComponent=T,t.EmptyStateComponent=Z,t.FocusBindingDirective=S,t.INTERACTION_CONTEXT=B,t.InteractionContext=V,t.InteractionModule=G,t.LeavePlaceGuard=lt,t.NavComponent=$,t.NumberInputComponent=j,t.PasswordInputComponent=x,t.Place=st,t.PlaceModule=X,t.PlaceOutletComponent=Q,t.PlaceRouteGuard=yt,t.PlaceService=J,t.Point=ot,t.QueryParameter=function(e,n){return function(r,o){var i=gt(o,e,n,!1);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.QueryParameterList=function(e,n){return function(r,o){var i=ht(o,e,n);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.ResizeAwareComponent=it,t.RouteId=function(e,n){return function(r,o){var i=gt(o,e,n,!0);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.RouteParameter=function(e,n){return function(r,o){var i=gt(o,e,n,!1);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.RouteParameterList=function(e,n){return function(r,o){var i=ht(o,e,n);l.Klass.get(r).addToOwnMetadataList(t.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY,i),s.UseDelegate()(r,o)}},t.RouteParameterSanitiser=pt,t.SelectInputComponent=k,t.StringInputComponent=L,t.slideDownAndUpAnimation=function(t,e){s.OptionsHelper.get(e).getOptional("duration","100ms");var n=s.OptionsHelper.get(e).getOptional("hiddenStyleDef",et);return g.trigger(t,[g.transition(":enter",[n,g.animate("100ms")]),g.transition(":leave",[g.animate("100ms",n)])])},t.ɵa=F,t.ɵb=S,t.ɵc=T,t.ɵd=j,t.ɵe=_,t.ɵf=L,t.ɵg=x,t.ɵh=k,t.ɵi=X,t.ɵj=Z,t.ɵk=W,t.ɵl=Q,t.ɵm=J,t.ɵn=$,t.ɵo=G,t.ɵq=H,t.ɵr=K,t.ɵs=N,t.ɵu=U,t.ɵx=Y,t.ɵy=V,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map
|