@coolon/angular-ui-powerups 3.7.2 → 3.7.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +174 -122
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  8. package/esm2015/lib/components/table/column-model.js +8 -0
  9. package/esm2015/lib/components/table/column-model.js.map +1 -1
  10. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  11. package/esm2015/lib/components/table/table.component.js +1 -1
  12. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  13. package/esm2015/lib/place/components/abstract-place-navigation.component.js +9 -5
  14. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  15. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  16. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +5 -5
  17. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  18. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  19. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +8 -23
  20. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  21. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  22. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +5 -8
  23. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  24. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
  25. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +5 -5
  26. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  27. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  28. package/esm2015/lib/place/exports.js +1 -1
  29. package/esm2015/lib/place/exports.js.map +1 -1
  30. package/esm2015/lib/place/exports.metadata.json +1 -1
  31. package/esm2015/lib/place/guards/place.guard.js +9 -13
  32. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  33. package/esm2015/lib/place/guards/place.guard.metadata.json +1 -1
  34. package/esm2015/lib/place/navigation/session/navigation-session.js +3 -3
  35. package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -1
  36. package/esm2015/lib/place/place-access-guard.js +28 -0
  37. package/esm2015/lib/place/place-access-guard.js.map +1 -0
  38. package/esm2015/lib/place/place-access-guard.metadata.json +1 -0
  39. package/esm2015/lib/place/place-router.js +32 -3
  40. package/esm2015/lib/place/place-router.js.map +1 -1
  41. package/esm2015/lib/place/place-router.metadata.json +1 -1
  42. package/esm2015/lib/place/visit.js +1 -1
  43. package/esm2015/lib/place/visit.js.map +1 -1
  44. package/esm2015/lib/place/visit.metadata.json +1 -1
  45. package/fesm2015/coolon-angular-ui-powerups.js +166 -119
  46. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  47. package/lib/components/table/column-model.d.ts +6 -0
  48. package/lib/place/components/abstract-place-navigation.component.d.ts +3 -2
  49. package/lib/place/components/list-place-nav/list-place-nav.component.d.ts +2 -2
  50. package/lib/place/components/place-outlet/place-outlet.component.d.ts +1 -3
  51. package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +2 -4
  52. package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +2 -2
  53. package/lib/place/exports.d.ts +1 -1
  54. package/lib/place/guards/place.guard.d.ts +1 -3
  55. package/lib/place/place-access-guard.d.ts +11 -0
  56. package/lib/place/place-router.d.ts +18 -4
  57. package/package.json +1 -1
  58. package/schematics/place-add/index.js.map +1 -1
  59. package/schematics/utils/workspace.js.map +1 -1
  60. package/esm2015/lib/place/place-auth-service.js +0 -3
  61. package/esm2015/lib/place/place-auth-service.js.map +0 -1
  62. package/esm2015/lib/place/place-auth-service.metadata.json +0 -1
  63. package/lib/place/place-auth-service.d.ts +0 -36
  64. package/schematics/bootstrap-app/templates/app/auth/place-auth.service.ts.template +0 -41
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"PlaceOutletComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":42,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":36,"character":1},"arguments":[{"selector":"aup-place-outlet","animations":[{"__symbolic":"reference","module":"./route-animations","name":"LEFT_RIGHT_PLACE_ANIMATION","line":40,"character":15}],"template":"<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n","styles":[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{display:block;flex:1;min-height:0;overflow-x:hidden;overflow-y:scroll;position:relative}router-outlet{display:none}"]}]}],"members":{"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":44,"character":12},"arguments":["animateModel"]}]}],"animateModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":47,"character":12},"arguments":[{"defaultValue":true}]}]}],"customPlaceAnimationOrderModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3},"arguments":["placeAnimationOrderModel"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":51,"character":38}}]}],"customPlaceAnimationOrder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":3},"arguments":["placeAnimationOrder"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":55,"character":33},"arguments":["customPlaceAnimationOrderModel"]}]}],"placeChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":58,"character":3}}]}],"routerOut":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":61,"character":3},"arguments":["routeOutlet",{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":87,"character":15},"arguments":[{"__symbolic":"reference","module":"../../place-auth-service","name":"PLACE_AUTH_SERVICE","line":87,"character":22}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":88,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":88,"character":27},"arguments":[{"__symbolic":"reference","module":"../../place-config","name":"AUP_PLACE_CONFIG","line":88,"character":34}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":89,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":89,"character":27}}]],"parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":85,"character":39},{"__symbolic":"reference","module":"../../place-router","name":"PlaceRouter","line":86,"character":44},{"__symbolic":"reference","module":"../../place-auth-service","name":"PlaceAuthService","line":87,"character":77},{"__symbolic":"reference","module":"../../place-config","name":"PlaceConfig","line":88,"character":74},{"__symbolic":"reference","name":"PlaceOutletComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"getAnimationOrder":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}],"onOutletActivated":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"Trace","line":188,"character":3}}]}],"validateAnimationState":[{"__symbolic":"method"}],"onOutletDeactivated":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"Trace","line":209,"character":3}}]}],"checkStateAndInitialise":[{"__symbolic":"method"}],"initialisePlace":[{"__symbolic":"method"}],"pushVisitChangeToRoute":[{"__symbolic":"method"}],"animationStarted":[{"__symbolic":"method"}],"animationDone":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"PlaceOutletComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":41,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":35,"character":1},"arguments":[{"selector":"aup-place-outlet","animations":[{"__symbolic":"reference","module":"./route-animations","name":"LEFT_RIGHT_PLACE_ANIMATION","line":39,"character":15}],"template":"<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n","styles":[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{display:block;flex:1;min-height:0;overflow-x:hidden;overflow-y:scroll;position:relative}router-outlet{display:none}"]}]}],"members":{"animate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":43,"character":12},"arguments":["animateModel"]}]}],"animateModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":46,"character":12},"arguments":[{"defaultValue":true}]}]}],"customPlaceAnimationOrderModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3},"arguments":["placeAnimationOrderModel"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":50,"character":38}}]}],"customPlaceAnimationOrder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":54,"character":3},"arguments":["placeAnimationOrder"]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInListModel","line":54,"character":33},"arguments":["customPlaceAnimationOrderModel"]}]}],"placeChanged":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":57,"character":3}}]}],"routerOut":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":60,"character":3},"arguments":["routeOutlet",{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":86,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":86,"character":27},"arguments":[{"__symbolic":"reference","module":"../../place-config","name":"AUP_PLACE_CONFIG","line":86,"character":34}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":87,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":87,"character":27}}]],"parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":84,"character":39},{"__symbolic":"reference","module":"../../place-router","name":"PlaceRouter","line":85,"character":44},{"__symbolic":"reference","module":"../../place-config","name":"PlaceConfig","line":86,"character":74},{"__symbolic":"reference","name":"PlaceOutletComponent"}]}],"ngOnInit":[{"__symbolic":"method"}],"getAnimationOrder":[{"__symbolic":"method"}],"navigate":[{"__symbolic":"method"}],"onOutletActivated":[{"__symbolic":"method"}],"validateAnimationState":[{"__symbolic":"method"}],"onOutletDeactivated":[{"__symbolic":"method"}],"checkStateAndInitialise":[{"__symbolic":"method"}],"initialisePlace":[{"__symbolic":"method"}],"pushVisitChangeToRoute":[{"__symbolic":"method"}],"animationStarted":[{"__symbolic":"method"}],"animationDone":[{"__symbolic":"method"}]}}}}]
@@ -1,6 +1,5 @@
1
- import { Component, ContentChild, HostBinding, Inject, TemplateRef } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { PLACE_AUTH_SERVICE } from '../../place-auth-service';
1
+ import { Component, ContentChild, HostBinding, TemplateRef } from '@angular/core';
2
+ import { PlaceRouter } from '../../place-router';
4
3
  import { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';
5
4
  /**
6
5
  * @example
@@ -45,9 +44,8 @@ import { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.c
45
44
  * })
46
45
  */
47
46
  export class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {
48
- constructor(router, authService) {
49
- super(authService);
50
- this.router = router;
47
+ constructor(router) {
48
+ super(router);
51
49
  this.expanded = false;
52
50
  }
53
51
  expandMenu() {
@@ -68,8 +66,7 @@ SidePlaceNavigationComponent.decorators = [
68
66
  },] }
69
67
  ];
70
68
  SidePlaceNavigationComponent.ctorParameters = () => [
71
- { type: Router },
72
- { type: undefined, decorators: [{ type: Inject, args: [PLACE_AUTH_SERVICE,] }] }
69
+ { type: PlaceRouter }
73
70
  ];
74
71
  SidePlaceNavigationComponent.propDecorators = {
75
72
  expanded: [{ type: HostBinding, args: ['class.expanded',] }],
@@ -1 +1 @@
1
- {"version":3,"file":"side-place-navigation.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/components/side-place-navigation/side-place-navigation.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAoB,MAAM,0BAA0B,CAAC;AAEhF,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAG1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAMH,MAAM,OAAO,4BAA6B,SAAQ,gCAAgC;IAQhF,YAAqB,MAAc,EAA8B,WAA6B;QAC5F,KAAK,CAAC,WAAW,CAAC,CAAC;QADA,WAAM,GAAN,MAAM,CAAQ;QAL5B,aAAQ,GAAG,KAAK,CAAC;IAOxB,CAAC;IAED,UAAU;QACR,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,YAAY;QACV,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,UAAU;QACR,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjC,CAAC;;;YA3BF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,g6BAAqD;;aAEtD;;;YApDQ,MAAM;4CA6DyB,MAAM,SAAC,kBAAkB;;;uBAN9D,WAAW,SAAC,gBAAgB;6BAG5B,YAAY,SAAC,gBAAgB","sourcesContent":["import { Component, ContentChild, HostBinding, Inject, TemplateRef } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { PLACE_AUTH_SERVICE, PlaceAuthService } from '../../place-auth-service';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n\n/**\n * @example\n * // Usage\n * <aup-vertical-place-navigation [places]=\"placeConstructorArray\"\n * [placeOutlet]=\"placeOutletComponent\">\n * </aup-vertical-place-navigation>\n * <aup-place-outlet #placeOutletComponent></aup-place-outlet>\n *\n * // CSS overrides:\n * aup-side-place-navigation {\n * --nav-width: 56px\n * --nav-expanded-width: 235px\n * --nav-item-height: var(--nav-width)\n * --nav-background-color: #555;\n * --nav-color: rgba(255, 255, 255, 0.9);\n * }\n *\n * // Content Templates:\n * #navEndTemplate\n * <ng-template #navEndTemplate>\n * <a mat-list-item (click)=\"logout()\" matTooltip=\"Logout\">\n * <mat-icon>exit_to_app</mat-icon>\n * <span *ngIf=\"sideNav.expanded\">Logout</span>\n * </a>\n * </nav-template>\n *\n * // Place nav item in an i18n.yml\n * places:\n * myPlace:\n * nav(NavItem):\n * title: \"Activities\"\n * icon: \"build\"\n * tooltip: \"Alerts, confirms and dialogs\"\n *\n * // In your place\n * (at)Place({\n * path: 'myPlace',\n * data: {\n * nav: I18n.places.myPlace.nav\n * }\n * })\n */\n@Component({\n selector: 'aup-side-place-navigation',\n templateUrl: './side-place-navigation.component.html',\n styleUrls: ['./side-place-navigation.component.scss']\n})\nexport class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n\n @HostBinding('class.expanded')\n public expanded = false;\n\n @ContentChild('navEndTemplate')\n navEndTemplate: TemplateRef<any>;\n\n constructor(readonly router: Router, @Inject(PLACE_AUTH_SERVICE) authService: PlaceAuthService) {\n super(authService);\n }\n\n expandMenu() {\n this.expanded = true;\n }\n\n collapseMenu() {\n this.expanded = false;\n }\n\n toggleMenu() {\n this.expanded = !this.expanded;\n }\n}\n"]}
1
+ {"version":3,"file":"side-place-navigation.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/components/side-place-navigation/side-place-navigation.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAG1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAMH,MAAM,OAAO,4BAA6B,SAAQ,gCAAgC;IAQhF,YAAY,MAAmB;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;QANT,aAAQ,GAAG,KAAK,CAAC;IAOxB,CAAC;IAED,UAAU;QACR,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,YAAY;QACV,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,UAAU;QACR,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjC,CAAC;;;YA3BF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,g6BAAqD;;aAEtD;;;YAlDQ,WAAW;;;uBAqDjB,WAAW,SAAC,gBAAgB;6BAG5B,YAAY,SAAC,gBAAgB","sourcesContent":["import { Component, ContentChild, HostBinding, Inject, TemplateRef } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n\n/**\n * @example\n * // Usage\n * <aup-vertical-place-navigation [places]=\"placeConstructorArray\"\n * [placeOutlet]=\"placeOutletComponent\">\n * </aup-vertical-place-navigation>\n * <aup-place-outlet #placeOutletComponent></aup-place-outlet>\n *\n * // CSS overrides:\n * aup-side-place-navigation {\n * --nav-width: 56px\n * --nav-expanded-width: 235px\n * --nav-item-height: var(--nav-width)\n * --nav-background-color: #555;\n * --nav-color: rgba(255, 255, 255, 0.9);\n * }\n *\n * // Content Templates:\n * #navEndTemplate\n * <ng-template #navEndTemplate>\n * <a mat-list-item (click)=\"logout()\" matTooltip=\"Logout\">\n * <mat-icon>exit_to_app</mat-icon>\n * <span *ngIf=\"sideNav.expanded\">Logout</span>\n * </a>\n * </nav-template>\n *\n * // Place nav item in an i18n.yml\n * places:\n * myPlace:\n * nav(NavItem):\n * title: \"Activities\"\n * icon: \"build\"\n * tooltip: \"Alerts, confirms and dialogs\"\n *\n * // In your place\n * (at)Place({\n * path: 'myPlace',\n * data: {\n * nav: I18n.places.myPlace.nav\n * }\n * })\n */\n@Component({\n selector: 'aup-side-place-navigation',\n templateUrl: './side-place-navigation.component.html',\n styleUrls: ['./side-place-navigation.component.scss']\n})\nexport class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n\n @HostBinding('class.expanded')\n public expanded = false;\n\n @ContentChild('navEndTemplate')\n navEndTemplate: TemplateRef<any>;\n\n constructor(router: PlaceRouter) {\n super(router);\n }\n\n expandMenu() {\n this.expanded = true;\n }\n\n collapseMenu() {\n this.expanded = false;\n }\n\n toggleMenu() {\n this.expanded = !this.expanded;\n }\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"SidePlaceNavigationComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-place-navigation.component","name":"AbstractPlaceNavigationComponent","line":54,"character":50},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":49,"character":1},"arguments":[{"selector":"aup-side-place-navigation","template":"<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNavigationFace(placeDefinition).icon()\" [icon]=\"getNavigationFace(placeDefinition).icon()\"></aup-icon>\n <span class=\"expanded-only\">{{getNavigationFace(placeDefinition).text()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n","styles":[":host{--resolved-background-color:var(--nav-background-color,#555);--resolved-color:var(--nav-color,hsla(0,0%,100%,0.9));--resolved-expanded-width:var(--nav-expanded-width,235px);--resolved-nav-item-height:var(--nav-item-height,var(--resolved-nav-item-width));--resolved-nav-item-width:var(--nav-width,56px);background-color:var(--resolved-background-color);color:var(--resolved-color);display:flex;flex-direction:column;transition:width 125ms linear;width:var(--resolved-nav-item-width)}:host.expanded{max-width:var(--resolved-expanded-width);width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{display:flex;flex:1;flex-direction:column}.mat-list-item{color:inherit;height:var(--resolved-nav-item-height);width:var(--resolved-nav-item-width)}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]}]}],"members":{"expanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":56,"character":3},"arguments":["class.expanded"]}]}],"navEndTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":59,"character":3},"arguments":["navEndTemplate"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":62,"character":40},"arguments":[{"__symbolic":"reference","module":"../../place-auth-service","name":"PLACE_AUTH_SERVICE","line":62,"character":47}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":62,"character":31},{"__symbolic":"reference","module":"../../place-auth-service","name":"PlaceAuthService","line":62,"character":80}]}],"expandMenu":[{"__symbolic":"method"}],"collapseMenu":[{"__symbolic":"method"}],"toggleMenu":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"SidePlaceNavigationComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-place-navigation.component","name":"AbstractPlaceNavigationComponent","line":53,"character":50},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":48,"character":1},"arguments":[{"selector":"aup-side-place-navigation","template":"<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNavigationFace(placeDefinition).icon()\" [icon]=\"getNavigationFace(placeDefinition).icon()\"></aup-icon>\n <span class=\"expanded-only\">{{getNavigationFace(placeDefinition).text()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n","styles":[":host{--resolved-background-color:var(--nav-background-color,#555);--resolved-color:var(--nav-color,hsla(0,0%,100%,0.9));--resolved-expanded-width:var(--nav-expanded-width,235px);--resolved-nav-item-height:var(--nav-item-height,var(--resolved-nav-item-width));--resolved-nav-item-width:var(--nav-width,56px);background-color:var(--resolved-background-color);color:var(--resolved-color);display:flex;flex-direction:column;transition:width 125ms linear;width:var(--resolved-nav-item-width)}:host.expanded{max-width:var(--resolved-expanded-width);width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{display:flex;flex:1;flex-direction:column}.mat-list-item{color:inherit;height:var(--resolved-nav-item-height);width:var(--resolved-nav-item-width)}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]}]}],"members":{"expanded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":55,"character":3},"arguments":["class.expanded"]}]}],"navEndTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":58,"character":3},"arguments":["navEndTemplate"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../place-router","name":"PlaceRouter","line":61,"character":22}]}],"expandMenu":[{"__symbolic":"method"}],"collapseMenu":[{"__symbolic":"method"}],"toggleMenu":[{"__symbolic":"method"}]}}}}]
@@ -1,9 +1,9 @@
1
- import { Component, Inject } from '@angular/core';
2
- import { PLACE_AUTH_SERVICE } from '../../place-auth-service';
1
+ import { Component } from '@angular/core';
2
+ import { PlaceRouter } from '../../place-router';
3
3
  import { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';
4
4
  export class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
5
- constructor(authService) {
6
- super(authService);
5
+ constructor(router) {
6
+ super(router);
7
7
  }
8
8
  }
9
9
  TabbedPlaceNavigationComponent.decorators = [
@@ -14,6 +14,6 @@ TabbedPlaceNavigationComponent.decorators = [
14
14
  },] }
