@coolon/angular-ui-powerups 0.0.120 → 0.0.122
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 +54 -16
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +8 -3
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/place-component.js +28 -6
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/place-definition.js +7 -1
- package/esm2015/lib/place/place-definition.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +6 -6
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +8 -3
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm5/lib/place/place-component.js +32 -7
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-definition.js +11 -2
- package/esm5/lib/place/place-definition.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +6 -6
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +47 -15
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +55 -17
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/place-component.d.ts +4 -2
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@ import { MatInputModule, MatFormFieldModule, MatSelectModule, MatButtonModule, M
|
|
|
5
5
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import { __extends, __decorate, __metadata, __awaiter, __generator, __assign, __spread } from 'tslib';
|
|
8
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, Binding, Guard, StoreInValueModel, Command, ValueHolder } from '@coolon/pectin';
|
|
8
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, DelegatingListModel, Deferred, MutableStream, MutableValueModel, MutableListModel, DebugContext, Binding, Trace, Guard, StoreInValueModel, Command, ValueHolder } from '@coolon/pectin';
|
|
9
9
|
import { PortalModule } from '@angular/cdk/portal';
|
|
10
10
|
import { RouterModule, UrlSegment, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, Router, UrlSerializer } from '@angular/router';
|
|
11
11
|
import { assert as assert$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
@@ -3110,12 +3110,16 @@ var PlaceDefinition = /** @class */ (function () {
|
|
|
3110
3110
|
// an empty string.
|
|
3111
3111
|
return visit.hasRouteId() ? this.getRouteIdParameterDef().urlFormat.format(visit.getRouteId()) : "";
|
|
3112
3112
|
};
|
|
3113
|
+
// @Trace()
|
|
3114
|
+
// @Trace()
|
|
3113
3115
|
/**
|
|
3114
3116
|
* @param {?} visit
|
|
3115
3117
|
* @param {?=} includeRouteId
|
|
3116
3118
|
* @return {?}
|
|
3117
3119
|
*/
|
|
3118
|
-
PlaceDefinition.prototype.getFormattedRouteParameters =
|
|
3120
|
+
PlaceDefinition.prototype.getFormattedRouteParameters =
|
|
3121
|
+
// @Trace()
|
|
3122
|
+
/**
|
|
3119
3123
|
* @param {?} visit
|
|
3120
3124
|
* @param {?=} includeRouteId
|
|
3121
3125
|
* @return {?}
|
|
@@ -3201,8 +3205,13 @@ var PlaceDefinition = /** @class */ (function () {
|
|
|
3201
3205
|
// params will return null for non existent names
|
|
3202
3206
|
if (params.has(def.name)) {
|
|
3203
3207
|
if (def.isArray) {
|
|
3208
|
+
// const values = params.getAll(def.name); // TODO: EEEK getAll is returning ["1,2,3,4"] when we gave it ["1","2","3","4"].
|
|
3204
3209
|
/** @type {?} */
|
|
3205
|
-
var values = params.
|
|
3210
|
+
var values = params.get(def.name).split(',').map((/**
|
|
3211
|
+
* @param {?} s
|
|
3212
|
+
* @return {?}
|
|
3213
|
+
*/
|
|
3214
|
+
function (s) { return s.trim(); }));
|
|
3206
3215
|
result[def.name] = values.map((/**
|
|
3207
3216
|
* @param {?} v
|
|
3208
3217
|
* @return {?}
|
|
@@ -3297,15 +3306,26 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
3297
3306
|
* @param {?} visit
|
|
3298
3307
|
* @return {?}
|
|
3299
3308
|
*/
|
|
3300
|
-
PlaceComponent.prototype.
|
|
3309
|
+
PlaceComponent.prototype.initialiseVisit = /**
|
|
3301
3310
|
* @param {?} visit
|
|
3302
3311
|
* @return {?}
|
|
3303
3312
|
*/
|
|
3304
3313
|
function (visit) {
|
|
3305
|
-
var _this = this;
|
|
3306
3314
|
assert.isNil(this.visit);
|
|
3307
3315
|
this.visit = visit;
|
|
3308
|
-
|
|
3316
|
+
DebugContext.get(this.visit).tag(this.placeDefinition.component.name + ".visit");
|
|
3317
|
+
// this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => {
|
|
3318
|
+
// this.installBinding(parameterDef);
|
|
3319
|
+
// });
|
|
3320
|
+
};
|
|
3321
|
+
/**
|
|
3322
|
+
* @return {?}
|
|
3323
|
+
*/
|
|
3324
|
+
PlaceComponent.prototype.ngAfterViewInit = /**
|
|
3325
|
+
* @return {?}
|
|
3326
|
+
*/
|
|
3327
|
+
function () {
|
|
3328
|
+
var _this = this;
|
|
3309
3329
|
this.placeDefinition.getVisitParameterDefs().forEach((/**
|
|
3310
3330
|
* @param {?} parameterDef
|
|
3311
3331
|
* @return {?}
|
|
@@ -3329,8 +3349,9 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
3329
3349
|
function (parameterDef) {
|
|
3330
3350
|
/** @type {?} */
|
|
3331
3351
|
var model = (/** @type {?} */ (this[parameterDef.propertyName]));
|
|
3332
|
-
|
|
3333
|
-
|
|
3352
|
+
DebugContext.tag(model, this.placeDefinition.component.name + "." + parameterDef.propertyName);
|
|
3353
|
+
/** @type {?} */
|
|
3354
|
+
var binding = this.registerDisposable(new Binding(this.visit, model, {
|
|
3334
3355
|
toRight: /**
|
|
3335
3356
|
* @param {?} visit
|
|
3336
3357
|
* @return {?}
|
|
@@ -3338,7 +3359,7 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
3338
3359
|
function (visit) {
|
|
3339
3360
|
/** @type {?} */
|
|
3340
3361
|
var value = visit.getParameter(parameterDef.name);
|
|
3341
|
-
|
|
3362
|
+
console.log('push to component', { name: parameterDef.name, value: value, visit: visit });
|
|
3342
3363
|
return value;
|
|
3343
3364
|
},
|
|
3344
3365
|
toLeft: /**
|
|
@@ -3351,6 +3372,12 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
3351
3372
|
return currentVisit.replace(parameterDef, value);
|
|
3352
3373
|
}
|
|
3353
3374
|
}));
|
|
3375
|
+
setTimeout((/**
|
|
3376
|
+
* @return {?}
|
|
3377
|
+
*/
|
|
3378
|
+
function () {
|
|
3379
|
+
binding.writeRight();
|
|
3380
|
+
}));
|
|
3354
3381
|
};
|
|
3355
3382
|
Object.defineProperty(PlaceComponent.prototype, "placeDefinition", {
|
|
3356
3383
|
get: /**
|
|
@@ -3384,6 +3411,12 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
3384
3411
|
*/
|
|
3385
3412
|
function () {
|
|
3386
3413
|
};
|
|
3414
|
+
__decorate([
|
|
3415
|
+
Trace(),
|
|
3416
|
+
__metadata("design:type", Function),
|
|
3417
|
+
__metadata("design:paramtypes", [ParameterDefinition]),
|
|
3418
|
+
__metadata("design:returntype", void 0)
|
|
3419
|
+
], PlaceComponent.prototype, "installBinding", null);
|
|
3387
3420
|
__decorate([
|
|
3388
3421
|
Memoize$1(),
|
|
3389
3422
|
__metadata("design:type", PlaceDefinition),
|
|
@@ -6252,7 +6285,11 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
6252
6285
|
_this.initialPlaceIndex = null;
|
|
6253
6286
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
6254
6287
|
_this.parentOutletModel = new MutableValueModel(parentOutlet);
|
|
6255
|
-
|
|
6288
|
+
/** @type {?} */
|
|
6289
|
+
var mutableValueModel = new MutableValueModel();
|
|
6290
|
+
DebugContext.tag(mutableValueModel, "PlaceOutletComponent -> mutableValueModel");
|
|
6291
|
+
_this._activePlaceVisitModel.setDelegate(mutableValueModel);
|
|
6292
|
+
DebugContext.tag(_this._activePlaceVisitModel, "PlaceOutletComponent._activePlaceVisitModel");
|
|
6256
6293
|
_this._inOutletUpdate = valueOf.any(_this._inOutletDeactivation, _this._inOutletActivation).areTruthy();
|
|
6257
6294
|
/** @type {?} */
|
|
6258
6295
|
var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
|
|
@@ -6466,8 +6503,9 @@ var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
|
6466
6503
|
_this._placeDefinition.value = place.placeDefinition;
|
|
6467
6504
|
/** @type {?} */
|
|
6468
6505
|
var visitModel = new MutableValueModel();
|
|
6506
|
+
DebugContext.tag(visitModel, "PlaceOutletCompeont.visitModel");
|
|
6469
6507
|
_this._activePlaceVisitModel.setDelegate(visitModel);
|
|
6470
|
-
place.
|
|
6508
|
+
place.initialiseVisit(visitModel);
|
|
6471
6509
|
}
|
|
6472
6510
|
catch (error) {
|
|
6473
6511
|
console.error(error);
|
|
@@ -8421,8 +8459,8 @@ function RouteId(type, options) {
|
|
|
8421
8459
|
/** @type {?} */
|
|
8422
8460
|
var param = new ParameterDefinition.RouteId(propertyKey.toString(), options, type);
|
|
8423
8461
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8424
|
-
|
|
8425
|
-
UseDelegate()(prototype, propertyKey);
|
|
8462
|
+
UseDelegate({ tag: "@RouteId(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
|
|
8463
|
+
// UseDelegate()(prototype, propertyKey);
|
|
8426
8464
|
});
|
|
8427
8465
|
}
|
|
8428
8466
|
/**
|
|
@@ -8442,8 +8480,8 @@ function VisitParameter(options) {
|
|
|
8442
8480
|
/** @type {?} */
|
|
8443
8481
|
var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
|
|
8444
8482
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8445
|
-
|
|
8446
|
-
UseDelegate()(prototype, propertyKey);
|
|
8483
|
+
UseDelegate({ tag: "@VisitParameter(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
|
|
8484
|
+
// UseDelegate()(prototype, propertyKey);
|
|
8447
8485
|
});
|
|
8448
8486
|
}
|
|
8449
8487
|
/**
|
|
@@ -8462,8 +8500,8 @@ function VisitParameterList(options) {
|
|
|
8462
8500
|
function (prototype, propertyKey) {
|
|
8463
8501
|
/** @type {?} */
|
|
8464
8502
|
var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional("storeInUrl", null));
|
|
8465
|
-
|
|
8466
|
-
UseDelegate()(prototype, propertyKey);
|
|
8503
|
+
UseDelegate({ tag: "@VisitParameterList(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
|
|
8504
|
+
// UseDelegate()(prototype, propertyKey);
|
|
8467
8505
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8468
8506
|
});
|
|
8469
8507
|
}
|