x-block-lib 0.9.24 → 0.9.26
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/index.js +21 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1682,7 +1682,7 @@ function getAllPropertyInfos(e, y) {
|
|
|
1682
1682
|
if (isSlotNode(E.key) && T.slot && b.type === "comp" && x.meta.slots) {
|
|
1683
1683
|
let y = x.meta.slots.find((e) => e.id === T.slot);
|
|
1684
1684
|
if (y && y.properties) for (let b of y.properties) C.push({
|
|
1685
|
-
id: makePropertyId("customSlotProperty", e, makePropertyKeyOfCustomSlot(
|
|
1685
|
+
id: makePropertyId("customSlotProperty", e, makePropertyKeyOfCustomSlot(x.id, y.id, b.id)),
|
|
1686
1686
|
kind: "customSlotProperty",
|
|
1687
1687
|
names: [y.name, b.name],
|
|
1688
1688
|
meta: { raw: { type: b.type } }
|
|
@@ -1691,7 +1691,7 @@ function getAllPropertyInfos(e, y) {
|
|
|
1691
1691
|
if (isMultipleSlotNode(E.key) && T.slot && b.type === "comp" && x.meta.slots) {
|
|
1692
1692
|
let y = x.meta.slots.find((e) => e.id === T.slot);
|
|
1693
1693
|
if (y && y.properties) for (let b of y.properties) C.push({
|
|
1694
|
-
id: makePropertyId("multipleCustomSlotProperty", e, makePropertyKeyOfCustomSlot(
|
|
1694
|
+
id: makePropertyId("multipleCustomSlotProperty", e, makePropertyKeyOfCustomSlot(x.id, y.id, b.id)),
|
|
1695
1695
|
kind: "multipleCustomSlotProperty",
|
|
1696
1696
|
names: [y.name, b.name],
|
|
1697
1697
|
meta: { raw: { type: b.type } }
|
|
@@ -1789,32 +1789,32 @@ function getPropertyInfo(e) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
} else if (C === "customSlotProperty") {
|
|
1791
1791
|
if (isSlotNode(D.key) && E.slot && y.type === "comp" && b.meta.slots) {
|
|
1792
|
-
let {
|
|
1793
|
-
if (E.slot ===
|
|
1794
|
-
let
|
|
1795
|
-
if (
|
|
1796
|
-
let
|
|
1797
|
-
if (
|
|
1792
|
+
let { compId: y, slotId: x, propertyId: S } = unwrapPropertyKeyOfCustomSlot(T);
|
|
1793
|
+
if (b.id === y && E.slot === x) {
|
|
1794
|
+
let y = b.meta.slots.find((e) => e.id === x);
|
|
1795
|
+
if (y && y.properties) {
|
|
1796
|
+
let b = y.properties.find((e) => e.id === S);
|
|
1797
|
+
if (b) return {
|
|
1798
1798
|
id: e,
|
|
1799
1799
|
kind: C,
|
|
1800
|
-
names: [
|
|
1801
|
-
meta: { raw: { type:
|
|
1800
|
+
names: [y.name, b.name],
|
|
1801
|
+
meta: { raw: { type: b.type } }
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
1806
|
} else if (C === "multipleCustomSlotProperty") {
|
|
1807
1807
|
if (isMultipleSlotNode(D.key) && E.slot && y.type === "comp" && b.meta.slots) {
|
|
1808
|
-
let {
|
|
1809
|
-
if (E.slot ===
|
|
1810
|
-
let
|
|
1811
|
-
if (
|
|
1812
|
-
let
|
|
1813
|
-
if (
|
|
1808
|
+
let { compId: y, slotId: x, propertyId: S } = unwrapPropertyKeyOfCustomSlot(T);
|
|
1809
|
+
if (b.id === y && E.slot === x) {
|
|
1810
|
+
let y = b.meta.slots.find((e) => e.id === x);
|
|
1811
|
+
if (y && y.properties) {
|
|
1812
|
+
let b = y.properties.find((e) => e.id === S);
|
|
1813
|
+
if (b) return {
|
|
1814
1814
|
id: e,
|
|
1815
1815
|
kind: C,
|
|
1816
|
-
names: [
|
|
1817
|
-
meta: { raw: { type:
|
|
1816
|
+
names: [y.name, b.name],
|
|
1817
|
+
meta: { raw: { type: b.type } }
|
|
1818
1818
|
};
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
@@ -1960,9 +1960,7 @@ Blocks.app_bind_container_v1 = { init: function() {
|
|
|
1960
1960
|
init: function() {
|
|
1961
1961
|
this.itemCount_ = 0, this.setMutator(new icons.MutatorIcon(["app_bind_item_v1"], this)), this.debounce_ = debounce_default(() => {
|
|
1962
1962
|
this.checkWarning_();
|
|
1963
|
-
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}")
|
|
1964
|
-
this.ensureBlocks_();
|
|
1965
|
-
}, 0);
|
|
1963
|
+
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}");
|
|
1966
1964
|
},
|
|
1967
1965
|
mutationToDom: function() {
|
|
1968
1966
|
let e = xmlUtils$11.createElement("mutation");
|
|
@@ -1971,7 +1969,7 @@ Blocks.app_bind_container_v1 = { init: function() {
|
|
|
1971
1969
|
domToMutation: function(e) {
|
|
1972
1970
|
let y = e.getAttribute("items") ?? "";
|
|
1973
1971
|
this.itemCount_ = parseInt(y, 0), this.updateShape_(), setTimeout(() => {
|
|
1974
|
-
this.ensureBlocks_(), this.checkWarning_();
|
|
1972
|
+
this.isInFlyout || (this.ensureBlocks_(), this.checkWarning_());
|
|
1975
1973
|
}, 0);
|
|
1976
1974
|
},
|
|
1977
1975
|
saveExtraState: function() {
|
|
@@ -1979,7 +1977,7 @@ Blocks.app_bind_container_v1 = { init: function() {
|
|
|
1979
1977
|
},
|
|
1980
1978
|
loadExtraState: function(e) {
|
|
1981
1979
|
this.itemCount_ = e.itemCount ?? 0, this.updateShape_(), setTimeout(() => {
|
|
1982
|
-
this.ensureBlocks_(), this.checkWarning_();
|
|
1980
|
+
this.isInFlyout || (this.ensureBlocks_(), this.checkWarning_());
|
|
1983
1981
|
}, 0);
|
|
1984
1982
|
},
|
|
1985
1983
|
decompose: function(e) {
|