@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260324120446 → 0.8.1-dev.20260324162628
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +519 -183
- package/dist/index.mjs +514 -179
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
1
|
// src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
|
|
5
2
|
var registry = {};
|
|
6
3
|
function registerWidgets(widgets) {
|
|
@@ -1310,7 +1307,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1310
1307
|
const containerRef = useRef2(null);
|
|
1311
1308
|
const [isCreateOpen, setIsCreateOpen] = useState5(false);
|
|
1312
1309
|
const [formData, setFormData] = useState5({});
|
|
1313
|
-
const
|
|
1310
|
+
const getNestedValue3 = (obj, path) => {
|
|
1314
1311
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
1315
1312
|
};
|
|
1316
1313
|
useEffect4(() => {
|
|
@@ -1348,7 +1345,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1348
1345
|
props.dataSourceDependsOn
|
|
1349
1346
|
]);
|
|
1350
1347
|
const filteredItems = list?.filter((item) => {
|
|
1351
|
-
const value =
|
|
1348
|
+
const value = getNestedValue3(item, props.dataTextFieldName);
|
|
1352
1349
|
return value?.toLowerCase().includes(searchTerm?.toLowerCase());
|
|
1353
1350
|
});
|
|
1354
1351
|
const playBeep = () => {
|
|
@@ -1379,7 +1376,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1379
1376
|
}, [searchTerm]);
|
|
1380
1377
|
const handleSelect = (event, item) => {
|
|
1381
1378
|
event.preventDefault();
|
|
1382
|
-
setSearchTerm(
|
|
1379
|
+
setSearchTerm(getNestedValue3(item, props.dataTextFieldName));
|
|
1383
1380
|
if (props.callback) {
|
|
1384
1381
|
const val = {};
|
|
1385
1382
|
props.callback({
|
|
@@ -1529,7 +1526,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1529
1526
|
role: "option",
|
|
1530
1527
|
tabIndex: -1,
|
|
1531
1528
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1532
|
-
children: /* @__PURE__ */ jsx27("span", { children:
|
|
1529
|
+
children: /* @__PURE__ */ jsx27("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1533
1530
|
}
|
|
1534
1531
|
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx27("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1535
1532
|
}
|
|
@@ -2524,7 +2521,7 @@ var DataList = (props) => {
|
|
|
2524
2521
|
var DataList_default = DataList;
|
|
2525
2522
|
|
|
2526
2523
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2527
|
-
import
|
|
2524
|
+
import React51 from "react";
|
|
2528
2525
|
|
|
2529
2526
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2530
2527
|
import React36 from "react";
|
|
@@ -3031,42 +3028,391 @@ var HorizontalRuleNode = () => {
|
|
|
3031
3028
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3032
3029
|
|
|
3033
3030
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3034
|
-
import
|
|
3031
|
+
import React43 from "react";
|
|
3032
|
+
|
|
3033
|
+
// src/components/utilities/AssetUtility.tsx
|
|
3034
|
+
var AssetUtility = class {
|
|
3035
|
+
constructor() {
|
|
3036
|
+
}
|
|
3037
|
+
static resolveUrl(apiBaseUrl, url) {
|
|
3038
|
+
if (!url) return void 0;
|
|
3039
|
+
if (url.startsWith("http")) return url;
|
|
3040
|
+
if (!apiBaseUrl) return url;
|
|
3041
|
+
return `${apiBaseUrl}/digitalassets-management/${url}`;
|
|
3042
|
+
}
|
|
3043
|
+
};
|
|
3044
|
+
var AssetUtility_default = AssetUtility;
|
|
3045
|
+
|
|
3046
|
+
// src/components/HlsPlayer.tsx
|
|
3047
|
+
import React42, { useRef as useRef4, useEffect as useEffect8, useState as useState9, useCallback as useCallback3 } from "react";
|
|
3048
|
+
import Hls from "hls.js";
|
|
3049
|
+
import { jsx as jsx55, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3050
|
+
var HlsPlayer = React42.memo(
|
|
3051
|
+
({
|
|
3052
|
+
assetUrl,
|
|
3053
|
+
posterUrl,
|
|
3054
|
+
intrinsicWidth,
|
|
3055
|
+
intrinsicHeight,
|
|
3056
|
+
showControls = true,
|
|
3057
|
+
loop = false,
|
|
3058
|
+
playOptions = "autoplay"
|
|
3059
|
+
}) => {
|
|
3060
|
+
const videoRef = useRef4(null);
|
|
3061
|
+
const hlsRef = useRef4(null);
|
|
3062
|
+
const [isPlaying, setIsPlaying] = useState9(playOptions === "autoplay");
|
|
3063
|
+
const [isHovered, setIsHovered] = useState9(false);
|
|
3064
|
+
const [isMobile, setIsMobile] = useState9(false);
|
|
3065
|
+
const wasManuallyPausedRef = useRef4(false);
|
|
3066
|
+
useEffect8(() => {
|
|
3067
|
+
const checkMobile = () => {
|
|
3068
|
+
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
3069
|
+
const isSmallScreen = window.innerWidth <= 768;
|
|
3070
|
+
const ua = navigator.userAgent.toLowerCase();
|
|
3071
|
+
const isMobileUA = /android|iphone|ipad|ipod/i.test(ua);
|
|
3072
|
+
setIsMobile(hasTouch || isSmallScreen || isMobileUA);
|
|
3073
|
+
};
|
|
3074
|
+
checkMobile();
|
|
3075
|
+
window.addEventListener("resize", checkMobile);
|
|
3076
|
+
return () => window.removeEventListener("resize", checkMobile);
|
|
3077
|
+
}, []);
|
|
3078
|
+
useEffect8(() => {
|
|
3079
|
+
const v = videoRef.current;
|
|
3080
|
+
if (!v || !assetUrl) return;
|
|
3081
|
+
if (hlsRef.current) {
|
|
3082
|
+
hlsRef.current.destroy();
|
|
3083
|
+
hlsRef.current = null;
|
|
3084
|
+
}
|
|
3085
|
+
if (Hls.isSupported()) {
|
|
3086
|
+
const hls = new Hls();
|
|
3087
|
+
hls.loadSource(assetUrl);
|
|
3088
|
+
hls.attachMedia(v);
|
|
3089
|
+
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
|
3090
|
+
if (isPlaying && !wasManuallyPausedRef.current) {
|
|
3091
|
+
v.play().catch(console.error);
|
|
3092
|
+
}
|
|
3093
|
+
});
|
|
3094
|
+
hlsRef.current = hls;
|
|
3095
|
+
} else if (v.canPlayType("application/vnd.apple.mpegurl")) {
|
|
3096
|
+
v.src = assetUrl;
|
|
3097
|
+
}
|
|
3098
|
+
}, [assetUrl, isPlaying]);
|
|
3099
|
+
const handlePlayPause = useCallback3(() => {
|
|
3100
|
+
const v = videoRef.current;
|
|
3101
|
+
if (!v) return;
|
|
3102
|
+
if (v.paused) {
|
|
3103
|
+
wasManuallyPausedRef.current = false;
|
|
3104
|
+
v.play().then(() => setIsPlaying(true));
|
|
3105
|
+
} else {
|
|
3106
|
+
wasManuallyPausedRef.current = true;
|
|
3107
|
+
v.pause();
|
|
3108
|
+
setIsPlaying(false);
|
|
3109
|
+
}
|
|
3110
|
+
}, []);
|
|
3111
|
+
const handleMouseEnter = useCallback3(() => {
|
|
3112
|
+
if (isMobile) return;
|
|
3113
|
+
setIsHovered(true);
|
|
3114
|
+
if (playOptions === "playOnHover" && videoRef.current && !wasManuallyPausedRef.current) {
|
|
3115
|
+
videoRef.current.play().then(() => setIsPlaying(true));
|
|
3116
|
+
}
|
|
3117
|
+
}, [playOptions, isMobile]);
|
|
3118
|
+
const handleMouseLeave = useCallback3(() => {
|
|
3119
|
+
if (isMobile) return;
|
|
3120
|
+
setIsHovered(false);
|
|
3121
|
+
if (playOptions === "playOnHover" && videoRef.current) {
|
|
3122
|
+
videoRef.current.pause();
|
|
3123
|
+
videoRef.current.currentTime = 0;
|
|
3124
|
+
setIsPlaying(false);
|
|
3125
|
+
}
|
|
3126
|
+
}, [playOptions, isMobile]);
|
|
3127
|
+
return /* @__PURE__ */ jsxs27(
|
|
3128
|
+
"div",
|
|
3129
|
+
{
|
|
3130
|
+
className: "relative w-full aspect-video bg-black",
|
|
3131
|
+
onMouseEnter: handleMouseEnter,
|
|
3132
|
+
onMouseLeave: handleMouseLeave,
|
|
3133
|
+
children: [
|
|
3134
|
+
/* @__PURE__ */ jsx55(
|
|
3135
|
+
"video",
|
|
3136
|
+
{
|
|
3137
|
+
ref: videoRef,
|
|
3138
|
+
className: "w-full h-full object-contain",
|
|
3139
|
+
poster: posterUrl,
|
|
3140
|
+
controls: showControls && (isMobile || isPlaying),
|
|
3141
|
+
muted: playOptions === "autoplay" || playOptions === "playOnHover",
|
|
3142
|
+
autoPlay: playOptions === "autoplay",
|
|
3143
|
+
loop,
|
|
3144
|
+
playsInline: true,
|
|
3145
|
+
onClick: !isMobile && !isPlaying ? handlePlayPause : void 0
|
|
3146
|
+
}
|
|
3147
|
+
),
|
|
3148
|
+
!isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */ jsx55(
|
|
3149
|
+
"img",
|
|
3150
|
+
{
|
|
3151
|
+
src: posterUrl,
|
|
3152
|
+
width: intrinsicWidth,
|
|
3153
|
+
height: intrinsicHeight,
|
|
3154
|
+
alt: "poster",
|
|
3155
|
+
className: `absolute inset-0 object-cover transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`
|
|
3156
|
+
}
|
|
3157
|
+
),
|
|
3158
|
+
!isMobile && !isPlaying && /* @__PURE__ */ jsx55(
|
|
3159
|
+
"div",
|
|
3160
|
+
{
|
|
3161
|
+
className: "absolute inset-0 flex items-center justify-center cursor-pointer",
|
|
3162
|
+
onClick: handlePlayPause,
|
|
3163
|
+
children: "\u25B6"
|
|
3164
|
+
}
|
|
3165
|
+
)
|
|
3166
|
+
]
|
|
3167
|
+
}
|
|
3168
|
+
);
|
|
3169
|
+
}
|
|
3170
|
+
);
|
|
3171
|
+
HlsPlayer.displayName = "HlsPlayer";
|
|
3172
|
+
var HlsPlayer_default = HlsPlayer;
|
|
3173
|
+
|
|
3174
|
+
// src/components/DeviceAssetSelector.tsx
|
|
3175
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
3176
|
+
var DeviceAssetSelector = ({
|
|
3177
|
+
assets,
|
|
3178
|
+
apiBaseUrl,
|
|
3179
|
+
session,
|
|
3180
|
+
// This should receive the session
|
|
3181
|
+
width,
|
|
3182
|
+
tag,
|
|
3183
|
+
customProps,
|
|
3184
|
+
nodeProps,
|
|
3185
|
+
device
|
|
3186
|
+
}) => {
|
|
3187
|
+
console.log("\u{1F511} Session in DeviceAssetSelector:", session);
|
|
3188
|
+
const targetTag = tag || nodeProps?.tag;
|
|
3189
|
+
const selectAssetByDevice = (assets2, currentDevice) => {
|
|
3190
|
+
if (!assets2 || assets2.length === 0) return void 0;
|
|
3191
|
+
const exactMatch = assets2.find((asset) => asset.device === currentDevice);
|
|
3192
|
+
if (exactMatch) return exactMatch;
|
|
3193
|
+
const noDeviceMatch = assets2.find((asset) => !asset.device || asset.device === "");
|
|
3194
|
+
if (noDeviceMatch) return noDeviceMatch;
|
|
3195
|
+
return void 0;
|
|
3196
|
+
};
|
|
3197
|
+
const selectAssetByTagAndDevice = (assets2, currentDevice, targetTag2) => {
|
|
3198
|
+
if (!assets2 || assets2.length === 0) return void 0;
|
|
3199
|
+
if (!targetTag2) return selectAssetByDevice(assets2, currentDevice);
|
|
3200
|
+
const taggedAssets = assets2.filter((asset) => asset.tag === targetTag2);
|
|
3201
|
+
if (taggedAssets.length === 0) {
|
|
3202
|
+
return selectAssetByDevice(assets2, currentDevice);
|
|
3203
|
+
}
|
|
3204
|
+
const exactTaggedMatch = taggedAssets.find((asset) => asset.device === currentDevice);
|
|
3205
|
+
if (exactTaggedMatch) return exactTaggedMatch;
|
|
3206
|
+
const noDeviceTaggedMatch = taggedAssets.find((asset) => !asset.device || asset.device === "");
|
|
3207
|
+
if (noDeviceTaggedMatch) return noDeviceTaggedMatch;
|
|
3208
|
+
return void 0;
|
|
3209
|
+
};
|
|
3210
|
+
const selectAsset = () => {
|
|
3211
|
+
if (!assets || assets.length === 0) return void 0;
|
|
3212
|
+
if (targetTag) {
|
|
3213
|
+
return selectAssetByTagAndDevice(assets, device, targetTag);
|
|
3214
|
+
}
|
|
3215
|
+
return selectAssetByDevice(assets, device);
|
|
3216
|
+
};
|
|
3217
|
+
const selectedAsset = selectAsset();
|
|
3218
|
+
if (!selectedAsset) {
|
|
3219
|
+
console.warn("No suitable asset found for device:", device, "and tag:", targetTag);
|
|
3220
|
+
return null;
|
|
3221
|
+
}
|
|
3222
|
+
const resolvedAssetUrl = AssetUtility_default.resolveUrl(apiBaseUrl, selectedAsset.assetUrl);
|
|
3223
|
+
const resolvedThumbnailUrl = selectedAsset.posterUrl ? AssetUtility_default.resolveUrl(apiBaseUrl, selectedAsset.posterUrl) : void 0;
|
|
3224
|
+
console.log("Selected Asset:", resolvedThumbnailUrl);
|
|
3225
|
+
const title = selectedAsset.title || nodeProps?.title;
|
|
3226
|
+
const intrinsicWidth = selectedAsset.intrinsicWidth?.toString();
|
|
3227
|
+
const intrinsicHeight = selectedAsset.intrinsicHeight?.toString();
|
|
3228
|
+
const isHls = resolvedAssetUrl?.endsWith(".m3u8");
|
|
3229
|
+
const showControls = customProps?.showControls ?? nodeProps?.showControls === "true";
|
|
3230
|
+
const loop = customProps?.loop ?? nodeProps?.loop === "true";
|
|
3231
|
+
const playOptions = customProps?.playOptions ?? nodeProps?.playOptions;
|
|
3232
|
+
const styles = {};
|
|
3233
|
+
if (nodeProps?.height) {
|
|
3234
|
+
styles.height = nodeProps.height;
|
|
3235
|
+
}
|
|
3236
|
+
if (nodeProps?.borderRadius) {
|
|
3237
|
+
styles.borderRadius = nodeProps.borderRadius;
|
|
3238
|
+
}
|
|
3239
|
+
if (nodeProps?.width) {
|
|
3240
|
+
styles.width = nodeProps.width;
|
|
3241
|
+
}
|
|
3242
|
+
const FormatClass = {
|
|
3243
|
+
"center": "justify-center",
|
|
3244
|
+
"left": "justify-start",
|
|
3245
|
+
"right": "justify-end"
|
|
3246
|
+
};
|
|
3247
|
+
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
3248
|
+
const renderMedia = () => {
|
|
3249
|
+
if (isHls) {
|
|
3250
|
+
return /* @__PURE__ */ jsx56(
|
|
3251
|
+
HlsPlayer_default,
|
|
3252
|
+
{
|
|
3253
|
+
assetUrl: resolvedAssetUrl,
|
|
3254
|
+
posterUrl: resolvedThumbnailUrl,
|
|
3255
|
+
intrinsicWidth,
|
|
3256
|
+
intrinsicHeight,
|
|
3257
|
+
showControls,
|
|
3258
|
+
loop,
|
|
3259
|
+
playOptions
|
|
3260
|
+
}
|
|
3261
|
+
);
|
|
3262
|
+
} else {
|
|
3263
|
+
return (
|
|
3264
|
+
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3265
|
+
/* @__PURE__ */ jsx56(
|
|
3266
|
+
"img",
|
|
3267
|
+
{
|
|
3268
|
+
style: styles,
|
|
3269
|
+
loading: "lazy",
|
|
3270
|
+
className: "object-cover w-full",
|
|
3271
|
+
src: resolvedAssetUrl,
|
|
3272
|
+
width: selectedAsset.intrinsicWidth,
|
|
3273
|
+
alt: title || "Asset image",
|
|
3274
|
+
height: selectedAsset.intrinsicHeight
|
|
3275
|
+
}
|
|
3276
|
+
)
|
|
3277
|
+
);
|
|
3278
|
+
}
|
|
3279
|
+
};
|
|
3280
|
+
if (width) {
|
|
3281
|
+
return /* @__PURE__ */ jsx56("div", { style: { width }, children: renderMedia() });
|
|
3282
|
+
}
|
|
3283
|
+
if (nodeProps?.format) {
|
|
3284
|
+
return /* @__PURE__ */ jsx56("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3285
|
+
}
|
|
3286
|
+
return renderMedia();
|
|
3287
|
+
};
|
|
3288
|
+
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3289
|
+
|
|
3290
|
+
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3291
|
+
import { Fragment as Fragment6, jsx as jsx57 } from "react/jsx-runtime";
|
|
3292
|
+
var getNestedValue = (obj, path) => {
|
|
3293
|
+
if (!obj || !path) return void 0;
|
|
3294
|
+
return path.split(".").reduce((current, key) => {
|
|
3295
|
+
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
3296
|
+
}, obj);
|
|
3297
|
+
};
|
|
3035
3298
|
var ImageNode = (props) => {
|
|
3036
|
-
|
|
3037
|
-
if (!node.imageUrl) return null;
|
|
3299
|
+
let assets;
|
|
3038
3300
|
let imageUrl;
|
|
3039
|
-
|
|
3040
|
-
|
|
3301
|
+
let posterUrl;
|
|
3302
|
+
const currentDevice = props.device;
|
|
3303
|
+
if (props.node.device) {
|
|
3304
|
+
const nodeDevice = props.node.device;
|
|
3305
|
+
if (nodeDevice !== currentDevice) {
|
|
3306
|
+
return null;
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3309
|
+
console.log("ImageNode device / currentDevice:", props.node.device, currentDevice);
|
|
3310
|
+
if (props.node.imageUrl.startsWith("http")) {
|
|
3311
|
+
imageUrl = props.node.imageUrl;
|
|
3312
|
+
posterUrl = AssetUtility_default.resolveUrl(
|
|
3313
|
+
props.assetBaseUrl,
|
|
3314
|
+
props.node.posterUrl
|
|
3315
|
+
);
|
|
3316
|
+
} else if (props.dataitem && props.node.datafield) {
|
|
3317
|
+
const image = getNestedValue(props.dataitem, props.node.datafield);
|
|
3318
|
+
console.log("ImageNode Datafield Image:", image);
|
|
3319
|
+
try {
|
|
3320
|
+
if (typeof image === "string") {
|
|
3321
|
+
assets = JSON.parse(image);
|
|
3322
|
+
} else if (Array.isArray(image)) {
|
|
3323
|
+
assets = image;
|
|
3324
|
+
} else if (image && typeof image === "object") {
|
|
3325
|
+
assets = [image];
|
|
3326
|
+
}
|
|
3327
|
+
} catch (error) {
|
|
3328
|
+
console.error("Error parsing assets in ImageNode:", error);
|
|
3329
|
+
}
|
|
3330
|
+
if (assets && assets.length > 0) {
|
|
3331
|
+
return /* @__PURE__ */ jsx57(Fragment6, { children: /* @__PURE__ */ jsx57(
|
|
3332
|
+
DeviceAssetSelector_default,
|
|
3333
|
+
{
|
|
3334
|
+
device: props.device,
|
|
3335
|
+
assets,
|
|
3336
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
3337
|
+
session: props.session,
|
|
3338
|
+
nodeProps: {
|
|
3339
|
+
title: props.node.title,
|
|
3340
|
+
showControls: props.node.showControls,
|
|
3341
|
+
loop: props.node.loop,
|
|
3342
|
+
playOptions: props.node.playOptions,
|
|
3343
|
+
borderRadius: props.node.borderRadius,
|
|
3344
|
+
width: props.node.width,
|
|
3345
|
+
height: props.node.height,
|
|
3346
|
+
format: props.node.format,
|
|
3347
|
+
tag: props.node.tag,
|
|
3348
|
+
// Add tag to ImageNode if needed
|
|
3349
|
+
placementCode: props.node.placementCode
|
|
3350
|
+
}
|
|
3351
|
+
}
|
|
3352
|
+
) });
|
|
3353
|
+
} else {
|
|
3354
|
+
imageUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.imageUrl);
|
|
3355
|
+
posterUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.posterUrl);
|
|
3356
|
+
}
|
|
3041
3357
|
} else {
|
|
3042
|
-
imageUrl = assetBaseUrl
|
|
3358
|
+
imageUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.imageUrl);
|
|
3359
|
+
posterUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.posterUrl);
|
|
3043
3360
|
}
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
"
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3361
|
+
console.log("ImageNode Assets:", assets);
|
|
3362
|
+
if (!imageUrl) {
|
|
3363
|
+
return null;
|
|
3364
|
+
}
|
|
3365
|
+
const styles = {};
|
|
3366
|
+
if (props.node.height) styles.height = props.node.height;
|
|
3367
|
+
if (props.node.borderRadius) styles.borderRadius = props.node.borderRadius;
|
|
3368
|
+
if (props.node.width) styles.width = props.node.width;
|
|
3369
|
+
const FormatClass = {
|
|
3370
|
+
"center": "justify-center",
|
|
3371
|
+
"left": "justify-start",
|
|
3372
|
+
"right": "justify-end"
|
|
3373
|
+
};
|
|
3374
|
+
{
|
|
3375
|
+
}
|
|
3376
|
+
const formatClasses = FormatClass[props.node.format] || "";
|
|
3377
|
+
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3378
|
+
const renderMedia = () => {
|
|
3379
|
+
if (isHls) {
|
|
3380
|
+
return /* @__PURE__ */ jsx57(
|
|
3381
|
+
HlsPlayer_default,
|
|
3382
|
+
{
|
|
3383
|
+
assetUrl: imageUrl,
|
|
3384
|
+
posterUrl,
|
|
3385
|
+
intrinsicWidth: props.node.intrinsicWidth,
|
|
3386
|
+
intrinsicHeight: props.node.intrinsicHeight,
|
|
3387
|
+
showControls: props.node.showControls === "true",
|
|
3388
|
+
loop: props.node.loop === "true",
|
|
3389
|
+
playOptions: props.node.playOptions
|
|
3390
|
+
}
|
|
3391
|
+
);
|
|
3392
|
+
} else {
|
|
3393
|
+
return /* @__PURE__ */ jsx57(React43.Fragment, { children: /* @__PURE__ */ jsx57(
|
|
3394
|
+
"img",
|
|
3395
|
+
{
|
|
3396
|
+
style: styles,
|
|
3397
|
+
loading: "lazy",
|
|
3398
|
+
className: "object-cover",
|
|
3399
|
+
src: imageUrl,
|
|
3400
|
+
width: props.node.intrinsicWidth,
|
|
3401
|
+
alt: props.node.title,
|
|
3402
|
+
height: props.node.intrinsicHeight
|
|
3403
|
+
}
|
|
3404
|
+
) });
|
|
3063
3405
|
}
|
|
3064
|
-
|
|
3406
|
+
};
|
|
3407
|
+
if (props.node.width) {
|
|
3408
|
+
return /* @__PURE__ */ jsx57("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3409
|
+
}
|
|
3410
|
+
return renderMedia();
|
|
3065
3411
|
};
|
|
3066
3412
|
var ImageNode_default = ImageNode;
|
|
3067
3413
|
|
|
3068
3414
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3069
|
-
import { Fragment as Fragment7, jsx as
|
|
3415
|
+
import { Fragment as Fragment7, jsx as jsx58, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3070
3416
|
var WidgetNode = (props) => {
|
|
3071
3417
|
const getWidgetParameters = () => {
|
|
3072
3418
|
const widgetInputParameters = {
|
|
@@ -3123,14 +3469,14 @@ var WidgetNode = (props) => {
|
|
|
3123
3469
|
};
|
|
3124
3470
|
const widgetCode = props.node?.widgetCode;
|
|
3125
3471
|
if (!widgetCode) {
|
|
3126
|
-
return /* @__PURE__ */
|
|
3472
|
+
return /* @__PURE__ */ jsx58(Fragment7, { children: "Invalid widget" });
|
|
3127
3473
|
}
|
|
3128
3474
|
const SelectedWidget = getWidget(widgetCode);
|
|
3129
3475
|
if (!SelectedWidget) {
|
|
3130
3476
|
if (process.env.NODE_ENV !== "production") {
|
|
3131
3477
|
console.warn("Widget not found:", widgetCode);
|
|
3132
3478
|
}
|
|
3133
|
-
return /* @__PURE__ */
|
|
3479
|
+
return /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
3134
3480
|
"Widget not found: ",
|
|
3135
3481
|
widgetCode
|
|
3136
3482
|
] });
|
|
@@ -3138,7 +3484,7 @@ var WidgetNode = (props) => {
|
|
|
3138
3484
|
const widgetParams = getWidgetParameters();
|
|
3139
3485
|
return (
|
|
3140
3486
|
// eslint-disable-next-line react-hooks/static-components
|
|
3141
|
-
/* @__PURE__ */
|
|
3487
|
+
/* @__PURE__ */ jsx58(
|
|
3142
3488
|
SelectedWidget,
|
|
3143
3489
|
{
|
|
3144
3490
|
params: widgetParams,
|
|
@@ -3154,12 +3500,12 @@ var WidgetNode = (props) => {
|
|
|
3154
3500
|
var WidgetNode_default = WidgetNode;
|
|
3155
3501
|
|
|
3156
3502
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3157
|
-
import
|
|
3503
|
+
import React44, { useRef as useRef5, useReducer as useReducer2, useCallback as useCallback4, useEffect as useEffect9 } from "react";
|
|
3158
3504
|
|
|
3159
3505
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3160
|
-
import { jsx as
|
|
3506
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
3161
3507
|
var InputControlNode = (props) => {
|
|
3162
|
-
return /* @__PURE__ */
|
|
3508
|
+
return /* @__PURE__ */ jsx59("div", { children: /* @__PURE__ */ jsx59(
|
|
3163
3509
|
InputControl_default,
|
|
3164
3510
|
{
|
|
3165
3511
|
name: props.node.name,
|
|
@@ -3393,22 +3739,22 @@ var ServiceClient = class {
|
|
|
3393
3739
|
var ServiceClient_default = ServiceClient;
|
|
3394
3740
|
|
|
3395
3741
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3396
|
-
import { jsx as
|
|
3742
|
+
import { jsx as jsx60, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3397
3743
|
var FormContainerNode = (props) => {
|
|
3398
3744
|
const NodeTypes2 = {
|
|
3399
3745
|
["input-control"]: InputControlNode_default
|
|
3400
3746
|
};
|
|
3401
3747
|
const { node } = props;
|
|
3402
|
-
const formRef =
|
|
3748
|
+
const formRef = useRef5(null);
|
|
3403
3749
|
const initialState = {
|
|
3404
3750
|
inputValues: {},
|
|
3405
3751
|
lastPropertyChanged: ""
|
|
3406
3752
|
};
|
|
3407
3753
|
const [formState, dispatch] = useReducer2(FormReducer_default, initialState);
|
|
3408
|
-
const handleInputChange =
|
|
3754
|
+
const handleInputChange = useCallback4((updatedValues) => {
|
|
3409
3755
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
3410
3756
|
}, [dispatch]);
|
|
3411
|
-
|
|
3757
|
+
useEffect9(() => {
|
|
3412
3758
|
const fetchInitialData = async () => {
|
|
3413
3759
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
3414
3760
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -3423,12 +3769,12 @@ var FormContainerNode = (props) => {
|
|
|
3423
3769
|
};
|
|
3424
3770
|
fetchInitialData();
|
|
3425
3771
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3426
|
-
return /* @__PURE__ */
|
|
3772
|
+
return /* @__PURE__ */ jsxs29("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3427
3773
|
node.children && node.children.map((node2, index) => {
|
|
3428
3774
|
{
|
|
3429
3775
|
}
|
|
3430
3776
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3431
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ jsx60(React44.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx60(
|
|
3432
3778
|
InputControlNode_default,
|
|
3433
3779
|
{
|
|
3434
3780
|
value: formState.inputValues[node2.name],
|
|
@@ -3437,51 +3783,51 @@ var FormContainerNode = (props) => {
|
|
|
3437
3783
|
}
|
|
3438
3784
|
) }, index);
|
|
3439
3785
|
}),
|
|
3440
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3786
|
+
node.children.length == 0 && /* @__PURE__ */ jsx60("div", { className: "py-0.5 lg:py-1.5" })
|
|
3441
3787
|
] });
|
|
3442
3788
|
};
|
|
3443
3789
|
var FormContainerNode_default = FormContainerNode;
|
|
3444
3790
|
|
|
3445
3791
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3446
|
-
import
|
|
3792
|
+
import React50 from "react";
|
|
3447
3793
|
|
|
3448
3794
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3449
|
-
import
|
|
3795
|
+
import React46, { useEffect as useEffect10, useRef as useRef6, useState as useState10 } from "react";
|
|
3450
3796
|
|
|
3451
3797
|
// src/components/IFrameLoaderView.tsx
|
|
3452
|
-
import
|
|
3453
|
-
import { jsx as
|
|
3798
|
+
import React45 from "react";
|
|
3799
|
+
import { jsx as jsx61, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3454
3800
|
var IFrameLoaderView = (props) => {
|
|
3455
|
-
return /* @__PURE__ */
|
|
3456
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
3457
|
-
/* @__PURE__ */
|
|
3458
|
-
/* @__PURE__ */
|
|
3459
|
-
/* @__PURE__ */
|
|
3460
|
-
/* @__PURE__ */
|
|
3461
|
-
/* @__PURE__ */
|
|
3801
|
+
return /* @__PURE__ */ jsxs30(React45.Fragment, { children: [
|
|
3802
|
+
props.isDataFound == null && /* @__PURE__ */ jsx61("div", { className: "", children: /* @__PURE__ */ jsxs30("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3803
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center mb-4", children: [
|
|
3804
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3805
|
+
/* @__PURE__ */ jsxs30("div", { className: "ml-2", children: [
|
|
3806
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3807
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3462
3808
|
] })
|
|
3463
3809
|
] }),
|
|
3464
|
-
/* @__PURE__ */
|
|
3465
|
-
/* @__PURE__ */
|
|
3466
|
-
/* @__PURE__ */
|
|
3467
|
-
/* @__PURE__ */
|
|
3468
|
-
/* @__PURE__ */
|
|
3469
|
-
/* @__PURE__ */
|
|
3470
|
-
/* @__PURE__ */
|
|
3810
|
+
/* @__PURE__ */ jsxs30("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3811
|
+
/* @__PURE__ */ jsxs30("div", { className: "animate-pulse", children: [
|
|
3812
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3813
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3814
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3815
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3816
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3471
3817
|
] }),
|
|
3472
|
-
/* @__PURE__ */
|
|
3473
|
-
/* @__PURE__ */
|
|
3474
|
-
/* @__PURE__ */
|
|
3475
|
-
/* @__PURE__ */
|
|
3476
|
-
/* @__PURE__ */
|
|
3477
|
-
/* @__PURE__ */
|
|
3818
|
+
/* @__PURE__ */ jsxs30("div", { className: "animate-pulse", children: [
|
|
3819
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3820
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3821
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3822
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3823
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3478
3824
|
] }),
|
|
3479
|
-
/* @__PURE__ */
|
|
3480
|
-
/* @__PURE__ */
|
|
3481
|
-
/* @__PURE__ */
|
|
3482
|
-
/* @__PURE__ */
|
|
3483
|
-
/* @__PURE__ */
|
|
3484
|
-
/* @__PURE__ */
|
|
3825
|
+
/* @__PURE__ */ jsxs30("div", { className: "animate-pulse", children: [
|
|
3826
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3827
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3828
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3829
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3830
|
+
/* @__PURE__ */ jsx61("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3485
3831
|
] })
|
|
3486
3832
|
] })
|
|
3487
3833
|
] }) }),
|
|
@@ -3491,12 +3837,12 @@ var IFrameLoaderView = (props) => {
|
|
|
3491
3837
|
var IFrameLoaderView_default = IFrameLoaderView;
|
|
3492
3838
|
|
|
3493
3839
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3494
|
-
import { jsx as
|
|
3840
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3495
3841
|
var IframeClient = ({ src }) => {
|
|
3496
|
-
const iframeRef =
|
|
3497
|
-
const [iframeHeight, setIframeHeight] =
|
|
3498
|
-
const [isDataFound, setIsDataFound] =
|
|
3499
|
-
|
|
3842
|
+
const iframeRef = useRef6(null);
|
|
3843
|
+
const [iframeHeight, setIframeHeight] = useState10("100%");
|
|
3844
|
+
const [isDataFound, setIsDataFound] = useState10(null);
|
|
3845
|
+
useEffect10(() => {
|
|
3500
3846
|
const handleReceiveMessage = (event) => {
|
|
3501
3847
|
const eventName = event?.data?.eventName;
|
|
3502
3848
|
const payload = event?.data?.payload;
|
|
@@ -3511,7 +3857,7 @@ var IframeClient = ({ src }) => {
|
|
|
3511
3857
|
window.addEventListener("message", handleReceiveMessage);
|
|
3512
3858
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3513
3859
|
}, []);
|
|
3514
|
-
|
|
3860
|
+
useEffect10(() => {
|
|
3515
3861
|
const handleResize = () => {
|
|
3516
3862
|
if (iframeRef.current) {
|
|
3517
3863
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3523,7 +3869,7 @@ var IframeClient = ({ src }) => {
|
|
|
3523
3869
|
const handleIframeLoad = () => {
|
|
3524
3870
|
setIsDataFound(true);
|
|
3525
3871
|
};
|
|
3526
|
-
return /* @__PURE__ */
|
|
3872
|
+
return /* @__PURE__ */ jsx62(React46.Fragment, { children: /* @__PURE__ */ jsx62(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ jsx62(
|
|
3527
3873
|
"iframe",
|
|
3528
3874
|
{
|
|
3529
3875
|
ref: iframeRef,
|
|
@@ -3538,7 +3884,7 @@ var IframeClient = ({ src }) => {
|
|
|
3538
3884
|
var IframeClient_default = IframeClient;
|
|
3539
3885
|
|
|
3540
3886
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3541
|
-
import { jsx as
|
|
3887
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3542
3888
|
var EmbedNode = (props) => {
|
|
3543
3889
|
let src;
|
|
3544
3890
|
if (props.node.provider == "youtube") {
|
|
@@ -3548,26 +3894,13 @@ var EmbedNode = (props) => {
|
|
|
3548
3894
|
} else {
|
|
3549
3895
|
src = props.node.embedSrc;
|
|
3550
3896
|
}
|
|
3551
|
-
return /* @__PURE__ */
|
|
3897
|
+
return /* @__PURE__ */ jsx63("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx63(IframeClient_default, { src }) });
|
|
3552
3898
|
};
|
|
3553
3899
|
var EmbedNode_default = EmbedNode;
|
|
3554
3900
|
|
|
3555
|
-
// src/components/utilities/AssetUtility.tsx
|
|
3556
|
-
var AssetUtility = class {
|
|
3557
|
-
constructor() {
|
|
3558
|
-
}
|
|
3559
|
-
static resolveUrl(apiBaseUrl, url) {
|
|
3560
|
-
if (!url) return void 0;
|
|
3561
|
-
if (url.startsWith("http")) return url;
|
|
3562
|
-
if (!apiBaseUrl) return url;
|
|
3563
|
-
return `${apiBaseUrl}/digitalassets-management/${url}`;
|
|
3564
|
-
}
|
|
3565
|
-
};
|
|
3566
|
-
var AssetUtility_default = AssetUtility;
|
|
3567
|
-
|
|
3568
3901
|
// src/components/Slider.tsx
|
|
3569
|
-
import
|
|
3570
|
-
import { Fragment as Fragment8, jsx as
|
|
3902
|
+
import React47, { useState as useState11, useEffect as useEffect11, Children, cloneElement } from "react";
|
|
3903
|
+
import { Fragment as Fragment8, jsx as jsx64, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3571
3904
|
var Slider = ({
|
|
3572
3905
|
children,
|
|
3573
3906
|
slidesToShow = 4,
|
|
@@ -3585,13 +3918,13 @@ var Slider = ({
|
|
|
3585
3918
|
pillStyle = "cumulative",
|
|
3586
3919
|
progressPosition = "bottom"
|
|
3587
3920
|
}) => {
|
|
3588
|
-
const [currentSlide, setCurrentSlide] =
|
|
3589
|
-
const [transition, setTransition] =
|
|
3590
|
-
const [slidesToShowState, setSlidesToShowState] =
|
|
3921
|
+
const [currentSlide, setCurrentSlide] = useState11(0);
|
|
3922
|
+
const [transition, setTransition] = useState11(true);
|
|
3923
|
+
const [slidesToShowState, setSlidesToShowState] = useState11(
|
|
3591
3924
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3592
3925
|
);
|
|
3593
|
-
const [isPlaying, setIsPlaying] =
|
|
3594
|
-
|
|
3926
|
+
const [isPlaying, setIsPlaying] = useState11(autoplay);
|
|
3927
|
+
useEffect11(() => {
|
|
3595
3928
|
if (typeof slidesToShow === "number") return;
|
|
3596
3929
|
const handleResize = () => {
|
|
3597
3930
|
if (window.innerWidth >= 1024) {
|
|
@@ -3606,7 +3939,7 @@ var Slider = ({
|
|
|
3606
3939
|
window.addEventListener("resize", handleResize);
|
|
3607
3940
|
return () => window.removeEventListener("resize", handleResize);
|
|
3608
3941
|
}, [slidesToShow]);
|
|
3609
|
-
|
|
3942
|
+
useEffect11(() => {
|
|
3610
3943
|
if (!autoplay) return;
|
|
3611
3944
|
const timer = setInterval(() => {
|
|
3612
3945
|
if (isPlaying) {
|
|
@@ -3661,10 +3994,10 @@ var Slider = ({
|
|
|
3661
3994
|
};
|
|
3662
3995
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3663
3996
|
const slides = Children.map(children, (child, index) => {
|
|
3664
|
-
if (!
|
|
3997
|
+
if (!React47.isValidElement(child)) return null;
|
|
3665
3998
|
const childProps = child.props;
|
|
3666
3999
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3667
|
-
return /* @__PURE__ */
|
|
4000
|
+
return /* @__PURE__ */ jsx64(
|
|
3668
4001
|
"div",
|
|
3669
4002
|
{
|
|
3670
4003
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -3687,14 +4020,14 @@ var Slider = ({
|
|
|
3687
4020
|
return "bottom-4";
|
|
3688
4021
|
}
|
|
3689
4022
|
};
|
|
3690
|
-
return /* @__PURE__ */
|
|
4023
|
+
return /* @__PURE__ */ jsxs31(
|
|
3691
4024
|
"div",
|
|
3692
4025
|
{
|
|
3693
4026
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3694
4027
|
onMouseEnter: handleMouseEnter,
|
|
3695
4028
|
onMouseLeave: handleMouseLeave,
|
|
3696
4029
|
children: [
|
|
3697
|
-
/* @__PURE__ */
|
|
4030
|
+
/* @__PURE__ */ jsx64(
|
|
3698
4031
|
"div",
|
|
3699
4032
|
{
|
|
3700
4033
|
className: "flex h-full",
|
|
@@ -3705,18 +4038,18 @@ var Slider = ({
|
|
|
3705
4038
|
children: slides
|
|
3706
4039
|
}
|
|
3707
4040
|
),
|
|
3708
|
-
show_arrows && /* @__PURE__ */
|
|
3709
|
-
/* @__PURE__ */
|
|
4041
|
+
show_arrows && /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
4042
|
+
/* @__PURE__ */ jsx64(
|
|
3710
4043
|
ArrowButton,
|
|
3711
4044
|
{
|
|
3712
4045
|
direction: "left",
|
|
3713
4046
|
onClick: prevSlide,
|
|
3714
4047
|
visible: infinite_scroll || currentSlide > 0,
|
|
3715
4048
|
className: arrowClassName,
|
|
3716
|
-
children: /* @__PURE__ */
|
|
4049
|
+
children: /* @__PURE__ */ jsx64("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx64("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3717
4050
|
}
|
|
3718
4051
|
),
|
|
3719
|
-
/* @__PURE__ */
|
|
4052
|
+
/* @__PURE__ */ jsxs31(
|
|
3720
4053
|
ArrowButton,
|
|
3721
4054
|
{
|
|
3722
4055
|
direction: "right",
|
|
@@ -3724,13 +4057,13 @@ var Slider = ({
|
|
|
3724
4057
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3725
4058
|
className: arrowClassName,
|
|
3726
4059
|
children: [
|
|
3727
|
-
/* @__PURE__ */
|
|
4060
|
+
/* @__PURE__ */ jsx64("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx64("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3728
4061
|
" "
|
|
3729
4062
|
]
|
|
3730
4063
|
}
|
|
3731
4064
|
)
|
|
3732
4065
|
] }),
|
|
3733
|
-
show_dots && /* @__PURE__ */
|
|
4066
|
+
show_dots && /* @__PURE__ */ jsx64("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ jsx64(
|
|
3734
4067
|
ProgressPill,
|
|
3735
4068
|
{
|
|
3736
4069
|
active: index === currentSlide,
|
|
@@ -3756,7 +4089,7 @@ var ArrowButton = ({
|
|
|
3756
4089
|
visible,
|
|
3757
4090
|
children,
|
|
3758
4091
|
className = ""
|
|
3759
|
-
}) => /* @__PURE__ */
|
|
4092
|
+
}) => /* @__PURE__ */ jsx64(
|
|
3760
4093
|
"button",
|
|
3761
4094
|
{
|
|
3762
4095
|
className: `
|
|
@@ -3782,13 +4115,13 @@ var ProgressPill = ({
|
|
|
3782
4115
|
currentSlide,
|
|
3783
4116
|
totalSlides
|
|
3784
4117
|
}) => {
|
|
3785
|
-
const [progress, setProgress] =
|
|
3786
|
-
|
|
4118
|
+
const [progress, setProgress] = useState11(0);
|
|
4119
|
+
useEffect11(() => {
|
|
3787
4120
|
if (active) {
|
|
3788
4121
|
setProgress(0);
|
|
3789
4122
|
}
|
|
3790
4123
|
}, [active, index]);
|
|
3791
|
-
|
|
4124
|
+
useEffect11(() => {
|
|
3792
4125
|
if (!active || !isPlaying) {
|
|
3793
4126
|
if (!active) {
|
|
3794
4127
|
setProgress(0);
|
|
@@ -3843,7 +4176,7 @@ var ProgressPill = ({
|
|
|
3843
4176
|
const renderProgressBar = () => {
|
|
3844
4177
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3845
4178
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3846
|
-
return /* @__PURE__ */
|
|
4179
|
+
return /* @__PURE__ */ jsx64(
|
|
3847
4180
|
"div",
|
|
3848
4181
|
{
|
|
3849
4182
|
className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -3855,7 +4188,7 @@ var ProgressPill = ({
|
|
|
3855
4188
|
};
|
|
3856
4189
|
const renderCumulativeFill = () => {
|
|
3857
4190
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3858
|
-
return /* @__PURE__ */
|
|
4191
|
+
return /* @__PURE__ */ jsx64(
|
|
3859
4192
|
"div",
|
|
3860
4193
|
{
|
|
3861
4194
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3865,7 +4198,7 @@ var ProgressPill = ({
|
|
|
3865
4198
|
}
|
|
3866
4199
|
return null;
|
|
3867
4200
|
};
|
|
3868
|
-
return /* @__PURE__ */
|
|
4201
|
+
return /* @__PURE__ */ jsxs31(
|
|
3869
4202
|
"button",
|
|
3870
4203
|
{
|
|
3871
4204
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -3990,11 +4323,11 @@ var AnimationUtility = class {
|
|
|
3990
4323
|
var AnimationUtility_default = AnimationUtility;
|
|
3991
4324
|
|
|
3992
4325
|
// src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
|
|
3993
|
-
import
|
|
3994
|
-
import { Fragment as Fragment9, jsx as
|
|
4326
|
+
import React48, { useEffect as useEffect12, useRef as useRef7 } from "react";
|
|
4327
|
+
import { Fragment as Fragment9, jsx as jsx65 } from "react/jsx-runtime";
|
|
3995
4328
|
function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
3996
|
-
const ref =
|
|
3997
|
-
|
|
4329
|
+
const ref = useRef7(null);
|
|
4330
|
+
useEffect12(() => {
|
|
3998
4331
|
if (!hasEnterAnimation || !ref.current) return;
|
|
3999
4332
|
const observer = new IntersectionObserver(
|
|
4000
4333
|
(entries) => {
|
|
@@ -4010,9 +4343,9 @@ function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
|
4010
4343
|
observer.observe(ref.current);
|
|
4011
4344
|
return () => observer.disconnect();
|
|
4012
4345
|
}, [hasEnterAnimation]);
|
|
4013
|
-
return /* @__PURE__ */
|
|
4346
|
+
return /* @__PURE__ */ jsx65(Fragment9, { children: children && // enforce passing the ref to Wrapper
|
|
4014
4347
|
//@ts-ignore
|
|
4015
|
-
|
|
4348
|
+
React48.cloneElement(children, { ref }) });
|
|
4016
4349
|
}
|
|
4017
4350
|
|
|
4018
4351
|
// src/components/utilities/PathUtility.tsx
|
|
@@ -4067,10 +4400,10 @@ var PathUtility = class {
|
|
|
4067
4400
|
var PathUtility_default = new PathUtility();
|
|
4068
4401
|
|
|
4069
4402
|
// src/components/NoDataFound.tsx
|
|
4070
|
-
import { jsx as
|
|
4403
|
+
import { jsx as jsx66, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4071
4404
|
var NoDataFound = () => {
|
|
4072
|
-
return /* @__PURE__ */
|
|
4073
|
-
/* @__PURE__ */
|
|
4405
|
+
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4406
|
+
/* @__PURE__ */ jsx66("div", { className: "mb-5", children: /* @__PURE__ */ jsx66("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx66(
|
|
4074
4407
|
"svg",
|
|
4075
4408
|
{
|
|
4076
4409
|
className: "w-10 h-10",
|
|
@@ -4078,7 +4411,7 @@ var NoDataFound = () => {
|
|
|
4078
4411
|
stroke: "currentColor",
|
|
4079
4412
|
viewBox: "0 0 24 24",
|
|
4080
4413
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4081
|
-
children: /* @__PURE__ */
|
|
4414
|
+
children: /* @__PURE__ */ jsx66(
|
|
4082
4415
|
"path",
|
|
4083
4416
|
{
|
|
4084
4417
|
strokeLinecap: "round",
|
|
@@ -4089,15 +4422,15 @@ var NoDataFound = () => {
|
|
|
4089
4422
|
)
|
|
4090
4423
|
}
|
|
4091
4424
|
) }) }),
|
|
4092
|
-
/* @__PURE__ */
|
|
4093
|
-
/* @__PURE__ */
|
|
4425
|
+
/* @__PURE__ */ jsx66("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4426
|
+
/* @__PURE__ */ jsx66("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4094
4427
|
] });
|
|
4095
4428
|
};
|
|
4096
4429
|
var NoDataFound_default = NoDataFound;
|
|
4097
4430
|
|
|
4098
4431
|
// src/components/Pagination.tsx
|
|
4099
4432
|
import { useMemo } from "react";
|
|
4100
|
-
import { jsx as
|
|
4433
|
+
import { jsx as jsx67, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4101
4434
|
var Pagination = (props) => {
|
|
4102
4435
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4103
4436
|
const builder = useMemo(() => {
|
|
@@ -4141,7 +4474,7 @@ var Pagination = (props) => {
|
|
|
4141
4474
|
return range;
|
|
4142
4475
|
};
|
|
4143
4476
|
const paginationRange = getPaginationRange();
|
|
4144
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
4477
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx67(
|
|
4145
4478
|
Hyperlink,
|
|
4146
4479
|
{
|
|
4147
4480
|
linkType: "Link" /* Link */,
|
|
@@ -4156,9 +4489,9 @@ var Pagination = (props) => {
|
|
|
4156
4489
|
);
|
|
4157
4490
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4158
4491
|
if (disabled) {
|
|
4159
|
-
return /* @__PURE__ */
|
|
4492
|
+
return /* @__PURE__ */ jsx67("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
4160
4493
|
}
|
|
4161
|
-
return /* @__PURE__ */
|
|
4494
|
+
return /* @__PURE__ */ jsx67(
|
|
4162
4495
|
Hyperlink,
|
|
4163
4496
|
{
|
|
4164
4497
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
|
|
@@ -4168,35 +4501,35 @@ var Pagination = (props) => {
|
|
|
4168
4501
|
);
|
|
4169
4502
|
};
|
|
4170
4503
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4171
|
-
return /* @__PURE__ */
|
|
4172
|
-
/* @__PURE__ */
|
|
4173
|
-
/* @__PURE__ */
|
|
4504
|
+
return /* @__PURE__ */ jsxs33("div", { className: "py-6 border-t bg-default", children: [
|
|
4505
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4506
|
+
/* @__PURE__ */ jsxs33("div", { className: "text-sm", children: [
|
|
4174
4507
|
"Showing ",
|
|
4175
|
-
/* @__PURE__ */
|
|
4508
|
+
/* @__PURE__ */ jsxs33("span", { className: "font-semibold", children: [
|
|
4176
4509
|
startItem,
|
|
4177
4510
|
"-",
|
|
4178
4511
|
endItem
|
|
4179
4512
|
] }),
|
|
4180
4513
|
" ",
|
|
4181
4514
|
"out of ",
|
|
4182
|
-
/* @__PURE__ */
|
|
4515
|
+
/* @__PURE__ */ jsx67("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4183
4516
|
" results"
|
|
4184
4517
|
] }),
|
|
4185
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4186
|
-
/* @__PURE__ */
|
|
4518
|
+
totalPages > 1 && /* @__PURE__ */ jsxs33("div", { className: "flex items-center space-x-1", children: [
|
|
4519
|
+
/* @__PURE__ */ jsxs33(
|
|
4187
4520
|
NavigationButton,
|
|
4188
4521
|
{
|
|
4189
4522
|
page: activePageNumber - 1,
|
|
4190
4523
|
disabled: activePageNumber === 1,
|
|
4191
4524
|
children: [
|
|
4192
|
-
/* @__PURE__ */
|
|
4193
|
-
/* @__PURE__ */
|
|
4525
|
+
/* @__PURE__ */ jsx67("span", { children: /* @__PURE__ */ jsx67(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4526
|
+
/* @__PURE__ */ jsx67("span", { className: "text-sm", children: "Prev" })
|
|
4194
4527
|
]
|
|
4195
4528
|
}
|
|
4196
4529
|
),
|
|
4197
4530
|
paginationRange.map((item, index) => {
|
|
4198
4531
|
if (item === "...") {
|
|
4199
|
-
return /* @__PURE__ */
|
|
4532
|
+
return /* @__PURE__ */ jsx67(
|
|
4200
4533
|
"span",
|
|
4201
4534
|
{
|
|
4202
4535
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4206,23 +4539,23 @@ var Pagination = (props) => {
|
|
|
4206
4539
|
);
|
|
4207
4540
|
}
|
|
4208
4541
|
const page = item;
|
|
4209
|
-
return /* @__PURE__ */
|
|
4542
|
+
return /* @__PURE__ */ jsx67(PageButton, { page, children: page }, page);
|
|
4210
4543
|
}),
|
|
4211
|
-
/* @__PURE__ */
|
|
4544
|
+
/* @__PURE__ */ jsxs33(
|
|
4212
4545
|
NavigationButton,
|
|
4213
4546
|
{
|
|
4214
4547
|
page: activePageNumber + 1,
|
|
4215
4548
|
disabled: activePageNumber === totalPages,
|
|
4216
4549
|
children: [
|
|
4217
|
-
/* @__PURE__ */
|
|
4218
|
-
/* @__PURE__ */
|
|
4550
|
+
/* @__PURE__ */ jsx67("span", { className: "text-sm", children: "Next" }),
|
|
4551
|
+
/* @__PURE__ */ jsx67("span", { children: /* @__PURE__ */ jsx67(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4219
4552
|
]
|
|
4220
4553
|
}
|
|
4221
4554
|
)
|
|
4222
4555
|
] }),
|
|
4223
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4224
|
-
/* @__PURE__ */
|
|
4225
|
-
/* @__PURE__ */
|
|
4556
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs33("div", { className: "flex items-center space-x-2", children: [
|
|
4557
|
+
/* @__PURE__ */ jsx67("span", { className: "text-sm", children: "Go to:" }),
|
|
4558
|
+
/* @__PURE__ */ jsx67("div", { className: "relative", children: /* @__PURE__ */ jsx67(
|
|
4226
4559
|
"input",
|
|
4227
4560
|
{
|
|
4228
4561
|
type: "number",
|
|
@@ -4243,9 +4576,9 @@ var Pagination = (props) => {
|
|
|
4243
4576
|
) })
|
|
4244
4577
|
] })
|
|
4245
4578
|
] }),
|
|
4246
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
4247
|
-
/* @__PURE__ */
|
|
4248
|
-
/* @__PURE__ */
|
|
4579
|
+
showPageSizeSelector && /* @__PURE__ */ jsx67("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4580
|
+
/* @__PURE__ */ jsx67("span", { className: "text-sm", children: "Show:" }),
|
|
4581
|
+
/* @__PURE__ */ jsx67("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx67(
|
|
4249
4582
|
Hyperlink,
|
|
4250
4583
|
{
|
|
4251
4584
|
className: `
|
|
@@ -4257,14 +4590,14 @@ var Pagination = (props) => {
|
|
|
4257
4590
|
},
|
|
4258
4591
|
size
|
|
4259
4592
|
)) }),
|
|
4260
|
-
/* @__PURE__ */
|
|
4593
|
+
/* @__PURE__ */ jsx67("span", { className: "text-sm", children: "per page" })
|
|
4261
4594
|
] }) })
|
|
4262
4595
|
] });
|
|
4263
4596
|
};
|
|
4264
4597
|
var Pagination_default = Pagination;
|
|
4265
4598
|
|
|
4266
4599
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4267
|
-
import { jsx as
|
|
4600
|
+
import { jsx as jsx68, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4268
4601
|
function toCamelCase(str) {
|
|
4269
4602
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4270
4603
|
}
|
|
@@ -4278,7 +4611,7 @@ function convertKeysToCamelCase(obj) {
|
|
|
4278
4611
|
])
|
|
4279
4612
|
);
|
|
4280
4613
|
}
|
|
4281
|
-
var
|
|
4614
|
+
var getNestedValue2 = (obj, path) => {
|
|
4282
4615
|
if (!obj || !path) return void 0;
|
|
4283
4616
|
return path.split(".").reduce((current, key) => {
|
|
4284
4617
|
{
|
|
@@ -4419,7 +4752,7 @@ var DivContainer = async (props) => {
|
|
|
4419
4752
|
}
|
|
4420
4753
|
const shouldHideContainer = () => {
|
|
4421
4754
|
if (!props.node.fieldVisibleOnTrue) return false;
|
|
4422
|
-
const fieldValue =
|
|
4755
|
+
const fieldValue = getNestedValue2(props.dataitem, props.node.fieldVisibleOnTrue);
|
|
4423
4756
|
return fieldValue !== void 0 && fieldValue === false;
|
|
4424
4757
|
};
|
|
4425
4758
|
const isHidden = shouldHideContainer();
|
|
@@ -4446,10 +4779,10 @@ var DivContainer = async (props) => {
|
|
|
4446
4779
|
response = await serviceClient.get(endpoint);
|
|
4447
4780
|
result = response?.result;
|
|
4448
4781
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4449
|
-
return /* @__PURE__ */
|
|
4782
|
+
return /* @__PURE__ */ jsx68(NoDataFound_default, {});
|
|
4450
4783
|
}
|
|
4451
4784
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4452
|
-
childCollectionData =
|
|
4785
|
+
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
4453
4786
|
}
|
|
4454
4787
|
}
|
|
4455
4788
|
const cssResult = generateCssString(guid, updatedStyle, mobileStyles);
|
|
@@ -4458,7 +4791,7 @@ var DivContainer = async (props) => {
|
|
|
4458
4791
|
}
|
|
4459
4792
|
const SelectedNode = NodeTypes2[node.type];
|
|
4460
4793
|
if (!SelectedNode) return null;
|
|
4461
|
-
return /* @__PURE__ */
|
|
4794
|
+
return /* @__PURE__ */ jsx68(React50.Fragment, { children: /* @__PURE__ */ jsx68(
|
|
4462
4795
|
SelectedNode,
|
|
4463
4796
|
{
|
|
4464
4797
|
node,
|
|
@@ -4557,9 +4890,9 @@ var DivContainer = async (props) => {
|
|
|
4557
4890
|
props.node.autoFormat && "auto-format",
|
|
4558
4891
|
props.node.bgClass
|
|
4559
4892
|
].filter(Boolean).join(" ");
|
|
4560
|
-
return /* @__PURE__ */
|
|
4561
|
-
/* @__PURE__ */
|
|
4562
|
-
/* @__PURE__ */
|
|
4893
|
+
return /* @__PURE__ */ jsxs34(React50.Fragment, { children: [
|
|
4894
|
+
/* @__PURE__ */ jsx68("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4895
|
+
/* @__PURE__ */ jsx68(EnterAnimationClient, { hasEnterAnimation: !!props.node.enterAnimation, children: /* @__PURE__ */ jsx68(React50.Fragment, { children: /* @__PURE__ */ jsx68(
|
|
4563
4896
|
Wrapper,
|
|
4564
4897
|
{
|
|
4565
4898
|
id: guid,
|
|
@@ -4568,18 +4901,18 @@ var DivContainer = async (props) => {
|
|
|
4568
4901
|
...wrapperProps,
|
|
4569
4902
|
children: dataToRender.map(
|
|
4570
4903
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4571
|
-
(child, i) => /* @__PURE__ */
|
|
4904
|
+
(child, i) => /* @__PURE__ */ jsx68(React50.Fragment, { children: child }, i)
|
|
4572
4905
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4573
4906
|
)
|
|
4574
4907
|
}
|
|
4575
4908
|
) }) }),
|
|
4576
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4909
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx68("div", { children: /* @__PURE__ */ jsx68(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4577
4910
|
] });
|
|
4578
4911
|
};
|
|
4579
4912
|
var DivContainer_default = DivContainer;
|
|
4580
4913
|
|
|
4581
4914
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4582
|
-
import { jsx as
|
|
4915
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4583
4916
|
var NodeTypes = {
|
|
4584
4917
|
["paragraph"]: ParagraphNode_default,
|
|
4585
4918
|
["heading"]: HeadingNode_default,
|
|
@@ -4606,11 +4939,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4606
4939
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4607
4940
|
rootNode = pageBodyTree.root;
|
|
4608
4941
|
}
|
|
4609
|
-
return /* @__PURE__ */
|
|
4942
|
+
return /* @__PURE__ */ jsx69(React51.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4610
4943
|
{
|
|
4611
4944
|
}
|
|
4612
4945
|
const SelectedNode = NodeTypes[node.type];
|
|
4613
|
-
return /* @__PURE__ */
|
|
4946
|
+
return /* @__PURE__ */ jsx69(React51.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx69(React51.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx69(React51.Fragment, { children: /* @__PURE__ */ jsx69(
|
|
4614
4947
|
SelectedNode,
|
|
4615
4948
|
{
|
|
4616
4949
|
node,
|
|
@@ -4622,9 +4955,10 @@ var PageBodyRenderer = (props) => {
|
|
|
4622
4955
|
path: props.path,
|
|
4623
4956
|
apiBaseUrl: props.apiBaseUrl,
|
|
4624
4957
|
serviceClient: props.serviceClient,
|
|
4625
|
-
assetBaseUrl: props.assetBaseUrl
|
|
4958
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
4959
|
+
device: props.device
|
|
4626
4960
|
}
|
|
4627
|
-
) }) : /* @__PURE__ */
|
|
4961
|
+
) }) : /* @__PURE__ */ jsx69(React51.Fragment, { children: /* @__PURE__ */ jsx69(
|
|
4628
4962
|
SelectedNode,
|
|
4629
4963
|
{
|
|
4630
4964
|
node,
|
|
@@ -4635,7 +4969,8 @@ var PageBodyRenderer = (props) => {
|
|
|
4635
4969
|
path: props.path,
|
|
4636
4970
|
apiBaseUrl: props.apiBaseUrl,
|
|
4637
4971
|
serviceClient: props.serviceClient,
|
|
4638
|
-
assetBaseUrl: props.assetBaseUrl
|
|
4972
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
4973
|
+
device: props.device
|
|
4639
4974
|
}
|
|
4640
4975
|
) }) }) }, index);
|
|
4641
4976
|
}) });
|