15
15
  ];
16
16
  TabbedPlaceNavigationComponent.ctorParameters = () => [
17
- { type: undefined, decorators: [{ type: Inject, args: [PLACE_AUTH_SERVICE,] }] }
17
+ { type: PlaceRouter }
18
18
  ];
19
19
  //# sourceMappingURL=tabbed-place-navigation.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabbed-place-navigation.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAoB,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,8BAA+B,SAAQ,gCAAgC;IAClF,YAAwC,WAA6B;QACnE,KAAK,CAAC,WAAW,CAAC,CAAC;IACrB,CAAC;;;YARF,SAAS,SAAC;gBACT,QAAQ,EAAE,6BAA6B;gBACvC,8YAAuD;;aAExD;;;4CAEc,MAAM,SAAC,kBAAkB","sourcesContent":["import { Component, Inject } from '@angular/core';\nimport { PLACE_AUTH_SERVICE, PlaceAuthService } from '../../place-auth-service';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n@Component({\n selector: 'aup-tabbed-place-navigation',\n templateUrl: './tabbed-place-navigation.component.html',\n styleUrls: ['./tabbed-place-navigation.component.scss']\n})\nexport class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n constructor(@Inject(PLACE_AUTH_SERVICE) authService: PlaceAuthService) {\n super(authService);\n }\n}\n"]}
