@coolon/angular-ui-powerups 0.0.123 → 0.0.125
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 +66 -82
- 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/route/parameter-decorators.js +67 -83
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +67 -83
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +66 -82
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +66 -82
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/package.json +1 -1
|
@@ -8615,6 +8615,57 @@
|
|
|
8615
8615
|
/** @type {?|undefined} */
|
|
8616
8616
|
RouteListParameterOptions.prototype.storeInUrl;
|
|
8617
8617
|
}
|
|
8618
|
+
/**
|
|
8619
|
+
* @template M
|
|
8620
|
+
* @param {?} prototype
|
|
8621
|
+
* @param {?} propertyKey
|
|
8622
|
+
* @param {?} backingModel
|
|
8623
|
+
* @param {?} tagPrefix
|
|
8624
|
+
* @param {?} isEmpty
|
|
8625
|
+
* @return {?}
|
|
8626
|
+
*/
|
|
8627
|
+
function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmpty) {
|
|
8628
|
+
/** @type {?} */
|
|
8629
|
+
var mechanics = {
|
|
8630
|
+
backingModel: backingModel,
|
|
8631
|
+
binding: (/** @type {?} */ (null))
|
|
8632
|
+
};
|
|
8633
|
+
/** @type {?} */
|
|
8634
|
+
var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
8635
|
+
pectin.DebugContext.get(mechanics.backingModel).tag(tag);
|
|
8636
|
+
pectin.Logger.get(mechanics.backingModel).tag(tag);
|
|
8637
|
+
Object.defineProperty(prototype, propertyKey, {
|
|
8638
|
+
get: (/**
|
|
8639
|
+
* @return {?}
|
|
8640
|
+
*/
|
|
8641
|
+
function () {
|
|
8642
|
+
return mechanics.backingModel;
|
|
8643
|
+
}),
|
|
8644
|
+
set: (/**
|
|
8645
|
+
* @param {?} userModel
|
|
8646
|
+
* @return {?}
|
|
8647
|
+
*/
|
|
8648
|
+
function (userModel) {
|
|
8649
|
+
// This handles the scenario where we want to push an existing value model (such as a form model)
|
|
8650
|
+
// to and from the route.
|
|
8651
|
+
if (mechanics.binding) {
|
|
8652
|
+
mechanics.binding.dispose();
|
|
8653
|
+
}
|
|
8654
|
+
if (userModel) {
|
|
8655
|
+
mechanics.binding = new pectin.Binding(mechanics.backingModel, userModel);
|
|
8656
|
+
if (isEmpty(userModel)) {
|
|
8657
|
+
mechanics.binding.writeRight(); // push the visit into the user model;
|
|
8658
|
+
}
|
|
8659
|
+
else {
|
|
8660
|
+
if (!isEmpty(mechanics.backingModel)) {
|
|
8661
|
+
console.warn('Assigning a visit model with an existing value to a visit parameter with an existing value. Visit parameter will be overridden');
|
|
8662
|
+
}
|
|
8663
|
+
mechanics.binding.writeLeft(); // push the user model into the visit
|
|
8664
|
+
}
|
|
8665
|
+
}
|
|
8666
|
+
})
|
|
8667
|
+
});
|
|
8668
|
+
}
|
|
8618
8669
|
/**
|
|
8619
8670
|
* @template T
|
|
8620
8671
|
* @param {?} type
|
|
@@ -8631,8 +8682,11 @@
|
|
|
8631
8682
|
/** @type {?} */
|
|
8632
8683
|
var param = new exports.ParameterDefinition.RouteId(propertyKey.toString(), options, type);
|
|
8633
8684
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8634
|
-
|
|
8635
|
-
|
|
8685
|
+
installMechanics(prototype, propertyKey, new pectin.MutableValueModel(), "@RouteId", (/**
|
|
8686
|
+
* @param {?} m
|
|
8687
|
+
* @return {?}
|
|
8688
|
+
*/
|
|
8689
|
+
function (m) { return m.query().isNil(); }));
|
|
8636
8690
|
});
|
|
8637
8691
|
}
|
|
8638
8692
|
/**
|
|
@@ -8652,46 +8706,11 @@
|
|
|
8652
8706
|
/** @type {?} */
|
|
8653
8707
|
var param = new exports.ParameterDefinition.ValueParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
8654
8708
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
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
|
-
});
|
|
8709
|
+
installMechanics(prototype, propertyKey, new pectin.MutableValueModel(), "@VisitParameter", (/**
|
|
8710
|
+
* @param {?} m
|
|
8711
|
+
* @return {?}
|
|
8712
|
+
*/
|
|
8713
|
+
function (m) { return m.query().isNil(); }));
|
|
8695
8714
|
});
|
|
8696
8715
|
}
|
|
8697
8716
|
/**
|
|
@@ -8711,46 +8730,11 @@
|
|
|
8711
8730
|
/** @type {?} */
|
|
8712
8731
|
var param = new exports.ParameterDefinition.ArrayParameter(propertyKey.toString(), options, opts.getOptional('storeInUrl', null));
|
|
8713
8732
|
typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(ROUTE_PARAMETER_LIST_KEY, param);
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
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
|
-
});
|
|
8733
|
+
installMechanics(prototype, propertyKey, new pectin.MutableListModel(), "@VisitParameterList", (/**
|
|
8734
|
+
* @param {?} m
|
|
8735
|
+
* @return {?}
|
|
8736
|
+
*/
|
|
8737
|
+
function (m) { return m.query().isEmpty(); }));
|
|
8754
8738
|
});
|
|
8755
8739
|
}
|
|
8756
8740
|
|