@coolon/angular-ui-powerups 0.0.91 → 0.0.93

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 (62) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +2104 -1817
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.d.ts +23 -19
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/coolon-angular-ui-powerups.js +23 -19
  8. package/esm2015/index.js +2 -2
  9. package/esm2015/lib/interaction/services/dialog-interaction.service.js +3 -3
  10. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +52 -10
  11. package/esm2015/lib/place/guards/abstract-enter-place.guard.js +296 -0
  12. package/esm2015/lib/place/guards/leave-place.guard.js +47 -0
  13. package/esm2015/lib/place/guards/noop-auth-guard.service.js +30 -0
  14. package/esm2015/lib/place/index.js +5 -3
  15. package/esm2015/lib/place/navigation-session.js +7 -18
  16. package/esm2015/lib/place/place-router.js +60 -9
  17. package/esm2015/lib/place/place.decorator.js +1 -1
  18. package/esm2015/lib/place/place.module.js +4 -2
  19. package/esm2015/lib/place/places/noop-gateway-place.component.js +58 -0
  20. package/esm2015/public_api.js +2 -2
  21. package/esm5/coolon-angular-ui-powerups.js +23 -19
  22. package/esm5/index.js +2 -2
  23. package/esm5/lib/interaction/services/dialog-interaction.service.js +3 -3
  24. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +52 -10
  25. package/esm5/lib/place/guards/abstract-enter-place.guard.js +372 -0
  26. package/esm5/lib/place/guards/leave-place.guard.js +55 -0
  27. package/esm5/lib/place/guards/noop-auth-guard.service.js +39 -0
  28. package/esm5/lib/place/index.js +5 -3
  29. package/esm5/lib/place/navigation-session.js +6 -17
  30. package/esm5/lib/place/place-router.js +74 -8
  31. package/esm5/lib/place/place.decorator.js +1 -1
  32. package/esm5/lib/place/place.module.js +4 -2
  33. package/esm5/lib/place/places/noop-gateway-place.component.js +61 -0
  34. package/esm5/public_api.js +2 -2
  35. package/fesm2015/coolon-angular-ui-powerups.js +568 -355
  36. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  37. package/fesm5/coolon-angular-ui-powerups.js +2048 -1766
  38. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  39. package/lib/place/components/place-outlet/place-outlet.component.d.ts +6 -2
  40. package/lib/place/{route/guards/enter-place-guard.service.d.ts → guards/abstract-enter-place.guard.d.ts} +9 -4
  41. package/lib/place/{route/guards → guards}/leave-place.guard.d.ts +2 -2
  42. package/lib/place/guards/noop-auth-guard.service.d.ts +5 -0
  43. package/lib/place/index.d.ts +4 -2
  44. package/lib/place/navigation-session.d.ts +2 -2
  45. package/lib/place/place-router.d.ts +8 -2
  46. package/lib/place/places/noop-gateway-place.component.d.ts +10 -0
  47. package/package.json +1 -1
  48. package/schematics/place-routes/place-builder.d.ts +2 -1
  49. package/schematics/place-routes/place-builder.js +11 -3
  50. package/schematics/place-routes/place-builder.js.map +1 -1
  51. package/schematics/place-routes/place-class-scanner.js +1 -0
  52. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  53. package/schematics/place-routes/place-def.d.ts +0 -1
  54. package/schematics/place-routes/place-def.js +1 -14
  55. package/schematics/place-routes/place-def.js.map +1 -1
  56. package/schematics/place-routes/templates/place-destinations.ts.template +3 -2
  57. package/schematics/place-routes/templates/place-routes.ts.template +20 -4
  58. package/schematics/place-routes/templates/place-visits.ts.template +2 -1
  59. package/esm2015/lib/place/route/guards/enter-place-guard.service.js +0 -248
  60. package/esm2015/lib/place/route/guards/leave-place.guard.js +0 -47
  61. package/esm5/lib/place/route/guards/enter-place-guard.service.js +0 -278
  62. package/esm5/lib/place/route/guards/leave-place.guard.js +0 -55
@@ -5,7 +5,7 @@ import { MatInputModule, MatFormFieldModule, MatSelectModule, MatDialog, MatButt
5
5
  import { MatTabsModule } from '@angular/material/tabs';
6
6
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { __extends, __decorate, __metadata, __awaiter, __generator, __assign, __spread } from 'tslib';
8
- import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableListModel, MutableValueModel, Binding, Trace, Guard as Guard$1, Command, StoreInValueModel, OptionsHelper, ValueHolder } from '@coolon/pectin';
8
+ import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableListModel, MutableValueModel, Binding, Trace, Guard as Guard$1, StoreInValueModel, Command, OptionsHelper, ValueHolder } from '@coolon/pectin';
9
9
  import { PortalModule } from '@angular/cdk/portal';
