@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260325073346 → 0.8.1-dev.20260325110100
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/CopyButton-XONTQQW7.mjs +55 -0
- package/dist/HlsPlayer-FFEIK6FG.mjs +7 -0
- package/dist/chunk-CVVLFQ4J.mjs +131 -0
- package/dist/index.js +243 -192
- package/dist/index.mjs +148 -295
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HlsPlayer_default
|
|
3
|
+
} from "./chunk-CVVLFQ4J.mjs";
|
|
4
|
+
|
|
1
5
|
// src/components/pageRenderingEngine/nodes/WidgetRegistry.tsx
|
|
2
6
|
var registry = {};
|
|
3
7
|
function registerWidgets(widgets) {
|
|
@@ -2521,7 +2525,7 @@ var DataList = (props) => {
|
|
|
2521
2525
|
var DataList_default = DataList;
|
|
2522
2526
|
|
|
2523
2527
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2524
|
-
import
|
|
2528
|
+
import React47 from "react";
|
|
2525
2529
|
|
|
2526
2530
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2527
2531
|
import React36 from "react";
|
|
@@ -2940,67 +2944,18 @@ var QuoteNode_default = QuoteNode;
|
|
|
2940
2944
|
|
|
2941
2945
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2942
2946
|
import React41 from "react";
|
|
2943
|
-
|
|
2944
|
-
// src/components/CopyButton.tsx
|
|
2945
|
-
import { useState as useState8, useRef as useRef3, useEffect as useEffect7 } from "react";
|
|
2947
|
+
import dynamic from "next/dynamic";
|
|
2946
2948
|
import { jsx as jsx52, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2953
|
-
};
|
|
2954
|
-
}, []);
|
|
2955
|
-
const handleCopy = async () => {
|
|
2956
|
-
try {
|
|
2957
|
-
await navigator.clipboard.writeText(text);
|
|
2958
|
-
setCopied(true);
|
|
2959
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2960
|
-
timeoutRef.current = setTimeout(() => setCopied(false), 2e3);
|
|
2961
|
-
} catch (err) {
|
|
2962
|
-
console.error("Failed to copy: ", err);
|
|
2963
|
-
}
|
|
2964
|
-
};
|
|
2965
|
-
return /* @__PURE__ */ jsxs25(
|
|
2966
|
-
"button",
|
|
2967
|
-
{
|
|
2968
|
-
onClick: handleCopy,
|
|
2969
|
-
className: "flex gap-1 items-center hover:text-white transition",
|
|
2970
|
-
children: [
|
|
2971
|
-
/* @__PURE__ */ jsx52(
|
|
2972
|
-
"svg",
|
|
2973
|
-
{
|
|
2974
|
-
width: "16",
|
|
2975
|
-
height: "16",
|
|
2976
|
-
viewBox: "0 0 24 24",
|
|
2977
|
-
className: "w-4 h-4",
|
|
2978
|
-
fill: "currentColor",
|
|
2979
|
-
children: /* @__PURE__ */ jsx52(
|
|
2980
|
-
"path",
|
|
2981
|
-
{
|
|
2982
|
-
fillRule: "evenodd",
|
|
2983
|
-
clipRule: "evenodd",
|
|
2984
|
-
d: "M12 4C10.8954 4 10 4.89543 10 6H14C14 4.89543 13.1046 4 12 4ZM8.53513 4C9.22675 2.8044 10.5194 2 12 2C13.4806 2 14.7733 2.8044 15.4649 4H17C18.6569 4 20 5.34315 20 7V19C20 20.6569 18.6569 22 17 22H7C5.34315 22 4 20.6569 4 19V7C4 5.34315 5.34315 4 7 4H8.53513ZM8 6H7C6.44772 6 6 6.44772 6 7V19C6 19.5523 6.44772 20 7 20H17C17.5523 20 18 19.5523 18 19V7C18 6.44772 17.5523 6 17 6H16C16 7.10457 15.1046 8 14 8H10C8.89543 8 8 7.10457 8 6Z"
|
|
2985
|
-
}
|
|
2986
|
-
)
|
|
2987
|
-
}
|
|
2988
|
-
),
|
|
2989
|
-
copied ? "Copied!" : "Copy code"
|
|
2990
|
-
]
|
|
2991
|
-
}
|
|
2992
|
-
);
|
|
2993
|
-
}
|
|
2994
|
-
|
|
2995
|
-
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2996
|
-
import { jsx as jsx53, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2949
|
+
var CopyButton = dynamic(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2950
|
+
ssr: false,
|
|
2951
|
+
// optional: fallback UI while loading
|
|
2952
|
+
loading: () => /* @__PURE__ */ jsx52("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
2953
|
+
});
|
|
2997
2954
|
var CodeNode = (props) => {
|
|
2998
2955
|
const NodeTypes2 = {
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
// @ts-expect-error custom code
|
|
3003
|
-
["link"]: LinkNode_default
|
|
2956
|
+
text: TextNode_default,
|
|
2957
|
+
linebreak: LineBreakNode_default,
|
|
2958
|
+
link: LinkNode_default
|
|
3004
2959
|
};
|
|
3005
2960
|
const textContent = props.node?.children?.map((node) => {
|
|
3006
2961
|
if (node.type === "text") return node.text || "";
|
|
@@ -3008,28 +2963,36 @@ var CodeNode = (props) => {
|
|
|
3008
2963
|
if (node.type === "link") return node.text || node.url || "";
|
|
3009
2964
|
return "";
|
|
3010
2965
|
}).join("") ?? "";
|
|
3011
|
-
return /* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */
|
|
3013
|
-
/* @__PURE__ */
|
|
3014
|
-
/* @__PURE__ */
|
|
2966
|
+
return /* @__PURE__ */ jsxs25("div", { className: "code-block", children: [
|
|
2967
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center relative text-gray-200 bg-gray-800 px-4 py-2.5 text-xs font-sans justify-between rounded-t-md", children: [
|
|
2968
|
+
/* @__PURE__ */ jsx52("span", { children: "Code Snippet" }),
|
|
2969
|
+
/* @__PURE__ */ jsx52(CopyButton, { text: textContent })
|
|
3015
2970
|
] }),
|
|
3016
|
-
/* @__PURE__ */
|
|
2971
|
+
/* @__PURE__ */ jsx52("code", { className: "block bg-gray-900 text-gray-100 p-4 rounded-b-md text-sm whitespace-pre-wrap", children: props.node.children && props.node.children.map((node, index) => {
|
|
3017
2972
|
const SelectedNode = NodeTypes2[node.type];
|
|
3018
|
-
return /* @__PURE__ */
|
|
2973
|
+
return /* @__PURE__ */ jsx52(React41.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx52(
|
|
2974
|
+
SelectedNode,
|
|
2975
|
+
{
|
|
2976
|
+
node,
|
|
2977
|
+
session: props.session,
|
|
2978
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
2979
|
+
routeParameters: props.routeParameters
|
|
2980
|
+
}
|
|
2981
|
+
) }, index);
|
|
3019
2982
|
}) })
|
|
3020
2983
|
] });
|
|
3021
2984
|
};
|
|
3022
2985
|
var CodeNode_default = CodeNode;
|
|
3023
2986
|
|
|
3024
2987
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
3025
|
-
import { jsx as
|
|
2988
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
3026
2989
|
var HorizontalRuleNode = () => {
|
|
3027
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ jsx53("hr", {});
|
|
3028
2991
|
};
|
|
3029
2992
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3030
2993
|
|
|
3031
2994
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3032
|
-
import
|
|
2995
|
+
import React42 from "react";
|
|
3033
2996
|
|
|
3034
2997
|
// src/components/utilities/AssetUtility.tsx
|
|
3035
2998
|
var AssetUtility = class {
|
|
@@ -3041,139 +3004,22 @@ var AssetUtility = class {
|
|
|
3041
3004
|
if (!apiBaseUrl) return url;
|
|
3042
3005
|
return `${apiBaseUrl}/${url}`;
|
|
3043
3006
|
}
|
|
3007
|
+
static getAssetUrl(apiBaseUrl) {
|
|
3008
|
+
let domainName = apiBaseUrl.replace("https://", "");
|
|
3009
|
+
return `https://cdn.g-assets.com/${domainName}`;
|
|
3010
|
+
}
|
|
3011
|
+
static getAssetFullPath(apiBaseUrl, relativePath) {
|
|
3012
|
+
let domainName = apiBaseUrl.replace("https://", "");
|
|
3013
|
+
return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
|
|
3014
|
+
}
|
|
3044
3015
|
};
|
|
3045
3016
|
var AssetUtility_default = AssetUtility;
|
|
3046
3017
|
|
|
3047
|
-
// src/components/
|
|
3048
|
-
import
|
|
3049
|
-
import Hls from "hls.js";
|
|
3050
|
-
import { jsx as jsx55, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3051
|
-
var HlsPlayer = React42.memo(
|
|
3052
|
-
({
|
|
3053
|
-
assetUrl,
|
|
3054
|
-
posterUrl,
|
|
3055
|
-
intrinsicWidth,
|
|
3056
|
-
intrinsicHeight,
|
|
3057
|
-
showControls = true,
|
|
3058
|
-
loop = false,
|
|
3059
|
-
playOptions = "autoplay"
|
|
3060
|
-
}) => {
|
|
3061
|
-
const videoRef = useRef4(null);
|
|
3062
|
-
const hlsRef = useRef4(null);
|
|
3063
|
-
const [isPlaying, setIsPlaying] = useState9(playOptions === "autoplay");
|
|
3064
|
-
const [isHovered, setIsHovered] = useState9(false);
|
|
3065
|
-
const [isMobile, setIsMobile] = useState9(false);
|
|
3066
|
-
const wasManuallyPausedRef = useRef4(false);
|
|
3067
|
-
useEffect8(() => {
|
|
3068
|
-
const checkMobile = () => {
|
|
3069
|
-
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
3070
|
-
const isSmallScreen = window.innerWidth <= 768;
|
|
3071
|
-
const ua = navigator.userAgent.toLowerCase();
|
|
3072
|
-
const isMobileUA = /android|iphone|ipad|ipod/i.test(ua);
|
|
3073
|
-
setIsMobile(hasTouch || isSmallScreen || isMobileUA);
|
|
3074
|
-
};
|
|
3075
|
-
checkMobile();
|
|
3076
|
-
window.addEventListener("resize", checkMobile);
|
|
3077
|
-
return () => window.removeEventListener("resize", checkMobile);
|
|
3078
|
-
}, []);
|
|
3079
|
-
useEffect8(() => {
|
|
3080
|
-
const v = videoRef.current;
|
|
3081
|
-
if (!v || !assetUrl) return;
|
|
3082
|
-
if (hlsRef.current) {
|
|
3083
|
-
hlsRef.current.destroy();
|
|
3084
|
-
hlsRef.current = null;
|
|
3085
|
-
}
|
|
3086
|
-
if (Hls.isSupported()) {
|
|
3087
|
-
const hls = new Hls();
|
|
3088
|
-
hls.loadSource(assetUrl);
|
|
3089
|
-
hls.attachMedia(v);
|
|
3090
|
-
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
|
3091
|
-
if (isPlaying && !wasManuallyPausedRef.current) {
|
|
3092
|
-
v.play().catch(console.error);
|
|
3093
|
-
}
|
|
3094
|
-
});
|
|
3095
|
-
hlsRef.current = hls;
|
|
3096
|
-
} else if (v.canPlayType("application/vnd.apple.mpegurl")) {
|
|
3097
|
-
v.src = assetUrl;
|
|
3098
|
-
}
|
|
3099
|
-
}, [assetUrl, isPlaying]);
|
|
3100
|
-
const handlePlayPause = useCallback3(() => {
|
|
3101
|
-
const v = videoRef.current;
|
|
3102
|
-
if (!v) return;
|
|
3103
|
-
if (v.paused) {
|
|
3104
|
-
wasManuallyPausedRef.current = false;
|
|
3105
|
-
v.play().then(() => setIsPlaying(true));
|
|
3106
|
-
} else {
|
|
3107
|
-
wasManuallyPausedRef.current = true;
|
|
3108
|
-
v.pause();
|
|
3109
|
-
setIsPlaying(false);
|
|
3110
|
-
}
|
|
3111
|
-
}, []);
|
|
3112
|
-
const handleMouseEnter = useCallback3(() => {
|
|
3113
|
-
if (isMobile) return;
|
|
3114
|
-
setIsHovered(true);
|
|
3115
|
-
if (playOptions === "playOnHover" && videoRef.current && !wasManuallyPausedRef.current) {
|
|
3116
|
-
videoRef.current.play().then(() => setIsPlaying(true));
|
|
3117
|
-
}
|
|
3118
|
-
}, [playOptions, isMobile]);
|
|
3119
|
-
const handleMouseLeave = useCallback3(() => {
|
|
3120
|
-
if (isMobile) return;
|
|
3121
|
-
setIsHovered(false);
|
|
3122
|
-
if (playOptions === "playOnHover" && videoRef.current) {
|
|
3123
|
-
videoRef.current.pause();
|
|
3124
|
-
videoRef.current.currentTime = 0;
|
|
3125
|
-
setIsPlaying(false);
|
|
3126
|
-
}
|
|
3127
|
-
}, [playOptions, isMobile]);
|
|
3128
|
-
return /* @__PURE__ */ jsxs27(
|
|
3129
|
-
"div",
|
|
3130
|
-
{
|
|
3131
|
-
className: "relative w-full aspect-video bg-black",
|
|
3132
|
-
onMouseEnter: handleMouseEnter,
|
|
3133
|
-
onMouseLeave: handleMouseLeave,
|
|
3134
|
-
children: [
|
|
3135
|
-
/* @__PURE__ */ jsx55(
|
|
3136
|
-
"video",
|
|
3137
|
-
{
|
|
3138
|
-
ref: videoRef,
|
|
3139
|
-
className: "w-full h-full object-contain",
|
|
3140
|
-
poster: posterUrl,
|
|
3141
|
-
controls: showControls && (isMobile || isPlaying),
|
|
3142
|
-
muted: playOptions === "autoplay" || playOptions === "playOnHover",
|
|
3143
|
-
autoPlay: playOptions === "autoplay",
|
|
3144
|
-
loop,
|
|
3145
|
-
playsInline: true,
|
|
3146
|
-
onClick: !isMobile && !isPlaying ? handlePlayPause : void 0
|
|
3147
|
-
}
|
|
3148
|
-
),
|
|
3149
|
-
!isMobile && playOptions === "playOnHover" && posterUrl && /* @__PURE__ */ jsx55(
|
|
3150
|
-
"img",
|
|
3151
|
-
{
|
|
3152
|
-
src: posterUrl,
|
|
3153
|
-
width: intrinsicWidth,
|
|
3154
|
-
height: intrinsicHeight,
|
|
3155
|
-
alt: "poster",
|
|
3156
|
-
className: `absolute inset-0 object-cover transition-opacity ${isHovered ? "opacity-0" : "opacity-100"}`
|
|
3157
|
-
}
|
|
3158
|
-
),
|
|
3159
|
-
!isMobile && !isPlaying && /* @__PURE__ */ jsx55(
|
|
3160
|
-
"div",
|
|
3161
|
-
{
|
|
3162
|
-
className: "absolute inset-0 flex items-center justify-center cursor-pointer",
|
|
3163
|
-
onClick: handlePlayPause,
|
|
3164
|
-
children: "\u25B6"
|
|
3165
|
-
}
|
|
3166
|
-
)
|
|
3167
|
-
]
|
|
3168
|
-
}
|
|
3169
|
-
);
|
|
3170
|
-
}
|
|
3171
|
-
);
|
|
3172
|
-
HlsPlayer.displayName = "HlsPlayer";
|
|
3173
|
-
var HlsPlayer_default = HlsPlayer;
|
|
3018
|
+
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3019
|
+
import dynamic2 from "next/dynamic";
|
|
3174
3020
|
|
|
3175
3021
|
// src/components/DeviceAssetSelector.tsx
|
|
3176
|
-
import { jsx as
|
|
3022
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3177
3023
|
var DeviceAssetSelector = ({
|
|
3178
3024
|
assets,
|
|
3179
3025
|
apiBaseUrl,
|
|
@@ -3248,7 +3094,7 @@ var DeviceAssetSelector = ({
|
|
|
3248
3094
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
3249
3095
|
const renderMedia = () => {
|
|
3250
3096
|
if (isHls) {
|
|
3251
|
-
return /* @__PURE__ */
|
|
3097
|
+
return /* @__PURE__ */ jsx54(
|
|
3252
3098
|
HlsPlayer_default,
|
|
3253
3099
|
{
|
|
3254
3100
|
assetUrl: resolvedAssetUrl,
|
|
@@ -3257,13 +3103,15 @@ var DeviceAssetSelector = ({
|
|
|
3257
3103
|
intrinsicHeight,
|
|
3258
3104
|
showControls,
|
|
3259
3105
|
loop,
|
|
3260
|
-
playOptions
|
|
3106
|
+
playOptions,
|
|
3107
|
+
apiBaseUrl,
|
|
3108
|
+
session
|
|
3261
3109
|
}
|
|
3262
3110
|
);
|
|
3263
3111
|
} else {
|
|
3264
3112
|
return (
|
|
3265
3113
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3266
|
-
/* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ jsx54(
|
|
3267
3115
|
"img",
|
|
3268
3116
|
{
|
|
3269
3117
|
style: styles,
|
|
@@ -3279,17 +3127,20 @@ var DeviceAssetSelector = ({
|
|
|
3279
3127
|
}
|
|
3280
3128
|
};
|
|
3281
3129
|
if (width) {
|
|
3282
|
-
return /* @__PURE__ */
|
|
3130
|
+
return /* @__PURE__ */ jsx54("div", { style: { width }, children: renderMedia() });
|
|
3283
3131
|
}
|
|
3284
3132
|
if (nodeProps?.format) {
|
|
3285
|
-
return /* @__PURE__ */
|
|
3133
|
+
return /* @__PURE__ */ jsx54("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3286
3134
|
}
|
|
3287
3135
|
return renderMedia();
|
|
3288
3136
|
};
|
|
3289
3137
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3290
3138
|
|
|
3291
3139
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3292
|
-
import { Fragment as Fragment6, jsx as
|
|
3140
|
+
import { Fragment as Fragment6, jsx as jsx55 } from "react/jsx-runtime";
|
|
3141
|
+
var HlsPlayer = dynamic2(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
|
|
3142
|
+
ssr: false
|
|
3143
|
+
});
|
|
3293
3144
|
var getNestedValue = (obj, path) => {
|
|
3294
3145
|
if (!obj || !path) return void 0;
|
|
3295
3146
|
return path.split(".").reduce((current, key) => {
|
|
@@ -3329,7 +3180,7 @@ var ImageNode = (props) => {
|
|
|
3329
3180
|
console.error("Error parsing assets in ImageNode:", error);
|
|
3330
3181
|
}
|
|
3331
3182
|
if (assets && assets.length > 0) {
|
|
3332
|
-
return /* @__PURE__ */
|
|
3183
|
+
return /* @__PURE__ */ jsx55(Fragment6, { children: /* @__PURE__ */ jsx55(
|
|
3333
3184
|
DeviceAssetSelector_default,
|
|
3334
3185
|
{
|
|
3335
3186
|
device: props.device,
|
|
@@ -3378,8 +3229,8 @@ var ImageNode = (props) => {
|
|
|
3378
3229
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3379
3230
|
const renderMedia = () => {
|
|
3380
3231
|
if (isHls) {
|
|
3381
|
-
return /* @__PURE__ */
|
|
3382
|
-
|
|
3232
|
+
return /* @__PURE__ */ jsx55(
|
|
3233
|
+
HlsPlayer,
|
|
3383
3234
|
{
|
|
3384
3235
|
assetUrl: imageUrl,
|
|
3385
3236
|
posterUrl,
|
|
@@ -3387,11 +3238,13 @@ var ImageNode = (props) => {
|
|
|
3387
3238
|
intrinsicHeight: props.node.intrinsicHeight,
|
|
3388
3239
|
showControls: props.node.showControls === "true",
|
|
3389
3240
|
loop: props.node.loop === "true",
|
|
3390
|
-
playOptions: props.node.playOptions
|
|
3241
|
+
playOptions: props.node.playOptions,
|
|
3242
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
3243
|
+
session: props.session
|
|
3391
3244
|
}
|
|
3392
3245
|
);
|
|
3393
3246
|
} else {
|
|
3394
|
-
return /* @__PURE__ */
|
|
3247
|
+
return /* @__PURE__ */ jsx55(React42.Fragment, { children: /* @__PURE__ */ jsx55(
|
|
3395
3248
|
"img",
|
|
3396
3249
|
{
|
|
3397
3250
|
style: styles,
|
|
@@ -3406,14 +3259,14 @@ var ImageNode = (props) => {
|
|
|
3406
3259
|
}
|
|
3407
3260
|
};
|
|
3408
3261
|
if (props.node.width) {
|
|
3409
|
-
return /* @__PURE__ */
|
|
3262
|
+
return /* @__PURE__ */ jsx55("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3410
3263
|
}
|
|
3411
3264
|
return renderMedia();
|
|
3412
3265
|
};
|
|
3413
3266
|
var ImageNode_default = ImageNode;
|
|
3414
3267
|
|
|
3415
3268
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3416
|
-
import { Fragment as Fragment7, jsx as
|
|
3269
|
+
import { Fragment as Fragment7, jsx as jsx56, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3417
3270
|
var WidgetNode = (props) => {
|
|
3418
3271
|
const getWidgetParameters = () => {
|
|
3419
3272
|
const widgetInputParameters = {
|
|
@@ -3470,14 +3323,14 @@ var WidgetNode = (props) => {
|
|
|
3470
3323
|
};
|
|
3471
3324
|
const widgetCode = props.node?.widgetCode;
|
|
3472
3325
|
if (!widgetCode) {
|
|
3473
|
-
return /* @__PURE__ */
|
|
3326
|
+
return /* @__PURE__ */ jsx56(Fragment7, { children: "Invalid widget" });
|
|
3474
3327
|
}
|
|
3475
3328
|
const SelectedWidget = getWidget(widgetCode);
|
|
3476
3329
|
if (!SelectedWidget) {
|
|
3477
3330
|
if (process.env.NODE_ENV !== "production") {
|
|
3478
3331
|
console.warn("Widget not found:", widgetCode);
|
|
3479
3332
|
}
|
|
3480
|
-
return /* @__PURE__ */
|
|
3333
|
+
return /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
3481
3334
|
"Widget not found: ",
|
|
3482
3335
|
widgetCode
|
|
3483
3336
|
] });
|
|
@@ -3485,7 +3338,7 @@ var WidgetNode = (props) => {
|
|
|
3485
3338
|
const widgetParams = getWidgetParameters();
|
|
3486
3339
|
return (
|
|
3487
3340
|
// eslint-disable-next-line react-hooks/static-components
|
|
3488
|
-
/* @__PURE__ */
|
|
3341
|
+
/* @__PURE__ */ jsx56(
|
|
3489
3342
|
SelectedWidget,
|
|
3490
3343
|
{
|
|
3491
3344
|
params: widgetParams,
|
|
@@ -3501,12 +3354,12 @@ var WidgetNode = (props) => {
|
|
|
3501
3354
|
var WidgetNode_default = WidgetNode;
|
|
3502
3355
|
|
|
3503
3356
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3504
|
-
import
|
|
3357
|
+
import React43, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect7 } from "react";
|
|
3505
3358
|
|
|
3506
3359
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3507
|
-
import { jsx as
|
|
3360
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
3508
3361
|
var InputControlNode = (props) => {
|
|
3509
|
-
return /* @__PURE__ */
|
|
3362
|
+
return /* @__PURE__ */ jsx57("div", { children: /* @__PURE__ */ jsx57(
|
|
3510
3363
|
InputControl_default,
|
|
3511
3364
|
{
|
|
3512
3365
|
name: props.node.name,
|
|
@@ -3740,22 +3593,22 @@ var ServiceClient = class {
|
|
|
3740
3593
|
var ServiceClient_default = ServiceClient;
|
|
3741
3594
|
|
|
3742
3595
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3743
|
-
import { jsx as
|
|
3596
|
+
import { jsx as jsx58, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3744
3597
|
var FormContainerNode = (props) => {
|
|
3745
3598
|
const NodeTypes2 = {
|
|
3746
3599
|
["input-control"]: InputControlNode_default
|
|
3747
3600
|
};
|
|
3748
3601
|
const { node } = props;
|
|
3749
|
-
const formRef =
|
|
3602
|
+
const formRef = useRef3(null);
|
|
3750
3603
|
const initialState = {
|
|
3751
3604
|
inputValues: {},
|
|
3752
3605
|
lastPropertyChanged: ""
|
|
3753
3606
|
};
|
|
3754
3607
|
const [formState, dispatch] = useReducer2(FormReducer_default, initialState);
|
|
3755
|
-
const handleInputChange =
|
|
3608
|
+
const handleInputChange = useCallback3((updatedValues) => {
|
|
3756
3609
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
3757
3610
|
}, [dispatch]);
|
|
3758
|
-
|
|
3611
|
+
useEffect7(() => {
|
|
3759
3612
|
const fetchInitialData = async () => {
|
|
3760
3613
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
3761
3614
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -3770,12 +3623,12 @@ var FormContainerNode = (props) => {
|
|
|
3770
3623
|
};
|
|
3771
3624
|
fetchInitialData();
|
|
3772
3625
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3773
|
-
return /* @__PURE__ */
|
|
3626
|
+
return /* @__PURE__ */ jsxs27("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3774
3627
|
node.children && node.children.map((node2, index) => {
|
|
3775
3628
|
{
|
|
3776
3629
|
}
|
|
3777
3630
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3778
|
-
return /* @__PURE__ */
|
|
3631
|
+
return /* @__PURE__ */ jsx58(React43.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx58(
|
|
3779
3632
|
InputControlNode_default,
|
|
3780
3633
|
{
|
|
3781
3634
|
value: formState.inputValues[node2.name],
|
|
@@ -3784,18 +3637,18 @@ var FormContainerNode = (props) => {
|
|
|
3784
3637
|
}
|
|
3785
3638
|
) }, index);
|
|
3786
3639
|
}),
|
|
3787
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3640
|
+
node.children.length == 0 && /* @__PURE__ */ jsx58("div", { className: "py-0.5 lg:py-1.5" })
|
|
3788
3641
|
] });
|
|
3789
3642
|
};
|
|
3790
3643
|
var FormContainerNode_default = FormContainerNode;
|
|
3791
3644
|
|
|
3792
3645
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3793
|
-
import
|
|
3646
|
+
import React46 from "react";
|
|
3794
3647
|
|
|
3795
3648
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3796
|
-
import
|
|
3797
|
-
import { jsx as
|
|
3798
|
-
var IframeClient =
|
|
3649
|
+
import dynamic3 from "next/dynamic";
|
|
3650
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
3651
|
+
var IframeClient = dynamic3(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
3799
3652
|
ssr: false
|
|
3800
3653
|
});
|
|
3801
3654
|
var EmbedNode = (props) => {
|
|
@@ -3807,13 +3660,13 @@ var EmbedNode = (props) => {
|
|
|
3807
3660
|
} else {
|
|
3808
3661
|
src = props.node.embedSrc;
|
|
3809
3662
|
}
|
|
3810
|
-
return /* @__PURE__ */
|
|
3663
|
+
return /* @__PURE__ */ jsx59("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx59(IframeClient, { src }) });
|
|
3811
3664
|
};
|
|
3812
3665
|
var EmbedNode_default = EmbedNode;
|
|
3813
3666
|
|
|
3814
3667
|
// src/components/Slider.tsx
|
|
3815
|
-
import
|
|
3816
|
-
import { Fragment as Fragment8, jsx as
|
|
3668
|
+
import React44, { useState as useState8, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3669
|
+
import { Fragment as Fragment8, jsx as jsx60, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3817
3670
|
var Slider = ({
|
|
3818
3671
|
children,
|
|
3819
3672
|
slidesToShow = 4,
|
|
@@ -3831,13 +3684,13 @@ var Slider = ({
|
|
|
3831
3684
|
pillStyle = "cumulative",
|
|
3832
3685
|
progressPosition = "bottom"
|
|
3833
3686
|
}) => {
|
|
3834
|
-
const [currentSlide, setCurrentSlide] =
|
|
3835
|
-
const [transition, setTransition] =
|
|
3836
|
-
const [slidesToShowState, setSlidesToShowState] =
|
|
3687
|
+
const [currentSlide, setCurrentSlide] = useState8(0);
|
|
3688
|
+
const [transition, setTransition] = useState8(true);
|
|
3689
|
+
const [slidesToShowState, setSlidesToShowState] = useState8(
|
|
3837
3690
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3838
3691
|
);
|
|
3839
|
-
const [isPlaying, setIsPlaying] =
|
|
3840
|
-
|
|
3692
|
+
const [isPlaying, setIsPlaying] = useState8(autoplay);
|
|
3693
|
+
useEffect8(() => {
|
|
3841
3694
|
if (typeof slidesToShow === "number") return;
|
|
3842
3695
|
const handleResize = () => {
|
|
3843
3696
|
if (window.innerWidth >= 1024) {
|
|
@@ -3852,7 +3705,7 @@ var Slider = ({
|
|
|
3852
3705
|
window.addEventListener("resize", handleResize);
|
|
3853
3706
|
return () => window.removeEventListener("resize", handleResize);
|
|
3854
3707
|
}, [slidesToShow]);
|
|
3855
|
-
|
|
3708
|
+
useEffect8(() => {
|
|
3856
3709
|
if (!autoplay) return;
|
|
3857
3710
|
const timer = setInterval(() => {
|
|
3858
3711
|
if (isPlaying) {
|
|
@@ -3907,10 +3760,10 @@ var Slider = ({
|
|
|
3907
3760
|
};
|
|
3908
3761
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3909
3762
|
const slides = Children.map(children, (child, index) => {
|
|
3910
|
-
if (!
|
|
3763
|
+
if (!React44.isValidElement(child)) return null;
|
|
3911
3764
|
const childProps = child.props;
|
|
3912
3765
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3913
|
-
return /* @__PURE__ */
|
|
3766
|
+
return /* @__PURE__ */ jsx60(
|
|
3914
3767
|
"div",
|
|
3915
3768
|
{
|
|
3916
3769
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -3933,14 +3786,14 @@ var Slider = ({
|
|
|
3933
3786
|
return "bottom-4";
|
|
3934
3787
|
}
|
|
3935
3788
|
};
|
|
3936
|
-
return /* @__PURE__ */
|
|
3789
|
+
return /* @__PURE__ */ jsxs28(
|
|
3937
3790
|
"div",
|
|
3938
3791
|
{
|
|
3939
3792
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3940
3793
|
onMouseEnter: handleMouseEnter,
|
|
3941
3794
|
onMouseLeave: handleMouseLeave,
|
|
3942
3795
|
children: [
|
|
3943
|
-
/* @__PURE__ */
|
|
3796
|
+
/* @__PURE__ */ jsx60(
|
|
3944
3797
|
"div",
|
|
3945
3798
|
{
|
|
3946
3799
|
className: "flex h-full",
|
|
@@ -3951,18 +3804,18 @@ var Slider = ({
|
|
|
3951
3804
|
children: slides
|
|
3952
3805
|
}
|
|
3953
3806
|
),
|
|
3954
|
-
show_arrows && /* @__PURE__ */
|
|
3955
|
-
/* @__PURE__ */
|
|
3807
|
+
show_arrows && /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
3808
|
+
/* @__PURE__ */ jsx60(
|
|
3956
3809
|
ArrowButton,
|
|
3957
3810
|
{
|
|
3958
3811
|
direction: "left",
|
|
3959
3812
|
onClick: prevSlide,
|
|
3960
3813
|
visible: infinite_scroll || currentSlide > 0,
|
|
3961
3814
|
className: arrowClassName,
|
|
3962
|
-
children: /* @__PURE__ */
|
|
3815
|
+
children: /* @__PURE__ */ jsx60("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__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3963
3816
|
}
|
|
3964
3817
|
),
|
|
3965
|
-
/* @__PURE__ */
|
|
3818
|
+
/* @__PURE__ */ jsxs28(
|
|
3966
3819
|
ArrowButton,
|
|
3967
3820
|
{
|
|
3968
3821
|
direction: "right",
|
|
@@ -3970,13 +3823,13 @@ var Slider = ({
|
|
|
3970
3823
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3971
3824
|
className: arrowClassName,
|
|
3972
3825
|
children: [
|
|
3973
|
-
/* @__PURE__ */
|
|
3826
|
+
/* @__PURE__ */ jsx60("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__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3974
3827
|
" "
|
|
3975
3828
|
]
|
|
3976
3829
|
}
|
|
3977
3830
|
)
|
|
3978
3831
|
] }),
|
|
3979
|
-
show_dots && /* @__PURE__ */
|
|
3832
|
+
show_dots && /* @__PURE__ */ jsx60("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__ */ jsx60(
|
|
3980
3833
|
ProgressPill,
|
|
3981
3834
|
{
|
|
3982
3835
|
active: index === currentSlide,
|
|
@@ -4002,7 +3855,7 @@ var ArrowButton = ({
|
|
|
4002
3855
|
visible,
|
|
4003
3856
|
children,
|
|
4004
3857
|
className = ""
|
|
4005
|
-
}) => /* @__PURE__ */
|
|
3858
|
+
}) => /* @__PURE__ */ jsx60(
|
|
4006
3859
|
"button",
|
|
4007
3860
|
{
|
|
4008
3861
|
className: `
|
|
@@ -4028,13 +3881,13 @@ var ProgressPill = ({
|
|
|
4028
3881
|
currentSlide,
|
|
4029
3882
|
totalSlides
|
|
4030
3883
|
}) => {
|
|
4031
|
-
const [progress, setProgress] =
|
|
4032
|
-
|
|
3884
|
+
const [progress, setProgress] = useState8(0);
|
|
3885
|
+
useEffect8(() => {
|
|
4033
3886
|
if (active) {
|
|
4034
3887
|
setProgress(0);
|
|
4035
3888
|
}
|
|
4036
3889
|
}, [active, index]);
|
|
4037
|
-
|
|
3890
|
+
useEffect8(() => {
|
|
4038
3891
|
if (!active || !isPlaying) {
|
|
4039
3892
|
if (!active) {
|
|
4040
3893
|
setProgress(0);
|
|
@@ -4089,7 +3942,7 @@ var ProgressPill = ({
|
|
|
4089
3942
|
const renderProgressBar = () => {
|
|
4090
3943
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4091
3944
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4092
|
-
return /* @__PURE__ */
|
|
3945
|
+
return /* @__PURE__ */ jsx60(
|
|
4093
3946
|
"div",
|
|
4094
3947
|
{
|
|
4095
3948
|
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`,
|
|
@@ -4101,7 +3954,7 @@ var ProgressPill = ({
|
|
|
4101
3954
|
};
|
|
4102
3955
|
const renderCumulativeFill = () => {
|
|
4103
3956
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4104
|
-
return /* @__PURE__ */
|
|
3957
|
+
return /* @__PURE__ */ jsx60(
|
|
4105
3958
|
"div",
|
|
4106
3959
|
{
|
|
4107
3960
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4111,7 +3964,7 @@ var ProgressPill = ({
|
|
|
4111
3964
|
}
|
|
4112
3965
|
return null;
|
|
4113
3966
|
};
|
|
4114
|
-
return /* @__PURE__ */
|
|
3967
|
+
return /* @__PURE__ */ jsxs28(
|
|
4115
3968
|
"button",
|
|
4116
3969
|
{
|
|
4117
3970
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4287,10 +4140,10 @@ var PathUtility = class {
|
|
|
4287
4140
|
var PathUtility_default = new PathUtility();
|
|
4288
4141
|
|
|
4289
4142
|
// src/components/NoDataFound.tsx
|
|
4290
|
-
import { jsx as
|
|
4143
|
+
import { jsx as jsx61, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4291
4144
|
var NoDataFound = () => {
|
|
4292
|
-
return /* @__PURE__ */
|
|
4293
|
-
/* @__PURE__ */
|
|
4145
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4146
|
+
/* @__PURE__ */ jsx61("div", { className: "mb-5", children: /* @__PURE__ */ jsx61("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx61(
|
|
4294
4147
|
"svg",
|
|
4295
4148
|
{
|
|
4296
4149
|
className: "w-10 h-10",
|
|
@@ -4298,7 +4151,7 @@ var NoDataFound = () => {
|
|
|
4298
4151
|
stroke: "currentColor",
|
|
4299
4152
|
viewBox: "0 0 24 24",
|
|
4300
4153
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4301
|
-
children: /* @__PURE__ */
|
|
4154
|
+
children: /* @__PURE__ */ jsx61(
|
|
4302
4155
|
"path",
|
|
4303
4156
|
{
|
|
4304
4157
|
strokeLinecap: "round",
|
|
@@ -4309,15 +4162,15 @@ var NoDataFound = () => {
|
|
|
4309
4162
|
)
|
|
4310
4163
|
}
|
|
4311
4164
|
) }) }),
|
|
4312
|
-
/* @__PURE__ */
|
|
4313
|
-
/* @__PURE__ */
|
|
4165
|
+
/* @__PURE__ */ jsx61("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4166
|
+
/* @__PURE__ */ jsx61("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4314
4167
|
] });
|
|
4315
4168
|
};
|
|
4316
4169
|
var NoDataFound_default = NoDataFound;
|
|
4317
4170
|
|
|
4318
4171
|
// src/components/Pagination.tsx
|
|
4319
4172
|
import { useMemo } from "react";
|
|
4320
|
-
import { jsx as
|
|
4173
|
+
import { jsx as jsx62, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4321
4174
|
var Pagination = (props) => {
|
|
4322
4175
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4323
4176
|
const builder = useMemo(() => {
|
|
@@ -4361,7 +4214,7 @@ var Pagination = (props) => {
|
|
|
4361
4214
|
return range;
|
|
4362
4215
|
};
|
|
4363
4216
|
const paginationRange = getPaginationRange();
|
|
4364
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
4217
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx62(
|
|
4365
4218
|
Hyperlink,
|
|
4366
4219
|
{
|
|
4367
4220
|
linkType: "Link" /* Link */,
|
|
@@ -4376,9 +4229,9 @@ var Pagination = (props) => {
|
|
|
4376
4229
|
);
|
|
4377
4230
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4378
4231
|
if (disabled) {
|
|
4379
|
-
return /* @__PURE__ */
|
|
4232
|
+
return /* @__PURE__ */ jsx62("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 });
|
|
4380
4233
|
}
|
|
4381
|
-
return /* @__PURE__ */
|
|
4234
|
+
return /* @__PURE__ */ jsx62(
|
|
4382
4235
|
Hyperlink,
|
|
4383
4236
|
{
|
|
4384
4237
|
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",
|
|
@@ -4388,35 +4241,35 @@ var Pagination = (props) => {
|
|
|
4388
4241
|
);
|
|
4389
4242
|
};
|
|
4390
4243
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4391
|
-
return /* @__PURE__ */
|
|
4392
|
-
/* @__PURE__ */
|
|
4393
|
-
/* @__PURE__ */
|
|
4244
|
+
return /* @__PURE__ */ jsxs30("div", { className: "py-6 border-t bg-default", children: [
|
|
4245
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4246
|
+
/* @__PURE__ */ jsxs30("div", { className: "text-sm", children: [
|
|
4394
4247
|
"Showing ",
|
|
4395
|
-
/* @__PURE__ */
|
|
4248
|
+
/* @__PURE__ */ jsxs30("span", { className: "font-semibold", children: [
|
|
4396
4249
|
startItem,
|
|
4397
4250
|
"-",
|
|
4398
4251
|
endItem
|
|
4399
4252
|
] }),
|
|
4400
4253
|
" ",
|
|
4401
4254
|
"out of ",
|
|
4402
|
-
/* @__PURE__ */
|
|
4255
|
+
/* @__PURE__ */ jsx62("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4403
4256
|
" results"
|
|
4404
4257
|
] }),
|
|
4405
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4406
|
-
/* @__PURE__ */
|
|
4258
|
+
totalPages > 1 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-1", children: [
|
|
4259
|
+
/* @__PURE__ */ jsxs30(
|
|
4407
4260
|
NavigationButton,
|
|
4408
4261
|
{
|
|
4409
4262
|
page: activePageNumber - 1,
|
|
4410
4263
|
disabled: activePageNumber === 1,
|
|
4411
4264
|
children: [
|
|
4412
|
-
/* @__PURE__ */
|
|
4413
|
-
/* @__PURE__ */
|
|
4265
|
+
/* @__PURE__ */ jsx62("span", { children: /* @__PURE__ */ jsx62(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4266
|
+
/* @__PURE__ */ jsx62("span", { className: "text-sm", children: "Prev" })
|
|
4414
4267
|
]
|
|
4415
4268
|
}
|
|
4416
4269
|
),
|
|
4417
4270
|
paginationRange.map((item, index) => {
|
|
4418
4271
|
if (item === "...") {
|
|
4419
|
-
return /* @__PURE__ */
|
|
4272
|
+
return /* @__PURE__ */ jsx62(
|
|
4420
4273
|
"span",
|
|
4421
4274
|
{
|
|
4422
4275
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4426,23 +4279,23 @@ var Pagination = (props) => {
|
|
|
4426
4279
|
);
|
|
4427
4280
|
}
|
|
4428
4281
|
const page = item;
|
|
4429
|
-
return /* @__PURE__ */
|
|
4282
|
+
return /* @__PURE__ */ jsx62(PageButton, { page, children: page }, page);
|
|
4430
4283
|
}),
|
|
4431
|
-
/* @__PURE__ */
|
|
4284
|
+
/* @__PURE__ */ jsxs30(
|
|
4432
4285
|
NavigationButton,
|
|
4433
4286
|
{
|
|
4434
4287
|
page: activePageNumber + 1,
|
|
4435
4288
|
disabled: activePageNumber === totalPages,
|
|
4436
4289
|
children: [
|
|
4437
|
-
/* @__PURE__ */
|
|
4438
|
-
/* @__PURE__ */
|
|
4290
|
+
/* @__PURE__ */ jsx62("span", { className: "text-sm", children: "Next" }),
|
|
4291
|
+
/* @__PURE__ */ jsx62("span", { children: /* @__PURE__ */ jsx62(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4439
4292
|
]
|
|
4440
4293
|
}
|
|
4441
4294
|
)
|
|
4442
4295
|
] }),
|
|
4443
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4444
|
-
/* @__PURE__ */
|
|
4445
|
-
/* @__PURE__ */
|
|
4296
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-2", children: [
|
|
4297
|
+
/* @__PURE__ */ jsx62("span", { className: "text-sm", children: "Go to:" }),
|
|
4298
|
+
/* @__PURE__ */ jsx62("div", { className: "relative", children: /* @__PURE__ */ jsx62(
|
|
4446
4299
|
"input",
|
|
4447
4300
|
{
|
|
4448
4301
|
type: "number",
|
|
@@ -4463,9 +4316,9 @@ var Pagination = (props) => {
|
|
|
4463
4316
|
) })
|
|
4464
4317
|
] })
|
|
4465
4318
|
] }),
|
|
4466
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
4467
|
-
/* @__PURE__ */
|
|
4468
|
-
/* @__PURE__ */
|
|
4319
|
+
showPageSizeSelector && /* @__PURE__ */ jsx62("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4320
|
+
/* @__PURE__ */ jsx62("span", { className: "text-sm", children: "Show:" }),
|
|
4321
|
+
/* @__PURE__ */ jsx62("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx62(
|
|
4469
4322
|
Hyperlink,
|
|
4470
4323
|
{
|
|
4471
4324
|
className: `
|
|
@@ -4477,14 +4330,14 @@ var Pagination = (props) => {
|
|
|
4477
4330
|
},
|
|
4478
4331
|
size
|
|
4479
4332
|
)) }),
|
|
4480
|
-
/* @__PURE__ */
|
|
4333
|
+
/* @__PURE__ */ jsx62("span", { className: "text-sm", children: "per page" })
|
|
4481
4334
|
] }) })
|
|
4482
4335
|
] });
|
|
4483
4336
|
};
|
|
4484
4337
|
var Pagination_default = Pagination;
|
|
4485
4338
|
|
|
4486
4339
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4487
|
-
import { jsx as
|
|
4340
|
+
import { jsx as jsx63, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4488
4341
|
function toCamelCase(str) {
|
|
4489
4342
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4490
4343
|
}
|
|
@@ -4666,7 +4519,7 @@ var DivContainer = async (props) => {
|
|
|
4666
4519
|
response = await serviceClient.get(endpoint);
|
|
4667
4520
|
result = response?.result;
|
|
4668
4521
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4669
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsx63(NoDataFound_default, {});
|
|
4670
4523
|
}
|
|
4671
4524
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4672
4525
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4678,7 +4531,7 @@ var DivContainer = async (props) => {
|
|
|
4678
4531
|
}
|
|
4679
4532
|
const SelectedNode = NodeTypes2[node.type];
|
|
4680
4533
|
if (!SelectedNode) return null;
|
|
4681
|
-
return /* @__PURE__ */
|
|
4534
|
+
return /* @__PURE__ */ jsx63(React46.Fragment, { children: /* @__PURE__ */ jsx63(
|
|
4682
4535
|
SelectedNode,
|
|
4683
4536
|
{
|
|
4684
4537
|
node,
|
|
@@ -4778,9 +4631,9 @@ var DivContainer = async (props) => {
|
|
|
4778
4631
|
props.node.autoFormat && "auto-format",
|
|
4779
4632
|
props.node.bgClass
|
|
4780
4633
|
].filter(Boolean).join(" ");
|
|
4781
|
-
return /* @__PURE__ */
|
|
4782
|
-
/* @__PURE__ */
|
|
4783
|
-
/* @__PURE__ */
|
|
4634
|
+
return /* @__PURE__ */ jsxs31(React46.Fragment, { children: [
|
|
4635
|
+
/* @__PURE__ */ jsx63("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4636
|
+
/* @__PURE__ */ jsx63(React46.Fragment, { children: /* @__PURE__ */ jsx63(
|
|
4784
4637
|
Wrapper,
|
|
4785
4638
|
{
|
|
4786
4639
|
id: guid,
|
|
@@ -4789,18 +4642,18 @@ var DivContainer = async (props) => {
|
|
|
4789
4642
|
...wrapperProps,
|
|
4790
4643
|
children: dataToRender.map(
|
|
4791
4644
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4792
|
-
(child, i) => /* @__PURE__ */
|
|
4645
|
+
(child, i) => /* @__PURE__ */ jsx63(React46.Fragment, { children: child }, i)
|
|
4793
4646
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4794
4647
|
)
|
|
4795
4648
|
}
|
|
4796
4649
|
) }),
|
|
4797
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4650
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx63("div", { children: /* @__PURE__ */ jsx63(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4798
4651
|
] });
|
|
4799
4652
|
};
|
|
4800
4653
|
var DivContainer_default = DivContainer;
|
|
4801
4654
|
|
|
4802
4655
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4803
|
-
import { jsx as
|
|
4656
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
4804
4657
|
var NodeTypes = {
|
|
4805
4658
|
["paragraph"]: ParagraphNode_default,
|
|
4806
4659
|
["heading"]: HeadingNode_default,
|
|
@@ -4827,11 +4680,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4827
4680
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4828
4681
|
rootNode = pageBodyTree.root;
|
|
4829
4682
|
}
|
|
4830
|
-
return /* @__PURE__ */
|
|
4683
|
+
return /* @__PURE__ */ jsx64(React47.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4831
4684
|
{
|
|
4832
4685
|
}
|
|
4833
4686
|
const SelectedNode = NodeTypes[node.type];
|
|
4834
|
-
return /* @__PURE__ */
|
|
4687
|
+
return /* @__PURE__ */ jsx64(React47.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx64(React47.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx64(React47.Fragment, { children: /* @__PURE__ */ jsx64(
|
|
4835
4688
|
SelectedNode,
|
|
4836
4689
|
{
|
|
4837
4690
|
node,
|
|
@@ -4846,7 +4699,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4846
4699
|
assetBaseUrl: props.assetBaseUrl,
|
|
4847
4700
|
device: props.device
|
|
4848
4701
|
}
|
|
4849
|
-
) }) : /* @__PURE__ */
|
|
4702
|
+
) }) : /* @__PURE__ */ jsx64(React47.Fragment, { children: /* @__PURE__ */ jsx64(
|
|
4850
4703
|
SelectedNode,
|
|
4851
4704
|
{
|
|
4852
4705
|
node,
|