cx 24.10.7 → 24.10.8
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/dist/manifest.js +668 -668
- package/dist/ui.js +20 -3
- package/package.json +1 -1
- package/src/ui/Instance.js +614 -610
- package/src/ui/layout/ContentPlaceholder.js +17 -3
- package/src/ui/layout/ContentPlaceholder.spec.js +121 -1
package/dist/ui.js
CHANGED
|
@@ -1786,6 +1786,10 @@ var Instance = /*#__PURE__*/ (function () {
|
|
|
1786
1786
|
else {
|
|
1787
1787
|
this.renderList = this.renderList.insertLeft();
|
|
1788
1788
|
context.pushNamedValue("content", this.widget.putInto, this);
|
|
1789
|
+
if (!context.contentList) context.contentList = {};
|
|
1790
|
+
var list = context.contentList[this.widget.putInto];
|
|
1791
|
+
if (!list) list = context.contentList[this.widget.putInto] = [];
|
|
1792
|
+
list.push(this);
|
|
1789
1793
|
}
|
|
1790
1794
|
}
|
|
1791
1795
|
this.shouldUpdate = false;
|
|
@@ -3892,12 +3896,23 @@ var ContentPlaceholder = /*#__PURE__*/ (function (_PureContainer) {
|
|
|
3892
3896
|
var _this = this;
|
|
3893
3897
|
instance.content = null;
|
|
3894
3898
|
var data = instance.data;
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3899
|
+
if (this.allowMultiple) {
|
|
3900
|
+
var contentList = context.contentList && context.contentList[data.name];
|
|
3901
|
+
if (isNonEmptyArray(contentList) && !this.scoped)
|
|
3902
|
+
for (var i = 0; i < contentList.length; i++) this.setContent(context, instance, contentList[i]);
|
|
3903
|
+
|
|
3904
|
+
// in multi mode register a callback to allow for more entries to be added
|
|
3898
3905
|
context.pushNamedValue("contentPlaceholder", data.name, function (content) {
|
|
3899
3906
|
_this.setContent(context, instance, content);
|
|
3900
3907
|
});
|
|
3908
|
+
} else {
|
|
3909
|
+
var content = context.content && context.content[data.name];
|
|
3910
|
+
if (content && !this.scoped) this.setContent(context, instance, content);
|
|
3911
|
+
else
|
|
3912
|
+
context.pushNamedValue("contentPlaceholder", data.name, function (content) {
|
|
3913
|
+
_this.setContent(context, instance, content);
|
|
3914
|
+
});
|
|
3915
|
+
}
|
|
3901
3916
|
if (this.scoped)
|
|
3902
3917
|
instance.unregisterContentPlaceholder = function () {
|
|
3903
3918
|
context.popNamedValue("contentPlaceholder", data.name);
|
|
@@ -3956,6 +3971,7 @@ var ContentPlaceholderScope = /*#__PURE__*/ (function (_PureContainer2) {
|
|
|
3956
3971
|
this.name.forEach(function (name) {
|
|
3957
3972
|
context.pushNamedValue("contentPlaceholder", name, null);
|
|
3958
3973
|
context.pushNamedValue("content", name, null);
|
|
3974
|
+
context.pushNamedValue("contentList", name, []);
|
|
3959
3975
|
});
|
|
3960
3976
|
_PureContainer2.prototype.explore.call(this, context, instance);
|
|
3961
3977
|
};
|
|
@@ -3963,6 +3979,7 @@ var ContentPlaceholderScope = /*#__PURE__*/ (function (_PureContainer2) {
|
|
|
3963
3979
|
this.name.forEach(function (name) {
|
|
3964
3980
|
context.popNamedValue("contentPlaceholder", name);
|
|
3965
3981
|
context.popNamedValue("content", name);
|
|
3982
|
+
context.popNamedValue("contentList", name);
|
|
3966
3983
|
});
|
|
3967
3984
|
};
|
|
3968
3985
|
return ContentPlaceholderScope;
|
package/package.json
CHANGED