@coolon/angular-ui-powerups 0.0.37 → 0.0.41
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 +1787 -1051
- 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.d.ts +16 -14
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +16 -14
- package/esm2015/index.js +2 -2
- package/esm2015/lib/angular-ui-powerups.module.js +8 -8
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +1 -2
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +1 -2
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +75 -0
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +47 -0
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +110 -16
- package/esm2015/lib/place/components/place-outlet/route-animations.js +12 -5
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +5 -39
- package/esm2015/lib/place/guards/leave-place.guard.js +20 -3
- package/esm2015/lib/place/guards/place-route.guard.js +29 -37
- package/esm2015/lib/place/index.js +11 -9
- package/esm2015/lib/place/nav-item.js +23 -0
- package/esm2015/lib/place/place-component-like.js +17 -0
- package/esm2015/lib/place/place-component.js +119 -20
- package/esm2015/lib/place/place-updates-service.js +16 -0
- package/esm2015/lib/place/place.decorator.js +1 -1
- package/esm2015/lib/place/place.module.js +6 -3
- package/esm2015/lib/place/place.service.js +28 -26
- package/esm2015/lib/place/route/default-parameter-sanitiser.js +78 -0
- package/esm2015/lib/place/route/parameter-decorators.js +15 -7
- package/esm2015/lib/place/route/parameter-definition.class.js +2 -2
- package/esm2015/lib/place/route/parameter-sanitiser.js +17 -2
- package/esm2015/lib/place/route/parameter-snapshot.js +382 -0
- package/esm2015/lib/place/route/parameter-type.js +3 -2
- package/esm2015/lib/place/route/route-parameter-sanitiser.js +73 -38
- package/esm2015/lib/place/visit.js +22 -0
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +16 -14
- package/esm5/index.js +2 -2
- package/esm5/lib/angular-ui-powerups.module.js +8 -8
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +1 -2
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +1 -2
- package/esm5/lib/place/components/abstract-place-navigation.component.js +86 -0
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +61 -0
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +141 -20
- package/esm5/lib/place/components/place-outlet/route-animations.js +12 -5
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +6 -43
- package/esm5/lib/place/guards/leave-place.guard.js +20 -3
- package/esm5/lib/place/guards/place-route.guard.js +28 -37
- package/esm5/lib/place/index.js +11 -9
- package/esm5/lib/place/nav-item.js +23 -0
- package/esm5/lib/place/place-component-like.js +17 -0
- package/esm5/lib/place/place-component.js +137 -22
- package/esm5/lib/place/place-updates-service.js +16 -0
- package/esm5/lib/place/place.decorator.js +1 -1
- package/esm5/lib/place/place.module.js +6 -3
- package/esm5/lib/place/place.service.js +48 -29
- package/esm5/lib/place/route/default-parameter-sanitiser.js +85 -0
- package/esm5/lib/place/route/parameter-decorators.js +15 -7
- package/esm5/lib/place/route/parameter-definition.class.js +2 -2
- package/esm5/lib/place/route/parameter-sanitiser.js +17 -2
- package/esm5/lib/place/route/parameter-snapshot.js +474 -0
- package/esm5/lib/place/route/parameter-type.js +3 -2
- package/esm5/lib/place/route/route-parameter-sanitiser.js +100 -45
- package/esm5/lib/place/visit.js +22 -0
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +1244 -673
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1750 -1021
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/abstract-place-navigation.component.d.ts +13 -0
- package/lib/place/components/list-place-nav/list-place-nav.component.d.ts +8 -0
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +16 -8
- package/lib/place/components/place-outlet/route-animations.d.ts +1 -0
- package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +2 -9
- package/lib/place/guards/place-route.guard.d.ts +4 -4
- package/lib/place/index.d.ts +8 -6
- package/lib/place/nav-item.d.ts +5 -0
- package/lib/place/{i-place-component.d.ts → place-component-like.d.ts} +1 -1
- package/lib/place/place-component.d.ts +19 -8
- package/lib/place/place-updates-service.d.ts +10 -0
- package/lib/place/place.service.d.ts +11 -8
- package/lib/place/route/default-parameter-sanitiser.d.ts +13 -0
- package/lib/place/route/parameter-decorators.d.ts +6 -2
- package/lib/place/route/parameter-definition.class.d.ts +3 -3
- package/lib/place/route/parameter-sanitiser.d.ts +8 -1
- package/lib/place/route/parameter-snapshot.d.ts +46 -0
- package/lib/place/route/route-parameter-sanitiser.d.ts +13 -9
- package/lib/place/visit.d.ts +6 -0
- package/package.json +1 -1
- package/schematics/place-routes/index.js +8 -95
- package/schematics/place-routes/index.js.map +1 -1
- package/schematics/place-routes/place-builder.d.ts +19 -0
- package/schematics/place-routes/place-builder.js +109 -0
- package/schematics/place-routes/place-builder.js.map +1 -0
- package/schematics/place-routes/{scanner.d.ts → place-class-scanner.d.ts} +10 -6
- package/schematics/place-routes/{scanner.js → place-class-scanner.js} +43 -18
- package/schematics/place-routes/place-class-scanner.js.map +1 -0
- package/schematics/place-routes/place-def.d.ts +19 -4
- package/schematics/place-routes/place-def.js +54 -4
- package/schematics/place-routes/place-def.js.map +1 -1
- package/schematics/place-routes/templates/{place-routes.ts.template → places.ts.template} +14 -11
- package/esm2015/lib/place/i-place-component.js +0 -17
- package/esm2015/lib/place/i-place-service.js +0 -16
- package/esm2015/lib/place/route/resolved-parameter.js +0 -16
- package/esm2015/lib/place/route/resolved-route-parameter-snapshot.js +0 -106
- package/esm2015/lib/place/route/route-parameter-bindings.js +0 -150
- package/esm2015/lib/place/route/visit-snapshot.js +0 -7
- package/esm5/lib/place/i-place-component.js +0 -17
- package/esm5/lib/place/i-place-service.js +0 -16
- package/esm5/lib/place/route/resolved-parameter.js +0 -16
- package/esm5/lib/place/route/resolved-route-parameter-snapshot.js +0 -129
- package/esm5/lib/place/route/route-parameter-bindings.js +0 -167
- package/esm5/lib/place/route/visit-snapshot.js +0 -11
- package/lib/place/i-place-service.d.ts +0 -10
- package/lib/place/route/resolved-parameter.d.ts +0 -5
- package/lib/place/route/resolved-route-parameter-snapshot.d.ts +0 -12
- package/lib/place/route/route-parameter-bindings.d.ts +0 -17
- package/lib/place/route/visit-snapshot.d.ts +0 -2
- package/schematics/place-routes/scanner.js.map +0 -1
- package/schematics/place-routes/templates/place-router.ts.template +0 -33
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/
|
|
4
|
-
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.
|
|
5
|
-
}(this, function (exports, common, core, forms, material,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@angular/router'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@typescript-plus/fast-memoize-decorator'), require('lodash'), require('reflect-metadata'), require('@angular/animations'), require('resize-observer-polyfill')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/material/tabs', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/icon', '@angular/material/list', '@angular/material/tooltip', '@angular/router', '@typescript-plus/fast-memoize-decorator/dist/src', '@typescript-plus/fast-memoize-decorator', 'lodash', 'reflect-metadata', '@angular/animations', 'resize-observer-polyfill'], factory) :
|
|
4
|
+
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.material.tabs, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.icon, global.ng.material.list, global.ng.material.tooltip, global.ng.router, global.src, global.fastMemoizeDecorator, global.lodash, null, global.ng.animations, global.ResizeObserver));
|
|
5
|
+
}(this, function (exports, common, core, forms, material, tabs, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, icon, list, tooltip, router, src, fastMemoizeDecorator, lodash, reflectMetadata, animations$1, ResizeObserver) { 'use strict';
|
|
6
6
|
|
|
7
7
|
ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
|
|
8
8
|
|
|
@@ -479,6 +479,126 @@
|
|
|
479
479
|
return NumberInputComponent;
|
|
480
480
|
}(AbstractInputComponent));
|
|
481
481
|
|
|
482
|
+
/**
|
|
483
|
+
* @fileoverview added by tsickle
|
|
484
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
485
|
+
*/
|
|
486
|
+
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
487
|
+
__extends(PasswordInputComponent, _super);
|
|
488
|
+
function PasswordInputComponent() {
|
|
489
|
+
return _super.call(this) || this;
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* @return {?}
|
|
493
|
+
*/
|
|
494
|
+
PasswordInputComponent.prototype.ngOnInit = /**
|
|
495
|
+
* @return {?}
|
|
496
|
+
*/
|
|
497
|
+
function () {
|
|
498
|
+
};
|
|
499
|
+
PasswordInputComponent.decorators = [
|
|
500
|
+
{ type: core.Component, args: [{
|
|
501
|
+
selector: 'angular-ui-powerups-password-input',
|
|
502
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
503
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
|
|
504
|
+
}] }
|
|
505
|
+
];
|
|
506
|
+
/** @nocollapse */
|
|
507
|
+
PasswordInputComponent.ctorParameters = function () { return []; };
|
|
508
|
+
return PasswordInputComponent;
|
|
509
|
+
}(AbstractInputComponent));
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* @fileoverview added by tsickle
|
|
513
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
514
|
+
*/
|
|
515
|
+
/**
|
|
516
|
+
* @template T
|
|
517
|
+
*/
|
|
518
|
+
var SelectInputComponent = /** @class */ (function (_super) {
|
|
519
|
+
__extends(SelectInputComponent, _super);
|
|
520
|
+
function SelectInputComponent() {
|
|
521
|
+
var _this = _super.call(this) || this;
|
|
522
|
+
_this.optionLabelFormat = (/**
|
|
523
|
+
* @param {?} option
|
|
524
|
+
* @return {?}
|
|
525
|
+
*/
|
|
526
|
+
function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; });
|
|
527
|
+
return _this;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* @return {?}
|
|
531
|
+
*/
|
|
532
|
+
SelectInputComponent.prototype.ngOnInit = /**
|
|
533
|
+
* @return {?}
|
|
534
|
+
*/
|
|
535
|
+
function () {
|
|
536
|
+
};
|
|
537
|
+
SelectInputComponent.decorators = [
|
|
538
|
+
{ type: core.Component, args: [{
|
|
539
|
+
selector: 'angular-ui-powerups-select-input',
|
|
540
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value\" [value]=\"option\">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
541
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
542
|
+
}] }
|
|
543
|
+
];
|
|
544
|
+
/** @nocollapse */
|
|
545
|
+
SelectInputComponent.ctorParameters = function () { return []; };
|
|
546
|
+
SelectInputComponent.propDecorators = {
|
|
547
|
+
optionsModel: [{ type: core.Input }],
|
|
548
|
+
options: [{ type: core.Input }],
|
|
549
|
+
optionLabel: [{ type: core.Input }],
|
|
550
|
+
optionLabelFormat: [{ type: core.Input }]
|
|
551
|
+
};
|
|
552
|
+
__decorate([
|
|
553
|
+
pectin.UseDelegate(),
|
|
554
|
+
__metadata("design:type", pectin.ListModel)
|
|
555
|
+
], SelectInputComponent.prototype, "optionsModel", void 0);
|
|
556
|
+
__decorate([
|
|
557
|
+
pectin.StoreInListModel('optionsModel'),
|
|
558
|
+
__metadata("design:type", Array)
|
|
559
|
+
], SelectInputComponent.prototype, "options", void 0);
|
|
560
|
+
return SelectInputComponent;
|
|
561
|
+
}(AbstractInputComponent));
|
|
562
|
+
if (false) {
|
|
563
|
+
/** @type {?} */
|
|
564
|
+
SelectInputComponent.prototype.optionsModel;
|
|
565
|
+
/** @type {?} */
|
|
566
|
+
SelectInputComponent.prototype.options;
|
|
567
|
+
/** @type {?} */
|
|
568
|
+
SelectInputComponent.prototype.optionLabel;
|
|
569
|
+
/** @type {?} */
|
|
570
|
+
SelectInputComponent.prototype.optionLabelFormat;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* @fileoverview added by tsickle
|
|
575
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
576
|
+
*/
|
|
577
|
+
var StringInputComponent = /** @class */ (function (_super) {
|
|
578
|
+
__extends(StringInputComponent, _super);
|
|
579
|
+
function StringInputComponent() {
|
|
580
|
+
return _super.call(this) || this;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* @return {?}
|
|
584
|
+
*/
|
|
585
|
+
StringInputComponent.prototype.ngOnInit = /**
|
|
586
|
+
* @return {?}
|
|
587
|
+
*/
|
|
588
|
+
function () {
|
|
589
|
+
};
|
|
590
|
+
StringInputComponent.decorators = [
|
|
591
|
+
{ type: core.Component, args: [{
|
|
592
|
+
selector: 'angular-ui-powerups-string-input',
|
|
593
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
594
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
|
|
595
|
+
}] }
|
|
596
|
+
];
|
|
597
|
+
/** @nocollapse */
|
|
598
|
+
StringInputComponent.ctorParameters = function () { return []; };
|
|
599
|
+
return StringInputComponent;
|
|
600
|
+
}(AbstractInputComponent));
|
|
601
|
+
|
|
482
602
|
/**
|
|
483
603
|
* @fileoverview added by tsickle
|
|
484
604
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -855,126 +975,6 @@
|
|
|
855
975
|
FocusBindingDirective.prototype.ngZone;
|
|
856
976
|
}
|
|
857
977
|
|
|
858
|
-
/**
|
|
859
|
-
* @fileoverview added by tsickle
|
|
860
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
861
|
-
*/
|
|
862
|
-
var StringInputComponent = /** @class */ (function (_super) {
|
|
863
|
-
__extends(StringInputComponent, _super);
|
|
864
|
-
function StringInputComponent() {
|
|
865
|
-
return _super.call(this) || this;
|
|
866
|
-
}
|
|
867
|
-
/**
|
|
868
|
-
* @return {?}
|
|
869
|
-
*/
|
|
870
|
-
StringInputComponent.prototype.ngOnInit = /**
|
|
871
|
-
* @return {?}
|
|
872
|
-
*/
|
|
873
|
-
function () {
|
|
874
|
-
};
|
|
875
|
-
StringInputComponent.decorators = [
|
|
876
|
-
{ type: core.Component, args: [{
|
|
877
|
-
selector: 'angular-ui-powerups-string-input',
|
|
878
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
879
|
-
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
|
|
880
|
-
}] }
|
|
881
|
-
];
|
|
882
|
-
/** @nocollapse */
|
|
883
|
-
StringInputComponent.ctorParameters = function () { return []; };
|
|
884
|
-
return StringInputComponent;
|
|
885
|
-
}(AbstractInputComponent));
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* @fileoverview added by tsickle
|
|
889
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
890
|
-
*/
|
|
891
|
-
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
892
|
-
__extends(PasswordInputComponent, _super);
|
|
893
|
-
function PasswordInputComponent() {
|
|
894
|
-
return _super.call(this) || this;
|
|
895
|
-
}
|
|
896
|
-
/**
|
|
897
|
-
* @return {?}
|
|
898
|
-
*/
|
|
899
|
-
PasswordInputComponent.prototype.ngOnInit = /**
|
|
900
|
-
* @return {?}
|
|
901
|
-
*/
|
|
902
|
-
function () {
|
|
903
|
-
};
|
|
904
|
-
PasswordInputComponent.decorators = [
|
|
905
|
-
{ type: core.Component, args: [{
|
|
906
|
-
selector: 'angular-ui-powerups-password-input',
|
|
907
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
908
|
-
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
|
|
909
|
-
}] }
|
|
910
|
-
];
|
|
911
|
-
/** @nocollapse */
|
|
912
|
-
PasswordInputComponent.ctorParameters = function () { return []; };
|
|
913
|
-
return PasswordInputComponent;
|
|
914
|
-
}(AbstractInputComponent));
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* @fileoverview added by tsickle
|
|
918
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
919
|
-
*/
|
|
920
|
-
/**
|
|
921
|
-
* @template T
|
|
922
|
-
*/
|
|
923
|
-
var SelectInputComponent = /** @class */ (function (_super) {
|
|
924
|
-
__extends(SelectInputComponent, _super);
|
|
925
|
-
function SelectInputComponent() {
|
|
926
|
-
var _this = _super.call(this) || this;
|
|
927
|
-
_this.optionLabelFormat = (/**
|
|
928
|
-
* @param {?} option
|
|
929
|
-
* @return {?}
|
|
930
|
-
*/
|
|
931
|
-
function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; });
|
|
932
|
-
return _this;
|
|
933
|
-
}
|
|
934
|
-
/**
|
|
935
|
-
* @return {?}
|
|
936
|
-
*/
|
|
937
|
-
SelectInputComponent.prototype.ngOnInit = /**
|
|
938
|
-
* @return {?}
|
|
939
|
-
*/
|
|
940
|
-
function () {
|
|
941
|
-
};
|
|
942
|
-
SelectInputComponent.decorators = [
|
|
943
|
-
{ type: core.Component, args: [{
|
|
944
|
-
selector: 'angular-ui-powerups-select-input',
|
|
945
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value\" [value]=\"option\">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
946
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
947
|
-
}] }
|
|
948
|
-
];
|
|
949
|
-
/** @nocollapse */
|
|
950
|
-
SelectInputComponent.ctorParameters = function () { return []; };
|
|
951
|
-
SelectInputComponent.propDecorators = {
|
|
952
|
-
optionsModel: [{ type: core.Input }],
|
|
953
|
-
options: [{ type: core.Input }],
|
|
954
|
-
optionLabel: [{ type: core.Input }],
|
|
955
|
-
optionLabelFormat: [{ type: core.Input }]
|
|
956
|
-
};
|
|
957
|
-
__decorate([
|
|
958
|
-
pectin.UseDelegate(),
|
|
959
|
-
__metadata("design:type", pectin.ListModel)
|
|
960
|
-
], SelectInputComponent.prototype, "optionsModel", void 0);
|
|
961
|
-
__decorate([
|
|
962
|
-
pectin.StoreInListModel('optionsModel'),
|
|
963
|
-
__metadata("design:type", Array)
|
|
964
|
-
], SelectInputComponent.prototype, "options", void 0);
|
|
965
|
-
return SelectInputComponent;
|
|
966
|
-
}(AbstractInputComponent));
|
|
967
|
-
if (false) {
|
|
968
|
-
/** @type {?} */
|
|
969
|
-
SelectInputComponent.prototype.optionsModel;
|
|
970
|
-
/** @type {?} */
|
|
971
|
-
SelectInputComponent.prototype.options;
|
|
972
|
-
/** @type {?} */
|
|
973
|
-
SelectInputComponent.prototype.optionLabel;
|
|
974
|
-
/** @type {?} */
|
|
975
|
-
SelectInputComponent.prototype.optionLabelFormat;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
978
|
/**
|
|
979
979
|
* @fileoverview added by tsickle
|
|
980
980
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1048,7 +1048,7 @@
|
|
|
1048
1048
|
/**
|
|
1049
1049
|
* @template D, R, E
|
|
1050
1050
|
*/
|
|
1051
|
-
exports.ɵ
|
|
1051
|
+
exports.ɵu = /** @class */ (function () {
|
|
1052
1052
|
function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
|
|
1053
1053
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
1054
1054
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -1170,27 +1170,27 @@
|
|
|
1170
1170
|
}());
|
|
1171
1171
|
if (false) {
|
|
1172
1172
|
/** @type {?} */
|
|
1173
|
-
exports.ɵ
|
|
1173
|
+
exports.ɵu.prototype.interactionContext;
|
|
1174
1174
|
/**
|
|
1175
1175
|
* @type {?}
|
|
1176
1176
|
* @private
|
|
1177
1177
|
*/
|
|
1178
|
-
exports.ɵ
|
|
1178
|
+
exports.ɵu.prototype.activityComponentRef;
|
|
1179
1179
|
/**
|
|
1180
1180
|
* @type {?}
|
|
1181
1181
|
* @private
|
|
1182
1182
|
*/
|
|
1183
|
-
exports.ɵ
|
|
1183
|
+
exports.ɵu.prototype.componentFactoryResolver;
|
|
1184
1184
|
/**
|
|
1185
1185
|
* @type {?}
|
|
1186
1186
|
* @private
|
|
1187
1187
|
*/
|
|
1188
|
-
exports.ɵ
|
|
1188
|
+
exports.ɵu.prototype.viewContainerRef;
|
|
1189
1189
|
/**
|
|
1190
1190
|
* @type {?}
|
|
1191
1191
|
* @private
|
|
1192
1192
|
*/
|
|
1193
|
-
exports.ɵ
|
|
1193
|
+
exports.ɵu.prototype.injector;
|
|
1194
1194
|
/* Skipping unhandled member: ;*/
|
|
1195
1195
|
}
|
|
1196
1196
|
(function (ActivityOutletComponent) {
|
|
@@ -1251,7 +1251,7 @@
|
|
|
1251
1251
|
*/
|
|
1252
1252
|
OutletInteractionContext.prototype.context;
|
|
1253
1253
|
}
|
|
1254
|
-
})(exports.ɵ
|
|
1254
|
+
})(exports.ɵu || (exports.ɵu = {}));
|
|
1255
1255
|
|
|
1256
1256
|
/**
|
|
1257
1257
|
* @fileoverview added by tsickle
|
|
@@ -1477,7 +1477,6 @@
|
|
|
1477
1477
|
var _this = _super.call(this) || this;
|
|
1478
1478
|
_this.confirm = confirm;
|
|
1479
1479
|
pectin.assert.notNil(confirm);
|
|
1480
|
-
console.log(confirm);
|
|
1481
1480
|
return _this;
|
|
1482
1481
|
}
|
|
1483
1482
|
/**
|
|
@@ -1519,7 +1518,7 @@
|
|
|
1519
1518
|
* @fileoverview added by tsickle
|
|
1520
1519
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1521
1520
|
*/
|
|
1522
|
-
exports.ɵ
|
|
1521
|
+
exports.ɵt = /** @class */ (function (_super) {
|
|
1523
1522
|
__extends(ActivityContainerComponent, _super);
|
|
1524
1523
|
function ActivityContainerComponent() {
|
|
1525
1524
|
var _this = _super.call(this) || this;
|
|
@@ -1630,7 +1629,6 @@
|
|
|
1630
1629
|
*/
|
|
1631
1630
|
function () {
|
|
1632
1631
|
var _this = this;
|
|
1633
|
-
// TODO: notify selected tab they are ready. activty.afterAnimationComplete
|
|
1634
1632
|
this.activityTabs.value = this.activityTabs.value.filter((/**
|
|
1635
1633
|
* @param {?} tab
|
|
1636
1634
|
* @return {?}
|
|
@@ -1653,31 +1651,31 @@
|
|
|
1653
1651
|
parentInteractionContext: [{ type: core.Input }],
|
|
1654
1652
|
initialActivity: [{ type: core.Input }],
|
|
1655
1653
|
tabs: [{ type: core.ViewChild, args: ['tabs', { static: true },] }],
|
|
1656
|
-
outlets: [{ type: core.ViewChildren, args: [exports.ɵ
|
|
1654
|
+
outlets: [{ type: core.ViewChildren, args: [exports.ɵu,] }]
|
|
1657
1655
|
};
|
|
1658
1656
|
return ActivityContainerComponent;
|
|
1659
1657
|
}(DisposableComponent));
|
|
1660
1658
|
if (false) {
|
|
1661
1659
|
/** @type {?} */
|
|
1662
|
-
exports.ɵ
|
|
1660
|
+
exports.ɵt.prototype.parentInteractionContext;
|
|
1663
1661
|
/** @type {?} */
|
|
1664
|
-
exports.ɵ
|
|
1662
|
+
exports.ɵt.prototype.initialActivity;
|
|
1665
1663
|
/** @type {?} */
|
|
1666
|
-
exports.ɵ
|
|
1664
|
+
exports.ɵt.prototype.tabs;
|
|
1667
1665
|
/** @type {?} */
|
|
1668
|
-
exports.ɵ
|
|
1666
|
+
exports.ɵt.prototype.outlets;
|
|
1669
1667
|
/** @type {?} */
|
|
1670
|
-
exports.ɵ
|
|
1668
|
+
exports.ɵt.prototype.activityTabs;
|
|
1671
1669
|
/**
|
|
1672
1670
|
* @type {?}
|
|
1673
1671
|
* @private
|
|
1674
1672
|
*/
|
|
1675
|
-
exports.ɵ
|
|
1673
|
+
exports.ɵt.prototype.obsoleteTabs;
|
|
1676
1674
|
/**
|
|
1677
1675
|
* @type {?}
|
|
1678
1676
|
* @private
|
|
1679
1677
|
*/
|
|
1680
|
-
exports.ɵ
|
|
1678
|
+
exports.ɵt.prototype.lastActivityTab;
|
|
1681
1679
|
}
|
|
1682
1680
|
(function (ActivityContainerComponent) {
|
|
1683
1681
|
/**
|
|
@@ -1696,7 +1694,7 @@
|
|
|
1696
1694
|
/** @type {?} */
|
|
1697
1695
|
ActivityContext.prototype.onCancel;
|
|
1698
1696
|
}
|
|
1699
|
-
})(exports.ɵ
|
|
1697
|
+
})(exports.ɵt || (exports.ɵt = {}));
|
|
1700
1698
|
|
|
1701
1699
|
/**
|
|
1702
1700
|
* @fileoverview added by tsickle
|
|
@@ -1752,7 +1750,7 @@
|
|
|
1752
1750
|
autoFocus: false
|
|
1753
1751
|
};
|
|
1754
1752
|
/** @type {?} */
|
|
1755
|
-
var matDialogRef = (/** @type {?} */ (this.dialogService.open(exports.ɵ
|
|
1753
|
+
var matDialogRef = (/** @type {?} */ (this.dialogService.open(exports.ɵt, config)));
|
|
1756
1754
|
return new Promise((/**
|
|
1757
1755
|
* @param {?} resolve
|
|
1758
1756
|
* @param {?} reject
|
|
@@ -1844,13 +1842,13 @@
|
|
|
1844
1842
|
portal.PortalModule
|
|
1845
1843
|
],
|
|
1846
1844
|
declarations: [
|
|
1847
|
-
exports.ɵ
|
|
1845
|
+
exports.ɵt,
|
|
1848
1846
|
ConfirmationDialogComponent,
|
|
1849
1847
|
AlertDialogComponent,
|
|
1850
|
-
exports.ɵ
|
|
1848
|
+
exports.ɵu
|
|
1851
1849
|
],
|
|
1852
1850
|
entryComponents: [
|
|
1853
|
-
exports.ɵ
|
|
1851
|
+
exports.ɵt,
|
|
1854
1852
|
ConfirmationDialogComponent,
|
|
1855
1853
|
AlertDialogComponent
|
|
1856
1854
|
],
|
|
@@ -1938,88 +1936,175 @@
|
|
|
1938
1936
|
* @fileoverview added by tsickle
|
|
1939
1937
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1940
1938
|
*/
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1939
|
+
// TODO: there are really two types of snapshot, ones with id's and ones without.
|
|
1940
|
+
// Id snapshot are repesented by 2 url segments
|
|
1941
|
+
// ID => [{'/basePath', params}, {'id', params}]
|
|
1942
|
+
// NO ID => [{'/basePath', params}]
|
|
1943
|
+
exports.ParameterSnapshot = /** @class */ (function () {
|
|
1944
|
+
function ParameterSnapshot(placeDefinition, resolved) {
|
|
1945
|
+
this.placeDefinition = placeDefinition;
|
|
1946
|
+
this.resolved = resolved;
|
|
1944
1947
|
}
|
|
1945
1948
|
/**
|
|
1946
|
-
* @
|
|
1947
|
-
* @param {?} parameter
|
|
1949
|
+
* @param {?} other
|
|
1948
1950
|
* @return {?}
|
|
1949
1951
|
*/
|
|
1950
|
-
|
|
1951
|
-
* @
|
|
1952
|
-
* @param {?} parameter
|
|
1952
|
+
ParameterSnapshot.prototype.hasChanged = /**
|
|
1953
|
+
* @param {?} other
|
|
1953
1954
|
* @return {?}
|
|
1954
1955
|
*/
|
|
1955
|
-
function (
|
|
1956
|
+
function (other) {
|
|
1956
1957
|
/** @type {?} */
|
|
1957
|
-
var
|
|
1958
|
-
* @param {?}
|
|
1958
|
+
var changed = this.resolved.find((/**
|
|
1959
|
+
* @param {?} r
|
|
1959
1960
|
* @return {?}
|
|
1960
1961
|
*/
|
|
1961
|
-
function (
|
|
1962
|
-
|
|
1962
|
+
function (r) {
|
|
1963
|
+
return !r.isSame(other.getResolvedParameterValue(r.parameterDef));
|
|
1964
|
+
}));
|
|
1965
|
+
if (changed) {
|
|
1966
|
+
console.log({ mine: changed, theirs: other.getResolvedParameter(changed.parameterDef) });
|
|
1967
|
+
}
|
|
1968
|
+
return !!changed;
|
|
1963
1969
|
};
|
|
1964
1970
|
/**
|
|
1965
|
-
* @
|
|
1966
|
-
* @param {?} parameter
|
|
1967
|
-
* @param {?} value
|
|
1971
|
+
* @param {?} other
|
|
1968
1972
|
* @return {?}
|
|
1969
1973
|
*/
|
|
1970
|
-
|
|
1971
|
-
* @
|
|
1972
|
-
* @param {?} parameter
|
|
1973
|
-
* @param {?} value
|
|
1974
|
+
ParameterSnapshot.prototype.asUrlSegment = /**
|
|
1975
|
+
* @param {?} other
|
|
1974
1976
|
* @return {?}
|
|
1975
1977
|
*/
|
|
1976
|
-
function (
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1978
|
+
function (other) {
|
|
1979
|
+
pectin.assert.isTruthy(this.hasChanged(other));
|
|
1980
|
+
/** @type {?} */
|
|
1981
|
+
var routeParts = [];
|
|
1982
|
+
/** @type {?} */
|
|
1983
|
+
var gainedId = this.getFormattedRouteId() && !other.getFormattedRouteId();
|
|
1984
|
+
/** @type {?} */
|
|
1985
|
+
var sameId = this.getFormattedRouteId() === other.getFormattedRouteId();
|
|
1986
|
+
/** @type {?} */
|
|
1987
|
+
var lostId = (!this.getFormattedRouteId() && other.getFormattedRouteId());
|
|
1988
|
+
/** @type {?} */
|
|
1989
|
+
var changedId = (this.getFormattedRouteId() !== other.getFormattedRouteId());
|
|
1990
|
+
if (lostId || changedId) {
|
|
1991
|
+
routeParts.push('..');
|
|
1992
|
+
if (changedId) {
|
|
1993
|
+
routeParts.push(this.getFormattedRouteId());
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
else {
|
|
1997
|
+
routeParts.push('.');
|
|
1998
|
+
}
|
|
1999
|
+
routeParts.push(this.getFormattedParameters());
|
|
2000
|
+
return routeParts;
|
|
2001
|
+
};
|
|
2002
|
+
/**
|
|
2003
|
+
* @template T, S
|
|
2004
|
+
* @param {?} parameterDef
|
|
2005
|
+
* @return {?}
|
|
2006
|
+
*/
|
|
2007
|
+
ParameterSnapshot.prototype.getResolvedParameter = /**
|
|
2008
|
+
* @template T, S
|
|
2009
|
+
* @param {?} parameterDef
|
|
2010
|
+
* @return {?}
|
|
2011
|
+
*/
|
|
2012
|
+
function (parameterDef) {
|
|
2013
|
+
return this.resolved.find((/**
|
|
2014
|
+
* @param {?} r
|
|
2015
|
+
* @return {?}
|
|
1980
2016
|
*/
|
|
1981
|
-
function (
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
2017
|
+
function (r) { return r.parameterDef === parameterDef; }));
|
|
2018
|
+
};
|
|
2019
|
+
/**
|
|
2020
|
+
* @template T, S
|
|
2021
|
+
* @param {?} parameterDef
|
|
2022
|
+
* @return {?}
|
|
2023
|
+
*/
|
|
2024
|
+
ParameterSnapshot.prototype.getResolvedParameterValue = /**
|
|
2025
|
+
* @template T, S
|
|
2026
|
+
* @param {?} parameterDef
|
|
2027
|
+
* @return {?}
|
|
2028
|
+
*/
|
|
2029
|
+
function (parameterDef) {
|
|
2030
|
+
/** @type {?} */
|
|
2031
|
+
var resolvedParameter = this.getResolvedParameter(parameterDef);
|
|
2032
|
+
return resolvedParameter ? resolvedParameter.value : null;
|
|
1985
2033
|
};
|
|
1986
2034
|
/**
|
|
1987
2035
|
* @return {?}
|
|
1988
2036
|
*/
|
|
1989
|
-
|
|
2037
|
+
ParameterSnapshot.prototype.getRouteId = /**
|
|
1990
2038
|
* @return {?}
|
|
1991
2039
|
*/
|
|
1992
2040
|
function () {
|
|
2041
|
+
return this.getResolvedRouteId() ? this.getResolvedRouteId().value : null;
|
|
2042
|
+
};
|
|
2043
|
+
/**
|
|
2044
|
+
* @param {?} name
|
|
2045
|
+
* @return {?}
|
|
2046
|
+
*/
|
|
2047
|
+
ParameterSnapshot.prototype.getRouteParameter = /**
|
|
2048
|
+
* @param {?} name
|
|
2049
|
+
* @return {?}
|
|
2050
|
+
*/
|
|
2051
|
+
function (name) {
|
|
1993
2052
|
/** @type {?} */
|
|
1994
|
-
var
|
|
1995
|
-
|
|
2053
|
+
var resolvedParameter = this.resolved.find((/**
|
|
2054
|
+
* @param {?} r
|
|
2055
|
+
* @return {?}
|
|
2056
|
+
*/
|
|
2057
|
+
function (r) { return r.parameterDef.name === name; }));
|
|
2058
|
+
return resolvedParameter ? resolvedParameter.value : null;
|
|
1996
2059
|
};
|
|
1997
2060
|
/**
|
|
1998
2061
|
* @private
|
|
1999
2062
|
* @return {?}
|
|
2000
2063
|
*/
|
|
2001
|
-
|
|
2064
|
+
ParameterSnapshot.prototype.getResolvedRouteId = /**
|
|
2002
2065
|
* @private
|
|
2003
2066
|
* @return {?}
|
|
2004
2067
|
*/
|
|
2005
2068
|
function () {
|
|
2006
|
-
|
|
2069
|
+
// RouteId's are never arrays: see parameter-decorators.ts createDefinition methods. It would be nice to
|
|
2070
|
+
// capture this in the type system though
|
|
2071
|
+
return (/** @type {?} */ (this.resolved.find((/**
|
|
2007
2072
|
* @param {?} p
|
|
2008
2073
|
* @return {?}
|
|
2009
2074
|
*/
|
|
2010
|
-
function (p) { return p.parameterDef.isRouteId; }));
|
|
2075
|
+
function (p) { return p.parameterDef.isRouteId; }))));
|
|
2076
|
+
};
|
|
2077
|
+
/**
|
|
2078
|
+
* @return {?}
|
|
2079
|
+
*/
|
|
2080
|
+
ParameterSnapshot.prototype.hasRouteId = /**
|
|
2081
|
+
* @return {?}
|
|
2082
|
+
*/
|
|
2083
|
+
function () {
|
|
2084
|
+
return !!this.getResolvedRouteId();
|
|
2085
|
+
};
|
|
2086
|
+
/**
|
|
2087
|
+
* @return {?}
|
|
2088
|
+
*/
|
|
2089
|
+
ParameterSnapshot.prototype.getFormattedRouteId = /**
|
|
2090
|
+
* @return {?}
|
|
2091
|
+
*/
|
|
2092
|
+
function () {
|
|
2093
|
+
/** @type {?} */
|
|
2094
|
+
var routeIdParam = this.getResolvedRouteId();
|
|
2095
|
+
return routeIdParam ? routeIdParam.formattedValue() : null;
|
|
2011
2096
|
};
|
|
2012
2097
|
/**
|
|
2013
2098
|
* @return {?}
|
|
2014
2099
|
*/
|
|
2015
|
-
|
|
2100
|
+
ParameterSnapshot.prototype.getFormattedParameters = /**
|
|
2016
2101
|
* @return {?}
|
|
2017
2102
|
*/
|
|
2018
2103
|
function () {
|
|
2019
2104
|
/** @type {?} */
|
|
2020
2105
|
var params = {};
|
|
2021
2106
|
/** @type {?} */
|
|
2022
|
-
var routeIdParam = this.
|
|
2107
|
+
var routeIdParam = this.resolved.filter((/**
|
|
2023
2108
|
* @param {?} p
|
|
2024
2109
|
* @return {?}
|
|
2025
2110
|
*/
|
|
@@ -2028,91 +2113,325 @@
|
|
|
2028
2113
|
* @return {?}
|
|
2029
2114
|
*/
|
|
2030
2115
|
function (p) {
|
|
2031
|
-
params[p.parameterDef.name] = p.
|
|
2116
|
+
params[p.parameterDef.name] = p.formattedValue();
|
|
2032
2117
|
}));
|
|
2033
2118
|
return params;
|
|
2034
2119
|
};
|
|
2035
2120
|
/**
|
|
2121
|
+
* @template T, S
|
|
2122
|
+
* @param {?} parameter
|
|
2123
|
+
* @param {?} value
|
|
2036
2124
|
* @return {?}
|
|
2037
2125
|
*/
|
|
2038
|
-
|
|
2126
|
+
ParameterSnapshot.prototype.replace = /**
|
|
2127
|
+
* @template T, S
|
|
2128
|
+
* @param {?} parameter
|
|
2129
|
+
* @param {?} value
|
|
2039
2130
|
* @return {?}
|
|
2040
2131
|
*/
|
|
2041
|
-
function () {
|
|
2042
|
-
return
|
|
2132
|
+
function (parameter, value) {
|
|
2133
|
+
return new ParameterSnapshot(this.placeDefinition, this.resolved.map((/**
|
|
2134
|
+
* @param {?} p
|
|
2135
|
+
* @return {?}
|
|
2136
|
+
*/
|
|
2137
|
+
function (p) {
|
|
2138
|
+
return p.parameterDef === parameter ? p.replace(value) : p;
|
|
2139
|
+
})));
|
|
2140
|
+
};
|
|
2141
|
+
/**
|
|
2142
|
+
* @param {?} url
|
|
2143
|
+
* @return {?}
|
|
2144
|
+
*/
|
|
2145
|
+
ParameterSnapshot.prototype.updateUrl = /**
|
|
2146
|
+
* @param {?} url
|
|
2147
|
+
* @return {?}
|
|
2148
|
+
*/
|
|
2149
|
+
function (url) {
|
|
2150
|
+
return url;
|
|
2043
2151
|
};
|
|
2152
|
+
var _a;
|
|
2044
2153
|
__decorate([
|
|
2045
|
-
|
|
2154
|
+
src.Memoize(),
|
|
2046
2155
|
__metadata("design:type", Function),
|
|
2047
|
-
__metadata("design:paramtypes", []),
|
|
2048
|
-
__metadata("design:returntype",
|
|
2049
|
-
],
|
|
2156
|
+
__metadata("design:paramtypes", [Object]),
|
|
2157
|
+
__metadata("design:returntype", ParameterSnapshot.ResolvedParameter)
|
|
2158
|
+
], ParameterSnapshot.prototype, "getResolvedParameter", null);
|
|
2050
2159
|
__decorate([
|
|
2051
|
-
|
|
2160
|
+
src.Memoize(),
|
|
2161
|
+
__metadata("design:type", Function),
|
|
2162
|
+
__metadata("design:paramtypes", [Object]),
|
|
2163
|
+
__metadata("design:returntype", typeof (_a = typeof S !== "undefined" && S) === "function" ? _a : Object)
|
|
2164
|
+
], ParameterSnapshot.prototype, "getResolvedParameterValue", null);
|
|
2165
|
+
__decorate([
|
|
2166
|
+
src.Memoize(),
|
|
2167
|
+
__metadata("design:type", Function),
|
|
2168
|
+
__metadata("design:paramtypes", [String]),
|
|
2169
|
+
__metadata("design:returntype", Object)
|
|
2170
|
+
], ParameterSnapshot.prototype, "getRouteParameter", null);
|
|
2171
|
+
__decorate([
|
|
2172
|
+
src.Memoize(),
|
|
2052
2173
|
__metadata("design:type", Function),
|
|
2053
2174
|
__metadata("design:paramtypes", []),
|
|
2054
|
-
__metadata("design:returntype",
|
|
2055
|
-
],
|
|
2056
|
-
return
|
|
2175
|
+
__metadata("design:returntype", ParameterSnapshot.ResolvedValueParameter)
|
|
2176
|
+
], ParameterSnapshot.prototype, "getResolvedRouteId", null);
|
|
2177
|
+
return ParameterSnapshot;
|
|
2057
2178
|
}());
|
|
2058
2179
|
if (false) {
|
|
2059
2180
|
/** @type {?} */
|
|
2060
|
-
|
|
2181
|
+
exports.ParameterSnapshot.prototype.placeDefinition;
|
|
2182
|
+
/**
|
|
2183
|
+
* @type {?}
|
|
2184
|
+
* @private
|
|
2185
|
+
*/
|
|
2186
|
+
exports.ParameterSnapshot.prototype.resolved;
|
|
2061
2187
|
}
|
|
2188
|
+
(function (ParameterSnapshot) {
|
|
2189
|
+
/**
|
|
2190
|
+
* @param {?} placeDef
|
|
2191
|
+
* @param {?} paramMap
|
|
2192
|
+
* @return {?}
|
|
2193
|
+
*/
|
|
2194
|
+
function create(placeDef, paramMap) {
|
|
2195
|
+
/** @type {?} */
|
|
2196
|
+
var resolvedParameters = placeDef.getRouteParameters()
|
|
2197
|
+
.map((/**
|
|
2198
|
+
* @param {?} def
|
|
2199
|
+
* @return {?}
|
|
2200
|
+
*/
|
|
2201
|
+
function (def) {
|
|
2202
|
+
if (def.isArray) {
|
|
2203
|
+
/** @type {?} */
|
|
2204
|
+
var value = paramMap.has(def.name) ? paramMap.getAll(def.name).map((/**
|
|
2205
|
+
* @param {?} raw
|
|
2206
|
+
* @return {?}
|
|
2207
|
+
*/
|
|
2208
|
+
function (raw) { return def.type.parse(raw); })) : null;
|
|
2209
|
+
return new ResolvedArrayParameter(def, value);
|
|
2210
|
+
}
|
|
2211
|
+
else {
|
|
2212
|
+
/** @type {?} */
|
|
2213
|
+
var value = paramMap.has(def.name) ? def.type.parse(paramMap.get(def.name)) : null;
|
|
2214
|
+
return new ResolvedValueParameter(def, value);
|
|
2215
|
+
}
|
|
2216
|
+
}));
|
|
2217
|
+
return new ParameterSnapshot(placeDef, resolvedParameters);
|
|
2218
|
+
}
|
|
2219
|
+
ParameterSnapshot.create = create;
|
|
2220
|
+
/**
|
|
2221
|
+
* @abstract
|
|
2222
|
+
* @template T, S
|
|
2223
|
+
*/
|
|
2224
|
+
var /**
|
|
2225
|
+
* @abstract
|
|
2226
|
+
* @template T, S
|
|
2227
|
+
*/
|
|
2228
|
+
ResolvedParameter = /** @class */ (function () {
|
|
2229
|
+
function ResolvedParameter(parameterDef, value) {
|
|
2230
|
+
this.parameterDef = parameterDef;
|
|
2231
|
+
this.value = value;
|
|
2232
|
+
}
|
|
2233
|
+
/**
|
|
2234
|
+
* @return {?}
|
|
2235
|
+
*/
|
|
2236
|
+
ResolvedParameter.prototype.isRouteId = /**
|
|
2237
|
+
* @return {?}
|
|
2238
|
+
*/
|
|
2239
|
+
function () {
|
|
2240
|
+
return this.parameterDef.isRouteId;
|
|
2241
|
+
};
|
|
2242
|
+
return ResolvedParameter;
|
|
2243
|
+
}());
|
|
2244
|
+
ParameterSnapshot.ResolvedParameter = ResolvedParameter;
|
|
2245
|
+
if (false) {
|
|
2246
|
+
/** @type {?} */
|
|
2247
|
+
ResolvedParameter.prototype.parameterDef;
|
|
2248
|
+
/** @type {?} */
|
|
2249
|
+
ResolvedParameter.prototype.value;
|
|
2250
|
+
/**
|
|
2251
|
+
* @abstract
|
|
2252
|
+
* @param {?} dest
|
|
2253
|
+
* @return {?}
|
|
2254
|
+
*/
|
|
2255
|
+
ResolvedParameter.prototype.injectRouteParam = function (dest) { };
|
|
2256
|
+
/**
|
|
2257
|
+
* @abstract
|
|
2258
|
+
* @param {?} otherValue
|
|
2259
|
+
* @return {?}
|
|
2260
|
+
*/
|
|
2261
|
+
ResolvedParameter.prototype.isSame = function (otherValue) { };
|
|
2262
|
+
/**
|
|
2263
|
+
* @abstract
|
|
2264
|
+
* @return {?}
|
|
2265
|
+
*/
|
|
2266
|
+
ResolvedParameter.prototype.formattedValue = function () { };
|
|
2267
|
+
/**
|
|
2268
|
+
* @abstract
|
|
2269
|
+
* @param {?} value
|
|
2270
|
+
* @return {?}
|
|
2271
|
+
*/
|
|
2272
|
+
ResolvedParameter.prototype.replace = function (value) { };
|
|
2273
|
+
}
|
|
2274
|
+
/**
|
|
2275
|
+
* @template T
|
|
2276
|
+
*/
|
|
2277
|
+
var ResolvedValueParameter = /** @class */ (function (_super) {
|
|
2278
|
+
__extends(ResolvedValueParameter, _super);
|
|
2279
|
+
function ResolvedValueParameter() {
|
|
2280
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2281
|
+
}
|
|
2282
|
+
/**
|
|
2283
|
+
* @param {?} otherValue
|
|
2284
|
+
* @return {?}
|
|
2285
|
+
*/
|
|
2286
|
+
ResolvedValueParameter.prototype.isSame = /**
|
|
2287
|
+
* @param {?} otherValue
|
|
2288
|
+
* @return {?}
|
|
2289
|
+
*/
|
|
2290
|
+
function (otherValue) {
|
|
2291
|
+
return this.value === otherValue;
|
|
2292
|
+
};
|
|
2293
|
+
/**
|
|
2294
|
+
* @param {?} dest
|
|
2295
|
+
* @return {?}
|
|
2296
|
+
*/
|
|
2297
|
+
ResolvedValueParameter.prototype.injectRouteParam = /**
|
|
2298
|
+
* @param {?} dest
|
|
2299
|
+
* @return {?}
|
|
2300
|
+
*/
|
|
2301
|
+
function (dest) {
|
|
2302
|
+
dest[this.parameterDef.name] = this.parameterDef.type.format(this.value);
|
|
2303
|
+
};
|
|
2304
|
+
/**
|
|
2305
|
+
* @param {?} value
|
|
2306
|
+
* @return {?}
|
|
2307
|
+
*/
|
|
2308
|
+
ResolvedValueParameter.prototype.replace = /**
|
|
2309
|
+
* @param {?} value
|
|
2310
|
+
* @return {?}
|
|
2311
|
+
*/
|
|
2312
|
+
function (value) {
|
|
2313
|
+
return new ResolvedValueParameter(this.parameterDef, value);
|
|
2314
|
+
};
|
|
2315
|
+
/**
|
|
2316
|
+
* @return {?}
|
|
2317
|
+
*/
|
|
2318
|
+
ResolvedValueParameter.prototype.formattedValue = /**
|
|
2319
|
+
* @return {?}
|
|
2320
|
+
*/
|
|
2321
|
+
function () {
|
|
2322
|
+
return !lodash.isNil(this.value) ? this.parameterDef.type.format(this.value) : null;
|
|
2323
|
+
};
|
|
2324
|
+
__decorate([
|
|
2325
|
+
pectin.Trace(),
|
|
2326
|
+
__metadata("design:type", Function),
|
|
2327
|
+
__metadata("design:paramtypes", [Object]),
|
|
2328
|
+
__metadata("design:returntype", Boolean)
|
|
2329
|
+
], ResolvedValueParameter.prototype, "isSame", null);
|
|
2330
|
+
return ResolvedValueParameter;
|
|
2331
|
+
}(ResolvedParameter));
|
|
2332
|
+
ParameterSnapshot.ResolvedValueParameter = ResolvedValueParameter;
|
|
2333
|
+
/**
|
|
2334
|
+
* @template T
|
|
2335
|
+
*/
|
|
2336
|
+
var ResolvedArrayParameter = /** @class */ (function (_super) {
|
|
2337
|
+
__extends(ResolvedArrayParameter, _super);
|
|
2338
|
+
function ResolvedArrayParameter() {
|
|
2339
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2340
|
+
}
|
|
2341
|
+
/**
|
|
2342
|
+
* @param {?} otherValue
|
|
2343
|
+
* @return {?}
|
|
2344
|
+
*/
|
|
2345
|
+
ResolvedArrayParameter.prototype.isSame = /**
|
|
2346
|
+
* @param {?} otherValue
|
|
2347
|
+
* @return {?}
|
|
2348
|
+
*/
|
|
2349
|
+
function (otherValue) {
|
|
2350
|
+
return lodash.isEqual(this.value, otherValue);
|
|
2351
|
+
};
|
|
2352
|
+
/**
|
|
2353
|
+
* @param {?} dest
|
|
2354
|
+
* @return {?}
|
|
2355
|
+
*/
|
|
2356
|
+
ResolvedArrayParameter.prototype.injectRouteParam = /**
|
|
2357
|
+
* @param {?} dest
|
|
2358
|
+
* @return {?}
|
|
2359
|
+
*/
|
|
2360
|
+
function (dest) {
|
|
2361
|
+
var _this = this;
|
|
2362
|
+
dest[this.parameterDef.name] = this.value.map((/**
|
|
2363
|
+
* @param {?} v
|
|
2364
|
+
* @return {?}
|
|
2365
|
+
*/
|
|
2366
|
+
function (v) { return _this.parameterDef.type.format(v); }));
|
|
2367
|
+
};
|
|
2368
|
+
/**
|
|
2369
|
+
* @param {?} value
|
|
2370
|
+
* @return {?}
|
|
2371
|
+
*/
|
|
2372
|
+
ResolvedArrayParameter.prototype.replace = /**
|
|
2373
|
+
* @param {?} value
|
|
2374
|
+
* @return {?}
|
|
2375
|
+
*/
|
|
2376
|
+
function (value) {
|
|
2377
|
+
return new ResolvedArrayParameter(this.parameterDef, value);
|
|
2378
|
+
};
|
|
2379
|
+
/**
|
|
2380
|
+
* @return {?}
|
|
2381
|
+
*/
|
|
2382
|
+
ResolvedArrayParameter.prototype.formattedValue = /**
|
|
2383
|
+
* @return {?}
|
|
2384
|
+
*/
|
|
2385
|
+
function () {
|
|
2386
|
+
var _this = this;
|
|
2387
|
+
return this.value ? this.value.map((/**
|
|
2388
|
+
* @param {?} v
|
|
2389
|
+
* @return {?}
|
|
2390
|
+
*/
|
|
2391
|
+
function (v) { return _this.parameterDef.type.format(v); })) : [];
|
|
2392
|
+
};
|
|
2393
|
+
__decorate([
|
|
2394
|
+
pectin.Trace(),
|
|
2395
|
+
__metadata("design:type", Function),
|
|
2396
|
+
__metadata("design:paramtypes", [Array]),
|
|
2397
|
+
__metadata("design:returntype", Boolean)
|
|
2398
|
+
], ResolvedArrayParameter.prototype, "isSame", null);
|
|
2399
|
+
return ResolvedArrayParameter;
|
|
2400
|
+
}(ResolvedParameter));
|
|
2401
|
+
ParameterSnapshot.ResolvedArrayParameter = ResolvedArrayParameter;
|
|
2402
|
+
})(exports.ParameterSnapshot || (exports.ParameterSnapshot = {}));
|
|
2062
2403
|
|
|
2063
2404
|
/**
|
|
2064
2405
|
* @fileoverview added by tsickle
|
|
2065
2406
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2066
2407
|
*/
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2408
|
+
// RAKE: making this Symbol(...) broke things.
|
|
2409
|
+
/** @type {?} */
|
|
2410
|
+
var DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
2411
|
+
// this one seems ok.
|
|
2412
|
+
/** @type {?} */
|
|
2413
|
+
var ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
2414
|
+
exports.PlaceComponent = /** @class */ (function (_super) {
|
|
2415
|
+
__extends(PlaceComponent, _super);
|
|
2416
|
+
function PlaceComponent(activatedRoute, placeService) {
|
|
2070
2417
|
var _this = _super.call(this) || this;
|
|
2071
|
-
_this.
|
|
2418
|
+
_this.activatedRoute = activatedRoute;
|
|
2072
2419
|
_this._incomingRouteChange = new pectin.MutableValueModel(false);
|
|
2073
2420
|
_this.resolvedParameters = new pectin.MutableValueModel();
|
|
2074
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe;
|
|
2075
|
-
_this.
|
|
2076
|
-
|
|
2077
|
-
/** @type {?} */
|
|
2078
|
-
var routeParameterDefs = typescriptUtilities.Klass.get(component).getMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY);
|
|
2079
|
-
routeParameterDefs.forEach((/**
|
|
2080
|
-
* @param {?} parameter
|
|
2421
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2422
|
+
_this.placeDefinition.getRouteParameters().forEach((/**
|
|
2423
|
+
* @param {?} p
|
|
2081
2424
|
* @return {?}
|
|
2082
2425
|
*/
|
|
2083
|
-
function (
|
|
2084
|
-
|
|
2085
|
-
var incomingResolvedRouteParameters = observe.valuesFrom(component.activatedRoute.paramMap)
|
|
2426
|
+
function (p) { return _this.installBinding(p); }));
|
|
2427
|
+
observe.valuesFrom(activatedRoute.paramMap)
|
|
2086
2428
|
.last()
|
|
2087
2429
|
.map((/**
|
|
2088
2430
|
* @param {?} params
|
|
2089
2431
|
* @return {?}
|
|
2090
2432
|
*/
|
|
2091
|
-
function (params) {
|
|
2092
|
-
/**
|
|
2093
|
-
var result = [];
|
|
2094
|
-
routeParameterDefs.forEach((/**
|
|
2095
|
-
* @param {?} parameterDef
|
|
2096
|
-
* @return {?}
|
|
2097
|
-
*/
|
|
2098
|
-
function (parameterDef) {
|
|
2099
|
-
/** @type {?} */
|
|
2100
|
-
var resolvedValue;
|
|
2101
|
-
if (parameterDef.isArray) {
|
|
2102
|
-
resolvedValue = params.getAll(parameterDef.name).map((/**
|
|
2103
|
-
* @param {?} v
|
|
2104
|
-
* @return {?}
|
|
2105
|
-
*/
|
|
2106
|
-
function (v) { return parameterDef.type.parse(v); }));
|
|
2107
|
-
}
|
|
2108
|
-
else {
|
|
2109
|
-
resolvedValue = parameterDef.type.parse(params.get(parameterDef.name));
|
|
2110
|
-
}
|
|
2111
|
-
result.push({ parameterDef: parameterDef, resolvedValue: resolvedValue });
|
|
2112
|
-
}));
|
|
2113
|
-
return new ResolvedRouteParameterSnapshot(result);
|
|
2114
|
-
}));
|
|
2115
|
-
incomingResolvedRouteParameters.subscribe((/**
|
|
2433
|
+
function (params) { return exports.ParameterSnapshot.create(_this.placeDefinition, params); }))
|
|
2434
|
+
.subscribe((/**
|
|
2116
2435
|
* @param {?} resolvedParameters
|
|
2117
2436
|
* @return {?}
|
|
2118
2437
|
*/
|
|
@@ -2128,17 +2447,15 @@
|
|
|
2128
2447
|
*/
|
|
2129
2448
|
function (params, previous) {
|
|
2130
2449
|
placeService.notifyRouteParametersChanged({
|
|
2131
|
-
|
|
2450
|
+
activatedRoute: _this.activatedRoute,
|
|
2132
2451
|
next: params,
|
|
2133
2452
|
previous: previous,
|
|
2134
2453
|
updateRoute: !_this.incomingRouteChange.value // we update the route if it's a component triggered change.
|
|
2135
2454
|
});
|
|
2136
2455
|
}));
|
|
2137
|
-
_this.txo.observe('incomingResolvedRouteParameters', incomingResolvedRouteParameters);
|
|
2138
|
-
_this.txo.observe('this.routeIsChanging', _this.incomingRouteChange);
|
|
2139
2456
|
return _this;
|
|
2140
2457
|
}
|
|
2141
|
-
Object.defineProperty(
|
|
2458
|
+
Object.defineProperty(PlaceComponent.prototype, "incomingRouteChange", {
|
|
2142
2459
|
get: /**
|
|
2143
2460
|
* @return {?}
|
|
2144
2461
|
*/
|
|
@@ -2149,28 +2466,28 @@
|
|
|
2149
2466
|
configurable: true
|
|
2150
2467
|
});
|
|
2151
2468
|
/**
|
|
2152
|
-
* @
|
|
2153
|
-
* @template T
|
|
2154
|
-
* @param {?}
|
|
2469
|
+
* @private
|
|
2470
|
+
* @template T, S
|
|
2471
|
+
* @param {?} parameterDef
|
|
2155
2472
|
* @return {?}
|
|
2156
2473
|
*/
|
|
2157
|
-
|
|
2158
|
-
* @
|
|
2159
|
-
* @template T
|
|
2160
|
-
* @param {?}
|
|
2474
|
+
PlaceComponent.prototype.installBinding = /**
|
|
2475
|
+
* @private
|
|
2476
|
+
* @template T, S
|
|
2477
|
+
* @param {?} parameterDef
|
|
2161
2478
|
* @return {?}
|
|
2162
2479
|
*/
|
|
2163
|
-
function (
|
|
2480
|
+
function (parameterDef) {
|
|
2164
2481
|
/** @type {?} */
|
|
2165
|
-
var model = this.
|
|
2166
|
-
// this.txo.observe(
|
|
2482
|
+
var model = (/** @type {?} */ (this[parameterDef.propertyName]));
|
|
2483
|
+
// this.txo.observe(parameterDef.propertyName, model);
|
|
2167
2484
|
this.registerDisposable(new pectin.Binding(this.resolvedParameters, model, {
|
|
2168
2485
|
toRight: /**
|
|
2169
2486
|
* @param {?} parameters
|
|
2170
2487
|
* @return {?}
|
|
2171
2488
|
*/
|
|
2172
2489
|
function (parameters) {
|
|
2173
|
-
return parameters.
|
|
2490
|
+
return parameters.getResolvedParameterValue(parameterDef);
|
|
2174
2491
|
},
|
|
2175
2492
|
toLeft: /**
|
|
2176
2493
|
* @param {?} value
|
|
@@ -2178,66 +2495,11 @@
|
|
|
2178
2495
|
* @return {?}
|
|
2179
2496
|
*/
|
|
2180
2497
|
function (value, currentParameters) {
|
|
2181
|
-
return currentParameters.replace(
|
|
2498
|
+
return currentParameters.replace(parameterDef, value);
|
|
2182
2499
|
}
|
|
2183
2500
|
}));
|
|
2184
2501
|
};
|
|
2185
|
-
|
|
2186
|
-
* @private
|
|
2187
|
-
* @template T
|
|
2188
|
-
* @param {?} parameter
|
|
2189
|
-
* @return {?}
|
|
2190
|
-
*/
|
|
2191
|
-
RouteParameterBindings.prototype.getModelFor = /**
|
|
2192
|
-
* @private
|
|
2193
|
-
* @template T
|
|
2194
|
-
* @param {?} parameter
|
|
2195
|
-
* @return {?}
|
|
2196
|
-
*/
|
|
2197
|
-
function (parameter) {
|
|
2198
|
-
return this.component[parameter.propertyName];
|
|
2199
|
-
};
|
|
2200
|
-
return RouteParameterBindings;
|
|
2201
|
-
}(pectin.GarbageCollector));
|
|
2202
|
-
if (false) {
|
|
2203
|
-
/** @type {?} */
|
|
2204
|
-
exports.RouteParameterBindings.prototype._incomingRouteChange;
|
|
2205
|
-
/**
|
|
2206
|
-
* @type {?}
|
|
2207
|
-
* @private
|
|
2208
|
-
*/
|
|
2209
|
-
exports.RouteParameterBindings.prototype.txo;
|
|
2210
|
-
/**
|
|
2211
|
-
* @type {?}
|
|
2212
|
-
* @private
|
|
2213
|
-
*/
|
|
2214
|
-
exports.RouteParameterBindings.prototype.resolvedParameters;
|
|
2215
|
-
/**
|
|
2216
|
-
* @type {?}
|
|
2217
|
-
* @private
|
|
2218
|
-
*/
|
|
2219
|
-
exports.RouteParameterBindings.prototype.component;
|
|
2220
|
-
}
|
|
2221
|
-
(function (RouteParameterBindings) {
|
|
2222
|
-
RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
|
|
2223
|
-
})(exports.RouteParameterBindings || (exports.RouteParameterBindings = {}));
|
|
2224
|
-
|
|
2225
|
-
/**
|
|
2226
|
-
* @fileoverview added by tsickle
|
|
2227
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2228
|
-
*/
|
|
2229
|
-
// RAKE: making this Symbol(...) broke things.
|
|
2230
|
-
/** @type {?} */
|
|
2231
|
-
var DEFINITION_META_DATA_KEY = 'PLACE_DEFINITION_OPTIONS';
|
|
2232
|
-
exports.PlaceComponent = /** @class */ (function (_super) {
|
|
2233
|
-
__extends(PlaceComponent, _super);
|
|
2234
|
-
function PlaceComponent(activatedRoute, placeService) {
|
|
2235
|
-
var _this = _super.call(this) || this;
|
|
2236
|
-
_this.activatedRoute = activatedRoute;
|
|
2237
|
-
_this.routeBindingMediator = _this.registerDisposable(new exports.RouteParameterBindings(_this, placeService));
|
|
2238
|
-
return _this;
|
|
2239
|
-
}
|
|
2240
|
-
Object.defineProperty(PlaceComponent.prototype, "placeConfig", {
|
|
2502
|
+
Object.defineProperty(PlaceComponent.prototype, "placeDefinition", {
|
|
2241
2503
|
get: /**
|
|
2242
2504
|
* @return {?}
|
|
2243
2505
|
*/
|
|
@@ -2256,10 +2518,14 @@
|
|
|
2256
2518
|
function () {
|
|
2257
2519
|
return true;
|
|
2258
2520
|
};
|
|
2521
|
+
// @Trace()
|
|
2522
|
+
// @Trace()
|
|
2259
2523
|
/**
|
|
2260
2524
|
* @return {?}
|
|
2261
2525
|
*/
|
|
2262
|
-
PlaceComponent.prototype.onPlaceReady =
|
|
2526
|
+
PlaceComponent.prototype.onPlaceReady =
|
|
2527
|
+
// @Trace()
|
|
2528
|
+
/**
|
|
2263
2529
|
* @return {?}
|
|
2264
2530
|
*/
|
|
2265
2531
|
function () {
|
|
@@ -2268,21 +2534,17 @@
|
|
|
2268
2534
|
fastMemoizeDecorator.Memoize(),
|
|
2269
2535
|
__metadata("design:type", PlaceComponent.Definition),
|
|
2270
2536
|
__metadata("design:paramtypes", [])
|
|
2271
|
-
], PlaceComponent.prototype, "
|
|
2272
|
-
__decorate([
|
|
2273
|
-
pectin.Trace(),
|
|
2274
|
-
__metadata("design:type", Function),
|
|
2275
|
-
__metadata("design:paramtypes", []),
|
|
2276
|
-
__metadata("design:returntype", void 0)
|
|
2277
|
-
], PlaceComponent.prototype, "onPlaceReady", null);
|
|
2537
|
+
], PlaceComponent.prototype, "placeDefinition", null);
|
|
2278
2538
|
return PlaceComponent;
|
|
2279
2539
|
}(DisposableComponent));
|
|
2280
2540
|
if (false) {
|
|
2541
|
+
/** @type {?} */
|
|
2542
|
+
exports.PlaceComponent.prototype._incomingRouteChange;
|
|
2281
2543
|
/**
|
|
2282
2544
|
* @type {?}
|
|
2283
2545
|
* @private
|
|
2284
2546
|
*/
|
|
2285
|
-
exports.PlaceComponent.prototype.
|
|
2547
|
+
exports.PlaceComponent.prototype.resolvedParameters;
|
|
2286
2548
|
/** @type {?} */
|
|
2287
2549
|
exports.PlaceComponent.prototype.activatedRoute;
|
|
2288
2550
|
}
|
|
@@ -2295,17 +2557,31 @@
|
|
|
2295
2557
|
this.order = options.order;
|
|
2296
2558
|
this.data = options.data;
|
|
2297
2559
|
this.authenticate = lodash.isNil(options.authenticate) || options.authenticate;
|
|
2560
|
+
this.children = (options.children || []).map((/**
|
|
2561
|
+
* @param {?} c
|
|
2562
|
+
* @return {?}
|
|
2563
|
+
*/
|
|
2564
|
+
function (c) { return PlaceComponent.getDefinition(c).component; }));
|
|
2298
2565
|
}
|
|
2299
2566
|
/**
|
|
2300
|
-
* @
|
|
2567
|
+
* @return {?}
|
|
2568
|
+
*/
|
|
2569
|
+
Definition.prototype.getRouteParameters = /**
|
|
2570
|
+
* @return {?}
|
|
2571
|
+
*/
|
|
2572
|
+
function () {
|
|
2573
|
+
return typescriptUtilities.Klass.get(this.component).getMetadataList(ROUTE_PARAMETER_LIST_KEY);
|
|
2574
|
+
};
|
|
2575
|
+
/**
|
|
2576
|
+
* @param {?} constructable
|
|
2301
2577
|
* @return {?}
|
|
2302
2578
|
*/
|
|
2303
2579
|
Definition.prototype.isDescriptorForType = /**
|
|
2304
|
-
* @param {?}
|
|
2580
|
+
* @param {?} constructable
|
|
2305
2581
|
* @return {?}
|
|
2306
2582
|
*/
|
|
2307
|
-
function (
|
|
2308
|
-
return pectin.lang.constructorChain(
|
|
2583
|
+
function (constructable) {
|
|
2584
|
+
return pectin.lang.constructorChain(constructable).includes(PlaceComponent);
|
|
2309
2585
|
};
|
|
2310
2586
|
/**
|
|
2311
2587
|
* @param {?} placeComponent
|
|
@@ -2362,6 +2638,12 @@
|
|
|
2362
2638
|
return defaultValue;
|
|
2363
2639
|
}
|
|
2364
2640
|
};
|
|
2641
|
+
__decorate([
|
|
2642
|
+
fastMemoizeDecorator.Memoize(),
|
|
2643
|
+
__metadata("design:type", Function),
|
|
2644
|
+
__metadata("design:paramtypes", []),
|
|
2645
|
+
__metadata("design:returntype", Array)
|
|
2646
|
+
], Definition.prototype, "getRouteParameters", null);
|
|
2365
2647
|
return Definition;
|
|
2366
2648
|
}());
|
|
2367
2649
|
PlaceComponent.Definition = Definition;
|
|
@@ -2375,6 +2657,8 @@
|
|
|
2375
2657
|
/** @type {?} */
|
|
2376
2658
|
Definition.prototype.data;
|
|
2377
2659
|
/** @type {?} */
|
|
2660
|
+
Definition.prototype.children;
|
|
2661
|
+
/** @type {?} */
|
|
2378
2662
|
Definition.prototype.component;
|
|
2379
2663
|
}
|
|
2380
2664
|
/**
|
|
@@ -2391,15 +2675,24 @@
|
|
|
2391
2675
|
Options.prototype.data;
|
|
2392
2676
|
/** @type {?|undefined} */
|
|
2393
2677
|
Options.prototype.authenticate;
|
|
2678
|
+
/** @type {?|undefined} */
|
|
2679
|
+
Options.prototype.children;
|
|
2680
|
+
}
|
|
2681
|
+
/**
|
|
2682
|
+
* @record
|
|
2683
|
+
*/
|
|
2684
|
+
function ChildOptions() { }
|
|
2685
|
+
PlaceComponent.ChildOptions = ChildOptions;
|
|
2686
|
+
if (false) {
|
|
2687
|
+
/** @type {?} */
|
|
2688
|
+
ChildOptions.prototype.parent;
|
|
2394
2689
|
}
|
|
2395
2690
|
/**
|
|
2396
2691
|
* @param {?} klass
|
|
2397
2692
|
* @return {?}
|
|
2398
2693
|
*/
|
|
2399
2694
|
function getDefinition(klass) {
|
|
2400
|
-
|
|
2401
|
-
var placeOptions = Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
2402
|
-
return new Definition(klass, placeOptions);
|
|
2695
|
+
return Reflect.getMetadata(DEFINITION_META_DATA_KEY, klass);
|
|
2403
2696
|
}
|
|
2404
2697
|
PlaceComponent.getDefinition = getDefinition;
|
|
2405
2698
|
/**
|
|
@@ -2408,20 +2701,157 @@
|
|
|
2408
2701
|
* @return {?}
|
|
2409
2702
|
*/
|
|
2410
2703
|
function injectDefinition(klass, options) {
|
|
2411
|
-
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, options, klass);
|
|
2704
|
+
Reflect.defineMetadata(DEFINITION_META_DATA_KEY, new Definition(klass, options), klass);
|
|
2412
2705
|
}
|
|
2413
2706
|
PlaceComponent.injectDefinition = injectDefinition;
|
|
2414
2707
|
})(exports.PlaceComponent || (exports.PlaceComponent = {}));
|
|
2415
2708
|
|
|
2709
|
+
/**
|
|
2710
|
+
* @fileoverview added by tsickle
|
|
2711
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2712
|
+
*/
|
|
2713
|
+
var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
2714
|
+
__extends(AbstractPlaceNavigationComponent, _super);
|
|
2715
|
+
function AbstractPlaceNavigationComponent() {
|
|
2716
|
+
var _this = _super.call(this) || this;
|
|
2717
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2718
|
+
_this.placeDefinitions = chain(_this.placesModel).map((/**
|
|
2719
|
+
* @param {?} c
|
|
2720
|
+
* @return {?}
|
|
2721
|
+
*/
|
|
2722
|
+
function (c) { return exports.PlaceComponent.getDefinition(c); }));
|
|
2723
|
+
return _this;
|
|
2724
|
+
}
|
|
2725
|
+
/**
|
|
2726
|
+
* @param {?} placeDef
|
|
2727
|
+
* @return {?}
|
|
2728
|
+
*/
|
|
2729
|
+
AbstractPlaceNavigationComponent.prototype.getNav = /**
|
|
2730
|
+
* @param {?} placeDef
|
|
2731
|
+
* @return {?}
|
|
2732
|
+
*/
|
|
2733
|
+
function (placeDef) {
|
|
2734
|
+
/** @type {?} */
|
|
2735
|
+
var navItem = (/** @type {?} */ (placeDef.getData('nav')));
|
|
2736
|
+
return {
|
|
2737
|
+
title: (/**
|
|
2738
|
+
* @return {?}
|
|
2739
|
+
*/
|
|
2740
|
+
function () { return navItem ? navItem.title() : placeDef.searchData(['navTitle', 'title']); }),
|
|
2741
|
+
tooltip: (/**
|
|
2742
|
+
* @return {?}
|
|
2743
|
+
*/
|
|
2744
|
+
function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getData('navTooltip', null); }),
|
|
2745
|
+
icon: (/**
|
|
2746
|
+
* @return {?}
|
|
2747
|
+
*/
|
|
2748
|
+
function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getData('navIcon', null); })
|
|
2749
|
+
};
|
|
2750
|
+
};
|
|
2751
|
+
/**
|
|
2752
|
+
* @return {?}
|
|
2753
|
+
*/
|
|
2754
|
+
AbstractPlaceNavigationComponent.prototype.ngOnInit = /**
|
|
2755
|
+
* @return {?}
|
|
2756
|
+
*/
|
|
2757
|
+
function () {
|
|
2758
|
+
};
|
|
2759
|
+
AbstractPlaceNavigationComponent.propDecorators = {
|
|
2760
|
+
places: [{ type: core.Input }],
|
|
2761
|
+
placesModel: [{ type: core.Input }]
|
|
2762
|
+
};
|
|
2763
|
+
__decorate([
|
|
2764
|
+
pectin.StoreInListModel('placesModel'),
|
|
2765
|
+
__metadata("design:type", Array)
|
|
2766
|
+
], AbstractPlaceNavigationComponent.prototype, "places", void 0);
|
|
2767
|
+
__decorate([
|
|
2768
|
+
pectin.UseDelegate(),
|
|
2769
|
+
__metadata("design:type", pectin.ListModel)
|
|
2770
|
+
], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
2771
|
+
__decorate([
|
|
2772
|
+
src.Memoize(),
|
|
2773
|
+
__metadata("design:type", Function),
|
|
2774
|
+
__metadata("design:paramtypes", [exports.PlaceComponent.Definition]),
|
|
2775
|
+
__metadata("design:returntype", Object)
|
|
2776
|
+
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
2777
|
+
return AbstractPlaceNavigationComponent;
|
|
2778
|
+
}(DisposableComponent));
|
|
2779
|
+
if (false) {
|
|
2780
|
+
/** @type {?} */
|
|
2781
|
+
AbstractPlaceNavigationComponent.prototype.places;
|
|
2782
|
+
/** @type {?} */
|
|
2783
|
+
AbstractPlaceNavigationComponent.prototype.placesModel;
|
|
2784
|
+
/** @type {?} */
|
|
2785
|
+
AbstractPlaceNavigationComponent.prototype.placeDefinitions;
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2788
|
+
/**
|
|
2789
|
+
* @fileoverview added by tsickle
|
|
2790
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2791
|
+
*/
|
|
2792
|
+
var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
2793
|
+
__extends(ListPlaceNavComponent, _super);
|
|
2794
|
+
function ListPlaceNavComponent() {
|
|
2795
|
+
var _this = _super.call(this) || this;
|
|
2796
|
+
_this.expanded = true;
|
|
2797
|
+
return _this;
|
|
2798
|
+
}
|
|
2799
|
+
/**
|
|
2800
|
+
* @return {?}
|
|
2801
|
+
*/
|
|
2802
|
+
ListPlaceNavComponent.prototype.expandMenu = /**
|
|
2803
|
+
* @return {?}
|
|
2804
|
+
*/
|
|
2805
|
+
function () {
|
|
2806
|
+
this.expanded = true;
|
|
2807
|
+
};
|
|
2808
|
+
/**
|
|
2809
|
+
* @return {?}
|
|
2810
|
+
*/
|
|
2811
|
+
ListPlaceNavComponent.prototype.collapseMenu = /**
|
|
2812
|
+
* @return {?}
|
|
2813
|
+
*/
|
|
2814
|
+
function () {
|
|
2815
|
+
this.expanded = false;
|
|
2816
|
+
};
|
|
2817
|
+
/**
|
|
2818
|
+
* @return {?}
|
|
2819
|
+
*/
|
|
2820
|
+
ListPlaceNavComponent.prototype.toggleMenu = /**
|
|
2821
|
+
* @return {?}
|
|
2822
|
+
*/
|
|
2823
|
+
function () {
|
|
2824
|
+
this.expanded = !this.expanded;
|
|
2825
|
+
};
|
|
2826
|
+
ListPlaceNavComponent.decorators = [
|
|
2827
|
+
{ type: core.Component, args: [{
|
|
2828
|
+
selector: 'angular-ui-powerups-list-place-nav',
|
|
2829
|
+
template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n",
|
|
2830
|
+
styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
|
|
2831
|
+
}] }
|
|
2832
|
+
];
|
|
2833
|
+
/** @nocollapse */
|
|
2834
|
+
ListPlaceNavComponent.ctorParameters = function () { return []; };
|
|
2835
|
+
ListPlaceNavComponent.propDecorators = {
|
|
2836
|
+
expanded: [{ type: core.HostBinding, args: ['class.expanded',] }]
|
|
2837
|
+
};
|
|
2838
|
+
return ListPlaceNavComponent;
|
|
2839
|
+
}(AbstractPlaceNavigationComponent));
|
|
2840
|
+
if (false) {
|
|
2841
|
+
/** @type {?} */
|
|
2842
|
+
ListPlaceNavComponent.prototype.expanded;
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2416
2845
|
/**
|
|
2417
2846
|
* @fileoverview added by tsickle
|
|
2418
2847
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2419
2848
|
*/
|
|
2420
2849
|
var PlaceService = /** @class */ (function (_super) {
|
|
2421
2850
|
__extends(PlaceService, _super);
|
|
2422
|
-
function PlaceService(router) {
|
|
2851
|
+
function PlaceService(router, injector) {
|
|
2423
2852
|
var _this = _super.call(this) || this;
|
|
2424
2853
|
_this.router = router;
|
|
2854
|
+
_this.injector = injector;
|
|
2425
2855
|
_this._activePlaces = new pectin.MutableListModel();
|
|
2426
2856
|
return _this;
|
|
2427
2857
|
}
|
|
@@ -2435,33 +2865,45 @@
|
|
|
2435
2865
|
enumerable: true,
|
|
2436
2866
|
configurable: true
|
|
2437
2867
|
});
|
|
2868
|
+
// @Trace()
|
|
2869
|
+
// @Trace()
|
|
2438
2870
|
/**
|
|
2439
2871
|
* @param {?} place
|
|
2440
2872
|
* @return {?}
|
|
2441
2873
|
*/
|
|
2442
|
-
PlaceService.prototype.onActivate =
|
|
2874
|
+
PlaceService.prototype.onActivate =
|
|
2875
|
+
// @Trace()
|
|
2876
|
+
/**
|
|
2443
2877
|
* @param {?} place
|
|
2444
2878
|
* @return {?}
|
|
2445
2879
|
*/
|
|
2446
2880
|
function (place) {
|
|
2447
2881
|
this._activePlaces.push(place);
|
|
2448
2882
|
};
|
|
2883
|
+
// @Trace()
|
|
2884
|
+
// @Trace()
|
|
2449
2885
|
/**
|
|
2450
2886
|
* @param {?} place
|
|
2451
2887
|
* @return {?}
|
|
2452
2888
|
*/
|
|
2453
|
-
PlaceService.prototype.onDeactivate =
|
|
2889
|
+
PlaceService.prototype.onDeactivate =
|
|
2890
|
+
// @Trace()
|
|
2891
|
+
/**
|
|
2454
2892
|
* @param {?} place
|
|
2455
2893
|
* @return {?}
|
|
2456
2894
|
*/
|
|
2457
2895
|
function (place) {
|
|
2458
2896
|
this._activePlaces.remove(place);
|
|
2459
2897
|
};
|
|
2898
|
+
// @Trace()
|
|
2899
|
+
// @Trace()
|
|
2460
2900
|
/**
|
|
2461
2901
|
* @param {?} params
|
|
2462
2902
|
* @return {?}
|
|
2463
2903
|
*/
|
|
2464
|
-
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2904
|
+
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2905
|
+
// @Trace()
|
|
2906
|
+
/**
|
|
2465
2907
|
* @param {?} params
|
|
2466
2908
|
* @return {?}
|
|
2467
2909
|
*/
|
|
@@ -2475,10 +2917,29 @@
|
|
|
2475
2917
|
/** @type {?} */
|
|
2476
2918
|
var path = routeId ? [relativePath, routeId, params.next.getFormattedParameters()] : [relativePath, params.next.getFormattedParameters()];
|
|
2477
2919
|
this.router.navigate(path, {
|
|
2478
|
-
relativeTo: params.
|
|
2920
|
+
relativeTo: params.activatedRoute
|
|
2479
2921
|
});
|
|
2480
2922
|
}
|
|
2481
2923
|
};
|
|
2924
|
+
// @Trace()
|
|
2925
|
+
// @Trace()
|
|
2926
|
+
/**
|
|
2927
|
+
* @param {?} snapshot
|
|
2928
|
+
* @return {?}
|
|
2929
|
+
*/
|
|
2930
|
+
PlaceService.prototype.sanitise =
|
|
2931
|
+
// @Trace()
|
|
2932
|
+
/**
|
|
2933
|
+
* @param {?} snapshot
|
|
2934
|
+
* @return {?}
|
|
2935
|
+
*/
|
|
2936
|
+
function (snapshot) {
|
|
2937
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2938
|
+
return __generator(this, function (_a) {
|
|
2939
|
+
return [2 /*return*/, snapshot];
|
|
2940
|
+
});
|
|
2941
|
+
});
|
|
2942
|
+
};
|
|
2482
2943
|
PlaceService.decorators = [
|
|
2483
2944
|
{ type: core.Injectable, args: [{
|
|
2484
2945
|
providedIn: 'root'
|
|
@@ -2486,27 +2947,10 @@
|
|
|
2486
2947
|
];
|
|
2487
2948
|
/** @nocollapse */
|
|
2488
2949
|
PlaceService.ctorParameters = function () { return [
|
|
2489
|
-
{ type: router.Router }
|
|
2950
|
+
{ type: router.Router },
|
|
2951
|
+
{ type: core.Injector }
|
|
2490
2952
|
]; };
|
|
2491
|
-
/** @nocollapse */ PlaceService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(core.ɵɵinject(router.Router)); }, token: PlaceService, providedIn: "root" });
|
|
2492
|
-
__decorate([
|
|
2493
|
-
pectin.Trace(),
|
|
2494
|
-
__metadata("design:type", Function),
|
|
2495
|
-
__metadata("design:paramtypes", [exports.PlaceComponent]),
|
|
2496
|
-
__metadata("design:returntype", void 0)
|
|
2497
|
-
], PlaceService.prototype, "onActivate", null);
|
|
2498
|
-
__decorate([
|
|
2499
|
-
pectin.Trace(),
|
|
2500
|
-
__metadata("design:type", Function),
|
|
2501
|
-
__metadata("design:paramtypes", [exports.PlaceComponent]),
|
|
2502
|
-
__metadata("design:returntype", void 0)
|
|
2503
|
-
], PlaceService.prototype, "onDeactivate", null);
|
|
2504
|
-
__decorate([
|
|
2505
|
-
pectin.Trace(),
|
|
2506
|
-
__metadata("design:type", Function),
|
|
2507
|
-
__metadata("design:paramtypes", [Object]),
|
|
2508
|
-
__metadata("design:returntype", void 0)
|
|
2509
|
-
], PlaceService.prototype, "notifyRouteParametersChanged", null);
|
|
2953
|
+
/** @nocollapse */ PlaceService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(core.ɵɵinject(router.Router), core.ɵɵinject(core.INJECTOR)); }, token: PlaceService, providedIn: "root" });
|
|
2510
2954
|
return PlaceService;
|
|
2511
2955
|
}(pectin.GarbageCollector));
|
|
2512
2956
|
if (false) {
|
|
@@ -2520,6 +2964,11 @@
|
|
|
2520
2964
|
* @protected
|
|
2521
2965
|
*/
|
|
2522
2966
|
PlaceService.prototype.router;
|
|
2967
|
+
/**
|
|
2968
|
+
* @type {?}
|
|
2969
|
+
* @protected
|
|
2970
|
+
*/
|
|
2971
|
+
PlaceService.prototype.injector;
|
|
2523
2972
|
}
|
|
2524
2973
|
|
|
2525
2974
|
/**
|
|
@@ -2562,20 +3011,66 @@
|
|
|
2562
3011
|
})
|
|
2563
3012
|
])
|
|
2564
3013
|
];
|
|
3014
|
+
/**
|
|
3015
|
+
* @param {?} duration
|
|
3016
|
+
* @return {?}
|
|
3017
|
+
*/
|
|
3018
|
+
function leftRightPlaceAnimation(duration) {
|
|
3019
|
+
return animations$1.trigger('routeAnimations', [
|
|
3020
|
+
animations$1.transition(':increment', right, { params: { duration: duration } }),
|
|
3021
|
+
animations$1.transition(':decrement', left, { params: { duration: duration } })
|
|
3022
|
+
]);
|
|
3023
|
+
}
|
|
2565
3024
|
/** @type {?} */
|
|
2566
|
-
var LEFT_RIGHT_PLACE_ANIMATION =
|
|
2567
|
-
animations$1.transition(':increment', right, { params: { duration: '.3s' } }),
|
|
2568
|
-
animations$1.transition(':decrement', left, { params: { duration: '.3s' } })
|
|
2569
|
-
]);
|
|
3025
|
+
var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation("0.3s");
|
|
2570
3026
|
|
|
2571
3027
|
/**
|
|
2572
3028
|
* @fileoverview added by tsickle
|
|
2573
3029
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2574
3030
|
*/
|
|
2575
|
-
var PlaceOutletComponent = /** @class */ (function () {
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
3031
|
+
var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
3032
|
+
__extends(PlaceOutletComponent, _super);
|
|
3033
|
+
function PlaceOutletComponent(placeService, activatedRoute) {
|
|
3034
|
+
var _this = _super.call(this) || this;
|
|
3035
|
+
_this.placeService = placeService;
|
|
3036
|
+
_this.activatedRoute = activatedRoute;
|
|
3037
|
+
_this.animate = true;
|
|
3038
|
+
_this.outletUrlSegment = new pectin.MutableListModel();
|
|
3039
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
3040
|
+
_this.myPath = observe.listsFrom(activatedRoute.url).last().map((/**
|
|
3041
|
+
* @param {?} s
|
|
3042
|
+
* @return {?}
|
|
3043
|
+
*/
|
|
3044
|
+
function (s) { return s.toString(); })).reduce((/**
|
|
3045
|
+
* @param {?} bits
|
|
3046
|
+
* @return {?}
|
|
3047
|
+
*/
|
|
3048
|
+
function (bits) { return bits.join(','); }));
|
|
3049
|
+
console.log("new outlet@(" + _this.myPath.value + ")");
|
|
3050
|
+
_this.outletChildPath = chain(_this.outletUrlSegment).map((/**
|
|
3051
|
+
* @param {?} s
|
|
3052
|
+
* @return {?}
|
|
3053
|
+
*/
|
|
3054
|
+
function (s) { return s.toString(); })).reduce((/**
|
|
3055
|
+
* @param {?} bits
|
|
3056
|
+
* @return {?}
|
|
3057
|
+
*/
|
|
3058
|
+
function (bits) { return bits.join(","); }));
|
|
3059
|
+
_this.state = chain(_this.myPath).map((/**
|
|
3060
|
+
* @param {?} path
|
|
3061
|
+
* @return {?}
|
|
3062
|
+
*/
|
|
3063
|
+
function (path) {
|
|
3064
|
+
return "outlet@(" + path + "), child path->" + _this.outletChildPath.value;
|
|
3065
|
+
}), { dependsOn: _this.outletChildPath });
|
|
3066
|
+
when.valueOf(_this.state).changes((/**
|
|
3067
|
+
* @param {?} debug
|
|
3068
|
+
* @return {?}
|
|
3069
|
+
*/
|
|
3070
|
+
function (debug) {
|
|
3071
|
+
console.log("Outlet Changed -> " + debug);
|
|
3072
|
+
}));
|
|
3073
|
+
return _this;
|
|
2579
3074
|
}
|
|
2580
3075
|
/**
|
|
2581
3076
|
* @return {?}
|
|
@@ -2585,26 +3080,71 @@
|
|
|
2585
3080
|
*/
|
|
2586
3081
|
function () {
|
|
2587
3082
|
};
|
|
3083
|
+
/**
|
|
3084
|
+
* @return {?}
|
|
3085
|
+
*/
|
|
3086
|
+
PlaceOutletComponent.prototype.ngAfterViewInit = /**
|
|
3087
|
+
* @return {?}
|
|
3088
|
+
*/
|
|
3089
|
+
function () {
|
|
3090
|
+
// this.routerOutLetQuery.changes.subscribe(() => {
|
|
3091
|
+
// this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
3092
|
+
// });
|
|
3093
|
+
};
|
|
3094
|
+
/**
|
|
3095
|
+
* @return {?}
|
|
3096
|
+
*/
|
|
3097
|
+
PlaceOutletComponent.prototype.ngAfterViewChecked = /**
|
|
3098
|
+
* @return {?}
|
|
3099
|
+
*/
|
|
3100
|
+
function () {
|
|
3101
|
+
// console.log(`@AfterViewChecked: ${this.state.value}`);
|
|
3102
|
+
this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
3103
|
+
};
|
|
3104
|
+
// @Trace()
|
|
3105
|
+
// ngOnDestroy(): void {
|
|
3106
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3107
|
+
// console.log('mySegments', this.myPath.value);
|
|
3108
|
+
// super.ngOnDestroy();
|
|
3109
|
+
// }
|
|
3110
|
+
// @Trace()
|
|
3111
|
+
// @Trace()
|
|
3112
|
+
// ngOnDestroy(): void {
|
|
3113
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3114
|
+
// console.log('mySegments', this.myPath.value);
|
|
3115
|
+
// super.ngOnDestroy();
|
|
3116
|
+
// }
|
|
3117
|
+
// @Trace()
|
|
2588
3118
|
/**
|
|
2589
3119
|
* @param {?} $event
|
|
2590
3120
|
* @return {?}
|
|
2591
3121
|
*/
|
|
2592
|
-
PlaceOutletComponent.prototype.
|
|
3122
|
+
PlaceOutletComponent.prototype.onOutletActivated =
|
|
3123
|
+
// @Trace()
|
|
3124
|
+
// ngOnDestroy(): void {
|
|
3125
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3126
|
+
// console.log('mySegments', this.myPath.value);
|
|
3127
|
+
// super.ngOnDestroy();
|
|
3128
|
+
// }
|
|
3129
|
+
// @Trace()
|
|
3130
|
+
/**
|
|
2593
3131
|
* @param {?} $event
|
|
2594
3132
|
* @return {?}
|
|
2595
3133
|
*/
|
|
2596
3134
|
function ($event) {
|
|
3135
|
+
// console.log(this.routerOutLet.activatedRoute.snapshot.url);
|
|
2597
3136
|
this.currentPlace = $event;
|
|
2598
3137
|
this.placeService.onActivate($event);
|
|
2599
3138
|
if (!this.animate) {
|
|
2600
|
-
|
|
3139
|
+
// we're not animating so trigger any post animation callbacks now.
|
|
3140
|
+
this.animationDone();
|
|
2601
3141
|
}
|
|
2602
3142
|
};
|
|
2603
3143
|
/**
|
|
2604
3144
|
* @param {?} $event
|
|
2605
3145
|
* @return {?}
|
|
2606
3146
|
*/
|
|
2607
|
-
PlaceOutletComponent.prototype.
|
|
3147
|
+
PlaceOutletComponent.prototype.onOutletDeactivated = /**
|
|
2608
3148
|
* @param {?} $event
|
|
2609
3149
|
* @return {?}
|
|
2610
3150
|
*/
|
|
@@ -2630,44 +3170,53 @@
|
|
|
2630
3170
|
* @return {?}
|
|
2631
3171
|
*/
|
|
2632
3172
|
function () {
|
|
2633
|
-
this.
|
|
3173
|
+
if (this.currentPlace) {
|
|
3174
|
+
this.currentPlace.onPlaceReady();
|
|
3175
|
+
}
|
|
2634
3176
|
};
|
|
3177
|
+
// @Trace()
|
|
3178
|
+
// @Trace()
|
|
2635
3179
|
/**
|
|
2636
3180
|
* @private
|
|
3181
|
+
* @param {?} first
|
|
2637
3182
|
* @return {?}
|
|
2638
3183
|
*/
|
|
2639
|
-
PlaceOutletComponent.prototype.
|
|
3184
|
+
PlaceOutletComponent.prototype.updateRouterOutlet =
|
|
3185
|
+
// @Trace()
|
|
3186
|
+
/**
|
|
2640
3187
|
* @private
|
|
3188
|
+
* @param {?} first
|
|
2641
3189
|
* @return {?}
|
|
2642
3190
|
*/
|
|
2643
|
-
function () {
|
|
2644
|
-
if (
|
|
2645
|
-
this.
|
|
3191
|
+
function (first) {
|
|
3192
|
+
if (first.isActivated) {
|
|
3193
|
+
this.outletUrlSegment.value = first.activatedRoute.snapshot.url;
|
|
2646
3194
|
}
|
|
2647
3195
|
};
|
|
2648
3196
|
PlaceOutletComponent.decorators = [
|
|
2649
3197
|
{ type: core.Component, args: [{
|
|
2650
3198
|
selector: 'angular-ui-powerups-place-outlet',
|
|
2651
|
-
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"
|
|
3199
|
+
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated($event)\"\n (deactivate)=\"onOutletDeactivated($event)\">\n </router-outlet>\n</div>\n\n",
|
|
2652
3200
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
2653
3201
|
styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
|
|
2654
3202
|
}] }
|
|
2655
3203
|
];
|
|
2656
3204
|
/** @nocollapse */
|
|
2657
3205
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
2658
|
-
{ type: PlaceService }
|
|
3206
|
+
{ type: PlaceService },
|
|
3207
|
+
{ type: router.ActivatedRoute }
|
|
2659
3208
|
]; };
|
|
2660
3209
|
PlaceOutletComponent.propDecorators = {
|
|
2661
3210
|
animate: [{ type: core.Input }],
|
|
2662
|
-
|
|
3211
|
+
routerOutLetQuery: [{ type: core.ViewChildren, args: [router.RouterOutlet,] }]
|
|
2663
3212
|
};
|
|
2664
3213
|
return PlaceOutletComponent;
|
|
2665
|
-
}());
|
|
3214
|
+
}(DisposableComponent));
|
|
2666
3215
|
if (false) {
|
|
2667
3216
|
/** @type {?} */
|
|
2668
3217
|
PlaceOutletComponent.prototype.animate;
|
|
2669
3218
|
/** @type {?} */
|
|
2670
|
-
PlaceOutletComponent.prototype.
|
|
3219
|
+
PlaceOutletComponent.prototype.routerOutLetQuery;
|
|
2671
3220
|
/**
|
|
2672
3221
|
* @type {?}
|
|
2673
3222
|
* @private
|
|
@@ -2677,64 +3226,54 @@
|
|
|
2677
3226
|
* @type {?}
|
|
2678
3227
|
* @private
|
|
2679
3228
|
*/
|
|
2680
|
-
PlaceOutletComponent.prototype.
|
|
2681
|
-
}
|
|
2682
|
-
|
|
2683
|
-
/**
|
|
2684
|
-
* @fileoverview added by tsickle
|
|
2685
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2686
|
-
*/
|
|
2687
|
-
var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
2688
|
-
__extends(TabbedPlaceNavigationComponent, _super);
|
|
2689
|
-
function TabbedPlaceNavigationComponent() {
|
|
2690
|
-
var _this = _super.call(this) || this;
|
|
2691
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2692
|
-
_this.orderedPlaces = chain(_this.placesModel).map((/**
|
|
2693
|
-
* @param {?} c
|
|
2694
|
-
* @return {?}
|
|
2695
|
-
*/
|
|
2696
|
-
function (c) { return exports.PlaceComponent.getDefinition(c); })).sortBy('order');
|
|
2697
|
-
return _this;
|
|
2698
|
-
}
|
|
3229
|
+
PlaceOutletComponent.prototype.myPath;
|
|
2699
3230
|
/**
|
|
2700
|
-
* @
|
|
3231
|
+
* @type {?}
|
|
3232
|
+
* @private
|
|
2701
3233
|
*/
|
|
2702
|
-
|
|
2703
|
-
|
|
3234
|
+
PlaceOutletComponent.prototype.outletUrlSegment;
|
|
3235
|
+
/**
|
|
3236
|
+
* @type {?}
|
|
3237
|
+
* @private
|
|
2704
3238
|
*/
|
|
2705
|
-
|
|
2706
|
-
|
|
3239
|
+
PlaceOutletComponent.prototype.outletChildPath;
|
|
3240
|
+
/**
|
|
3241
|
+
* @type {?}
|
|
3242
|
+
* @private
|
|
3243
|
+
*/
|
|
3244
|
+
PlaceOutletComponent.prototype.state;
|
|
3245
|
+
/**
|
|
3246
|
+
* @type {?}
|
|
3247
|
+
* @private
|
|
3248
|
+
*/
|
|
3249
|
+
PlaceOutletComponent.prototype.placeService;
|
|
3250
|
+
/**
|
|
3251
|
+
* @type {?}
|
|
3252
|
+
* @private
|
|
3253
|
+
*/
|
|
3254
|
+
PlaceOutletComponent.prototype.activatedRoute;
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3257
|
+
/**
|
|
3258
|
+
* @fileoverview added by tsickle
|
|
3259
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3260
|
+
*/
|
|
3261
|
+
var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
3262
|
+
__extends(TabbedPlaceNavigationComponent, _super);
|
|
3263
|
+
function TabbedPlaceNavigationComponent() {
|
|
3264
|
+
return _super.call(this) || this;
|
|
3265
|
+
}
|
|
2707
3266
|
TabbedPlaceNavigationComponent.decorators = [
|
|
2708
3267
|
{ type: core.Component, args: [{
|
|
2709
3268
|
selector: 'angular-ui-powerups-tabbed-place-navigation',
|
|
2710
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let
|
|
3269
|
+
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n",
|
|
2711
3270
|
styles: [""]
|
|
2712
3271
|
}] }
|
|
2713
3272
|
];
|
|
2714
3273
|
/** @nocollapse */
|
|
2715
3274
|
TabbedPlaceNavigationComponent.ctorParameters = function () { return []; };
|
|
2716
|
-
TabbedPlaceNavigationComponent.propDecorators = {
|
|
2717
|
-
places: [{ type: core.Input }],
|
|
2718
|
-
placesModel: [{ type: core.Input }]
|
|
2719
|
-
};
|
|
2720
|
-
__decorate([
|
|
2721
|
-
pectin.StoreInListModel('placesModel'),
|
|
2722
|
-
__metadata("design:type", Array)
|
|
2723
|
-
], TabbedPlaceNavigationComponent.prototype, "places", void 0);
|
|
2724
|
-
__decorate([
|
|
2725
|
-
pectin.UseDelegate(),
|
|
2726
|
-
__metadata("design:type", pectin.ListModel)
|
|
2727
|
-
], TabbedPlaceNavigationComponent.prototype, "placesModel", void 0);
|
|
2728
3275
|
return TabbedPlaceNavigationComponent;
|
|
2729
|
-
}(
|
|
2730
|
-
if (false) {
|
|
2731
|
-
/** @type {?} */
|
|
2732
|
-
TabbedPlaceNavigationComponent.prototype.places;
|
|
2733
|
-
/** @type {?} */
|
|
2734
|
-
TabbedPlaceNavigationComponent.prototype.placesModel;
|
|
2735
|
-
/** @type {?} */
|
|
2736
|
-
TabbedPlaceNavigationComponent.prototype.orderedPlaces;
|
|
2737
|
-
}
|
|
3276
|
+
}(AbstractPlaceNavigationComponent));
|
|
2738
3277
|
|
|
2739
3278
|
/**
|
|
2740
3279
|
* @fileoverview added by tsickle
|
|
@@ -2759,14 +3298,16 @@
|
|
|
2759
3298
|
EmptyStateComponent,
|
|
2760
3299
|
BusyOverlayComponent,
|
|
2761
3300
|
PlaceOutletComponent,
|
|
2762
|
-
TabbedPlaceNavigationComponent
|
|
3301
|
+
TabbedPlaceNavigationComponent,
|
|
3302
|
+
ListPlaceNavComponent
|
|
2763
3303
|
],
|
|
2764
3304
|
entryComponents: [BusyOverlayComponent],
|
|
2765
3305
|
exports: [
|
|
2766
3306
|
BusyOverlayComponent,
|
|
2767
3307
|
PlaceOutletComponent,
|
|
2768
3308
|
EmptyStateComponent,
|
|
2769
|
-
TabbedPlaceNavigationComponent
|
|
3309
|
+
TabbedPlaceNavigationComponent,
|
|
3310
|
+
ListPlaceNavComponent
|
|
2770
3311
|
],
|
|
2771
3312
|
providers: [
|
|
2772
3313
|
PlaceService
|
|
@@ -2791,16 +3332,16 @@
|
|
|
2791
3332
|
NumberInputComponent,
|
|
2792
3333
|
StringInputComponent,
|
|
2793
3334
|
PasswordInputComponent,
|
|
2794
|
-
SelectInputComponent
|
|
3335
|
+
SelectInputComponent
|
|
2795
3336
|
],
|
|
2796
3337
|
imports: [
|
|
2797
3338
|
common.CommonModule,
|
|
2798
|
-
platformBrowser.BrowserModule,
|
|
2799
3339
|
animations.BrowserAnimationsModule,
|
|
2800
3340
|
forms.FormsModule,
|
|
2801
3341
|
material.MatInputModule,
|
|
2802
3342
|
material.MatFormFieldModule,
|
|
2803
3343
|
material.MatSelectModule,
|
|
3344
|
+
tabs.MatTabsModule,
|
|
2804
3345
|
PlaceModule,
|
|
2805
3346
|
InteractionModule
|
|
2806
3347
|
],
|
|
@@ -2812,7 +3353,7 @@
|
|
|
2812
3353
|
PasswordInputComponent,
|
|
2813
3354
|
SelectInputComponent,
|
|
2814
3355
|
InteractionModule,
|
|
2815
|
-
PlaceModule
|
|
3356
|
+
PlaceModule
|
|
2816
3357
|
]
|
|
2817
3358
|
},] }
|
|
2818
3359
|
];
|
|
@@ -3193,14 +3734,37 @@
|
|
|
3193
3734
|
/**
|
|
3194
3735
|
* @record
|
|
3195
3736
|
*/
|
|
3196
|
-
function
|
|
3737
|
+
function NavItem() { }
|
|
3738
|
+
if (false) {
|
|
3739
|
+
/**
|
|
3740
|
+
* @return {?}
|
|
3741
|
+
*/
|
|
3742
|
+
NavItem.prototype.title = function () { };
|
|
3743
|
+
/**
|
|
3744
|
+
* @return {?}
|
|
3745
|
+
*/
|
|
3746
|
+
NavItem.prototype.icon = function () { };
|
|
3747
|
+
/**
|
|
3748
|
+
* @return {?}
|
|
3749
|
+
*/
|
|
3750
|
+
NavItem.prototype.tooltip = function () { };
|
|
3751
|
+
}
|
|
3752
|
+
|
|
3753
|
+
/**
|
|
3754
|
+
* @fileoverview added by tsickle
|
|
3755
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3756
|
+
*/
|
|
3757
|
+
/**
|
|
3758
|
+
* @record
|
|
3759
|
+
*/
|
|
3760
|
+
function PlaceComponentLike() { }
|
|
3197
3761
|
if (false) {
|
|
3198
3762
|
/** @type {?} */
|
|
3199
|
-
|
|
3763
|
+
PlaceComponentLike.prototype.activatedRoute;
|
|
3200
3764
|
/**
|
|
3201
3765
|
* @return {?}
|
|
3202
3766
|
*/
|
|
3203
|
-
|
|
3767
|
+
PlaceComponentLike.prototype.onPlaceReady = function () { };
|
|
3204
3768
|
}
|
|
3205
3769
|
|
|
3206
3770
|
/**
|
|
@@ -3210,13 +3774,13 @@
|
|
|
3210
3774
|
/**
|
|
3211
3775
|
* @record
|
|
3212
3776
|
*/
|
|
3213
|
-
function
|
|
3777
|
+
function PlaceUpdatesService() { }
|
|
3214
3778
|
if (false) {
|
|
3215
3779
|
/**
|
|
3216
3780
|
* @param {?} params
|
|
3217
3781
|
* @return {?}
|
|
3218
3782
|
*/
|
|
3219
|
-
|
|
3783
|
+
PlaceUpdatesService.prototype.notifyRouteParametersChanged = function (params) { };
|
|
3220
3784
|
}
|
|
3221
3785
|
|
|
3222
3786
|
/**
|
|
@@ -3240,6 +3804,28 @@
|
|
|
3240
3804
|
});
|
|
3241
3805
|
}
|
|
3242
3806
|
|
|
3807
|
+
/**
|
|
3808
|
+
* @fileoverview added by tsickle
|
|
3809
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3810
|
+
*/
|
|
3811
|
+
/**
|
|
3812
|
+
* @record
|
|
3813
|
+
*/
|
|
3814
|
+
function Visit() { }
|
|
3815
|
+
if (false) {
|
|
3816
|
+
/** @type {?} */
|
|
3817
|
+
Visit.prototype.placeDefinition;
|
|
3818
|
+
/**
|
|
3819
|
+
* @return {?}
|
|
3820
|
+
*/
|
|
3821
|
+
Visit.prototype.getRouteId = function () { };
|
|
3822
|
+
/**
|
|
3823
|
+
* @param {?} name
|
|
3824
|
+
* @return {?}
|
|
3825
|
+
*/
|
|
3826
|
+
Visit.prototype.getRouteParameter = function (name) { };
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3243
3829
|
/**
|
|
3244
3830
|
* @fileoverview added by tsickle
|
|
3245
3831
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3264,7 +3850,24 @@
|
|
|
3264
3850
|
* @return {?}
|
|
3265
3851
|
*/
|
|
3266
3852
|
function (component, currentRoute, currentState, nextState) {
|
|
3267
|
-
|
|
3853
|
+
// HACK: this will break with child routes...
|
|
3854
|
+
/** @type {?} */
|
|
3855
|
+
var path = "/" + component.placeDefinition.path;
|
|
3856
|
+
console.log({
|
|
3857
|
+
placePath: path,
|
|
3858
|
+
currentRoute: currentRoute.toString(),
|
|
3859
|
+
currentStateUrl: currentState.url,
|
|
3860
|
+
nextStateUrl: nextState.url,
|
|
3861
|
+
currentStateUrlTree: this.router.parseUrl(currentState.url).root.children[router.PRIMARY_OUTLET].segments,
|
|
3862
|
+
nextStateUrlTree: this.router.parseUrl(nextState.url).root.children[router.PRIMARY_OUTLET].segments
|
|
3863
|
+
});
|
|
3864
|
+
// nextState is the full path...
|
|
3865
|
+
if (!nextState.url.startsWith(path)) {
|
|
3866
|
+
return component.canDeactivate();
|
|
3867
|
+
}
|
|
3868
|
+
else {
|
|
3869
|
+
return true;
|
|
3870
|
+
}
|
|
3268
3871
|
};
|
|
3269
3872
|
LeavePlaceGuard.decorators = [
|
|
3270
3873
|
{ type: core.Injectable, args: [{
|
|
@@ -3296,777 +3899,906 @@
|
|
|
3296
3899
|
* @fileoverview added by tsickle
|
|
3297
3900
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3298
3901
|
*/
|
|
3902
|
+
var PlaceRouteGuard = /** @class */ (function () {
|
|
3903
|
+
function PlaceRouteGuard(placeService, router) {
|
|
3904
|
+
this.placeService = placeService;
|
|
3905
|
+
this.router = router;
|
|
3906
|
+
}
|
|
3907
|
+
/**
|
|
3908
|
+
* @param {?} route
|
|
3909
|
+
* @param {?} state
|
|
3910
|
+
* @return {?}
|
|
3911
|
+
*/
|
|
3912
|
+
PlaceRouteGuard.prototype.canActivate = /**
|
|
3913
|
+
* @param {?} route
|
|
3914
|
+
* @param {?} state
|
|
3915
|
+
* @return {?}
|
|
3916
|
+
*/
|
|
3917
|
+
function (route, state) {
|
|
3918
|
+
// Implement this when adding child routes.
|
|
3919
|
+
// TODO: there are really two types of snapshot, ones with id's and ones without.
|
|
3920
|
+
// Id snapshot are repesented by 2 url segments
|
|
3921
|
+
// ID => [{'/basePath', params}, {'id', params}]
|
|
3922
|
+
// NO ID => [{'/basePath', params}]
|
|
3923
|
+
// console.log({urlSegments: route.url});
|
|
3924
|
+
// const snapshot = ParameterSnapshot.create(PlaceComponent.getDefinition(route.component as Constructable<PlaceComponent>), route.paramMap);
|
|
3925
|
+
// return this.placeService.sanitise(snapshot).then(sanitised => {
|
|
3926
|
+
// if (sanitised.hasChanged(snapshot)) {
|
|
3927
|
+
// return this.router.createUrlTree(snapshot.updateUrl(route.url))
|
|
3928
|
+
// } else {
|
|
3929
|
+
// return true;
|
|
3930
|
+
// }
|
|
3931
|
+
// });
|
|
3932
|
+
return true;
|
|
3933
|
+
};
|
|
3934
|
+
PlaceRouteGuard.decorators = [
|
|
3935
|
+
{ type: core.Injectable, args: [{
|
|
3936
|
+
providedIn: 'root'
|
|
3937
|
+
},] }
|
|
3938
|
+
];
|
|
3939
|
+
/** @nocollapse */
|
|
3940
|
+
PlaceRouteGuard.ctorParameters = function () { return [
|
|
3941
|
+
{ type: PlaceService },
|
|
3942
|
+
{ type: router.Router }
|
|
3943
|
+
]; };
|
|
3944
|
+
/** @nocollapse */ PlaceRouteGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(core.ɵɵinject(PlaceService), core.ɵɵinject(router.Router)); }, token: PlaceRouteGuard, providedIn: "root" });
|
|
3945
|
+
return PlaceRouteGuard;
|
|
3946
|
+
}());
|
|
3947
|
+
if (false) {
|
|
3948
|
+
/**
|
|
3949
|
+
* @type {?}
|
|
3950
|
+
* @private
|
|
3951
|
+
*/
|
|
3952
|
+
PlaceRouteGuard.prototype.placeService;
|
|
3953
|
+
/**
|
|
3954
|
+
* @type {?}
|
|
3955
|
+
* @private
|
|
3956
|
+
*/
|
|
3957
|
+
PlaceRouteGuard.prototype.router;
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3299
3960
|
/**
|
|
3300
|
-
* @
|
|
3301
|
-
* @
|
|
3961
|
+
* @fileoverview added by tsickle
|
|
3962
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3302
3963
|
*/
|
|
3303
|
-
|
|
3304
|
-
* @abstract
|
|
3964
|
+
/**
|
|
3305
3965
|
* @template T, S
|
|
3306
3966
|
*/
|
|
3307
|
-
|
|
3308
|
-
function
|
|
3309
|
-
this.
|
|
3310
|
-
this.
|
|
3311
|
-
this.
|
|
3967
|
+
var DefaultParameterSanitiser = /** @class */ (function () {
|
|
3968
|
+
function DefaultParameterSanitiser(def, placeService, options) {
|
|
3969
|
+
this.def = def;
|
|
3970
|
+
this.placeService = placeService;
|
|
3971
|
+
this.remember = lodash.isNil(options.remember) ? false : options.remember;
|
|
3972
|
+
this.defaultValue = lodash.isNil(options.defaultValue) ? null : options.defaultValue;
|
|
3312
3973
|
}
|
|
3313
3974
|
/**
|
|
3975
|
+
* @param {?} value
|
|
3976
|
+
* @param {?} visit
|
|
3314
3977
|
* @return {?}
|
|
3315
3978
|
*/
|
|
3316
|
-
|
|
3979
|
+
DefaultParameterSanitiser.prototype.sanitise = /**
|
|
3980
|
+
* @param {?} value
|
|
3981
|
+
* @param {?} visit
|
|
3317
3982
|
* @return {?}
|
|
3318
3983
|
*/
|
|
3319
|
-
function () {
|
|
3320
|
-
|
|
3984
|
+
function (value, visit) {
|
|
3985
|
+
if (this.isBlank(value)) {
|
|
3986
|
+
if (this.remember) {
|
|
3987
|
+
// value = null;
|
|
3988
|
+
}
|
|
3989
|
+
return this.isBlank(value) && !lodash.isNil(this.defaultValue) ? this.defaultValue : value;
|
|
3990
|
+
}
|
|
3991
|
+
else {
|
|
3992
|
+
return value;
|
|
3993
|
+
}
|
|
3321
3994
|
};
|
|
3322
|
-
Object.defineProperty(Sanitiser.prototype, "valueChanged", {
|
|
3323
|
-
get: /**
|
|
3324
|
-
* @return {?}
|
|
3325
|
-
*/
|
|
3326
|
-
function () {
|
|
3327
|
-
return !lodash.isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
|
|
3328
|
-
},
|
|
3329
|
-
enumerable: true,
|
|
3330
|
-
configurable: true
|
|
3331
|
-
});
|
|
3332
|
-
Object.defineProperty(Sanitiser.prototype, "sanitisedValue", {
|
|
3333
|
-
get: /**
|
|
3334
|
-
* @return {?}
|
|
3335
|
-
*/
|
|
3336
|
-
function () {
|
|
3337
|
-
return this._sanitisedValue;
|
|
3338
|
-
},
|
|
3339
|
-
enumerable: true,
|
|
3340
|
-
configurable: true
|
|
3341
|
-
});
|
|
3342
3995
|
/**
|
|
3996
|
+
* @private
|
|
3997
|
+
* @param {?} value
|
|
3343
3998
|
* @return {?}
|
|
3344
3999
|
*/
|
|
3345
|
-
|
|
4000
|
+
DefaultParameterSanitiser.prototype.isBlank = /**
|
|
4001
|
+
* @private
|
|
4002
|
+
* @param {?} value
|
|
3346
4003
|
* @return {?}
|
|
3347
4004
|
*/
|
|
3348
|
-
function () {
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
switch (_b.label) {
|
|
3353
|
-
case 0:
|
|
3354
|
-
if (!this.sanitiser) return [3 /*break*/, 2];
|
|
3355
|
-
this.initialValue = this.readFrom(this.snapshot);
|
|
3356
|
-
_a = this;
|
|
3357
|
-
return [4 /*yield*/, this.sanitiser.sanitise(this.initialValue)];
|
|
3358
|
-
case 1:
|
|
3359
|
-
_a._sanitisedValue = _b.sent();
|
|
3360
|
-
if (this.initialValue !== this._sanitisedValue) {
|
|
3361
|
-
return [2 /*return*/, false];
|
|
3362
|
-
}
|
|
3363
|
-
_b.label = 2;
|
|
3364
|
-
case 2: return [2 /*return*/, true];
|
|
3365
|
-
}
|
|
3366
|
-
});
|
|
3367
|
-
});
|
|
4005
|
+
function (value) {
|
|
4006
|
+
/** @type {?} */
|
|
4007
|
+
var isNil$1 = lodash.isNil(value);
|
|
4008
|
+
return this.def.isArray ? !isNil$1 || value['length'] < 1 : isNil$1;
|
|
3368
4009
|
};
|
|
3369
|
-
|
|
4010
|
+
__decorate([
|
|
4011
|
+
pectin.Trace(),
|
|
4012
|
+
__metadata("design:type", Function),
|
|
4013
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
4014
|
+
__metadata("design:returntype", Object)
|
|
4015
|
+
], DefaultParameterSanitiser.prototype, "sanitise", null);
|
|
4016
|
+
return DefaultParameterSanitiser;
|
|
3370
4017
|
}());
|
|
3371
4018
|
if (false) {
|
|
3372
4019
|
/**
|
|
3373
4020
|
* @type {?}
|
|
3374
4021
|
* @private
|
|
3375
4022
|
*/
|
|
3376
|
-
|
|
4023
|
+
DefaultParameterSanitiser.prototype.remember;
|
|
3377
4024
|
/**
|
|
3378
4025
|
* @type {?}
|
|
3379
4026
|
* @private
|
|
3380
4027
|
*/
|
|
3381
|
-
|
|
3382
|
-
/** @type {?} */
|
|
3383
|
-
exports.Sanitiser.prototype.parameterDef;
|
|
3384
|
-
/** @type {?} */
|
|
3385
|
-
exports.Sanitiser.prototype.snapshot;
|
|
3386
|
-
/** @type {?} */
|
|
3387
|
-
exports.Sanitiser.prototype.sanitiser;
|
|
3388
|
-
/**
|
|
3389
|
-
* @abstract
|
|
3390
|
-
* @protected
|
|
3391
|
-
* @param {?} snapshot
|
|
3392
|
-
* @return {?}
|
|
3393
|
-
*/
|
|
3394
|
-
exports.Sanitiser.prototype.readFrom = function (snapshot) { };
|
|
4028
|
+
DefaultParameterSanitiser.prototype.defaultValue;
|
|
3395
4029
|
/**
|
|
3396
|
-
* @
|
|
3397
|
-
* @
|
|
3398
|
-
* @param {?} initialValue
|
|
3399
|
-
* @param {?} sanitisedValue
|
|
3400
|
-
* @return {?}
|
|
4030
|
+
* @type {?}
|
|
4031
|
+
* @private
|
|
3401
4032
|
*/
|
|
3402
|
-
|
|
4033
|
+
DefaultParameterSanitiser.prototype.def;
|
|
3403
4034
|
/**
|
|
3404
|
-
* @
|
|
3405
|
-
* @
|
|
3406
|
-
* @return {?}
|
|
4035
|
+
* @type {?}
|
|
4036
|
+
* @private
|
|
3407
4037
|
*/
|
|
3408
|
-
|
|
4038
|
+
DefaultParameterSanitiser.prototype.placeService;
|
|
3409
4039
|
}
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
/**
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
4040
|
+
|
|
4041
|
+
/**
|
|
4042
|
+
* @fileoverview added by tsickle
|
|
4043
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4044
|
+
*/
|
|
4045
|
+
/**
|
|
4046
|
+
* @record
|
|
4047
|
+
*/
|
|
4048
|
+
function JsonArray() { }
|
|
4049
|
+
/**
|
|
4050
|
+
* @record
|
|
4051
|
+
*/
|
|
4052
|
+
function JsonMap() { }
|
|
4053
|
+
|
|
4054
|
+
/**
|
|
4055
|
+
* @fileoverview added by tsickle
|
|
4056
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4057
|
+
*/
|
|
4058
|
+
/**
|
|
4059
|
+
* @record
|
|
4060
|
+
* @template T
|
|
4061
|
+
*/
|
|
4062
|
+
function ParameterOptions() { }
|
|
4063
|
+
if (false) {
|
|
4064
|
+
/** @type {?|undefined} */
|
|
4065
|
+
ParameterOptions.prototype.as;
|
|
4066
|
+
/** @type {?|undefined} */
|
|
4067
|
+
ParameterOptions.prototype.optional;
|
|
4068
|
+
/** @type {?|undefined} */
|
|
4069
|
+
ParameterOptions.prototype.remember;
|
|
4070
|
+
/** @type {?|undefined} */
|
|
4071
|
+
ParameterOptions.prototype.defaultValue;
|
|
4072
|
+
/** @type {?|undefined} */
|
|
4073
|
+
ParameterOptions.prototype.sanitiser;
|
|
4074
|
+
}
|
|
4075
|
+
/**
|
|
4076
|
+
* @record
|
|
4077
|
+
* @template T
|
|
4078
|
+
*/
|
|
4079
|
+
function ListParameterOptions() { }
|
|
4080
|
+
if (false) {
|
|
4081
|
+
/** @type {?|undefined} */
|
|
4082
|
+
ListParameterOptions.prototype.as;
|
|
4083
|
+
/** @type {?|undefined} */
|
|
4084
|
+
ListParameterOptions.prototype.optional;
|
|
4085
|
+
/** @type {?|undefined} */
|
|
4086
|
+
ListParameterOptions.prototype.remember;
|
|
4087
|
+
/** @type {?|undefined} */
|
|
4088
|
+
ListParameterOptions.prototype.defaultValue;
|
|
4089
|
+
/** @type {?|undefined} */
|
|
4090
|
+
ListParameterOptions.prototype.sanitiser;
|
|
4091
|
+
}
|
|
4092
|
+
/**
|
|
4093
|
+
* @template T
|
|
4094
|
+
* @param {?} type
|
|
4095
|
+
* @param {?=} options
|
|
4096
|
+
* @return {?}
|
|
4097
|
+
*/
|
|
4098
|
+
function RouteId(type, options) {
|
|
4099
|
+
// assert.isTruthy(type.isValid());
|
|
4100
|
+
return (/**
|
|
4101
|
+
* @param {?} prototype
|
|
4102
|
+
* @param {?} propertyKey
|
|
3442
4103
|
* @return {?}
|
|
3443
4104
|
*/
|
|
3444
|
-
function () {
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
_b = __values(this.parameterSanitisers), _c = _b.next();
|
|
3463
|
-
_d.label = 3;
|
|
3464
|
-
case 3:
|
|
3465
|
-
if (!!_c.done) return [3 /*break*/, 6];
|
|
3466
|
-
sanitiser = _c.value;
|
|
3467
|
-
return [4 /*yield*/, sanitiser.sanitize()];
|
|
3468
|
-
case 4:
|
|
3469
|
-
_d.sent();
|
|
3470
|
-
_d.label = 5;
|
|
3471
|
-
case 5:
|
|
3472
|
-
_c = _b.next();
|
|
3473
|
-
return [3 /*break*/, 3];
|
|
3474
|
-
case 6: return [3 /*break*/, 9];
|
|
3475
|
-
case 7:
|
|
3476
|
-
e_1_1 = _d.sent();
|
|
3477
|
-
e_1 = { error: e_1_1 };
|
|
3478
|
-
return [3 /*break*/, 9];
|
|
3479
|
-
case 8:
|
|
3480
|
-
try {
|
|
3481
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3482
|
-
}
|
|
3483
|
-
finally { if (e_1) throw e_1.error; }
|
|
3484
|
-
return [7 /*endfinally*/];
|
|
3485
|
-
case 9: return [2 /*return*/, !this.parameterSanitisers.find((/**
|
|
3486
|
-
* @param {?} s
|
|
3487
|
-
* @return {?}
|
|
3488
|
-
*/
|
|
3489
|
-
function (s) { return s.valueChanged; }))];
|
|
3490
|
-
}
|
|
3491
|
-
});
|
|
3492
|
-
});
|
|
3493
|
-
};
|
|
3494
|
-
/**
|
|
3495
|
-
* @param {?} router
|
|
4105
|
+
function (prototype, propertyKey) {
|
|
4106
|
+
/** @type {?} */
|
|
4107
|
+
var param = createDefinition(propertyKey, type, options, true);
|
|
4108
|
+
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
4109
|
+
pectin.UseDelegate()(prototype, propertyKey);
|
|
4110
|
+
});
|
|
4111
|
+
}
|
|
4112
|
+
/**
|
|
4113
|
+
* @template T
|
|
4114
|
+
* @param {?} type
|
|
4115
|
+
* @param {?=} options
|
|
4116
|
+
* @return {?}
|
|
4117
|
+
*/
|
|
4118
|
+
function RouteParameter(type, options) {
|
|
4119
|
+
// assert.isTruthy(type.isValid());
|
|
4120
|
+
return (/**
|
|
4121
|
+
* @param {?} prototype
|
|
4122
|
+
* @param {?} propertyKey
|
|
3496
4123
|
* @return {?}
|
|
3497
4124
|
*/
|
|
3498
|
-
|
|
3499
|
-
|
|
4125
|
+
function (prototype, propertyKey) {
|
|
4126
|
+
/** @type {?} */
|
|
4127
|
+
var param = createDefinition(propertyKey, type, options, false);
|
|
4128
|
+
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
4129
|
+
pectin.UseDelegate()(prototype, propertyKey);
|
|
4130
|
+
});
|
|
4131
|
+
}
|
|
4132
|
+
/**
|
|
4133
|
+
* @template E
|
|
4134
|
+
* @param {?} elementType
|
|
4135
|
+
* @param {?=} options
|
|
4136
|
+
* @return {?}
|
|
4137
|
+
*/
|
|
4138
|
+
function RouteParameterList(elementType, options) {
|
|
4139
|
+
// assert.isTruthy(type.isValid());
|
|
4140
|
+
return (/**
|
|
4141
|
+
* @param {?} prototype
|
|
4142
|
+
* @param {?} propertyKey
|
|
3500
4143
|
* @return {?}
|
|
3501
4144
|
*/
|
|
3502
|
-
function (
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
4145
|
+
function (prototype, propertyKey) {
|
|
4146
|
+
/** @type {?} */
|
|
4147
|
+
var param = createArrayDefinition(propertyKey, elementType, options);
|
|
4148
|
+
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
4149
|
+
pectin.UseDelegate()(prototype, propertyKey);
|
|
4150
|
+
});
|
|
4151
|
+
}
|
|
4152
|
+
/**
|
|
4153
|
+
* @template T
|
|
4154
|
+
* @param {?} propertyName
|
|
4155
|
+
* @param {?} type
|
|
4156
|
+
* @param {?} options
|
|
4157
|
+
* @param {?} routeId
|
|
4158
|
+
* @return {?}
|
|
4159
|
+
*/
|
|
4160
|
+
function createDefinition(propertyName, type, options, routeId) {
|
|
4161
|
+
/** @type {?} */
|
|
4162
|
+
var opts = typescriptUtilities.Opts.get(options);
|
|
4163
|
+
/** @type {?} */
|
|
4164
|
+
var propertyNameAsString = pectin.assert.notNil(propertyName).toString();
|
|
4165
|
+
/** @type {?} */
|
|
4166
|
+
var def = {
|
|
4167
|
+
name: opts.getOptional('as', propertyNameAsString),
|
|
4168
|
+
propertyName: propertyNameAsString,
|
|
4169
|
+
type: pectin.assert.notNil(type),
|
|
4170
|
+
sanitiser: opts.getOptional('sanitiser', null),
|
|
4171
|
+
isRouteId: routeId,
|
|
4172
|
+
isArray: false
|
|
3517
4173
|
};
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
4174
|
+
return def;
|
|
4175
|
+
}
|
|
4176
|
+
/**
|
|
4177
|
+
* @template T
|
|
4178
|
+
* @param {?} propertyName
|
|
4179
|
+
* @param {?} type
|
|
4180
|
+
* @param {?} options
|
|
4181
|
+
* @return {?}
|
|
4182
|
+
*/
|
|
4183
|
+
function createArrayDefinition(propertyName, type, options) {
|
|
4184
|
+
/** @type {?} */
|
|
4185
|
+
var opts = typescriptUtilities.Opts.get(options);
|
|
4186
|
+
/** @type {?} */
|
|
4187
|
+
var propertyNameAsString = pectin.assert.notNil(propertyName).toString();
|
|
4188
|
+
/** @type {?} */
|
|
4189
|
+
var def = {
|
|
4190
|
+
name: opts.getOptional('as', propertyNameAsString),
|
|
4191
|
+
propertyName: propertyNameAsString,
|
|
4192
|
+
type: pectin.assert.notNil(type),
|
|
4193
|
+
sanitiser: opts.getOptional('sanitiser', null),
|
|
4194
|
+
isRouteId: false,
|
|
4195
|
+
isArray: true
|
|
3532
4196
|
};
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
4197
|
+
return def;
|
|
4198
|
+
}
|
|
4199
|
+
|
|
4200
|
+
/**
|
|
4201
|
+
* @fileoverview added by tsickle
|
|
4202
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4203
|
+
*/
|
|
4204
|
+
/**
|
|
4205
|
+
* @record
|
|
4206
|
+
* @template T, S
|
|
4207
|
+
*/
|
|
4208
|
+
function ParameterDefinition() { }
|
|
3541
4209
|
if (false) {
|
|
3542
|
-
/**
|
|
3543
|
-
* @type {?}
|
|
3544
|
-
* @private
|
|
3545
|
-
*/
|
|
3546
|
-
RouteParameterSanitiser.prototype.routeIdSanitiser;
|
|
3547
|
-
/**
|
|
3548
|
-
* @type {?}
|
|
3549
|
-
* @private
|
|
3550
|
-
*/
|
|
3551
|
-
RouteParameterSanitiser.prototype.parameterSanitisers;
|
|
3552
4210
|
/** @type {?} */
|
|
3553
|
-
|
|
4211
|
+
ParameterDefinition.prototype.name;
|
|
3554
4212
|
/** @type {?} */
|
|
3555
|
-
|
|
4213
|
+
ParameterDefinition.prototype.propertyName;
|
|
3556
4214
|
/** @type {?} */
|
|
3557
|
-
|
|
4215
|
+
ParameterDefinition.prototype.type;
|
|
4216
|
+
/** @type {?} */
|
|
4217
|
+
ParameterDefinition.prototype.sanitiser;
|
|
4218
|
+
/** @type {?} */
|
|
4219
|
+
ParameterDefinition.prototype.isRouteId;
|
|
4220
|
+
/** @type {?} */
|
|
4221
|
+
ParameterDefinition.prototype.isArray;
|
|
3558
4222
|
}
|
|
3559
|
-
|
|
4223
|
+
|
|
4224
|
+
/**
|
|
4225
|
+
* @fileoverview added by tsickle
|
|
4226
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4227
|
+
*/
|
|
4228
|
+
/**
|
|
4229
|
+
* @record
|
|
4230
|
+
* @template T
|
|
4231
|
+
*/
|
|
4232
|
+
function ParameterSanitiser() { }
|
|
4233
|
+
if (false) {
|
|
3560
4234
|
/**
|
|
3561
|
-
* @
|
|
4235
|
+
* @param {?} value
|
|
4236
|
+
* @param {?=} visit
|
|
4237
|
+
* @return {?}
|
|
3562
4238
|
*/
|
|
3563
|
-
|
|
4239
|
+
ParameterSanitiser.prototype.sanitise = function (value, visit) { };
|
|
4240
|
+
}
|
|
4241
|
+
(function (ParameterSanitiser) {
|
|
4242
|
+
/**
|
|
4243
|
+
* @record
|
|
3564
4244
|
* @template T
|
|
3565
4245
|
*/
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
4246
|
+
function Options() { }
|
|
4247
|
+
ParameterSanitiser.Options = Options;
|
|
4248
|
+
if (false) {
|
|
4249
|
+
/** @type {?|undefined} */
|
|
4250
|
+
Options.prototype.remember;
|
|
4251
|
+
/** @type {?|undefined} */
|
|
4252
|
+
Options.prototype.defaultValue;
|
|
4253
|
+
}
|
|
4254
|
+
})(ParameterSanitiser || (ParameterSanitiser = {}));
|
|
4255
|
+
|
|
4256
|
+
/**
|
|
4257
|
+
* @fileoverview added by tsickle
|
|
4258
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4259
|
+
*/
|
|
4260
|
+
// WARNING: interface has both a type and a value, skipping emit
|
|
4261
|
+
|
|
4262
|
+
(function (ParameterType) {
|
|
4263
|
+
var StringType = /** @class */ (function () {
|
|
4264
|
+
function StringType() {
|
|
3570
4265
|
}
|
|
3571
4266
|
/**
|
|
3572
|
-
* @param {?}
|
|
4267
|
+
* @param {?} value
|
|
3573
4268
|
* @return {?}
|
|
3574
4269
|
*/
|
|
3575
|
-
|
|
3576
|
-
* @param {?}
|
|
4270
|
+
StringType.prototype.format = /**
|
|
4271
|
+
* @param {?} value
|
|
3577
4272
|
* @return {?}
|
|
3578
4273
|
*/
|
|
3579
|
-
function (
|
|
3580
|
-
|
|
3581
|
-
var rawValue = this.parameterDef.isRouteId ?
|
|
3582
|
-
snapshot.paramMap.get(this.parameterDef.name) :
|
|
3583
|
-
snapshot.queryParamMap.get(this.parameterDef.name);
|
|
3584
|
-
return this.parameterDef.type.parse(rawValue);
|
|
4274
|
+
function (value) {
|
|
4275
|
+
return value;
|
|
3585
4276
|
};
|
|
3586
4277
|
/**
|
|
3587
|
-
* @
|
|
3588
|
-
* @param {?} initialValue
|
|
3589
|
-
* @param {?} sanitisedValue
|
|
4278
|
+
* @param {?} value
|
|
3590
4279
|
* @return {?}
|
|
3591
4280
|
*/
|
|
3592
|
-
|
|
3593
|
-
* @
|
|
3594
|
-
* @param {?} initialValue
|
|
3595
|
-
* @param {?} sanitisedValue
|
|
4281
|
+
StringType.prototype.parse = /**
|
|
4282
|
+
* @param {?} value
|
|
3596
4283
|
* @return {?}
|
|
3597
4284
|
*/
|
|
3598
|
-
function (
|
|
3599
|
-
return
|
|
4285
|
+
function (value) {
|
|
4286
|
+
return value;
|
|
3600
4287
|
};
|
|
4288
|
+
return StringType;
|
|
4289
|
+
}());
|
|
4290
|
+
var NumberType = /** @class */ (function () {
|
|
4291
|
+
function NumberType() {
|
|
4292
|
+
}
|
|
3601
4293
|
/**
|
|
3602
|
-
* @param {?}
|
|
4294
|
+
* @param {?} value
|
|
3603
4295
|
* @return {?}
|
|
3604
4296
|
*/
|
|
3605
|
-
|
|
3606
|
-
* @param {?}
|
|
4297
|
+
NumberType.prototype.format = /**
|
|
4298
|
+
* @param {?} value
|
|
3607
4299
|
* @return {?}
|
|
3608
4300
|
*/
|
|
3609
|
-
function (
|
|
3610
|
-
|
|
4301
|
+
function (value) {
|
|
4302
|
+
return "" + value;
|
|
3611
4303
|
};
|
|
3612
|
-
return Value;
|
|
3613
|
-
}(Sanitiser));
|
|
3614
|
-
Sanitiser.Value = Value;
|
|
3615
|
-
/**
|
|
3616
|
-
* @template T
|
|
3617
|
-
*/
|
|
3618
|
-
var /**
|
|
3619
|
-
* @template T
|
|
3620
|
-
*/
|
|
3621
|
-
Array = /** @class */ (function (_super) {
|
|
3622
|
-
__extends(Array, _super);
|
|
3623
|
-
function Array() {
|
|
3624
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3625
|
-
}
|
|
3626
4304
|
/**
|
|
3627
|
-
* @param {?}
|
|
4305
|
+
* @param {?} value
|
|
3628
4306
|
* @return {?}
|
|
3629
4307
|
*/
|
|
3630
|
-
|
|
3631
|
-
* @param {?}
|
|
4308
|
+
NumberType.prototype.parse = /**
|
|
4309
|
+
* @param {?} value
|
|
3632
4310
|
* @return {?}
|
|
3633
4311
|
*/
|
|
3634
|
-
function (
|
|
3635
|
-
|
|
3636
|
-
/** @type {?} */
|
|
3637
|
-
var rawValues = snapshot.queryParamMap.getAll(this.parameterDef.name);
|
|
3638
|
-
return rawValues.map((/**
|
|
3639
|
-
* @param {?} value
|
|
3640
|
-
* @return {?}
|
|
3641
|
-
*/
|
|
3642
|
-
function (value) { return _this.parameterDef.type.parse(value); }));
|
|
4312
|
+
function (value) {
|
|
4313
|
+
return lodash.isNil(value) || lodash.isEmpty(value) ? null : +value;
|
|
3643
4314
|
};
|
|
4315
|
+
return NumberType;
|
|
4316
|
+
}());
|
|
4317
|
+
var BooleanType = /** @class */ (function () {
|
|
4318
|
+
function BooleanType() {
|
|
4319
|
+
}
|
|
3644
4320
|
/**
|
|
3645
|
-
* @
|
|
3646
|
-
* @param {?} initialValue
|
|
3647
|
-
* @param {?} sanitisedValue
|
|
4321
|
+
* @param {?} value
|
|
3648
4322
|
* @return {?}
|
|
3649
4323
|
*/
|
|
3650
|
-
|
|
3651
|
-
* @
|
|
3652
|
-
* @param {?} initialValue
|
|
3653
|
-
* @param {?} sanitisedValue
|
|
4324
|
+
BooleanType.prototype.format = /**
|
|
4325
|
+
* @param {?} value
|
|
3654
4326
|
* @return {?}
|
|
3655
4327
|
*/
|
|
3656
|
-
function (
|
|
3657
|
-
return
|
|
4328
|
+
function (value) {
|
|
4329
|
+
return value ? 'true' : 'false';
|
|
3658
4330
|
};
|
|
3659
4331
|
/**
|
|
3660
|
-
* @param {?}
|
|
4332
|
+
* @param {?} value
|
|
4333
|
+
* @return {?}
|
|
4334
|
+
*/
|
|
4335
|
+
BooleanType.prototype.parse = /**
|
|
4336
|
+
* @param {?} value
|
|
4337
|
+
* @return {?}
|
|
4338
|
+
*/
|
|
4339
|
+
function (value) {
|
|
4340
|
+
return value === 'true';
|
|
4341
|
+
};
|
|
4342
|
+
return BooleanType;
|
|
4343
|
+
}());
|
|
4344
|
+
ParameterType.STRING = new StringType();
|
|
4345
|
+
ParameterType.NUMBER = new NumberType();
|
|
4346
|
+
ParameterType.BOOLEAN = new BooleanType();
|
|
4347
|
+
})(exports.ParameterType || (exports.ParameterType = {}));
|
|
4348
|
+
|
|
4349
|
+
/**
|
|
4350
|
+
* @fileoverview added by tsickle
|
|
4351
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4352
|
+
*/
|
|
4353
|
+
/**
|
|
4354
|
+
* @template T, S
|
|
4355
|
+
*/
|
|
4356
|
+
/**
|
|
4357
|
+
* @template T, S
|
|
4358
|
+
*/
|
|
4359
|
+
exports.Sanitiser = /** @class */ (function () {
|
|
4360
|
+
function Sanitiser(parameterDef, snapshot, sanitiser) {
|
|
4361
|
+
this.parameterDef = parameterDef;
|
|
4362
|
+
this.snapshot = snapshot;
|
|
4363
|
+
this.sanitiser = sanitiser;
|
|
4364
|
+
}
|
|
4365
|
+
/**
|
|
4366
|
+
* @return {?}
|
|
4367
|
+
*/
|
|
4368
|
+
Sanitiser.prototype.isRouteId = /**
|
|
4369
|
+
* @return {?}
|
|
4370
|
+
*/
|
|
4371
|
+
function () {
|
|
4372
|
+
return this.parameterDef.isRouteId;
|
|
4373
|
+
};
|
|
4374
|
+
Object.defineProperty(Sanitiser.prototype, "valueChanged", {
|
|
4375
|
+
get: /**
|
|
4376
|
+
* @return {?}
|
|
4377
|
+
*/
|
|
4378
|
+
function () {
|
|
4379
|
+
return !lodash.isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
|
|
4380
|
+
},
|
|
4381
|
+
enumerable: true,
|
|
4382
|
+
configurable: true
|
|
4383
|
+
});
|
|
4384
|
+
Object.defineProperty(Sanitiser.prototype, "sanitisedValue", {
|
|
4385
|
+
get: /**
|
|
4386
|
+
* @return {?}
|
|
4387
|
+
*/
|
|
4388
|
+
function () {
|
|
4389
|
+
return this._sanitisedValue;
|
|
4390
|
+
},
|
|
4391
|
+
enumerable: true,
|
|
4392
|
+
configurable: true
|
|
4393
|
+
});
|
|
4394
|
+
/**
|
|
4395
|
+
* @protected
|
|
4396
|
+
* @param {?} snapshot
|
|
4397
|
+
* @return {?}
|
|
4398
|
+
*/
|
|
4399
|
+
Sanitiser.prototype.readFrom = /**
|
|
4400
|
+
* @protected
|
|
4401
|
+
* @param {?} snapshot
|
|
4402
|
+
* @return {?}
|
|
4403
|
+
*/
|
|
4404
|
+
function (snapshot) {
|
|
4405
|
+
return pectin.lang.abstractMethod(this.constructor);
|
|
4406
|
+
};
|
|
4407
|
+
/**
|
|
4408
|
+
* @protected
|
|
4409
|
+
* @param {?} initialValue
|
|
4410
|
+
* @param {?} sanitisedValue
|
|
4411
|
+
* @return {?}
|
|
4412
|
+
*/
|
|
4413
|
+
Sanitiser.prototype.hasChanged = /**
|
|
4414
|
+
* @protected
|
|
4415
|
+
* @param {?} initialValue
|
|
4416
|
+
* @param {?} sanitisedValue
|
|
4417
|
+
* @return {?}
|
|
4418
|
+
*/
|
|
4419
|
+
function (initialValue, sanitisedValue) {
|
|
4420
|
+
return pectin.lang.abstractMethod(this.constructor);
|
|
4421
|
+
};
|
|
4422
|
+
/**
|
|
4423
|
+
* @param {?} dest
|
|
4424
|
+
* @return {?}
|
|
4425
|
+
*/
|
|
4426
|
+
Sanitiser.prototype.injectRouteParam = /**
|
|
4427
|
+
* @param {?} dest
|
|
4428
|
+
* @return {?}
|
|
4429
|
+
*/
|
|
4430
|
+
function (dest) {
|
|
4431
|
+
pectin.lang.abstractMethod(this.constructor);
|
|
4432
|
+
};
|
|
4433
|
+
/**
|
|
4434
|
+
* @return {?}
|
|
4435
|
+
*/
|
|
4436
|
+
Sanitiser.prototype.sanitize = /**
|
|
4437
|
+
* @return {?}
|
|
4438
|
+
*/
|
|
4439
|
+
function () {
|
|
4440
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4441
|
+
var _a;
|
|
4442
|
+
return __generator(this, function (_b) {
|
|
4443
|
+
switch (_b.label) {
|
|
4444
|
+
case 0:
|
|
4445
|
+
if (!this.sanitiser) return [3 /*break*/, 2];
|
|
4446
|
+
this.initialValue = this.readFrom(this.snapshot);
|
|
4447
|
+
_a = this;
|
|
4448
|
+
return [4 /*yield*/, this.sanitiser.sanitise(this.initialValue)];
|
|
4449
|
+
case 1:
|
|
4450
|
+
_a._sanitisedValue = _b.sent();
|
|
4451
|
+
if (this.initialValue !== this._sanitisedValue) {
|
|
4452
|
+
return [2 /*return*/, false];
|
|
4453
|
+
}
|
|
4454
|
+
_b.label = 2;
|
|
4455
|
+
case 2: return [2 /*return*/, true];
|
|
4456
|
+
}
|
|
4457
|
+
});
|
|
4458
|
+
});
|
|
4459
|
+
};
|
|
4460
|
+
return Sanitiser;
|
|
4461
|
+
}());
|
|
4462
|
+
if (false) {
|
|
4463
|
+
/**
|
|
4464
|
+
* @type {?}
|
|
4465
|
+
* @private
|
|
4466
|
+
*/
|
|
4467
|
+
exports.Sanitiser.prototype.initialValue;
|
|
4468
|
+
/**
|
|
4469
|
+
* @type {?}
|
|
4470
|
+
* @private
|
|
4471
|
+
*/
|
|
4472
|
+
exports.Sanitiser.prototype._sanitisedValue;
|
|
4473
|
+
/** @type {?} */
|
|
4474
|
+
exports.Sanitiser.prototype.parameterDef;
|
|
4475
|
+
/** @type {?} */
|
|
4476
|
+
exports.Sanitiser.prototype.snapshot;
|
|
4477
|
+
/** @type {?} */
|
|
4478
|
+
exports.Sanitiser.prototype.sanitiser;
|
|
4479
|
+
}
|
|
4480
|
+
var RouteParameterSanitiser = /** @class */ (function () {
|
|
4481
|
+
function RouteParameterSanitiser(parameterDefs, snapshot, placeService, injector) {
|
|
4482
|
+
var _this = this;
|
|
4483
|
+
this.parameterDefs = parameterDefs;
|
|
4484
|
+
this.snapshot = snapshot;
|
|
4485
|
+
this.placeService = placeService;
|
|
4486
|
+
this.injector = injector;
|
|
4487
|
+
this.parameterSanitisers = [];
|
|
4488
|
+
/** @type {?} */
|
|
4489
|
+
var sanitisers = parameterDefs.map((/**
|
|
4490
|
+
* @param {?} def
|
|
3661
4491
|
* @return {?}
|
|
3662
4492
|
*/
|
|
3663
|
-
|
|
3664
|
-
|
|
4493
|
+
function (def) {
|
|
4494
|
+
return def.isArray ?
|
|
4495
|
+
new exports.Sanitiser.Array(def, snapshot, _this.getSanitiser(def)) :
|
|
4496
|
+
new exports.Sanitiser.Value(def, snapshot, _this.getSanitiser(def));
|
|
4497
|
+
}));
|
|
4498
|
+
this.routeIdSanitiser = sanitisers.find((/**
|
|
4499
|
+
* @param {?} p
|
|
3665
4500
|
* @return {?}
|
|
3666
4501
|
*/
|
|
3667
|
-
function (
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
function (v) { return _this.parameterDef.type.format(v); }));
|
|
3674
|
-
};
|
|
3675
|
-
return Array;
|
|
3676
|
-
}(Sanitiser));
|
|
3677
|
-
Sanitiser.Array = Array;
|
|
3678
|
-
})(exports.Sanitiser || (exports.Sanitiser = {}));
|
|
3679
|
-
|
|
3680
|
-
/**
|
|
3681
|
-
* @fileoverview added by tsickle
|
|
3682
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3683
|
-
*/
|
|
3684
|
-
var PlaceRouteGuard = /** @class */ (function () {
|
|
3685
|
-
function PlaceRouteGuard(router, injector) {
|
|
3686
|
-
this.router = router;
|
|
3687
|
-
this.injector = injector;
|
|
4502
|
+
function (p) { return p.isRouteId(); }));
|
|
4503
|
+
this.parameterSanitisers = sanitisers.filter((/**
|
|
4504
|
+
* @param {?} p
|
|
4505
|
+
* @return {?}
|
|
4506
|
+
*/
|
|
4507
|
+
function (p) { return !p.isRouteId(); }));
|
|
3688
4508
|
}
|
|
3689
4509
|
/**
|
|
3690
|
-
* @param {?} route
|
|
3691
|
-
* @param {?} state
|
|
3692
4510
|
* @return {?}
|
|
3693
4511
|
*/
|
|
3694
|
-
|
|
3695
|
-
* @param {?} route
|
|
3696
|
-
* @param {?} state
|
|
4512
|
+
RouteParameterSanitiser.prototype.sanitise = /**
|
|
3697
4513
|
* @return {?}
|
|
3698
4514
|
*/
|
|
3699
|
-
function (
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
4515
|
+
function () {
|
|
4516
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4517
|
+
var e_1, _a, _b, _c, sanitiser, e_1_1;
|
|
4518
|
+
return __generator(this, function (_d) {
|
|
4519
|
+
switch (_d.label) {
|
|
4520
|
+
case 0:
|
|
4521
|
+
if (!this.routeIdSanitiser) return [3 /*break*/, 2];
|
|
4522
|
+
return [4 /*yield*/, this.routeIdSanitiser.sanitize()];
|
|
4523
|
+
case 1:
|
|
4524
|
+
_d.sent();
|
|
4525
|
+
if (this.routeIdSanitiser.valueChanged) {
|
|
4526
|
+
// if the route id isn't ok we redirect immediately as the query params may need to be sanitised in the
|
|
4527
|
+
// context of the route id.
|
|
4528
|
+
return [2 /*return*/, false];
|
|
4529
|
+
}
|
|
4530
|
+
_d.label = 2;
|
|
4531
|
+
case 2:
|
|
4532
|
+
_d.trys.push([2, 7, 8, 9]);
|
|
4533
|
+
_b = __values(this.parameterSanitisers), _c = _b.next();
|
|
4534
|
+
_d.label = 3;
|
|
4535
|
+
case 3:
|
|
4536
|
+
if (!!_c.done) return [3 /*break*/, 6];
|
|
4537
|
+
sanitiser = _c.value;
|
|
4538
|
+
return [4 /*yield*/, sanitiser.sanitize()];
|
|
4539
|
+
case 4:
|
|
4540
|
+
_d.sent();
|
|
4541
|
+
_d.label = 5;
|
|
4542
|
+
case 5:
|
|
4543
|
+
_c = _b.next();
|
|
4544
|
+
return [3 /*break*/, 3];
|
|
4545
|
+
case 6: return [3 /*break*/, 9];
|
|
4546
|
+
case 7:
|
|
4547
|
+
e_1_1 = _d.sent();
|
|
4548
|
+
e_1 = { error: e_1_1 };
|
|
4549
|
+
return [3 /*break*/, 9];
|
|
4550
|
+
case 8:
|
|
4551
|
+
try {
|
|
4552
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4553
|
+
}
|
|
4554
|
+
finally { if (e_1) throw e_1.error; }
|
|
4555
|
+
return [7 /*endfinally*/];
|
|
4556
|
+
case 9: return [2 /*return*/, !this.parameterSanitisers.find((/**
|
|
4557
|
+
* @param {?} s
|
|
4558
|
+
* @return {?}
|
|
4559
|
+
*/
|
|
4560
|
+
function (s) { return s.valueChanged; }))];
|
|
4561
|
+
}
|
|
4562
|
+
});
|
|
4563
|
+
});
|
|
3715
4564
|
};
|
|
3716
|
-
PlaceRouteGuard.decorators = [
|
|
3717
|
-
{ type: core.Injectable, args: [{
|
|
3718
|
-
providedIn: 'root'
|
|
3719
|
-
},] }
|
|
3720
|
-
];
|
|
3721
|
-
/** @nocollapse */
|
|
3722
|
-
PlaceRouteGuard.ctorParameters = function () { return [
|
|
3723
|
-
{ type: router.Router },
|
|
3724
|
-
{ type: core.Injector }
|
|
3725
|
-
]; };
|
|
3726
|
-
/** @nocollapse */ PlaceRouteGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(core.ɵɵinject(router.Router), core.ɵɵinject(core.INJECTOR)); }, token: PlaceRouteGuard, providedIn: "root" });
|
|
3727
|
-
__decorate([
|
|
3728
|
-
pectin.Trace(),
|
|
3729
|
-
__metadata("design:type", Function),
|
|
3730
|
-
__metadata("design:paramtypes", [router.ActivatedRouteSnapshot, router.RouterStateSnapshot]),
|
|
3731
|
-
__metadata("design:returntype", Object)
|
|
3732
|
-
], PlaceRouteGuard.prototype, "canActivate", null);
|
|
3733
|
-
return PlaceRouteGuard;
|
|
3734
|
-
}());
|
|
3735
|
-
if (false) {
|
|
3736
4565
|
/**
|
|
3737
|
-
* @type {?}
|
|
3738
4566
|
* @private
|
|
4567
|
+
* @template T, S
|
|
4568
|
+
* @param {?} def
|
|
4569
|
+
* @return {?}
|
|
3739
4570
|
*/
|
|
3740
|
-
|
|
3741
|
-
/**
|
|
3742
|
-
* @type {?}
|
|
4571
|
+
RouteParameterSanitiser.prototype.getSanitiser = /**
|
|
3743
4572
|
* @private
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
}
|
|
3747
|
-
|
|
3748
|
-
/**
|
|
3749
|
-
* @fileoverview added by tsickle
|
|
3750
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3751
|
-
*/
|
|
3752
|
-
/**
|
|
3753
|
-
* @record
|
|
3754
|
-
*/
|
|
3755
|
-
function JsonArray() { }
|
|
3756
|
-
/**
|
|
3757
|
-
* @record
|
|
3758
|
-
*/
|
|
3759
|
-
function JsonMap() { }
|
|
3760
|
-
|
|
3761
|
-
/**
|
|
3762
|
-
* @fileoverview added by tsickle
|
|
3763
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3764
|
-
*/
|
|
3765
|
-
/**
|
|
3766
|
-
* @record
|
|
3767
|
-
* @template T
|
|
3768
|
-
*/
|
|
3769
|
-
function ParameterOptions() { }
|
|
3770
|
-
if (false) {
|
|
3771
|
-
/** @type {?|undefined} */
|
|
3772
|
-
ParameterOptions.prototype.as;
|
|
3773
|
-
/** @type {?|undefined} */
|
|
3774
|
-
ParameterOptions.prototype.optional;
|
|
3775
|
-
/** @type {?|undefined} */
|
|
3776
|
-
ParameterOptions.prototype.sanitiser;
|
|
3777
|
-
}
|
|
3778
|
-
/**
|
|
3779
|
-
* @record
|
|
3780
|
-
* @template T
|
|
3781
|
-
*/
|
|
3782
|
-
function ListParameterOptions() { }
|
|
3783
|
-
if (false) {
|
|
3784
|
-
/** @type {?|undefined} */
|
|
3785
|
-
ListParameterOptions.prototype.as;
|
|
3786
|
-
/** @type {?|undefined} */
|
|
3787
|
-
ListParameterOptions.prototype.optional;
|
|
3788
|
-
/** @type {?|undefined} */
|
|
3789
|
-
ListParameterOptions.prototype.listSanitiser;
|
|
3790
|
-
}
|
|
3791
|
-
/**
|
|
3792
|
-
* @template T
|
|
3793
|
-
* @param {?} type
|
|
3794
|
-
* @param {?=} options
|
|
3795
|
-
* @return {?}
|
|
3796
|
-
*/
|
|
3797
|
-
function RouteId(type, options) {
|
|
3798
|
-
// assert.isTruthy(type.isValid());
|
|
3799
|
-
return (/**
|
|
3800
|
-
* @param {?} prototype
|
|
3801
|
-
* @param {?} propertyKey
|
|
4573
|
+
* @template T, S
|
|
4574
|
+
* @param {?} def
|
|
3802
4575
|
* @return {?}
|
|
3803
4576
|
*/
|
|
3804
|
-
function (
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
// assert.isTruthy(type.isValid());
|
|
3819
|
-
return (/**
|
|
3820
|
-
* @param {?} prototype
|
|
3821
|
-
* @param {?} propertyKey
|
|
4577
|
+
function (def) {
|
|
4578
|
+
if (def.sanitiser) {
|
|
4579
|
+
if (this.isSanitiserContructor(def.sanitiser)) {
|
|
4580
|
+
return this.injector.get(def.sanitiser, new def.sanitiser());
|
|
4581
|
+
}
|
|
4582
|
+
else {
|
|
4583
|
+
return new DefaultParameterSanitiser(def, this.placeService, def.sanitiser);
|
|
4584
|
+
}
|
|
4585
|
+
}
|
|
4586
|
+
else {
|
|
4587
|
+
return null;
|
|
4588
|
+
}
|
|
4589
|
+
};
|
|
4590
|
+
/**
|
|
3822
4591
|
* @return {?}
|
|
3823
4592
|
*/
|
|
3824
|
-
|
|
3825
|
-
/** @type {?} */
|
|
3826
|
-
var param = createDefinition(propertyKey, type, options, false);
|
|
3827
|
-
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
|
|
3828
|
-
pectin.UseDelegate()(prototype, propertyKey);
|
|
3829
|
-
});
|
|
3830
|
-
}
|
|
3831
|
-
/**
|
|
3832
|
-
* @template E
|
|
3833
|
-
* @param {?} elementType
|
|
3834
|
-
* @param {?=} options
|
|
3835
|
-
* @return {?}
|
|
3836
|
-
*/
|
|
3837
|
-
function RouteParameterList(elementType, options) {
|
|
3838
|
-
// assert.isTruthy(type.isValid());
|
|
3839
|
-
return (/**
|
|
3840
|
-
* @param {?} prototype
|
|
3841
|
-
* @param {?} propertyKey
|
|
4593
|
+
RouteParameterSanitiser.prototype.routeIdHasChanged = /**
|
|
3842
4594
|
* @return {?}
|
|
3843
4595
|
*/
|
|
3844
|
-
function (
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
type: pectin.assert.notNil(type),
|
|
3869
|
-
sanitiser: opts.getOptional('sanitiser', null),
|
|
3870
|
-
isRouteId: routeId,
|
|
3871
|
-
isArray: false
|
|
4596
|
+
function () {
|
|
4597
|
+
pectin.assert.isTruthy(this.parameterSanitisers.length !== 0);
|
|
4598
|
+
return this.routeIdSanitiser && this.routeIdSanitiser.valueChanged;
|
|
4599
|
+
};
|
|
4600
|
+
/**
|
|
4601
|
+
* @return {?}
|
|
4602
|
+
*/
|
|
4603
|
+
RouteParameterSanitiser.prototype.getRedirectParams = /**
|
|
4604
|
+
* @return {?}
|
|
4605
|
+
*/
|
|
4606
|
+
function () {
|
|
4607
|
+
if (this.routeIdHasChanged()) {
|
|
4608
|
+
return [this.routeIdSanitiser.sanitisedValue];
|
|
4609
|
+
}
|
|
4610
|
+
else {
|
|
4611
|
+
/** @type {?} */
|
|
4612
|
+
var routeParams_1 = {};
|
|
4613
|
+
this.parameterSanitisers.forEach((/**
|
|
4614
|
+
* @param {?} s
|
|
4615
|
+
* @return {?}
|
|
4616
|
+
*/
|
|
4617
|
+
function (s) { return s.injectRouteParam(routeParams_1); }));
|
|
4618
|
+
return [routeParams_1];
|
|
4619
|
+
}
|
|
3872
4620
|
};
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
/** @type {?} */
|
|
3888
|
-
var def = {
|
|
3889
|
-
name: opts.getOptional('as', propertyNameAsString),
|
|
3890
|
-
propertyName: propertyNameAsString,
|
|
3891
|
-
type: pectin.assert.notNil(type),
|
|
3892
|
-
sanitiser: opts.getOptional('listSanitiser', null),
|
|
3893
|
-
isRouteId: false,
|
|
3894
|
-
isArray: true
|
|
4621
|
+
/**
|
|
4622
|
+
* @private
|
|
4623
|
+
* @template S
|
|
4624
|
+
* @param {?} value
|
|
4625
|
+
* @return {?}
|
|
4626
|
+
*/
|
|
4627
|
+
RouteParameterSanitiser.prototype.isSanitiserContructor = /**
|
|
4628
|
+
* @private
|
|
4629
|
+
* @template S
|
|
4630
|
+
* @param {?} value
|
|
4631
|
+
* @return {?}
|
|
4632
|
+
*/
|
|
4633
|
+
function (value) {
|
|
4634
|
+
return lodash.isFunction(value) && pectin.lang.constructorChain((/** @type {?} */ ((/** @type {?} */ (value))))).includes(exports.Sanitiser);
|
|
3895
4635
|
};
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
4636
|
+
__decorate([
|
|
4637
|
+
src.Memoize(),
|
|
4638
|
+
__metadata("design:type", Function),
|
|
4639
|
+
__metadata("design:paramtypes", [Object]),
|
|
4640
|
+
__metadata("design:returntype", Object)
|
|
4641
|
+
], RouteParameterSanitiser.prototype, "getSanitiser", null);
|
|
4642
|
+
__decorate([
|
|
4643
|
+
pectin.Trace(),
|
|
4644
|
+
__metadata("design:type", Function),
|
|
4645
|
+
__metadata("design:paramtypes", []),
|
|
4646
|
+
__metadata("design:returntype", Array)
|
|
4647
|
+
], RouteParameterSanitiser.prototype, "getRedirectParams", null);
|
|
4648
|
+
return RouteParameterSanitiser;
|
|
4649
|
+
}());
|
|
3908
4650
|
if (false) {
|
|
4651
|
+
/**
|
|
4652
|
+
* @type {?}
|
|
4653
|
+
* @private
|
|
4654
|
+
*/
|
|
4655
|
+
RouteParameterSanitiser.prototype.routeIdSanitiser;
|
|
4656
|
+
/**
|
|
4657
|
+
* @type {?}
|
|
4658
|
+
* @private
|
|
4659
|
+
*/
|
|
4660
|
+
RouteParameterSanitiser.prototype.parameterSanitisers;
|
|
3909
4661
|
/** @type {?} */
|
|
3910
|
-
|
|
3911
|
-
/** @type {?} */
|
|
3912
|
-
ParameterDefinition.prototype.propertyName;
|
|
3913
|
-
/** @type {?} */
|
|
3914
|
-
ParameterDefinition.prototype.type;
|
|
4662
|
+
RouteParameterSanitiser.prototype.parameterDefs;
|
|
3915
4663
|
/** @type {?} */
|
|
3916
|
-
|
|
4664
|
+
RouteParameterSanitiser.prototype.snapshot;
|
|
3917
4665
|
/** @type {?} */
|
|
3918
|
-
|
|
4666
|
+
RouteParameterSanitiser.prototype.placeService;
|
|
3919
4667
|
/** @type {?} */
|
|
3920
|
-
|
|
4668
|
+
RouteParameterSanitiser.prototype.injector;
|
|
3921
4669
|
}
|
|
3922
|
-
|
|
3923
|
-
/**
|
|
3924
|
-
* @fileoverview added by tsickle
|
|
3925
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3926
|
-
*/
|
|
3927
|
-
/**
|
|
3928
|
-
* @record
|
|
3929
|
-
* @template T
|
|
3930
|
-
*/
|
|
3931
|
-
function ParameterSanitiser() { }
|
|
3932
|
-
if (false) {
|
|
4670
|
+
(function (Sanitiser) {
|
|
3933
4671
|
/**
|
|
3934
|
-
* @
|
|
3935
|
-
* @return {?}
|
|
4672
|
+
* @template T
|
|
3936
4673
|
*/
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
// WARNING: interface has both a type and a value, skipping emit
|
|
3945
|
-
|
|
3946
|
-
(function (ParameterType) {
|
|
3947
|
-
var StringType = /** @class */ (function () {
|
|
3948
|
-
function StringType() {
|
|
4674
|
+
var /**
|
|
4675
|
+
* @template T
|
|
4676
|
+
*/
|
|
4677
|
+
Value = /** @class */ (function (_super) {
|
|
4678
|
+
__extends(Value, _super);
|
|
4679
|
+
function Value() {
|
|
4680
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3949
4681
|
}
|
|
3950
4682
|
/**
|
|
3951
|
-
* @param {?}
|
|
4683
|
+
* @param {?} snapshot
|
|
3952
4684
|
* @return {?}
|
|
3953
4685
|
*/
|
|
3954
|
-
|
|
3955
|
-
* @param {?}
|
|
4686
|
+
Value.prototype.readFrom = /**
|
|
4687
|
+
* @param {?} snapshot
|
|
3956
4688
|
* @return {?}
|
|
3957
4689
|
*/
|
|
3958
|
-
function (
|
|
3959
|
-
|
|
4690
|
+
function (snapshot) {
|
|
4691
|
+
/** @type {?} */
|
|
4692
|
+
var rawValue = snapshot.paramMap.get(this.parameterDef.name);
|
|
4693
|
+
return this.parameterDef.type.parse(rawValue);
|
|
3960
4694
|
};
|
|
3961
4695
|
/**
|
|
3962
|
-
* @
|
|
4696
|
+
* @protected
|
|
4697
|
+
* @param {?} initialValue
|
|
4698
|
+
* @param {?} sanitisedValue
|
|
3963
4699
|
* @return {?}
|
|
3964
4700
|
*/
|
|
3965
|
-
|
|
3966
|
-
* @
|
|
4701
|
+
Value.prototype.hasChanged = /**
|
|
4702
|
+
* @protected
|
|
4703
|
+
* @param {?} initialValue
|
|
4704
|
+
* @param {?} sanitisedValue
|
|
3967
4705
|
* @return {?}
|
|
3968
4706
|
*/
|
|
3969
|
-
function (
|
|
3970
|
-
return
|
|
4707
|
+
function (initialValue, sanitisedValue) {
|
|
4708
|
+
return initialValue !== sanitisedValue;
|
|
3971
4709
|
};
|
|
3972
|
-
return StringType;
|
|
3973
|
-
}());
|
|
3974
|
-
var NumberType = /** @class */ (function () {
|
|
3975
|
-
function NumberType() {
|
|
3976
|
-
}
|
|
3977
4710
|
/**
|
|
3978
|
-
* @param {?}
|
|
4711
|
+
* @param {?} dest
|
|
3979
4712
|
* @return {?}
|
|
3980
4713
|
*/
|
|
3981
|
-
|
|
3982
|
-
* @param {?}
|
|
4714
|
+
Value.prototype.injectRouteParam = /**
|
|
4715
|
+
* @param {?} dest
|
|
3983
4716
|
* @return {?}
|
|
3984
4717
|
*/
|
|
3985
|
-
function (
|
|
3986
|
-
|
|
4718
|
+
function (dest) {
|
|
4719
|
+
dest[this.parameterDef.name] = this.parameterDef.type.format(this.sanitisedValue);
|
|
3987
4720
|
};
|
|
4721
|
+
return Value;
|
|
4722
|
+
}(Sanitiser));
|
|
4723
|
+
Sanitiser.Value = Value;
|
|
4724
|
+
/**
|
|
4725
|
+
* @template T
|
|
4726
|
+
*/
|
|
4727
|
+
var /**
|
|
4728
|
+
* @template T
|
|
4729
|
+
*/
|
|
4730
|
+
Array = /** @class */ (function (_super) {
|
|
4731
|
+
__extends(Array, _super);
|
|
4732
|
+
function Array() {
|
|
4733
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4734
|
+
}
|
|
3988
4735
|
/**
|
|
3989
|
-
* @param {?}
|
|
4736
|
+
* @param {?} snapshot
|
|
3990
4737
|
* @return {?}
|
|
3991
4738
|
*/
|
|
3992
|
-
|
|
3993
|
-
* @param {?}
|
|
4739
|
+
Array.prototype.readFrom = /**
|
|
4740
|
+
* @param {?} snapshot
|
|
3994
4741
|
* @return {?}
|
|
3995
4742
|
*/
|
|
3996
|
-
function (
|
|
3997
|
-
|
|
4743
|
+
function (snapshot) {
|
|
4744
|
+
var _this = this;
|
|
4745
|
+
/** @type {?} */
|
|
4746
|
+
var rawValues = snapshot.paramMap.getAll(this.parameterDef.name);
|
|
4747
|
+
return rawValues.map((/**
|
|
4748
|
+
* @param {?} value
|
|
4749
|
+
* @return {?}
|
|
4750
|
+
*/
|
|
4751
|
+
function (value) { return _this.parameterDef.type.parse(value); }));
|
|
3998
4752
|
};
|
|
3999
|
-
return NumberType;
|
|
4000
|
-
}());
|
|
4001
|
-
var BooleanType = /** @class */ (function () {
|
|
4002
|
-
function BooleanType() {
|
|
4003
|
-
}
|
|
4004
4753
|
/**
|
|
4005
|
-
* @
|
|
4754
|
+
* @protected
|
|
4755
|
+
* @param {?} initialValue
|
|
4756
|
+
* @param {?} sanitisedValue
|
|
4006
4757
|
* @return {?}
|
|
4007
4758
|
*/
|
|
4008
|
-
|
|
4009
|
-
* @
|
|
4759
|
+
Array.prototype.hasChanged = /**
|
|
4760
|
+
* @protected
|
|
4761
|
+
* @param {?} initialValue
|
|
4762
|
+
* @param {?} sanitisedValue
|
|
4010
4763
|
* @return {?}
|
|
4011
4764
|
*/
|
|
4012
|
-
function (
|
|
4013
|
-
return
|
|
4765
|
+
function (initialValue, sanitisedValue) {
|
|
4766
|
+
return initialValue !== sanitisedValue;
|
|
4014
4767
|
};
|
|
4015
4768
|
/**
|
|
4016
|
-
* @param {?}
|
|
4769
|
+
* @param {?} dest
|
|
4017
4770
|
* @return {?}
|
|
4018
4771
|
*/
|
|
4019
|
-
|
|
4020
|
-
* @param {?}
|
|
4772
|
+
Array.prototype.injectRouteParam = /**
|
|
4773
|
+
* @param {?} dest
|
|
4021
4774
|
* @return {?}
|
|
4022
4775
|
*/
|
|
4023
|
-
function (
|
|
4024
|
-
|
|
4776
|
+
function (dest) {
|
|
4777
|
+
var _this = this;
|
|
4778
|
+
dest[this.parameterDef.name] = this.sanitisedValue.map((/**
|
|
4779
|
+
* @param {?} v
|
|
4780
|
+
* @return {?}
|
|
4781
|
+
*/
|
|
4782
|
+
function (v) { return _this.parameterDef.type.format(v); }));
|
|
4025
4783
|
};
|
|
4026
|
-
return
|
|
4027
|
-
}());
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
ParameterType.BOOLEAN = new BooleanType();
|
|
4031
|
-
})(exports.ParameterType || (exports.ParameterType = {}));
|
|
4032
|
-
|
|
4033
|
-
/**
|
|
4034
|
-
* @fileoverview added by tsickle
|
|
4035
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4036
|
-
*/
|
|
4037
|
-
/**
|
|
4038
|
-
* @record
|
|
4039
|
-
* @template T
|
|
4040
|
-
*/
|
|
4041
|
-
function ResolvedParameter() { }
|
|
4042
|
-
if (false) {
|
|
4043
|
-
/** @type {?} */
|
|
4044
|
-
ResolvedParameter.prototype.parameterDef;
|
|
4045
|
-
/** @type {?} */
|
|
4046
|
-
ResolvedParameter.prototype.resolvedValue;
|
|
4047
|
-
}
|
|
4048
|
-
|
|
4049
|
-
/**
|
|
4050
|
-
* @fileoverview added by tsickle
|
|
4051
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4052
|
-
*/
|
|
4053
|
-
var VisitSnapshot = /** @class */ (function () {
|
|
4054
|
-
function VisitSnapshot() {
|
|
4055
|
-
}
|
|
4056
|
-
return VisitSnapshot;
|
|
4057
|
-
}());
|
|
4784
|
+
return Array;
|
|
4785
|
+
}(Sanitiser));
|
|
4786
|
+
Sanitiser.Array = Array;
|
|
4787
|
+
})(exports.Sanitiser || (exports.Sanitiser = {}));
|
|
4058
4788
|
|
|
4059
4789
|
exports.ACTIVITY_DATA = ACTIVITY_DATA;
|
|
4060
4790
|
exports.AbstractActivity = AbstractActivity;
|
|
4061
4791
|
exports.AbstractInputComponent = AbstractInputComponent;
|
|
4062
|
-
exports.
|
|
4063
|
-
exports.
|
|
4792
|
+
exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
|
|
4793
|
+
exports.ActivityContainerComponent = exports.ɵt;
|
|
4794
|
+
exports.ActivityOutletComponent = exports.ɵu;
|
|
4064
4795
|
exports.AlertDialogComponent = AlertDialogComponent;
|
|
4065
4796
|
exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
|
|
4066
4797
|
exports.BusyOverlayComponent = BusyOverlayComponent;
|
|
4067
4798
|
exports.CommandDirective = CommandDirective;
|
|
4068
4799
|
exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
|
|
4069
4800
|
exports.DEFINITION_META_DATA_KEY = DEFINITION_META_DATA_KEY;
|
|
4801
|
+
exports.DefaultParameterSanitiser = DefaultParameterSanitiser;
|
|
4070
4802
|
exports.DialogInteractionService = DialogInteractionService;
|
|
4071
4803
|
exports.Dimension = Dimension;
|
|
4072
4804
|
exports.DisposableComponent = DisposableComponent;
|
|
@@ -4077,6 +4809,7 @@
|
|
|
4077
4809
|
exports.InteractionModule = InteractionModule;
|
|
4078
4810
|
exports.LEFT_RIGHT_PLACE_ANIMATION = LEFT_RIGHT_PLACE_ANIMATION;
|
|
4079
4811
|
exports.LeavePlaceGuard = LeavePlaceGuard;
|
|
4812
|
+
exports.ListPlaceNavComponent = ListPlaceNavComponent;
|
|
4080
4813
|
exports.NumberInputComponent = NumberInputComponent;
|
|
4081
4814
|
exports.PasswordInputComponent = PasswordInputComponent;
|
|
4082
4815
|
exports.Place = Place;
|
|
@@ -4085,8 +4818,8 @@
|
|
|
4085
4818
|
exports.PlaceRouteGuard = PlaceRouteGuard;
|
|
4086
4819
|
exports.PlaceService = PlaceService;
|
|
4087
4820
|
exports.Point = Point;
|
|
4821
|
+
exports.ROUTE_PARAMETER_LIST_KEY = ROUTE_PARAMETER_LIST_KEY;
|
|
4088
4822
|
exports.ResizeAwareComponent = ResizeAwareComponent;
|
|
4089
|
-
exports.ResolvedRouteParameterSnapshot = ResolvedRouteParameterSnapshot;
|
|
4090
4823
|
exports.RouteId = RouteId;
|
|
4091
4824
|
exports.RouteParameter = RouteParameter;
|
|
4092
4825
|
exports.RouteParameterList = RouteParameterList;
|
|
@@ -4094,10 +4827,12 @@
|
|
|
4094
4827
|
exports.SelectInputComponent = SelectInputComponent;
|
|
4095
4828
|
exports.StringInputComponent = StringInputComponent;
|
|
4096
4829
|
exports.TabbedPlaceNavigationComponent = TabbedPlaceNavigationComponent;
|
|
4097
|
-
exports.
|
|
4830
|
+
exports.leftRightPlaceAnimation = leftRightPlaceAnimation;
|
|
4098
4831
|
exports.slideDownAndUpAnimation = slideDownAndUpAnimation;
|
|
4099
4832
|
exports.ɵa = CommandDirective;
|
|
4100
4833
|
exports.ɵb = FocusBindingDirective;
|
|
4834
|
+
exports.ɵbb = DialogInteractionService;
|
|
4835
|
+
exports.ɵbc = InteractionContext;
|
|
4101
4836
|
exports.ɵc = DisposableComponent;
|
|
4102
4837
|
exports.ɵd = NumberInputComponent;
|
|
4103
4838
|
exports.ɵe = AbstractInputComponent;
|
|
@@ -4108,16 +4843,17 @@
|
|
|
4108
4843
|
exports.ɵj = EmptyStateComponent;
|
|
4109
4844
|
exports.ɵk = BusyOverlayComponent;
|
|
4110
4845
|
exports.ɵl = PlaceOutletComponent;
|
|
4111
|
-
exports.ɵm =
|
|
4112
|
-
exports.ɵn =
|
|
4113
|
-
exports.ɵo =
|
|
4114
|
-
exports.ɵp =
|
|
4115
|
-
exports.ɵ
|
|
4116
|
-
exports.ɵ
|
|
4117
|
-
exports.ɵ
|
|
4118
|
-
exports.ɵ
|
|
4119
|
-
exports.ɵ
|
|
4120
|
-
exports.ɵ
|
|
4846
|
+
exports.ɵm = leftRightPlaceAnimation;
|
|
4847
|
+
exports.ɵn = LEFT_RIGHT_PLACE_ANIMATION;
|
|
4848
|
+
exports.ɵo = PlaceService;
|
|
4849
|
+
exports.ɵp = TabbedPlaceNavigationComponent;
|
|
4850
|
+
exports.ɵq = AbstractPlaceNavigationComponent;
|
|
4851
|
+
exports.ɵr = ListPlaceNavComponent;
|
|
4852
|
+
exports.ɵs = InteractionModule;
|
|
4853
|
+
exports.ɵv = ConfirmationDialogComponent;
|
|
4854
|
+
exports.ɵw = AbstractActivity;
|
|
4855
|
+
exports.ɵx = ACTIVITY_DATA;
|
|
4856
|
+
exports.ɵz = AlertDialogComponent;
|
|
4121
4857
|
|
|
4122
4858
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4123
4859
|
|