1
+ {"version":3,"file":"tabbed-place-navigation.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,8BAA+B,SAAQ,gCAAgC;IAClF,YAAY,MAAmB;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;;;YARF,SAAS,SAAC;gBACT,QAAQ,EAAE,6BAA6B;gBACvC,8YAAuD;;aAExD;;;YAPQ,WAAW","sourcesContent":["import { Component } from '@angular/core';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n@Component({\n selector: 'aup-tabbed-place-navigation',\n templateUrl: './tabbed-place-navigation.component.html',\n styleUrls: ['./tabbed-place-navigation.component.scss']\n})\nexport class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n constructor(router: PlaceRouter) {\n super(router);\n }\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"TabbedPlaceNavigationComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-place-navigation.component","name":"AbstractPlaceNavigationComponent","line":9,"character":52},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-tabbed-place-navigation","template":"<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(placeDefinition)]\"></aup-command-face>\n </a>\n</nav>\n","styles":[""]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":15},"arguments":[{"__symbolic":"reference","module":"../../place-auth-service","name":"PLACE_AUTH_SERVICE","line":10,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"../../place-auth-service","name":"PlaceAuthService","line":10,"character":55}]}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"TabbedPlaceNavigationComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-place-navigation.component","name":"AbstractPlaceNavigationComponent","line":9,"character":52},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-tabbed-place-navigation","template":"<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(placeDefinition)]\"></aup-command-face>\n </a>\n</nav>\n","styles":[""]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../place-router","name":"PlaceRouter","line":10,"character":22}]}]}}}}]
@@ -2,7 +2,7 @@
2
2
  * @file Automatically generated by barrelsby.
3
3
  */
4
4
  export * from "./nav-item";
5
- export * from "./place-auth-service";
5
+ export * from "./place-access-guard";
6
6
  export * from "./place-component";
7
7
  export * from "./place-config";
8
8
  export * from "./place-definition";
@@ -1 +1 @@
1
- {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/place/exports.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AACrE,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oEAAoE,CAAC;AACnF,cAAc,wEAAwE,CAAC;AACvF,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wFAAwF,CAAC;AACvG,cAAc,iHAAiH,CAAC;AAChI,cAAc,kGAAkG,CAAC;AACjH,cAAc,iEAAiE,CAAC;AAChF,cAAc,2EAA2E,CAAC;AAC1F,cAAc,uFAAuF,CAAC;AACtG,cAAc,kFAAkF,CAAC;AACjG,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./nav-item\";\nexport * from \"./place-auth-service\";\nexport * from \"./place-component\";\nexport * from \"./place-config\";\nexport * from \"./place-definition\";\nexport * from \"./place-history\";\nexport * from \"./place-router\";\nexport * from \"./place.decorator\";\nexport * from \"./place.module\";\nexport * from \"./url-service\";\nexport * from \"./url-snapshot\";\nexport * from \"./visit\";\nexport * from \"./components/abstract-place-navigation.component\";\nexport * from \"./components/busy-overlay/busy-overlay.component\";\nexport * from \"./components/empty-state/empty-state.component\";\nexport * from \"./components/list-place-nav/list-place-nav.component\";\nexport * from \"./components/place-outlet/place-outlet.component\";\nexport * from \"./components/place-outlet/route-animations\";\nexport * from \"./components/side-place-navigation/side-place-navigation.component\";\nexport * from \"./components/tabbed-place-navigation/tabbed-place-navigation.component\";\nexport * from \"./guards/consolidated-param-map\";\nexport * from \"./guards/noop-auth-guard.service\";\nexport * from \"./guards/place.guard\";\nexport * from \"./navigation/place-component-deactivation-handler\";\nexport * from \"./navigation/session/abstract-pop-state-navigation\";\nexport * from \"./navigation/session/navigating\";\nexport * from \"./navigation/session/navigation-context\";\nexport * from \"./navigation/session/navigation-session\";\nexport * from \"./navigation/session/pop-state-navigation\";\nexport * from \"./navigation/session/event-cleanup/event-clean-up-session\";\nexport * from \"./navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled\";\nexport * from \"./navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined\";\nexport * from \"./navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes\";\nexport * from \"./navigation/session/interactions/navigating-during-interaction\";\nexport * from \"./navigation/session/interactions/pop-state-during-interaction-navigation\";\nexport * from \"./navigation/session/interactions/remove-last-interaction-from-url-navigation-session\";\nexport * from \"./navigation/session/interactions/synchronise-interaction-context-ids-with-route\";\nexport * from \"./route/formatter\";\nexport * from \"./route/json-types\";\nexport * from \"./route/parameter-decorators\";\nexport * from \"./route/parameter-definition.class\";\nexport * from \"./route/parameter-sanitiser\";\nexport * from \"./route/parameter-snapshot\";\nexport * from \"./route/visit-sanitiser\";\n"]}
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/place/exports.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,kDAAkD,CAAC;AACjE,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AACrE,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oEAAoE,CAAC;AACnF,cAAc,wEAAwE,CAAC;AACvF,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wFAAwF,CAAC;AACvG,cAAc,iHAAiH,CAAC;AAChI,cAAc,kGAAkG,CAAC;AACjH,cAAc,iEAAiE,CAAC;AAChF,cAAc,2EAA2E,CAAC;AAC1F,cAAc,uFAAuF,CAAC;AACtG,cAAc,kFAAkF,CAAC;AACjG,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./nav-item\";\nexport * from \"./place-access-guard\";\nexport * from \"./place-component\";\nexport * from \"./place-config\";\nexport * from \"./place-definition\";\nexport * from \"./place-history\";\nexport * from \"./place-router\";\nexport * from \"./place.decorator\";\nexport * from \"./place.module\";\nexport * from \"./url-service\";\nexport * from \"./url-snapshot\";\nexport * from \"./visit\";\nexport * from \"./components/abstract-place-navigation.component\";\nexport * from \"./components/busy-overlay/busy-overlay.component\";\nexport * from \"./components/empty-state/empty-state.component\";\nexport * from \"./components/list-place-nav/list-place-nav.component\";\nexport * from \"./components/place-outlet/place-outlet.component\";\nexport * from \"./components/place-outlet/route-animations\";\nexport * from \"./components/side-place-navigation/side-place-navigation.component\";\nexport * from \"./components/tabbed-place-navigation/tabbed-place-navigation.component\";\nexport * from \"./guards/consolidated-param-map\";\nexport * from \"./guards/noop-auth-guard.service\";\nexport * from \"./guards/place.guard\";\nexport * from \"./navigation/place-component-deactivation-handler\";\nexport * from \"./navigation/session/abstract-pop-state-navigation\";\nexport * from \"./navigation/session/navigating\";\nexport * from \"./navigation/session/navigation-context\";\nexport * from \"./navigation/session/navigation-session\";\nexport * from \"./navigation/session/pop-state-navigation\";\nexport * from \"./navigation/session/event-cleanup/event-clean-up-session\";\nexport * from \"./navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled\";\nexport * from \"./navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined\";\nexport * from \"./navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes\";\nexport * from \"./navigation/session/interactions/navigating-during-interaction\";\nexport * from \"./navigation/session/interactions/pop-state-during-interaction-navigation\";\nexport * from \"./navigation/session/interactions/remove-last-interaction-from-url-navigation-session\";\nexport * from \"./navigation/session/interactions/synchronise-interaction-context-ids-with-route\";\nexport * from \"./route/formatter\";\nexport * from \"./route/json-types\";\nexport * from \"./route/parameter-decorators\";\nexport * from \"./route/parameter-definition.class\";\nexport * from \"./route/parameter-sanitiser\";\nexport * from \"./route/parameter-snapshot\";\nexport * from \"./route/visit-sanitiser\";\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./nav-item"},{"from":"./place-auth-service"},{"from":"./place-component"},{"from":"./place-config"},{"from":"./place-definition"},{"from":"./place-history"},{"from":"./place-router"},{"from":"./place.decorator"},{"from":"./place.module"},{"from":"./url-service"},{"from":"./url-snapshot"},{"from":"./visit"},{"from":"./components/abstract-place-navigation.component"},{"from":"./components/busy-overlay/busy-overlay.component"},{"from":"./components/empty-state/empty-state.component"},{"from":"./components/list-place-nav/list-place-nav.component"},{"from":"./components/place-outlet/place-outlet.component"},{"from":"./components/place-outlet/route-animations"},{"from":"./components/side-place-navigation/side-place-navigation.component"},{"from":"./components/tabbed-place-navigation/tabbed-place-navigation.component"},{"from":"./guards/consolidated-param-map"},{"from":"./guards/noop-auth-guard.service"},{"from":"./guards/place.guard"},{"from":"./navigation/place-component-deactivation-handler"},{"from":"./navigation/session/abstract-pop-state-navigation"},{"from":"./navigation/session/navigating"},{"from":"./navigation/session/navigation-context"},{"from":"./navigation/session/navigation-session"},{"from":"./navigation/session/pop-state-navigation"},{"from":"./navigation/session/event-cleanup/event-clean-up-session"},{"from":"./navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled"},{"from":"./navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined"},{"from":"./navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes"},{"from":"./navigation/session/interactions/navigating-during-interaction"},{"from":"./navigation/session/interactions/pop-state-during-interaction-navigation"},{"from":"./navigation/session/interactions/remove-last-interaction-from-url-navigation-session"},{"from":"./navigation/session/interactions/synchronise-interaction-context-ids-with-route"},{"from":"./route/formatter"},{"from":"./route/json-types"},{"from":"./route/parameter-decorators"},{"from":"./route/parameter-definition.class"},{"from":"./route/parameter-sanitiser"},{"from":"./route/parameter-snapshot"},{"from":"./route/visit-sanitiser"}]}]
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./nav-item"},{"from":"./place-access-guard"},{"from":"./place-component"},{"from":"./place-config"},{"from":"./place-definition"},{"from":"./place-history"},{"from":"./place-router"},{"from":"./place.decorator"},{"from":"./place.module"},{"from":"./url-service"},{"from":"./url-snapshot"},{"from":"./visit"},{"from":"./components/abstract-place-navigation.component"},{"from":"./components/busy-overlay/busy-overlay.component"},{"from":"./components/empty-state/empty-state.component"},{"from":"./components/list-place-nav/list-place-nav.component"},{"from":"./components/place-outlet/place-outlet.component"},{"from":"./components/place-outlet/route-animations"},{"from":"./components/side-place-navigation/side-place-navigation.component"},{"from":"./components/tabbed-place-navigation/tabbed-place-navigation.component"},{"from":"./guards/consolidated-param-map"},{"from":"./guards/noop-auth-guard.service"},{"from":"./guards/place.guard"},{"from":"./navigation/place-component-deactivation-handler"},{"from":"./navigation/session/abstract-pop-state-navigation"},{"from":"./navigation/session/navigating"},{"from":"./navigation/session/navigation-context"},{"from":"./navigation/session/navigation-session"},{"from":"./navigation/session/pop-state-navigation"},{"from":"./navigation/session/event-cleanup/event-clean-up-session"},{"from":"./navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled"},{"from":"./navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined"},{"from":"./navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes"},{"from":"./navigation/session/interactions/navigating-during-interaction"},{"from":"./navigation/session/interactions/pop-state-during-interaction-navigation"},{"from":"./navigation/session/interactions/remove-last-interaction-from-url-navigation-session"},{"from":"./navigation/session/interactions/synchronise-interaction-context-ids-with-route"},{"from":"./route/formatter"},{"from":"./route/json-types"},{"from":"./route/parameter-decorators"},{"from":"./route/parameter-definition.class"},{"from":"./route/parameter-sanitiser"},{"from":"./route/parameter-snapshot"},{"from":"./route/visit-sanitiser"}]}]
@@ -1,9 +1,8 @@
1
1
  import { __awaiter } from "tslib";
