@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.
- package/bundles/coolon-angular-ui-powerups.umd.js +16 -13
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/place/place-router.js +3 -4
- package/esm2015/lib/place/route/guards/place-route.guard.js +8 -8
- package/esm2015/lib/place/route/parameter-decorators.js +8 -4
- package/esm5/lib/place/place-router.js +3 -4
- package/esm5/lib/place/route/guards/place-route.guard.js +9 -9
- package/esm5/lib/place/route/parameter-decorators.js +8 -4
- package/fesm2015/coolon-angular-ui-powerups.js +15 -12
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +16 -13
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/place-router.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3998,7 +3998,7 @@
|
|
|
3998
3998
|
[def.getFormattedRouteId(next), def.getFormattedRouteParameters(next)] :
|
|
3999
3999
|
[def.getFormattedRouteParameters(next)];
|
|
4000
4000
|
/** @type {?} */
|
|
4001
|
-
var commands = [relativePath].concat(params, _this.
|
|
4001
|
+
var commands = [relativePath].concat(params, _this.extractChildPath(activatedRoute.snapshot));
|
|
4002
4002
|
console.log('### Redirect', commands);
|
|
4003
4003
|
return router.navigate(commands, {
|
|
4004
4004
|
relativeTo: activatedRoute
|
|
@@ -4036,7 +4036,6 @@
|
|
|
4036
4036
|
return [3 /*break*/, 5];
|
|
4037
4037
|
case 3:
|
|
4038
4038
|
def = visit.placeDefinition;
|
|
4039
|
-
// @see https://coolon.atlassian.net/browse/AUP-41
|
|
4040
4039
|
parameterCommands = visit.hasRouteId() ?
|
|
4041
4040
|
[def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
|
|
4042
4041
|
[def.getFormattedRouteParameters(visit)];
|
|
@@ -4117,7 +4116,7 @@
|
|
|
4117
4116
|
* @param {?} activatedRoute
|
|
4118
4117
|
* @return {?}
|
|
4119
4118
|
*/
|
|
4120
|
-
PlaceRouter.prototype.
|
|
4119
|
+
PlaceRouter.prototype.extractChildPath = /**
|
|
4121
4120
|
* @param {?} activatedRoute
|
|
4122
4121
|
* @return {?}
|
|
4123
4122
|
*/
|
|
@@ -5311,6 +5310,8 @@
|
|
|
5311
5310
|
* @return {?}
|
|
5312
5311
|
*/
|
|
5313
5312
|
function VisitParameter(options) {
|
|
5313
|
+
/** @type {?} */
|
|
5314
|
+
var opts = typescriptUtilities.Opts.get(options);
|
|
5314
5315
|
return (/**
|
|
5315
5316
|
* @param {?} prototype
|
|
5316
5317
|
* @param {?} propertyKey
|
|
@@ -5318,7 +5319,7 @@
|
|
|
5318
5319
|
*/
|
|
5319
5320
|
function (prototype, propertyKey) {
|
|
5320
5321
|
/** @type {?} */
|
|
5321
|
-
var param = new exports.ParameterDefinition.ValueParameter(propertyKey.toString(), options,
|
|
5322
|
+
var param = new exports.ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
|
|
5322
5323
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
5323
5324
|
pectin.UseDelegate()(prototype, propertyKey);
|
|
5324
5325
|
});
|
|
@@ -5329,6 +5330,8 @@
|
|
|
5329
5330
|
* @return {?}
|
|
5330
5331
|
*/
|
|
5331
5332
|
function VisitParameterList(options) {
|
|
5333
|
+
/** @type {?} */
|
|
5334
|
+
var opts = typescriptUtilities.Opts.get(options);
|
|
5332
5335
|
return (/**
|
|
5333
5336
|
* @param {?} prototype
|
|
5334
5337
|
* @param {?} propertyKey
|
|
@@ -5336,7 +5339,7 @@
|
|
|
5336
5339
|
*/
|
|
5337
5340
|
function (prototype, propertyKey) {
|
|
5338
5341
|
/** @type {?} */
|
|
5339
|
-
var param = new exports.ParameterDefinition.ArrayParameter(propertyKey.toString(), options,
|
|
5342
|
+
var param = new exports.ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
|
|
5340
5343
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
5341
5344
|
pectin.UseDelegate()(prototype, propertyKey);
|
|
5342
5345
|
});
|
|
@@ -5645,7 +5648,7 @@
|
|
|
5645
5648
|
*/
|
|
5646
5649
|
function (activatedRoute, state) {
|
|
5647
5650
|
return __awaiter(this, void 0, void 0, function () {
|
|
5648
|
-
var placeDefinition, params, parsedParams, initialVisit, sanitiser,
|
|
5651
|
+
var placeDefinition, params, parsedParams, initialVisit, sanitiser, sanitisedVisit, parameterCommands, commands;
|
|
5649
5652
|
return __generator(this, function (_a) {
|
|
5650
5653
|
switch (_a.label) {
|
|
5651
5654
|
case 0:
|
|
@@ -5658,14 +5661,14 @@
|
|
|
5658
5661
|
sanitiser = new VisitSanitiser(activatedRoute, this.router, this.placeHistory, this.injector);
|
|
5659
5662
|
return [4 /*yield*/, sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams))];
|
|
5660
5663
|
case 1:
|
|
5661
|
-
|
|
5664
|
+
sanitisedVisit = _a.sent();
|
|
5662
5665
|
// Save the visit with any updated parameters. We need to save it so we remember any non route parameters
|
|
5663
|
-
this.placeRouter.navigationSession.storeVisit(
|
|
5664
|
-
if (initialVisit.hasRoutingChangedFrom(
|
|
5665
|
-
parameterCommands =
|
|
5666
|
-
[placeDefinition.getFormattedRouteId(
|
|
5667
|
-
[placeDefinition.getFormattedRouteParameters(
|
|
5668
|
-
commands = [(activatedRoute.url[0].path)].concat(parameterCommands, this.placeRouter.
|
|
5666
|
+
this.placeRouter.navigationSession.storeVisit(sanitisedVisit);
|
|
5667
|
+
if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
|
|
5668
|
+
parameterCommands = sanitisedVisit.hasRouteId() ?
|
|
5669
|
+
[placeDefinition.getFormattedRouteId(sanitisedVisit), placeDefinition.getFormattedRouteParameters(sanitisedVisit)] :
|
|
5670
|
+
[placeDefinition.getFormattedRouteParameters(sanitisedVisit)];
|
|
5671
|
+
commands = [(activatedRoute.url[0].path)].concat(parameterCommands, this.placeRouter.extractChildPath(activatedRoute));
|
|
5669
5672
|
console.log('##### Redirect', commands);
|
|
5670
5673
|
return [2 /*return*/, this.router.createUrlTree(commands, {
|
|
5671
5674
|
replaceUrl: true,
|