@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20261003121654 → 0.8.1-dev.20261007072241
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 +42 -17
- package/dist/index.mjs +42 -17
- package/dist/server.js +42 -17
- package/dist/server.mjs +42 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9080,9 +9080,9 @@ var ImageGalleryNode = (props) => {
|
|
|
9080
9080
|
const resolvedAsset = resolveAsset(fieldValue, image.tag);
|
|
9081
9081
|
if (resolvedAsset) {
|
|
9082
9082
|
imageUrl = resolvedAsset.assetUrl;
|
|
9083
|
-
posterUrl = resolvedAsset.posterUrl;
|
|
9084
|
-
intrinsicWidth = resolvedAsset.intrinsicWidth;
|
|
9085
|
-
intrinsicHeight = resolvedAsset.intrinsicHeight;
|
|
9083
|
+
posterUrl = resolvedAsset.posterUrl ?? posterUrl;
|
|
9084
|
+
intrinsicWidth = resolvedAsset.intrinsicWidth ?? intrinsicWidth;
|
|
9085
|
+
intrinsicHeight = resolvedAsset.intrinsicHeight ?? intrinsicHeight;
|
|
9086
9086
|
}
|
|
9087
9087
|
}
|
|
9088
9088
|
if (!imageUrl) {
|
|
@@ -9132,11 +9132,15 @@ var ImageGalleryNode = (props) => {
|
|
|
9132
9132
|
}).filter(Boolean)
|
|
9133
9133
|
];
|
|
9134
9134
|
const primaryHls = hlsImages.find((img) => !img.device) ?? hlsImages[0];
|
|
9135
|
-
const
|
|
9136
|
-
const
|
|
9135
|
+
const primaryHlsResolved = primaryHls ? resolveImage(primaryHls) : void 0;
|
|
9136
|
+
const hlsIntrinsicWidth = primaryHls ? parseMaybeNumber(primaryHlsResolved?.intrinsicWidth)?.toString() : void 0;
|
|
9137
|
+
const hlsIntrinsicHeight = primaryHls ? parseMaybeNumber(primaryHlsResolved?.intrinsicHeight)?.toString() : void 0;
|
|
9137
9138
|
const hlsStyles = {};
|
|
9138
9139
|
if (primaryHls?.height) hlsStyles.height = primaryHls.height;
|
|
9139
9140
|
if (primaryHls?.width) hlsStyles.width = primaryHls.width;
|
|
9141
|
+
const videoWidth = parseMaybeNumber(primaryHlsResolved?.intrinsicWidth);
|
|
9142
|
+
const videoHeight = parseMaybeNumber(primaryHlsResolved?.intrinsicHeight);
|
|
9143
|
+
hlsStyles.aspectRatio = videoWidth && videoHeight ? `${videoWidth} / ${videoHeight}` : "16 / 9";
|
|
9140
9144
|
if (primaryHls?.borderRadius)
|
|
9141
9145
|
hlsStyles.borderRadius = primaryHls.borderRadius;
|
|
9142
9146
|
const staticSources = staticImages.filter((img) => !!img.device);
|
|
@@ -9148,7 +9152,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9148
9152
|
};
|
|
9149
9153
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
9150
9154
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
9151
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_jsx_runtime84.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9155
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_jsx_runtime84.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { style: hlsStyles, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9152
9156
|
HlsPlayer4,
|
|
9153
9157
|
{
|
|
9154
9158
|
sources: hlsSources,
|
|
@@ -9162,7 +9166,7 @@ var ImageGalleryNode = (props) => {
|
|
|
9162
9166
|
session: props.session,
|
|
9163
9167
|
styles: hlsStyles
|
|
9164
9168
|
}
|
|
9165
|
-
) }),
|
|
9169
|
+
) }) }),
|
|
9166
9170
|
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_jsx_runtime84.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("picture", { children: [
|
|
9167
9171
|
DEVICE_ORDER.map((deviceKey) => {
|
|
9168
9172
|
const match = staticSources.find(
|
|
@@ -9184,8 +9188,8 @@ var ImageGalleryNode = (props) => {
|
|
|
9184
9188
|
{
|
|
9185
9189
|
media: deviceToMediaQuery(match.device),
|
|
9186
9190
|
srcSet: srcUrl,
|
|
9187
|
-
width: parseMaybeNumber(
|
|
9188
|
-
height: parseMaybeNumber(
|
|
9191
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
9192
|
+
height: parseMaybeNumber(resolved.intrinsicHeight)
|
|
9189
9193
|
},
|
|
9190
9194
|
deviceKey
|
|
9191
9195
|
);
|
|
@@ -9211,8 +9215,8 @@ var ImageGalleryNode = (props) => {
|
|
|
9211
9215
|
style: styles,
|
|
9212
9216
|
className: "object-cover max-w-full",
|
|
9213
9217
|
src: imageUrl,
|
|
9214
|
-
width: parseMaybeNumber(
|
|
9215
|
-
height: parseMaybeNumber(
|
|
9218
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
9219
|
+
height: parseMaybeNumber(resolved.intrinsicHeight),
|
|
9216
9220
|
alt: img.title ?? "Gallery image"
|
|
9217
9221
|
}
|
|
9218
9222
|
);
|
|
@@ -9256,8 +9260,8 @@ var ImageGalleryNode = (props) => {
|
|
|
9256
9260
|
display
|
|
9257
9261
|
},
|
|
9258
9262
|
className: "object-cover max-w-full",
|
|
9259
|
-
width: parseMaybeNumber(
|
|
9260
|
-
height: parseMaybeNumber(
|
|
9263
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
9264
|
+
height: parseMaybeNumber(resolved.intrinsicHeight),
|
|
9261
9265
|
alt: img.title ?? "Gallery image"
|
|
9262
9266
|
},
|
|
9263
9267
|
index
|
|
@@ -9868,6 +9872,14 @@ var Slider2 = (0, import_dynamic15.default)(() => Promise.resolve().then(() => (
|
|
|
9868
9872
|
function toCamelCase(str) {
|
|
9869
9873
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
9870
9874
|
}
|
|
9875
|
+
function hasRepeatedContainer(node) {
|
|
9876
|
+
if (!node || typeof node !== "object") return false;
|
|
9877
|
+
const container = node;
|
|
9878
|
+
if (container.type === "div-container" && (container.repeatForEachItem === true || container.replicate === true)) {
|
|
9879
|
+
return true;
|
|
9880
|
+
}
|
|
9881
|
+
return Array.isArray(container.children) && container.children.some(hasRepeatedContainer);
|
|
9882
|
+
}
|
|
9871
9883
|
function convertKeysToCamelCase(obj) {
|
|
9872
9884
|
if (!obj || typeof obj !== "object") return obj;
|
|
9873
9885
|
if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
|
|
@@ -10188,7 +10200,7 @@ var DivContainer = async (props) => {
|
|
|
10188
10200
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
10189
10201
|
});
|
|
10190
10202
|
}
|
|
10191
|
-
const arrayResult = Array.isArray(result) ? result : null;
|
|
10203
|
+
const arrayResult = Array.isArray(result) ? result : !dataSource && Array.isArray(props.dataitem) ? props.dataitem : null;
|
|
10192
10204
|
const hasReplicatedChildren = Boolean(
|
|
10193
10205
|
props.node.children?.some(
|
|
10194
10206
|
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
@@ -10224,9 +10236,22 @@ var DivContainer = async (props) => {
|
|
|
10224
10236
|
const renderContainerChildren = () => {
|
|
10225
10237
|
if (!hasReplicatedChildren) {
|
|
10226
10238
|
if (Array.isArray(arrayResult)) {
|
|
10227
|
-
return props.node.children.flatMap(
|
|
10228
|
-
(node
|
|
10229
|
-
|
|
10239
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
10240
|
+
if (node.type !== "div-container") {
|
|
10241
|
+
return [
|
|
10242
|
+
renderNode(node, props, props.dataitem, `static-${childIndex}`)
|
|
10243
|
+
];
|
|
10244
|
+
}
|
|
10245
|
+
const containsRepeater = node.children.some(hasRepeatedContainer);
|
|
10246
|
+
return [
|
|
10247
|
+
renderNode(
|
|
10248
|
+
node,
|
|
10249
|
+
props,
|
|
10250
|
+
containsRepeater ? arrayResult : props.dataitem,
|
|
10251
|
+
`${containsRepeater ? "nested-repeater" : "static"}-${childIndex}`
|
|
10252
|
+
)
|
|
10253
|
+
];
|
|
10254
|
+
});
|
|
10230
10255
|
}
|
|
10231
10256
|
return dataToRender.map(
|
|
10232
10257
|
(item, idx) => item?.links?.view && renderLink ? renderChildren2(
|
package/dist/index.mjs
CHANGED
|
@@ -1668,9 +1668,9 @@ var ImageGalleryNode = (props) => {
|
|
|
1668
1668
|
const resolvedAsset = resolveAsset(fieldValue, image.tag);
|
|
1669
1669
|
if (resolvedAsset) {
|
|
1670
1670
|
imageUrl = resolvedAsset.assetUrl;
|
|
1671
|
-
posterUrl = resolvedAsset.posterUrl;
|
|
1672
|
-
intrinsicWidth = resolvedAsset.intrinsicWidth;
|
|
1673
|
-
intrinsicHeight = resolvedAsset.intrinsicHeight;
|
|
1671
|
+
posterUrl = resolvedAsset.posterUrl ?? posterUrl;
|
|
1672
|
+
intrinsicWidth = resolvedAsset.intrinsicWidth ?? intrinsicWidth;
|
|
1673
|
+
intrinsicHeight = resolvedAsset.intrinsicHeight ?? intrinsicHeight;
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
1676
|
if (!imageUrl) {
|
|
@@ -1720,11 +1720,15 @@ var ImageGalleryNode = (props) => {
|
|
|
1720
1720
|
}).filter(Boolean)
|
|
1721
1721
|
];
|
|
1722
1722
|
const primaryHls = hlsImages.find((img) => !img.device) ?? hlsImages[0];
|
|
1723
|
-
const
|
|
1724
|
-
const
|
|
1723
|
+
const primaryHlsResolved = primaryHls ? resolveImage(primaryHls) : void 0;
|
|
1724
|
+
const hlsIntrinsicWidth = primaryHls ? parseMaybeNumber(primaryHlsResolved?.intrinsicWidth)?.toString() : void 0;
|
|
1725
|
+
const hlsIntrinsicHeight = primaryHls ? parseMaybeNumber(primaryHlsResolved?.intrinsicHeight)?.toString() : void 0;
|
|
1725
1726
|
const hlsStyles = {};
|
|
1726
1727
|
if (primaryHls?.height) hlsStyles.height = primaryHls.height;
|
|
1727
1728
|
if (primaryHls?.width) hlsStyles.width = primaryHls.width;
|
|
1729
|
+
const videoWidth = parseMaybeNumber(primaryHlsResolved?.intrinsicWidth);
|
|
1730
|
+
const videoHeight = parseMaybeNumber(primaryHlsResolved?.intrinsicHeight);
|
|
1731
|
+
hlsStyles.aspectRatio = videoWidth && videoHeight ? `${videoWidth} / ${videoHeight}` : "16 / 9";
|
|
1728
1732
|
if (primaryHls?.borderRadius)
|
|
1729
1733
|
hlsStyles.borderRadius = primaryHls.borderRadius;
|
|
1730
1734
|
const staticSources = staticImages.filter((img) => !!img.device);
|
|
@@ -1736,7 +1740,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1736
1740
|
};
|
|
1737
1741
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
1738
1742
|
return /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1739
|
-
hlsSources.length > 0 && /* @__PURE__ */ jsx35(Fragment5, { children: /* @__PURE__ */ jsx35(
|
|
1743
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx35(Fragment5, { children: /* @__PURE__ */ jsx35("div", { style: hlsStyles, children: /* @__PURE__ */ jsx35(
|
|
1740
1744
|
HlsPlayer3,
|
|
1741
1745
|
{
|
|
1742
1746
|
sources: hlsSources,
|
|
@@ -1750,7 +1754,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1750
1754
|
session: props.session,
|
|
1751
1755
|
styles: hlsStyles
|
|
1752
1756
|
}
|
|
1753
|
-
) }),
|
|
1757
|
+
) }) }),
|
|
1754
1758
|
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ jsx35(Fragment5, { children: staticFallback ? /* @__PURE__ */ jsxs13("picture", { children: [
|
|
1755
1759
|
DEVICE_ORDER.map((deviceKey) => {
|
|
1756
1760
|
const match = staticSources.find(
|
|
@@ -1772,8 +1776,8 @@ var ImageGalleryNode = (props) => {
|
|
|
1772
1776
|
{
|
|
1773
1777
|
media: deviceToMediaQuery(match.device),
|
|
1774
1778
|
srcSet: srcUrl,
|
|
1775
|
-
width: parseMaybeNumber(
|
|
1776
|
-
height: parseMaybeNumber(
|
|
1779
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
1780
|
+
height: parseMaybeNumber(resolved.intrinsicHeight)
|
|
1777
1781
|
},
|
|
1778
1782
|
deviceKey
|
|
1779
1783
|
);
|
|
@@ -1799,8 +1803,8 @@ var ImageGalleryNode = (props) => {
|
|
|
1799
1803
|
style: styles,
|
|
1800
1804
|
className: "object-cover max-w-full",
|
|
1801
1805
|
src: imageUrl,
|
|
1802
|
-
width: parseMaybeNumber(
|
|
1803
|
-
height: parseMaybeNumber(
|
|
1806
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
1807
|
+
height: parseMaybeNumber(resolved.intrinsicHeight),
|
|
1804
1808
|
alt: img.title ?? "Gallery image"
|
|
1805
1809
|
}
|
|
1806
1810
|
);
|
|
@@ -1844,8 +1848,8 @@ var ImageGalleryNode = (props) => {
|
|
|
1844
1848
|
display
|
|
1845
1849
|
},
|
|
1846
1850
|
className: "object-cover max-w-full",
|
|
1847
|
-
width: parseMaybeNumber(
|
|
1848
|
-
height: parseMaybeNumber(
|
|
1851
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
1852
|
+
height: parseMaybeNumber(resolved.intrinsicHeight),
|
|
1849
1853
|
alt: img.title ?? "Gallery image"
|
|
1850
1854
|
},
|
|
1851
1855
|
index
|
|
@@ -2455,6 +2459,14 @@ var Slider = dynamic15(() => import("./Slider-42T6THEQ.mjs"), {
|
|
|
2455
2459
|
function toCamelCase(str) {
|
|
2456
2460
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
2457
2461
|
}
|
|
2462
|
+
function hasRepeatedContainer(node) {
|
|
2463
|
+
if (!node || typeof node !== "object") return false;
|
|
2464
|
+
const container = node;
|
|
2465
|
+
if (container.type === "div-container" && (container.repeatForEachItem === true || container.replicate === true)) {
|
|
2466
|
+
return true;
|
|
2467
|
+
}
|
|
2468
|
+
return Array.isArray(container.children) && container.children.some(hasRepeatedContainer);
|
|
2469
|
+
}
|
|
2458
2470
|
function convertKeysToCamelCase(obj) {
|
|
2459
2471
|
if (!obj || typeof obj !== "object") return obj;
|
|
2460
2472
|
if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
|
|
@@ -2775,7 +2787,7 @@ var DivContainer = async (props) => {
|
|
|
2775
2787
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
2776
2788
|
});
|
|
2777
2789
|
}
|
|
2778
|
-
const arrayResult = Array.isArray(result) ? result : null;
|
|
2790
|
+
const arrayResult = Array.isArray(result) ? result : !dataSource && Array.isArray(props.dataitem) ? props.dataitem : null;
|
|
2779
2791
|
const hasReplicatedChildren = Boolean(
|
|
2780
2792
|
props.node.children?.some(
|
|
2781
2793
|
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
@@ -2811,9 +2823,22 @@ var DivContainer = async (props) => {
|
|
|
2811
2823
|
const renderContainerChildren = () => {
|
|
2812
2824
|
if (!hasReplicatedChildren) {
|
|
2813
2825
|
if (Array.isArray(arrayResult)) {
|
|
2814
|
-
return props.node.children.flatMap(
|
|
2815
|
-
(node
|
|
2816
|
-
|
|
2826
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
2827
|
+
if (node.type !== "div-container") {
|
|
2828
|
+
return [
|
|
2829
|
+
renderNode(node, props, props.dataitem, `static-${childIndex}`)
|
|
2830
|
+
];
|
|
2831
|
+
}
|
|
2832
|
+
const containsRepeater = node.children.some(hasRepeatedContainer);
|
|
2833
|
+
return [
|
|
2834
|
+
renderNode(
|
|
2835
|
+
node,
|
|
2836
|
+
props,
|
|
2837
|
+
containsRepeater ? arrayResult : props.dataitem,
|
|
2838
|
+
`${containsRepeater ? "nested-repeater" : "static"}-${childIndex}`
|
|
2839
|
+
)
|
|
2840
|
+
];
|
|
2841
|
+
});
|
|
2817
2842
|
}
|
|
2818
2843
|
return dataToRender.map(
|
|
2819
2844
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|
package/dist/server.js
CHANGED
|
@@ -6673,9 +6673,9 @@ var ImageGalleryNode = (props) => {
|
|
|
6673
6673
|
const resolvedAsset = resolveAsset(fieldValue, image.tag);
|
|
6674
6674
|
if (resolvedAsset) {
|
|
6675
6675
|
imageUrl = resolvedAsset.assetUrl;
|
|
6676
|
-
posterUrl = resolvedAsset.posterUrl;
|
|
6677
|
-
intrinsicWidth = resolvedAsset.intrinsicWidth;
|
|
6678
|
-
intrinsicHeight = resolvedAsset.intrinsicHeight;
|
|
6676
|
+
posterUrl = resolvedAsset.posterUrl ?? posterUrl;
|
|
6677
|
+
intrinsicWidth = resolvedAsset.intrinsicWidth ?? intrinsicWidth;
|
|
6678
|
+
intrinsicHeight = resolvedAsset.intrinsicHeight ?? intrinsicHeight;
|
|
6679
6679
|
}
|
|
6680
6680
|
}
|
|
6681
6681
|
if (!imageUrl) {
|
|
@@ -6725,11 +6725,15 @@ var ImageGalleryNode = (props) => {
|
|
|
6725
6725
|
}).filter(Boolean)
|
|
6726
6726
|
];
|
|
6727
6727
|
const primaryHls = hlsImages.find((img) => !img.device) ?? hlsImages[0];
|
|
6728
|
-
const
|
|
6729
|
-
const
|
|
6728
|
+
const primaryHlsResolved = primaryHls ? resolveImage(primaryHls) : void 0;
|
|
6729
|
+
const hlsIntrinsicWidth = primaryHls ? parseMaybeNumber(primaryHlsResolved?.intrinsicWidth)?.toString() : void 0;
|
|
6730
|
+
const hlsIntrinsicHeight = primaryHls ? parseMaybeNumber(primaryHlsResolved?.intrinsicHeight)?.toString() : void 0;
|
|
6730
6731
|
const hlsStyles = {};
|
|
6731
6732
|
if (primaryHls?.height) hlsStyles.height = primaryHls.height;
|
|
6732
6733
|
if (primaryHls?.width) hlsStyles.width = primaryHls.width;
|
|
6734
|
+
const videoWidth = parseMaybeNumber(primaryHlsResolved?.intrinsicWidth);
|
|
6735
|
+
const videoHeight = parseMaybeNumber(primaryHlsResolved?.intrinsicHeight);
|
|
6736
|
+
hlsStyles.aspectRatio = videoWidth && videoHeight ? `${videoWidth} / ${videoHeight}` : "16 / 9";
|
|
6733
6737
|
if (primaryHls?.borderRadius)
|
|
6734
6738
|
hlsStyles.borderRadius = primaryHls.borderRadius;
|
|
6735
6739
|
const staticSources = staticImages.filter((img) => !!img.device);
|
|
@@ -6741,7 +6745,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6741
6745
|
};
|
|
6742
6746
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
6743
6747
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
6744
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
6748
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { style: hlsStyles, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
6745
6749
|
HlsPlayer4,
|
|
6746
6750
|
{
|
|
6747
6751
|
sources: hlsSources,
|
|
@@ -6755,7 +6759,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6755
6759
|
session: props.session,
|
|
6756
6760
|
styles: hlsStyles
|
|
6757
6761
|
}
|
|
6758
|
-
) }),
|
|
6762
|
+
) }) }),
|
|
6759
6763
|
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("picture", { children: [
|
|
6760
6764
|
DEVICE_ORDER.map((deviceKey) => {
|
|
6761
6765
|
const match = staticSources.find(
|
|
@@ -6777,8 +6781,8 @@ var ImageGalleryNode = (props) => {
|
|
|
6777
6781
|
{
|
|
6778
6782
|
media: deviceToMediaQuery(match.device),
|
|
6779
6783
|
srcSet: srcUrl,
|
|
6780
|
-
width: parseMaybeNumber(
|
|
6781
|
-
height: parseMaybeNumber(
|
|
6784
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
6785
|
+
height: parseMaybeNumber(resolved.intrinsicHeight)
|
|
6782
6786
|
},
|
|
6783
6787
|
deviceKey
|
|
6784
6788
|
);
|
|
@@ -6804,8 +6808,8 @@ var ImageGalleryNode = (props) => {
|
|
|
6804
6808
|
style: styles,
|
|
6805
6809
|
className: "object-cover max-w-full",
|
|
6806
6810
|
src: imageUrl,
|
|
6807
|
-
width: parseMaybeNumber(
|
|
6808
|
-
height: parseMaybeNumber(
|
|
6811
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
6812
|
+
height: parseMaybeNumber(resolved.intrinsicHeight),
|
|
6809
6813
|
alt: img.title ?? "Gallery image"
|
|
6810
6814
|
}
|
|
6811
6815
|
);
|
|
@@ -6849,8 +6853,8 @@ var ImageGalleryNode = (props) => {
|
|
|
6849
6853
|
display
|
|
6850
6854
|
},
|
|
6851
6855
|
className: "object-cover max-w-full",
|
|
6852
|
-
width: parseMaybeNumber(
|
|
6853
|
-
height: parseMaybeNumber(
|
|
6856
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
6857
|
+
height: parseMaybeNumber(resolved.intrinsicHeight),
|
|
6854
6858
|
alt: img.title ?? "Gallery image"
|
|
6855
6859
|
},
|
|
6856
6860
|
index
|
|
@@ -7461,6 +7465,14 @@ var Slider2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (
|
|
|
7461
7465
|
function toCamelCase(str) {
|
|
7462
7466
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
7463
7467
|
}
|
|
7468
|
+
function hasRepeatedContainer(node) {
|
|
7469
|
+
if (!node || typeof node !== "object") return false;
|
|
7470
|
+
const container = node;
|
|
7471
|
+
if (container.type === "div-container" && (container.repeatForEachItem === true || container.replicate === true)) {
|
|
7472
|
+
return true;
|
|
7473
|
+
}
|
|
7474
|
+
return Array.isArray(container.children) && container.children.some(hasRepeatedContainer);
|
|
7475
|
+
}
|
|
7464
7476
|
function convertKeysToCamelCase(obj) {
|
|
7465
7477
|
if (!obj || typeof obj !== "object") return obj;
|
|
7466
7478
|
if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
|
|
@@ -7781,7 +7793,7 @@ var DivContainer = async (props) => {
|
|
|
7781
7793
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
7782
7794
|
});
|
|
7783
7795
|
}
|
|
7784
|
-
const arrayResult = Array.isArray(result) ? result : null;
|
|
7796
|
+
const arrayResult = Array.isArray(result) ? result : !dataSource && Array.isArray(props.dataitem) ? props.dataitem : null;
|
|
7785
7797
|
const hasReplicatedChildren = Boolean(
|
|
7786
7798
|
props.node.children?.some(
|
|
7787
7799
|
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
@@ -7817,9 +7829,22 @@ var DivContainer = async (props) => {
|
|
|
7817
7829
|
const renderContainerChildren = () => {
|
|
7818
7830
|
if (!hasReplicatedChildren) {
|
|
7819
7831
|
if (Array.isArray(arrayResult)) {
|
|
7820
|
-
return props.node.children.flatMap(
|
|
7821
|
-
(node
|
|
7822
|
-
|
|
7832
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
7833
|
+
if (node.type !== "div-container") {
|
|
7834
|
+
return [
|
|
7835
|
+
renderNode(node, props, props.dataitem, `static-${childIndex}`)
|
|
7836
|
+
];
|
|
7837
|
+
}
|
|
7838
|
+
const containsRepeater = node.children.some(hasRepeatedContainer);
|
|
7839
|
+
return [
|
|
7840
|
+
renderNode(
|
|
7841
|
+
node,
|
|
7842
|
+
props,
|
|
7843
|
+
containsRepeater ? arrayResult : props.dataitem,
|
|
7844
|
+
`${containsRepeater ? "nested-repeater" : "static"}-${childIndex}`
|
|
7845
|
+
)
|
|
7846
|
+
];
|
|
7847
|
+
});
|
|
7823
7848
|
}
|
|
7824
7849
|
return dataToRender.map(
|
|
7825
7850
|
(item, idx) => item?.links?.view && renderLink ? renderChildren2(
|
package/dist/server.mjs
CHANGED
|
@@ -1624,9 +1624,9 @@ var ImageGalleryNode = (props) => {
|
|
|
1624
1624
|
const resolvedAsset = resolveAsset(fieldValue, image.tag);
|
|
1625
1625
|
if (resolvedAsset) {
|
|
1626
1626
|
imageUrl = resolvedAsset.assetUrl;
|
|
1627
|
-
posterUrl = resolvedAsset.posterUrl;
|
|
1628
|
-
intrinsicWidth = resolvedAsset.intrinsicWidth;
|
|
1629
|
-
intrinsicHeight = resolvedAsset.intrinsicHeight;
|
|
1627
|
+
posterUrl = resolvedAsset.posterUrl ?? posterUrl;
|
|
1628
|
+
intrinsicWidth = resolvedAsset.intrinsicWidth ?? intrinsicWidth;
|
|
1629
|
+
intrinsicHeight = resolvedAsset.intrinsicHeight ?? intrinsicHeight;
|
|
1630
1630
|
}
|
|
1631
1631
|
}
|
|
1632
1632
|
if (!imageUrl) {
|
|
@@ -1676,11 +1676,15 @@ var ImageGalleryNode = (props) => {
|
|
|
1676
1676
|
}).filter(Boolean)
|
|
1677
1677
|
];
|
|
1678
1678
|
const primaryHls = hlsImages.find((img) => !img.device) ?? hlsImages[0];
|
|
1679
|
-
const
|
|
1680
|
-
const
|
|
1679
|
+
const primaryHlsResolved = primaryHls ? resolveImage(primaryHls) : void 0;
|
|
1680
|
+
const hlsIntrinsicWidth = primaryHls ? parseMaybeNumber(primaryHlsResolved?.intrinsicWidth)?.toString() : void 0;
|
|
1681
|
+
const hlsIntrinsicHeight = primaryHls ? parseMaybeNumber(primaryHlsResolved?.intrinsicHeight)?.toString() : void 0;
|
|
1681
1682
|
const hlsStyles = {};
|
|
1682
1683
|
if (primaryHls?.height) hlsStyles.height = primaryHls.height;
|
|
1683
1684
|
if (primaryHls?.width) hlsStyles.width = primaryHls.width;
|
|
1685
|
+
const videoWidth = parseMaybeNumber(primaryHlsResolved?.intrinsicWidth);
|
|
1686
|
+
const videoHeight = parseMaybeNumber(primaryHlsResolved?.intrinsicHeight);
|
|
1687
|
+
hlsStyles.aspectRatio = videoWidth && videoHeight ? `${videoWidth} / ${videoHeight}` : "16 / 9";
|
|
1684
1688
|
if (primaryHls?.borderRadius)
|
|
1685
1689
|
hlsStyles.borderRadius = primaryHls.borderRadius;
|
|
1686
1690
|
const staticSources = staticImages.filter((img) => !!img.device);
|
|
@@ -1692,7 +1696,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1692
1696
|
};
|
|
1693
1697
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
1694
1698
|
return /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1695
|
-
hlsSources.length > 0 && /* @__PURE__ */ jsx35(Fragment5, { children: /* @__PURE__ */ jsx35(
|
|
1699
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx35(Fragment5, { children: /* @__PURE__ */ jsx35("div", { style: hlsStyles, children: /* @__PURE__ */ jsx35(
|
|
1696
1700
|
HlsPlayer3,
|
|
1697
1701
|
{
|
|
1698
1702
|
sources: hlsSources,
|
|
@@ -1706,7 +1710,7 @@ var ImageGalleryNode = (props) => {
|
|
|
1706
1710
|
session: props.session,
|
|
1707
1711
|
styles: hlsStyles
|
|
1708
1712
|
}
|
|
1709
|
-
) }),
|
|
1713
|
+
) }) }),
|
|
1710
1714
|
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ jsx35(Fragment5, { children: staticFallback ? /* @__PURE__ */ jsxs13("picture", { children: [
|
|
1711
1715
|
DEVICE_ORDER.map((deviceKey) => {
|
|
1712
1716
|
const match = staticSources.find(
|
|
@@ -1728,8 +1732,8 @@ var ImageGalleryNode = (props) => {
|
|
|
1728
1732
|
{
|
|
1729
1733
|
media: deviceToMediaQuery(match.device),
|
|
1730
1734
|
srcSet: srcUrl,
|
|
1731
|
-
width: parseMaybeNumber(
|
|
1732
|
-
height: parseMaybeNumber(
|
|
1735
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
1736
|
+
height: parseMaybeNumber(resolved.intrinsicHeight)
|
|
1733
1737
|
},
|
|
1734
1738
|
deviceKey
|
|
1735
1739
|
);
|
|
@@ -1755,8 +1759,8 @@ var ImageGalleryNode = (props) => {
|
|
|
1755
1759
|
style: styles,
|
|
1756
1760
|
className: "object-cover max-w-full",
|
|
1757
1761
|
src: imageUrl,
|
|
1758
|
-
width: parseMaybeNumber(
|
|
1759
|
-
height: parseMaybeNumber(
|
|
1762
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
1763
|
+
height: parseMaybeNumber(resolved.intrinsicHeight),
|
|
1760
1764
|
alt: img.title ?? "Gallery image"
|
|
1761
1765
|
}
|
|
1762
1766
|
);
|
|
@@ -1800,8 +1804,8 @@ var ImageGalleryNode = (props) => {
|
|
|
1800
1804
|
display
|
|
1801
1805
|
},
|
|
1802
1806
|
className: "object-cover max-w-full",
|
|
1803
|
-
width: parseMaybeNumber(
|
|
1804
|
-
height: parseMaybeNumber(
|
|
1807
|
+
width: parseMaybeNumber(resolved.intrinsicWidth),
|
|
1808
|
+
height: parseMaybeNumber(resolved.intrinsicHeight),
|
|
1805
1809
|
alt: img.title ?? "Gallery image"
|
|
1806
1810
|
},
|
|
1807
1811
|
index
|
|
@@ -2411,6 +2415,14 @@ var Slider = dynamic14(() => import("./Slider-UNNVADVP.mjs"), {
|
|
|
2411
2415
|
function toCamelCase(str) {
|
|
2412
2416
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
2413
2417
|
}
|
|
2418
|
+
function hasRepeatedContainer(node) {
|
|
2419
|
+
if (!node || typeof node !== "object") return false;
|
|
2420
|
+
const container = node;
|
|
2421
|
+
if (container.type === "div-container" && (container.repeatForEachItem === true || container.replicate === true)) {
|
|
2422
|
+
return true;
|
|
2423
|
+
}
|
|
2424
|
+
return Array.isArray(container.children) && container.children.some(hasRepeatedContainer);
|
|
2425
|
+
}
|
|
2414
2426
|
function convertKeysToCamelCase(obj) {
|
|
2415
2427
|
if (!obj || typeof obj !== "object") return obj;
|
|
2416
2428
|
if (Array.isArray(obj)) return obj.map(convertKeysToCamelCase);
|
|
@@ -2731,7 +2743,7 @@ var DivContainer = async (props) => {
|
|
|
2731
2743
|
return dataItem[key] !== void 0 ? dataItem[key] : match;
|
|
2732
2744
|
});
|
|
2733
2745
|
}
|
|
2734
|
-
const arrayResult = Array.isArray(result) ? result : null;
|
|
2746
|
+
const arrayResult = Array.isArray(result) ? result : !dataSource && Array.isArray(props.dataitem) ? props.dataitem : null;
|
|
2735
2747
|
const hasReplicatedChildren = Boolean(
|
|
2736
2748
|
props.node.children?.some(
|
|
2737
2749
|
(node) => node?.type === "div-container" && (node?.repeatForEachItem === true || node?.replicate === true)
|
|
@@ -2767,9 +2779,22 @@ var DivContainer = async (props) => {
|
|
|
2767
2779
|
const renderContainerChildren = () => {
|
|
2768
2780
|
if (!hasReplicatedChildren) {
|
|
2769
2781
|
if (Array.isArray(arrayResult)) {
|
|
2770
|
-
return props.node.children.flatMap(
|
|
2771
|
-
(node
|
|
2772
|
-
|
|
2782
|
+
return props.node.children.flatMap((node, childIndex) => {
|
|
2783
|
+
if (node.type !== "div-container") {
|
|
2784
|
+
return [
|
|
2785
|
+
renderNode(node, props, props.dataitem, `static-${childIndex}`)
|
|
2786
|
+
];
|
|
2787
|
+
}
|
|
2788
|
+
const containsRepeater = node.children.some(hasRepeatedContainer);
|
|
2789
|
+
return [
|
|
2790
|
+
renderNode(
|
|
2791
|
+
node,
|
|
2792
|
+
props,
|
|
2793
|
+
containsRepeater ? arrayResult : props.dataitem,
|
|
2794
|
+
`${containsRepeater ? "nested-repeater" : "static"}-${childIndex}`
|
|
2795
|
+
)
|
|
2796
|
+
];
|
|
2797
|
+
});
|
|
2773
2798
|
}
|
|
2774
2799
|
return dataToRender.map(
|
|
2775
2800
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(
|