2
- import { Inject, Injectable, Injector } from '@angular/core';
2
+ import { Injectable, Injector } from '@angular/core';
3
3
  import { Router } from '@angular/router';
4
4
  import { lang } from '@coolon/pectin';
5
5
  import { InteractionService } from '../../interaction/services/interaction.service';
6
- import { PLACE_AUTH_SERVICE } from '../place-auth-service';
7
6
  import { PlaceComponent } from '../place-component';
8
7
  import { PlaceHistory } from '../place-history';
9
8
  import { PlaceRouter } from '../place-router';
@@ -17,15 +16,13 @@ import * as i1 from "@angular/router";
17
16
  import * as i2 from "../url-service";
18
17
  import * as i3 from "../place-router";
19
18
  import * as i4 from "../place-history";
20
- import * as i5 from "../place-auth-service";
21
- import * as i6 from "../../interaction/services/interaction.service";
19
+ import * as i5 from "../../interaction/services/interaction.service";
22
20
  export class PlaceGuard {
23
- constructor(router, urlService, placeRouter, placeHistory, placeAuthService, interactionService, injector) {
21
+ constructor(router, urlService, placeRouter, placeHistory, interactionService, injector) {
24
22
  this.router = router;
25
23
  this.urlService = urlService;
26
24
  this.placeRouter = placeRouter;
27
25
  this.placeHistory = placeHistory;
28
- this.placeAuthService = placeAuthService;
29
26
  this.interactionService = interactionService;
30
27
  this.injector = injector;
31
28
  }
@@ -35,18 +32,18 @@ export class PlaceGuard {
35
32
  if (PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) {
36
33
  const placeDefinition = PlaceComponent.getDefinition(activatedRoute.component);
37
34
  if (placeDefinition.authenticate) {
38
- if (!(yield this.placeAuthService.isAuthenticated())) {
39
- const redirectLocation = this.placeAuthService.handleNotAuthenticated(activatedRoute, state);
35
+ if (!(yield this.placeRouter.accessGuard.value.isAuthenticated())) {
36
+ const redirectLocation = this.placeRouter.getAuthenticationFailureRedirect(activatedRoute, state);
40
37
  const nextPlaceDef = this.getPlaceDefinition(redirectLocation);
41
38
  if (nextPlaceDef.authenticate) {
42
39
  lang.illegalState(`handleNotAuthenticated hook returned place ${nextPlaceDef.component.name} that requires authentication.`);
43
40
  }
44
41
  return this.createUrlTree(redirectLocation);
45
42
  }
46
- if (!this.placeAuthService.isAuthorised(placeDefinition)) {
47
- const redirectLocation = this.placeAuthService.handleNotAuthorised(activatedRoute, state);
43
+ if (!(this.placeRouter.accessGuard.value ? this.placeRouter.accessGuard.value.isAuthorised(placeDefinition) : true)) {
44
+ const redirectLocation = this.placeRouter.getAuthorisationFailureRedirect(activatedRoute, state);
48
45
  const nextPlaceDef = this.getPlaceDefinition(redirectLocation);
49
- if (!this.placeAuthService.isAuthorised(nextPlaceDef)) {
46
+ if (!(this.placeRouter.accessGuard.value ? this.placeRouter.accessGuard.value.isAuthorised(nextPlaceDef) : true)) {
50
47
  lang.illegalState(`handleNotAuthorised hook returned place ${nextPlaceDef.component.name} that is not authorised for the current user.`);
51
48
  }
52
49
  return this.createUrlTree(redirectLocation);
@@ -133,7 +130,7 @@ export class PlaceGuard {
133
130
  });
134
131
  }
135
132
  }
136
- PlaceGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceGuard_Factory() { return new PlaceGuard(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.UrlService), i0.ɵɵinject(i3.PlaceRouter), i0.ɵɵinject(i4.PlaceHistory), i0.ɵɵinject(i5.PLACE_AUTH_SERVICE), i0.ɵɵinject(i6.InteractionService), i0.ɵɵinject(i0.INJECTOR)); }, token: PlaceGuard, providedIn: "root" });
133
+ PlaceGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceGuard_Factory() { return new PlaceGuard(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.UrlService), i0.ɵɵinject(i3.PlaceRouter), i0.ɵɵinject(i4.PlaceHistory), i0.ɵɵinject(i5.InteractionService), i0.ɵɵinject(i0.INJECTOR)); }, token: PlaceGuard, providedIn: "root" });
137
134
  PlaceGuard.decorators = [
138
135
  { type: Injectable, args: [{ providedIn: 'root' },] }
139
136
  ];
