@coolon/angular-ui-powerups 0.0.50 → 0.0.51
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 +26 -22
- 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/esm2015/lib/place/guards/place-route.guard.js +2 -2
- package/esm2015/lib/place/route/parameter-definition.class.js +1 -9
- package/esm2015/lib/place/route/parameter-snapshot.js +19 -17
- package/esm5/lib/place/guards/place-route.guard.js +2 -2
- package/esm5/lib/place/route/parameter-definition.class.js +5 -9
- package/esm5/lib/place/route/parameter-snapshot.js +22 -17
- package/fesm2015/coolon-angular-ui-powerups.js +20 -22
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +27 -23
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/route/parameter-snapshot.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgress
|
|
|
5
5
|
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator, __values } from 'tslib';
|
|
8
|
-
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Binding,
|
|
8
|
+
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Binding, MutableValueModel, Guard, OptionsHelper, ValueHolder } from '@coolon/pectin';
|
|
9
9
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
10
|
import { Deferred } from '@coolon/pectin/lib/promise/deferred.class';
|
|
11
11
|
import { assert as assert$1, Klass, Opts } from '@coolon/typescript-utilities';
|
|
@@ -2484,7 +2484,10 @@ if (false) {
|
|
|
2484
2484
|
/**
|
|
2485
2485
|
* @template T, S
|
|
2486
2486
|
*/
|
|
2487
|
-
var
|
|
2487
|
+
var /**
|
|
2488
|
+
* @template T, S
|
|
2489
|
+
*/
|
|
2490
|
+
DefaultParameterSanitiser = /** @class */ (function () {
|
|
2488
2491
|
function DefaultParameterSanitiser(remember, defaultValue, placeHistory) {
|
|
2489
2492
|
this.remember = remember;
|
|
2490
2493
|
this.defaultValue = defaultValue;
|
|
@@ -2547,12 +2550,6 @@ if (false) {
|
|
|
2547
2550
|
var isNil = ___default.isNil(value);
|
|
2548
2551
|
return isNil ? true : def.isArray ? value['length'] < 1 : false;
|
|
2549
2552
|
};
|
|
2550
|
-
__decorate([
|
|
2551
|
-
Trace(),
|
|
2552
|
-
__metadata("design:type", Function),
|
|
2553
|
-
__metadata("design:paramtypes", [ParameterDefinition, Object, Object]),
|
|
2554
|
-
__metadata("design:returntype", Object)
|
|
2555
|
-
], DefaultParameterSanitiser.prototype, "sanitise", null);
|
|
2556
2553
|
return DefaultParameterSanitiser;
|
|
2557
2554
|
}());
|
|
2558
2555
|
ParameterDefinition.DefaultParameterSanitiser = DefaultParameterSanitiser;
|
|
@@ -2756,6 +2753,25 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2756
2753
|
}));
|
|
2757
2754
|
return params;
|
|
2758
2755
|
};
|
|
2756
|
+
/**
|
|
2757
|
+
* @return {?}
|
|
2758
|
+
*/
|
|
2759
|
+
ParameterSnapshot.prototype.getAllParameters = /**
|
|
2760
|
+
* @return {?}
|
|
2761
|
+
*/
|
|
2762
|
+
function () {
|
|
2763
|
+
/** @type {?} */
|
|
2764
|
+
var params = {};
|
|
2765
|
+
/** @type {?} */
|
|
2766
|
+
var routeIdParam = this.resolved.forEach((/**
|
|
2767
|
+
* @param {?} p
|
|
2768
|
+
* @return {?}
|
|
2769
|
+
*/
|
|
2770
|
+
function (p) {
|
|
2771
|
+
params[p.parameterDef.name] = p.value;
|
|
2772
|
+
}));
|
|
2773
|
+
return params;
|
|
2774
|
+
};
|
|
2759
2775
|
/**
|
|
2760
2776
|
* @template T, S
|
|
2761
2777
|
* @param {?} parameter
|
|
@@ -2814,7 +2830,7 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2814
2830
|
case 4:
|
|
2815
2831
|
sanitisedValue = _a.sent();
|
|
2816
2832
|
if (!routeParameter.isSame(sanitisedValue)) {
|
|
2817
|
-
result =
|
|
2833
|
+
result = result.replace(routeParameter.parameterDef, sanitisedValue);
|
|
2818
2834
|
}
|
|
2819
2835
|
_a.label = 5;
|
|
2820
2836
|
case 5:
|
|
@@ -2825,7 +2841,7 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2825
2841
|
});
|
|
2826
2842
|
});
|
|
2827
2843
|
};
|
|
2828
|
-
var _a
|
|
2844
|
+
var _a;
|
|
2829
2845
|
__decorate([
|
|
2830
2846
|
Memoize$1(),
|
|
2831
2847
|
__metadata("design:type", Function),
|
|
@@ -2856,18 +2872,6 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2856
2872
|
__metadata("design:paramtypes", []),
|
|
2857
2873
|
__metadata("design:returntype", Array)
|
|
2858
2874
|
], ParameterSnapshot.prototype, "getRouteParameters", null);
|
|
2859
|
-
__decorate([
|
|
2860
|
-
Trace(),
|
|
2861
|
-
__metadata("design:type", Function),
|
|
2862
|
-
__metadata("design:paramtypes", [ParameterDefinition, typeof (_b = typeof S !== "undefined" && S) === "function" ? _b : Object]),
|
|
2863
|
-
__metadata("design:returntype", ParameterSnapshot)
|
|
2864
|
-
], ParameterSnapshot.prototype, "replace", null);
|
|
2865
|
-
__decorate([
|
|
2866
|
-
Trace(),
|
|
2867
|
-
__metadata("design:type", Function),
|
|
2868
|
-
__metadata("design:paramtypes", [Injector]),
|
|
2869
|
-
__metadata("design:returntype", Promise)
|
|
2870
|
-
], ParameterSnapshot.prototype, "sanitise", null);
|
|
2871
2875
|
return ParameterSnapshot;
|
|
2872
2876
|
}());
|
|
2873
2877
|
if (false) {
|
|
@@ -4251,7 +4255,7 @@ var PlaceRouteGuard = /** @class */ (function () {
|
|
|
4251
4255
|
* @return {?}
|
|
4252
4256
|
*/
|
|
4253
4257
|
function (sanitised) {
|
|
4254
|
-
Logger.get(_this).info("ParameterSnapshot.sanitise",
|
|
4258
|
+
Logger.get(_this).info("ParameterSnapshot.sanitise result", sanitised.getAllParameters());
|
|
4255
4259
|
if (sanitised.hasChanged(snapshot_1, true)) {
|
|
4256
4260
|
return _this.placeRouter.getRedirectUrlTree(activatedRoute, sanitised);
|
|
4257
4261
|
}
|