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