@@ -142,7 +139,6 @@ PlaceGuard.ctorParameters = () => [
142
139
  { type: UrlService },
143
140
  { type: PlaceRouter },
144
141
  { type: PlaceHistory },
145
- { type: undefined, decorators: [{ type: Inject, args: [PLACE_AUTH_SERVICE,] }] },
146
142
  { type: InteractionService },
147
143
  { type: Injector }
148
144
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"place.guard.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/place/guards/place.guard.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAIL,MAAM,EAGP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAiB,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAoB,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,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edRouteSnapshot,\n CanActivate,\n CanDeactivate,\n Router,\n RouterStateSnapshot,\n UrlTree\n} from '@angular/router';\nimport { Constructable, lang } from '@coolon/pectin';\nimport { InteractionService } from '../../interaction/services/interaction.service';\nimport { PLACE_AUTH_SERVICE, PlaceAuthService } from '../place-auth-service';\nimport { PlaceComponent } from '../place-component';\nimport { PlaceDefinition } from '../place-definition';\nimport { PlaceHistory } from '../place-history';\nimport { PlaceRouter } from '../place-router';\nimport { VisitSanitiser } from '../route/visit-sanitiser';\nimport { UrlService } from '../url-service';\nimport { UrlSnapshot } from '../url-snapshot';\nimport { Visit } from '../visit';\nimport { ConsolidatedParameterMap } from './consolidated-param-map';\n\n@Injectable({ providedIn: 'root' })\nexport class PlaceGuard implements CanActivate, CanDeactivate<PlaceComponent> {\n\n\n constructor(private readonly router: Router,\n private urlService: UrlService,\n private readonly placeRouter: PlaceRouter,\n private readonly placeHistory: PlaceHistory,\n @Inject(PLACE_AUTH_SERVICE) private readonly placeAuthService: PlaceAuthService,\n private readonly interactionService: InteractionService,\n private readonly injector: Injector) {\n }\n\n // @Trace()\n async canActivate(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n\n if (PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) {\n const placeDefinition = PlaceComponent.getDefinition(activatedRoute.component);\n\n if (placeDefinition.authenticate) {\n\n if (!await this.placeAuthService.isAuthenticated()) {\n const redirectLocation = this.placeAuthService.handleNotAuthenticated(activatedRoute, state);\n const nextPlaceDef = this.getPlaceDefinition(redirectLocation);\n if (nextPlaceDef.authenticate) {\n lang.illegalState(`handleNotAuthenticated hook returned place ${nextPlaceDef.component.name} that requires authentication.`);\n }\n return this.createUrlTree(redirectLocation);\n }\n\n if (!this.placeAuthService.isAuthorised(placeDefinition)) {\n const redirectLocation = this.placeAuthService.handleNotAuthorised(activatedRoute, state);\n const nextPlaceDef = this.getPlaceDefinition(redirectLocation);\n if (!this.placeAuthService.isAuthorised(nextPlaceDef)) {\n lang.illegalState(`handleNotAuthorised hook returned place ${nextPlaceDef.component.name} that is not authorised for the current user.`);\n }\n return this.createUrlTree(redirectLocation);\n }\n }\n\n const result = await this.cleanInteractionState(activatedRoute, state, async () => {\n // Parse our route params.\n const params = new ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);\n const parsedParams = placeDefinition.parseRouteParams(params);\n\n const navigationSession = this.placeRouter.navigationSession;\n const initialVisit = navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);\n const sanitiser = new VisitSanitiser(navigationSession, activatedRoute, this.router, this.placeHistory, this.injector);\n const sanitisedVisit = await sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams));\n\n // Save the visit with any updated parameters. We need to save it so we remember any non route parameters\n navigationSession.storeVisit(sanitisedVisit);\n if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {\n // Regenerate the url\n const urlSnapshot = this.urlService.parseUrl(state.url).updateVisitSegments(sanitisedVisit);\n // console.log('##### Place Guard Redirect', urlSnapshot);\n return urlSnapshot;\n } else {\n return true;\n }\n });\n return result instanceof UrlSnapshot ? result.urlTree : result;\n\n } else {\n return lang.illegalState(`expected component to be an instance of PlaceComponent, got ${activatedRoute.component}`);\n }\n }\n\n // @Trace()\n async canDeactivate(component: PlaceComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Promise<boolean | UrlTree> {\n const currentUrl = this.urlService.parseUrl(currentState.url);\n const nextUrl = this.urlService.parseUrl(nextState.url);\n const result = await this.placeRouter.navigationSession.canDeactivatePlace(component, currentUrl, nextUrl);\n return result instanceof UrlSnapshot ? result.urlTree : result;\n }\n\n private getPlaceDefinition(result: Constructable<PlaceComponent> | Visit): PlaceDefinition {\n return result instanceof Visit ?\n result.placeDefinition :\n PlaceComponent.getDefinition(result);\n }\n\n private createUrlTree(result: Constructable<PlaceComponent> | Visit) {\n const visit = result instanceof Visit ? result : new Visit(PlaceComponent.getDefinition(result), {});\n return this.urlService.createUrlSnapshot(visit).urlTree;\n }\n\n // protected async ensureAuthenticatedThen(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot, next: (placeDefinition: PlaceDefinition) => Promise<boolean | UrlTree>): Promise<boolean | UrlTree> {\n // const authoriseResult = placeDefinition.authenticate ? await this.isAuthorised(activatedRoute, state) : true;\n // if (authoriseResult === true) {\n // // we're authorised, now run the place guards.\n // return next(placeDefinition);\n // } else {\n // console.log('not authorised result', authoriseResult);\n // return authoriseResult;\n // }\n // }\n //\n // // @Trace()\n // protected async ensureAuthorisedThen(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot, next: (placeDefinition: PlaceDefinition) => Promise<boolean | UrlTree>): Promise<boolean | UrlTree> {\n //\n // }\n\n // @Trace()\n // async isAuthorised(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n // const authorised = this.getAuthGuard(this.injector).canActivate(activatedRoute, state);\n // return (authorised instanceof Observable) ? authorised.toPromise() : authorised;\n // }\n\n // abstract getAuthGuard(injector: Injector): CanActivate;\n\n // @Trace()\n async cleanInteractionState(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, next: () => Promise<boolean | UrlSnapshot>): Promise<boolean | UrlSnapshot> {\n const url = this.urlService.parseUrl(state.url);\n if (!this.interactionService.isActive() && url.hasInteractions()) {\n // This happens if we reload the page or the url was pasted as the route should only be activated\n // after the interaction context has become active.\n return url.removeInteractionIds();\n } else {\n return next();\n }\n }\n\n}\n"]}
1
+ {"version":3,"file":"place.guard.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/place/guards/place.guard.ts"],"names":[],"mappings":";AAAA,OAAO,EAAU,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAIL,MAAM,EAGP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAiB,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACr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,CAAC,CAAC;YAChD,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,eAAe,EAAE,EAAE;gBAChE,iGAAiG;gBACjG,mDAAmD;gBACnD,OAAO,GAAG,CAAC,oBAAoB,EAAE,CAAC;aACnC;iBAAM;gBACL,OAAO,IAAI,EAAE,CAAC;aACf;QACH,CAAC;KAAA;;;;YAxHF,UAAU,SAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;YAhBhC,MAAM;YAWC,UAAU;YAFV,WAAW;YADX,YAAY;YAHZ,kBAAkB;YAVE,QAAQ","sourcesContent":["import { Inject, Injectable, Injector } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n CanActivate,\n CanDeactivate,\n Router,\n RouterStateSnapshot,\n UrlTree\n} from '@angular/router';\nimport { Constructable, lang } from '@coolon/pectin';\nimport { InteractionService } from '../../interaction/services/interaction.service';\nimport { PlaceComponent } from '../place-component';\nimport { PlaceDefinition } from '../place-definition';\nimport { PlaceHistory } from '../place-history';\nimport { PlaceRouter } from '../place-router';\nimport { VisitSanitiser } from '../route/visit-sanitiser';\nimport { UrlService } from '../url-service';\nimport { UrlSnapshot } from '../url-snapshot';\nimport { Visit } from '../visit';\nimport { ConsolidatedParameterMap } from './consolidated-param-map';\n\n@Injectable({ providedIn: 'root' })\nexport class PlaceGuard implements CanActivate, CanDeactivate<PlaceComponent> {\n\n\n constructor(private readonly router: Router,\n private urlService: UrlService,\n private readonly placeRouter: PlaceRouter,\n private readonly placeHistory: PlaceHistory,\n private readonly interactionService: InteractionService,\n private readonly injector: Injector) {\n }\n\n // @Trace()\n async canActivate(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n\n if (PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) {\n const placeDefinition = PlaceComponent.getDefinition(activatedRoute.component);\n\n if (placeDefinition.authenticate) {\n\n if (!await this.placeRouter.accessGuard.value.isAuthenticated()) {\n const redirectLocation = this.placeRouter.getAuthenticationFailureRedirect(activatedRoute, state);\n const nextPlaceDef = this.getPlaceDefinition(redirectLocation);\n if (nextPlaceDef.authenticate) {\n lang.illegalState(`handleNotAuthenticated hook returned place ${nextPlaceDef.component.name} that requires authentication.`);\n }\n return this.createUrlTree(redirectLocation);\n }\n\n if (!(this.placeRouter.accessGuard.value ? this.placeRouter.accessGuard.value.isAuthorised(placeDefinition) : true)) {\n const redirectLocation = this.placeRouter.getAuthorisationFailureRedirect(activatedRoute, state);\n const nextPlaceDef = this.getPlaceDefinition(redirectLocation);\n if (!(this.placeRouter.accessGuard.value ? this.placeRouter.accessGuard.value.isAuthorised(nextPlaceDef) : true)) {\n lang.illegalState(`handleNotAuthorised hook returned place ${nextPlaceDef.component.name} that is not authorised for the current user.`);\n }\n return this.createUrlTree(redirectLocation);\n }\n }\n\n const result = await this.cleanInteractionState(activatedRoute, state, async () => {\n // Parse our route params.\n const params = new ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);\n const parsedParams = placeDefinition.parseRouteParams(params);\n\n const navigationSession = this.placeRouter.navigationSession;\n const initialVisit = navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);\n const sanitiser = new VisitSanitiser(navigationSession, activatedRoute, this.router, this.placeHistory, this.injector);\n const sanitisedVisit = await sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams));\n\n // Save the visit with any updated parameters. We need to save it so we remember any non route parameters\n navigationSession.storeVisit(sanitisedVisit);\n if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {\n // Regenerate the url\n const urlSnapshot = this.urlService.parseUrl(state.url).updateVisitSegments(sanitisedVisit);\n // console.log('##### Place Guard Redirect', urlSnapshot);\n return urlSnapshot;\n } else {\n return true;\n }\n });\n return result instanceof UrlSnapshot ? result.urlTree : result;\n\n } else {\n return lang.illegalState(`expected component to be an instance of PlaceComponent, got ${activatedRoute.component}`);\n }\n }\n\n // @Trace()\n async canDeactivate(component: PlaceComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Promise<boolean | UrlTree> {\n const currentUrl = this.urlService.parseUrl(currentState.url);\n const nextUrl = this.urlService.parseUrl(nextState.url);\n const result = await this.placeRouter.navigationSession.canDeactivatePlace(component, currentUrl, nextUrl);\n return result instanceof UrlSnapshot ? result.urlTree : result;\n }\n\n private getPlaceDefinition(result: Constructable<PlaceComponent> | Visit): PlaceDefinition {\n return result instanceof Visit ?\n result.placeDefinition :\n PlaceComponent.getDefinition(result);\n }\n\n private createUrlTree(result: Constructable<PlaceComponent> | Visit) {\n const visit = result instanceof Visit ? result : new Visit(PlaceComponent.getDefinition(result), {});\n return this.urlService.createUrlSnapshot(visit).urlTree;\n }\n\n // protected async ensureAuthenticatedThen(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot, next: (placeDefinition: PlaceDefinition) => Promise<boolean | UrlTree>): Promise<boolean | UrlTree> {\n // const authoriseResult = placeDefinition.authenticate ? await this.isAuthorised(activatedRoute, state) : true;\n // if (authoriseResult === true) {\n // // we're authorised, now run the place guards.\n // return next(placeDefinition);\n // } else {\n // console.log('not authorised result', authoriseResult);\n // return authoriseResult;\n // }\n // }\n //\n // // @Trace()\n // protected async ensureAuthorisedThen(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot, next: (placeDefinition: PlaceDefinition) => Promise<boolean | UrlTree>): Promise<boolean | UrlTree> {\n //\n // }\n\n // @Trace()\n // async isAuthorised(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree> {\n // const authorised = this.getAuthGuard(this.injector).canActivate(activatedRoute, state);\n // return (authorised instanceof Observable) ? authorised.toPromise() : authorised;\n // }\n\n // abstract getAuthGuard(injector: Injector): CanActivate;\n\n // @Trace()\n async cleanInteractionState(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, next: () => Promise<boolean | UrlSnapshot>): Promise<boolean | UrlSnapshot> {\n const url = this.urlService.parseUrl(state.url);\n if (!this.interactionService.isActive() && url.hasInteractions()) {\n // This happens if we reload the page or the url was pasted as the route should only be activated\n // after the interaction context has become active.\n return url.removeInteractionIds();\n } else {\n return next();\n }\n }\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"PlaceGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":30,"character":15},"arguments":[{"__symbolic":"reference","module":"../place-auth-service","name":"PLACE_AUTH_SERVICE","line":30,"character":22}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":26,"character":39},{"__symbolic":"reference","module":"../url-service","name":"UrlService","line":27,"character":34},{"__symbolic":"reference","module":"../place-router","name":"PlaceRouter","line":28,"character":44},{"__symbolic":"reference","module":"../place-history","name":"PlaceHistory","line":29,"character":45},{"__symbolic":"reference","module":"../place-auth-service","name":"PlaceAuthService","line":30,"character":77},{"__symbolic":"reference","module":"../../interaction/services/interaction.service","name":"InteractionService","line":31,"character":51},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":32,"character":41}]}],"canActivate":[{"__symbolic":"method"}],"canDeactivate":[{"__symbolic":"method"}],"getPlaceDefinition":[{"__symbolic":"method"}],"createUrlTree":[{"__symbolic":"method"}],"cleanInteractionState":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"PlaceGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":21,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":25,"character":39},{"__symbolic":"reference","module":"../url-service","name":"UrlService","line":26,"character":34},{"__symbolic":"reference","module":"../place-router","name":"PlaceRouter","line":27,"character":44},{"__symbolic":"reference","module":"../place-history","name":"PlaceHistory","line":28,"character":45},{"__symbolic":"reference","module":"../../interaction/services/interaction.service","name":"InteractionService","line":29,"character":51},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":30,"character":41}]}],"canActivate":[{"__symbolic":"method"}],"canDeactivate":[{"__symbolic":"method"}],"getPlaceDefinition":[{"__symbolic":"method"}],"createUrlTree":[{"__symbolic":"method"}],"cleanInteractionState":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}}}]
@@ -94,14 +94,14 @@ export class NavigationSession extends GarbageCollector {
94
94
  // Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of
95
95
  // strangeness.
96
96
  Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');
97
- console.log(`replacing ${this.urlService.getCurrentLocationUrlSnapshot().url} with ${poppedHistoryToReplace}`);
97
+ // console.log(`replacing ${this.urlService.getCurrentLocationUrlSnapshot().url} with ${poppedHistoryToReplace}`);
98
98
  this.urlService.resetBrowserLocation(poppedHistoryToReplace, { replaceCurrent: true });
99
- console.log(`pushing ${activeUrl} back onto the history.`);
99
+ // console.log(`pushing ${activeUrl} back onto the history.`);
100
100
  this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });
