@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260320070922 → 0.8.1-dev.20260320074145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +90 -149
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -140
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2912,60 +2912,7 @@ var QuoteNode_default = QuoteNode;
|
|
|
2912
2912
|
|
|
2913
2913
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2914
2914
|
import React42 from "react";
|
|
2915
|
-
|
|
2916
|
-
// src/components/CopyButton.tsx
|
|
2917
|
-
import { useState as useState8, useRef as useRef3, useEffect as useEffect7 } from "react";
|
|
2918
|
-
import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2919
|
-
function CopyButton({ text }) {
|
|
2920
|
-
const [copied, setCopied] = useState8(false);
|
|
2921
|
-
const timeoutRef = useRef3(null);
|
|
2922
|
-
useEffect7(() => {
|
|
2923
|
-
return () => {
|
|
2924
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2925
|
-
};
|
|
2926
|
-
}, []);
|
|
2927
|
-
const handleCopy = async () => {
|
|
2928
|
-
try {
|
|
2929
|
-
await navigator.clipboard.writeText(text);
|
|
2930
|
-
setCopied(true);
|
|
2931
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2932
|
-
timeoutRef.current = setTimeout(() => setCopied(false), 2e3);
|
|
2933
|
-
} catch (err) {
|
|
2934
|
-
console.error("Failed to copy: ", err);
|
|
2935
|
-
}
|
|
2936
|
-
};
|
|
2937
|
-
return /* @__PURE__ */ jsxs26(
|
|
2938
|
-
"button",
|
|
2939
|
-
{
|
|
2940
|
-
onClick: handleCopy,
|
|
2941
|
-
className: "flex gap-1 items-center hover:text-white transition",
|
|
2942
|
-
children: [
|
|
2943
|
-
/* @__PURE__ */ jsx52(
|
|
2944
|
-
"svg",
|
|
2945
|
-
{
|
|
2946
|
-
width: "16",
|
|
2947
|
-
height: "16",
|
|
2948
|
-
viewBox: "0 0 24 24",
|
|
2949
|
-
className: "w-4 h-4",
|
|
2950
|
-
fill: "currentColor",
|
|
2951
|
-
children: /* @__PURE__ */ jsx52(
|
|
2952
|
-
"path",
|
|
2953
|
-
{
|
|
2954
|
-
fillRule: "evenodd",
|
|
2955
|
-
clipRule: "evenodd",
|
|
2956
|
-
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"
|
|
2957
|
-
}
|
|
2958
|
-
)
|
|
2959
|
-
}
|
|
2960
|
-
),
|
|
2961
|
-
copied ? "Copied!" : "Copy code"
|
|
2962
|
-
]
|
|
2963
|
-
}
|
|
2964
|
-
);
|
|
2965
|
-
}
|
|
2966
|
-
|
|
2967
|
-
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2968
|
-
import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2915
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2969
2916
|
var CodeNode = (props) => {
|
|
2970
2917
|
const NodeTypes2 = {
|
|
2971
2918
|
["text"]: TextNode_default,
|
|
@@ -2978,23 +2925,17 @@ var CodeNode = (props) => {
|
|
|
2978
2925
|
if (node.type === "link") return node.text || node.url || "";
|
|
2979
2926
|
return "";
|
|
2980
2927
|
}).join("") ?? "";
|
|
2981
|
-
return /* @__PURE__ */
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
] }),
|
|
2986
|
-
/* @__PURE__ */ jsx53("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) => {
|
|
2987
|
-
const SelectedNode = NodeTypes2[node.type];
|
|
2988
|
-
return /* @__PURE__ */ jsx53(React42.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx53(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2989
|
-
}) })
|
|
2990
|
-
] });
|
|
2928
|
+
return /* @__PURE__ */ jsx52("div", { className: "code-block", children: /* @__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) => {
|
|
2929
|
+
const SelectedNode = NodeTypes2[node.type];
|
|
2930
|
+
return /* @__PURE__ */ jsx52(React42.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx52(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2931
|
+
}) }) });
|
|
2991
2932
|
};
|
|
2992
2933
|
var CodeNode_default = CodeNode;
|
|
2993
2934
|
|
|
2994
2935
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
2995
|
-
import { jsx as
|
|
2936
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2996
2937
|
var HorizontalRuleNode = (props) => {
|
|
2997
|
-
return /* @__PURE__ */
|
|
2938
|
+
return /* @__PURE__ */ jsx53("hr", {});
|
|
2998
2939
|
};
|
|
2999
2940
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3000
2941
|
|
|
@@ -3003,11 +2944,11 @@ import React48 from "react";
|
|
|
3003
2944
|
|
|
3004
2945
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3005
2946
|
import React43 from "react";
|
|
3006
|
-
import { jsx as
|
|
2947
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3007
2948
|
var ImageNode = (props) => {
|
|
3008
2949
|
const { node, apiBaseUrl = "" } = props;
|
|
3009
2950
|
let imageUrl = node.imageUrl.startsWith("http") ? node.imageUrl : `${apiBaseUrl}/digitalassets/storefront/${node.imageUrl}`;
|
|
3010
|
-
return /* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ jsx54(React43.Fragment, { children: node.width ? /* @__PURE__ */ jsx54("div", { style: { width: node.width }, children: /* @__PURE__ */ jsx54(
|
|
3011
2952
|
"img",
|
|
3012
2953
|
{
|
|
3013
2954
|
loading: "lazy",
|
|
@@ -3017,7 +2958,7 @@ var ImageNode = (props) => {
|
|
|
3017
2958
|
height: node.intrinsicHeight,
|
|
3018
2959
|
alt: node.title
|
|
3019
2960
|
}
|
|
3020
|
-
) }) : /* @__PURE__ */
|
|
2961
|
+
) }) : /* @__PURE__ */ jsx54(
|
|
3021
2962
|
"img",
|
|
3022
2963
|
{
|
|
3023
2964
|
loading: "lazy",
|
|
@@ -3033,7 +2974,7 @@ var ImageNode_default = ImageNode;
|
|
|
3033
2974
|
|
|
3034
2975
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3035
2976
|
import { Suspense } from "react";
|
|
3036
|
-
import { Fragment as Fragment5, jsx as
|
|
2977
|
+
import { Fragment as Fragment5, jsx as jsx55, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3037
2978
|
var WidgetNode = (props) => {
|
|
3038
2979
|
const getWidgetParameters = () => {
|
|
3039
2980
|
const widgetInputParameters = { ...props.routeParameters ?? {} };
|
|
@@ -3088,12 +3029,12 @@ var WidgetNode = (props) => {
|
|
|
3088
3029
|
const SelectedWidget = props.widgetRegistry?.[props.node.widgetCode];
|
|
3089
3030
|
if (!SelectedWidget) {
|
|
3090
3031
|
console.warn("Widget not found:", props.node.widgetCode);
|
|
3091
|
-
return /* @__PURE__ */
|
|
3032
|
+
return /* @__PURE__ */ jsxs26(Fragment5, { children: [
|
|
3092
3033
|
"Widget not found: ",
|
|
3093
3034
|
props.node.widgetCode
|
|
3094
3035
|
] });
|
|
3095
3036
|
}
|
|
3096
|
-
return /* @__PURE__ */
|
|
3037
|
+
return /* @__PURE__ */ jsx55(Suspense, { fallback: /* @__PURE__ */ jsx55("div", { className: "container mt-2", children: "..." }), children: /* @__PURE__ */ jsx55(
|
|
3097
3038
|
SelectedWidget,
|
|
3098
3039
|
{
|
|
3099
3040
|
params: getWidgetParameters(),
|
|
@@ -3108,42 +3049,42 @@ var WidgetNode = (props) => {
|
|
|
3108
3049
|
var WidgetNode_default = WidgetNode;
|
|
3109
3050
|
|
|
3110
3051
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3111
|
-
import React46, { useEffect as
|
|
3052
|
+
import React46, { useEffect as useEffect7, useRef as useRef3, useState as useState8 } from "react";
|
|
3112
3053
|
|
|
3113
3054
|
// src/components/IFrameLoaderView.tsx
|
|
3114
3055
|
import React45 from "react";
|
|
3115
|
-
import { jsx as
|
|
3056
|
+
import { jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3116
3057
|
var IFrameLoaderView = (props) => {
|
|
3117
|
-
return /* @__PURE__ */
|
|
3118
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
/* @__PURE__ */
|
|
3121
|
-
/* @__PURE__ */
|
|
3122
|
-
/* @__PURE__ */
|
|
3123
|
-
/* @__PURE__ */
|
|
3058
|
+
return /* @__PURE__ */ jsxs27(React45.Fragment, { children: [
|
|
3059
|
+
props.isDataFound == null && /* @__PURE__ */ jsx56("div", { className: "", children: /* @__PURE__ */ jsxs27("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3060
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center mb-4", children: [
|
|
3061
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3062
|
+
/* @__PURE__ */ jsxs27("div", { className: "ml-2", children: [
|
|
3063
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3064
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3124
3065
|
] })
|
|
3125
3066
|
] }),
|
|
3126
|
-
/* @__PURE__ */
|
|
3127
|
-
/* @__PURE__ */
|
|
3128
|
-
/* @__PURE__ */
|
|
3129
|
-
/* @__PURE__ */
|
|
3130
|
-
/* @__PURE__ */
|
|
3131
|
-
/* @__PURE__ */
|
|
3132
|
-
/* @__PURE__ */
|
|
3067
|
+
/* @__PURE__ */ jsxs27("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3068
|
+
/* @__PURE__ */ jsxs27("div", { className: "animate-pulse", children: [
|
|
3069
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3070
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3071
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3072
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3073
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3133
3074
|
] }),
|
|
3134
|
-
/* @__PURE__ */
|
|
3135
|
-
/* @__PURE__ */
|
|
3136
|
-
/* @__PURE__ */
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
/* @__PURE__ */
|
|
3075
|
+
/* @__PURE__ */ jsxs27("div", { className: "animate-pulse", children: [
|
|
3076
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3077
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3078
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3079
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3080
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3140
3081
|
] }),
|
|
3141
|
-
/* @__PURE__ */
|
|
3142
|
-
/* @__PURE__ */
|
|
3143
|
-
/* @__PURE__ */
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
/* @__PURE__ */
|
|
3146
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ jsxs27("div", { className: "animate-pulse", children: [
|
|
3083
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3084
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3085
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3086
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3087
|
+
/* @__PURE__ */ jsx56("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3147
3088
|
] })
|
|
3148
3089
|
] })
|
|
3149
3090
|
] }) }),
|
|
@@ -3153,12 +3094,12 @@ var IFrameLoaderView = (props) => {
|
|
|
3153
3094
|
var IFrameLoaderView_default = IFrameLoaderView;
|
|
3154
3095
|
|
|
3155
3096
|
// src/components/pageRenderingEngine/nodes/IframeClient.tsx
|
|
3156
|
-
import { jsx as
|
|
3097
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
3157
3098
|
var IframeClient = ({ src }) => {
|
|
3158
|
-
const iframeRef =
|
|
3159
|
-
const [iframeHeight, setIframeHeight] =
|
|
3160
|
-
const [isDataFound, setIsDataFound] =
|
|
3161
|
-
|
|
3099
|
+
const iframeRef = useRef3(null);
|
|
3100
|
+
const [iframeHeight, setIframeHeight] = useState8("100%");
|
|
3101
|
+
const [isDataFound, setIsDataFound] = useState8(null);
|
|
3102
|
+
useEffect7(() => {
|
|
3162
3103
|
const handleReceiveMessage = (event) => {
|
|
3163
3104
|
const eventName = event?.data?.eventName;
|
|
3164
3105
|
const payload = event?.data?.payload;
|
|
@@ -3173,7 +3114,7 @@ var IframeClient = ({ src }) => {
|
|
|
3173
3114
|
window.addEventListener("message", handleReceiveMessage);
|
|
3174
3115
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3175
3116
|
}, []);
|
|
3176
|
-
|
|
3117
|
+
useEffect7(() => {
|
|
3177
3118
|
const handleResize = () => {
|
|
3178
3119
|
if (iframeRef.current) {
|
|
3179
3120
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3185,7 +3126,7 @@ var IframeClient = ({ src }) => {
|
|
|
3185
3126
|
const handleIframeLoad = () => {
|
|
3186
3127
|
setIsDataFound(true);
|
|
3187
3128
|
};
|
|
3188
|
-
return /* @__PURE__ */
|
|
3129
|
+
return /* @__PURE__ */ jsx57(React46.Fragment, { children: /* @__PURE__ */ jsx57(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ jsx57(
|
|
3189
3130
|
"iframe",
|
|
3190
3131
|
{
|
|
3191
3132
|
ref: iframeRef,
|
|
@@ -3199,7 +3140,7 @@ var IframeClient = ({ src }) => {
|
|
|
3199
3140
|
var IframeClient_default = IframeClient;
|
|
3200
3141
|
|
|
3201
3142
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3202
|
-
import { jsx as
|
|
3143
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
3203
3144
|
var EmbedNode = (props) => {
|
|
3204
3145
|
let src;
|
|
3205
3146
|
if (props.node.provider == "youtube") {
|
|
@@ -3209,13 +3150,13 @@ var EmbedNode = (props) => {
|
|
|
3209
3150
|
} else {
|
|
3210
3151
|
src = props.node.embedSrc;
|
|
3211
3152
|
}
|
|
3212
|
-
return /* @__PURE__ */
|
|
3153
|
+
return /* @__PURE__ */ jsx58("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx58(IframeClient_default, { src }) });
|
|
3213
3154
|
};
|
|
3214
3155
|
var EmbedNode_default = EmbedNode;
|
|
3215
3156
|
|
|
3216
3157
|
// src/components/pageRenderingEngine/nodes/VideoNode.tsx
|
|
3217
3158
|
import React47 from "react";
|
|
3218
|
-
import { jsx as
|
|
3159
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
3219
3160
|
var VideoNode = (props) => {
|
|
3220
3161
|
let src;
|
|
3221
3162
|
if (props.node.provider == "youtube") {
|
|
@@ -3223,12 +3164,12 @@ var VideoNode = (props) => {
|
|
|
3223
3164
|
} else if (props.node.provider == "bunny") {
|
|
3224
3165
|
src = `https://iframe.mediadelivery.net/embed/${props.node.videoId}?autoplay=false&loop=false&muted=false&preload=true&responsive=true`;
|
|
3225
3166
|
}
|
|
3226
|
-
return /* @__PURE__ */
|
|
3167
|
+
return /* @__PURE__ */ jsx59(React47.Fragment, { children: src && /* @__PURE__ */ jsx59("iframe", { className: "w-full aspect-video rounded", src, loading: "lazy", allow: "accelerometer;gyroscope;autoplay;encrypted-media;picture-in-picture;", allowFullScreen: true }) });
|
|
3227
3168
|
};
|
|
3228
3169
|
var VideoNode_default = VideoNode;
|
|
3229
3170
|
|
|
3230
3171
|
// src/components/pageRenderingEngine/nodes/LayoutItemNode.tsx
|
|
3231
|
-
import { jsx as
|
|
3172
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3232
3173
|
var LayoutItemNode = (props) => {
|
|
3233
3174
|
const NodeTypes2 = {
|
|
3234
3175
|
["paragraph"]: ParagraphNode_default,
|
|
@@ -3289,11 +3230,11 @@ var LayoutItemNode = (props) => {
|
|
|
3289
3230
|
} else {
|
|
3290
3231
|
updatedLayout = removeParagraphsAtStartAndEnd(props.node);
|
|
3291
3232
|
}
|
|
3292
|
-
return /* @__PURE__ */
|
|
3233
|
+
return /* @__PURE__ */ jsx60(React48.Fragment, { children: /* @__PURE__ */ jsx60("div", { className: "layout-item " + cssClasses, style: { ...styles }, children: updatedLayout.children.map((node, index) => {
|
|
3293
3234
|
{
|
|
3294
3235
|
}
|
|
3295
3236
|
const SelectedNode = NodeTypes2[node.type];
|
|
3296
|
-
return /* @__PURE__ */
|
|
3237
|
+
return /* @__PURE__ */ jsx60(React48.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx60(
|
|
3297
3238
|
SelectedNode,
|
|
3298
3239
|
{
|
|
3299
3240
|
node,
|
|
@@ -3323,7 +3264,7 @@ var AssetUtility = class {
|
|
|
3323
3264
|
var AssetUtility_default = AssetUtility;
|
|
3324
3265
|
|
|
3325
3266
|
// src/components/pageRenderingEngine/nodes/LayoutContainerNode.tsx
|
|
3326
|
-
import { Fragment as Fragment6, jsx as
|
|
3267
|
+
import { Fragment as Fragment6, jsx as jsx61, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3327
3268
|
var LayoutContainerNode = (props) => {
|
|
3328
3269
|
const VERTICAL_ALIGNMENT_CLASSES = {
|
|
3329
3270
|
start: "items-start",
|
|
@@ -3393,7 +3334,7 @@ var LayoutContainerNode = (props) => {
|
|
|
3393
3334
|
if (backgroundLayers.length) {
|
|
3394
3335
|
styles.background = backgroundLayers.join(", ");
|
|
3395
3336
|
}
|
|
3396
|
-
const renderChildren = () => props.node.children?.map((node, index) => /* @__PURE__ */
|
|
3337
|
+
const renderChildren = () => props.node.children?.map((node, index) => /* @__PURE__ */ jsx61(
|
|
3397
3338
|
LayoutItemNode_default,
|
|
3398
3339
|
{
|
|
3399
3340
|
node,
|
|
@@ -3407,8 +3348,8 @@ var LayoutContainerNode = (props) => {
|
|
|
3407
3348
|
},
|
|
3408
3349
|
index
|
|
3409
3350
|
));
|
|
3410
|
-
return /* @__PURE__ */
|
|
3411
|
-
sectionWidth === "mixed" && /* @__PURE__ */
|
|
3351
|
+
return /* @__PURE__ */ jsxs28(Fragment6, { children: [
|
|
3352
|
+
sectionWidth === "mixed" && /* @__PURE__ */ jsx61("div", { className: cssClasses, style: styles, children: /* @__PURE__ */ jsx61("div", { className: "container", children: /* @__PURE__ */ jsx61(
|
|
3412
3353
|
"div",
|
|
3413
3354
|
{
|
|
3414
3355
|
className: `grid gap-y-4 lg:gap-y-0 ${gridCssClasses} ${addPadding ? "py-8 lg:py-6" : ""}`,
|
|
@@ -3416,7 +3357,7 @@ var LayoutContainerNode = (props) => {
|
|
|
3416
3357
|
children: renderChildren()
|
|
3417
3358
|
}
|
|
3418
3359
|
) }) }),
|
|
3419
|
-
sectionWidth === "full" && /* @__PURE__ */
|
|
3360
|
+
sectionWidth === "full" && /* @__PURE__ */ jsx61(
|
|
3420
3361
|
"div",
|
|
3421
3362
|
{
|
|
3422
3363
|
className: `grid gap-y-4 lg:gap-y-0 ${cssClasses} ${gridCssClasses} ${addPadding ? "p-8 lg:p-0" : ""}`,
|
|
@@ -3424,7 +3365,7 @@ var LayoutContainerNode = (props) => {
|
|
|
3424
3365
|
children: renderChildren()
|
|
3425
3366
|
}
|
|
3426
3367
|
),
|
|
3427
|
-
sectionWidth === "fixed" && /* @__PURE__ */
|
|
3368
|
+
sectionWidth === "fixed" && /* @__PURE__ */ jsx61("div", { className: "container", children: /* @__PURE__ */ jsx61(
|
|
3428
3369
|
"div",
|
|
3429
3370
|
{
|
|
3430
3371
|
className: `grid gap-y-4 lg:gap-y-0 ${cssClasses} ${gridCssClasses} ${addPadding ? "px-8 py-6 lg:px-6 lg:py-6" : ""}`,
|
|
@@ -3437,12 +3378,12 @@ var LayoutContainerNode = (props) => {
|
|
|
3437
3378
|
var LayoutContainerNode_default = LayoutContainerNode;
|
|
3438
3379
|
|
|
3439
3380
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3440
|
-
import React49, { useRef as
|
|
3381
|
+
import React49, { useRef as useRef4, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect8 } from "react";
|
|
3441
3382
|
|
|
3442
3383
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3443
|
-
import { jsx as
|
|
3384
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3444
3385
|
var InputControlNode = (props) => {
|
|
3445
|
-
return /* @__PURE__ */
|
|
3386
|
+
return /* @__PURE__ */ jsx62("div", { children: /* @__PURE__ */ jsx62(
|
|
3446
3387
|
InputControl_default,
|
|
3447
3388
|
{
|
|
3448
3389
|
name: props.node.name,
|
|
@@ -3471,13 +3412,13 @@ var InputControlNode = (props) => {
|
|
|
3471
3412
|
var InputControlNode_default = InputControlNode;
|
|
3472
3413
|
|
|
3473
3414
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3474
|
-
import { jsx as
|
|
3415
|
+
import { jsx as jsx63, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3475
3416
|
var FormContainerNode = (props) => {
|
|
3476
3417
|
const NodeTypes2 = {
|
|
3477
3418
|
["input-control"]: InputControlNode_default
|
|
3478
3419
|
};
|
|
3479
3420
|
const { node } = props;
|
|
3480
|
-
const formRef =
|
|
3421
|
+
const formRef = useRef4(null);
|
|
3481
3422
|
const initialState = {
|
|
3482
3423
|
inputValues: {},
|
|
3483
3424
|
lastPropertyChanged: ""
|
|
@@ -3494,7 +3435,7 @@ var FormContainerNode = (props) => {
|
|
|
3494
3435
|
return true;
|
|
3495
3436
|
}
|
|
3496
3437
|
};
|
|
3497
|
-
|
|
3438
|
+
useEffect8(() => {
|
|
3498
3439
|
const fetchInitialData = async () => {
|
|
3499
3440
|
if (!props.fetchData || !node.dataFetchApi) return;
|
|
3500
3441
|
const response = await props.fetchData(
|
|
@@ -3511,12 +3452,12 @@ var FormContainerNode = (props) => {
|
|
|
3511
3452
|
};
|
|
3512
3453
|
fetchInitialData();
|
|
3513
3454
|
}, [props.fetchData, node.dataFetchApi, props.routeParameters]);
|
|
3514
|
-
return /* @__PURE__ */
|
|
3455
|
+
return /* @__PURE__ */ jsxs29("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3515
3456
|
node.children && node.children.map((node2, index) => {
|
|
3516
3457
|
{
|
|
3517
3458
|
}
|
|
3518
3459
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3519
|
-
return /* @__PURE__ */
|
|
3460
|
+
return /* @__PURE__ */ jsx63(React49.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx63(
|
|
3520
3461
|
InputControlNode_default,
|
|
3521
3462
|
{
|
|
3522
3463
|
value: formState.inputValues[node2.name],
|
|
@@ -3525,7 +3466,7 @@ var FormContainerNode = (props) => {
|
|
|
3525
3466
|
}
|
|
3526
3467
|
) }, index);
|
|
3527
3468
|
}),
|
|
3528
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3469
|
+
node.children.length == 0 && /* @__PURE__ */ jsx63("div", { className: "py-0.5 lg:py-1.5" })
|
|
3529
3470
|
] });
|
|
3530
3471
|
};
|
|
3531
3472
|
var FormContainerNode_default = FormContainerNode;
|
|
@@ -3533,7 +3474,7 @@ var FormContainerNode_default = FormContainerNode;
|
|
|
3533
3474
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3534
3475
|
import React50 from "react";
|
|
3535
3476
|
import Link3 from "next/link";
|
|
3536
|
-
import { jsx as
|
|
3477
|
+
import { jsx as jsx64, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3537
3478
|
var DivContainer = (props) => {
|
|
3538
3479
|
const { cssProperties: styles, hoverCssProperties: hoverStyles, mobileCssProperties: mobileStyles } = props.node;
|
|
3539
3480
|
const updatedStyles = convertKeysToCamelCase(styles);
|
|
@@ -3652,9 +3593,9 @@ ${mobileCssRules.join("\n")}
|
|
|
3652
3593
|
return css2;
|
|
3653
3594
|
};
|
|
3654
3595
|
const css = generateCssString(updatedStyle, hoverStyles, mobileStyles);
|
|
3655
|
-
return /* @__PURE__ */
|
|
3656
|
-
/* @__PURE__ */
|
|
3657
|
-
props.node.href && props.node.href !== "" ? /* @__PURE__ */
|
|
3596
|
+
return /* @__PURE__ */ jsxs30(React50.Fragment, { children: [
|
|
3597
|
+
/* @__PURE__ */ jsx64("style", { dangerouslySetInnerHTML: { __html: css } }),
|
|
3598
|
+
props.node.href && props.node.href !== "" ? /* @__PURE__ */ jsx64(Link3, { href: props.node.href, className: "block", children: /* @__PURE__ */ jsx64(
|
|
3658
3599
|
"div",
|
|
3659
3600
|
{
|
|
3660
3601
|
id: guid,
|
|
@@ -3662,7 +3603,7 @@ ${mobileCssRules.join("\n")}
|
|
|
3662
3603
|
className: containerPaddingClass,
|
|
3663
3604
|
children: props.node.children?.map((node, index) => {
|
|
3664
3605
|
const SelectedNode = NodeTypes2[node.type];
|
|
3665
|
-
return /* @__PURE__ */
|
|
3606
|
+
return /* @__PURE__ */ jsx64(React50.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx64(
|
|
3666
3607
|
SelectedNode,
|
|
3667
3608
|
{
|
|
3668
3609
|
node,
|
|
@@ -3677,9 +3618,9 @@ ${mobileCssRules.join("\n")}
|
|
|
3677
3618
|
) }, index);
|
|
3678
3619
|
})
|
|
3679
3620
|
}
|
|
3680
|
-
) }) : /* @__PURE__ */
|
|
3621
|
+
) }) : /* @__PURE__ */ jsx64("div", { id: guid, style: { ...backgroundStyle }, className: containerPaddingClass, children: props.node.children && props.node.children.map((node, index) => {
|
|
3681
3622
|
const SelectedNode = NodeTypes2[node.type];
|
|
3682
|
-
return /* @__PURE__ */
|
|
3623
|
+
return /* @__PURE__ */ jsx64(React50.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx64(
|
|
3683
3624
|
SelectedNode,
|
|
3684
3625
|
{
|
|
3685
3626
|
node,
|
|
@@ -3698,7 +3639,7 @@ ${mobileCssRules.join("\n")}
|
|
|
3698
3639
|
var DivContainer_default = DivContainer;
|
|
3699
3640
|
|
|
3700
3641
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
3701
|
-
import { jsx as
|
|
3642
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
3702
3643
|
var NodeTypes = {
|
|
3703
3644
|
["paragraph"]: ParagraphNode_default,
|
|
3704
3645
|
["heading"]: HeadingNode_default,
|
|
@@ -3726,11 +3667,11 @@ var PageBodyRenderer = (props) => {
|
|
|
3726
3667
|
if (pageBodyTree && pageBodyTree.root) {
|
|
3727
3668
|
rootNode = pageBodyTree.root;
|
|
3728
3669
|
}
|
|
3729
|
-
return /* @__PURE__ */
|
|
3670
|
+
return /* @__PURE__ */ jsx65(React51.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
3730
3671
|
{
|
|
3731
3672
|
}
|
|
3732
3673
|
const SelectedNode = NodeTypes[node.type];
|
|
3733
|
-
return /* @__PURE__ */
|
|
3674
|
+
return /* @__PURE__ */ jsx65(React51.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx65(React51.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx65(React51.Fragment, { children: /* @__PURE__ */ jsx65(
|
|
3734
3675
|
SelectedNode,
|
|
3735
3676
|
{
|
|
3736
3677
|
node,
|
|
@@ -3743,7 +3684,7 @@ var PageBodyRenderer = (props) => {
|
|
|
3743
3684
|
apiBaseUrl: props.apiBaseUrl,
|
|
3744
3685
|
widgetRegistry: props.widgetRegistry
|
|
3745
3686
|
}
|
|
3746
|
-
) }) : /* @__PURE__ */
|
|
3687
|
+
) }) : /* @__PURE__ */ jsx65(React51.Fragment, { children: /* @__PURE__ */ jsx65(
|
|
3747
3688
|
SelectedNode,
|
|
3748
3689
|
{
|
|
3749
3690
|
node,
|