@cratis/stage.runtime 4.189.5 → 4.189.6
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/src/index.js +14 -6
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -1268,17 +1268,20 @@ function qn(e) {
|
|
|
1268
1268
|
let r = Gn(n) && (typeof n.path == "string" || typeof n.kind == "string") ? t.resolveBinding(n) : n;
|
|
1269
1269
|
a[e] = r, (r == null || r === "") && (o = !1);
|
|
1270
1270
|
}
|
|
1271
|
-
let s = B({
|
|
1271
|
+
let s = e.properties.itemSelection === !0, c = Object.values(t.selections).filter((e) => e !== void 0), l = B({
|
|
1272
1272
|
scope: `${e.id}:item`,
|
|
1273
1273
|
name: n || void 0,
|
|
1274
1274
|
route: r || void 0,
|
|
1275
1275
|
arguments: a,
|
|
1276
|
-
ready: o,
|
|
1276
|
+
ready: o && !s,
|
|
1277
1277
|
publish: !1
|
|
1278
1278
|
});
|
|
1279
|
-
return {
|
|
1279
|
+
return s ? {
|
|
1280
|
+
hasSource: !0,
|
|
1281
|
+
item: c.length === 1 ? c[0] : void 0
|
|
1282
|
+
} : {
|
|
1280
1283
|
hasSource: !!n || !!r,
|
|
1281
|
-
item:
|
|
1284
|
+
item: l.rows.length === 1 ? l.rows[0] : void 0
|
|
1282
1285
|
};
|
|
1283
1286
|
}
|
|
1284
1287
|
function Jn(e, t) {
|
|
@@ -1695,8 +1698,13 @@ function pr(e, t) {
|
|
|
1695
1698
|
};
|
|
1696
1699
|
}
|
|
1697
1700
|
function mr(e, t) {
|
|
1698
|
-
if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t ||
|
|
1699
|
-
let n = { ...e.properties }
|
|
1701
|
+
if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
|
|
1702
|
+
let n = { ...e.properties };
|
|
1703
|
+
if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
|
|
1704
|
+
...e,
|
|
1705
|
+
properties: n
|
|
1706
|
+
};
|
|
1707
|
+
let r = $(t, "query"), i = $(t, "by");
|
|
1700
1708
|
return r && (n.itemQuery = r), $(t, "route") && (n.itemRoute = t.properties.route), n.itemArguments = i ? { [i]: { path: `screen.keys.${i}` } } : {}, {
|
|
1701
1709
|
...e,
|
|
1702
1710
|
properties: n
|