101
101
  }
102
102
  ignore(event, reason) {
103
103
  reason = reason ? ` -> ${reason}` : '';
104
- Logger.get(this).info(`Ignoring router event${reason}: ${event.constructor.name} -> ${event.url} :: ${this.toString()}`);
104
+ // Logger.get(this).info(`Ignoring router event${reason}: ${event.constructor.name} -> ${event.url} :: ${this.toString()}`);
105
105
  }
106
106
  toString() {
107
107
  return `${this.constructor.name}(${this.debugState()})`;
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-session.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/navigation/session/navigation-session.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AAI,CAAC,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;QAClE,+BAA+B,CAAC,oBAAoB,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/D,+BAA+B,CAAC,OAAO,EAAE,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,yCAAyC,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IAIS,+CAA+C,CAAC,GAAW;QACnE,sFAAsF;QACtF,wGAAwG;QACxG,oCAAoC;QACpC,iBAAiB;QACjB,sEAAsE;QACtE,wDAAwD;QACxD,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAES,qCAAqC;QAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACzC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, RouterEvent } from '@angular/router';\nimport { Dsl, GarbageCollector, lang, Logger, Trace } from '@coolon/pectin';\nimport { InteractionContext } from '../../../interaction/interaction-context';\nimport { InteractionServiceRoutingAdapter } from '../../../interaction/services/interaction-service-routing-adapter';\nimport { PlaceComponent } from '../../place-component';\nimport { PlaceDefinition } from '../../place-definition';\nimport { UrlService } from '../../url-service';\nimport { UrlSnapshot } from '../../url-snapshot';\nimport { Visit } from '../../visit';\nimport { PlaceComponentDeactivationHandler } from '../place-component-deactivation-handler';\nimport { NavigationContext } from './navigation-context';\n\n/**\n * Transient states\n */\nexport abstract class NavigationSession extends GarbageCollector {\n\n debugPropertyKeys: string[] = [];\n private _visits = new Map<PlaceDefinition, Visit>();\n\n private componentDeactivationHandlers = new Map<PlaceComponent, PlaceComponentDeactivationHandler>();\n abstract readonly isPopState: boolean;\n\n private _interactionContext: InteractionContext;\n\n constructor(readonly context: NavigationContext, readonly startingUrl: string) {\n super();\n // TODO: can I get away without creating one every time?\n this._interactionContext = this.context.routerInteractionAdapter.createExclusiveInteractionContext();\n this.onDispose(() => {\n // the interaction context can be detached during the back button cancellation state transition\n // as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be\n // called before the context has been cancelled. It might be work having the interaction context\n // automatically cancel if the context is disposed so we don't have worry about detaching etc.\n if (this._interactionContext) {\n this._interactionContext.dispose(); // or do something like cancelAndDispose?\n }\n });\n }\n\n get name(): string {\n return this.constructor.name;\n }\n\n get urlService(): UrlService {\n return this.context.urlService;\n }\n\n get interactionServiceAdapter(): InteractionServiceRoutingAdapter {\n return this.context.routerInteractionAdapter;\n }\n\n storeVisit(visit: Visit) {\n // console.log(`Storing visit for ${visit.placeDefinition.component.name}`, {visit});\n this._visits.set(visit.placeDefinition, visit);\n }\n\n\n getVisitFor(placeDef: PlaceDefinition) {\n const visit = this._visits.get(placeDef);\n // console.log(`Getting visit for ${placeDef.component.name}`, {visit});\n return visit;\n }\n\n get canDeactivateInteractionContext(): InteractionContext {\n return this._interactionContext;\n }\n\n notifyActive() {\n // noop.\n }\n\n onRouterStarted(event: NavigationStart): void {\n // navigation sessions can have many cancel start cycles due to place guard redirects\n this.ignore(event);\n }\n\n // @Trace()\n onUrlChange(url: string) {\n // Normally we just ignore these but they are the only way of detecting if the back button\n // was clicked during a canDeactivate promise.\n // 1. a route is in progress and awaiting a canDeactivateGuard\n // 2. the user the clicks the back button.\n // So to handle that scenario we need to check if we've got a can deactivate interaction in\n // progress and the do the appropriate clean up.\n if (this.canDeactivateInteractionContext && this.canDeactivateInteractionContext.isActive()) {\n this.cancelCanDeactivateInteraction(url);\n }\n }\n\n onPopState(event: NavigationStart): void {\n return this.illegalTransition(event);\n }\n\n onRouterCancelled(event: NavigationCancel): void {\n return this.illegalTransition(event);\n }\n\n onRouterError(event: NavigationError): void {\n return this.illegalTransition(event);\n }\n\n onRouterEnd(event: NavigationEnd): void {\n return this.illegalTransition(event);\n }\n\n getVisits(): Visit[] {\n return Array.from(this._visits.values());\n }\n\n protected illegalTransition<R>(message: string | RouterEvent): R {\n return lang.illegalState(`${message.toString()} not supported by ${this.toString()}`);\n }\n\n protected currentRouterUrl(): string {\n return this.urlService.getCurrentRouterUrl();\n }\n\n resetBrowserLocation(url, options: { replaceCurrent: boolean } = { replaceCurrent: false }) {\n // console.log(`---> resetting browser location to: ${url}`);\n this.urlService.resetBrowserLocation(url, options);\n }\n\n // @Trace()\n protected repairBrowserHistoryAndUrlAfterGuardCancellation(poppedHistoryToReplace: string, activeUrl:string): void {\n // Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of\n // strangeness.\n Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');\n console.log(`replacing ${this.urlService.getCurrentLocationUrlSnapshot().url} with ${poppedHistoryToReplace}`);\n this.urlService.resetBrowserLocation(poppedHistoryToReplace, { replaceCurrent: true });\n console.log(`pushing ${activeUrl} back onto the history.`);\n this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });\n }\n\n\n ignore(event: RouterEvent, reason?: string): void {\n reason = reason ? ` -> ${reason}` : '';\n Logger.get(this).info(`Ignoring router event${reason}: ${event.constructor.name} -> ${event.url} :: ${this.toString()}`);\n }\n\n toString(): string {\n return `${this.constructor.name}(${this.debugState()})`;\n }\n\n protected debugState(properties?: string[]) {\n return (properties || this.debugPropertyKeys).map(p => {\n return `${p}: ${this[p]}`;\n }).join(', ');\n }\n\n async canDeactivatePlace(component: PlaceComponent, currentUrl: UrlSnapshot, nextUrl: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n // console.log(`---> canDeactivatePlace(${component.placeDefinition.path}, ${currentUrl.url} -> ${nextUrl.url})`);\n // lookup the handler and create it if we've not seen it yet\n let handler = this.componentDeactivationHandlers.get(component);\n if (!handler) {\n const isPrimaryHandler = this.componentDeactivationHandlers.size === 0; // only primary handler cancels the app model interations\n handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);\n this.componentDeactivationHandlers.set(component, handler);\n }\n return handler.canDeactivate(currentUrl, nextUrl).then(result => {\n // console.log(`<--- canDeactivatePlace(${component.placeDefinition.path}): ${result}`);\n return result;\n }).catch(error => {\n throw error;\n });\n }\n\n cancelCanDeactivateInteraction(newUrl: string): void {\n Logger.get(this).info(`back button pressed during navigation session interaction promise`);\n // detach the interaction from the session so it doesn't get disposed until the activity has finished\n // all it's things.\n const canDeactivateInteractionContext = this.detachCanDeactivateInteractionContext();\n // TODO: I need to make the exclusive interaction context disallow nested activities or\n // that would mess things up entirely. Or, can I do a context.abortAll().then(..)\n Logger.get(this).info('cancelling current navigation activity..');\n canDeactivateInteractionContext.cancelActiveActivity().then(() => {\n canDeactivateInteractionContext.dispose();\n });\n\n this.handleCanDeactivateCancelledEventScenario(newUrl);\n }\n\n abstract handleCanDeactivateCancelledEventScenario(newUrl: string): void\n\n protected reinstateUrlAfterAngularChangedItOnCancellation(url: string) {\n // Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.\n // So this means that the top of the stack is the url we want to go back to, and not the one that was on\n // it before the cancel event fired.\n // So we need to:\n // - replace the just inserted url with the one that used to be there.\n // - push our actual url back onto the top of the stack.\n this.resetBrowserLocation(url, { replaceCurrent: true });\n }\n\n protected detachCanDeactivateInteractionContext(): InteractionContext {\n const context = this._interactionContext;\n this._interactionContext = null;\n return context;\n }\n}\n"]}
1
+ {"version":3,"file":"navigation-session.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/navigation/session/navigation-session.ts"],"names":[],"mappings":";AACA,OAAO,EAAO,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAS,MAAM,gBAAgB,CAAC;AAQ5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,yCAAyC,CAAC;AAG5F;;GAEG;AACH,MAAM,OAAgB,iBAAkB,SAAQ,gBAAgB;IAU9D,YAAqB,OAA0B,EAAW,WAAmB;QAC3E,KAAK,EAAE,CAAC;QADW,YAAO,GAAP,OAAO,C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["import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, RouterEvent } from '@angular/router';\nimport { Dsl, GarbageCollector, lang, Logger, Trace } from '@coolon/pectin';\nimport { InteractionContext } from '../../../interaction/interaction-context';\nimport { InteractionServiceRoutingAdapter } from '../../../interaction/services/interaction-service-routing-adapter';\nimport { PlaceComponent } from '../../place-component';\nimport { PlaceDefinition } from '../../place-definition';\nimport { UrlService } from '../../url-service';\nimport { UrlSnapshot } from '../../url-snapshot';\nimport { Visit } from '../../visit';\nimport { PlaceComponentDeactivationHandler } from '../place-component-deactivation-handler';\nimport { NavigationContext } from './navigation-context';\n\n/**\n * Transient states\n */\nexport abstract class NavigationSession extends GarbageCollector {\n\n debugPropertyKeys: string[] = [];\n private _visits = new Map<PlaceDefinition, Visit>();\n\n private componentDeactivationHandlers = new Map<PlaceComponent, PlaceComponentDeactivationHandler>();\n abstract readonly isPopState: boolean;\n\n private _interactionContext: InteractionContext;\n\n constructor(readonly context: NavigationContext, readonly startingUrl: string) {\n super();\n // TODO: can I get away without creating one every time?\n this._interactionContext = this.context.routerInteractionAdapter.createExclusiveInteractionContext();\n this.onDispose(() => {\n // the interaction context can be detached during the back button cancellation state transition\n // as the transition is synchronous and activityCancellation isn't. Otherwise dispose will be\n // called before the context has been cancelled. It might be work having the interaction context\n // automatically cancel if the context is disposed so we don't have worry about detaching etc.\n if (this._interactionContext) {\n this._interactionContext.dispose(); // or do something like cancelAndDispose?\n }\n });\n }\n\n get name(): string {\n return this.constructor.name;\n }\n\n get urlService(): UrlService {\n return this.context.urlService;\n }\n\n get interactionServiceAdapter(): InteractionServiceRoutingAdapter {\n return this.context.routerInteractionAdapter;\n }\n\n storeVisit(visit: Visit) {\n // console.log(`Storing visit for ${visit.placeDefinition.component.name}`, {visit});\n this._visits.set(visit.placeDefinition, visit);\n }\n\n\n getVisitFor(placeDef: PlaceDefinition) {\n const visit = this._visits.get(placeDef);\n // console.log(`Getting visit for ${placeDef.component.name}`, {visit});\n return visit;\n }\n\n get canDeactivateInteractionContext(): InteractionContext {\n return this._interactionContext;\n }\n\n notifyActive() {\n // noop.\n }\n\n onRouterStarted(event: NavigationStart): void {\n // navigation sessions can have many cancel start cycles due to place guard redirects\n this.ignore(event);\n }\n\n // @Trace()\n onUrlChange(url: string) {\n // Normally we just ignore these but they are the only way of detecting if the back button\n // was clicked during a canDeactivate promise.\n // 1. a route is in progress and awaiting a canDeactivateGuard\n // 2. the user the clicks the back button.\n // So to handle that scenario we need to check if we've got a can deactivate interaction in\n // progress and the do the appropriate clean up.\n if (this.canDeactivateInteractionContext && this.canDeactivateInteractionContext.isActive()) {\n this.cancelCanDeactivateInteraction(url);\n }\n }\n\n onPopState(event: NavigationStart): void {\n return this.illegalTransition(event);\n }\n\n onRouterCancelled(event: NavigationCancel): void {\n return this.illegalTransition(event);\n }\n\n onRouterError(event: NavigationError): void {\n return this.illegalTransition(event);\n }\n\n onRouterEnd(event: NavigationEnd): void {\n return this.illegalTransition(event);\n }\n\n getVisits(): Visit[] {\n return Array.from(this._visits.values());\n }\n\n protected illegalTransition<R>(message: string | RouterEvent): R {\n return lang.illegalState(`${message.toString()} not supported by ${this.toString()}`);\n }\n\n protected currentRouterUrl(): string {\n return this.urlService.getCurrentRouterUrl();\n }\n\n resetBrowserLocation(url, options: { replaceCurrent: boolean } = { replaceCurrent: false }) {\n // console.log(`---> resetting browser location to: ${url}`);\n this.urlService.resetBrowserLocation(url, options);\n }\n\n // @Trace()\n protected repairBrowserHistoryAndUrlAfterGuardCancellation(poppedHistoryToReplace: string, activeUrl:string): void {\n // Important: I tried to perform this fix at a later point int he routing cycle but it created all kinds of\n // strangeness.\n Logger.get(this).info('WORK-AROUND: Updating browser location after pop state - see angular issue #13586');\n // console.log(`replacing ${this.urlService.getCurrentLocationUrlSnapshot().url} with ${poppedHistoryToReplace}`);\n this.urlService.resetBrowserLocation(poppedHistoryToReplace, { replaceCurrent: true });\n // console.log(`pushing ${activeUrl} back onto the history.`);\n this.urlService.resetBrowserLocation(activeUrl, { replaceCurrent: false });\n }\n\n\n ignore(event: RouterEvent, reason?: string): void {\n reason = reason ? ` -> ${reason}` : '';\n // Logger.get(this).info(`Ignoring router event${reason}: ${event.constructor.name} -> ${event.url} :: ${this.toString()}`);\n }\n\n toString(): string {\n return `${this.constructor.name}(${this.debugState()})`;\n }\n\n protected debugState(properties?: string[]) {\n return (properties || this.debugPropertyKeys).map(p => {\n return `${p}: ${this[p]}`;\n }).join(', ');\n }\n\n async canDeactivatePlace(component: PlaceComponent, currentUrl: UrlSnapshot, nextUrl: UrlSnapshot): Promise<boolean | UrlSnapshot> {\n // console.log(`---> canDeactivatePlace(${component.placeDefinition.path}, ${currentUrl.url} -> ${nextUrl.url})`);\n // lookup the handler and create it if we've not seen it yet\n let handler = this.componentDeactivationHandlers.get(component);\n if (!handler) {\n const isPrimaryHandler = this.componentDeactivationHandlers.size === 0; // only primary handler cancels the app model interations\n handler = new PlaceComponentDeactivationHandler(component, this, isPrimaryHandler);\n this.componentDeactivationHandlers.set(component, handler);\n }\n return handler.canDeactivate(currentUrl, nextUrl).then(result => {\n // console.log(`<--- canDeactivatePlace(${component.placeDefinition.path}): ${result}`);\n return result;\n }).catch(error => {\n throw error;\n });\n }\n\n cancelCanDeactivateInteraction(newUrl: string): void {\n Logger.get(this).info(`back button pressed during navigation session interaction promise`);\n // detach the interaction from the session so it doesn't get disposed until the activity has finished\n // all it's things.\n const canDeactivateInteractionContext = this.detachCanDeactivateInteractionContext();\n // TODO: I need to make the exclusive interaction context disallow nested activities or\n // that would mess things up entirely. Or, can I do a context.abortAll().then(..)\n Logger.get(this).info('cancelling current navigation activity..');\n canDeactivateInteractionContext.cancelActiveActivity().then(() => {\n canDeactivateInteractionContext.dispose();\n });\n\n this.handleCanDeactivateCancelledEventScenario(newUrl);\n }\n\n abstract handleCanDeactivateCancelledEventScenario(newUrl: string): void\n\n protected reinstateUrlAfterAngularChangedItOnCancellation(url: string) {\n // Angular calls _this.resetUrlToCurrentUrlTree() on cancelling and fucks our history.\n // So this means that the top of the stack is the url we want to go back to, and not the one that was on\n // it before the cancel event fired.\n // So we need to:\n // - replace the just inserted url with the one that used to be there.\n // - push our actual url back onto the top of the stack.\n this.resetBrowserLocation(url, { replaceCurrent: true });\n }\n\n protected detachCanDeactivateInteractionContext(): InteractionContext {\n const context = this._interactionContext;\n this._interactionContext = null;\n return context;\n }\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { Trace } from '@coolon/pectin';
3
+ import { PlaceDefinition } from './place-definition';
4
+ export var PlaceAccessGuard;
5
+ (function (PlaceAccessGuard) {
6
+ class NoAuth {
7
+ isAuthenticated() {
8
+ return true;
9
+ }
10
+ isAuthorised(placeDefinition) {
11
+ return true;
12
+ }
13
+ }
14
+ __decorate([
15
+ Trace(),
16
+ __metadata("design:type", Function),
17
+ __metadata("design:paramtypes", []),
18
+ __metadata("design:returntype", Object)
19
+ ], NoAuth.prototype, "isAuthenticated", null);
20
+ __decorate([
21
+ Trace(),
22
+ __metadata("design:type", Function),
23
+ __metadata("design:paramtypes", [PlaceDefinition]),
24
+ __metadata("design:returntype", Boolean)
25
+ ], NoAuth.prototype, "isAuthorised", null);
26
+ PlaceAccessGuard.NoAuth = NoAuth;
27
+ })(PlaceAccessGuard || (PlaceAccessGuard = {}));
28
+ //# sourceMappingURL=place-access-guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"place-access-guard.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/src/lib/place/place-access-guard.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAOrD,MAAM,KAAW,gBAAgB,CAYhC;AAZD,WAAiB,gBAAgB;IAC/B,MAAa,MAAM;QAEjB,eAAe;YACb,OAAO,IAAI,CAAC;QACd,CAAC;QAED,YAAY,CAAC,eAAgC;YAC3C,OAAO,IAAI,CAAC;QACd,CAAC;KAEF;IARC;QADC,KAAK,EAAE;;;;iDAGP;IAED;QADC,KAAK,EAAE;;yCACsB,eAAe;;8CAE5C;IARU,uBAAM,SAUlB,CAAA;AACH,CAAC,EAZgB,gBAAgB,KAAhB,gBAAgB,QAYhC","sourcesContent":["import { Trace } from '@coolon/pectin';\nimport { PlaceDefinition } from './place-definition';\n\nexport interface PlaceAccessGuard {\n isAuthenticated(): boolean | Promise<boolean>;\n isAuthorised(placeDefinition: PlaceDefinition): boolean;\n}\n\nexport namespace PlaceAccessGuard {\n export class NoAuth implements PlaceAccessGuard {\n @Trace()\n isAuthenticated(): boolean | Promise<boolean> {\n return true;\n }\n @Trace()\n isAuthorised(placeDefinition: PlaceDefinition): boolean {\n return true;\n }\n\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"PlaceAccessGuard":{"__symbolic":"interface"}}}]
@@ -2,7 +2,7 @@ import { __awaiter } from "tslib";
2
2
  import { Location } from '@angular/common';
3
3
  import { Injectable } from '@angular/core';
4
4
  import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router } from '@angular/router';
5
- import { assert, DebugContext, Dsl, GarbageCollector, lang, Logger, MutableListModel, MutableValueModel } from '@coolon/pectin';
5
+ import { assert, Binding, DebugContext, DelegatingValueModel, Dsl, GarbageCollector, lang, MutableListModel, MutableValueModel } from '@coolon/pectin';
6
6
  import { InteractionService } from '../interaction/services/interaction.service';
7
7
  import { NavigatingDuringInteraction } from './navigation/session/interactions/navigating-during-interaction';
8
8
  import { PopStateDuringInteractionNavigation } from './navigation/session/interactions/pop-state-during-interaction-navigation';
@@ -10,6 +10,7 @@ import { SynchroniseInteractionContextIdsWithRoute } from './navigation/session/
10
10
  import { Navigating } from './navigation/session/navigating';
11
11
  import { NavigationContext } from './navigation/session/navigation-context';
12
12
  import { PopStateNavigation } from './navigation/session/pop-state-navigation';
13
+ import { PlaceAccessGuard } from './place-access-guard';
13
14
  import { PlaceHistory } from './place-history';
14
15
  import { UrlService } from './url-service';
15
16
  import * as i0 from "@angular/core";
@@ -29,6 +30,11 @@ export class PlaceRouter extends GarbageCollector {
29
30
  this.navigationSessionModel = new MutableValueModel();
30
31
  this._activeVisits = new MutableListModel();
31
32
  this.sessionFinishedJobs = [];
33
+ /**
34
+ * An observable model containing the authoriser function. This allows places to react to changes
35
+ * in permissions when any underlying auth logic changes, e.g. a role being removed from a user.
36
+ */
37
+ this._accessGuard = new DelegatingValueModel().withDefault(new PlaceAccessGuard.NoAuth());
32
38
  if (window['Cypress']) {
33
39
  window['aup.PlaceRouter'] = this;
34
40
  }
@@ -87,6 +93,29 @@ export class PlaceRouter extends GarbageCollector {
87
93
  // the back button was clicked.
88
94
  angularLocation.onUrlChange(url => this.onUrlChanged(url));
89
95
  }
96
+ get accessGuard() {
97
+ return this._accessGuard.readonly;
98
+ }
99
+ // @Trace()
100
+ configureAuth(accessGrant, redirections) {
101
+ // We need a shitty mutable model until setDelegate is clever enough to work with readonly models.
102
+ const hackyMutableModel = new MutableValueModel();
103
+ const binding = new Binding(hackyMutableModel, accessGrant, {
104
+ toRight(leftValue) {
105
+ return lang.illegalState('hackyMutableModel is read only');
106
+ },
107
+ toLeft: (rightValue) => rightValue
108
+ });
109
+ binding.writeLeft();
110
+ this._accessGuard.setDelegate(hackyMutableModel);
111
+ this.redirections = redirections;
112
+ }
113
+ getAuthenticationFailureRedirect(activatedRoute, state) {
114
+ return this.redirections.onAuthenticationFailure(activatedRoute, state);
115
+ }
116
+ getAuthorisationFailureRedirect(activatedRoute, state) {
117
+ return this.redirections.onAuthorisationFailure(activatedRoute, state);
118
+ }
90
119
  get navigationSession() {
91
120
  return this.navigationSessionModel.value;
92
121
  }
@@ -212,7 +241,7 @@ export class PlaceRouter extends GarbageCollector {
212
241
  this.placeHistory.notifyNavigationStarted();
213
242
  }
214
243
  assert.isTruthy(next !== previous);
215
- Logger.get(this).info(`### Router State Transition: ${previous ? previous.toString() : 'null'} -> ${next.toString()}`);
244
+ // Logger.get(this).info(`### Router State Transition: ${previous ? previous.toString() : 'null'} -> ${next.toString()}`);
216
245
  this.navigationSessionModel.value = next;
217
246
  if (!!previous) {
218
247
  previous.dispose();
@@ -232,7 +261,7 @@ export class PlaceRouter extends GarbageCollector {
232
261
  const session = this.currentSession;
233
262
  session.dispose();
234
263
  this.navigationSessionModel.value = null;
235
- console.log(`### Router Session Finished (was ${session.toString()})`);
264
+ // console.log(`### Router Session Finished (was ${session.toString()})`);
236
265
  this.sessionFinishedJobs.forEach(job => job());
237
266
  this.sessionFinishedJobs = [];
238
267
  }