@coolon/angular-ui-powerups 0.0.51 → 0.0.54
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 +382 -746
- 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 +11 -35
- package/esm2015/lib/place/route/parameter-sanitiser.js +3 -4
- package/esm2015/lib/place/route/parameter-snapshot.js +65 -209
- 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 +12 -44
- package/esm5/lib/place/route/parameter-sanitiser.js +3 -4
- package/esm5/lib/place/route/parameter-snapshot.js +69 -274
- 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 +298 -539
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +385 -748
- 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 +5 -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,8 +4,8 @@ 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
|
|
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';
|
|
7
|
+
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator } from 'tslib';
|
|
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';
|
|
11
11
|
import { assert as assert$1, Klass, Opts } from '@coolon/typescript-utilities';
|
|
@@ -2494,62 +2494,30 @@ if (false) {
|
|
|
2494
2494
|
this.placeHistory = placeHistory;
|
|
2495
2495
|
}
|
|
2496
2496
|
/**
|
|
2497
|
-
* @param {?}
|
|
2498
|
-
* @param {?} value
|
|
2497
|
+
* @param {?} parameter
|
|
2499
2498
|
* @param {?=} visit
|
|
2500
2499
|
* @return {?}
|
|
2501
2500
|
*/
|
|
2502
2501
|
DefaultParameterSanitiser.prototype.sanitise = /**
|
|
2503
|
-
* @param {?}
|
|
2504
|
-
* @param {?} value
|
|
2502
|
+
* @param {?} parameter
|
|
2505
2503
|
* @param {?=} visit
|
|
2506
2504
|
* @return {?}
|
|
2507
2505
|
*/
|
|
2508
|
-
function (
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
* @return {?}
|
|
2517
|
-
*/
|
|
2518
|
-
function (v) { return v.getValueOf(parameterDef); }))
|
|
2519
|
-
.filter((/**
|
|
2520
|
-
* @param {?} v
|
|
2521
|
-
* @return {?}
|
|
2522
|
-
*/
|
|
2523
|
-
function (v) { return !___default.isNil(v); }))
|
|
2524
|
-
.find((/**
|
|
2525
|
-
* @param {?} v
|
|
2526
|
-
* @return {?}
|
|
2527
|
-
*/
|
|
2528
|
-
function (v) { return !_this.isBlank(parameterDef, v); }));
|
|
2506
|
+
function (parameter, visit) {
|
|
2507
|
+
/** @type {?} */
|
|
2508
|
+
var value = parameter.value;
|
|
2509
|
+
if (parameter.isMissing()) {
|
|
2510
|
+
/** @type {?} */
|
|
2511
|
+
var previousVisit = ___default.first(this.placeHistory.getHistory(visit.placeDefinition));
|
|
2512
|
+
if (this.remember && previousVisit) {
|
|
2513
|
+
value = previousVisit.getValueOf(parameter.definition);
|
|
2529
2514
|
}
|
|
2530
|
-
return
|
|
2515
|
+
return parameter.isEmptyValue(value) ? this.defaultValue : value;
|
|
2531
2516
|
}
|
|
2532
2517
|
else {
|
|
2533
2518
|
return value;
|
|
2534
2519
|
}
|
|
2535
2520
|
};
|
|
2536
|
-
/**
|
|
2537
|
-
* @private
|
|
2538
|
-
* @param {?} def
|
|
2539
|
-
* @param {?} value
|
|
2540
|
-
* @return {?}
|
|
2541
|
-
*/
|
|
2542
|
-
DefaultParameterSanitiser.prototype.isBlank = /**
|
|
2543
|
-
* @private
|
|
2544
|
-
* @param {?} def
|
|
2545
|
-
* @param {?} value
|
|
2546
|
-
* @return {?}
|
|
2547
|
-
*/
|
|
2548
|
-
function (def, value) {
|
|
2549
|
-
/** @type {?} */
|
|
2550
|
-
var isNil = ___default.isNil(value);
|
|
2551
|
-
return isNil ? true : def.isArray ? value['length'] < 1 : false;
|
|
2552
|
-
};
|
|
2553
2521
|
return DefaultParameterSanitiser;
|
|
2554
2522
|
}());
|
|
2555
2523
|
ParameterDefinition.DefaultParameterSanitiser = DefaultParameterSanitiser;
|
|
@@ -2563,14 +2531,315 @@ if (false) {
|
|
|
2563
2531
|
}
|
|
2564
2532
|
})(ParameterDefinition || (ParameterDefinition = {}));
|
|
2565
2533
|
|
|
2534
|
+
/**
|
|
2535
|
+
* @fileoverview added by tsickle
|
|
2536
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2537
|
+
*/
|
|
2538
|
+
/**
|
|
2539
|
+
* @abstract
|
|
2540
|
+
* @template S, T, R
|
|
2541
|
+
*/
|
|
2542
|
+
var /**
|
|
2543
|
+
* @abstract
|
|
2544
|
+
* @template S, T, R
|
|
2545
|
+
*/
|
|
2546
|
+
RouteParameterValue = /** @class */ (function () {
|
|
2547
|
+
function RouteParameterValue(definition, rawValue) {
|
|
2548
|
+
this.definition = definition;
|
|
2549
|
+
this.rawValue = rawValue;
|
|
2550
|
+
}
|
|
2551
|
+
/**
|
|
2552
|
+
* @return {?}
|
|
2553
|
+
*/
|
|
2554
|
+
RouteParameterValue.prototype.isRouteId = /**
|
|
2555
|
+
* @return {?}
|
|
2556
|
+
*/
|
|
2557
|
+
function () {
|
|
2558
|
+
return this.definition.isRouteId;
|
|
2559
|
+
};
|
|
2560
|
+
/**
|
|
2561
|
+
* @param {?} otherValue
|
|
2562
|
+
* @return {?}
|
|
2563
|
+
*/
|
|
2564
|
+
RouteParameterValue.prototype.hasChanged = /**
|
|
2565
|
+
* @param {?} otherValue
|
|
2566
|
+
* @return {?}
|
|
2567
|
+
*/
|
|
2568
|
+
function (otherValue) {
|
|
2569
|
+
return this.isEmpty() ?
|
|
2570
|
+
!this.isEmptyValue(otherValue) :
|
|
2571
|
+
this.isEmptyValue(otherValue) || !this.isSameValue(otherValue);
|
|
2572
|
+
};
|
|
2573
|
+
/**
|
|
2574
|
+
* Return's true if the current value is empty.
|
|
2575
|
+
*/
|
|
2576
|
+
/**
|
|
2577
|
+
* Return's true if the current value is empty.
|
|
2578
|
+
* @return {?}
|
|
2579
|
+
*/
|
|
2580
|
+
RouteParameterValue.prototype.isEmpty = /**
|
|
2581
|
+
* Return's true if the current value is empty.
|
|
2582
|
+
* @return {?}
|
|
2583
|
+
*/
|
|
2584
|
+
function () {
|
|
2585
|
+
return this.isEmptyValue(this.value);
|
|
2586
|
+
};
|
|
2587
|
+
/**
|
|
2588
|
+
* Returns true if the rawValue is undefined. This
|
|
2589
|
+
*/
|
|
2590
|
+
/**
|
|
2591
|
+
* Returns true if the rawValue is undefined. This
|
|
2592
|
+
* @return {?}
|
|
2593
|
+
*/
|
|
2594
|
+
RouteParameterValue.prototype.isMissing = /**
|
|
2595
|
+
* Returns true if the rawValue is undefined. This
|
|
2596
|
+
* @return {?}
|
|
2597
|
+
*/
|
|
2598
|
+
function () {
|
|
2599
|
+
return ___default.isUndefined(this.rawValue);
|
|
2600
|
+
};
|
|
2601
|
+
/**
|
|
2602
|
+
* @param {?} visit
|
|
2603
|
+
* @param {?} injector
|
|
2604
|
+
* @return {?}
|
|
2605
|
+
*/
|
|
2606
|
+
RouteParameterValue.prototype.sanitise = /**
|
|
2607
|
+
* @param {?} visit
|
|
2608
|
+
* @param {?} injector
|
|
2609
|
+
* @return {?}
|
|
2610
|
+
*/
|
|
2611
|
+
function (visit, injector) {
|
|
2612
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2613
|
+
var sanitiser;
|
|
2614
|
+
return __generator(this, function (_a) {
|
|
2615
|
+
sanitiser = this.definition.getSanitiser(injector);
|
|
2616
|
+
if (sanitiser) {
|
|
2617
|
+
return [2 /*return*/, sanitiser.sanitise(this, visit)];
|
|
2618
|
+
}
|
|
2619
|
+
else {
|
|
2620
|
+
return [2 /*return*/, this.value];
|
|
2621
|
+
}
|
|
2622
|
+
return [2 /*return*/];
|
|
2623
|
+
});
|
|
2624
|
+
});
|
|
2625
|
+
};
|
|
2626
|
+
return RouteParameterValue;
|
|
2627
|
+
}());
|
|
2628
|
+
if (false) {
|
|
2629
|
+
/** @type {?} */
|
|
2630
|
+
RouteParameterValue.prototype.value;
|
|
2631
|
+
/** @type {?} */
|
|
2632
|
+
RouteParameterValue.prototype.definition;
|
|
2633
|
+
/**
|
|
2634
|
+
* @type {?}
|
|
2635
|
+
* @protected
|
|
2636
|
+
*/
|
|
2637
|
+
RouteParameterValue.prototype.rawValue;
|
|
2638
|
+
/**
|
|
2639
|
+
* @abstract
|
|
2640
|
+
* @param {?} otherValue
|
|
2641
|
+
* @return {?}
|
|
2642
|
+
*/
|
|
2643
|
+
RouteParameterValue.prototype.isSameValue = function (otherValue) { };
|
|
2644
|
+
/**
|
|
2645
|
+
* @abstract
|
|
2646
|
+
* @return {?}
|
|
2647
|
+
*/
|
|
2648
|
+
RouteParameterValue.prototype.formattedValue = function () { };
|
|
2649
|
+
/**
|
|
2650
|
+
* @abstract
|
|
2651
|
+
* @param {?} value
|
|
2652
|
+
* @return {?}
|
|
2653
|
+
*/
|
|
2654
|
+
RouteParameterValue.prototype.replace = function (value) { };
|
|
2655
|
+
/**
|
|
2656
|
+
* @abstract
|
|
2657
|
+
* @param {?} value
|
|
2658
|
+
* @return {?}
|
|
2659
|
+
*/
|
|
2660
|
+
RouteParameterValue.prototype.isEmptyValue = function (value) { };
|
|
2661
|
+
}
|
|
2662
|
+
(function (RouteParameterValue) {
|
|
2663
|
+
/**
|
|
2664
|
+
* @template T
|
|
2665
|
+
* @param {?} def
|
|
2666
|
+
* @param {?} paramMap
|
|
2667
|
+
* @return {?}
|
|
2668
|
+
*/
|
|
2669
|
+
function create(def, paramMap) {
|
|
2670
|
+
// NOTE: Using undefined is important as it triggers the isMissing flag which is used by defaultValue and remember flags
|
|
2671
|
+
return def.isArray ?
|
|
2672
|
+
new RouteParameterValue.Array(def, paramMap.has(def.name) ? paramMap.getAll(def.name) : undefined) :
|
|
2673
|
+
new RouteParameterValue.Scalar(def, paramMap.has(def.name) ? paramMap.get(def.name) : undefined);
|
|
2674
|
+
}
|
|
2675
|
+
RouteParameterValue.create = create;
|
|
2676
|
+
/**
|
|
2677
|
+
* @template T
|
|
2678
|
+
*/
|
|
2679
|
+
var Scalar = /** @class */ (function (_super) {
|
|
2680
|
+
__extends(Scalar, _super);
|
|
2681
|
+
function Scalar() {
|
|
2682
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2683
|
+
}
|
|
2684
|
+
Object.defineProperty(Scalar.prototype, "value", {
|
|
2685
|
+
get: /**
|
|
2686
|
+
* @return {?}
|
|
2687
|
+
*/
|
|
2688
|
+
function () {
|
|
2689
|
+
return this.definition.type.parse(this.rawValue);
|
|
2690
|
+
},
|
|
2691
|
+
enumerable: true,
|
|
2692
|
+
configurable: true
|
|
2693
|
+
});
|
|
2694
|
+
/**
|
|
2695
|
+
* @param {?} otherValue
|
|
2696
|
+
* @return {?}
|
|
2697
|
+
*/
|
|
2698
|
+
Scalar.prototype.isSameValue = /**
|
|
2699
|
+
* @param {?} otherValue
|
|
2700
|
+
* @return {?}
|
|
2701
|
+
*/
|
|
2702
|
+
function (otherValue) {
|
|
2703
|
+
return this.value === otherValue;
|
|
2704
|
+
};
|
|
2705
|
+
/**
|
|
2706
|
+
* @param {?} value
|
|
2707
|
+
* @return {?}
|
|
2708
|
+
*/
|
|
2709
|
+
Scalar.prototype.replace = /**
|
|
2710
|
+
* @param {?} value
|
|
2711
|
+
* @return {?}
|
|
2712
|
+
*/
|
|
2713
|
+
function (value) {
|
|
2714
|
+
return new RouteParameterValue.Scalar(this.definition, this.isEmptyValue(value) ? undefined : this.definition.type.format(value));
|
|
2715
|
+
};
|
|
2716
|
+
/**
|
|
2717
|
+
* @return {?}
|
|
2718
|
+
*/
|
|
2719
|
+
Scalar.prototype.formattedValue = /**
|
|
2720
|
+
* @return {?}
|
|
2721
|
+
*/
|
|
2722
|
+
function () {
|
|
2723
|
+
return this.isEmpty() ? undefined : this.definition.type.format(this.value);
|
|
2724
|
+
};
|
|
2725
|
+
/**
|
|
2726
|
+
* @param {?} value
|
|
2727
|
+
* @return {?}
|
|
2728
|
+
*/
|
|
2729
|
+
Scalar.prototype.isEmptyValue = /**
|
|
2730
|
+
* @param {?} value
|
|
2731
|
+
* @return {?}
|
|
2732
|
+
*/
|
|
2733
|
+
function (value) {
|
|
2734
|
+
return ___default.isNil(value);
|
|
2735
|
+
};
|
|
2736
|
+
__decorate([
|
|
2737
|
+
Memoize$1(),
|
|
2738
|
+
__metadata("design:type", Object),
|
|
2739
|
+
__metadata("design:paramtypes", [])
|
|
2740
|
+
], Scalar.prototype, "value", null);
|
|
2741
|
+
return Scalar;
|
|
2742
|
+
}(RouteParameterValue));
|
|
2743
|
+
RouteParameterValue.Scalar = Scalar;
|
|
2744
|
+
/**
|
|
2745
|
+
* @template T
|
|
2746
|
+
*/
|
|
2747
|
+
var Array = /** @class */ (function (_super) {
|
|
2748
|
+
__extends(Array, _super);
|
|
2749
|
+
function Array() {
|
|
2750
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2751
|
+
}
|
|
2752
|
+
Object.defineProperty(Array.prototype, "value", {
|
|
2753
|
+
get: /**
|
|
2754
|
+
* @return {?}
|
|
2755
|
+
*/
|
|
2756
|
+
function () {
|
|
2757
|
+
var _this = this;
|
|
2758
|
+
return (this.rawValue || [])
|
|
2759
|
+
.filter((/**
|
|
2760
|
+
* @param {?} s
|
|
2761
|
+
* @return {?}
|
|
2762
|
+
*/
|
|
2763
|
+
function (s) { return !___default.isEmpty(s); }))
|
|
2764
|
+
.map((/**
|
|
2765
|
+
* @param {?} raw
|
|
2766
|
+
* @return {?}
|
|
2767
|
+
*/
|
|
2768
|
+
function (raw) { return _this.definition.type.parse(raw); }));
|
|
2769
|
+
},
|
|
2770
|
+
enumerable: true,
|
|
2771
|
+
configurable: true
|
|
2772
|
+
});
|
|
2773
|
+
/**
|
|
2774
|
+
* @param {?} otherValue
|
|
2775
|
+
* @return {?}
|
|
2776
|
+
*/
|
|
2777
|
+
Array.prototype.isSameValue = /**
|
|
2778
|
+
* @param {?} otherValue
|
|
2779
|
+
* @return {?}
|
|
2780
|
+
*/
|
|
2781
|
+
function (otherValue) {
|
|
2782
|
+
return ___default.isEqual(this.value, otherValue);
|
|
2783
|
+
};
|
|
2784
|
+
/**
|
|
2785
|
+
* @param {?} value
|
|
2786
|
+
* @return {?}
|
|
2787
|
+
*/
|
|
2788
|
+
Array.prototype.replace = /**
|
|
2789
|
+
* @param {?} value
|
|
2790
|
+
* @return {?}
|
|
2791
|
+
*/
|
|
2792
|
+
function (value) {
|
|
2793
|
+
var _this = this;
|
|
2794
|
+
return new RouteParameterValue.Array(this.definition, this.isEmptyValue(value) ? undefined : value.map((/**
|
|
2795
|
+
* @param {?} v
|
|
2796
|
+
* @return {?}
|
|
2797
|
+
*/
|
|
2798
|
+
function (v) { return _this.definition.type.format(v); })));
|
|
2799
|
+
};
|
|
2800
|
+
/**
|
|
2801
|
+
* @return {?}
|
|
2802
|
+
*/
|
|
2803
|
+
Array.prototype.formattedValue = /**
|
|
2804
|
+
* @return {?}
|
|
2805
|
+
*/
|
|
2806
|
+
function () {
|
|
2807
|
+
var _this = this;
|
|
2808
|
+
return this.isEmpty() ? [] : this.value.map((/**
|
|
2809
|
+
* @param {?} v
|
|
2810
|
+
* @return {?}
|
|
2811
|
+
*/
|
|
2812
|
+
function (v) { return _this.definition.type.format(v); }));
|
|
2813
|
+
};
|
|
2814
|
+
/**
|
|
2815
|
+
* @param {?} value
|
|
2816
|
+
* @return {?}
|
|
2817
|
+
*/
|
|
2818
|
+
Array.prototype.isEmptyValue = /**
|
|
2819
|
+
* @param {?} value
|
|
2820
|
+
* @return {?}
|
|
2821
|
+
*/
|
|
2822
|
+
function (value) {
|
|
2823
|
+
return ___default.isNil(value) || value.length < 1;
|
|
2824
|
+
};
|
|
2825
|
+
__decorate([
|
|
2826
|
+
Memoize$1(),
|
|
2827
|
+
__metadata("design:type", Array),
|
|
2828
|
+
__metadata("design:paramtypes", [])
|
|
2829
|
+
], Array.prototype, "value", null);
|
|
2830
|
+
return Array;
|
|
2831
|
+
}(RouteParameterValue));
|
|
2832
|
+
RouteParameterValue.Array = Array;
|
|
2833
|
+
})(RouteParameterValue || (RouteParameterValue = {}));
|
|
2834
|
+
|
|
2566
2835
|
/**
|
|
2567
2836
|
* @fileoverview added by tsickle
|
|
2568
2837
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2569
2838
|
*/
|
|
2570
2839
|
var ParameterSnapshot = /** @class */ (function () {
|
|
2571
|
-
function ParameterSnapshot(placeDefinition,
|
|
2840
|
+
function ParameterSnapshot(placeDefinition, parameters) {
|
|
2572
2841
|
this.placeDefinition = placeDefinition;
|
|
2573
|
-
this.
|
|
2842
|
+
this.parameters = parameters;
|
|
2574
2843
|
}
|
|
2575
2844
|
/**
|
|
2576
2845
|
* @param {?} other
|
|
@@ -2585,18 +2854,18 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2585
2854
|
function (other, debug) {
|
|
2586
2855
|
if (debug === void 0) { debug = false; }
|
|
2587
2856
|
/** @type {?} */
|
|
2588
|
-
var changed = this.
|
|
2857
|
+
var changed = this.parameters.find((/**
|
|
2589
2858
|
* @param {?} r
|
|
2590
2859
|
* @return {?}
|
|
2591
2860
|
*/
|
|
2592
2861
|
function (r) {
|
|
2593
|
-
return
|
|
2862
|
+
return r.hasChanged(other.getValueOf(r.definition));
|
|
2594
2863
|
}));
|
|
2595
2864
|
if (changed && debug) {
|
|
2596
2865
|
console.log({
|
|
2597
|
-
name: changed.
|
|
2866
|
+
name: changed.definition.name,
|
|
2598
2867
|
mine: changed.value,
|
|
2599
|
-
theirs: other.getValueOf(changed.
|
|
2868
|
+
theirs: other.getValueOf(changed.definition)
|
|
2600
2869
|
});
|
|
2601
2870
|
}
|
|
2602
2871
|
return !!changed;
|
|
@@ -2612,11 +2881,11 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2612
2881
|
* @return {?}
|
|
2613
2882
|
*/
|
|
2614
2883
|
function (parameterDef) {
|
|
2615
|
-
return this.
|
|
2884
|
+
return this.parameters.find((/**
|
|
2616
2885
|
* @param {?} r
|
|
2617
2886
|
* @return {?}
|
|
2618
2887
|
*/
|
|
2619
|
-
function (r) { return r.
|
|
2888
|
+
function (r) { return r.definition === parameterDef; }));
|
|
2620
2889
|
};
|
|
2621
2890
|
/**
|
|
2622
2891
|
* @template T, S
|
|
@@ -2652,11 +2921,11 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2652
2921
|
*/
|
|
2653
2922
|
function (name) {
|
|
2654
2923
|
/** @type {?} */
|
|
2655
|
-
var resolvedParameter = this.
|
|
2924
|
+
var resolvedParameter = this.parameters.find((/**
|
|
2656
2925
|
* @param {?} r
|
|
2657
2926
|
* @return {?}
|
|
2658
2927
|
*/
|
|
2659
|
-
function (r) { return r.
|
|
2928
|
+
function (r) { return r.definition.name === name; }));
|
|
2660
2929
|
return resolvedParameter ? resolvedParameter.value : null;
|
|
2661
2930
|
};
|
|
2662
2931
|
/**
|
|
@@ -2670,11 +2939,11 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2670
2939
|
function () {
|
|
2671
2940
|
// RouteId's are never arrays: see parameter-decorators.ts createDefinition methods. It would be nice to
|
|
2672
2941
|
// capture this in the type system though
|
|
2673
|
-
return (/** @type {?} */ (this.
|
|
2942
|
+
return (/** @type {?} */ (this.parameters.find((/**
|
|
2674
2943
|
* @param {?} p
|
|
2675
2944
|
* @return {?}
|
|
2676
2945
|
*/
|
|
2677
|
-
function (p) { return p.
|
|
2946
|
+
function (p) { return p.definition.isRouteId; }))));
|
|
2678
2947
|
};
|
|
2679
2948
|
/**
|
|
2680
2949
|
* @private
|
|
@@ -2685,11 +2954,11 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2685
2954
|
* @return {?}
|
|
2686
2955
|
*/
|
|
2687
2956
|
function () {
|
|
2688
|
-
return this.
|
|
2957
|
+
return this.parameters.filter((/**
|
|
2689
2958
|
* @param {?} r
|
|
2690
2959
|
* @return {?}
|
|
2691
2960
|
*/
|
|
2692
|
-
function (r) { return !r.
|
|
2961
|
+
function (r) { return !r.definition.isRouteId; }));
|
|
2693
2962
|
};
|
|
2694
2963
|
/**
|
|
2695
2964
|
* @return {?}
|
|
@@ -2714,43 +2983,37 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2714
2983
|
/**
|
|
2715
2984
|
* @return {?}
|
|
2716
2985
|
*/
|
|
2717
|
-
ParameterSnapshot.prototype.
|
|
2986
|
+
ParameterSnapshot.prototype.getNonEmptyParameters = /**
|
|
2718
2987
|
* @return {?}
|
|
2719
2988
|
*/
|
|
2720
2989
|
function () {
|
|
2721
|
-
/**
|
|
2722
|
-
var params = {};
|
|
2723
|
-
/** @type {?} */
|
|
2724
|
-
var routeIdParam = this.resolved.filter((/**
|
|
2725
|
-
* @param {?} p
|
|
2726
|
-
* @return {?}
|
|
2727
|
-
*/
|
|
2728
|
-
function (p) { return !p.parameterDef.isRouteId; })).forEach((/**
|
|
2990
|
+
return this.parameters.filter((/**
|
|
2729
2991
|
* @param {?} p
|
|
2730
2992
|
* @return {?}
|
|
2731
2993
|
*/
|
|
2732
|
-
function (p) {
|
|
2733
|
-
params[p.parameterDef.name] = p.formattedValue();
|
|
2734
|
-
}));
|
|
2735
|
-
return params;
|
|
2994
|
+
function (p) { return !p.isEmpty(); }));
|
|
2736
2995
|
};
|
|
2737
2996
|
/**
|
|
2738
2997
|
* @return {?}
|
|
2739
2998
|
*/
|
|
2740
|
-
ParameterSnapshot.prototype.
|
|
2999
|
+
ParameterSnapshot.prototype.getFormattedParameters = /**
|
|
2741
3000
|
* @return {?}
|
|
2742
3001
|
*/
|
|
2743
3002
|
function () {
|
|
2744
3003
|
/** @type {?} */
|
|
2745
3004
|
var params = {};
|
|
2746
3005
|
/** @type {?} */
|
|
2747
|
-
var routeIdParam = this.
|
|
3006
|
+
var routeIdParam = this.getNonEmptyParameters()
|
|
3007
|
+
.filter((/**
|
|
2748
3008
|
* @param {?} p
|
|
2749
3009
|
* @return {?}
|
|
2750
3010
|
*/
|
|
2751
|
-
function (p) {
|
|
2752
|
-
|
|
2753
|
-
|
|
3011
|
+
function (p) { return !p.definition.isRouteId; }))
|
|
3012
|
+
.forEach((/**
|
|
3013
|
+
* @param {?} p
|
|
3014
|
+
* @return {?}
|
|
3015
|
+
*/
|
|
3016
|
+
function (p) { return params[p.definition.name] = p.formattedValue(); }));
|
|
2754
3017
|
return params;
|
|
2755
3018
|
};
|
|
2756
3019
|
/**
|
|
@@ -2763,12 +3026,12 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2763
3026
|
/** @type {?} */
|
|
2764
3027
|
var params = {};
|
|
2765
3028
|
/** @type {?} */
|
|
2766
|
-
var routeIdParam = this.
|
|
3029
|
+
var routeIdParam = this.parameters.forEach((/**
|
|
2767
3030
|
* @param {?} p
|
|
2768
3031
|
* @return {?}
|
|
2769
3032
|
*/
|
|
2770
3033
|
function (p) {
|
|
2771
|
-
params[p.
|
|
3034
|
+
params[p.definition.name] = p.value;
|
|
2772
3035
|
}));
|
|
2773
3036
|
return params;
|
|
2774
3037
|
};
|
|
@@ -2785,12 +3048,12 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2785
3048
|
* @return {?}
|
|
2786
3049
|
*/
|
|
2787
3050
|
function (parameter, value) {
|
|
2788
|
-
return new ParameterSnapshot(this.placeDefinition, this.
|
|
3051
|
+
return new ParameterSnapshot(this.placeDefinition, this.parameters.map((/**
|
|
2789
3052
|
* @param {?} p
|
|
2790
3053
|
* @return {?}
|
|
2791
3054
|
*/
|
|
2792
3055
|
function (p) {
|
|
2793
|
-
return p.
|
|
3056
|
+
return p.definition === parameter ? p.replace(value) : p;
|
|
2794
3057
|
})));
|
|
2795
3058
|
};
|
|
2796
3059
|
/**
|
|
@@ -2812,10 +3075,10 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2812
3075
|
return [4 /*yield*/, routeId.sanitise(this, injector)];
|
|
2813
3076
|
case 1:
|
|
2814
3077
|
sanitisedValue = _a.sent();
|
|
2815
|
-
if (
|
|
3078
|
+
if (routeId.hasChanged(sanitisedValue)) {
|
|
2816
3079
|
// if the route id has changed we redirect immediately as other
|
|
2817
3080
|
// parameter sanitisers might use it.
|
|
2818
|
-
return [2 /*return*/, this.replace(routeId.
|
|
3081
|
+
return [2 /*return*/, this.replace(routeId.definition, sanitisedValue)];
|
|
2819
3082
|
}
|
|
2820
3083
|
_a.label = 2;
|
|
2821
3084
|
case 2:
|
|
@@ -2829,8 +3092,8 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2829
3092
|
return [4 /*yield*/, routeParameter.sanitise(this, injector)];
|
|
2830
3093
|
case 4:
|
|
2831
3094
|
sanitisedValue = _a.sent();
|
|
2832
|
-
if (
|
|
2833
|
-
result = result.replace(routeParameter.
|
|
3095
|
+
if (routeParameter.hasChanged(sanitisedValue)) {
|
|
3096
|
+
result = result.replace(routeParameter.definition, sanitisedValue);
|
|
2834
3097
|
}
|
|
2835
3098
|
_a.label = 5;
|
|
2836
3099
|
case 5:
|
|
@@ -2846,7 +3109,7 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2846
3109
|
Memoize$1(),
|
|
2847
3110
|
__metadata("design:type", Function),
|
|
2848
3111
|
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
2849
|
-
__metadata("design:returntype",
|
|
3112
|
+
__metadata("design:returntype", RouteParameterValue)
|
|
2850
3113
|
], ParameterSnapshot.prototype, "getParameter", null);
|
|
2851
3114
|
__decorate([
|
|
2852
3115
|
Memoize$1(),
|
|
@@ -2864,7 +3127,7 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2864
3127
|
Memoize$1(),
|
|
2865
3128
|
__metadata("design:type", Function),
|
|
2866
3129
|
__metadata("design:paramtypes", []),
|
|
2867
|
-
__metadata("design:returntype",
|
|
3130
|
+
__metadata("design:returntype", RouteParameterValue.Scalar)
|
|
2868
3131
|
], ParameterSnapshot.prototype, "getRouteIdParameter", null);
|
|
2869
3132
|
__decorate([
|
|
2870
3133
|
Memoize$1(),
|
|
@@ -2872,6 +3135,12 @@ var ParameterSnapshot = /** @class */ (function () {
|
|
|
2872
3135
|
__metadata("design:paramtypes", []),
|
|
2873
3136
|
__metadata("design:returntype", Array)
|
|
2874
3137
|
], ParameterSnapshot.prototype, "getRouteParameters", null);
|
|
3138
|
+
__decorate([
|
|
3139
|
+
Trace(),
|
|
3140
|
+
__metadata("design:type", Function),
|
|
3141
|
+
__metadata("design:paramtypes", []),
|
|
3142
|
+
__metadata("design:returntype", void 0)
|
|
3143
|
+
], ParameterSnapshot.prototype, "getFormattedParameters", null);
|
|
2875
3144
|
return ParameterSnapshot;
|
|
2876
3145
|
}());
|
|
2877
3146
|
if (false) {
|
|
@@ -2881,7 +3150,7 @@ if (false) {
|
|
|
2881
3150
|
* @type {?}
|
|
2882
3151
|
* @private
|
|
2883
3152
|
*/
|
|
2884
|
-
ParameterSnapshot.prototype.
|
|
3153
|
+
ParameterSnapshot.prototype.parameters;
|
|
2885
3154
|
}
|
|
2886
3155
|
(function (ParameterSnapshot) {
|
|
2887
3156
|
/**
|
|
@@ -2894,31 +3163,11 @@ if (false) {
|
|
|
2894
3163
|
/** @type {?} */
|
|
2895
3164
|
var paramMap = new ConsolidatedParameterMap(params, urlSegments);
|
|
2896
3165
|
/** @type {?} */
|
|
2897
|
-
var resolvedParameters = placeDef.getRouteParameters()
|
|
2898
|
-
.map((/**
|
|
3166
|
+
var resolvedParameters = placeDef.getRouteParameters().map((/**
|
|
2899
3167
|
* @param {?} def
|
|
2900
3168
|
* @return {?}
|
|
2901
3169
|
*/
|
|
2902
|
-
function (def) {
|
|
2903
|
-
if (def.isArray) {
|
|
2904
|
-
/** @type {?} */
|
|
2905
|
-
var value = paramMap.has(def.name) ? paramMap.getAll(def.name).filter((/**
|
|
2906
|
-
* @param {?} s
|
|
2907
|
-
* @return {?}
|
|
2908
|
-
*/
|
|
2909
|
-
function (s) { return !___default.isEmpty(s); })).map((/**
|
|
2910
|
-
* @param {?} raw
|
|
2911
|
-
* @return {?}
|
|
2912
|
-
*/
|
|
2913
|
-
function (raw) { return def.type.parse(raw); })) : null;
|
|
2914
|
-
return new ResolvedArrayParameter(def, value);
|
|
2915
|
-
}
|
|
2916
|
-
else {
|
|
2917
|
-
/** @type {?} */
|
|
2918
|
-
var value = paramMap.has(def.name) ? def.type.parse(paramMap.get(def.name)) : null;
|
|
2919
|
-
return new ResolvedValueParameter(def, value);
|
|
2920
|
-
}
|
|
2921
|
-
}));
|
|
3170
|
+
function (def) { return RouteParameterValue.create(def, paramMap); }));
|
|
2922
3171
|
return new ParameterSnapshot(placeDef, resolvedParameters);
|
|
2923
3172
|
}
|
|
2924
3173
|
ParameterSnapshot.create = create;
|
|
@@ -2927,12 +3176,7 @@ if (false) {
|
|
|
2927
3176
|
* include the segment params in the paramMap as well as each segment returns an empty
|
|
2928
3177
|
* param map even when `parameter`s has content.
|
|
2929
3178
|
*/
|
|
2930
|
-
var /**
|
|
2931
|
-
* This a work around for the fact that an activated route with multiple segments doesn't
|
|
2932
|
-
* include the segment params in the paramMap as well as each segment returns an empty
|
|
2933
|
-
* param map even when `parameter`s has content.
|
|
2934
|
-
*/
|
|
2935
|
-
ConsolidatedParameterMap = /** @class */ (function () {
|
|
3179
|
+
var ConsolidatedParameterMap = /** @class */ (function () {
|
|
2936
3180
|
function ConsolidatedParameterMap(paramMap, urlSegments) {
|
|
2937
3181
|
this.paramMaps = [paramMap].concat((urlSegments || []).map((/**
|
|
2938
3182
|
* @param {?} s
|
|
@@ -2989,6 +3233,26 @@ if (false) {
|
|
|
2989
3233
|
*/
|
|
2990
3234
|
function (m) { return m.has(name); }));
|
|
2991
3235
|
};
|
|
3236
|
+
Object.defineProperty(ConsolidatedParameterMap.prototype, "keys", {
|
|
3237
|
+
get: /**
|
|
3238
|
+
* @return {?}
|
|
3239
|
+
*/
|
|
3240
|
+
function () {
|
|
3241
|
+
return this.paramMaps.reduce((/**
|
|
3242
|
+
* @param {?} result
|
|
3243
|
+
* @param {?} params
|
|
3244
|
+
* @return {?}
|
|
3245
|
+
*/
|
|
3246
|
+
function (result, params) { return result.concat(params.keys); }), []);
|
|
3247
|
+
},
|
|
3248
|
+
enumerable: true,
|
|
3249
|
+
configurable: true
|
|
3250
|
+
});
|
|
3251
|
+
__decorate([
|
|
3252
|
+
Memoize$1(),
|
|
3253
|
+
__metadata("design:type", Array),
|
|
3254
|
+
__metadata("design:paramtypes", [])
|
|
3255
|
+
], ConsolidatedParameterMap.prototype, "keys", null);
|
|
2992
3256
|
return ConsolidatedParameterMap;
|
|
2993
3257
|
}());
|
|
2994
3258
|
if (false) {
|
|
@@ -3056,207 +3320,6 @@ if (false) {
|
|
|
3056
3320
|
*/
|
|
3057
3321
|
ParamMapAdapter.prototype.params;
|
|
3058
3322
|
}
|
|
3059
|
-
/**
|
|
3060
|
-
* @abstract
|
|
3061
|
-
* @template T, S
|
|
3062
|
-
*/
|
|
3063
|
-
var /**
|
|
3064
|
-
* @abstract
|
|
3065
|
-
* @template T, S
|
|
3066
|
-
*/
|
|
3067
|
-
ResolvedParameter = /** @class */ (function () {
|
|
3068
|
-
function ResolvedParameter(parameterDef, value) {
|
|
3069
|
-
this.parameterDef = parameterDef;
|
|
3070
|
-
this.value = value;
|
|
3071
|
-
}
|
|
3072
|
-
/**
|
|
3073
|
-
* @return {?}
|
|
3074
|
-
*/
|
|
3075
|
-
ResolvedParameter.prototype.isRouteId = /**
|
|
3076
|
-
* @return {?}
|
|
3077
|
-
*/
|
|
3078
|
-
function () {
|
|
3079
|
-
return this.parameterDef.isRouteId;
|
|
3080
|
-
};
|
|
3081
|
-
/**
|
|
3082
|
-
* @param {?} visit
|
|
3083
|
-
* @param {?} injector
|
|
3084
|
-
* @return {?}
|
|
3085
|
-
*/
|
|
3086
|
-
ResolvedParameter.prototype.sanitise = /**
|
|
3087
|
-
* @param {?} visit
|
|
3088
|
-
* @param {?} injector
|
|
3089
|
-
* @return {?}
|
|
3090
|
-
*/
|
|
3091
|
-
function (visit, injector) {
|
|
3092
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3093
|
-
var sanitiser;
|
|
3094
|
-
return __generator(this, function (_a) {
|
|
3095
|
-
sanitiser = this.parameterDef.getSanitiser(injector);
|
|
3096
|
-
if (sanitiser) {
|
|
3097
|
-
return [2 /*return*/, sanitiser.sanitise(this.parameterDef, this.value, visit)];
|
|
3098
|
-
}
|
|
3099
|
-
else {
|
|
3100
|
-
return [2 /*return*/, this.value];
|
|
3101
|
-
}
|
|
3102
|
-
return [2 /*return*/];
|
|
3103
|
-
});
|
|
3104
|
-
});
|
|
3105
|
-
};
|
|
3106
|
-
return ResolvedParameter;
|
|
3107
|
-
}());
|
|
3108
|
-
ParameterSnapshot.ResolvedParameter = ResolvedParameter;
|
|
3109
|
-
if (false) {
|
|
3110
|
-
/** @type {?} */
|
|
3111
|
-
ResolvedParameter.prototype.parameterDef;
|
|
3112
|
-
/** @type {?} */
|
|
3113
|
-
ResolvedParameter.prototype.value;
|
|
3114
|
-
/**
|
|
3115
|
-
* @abstract
|
|
3116
|
-
* @param {?} dest
|
|
3117
|
-
* @return {?}
|
|
3118
|
-
*/
|
|
3119
|
-
ResolvedParameter.prototype.injectRouteParam = function (dest) { };
|
|
3120
|
-
/**
|
|
3121
|
-
* @abstract
|
|
3122
|
-
* @param {?} otherValue
|
|
3123
|
-
* @return {?}
|
|
3124
|
-
*/
|
|
3125
|
-
ResolvedParameter.prototype.isSame = function (otherValue) { };
|
|
3126
|
-
/**
|
|
3127
|
-
* @abstract
|
|
3128
|
-
* @return {?}
|
|
3129
|
-
*/
|
|
3130
|
-
ResolvedParameter.prototype.formattedValue = function () { };
|
|
3131
|
-
/**
|
|
3132
|
-
* @abstract
|
|
3133
|
-
* @param {?} value
|
|
3134
|
-
* @return {?}
|
|
3135
|
-
*/
|
|
3136
|
-
ResolvedParameter.prototype.replace = function (value) { };
|
|
3137
|
-
}
|
|
3138
|
-
/**
|
|
3139
|
-
* @template T
|
|
3140
|
-
*/
|
|
3141
|
-
var /**
|
|
3142
|
-
* @template T
|
|
3143
|
-
*/
|
|
3144
|
-
ResolvedValueParameter = /** @class */ (function (_super) {
|
|
3145
|
-
__extends(ResolvedValueParameter, _super);
|
|
3146
|
-
function ResolvedValueParameter() {
|
|
3147
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3148
|
-
}
|
|
3149
|
-
/**
|
|
3150
|
-
* @param {?} otherValue
|
|
3151
|
-
* @return {?}
|
|
3152
|
-
*/
|
|
3153
|
-
ResolvedValueParameter.prototype.isSame = /**
|
|
3154
|
-
* @param {?} otherValue
|
|
3155
|
-
* @return {?}
|
|
3156
|
-
*/
|
|
3157
|
-
function (otherValue) {
|
|
3158
|
-
return this.value === otherValue;
|
|
3159
|
-
};
|
|
3160
|
-
/**
|
|
3161
|
-
* @param {?} dest
|
|
3162
|
-
* @return {?}
|
|
3163
|
-
*/
|
|
3164
|
-
ResolvedValueParameter.prototype.injectRouteParam = /**
|
|
3165
|
-
* @param {?} dest
|
|
3166
|
-
* @return {?}
|
|
3167
|
-
*/
|
|
3168
|
-
function (dest) {
|
|
3169
|
-
dest[this.parameterDef.name] = this.parameterDef.type.format(this.value);
|
|
3170
|
-
};
|
|
3171
|
-
/**
|
|
3172
|
-
* @param {?} value
|
|
3173
|
-
* @return {?}
|
|
3174
|
-
*/
|
|
3175
|
-
ResolvedValueParameter.prototype.replace = /**
|
|
3176
|
-
* @param {?} value
|
|
3177
|
-
* @return {?}
|
|
3178
|
-
*/
|
|
3179
|
-
function (value) {
|
|
3180
|
-
return new ResolvedValueParameter(this.parameterDef, value);
|
|
3181
|
-
};
|
|
3182
|
-
/**
|
|
3183
|
-
* @return {?}
|
|
3184
|
-
*/
|
|
3185
|
-
ResolvedValueParameter.prototype.formattedValue = /**
|
|
3186
|
-
* @return {?}
|
|
3187
|
-
*/
|
|
3188
|
-
function () {
|
|
3189
|
-
return !___default.isNil(this.value) ? this.parameterDef.type.format(this.value) : null;
|
|
3190
|
-
};
|
|
3191
|
-
return ResolvedValueParameter;
|
|
3192
|
-
}(ResolvedParameter));
|
|
3193
|
-
ParameterSnapshot.ResolvedValueParameter = ResolvedValueParameter;
|
|
3194
|
-
/**
|
|
3195
|
-
* @template T
|
|
3196
|
-
*/
|
|
3197
|
-
var /**
|
|
3198
|
-
* @template T
|
|
3199
|
-
*/
|
|
3200
|
-
ResolvedArrayParameter = /** @class */ (function (_super) {
|
|
3201
|
-
__extends(ResolvedArrayParameter, _super);
|
|
3202
|
-
function ResolvedArrayParameter() {
|
|
3203
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3204
|
-
}
|
|
3205
|
-
/**
|
|
3206
|
-
* @param {?} otherValue
|
|
3207
|
-
* @return {?}
|
|
3208
|
-
*/
|
|
3209
|
-
ResolvedArrayParameter.prototype.isSame = /**
|
|
3210
|
-
* @param {?} otherValue
|
|
3211
|
-
* @return {?}
|
|
3212
|
-
*/
|
|
3213
|
-
function (otherValue) {
|
|
3214
|
-
return ___default.isEqual(this.value, otherValue);
|
|
3215
|
-
};
|
|
3216
|
-
/**
|
|
3217
|
-
* @param {?} dest
|
|
3218
|
-
* @return {?}
|
|
3219
|
-
*/
|
|
3220
|
-
ResolvedArrayParameter.prototype.injectRouteParam = /**
|
|
3221
|
-
* @param {?} dest
|
|
3222
|
-
* @return {?}
|
|
3223
|
-
*/
|
|
3224
|
-
function (dest) {
|
|
3225
|
-
var _this = this;
|
|
3226
|
-
dest[this.parameterDef.name] = this.value.map((/**
|
|
3227
|
-
* @param {?} v
|
|
3228
|
-
* @return {?}
|
|
3229
|
-
*/
|
|
3230
|
-
function (v) { return _this.parameterDef.type.format(v); }));
|
|
3231
|
-
};
|
|
3232
|
-
/**
|
|
3233
|
-
* @param {?} value
|
|
3234
|
-
* @return {?}
|
|
3235
|
-
*/
|
|
3236
|
-
ResolvedArrayParameter.prototype.replace = /**
|
|
3237
|
-
* @param {?} value
|
|
3238
|
-
* @return {?}
|
|
3239
|
-
*/
|
|
3240
|
-
function (value) {
|
|
3241
|
-
return new ResolvedArrayParameter(this.parameterDef, value);
|
|
3242
|
-
};
|
|
3243
|
-
/**
|
|
3244
|
-
* @return {?}
|
|
3245
|
-
*/
|
|
3246
|
-
ResolvedArrayParameter.prototype.formattedValue = /**
|
|
3247
|
-
* @return {?}
|
|
3248
|
-
*/
|
|
3249
|
-
function () {
|
|
3250
|
-
var _this = this;
|
|
3251
|
-
return this.value ? this.value.map((/**
|
|
3252
|
-
* @param {?} v
|
|
3253
|
-
* @return {?}
|
|
3254
|
-
*/
|
|
3255
|
-
function (v) { return _this.parameterDef.type.format(v); })) : [];
|
|
3256
|
-
};
|
|
3257
|
-
return ResolvedArrayParameter;
|
|
3258
|
-
}(ResolvedParameter));
|
|
3259
|
-
ParameterSnapshot.ResolvedArrayParameter = ResolvedArrayParameter;
|
|
3260
3323
|
})(ParameterSnapshot || (ParameterSnapshot = {}));
|
|
3261
3324
|
|
|
3262
3325
|
/**
|
|
@@ -3382,8 +3445,8 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
3382
3445
|
* @return {?}
|
|
3383
3446
|
*/
|
|
3384
3447
|
function (next, previous) {
|
|
3385
|
-
_this.pushChangesToRoute(next, previous);
|
|
3386
3448
|
_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.
|
|
3449
|
+
_this.pushChangesToRoute(next, previous);
|
|
3387
3450
|
}), {
|
|
3388
3451
|
unless: _this.incomingRouteChange
|
|
3389
3452
|
});
|
|
@@ -4255,7 +4318,7 @@ var PlaceRouteGuard = /** @class */ (function () {
|
|
|
4255
4318
|
* @return {?}
|
|
4256
4319
|
*/
|
|
4257
4320
|
function (sanitised) {
|
|
4258
|
-
Logger.get(_this).info("ParameterSnapshot.sanitise
|
|
4321
|
+
Logger.get(_this).info("ParameterSnapshot.sanitise ->", sanitised.getAllParameters());
|
|
4259
4322
|
if (sanitised.hasChanged(snapshot_1, true)) {
|
|
4260
4323
|
return _this.placeRouter.getRedirectUrlTree(activatedRoute, sanitised);
|
|
4261
4324
|
}
|
|
@@ -4410,12 +4473,11 @@ function RouteParameterList(elementType, options) {
|
|
|
4410
4473
|
function ParameterSanitiser() { }
|
|
4411
4474
|
if (false) {
|
|
4412
4475
|
/**
|
|
4413
|
-
* @param {?}
|
|
4414
|
-
* @param {?} value
|
|
4476
|
+
* @param {?} paramter
|
|
4415
4477
|
* @param {?=} visit
|
|
4416
4478
|
* @return {?}
|
|
4417
4479
|
*/
|
|
4418
|
-
ParameterSanitiser.prototype.sanitise = function (
|
|
4480
|
+
ParameterSanitiser.prototype.sanitise = function (paramter, visit) { };
|
|
4419
4481
|
}
|
|
4420
4482
|
|
|
4421
4483
|
/**
|
|
@@ -4511,431 +4573,6 @@ var ParameterType;
|
|
|
4511
4573
|
ParameterType.BOOLEAN = new BooleanType();
|
|
4512
4574
|
})(ParameterType || (ParameterType = {}));
|
|
4513
4575
|
|
|
4514
|
-
/**
|
|
4515
|
-
* @fileoverview added by tsickle
|
|
4516
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4517
|
-
*/
|
|
4518
|
-
/**
|
|
4519
|
-
* @template T, S
|
|
4520
|
-
*/
|
|
4521
|
-
var /**
|
|
4522
|
-
* @template T, S
|
|
4523
|
-
*/
|
|
4524
|
-
Sanitiser = /** @class */ (function () {
|
|
4525
|
-
function Sanitiser(parameterDef, snapshot, sanitiser) {
|
|
4526
|
-
this.parameterDef = parameterDef;
|
|
4527
|
-
this.snapshot = snapshot;
|
|
4528
|
-
this.sanitiser = sanitiser;
|
|
4529
|
-
}
|
|
4530
|
-
/**
|
|
4531
|
-
* @return {?}
|
|
4532
|
-
*/
|
|
4533
|
-
Sanitiser.prototype.isRouteId = /**
|
|
4534
|
-
* @return {?}
|
|
4535
|
-
*/
|
|
4536
|
-
function () {
|
|
4537
|
-
return this.parameterDef.isRouteId;
|
|
4538
|
-
};
|
|
4539
|
-
Object.defineProperty(Sanitiser.prototype, "valueChanged", {
|
|
4540
|
-
get: /**
|
|
4541
|
-
* @return {?}
|
|
4542
|
-
*/
|
|
4543
|
-
function () {
|
|
4544
|
-
return !___default.isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
|
|
4545
|
-
},
|
|
4546
|
-
enumerable: true,
|
|
4547
|
-
configurable: true
|
|
4548
|
-
});
|
|
4549
|
-
Object.defineProperty(Sanitiser.prototype, "sanitisedValue", {
|
|
4550
|
-
get: /**
|
|
4551
|
-
* @return {?}
|
|
4552
|
-
*/
|
|
4553
|
-
function () {
|
|
4554
|
-
return this._sanitisedValue;
|
|
4555
|
-
},
|
|
4556
|
-
enumerable: true,
|
|
4557
|
-
configurable: true
|
|
4558
|
-
});
|
|
4559
|
-
/**
|
|
4560
|
-
* @protected
|
|
4561
|
-
* @param {?} snapshot
|
|
4562
|
-
* @return {?}
|
|
4563
|
-
*/
|
|
4564
|
-
Sanitiser.prototype.readFrom = /**
|
|
4565
|
-
* @protected
|
|
4566
|
-
* @param {?} snapshot
|
|
4567
|
-
* @return {?}
|
|
4568
|
-
*/
|
|
4569
|
-
function (snapshot) {
|
|
4570
|
-
return lang.abstractMethod(this.constructor);
|
|
4571
|
-
};
|
|
4572
|
-
/**
|
|
4573
|
-
* @protected
|
|
4574
|
-
* @param {?} initialValue
|
|
4575
|
-
* @param {?} sanitisedValue
|
|
4576
|
-
* @return {?}
|
|
4577
|
-
*/
|
|
4578
|
-
Sanitiser.prototype.hasChanged = /**
|
|
4579
|
-
* @protected
|
|
4580
|
-
* @param {?} initialValue
|
|
4581
|
-
* @param {?} sanitisedValue
|
|
4582
|
-
* @return {?}
|
|
4583
|
-
*/
|
|
4584
|
-
function (initialValue, sanitisedValue) {
|
|
4585
|
-
return lang.abstractMethod(this.constructor);
|
|
4586
|
-
};
|
|
4587
|
-
/**
|
|
4588
|
-
* @param {?} dest
|
|
4589
|
-
* @return {?}
|
|
4590
|
-
*/
|
|
4591
|
-
Sanitiser.prototype.injectRouteParam = /**
|
|
4592
|
-
* @param {?} dest
|
|
4593
|
-
* @return {?}
|
|
4594
|
-
*/
|
|
4595
|
-
function (dest) {
|
|
4596
|
-
lang.abstractMethod(this.constructor);
|
|
4597
|
-
};
|
|
4598
|
-
/**
|
|
4599
|
-
* @return {?}
|
|
4600
|
-
*/
|
|
4601
|
-
Sanitiser.prototype.sanitize = /**
|
|
4602
|
-
* @return {?}
|
|
4603
|
-
*/
|
|
4604
|
-
function () {
|
|
4605
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4606
|
-
var _a;
|
|
4607
|
-
return __generator(this, function (_b) {
|
|
4608
|
-
switch (_b.label) {
|
|
4609
|
-
case 0:
|
|
4610
|
-
if (!this.sanitiser) return [3 /*break*/, 2];
|
|
4611
|
-
this.initialValue = this.readFrom(this.snapshot);
|
|
4612
|
-
_a = this;
|
|
4613
|
-
return [4 /*yield*/, this.sanitiser.sanitise(null, this.initialValue)];
|
|
4614
|
-
case 1:
|
|
4615
|
-
_a._sanitisedValue = _b.sent();
|
|
4616
|
-
if (this.initialValue !== this._sanitisedValue) {
|
|
4617
|
-
return [2 /*return*/, false];
|
|
4618
|
-
}
|
|
4619
|
-
_b.label = 2;
|
|
4620
|
-
case 2: return [2 /*return*/, true];
|
|
4621
|
-
}
|
|
4622
|
-
});
|
|
4623
|
-
});
|
|
4624
|
-
};
|
|
4625
|
-
return Sanitiser;
|
|
4626
|
-
}());
|
|
4627
|
-
if (false) {
|
|
4628
|
-
/**
|
|
4629
|
-
* @type {?}
|
|
4630
|
-
* @private
|
|
4631
|
-
*/
|
|
4632
|
-
Sanitiser.prototype.initialValue;
|
|
4633
|
-
/**
|
|
4634
|
-
* @type {?}
|
|
4635
|
-
* @private
|
|
4636
|
-
*/
|
|
4637
|
-
Sanitiser.prototype._sanitisedValue;
|
|
4638
|
-
/** @type {?} */
|
|
4639
|
-
Sanitiser.prototype.parameterDef;
|
|
4640
|
-
/** @type {?} */
|
|
4641
|
-
Sanitiser.prototype.snapshot;
|
|
4642
|
-
/** @type {?} */
|
|
4643
|
-
Sanitiser.prototype.sanitiser;
|
|
4644
|
-
}
|
|
4645
|
-
var RouteParameterSanitiser = /** @class */ (function () {
|
|
4646
|
-
function RouteParameterSanitiser(parameterDefs, snapshot, injector) {
|
|
4647
|
-
var _this = this;
|
|
4648
|
-
this.parameterDefs = parameterDefs;
|
|
4649
|
-
this.snapshot = snapshot;
|
|
4650
|
-
this.injector = injector;
|
|
4651
|
-
this.parameterSanitisers = [];
|
|
4652
|
-
/** @type {?} */
|
|
4653
|
-
var sanitisers = parameterDefs.map((/**
|
|
4654
|
-
* @param {?} def
|
|
4655
|
-
* @return {?}
|
|
4656
|
-
*/
|
|
4657
|
-
function (def) {
|
|
4658
|
-
return def.isArray ?
|
|
4659
|
-
new Sanitiser.Array(def, snapshot, _this.getSanitiser(def)) :
|
|
4660
|
-
new Sanitiser.Value(def, snapshot, _this.getSanitiser(def));
|
|
4661
|
-
}));
|
|
4662
|
-
this.routeIdSanitiser = sanitisers.find((/**
|
|
4663
|
-
* @param {?} p
|
|
4664
|
-
* @return {?}
|
|
4665
|
-
*/
|
|
4666
|
-
function (p) { return p.isRouteId(); }));
|
|
4667
|
-
this.parameterSanitisers = sanitisers.filter((/**
|
|
4668
|
-
* @param {?} p
|
|
4669
|
-
* @return {?}
|
|
4670
|
-
*/
|
|
4671
|
-
function (p) { return !p.isRouteId(); }));
|
|
4672
|
-
}
|
|
4673
|
-
/**
|
|
4674
|
-
* @return {?}
|
|
4675
|
-
*/
|
|
4676
|
-
RouteParameterSanitiser.prototype.sanitise = /**
|
|
4677
|
-
* @return {?}
|
|
4678
|
-
*/
|
|
4679
|
-
function () {
|
|
4680
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4681
|
-
var e_1, _a, _b, _c, sanitiser, e_1_1;
|
|
4682
|
-
return __generator(this, function (_d) {
|
|
4683
|
-
switch (_d.label) {
|
|
4684
|
-
case 0:
|
|
4685
|
-
if (!this.routeIdSanitiser) return [3 /*break*/, 2];
|
|
4686
|
-
return [4 /*yield*/, this.routeIdSanitiser.sanitize()];
|
|
4687
|
-
case 1:
|
|
4688
|
-
_d.sent();
|
|
4689
|
-
if (this.routeIdSanitiser.valueChanged) {
|
|
4690
|
-
// if the route id isn't ok we redirect immediately as the query params may need to be sanitised in the
|
|
4691
|
-
// context of the route id.
|
|
4692
|
-
return [2 /*return*/, false];
|
|
4693
|
-
}
|
|
4694
|
-
_d.label = 2;
|
|
4695
|
-
case 2:
|
|
4696
|
-
_d.trys.push([2, 7, 8, 9]);
|
|
4697
|
-
_b = __values(this.parameterSanitisers), _c = _b.next();
|
|
4698
|
-
_d.label = 3;
|
|
4699
|
-
case 3:
|
|
4700
|
-
if (!!_c.done) return [3 /*break*/, 6];
|
|
4701
|
-
sanitiser = _c.value;
|
|
4702
|
-
return [4 /*yield*/, sanitiser.sanitize()];
|
|
4703
|
-
case 4:
|
|
4704
|
-
_d.sent();
|
|
4705
|
-
_d.label = 5;
|
|
4706
|
-
case 5:
|
|
4707
|
-
_c = _b.next();
|
|
4708
|
-
return [3 /*break*/, 3];
|
|
4709
|
-
case 6: return [3 /*break*/, 9];
|
|
4710
|
-
case 7:
|
|
4711
|
-
e_1_1 = _d.sent();
|
|
4712
|
-
e_1 = { error: e_1_1 };
|
|
4713
|
-
return [3 /*break*/, 9];
|
|
4714
|
-
case 8:
|
|
4715
|
-
try {
|
|
4716
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4717
|
-
}
|
|
4718
|
-
finally { if (e_1) throw e_1.error; }
|
|
4719
|
-
return [7 /*endfinally*/];
|
|
4720
|
-
case 9: return [2 /*return*/, !this.parameterSanitisers.find((/**
|
|
4721
|
-
* @param {?} s
|
|
4722
|
-
* @return {?}
|
|
4723
|
-
*/
|
|
4724
|
-
function (s) { return s.valueChanged; }))];
|
|
4725
|
-
}
|
|
4726
|
-
});
|
|
4727
|
-
});
|
|
4728
|
-
};
|
|
4729
|
-
/**
|
|
4730
|
-
* @private
|
|
4731
|
-
* @template T, S
|
|
4732
|
-
* @param {?} def
|
|
4733
|
-
* @return {?}
|
|
4734
|
-
*/
|
|
4735
|
-
RouteParameterSanitiser.prototype.getSanitiser = /**
|
|
4736
|
-
* @private
|
|
4737
|
-
* @template T, S
|
|
4738
|
-
* @param {?} def
|
|
4739
|
-
* @return {?}
|
|
4740
|
-
*/
|
|
4741
|
-
function (def) {
|
|
4742
|
-
return def.getSanitiser(this.injector);
|
|
4743
|
-
};
|
|
4744
|
-
/**
|
|
4745
|
-
* @return {?}
|
|
4746
|
-
*/
|
|
4747
|
-
RouteParameterSanitiser.prototype.routeIdHasChanged = /**
|
|
4748
|
-
* @return {?}
|
|
4749
|
-
*/
|
|
4750
|
-
function () {
|
|
4751
|
-
assert.isTruthy(this.parameterSanitisers.length !== 0);
|
|
4752
|
-
return this.routeIdSanitiser && this.routeIdSanitiser.valueChanged;
|
|
4753
|
-
};
|
|
4754
|
-
// @Trace()
|
|
4755
|
-
// @Trace()
|
|
4756
|
-
/**
|
|
4757
|
-
* @return {?}
|
|
4758
|
-
*/
|
|
4759
|
-
RouteParameterSanitiser.prototype.getRedirectParams =
|
|
4760
|
-
// @Trace()
|
|
4761
|
-
/**
|
|
4762
|
-
* @return {?}
|
|
4763
|
-
*/
|
|
4764
|
-
function () {
|
|
4765
|
-
if (this.routeIdHasChanged()) {
|
|
4766
|
-
return [this.routeIdSanitiser.sanitisedValue];
|
|
4767
|
-
}
|
|
4768
|
-
else {
|
|
4769
|
-
/** @type {?} */
|
|
4770
|
-
var routeParams_1 = {};
|
|
4771
|
-
this.parameterSanitisers.forEach((/**
|
|
4772
|
-
* @param {?} s
|
|
4773
|
-
* @return {?}
|
|
4774
|
-
*/
|
|
4775
|
-
function (s) { return s.injectRouteParam(routeParams_1); }));
|
|
4776
|
-
return [routeParams_1];
|
|
4777
|
-
}
|
|
4778
|
-
};
|
|
4779
|
-
/**
|
|
4780
|
-
* @private
|
|
4781
|
-
* @template S
|
|
4782
|
-
* @param {?} value
|
|
4783
|
-
* @return {?}
|
|
4784
|
-
*/
|
|
4785
|
-
RouteParameterSanitiser.prototype.isSanitiserContructor = /**
|
|
4786
|
-
* @private
|
|
4787
|
-
* @template S
|
|
4788
|
-
* @param {?} value
|
|
4789
|
-
* @return {?}
|
|
4790
|
-
*/
|
|
4791
|
-
function (value) {
|
|
4792
|
-
return ___default.isFunction(value) && lang.constructorChain((/** @type {?} */ ((/** @type {?} */ (value))))).includes(Sanitiser);
|
|
4793
|
-
};
|
|
4794
|
-
__decorate([
|
|
4795
|
-
Memoize$1(),
|
|
4796
|
-
__metadata("design:type", Function),
|
|
4797
|
-
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
4798
|
-
__metadata("design:returntype", Object)
|
|
4799
|
-
], RouteParameterSanitiser.prototype, "getSanitiser", null);
|
|
4800
|
-
return RouteParameterSanitiser;
|
|
4801
|
-
}());
|
|
4802
|
-
if (false) {
|
|
4803
|
-
/**
|
|
4804
|
-
* @type {?}
|
|
4805
|
-
* @private
|
|
4806
|
-
*/
|
|
4807
|
-
RouteParameterSanitiser.prototype.routeIdSanitiser;
|
|
4808
|
-
/**
|
|
4809
|
-
* @type {?}
|
|
4810
|
-
* @private
|
|
4811
|
-
*/
|
|
4812
|
-
RouteParameterSanitiser.prototype.parameterSanitisers;
|
|
4813
|
-
/** @type {?} */
|
|
4814
|
-
RouteParameterSanitiser.prototype.parameterDefs;
|
|
4815
|
-
/** @type {?} */
|
|
4816
|
-
RouteParameterSanitiser.prototype.snapshot;
|
|
4817
|
-
/** @type {?} */
|
|
4818
|
-
RouteParameterSanitiser.prototype.injector;
|
|
4819
|
-
}
|
|
4820
|
-
(function (Sanitiser) {
|
|
4821
|
-
/**
|
|
4822
|
-
* @template T
|
|
4823
|
-
*/
|
|
4824
|
-
var /**
|
|
4825
|
-
* @template T
|
|
4826
|
-
*/
|
|
4827
|
-
Value = /** @class */ (function (_super) {
|
|
4828
|
-
__extends(Value, _super);
|
|
4829
|
-
function Value() {
|
|
4830
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
4831
|
-
}
|
|
4832
|
-
/**
|
|
4833
|
-
* @param {?} snapshot
|
|
4834
|
-
* @return {?}
|
|
4835
|
-
*/
|
|
4836
|
-
Value.prototype.readFrom = /**
|
|
4837
|
-
* @param {?} snapshot
|
|
4838
|
-
* @return {?}
|
|
4839
|
-
*/
|
|
4840
|
-
function (snapshot) {
|
|
4841
|
-
/** @type {?} */
|
|
4842
|
-
var rawValue = snapshot.paramMap.get(this.parameterDef.name);
|
|
4843
|
-
return this.parameterDef.type.parse(rawValue);
|
|
4844
|
-
};
|
|
4845
|
-
/**
|
|
4846
|
-
* @protected
|
|
4847
|
-
* @param {?} initialValue
|
|
4848
|
-
* @param {?} sanitisedValue
|
|
4849
|
-
* @return {?}
|
|
4850
|
-
*/
|
|
4851
|
-
Value.prototype.hasChanged = /**
|
|
4852
|
-
* @protected
|
|
4853
|
-
* @param {?} initialValue
|
|
4854
|
-
* @param {?} sanitisedValue
|
|
4855
|
-
* @return {?}
|
|
4856
|
-
*/
|
|
4857
|
-
function (initialValue, sanitisedValue) {
|
|
4858
|
-
return initialValue !== sanitisedValue;
|
|
4859
|
-
};
|
|
4860
|
-
/**
|
|
4861
|
-
* @param {?} dest
|
|
4862
|
-
* @return {?}
|
|
4863
|
-
*/
|
|
4864
|
-
Value.prototype.injectRouteParam = /**
|
|
4865
|
-
* @param {?} dest
|
|
4866
|
-
* @return {?}
|
|
4867
|
-
*/
|
|
4868
|
-
function (dest) {
|
|
4869
|
-
dest[this.parameterDef.name] = this.parameterDef.type.format(this.sanitisedValue);
|
|
4870
|
-
};
|
|
4871
|
-
return Value;
|
|
4872
|
-
}(Sanitiser));
|
|
4873
|
-
Sanitiser.Value = Value;
|
|
4874
|
-
/**
|
|
4875
|
-
* @template T
|
|
4876
|
-
*/
|
|
4877
|
-
var /**
|
|
4878
|
-
* @template T
|
|
4879
|
-
*/
|
|
4880
|
-
Array = /** @class */ (function (_super) {
|
|
4881
|
-
__extends(Array, _super);
|
|
4882
|
-
function Array() {
|
|
4883
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
4884
|
-
}
|
|
4885
|
-
/**
|
|
4886
|
-
* @param {?} snapshot
|
|
4887
|
-
* @return {?}
|
|
4888
|
-
*/
|
|
4889
|
-
Array.prototype.readFrom = /**
|
|
4890
|
-
* @param {?} snapshot
|
|
4891
|
-
* @return {?}
|
|
4892
|
-
*/
|
|
4893
|
-
function (snapshot) {
|
|
4894
|
-
var _this = this;
|
|
4895
|
-
/** @type {?} */
|
|
4896
|
-
var rawValues = snapshot.paramMap.getAll(this.parameterDef.name);
|
|
4897
|
-
return rawValues.map((/**
|
|
4898
|
-
* @param {?} value
|
|
4899
|
-
* @return {?}
|
|
4900
|
-
*/
|
|
4901
|
-
function (value) { return _this.parameterDef.type.parse(value); }));
|
|
4902
|
-
};
|
|
4903
|
-
/**
|
|
4904
|
-
* @protected
|
|
4905
|
-
* @param {?} initialValue
|
|
4906
|
-
* @param {?} sanitisedValue
|
|
4907
|
-
* @return {?}
|
|
4908
|
-
*/
|
|
4909
|
-
Array.prototype.hasChanged = /**
|
|
4910
|
-
* @protected
|
|
4911
|
-
* @param {?} initialValue
|
|
4912
|
-
* @param {?} sanitisedValue
|
|
4913
|
-
* @return {?}
|
|
4914
|
-
*/
|
|
4915
|
-
function (initialValue, sanitisedValue) {
|
|
4916
|
-
return initialValue !== sanitisedValue;
|
|
4917
|
-
};
|
|
4918
|
-
/**
|
|
4919
|
-
* @param {?} dest
|
|
4920
|
-
* @return {?}
|
|
4921
|
-
*/
|
|
4922
|
-
Array.prototype.injectRouteParam = /**
|
|
4923
|
-
* @param {?} dest
|
|
4924
|
-
* @return {?}
|
|
4925
|
-
*/
|
|
4926
|
-
function (dest) {
|
|
4927
|
-
var _this = this;
|
|
4928
|
-
dest[this.parameterDef.name] = this.sanitisedValue.map((/**
|
|
4929
|
-
* @param {?} v
|
|
4930
|
-
* @return {?}
|
|
4931
|
-
*/
|
|
4932
|
-
function (v) { return _this.parameterDef.type.format(v); }));
|
|
4933
|
-
};
|
|
4934
|
-
return Array;
|
|
4935
|
-
}(Sanitiser));
|
|
4936
|
-
Sanitiser.Array = Array;
|
|
4937
|
-
})(Sanitiser || (Sanitiser = {}));
|
|
4938
|
-
|
|
4939
4576
|
/**
|
|
4940
4577
|
* @fileoverview added by tsickle
|
|
4941
4578
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -4956,5 +4593,5 @@ if (false) {
|
|
|
4956
4593
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4957
4594
|
*/
|
|
4958
4595
|
|
|
4959
|
-
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,
|
|
4596
|
+
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 };
|
|
4960
4597
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|