@coolon/angular-ui-powerups 0.0.122 → 0.0.123
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 +83 -18
- 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/place-component.js +0 -8
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +83 -7
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm5/lib/place/place-component.js +1 -12
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +83 -7
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +82 -14
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +83 -18
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/place-component.d.ts +1 -3
- package/package.json +1 -1
|
@@ -3311,21 +3311,10 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
3311
3311
|
* @return {?}
|
|
3312
3312
|
*/
|
|
3313
3313
|
function (visit) {
|
|
3314
|
+
var _this = this;
|
|
3314
3315
|
assert.isNil(this.visit);
|
|
3315
3316
|
this.visit = visit;
|
|
3316
3317
|
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;
|
|
3329
3318
|
this.placeDefinition.getVisitParameterDefs().forEach((/**
|
|
3330
3319
|
* @param {?} parameterDef
|
|
3331
3320
|
* @return {?}
|
|
@@ -8478,10 +8467,48 @@ function VisitParameter(options) {
|
|
|
8478
8467
|
*/
|
|
8479
8468
|
function (prototype, propertyKey) {
|
|
8480
8469
|
/** @type {?} */
|
|
8481
|
-
var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional(
|
|
8470
|
+
var param = new ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
8482
8471
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8483
|
-
|
|
8484
|
-
|
|
8472
|
+
/** @type {?} */
|
|
8473
|
+
var mechanics = {
|
|
8474
|
+
backingModel: new MutableValueModel(),
|
|
8475
|
+
binding: (/** @type {?} */ (null))
|
|
8476
|
+
};
|
|
8477
|
+
/** @type {?} */
|
|
8478
|
+
var tag = "@VisitParameter(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
8479
|
+
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
8480
|
+
Logger.get(mechanics.backingModel).tag(tag);
|
|
8481
|
+
Object.defineProperty(prototype, propertyKey, {
|
|
8482
|
+
get: (/**
|
|
8483
|
+
* @return {?}
|
|
8484
|
+
*/
|
|
8485
|
+
function () {
|
|
8486
|
+
return mechanics.backingModel;
|
|
8487
|
+
}),
|
|
8488
|
+
set: (/**
|
|
8489
|
+
* @param {?} userModel
|
|
8490
|
+
* @return {?}
|
|
8491
|
+
*/
|
|
8492
|
+
function (userModel) {
|
|
8493
|
+
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
8494
|
+
// to and from the route.
|
|
8495
|
+
if (mechanics.binding) {
|
|
8496
|
+
mechanics.binding.dispose();
|
|
8497
|
+
}
|
|
8498
|
+
if (userModel) {
|
|
8499
|
+
mechanics.binding = new Binding(mechanics.backingModel, userModel);
|
|
8500
|
+
if (userModel.query().isNil()) {
|
|
8501
|
+
mechanics.binding.writeRight(); // push the visit into the user model;
|
|
8502
|
+
}
|
|
8503
|
+
else {
|
|
8504
|
+
if (!mechanics.backingModel.query().isNil()) {
|
|
8505
|
+
console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
|
|
8506
|
+
}
|
|
8507
|
+
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
8508
|
+
}
|
|
8509
|
+
}
|
|
8510
|
+
})
|
|
8511
|
+
});
|
|
8485
8512
|
});
|
|
8486
8513
|
}
|
|
8487
8514
|
/**
|
|
@@ -8499,10 +8526,48 @@ function VisitParameterList(options) {
|
|
|
8499
8526
|
*/
|
|
8500
8527
|
function (prototype, propertyKey) {
|
|
8501
8528
|
/** @type {?} */
|
|
8502
|
-
var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional(
|
|
8503
|
-
UseDelegate({ tag: "@VisitParameterList(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
|
|
8504
|
-
// UseDelegate()(prototype, propertyKey);
|
|
8529
|
+
var param = new ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
8505
8530
|
Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8531
|
+
/** @type {?} */
|
|
8532
|
+
var mechanics = {
|
|
8533
|
+
backingModel: new MutableListModel(),
|
|
8534
|
+
binding: (/** @type {?} */ (null))
|
|
8535
|
+
};
|
|
8536
|
+
/** @type {?} */
|
|
8537
|
+
var tag = "@VisitParameterList(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
8538
|
+
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
8539
|
+
Logger.get(mechanics.backingModel).tag(tag);
|
|
8540
|
+
Object.defineProperty(prototype, propertyKey, {
|
|
8541
|
+
get: (/**
|
|
8542
|
+
* @return {?}
|
|
8543
|
+
*/
|
|
8544
|
+
function () {
|
|
8545
|
+
return mechanics.backingModel;
|
|
8546
|
+
}),
|
|
8547
|
+
set: (/**
|
|
8548
|
+
* @param {?} userModel
|
|
8549
|
+
* @return {?}
|
|
8550
|
+
*/
|
|
8551
|
+
function (userModel) {
|
|
8552
|
+
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
8553
|
+
// to and from the route.
|
|
8554
|
+
if (mechanics.binding) {
|
|
8555
|
+
mechanics.binding.dispose();
|
|
8556
|
+
}
|
|
8557
|
+
if (userModel) {
|
|
8558
|
+
mechanics.binding = new Binding(mechanics.backingModel, userModel);
|
|
8559
|
+
if (userModel.query().isEmpty()) {
|
|
8560
|
+
mechanics.binding.writeRight(); // push the visit into the user model;
|
|
8561
|
+
}
|
|
8562
|
+
else {
|
|
8563
|
+
if (!mechanics.backingModel.query().isEmpty()) {
|
|
8564
|
+
console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
|
|
8565
|
+
}
|
|
8566
|
+
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
8567
|
+
}
|
|
8568
|
+
}
|
|
8569
|
+
})
|
|
8570
|
+
});
|
|
8506
8571
|
});
|
|
8507
8572
|
}
|
|
8508
8573
|
|