@coolon/angular-ui-powerups 0.0.69 → 0.0.70

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.
@@ -3815,7 +3815,7 @@ var PlaceRouter = /** @class */ (function (_super) {
3815
3815
  [def.getFormattedRouteId(next), def.getFormattedRouteParameters(next)] :
3816
3816
  [def.getFormattedRouteParameters(next)];
3817
3817
  /** @type {?} */
3818
- var commands = [relativePath].concat(params, _this.getChildPath(activatedRoute.snapshot));
3818
+ var commands = [relativePath].concat(params, _this.extractChildPath(activatedRoute.snapshot));
3819
3819
  console.log('### Redirect', commands);
3820
3820
  return router.navigate(commands, {
3821
3821
  relativeTo: activatedRoute
@@ -3853,7 +3853,6 @@ var PlaceRouter = /** @class */ (function (_super) {
3853
3853
  return [3 /*break*/, 5];
3854
3854
  case 3:
3855
3855
  def = visit.placeDefinition;
3856
- // @see https://coolon.atlassian.net/browse/AUP-41
3857
3856
  parameterCommands = visit.hasRouteId() ?
3858
3857
  [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
3859
3858
  [def.getFormattedRouteParameters(visit)];
@@ -3934,7 +3933,7 @@ var PlaceRouter = /** @class */ (function (_super) {
3934
3933
  * @param {?} activatedRoute
3935
3934
  * @return {?}
3936
3935
  */
3937
- PlaceRouter.prototype.getChildPath = /**
3936
+ PlaceRouter.prototype.extractChildPath = /**
3938
3937
  * @param {?} activatedRoute
3939
3938
  * @return {?}
3940
3939
  */
@@ -5128,6 +5127,8 @@ function RouteId(type, options) {
5128
5127
  * @return {?}
5129
5128
  */
5130
5129
  function VisitParameter(options) {
5130
+ /** @type {?} */
5131
+ var opts = Opts.get(options);
5131
5132
  return (/**
5132
5133
  * @param {?} prototype
5133
5134
  * @param {?} propertyKey
@@ -5135,7 +5136,7 @@ function VisitParameter(options) {
5135
5136
  */
5136
5137
  function (prototype, propertyKey) {
5137
5138
  /** @type {?} */
5138
- var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, options.storeInUrl);
5139
+ var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
5139
5140
  Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
5140
5141
  UseDelegate()(prototype, propertyKey);
5141
5142
  });
@@ -5146,6 +5147,8 @@ function VisitParameter(options) {
5146
5147
  * @return {?}
5147
5148
  */
5148
5149
  function VisitParameterList(options) {
5150
+ /** @type {?} */
5151
+ var opts = Opts.get(options);
5149
5152
  return (/**
5150
5153
  * @param {?} prototype
5151
5154
  * @param {?} propertyKey
@@ -5153,7 +5156,7 @@ function VisitParameterList(options) {
5153
5156
  */
5154
5157
  function (prototype, propertyKey) {
5155
5158
  /** @type {?} */
5156
- var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, options.storeInUrl);
5159
+ var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
5157
5160
  Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
5158
5161
  UseDelegate()(prototype, propertyKey);
5159
5162
  });
@@ -5462,7 +5465,7 @@ var PlaceRouteGuard = /** @class */ (function () {
5462
5465
  */
5463
5466
  function (activatedRoute, state) {
5464
5467
  return __awaiter(this, void 0, void 0, function () {
5465
- var placeDefinition, params, parsedParams, initialVisit, sanitiser, updatedVisit, parameterCommands, commands;
5468
+ var placeDefinition, params, parsedParams, initialVisit, sanitiser, sanitisedVisit, parameterCommands, commands;
5466
5469
  return __generator(this, function (_a) {
5467
5470
  switch (_a.label) {
5468
5471
  case 0:
@@ -5475,14 +5478,14 @@ var PlaceRouteGuard = /** @class */ (function () {
5475
5478
  sanitiser = new VisitSanitiser(activatedRoute, this.router, this.placeHistory, this.injector);
5476
5479
  return [4 /*yield*/, sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams))];
5477
5480
  case 1:
5478
- updatedVisit = _a.sent();
5481
+ sanitisedVisit = _a.sent();
5479
5482
  // Save the visit with any updated parameters. We need to save it so we remember any non route parameters
5480
- this.placeRouter.navigationSession.storeVisit(updatedVisit);
5481
- if (initialVisit.hasRoutingChangedFrom(updatedVisit)) {
5482
- parameterCommands = updatedVisit.hasRouteId() ?
5483
- [placeDefinition.getFormattedRouteId(updatedVisit), placeDefinition.getFormattedRouteParameters(updatedVisit)] :
5484
- [placeDefinition.getFormattedRouteParameters(updatedVisit)];
5485
- commands = [(activatedRoute.url[0].path)].concat(parameterCommands, this.placeRouter.getChildPath(activatedRoute));
5483
+ this.placeRouter.navigationSession.storeVisit(sanitisedVisit);
5484
+ if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
5485
+ parameterCommands = sanitisedVisit.hasRouteId() ?
5486
+ [placeDefinition.getFormattedRouteId(sanitisedVisit), placeDefinition.getFormattedRouteParameters(sanitisedVisit)] :
5487
+ [placeDefinition.getFormattedRouteParameters(sanitisedVisit)];
5488
+ commands = [(activatedRoute.url[0].path)].concat(parameterCommands, this.placeRouter.extractChildPath(activatedRoute));
5486
5489
  console.log('##### Redirect', commands);
5487
5490
  return [2 /*return*/, this.router.createUrlTree(commands, {
5488
5491
  replaceUrl: true,