@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260319054248 → 0.8.1-dev.20260320043430
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 +120 -63
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +114 -57
- package/dist/index.mjs.map +1 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2559,15 +2559,69 @@ var LinkNode = (props) => {
|
|
|
2559
2559
|
};
|
|
2560
2560
|
var LinkNode_default = LinkNode;
|
|
2561
2561
|
|
|
2562
|
+
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2563
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2564
|
+
var SVGIconNode = ({ node }) => {
|
|
2565
|
+
if (!node?.svgCode) return null;
|
|
2566
|
+
return /* @__PURE__ */ jsx44(
|
|
2567
|
+
"span",
|
|
2568
|
+
{
|
|
2569
|
+
style: {
|
|
2570
|
+
display: "flex",
|
|
2571
|
+
width: node.width,
|
|
2572
|
+
height: node.height,
|
|
2573
|
+
color: node.color
|
|
2574
|
+
},
|
|
2575
|
+
dangerouslySetInnerHTML: { __html: node.svgCode }
|
|
2576
|
+
}
|
|
2577
|
+
);
|
|
2578
|
+
};
|
|
2579
|
+
var SVGIconNode_default = SVGIconNode;
|
|
2580
|
+
|
|
2581
|
+
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2582
|
+
import katex from "katex";
|
|
2583
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2584
|
+
var EquationNode = ({ node }) => {
|
|
2585
|
+
const { equation, inline } = node;
|
|
2586
|
+
let html = "";
|
|
2587
|
+
try {
|
|
2588
|
+
html = katex.renderToString(equation, {
|
|
2589
|
+
displayMode: !inline,
|
|
2590
|
+
throwOnError: false
|
|
2591
|
+
});
|
|
2592
|
+
} catch (error) {
|
|
2593
|
+
html = katex.renderToString(`\\text{Invalid equation}`, {
|
|
2594
|
+
throwOnError: false
|
|
2595
|
+
});
|
|
2596
|
+
}
|
|
2597
|
+
if (inline) {
|
|
2598
|
+
return /* @__PURE__ */ jsx45(
|
|
2599
|
+
"span",
|
|
2600
|
+
{
|
|
2601
|
+
className: "katex-inline",
|
|
2602
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
2603
|
+
}
|
|
2604
|
+
);
|
|
2605
|
+
}
|
|
2606
|
+
return /* @__PURE__ */ jsx45(
|
|
2607
|
+
"div",
|
|
2608
|
+
{
|
|
2609
|
+
className: "katex-block my-3 text-center",
|
|
2610
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
2611
|
+
}
|
|
2612
|
+
);
|
|
2613
|
+
};
|
|
2614
|
+
var EquationNode_default = EquationNode;
|
|
2615
|
+
|
|
2562
2616
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2563
|
-
import { jsx as
|
|
2617
|
+
import { jsx as jsx46, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2564
2618
|
var ParagraphNode = (props) => {
|
|
2565
2619
|
const NodeTypes2 = {
|
|
2566
2620
|
["text"]: TextNode_default,
|
|
2567
2621
|
["linebreak"]: LineBreakNode_default,
|
|
2568
|
-
["link"]: LinkNode_default
|
|
2569
|
-
|
|
2570
|
-
|
|
2622
|
+
["link"]: LinkNode_default,
|
|
2623
|
+
["equation"]: EquationNode_default,
|
|
2624
|
+
["svg-icon"]: SVGIconNode_default
|
|
2571
2625
|
};
|
|
2572
2626
|
const FormatClass = {
|
|
2573
2627
|
"center": "text-center"
|
|
@@ -2578,16 +2632,16 @@ var ParagraphNode = (props) => {
|
|
|
2578
2632
|
return /* @__PURE__ */ jsxs24("div", { className: "my-1 " + formatClasses, children: [
|
|
2579
2633
|
props.node.children && props.node.children.map((node, index) => {
|
|
2580
2634
|
const SelectedNode = NodeTypes2[node.type];
|
|
2581
|
-
return /* @__PURE__ */
|
|
2635
|
+
return /* @__PURE__ */ jsx46(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node }) }, index);
|
|
2582
2636
|
}),
|
|
2583
|
-
props.node.children.length == 0 && /* @__PURE__ */
|
|
2637
|
+
props.node.children.length == 0 && /* @__PURE__ */ jsx46("div", { className: "py-0.5 lg:py-1.5" })
|
|
2584
2638
|
] });
|
|
2585
2639
|
};
|
|
2586
2640
|
var ParagraphNode_default = ParagraphNode;
|
|
2587
2641
|
|
|
2588
2642
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2589
2643
|
import React38 from "react";
|
|
2590
|
-
import { Fragment as Fragment3, jsx as
|
|
2644
|
+
import { Fragment as Fragment3, jsx as jsx47 } from "react/jsx-runtime";
|
|
2591
2645
|
var HeadingNode = (props) => {
|
|
2592
2646
|
const NodeTypes2 = {
|
|
2593
2647
|
["text"]: TextNode_default,
|
|
@@ -2600,12 +2654,12 @@ var HeadingNode = (props) => {
|
|
|
2600
2654
|
{
|
|
2601
2655
|
}
|
|
2602
2656
|
let formatClasses = FormatClass[props.node.format] || "";
|
|
2603
|
-
return /* @__PURE__ */
|
|
2657
|
+
return /* @__PURE__ */ jsx47(Fragment3, { children: React38.createElement(
|
|
2604
2658
|
HeadingTag,
|
|
2605
2659
|
{ className: formatClasses },
|
|
2606
2660
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2607
2661
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2608
|
-
return /* @__PURE__ */
|
|
2662
|
+
return /* @__PURE__ */ jsx47(React38.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node: childNode }) }, index);
|
|
2609
2663
|
})
|
|
2610
2664
|
) });
|
|
2611
2665
|
};
|
|
@@ -2616,34 +2670,34 @@ import React40 from "react";
|
|
|
2616
2670
|
|
|
2617
2671
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2618
2672
|
import React39 from "react";
|
|
2619
|
-
import { jsx as
|
|
2673
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2620
2674
|
var ListItemNode = (props) => {
|
|
2621
2675
|
const NodeTypes2 = {
|
|
2622
2676
|
["text"]: TextNode_default,
|
|
2623
2677
|
["linebreak"]: LineBreakNode_default,
|
|
2624
2678
|
["link"]: LinkNode_default
|
|
2625
2679
|
};
|
|
2626
|
-
return /* @__PURE__ */
|
|
2680
|
+
return /* @__PURE__ */ jsx48("li", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2627
2681
|
const SelectedNode = NodeTypes2[node.type];
|
|
2628
|
-
return /* @__PURE__ */
|
|
2682
|
+
return /* @__PURE__ */ jsx48(React39.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node }) }, index);
|
|
2629
2683
|
}) });
|
|
2630
2684
|
};
|
|
2631
2685
|
var ListItemNode_default = ListItemNode;
|
|
2632
2686
|
|
|
2633
2687
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2634
|
-
import { jsx as
|
|
2688
|
+
import { jsx as jsx49, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2635
2689
|
var ListNode = (props) => {
|
|
2636
2690
|
const NodeTypes2 = {
|
|
2637
2691
|
listitem: ListItemNode_default
|
|
2638
2692
|
};
|
|
2639
2693
|
return /* @__PURE__ */ jsxs25(React40.Fragment, { children: [
|
|
2640
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
2694
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx49("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2641
2695
|
const SelectedNode = NodeTypes2[node.type];
|
|
2642
|
-
return /* @__PURE__ */
|
|
2696
|
+
return /* @__PURE__ */ jsx49(React40.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(SelectedNode, { node }) }, index);
|
|
2643
2697
|
}) }),
|
|
2644
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
2698
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx49("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2645
2699
|
const SelectedNode = NodeTypes2[node.type];
|
|
2646
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ jsx49(React40.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(SelectedNode, { node }) }, index);
|
|
2647
2701
|
}) })
|
|
2648
2702
|
] });
|
|
2649
2703
|
};
|
|
@@ -2651,40 +2705,40 @@ var ListNode_default = ListNode;
|
|
|
2651
2705
|
|
|
2652
2706
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2653
2707
|
import React41 from "react";
|
|
2654
|
-
import { jsx as
|
|
2708
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2655
2709
|
var QuoteNode = (props) => {
|
|
2656
2710
|
const NodeTypes2 = {
|
|
2657
2711
|
["text"]: TextNode_default,
|
|
2658
2712
|
["linebreak"]: LineBreakNode_default,
|
|
2659
2713
|
["link"]: LinkNode_default
|
|
2660
2714
|
};
|
|
2661
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ jsx50("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2662
2716
|
const SelectedNode = NodeTypes2[node.type];
|
|
2663
|
-
return /* @__PURE__ */
|
|
2717
|
+
return /* @__PURE__ */ jsx50(React41.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx50(SelectedNode, { node }) }, index);
|
|
2664
2718
|
}) });
|
|
2665
2719
|
};
|
|
2666
2720
|
var QuoteNode_default = QuoteNode;
|
|
2667
2721
|
|
|
2668
2722
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2669
2723
|
import React42 from "react";
|
|
2670
|
-
import { jsx as
|
|
2724
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2671
2725
|
var CodeNode = (props) => {
|
|
2672
2726
|
const NodeTypes2 = {
|
|
2673
2727
|
["text"]: TextNode_default,
|
|
2674
2728
|
["linebreak"]: LineBreakNode_default,
|
|
2675
2729
|
["link"]: LinkNode_default
|
|
2676
2730
|
};
|
|
2677
|
-
return /* @__PURE__ */
|
|
2731
|
+
return /* @__PURE__ */ jsx51("code", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2678
2732
|
const SelectedNode = NodeTypes2[node.type];
|
|
2679
|
-
return /* @__PURE__ */
|
|
2733
|
+
return /* @__PURE__ */ jsx51(React42.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx51(SelectedNode, { node }) }, index);
|
|
2680
2734
|
}) });
|
|
2681
2735
|
};
|
|
2682
2736
|
var CodeNode_default = CodeNode;
|
|
2683
2737
|
|
|
2684
2738
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
2685
|
-
import { jsx as
|
|
2739
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2686
2740
|
var HorizontalRuleNode = (props) => {
|
|
2687
|
-
return /* @__PURE__ */
|
|
2741
|
+
return /* @__PURE__ */ jsx52("hr", {});
|
|
2688
2742
|
};
|
|
2689
2743
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
2690
2744
|
|
|
@@ -2696,11 +2750,11 @@ import React44 from "react";
|
|
|
2696
2750
|
|
|
2697
2751
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2698
2752
|
import React43 from "react";
|
|
2699
|
-
import { jsx as
|
|
2753
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2700
2754
|
var ImageNode = (props) => {
|
|
2701
2755
|
const { node, apiBaseUrl = "" } = props;
|
|
2702
2756
|
let imageUrl = node.imageUrl.startsWith("http") ? node.imageUrl : `${apiBaseUrl}/digitalassets/storefront/${node.imageUrl}`;
|
|
2703
|
-
return /* @__PURE__ */
|
|
2757
|
+
return /* @__PURE__ */ jsx53(React43.Fragment, { children: node.width ? /* @__PURE__ */ jsx53("div", { style: { width: node.width }, children: /* @__PURE__ */ jsx53(
|
|
2704
2758
|
"img",
|
|
2705
2759
|
{
|
|
2706
2760
|
loading: "lazy",
|
|
@@ -2710,7 +2764,7 @@ var ImageNode = (props) => {
|
|
|
2710
2764
|
height: node.intrinsicHeight,
|
|
2711
2765
|
alt: node.title
|
|
2712
2766
|
}
|
|
2713
|
-
) }) : /* @__PURE__ */
|
|
2767
|
+
) }) : /* @__PURE__ */ jsx53(
|
|
2714
2768
|
"img",
|
|
2715
2769
|
{
|
|
2716
2770
|
loading: "lazy",
|
|
@@ -2725,7 +2779,7 @@ var ImageNode = (props) => {
|
|
|
2725
2779
|
var ImageNode_default = ImageNode;
|
|
2726
2780
|
|
|
2727
2781
|
// src/components/pageRenderingEngine/nodes/LayoutItemNode.tsx
|
|
2728
|
-
import { jsx as
|
|
2782
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2729
2783
|
var LayoutItemNode = (props) => {
|
|
2730
2784
|
const NodeTypes2 = {
|
|
2731
2785
|
["paragraph"]: ParagraphNode_default,
|
|
@@ -2779,17 +2833,17 @@ var LayoutItemNode = (props) => {
|
|
|
2779
2833
|
} else {
|
|
2780
2834
|
updatedLayout = removeParagraphsAtStartAndEnd(props.node);
|
|
2781
2835
|
}
|
|
2782
|
-
return /* @__PURE__ */
|
|
2836
|
+
return /* @__PURE__ */ jsx54("div", { className: "" + cssClasses, style: { ...styles }, children: updatedLayout.children.map((node, index) => {
|
|
2783
2837
|
{
|
|
2784
2838
|
}
|
|
2785
2839
|
const SelectedNode = NodeTypes2[node.type];
|
|
2786
|
-
return /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ jsx54(React44.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx54(SelectedNode, { node }) }, index);
|
|
2787
2841
|
}) });
|
|
2788
2842
|
};
|
|
2789
2843
|
var LayoutItemNode_default = LayoutItemNode;
|
|
2790
2844
|
|
|
2791
2845
|
// src/components/pageRenderingEngine/nodes/LayoutContainerNode.tsx
|
|
2792
|
-
import { jsx as
|
|
2846
|
+
import { jsx as jsx55, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2793
2847
|
var VERTICAL_ALIGNMENT_CLASSES = {
|
|
2794
2848
|
"start": "items-start",
|
|
2795
2849
|
"center": "items-center",
|
|
@@ -2864,26 +2918,26 @@ var LayoutContainerNode = (props) => {
|
|
|
2864
2918
|
sectionWidth = node.sectionWidth;
|
|
2865
2919
|
}
|
|
2866
2920
|
return /* @__PURE__ */ jsxs26(React45.Fragment, { children: [
|
|
2867
|
-
sectionWidth == "mixed" && /* @__PURE__ */
|
|
2868
|
-
return /* @__PURE__ */
|
|
2921
|
+
sectionWidth == "mixed" && /* @__PURE__ */ jsx55("div", { className: cssClasses, style: { ...styles }, children: /* @__PURE__ */ jsx55("div", { className: "container", children: /* @__PURE__ */ jsx55("div", { className: "grid gap-y-8 " + gridCssClasses + (addPadding ? " px-4 py-4 lg:px-6 lg:py-6 " : ""), style: { columnGap, minHeight: node.height }, children: node.children && node.children.map((node2, index) => {
|
|
2922
|
+
return /* @__PURE__ */ jsx55(React45.Fragment, { children: /* @__PURE__ */ jsx55(LayoutItemNode_default, { node: node2, order: props.node.smOrder == "reverse" ? node2.children.length - index : index }) }, index);
|
|
2869
2923
|
}) }) }) }),
|
|
2870
|
-
sectionWidth == "full" && /* @__PURE__ */
|
|
2924
|
+
sectionWidth == "full" && /* @__PURE__ */ jsx55(
|
|
2871
2925
|
"div",
|
|
2872
2926
|
{
|
|
2873
2927
|
className: "grid gap-y-8 " + cssClasses + " " + gridCssClasses + (addPadding ? " p-4 lg:p-0" : ""),
|
|
2874
2928
|
style: { columnGap, ...styles },
|
|
2875
2929
|
children: node.children && node.children.map((node2, index) => {
|
|
2876
|
-
return /* @__PURE__ */
|
|
2930
|
+
return /* @__PURE__ */ jsx55(React45.Fragment, { children: /* @__PURE__ */ jsx55(LayoutItemNode_default, { node: node2, order: props.node.smOrder == "reverse" ? node2.children.length - index : index }) }, index);
|
|
2877
2931
|
})
|
|
2878
2932
|
}
|
|
2879
2933
|
),
|
|
2880
|
-
sectionWidth == "fixed" && /* @__PURE__ */
|
|
2934
|
+
sectionWidth == "fixed" && /* @__PURE__ */ jsx55("div", { className: "container", children: /* @__PURE__ */ jsx55(
|
|
2881
2935
|
"div",
|
|
2882
2936
|
{
|
|
2883
2937
|
className: "grid gap-y-8 " + cssClasses + " " + gridCssClasses + (addPadding ? " px-4 py-4 lg:px-6 lg:py-6 " : ""),
|
|
2884
2938
|
style: { columnGap, ...styles },
|
|
2885
2939
|
children: node.children && node.children.map((node2, index) => {
|
|
2886
|
-
return /* @__PURE__ */
|
|
2940
|
+
return /* @__PURE__ */ jsx55(React45.Fragment, { children: /* @__PURE__ */ jsx55(LayoutItemNode_default, { node: node2, order: props.node.smOrder == "reverse" ? node2.children.length - index : index }) }, index);
|
|
2887
2941
|
})
|
|
2888
2942
|
}
|
|
2889
2943
|
) })
|
|
@@ -2893,7 +2947,7 @@ var LayoutContainerNode_default = LayoutContainerNode;
|
|
|
2893
2947
|
|
|
2894
2948
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
2895
2949
|
import { Suspense } from "react";
|
|
2896
|
-
import { Fragment as Fragment4, jsx as
|
|
2950
|
+
import { Fragment as Fragment4, jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2897
2951
|
var WidgetNode = (props) => {
|
|
2898
2952
|
const getWidgetParameters = () => {
|
|
2899
2953
|
const widgetInputParameters = { ...props.routeParameters ?? {} };
|
|
@@ -2953,7 +3007,7 @@ var WidgetNode = (props) => {
|
|
|
2953
3007
|
props.node.widgetCode
|
|
2954
3008
|
] });
|
|
2955
3009
|
}
|
|
2956
|
-
return /* @__PURE__ */
|
|
3010
|
+
return /* @__PURE__ */ jsx56(Suspense, { fallback: /* @__PURE__ */ jsx56("div", { className: "container mt-2", children: "..." }), children: /* @__PURE__ */ jsx56(
|
|
2957
3011
|
SelectedWidget,
|
|
2958
3012
|
{
|
|
2959
3013
|
params: getWidgetParameters(),
|
|
@@ -2971,9 +3025,9 @@ var WidgetNode_default = WidgetNode;
|
|
|
2971
3025
|
import React47, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect7 } from "react";
|
|
2972
3026
|
|
|
2973
3027
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
2974
|
-
import { jsx as
|
|
3028
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
2975
3029
|
var InputControlNode = (props) => {
|
|
2976
|
-
return /* @__PURE__ */
|
|
3030
|
+
return /* @__PURE__ */ jsx57("div", { children: /* @__PURE__ */ jsx57(
|
|
2977
3031
|
InputControl_default,
|
|
2978
3032
|
{
|
|
2979
3033
|
name: props.node.name,
|
|
@@ -3002,7 +3056,7 @@ var InputControlNode = (props) => {
|
|
|
3002
3056
|
var InputControlNode_default = InputControlNode;
|
|
3003
3057
|
|
|
3004
3058
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3005
|
-
import { jsx as
|
|
3059
|
+
import { jsx as jsx58, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3006
3060
|
var FormContainerNode = (props) => {
|
|
3007
3061
|
const NodeTypes2 = {
|
|
3008
3062
|
["input-control"]: InputControlNode_default
|
|
@@ -3047,7 +3101,7 @@ var FormContainerNode = (props) => {
|
|
|
3047
3101
|
{
|
|
3048
3102
|
}
|
|
3049
3103
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3050
|
-
return /* @__PURE__ */
|
|
3104
|
+
return /* @__PURE__ */ jsx58(React47.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx58(
|
|
3051
3105
|
InputControlNode_default,
|
|
3052
3106
|
{
|
|
3053
3107
|
value: formState.inputValues[node2.name],
|
|
@@ -3056,7 +3110,7 @@ var FormContainerNode = (props) => {
|
|
|
3056
3110
|
}
|
|
3057
3111
|
) }, index);
|
|
3058
3112
|
}),
|
|
3059
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3113
|
+
node.children.length == 0 && /* @__PURE__ */ jsx58("div", { className: "py-0.5 lg:py-1.5" })
|
|
3060
3114
|
] });
|
|
3061
3115
|
};
|
|
3062
3116
|
var FormContainerNode_default = FormContainerNode;
|
|
@@ -3083,7 +3137,7 @@ var AssetUtility = class {
|
|
|
3083
3137
|
var AssetUtility_default = AssetUtility;
|
|
3084
3138
|
|
|
3085
3139
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3086
|
-
import { jsx as
|
|
3140
|
+
import { jsx as jsx59, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3087
3141
|
var DivContainer = (props) => {
|
|
3088
3142
|
const { cssProperties: styles, hoverCssProperties: hoverStyles, mobileCssProperties: mobileStyles } = props.node;
|
|
3089
3143
|
const updatedStyles = convertKeysToCamelCase(styles);
|
|
@@ -3098,7 +3152,8 @@ var DivContainer = (props) => {
|
|
|
3098
3152
|
["layout-container"]: LayoutContainerNode_default,
|
|
3099
3153
|
["widget"]: WidgetNode_default,
|
|
3100
3154
|
["div-container"]: DivContainer,
|
|
3101
|
-
["text"]: TextNode_default
|
|
3155
|
+
["text"]: TextNode_default,
|
|
3156
|
+
["svg-icon"]: SVGIconNode_default
|
|
3102
3157
|
};
|
|
3103
3158
|
function toCamelCase(str) {
|
|
3104
3159
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
@@ -3200,8 +3255,8 @@ ${mobileCssRules.join("\n")}
|
|
|
3200
3255
|
};
|
|
3201
3256
|
const css = generateCssString(updatedStyle, hoverStyles, mobileStyles);
|
|
3202
3257
|
return /* @__PURE__ */ jsxs29(React48.Fragment, { children: [
|
|
3203
|
-
/* @__PURE__ */
|
|
3204
|
-
props.node.href && props.node.href !== "" ? /* @__PURE__ */
|
|
3258
|
+
/* @__PURE__ */ jsx59("style", { dangerouslySetInnerHTML: { __html: css } }),
|
|
3259
|
+
props.node.href && props.node.href !== "" ? /* @__PURE__ */ jsx59(Link3, { href: props.node.href, className: "block", children: /* @__PURE__ */ jsx59(
|
|
3205
3260
|
"div",
|
|
3206
3261
|
{
|
|
3207
3262
|
id: guid,
|
|
@@ -3209,7 +3264,7 @@ ${mobileCssRules.join("\n")}
|
|
|
3209
3264
|
className: containerPaddingClass,
|
|
3210
3265
|
children: props.node.children?.map((node, index) => {
|
|
3211
3266
|
const SelectedNode = NodeTypes2[node.type];
|
|
3212
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsx59(React48.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx59(
|
|
3213
3268
|
SelectedNode,
|
|
3214
3269
|
{
|
|
3215
3270
|
node,
|
|
@@ -3224,9 +3279,9 @@ ${mobileCssRules.join("\n")}
|
|
|
3224
3279
|
) }, index);
|
|
3225
3280
|
})
|
|
3226
3281
|
}
|
|
3227
|
-
) }) : /* @__PURE__ */
|
|
3282
|
+
) }) : /* @__PURE__ */ jsx59("div", { id: guid, style: { ...backgroundStyle }, className: containerPaddingClass, children: props.node.children && props.node.children.map((node, index) => {
|
|
3228
3283
|
const SelectedNode = NodeTypes2[node.type];
|
|
3229
|
-
return /* @__PURE__ */
|
|
3284
|
+
return /* @__PURE__ */ jsx59(React48.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx59(
|
|
3230
3285
|
SelectedNode,
|
|
3231
3286
|
{
|
|
3232
3287
|
node,
|
|
@@ -3245,7 +3300,7 @@ ${mobileCssRules.join("\n")}
|
|
|
3245
3300
|
var DivContainer_default = DivContainer;
|
|
3246
3301
|
|
|
3247
3302
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
3248
|
-
import { jsx as
|
|
3303
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3249
3304
|
var NodeTypes = {
|
|
3250
3305
|
["paragraph"]: ParagraphNode_default,
|
|
3251
3306
|
["heading"]: HeadingNode_default,
|
|
@@ -3257,7 +3312,8 @@ var NodeTypes = {
|
|
|
3257
3312
|
["layout-container"]: LayoutContainerNode_default,
|
|
3258
3313
|
["widget"]: WidgetNode_default,
|
|
3259
3314
|
["form-container"]: FormContainerNode_default,
|
|
3260
|
-
["div-container"]: DivContainer_default
|
|
3315
|
+
["div-container"]: DivContainer_default,
|
|
3316
|
+
["svg-icon"]: SVGIconNode_default
|
|
3261
3317
|
};
|
|
3262
3318
|
var PageBodyRenderer = (props) => {
|
|
3263
3319
|
let pageBodyTree;
|
|
@@ -3271,11 +3327,11 @@ var PageBodyRenderer = (props) => {
|
|
|
3271
3327
|
if (pageBodyTree && pageBodyTree.root) {
|
|
3272
3328
|
rootNode = pageBodyTree.root;
|
|
3273
3329
|
}
|
|
3274
|
-
return /* @__PURE__ */
|
|
3330
|
+
return /* @__PURE__ */ jsx60(React49.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
3275
3331
|
{
|
|
3276
3332
|
}
|
|
3277
3333
|
const SelectedNode = NodeTypes[node.type];
|
|
3278
|
-
return /* @__PURE__ */
|
|
3334
|
+
return /* @__PURE__ */ jsx60(React49.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx60(React49.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx60(React49.Fragment, { children: /* @__PURE__ */ jsx60(
|
|
3279
3335
|
SelectedNode,
|
|
3280
3336
|
{
|
|
3281
3337
|
node,
|
|
@@ -3288,7 +3344,7 @@ var PageBodyRenderer = (props) => {
|
|
|
3288
3344
|
apiBaseUrl: props.apiBaseUrl,
|
|
3289
3345
|
widgetRegistry: props.widgetRegistry
|
|
3290
3346
|
}
|
|
3291
|
-
) }) : /* @__PURE__ */
|
|
3347
|
+
) }) : /* @__PURE__ */ jsx60(React49.Fragment, { children: /* @__PURE__ */ jsx60(
|
|
3292
3348
|
SelectedNode,
|
|
3293
3349
|
{
|
|
3294
3350
|
node,
|
|
@@ -3312,3 +3368,4 @@ export {
|
|
|
3312
3368
|
ViewControl_default as ViewControl,
|
|
3313
3369
|
ViewControlTypes_default as ViewControlTypes
|
|
3314
3370
|
};
|
|
3371
|
+
//# sourceMappingURL=index.mjs.map
|