@coolon/angular-ui-powerups 0.0.88 → 0.0.90
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 +291 -201
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +2 -2
- package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +2 -2
- package/esm2015/lib/interaction/interaction-context.js +18 -2
- package/esm2015/lib/interaction/services/dialog-interaction.service.js +2 -2
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +9 -2
- package/esm2015/lib/place/place-definition.js +16 -19
- package/esm2015/lib/place/place-router.js +122 -18
- package/esm2015/lib/place/place.module.js +6 -3
- package/esm2015/lib/place/route/guards/enter-place-guard.service.js +3 -38
- package/esm2015/lib/place/visit.js +4 -11
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +2 -2
- package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +2 -2
- package/esm5/lib/interaction/interaction-context.js +29 -2
- package/esm5/lib/interaction/services/dialog-interaction.service.js +2 -2
- package/esm5/lib/place/components/abstract-place-navigation.component.js +9 -2
- package/esm5/lib/place/place-definition.js +17 -39
- package/esm5/lib/place/place-router.js +143 -16
- package/esm5/lib/place/place.module.js +6 -3
- package/esm5/lib/place/route/guards/enter-place-guard.service.js +3 -44
- package/esm5/lib/place/visit.js +4 -14
- package/fesm2015/coolon-angular-ui-powerups.js +240 -156
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +279 -188
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +1 -1
- package/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.d.ts +1 -1
- package/lib/interaction/interaction-context.d.ts +2 -1
- package/lib/interaction/services/dialog-interaction.service.d.ts +1 -1
- package/lib/place/place-definition.d.ts +0 -4
- package/lib/place/place-router.d.ts +18 -2
- package/lib/place/route/guards/enter-place-guard.service.d.ts +0 -1
- package/lib/place/visit.d.ts +0 -2
- package/package.json +1 -1
package/esm5/lib/place/visit.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
4
|
*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import { UrlSegment } from '@angular/router';
|
|
7
6
|
import * as _ from 'lodash';
|
|
8
7
|
/**
|
|
9
8
|
* @record
|
|
@@ -125,8 +124,10 @@ var Visit = /** @class */ (function () {
|
|
|
125
124
|
else {
|
|
126
125
|
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
127
126
|
// defaults and remember sanitisation process.
|
|
127
|
+
/** @type {?} */
|
|
128
|
+
var value = _this.getParameter(def.name);
|
|
128
129
|
if (_this.hasParameter(def.name)) {
|
|
129
|
-
params[def.name] =
|
|
130
|
+
params[def.name] = value;
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
}));
|
|
@@ -160,17 +161,6 @@ var Visit = /** @class */ (function () {
|
|
|
160
161
|
var sameNonRouteParameters = _.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
161
162
|
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
162
163
|
};
|
|
163
|
-
/**
|
|
164
|
-
* @return {?}
|
|
165
|
-
*/
|
|
166
|
-
Visit.prototype.getUrlSegments = /**
|
|
167
|
-
* @return {?}
|
|
168
|
-
*/
|
|
169
|
-
function () {
|
|
170
|
-
return this.placeDefinition.hasRouteId() ?
|
|
171
|
-
[new UrlSegment(this.placeDefinition.path, {}), new UrlSegment(this.placeDefinition.getFormattedRouteId(this), this.placeDefinition.getFormattedRouteParameters(this))] :
|
|
172
|
-
[new UrlSegment(this.placeDefinition.path, this.placeDefinition.getFormattedRouteParameters(this))];
|
|
173
|
-
};
|
|
174
164
|
return Visit;
|
|
175
165
|
}());
|
|
176
166
|
export { Visit };
|
|
@@ -183,4 +173,4 @@ if (false) {
|
|
|
183
173
|
*/
|
|
184
174
|
Visit.prototype.visitParameters;
|
|
185
175
|
}
|
|
186
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
176
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlzaXQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AY29vbG9uL2FuZ3VsYXItdWktcG93ZXJ1cHMvIiwic291cmNlcyI6WyJsaWIvcGxhY2UvdmlzaXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSxPQUFPLEtBQUssQ0FBQyxNQUFNLFFBQVEsQ0FBQzs7OztBQUk1QixxQkFFQztBQUdEO0lBRUUsZUFBcUIsZUFBZ0MsRUFBbUIsZUFBNEI7UUFBNUIsZ0NBQUEsRUFBQSxvQkFBNEI7UUFBL0Usb0JBQWUsR0FBZixlQUFlLENBQWlCO1FBQW1CLG9CQUFlLEdBQWYsZUFBZSxDQUFhO0lBQ3BHLENBQUM7SUFFRCxXQUFXOzs7OztJQUNYLDBCQUFVOzs7OztJQUFWO1FBQ0UsT0FBTyxJQUFJLENBQUMsZUFBZSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNuRCxDQUFDO0lBRUQsV0FBVzs7Ozs7SUFDWCwwQkFBVTs7Ozs7SUFBVjtRQUNFLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQyxDQUFDO0lBQ3JDLENBQUM7SUFFRDs7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AgY29uc3Qgc2FtZVJvdXRlUGFyYW1ldGVycyA9IF8uaXNFcXVhbChcbiAgICAgIHRoaXMucGxhY2VEZWZpbml0aW9uLmdldEZvcm1hdHRlZFJvdXRlUGFyYW1ldGVycyh0aGlzLCB0cnVlKSxcbiAgICAgIHRoaXMucGxhY2VEZWZpbml0aW9uLmdldEZvcm1hdHRlZFJvdXRlUGFyYW1ldGVycyhvdGhlciwgdHJ1ZSlcbiAgICApO1xuICAgIHJldHVybiAhc2FtZVBsYWNlIHx8ICFzYW1lUm91dGVQYXJhbWV0ZXJzO1xuICB9XG5cbiAgaGFzQ2hhbmdlZEZyb20ob3RoZXI6IFZpc2l0KSB7XG4gICAgY29uc3Qgc2FtZU5vblJvdXRlUGFyYW1ldGVycyA9IF8uaXNFcXVhbChcbiAgICAgIHRoaXMucGxhY2VEZWZpbml0aW9uLmdldE5vblJvdXRlUGFyYW1ldGVycyh0aGlzKSxcbiAgICAgIHRoaXMucGxhY2VEZWZpbml0aW9uLmdldE5vblJvdXRlUGFyYW1ldGVycyhvdGhlcilcbiAgICApO1xuICAgIHJldHVybiAhc2FtZU5vblJvdXRlUGFyYW1ldGVycyB8fCB0aGlzLmhhc1JvdXRpbmdDaGFuZ2VkRnJvbShvdGhlcik7XG4gIH1cblxufVxuIl19
|
|
@@ -4,10 +4,10 @@ import { FormsModule } from '@angular/forms';
|
|
|
4
4
|
import { MatInputModule, MatFormFieldModule, MatSelectModule, MatDialog, MatButtonModule, MatDialogModule, MatTabsModule as MatTabsModule$1, MatProgressSpinnerModule } from '@angular/material';
|
|
5
5
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
|
-
import { GarbageCollector, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingValueModel, MutableStream, MutableListModel, DelegatingListModel,
|
|
7
|
+
import { GarbageCollector, assert, UnaryCommand, lang, Dsl, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingValueModel, MutableStream, MutableListModel, DelegatingListModel, Binding, MutableValueModel, Trace, Guard as Guard$1, Command, StoreInValueModel, OptionsHelper, ValueHolder } from '@coolon/pectin';
|
|
8
8
|
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
9
9
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
|
-
import { Router, RouterModule,
|
|
10
|
+
import { Router, RouterModule, NavigationStart, NavigationEnd, NavigationError, UrlSerializer, UrlSegment, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
11
11
|
import ___default, { last, isNil, isEqual } from 'lodash';
|
|
12
12
|
import { assert as assert$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
13
13
|
import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialog as MatDialog$1 } from '@angular/material/dialog';
|
|
@@ -750,6 +750,21 @@ class InteractionContext extends GarbageCollector {
|
|
|
750
750
|
get currentActivity() {
|
|
751
751
|
return last(this.activityList.value);
|
|
752
752
|
}
|
|
753
|
+
/**
|
|
754
|
+
* @param {?} confirm
|
|
755
|
+
* @return {?}
|
|
756
|
+
*/
|
|
757
|
+
confirm(confirm) {
|
|
758
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
759
|
+
try {
|
|
760
|
+
yield this.confirmOrReject(confirm);
|
|
761
|
+
return true;
|
|
762
|
+
}
|
|
763
|
+
catch (_a) {
|
|
764
|
+
return false;
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
}
|
|
753
768
|
}
|
|
754
769
|
if (false) {
|
|
755
770
|
/**
|
|
@@ -777,7 +792,7 @@ if (false) {
|
|
|
777
792
|
* @param {?} confirm
|
|
778
793
|
* @return {?}
|
|
779
794
|
*/
|
|
780
|
-
InteractionContext.prototype.
|
|
795
|
+
InteractionContext.prototype.confirmOrReject = function (confirm) { };
|
|
781
796
|
/**
|
|
782
797
|
* Presents the confirmation to the user and runs the activity only if the user confirms.
|
|
783
798
|
* @abstract
|
|
@@ -1422,7 +1437,7 @@ class ActivityContainerComponent extends InteractionContext {
|
|
|
1422
1437
|
* @param {?} confirm
|
|
1423
1438
|
* @return {?}
|
|
1424
1439
|
*/
|
|
1425
|
-
|
|
1440
|
+
confirmOrReject(confirm) {
|
|
1426
1441
|
return this.startActivity(ConfirmationDialogComponent, confirm);
|
|
1427
1442
|
}
|
|
1428
1443
|
/**
|
|
@@ -1607,7 +1622,7 @@ class InplaceInteractionContextComponent extends InteractionContext {
|
|
|
1607
1622
|
* @param {?} confirm
|
|
1608
1623
|
* @return {?}
|
|
1609
1624
|
*/
|
|
1610
|
-
|
|
1625
|
+
confirmOrReject(confirm) {
|
|
1611
1626
|
return this._startActivity(ConfirmationDialogComponent, confirm);
|
|
1612
1627
|
}
|
|
1613
1628
|
/**
|
|
@@ -1903,7 +1918,7 @@ class DialogInteractionService extends InteractionContext {
|
|
|
1903
1918
|
* @param {?} confirm
|
|
1904
1919
|
* @return {?}
|
|
1905
1920
|
*/
|
|
1906
|
-
|
|
1921
|
+
confirmOrReject(confirm) {
|
|
1907
1922
|
return this._startActivity(ConfirmationDialogComponent, confirm, true);
|
|
1908
1923
|
}
|
|
1909
1924
|
/**
|
|
@@ -2006,74 +2021,6 @@ InteractionModule.decorators = [
|
|
|
2006
2021
|
},] }
|
|
2007
2022
|
];
|
|
2008
2023
|
|
|
2009
|
-
/**
|
|
2010
|
-
* @fileoverview added by tsickle
|
|
2011
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2012
|
-
*/
|
|
2013
|
-
class BusyOverlayComponent {
|
|
2014
|
-
constructor() {
|
|
2015
|
-
}
|
|
2016
|
-
/**
|
|
2017
|
-
* @return {?}
|
|
2018
|
-
*/
|
|
2019
|
-
ngOnInit() {
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
2022
|
-
BusyOverlayComponent.decorators = [
|
|
2023
|
-
{ type: Component, args: [{
|
|
2024
|
-
selector: 'aup-busy-overlay',
|
|
2025
|
-
template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
|
|
2026
|
-
styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
|
|
2027
|
-
}] }
|
|
2028
|
-
];
|
|
2029
|
-
/** @nocollapse */
|
|
2030
|
-
BusyOverlayComponent.ctorParameters = () => [];
|
|
2031
|
-
BusyOverlayComponent.propDecorators = {
|
|
2032
|
-
busyModel: [{ type: Input }],
|
|
2033
|
-
busy: [{ type: Input }]
|
|
2034
|
-
};
|
|
2035
|
-
__decorate([
|
|
2036
|
-
UseDelegate(),
|
|
2037
|
-
__metadata("design:type", ValueModel)
|
|
2038
|
-
], BusyOverlayComponent.prototype, "busyModel", void 0);
|
|
2039
|
-
__decorate([
|
|
2040
|
-
StoreInValueModel('busyModel'),
|
|
2041
|
-
__metadata("design:type", Boolean)
|
|
2042
|
-
], BusyOverlayComponent.prototype, "busy", void 0);
|
|
2043
|
-
if (false) {
|
|
2044
|
-
/** @type {?} */
|
|
2045
|
-
BusyOverlayComponent.prototype.busyModel;
|
|
2046
|
-
/** @type {?} */
|
|
2047
|
-
BusyOverlayComponent.prototype.busy;
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
/**
|
|
2051
|
-
* @fileoverview added by tsickle
|
|
2052
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2053
|
-
*/
|
|
2054
|
-
class EmptyStateComponent {
|
|
2055
|
-
constructor() {
|
|
2056
|
-
}
|
|
2057
|
-
/**
|
|
2058
|
-
* @return {?}
|
|
2059
|
-
*/
|
|
2060
|
-
ngOnInit() {
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
EmptyStateComponent.decorators = [
|
|
2064
|
-
{ type: Component, args: [{
|
|
2065
|
-
selector: 'aup-empty-state',
|
|
2066
|
-
template: `
|
|
2067
|
-
<div class="container">
|
|
2068
|
-
<ng-content></ng-content>
|
|
2069
|
-
</div>
|
|
2070
|
-
`,
|
|
2071
|
-
styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
|
|
2072
|
-
}] }
|
|
2073
|
-
];
|
|
2074
|
-
/** @nocollapse */
|
|
2075
|
-
EmptyStateComponent.ctorParameters = () => [];
|
|
2076
|
-
|
|
2077
2024
|
/**
|
|
2078
2025
|
* @fileoverview added by tsickle
|
|
2079
2026
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -2411,20 +2358,15 @@ class PlaceDefinition {
|
|
|
2411
2358
|
return routeIdParameterDef ? visit.getParameter(routeIdParameterDef.name) : null;
|
|
2412
2359
|
}
|
|
2413
2360
|
/**
|
|
2414
|
-
* Returns angular router commands that specify the route id and any route parameters. The result does
|
|
2415
|
-
* not include any path information.
|
|
2416
2361
|
* @param {?} visit
|
|
2417
2362
|
* @return {?}
|
|
2418
2363
|
*/
|
|
2419
|
-
// getFormattedRouterCommands(visit: Visit): any[] {
|
|
2420
|
-
// return this.hasRouteId() ?
|
|
2421
|
-
// [this.getFormattedRouteId(visit), this.getFormattedRouteParameters(visit)] :
|
|
2422
|
-
// [this.getFormattedRouteParameters(visit)];
|
|
2423
|
-
// }
|
|
2424
2364
|
getFormattedRouteId(visit) {
|
|
2425
|
-
|
|
2365
|
+
// Note: RouteIds are always present in the url and are just empty strings when not defined. This is
|
|
2366
|
+
// mandated by the fact that redirects from <path> to <path>/:id always include the id parameter as
|
|
2367
|
+
// an empty string.
|
|
2368
|
+
return visit.hasRouteId() ? this.getRouteIdParameterDef().urlFormat.format(visit.getRouteId()) : "";
|
|
2426
2369
|
}
|
|
2427
|
-
// @Trace()
|
|
2428
2370
|
/**
|
|
2429
2371
|
* @param {?} visit
|
|
2430
2372
|
* @param {?=} includeRouteId
|
|
@@ -2509,15 +2451,17 @@ class PlaceDefinition {
|
|
|
2509
2451
|
}
|
|
2510
2452
|
else {
|
|
2511
2453
|
/** @type {?} */
|
|
2512
|
-
const value =
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2454
|
+
const value = params.get(def.name);
|
|
2455
|
+
if (def.isRouteId) { // TODO: Move this to parameter def so it's a strategy pattern
|
|
2456
|
+
// because our id routes redirect if the id isn't present we always have a id
|
|
2457
|
+
// parameter in our params. This will bugger our remember and defaultvalue sanitisation
|
|
2458
|
+
// as it'll see that the id is present (event thought its a blank string).
|
|
2459
|
+
if (!___default.isEmpty(value)) {
|
|
2460
|
+
result[def.name] = def.urlFormat.parse(value);
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
else {
|
|
2464
|
+
result[def.name] = def.urlFormat.parse(value);
|
|
2521
2465
|
}
|
|
2522
2466
|
}
|
|
2523
2467
|
}
|
|
@@ -2804,8 +2748,10 @@ class Visit {
|
|
|
2804
2748
|
else {
|
|
2805
2749
|
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
2806
2750
|
// defaults and remember sanitisation process.
|
|
2751
|
+
/** @type {?} */
|
|
2752
|
+
const value = this.getParameter(def.name);
|
|
2807
2753
|
if (this.hasParameter(def.name)) {
|
|
2808
|
-
params[def.name] =
|
|
2754
|
+
params[def.name] = value;
|
|
2809
2755
|
}
|
|
2810
2756
|
}
|
|
2811
2757
|
}));
|
|
@@ -2831,14 +2777,6 @@ class Visit {
|
|
|
2831
2777
|
const sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
2832
2778
|
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
2833
2779
|
}
|
|
2834
|
-
/**
|
|
2835
|
-
* @return {?}
|
|
2836
|
-
*/
|
|
2837
|
-
getUrlSegments() {
|
|
2838
|
-
return this.placeDefinition.hasRouteId() ?
|
|
2839
|
-
[new UrlSegment(this.placeDefinition.path, {}), new UrlSegment(this.placeDefinition.getFormattedRouteId(this), this.placeDefinition.getFormattedRouteParameters(this))] :
|
|
2840
|
-
[new UrlSegment(this.placeDefinition.path, this.placeDefinition.getFormattedRouteParameters(this))];
|
|
2841
|
-
}
|
|
2842
2780
|
}
|
|
2843
2781
|
if (false) {
|
|
2844
2782
|
/** @type {?} */
|
|
@@ -3081,12 +3019,14 @@ if (false) {
|
|
|
3081
3019
|
class PlaceRouter extends GarbageCollector {
|
|
3082
3020
|
/**
|
|
3083
3021
|
* @param {?} router
|
|
3022
|
+
* @param {?} urlSerializer
|
|
3084
3023
|
* @param {?} angularLocation
|
|
3085
3024
|
* @param {?} placeHistory
|
|
3086
3025
|
*/
|
|
3087
|
-
constructor(router, angularLocation, placeHistory) {
|
|
3026
|
+
constructor(router, urlSerializer, angularLocation, placeHistory) {
|
|
3088
3027
|
super();
|
|
3089
3028
|
this.router = router;
|
|
3029
|
+
this.urlSerializer = urlSerializer;
|
|
3090
3030
|
this.angularLocation = angularLocation;
|
|
3091
3031
|
this.placeHistory = placeHistory;
|
|
3092
3032
|
this.firstRoute = true;
|
|
@@ -3192,21 +3132,19 @@ class PlaceRouter extends GarbageCollector {
|
|
|
3192
3132
|
* @return {?}
|
|
3193
3133
|
*/
|
|
3194
3134
|
router => {
|
|
3195
|
-
// we have to to use the definition for route id as our redirection always includes
|
|
3196
|
-
// the id in the url segements (but leaves it blank when there's no id). I.e. in the
|
|
3197
|
-
// no id case we're doing the following redirect [<placePath>, ""] -> ["..", <id>]
|
|
3198
3135
|
/** @type {?} */
|
|
3199
|
-
const
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
});
|
|
3136
|
+
const commands = this.createUrlManipulator(this.router.routerState.snapshot).createRedirectCommandsFor(next);
|
|
3137
|
+
// // we have to to use the definition for route id as our redirection always includes
|
|
3138
|
+
// // the id in the url segements (but leaves it blank when there's no id). I.e. in the
|
|
3139
|
+
// // no id case we're doing the following redirect [<placePath>, ""] -> ["..", <id>]
|
|
3140
|
+
// const relativePath = !!previous.placeDefinition.hasRouteId() ? '..' : '.';
|
|
3141
|
+
// const commands = [
|
|
3142
|
+
// relativePath,
|
|
3143
|
+
// ...this.createRouteParameters(next),
|
|
3144
|
+
// ...this.extractChildPath(activatedRoute.snapshot)
|
|
3145
|
+
// ];
|
|
3146
|
+
console.log('### Push Changes to route Redirect', { commands });
|
|
3147
|
+
return router.navigate(commands);
|
|
3210
3148
|
}));
|
|
3211
3149
|
}
|
|
3212
3150
|
});
|
|
@@ -3292,6 +3230,13 @@ class PlaceRouter extends GarbageCollector {
|
|
|
3292
3230
|
*/
|
|
3293
3231
|
child => child.url)));
|
|
3294
3232
|
}
|
|
3233
|
+
/**
|
|
3234
|
+
* @param {?} snapshot
|
|
3235
|
+
* @return {?}
|
|
3236
|
+
*/
|
|
3237
|
+
createUrlManipulator(snapshot) {
|
|
3238
|
+
return new PlaceRouter.UrlManipulator(this.urlSerializer.parse(snapshot.url));
|
|
3239
|
+
}
|
|
3295
3240
|
}
|
|
3296
3241
|
PlaceRouter.decorators = [
|
|
3297
3242
|
{ type: Injectable, args: [{
|
|
@@ -3301,10 +3246,11 @@ PlaceRouter.decorators = [
|
|
|
3301
3246
|
/** @nocollapse */
|
|
3302
3247
|
PlaceRouter.ctorParameters = () => [
|
|
3303
3248
|
{ type: Router },
|
|
3249
|
+
{ type: UrlSerializer },
|
|
3304
3250
|
{ type: Location },
|
|
3305
3251
|
{ type: PlaceHistory }
|
|
3306
3252
|
];
|
|
3307
|
-
/** @nocollapse */ PlaceRouter.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(Location), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
|
|
3253
|
+
/** @nocollapse */ PlaceRouter.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(UrlSerializer), ɵɵinject(Location), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
|
|
3308
3254
|
__decorate([
|
|
3309
3255
|
Trace(),
|
|
3310
3256
|
__metadata("design:type", Function),
|
|
@@ -3336,11 +3282,107 @@ if (false) {
|
|
|
3336
3282
|
* @private
|
|
3337
3283
|
*/
|
|
3338
3284
|
PlaceRouter.prototype.router;
|
|
3285
|
+
/**
|
|
3286
|
+
* @type {?}
|
|
3287
|
+
* @private
|
|
3288
|
+
*/
|
|
3289
|
+
PlaceRouter.prototype.urlSerializer;
|
|
3339
3290
|
/** @type {?} */
|
|
3340
3291
|
PlaceRouter.prototype.angularLocation;
|
|
3341
3292
|
/** @type {?} */
|
|
3342
3293
|
PlaceRouter.prototype.placeHistory;
|
|
3343
3294
|
}
|
|
3295
|
+
(function (PlaceRouter) {
|
|
3296
|
+
class UrlManipulator {
|
|
3297
|
+
/**
|
|
3298
|
+
* @param {?} urlTree
|
|
3299
|
+
*/
|
|
3300
|
+
constructor(urlTree) {
|
|
3301
|
+
this.urlTree = urlTree;
|
|
3302
|
+
console.log({ segments: this.urlTree.root.children.primary.segments });
|
|
3303
|
+
}
|
|
3304
|
+
/**
|
|
3305
|
+
* @return {?}
|
|
3306
|
+
*/
|
|
3307
|
+
cloneUrlSegmentList() {
|
|
3308
|
+
return [...this.urlTree.root.children.primary.segments];
|
|
3309
|
+
}
|
|
3310
|
+
/**
|
|
3311
|
+
* @param {?} visit
|
|
3312
|
+
* @return {?}
|
|
3313
|
+
*/
|
|
3314
|
+
updateVisitSegments(visit) {
|
|
3315
|
+
// Ugly, but it works for now.
|
|
3316
|
+
/** @type {?} */
|
|
3317
|
+
const segments = this.cloneUrlSegmentList();
|
|
3318
|
+
/** @type {?} */
|
|
3319
|
+
const visitSegments = this.convertToUrlSegments(visit);
|
|
3320
|
+
/** @type {?} */
|
|
3321
|
+
const replaceAt = segments.findIndex((/**
|
|
3322
|
+
* @param {?} segment
|
|
3323
|
+
* @return {?}
|
|
3324
|
+
*/
|
|
3325
|
+
segment => segment.path === visitSegments[0].path));
|
|
3326
|
+
// do not use the return value, it's the items that were removed!
|
|
3327
|
+
segments.splice(replaceAt, visitSegments.length, ...visitSegments);
|
|
3328
|
+
return segments;
|
|
3329
|
+
}
|
|
3330
|
+
/**
|
|
3331
|
+
* Converts the visit into segments. Please not that these segments are not e
|
|
3332
|
+
* @param {?} visit
|
|
3333
|
+
* @return {?}
|
|
3334
|
+
*/
|
|
3335
|
+
convertToUrlSegments(visit) {
|
|
3336
|
+
return visit.placeDefinition.hasRouteId() ?
|
|
3337
|
+
[
|
|
3338
|
+
// NOTE:
|
|
3339
|
+
// It's important to attach the params to the root path and not the id. If we attach them
|
|
3340
|
+
// to an empty id then the angular router won't match the pattern.
|
|
3341
|
+
new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit)),
|
|
3342
|
+
new UrlSegment(visit.placeDefinition.getFormattedRouteId(visit), {})
|
|
3343
|
+
]
|
|
3344
|
+
:
|
|
3345
|
+
[
|
|
3346
|
+
new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit))
|
|
3347
|
+
];
|
|
3348
|
+
}
|
|
3349
|
+
/**
|
|
3350
|
+
* @param {?} visit
|
|
3351
|
+
* @return {?}
|
|
3352
|
+
*/
|
|
3353
|
+
createRedirectCommandsFor(visit) {
|
|
3354
|
+
/** @type {?} */
|
|
3355
|
+
const segments = this.updateVisitSegments(visit);
|
|
3356
|
+
/** @type {?} */
|
|
3357
|
+
const commands = [];
|
|
3358
|
+
segments.forEach((/**
|
|
3359
|
+
* @param {?} s
|
|
3360
|
+
* @return {?}
|
|
3361
|
+
*/
|
|
3362
|
+
s => {
|
|
3363
|
+
commands.push(s.path);
|
|
3364
|
+
if (s.parameterMap.keys.length > 0) {
|
|
3365
|
+
commands.push(s.parameters);
|
|
3366
|
+
}
|
|
3367
|
+
}));
|
|
3368
|
+
return commands;
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
__decorate([
|
|
3372
|
+
Trace(),
|
|
3373
|
+
__metadata("design:type", Function),
|
|
3374
|
+
__metadata("design:paramtypes", [Visit]),
|
|
3375
|
+
__metadata("design:returntype", Array)
|
|
3376
|
+
], UrlManipulator.prototype, "createRedirectCommandsFor", null);
|
|
3377
|
+
PlaceRouter.UrlManipulator = UrlManipulator;
|
|
3378
|
+
if (false) {
|
|
3379
|
+
/**
|
|
3380
|
+
* @type {?}
|
|
3381
|
+
* @private
|
|
3382
|
+
*/
|
|
3383
|
+
UrlManipulator.prototype.urlTree;
|
|
3384
|
+
}
|
|
3385
|
+
})(PlaceRouter || (PlaceRouter = {}));
|
|
3344
3386
|
|
|
3345
3387
|
/**
|
|
3346
3388
|
* @fileoverview added by tsickle
|
|
@@ -3822,6 +3864,13 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
3822
3864
|
ngOnInit() {
|
|
3823
3865
|
}
|
|
3824
3866
|
}
|
|
3867
|
+
AbstractPlaceNavigationComponent.decorators = [
|
|
3868
|
+
{ type: Component, args: [{
|
|
3869
|
+
template: ''
|
|
3870
|
+
}] }
|
|
3871
|
+
];
|
|
3872
|
+
/** @nocollapse */
|
|
3873
|
+
AbstractPlaceNavigationComponent.ctorParameters = () => [];
|
|
3825
3874
|
AbstractPlaceNavigationComponent.propDecorators = {
|
|
3826
3875
|
places: [{ type: Input }],
|
|
3827
3876
|
placesModel: [{ type: Input }],
|
|
@@ -3867,6 +3916,74 @@ if (false) {
|
|
|
3867
3916
|
AbstractPlaceNavigationComponent.prototype.activePlaceDefinition;
|
|
3868
3917
|
}
|
|
3869
3918
|
|
|
3919
|
+
/**
|
|
3920
|
+
* @fileoverview added by tsickle
|
|
3921
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3922
|
+
*/
|
|
3923
|
+
class BusyOverlayComponent {
|
|
3924
|
+
constructor() {
|
|
3925
|
+
}
|
|
3926
|
+
/**
|
|
3927
|
+
* @return {?}
|
|
3928
|
+
*/
|
|
3929
|
+
ngOnInit() {
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
BusyOverlayComponent.decorators = [
|
|
3933
|
+
{ type: Component, args: [{
|
|
3934
|
+
selector: 'aup-busy-overlay',
|
|
3935
|
+
template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
|
|
3936
|
+
styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
|
|
3937
|
+
}] }
|
|
3938
|
+
];
|
|
3939
|
+
/** @nocollapse */
|
|
3940
|
+
BusyOverlayComponent.ctorParameters = () => [];
|
|
3941
|
+
BusyOverlayComponent.propDecorators = {
|
|
3942
|
+
busyModel: [{ type: Input }],
|
|
3943
|
+
busy: [{ type: Input }]
|
|
3944
|
+
};
|
|
3945
|
+
__decorate([
|
|
3946
|
+
UseDelegate(),
|
|
3947
|
+
__metadata("design:type", ValueModel)
|
|
3948
|
+
], BusyOverlayComponent.prototype, "busyModel", void 0);
|
|
3949
|
+
__decorate([
|
|
3950
|
+
StoreInValueModel('busyModel'),
|
|
3951
|
+
__metadata("design:type", Boolean)
|
|
3952
|
+
], BusyOverlayComponent.prototype, "busy", void 0);
|
|
3953
|
+
if (false) {
|
|
3954
|
+
/** @type {?} */
|
|
3955
|
+
BusyOverlayComponent.prototype.busyModel;
|
|
3956
|
+
/** @type {?} */
|
|
3957
|
+
BusyOverlayComponent.prototype.busy;
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3960
|
+
/**
|
|
3961
|
+
* @fileoverview added by tsickle
|
|
3962
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3963
|
+
*/
|
|
3964
|
+
class EmptyStateComponent {
|
|
3965
|
+
constructor() {
|
|
3966
|
+
}
|
|
3967
|
+
/**
|
|
3968
|
+
* @return {?}
|
|
3969
|
+
*/
|
|
3970
|
+
ngOnInit() {
|
|
3971
|
+
}
|
|
3972
|
+
}
|
|
3973
|
+
EmptyStateComponent.decorators = [
|
|
3974
|
+
{ type: Component, args: [{
|
|
3975
|
+
selector: 'aup-empty-state',
|
|
3976
|
+
template: `
|
|
3977
|
+
<div class="container">
|
|
3978
|
+
<ng-content></ng-content>
|
|
3979
|
+
</div>
|
|
3980
|
+
`,
|
|
3981
|
+
styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
|
|
3982
|
+
}] }
|
|
3983
|
+
];
|
|
3984
|
+
/** @nocollapse */
|
|
3985
|
+
EmptyStateComponent.ctorParameters = () => [];
|
|
3986
|
+
|
|
3870
3987
|
/**
|
|
3871
3988
|
* @fileoverview added by tsickle
|
|
3872
3989
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -3955,7 +4072,8 @@ PlaceModule.decorators = [
|
|
|
3955
4072
|
BusyOverlayComponent,
|
|
3956
4073
|
PlaceOutletComponent,
|
|
3957
4074
|
TabbedPlaceNavigationComponent,
|
|
3958
|
-
ListPlaceNavComponent
|
|
4075
|
+
ListPlaceNavComponent,
|
|
4076
|
+
AbstractPlaceNavigationComponent
|
|
3959
4077
|
],
|
|
3960
4078
|
entryComponents: [BusyOverlayComponent],
|
|
3961
4079
|
exports: [
|
|
@@ -3963,7 +4081,8 @@ PlaceModule.decorators = [
|
|
|
3963
4081
|
PlaceOutletComponent,
|
|
3964
4082
|
EmptyStateComponent,
|
|
3965
4083
|
TabbedPlaceNavigationComponent,
|
|
3966
|
-
ListPlaceNavComponent
|
|
4084
|
+
ListPlaceNavComponent,
|
|
4085
|
+
AbstractPlaceNavigationComponent
|
|
3967
4086
|
],
|
|
3968
4087
|
providers: [
|
|
3969
4088
|
// {provide: AUP_PLACE_CONFIG, useValue: {animationDuration: "2000ms"}}
|
|
@@ -4842,10 +4961,9 @@ class EnterPlaceGuard {
|
|
|
4842
4961
|
// Save the visit with any updated parameters. We need to save it so we remember any non route parameters
|
|
4843
4962
|
this.placeRouter.navigationSession.storeVisit(sanitisedVisit);
|
|
4844
4963
|
if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
|
|
4845
|
-
/** @type {?} */
|
|
4846
|
-
const routerStateUrlTree = this.urlSerializer.parse(state.url);
|
|
4847
4964
|
// Regenerate the url
|
|
4848
|
-
|
|
4965
|
+
/** @type {?} */
|
|
4966
|
+
const commands = this.placeRouter.createUrlManipulator(state).createRedirectCommandsFor(sanitisedVisit);
|
|
4849
4967
|
console.log('##### Place Guard Redirect', commands);
|
|
4850
4968
|
return this.router.createUrlTree(commands, {
|
|
4851
4969
|
replaceUrl: true,
|
|
@@ -4861,40 +4979,6 @@ class EnterPlaceGuard {
|
|
|
4861
4979
|
}
|
|
4862
4980
|
});
|
|
4863
4981
|
}
|
|
4864
|
-
/**
|
|
4865
|
-
* @private
|
|
4866
|
-
* @param {?} sanitisedVisit
|
|
4867
|
-
* @param {?} path
|
|
4868
|
-
* @return {?}
|
|
4869
|
-
*/
|
|
4870
|
-
createRedirectCommands(sanitisedVisit, path) {
|
|
4871
|
-
// Ugly, but it works for now.
|
|
4872
|
-
/** @type {?} */
|
|
4873
|
-
const newSegments = sanitisedVisit.getUrlSegments();
|
|
4874
|
-
/** @type {?} */
|
|
4875
|
-
const replaceAt = path.findIndex((/**
|
|
4876
|
-
* @param {?} segment
|
|
4877
|
-
* @return {?}
|
|
4878
|
-
*/
|
|
4879
|
-
segment => segment.path === newSegments[0].path));
|
|
4880
|
-
/** @type {?} */
|
|
4881
|
-
const newPath = [...path];
|
|
4882
|
-
newPath.splice(replaceAt, newSegments.length, ...newSegments); // do not use the return value, it's the items that were removed!
|
|
4883
|
-
// do not use the return value, it's the items that were removed!
|
|
4884
|
-
/** @type {?} */
|
|
4885
|
-
const commands = [];
|
|
4886
|
-
newPath.forEach((/**
|
|
4887
|
-
* @param {?} s
|
|
4888
|
-
* @return {?}
|
|
4889
|
-
*/
|
|
4890
|
-
s => {
|
|
4891
|
-
commands.push(s.path);
|
|
4892
|
-
if (s.parameterMap.keys.length > 0) {
|
|
4893
|
-
commands.push(s.parameters);
|
|
4894
|
-
}
|
|
4895
|
-
}));
|
|
4896
|
-
return { newPath, commands };
|
|
4897
|
-
}
|
|
4898
4982
|
}
|
|
4899
4983
|
EnterPlaceGuard.decorators = [
|
|
4900
4984
|
{ type: Injectable, args: [{
|