10
10
  import { Router, RouterModule, NavigationStart, NavigationEnd, NavigationError, UrlSerializer, UrlSegment, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
11
11
  import ___default, { last, isNil, isEqual } from 'lodash';
@@ -19,6 +19,7 @@ import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator';
19
19
  import 'reflect-metadata';
20
20
  import { style, query, group, animate, trigger, transition } from '@angular/animations';
21
21
  import ResizeObserver from 'resize-observer-polyfill';
22
+ import { Observable } from 'rxjs';
22
23
 
23
24
  /**
24
25
  * @fileoverview added by tsickle
@@ -2344,7 +2345,7 @@ var DialogInteractionService = /** @class */ (function (_super) {
2344
2345
  * @return {?}
2345
2346
  */
2346
2347
  function () {
2347
- console.log('###### STARTING');
2348
+ // console.log('###### STARTING');
2348
2349
  _this._inActivityPromise.value = true;
2349
2350
  // this.currentActivityId = uuid.v1();
2350
2351
  // this.location.go(this.router.routerState.snapshot.url, "aup");
@@ -2405,7 +2406,7 @@ var DialogInteractionService = /** @class */ (function (_super) {
2405
2406
  */
2406
2407
  function () {
2407
2408
  _this._inActivityPromise.value = false;
2408
- console.log('###### FINISHED');
2409
+ // console.log('###### FINISHED');
2409
2410
  // this.currentActivityId = null;
2410
2411
  self.safelyUpdateActivityListDelegate(null);
2411
2412
  }));
@@ -3695,8 +3696,8 @@ if (false) {
3695
3696
  Internal.prototype.isExternal;
3696
3697
  }
3697
3698
  var Factory = /** @class */ (function () {
3698
- function Factory(appModelInteractionContext) {
3699
- this.appModelInteractionContext = appModelInteractionContext;
3699
+ function Factory(interactionContext) {
3700
+ this.interactionContext = interactionContext;
3700
3701
  }
3701
3702
  /**
3702
3703
  * @param {?} visit
@@ -3707,7 +3708,7 @@ if (false) {
3707
3708
  * @return {?}
3708
3709
  */
3709
3710
  function (visit) {
3710
- return new Internal(visit, this.appModelInteractionContext);
3711
+ return new Internal(visit, this.interactionContext);
3711
3712
  };
3712
3713
  /**
3713
3714
  * @param {?} firstTimeRoute
@@ -3718,23 +3719,14 @@ if (false) {
3718
3719
  * @return {?}
3719
3720
  */
3720
3721
  function (firstTimeRoute) {
3721
- return new External(firstTimeRoute, this.appModelInteractionContext);
3722
+ return new External(firstTimeRoute, this.interactionContext);
3722
3723
  };
3723
- Factory.decorators = [
3724
- { type: Injectable, args: [{
3725
- providedIn: 'root'
3726
- },] },
3727
- ];
3728
- /** @nocollapse */
3729
- Factory.ctorParameters = function () { return [
3730
- { type: InteractionContext }
3731
- ]; };
3732
3724
  return Factory;
3733
3725
  }());
3734
3726
  NavigationSession.Factory = Factory;
3735
3727
  if (false) {
3736
3728
  /** @type {?} */
3737
- Factory.prototype.appModelInteractionContext;
3729
+ Factory.prototype.interactionContext;
3738
3730
  }
3739
3731
  var ComponentDeactivationHandler = /** @class */ (function () {
3740
3732
  function ComponentDeactivationHandler(component, appModelInteractionContext, primary) {
@@ -3966,1987 +3958,2070 @@ if (false) {
3966
3958
  * @fileoverview added by tsickle
3967
3959
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3968
3960
  */
3969
- var PlaceRouter = /** @class */ (function (_super) {
3970
- __extends(PlaceRouter, _super);
3971
- function PlaceRouter(router, urlSerializer, navigationSessionFactory, angularLocation, placeHistory) {
3972
- var _this = _super.call(this) || this;
3973
- _this.router = router;
3974
- _this.urlSerializer = urlSerializer;
3975
- _this.navigationSessionFactory = navigationSessionFactory;
3976
- _this.angularLocation = angularLocation;
3977
- _this.placeHistory = placeHistory;
3978
- _this.firstRoute = true;
3979
- _this._navigationSessionModel = new MutableValueModel();
3980
- _this._activeVisits = new MutableListModel();
3981
- var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
3982
- _this.activeVisitIndex = chain(_this._activeVisits).indexBy('placeDefinition');
3983
- angularLocation.onUrlChange((/**
3984
- * @param {?} url
3961
+ /**
3962
+ * @param {?} options
3963
+ * @return {?}
3964
+ */
3965
+ function Place(options) {
3966
+ return (/**
3967
+ * @param {?} target
3968
+ * @return {?}
3969
+ */
3970
+ function (target) {
3971
+ if (PlaceComponent.isPlaceComponentConstructor(target)) {
3972
+ PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, isNil(options.authenticate) ? false : options.authenticate, options.data, PlaceComponent.getRouteParameters(target), (options.children || []).map((/**
3973
+ * @param {?} c
3974
+ * @return {?}
3975
+ */
3976
+ function (c) { return PlaceComponent.getDefinition(c); }))));
3977
+ }
3978
+ else {
3979
+ lang.illegalState(target + " must extend PlaceComponent to use the @Place decorator");
3980
+ }
3981
+ });
3982
+ }
3983
+ (function (Place) {
3984
+ /**
3985
+ * @record
3986
+ */
3987
+ function Options() { }
3988
+ Place.Options = Options;
3989
+ if (false) {
3990
+ /** @type {?} */
3991
+ Options.prototype.path;
3992
+ /** @type {?|undefined} */
3993
+ Options.prototype.data;
3994
+ /** @type {?|undefined} */
3995
+ Options.prototype.authenticate;
3996
+ /** @type {?|undefined} */
3997
+ Options.prototype.children;
3998
+ /** @type {?|undefined} */
3999
+ Options.prototype.defaultChild;
4000
+ }
4001
+ })(Place || (Place = {}));
4002
+
4003
+ /**
4004
+ * @fileoverview added by tsickle
4005
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4006
+ */
4007
+ // WARNING: interface has both a type and a value, skipping emit
4008
+ var Formatter;
4009
+ (function (Formatter) {
4010
+ var StringType = /** @class */ (function () {
4011
+ function StringType() {
4012
+ }
4013
+ /**
4014
+ * @param {?} value
3985
4015
  * @return {?}
3986
4016
  */
3987
- function (url) {
3988
- console.log("location.onUrlChange -> " + url);
3989
- }));
3990
- // TODO: make setup the callbacks in during module initiation to make this testable.
3991
- _this.router.events.subscribe((/**
3992
- * @param {?} event
4017
+ StringType.prototype.format = /**
4018
+ * @param {?} value
3993
4019
  * @return {?}
3994
4020
  */
3995
- function (event) {
3996
- // Routing event sequence
3997
- // ======================
3998
- // NavigationStart -> .... -> NavigationCancel --> redirect, go around again in the same session
3999
- // NavigationStart -> .... -> NavigationEnd --> navigation complete, end session.
4000
- // NavigationStart -> .... -> NavigationError --> navigation canceled, end session.
4001
- // =======================
4002
- if (event instanceof NavigationStart) {
4003
- _this.onAngularRouterStarted(event);
4004
- }
4005
- if (event instanceof NavigationEnd) {
4006
- _this.onAngularRouterFinished(false);
4007
- }
4008
- if (event instanceof NavigationError) {
4009
- _this.onAngularRouterFinished(true);
4010
- }
4011
- }));
4012
- _this.navigationSessionActive = chain(_this.navigationSessionModel).isNotNil();
4013
- _this.navigationSessionActive.subscribe((/**
4014
- * @param {?} active
4021
+ function (value) {
4022
+ return value;
4023
+ };
4024
+ /**
4025
+ * @param {?} value
4015
4026
  * @return {?}
4016
4027
  */
4017
- function (active) {
4018
- console.log('navigationSessionActive', active);
4019
- }));
4020
- return _this;
4021
- // const txo = new TransactionObserver().onEvent(e => console.log(e.toString()));
4022
- // txo.observe('this.navigationSessionModel', this.navigationSessionModel);
4023
- }
4024
- Object.defineProperty(PlaceRouter.prototype, "navigationSession", {
4025
- get: /**
4028
+ StringType.prototype.parse = /**
4029
+ * @param {?} value
4026
4030
  * @return {?}
4027
4031
  */
4028
- function () {
4029
- return this._navigationSessionModel.value;
4030
- },
4031
- enumerable: true,
4032
- configurable: true
4033
- });
4034
- Object.defineProperty(PlaceRouter.prototype, "navigationSessionModel", {
4035
- get: /**
4032
+ function (value) {
4033
+ return value;
4034
+ };
4035
+ return StringType;
4036
+ }());
4037
+ var NumberType = /** @class */ (function () {
4038
+ function NumberType() {
4039
+ }
4040
+ /**
4041
+ * @param {?} value
4036
4042
  * @return {?}
4037
4043
  */
4038
- function () {
4039
- return this._navigationSessionModel.readonly;
4040
- },
4041
- enumerable: true,
4042
- configurable: true
4043
- });
4044
- Object.defineProperty(PlaceRouter.prototype, "activeVisits", {
4045
- get: /**
4044
+ NumberType.prototype.format = /**
4045
+ * @param {?} value
4046
4046
  * @return {?}
4047
4047
  */
4048
- function () {
4049
- return this._activeVisits.readonly;
4050
- },
4051
- enumerable: true,
4052
- configurable: true
4053
- });
4054
- /**
4055
- * placeRouter.navigate(placeDestinations.somePlace.createVisit(routeId, ...visitParams));
4056
- * @param visit
4057
- */
4058
- /**
4059
- * placeRouter.navigate(placeDestinations.somePlace.createVisit(routeId, ...visitParams));
4060
- * @param {?} visit
4061
- * @param {?=} options
4062
- * @return {?}
4063
- */
4064
- PlaceRouter.prototype.navigate = /**
4065
- * placeRouter.navigate(placeDestinations.somePlace.createVisit(routeId, ...visitParams));
4066
- * @param {?} visit
4067
- * @param {?=} options
4068
- * @return {?}
4069
- */
4070
- function (visit, options) {
4071
- return __awaiter(this, void 0, void 0, function () {
4072
- var _this = this;
4073
- return __generator(this, function (_a) {
4074
- this.doNavigation(visit, (/**
4075
- * @param {?} router
4076
- * @return {?}
4077
- */
4078
- function (router) { return __awaiter(_this, void 0, void 0, function () {
4079
- var commands;
4080
- return __generator(this, function (_a) {
4081
- switch (_a.label) {
4082
- case 0:
4083
- commands = __spread([
4084
- visit.placeDefinition.path
4085
- ], this.createRouteParameters(visit));
4086
- return [4 /*yield*/, this.router.navigate(commands, {
4087
- relativeTo: options ? options.relativeTo : null
4088
- })];
4089
- case 1:
4090
- _a.sent();
4091
- return [2 /*return*/];
4092
- }
4093
- });
4094
- }); }));
4095
- return [2 /*return*/];
4096
- });
4097
- });
4098
- };
4099
- // @Trace()
4100
- // @Trace()
4101
- /**
4102
- * @param {?} activatedRoute
4103
- * @param {?} previous
4104
- * @param {?} next
4105
- * @return {?}
4106
- */
4107
- PlaceRouter.prototype.pushVisitChangesToRoute =
4108
- // @Trace()
4109
- /**
4110
- * @param {?} activatedRoute
4111
- * @param {?} previous
4112
- * @param {?} next
4113
- * @return {?}
4114
- */
4115
- function (activatedRoute, previous, next) {
4116
- return __awaiter(this, void 0, void 0, function () {
4117
- var _this = this;
4118
- return __generator(this, function (_a) {
4119
- // we have to push to history so our remember sanitisers don't pick up the previous value
4120
- // when it's been cleared by the user.
4121
- this.placeHistory.add(next);
4122
- // FIXME: no route id -> route id duplicates route parameters
4123
- if (next.hasRoutingChangedFrom(previous)) {
4124
- return [2 /*return*/, this.doNavigation(next, (/**
4125
- * @param {?} router
4126
- * @return {?}
4127
- */
4128
- function (router) {
4129
- /** @type {?} */
4130
- var commands = _this.parseUrl(_this.router.routerState.snapshot).createRedirectCommandsFor(next);
4131
- // // we have to to use the definition for route id as our redirection always includes
4132
- // // the id in the url segements (but leaves it blank when there's no id). I.e. in the
4133
- // // no id case we're doing the following redirect [<placePath>, ""] -> ["..", <id>]
4134
- // const relativePath = !!previous.placeDefinition.hasRouteId() ? '..' : '.';
4135
- // const commands = [
4136
- // relativePath,
4137
- // ...this.createRouteParameters(next),
4138
- // ...this.extractChildPath(activatedRoute.snapshot)
4139
- // ];
4140
- console.log('### Push Changes to route Redirect', { commands: commands });
4141
- return router.navigate(commands);
4142
- }))];
4143
- }
4144
- return [2 /*return*/];
4145
- });
4146
- });
4147
- };
4148
- /**
4149
- * @param {?} visit
4150
- * @param {?} customNavigation
4151
- * @return {?}
4152
- */
4153
- PlaceRouter.prototype.doNavigation = /**
4154
- * @param {?} visit
4155
- * @param {?} customNavigation
4156
- * @return {?}
4157
- */
4158
- function (visit, customNavigation) {
4159
- return __awaiter(this, void 0, void 0, function () {
4160
- return __generator(this, function (_a) {
4161
- switch (_a.label) {
4162
- case 0:
4163
- this._navigationSessionModel.value = this.navigationSessionFactory.createInternal(visit);
4164
- _a.label = 1;
4165
- case 1:
4166
- _a.trys.push([1, , 3, 4]);
4167
- return [4 /*yield*/, customNavigation(this.router)];
4168
- case 2:
4169
- _a.sent();
4170
- return [3 /*break*/, 4];
4171
- case 3:
4172
- // Router has finished (since there was no router change required) so we
4173
- // need to end the navigation session.
4174
- if (this.navigationSession && !this.router.getCurrentNavigation()) {
4175
- this.onAngularRouterFinished(false);
4176
- }
4177
- return [7 /*endfinally*/];
4178
- case 4: return [2 /*return*/];
4179
- }
4180
- });
4181
- });
4182
- };
4183
- /**
4184
- * @private
4185
- * @param {?} visit
4186
- * @return {?}
4187
- */
4188
- PlaceRouter.prototype.createRouteParameters = /**
4189
- * @private
4190
- * @param {?} visit
4191
- * @return {?}
4192
- */
4193
- function (visit) {
4194
- /** @type {?} */
4195
- var def = visit.placeDefinition;
4196
- return visit.hasRouteId() ?
4197
- [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
4198
- [def.getFormattedRouteParameters(visit)];
4199
- };
4200
- // @Trace()
4201
- // @Trace()
4202
- /**
4203
- * @private
4204
- * @param {?} event
4205
- * @return {?}
4206
- */
4207
- PlaceRouter.prototype.onAngularRouterStarted =
4208
- // @Trace()
4209
- /**
4210
- * @private
4211
- * @param {?} event
4212
- * @return {?}
4213
- */
4214
- function (event) {
4215
- if (!this.navigationSession) { // We been activated by an external route rather than placeRouter.go(visit)
4216
- console.log('navigation started', { firstTime: this.firstRoute });
4217
- /** @type {?} */
4218
- var session = this.navigationSessionFactory.createExternal(this.firstRoute);
4219
- if (event.navigationTrigger === 'popstate') {
4220
- session.setPopstateReturnUrl(this.router.routerState.snapshot.url);
4221
- }
4222
- this._navigationSessionModel.value = session;
4223
- }
4224
- this.firstRoute = false;
4225
- };
4226
- // @Trace()
4227
- // @Trace()
4228
- /**
4229
- * @private
4230
- * @param {?} cancelled
4231
- * @return {?}
4232
- */
4233
- PlaceRouter.prototype.onAngularRouterFinished =
4234
- // @Trace()
4235
- /**
4236
- * @private
4237
- * @param {?} cancelled
4238
- * @return {?}
4239
- */
4240
- function (cancelled) {
4241
- var _this = this;
4242
- /** @type {?} */
4243
- var session = this._navigationSessionModel.value;
4244
- if (!cancelled) {
4245
- // Update visits before we end the navigation session. This allows the placeOutets to
4246
- // ignore visit changes that occur while the navigation is in progress
4247
- /** @type {?} */
4248
- var visits = session.getVisits();
4249
- visits.forEach((/**
4250
- * @param {?} v
4251
- * @return {?}
4252
- */
4253
- function (v) { return _this.placeHistory.add(v); }));
4254
- this._activeVisits.value = visits;
4255
- }
4256
- else {
4257
- // Angular doesn't preserve the url when a guard cancels the back button.
4258
- // See https://github.com/angular/angular/issues/13586#issuecomment-432795720
4259
- if (session.isPopState) {
4260
- console.log('cancelled during popstate');
4261
- this.angularLocation.go(session.popStateReturnUrl);
4262
- }
4263
- }
4264
- this._navigationSessionModel.value = null;
4265
- };
4266
- /**
4267
- * @param {?} activatedRoute
4268
- * @return {?}
4269
- */
4270
- PlaceRouter.prototype.extractChildPath = /**
4271
- * @param {?} activatedRoute
4272
- * @return {?}
4273
- */
4274
- function (activatedRoute) {
4275
- return ___default.flatten(activatedRoute.children.map((/**
4276
- * @param {?} child
4277
- * @return {?}
4278
- */
4279
- function (child) { return child.url; })));
4280
- };
4281
- /**
4282
- * @param {?} snapshot
4283
- * @return {?}
4284
- */
4285
- PlaceRouter.prototype.parseUrl = /**
4286
- * @param {?} snapshot
4287
- * @return {?}
4288
- */
4289
- function (snapshot) {
4290
- return new PlaceRouter.UrlHelper(this.urlSerializer.parse(snapshot.url));
4291
- };
4292
- PlaceRouter.decorators = [
4293
- { type: Injectable, args: [{
4294
- providedIn: 'root'
4295
- },] }
4296
- ];
4297
- /** @nocollapse */
4298
- PlaceRouter.ctorParameters = function () { return [
4299
- { type: Router },
4300
- { type: UrlSerializer },
4301
- { type: NavigationSession.Factory },
4302
- { type: Location },
4303
- { type: PlaceHistory }
4304
- ]; };
4305
- /** @nocollapse */ PlaceRouter.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(UrlSerializer), ɵɵinject(NavigationSession.Factory), ɵɵinject(Location), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
4306
- __decorate([
4307
- Trace(),
4308
- __metadata("design:type", Function),
4309
- __metadata("design:paramtypes", [Visit, Object]),
4310
- __metadata("design:returntype", Promise)
4311
- ], PlaceRouter.prototype, "navigate", null);
4312
- return PlaceRouter;
4313
- }(GarbageCollector));
4314
- if (false) {
4315
- /**
4316
- * @type {?}
4317
- * @private
4318
- */
4319
- PlaceRouter.prototype.firstRoute;
4320
- /**
4321
- * @type {?}
4322
- * @private
4323
- */
4324
- PlaceRouter.prototype._navigationSessionModel;
4325
- /**
4326
- * @type {?}
4327
- * @private
4328
- */
4329
- PlaceRouter.prototype._activeVisits;
4330
- /** @type {?} */
4331
- PlaceRouter.prototype.navigationSessionActive;
4332
- /** @type {?} */
4333
- PlaceRouter.prototype.activeVisitIndex;
4334
- /**
4335
- * @type {?}
4336
- * @private
4337
- */
4338
- PlaceRouter.prototype.router;
4339
- /**
4340
- * @type {?}
4341
- * @private
4342
- */
4343
- PlaceRouter.prototype.urlSerializer;
4344
- /**
4345
- * @type {?}
4346
- * @private
4347
- */
4348
- PlaceRouter.prototype.navigationSessionFactory;
4349
- /** @type {?} */
4350
- PlaceRouter.prototype.angularLocation;
4351
- /** @type {?} */
4352
- PlaceRouter.prototype.placeHistory;
4353
- }
4354
- (function (PlaceRouter) {
4355
- var UrlHelper = /** @class */ (function () {
4356
- function UrlHelper(urlTree) {
4357
- this.urlTree = urlTree;
4358
- console.log({ segments: this.urlTree.root.children.primary.segments });
4359
- }
4360
- /**
4361
- * @return {?}
4362
- */
4363
- UrlHelper.prototype.cloneUrlSegmentList = /**
4364
- * @return {?}
4365
- */
4366
- function () {
4367
- return __spread(this.urlTree.root.children.primary.segments);
4048
+ function (value) {
4049
+ return ___default.isNumber(value) && !___default.isNaN(value) ? "" + value : null;
4368
4050
  };
4369
4051
  /**
4370
- * @param {?} visit
4052
+ * @param {?} value
4371
4053
  * @return {?}
4372
4054
  */
4373
- UrlHelper.prototype.updateVisitSegments = /**
4374
- * @param {?} visit
4055
+ NumberType.prototype.parse = /**
4056
+ * @param {?} value
4375
4057
  * @return {?}
4376
4058
  */
4377
- function (visit) {
4378
- // Ugly, but it works for now.
4379
- /** @type {?} */
4380
- var segments = this.cloneUrlSegmentList();
4381
- /** @type {?} */
4382
- var visitSegments = this.convertToUrlSegments(visit);
4059
+ function (value) {
4383
4060
  /** @type {?} */
4384
- var replaceAt = segments.findIndex((/**
4385
- * @param {?} segment
4386
- * @return {?}
4387
- */
4388
- function (segment) { return segment.path === visitSegments[0].path; }));
4389
- // do not use the return value, it's the items that were removed!
4390
- segments.splice.apply(segments, __spread([replaceAt, visitSegments.length], visitSegments));
4391
- return segments;
4392
- };
4393
- /**
4394
- * Converts the visit into segments. Please not that these segments are not e
4395
- * @param visit
4396
- */
4397
- /**
4398
- * Converts the visit into segments. Please not that these segments are not e
4399
- * @param {?} visit
4400
- * @return {?}
4401
- */
4402
- UrlHelper.prototype.convertToUrlSegments = /**
4403
- * Converts the visit into segments. Please not that these segments are not e
4404
- * @param {?} visit
4405
- * @return {?}
4406
- */
4407
- function (visit) {
4408
- return visit.placeDefinition.hasRouteId() ?
4409
- [
4410
- // NOTE:
4411
- // It's important to attach the params to the root path and not the id. If we attach them
4412
- // to an empty id then the angular router won't match the pattern.
4413
- new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit)),
4414
- new UrlSegment(visit.placeDefinition.getFormattedRouteId(visit), {})
4415
- ]
4416
- :
4417
- [
4418
- new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit))
4419
- ];
4061
+ var parsed = Number.parseFloat(value);
4062
+ return ___default.isNaN(parsed) ? null : parsed;
4420
4063
  };
4064
+ return NumberType;
4065
+ }());
4066
+ var BooleanType = /** @class */ (function () {
4067
+ function BooleanType() {
4068
+ }
4421
4069
  /**
4422
- * @param {?} visit
4070
+ * @param {?} value
4423
4071
  * @return {?}
4424
4072
  */
4425
- UrlHelper.prototype.createRedirectCommandsFor = /**
4426
- * @param {?} visit
4073
+ BooleanType.prototype.format = /**
4074
+ * @param {?} value
4427
4075
  * @return {?}
4428
4076
  */
4429
- function (visit) {
4430
- /** @type {?} */
4431
- var segments = this.updateVisitSegments(visit);
4432
- /** @type {?} */
4433
- var commands = [];
4434
- segments.forEach((/**
4435
- * @param {?} s
4436
- * @return {?}
4437
- */
4438
- function (s) {
4439
- commands.push(s.path);
4440
- if (s.parameterMap.keys.length > 0) {
4441
- commands.push(s.parameters);
4442
- }
4443
- }));
4444
- return commands;
4077
+ function (value) {
4078
+ return value ? 'true' : 'false';
4445
4079
  };
4446
4080
  /**
4447
- * @param {?} placeDef
4081
+ * @param {?} value
4448
4082
  * @return {?}
4449
4083
  */
4450
- UrlHelper.prototype.includesPathOf = /**
4451
- * @param {?} placeDef
4084
+ BooleanType.prototype.parse = /**
4085
+ * @param {?} value
4452
4086
  * @return {?}
4453
4087
  */
4454
- function (placeDef) {
4455
- return this.cloneUrlSegmentList().find((/**
4456
- * @param {?} s
4457
- * @return {?}
4458
- */
4459
- function (s) { return s.path === placeDef.path; }));
4088
+ function (value) {
4089
+ return value === 'true';
4460
4090
  };
4461
- __decorate([
4462
- Trace(),
4463
- __metadata("design:type", Function),
4464
- __metadata("design:paramtypes", [Visit]),
4465
- __metadata("design:returntype", Array)
4466
- ], UrlHelper.prototype, "createRedirectCommandsFor", null);
4467
- return UrlHelper;
4091
+ return BooleanType;
4468
4092
  }());
4469
- PlaceRouter.UrlHelper = UrlHelper;
4470
- if (false) {
4471
- /**
4472
- * @type {?}
4473
- * @private
4474
- */
4475
- UrlHelper.prototype.urlTree;
4476
- }
4477
- })(PlaceRouter || (PlaceRouter = {}));
4093
+ Formatter.STRING = new StringType();
4094
+ Formatter.NUMBER = new NumberType();
4095
+ Formatter.BOOLEAN = new BooleanType();
4096
+ })(Formatter || (Formatter = {}));
4478
4097
 
4479
4098
  /**
4480
4099
  * @fileoverview added by tsickle
4481
4100
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4482
4101
  */
4483
- // Freezes the state of the components at the start of the animation.
4484
- /** @type {?} */
4485
- var animationStartStyle = style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
4486
- /** @type {?} */
4487
- var left = [
4488
- query(':enter, :leave', animationStartStyle, { optional: true }),
4489
- group([
4490
- query(':enter', [
4491
- style({ transform: 'translateX(-100%)' }),
4492
- animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
4493
- ], {
4494
- optional: true
4495
- }),
4496
- query(':leave', [
4497
- style({ transform: 'translateX(0%)' }),
4498
- animate('{{duration}} ease-out', style({ transform: 'translateX(100%)' }))
4499
- ], {
4500
- optional: true
4501
- })
4502
- ])
4503
- ];
4504
- /** @type {?} */
4505
- var right = [
4506
- query(':enter, :leave', animationStartStyle, { optional: true }),
4507
- group([
4508
- query(':enter', [
4509
- style({ transform: 'translateX(100%)', minHeight: '1px' }),
4510
- animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
4511
- ], {
4512
- optional: true
4513
- }),
4514
- query(':leave', [style({ transform: 'translateX(0%)' }), animate('{{duration}} ease-out', style({
4515
- transform: 'translateX(-100%)',
4516
- minHeight: '1px'
4517
- }))], {
4518
- optional: true
4519
- })
4520
- ])
4521
- ];
4522
4102
  /**
4523
- * @param {?} duration
4524
- * @return {?}
4103
+ * @record
4104
+ * @template T
4525
4105
  */
4526
- function leftRightPlaceAnimation(duration) {
4527
- return trigger('routeAnimations', [
4528
- transition(':increment', right, { params: { duration: duration } }),
4529
- transition(':decrement', left, { params: { duration: duration } })
4530
- ]);
4106
+ function RouteIdOptions() { }
4107
+ if (false) {
4108
+ /** @type {?|undefined} */
4109
+ RouteIdOptions.prototype.as;
4110
+ /** @type {?|undefined} */
4111
+ RouteIdOptions.prototype.optional;
4112
+ /** @type {?|undefined} */
4113
+ RouteIdOptions.prototype.remember;
4114
+ /** @type {?|undefined} */
4115
+ RouteIdOptions.prototype.defaultValue;
4531
4116
  }
4532
- /** @type {?} */
4533
- var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
4534
-
4535
4117
  /**
4536
- * @fileoverview added by tsickle
4537
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4118
+ * @record
4119
+ * @template T
4538
4120
  */
4121
+ function RouteParameterOptions() { }
4122
+ if (false) {
4123
+ /** @type {?|undefined} */
4124
+ RouteParameterOptions.prototype.as;
4125
+ /** @type {?|undefined} */
4126
+ RouteParameterOptions.prototype.optional;
4127
+ /** @type {?|undefined} */
4128
+ RouteParameterOptions.prototype.remember;
4129
+ /** @type {?|undefined} */
4130
+ RouteParameterOptions.prototype.defaultValue;
4131
+ /** @type {?|undefined} */
4132
+ RouteParameterOptions.prototype.storeInUrl;
4133
+ }
4539
4134
  /**
4540
4135
  * @record
4136
+ * @template T
4541
4137
  */
4542
- function PlaceRef() { }
4138
+ function RouteListParameterOptions() { }
4543
4139
  if (false) {
4140
+ /** @type {?|undefined} */
4141
+ RouteListParameterOptions.prototype.as;
4142
+ /** @type {?|undefined} */
4143
+ RouteListParameterOptions.prototype.optional;
4144
+ /** @type {?|undefined} */
4145
+ RouteListParameterOptions.prototype.remember;
4146
+ /** @type {?|undefined} */
4147
+ RouteListParameterOptions.prototype.defaultValue;
4148
+ /** @type {?|undefined} */
4149
+ RouteListParameterOptions.prototype.storeInUrl;
4150
+ }
4151
+ /**
4152
+ * @template T
4153
+ * @param {?} type
4154
+ * @param {?=} options
4155
+ * @return {?}
4156
+ */
4157
+ function RouteId(type, options) {
4158
+ return (/**
4159
+ * @param {?} prototype
4160
+ * @param {?} propertyKey
4161
+ * @return {?}
4162
+ */
4163
+ function (prototype, propertyKey) {
4164
+ /** @type {?} */
4165
+ var param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);
4166
+ Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
4167
+ UseDelegate()(prototype, propertyKey);
4168
+ });
4169
+ }
4170
+ /**
4171
+ * @template T
4172
+ * @param {?=} options
4173
+ * @return {?}
4174
+ */
4175
+ function VisitParameter(options) {
4544
4176
  /** @type {?} */
4545
- PlaceRef.prototype.placeDefinition;
4546
- /**
4547
- * @param {?} param
4177
+ var opts = Opts.get(options);
4178
+ return (/**
4179
+ * @param {?} prototype
4180
+ * @param {?} propertyKey
4548
4181
  * @return {?}
4549
4182
  */
4550
- PlaceRef.prototype.initialiseBindings = function (param) { };
4183
+ function (prototype, propertyKey) {
4184
+ /** @type {?} */
4185
+ var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
4186
+ Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
4187
+ UseDelegate()(prototype, propertyKey);
4188
+ });
4189
+ }
4190
+ /**
4191
+ * @template E
4192
+ * @param {?=} options
4193
+ * @return {?}
4194
+ */
4195
+ function VisitParameterList(options) {
4196
+ /** @type {?} */
4197
+ var opts = Opts.get(options);
4198
+ return (/**
4199
+ * @param {?} prototype
4200
+ * @param {?} propertyKey
4201
+ * @return {?}
4202
+ */
4203
+ function (prototype, propertyKey) {
4204
+ /** @type {?} */
4205
+ var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
4206
+ Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
4207
+ UseDelegate()(prototype, propertyKey);
4208
+ });
4209
+ }
4210
+
4211
+ /**
4212
+ * @fileoverview added by tsickle
4213
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4214
+ */
4215
+ var NoopGatewayPlace = /** @class */ (function (_super) {
4216
+ __extends(NoopGatewayPlace, _super);
4217
+ function NoopGatewayPlace(router) {
4218
+ var _this = _super.call(this) || this;
4219
+ _this.router = router;
4220
+ return _this;
4221
+ }
4551
4222
  /**
4552
4223
  * @return {?}
4553
4224
  */
4554
- PlaceRef.prototype.onPlaceReady = function () { };
4225
+ NoopGatewayPlace.prototype.ngOnInit = /**
4226
+ * @return {?}
4227
+ */
4228
+ function () {
4229
+ this.router.navigateByUrl(this.returnUrl.value);
4230
+ };
4231
+ NoopGatewayPlace.ctorParameters = function () { return [
4232
+ { type: Router }
4233
+ ]; };
4234
+ NoopGatewayPlace.decorators = [
4235
+ { type: Component, args: [{
4236
+ template: ''
4237
+ }] }
4238
+ ];
4239
+ /** @nocollapse */
4240
+ NoopGatewayPlace.ctorParameters = function () { return [
4241
+ { type: Router }
4242
+ ]; };
4243
+ __decorate([
4244
+ VisitParameter({ storeInUrl: Formatter.STRING }),
4245
+ __metadata("design:type", MutableValueModel)
4246
+ ], NoopGatewayPlace.prototype, "returnUrl", void 0);
4247
+ NoopGatewayPlace = __decorate([
4248
+ Place({
4249
+ path: 'aup-gateway-route',
4250
+ authenticate: false
4251
+ }),
4252
+ __metadata("design:paramtypes", [Router])
4253
+ ], NoopGatewayPlace);
4254
+ return NoopGatewayPlace;
4255
+ }(PlaceComponent));
4256
+ if (false) {
4257
+ /** @type {?} */
4258
+ NoopGatewayPlace.prototype.returnUrl;
4259
+ /** @type {?} */
4260
+ NoopGatewayPlace.prototype.router;
4555
4261
  }
4556
- var PlaceOutletComponent = /** @class */ (function (_super) {
4557
- __extends(PlaceOutletComponent, _super);
4558
- function PlaceOutletComponent(router, placeRouter, placeConfig, parentOutlet) {
4262
+
4263
+ /**
4264
+ * @fileoverview added by tsickle
4265
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4266
+ */
4267
+ /** @type {?} */
4268
+ var noopPlaceDef = PlaceComponent.getDefinition(NoopGatewayPlace);
4269
+ var PlaceRouter = /** @class */ (function (_super) {
4270
+ __extends(PlaceRouter, _super);
4271
+ function PlaceRouter(router, urlSerializer, interactionContext, angularLocation, placeHistory) {
4559
4272
  var _this = _super.call(this) || this;
4560
4273
  _this.router = router;
4561
- _this.placeRouter = placeRouter;
4562
- _this.placeConfig = placeConfig;
4563
- _this.animate = true;
4564
- _this.placeChanged = new EventEmitter();
4565
- _this._activePlace = new MutableValueModel();
4566
- _this._activePlaceVisitModel = new DelegatingValueModel();
4567
- _this._inOutletActivation = new Guard$1();
4568
- _this._inOutletDeactivation = new Guard$1();
4569
- _this._inRouteVisitUpdate = new Guard$1();
4570
- _this._activatedRouteModel = new MutableValueModel();
4571
- _this._placeDefinition = new MutableValueModel();
4572
- _this.initialPlaceIndex = null;
4274
+ _this.urlSerializer = urlSerializer;
4275
+ _this.interactionContext = interactionContext;
4276
+ _this.angularLocation = angularLocation;
4277
+ _this.placeHistory = placeHistory;
4278
+ _this.firstRoute = true;
4279
+ _this._navigationSessionModel = new MutableValueModel();
4280
+ _this._activeVisits = new MutableListModel();
4281
+ _this.initialRedirectStarted = false;
4282
+ _this.initialRedirectFinished = false;
4573
4283
  var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
4574
- _this.parentOutletModel = new MutableValueModel(parentOutlet);
4575
- _this._activePlaceVisitModel.setDelegate(new MutableValueModel());
4576
- _this._inOutletUpdate = valueOf.any(_this._inOutletDeactivation, _this._inOutletActivation).areTruthy();
4577
- /** @type {?} */
4578
- var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
4579
- .pullValueModel((/**
4580
- * @param {?} o
4581
- * @return {?}
4582
- */
4583
- function (o) { return o.activePlaceModel; }))
4584
- .pluck('placeDefinition')
4585
- .pluckList('children')
4586
- .pluck('component');
4587
- /** @type {?} */
4588
- var activatePlaceType = chain(_this.activePlaceModel).map((/**
4589
- * @param {?} p
4284
+ _this.activeVisitIndex = chain(_this._activeVisits).indexBy('placeDefinition');
4285
+ _this.navigationSessionFactory = new NavigationSession.Factory(interactionContext);
4286
+ angularLocation.onUrlChange((/**
4287
+ * @param {?} url
4590
4288
  * @return {?}
4591
4289
  */
4592
- function (p) { return (/** @type {?} */ (p.constructor)); }));
4593
- _this.placeAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
4594
- .otherwise(defaultPlaceAnimationOrder)
4595
- .reduce((/**
4596
- * @param {?} placesInOrder
4290
+ function (url) {
4291
+ console.log("location.onUrlChange -> " + url);
4292
+ }));
4293
+ // TODO: make setup the callbacks in during module initiation to make this testable.
4294
+ _this.router.events.subscribe((/**
4295
+ * @param {?} event
4597
4296
  * @return {?}
4598
4297
  */
4599
- function (placesInOrder) {
4600
- /** @type {?} */
4601
- var placeIndex = 0;
4602
- if (activatePlaceType.value) {
4603
- placeIndex = placesInOrder.indexOf(activatePlaceType.value);
4604
- if (isNil(_this.initialPlaceIndex)) {
4605
- _this.initialPlaceIndex = placeIndex;
4606
- }
4298
+ function (event) {
4299
+ // Routing event sequence
4300
+ // ======================
4301
+ // NavigationStart -> .... -> NavigationCancel --> redirect, go around again in the same session
4302
+ // NavigationStart -> .... -> NavigationEnd --> navigation complete, end session.
4303
+ // NavigationStart -> .... -> NavigationError --> navigation canceled, end session.
4304
+ // =======================
4305
+ if (event instanceof NavigationStart) {
4306
+ _this.onAngularRouterStarted(event);
4607
4307
  }
4608
- return isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
4609
- }), { dependsOn: activatePlaceType });
4610
- // Push incoming changes into the component
4611
- _this.routerVisit = chain(_this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
4612
- // Our router visit will change when our active is nullified during deactivation, which will push a null visit
4613
- // the the deactivated component, which will nuke it's view before the animations have finished.
4614
- // The visit will alway updated after the router session is finsised (when the new visits are registered) so
4615
- // we can safely ignore it during outlet changes as these always happen before the router session ends.
4616
- when.valueOf(_this.routerVisit).changes((/**
4308
+ if (event instanceof NavigationEnd) {
4309
+ _this.onAngularRouterFinished(false);
4310
+ }
4311
+ if (event instanceof NavigationError) {
4312
+ _this.onAngularRouterFinished(true);
4313
+ }
4314
+ }));
4315
+ _this.navigationSessionActive = chain(_this.navigationSessionModel).isNotNil();
4316
+ _this.navigationSessionActive.subscribe((/**
4317
+ * @param {?} active
4617
4318
  * @return {?}
4618
4319
  */
4619
- function () { return _this.pushRouteChangesToVisit(); }), { unless: _this._inOutletUpdate });
4620
- // Handle component based changes
4621
- when.valueOf(_this._activePlaceVisitModel).changes((/**
4622
- * @param {?} next
4623
- * @param {?} previous
4320
+ function (active) {
4321
+ console.log('navigationSessionActive', active);
4322
+ }));
4323
+ return _this;
4324
+ // const txo = new TransactionObserver().onEvent(e => console.log(e.toString()));
4325
+ // txo.observe('this.navigationSessionModel', this.navigationSessionModel);
4326
+ }
4327
+ Object.defineProperty(PlaceRouter.prototype, "navigationSession", {
4328
+ get: /**
4624
4329
  * @return {?}
4625
4330
  */
4626
- function (next, previous) {
4627
- _this.pushVisitChangesToRoute(next, previous);
4628
- }), {
4629
- unless: _this.placeRouter.navigationSessionActive
4630
- });
4631
- chain(_this._activePlace)
4632
- .postponeWhile(placeRouter.navigationSessionActive)
4633
- .subscribe((/**
4634
- * @param {?} place
4331
+ function () {
4332
+ return this._navigationSessionModel.value;
4333
+ },
4334
+ enumerable: true,
4335
+ configurable: true
4336
+ });
4337
+ Object.defineProperty(PlaceRouter.prototype, "navigationSessionModel", {
4338
+ get: /**
4635
4339
  * @return {?}
4636
4340
  */
4637
- function (place) { return _this.placeChanged.emit(place); }));
4638
- return _this;
4639
- // const txo = new TransactionObserver().onEvent(e => console.log(e.toString()));
4640
- // txo.observe('inRouteVisitUpdate', inRouteVisitUpdate);
4641
- }
4642
- /**
4643
- * @return {?}
4644
- */
4645
- PlaceOutletComponent.prototype.ngOnInit = /**
4646
- * @return {?}
4647
- */
4648
- function () {
4649
- };
4650
- // @Trace()
4651
- // @Trace()
4652
- /**
4653
- * @return {?}
4654
- */
4655
- PlaceOutletComponent.prototype.getAnimationOrder =
4656
- // @Trace()
4657
- /**
4658
- * @return {?}
4659
- */
4660
- function () {
4661
- return this.placeAnimationOrder.value;
4662
- };
4663
- Object.defineProperty(PlaceOutletComponent.prototype, "animationDuration", {
4341
+ function () {
4342
+ return this._navigationSessionModel.readonly;
4343
+ },
4344
+ enumerable: true,
4345
+ configurable: true
4346
+ });
4347
+ Object.defineProperty(PlaceRouter.prototype, "activeVisits", {
4664
4348
  get: /**
4665
4349
  * @return {?}
4666
4350
  */
4667
4351
  function () {
4668
- return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
4352
+ return this._activeVisits.readonly;
4669
4353
  },
4670
4354
  enumerable: true,
4671
4355
  configurable: true
4672
4356
  });
4673
- // @Trace()
4674
- // @Trace()
4675
4357
  /**
4358
+ * placeRouter.navigate(placeDestinations.somePlace.createVisit(routeId, ...visitParams));
4359
+ * @param visit
4360
+ */
4361
+ /**
4362
+ * placeRouter.navigate(placeDestinations.somePlace.createVisit(routeId, ...visitParams));
4676
4363
  * @param {?} visit
4364
+ * @param {?=} options
4677
4365
  * @return {?}
4678
4366
  */
4679
- PlaceOutletComponent.prototype.navigate =
4680
- // @Trace()
4681
- /**
4367
+ PlaceRouter.prototype.navigate = /**
4368
+ * placeRouter.navigate(placeDestinations.somePlace.createVisit(routeId, ...visitParams));
4682
4369
  * @param {?} visit
4370
+ * @param {?=} options
4683
4371
  * @return {?}
4684
4372
  */
4685
- function (visit) {
4686
- // console.log({ activatedRoute: this._activatedRouteModel.value });
4687
- this.placeRouter.navigate(visit, {
4688
- relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
4373
+ function (visit, options) {
4374
+ return __awaiter(this, void 0, void 0, function () {
4375
+ var _this = this;
4376
+ return __generator(this, function (_a) {
4377
+ this.doNavigation(visit, (/**
4378
+ * @param {?} router
4379
+ * @return {?}
4380
+ */
4381
+ function (router) { return __awaiter(_this, void 0, void 0, function () {
4382
+ var commands;
4383
+ return __generator(this, function (_a) {
4384
+ switch (_a.label) {
4385
+ case 0:
4386
+ commands = __spread([
4387
+ visit.placeDefinition.path
4388
+ ], this.createRouteParameters(visit));
4389
+ return [4 /*yield*/, this.router.navigate(commands, {
4390
+ relativeTo: options ? options.relativeTo : null
4391
+ })];
4392
+ case 1:
4393
+ _a.sent();
4394
+ return [2 /*return*/];
4395
+ }
4396
+ });
4397
+ }); }));
4398
+ return [2 /*return*/];
4399
+ });
4689
4400
  });
4690
4401
  };
4691
- Object.defineProperty(PlaceOutletComponent.prototype, "parentOutlet", {
4692
- get: /**
4693
- * @return {?}
4694
- */
4695
- function () {
4696
- return this.parentOutletModel.value;
4697
- },
4698
- enumerable: true,
4699
- configurable: true
4700
- });
4701
4402
  // @Trace()
4702
4403
  // @Trace()
4703
4404
  /**
4405
+ * @param {?} activatedRoute
4406
+ * @param {?} previous
4407
+ * @param {?} next
4408
+ * @return {?}
4409
+ */
4410
+ PlaceRouter.prototype.pushVisitChangesToRoute =
4411
+ // @Trace()
4412
+ /**
4413
+ * @param {?} activatedRoute
4414
+ * @param {?} previous
4415
+ * @param {?} next
4416
+ * @return {?}
4417
+ */
4418
+ function (activatedRoute, previous, next) {
4419
+ return __awaiter(this, void 0, void 0, function () {
4420
+ var _this = this;
4421
+ return __generator(this, function (_a) {
4422
+ // we have to push to history so our remember sanitisers don't pick up the previous value
4423
+ // when it's been cleared by the user.
4424
+ this.placeHistory.add(next);
4425
+ // FIXME: no route id -> route id duplicates route parameters
4426
+ if (next.hasRoutingChangedFrom(previous)) {
4427
+ return [2 /*return*/, this.doNavigation(next, (/**
4428
+ * @param {?} router
4429
+ * @return {?}
4430
+ */
4431
+ function (router) {
4432
+ /** @type {?} */
4433
+ var commands = _this.parseUrl(_this.router.routerState.snapshot).createRedirectCommandsFor(next);
4434
+ // // we have to to use the definition for route id as our redirection always includes
4435
+ // // the id in the url segements (but leaves it blank when there's no id). I.e. in the
4436
+ // // no id case we're doing the following redirect [<placePath>, ""] -> ["..", <id>]
4437
+ // const relativePath = !!previous.placeDefinition.hasRouteId() ? '..' : '.';
4438
+ // const commands = [
4439
+ // relativePath,
4440
+ // ...this.createRouteParameters(next),
4441
+ // ...this.extractChildPath(activatedRoute.snapshot)
4442
+ // ];
4443
+ console.log('### Push Changes to route Redirect', { commands: commands });
4444
+ return router.navigate(commands);
4445
+ }))];
4446
+ }
4447
+ return [2 /*return*/];
4448
+ });
4449
+ });
4450
+ };
4451
+ /**
4452
+ * @param {?} visit
4453
+ * @param {?} customNavigation
4704
4454
  * @return {?}
4705
4455
  */
4706
- PlaceOutletComponent.prototype.pushRouteChangesToVisit =
4707
- // @Trace()
4708
- /**
4456
+ PlaceRouter.prototype.doNavigation = /**
4457
+ * @param {?} visit
4458
+ * @param {?} customNavigation
4709
4459
  * @return {?}
4710
4460
  */
4711
- function () {
4712
- var _this = this;
4713
- /** @type {?} */
4714
- var visit = this.routerVisit.value;
4715
- // console.log({
4716
- // visit,
4717
- // place: visit ? visit.placeDefinition.component : null,
4718
- // inOutletActivation: this._inOutletActivation.value,
4719
- // inRoutingSession: this.placeRouter.navigationSessionActive.value
4720
- // });
4721
- if (visit) { // can be null while the place and index sync up
4722
- this._inRouteVisitUpdate.whileTrue((/**
4723
- * @return {?}
4724
- */
4725
- function () {
4726
- _this._activePlaceVisitModel.value = visit;
4727
- }));
4728
- }
4461
+ function (visit, customNavigation) {
4462
+ return __awaiter(this, void 0, void 0, function () {
4463
+ return __generator(this, function (_a) {
4464
+ switch (_a.label) {
4465
+ case 0:
4466
+ this._navigationSessionModel.value = this.navigationSessionFactory.createInternal(visit);
4467
+ _a.label = 1;
4468
+ case 1:
4469
+ _a.trys.push([1, , 3, 4]);
4470
+ return [4 /*yield*/, customNavigation(this.router)];
4471
+ case 2:
4472
+ _a.sent();
4473
+ return [3 /*break*/, 4];
4474
+ case 3:
4475
+ // Router has finished (since there was no router change required) so we
4476
+ // need to end the navigation session.
4477
+ if (this.navigationSession && !this.router.getCurrentNavigation()) {
4478
+ this.onAngularRouterFinished(false);
4479
+ }
4480
+ return [7 /*endfinally*/];
4481
+ case 4: return [2 /*return*/];
4482
+ }
4483
+ });
4484
+ });
4729
4485
  };
4730
4486
  /**
4731
- * @param {?} next
4732
- * @param {?} previous
4487
+ * @private
4488
+ * @param {?} visit
4733
4489
  * @return {?}
4734
4490
  */
4735
- PlaceOutletComponent.prototype.pushVisitChangesToRoute = /**
4736
- * @param {?} next
4737
- * @param {?} previous
4491
+ PlaceRouter.prototype.createRouteParameters = /**
4492
+ * @private
4493
+ * @param {?} visit
4738
4494
  * @return {?}
4739
4495
  */
4740
- function (next, previous) {
4496
+ function (visit) {
4741
4497
  /** @type {?} */
4742
- var activatedRoute = this._activatedRouteModel.value;
4743
- this.placeRouter.pushVisitChangesToRoute(activatedRoute, previous, next);
4498
+ var def = visit.placeDefinition;
4499
+ return visit.hasRouteId() ?
4500
+ [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
4501
+ [def.getFormattedRouteParameters(visit)];
4744
4502
  };
4745
- Object.defineProperty(PlaceOutletComponent.prototype, "activePlaceModel", {
4746
- get: /**
4747
- * @return {?}
4748
- */
4749
- function () {
4750
- return this._activePlace.readonly;
4751
- },
4752
- enumerable: true,
4753
- configurable: true
4754
- });
4755
- Object.defineProperty(PlaceOutletComponent.prototype, "activatedRouteModel", {
4756
- get: /**
4757
- * @return {?}
4758
- */
4759
- function () {
4760
- return this._activatedRouteModel.readonly;
4761
- },
4762
- enumerable: true,
4763
- configurable: true
4764
- });
4765
4503
  // @Trace()
4766
4504
  // @Trace()
4767
4505
  /**
4768
- * @param {?} routerOutlet
4769
- * @param {?} place
4506
+ * @private
4507
+ * @param {?} event
4770
4508
  * @return {?}
4771
4509
  */
4772
- PlaceOutletComponent.prototype.onOutletActivated =
4510
+ PlaceRouter.prototype.onAngularRouterStarted =
4773
4511
  // @Trace()
4774
4512
  /**
4775
- * @param {?} routerOutlet
4776
- * @param {?} place
4513
+ * @private
4514
+ * @param {?} event
4777
4515
  * @return {?}
4778
4516
  */
4779
- function (routerOutlet, place) {
4780
- var _this = this;
4781
- this._inOutletActivation.whileTrue((/**
4782
- * @return {?}
4783
- */
4784
- function () {
4785
- try {
4786
- _this._activePlace.value = place;
4787
- _this._activatedRouteModel.value = routerOutlet.activatedRoute;
4788
- _this._placeDefinition.value = place.placeDefinition;
4789
- /** @type {?} */
4790
- var visitModel = new MutableValueModel();
4791
- _this._activePlaceVisitModel.setDelegate(visitModel);
4792
- place.initialiseBindings(visitModel);
4793
- }
4794
- catch (error) {
4795
- console.error(error);
4517
+ function (event) {
4518
+ if (!this.navigationSession) { // We been activated by an external route rather than placeRouter.go(visit)
4519
+ console.log('navigation started', { firstTime: this.firstRoute });
4520
+ /** @type {?} */
4521
+ var session = this.navigationSessionFactory.createExternal(this.firstRoute);
4522
+ if (event.navigationTrigger === 'popstate') {
4523
+ session.setPopstateReturnUrl(this.router.routerState.snapshot.url);
4796
4524
  }
4797
- }));
4798
- if (!this.animate) {
4799
- // we're not animating so trigger any post animation callbacks now.
4800
- this.animationDone();
4525
+ this._navigationSessionModel.value = session;
4801
4526
  }
4527
+ this.firstRoute = false;
4802
4528
  };
4803
4529
  // @Trace()
4804
4530
  // @Trace()
4805
4531
  /**
4532
+ * @private
4533
+ * @param {?} cancelled
4806
4534
  * @return {?}
4807
4535
  */
4808
- PlaceOutletComponent.prototype.onOutletDeactivated =
4536
+ PlaceRouter.prototype.onAngularRouterFinished =
4809
4537
  // @Trace()
4810
4538
  /**
4539
+ * @private
4540
+ * @param {?} cancelled
4811
4541
  * @return {?}
4812
4542
  */
4813
- function () {
4543
+ function (cancelled) {
4814
4544
  var _this = this;
4815
- this._inOutletDeactivation.whileTrue((/**
4816
- * @return {?}
4817
- */
4818
- function () {
4819
- _this._activePlace.value = null;
4820
- _this._activatedRouteModel.value = null;
4821
- _this._placeDefinition.value = null;
4822
- _this._activePlaceVisitModel.setDelegate(null);
4823
- }));
4545
+ /** @type {?} */
4546
+ var session = this._navigationSessionModel.value;
4547
+ if (!cancelled) {
4548
+ // Update visits before we end the navigation session. This allows the placeOutets to
4549
+ // ignore visit changes that occur while the navigation is in progress
4550
+ /** @type {?} */
4551
+ var visits = session.getVisits();
4552
+ visits.forEach((/**
4553
+ * @param {?} v
4554
+ * @return {?}
4555
+ */
4556
+ function (v) { return _this.placeHistory.add(v); }));
4557
+ this._activeVisits.value = visits;
4558
+ }
4559
+ else {
4560
+ // Angular doesn't preserve the url when a guard cancels the back button.
4561
+ // See https://github.com/angular/angular/issues/13586#issuecomment-432795720
4562
+ if (session.isPopState) {
4563
+ console.log('cancelled during popstate');
4564
+ this.angularLocation.go(session.popStateReturnUrl);
4565
+ }
4566
+ }
4567
+ this._navigationSessionModel.value = null;
4824
4568
  };
4825
- // @Trace()
4826
- // @Trace()
4827
4569
  /**
4570
+ * @param {?} activatedRoute
4828
4571
  * @return {?}
4829
4572
  */
4830
- PlaceOutletComponent.prototype.animationStarted =
4831
- // @Trace()
4832
- /**
4573
+ PlaceRouter.prototype.extractChildPath = /**
4574
+ * @param {?} activatedRoute
4833
4575
  * @return {?}
4834
4576
  */
4835
- function () {
4836
- // console.log({ activePlace: this._activePlace.value });
4577
+ function (activatedRoute) {
4578
+ return ___default.flatten(activatedRoute.children.map((/**
4579
+ * @param {?} child
4580
+ * @return {?}
4581
+ */
4582
+ function (child) { return child.url; })));
4837
4583
  };
4838
- // @Trace()
4839
- // @Trace()
4840
4584
  /**
4585
+ * @param {?} snapshot
4841
4586
  * @return {?}
4842
4587
  */
4843
- PlaceOutletComponent.prototype.animationDone =
4844
- // @Trace()
4845
- /**
4588
+ PlaceRouter.prototype.parseUrl = /**
4589
+ * @param {?} snapshot
4846
4590
  * @return {?}
4847
4591
  */
4848
- function () {
4849
- if (this._activePlace.value) {
4850
- this._activePlace.value.onPlaceReady();
4851
- }
4852
- };
4853
- PlaceOutletComponent.decorators = [
4854
- { type: Component, args: [{
4855
- selector: 'aup-place-outlet',
4856
- template: "<div class=\"router-outlet-container\"\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\n",
4857
- animations: [LEFT_RIGHT_PLACE_ANIMATION],
4858
- styles: [":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
4859
- }] }
4860
- ];
4861
- /** @nocollapse */
4862
- PlaceOutletComponent.ctorParameters = function () { return [
4863
- { type: Router },
4864
- { type: PlaceRouter },
4865
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [AUP_PLACE_CONFIG,] }] },
4866
- { type: PlaceOutletComponent, decorators: [{ type: SkipSelf }, { type: Optional }] }
4867
- ]; };
4868
- PlaceOutletComponent.propDecorators = {
4869
- animate: [{ type: Input }],
4870
- customPlaceAnimationOrderModel: [{ type: Input, args: ['placeAnimationOrderModel',] }],
4871
- customPlaceAnimationOrder: [{ type: Input, args: ['placeAnimationOrder',] }],
4872
- placeChanged: [{ type: Output }],
4873
- routerOut: [{ type: ViewChild, args: ['routeOutlet', { static: true },] }]
4592
+ function (snapshot) {
4593
+ return new PlaceRouter.UrlHelper(this.urlSerializer.parse(snapshot.url));
4874
4594
  };
4875
- __decorate([
4876
- UseDelegate(),
4877
- __metadata("design:type", ListModel)
4878
- ], PlaceOutletComponent.prototype, "customPlaceAnimationOrderModel", void 0);
4879
- __decorate([
4880
- StoreInListModel('customPlaceAnimationOrderModel'),
4881
- __metadata("design:type", Array)
4882
- ], PlaceOutletComponent.prototype, "customPlaceAnimationOrder", void 0);
4883
- return PlaceOutletComponent;
4884
- }(DisposableComponent));
4885
- if (false) {
4886
- /** @type {?} */
4887
- PlaceOutletComponent.prototype.animate;
4888
- /** @type {?} */
4889
- PlaceOutletComponent.prototype.customPlaceAnimationOrderModel;
4890
- /** @type {?} */
4891
- PlaceOutletComponent.prototype.customPlaceAnimationOrder;
4892
- /** @type {?} */
4893
- PlaceOutletComponent.prototype.placeChanged;
4894
- /** @type {?} */
4895
- PlaceOutletComponent.prototype.routerOut;
4896
- /**
4897
- * @type {?}
4898
- * @private
4899
- */
4900
- PlaceOutletComponent.prototype._activePlace;
4595
+ // TODO: this all only sort of works. Opening dialogs and clicking back multiple times breaks things.
4596
+ // TODO: next stage is to investigate tracking dialog state in a different placeoutlet and keeping those
4597
+ // TODO: urls out of the history.
4598
+ // TODO: this all only sort of works. Opening dialogs and clicking back multiple times breaks things.
4599
+ // TODO: next stage is to investigate tracking dialog state in a different placeoutlet and keeping those
4600
+ // TODO: urls out of the history.
4901
4601
  /**
4902
- * @type {?}
4903
- * @private
4602
+ * @param {?} activatedRoute
4603
+ * @param {?} state
4604
+ * @return {?}
4904
4605
  */
4905
- PlaceOutletComponent.prototype._activePlaceVisitModel;
4606
+ PlaceRouter.prototype.performInitialNavigationIntercept =
4607
+ // TODO: this all only sort of works. Opening dialogs and clicking back multiple times breaks things.
4608
+ // TODO: next stage is to investigate tracking dialog state in a different placeoutlet and keeping those
4609
+ // TODO: urls out of the history.
4906
4610
  /**
4907
- * @type {?}
4908
- * @private
4611
+ * @param {?} activatedRoute
4612
+ * @param {?} state
4613
+ * @return {?}
4909
4614
  */
4910
- PlaceOutletComponent.prototype._inOutletActivation;
4615
+ function (activatedRoute, state) {
4616
+ assert.isTruthy(this.isInitialNavigation());
4617
+ Logger.get(this).info("Redirecting to: " + noopPlaceDef.path, { returnUrl: state.url });
4618
+ if (!this.initialRedirectFinished) {
4619
+ this.initialRedirectFinished = true;
4620
+ return this.router.createUrlTree([noopPlaceDef.path, {
4621
+ returnUrl: state.url
4622
+ }], {
4623
+ replaceUrl: true,
4624
+ // make sure we update our history
4625
+ skipLocationChange: false
4626
+ });
4627
+ }
4628
+ };
4911
4629
  /**
4912
- * @type {?}
4913
- * @private
4630
+ * @return {?}
4914
4631
  */
4915
- PlaceOutletComponent.prototype._inOutletDeactivation;
4632
+ PlaceRouter.prototype.isInitialNavigation = /**
4633
+ * @return {?}
4634
+ */
4635
+ function () {
4636
+ return this.navigationSession.firstNavigation && !this.initialRedirectFinished;
4637
+ };
4638
+ PlaceRouter.decorators = [
4639
+ { type: Injectable, args: [{
4640
+ providedIn: 'root'
4641
+ },] }
4642
+ ];
4643
+ /** @nocollapse */
4644
+ PlaceRouter.ctorParameters = function () { return [
4645
+ { type: Router },
4646
+ { type: UrlSerializer },
4647
+ { type: InteractionContext },
4648
+ { type: Location },
4649
+ { type: PlaceHistory }
4650
+ ]; };
4651
+ /** @nocollapse */ PlaceRouter.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(UrlSerializer), ɵɵinject(InteractionContext), ɵɵinject(Location), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
4652
+ __decorate([
4653
+ Trace(),
4654
+ __metadata("design:type", Function),
4655
+ __metadata("design:paramtypes", [Visit, Object]),
4656
+ __metadata("design:returntype", Promise)
4657
+ ], PlaceRouter.prototype, "navigate", null);
4658
+ return PlaceRouter;
4659
+ }(GarbageCollector));
4660
+ if (false) {
4916
4661
  /**
4917
4662
  * @type {?}
4918
4663
  * @private
4919
4664
  */
4920
- PlaceOutletComponent.prototype._inOutletUpdate;
4665
+ PlaceRouter.prototype.firstRoute;
4921
4666
  /**
4922
4667
  * @type {?}
4923
4668
  * @private
4924
4669
  */
4925
- PlaceOutletComponent.prototype._inRouteVisitUpdate;
4670
+ PlaceRouter.prototype._navigationSessionModel;
4926
4671
  /**
4927
4672
  * @type {?}
4928
4673
  * @private
4929
4674
  */
4930
- PlaceOutletComponent.prototype._activatedRouteModel;
4675
+ PlaceRouter.prototype._activeVisits;
4676
+ /** @type {?} */
4677
+ PlaceRouter.prototype.navigationSessionActive;
4678
+ /** @type {?} */
4679
+ PlaceRouter.prototype.activeVisitIndex;
4931
4680
  /**
4932
4681
  * @type {?}
4933
4682
  * @private
4934
4683
  */
4935
- PlaceOutletComponent.prototype._placeDefinition;
4684
+ PlaceRouter.prototype.navigationSessionFactory;
4936
4685
  /**
4937
4686
  * @type {?}
4938
4687
  * @private
4939
4688
  */
4940
- PlaceOutletComponent.prototype.parentOutletModel;
4941
- /** @type {?} */
4942
- PlaceOutletComponent.prototype.placeAnimationOrder;
4689
+ PlaceRouter.prototype.initialRedirectStarted;
4943
4690
  /**
4944
4691
  * @type {?}
4945
4692
  * @private
4946
4693
  */
4947
- PlaceOutletComponent.prototype.initialPlaceIndex;
4694
+ PlaceRouter.prototype.initialRedirectFinished;
4948
4695
  /**
4949
4696
  * @type {?}
4950
4697
  * @private
4951
4698
  */
4952
- PlaceOutletComponent.prototype.routerVisit;
4699
+ PlaceRouter.prototype.router;
4953
4700
  /**
4954
4701
  * @type {?}
4955
4702
  * @private
4956
4703
  */
4957
- PlaceOutletComponent.prototype.router;
4704
+ PlaceRouter.prototype.urlSerializer;
4958
4705
  /**
4959
4706
  * @type {?}
4960
4707
  * @private
4961
4708
  */
4962
- PlaceOutletComponent.prototype.placeRouter;
4709
+ PlaceRouter.prototype.interactionContext;
4963
4710
  /** @type {?} */
4964
- PlaceOutletComponent.prototype.placeConfig;
4711
+ PlaceRouter.prototype.angularLocation;
4712
+ /** @type {?} */
4713
+ PlaceRouter.prototype.placeHistory;
4965
4714
  }
4966
-
4967
- /**
4968
- * @fileoverview added by tsickle
4969
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4970
- */
4971
- var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
4972
- __extends(AbstractPlaceNavigationComponent, _super);
4973
- function AbstractPlaceNavigationComponent() {
4974
- var _this = _super.call(this) || this;
4975
- var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
4976
- _this.placeDefinitions = chain(_this.placesModel).map((/**
4977
- * @param {?} c
4715
+ (function (PlaceRouter) {
4716
+ var UrlHelper = /** @class */ (function () {
4717
+ function UrlHelper(urlTree) {
4718
+ this.urlTree = urlTree;
4719
+ console.log({ segments: this.urlTree.root.children.primary.segments });
4720
+ }
4721
+ /**
4978
4722
  * @return {?}
4979
4723
  */
4980
- function (c) { return PlaceComponent.getDefinition(c); }));
4981
- _this.commandFactory = Command.createFactory((/**
4982
- * @param {?} placeDefinition
4724
+ UrlHelper.prototype.cloneUrlSegmentList = /**
4983
4725
  * @return {?}
4984
4726
  */
4985
- function (placeDefinition) {
4986
- _this.placeOutlet.navigate(new Visit(placeDefinition));
4987
- }));
4988
- _this.activePlaceDefinition = chain(_this.placeOutletModel).pullValueModel((/**
4989
- * @param {?} o
4727
+ function () {
4728
+ return __spread(this.urlTree.root.children.primary.segments);
4729
+ };
4730
+ /**
4731
+ * @param {?} visit
4990
4732
  * @return {?}
4991
4733
  */
4992
- function (o) { return o.activePlaceModel; })).pluck("placeDefinition");
4993
- return _this;
4994
- }
4995
- /**
4996
- * @param {?} placeDef
4997
- * @return {?}
4998
- */
4999
- AbstractPlaceNavigationComponent.prototype.getNav = /**
5000
- * @param {?} placeDef
5001
- * @return {?}
5002
- */
5003
- function (placeDef) {
5004
- /** @type {?} */
5005
- var navItem = (/** @type {?} */ (placeDef.getPlaceData('nav')));
5006
- return {
5007
- title: (/**
5008
- * @return {?}
5009
- */
5010
- function () { return navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']); }),
5011
- tooltip: (/**
5012
- * @return {?}
5013
- */
5014
- function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null); }),
5015
- icon: (/**
4734
+ UrlHelper.prototype.updateVisitSegments = /**
4735
+ * @param {?} visit
4736
+ * @return {?}
4737
+ */
4738
+ function (visit) {
4739
+ // Ugly, but it works for now.
4740
+ /** @type {?} */
4741
+ var segments = this.cloneUrlSegmentList();
4742
+ /** @type {?} */
4743
+ var visitSegments = this.convertToUrlSegments(visit);
4744
+ /** @type {?} */
4745
+ var replaceAt = segments.findIndex((/**
4746
+ * @param {?} segment
5016
4747
  * @return {?}
5017
4748
  */
5018
- function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null); })
4749
+ function (segment) { return segment.path === visitSegments[0].path; }));
4750
+ // do not use the return value, it's the items that were removed!
4751
+ segments.splice.apply(segments, __spread([replaceAt, visitSegments.length], visitSegments));
4752
+ return segments;
5019
4753
  };
5020
- };
5021
- /**
5022
- * @param {?} place
5023
- * @return {?}
5024
- */
5025
- AbstractPlaceNavigationComponent.prototype.isActive = /**
5026
- * @param {?} place
5027
- * @return {?}
5028
- */
5029
- function (place) {
5030
- return this.activePlaceDefinition.query().equals(place);
5031
- };
5032
- /**
5033
- * @return {?}
5034
- */
5035
- AbstractPlaceNavigationComponent.prototype.ngOnInit = /**
5036
- * @return {?}
5037
- */
5038
- function () {
5039
- };
5040
- AbstractPlaceNavigationComponent.decorators = [
5041
- { type: Component, args: [{
5042
- template: ''
5043
- }] }
5044
- ];
5045
- /** @nocollapse */
5046
- AbstractPlaceNavigationComponent.ctorParameters = function () { return []; };
5047
- AbstractPlaceNavigationComponent.propDecorators = {
5048
- places: [{ type: Input }],
5049
- placesModel: [{ type: Input }],
5050
- placeOutlet: [{ type: Input }],
5051
- placeOutletModel: [{ type: Input }]
5052
- };
5053
- __decorate([
5054
- StoreInListModel('placesModel'),
5055
- __metadata("design:type", Array)
5056
- ], AbstractPlaceNavigationComponent.prototype, "places", void 0);
5057
- __decorate([
5058
- UseDelegate(),
5059
- __metadata("design:type", ListModel)
5060
- ], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
5061
- __decorate([
5062
- StoreInValueModel('placeOutletModel'),
5063
- __metadata("design:type", PlaceOutletComponent)
5064
- ], AbstractPlaceNavigationComponent.prototype, "placeOutlet", void 0);
5065
- __decorate([
5066
- UseDelegate(),
5067
- __metadata("design:type", ValueModel)
5068
- ], AbstractPlaceNavigationComponent.prototype, "placeOutletModel", void 0);
5069
- __decorate([
5070
- Memoize(),
5071
- __metadata("design:type", Function),
5072
- __metadata("design:paramtypes", [PlaceDefinition]),
5073
- __metadata("design:returntype", Object)
5074
- ], AbstractPlaceNavigationComponent.prototype, "getNav", null);
5075
- return AbstractPlaceNavigationComponent;
5076
- }(DisposableComponent));
5077
- if (false) {
5078
- /** @type {?} */
5079
- AbstractPlaceNavigationComponent.prototype.places;
5080
- /** @type {?} */
5081
- AbstractPlaceNavigationComponent.prototype.placesModel;
5082
- /** @type {?} */
5083
- AbstractPlaceNavigationComponent.prototype.placeOutlet;
5084
- /** @type {?} */
5085
- AbstractPlaceNavigationComponent.prototype.placeOutletModel;
5086
- /** @type {?} */
5087
- AbstractPlaceNavigationComponent.prototype.placeDefinitions;
5088
- /** @type {?} */
5089
- AbstractPlaceNavigationComponent.prototype.commandFactory;
5090
- /** @type {?} */
5091
- AbstractPlaceNavigationComponent.prototype.activePlaceDefinition;
5092
- }
4754
+ /**
4755
+ * Converts the visit into segments. Please not that these segments are not e
4756
+ * @param visit
4757
+ */
4758
+ /**
4759
+ * Converts the visit into segments. Please not that these segments are not e
4760
+ * @param {?} visit
4761
+ * @return {?}
4762
+ */
4763
+ UrlHelper.prototype.convertToUrlSegments = /**
4764
+ * Converts the visit into segments. Please not that these segments are not e
4765
+ * @param {?} visit
4766
+ * @return {?}
4767
+ */
4768
+ function (visit) {
4769
+ return visit.placeDefinition.hasRouteId() ?
4770
+ [
4771
+ // NOTE:
4772
+ // It's important to attach the params to the root path and not the id. If we attach them
4773
+ // to an empty id then the angular router won't match the pattern.
4774
+ new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit)),
4775
+ new UrlSegment(visit.placeDefinition.getFormattedRouteId(visit), {})
4776
+ ]
4777
+ :
4778
+ [
4779
+ new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit))
4780
+ ];
4781
+ };
4782
+ /**
4783
+ * @param {?} visit
4784
+ * @return {?}
4785
+ */
4786
+ UrlHelper.prototype.createRedirectCommandsFor = /**
4787
+ * @param {?} visit
4788
+ * @return {?}
4789
+ */
4790
+ function (visit) {
4791
+ /** @type {?} */
4792
+ var segments = this.updateVisitSegments(visit);
4793
+ /** @type {?} */
4794
+ var commands = [];
4795
+ segments.forEach((/**
4796
+ * @param {?} s
4797
+ * @return {?}
4798
+ */
4799
+ function (s) {
4800
+ commands.push(s.path);
4801
+ if (s.parameterMap.keys.length > 0) {
4802
+ commands.push(s.parameters);
4803
+ }
4804
+ }));
4805
+ return commands;
4806
+ };
4807
+ /**
4808
+ * @param {?} placeDef
4809
+ * @return {?}
4810
+ */
4811
+ UrlHelper.prototype.includesPathOf = /**
4812
+ * @param {?} placeDef
4813
+ * @return {?}
4814
+ */
4815
+ function (placeDef) {
4816
+ return this.cloneUrlSegmentList().find((/**
4817
+ * @param {?} s
4818
+ * @return {?}
4819
+ */
4820
+ function (s) { return s.path === placeDef.path; }));
4821
+ };
4822
+ __decorate([
4823
+ Trace(),
4824
+ __metadata("design:type", Function),
4825
+ __metadata("design:paramtypes", [Visit]),
4826
+ __metadata("design:returntype", Array)
4827
+ ], UrlHelper.prototype, "createRedirectCommandsFor", null);
4828
+ return UrlHelper;
4829
+ }());
4830
+ PlaceRouter.UrlHelper = UrlHelper;
4831
+ if (false) {
4832
+ /**
4833
+ * @type {?}
4834
+ * @private
4835
+ */
4836
+ UrlHelper.prototype.urlTree;
4837
+ }
4838
+ })(PlaceRouter || (PlaceRouter = {}));
5093
4839
 
5094
4840
  /**
5095
4841
  * @fileoverview added by tsickle
5096
4842
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5097
4843
  */
5098
- var BusyOverlayComponent = /** @class */ (function () {
5099
- function BusyOverlayComponent() {
5100
- }
5101
- /**
5102
- * @return {?}
5103
- */
5104
- BusyOverlayComponent.prototype.ngOnInit = /**
5105
- * @return {?}
5106
- */
5107
- function () {
5108
- };
5109
- BusyOverlayComponent.decorators = [
5110
- { type: Component, args: [{
5111
- selector: 'aup-busy-overlay',
5112
- template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
5113
- styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
5114
- }] }
5115
- ];
5116
- /** @nocollapse */
5117
- BusyOverlayComponent.ctorParameters = function () { return []; };
5118
- BusyOverlayComponent.propDecorators = {
5119
- busyModel: [{ type: Input }],
5120
- busy: [{ type: Input }]
5121
- };
5122
- __decorate([
5123
- UseDelegate(),
5124
- __metadata("design:type", ValueModel)
5125
- ], BusyOverlayComponent.prototype, "busyModel", void 0);
5126
- __decorate([
5127
- StoreInValueModel('busyModel'),
5128
- __metadata("design:type", Boolean)
5129
- ], BusyOverlayComponent.prototype, "busy", void 0);
5130
- return BusyOverlayComponent;
5131
- }());
5132
- if (false) {
5133
- /** @type {?} */
5134
- BusyOverlayComponent.prototype.busyModel;
5135
- /** @type {?} */
5136
- BusyOverlayComponent.prototype.busy;
4844
+ // Freezes the state of the components at the start of the animation.
4845
+ /** @type {?} */
4846
+ var animationStartStyle = style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
4847
+ /** @type {?} */
4848
+ var left = [
4849
+ query(':enter, :leave', animationStartStyle, { optional: true }),
4850
+ group([
4851
+ query(':enter', [
4852
+ style({ transform: 'translateX(-100%)' }),
4853
+ animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
4854
+ ], {
4855
+ optional: true
4856
+ }),
4857
+ query(':leave', [
4858
+ style({ transform: 'translateX(0%)' }),
4859
+ animate('{{duration}} ease-out', style({ transform: 'translateX(100%)' }))
4860
+ ], {
4861
+ optional: true
4862
+ })
4863
+ ])
4864
+ ];
4865
+ /** @type {?} */
4866
+ var right = [
4867
+ query(':enter, :leave', animationStartStyle, { optional: true }),
4868
+ group([
4869
+ query(':enter', [
4870
+ style({ transform: 'translateX(100%)', minHeight: '1px' }),
4871
+ animate('{{duration}} ease-out', style({ transform: 'translateX(0%)' }))
4872
+ ], {
4873
+ optional: true
4874
+ }),
4875
+ query(':leave', [style({ transform: 'translateX(0%)' }), animate('{{duration}} ease-out', style({
4876
+ transform: 'translateX(-100%)',
4877
+ minHeight: '1px'
4878
+ }))], {
4879
+ optional: true
4880
+ })
4881
+ ])
4882
+ ];
4883
+ /**
4884
+ * @param {?} duration
4885
+ * @return {?}
4886
+ */
4887
+ function leftRightPlaceAnimation(duration) {
4888
+ return trigger('routeAnimations', [
4889
+ transition(':increment', right, { params: { duration: duration } }),
4890
+ transition(':decrement', left, { params: { duration: duration } })
4891
+ ]);
5137
4892
  }
4893
+ /** @type {?} */
4894
+ var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
5138
4895
 
5139
4896
  /**
5140
4897
  * @fileoverview added by tsickle
5141
4898
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5142
4899
  */
5143
- var EmptyStateComponent = /** @class */ (function () {
5144
- function EmptyStateComponent() {
5145
- }
4900
+ /**
4901
+ * @record
4902
+ */
4903
+ function PlaceRef() { }
4904
+ if (false) {
4905
+ /** @type {?} */
4906
+ PlaceRef.prototype.placeDefinition;
5146
4907
  /**
4908
+ * @param {?} param
5147
4909
  * @return {?}
5148
4910
  */
5149
- EmptyStateComponent.prototype.ngOnInit = /**
4911
+ PlaceRef.prototype.initialiseBindings = function (param) { };
4912
+ /**
5150
4913
  * @return {?}
5151
4914
  */
5152
- function () {
5153
- };
5154
- EmptyStateComponent.decorators = [
5155
- { type: Component, args: [{
5156
- selector: 'aup-empty-state',
5157
- template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
5158
- styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
5159
- }] }
5160
- ];
5161
- /** @nocollapse */
5162
- EmptyStateComponent.ctorParameters = function () { return []; };
5163
- return EmptyStateComponent;
5164
- }());
5165
-
5166
- /**
5167
- * @fileoverview added by tsickle
5168
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5169
- */
5170
- var ListPlaceNavComponent = /** @class */ (function (_super) {
5171
- __extends(ListPlaceNavComponent, _super);
5172
- function ListPlaceNavComponent() {
4915
+ PlaceRef.prototype.onPlaceReady = function () { };
4916
+ }
4917
+ var PlaceOutletComponent = /** @class */ (function (_super) {
4918
+ __extends(PlaceOutletComponent, _super);
4919
+ function PlaceOutletComponent(router, placeRouter, placeConfig, parentOutlet) {
5173
4920
  var _this = _super.call(this) || this;
5174
- _this.expanded = true;
4921
+ _this.router = router;
4922
+ _this.placeRouter = placeRouter;
4923
+ _this.placeConfig = placeConfig;
4924
+ _this.placeChanged = new EventEmitter();
4925
+ _this._activePlace = new MutableValueModel();
4926
+ _this._previousPlace = new MutableValueModel();
4927
+ _this._activePlaceVisitModel = new DelegatingValueModel();
4928
+ _this._inOutletActivation = new Guard$1();
4929
+ _this._inOutletDeactivation = new Guard$1();
4930
+ _this._inRouteVisitUpdate = new Guard$1();
4931
+ _this._activatedRouteModel = new MutableValueModel();
4932
+ _this._placeDefinition = new MutableValueModel();
4933
+ _this.initialPlaceIndex = null;
4934
+ var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
4935
+ _this.parentOutletModel = new MutableValueModel(parentOutlet);
4936
+ _this._activePlaceVisitModel.setDelegate(new MutableValueModel());
4937
+ _this._inOutletUpdate = valueOf.any(_this._inOutletDeactivation, _this._inOutletActivation).areTruthy();
4938
+ /** @type {?} */
4939
+ var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
4940
+ .pullValueModel((/**
4941
+ * @param {?} o
4942
+ * @return {?}
4943
+ */
4944
+ function (o) { return o.activePlaceModel; }))
4945
+ .pluck('placeDefinition')
4946
+ .pluckList('children')
4947
+ .pluck('component');
4948
+ // TODO: This is a hack to prevent animation during the NoopGatewayPlace
4949
+ /** @type {?} */
4950
+ var activePlaceType = chain(_this._activePlace).map((/**
4951
+ * @param {?} p
4952
+ * @return {?}
4953
+ */
4954
+ function (p) {
4955
+ return (/** @type {?} */ (p.constructor));
4956
+ }), {
4957
+ postponeWhile: chain(_this.activePlaceModel).isNil()
4958
+ });
4959
+ /** @type {?} */
4960
+ var previousPlaceType = chain(_this._previousPlace).map((/**
4961
+ * @param {?} p
4962
+ * @return {?}
4963
+ */
4964
+ function (p) { return (/** @type {?} */ (p.constructor)); }));
4965
+ _this.ready = chain.reduce(activePlaceType, previousPlaceType, (/**
4966
+ * @param {?} current
4967
+ * @param {?} previous
4968
+ * @return {?}
4969
+ */
4970
+ function (current, previous) {
4971
+ return !!current && current !== NoopGatewayPlace && previous !== NoopGatewayPlace;
4972
+ }));
4973
+ _this.enableAnimation = valueOf.all(_this.ready, _this.animateModel).areTruthy();
4974
+ _this.placeAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
4975
+ .otherwise(defaultPlaceAnimationOrder)
4976
+ .reduce((/**
4977
+ * @param {?} placesInOrder
4978
+ * @return {?}
4979
+ */
4980
+ function (placesInOrder) {
4981
+ /** @type {?} */
4982
+ var placeIndex = 0;
4983
+ if (activePlaceType.value) {
4984
+ placeIndex = placesInOrder.indexOf(activePlaceType.value);
4985
+ if (isNil(_this.initialPlaceIndex && placeIndex >= 0)) {
4986
+ _this.initialPlaceIndex = placeIndex;
4987
+ }
4988
+ }
4989
+ return isNil(_this.initialPlaceIndex) ? 0 : placeIndex - _this.initialPlaceIndex;
4990
+ }), { dependsOn: activePlaceType });
4991
+ // Push incoming changes into the component
4992
+ _this.routerVisit = chain(_this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
4993
+ // Our router visit will change when our active is nullified during deactivation, which will push a null visit
4994
+ // the the deactivated component, which will nuke it's view before the animations have finished.
4995
+ // The visit will alway updated after the router session is finsised (when the new visits are registered) so
4996
+ // we can safely ignore it during outlet changes as these always happen before the router session ends.
4997
+ when.valueOf(_this.routerVisit).changes((/**
4998
+ * @return {?}
4999
+ */
5000
+ function () { return _this.pushRouteChangesToVisit(); }), { unless: _this._inOutletUpdate });
5001
+ // Handle component based changes
5002
+ when.valueOf(_this._activePlaceVisitModel).changes((/**
5003
+ * @param {?} next
5004
+ * @param {?} previous
5005
+ * @return {?}
5006
+ */
5007
+ function (next, previous) {
5008
+ _this.pushVisitChangesToRoute(next, previous);
5009
+ }), {
5010
+ unless: _this.placeRouter.navigationSessionActive
5011
+ });
5012
+ chain(_this._activePlace)
5013
+ .postponeWhile(placeRouter.navigationSessionActive)
5014
+ .subscribe((/**
5015
+ * @param {?} place
5016
+ * @return {?}
5017
+ */
5018
+ function (place) { return _this.placeChanged.emit(place); }));
5175
5019
  return _this;
5020
+ // const txo = new TransactionObserver().onEvent(e => console.log(e.toString()));
5021
+ // txo.observe('inRouteVisitUpdate', inRouteVisitUpdate);
5176
5022
  }
5177
5023
  /**
5178
5024
  * @return {?}
5179
5025
  */
5180
- ListPlaceNavComponent.prototype.expandMenu = /**
5026
+ PlaceOutletComponent.prototype.ngOnInit = /**
5181
5027
  * @return {?}
5182
5028
  */
5183
5029
  function () {
5184
- this.expanded = true;
5185
5030
  };
5031
+ // @Trace()
5032
+ // @Trace()
5186
5033
  /**
5187
5034
  * @return {?}
5188
5035
  */
5189
- ListPlaceNavComponent.prototype.collapseMenu = /**
5036
+ PlaceOutletComponent.prototype.getAnimationOrder =
5037
+ // @Trace()
5038
+ /**
5190
5039
  * @return {?}
5191
5040
  */
5192
5041
  function () {
5193
- this.expanded = false;
5042
+ return this.placeAnimationOrder.value;
5194
5043
  };
5044
+ Object.defineProperty(PlaceOutletComponent.prototype, "animationDuration", {
5045
+ get: /**
5046
+ * @return {?}
5047
+ */
5048
+ function () {
5049
+ return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
5050
+ },
5051
+ enumerable: true,
5052
+ configurable: true
5053
+ });
5054
+ // @Trace()
5055
+ // @Trace()
5195
5056
  /**
5057
+ * @param {?} visit
5196
5058
  * @return {?}
5197
5059
  */
5198
- ListPlaceNavComponent.prototype.toggleMenu = /**
5060
+ PlaceOutletComponent.prototype.navigate =
5061
+ // @Trace()
5062
+ /**
5063
+ * @param {?} visit
5199
5064
  * @return {?}
5200
5065
  */
5201
- function () {
5202
- this.expanded = !this.expanded;
5066
+ function (visit) {
5067
+ // console.log({ activatedRoute: this._activatedRouteModel.value });
5068
+ this.placeRouter.navigate(visit, {
5069
+ relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
5070
+ });
5203
5071
  };
5204
- ListPlaceNavComponent.decorators = [
5205
- { type: Component, args: [{
5206
- selector: 'aup-list-place-nav',
5207
- template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <mat-icon *ngIf=\"getNav(placeDefinition).icon()\">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n",
5208
- styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
5209
- }] }
5210
- ];
5211
- /** @nocollapse */
5212
- ListPlaceNavComponent.ctorParameters = function () { return []; };
5213
- ListPlaceNavComponent.propDecorators = {
5214
- expanded: [{ type: HostBinding, args: ['class.expanded',] }]
5072
+ Object.defineProperty(PlaceOutletComponent.prototype, "parentOutlet", {
5073
+ get: /**
5074
+ * @return {?}
5075
+ */
5076
+ function () {
5077
+ return this.parentOutletModel.value;
5078
+ },
5079
+ enumerable: true,
5080
+ configurable: true
5081
+ });
5082
+ // @Trace()
5083
+ // @Trace()
5084
+ /**
5085
+ * @return {?}
5086
+ */
5087
+ PlaceOutletComponent.prototype.pushRouteChangesToVisit =
5088
+ // @Trace()
5089
+ /**
5090
+ * @return {?}
5091
+ */
5092
+ function () {
5093
+ var _this = this;
5094
+ /** @type {?} */
5095
+ var visit = this.routerVisit.value;
5096
+ // console.log({
5097
+ // visit,
5098
+ // place: visit ? visit.placeDefinition.component : null,
5099
+ // inOutletActivation: this._inOutletActivation.value,
5100
+ // inRoutingSession: this.placeRouter.navigationSessionActive.value
5101
+ // });
5102
+ if (visit) { // can be null while the place and index sync up
5103
+ this._inRouteVisitUpdate.whileTrue((/**
5104
+ * @return {?}
5105
+ */
5106
+ function () {
5107
+ _this._activePlaceVisitModel.value = visit;
5108
+ }));
5109
+ }
5215
5110
  };
5216
- return ListPlaceNavComponent;
5217
- }(AbstractPlaceNavigationComponent));
5218
- if (false) {
5219
- /** @type {?} */
5220
- ListPlaceNavComponent.prototype.expanded;
5221
- }
5222
-
5223
- /**
5224
- * @fileoverview added by tsickle
5225
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5226
- */
5227
- var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
5228
- __extends(TabbedPlaceNavigationComponent, _super);
5229
- function TabbedPlaceNavigationComponent() {
5230
- return _super.call(this) || this;
5231
- }
5232
- TabbedPlaceNavigationComponent.decorators = [
5233
- { type: Component, args: [{
5234
- selector: 'aup-tabbed-place-navigation',
5235
- 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]=\"getNav(placeDefinition).tooltip()\">\n <mat-icon *ngIf=\"getNav(placeDefinition).icon()\">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n",
5236
- styles: [""]
5237
- }] }
5238
- ];
5239
- /** @nocollapse */
5240
- TabbedPlaceNavigationComponent.ctorParameters = function () { return []; };
5241
- return TabbedPlaceNavigationComponent;
5242
- }(AbstractPlaceNavigationComponent));
5243
-
5244
- /**
5245
- * @fileoverview added by tsickle
5246
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5247
- */
5248
- var PlaceModule = /** @class */ (function () {
5249
- function PlaceModule() {
5250
- }
5251
- PlaceModule.decorators = [
5252
- { type: NgModule, args: [{
5253
- imports: [
5254
- CommonModule,
5255
- BrowserAnimationsModule,
5256
- MatProgressSpinnerModule,
5257
- RouterModule,
5258
- MatTabsModule,
5259
- MatListModule,
5260
- MatTooltipModule,
5261
- MatIconModule,
5262
- DirectivesModule
5263
- ],
5264
- declarations: [
5265
- EmptyStateComponent,
5266
- BusyOverlayComponent,
5267
- PlaceOutletComponent,
5268
- TabbedPlaceNavigationComponent,
5269
- ListPlaceNavComponent,
5270
- AbstractPlaceNavigationComponent
5271
- ],
5272
- entryComponents: [BusyOverlayComponent],
5273
- exports: [
5274
- BusyOverlayComponent,
5275
- PlaceOutletComponent,
5276
- EmptyStateComponent,
5277
- TabbedPlaceNavigationComponent,
5278
- ListPlaceNavComponent,
5279
- AbstractPlaceNavigationComponent
5280
- ],
5281
- providers: [
5282
- // {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: "2000ms"}}
5283
- ]
5284
- },] }
5285
- ];
5286
- return PlaceModule;
5287
- }());
5288
-
5289
- /**
5290
- * @fileoverview added by tsickle
5291
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5292
- */
5293
- var AngularUiPowerupsModule = /** @class */ (function () {
5294
- function AngularUiPowerupsModule() {
5295
- }
5296
- AngularUiPowerupsModule.decorators = [
5297
- { type: NgModule, args: [{
5298
- declarations: [],
5299
- imports: [
5300
- CommonModule,
5301
- BrowserAnimationsModule,
5302
- FormsModule,
5303
- MatInputModule,
5304
- MatFormFieldModule,
5305
- MatSelectModule,
5306
- MatTabsModule,
5307
- DirectivesModule,
5308
- ComponentsModule,
5309
- PlaceModule,
5310
- InteractionModule
5311
- ],
5312
- exports: [
5313
- InteractionModule,
5314
- PlaceModule,
5315
- DirectivesModule,
5316
- ComponentsModule,
5317
- NoopComponent
5318
- ]
5319
- },] }
5320
- ];
5321
- return AngularUiPowerupsModule;
5322
- }());
5323
-
5324
- /**
5325
- * @fileoverview added by tsickle
5326
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5327
- */
5328
- /** @type {?} */
5329
- var defaultHiddenStyleDef = style({
5330
- opacity: 0,
5331
- 'height': '0',
5332
- paddingTop: '0',
5333
- paddingBottom: '0'
5334
- });
5335
- /**
5336
- * @param {?} triggerName
5337
- * @param {?=} options
5338
- * @return {?}
5339
- */
5340
- function slideDownAndUpAnimation(triggerName, options) {
5341
- // SEE to fix this: https://github.com/angular/angular/issues/15587#issuecomment-351510501
5342
- /** @type {?} */
5343
- var duration = OptionsHelper.get(options).getOptional('duration', '100ms');
5344
- /** @type {?} */
5345
- var hiddenStyleDef = OptionsHelper.get(options).getOptional('hiddenStyleDef', defaultHiddenStyleDef);
5346
- return trigger(triggerName, [
5347
- transition(':enter', [hiddenStyleDef, animate('100ms')]),
5348
- transition(':leave', [animate('100ms', hiddenStyleDef)])
5349
- ]);
5350
- }
5351
-
5352
- /**
5353
- * @fileoverview added by tsickle
5354
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5355
- */
5356
-
5357
- /**
5358
- * @fileoverview added by tsickle
5359
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5360
- */
5361
- var Dimension = /** @class */ (function () {
5362
- function Dimension(width, height) {
5363
- this.width = width;
5364
- this.height = height;
5365
- }
5366
- return Dimension;
5367
- }());
5368
- if (false) {
5369
- /** @type {?} */
5370
- Dimension.prototype.width;
5371
- /** @type {?} */
5372
- Dimension.prototype.height;
5373
- }
5374
-
5375
- /**
5376
- * @fileoverview added by tsickle
5377
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5378
- */
5379
- var Point = /** @class */ (function () {
5380
- function Point(x, y) {
5381
- this.x = x;
5382
- this.y = y;
5383
- }
5384
5111
  /**
5385
- * @param {?} data
5112
+ * @param {?} next
5113
+ * @param {?} previous
5114
+ * @return {?}
5115
+ */
5116
+ PlaceOutletComponent.prototype.pushVisitChangesToRoute = /**
5117
+ * @param {?} next
5118
+ * @param {?} previous
5119
+ * @return {?}
5120
+ */
5121
+ function (next, previous) {
5122
+ /** @type {?} */
5123
+ var activatedRoute = this._activatedRouteModel.value;
5124
+ this.placeRouter.pushVisitChangesToRoute(activatedRoute, previous, next);
5125
+ };
5126
+ Object.defineProperty(PlaceOutletComponent.prototype, "activePlaceModel", {
5127
+ get: /**
5128
+ * @return {?}
5129
+ */
5130
+ function () {
5131
+ return this._activePlace.readonly;
5132
+ },
5133
+ enumerable: true,
5134
+ configurable: true
5135
+ });
5136
+ Object.defineProperty(PlaceOutletComponent.prototype, "activatedRouteModel", {
5137
+ get: /**
5138
+ * @return {?}
5139
+ */
5140
+ function () {
5141
+ return this._activatedRouteModel.readonly;
5142
+ },
5143
+ enumerable: true,
5144
+ configurable: true
5145
+ });
5146
+ // @Trace()
5147
+ // @Trace()
5148
+ /**
5149
+ * @param {?} routerOutlet
5150
+ * @param {?} place
5386
5151
  * @return {?}
5387
5152
  */
5388
- Point.from = /**
5389
- * @param {?} data
5153
+ PlaceOutletComponent.prototype.onOutletActivated =
5154
+ // @Trace()
5155
+ /**
5156
+ * @param {?} routerOutlet
5157
+ * @param {?} place
5390
5158
  * @return {?}
5391
5159
  */
5392
- function (data) {
5393
- return new Point(data.x, data.y);
5160
+ function (routerOutlet, place) {
5161
+ var _this = this;
5162
+ this._inOutletActivation.whileTrue((/**
5163
+ * @return {?}
5164
+ */
5165
+ function () {
5166
+ try {
5167
+ _this._activePlace.value = place;
5168
+ _this._activatedRouteModel.value = routerOutlet.activatedRoute;
5169
+ _this._placeDefinition.value = place.placeDefinition;
5170
+ /** @type {?} */
5171
+ var visitModel = new MutableValueModel();
5172
+ _this._activePlaceVisitModel.setDelegate(visitModel);
5173
+ place.initialiseBindings(visitModel);
5174
+ }
5175
+ catch (error) {
5176
+ console.error(error);
5177
+ }
5178
+ }));
5179
+ if (!this.enableAnimation.value) {
5180
+ // we're not animating so trigger any post animation callbacks now.
5181
+ this.animationDone();
5182
+ }
5394
5183
  };
5184
+ // @Trace()
5185
+ // @Trace()
5395
5186
  /**
5396
- * @param {?} x
5397
- * @param {?} y
5398
5187
  * @return {?}
5399
5188
  */
5400
- Point.prototype.translate = /**
5401
- * @param {?} x
5402
- * @param {?} y
5189
+ PlaceOutletComponent.prototype.onOutletDeactivated =
5190
+ // @Trace()
5191
+ /**
5403
5192
  * @return {?}
5404
5193
  */
5405
- function (x, y) {
5406
- return new Point(this.x + x, this.y + y);
5194
+ function () {
5195
+ var _this = this;
5196
+ this._inOutletDeactivation.whileTrue((/**
5197
+ * @return {?}
5198
+ */
5199
+ function () {
5200
+ _this._previousPlace.value = _this._activePlace.value;
5201
+ _this._activePlace.value = null;
5202
+ _this._activatedRouteModel.value = null;
5203
+ _this._placeDefinition.value = null;
5204
+ _this._activePlaceVisitModel.setDelegate(null);
5205
+ }));
5407
5206
  };
5408
- return Point;
5409
- }());
5410
- if (false) {
5411
- /** @type {?} */
5412
- Point.prototype.x;
5413
- /** @type {?} */
5414
- Point.prototype.y;
5415
- }
5416
-
5417
- /**
5418
- * @fileoverview added by tsickle
5419
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5420
- */
5421
- var Bounds = /** @class */ (function (_super) {
5422
- __extends(Bounds, _super);
5423
- function Bounds(top, left, width, height) {
5424
- var _this = _super.call(this, width, height) || this;
5425
- _this.top = top;
5426
- _this.left = left;
5427
- _this.width = width;
5428
- _this.height = height;
5429
- return _this;
5430
- }
5207
+ // @Trace()
5208
+ // @Trace()
5431
5209
  /**
5432
- * @param {?} point
5433
5210
  * @return {?}
5434
5211
  */
5435
- Bounds.prototype.relativePositionOf = /**
5436
- * @param {?} point
5212
+ PlaceOutletComponent.prototype.animationStarted =
5213
+ // @Trace()
5214
+ /**
5437
5215
  * @return {?}
5438
5216
  */
5439
- function (point) {
5440
- if (point instanceof MouseEvent) {
5441
- return new Point(point.clientX - this.left, point.clientY - this.top);
5442
- }
5443
- else {
5444
- return new Point(point.x - this.left, point.y - this.top);
5217
+ function () {
5218
+ // console.log({ activePlace: this._activePlace.value });
5219
+ };
5220
+ // @Trace()
5221
+ // @Trace()
5222
+ /**
5223
+ * @return {?}
5224
+ */
5225
+ PlaceOutletComponent.prototype.animationDone =
5226
+ // @Trace()
5227
+ /**
5228
+ * @return {?}
5229
+ */
5230
+ function () {
5231
+ if (this._activePlace.value) {
5232
+ this._activePlace.value.onPlaceReady();
5445
5233
  }
5446
5234
  };
5447
- return Bounds;
5448
- }(Dimension));
5235
+ PlaceOutletComponent.decorators = [
5236
+ { type: Component, args: [{
5237
+ selector: 'aup-place-outlet',
5238
+ template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n [@.disabled]=\"!enableAnimation.value\"\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\n",
5239
+ animations: [LEFT_RIGHT_PLACE_ANIMATION],
5240
+ styles: [":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
5241
+ }] }
5242
+ ];
5243
+ /** @nocollapse */
5244
+ PlaceOutletComponent.ctorParameters = function () { return [
5245
+ { type: Router },
5246
+ { type: PlaceRouter },
5247
+ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [AUP_PLACE_CONFIG,] }] },
5248
+ { type: PlaceOutletComponent, decorators: [{ type: SkipSelf }, { type: Optional }] }
5249
+ ]; };
5250
+ PlaceOutletComponent.propDecorators = {
5251
+ animate: [{ type: Input }],
5252
+ animateModel: [{ type: Input, args: ['animateModel',] }],
5253
+ customPlaceAnimationOrderModel: [{ type: Input, args: ['placeAnimationOrderModel',] }],
5254
+ customPlaceAnimationOrder: [{ type: Input, args: ['placeAnimationOrder',] }],
5255
+ placeChanged: [{ type: Output }],
5256
+ routerOut: [{ type: ViewChild, args: ['routeOutlet', { static: true },] }]
5257
+ };
5258
+ __decorate([
5259
+ StoreInValueModel('animateModel'),
5260
+ __metadata("design:type", Boolean)
5261
+ ], PlaceOutletComponent.prototype, "animate", void 0);
5262
+ __decorate([
5263
+ UseDelegate({ defaultValue: true }),
5264
+ __metadata("design:type", ValueModel)
5265
+ ], PlaceOutletComponent.prototype, "animateModel", void 0);
5266
+ __decorate([
5267
+ UseDelegate(),
5268
+ __metadata("design:type", ListModel)
5269
+ ], PlaceOutletComponent.prototype, "customPlaceAnimationOrderModel", void 0);
5270
+ __decorate([
5271
+ StoreInListModel('customPlaceAnimationOrderModel'),
5272
+ __metadata("design:type", Array)
5273
+ ], PlaceOutletComponent.prototype, "customPlaceAnimationOrder", void 0);
5274
+ return PlaceOutletComponent;
5275
+ }(DisposableComponent));
5449
5276
  if (false) {
5450
5277
  /** @type {?} */
5451
- Bounds.prototype.top;
5278
+ PlaceOutletComponent.prototype.animate;
5452
5279
  /** @type {?} */
5453
- Bounds.prototype.left;
5280
+ PlaceOutletComponent.prototype.animateModel;
5454
5281
  /** @type {?} */
5455
- Bounds.prototype.width;
5282
+ PlaceOutletComponent.prototype.customPlaceAnimationOrderModel;
5283
+ /** @type {?} */
5284
+ PlaceOutletComponent.prototype.customPlaceAnimationOrder;
5285
+ /** @type {?} */
5286
+ PlaceOutletComponent.prototype.placeChanged;
5287
+ /** @type {?} */
5288
+ PlaceOutletComponent.prototype.routerOut;
5289
+ /**
5290
+ * @type {?}
5291
+ * @private
5292
+ */
5293
+ PlaceOutletComponent.prototype._activePlace;
5294
+ /**
5295
+ * @type {?}
5296
+ * @private
5297
+ */
5298
+ PlaceOutletComponent.prototype._previousPlace;
5299
+ /**
5300
+ * @type {?}
5301
+ * @private
5302
+ */
5303
+ PlaceOutletComponent.prototype._activePlaceVisitModel;
5304
+ /**
5305
+ * @type {?}
5306
+ * @private
5307
+ */
5308
+ PlaceOutletComponent.prototype._inOutletActivation;
5309
+ /**
5310
+ * @type {?}
5311
+ * @private
5312
+ */
5313
+ PlaceOutletComponent.prototype._inOutletDeactivation;
5314
+ /**
5315
+ * @type {?}
5316
+ * @private
5317
+ */
5318
+ PlaceOutletComponent.prototype._inOutletUpdate;
5319
+ /**
5320
+ * @type {?}
5321
+ * @private
5322
+ */
5323
+ PlaceOutletComponent.prototype._inRouteVisitUpdate;
5324
+ /**
5325
+ * @type {?}
5326
+ * @private
5327
+ */
5328
+ PlaceOutletComponent.prototype._activatedRouteModel;
5329
+ /**
5330
+ * @type {?}
5331
+ * @private
5332
+ */
5333
+ PlaceOutletComponent.prototype._placeDefinition;
5334
+ /**
5335
+ * @type {?}
5336
+ * @private
5337
+ */
5338
+ PlaceOutletComponent.prototype.parentOutletModel;
5339
+ /** @type {?} */
5340
+ PlaceOutletComponent.prototype.placeAnimationOrder;
5341
+ /**
5342
+ * @type {?}
5343
+ * @private
5344
+ */
5345
+ PlaceOutletComponent.prototype.initialPlaceIndex;
5346
+ /**
5347
+ * @type {?}
5348
+ * @private
5349
+ */
5350
+ PlaceOutletComponent.prototype.routerVisit;
5351
+ /** @type {?} */
5352
+ PlaceOutletComponent.prototype.ready;
5456
5353
  /** @type {?} */
5457
- Bounds.prototype.height;
5458
- }
5459
- (function (Bounds) {
5354
+ PlaceOutletComponent.prototype.enableAnimation;
5460
5355
  /**
5461
- * @param {?} element
5462
- * @return {?}
5356
+ * @type {?}
5357
+ * @private
5463
5358
  */
5464
- function ofElement(element) {
5465
- /** @type {?} */
5466
- var rect = element.getBoundingClientRect();
5467
- return new Bounds(rect.top, rect.left, rect.width, rect.height);
5468
- }
5469
- Bounds.ofElement = ofElement;
5470
- })(Bounds || (Bounds = {}));
5359
+ PlaceOutletComponent.prototype.router;
5360
+ /**
5361
+ * @type {?}
5362
+ * @private
5363
+ */
5364
+ PlaceOutletComponent.prototype.placeRouter;
5365
+ /** @type {?} */
5366
+ PlaceOutletComponent.prototype.placeConfig;
5367
+ }
5471
5368
 
5472
5369
  /**
5473
5370
  * @fileoverview added by tsickle
5474
5371
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5475
5372
  */
5476
- var ResizeAwareComponent = /** @class */ (function (_super) {
5477
- __extends(ResizeAwareComponent, _super);
5478
- function ResizeAwareComponent(elementRef, ngZone) {
5373
+ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
5374
+ __extends(AbstractPlaceNavigationComponent, _super);
5375
+ function AbstractPlaceNavigationComponent() {
5479
5376
  var _this = _super.call(this) || this;
5480
- _this.elementRef = elementRef;
5481
- _this.ngZone = ngZone;
5482
- _this._boundsModel = new ValueHolder(new Bounds(0, 0, 0, 0));
5377
+ var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
5378
+ _this.placeDefinitions = chain(_this.placesModel).map((/**
5379
+ * @param {?} c
5380
+ * @return {?}
5381
+ */
5382
+ function (c) { return PlaceComponent.getDefinition(c); }));
5383
+ _this.commandFactory = Command.createFactory((/**
5384
+ * @param {?} placeDefinition
5385
+ * @return {?}
5386
+ */
5387
+ function (placeDefinition) {
5388
+ _this.placeOutlet.navigate(new Visit(placeDefinition));
5389
+ }));
5390
+ _this.activePlaceDefinition = chain(_this.placeOutletModel).pullValueModel((/**
5391
+ * @param {?} o
5392
+ * @return {?}
5393
+ */
5394
+ function (o) { return o.activePlaceModel; })).pluck("placeDefinition");
5483
5395
  return _this;
5484
5396
  }
5485
5397
  /**
5398
+ * @param {?} placeDef
5486
5399
  * @return {?}
5487
5400
  */
5488
- ResizeAwareComponent.prototype.ngAfterViewInit = /**
5401
+ AbstractPlaceNavigationComponent.prototype.getNav = /**
5402
+ * @param {?} placeDef
5489
5403
  * @return {?}
5490
5404
  */
5491
- function () {
5492
- var _this = this;
5493
- this.updateBounds();
5494
- /** @type {?} */
5495
- var element = this.elementRef.nativeElement;
5405
+ function (placeDef) {
5496
5406
  /** @type {?} */
5497
- var ro = new ResizeObserver((/**
5498
- * @param {?} entries
5499
- * @param {?} observer
5500
- * @return {?}
5501
- */
5502
- function (entries, observer) {
5503
- _this.ngZone.run((/**
5407
+ var navItem = (/** @type {?} */ (placeDef.getPlaceData('nav')));
5408
+ return {
5409
+ title: (/**
5504
5410
  * @return {?}
5505
5411
  */
5506
- function () { return _this.updateBounds(); }));
5507
- }));
5508
- ro.observe(element);
5509
- this.onDispose((/**
5510
- * @return {?}
5511
- */
5512
- function () { return ro.disconnect(); }));
5412
+ function () { return navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']); }),
5413
+ tooltip: (/**
5414
+ * @return {?}
5415
+ */
5416
+ function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null); }),
5417
+ icon: (/**
5418
+ * @return {?}
5419
+ */
5420
+ function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null); })
5421
+ };
5513
5422
  };
5514
- Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
5515
- get: /**
5516
- * @return {?}
5517
- */
5518
- function () {
5519
- return this._boundsModel.readonly;
5520
- },
5521
- enumerable: true,
5522
- configurable: true
5523
- });
5524
- Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
5525
- get: /**
5526
- * @return {?}
5527
- */
5528
- function () {
5529
- return this.elementRef.nativeElement;
5530
- },
5531
- enumerable: true,
5532
- configurable: true
5533
- });
5534
- // TODO: Make this handle body scroll
5535
- // TODO: Make this handle body scroll
5536
5423
  /**
5537
- * @param {?} point
5424
+ * @param {?} place
5538
5425
  * @return {?}
5539
5426
  */
5540
- ResizeAwareComponent.prototype.relativePositionOf =
5541
- // TODO: Make this handle body scroll
5542
- /**
5543
- * @param {?} point
5427
+ AbstractPlaceNavigationComponent.prototype.isActive = /**
5428
+ * @param {?} place
5544
5429
  * @return {?}
5545
5430
  */
5546
- function (point) {
5547
- return this.bounds.relativePositionOf(point);
5431
+ function (place) {
5432
+ return this.activePlaceDefinition.query().equals(place);
5548
5433
  };
5549
- Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
5550
- get: /**
5551
- * @return {?}
5552
- */
5553
- function () {
5554
- return this._boundsModel.value;
5555
- },
5556
- enumerable: true,
5557
- configurable: true
5558
- });
5559
5434
  /**
5560
- * @private
5561
5435
  * @return {?}
5562
5436
  */
5563
- ResizeAwareComponent.prototype.updateBounds = /**
5564
- * @private
5437
+ AbstractPlaceNavigationComponent.prototype.ngOnInit = /**
5565
5438
  * @return {?}
5566
5439
  */
5567
5440
  function () {
5568
- this._boundsModel.value = Bounds.ofElement(this.nativeElement);
5569
5441
  };
5570
- return ResizeAwareComponent;
5442
+ AbstractPlaceNavigationComponent.decorators = [
5443
+ { type: Component, args: [{
5444
+ template: ''
5445
+ }] }
5446
+ ];
5447
+ /** @nocollapse */
5448
+ AbstractPlaceNavigationComponent.ctorParameters = function () { return []; };
5449
+ AbstractPlaceNavigationComponent.propDecorators = {
5450
+ places: [{ type: Input }],
5451
+ placesModel: [{ type: Input }],
5452
+ placeOutlet: [{ type: Input }],
5453
+ placeOutletModel: [{ type: Input }]
5454
+ };
5455
+ __decorate([
5456
+ StoreInListModel('placesModel'),
5457
+ __metadata("design:type", Array)
5458
+ ], AbstractPlaceNavigationComponent.prototype, "places", void 0);
5459
+ __decorate([
5460
+ UseDelegate(),
5461
+ __metadata("design:type", ListModel)
5462
+ ], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
5463
+ __decorate([
5464
+ StoreInValueModel('placeOutletModel'),
5465
+ __metadata("design:type", PlaceOutletComponent)
5466
+ ], AbstractPlaceNavigationComponent.prototype, "placeOutlet", void 0);
5467
+ __decorate([
5468
+ UseDelegate(),
5469
+ __metadata("design:type", ValueModel)
5470
+ ], AbstractPlaceNavigationComponent.prototype, "placeOutletModel", void 0);
5471
+ __decorate([
5472
+ Memoize(),
5473
+ __metadata("design:type", Function),
5474
+ __metadata("design:paramtypes", [PlaceDefinition]),
5475
+ __metadata("design:returntype", Object)
5476
+ ], AbstractPlaceNavigationComponent.prototype, "getNav", null);
5477
+ return AbstractPlaceNavigationComponent;
5571
5478
  }(DisposableComponent));
5572
5479
  if (false) {
5573
- /**
5574
- * @type {?}
5575
- * @private
5576
- */
5577
- ResizeAwareComponent.prototype._boundsModel;
5578
- /**
5579
- * @type {?}
5580
- * @protected
5581
- */
5582
- ResizeAwareComponent.prototype.elementRef;
5583
- /**
5584
- * @type {?}
5585
- * @protected
5586
- */
5587
- ResizeAwareComponent.prototype.ngZone;
5480
+ /** @type {?} */
5481
+ AbstractPlaceNavigationComponent.prototype.places;
5482
+ /** @type {?} */
5483
+ AbstractPlaceNavigationComponent.prototype.placesModel;
5484
+ /** @type {?} */
5485
+ AbstractPlaceNavigationComponent.prototype.placeOutlet;
5486
+ /** @type {?} */
5487
+ AbstractPlaceNavigationComponent.prototype.placeOutletModel;
5488
+ /** @type {?} */
5489
+ AbstractPlaceNavigationComponent.prototype.placeDefinitions;
5490
+ /** @type {?} */
5491
+ AbstractPlaceNavigationComponent.prototype.commandFactory;
5492
+ /** @type {?} */
5493
+ AbstractPlaceNavigationComponent.prototype.activePlaceDefinition;
5588
5494
  }
5589
5495
 
5590
5496
  /**
5591
5497
  * @fileoverview added by tsickle
5592
5498
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5593
5499
  */
5594
-
5595
- /**
5596
- * @fileoverview added by tsickle
5597
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5598
- */
5599
-
5600
- /**
5601
- * @fileoverview added by tsickle
5602
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5603
- */
5604
- /**
5605
- * @record
5606
- */
5607
- function Alert() { }
5608
- if (false) {
5609
- /**
5610
- * @return {?}
5611
- */
5612
- Alert.prototype.title = function () { };
5500
+ var BusyOverlayComponent = /** @class */ (function () {
5501
+ function BusyOverlayComponent() {
5502
+ }
5613
5503
  /**
5614
5504
  * @return {?}
5615
5505
  */
5616
- Alert.prototype.content = function () { };
5617
- /**
5506
+ BusyOverlayComponent.prototype.ngOnInit = /**
5618
5507
  * @return {?}
5619
5508
  */
5620
- Alert.prototype.ok = function () { };
5509
+ function () {
5510
+ };
5511
+ BusyOverlayComponent.decorators = [
5512
+ { type: Component, args: [{
5513
+ selector: 'aup-busy-overlay',
5514
+ template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
5515
+ styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
5516
+ }] }
5517
+ ];
5518
+ /** @nocollapse */
5519
+ BusyOverlayComponent.ctorParameters = function () { return []; };
5520
+ BusyOverlayComponent.propDecorators = {
5521
+ busyModel: [{ type: Input }],
5522
+ busy: [{ type: Input }]
5523
+ };
5524
+ __decorate([
5525
+ UseDelegate(),
5526
+ __metadata("design:type", ValueModel)
5527
+ ], BusyOverlayComponent.prototype, "busyModel", void 0);
5528
+ __decorate([
5529
+ StoreInValueModel('busyModel'),
5530
+ __metadata("design:type", Boolean)
5531
+ ], BusyOverlayComponent.prototype, "busy", void 0);
5532
+ return BusyOverlayComponent;
5533
+ }());
5534
+ if (false) {
5535
+ /** @type {?} */
5536
+ BusyOverlayComponent.prototype.busyModel;
5537
+ /** @type {?} */
5538
+ BusyOverlayComponent.prototype.busy;
5621
5539
  }
5622
5540
 
5623
5541
  /**
5624
5542
  * @fileoverview added by tsickle
5625
5543
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5626
5544
  */
5627
- /**
5628
- * @record
5629
- */
5630
- function Confirm() { }
5631
- if (false) {
5632
- /** @type {?|undefined} */
5633
- Confirm.prototype.destructive;
5545
+ var EmptyStateComponent = /** @class */ (function () {
5546
+ function EmptyStateComponent() {
5547
+ }
5634
5548
  /**
5635
5549
  * @return {?}
5636
5550
  */
5637
- Confirm.prototype.cancel = function () { };
5638
- }
5639
-
5640
- /**
5641
- * @fileoverview added by tsickle
5642
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5643
- */
5644
- /**
5645
- * @record
5646
- * @template R, E
5647
- */
5648
- function Result() { }
5649
- (function (Result) {
5650
- /**
5651
- * @record
5652
- * @template R, E
5551
+ EmptyStateComponent.prototype.ngOnInit = /**
5552
+ * @return {?}
5653
5553
  */
5654
- function Callback() { }
5655
- Result.Callback = Callback;
5656
- if (false) {
5657
- /** @type {?} */
5658
- Callback.prototype.then;
5659
- /** @type {?} */
5660
- Callback.prototype.catch;
5661
- }
5662
- })(Result || (Result = {}));
5554
+ function () {
5555
+ };
5556
+ EmptyStateComponent.decorators = [
5557
+ { type: Component, args: [{
5558
+ selector: 'aup-empty-state',
5559
+ template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
5560
+ styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
5561
+ }] }
5562
+ ];
5563
+ /** @nocollapse */
5564
+ EmptyStateComponent.ctorParameters = function () { return []; };
5565
+ return EmptyStateComponent;
5566
+ }());
5663
5567
 
5664
5568
  /**
5665
5569
  * @fileoverview added by tsickle
5666
5570
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5667
5571
  */
5668
- /**
5669
- * @record
5670
- * @template D, R, E
5671
- */
5672
- function ActivityOutletContext() { }
5673
- if (false) {
5674
- /** @type {?} */
5675
- ActivityOutletContext.prototype.activityClass;
5676
- /** @type {?} */
5677
- ActivityOutletContext.prototype.activityData;
5572
+ var ListPlaceNavComponent = /** @class */ (function (_super) {
5573
+ __extends(ListPlaceNavComponent, _super);
5574
+ function ListPlaceNavComponent() {
5575
+ var _this = _super.call(this) || this;
5576
+ _this.expanded = true;
5577
+ return _this;
5578
+ }
5678
5579
  /**
5679
- * @param {?} component
5680
5580
  * @return {?}
5681
5581
  */
5682
- ActivityOutletContext.prototype.componentReady = function (component) { };
5683
- }
5684
-
5685
- /**
5686
- * @fileoverview added by tsickle
5687
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5688
- */
5689
- var InteractionGuard = /** @class */ (function () {
5690
- function InteractionGuard(router, injector, interactionContext) {
5691
- this.router = router;
5692
- this.injector = injector;
5693
- this.interactionContext = interactionContext;
5694
- }
5582
+ ListPlaceNavComponent.prototype.expandMenu = /**
5583
+ * @return {?}
5584
+ */
5585
+ function () {
5586
+ this.expanded = true;
5587
+ };
5695
5588
  /**
5696
- * @param {?} route
5697
- * @param {?} state
5698
5589
  * @return {?}
5699
5590
  */
5700
- InteractionGuard.prototype.canActivate = /**
5701
- * @param {?} route
5702
- * @param {?} state
5591
+ ListPlaceNavComponent.prototype.collapseMenu = /**
5703
5592
  * @return {?}
5704
5593
  */
5705
- function (route, state) {
5706
- return true;
5594
+ function () {
5595
+ this.expanded = false;
5707
5596
  };
5708
5597
  /**
5709
- * @param {?} component
5710
- * @param {?} currentRoute
5711
- * @param {?} currentState
5712
- * @param {?=} nextState
5713
5598
  * @return {?}
5714
5599
  */
5715
- InteractionGuard.prototype.canDeactivate = /**
5716
- * @param {?} component
5717
- * @param {?} currentRoute
5718
- * @param {?} currentState
5719
- * @param {?=} nextState
5600
+ ListPlaceNavComponent.prototype.toggleMenu = /**
5720
5601
  * @return {?}
5721
5602
  */
5722
- function (component, currentRoute, currentState, nextState) {
5723
- return !this.interactionContext.isActive();
5603
+ function () {
5604
+ this.expanded = !this.expanded;
5724
5605
  };
5725
- InteractionGuard.decorators = [
5726
- { type: Injectable, args: [{
5727
- providedIn: 'root'
5728
- },] }
5606
+ ListPlaceNavComponent.decorators = [
5607
+ { type: Component, args: [{
5608
+ selector: 'aup-list-place-nav',
5609
+ template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNav(placeDefinition).tooltip()\">\n <mat-icon *ngIf=\"getNav(placeDefinition).icon()\">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n",
5610
+ styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
5611
+ }] }
5729
5612
  ];
5730
5613
  /** @nocollapse */
5731
- InteractionGuard.ctorParameters = function () { return [
5732
- { type: Router },
5733
- { type: Injector },
5734
- { type: InteractionContext }
5735
- ]; };
5736
- /** @nocollapse */ InteractionGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function InteractionGuard_Factory() { return new InteractionGuard(ɵɵinject(Router), ɵɵinject(INJECTOR), ɵɵinject(InteractionContext)); }, token: InteractionGuard, providedIn: "root" });
5737
- __decorate([
5738
- Trace(),
5739
- __metadata("design:type", Function),
5740
- __metadata("design:paramtypes", [ActivatedRouteSnapshot, RouterStateSnapshot]),
5741
- __metadata("design:returntype", Object)
5742
- ], InteractionGuard.prototype, "canActivate", null);
5743
- __decorate([
5744
- Trace(),
5745
- __metadata("design:type", Function),
5746
- __metadata("design:paramtypes", [NoopComponent, ActivatedRouteSnapshot, RouterStateSnapshot, RouterStateSnapshot]),
5747
- __metadata("design:returntype", Object)
5748
- ], InteractionGuard.prototype, "canDeactivate", null);
5749
- return InteractionGuard;
5750
- }());
5614
+ ListPlaceNavComponent.ctorParameters = function () { return []; };
5615
+ ListPlaceNavComponent.propDecorators = {
5616
+ expanded: [{ type: HostBinding, args: ['class.expanded',] }]
5617
+ };
5618
+ return ListPlaceNavComponent;
5619
+ }(AbstractPlaceNavigationComponent));
5751
5620
  if (false) {
5752
- /**
5753
- * @type {?}
5754
- * @private
5755
- */
5756
- InteractionGuard.prototype.router;
5757
- /**
5758
- * @type {?}
5759
- * @private
5760
- */
5761
- InteractionGuard.prototype.injector;
5762
- /**
5763
- * @type {?}
5764
- * @private
5765
- */
5766
- InteractionGuard.prototype.interactionContext;
5621
+ /** @type {?} */
5622
+ ListPlaceNavComponent.prototype.expanded;
5767
5623
  }
5768
5624
 
5769
5625
  /**
5770
5626
  * @fileoverview added by tsickle
5771
5627
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5772
5628
  */
5629
+ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
5630
+ __extends(TabbedPlaceNavigationComponent, _super);
5631
+ function TabbedPlaceNavigationComponent() {
5632
+ return _super.call(this) || this;
5633
+ }
5634
+ TabbedPlaceNavigationComponent.decorators = [
5635
+ { type: Component, args: [{
5636
+ selector: 'aup-tabbed-place-navigation',
5637
+ 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]=\"getNav(placeDefinition).tooltip()\">\n <mat-icon *ngIf=\"getNav(placeDefinition).icon()\">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n",
5638
+ styles: [""]
5639
+ }] }
5640
+ ];
5641
+ /** @nocollapse */
5642
+ TabbedPlaceNavigationComponent.ctorParameters = function () { return []; };
5643
+ return TabbedPlaceNavigationComponent;
5644
+ }(AbstractPlaceNavigationComponent));
5645
+
5646
+ /**
5647
+ * @fileoverview added by tsickle
5648
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5649
+ */
5650
+ var PlaceModule = /** @class */ (function () {
5651
+ function PlaceModule() {
5652
+ }
5653
+ PlaceModule.decorators = [
5654
+ { type: NgModule, args: [{
5655
+ imports: [
5656
+ CommonModule,
5657
+ BrowserAnimationsModule,
5658
+ MatProgressSpinnerModule,
5659
+ RouterModule,
5660
+ MatTabsModule,
5661
+ MatListModule,
5662
+ MatTooltipModule,
5663
+ MatIconModule,
5664
+ DirectivesModule
5665
+ ],
5666
+ declarations: [
5667
+ EmptyStateComponent,
5668
+ BusyOverlayComponent,
5669
+ PlaceOutletComponent,
5670
+ TabbedPlaceNavigationComponent,
5671
+ ListPlaceNavComponent,
5672
+ AbstractPlaceNavigationComponent,
5673
+ NoopGatewayPlace
5674
+ ],
5675
+ entryComponents: [BusyOverlayComponent],
5676
+ exports: [
5677
+ BusyOverlayComponent,
5678
+ PlaceOutletComponent,
5679
+ EmptyStateComponent,
5680
+ TabbedPlaceNavigationComponent,
5681
+ ListPlaceNavComponent,
5682
+ AbstractPlaceNavigationComponent
5683
+ ],
5684
+ providers: [
5685
+ // {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: "2000ms"}}
5686
+ ]
5687
+ },] }
5688
+ ];
5689
+ return PlaceModule;
5690
+ }());
5691
+
5692
+ /**
5693
+ * @fileoverview added by tsickle
5694
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5695
+ */
5696
+ var AngularUiPowerupsModule = /** @class */ (function () {
5697
+ function AngularUiPowerupsModule() {
5698
+ }
5699
+ AngularUiPowerupsModule.decorators = [
5700
+ { type: NgModule, args: [{
5701
+ declarations: [],
5702
+ imports: [
5703
+ CommonModule,
5704
+ BrowserAnimationsModule,
5705
+ FormsModule,
5706
+ MatInputModule,
5707
+ MatFormFieldModule,
5708
+ MatSelectModule,
5709
+ MatTabsModule,
5710
+ DirectivesModule,
5711
+ ComponentsModule,
5712
+ PlaceModule,
5713
+ InteractionModule
5714
+ ],
5715
+ exports: [
5716
+ InteractionModule,
5717
+ PlaceModule,
5718
+ DirectivesModule,
5719
+ ComponentsModule,
5720
+ NoopComponent
5721
+ ]
5722
+ },] }
5723
+ ];
5724
+ return AngularUiPowerupsModule;
5725
+ }());
5726
+
5727
+ /**
5728
+ * @fileoverview added by tsickle
5729
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5730
+ */
5731
+ /** @type {?} */
5732
+ var defaultHiddenStyleDef = style({
5733
+ opacity: 0,
5734
+ 'height': '0',
5735
+ paddingTop: '0',
5736
+ paddingBottom: '0'
5737
+ });
5738
+ /**
5739
+ * @param {?} triggerName
5740
+ * @param {?=} options
5741
+ * @return {?}
5742
+ */
5743
+ function slideDownAndUpAnimation(triggerName, options) {
5744
+ // SEE to fix this: https://github.com/angular/angular/issues/15587#issuecomment-351510501
5745
+ /** @type {?} */
5746
+ var duration = OptionsHelper.get(options).getOptional('duration', '100ms');
5747
+ /** @type {?} */
5748
+ var hiddenStyleDef = OptionsHelper.get(options).getOptional('hiddenStyleDef', defaultHiddenStyleDef);
5749
+ return trigger(triggerName, [
5750
+ transition(':enter', [hiddenStyleDef, animate('100ms')]),
5751
+ transition(':leave', [animate('100ms', hiddenStyleDef)])
5752
+ ]);
5753
+ }
5773
5754
 
5774
5755
  /**
5775
5756
  * @fileoverview added by tsickle
5776
5757
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5777
5758
  */
5759
+
5778
5760
  /**
5779
- * @record
5761
+ * @fileoverview added by tsickle
5762
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5780
5763
  */
5781
- function NavItem() { }
5764
+ var Dimension = /** @class */ (function () {
5765
+ function Dimension(width, height) {
5766
+ this.width = width;
5767
+ this.height = height;
5768
+ }
5769
+ return Dimension;
5770
+ }());
5782
5771
  if (false) {
5772
+ /** @type {?} */
5773
+ Dimension.prototype.width;
5774
+ /** @type {?} */
5775
+ Dimension.prototype.height;
5776
+ }
5777
+
5778
+ /**
5779
+ * @fileoverview added by tsickle
5780
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5781
+ */
5782
+ var Point = /** @class */ (function () {
5783
+ function Point(x, y) {
5784
+ this.x = x;
5785
+ this.y = y;
5786
+ }
5783
5787
  /**
5788
+ * @param {?} data
5784
5789
  * @return {?}
5785
5790
  */
5786
- NavItem.prototype.title = function () { };
5787
- /**
5791
+ Point.from = /**
5792
+ * @param {?} data
5788
5793
  * @return {?}
5789
5794
  */
5790
- NavItem.prototype.icon = function () { };
5795
+ function (data) {
5796
+ return new Point(data.x, data.y);
5797
+ };
5791
5798
  /**
5799
+ * @param {?} x
5800
+ * @param {?} y
5792
5801
  * @return {?}
5793
5802
  */
5794
- NavItem.prototype.tooltip = function () { };
5803
+ Point.prototype.translate = /**
5804
+ * @param {?} x
5805
+ * @param {?} y
5806
+ * @return {?}
5807
+ */
5808
+ function (x, y) {
5809
+ return new Point(this.x + x, this.y + y);
5810
+ };
5811
+ return Point;
5812
+ }());
5813
+ if (false) {
5814
+ /** @type {?} */
5815
+ Point.prototype.x;
5816
+ /** @type {?} */
5817
+ Point.prototype.y;
5795
5818
  }
5796
5819
 
5797
5820
  /**
5798
5821
  * @fileoverview added by tsickle
5799
5822
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5800
5823
  */
5801
- /**
5802
- * @param {?} options
5803
- * @return {?}
5804
- */
5805
- function Place(options) {
5806
- return (/**
5807
- * @param {?} target
5824
+ var Bounds = /** @class */ (function (_super) {
5825
+ __extends(Bounds, _super);
5826
+ function Bounds(top, left, width, height) {
5827
+ var _this = _super.call(this, width, height) || this;
5828
+ _this.top = top;
5829
+ _this.left = left;
5830
+ _this.width = width;
5831
+ _this.height = height;
5832
+ return _this;
5833
+ }
5834
+ /**
5835
+ * @param {?} point
5808
5836
  * @return {?}
5809
5837
  */
5810
- function (target) {
5811
- if (PlaceComponent.isPlaceComponentConstructor(target)) {
5812
- PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, isNil(options.authenticate) ? false : options.authenticate, options.data, PlaceComponent.getRouteParameters(target), (options.children || []).map((/**
5813
- * @param {?} c
5814
- * @return {?}
5815
- */
5816
- function (c) { return PlaceComponent.getDefinition(c); }))));
5838
+ Bounds.prototype.relativePositionOf = /**
5839
+ * @param {?} point
5840
+ * @return {?}
5841
+ */
5842
+ function (point) {
5843
+ if (point instanceof MouseEvent) {
5844
+ return new Point(point.clientX - this.left, point.clientY - this.top);
5817
5845
  }
5818
5846
  else {
5819
- lang.illegalState(target + " must extend PlaceComponent to use the @Place decorator");
5847
+ return new Point(point.x - this.left, point.y - this.top);
5820
5848
  }
5821
- });
5849
+ };
5850
+ return Bounds;
5851
+ }(Dimension));
5852
+ if (false) {
5853
+ /** @type {?} */
5854
+ Bounds.prototype.top;
5855
+ /** @type {?} */
5856
+ Bounds.prototype.left;
5857
+ /** @type {?} */
5858
+ Bounds.prototype.width;
5859
+ /** @type {?} */
5860
+ Bounds.prototype.height;
5822
5861
  }
5823
- (function (Place) {
5862
+ (function (Bounds) {
5824
5863
  /**
5825
- * @record
5864
+ * @param {?} element
5865
+ * @return {?}
5826
5866
  */
5827
- function Options() { }
5828
- Place.Options = Options;
5829
- if (false) {
5867
+ function ofElement(element) {
5830
5868
  /** @type {?} */
5831
- Options.prototype.path;
5832
- /** @type {?|undefined} */
5833
- Options.prototype.data;
5834
- /** @type {?|undefined} */
5835
- Options.prototype.authenticate;
5836
- /** @type {?|undefined} */
5837
- Options.prototype.children;
5838
- /** @type {?|undefined} */
5839
- Options.prototype.defaultChild;
5869
+ var rect = element.getBoundingClientRect();
5870
+ return new Bounds(rect.top, rect.left, rect.width, rect.height);
5840
5871
  }
5841
- })(Place || (Place = {}));
5872
+ Bounds.ofElement = ofElement;
5873
+ })(Bounds || (Bounds = {}));
5842
5874
 
5843
5875
  /**
5844
5876
  * @fileoverview added by tsickle
5845
5877
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5846
5878
  */
5847
- // WARNING: interface has both a type and a value, skipping emit
5848
- var Formatter;
5849
- (function (Formatter) {
5850
- var StringType = /** @class */ (function () {
5851
- function StringType() {
5852
- }
5853
- /**
5854
- * @param {?} value
5855
- * @return {?}
5856
- */
5857
- StringType.prototype.format = /**
5858
- * @param {?} value
5859
- * @return {?}
5860
- */
5861
- function (value) {
5862
- return value;
5863
- };
5864
- /**
5865
- * @param {?} value
5866
- * @return {?}
5867
- */
5868
- StringType.prototype.parse = /**
5869
- * @param {?} value
5870
- * @return {?}
5871
- */
5872
- function (value) {
5873
- return value;
5874
- };
5875
- return StringType;
5876
- }());
5877
- var NumberType = /** @class */ (function () {
5878
- function NumberType() {
5879
- }
5880
- /**
5881
- * @param {?} value
5882
- * @return {?}
5883
- */
5884
- NumberType.prototype.format = /**
5885
- * @param {?} value
5886
- * @return {?}
5887
- */
5888
- function (value) {
5889
- return ___default.isNumber(value) && !___default.isNaN(value) ? "" + value : null;
5890
- };
5891
- /**
5892
- * @param {?} value
5893
- * @return {?}
5894
- */
5895
- NumberType.prototype.parse = /**
5896
- * @param {?} value
5879
+ var ResizeAwareComponent = /** @class */ (function (_super) {
5880
+ __extends(ResizeAwareComponent, _super);
5881
+ function ResizeAwareComponent(elementRef, ngZone) {
5882
+ var _this = _super.call(this) || this;
5883
+ _this.elementRef = elementRef;
5884
+ _this.ngZone = ngZone;
5885
+ _this._boundsModel = new ValueHolder(new Bounds(0, 0, 0, 0));
5886
+ return _this;
5887
+ }
5888
+ /**
5889
+ * @return {?}
5890
+ */
5891
+ ResizeAwareComponent.prototype.ngAfterViewInit = /**
5892
+ * @return {?}
5893
+ */
5894
+ function () {
5895
+ var _this = this;
5896
+ this.updateBounds();
5897
+ /** @type {?} */
5898
+ var element = this.elementRef.nativeElement;
5899
+ /** @type {?} */
5900
+ var ro = new ResizeObserver((/**
5901
+ * @param {?} entries
5902
+ * @param {?} observer
5897
5903
  * @return {?}
5898
5904
  */
5899
- function (value) {
5900
- /** @type {?} */
5901
- var parsed = Number.parseFloat(value);
5902
- return ___default.isNaN(parsed) ? null : parsed;
5903
- };
5904
- return NumberType;
5905
- }());
5906
- var BooleanType = /** @class */ (function () {
5907
- function BooleanType() {
5908
- }
5909
- /**
5910
- * @param {?} value
5905
+ function (entries, observer) {
5906
+ _this.ngZone.run((/**
5907
+ * @return {?}
5908
+ */
5909
+ function () { return _this.updateBounds(); }));
5910
+ }));
5911
+ ro.observe(element);
5912
+ this.onDispose((/**
5911
5913
  * @return {?}
5912
5914
  */
5913
- BooleanType.prototype.format = /**
5914
- * @param {?} value
5915
+ function () { return ro.disconnect(); }));
5916
+ };
5917
+ Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
5918
+ get: /**
5915
5919
  * @return {?}
5916
5920
  */
5917
- function (value) {
5918
- return value ? 'true' : 'false';
5919
- };
5920
- /**
5921
- * @param {?} value
5921
+ function () {
5922
+ return this._boundsModel.readonly;
5923
+ },
5924
+ enumerable: true,
5925
+ configurable: true
5926
+ });
5927
+ Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
5928
+ get: /**
5922
5929
  * @return {?}
5923
5930
  */
5924
- BooleanType.prototype.parse = /**
5925
- * @param {?} value
5931
+ function () {
5932
+ return this.elementRef.nativeElement;
5933
+ },
5934
+ enumerable: true,
5935
+ configurable: true
5936
+ });
5937
+ // TODO: Make this handle body scroll
5938
+ // TODO: Make this handle body scroll
5939
+ /**
5940
+ * @param {?} point
5941
+ * @return {?}
5942
+ */
5943
+ ResizeAwareComponent.prototype.relativePositionOf =
5944
+ // TODO: Make this handle body scroll
5945
+ /**
5946
+ * @param {?} point
5947
+ * @return {?}
5948
+ */
5949
+ function (point) {
5950
+ return this.bounds.relativePositionOf(point);
5951
+ };
5952
+ Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
5953
+ get: /**
5926
5954
  * @return {?}
5927
5955
  */
5928
- function (value) {
5929
- return value === 'true';
5930
- };
5931
- return BooleanType;
5932
- }());
5933
- Formatter.STRING = new StringType();
5934
- Formatter.NUMBER = new NumberType();
5935
- Formatter.BOOLEAN = new BooleanType();
5936
- })(Formatter || (Formatter = {}));
5956
+ function () {
5957
+ return this._boundsModel.value;
5958
+ },
5959
+ enumerable: true,
5960
+ configurable: true
5961
+ });
5962
+ /**
5963
+ * @private
5964
+ * @return {?}
5965
+ */
5966
+ ResizeAwareComponent.prototype.updateBounds = /**
5967
+ * @private
5968
+ * @return {?}
5969
+ */
5970
+ function () {
5971
+ this._boundsModel.value = Bounds.ofElement(this.nativeElement);
5972
+ };
5973
+ return ResizeAwareComponent;
5974
+ }(DisposableComponent));
5975
+ if (false) {
5976
+ /**
5977
+ * @type {?}
5978
+ * @private
5979
+ */
5980
+ ResizeAwareComponent.prototype._boundsModel;
5981
+ /**
5982
+ * @type {?}
5983
+ * @protected
5984
+ */
5985
+ ResizeAwareComponent.prototype.elementRef;
5986
+ /**
5987
+ * @type {?}
5988
+ * @protected
5989
+ */
5990
+ ResizeAwareComponent.prototype.ngZone;
5991
+ }
5937
5992
 
5938
5993
  /**
5939
5994
  * @fileoverview added by tsickle
5940
5995
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5941
5996
  */
5997
+
5942
5998
  /**
5943
- * @record
5999
+ * @fileoverview added by tsickle
6000
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6001
+ */
6002
+
6003
+ /**
6004
+ * @fileoverview added by tsickle
6005
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5944
6006
  */
5945
- function JsonArray() { }
5946
6007
  /**
5947
6008
  * @record
5948
6009
  */
5949
- function JsonMap() { }
6010
+ function Alert() { }
6011
+ if (false) {
6012
+ /**
6013
+ * @return {?}
6014
+ */
6015
+ Alert.prototype.title = function () { };
6016
+ /**
6017
+ * @return {?}
6018
+ */
6019
+ Alert.prototype.content = function () { };
6020
+ /**
6021
+ * @return {?}
6022
+ */
6023
+ Alert.prototype.ok = function () { };
6024
+ }
5950
6025
 
5951
6026
  /**
5952
6027
  * @fileoverview added by tsickle
@@ -5954,131 +6029,150 @@ function JsonMap() { }
5954
6029
  */
5955
6030
  /**
5956
6031
  * @record
5957
- * @template T
5958
6032
  */
5959
- function RouteIdOptions() { }
6033
+ function Confirm() { }
5960
6034
  if (false) {
5961
6035
  /** @type {?|undefined} */
5962
- RouteIdOptions.prototype.as;
5963
- /** @type {?|undefined} */
5964
- RouteIdOptions.prototype.optional;
5965
- /** @type {?|undefined} */
5966
- RouteIdOptions.prototype.remember;
5967
- /** @type {?|undefined} */
5968
- RouteIdOptions.prototype.defaultValue;
6036
+ Confirm.prototype.destructive;
6037
+ /**
6038
+ * @return {?}
6039
+ */
6040
+ Confirm.prototype.cancel = function () { };
5969
6041
  }
6042
+
6043
+ /**
6044
+ * @fileoverview added by tsickle
6045
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6046
+ */
5970
6047
  /**
5971
6048
  * @record
5972
- * @template T
6049
+ * @template R, E
6050
+ */
6051
+ function Result() { }
6052
+ (function (Result) {
6053
+ /**
6054
+ * @record
6055
+ * @template R, E
6056
+ */
6057
+ function Callback() { }
6058
+ Result.Callback = Callback;
6059
+ if (false) {
6060
+ /** @type {?} */
6061
+ Callback.prototype.then;
6062
+ /** @type {?} */
6063
+ Callback.prototype.catch;
6064
+ }
6065
+ })(Result || (Result = {}));
6066
+
6067
+ /**
6068
+ * @fileoverview added by tsickle
6069
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5973
6070
  */
5974
- function RouteParameterOptions() { }
5975
- if (false) {
5976
- /** @type {?|undefined} */
5977
- RouteParameterOptions.prototype.as;
5978
- /** @type {?|undefined} */
5979
- RouteParameterOptions.prototype.optional;
5980
- /** @type {?|undefined} */
5981
- RouteParameterOptions.prototype.remember;
5982
- /** @type {?|undefined} */
5983
- RouteParameterOptions.prototype.defaultValue;
5984
- /** @type {?|undefined} */
5985
- RouteParameterOptions.prototype.storeInUrl;
5986
- }
5987
6071
  /**
5988
6072
  * @record
5989
- * @template T
6073
+ * @template D, R, E
5990
6074
  */
5991
- function RouteListParameterOptions() { }
6075
+ function ActivityOutletContext() { }
5992
6076
  if (false) {
5993
- /** @type {?|undefined} */
5994
- RouteListParameterOptions.prototype.as;
5995
- /** @type {?|undefined} */
5996
- RouteListParameterOptions.prototype.optional;
5997
- /** @type {?|undefined} */
5998
- RouteListParameterOptions.prototype.remember;
5999
- /** @type {?|undefined} */
6000
- RouteListParameterOptions.prototype.defaultValue;
6001
- /** @type {?|undefined} */
6002
- RouteListParameterOptions.prototype.storeInUrl;
6077
+ /** @type {?} */
6078
+ ActivityOutletContext.prototype.activityClass;
6079
+ /** @type {?} */
6080
+ ActivityOutletContext.prototype.activityData;
6081
+ /**
6082
+ * @param {?} component
6083
+ * @return {?}
6084
+ */
6085
+ ActivityOutletContext.prototype.componentReady = function (component) { };
6003
6086
  }
6087
+
6004
6088
  /**
6005
- * @template T
6006
- * @param {?} type
6007
- * @param {?=} options
6008
- * @return {?}
6089
+ * @fileoverview added by tsickle
6090
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6009
6091
  */
6010
- function RouteId(type, options) {
6011
- return (/**
6012
- * @param {?} prototype
6013
- * @param {?} propertyKey
6092
+ var InteractionGuard = /** @class */ (function () {
6093
+ function InteractionGuard(router, injector, interactionContext) {
6094
+ this.router = router;
6095
+ this.injector = injector;
6096
+ this.interactionContext = interactionContext;
6097
+ }
6098
+ /**
6099
+ * @param {?} route
6100
+ * @param {?} state
6101
+ * @return {?}
6102
+ */
6103
+ InteractionGuard.prototype.canActivate = /**
6104
+ * @param {?} route
6105
+ * @param {?} state
6106
+ * @return {?}
6107
+ */
6108
+ function (route, state) {
6109
+ return true;
6110
+ };
6111
+ /**
6112
+ * @param {?} component
6113
+ * @param {?} currentRoute
6114
+ * @param {?} currentState
6115
+ * @param {?=} nextState
6014
6116
  * @return {?}
6015
6117
  */
6016
- function (prototype, propertyKey) {
6017
- /** @type {?} */
6018
- var param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);
6019
- Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
6020
- UseDelegate()(prototype, propertyKey);
6021
- });
6022
- }
6023
- /**
6024
- * @template T
6025
- * @param {?=} options
6026
- * @return {?}
6027
- */
6028
- function VisitParameter(options) {
6029
- /** @type {?} */
6030
- var opts = Opts.get(options);
6031
- return (/**
6032
- * @param {?} prototype
6033
- * @param {?} propertyKey
6034
- * @return {?}
6118
+ InteractionGuard.prototype.canDeactivate = /**
6119
+ * @param {?} component
6120
+ * @param {?} currentRoute
6121
+ * @param {?} currentState
6122
+ * @param {?=} nextState
6123
+ * @return {?}
6124
+ */
6125
+ function (component, currentRoute, currentState, nextState) {
6126
+ return !this.interactionContext.isActive();
6127
+ };
6128
+ InteractionGuard.decorators = [
6129
+ { type: Injectable, args: [{
6130
+ providedIn: 'root'
6131
+ },] }
6132
+ ];
6133
+ /** @nocollapse */
6134
+ InteractionGuard.ctorParameters = function () { return [
6135
+ { type: Router },
6136
+ { type: Injector },
6137
+ { type: InteractionContext }
6138
+ ]; };
6139
+ /** @nocollapse */ InteractionGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function InteractionGuard_Factory() { return new InteractionGuard(ɵɵinject(Router), ɵɵinject(INJECTOR), ɵɵinject(InteractionContext)); }, token: InteractionGuard, providedIn: "root" });
6140
+ __decorate([
6141
+ Trace(),
6142
+ __metadata("design:type", Function),
6143
+ __metadata("design:paramtypes", [ActivatedRouteSnapshot, RouterStateSnapshot]),
6144
+ __metadata("design:returntype", Object)
6145
+ ], InteractionGuard.prototype, "canActivate", null);
6146
+ __decorate([
6147
+ Trace(),
6148
+ __metadata("design:type", Function),
6149
+ __metadata("design:paramtypes", [NoopComponent, ActivatedRouteSnapshot, RouterStateSnapshot, RouterStateSnapshot]),
6150
+ __metadata("design:returntype", Object)
6151
+ ], InteractionGuard.prototype, "canDeactivate", null);
6152
+ return InteractionGuard;
6153
+ }());
6154
+ if (false) {
6155
+ /**
6156
+ * @type {?}
6157
+ * @private
6158
+ */
6159
+ InteractionGuard.prototype.router;
6160
+ /**
6161
+ * @type {?}
6162
+ * @private
6035
6163
  */
6036
- function (prototype, propertyKey) {
6037
- /** @type {?} */
6038
- var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
6039
- Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
6040
- UseDelegate()(prototype, propertyKey);
6041
- });
6042
- }
6043
- /**
6044
- * @template E
6045
- * @param {?=} options
6046
- * @return {?}
6047
- */
6048
- function VisitParameterList(options) {
6049
- /** @type {?} */
6050
- var opts = Opts.get(options);
6051
- return (/**
6052
- * @param {?} prototype
6053
- * @param {?} propertyKey
6054
- * @return {?}
6164
+ InteractionGuard.prototype.injector;
6165
+ /**
6166
+ * @type {?}
6167
+ * @private
6055
6168
  */
6056
- function (prototype, propertyKey) {
6057
- /** @type {?} */
6058
- var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
6059
- Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
6060
- UseDelegate()(prototype, propertyKey);
6061
- });
6169
+ InteractionGuard.prototype.interactionContext;
6062
6170
  }
6063
6171
 
6064
6172
  /**
6065
6173
  * @fileoverview added by tsickle
6066
6174
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6067
6175
  */
6068
- /**
6069
- * @record
6070
- * @template S
6071
- */
6072
- function ParameterSanitiser() { }
6073
- if (false) {
6074
- /**
6075
- * @param {?} parameterValue
6076
- * @param {?=} visit
6077
- * @param {?=} injector
6078
- * @return {?}
6079
- */
6080
- ParameterSanitiser.prototype.sanitise = function (parameterValue, visit, injector) { };
6081
- }
6082
6176
 
6083
6177
  /**
6084
6178
  * @fileoverview added by tsickle
@@ -6086,18 +6180,21 @@ if (false) {
6086
6180
  */
6087
6181
  /**
6088
6182
  * @record
6089
- * @template T
6090
6183
  */
6091
- function ParameterSnapshot() { }
6184
+ function NavItem() { }
6092
6185
  if (false) {
6093
- /** @type {?} */
6094
- ParameterSnapshot.prototype.definition;
6095
- /** @type {?} */
6096
- ParameterSnapshot.prototype.value;
6097
6186
  /**
6098
6187
  * @return {?}
6099
6188
  */
6100
- ParameterSnapshot.prototype.isMissing = function () { };
6189
+ NavItem.prototype.title = function () { };
6190
+ /**
6191
+ * @return {?}
6192
+ */
6193
+ NavItem.prototype.icon = function () { };
6194
+ /**
6195
+ * @return {?}
6196
+ */
6197
+ NavItem.prototype.tooltip = function () { };
6101
6198
  }
6102
6199
 
6103
6200
  /**
@@ -6201,8 +6298,14 @@ if (false) {
6201
6298
  * @fileoverview added by tsickle
6202
6299
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6203
6300
  */
6204
- var EnterPlaceGuard = /** @class */ (function () {
6205
- function EnterPlaceGuard(router, urlSerializer, placeRouter, placeHistory, injector) {
6301
+ /**
6302
+ * @abstract
6303
+ */
6304
+ var /**
6305
+ * @abstract
6306
+ */
6307
+ AbstractEnterPlaceGuard = /** @class */ (function () {
6308
+ function AbstractEnterPlaceGuard(router, urlSerializer, placeRouter, placeHistory, injector) {
6206
6309
  this.router = router;
6207
6310
  this.urlSerializer = urlSerializer;
6208
6311
  this.placeRouter = placeRouter;
@@ -6216,7 +6319,7 @@ var EnterPlaceGuard = /** @class */ (function () {
6216
6319
  * @param {?} state
6217
6320
  * @return {?}
6218
6321
  */
6219
- EnterPlaceGuard.prototype.canActivate =
6322
+ AbstractEnterPlaceGuard.prototype.canActivate =
6220
6323
  // @Trace()
6221
6324
  /**
6222
6325
  * @param {?} activatedRoute
@@ -6225,85 +6328,177 @@ var EnterPlaceGuard = /** @class */ (function () {
6225
6328
  */
6226
6329
  function (activatedRoute, state) {
6227
6330
  return __awaiter(this, void 0, void 0, function () {
6228
- var placeDefinition, params, parsedParams, initialVisit, sanitiser, sanitisedVisit, commands;
6331
+ var _this = this;
6229
6332
  return __generator(this, function (_a) {
6230
- switch (_a.label) {
6333
+ return [2 /*return*/, this.interceptInitialRouteOtherwise(activatedRoute, state, (/**
6334
+ * @return {?}
6335
+ */
6336
+ function () {
6337
+ return _this.authorisePlaceThen(activatedRoute, state, (/**
6338
+ * @param {?} placeDefinition
6339
+ * @return {?}
6340
+ */
6341
+ function (placeDefinition) { return __awaiter(_this, void 0, void 0, function () {
6342
+ var params, parsedParams, initialVisit, sanitiser, sanitisedVisit, commands;
6343
+ return __generator(this, function (_a) {
6344
+ switch (_a.label) {
6345
+ case 0:
6346
+ // Parse our route params.
6347
+ params = new AbstractEnterPlaceGuard.ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);
6348
+ parsedParams = placeDefinition.parseRouteParams(params);
6349
+ initialVisit = this.placeRouter.navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);
6350
+ sanitiser = new VisitSanitiser(activatedRoute, this.router, this.placeHistory, this.injector);
6351
+ return [4 /*yield*/, sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams))];
6352
+ case 1:
6353
+ sanitisedVisit = _a.sent();
6354
+ // Save the visit with any updated parameters. We need to save it so we remember any non route parameters
6355
+ this.placeRouter.navigationSession.storeVisit(sanitisedVisit);
6356
+ if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
6357
+ // Regenerate the url
6358
+ commands = this.placeRouter.parseUrl(state).createRedirectCommandsFor(sanitisedVisit);
6359
+ console.log('##### Place Guard Redirect', commands);
6360
+ return [2 /*return*/, this.router.createUrlTree(commands, {
6361
+ replaceUrl: true,
6362
+ skipLocationChange: false
6363
+ })];
6364
+ }
6365
+ else {
6366
+ return [2 /*return*/, true];
6367
+ }
6368
+ return [2 /*return*/];
6369
+ }
6370
+ });
6371
+ }); }));
6372
+ }))];
6373
+ });
6374
+ });
6375
+ };
6376
+ /**
6377
+ * @protected
6378
+ * @param {?} activatedRoute
6379
+ * @param {?} state
6380
+ * @param {?} canActivate
6381
+ * @return {?}
6382
+ */
6383
+ AbstractEnterPlaceGuard.prototype.authorisePlaceThen = /**
6384
+ * @protected
6385
+ * @param {?} activatedRoute
6386
+ * @param {?} state
6387
+ * @param {?} canActivate
6388
+ * @return {?}
6389
+ */
6390
+ function (activatedRoute, state, canActivate) {
6391
+ return __awaiter(this, void 0, void 0, function () {
6392
+ var placeDefinition, authorised, _a;
6393
+ return __generator(this, function (_b) {
6394
+ switch (_b.label) {
6231
6395
  case 0:
6232
- if (!PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) return [3 /*break*/, 2];
6396
+ if (!PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) return [3 /*break*/, 4];
6233
6397
  placeDefinition = PlaceComponent.getDefinition(activatedRoute.component);
6234
- // Parse our route params.
6235
- params = new EnterPlaceGuard.ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);
6236
- parsedParams = placeDefinition.parseRouteParams(params);
6237
- initialVisit = this.placeRouter.navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);
6238
- sanitiser = new VisitSanitiser(activatedRoute, this.router, this.placeHistory, this.injector);
6239
- return [4 /*yield*/, sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams))];
6398
+ if (!placeDefinition.authenticate) return [3 /*break*/, 2];
6399
+ return [4 /*yield*/, this.isAuthorised(activatedRoute, state)];
6240
6400
  case 1:
6241
- sanitisedVisit = _a.sent();
6242
- // Save the visit with any updated parameters. We need to save it so we remember any non route parameters
6243
- this.placeRouter.navigationSession.storeVisit(sanitisedVisit);
6244
- if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
6245
- // Regenerate the url
6246
- commands = this.placeRouter.parseUrl(state).createRedirectCommandsFor(sanitisedVisit);
6247
- console.log('##### Place Guard Redirect', commands);
6248
- return [2 /*return*/, this.router.createUrlTree(commands, {
6249
- replaceUrl: true,
6250
- skipLocationChange: false
6251
- })];
6252
- }
6253
- else {
6254
- return [2 /*return*/, true];
6255
- }
6401
+ _a = _b.sent();
6256
6402
  return [3 /*break*/, 3];
6257
- case 2: return [2 /*return*/, lang.illegalState("expected component to be an instance of PlaceComponent, got " + activatedRoute.component)];
6258
- case 3: return [2 /*return*/];
6403
+ case 2:
6404
+ _a = true;
6405
+ _b.label = 3;
6406
+ case 3:
6407
+ authorised = _a;
6408
+ return [2 /*return*/, authorised === true ? canActivate(placeDefinition) : authorised];
6409
+ case 4: return [2 /*return*/, lang.illegalState("expected component to be an instance of PlaceComponent, got " + activatedRoute.component)];
6259
6410
  }
6260
6411
  });
6261
6412
  });
6262
6413
  };
6263
- EnterPlaceGuard.decorators = [
6264
- { type: Injectable, args: [{
6265
- providedIn: 'root'
6266
- },] }
6267
- ];
6268
- /** @nocollapse */
6269
- EnterPlaceGuard.ctorParameters = function () { return [
6270
- { type: Router },
6271
- { type: UrlSerializer },
6272
- { type: PlaceRouter },
6273
- { type: PlaceHistory },
6274
- { type: Injector }
6275
- ]; };
6276
- /** @nocollapse */ EnterPlaceGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function EnterPlaceGuard_Factory() { return new EnterPlaceGuard(ɵɵinject(Router), ɵɵinject(UrlSerializer), ɵɵinject(PlaceRouter), ɵɵinject(PlaceHistory), ɵɵinject(INJECTOR)); }, token: EnterPlaceGuard, providedIn: "root" });
6277
- return EnterPlaceGuard;
6414
+ /**
6415
+ * @protected
6416
+ * @param {?} activatedRoute
6417
+ * @param {?} state
6418
+ * @param {?} canActivate
6419
+ * @return {?}
6420
+ */
6421
+ AbstractEnterPlaceGuard.prototype.interceptInitialRouteOtherwise = /**
6422
+ * @protected
6423
+ * @param {?} activatedRoute
6424
+ * @param {?} state
6425
+ * @param {?} canActivate
6426
+ * @return {?}
6427
+ */
6428
+ function (activatedRoute, state, canActivate) {
6429
+ return __awaiter(this, void 0, void 0, function () {
6430
+ return __generator(this, function (_a) {
6431
+ // TODO: this all only sort of works. Opening dialogs and clicking back multiple times breaks things.
6432
+ // TODO: next stage is to investigate tracking dialog state in a different placeoutlet and keeping those
6433
+ // TODO: urls out of the history.
6434
+ if (this.placeRouter.isInitialNavigation()) {
6435
+ // This is the very first entry into our app so we redirect to a dummy place so we can get bump our
6436
+ // history by one. This ensures that we can capture back button presses on the initial page without
6437
+ // leaving our app.
6438
+ return [2 /*return*/, this.placeRouter.performInitialNavigationIntercept(activatedRoute, state)];
6439
+ }
6440
+ else {
6441
+ return [2 /*return*/, canActivate()];
6442
+ }
6443
+ return [2 /*return*/];
6444
+ });
6445
+ });
6446
+ };
6447
+ /**
6448
+ * @param {?} activatedRoute
6449
+ * @param {?} state
6450
+ * @return {?}
6451
+ */
6452
+ AbstractEnterPlaceGuard.prototype.isAuthorised = /**
6453
+ * @param {?} activatedRoute
6454
+ * @param {?} state
6455
+ * @return {?}
6456
+ */
6457
+ function (activatedRoute, state) {
6458
+ return __awaiter(this, void 0, void 0, function () {
6459
+ var authorised;
6460
+ return __generator(this, function (_a) {
6461
+ authorised = this.getAuthGuard(this.injector).canActivate(activatedRoute, state);
6462
+ return [2 /*return*/, (authorised instanceof Observable) ? authorised.toPromise() : authorised];
6463
+ });
6464
+ });
6465
+ };
6466
+ return AbstractEnterPlaceGuard;
6278
6467
  }());
6279
6468
  if (false) {
6280
6469
  /**
6281
6470
  * @type {?}
6282
6471
  * @private
6283
6472
  */
6284
- EnterPlaceGuard.prototype.router;
6473
+ AbstractEnterPlaceGuard.prototype.router;
6285
6474
  /**
6286
6475
  * @type {?}
6287
6476
  * @private
6288
6477
  */
6289
- EnterPlaceGuard.prototype.urlSerializer;
6478
+ AbstractEnterPlaceGuard.prototype.urlSerializer;
6290
6479
  /**
6291
6480
  * @type {?}
6292
6481
  * @private
6293
6482
  */
6294
- EnterPlaceGuard.prototype.placeRouter;
6483
+ AbstractEnterPlaceGuard.prototype.placeRouter;
6295
6484
  /**
6296
6485
  * @type {?}
6297
6486
  * @private
6298
6487
  */
6299
- EnterPlaceGuard.prototype.placeHistory;
6488
+ AbstractEnterPlaceGuard.prototype.placeHistory;
6300
6489
  /**
6301
6490
  * @type {?}
6302
6491
  * @private
6303
6492
  */
6304
- EnterPlaceGuard.prototype.injector;
6493
+ AbstractEnterPlaceGuard.prototype.injector;
6494
+ /**
6495
+ * @abstract
6496
+ * @param {?} injector
6497
+ * @return {?}
6498
+ */
6499
+ AbstractEnterPlaceGuard.prototype.getAuthGuard = function (injector) { };
6305
6500
  }
6306
- (function (EnterPlaceGuard) {
6501
+ (function (AbstractEnterPlaceGuard) {
6307
6502
  /**
6308
6503
  * This a work around for the fact that an activated route with multiple segments doesn't
6309
6504
  * include the segment params in the paramMap as well as each segment returns an empty
@@ -6392,7 +6587,7 @@ if (false) {
6392
6587
  ], ConsolidatedParameterMap.prototype, "keys", null);
6393
6588
  return ConsolidatedParameterMap;
6394
6589
  }());
6395
- EnterPlaceGuard.ConsolidatedParameterMap = ConsolidatedParameterMap;
6590
+ AbstractEnterPlaceGuard.ConsolidatedParameterMap = ConsolidatedParameterMap;
6396
6591
  if (false) {
6397
6592
  /**
6398
6593
  * @type {?}
@@ -6458,7 +6653,7 @@ if (false) {
6458
6653
  */
6459
6654
  ParamMapAdapter.prototype.params;
6460
6655
  }
6461
- })(EnterPlaceGuard || (EnterPlaceGuard = {}));
6656
+ })(AbstractEnterPlaceGuard || (AbstractEnterPlaceGuard = {}));
6462
6657
 
6463
6658
  /**
6464
6659
  * @fileoverview added by tsickle
@@ -6509,6 +6704,93 @@ if (false) {
6509
6704
  LeavePlaceGuard.prototype.placeRouter;
6510
6705
  }
6511
6706
 
6707
+ /**
6708
+ * @fileoverview added by tsickle
6709
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6710
+ */
6711
+ var NoopAuthGuard = /** @class */ (function () {
6712
+ function NoopAuthGuard() {
6713
+ }
6714
+ /**
6715
+ * @param {?} activatedRoute
6716
+ * @param {?} state
6717
+ * @return {?}
6718
+ */
6719
+ NoopAuthGuard.prototype.canActivate = /**
6720
+ * @param {?} activatedRoute
6721
+ * @param {?} state
6722
+ * @return {?}
6723
+ */
6724
+ function (activatedRoute, state) {
6725
+ return __awaiter(this, void 0, void 0, function () {
6726
+ return __generator(this, function (_a) {
6727
+ return [2 /*return*/, true];
6728
+ });
6729
+ });
6730
+ };
6731
+ NoopAuthGuard.decorators = [
6732
+ { type: Injectable, args: [{
6733
+ providedIn: 'root'
6734
+ },] }
6735
+ ];
6736
+ /** @nocollapse */
6737
+ NoopAuthGuard.ctorParameters = function () { return []; };
6738
+ /** @nocollapse */ NoopAuthGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function NoopAuthGuard_Factory() { return new NoopAuthGuard(); }, token: NoopAuthGuard, providedIn: "root" });
6739
+ return NoopAuthGuard;
6740
+ }());
6741
+
6742
+ /**
6743
+ * @fileoverview added by tsickle
6744
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6745
+ */
6746
+ /**
6747
+ * @record
6748
+ */
6749
+ function JsonArray() { }
6750
+ /**
6751
+ * @record
6752
+ */
6753
+ function JsonMap() { }
6754
+
6755
+ /**
6756
+ * @fileoverview added by tsickle
6757
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6758
+ */
6759
+ /**
6760
+ * @record
6761
+ * @template S
6762
+ */
6763
+ function ParameterSanitiser() { }
6764
+ if (false) {
6765
+ /**
6766
+ * @param {?} parameterValue
6767
+ * @param {?=} visit
6768
+ * @param {?=} injector
6769
+ * @return {?}
6770
+ */
6771
+ ParameterSanitiser.prototype.sanitise = function (parameterValue, visit, injector) { };
6772
+ }
6773
+
6774
+ /**
6775
+ * @fileoverview added by tsickle
6776
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6777
+ */
6778
+ /**
6779
+ * @record
6780
+ * @template T
6781
+ */
6782
+ function ParameterSnapshot() { }
6783
+ if (false) {
6784
+ /** @type {?} */
6785
+ ParameterSnapshot.prototype.definition;
6786
+ /** @type {?} */
6787
+ ParameterSnapshot.prototype.value;
6788
+ /**
6789
+ * @return {?}
6790
+ */
6791
+ ParameterSnapshot.prototype.isMissing = function () { };
6792
+ }
6793
+
6512
6794
  /**
6513
6795
  * @fileoverview added by tsickle
6514
6796
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -6529,5 +6811,5 @@ if (false) {
6529
6811
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
6530
6812
  */
6531
6813
 
6532
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, Activity, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionService, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnterPlaceGuard, FocusBindingDirective, Formatter, InplaceInteractionContextComponent, InteractionContext, InteractionGuard, InteractionModule, InteractionOutletComponent, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NavigationSession, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, leftRightPlaceAnimation, slideDownAndUpAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, InteractionModule as ɵba, ActivityContainerComponent as ɵbb, ActivityOutletComponent as ɵbc, ConfirmationDialogComponent as ɵbd, AbstractActivity as ɵbe, ACTIVITY_DATA as ɵbf, Activity as ɵbg, ConfirmThenDialogComponent as ɵbi, AlertDialogComponent as ɵbj, InteractionOutletComponent as ɵbl, InplaceInteractionContextComponent as ɵbm, DIALOG_INTERACTION_SERVICE_DEFAULTS as ɵbn, DialogInteractionService as ɵbo, FocusBindingDirective as ɵc, DisposableComponent as ɵd, ComponentsModule as ɵe, NumberInputComponent as ɵf, AbstractInputComponent as ɵg, StringInputComponent as ɵh, PasswordInputComponent as ɵi, SelectInputComponent as ɵj, NoopComponent as ɵk, PlaceModule as ɵl, EmptyStateComponent as ɵm, BusyOverlayComponent as ɵn, PlaceOutletComponent as ɵo, leftRightPlaceAnimation as ɵp, LEFT_RIGHT_PLACE_ANIMATION as ɵq, AUP_PLACE_CONFIG as ɵr, PlaceRouter as ɵt, NavigationSession as ɵu, InteractionContext as ɵv, PlaceHistory as ɵw, TabbedPlaceNavigationComponent as ɵx, AbstractPlaceNavigationComponent as ɵy, ListPlaceNavComponent as ɵz };
6814
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractActivity, AbstractEnterPlaceGuard, AbstractInputComponent, AbstractPlaceNavigationComponent, Activity, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionService, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, FocusBindingDirective, Formatter, InplaceInteractionContextComponent, InteractionContext, InteractionGuard, InteractionModule, InteractionOutletComponent, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NavigationSession, NoopAuthGuard, NoopComponent, NoopGatewayPlace, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, leftRightPlaceAnimation, slideDownAndUpAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, PlaceComponent as ɵba, Place as ɵbb, VisitParameter as ɵbc, Formatter as ɵbd, InteractionModule as ɵbe, ActivityContainerComponent as ɵbf, ActivityOutletComponent as ɵbg, ConfirmationDialogComponent as ɵbh, AbstractActivity as ɵbi, ACTIVITY_DATA as ɵbj, Activity as ɵbk, ConfirmThenDialogComponent as ɵbm, AlertDialogComponent as ɵbn, InteractionOutletComponent as ɵbp, InplaceInteractionContextComponent as ɵbq, DIALOG_INTERACTION_SERVICE_DEFAULTS as ɵbr, DialogInteractionService as ɵbs, FocusBindingDirective as ɵc, DisposableComponent as ɵd, ComponentsModule as ɵe, NumberInputComponent as ɵf, AbstractInputComponent as ɵg, StringInputComponent as ɵh, PasswordInputComponent as ɵi, SelectInputComponent as ɵj, NoopComponent as ɵk, PlaceModule as ɵl, EmptyStateComponent as ɵm, BusyOverlayComponent as ɵn, PlaceOutletComponent as ɵo, leftRightPlaceAnimation as ɵp, LEFT_RIGHT_PLACE_ANIMATION as ɵq, AUP_PLACE_CONFIG as ɵr, PlaceRouter as ɵt, InteractionContext as ɵu, PlaceHistory as ɵv, TabbedPlaceNavigationComponent as ɵw, AbstractPlaceNavigationComponent as ɵx, ListPlaceNavComponent as ɵy, NoopGatewayPlace as ɵz };
6533
6815
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map