@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
|
@@ -3494,21 +3494,10 @@
|
|
|
3494
3494
|
* @return {?}
|
|
3495
3495
|
*/
|
|
3496
3496
|
function (visit) {
|
|
3497
|
+
var _this = this;
|
|
3497
3498
|
pectin.assert.isNil(this.visit);
|
|
3498
3499
|
this.visit = visit;
|
|
3499
3500
|
pectin.DebugContext.get(this.visit).tag(this.placeDefinition.component.name + ".visit");
|
|
3500
|
-
// this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => {
|
|
3501
|
-
// this.installBinding(parameterDef);
|
|
3502
|
-
// });
|
|
3503
|
-
};
|
|
3504
|
-
/**
|
|
3505
|
-
* @return {?}
|
|
3506
|
-
*/
|
|
3507
|
-
PlaceComponent.prototype.ngAfterViewInit = /**
|
|
3508
|
-
* @return {?}
|
|
3509
|
-
*/
|
|
3510
|
-
function () {
|
|
3511
|
-
var _this = this;
|
|
3512
3501
|
this.placeDefinition.getVisitParameterDefs().forEach((/**
|
|
3513
3502
|
* @param {?} parameterDef
|
|
3514
3503
|
* @return {?}
|
|
@@ -8661,10 +8650,48 @@
|
|
|
8661
8650
|
*/
|
|
8662
8651
|
function (prototype, propertyKey) {
|
|
8663
8652
|
/** @type {?} */
|
|
8664
|
-
var param = new exports.ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional(
|
|
8653
|
+
var param = new exports.ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
8665
8654
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8666
|
-
|
|
8667
|
-
|
|
8655
|
+
/** @type {?} */
|
|
8656
|
+
var mechanics = {
|
|
8657
|
+
backingModel: new pectin.MutableValueModel(),
|
|
8658
|
+
binding: (/** @type {?} */ (null))
|
|
8659
|
+
};
|
|
8660
|
+
/** @type {?} */
|
|
8661
|
+
var tag = "@VisitParameter(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
8662
|
+
pectin.DebugContext.get(mechanics.backingModel).tag(tag);
|
|
8663
|
+
pectin.Logger.get(mechanics.backingModel).tag(tag);
|
|
8664
|
+
Object.defineProperty(prototype, propertyKey, {
|
|
8665
|
+
get: (/**
|
|
8666
|
+
* @return {?}
|
|
8667
|
+
*/
|
|
8668
|
+
function () {
|
|
8669
|
+
return mechanics.backingModel;
|
|
8670
|
+
}),
|
|
8671
|
+
set: (/**
|
|
8672
|
+
* @param {?} userModel
|
|
8673
|
+
* @return {?}
|
|
8674
|
+
*/
|
|
8675
|
+
function (userModel) {
|
|
8676
|
+
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
8677
|
+
// to and from the route.
|
|
8678
|
+
if (mechanics.binding) {
|
|
8679
|
+
mechanics.binding.dispose();
|
|
8680
|
+
}
|
|
8681
|
+
if (userModel) {
|
|
8682
|
+
mechanics.binding = new pectin.Binding(mechanics.backingModel, userModel);
|
|
8683
|
+
if (userModel.query().isNil()) {
|
|
8684
|
+
mechanics.binding.writeRight(); // push the visit into the user model;
|
|
8685
|
+
}
|
|
8686
|
+
else {
|
|
8687
|
+
if (!mechanics.backingModel.query().isNil()) {
|
|
8688
|
+
console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
|
|
8689
|
+
}
|
|
8690
|
+
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
8691
|
+
}
|
|
8692
|
+
}
|
|
8693
|
+
})
|
|
8694
|
+
});
|
|
8668
8695
|
});
|
|
8669
8696
|
}
|
|
8670
8697
|
/**
|
|
@@ -8682,10 +8709,48 @@
|
|
|
8682
8709
|
*/
|
|
8683
8710
|
function (prototype, propertyKey) {
|
|
8684
8711
|
/** @type {?} */
|
|
8685
|
-
var param = new exports.ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional(
|
|
8686
|
-
pectin.UseDelegate({ tag: "@VisitParameterList(" + prototype.constructor.name + "." + propertyKey.toString() + ")" })(prototype, propertyKey);
|
|
8687
|
-
// UseDelegate()(prototype, propertyKey);
|
|
8712
|
+
var param = new exports.ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
8688
8713
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8714
|
+
/** @type {?} */
|
|
8715
|
+
var mechanics = {
|
|
8716
|
+
backingModel: new pectin.MutableListModel(),
|
|
8717
|
+
binding: (/** @type {?} */ (null))
|
|
8718
|
+
};
|
|
8719
|
+
/** @type {?} */
|
|
8720
|
+
var tag = "@VisitParameterList(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
8721
|
+
pectin.DebugContext.get(mechanics.backingModel).tag(tag);
|
|
8722
|
+
pectin.Logger.get(mechanics.backingModel).tag(tag);
|
|
8723
|
+
Object.defineProperty(prototype, propertyKey, {
|
|
8724
|
+
get: (/**
|
|
8725
|
+
* @return {?}
|
|
8726
|
+
*/
|
|
8727
|
+
function () {
|
|
8728
|
+
return mechanics.backingModel;
|
|
8729
|
+
}),
|
|
8730
|
+
set: (/**
|
|
8731
|
+
* @param {?} userModel
|
|
8732
|
+
* @return {?}
|
|
8733
|
+
*/
|
|
8734
|
+
function (userModel) {
|
|
8735
|
+
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
8736
|
+
// to and from the route.
|
|
8737
|
+
if (mechanics.binding) {
|
|
8738
|
+
mechanics.binding.dispose();
|
|
8739
|
+
}
|
|
8740
|
+
if (userModel) {
|
|
8741
|
+
mechanics.binding = new pectin.Binding(mechanics.backingModel, userModel);
|
|
8742
|
+
if (userModel.query().isEmpty()) {
|
|
8743
|
+
mechanics.binding.writeRight(); // push the visit into the user model;
|
|
8744
|
+
}
|
|
8745
|
+
else {
|
|
8746
|
+
if (!mechanics.backingModel.query().isEmpty()) {
|
|
8747
|
+
console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
|
|
8748
|
+
}
|
|
8749
|
+
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
8750
|
+
}
|
|
8751
|
+
}
|
|
8752
|
+
})
|
|
8753
|
+
});
|
|
8689
8754
|
});
|
|
8690
8755
|
}
|
|
8691
8756
|
|