@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 { __decorate, __metadata, __awaiter } 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';
|
|
@@ -2117,12 +2117,6 @@ if (false) {
|
|
|
2117
2117
|
return isNil ? true : def.isArray ? value['length'] < 1 : false;
|
|
2118
2118
|
}
|
|
2119
2119
|
}
|
|
2120
|
-
__decorate([
|
|
2121
|
-
Trace(),
|
|
2122
|
-
__metadata("design:type", Function),
|
|
2123
|
-
__metadata("design:paramtypes", [ParameterDefinition, Object, Object]),
|
|
2124
|
-
__metadata("design:returntype", Object)
|
|
2125
|
-
], DefaultParameterSanitiser.prototype, "sanitise", null);
|
|
2126
2120
|
ParameterDefinition.DefaultParameterSanitiser = DefaultParameterSanitiser;
|
|
2127
2121
|
if (false) {
|
|
2128
2122
|
/** @type {?} */
|
|
@@ -2134,7 +2128,7 @@ if (false) {
|
|
|
2134
2128
|
}
|
|
2135
2129
|
})(ParameterDefinition || (ParameterDefinition = {}));
|
|
2136
2130
|
|
|
2137
|
-
var _a
|
|
2131
|
+
var _a;
|
|
2138
2132
|
class ParameterSnapshot {
|
|
2139
2133
|
/**
|
|
2140
2134
|
* @param {?} placeDefinition
|
|
@@ -2282,6 +2276,22 @@ class ParameterSnapshot {
|
|
|
2282
2276
|
}));
|
|
2283
2277
|
return params;
|
|
2284
2278
|
}
|
|
2279
|
+
/**
|
|
2280
|
+
* @return {?}
|
|
2281
|
+
*/
|
|
2282
|
+
getAllParameters() {
|
|
2283
|
+
/** @type {?} */
|
|
2284
|
+
const params = {};
|
|
2285
|
+
/** @type {?} */
|
|
2286
|
+
const routeIdParam = this.resolved.forEach((/**
|
|
2287
|
+
* @param {?} p
|
|
2288
|
+
* @return {?}
|
|
2289
|
+
*/
|
|
2290
|
+
p => {
|
|
2291
|
+
params[p.parameterDef.name] = p.value;
|
|
2292
|
+
}));
|
|
2293
|
+
return params;
|
|
2294
|
+
}
|
|
2285
2295
|
/**
|
|
2286
2296
|
* @template T, S
|
|
2287
2297
|
* @param {?} parameter
|
|
@@ -2324,7 +2334,7 @@ class ParameterSnapshot {
|
|
|
2324
2334
|
/** @type {?} */
|
|
2325
2335
|
const sanitisedValue = yield routeParameter.sanitise(this, injector);
|
|
2326
2336
|
if (!routeParameter.isSame(sanitisedValue)) {
|
|
2327
|
-
result =
|
|
2337
|
+
result = result.replace(routeParameter.parameterDef, sanitisedValue);
|
|
2328
2338
|
}
|
|
2329
2339
|
}
|
|
2330
2340
|
return result;
|
|
@@ -2361,18 +2371,6 @@ __decorate([
|
|
|
2361
2371
|
__metadata("design:paramtypes", []),
|
|
2362
2372
|
__metadata("design:returntype", Array)
|
|
2363
2373
|
], ParameterSnapshot.prototype, "getRouteParameters", null);
|
|
2364
|
-
__decorate([
|
|
2365
|
-
Trace(),
|
|
2366
|
-
__metadata("design:type", Function),
|
|
2367
|
-
__metadata("design:paramtypes", [ParameterDefinition, typeof (_b = typeof S !== "undefined" && S) === "function" ? _b : Object]),
|
|
2368
|
-
__metadata("design:returntype", ParameterSnapshot)
|
|
2369
|
-
], ParameterSnapshot.prototype, "replace", null);
|
|
2370
|
-
__decorate([
|
|
2371
|
-
Trace(),
|
|
2372
|
-
__metadata("design:type", Function),
|
|
2373
|
-
__metadata("design:paramtypes", [Injector]),
|
|
2374
|
-
__metadata("design:returntype", Promise)
|
|
2375
|
-
], ParameterSnapshot.prototype, "sanitise", null);
|
|
2376
2374
|
if (false) {
|
|
2377
2375
|
/** @type {?} */
|
|
2378
2376
|
ParameterSnapshot.prototype.placeDefinition;
|
|
@@ -3583,7 +3581,7 @@ class PlaceRouteGuard {
|
|
|
3583
3581
|
* @return {?}
|
|
3584
3582
|
*/
|
|
3585
3583
|
sanitised => {
|
|
3586
|
-
Logger.get(this).info("ParameterSnapshot.sanitise",
|
|
3584
|
+
Logger.get(this).info("ParameterSnapshot.sanitise result", sanitised.getAllParameters());
|
|
3587
3585
|
if (sanitised.hasChanged(snapshot, true)) {
|
|
3588
3586
|
return this.placeRouter.getRedirectUrlTree(activatedRoute, sanitised);
|
|
3589
3587
|
}
|