@coolon/angular-ui-powerups 0.0.46 → 0.0.48
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 +127 -132
- 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/interaction/abstract-activity.js +3 -9
- package/esm2015/lib/place/place-history.js +2 -2
- package/esm2015/lib/place/place-router.js +3 -11
- package/esm2015/lib/place/route/parameter-snapshot.js +2 -9
- package/esm2015/lib/place/route/route-parameter-sanitiser.js +3 -8
- package/esm5/lib/interaction/abstract-activity.js +14 -10
- package/esm5/lib/place/place-history.js +2 -2
- package/esm5/lib/place/place-router.js +7 -12
- package/esm5/lib/place/route/parameter-snapshot.js +6 -10
- package/esm5/lib/place/route/route-parameter-sanitiser.js +7 -9
- package/fesm2015/coolon-angular-ui-powerups.js +91 -111
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +129 -134
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/package.json +1 -1
|
@@ -1266,7 +1266,10 @@
|
|
|
1266
1266
|
/**
|
|
1267
1267
|
* @template D, R, E
|
|
1268
1268
|
*/
|
|
1269
|
-
var
|
|
1269
|
+
var /**
|
|
1270
|
+
* @template D, R, E
|
|
1271
|
+
*/
|
|
1272
|
+
AbstractActivity = /** @class */ (function (_super) {
|
|
1270
1273
|
__extends(AbstractActivity, _super);
|
|
1271
1274
|
function AbstractActivity() {
|
|
1272
1275
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -1340,10 +1343,14 @@
|
|
|
1340
1343
|
*/
|
|
1341
1344
|
function () { return _this.finalizeAndDispose(); }));
|
|
1342
1345
|
};
|
|
1346
|
+
// @Trace()
|
|
1347
|
+
// @Trace()
|
|
1343
1348
|
/**
|
|
1344
1349
|
* @return {?}
|
|
1345
1350
|
*/
|
|
1346
|
-
AbstractActivity.prototype.onActivityReady =
|
|
1351
|
+
AbstractActivity.prototype.onActivityReady =
|
|
1352
|
+
// @Trace()
|
|
1353
|
+
/**
|
|
1347
1354
|
* @return {?}
|
|
1348
1355
|
*/
|
|
1349
1356
|
function () {
|
|
@@ -1405,12 +1412,6 @@
|
|
|
1405
1412
|
function () {
|
|
1406
1413
|
return this._busyModel.value;
|
|
1407
1414
|
};
|
|
1408
|
-
__decorate([
|
|
1409
|
-
pectin.Trace(),
|
|
1410
|
-
__metadata("design:type", Function),
|
|
1411
|
-
__metadata("design:paramtypes", []),
|
|
1412
|
-
__metadata("design:returntype", void 0)
|
|
1413
|
-
], AbstractActivity.prototype, "onActivityReady", null);
|
|
1414
1415
|
return AbstractActivity;
|
|
1415
1416
|
}(DisposableComponent));
|
|
1416
1417
|
if (false) {
|
|
@@ -2348,7 +2349,7 @@
|
|
|
2348
2349
|
var previousState = ___default__default.last(history);
|
|
2349
2350
|
if (!previousState || state.hasChanged(previousState)) {
|
|
2350
2351
|
history.unshift(state); // LIFO
|
|
2351
|
-
this.setHistory(state.placeDefinition, history.slice(
|
|
2352
|
+
this.setHistory(state.placeDefinition, history.slice(0, 3)); // limit our history to 4 visits
|
|
2352
2353
|
}
|
|
2353
2354
|
};
|
|
2354
2355
|
/**
|
|
@@ -2408,6 +2409,113 @@
|
|
|
2408
2409
|
PlaceHistory.prototype.router;
|
|
2409
2410
|
}
|
|
2410
2411
|
|
|
2412
|
+
/**
|
|
2413
|
+
* @fileoverview added by tsickle
|
|
2414
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2415
|
+
*/
|
|
2416
|
+
var PlaceRouter = /** @class */ (function () {
|
|
2417
|
+
function PlaceRouter(router) {
|
|
2418
|
+
this.router = router;
|
|
2419
|
+
}
|
|
2420
|
+
/**
|
|
2421
|
+
* @param {?} activatedRoute
|
|
2422
|
+
* @param {?} previous
|
|
2423
|
+
* @param {?} next
|
|
2424
|
+
* @return {?}
|
|
2425
|
+
*/
|
|
2426
|
+
PlaceRouter.prototype.pushParameterChangesToRoute = /**
|
|
2427
|
+
* @param {?} activatedRoute
|
|
2428
|
+
* @param {?} previous
|
|
2429
|
+
* @param {?} next
|
|
2430
|
+
* @return {?}
|
|
2431
|
+
*/
|
|
2432
|
+
function (activatedRoute, previous, next) {
|
|
2433
|
+
/** @type {?} */
|
|
2434
|
+
var relativePath = !!previous.hasRouteId() ? '..' : '.';
|
|
2435
|
+
this.router.navigate([relativePath].concat(this.createRouteParameters(next), this.getChildPath(activatedRoute.snapshot)), {
|
|
2436
|
+
relativeTo: activatedRoute
|
|
2437
|
+
});
|
|
2438
|
+
};
|
|
2439
|
+
// @Trace()
|
|
2440
|
+
// @Trace()
|
|
2441
|
+
/**
|
|
2442
|
+
* @param {?} activatedRoute
|
|
2443
|
+
* @param {?} sanitised
|
|
2444
|
+
* @return {?}
|
|
2445
|
+
*/
|
|
2446
|
+
PlaceRouter.prototype.getRedirectUrlTree =
|
|
2447
|
+
// @Trace()
|
|
2448
|
+
/**
|
|
2449
|
+
* @param {?} activatedRoute
|
|
2450
|
+
* @param {?} sanitised
|
|
2451
|
+
* @return {?}
|
|
2452
|
+
*/
|
|
2453
|
+
function (activatedRoute, sanitised) {
|
|
2454
|
+
/** @type {?} */
|
|
2455
|
+
var urlSegments = activatedRoute.url;
|
|
2456
|
+
/** @type {?} */
|
|
2457
|
+
var weHaveARouteId = sanitised.hasRouteId() && sanitised.getFormattedRouteId();
|
|
2458
|
+
/** @type {?} */
|
|
2459
|
+
var commands = (weHaveARouteId) ?
|
|
2460
|
+
[urlSegments[0].path, sanitised.getFormattedRouteId(), sanitised.getFormattedParameters()] :
|
|
2461
|
+
[urlSegments[0].path, sanitised.getFormattedParameters()];
|
|
2462
|
+
console.log("redirect path", commands);
|
|
2463
|
+
return this.router.createUrlTree(commands);
|
|
2464
|
+
};
|
|
2465
|
+
/**
|
|
2466
|
+
* @protected
|
|
2467
|
+
* @param {?} activatedRoute
|
|
2468
|
+
* @return {?}
|
|
2469
|
+
*/
|
|
2470
|
+
PlaceRouter.prototype.getChildPath = /**
|
|
2471
|
+
* @protected
|
|
2472
|
+
* @param {?} activatedRoute
|
|
2473
|
+
* @return {?}
|
|
2474
|
+
*/
|
|
2475
|
+
function (activatedRoute) {
|
|
2476
|
+
return ___default__default.flatten(activatedRoute.children.map((/**
|
|
2477
|
+
* @param {?} child
|
|
2478
|
+
* @return {?}
|
|
2479
|
+
*/
|
|
2480
|
+
function (child) { return child.url; })));
|
|
2481
|
+
};
|
|
2482
|
+
/**
|
|
2483
|
+
* @protected
|
|
2484
|
+
* @param {?} parameters
|
|
2485
|
+
* @return {?}
|
|
2486
|
+
*/
|
|
2487
|
+
PlaceRouter.prototype.createRouteParameters = /**
|
|
2488
|
+
* @protected
|
|
2489
|
+
* @param {?} parameters
|
|
2490
|
+
* @return {?}
|
|
2491
|
+
*/
|
|
2492
|
+
function (parameters) {
|
|
2493
|
+
/** @type {?} */
|
|
2494
|
+
var routeId = parameters.getFormattedRouteId();
|
|
2495
|
+
return routeId ?
|
|
2496
|
+
[routeId, parameters.getFormattedParameters()] :
|
|
2497
|
+
[parameters.getFormattedParameters()];
|
|
2498
|
+
};
|
|
2499
|
+
PlaceRouter.decorators = [
|
|
2500
|
+
{ type: core.Injectable, args: [{
|
|
2501
|
+
providedIn: 'root'
|
|
2502
|
+
},] }
|
|
2503
|
+
];
|
|
2504
|
+
/** @nocollapse */
|
|
2505
|
+
PlaceRouter.ctorParameters = function () { return [
|
|
2506
|
+
{ type: router.Router }
|
|
2507
|
+
]; };
|
|
2508
|
+
/** @nocollapse */ PlaceRouter.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router)); }, token: PlaceRouter, providedIn: "root" });
|
|
2509
|
+
return PlaceRouter;
|
|
2510
|
+
}());
|
|
2511
|
+
if (false) {
|
|
2512
|
+
/**
|
|
2513
|
+
* @type {?}
|
|
2514
|
+
* @private
|
|
2515
|
+
*/
|
|
2516
|
+
PlaceRouter.prototype.router;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2411
2519
|
/**
|
|
2412
2520
|
* @fileoverview added by tsickle
|
|
2413
2521
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -2852,11 +2960,15 @@
|
|
|
2852
2960
|
return p.parameterDef === parameter ? p.replace(value) : p;
|
|
2853
2961
|
})));
|
|
2854
2962
|
};
|
|
2963
|
+
// @Trace()
|
|
2964
|
+
// @Trace()
|
|
2855
2965
|
/**
|
|
2856
2966
|
* @param {?} injector
|
|
2857
2967
|
* @return {?}
|
|
2858
2968
|
*/
|
|
2859
|
-
ParameterSnapshot.prototype.sanitise =
|
|
2969
|
+
ParameterSnapshot.prototype.sanitise =
|
|
2970
|
+
// @Trace()
|
|
2971
|
+
/**
|
|
2860
2972
|
* @param {?} injector
|
|
2861
2973
|
* @return {?}
|
|
2862
2974
|
*/
|
|
@@ -2930,12 +3042,6 @@
|
|
|
2930
3042
|
__metadata("design:paramtypes", []),
|
|
2931
3043
|
__metadata("design:returntype", Array)
|
|
2932
3044
|
], ParameterSnapshot.prototype, "getRouteParameters", null);
|
|
2933
|
-
__decorate([
|
|
2934
|
-
pectin.Trace(),
|
|
2935
|
-
__metadata("design:type", Function),
|
|
2936
|
-
__metadata("design:paramtypes", [core.Injector]),
|
|
2937
|
-
__metadata("design:returntype", Promise)
|
|
2938
|
-
], ParameterSnapshot.prototype, "sanitise", null);
|
|
2939
3045
|
return ParameterSnapshot;
|
|
2940
3046
|
}());
|
|
2941
3047
|
if (false) {
|
|
@@ -3323,115 +3429,6 @@
|
|
|
3323
3429
|
ParameterSnapshot.ResolvedArrayParameter = ResolvedArrayParameter;
|
|
3324
3430
|
})(exports.ParameterSnapshot || (exports.ParameterSnapshot = {}));
|
|
3325
3431
|
|
|
3326
|
-
/**
|
|
3327
|
-
* @fileoverview added by tsickle
|
|
3328
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3329
|
-
*/
|
|
3330
|
-
var PlaceRouter = /** @class */ (function () {
|
|
3331
|
-
function PlaceRouter(router) {
|
|
3332
|
-
this.router = router;
|
|
3333
|
-
}
|
|
3334
|
-
/**
|
|
3335
|
-
* @param {?} activatedRoute
|
|
3336
|
-
* @param {?} previous
|
|
3337
|
-
* @param {?} next
|
|
3338
|
-
* @return {?}
|
|
3339
|
-
*/
|
|
3340
|
-
PlaceRouter.prototype.pushParameterChangesToRoute = /**
|
|
3341
|
-
* @param {?} activatedRoute
|
|
3342
|
-
* @param {?} previous
|
|
3343
|
-
* @param {?} next
|
|
3344
|
-
* @return {?}
|
|
3345
|
-
*/
|
|
3346
|
-
function (activatedRoute, previous, next) {
|
|
3347
|
-
/** @type {?} */
|
|
3348
|
-
var relativePath = !!previous.hasRouteId() ? '..' : '.';
|
|
3349
|
-
this.router.navigate([relativePath].concat(this.createRouteParameters(next), this.getChildPath(activatedRoute.snapshot)), {
|
|
3350
|
-
relativeTo: activatedRoute
|
|
3351
|
-
});
|
|
3352
|
-
};
|
|
3353
|
-
/**
|
|
3354
|
-
* @param {?} activatedRoute
|
|
3355
|
-
* @param {?} sanitised
|
|
3356
|
-
* @return {?}
|
|
3357
|
-
*/
|
|
3358
|
-
PlaceRouter.prototype.getRedirectUrlTree = /**
|
|
3359
|
-
* @param {?} activatedRoute
|
|
3360
|
-
* @param {?} sanitised
|
|
3361
|
-
* @return {?}
|
|
3362
|
-
*/
|
|
3363
|
-
function (activatedRoute, sanitised) {
|
|
3364
|
-
/** @type {?} */
|
|
3365
|
-
var urlSegments = activatedRoute.url;
|
|
3366
|
-
/** @type {?} */
|
|
3367
|
-
var weHaveARouteId = sanitised.hasRouteId() && sanitised.getFormattedRouteId();
|
|
3368
|
-
/** @type {?} */
|
|
3369
|
-
var commands = (weHaveARouteId) ?
|
|
3370
|
-
[urlSegments[0].path, sanitised.getFormattedRouteId(), sanitised.getFormattedParameters()] :
|
|
3371
|
-
[urlSegments[0].path, sanitised.getFormattedParameters()];
|
|
3372
|
-
console.log("redirect path", commands);
|
|
3373
|
-
return this.router.createUrlTree(commands);
|
|
3374
|
-
};
|
|
3375
|
-
/**
|
|
3376
|
-
* @protected
|
|
3377
|
-
* @param {?} activatedRoute
|
|
3378
|
-
* @return {?}
|
|
3379
|
-
*/
|
|
3380
|
-
PlaceRouter.prototype.getChildPath = /**
|
|
3381
|
-
* @protected
|
|
3382
|
-
* @param {?} activatedRoute
|
|
3383
|
-
* @return {?}
|
|
3384
|
-
*/
|
|
3385
|
-
function (activatedRoute) {
|
|
3386
|
-
return ___default__default.flatten(activatedRoute.children.map((/**
|
|
3387
|
-
* @param {?} child
|
|
3388
|
-
* @return {?}
|
|
3389
|
-
*/
|
|
3390
|
-
function (child) { return child.url; })));
|
|
3391
|
-
};
|
|
3392
|
-
/**
|
|
3393
|
-
* @protected
|
|
3394
|
-
* @param {?} parameters
|
|
3395
|
-
* @return {?}
|
|
3396
|
-
*/
|
|
3397
|
-
PlaceRouter.prototype.createRouteParameters = /**
|
|
3398
|
-
* @protected
|
|
3399
|
-
* @param {?} parameters
|
|
3400
|
-
* @return {?}
|
|
3401
|
-
*/
|
|
3402
|
-
function (parameters) {
|
|
3403
|
-
/** @type {?} */
|
|
3404
|
-
var routeId = parameters.getFormattedRouteId();
|
|
3405
|
-
return routeId ?
|
|
3406
|
-
[routeId, parameters.getFormattedParameters()] :
|
|
3407
|
-
[parameters.getFormattedParameters()];
|
|
3408
|
-
};
|
|
3409
|
-
PlaceRouter.decorators = [
|
|
3410
|
-
{ type: core.Injectable, args: [{
|
|
3411
|
-
providedIn: 'root'
|
|
3412
|
-
},] }
|
|
3413
|
-
];
|
|
3414
|
-
/** @nocollapse */
|
|
3415
|
-
PlaceRouter.ctorParameters = function () { return [
|
|
3416
|
-
{ type: router.Router }
|
|
3417
|
-
]; };
|
|
3418
|
-
/** @nocollapse */ PlaceRouter.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router)); }, token: PlaceRouter, providedIn: "root" });
|
|
3419
|
-
__decorate([
|
|
3420
|
-
pectin.Trace(),
|
|
3421
|
-
__metadata("design:type", Function),
|
|
3422
|
-
__metadata("design:paramtypes", [router.ActivatedRouteSnapshot, exports.ParameterSnapshot]),
|
|
3423
|
-
__metadata("design:returntype", router.UrlTree)
|
|
3424
|
-
], PlaceRouter.prototype, "getRedirectUrlTree", null);
|
|
3425
|
-
return PlaceRouter;
|
|
3426
|
-
}());
|
|
3427
|
-
if (false) {
|
|
3428
|
-
/**
|
|
3429
|
-
* @type {?}
|
|
3430
|
-
* @private
|
|
3431
|
-
*/
|
|
3432
|
-
PlaceRouter.prototype.router;
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
3432
|
/**
|
|
3436
3433
|
* @fileoverview added by tsickle
|
|
3437
3434
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -4912,10 +4909,14 @@
|
|
|
4912
4909
|
pectin.assert.isTruthy(this.parameterSanitisers.length !== 0);
|
|
4913
4910
|
return this.routeIdSanitiser && this.routeIdSanitiser.valueChanged;
|
|
4914
4911
|
};
|
|
4912
|
+
// @Trace()
|
|
4913
|
+
// @Trace()
|
|
4915
4914
|
/**
|
|
4916
4915
|
* @return {?}
|
|
4917
4916
|
*/
|
|
4918
|
-
RouteParameterSanitiser.prototype.getRedirectParams =
|
|
4917
|
+
RouteParameterSanitiser.prototype.getRedirectParams =
|
|
4918
|
+
// @Trace()
|
|
4919
|
+
/**
|
|
4919
4920
|
* @return {?}
|
|
4920
4921
|
*/
|
|
4921
4922
|
function () {
|
|
@@ -4954,12 +4955,6 @@
|
|
|
4954
4955
|
__metadata("design:paramtypes", [exports.ParameterDefinition]),
|
|
4955
4956
|
__metadata("design:returntype", Object)
|
|
4956
4957
|
], RouteParameterSanitiser.prototype, "getSanitiser", null);
|
|
4957
|
-
__decorate([
|
|
4958
|
-
pectin.Trace(),
|
|
4959
|
-
__metadata("design:type", Function),
|
|
4960
|
-
__metadata("design:paramtypes", []),
|
|
4961
|
-
__metadata("design:returntype", Array)
|
|
4962
|
-
], RouteParameterSanitiser.prototype, "getRedirectParams", null);
|
|
4963
4958
|
return RouteParameterSanitiser;
|
|
4964
4959
|
}());
|
|
4965
4960
|
if (false) {
|