x-block-lib 0.9.29 → 0.9.30
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 +141 -116
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -496,7 +496,6 @@ function isFiltedImplementMethodOutput(e, y) {
|
|
|
496
496
|
}
|
|
497
497
|
if (isGlobalityNode(e.key) && b.type === "comp" && x.meta.methods) {
|
|
498
498
|
for (let { outputs: e } of x.meta.methods) if (e && e.length > 0) return !1;
|
|
499
|
-
return !1;
|
|
500
499
|
}
|
|
501
500
|
return !0;
|
|
502
501
|
}
|
|
@@ -1071,81 +1070,95 @@ function getOnEventInfo(e) {
|
|
|
1071
1070
|
};
|
|
1072
1071
|
}
|
|
1073
1072
|
} else if (w === "elementAdaptSlotEvent") {
|
|
1074
|
-
if (isGlobalityNode(O.key) && y.type === "comp") {
|
|
1075
|
-
let { elementKey: y, slotKey: b, eventKey: x } = unwrapEventKeyOfElementSlot(E), S =
|
|
1076
|
-
if (S
|
|
1077
|
-
let
|
|
1078
|
-
if (
|
|
1079
|
-
let
|
|
1080
|
-
if (
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
S
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1073
|
+
if (isGlobalityNode(O.key) && y.type === "comp" && D.adaptSlot) {
|
|
1074
|
+
let { elementKey: y, slotKey: b, eventKey: x } = unwrapEventKeyOfElementSlot(E), { kind: S, mainKey: C, slotKey: w } = unwrapSlotId(D.adaptSlot);
|
|
1075
|
+
if ((S === "elementSlot" || S === "multipleElementSlot") && y === C && b === w) {
|
|
1076
|
+
let C = getElement(y);
|
|
1077
|
+
if (C && C.slots) {
|
|
1078
|
+
let y = C.slots.find((e) => e.key === b);
|
|
1079
|
+
if (y && y.events) {
|
|
1080
|
+
let b = y.events.find((e) => e.key === x);
|
|
1081
|
+
if (b) return {
|
|
1082
|
+
id: e,
|
|
1083
|
+
kind: S,
|
|
1084
|
+
names: [
|
|
1085
|
+
C.name,
|
|
1086
|
+
y.name,
|
|
1087
|
+
b.name
|
|
1088
|
+
],
|
|
1089
|
+
params: b.params
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1090
1092
|
}
|
|
1091
1093
|
}
|
|
1092
1094
|
}
|
|
1093
1095
|
} else if (w === "elementAdaptSlotPropertyChangeEvent") {
|
|
1094
|
-
if (isGlobalityNode(O.key) && y.type === "comp") {
|
|
1095
|
-
let { elementKey: y, slotKey: b, propertyKey: x } = unwrapPropertyKeyOfElementSlot(E), S =
|
|
1096
|
-
if (S
|
|
1097
|
-
let
|
|
1098
|
-
if (
|
|
1099
|
-
let
|
|
1100
|
-
if (
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
S
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1096
|
+
if (isGlobalityNode(O.key) && y.type === "comp" && D.adaptSlot) {
|
|
1097
|
+
let { elementKey: y, slotKey: b, propertyKey: x } = unwrapPropertyKeyOfElementSlot(E), { kind: S, mainKey: C, slotKey: w } = unwrapSlotId(D.adaptSlot);
|
|
1098
|
+
if ((S === "elementSlot" || S === "multipleElementSlot") && y === C && b === w) {
|
|
1099
|
+
let C = getElement(y);
|
|
1100
|
+
if (C && C.slots) {
|
|
1101
|
+
let y = C.slots.find((e) => e.key === b);
|
|
1102
|
+
if (y && y.properties) {
|
|
1103
|
+
let b = y.properties.find((e) => e.key === x);
|
|
1104
|
+
if (b) return {
|
|
1105
|
+
id: e,
|
|
1106
|
+
kind: S,
|
|
1107
|
+
names: [
|
|
1108
|
+
C.name,
|
|
1109
|
+
y.name,
|
|
1110
|
+
b.name
|
|
1111
|
+
],
|
|
1112
|
+
params: makeChangeParams(b.type)
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1110
1115
|
}
|
|
1111
1116
|
}
|
|
1112
1117
|
}
|
|
1113
1118
|
} else if (w === "customAdaptSlotEvent") {
|
|
1114
|
-
if (isGlobalityNode(O.key) && y.type === "comp") {
|
|
1115
|
-
let { compId: y, slotId: b, eventId: x } = unwrapEventKeyOfCustomSlot(E), C =
|
|
1116
|
-
if (C
|
|
1117
|
-
let
|
|
1118
|
-
if (
|
|
1119
|
-
let
|
|
1120
|
-
if (
|
|
1121
|
-
id
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
C
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1119
|
+
if (isGlobalityNode(O.key) && y.type === "comp" && D.adaptSlot) {
|
|
1120
|
+
let { compId: y, slotId: b, eventId: x } = unwrapEventKeyOfCustomSlot(E), { kind: C, mainKey: w, slotKey: T } = unwrapSlotId(D.adaptSlot);
|
|
1121
|
+
if ((C === "customSlot" || C === "multipleCustomSlot") && y === w && b === T) {
|
|
1122
|
+
let w = S[y];
|
|
1123
|
+
if (w && w.meta.slots) {
|
|
1124
|
+
let y = w.meta.slots.find((e) => e.id === b);
|
|
1125
|
+
if (y && y.events) {
|
|
1126
|
+
let b = y.events.find((e) => e.id === x);
|
|
1127
|
+
if (b) return {
|
|
1128
|
+
id: e,
|
|
1129
|
+
kind: C,
|
|
1130
|
+
names: [
|
|
1131
|
+
w.name,
|
|
1132
|
+
y.name,
|
|
1133
|
+
b.name
|
|
1134
|
+
],
|
|
1135
|
+
params: convertParams(b.params)
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1130
1138
|
}
|
|
1131
1139
|
}
|
|
1132
1140
|
}
|
|
1133
1141
|
} else if (w === "customAdaptSlotPropertyChangeEvent") {
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1142
|
+
if (isGlobalityNode(O.key) && y.type === "comp" && D.adaptSlot) {
|
|
1143
|
+
let { compId: y, slotId: b, propertyId: x } = unwrapPropertyKeyOfCustomSlot(E), { kind: C, mainKey: w, slotKey: T } = unwrapSlotId(D.adaptSlot);
|
|
1144
|
+
if ((C === "customSlot" || C === "multipleCustomSlot") && y === w && b === T) {
|
|
1145
|
+
let w = S[y];
|
|
1146
|
+
if (w && w.meta.slots) {
|
|
1147
|
+
let y = w.meta.slots.find((e) => e.id === b);
|
|
1148
|
+
if (y && y.properties) {
|
|
1149
|
+
let b = y.properties.find((e) => e.id === x);
|
|
1150
|
+
if (b) return {
|
|
1151
|
+
id: e,
|
|
1152
|
+
kind: C,
|
|
1153
|
+
names: [
|
|
1154
|
+
w.name,
|
|
1155
|
+
y.name,
|
|
1156
|
+
b.name
|
|
1157
|
+
],
|
|
1158
|
+
params: makeChangeParams(b.type)
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1149
1162
|
}
|
|
1150
1163
|
}
|
|
1151
1164
|
} else if (w === "stateChangeEvent" && isGlobalityNode(O.key)) {
|
|
@@ -1449,45 +1462,51 @@ function getCallMethodInfo(e) {
|
|
|
1449
1462
|
}
|
|
1450
1463
|
}
|
|
1451
1464
|
} else if (S === "elementAdaptSlotMethod") {
|
|
1452
|
-
if (isGlobalityNode(E.key) && y.type === "comp") {
|
|
1453
|
-
let { elementKey: y, slotKey: b, methodKey: x } = unwrapMethodKeyOfElementSlot(w), C =
|
|
1454
|
-
if (C &&
|
|
1455
|
-
let
|
|
1465
|
+
if (isGlobalityNode(E.key) && y.type === "comp" && T.adaptSlot) {
|
|
1466
|
+
let { elementKey: y, slotKey: b, methodKey: x } = unwrapMethodKeyOfElementSlot(w), { kind: S, mainKey: C, slotKey: E } = unwrapSlotId(T.adaptSlot);
|
|
1467
|
+
if ((S === "elementSlot" || S === "multipleElementSlot") && y === C && b === E) {
|
|
1468
|
+
let C = getElement(y);
|
|
1469
|
+
if (C && C.slots) {
|
|
1470
|
+
let y = C.slots.find((e) => e.key === b);
|
|
1471
|
+
if (y && y.methods) {
|
|
1472
|
+
let b = y.methods.find((e) => e.key === x);
|
|
1473
|
+
if (b) return {
|
|
1474
|
+
id: e,
|
|
1475
|
+
kind: S,
|
|
1476
|
+
names: [
|
|
1477
|
+
C.name,
|
|
1478
|
+
y.name,
|
|
1479
|
+
b.name
|
|
1480
|
+
],
|
|
1481
|
+
inputs: b.inputs,
|
|
1482
|
+
outputs: b.outputs
|
|
1483
|
+
};
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
} else if (S === "customAdaptSlotMethod" && isGlobalityNode(E.key) && y.type === "comp" && T.adaptSlot) {
|
|
1489
|
+
let { compId: y, slotId: b, methodId: S } = unwrapMethodKeyOfCustomSlot(w), { kind: C, mainKey: E, slotKey: D } = unwrapSlotId(T.adaptSlot);
|
|
1490
|
+
if ((C === "customSlot" || C === "multipleCustomSlot") && y === E && b === D) {
|
|
1491
|
+
let w = x[y];
|
|
1492
|
+
if (w && w.meta.slots) {
|
|
1493
|
+
let y = w.meta.slots.find((e) => e.id === b);
|
|
1456
1494
|
if (y && y.methods) {
|
|
1457
|
-
let b = y.methods.find((e) => e.
|
|
1495
|
+
let b = y.methods.find((e) => e.id === S);
|
|
1458
1496
|
if (b) return {
|
|
1459
1497
|
id: e,
|
|
1460
|
-
kind:
|
|
1498
|
+
kind: C,
|
|
1461
1499
|
names: [
|
|
1462
|
-
|
|
1500
|
+
w.name,
|
|
1463
1501
|
y.name,
|
|
1464
1502
|
b.name
|
|
1465
1503
|
],
|
|
1466
|
-
inputs: b.inputs,
|
|
1467
|
-
outputs: b.outputs
|
|
1504
|
+
inputs: convertInputs(b.inputs),
|
|
1505
|
+
outputs: convertOutputs(b.outputs)
|
|
1468
1506
|
};
|
|
1469
1507
|
}
|
|
1470
1508
|
}
|
|
1471
1509
|
}
|
|
1472
|
-
} else if (S === "customAdaptSlotMethod" && isGlobalityNode(E.key) && y.type === "comp") {
|
|
1473
|
-
let { compId: y, slotId: b, methodId: C } = unwrapMethodKeyOfCustomSlot(w), T = x[y];
|
|
1474
|
-
if (T && T.meta.slots) {
|
|
1475
|
-
let y = T.meta.slots.find((e) => e.id === b);
|
|
1476
|
-
if (y && y.methods) {
|
|
1477
|
-
let b = y.methods.find((e) => e.id === C);
|
|
1478
|
-
if (b) return {
|
|
1479
|
-
id: e,
|
|
1480
|
-
kind: S,
|
|
1481
|
-
names: [
|
|
1482
|
-
T.name,
|
|
1483
|
-
y.name,
|
|
1484
|
-
b.name
|
|
1485
|
-
],
|
|
1486
|
-
inputs: convertInputs(b.inputs),
|
|
1487
|
-
outputs: convertOutputs(b.outputs)
|
|
1488
|
-
};
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
1510
|
}
|
|
1492
1511
|
}
|
|
1493
1512
|
function genCallMethodOpts(e) {
|
|
@@ -1834,17 +1853,41 @@ function getPropertyInfo(e) {
|
|
|
1834
1853
|
};
|
|
1835
1854
|
}
|
|
1836
1855
|
} else if (C === "elementAdaptSlotProperty") {
|
|
1837
|
-
if (isGlobalityNode(D.key) && y.type === "comp") {
|
|
1838
|
-
let { elementKey: y, slotKey: b, propertyKey: x } = unwrapPropertyKeyOfElementSlot(T), S =
|
|
1839
|
-
if (S
|
|
1840
|
-
let
|
|
1856
|
+
if (isGlobalityNode(D.key) && y.type === "comp" && E.adaptSlot) {
|
|
1857
|
+
let { elementKey: y, slotKey: b, propertyKey: x } = unwrapPropertyKeyOfElementSlot(T), { kind: S, mainKey: C, slotKey: w } = unwrapSlotId(E.adaptSlot);
|
|
1858
|
+
if ((S === "elementSlot" || S === "multipleElementSlot") && y === C && b === w) {
|
|
1859
|
+
let C = getElement(y);
|
|
1860
|
+
if (C && C.slots) {
|
|
1861
|
+
let y = C.slots.find((e) => e.key === b);
|
|
1862
|
+
if (y && y.properties) {
|
|
1863
|
+
let b = y.properties.find((e) => e.key === x);
|
|
1864
|
+
if (b) return {
|
|
1865
|
+
id: e,
|
|
1866
|
+
kind: S,
|
|
1867
|
+
names: [
|
|
1868
|
+
C.name,
|
|
1869
|
+
y.name,
|
|
1870
|
+
b.name
|
|
1871
|
+
],
|
|
1872
|
+
meta: { raw: { type: b.type } }
|
|
1873
|
+
};
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
} else if (C === "customAdaptSlotProperty" && isGlobalityNode(D.key) && y.type === "comp" && E.adaptSlot) {
|
|
1879
|
+
let { compId: y, slotId: b, propertyId: S } = unwrapPropertyKeyOfCustomSlot(T), { kind: C, mainKey: w, slotKey: D } = unwrapSlotId(E.adaptSlot);
|
|
1880
|
+
if ((C === "customSlot" || C === "multipleCustomSlot") && y === w && b === D) {
|
|
1881
|
+
let w = x[y];
|
|
1882
|
+
if (w && w.meta.slots) {
|
|
1883
|
+
let y = w.meta.slots.find((e) => e.id === b);
|
|
1841
1884
|
if (y && y.properties) {
|
|
1842
|
-
let b = y.properties.find((e) => e.
|
|
1885
|
+
let b = y.properties.find((e) => e.id === S);
|
|
1843
1886
|
if (b) return {
|
|
1844
1887
|
id: e,
|
|
1845
1888
|
kind: C,
|
|
1846
1889
|
names: [
|
|
1847
|
-
|
|
1890
|
+
w.name,
|
|
1848
1891
|
y.name,
|
|
1849
1892
|
b.name
|
|
1850
1893
|
],
|
|
@@ -1853,24 +1896,6 @@ function getPropertyInfo(e) {
|
|
|
1853
1896
|
}
|
|
1854
1897
|
}
|
|
1855
1898
|
}
|
|
1856
|
-
} else if (C === "customAdaptSlotProperty" && isGlobalityNode(D.key) && y.type === "comp") {
|
|
1857
|
-
let { compId: y, slotId: b, propertyId: S } = unwrapPropertyKeyOfCustomSlot(T), w = x[y];
|
|
1858
|
-
if (w && w.meta.slots) {
|
|
1859
|
-
let y = w.meta.slots.find((e) => e.id === b);
|
|
1860
|
-
if (y && y.properties) {
|
|
1861
|
-
let b = y.properties.find((e) => e.id === S);
|
|
1862
|
-
if (b) return {
|
|
1863
|
-
id: e,
|
|
1864
|
-
kind: C,
|
|
1865
|
-
names: [
|
|
1866
|
-
w.name,
|
|
1867
|
-
y.name,
|
|
1868
|
-
b.name
|
|
1869
|
-
],
|
|
1870
|
-
meta: { raw: { type: b.type } }
|
|
1871
|
-
};
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
1899
|
}
|
|
1875
1900
|
}
|
|
1876
1901
|
function genPropertyOpts(e, y) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.30",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"x-essential-lib": "^0.9.24",
|
|
44
|
-
"x-runtime-lib": "^0.8.
|
|
44
|
+
"x-runtime-lib": "^0.8.204",
|
|
45
45
|
"x-state-lib": "^0.3.38"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|