@coolon/angular-ui-powerups 0.0.50 → 0.0.53
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 +392 -745
- 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/coolon-angular-ui-powerups.js +2 -2
- package/esm2015/index.js +2 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +2 -2
- package/esm2015/lib/place/guards/place-route.guard.js +2 -2
- package/esm2015/lib/place/index.js +2 -2
- package/esm2015/lib/place/route/parameter-definition.class.js +17 -36
- package/esm2015/lib/place/route/parameter-sanitiser.js +3 -4
- package/esm2015/lib/place/route/parameter-snapshot.js +66 -208
- package/esm2015/lib/place/route/route-parameter-value.js +223 -0
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +2 -2
- package/esm5/index.js +2 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +2 -2
- package/esm5/lib/place/guards/place-route.guard.js +2 -2
- package/esm5/lib/place/index.js +2 -2
- package/esm5/lib/place/route/parameter-definition.class.js +18 -45
- package/esm5/lib/place/route/parameter-sanitiser.js +3 -4
- package/esm5/lib/place/route/parameter-snapshot.js +73 -273
- package/esm5/lib/place/route/route-parameter-value.js +309 -0
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +304 -537
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +394 -746
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/index.d.ts +1 -1
- package/lib/place/route/parameter-definition.class.d.ts +2 -2
- package/lib/place/route/parameter-sanitiser.d.ts +2 -2
- package/lib/place/route/parameter-snapshot.d.ts +6 -27
- package/lib/place/route/route-parameter-value.d.ts +42 -0
- package/package.json +1 -1
- package/esm2015/lib/place/route/route-parameter-sanitiser.js +0 -296
- package/esm5/lib/place/route/route-parameter-sanitiser.js +0 -435
- package/lib/place/route/route-parameter-sanitiser.d.ts +0 -44
|
@@ -4,7 +4,7 @@ import { FormsModule } from '@angular/forms';
|
|
|
4
4
|
import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgressSpinnerModule, MatInputModule, MatFormFieldModule, MatSelectModule } from '@angular/material';
|
|
5
5
|
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
|
-
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator
|
|
7
|
+
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator } from 'tslib';
|
|
8
8
|
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, MutableListModel, StoreInValueModel, Binding, Trace, 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';
|
|
@@ -2333,6 +2333,307 @@ if (false) {
|
|
|
2333
2333
|
PlaceRouter.prototype.router;
|
|
2334
2334
|
}
|
|
2335
2335
|
|
|
2336
|
+
/**
|
|
2337
|
+
* @fileoverview added by tsickle
|
|
2338
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2339
|
+
*/
|
|
2340
|
+
/**
|
|
2341
|
+
* @abstract
|
|
2342
|
+
* @template S, T, R
|
|
2343
|
+
*/
|
|
2344
|
+
var /**
|
|
2345
|
+
* @abstract
|
|
2346
|
+
* @template S, T, R
|
|
2347
|
+
*/
|
|
2348
|
+
RouteParameterValue = /** @class */ (function () {
|
|
2349
|
+
function RouteParameterValue(definition, rawValue) {
|
|
2350
|
+
this.definition = definition;
|
|
2351
|
+
this.rawValue = rawValue;
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2354
|
+
* @return {?}
|
|
2355
|
+
*/
|
|
2356
|
+
RouteParameterValue.prototype.isRouteId = /**
|
|
2357
|
+
* @return {?}
|
|
2358
|
+
*/
|
|
2359
|
+
function () {
|
|
2360
|
+
return this.definition.isRouteId;
|
|
2361
|
+
};
|
|
2362
|
+
/**
|
|
2363
|
+
* @param {?} otherValue
|
|
2364
|
+
* @return {?}
|
|
2365
|
+
*/
|
|
2366
|
+
RouteParameterValue.prototype.hasChanged = /**
|
|
2367
|
+
* @param {?} otherValue
|
|
2368
|
+
* @return {?}
|
|
2369
|
+
*/
|
|
2370
|
+
function (otherValue) {
|
|
2371
|
+
return this.isEmpty() ?
|
|
2372
|
+
!this.isEmptyValue(otherValue) :
|
|
2373
|
+
this.isEmptyValue(otherValue) || !this.isSameValue(otherValue);
|
|
2374
|
+
};
|
|
2375
|
+
/**
|
|
2376
|
+
* Return's true if the current value is empty.
|
|
2377
|
+
*/
|
|
2378
|
+
/**
|
|
2379
|
+
* Return's true if the current value is empty.
|
|
2380
|
+
* @return {?}
|
|
2381
|
+
*/
|
|
2382
|
+
RouteParameterValue.prototype.isEmpty = /**
|
|
2383
|
+
* Return's true if the current value is empty.
|
|
2384
|
+
* @return {?}
|
|
2385
|
+
*/
|
|
2386
|
+
function () {
|
|
2387
|
+
return this.isEmptyValue(this.value);
|
|
2388
|
+
};
|
|
2389
|
+
/**
|
|
2390
|
+
* Returns true if the rawValue is undefined. This
|
|
2391
|
+
*/
|
|
2392
|
+
/**
|
|
2393
|
+
* Returns true if the rawValue is undefined. This
|
|
2394
|
+
* @return {?}
|
|
2395
|
+
*/
|
|
2396
|
+
RouteParameterValue.prototype.isMissing = /**
|
|
2397
|
+
* Returns true if the rawValue is undefined. This
|
|
2398
|
+
* @return {?}
|
|
2399
|
+
*/
|
|
2400
|
+
function () {
|
|
2401
|
+
return ___default.isUndefined(this.rawValue);
|
|
2402
|
+
};
|
|
2403
|
+
/**
|
|
2404
|
+
* @param {?} visit
|
|
2405
|
+
* @param {?} injector
|
|
2406
|
+
* @return {?}
|
|
2407
|
+
*/
|
|
2408
|
+
RouteParameterValue.prototype.sanitise = /**
|
|
2409
|
+
* @param {?} visit
|
|
2410
|
+
* @param {?} injector
|
|
2411
|
+
* @return {?}
|
|
2412
|
+
*/
|
|
2413
|
+
function (visit, injector) {
|
|
2414
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2415
|
+
var sanitiser;
|
|
2416
|
+
return __generator(this, function (_a) {
|
|
2417
|
+
sanitiser = this.definition.getSanitiser(injector);
|
|
2418
|
+
if (sanitiser) {
|
|
2419
|
+
return [2 /*return*/, sanitiser.sanitise(this, visit)];
|
|
2420
|
+
}
|
|
2421
|
+
else {
|
|
2422
|
+
return [2 /*return*/, this.value];
|
|
2423
|
+
}
|
|
2424
|
+
return [2 /*return*/];
|
|
2425
|
+
});
|
|
2426
|
+
});
|
|
2427
|
+
};
|
|
2428
|
+
return RouteParameterValue;
|
|
2429
|
+
}());
|
|
2430
|
+
if (false) {
|
|
2431
|
+
/** @type {?} */
|
|
2432
|
+
RouteParameterValue.prototype.value;
|
|
2433
|
+
/** @type {?} */
|
|
2434
|
+
RouteParameterValue.prototype.definition;
|
|
2435
|
+
/**
|
|
2436
|
+
* @type {?}
|
|
2437
|
+
* @protected
|
|
2438
|
+
*/
|
|
2439
|
+
RouteParameterValue.prototype.rawValue;
|
|
2440
|
+
/**
|
|
2441
|
+
* @abstract
|
|
2442
|
+
* @param {?} otherValue
|
|
2443
|
+
* @return {?}
|
|
2444
|
+
*/
|
|
2445
|
+
RouteParameterValue.prototype.isSameValue = function (otherValue) { };
|
|
2446
|
+
/**
|
|
2447
|
+
* @abstract
|
|
2448
|
+
* @return {?}
|
|
2449
|
+
*/
|
|
2450
|
+
RouteParameterValue.prototype.formattedValue = function () { };
|
|
2451
|
+
/**
|
|
2452
|
+
* @abstract
|
|
2453
|
+
* @param {?} value
|
|
2454
|
+
* @return {?}
|
|
2455
|
+
*/
|
|
2456
|
+
RouteParameterValue.prototype.replace = function (value) { };
|
|
2457
|
+
/**
|
|
2458
|
+
* @abstract
|
|
2459
|
+
* @param {?} value
|
|
2460
|
+
* @return {?}
|
|
2461
|
+
*/
|
|
2462
|
+
RouteParameterValue.prototype.isEmptyValue = function (value) { };
|
|
2463
|
+
}
|
|
2464
|
+
(function (RouteParameterValue) {
|
|
2465
|
+
/**
|
|
2466
|
+
* @template T
|
|
2467
|
+
* @param {?} def
|
|
2468
|
+
* @param {?} paramMap
|
|
2469
|
+
* @return {?}
|
|
2470
|
+
*/
|
|
2471
|
+
function create(def, paramMap) {
|
|
2472
|
+
// NOTE: Using undefined is important as it triggers the isMissing flag which is used by defaultValue and remember flags
|
|
2473
|
+
return def.isArray ?
|
|
2474
|
+
new RouteParameterValue.Array(def, paramMap.has(def.name) ? paramMap.getAll(def.name) : undefined) :
|
|
2475
|
+
new RouteParameterValue.Scalar(def, paramMap.has(def.name) ? paramMap.get(def.name) : undefined);
|
|
2476
|
+
}
|
|
2477
|
+
RouteParameterValue.create = create;
|
|
2478
|
+
/**
|
|
2479
|
+
* @template T
|
|
2480
|
+
*/
|
|
2481
|
+
var Scalar = /** @class */ (function (_super) {
|
|
2482
|
+
__extends(Scalar, _super);
|
|
2483
|
+
function Scalar() {
|
|
2484
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2485
|
+
}
|
|
2486
|
+
Object.defineProperty(Scalar.prototype, "value", {
|
|
2487
|
+
get: /**
|
|
2488
|
+
* @return {?}
|
|
2489
|
+
*/
|
|
2490
|
+
function () {
|
|
2491
|
+
return this.definition.type.parse(this.rawValue);
|
|
2492
|
+
},
|
|
2493
|
+
enumerable: true,
|
|
2494
|
+
configurable: true
|
|
2495
|
+
});
|
|
2496
|
+
/**
|
|
2497
|
+
* @param {?} otherValue
|
|
2498
|
+
* @return {?}
|
|
2499
|
+
*/
|
|
2500
|
+
Scalar.prototype.isSameValue = /**
|
|
2501
|
+
* @param {?} otherValue
|
|
2502
|
+
* @return {?}
|
|
2503
|
+
*/
|
|
2504
|
+
function (otherValue) {
|
|
2505
|
+
return this.value === otherValue;
|
|
2506
|
+
};
|
|
2507
|
+
/**
|
|
2508
|
+
* @param {?} value
|
|
2509
|
+
* @return {?}
|
|
2510
|
+
*/
|
|
2511
|
+
Scalar.prototype.replace = /**
|
|
2512
|
+
* @param {?} value
|
|
2513
|
+
* @return {?}
|
|
2514
|
+
*/
|
|
2515
|
+
function (value) {
|
|
2516
|
+
return new RouteParameterValue.Scalar(this.definition, this.isEmptyValue(value) ? undefined : this.definition.type.format(value));
|
|
2517
|
+
};
|
|
2518
|
+
/**
|
|
2519
|
+
* @return {?}
|
|
2520
|
+
*/
|
|
2521
|
+
Scalar.prototype.formattedValue = /**
|
|
2522
|
+
* @return {?}
|
|
2523
|
+
*/
|
|
2524
|
+
function () {
|
|
2525
|
+
return this.isEmpty() ? undefined : this.definition.type.format(this.value);
|
|
2526
|
+
};
|
|
2527
|
+
/**
|
|
2528
|
+
* @param {?} value
|
|
2529
|
+
* @return {?}
|
|
2530
|
+
*/
|
|
2531
|
+
Scalar.prototype.isEmptyValue = /**
|
|
2532
|
+
* @param {?} value
|
|
2533
|
+
* @return {?}
|
|
2534
|
+
*/
|
|
2535
|
+
function (value) {
|
|
2536
|
+
return ___default.isNil(value);
|
|
2537
|
+
};
|
|
2538
|
+
__decorate([
|
|
2539
|
+
Memoize$1(),
|
|
2540
|
+
__metadata("design:type", Object),
|
|
2541
|
+
__metadata("design:paramtypes", [])
|
|
2542
|
+
], Scalar.prototype, "value", null);
|
|
2543
|
+
return Scalar;
|
|
2544
|
+
}(RouteParameterValue));
|
|
2545
|
+
RouteParameterValue.Scalar = Scalar;
|
|
2546
|
+
/**
|
|
2547
|
+
* @template T
|
|
2548
|
+
*/
|
|
2549
|
+
var Array = /** @class */ (function (_super) {
|
|
2550
|
+
__extends(Array, _super);
|
|
2551
|
+
function Array() {
|
|
2552
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2553
|
+
}
|
|
2554
|
+
Object.defineProperty(Array.prototype, "value", {
|
|
2555
|
+
get: /**
|
|
2556
|
+
* @return {?}
|
|
2557
|
+
*/
|
|
2558
|
+
function () {
|
|
2559
|
+
var _this = this;
|
|
2560
|
+
return (this.rawValue || [])
|
|
2561
|
+
.filter((/**
|
|
2562
|
+
* @param {?} s
|
|
2563
|
+
* @return {?}
|
|
2564
|
+
*/
|
|
2565
|
+
function (s) { return !___default.isEmpty(s); }))
|
|
2566
|
+
.map((/**
|
|
2567
|
+
* @param {?} raw
|
|
2568
|
+
* @return {?}
|
|
2569
|
+
*/
|
|
2570
|
+
function (raw) { return _this.definition.type.parse(raw); }));
|
|
2571
|
+
},
|
|
2572
|
+
enumerable: true,
|
|
2573
|
+
configurable: true
|
|
2574
|
+
});
|
|
2575
|
+
/**
|
|
2576
|
+
* @param {?} otherValue
|
|
2577
|
+
* @return {?}
|
|
2578
|
+
*/
|
|
2579
|
+
Array.prototype.isSameValue = /**
|
|
2580
|
+
* @param {?} otherValue
|
|
2581
|
+
* @return {?}
|
|
2582
|
+
*/
|
|
2583
|
+
function (otherValue) {
|
|
2584
|
+
return ___default.isEqual(this.value, otherValue);
|
|
2585
|
+
};
|
|
2586
|
+
/**
|
|
2587
|
+
* @param {?} value
|
|
2588
|
+
* @return {?}
|
|
2589
|
+
*/
|
|
2590
|
+
Array.prototype.replace = /**
|
|
2591
|
+
* @param {?} value
|
|
2592
|
+
* @return {?}
|
|
2593
|
+
*/
|
|
2594
|
+
function (value) {
|
|
2595
|
+
var _this = this;
|
|
2596
|
+
return new RouteParameterValue.Array(this.definition, this.isEmptyValue(value) ? undefined : value.map((/**
|
|
2597
|
+
* @param {?} v
|
|
2598
|
+
* @return {?}
|
|
2599
|
+
*/
|
|
2600
|
+
function (v) { return _this.definition.type.format(v); })));
|
|
2601
|
+
};
|
|
2602
|
+
/**
|
|
2603
|
+
* @return {?}
|
|
2604
|
+
*/
|
|
2605
|
+
Array.prototype.formattedValue = /**
|
|
2606
|
+
* @return {?}
|
|
2607
|
+
*/
|
|
2608
|
+
function () {
|
|
2609
|
+
var _this = this;
|
|
2610
|
+
return this.isEmpty() ? [] : this.value.map((/**
|
|
2611
|
+
* @param {?} v
|
|
2612
|
+
* @return {?}
|
|
2613
|
+
*/
|
|
2614
|
+
function (v) { return _this.definition.type.format(v); }));
|
|
2615
|
+
};
|
|
2616
|
+
/**
|
|
2617
|
+
* @param {?} value
|
|
2618
|
+
* @return {?}
|
|
2619
|
+
*/
|
|
2620
|
+
Array.prototype.isEmptyValue = /**
|
|
2621
|
+
* @param {?} value
|
|
2622
|
+
* @return {?}
|
|
2623
|
+
*/
|
|
2624
|
+
function (value) {
|
|
2625
|
+
return ___default.isNil(value) || value.length < 1;
|
|
2626
|
+
};
|
|
2627
|
+
__decorate([
|
|
2628
|
+
Memoize$1(),
|
|
2629
|
+
__metadata("design:type", Array),
|
|
2630
|
+
__metadata("design:paramtypes", [])
|
|
2631
|
+
], Array.prototype, "value", null);
|
|
2632
|
+
return Array;
|
|
2633
|
+
}(RouteParameterValue));
|
|
2634
|
+
RouteParameterValue.Array = Array;
|
|
2635
|
+
})(RouteParameterValue || (RouteParameterValue = {}));
|
|
2636
|
+
|
|
2336
2637
|
/**
|
|
2337
2638
|
* @fileoverview added by tsickle
|
|
2338
2639
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -2491,66 +2792,38 @@ if (false) {
|
|
|
2491
2792
|
this.placeHistory = placeHistory;
|
|
2492
2793
|
}
|
|
2493
2794
|
/**
|
|
2494
|
-
* @param {?}
|
|
2495
|
-
* @param {?} value
|
|
2795
|
+
* @param {?} parameter
|
|
2496
2796
|
* @param {?=} visit
|
|
2497
2797
|
* @return {?}
|
|
2498
2798
|
*/
|
|
2499
2799
|
DefaultParameterSanitiser.prototype.sanitise = /**
|
|
2500
|
-
* @param {?}
|
|
2501
|
-
* @param {?} value
|
|
2800
|
+
* @param {?} parameter
|
|
2502
2801
|
* @param {?=} visit
|
|
2503
2802
|
* @return {?}
|
|
2504
2803
|
*/
|
|
2505
|
-
function (
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
* @return {?}
|
|
2514
|
-
*/
|
|
2515
|
-
function (v) { return v.getValueOf(parameterDef); }))
|
|
2516
|
-
.filter((/**
|
|
2517
|
-
* @param {?} v
|
|
2518
|
-
* @return {?}
|
|
2519
|
-
*/
|
|
2520
|
-
function (v) { return !___default.isNil(v); }))
|
|
2521
|
-
.find((/**
|
|
2522
|
-
* @param {?} v
|
|
2523
|
-
* @return {?}
|
|
2524
|
-
*/
|
|
2525
|
-
function (v) { return !_this.isBlank(parameterDef, v); }));
|
|
2804
|
+
function (parameter, visit) {
|
|
2805
|
+
/** @type {?} */
|
|
2806
|
+
var value = parameter.value;
|
|
2807
|
+
if (parameter.isMissing()) {
|
|
2808
|
+
/** @type {?} */
|
|
2809
|
+
var previousVisit = ___default.first(this.placeHistory.getHistory(visit.placeDefinition));
|
|
2810
|
+
if (this.remember && previousVisit) {
|
|
2811
|
+
value = previousVisit.getValueOf(parameter.definition);
|
|
2526
2812
|
}
|
|
2527
|
-
|
|
2813
|
+
/** @type {?} */
|
|
2814
|
+
var s = parameter.isEmptyValue(value) ? this.defaultValue : value;
|
|
2815
|
+
console.log("missing -> " + parameter.definition.name + ", returning " + s);
|
|
2816
|
+
return s;
|
|
2528
2817
|
}
|
|
2529
2818
|
else {
|
|
2819
|
+
console.log("not missing -> " + parameter.definition.name);
|
|
2530
2820
|
return value;
|
|
2531
2821
|
}
|
|
2532
2822
|
};
|
|
2533
|
-
/**
|
|
2534
|
-
* @private
|
|
2535
|
-
* @param {?} def
|
|
2536
|
-
* @param {?} value
|
|
2537
|
-
* @return {?}
|
|
2538
|
-
*/
|
|
2539
|
-
DefaultParameterSanitiser.prototype.isBlank = /**
|
|
2540
|
-
* @private
|
|
2541
|
-
* @param {?} def
|
|
2542
|
-
* @param {?} value
|
|
2543
|
-
* @return {?}
|
|
2544
|
-
*/
|
|
2545
|
-
function (def, value) {
|
|
2546
|
-
/** @type {?} */
|
|
2547
|
-
var isNil = ___default.isNil(value);
|
|
2548
|
-
return isNil ? true : def.isArray ? value['length'] < 1 : false;
|
|
2549
|
-
};
|
|
2550
2823
|
__decorate([
|
|
2551
2824
|
Trace(),
|
|
2552
2825
|
__metadata("design:type", Function),
|
|
2553
|
-
__metadata("design:paramtypes", [
|
|
2826
|
+
__metadata("design:paramtypes", [RouteParameterValue, Object]),
|
|
2554
2827
|
__metadata("design:returntype", Object)
|
|
2555
2828
|
], DefaultParameterSanitiser.prototype, "sanitise", null);
|
|
2556
2829
|
return DefaultParameterSanitiser;
|
|
@@ -2571,9 +2844,9 @@ if (false) {
|
|
|
2571
2844
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2572
2845
|
*/
|
|
2573
2846
|
var ParameterSnapshot = /** @class */ (function () {
|
|
2574
|
-
function ParameterSnapshot(placeDefinition,
|
|
2847
|
+
function ParameterSnapshot(placeDefinition, parameters) {
|
|
2575
2848
|
this.placeDefinition = placeDefinition;
|
|
2576
|
-
this.
|
|
2849
|
+
this.parameters = parameters;
|
|
2577
2850
|
}
|
|
2578
2851
|
/**
|
|
2579
2852
|
* @param {?} other
|
|
@@ -2588,18 +2861,18 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2588
2861
|
function (other, debug) {
|
|
2589
2862
|
if (debug === void 0) { debug = false; }
|
|
2590
2863
|
/** @type {?} */
|
|
2591
|
-
var changed = this.
|
|
2864
|
+
var changed = this.parameters.find((/**
|
|
2592
2865
|
* @param {?} r
|
|
2593
2866
|
* @return {?}
|
|
2594
2867
|
*/
|
|
2595
2868
|
function (r) {
|
|
2596
|
-
return
|
|
2869
|
+
return r.hasChanged(other.getValueOf(r.definition));
|
|
2597
2870
|
}));
|
|
2598
2871
|
if (changed && debug) {
|
|
2599
2872
|
console.log({
|
|
2600
|
-
name: changed.
|
|
2873
|
+
name: changed.definition.name,
|
|
2601
2874
|
mine: changed.value,
|
|
2602
|
-
theirs: other.getValueOf(changed.
|
|
2875
|
+
theirs: other.getValueOf(changed.definition)
|
|
2603
2876
|
});
|
|
2604
2877
|
}
|
|
2605
2878
|
return !!changed;
|
|
@@ -2615,11 +2888,11 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2615
2888
|
* @return {?}
|
|
2616
2889
|
*/
|
|
2617
2890
|
function (parameterDef) {
|
|
2618
|
-
return this.
|
|
2891
|
+
return this.parameters.find((/**
|
|
2619
2892
|
* @param {?} r
|
|
2620
2893
|
* @return {?}
|
|
2621
2894
|
*/
|
|
2622
|
-
function (r) { return r.
|
|
2895
|
+
function (r) { return r.definition === parameterDef; }));
|
|
2623
2896
|
};
|
|
2624
2897
|
/**
|
|
2625
2898
|
* @template T, S
|
|
@@ -2655,11 +2928,11 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2655
2928
|
*/
|
|
2656
2929
|
function (name) {
|
|
2657
2930
|
/** @type {?} */
|
|
2658
|
-
var resolvedParameter = this.
|
|
2931
|
+
var resolvedParameter = this.parameters.find((/**
|
|
2659
2932
|
* @param {?} r
|
|
2660
2933
|
* @return {?}
|
|
2661
2934
|
*/
|
|
2662
|
-
function (r) { return r.
|
|
2935
|
+
function (r) { return r.definition.name === name; }));
|
|
2663
2936
|
return resolvedParameter ? resolvedParameter.value : null;
|
|
2664
2937
|
};
|
|
2665
2938
|
/**
|
|
@@ -2673,11 +2946,11 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2673
2946
|
function () {
|
|
2674
2947
|
// RouteId's are never arrays: see parameter-decorators.ts createDefinition methods. It would be nice to
|
|
2675
2948
|
// capture this in the type system though
|
|
2676
|
-
return (/** @type {?} */ (this.
|
|
2949
|
+
return (/** @type {?} */ (this.parameters.find((/**
|
|
2677
2950
|
* @param {?} p
|
|
2678
2951
|
* @return {?}
|
|
2679
2952
|
*/
|
|
2680
|
-
function (p) { return p.
|
|
2953
|
+
function (p) { return p.definition.isRouteId; }))));
|
|
2681
2954
|
};
|
|
2682
2955
|
/**
|
|
2683
2956
|
* @private
|
|
@@ -2688,11 +2961,11 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2688
2961
|
* @return {?}
|
|
2689
2962
|
*/
|
|
2690
2963
|
function () {
|
|
2691
|
-
return this.
|
|
2964
|
+
return this.parameters.filter((/**
|
|
2692
2965
|
* @param {?} r
|
|
2693
2966
|
* @return {?}
|
|
2694
2967
|
*/
|
|
2695
|
-
function (r) { return !r.
|
|
2968
|
+
function (r) { return !r.definition.isRouteId; }));
|
|
2696
2969
|
};
|
|
2697
2970
|
/**
|
|
2698
2971
|
* @return {?}
|
|
@@ -2714,6 +2987,19 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2714
2987
|
var routeIdParam = this.getRouteIdParameter();
|
|
2715
2988
|
return routeIdParam ? routeIdParam.formattedValue() : null;
|
|
2716
2989
|
};
|
|
2990
|
+
/**
|
|
2991
|
+
* @return {?}
|
|
2992
|
+
*/
|
|
2993
|
+
ParameterSnapshot.prototype.getNonEmptyParameters = /**
|
|
2994
|
+
* @return {?}
|
|
2995
|
+
*/
|
|
2996
|
+
function () {
|
|
2997
|
+
return this.parameters.filter((/**
|
|
2998
|
+
* @param {?} p
|
|
2999
|
+
* @return {?}
|
|
3000
|
+
*/
|
|
3001
|
+
function (p) { return !p.isEmpty(); }));
|
|
3002
|
+
};
|
|
2717
3003
|
/**
|
|
2718
3004
|
* @return {?}
|
|
2719
3005
|
*/
|
|
@@ -2724,35 +3010,35 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2724
3010
|
/** @type {?} */
|
|
2725
3011
|
var params = {};
|
|
2726
3012
|
/** @type {?} */
|
|
2727
|
-
var routeIdParam = this.
|
|
3013
|
+
var routeIdParam = this.getNonEmptyParameters()
|
|
3014
|
+
.filter((/**
|
|
2728
3015
|
* @param {?} p
|
|
2729
3016
|
* @return {?}
|
|
2730
3017
|
*/
|
|
2731
|
-
function (p) { return !p.
|
|
3018
|
+
function (p) { return !p.definition.isRouteId; }))
|
|
3019
|
+
.forEach((/**
|
|
2732
3020
|
* @param {?} p
|
|
2733
3021
|
* @return {?}
|
|
2734
3022
|
*/
|
|
2735
|
-
function (p) {
|
|
2736
|
-
params[p.parameterDef.name] = p.formattedValue();
|
|
2737
|
-
}));
|
|
3023
|
+
function (p) { return params[p.definition.name] = p.formattedValue(); }));
|
|
2738
3024
|
return params;
|
|
2739
3025
|
};
|
|
2740
3026
|
/**
|
|
2741
3027
|
* @return {?}
|
|
2742
3028
|
*/
|
|
2743
|
-
ParameterSnapshot.prototype.
|
|
3029
|
+
ParameterSnapshot.prototype.getAllParameters = /**
|
|
2744
3030
|
* @return {?}
|
|
2745
3031
|
*/
|
|
2746
3032
|
function () {
|
|
2747
3033
|
/** @type {?} */
|
|
2748
3034
|
var params = {};
|
|
2749
3035
|
/** @type {?} */
|
|
2750
|
-
var routeIdParam = this.
|
|
3036
|
+
var routeIdParam = this.parameters.forEach((/**
|
|
2751
3037
|
* @param {?} p
|
|
2752
3038
|
* @return {?}
|
|
2753
3039
|
*/
|
|
2754
3040
|
function (p) {
|
|
2755
|
-
params[p.
|
|
3041
|
+
params[p.definition.name] = p.value;
|
|
2756
3042
|
}));
|
|
2757
3043
|
return params;
|
|
2758
3044
|
};
|
|
@@ -2769,12 +3055,12 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2769
3055
|
* @return {?}
|
|
2770
3056
|
*/
|
|
2771
3057
|
function (parameter, value) {
|
|
2772
|
-
return new ParameterSnapshot(this.placeDefinition, this.
|
|
3058
|
+
return new ParameterSnapshot(this.placeDefinition, this.parameters.map((/**
|
|
2773
3059
|
* @param {?} p
|
|
2774
3060
|
* @return {?}
|
|
2775
3061
|
*/
|
|
2776
3062
|
function (p) {
|
|
2777
|
-
return p.
|
|
3063
|
+
return p.definition === parameter ? p.replace(value) : p;
|
|
2778
3064
|
})));
|
|
2779
3065
|
};
|
|
2780
3066
|
/**
|
|
@@ -2796,10 +3082,10 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2796
3082
|
return [4 /*yield*/, routeId.sanitise(this, injector)];
|
|
2797
3083
|
case 1:
|
|
2798
3084
|
sanitisedValue = _a.sent();
|
|
2799
|
-
if (
|
|
3085
|
+
if (routeId.hasChanged(sanitisedValue)) {
|
|
2800
3086
|
// if the route id has changed we redirect immediately as other
|
|
2801
3087
|
// parameter sanitisers might use it.
|
|
2802
|
-
return [2 /*return*/, this.replace(routeId.
|
|
3088
|
+
return [2 /*return*/, this.replace(routeId.definition, sanitisedValue)];
|
|
2803
3089
|
}
|
|
2804
3090
|
_a.label = 2;
|
|
2805
3091
|
case 2:
|
|
@@ -2813,8 +3099,8 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2813
3099
|
return [4 /*yield*/, routeParameter.sanitise(this, injector)];
|
|
2814
3100
|
case 4:
|
|
2815
3101
|
sanitisedValue = _a.sent();
|
|
2816
|
-
if (
|
|
2817
|
-
result =
|
|
3102
|
+
if (routeParameter.hasChanged(sanitisedValue)) {
|
|
3103
|
+
result = result.replace(routeParameter.definition, sanitisedValue);
|
|
2818
3104
|
}
|
|
2819
3105
|
_a.label = 5;
|
|
2820
3106
|
case 5:
|
|
@@ -2825,12 +3111,12 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2825
3111
|
});
|
|
2826
3112
|
});
|
|
2827
3113
|
};
|
|
2828
|
-
var _a
|
|
3114
|
+
var _a;
|
|
2829
3115
|
__decorate([
|
|
2830
3116
|
Memoize$1(),
|
|
2831
3117
|
__metadata("design:type", Function),
|
|
2832
3118
|
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
2833
|
-
__metadata("design:returntype",
|
|
3119
|
+
__metadata("design:returntype", RouteParameterValue)
|
|
2834
3120
|
], ParameterSnapshot.prototype, "getParameter", null);
|
|
2835
3121
|
__decorate([
|
|
2836
3122
|
Memoize$1(),
|
|
@@ -2848,7 +3134,7 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2848
3134
|
Memoize$1(),
|
|
2849
3135
|
__metadata("design:type", Function),
|
|
2850
3136
|
__metadata("design:paramtypes", []),
|
|
2851
|
-
__metadata("design:returntype",
|
|
3137
|
+
__metadata("design:returntype", RouteParameterValue.Scalar)
|
|
2852
3138
|
], ParameterSnapshot.prototype, "getRouteIdParameter", null);
|
|
2853
3139
|
__decorate([
|
|
2854
3140
|
Memoize$1(),
|
|
@@ -2859,15 +3145,9 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2859
3145
|
__decorate([
|
|
2860
3146
|
Trace(),
|
|
2861
3147
|
__metadata("design:type", Function),
|
|
2862
|
-
__metadata("design:paramtypes", [
|
|
2863
|
-
__metadata("design:returntype",
|
|
2864
|
-
], ParameterSnapshot.prototype, "
|
|
2865
|
-
__decorate([
|
|
2866
|
-
Trace(),
|
|
2867
|
-
__metadata("design:type", Function),
|
|
2868
|
-
__metadata("design:paramtypes", [Injector]),
|
|
2869
|
-
__metadata("design:returntype", Promise)
|
|
2870
|
-
], ParameterSnapshot.prototype, "sanitise", null);
|
|
3148
|
+
__metadata("design:paramtypes", []),
|
|
3149
|
+
__metadata("design:returntype", void 0)
|
|
3150
|
+
], ParameterSnapshot.prototype, "getFormattedParameters", null);
|
|
2871
3151
|
return ParameterSnapshot;
|
|
2872
3152
|
}());
|
|
2873
3153
|
if (false) {
|
|
@@ -2877,7 +3157,7 @@ if (false) {
|
|
|
2877
3157
|
* @type {?}
|
|
2878
3158
|
* @private
|
|
2879
3159
|
*/
|
|
2880
|
-
ParameterSnapshot.prototype.
|
|
3160
|
+
ParameterSnapshot.prototype.parameters;
|
|
2881
3161
|
}
|
|
2882
3162
|
(function (ParameterSnapshot) {
|
|
2883
3163
|
/**
|
|
@@ -2890,31 +3170,11 @@ if (false) {
|
|
|
2890
3170
|
/** @type {?} */
|
|
2891
3171
|
var paramMap = new ConsolidatedParameterMap(params, urlSegments);
|
|
2892
3172
|
/** @type {?} */
|
|
2893
|
-
var resolvedParameters = placeDef.getRouteParameters()
|
|
2894
|
-
.map((/**
|
|
3173
|
+
var resolvedParameters = placeDef.getRouteParameters().map((/**
|
|
2895
3174
|
* @param {?} def
|
|
2896
3175
|
* @return {?}
|
|
2897
3176
|
*/
|
|
2898
|
-
function (def) {
|
|
2899
|
-
if (def.isArray) {
|
|
2900
|
-
/** @type {?} */
|
|
2901
|
-
var value = paramMap.has(def.name) ? paramMap.getAll(def.name).filter((/**
|
|
2902
|
-
* @param {?} s
|
|
2903
|
-
* @return {?}
|
|
2904
|
-
*/
|
|
2905
|
-
function (s) { return !___default.isEmpty(s); })).map((/**
|
|
2906
|
-
* @param {?} raw
|
|
2907
|
-
* @return {?}
|
|
2908
|
-
*/
|
|
2909
|
-
function (raw) { return def.type.parse(raw); })) : null;
|
|
2910
|
-
return new ResolvedArrayParameter(def, value);
|
|
2911
|
-
}
|
|
2912
|
-
else {
|
|
2913
|
-
/** @type {?} */
|
|
2914
|
-
var value = paramMap.has(def.name) ? def.type.parse(paramMap.get(def.name)) : null;
|
|
2915
|
-
return new ResolvedValueParameter(def, value);
|
|
2916
|
-
}
|
|
2917
|
-
}));
|
|
3177
|
+
function (def) { return RouteParameterValue.create(def, paramMap); }));
|
|
2918
3178
|
return new ParameterSnapshot(placeDef, resolvedParameters);
|
|
2919
3179
|
}
|
|
2920
3180
|
ParameterSnapshot.create = create;
|
|
@@ -2923,12 +3183,7 @@ if (false) {
|
|
|
2923
3183
|
* include the segment params in the paramMap as well as each segment returns an empty
|
|
2924
3184
|
* param map even when `parameter`s has content.
|
|
2925
3185
|
*/
|
|
2926
|
-
var /**
|
|
2927
|
-
* This a work around for the fact that an activated route with multiple segments doesn't
|
|
2928
|
-
* include the segment params in the paramMap as well as each segment returns an empty
|
|
2929
|
-
* param map even when `parameter`s has content.
|
|
2930
|
-
*/
|
|
2931
|
-
ConsolidatedParameterMap = /** @class */ (function () {
|
|
3186
|
+
var ConsolidatedParameterMap = /** @class */ (function () {
|
|
2932
3187
|
function ConsolidatedParameterMap(paramMap, urlSegments) {
|
|
2933
3188
|
this.paramMaps = [paramMap].concat((urlSegments || []).map((/**
|
|
2934
3189
|
* @param {?} s
|
|
@@ -2985,6 +3240,26 @@ if (false) {
|
|
|
2985
3240
|
*/
|
|
2986
3241
|
function (m) { return m.has(name); }));
|
|
2987
3242
|
};
|
|
3243
|
+
Object.defineProperty(ConsolidatedParameterMap.prototype, "keys", {
|
|
3244
|
+
get: /**
|
|
3245
|
+
* @return {?}
|
|
3246
|
+
*/
|
|
3247
|
+
function () {
|
|
3248
|
+
return this.paramMaps.reduce((/**
|
|
3249
|
+
* @param {?} result
|
|
3250
|
+
* @param {?} params
|
|
3251
|
+
* @return {?}
|
|
3252
|
+
*/
|
|
3253
|
+
function (result, params) { return result.concat(params.keys); }), []);
|
|
3254
|
+
},
|
|
3255
|
+
enumerable: true,
|
|
3256
|
+
configurable: true
|
|
3257
|
+
});
|
|
3258
|
+
__decorate([
|
|
3259
|
+
Memoize$1(),
|
|
3260
|
+
__metadata("design:type", Array),
|
|
3261
|
+
__metadata("design:paramtypes", [])
|
|
3262
|
+
], ConsolidatedParameterMap.prototype, "keys", null);
|
|
2988
3263
|
return ConsolidatedParameterMap;
|
|
2989
3264
|
}());
|
|
2990
3265
|
if (false) {
|
|
@@ -3052,207 +3327,6 @@ if (false) {
|
|
|
3052
3327
|
*/
|
|
3053
3328
|
ParamMapAdapter.prototype.params;
|
|
3054
3329
|
}
|
|
3055
|
-
/**
|
|
3056
|
-
* @abstract
|
|
3057
|
-
* @template T, S
|
|
3058
|
-
*/
|
|
3059
|
-
var /**
|
|
3060
|
-
* @abstract
|
|
3061
|
-
* @template T, S
|
|
3062
|
-
*/
|
|
3063
|
-
ResolvedParameter = /** @class */ (function () {
|
|
3064
|
-
function ResolvedParameter(parameterDef, value) {
|
|
3065
|
-
this.parameterDef = parameterDef;
|
|
3066
|
-
this.value = value;
|
|
3067
|
-
}
|
|
3068
|
-
/**
|
|
3069
|
-
* @return {?}
|
|
3070
|
-
*/
|
|
3071
|
-
ResolvedParameter.prototype.isRouteId = /**
|
|
3072
|
-
* @return {?}
|
|
3073
|
-
*/
|
|
3074
|
-
function () {
|
|
3075
|
-
return this.parameterDef.isRouteId;
|
|
3076
|
-
};
|
|
3077
|
-
/**
|
|
3078
|
-
* @param {?} visit
|
|
3079
|
-
* @param {?} injector
|
|
3080
|
-
* @return {?}
|
|
3081
|
-
*/
|
|
3082
|
-
ResolvedParameter.prototype.sanitise = /**
|
|
3083
|
-
* @param {?} visit
|
|
3084
|
-
* @param {?} injector
|
|
3085
|
-
* @return {?}
|
|
3086
|
-
*/
|
|
3087
|
-
function (visit, injector) {
|
|
3088
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3089
|
-
var sanitiser;
|
|
3090
|
-
return __generator(this, function (_a) {
|
|
3091
|
-
sanitiser = this.parameterDef.getSanitiser(injector);
|
|
3092
|
-
if (sanitiser) {
|
|
3093
|
-
return [2 /*return*/, sanitiser.sanitise(this.parameterDef, this.value, visit)];
|
|
3094
|
-
}
|
|
3095
|
-
else {
|
|
3096
|
-
return [2 /*return*/, this.value];
|
|
3097
|
-
}
|
|
3098
|
-
return [2 /*return*/];
|
|
3099
|
-
});
|
|
3100
|
-
});
|
|
3101
|
-
};
|
|
3102
|
-
return ResolvedParameter;
|
|
3103
|
-
}());
|
|
3104
|
-
ParameterSnapshot.ResolvedParameter = ResolvedParameter;
|
|
3105
|
-
if (false) {
|
|
3106
|
-
/** @type {?} */
|
|
3107
|
-
ResolvedParameter.prototype.parameterDef;
|
|
3108
|
-
/** @type {?} */
|
|
3109
|
-
ResolvedParameter.prototype.value;
|
|
3110
|
-
/**
|
|
3111
|
-
* @abstract
|
|
3112
|
-
* @param {?} dest
|
|
3113
|
-
* @return {?}
|
|
3114
|
-
*/
|
|
3115
|
-
ResolvedParameter.prototype.injectRouteParam = function (dest) { };
|
|
3116
|
-
/**
|
|
3117
|
-
* @abstract
|
|
3118
|
-
* @param {?} otherValue
|
|
3119
|
-
* @return {?}
|
|
3120
|
-
*/
|
|
3121
|
-
ResolvedParameter.prototype.isSame = function (otherValue) { };
|
|
3122
|
-
/**
|
|
3123
|
-
* @abstract
|
|
3124
|
-
* @return {?}
|
|
3125
|
-
*/
|
|
3126
|
-
ResolvedParameter.prototype.formattedValue = function () { };
|
|
3127
|
-
/**
|
|
3128
|
-
* @abstract
|
|
3129
|
-
* @param {?} value
|
|
3130
|
-
* @return {?}
|
|
3131
|
-
*/
|
|
3132
|
-
ResolvedParameter.prototype.replace = function (value) { };
|
|
3133
|
-
}
|
|
3134
|
-
/**
|
|
3135
|
-
* @template T
|
|
3136
|
-
*/
|
|
3137
|
-
var /**
|
|
3138
|
-
* @template T
|
|
3139
|
-
*/
|
|
3140
|
-
ResolvedValueParameter = /** @class */ (function (_super) {
|
|
3141
|
-
__extends(ResolvedValueParameter, _super);
|
|
3142
|
-
function ResolvedValueParameter() {
|
|
3143
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3144
|
-
}
|
|
3145
|
-
/**
|
|
3146
|
-
* @param {?} otherValue
|
|
3147
|
-
* @return {?}
|
|
3148
|
-
*/
|
|
3149
|
-
ResolvedValueParameter.prototype.isSame = /**
|
|
3150
|
-
* @param {?} otherValue
|
|
3151
|
-
* @return {?}
|
|
3152
|
-
*/
|
|
3153
|
-
function (otherValue) {
|
|
3154
|
-
return this.value === otherValue;
|
|
3155
|
-
};
|
|
3156
|
-
/**
|
|
3157
|
-
* @param {?} dest
|
|
3158
|
-
* @return {?}
|
|
3159
|
-
*/
|
|
3160
|
-
ResolvedValueParameter.prototype.injectRouteParam = /**
|
|
3161
|
-
* @param {?} dest
|
|
3162
|
-
* @return {?}
|
|
3163
|
-
*/
|
|
3164
|
-
function (dest) {
|
|
3165
|
-
dest[this.parameterDef.name] = this.parameterDef.type.format(this.value);
|
|
3166
|
-
};
|
|
3167
|
-
/**
|
|
3168
|
-
* @param {?} value
|
|
3169
|
-
* @return {?}
|
|
3170
|
-
*/
|
|
3171
|
-
ResolvedValueParameter.prototype.replace = /**
|
|
3172
|
-
* @param {?} value
|
|
3173
|
-
* @return {?}
|
|
3174
|
-
*/
|
|
3175
|
-
function (value) {
|
|
3176
|
-
return new ResolvedValueParameter(this.parameterDef, value);
|
|
3177
|
-
};
|
|
3178
|
-
/**
|
|
3179
|
-
* @return {?}
|
|
3180
|
-
*/
|
|
3181
|
-
ResolvedValueParameter.prototype.formattedValue = /**
|
|
3182
|
-
* @return {?}
|
|
3183
|
-
*/
|
|
3184
|
-
function () {
|
|
3185
|
-
return !___default.isNil(this.value) ? this.parameterDef.type.format(this.value) : null;
|
|
3186
|
-
};
|
|
3187
|
-
return ResolvedValueParameter;
|
|
3188
|
-
}(ResolvedParameter));
|
|
3189
|
-
ParameterSnapshot.ResolvedValueParameter = ResolvedValueParameter;
|
|
3190
|
-
/**
|
|
3191
|
-
* @template T
|
|
3192
|
-
*/
|
|
3193
|
-
var /**
|
|
3194
|
-
* @template T
|
|
3195
|
-
*/
|
|
3196
|
-
ResolvedArrayParameter = /** @class */ (function (_super) {
|
|
3197
|
-
__extends(ResolvedArrayParameter, _super);
|
|
3198
|
-
function ResolvedArrayParameter() {
|
|
3199
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3200
|
-
}
|
|
3201
|
-
/**
|
|
3202
|
-
* @param {?} otherValue
|
|
3203
|
-
* @return {?}
|
|
3204
|
-
*/
|
|
3205
|
-
ResolvedArrayParameter.prototype.isSame = /**
|
|
3206
|
-
* @param {?} otherValue
|
|
3207
|
-
* @return {?}
|
|
3208
|
-
*/
|
|
3209
|
-
function (otherValue) {
|
|
3210
|
-
return ___default.isEqual(this.value, otherValue);
|
|
3211
|
-
};
|
|
3212
|
-
/**
|
|
3213
|
-
* @param {?} dest
|
|
3214
|
-
* @return {?}
|
|
3215
|
-
*/
|
|
3216
|
-
ResolvedArrayParameter.prototype.injectRouteParam = /**
|
|
3217
|
-
* @param {?} dest
|
|
3218
|
-
* @return {?}
|
|
3219
|
-
*/
|
|
3220
|
-
function (dest) {
|
|
3221
|
-
var _this = this;
|
|
3222
|
-
dest[this.parameterDef.name] = this.value.map((/**
|
|
3223
|
-
* @param {?} v
|
|
3224
|
-
* @return {?}
|
|
3225
|
-
*/
|
|
3226
|
-
function (v) { return _this.parameterDef.type.format(v); }));
|
|
3227
|
-
};
|
|
3228
|
-
/**
|
|
3229
|
-
* @param {?} value
|
|
3230
|
-
* @return {?}
|
|
3231
|
-
*/
|
|
3232
|
-
ResolvedArrayParameter.prototype.replace = /**
|
|
3233
|
-
* @param {?} value
|
|
3234
|
-
* @return {?}
|
|
3235
|
-
*/
|
|
3236
|
-
function (value) {
|
|
3237
|
-
return new ResolvedArrayParameter(this.parameterDef, value);
|
|
3238
|
-
};
|
|
3239
|
-
/**
|
|
3240
|
-
* @return {?}
|
|
3241
|
-
*/
|
|
3242
|
-
ResolvedArrayParameter.prototype.formattedValue = /**
|
|
3243
|
-
* @return {?}
|
|
3244
|
-
*/
|
|
3245
|
-
function () {
|
|
3246
|
-
var _this = this;
|
|
3247
|
-
return this.value ? this.value.map((/**
|
|
3248
|
-
* @param {?} v
|
|
3249
|
-
* @return {?}
|
|
3250
|
-
*/
|
|
3251
|
-
function (v) { return _this.parameterDef.type.format(v); })) : [];
|
|
3252
|
-
};
|
|
3253
|
-
return ResolvedArrayParameter;
|
|
3254
|
-
}(ResolvedParameter));
|
|
3255
|
-
ParameterSnapshot.ResolvedArrayParameter = ResolvedArrayParameter;
|
|
3256
3330
|
})(ParameterSnapshot || (ParameterSnapshot = {}));
|
|
3257
3331
|
|
|
3258
3332
|
/**
|
|
@@ -3378,8 +3452,8 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
3378
3452
|
* @return {?}
|
|
3379
3453
|
*/
|
|
3380
3454
|
function (next, previous) {
|
|
3381
|
-
_this.pushChangesToRoute(next, previous);
|
|
3382
3455
|
_this.placeHistory.add(next); // the above route change doesn't seem to propagate back in, so I'm add the state to the history manually for now.
|
|
3456
|
+
_this.pushChangesToRoute(next, previous);
|
|
3383
3457
|
}), {
|
|
3384
3458
|
unless: _this.incomingRouteChange
|
|
3385
3459
|
});
|
|
@@ -4251,7 +4325,7 @@ var PlaceRouteGuard = /** @class */ (function () {
|
|
|
4251
4325
|
* @return {?}
|
|
4252
4326
|
*/
|
|
4253
4327
|
function (sanitised) {
|
|
4254
|
-
Logger.get(_this).info("ParameterSnapshot.sanitise",
|
|
4328
|
+
Logger.get(_this).info("ParameterSnapshot.sanitise ->", sanitised.getAllParameters());
|
|
4255
4329
|
if (sanitised.hasChanged(snapshot_1, true)) {
|
|
4256
4330
|
return _this.placeRouter.getRedirectUrlTree(activatedRoute, sanitised);
|
|
4257
4331
|
}
|
|
@@ -4406,12 +4480,11 @@ function RouteParameterList(elementType, options) {
|
|
|
4406
4480
|
function ParameterSanitiser() { }
|
|
4407
4481
|
if (false) {
|
|
4408
4482
|
/**
|
|
4409
|
-
* @param {?}
|
|
4410
|
-
* @param {?} value
|
|
4483
|
+
* @param {?} paramter
|
|
4411
4484
|
* @param {?=} visit
|
|
4412
4485
|
* @return {?}
|
|
4413
4486
|
*/
|
|
4414
|
-
ParameterSanitiser.prototype.sanitise = function (
|
|
4487
|
+
ParameterSanitiser.prototype.sanitise = function (paramter, visit) { };
|
|
4415
4488
|
}
|
|
4416
4489
|
|
|
4417
4490
|
/**
|
|
@@ -4507,431 +4580,6 @@ var ParameterType;
|
|
|
4507
4580
|
ParameterType.BOOLEAN = new BooleanType();
|
|
4508
4581
|
})(ParameterType || (ParameterType = {}));
|
|
4509
4582
|
|
|
4510
|
-
/**
|
|
4511
|
-
* @fileoverview added by tsickle
|
|
4512
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4513
|
-
*/
|
|
4514
|
-
/**
|
|
4515
|
-
* @template T, S
|
|
4516
|
-
*/
|
|
4517
|
-
var /**
|
|
4518
|
-
* @template T, S
|
|
4519
|
-
*/
|
|
4520
|
-
Sanitiser = /** @class */ (function () {
|
|
4521
|
-
function Sanitiser(parameterDef, snapshot, sanitiser) {
|
|
4522
|
-
this.parameterDef = parameterDef;
|
|
4523
|
-
this.snapshot = snapshot;
|
|
4524
|
-
this.sanitiser = sanitiser;
|
|
4525
|
-
}
|
|
4526
|
-
/**
|
|
4527
|
-
* @return {?}
|
|
4528
|
-
*/
|
|
4529
|
-
Sanitiser.prototype.isRouteId = /**
|
|
4530
|
-
* @return {?}
|
|
4531
|
-
*/
|
|
4532
|
-
function () {
|
|
4533
|
-
return this.parameterDef.isRouteId;
|
|
4534
|
-
};
|
|
4535
|
-
Object.defineProperty(Sanitiser.prototype, "valueChanged", {
|
|
4536
|
-
get: /**
|
|
4537
|
-
* @return {?}
|
|
4538
|
-
*/
|
|
4539
|
-
function () {
|
|
4540
|
-
return !___default.isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
|
|
4541
|
-
},
|
|
4542
|
-
enumerable: true,
|
|
4543
|
-
configurable: true
|
|
4544
|
-
});
|
|
4545
|
-
Object.defineProperty(Sanitiser.prototype, "sanitisedValue", {
|
|
4546
|
-
get: /**
|
|
4547
|
-
* @return {?}
|
|
4548
|
-
*/
|
|
4549
|
-
function () {
|
|
4550
|
-
return this._sanitisedValue;
|
|
4551
|
-
},
|
|
4552
|
-
enumerable: true,
|
|
4553
|
-
configurable: true
|
|
4554
|
-
});
|
|
4555
|
-
/**
|
|
4556
|
-
* @protected
|
|
4557
|
-
* @param {?} snapshot
|
|
4558
|
-
* @return {?}
|
|
4559
|
-
*/
|
|
4560
|
-
Sanitiser.prototype.readFrom = /**
|
|
4561
|
-
* @protected
|
|
4562
|
-
* @param {?} snapshot
|
|
4563
|
-
* @return {?}
|
|
4564
|
-
*/
|
|
4565
|
-
function (snapshot) {
|
|
4566
|
-
return lang.abstractMethod(this.constructor);
|
|
4567
|
-
};
|
|
4568
|
-
/**
|
|
4569
|
-
* @protected
|
|
4570
|
-
* @param {?} initialValue
|
|
4571
|
-
* @param {?} sanitisedValue
|
|
4572
|
-
* @return {?}
|
|
4573
|
-
*/
|
|
4574
|
-
Sanitiser.prototype.hasChanged = /**
|
|
4575
|
-
* @protected
|
|
4576
|
-
* @param {?} initialValue
|
|
4577
|
-
* @param {?} sanitisedValue
|
|
4578
|
-
* @return {?}
|
|
4579
|
-
*/
|
|
4580
|
-
function (initialValue, sanitisedValue) {
|
|
4581
|
-
return lang.abstractMethod(this.constructor);
|
|
4582
|
-
};
|
|
4583
|
-
/**
|
|
4584
|
-
* @param {?} dest
|
|
4585
|
-
* @return {?}
|
|
4586
|
-
*/
|
|
4587
|
-
Sanitiser.prototype.injectRouteParam = /**
|
|
4588
|
-
* @param {?} dest
|
|
4589
|
-
* @return {?}
|
|
4590
|
-
*/
|
|
4591
|
-
function (dest) {
|
|
4592
|
-
lang.abstractMethod(this.constructor);
|
|
4593
|
-
};
|
|
4594
|
-
/**
|
|
4595
|
-
* @return {?}
|
|
4596
|
-
*/
|
|
4597
|
-
Sanitiser.prototype.sanitize = /**
|
|
4598
|
-
* @return {?}
|
|
4599
|
-
*/
|
|
4600
|
-
function () {
|
|
4601
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4602
|
-
var _a;
|
|
4603
|
-
return __generator(this, function (_b) {
|
|
4604
|
-
switch (_b.label) {
|
|
4605
|
-
case 0:
|
|
4606
|
-
if (!this.sanitiser) return [3 /*break*/, 2];
|
|
4607
|
-
this.initialValue = this.readFrom(this.snapshot);
|
|
4608
|
-
_a = this;
|
|
4609
|
-
return [4 /*yield*/, this.sanitiser.sanitise(null, this.initialValue)];
|
|
4610
|
-
case 1:
|
|
4611
|
-
_a._sanitisedValue = _b.sent();
|
|
4612
|
-
if (this.initialValue !== this._sanitisedValue) {
|
|
4613
|
-
return [2 /*return*/, false];
|
|
4614
|
-
}
|
|
4615
|
-
_b.label = 2;
|
|
4616
|
-
case 2: return [2 /*return*/, true];
|
|
4617
|
-
}
|
|
4618
|
-
});
|
|
4619
|
-
});
|
|
4620
|
-
};
|
|
4621
|
-
return Sanitiser;
|
|
4622
|
-
}());
|
|
4623
|
-
if (false) {
|
|
4624
|
-
/**
|
|
4625
|
-
* @type {?}
|
|
4626
|
-
* @private
|
|
4627
|
-
*/
|
|
4628
|
-
Sanitiser.prototype.initialValue;
|
|
4629
|
-
/**
|
|
4630
|
-
* @type {?}
|
|
4631
|
-
* @private
|
|
4632
|
-
*/
|
|
4633
|
-
Sanitiser.prototype._sanitisedValue;
|
|
4634
|
-
/** @type {?} */
|
|
4635
|
-
Sanitiser.prototype.parameterDef;
|
|
4636
|
-
/** @type {?} */
|
|
4637
|
-
Sanitiser.prototype.snapshot;
|
|
4638
|
-
/** @type {?} */
|
|
4639
|
-
Sanitiser.prototype.sanitiser;
|
|
4640
|
-
}
|
|
4641
|
-
var RouteParameterSanitiser = /** @class */ (function () {
|
|
4642
|
-
function RouteParameterSanitiser(parameterDefs, snapshot, injector) {
|
|
4643
|
-
var _this = this;
|
|
4644
|
-
this.parameterDefs = parameterDefs;
|
|
4645
|
-
this.snapshot = snapshot;
|
|
4646
|
-
this.injector = injector;
|
|
4647
|
-
this.parameterSanitisers = [];
|
|
4648
|
-
/** @type {?} */
|
|
4649
|
-
var sanitisers = parameterDefs.map((/**
|
|
4650
|
-
* @param {?} def
|
|
4651
|
-
* @return {?}
|
|
4652
|
-
*/
|
|
4653
|
-
function (def) {
|
|
4654
|
-
return def.isArray ?
|
|
4655
|
-
new Sanitiser.Array(def, snapshot, _this.getSanitiser(def)) :
|
|
4656
|
-
new Sanitiser.Value(def, snapshot, _this.getSanitiser(def));
|
|
4657
|
-
}));
|
|
4658
|
-
this.routeIdSanitiser = sanitisers.find((/**
|
|
4659
|
-
* @param {?} p
|
|
4660
|
-
* @return {?}
|
|
4661
|
-
*/
|
|
4662
|
-
function (p) { return p.isRouteId(); }));
|
|
4663
|
-
this.parameterSanitisers = sanitisers.filter((/**
|
|
4664
|
-
* @param {?} p
|
|
4665
|
-
* @return {?}
|
|
4666
|
-
*/
|
|
4667
|
-
function (p) { return !p.isRouteId(); }));
|
|
4668
|
-
}
|
|
4669
|
-
/**
|
|
4670
|
-
* @return {?}
|
|
4671
|
-
*/
|
|
4672
|
-
RouteParameterSanitiser.prototype.sanitise = /**
|
|
4673
|
-
* @return {?}
|
|
4674
|
-
*/
|
|
4675
|
-
function () {
|
|
4676
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4677
|
-
var e_1, _a, _b, _c, sanitiser, e_1_1;
|
|
4678
|
-
return __generator(this, function (_d) {
|
|
4679
|
-
switch (_d.label) {
|
|
4680
|
-
case 0:
|
|
4681
|
-
if (!this.routeIdSanitiser) return [3 /*break*/, 2];
|
|
4682
|
-
return [4 /*yield*/, this.routeIdSanitiser.sanitize()];
|
|
4683
|
-
case 1:
|
|
4684
|
-
_d.sent();
|
|
4685
|
-
if (this.routeIdSanitiser.valueChanged) {
|
|
4686
|
-
// if the route id isn't ok we redirect immediately as the query params may need to be sanitised in the
|
|
4687
|
-
// context of the route id.
|
|
4688
|
-
return [2 /*return*/, false];
|
|
4689
|
-
}
|
|
4690
|
-
_d.label = 2;
|
|
4691
|
-
case 2:
|
|
4692
|
-
_d.trys.push([2, 7, 8, 9]);
|
|
4693
|
-
_b = __values(this.parameterSanitisers), _c = _b.next();
|
|
4694
|
-
_d.label = 3;
|
|
4695
|
-
case 3:
|
|
4696
|
-
if (!!_c.done) return [3 /*break*/, 6];
|
|
4697
|
-
sanitiser = _c.value;
|
|
4698
|
-
return [4 /*yield*/, sanitiser.sanitize()];
|
|
4699
|
-
case 4:
|
|
4700
|
-
_d.sent();
|
|
4701
|
-
_d.label = 5;
|
|
4702
|
-
case 5:
|
|
4703
|
-
_c = _b.next();
|
|
4704
|
-
return [3 /*break*/, 3];
|
|
4705
|
-
case 6: return [3 /*break*/, 9];
|
|
4706
|
-
case 7:
|
|
4707
|
-
e_1_1 = _d.sent();
|
|
4708
|
-
e_1 = { error: e_1_1 };
|
|
4709
|
-
return [3 /*break*/, 9];
|
|
4710
|
-
case 8:
|
|
4711
|
-
try {
|
|
4712
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4713
|
-
}
|
|
4714
|
-
finally { if (e_1) throw e_1.error; }
|
|
4715
|
-
return [7 /*endfinally*/];
|
|
4716
|
-
case 9: return [2 /*return*/, !this.parameterSanitisers.find((/**
|
|
4717
|
-
* @param {?} s
|
|
4718
|
-
* @return {?}
|
|
4719
|
-
*/
|
|
4720
|
-
function (s) { return s.valueChanged; }))];
|
|
4721
|
-
}
|
|
4722
|
-
});
|
|
4723
|
-
});
|
|
4724
|
-
};
|
|
4725
|
-
/**
|
|
4726
|
-
* @private
|
|
4727
|
-
* @template T, S
|
|
4728
|
-
* @param {?} def
|
|
4729
|
-
* @return {?}
|
|
4730
|
-
*/
|
|
4731
|
-
RouteParameterSanitiser.prototype.getSanitiser = /**
|
|
4732
|
-
* @private
|
|
4733
|
-
* @template T, S
|
|
4734
|
-
* @param {?} def
|
|
4735
|
-
* @return {?}
|
|
4736
|
-
*/
|
|
4737
|
-
function (def) {
|
|
4738
|
-
return def.getSanitiser(this.injector);
|
|
4739
|
-
};
|
|
4740
|
-
/**
|
|
4741
|
-
* @return {?}
|
|
4742
|
-
*/
|
|
4743
|
-
RouteParameterSanitiser.prototype.routeIdHasChanged = /**
|
|
4744
|
-
* @return {?}
|
|
4745
|
-
*/
|
|
4746
|
-
function () {
|
|
4747
|
-
assert.isTruthy(this.parameterSanitisers.length !== 0);
|
|
4748
|
-
return this.routeIdSanitiser && this.routeIdSanitiser.valueChanged;
|
|
4749
|
-
};
|
|
4750
|
-
// @Trace()
|
|
4751
|
-
// @Trace()
|
|
4752
|
-
/**
|
|
4753
|
-
* @return {?}
|
|
4754
|
-
*/
|
|
4755
|
-
RouteParameterSanitiser.prototype.getRedirectParams =
|
|
4756
|
-
// @Trace()
|
|
4757
|
-
/**
|
|
4758
|
-
* @return {?}
|
|
4759
|
-
*/
|
|
4760
|
-
function () {
|
|
4761
|
-
if (this.routeIdHasChanged()) {
|
|
4762
|
-
return [this.routeIdSanitiser.sanitisedValue];
|
|
4763
|
-
}
|
|
4764
|
-
else {
|
|
4765
|
-
/** @type {?} */
|
|
4766
|
-
var routeParams_1 = {};
|
|
4767
|
-
this.parameterSanitisers.forEach((/**
|
|
4768
|
-
* @param {?} s
|
|
4769
|
-
* @return {?}
|
|
4770
|
-
*/
|
|
4771
|
-
function (s) { return s.injectRouteParam(routeParams_1); }));
|
|
4772
|
-
return [routeParams_1];
|
|
4773
|
-
}
|
|
4774
|
-
};
|
|
4775
|
-
/**
|
|
4776
|
-
* @private
|
|
4777
|
-
* @template S
|
|
4778
|
-
* @param {?} value
|
|
4779
|
-
* @return {?}
|
|
4780
|
-
*/
|
|
4781
|
-
RouteParameterSanitiser.prototype.isSanitiserContructor = /**
|
|
4782
|
-
* @private
|
|
4783
|
-
* @template S
|
|
4784
|
-
* @param {?} value
|
|
4785
|
-
* @return {?}
|
|
4786
|
-
*/
|
|
4787
|
-
function (value) {
|
|
4788
|
-
return ___default.isFunction(value) && lang.constructorChain((/** @type {?} */ ((/** @type {?} */ (value))))).includes(Sanitiser);
|
|
4789
|
-
};
|
|
4790
|
-
__decorate([
|
|
4791
|
-
Memoize$1(),
|
|
4792
|
-
__metadata("design:type", Function),
|
|
4793
|
-
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
4794
|
-
__metadata("design:returntype", Object)
|
|
4795
|
-
], RouteParameterSanitiser.prototype, "getSanitiser", null);
|
|
4796
|
-
return RouteParameterSanitiser;
|
|
4797
|
-
}());
|
|
4798
|
-
if (false) {
|
|
4799
|
-
/**
|
|
4800
|
-
* @type {?}
|
|
4801
|
-
* @private
|
|
4802
|
-
*/
|
|
4803
|
-
RouteParameterSanitiser.prototype.routeIdSanitiser;
|
|
4804
|
-
/**
|
|
4805
|
-
* @type {?}
|
|
4806
|
-
* @private
|
|
4807
|
-
*/
|
|
4808
|
-
RouteParameterSanitiser.prototype.parameterSanitisers;
|
|
4809
|
-
/** @type {?} */
|
|
4810
|
-
RouteParameterSanitiser.prototype.parameterDefs;
|
|
4811
|
-
/** @type {?} */
|
|
4812
|
-
RouteParameterSanitiser.prototype.snapshot;
|
|
4813
|
-
/** @type {?} */
|
|
4814
|
-
RouteParameterSanitiser.prototype.injector;
|
|
4815
|
-
}
|
|
4816
|
-
(function (Sanitiser) {
|
|
4817
|
-
/**
|
|
4818
|
-
* @template T
|
|
4819
|
-
*/
|
|
4820
|
-
var /**
|
|
4821
|
-
* @template T
|
|
4822
|
-
*/
|
|
4823
|
-
Value = /** @class */ (function (_super) {
|
|
4824
|
-
__extends(Value, _super);
|
|
4825
|
-
function Value() {
|
|
4826
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
4827
|
-
}
|
|
4828
|
-
/**
|
|
4829
|
-
* @param {?} snapshot
|
|
4830
|
-
* @return {?}
|
|
4831
|
-
*/
|
|
4832
|
-
Value.prototype.readFrom = /**
|
|
4833
|
-
* @param {?} snapshot
|
|
4834
|
-
* @return {?}
|
|
4835
|
-
*/
|
|
4836
|
-
function (snapshot) {
|
|
4837
|
-
/** @type {?} */
|
|
4838
|
-
var rawValue = snapshot.paramMap.get(this.parameterDef.name);
|
|
4839
|
-
return this.parameterDef.type.parse(rawValue);
|
|
4840
|
-
};
|
|
4841
|
-
/**
|
|
4842
|
-
* @protected
|
|
4843
|
-
* @param {?} initialValue
|
|
4844
|
-
* @param {?} sanitisedValue
|
|
4845
|
-
* @return {?}
|
|
4846
|
-
*/
|
|
4847
|
-
Value.prototype.hasChanged = /**
|
|
4848
|
-
* @protected
|
|
4849
|
-
* @param {?} initialValue
|
|
4850
|
-
* @param {?} sanitisedValue
|
|
4851
|
-
* @return {?}
|
|
4852
|
-
*/
|
|
4853
|
-
function (initialValue, sanitisedValue) {
|
|
4854
|
-
return initialValue !== sanitisedValue;
|
|
4855
|
-
};
|
|
4856
|
-
/**
|
|
4857
|
-
* @param {?} dest
|
|
4858
|
-
* @return {?}
|
|
4859
|
-
*/
|
|
4860
|
-
Value.prototype.injectRouteParam = /**
|
|
4861
|
-
* @param {?} dest
|
|
4862
|
-
* @return {?}
|
|
4863
|
-
*/
|
|
4864
|
-
function (dest) {
|
|
4865
|
-
dest[this.parameterDef.name] = this.parameterDef.type.format(this.sanitisedValue);
|
|
4866
|
-
};
|
|
4867
|
-
return Value;
|
|
4868
|
-
}(Sanitiser));
|
|
4869
|
-
Sanitiser.Value = Value;
|
|
4870
|
-
/**
|
|
4871
|
-
* @template T
|
|
4872
|
-
*/
|
|
4873
|
-
var /**
|
|
4874
|
-
* @template T
|
|
4875
|
-
*/
|
|
4876
|
-
Array = /** @class */ (function (_super) {
|
|
4877
|
-
__extends(Array, _super);
|
|
4878
|
-
function Array() {
|
|
4879
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
4880
|
-
}
|
|
4881
|
-
/**
|
|
4882
|
-
* @param {?} snapshot
|
|
4883
|
-
* @return {?}
|
|
4884
|
-
*/
|
|
4885
|
-
Array.prototype.readFrom = /**
|
|
4886
|
-
* @param {?} snapshot
|
|
4887
|
-
* @return {?}
|
|
4888
|
-
*/
|
|
4889
|
-
function (snapshot) {
|
|
4890
|
-
var _this = this;
|
|
4891
|
-
/** @type {?} */
|
|
4892
|
-
var rawValues = snapshot.paramMap.getAll(this.parameterDef.name);
|
|
4893
|
-
return rawValues.map((/**
|
|
4894
|
-
* @param {?} value
|
|
4895
|
-
* @return {?}
|
|
4896
|
-
*/
|
|
4897
|
-
function (value) { return _this.parameterDef.type.parse(value); }));
|
|
4898
|
-
};
|
|
4899
|
-
/**
|
|
4900
|
-
* @protected
|
|
4901
|
-
* @param {?} initialValue
|
|
4902
|
-
* @param {?} sanitisedValue
|
|
4903
|
-
* @return {?}
|
|
4904
|
-
*/
|
|
4905
|
-
Array.prototype.hasChanged = /**
|
|
4906
|
-
* @protected
|
|
4907
|
-
* @param {?} initialValue
|
|
4908
|
-
* @param {?} sanitisedValue
|
|
4909
|
-
* @return {?}
|
|
4910
|
-
*/
|
|
4911
|
-
function (initialValue, sanitisedValue) {
|
|
4912
|
-
return initialValue !== sanitisedValue;
|
|
4913
|
-
};
|
|
4914
|
-
/**
|
|
4915
|
-
* @param {?} dest
|
|
4916
|
-
* @return {?}
|
|
4917
|
-
*/
|
|
4918
|
-
Array.prototype.injectRouteParam = /**
|
|
4919
|
-
* @param {?} dest
|
|
4920
|
-
* @return {?}
|
|
4921
|
-
*/
|
|
4922
|
-
function (dest) {
|
|
4923
|
-
var _this = this;
|
|
4924
|
-
dest[this.parameterDef.name] = this.sanitisedValue.map((/**
|
|
4925
|
-
* @param {?} v
|
|
4926
|
-
* @return {?}
|
|
4927
|
-
*/
|
|
4928
|
-
function (v) { return _this.parameterDef.type.format(v); }));
|
|
4929
|
-
};
|
|
4930
|
-
return Array;
|
|
4931
|
-
}(Sanitiser));
|
|
4932
|
-
Sanitiser.Array = Array;
|
|
4933
|
-
})(Sanitiser || (Sanitiser = {}));
|
|
4934
|
-
|
|
4935
4583
|
/**
|
|
4936
4584
|
* @fileoverview added by tsickle
|
|
4937
4585
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -4952,5 +4600,5 @@ if (false) {
|
|
|
4952
4600
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4953
4601
|
*/
|
|
4954
4602
|
|
|
4955
|
-
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NumberInputComponent, ParameterDefinition, ParameterSnapshot, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, RouteParameter, RouteParameterList,
|
|
4603
|
+
export { ACTIVITY_DATA, AbstractActivity, AbstractInputComponent, AbstractPlaceNavigationComponent, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CommandDirective, ConfirmationDialogComponent, DEFINITION_META_DATA_KEY, DialogInteractionService, Dimension, DisposableComponent, EmptyStateComponent, FocusBindingDirective, INTERACTION_CONTEXT, InteractionContext, InteractionModule, LEFT_RIGHT_PLACE_ANIMATION, LeavePlaceGuard, ListPlaceNavComponent, NumberInputComponent, ParameterDefinition, ParameterSnapshot, ParameterType, PasswordInputComponent, Place, PlaceComponent, PlaceDefinition, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceRouter, Point, ROUTE_PARAMETER_LIST_KEY, ResizeAwareComponent, RouteId, RouteParameter, RouteParameterList, RouteParameterValue, SelectInputComponent, StringInputComponent, TabbedPlaceNavigationComponent, leftRightPlaceAnimation, slideDownAndUpAnimation, CommandDirective as ɵa, FocusBindingDirective as ɵb, AlertDialogComponent as ɵba, DialogInteractionService as ɵbc, InteractionContext as ɵbd, DisposableComponent as ɵc, NumberInputComponent as ɵd, AbstractInputComponent as ɵe, StringInputComponent as ɵf, PasswordInputComponent as ɵg, SelectInputComponent as ɵh, PlaceModule as ɵi, EmptyStateComponent as ɵj, BusyOverlayComponent as ɵk, PlaceOutletComponent as ɵl, leftRightPlaceAnimation as ɵm, LEFT_RIGHT_PLACE_ANIMATION as ɵn, PlaceRouter as ɵo, PlaceHistory as ɵp, TabbedPlaceNavigationComponent as ɵq, AbstractPlaceNavigationComponent as ɵr, ListPlaceNavComponent as ɵs, InteractionModule as ɵt, ActivityContainerComponent as ɵu, ActivityOutletComponent as ɵv, ConfirmationDialogComponent as ɵw, AbstractActivity as ɵx, ACTIVITY_DATA as ɵy };
|
|
4956
4604
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|