@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260324145831 → 0.8.1-dev.20260324170629
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 +514 -202
- package/dist/index.mjs +509 -197
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1345,7 +1345,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1345
1345
|
const containerRef = (0, import_react27.useRef)(null);
|
|
1346
1346
|
const [isCreateOpen, setIsCreateOpen] = (0, import_react27.useState)(false);
|
|
1347
1347
|
const [formData, setFormData] = (0, import_react27.useState)({});
|
|
1348
|
-
const
|
|
1348
|
+
const getNestedValue3 = (obj, path) => {
|
|
1349
1349
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
1350
1350
|
};
|
|
1351
1351
|
(0, import_react27.useEffect)(() => {
|
|
@@ -1383,7 +1383,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1383
1383
|
props.dataSourceDependsOn
|
|
1384
1384
|
]);
|
|
1385
1385
|
const filteredItems = list?.filter((item) => {
|
|
1386
|
-
const value =
|
|
1386
|
+
const value = getNestedValue3(item, props.dataTextFieldName);
|
|
1387
1387
|
return value?.toLowerCase().includes(searchTerm?.toLowerCase());
|
|
1388
1388
|
});
|
|
1389
1389
|
const playBeep = () => {
|
|
@@ -1414,7 +1414,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1414
1414
|
}, [searchTerm]);
|
|
1415
1415
|
const handleSelect = (event, item) => {
|
|
1416
1416
|
event.preventDefault();
|
|
1417
|
-
setSearchTerm(
|
|
1417
|
+
setSearchTerm(getNestedValue3(item, props.dataTextFieldName));
|
|
1418
1418
|
if (props.callback) {
|
|
1419
1419
|
const val = {};
|
|
1420
1420
|
props.callback({
|
|
@@ -1564,7 +1564,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1564
1564
|
role: "option",
|
|
1565
1565
|
tabIndex: -1,
|
|
1566
1566
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1567
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children:
|
|
1567
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1568
1568
|
}
|
|
1569
1569
|
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1570
1570
|
}
|
|
@@ -2556,7 +2556,7 @@ var DataList = (props) => {
|
|
|
2556
2556
|
var DataList_default = DataList;
|
|
2557
2557
|
|
|
2558
2558
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2559
|
-
var
|
|
2559
|
+
var import_react51 = __toESM(require("react"));
|
|
2560
2560
|
|
|
2561
2561
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2562
2562
|
var import_react36 = __toESM(require("react"));
|
|
@@ -3063,42 +3063,391 @@ var HorizontalRuleNode = () => {
|
|
|
3063
3063
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3064
3064
|
|
|
3065
3065
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3066
|
+
var import_react44 = __toESM(require("react"));
|
|
3067
|
+
|
|
3068
|
+
// src/components/utilities/AssetUtility.tsx
|
|
3069
|
+
var AssetUtility = class {
|
|
3070
|
+
constructor() {
|
|
3071
|
+
}
|
|
3072
|
+
static resolveUrl(apiBaseUrl, url) {
|
|
3073
|
+
if (!url) return void 0;
|
|
3074
|
+
if (url.startsWith("http")) return url;
|
|
3075
|
+
if (!apiBaseUrl) return url;
|
|
3076
|
+
return `${apiBaseUrl}/digitalassets-management/${url}`;
|
|
3077
|
+
}
|
|
3078
|
+
};
|
|
3079
|
+
var AssetUtility_default = AssetUtility;
|
|
3080
|
+
|
|
3081
|
+
// src/components/HlsPlayer.tsx
|
|
3082
|
+
var import_react43 = __toESM(require("react"));
|
|
3083
|
+
var import_hls = __toESM(require("hls.js"));
|
|
3066
3084
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3085
|
+
var HlsPlayer = import_react43.default.memo(
|
|
3086
|
+
({
|
|
3087
|
+
assetUrl,
|
|
3088
|
+
posterUrl,
|
|
3089
|
+
intrinsicWidth,
|
|
3090
|
+
intrinsicHeight,
|
|
3091
|
+
showControls = true,
|
|
3092
|
+
loop = false,
|
|
3093
|
+
playOptions = "autoplay"
|
|
3094
|
+
}) => {
|
|
3095
|
+
const videoRef = (0, import_react43.useRef)(null);
|
|
3096
|
+
const hlsRef = (0, import_react43.useRef)(null);
|
|
3097
|
+
const [isPlaying, setIsPlaying] = (0, import_react43.useState)(playOptions === "autoplay");
|
|
3098
|
+
const [isHovered, setIsHovered] = (0, import_react43.useState)(false);
|
|
3099
|
+
const [isMobile, setIsMobile] = (0, import_react43.useState)(false);
|
|
3100
|
+
const wasManuallyPausedRef = (0, import_react43.useRef)(false);
|
|
3101
|
+
(0, import_react43.useEffect)(() => {
|
|
3102
|
+
const checkMobile = () => {
|
|
3103
|
+
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
3104
|
+
const isSmallScreen = window.innerWidth <= 768;
|
|
3105
|
+
const ua = navigator.userAgent.toLowerCase();
|
|
3106
|
+
const isMobileUA = /android|iphone|ipad|ipod/i.test(ua);
|
|
3107
|
+
setIsMobile(hasTouch || isSmallScreen || isMobileUA);
|
|
3108
|
+
};
|
|
3109
|
+
checkMobile();
|
|
3110
|
+
window.addEventListener("resize", checkMobile);
|
|
3111
|
+
return () => window.removeEventListener("resize", checkMobile);
|
|
3112
|
+
}, []);
|
|
3113
|
+
(0, import_react43.useEffect)(() => {
|
|
3114
|
+
const v = videoRef.current;
|
|
3115
|
+
if (!v || !assetUrl) return;
|
|
3116
|
+
if (hlsRef.current) {
|
|
3117
|
+
hlsRef.current.destroy();
|
|
3118
|
+
hlsRef.current = null;
|
|
3119
|
+
}
|
|
3120
|
+
if (import_hls.default.isSupported()) {
|
|
3121
|
+
const hls = new import_hls.default();
|
|
3122
|
+
hls.loadSource(assetUrl);
|
|
3123
|
+
hls.attachMedia(v);
|
|
3124
|
+
hls.on(import_hls.default.Events.MANIFEST_PARSED, () => {
|
|
3125
|
+
if (isPlaying && !wasManuallyPausedRef.current) {
|
|
3126
|
+
v.play().catch(console.error);
|
|
3127
|
+
}
|
|
3128
|
+
});
|
|
3129
|
+
hlsRef.current = hls;
|
|
3130
|
+
} else if (v.canPlayType("application/vnd.apple.mpegurl")) {
|
|
3131
|
+
v.src = assetUrl;
|
|
3132
|
+
}
|
|
3133
|
+
}, [assetUrl, isPlaying]);
|
|
3134
|
+
const handlePlayPause = (0, import_react43.useCallback)(() => {
|
|
3135
|
+
const v = videoRef.current;
|
|
3136
|
+
if (!v) return;
|
|
3137
|
+
if (v.paused) {
|
|
3138
|
+
wasManuallyPausedRef.current = false;
|
|
3139
|
+
v.play().then(() => setIsPlaying(true));
|
|
3140
|
+
} else {
|
|
3141
|
+
wasManuallyPausedRef.current = true;
|
|
3142
|
+
v.pause();
|
|
3143
|
+
setIsPlaying(false);
|
|
3144
|
+
}
|
|
3145
|
+
}, []);
|
|
3146
|
+
const handleMouseEnter = (0, import_react43.useCallback)(() => {
|
|
3147
|
+
if (isMobile) return;
|
|
3148
|
+
setIsHovered(true);
|
|
3149
|
+
if (playOptions === "playOnHover" && videoRef.current && !wasManuallyPausedRef.current) {
|
|
3150
|
+
videoRef.current.play().then(() => setIsPlaying(true));
|
|
3151
|
+
}
|
|
3152
|
+
}, [playOptions, isMobile]);
|
|
3153
|
+
const handleMouseLeave = (0, import_react43.useCallback)(() => {
|
|
3154
|
+
if (isMobile) return;
|
|
3155
|
+
setIsHovered(false);
|
|
3156
|
+
if (playOptions === "playOnHover" && videoRef.current) {
|
|
3157
|
+
videoRef.current.pause();
|
|
3158
|
+
videoRef.current.currentTime = 0;
|
|
3159
|
+
setIsPlaying(false);
|
|
3160
|
+
}
|
|
3161
|
+
}, [playOptions, isMobile]);
|
|
3162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3163
|
+
"div",
|
|
3164
|
+
{
|
|
3165
|
+
className: "relative w-full aspect-video bg-black",
|
|
3166
|
+
onMouseEnter: handleMouseEnter,
|
|
3167
|
+
onMouseLeave: handleMouseLeave,
|
|
3168
|
+
children: [
|
|
3169
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3170
|
+
"video",
|
|
3171
|
+
{
|
|
3172
|
+
ref: videoRef,
|
|
3173
|
+
className: "w-full h-full object-contain",
|
|
3174
|
+
poster: posterUrl,
|
|
3175
|
+
controls: showControls && (isMobile || isPlaying),
|
|
3176
|
+
muted: playOptions === "autoplay" || playOptions === "playOnHover",
|
|
3177
|
+
autoPlay: playOptions === "autoplay",
|
|
3178
|
+
loop,
|
|
3179
|
+
playsInline: true,
|
|
3180
|
+
onClick: !isMobile && !isPlaying ? handlePlayPause : void 0
|
|
3181
|
+
}
|
|
3182
|
+
),
|
|
3183
|
+
!isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3184
|
+
"img",
|
|
3185
|
+
{
|
|
3186
|
+
src: posterUrl,
|
|
3187
|
+
width: intrinsicWidth,
|
|
3188
|
+
height: intrinsicHeight,
|
|
3189
|
+
alt: "poster",
|
|
3190
|
+
className: `absolute inset-0 object-cover transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`
|
|
3191
|
+
}
|
|
3192
|
+
),
|
|
3193
|
+
!isMobile && !isPlaying && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3194
|
+
"div",
|
|
3195
|
+
{
|
|
3196
|
+
className: "absolute inset-0 flex items-center justify-center cursor-pointer",
|
|
3197
|
+
onClick: handlePlayPause,
|
|
3198
|
+
children: "\u25B6"
|
|
3199
|
+
}
|
|
3200
|
+
)
|
|
3201
|
+
]
|
|
3202
|
+
}
|
|
3203
|
+
);
|
|
3204
|
+
}
|
|
3205
|
+
);
|
|
3206
|
+
HlsPlayer.displayName = "HlsPlayer";
|
|
3207
|
+
var HlsPlayer_default = HlsPlayer;
|
|
3208
|
+
|
|
3209
|
+
// src/components/DeviceAssetSelector.tsx
|
|
3210
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3211
|
+
var DeviceAssetSelector = ({
|
|
3212
|
+
assets,
|
|
3213
|
+
apiBaseUrl,
|
|
3214
|
+
session,
|
|
3215
|
+
// This should receive the session
|
|
3216
|
+
width,
|
|
3217
|
+
tag,
|
|
3218
|
+
customProps,
|
|
3219
|
+
nodeProps,
|
|
3220
|
+
device
|
|
3221
|
+
}) => {
|
|
3222
|
+
console.log("\u{1F511} Session in DeviceAssetSelector:", session);
|
|
3223
|
+
const targetTag = tag || nodeProps?.tag;
|
|
3224
|
+
const selectAssetByDevice = (assets2, currentDevice) => {
|
|
3225
|
+
if (!assets2 || assets2.length === 0) return void 0;
|
|
3226
|
+
const exactMatch = assets2.find((asset) => asset.device === currentDevice);
|
|
3227
|
+
if (exactMatch) return exactMatch;
|
|
3228
|
+
const noDeviceMatch = assets2.find((asset) => !asset.device || asset.device === "");
|
|
3229
|
+
if (noDeviceMatch) return noDeviceMatch;
|
|
3230
|
+
return void 0;
|
|
3231
|
+
};
|
|
3232
|
+
const selectAssetByTagAndDevice = (assets2, currentDevice, targetTag2) => {
|
|
3233
|
+
if (!assets2 || assets2.length === 0) return void 0;
|
|
3234
|
+
if (!targetTag2) return selectAssetByDevice(assets2, currentDevice);
|
|
3235
|
+
const taggedAssets = assets2.filter((asset) => asset.tag === targetTag2);
|
|
3236
|
+
if (taggedAssets.length === 0) {
|
|
3237
|
+
return selectAssetByDevice(assets2, currentDevice);
|
|
3238
|
+
}
|
|
3239
|
+
const exactTaggedMatch = taggedAssets.find((asset) => asset.device === currentDevice);
|
|
3240
|
+
if (exactTaggedMatch) return exactTaggedMatch;
|
|
3241
|
+
const noDeviceTaggedMatch = taggedAssets.find((asset) => !asset.device || asset.device === "");
|
|
3242
|
+
if (noDeviceTaggedMatch) return noDeviceTaggedMatch;
|
|
3243
|
+
return void 0;
|
|
3244
|
+
};
|
|
3245
|
+
const selectAsset = () => {
|
|
3246
|
+
if (!assets || assets.length === 0) return void 0;
|
|
3247
|
+
if (targetTag) {
|
|
3248
|
+
return selectAssetByTagAndDevice(assets, device, targetTag);
|
|
3249
|
+
}
|
|
3250
|
+
return selectAssetByDevice(assets, device);
|
|
3251
|
+
};
|
|
3252
|
+
const selectedAsset = selectAsset();
|
|
3253
|
+
if (!selectedAsset) {
|
|
3254
|
+
console.warn("No suitable asset found for device:", device, "and tag:", targetTag);
|
|
3255
|
+
return null;
|
|
3256
|
+
}
|
|
3257
|
+
const resolvedAssetUrl = AssetUtility_default.resolveUrl(apiBaseUrl, selectedAsset.assetUrl);
|
|
3258
|
+
const resolvedThumbnailUrl = selectedAsset.posterUrl ? AssetUtility_default.resolveUrl(apiBaseUrl, selectedAsset.posterUrl) : void 0;
|
|
3259
|
+
console.log("Selected Asset:", resolvedThumbnailUrl);
|
|
3260
|
+
const title = selectedAsset.title || nodeProps?.title;
|
|
3261
|
+
const intrinsicWidth = selectedAsset.intrinsicWidth?.toString();
|
|
3262
|
+
const intrinsicHeight = selectedAsset.intrinsicHeight?.toString();
|
|
3263
|
+
const isHls = resolvedAssetUrl?.endsWith(".m3u8");
|
|
3264
|
+
const showControls = customProps?.showControls ?? nodeProps?.showControls === "true";
|
|
3265
|
+
const loop = customProps?.loop ?? nodeProps?.loop === "true";
|
|
3266
|
+
const playOptions = customProps?.playOptions ?? nodeProps?.playOptions;
|
|
3267
|
+
const styles = {};
|
|
3268
|
+
if (nodeProps?.height) {
|
|
3269
|
+
styles.height = nodeProps.height;
|
|
3270
|
+
}
|
|
3271
|
+
if (nodeProps?.borderRadius) {
|
|
3272
|
+
styles.borderRadius = nodeProps.borderRadius;
|
|
3273
|
+
}
|
|
3274
|
+
if (nodeProps?.width) {
|
|
3275
|
+
styles.width = nodeProps.width;
|
|
3276
|
+
}
|
|
3277
|
+
const FormatClass = {
|
|
3278
|
+
"center": "justify-center",
|
|
3279
|
+
"left": "justify-start",
|
|
3280
|
+
"right": "justify-end"
|
|
3281
|
+
};
|
|
3282
|
+
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
3283
|
+
const renderMedia = () => {
|
|
3284
|
+
if (isHls) {
|
|
3285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3286
|
+
HlsPlayer_default,
|
|
3287
|
+
{
|
|
3288
|
+
assetUrl: resolvedAssetUrl,
|
|
3289
|
+
posterUrl: resolvedThumbnailUrl,
|
|
3290
|
+
intrinsicWidth,
|
|
3291
|
+
intrinsicHeight,
|
|
3292
|
+
showControls,
|
|
3293
|
+
loop,
|
|
3294
|
+
playOptions
|
|
3295
|
+
}
|
|
3296
|
+
);
|
|
3297
|
+
} else {
|
|
3298
|
+
return (
|
|
3299
|
+
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3300
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3301
|
+
"img",
|
|
3302
|
+
{
|
|
3303
|
+
style: styles,
|
|
3304
|
+
loading: "lazy",
|
|
3305
|
+
className: "object-cover w-full",
|
|
3306
|
+
src: resolvedAssetUrl,
|
|
3307
|
+
width: selectedAsset.intrinsicWidth,
|
|
3308
|
+
alt: title || "Asset image",
|
|
3309
|
+
height: selectedAsset.intrinsicHeight
|
|
3310
|
+
}
|
|
3311
|
+
)
|
|
3312
|
+
);
|
|
3313
|
+
}
|
|
3314
|
+
};
|
|
3315
|
+
if (width) {
|
|
3316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { width }, children: renderMedia() });
|
|
3317
|
+
}
|
|
3318
|
+
if (nodeProps?.format) {
|
|
3319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3320
|
+
}
|
|
3321
|
+
return renderMedia();
|
|
3322
|
+
};
|
|
3323
|
+
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3324
|
+
|
|
3325
|
+
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3326
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3327
|
+
var getNestedValue = (obj, path) => {
|
|
3328
|
+
if (!obj || !path) return void 0;
|
|
3329
|
+
return path.split(".").reduce((current, key) => {
|
|
3330
|
+
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
3331
|
+
}, obj);
|
|
3332
|
+
};
|
|
3067
3333
|
var ImageNode = (props) => {
|
|
3068
|
-
|
|
3069
|
-
if (!node.imageUrl) return null;
|
|
3334
|
+
let assets;
|
|
3070
3335
|
let imageUrl;
|
|
3071
|
-
|
|
3072
|
-
|
|
3336
|
+
let posterUrl;
|
|
3337
|
+
const currentDevice = props.device;
|
|
3338
|
+
if (props.node.device) {
|
|
3339
|
+
const nodeDevice = props.node.device;
|
|
3340
|
+
if (nodeDevice !== currentDevice) {
|
|
3341
|
+
return null;
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
console.log("ImageNode device / currentDevice:", props.node.device, currentDevice);
|
|
3345
|
+
if (props.node.imageUrl.startsWith("http")) {
|
|
3346
|
+
imageUrl = props.node.imageUrl;
|
|
3347
|
+
posterUrl = AssetUtility_default.resolveUrl(
|
|
3348
|
+
props.assetBaseUrl,
|
|
3349
|
+
props.node.posterUrl
|
|
3350
|
+
);
|
|
3351
|
+
} else if (props.dataitem && props.node.datafield) {
|
|
3352
|
+
const image = getNestedValue(props.dataitem, props.node.datafield);
|
|
3353
|
+
console.log("ImageNode Datafield Image:", image);
|
|
3354
|
+
try {
|
|
3355
|
+
if (typeof image === "string") {
|
|
3356
|
+
assets = JSON.parse(image);
|
|
3357
|
+
} else if (Array.isArray(image)) {
|
|
3358
|
+
assets = image;
|
|
3359
|
+
} else if (image && typeof image === "object") {
|
|
3360
|
+
assets = [image];
|
|
3361
|
+
}
|
|
3362
|
+
} catch (error) {
|
|
3363
|
+
console.error("Error parsing assets in ImageNode:", error);
|
|
3364
|
+
}
|
|
3365
|
+
if (assets && assets.length > 0) {
|
|
3366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3367
|
+
DeviceAssetSelector_default,
|
|
3368
|
+
{
|
|
3369
|
+
device: props.device,
|
|
3370
|
+
assets,
|
|
3371
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
3372
|
+
session: props.session,
|
|
3373
|
+
nodeProps: {
|
|
3374
|
+
title: props.node.title,
|
|
3375
|
+
showControls: props.node.showControls,
|
|
3376
|
+
loop: props.node.loop,
|
|
3377
|
+
playOptions: props.node.playOptions,
|
|
3378
|
+
borderRadius: props.node.borderRadius,
|
|
3379
|
+
width: props.node.width,
|
|
3380
|
+
height: props.node.height,
|
|
3381
|
+
format: props.node.format,
|
|
3382
|
+
tag: props.node.tag,
|
|
3383
|
+
// Add tag to ImageNode if needed
|
|
3384
|
+
placementCode: props.node.placementCode
|
|
3385
|
+
}
|
|
3386
|
+
}
|
|
3387
|
+
) });
|
|
3388
|
+
} else {
|
|
3389
|
+
imageUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.imageUrl);
|
|
3390
|
+
posterUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.posterUrl);
|
|
3391
|
+
}
|
|
3073
3392
|
} else {
|
|
3074
|
-
imageUrl = assetBaseUrl
|
|
3393
|
+
imageUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.imageUrl);
|
|
3394
|
+
posterUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.posterUrl);
|
|
3075
3395
|
}
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
"
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3396
|
+
console.log("ImageNode Assets:", assets);
|
|
3397
|
+
if (!imageUrl) {
|
|
3398
|
+
return null;
|
|
3399
|
+
}
|
|
3400
|
+
const styles = {};
|
|
3401
|
+
if (props.node.height) styles.height = props.node.height;
|
|
3402
|
+
if (props.node.borderRadius) styles.borderRadius = props.node.borderRadius;
|
|
3403
|
+
if (props.node.width) styles.width = props.node.width;
|
|
3404
|
+
const FormatClass = {
|
|
3405
|
+
"center": "justify-center",
|
|
3406
|
+
"left": "justify-start",
|
|
3407
|
+
"right": "justify-end"
|
|
3408
|
+
};
|
|
3409
|
+
{
|
|
3410
|
+
}
|
|
3411
|
+
const formatClasses = FormatClass[props.node.format] || "";
|
|
3412
|
+
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3413
|
+
const renderMedia = () => {
|
|
3414
|
+
if (isHls) {
|
|
3415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3416
|
+
HlsPlayer_default,
|
|
3417
|
+
{
|
|
3418
|
+
assetUrl: imageUrl,
|
|
3419
|
+
posterUrl,
|
|
3420
|
+
intrinsicWidth: props.node.intrinsicWidth,
|
|
3421
|
+
intrinsicHeight: props.node.intrinsicHeight,
|
|
3422
|
+
showControls: props.node.showControls === "true",
|
|
3423
|
+
loop: props.node.loop === "true",
|
|
3424
|
+
playOptions: props.node.playOptions
|
|
3425
|
+
}
|
|
3426
|
+
);
|
|
3427
|
+
} else {
|
|
3428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react44.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3429
|
+
"img",
|
|
3430
|
+
{
|
|
3431
|
+
style: styles,
|
|
3432
|
+
loading: "lazy",
|
|
3433
|
+
className: "object-cover",
|
|
3434
|
+
src: imageUrl,
|
|
3435
|
+
width: props.node.intrinsicWidth,
|
|
3436
|
+
alt: props.node.title,
|
|
3437
|
+
height: props.node.intrinsicHeight
|
|
3438
|
+
}
|
|
3439
|
+
) });
|
|
3095
3440
|
}
|
|
3096
|
-
|
|
3441
|
+
};
|
|
3442
|
+
if (props.node.width) {
|
|
3443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3444
|
+
}
|
|
3445
|
+
return renderMedia();
|
|
3097
3446
|
};
|
|
3098
3447
|
var ImageNode_default = ImageNode;
|
|
3099
3448
|
|
|
3100
3449
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3101
|
-
var
|
|
3450
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3102
3451
|
var WidgetNode = (props) => {
|
|
3103
3452
|
const getWidgetParameters = () => {
|
|
3104
3453
|
const widgetInputParameters = {
|
|
@@ -3155,14 +3504,14 @@ var WidgetNode = (props) => {
|
|
|
3155
3504
|
};
|
|
3156
3505
|
const widgetCode = props.node?.widgetCode;
|
|
3157
3506
|
if (!widgetCode) {
|
|
3158
|
-
return /* @__PURE__ */ (0,
|
|
3507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: "Invalid widget" });
|
|
3159
3508
|
}
|
|
3160
3509
|
const SelectedWidget = getWidget(widgetCode);
|
|
3161
3510
|
if (!SelectedWidget) {
|
|
3162
3511
|
if (process.env.NODE_ENV !== "production") {
|
|
3163
3512
|
console.warn("Widget not found:", widgetCode);
|
|
3164
3513
|
}
|
|
3165
|
-
return /* @__PURE__ */ (0,
|
|
3514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
3166
3515
|
"Widget not found: ",
|
|
3167
3516
|
widgetCode
|
|
3168
3517
|
] });
|
|
@@ -3170,7 +3519,7 @@ var WidgetNode = (props) => {
|
|
|
3170
3519
|
const widgetParams = getWidgetParameters();
|
|
3171
3520
|
return (
|
|
3172
3521
|
// eslint-disable-next-line react-hooks/static-components
|
|
3173
|
-
/* @__PURE__ */ (0,
|
|
3522
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3174
3523
|
SelectedWidget,
|
|
3175
3524
|
{
|
|
3176
3525
|
params: widgetParams,
|
|
@@ -3186,12 +3535,12 @@ var WidgetNode = (props) => {
|
|
|
3186
3535
|
var WidgetNode_default = WidgetNode;
|
|
3187
3536
|
|
|
3188
3537
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3189
|
-
var
|
|
3538
|
+
var import_react45 = __toESM(require("react"));
|
|
3190
3539
|
|
|
3191
3540
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3192
|
-
var
|
|
3541
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3193
3542
|
var InputControlNode = (props) => {
|
|
3194
|
-
return /* @__PURE__ */ (0,
|
|
3543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3195
3544
|
InputControl_default,
|
|
3196
3545
|
{
|
|
3197
3546
|
name: props.node.name,
|
|
@@ -3425,22 +3774,22 @@ var ServiceClient = class {
|
|
|
3425
3774
|
var ServiceClient_default = ServiceClient;
|
|
3426
3775
|
|
|
3427
3776
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3428
|
-
var
|
|
3777
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3429
3778
|
var FormContainerNode = (props) => {
|
|
3430
3779
|
const NodeTypes2 = {
|
|
3431
3780
|
["input-control"]: InputControlNode_default
|
|
3432
3781
|
};
|
|
3433
3782
|
const { node } = props;
|
|
3434
|
-
const formRef = (0,
|
|
3783
|
+
const formRef = (0, import_react45.useRef)(null);
|
|
3435
3784
|
const initialState = {
|
|
3436
3785
|
inputValues: {},
|
|
3437
3786
|
lastPropertyChanged: ""
|
|
3438
3787
|
};
|
|
3439
|
-
const [formState, dispatch] = (0,
|
|
3440
|
-
const handleInputChange = (0,
|
|
3788
|
+
const [formState, dispatch] = (0, import_react45.useReducer)(FormReducer_default, initialState);
|
|
3789
|
+
const handleInputChange = (0, import_react45.useCallback)((updatedValues) => {
|
|
3441
3790
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
3442
3791
|
}, [dispatch]);
|
|
3443
|
-
(0,
|
|
3792
|
+
(0, import_react45.useEffect)(() => {
|
|
3444
3793
|
const fetchInitialData = async () => {
|
|
3445
3794
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
3446
3795
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -3455,12 +3804,12 @@ var FormContainerNode = (props) => {
|
|
|
3455
3804
|
};
|
|
3456
3805
|
fetchInitialData();
|
|
3457
3806
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3458
|
-
return /* @__PURE__ */ (0,
|
|
3807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3459
3808
|
node.children && node.children.map((node2, index) => {
|
|
3460
3809
|
{
|
|
3461
3810
|
}
|
|
3462
3811
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3463
|
-
return /* @__PURE__ */ (0,
|
|
3812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react45.default.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3464
3813
|
InputControlNode_default,
|
|
3465
3814
|
{
|
|
3466
3815
|
value: formState.inputValues[node2.name],
|
|
@@ -3469,51 +3818,51 @@ var FormContainerNode = (props) => {
|
|
|
3469
3818
|
}
|
|
3470
3819
|
) }, index);
|
|
3471
3820
|
}),
|
|
3472
|
-
node.children.length == 0 && /* @__PURE__ */ (0,
|
|
3821
|
+
node.children.length == 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "py-0.5 lg:py-1.5" })
|
|
3473
3822
|
] });
|
|
3474
3823
|
};
|
|
3475
3824
|
var FormContainerNode_default = FormContainerNode;
|
|
3476
3825
|
|
|
3477
3826
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3478
|
-
var
|
|
3827
|
+
var import_react50 = __toESM(require("react"));
|
|
3479
3828
|
|
|
3480
3829
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3481
|
-
var
|
|
3830
|
+
var import_react47 = __toESM(require("react"));
|
|
3482
3831
|
|
|
3483
3832
|
// src/components/IFrameLoaderView.tsx
|
|
3484
|
-
var
|
|
3485
|
-
var
|
|
3833
|
+
var import_react46 = __toESM(require("react"));
|
|
3834
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3486
3835
|
var IFrameLoaderView = (props) => {
|
|
3487
|
-
return /* @__PURE__ */ (0,
|
|
3488
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
3489
|
-
/* @__PURE__ */ (0,
|
|
3490
|
-
/* @__PURE__ */ (0,
|
|
3491
|
-
/* @__PURE__ */ (0,
|
|
3492
|
-
/* @__PURE__ */ (0,
|
|
3493
|
-
/* @__PURE__ */ (0,
|
|
3836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react46.default.Fragment, { children: [
|
|
3837
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3838
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3839
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ml-2", children: [
|
|
3841
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3842
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3494
3843
|
] })
|
|
3495
3844
|
] }),
|
|
3496
|
-
/* @__PURE__ */ (0,
|
|
3497
|
-
/* @__PURE__ */ (0,
|
|
3498
|
-
/* @__PURE__ */ (0,
|
|
3499
|
-
/* @__PURE__ */ (0,
|
|
3500
|
-
/* @__PURE__ */ (0,
|
|
3501
|
-
/* @__PURE__ */ (0,
|
|
3502
|
-
/* @__PURE__ */ (0,
|
|
3845
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3846
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
3847
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3848
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3849
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3850
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3503
3852
|
] }),
|
|
3504
|
-
/* @__PURE__ */ (0,
|
|
3505
|
-
/* @__PURE__ */ (0,
|
|
3506
|
-
/* @__PURE__ */ (0,
|
|
3507
|
-
/* @__PURE__ */ (0,
|
|
3508
|
-
/* @__PURE__ */ (0,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3853
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
3854
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3855
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3856
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3857
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3510
3859
|
] }),
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3512
|
-
/* @__PURE__ */ (0,
|
|
3513
|
-
/* @__PURE__ */ (0,
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3515
|
-
/* @__PURE__ */ (0,
|
|
3516
|
-
/* @__PURE__ */ (0,
|
|
3860
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
3861
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3862
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3863
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3864
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3865
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3517
3866
|
] })
|
|
3518
3867
|
] })
|
|
3519
3868
|
] }) }),
|
|
@@ -3523,12 +3872,12 @@ var IFrameLoaderView = (props) => {
|
|
|
3523
3872
|
var IFrameLoaderView_default = IFrameLoaderView;
|
|
3524
3873
|
|
|
3525
3874
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3526
|
-
var
|
|
3875
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3527
3876
|
var IframeClient = ({ src }) => {
|
|
3528
|
-
const iframeRef = (0,
|
|
3529
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3530
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3531
|
-
(0,
|
|
3877
|
+
const iframeRef = (0, import_react47.useRef)(null);
|
|
3878
|
+
const [iframeHeight, setIframeHeight] = (0, import_react47.useState)("100%");
|
|
3879
|
+
const [isDataFound, setIsDataFound] = (0, import_react47.useState)(null);
|
|
3880
|
+
(0, import_react47.useEffect)(() => {
|
|
3532
3881
|
const handleReceiveMessage = (event) => {
|
|
3533
3882
|
const eventName = event?.data?.eventName;
|
|
3534
3883
|
const payload = event?.data?.payload;
|
|
@@ -3543,7 +3892,7 @@ var IframeClient = ({ src }) => {
|
|
|
3543
3892
|
window.addEventListener("message", handleReceiveMessage);
|
|
3544
3893
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3545
3894
|
}, []);
|
|
3546
|
-
(0,
|
|
3895
|
+
(0, import_react47.useEffect)(() => {
|
|
3547
3896
|
const handleResize = () => {
|
|
3548
3897
|
if (iframeRef.current) {
|
|
3549
3898
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3555,7 +3904,7 @@ var IframeClient = ({ src }) => {
|
|
|
3555
3904
|
const handleIframeLoad = () => {
|
|
3556
3905
|
setIsDataFound(true);
|
|
3557
3906
|
};
|
|
3558
|
-
return /* @__PURE__ */ (0,
|
|
3907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react47.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3559
3908
|
"iframe",
|
|
3560
3909
|
{
|
|
3561
3910
|
ref: iframeRef,
|
|
@@ -3570,7 +3919,7 @@ var IframeClient = ({ src }) => {
|
|
|
3570
3919
|
var IframeClient_default = IframeClient;
|
|
3571
3920
|
|
|
3572
3921
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3573
|
-
var
|
|
3922
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3574
3923
|
var EmbedNode = (props) => {
|
|
3575
3924
|
let src;
|
|
3576
3925
|
if (props.node.provider == "youtube") {
|
|
@@ -3580,26 +3929,13 @@ var EmbedNode = (props) => {
|
|
|
3580
3929
|
} else {
|
|
3581
3930
|
src = props.node.embedSrc;
|
|
3582
3931
|
}
|
|
3583
|
-
return /* @__PURE__ */ (0,
|
|
3932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IframeClient_default, { src }) });
|
|
3584
3933
|
};
|
|
3585
3934
|
var EmbedNode_default = EmbedNode;
|
|
3586
3935
|
|
|
3587
|
-
// src/components/utilities/AssetUtility.tsx
|
|
3588
|
-
var AssetUtility = class {
|
|
3589
|
-
constructor() {
|
|
3590
|
-
}
|
|
3591
|
-
static resolveUrl(apiBaseUrl, url) {
|
|
3592
|
-
if (!url) return void 0;
|
|
3593
|
-
if (url.startsWith("http")) return url;
|
|
3594
|
-
if (!apiBaseUrl) return url;
|
|
3595
|
-
return `${apiBaseUrl}/digitalassets-management/${url}`;
|
|
3596
|
-
}
|
|
3597
|
-
};
|
|
3598
|
-
var AssetUtility_default = AssetUtility;
|
|
3599
|
-
|
|
3600
3936
|
// src/components/Slider.tsx
|
|
3601
|
-
var
|
|
3602
|
-
var
|
|
3937
|
+
var import_react48 = __toESM(require("react"));
|
|
3938
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3603
3939
|
var Slider = ({
|
|
3604
3940
|
children,
|
|
3605
3941
|
slidesToShow = 4,
|
|
@@ -3617,13 +3953,13 @@ var Slider = ({
|
|
|
3617
3953
|
pillStyle = "cumulative",
|
|
3618
3954
|
progressPosition = "bottom"
|
|
3619
3955
|
}) => {
|
|
3620
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
3621
|
-
const [transition, setTransition] = (0,
|
|
3622
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
3956
|
+
const [currentSlide, setCurrentSlide] = (0, import_react48.useState)(0);
|
|
3957
|
+
const [transition, setTransition] = (0, import_react48.useState)(true);
|
|
3958
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react48.useState)(
|
|
3623
3959
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3624
3960
|
);
|
|
3625
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
3626
|
-
(0,
|
|
3961
|
+
const [isPlaying, setIsPlaying] = (0, import_react48.useState)(autoplay);
|
|
3962
|
+
(0, import_react48.useEffect)(() => {
|
|
3627
3963
|
if (typeof slidesToShow === "number") return;
|
|
3628
3964
|
const handleResize = () => {
|
|
3629
3965
|
if (window.innerWidth >= 1024) {
|
|
@@ -3638,7 +3974,7 @@ var Slider = ({
|
|
|
3638
3974
|
window.addEventListener("resize", handleResize);
|
|
3639
3975
|
return () => window.removeEventListener("resize", handleResize);
|
|
3640
3976
|
}, [slidesToShow]);
|
|
3641
|
-
(0,
|
|
3977
|
+
(0, import_react48.useEffect)(() => {
|
|
3642
3978
|
if (!autoplay) return;
|
|
3643
3979
|
const timer = setInterval(() => {
|
|
3644
3980
|
if (isPlaying) {
|
|
@@ -3647,7 +3983,7 @@ var Slider = ({
|
|
|
3647
3983
|
}, autoplay_speed);
|
|
3648
3984
|
return () => clearInterval(timer);
|
|
3649
3985
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
3650
|
-
const totalSlides =
|
|
3986
|
+
const totalSlides = import_react48.Children.count(children);
|
|
3651
3987
|
const maxSlide = totalSlides - slidesToShowState;
|
|
3652
3988
|
const nextSlide = () => {
|
|
3653
3989
|
if (currentSlide >= maxSlide) {
|
|
@@ -3692,16 +4028,16 @@ var Slider = ({
|
|
|
3692
4028
|
}
|
|
3693
4029
|
};
|
|
3694
4030
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3695
|
-
const slides =
|
|
3696
|
-
if (!
|
|
4031
|
+
const slides = import_react48.Children.map(children, (child, index) => {
|
|
4032
|
+
if (!import_react48.default.isValidElement(child)) return null;
|
|
3697
4033
|
const childProps = child.props;
|
|
3698
4034
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3699
|
-
return /* @__PURE__ */ (0,
|
|
4035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3700
4036
|
"div",
|
|
3701
4037
|
{
|
|
3702
4038
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
3703
4039
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
3704
|
-
children: (0,
|
|
4040
|
+
children: (0, import_react48.cloneElement)(child, {
|
|
3705
4041
|
className: mergedClassName
|
|
3706
4042
|
})
|
|
3707
4043
|
},
|
|
@@ -3719,14 +4055,14 @@ var Slider = ({
|
|
|
3719
4055
|
return "bottom-4";
|
|
3720
4056
|
}
|
|
3721
4057
|
};
|
|
3722
|
-
return /* @__PURE__ */ (0,
|
|
4058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3723
4059
|
"div",
|
|
3724
4060
|
{
|
|
3725
4061
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3726
4062
|
onMouseEnter: handleMouseEnter,
|
|
3727
4063
|
onMouseLeave: handleMouseLeave,
|
|
3728
4064
|
children: [
|
|
3729
|
-
/* @__PURE__ */ (0,
|
|
4065
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3730
4066
|
"div",
|
|
3731
4067
|
{
|
|
3732
4068
|
className: "flex h-full",
|
|
@@ -3737,18 +4073,18 @@ var Slider = ({
|
|
|
3737
4073
|
children: slides
|
|
3738
4074
|
}
|
|
3739
4075
|
),
|
|
3740
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
3741
|
-
/* @__PURE__ */ (0,
|
|
4076
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
4077
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3742
4078
|
ArrowButton,
|
|
3743
4079
|
{
|
|
3744
4080
|
direction: "left",
|
|
3745
4081
|
onClick: prevSlide,
|
|
3746
4082
|
visible: infinite_scroll || currentSlide > 0,
|
|
3747
4083
|
className: arrowClassName,
|
|
3748
|
-
children: /* @__PURE__ */ (0,
|
|
4084
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("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__ */ (0, import_jsx_runtime64.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3749
4085
|
}
|
|
3750
4086
|
),
|
|
3751
|
-
/* @__PURE__ */ (0,
|
|
4087
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3752
4088
|
ArrowButton,
|
|
3753
4089
|
{
|
|
3754
4090
|
direction: "right",
|
|
@@ -3756,13 +4092,13 @@ var Slider = ({
|
|
|
3756
4092
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3757
4093
|
className: arrowClassName,
|
|
3758
4094
|
children: [
|
|
3759
|
-
/* @__PURE__ */ (0,
|
|
4095
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("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__ */ (0, import_jsx_runtime64.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3760
4096
|
" "
|
|
3761
4097
|
]
|
|
3762
4098
|
}
|
|
3763
4099
|
)
|
|
3764
4100
|
] }),
|
|
3765
|
-
show_dots && /* @__PURE__ */ (0,
|
|
4101
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("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__ */ (0, import_jsx_runtime64.jsx)(
|
|
3766
4102
|
ProgressPill,
|
|
3767
4103
|
{
|
|
3768
4104
|
active: index === currentSlide,
|
|
@@ -3788,7 +4124,7 @@ var ArrowButton = ({
|
|
|
3788
4124
|
visible,
|
|
3789
4125
|
children,
|
|
3790
4126
|
className = ""
|
|
3791
|
-
}) => /* @__PURE__ */ (0,
|
|
4127
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3792
4128
|
"button",
|
|
3793
4129
|
{
|
|
3794
4130
|
className: `
|
|
@@ -3814,13 +4150,13 @@ var ProgressPill = ({
|
|
|
3814
4150
|
currentSlide,
|
|
3815
4151
|
totalSlides
|
|
3816
4152
|
}) => {
|
|
3817
|
-
const [progress, setProgress] = (0,
|
|
3818
|
-
(0,
|
|
4153
|
+
const [progress, setProgress] = (0, import_react48.useState)(0);
|
|
4154
|
+
(0, import_react48.useEffect)(() => {
|
|
3819
4155
|
if (active) {
|
|
3820
4156
|
setProgress(0);
|
|
3821
4157
|
}
|
|
3822
4158
|
}, [active, index]);
|
|
3823
|
-
(0,
|
|
4159
|
+
(0, import_react48.useEffect)(() => {
|
|
3824
4160
|
if (!active || !isPlaying) {
|
|
3825
4161
|
if (!active) {
|
|
3826
4162
|
setProgress(0);
|
|
@@ -3875,7 +4211,7 @@ var ProgressPill = ({
|
|
|
3875
4211
|
const renderProgressBar = () => {
|
|
3876
4212
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3877
4213
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3878
|
-
return /* @__PURE__ */ (0,
|
|
4214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3879
4215
|
"div",
|
|
3880
4216
|
{
|
|
3881
4217
|
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`,
|
|
@@ -3887,7 +4223,7 @@ var ProgressPill = ({
|
|
|
3887
4223
|
};
|
|
3888
4224
|
const renderCumulativeFill = () => {
|
|
3889
4225
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3890
|
-
return /* @__PURE__ */ (0,
|
|
4226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3891
4227
|
"div",
|
|
3892
4228
|
{
|
|
3893
4229
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3897,7 +4233,7 @@ var ProgressPill = ({
|
|
|
3897
4233
|
}
|
|
3898
4234
|
return null;
|
|
3899
4235
|
};
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
4236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3901
4237
|
"button",
|
|
3902
4238
|
{
|
|
3903
4239
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4021,32 +4357,6 @@ var AnimationUtility = class {
|
|
|
4021
4357
|
};
|
|
4022
4358
|
var AnimationUtility_default = AnimationUtility;
|
|
4023
4359
|
|
|
4024
|
-
// src/components/pageRenderingEngine/nodes/EnterAnimationClient.tsx
|
|
4025
|
-
var import_react47 = __toESM(require("react"));
|
|
4026
|
-
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4027
|
-
function EnterAnimationClient({ hasEnterAnimation, children }) {
|
|
4028
|
-
const ref = (0, import_react47.useRef)(null);
|
|
4029
|
-
(0, import_react47.useEffect)(() => {
|
|
4030
|
-
if (!hasEnterAnimation || !ref.current) return;
|
|
4031
|
-
const observer = new IntersectionObserver(
|
|
4032
|
-
(entries) => {
|
|
4033
|
-
entries.forEach((entry) => {
|
|
4034
|
-
if (entry.isIntersecting) {
|
|
4035
|
-
entry.target.classList.add("visible");
|
|
4036
|
-
observer.unobserve(entry.target);
|
|
4037
|
-
}
|
|
4038
|
-
});
|
|
4039
|
-
},
|
|
4040
|
-
{ threshold: 0.1 }
|
|
4041
|
-
);
|
|
4042
|
-
observer.observe(ref.current);
|
|
4043
|
-
return () => observer.disconnect();
|
|
4044
|
-
}, [hasEnterAnimation]);
|
|
4045
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: children && // enforce passing the ref to Wrapper
|
|
4046
|
-
//@ts-ignore
|
|
4047
|
-
import_react47.default.cloneElement(children, { ref }) });
|
|
4048
|
-
}
|
|
4049
|
-
|
|
4050
4360
|
// src/components/utilities/PathUtility.tsx
|
|
4051
4361
|
var PathUtility = class {
|
|
4052
4362
|
constructor() {
|
|
@@ -4099,10 +4409,10 @@ var PathUtility = class {
|
|
|
4099
4409
|
var PathUtility_default = new PathUtility();
|
|
4100
4410
|
|
|
4101
4411
|
// src/components/NoDataFound.tsx
|
|
4102
|
-
var
|
|
4412
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4103
4413
|
var NoDataFound = () => {
|
|
4104
|
-
return /* @__PURE__ */ (0,
|
|
4105
|
-
/* @__PURE__ */ (0,
|
|
4414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4415
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4106
4416
|
"svg",
|
|
4107
4417
|
{
|
|
4108
4418
|
className: "w-10 h-10",
|
|
@@ -4110,7 +4420,7 @@ var NoDataFound = () => {
|
|
|
4110
4420
|
stroke: "currentColor",
|
|
4111
4421
|
viewBox: "0 0 24 24",
|
|
4112
4422
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4113
|
-
children: /* @__PURE__ */ (0,
|
|
4423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4114
4424
|
"path",
|
|
4115
4425
|
{
|
|
4116
4426
|
strokeLinecap: "round",
|
|
@@ -4121,18 +4431,18 @@ var NoDataFound = () => {
|
|
|
4121
4431
|
)
|
|
4122
4432
|
}
|
|
4123
4433
|
) }) }),
|
|
4124
|
-
/* @__PURE__ */ (0,
|
|
4125
|
-
/* @__PURE__ */ (0,
|
|
4434
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4435
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4126
4436
|
] });
|
|
4127
4437
|
};
|
|
4128
4438
|
var NoDataFound_default = NoDataFound;
|
|
4129
4439
|
|
|
4130
4440
|
// src/components/Pagination.tsx
|
|
4131
|
-
var
|
|
4132
|
-
var
|
|
4441
|
+
var import_react49 = require("react");
|
|
4442
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4133
4443
|
var Pagination = (props) => {
|
|
4134
4444
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4135
|
-
const builder = (0,
|
|
4445
|
+
const builder = (0, import_react49.useMemo)(() => {
|
|
4136
4446
|
const b = new OdataBuilder(path);
|
|
4137
4447
|
if (query) b.setQuery(query);
|
|
4138
4448
|
return b;
|
|
@@ -4173,7 +4483,7 @@ var Pagination = (props) => {
|
|
|
4173
4483
|
return range;
|
|
4174
4484
|
};
|
|
4175
4485
|
const paginationRange = getPaginationRange();
|
|
4176
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
4486
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4177
4487
|
Hyperlink,
|
|
4178
4488
|
{
|
|
4179
4489
|
linkType: "Link" /* Link */,
|
|
@@ -4188,9 +4498,9 @@ var Pagination = (props) => {
|
|
|
4188
4498
|
);
|
|
4189
4499
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4190
4500
|
if (disabled) {
|
|
4191
|
-
return /* @__PURE__ */ (0,
|
|
4501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("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 });
|
|
4192
4502
|
}
|
|
4193
|
-
return /* @__PURE__ */ (0,
|
|
4503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4194
4504
|
Hyperlink,
|
|
4195
4505
|
{
|
|
4196
4506
|
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",
|
|
@@ -4200,35 +4510,35 @@ var Pagination = (props) => {
|
|
|
4200
4510
|
);
|
|
4201
4511
|
};
|
|
4202
4512
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4203
|
-
return /* @__PURE__ */ (0,
|
|
4204
|
-
/* @__PURE__ */ (0,
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
4514
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4515
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "text-sm", children: [
|
|
4206
4516
|
"Showing ",
|
|
4207
|
-
/* @__PURE__ */ (0,
|
|
4517
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "font-semibold", children: [
|
|
4208
4518
|
startItem,
|
|
4209
4519
|
"-",
|
|
4210
4520
|
endItem
|
|
4211
4521
|
] }),
|
|
4212
4522
|
" ",
|
|
4213
4523
|
"out of ",
|
|
4214
|
-
/* @__PURE__ */ (0,
|
|
4524
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4215
4525
|
" results"
|
|
4216
4526
|
] }),
|
|
4217
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
4218
|
-
/* @__PURE__ */ (0,
|
|
4527
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
4528
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
4219
4529
|
NavigationButton,
|
|
4220
4530
|
{
|
|
4221
4531
|
page: activePageNumber - 1,
|
|
4222
4532
|
disabled: activePageNumber === 1,
|
|
4223
4533
|
children: [
|
|
4224
|
-
/* @__PURE__ */ (0,
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4534
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4535
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
4226
4536
|
]
|
|
4227
4537
|
}
|
|
4228
4538
|
),
|
|
4229
4539
|
paginationRange.map((item, index) => {
|
|
4230
4540
|
if (item === "...") {
|
|
4231
|
-
return /* @__PURE__ */ (0,
|
|
4541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4232
4542
|
"span",
|
|
4233
4543
|
{
|
|
4234
4544
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4238,23 +4548,23 @@ var Pagination = (props) => {
|
|
|
4238
4548
|
);
|
|
4239
4549
|
}
|
|
4240
4550
|
const page = item;
|
|
4241
|
-
return /* @__PURE__ */ (0,
|
|
4551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(PageButton, { page, children: page }, page);
|
|
4242
4552
|
}),
|
|
4243
|
-
/* @__PURE__ */ (0,
|
|
4553
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
4244
4554
|
NavigationButton,
|
|
4245
4555
|
{
|
|
4246
4556
|
page: activePageNumber + 1,
|
|
4247
4557
|
disabled: activePageNumber === totalPages,
|
|
4248
4558
|
children: [
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4250
|
-
/* @__PURE__ */ (0,
|
|
4559
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
4560
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4251
4561
|
]
|
|
4252
4562
|
}
|
|
4253
4563
|
)
|
|
4254
4564
|
] }),
|
|
4255
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
4256
|
-
/* @__PURE__ */ (0,
|
|
4257
|
-
/* @__PURE__ */ (0,
|
|
4565
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
4566
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
4567
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4258
4568
|
"input",
|
|
4259
4569
|
{
|
|
4260
4570
|
type: "number",
|
|
@@ -4275,9 +4585,9 @@ var Pagination = (props) => {
|
|
|
4275
4585
|
) })
|
|
4276
4586
|
] })
|
|
4277
4587
|
] }),
|
|
4278
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
4279
|
-
/* @__PURE__ */ (0,
|
|
4280
|
-
/* @__PURE__ */ (0,
|
|
4588
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4589
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
4590
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4281
4591
|
Hyperlink,
|
|
4282
4592
|
{
|
|
4283
4593
|
className: `
|
|
@@ -4289,14 +4599,14 @@ var Pagination = (props) => {
|
|
|
4289
4599
|
},
|
|
4290
4600
|
size
|
|
4291
4601
|
)) }),
|
|
4292
|
-
/* @__PURE__ */ (0,
|
|
4602
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "per page" })
|
|
4293
4603
|
] }) })
|
|
4294
4604
|
] });
|
|
4295
4605
|
};
|
|
4296
4606
|
var Pagination_default = Pagination;
|
|
4297
4607
|
|
|
4298
4608
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4299
|
-
var
|
|
4609
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4300
4610
|
function toCamelCase(str) {
|
|
4301
4611
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4302
4612
|
}
|
|
@@ -4310,7 +4620,7 @@ function convertKeysToCamelCase(obj) {
|
|
|
4310
4620
|
])
|
|
4311
4621
|
);
|
|
4312
4622
|
}
|
|
4313
|
-
var
|
|
4623
|
+
var getNestedValue2 = (obj, path) => {
|
|
4314
4624
|
if (!obj || !path) return void 0;
|
|
4315
4625
|
return path.split(".").reduce((current, key) => {
|
|
4316
4626
|
{
|
|
@@ -4451,7 +4761,7 @@ var DivContainer = async (props) => {
|
|
|
4451
4761
|
}
|
|
4452
4762
|
const shouldHideContainer = () => {
|
|
4453
4763
|
if (!props.node.fieldVisibleOnTrue) return false;
|
|
4454
|
-
const fieldValue =
|
|
4764
|
+
const fieldValue = getNestedValue2(props.dataitem, props.node.fieldVisibleOnTrue);
|
|
4455
4765
|
return fieldValue !== void 0 && fieldValue === false;
|
|
4456
4766
|
};
|
|
4457
4767
|
const isHidden = shouldHideContainer();
|
|
@@ -4478,10 +4788,10 @@ var DivContainer = async (props) => {
|
|
|
4478
4788
|
response = await serviceClient.get(endpoint);
|
|
4479
4789
|
result = response?.result;
|
|
4480
4790
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4481
|
-
return /* @__PURE__ */ (0,
|
|
4791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(NoDataFound_default, {});
|
|
4482
4792
|
}
|
|
4483
4793
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4484
|
-
childCollectionData =
|
|
4794
|
+
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
4485
4795
|
}
|
|
4486
4796
|
}
|
|
4487
4797
|
const cssResult = generateCssString(guid, updatedStyle, mobileStyles);
|
|
@@ -4490,7 +4800,7 @@ var DivContainer = async (props) => {
|
|
|
4490
4800
|
}
|
|
4491
4801
|
const SelectedNode = NodeTypes2[node.type];
|
|
4492
4802
|
if (!SelectedNode) return null;
|
|
4493
|
-
return /* @__PURE__ */ (0,
|
|
4803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4494
4804
|
SelectedNode,
|
|
4495
4805
|
{
|
|
4496
4806
|
node,
|
|
@@ -4589,9 +4899,9 @@ var DivContainer = async (props) => {
|
|
|
4589
4899
|
props.node.autoFormat && "auto-format",
|
|
4590
4900
|
props.node.bgClass
|
|
4591
4901
|
].filter(Boolean).join(" ");
|
|
4592
|
-
return /* @__PURE__ */ (0,
|
|
4593
|
-
/* @__PURE__ */ (0,
|
|
4594
|
-
/* @__PURE__ */ (0,
|
|
4902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react50.default.Fragment, { children: [
|
|
4903
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4904
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4595
4905
|
Wrapper,
|
|
4596
4906
|
{
|
|
4597
4907
|
id: guid,
|
|
@@ -4600,18 +4910,18 @@ var DivContainer = async (props) => {
|
|
|
4600
4910
|
...wrapperProps,
|
|
4601
4911
|
children: dataToRender.map(
|
|
4602
4912
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4603
|
-
(child, i) => /* @__PURE__ */ (0,
|
|
4913
|
+
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react50.default.Fragment, { children: child }, i)
|
|
4604
4914
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4605
4915
|
)
|
|
4606
4916
|
}
|
|
4607
|
-
) })
|
|
4608
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
4917
|
+
) }),
|
|
4918
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4609
4919
|
] });
|
|
4610
4920
|
};
|
|
4611
4921
|
var DivContainer_default = DivContainer;
|
|
4612
4922
|
|
|
4613
4923
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4614
|
-
var
|
|
4924
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4615
4925
|
var NodeTypes = {
|
|
4616
4926
|
["paragraph"]: ParagraphNode_default,
|
|
4617
4927
|
["heading"]: HeadingNode_default,
|
|
@@ -4638,11 +4948,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4638
4948
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4639
4949
|
rootNode = pageBodyTree.root;
|
|
4640
4950
|
}
|
|
4641
|
-
return /* @__PURE__ */ (0,
|
|
4951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react51.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4642
4952
|
{
|
|
4643
4953
|
}
|
|
4644
4954
|
const SelectedNode = NodeTypes[node.type];
|
|
4645
|
-
return /* @__PURE__ */ (0,
|
|
4955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react51.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4646
4956
|
SelectedNode,
|
|
4647
4957
|
{
|
|
4648
4958
|
node,
|
|
@@ -4654,9 +4964,10 @@ var PageBodyRenderer = (props) => {
|
|
|
4654
4964
|
path: props.path,
|
|
4655
4965
|
apiBaseUrl: props.apiBaseUrl,
|
|
4656
4966
|
serviceClient: props.serviceClient,
|
|
4657
|
-
assetBaseUrl: props.assetBaseUrl
|
|
4967
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
4968
|
+
device: props.device
|
|
4658
4969
|
}
|
|
4659
|
-
) }) : /* @__PURE__ */ (0,
|
|
4970
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4660
4971
|
SelectedNode,
|
|
4661
4972
|
{
|
|
4662
4973
|
node,
|
|
@@ -4667,7 +4978,8 @@ var PageBodyRenderer = (props) => {
|
|
|
4667
4978
|
path: props.path,
|
|
4668
4979
|
apiBaseUrl: props.apiBaseUrl,
|
|
4669
4980
|
serviceClient: props.serviceClient,
|
|
4670
|
-
assetBaseUrl: props.assetBaseUrl
|
|
4981
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
4982
|
+
device: props.device
|
|
4671
4983
|
}
|
|
4672
4984
|
) }) }) }, index);
|
|
4673
4985
|
}) });
|